Browse Source

2.26施工班组变更1

bulusiLuo 1 year ago
parent
commit
c5165bdd73

+ 6 - 6
public/envConfig/evn.dev.js

@@ -4,9 +4,9 @@ export default {
   // ESRI_COBFIG_URL: '192.168.2.91:9000',
   // MAP_SERVICE_URL: '192.168.2.91:9000',
   // 公司环境
-  // BASE_URL: 'http://221.182.8.141:8382',
-  // ESRI_COBFIG_URL: '221.182.8.141:8382',
-  // MAP_SERVICE_URL: '221.182.8.141:8382'
+  BASE_URL: 'http://221.182.8.141:8382',
+  ESRI_COBFIG_URL: '221.182.8.141:8382',
+  MAP_SERVICE_URL: '221.182.8.141:8382'
   // 测试接口
   // BASE_URL: 'http://192.168.2.15:8382',
   // ESRI_COBFIG_URL: '192.168.2.15:8382',
@@ -19,7 +19,7 @@ export default {
   // ESRI_COBFIG_URL: '192.168.2.20:9000',
   // MAP_SERVICE_URL: '192.168.2.20:9000',
   //* ***************正式环境接口地址**************** */
-  BASE_URL: 'http://36.134.27.109:10082',
-  ESRI_COBFIG_URL: '36.134.27.109:10082',
-  MAP_SERVICE_URL: '36.134.27.109:10082'
+  // BASE_URL: 'http://36.134.27.109:10082',
+  // ESRI_COBFIG_URL: '36.134.27.109:10082',
+  // MAP_SERVICE_URL: '36.134.27.109:10082'
 }

+ 2 - 2
src/views/zhpt/projectConfigManager/constructionTeam/inputPage.vue

@@ -264,7 +264,7 @@ export default {
           return (item = {
             teamStaffP: { userId: item.teamLable, type: 1 },
             teamStaffPList: arr11,
-            tfConstructionTeamP: { name: item.teamName }
+            tfConstructionTeamP: { name: item.teamName, id: item.id }
           })
         })
         let buildUnitPDto = {
@@ -296,7 +296,7 @@ export default {
       }
       const data = this.getFormData()
       console.log('提交参数', data)
-      return
+      // return
       this.btnLoad = true
       if (this.inputData) {
         addteamp(data)

+ 82 - 28
src/views/zhpt/projectManager/projManageChange/constructionChange/addconstruction/detailPage.vue

@@ -3,7 +3,7 @@
     <inputLegend :label="'工程信息'" isopen="true">
       <projectInfo :type="4" :processId="processId" ref="lookinfo"></projectInfo>
     </inputLegend>
-    <inputLegend :label="'负责人变更申请'" isopen="true">
+    <inputLegend :label="'施工班组变更申请'" isopen="true">
       <lookForm v-if='showContent' :config="config1" ref="config1"></lookForm>
     </inputLegend>
   </div>
@@ -16,7 +16,8 @@ import inputLegend from '@/components/projectCom/legend/index.vue'
 
 import projectInfo from '@/views/zhpt/projectManager/newInstall/components/projectInfo.vue'
 import { subMixin } from '@/views/zhpt/projectManager/common/mixins/subPage.js'
-import {getProcesssById} from "@/api/flowInfo";
+import { getProcesssById } from "@/api/flowInfo";
+import imConfig from '@/views/imConfig.js'
 export default {
   name: 'designChange',
   mixins: [subMixin],
@@ -24,34 +25,51 @@ export default {
   data() {
     return {
       processId: '',
-      showContent:false,
+      taskInfo: {
+        pageCode: imConfig.flowKey.proDispatchProTeamPerson,
+        serviceImpls: "tfConstructionTeamWService"
+      },
+      showContent: false,
       config1: {
         showfield: [
           {
             group: [
               {
-                field: 'billDutyPostName',
-                label: '原负责岗位',
+                field: 'sgbzName',
+                label: '原施工班组',
               },
               {
-                field: 'billDutyUserName',
-                label: '原负责人',
+                field: 'sgfzrName',
+                label: '原施工负责人',
               },
               {
-                field: 'dutyPostName',
-                label: '现负责岗位',
+                field: 'lxdhName',
+                label: '原联系电话',
               },
               {
-                field: 'dutyUserName',
-                label: '现项目负责人',
+                field: 'sgryName',
+                label: '原施工人员',
               },
               {
-                field: "telephone", 
-                label: "联系电话", 
+                field: "teamName",
+                label: "施工班组",
               },
               {
-                field: 'content',
-                label: '终止原因',
+                field: 'leaderName', //存储字段
+                label: '施工负责人', //显示标签
+              },
+              {
+                field: 'leaderPhone', //存储字段
+                label: '联系电话', //显示标签
+              },
+              {
+                field: 'conUserNames', //存储字段
+                label: '施工人员', //显示标签
+                type: 'area',
+              },
+              {
+                field: 'reason',
+                label: '变更原因',
                 type: 'area'
               },
               {
@@ -92,28 +110,65 @@ export default {
         getProcesssById({ id: this.inputData.data.processId }).then((res) => {
           if (res.data && res.data.nodes) {
             res.data.nodes.forEach((val) => {
-              if (val.processStep == this.inputData.currentStep && val.stepNode == this.inputData.currentStepNode&&val.isValid) {
-                this.config1.showfield.forEach(item=>{
-                  item.group.forEach((item2,index)=>{
-                    if(item2.field&&val.dataMap&&val.dataMap[this.inputData.currentserviceImpls]&&val.dataMap[this.inputData.currentserviceImpls][0]&&val.isValid){
-                      item2.value=val.dataMap[this.inputData.currentserviceImpls][0][item2.field];
-                      if(item2.type=="file"){//一般的详情页面取最外层的附件数据
-                        item2.value=val[item2.field];
+              if (val.processStep == this.inputData.currentStep && val.stepNode == this.inputData.currentStepNode && val.isValid) {
+                this.config1.showfield.forEach(item => {
+                  item.group.forEach((item2, index) => {
+                    if (item2.field && val.dataMap && val.dataMap[this.inputData.currentserviceImpls] && val.dataMap[this.inputData.currentserviceImpls][0] && val.isValid) {
+                      item2.value = val.dataMap[this.inputData.currentserviceImpls][0][item2.field];
+                      if (item2.type == "file") {//一般的详情页面取最外层的附件数据
+                        item2.value = val[item2.field];
                       }
-                      if(!item2.value){
-                        item2.value=val[item2.field];
+                      if (!item2.value) {
+                        item2.value = val[item2.field];
                       }
                     }
                   })
                 })
               }
             })
-            this.processId=res.data.relationId;
-            this.showContent = true;
+            if (res.data.relationId) {
+              this.getUpdateInfo2(res.data.relationId)
+            }
+            this.processId = res.data.relationId;
           }
         })
       }
     },
+    getUpdateInfo2(processId) {
+      getProcesssById({ id: processId }).then((res) => {
+        if (res.data && res.data.nodes) {
+          res.data.nodes.forEach((val) => {//主要获取任务分配环节的数据
+            if (val.pageCode == this.taskInfo.pageCode && val.isValid && this.taskInfo.serviceImpls) {
+              const temp = val.dataMap[this.taskInfo.serviceImpls];
+              console.log('当前步骤', temp);
+              if (temp) {
+                this.config1.showfield.forEach(item => {
+                  item.group.forEach((item2, index) => {
+                    if (item2.field == "sgbzName") {
+                      item2.value = temp.teamIdName;
+                    }
+                    if (item2.field == "sgfzrName") {
+                      item2.value = temp.leaderName;
+                    }
+                    if (item2.field == "lxdhName") {
+                      item2.value = temp.leaderPhone;
+                    }
+                    if (item2.field == "sgryName") {
+                      item2.value = temp.conUserNames;
+                    }
+                  })
+                })
+                // this.$refs.config1.setValue(
+                //   { sgbzName: temp.teamIdName || '', sgfzrName: temp.leaderName || '', lxdhName: temp.leaderPhone || '', sgryName: temp.conUserNames || '', },
+                //   false
+                // )
+              }
+            }
+          })
+          this.showContent = true;
+        }
+      })
+    },
   },
   created() {
     this.getCurrentUpdateInfo();
@@ -121,5 +176,4 @@ export default {
 }
 </script>
 
-<style>
-</style>
+<style></style>

+ 1 - 1
src/views/zhpt/projectManager/projManageChange/constructionChange/addconstruction/index.vue

@@ -94,7 +94,7 @@ export default {
         timeLabel: '发起时间'
       },
       processListId: '77',
-      title: '负责人变更',
+      title: '施工班组变更',
       currentSearch: { userId: this.$store.state.user.userId }
     }
   },

+ 31 - 6
src/views/zhpt/projectManager/projManageChange/constructionChange/addconstruction/inputPage.vue

@@ -12,7 +12,7 @@
             </div>
           </div>
         </inputLegend>
-        <inputLegend label="负责人变更申请" isopen="true">
+        <inputLegend label="施工班组变更申请" isopen="true">
           <inputForm ref="inputForm" :config="inputConfig" v-model="ruleFormList.form"></inputForm>
         </inputLegend>
       </div>
@@ -93,28 +93,24 @@ export default {
                 field: 'sgbzName',
                 label: '原施工班组',
                 disabled: true,
-                required: true,
                 type: 'text'
               },
               {
                 field: 'sgfzrName',
                 label: '原施工负责人',
                 disabled: true,
-                required: true,
                 type: 'text'
               },
               {
                 field: 'lxdhName',
                 label: '原联系电话',
                 disabled: true,
-                required: true,
                 type: 'text'
               },
               {
                 field: 'sgryName',
                 label: '原施工人员',
                 disabled: true,
-                required: true,
                 type: 'text'
               },
               {
@@ -275,6 +271,26 @@ export default {
   },
   mounted() { },
   methods: {
+    /**
+     * 保存后施工班组选择框
+     */
+    getteampMessage2(value) {
+      // console.log('tss', value)
+      this.inputConfig.data.forEach((a) => {
+        a.group.forEach((b) => {
+          if (b.field) {
+            if (b.field == 'conUserIds') {
+              let arr3 = []
+              value.forEach((c) => {
+                arr3.push({ userId: c.userId, userIdName: c.userIdName })
+              })
+              // console.log('工人集合', arr3)
+              b.config.data = arr3
+            }
+          }
+        })
+      })
+    },
     /**
      * 根据施工单位选择施工班组
      */
@@ -413,6 +429,16 @@ export default {
                       val.dataMap[this.inputData.currentserviceImpls][0]
                     ) {
                       item2.value = val.dataMap[this.inputData.currentserviceImpls][0][item2.field]
+                      if (val.dataMap[this.inputData.currentserviceImpls][0].tss != null) {
+                        let tss = val.dataMap[this.inputData.currentserviceImpls][0].tss
+                        this.getteampMessage2(tss)
+                      }
+                      if (
+                        item2.field == 'conUserIds' &&
+                        val.dataMap[this.inputData.currentserviceImpls][0].conUserIds != null
+                      ) {
+                        item2.value = val.dataMap[this.inputData.currentserviceImpls][0].conUserIds.split(',')
+                      }
                     }
                   })
                 })
@@ -554,7 +580,6 @@ export default {
     getUpdateInfo(serverImp) {
       if (this.currData) {
         getProcesssById({ id: this.currData.processId }).then((res) => {
-          console.log(serverImp);
           if (res.data && res.data.nodes) {
             res.data.nodes.forEach((val) => {//主要获取任务分配环节的数据
               if (val.pageCode == this.taskInfo.pageCode && val.isValid && serverImp) {