wangtong 1 vuosi sitten
vanhempi
commit
a6e94f395c

+ 17 - 10
src/components/ConstructionDetails/index.vue

@@ -471,7 +471,7 @@ export default {
   },
   created(){
       // 获取材质
-      getEnginMaterialQualityList({enginType:this.enginType}).then(res => {
+      getEnginMaterialQualityList({enginType:this.enginType,enginStep:this.activeNames}).then(res => {
           console.log('材质',res)
           this.materialQualityList = res.data
       })
@@ -577,7 +577,14 @@ export default {
       console.log('节点',e)
       this.node=e.name
       this.nodesource=e
-      console.log("!(node==='下沟')||!currentDicts.some(item=>item.label==='底腿')",(this.currentDicts.some(item=>item.label==='底腿'))&&!(this.node==='下沟'))
+      console.log('data',this.zEngineeringNodeBo)
+      let data = {enginSort:this.zEngineeringNodeBo.enginType}
+      console.log(this.node)
+      data.enginStep = this.node
+      data.enginNode = this.zEngineeringNodeBo.enginClassification
+      getEnginMaterialQualityList(data).then(res => {
+        this.materialQualityList = res.data
+      })
       this.$parent.viewNodeSource(e.name)
     },
     // 单项审核
@@ -613,14 +620,13 @@ export default {
       });
     },
     // 查看历史
-    open(dicts, type = null,currentStatus = null,kind = null,title= null) {
-      let data = {enginType:this.enginType}
-      if (this.enginSort !== undefined){
-        data['enginSort'] = this.enginSort
-        data['enginNode'] = this.enginNode
-      }
+    open(dicts, type = null,currentStatus = null,kind = null,title= null,zEngineeringNodeBo) {
+      console.log(zEngineeringNodeBo)
+      let data = {enginSort:zEngineeringNodeBo.enginType}
+      // if (this.node !== ''){
+      // }
       // 腐蚀等级
-      data.enginStep = this.activeNames;
+      data.enginStep = dicts[0].value;
       if(this.activeNames == '阀管'){
         data.nameType = "自闭阀厂家";
         getEnginMaterialQualityList(data).then(res => {
@@ -631,10 +637,11 @@ export default {
           this.materialQualityList_zjg = res.data
         })
       }
+      //data.enginStep = this.node
+      data.enginNode = zEngineeringNodeBo.enginClassification
       getEnginMaterialQualityList(data).then(res => {
         this.materialQualityList = res.data
       })
-
       this.currentStatus = currentStatus
       this.titleName = title
       this.checkingVisible = false

+ 4 - 4
src/views/zdsz/engineeringCivil/index.vue

@@ -1454,9 +1454,8 @@ export default {
             "value": res.data[i].dictValue,
           })
         }
-        this.$refs.ConstructionDetails.enginSort = e.enginType;
-        this.$refs.ConstructionDetails.enginNode = e.enginClassification;
-        this.$refs.ConstructionDetails.open(dict, null, null, null, title)
+        this.zEngineeringNodeBo=e
+        this.$refs.ConstructionDetails.open(dict, null, null, null, title,this.zEngineeringNodeBo)
       })
     },
     viewNodeSource(e = null) {
@@ -1497,7 +1496,8 @@ export default {
           })
         }
         this.zEngineeringNodeBo = e
-        this.$refs.ConstructionDetails.open(dict, _, type, null, title)
+        console.log(this.zEngineeringNodeBo)
+        this.$refs.ConstructionDetails.open(dict, _, type, null, title,this.zEngineeringNodeBo)
         this.status = 'read-only'
       })
     },

+ 54 - 14
src/views/zdsz/house/index.vue

@@ -249,21 +249,44 @@
               width="50">
             </el-table-column>
               <el-table-column
-                prop="newPhone"
+                prop="phone"
                 label="联系方式"
                 width="180">
-              </el-table-column></el-table>
+              </el-table-column>
+              <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+                <template slot-scope="scope">
+                  <el-button
+                    size="mini"
+                    type="text"
+                    icon="el-icon-delete"
+                    @click="delPhone(scope.row)"
+                    v-hasPermi="['zdsz:engineeringMaterialsResets:remove']"
+                  >删除</el-button>
+                </template>
+              </el-table-column>
+            </el-table>
+
           </el-form-item>
             </el-col>
             <el-col :span="5">
-              <el-button type="success">新增</el-button>
+              <el-button type="success" @click="openPhone=true">新增</el-button>
             </el-col>
         </el-row>
       </el-form>
-      <div slot="footer" class="dialog-footer">
+      <div slot="footer" >
         <el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
         <el-button @click="cancel">取 消</el-button>
       </div>
+    </el-dialog  >
+    <el-dialog title="新增现主人电话" :visible.sync="openPhone" width="30%" append-to-body>
+      <el-input v-model="newphone">
+        <template slot="prepend">手机号:</template>
+      </el-input>
+      <span slot="footer" class="dialog-footer">
+
+    <el-button @click="openPhone = false">取 消</el-button>
+    <el-button type="primary" @click="addPhone">确 定</el-button>
+  </span>
     </el-dialog>
   </div>
 </template>
@@ -281,6 +304,7 @@ export default {
     return {
       // 按钮loading
       buttonLoading: false,
+      openPhone:false,
       // 遮罩层
       loading: true,
       // 选中数组
@@ -337,7 +361,8 @@ export default {
       areas: [],
       builds: [],
       units: [],
-      newPhone:[]
+      newPhone:[],
+      newphone:''
     };
   },
   created() {
@@ -345,6 +370,13 @@ export default {
     this.getAreas();
   },
   methods: {
+    addPhone()
+    {
+      // this.openPhone=true
+      this.newPhone.push({phone:this.newphone})
+      //this.submitForm()
+      this.openPhone=false
+    },
     /** 查询楼栋下拉 */
     getBuildings(id) {
       this.builds = []
@@ -444,7 +476,6 @@ export default {
       this.builds = []
       this.units = []
       this.resetForm("queryForm");
-
       this.handleQuery();
     },
     // 多选框选中数据
@@ -473,14 +504,11 @@ export default {
         })
         this.loading = false;
         this.form = response.data;
-        if(this.form.newPhone!=null)
-        {
-          let name=""
-             name=this.form.newPhone
-          console.log(name)
-          // this.form.newPhone.splice(',').forEach(item=>{
-          //   this.newPhone.push({phone:item})
-          // })
+        if(this.form.newPhone!=null&&this.form.newPhone!='')
+        {this.newPhone=[]
+          this.form.newPhone.split(',').forEach(item=>{
+            this.newPhone.push({phone:item})
+          })
         }
         this.open = true;
         this.title = "修改房间管理";
@@ -492,9 +520,17 @@ export default {
         if (valid) {
           this.buttonLoading = true;
           if (this.form.id != null) {
+            if (this.newPhone.length>0)
+            {
+              this.form.newPhone=this.newPhone.map(item=>item.phone).join(",")
+            }else
+            {
+              this.form.newPhone=""
+            }
             updateHouse(this.form).then(response => {
               this.$modal.msgSuccess("修改成功");
               this.open = false;
+              this.newPhone=[]
               this.getList();
             }).finally(() => {
               this.buttonLoading = false;
@@ -515,6 +551,10 @@ export default {
         }
       });
     },
+    delPhone(row)
+    {
+      this.newPhone.splice(this.newPhone.indexOf(row),1)
+    },
     /** 删除按钮操作 */
     handleDelete(row) {
       const ids = row.id || this.ids;