瀏覽代碼

片区负责人

yusheng 1 年之前
父節點
當前提交
353b897eba
共有 1 個文件被更改,包括 19 次插入7 次删除
  1. 19 7
      src/views/ledgerAssets/equipment/components/DialogMoveTo.vue

+ 19 - 7
src/views/ledgerAssets/equipment/components/DialogMoveTo.vue

@@ -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) {