Просмотр исходного кода

同步dev1体系运行记录盒

cyy 7 месяцев назад
Родитель
Сommit
a53cacd857
1 измененных файлов с 31 добавлено и 10 удалено
  1. 31 10
      src/views/platform/bpmn/bpmInstHis/list.vue

+ 31 - 10
src/views/platform/bpmn/bpmInstHis/list.vue

@@ -180,6 +180,7 @@ import BpmnFormrender from '@/business/platform/bpmn/form/dialog'
 import IbpsAttachment from '@/business/platform/file/attachment/selector'
 import { specialType, specialBtn, specialParams, specialTable, specialField } from './corresponding/index'
 import TemplateList from './templateList'
+import { getSetting } from '@/utils/query'
 
 export default {
     components: {
@@ -267,16 +268,18 @@ export default {
                         { prop: 'tableName', label: '表单名称', itemWidth: 150, placeholder: '请输入', labelWidth: 70 },
                         { prop: 'desc', label: '事务说明', itemWidth: 150, placeholder: '请输入', labelWidth: 70 },
                         { prop: 'createBy', label: '编制人', itemWidth: 150, placeholder: '请输入', labelWidth: 60 },
-                        { prop: ['Q^end_time_^DL', 'Q^end_time_^DG'], label: '完成时间', fieldType: 'daterange', labelWidth: 70, itemWidth: 220 }
+                        { prop: ['Q^compile_time^DL', 'Q^compile_time^DG'], label: '编制时间', fieldType: 'daterange', labelWidth: 70, itemWidth: 220 },
+                        // { prop: ['Q^end_time_^DL', 'Q^end_time_^DG'], label: '完成时间', fieldType: 'daterange', labelWidth: 70, itemWidth: 220 }
                     ]
                 },
                 // 表格字段配置
                 columns: [
-                    { prop: 'deptName', label: '部门', width: 85 },
+                    { prop: 'deptName', label: '部门', width: 110 },
                     { prop: 'procDefName', label: '表单名称', formatter: this.replaceFormName, width: 220 },
                     { prop: 'desc', label: '事务说明', 'min-width': 280 },
-                    { prop: 'endTime', label: '完成时间', sortable: 'custom', width: 135 },
-                    { prop: 'createBy', label: '编制人', width: 70, slotName: 'creator' }
+                    { prop: 'compileTime', label: '编制时间', sortable: 'custom', width: 135, dateFormat: 'yyyy-MM-dd HH:mm' },
+                    // { prop: 'endTime', label: '完成时间', sortable: 'custom', width: 135, dateFormat: 'yyyy-MM-dd HH:mm' },
+                    { prop: 'createBy', label: '编制人', width: 100, slotName: 'creator' }
                 ],
                 rowHandle: {
                     actions: [
@@ -287,7 +290,8 @@ export default {
                         // }
                     ],
                     effect: 'display',
-                    width: '100'
+                    width: '100',
+                    colWidth: '100'
                 }
             }
         }
@@ -305,11 +309,25 @@ export default {
 
         }
     },
-    created () {
+    async created () {
         this.loadData()
         this.getConfig()
+        const { reocrdsBoxShowStartDate: showCompileTime = false, reocrdsBoxShowEndDate: showEndTime = true } = await getSetting('system')
+        this.sorts = showCompileTime ? { COMPILE_TIME: 'DESC' } : { END_TIME_: 'DESC' }
+        this.listConfig.searchForm.forms = this.listConfig.searchForm.forms.filter(item => {
+            if (item.label === '编制时间' && !showCompileTime) return false
+            if (item.label === '完成时间' && !showEndTime) return false
+            return true
+        })
+
+        this.listConfig.columns = this.listConfig.columns.filter(column => {
+            if (column.prop === 'completeTime' && !showCompileTime) return false
+            if (column.prop === 'endTime' && !showEndTime) return false
+            return true
+        })
+
         const { role = [] } = this.$store.getters.userInfo || {}
-        const roleList = ['xtgljs', 'xxglxzfzr', 'syszr']
+        const roleList = ['xtgljs', 'xxglxzfzr', 'wjglzzc', 'syszr']
         // 系统管理角色、信息管理负责人、检验科主任添加删除按钮
         const hasRole = role.some(item => roleList.includes(item.alias))
         this.listConfig.toolbars.push({
@@ -717,6 +735,7 @@ export default {
                             this.$common.request('delete', deleteParams2)
                         })
                         this.$message.success('删除成功!')
+                        this.$refs['crud']?.clearSelection()
                         this.search()
                     })
                 }).catch(() => {
@@ -727,6 +746,8 @@ export default {
         handleNodeClick (typeId, typeName) {
             this.tableTitle = typeName.name
             this.typeId = typeId
+            // 切换分类清除选中数据
+            this.$refs['crud']?.clearSelection()
             this.templateData = this.reportAll.template.find(i => i.fen_lei_id_ === typeId) || {}
             if (!this.templateData.templateid_) {
                 this.templateShow = false
@@ -811,9 +832,9 @@ export default {
                 margin-top: 0px;
             }
         }
-        ::v-deep .el-upload-list__item {
-            line-height: 18px;
-        }
+        // ::v-deep .el-upload-list__item {
+        //    line-height: 18px;
+        // }
     }
     .popverClass_sub {
         .div_content {