From ce7cac0d4fda48d65a8aaaf0b68036db33e526f2 Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Tue, 26 Nov 2024 14:05:19 +0800 Subject: [PATCH 1/3] =?UTF-8?q?feat(=E7=B3=BB=E7=BB=9F=E8=AE=BE=E7=BD=AE):?= =?UTF-8?q?=20=E7=B3=BB=E7=BB=9F=E5=8F=82=E6=95=B0=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core-frontend/src/locales/en.ts | 1 + core/core-frontend/src/locales/tw.ts | 13 +++-- core/core-frontend/src/locales/zh-CN.ts | 13 +++-- .../src/views/system/common/InfoTemplate.vue | 2 + .../system/parameter/basic/BasicEdit.vue | 22 ++++++-- .../system/parameter/basic/BasicInfo.vue | 55 +++++++++++++++---- .../src/views/system/parameter/index.vue | 8 ++- 7 files changed, 87 insertions(+), 27 deletions(-) diff --git a/core/core-frontend/src/locales/en.ts b/core/core-frontend/src/locales/en.ts index 2d0497b0f8..bb75213b35 100644 --- a/core/core-frontend/src/locales/en.ts +++ b/core/core-frontend/src/locales/en.ts @@ -3376,6 +3376,7 @@ Scatter chart (bubble) chart: {a} (series name), {b} (data name), {c} (value arr empty_desc: 'Please enter information on the left and save' }, setting_basic: { + third_platform_settings: 'Third-party platform settings', autoCreateUser: 'Third party automatically creates users', dsIntervalTime: 'Data source detection time interval', dsExecuteTime: 'Data source detection frequency', diff --git a/core/core-frontend/src/locales/tw.ts b/core/core-frontend/src/locales/tw.ts index 4ad52b455e..f8de51bbbb 100644 --- a/core/core-frontend/src/locales/tw.ts +++ b/core/core-frontend/src/locales/tw.ts @@ -3290,13 +3290,14 @@ export default { empty_desc: '請在左側輸入訊息然後儲存' }, setting_basic: { + third_platform_settings: '第三方平台設置', autoCreateUser: '第三方自動建立使用者', dsIntervalTime: '資料來源偵測時間間隔', dsExecuteTime: '資料來源偵測頻率', - frontTimeOut: '請求超時時間(秒)', - logLiveTime: '操作日誌保留時間(天)', - thresholdLogLiveTime: '閾值警告記錄保留時間(天)', - exportFileLiveTime: '後台匯出檔案保留時間(天)', + frontTimeOut: '請求超時時間 (秒)', + logLiveTime: '操作日誌保留時間 (天)', + thresholdLogLiveTime: '閾值警告記錄保留時間 (天)', + exportFileLiveTime: '後台匯出檔案保留時間 (天)', platformOid: '第三方平台使用者組織', platformRid: '第三方平台使用者角色', pwdStrategy: '開啟密碼策略', @@ -3308,8 +3309,8 @@ export default { defaultSort: '資源預設排序方式', defaultOpen: '頁面開啟方式', loginLimit: '限制登入', - loginLimitRate: '限制登入失敗次數(次)', - loginLimitTime: '限制登入失敗時間(分)' + loginLimitRate: '限制登入失敗次數 (次)', + loginLimitTime: '限制登入失敗時間 (分)' }, resource_sort: { time_asc: '按建立時間升序', diff --git a/core/core-frontend/src/locales/zh-CN.ts b/core/core-frontend/src/locales/zh-CN.ts index 14a99cc653..13b331bbff 100644 --- a/core/core-frontend/src/locales/zh-CN.ts +++ b/core/core-frontend/src/locales/zh-CN.ts @@ -3292,13 +3292,14 @@ export default { empty_desc: '请在左侧输入信息然后保存' }, setting_basic: { + third_platform_settings: '第三方平台设置', autoCreateUser: '第三方自动创建用户', dsIntervalTime: '数据源检测时间间隔', dsExecuteTime: '数据源检测频率', - frontTimeOut: '请求超时时间(秒)', - logLiveTime: '操作日志保留时间(天)', - thresholdLogLiveTime: '阈值告警记录保留时间(天)', - exportFileLiveTime: '后台导出文件保留时间(天)', + frontTimeOut: '请求超时时间 (秒)', + logLiveTime: '操作日志保留时间 (天)', + thresholdLogLiveTime: '阈值告警记录保留时间 (天)', + exportFileLiveTime: '后台导出文件保留时间 (天)', platformOid: '第三方平台用户组织', platformRid: '第三方平台用户角色', pwdStrategy: '开启密码策略', @@ -3310,8 +3311,8 @@ export default { defaultSort: '资源默认排序方式', defaultOpen: '页面打开方式', loginLimit: '限制登录', - loginLimitRate: '限制登录失败次数(次)', - loginLimitTime: '限制登录失败时间(分)' + loginLimitRate: '限制登录失败次数 (次)', + loginLimitTime: '限制登录失败时间 (分)' }, resource_sort: { time_asc: '按创建时间升序', diff --git a/core/core-frontend/src/views/system/common/InfoTemplate.vue b/core/core-frontend/src/views/system/common/InfoTemplate.vue index f0e4c81d5a..18b7787dfc 100644 --- a/core/core-frontend/src/views/system/common/InfoTemplate.vue +++ b/core/core-frontend/src/views/system/common/InfoTemplate.vue @@ -223,6 +223,8 @@ formatLabel() } .info-template-container { padding: 24px 24px 0; + background: var(--ContentBG, #ffffff); + border-radius: 4px; .info-template-header { display: flex; margin-top: -4px; diff --git a/core/core-frontend/src/views/system/parameter/basic/BasicEdit.vue b/core/core-frontend/src/views/system/parameter/basic/BasicEdit.vue index 3b7bae9372..eb9706f911 100644 --- a/core/core-frontend/src/views/system/parameter/basic/BasicEdit.vue +++ b/core/core-frontend/src/views/system/parameter/basic/BasicEdit.vue @@ -113,6 +113,7 @@ const submitForm = async (formEl: FormInstance | undefined) => { const resetForm = (formEl: FormInstance | undefined) => { state.settingList = [] + settingList.value = [] if (!formEl) return formEl.resetFields() dialogVisible.value = false @@ -128,8 +129,19 @@ const showLoading = () => { const closeLoading = () => { loadingInstance.value?.close() } - -const edit = (list, orgOptions, roleOptions, loginOptions, sortOptions, openOptions) => { +const title = ref() +const settingList = ref([]) +const edit = ( + list, + orgOptions, + roleOptions, + loginOptions, + sortOptions, + openOptions, + titleVal, + settingListVal +) => { + title.value = titleVal state.orgOptions = orgOptions || [] state.roleOptions = roleOptions || [] state.loginOptions = loginOptions || [] @@ -185,6 +197,8 @@ const edit = (list, orgOptions, roleOptions, loginOptions, sortOptions, openOpti state.form[item['pkey']] = pval || state.form[item['pkey']] return item }) + + settingList.value = state.settingList.filter(ele => settingListVal.includes(ele.pkey)) dialogVisible.value = true } const loadRoleOptions = async () => { @@ -222,7 +236,7 @@ defineExpose({ @@ -32,6 +57,7 @@ const { t } = useI18n() const editor = ref() const infoTemplate = ref() const loginTemplate = ref() +const thirdTemplate = ref() const showDefaultLogin = ref(false) const pvpOptions = [ { value: '0', label: t('commons.date.permanent') }, @@ -66,6 +92,12 @@ const loginSettings = [ 'setting_basic.loginLimitRate', 'setting_basic.loginLimitTime' ] + +const thirdSettings = [ + 'setting_basic.autoCreateUser', + 'setting_basic.platformOid', + 'setting_basic.platformRid' +] const state = reactive({ templateList: [] as SettingRecord[], orgOptions: [], @@ -109,11 +141,14 @@ const selectedRName = ref([]) const selectedPvp = ref('0') const baseInfoSettings = computed(() => - state.templateList.filter(item => !loginSettings.includes(item.pkey)) + state.templateList.filter(item => !loginSettings.concat(thirdSettings).includes(item.pkey)) +) + +const thirdInfoSettings = computed(() => + state.templateList.filter(item => thirdSettings.includes(item.pkey)) ) const loginInoSettings = computed(() => { const list = state.templateList.filter(item => loginSettings.includes(item.pkey)) - console.log(list) return list }) @@ -212,19 +247,22 @@ const refresh = () => { nextTick(() => { infoTemplate?.value.init() loginTemplate?.value.init() + thirdTemplate?.value.init() }) }) } refresh() -const edit = () => { +const edit = (val, arr) => { editor?.value.edit( cloneDeep(originData), cloneDeep(state.orgOptions), cloneDeep(state.roleOptions), cloneDeep(state.loginOptions), cloneDeep(state.sortOptions), - cloneDeep(state.openOptions) + cloneDeep(state.openOptions), + val, + arr ) } const loadOrgOptions = async () => { @@ -311,9 +349,6 @@ const resetDefaultLogin = () => { diff --git a/core/core-frontend/src/views/system/parameter/index.vue b/core/core-frontend/src/views/system/parameter/index.vue index 3310b521d7..bd1eb188fe 100644 --- a/core/core-frontend/src/views/system/parameter/index.vue +++ b/core/core-frontend/src/views/system/parameter/index.vue @@ -4,7 +4,10 @@
-
+
@@ -64,6 +67,9 @@ const addTable = tab => { overflow-y: auto; background: var(--ContentBG, #ffffff); border-radius: 4px; + &.basic-info_bg { + background: none; + } } .setting-max-h { height: 100% !important; From a254cffade385983a87aa2a24d36cc4767c19ab2 Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Tue, 26 Nov 2024 14:15:42 +0800 Subject: [PATCH 2/3] =?UTF-8?q?fix(=E5=B5=8C=E5=85=A5=E5=BC=8F):=20?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E8=87=AA=E5=AE=9A=E4=B9=89=E5=AD=97=E4=BD=93?= =?UTF-8?q?=EF=BC=8C=E5=9C=A8=E6=B7=BB=E5=8A=A0=E4=BA=86=20content-path=20?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E7=9A=84=E6=83=85=E5=86=B5=E4=B8=8B=EF=BC=8C?= =?UTF-8?q?div=20=E5=B5=8C=E5=85=A5=E6=95=B0=E6=8D=AE=E5=A4=A7=E5=B1=8F?= =?UTF-8?q?=E4=BC=9A=E6=8F=90=E7=A4=BA=E5=AD=97=E4=BD=93=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E4=B8=8D=E5=88=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core-frontend/src/store/modules/appearance.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/core-frontend/src/store/modules/appearance.ts b/core/core-frontend/src/store/modules/appearance.ts index c8eebf32e9..6a2ad21b0c 100644 --- a/core/core-frontend/src/store/modules/appearance.ts +++ b/core/core-frontend/src/store/modules/appearance.ts @@ -5,8 +5,10 @@ import { uiLoadApi } from '@/api/login' import { useCache } from '@/hooks/web/useCache' import colorFunctions from 'less/lib/less/functions/color.js' import colorTree from 'less/lib/less/tree/color.js' +import { useEmbedded } from '@/store/modules/embedded' import { setTitle } from '@/utils/utils' +const embeddedStore = useEmbedded() const basePath = import.meta.env.VITE_API_BASEPATH const baseUrl = basePath + '/appearance/image/' import { isBtnShow } from '@/utils/utils' @@ -172,7 +174,9 @@ export const useAppearanceStore = defineStore('appearanceStore', { } fontStyleElement.innerHTML = `@font-face { font-family: '${name}'; - src: url(${basePath}/typeface/download/${currentFont.fileTransName}); + src: url(${ + embeddedStore.baseUrl ? embeddedStore.baseUrl : basePath + }/typeface/download/${currentFont.fileTransName}); font-weight: normal; font-style: normal; }` From b0fa270a4b18aecd18216e31d359230b2751c201 Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Tue, 26 Nov 2024 14:16:00 +0800 Subject: [PATCH 3/3] =?UTF-8?q?fix(=E5=B5=8C=E5=85=A5=E5=BC=8F):=20?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E4=B8=8A=E5=90=8C=E6=97=B6=E9=80=9A=E8=BF=87?= =?UTF-8?q?div=E5=B5=8C=E5=85=A5=E4=B8=A4=E4=B8=AA=E7=9C=8B=E6=9D=BF?= =?UTF-8?q?=EF=BC=8C=E6=AD=A3=E5=B8=B8=E5=8A=A0=E8=BD=BD=E5=AE=8C=E6=88=90?= =?UTF-8?q?=E5=90=8E=EF=BC=8C=E5=85=B6=E4=B8=AD=E4=B8=80=E4=B8=AA=E7=9C=8B?= =?UTF-8?q?=E6=9D=BF=E8=B0=83=E7=94=A8=20destroy=20=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E6=B3=A8=E9=94=80=E5=AE=9E=E4=BE=8B=EF=BC=8C=E5=8F=A6=E4=B8=80?= =?UTF-8?q?=E4=B8=AA=E7=9C=8B=E6=9D=BF=E7=9A=84=E5=9B=BE=E7=89=87=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core-frontend/src/pages/panel/main.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/core/core-frontend/src/pages/panel/main.ts b/core/core-frontend/src/pages/panel/main.ts index 5667a05e6b..4587cdb1b8 100644 --- a/core/core-frontend/src/pages/panel/main.ts +++ b/core/core-frontend/src/pages/panel/main.ts @@ -199,7 +199,6 @@ class DataEaseBi { embeddedStore.setOuterParams(null) embeddedStore.setSuffixId(null) embeddedStore.setToken(null) - embeddedStore.setBaseUrl(null) embeddedStore.setChartId(null) embeddedStore.clearState() this.vm.unmount() @@ -208,7 +207,6 @@ class DataEaseBi { this.busiFlag = null this.outerParams = null this.suffixId = null - this.baseUrl = null this.dvId = null this.pid = null this.chartId = null