2026-01-07 17:27:37 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* @file index.vue 质控结果手工录入
|
|
|
|
|
|
* @author: w
|
|
|
|
|
|
* @since: 2026-01-05
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
|
<div class="app-container">
|
|
|
|
|
|
<div class="handle-box mb5">
|
2026-01-13 11:45:42 +08:00
|
|
|
|
<el-form>
|
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
|
<el-col :span="4">
|
|
|
|
|
|
<el-form-item label="仪器:">
|
|
|
|
|
|
<YQSelectTable v-model:data="yq" width="200px" clearable @get-data-value="getXmList" />
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="4">
|
|
|
|
|
|
<el-form-item label="日期:">
|
|
|
|
|
|
<el-date-picker v-model="jyrq" type="date" value-format="YYYY-MM-DD" style="width:100%" />
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="5">
|
|
|
|
|
|
<span class="tips ml10">颜色说明:</span> <span class="color-red">大于3SD</span> <span
|
|
|
|
|
|
class="color-pink">大于2SD</span>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
|
|
</el-form>
|
2026-01-07 17:27:37 +08:00
|
|
|
|
</div>
|
2026-01-13 11:45:42 +08:00
|
|
|
|
<div class="mb5">
|
|
|
|
|
|
<el-button type="primary" plain icon="Check" @click="handleSave">保存</el-button>
|
2026-01-07 17:27:37 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
<el-tabs v-model="activeName" type="card" class="tabs_box">
|
|
|
|
|
|
<el-tab-pane v-for="tab in tabList" :key="tab.key" :label="tab.label" :name="tab.key" />
|
|
|
|
|
|
</el-tabs>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="table-box">
|
|
|
|
|
|
<CustomVxeTable class="mytable-style" ref="tableRef" :table-data="tableData" :columns="columns"
|
|
|
|
|
|
:scrollYConfig="{ enabled: true, rSize: 30, height: '100%', }" :cell-style="cellStyleHd">
|
|
|
|
|
|
<template #xmdh="{ row }">
|
|
|
|
|
|
{{ row.xmdh }} {{ row.xmmc }}
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<template #cs1="{ row }">
|
|
|
|
|
|
<el-input v-model="row.cs1" class="full-width-input" />
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<template #cs2="{ row }">
|
|
|
|
|
|
<el-input v-model="row.cs2" class="full-width-input" />
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<template #cs3="{ row }">
|
|
|
|
|
|
<el-input v-model="row.cs3" class="full-width-input" />
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<template #cs4="{ row }">
|
|
|
|
|
|
<el-input v-model="row.cs4" class="full-width-input" />
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<template #cs5="{ row }">
|
|
|
|
|
|
<el-input v-model="row.cs5" class="full-width-input" />
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<template #cs6="{ row }">
|
|
|
|
|
|
<el-input v-model="row.cs6" class="full-width-input" />
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<template #cs7="{ row }">
|
|
|
|
|
|
<el-input v-model="row.cs7" class="full-width-input" />
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</CustomVxeTable>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
|
import { queryOldxminfo } from '@/api/liswork/xtwh/xmReqItemVsApi'
|
2026-01-13 11:45:42 +08:00
|
|
|
|
import YQSelectTable from '@/components/SelectTable/YQSelectTable/index.vue';
|
2026-01-07 17:27:37 +08:00
|
|
|
|
import dayjs from 'dayjs'
|
2026-01-13 11:45:42 +08:00
|
|
|
|
import { useCommonStore } from '@/store/modules/commonStore';
|
|
|
|
|
|
const mbStore = useCommonStore();
|
|
|
|
|
|
|
|
|
|
|
|
const yq = ref(mbStore.defaultConfig.defaultinstr || '46')
|
2026-01-07 17:27:37 +08:00
|
|
|
|
const activeName = ref('1')
|
|
|
|
|
|
const jyrq = ref(dayjs().format('YYYY-MM-DD'))
|
|
|
|
|
|
const tabList = [
|
|
|
|
|
|
{ key: '1', label: '质控1' },
|
|
|
|
|
|
{ key: '2', label: '质控2' }
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
const tableData = ref([])
|
|
|
|
|
|
const columns = ref([
|
|
|
|
|
|
{ field: 'xmdh', title: '质控项目', resizable: true, slotName: 'xmdh', width: 200 },
|
|
|
|
|
|
{ field: 'cs1', title: '次数1', resizable: true, slotName: 'cs1' },
|
|
|
|
|
|
{ field: 'cs2', title: '次数2', resizable: true, slotName: 'cs2' },
|
|
|
|
|
|
{ field: 'cs3', title: '次数3', resizable: true, slotName: 'cs3' },
|
|
|
|
|
|
{ field: 'cs4', title: '次数4', resizable: true, slotName: 'cs4' },
|
|
|
|
|
|
{ field: 'cs5', title: '次数5', resizable: true, slotName: 'cs5' },
|
|
|
|
|
|
{ field: 'cs6', title: '次数6', resizable: true, slotName: 'cs6' },
|
|
|
|
|
|
{ field: 'cs7', title: '次数7', resizable: true, slotName: 'cs7' },
|
|
|
|
|
|
{ field: 'zkbz', title: '靶数', resizable: true, align: 'center' },
|
|
|
|
|
|
{ field: 'qcusepos', title: 'SD', resizable: true, align: 'center' },
|
|
|
|
|
|
])
|
|
|
|
|
|
const cellStyleHd = ({ row, column }: {
|
|
|
|
|
|
row: any;
|
|
|
|
|
|
column: any;
|
|
|
|
|
|
}) => {
|
|
|
|
|
|
const styleRules: any = {
|
|
|
|
|
|
columnMap: { cs1: 'cs1', cs2: 'cs2', cs3: 'cs3', cs4: 'cs4', cs5: 'cs5', cs6: 'cs6', cs7: 'cs7' },
|
|
|
|
|
|
colorRules: [
|
|
|
|
|
|
{ min: 3, color: '#f00 !important' }, // 大于3:红色
|
|
|
|
|
|
{ min: 2, max: 3, color: '#ffc0c0 !important' } // 2~3:粉色
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
const targetField = styleRules.columnMap[column.title];
|
|
|
|
|
|
|
|
|
|
|
|
if (!targetField || row.qcusepos === 0) return {};
|
|
|
|
|
|
|
|
|
|
|
|
const deviation = Math.abs(row.zkbz - row[targetField]) / row.qcusepos;
|
|
|
|
|
|
|
|
|
|
|
|
for (const rule of styleRules.colorRules) {
|
|
|
|
|
|
if (deviation > rule.min && (!rule.max || deviation < rule.max)) {
|
|
|
|
|
|
return { background: rule.color };
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return {};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const getXmList = () => {
|
|
|
|
|
|
queryOldxminfo({ yq: yq.value, }).then((res: any) => {
|
|
|
|
|
|
tableData.value = res.data
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const handleSave = () => { }
|
|
|
|
|
|
|
2026-01-13 11:45:42 +08:00
|
|
|
|
getXmList()
|
2026-01-07 17:27:37 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
|
.table-box {
|
|
|
|
|
|
margin-top: 5px;
|
2026-01-13 11:45:42 +08:00
|
|
|
|
height: calc(100% - 125px);
|
2026-01-07 17:27:37 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.tips {
|
|
|
|
|
|
font-family: SourceHanSansCN, SourceHanSansCN;
|
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
|
color: #409eff;
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.color-red {
|
|
|
|
|
|
background-color: #f00;
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
padding: 2px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.color-pink {
|
|
|
|
|
|
background-color: #ffc0c0;
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
padding: 2px;
|
|
|
|
|
|
}
|
2026-01-13 11:45:42 +08:00
|
|
|
|
|
|
|
|
|
|
:deep(.el-form-item) {
|
|
|
|
|
|
margin-bottom: 5px;
|
|
|
|
|
|
}
|
2026-01-07 17:27:37 +08:00
|
|
|
|
</style>
|