Parcourir la source

修改机构扩展

luojun il y a 2 ans
Parent
commit
e46e51e4bb
1 fichiers modifiés avec 75 ajouts et 22 suppressions
  1. 75 22
      src/views/system/dept/extend.vue

+ 75 - 22
src/views/system/dept/extend.vue

@@ -473,8 +473,8 @@
             v-model="lobbyEquipment"
             controls-position="right"
             @change="handleChange"
-            :min="1"
-            :max="10"
+            :min="0"
+            :max="9999"
           ></el-input-number>
         </div>
         <span style="margin-left: 50px">在行式穿墙设备</span>
@@ -484,8 +484,8 @@
             v-model="wallPenetratingEquipment"
             controls-position="right"
             @change="handleChange"
-            :min="1"
-            :max="10"
+            :min="0"
+            :max="9999"
           ></el-input-number>
         </div>
       </div>
@@ -596,8 +596,8 @@
             v-model="detachedLobbyEquipment"
             controls-position="right"
             @change="handleChange"
-            :min="1"
-            :max="10"
+            :min="0"
+            :max="9999"
           ></el-input-number>
         </div>
         <span style="margin-left: 50px">离行式穿墙设备</span>
@@ -607,8 +607,8 @@
             v-model="detachedWallPenetratingEquipment"
             controls-position="right"
             @change="handleChange"
-            :min="1"
-            :max="10"
+            :min="0"
+            :max="9999"
           ></el-input-number>
         </div>
       </div>
@@ -1092,6 +1092,7 @@ import {
   delOrgPhysicalDefenseConstruction,
 } from "@/api/system/OrgPhysicalDefenseConstruction";
 import {findAreaList} from "@/api/core/weather";
