user5 2 лет назад
Родитель
Сommit
d9318dca4d
1 измененных файлов с 20 добавлено и 2 удалено
  1. 20 2
      src/views/modules/sys/workContract/WorkContractList.vue

+ 20 - 2
src/views/modules/sys/workContract/WorkContractList.vue

@@ -121,9 +121,9 @@
                 <vxe-column width="100px" title="合同金额(元)" field="contractAmount"></vxe-column>
                 <vxe-column width="100px" title="创建人" field="createBy"></vxe-column>
                 <vxe-column width="150px" title="签订日期" field="contractDate"></vxe-column>
-                <vxe-column width="100px"  title="状态" field="status" >
+                <vxe-column  width="120px" title="流程状态" field="status" >
                   <template slot-scope="scope">
-                    {{ $dictUtils.getDictLabel("approval_type", scope.row.status, '-') }}
+                    <el-button  type="text" @click="detail(scope.row)" :type="$dictUtils.getDictLabel('approval_type_status', scope.row.status, '-')"   effect="dark" size="mini">{{$dictUtils.getDictLabel("approval_type", scope.row.status, '-')}} </el-button>
                   </template>
                 </vxe-column>
 <!--                <vxe-column width="100px"  title="归档状态" field="filedType" >-->
@@ -171,6 +171,7 @@
   import WorkContractService from '@/api/sys/WorkContractService'
   import SelectUserTree from '@/views/modules/utils/treeUserSelect'
   import TaskService from '@/api/flowable/TaskService'
+  import pick from 'lodash.pick'
   export default {
     data () {
       return {
@@ -250,6 +251,23 @@
       add () {
         this.start()
       },
+      // 新增
+      detail (row) {
+        // eslint-disable-next-line eqeqeq
+        if (!this.commonJS.isEmpty(row.status) && row.status != '1') {
+          console.log(row.procInsId)
+          console.log(row.processDefinitionId)
+          this.taskService.getTaskDef({
+            procInsId: row.procInsId,
+            procDefId: row.processDefinitionId
+          }).then(({data}) => {
+            this.$router.push({
+              path: '/flowable/task/TaskFormDetail',
+              query: {readOnly: true, title: row.name + '流程详情', formTitle: row.name + '流程详情', ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title', 'businessId')}
+            })
+          })
+        }
+      },
       // 修改
       edit (row) {
         // row.id || this.$refs.workContractTable.getCheckboxRecords().map(item => {