Quellcode durchsuchen

管理端民用详情页面添加地址

JX.Li vor 1 Jahr
Ursprung
Commit
613cdc3fdd

+ 7 - 4
src/components/ConstructionDetails/index.vue

@@ -9,7 +9,7 @@
   <div style="width: 100%;height: 100%;">
     <el-dialog
     :visible.sync="dialogVisible"
-    title=""
+    :title="titleName"
     width="60%"
     append-to-body
     custom-class="ConstructionDetailsDialog">
@@ -227,6 +227,7 @@
     <el-dialog
       title="审核"
       :visible.sync="checkingVisible"
+      :title="titleName"
       width="30%"
       class="checkingDialog"
       :before-close="handleChecking">
@@ -289,6 +290,7 @@ export default {
       currentDicts: [],              // 当前类型工程节点项
       dialogVisible: false,
       activeNames: '',
+      titleName: '',
       reviewStatusList:[
         {
           value:'1',
@@ -382,7 +384,6 @@ export default {
       } catch (error) {
         this.reviewStatus = true
       }
-      console.log(flag)
       if(materialQuality){
         getEnginSpecificationsList({materId:materialQuality}).then(res => {
           console.log('规格',res.data)
@@ -441,7 +442,7 @@ export default {
           throw 'valid Failed'
         }
       })
-      
+
     },
     // 查看单节点历史
     viewSource(e) {
@@ -460,8 +461,9 @@ export default {
       this.$emit('updateNodeOption',this.currentCollapses)
     },
     // 查看历史
-    open(dicts, type = null,currentStatus = null,kind = null) {
+    open(dicts, type = null,currentStatus = null,kind = null,title= null) {
       this.currentStatus = currentStatus
+      this.titleName = title
       this.checkingVisible = false
       console.log(this.reviewStatus,this.currentStatus,this.isChecking)
       if (type == '1' || type == '2') {
@@ -491,6 +493,7 @@ export default {
       }
 
       this.dialogVisible = true
+      this.$forceUpdate()
     },
     // 获取材质规格
     getEnginSpecificationsList(e,idx,parentIndex){

+ 1 - 1
src/views/zdsz/area/index.vue

@@ -202,7 +202,7 @@
           </el-col>
           <el-col :span="12">
             <el-form-item label="小区规模" prop="scale">
-              <el-input v-model="form.scale" placeholder="请输入小区规模" maxlength="50"/>
+              <el-input-number v-model="form.scale" placeholder="请输入小区规模" maxlength="50" style="width: 100%"/>
             </el-form-item>
           </el-col>
         </el-row>

+ 70 - 67
src/views/zdsz/engineeringCivil/index.vue

@@ -74,17 +74,17 @@
           />
         </el-select>
       </el-form-item>
-<!--      <el-form-item label="工程周期" prop="enginCycle">-->
-<!--        <el-select v-model="queryParams1.enginCycle" placeholder="请选择工程周期" clearable-->
-<!--                   @clear="">-->
-<!--          <el-option-->
-<!--            v-for="dict in dict.type.engin_cycle"-->
-<!--            :key="dict.value"-->
-<!--            :label="dict.label"-->
-<!--            :value="dict.value"-->
-<!--          />-->
-<!--        </el-select>-->
-<!--      </el-form-item>-->
+      <!--      <el-form-item label="工程周期" prop="enginCycle">-->
+      <!--        <el-select v-model="queryParams1.enginCycle" placeholder="请选择工程周期" clearable-->
+      <!--                   @clear="">-->
+      <!--          <el-option-->
+      <!--            v-for="dict in dict.type.engin_cycle"-->
+      <!--            :key="dict.value"-->
+      <!--            :label="dict.label"-->
+      <!--            :value="dict.value"-->
+      <!--          />-->
+      <!--        </el-select>-->
+      <!--      </el-form-item>-->
 
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
@@ -170,11 +170,11 @@
         </template>
       </el-table-column>
       <el-table-column label="工程分类" align="center" prop="enginClassificationName"/>
-<!--      <el-table-column label="工程周期" align="center" prop="enginCycle">-->
-<!--        <template slot-scope="scope">-->
-<!--          <dict-tag :options="dict.type.engin_cycle" :value="scope.row.enginCycle"/>-->
-<!--        </template>-->
-<!--      </el-table-column>-->
+      <!--      <el-table-column label="工程周期" align="center" prop="enginCycle">-->
+      <!--        <template slot-scope="scope">-->
+      <!--          <dict-tag :options="dict.type.engin_cycle" :value="scope.row.enginCycle"/>-->
+      <!--        </template>-->
+      <!--      </el-table-column>-->
       <!--      <el-table-column label="完工状态" align="center" prop="completionStatus"/>-->
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="300">
         <template slot-scope="scope">
@@ -380,22 +380,22 @@
               </el-select>
             </el-form-item>
           </el-col>
-<!--          <el-col :span="12">-->
-<!--            <el-form-item label="工程周期" prop="enginCycle">-->
-<!--              <el-select-->
-<!--                :disabled="title == '添加用料' "-->
-<!--                v-model="queryParams.enginCycle"-->
-<!--                placeholder="请填写工程周期"-->
-<!--              >-->
-<!--                <el-option-->
-<!--                  v-for="e in dict.type.engin_cycle"-->
-<!--                  :key="e.value"-->
-<!--                  :label="e.label"-->
-<!--                  :value="e.value"-->
-<!--                ></el-option>-->
-<!--              </el-select>-->
-<!--            </el-form-item>-->
-<!--          </el-col>-->
+          <!--          <el-col :span="12">-->
+          <!--            <el-form-item label="工程周期" prop="enginCycle">-->
+          <!--              <el-select-->
+          <!--                :disabled="title == '添加用料' "-->
+          <!--                v-model="queryParams.enginCycle"-->
+          <!--                placeholder="请填写工程周期"-->
+          <!--              >-->
+          <!--                <el-option-->
+          <!--                  v-for="e in dict.type.engin_cycle"-->
+          <!--                  :key="e.value"-->
+          <!--                  :label="e.label"-->
+          <!--                  :value="e.value"-->
+          <!--                ></el-option>-->
+          <!--              </el-select>-->
+          <!--            </el-form-item>-->
+          <!--          </el-col>-->
         </el-row>
         <el-row>
           <el-col :span="24" v-if="title!=='修改民用工程'">
@@ -509,7 +509,8 @@
           label="审核状态"
           prop="reviewStatus"
         >
-          <el-select v-model="checkingForm.reviewStatus" placeholder="请选择审核状态" label="审核状态" @change="validateCHanged">
+          <el-select v-model="checkingForm.reviewStatus" placeholder="请选择审核状态" label="审核状态"
+                     @change="validateCHanged">
             <el-option
               v-for="e in reviewStatusList"
               :key="e.label"
@@ -616,24 +617,24 @@ export default {
       enginId: undefined,
       checkingsVisible: false,
       updateOption: [],
-      checkingFormRules:{
+      checkingFormRules: {
         enginType: [
-            {required: true, message: "工程类型不能为空", trigger: ['change']}
+          {required: true, message: "工程类型不能为空", trigger: ['change']}
         ],
         enginClassification: [
-            {required: true, message: "工程分类不能为空", trigger: ['change']}
+          {required: true, message: "工程分类不能为空", trigger: ['change']}
         ],
         type: [
-            {required: true, message: "环节不能为空", trigger: ['change']}
+          {required: true, message: "环节不能为空", trigger: ['change']}
         ],
         reviewTime: [
-            {required: true, message: "工程创建时间不能为空", trigger: ['change']}
+          {required: true, message: "工程创建时间不能为空", trigger: ['change']}
         ],
         reviewStatus: [
-            {required: true, message: "审核状态不能为空", trigger: ['change']}
+          {required: true, message: "审核状态不能为空", trigger: ['change']}
         ],
         reviewContent: [
-            {required: true, message: "审核内容不能为空", trigger: ['change']}
+          {required: true, message: "审核内容不能为空", trigger: ['change']}
         ],
       },
       listContain: [
@@ -1013,11 +1014,9 @@ export default {
           label: '不通过'
         }
       ],
-      zEngineeringNodeBo:{
-
-      },
+      zEngineeringNodeBo: {},
       currentEnginName: null,
-      currentCheckingEnginList:[]
+      currentCheckingEnginList: []
     };
   },
   created() {
@@ -1031,23 +1030,23 @@ export default {
     }
   },
   methods: {
-    enginNodeStatusExecuted(item){
+    enginNodeStatusExecuted(item) {
       try {
         let flag
-        if(this.currentCheckingEnginList.filter(e => e.label == item.dictValue)[0].status == '1') return true
+        if (this.currentCheckingEnginList.filter(e => e.label == item.dictValue)[0].status == '1') return true
       } catch (error) {
         return false
       }
     },
-    checkingAllFormClosed(){
+    checkingAllFormClosed() {
       this.$refs.checkingFormAll.resetFields()
     },
-    validateCHanged(e){
+    validateCHanged(e) {
       this.reviewStatusList[e].label == '通过' ? this.checkingFormRules.reviewContent[0].required = true : this.checkingFormRules.reviewContent[0].required = false
     },
     checkingAllSubmit() {
       this.$refs.checkingFormAll.validate(valid => {
-        if(valid){
+        if (valid) {
           // this.checkingForm.createTime = formatDate(this.checkingForm.createTime)
           engineeringCivilAllReview(this.checkingForm).then(res => {
             if (res.code == 200) {
@@ -1088,7 +1087,7 @@ export default {
           });
           setTimeout(() => {
             this.viewNodeSource()
-          },1000)
+          }, 1000)
         }
       })
     },
@@ -1113,6 +1112,7 @@ export default {
       this.nodeDetailType = '修改'
       this.enginId = e.id
       this.status = 'put'
+      let title = e.areaName + "-" + e.buildingName + "-" + e.unitName + "-" + e.houseName + " [" + (e.enginType == 'new_built' ? "新建" : '旧改') + "-" + e.enginClassificationName + "]"
       let val = e.enginType + "_" + e.enginClassification
       getDicts(val).then(res => {
         let dict = []
@@ -1122,14 +1122,14 @@ export default {
             "value": res.data[i].dictValue,
           })
         }
-        this.$refs.ConstructionDetails.open(dict)
+        this.$refs.ConstructionDetails.open(dict, null, null, null, title)
       })
     },
     viewNodeSource(e = null) {
-      if(e){
+      if (e) {
         this.currentEnginName = e
       }
-      console.log(this.currentEnginName )
+      console.log(this.currentEnginName)
       viewEngineeringCivilSource({
         id: this.enginId,
         type: e || this.currentEnginName
@@ -1149,6 +1149,9 @@ export default {
     },
     // 查看历史
     viewSource(e, type = null) {
+      console.log("viewSource(e, type = null)", e)
+      let title = e.areaName + "-" + e.buildingName + "-" + e.unitName + "-" + e.houseName + " [" + (e.enginType == 'new_built' ? "新建" : '旧改') + "-" + e.enginClassificationName + "]"
+      console.log("viewSource(e, type = null)", title)
       this.enginId = e.id
       let val = e.enginType + "_" + e.enginClassification
       getDicts(val).then(res => {
@@ -1160,7 +1163,7 @@ export default {
           })
         }
         this.zEngineeringNodeBo = e
-        this.$refs.ConstructionDetails.open(dict, _, type)
+        this.$refs.ConstructionDetails.open(dict, _, type, null, title)
         this.status = 'read-only'
       })
     },
@@ -1191,14 +1194,14 @@ export default {
               status = '0'
             }
             this.currentCheckingEnginList.push({
-              label:e.type,
+              label: e.type,
               status
             })
           })
         } catch (error) {
           this.currentCheckingEnginList = []
         }
-        console.log('as',this.currentCheckingEnginList)
+        console.log('as', this.currentCheckingEnginList)
         let newData = res.data
         // 手动调用行政区发生改变
         this.districtHasChanged(newData.district)
@@ -1254,8 +1257,8 @@ export default {
       this.queryParams.unitId = null
       this.communityOptions = [];
       this.buildingOptions = [];
-      this.unitOptions=[];
-      this.houseOptions=[];
+      this.unitOptions = [];
+      this.houseOptions = [];
       getAreaList({district}).then(res => {
         this.communityOptions = res.data
       })
@@ -1265,22 +1268,22 @@ export default {
       this.queryParams.buildingId = null
       this.queryParams.unitId = null
       this.buildingOptions = [];
-      this.unitOptions=[];
-      this.houseOptions=[];
+      this.unitOptions = [];
+      this.houseOptions = [];
       getBuildingList({areaId}).then(res => {
         this.buildingOptions = res.data
       })
     },
     buildingHasChanged(buildingId, areaId) {
-      this.unitOptions=[];
-      this.houseOptions=[];
+      this.unitOptions = [];
+      this.houseOptions = [];
       this.queryParams.unitId = null
       getUnits(buildingId).then(res => {
         this.unitOptions = res.data
       })
     },
     unitHasChanged(unitId) {
-      this.houseOptions=[];
+      this.houseOptions = [];
       getHousesList({unitId}).then(res => {
         console.log(res)
         this.houseOptions = res.data
@@ -1428,16 +1431,16 @@ export default {
     },
     toNodeDetail() {
       this.$refs.form.validate(valid => {
-        if(valid){
+        if (valid) {
           let nodeCollection = []
           // 收集节点信息
           this.currentCheckList.forEach((e, idx) => {
             let nodeItem = this.$refs['EnginNodeInfo' + idx][0].infoCollection()
             nodeCollection.push(nodeItem)
-            setTimeout(() =>{
+            setTimeout(() => {
               console.log('nodeCollection:', nodeItem)
-            console.log('nodeCollection:', this.$refs['EnginNodeInfo' + idx][0])
-            },2000)
+              console.log('nodeCollection:', this.$refs['EnginNodeInfo' + idx][0])
+            }, 2000)
 
           })
           this.queryParams.zEngineeringNodeBoList = nodeCollection