优化字典、配置、参数、消息、行政区划
This commit is contained in:
parent
a5b1a54113
commit
3b383cdb3b
@ -53,13 +53,13 @@
|
||||
{
|
||||
title: '城市名称',
|
||||
key: 'name',
|
||||
width: 100,
|
||||
width: 250,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: '城市拼音',
|
||||
key: 'pinyin',
|
||||
width: 100,
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
title: '城市级别',
|
||||
@ -97,7 +97,7 @@
|
||||
{
|
||||
title: '行政编码',
|
||||
key: 'areaCode',
|
||||
width: 100,
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
title: '城市邮编',
|
||||
|
@ -97,6 +97,10 @@
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
/**
|
||||
* 定义操作栏
|
||||
*/
|
||||
const actionColumn = reactive({
|
||||
width: 200,
|
||||
title: '操作',
|
||||
|
@ -88,11 +88,15 @@
|
||||
},
|
||||
});
|
||||
|
||||
/**
|
||||
* 定义模态
|
||||
*/
|
||||
const [modalRegister, { openModal, setSubLoading }] = useModal({
|
||||
title: props.configId ? '编辑配置' : '添加配置',
|
||||
subBtuText: '确定',
|
||||
width: 600,
|
||||
});
|
||||
|
||||
/**
|
||||
* 执行提交表单
|
||||
*/
|
||||
@ -139,7 +143,10 @@
|
||||
setFormData();
|
||||
}
|
||||
});
|
||||
//导出方法
|
||||
|
||||
/**
|
||||
* 定义函数
|
||||
*/
|
||||
defineExpose({
|
||||
openModal,
|
||||
});
|
||||
|
@ -270,11 +270,16 @@
|
||||
});
|
||||
const fwbHeight = document.body.clientHeight - 400;
|
||||
const optionsData = ref([]);
|
||||
|
||||
/**
|
||||
* 定义模态
|
||||
*/
|
||||
const [modalRegister, { openModal, setProps, setSubLoading }] = useModal({
|
||||
title: props.configItemId ? '编辑配置项' : '新增配置项',
|
||||
subBtuText: '确定',
|
||||
width: 600,
|
||||
});
|
||||
|
||||
/**
|
||||
* 定义类型数据
|
||||
*/
|
||||
@ -544,7 +549,10 @@
|
||||
setFormData();
|
||||
}
|
||||
});
|
||||
//导出方法
|
||||
|
||||
/**
|
||||
* 定义函数
|
||||
*/
|
||||
defineExpose({
|
||||
openModal,
|
||||
});
|
||||
|
@ -101,7 +101,6 @@
|
||||
import { PlusOutlined, FormOutlined, DeleteOutlined, SearchOutlined } from '@vicons/antd';
|
||||
import editDialog from './edit.vue';
|
||||
import configItem from './configItem.vue';
|
||||
import { basicModal, useModal } from '@/components/Modal';
|
||||
import { useMessage, useDialog } from 'naive-ui';
|
||||
|
||||
/**
|
||||
|
@ -18,20 +18,17 @@
|
||||
/>
|
||||
<n-button type="primary" @click="reloadTable">
|
||||
<template #icon>
|
||||
<n-icon>
|
||||
<SearchOutlined /> </n-icon></template
|
||||
<n-icon> <SearchOutlined /> </n-icon></template
|
||||
>查询
|
||||
</n-button>
|
||||
<n-button type="primary" @click="handleAdd">
|
||||
<template #icon>
|
||||
<n-icon>
|
||||
<PlusOutlined /> </n-icon></template
|
||||
<n-icon> <PlusOutlined /> </n-icon></template
|
||||
>新建</n-button
|
||||
>
|
||||
<n-button type="error" :disabled="!selectionData.length" @click="handleDelete()">
|
||||
<template #icon>
|
||||
<n-icon>
|
||||
<DeleteOutlined /> </n-icon></template
|
||||
<n-icon> <DeleteOutlined /> </n-icon></template
|
||||
>删除</n-button
|
||||
>
|
||||
</n-space>
|
||||
|
@ -88,6 +88,9 @@
|
||||
},
|
||||
});
|
||||
|
||||
/**
|
||||
* 定义模态
|
||||
*/
|
||||
const [modalRegister, { openModal, setSubLoading }] = useModal({
|
||||
title: props.dictId ? '编辑字典' : '添加字典',
|
||||
subBtuText: '确定',
|
||||
@ -139,7 +142,10 @@
|
||||
setFormData();
|
||||
}
|
||||
});
|
||||
//导出方法
|
||||
|
||||
/**
|
||||
* 定义函数
|
||||
*/
|
||||
defineExpose({
|
||||
openModal,
|
||||
});
|
||||
|
@ -54,7 +54,6 @@
|
||||
import { onMounted, ref, reactive, nextTick } from 'vue';
|
||||
import { useMessage } from 'naive-ui';
|
||||
import { useModal } from '@/components/Modal';
|
||||
import { renderIcon } from '@/utils';
|
||||
|
||||
/**
|
||||
* 定义接收的参数
|
||||
@ -233,7 +232,10 @@
|
||||
setFormData();
|
||||
}
|
||||
});
|
||||
//导出方法
|
||||
|
||||
/**
|
||||
* 定义函数
|
||||
*/
|
||||
defineExpose({
|
||||
openModal,
|
||||
});
|
||||
|
@ -101,7 +101,6 @@
|
||||
import { PlusOutlined, FormOutlined, DeleteOutlined, SearchOutlined } from '@vicons/antd';
|
||||
import editDialog from './edit.vue';
|
||||
import dictItem from './dictItem.vue';
|
||||
import { basicModal, useModal } from '@/components/Modal';
|
||||
import { useMessage, useDialog } from 'naive-ui';
|
||||
|
||||
/**
|
||||
|
@ -15,7 +15,7 @@ export const columns = [
|
||||
{
|
||||
title: '消息标题',
|
||||
key: 'title',
|
||||
width: 100,
|
||||
width: 250,
|
||||
},
|
||||
{
|
||||
title: '消息类型',
|
||||
|
@ -76,6 +76,7 @@
|
||||
const data = await getMessageDetail(props.messageId);
|
||||
formData.value = data;
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取类型描述
|
||||
* @param type 类型
|
||||
@ -106,7 +107,10 @@
|
||||
setFormData();
|
||||
}
|
||||
});
|
||||
//导出方法
|
||||
|
||||
/**
|
||||
* 定义函数
|
||||
*/
|
||||
defineExpose({
|
||||
openModal,
|
||||
});
|
||||
|
@ -54,10 +54,12 @@
|
||||
import { columns } from './columns';
|
||||
import { DeleteOutlined, EyeOutlined } from '@vicons/antd';
|
||||
import editDialog from './edit.vue';
|
||||
import { basicModal, useModal } from '@/components/Modal';
|
||||
import { schemas } from './querySchemas';
|
||||
import { renderIcon } from '@/utils';
|
||||
|
||||
/**
|
||||
* 定义参数
|
||||
*/
|
||||
const message = useMessage();
|
||||
const dialog = useDialog();
|
||||
const basicTableRef = ref();
|
||||
@ -65,8 +67,11 @@
|
||||
const editVisible = ref(false);
|
||||
const messageId = ref(0);
|
||||
const rowKeys = ref([]);
|
||||
|
||||
const showModal = ref(false);
|
||||
|
||||
/**
|
||||
* 定义查询参数
|
||||
*/
|
||||
const formParams = reactive({
|
||||
title: '',
|
||||
bizType: '',
|
||||
@ -74,6 +79,9 @@
|
||||
status: '',
|
||||
});
|
||||
|
||||
/**
|
||||
* 定义操作栏
|
||||
*/
|
||||
const actionColumn = reactive({
|
||||
width: 200,
|
||||
title: '操作',
|
||||
@ -103,24 +111,36 @@
|
||||
},
|
||||
});
|
||||
|
||||
function addTable() {
|
||||
showModal.value = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载数据列表
|
||||
* @param res 参数
|
||||
*/
|
||||
const loadDataTable = async (res) => {
|
||||
rowKeys.value = [];
|
||||
const result = await getMessageList({ ...formParams, ...res });
|
||||
return result;
|
||||
};
|
||||
|
||||
/**
|
||||
* 数据行选中事件
|
||||
* @param keys 参数
|
||||
*/
|
||||
function onCheckedRow(keys) {
|
||||
rowKeys.value = keys;
|
||||
}
|
||||
|
||||
/**
|
||||
* 刷新数据列表
|
||||
* @param noRefresh 参数
|
||||
*/
|
||||
function reloadTable(noRefresh = '') {
|
||||
basicTableRef.value.reload(noRefresh ? {} : { pageNo: 1 });
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行提交表单
|
||||
* @param values 参数
|
||||
*/
|
||||
function handleSubmit(values: Recordable) {
|
||||
for (const key in formParams) {
|
||||
formParams[key] = '';
|
||||
@ -131,6 +151,10 @@
|
||||
reloadTable();
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行重置
|
||||
* @param values 参数
|
||||
*/
|
||||
function handleReset(values: Recordable) {
|
||||
for (const key in formParams) {
|
||||
formParams[key] = '';
|
||||
@ -141,6 +165,9 @@
|
||||
reloadTable();
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行注册
|
||||
*/
|
||||
const [register, {}] = useForm({
|
||||
gridProps: { cols: '1 s:1 m:2 l:3 xl:4 2xl:4' },
|
||||
labelWidth: 80,
|
||||
@ -156,6 +183,7 @@
|
||||
await nextTick();
|
||||
createModalRef.value.openModal();
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行删除
|
||||
* @param id 参数
|
||||
|
@ -83,7 +83,7 @@
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
name: '',
|
||||
type: undefined,
|
||||
type: 0,
|
||||
code: '',
|
||||
value: '',
|
||||
status: 1,
|
||||
@ -106,17 +106,26 @@
|
||||
default: 0,
|
||||
},
|
||||
});
|
||||
const [modalRegister, { openModal, setSubLoading }] = useModal({
|
||||
title: props.paramId ? '编辑参数' : '添加参数',
|
||||
subBtuText: '确定',
|
||||
width: 600,
|
||||
});
|
||||
|
||||
/**
|
||||
* 定义参数类型选项
|
||||
*/
|
||||
const optionData = {
|
||||
typeList: [
|
||||
{ label: '系统', value: 0 },
|
||||
{ label: '业务', value: 1 },
|
||||
],
|
||||
};
|
||||
|
||||
/**
|
||||
* 定义模态
|
||||
*/
|
||||
const [modalRegister, { openModal, setSubLoading }] = useModal({
|
||||
title: props.paramId ? '编辑参数' : '添加参数',
|
||||
subBtuText: '确定',
|
||||
width: 600,
|
||||
});
|
||||
|
||||
/**
|
||||
* 执行提交
|
||||
*/
|
||||
@ -162,7 +171,10 @@
|
||||
setFormData();
|
||||
}
|
||||
});
|
||||
//导出方法
|
||||
|
||||
/**
|
||||
* 定义函数
|
||||
*/
|
||||
defineExpose({
|
||||
openModal,
|
||||
});
|
||||
|
@ -27,7 +27,6 @@
|
||||
</template>
|
||||
新建
|
||||
</n-button>
|
||||
|
||||
<n-button
|
||||
type="error"
|
||||
@click="handleDelete"
|
||||
@ -63,9 +62,7 @@
|
||||
import { getParamList, paramDelete, paramBatchDelete } from '@/api/data/param';
|
||||
import { columns } from './columns';
|
||||
import { PlusOutlined, DeleteOutlined, FormOutlined } from '@vicons/antd';
|
||||
import CreateModal from './CreateModal.vue';
|
||||
import editDialog from './edit.vue';
|
||||
import { basicModal, useModal } from '@/components/Modal';
|
||||
import { schemas } from './querySchemas';
|
||||
import { renderIcon } from '@/utils';
|
||||
|
||||
@ -76,15 +73,19 @@
|
||||
const editVisible = ref(false);
|
||||
const paramId = ref(0);
|
||||
const rowKeys = ref([]);
|
||||
const exportLoading = ref(false);
|
||||
|
||||
const showModal = ref(false);
|
||||
/**
|
||||
* 定义查询参数
|
||||
*/
|
||||
const formParams = reactive({
|
||||
name: '',
|
||||
type: '',
|
||||
status: '',
|
||||
});
|
||||
|
||||
/**
|
||||
* 定义操作栏
|
||||
*/
|
||||
const actionColumn = reactive({
|
||||
width: 200,
|
||||
title: '操作',
|
||||
@ -114,10 +115,10 @@
|
||||
},
|
||||
});
|
||||
|
||||
function addTable() {
|
||||
showModal.value = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载数据列表
|
||||
* @param res 参数
|
||||
*/
|
||||
const loadDataTable = async (res) => {
|
||||
rowKeys.value = [];
|
||||
const result = await getParamList({ ...formParams, ...res });
|
||||
@ -125,14 +126,26 @@
|
||||
return result;
|
||||
};
|
||||
|
||||
/**
|
||||
* 数据行选中事件
|
||||
* @param keys 参数
|
||||
*/
|
||||
function onCheckedRow(keys) {
|
||||
rowKeys.value = keys;
|
||||
}
|
||||
|
||||
/**
|
||||
* 刷新数据列表
|
||||
* @param noRefresh 参数
|
||||
*/
|
||||
function reloadTable(noRefresh = '') {
|
||||
basicTableRef.value.reload(noRefresh ? {} : { pageNo: 1 });
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行提交表单
|
||||
* @param values 参数
|
||||
*/
|
||||
function handleSubmit(values: Recordable) {
|
||||
for (const key in formParams) {
|
||||
formParams[key] = '';
|
||||
@ -143,6 +156,10 @@
|
||||
reloadTable();
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行重置
|
||||
* @param values 参数
|
||||
*/
|
||||
function handleReset(values: Recordable) {
|
||||
for (const key in formParams) {
|
||||
formParams[key] = '';
|
||||
@ -153,6 +170,9 @@
|
||||
reloadTable();
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行注册
|
||||
*/
|
||||
const [register, {}] = useForm({
|
||||
gridProps: { cols: '1 s:1 m:2 l:3 xl:4 2xl:4' },
|
||||
labelWidth: 80,
|
||||
@ -168,6 +188,7 @@
|
||||
await nextTick();
|
||||
createModalRef.value.openModal();
|
||||
};
|
||||
|
||||
/**
|
||||
* 执行编辑
|
||||
*/
|
||||
@ -177,6 +198,7 @@
|
||||
await nextTick();
|
||||
createModalRef.value.openModal();
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行删除
|
||||
* @param id 参数
|
||||
|
Loading…
Reference in New Issue
Block a user