Compare commits

..

No commits in common. "64059e63addccb56a0f159e652423ec103021bce" and "55f90ad01e205f84c22d692ca4d1b61b0049d5d5" have entirely different histories.

6 changed files with 176 additions and 427 deletions

View File

@ -3,53 +3,44 @@
import request from '@/utils/request' import request from '@/utils/request'
// 查询字典列表 // 查询字典列表
export function liststatsparam(params: any) { export function liststatsparam(params:any) {
return request({ return request({
url: '/statstemp/param/list', url: '/statstemp/param/list',
method: 'get', method: 'get',
params params
}) })
} }
// 查询字典详细 // 查询字典详细
export function getstatsparam(id: number) { export function getstatsparam(id:number) {
return request({ return request({
url: `/statstemp/param/${id}`, url: `/statstemp/param/${id}`,
method: 'get' method: 'get'
}) })
} }
// 新增字典 // 新增字典
export function addstatsparam(params: any) { export function addstatsparam(params:any) {
return request({ return request({
url: '/statstemp/param', url: '/statstemp/param',
method: 'post', method: 'post',
data: params data:params
}) })
} }
// 修改字典 // 修改字典
export function updatestatsparam(params: any) { export function updatestatsparam(params:any) {
return request({ return request({
url: '/statstemp/param', url: '/statstemp/param',
method: 'put', method: 'put',
data: params data:params
}) })
} }
// 删除字典 // 删除字典
export function delstatsparam(id: any) { export function delstatsparam(id:any) {
return request({ return request({
url: `/statstemp/param/${id}`, url: `/statstemp/param/${id}`,
method: 'delete' method: 'delete'
}) })
}
// 获取模板详细信息
export function getstatsTemplate(params: any) {
return request({
url: '/stats/gettemplate',
method: 'get',
params
})
} }

View File

