refactor(table): 更新表格组件的单元格合并配置和事件处理

- 将所有表格的单元格合并方法从数组格式 [rowspan, colspan] 改为对象格式 { rowspan, colspan }
- 为 vxe-table 组件添加 checkbox-config 配置以支持复选框保留选择功能
- 移除复选框的 :reserve-selection 属性并改用 checkbox-config 配置
- 全局注册 VxeTableCompat 组件来归一化 cell-click 和 current-change 事件参数
- 更新技术执行和技术审批页面的表格组件配置和操作逻辑
- 优化
This commit is contained in:
2026-06-05 11:44:31 +08:00
parent c0149693f5
commit 14cb913943
33 changed files with 501 additions and 106 deletions

View File

@@ -2,6 +2,7 @@ import {createApp, nextTick} from 'vue';
import VxeUIAll from 'vxe-table';
import 'vxe-table/lib/style.css';
import VxeTableCompat from '@/components/VxeTableCompat';
import Cookies from 'js-cookie';
// 导入 hiprint 并挂载到全局 window 对象
@@ -122,6 +123,8 @@ app.use(ElementPlus, {
size: Cookies.get('size') || 'default',
});
app.use(VxeUIAll);
// 全局注册 vxe-table 兼容层:归一化 cell-click/current-change 事件参数
app.component('vxe-table', VxeTableCompat);
// 导入公告帮助工具
import { initNoticePopupAfterLogin } from '@/utils/noticeHelper'

View File

@@ -1,4 +1,4 @@
<template>
<template>
<div>
<div class="business">
<!-- <vxe-table
@@ -474,63 +474,63 @@ const init = async () => {
const handleSpan = ({ row, column, rowIndex, columnIndex }) => {
if (columnIndex === 0) {
if (rowIndex === 0) {
return [dangerData.value.length, 1];
return { rowspan: dangerData.value.length, colspan: 1 };
} else if (rowIndex > 0 && rowIndex < 27) {
return [0, 0];
return { rowspan: 0, colspan: 0 };
}
if (rowIndex === 27) {
return [1, 4];
return { rowspan: 1, colspan: 4 };
}
}
if (columnIndex === 1) {
if (rowIndex === 0) {
return [4, 1];
return { rowspan: 4, colspan: 1 };
} else if (rowIndex > 0 && rowIndex < 4) {
return [0, 0];
return { rowspan: 0, colspan: 0 };
}
if (rowIndex === 4) {
return [3, 1];
return { rowspan: 3, colspan: 1 };
} else if (rowIndex > 0 && rowIndex < 7) {
return [0, 0];
return { rowspan: 0, colspan: 0 };
}
if (rowIndex === 7) {
return [4, 1];
return { rowspan: 4, colspan: 1 };
} else if (rowIndex > 0 && rowIndex < 11) {
return [0, 0];
return { rowspan: 0, colspan: 0 };
}
if (rowIndex === 11) {
return [3, 1];
return { rowspan: 3, colspan: 1 };
} else if (rowIndex > 0 && rowIndex < 14) {
return [0, 0];
return { rowspan: 0, colspan: 0 };
}
if (rowIndex === 14) {
return [7, 1];
return { rowspan: 7, colspan: 1 };
} else if (rowIndex > 0 && rowIndex < 21) {
return [0, 0];
return { rowspan: 0, colspan: 0 };
}
if (rowIndex === 21) {
return [6, 1];
return { rowspan: 6, colspan: 1 };
} else if (rowIndex > 0 && rowIndex < 27) {
return [0, 0];
return { rowspan: 0, colspan: 0 };
}
}
return [1, 1];
return { rowspan: 1, colspan: 1 };
};
const arraySpanMethod = ({ row, column, rowIndex, columnIndex }) => {
// 护理措施
if (columnIndex === 0) {
if (rowIndex === 0) {
return [nursingData.value.length, 1];
return { rowspan: nursingData.value.length, colspan: 1 };
} else if (rowIndex > 0 && rowIndex < 8) {
return [0, 0];
return { rowspan: 0, colspan: 0 };
}
// 护士签名
if (rowIndex === 8) {
return [1, 2];
return { rowspan: 1, colspan: 2 };
}
}
return [1, 1];
return { rowspan: 1, colspan: 1 };
};
const onSubmit = async () => {

View File

@@ -1,4 +1,4 @@
<template>
<template>
<div
ref="tableWrapper"
tabindex="0"

View File

@@ -1,4 +1,4 @@
<template>
<template>
<div
ref="tableWrapper"
tabindex="0"

View File

@@ -1,4 +1,4 @@
<template>
<template>
<div class="main-content">
<!-- 中间组套列表 -->
<div class="section-card-left">

View File

@@ -1,4 +1,4 @@
<template>
<template>
<div
ref="tableWrapper"
tabindex="0"

View File

@@ -1,4 +1,4 @@
<template>
<template>
<div
v-loading="readCardLoading"
style="display: flex; justify-content: space-between"
@@ -741,7 +741,7 @@ function objectSpanMethod({ row, column, rowIndex, columnIndex }) {
// 操作列索引为10从0开始计数
// 如果当前行的paymentId为空则不合并
if (!row.paymentId) {
return [1, 1];
return { rowspan: 1, colspan: 1 };
}
// 查找相同paymentId的连续行
@@ -755,14 +755,14 @@ function objectSpanMethod({ row, column, rowIndex, columnIndex }) {
break;
}
}
return [spanCount, 1];
return { rowspan: spanCount, colspan: 1 };
} else {
// 这不是具有相同paymentId的第一行返回0表示不显示
return [0, 0];
return { rowspan: 0, colspan: 0 };
}
}
// 其他列不合并
return [1, 1];
return { rowspan: 1, colspan: 1 };
}
// function printCharge(row) {

