fix: 首页刷新失败

bak
elseif 1 year ago
parent 7535771c45
commit f7e46e1e0e

3
components.d.ts vendored

@ -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']

@ -312,8 +312,7 @@ export async function getBackList() {
method: 'get',
})
const list = res.data
return list
return res.data[0].distionaryList
}
/**

@ -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
},
// 退回方式

@ -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(() => {

@ -242,7 +242,7 @@ async function refreshHandler(filtersearchId?: any) {
},
{ distance: 10, canLoadMore: () => canloadMore },
)
}, 500)
}, 300)
})
}

@ -29,7 +29,7 @@ const CustomSettingModalRef = ref(null)
const taskTableData = ref<any[]>([])
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) {
/>
</div>
<div class="status">
<SvgIcon v-show="taskDetailInfo?.states === 4" width="134" height="129" name="p1" />
<SvgIcon v-show="taskDetailInfo?.states === 3" width="134" height="129" name="p2" />
<SvgIcon v-show="taskDetailInfo?.userapprove?.statshis === 3" width="134" height="129" name="p1" />
<SvgIcon v-show="taskDetailInfo?.userapprove?.statshis === 2" width="134" height="129" name="p2" />
</div>
<div class="mark">
<SvgIcon

@ -54,7 +54,7 @@ const loading = ref(false)
let _masonry: null | Masonry = null
const show = ref(false)
const sortBy: PictureSortParam = {
orderbyname: 'desc',
orderbyname: 'asc',
orderbyvalue: 'fromuptime',
}
const batch = ref(false)

@ -51,7 +51,7 @@ const taskpagination = reactive({
pageSize: 10,
})
const sortBy: PictureSortParam = {
orderbyname: 'desc',
orderbyname: 'asc',
orderbyvalue: 'pictureResult',
}
const workStore = useWorkOrder()
@ -264,8 +264,11 @@ onUpdated(() => {
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()
}

Loading…
Cancel
Save