From b9434ab76558b18e5fbc5aab8ad797eada23c968 Mon Sep 17 00:00:00 2001 From: lb Date: Mon, 6 Mar 2023 17:02:40 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E6=8A=A5=E8=A1=A8=E5=88=86=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/pms/reportSheetCategory/config.js | 94 +++++++++++++++++++ .../modules/pms/reportSheetCategory/index.vue | 36 +++---- 2 files changed, 113 insertions(+), 17 deletions(-) create mode 100644 src/views/modules/pms/reportSheetCategory/config.js diff --git a/src/views/modules/pms/reportSheetCategory/config.js b/src/views/modules/pms/reportSheetCategory/config.js new file mode 100644 index 0000000..f6467d9 --- /dev/null +++ b/src/views/modules/pms/reportSheetCategory/config.js @@ -0,0 +1,94 @@ +import TableOperaionComponent from "@/components/noTemplateComponents/operationComponent"; +import switchBtn from "@/components/noTemplateComponents/switchBtn"; +import request from "@/utils/request"; +import { timeFilter } from "@/utils/filters"; + + +export default function () { + const tableProps = [ + { type: "index", label: "序号" }, + { prop: "createTime", label: "添加时间", filter: timeFilter }, + { prop: "name", label: "分类名称" }, + // { prop: "category", label: "报表分类" }, + { + prop: "operations", + name: "操作", + fixed: "right", + width: 240, + subcomponent: TableOperaionComponent, + options: [ + "edit", + { name: "delete", emitFull: true, permission: "pms:reportSheetCategory:delete" }, + ], + }, + ]; + + const headFormFields = [ + { + prop: "name", + label: "分类名称", + input: true, + default: { value: "" }, + bind: { + placeholder: "请输入分类名称", + }, + }, + { + button: { + type: "primary", + name: "查询", + }, + }, + { + button: { + type: "primary", + name: "新增", + permission: "pms:reportSheetCategory:save" + }, + bind: { + plain: true, + } + }, + ]; + + const dialogJustFormConfigs = { + form: { + rows: [ + [ + { + input: true, + label: "分类名称", + prop: "name", + rules: { required: true, message: "必填项不能为空", trigger: "blur" }, + elparams: { placeholder: "请输入分类名称" }, + }, + ], + ], + operations: [ + { name: "add", label: "保存", type: "primary", permission: "pms:reportSheetCategory:save", showOnEdit: false }, + { name: "update", label: "修改", type: "primary", permission: "pms:reportSheetCategory:update", showOnEdit: true }, + // { name: "reset", label: "重置", type: "warning", showAlways: true }, + // { name: 'cancel', label: '取消', showAlways: true }, + ], + }, + }; + + return { + dialogConfigs: dialogJustFormConfigs, + tableConfig: { + table: null, + column: tableProps, + }, + headFormConfigs: { + rules: null, + fields: headFormFields, + }, + urls: { + base: "/pms/reportSheetCategory", + page: "/pms/reportSheetCategory/page", + // subase: '/pms/blenderStepParam', + // subpage: '/pms/blenderStepParam/page', + // more... + }, + }; +} diff --git a/src/views/modules/pms/reportSheetCategory/index.vue b/src/views/modules/pms/reportSheetCategory/index.vue index 54b1a19..e9049b4 100644 --- a/src/views/modules/pms/reportSheetCategory/index.vue +++ b/src/views/modules/pms/reportSheetCategory/index.vue @@ -1,27 +1,29 @@ - +