From 337df8e1e4f649b770a21bea1d5b019fa7540ddd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E7=BA=A2=E4=B8=BD?= <1181930680@qq.com> Date: Fri, 29 Nov 2024 10:36:01 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E3=80=81=E5=AD=97=E5=85=B8?= =?UTF-8?q?=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/data/config/columns.ts | 25 ++ src/views/data/config/columnsItem.ts | 113 ++++++ src/views/data/config/configItem.vue | 200 ++++++++++ src/views/data/config/edit.vue | 146 +++++++ src/views/data/config/editItem.vue | 551 +++++++++++++++++++++++++++ src/views/data/config/index.vue | 250 ++++++++++++ src/views/data/dict/columns.ts | 21 + src/views/data/dict/columnsItem.ts | 44 +++ src/views/data/dict/dictItem.vue | 203 ++++++++++ src/views/data/dict/edit.vue | 146 +++++++ src/views/data/dict/editItem.vue | 240 ++++++++++++ src/views/data/dict/index.vue | 250 ++++++++++++ 12 files changed, 2189 insertions(+) create mode 100644 src/views/data/config/columns.ts create mode 100644 src/views/data/config/columnsItem.ts create mode 100644 src/views/data/config/configItem.vue create mode 100644 src/views/data/config/edit.vue create mode 100644 src/views/data/config/editItem.vue create mode 100644 src/views/data/config/index.vue create mode 100644 src/views/data/dict/columns.ts create mode 100644 src/views/data/dict/columnsItem.ts create mode 100644 src/views/data/dict/dictItem.vue create mode 100644 src/views/data/dict/edit.vue create mode 100644 src/views/data/dict/editItem.vue create mode 100644 src/views/data/dict/index.vue diff --git a/src/views/data/config/columns.ts b/src/views/data/config/columns.ts new file mode 100644 index 0000000..020c19a --- /dev/null +++ b/src/views/data/config/columns.ts @@ -0,0 +1,25 @@ +import { h } from 'vue'; + +export const columns = [ + { + type: 'selection', + width: 50, + fixed: 'left', + }, + { + title: 'ID', + key: 'id', + }, + { + title: '配置名称', + key: 'name', + }, + { + title: '配置编码', + key: 'code', + }, + { + title: '排序', + key: 'sort', + }, +]; diff --git a/src/views/data/config/columnsItem.ts b/src/views/data/config/columnsItem.ts new file mode 100644 index 0000000..6fefef1 --- /dev/null +++ b/src/views/data/config/columnsItem.ts @@ -0,0 +1,113 @@ +import { h } from 'vue'; +import { NTag } from 'naive-ui'; +export const columns = [ + { + type: 'selection', + width: 50, + fixed: 'left', + }, + { + title: 'ID', + key: 'id', + fixed: 'left', + width: 50, + }, + { + title: '配置项名称', + key: 'name', + width: 100, + }, + { + title: '配置项编码', + key: 'code', + width: 100, + }, + { + title: '配置项值', + key: 'value', + width: 100, + }, + { + title: '配置项类型', + key: 'type', + width: 100, + render(record) { + let typeText = ''; + switch (record.type) { + case 'hidden': + typeText = '隐藏'; + break; + case 'readonly': + typeText = '只读文本'; + break; + case 'number': + typeText = '数字'; + break; + case 'text': + typeText = '单行文本'; + break; + case 'textarea': + typeText = '多行文本'; + break; + case 'password': + typeText = '密码'; + break; + case 'radio': + typeText = '单选框'; + break; + case 'checkbox': + typeText = '复选框'; + break; + case 'select': + typeText = '下拉框(单选)'; + break; + case 'selects': + typeText = '下拉框(多选)'; + break; + case 'icon': + typeText = '字体图标'; + break; + case 'date': + typeText = '日期'; + break; + case 'datetime': + typeText = '时间'; + break; + case 'image': + typeText = '单张图片'; + break; + case 'images': + typeText = '多张图片'; + break; + case 'file': + typeText = '单个文件'; + break; + case 'files': + typeText = '多个文件'; + break; + case 'ueditor': + typeText = '富文本编辑器'; + break; + default: + break; + } + return h('span', typeText || '-'); + }, + }, + { + title: '配置项状态', + key: 'status', + width: 100, + render(record) { + return h( + NTag, + { + type: record.status == 1 ? 'success' : 'error', + }, + { + default: () => (record.status == 1 ? '正常' : '停用'), + }, + ); + }, + }, +]; diff --git a/src/views/data/config/configItem.vue b/src/views/data/config/configItem.vue new file mode 100644 index 0000000..f4b4b76 --- /dev/null +++ b/src/views/data/config/configItem.vue @@ -0,0 +1,200 @@ + + + + diff --git a/src/views/data/config/edit.vue b/src/views/data/config/edit.vue new file mode 100644 index 0000000..4915f29 --- /dev/null +++ b/src/views/data/config/edit.vue @@ -0,0 +1,146 @@ + + diff --git a/src/views/data/config/editItem.vue b/src/views/data/config/editItem.vue new file mode 100644 index 0000000..5a2ca0a --- /dev/null +++ b/src/views/data/config/editItem.vue @@ -0,0 +1,551 @@ + + diff --git a/src/views/data/config/index.vue b/src/views/data/config/index.vue new file mode 100644 index 0000000..9208604 --- /dev/null +++ b/src/views/data/config/index.vue @@ -0,0 +1,250 @@ + + + + diff --git a/src/views/data/dict/columns.ts b/src/views/data/dict/columns.ts new file mode 100644 index 0000000..16638a6 --- /dev/null +++ b/src/views/data/dict/columns.ts @@ -0,0 +1,21 @@ +import { h } from 'vue'; + +export const columns = [ + { + type: 'selection', + width: 50, + fixed: 'left', + }, + { + title: 'ID', + key: 'id', + }, + { + title: '字典名称', + key: 'name', + }, + { + title: '字典编码', + key: 'code', + }, +]; diff --git a/src/views/data/dict/columnsItem.ts b/src/views/data/dict/columnsItem.ts new file mode 100644 index 0000000..91ccd3b --- /dev/null +++ b/src/views/data/dict/columnsItem.ts @@ -0,0 +1,44 @@ +import { h } from 'vue'; +import { NTag } from 'naive-ui'; +export const columns = [ + { + type: 'selection', + width: 50, + fixed: 'left', + }, + { + title: '字典名称', + key: 'name', + width: 100, + }, + { + title: '字典编码', + key: 'dictCode', + width: 100, + }, + { + title: '字典项值', + key: 'value', + width: 100, + }, + { + title: '排序', + key: 'sort', + width: 100, + }, + { + title: '备注', + key: 'note', + width: 100, + }, + { + title: '创建人', + key: 'createUser', + width: 100, + }, + { + title: '创建时间', + key: 'createTime', + width: 180, + }, +]; diff --git a/src/views/data/dict/dictItem.vue b/src/views/data/dict/dictItem.vue new file mode 100644 index 0000000..a765193 --- /dev/null +++ b/src/views/data/dict/dictItem.vue @@ -0,0 +1,203 @@ + + + + diff --git a/src/views/data/dict/edit.vue b/src/views/data/dict/edit.vue new file mode 100644 index 0000000..4049d35 --- /dev/null +++ b/src/views/data/dict/edit.vue @@ -0,0 +1,146 @@ + + diff --git a/src/views/data/dict/editItem.vue b/src/views/data/dict/editItem.vue new file mode 100644 index 0000000..11f0c75 --- /dev/null +++ b/src/views/data/dict/editItem.vue @@ -0,0 +1,240 @@ + + diff --git a/src/views/data/dict/index.vue b/src/views/data/dict/index.vue new file mode 100644 index 0000000..1f39d4b --- /dev/null +++ b/src/views/data/dict/index.vue @@ -0,0 +1,250 @@ + + + +