View File

@@ -1,4 +1,4 @@
<template>
<template>
<el-dialog
v-model="dialogVisible"
title="补打挂号单凭证"

View File

@@ -1,4 +1,4 @@
<template>
<template>
<div
v-loading="loading"
style="display: flex; justify-content: space-between"
@@ -528,7 +528,7 @@ async function handleReadCard(value) {
function objectSpanMethod({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 10) {
if (!row.paymentId) {
return [1,1];
return { rowspan: 1, colspan: 1 };
}
let spanCount = 1;
if (rowIndex === 0 || chargeList.value[rowIndex - 1].paymentId !== row.paymentId) {
@@ -539,12 +539,12 @@ function objectSpanMethod({ row, column, rowIndex, columnIndex }) {
break;
}
}
return [spanCount, 1];
return { rowspan: spanCount, colspan: 1 };
} else {
return [0, 0];
return { rowspan: 0, colspan: 0 };
}
}
return [1, 1];
return { rowspan: 1, colspan: 1 };
}
// 打印功能

View File

@@ -1,4 +1,4 @@
<template>
<template>
<div
ref="tableWrapper"
tabindex="0"

View File

@@ -1,4 +1,4 @@
<template>
<template>
<div class="app-container">
<el-row :gutter="20">
<el-col
@@ -751,13 +751,13 @@ function operationSpanMethod({ row, column, rowIndex, columnIndex }) {
const groupId = row.groupId;
// 如果没有groupId则不合并
if (groupId === undefined || groupId === null) {
return [1, 1];
return { rowspan: 1, colspan: 1 };
}
// 向上查找相同groupId的行如果找到则隐藏当前行
for (let i = rowIndex - 1; i >= 0; i--) {
if (activityList.value[i].groupId === groupId) {
return [0, 0]; // 隐藏被合并的行
return { rowspan: 0, colspan: 0 }; // 隐藏被合并的行
} else {
break;
}
@@ -773,9 +773,9 @@ function operationSpanMethod({ row, column, rowIndex, columnIndex }) {
}
}
return [spanCount, 1];
return { rowspan: spanCount, colspan: 1 };
}
return [1, 1];
return { rowspan: 1, colspan: 1 };
}
// 打印处方

View File

