Ver código fonte

下拉选择非必输时增加情况
修复bug车辆页面修改无法提交

Memory_LG 9 meses atrás
pai
commit
3aee7ac9ed

+ 9 - 1
data-ui/src/views/data/housingconstruction/car/index.vue

@@ -197,7 +197,7 @@
           </el-col>
           <el-col :span="12">
             <el-form-item label="绑定设备" prop="speed">
-              <el-select v-model="form.speed" filterable placeholder="请选择设备">
+              <el-select v-model="form.speed" filterable clearable placeholder="请选择设备">
                 <el-option
                   v-for="dict in equipmentList"
                   :key="dict.deviceid"
@@ -245,6 +245,7 @@ export default {
       loading: true,
       // 选中数组
       ids: [],
+      enterpriseId: null,
       // 非单个禁用
       single: true,
       // 非多个禁用
@@ -420,6 +421,8 @@ export default {
     // 多选框选中数据
     handleSelectionChange(selection) {
       this.ids = selection.map(item => item.id)
+      this.enterpriseId = selection.map(item => item.enterpriseId)[0]
+      console.log(this.enterpriseId)
       this.single = selection.length !== 1
       this.multiple = !selection.length
     },
@@ -438,6 +441,8 @@ export default {
         this.open = true;
         this.title = "修改车辆数据";
       });
+      const enterpriseId = row.enterpriseId || this.enterpriseId
+      this.onSelectChange(enterpriseId)
     },
     /** 提交按钮 */
     submitForm() {
@@ -446,12 +451,15 @@ export default {
           this.form.enterpriseName = this.enterprise.filter((item) => {
             return this.form.enterpriseId == item.id;
           })[0].enterpriseName;
+
           this.form.managerName = this.practitioner.filter((item) => {
             return this.form.managerId == item.id;
           })[0].staffName;
+
           this.form.driverName = this.sjList.filter((item) => {
             return this.form.driverId == item.id;
           })[0].staffName;
+
           if (this.form.escortId != null){
             this.form.escortName = this.psyList.filter((item) => {
               return this.form.escortId == item.id;

+ 1 - 1
data-ui/src/views/data/housingconstruction/practitioner/index.vue

@@ -179,7 +179,7 @@
           </el-col>
           <el-col :span="12">
             <el-form-item label="性别" prop="sex">
-              <el-select v-model="form.sex" placeholder="请选择性别" filterable>
+              <el-select v-model="form.sex" placeholder="请选择性别" filterable clearable>
                 <el-option
                   v-for="dict in dict.type.sys_user_sex"
                   :key="dict.value"