|
|
@@ -41,17 +41,18 @@
|
|
|
<el-form-item
|
|
|
v-if="componentsType == 'person'"
|
|
|
label="片区负责人部门"
|
|
|
- prop="repairGroupId"
|
|
|
+ prop="areaPersonInChargeGroupId"
|
|
|
>
|
|
|
- <DeptSelect v-model="addForm.repairGroupId" @input="getwhbm" />
|
|
|
+ <DeptSelect v-model="addForm.areaPersonInChargeGroupId" @input="getwhbm" />
|
|
|
</el-form-item>
|
|
|
<el-form-item v-if="componentsType == 'person'" label="片区负责人">
|
|
|
- <el-select v-model="addForm.repairUserId" placeholder="请选择">
|
|
|
+ <el-select v-model="addForm.areaPersonInChargeUserId" placeholder="请选择">
|
|
|
<el-option
|
|
|
v-for="item in personList"
|
|
|
:key="item.id"
|
|
|
:label="item.name"
|
|
|
:value="item.id"
|
|
|
+ @click.native="personChange(item)"
|
|
|
>
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
@@ -83,12 +84,16 @@
|
|
|
fullscreen: false,
|
|
|
componentsType: '',
|
|
|
dialogVisible: false,
|
|
|
- addForm: {},
|
|
|
+ addForm: {
|
|
|
+ areaPersonInChargePhone:'',
|
|
|
+ areaPersonInChargeUserId:'',
|
|
|
+ areaPersonInChargeGroupId:'',
|
|
|
+ },
|
|
|
loading: false,
|
|
|
checkoutArr: [],
|
|
|
rules: {
|
|
|
id: [{ required: true, message: '请选择设备分类', trigger: 'blur' }],
|
|
|
- repairGroupId: [
|
|
|
+ areaPersonInChargeGroupId: [
|
|
|
{ required: true, message: '请选择片区负责人部门', trigger: 'blur' }
|
|
|
]
|
|
|
},
|
|
|
@@ -99,14 +104,21 @@
|
|
|
},
|
|
|
methods: {
|
|
|
async getwhbm() {
|
|
|
- if (!this.addForm.repairGroupId) return;
|
|
|
+ if (!this.addForm.areaPersonInChargeGroupId) return;
|
|
|
+
|
|
|
+ this.$set(this.addForm,'areaPersonInChargePhone','')
|
|
|
+ this.$set(this.addForm,'areaPersonInChargeUserId','')
|
|
|
let data = await getUserPage({
|
|
|
pageNum: 1,
|
|
|
size: 9999,
|
|
|
- groupId: this.addForm.repairGroupId
|
|
|
+ groupId: this.addForm.areaPersonInChargeGroupId
|
|
|
});
|
|
|
this.personList = data.list;
|
|
|
},
|
|
|
+ personChange(item) {
|
|
|
+ this.addForm.areaPersonInChargePhone=item.phone
|
|
|
+ console.log(item);
|
|
|
+ },
|
|
|
submit() {
|
|
|
this.$refs.form.validate(async (flag) => {
|
|
|
if (flag) {
|