diff --git a/components.d.ts b/components.d.ts index e5c3631..ef2a1b7 100644 --- a/components.d.ts +++ b/components.d.ts @@ -20,6 +20,7 @@ declare module 'vue' { NDialogProvider: typeof import('naive-ui')['NDialogProvider'] NDivider: typeof import('naive-ui')['NDivider'] NDropdown: typeof import('naive-ui')['NDropdown'] + NEmpty: typeof import('naive-ui')['NEmpty'] NForm: typeof import('naive-ui')['NForm'] NFormItem: typeof import('naive-ui')['NFormItem'] NGi: typeof import('naive-ui')['NGi'] @@ -38,6 +39,8 @@ declare module 'vue' { NSpace: typeof import('naive-ui')['NSpace'] NSpin: typeof import('naive-ui')['NSpin'] NSwitch: typeof import('naive-ui')['NSwitch'] + NTabPane: typeof import('naive-ui')['NTabPane'] + NTabs: typeof import('naive-ui')['NTabs'] NTag: typeof import('naive-ui')['NTag'] NTooltip: typeof import('naive-ui')['NTooltip'] NUpload: typeof import('naive-ui')['NUpload'] diff --git a/src/api/dictionary/index.ts b/src/api/dictionary/index.ts index a97ca0c..c283a0d 100644 --- a/src/api/dictionary/index.ts +++ b/src/api/dictionary/index.ts @@ -312,8 +312,7 @@ export async function getBackList() { method: 'get', }) - const list = res.data - return list + return res.data[0].distionaryList } /** diff --git a/src/store/modules/dictonary.ts b/src/store/modules/dictonary.ts index 5759f9d..a206445 100644 --- a/src/store/modules/dictonary.ts +++ b/src/store/modules/dictonary.ts @@ -216,7 +216,7 @@ export const useDictionaryStore = defineStore({ // 退回方式 async fetchBackList() { const list = await getBackList() - this.backList = generateOptions(list) + this.backList = generateOptions(list, 'codeno', 'name') return this.backList }, // 退回方式 diff --git a/src/views/final/comp/Action.vue b/src/views/final/comp/Action.vue index d01da7f..3adafdd 100644 --- a/src/views/final/comp/Action.vue +++ b/src/views/final/comp/Action.vue @@ -20,7 +20,7 @@ const actionConfig = { 3: [{ label: '查看', key: 'view' }], 4: [{ label: '查看', key: 'view' }], 2: [{ label: '通过', key: 'approval' }, { label: '不通过', key: 'reject' }], - 5: [{ label: '通过', key: 'approval' }, { label: '不通过', key: 'reject' }], + 5: [{ label: '查看', key: 'view' }], } const actions = computed(() => { diff --git a/src/views/home/content/Content.vue b/src/views/home/content/Content.vue index e8eb250..a6acb86 100644 --- a/src/views/home/content/Content.vue +++ b/src/views/home/content/Content.vue @@ -242,7 +242,7 @@ async function refreshHandler(filtersearchId?: any) { }, { distance: 10, canLoadMore: () => canloadMore }, ) - }, 500) + }, 300) }) } diff --git a/src/views/task/content/Content.vue b/src/views/task/content/Content.vue index 440d585..1b47d83 100644 --- a/src/views/task/content/Content.vue +++ b/src/views/task/content/Content.vue @@ -29,7 +29,7 @@ const CustomSettingModalRef = ref(null) const taskTableData = ref([]) const sortBy: PictureSortParam = { - orderbyname: 'desc', + orderbyname: 'asc', orderbyvalue: 'pictureResult', } @@ -268,6 +268,10 @@ watch( taskDetailPictureList.value = data totalCount.value = total } + else { + taskDetailPictureList.value.length = 0 + totalCount.value = 0 + } }, ) @@ -314,8 +318,9 @@ function previewHandler(event: MouseEvent) { function getPercent(pictureid: string) { const { ocpictureid, pictureresult } = taskDetailInfo.value - const index = ocpictureid.split(',').indexOf(String(pictureid)) - const results = pictureresult.split(',') + const splitId = ocpictureid || '' + const index = splitId.split(',').indexOf(String(pictureid)) + const results = (pictureresult || '').split(',') const percent = results[index] || '0' const val = Number.parseFloat(percent) return `${val}%` @@ -412,8 +417,8 @@ function getPercent(pictureid: string) { />
- - + +
{ watch(() => workStore.activeId, async (newValue, oldValue) => { const packageid = workStore.getActiveId - if (isEmpty(packageid)) + if (isEmpty(packageid)) { + listData.value.length = 0 + totalCount.value = 0 return + } const res = await getPackageTaskList(newValue, packagepagination) const { data } = res @@ -286,8 +289,11 @@ async function handleSelect(item: any) { const packageid = workStore.getActiveId - if (isEmpty(packageid)) + if (isEmpty(packageid)) { + listData.value.length = 0 + totalCount.value = 0 return + } refreshHandler() }