Explorar el Código

职位管理不能全选bug修复,切换页签添加加载中字样

lifanagju_citu hace 7 meses
padre
commit
58e0706c00

+ 5 - 0
src/views/recruit/enterprise/hirePosition/index.vue

@@ -19,6 +19,7 @@
           </v-window-item>
         </v-window>
         <Empty v-if="!items.length" :message="tipsText" :elevation="false"></Empty>
+        <Empty v-if="!items.length" :message="loading ? '加载中...' : tipsText" :elevation="false"></Empty>
         <CtPagination
           v-else
           :total="total"
@@ -92,8 +93,11 @@ const handleExport = async () => {
 }
 
 
+const loading = ref(false)
 // 获取职位列表
 const getPositionList = async () => {
+  items.value = []; total.value = 0
+  loading.value = true
   if (tab.value !== 3) {
     query.value.status = tabList[tab.value].status
     query.value.hasExpiredData = false
@@ -107,6 +111,7 @@ const getPositionList = async () => {
   }
   total.value = number
   items.value = list.length ? dealDictArrayData([], list) : []
+  loading.value = false
 }
 getPositionList()
 

+ 5 - 7
src/views/recruit/enterprise/positionManagement/components/item.vue

@@ -33,13 +33,11 @@
           </div>
         </div>
         <div class="d-flex align-center">
-          <v-tooltip text="刷新职位后,发布时间为最新的">
-            <template v-slot:activator="{ props }">
-              <v-btn v-if="tab === 1" class="ml-3" v-bind="props" color="primary" @click="handleAction(2, '', val)" append-icon="mdi-help-circle-outline">
-                {{ $t('common.refresh') + $t('common.position') }}
-              </v-btn>
-            </template>
-          </v-tooltip>
+          <v-btn v-if="tab === 1" class="ml-3" color="primary" @click="handleAction(2, '', val)">
+            <span>{{ $t('common.refresh') + $t('common.position') }}</span>
+            <v-icon class="ml-2">mdi-help-circle-outline</v-icon>
+            <v-tooltip activator="parent" location="top">刷新职位后,发布时间为最新的</v-tooltip>
+          </v-btn>
           <v-btn v-if="tab === 2" color="primary" @click="handleAction(1, '', val)">{{ $t('common.activatePosition') }}</v-btn>
         </div>
       </div>

+ 5 - 1
src/views/recruit/enterprise/positionManagement/index.vue

@@ -18,7 +18,7 @@
             <PositionItem v-if="items.length" :tab="val.value" :items="items" @refresh="getPositionList"></PositionItem>
           </v-window-item>
         </v-window>
-        <Empty v-if="!items.length" :message="tipsText" :elevation="false"></Empty>
+        <Empty v-if="!items.length" :message="loading ? '加载中...' : tipsText" :elevation="false"></Empty>
         <CtPagination
           v-else
           :total="total"
@@ -93,8 +93,11 @@ const handleExport = async () => {
 }
 
 
+const loading = ref(false)
 // 获取职位列表
 const getPositionList = async () => {
+  items.value = []; total.value = 0
+  loading.value = true
   if (tab.value !== 3) {
     query.value.status = tab.value === 1 ? 0 : (tab.value === 2 ? 1 : null)
     query.value.hasExpiredData = false
@@ -108,6 +111,7 @@ const getPositionList = async () => {
   }
   total.value = number
   items.value = list.length ? dealDictArrayData([], list) : []
+  loading.value = false
 }
 getPositionList()