zhangh 3 vuotta sitten
vanhempi
commit
2104a55b67

+ 3 - 2
src/views/exctab/ElementIdentification/index.vue

@@ -210,9 +210,9 @@
                     size="mini"
                     @click="relationMD(scope.$index,'关联')"
                     v-show="!scope.row.checknd"
-                  >关联</el-button>
+                  >选择关联</el-button>
                   <el-button
-                    type="primary"
+                    type="danger"
                     size="mini"
                     @click="relationMD(scope.$index,'取消关联')"
                     v-show="scope.row.checknd"
@@ -334,6 +334,7 @@ export default {
         if (this.dataType.length == 0) {
           this.dictionarydataType() //数据类型字典
         }
+        this.addElement = false
         this.addElementForm.deptName = data.name
         this.from.id = data.id
       }

+ 1 - 0
src/views/manager/archivetree.vue

@@ -67,6 +67,7 @@
             :data="data"
             node-key="id"
             ref="trees2"
+            :default-expand-all="true"
             :filter-node-method="filterNode"
           >
             <span

+ 37 - 7
src/views/manager/contractinfo/detail.vue

@@ -78,6 +78,7 @@
                 </el-col>
               </el-row>
               <el-form-item
+                v-if="contractForm.contractType==1"
                 label="是否开启电签"
                 prop="isElectronicSignature"
               >
@@ -88,6 +89,7 @@
               </el-form-item>
               <el-form-item
                 label="是否开启试验模块"
+                v-if="contractForm.contractType==1"
                 prop="isTestModule"
               >
                 <el-radio-group v-model="contractForm.isTestModule">
@@ -97,6 +99,7 @@
               </el-form-item>
               <el-form-item
                 label="是否引用编号"
+                v-if="contractForm.contractType==1"
                 prop="isReferenceNumber"
               >
                 <el-radio-group v-model="contractForm.isReferenceNumber">
@@ -106,6 +109,7 @@
               </el-form-item>
               <el-form-item
                 label="是否开启复制数据"
+                v-if="contractForm.contractType==1"
                 prop="isCopyData"
               >
                 <el-radio-group v-model="contractForm.isCopyData">
@@ -177,10 +181,25 @@
                 <el-col :span="12">
                   <el-form-item
                     label="业主单位名称"
+                    v-if="contractForm.contractType==1"
                     prop="contractorUnitName"
                   >
                     <el-input v-model="contractForm.contractorUnitName"></el-input>
                   </el-form-item>
+                  <el-form-item
+                    v-if="contractForm.contractType==2"
+                    label="监理单位名称"
+                    prop="supervisionUnitName"
+                  >
+                    <el-input v-model="contractForm.supervisionUnitName"></el-input>
+                  </el-form-item>
+                  <el-form-item
+                    v-if="contractForm.contractType==3"
+                    label="建设单位名称"
+                    prop="supervisionUnitName"
+                  >
+                    <el-input v-model="contractForm.supervisionUnitName"></el-input>
+                  </el-form-item>
                 </el-col>
                 <el-col :span="12">
                   <el-form-item
@@ -193,7 +212,7 @@
                   </el-form-item>
                 </el-col>
               </el-row>
-              <el-row>
+              <el-row v-if="contractForm.contractType==1">
                 <el-col :span="12">
                   <el-form-item
                     label="施工单位名称"
@@ -240,7 +259,7 @@
                   </el-form-item>
                 </el-col>
               </el-row>
-              <el-row>
+              <el-row v-if="contractForm.contractType==1">
                 <el-col :span="12">
                   <el-form-item
                     label="监理单位名称"
@@ -779,7 +798,6 @@ export default {
     'contractForm.contractType' (newValue) {
       if (newValue != 1) {
         this.treeAllConstruction()
-
       }
     }
   },
@@ -1004,10 +1022,18 @@ export default {
       });
       this.typeChang[this.activeType] = false;
       let num = Number(this.activeType);