@@ -1,4 +1,4 @@
<template>
<template>
<div class="container">
<!-- 左侧患者列表 -->
<el-card class="patient-list">
@@ -420,7 +420,7 @@ function handelSpanMethod({ row, column, rowIndex, columnIndex }) {
// 检查当前列是否需要合并
if (!mergeColumns.includes(columnIndex)) {
return [1, 1];
return { rowspan: 1, colspan: 1 };
}
// 获取当前行的 requestId
@@ -428,7 +428,7 @@ function handelSpanMethod({ row, column, rowIndex, columnIndex }) {
// 如果没有 requestId不进行合并
if (!currentRequestId) {
return [1, 1];
return { rowspan: 1, colspan: 1 };
}
// 查找具有相同 requestId 的连续行
@@ -444,7 +444,7 @@ function handelSpanMethod({ row, column, rowIndex, columnIndex }) {
// 如果当前行不是合并组的第一行,则不显示
if (startIndex !== rowIndex) {
return [0, 0];
return { rowspan: 0, colspan: 0 };
}
// 向下查找相同 requestId 的行

View File

@@ -1,2 +1,190 @@
<template>
</template>
<div class="app-container">
<!-- 搜索栏 -->
<el-form
v-show="showSearch"
ref="queryFormRef"
:model="queryParams"
size="small"
:inline="true"
label-width="80px"
>
<el-form-item title="申请类型" field="applyType">
<el-select v-model="queryParams.applyType" placeholder="全部" clearable>
<el-option title="全部" value="" />
<el-option title="检查" value="exam" />
<el-option title="检验" value="lab" />
</el-select>
</el-form-item>
<el-form-item title="申请单号" field="applyNo">
<el-input v-model="queryParams.applyNo" placeholder="请输入申请单号" clearable />
</el-form-item>
<el-form-item title="患者姓名" field="patientName">
<el-input v-model="queryParams.patientName" placeholder="请输入患者姓名" clearable />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">查询</el-button>
<el-button icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<!-- 操作栏 -->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-check" size="small" :disabled="single" @click="handleExecute">
执行确认
</el-button>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList" />
</el-row>
<!-- 数据表格 -->
<vxe-table v-loading="loading" :data="orderList" @checkbox-change="handleSelectionChange" border stripe>
<vxe-column type="checkbox" width="55" align="center" />
<vxe-column title="申请单号" field="applyNo" width="180" :show-overflow="true" />
<vxe-column title="申请类型" field="applyTypeName" width="80" align="center">
<template #default="{ row }">
<el-tag :type="row.applyType === 'exam' ? 'primary' : 'success'" size="small">
{{ row.applyTypeName }}
</el-tag>
</template>
</vxe-column>
<vxe-column title="患者ID" field="patientId" width="120" :show-overflow="true" />
<vxe-column title="患者姓名" field="patientName" width="100" :show-overflow="true" />
<vxe-column title="就诊号" field="visitNo" width="140" :show-overflow="true" />
<vxe-column title="开单科室" field="applyDeptCode" width="120" :show-overflow="true" />
<vxe-column title="申请医生" field="applyDocName" width="100" :show-overflow="true" />
<vxe-column title="申请时间" field="applyTime" width="170" align="center" />
<vxe-column title="诊断/描述" field="clinicDesc" min-width="180" :show-overflow="true" />
<vxe-column title="加急" width="70" align="center">
<template #default="{ row }">
<el-tag v-if="row.isUrgent === 1" type="danger" size="small">加急</el-tag>
<span v-else>普通</span>
</template>
</vxe-column>
<vxe-column title="状态" width="100" align="center">
<template #default="{ row }">
<el-tag :type="statusTagType(row.applyStatus)" size="small">
{{ statusText(row) }}
</el-tag>
</template>
</vxe-column>
<vxe-column title="操作" width="120" align="center" fixed="right">
<template #default="{ row }">
<el-button type="primary" link size="small" @click="handleExecuteSingle(row)">
执行确认
</el-button>
</template>
</vxe-column>
</vxe-table>
<pagination
v-show="total > 0"
v-model:page="queryParams.pageNo"
v-model:limit="queryParams.pageSize"
:total="total"
@pagination="getList"
/>
</div>
</template>
<script setup>
import { ref, reactive, onMounted } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { listExecuteOrders, executeExamOrder, executeLabOrder } from '@/api/techStation'
const loading = ref(false)
const showSearch = ref(true)
const orderList = ref([])
const total = ref(0)
const ids = ref([])
const single = ref(true)
const multiple = ref(true)
const queryFormRef = ref(null)
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
applyType: '',
patientName: '',
applyNo: ''
})
// 状态文本映射
function statusText(row) {
if (row.applyType === 'exam') {
const map = { 0: '已开单', 1: '已收费', 2: '已预约', 3: '已签到', 4: '部分报告', 5: '已完成', 6: '已作废' }
return map[row.applyStatus] || '未知'
}
const map = { 1: '待发送', 2: '已收费', 3: '已执行' }
return map[row.applyStatus] || '未知'
}
function statusTagType(status) {
if (status === 1) return 'warning'
if (status === 2 || status === 3) return 'primary'
if (status === 5) return 'success'
if (status === 6) return 'info'
return ''
}
async function getList() {
loading.value = true
try {
const res = await listExecuteOrders(queryParams)
orderList.value = res.rows || []
total.value = res.total || 0
} finally {
loading.value = false
}
}
function handleQuery() {
queryParams.pageNo = 1
getList()
}
function resetQuery() {
queryFormRef.value?.resetFields()
queryParams.pageNo = 1
queryParams.applyType = ''
queryParams.patientName = ''
queryParams.applyNo = ''
getList()
}
function handleSelectionChange(selection) {
ids.value = selection.map(item => item.applyNo)
single.value = selection.length !== 1
multiple.value = !selection.length
}
async function handleExecute() {
const row = orderList.value.find(item => item.applyNo === ids.value[0])
if (!row) return
await doExecute(row)
}
async function handleExecuteSingle(row) {
await doExecute(row)
}
async function doExecute(row) {
await ElMessageBox.confirm(`确认执行申请单 ${row.applyNo}`, '执行确认', { type: 'warning' })
try {
if (row.applyType === 'exam') {
await executeExamOrder(row.applyNo)
} else {
await executeLabOrder(row.applyNo)
}
ElMessage.success('执行成功')
getList()
} catch (e) {
ElMessage.error(e.message || '执行失败')
}
}
onMounted(() => {
getList()
})
</script>

View File

@@ -1,2 +1,206 @@
<template>
</template>
<div class="app-container">
<!-- 搜索栏 -->
<el-form
v-show="showSearch"
ref="queryFormRef"
:model="queryParams"
size="small"
:inline="true"
label-width="80px"
>
<el-form-item title="申请类型" field="applyType">
<el-select v-model="queryParams.applyType" placeholder="全部" clearable>
<el-option title="全部" value="" />
<el-option title="检查" value="exam" />
<el-option title="检验" value="lab" />
</el-select>
</el-form-item>
<el-form-item title="申请单号" field="applyNo">
<el-input v-model="queryParams.applyNo" placeholder="请输入申请单号" clearable />
</el-form-item>
<el-form-item title="患者姓名" field="patientName">
<el-input v-model="queryParams.patientName" placeholder="请输入患者姓名" clearable />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">查询</el-button>
<el-button icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<!-- 操作栏 -->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="success" plain icon="el-icon-check" size="small" :disabled="single" @click="handleApprove">
审批通过
</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="el-icon-close" size="small" :disabled="single" @click="handleReject">
驳回
</el-button>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList" />
</el-row>
<!-- 数据表格 -->
<vxe-table v-loading="loading" :data="orderList" @checkbox-change="handleSelectionChange" border stripe>
<vxe-column type="checkbox" width="55" align="center" />
<vxe-column title="申请单号" field="applyNo" width="180" :show-overflow="true" />
<vxe-column title="申请类型" field="applyTypeName" width="80" align="center">
<template #default="{ row }">
<el-tag :type="row.applyType === 'exam' ? 'primary' : 'success'" size="small">
{{ row.applyTypeName }}
</el-tag>
</template>
</vxe-column>
<vxe-column title="患者ID" field="patientId" width="120" :show-overflow="true" />
<vxe-column title="患者姓名" field="patientName" width="100" :show-overflow="true" />
<vxe-column title="就诊号" field="visitNo" width="140" :show-overflow="true" />
<vxe-column title="开单科室" field="applyDeptCode" width="120" :show-overflow="true" />
<vxe-column title="申请医生" field="applyDocName" width="100" :show-overflow="true" />
<vxe-column title="申请时间" field="applyTime" width="170" align="center" />
<vxe-column title="诊断/描述" field="clinicDesc" min-width="180" :show-overflow="true" />
<vxe-column title="申请状态" width="100" align="center">
<template #default="{ row }">
<el-tag type="warning" size="small">待审批</el-tag>
</template>
</vxe-column>
<vxe-column title="备注" field="applyRemark" width="150" :show-overflow="true" />
<vxe-column title="操作" width="160" align="center" fixed="right">
<template #default="{ row }">
<el-button type="success" link size="small" @click="handleApproveSingle(row)">
通过
</el-button>
<el-button type="danger" link size="small" @click="handleRejectSingle(row)">
驳回
</el-button>
</template>
</vxe-column>
</vxe-table>
<pagination
v-show="total > 0"
v-model:page="queryParams.pageNo"
v-model:limit="queryParams.pageSize"
:total="total"
@pagination="getList"
/>
</div>
</template>
<script setup>
import { ref, reactive, onMounted } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import {
listRefundApproveOrders,
approveExamRefund,
rejectExamRefund,
approveLabRefund,
rejectLabRefund
} from '@/api/techStation'
const loading = ref(false)
const showSearch = ref(true)
const orderList = ref([])
const total = ref(0)
const ids = ref([])
const applyTypes = ref([])
const single = ref(true)
const multiple = ref(true)
const queryFormRef = ref(null)
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
applyType: '',
patientName: '',
applyNo: ''
})
async function getList() {
loading.value = true
try {
const res = await listRefundApproveOrders(queryParams)
orderList.value = res.rows || []
total.value = res.total || 0
} finally {
loading.value = false
}
}
function handleQuery() {
queryParams.pageNo = 1
getList()
}
function resetQuery() {
queryFormRef.value?.resetFields()
queryParams.pageNo = 1
queryParams.applyType = ''
queryParams.patientName = ''
queryParams.applyNo = ''
getList()
}
function handleSelectionChange(selection) {
ids.value = selection.map(item => item.applyNo)
applyTypes.value = selection.map(item => item.applyType)
single.value = selection.length !== 1
multiple.value = !selection.length
}
async function doApprove(row) {
await ElMessageBox.confirm(`确认审批通过申请单 ${row.applyNo}`, '审批确认', { type: 'success' })
try {
if (row.applyType === 'exam') {
await approveExamRefund(row.applyNo)
} else {
await approveLabRefund(row.applyNo)
}
ElMessage.success('审批通过')
getList()
} catch (e) {
ElMessage.error(e.message || '审批失败')
}
}
async function doReject(row) {
await ElMessageBox.confirm(`确认驳回申请单 ${row.applyNo} 的退费申请?`, '驳回确认', { type: 'warning' })
try {
if (row.applyType === 'exam') {
await rejectExamRefund(row.applyNo)
} else {
await rejectLabRefund(row.applyNo)
}
ElMessage.success('已驳回')
getList()
} catch (e) {
ElMessage.error(e.message || '驳回失败')
}
}
function handleApprove() {
const row = orderList.value.find(item => item.applyNo === ids.value[0])
if (!row) return
doApprove(row)
}
function handleReject() {
const row = orderList.value.find(item => item.applyNo === ids.value[0])
if (!row) return
doReject(row)
}
function handleApproveSingle(row) {
doApprove(row)
}
function handleRejectSingle(row) {
doReject(row)
}
onMounted(() => {
getList()
})
</script>