+import TreeNodeDialogVue from '../../tool/build/TreeNodeDialog.vue';
 
 export default {
   dicts: [
@@ -1112,11 +1113,15 @@ export default {
   components: {},
   data() {
     return {
+      reqmsg:false,
       //表单验证
       rules: {
         standard: [{ required: true, message: "请输入标准", trigger: "blur" }],
         dateOfCompliance: [
-          { required: false, message: "请输入达标日期", trigger: "blur" },
+          { required: TreeNodeDialogVue, message: "请输入达标日期", trigger: "blur" },
+        ],
+        certificate: [
+          { validator: this.isreq, message: "请选择图片", trigger: "blur" },
         ],
       },
 
@@ -1131,6 +1136,7 @@ export default {
         { label: "更新时间", key: "updateTime" },
         { label: "同步时间", key: "createTime" },
       ],
+      
       type: null,
       isLock: null,
       dataInfo: [],
@@ -1230,7 +1236,42 @@ export default {
       areaList:[],
     };
   },
-  watch: {},
+  watch: {
+    'detachedform.certificateEvidence'(newValue) {
+      if (newValue === 1) {
+        this.reqmsg=true;
+      }
+      if (newValue === 0) {
+        this.reqmsg=false;
+      }
+    },
+    'Bankform.certificateEvidence'(newValue) {
+      if (newValue === 1) {
+        this.reqmsg=true;
+      }
+      if (newValue === 0) {
+        this.reqmsg=false;
+      }
+    },
+    'Businessform.certificateEvidence'(newValue) {
+      if (newValue === 1) {
+        this.reqmsg=true;
+      }
+      if (newValue === 0) {
+        this.reqmsg=false;
+      }
+    },
+    'orgform.certificateEvidence'(newValue) {
+      if (newValue === 1) {
+        this.reqmsg=true;
+      }
+      if (newValue === 0) {
+        this.reqmsg=false;
+      }
+    },
+
+
+  },
   computed: {
     switchModel: {
       get() {
@@ -1252,6 +1293,14 @@ export default {
   },
   mounted() {},
   methods: {
+   
+    isreq(rule, value, callback) {
+      if(this.reqmsg){
+        callback(new Error('证书为必填项'));
+      }else{
+        callback();
+      }
+    },
     getImgUrl(fileList) {
       let matchResult = fileList.match(/\/statics(.*)/);
       if (matchResult) {
@@ -1421,6 +1470,7 @@ export default {
         updateBy: null,
         orgId: null,
       };
+      this.reqmsg=false;
       this.resetForm("Businessform");
     },
     // 多选框选中数据
@@ -1433,7 +1483,7 @@ export default {
     handleBusinessAdd() {
       this.Businessreset();
       this.Businessopen = true;
-      this.Businesstitle = "添加业务库物防建设";
+      this.Businesstitle = "新增物防建设";
     },
     /** 编辑按钮操作 */
     handleBusinessUpdate(row) {
@@ -1442,7 +1492,7 @@ export default {
       getOrgPhysicalDefenseConstruction(id).then((response) => {
         this.Businessform = response.data;
         this.Businessopen = true;
-        this.Businesstitle = "编辑业务库物防建设";
+        this.Businesstitle = "编辑物防建设";
       });
     },
     /** 提交按钮 */
@@ -1486,7 +1536,7 @@ export default {
       const Businessids = row.id || this.Businessids;
       this.$modal
         .confirm(
-          '是否确认删除银行物防建设编号为"' + Businessids + '"的数据项?'
+          '确认删除?'
         )
         .then(function () {
           return delOrgPhysicalDefenseConstruction(Businessids);
@@ -1520,6 +1570,7 @@ export default {
         updateBy: null,
         orgId: null,
       };
+      this.reqmsg=false;
       this.resetForm("Bankform");
     },
     // 多选框选中数据
@@ -1532,7 +1583,7 @@ export default {
     handleBankAdd() {
       this.Bankreset();
       this.Bankopen = true;
-      this.Banktitle = "添加银行物防建设";
+      this.Banktitle = "新增物防建设";
     },
     /** 编辑按钮操作 */
     handleBankUpdate(row) {
@@ -1541,7 +1592,7 @@ export default {
       getOrgPhysicalDefenseConstruction(id).then((response) => {
         this.Bankform = response.data;
         this.Bankopen = true;
-        this.Banktitle = "编辑银行物防建设";
+        this.Banktitle = "编辑物防建设";
       });
     },
     /** 提交按钮 */
@@ -1583,7 +1634,7 @@ export default {
     handleBankDelete(row) {
       const Bankids = row.id || this.Bankids;
       this.$modal
-        .confirm('是否确认删除银行物防建设编号为"' + Bankids + '"的数据项?')
+        .confirm('确认删除?')
         .then(function () {
           return delOrgPhysicalDefenseConstruction(Bankids);
         })
@@ -1614,6 +1665,7 @@ export default {
         updateBy: null,
         orgId: null,
       };
+      this.reqmsg=false;
       this.resetForm("detachedform");
     },
     // 多选框选中数据
@@ -1626,7 +1678,7 @@ export default {
     handledetachedAdd() {
       this.detachedreset();
       this.detachedopen = true;
-      this.detachedtitle = "添加离行物防建设";
+      this.detachedtitle = "新增物防建设";
     },
     /** 编辑按钮操作 */
     handledetachedUpdate(row) {
@@ -1635,7 +1687,7 @@ export default {
       getOrgPhysicalDefenseConstruction(id).then((response) => {
         this.detachedform = response.data;
         this.detachedopen = true;
-        this.detachedtitle = "编辑离行物防建设";
+        this.detachedtitle = "编辑物防建设";
       });
     },
     /** 提交按钮 */
@@ -1678,7 +1730,7 @@ export default {
       const detachedids = row.id || this.detachedids;
       this.$modal
         .confirm(
-          '是否确认删除离行物防建设编号为"' + detachedids + '"的数据项?'
+          '确认删除?'
         )
         .then(function () {
           return delOrgPhysicalDefenseConstruction(detachedids);
@@ -1705,6 +1757,7 @@ export default {
         updateBy: null,
         orgId: null,
       };
+      this.reqmsg=false;
       this.resetForm("orgform");
     },
     // 取消按钮
@@ -1722,7 +1775,7 @@ export default {
     handleOrgAdd() {
       this.orgreset();
       this.orgopen = true;
-      this.orgtitle = "添加机构物防建设";
+      this.orgtitle = "新增物防建设";
     },
     /** 编辑按钮操作 */
     handleOrgUpdate(row) {
@@ -1732,7 +1785,7 @@ export default {
         // console.log(response)
         this.orgform = response.data;
         this.orgopen = true;
-        this.orgtitle = "编辑机构物防建设";
+        this.orgtitle = "编辑物防建设";
       });
     },
     /** 提交按钮 */
@@ -1772,7 +1825,7 @@ export default {
     handleOrgDelete(row) {
       const orgids = row.id || this.orgids;
       this.$modal
-        .confirm('是否确认删除机构物防建设编号为"' + orgids + '"的数据项?')
+        .confirm('确认删除?')
         .then(function () {
           return delOrgPhysicalDefenseConstruction(orgids);
         })