JX.Li 1 年之前
父节点
当前提交
020050655d
共有 1 个文件被更改,包括 34 次插入30 次删除
  1. 34 30
      src/views/zdsz/engineeringCivil/index.vue

+ 34 - 30
src/views/zdsz/engineeringCivil/index.vue

@@ -167,7 +167,6 @@
       :limit.sync="queryParams1.pageSize"
       @pagination="getList"
     />
-    <EngineePipe ref="enginPipe"/>
     <!-- 添加或修改民用工程对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="500" append-to-body>
       <el-form ref="form" :model="queryParams" :rules="rules" label-width="110px">
@@ -279,6 +278,7 @@
               <el-select
                 v-model="queryParams.currentEnginTypeChange"
                 placeholder="请选择工程分类"
+                @change="currentEnginTypeChanged"
               >
                 <el-option
                   v-for="e in currentEnginTypeChangeOptions"
@@ -294,7 +294,6 @@
               <el-select
                 v-model="queryParams.enginCycle"
                 placeholder="请填写工程周期"
-                @change="q"
               >
                 <el-option
                   v-for="e in dict.type.engin_cycle"
@@ -306,6 +305,15 @@
             </el-form-item>
           </el-col>
         </el-row>
+        <el-row>
+          <el-col :span="24">
+            <el-form-item label="节点">
+              <el-checkbox-group v-model="checkList">
+                <el-checkbox :label="item.dictValue" v-for="item in checkList"></el-checkbox>
+              </el-checkbox-group>
+            </el-form-item>
+          </el-col>
+        </el-row>
         <el-tabs type="border-card">
           <el-tab-pane label="用户管理">用户管理</el-tab-pane>
           <el-tab-pane label="配置管理">配置管理</el-tab-pane>
@@ -314,15 +322,10 @@
         </el-tabs>
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <!-- <el-button :loading="buttonLoading" type="primary" @click="submitForm">确定</el-button> -->
         <el-button :loading="buttonLoading" type="primary" @click="toNodeDetail">填写节点信息</el-button>
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
-    <EngineeNode
-      ref="childNode"
-      @closeToSucceed="closeToSucceed"
-    />
   </div>
 </template>
 
@@ -346,16 +349,11 @@ import {
 import {getAreaList} from "@/api/zdsz/area";
 import {getBuildingList} from "@/api/zdsz/building";
 import {getUnits} from "@/api/zdsz/unit";
-import EngineeNode from '@/components/EngineeNode/index'
-import EngineePipe from "@/components/EngineePipe"
 import {resetForm} from "@/utils/ruoyi";
 import {getDicts} from "@/api/system/dict/data";
 
 export default {
-  components: {
-    EngineeNode,
-    EngineePipe
-  },
+  components: {},
 
   name: "EngineeringCivil",
   dicts: ['pass_check',
@@ -418,6 +416,7 @@ export default {
         enginClassification: undefined,
         enginCycle: undefined,
         completionStatus: undefined,
+        currentEnginTypeChange: undefined,
         imgUrl: undefined,
         zEngineeringNodeBoList: {
           type: undefined,
@@ -521,7 +520,8 @@ export default {
       buildingOptions: [],         // 楼栋集合
       unitOptions: [],             // 单元集合
       houseOptions: [],            // 房间集合
-      enginClassification_list: []// 室内节点
+      enginClassification_list: [], // 室内节点,
+      checkList: []// 节点集合
     };
   },
   created() {
@@ -537,13 +537,17 @@ export default {
         type: '民用工程'
       }, 'add')
     },
-    currentEnginTypeChange(val){
-      const enginDict = val[1]
-      const enginType = val[0]
-      this.queryParams.enginType = enginType
-      this.enginClassification = enginDict
-      this.enginClassificationOption = this.dict.type[enginDict]
-      console.log(this.value)
+    currentEnginTypeChanged() {
+      this.$forceUpdate();
+      if (this.queryParams.enginType == undefined || this.queryParams.enginType == ''
+        || this.queryParams.currentEnginTypeChange == undefined || this.queryParams.currentEnginTypeChange == ''
+      )
+        return
+      console.log(this.queryParams)
+      let val = this.queryParams.enginType + "_" + this.queryParams.currentEnginTypeChange
+      getDicts(val).then(res => {
+        this.checkList = res.data
+      })
     },
     // 当前所选行政区发生改变 查询当前小区集合
     districtHasChanged(district) {
@@ -576,7 +580,7 @@ export default {
       })
     },
     enginTypeHasChanged() {
-      this.queryParams.currentEnginTypeChange = undefined
+      this.queryParams.currentEnginTypeChange = ''
       this.currentEnginTypeChangeOptions = []
       getDicts(this.queryParams.enginType).then(res => {
         this.currentEnginTypeChangeOptions = res.data
@@ -691,16 +695,16 @@ export default {
     //     id:data.id
     //   },'add')
     // },
-    nodeCancel(){
+    nodeCancel() {
       this.nodeDetailVisible = false
     },
     toNodeDetail() {
       getDictList({enginType: ['new_built', 'old_renovation']}).then(res => {
         this.nodeList = res.data
-        console.log('跳到详情前的queryParams',this.queryParams)
-        console.log('跳到详情前的节点集合',this.nodeList)
-        if(this.currentType == 'put'){
-          this.$refs.childNode.open(this.queryParams,16,this.nodeList)
+        console.log('跳到详情前的queryParams', this.queryParams)
+        console.log('跳到详情前的节点集合', this.nodeList)
+        if (this.currentType == 'put') {
+          this.$refs.childNode.open(this.queryParams, 16, this.nodeList)
           this.currentType = null
           return
         }
@@ -711,8 +715,8 @@ export default {
         // this.queryParams.zEngineeringNodeBo.type = this.enginClassification
         // this.queryParams.enginClassification = result
         // console.log(this.queryParams)
-        console.log('新增queryparams传值',this.queryParams)
-        this.$refs.childNode.open(this.queryParams,0,this.nodeList)
+        console.log('新增queryparams传值', this.queryParams)
+        this.$refs.childNode.open(this.queryParams, 0, this.nodeList)
         return
         this.$refs['form'].validate(e => {
           if (e) {
@@ -769,7 +773,7 @@ export default {
         newData.zEngineeringNodeBo = zEngineeringNodeBo
         this.currentType = 'put'
         this.queryParams = newData
-        console.log('修改queryparams传值',this.queryParams)
+        console.log('修改queryparams传值', this.queryParams)
         console.log(this.queryParams)
         this.zEngineeringInfoBo = newData.zEngineeringNodeBo.zEngineeringInfoBo
         this.open = true