Merge pull request #13643 from dataease/pr@dev-v2@style_basic_setting
style(系统设置): 系统参数-基础设置-表单文案提示
This commit is contained in:
commit
b3ae2c9d8d
@ -1,10 +1,19 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, reactive } from 'vue'
|
import { ref, reactive, PropType } from 'vue'
|
||||||
import { ElMessage, ElLoading } from 'element-plus-secondary'
|
import { ElMessage, ElLoading } from 'element-plus-secondary'
|
||||||
import { useI18n } from '@/hooks/web/useI18n'
|
import { useI18n } from '@/hooks/web/useI18n'
|
||||||
import type { FormInstance, FormRules } from 'element-plus-secondary'
|
import type { FormInstance, FormRules } from 'element-plus-secondary'
|
||||||
import request from '@/config/axios'
|
import request from '@/config/axios'
|
||||||
|
import dvInfo from '@/assets/svg/dv-info.svg'
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
labelTooltips: {
|
||||||
|
type: Array as PropType<any[]>,
|
||||||
|
default: () => []
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
const loadingInstance = ref(null)
|
const loadingInstance = ref(null)
|
||||||
const basicForm = ref<FormInstance>()
|
const basicForm = ref<FormInstance>()
|
||||||
@ -48,6 +57,14 @@ const state = reactive({
|
|||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const tooltipItem = ref({})
|
||||||
|
const formatLabel = () => {
|
||||||
|
props.labelTooltips?.length &&
|
||||||
|
props.labelTooltips.forEach(tooltip => {
|
||||||
|
tooltipItem.value[tooltip.key] = tooltip.val
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
const rule = reactive<FormRules>({
|
const rule = reactive<FormRules>({
|
||||||
dsIntervalTime: [
|
dsIntervalTime: [
|
||||||
{
|
{
|
||||||
@ -229,6 +246,7 @@ const oidChange = () => {
|
|||||||
state.form['platformRid'] = []
|
state.form['platformRid'] = []
|
||||||
loadRoleOptions()
|
loadRoleOptions()
|
||||||
}
|
}
|
||||||
|
formatLabel()
|
||||||
defineExpose({
|
defineExpose({
|
||||||
edit
|
edit
|
||||||
})
|
})
|
||||||
@ -255,8 +273,22 @@ defineExpose({
|
|||||||
:key="item.pkey"
|
:key="item.pkey"
|
||||||
:prop="item.pkey"
|
:prop="item.pkey"
|
||||||
:class="{ 'setting-hidden-item': item.pkey === 'dsExecuteTime' }"
|
:class="{ 'setting-hidden-item': item.pkey === 'dsExecuteTime' }"
|
||||||
:label="t(item.label)"
|
|
||||||
>
|
>
|
||||||
|
<template v-slot:label>
|
||||||
|
<div class="basic-form-info-tips">
|
||||||
|
<span>{{ t(item.label) }}</span>
|
||||||
|
<el-tooltip
|
||||||
|
v-if="tooltipItem[`setting_basic.${item.pkey}`]"
|
||||||
|
effect="dark"
|
||||||
|
:content="tooltipItem[`setting_basic.${item.pkey}`]"
|
||||||
|
placement="top"
|
||||||
|
>
|
||||||
|
<el-icon
|
||||||
|
><Icon name="dv-info"><dvInfo class="svg-icon" /></Icon
|
||||||
|
></el-icon>
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
<el-switch
|
<el-switch
|
||||||
class="de-basic-switch"
|
class="de-basic-switch"
|
||||||
v-if="
|
v-if="
|
||||||
@ -419,6 +451,12 @@ defineExpose({
|
|||||||
.ed-form-item__label {
|
.ed-form-item__label {
|
||||||
line-height: 22px !important;
|
line-height: 22px !important;
|
||||||
height: 22px !important;
|
height: 22px !important;
|
||||||
|
.basic-form-info-tips {
|
||||||
|
width: fit-content;
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
column-gap: 4px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.ed-radio__label {
|
.ed-radio__label {
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
|
|||||||
@ -13,6 +13,7 @@
|
|||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
<InfoTemplate
|
<InfoTemplate
|
||||||
|
v-if="loginInoSettings?.length"
|
||||||
ref="loginTemplate"
|
ref="loginTemplate"
|
||||||
class="login-setting-template"
|
class="login-setting-template"
|
||||||
:label-tooltips="tooltips"
|
:label-tooltips="tooltips"
|
||||||
@ -28,6 +29,7 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<InfoTemplate
|
<InfoTemplate
|
||||||
|
v-if="thirdInfoSettings?.length"
|
||||||
ref="thirdTemplate"
|
ref="thirdTemplate"
|
||||||
class="login-setting-template"
|
class="login-setting-template"
|
||||||
:label-tooltips="tooltips"
|
:label-tooltips="tooltips"
|
||||||
@ -41,7 +43,7 @@
|
|||||||
)
|
)
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
<basic-edit ref="editor" @saved="refresh" />
|
<basic-edit ref="editor" :label-tooltips="tooltips" @saved="refresh" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
@ -249,9 +251,9 @@ const search = cb => {
|
|||||||
const refresh = () => {
|
const refresh = () => {
|
||||||
search(() => {
|
search(() => {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
infoTemplate?.value.init()
|
infoTemplate?.value?.init()
|
||||||
loginTemplate?.value.init()
|
loginTemplate?.value?.init()
|
||||||
thirdTemplate?.value.init()
|
thirdTemplate?.value?.init()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
2
de-xpack
2
de-xpack
@ -1 +1 @@
|
|||||||
Subproject commit 4315f37ce0309f63aadf1e53b85dedc10adf1533
|
Subproject commit a081d74e3ce5b6cb32097a53c058178220c724d1
|
||||||
Loading…
Reference in New Issue
Block a user