Browse Source

修改开栓施工

wangzhe 1 year ago
parent
commit
7952b7e38e
1 changed files with 134 additions and 8 deletions
  1. 134 8
      src/views/zdsz/engineeringGasOpening/index.vue

+ 134 - 8
src/views/zdsz/engineeringGasOpening/index.vue

@@ -725,6 +725,23 @@ import {
   putEngineeGasOpening,
   putEngineeGasOpening,
   QueryEngineeGasOpening,
   QueryEngineeGasOpening,
 } from '@/api/zdsz/engineeringGasOpening'
 } from '@/api/zdsz/engineeringGasOpening'
+import {
+  addEnginee,                                // 新增工程
+  getHousesList,                             // 获取当前房间集合
+  putEngineeringCivil,                       // 民用工程修改
+  viewEngineeringCivil,                      // 民用工程查看详情
+  deleteEngineeringCivil,                    // 删除民用工程
+  getDictList,
+  viewEngineeringInfrastructureSource,
+  viewEngineeringCivilSource,
+
+  engineeringCivilAllReview,
+  CivilReview, batchNode
+} from "@/api/zdsz/enginee"
+import {getAreaList} from "@/api/zdsz/area";
+import {getBuildingList} from "@/api/zdsz/building";
+import {getUnits} from "@/api/zdsz/unit";
+import {getHouses} from "@/api/zdsz/house";
 import {getDicts} from "@/api/system/dict/data";
 import {getDicts} from "@/api/system/dict/data";
 import EngineePipe from '@/components/EngineePipe'
 import EngineePipe from '@/components/EngineePipe'
 import {validPhoneMobile} from '@/api/rules'
 import {validPhoneMobile} from '@/api/rules'
