Browse Source

fix - 区域电梯配置区域国家不联动

jinyw 1 month ago
parent
commit
c86adc9610
1 changed files with 16 additions and 14 deletions
  1. 16 14
      ruoyi-ui-vue2/src/views/crmManagement/elevatorModel/index.vue

+ 16 - 14
ruoyi-ui-vue2/src/views/crmManagement/elevatorModel/index.vue

@@ -128,8 +128,7 @@
             <el-form-item :label="$t('elevatorModel.areaName')" prop="areaId">
             <el-form-item :label="$t('elevatorModel.areaName')" prop="areaId">
               <treeselect v-model="form.areaId" :flat="true" :options="areaTree"
               <treeselect v-model="form.areaId" :flat="true" :options="areaTree"
                 :noResultsText="$t('common.noResultsText')" :placeholder="$t('user.placeholder_area')"
                 :noResultsText="$t('common.noResultsText')" :placeholder="$t('user.placeholder_area')"
-                :show-count="true" :append-to-body="true" :zIndex="999999" @select="parentAreaChange"
-                @unselect="parentAreaChange" />
+                :show-count="true" :append-to-body="true" :zIndex="999999"/>
             </el-form-item>
             </el-form-item>
           </el-col>
           </el-col>
           <el-col :span="12">
           <el-col :span="12">
@@ -804,6 +803,8 @@ export default {
       this.reset();
       this.reset();
       this.open = true;
       this.open = true;
       this.title = this.$t('paraLibrary.addParameter');
       this.title = this.$t('paraLibrary.addParameter');
+      this.getNationList()
+
     },
     },
     /** 修改按钮操作 */
     /** 修改按钮操作 */
     async handleUpdate(row) {
     async handleUpdate(row) {
@@ -822,6 +823,7 @@ export default {
       this.targetsList = response.data.targetUsers || []
       this.targetsList = response.data.targetUsers || []
       this.open = true;
       this.open = true;
       this.title = this.$t('paraLibrary.editParameter');
       this.title = this.$t('paraLibrary.editParameter');
+      this.getNationList()
     },
     },
     /** 提交按钮 */
     /** 提交按钮 */
     submitForm() {
     submitForm() {
@@ -1180,18 +1182,18 @@ export default {
         xpData: []
         xpData: []
       }
       }
     },
     },
-    // 上级区域变化
-    parentAreaChange({ id: areaId }) {
-      this.$set(this.form, 'countryIds', [])
-      if (areaId) {
-        // 查询上级区域拥有的国家
-        this.getCountryByAreaId(areaId);
-      } else if (areaId === 0) {
-        this.getNationList()
-      } else {
-        this.nationList = []
-      }
-    },
+    // // 上级区域变化
+    // parentAreaChange({ id: areaId }) {
+    //   this.$set(this.form, 'countryIds', [])
+    //   if (areaId) {
+    //     // 查询上级区域拥有的国家
+    //     this.getCountryByAreaId(areaId);
+    //   } else if (areaId === 0) {
+    //     this.getNationList()
+    //   } else {
+    //     this.nationList = []
+    //   }
+    // },
     getNationList() {
     getNationList() {
       getAllNationList().then(response => {
       getAllNationList().then(response => {
         this.nationList = this.formatCountry(response.data)
         this.nationList = this.formatCountry(response.data)