From 57bc85f1db0e680af9de77577841f21e6b4ef7ea Mon Sep 17 00:00:00 2001 From: wisonic Date: Tue, 20 Aug 2024 17:46:31 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E5=9B=BE=E8=A1=A8):=20URL=20=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../editor/filter/auth-tree/FilterFiled.vue | 2 +- .../visualized/data/dataset/form/CalcFieldEdit.vue | 3 ++- .../views/visualized/data/dataset/form/index.vue | 13 +++++++++++-- .../src/views/visualized/data/dataset/options.js | 2 +- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/core/core-frontend/src/views/chart/components/editor/filter/auth-tree/FilterFiled.vue b/core/core-frontend/src/views/chart/components/editor/filter/auth-tree/FilterFiled.vue index 532a8e6b27..68504e4c4c 100644 --- a/core/core-frontend/src/views/chart/components/editor/filter/auth-tree/FilterFiled.vue +++ b/core/core-frontend/src/views/chart/components/editor/filter/auth-tree/FilterFiled.vue @@ -172,7 +172,7 @@ const initEnumOptions = () => { } const { deType, filterType, fieldId } = item.value // 查找枚举值 - if (filterType === 'enum' && [0, 5].includes(deType)) { + if (filterType === 'enum' && [0, 5, 7].includes(deType)) { multFieldValuesForPermissions({ fieldIds: [fieldId] }).then(res => { enumList.value = optionData(res.data) }) diff --git a/core/core-frontend/src/views/visualized/data/dataset/form/CalcFieldEdit.vue b/core/core-frontend/src/views/visualized/data/dataset/form/CalcFieldEdit.vue index fe4e5b44e9..f3fb14e0ee 100644 --- a/core/core-frontend/src/views/visualized/data/dataset/form/CalcFieldEdit.vue +++ b/core/core-frontend/src/views/visualized/data/dataset/form/CalcFieldEdit.vue @@ -46,7 +46,8 @@ const fields = [ label: t('dataset.value') + '(' + t('dataset.float') + ')', value: 3 }, - { label: t('dataset.location'), value: 5 } + { label: t('dataset.location'), value: 5 }, + { label: 'URL', value: 7 } ] const defaultForm = { diff --git a/core/core-frontend/src/views/visualized/data/dataset/form/index.vue b/core/core-frontend/src/views/visualized/data/dataset/form/index.vue index 2dda56480b..c23e9e047d 100644 --- a/core/core-frontend/src/views/visualized/data/dataset/form/index.vue +++ b/core/core-frontend/src/views/visualized/data/dataset/form/index.vue @@ -153,7 +153,8 @@ const fieldOptionsText = [ { label: t('dataset.value') + '(' + t('dataset.float') + ')', value: 3 - } + }, + { label: 'URL', value: 7 } ] const ruleFormRef = ref() @@ -349,7 +350,7 @@ const handleFieldMore = (ele, type) => { dimensionsSelection.value = dimensionsTable.value.getSelectionRows().map(ele => ele.id) quotaSelection.value = quotaTable.value.getSelectionRows().map(ele => ele.id) } - const arr = ['text', 'time', 'value', 'float', 'value', 'location'] + const arr = ['text', 'time', 'value', 'float', 'value', 'location', 'binary', 'url'] if (arr.includes(type as string)) { ele.deType = arr.indexOf(type) ele.dateFormat = '' @@ -2595,6 +2596,9 @@ const getDsIconName = data => { } .cascader-panel { + .ed-scrollbar__wrap { + height: 210px; + } .ed-cascader-node__label { display: flex; align-items: center; @@ -2690,4 +2694,9 @@ const getDsIconName = data => { border: 1px solid rgba(31, 35, 41, 0.15); } } +.cascader-panel { + .ed-scrollbar__wrap { + height: 210px; + } +} diff --git a/core/core-frontend/src/views/visualized/data/dataset/options.js b/core/core-frontend/src/views/visualized/data/dataset/options.js index 34707116fa..57c5c4a066 100644 --- a/core/core-frontend/src/views/visualized/data/dataset/options.js +++ b/core/core-frontend/src/views/visualized/data/dataset/options.js @@ -26,7 +26,7 @@ const sysParamsIlns = sysParamsEnum.map(_ => { return { value: `\${sysParams.${_}}`, label: `auth.sysParams_type.${toLine(_)}` } }) -const fieldEnums = ['text', 'time', 'value', 'value', 'value', 'location'] +const fieldEnums = ['text', 'time', 'value', 'value', 'value', 'location', 'binary', 'url'] export { textOptions,