官网:http://hiprint.io/docs/table
一、如何合并表格列/行?
rowsColumnsMerge
1、实现第一种情况 合并 每 2 行 的 第 1 列
// 行/列 合并函数
{
rowsColumnsMerge:function (data, row, colIndex, rowIndex) {
console.log('data', data);
console.log('row', row);
console.log('colIndex', colIndex);
console.log('rowIndex', rowIndex);
// 返回一个数组,参数一为行(rowspan)合并数,参数二为列(colspan)合并数, 被合并的行或者列值设为0
if (rowIndex%2 == 0) { // 0、2、4 行
if (colIndex == 0) { // 1列
// 设置合并的 行/列 数量
return [2, 1]
}
return [1, 1]
} else {
// 1、3 行
if (colIndex == 0) { // 1列
// 被合并的 行/列 设置为 0
return [0, 1]
}
return [1, 1]
}
}
}
2、实现第二种情况 合并 每行 的 前 2 列
// 行/列 合并函数
{
rowsColumnsMerge:function (data, row, colIndex, rowIndex) {
console.log('data', data);
console.log('row', row);
console.log('colIndex', colIndex);
console.log('rowIndex', rowIndex);
// 返回一个数组,参数一为行(rowspan)合并数,参数二为列(colspan)合并数, 被合并的行或者列值设为0
if (colIndex == 0) { // 第1列
return [1, 2]
} else if (colIndex == 1) { // 第2列
return [1, 0]
} else {
return [1, 1]
}
}
}
二、表格分栏显示?
gridColumns
同样的表格结构,想左边显示一个,右边显示一个。这种情况,仅需设置2个参数即可:
-
一行多组(
gridColumns) -
一行多组间隔 (
gridColumnsGutter)
如看效果图:

三、表格自动补全/最大行数限制?
有时分栏显示了,数据总是少那么一两行,不够美观。怎么办呢?
自动补全功能是将剩余位置填满空白行。 最大行数功能就是每页限制填充的数据行数。
看效果:
四、表格分页多余空白问题?
这种情况主要原因是:分页计算的 tr 高度 与实际渲染的 tr 高度不一致导致的。
那么为什么高度不一致呢? 原因有大概有几种情况:
-
表格
行内的元素/文本自动换行导致 -
样式污染导致 -
计算机分辨率
设置了缩放导致
具体原因具体分析。如果是第 1 种,可以尝试固定表体行高。如图:
第 2 种,就需要自行检查,有没有全局 tr/td 这种固定高度,边距之类的全局样式。
第 3 种,检查计算机是否有缩放配置。
最终原因都是因为计算高度与渲染高度不一致导致的。
五、表格列渲染二维码/图片?
一些特殊场景,就有这种情况。设置也非常简单,如下图:

注意:图片中的单元格高度仅针对字段类型为二维码、条形码、图片才起作用。
六、表格列自定义渲染?
二维码、图片这些的已经满足不了的情况,就可以使用单元格渲染函数来自行处理,渲染的样式。 比如我们要想渲染一个进度条的效果:
效果如下:
七、表格脚/聚合函数?
footerFormatter:表格脚格式化函数,定义分组尾部显示信息,可以放置写统计信息。。该函数需要四个参数:
options:打印元素的选项值。
rows
data
currentPageGridRowsData:当前页数据
groupFooterFormatter:分组脚格式化函数,定义分组尾部显示信息,可以放置写统计信息。。该函数需要二个参数:
groupData:分组信息。
options:打印元素的选项值。
gridColumnsFooterFormatter:多组表格脚格式化函数,定义分组尾部显示信息,可以放置写统计信息。。该函数需要四个参数:
options:打印元素的选项值。
rows
data
currentPageRowsData:当前页数据
早期版本没有聚合函数的时候,只有自定义表格脚函数。原理同自定义渲染一样,返回tr中的td 即可。
有了聚合函数,一些简单的场景,就不需要那么麻烦了,设置这几个参数即可搞定。如下图:
这个函数是设置在表格列对象的。可以设置计数、合计、平均值、最大值、最小值、仅文本。同时也可以设置对齐方式,是否显示标题、转大小数字、合并等等。
注意:聚合函数优先于表格脚函数。可同时设置。合并列,需要将其后续的合并设置为0。
表格脚函数返回 tr td 标签即可。如:

八、表格分组头/脚格式化函数?
这个功能是3个函数关联使用。大概场景就是根据多个字段分组,然后给每个组,渲染显示一个头/脚统计行。如图:分组字段、头/脚函数
其中分组字段函数返回的就是分组依据,一个字段名数组。

九、多组表格脚函数?
这个功能,同的甚少。主要是用于 27 点中的 表格分栏显示。首先我们随便写写测试看看效果:

十、表格行特殊样式?
rowStyler
表格列样式函数,返回样式对象来自定义该 tr元素的样式,例如 {'background':'red'} 。该函数需要二个参数:
value:字段的值。
options:打印元素的选项值。
譬如当这一行某个值,大于等于某个值的时候,想特殊显示的场景。那么就可以使用行样式函数。又或者,每一行自定义样式,斑马条纹等等情况。


