Compare commits

..

No commits in common. "4556a93e8b3cc7ef7d32d09819058d5e957d0811" and "8890df45b7310a2676826a472acf4774086ea8a3" have entirely different histories.

View File

@ -19,35 +19,6 @@
<template v-for="item in Parameter">
<el-form-item :label="item.paramOptiontype == '0' ? '' : item.paramName"
:class="{ 'checkbox-form-item': item.paramOptiontype == '0' }">
<template v-if="item.paramOptiontype == '0'">
<el-checkbox v-model="item.paramDefvalue" :label="item.paramName" true-value="1" false-value="0" />
</template>
<template v-if="item.paramOptiontype == '1'">
<el-select v-model="item.paramDefvalue" style="width:120px">
<el-option v-for="item in item.remark" :label="item.label" :value="item.value" />
</el-select>
</template>
<template v-if="item.paramOptiontype == '2'">
<SelectTable v-model:data="item.paramDefvalue" :dictType="item.remark" :optionselect="true"
placeholder="请选择" style="width:150px" size="small" />
</template>
<template v-if="item.paramOptiontype == '3'">
<el-select v-model="item.paramDefvalue" multiple filterable style="width:200px">
<el-option v-for="item in dictData[item.remark]" :label="item.label" :value="item.value" />
</el-select>
</template>
<template v-if="item.paramOptiontype == '4'">
<!-- 特殊处理 -->
</template>
<template v-if="item.paramOptiontype == '5'">
<el-input v-model="item.paramDefvalue" placeholder="请输入" />
</template>
<template v-if="item.paramOptiontype == '6'">
<el-input v-model="item.paramDefvalue" type="number" placeholder="请输入" />
</template>
<template v-if="item.paramOptiontype == '7'">
<el-date-picker v-model="item.paramDefvalue" type="date" format="YYYY-MM-DD"
value-format="YYYY-MM-DD" @change="handletime" style="width:120px" />
@ -57,6 +28,15 @@
<el-time-picker v-model="item.paramDefvalue" value-format="HH:mm:ss" format="HH:mm:ss"
style="width:100px" />
</template>
<template v-if="item.paramOptiontype == '2'">
<SelectTable v-model:data="item.paramDefvalue" :dictType="item.remark" :optionselect="true"
placeholder="请选择" style="width:150px" size="small" />
</template>
<template v-if="item.paramOptiontype == '0'">
<el-checkbox v-model="item.paramDefvalue" :label="item.paramName" true-value="1" false-value="0" />
</template>
</el-form-item>
</template>
</div>
@ -78,16 +58,16 @@
</el-col>
</el-row>
</el-form>
<!-- statsType==1 查询表格 0 统计 -->
<div class="print_box">
<div class="print_content" :style="{ width: Template.statsType == 1 ? '100%' : '70%' }">
<div class="title" v-if="statsTitle">{{ formatDict(userStore.sysLoginParam.loginYLJG, 'HOS') }}</div>
<div class="print_content">
<div class="title">{{ formatDict(userStore.sysLoginParam.loginYLJG, 'HOS') }}</div>
<div class="content">{{ statsTitle }}</div>
<div class="table-container bb_table" :style="{ height: `calc(100% - ${statsTitle ? '70px' : '15px'})` }">
<div class="table-container bb_table">
<vxe-table :data="tableData" border v-loading="loading" height="100%"
:tooltip-config="{ appendToBody: true, zIndex: 3000 }" show-footer :footer-method="getSummaries"
:scroll-y="{ enabled: true, rSize: 30, height: '100%', }" show-footer-overflow>
<vxe-column v-for="col in tableColumns" :key="col.prop" :title="col.label" :field="col.prop" width="120"
<vxe-column v-for="col in tableColumns" :key="col.prop" :title="col.label" :field="col.prop" width="100"
show-overflow align="center">
<template #default="scope">
{{ col.dictType ? formatDict(scope.row[col.prop], col.dictType) : scope.row[col.prop] }}
@ -100,7 +80,7 @@
<!-- 视觉移出屏幕,页面看不见,但DOM完整存在用于iframe打印 -->
<div class="print-only-wrap" id="printWrap">
<div class="title" v-if="!statsTitle">{{ formatDict(userStore.sysLoginParam.loginYLJG, 'HOS') }}</div>
<div class="title">{{ formatDict(userStore.sysLoginParam.loginYLJG, 'HOS') }}</div>
<div class="content">{{ statsTitle }}</div>
<!-- 原生完整table,无滚动、无虚拟DOM,所有数据全部渲染 -->
<table class="print-table" border="1" cellpadding="0" cellspacing="0">
@ -147,7 +127,7 @@ const queryParams = ref({
statItems: []
})
const Parameter = ref([])
const statsTitle = ref('')
const statsTitle = ref('' || '报告统计')
const tableData = ref([])
const loading = ref(false)
const sumColoums = ref([]) //计算列
@ -394,18 +374,6 @@ const getParams = () => {
checkBoxs.value = res.data.Column.filter(item => item.paramSequence == 0) //选择列 paramSequence==0
Template.value = res.data.Template //模板
statsTitle.value = res.data.Template.statsTitle //统计标题
Parameter.value.forEach(item => {
// 如果是多选类型,则将字典数据转换为数组
if (item.paramOptiontype == 1 && item.remark) {
const obj = JSON.parse(item.remark);
item.remark = Object.entries(obj).map(([value, label]) => ({ label, value }));
}
if (item.paramOptiontype == 3 && item.remark) {
getDictData(item.remark)
}
})
})
};
@ -524,6 +492,7 @@ onMounted(() => {
}
.table-container {
height: calc(100% - 70px);
padding: 10px;
}