Преглед изворни кода

查询,选择部门,选择人员bug修复

CHINAMI-P698360\Administrator пре 3 месеци
родитељ
комит
b467877452

+ 1 - 1
src/business/platform/org/selector/employee.vue

@@ -234,7 +234,7 @@
           }
           const checked = this.checkbox[0]
           const cuser = this.listData.find(i => i.id === checked)
-          return this.$utils.isNotEmpty(checked) ? this.cacheData[checked] ? this.cacheData[checked][this.labelKey] ? this.cacheData[checked][this.labelKey] : '' : cuser.name : ''
+          return this.$utils.isNotEmpty(checked) ? this.cacheData[checked] ? this.cacheData[checked][this.labelKey] ? this.cacheData[checked][this.labelKey] : '' : cuser?.name||'' : ''
         }
       },
       selectedData() {

+ 8 - 11
src/business/platform/org/selector/index.vue

@@ -460,18 +460,15 @@ export default {
             this.showPopup = false
         },
         onConfirm(selectedData) {
-            if (this.$utils.isEmpty(selectedData)) {
-                this.$notify({
+            if (this.$utils.isEmpty(selectedData) || !this.multiple && this.$utils.isEmpty(selectedData[0])) {
+                if (this.$utils.isEmpty(this.selectedValue)) {
+                    this.$notify({
                     type: 'warning',
                     message: '请选择!'
-                })
-                return
-            }
-            if (!this.multiple && this.$utils.isEmpty(selectedData[0])) {
-                this.$notify({
-                    type: 'warning',
-                    message: '请选择!'
-                })
+                    })
+                } else {
+                    this.showPopup = false
+                }
                 return
             }
             this.showPopup = false
@@ -480,7 +477,7 @@ export default {
         },
         callbackData(selectedData) {
             this.emitInput(selectedData, this.type)
-            this.showPopup = false
+            //this.showPopup = false
         },
         emitInput(value, type) {
             if (this.store === 'bind') {

+ 1 - 1
src/business/platform/org/selector/position.vue

@@ -327,7 +327,7 @@ export default {
         page: 1,
         limit: 999999999
       }
-      this.listData = []
+      // this.listData = []
       this.finished = false
       this.resultType = 'init'
       // this.cacheData = []

+ 4 - 3
src/business/platform/org/selector/selector.vue

@@ -25,10 +25,10 @@
                 @click="changePath(index)"
               > -->
               <span v-if="index !== pathDataTmp.length-1" @click="changePath(data,index)">
-                {{ data[labelKey] }}
+                {{ data[labelKey] === '岗位树'?'部门树':data[labelKey] }}
               </span>
               <span v-else>
-                {{ data[labelKey] }}
+                {{ data[labelKey] === '岗位树'?'部门树':data[labelKey] }}
               </span>
               <!-- <span v-if="pathData.length>1&&pathData.length-1!==index" class="ibps-wingblank ibps-color-gary-5">/</span> -->
               <span v-if="pathData.length>0" class="ibps-wingblank ibps-color-gary-5">/</span>
@@ -47,7 +47,7 @@
         :max="multiple?0:1"
         @change="changeCheckbox"
       >
-        <van-cell-group>
+        <van-cell-group v-if="dataList && dataList.length > 0">
           <van-cell
             v-for="(data,index) in dataList"
             :key="data[idKey]+index"
@@ -79,6 +79,7 @@
             </span>
           </van-cell>
         </van-cell-group>
+        <van-empty v-else description="暂无数据" />
       </van-checkbox-group>
     </van-popup>
     <!--点击明细 -->

+ 1 - 0
src/views/platform/data/template-list.vue

@@ -1345,6 +1345,7 @@ export default {
     },
     buildQuerycolumns(queryColumns) {
       this.searchForms.forms = []
+      this.search = ''
       if (this.$utils.isEmpty(queryColumns)) {
         return
       }