فهرست منبع

首页bug修复

cfort 3 سال پیش
والد
کامیت
cb70888cc6
1فایلهای تغییر یافته به همراه12 افزوده شده و 8 حذف شده
  1. 12 8
      src/views/system/dashboard/components/new-home.vue

+ 12 - 8
src/views/system/dashboard/components/new-home.vue

@@ -271,7 +271,7 @@
                 let hasDesc = v.includes('#')
                 let res = {
                     name: {
-                        '0': v.includes('(') ? v.split('(')[0] : v,
+                        '0': v.includes('{') ? v.split('{')[0] : v.includes('(') ? v.split('(')[0] : v,
                         '1': v.split('#')[0]
                     },
                     // 无#返回空,有#返回(左边的字符串,
@@ -286,8 +286,8 @@
                 return res[type]['1']
             },
             getUserName (v, list) {
-                let user = list.find(i => i.id_ === v)
-                return user ? user.name_ : ''
+                let user = list.find(i => i.userId === v)
+                return user ? user.userName : ''
             }
         },
         data() {
@@ -314,7 +314,7 @@
                 FlowName: '',
                 posName: '',
                 defaultPagination: { page: 1, limit: 15 },
-                sorts: { createTime: 'DESC' },
+                sorts: { CREATE_TIME_: 'DESC' },
                 timer: null,
                 processName: '',
                 userList: [],
@@ -366,7 +366,7 @@
                 // 获取任务数据
                 this.getData(this.activeTab)
             },
-	    // 获取系统用户信息
+	        // 获取系统用户信息
             getUserList() {
                 const { userList } = this.$store.getters
                 // store中有则无需请求
@@ -494,7 +494,8 @@
                 if (this.activeTab === 'finish') {
                     params.end = '1'
                 }
-                return ActionUtils.formatParams(params, pagination, this.sorts)
+                let s = this.activeTab === 'wait' ? {createTime: 'DESC'} : this.sorts
+                return ActionUtils.formatParams(params, pagination, s)
             },
             // 处理表格点击事件
             handleLinkClick(data) {
@@ -515,8 +516,11 @@
             getParenthesesStr(text) {
                 let result = ''
                 if (!text) return result
-                let regex = /\((.+?)\)/g
-                let options = text.match(regex)
+                let regex1 = /\{(.+?)\}/g
+                let regex2 = /\((.+?)\)/g
+                let options1 = text.match(regex1)
+                let options2 = text.match(regex2)
+                let options = options1 && options1.length ? options1 : options2
                 if (options) {
                     let option = options[0]
                     if (option) {