From f7e46e1e0ee53941dfbe5e92417550d3f1fd6171 Mon Sep 17 00:00:00 2001 From: elseif Date: Tue, 19 Mar 2024 19:50:05 +0800 Subject: [PATCH 1/4] =?UTF-8?q?fix:=20=E9=A6=96=E9=A1=B5=E5=88=B7=E6=96=B0?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components.d.ts | 3 +++ src/api/dictionary/index.ts | 3 +-- src/store/modules/dictonary.ts | 2 +- src/views/final/comp/Action.vue | 2 +- src/views/home/content/Content.vue | 2 +- src/views/task/content/Content.vue | 15 ++++++++++----- src/views/task/modal/BatchModal.vue | 2 +- src/views/worksheet/content/Content.vue | 12 +++++++++--- 8 files changed, 27 insertions(+), 14 deletions(-) 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() } From d65e7abf42d6f55efffec37c06d39694c19aa30a Mon Sep 17 00:00:00 2001 From: liushilong <2224574157@qq.com> Date: Tue, 19 Mar 2024 21:26:17 +0800 Subject: [PATCH 2/4] =?UTF-8?q?feat:=20=E4=BB=BB=E5=8A=A1=E5=AE=A1?= =?UTF-8?q?=E6=89=B9=E8=87=AA=E5=AE=9A=E4=B9=89=E5=88=97=E8=A1=A8=E5=AE=8C?= =?UTF-8?q?=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/task/aside/Aside.vue | 162 ++++++++++++++---- src/views/task/aside/ListItem.vue | 50 +++++- src/views/task/aside/TaskList.vue | 113 ++++++------ src/views/task/content/Content.vue | 1 - src/views/task/modal/CustomFieldModal.vue | 42 +++-- .../worksheet/modal/CustomFieldModal.vue | 17 +- 6 files changed, 275 insertions(+), 110 deletions(-) diff --git a/src/views/task/aside/Aside.vue b/src/views/task/aside/Aside.vue index 3065f7b..1753057 100644 --- a/src/views/task/aside/Aside.vue +++ b/src/views/task/aside/Aside.vue @@ -1,63 +1,124 @@ @@ -96,7 +182,7 @@ const inputHandler = debounce((word) => { display: flex; position: relative; flex-direction: column; - background: #FFF; + background: #fff; border: 1px solid rgb(239, 239, 245); border-radius: 3px; box-sizing: border-box; @@ -139,7 +225,7 @@ const inputHandler = debounce((word) => { background-color: #e8e8e8; } - &-collapse{ + &-collapse { width: 2px; height: 100%; background: #507afd; diff --git a/src/views/task/aside/ListItem.vue b/src/views/task/aside/ListItem.vue index cf73df8..bd0d1ee 100644 --- a/src/views/task/aside/ListItem.vue +++ b/src/views/task/aside/ListItem.vue @@ -13,16 +13,58 @@ const props = defineProps({ type: Object as PropType, required: true, }, + showFieldList: { + type: Array, + default: () => [], + }, }); const svgName = computed(() => { return props.selected ? "task-select" : "task"; }); + + diff --git a/src/views/task/aside/TaskList.vue b/src/views/task/aside/TaskList.vue index 1acb0b3..83028dd 100644 --- a/src/views/task/aside/TaskList.vue +++ b/src/views/task/aside/TaskList.vue @@ -1,102 +1,115 @@ +
+
+ {{ item.name }} +
+
([]); // 右侧显示列表 const onList = ref([]); +const fixList = ref([]); + const allCount = computed(() => { return `全部筛选(共${offList.value.length - 1}个)`; }); @@ -233,8 +235,8 @@ onMounted(async () => { * fix 是否默认 * checked 是否选中 */ - - let fixList = []; + const userFieldFixed = useList.userFieldFixed?.split(","); + const userFieldUnFixed = useList.userFieldUnFixed?.split(","); allList.map((v) => { let item = { name: v.fieldDesc, @@ -242,16 +244,16 @@ onMounted(async () => { fix: v.isrequired == 2, checked: v.isrequired == 2 || - Boolean(useList.userFieldFixed?.indexOf(v.name) > -1) || - Boolean(useList.userFieldUnFixed?.indexOf(v.name) > -1), + Boolean(userFieldFixed.find((v2) => v2 == v.name)) || + Boolean(userFieldUnFixed.find((v2) => v2 == v.name)), }; if (item.fix) { - fixList.push(item); + fixList.value.push(item); } else { offList.value.push(item); } }); - offList.value.unshift(...fixList); + offList.value.unshift(...fixList.value); useList.userFieldFixed?.split(",").map((v) => { let item = allList.find((v2) => v2.name == v); if (item) { @@ -264,6 +266,9 @@ onMounted(async () => { onList.value.push(item); } }); + if (!onList.value.length) { + onList.value.push(...fixList.value); + } }); From 7ed436a45418858d2d395493e0a6b7a5284875a3 Mon Sep 17 00:00:00 2001 From: liushilong <2224574157@qq.com> Date: Wed, 20 Mar 2024 00:09:27 +0800 Subject: [PATCH 3/4] =?UTF-8?q?feat:=20=E6=89=80=E6=9C=89=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E5=8A=A8=E6=80=81=E5=88=97=E5=AF=B9=E6=8E=A5?= =?UTF-8?q?=E5=AE=8C=E6=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/final/comp/CustomTabelModal.vue | 369 +++++--- src/views/final/content/Content.vue | 832 +++++++++++------- src/views/task/aside/TaskList.vue | 2 +- src/views/task/modal/CustomFieldModal.vue | 14 +- src/views/task/modal/CustomSettingModal.vue | 30 +- src/views/worksheet/aside/Aside.vue | 197 +++-- src/views/worksheet/aside/ListItem.vue | 48 +- src/views/worksheet/aside/WorkSheetList.vue | 118 +-- .../worksheet/modal/CustomFieldModal copy.vue | 486 ++++++++++ .../worksheet/modal/CustomFieldModal.vue | 37 +- 10 files changed, 1534 insertions(+), 599 deletions(-) create mode 100644 src/views/worksheet/modal/CustomFieldModal copy.vue diff --git a/src/views/final/comp/CustomTabelModal.vue b/src/views/final/comp/CustomTabelModal.vue index c0ed170..8ba3be8 100644 --- a/src/views/final/comp/CustomTabelModal.vue +++ b/src/views/final/comp/CustomTabelModal.vue @@ -1,29 +1,29 @@