From 5ff7706376b694ab13468b8e885fef5ea5ee3c76 Mon Sep 17 00:00:00 2001 From: jun feng Date: Fri, 28 Jan 2022 00:50:43 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=BB=99=E8=B4=A2=E5=8A=A1=E6=9D=A1?= =?UTF-8?q?=E4=BC=A0=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + components/Globals/Globals.vue | 10 +++++++--- hooks/project/useGenerateWebviewParam.js | 17 +++++++++++++++++ plugins/p-finance-audit/p-finance-audit.vue | 16 +++++++++++++++- plugins/p-source-manage/p-source-manage.vue | 16 +++++++++++++++- store/project/getters.js | 5 +++++ 6 files changed, 60 insertions(+), 5 deletions(-) create mode 100644 hooks/project/useGenerateWebviewParam.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 5137e47..cc63342 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ - | 登录图标、日历页今日 | [7de419d](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/7de419d) - | 服务、插件缓存、导入选择服务列表、 | [cc8004b](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/cc8004b) - | 更新代码 | [392c8cc](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/392c8cc) + - | 工作台功能 | [b674733](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/b674733) - | 广告页、引导页 | [fe87d00](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/fe87d00) - | 广告页、引导页 | [1c89806](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/1c89806) - | 广告页、引导页改为组件 | [2be7903](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/2be7903) diff --git a/components/Globals/Globals.vue b/components/Globals/Globals.vue index 3f3d70e..b771b9c 100644 --- a/components/Globals/Globals.vue +++ b/components/Globals/Globals.vue @@ -14,7 +14,11 @@ - + @@ -26,7 +30,7 @@ :class="[`row-span-${plugin.row}`, `col-span-${plugin.col}`]" :task="item" :key="plugin.pluginTaskId" - :plugin-task-id="plugin.pluginTaskId" + :plugin-task-id="plugin.pluginTaskId" :business-plugin-id="plugin.businessPluginId" :plugin-id="plugin.pluginId" :param="plugin.param" @@ -80,7 +84,7 @@ function openCard() { // 跳转工作台 function toWorkbench() { uni.navigateTo({ - url: '/pages/workbench/workbench' + url: '/pages/workbench/workbench', }); } diff --git a/hooks/project/useGenerateWebviewParam.js b/hooks/project/useGenerateWebviewParam.js new file mode 100644 index 0000000..a8697c1 --- /dev/null +++ b/hooks/project/useGenerateWebviewParam.js @@ -0,0 +1,17 @@ +import { computed } from 'vue'; +import { useStore } from 'vuex'; + +export default function useGenerateWebviewParam() { + const store = useStore(); + console.log('store: ', store); + + const projectId = computed(() => store.getters['project/projectId']); + const token = computed(() => store.state.user.token); + const projectName = computed(() => store.getters['project/projectName']); + console.log('projectName: ', projectName); + return { + projectId: projectId.value, + token: token.value, + projectName: projectName.value, + }; +} diff --git a/plugins/p-finance-audit/p-finance-audit.vue b/plugins/p-finance-audit/p-finance-audit.vue index 6a8f726..e1e8150 100644 --- a/plugins/p-finance-audit/p-finance-audit.vue +++ b/plugins/p-finance-audit/p-finance-audit.vue @@ -6,9 +6,23 @@ diff --git a/store/project/getters.js b/store/project/getters.js index 39b22a7..d5ce747 100644 --- a/store/project/getters.js +++ b/store/project/getters.js @@ -6,6 +6,11 @@ const getters = { projectId({ project }) { return project.id; }, + + // 项目名称 + projectName({ project }) { + return project && project.name ? project.name : ''; + }, }; export default getters;