Browse Source

项目台账加入流程进度、流程图

余思翰 1 year ago
parent
commit
8fadacd932

+ 12
- 7
oa-back/ruoyi-flowable/src/main/java/com/ruoyi/flowable/service/impl/FlowTaskServiceImpl.java View File

@@ -1393,14 +1393,19 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
1393 1393
      */
1394 1394
     @Override
1395 1395
     public AjaxResult flowXmlAndNodeByFormIdAndName(String formId, String name) {
1396
-        List<FlowVarInst> flowVarInst =  flowVarInstMapper.selectProcInstByVar(formId);
1397
-        List<FlowProcDefDto> flowProcDefList = flowDeployMapper.selectDeployList(name);
1398
-        AjaxResult result = flowXmlAndNode(flowVarInst.get(0).getProcInstId(), flowProcDefList.get(0).getDeploymentId());
1399
-        if (result.isSuccess()) {
1400
-            result.put("procInsId", flowVarInst.get(0).getProcInstId());
1401
-            result.put("deployId", flowProcDefList.get(0).getDeploymentId());
1396
+        try {
1397
+            List<FlowVarInst> flowVarInst = flowVarInstMapper.selectProcInstByVar(formId);
1398
+            List<FlowProcDefDto> flowProcDefList = flowDeployMapper.selectDeployList(name);
1399
+            AjaxResult result = flowXmlAndNode(flowVarInst.get(0).getProcInstId(), flowProcDefList.get(0).getDeploymentId());
1400
+            if (result.isSuccess()) {
1401
+                result.put("procInsId", flowVarInst.get(0).getProcInstId());
1402
+                result.put("deployId", flowProcDefList.get(0).getDeploymentId());
1403
+            }
1404
+            return result;
1405
+        }
1406
+        catch (Exception e) {
1407
+            return AjaxResult.error("无流程历史记录");
1402 1408
         }
1403
-        return result;
1404 1409
     }
1405 1410
 
1406 1411
     /**

+ 55
- 4
oa-ui/src/views/oa/project/info.vue View File

@@ -3,6 +3,8 @@
3 3
     <div class="header">
4 4
       <el-button icon="el-icon-d-arrow-left" plain type="primary" class="back" @click="goBack">返回</el-button>
5 5
       <h1>{{ '【' + project.projectNumber + '】' + project.projectName }}</h1>
6
+      <el-button icon="el-icon-search" type="primary" class="records" @click="clickRecords">流转记录</el-button>
7
+      <el-button icon="el-icon-connection" type="success" class="flow" @click="clickProcess">流程图</el-button>
6 8
     </div>
7 9
     <el-divider></el-divider>
8 10
 
@@ -486,6 +488,16 @@
486 488
         <el-button @click="deptOpen = false">取消</el-button>
487 489
       </div>
488 490
     </el-dialog>
491
+    <el-drawer title="流程图" :visible.sync="drawerOpen" direction="rtl">
492
+      <div class="app-container">
493
+        <flow :flowData="flowData" />
494
+      </div>
495
+    </el-drawer>
496
+    <el-drawer title="办理进度" :visible.sync="recordOpen" direction="rtl">
497
+      <div class="app-container">
498
+        <row-detail :rows="clickRow"></row-detail>
499
+      </div>
500
+    </el-drawer>
489 501
   </div>
490 502
 </template>
491 503
 
@@ -498,7 +510,7 @@ import { listProjectWork, addProjectWork } from "@/api/oa/project/projectWork";
498 510
 import { listProjectComment, getProjectComment } from "@/api/oa/project/projectComment";
499 511
 import { listProjectProgress, getProjectProgress } from "@/api/oa/project/projectProgress";
500 512
 import { listProjectContract, addProjectContract } from "@/api/oa/contract/projectContract";
501
-import { listContract, getContract, delContract, addContract, updateContract } from "@/api/oa/contract/contract";
513
+import { listContract, getContract } from "@/api/oa/contract/contract";
502 514
 import { listDevice } from "@/api/oa/device/device";
503 515
 import { listCar } from '@/api/oa/car/car';
504 516
 import budgetInfo from '@/views/flowable/form/budget/budgetInfo.vue';
@@ -510,9 +522,13 @@ import BorrowData from '@/views/flowable/form/inProgress/borrowData.vue';
510 522
 import BudgetTab from '@/views/flowable/form/projectProcess/budgetTab.vue';
511 523
 import achiData from "@/views/flowable/form/inProgress/achiData.vue";
512 524
 import choosePeople from '@/views/flowable/form/budget/components/choosePeople.vue'
513
-import { listProjectChange, getProjectChange, delProjectChange, addProjectChange, updateProjectChange } from "@/api/oa/project/projectChange";
525
+import { listProjectChange } from "@/api/oa/project/projectChange";
526
+import { flowXmlAndNodeByFormId } from "@/api/flowable/definition";
527
+import flow from '@/views/flowable/task/todo/detail/flow'
528
+import RowDetail from '@/views/flowable/task/myProcess/send/rowDetail.vue';
529
+
514 530
 export default {
515
-  components: { budgetInfo, SafeTab, TechnicalTab, PlanTab, SettleData, BorrowData, BudgetTab, achiData, choosePeople },
531
+  components: { budgetInfo, SafeTab, TechnicalTab, PlanTab, SettleData, BorrowData, BudgetTab, achiData, choosePeople, flow, RowDetail },
516 532
   created() {
517 533
     this.getUserList();
518 534
     this.getDeviceList();
@@ -526,7 +542,7 @@ export default {
526 542
       this.getContractDataList(projectId);
527 543
       this.getProjectProgressList(projectId);
528 544
       this.getProjectChangeList(projectId);
529
-    }else{
545
+    } else {
530 546
       this.goBack();
531 547
     }
532 548
   },
@@ -560,6 +576,13 @@ export default {
560 576
       participates: [],
561 577
       undertakingDept: [],
562 578
       projectChangeList: [],
579
+      drawerOpen: false,
580
+      flowData: {},
581
+      recordOpen: false,
582
+      clickRow: {
583
+        procInsId:'',
584
+        deployId:''
585
+      }
563 586
     }
564 587
   },
565 588
   methods: {
@@ -714,6 +737,22 @@ export default {
714 737
           this.$router.go(0);
715 738
         })
716 739
       })
740
+    },
741
+    async clickProcess() {
742
+      if (this.$route.query.projectId) {
743
+        let resData = await flowXmlAndNodeByFormId({ formId: this.$route.query.projectId, name: '项目流转' })
744
+        this.flowData = resData.data;
745
+        this.drawerOpen = true;
746
+        let resData2 = await flowXmlAndNodeByFormId({ formId: this.$route.query.projectId, name: '项目流转' })
747
+        this.flowData = resData2.data;
748
+        this.drawerOpen = true;
749
+      }
750
+    },
751
+    async clickRecords() {
752
+      let resData = await flowXmlAndNodeByFormId({ formId: this.$route.query.projectId, name: '项目流转' })
753
+      let { procInsId, deployId } = resData
754
+      this.clickRow = { procInsId, deployId }
755
+      this.recordOpen = true;
717 756
     }
718 757
   },
719 758
 }
@@ -731,6 +770,18 @@ export default {
731 770
     left: 12px;
732 771
     top: -10px;
733 772
   }
773
+
774
+  .records {
775
+    position: absolute;
776
+    right: 120px;
777
+    top: -10px;
778
+  }
779
+
780
+  .flow {
781
+    position: absolute;
782
+    right: 12px;
783
+    top: -10px;
784
+  }
734 785
 }
735 786
 
736 787
 .content {

+ 25
- 12
oa-ui/src/views/oa/staff/index.vue View File

@@ -111,18 +111,16 @@
111 111
               {{ selectDictLabel(dict.type.sys_user_titles, scope.row.titles) }}
112 112
             </template>
113 113
           </el-table-column>
114
-          <!-- <el-table-column label="执业证书" align="center" key="certificates" prop="certificates" v-if="columns[7].visible"
115
-            :show-overflow-tooltip="true">
116
-            <template slot-scope="scope">
117
-              {{ formatCrtificates(dict.type.sys_user_certificates, scope.row.certificates) }}
118
-            </template>
119
-          </el-table-column>
120
-          <el-table-column label="入职年月" align="center" key="entryDate" prop="entryDate" v-if="columns[8].visible"
121
-            :show-overflow-tooltip="true">
122
-            <template slot-scope="scope">
123
-              <span>{{ parseTime(scope.row.entryDate, '{y}-{m}') }}</span>
124
-            </template>
125
-          </el-table-column> -->
114
+          <el-table-column label="毕业院校" align="center" key="graduateSchool" prop="graduateSchool"
115
+            v-if="columns[10].visible" />
116
+          <el-table-column label="专业" align="center" key="major" prop="major" v-if="columns[11].visible" />
117
+          <el-table-column label="学历" align="center" key="degree" prop="degree" :formatter="formatterDegree"
118
+            v-if="columns[12].visible" />
119
+          <el-table-column label="籍贯" align="center" key="nativePlace" prop="native_place" v-if="columns[13].visible" />
120
+          <el-table-column label="政治面貌" align="center" key="politicalAffiliation" :formatter="formatterPoliticalAffiliation" prop="politicalAffiliation"
121
+            v-if="columns[14].visible" />
122
+          <el-table-column label="民族" align="center" key="ethnic" prop="ethnic"  v-if="columns[15].visible" />
123
+
126 124
           <el-table-column label="合同签订" align="center" key="contractSign" prop="contractSign" v-if="columns[7].visible"
127 125
             :show-overflow-tooltip="true">
128 126
             <template slot-scope="scope">
@@ -145,6 +143,7 @@
145 143
               <el-tag type="success" v-if="scope.row.status == 0">在职</el-tag>
146 144
               <el-tag type="danger" v-if="scope.row.status == 1">离职</el-tag>
147 145
               <el-tag type="warning" v-if="scope.row.status == 2">退休</el-tag>
146
+              <el-tag type="primary" v-if="scope.row.status == 3">试用</el-tag>
148 147
               <!-- <el-switch v-model="scope.row.status" active-value="0" inactive-value="1"
149 148
               @change="handleStatusChange(scope.row)"></el-switch> -->
150 149
             </template>
@@ -430,6 +429,12 @@ export default {
430 429
         { key: 7, label: `合同签订`, visible: true },
431 430
         { key: 8, label: `合同期满`, visible: true },
432 431
         { key: 9, label: `状态`, visible: true },
432
+        { key: 10, label: `毕业院校`, visible: false },
433
+        { key: 11, label: `专业`, visible: false },
434
+        { key: 12, label: `学历`, visible: false },
435
+        { key: 13, label: `籍贯`, visible: false },
436
+        { key: 14, label: `政治面貌`, visible: false },
437
+        { key: 15, label: `民族`, visible: false },
433 438
       ],
434 439
       // 表单校验
435 440
       rules: {
@@ -784,6 +789,14 @@ export default {
784 789
       let bSalaryLevel = parseInt(b.salaryLevel, 10) || 0; // 同上  
785 790
       // 返回salaryLevel的差值  
786 791
       return aSalaryLevel - bSalaryLevel;
792
+    },
793
+    formatterDegree(row) {
794
+      let v = this.selectDictLabel(this.dict.type.sys_user_degree,row.degree)
795
+      return v
796
+    },
797
+    formatterPoliticalAffiliation(row){
798
+      let v = this.selectDictLabels(this.dict.type.sys_user_political, row.politicalAffiliation, ',')
799
+      return v
787 800
     }
788 801
   }
789 802
 };

Loading…
Cancel
Save