补充一个常用函数
renderFormatter 是 vue-plugin-hiprint 中用于自定义表格列内容渲染格式的函数,允许开发者完全控制表格单元格的HTML内容生成。
主要用途
自定义内容展示:根据数据动态生成表格单元格的HTML内容
复杂布局:在一个单元格内展示多行文本、颜色、样式等复杂信息
数据格式化:对原始数据进行处理后再展示
在表格列配置中使用:
{
"options": {
"left": 25.5,
"top": 380,
"height": 72,
"width": 541.5,
"field": "ntable",
"right": 567,
"bottom": 399.75,
"vCenter": 297.75,
"hCenter": 363.75,
"fontSize": 9,
"rowsColumnsMerge": "(row,col,colIndex,rowIndex,tableData,printData)=>{ const mergeFields=['executeOrgNames']; if(!mergeFields.includes(col.field) || !printData?.noAppointmentSpanValues || !tableData || tableData.length === 0) {\n return [1,1];\n } if(mergeFields.includes(col.field)&&printData?.noAppointmentSpanValues){const currentKey='noapp_'+row.executeOrgNames || '';const isFirstRowInGroup=rowIndex===0||(tableData[rowIndex-1].executeOrgNames!==row.executeOrgNames);if(isFirstRowInGroup){const spanValue = printData.noAppointmentSpanValues[currentKey] || 1; return [spanValue, 1]; }else{return[0,1];}}else{return[1,1];}}",
"columns": [
[{
"width": 160,
"title": "地点",
"field": "executeOrgNames",
"checked": true,
"columnId": "executeOrgNames",
"rowspan": 1,
"colspan": 1,
"fixed": false
},{
"width": 211.5,
"title": "项目名称",
"field": "projectNames",
"checked": true,
"columnId": "projectNames",
"rowspan": 1,
"colspan": 1,
"renderFormatter": "function (value, row, colIndex, options, rowIndex) { return \"<div style='margin-top:5px; margin-bottom:5px;'>\"+row.projectNames+\"</div><div style='margin-bottom:5px;color:#777777'>\"+row.projectMainDescribes+\"</div>\";}",
"fixed": false
}, {
"width": 170,
"title": "注意事项",
"field": "projectCautions",
"checked": true,
"columnId": "projectCautions",
"rowspan": 1,
"colspan": 1,
"renderFormatter": "function (value, row, colIndex, options, rowIndex) { return \"<div style='margin-top:5px; margin-bottom:5px;'>\"+row.projectCautions+\"</div>\";}",
"fixed": false
}]
]
},
groupFormatter
功能概述
主要作用:自定义表格分组的显示格式
使用场景:当表格数据按特定字段分组时,控制分组头部的展示内容
参数说明
value: 分组字段的值
rows: 该分组包含的所有数据行
field: 分组依据的字段名
groupFormatter: function(value, rows, field) {
// 自定义分组头部显示内容
return `<div class="custom-group-header">${value} (${rows.length}项)</div>`;
}
groupFieldsFormatter
功能概述
主要作用:格式化分组字段的显示内容
使用场景:对分组字段的值进行特殊处理或格式化
参数说明
value: 分组字段的原始值
row: 当前行数据
field: 分组字段名
groupFieldsFormatter: function(value, row, field) {
// 对分组字段值进行格式化处理
return `分组: ${value}`;
}
组合使用
{
"options": {
"left": 25.5,
"top": 185.5,
"height": 72,
"width": 541.5,
"field": "table",
"groupFieldsFormatter": "function(type,options,data){ return [\"timeInterval\"];}",
"coordinateSync": false,
"widthHeightSync": false,
"groupFormatter": "function(colTotal,tableData,printData,groupData,options){return\"<tr style='border: none!important;'><td colspan='4'>\"+groupData.rows[0].path+\"</td></tr>\";}",
"right": 567,
"bottom": 282.75,
"vCenter": 296.25,
"hCenter": 246.75,
"fontSize": 9,
"columns": [
[{
"width": 209.90625,
"title": "检查/治疗顺序-项目名称",
"field": "projectNames",
"checked": true,
"columnId": "projectNames",
"fixed": false,
"rowspan": 1,
"colspan": 1,
"align": "left",
"renderFormatter": "function (value, row, colIndex, options, rowIndex) { return \"<div style='margin-top:5px; margin-bottom:5px;'>\"+row.projectNames+\"</div><div style='margin-bottom:5px;color:#777'>\"+row.projectMainDescribes+\"</div>\";}"
}, {
"width": 116.17275000000001,
"title": "注意事项",
"field": "projectCautions",
"checked": true,
"columnId": "projectCautions",
"fixed": false,
"rowspan": 1,
"colspan": 1,
"renderFormatter": "function (value, row, colIndex, options, rowIndex) { return \"<div style='margin-top:5px; margin-bottom:5px;'>\"+row.projectCautions+\"</div>\";}"
}, {
"width": 118.13174999999997,
"title": "预约时间",
"field": "appDates",
"checked": true,
"columnId": "appDates",
"fixed": false,
"rowspan": 1,
"colspan": 1
}, {
"width": 97.28925000000004,
"title": "执行科室",
"field": "executeOrgNames",
"checked": true,
"columnId": "executeOrgNames",
"fixed": false,
"rowspan": 1,
"colspan": 1
}]
]
},
应用场景
1. 数据分组展示
在指引单打印中按执行机构或预约时间进行分组
为每个分组添加自定义头部信息
2. 格式化需求
对分组标题进行样式化处理
添加统计信息(如该组包含的项目数量)
3. 用户体验优化
使分组信息更清晰易读
提供更丰富的分组展示效果
配置位置
这两个选项通常在 HIPRINT_CONFIG.table.supportOptions 中定义
位于表格的"高级"选项卡中
与 rowsColumnsMerge 等功能配合使用,实现复杂的表格展示效
<template>
<div>
<div v-if="showStatus">
<x-card v-if="hasPerm('admin:project:guide-order:page')">
<div slot="content" class="table-page-search-wrapper">
<a-form layout="inline">
<a-row :gutter="48">
<a-col :md="6" :sm="24">
<a-form-item label="预约日期">
<a-range-picker @change="appOnChange" v-model="appointmentDate" />
</a-form-item>
</a-col>
<a-col :md="6" :sm="24">
<a-form-item label="诊疗号">
<a-input v-model="queryParam.patientNo" allow-clear placeholder="请输入门诊号/病历号" :max-length="20"/>
</a-form-item>
</a-col>
<a-col :md="6" :sm="24">
<a-form-item label="患者姓名">
<a-input v-model="queryParam.patientName" allow-clear placeholder="请输入患者姓名" />
</a-form-item>
</a-col>
<a-col v-if="advanced" :md="6" :sm="24">
<a-form-item label="行动状态">
<a-select v-model="queryParam.patientActionStatus" placeholder="请选择行动状态">
<a-select-option
v-for="(item,index) in $options.filters['dictData']('patient_action_status')"
:key="index"
:value="item.code">{{ item.name }}</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col v-if="advanced" :md="6" :sm="24">
<a-form-item label="状态">
<a-select v-model="queryParam.orderStatus" placeholder="请选择状态">
<a-select-option
v-for="(item,index) in $options.filters['dictData']('project_guide_order_status')"
:key="index"
:value="item.code">{{ item.name }}</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col v-if="advanced" :md="6" :sm="24">
<a-form-item label="提交科室">
<a-tree-select
v-model="queryParam.orgId"
show-search
tree-node-filter-prop="title"
:treeData="orgTree"
allowClear
placeholder="请选择科室"
ref="orgTree">
</a-tree-select>
</a-form-item>
</a-col>
<a-col v-if="advanced" :md="6" :sm="24">
<a-form-item label="提交人">
<a-input v-model="queryParam.submitUserName" allow-clear placeholder="请输入提交人" />
</a-form-item>
</a-col>
<a-col v-if="advanced" :md="6" :sm="24">
<a-form-item label="提交时间">
<a-range-picker @change="onChange" v-model="submitDate" />
</a-form-item>
</a-col>
<a-col :md="5" :sm="24">
<span class="table-page-search-submitButtons" :style="{ float: 'right', overflow: 'hidden' } || {} ">
<a-button type="primary" @click="query">查询</a-button>
<a-button style="margin-left: 8px" @click="reset">重置</a-button>
<a @click="toggleAdvanced" style="margin-left: 8px">
{{ advanced ? '收起' : '展开' }}
<a-icon :type="advanced ? 'up' : 'down'" />
</a>
</span>
</a-col>
</a-row>
</a-form>
</div>
</x-card>
<div style="width: 100%;box-sizing: border-box;padding: 20px;background-color: #fff;">
<s-table
ref="table"
:columns="columns"
:data="loadData"
:alert="false"
v-if="hasPerm('admin:project:guide-order:page')"
:scroll="{ x: 1500}">
<span slot="patientBaseInfo" slot-scope="text, record">
{{ record.patientName }} {{ $options.filters['dictTypeDataMate']('sex', record.patientSex) }}
{{ record.patientAge + '岁' }}
</span>
<span slot="appointmentTime" slot-scope="text, record">
{{ record.appointmentDate }} {{ record.appointmentStartTime }}-{{ record.appointmentEndTime }}
</span>
<span slot="projectNumInfo" slot-scope="text, record">
<!-- 总数(预约项目数量/非预约项目数量) -->
{{ record.projectNum }} ({{ record.projectAppointmentNum }}/{{ record.projectNoAppointmentNum }})
</span>
<span slot="action" slot-scope="text, record">
<a @click="showDayin(record)" v-if="hasPerm('admin:project:guide-order-detail:list')" style="margin-right: 10px;">详情</a>
<a @click="cancelOrderStatus(record)" v-if="hasPerm('admin:project:guide-order:invalid') && record.orderStatus === 1">作废</a>
</span>
</s-table>
</div>
</div>
<!-- 详情 -->
<!-- <detail ref="detail"></detail>-->
<!-- 打印 -->
<start-preview ref="startPreview" @orderPrint="orderPrint" :guideOrderStatus="guideOrderStatus" id="printable-area"/>
</div>
</template>
<script>
import {
getOrgTree,
getguideOrderPage,
getGuideOrderInvalid, getGuideOrderDetail
} from '../../api/appointmentManage'
import moment from 'moment'
import {
STable,
XCard,
XDown
} from '@/components'
import startPreview from './preview.vue'
import mb from './md.json'
import invalidmd from './invalidmd.json'
import { combiTemplate } from './template.js'
import guide from './guide'
import { hiPrintPlugin } from 'vue-plugin-hiprint'
// 在调用 hiprint 打印前处理数据:合并相同地点的行
// function mergeRowsByLocation(data) {
// const result = []
// let currentLocation = null
// let mergedRow = null
// data.forEach(row => {
// if (row.executeOrgNames === currentLocation) {
// console.log('row.executeOrgNames === currentLocation')
// // 相同地点:更新当前合并行
// mergedRow.projectName += `<span style="display:inline-block; width:350px; height:5px; border-bottom:1px solid #000;"><br>${row.projectName}</span>`
// mergedRow.projectCautions += row.projectCautions ? `<span style="display:inline-block; width:200px; height:8px; border-bottom:1px solid #000;"><br>${row.projectCautions}</span>` : `<span style="display:inline-block; width:200px; height:10px; border-bottom:1px solid #000;"><br> ` + `<span style="color: #fff;"> </span>`
// console.log('mergedRow:', mergedRow)
// } else {
// console.log('else')
// // 新地点:添加前一个合并行(如果有)
// if (mergedRow) {
// console.log('else mergedRow:', mergedRow)
// mergedRow.projectName = `<span style="display:inline-block; width:350px; height:5px; border-bottom:1px solid #000;"><br>${mergedRow.projectName}</span>`
// mergedRow.projectCautions = mergedRow.projectCautions ? `<span style="display:inline-block; width:200px; height:8px; border-bottom:1px solid #000;"><br>${mergedRow.projectCautions}</span>` : `<span style="display:inline-block; width:200px; height:10px; border-bottom:1px solid #000;"><br> ` + `<span style="color: #fff;"> </span>`
// result.push(mergedRow)
// }
// // 初始化新行
// row.projectCautions = row.projectCautions !== null && row.projectCautions !== undefined ? `${row.projectCautions}-123` : `<span style="color: #000;"> 321</span>`
// console.log('else row:', row)
// mergedRow = { ...row, _isMerged: true }
// currentLocation = row.executeOrgNames
// }
// })
// // 添加最后一个合并行
// if (mergedRow) {
// result.push(mergedRow)
// }
// console.log('result:', result)
// return result
// }
// 自定义排序函数
function compareDates(a, b) {
const dateA = new Date(a.appDate)
const dateB = new Date(b.appDate)
// 比较两个日期
return dateA - dateB
}
// 判断上午or下午
function isAMorPM(dateTimeString) {
// 将字符串转换为日期对象
const dateTime = new Date(dateTimeString)
// 获取小时数
const hours = dateTime.getHours()
// 根据小时数返回上午或下午
return hours < 12 ? 'morning' : 'afternoon'
}
export default {
components: {
guide,
startPreview,
// detail,
XCard,
STable,
XDown
},
data() {
return {
guideOrderStatus: 1,
// 打印数据
printDetail: {},
appointmentProjects: [],
noAppointmentProjects: [],
printData: {},
newMb: Object,
showStatus: true,
advanced: false,
orgId: '',
appointmentDate: [],
submitDate: [],
orgTree: [],
queryParam: {
appointmentDateStart: '',
appointmentDateEnd: '',
patientNo: '',
patientName: '',
patientActionStatus: undefined,
orderStatus: undefined,
orgId: undefined,
submitUserName: '',
startSubmitDate: '',
endSubmitDate: ''
},
// 表头
columns: [{
title: '指引单编号',
width: '160px',
dataIndex: 'guideNo'
},
{
title: '类型', // 门诊、住院、体检、
width: '80px',
dataIndex: 'serviceType',
customRender: (serviceType) => this.$options.filters['dictTypeDataMate']('service_type', serviceType)
},
{
title: '诊疗号',
width: '140px',
dataIndex: 'patientNo'
},
{
title: '患者姓名',
width: '160px',
dataIndex: 'patientBaseInfo',
scopedSlots: {
customRender: 'patientBaseInfo'
}
},
{
title: '会员身份',
width: '140px',
dataIndex: 'patientLevel',
customRender: (patientLevel) => this.$options.filters['dictTypeDataMate']('resident_level', patientLevel)
},
{
title: '行动状态',
width: '100px',
dataIndex: 'patientActionStatus',
customRender: (patientActionStatus) =>
this.$options.filters['dictTypeDataMate']('patient_action_status', patientActionStatus)
},
{
title: '预约日期',
width: '120px',
dataIndex: 'appointmentDate'
},
{
title: '项目数量',
width: '120px',
dataIndex: 'projectNumInfo',
scopedSlots: {
customRender: 'projectNumInfo'
}
},
{
title: '提交科室',
width: '160px',
dataIndex: 'orgName'
},
{
title: '提交人',
width: '140px',
dataIndex: 'submitUserName'
},
{
title: '提交时间',
width: '180px',
dataIndex: 'submitTime',
scopedSlots: {
customRender: 'submitTime'
}
},
{
title: '状态',
width: '80px',
dataIndex: 'orderStatus',
customRender: (orderStatus) =>
this.$options.filters['dictTypeDataMate']('project_guide_order_status', orderStatus)
}
],
// 加载数据方法 必须为 Promise 对象
loadData: parameter => {
const queryParam = this.queryParam
return getguideOrderPage(Object.assign(parameter, queryParam)).then((
res) => {
return res.data
}).catch(error => {
this.$message.error('搜索关键词中含有特殊字符')
})
}
}
},
created() {
if (this.hasPerm('admin:project:guide-order-detail:list')) {
this.columns.push({
title: '操作',
width: '100px',
dataIndex: 'action',
fixed: 'right',
scopedSlots: {
customRender: 'action'
}
})
}
},
async mounted() {
const OrgTree = await getOrgTree()
this.orgTree = OrgTree.data
},
watch: {
'$route'(to, from) {
// 当路由变化时,检查是否需要刷新数据
if (to.query.refresh) {
this.query()
}
}
},
methods: {
showPages() {
this.showStatus = true
},
/**
* 查询
*/
query() {
console.log('query')
this.$refs.table.refresh(true)
},
goDetail(record) {
// this.showStatus = false
// this.$router.push('/appointment/guide/detail1?id=' + e.id)
this.$refs.detail.show(record)
},
// 调用作废API
cancelOrderStatus(e) {
this.$confirm({
title: '确认作废该指引单,作废后患者端不可查?',
// content: '作废后不可恢复',
onOk: async () => {
const formData = {
id: e.id
}
const res = await getGuideOrderInvalid(formData)
if (res.code !== 200) {
this.$message.error(res.message)
return false
}
this.$message.success('作废成功')
e.orderStatus = 0
this.$refs.table.refresh(false)
}
})
},
// 预约日期选择回调
appOnChange(e) {
if (e.length > 0) {
this.queryParam.appointmentDateStart = moment(e[0]).format('YYYY-MM-DD')
this.queryParam.appointmentDateEnd = moment(e[1]).format('YYYY-MM-DD')
} else {
this.queryParam.appointmentDateStart = ''
this.queryParam.appointmentDateEnd = ''
}
},
// 提交日期选择回调
onChange(e) {
if (e.length > 0) {
this.queryParam.startSubmitDate = moment(e[0]).format('YYYY-MM-DD')
this.queryParam.endSubmitDate = moment(e[1]).format('YYYY-MM-DD')
} else {
this.queryParam.startSubmitDate = ''
this.queryParam.endSubmitDate = ''
}
},
toggleAdvanced() {
this.advanced = !this.advanced
},
/**
* 重置
*/
reset() {
this.appointmentDate = []
this.submitDate = []
this.queryParam = {
appointmentDateStart: '',
appointmentDateEnd: '',
patientNo: '',
patientName: '',
patientActionStatus: undefined,
orderStatus: undefined,
orgId: undefined,
submitUserName: '',
startSubmitDate: '',
endSubmitDate: ''
}
this.$refs.table.refresh(true)
},
async showDayin(e) {
// this.guideOrderData = {}
// this.guideOrderData = e
this.guideOrderStatus = e.orderStatus
this.getDetail(e)
// const res = await guideOrderPrint({
// id: e.id
// })
// this.printDetail = res.data
// this.orderPrint('preview')
},
// 指引单详情
async getDetail(e) {
const res = await getGuideOrderDetail({
guideOrderId: e.id
})
// this.detail = res.data
this.printDetail = res.data
this.noAppointmentProjects = res.data.noAppointmentProjects
this.appointmentProjects = res.data.appointmentProjects
this.orderPrint('preview')
},
generateSpanValues(data) {
const spanValues = {}
// 按照预约时间和地点分组统计合并行数
const groupCounts = {}
data.forEach((row, index) => {
const key = `${row.appointmentDate}_${row.appointmentStartTime}_${row.appointmentEndTime}_${row.executeOrgNames}`
if (!groupCounts[key]) {
groupCounts[key] = []
}
groupCounts[key].push(index)
})
// 为每组的第一个元素设置合并行数
Object.keys(groupCounts).forEach(key => {
const indices = groupCounts[key]
spanValues[key] = indices.length
})
console.log('spanValues1', spanValues)
return spanValues
},
generateNoAppointmentSpanValues(data) {
const spanValues = {}
// 按照地点分组统计合并行数(用于免预约项目)
const groupCounts = {}
data.forEach((row, index) => {
// 确保 executeOrgNames 不为空
const executeOrgNames = row.executeOrgNames || ''
const key = `noapp_${executeOrgNames}` // 添加前缀避免键冲突
if (!groupCounts[key]) {
groupCounts[key] = []
}
groupCounts[key].push(index)
})
// 为每组的第一个元素设置合并行数
Object.keys(groupCounts).forEach(key => {
const indices = groupCounts[key]
spanValues[key] = indices.length
})
console.log('spanValues2', spanValues)
return spanValues
},
orderPrint(status) {
// 预览
if (status === 'preview') {
// 深拷贝数据
const mbData = this.guideOrderStatus === 1 ? JSON.parse(JSON.stringify(mb)) : JSON.parse(JSON.stringify(invalidmd))
const that = this
const detail = this.printDetail
console.log('this.printDetail', this.printDetail)
const printAppointmentProjects = detail.appointmentProjects
const printNoAppointmentProjects = detail.noAppointmentProjects
// 处理预约项目数据
const appData = printAppointmentProjects.map(function(item, index) {
item.appDate = item.appointmentDate + ' ' + item.appointmentStartTime
if (item.appointmentStartTime && item.appointmentEndTime) {
item.appDates = item.appointmentStartTime + ' - ' + item.appointmentEndTime
}
const projectMainDescribes = JSON.parse(JSON.stringify(item.projectMainDescribe))
item.projectMainDescribes = item.projectMainDescribe && detail.serviceType === 1 ? '病情摘要:' + projectMainDescribes : ''
const executeOrgNames = JSON.parse(JSON.stringify(item.executeOrgName))
// item.executeOrgNames = executeOrgNames + '(' + item.executeOrgAddress + ')'
const deskName = item.deskName !== null && item.deskName !== undefined ? ' | ' + item.deskName : ''
const address = item.deskAddress !== null && item.deskAddress !== undefined ? '(' + item.deskAddress + ')' : ''
item.executeOrgNames = executeOrgNames + deskName + address
item.projectCautions = item.projectCautions || ''
return item
})
const appArrAM = []
const appArrPM = []
const appArr = appData.sort(compareDates).map(function(item, index) {
item.timeInterval = item.appointmentDate + isAMorPM(item.appDate)
item.interval = isAMorPM(item.appDate)
item.interval == 'morning' ? appArrAM.push(item) : appArrPM.push(item)
return item
})
console.log('appArrAM====', appArrAM)
console.log('appArrPM====', appArrPM)
// 上午 下午区分开
appArrAM.map(function(item, index) {
const i = index + 1
const projectNames = JSON.parse(JSON.stringify(item.projectName))
item.projectNames = i + '、' + projectNames
})
appArrPM.map(function(item, index) {
const i = index + 1
const projectNames = JSON.parse(JSON.stringify(item.projectName))
item.projectNames = i + '、' + projectNames
})
// 在处理 noAppointmentProjects 之前添加排序逻辑
const sortedNoAppointmentProjects = [...printNoAppointmentProjects].sort((a, b) => {
// 按 executeOrgNames 排序,确保相同地点的项目连续排列
const executeOrgAddressA = a.executeOrgAddress !== null && a.executeOrgAddress !== undefined ? ' | ' + a.executeOrgAddress : ''
const executeOrgAddressB = b.executeOrgAddress !== null && b.executeOrgAddress !== undefined ? ' | ' + b.executeOrgAddress : ''
const nameA = (a.executeOrgName && typeof a.executeOrgName === 'string') ? a.executeOrgName + executeOrgAddressA : ''
const nameB = (b.executeOrgName && typeof b.executeOrgName === 'string') ? b.executeOrgName + executeOrgAddressB : ''
return nameA.localeCompare(nameB)
})
const noAppointmentProjects = sortedNoAppointmentProjects.map(function(item, index) {
item.timeInterval = '1'
const projectMainDescribes = JSON.parse(JSON.stringify(item.projectMainDescribe))
item.projectMainDescribes = item.projectMainDescribe && detail.serviceType === 1 ? '病情摘要:' + projectMainDescribes : ''
const executeOrgNames = JSON.parse(JSON.stringify(item.executeOrgName))
const executeOrgAddress = item.executeOrgAddress !== null && item.executeOrgAddress !== undefined ? ' | ' + item.executeOrgAddress : ''
item.executeOrgNames = executeOrgNames + executeOrgAddress
item.projectCautions = item.projectCautions || ''
const i = index + 1
const projectNames = JSON.parse(JSON.stringify(item.projectName))
item.projectNames = i + '、' + projectNames
// item.projectNames = `<span style="font-size: 8pt; display:inline-block; width:14px; height:14px; border-radius:50%; border: 1px solid #000; color:#000; text-align:center; line-height:11px; margin-right:5px; ">${i}</span>` + projectNames
return item
})
const patientLevel = detail.patientLevel !== null && detail.patientLevel !== undefined ? this.$options.filters['dictTypeDataMate']('resident_level', detail.patientLevel) : ''
// 身份证号显示前三后三,中间*隐藏
let patientCardId = ''
if (detail.patientCardId !== null && detail.patientCardId !== undefined) {
const idCard = detail.patientCardId
if (!idCard || idCard.length < 7) {
return idCard
}
patientCardId = idCard.substring(0, 3) + '*'.repeat(idCard.length - 6) + idCard.substring(idCard.length - 3)
}
const spanValues = this.generateSpanValues(appArr)
const noAppointmentSpanValues = this.generateNoAppointmentSpanValues(noAppointmentProjects)
// 组装数据
const printData = {
// 条形码
guideNo: detail.guideNo,
// 公众号二维码
qrcode1: 'https://wit120.medmap.com.cn/',
// 指引单二维码
qrcode2: process.env.VUE_APP_FMS_BASE_URL + `/project/appointment/guide?guideOrderId=${detail.id}`,
titleName: detail.appointmentDate ? detail.appointmentDate + ' 检查(治疗)指引单' : '' + ' 检查(治疗)指引单',
// patientName: detail.patientName + ' ' + this.$options.filters['dictTypeDataMate']('sex', detail.patientSex) + ' ' + detail.patientAge + '岁 ' + ' ' + '<span style="background-color: #D0D0D0;">' + patientLevel + '</span>',
patientName: detail.patientName + ' ' + this.$options.filters['dictTypeDataMate']('sex', detail.patientSex) + ' ' + detail.patientAge + '岁 ' + ' ' + patientLevel,
patientCardId: patientCardId,
patientActionStatus: this.$options.filters['dictTypeDataMate']('patient_action_status', detail.patientActionStatus),
patientNo: detail.patientNo,
serviceType: this.$options.filters['dictTypeDataMate']('service_type', detail.serviceType),
orgName: detail.orgName,
table: appArr, // 全部
tableam: appArrAM, // 上午
tablepm: appArrPM, // 下午
ntable: noAppointmentProjects,
// 添加合并信息
spanValues: spanValues,
noAppointmentSpanValues: noAppointmentSpanValues
}
if (appArr.length === 0) {
mbData.panels[0].printElements[12] = {}
mbData.panels[0].printElements[13] = {}
mbData.panels[0].printElements[14] = {}
// 免预约 调整布局上移
if (mbData.panels[0].printElements[15] && mbData.panels[0].printElements[15].options) {
mbData.panels[0].printElements[15].options.top = 170
}
if (mbData.panels[0].printElements[16] && mbData.panels[0].printElements[16].options) {
mbData.panels[0].printElements[16].options.top = 190
}
}
if (appArrAM.length === 0 && appArrPM.length > 0) {
mbData.panels[0].printElements[13] = {}
// 下午和免预约 调整布局上移
if (mbData.panels[0].printElements[14] && mbData.panels[0].printElements[14].options) {
mbData.panels[0].printElements[14].options.top = 190
}
if (mbData.panels[0].printElements[15] && mbData.panels[0].printElements[15].options) {
mbData.panels[0].printElements[15].options.top = 280
}
if (mbData.panels[0].printElements[16] && mbData.panels[0].printElements[16].options) {
mbData.panels[0].printElements[16].options.top = 300
}
}
if (appArrPM.length === 0 && appArrAM.length > 0) {
mbData.panels[0].printElements[14] = {}
// 免预约调整布局上移
if (mbData.panels[0].printElements[15] && mbData.panels[0].printElements[15].options) {
mbData.panels[0].printElements[15].options.top = 280
}
if (mbData.panels[0].printElements[16] && mbData.panels[0].printElements[16].options) {
mbData.panels[0].printElements[16].options.top = 300
}
}
if (noAppointmentProjects.length === 0) {
// 如果不存在免预约项目.则隐藏对应表头和表格
mbData.panels[0].printElements[15] = {}
mbData.panels[0].printElements[16] = {}
}
// 调用打印
const newMb = combiTemplate(mbData, printAppointmentProjects, printNoAppointmentProjects)
this.newMb = newMb
console.log('newMb:', newMb)
const hiprintTemplate = new hiprint.PrintTemplate({
template: newMb
})
console.log('==============printData预览数据=============')
console.log(printData)
console.log('==============printData预览数据=============')
this.printData = printData
const html = hiprintTemplate.getHtml(printData)
this.$refs.startPreview.showModal(html)
// // 预览
// if (status === 'preview') {
// this.printData = printData
// const html = hiprintTemplate.getHtml(printData)
// // this.showGuide = true
// this.$refs.startPreview.showModal(html)
// }
}
// 打印
if (status === 'print') {
this.comfirmPrint()
// hiprintTemplate.print(printData)
}
},
// 打印
comfirmPrint() {
console.log('this.newMb:', this.newMb)
const hiprintTemplate = new hiprint.PrintTemplate({
template: this.newMb
})
console.log('==============comfirmPrintData=============')
console.log(this.printData)
console.log('==============comfirmPrintData=============')
hiprintTemplate.print(this.printData)
}
}
}
</script>
<style scoped>
</style>
{
"panels": [{
"index": 0,
"name": 1,
"height": 297,
"width": 210,
"paperHeader": 170,
"paperFooter": 650.5,
"printElements": [{
"options": {
"left": 408,
"top": 18,
"height": 25,
"width": 160,
"field": "guideNo",
"textAlign": "center",
"testData": "XS888888888",
"fontSize": 8.25,
"lineHeight": 18,
"textType": "barcode",
"title": "条形码",
"right": 572.5,
"bottom": 94,
"vCenter": 492.5,
"hCenter": 81.5,
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0
},
"printElementType": {
"title": "条形码",
"type": "text"
}
},{
"options": {
"left":470,
"top":56,
"height":74,
"width":82,
"right":561,
"bottom":200,
"vCenter":519.75,
"hCenter":165
},
"printElementType":{
"title": "",
"type": "text"
}
},{
"options": {
"left": 25.5,
"top": 25.5,
"height": 30,
"width": 30,
"right": 55.5,
"bottom": 55.5,
"vCenter": 40.5,
"hCenter": 40.5,
"src": "http://admin.ish.medmap.com.cn/img/logo.d73793ce.png",
"fit": "",
"coordinateSync": false,
"widthHeightSync": false
},
"printElementType": {
"title": "图片",
"type": "image"
}
}, {
"options": {
"left": 58.5,
"top": 31.5,
"height": 9.75,
"width": 138,
"title": "青岛内分泌糖尿病医院",
"coordinateSync": false,
"widthHeightSync": false,
"fontSize": 9,
"fontWeight": "600",
"qrCodeLevel": 0,
"right": 196.5,
"bottom": 40.5,
"vCenter": 127.5,
"hCenter": 35.625
},
"printElementType": {
"title": "文本",
"type": "text"
}
}, {
"options": {
"left": 57,
"top": 43.5,
"height": 9.75,
"width": 187.5,
"title": "Qingdao Endocrine and Diabetes Hospital",
"right": 183,
"bottom": 56.25,
"vCenter": 123,
"hCenter": 51.375,
"coordinateSync": false,
"widthHeightSync": false,
"color": "#333333",
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
}, {
"options": {
"left": 228,
"top": 90,
"height": 9.75,
"width": 200,
"field": "titleName",
"fontWeight": "bold",
"coordinateSync": false,
"widthHeightSync": false,
"fontSize": 12,
"qrCodeLevel": 0,
"right": 363,
"bottom": 98.25,
"vCenter": 295.5,
"hCenter": 93.375
},
"printElementType": {
"title": "",
"type": "text"
}
},{
"options": {
"left": 28.5,
"top": 120,
"height": 9.75,
"width": 140,
"title": "患者",
"field": "patientName",
"right": 148.5,
"bottom": 152.25,
"vCenter": 88.5,
"hCenter": 147.375,
"coordinateSync": false,
"widthHeightSync": false,
"fontSize": 9,
"color": "#333333",
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
}, {
"options": {
"left": 217.5,
"top": 120,
"height": 9.75,
"width": 140,
"title": "证件号",
"field": "patientCardId",
"right": 337.74609375,
"bottom": 152.49609375,
"vCenter": 277.74609375,
"hCenter": 147.62109375,
"coordinateSync": false,
"widthHeightSync": false,
"fontSize": 9,
"color": "#333333",
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
}, {
"options": {
"left": 408,
"top": 120,
"height": 9.75,
"width": 120,
"title": "行动状态",
"field": "patientActionStatus",
"right": 528,
"bottom": 151.5,
"vCenter": 468,
"hCenter": 146.625,
"coordinateSync": false,
"widthHeightSync": false,
"fontSize": 9,
"color": "#333333",
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
}, {
"options": {
"left": 28.5,
"top": 142,
"height": 9.75,
"width": 140,
"title": "诊疗号",
"field": "patientNo",
"right": 148.5,
"bottom": 173.25,
"vCenter": 88.5,
"hCenter": 168.375,
"coordinateSync": false,
"widthHeightSync": false,
"fontSize": 9,
"color": "#333333",
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
}, {
"options": {
"left": 217.5,
"top": 142,
"height": 9.75,
"width": 140,
"title": "类型",
"field": "serviceType",
"right": 337.5,
"bottom": 167.25,
"vCenter": 277.5,
"hCenter": 162.375,
"coordinateSync": false,
"widthHeightSync": false,
"fontSize": 9,
"color": "#333333",
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
}, {
"options": {
"left": 408,
"top": 142,
"height": 9.75,
"width": 120,
"title": "科室",
"field": "orgName",
"right": 529.74609375,
"bottom": 171.24609375,
"vCenter": 469.74609375,
"hCenter": 166.37109375,
"coordinateSync": false,
"widthHeightSync": false,
"fontSize": 9,
"color": "#333333",
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
}, {
"options": {
"left": 25.5,
"top": 170.5,
"height": 9.75,
"width": 168.5,
"title": "<span style='font-weight: bold;'>| 预约项目</span>(请按预约时间提前候诊)",
"coordinateSync": false,
"color": "#333333",
"widthHeightSync": false,
"fontSize": 9,
"qrCodeLevel": 0,
"right": 173.25,
"bottom": 204.75,
"vCenter": 99,
"hCenter": 199.875
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 25.5,
"top": 190.5,
"height": 72,
"width": 541.5,
"field": "tableam",
"right": 567,
"bottom": 282.75,
"vCenter": 296.25,
"hCenter": 246.75,
"fontSize": 9,
"rowsColumnsMerge": "(row,col,colIndex,rowIndex,tableData,printData)=>{const mergeFields=['appDates','executeOrgNames'];if(mergeFields.includes(col.field)&&printData?.spanValues){const currentKey=row.appointmentDate+'_'+row.appointmentStartTime+'_'+row.appointmentEndTime+'_'+row.executeOrgNames;const isFirstRowInGroup=rowIndex===0||(tableData[rowIndex-1].appointmentDate!==row.appointmentDate)||(tableData[rowIndex-1].appointmentStartTime!==row.appointmentStartTime)||(tableData[rowIndex-1].appointmentEndTime!==row.appointmentEndTime)||(tableData[rowIndex-1].executeOrgNames!==row.executeOrgNames);if(isFirstRowInGroup){return[printData.spanValues[currentKey]||1,1];}else{return[0,1];}}else{return[1,1];}}",
"columns": [
[{
"width": 541.5,
"title": "<div style='font-weight: bold; text-align: center;'>上午</div>",
"colspan": 4,
"rowspan": 1,
"checked": true,
"align": "center",
"titleAlign": "center",
"headerStyle": "font-weight: bold; text-align: center;",
"titleStyle": "font-weight: bold; text-align: center;"
}],
[{
"width": 75,
"title": "预约时间",
"field": "appDates",
"checked": true,
"columnId": "appDates",
"fixed": false,
"rowspan": 1,
"colspan": 1
}, {
"width": 110,
"title": "地点",
"field": "executeOrgNames",
"checked": true,
"columnId": "executeOrgNames",
"fixed": false,
"rowspan": 1,
"colspan": 1
}, {
"width": 207,
"title": "项目名称",
"field": "projectNames",
"checked": true,
"columnId": "projectNames",
"fixed": false,
"rowspan": 1,
"colspan": 1,
"align": "left",
"renderFormatter": "function (value, row, colIndex, options, rowIndex) { return \"<div style='margin-top:5px; margin-bottom:5px;'>\"+row.projectNames+\"</div><div style='margin-bottom:5px;color:#777'>\"+row.projectMainDescribes+\"</div>\";}"
}, {
"width": 150,
"title": "注意事项",
"field": "projectCautions",
"checked": true,
"columnId": "projectCautions",
"fixed": false,
"rowspan": 1,
"colspan": 1,
"renderFormatter": "function (value, row, colIndex, options, rowIndex) { return \"<div style='margin-top:5px; margin-bottom:5px;'>\"+row.projectCautions+\"</div>\";}"
}]
]
},
"printElementType": {
"title": "表格",
"type": "table",
"editable": true,
"columnDisplayEditable": true,
"columnDisplayIndexEditable": true,
"columnTitleEditable": true,
"columnResizable": true,
"columnAlignEditable": true,
"isEnableEditField": true,
"isEnableContextMenu": true,
"isEnableInsertRow": true,
"isEnableDeleteRow": true,
"isEnableInsertColumn": true,
"isEnableDeleteColumn": true,
"isEnableMergeCell": true
}
}, {
"options": {
"left": 25.5,
"top": 275,
"height": 72,
"width": 541.5,
"field": "tablepm",
"right": 567,
"bottom": 282.75,
"vCenter": 296.25,
"hCenter": 246.75,
"fontSize": 9,
"rowsColumnsMerge": "(row,col,colIndex,rowIndex,tableData,printData)=>{const mergeFields=['appDates','executeOrgNames'];if(mergeFields.includes(col.field)&&printData?.spanValues){const currentKey=row.appointmentDate+'_'+row.appointmentStartTime+'_'+row.appointmentEndTime+'_'+row.executeOrgNames;const isFirstRowInGroup=rowIndex===0||(tableData[rowIndex-1].appointmentDate!==row.appointmentDate)||(tableData[rowIndex-1].appointmentStartTime!==row.appointmentStartTime)||(tableData[rowIndex-1].appointmentEndTime!==row.appointmentEndTime)||(tableData[rowIndex-1].executeOrgNames!==row.executeOrgNames);if(isFirstRowInGroup){return[printData.spanValues[currentKey]||1,1];}else{return[0,1];}}else{return[1,1];}}",
"columns": [
[{
"width": 541.5,
"title": "<div style='font-weight: bold; text-align: center;'>下午</div>",
"colspan": 4,
"rowspan": 1,
"checked": true,
"align": "center",
"titleAlign": "center",
"headerStyle": "font-weight: bold; text-align: center;",
"titleStyle": "font-weight: bold; text-align: center;"
}],
[{
"width": 75,
"title": "预约时间",
"field": "appDates",
"checked": true,
"columnId": "appDates",
"fixed": false,
"rowspan": 1,
"colspan": 1
}, {
"width": 110,
"title": "地点",
"field": "executeOrgNames",
"checked": true,
"columnId": "executeOrgNames",
"fixed": false,
"rowspan": 1,
"colspan": 1
}, {
"width": 207,
"title": "项目名称",
"field": "projectNames",
"checked": true,
"columnId": "projectNames",
"fixed": false,
"rowspan": 1,
"colspan": 1,
"align": "left",
"renderFormatter": "function (value, row, colIndex, options, rowIndex) { return \"<div style='margin-top:5px; margin-bottom:5px;'>\"+row.projectNames+\"</div><div style='margin-bottom:5px;color:#777'>\"+row.projectMainDescribes+\"</div>\";}"
}, {
"width": 150,
"title": "注意事项",
"field": "projectCautions",
"checked": true,
"columnId": "projectCautions",
"fixed": false,
"rowspan": 1,
"colspan": 1,
"renderFormatter": "function (value, row, colIndex, options, rowIndex) { return \"<div style='margin-top:5px; margin-bottom:5px;'>\"+row.projectCautions+\"</div>\";}"
}]
]
},
"printElementType": {
"title": "表格",
"type": "table",
"editable": true,
"columnDisplayEditable": true,
"columnDisplayIndexEditable": true,
"columnTitleEditable": true,
"columnResizable": true,
"columnAlignEditable": true,
"isEnableEditField": true,
"isEnableContextMenu": true,
"isEnableInsertRow": true,
"isEnableDeleteRow": true,
"isEnableInsertColumn": true,
"isEnableDeleteColumn": true,
"isEnableMergeCell": true
}
}, {
"options": {
"left": 25.5,
"top": 360,
"height": 9.75,
"width": 168.5,
"title": "<span style='font-weight: bold;'>| 免预约项目</span>(随到随做)",
"coordinateSync": false,
"widthHeightSync": false,
"fontSize": 9,
"color": "#333333",
"qrCodeLevel": 0,
"right": 177,
"bottom": 321.75,
"vCenter": 102.75,
"hCenter": 316.875
},
"printElementType": {
"title": "文本",
"type": "text"
}
}, {
"options": {
"left": 25.5,
"top": 380,
"height": 72,
"width": 541.5,
"field": "ntable",
"right": 567,
"bottom": 399.75,
"vCenter": 297.75,
"hCenter": 363.75,
"fontSize": 9,
"rowsColumnsMerge": "(row,col,colIndex,rowIndex,tableData,printData)=>{ const mergeFields=['executeOrgNames']; if(!mergeFields.includes(col.field) || !printData?.noAppointmentSpanValues || !tableData || tableData.length === 0) {\n return [1,1];\n } if(mergeFields.includes(col.field)&&printData?.noAppointmentSpanValues){const currentKey='noapp_'+row.executeOrgNames || '';const isFirstRowInGroup=rowIndex===0||(tableData[rowIndex-1].executeOrgNames!==row.executeOrgNames);if(isFirstRowInGroup){const spanValue = printData.noAppointmentSpanValues[currentKey] || 1; return [spanValue, 1]; }else{return[0,1];}}else{return[1,1];}}",
"columns": [
[{
"width": 160,
"title": "地点",
"field": "executeOrgNames",
"checked": true,
"columnId": "executeOrgNames",
"rowspan": 1,
"colspan": 1,
"fixed": false
},{
"width": 211.5,
"title": "项目名称",
"field": "projectNames",
"checked": true,
"columnId": "projectNames",
"rowspan": 1,
"colspan": 1,
"renderFormatter": "function (value, row, colIndex, options, rowIndex) { return \"<div style='margin-top:5px; margin-bottom:5px;'>\"+row.projectNames+\"</div><div style='margin-bottom:5px;color:#777777'>\"+row.projectMainDescribes+\"</div>\";}",
"fixed": false
}, {
"width": 170,
"title": "注意事项",
"field": "projectCautions",
"checked": true,
"columnId": "projectCautions",
"rowspan": 1,
"colspan": 1,
"renderFormatter": "function (value, row, colIndex, options, rowIndex) { return \"<div style='margin-top:5px; margin-bottom:5px;'>\"+row.projectCautions+\"</div>\";}",
"fixed": false
}]
]
},
"printElementType": {
"title": "表格",
"type": "table",
"editable": true,
"columnDisplayEditable": true,
"columnDisplayIndexEditable": true,
"columnTitleEditable": true,
"columnResizable": true,
"columnAlignEditable": true,
"isEnableEditField": true,
"isEnableContextMenu": true,
"isEnableInsertRow": true,
"isEnableDeleteRow": true,
"isEnableInsertColumn": true,
"isEnableDeleteColumn": true,
"isEnableMergeCell": true
}
}, {
"options": {
"left": 28.5,
"top": 676.5,
"height": 144,
"width": 120,
"title": "友情提示:",
"right": 149.25,
"bottom": 656.25,
"vCenter": 89.25,
"hCenter": 651.375,
"coordinateSync": false,
"widthHeightSync": false,
"fontSize": 8,
"color": "#333333",
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
}, {
"options": {
"left": 28.5,
"top": 693,
"height": 9.75,
"width": 411,
"title": "1、本次预约是为了合理安排您的检查,请您按照预约时间,提前10分钟到达指定的候诊区报到,报到完成后,请耐心在候诊区静候,等待叫号;",
"right": 439.5,
"bottom": 672.75,
"vCenter": 234,
"hCenter": 667.875,
"coordinateSync": false,
"widthHeightSync": false,
"fontSize": 8,
"color": "#333333",
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
}, {
"options": {
"left": 28.5,
"top": 719.5,
"height": 9.75,
"width": 411,
"title": "2、为避免医疗资源浪费,预约成功后您若因故不能前往,请提前告知医护人员取消并为您重新预约;",
"right": 438.75,
"bottom": 690.75,
"vCenter": 233.25,
"hCenter": 685.875,
"coordinateSync": false,
"widthHeightSync": false,
"fontSize": 8,
"color": "#333333",
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
}, {
"options": {
"left": 28.5,
"top": 736,
"height": 9.75,
"width": 415.5,
"title": "3、检查或治疗完毕后,指引单将由报到处工作人员回收,感谢您的理解与配合;",
"right": 445.5,
"bottom": 707.25,
"vCenter": 237.75,
"hCenter": 702.375,
"coordinateSync": false,
"widthHeightSync": false,
"fontSize": 8,
"color": "#333333",
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
}, {
"options": {
"left": 28.5,
"top": 752.5,
"height": 9.75,
"width": 415.5,
"title": "4、特殊情况请结合临床安排;",
"right": 442.5,
"bottom": 723.75,
"vCenter": 234.75,
"hCenter": 718.875,
"coordinateSync": false,
"widthHeightSync": false,
"fontSize": 8,
"color": "#333333",
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},{
"options": {
"left": 499.5,
"top": 681.5,
"height": 60,
"width": 60,
"field": "qrcode2",
"testData": "XS888888888",
"fontSize": 12,
"lineHeight": 18,
"textType": "qrcode",
"title": "二维码",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"right": 556.5,
"bottom": 793.5,
"vCenter": 526.5,
"hCenter": 763.5
},
"printElementType": {
"title": "二维码",
"type": "text"
}
}, {
"options": {
"left": 498,
"top": 747.5,
"height": 9.75,
"width": 66,
"right": 562.74609375,
"bottom": 803.49609375,
"vCenter": 529.74609375,
"hCenter": 798.62109375,
"title": "扫码查看指引单",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},{
"options": {
"left": 28.5,
"top": 770,
"height": 9,
"width": 541.5
},
"printElementType": {
"title": "横线",
"type": "hline"
}
}, {
"options": {
"left": 28.5,
"top": 779,
"height": 9.75,
"width": 541.5,
"title": "青岛内分泌糖尿病医院 <img src='http://admin.ish.medmap.com.cn/img/printaddress.png' style='width:16px;height:16px;vertical-align:middle;;margin-left:5px;' />青岛市市北区合肥路760号",
"right": 440.49609375,
"bottom": 767.49609375,
"vCenter": 234.99609375,
"hCenter": 762.62109375,
"coordinateSync": false,
"widthHeightSync": false,
"fontSize": 8,
"color": "#333333",
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
}, {
"options": {
"left": 28.5,
"top": 795.5,
"height": 9.75,
"width": 541.5,
"title": "Qingdao Endocrine and Diabetes Hospital <img src='http://admin.ish.medmap.com.cn/img/printaddress.png' style='width:21px;height:16px;vertical-align:middle;padding-left:5px;' />760 Hefei Road,Shibei District Qingdao",
"right": 440.49609375,
"bottom": 785.49609375,
"vCenter": 234.99609375,
"hCenter": 780.62109375,
"coordinateSync": false,
"widthHeightSync": false,
"fontSize": 8,
"color": "#333333",
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
}],
"paperNumberLeft": 565.5,
"paperNumberTop": 819,
"panelLayoutOptions":{}
}]
}
具体参考一下地址:
https://mdnice.com/writing/3501919cc06445599f1a12653e804233
https://blog.csdn.net/gitblog_00007/article/details/155990800
162




被折叠的 条评论
为什么被折叠?



