From dd3ad431e0f8f3c5a235d48f4d14ab5d9479ac9f Mon Sep 17 00:00:00 2001 From: zjl Date: Fri, 13 Dec 2024 11:04:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=9F=8E=E5=B8=82=E3=80=81?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/data/city/index.vue | 46 +++++++------------------------- src/views/data/config/columns.ts | 5 ++++ 2 files changed, 14 insertions(+), 37 deletions(-) diff --git a/src/views/data/city/index.vue b/src/views/data/city/index.vue index bb9214f..f044be5 100644 --- a/src/views/data/city/index.vue +++ b/src/views/data/city/index.vue @@ -139,10 +139,12 @@ }, }, ]; + + /** + * 定义参数 + */ const message = useMessage(); const dialog = useDialog(); - const fwbHeight = document.body.clientHeight - 350; - const loading = ref(false); const createModalRef = ref(); const editVisible = ref(false); const showTable = ref(true); @@ -164,6 +166,7 @@ }); lists.value = data; }; + /** * 刷新数据列表 */ @@ -178,41 +181,6 @@ showTable.value = true; }; - const actionColumn = reactive({ - width: 220, - title: '操作', - align: 'center', - key: 'action', - fixed: 'right', - render(record) { - return h(TableAction as any, { - style: 'button', - actions: [ - { - label: '新增', - type: 'info', - icon: renderIcon(PlusOutlined), - auth: ['sys:city:add'], - onclick: handleAdd.bind(null, record), - }, - { - label: '编辑', - type: 'warning', - icon: renderIcon(FormOutlined), - auth: ['sys:city:update'], - onclick: handleEdit.bind(null, record), - }, - { - label: '删除', - type: 'error', - icon: renderIcon(DeleteOutlined), - auth: ['sys:city:delete'], - onclick: handleDelete.bind(null, record), - }, - ], - }); - }, - }); /** * 执行添加 @@ -266,6 +234,10 @@ }); }; + /** + * 获取子级数据 + * @param row 参数 + */ const getChild = async (row: Record) => { expandKeys.value.push(row.areaCode); return new Promise(async (resolve) => { diff --git a/src/views/data/config/columns.ts b/src/views/data/config/columns.ts index 020c19a..e66b1c0 100644 --- a/src/views/data/config/columns.ts +++ b/src/views/data/config/columns.ts @@ -9,17 +9,22 @@ export const columns = [ { title: 'ID', key: 'id', + fixed: 'left', + width: 50, }, { title: '配置名称', key: 'name', + width: 100, }, { title: '配置编码', key: 'code', + width: 100, }, { title: '排序', key: 'sort', + width: 100, }, ];