重构小程序端管理模块
This commit is contained in:
@@ -51,12 +51,13 @@
|
||||
import { pageDictData } from '@/api/system/dict-data';
|
||||
import { DictData, DictDataParam } from '@/api/system/dict-data/model';
|
||||
|
||||
defineProps<{
|
||||
const props = defineProps<{
|
||||
// 弹窗是否打开
|
||||
visible: boolean;
|
||||
title?: any;
|
||||
// 修改回显的数据
|
||||
data?: DictData | null;
|
||||
dictCode?: string;
|
||||
}>();
|
||||
|
||||
const emit = defineEmits<{
|
||||
@@ -93,6 +94,11 @@
|
||||
dataIndex: 'dictDataName',
|
||||
key: 'dictDataName'
|
||||
},
|
||||
{
|
||||
title: '描述',
|
||||
dataIndex: 'comments',
|
||||
key: 'comments'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
@@ -103,7 +109,7 @@
|
||||
|
||||
// 表格数据源
|
||||
const datasource: DatasourceFunction = ({ page, limit, where, orders }) => {
|
||||
where.dictCode = 'groupId';
|
||||
where.dictCode = props.dictCode;
|
||||
return pageDictData({
|
||||
...where,
|
||||
...orders,
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
<select-data
|
||||
v-model:visible="showEdit"
|
||||
:data="current"
|
||||
:dictCode="dictCode"
|
||||
:title="placeholder"
|
||||
@done="onChange"
|
||||
/>
|
||||
@@ -32,6 +33,7 @@
|
||||
value?: any;
|
||||
placeholder?: string;
|
||||
index?: number;
|
||||
dictCode?: string;
|
||||
}>(),
|
||||
{
|
||||
placeholder: '请选择字典'
|
||||
|
||||
Reference in New Issue
Block a user