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 @@ + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ item.label }} + + + + + + {{ + item.label + }} + + + + + + + + + + + + + (formData.fileName = name)" + :fileType="['image/jpeg', 'image/png', 'image/jpg', 'image/gif']" + name="config" + :fileSize="200" + v-model:image-url="formData.filePath" + > + 支持扩展名: jpg png jpeg;文件大小不超过200M + + + + + + + + + + + + + + + + + + + + + 正常 + 停用 + + + + + + + + + + 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 @@ + + + + + + + + + + + + + + + + 查询 + + + + + + + + + + + + 新建 + + + + + + 编辑 + + + + + + 删除 + + + + + + + + {{ item.name }}({{ item.code }}) + + + + + + + + + + + + + + + + + + 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 @@ + + + + + + + + + + + + + + + + 查询 + + + + + + + + + + + + 新建 + + + + + + 编辑 + + + + + + 删除 + + + + + + + + {{ item.name }}({{ item.code }}) + + + + + + + + + + + + + + + + + +