index.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. <template>
  2. <basic-container class="mt-10">
  3. <el-avatar class="mt-20" :size="150" :src="user.info.avatarUrl"></el-avatar>
  4. <div class="bold font-30">{{ user.info.name }}</div>
  5. <div class="bold font-24 mt-10">{{ user.info.deptName }}</div>
  6. <div class="mt-20 font-18 lines-height-15">
  7. <div>绑定电话:{{ user.info.phone }}</div>
  8. <div>注册时间:{{ user.info.createTime }}</div>
  9. </div>
  10. <div class="mt-20 flex flex-center">
  11. <div class="mr-20">
  12. <img
  13. class="icon"
  14. src="https://wutong-1302848345.cos.ap-chengdu.myqcloud.com/wtzx/db94c8a6a7ec46f7a3b32b20a5da3844.jpg"
  15. />
  16. <div class="font-18 bold">梧桐研究院</div>
  17. </div>
  18. <div class="ml-20">
  19. <img
  20. class="icon"
  21. src="https://wutong-1302848345.cos.ap-chengdu.myqcloud.com/wtzx/23fcdf89312f4c969eeb636d1adf9adc.jpg"
  22. />
  23. <div class="font-18 bold">梧桐树云数据服务</div>
  24. </div>
  25. </div>
  26. <div class="mt-20 grey-6">微信扫一扫 随时掌握项目动态</div>
  27. </basic-container>
  28. </template>
  29. <route>
  30. {
  31. name: '个人中心',
  32. meta: { keepAlive: true }
  33. }
  34. </route>
  35. <script>
  36. import BasicContainer from '@/components/basic-container/main.vue'
  37. import { useStore } from '@/store/user.js'
  38. export default {
  39. name: 'index',
  40. components: { BasicContainer },
  41. setup() {
  42. const user = useStore()
  43. return { user }
  44. },
  45. data() {
  46. return {
  47. list: [],
  48. form: {},
  49. data: [],
  50. option: {
  51. align: 'center',
  52. menuAlign: 'center',
  53. menuWidth: 380,
  54. size: 'mini',
  55. addBtn: false,
  56. refreshBtn: false,
  57. columnBtn: false,
  58. labelWidth: 140,
  59. border: true,
  60. column: [
  61. {
  62. label: '文章名称',
  63. prop: 'title'
  64. },
  65. {
  66. label: '标签名称',
  67. prop: 'tagsName'
  68. }
  69. ]
  70. }
  71. }
  72. },
  73. methods: {
  74. init() {
  75. this.data = this.$route.query
  76. this.$api.login.sendSMS({ current: 1, size: 200 }).then(res => {
  77. if (res.code === 200) {
  78. this.list = res.data.records
  79. }
  80. })
  81. },
  82. push() {
  83. this.$router.push({ path: '/user', query: { id: 12, type: 'test' } })
  84. },
  85. onLoad() {
  86. this.$api.login.sendSMS({ current: 1, size: 10 }).then(res => {
  87. if (res.code === 200) {
  88. this.list = res.data.records
  89. }
  90. })
  91. },
  92. beforeOpen(done, type) {
  93. if (['view', 'edit'].includes(type)) {
  94. this.getDetail()
  95. }
  96. done()
  97. },
  98. refreshChange() {
  99. this.onLoad()
  100. },
  101. rowSave(row, done, loading) {
  102. const data = {
  103. projectInfoId: this.info.id
  104. }
  105. this.$api.projects.meeting.save(Object.assign(row, data)).then(
  106. res => {
  107. if (res.code === 200) {
  108. this.$message.success(res.msg)
  109. } else {
  110. this.$message.error(res.msg)
  111. }
  112. done(row)
  113. this.onLoad()
  114. },
  115. error => {
  116. window.console.log(error)
  117. loading()
  118. }
  119. )
  120. },
  121. rowUpdate(row, index, done, loading) {
  122. const data = {
  123. projectInfoId: this.info.id
  124. }
  125. this.$api.projects.meeting.update(Object.assign(row, data)).then(
  126. res => {
  127. if (res.code === 200) {
  128. this.$message.success(res.msg)
  129. } else {
  130. this.$message.error(res.msg)
  131. }
  132. done(row)
  133. this.onLoad()
  134. },
  135. error => {
  136. window.console.log(error)
  137. loading()
  138. }
  139. )
  140. },
  141. rowDel(row, index, done) {
  142. this.$confirm('确定将选择数据删除?', {
  143. confirmButtonText: '确定',
  144. cancelButtonText: '取消',
  145. type: 'warning'
  146. })
  147. .then(() => {
  148. return this.$api.projects.meeting.removeList({ ids: row.id })
  149. })
  150. .then(() => {
  151. this.$message({
  152. type: 'success',
  153. message: '操作成功!'
  154. })
  155. // 数据回调进行刷新
  156. done(row)
  157. this.onLoad()
  158. })
  159. .catch(() => {})
  160. }
  161. }
  162. }
  163. </script>
  164. <style scoped>
  165. .icon {
  166. width: 180px;
  167. height: 180px;
  168. }
  169. </style>