@ -37,7 +37,7 @@
</el-table> --> </el-table> -->
<vxe-table class="mytable-style" ref="tableRef" border resizable max-height="350px" <vxe-table class="mytable-style" ref="tableRef" border resizable max-height="350px"
:row-config="{ isHover: true, keyField: 'value', height: 30, isCurrent: true }" :data="filterData" :row-config="{ isHover: true, keyField: 'value', height: 30, isCurrent: true }" :data="filterData"
:current-row="currentRow" @cell-click="currentChange" :current-row="currentRow" @current-change="currentChange"
:tooltip-config="{ appendToBody: true, zIndex: 3000 }" :show-overflow="true" :tooltip-config="{ appendToBody: true, zIndex: 3000 }" :show-overflow="true"
:scroll-y="{ enabled: true, rSize: 30, height: '100%' }"> :scroll-y="{ enabled: true, rSize: 30, height: '100%' }">
<vxe-table-column v-for="field in props.fields" :field="field.prop" :title="field.label" align="center" <vxe-table-column v-for="field in props.fields" :field="field.prop" :title="field.label" align="center"
@ -56,7 +56,6 @@ import { getFirstLetter } from '@/utils/pinyin';
import { ElEmpty } from 'element-plus'; import { ElEmpty } from 'element-plus';
// @ts-ignore // @ts-ignore
import { comDict } from '@/utils/dict' import { comDict } from '@/utils/dict'
import { getoptionselect } from '@/api/liswork/xtwh/localconfigApi'
import { Emits, Props } from '@/types'; import { Emits, Props } from '@/types';
const props = withDefaults(defineProps<Props>(), { const props = withDefaults(defineProps<Props>(), {
@ -68,7 +67,6 @@ const props = withDefaults(defineProps<Props>(), {
border: true, border: true,
width: "100%", width: "100%",
dictType: '', dictType: '',
optionselect: false,
clearable: true, clearable: true,
objKey: 'value', objKey: 'value',
keyValue: false, keyValue: false,
@ -152,11 +150,6 @@ const handleDataEcho = () => {
} }
}; };
interface DictRefs {
[key: string]: {
value: any[];
};
}
// 初始化数据 // 初始化数据
const initData = async () => { const initData = async () => {
if (props.tableData) { if (props.tableData) {
@ -164,20 +157,8 @@ const initData = async () => {
processedTableData.value = processTableData(props.tableData); processedTableData.value = processTableData(props.tableData);
filterData.value = [...processedTableData.value]; filterData.value = [...processedTableData.value];
} else if (props.dictType) { } else if (props.dictType) {
// 如果传入dictType,通过comDict获取数据
let dictRefs: DictRefs = {}; const dictRefs = await comDict(props.dictType);
// 如果传入dictType,通过comDict获取数据 optionselect为true 用通用接口
if (props.optionselect) {
const resp = await getoptionselect({ zdlb: props.dictType });
const dictList = resp.data.map((p: any) => ({
label: p.zdmc,
value: p.zddh,
}));
dictRefs[props.dictType] = { value: dictList };
} else {
dictRefs = await comDict(props.dictType);
}
// // 从 ref 中获取实际数据 // // 从 ref 中获取实际数据
dictData.value = { dictData.value = {
[props.dictType]: toRaw(dictRefs[props.dictType].value) || [], [props.dictType]: toRaw(dictRefs[props.dictType].value) || [],
@ -189,8 +170,8 @@ const initData = async () => {
handleDataEcho(); handleDataEcho();
}; };
initData();
// 初始化数据 // 初始化数据
initData();
onMounted(() => { onMounted(() => {
}); });

View File

@ -17,7 +17,6 @@ export interface Props {
width?: string | number; width?: string | number;
disabled?: boolean; disabled?: boolean;
dictType?: string; dictType?: string;
optionselect?: boolean;
clearable?: boolean; clearable?: boolean;
keyValue?: boolean; //是否使用键值对模式 keyValue?: boolean; //是否使用键值对模式
} }

View File

@ -185,8 +185,8 @@ const form = ref({
sd: '', sd: '',
}) })
const queryParams = ref({ const queryParams = ref({
instrGroup: mbStore.defaultConfig.lisgroupid || 'ALL', // instrGroup: mbStore.defaultConfig.lisgroupid || 'ALL',
//instrGroup: 'ALL', instrGroup: 'ALL',
yq: mbStore.defaultConfig.defaultinstr || '1', yq: mbStore.defaultConfig.defaultinstr || '1',
zkrq1: '', zkrq1: '',
zkrq2: '', zkrq2: '',
@ -618,10 +618,10 @@ const getList = () => {
const timeDate = () => { const timeDate = () => {
const today = dayjs(); const today = dayjs();
const startOfWeek = today.subtract(6, 'day'); const startOfWeek = today.subtract(6, 'day');
queryParams.zkrq1 = startOfWeek.format('YYYY-MM-DD'); // queryParams.zkrq1 = startOfWeek.format('YYYY-MM-DD');
queryParams.zkrq2 = today.format('YYYY-MM-DD'); // queryParams.zkrq2 = today.format('YYYY-MM-DD');
// queryParams.value.zkrq1 = '2025-02-01'; queryParams.value.zkrq1 = '2025-02-01';
// queryParams.value.zkrq2 = today.format('YYYY-MM-DD'); queryParams.value.zkrq2 = today.format('YYYY-MM-DD');
} }
onMounted(() => { onMounted(() => {

View File

@ -1,238 +0,0 @@
/**
* @file index.vue 报告统计
* @author: w
* @since: 2026-01-27
*/
<template>
<div class="app-container">
<el-form ref="form" :model="queryParams" label-width="90px" inline size="small">
<el-form-item label="日期:">
<el-date-picker v-model="queryParams.st" type="date" format="YYYY-MM-DD" value-format="YYYY-MM-DD"
@change="handletime" style="width:180px" />&nbsp; - &nbsp;
<el-date-picker v-model="queryParams.et" type="date" format="YYYY-MM-DD" value-format="YYYY-MM-DD"
@change="handletime" style="width:178px" />
</el-form-item>
<el-form-item label="仪器组合:">
<SelectTable v-model:data="queryParams.instrGroup" :tableData="instrGroupOptions" :fields="instrGroupFields"
label="zdmc" value="zddh" objKey="zddh" style="width:150px" size="small" />
</el-form-item>
<el-form-item label="仪器:">
<YQSelectTable v-model:data="queryParams.yq" style="width:150px" size="small" />
</el-form-item>
<el-form-item label="检验医生:">
<SelectTable v-model:data="queryParams.yhdh" :fields="ysFields" :tableData="userList" label="nickName"
value="userName" objKey="userName" placeholder="请选择" style="width:150px" size="small" />
</el-form-item>
<el-form-item label="病人类型:">
<SelectTable v-model:data="queryParams.brlyname" dictType="PT" label="label" value="label" objKey="label"
placeholder="请选择" style="width:150px" size="small" />
</el-form-item>
<el-form-item label="性别:">
<SelectTable v-model:data="queryParams.brxb" dictType="SX" placeholder="请选择" style="width:150px" size="small" />
</el-form-item>
<el-form-item label="科室:" label-width="3.75rem">
<SelectTable v-model:data="queryParams.ksdh" dictType="DP" placeholder="请选择" style="width:150px" size="small" />
</el-form-item>
<el-form-item label="送检医生:">
<SelectTable v-model:data="queryParams.sjys" :fields="ysFields" :tableData="userList" label="nickName"
value="userName" objKey="userName" placeholder="请选择" style="width:150px" size="small" />
</el-form-item>
<el-form-item label="送检医院:">
<SelectTable v-model:data="queryParams.DstHospName" :tableData="hosList" label="label" value="label"
objKey="label" placeholder="请选择" style="width:150px" size="small" />
</el-form-item>
<div>
<el-form-item label=" ">
<el-checkbox v-model="queryParams.failed1" label="无病人代号的标本不统计" />
<el-checkbox v-model="queryParams.failed2" label="无病人姓名的标本不统计" />
<el-checkbox v-model="queryParams.failed3" label="未打印的标本不统计" />
<el-checkbox v-model="queryParams.failed4" label="未审核的标本不统计" />
<el-checkbox v-model="queryParams.failed6" label="显示人数" />
<el-checkbox v-model="queryParams.failed5" label="按审核日期" />
时间段: &nbsp;<el-time-picker v-model="queryParams.time" is-range range-separator="-" value-format="HH:mm"
format="HH:mm" style="width: 12rem;" />
</el-form-item>
</div>
<el-form-item label="统计项目:">
<el-checkbox-group v-model="queryParams.statItems">
<el-checkbox v-for="item in checkBoxs" :key="item.value" :label="item.value">{{ item.label }}</el-checkbox>
</el-checkbox-group>
&nbsp;&nbsp;
<el-checkbox v-model="queryParams.failed6" label="智能合并" />
</el-form-item>
</el-form>
<div class="title">{{ formatDict(userStore.sysLoginParam.loginYLJG, 'HOS') }}</div>
<div class="content">工作量统计表</div>
<div class="table-container">
<el-table :data="tableData" height="100%" border highlight-current-row v-loading="loading">
<el-table-column v-for="col in visibleColumns" :key="col.key" :label="col.label" :prop="col.prop" />
</el-table>
</div>
</div>
</template>
<script setup>
import YQSelectTable from '@/components/SelectTable/YQSelectTable/index.vue'
import { getComDicts, } from "@/api/liswork/dict/ComDict";
import { useCommonStore } from '@/store/modules/commonStore';
import { classCom } from '@/utils/classCom';
import { listhospital } from "@/api/regional/dict/hospital.js";
import { getstatsTemplate } from "@/api/liswork/xtwh/StatsparameterApi";
import { listUser } from '@/api/system/user.js'
import useUserStore from '@/store/modules/user'
import { getDictData, formatDict } from '@/hooks'
const userStore = useUserStore()
const mbStore = useCommonStore();
const route = useRoute();
const queryParams = reactive({
st: '',
et: '',
instrGroup: '',
yq: mbStore.defaultConfig.defaultinstr || '1',
brlyname: '',
yhdh: '',
brxb: '',
ksdh: '',
sjys: '',
DstHospName: '',
statItems: ['0', '1', '2', '3'],
})
const checkBoxs = ref([
{ label: '病人类型', value: '0' },
{ label: '性别', value: '1' },
{ label: '科室', value: '2' },
{ label: '送检医生', value: '3' },
{ label: '核对医生', value: '4' },
{ label: '费别', value: '5' },
{ label: '年', value: '6' },
{ label: '月', value: '7' },
{ label: '日', value: '8' },
{ label: '专业组', value: '9' },
{ label: '检查组', value: '10' },
{ label: '送检医院', value: '11' },
{ label: '急诊', value: '12' },
{ label: '绿色通道', value: '13' },
{ label: '部门组别', value: '14' },
{ label: '仪器', value: '15' },
{ label: '标本', value: '16' },
])
const tableData = ref([])
const loading = ref(false)
// 表格列配置:key对应checkBoxs的value,label为列名,prop为字段名(根据实际业务调整)
const tableColumns = ref([
{ key: '0', label: '病人类型', prop: 'brlyname' },
{ key: '1', label: '性别', prop: 'brxb' },
{ key: '2', label: '科室', prop: 'ksdh' },
{ key: '3', label: '送检医生', prop: 'sjys' },
{ key: '4', label: '核对医生', prop: 'yhdh' },
{ key: '5', label: '费别', prop: 'fabei' },
{ key: '6', label: '年', prop: 'year' },
{ key: '7', label: '月', prop: 'month' },
{ key: '8', label: '日', prop: 'day' },
{ key: '9', label: '专业组', prop: 'zyz' },
{ key: '10', label: '检查组', prop: 'jcz' },
{ key: '11', label: '送检医院', prop: 'DstHospName' },
{ key: '12', label: '急诊', prop: 'jizhen' },
{ key: '13', label: '绿色通道', prop: 'lvse' },
{ key: '14', label: '部门组别', prop: 'bmzb' },
{ key: '15', label: '仪器', prop: 'yq' },
{ key: '16', label: '标本', prop: 'bb' },
]);
// 过滤后的列
const visibleColumns = computed(() => {
if (!queryParams.statItems || queryParams.statItems.length === 0) {
return tableColumns.value;
}
return tableColumns.value.filter(col => queryParams.statItems.includes(col.key));
});
const instrGroupOptions = ref([])
const instrGroupFields = ref([
{ prop: 'zddh', label: '代号', width: 80, enablePinyinSearch: true },
{ prop: 'zdmc', label: '名称', width: 150, enablePinyinSearch: true },
])
const ysFields = ref([
{ prop: 'userName', label: '用户代号', width: 80, enablePinyinSearch: true },
{ prop: 'nickName', label: '用户姓名', width: 150, enablePinyinSearch: true },
])
// 部门组
const loadinstrGroupOptions = () => {
getComDicts({ zdlb: 'GROUP' }).then((res) => {
instrGroupOptions.value = res.data
instrGroupOptions.value.push({ zddh: 'ALL', zdmc: '所有仪器' })
});
}
const handletime = () => {
const dayDiff = classCom.getDayDiff(queryParams.st, queryParams.et)
if (dayDiff === -1 || dayDiff === -2) return ElMessage.warning('请选择有效的日期范围');
}
const userList = ref([]);
const hosList = ref([]);
onMounted(() => {
loadinstrGroupOptions()
const data = { status: 0, del_flag: 0, pageSize: 1000, pageNum: 1 }
listUser(data).then((res) => {
userList.value = res.rows;
});
listhospital().then((res) => {
hosList.value = res.rows.map((item) => {
return {
label: item.hospitalName,
value: item.hospitalCode
}
})
})
})
const getList = () => {
getstatsTemplate({ statsCode: route.query && route.query.statsCode, }).then(res => {
console.log('res==>', res);
})
};
getList()
onMounted(() => {
getDictData('HOS')
})
</script>
<style scoped lang="scss">
.el-form-item {
margin-bottom: 5px;
}
.title {
font-size: 20px;
text-align: center;
font-weight: 600;
}
.content {
font-size: 16px;
text-align: center;
margin-top: 10px;
font-weight: 600;
}
.table-container {
margin-top: 10px;
height: calc(100% - 200px);
}
</style>

View File

@ -5,95 +5,148 @@
*/ */
<template> <template>
<div class="app-container"> <div class="app-container">
<el-button type="primary" @click="search" size="default">查询</el-button> <el-form ref="form" :model="queryParams" label-width="90px" inline size="small">
<el-button type="primary" @click="print" size="default">打印</el-button> <el-form-item label="日期:">
<el-date-picker v-model="queryParams.st" type="date" format="YYYY-MM-DD" value-format="YYYY-MM-DD"
<el-form ref="form" :model="queryParams" inline size="small"> @change="handletime" style="width:180px" />&nbsp; - &nbsp;
<el-row> <el-date-picker v-model="queryParams.et" type="date" format="YYYY-MM-DD" value-format="YYYY-MM-DD"
<el-col :span="16"> @change="handletime" style="width:178px" />
<div class="tips">统计条件:</div> </el-form-item>
<template v-for="item in Parameter"> <el-form-item label="仪器组合:">
<el-form-item :label="item.paramOptiontype == '0' ? '' : item.paramName"> <SelectTable v-model:data="queryParams.instrGroup" :tableData="instrGroupOptions" :fields="instrGroupFields"
<template v-if="item.paramOptiontype == '7'"> label="zdmc" value="zddh" objKey="zddh" style="width:150px" size="small" />
<el-date-picker v-model="item.paramDefvalue" type="date" format="YYYY-MM-DD" value-format="YYYY-MM-DD" </el-form-item>
@change="handletime" style="width:120px" /> <el-form-item label="仪器:">
</template> <YQSelectTable v-model:data="queryParams.yq" style="width:150px" size="small" />
</el-form-item>
<template v-if="item.paramOptiontype == '8'"> <el-form-item label="检验医生:">
<el-time-picker v-model="item.paramDefvalue" value-format="HH:mm:ss" format="HH:mm:ss" <SelectTable v-model:data="queryParams.yhdh" :fields="ysFields" :tableData="userList" label="nickName"
style="width:100px" /> value="userName" objKey="userName" placeholder="请选择" style="width:150px" size="small" />
</template> </el-form-item>
<el-form-item label="病人类型:">
<template v-if="item.paramOptiontype == '2'"> <SelectTable v-model:data="queryParams.brlyname" dictType="PT" label="label" value="label" objKey="label"
<SelectTable v-model:data="item.paramDefvalue" :dictType="item.remark" :optionselect="true" placeholder="请选择" style="width:150px" size="small" />
placeholder="请选择" style="width:150px" size="small" /> </el-form-item>
</template> <el-form-item label="性别:">
<SelectTable v-model:data="queryParams.brxb" dictType="SX" placeholder="请选择" style="width:150px" size="small" />
</el-form-item>
<template v-if="item.paramOptiontype == '0'"> <el-form-item label="科室:" label-width="3.75rem">
<el-checkbox v-model="item.paramDefvalue" :label="item.paramName" true-value="1" false-value="0" /> <SelectTable v-model:data="queryParams.ksdh" dictType="DP" placeholder="请选择" style="width:150px" size="small" />
</template> </el-form-item>
</el-form-item> <el-form-item label="送检医生:">
</template> <SelectTable v-model:data="queryParams.sjys" :fields="ysFields" :tableData="userList" label="nickName"
</el-col> value="userName" objKey="userName" placeholder="请选择" style="width:150px" size="small" />
<el-col :span="8"> </el-form-item>
<div class="tips"> 统计项目:</div> <el-form-item label="送检医院:">
<el-form-item label=""> <SelectTable v-model:data="queryParams.DstHospName" :tableData="hosList" label="label" value="label"
<el-checkbox-group v-model="queryParams.statItems" @change="handleCheckBoxChange"> objKey="label" placeholder="请选择" style="width:150px" size="small" />
<el-checkbox v-for="item in checkBoxs" :key="item.paramCode" :label="item.paramCode"> </el-form-item>
{{ item.paramName }}</el-checkbox> <div>
</el-checkbox-group> <el-form-item label=" ">
</el-form-item> <el-checkbox v-model="queryParams.failed1" label="无病人代号的标本不统计" />
</el-col> <el-checkbox v-model="queryParams.failed2" label="无病人姓名的标本不统计" />
</el-row> <el-checkbox v-model="queryParams.failed3" label="未打印的标本不统计" />
<el-checkbox v-model="queryParams.failed4" label="未审核的标本不统计" />
<el-checkbox v-model="queryParams.failed6" label="显示人数" />
<el-checkbox v-model="queryParams.failed5" label="按审核日期" />
时间段: &nbsp;<el-time-picker v-model="queryParams.time" is-range range-separator="-" value-format="HH:mm"
format="HH:mm" style="width: 12rem;" />
</el-form-item>
</div>
<el-form-item label="统计项目:">
<el-checkbox-group v-model="queryParams.statItems">
<el-checkbox v-for="item in checkBoxs" :key="item.value" :label="item.value">{{ item.label }}</el-checkbox>
</el-checkbox-group>
&nbsp;&nbsp;
<el-checkbox v-model="queryParams.failed6" label="智能合并" />
</el-form-item>
</el-form> </el-form>
<div class="print_box"> <div class="title">{{ formatDict(userStore.sysLoginParam.loginYLJG, 'HOS') }}</div>
<div class="title">{{ formatDict(userStore.sysLoginParam.loginYLJG, 'HOS') }}</div> <div class="content">工作量统计表</div>
<div class="content">{{ statsTitle }}</div> <div class="table-container">
<div class="table-container"> <el-table :data="tableData" height="100%" border highlight-current-row v-loading="loading">
<el-table :data="tableData" height="100%" border highlight-current-row v-loading="loading"> <el-table-column v-for="col in visibleColumns" :key="col.key" :label="col.label" :prop="col.prop" />
<el-table-column v-for="col in tableColumns" :key="col.prop" :label="col.label" :prop="col.prop" </el-table>
width="100" />
</el-table>
</div>
</div> </div>
</div> </div>
</template> </template>
<script setup> <script setup>
import YQSelectTable from '@/components/SelectTable/YQSelectTable/index.vue'
import { getComDicts, } from "@/api/liswork/dict/ComDict"; import { getComDicts, } from "@/api/liswork/dict/ComDict";
import { useCommonStore } from '@/store/modules/commonStore'; import { useCommonStore } from '@/store/modules/commonStore';
import { classCom } from '@/utils/classCom'; import { classCom } from '@/utils/classCom';
import { listhospital } from "@/api/regional/dict/hospital.js"; import { listhospital } from "@/api/regional/dict/hospital.js";
import { getstatsTemplate } from "@/api/liswork/xtwh/StatsparameterApi";
import { listUser } from '@/api/system/user.js' import { listUser } from '@/api/system/user.js'
import useUserStore from '@/store/modules/user' import useUserStore from '@/store/modules/user'
import { getDictData, formatDict } from '@/hooks' import { getDictData, formatDict } from '@/hooks'
import { ElMessage } from "element-plus";
const userStore = useUserStore() const userStore = useUserStore()
const mbStore = useCommonStore(); const mbStore = useCommonStore();
const route = useRoute(); const queryParams = reactive({
st: '',
et: '',
const queryParams = ref({ instrGroup: '',
// 'cp_samplecnt', 'cp_cnt', 'cp_amt', 'cp_rs', yq: mbStore.defaultConfig.defaultinstr || '1',
statItems: [] brlyname: '',
yhdh: '',
brxb: '',
ksdh: '',
sjys: '',
DstHospName: '',
statItems: ['0', '1', '2', '3'],
}) })
const Parameter = ref([])
const statsTitle = ref('' || '报告统计')
const tableData = ref([])
const loading = ref(false)
const coloums = ref([]) //固定列
const checkBoxs = ref([])
const tableColumns = ref([]); const checkBoxs = ref([
{ label: '病人类型', value: '0' },
{ label: '性别', value: '1' },
{ label: '科室', value: '2' },
{ label: '送检医生', value: '3' },
{ label: '核对医生', value: '4' },
{ label: '费别', value: '5' },
{ label: '年', value: '6' },
{ label: '月', value: '7' },
{ label: '日', value: '8' },
{ label: '专业组', value: '9' },
{ label: '检查组', value: '10' },
{ label: '送检医院', value: '11' },
{ label: '急诊', value: '12' },
{ label: '绿色通道', value: '13' },
{ label: '部门组别', value: '14' },
{ label: '仪器', value: '15' },
{ label: '标本', value: '16' },
])
// 表格列配置:key对应checkBoxs的value,label为列名,prop为字段名(根据实际业务调整)
const tableColumns = ref([
{ key: '0', label: '病人类型', prop: 'brlyname' },
{ key: '1', label: '性别', prop: 'brxb' },
{ key: '2', label: '科室', prop: 'ksdh' },
{ key: '3', label: '送检医生', prop: 'sjys' },
{ key: '4', label: '核对医生', prop: 'yhdh' },
{ key: '5', label: '费别', prop: 'fabei' },
{ key: '6', label: '年', prop: 'year' },
{ key: '7', label: '月', prop: 'month' },
{ key: '8', label: '日', prop: 'day' },
{ key: '9', label: '专业组', prop: 'zyz' },
{ key: '10', label: '检查组', prop: 'jcz' },
{ key: '11', label: '送检医院', prop: 'DstHospName' },
{ key: '12', label: '急诊', prop: 'jizhen' },
{ key: '13', label: '绿色通道', prop: 'lvse' },
{ key: '14', label: '部门组别', prop: 'bmzb' },
{ key: '15', label: '仪器', prop: 'yq' },
{ key: '16', label: '标本', prop: 'bb' },
]);
// 过滤后的列
const visibleColumns = computed(() => {
if (!queryParams.statItems || queryParams.statItems.length === 0) {
return tableColumns.value;
}
return tableColumns.value.filter(col => queryParams.statItems.includes(col.key));
});
const instrGroupOptions = ref([]) const instrGroupOptions = ref([])
const instrGroupFields = ref([ const instrGroupFields = ref([
@ -119,56 +172,30 @@ const handletime = () => {
if (dayDiff === -1 || dayDiff === -2) return ElMessage.warning('请选择有效的日期范围'); if (dayDiff === -1 || dayDiff === -2) return ElMessage.warning('请选择有效的日期范围');
} }
const search = () => {
console.log('Parameter==>', Parameter.value);
};
const print = () => { const userList = ref([]);
}; const hosList = ref([]);
onMounted(() => {
loadinstrGroupOptions()
const data = { status: 0, del_flag: 0, pageSize: 1000, pageNum: 1 }
listUser(data).then((res) => {
userList.value = res.rows;
});
const handleCheckBoxChange = (val) => { listhospital().then((res) => {
tableColumns.value = val.map(paramCode => { hosList.value = res.rows.map((item) => {
const matchItem = checkBoxs.value.find(item => item.paramCode === paramCode);
return matchItem ? {
label: matchItem.paramName,
prop: matchItem.paramCode,
} : null;
})
const arr = coloums.value.map(item => {
return {
label: item.paramName,
prop: item.paramCode,
}
})
tableColumns.value = tableColumns.value.concat(arr)
}
const getParams = () => {
getstatsTemplate({ statsCode: route.query && route.query.statsCode, }).then(res => {
Parameter.value = res.data.Parameter
tableColumns.value = res.data.Column.filter(item => item.paramType == '6').map(item => {
return { return {
key: item.paramCode, label: item.hospitalName,
label: item.paramName, value: item.hospitalCode
prop: item.paramCode,
} }
}) })
coloums.value = res.data.Column.filter(item => item.paramType == '6')
checkBoxs.value = res.data.Column.filter(item => item.paramType != '6')
statsTitle.value = res.data.Template.statsTitle
}) })
}; })
onMounted(() => { onMounted(() => {
getParams() getDictData('HOS')
}) })
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@ -189,19 +216,8 @@ onMounted(() => {
font-weight: 600; font-weight: 600;
} }
.print_box {
height: 72vh;
overflow-y: auto;
}
.table-container { .table-container {
margin-top: 10px; margin-top: 10px;
height: calc(100% - 80px); height: calc(100% - 200px);
}
.tips {
font-size: 16px;
color: #3282F6;
margin-bottom: 5px;
} }
</style> </style>