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