检验申请优化

This commit is contained in:
wuyy 2026-03-27 18:03:28 +08:00
parent 7e96294630
commit 54f0504cd6
10 changed files with 178 additions and 127 deletions

View File

@ -50,3 +50,10 @@ export function delregdict(regdictId: number) {
method: 'delete'
})
}
// 清空缓存
export function clearCache() {
return request({
url: '/transitdict/regdict/clearCache',
method: 'get'
})
}

View File

@ -19,7 +19,7 @@
<div class="select-table-container">
<el-select ref="selectTable" v-model="selectShowValue" :placeholder="props.placeholder" :size="props.size"
:style="{ width: props.width }" @visible-change="visibleChange" @clear="clearHandle" :clearable="props.clearable"
:disabled="disabled" v-bind="$attrs">
:disabled="props.disabled" v-bind="$attrs">
<template #empty>
<div class="select-table-dropdown">
<div style="text-align: left;">
@ -70,6 +70,7 @@ const props = withDefaults(defineProps<Props>(), {
optionselect: false,
clearable: true,
objKey: 'value',
disabled: false,
keyValue: false,
fields: () => [
{ prop: 'value', label: '代号', width: 80, enablePinyinSearch: true },

View File

@ -1,6 +1,6 @@
import Cookies from 'js-cookie'
const TokenKey = 'Admin-Token'
const TokenKey = 'Admin_czlis-Token'
export function getToken(): string | undefined {
return Cookies.get(TokenKey)

View File

@ -31,21 +31,21 @@ export function checkPermi(value: string[]): boolean {
* @returns {Boolean}
*/
export function checkRole(value: string[]): boolean {
if (value && value instanceof Array && value.length > 0) {
const roles = useUserStore().roles
const permissionRoles = value
const super_admin = "admin"
const hasRole = roles.some((role: string) => {
return super_admin === role || permissionRoles.includes(role)
})
if (!hasRole) {
return false
}
return true
} else {
if (!value || !(value instanceof Array) || value.length === 0) {
console.error(`need roles! Like checkRole="['admin','editor']"`)
return false
}
}
const userStore = useUserStore()
const roles = userStore.roles
const permissionRoles = value
// 取出 roleKey 进行判断
const hasRole = roles.some((role: any) => {
const roleKey = role.roleKey || ''
// 是超级管理员 admin 或者 包含指定角色
return roleKey === 'admin' || permissionRoles.includes(roleKey)
})
return hasRole
}

View File

@ -1,7 +1,7 @@
<script setup>
import { computed, reactive, ref, onMounted, nextTick } from "vue";
import { getToken } from "@/utils/auth";
import { listregdict, addregdict, delregdict, getregdict, updateregdict } from "@/api/regional/dict/regdict.ts";
import { listregdict, addregdict, delregdict, getregdict, updateregdict, clearCache } from "@/api/regional/dict/regdict.ts";
import { getComDicts } from "@/api/liswork/dict/ComDict";
const { proxy } = getCurrentInstance();
@ -147,7 +147,7 @@ function handleAdd() {
//修改
function handleUpdate(row) {
reset()
form.value = row.dictType ? row : info.value
form.value = row.dictType ? JSON.parse(JSON.stringify(row)) : info.value
open.value = true;
}
@ -171,6 +171,13 @@ function handleExport() {
...queryParams.value,
}, `user_${new Date().getTime()}.xlsx`);
};
const clearCacheHandle = () => {
clearCache().then(() => {
proxy.$modal.msgSuccess("清理成功");
handleQuery();
});
};
/** 下载模板操作 */
function importTemplate() {
proxy.download("comdict/importTemplate", {
@ -291,6 +298,9 @@ onMounted(() => {
<el-button type="warning" plain icon="Download" @click="handleExport"
v-hasPermi="['system:dict:export']">导出</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain @click="clearCacheHandle">清除缓存</el-button>
</el-col>
</el-row>
<!-- 表格区域-->
<el-table v-loading="loading" :data="typeDetail" @selection-change="handleSelectionChange"

View File

@ -167,9 +167,9 @@ const handleChange = (value) => {
const handleLogin = async () => {
loginForm.value.loginParam.loginYLJG
loading.value = true;
Cookies.set("czlis_username", loginForm.value.username, { expires: 30 });
Cookies.set("czlis_loginYLJG", loginForm.value.loginParam.loginYLJG, { expires: 30 });
Cookies.set("czlis_loginYLJGName", loginForm.value.loginParam.loginYLJGName, { expires: 30 });
Cookies.set("czlisjy_username", loginForm.value.username, { expires: 30 });
Cookies.set("czlisjy_loginYLJG", loginForm.value.loginParam.loginYLJG, { expires: 30 });
Cookies.set("czlisjy_loginYLJGName", loginForm.value.loginParam.loginYLJGName, { expires: 30 });
// 调用action的登录方法
userStore.login(loginForm.value).then(() => {
const query = route.query;
@ -211,15 +211,15 @@ const getCode = () => {
// 从Cookie获取账号密码
const getCookie = () => {
const cookieUsername = Cookies.get("czlis_username");
const cookieloginYLJG = Cookies.get("czlis_loginYLJG");
const cookieUsername = Cookies.get("czlisjy_username");
const cookieloginYLJG = Cookies.get("czlisjy_loginYLJG");
if (cookieUsername !== undefined && cookieUsername !== null && cookieUsername !== "") {
loginForm.value.username = cookieUsername;
}
if (cookieloginYLJG !== undefined && cookieloginYLJG !== null && cookieloginYLJG !== "") {
loginForm.value.loginParam.loginYLJG = cookieloginYLJG;
}
const cookieloginYLJGName = Cookies.get("czlis_loginYLJGName");
const cookieloginYLJGName = Cookies.get("czlisjy_loginYLJGName");
if (cookieloginYLJGName !== undefined && cookieloginYLJGName !== null && cookieloginYLJGName !== "") {
loginForm.value.loginParam.loginYLJGName = cookieloginYLJGName;
}

View File

@ -5,7 +5,10 @@
<el-row :gutter="10">
<el-col :span="4">
<el-form-item label="委托机构:" prop="srcHospName">
<el-input v-model="queryParams.srcHospName" :size="aotuSize" readonly />
<el-input v-model="queryParams.srcHospName" :title="queryParams.srcHospName" :size="aotuSize" readonly
v-if="!checkRole(['admin'])" />
<SelectTable v-model:data="queryParams.srcHospName" :fields="ksdhFields" :tableData="hosList" v-else
label="label" :size="aotuSize" value="label" placeholder="请选择委托机构" />
</el-form-item>
</el-col>
<el-col :span="4">
@ -50,7 +53,7 @@
<el-col :span="4">
<el-form-item label="时间类型:" prop="dateType">
<el-select v-model="queryParams.dateType" placeholder="请选择">
<el-option label="登记时间" value="登记时间" />
<el-option label="申请时间" value="登记时间" />
<el-option label="采样时间" value="采样时间" />
<el-option label="送出时间" value="送出时间" />
<el-option label="签收时间" value="签收时间" />
@ -113,6 +116,7 @@ import { listregdict } from "@/api/regional/dict/regdict";
import useUserStore from '@/store/modules/user'
import dayjs from 'dayjs';
import { getDictData, formatDict, dictData } from '@/hooks'
import { checkRole } from '@/utils/permission'
const userStore = useUserStore()
@ -200,6 +204,8 @@ const resetHandle = () => {
queryParams.value = {
pageSize: 50,
pageNum: 1,
dateType: '登记时间',
srcHospName: userStore.sysLoginParam.loginYLJGName,
}
getDays()
handleQuery()

View File

@ -5,13 +5,15 @@
<el-form :model="queryParams" ref="queryRef" label-width="6.25rem" :rules="queryRules" style="width: 100%;"
:size="aotuSize">
<el-row>
<el-col :span="5">
<el-form-item label="日期:" prop="times">
<el-date-picker v-model="queryParams.times" type="daterange" range-separator="-"
start-placeholder="开始时间" end-placeholder="结束时间" format="YYYY-MM-DD" value-format="YYYY-MM-DD" />
<el-col :span="4">
<el-form-item label="委托机构:" prop="yljg">
<el-input v-model="queryParams.yljg" :title="queryParams.yljg" :size="aotuSize" readonly
v-if="!checkRole(['admin'])" />
<SelectTable v-model:data="queryParams.yljg" :fields="ksdhFields" :tableData="hosList" v-else
label="label" :size="aotuSize" value="label" placeholder="请选择委托机构" />
</el-form-item>
</el-col>
<el-col :span="5">
<el-col :span="4">
<el-form-item label="打印状态:" prop="dybz">
<el-select v-model="queryParams.dybz" placeholder="请选择" clearable @change="handleQuery">
<el-option label="已打印" value="1" />
@ -19,47 +21,53 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-col :span="4">
<el-form-item label="科室:" prop="ksdh">
<SelectTable v-model:data="queryParams.ksdh" :fields="ksdhFields" :tableData="dictData.DP || []"
:size="aotuSize" label="label" value="value" objKey="value" :border="true" placeholder="请选择科室"
@getDataValue="handleQuery" />
</el-form-item>
</el-col>
<el-col :span="5">
<el-col :span="4">
<el-form-item label="病人类型:" prop="brlyname">
<SelectTable v-model:data="queryParams.brlyname" :fields="brlxFields" :tableData="dictData.PT || []"
:size="aotuSize" label="label" value="label" objKey="label" :border="true" placeholder="请选择科室"
@getDataValue="handleQuery" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="5">
<el-form-item label-width="50px">
<el-checkbox v-model="queryParams.alarmflag" label="仅危急值" @change="alarmHandle" :size="aotuSize" />
<el-checkbox v-model="queryParams.jzbz" label="仅急诊" @change="jzbzHandle" :size="aotuSize" />
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="姓名:" prop="brxm">
<el-input v-model="queryParams.brxm" clearable placeholder="请输入姓名" @keyup.enter="handleQuery"
@clear="handleQuery" />
</el-form-item>
</el-col>
<el-col :span="5">
<el-col :span="4">
<el-form-item label="病人号:" prop="brdh">
<el-input v-model="queryParams.brdh" clearable placeholder="请输入病人号" @keyup.enter="handleQuery"
@clear="handleQuery" />
</el-form-item>
</el-col>
<el-col :span="5">
</el-row>
<el-row>
<el-col :span="4">
<el-form-item label-width="40px">
<el-checkbox v-model="queryParams.alarmflag" label="仅危急值" @change="alarmHandle" :size="aotuSize" />
<el-checkbox v-model="queryParams.jzbz" label="仅急诊" @change="jzbzHandle" :size="aotuSize" />
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="姓名:" prop="brxm">
<el-input v-model="queryParams.brxm" clearable placeholder="请输入姓名" @keyup.enter="handleQuery"
@clear="handleQuery" />
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="床号:" prop="ch">
<el-input v-model="queryParams.ch" clearable placeholder="请输入床号" @keyup.enter="handleQuery"
@clear="handleQuery" />
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="日期:" prop="times">
<el-date-picker v-model="queryParams.times" type="daterange" range-separator="-"
start-placeholder="开始时间" end-placeholder="结束时间" format="YYYY-MM-DD" value-format="YYYY-MM-DD" />
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label-width="50px">
<el-button icon="search" type="primary" @click="handleQuery">
@ -127,7 +135,7 @@
<div class="mt10" v-if="bottomTableData.length > 0"></div>
<div>
<CustomTable v-if="bottomTableData.length > 0" :data="bottomTableData" :columns="bottomColumns"
@row-click="xmrowBottomHandle" :config="bottomTableConfig">
:config="bottomTableConfig">
</CustomTable>
</div>
<div v-if="bottomTableData.length > 0" class="expert-comment" :title="expertComment">
@ -179,7 +187,10 @@ import { ElMessage, ElMessageBox } from 'element-plus'
import { classCom } from '@/utils/classCom'
import * as echarts from 'echarts';
import { comDict } from '@/utils/dict'
import useUserStore from '@/store/modules/user'
import { listhospital } from '@/api/regional/dict/hospital';
import { checkRole } from '@/utils/permission'
const userStore = useUserStore()
const aotuSize = classCom.useAutoSize();
const compactForm = ref<HTMLElement | null>(null);
const heightForm = ref(90);
@ -221,7 +232,8 @@ const queryParams = reactive<QueryParams>({
ch: '',
dybz: '',
pageNum: 1,
pageSize: 20
pageSize: 20,
yljg: userStore.sysLoginParam.loginYLJGName,
});
const total = ref(0);
@ -300,24 +312,25 @@ const tableData = ref([])
const columns = ref([
{ type: 'selection', visible: true, align: 'center', width: 30, label: '多选框' },
{ prop: 'yljg', label: '委托机构', align: 'center', visible: true, width: 200 },
{ prop: 'dybz', label: '印', align: 'center', visible: true, slot: 'dybz', width: 40 },
{ prop: 'jzbz', label: '急', align: 'center', visible: true, slot: 'jzbz', width: 40 },
{ prop: 'alarmflag', label: '危', align: 'center', visible: true, slot: 'alarmflag', width: 40 },
{ prop: 'brdh', label: '病人代号', align: 'center', visible: true, sortable: true, width: 100 },
{ prop: 'brdh', label: '病人代号', align: 'center', visible: true, width: 100 },
{ prop: 'brxm', label: '病人姓名', align: 'center', visible: true, },
{ prop: 'brxbname', label: '性别', align: 'center', visible: true, width: 40 },
{ prop: 'ch', label: '床号', align: 'center', visible: true, width: 50 },
{ prop: 'jymd', label: '检验目的', align: 'center', visible: true, width: 200 },
{ prop: 'yblxname', label: '样本类型', align: 'center', visible: true, },
{ prop: 'sqsj', label: '送检时间', align: 'center', visible: true, width: 150 },
{ prop: 'sqsj', label: '申请时间', align: 'center', visible: true, width: 150 },
{ prop: 'sqh', label: '条码号', align: 'center', visible: true, width: 150 },
{ prop: 'confirmtime', label: '报告时间', align: 'center', visible: true, sortable: true, width: 150 },
{ prop: 'sjysname', label: '送检医生', align: 'center', visible: true, width: 80 },
{ prop: 'brlyname', label: '病人类型', align: 'center', visible: true, width: 80 },
{ prop: 'jyrq', label: '检验日期', align: 'center', visible: true, width: 100 },
{ prop: 'ybh', label: '样本号', align: 'center', visible: true, width: 60 },
{ prop: 'yqmc', label: '仪器名称', align: 'center', visible: true, width: 150 },
{ prop: 'dybz', label: '印', align: 'center', visible: true, slot: 'dybz', width: 40 },
{ prop: 'jzbz', label: '急', align: 'center', visible: true, slot: 'jzbz', width: 40 },
{ prop: 'alarmflag', label: '危', align: 'center', visible: true, slot: 'alarmflag', width: 40 },
// { prop: 'yqdl', label: '仪器', align: 'center', visible: true, width: 100 },
// { prop: 'yljg', label: '检验机构', align: 'center', visible: true, width: 150 },
{ prop: 'jcjg', label: '检验机构', align: 'center', visible: true, width: 150 },
])
const selectionChange = (selection: any) => {
@ -458,13 +471,13 @@ const updateColumns = (arr: any[]) => {
};
const ksdhFields = ref([
{ prop: 'value', label: '代号', width: 80, enablePinyinSearch: true },
{ prop: 'label', label: '名称', enablePinyinSearch: true },
{ prop: 'label', label: '名称', width: 150, enablePinyinSearch: true },
{ prop: 'value', label: '代号', width: 120, enablePinyinSearch: true },
])
const brlxFields = ref([
{ prop: 'value', label: '代号', width: 80, enablePinyinSearch: true },
{ prop: 'label', label: '名称', enablePinyinSearch: true },
{ prop: 'label', label: '名称', width: 120, enablePinyinSearch: true },
])
@ -511,7 +524,7 @@ const rightTableConfig = ref(
{
// stripe: true, // 斑马纹
border: true, // 边框
height: '60vh', // 高度
height: '60.5vh', // 高度
highlightCurrentRow: true, // 高亮当前行
cellStyle: rightCellStyleHd
}
@ -542,15 +555,15 @@ const xmrowHandle = (row: any) => {
reportMedList(data).then((res: any) => {
if (res.code == 0) {
bottomTableData.value = res.data
expertComment.value = res.data[0]?.txtresult;
expertComment.value = res.data[0]?.textresult1;
if (res.data.length > 0) {
nextTick(() => {
rightTableConfig.value.height = `calc(32vh - ${heightForm.value}px)`
rightTableConfig.value.height = `calc(32.5vh - ${heightForm.value}px)`
rightTableRef.value?.doLayout && rightTableRef.value.doLayout();
});
} else {
nextTick(() => {
rightTableConfig.value.height = '60vh'
rightTableConfig.value.height = '60.5vh'
rightTableRef.value?.doLayout && rightTableRef.value.doLayout();
});
}
@ -774,7 +787,7 @@ const bottomColumns = ref([
{ prop: 'ywmc', label: '抗生素名称', align: 'center', width: 200, visible: true, },
{ prop: 'mic', label: 'MIC', align: 'center', visible: true },
{ prop: 'rad', label: 'KB', align: 'center', visible: true },
{ prop: 'csjg', label: '药敏结果', align: 'center', visible: true },
{ prop: 'testResult', label: '药敏结果', align: 'center', visible: true },
])
const botCellStyleHd = ({ row, column, rowIndex, columnIndex }: {
row: any;
@ -805,7 +818,7 @@ interface DictData {
[key: string]: any[] | undefined; // 添加索引签名以支持动态访问
}
const hosList = ref([])
// 字典数据存储
const dictData = ref<DictData>({});
@ -818,6 +831,15 @@ onMounted(async () => {
getList()
adjustTableHeight();
listhospital().then((res) => {
hosList.value = res.rows.map((item) => {
return {
label: item.hospitalName,
value: item.hospitalCode
}
})
})
// 加载病人来源字典
const dictRefs = await comDict('PT', 'DP');
@ -839,6 +861,7 @@ const getList = () => {
brxm: queryParams.brxm,
brdh: queryParams.brdh,
ch: queryParams.ch,
yljg: queryParams.yljg,
st: '',
et: '',
pageSize: queryParams.pageSize || 10,

View File

@ -4,25 +4,24 @@
<el-form :model="queryParams" ref="queryRef" label-width="5rem" style="width: 100%;" :size="aotuSize">
<el-row :gutter="10">
<el-col :span="5">
<el-form-item label="委托机构:" prop="SrcHospName">
<SelectTable v-model:data="queryParams.SrcHospName" :fields="ksdhFields" :tableData="hosList"
label="label" :size="aotuSize" value="value" objKey="value" :border="true" placeholder="请选择委托机构" />
<el-form-item label="委托机构:" prop="srcHospName">
<el-input v-model="queryParams.srcHospName" :size="aotuSize" readonly />
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="检测医院:" prop="DstHospName">
<SelectTable v-model:data="queryParams.DstHospName" :fields="ksdhFields" :tableData="hosList"
<el-form-item label="检测医院:" prop="dstHospName">
<SelectTable v-model:data="queryParams.dstHospName" :fields="ksdhFields" :tableData="hosList"
label="label" :size="aotuSize" value="label" objKey="label" :border="true" placeholder="请选择" />
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="条码号:" prop="Barcode">
<el-input v-model="queryParams.Barcode" placeholder="请输入条码号" clearable />
<el-form-item label="条码号:" prop="barcode">
<el-input v-model="queryParams.barcode" placeholder="请输入条码号" clearable />
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="姓名:" prop="PatName">
<el-input v-model="queryParams.PatName" placeholder="请输入姓名" clearable />
<el-form-item label="姓名:" prop="patName">
<el-input v-model="queryParams.patName" placeholder="请输入姓名" clearable />
</el-form-item>
</el-col>
<el-col :span="5">
@ -31,8 +30,8 @@
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="时间类型:" prop="DateType">
<el-select v-model="queryParams.DateType" placeholder="请选择">
<el-form-item label="时间类型:" prop="dateType">
<el-select v-model="queryParams.dateType" placeholder="请选择">
<el-option label="登记时间" value="登记时间" />
<el-option label="采样时间" value="采样时间" />
<el-option label="送出时间" value="送出时间" />
@ -82,16 +81,20 @@ import CustomTable from '@/components/elTable/index.vue'
import { querySampleSignBack, sampleSign } from '@/api/regional/index'
import SelectTable from '@/components/SelectTable/index.vue';
import { classCom } from '@/utils/classCom';
// @ts-ignore
import { listhospital } from "@/api/regional/dict/hospital.ts";
// @ts-ignore
import { listregdict } from "@/api/regional/dict/regdict.ts";
import { listhospital } from "@/api/regional/dict/hospital";
import { listregdict } from "@/api/regional/dict/regdict";
import { ElMessage } from 'element-plus';
import dayjs from 'dayjs';
import useUserStore from '@/store/modules/user'
const aotuSize = classCom.useAutoSize();
const userStore = useUserStore()
const queryParams: any = ref({
pageSize: 50,
pageNum: 1,
srcHospName: userStore.sysLoginParam.loginYLJGName,
dateType: '登记时间',
})
const tableData: any = ref([])
const columns: any = ref([
@ -154,11 +157,11 @@ const sizeChange = (page: { currentPage: number, pageSize: number }) => {
const handleQuery = () => {
if (queryParams.value.times && queryParams.value.times.length > 0) {
queryParams.value.DateStart = queryParams.value.times[0]
queryParams.value.DateEnd = queryParams.value.times[1]
queryParams.value.dateStart = queryParams.value.times[0]
queryParams.value.dateEnd = queryParams.value.times[1]
} else {
queryParams.value.DateStart = ''
queryParams.value.DateEnd = ''
queryParams.value.dateStart = ''
queryParams.value.dateEnd = ''
}
getList()
@ -168,7 +171,10 @@ const resetHandle = () => {
queryParams.value = {
pageSize: 50,
pageNum: 1,
dateType: '登记时间',
srcHospName: userStore.sysLoginParam.loginYLJGName,
}
getDays()
handleQuery()
}
const getList = () => {
@ -177,10 +183,18 @@ const getList = () => {
pagination.value.total = res.total
})
}
const getDays = () => {
const end = dayjs().format('YYYY-MM-DD');
const start = dayjs().subtract(2, 'day').format('YYYY-MM-DD'); //add 时间往后
queryParams.value.times = [start, end];
}
const hosList = ref([])
const regdictList: any = ref([])
onMounted(() => {
getList()
getDays()
handleQuery()
listhospital().then((res: any) => {
hosList.value = res.rows.map((item: any) => {
return {

View File

@ -4,14 +4,13 @@
<el-form :model="queryParams" ref="queryRef" label-width="5rem" style="width: 100%;" :size="aotuSize">
<el-row :gutter="10">
<el-col :span="5">
<el-form-item label="就诊医院:" prop="SrcHospName">
<SelectTable v-model:data="queryParams.SrcHospName" :fields="ksdhFields" :tableData="hosList"
label="label" :size="aotuSize" value="value" objKey="value" :border="true" placeholder="请选择委托机构" />
<el-form-item label="就诊医院:" prop="srcHospName">
<el-input v-model="queryParams.srcHospName" :size="aotuSize" readonly />
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="检测医院:" prop="DstHospName">
<SelectTable v-model:data="queryParams.DstHospName" :fields="ksdhFields" :tableData="hosList"
<el-form-item label="检测医院:" prop="dstHospName">
<SelectTable v-model:data="queryParams.dstHospName" :fields="ksdhFields" :tableData="hosList"
label="label" :size="aotuSize" value="label" objKey="label" :border="true" placeholder="请选择" />
</el-form-item>
</el-col>
@ -30,11 +29,7 @@
</el-form>
</div>
<div class="mb10">
<!-- <el-button type="primary" @click="thHandle(20)">重新采集</el-button>
<el-button type="primary" @click="thHandle(50)">撤销退回</el-button>
<el-button type="primary" @click="thHandle(90)">申请作废</el-button> -->
</div>
<div class="mb10"></div>
<div style="height: calc(100% - 100px);">
<CustomTable ref="tableRefs" :data="tableData" :columns="columns" :config="tableConfig" :pagination="pagination"
@size-change="sizeChange" @page-change="currentChange">
@ -49,21 +44,21 @@ import CustomTable from '@/components/elTable/index.vue'
import { sampleitemCount, sampleSign } from '@/api/regional/index'
import SelectTable from '@/components/SelectTable/index.vue';
import { classCom } from '@/utils/classCom';
// @ts-ignore
import { listhospital } from "@/api/regional/dict/hospital.ts";
// @ts-ignore
import { listregdict } from "@/api/regional/dict/regdict.ts";
import { listhospital } from "@/api/regional/dict/hospital";
import { listregdict } from "@/api/regional/dict/regdict";
import { ElMessage } from 'element-plus';
const aotuSize = classCom.useAutoSize();
import dayjs from 'dayjs';
const today = dayjs().format('YYYY-MM-DD');
const queryParams: any = ref({
import useUserStore from '@/store/modules/user'
const userStore = useUserStore()
const queryParams = ref({
pageSize: 50,
pageNum: 1,
times: [today, today]
times: [],
srcHospName: userStore.sysLoginParam.loginYLJGName,
})
const tableData: any = ref([])
const columns: any = ref([
const tableData = ref([])
const columns = ref([
{ prop: 'SrcHospName', label: '就诊医院', align: 'center', visible: true, },
{ prop: 'SrcOrderItemCode', label: '组合编码', align: 'center', visible: true, },
{ prop: 'SrcOrderItemName', label: '组合名称', align: 'center', visible: true, },
@ -91,21 +86,7 @@ const ksdhFields = ref([
{ prop: 'label', label: '名称', width: 150, enablePinyinSearch: true },
{ prop: 'value', label: '代号', width: 120, enablePinyinSearch: true },
])
const barcodes = ref([])
const tableRefs = ref(null)
const thHandle = (val: number) => {
if (!barcodes.value.length) return ElMessage.warning('请选择数据!')
sampleSign({ status: val, barcode: barcodes.value }).then((res: any) => {
if (res.code == 0) {
ElMessage.success('操作成功!')
handleQuery()
}
})
}
const handleSelectionChange = (val: any) => {
barcodes.value = val.map((item: any) => item.barcode)
}
const currentChange = (page: { currentPage: number, pageSize: number }) => {
queryParams.value.pageNum = page.currentPage
handleQuery()
@ -118,11 +99,11 @@ const sizeChange = (page: { currentPage: number, pageSize: number }) => {
const handleQuery = () => {
if (queryParams.value.times && queryParams.value.times.length > 0) {
queryParams.value.DateStart = queryParams.value.times[0]
queryParams.value.DateEnd = queryParams.value.times[1]
queryParams.value.dateStart = queryParams.value.times[0]
queryParams.value.dateEnd = queryParams.value.times[1]
} else {
queryParams.value.DateStart = ''
queryParams.value.DateEnd = ''
queryParams.value.dateStart = ''
queryParams.value.dateEnd = ''
}
getList()
@ -132,8 +113,9 @@ const resetHandle = () => {
queryParams.value = {
pageSize: 50,
pageNum: 1,
times: [today, today]
srcHospName: userStore.sysLoginParam.loginYLJGName,
}
getDays()
handleQuery()
}
const getList = () => {
@ -142,9 +124,17 @@ const getList = () => {
pagination.value.total = res.total
})
}
const getDays = () => {
const end = dayjs().format('YYYY-MM-DD');
const start = dayjs().subtract(2, 'day').format('YYYY-MM-DD'); //add 时间往后
queryParams.value.times = [start, end];
}
const hosList = ref([])
const regdictList: any = ref([])
onMounted(() => {
getDays()
handleQuery()
listhospital().then((res: any) => {
hosList.value = res.rows.map((item: any) => {