refactor(图表): URL 字段优化

This commit is contained in:
wisonic 2024-08-20 17:46:31 +08:00
parent 75838998de
commit 57bc85f1db
4 changed files with 15 additions and 5 deletions

View File

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

View File

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

View File

@ -153,7 +153,8 @@ const fieldOptionsText = [
{
label: t('dataset.value') + '(' + t('dataset.float') + ')',
value: 3
}
},
{ label: 'URL', value: 7 }
]
const ruleFormRef = ref<FormInstance>()
@ -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;
}
}
</style>

View File

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