style: 字典数据管理多语言
This commit is contained in:
@@ -1190,7 +1190,7 @@ export default {
|
|||||||
dictId:'Dictionary Number',
|
dictId:'Dictionary Number',
|
||||||
dictName:'Dictionary Name',
|
dictName:'Dictionary Name',
|
||||||
dictType:'Dictionary Type',
|
dictType:'Dictionary Type',
|
||||||
dictSatus:'Dictionary Status',
|
dictSatus:'Status',
|
||||||
createTime:'Creation Time',
|
createTime:'Creation Time',
|
||||||
realDictName:'Please enter the dictionary name correctly',
|
realDictName:'Please enter the dictionary name correctly',
|
||||||
realDictType:'Please enter the dictionary type correctly',
|
realDictType:'Please enter the dictionary type correctly',
|
||||||
@@ -1200,7 +1200,31 @@ export default {
|
|||||||
dictData:'Dictionary Data',
|
dictData:'Dictionary Data',
|
||||||
reload:'Refresh Cache',
|
reload:'Refresh Cache',
|
||||||
mark:'Dictionary Description',
|
mark:'Dictionary Description',
|
||||||
}
|
},
|
||||||
|
dictData: {
|
||||||
|
dictType: "Dictionary name",
|
||||||
|
dictCode: "Data Code",
|
||||||
|
dictLabel: "Data Label",
|
||||||
|
dictLabelPleac: "Please enter the data labels correctly",
|
||||||
|
dictValue: "Data key",
|
||||||
|
dictValuePleac: "Please enter the data keys correctly",
|
||||||
|
dictSort: "Data Sort",
|
||||||
|
status: "Status",
|
||||||
|
createTime: "CreateTime",
|
||||||
|
tagType: "Tag Type",
|
||||||
|
tagTypeShow: "Tag Type Show",
|
||||||
|
tagClass: "Tag Class",
|
||||||
|
remark: "Remark",
|
||||||
|
viewInfo: "Dictionary Data Info",
|
||||||
|
viewInfoErr: "Failed to get dictionary data information",
|
||||||
|
addInfo: "Add Dictionary Data",
|
||||||
|
editInfo: "Modifying Dictionary Data",
|
||||||
|
delTip: "Confirm deleting the data item with dictionary data code [{txt}]?",
|
||||||
|
delOk: "Deleted successfully",
|
||||||
|
exportTip: "Confirm exporting xlsx table files based on search criteria?",
|
||||||
|
exportOk: "Completed export",
|
||||||
|
typeDataErr: "Failed to get dictionary type information",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
mmlManage: {
|
mmlManage: {
|
||||||
operationtitle: "Interface Settings",
|
operationtitle: "Interface Settings",
|
||||||
|
|||||||
@@ -1200,7 +1200,31 @@ export default {
|
|||||||
dictData:'字典数据',
|
dictData:'字典数据',
|
||||||
reload:'刷新缓存',
|
reload:'刷新缓存',
|
||||||
mark:'字典说明',
|
mark:'字典说明',
|
||||||
}
|
},
|
||||||
|
dictData: {
|
||||||
|
dictType: "字典名称",
|
||||||
|
dictCode: "数据代码",
|
||||||
|
dictLabel: "数据标签",
|
||||||
|
dictLabelPleac: "请正确输入数据标签",
|
||||||
|
dictValue: "数据键值",
|
||||||
|
dictValuePleac: "请正确输入数据键值",
|
||||||
|
dictSort: "数据排序",
|
||||||
|
status: "数据状态",
|
||||||
|
createTime: "创建时间",
|
||||||
|
tagType: "标签类型",
|
||||||
|
tagTypeShow: "回显预览",
|
||||||
|
tagClass: "样式属性",
|
||||||
|
remark: "数据说明",
|
||||||
|
viewInfo: "字典数据信息",
|
||||||
|
viewInfoErr: "获取字典数据信息失败",
|
||||||
|
addInfo: "添加字典数据",
|
||||||
|
editInfo: "修改字典数据",
|
||||||
|
delTip: "确认删除字典数据代码为 【{txt}】 的数据项?",
|
||||||
|
delOk: "删除成功",
|
||||||
|
exportTip: "确认根据搜索条件导出xlsx表格文件吗?",
|
||||||
|
exportOk: "已完成导出",
|
||||||
|
typeDataErr: "获取字典类型信息失败",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
mmlManage: {
|
mmlManage: {
|
||||||
cmdTitle: "命令导航",
|
cmdTitle: "命令导航",
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import useTabsStore from '@/store/modules/tabs';
|
|||||||
import useDictStore from '@/store/modules/dict';
|
import useDictStore from '@/store/modules/dict';
|
||||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||||
import useI18n from '@/hooks/useI18n';
|
import useI18n from '@/hooks/useI18n';
|
||||||
const { t } = useI18n();
|
const { t, currentLocale } = useI18n();
|
||||||
const tabsStore = useTabsStore();
|
const tabsStore = useTabsStore();
|
||||||
const { parseDataDict, getDict } = useDictStore();
|
const { parseDataDict, getDict } = useDictStore();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
@@ -30,27 +30,29 @@ const router = useRouter();
|
|||||||
// 获取地址栏参数
|
// 获取地址栏参数
|
||||||
const dictId = route.params && (route.params.dictId as string);
|
const dictId = route.params && (route.params.dictId as string);
|
||||||
|
|
||||||
|
const zh = currentLocale.value === 'zh_CN';
|
||||||
|
|
||||||
/**标签类型数据固定项 */
|
/**标签类型数据固定项 */
|
||||||
const tagTypeOptions = ref([
|
const tagTypeOptions = ref([
|
||||||
{ value: '', label: '普通文本' },
|
{ value: '', label: zh ? '普通文本' : 'Plain text' },
|
||||||
{ value: 'default', label: '默认(default)' },
|
{ value: 'default', label: zh ? '默认(default)' : 'Default' },
|
||||||
{ value: 'blue ', label: '蓝色(blue)' },
|
{ value: 'blue ', label: zh ? '蓝色(blue)' : 'Blue' },
|
||||||
{ value: 'cyan', label: '青色(cyan)' },
|
{ value: 'cyan', label: zh ? '青色(cyan)' : 'Cyan' },
|
||||||
{ value: 'gold', label: '金色(gold)' },
|
{ value: 'gold', label: zh ? '金色(gold)' : 'Gold' },
|
||||||
{ value: 'green', label: '绿色(green)' },
|
{ value: 'green', label: zh ? '绿色(green)' : 'Green' },
|
||||||
{ value: 'lime', label: '亮绿(lime)' },
|
{ value: 'lime', label: zh ? '亮绿(lime)' : 'Lime' },
|
||||||
{ value: 'magenta', label: '紫红(magenta)' },
|
{ value: 'magenta', label: zh ? '紫红(magenta)' : 'Magenta' },
|
||||||
{ value: 'orange', label: '橘黄(orange)' },
|
{ value: 'orange', label: zh ? '橘黄(orange)' : 'Orange' },
|
||||||
{ value: 'pink', label: '粉色(pink)' },
|
{ value: 'pink', label: zh ? '粉色(pink)' : 'Pink' },
|
||||||
{ value: 'purple', label: '紫色(purple)' },
|
{ value: 'purple', label: zh ? '紫色(purple)' : 'Purple' },
|
||||||
{ value: 'red', label: '红色(red)' },
|
{ value: 'red', label: zh ? '红色(red)' : 'Red' },
|
||||||
{ value: 'yellow', label: '黄色(yellow)' },
|
{ value: 'yellow', label: zh ? '黄色(yellow)' : 'Yellow' },
|
||||||
{ value: 'geekblue', label: '深蓝(geekblue)' },
|
{ value: 'geekblue', label: zh ? '深蓝(geekblue)' : 'Geekblue' },
|
||||||
{ value: 'volcano', label: '棕色(volcano)' },
|
{ value: 'volcano', label: zh ? '棕色(volcano)' : 'Volcano' },
|
||||||
{ value: 'processing', label: '进行(processing)' },
|
{ value: 'processing', label: zh ? '进行(processing)' : 'Processing' },
|
||||||
{ value: 'warning', label: '警告(warning)' },
|
{ value: 'warning', label: zh ? '警告(warning)' : 'Warning' },
|
||||||
{ value: 'error', label: '错误(error)' },
|
{ value: 'error', label: zh ? '错误(error)' : 'Error' },
|
||||||
{ value: 'success', label: '成功(success)' },
|
{ value: 'success', label: zh ? '成功(success)' : 'Success' },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
/**字典数据 */
|
/**字典数据 */
|
||||||
@@ -130,33 +132,33 @@ let tableState: TabeStateType = reactive({
|
|||||||
/**表格字段列 */
|
/**表格字段列 */
|
||||||
let tableColumns: ColumnsType = [
|
let tableColumns: ColumnsType = [
|
||||||
{
|
{
|
||||||
title: '数据代码',
|
title: t('views.system.dictData.dictCode'),
|
||||||
dataIndex: 'dictCode',
|
dataIndex: 'dictCode',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '数据标签',
|
title: t('views.system.dictData.dictLabel'),
|
||||||
dataIndex: 'dictLabel',
|
dataIndex: 'dictLabel',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '数据键值',
|
title: t('views.system.dictData.dictValue'),
|
||||||
dataIndex: 'dictValue',
|
dataIndex: 'dictValue',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '数据排序',
|
title: t('views.system.dictData.dictSort'),
|
||||||
dataIndex: 'dictSort',
|
dataIndex: 'dictSort',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '数据状态',
|
title: t('views.system.dictData.status'),
|
||||||
dataIndex: 'status',
|
dataIndex: 'status',
|
||||||
key: 'status',
|
key: 'status',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '创建时间',
|
title: t('views.system.dictData.createTime'),
|
||||||
dataIndex: 'createTime',
|
dataIndex: 'createTime',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
customRender(opt) {
|
customRender(opt) {
|
||||||
@@ -165,7 +167,7 @@ let tableColumns: ColumnsType = [
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: t('common.operate'),
|
||||||
key: 'dictCode',
|
key: 'dictCode',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
},
|
},
|
||||||
@@ -189,7 +191,8 @@ let tablePagination = reactive({
|
|||||||
showSizeChanger: true,
|
showSizeChanger: true,
|
||||||
/**数据总数 */
|
/**数据总数 */
|
||||||
total: 0,
|
total: 0,
|
||||||
showTotal: (total: number) => `总共 ${total} 条`,
|
showTotal: (total: number) =>
|
||||||
|
t('common.tablePaginationTotal', { total: total }),
|
||||||
onChange: (page: number, pageSize: number) => {
|
onChange: (page: number, pageSize: number) => {
|
||||||
tablePagination.current = page;
|
tablePagination.current = page;
|
||||||
tablePagination.pageSize = pageSize;
|
tablePagination.pageSize = pageSize;
|
||||||
@@ -254,10 +257,20 @@ const modalStateFrom = Form.useForm(
|
|||||||
modalState.from,
|
modalState.from,
|
||||||
reactive({
|
reactive({
|
||||||
dictLabel: [
|
dictLabel: [
|
||||||
{ required: true, min: 1, max: 50, message: '请正确输入数据标签' },
|
{
|
||||||
|
required: true,
|
||||||
|
min: 1,
|
||||||
|
max: 50,
|
||||||
|
message: t('views.system.dictData.dictLabelPleac'),
|
||||||
|
},
|
||||||
],
|
],
|
||||||
dictValue: [
|
dictValue: [
|
||||||
{ required: true, min: 1, max: 50, message: '请正确输入数据键值' },
|
{
|
||||||
|
required: true,
|
||||||
|
min: 1,
|
||||||
|
max: 50,
|
||||||
|
message: t('views.system.dictData.dictValuePleac'),
|
||||||
|
},
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
@@ -268,7 +281,7 @@ const modalStateFrom = Form.useForm(
|
|||||||
*/
|
*/
|
||||||
function fnModalVisibleByVive(row: Record<string, string>) {
|
function fnModalVisibleByVive(row: Record<string, string>) {
|
||||||
modalState.from = Object.assign(modalState.from, row);
|
modalState.from = Object.assign(modalState.from, row);
|
||||||
modalState.title = '字典数据信息';
|
modalState.title = t('views.system.dictData.viewInfo');
|
||||||
modalState.visibleByView = true;
|
modalState.visibleByView = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -280,7 +293,7 @@ function fnModalVisibleByEdit(dictCode?: string | number) {
|
|||||||
if (!dictCode) {
|
if (!dictCode) {
|
||||||
modalStateFrom.resetFields();
|
modalStateFrom.resetFields();
|
||||||
modalState.from.dictType = queryParams.dictType;
|
modalState.from.dictType = queryParams.dictType;
|
||||||
modalState.title = '添加字典数据';
|
modalState.title = t('views.system.dictData.addInfo');
|
||||||
modalState.visibleByEdit = true;
|
modalState.visibleByEdit = true;
|
||||||
} else {
|
} else {
|
||||||
if (modalState.confirmLoading) return;
|
if (modalState.confirmLoading) return;
|
||||||
@@ -291,10 +304,10 @@ function fnModalVisibleByEdit(dictCode?: string | number) {
|
|||||||
hide();
|
hide();
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
if (res.code === RESULT_CODE_SUCCESS) {
|
||||||
modalState.from = Object.assign(modalState.from, res.data);
|
modalState.from = Object.assign(modalState.from, res.data);
|
||||||
modalState.title = '修改字典数据';
|
modalState.title = t('views.system.dictData.editInfo');
|
||||||
modalState.visibleByEdit = true;
|
modalState.visibleByEdit = true;
|
||||||
} else {
|
} else {
|
||||||
message.error(`获取字典数据信息失败`, 2);
|
message.error(t('views.system.dictData.viewInfoErr'), 2);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -317,7 +330,7 @@ function fnModalOk() {
|
|||||||
.then(res => {
|
.then(res => {
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
if (res.code === RESULT_CODE_SUCCESS) {
|
||||||
message.success({
|
message.success({
|
||||||
content: `${modalState.title}成功`,
|
content: t('common.msgSuccess', { msg: modalState.title }),
|
||||||
key,
|
key,
|
||||||
duration: 2,
|
duration: 2,
|
||||||
});
|
});
|
||||||
@@ -337,7 +350,7 @@ function fnModalOk() {
|
|||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch(e => {
|
.catch(e => {
|
||||||
message.error(`请正确填写 ${e.errorFields.length} 处必填信息!`, 2);
|
message.error(t('common.errorFields', { num: e.errorFields.length }), 2);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -361,14 +374,14 @@ function fnRecordDelete(dictCode: string = '0') {
|
|||||||
}
|
}
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: t('common.tipTitle'),
|
title: t('common.tipTitle'),
|
||||||
content: `确认删除字典数据代码为 【${dictCode}】 的数据项?`,
|
content: t('views.system.dictData.delTip', { txt: dictCode }),
|
||||||
onOk() {
|
onOk() {
|
||||||
const key = 'delData';
|
const key = 'delData';
|
||||||
message.loading({ content: t('common.loading'), key });
|
message.loading({ content: t('common.loading'), key });
|
||||||
delData(dictCode).then(res => {
|
delData(dictCode).then(res => {
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
if (res.code === RESULT_CODE_SUCCESS) {
|
||||||
message.success({
|
message.success({
|
||||||
content: `删除成功`,
|
content: t('views.system.dictData.delOk'),
|
||||||
key,
|
key,
|
||||||
duration: 2,
|
duration: 2,
|
||||||
});
|
});
|
||||||
@@ -389,14 +402,14 @@ function fnRecordDelete(dictCode: string = '0') {
|
|||||||
function fnExportList() {
|
function fnExportList() {
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: t('common.tipTitle'),
|
title: t('common.tipTitle'),
|
||||||
content: `确认根据搜索条件导出xlsx表格文件吗?`,
|
content: t('views.system.dictData.exportTip'),
|
||||||
onOk() {
|
onOk() {
|
||||||
const key = 'exportData';
|
const key = 'exportData';
|
||||||
message.loading({ content: t('common.loading'), key });
|
message.loading({ content: t('common.loading'), key });
|
||||||
exportData(toRaw(queryParams)).then(res => {
|
exportData(toRaw(queryParams)).then(res => {
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
if (res.code === RESULT_CODE_SUCCESS) {
|
||||||
message.success({
|
message.success({
|
||||||
content: `已完成导出`,
|
content: t('views.system.dictData.exportOk'),
|
||||||
key,
|
key,
|
||||||
duration: 2,
|
duration: 2,
|
||||||
});
|
});
|
||||||
@@ -427,7 +440,7 @@ function fnClose() {
|
|||||||
function fnGetList(pageNum?: number) {
|
function fnGetList(pageNum?: number) {
|
||||||
if (tableState.loading) return;
|
if (tableState.loading) return;
|
||||||
tableState.loading = true;
|
tableState.loading = true;
|
||||||
if(pageNum){
|
if (pageNum) {
|
||||||
queryParams.pageNum = pageNum;
|
queryParams.pageNum = pageNum;
|
||||||
}
|
}
|
||||||
listData(toRaw(queryParams)).then(res => {
|
listData(toRaw(queryParams)).then(res => {
|
||||||
@@ -466,7 +479,7 @@ onMounted(() => {
|
|||||||
queryParams.dictType = res.data.dictType;
|
queryParams.dictType = res.data.dictType;
|
||||||
fnGetList();
|
fnGetList();
|
||||||
} else {
|
} else {
|
||||||
message.error(`获取字典类型信息失败`, 3);
|
message.error(t('views.system.dictData.typeDataErr'), 3);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@@ -487,32 +500,41 @@ onMounted(() => {
|
|||||||
<a-form :model="queryParams" name="queryParams" layout="horizontal">
|
<a-form :model="queryParams" name="queryParams" layout="horizontal">
|
||||||
<a-row :gutter="16">
|
<a-row :gutter="16">
|
||||||
<a-col :lg="6" :md="12" :xs="24">
|
<a-col :lg="6" :md="12" :xs="24">
|
||||||
<a-form-item label="字典名称" name="dictType">
|
<a-form-item
|
||||||
|
:label="t('views.system.dictData.dictType')"
|
||||||
|
name="dictType"
|
||||||
|
>
|
||||||
<a-select
|
<a-select
|
||||||
v-model:value="queryParams.dictType"
|
v-model:value="queryParams.dictType"
|
||||||
:allow-clear="dictId === '0'"
|
:allow-clear="dictId === '0'"
|
||||||
:disabled="dictId !== '0'"
|
:disabled="dictId !== '0'"
|
||||||
placeholder="请选择字典名称"
|
:placeholder="t('common.selectPlease')"
|
||||||
:options="dict.sysDictType"
|
:options="dict.sysDictType"
|
||||||
>
|
>
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :lg="6" :md="12" :xs="24">
|
<a-col :lg="6" :md="12" :xs="24">
|
||||||
<a-form-item label="数据标签" name="dictLabel">
|
<a-form-item
|
||||||
|
:label="t('views.system.dictData.dictLabel')"
|
||||||
|
name="dictLabel"
|
||||||
|
>
|
||||||
<a-input
|
<a-input
|
||||||
v-model:value="queryParams.dictLabel"
|
v-model:value="queryParams.dictLabel"
|
||||||
allow-clear
|
allow-clear
|
||||||
placeholder="请输入数据标签"
|
:placeholder="t('common.ipnutPlease')"
|
||||||
></a-input>
|
></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :lg="6" :md="12" :xs="24">
|
<a-col :lg="6" :md="12" :xs="24">
|
||||||
<a-form-item label="数据状态" name="status">
|
<a-form-item
|
||||||
|
:label="t('views.system.dictData.status')"
|
||||||
|
name="status"
|
||||||
|
>
|
||||||
<a-select
|
<a-select
|
||||||
v-model:value="queryParams.status"
|
v-model:value="queryParams.status"
|
||||||
allow-clear
|
allow-clear
|
||||||
placeholder="请选择数据状态"
|
:placeholder="t('common.selectPlease')"
|
||||||
:options="dict.sysNormalDisable"
|
:options="dict.sysNormalDisable"
|
||||||
>
|
>
|
||||||
</a-select>
|
</a-select>
|
||||||
@@ -523,12 +545,12 @@ onMounted(() => {
|
|||||||
<a-space :size="8">
|
<a-space :size="8">
|
||||||
<a-button type="primary" @click.prevent="fnGetList(1)">
|
<a-button type="primary" @click.prevent="fnGetList(1)">
|
||||||
<template #icon><SearchOutlined /></template>
|
<template #icon><SearchOutlined /></template>
|
||||||
搜索</a-button
|
{{ t('common.search') }}
|
||||||
>
|
</a-button>
|
||||||
<a-button type="default" @click.prevent="fnQueryReset">
|
<a-button type="default" @click.prevent="fnQueryReset">
|
||||||
<template #icon><ClearOutlined /></template>
|
<template #icon><ClearOutlined /></template>
|
||||||
重置</a-button
|
{{ t('common.reset') }}
|
||||||
>
|
</a-button>
|
||||||
</a-space>
|
</a-space>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -542,7 +564,7 @@ onMounted(() => {
|
|||||||
<a-space :size="8" align="center">
|
<a-space :size="8" align="center">
|
||||||
<a-button type="default" @click.prevent="fnClose()">
|
<a-button type="default" @click.prevent="fnClose()">
|
||||||
<template #icon><CloseOutlined /></template>
|
<template #icon><CloseOutlined /></template>
|
||||||
关闭
|
{{ t('common.close') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button
|
<a-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@@ -550,7 +572,7 @@ onMounted(() => {
|
|||||||
v-perms:has="['system:dict:add']"
|
v-perms:has="['system:dict:add']"
|
||||||
>
|
>
|
||||||
<template #icon><PlusOutlined /></template>
|
<template #icon><PlusOutlined /></template>
|
||||||
新增
|
{{ t('common.addText') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button
|
<a-button
|
||||||
type="default"
|
type="default"
|
||||||
@@ -560,7 +582,7 @@ onMounted(() => {
|
|||||||
v-perms:has="['system:dict:remove']"
|
v-perms:has="['system:dict:remove']"
|
||||||
>
|
>
|
||||||
<template #icon><DeleteOutlined /></template>
|
<template #icon><DeleteOutlined /></template>
|
||||||
删除
|
{{ t('common.deleteText') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button
|
<a-button
|
||||||
type="dashed"
|
type="dashed"
|
||||||
@@ -568,7 +590,7 @@ onMounted(() => {
|
|||||||
v-perms:has="['system:dict:export']"
|
v-perms:has="['system:dict:export']"
|
||||||
>
|
>
|
||||||
<template #icon><ExportOutlined /></template>
|
<template #icon><ExportOutlined /></template>
|
||||||
导出
|
{{ t('common.export') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-space>
|
</a-space>
|
||||||
</template>
|
</template>
|
||||||
@@ -577,31 +599,31 @@ onMounted(() => {
|
|||||||
<template #extra>
|
<template #extra>
|
||||||
<a-space :size="8" align="center">
|
<a-space :size="8" align="center">
|
||||||
<a-tooltip>
|
<a-tooltip>
|
||||||
<template #title>搜索栏</template>
|
<template #title>{{ t('common.searchBarText') }}</template>
|
||||||
<a-switch
|
<a-switch
|
||||||
v-model:checked="tableState.seached"
|
v-model:checked="tableState.seached"
|
||||||
checked-children="显"
|
:checked-children="t('common.switch.show')"
|
||||||
un-checked-children="隐"
|
:un-checked-children="t('common.switch.hide')"
|
||||||
size="small"
|
size="small"
|
||||||
/>
|
/>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
<a-tooltip>
|
<a-tooltip>
|
||||||
<template #title>表格斑马纹</template>
|
<template #title>{{ t('common.tableStripedText') }}</template>
|
||||||
<a-switch
|
<a-switch
|
||||||
v-model:checked="tableState.striped"
|
v-model:checked="tableState.striped"
|
||||||
checked-children="开"
|
:checked-children="t('common.switch.open')"
|
||||||
un-checked-children="关"
|
:un-checked-children="t('common.switch.shut')"
|
||||||
size="small"
|
size="small"
|
||||||
/>
|
/>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
<a-tooltip>
|
<a-tooltip>
|
||||||
<template #title>刷新</template>
|
<template #title>{{ t('common.reloadText') }}</template>
|
||||||
<a-button type="text" @click.prevent="fnGetList()">
|
<a-button type="text" @click.prevent="fnGetList()">
|
||||||
<template #icon><ReloadOutlined /></template>
|
<template #icon><ReloadOutlined /></template>
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
<a-tooltip placement="topRight">
|
<a-tooltip placement="topRight">
|
||||||
<template #title>密度</template>
|
<template #title>{{ t('common.sizeText') }}</template>
|
||||||
<a-dropdown placement="bottomRight" trigger="click">
|
<a-dropdown placement="bottomRight" trigger="click">
|
||||||
<a-button type="text">
|
<a-button type="text">
|
||||||
<template #icon><ColumnHeightOutlined /></template>
|
<template #icon><ColumnHeightOutlined /></template>
|
||||||
@@ -611,9 +633,15 @@ onMounted(() => {
|
|||||||
:selected-keys="[tableState.size as string]"
|
:selected-keys="[tableState.size as string]"
|
||||||
@click="fnTableSize"
|
@click="fnTableSize"
|
||||||
>
|
>
|
||||||
<a-menu-item key="default">默认</a-menu-item>
|
<a-menu-item key="default">
|
||||||
<a-menu-item key="middle">中等</a-menu-item>
|
{{ t('common.size.default') }}
|
||||||
<a-menu-item key="small">紧凑</a-menu-item>
|
</a-menu-item>
|
||||||
|
<a-menu-item key="middle">
|
||||||
|
{{ t('common.size.middle') }}
|
||||||
|
</a-menu-item>
|
||||||
|
<a-menu-item key="small">
|
||||||
|
{{ t('common.size.small') }}
|
||||||
|
</a-menu-item>
|
||||||
</a-menu>
|
</a-menu>
|
||||||
</template>
|
</template>
|
||||||
</a-dropdown>
|
</a-dropdown>
|
||||||
@@ -645,7 +673,7 @@ onMounted(() => {
|
|||||||
<template v-if="column.key === 'dictCode'">
|
<template v-if="column.key === 'dictCode'">
|
||||||
<a-space :size="8" align="center">
|
<a-space :size="8" align="center">
|
||||||
<a-tooltip>
|
<a-tooltip>
|
||||||
<template #title>查看详情</template>
|
<template #title>{{ t('common.viewText') }}</template>
|
||||||
<a-button
|
<a-button
|
||||||
type="link"
|
type="link"
|
||||||
@click.prevent="fnModalVisibleByVive(record)"
|
@click.prevent="fnModalVisibleByVive(record)"
|
||||||
@@ -655,7 +683,7 @@ onMounted(() => {
|
|||||||
</a-button>
|
</a-button>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
<a-tooltip>
|
<a-tooltip>
|
||||||
<template #title>编辑</template>
|
<template #title>{{ t('common.editText') }}</template>
|
||||||
<a-button
|
<a-button
|
||||||
type="link"
|
type="link"
|
||||||
@click.prevent="fnModalVisibleByEdit(record.dictCode)"
|
@click.prevent="fnModalVisibleByEdit(record.dictCode)"
|
||||||
@@ -665,7 +693,7 @@ onMounted(() => {
|
|||||||
</a-button>
|
</a-button>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
<a-tooltip>
|
<a-tooltip>
|
||||||
<template #title>删除</template>
|
<template #title>{{ t('common.deleteText') }}</template>
|
||||||
<a-button
|
<a-button
|
||||||
type="link"
|
type="link"
|
||||||
@click.prevent="fnRecordDelete(record.dictCode)"
|
@click.prevent="fnRecordDelete(record.dictCode)"
|
||||||
@@ -690,7 +718,10 @@ onMounted(() => {
|
|||||||
<a-form layout="horizontal">
|
<a-form layout="horizontal">
|
||||||
<a-row :gutter="16">
|
<a-row :gutter="16">
|
||||||
<a-col :lg="12" :md="12" :xs="24">
|
<a-col :lg="12" :md="12" :xs="24">
|
||||||
<a-form-item label="字典名称" name="dictType">
|
<a-form-item
|
||||||
|
:label="t('views.system.dictData.dictType')"
|
||||||
|
name="dictType"
|
||||||
|
>
|
||||||
{{
|
{{
|
||||||
dict.sysDictType.find(
|
dict.sysDictType.find(
|
||||||
item => item.value === modalState.from.dictType
|
item => item.value === modalState.from.dictType
|
||||||
@@ -699,7 +730,10 @@ onMounted(() => {
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :lg="12" :md="12" :xs="24">
|
<a-col :lg="12" :md="12" :xs="24">
|
||||||
<a-form-item label="创建时间" name="createTime">
|
<a-form-item
|
||||||
|
:label="t('views.system.dictData.createTime')"
|
||||||
|
name="createTime"
|
||||||
|
>
|
||||||
<span v-if="+modalState.from.createTime > 0">
|
<span v-if="+modalState.from.createTime > 0">
|
||||||
{{ parseDateToStr(+modalState.from.createTime) }}
|
{{ parseDateToStr(+modalState.from.createTime) }}
|
||||||
</span>
|
</span>
|
||||||
@@ -708,12 +742,18 @@ onMounted(() => {
|
|||||||
</a-row>
|
</a-row>
|
||||||
<a-row :gutter="16">
|
<a-row :gutter="16">
|
||||||
<a-col :lg="12" :md="12" :xs="24">
|
<a-col :lg="12" :md="12" :xs="24">
|
||||||
<a-form-item label="数据代码" name="dictCode">
|
<a-form-item
|
||||||
|
:label="t('views.system.dictData.dictCode')"
|
||||||
|
name="dictCode"
|
||||||
|
>
|
||||||
{{ modalState.from.dictCode }}
|
{{ modalState.from.dictCode }}
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :lg="12" :md="12" :xs="24">
|
<a-col :lg="12" :md="12" :xs="24">
|
||||||
<a-form-item label="数据状态" name="status">
|
<a-form-item
|
||||||
|
:label="t('views.system.dictData.status')"
|
||||||
|
name="status"
|
||||||
|
>
|
||||||
<DictTag
|
<DictTag
|
||||||
:options="dict.sysNormalDisable"
|
:options="dict.sysNormalDisable"
|
||||||
:value="modalState.from.status"
|
:value="modalState.from.status"
|
||||||
@@ -723,19 +763,28 @@ onMounted(() => {
|
|||||||
</a-row>
|
</a-row>
|
||||||
<a-row :gutter="16">
|
<a-row :gutter="16">
|
||||||
<a-col :lg="12" :md="12" :xs="24">
|
<a-col :lg="12" :md="12" :xs="24">
|
||||||
<a-form-item label="数据标签" name="dictLabel">
|
<a-form-item
|
||||||
|
:label="t('views.system.dictData.dictLabel')"
|
||||||
|
name="dictLabel"
|
||||||
|
>
|
||||||
{{ modalState.from.dictLabel }}
|
{{ modalState.from.dictLabel }}
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :lg="12" :md="12" :xs="24">
|
<a-col :lg="12" :md="12" :xs="24">
|
||||||
<a-form-item label="数据键值" name="dictValue">
|
<a-form-item
|
||||||
|
:label="t('views.system.dictData.dictValue')"
|
||||||
|
name="dictValue"
|
||||||
|
>
|
||||||
{{ modalState.from.dictValue }}
|
{{ modalState.from.dictValue }}
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row :gutter="16">
|
<a-row :gutter="16">
|
||||||
<a-col :lg="12" :md="12" :xs="24">
|
<a-col :lg="12" :md="12" :xs="24">
|
||||||
<a-form-item label="标签类型" name="tagType">
|
<a-form-item
|
||||||
|
:label="t('views.system.dictData.tagType')"
|
||||||
|
name="tagType"
|
||||||
|
>
|
||||||
<DictTag
|
<DictTag
|
||||||
:options="tagTypeOptions"
|
:options="tagTypeOptions"
|
||||||
:value="modalState.from.tagType"
|
:value="modalState.from.tagType"
|
||||||
@@ -743,14 +792,20 @@ onMounted(() => {
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :lg="12" :md="12" :xs="24">
|
<a-col :lg="12" :md="12" :xs="24">
|
||||||
<a-form-item label="样式属性" name="tagClass">
|
<a-form-item
|
||||||
|
:label="t('views.system.dictData.tagClass')"
|
||||||
|
name="tagClass"
|
||||||
|
>
|
||||||
{{ modalState.from.tagClass }}
|
{{ modalState.from.tagClass }}
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row :gutter="16">
|
<a-row :gutter="16">
|
||||||
<a-col :lg="12" :md="12" :xs="24">
|
<a-col :lg="12" :md="12" :xs="24">
|
||||||
<a-form-item label="回显预览" name="tagType">
|
<a-form-item
|
||||||
|
:label="t('views.system.dictData.tagTypeShow')"
|
||||||
|
name="tagType"
|
||||||
|
>
|
||||||
<DictTag
|
<DictTag
|
||||||
:options="parseDataDict(modalState.from)"
|
:options="parseDataDict(modalState.from)"
|
||||||
:value="modalState.from.dictValue"
|
:value="modalState.from.dictValue"
|
||||||
@@ -758,17 +813,22 @@ onMounted(() => {
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :lg="12" :md="12" :xs="24">
|
<a-col :lg="12" :md="12" :xs="24">
|
||||||
<a-form-item label="数据排序" name="dictSort">
|
<a-form-item
|
||||||
|
:label="t('views.system.dictData.dictSort')"
|
||||||
|
name="dictSort"
|
||||||
|
>
|
||||||
{{ modalState.from.dictSort }}
|
{{ modalState.from.dictSort }}
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-form-item label="数据说明" name="remark">
|
<a-form-item :label="t('views.system.dictData.remark')" name="remark">
|
||||||
{{ modalState.from.remark }}
|
{{ modalState.from.remark }}
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<a-button key="cancel" @click="fnModalCancel">关闭</a-button>
|
<a-button key="cancel" @click="fnModalCancel">
|
||||||
|
{{ t('common.close') }}
|
||||||
|
</a-button>
|
||||||
</template>
|
</template>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
|
|
||||||
@@ -786,11 +846,14 @@ onMounted(() => {
|
|||||||
<a-form name="modalStateFrom" layout="horizontal">
|
<a-form name="modalStateFrom" layout="horizontal">
|
||||||
<a-row :gutter="16">
|
<a-row :gutter="16">
|
||||||
<a-col :lg="12" :md="12" :xs="24">
|
<a-col :lg="12" :md="12" :xs="24">
|
||||||
<a-form-item label="字典类型" name="dictType">
|
<a-form-item
|
||||||
|
:label="t('views.system.dictData.dictType')"
|
||||||
|
name="dictType"
|
||||||
|
>
|
||||||
<a-select
|
<a-select
|
||||||
v-model:value="modalState.from.dictType"
|
v-model:value="modalState.from.dictType"
|
||||||
default-value="sys_oper_type"
|
default-value="sys_oper_type"
|
||||||
placeholder="字典类型"
|
:placeholder="t('common.selectPlease')"
|
||||||
:options="dict.sysDictType"
|
:options="dict.sysDictType"
|
||||||
:disabled="true"
|
:disabled="true"
|
||||||
>
|
>
|
||||||
@@ -798,11 +861,14 @@ onMounted(() => {
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :lg="12" :md="12" :xs="24">
|
<a-col :lg="12" :md="12" :xs="24">
|
||||||
<a-form-item label="数据状态" name="status">
|
<a-form-item
|
||||||
|
:label="t('views.system.dictData.status')"
|
||||||
|
name="status"
|
||||||
|
>
|
||||||
<a-select
|
<a-select
|
||||||
v-model:value="modalState.from.status"
|
v-model:value="modalState.from.status"
|
||||||
default-value="0"
|
default-value="0"
|
||||||
placeholder="数据状态"
|
:placeholder="t('common.selectPlease')"
|
||||||
:options="dict.sysNormalDisable"
|
:options="dict.sysNormalDisable"
|
||||||
>
|
>
|
||||||
</a-select>
|
</a-select>
|
||||||
@@ -812,67 +878,75 @@ onMounted(() => {
|
|||||||
<a-row :gutter="16">
|
<a-row :gutter="16">
|
||||||
<a-col :lg="12" :md="12" :xs="24">
|
<a-col :lg="12" :md="12" :xs="24">
|
||||||
<a-form-item
|
<a-form-item
|
||||||
label="数据标签"
|
:label="t('views.system.dictData.dictLabel')"
|
||||||
name="dictLabel"
|
name="dictLabel"
|
||||||
v-bind="modalStateFrom.validateInfos.dictLabel"
|
v-bind="modalStateFrom.validateInfos.dictLabel"
|
||||||
>
|
>
|
||||||
<a-input
|
<a-input
|
||||||
v-model:value="modalState.from.dictLabel"
|
v-model:value="modalState.from.dictLabel"
|
||||||
allow-clear
|
allow-clear
|
||||||
placeholder="请输入数据标签"
|
:placeholder="t('views.system.dictData.dictLabelPleac')"
|
||||||
></a-input>
|
></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :lg="12" :md="12" :xs="24">
|
<a-col :lg="12" :md="12" :xs="24">
|
||||||
<a-form-item
|
<a-form-item
|
||||||
label="数据键值"
|
:label="t('views.system.dictData.dictValue')"
|
||||||
name="dictValue"
|
name="dictValue"
|
||||||
v-bind="modalStateFrom.validateInfos.dictValue"
|
v-bind="modalStateFrom.validateInfos.dictValue"
|
||||||
>
|
>
|
||||||
<a-input
|
<a-input
|
||||||
v-model:value="modalState.from.dictValue"
|
v-model:value="modalState.from.dictValue"
|
||||||
allow-clear
|
allow-clear
|
||||||
placeholder="请输入数据键值"
|
:placeholder="t('views.system.dictData.dictValuePleac')"
|
||||||
></a-input>
|
></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row :gutter="16">
|
<a-row :gutter="16">
|
||||||
<a-col :lg="12" :md="12" :xs="24">
|
<a-col :lg="12" :md="12" :xs="24">
|
||||||
<a-form-item label="标签类型" name="tagType">
|
<a-form-item
|
||||||
|
:label="t('views.system.dictData.tagType')"
|
||||||
|
name="tagType"
|
||||||
|
>
|
||||||
<a-select
|
<a-select
|
||||||
v-model:value="modalState.from.tagType"
|
v-model:value="modalState.from.tagType"
|
||||||
placeholder="标签类型"
|
:placeholder="t('common.selectPlease')"
|
||||||
:options="tagTypeOptions"
|
:options="tagTypeOptions"
|
||||||
>
|
>
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :lg="12" :md="12" :xs="24">
|
<a-col :lg="12" :md="12" :xs="24">
|
||||||
<a-form-item label="数据排序" name="dictSort">
|
<a-form-item
|
||||||
|
:label="t('views.system.dictData.dictSort')"
|
||||||
|
name="dictSort"
|
||||||
|
>
|
||||||
<a-input-number
|
<a-input-number
|
||||||
v-model:value="modalState.from.dictSort"
|
v-model:value="modalState.from.dictSort"
|
||||||
:min="0"
|
:min="0"
|
||||||
:max="65535"
|
:max="65535"
|
||||||
placeholder="请输入数据排序"
|
:placeholder="t('common.ipnutPlease')"
|
||||||
></a-input-number>
|
></a-input-number>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-form-item label="样式属性" name="tagClass">
|
<a-form-item
|
||||||
|
:label="t('views.system.dictData.tagClass')"
|
||||||
|
name="tagClass"
|
||||||
|
>
|
||||||
<a-input
|
<a-input
|
||||||
v-model:value="modalState.from.tagClass"
|
v-model:value="modalState.from.tagClass"
|
||||||
allow-clear
|
allow-clear
|
||||||
placeholder="请输入样式属性"
|
:placeholder="t('common.ipnutPlease')"
|
||||||
></a-input>
|
></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="数据说明" name="remark">
|
<a-form-item :label="t('views.system.dictData.remark')" name="remark">
|
||||||
<a-textarea
|
<a-textarea
|
||||||
v-model:value="modalState.from.remark"
|
v-model:value="modalState.from.remark"
|
||||||
:auto-size="{ minRows: 4, maxRows: 6 }"
|
:auto-size="{ minRows: 4, maxRows: 6 }"
|
||||||
:maxlength="450"
|
:maxlength="450"
|
||||||
:show-count="true"
|
:show-count="true"
|
||||||
placeholder="请输入数据说明"
|
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
|
|||||||
@@ -794,7 +794,7 @@ onMounted(() => {
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :lg="6" :md="6" :xs="24">
|
<a-col :lg="6" :md="6" :xs="24">
|
||||||
<a-form-item
|
<a-form-item
|
||||||
:label="t('views.system.dict.dictStatus')"
|
:label="t('views.system.dict.dictSatus')"
|
||||||
name="status"
|
name="status"
|
||||||
>
|
>
|
||||||
<a-select
|
<a-select
|
||||||
|
|||||||
Reference in New Issue
Block a user