与其他设置风格一致

This commit is contained in:
lai
2024-10-16 19:28:42 +08:00
parent 37e70e7af8
commit 536c77ff08
2 changed files with 41 additions and 14 deletions

View File

@@ -1794,10 +1794,10 @@ export default {
reset: "System Reset",
resetInstruction: "A system reset will erase all data in the current system, please proceed with caution!!!!",
resetTipContent: 'Are you sure you want to clear all data from the current system and insist on continuing?',
homeInstruction:'Set the system home page',
home: 'System home page',
homeInstruction:'Set the home page',
home: 'Home Page',
homeTip:'Do you want to submit the current interface as the system interface?',
homeSet:'System home page Settings',
homeSet:'Home Page Settings',
},
role:{
allScopeOptions:'All data permissions',

View File

@@ -51,6 +51,12 @@ function fnSave() {
});
}
/**进入可编辑 */
function fnEdit(v: boolean) {
state.edite = v;
state.open = v;
}
onMounted(() => {
listMenu(toRaw({ status: 1 })).then(res => {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
@@ -78,18 +84,39 @@ onMounted(() => {
<template>
<a-row :gutter="16">
<a-col :lg="12" :md="12" :xs="24" style="margin-bottom: 30px">
<a-form-item :label="t('views.system.setting.home')">
<a-select
ref="select"
v-model:value="state.default"
style="width: 240px"
:options="state.options"
></a-select>
</a-form-item>
<template v-if="state.edite">
<a-form-item :label="t('views.system.setting.home')">
<a-select
ref="select"
v-model:value="state.default"
style="width: 240px"
:disabled="false"
:options="state.options"
></a-select>
</a-form-item>
<a-button type="primary" @click="fnSave">
{{ t('views.system.setting.saveSubmit') }}
</a-button>
<a-button type="primary" @click="fnSave">
{{ t('views.system.setting.saveSubmit') }}
</a-button>
<a-button style="margin-left: 10px" @click="fnEdit(false)">
{{ t('common.cancel') }}
</a-button>
</template>
<template v-else>
<a-form-item :label="t('views.system.setting.home')">
<a-select
ref="select"
v-model:value="state.default"
style="width: 240px"
:disabled="true"
:options="state.options"
></a-select>
</a-form-item>
<a-button type="dashed" @click="fnEdit(true)">
{{ t('common.editText') }}
</a-button>
</template>
</a-col>
<a-col :lg="12" :md="12" :xs="24">
<a-typography>