-      if (type == 'n') {
-        num++;
-      } else if (type == 'p') {
-        num--;
+      if (this.$route.query.contractType == 1 || $route.query.contractType === undefined) {
+        if (type == 'n') {
+          num++;
+        } else if (type == 'p') {
+          num--;
+        }
+      } else {
+        if (type == 'n') {
+          num = num + 2;
+        } else if (type == 'p') {
+          num = num - 2
+        }
       }
       this.activeType = num.toString();
       this.btnLoad = false;
@@ -1031,17 +1057,21 @@ export default {
                   das.idList.push({ contractId: val })
                 })
                 resolve(submitContractInfo(das))
+                this.btnLoad = false
               } else {
                 this.$message({
                   type: "error",
                   message: "请先选择施工方合同段权限配置"
                 })
+                this.btnLoad = false
               }
             } else {
               resolve(submitContractInfo(das))
+              this.btnLoad = false
             }
           } else {
             reject('验证失败')
+            this.btnLoad = false
           }
         })
       })

+ 36 - 10
src/views/manager/projectinfo/editElement/editElement.vue

@@ -46,7 +46,7 @@
             type="textarea"
             :rows="4"
             placeholder="请输入内容"
-            v-model="value"
+            v-model="names"
           >
           </el-input>
           <div class="martop20">
@@ -126,6 +126,7 @@
             >
               <template slot-scope="scope">
                 <el-select
+                  style="width:100%;"
                   v-model="scope.row.eType"
                   placeholder="请选择"
                 >
@@ -203,6 +204,7 @@ export default {
       cascaderPanel: false,
       options: [],
       value: '',
+      names: '',//替换元素得值
       tableData: [],//table表
       options2: [{
         value: '编辑元素字段',
@@ -266,14 +268,12 @@ export default {
       }, 500)
     },
     RightClick2 (tr, td, x1, x2, y1, y2) {
-      // console.log(window.event.clientX, window.event.clientY);
       this.table = {
         tr,
         td
       }
       this.top = window.event.clientY - 80
       this.left = window.event.clientX - 300
-      // console.log(tr, td, x1, x2, y1, y2);
       this.cascaderPanel = true
       clearTimeout(this.setTimeout)
       this.setTimeout = setTimeout(() => {
@@ -300,6 +300,14 @@ export default {
         });
       });
     },
+    getInformation2 (a, b, c) {
+      if (this.AddNewElementField) {
+        this.table = {
+          tr: b,
+          td: c
+        }
+      }
+    },
     async cop () {
       let _that = this
       var MyComponent = await Vue.extend({
@@ -313,8 +321,8 @@ export default {
           RightClick (tr, td, x1, x2, y1, y2) {//鼠标右键事件
             _that.RightClick2(tr, td, x1, x2, y1, y2)
           },
-          getInformation(a,b,c) {
-
+          getInformation (a, b, c) {
+            _that.getInformation2(a, b, c)
           }
         }
       })
@@ -335,6 +343,9 @@ export default {
           RightClick (tr, td, x1, x2, y1, y2) {//鼠标右键事件
             _that.RightClick2(tr, td, x1, x2, y1, y2)
           },
+          getInformation (a, b, c) {
+            _that.getInformation2(a, b, c)
+          }
         }
       })
       var component = new MyComponent().$mount()
