From e7583718aadd3eafdb41c741d89679a422628458 Mon Sep 17 00:00:00 2001 From: xuesinan <1404152492@qq.com> Date: Wed, 7 Dec 2022 15:09:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=93=E5=8D=A1=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apis/plugin.js | 3 + common/styles/tailwind.scss | 12 +++ hooks/project/useGetTasks.js | 10 ++- pages/detail/detail.vue | 8 +- plugins/p-check-work/detail.vue | 33 +++++-- plugins/p-salary/detail.vue | 151 ++++++++++++++++++++++++++++++++ plugins/p-salary/p-salary.vue | 8 +- 7 files changed, 213 insertions(+), 12 deletions(-) create mode 100644 plugins/p-salary/detail.vue diff --git a/apis/plugin.js b/apis/plugin.js index 3c97571..0c65c0c 100644 --- a/apis/plugin.js +++ b/apis/plugin.js @@ -50,4 +50,7 @@ export function setupPlugin(app) { // 审核 uni.$u.api.clockAudit = (params, url) => uni.$u.post(`${url ? url : domain.value}/clock/audit`, params); + + // 导出 + uni.$u.api.clockExport = (params, url) => uni.$u.post(`${url ? url : domain.value}/clock/export`, params); } diff --git a/common/styles/tailwind.scss b/common/styles/tailwind.scss index 302cc93..9908871 100644 --- a/common/styles/tailwind.scss +++ b/common/styles/tailwind.scss @@ -14,6 +14,10 @@ position: relative; } +.bottom-0 { + bottom: 0; +} + .z-10 { z-index: 10; } @@ -4680,4 +4684,12 @@ .line-through { text-decoration: line-through; +} + +.h-48 { + height: 48px; +} + +.h-50 { + height: 50px; } \ No newline at end of file diff --git a/hooks/project/useGetTasks.js b/hooks/project/useGetTasks.js index 618561d..23711b9 100644 --- a/hooks/project/useGetTasks.js +++ b/hooks/project/useGetTasks.js @@ -103,9 +103,13 @@ export default function useGetTasks() { // 将真实任务存储到allTasks中对应的角色下 const arr = [...allTasks.value]; - arr[roleIndex.value].realTasks = [...realTasks.value]; - arr[roleIndex.value].upNextPage = upNextPage.value; // 存储下一页(向上) - arr[roleIndex.value].downNextPage = downNextPage.value; // 存储下一页(向下) + + if (arr[roleIndex.value]) { + arr[roleIndex.value].realTasks = [...realTasks.value]; + arr[roleIndex.value].upNextPage = upNextPage.value; // 存储下一页(向上) + arr[roleIndex.value].downNextPage = downNextPage.value; // 存储下一页(向下) + } + store.commit('task/setAllTasks', arr); // 数据处理 diff --git a/pages/detail/detail.vue b/pages/detail/detail.vue index 1ec0820..01e8ea8 100644 --- a/pages/detail/detail.vue +++ b/pages/detail/detail.vue @@ -1,11 +1,15 @@ diff --git a/plugins/p-salary/detail.vue b/plugins/p-salary/detail.vue new file mode 100644 index 0000000..8b38496 --- /dev/null +++ b/plugins/p-salary/detail.vue @@ -0,0 +1,151 @@ + + + + + diff --git a/plugins/p-salary/p-salary.vue b/plugins/p-salary/p-salary.vue index d7955bc..4279325 100644 --- a/plugins/p-salary/p-salary.vue +++ b/plugins/p-salary/p-salary.vue @@ -25,7 +25,13 @@ return currMonth === 1 ? 12 : currMonth - 1; }); - function toLink() { + function toLink() { + // uni.$storage.setStorageSync('pluginKey', 'salary'); + + // uni.navigateTo({ + // url: "/pages/detail/detail" + // }) + const url = "http://101.201.226.163/tallsalary/"; const params = { pid: projectId.value,