@@ -734,7 +751,7 @@ import {getEnginSpecificationsList} from '@/api/zdsz/enginSpecifications'
 
 
 export default {
 export default {
   name: "openrepair",
   name: "openrepair",
-  dicts: ['sys_yes_no', 'is_repair', 'industry_engin_type', 'self_closing_valve_type', 'visit_type', 'engin_classification', 'engineering_infrastructure', 'air_wall_node', 'gas_meter_direction', 'gas_change_type'],
+  dicts: ['sys_yes_no', 'is_repair', 'industry_engin_type', 'self_closing_valve_type', 'visit_type', 'engin_classification', 'engineering_infrastructure', 'air_wall_node', 'gas_meter_direction', 'gas_change_type', 'district'],
   components: {
   components: {
     ConstructionDetails,
     ConstructionDetails,
     EngineePipe
     EngineePipe
@@ -753,6 +770,10 @@ export default {
       })
       })
     }
     }
     return {
     return {
+      communityOptions: [],        // 小区集合
+      buildingOptions: [],         // 楼栋集合
+      unitOptions: [],             // 单元集合
+      houseOptions: [],            // 房间集合
       // 按钮loading
       // 按钮loading
       buttonLoading: false,
       buttonLoading: false,
       // 遮罩层
       // 遮罩层
@@ -792,6 +813,15 @@ export default {
       MaterVisible: false, // 用料信息dialog
       MaterVisible: false, // 用料信息dialog
       // 表单参数
       // 表单参数
       form: {
       form: {
+        gasCylinderPic: [], // 燃气立杠图片
+        pressureTestPic: [], // 气密测试图片
+        gasMeterPic: [], // 燃气表图片
+        rearPipePic: [], // 表后管图片
+        gasChangePic: [], // 灶前阀门图片
+        softPipePic: [], // 软管图片
+        windproofCirclePic: [], // 灶具阀门图片
+        gasEnvironmentPic: [], // 用气环境图片
+        receiptFormPic: [], // 回执单图片
         files: [], // 附件
         files: [], // 附件
         pics: [], // 附件返回
         pics: [], // 附件返回
         type: '', // 用来区分工业工程、市政工程
         type: '', // 用来区分工业工程、市政工程
@@ -856,14 +886,35 @@ export default {
           {required: true, message: "立杠气密测试不能为空", trigger: 'blur'}
           {required: true, message: "立杠气密测试不能为空", trigger: 'blur'}
         ],
         ],
         householdTest: [
         householdTest: [
-          {required: false, message: "单户气密测试不能为空", trigger: "blur"}
+          {required: true, message: "单户气密测试不能为空", trigger: "blur"}
         ],
         ],
         gasCylinderPic: [
         gasCylinderPic: [
           {required: true, message: "请上传燃气立杠照片", trigger: "blur"}
           {required: true, message: "请上传燃气立杠照片", trigger: "blur"}
         ],
         ],
-        pressureTestPic: [
-          {required: true, message: "请上传气密测试照片", trigger: "blur"}
-        ],
+        // pressureTestPic: [
+        //   {required: true, message: "请上传气密测试照片", trigger: "blur"}
+        // ],
+        // gasMeterPic: [
+        //   {required: true, message: "请上传燃气表照片", trigger: "blur"}
+        // ],
+        // rearPipePic: [
+        //   {required: true, message: "请上传表后管照片", trigger: "blur"}
+        // ],
+        // gasChangePic: [
+        //   {required: true, message: "请上传灶前阀门照片", trigger: "blur"}
+        // ],
+        // softPipePic: [
+        //   {required: true, message: "请上传软管照片", trigger: "blur"}
+        // ],
+        // windproofCirclePic: [
+        //   {required: true, message: "请上传灶具阀门照片", trigger: "blur"}
+        // ],
+        // gasEnvironmentPic: [
+        //   {required: true, message: "请上传用气环境照片", trigger: "blur"}
+        // ],
+        // receiptFormPic: [
+        //   {required: true, message: "请上传回执单照片", trigger: "blur"}
+        // ],
       },
       },
       // 节点规则校验
       // 节点规则校验
       nodeRules: {
       nodeRules: {
@@ -900,11 +951,67 @@ export default {
     });
     });
   },
   },
   methods: {
   methods: {
+    // 当前所选行政区发生改变 查询当前小区集合
+    districtHasChanged(district) {
+      this.queryParams.areaId = null
+      this.queryParams.buildingId = null
+      this.queryParams.unitId = null
+      this.communityOptions = [];
+      this.buildingOptions = [];
+      this.unitOptions = [];
+      this.houseOptions = [];
+      getAreaList({district}).then(res => {
+        this.communityOptions = res.data
+      })
+    },
+    // 当前所选小区发生改变 查询当前楼栋集合
+    communityHasChanged(areaId) {
+      this.queryParams.buildingId = null
+      this.queryParams.unitId = null
+      this.buildingOptions = [];
+      this.unitOptions = [];
+      this.houseOptions = [];
+      getBuildingList({areaId}).then(res => {
+        this.buildingOptions = res.data
+      })
+    },
+    buildingHasChanged(buildingId, areaId) {
+      this.unitOptions = [];
+      this.houseOptions = [];
+      this.queryParams.unitId = null
+      getUnits(buildingId).then(res => {
+        this.unitOptions = res.data
+      })
+    },
+    unitHasChanged(unitId) {
+      this.houseOptions = [];
+      getHousesList({unitId}).then(res => {
+        console.log(res)
+        this.houseOptions = res.data
+      })
+    },
+    formatFormPic(picList){
+      let list = []
+      for (let i = 0; i < picList.length; i++) {
+        list.push({
+          picUrl:picList[i].url,
+          fileName:picList[i].name
+        })
+      }
+      return list
+      //   [{
+      //   picUrl:url,
+      //   fileName:name
+      // }]
+    },
     getgasCylinderPic(_,idx){
     getgasCylinderPic(_,idx){
+      // console.log('____===',_)
       this.form.gasCylinderPic = [...arguments][0][0].map(e=>e.url) || [];
       this.form.gasCylinderPic = [...arguments][0][0].map(e=>e.url) || [];
+      // this.form.gasCylinderPic = this.formatFormPic(_)
     },
     },
     getpressureTestPic(_,idx){
     getpressureTestPic(_,idx){
       this.form.pressureTestPic = [...arguments][0][0].map(e=>e.url) || [];
       this.form.pressureTestPic = [...arguments][0][0].map(e=>e.url) || [];
+      // this.form.pressureTestPic = this.formatFormPic(_)
     },
     },
     getgasMeterPic(_,idx){
     getgasMeterPic(_,idx){
       this.form.gasMeterPic = [...arguments][0][0].map(e=>e.url) || [];
       this.form.gasMeterPic = [...arguments][0][0].map(e=>e.url) || [];
@@ -1216,6 +1323,15 @@ export default {
       for (let formKey in this.form) {
       for (let formKey in this.form) {
         this.form[formKey] = null
         this.form[formKey] = null
       }
       }
+      this.form.gasCylinderPic = [] // 燃气立杠图片
+      this.form.pressureTestPic = [] // 气密测试图片
+      this.form.gasMeterPic = [] // 燃气表图片
+      this.form.rearPipePic = [] // 表后管图片
+      this.form.gasChangePic = [] // 灶前阀门图片
+      this.form.softPipePic = [] // 软管图片
+      this.form.windproofCirclePic = [] // 灶具阀门图片
+      this.form.gasEnvironmentPic = [] // 用气环境图片
+      this.form.receiptFormPic = [] // 回执单图片
       this.form.zEngineeringNodeBo = {}
       this.form.zEngineeringNodeBo = {}
       this.form.zEngineeringNodeBo.zEngineeringInfoBo = {}
       this.form.zEngineeringNodeBo.zEngineeringInfoBo = {}
       this.zEngineeringMaterialBo = []
       this.zEngineeringMaterialBo = []
@@ -1288,9 +1404,19 @@ export default {
       // }
       // }
       this.$refs["form"].validate(valid => {
       this.$refs["form"].validate(valid => {
         if (valid) {
         if (valid) {
-          this.form.files = this.$refs.obsFileUpload.fileList;
-          if (this.form.files.length === 0) {
-            this.$message.warning('必须上传附件!')
+          // this.form.files = this.$refs.obsFileUpload.fileList;
+          // if (this.form.files.length === 0) {
+          //   this.$message.warning('必须上传附件!')
+          //   return
+          // }
+          // alert(this.form.gasCylinderPic)
+          console.log('this.form.gasCylinderPic=',this.form)
+          if (this.form.gasCylinderPic.length === 0) {
+            this.$message.warning('必须上传燃气立杠照片!')
+            return
+          }
+          if (this.form.pressureTestPic.length === 0) {
+            this.$message.warning('必须上传气密测试照片!')
             return
             return
           }
           }
           if (this.form.id == null) {
           if (this.form.id == null) {