@@ -353,7 +364,13 @@ export default {
       }
     },
     returns () {
-      this.$router.go(-1)
+      this.$router.push({
+        path: '/project/tree',
+        query: {
+          pid: this.$route.query.pid,
+          wbsid: this.$route.query.wbsid,
+        }
+      })
     },
     //#region 左侧替换元素
     cancelReplace () {//替换元素取消按钮
@@ -420,10 +437,10 @@ export default {
       this.tableData.splice(key, 1)
     },
     pushNewElementField () {//确定添加按钮
-      if (this.tableData) {
+      if (this.tableData.length > 0) {
         let tag = true
         this.tableData.forEach(val => {
-          if (!val | !val | !val) {
+          if (!(val.eName && val.eType)) {
             tag = false
           }
         })
@@ -486,14 +503,23 @@ export default {
           label: '公式配置',
         }]
       }
-    }
+    },
+    'value' (values) {
+      if (values) {
+        this.options.forEach(val => {
+          if (val.id == values) {
+            this.names = val.eName
+          }
+        })
+      }
+    },
   }
 }
 </script>
 
 <style lang="scss" scoped>
 .editElement {
-  // padding-bottom: 40px !important;
+  padding-bottom: 40px !important;
   .header {
     color: rgb(240, 114, 10);
   }

+ 21 - 3
src/views/manager/projectinfo/tree.vue

@@ -1318,7 +1318,14 @@ export default {
         children: 'children',
         disabled: 'hasChildren',
         isLeaf: function (data) {
-          return !data.hasChildren || (data.hasChildren && data.isExistForm == 1)
+          let tag = false
+          if (!data.hasChildren) {
+            tag = true
+          }
+          if (data.isExistForm == 1) {
+            tag = true
+          }
+          return tag
         },
       },
       exceldata: [],//清表模板
@@ -1340,7 +1347,16 @@ export default {
         children: 'children',
         label: 'title',
         isLeaf: function (data) {
-          return !data.hasChildren || (data.isExistForm == 1);
+          console.log(data, !data.hasChildren, data.isExistForm);
+          let tag = false
+          if (!data.hasChildren) {
+            tag = true
+          }
+          if (data.isExistForm == 1) {
+            tag = true
+          }
+          return tag
+          // return !data.hasChildren || (data.isExistForm == 1);
         },
       },
       leftType: 5,
@@ -2312,7 +2328,9 @@ export default {
           pkeyId: pkeyId,
           excelId: excelId,
           id: id,
-          initTableName
+          initTableName,
+          pid: this.$route.query.pid,
+          wbsid: this.$route.query.wbsid,
         }
       })
     },

+ 24 - 9
src/views/system/user.vue

@@ -429,13 +429,20 @@ export default {
       if (!value) {
         callback();
       } else {
-        if (!/^(\d{18,18}|\d{15,15}|\d{17,17}x)/.test(value)) {
+        if (!/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[12])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/i.test(value)) {
           callback(new Error('请输入正确的身份证号'));
         } else {
           callback();
         }
       }
     };
+    const projectAndUserListRules = (rule, value, callback) => {
+      if (this.fromss.projectAndUserList.length > 0) {
+        callback();
+      } else {
+        callback(new Error('请设置参建项目'));
+      }
+    };
     return {
       deletexiangmu: false,
       addData: {
@@ -700,11 +707,11 @@ export default {
                 label: "参建项目",
                 prop: "projectAndUserList",
                 span: 24,
-                // rules: [{
-                //   required: true,
-                //   message: "请先添加参加项目",
-                //   trigger: "change"
-                // }],
+                rules: [{
+                  required: true,
+                  validator: projectAndUserListRules,
+                  trigger: "change"
+                }],
               },
               {
                 label: "参与项目",
@@ -1048,6 +1055,10 @@ export default {
         })
         //  添加进去
         this.fromss.projectAndUserList.push(das)
+        this.$message({
+          type: "success",
+          message: "添加成功"
+        })
       } else {
         let tags = true
         this.fromss.projectAndUserList[index].dataInfo.forEach((val) => {
@@ -1204,11 +1215,15 @@ export default {
       const { data: res } = await saveUserInfoByProjectTow(da)
       console.log(res);
       if (res.code == 200) {
-        this.fromss.projectId = ''    //参与项项目
-        this.fromss.contractId = ''   //合同段
-        this.fromss.roleIds = ''      //用户类型
+        // this.fromss.projectId = ''    //参与项项目
+        // this.fromss.contractId = ''   //合同段
+        // this.fromss.roleIds = ''      //用户类型
         this.findProjectAndContractList(this.fromss.userId)
       }
+      this.$message({
+        type: 'success',
+        message: '添加成功'
+      })
     },
     //#endregion