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 @@