与其他设置风格一致

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

View File

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