From efe4200181785dc5425259622b8007e44163750f Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 19 Mar 2022 19:29:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E5=8F=91=E7=8E=AF=E5=A2=83=E4=B8=8B?= =?UTF-8?q?=EF=BC=8C=E7=AE=A1=E7=90=86=E5=90=8E=E5=8F=B0=E6=AF=8F=E4=B8=AA?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E5=B1=95=E7=A4=BA=E5=AF=B9=E5=BA=94=E7=9A=84?= =?UTF-8?q?=E3=80=8A=E5=BC=80=E5=8F=91=E6=96=87=E6=A1=A3=E3=80=8B=E7=9A=84?= =?UTF-8?q?=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-ui-admin/.env.demo1024 | 6 +++++ yudao-ui-admin/.env.development | 3 +++ yudao-ui-admin/.env.production | 5 ++++ yudao-ui-admin/.env.staging | 6 +++++ .../src/components/DocAlert/index.vue | 25 +++++++++++++++++++ yudao-ui-admin/src/main.js | 2 ++ yudao-ui-admin/src/utils/ruoyi.js | 15 ++++++++++- .../src/views/bpm/definition/index.vue | 2 ++ yudao-ui-admin/src/views/bpm/form/index.vue | 1 + yudao-ui-admin/src/views/bpm/group/index.vue | 1 + yudao-ui-admin/src/views/bpm/model/index.vue | 1 + .../src/views/bpm/oa/leave/index.vue | 1 + .../src/views/bpm/processInstance/index.vue | 1 + yudao-ui-admin/src/views/bpm/task/done.vue | 1 + yudao-ui-admin/src/views/bpm/task/todo.vue | 1 + .../src/views/infra/codegen/index.vue | 1 + yudao-ui-admin/src/views/infra/file/index.vue | 2 +- .../src/views/infra/fileConfig/index.vue | 2 +- .../src/views/system/menu/index.vue | 1 + .../src/views/system/role/index.vue | 2 ++ .../src/views/system/tenant/index.vue | 2 +- .../src/views/system/tenantPackage/index.vue | 2 +- 22 files changed, 78 insertions(+), 5 deletions(-) create mode 100644 yudao-ui-admin/src/components/DocAlert/index.vue diff --git a/yudao-ui-admin/.env.demo1024 b/yudao-ui-admin/.env.demo1024 index d2897f1ea..21f48d031 100644 --- a/yudao-ui-admin/.env.demo1024 +++ b/yudao-ui-admin/.env.demo1024 @@ -13,3 +13,9 @@ VUE_APP_BASE_API = 'http://127.0.0.1:48080' PUBLIC_PATH = '/admin-ui/' # 二级部署路径 VUE_APP_APP_NAME ='/admin-ui/' + +# 多租户的开关 +VUE_APP_TENANT_ENABLE = true + +# 文档的开关 +VUE_APP_DOC_ENABLE = true diff --git a/yudao-ui-admin/.env.development b/yudao-ui-admin/.env.development index 7f6246a9e..e7841a631 100644 --- a/yudao-ui-admin/.env.development +++ b/yudao-ui-admin/.env.development @@ -13,3 +13,6 @@ VUE_CLI_BABEL_TRANSPILE_MODULES = true # 多租户的开关 VUE_APP_TENANT_ENABLE = true + +# 文档的开关 +VUE_APP_DOC_ENABLE = true diff --git a/yudao-ui-admin/.env.production b/yudao-ui-admin/.env.production index 535990c4a..377f92f1b 100644 --- a/yudao-ui-admin/.env.production +++ b/yudao-ui-admin/.env.production @@ -12,3 +12,8 @@ PUBLIC_PATH = 'http://my-pi.com:8888/yudao-admin/' # 二级部署路径 VUE_APP_APP_NAME ='yudao-admin' +# 多租户的开关 +VUE_APP_TENANT_ENABLE = true + +# 文档的开关 +VUE_APP_DOC_ENABLE = false diff --git a/yudao-ui-admin/.env.staging b/yudao-ui-admin/.env.staging index 7cb5fb84d..cb7b007b1 100644 --- a/yudao-ui-admin/.env.staging +++ b/yudao-ui-admin/.env.staging @@ -11,3 +11,9 @@ VUE_APP_BASE_API = 'http://api-dashboard.yudao.iocoder.cn' # 静态资源地址 PUBLIC_PATH = 'http://static.yudao.iocoder.cn/' + +# 多租户的开关 +VUE_APP_TENANT_ENABLE = true + +# 文档的开关 +VUE_APP_DOC_ENABLE = false diff --git a/yudao-ui-admin/src/components/DocAlert/index.vue b/yudao-ui-admin/src/components/DocAlert/index.vue new file mode 100644 index 000000000..541b8ed20 --- /dev/null +++ b/yudao-ui-admin/src/components/DocAlert/index.vue @@ -0,0 +1,25 @@ + + + + diff --git a/yudao-ui-admin/src/main.js b/yudao-ui-admin/src/main.js index a572d937c..8252a97b2 100644 --- a/yudao-ui-admin/src/main.js +++ b/yudao-ui-admin/src/main.js @@ -41,10 +41,12 @@ Vue.prototype.handleTree = handleTree // 全局组件挂载 Vue.component('DictTag', DictTag) +Vue.component('DocAlert', DocAlert) Vue.component('Pagination', Pagination) Vue.component('RightToolbar', RightToolbar) // 字典标签组件 import DictTag from '@/components/DictTag' +import DocAlert from '@/components/DocAlert' // 头部标签插件 import VueMeta from 'vue-meta' diff --git a/yudao-ui-admin/src/utils/ruoyi.js b/yudao-ui-admin/src/utils/ruoyi.js index 3dd996cee..dd7dcd19f 100644 --- a/yudao-ui-admin/src/utils/ruoyi.js +++ b/yudao-ui-admin/src/utils/ruoyi.js @@ -175,7 +175,7 @@ export function getNowDateTime(timeStr) { * 获得租户功能是否开启 */ export function getTenantEnable() { - console.log("enable: " + process.env.VUE_APP_TENANT_ENABLE) + // console.log("enable: " + process.env.VUE_APP_TENANT_ENABLE) if (process.env.VUE_APP_TENANT_ENABLE === "true") { return true; } @@ -184,3 +184,16 @@ export function getTenantEnable() { } return process.env.VUE_APP_TENANT_ENABLE || true; } + +/** + * 获得文档是否开启 + */ +export function getDocEnable() { + if (process.env.VUE_APP_DOC_ENABLE === "true") { + return true; + } + if (process.env.VUE_APP_DOC_ENABLE === "false") { + return false; + } + return process.env.VUE_APP_DOC_ENABLE || false; +} diff --git a/yudao-ui-admin/src/views/bpm/definition/index.vue b/yudao-ui-admin/src/views/bpm/definition/index.vue index 277047ee4..43f194234 100644 --- a/yudao-ui-admin/src/views/bpm/definition/index.vue +++ b/yudao-ui-admin/src/views/bpm/definition/index.vue @@ -1,5 +1,7 @@