舱单弹窗

szh-new
lijingjia 4 months ago
parent ed012ecd4e
commit 5f99ad50ca

@ -82,7 +82,7 @@
height: 100%;
.scrollbar__wrap {
margin-bottom: 18px !important;
margin-bottom: 0 !important;
overflow-x: hidden;
}

@ -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%;

@ -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;

@ -147,7 +147,6 @@ export const formSchema: FormSchema[] = [
component: 'DatePicker',
required: true,
componentProps: {
// showTime: true,
valueFormat: 'YYYY-MM-DD',
},
colProps: { span: 8 },

@ -16,7 +16,7 @@ enum Api {
delete = '/mainApi/ClientParam/BatchDelClientParam',
GetTenantParamDataSelectList = '/mainApi/ClientParam/GetTenantParamDataSelectList'
}
// 列表 (Auth)
// 模版列表 (Auth)
export function GetSysPrintTemplateList(data) {
return request<DataResult>({
url: Api.list,
@ -59,11 +59,11 @@ export function EditSysPrintTemplate(data: PageRequest) {
}
// 模版详情
export function GetSysPrintTemplateInfo(data: PageRequest) {
export function GetSysPrintTemplateInfo(params) {
return request<DataResult>({
url: Api.temInfo,
method: 'post',
data
method: 'get',
params
})
}

@ -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 }
}
}
]

@ -1,15 +1,16 @@
<template>
<BasicModal
v-bind="$attrs"
:use-wrapper="true"
:title="getTitle"
:form-schema="formSchema"
width="50%"
@register="registerModal"
@ok="handleSave"
>
<!-- 包装表单 -->
<BasicForm @register="registerForm" />
<BasicForm @register="registerForm" style="height: 260px;">
<template #disable="{ model, field }">
<a-switch v-model:checked="model[field]" /> <span class="switch-tex">{{ model[field] ? '启用' : '禁用' }}</span>
</template>
</BasicForm>
<!--右下角按钮-->
<template #footer>
<a-button
@ -108,3 +109,10 @@
}
}
</script>
<style lang="less">
.switch-tex {
font-size: 12px;
margin-left: 5px;
}
</style>

@ -8,8 +8,11 @@
@register="registerModal"
@ok="handleSave"
>
<!-- 包装表单 -->
<BasicForm @register="registerForm" />
<BasicForm @register="registerForm" style="min-height: 300px;">
<template #isUseDataSource="{ model, field }">
<a-switch v-model:checked="model[field]" /> <span class="switch-tex">{{ model[field] ? '是' : '否' }}</span>
</template>
</BasicForm>
<!--右下角按钮-->
<template #footer>
<a-button
@ -108,3 +111,10 @@
}
}
</script>
<style lang="less">
.switch-tex {
font-size: 12px;
margin-left: 5px;
}
</style>

@ -12,7 +12,7 @@
<a-spin :spinning="mloading">
<div class="list-box">
<div v-for="item in modelList" :key="item.id" class="item">
<span @click="toggleTable(item)"><span class="count">{{ item.templateCount }}</span><span>{{ item.moduleName }}</span></span>
<span :class="{active: item.id == moduleId}" @click="toggleTable(item)"><span class="count">{{ item.templateCount }}</span><span>{{ item.moduleName }}</span></span>
<span style="float: right" class="iconfont icon-bianji1" @click="handleEdit(item)"></span>
</div>
<img v-if="modelList.length == 0" src="../../../assets/images/nodata1.png" alt="">
@ -101,13 +101,8 @@
})
},
beforeFetch: (p) => {
if (modalId) {
const condition = {
FieldName: 'modalId',
FieldValue: modalId,
ConditionalType: 1
}
p['queryCondition'] = JSON.stringify(condition)
if (moduleId.value) {
p['moduleId'] = moduleId.value
}
return formatParams(p)
},
@ -145,16 +140,16 @@
}
//
function handleEdit(record) {
openModal1(true, {
openModal2(true, {
record,
isUpdate: true,
})
}
// id
let modalId = ''
const moduleId = ref('')
//
const toggleTable = (item) => {
modalId = item.id
moduleId.value = item.id
reload()
}
//
@ -224,5 +219,12 @@
display: block;
}
}
.active {
span {color: #257AFA;}
.count {
background: #257AFA;
color: #ffffff;
}
}
}
</style>
Loading…
Cancel
Save