From 5f99ad50ca2a354b8db2e064fcf47004a2769ec3 Mon Sep 17 00:00:00 2001 From: lijingjia Date: Tue, 23 Jul 2024 11:31:55 +0800 Subject: [PATCH] =?UTF-8?q?=E8=88=B1=E5=8D=95=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Container/src/ScrollContainer.vue | 2 +- src/design/ant/form.less | 4 ++ src/design/ant/modal.less | 13 +++- src/views/system/notice/columns.tsx | 1 - src/views/system/print/api.ts | 8 +-- src/views/system/print/columns.tsx | 60 +++++++++++++++++-- src/views/system/print/components/Modal.vue | 16 +++-- .../system/print/components/temModal.vue | 14 ++++- src/views/system/print/index.vue | 24 ++++---- 9 files changed, 110 insertions(+), 32 deletions(-) diff --git a/src/components/Container/src/ScrollContainer.vue b/src/components/Container/src/ScrollContainer.vue index afdba247..4ce4fffd 100644 --- a/src/components/Container/src/ScrollContainer.vue +++ b/src/components/Container/src/ScrollContainer.vue @@ -82,7 +82,7 @@ height: 100%; .scrollbar__wrap { - margin-bottom: 18px !important; + margin-bottom: 0 !important; overflow-x: hidden; } diff --git a/src/design/ant/form.less b/src/design/ant/form.less index cefa073e..20456d81 100644 --- a/src/design/ant/form.less +++ b/src/design/ant/form.less @@ -24,6 +24,10 @@ .ant-select-selection-search-input, .ant-input-affix-wrapper, .ant-input-number-input { height: 26px!important; } + // 解除文本框高度受限制 + .ant-input-affix-wrapper-textarea-with-clear-btn { + height: auto!important; + } .ant-picker-small { height: 26px; width: 100%; diff --git a/src/design/ant/modal.less b/src/design/ant/modal.less index 43cdc0b7..3e370fda 100644 --- a/src/design/ant/modal.less +++ b/src/design/ant/modal.less @@ -6,13 +6,20 @@ font-size: 12px; position: relative; top: 16px; - left: 16px; + left: 15px; + .vben-basic-title { + padding-left: 0; + } } } .ant-modal-body { padding: 15px 30px; - margin-top: 5px; + margin-top: 0; + .scroll-container { + padding: 0 30px!important; + } .ant-form { + height: 100%; background-color: #F5F9FC; border-radius: 2px; padding: 10px 20px 15px; @@ -28,7 +35,7 @@ } } .ant-modal-footer { - border: none; + border-top: none!important; padding: 5px 30px 20px; .ant-btn { height: 26px; diff --git a/src/views/system/notice/columns.tsx b/src/views/system/notice/columns.tsx index e16eff0a..4b841c04 100644 --- a/src/views/system/notice/columns.tsx +++ b/src/views/system/notice/columns.tsx @@ -147,7 +147,6 @@ export const formSchema: FormSchema[] = [ component: 'DatePicker', required: true, componentProps: { - // showTime: true, valueFormat: 'YYYY-MM-DD', }, colProps: { span: 8 }, diff --git a/src/views/system/print/api.ts b/src/views/system/print/api.ts index 2e5bdf4f..ad0eede3 100644 --- a/src/views/system/print/api.ts +++ b/src/views/system/print/api.ts @@ -16,7 +16,7 @@ enum Api { delete = '/mainApi/ClientParam/BatchDelClientParam', GetTenantParamDataSelectList = '/mainApi/ClientParam/GetTenantParamDataSelectList' } -// 列表 (Auth) +// 模版列表 (Auth) export function GetSysPrintTemplateList(data) { return request({ url: Api.list, @@ -59,11 +59,11 @@ export function EditSysPrintTemplate(data: PageRequest) { } // 模版详情 -export function GetSysPrintTemplateInfo(data: PageRequest) { +export function GetSysPrintTemplateInfo(params) { return request({ url: Api.temInfo, - method: 'post', - data + method: 'get', + params }) } diff --git a/src/views/system/print/columns.tsx b/src/views/system/print/columns.tsx index 7c788683..f01062bb 100644 --- a/src/views/system/print/columns.tsx +++ b/src/views/system/print/columns.tsx @@ -77,8 +77,9 @@ export const formSchema: FormSchema[] = [ { field: 'disable', label: '是否可用', + slot: 'disable', defaultValue: 0, - component: 'RadioButtonGroup', + component: 'Switch', colProps: { span: 12 }, componentProps: { options: [ @@ -91,7 +92,10 @@ export const formSchema: FormSchema[] = [ field: 'note', label: '备注', component: 'InputTextArea', - colProps: { span: 24 } + colProps: { span: 24 }, + componentProps: { + autoSize: { minRows: 5, maxRows: 5 } + } } ] @@ -114,8 +118,9 @@ export const temFormSchema: FormSchema[] = [ { field: 'printType', label: '打印类型', - required: true, component: 'Select', + show: false, + defaultValue: 1, colProps: { span: 12 }, componentProps: () => { return { @@ -136,7 +141,7 @@ export const temFormSchema: FormSchema[] = [ label: '所属模块', field: 'templateCode', component: 'ApiSelect', - required: false, + required: true, dynamicDisabled: false, // defaultValue: '', colProps: { span: 12 }, @@ -178,7 +183,8 @@ export const temFormSchema: FormSchema[] = [ { field: 'isUseDataSource', label: '是否使用数据源', - defaultValue: 0, + slot: 'isUseDataSource', + defaultValue: false, component: 'RadioButtonGroup', colProps: { span: 12 }, componentProps: { @@ -188,13 +194,55 @@ export const temFormSchema: FormSchema[] = [ ] } }, + { + field: 'sourceSql', + label: '数据源', + component: 'InputTextArea', + colProps: { span: 24 }, + componentProps: { + autoSize: { minRows: 3, maxRows: 20 } + }, + show: ({ values }) => { + return values.isUseDataSource + } + }, + { + field: 'inParamColumn', + label: '入口参数', + component: 'Input', + colProps: { span: 12 }, + show: ({ values }) => { + return values.isUseDataSource + } + }, + { + field: 'groupBy', + label: '分组字段', + component: 'Input', + colProps: { span: 12 }, + show: ({ values }) => { + return values.isUseDataSource + } + }, + { + field: 'columnView', + label: '参数', + component: 'InputTextArea', + colProps: { span: 24 }, + componentProps: { + autoSize: { minRows: 3, maxRows: 20 } + }, + show: ({ values }) => { + return values.isUseDataSource + } + }, { field: 'printJsonContent', label: '打印设计内容', component: 'InputTextArea', colProps: { span: 24 }, componentProps: { - autoSize: { minRows: 3, maxRows: 20 } + autoSize: { minRows: 5, maxRows: 20 } } } ] \ No newline at end of file diff --git a/src/views/system/print/components/Modal.vue b/src/views/system/print/components/Modal.vue index 0b525a20..a0fee10e 100644 --- a/src/views/system/print/components/Modal.vue +++ b/src/views/system/print/components/Modal.vue @@ -1,15 +1,16 @@