From 6105cf0dd72aa76787b2d06e55c45759b9028745 Mon Sep 17 00:00:00 2001 From: panqihua Date: Wed, 18 Jan 2023 18:35:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E5=8E=82=E5=95=86=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E3=80=81=E7=BB=8F=E9=94=80=E5=95=86=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E3=80=81=E9=97=A8=E5=BA=97=E7=AE=A1=E7=90=86=E5=85=AC=E5=85=B1?= =?UTF-8?q?=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/plugins/index.js | 25 ++-- src/plugins/platform.js | 29 +++++ src/views/platform/manufacturer/base.vue | 113 +++++++++++++----- src/views/platform/manufacturer/detail.vue | 33 ++--- .../platform/manufacturer/detail_table.vue | 56 ++++++--- src/views/platform/manufacturer/index.vue | 81 ++++++++----- src/views/system/user/profile/baseForm.vue | 2 +- src/views/system/user/profile/userAvatar.vue | 16 ++- 8 files changed, 246 insertions(+), 109 deletions(-) create mode 100644 src/plugins/platform.js diff --git a/src/plugins/index.js b/src/plugins/index.js index d000f2d..373de48 100644 --- a/src/plugins/index.js +++ b/src/plugins/index.js @@ -1,20 +1,21 @@ -import tab from './tab' -import auth from './auth' -import cache from './cache' -import modal from './modal' -import download from './download' +import tab from "./tab"; +import auth from "./auth"; +import cache from "./cache"; +import modal from "./modal"; +import download from "./download"; +import "./platform"; export default { install(Vue) { // 页签操作 - Vue.prototype.$tab = tab + Vue.prototype.$tab = tab; // 认证对象 - Vue.prototype.$auth = auth + Vue.prototype.$auth = auth; // 缓存对象 - Vue.prototype.$cache = cache + Vue.prototype.$cache = cache; // 模态框对象 - Vue.prototype.$modal = modal + Vue.prototype.$modal = modal; // 下载文件 - Vue.prototype.$download = download - } -} + Vue.prototype.$download = download; + }, +}; diff --git a/src/plugins/platform.js b/src/plugins/platform.js new file mode 100644 index 0000000..4c4581b --- /dev/null +++ b/src/plugins/platform.js @@ -0,0 +1,29 @@ +import router from "@/router"; + +function meta(to, type, desc) { + to.meta.manufacturer = { + name: to.fullPath.split("/").at(1), + //1:厂商管理,2:经销商管理,3:门店管理 + type, + //1:厂商/经销商/商店列表,2:审核 + subType: to.fullPath.split("/").at(-1), + desc, + }; +} + +router.beforeEach((to, from, next) => { + switch (to.fullPath.split("/").at(1)) { + case "manufacturer": + meta(to, "1", "厂商"); + break; + case "dealer": + meta(to, "2", "经销商"); + break; + case "store": + meta(to, "3", "门店"); + break; + } + + // your logic + next(); +}); diff --git a/src/views/platform/manufacturer/base.vue b/src/views/platform/manufacturer/base.vue index 36c2232..345b371 100644 --- a/src/views/platform/manufacturer/base.vue +++ b/src/views/platform/manufacturer/base.vue @@ -6,10 +6,10 @@
- + - +
@@ -19,10 +19,11 @@ - + - + @@ -32,7 +33,7 @@ range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期">
- + @@ -56,35 +57,70 @@ }}
- - -