humingbo il y a 1 an
Parent
commit
cf9471458a
1 fichiers modifiés avec 89 ajouts et 6 suppressions
  1. 89 6
      src/views/enforceflow/enforceflow.vue

+ 89 - 6
src/views/enforceflow/enforceflow.vue

@@ -66,6 +66,12 @@
           <span>{{ parseTime(scope.row.createTime) }}</span>
         </template>
       </el-table-column>
+      <el-table-column prop="handlerName" label="当前处理人" align="center" width="180" v-if="false">
+        <template slot-scope="scope">
+          <div v-if=" scope.row.act.id!==undefined">{{scope.row.act.assignee}}</div>
+          <div v-else>{{scope.row.enforcer}}</div>
+        </template>
+      </el-table-column>
       <el-table-column prop="status1" label="当前实施状态" width="120" align="center">
         <template slot-scope="scope">
           <span style="color: green" v-if="scope.row.status===2">运行维护</span>
@@ -248,6 +254,17 @@
       </div>
     </el-dialog>
 
+    <el-dialog title="选择人员" :visible.sync="usersTaskVisble" width="30%" @click="closeTaskUserDialog" :close-on-click-modal="false">
+      <el-input placeholder="输入关键字进行过滤" v-model="filterText2">
+      </el-input>
+      <el-tree ref="dept2" :data="userList" node-key="id" :props="{label:'name'}" :default-expand-all="false" :filter-node-method="filterNode2">
+      </el-tree>
+      <div slot="footer" class="dialog-footer">
+        <el-button size="mini" @click="closeTaskUserDialog">取消</el-button>
+        <el-button size="mini" type="primary" class="title" @click="submitTaskUserForm('editForm')">确定</el-button>
+      </div>
+    </el-dialog>
+
     <el-dialog title="实施详情" :visible.sync="enforceFlowVisble" width="85%" @click="enforceFlowDialog"
                :close-on-click-modal="false">
       <el-table
@@ -592,17 +609,24 @@
             <span style="color: green" v-else-if="enforceFlow.status===1">进行中</span>
             <span style="color: darkblue" v-else="enforceFlow.status===2">已结束</span>
           </el-descriptions-item>
-          <el-descriptions-item >
+          <el-descriptions-item :span="2">
             <template slot="label">
               当前任务
             </template>
             <el-tag> {{ enforceFlow.flowType }}</el-tag>
           </el-descriptions-item>
-          <el-descriptions-item>
+          <el-descriptions-item >
+            <template slot="label">
+              当前任务执行人
+            </template>
+            {{ enforceFlow.assignee }}
+          </el-descriptions-item>
+
+          <el-descriptions-item :span="2">
             <template slot="label">
               下个步骤
             </template>
-           <el-tag type="warning"> {{ enforceForm.nextStepName }}</el-tag>
+           <el-tag type="info"> {{ enforceForm.nextStepName }}</el-tag>
           </el-descriptions-item>
           <el-descriptions-item>
             <template slot="label">
@@ -613,6 +637,17 @@
             </el-input>
           </el-descriptions-item>
 
+          <el-descriptions-item :span="3">
+            <template slot="label">
+              任务系统处理人
+            </template>
+            <el-input size="small" style="width: 350px" v-model="enforceForm.taskDealName" :disabled="true" @keyup.enter.native="openTaskUsers()">
+              <el-button @click="openTaskUsers" icon="el-icon-search" slot="append"></el-button>
+              <el-button @click="resetTaskUsers" icon="el-icon-refresh" slot="append" ></el-button>
+            </el-input>
+
+            <span style="color: red;margin-left: 25px">选择此项会将下一个节点任务推送给任务系统,对应人员进行工作工时反馈。</span>
+          </el-descriptions-item>
           <el-descriptions-item :span="3">
             <template slot="label">
               实施内容
@@ -719,6 +754,9 @@ export default {
     filterText1(val) {
       this.$refs.dept.filter(val);
     },
+    filterText2(val) {
+      this.$refs.dept2.filter(val);
+    },
   },
   data() {
     return {
@@ -730,6 +768,7 @@ export default {
       },
       filterText: '',
       filterText1:null,
+      filterText2:null,
       editEnforceRecord: {
         id: null,
         enforceType: '',
@@ -737,6 +776,7 @@ export default {
         enforceId: null,
         remark: '',
       },
+      usersTaskVisble:false,
       enforceFileData: [],
       addEnforceRecordWin: false,
       enforceFlowVisble: false,
@@ -764,7 +804,8 @@ export default {
         hsytem: null,
         enforcer: null,
         content: null,
-        times: null
+        times: null,
+        directorId:null,
       },
       rules: {
         name: [
@@ -801,7 +842,9 @@ export default {
         currentStep: null,
         filess: [],
         content: null,
-        nextStepName:null
+        nextStepName:null,
+        taskDealName:null,
+        taskDealId:null
       },
       enforceFlow: {
         name: '',
@@ -813,6 +856,7 @@ export default {
         content: '',
         beginTime: null,
         endTime: null,
+        assignee:null,
         fileDatas: []
       },
       enforceFlowId: null,
@@ -1104,6 +1148,7 @@ export default {
       }
       this.editForm.enforcer = node.name
       // this.enforceForm.directorId = node.id
+      this.editForm.directorId=node.id
       this.closeUser1Dialog();
     },
     enforceManageDialog() {
@@ -1148,7 +1193,7 @@ export default {
     },
     createeditorElem1Editor() {
       editorElem1 = new E('#editorElem1');
-      editorElem1.config.height = 250
+      editorElem1.config.height = 200
       editorElem1.create()
       editorElem1.txt.html(this.enforceForm.content)
       editorElem1.config.onchange = (html) => {
@@ -1470,6 +1515,7 @@ export default {
       this.enforceFlow.hno = row.hname
       this.enforceFlow.hsytem = row.hsytem
       this.enforceFlow.content = row.content
+      this.enforceFlow.assignee=row.act.assignee
       this.enforceFlow.time = row.beginTime + "至" + row.endTime
       this.enforceFlow.status = row.status
       this.enforceFlow.flowType = row.act.taskName
@@ -1502,6 +1548,12 @@ export default {
       }
       return data.name.indexOf(value) !== -1;
     },
+    filterNode2(value, data) {
+      if (!value) {
+        return true
+      }
+      return data.name.indexOf(value) !== -1;
+    },
     addHospitals(){
       this.addHospitalsVisible=true
     },
@@ -1535,6 +1587,37 @@ export default {
     addSysVisible(){
       this.addSystemVisible=true
     },
+    openTaskUsers(){
+      this.usersTaskVisble=true
+    },
+    closeTaskUserDialog(){
+      this.usersTaskVisble=false
+    },
+    submitTaskUserForm(){
+      //获取选中的节点
+      let node = this.$refs.dept2.getCurrentNode();
+      if (node == undefined || node == null) {
+        this.$message({
+          message: '请选择数据!',
+          type: 'warning'
+        });
+        return;
+      }
+      if (node.type !== 'u') {
+        this.$message({
+          message: '请选择人员!',
+          type: 'warning'
+        });
+        return;
+      }
+      this.enforceForm.taskDealName = node.name
+      this.enforceForm.taskDealId = node.id
+      this.closeTaskUserDialog();
+    },
+    resetTaskUsers(){
+      this.enforceForm.taskDealName =null
+      this.enforceForm.taskDealId = null
+    },
     saveSysInfo(){
      let sysName=this.sys.name;
      if(sysName===''){