|
@@ -249,21 +249,44 @@
|
|
width="50">
|
|
width="50">
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
- prop="newPhone"
|
|
|
|
|
|
+ prop="phone"
|
|
label="联系方式"
|
|
label="联系方式"
|
|
width="180">
|
|
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-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="5">
|
|
<el-col :span="5">
|
|
- <el-button type="success">新增</el-button>
|
|
|
|
|
|
+ <el-button type="success" @click="openPhone=true">新增</el-button>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
</el-form>
|
|
</el-form>
|
|
- <div slot="footer" class="dialog-footer">
|
|
|
|
|
|
+ <div slot="footer" >
|
|
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
|
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
|
<el-button @click="cancel">取 消</el-button>
|
|
<el-button @click="cancel">取 消</el-button>
|
|
</div>
|
|
</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>
|
|
</el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -281,6 +304,7 @@ export default {
|
|
return {
|
|
return {
|
|
// 按钮loading
|
|
// 按钮loading
|
|
buttonLoading: false,
|
|
buttonLoading: false,
|
|
|
|
+ openPhone:false,
|
|
// 遮罩层
|
|
// 遮罩层
|
|
loading: true,
|
|
loading: true,
|
|
// 选中数组
|
|
// 选中数组
|
|
@@ -337,7 +361,8 @@ export default {
|
|
areas: [],
|
|
areas: [],
|
|
builds: [],
|
|
builds: [],
|
|
units: [],
|
|
units: [],
|
|
- newPhone:[]
|
|
|
|
|
|
+ newPhone:[],
|
|
|
|
+ newphone:''
|
|
};
|
|
};
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
@@ -345,6 +370,13 @@ export default {
|
|
this.getAreas();
|
|
this.getAreas();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ addPhone()
|
|
|
|
+ {
|
|
|
|
+ // this.openPhone=true
|
|
|
|
+ this.newPhone.push({phone:this.newphone})
|
|
|
|
+ //this.submitForm()
|
|
|
|
+ this.openPhone=false
|
|
|
|
+ },
|
|
/** 查询楼栋下拉 */
|
|
/** 查询楼栋下拉 */
|
|
getBuildings(id) {
|
|
getBuildings(id) {
|
|
this.builds = []
|
|
this.builds = []
|
|
@@ -444,7 +476,6 @@ export default {
|
|
this.builds = []
|
|
this.builds = []
|
|
this.units = []
|
|
this.units = []
|
|
this.resetForm("queryForm");
|
|
this.resetForm("queryForm");
|
|
-
|
|
|
|
this.handleQuery();
|
|
this.handleQuery();
|
|
},
|
|
},
|
|
// 多选框选中数据
|
|
// 多选框选中数据
|
|
@@ -473,14 +504,11 @@ export default {
|
|
})
|
|
})
|
|
this.loading = false;
|
|
this.loading = false;
|
|
this.form = response.data;
|
|
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.open = true;
|
|
this.title = "修改房间管理";
|
|
this.title = "修改房间管理";
|
|
@@ -492,9 +520,17 @@ export default {
|
|
if (valid) {
|
|
if (valid) {
|
|
this.buttonLoading = true;
|
|
this.buttonLoading = true;
|
|
if (this.form.id != null) {
|
|
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 => {
|
|
updateHouse(this.form).then(response => {
|
|
this.$modal.msgSuccess("修改成功");
|
|
this.$modal.msgSuccess("修改成功");
|
|
this.open = false;
|
|
this.open = false;
|
|
|
|
+ this.newPhone=[]
|
|
this.getList();
|
|
this.getList();
|
|
}).finally(() => {
|
|
}).finally(() => {
|
|
this.buttonLoading = false;
|
|
this.buttonLoading = false;
|
|
@@ -515,6 +551,10 @@ export default {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ delPhone(row)
|
|
|
|
+ {
|
|
|
|
+ this.newPhone.splice(this.newPhone.indexOf(row),1)
|
|
|
|
+ },
|
|
/** 删除按钮操作 */
|
|
/** 删除按钮操作 */
|
|
handleDelete(row) {
|
|
handleDelete(row) {
|
|
const ids = row.id || this.ids;
|
|
const ids = row.id || this.ids;
|