View File

@@ -1,4 +1,4 @@
<template>
<template>
<div class="consultation-application-container">
<!-- 页面标题 -->
<div class="page-header">

View File

@@ -1,4 +1,4 @@
<template>
<template>
<div class="app-container consultation-confirmation">
<div class="page-header">
<span class="tab-title">会诊确认</span>

View File

@@ -1,4 +1,4 @@
<template>
<template>
<div
ref="tableWrapper"
tabindex="0"

View File

@@ -1,4 +1,4 @@
<template>
<template>
<el-drawer
v-model="drawer"
title="医嘱组套"

View File

@@ -1,4 +1,4 @@
<template>
<template>
<div
ref="tableWrapper"
tabindex="0"

View File

@@ -1,4 +1,4 @@
<template>
<template>
<div class="app-container">
<div class="left">
<div class="form">
@@ -722,15 +722,15 @@ function spanMethod({ row, column, rowIndex, columnIndex }) {
const count = medicineInfoList.value.filter(
(item) => item.prescriptionNo === prescriptionNo
).length;
return [count, 1]; // 合并count行1列
return { rowspan: count, colspan: 1 }; // 合并count行1列
} else {
return [0, 0]; // 其他行不显示
return { rowspan: 0, colspan: 0 }; // 其他行不显示
}
}
}
// 其他列不进行合并
return [1, 1];
return { rowspan: 1, colspan: 1 };
}
function handleSelectionChange(selectedRows, currentRow) {

View File

@@ -1,4 +1,4 @@
<template>
<template>
<div class="med-summary-container">
<div class="summary-card" style="width: 40%; height: 80vh">
<div class="summary-card-header">{{ '汇总单' }}</div>
@@ -75,7 +75,7 @@
style="width: 100%"
border
auto-resize
@cell-click="({ row }) => getDetails(row)"
@cell-click="(row) => getDetails(row)"
>
<vxe-column
type="checkbox"

View File

@@ -1,4 +1,4 @@
<template>
<template>
<div class="container">
<!-- 左侧患者列表 -->
<el-card class="patient-list">
@@ -421,7 +421,7 @@ function handelSpanMethod({ row, column, rowIndex, columnIndex }) {
// 检查当前列是否需要合并
if (!mergeColumns.includes(columnIndex)) {
return [1, 1];
return { rowspan: 1, colspan: 1 };
}
// 获取当前行的 requestId
@@ -429,7 +429,7 @@ function handelSpanMethod({ row, column, rowIndex, columnIndex }) {
// 如果没有 requestId不进行合并
if (!currentRequestId) {
return [1, 1];
return { rowspan: 1, colspan: 1 };
}
// 查找具有相同 requestId 的连续行
@@ -445,7 +445,7 @@ function handelSpanMethod({ row, column, rowIndex, columnIndex }) {
// 如果当前行不是合并组的第一行,则不显示
if (startIndex !== rowIndex) {
return [0, 0];
return { rowspan: 0, colspan: 0 };
}
// 向下查找相同 requestId 的行

View File

@@ -1,4 +1,4 @@
<template>
<template>
<div
v-loading="readCardLoading"
style="display: flex; justify-content: space-between"
@@ -865,7 +865,7 @@ function objectSpanMethod({ row, column, rowIndex, columnIndex }) {
// 操作列索引为10从0开始计数
// 如果当前行的paymentId为空则不合并
if (!row.paymentId) {
return [1, 1];
return { rowspan: 1, colspan: 1 };
}
// 查找相同paymentId的连续行
@@ -879,14 +879,14 @@ function objectSpanMethod({ row, column, rowIndex, columnIndex }) {
break;
}
}
return [spanCount, 1];
return { rowspan: spanCount, colspan: 1 };
} else {
// 这不是具有相同paymentId的第一行返回0表示不显示
return [0, 0];
return { rowspan: 0, colspan: 0 };
}
}
// 其他列不合并
return [1, 1];
return { rowspan: 1, colspan: 1 };
}
function printCharge(row) {

View File

@@ -1,4 +1,4 @@
<template>
<template>
<div class="diagnose-container">
<!-- 常用诊断个人诊断科室诊断历史诊断 -->
<diagnose-folder
@@ -195,7 +195,7 @@
<vxe-table
:data="filteredSyndromeList"
max-height="300"
@cell-click="({ row }) => handleSelectSyndrome(row, scope.row)"
@cell-click="(row) => handleSelectSyndrome(row, scope.row)"
>
<vxe-column
title="证候名称"

View File

@@ -1,4 +1,4 @@
<template>
<template>
<div class="medicalOrderList-container">
<div class="search-container">
<el-space
@@ -430,22 +430,22 @@ const arraySpanMethod = ({
// 如果是父级行
if (row.children && row.children.length > 0) {
if (columnIndex === 0) {
return [1, 1]
return { rowspan: 1, colspan: 1 }
}
// 如果是患者列
if (columnIndex === 1) {
return [1, 16]
return { rowspan: 1, colspan: 16 }
}
else {
return [1, 0]
return { rowspan: 1, colspan: 0 }
}
}
// 如果是子级行,显示其他列
if (!row.children || row.children.length == 0) {
return [1, 1]
return { rowspan: 1, colspan: 1 }
}
// 如果是父级行,隐藏其他列
return [1, 1]
return { rowspan: 1, colspan: 1 }
}
const drugDistributionSummaryData = ref([
{

View File

@@ -1,4 +1,4 @@
<!--
<!--
* @Author: sjjh
* @Date: 2025-04-16 20:54:48
* @Description:
@@ -229,21 +229,21 @@ const arraySpanMethod = ({
// 如果是父级行
if (row.children && row.children.length > 0) {
if (columnIndex === 0) {
return [1, 1]
return { rowspan: 1, colspan: 1 }
}
// 如果是患者列
if (columnIndex === 1) {
return [1, 6]
return { rowspan: 1, colspan: 6 }
} else {
return [1, 0]
return { rowspan: 1, colspan: 0 }
}
}
// 如果是子级行,显示其他列
if (!row.children || row.children.length == 0) {
return [1, 1]
return { rowspan: 1, colspan: 1 }
}
// 如果是父级行,隐藏其他列
return [1, 1]
return { rowspan: 1, colspan: 1 }
}
const statusOptions = [
{ value: '全部', label: '全部' },

View File

@@ -1,4 +1,4 @@
<!--
<!--
* @Author: sjjh
* @Date: 2025-04-16 20:54:48
* @Description:
@@ -339,21 +339,21 @@ const arraySpanMethod = ({ row, column, rowIndex, columnIndex }) => {
// 如果是父级行
if (row.children && row.children.length > 0) {
if (columnIndex === 0) {
return [1, 1];
return { rowspan: 1, colspan: 1 };
}
// 如果是患者列
if (columnIndex === 1) {
return [1, 6];
return { rowspan: 1, colspan: 6 };
} else {
return [1, 0];
return { rowspan: 1, colspan: 0 };
}
}
// 如果是子级行,显示其他列
if (!row.children || row.children.length == 0) {
return [1, 1];
return { rowspan: 1, colspan: 1 };
}
// 如果是父级行,隐藏其他列
return [1, 1];
return { rowspan: 1, colspan: 1 };
};
const statusOptions = [
{ value: '未执行', label: '未执行' },

View File

@@ -1,4 +1,4 @@
<!--
<!--
* @Author: sjjh
* @Date: 2025-09-09 13:49:40
* @Description: 药品发送
@@ -238,21 +238,21 @@ const arraySpanMethod = ({
// 如果是父级行
if (row.children && row.children.length > 0) {
if (columnIndex === 0) {
return [1, 1]
return { rowspan: 1, colspan: 1 }
}
// 如果是患者列
if (columnIndex === 1) {
return [1, 7]
return { rowspan: 1, colspan: 7 }
} else {
return [1, 0]
return { rowspan: 1, colspan: 0 }
}
}
// 如果是子级行,显示其他列
if (!row.children || row.children.length == 0) {
return [1, 1]
return { rowspan: 1, colspan: 1 }
}
// 如果是父级行,隐藏其他列
return [1, 1]
return { rowspan: 1, colspan: 1 }
}
const collectTsableData = ref([
// {

View File

@@ -1,4 +1,4 @@
<template>
<template>
<div class="app-container">
<div class="left">
<div class="form">
@@ -1000,15 +1000,15 @@ function spanMethod({row, column, rowIndex, columnIndex}) {
const count = medicineInfoList.value.filter(
(item) => item.prescriptionNo === prescriptionNo
).length;
return [count, 1]; // 合并count行1列
return { rowspan: count, colspan: 1 }; // 合并count行1列
} else {
return [0, 0]; // 其他行不显示
return { rowspan: 0, colspan: 0 }; // 其他行不显示
}
}
}
// 其他列不进行合并
return [1, 1];
return { rowspan: 1, colspan: 1 };
}
// 单元格类名设置

View File

@@ -1,4 +1,4 @@
<template>
<template>
<div class="app-container">
<!-- 查询表单 -->
<el-form

View File

@@ -1,4 +1,4 @@
<template>
<template>
<div class="app-container">
<!-- 顶部筛选区 -->
<el-form

View File

@@ -1,4 +1,4 @@
<template>
<template>
<div class="app-container">
<h4 class="form-header h4">
基本信息
@@ -42,7 +42,7 @@
<h4 class="form-header h4">
角色信息
</h4>
<vxe-table
<vxe-table :checkbox-config="{ reserve: true }"
ref="roleRef"
v-loading="loading"
:row-key="getRowKey"
@@ -62,7 +62,7 @@
</vxe-column>
<vxe-column
type="checkbox"
:reserve-selection="true"
width="55"
/>
<vxe-column

View File

@@ -1,4 +1,4 @@
<template>
<template>
<div class="app-container">
<h4 class="form-header h4">
基本信息
@@ -42,7 +42,7 @@
<h4 class="form-header h4">
角色信息
</h4>
<vxe-table
<vxe-table :checkbox-config="{ reserve: true }"
ref="roleRef"
v-loading="loading"
:row-key="getRowKey"
@@ -62,7 +62,7 @@
</vxe-column>
<vxe-column
type="checkbox"
:reserve-selection="true"
width="55"
/>
<vxe-column