Compare commits
No commits in common. "f699dc636f8bc500a348649b93d94b4e642a94ff" and "6f1770fd35eb8864353edca7741fecf3fd036879" have entirely different histories.
f699dc636f
...
6f1770fd35
28
pnpm-lock.yaml
generated
28
pnpm-lock.yaml
generated
@ -68,6 +68,9 @@ importers:
|
||||
pinia:
|
||||
specifier: 2.1.7
|
||||
version: 2.1.7(typescript@5.9.3)(vue@3.5.23(typescript@5.9.3))
|
||||
pinia-plugin-persistedstate:
|
||||
specifier: ^4.0.0
|
||||
version: 4.7.1(pinia@2.1.7(typescript@5.9.3)(vue@3.5.23(typescript@5.9.3)))
|
||||
pinyin-pro:
|
||||
specifier: ^3.26.0
|
||||
version: 3.27.0
|
||||
@ -1136,6 +1139,9 @@ packages:
|
||||
resolution: {integrity: sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
||||
defu@6.1.4:
|
||||
resolution: {integrity: sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==}
|
||||
|
||||
delayed-stream@1.0.0:
|
||||
resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==}
|
||||
engines: {node: '>=0.4.0'}
|
||||
@ -2128,6 +2134,20 @@ packages:
|
||||
resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==}
|
||||
engines: {node: '>=12'}
|
||||
|
||||
pinia-plugin-persistedstate@4.7.1:
|
||||
resolution: {integrity: sha512-WHOqh2esDlR3eAaknPbqXrkkj0D24h8shrDPqysgCFR6ghqP/fpFfJmMPJp0gETHsvrh9YNNg6dQfo2OEtDnIQ==}
|
||||
peerDependencies:
|
||||
'@nuxt/kit': '>=3.0.0'
|
||||
'@pinia/nuxt': '>=0.10.0'
|
||||
pinia: '>=3.0.0'
|
||||
peerDependenciesMeta:
|
||||
'@nuxt/kit':
|
||||
optional: true
|
||||
'@pinia/nuxt':
|
||||
optional: true
|
||||
pinia:
|
||||
optional: true
|
||||
|
||||
pinia@2.1.7:
|
||||
resolution: {integrity: sha512-+C2AHFtcFqjPih0zpYuvof37SFxMQ7OEG2zV9jRI12i9BOy3YQVAHwdKtyyc8pDcDyIc33WCIsZaCFWU7WWxGQ==}
|
||||
peerDependencies:
|
||||
@ -3760,6 +3780,8 @@ snapshots:
|
||||
is-descriptor: 1.0.3
|
||||
isobject: 3.0.1
|
||||
|
||||
defu@6.1.4: {}
|
||||
|
||||
delayed-stream@1.0.0: {}
|
||||
|
||||
delegate@3.2.0: {}
|
||||
@ -4885,6 +4907,12 @@ snapshots:
|
||||
|
||||
picomatch@4.0.2: {}
|
||||
|
||||
pinia-plugin-persistedstate@4.7.1(pinia@2.1.7(typescript@5.9.3)(vue@3.5.23(typescript@5.9.3))):
|
||||
dependencies:
|
||||
defu: 6.1.4
|
||||
optionalDependencies:
|
||||
pinia: 2.1.7(typescript@5.9.3)(vue@3.5.23(typescript@5.9.3))
|
||||
|
||||
pinia@2.1.7(typescript@5.9.3)(vue@3.5.23(typescript@5.9.3)):
|
||||
dependencies:
|
||||
'@vue/devtools-api': 6.6.4
|
||||
|
||||
20
src/api/liswork/xmmb/index.ts
Normal file
20
src/api/liswork/xmmb/index.ts
Normal file
@ -0,0 +1,20 @@
|
||||
//@ts-ignore js语法检查忽略
|
||||
import request from '@/utils/request';
|
||||
|
||||
|
||||
// 查询模板列表
|
||||
export function queryMbList(query?: Object) {
|
||||
return request({
|
||||
url: '/labInputmdl/query',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
// 查询明细数据
|
||||
export function queryDetail(query?: Object) {
|
||||
return request({
|
||||
url: '/labInputmdl/queryDetail',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
@ -106,4 +106,68 @@ export function querySjcs(data?: Object) {
|
||||
method: 'get',
|
||||
params: data
|
||||
});
|
||||
}
|
||||
// 查询检验项目排序
|
||||
export function getitemsort(data?: Object) {
|
||||
return request({
|
||||
url: '/xminfo/getitemsort',
|
||||
method: 'get',
|
||||
params: data
|
||||
});
|
||||
}
|
||||
// 保存检验项目排序
|
||||
export function saveitemsort(data?: Object) {
|
||||
return request({
|
||||
url: '/xminfo/saveitemsort',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
// 查询检验项目通道号
|
||||
export function getitemtdh(data?: Object) {
|
||||
return request({
|
||||
url: '/xminfo/getitemtdh',
|
||||
method: 'get',
|
||||
params: data
|
||||
});
|
||||
}
|
||||
// 保存检验项目通道号
|
||||
export function saveitemtdh(data?: Object) {
|
||||
return request({
|
||||
url: '/xminfo/saveitemtdh',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
// 删除检验项目通道号
|
||||
export function delitemtdh(data?: Object) {
|
||||
return request({
|
||||
url: '/xminfo/delitemtdh',
|
||||
method: 'get',
|
||||
params: data
|
||||
});
|
||||
}
|
||||
// 获取仪器参数
|
||||
export function querydouble(data?: Object) {
|
||||
return request({
|
||||
url: '/xminfo/querydouble',
|
||||
method: 'get',
|
||||
params: data
|
||||
});
|
||||
}
|
||||
// 保存仪器参数
|
||||
export function savedouble(data?: Object) {
|
||||
return request({
|
||||
url: '/xminfo/savedouble',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
// 获取参数默认模板
|
||||
export function querymbmc(data?: Object) {
|
||||
return request({
|
||||
url: '/xminfo/querymbmc',
|
||||
method: 'get',
|
||||
params: data
|
||||
});
|
||||
}
|
||||
@ -1,54 +0,0 @@
|
||||
//参数设置字典
|
||||
// @ts-ignore
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询字典列表
|
||||
export function listreportdict(params:any) {
|
||||
return request({
|
||||
url: '/reportdict/list',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// 查询字典详细
|
||||
export function getreportdict(id:number) {
|
||||
return request({
|
||||
url: `/reportdict/${id}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增字典
|
||||
export function addreportdict(params:any) {
|
||||
return request({
|
||||
url: '/reportdict',
|
||||
method: 'post',
|
||||
data:params
|
||||
})
|
||||
}
|
||||
|
||||
// 修改字典
|
||||
export function updatereportdict(params:any) {
|
||||
return request({
|
||||
url: '/reportdict',
|
||||
method: 'put',
|
||||
data:params
|
||||
})
|
||||
}
|
||||
|
||||
// 删除字典
|
||||
export function delreportdict(id:any) {
|
||||
return request({
|
||||
url: `/reportdict/${id}`,
|
||||
method: 'delete'
|
||||
})
|
||||
|
||||
}
|
||||
// 自动加载
|
||||
export function autoload() {
|
||||
return request({
|
||||
url: '/reportdict/autoload',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
54
src/api/liswork/xtwh/xmReqItemVsApi.ts
Normal file
54
src/api/liswork/xtwh/xmReqItemVsApi.ts
Normal file
@ -0,0 +1,54 @@
|
||||
//收费项目报告项目对照
|
||||
// @ts-ignore
|
||||
import request from "@/utils/request";
|
||||
|
||||
//查询申请信息列表
|
||||
export function queryListService(params: any) {
|
||||
return request({
|
||||
url: "/vsReportitem/queryList",
|
||||
method: "get",
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
//查询项目明细
|
||||
export function queryDetailService(params: any) {
|
||||
return request({
|
||||
url: "/vsReportitem/query",
|
||||
method: "get",
|
||||
params,
|
||||
});
|
||||
}
|
||||
//查询项目明细 old
|
||||
export function queryOldxminfo(params: any) {
|
||||
return request({
|
||||
url: "/oldxminfo/query",
|
||||
method: "get",
|
||||
params,
|
||||
});
|
||||
}
|
||||
//搜索项目
|
||||
export function searchxminfo(params: any) {
|
||||
return request({
|
||||
url: "/vsReportitem/search",
|
||||
method: "get",
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
//添加收费项目报告项目对照
|
||||
export function addXminfo(data: Object) {
|
||||
return request({
|
||||
url: "/vsReportitem/add",
|
||||
method: "post",
|
||||
data,
|
||||
});
|
||||
}
|
||||
//删除收费项目报告项目对照
|
||||
export function delXminfo(data: Object) {
|
||||
return request({
|
||||
url: "/vsReportitem/del",
|
||||
method: "delete",
|
||||
params: data,
|
||||
});
|
||||
}
|
||||
@ -124,7 +124,7 @@ aside {
|
||||
//main-container全局样式
|
||||
.app-container {
|
||||
padding: 10px 10px 0 10px;
|
||||
min-height: calc(100vh - 5.25rem);
|
||||
height: calc(100vh - 5.25rem);
|
||||
}
|
||||
|
||||
.components-container {
|
||||
@ -133,7 +133,7 @@ aside {
|
||||
}
|
||||
|
||||
.pagination-container {
|
||||
margin-top: 30px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.text-center {
|
||||
|
||||
@ -4,18 +4,10 @@
|
||||
<template v-if="values.includes(item.value)">
|
||||
<span
|
||||
v-if="(item.elTagType == 'default' || item.elTagType == '') && (item.elTagClass == '' || item.elTagClass == null)"
|
||||
:key="item.value"
|
||||
:index="index"
|
||||
:class="item.elTagClass"
|
||||
>{{ item.label + " " }}</span>
|
||||
<el-tag
|
||||
v-else
|
||||
:disable-transitions="true"
|
||||
:key="item.value + ''"
|
||||
:index="index"
|
||||
:type="item.elTagType === 'primary' ? '' : item.elTagType"
|
||||
:class="item.elTagClass"
|
||||
>{{ item.label + " " }}</el-tag>
|
||||
:key="item.value" :index="index" :class="item.elTagClass">{{ item.label + " " }}</span>
|
||||
<el-tag v-else :disable-transitions="true" :key="item.value + ''" :index="index"
|
||||
:type="item.elTagType === 'primary' ? 'primary' : item.elTagType" :class="item.elTagClass">{{ item.label + " "
|
||||
}}</el-tag>
|
||||
</template>
|
||||
</template>
|
||||
<template v-if="unmatch && showValue">
|
||||
@ -76,7 +68,7 @@ function handleArray(array) {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-tag + .el-tag {
|
||||
.el-tag+.el-tag {
|
||||
margin-left: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<template>
|
||||
<SelectTable v-model:data="modelValue" :fields="fields" :tableData="instrOptions" label="yqmc" :size="props.size"
|
||||
value="yq" objKey="yq" :border="true" :width="props.width" placeholder="请选择仪器" :clearable="props.clearable"
|
||||
@getDataValue="getDataValue" />
|
||||
@getDataValue="getDataValue" v-bind="$attrs" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
|
||||
@ -61,6 +61,7 @@ const props = withDefaults(defineProps<Props>(), {
|
||||
dictType: '',
|
||||
clearable: true,
|
||||
objKey: 'value',
|
||||
keyValue: false,
|
||||
fields: () => [
|
||||
{ prop: 'value', label: '代号', width: 80, enablePinyinSearch: true },
|
||||
{ prop: 'label', label: '名称', width: 150, enablePinyinSearch: true },
|
||||
@ -116,7 +117,7 @@ const visibleChange = (val: any) => {
|
||||
currentIndex.value = filterData.value.findIndex(item => item[props.value!] === props.data);
|
||||
if (currentIndex.value >= 0) {
|
||||
tableRef.value.setCurrentRow(filterData.value[currentIndex.value]);
|
||||
tableRef.value.setScrollTop(currentIndex.value);
|
||||
tableRef.value.setScrollTop(currentIndex.value * 30);
|
||||
}
|
||||
}, 10);
|
||||
}
|
||||
@ -140,7 +141,7 @@ const handleDataEcho = () => {
|
||||
} else if (props.tableData) {
|
||||
row = props.tableData?.find((item: any) => props.objKey && item[props.objKey] === props.data)
|
||||
}
|
||||
selectShowValue.value = row ? (props.label ? row[props.label] : (props.value ? row[props.value] : '')) : '';
|
||||
selectShowValue.value = row ? (props.keyValue ? `${row[props.value]} ${row[props.label]}` : (props.label ? row[props.label] : (props.value ? row[props.value] : ''))) : '';
|
||||
}
|
||||
};
|
||||
|
||||
@ -238,7 +239,7 @@ const handleKeydown = (e: any) => {
|
||||
tableRef.value.setCurrentRow(filterData.value[currentIndex.value]);
|
||||
|
||||
// 滚动到当前行
|
||||
tableRef.value.setScrollTop(currentIndex.value);
|
||||
tableRef.value.setScrollTop(currentIndex.value * 30);
|
||||
|
||||
// 回车确认
|
||||
if (e.key === "Enter") {
|
||||
@ -301,6 +302,8 @@ const setLabel = (val: any) => {
|
||||
selectShowValue.value = val[props.label];
|
||||
} else if (props.value) {
|
||||
selectShowValue.value = val[props.value];
|
||||
} else if (props.keyValue) {
|
||||
selectShowValue.value = `${val[props.value]} ${val[props.label]}`;
|
||||
}
|
||||
if (props.objKey) {
|
||||
// 返回值objKey对应的对象数据
|
||||
|
||||
@ -33,12 +33,12 @@ export const getDictData = async (...args: string[]) => {
|
||||
//字典数据格式化方法
|
||||
export const formatDict = (v: string, dictType: string) => {
|
||||
if (v == undefined) return;
|
||||
return dictData.value[dictType]?.find((item: any) => item.value == v.trim())?.label;
|
||||
return dictData.value[dictType]?.find((item: any) => item.value == v.trim())?.label || v;
|
||||
}
|
||||
|
||||
//仪器格式化方法
|
||||
export const formatInstr = (v: string) => {
|
||||
return instrOptions.value.find((item: any) => item.yq == v.trim())?.yqmc;
|
||||
return instrOptions.value.find((item: any) => item.yq == v.trim())?.yqmc || v;
|
||||
}
|
||||
|
||||
export { dictData, instrOptions }
|
||||
1
src/types/SelectTable.d.ts
vendored
1
src/types/SelectTable.d.ts
vendored
@ -18,6 +18,7 @@ export interface Props {
|
||||
disabled?: boolean;
|
||||
dictType?: string;
|
||||
clearable?: boolean;
|
||||
keyValue?: boolean; //是否使用键值对模式
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -171,13 +171,7 @@ service.interceptors.response.use(res => {
|
||||
})
|
||||
return Promise.reject('error');
|
||||
} else if (code === 1) {
|
||||
//提示并失败
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
type: 'error',
|
||||
duration: 0,
|
||||
})
|
||||
//提示并返回数据
|
||||
return Promise.resolve(res.data)
|
||||
} else if (code === 4) {
|
||||
//返回特定值,需要后续处理,表示当前操作需要处理后再调用,problemId是步骤关键参数,需要再次调用时引入
|
||||
|
||||
@ -1,17 +1,17 @@
|
||||
<template>
|
||||
<CustomTable ref="tableRefRight" :data="dataList" :columns="columnsRight" :enable-column-drag="true" @column-drag-end="handleColumnDragEnd"
|
||||
:config="tableConfig">
|
||||
<template #reserve="{row}">
|
||||
{{ reserve(row.reserve) }}
|
||||
</template>
|
||||
</CustomTable>
|
||||
<CustomTable ref="tableRefRight" :data="dataList" :columns="columnsRight" :enable-column-drag="true"
|
||||
@column-drag-end="handleColumnDragEnd" :config="tableConfig">
|
||||
<template #reserve="{ row }">
|
||||
{{ reserve(row.reserve) }}
|
||||
</template>
|
||||
</CustomTable>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import CustomTable from '@/components/elTable/index.vue'
|
||||
|
||||
const props = defineProps({
|
||||
dataList:{
|
||||
dataList: {
|
||||
type: Array,
|
||||
required: false,
|
||||
default: []
|
||||
@ -23,17 +23,17 @@ const props = defineProps({
|
||||
reserveWidth: 50,
|
||||
textresultWidth: 200,
|
||||
zdWidth: 100,
|
||||
tableHeight: '85vh'
|
||||
tableHeight: '100%'
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
//const dataListRight = ref([]);
|
||||
const columnsRight = ref([
|
||||
{ prop: 'reserve', label: '类别', visible: true, align: 'center',slot: 'reserve', width: props.styleConfig.reserveWidth },
|
||||
{ prop: 'textresult', label: '说明', visible: true, align: 'center', width: props.styleConfig.textresultWidth ,showOverflowTooltip: false},
|
||||
{ prop: 'zd', label: '指导建议', visible: true, align: 'center', width: props.styleConfig.zdWidth,showOverflowTooltip: false },
|
||||
{ prop: 'reserve', label: '类别', visible: true, align: 'center', slot: 'reserve', },
|
||||
{ prop: 'textresult', label: '说明', visible: true, align: 'center', showOverflowTooltip: false },
|
||||
{ prop: 'zd', label: '指导建议', visible: true, align: 'center', showOverflowTooltip: false },
|
||||
])
|
||||
|
||||
const tableConfig = ref({
|
||||
@ -50,13 +50,13 @@ const handleColumnDragEnd = (data: any) => {
|
||||
}
|
||||
|
||||
|
||||
const reserve = (reserve:string) => {
|
||||
switch(reserve){
|
||||
const reserve = (reserve: string) => {
|
||||
switch (reserve) {
|
||||
case '1':
|
||||
return '综述'
|
||||
case 'H':
|
||||
return '偏高'
|
||||
case 'L':
|
||||
case 'L':
|
||||
return '偏低'
|
||||
case 'P':
|
||||
return '阳性'
|
||||
@ -72,5 +72,4 @@ const reserve = (reserve:string) => {
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
</style>
|
||||
<style scoped lang="scss"></style>
|
||||
|
||||
@ -1,46 +1,54 @@
|
||||
<template>
|
||||
<div class="topForm">
|
||||
<el-form ref="formRef" :model="formData" inline label-width="80px" class="mb8" @submit.prevent="handleSubmit">
|
||||
<el-form-item label="检索" prop="js">
|
||||
<el-input placeholder="项目代号,名称,简拼" v-model="formData.js" style="width: 200px;" @keyup.enter="getList"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-row>
|
||||
<el-button type="primary" @click="onQueryClick">查询</el-button>
|
||||
<el-button type="primary" @click="onAddClick">新增</el-button>
|
||||
<el-button type="primary" @click="onDelClick">删除</el-button>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="17">
|
||||
<CustomTable ref="tableRefLeft" :data="dataListLeft" :columns="columnsLeft" :enable-column-drag="true" @column-drag-end="handleColumnDragEnd"
|
||||
:config="tableConfig" @row-dblclick="onDBClick" @row-click="onClick" :pagination="pagination" @size-change="sizeChange" @page-change="currentChange">
|
||||
<template #xsbz="{row}">
|
||||
<el-checkbox :model-value="row.xsbz === '1'"/>
|
||||
</template>
|
||||
</CustomTable>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<TableRight :data-list="dataListRight"/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="app-container">
|
||||
<div class="topForm">
|
||||
<el-form ref="formRef" :model="formData" inline label-width="80px" @submit.prevent="handleSubmit">
|
||||
<el-form-item label="检索" prop="js">
|
||||
<el-input placeholder="项目代号,名称,简拼" v-model="formData.js" style="width: 200px;"
|
||||
@keyup.enter="getList"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="onQueryClick">查询</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-row>
|
||||
<el-button type="primary" @click="onAddClick">新增</el-button>
|
||||
<el-button type="danger" @click="onDelClick">删除</el-button>
|
||||
</el-row>
|
||||
<el-row :gutter="20" class="table-row">
|
||||
<el-col :span="17" class="table-col">
|
||||
<CustomTable ref="tableRefLeft" :data="dataListLeft" :columns="columnsLeft" :enable-column-drag="true"
|
||||
@column-drag-end="handleColumnDragEnd" :config="tableConfig" @row-dblclick="onDBClick" @row-click="onClick"
|
||||
:pagination="pagination" @size-change="sizeChange" @page-change="currentChange">
|
||||
<template #xsbz="{ row }">
|
||||
<el-checkbox :model-value="row.xsbz === '1'" />
|
||||
</template>
|
||||
</CustomTable>
|
||||
</el-col>
|
||||
<el-col :span="7" class="table-col">
|
||||
<TableRight :data-list="dataListRight" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<Modify ref="modifyRef" v-model="modifyVisible" :title="modifyTitle" :type="modifyType"
|
||||
@close-with-return="closeWithReturn" />
|
||||
</div>
|
||||
|
||||
<Modify ref="modifyRef" v-model="modifyVisible" :title="modifyTitle" :type="modifyType" @close-with-return="closeWithReturn"/>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import CustomTable from '@/components/elTable/index.vue'
|
||||
import {queryService,queryDetailService,delService} from '@/api/liswork/xmKnowledge/xmKnowledgeApi'
|
||||
import { queryService, queryDetailService, delService } from '@/api/liswork/xmKnowledge/xmKnowledgeApi'
|
||||
import TableRight from './TableData.vue'
|
||||
import Modify from './Modify.vue'
|
||||
import { ElMessage,ElMessageBox } from 'element-plus';
|
||||
import { ElMessage, ElMessageBox } from 'element-plus';
|
||||
|
||||
const dataListLeft = ref([]);
|
||||
const dataListRight = ref([]);
|
||||
const columnsLeft = ref([
|
||||
{ prop: 'xmid', label: '知识库ID', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'xmdh', label: '项目代号', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'xmmc', label: '项目名称', visible: true, align: 'center', width: 200 },
|
||||
{ prop: 'xmmc', label: '项目名称', visible: true, align: 'center', width: 200 },
|
||||
{ prop: 'xsbz', label: '显示标志', visible: true, align: 'center', slot: 'xsbz', width: 100 },
|
||||
{ prop: 'xmlb', label: '类别', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'xmz', label: '所属组', visible: true, align: 'center', width: 100 },
|
||||
@ -57,7 +65,7 @@ const columnsLeft = ref([
|
||||
|
||||
const tableConfig = ref({
|
||||
border: true, // 边框
|
||||
height: '85vh', // 高度
|
||||
height: '100%', // 高度
|
||||
highlightCurrentRow: true, // 高亮当前行
|
||||
// cellStyle: cellStyleHd
|
||||
})
|
||||
@ -96,7 +104,7 @@ const formData = ref({
|
||||
js: ''
|
||||
})
|
||||
|
||||
const closeWithReturn = () =>{
|
||||
const closeWithReturn = () => {
|
||||
getList()
|
||||
}
|
||||
|
||||
@ -104,17 +112,17 @@ const handleSubmit = (event: any) => {
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
const onClick = async (row:any) => {
|
||||
const onClick = async (row: any) => {
|
||||
const res = await queryDetailService(row.xmid);
|
||||
dataListRight.value = res.data
|
||||
selectRow.value = row
|
||||
}
|
||||
|
||||
const onDBClick = ()=>{
|
||||
const onDBClick = () => {
|
||||
|
||||
}
|
||||
|
||||
const onAddClick = ()=> {
|
||||
const onAddClick = () => {
|
||||
modifyVisible.value = true
|
||||
modifyTitle.value = '新增'
|
||||
modifyType.value = '新增'
|
||||
@ -122,12 +130,12 @@ const onAddClick = ()=> {
|
||||
}
|
||||
|
||||
const onDelClick = async () => {
|
||||
if(selectRow.value){
|
||||
await ElMessageBox.confirm('是否要删除选中的数据?','警告',{confirmButtonText: '确定',cancelButtonText: '取消',});
|
||||
if (selectRow.value) {
|
||||
await ElMessageBox.confirm('是否要删除选中的数据?', '警告', { confirmButtonText: '确定', cancelButtonText: '取消', });
|
||||
await delService(selectRow.value.xmid)
|
||||
ElMessage.success('删除成功!')
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
const onQueryClick = () => {
|
||||
@ -135,29 +143,29 @@ const onQueryClick = () => {
|
||||
}
|
||||
|
||||
const getList = async () => {
|
||||
const data = {pageSize: pagination.value.pageSize, pageNum: pagination.value.currentPage,inputData: formData.value.js }
|
||||
const data = { pageSize: pagination.value.pageSize, pageNum: pagination.value.currentPage, inputData: formData.value.js }
|
||||
const res = await queryService(data);
|
||||
dataListLeft.value = res.rows
|
||||
pagination.value.total = res.total
|
||||
|
||||
dataListRight.value = []
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
onMounted(()=>{
|
||||
onMounted(() => {
|
||||
getList()
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.el-row {
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.topForm {
|
||||
.table-row {
|
||||
height: calc(100% - 150px);
|
||||
margin-top: 10px;
|
||||
|
||||
.table-col {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
192
src/views/liswork/xmmb/index.vue
Normal file
192
src/views/liswork/xmmb/index.vue
Normal file
@ -0,0 +1,192 @@
|
||||
/**
|
||||
* @file index.vue
|
||||
* @author: w
|
||||
* @since: 2025-12-24
|
||||
*/
|
||||
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-button type="primary" @click="handleAdd">新增</el-button>
|
||||
<el-button type="danger" @click="handleDel">删除</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="table-row" style="margin-top: 10px;">
|
||||
<el-col :span="24" class="table-col">
|
||||
<CustomTable ref="tableRef" v-model:data="tableData" :columns="columns" :config="tableConfig"
|
||||
@row-dblclick="handleRowDblclick">
|
||||
<template #yq="{ row }">
|
||||
{{ formatInstr(row.yq) }}
|
||||
</template>
|
||||
<template #yblx="{ row }">
|
||||
{{ formatYblx(row.yblx) }}
|
||||
</template>
|
||||
<template #zdsr="{ row }">
|
||||
<el-checkbox :model-value="row.zdsr == 'Y'" />
|
||||
</template>
|
||||
</CustomTable>
|
||||
</el-col>
|
||||
<el-dialog :title="title" v-model="visible" width="50vw" :close-on-click-modal="false" :draggable="true">
|
||||
<el-row :gutter="15">
|
||||
<el-col :span="10">
|
||||
<el-form ref="formRef" :model="formData" label-width="150px">
|
||||
<el-form-item label="仪器" prop="yq">
|
||||
<YQSelectTable v-model:data="formData.yq" :disabled="disabled" />
|
||||
</el-form-item>
|
||||
<el-form-item label="模板名称" prop="mbmc">
|
||||
<el-input v-model="formData.mbmc" />
|
||||
</el-form-item>
|
||||
<el-form-item label="输入编号" prop="srbh">
|
||||
<el-input v-model="formData.srbh" />
|
||||
</el-form-item>
|
||||
<el-form-item label="标本类型" prop="yblx">
|
||||
<SelectTable v-model:data="formData.yblx" :tableData="regdictList" />
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="zdsr">
|
||||
<el-checkbox v-model="formData.zdsr" label="自动输入" true-value="Y" false-value="N" />
|
||||
</el-form-item>
|
||||
<el-form-item label="自动输入起始标本号" prop="qsybh">
|
||||
<el-input v-model="formData.qsybh" />
|
||||
</el-form-item>
|
||||
<el-form-item label="自动输入结束标本号" prop="jsybh">
|
||||
<el-input v-model="formData.jsybh" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-col>
|
||||
<el-col :span="14">
|
||||
<div class="mb10">
|
||||
<el-button type="primary" @click="handleSave">保存</el-button>
|
||||
<el-button type="primary" @click="handleAdd">新增</el-button>
|
||||
<el-button type="danger" @click="handleDel">删除</el-button>
|
||||
</div>
|
||||
<div style="height: 400px">
|
||||
<CustomTable ref="tableRefRight" :data="rightTableData" :columns="rightColumns" :config="tableConfig">
|
||||
<template #xmdh="{ row }">
|
||||
{{ row.xmdh }} {{ row.xmmc }}
|
||||
</template>
|
||||
</CustomTable>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
</el-dialog>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import YQSelectTable from '@/components/SelectTable/YQSelectTable/index.vue';
|
||||
// @ts-ignore
|
||||
import { listregdict } from "@/api/regional/dict/regdict.js";
|
||||
import { queryMbList, queryDetail } from '@/api/liswork/xmmb';
|
||||
import { formatInstr, getYqData } from '@/hooks'
|
||||
|
||||
const disabled = ref(false)
|
||||
const formData = ref({
|
||||
yq: '',
|
||||
mbmc: '',
|
||||
srbh: '',
|
||||
yblx: '',
|
||||
zdsr: '',
|
||||
qsybh: '',
|
||||
jsybh: '',
|
||||
})
|
||||
const title = ref('')
|
||||
const visible = ref(false)
|
||||
const tableData = ref([])
|
||||
const columns = ref([
|
||||
{ prop: 'yq', label: '仪器', visible: true, align: 'center', slot: 'yq' },
|
||||
{ prop: 'mbmc', label: '输入模板', visible: true, align: 'center', },
|
||||
{ prop: 'srbh', label: '输入编号', visible: true, align: 'center', },
|
||||
{ prop: 'yblx', label: '样本类型', visible: true, align: 'center', slot: 'yblx' },
|
||||
{ prop: 'zdsr', label: '自动输入', visible: true, align: 'center', slot: 'zdsr' },
|
||||
{ prop: 'qsybh', label: '起始号', visible: true, align: 'center', },
|
||||
{ prop: 'jsybh', label: '结束号', visible: true, align: 'center', },
|
||||
])
|
||||
|
||||
const tableConfig = ref({
|
||||
height: '100%', // 高度
|
||||
border: true, // 边框
|
||||
highlightCurrentRow: true, // 当前行高亮
|
||||
})
|
||||
|
||||
const regdictList = ref<Array<{ value: string, label: string }>>([])
|
||||
const rightTableData = ref([])
|
||||
const rightColumns = ref([
|
||||
{ prop: 'xmdh', label: '检验项目', visible: true, align: 'center', slot: 'xmdh' },
|
||||
{ prop: 'mrz', label: '默认值', visible: true, align: 'center', },
|
||||
])
|
||||
|
||||
const handleAdd = () => {
|
||||
formData.value = {
|
||||
yq: '',
|
||||
mbmc: '',
|
||||
srbh: '',
|
||||
yblx: '',
|
||||
zdsr: '',
|
||||
qsybh: '',
|
||||
jsybh: '',
|
||||
}
|
||||
disabled.value = false
|
||||
rightTableData.value = []
|
||||
title.value = '新增模板'
|
||||
visible.value = true
|
||||
}
|
||||
|
||||
const handleRowDblclick = (row: any) => {
|
||||
queryDetail(row).then((res: any) => {
|
||||
rightTableData.value = res.data
|
||||
})
|
||||
row.yq = row.yq.trim()
|
||||
formData.value = row
|
||||
disabled.value = true
|
||||
title.value = '编辑模板'
|
||||
visible.value = true
|
||||
}
|
||||
const handleSave = () => { }
|
||||
const handleDel = () => { }
|
||||
const getList = () => {
|
||||
queryMbList().then((res: any) => {
|
||||
tableData.value = res.data
|
||||
})
|
||||
}
|
||||
|
||||
getList()
|
||||
onMounted(() => {
|
||||
getYqData()
|
||||
// 获取标本类型
|
||||
listregdict({ pageSize: 100, pageNum: 1, dictType: 'BT' }).then((res: any) => {
|
||||
regdictList.value = res.rows.map((item: any) => {
|
||||
return {
|
||||
label: item.dictName,
|
||||
value: item.dictCode
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
const formatYblx = (v: string) => {
|
||||
return regdictList.value.find((item: any) => item.value == v)?.label || v
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.table-row {
|
||||
height: calc(100% - 60px);
|
||||
|
||||
.table-col {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.right-col {
|
||||
padding-top: 5px;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
}
|
||||
|
||||
.el-form-item {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
@ -11,70 +11,114 @@
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="Delete" @click="delItem">删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="Delete" @click="allClear">清除所有项目接口号</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="10" class="table-row">
|
||||
<el-col :span="12" class="table-box">
|
||||
<el-table :data="tableData" height="100%" border highlight-current-row>
|
||||
<el-table-column label="通道号" align="center">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.channel" placeholder="请输入通道号" class="full-width-input" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="项目" align="center">
|
||||
<template #default="scope">
|
||||
<SelectTable v-model:data="scope.row.xmid" :tableData="xmList" class="full-width-input" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<div class="tips">
|
||||
说明:
|
||||
“通道号”又称“接口代号”,是指仪器向电脑传送结果时项目的
|
||||
标识符
|
||||
接口代号对于一个仪器不可重复。
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="table-row">
|
||||
<CustomTable ref="tableRef" :data="tableData" :columns="columns" :config="tableConfig" :loading="loading"
|
||||
@row-click="handleRowClick">
|
||||
<template #tdh="{ row }">
|
||||
<el-input v-model="row.tdh" placeholder="请输入通道号" class="full-width-input" />
|
||||
</template>
|
||||
<template #xmmc="{ row }">
|
||||
<SelectTable v-model:data="row.xmdh" :tableData="xmList" class="full-width-input" />
|
||||
</template>
|
||||
</CustomTable>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { queryXmInfoNewService } from '@/api/liswork/labItem/labItemApi';
|
||||
import { queryXmInfo, } from '@/api/liswork/work/LisWork';
|
||||
import { getitemtdh, saveitemtdh, delitemtdh } from '@/api/liswork/xtwh/ComOpt';
|
||||
import { ElMessage } from 'element-plus';
|
||||
const yq = defineModel<string>();
|
||||
|
||||
const tableData = ref<Array<{ channel: string }>>([]);
|
||||
const loading = ref(false);
|
||||
const tableRef = ref();
|
||||
const tableData = ref<Array<{ tdh: string, xmdh: string }>>([]);
|
||||
const columns = [
|
||||
{ label: '序号', type: 'index', visible: true, width: 50, align: 'center' },
|
||||
{ label: '通道号', prop: 'tdh', visible: true, align: 'center', slot: 'tdh' },
|
||||
{ label: '项目代号', prop: 'xmdh', visible: true, align: 'center' },
|
||||
{ label: '项目', prop: 'xmmc', visible: true, align: 'center', slot: 'xmmc', showOverflowTooltip: false, width: 250 },
|
||||
{ label: '项目id', prop: 'xmid', visible: true, align: 'center' },
|
||||
];
|
||||
const tableConfig = {
|
||||
border: true,
|
||||
height: '100%',
|
||||
highlightCurrentRow: true,
|
||||
}
|
||||
const handleSave = () => {
|
||||
};
|
||||
const flag = tableData.value.every(item => item.tdh)
|
||||
if (!flag) return ElMessage.error('请检查填写参数,通道号不能为空!')
|
||||
let index = -1;
|
||||
tableData.value.forEach((item, i) => {
|
||||
const tdhLower = item.tdh.trim().toUpperCase();
|
||||
index = tableData.value.findIndex(i => i.tdh.trim().toUpperCase() === tdhLower && i.tdh !== item.tdh);
|
||||
if (index !== -1) {
|
||||
return ElMessage.error(`通道号 ${item.tdh} ${i + 1}行已存在!`)
|
||||
}
|
||||
})
|
||||
if (index !== -1) return
|
||||
const arr = tableData.value.map(item => {
|
||||
return {
|
||||
...item,
|
||||
tdh: item.tdh.trim().toUpperCase(),
|
||||
yq: yq.value
|
||||
}
|
||||
})
|
||||
|
||||
saveitemtdh(arr).then((res: any) => {
|
||||
if (res.code == 0) {
|
||||
ElMessage.success('保存成功!')
|
||||
getChannel()
|
||||
}
|
||||
})
|
||||
};
|
||||
const selectedRow = ref<any>(null);
|
||||
const handleRowClick = (row: any) => {
|
||||
selectedRow.value = row;
|
||||
};
|
||||
const addItem = () => {
|
||||
tableData.value.push({ channel: '' })
|
||||
tableData.value.push({ tdh: '', xmdh: '' })
|
||||
nextTick(() => {
|
||||
tableRef.value.setScrollTop(tableData.value.length)
|
||||
})
|
||||
};
|
||||
|
||||
const delItem = () => {
|
||||
if (!selectedRow.value) return ElMessage.error('请选择要删除的行!')
|
||||
delitemtdh({ yq: yq.value, tdh: selectedRow.value.tdh })
|
||||
tableData.value = tableData.value.filter(item => item.xmdh !== selectedRow.value.xmdh)
|
||||
getChannel()
|
||||
}
|
||||
|
||||
const allClear = () => {
|
||||
}
|
||||
const xmList = ref<Array<{ xmmc: string, xmid: string }>>([]);
|
||||
const xmList = ref<Array<{ xmmc: string, xmdh: string }>>([]);
|
||||
const getXmList = () => {
|
||||
queryXmInfoNewService({ yq: yq.value }).then((res: any) => {
|
||||
xmList.value = res.rows.map((item: any) => {
|
||||
loading.value = true;
|
||||
queryXmInfo({ yq: yq.value }).then((res: any) => {
|
||||
loading.value = false;
|
||||
xmList.value = res.data.map((item: any) => {
|
||||
return {
|
||||
label: item.xmmc,
|
||||
value: item.xmid.toString(),
|
||||
value: item.xmdh,
|
||||
}
|
||||
})
|
||||
})
|
||||
};
|
||||
|
||||
watch(() => yq.value, (val) => {
|
||||
const getChannel = () => {
|
||||
getitemtdh({ yq: yq.value }).then((res: any) => {
|
||||
tableData.value = res.data
|
||||
})
|
||||
}
|
||||
|
||||
watch(yq, (val) => {
|
||||
if (val) {
|
||||
getXmList();
|
||||
getChannel();
|
||||
}
|
||||
}, { immediate: true });
|
||||
</script>
|
||||
|
||||
@ -1,159 +1,169 @@
|
||||
<template>
|
||||
<!-- 参数列表 -->
|
||||
<div>
|
||||
<el-row :gutter="10" class="table-toolbar">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Check" @click="handleSave">保存</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<template v-if="paramsFlag">
|
||||
<el-row :gutter="10" class="table-toolbar">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Check" @click="handleSave">保存</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button type="success" plain icon="Edit" @click="handleCancelEdit">取消修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="RefreshRight" @click="handleRestoreDefault">还原默认</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form ref="form" :model="formData" :rules="rules" label-width="120px" class="form-inline" inline>
|
||||
<div class="title">说明:公式中阴阳对照请用NC,PC表示</div>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="测试波长" prop="csbc">
|
||||
<el-select v-model="formData.csbc" style="width: 12rem;">
|
||||
<el-option v-for="item in dzList" :key="item.lgph" :value="item.lgph" :label="item.bc" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" style="display: flex;">
|
||||
<el-form-item label="参考波长" prop="ckbc">
|
||||
<el-select v-model="formData.ckbc" style="width: 12rem;">
|
||||
<el-option v-for="item in dzList" :key="item.lgph" :value="item.lgph" :label="item.bc" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-button type="primary" @click="openDz">滤光片波长对照表</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="阳性判断公式" prop="yxgs">
|
||||
<el-input v-model="formData.yxgs" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="上灰区" prop="shq">
|
||||
<el-input v-model="formData.shq">
|
||||
<template #append>% </template>
|
||||
</el-input>
|
||||
<el-form ref="form" :model="formData" :rules="rules" label-width="120px" class="form-inline" inline>
|
||||
<div style="display: flex;">
|
||||
<el-form-item label="项目" prop="xmdh">
|
||||
<SelectTable v-model:data="xmdh" :tableData="xmList" style="width: 12rem;" @getDataValue='getXmInfo' />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="下灰区" prop="xhq">
|
||||
<el-input v-model="formData.xhq">
|
||||
<template #append>% </template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="阴性对照下限" prop="negxx">
|
||||
<el-input v-model="formData.negxx" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="title">说明:公式中阴阳对照请用NC,PC表示</div>
|
||||
</div>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="测试波长" prop="csbc">
|
||||
<el-select v-model="formData.csbc" style="width: 12rem;">
|
||||
<el-option v-for="item in dzList" :key="item.lgph" :value="item.lgph" :label="item.bc" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" style="display: flex;">
|
||||
<el-form-item label="参考波长" prop="ckbc">
|
||||
<el-select v-model="formData.ckbc" style="width: 12rem;">
|
||||
<el-option v-for="item in dzList" :key="item.lgph" :value="item.lgph" :label="item.bc" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-button type="primary" @click="openDz">滤光片波长对照表</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="阳性判断公式" prop="yxgs">
|
||||
<el-input v-model="formData.yxgs" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="阳性对照下限" prop="posxx">
|
||||
<el-input v-model="formData.posxx" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="阴性对照上限" prop="negsx">
|
||||
<el-input v-model="formData.negsx" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="阳性对照上限" prop="possx">
|
||||
<el-input v-model="formData.possx" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="上灰区" prop="shq">
|
||||
<el-input v-model="formData.shq">
|
||||
<template #append>% </template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="下灰区" prop="xhq">
|
||||
<el-input v-model="formData.xhq">
|
||||
<template #append>% </template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="阴性对照下限" prop="negxx">
|
||||
<el-input v-model="formData.negxx" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="阳性对照下限" prop="posxx">
|
||||
<el-input v-model="formData.posxx" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="阴性对照上限" prop="negsx">
|
||||
<el-input v-model="formData.negsx" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="阳性对照上限" prop="possx">
|
||||
<el-input v-model="formData.possx" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
|
||||
<el-divider></el-divider>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目性质" prop="xmxz">
|
||||
<el-radio-group v-model="formData.xmxz">
|
||||
<el-radio value="1">定性</el-radio>
|
||||
<el-radio value="2">定量</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="移动模式" prop="ydfs">
|
||||
<el-radio-group v-model="formData.ydfs">
|
||||
<el-radio value="1">连续</el-radio>
|
||||
<el-radio value="2">步进</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form-item label="测试模式" prop="csms">
|
||||
<el-radio-group v-model="formData.csms">
|
||||
<el-radio value="1">终点法</el-radio>
|
||||
<el-radio value="2">两点法</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="振板频率" prop="zbpl">
|
||||
<el-radio-group v-model="formData.zbpl">
|
||||
<el-radio value="1">高</el-radio>
|
||||
<el-radio value="2">中</el-radio>
|
||||
<el-radio value="3">低</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="空白形式" prop="kbms">
|
||||
<el-radio-group v-model="formData.kbms">
|
||||
<el-radio value="1">空气</el-radio>
|
||||
<el-radio value="2">试剂</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="振板时间" prop="zbsj">
|
||||
<el-input v-model="formData.zbsj">
|
||||
<template #append>秒</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-divider></el-divider>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="默认模板" prop="mrmb">
|
||||
<el-select v-model="formData.mrmb" style="width: 12rem;">
|
||||
<!-- <el-option v-for="item in sjtableData" :key="item.sjph" :value="item.sjph" :label="item.sjph" /> -->
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" style="display: flex;">
|
||||
<el-form-item label="默认试剂" prop="mrsjph">
|
||||
<el-select v-model="formData.mrsjph" style="width: 12rem;">
|
||||
<el-option v-for="item in sjtableData" :key="item.sjph" :value="item.sjph" :label="item.sjph" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-button type="primary" @click="sjHandle">试剂维护</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-divider></el-divider>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目性质" prop="xmxz">
|
||||
<el-radio-group v-model="formData.xmxz">
|
||||
<el-radio value="1">定性</el-radio>
|
||||
<el-radio value="2">定量</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="移动模式" prop="ydfs">
|
||||
<el-radio-group v-model="formData.ydfs">
|
||||
<el-radio value="1">连续</el-radio>
|
||||
<el-radio value="2">步进</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
|
||||
<el-form-item label="测试模式" prop="csms">
|
||||
<el-radio-group v-model="formData.csms">
|
||||
<el-radio value="1">终点法</el-radio>
|
||||
<el-radio value="2">两点法</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="振板频率" prop="zbpl">
|
||||
<el-radio-group v-model="formData.zbpl">
|
||||
<el-radio value="1">高</el-radio>
|
||||
<el-radio value="2">中</el-radio>
|
||||
<el-radio value="3">低</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="空白形式" prop="kbms">
|
||||
<el-radio-group v-model="formData.kbms">
|
||||
<el-radio value="1">空气</el-radio>
|
||||
<el-radio value="2">试剂</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="振板时间" prop="zbsj">
|
||||
<el-input v-model="formData.zbsj">
|
||||
<template #append>秒</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-divider></el-divider>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="默认模板" prop="mrmb">
|
||||
<el-select v-model="formData.mrmb" style="width: 12rem;">
|
||||
<el-option v-for="item in mbList" :key="item.no" :value="item.no" :label="item.na" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" style="display: flex;">
|
||||
<el-form-item label="默认试剂" prop="mrsjph">
|
||||
<el-select v-model="formData.mrsjph" style="width: 12rem;">
|
||||
<el-option v-for="item in sjtableData" :key="item.sjph" :value="item.sjph" :label="item.sjph" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-button type="primary" @click="sjHandle">试剂维护</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-empty :image-size="200" description="暂无参数配置" />
|
||||
</template>
|
||||
|
||||
<!-- 波长对照表 -->
|
||||
<el-dialog v-model="dialogVisible" title="滤光波长对照表" draggable :close-on-click-modal="false" width="500px">
|
||||
@ -217,14 +227,16 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { queryFilter, addXmFilter, delXmFilter, addXmLot, delXmLot, queryXmLot, querySjcs } from '@/api/liswork/xtwh/ComOpt'
|
||||
import { queryFilter, addXmFilter, delXmFilter, addXmLot, delXmLot, queryXmLot, querySjcs, querydouble, savedouble, querymbmc } from '@/api/liswork/xtwh/ComOpt'
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { formatDict, dictData } from '@/hooks'
|
||||
import { get } from 'lodash';
|
||||
import { queryXmInfo } from '@/api/liswork/work/LisWork';
|
||||
|
||||
|
||||
const yq = defineModel<string>()
|
||||
|
||||
const dialogVisible = ref(false)
|
||||
const xmdh = ref('');
|
||||
const formData = ref({
|
||||
csbc: '',
|
||||
ckbc: '',
|
||||
@ -242,7 +254,8 @@ const formData = ref({
|
||||
kbms: '1',
|
||||
zbsj: '',
|
||||
mrmb: '',
|
||||
mrsjph: ''
|
||||
mrsjph: '',
|
||||
xmdh: '',
|
||||
});
|
||||
const rules = ref({
|
||||
csbc: [
|
||||
@ -253,11 +266,18 @@ const rules = ref({
|
||||
]
|
||||
});
|
||||
|
||||
const paramsFlag = ref(true);
|
||||
|
||||
const form = ref();
|
||||
const handleSave = () => {
|
||||
form.value.validate((valid: boolean) => {
|
||||
if (valid) {
|
||||
console.log('submit!')
|
||||
savedouble(formData.value).then((res: any) => {
|
||||
if (res.code == 0) {
|
||||
ElMessage.success('保存成功!')
|
||||
getXmInfo()
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -310,6 +330,7 @@ interface sjList {
|
||||
sjcs: string, sjph: string, yq: string, yxq: string, csff: string
|
||||
}
|
||||
const sjShow = ref(false)
|
||||
const mbList = ref<Array<{ na: string, no: string }>>([])
|
||||
const sjtableData = ref<sjList[]>([])
|
||||
const sjHandle = () => {
|
||||
getSjList()
|
||||
@ -363,9 +384,38 @@ const getSjcjList = () => {
|
||||
})
|
||||
}
|
||||
|
||||
const getXmInfo = () => {
|
||||
querydouble({ yq: yq.value, xmdh: xmdh.value }).then((res: any) => {
|
||||
paramsFlag.value = res.code == 1 ? false : true;
|
||||
formData.value = res.data || {}
|
||||
})
|
||||
}
|
||||
const xmList = ref<Array<{ label: string, value: string }>>([])
|
||||
const getXmList = () => {
|
||||
queryXmInfo({ yq: yq.value }).then((res: any) => {
|
||||
xmList.value = res.data.map((item: any) => {
|
||||
return {
|
||||
label: item.xmmc,
|
||||
value: item.xmdh,
|
||||
}
|
||||
})
|
||||
})
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
querymbmc().then((res: any) => {
|
||||
mbList.value = res.data || []
|
||||
})
|
||||
});
|
||||
|
||||
watch(yq, (newVal) => {
|
||||
getDzList()
|
||||
getSjList()
|
||||
if (newVal) {
|
||||
getXmInfo()
|
||||
getDzList()
|
||||
getSjList()
|
||||
getXmList()
|
||||
}
|
||||
xmdh.value = ''
|
||||
}, {
|
||||
immediate: true,
|
||||
deep: true
|
||||
|
||||
@ -1,44 +1,28 @@
|
||||
<template>
|
||||
<!-- 整体排序 -->
|
||||
<div class="sort_box">
|
||||
<el-row :gutter="10" class="table-row">
|
||||
<el-col :span="20" class="table-box">
|
||||
<CustomTable ref="tableRef" :data="dataList" :columns="columns" :config="tableConfig"
|
||||
@row-click="handleRowClick">
|
||||
<template #sort="{ row }">
|
||||
<el-input v-model="row.sort" class="full-width-input" />
|
||||
</template>
|
||||
</CustomTable>
|
||||
<el-row :gutter="10" class="table-toolbar">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" @click="refresh">刷新</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-row :gutter="10" class="table-toolbar">
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-radio-group v-model="radio" @change="radioChange">
|
||||
<el-radio value="1">上下移动调整</el-radio>
|
||||
<el-radio value="2">手工输入工号</el-radio>
|
||||
</el-radio-group>
|
||||
</el-col> -->
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" @click="refresh">刷新</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" @click="cpHandle">存盘</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" :disabled="radio == '2'" @click="firstHandle">首位</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button type="primary" icon="top" :disabled="radio == '2'" @click="prevHandle">上移</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" icon="bottom" :disabled="radio == '2'" @click="nextHandle">下移</el-button>
|
||||
</el-col> -->
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" :disabled="radio == '2'" @click="lastHadnle">末位</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" @click="cpHandle">存盘</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" @click="firstHandle">首位</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" @click="lastHadnle">末位</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="table-row">
|
||||
<CustomTable ref="tableRef" :data="dataList" :columns="columns" :config="tableConfig" :enableRowDrag="true"
|
||||
@row-drag-end="handleRowDragEnd" @row-click="handleRowClick">
|
||||
<!-- <template #dyxh="{ row }">
|
||||
<el-input v-model="row.dyxh" class="full-width-input" />
|
||||
</template> -->
|
||||
</CustomTable>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -46,28 +30,21 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
import { formatDict, dictData } from '@/hooks';
|
||||
import { getitemsort, saveitemsort } from '@/api/liswork/xtwh/ComOpt';
|
||||
|
||||
|
||||
const props = defineProps({
|
||||
dataList: {
|
||||
type: Array,
|
||||
default: []
|
||||
}
|
||||
});
|
||||
|
||||
const yq = defineModel<string>()
|
||||
interface DataItem {
|
||||
xmid: string | number;
|
||||
xmmc: string | number;
|
||||
sort: string | number;
|
||||
dyxh: string | number;
|
||||
}
|
||||
const currentIndex = ref(0);
|
||||
const radio = ref('1');
|
||||
const selectedRow = ref<DataItem | null>(null)
|
||||
const tableRef = ref();
|
||||
const dataList = ref<DataItem[]>([]);
|
||||
const columns = ref([
|
||||
{ prop: 'xmid', label: '项目ID', visible: true, align: 'center', },
|
||||
{ prop: 'xmmc', label: '项目名称', visible: true, align: 'center', },
|
||||
{ prop: 'sort', label: '整体排序', visible: true, align: 'center', slot: "sort" },
|
||||
{ prop: 'xmid', label: '项目ID', visible: true, align: 'center' },
|
||||
{ prop: 'xmmc', label: '项目名称', visible: true, align: 'center' },
|
||||
{ prop: 'dyxh', label: '排序', visible: true, align: 'center', },
|
||||
]);
|
||||
const tableConfig = ref({
|
||||
border: true, // 边框
|
||||
@ -78,19 +55,26 @@ const tableConfig = ref({
|
||||
|
||||
|
||||
//退拽属性
|
||||
const handleColumnDragEnd = (data: any) => {
|
||||
// 更新列配置
|
||||
dataList.value = data.list;
|
||||
const handleRowDragEnd = (data: any) => {
|
||||
// 更新行顺序
|
||||
dataList.value = data.list.map((item: any) => {
|
||||
return {
|
||||
...item,
|
||||
dyxh: item.sort,
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const handleRowClick = (row: DataItem) => {
|
||||
currentIndex.value = dataList.value.indexOf(row);
|
||||
selectedRow.value = row
|
||||
}
|
||||
|
||||
|
||||
|
||||
const getList = () => {
|
||||
|
||||
getitemsort({ yq: yq.value }).then((res: any) => {
|
||||
dataList.value = res.data;
|
||||
})
|
||||
}
|
||||
|
||||
const refresh = () => {
|
||||
@ -98,56 +82,59 @@ const refresh = () => {
|
||||
}
|
||||
|
||||
const cpHandle = () => {
|
||||
|
||||
saveitemsort(dataList.value).then(() => {
|
||||
getList();
|
||||
})
|
||||
}
|
||||
const firstHandle = () => {
|
||||
currentIndex.value = 0;
|
||||
tableRef.value.setCurrentRow(dataList.value[0]);
|
||||
if (!selectedRow.value) return
|
||||
const currentIndex = dataList.value.findIndex(item => item.xmid === selectedRow.value!.xmid)
|
||||
if (currentIndex === 0) return
|
||||
const [movedRow] = dataList.value.splice(currentIndex, 1)
|
||||
dataList.value.unshift(movedRow)
|
||||
resetSortNumber()
|
||||
tableRef.value.setScrollTop(0)
|
||||
}
|
||||
|
||||
const lastHadnle = () => {
|
||||
currentIndex.value = dataList.value.length - 1;
|
||||
tableRef.value.setCurrentRow(dataList.value[currentIndex.value]);
|
||||
if (!selectedRow.value) return
|
||||
const currentIndex = dataList.value.findIndex(item => item.xmid === selectedRow.value!.xmid)
|
||||
if (currentIndex === dataList.value.length - 1) return
|
||||
const [movedRow] = dataList.value.splice(currentIndex, 1)
|
||||
dataList.value.push(movedRow)
|
||||
resetSortNumber()
|
||||
tableRef.value.setScrollTop(dataList.value.length)
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
for (let index = 0; index < 20; index++) {
|
||||
dataList.value.push(
|
||||
{ xmid: 'ID' + index, xmmc: 'xmmc' + index, sort: '', }
|
||||
)
|
||||
}
|
||||
})
|
||||
const resetSortNumber = () => {
|
||||
dataList.value.forEach((item, index) => {
|
||||
item.dyxh = index + 1
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
watch(yq, (newVal) => {
|
||||
getList();
|
||||
}, { immediate: true })
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.sort_box {
|
||||
height: calc(100% - 58px);
|
||||
padding-top: 8px;
|
||||
height: calc(100% - 56px);
|
||||
}
|
||||
|
||||
.table-toolbar {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
.el-col {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.el-button {
|
||||
width: 80%;
|
||||
margin-top: 20px;
|
||||
}
|
||||
margin-bottom: 8px;
|
||||
height: 36px;
|
||||
line-height: 36px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.table-row {
|
||||
height: 100%;
|
||||
flex: 3;
|
||||
width: 50%;
|
||||
height: calc(100% - 45px);
|
||||
|
||||
|
||||
.table-box {
|
||||
height: 100%;
|
||||
|
||||
@ -112,7 +112,7 @@ const tabList = [
|
||||
{ key: 'SysSort', label: '项目排序', component: SysSort },
|
||||
{ key: 'SysReport', label: '报告单设置', component: SysReport },
|
||||
]
|
||||
const activeName = ref('SysSort')
|
||||
const activeName = ref('SysGlobal')
|
||||
|
||||
// 计算当前要渲染的组件
|
||||
const currentComponent = computed(() => {
|
||||
|
||||
@ -1,48 +1,23 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch">
|
||||
<el-form-item :label="menuname + '类别'" prop="configType">
|
||||
<el-select
|
||||
v-model="queryParams.configType"
|
||||
:placeholder="`请选择${menuname}类别`"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@change="handleQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in configTypeOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
<el-form-item :label="menuname + '类别'" prop="configType">
|
||||
<el-select v-model="queryParams.configType" :placeholder="`请选择${menuname}类别`" clearable style="width: 200px"
|
||||
@change="handleQuery">
|
||||
<el-option v-for="item in configTypeOptions" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="menuname + '编码'" prop="configCode">
|
||||
<el-input
|
||||
v-model="queryParams.configCode"
|
||||
:placeholder="`请输入${menuname}编码`"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
<el-form-item :label="menuname + '编码'" prop="configCode">
|
||||
<el-input v-model="queryParams.configCode" :placeholder="`请输入${menuname}编码`" clearable style="width: 200px"
|
||||
@keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="`${menuname}名称`" prop="configName">
|
||||
<el-input
|
||||
v-model="queryParams.configName"
|
||||
:placeholder="`请输入${menuname}名称`"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
<el-input v-model="queryParams.configName" :placeholder="`请输入${menuname}名称`" clearable style="width: 200px"
|
||||
@keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="状态" clearable style="width: 200px">
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
<el-option v-for="dict in sys_normal_disable" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
@ -53,111 +28,81 @@
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Plus"
|
||||
@click="handleAdd"
|
||||
>新增</el-button>
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="Edit"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
>修改</el-button>
|
||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate">修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="Delete"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
>删除</el-button>
|
||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete">删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="Download"
|
||||
@click="handleExport"
|
||||
>导出</el-button>
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
<el-row :gutter="5" class="table-container">
|
||||
<el-table v-loading="loading" :data="regdictList" @selection-change="handleSelectionChange" class="config-table" height="100%">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column :label="`${menuname}编号`" align="center" prop="configId" v-if="false"/>
|
||||
<el-table-column :label="`${menuname}类别`" align="center" prop="configType" width="100" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<span
|
||||
class="config-type-cell"
|
||||
:style="{
|
||||
<div class="table-container">
|
||||
<el-table v-loading="loading" :data="regdictList" @selection-change="handleSelectionChange" class="config-table"
|
||||
height="100%">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column :label="`${menuname}编号`" align="center" prop="configId" v-if="false" />
|
||||
<el-table-column :label="`${menuname}类别`" align="center" prop="configType" width="100" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<span class="config-type-cell" :style="{
|
||||
backgroundColor: getConfigTypeColor(scope.row.configType),
|
||||
color: '#fff' // 文字白色,保证对比
|
||||
}"
|
||||
>
|
||||
{{ configTypeOptions.find(item => item.value === scope.row.configType)?.label || scope.row.configType }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="`${menuname}编码`" align="center" prop="configCode" width="150" show-overflow-tooltip />
|
||||
<el-table-column :label="`${menuname}名称`" align="left" prop="configName" show-overflow-tooltip />
|
||||
<el-table-column label="选项类型" align="center" prop="configOptiontype"width="100">
|
||||
<template #default="scope">
|
||||
<span
|
||||
class="config-type-cell"
|
||||
:style="{
|
||||
}">
|
||||
{{configTypeOptions.find(item => item.value === scope.row.configType)?.label || scope.row.configType}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="`${menuname}编码`" align="center" prop="configCode" width="150" show-overflow-tooltip />
|
||||
<el-table-column :label="`${menuname}名称`" align="left" prop="configName" show-overflow-tooltip />
|
||||
<el-table-column label="选项类型" align="center" prop="configOptiontype" width="100">
|
||||
<template #default="scope">
|
||||
<span class="config-type-cell" :style="{
|
||||
backgroundColor: getconfigOptionTypeColor(scope.row.configOptiontype),
|
||||
color: '#fff' // 文字白色,保证对比
|
||||
}"
|
||||
>
|
||||
{{ configOptiontypeOptions.find(item => item.value === scope.row.configOptiontype)?.label || scope.row.configOptiontype }}
|
||||
</span>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column label="默认值" align="center" prop="configDefvalue" show-overflow-tooltip />
|
||||
<el-table-column label="值域规则" align="left" prop="remark" show-overflow-tooltip />
|
||||
<el-table-column label="排序" align="center" prop="configSort" width="80" />
|
||||
<el-table-column label="状态" align="center" prop="status" width="80">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="sys_normal_disable" :value="scope.row.status" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="150" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="180" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" >修改</el-button>
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" >删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
}">
|
||||
{{configOptiontypeOptions.find(item => item.value === scope.row.configOptiontype)?.label ||
|
||||
scope.row.configOptiontype}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="默认值" align="center" prop="configDefvalue" width="200" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<DynamicInput :type="scope.row.configOptiontype" v-model="scope.row.configDefvalue"
|
||||
:dict-data="scope.row.remark" :placeholder="`请输入${scope.row.configName}值`" class="edit-input" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="值域规则" align="left" prop="remark" show-overflow-tooltip />
|
||||
<el-table-column label="排序" align="center" prop="configSort" width="80" />
|
||||
<el-table-column label="状态" align="center" prop="status" width="80">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="sys_normal_disable" :value="scope.row.status" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="150" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="180" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)">修改</el-button>
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
<!-- 添加或修改字典对话框 -->
|
||||
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
|
||||
|
||||
<el-dialog :title="title" v-model="open" width="500px">
|
||||
<el-form ref="configdictRef" :model="form" :rules="rules" label-width="150px">
|
||||
<el-form-item :label="`${menuname}类别`" prop="configType">
|
||||
<el-select
|
||||
v-model="form.configType"
|
||||
:placeholder="`请选择${menuname}类别`"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in configTypeOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
<el-select v-model="form.configType" :placeholder="`请选择${menuname}类别`" style="width: 100%">
|
||||
<el-option v-for="item in configTypeOptions" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="`${menuname}编码`" prop="configCode">
|
||||
@ -167,17 +112,9 @@
|
||||
<el-input v-model="form.configName" :placeholder="`请输入${menuname}名称`" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="`${menuname}选项类型`" prop="configOptiontype">
|
||||
<el-select
|
||||
v-model="form.configOptiontype"
|
||||
:placeholder="`请选择${menuname}选项类型`"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in configOptiontypeOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
<el-select v-model="form.configOptiontype" :placeholder="`请选择${menuname}选项类型`" style="width: 100%">
|
||||
<el-option v-for="item in configOptiontypeOptions" :key="item.value" :label="item.label"
|
||||
:value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="`${menuname}默认值`" prop="configDefvalue">
|
||||
@ -189,11 +126,8 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio
|
||||
v-for="dict in sys_normal_disable"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{ dict.label }}</el-radio>
|
||||
<el-radio v-for="dict in sys_normal_disable" :key="dict.value" :label="dict.value">{{ dict.label
|
||||
}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="值域参数JSON" prop="remark">
|
||||
@ -217,13 +151,14 @@ import {
|
||||
listconfigdict,
|
||||
updateconfigdict
|
||||
} from "@/api/liswork/xtwh/configdictApi.ts";
|
||||
import DynamicInput from "@/views/liswork/xtwh/localconfig/components/DynamicInput.vue"
|
||||
// 1. 定义类别下拉选项(根据实际业务调整)
|
||||
const configTypeOptions = ref([
|
||||
{ label: "仪器全局设置", value: "SYSTEM",color: "#E6A23C" },
|
||||
{ label: "仪器全局设置", value: "SYSTEM", color: "#E6A23C" },
|
||||
{ label: "仪器界面设置", value: "INPUT", color: "#67C23A" },
|
||||
{ label: "本地选项设置", value: "LOCAL" , color: "#409EFF" },
|
||||
{ label: "本院特殊设置", value: "HISOPT", color: "#909399" },
|
||||
{ label: "门诊采血设置", value: "_MZCX_", color: "#C74127" }
|
||||
{ label: "本地选项设置", value: "LOCAL", color: "#409EFF" },
|
||||
{ label: "本院特殊设置", value: "HISOPT", color: "#909399" },
|
||||
{ label: "门诊采血设置", value: "_MZCX_", color: "#C74127" }
|
||||
]);
|
||||
// 2. 定义获取类别对应颜色的方法
|
||||
function getConfigTypeColor(type) {
|
||||
@ -233,15 +168,15 @@ function getConfigTypeColor(type) {
|
||||
}
|
||||
// 2. 定义参数类别下拉选项(根据实际业务调整)
|
||||
const configOptiontypeOptions = ref([
|
||||
{ label: "单选框", value: "0",color: "#56BBBD" },
|
||||
{ label: "下拉框", value: "1",color: "#67C23A" },
|
||||
{ label: "字典单选", value: "2",color: "#FF443F" },
|
||||
{ label: "字典多选", value: "3",color: "#F08784" },
|
||||
{ label: "特殊", value: "4",color: "#909399" },
|
||||
{ label: "文本框", value: "5",color: "#3282F6" },
|
||||
{ label: "数字框", value: "6",color: "#507F80" },
|
||||
{ label: "日期框", value: "7",color: "#7E84F7" },
|
||||
{ label: "时间框", value: "8",color: "#377D22" },
|
||||
{ label: "单选框", value: "0", color: "#56BBBD" },
|
||||
{ label: "下拉框", value: "1", color: "#67C23A" },
|
||||
{ label: "字典单选", value: "2", color: "#FF443F" },
|
||||
{ label: "字典多选", value: "3", color: "#F08784" },
|
||||
{ label: "特殊", value: "4", color: "#909399" },
|
||||
{ label: "文本框", value: "5", color: "#3282F6" },
|
||||
{ label: "数字框", value: "6", color: "#507F80" },
|
||||
{ label: "日期框", value: "7", color: "#7E84F7" },
|
||||
{ label: "时间框", value: "8", color: "#377D22" },
|
||||
]);
|
||||
function getconfigOptionTypeColor(type) {
|
||||
// 匹配对应类别的颜色,无匹配时用默认色
|
||||
@ -265,26 +200,26 @@ const data = reactive({
|
||||
queryParams: {
|
||||
configCode: undefined,
|
||||
configName: undefined,
|
||||
configType:undefined,
|
||||
status: undefined
|
||||
configType: undefined,
|
||||
status: undefined,
|
||||
pageNum: 1,
|
||||
pageSize: 30
|
||||
},
|
||||
rules: {
|
||||
configType: [{ required: true, message: menuname.value+"类别不能为空", trigger: "blur" }],
|
||||
configName: [{ required: true, message: menuname.value+"名称不能为空", trigger: "blur" }],
|
||||
configCode: [{ required: true, message: menuname.value+"编码不能为空", trigger: "blur" }],
|
||||
configSort: [{ required: true, message: menuname.value+"顺序不能为空", trigger: "blur" }],
|
||||
configType: [{ required: true, message: menuname.value + "类别不能为空", trigger: "blur" }],
|
||||
configName: [{ required: true, message: menuname.value + "名称不能为空", trigger: "blur" }],
|
||||
configCode: [{ required: true, message: menuname.value + "编码不能为空", trigger: "blur" }],
|
||||
configSort: [{ required: true, message: menuname.value + "顺序不能为空", trigger: "blur" }],
|
||||
}
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 查询字典列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
listconfigdict(queryParams.value).then(response => {
|
||||
console.log('response:', response);
|
||||
regdictList.value = response.data;
|
||||
total.value = response.data.length;
|
||||
regdictList.value = response.rows;
|
||||
total.value = response.total;
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
@ -301,7 +236,7 @@ function reset() {
|
||||
configName: undefined,
|
||||
configType: configTypeOptions.value[0]?.value || "",
|
||||
configOptiontype: configOptiontypeOptions.value[0]?.value || "",
|
||||
configDefvalue:undefined,
|
||||
configDefvalue: undefined,
|
||||
configSort: 0,
|
||||
status: "0",
|
||||
remark: undefined
|
||||
@ -328,7 +263,7 @@ function handleSelectionChange(selection) {
|
||||
function handleAdd() {
|
||||
reset();
|
||||
open.value = true;
|
||||
title.value = "添加"+menuname.value;
|
||||
title.value = "添加" + menuname.value;
|
||||
}
|
||||
/** 修改按钮操作 */
|
||||
function handleUpdate(row) {
|
||||
@ -337,25 +272,28 @@ function handleUpdate(row) {
|
||||
getconfigdict(configId).then(response => {
|
||||
form.value = response.data;
|
||||
open.value = true;
|
||||
title.value = "修改"+menuname.value;
|
||||
title.value = "修改" + menuname.value;
|
||||
});
|
||||
}
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
proxy.$refs["configdictRef"].validate(valid => {
|
||||
if (valid) {
|
||||
|
||||
if (form.value.configId != undefined) {
|
||||
updateconfigdict(form.value).then(response => {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
if (response.code == 0) {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
addconfigdict(form.value).then(response => {
|
||||
proxy.$modal.msgSuccess("新增成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
if (response.code == 0) {
|
||||
proxy.$modal.msgSuccess("新增成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -364,13 +302,12 @@ function submitForm() {
|
||||
/** 删除按钮操作 */
|
||||
function handleDelete(row) {
|
||||
const configIds = row.configId || ids.value;
|
||||
proxy.$modal.confirm('是否确认删除"' + menuname.value + '"编号为"' + configIds + '"的数据项?').then(function() {
|
||||
|
||||
proxy.$modal.confirm('是否确认删除"' + menuname.value + '"编号为"' + configIds + '"的数据项?').then(function () {
|
||||
return delconfigdict(configIds);
|
||||
}).then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
}).catch(() => { });
|
||||
}
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
@ -381,42 +318,40 @@ function handleExport() {
|
||||
getList();
|
||||
</script>
|
||||
<style scoped>
|
||||
.app-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 90vh;
|
||||
/* 容器高度等于窗口高度 */
|
||||
overflow: hidden;
|
||||
}
|
||||
.mb8 {
|
||||
height: 30px;
|
||||
/* 固定高度 */
|
||||
}
|
||||
|
||||
.table-container {
|
||||
flex: 1;
|
||||
/* 占满剩余高度 */
|
||||
overflow: hidden;
|
||||
/* 避免表格超出容器 */
|
||||
height: calc(100% - 150px);
|
||||
}
|
||||
|
||||
/* 1. 减小表格行高(核心) */
|
||||
:deep(.config-table .el-table__row) {
|
||||
height: 30px !important; /* 原默认行高约40px,按需调整(建议28-35px) */
|
||||
line-height: 30px !important; /* 行高与height一致,保证垂直居中 */
|
||||
height: 30px !important;
|
||||
/* 原默认行高约40px,按需调整(建议28-35px) */
|
||||
line-height: 30px !important;
|
||||
/* 行高与height一致,保证垂直居中 */
|
||||
}
|
||||
|
||||
/* 2. 减小单元格内边距(配合行高优化) */
|
||||
:deep(.config-table .el-table__cell) {
|
||||
padding: 2px 4px !important;
|
||||
height: 30px !important; /* 单元格高度与行高一致 */
|
||||
line-height: 1.2 !important; /* 文字行高适配矮行 */
|
||||
vertical-align: middle !important; /* 强制垂直居中 */
|
||||
height: 30px !important;
|
||||
/* 单元格高度与行高一致 */
|
||||
line-height: 1.2 !important;
|
||||
/* 文字行高适配矮行 */
|
||||
vertical-align: middle !important;
|
||||
/* 强制垂直居中 */
|
||||
}
|
||||
|
||||
/* 3. 类别单元格适配矮行高 */
|
||||
.config-type-cell {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
min-height: 26px; /* 适配30px行高,略小一点 */
|
||||
min-height: 26px;
|
||||
/* 适配30px行高,略小一点 */
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
@ -1,135 +1,54 @@
|
||||
<template>
|
||||
<div class="dynamic-input-container">
|
||||
<!-- 1. 开关组件(替代原单选框 type=0:是/否 → 开启/关闭) -->
|
||||
<el-switch
|
||||
class="custom-switch"
|
||||
v-if="type === '0'"
|
||||
v-model="innerValue"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
active-value="1"
|
||||
inactive-value="0"
|
||||
@change="handleSwitchChange"
|
||||
/>
|
||||
<el-switch class="custom-switch" v-if="type === '0'" v-model="innerValue" active-color="#13ce66"
|
||||
inactive-color="#ff4949" active-value="1" inactive-value="0" @change="handleSwitchChange" />
|
||||
|
||||
<!-- 2. 下拉框(1):直接绑定value -->
|
||||
<el-select
|
||||
v-else-if="type === '1'"
|
||||
v-model="innerValue"
|
||||
size="small"
|
||||
clearable
|
||||
@change="handleValueChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dictOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
<el-select v-else-if="type === '1'" v-model="innerValue" size="small" clearable @change="handleValueChange">
|
||||
<el-option v-for="item in dictOptions" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
|
||||
<!-- 3. 字典单选(2):绑定zddh(value),显示zdmc(label) -->
|
||||
<el-select
|
||||
v-else-if="type === '2'"
|
||||
v-model="innerValue"
|
||||
size="small"
|
||||
clearable
|
||||
@change="handleValueChange"
|
||||
v-loading="dictLoading"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dictOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
<el-select v-else-if="type === '2'" v-model="innerValue" size="small" clearable @change="handleValueChange"
|
||||
v-loading="dictLoading">
|
||||
<el-option v-for="item in dictOptions" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
|
||||
<!-- 4. 字典多选(3):数组↔逗号分隔字符串 → 修复核心:仅绑定multipleValue,移除冗余逻辑 -->
|
||||
<el-select
|
||||
v-else-if="type === '3'"
|
||||
v-model="multipleValue"
|
||||
size="small"
|
||||
multiple
|
||||
@change="handleMultipleChange"
|
||||
v-loading="dictLoading"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dictOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
<el-select v-else-if="type === '3'" v-model="multipleValue" size="small" multiple @change="handleMultipleChange"
|
||||
v-loading="dictLoading" clearable>
|
||||
<el-option v-for="item in dictOptions" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
|
||||
<!-- 5. 特殊(4) -->
|
||||
<el-input
|
||||
v-else-if="type === '4'"
|
||||
v-model="innerValue"
|
||||
size="small"
|
||||
disabled
|
||||
@change="handleValueChange"
|
||||
/>
|
||||
<el-input v-else-if="type === '4'" v-model="innerValue" size="small" disabled @change="handleValueChange" />
|
||||
|
||||
<!-- 6. 文本框(5) -->
|
||||
<el-input
|
||||
v-else-if="type === '5'"
|
||||
v-model="innerValue"
|
||||
size="small"
|
||||
:placeholder="placeholder"
|
||||
@change="handleValueChange"
|
||||
/>
|
||||
<el-input v-else-if="type === '5'" v-model="innerValue" size="small" :placeholder="placeholder"
|
||||
@change="handleValueChange" />
|
||||
|
||||
<!-- 7. 数字框(6):支持dictData定义小数位数,空值初始化 -->
|
||||
<el-input-number
|
||||
v-else-if="type === '6'"
|
||||
v-model="innerValue"
|
||||
size="small"
|
||||
:min="minNum"
|
||||
:precision="finalPrecision"
|
||||
controls-position="right"
|
||||
@change="handleValueChange"
|
||||
:placeholder="placeholder || '请输入数字'"
|
||||
/>
|
||||
<el-input-number v-else-if="type === '6'" v-model="innerValue" size="small" :min="minNum"
|
||||
:precision="finalPrecision" controls-position="right" @change="handleValueChange"
|
||||
:placeholder="placeholder || '请输入数字'" />
|
||||
|
||||
<!-- 8. 日期框(7):适配yyyy/mm/dd -->
|
||||
<el-date-picker
|
||||
v-else-if="type === '7'"
|
||||
v-model="innerValue"
|
||||
size="small"
|
||||
type="date"
|
||||
format="YYYY/MM/DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
:placeholder="placeholder"
|
||||
@change="handleValueChange"
|
||||
/>
|
||||
<el-date-picker v-else-if="type === '7'" v-model="innerValue" size="small" type="date" format="YYYY/MM/DD"
|
||||
value-format="YYYY-MM-DD" :placeholder="placeholder" @change="handleValueChange" />
|
||||
|
||||
<!-- 9. 时间框(8):适配hh:mm(修复标签闭合问题) -->
|
||||
<el-time-picker
|
||||
v-else-if="type === '8'"
|
||||
v-model="innerValue"
|
||||
size="small"
|
||||
format="HH:mm"
|
||||
value-format="HH:mm:ss"
|
||||
:placeholder="placeholder"
|
||||
@change="handleValueChange"
|
||||
:picker-options="{ selectableRange: '00:00:00 - 23:59:59' }"
|
||||
/>
|
||||
<el-time-picker v-else-if="type === '8'" v-model="innerValue" size="small" format="HH:mm" value-format="HH:mm:ss"
|
||||
:placeholder="placeholder" @change="handleValueChange"
|
||||
:picker-options="{ selectableRange: '00:00:00 - 23:59:59' }" />
|
||||
|
||||
<!-- 兜底:默认文本框 -->
|
||||
<el-input
|
||||
v-else
|
||||
v-model="innerValue"
|
||||
size="small"
|
||||
:placeholder="placeholder"
|
||||
@change="handleValueChange"
|
||||
/>
|
||||
<el-input v-else v-model="innerValue" size="small" :placeholder="placeholder" @change="handleValueChange" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="DynamicInput">
|
||||
import { ref, watch, defineProps, defineEmits, onMounted, computed } from "vue";
|
||||
//import { ref, watch, defineProps, defineEmits, onMounted, computed } from "vue";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { getoptionselect } from "@/api/liswork/xtwh/localconfigApi.ts";
|
||||
|
||||
@ -177,18 +96,18 @@ const finalPrecision = computed(() => {
|
||||
watch(() => props.modelValue, (newVal) => {
|
||||
const val = newVal; // 移除兜底空值,保留原始值
|
||||
switch (props.type) {
|
||||
// 开关组件(替代原单选框):后端1/0 → 前端"1"/"0"
|
||||
// 开关组件(替代原单选框):后端1/0 → 前端"1"/"0"
|
||||
case "0":
|
||||
innerValue.value = (val === 1 || val === "1" || val === true) ? "1" : "0";
|
||||
break;
|
||||
|
||||
// 下拉框/字典单选:直接绑定value(zddh)
|
||||
// 下拉框/字典单选:直接绑定value(zddh)
|
||||
case "1":
|
||||
case "2":
|
||||
innerValue.value = val === null || val === undefined ? "" : String(val);
|
||||
break;
|
||||
|
||||
// 字典多选:核心修复 → 严格过滤空值/无效值,杜绝默认0
|
||||
// 字典多选:核心修复 → 严格过滤空值/无效值,杜绝默认0
|
||||
case "3":
|
||||
// 1. 空值/0/空字符串 → 空数组
|
||||
if (val === null || val === undefined || val === "" || val === 0) {
|
||||
@ -209,7 +128,7 @@ watch(() => props.modelValue, (newVal) => {
|
||||
// 移除innerValue同步(避免干扰多选)
|
||||
break;
|
||||
|
||||
// 数字框:空值处理,支持小数位数
|
||||
// 数字框:空值处理,支持小数位数
|
||||
case "6":
|
||||
// 空值/非数字 → 空(null),否则转为数字
|
||||
if (val === null || val === undefined || val === "" || isNaN(Number(val))) {
|
||||
@ -219,21 +138,21 @@ watch(() => props.modelValue, (newVal) => {
|
||||
}
|
||||
break;
|
||||
|
||||
// 日期框:后端 yyyy/mm/dd → 前端 yyyy-MM-dd
|
||||
// 日期框:后端 yyyy/mm/dd → 前端 yyyy-MM-dd
|
||||
case "7":
|
||||
innerValue.value = typeof val === "string" && val.includes("/")
|
||||
? val.replace(/\//g, "-")
|
||||
: val || null;
|
||||
? val.replace(/\//g, "-")
|
||||
: val || null;
|
||||
break;
|
||||
|
||||
// 时间框:后端 hh:mm → 前端 hh:mm:ss
|
||||
// 时间框:后端 hh:mm → 前端 hh:mm:ss
|
||||
case "8":
|
||||
innerValue.value = typeof val === "string" && val.includes(":") && val.split(":").length === 2
|
||||
? `${val}:00`
|
||||
: val || null;
|
||||
? `${val}:00`
|
||||
: val || null;
|
||||
break;
|
||||
|
||||
// 其他类型:保留原始值(空值则为null)
|
||||
// 其他类型:保留原始值(空值则为null)
|
||||
default:
|
||||
innerValue.value = val === null || val === undefined ? "" : val;
|
||||
break;
|
||||
@ -380,16 +299,21 @@ onMounted(() => {
|
||||
<style scoped>
|
||||
.dynamic-input-container {
|
||||
width: 100%;
|
||||
height: 100%; /* 关键:占满表格单元格高度 */
|
||||
height: 100%;
|
||||
/* 关键:占满表格单元格高度 */
|
||||
display: flex;
|
||||
align-items: center; /* 垂直居中 */
|
||||
justify-content: center; /* 水平居中 */
|
||||
padding: 0 2px; /* 轻微内边距,避免贴边 */
|
||||
align-items: center;
|
||||
/* 垂直居中 */
|
||||
justify-content: center;
|
||||
/* 水平居中 */
|
||||
padding: 0 2px;
|
||||
/* 轻微内边距,避免贴边 */
|
||||
}
|
||||
|
||||
/* 开关组件样式优化 */
|
||||
:deep(.el-switch) {
|
||||
margin: 0 auto; /* 开关水平居中 */
|
||||
margin: 0 auto;
|
||||
/* 开关水平居中 */
|
||||
}
|
||||
|
||||
/* 深度选择器强制覆盖激活颜色 */
|
||||
@ -436,6 +360,7 @@ onMounted(() => {
|
||||
/* 多选下拉样式优化:避免高度溢出 */
|
||||
:deep(.el-select--multiple .el-select__tags) {
|
||||
flex-wrap: wrap;
|
||||
min-height: 32px; /* 匹配small尺寸高度 */
|
||||
min-height: 32px;
|
||||
/* 匹配small尺寸高度 */
|
||||
}
|
||||
</style>
|
||||
@ -1,16 +1,18 @@
|
||||
<template>
|
||||
<!-- 报告项目维护 -->
|
||||
<el-form ref="form" :model="formData" label-width="80px">
|
||||
<el-form-item label="项目代号" prop="xmdh">
|
||||
<el-input placeholder="项目代号" v-model="formData.xmdh"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目名称" prop="xmmc">
|
||||
<el-input placeholder="项目名称" v-model="formData.xmmc"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="app-container">
|
||||
<!-- 报告项目维护 -->
|
||||
<el-form ref="form" :model="formData" label-width="80px">
|
||||
<el-form-item label="项目代号" prop="xmdh">
|
||||
<el-input placeholder="项目代号" v-model="formData.xmdh"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目名称" prop="xmmc">
|
||||
<el-input placeholder="项目名称" v-model="formData.xmmc"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<CustomTable ref="tableRef" :data="dataList" :columns="columns" :enable-column-drag="true" @column-drag-end="handleColumnDragEnd"
|
||||
:config="tableConfig"/>
|
||||
<CustomTable ref="tableRef" :data="dataList" :columns="columns" :enable-column-drag="true"
|
||||
@column-drag-end="handleColumnDragEnd" :config="tableConfig" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
@ -40,5 +42,4 @@ const handleColumnDragEnd = (data: any) => {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
</style>
|
||||
<style scoped lang="scss"></style>
|
||||
|
||||
@ -1,493 +1,11 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch">
|
||||
<el-form-item :label="menuname + '类别'" prop="reportType">
|
||||
<el-select
|
||||
v-model="queryParams.reportType"
|
||||
:placeholder="`请选择${menuname}类别`"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@change="handleQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in reportTypeOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="模板文件名(.jrxml)" prop="reportCode">
|
||||
<el-input
|
||||
v-model="queryParams.reportCode"
|
||||
:placeholder="`请输入${menuname}编码`"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="`${menuname}名称`" prop="reportName">
|
||||
<el-input
|
||||
v-model="queryParams.reportName"
|
||||
:placeholder="`请输入${menuname}名称`"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="状态" clearable style="width: 200px">
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Plus"
|
||||
@click="handleAdd"
|
||||
>新增模板</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="Delete"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
>删除模板</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="Download"
|
||||
@click="autoloading"
|
||||
>自动加载</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
<el-row :gutter="5" class="table-container">
|
||||
<el-table v-loading="loading" :data="regdictList" @selection-change="handleSelectionChange" class="report-table" height="100%">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column :label="`${menuname}类别`" align="center" prop="reportType" width="100" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<span
|
||||
class="report-type-cell"
|
||||
:style="{
|
||||
backgroundColor: getreportTypeColor(scope.row.reportType),
|
||||
color: '#fff' // 文字白色,保证对比
|
||||
}"
|
||||
>
|
||||
{{ reportTypeOptions.find(item => item.value === scope.row.reportType)?.label || scope.row.reportType }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="编号" align="center" prop="reportId" width="50" show-overflow-tooltip/>
|
||||
<el-table-column label="模板文件名" align="center" prop="reportCode" width="150" show-overflow-tooltip />
|
||||
<el-table-column :label="`${menuname}名称`" align="left" prop="reportName" show-overflow-tooltip />
|
||||
<el-table-column label="排版类别" align="center" prop="reportOptiontype"width="80">
|
||||
<template #default="scope">
|
||||
<span>
|
||||
{{ reportOptiontypeOptions.find(item => item.value === scope.row.reportOptiontype)?.label || scope.row.reportOptiontype }}
|
||||
</span>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column label="参数" align="center" prop="reportDefvalue" show-overflow-tooltip />
|
||||
<el-table-column label="备注" align="left" prop="remark" show-overflow-tooltip />
|
||||
<el-table-column label="排序" align="center" prop="reportSort" width="80" />
|
||||
<el-table-column label="状态" align="center" prop="status" width="80">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="sys_normal_disable" :value="scope.row.status" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="150" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="400" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" >修改</el-button>
|
||||
<el-button link type="primary" icon="Link" @click="handleDelete(scope.row)" >预览模板</el-button>
|
||||
<el-button link type="primary" icon="Upload" @click="uploadfile(scope.row)" >更替模板</el-button>
|
||||
<el-button link type="primary" icon="Download" @click="downloadfile(scope.row)" >下载模板</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
<!-- 添加或修改模板对话框 -->
|
||||
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
|
||||
|
||||
<el-form ref="reportdictRef" :model="form" :rules="rules" label-width="150px">
|
||||
<el-form-item :label="`${menuname}类别`" prop="reportType">
|
||||
<el-select
|
||||
v-model="form.reportType"
|
||||
:placeholder="`请选择${menuname}类别`"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in reportTypeOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="模板文件名(.jrxml)" prop="reportCode">
|
||||
<el-input v-model="form.reportCode" :placeholder="`请输入${menuname}编码`" disabled class="disabled-input-gray"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="`${menuname}名称`" prop="reportName">
|
||||
<el-input v-model="form.reportName" :placeholder="`请输入${menuname}名称`" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="`${menuname}排版类别`" prop="reportOptiontype">
|
||||
<el-select
|
||||
v-model="form.reportOptiontype"
|
||||
:placeholder="`请选择${menuname}排版类别`"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in reportOptiontypeOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="`${menuname}参数`" prop="reportDefvalue">
|
||||
<el-input v-model="form.reportDefvalue" :placeholder="`请输入${menuname}参数`" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="顺序" prop="reportSort">
|
||||
<el-input-number v-model="form.reportSort" controls-position="right" :min="0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio
|
||||
v-for="dict in sys_normal_disable"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{ dict.label }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<!-- 用户导入对话框 -->
|
||||
<el-dialog :title="upload.title" v-model="upload.open" width="400px" append-to-body>
|
||||
<el-upload ref="uploadRef" :limit="1" accept=".jrxml" :headers="upload.headers"
|
||||
:action="upload.url + '?reportId=' + upload.reportId" :disabled="upload.isUploading"
|
||||
:on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag>
|
||||
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
|
||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||
<template #tip>
|
||||
<div class="el-upload__tip text-center">
|
||||
<span>仅允许导入jrxml格式文件。</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-upload>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submitFileForm">确 定</el-button>
|
||||
<el-button @click="upload.open = false">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<div>
|
||||
reportdict
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="reportdict">
|
||||
import { getToken } from "@/utils/auth";
|
||||
import {
|
||||
addreportdict, delreportdict,
|
||||
getreportdict,
|
||||
listreportdict,
|
||||
updatereportdict,autoload
|
||||
} from "@/api/liswork/xtwh/reportdictApi.ts";
|
||||
// 1. 定义类别下拉选项(根据实际业务调整)
|
||||
const reportTypeOptions = ref([
|
||||
{ label: "检验报告", value: "0",color: "#56BBBD" },
|
||||
{ label: "条码标签", value: "1",color: "#67C23A" },
|
||||
{ label: "回单标签", value: "2",color: "#7E84F7" },
|
||||
{ label: "统计报表", value: "3",color: "#F08784" },
|
||||
{ label: "其他报表", value: "4",color: "#909399" },
|
||||
]);
|
||||
// 2. 定义获取类别对应颜色的方法
|
||||
function getreportTypeColor(type) {
|
||||
// 匹配对应类别的颜色,无匹配时用默认色
|
||||
const item = reportTypeOptions.value.find(item => item.value === type);
|
||||
return item?.color || "#909399"; // 默认灰色
|
||||
}
|
||||
// 2. 定义参数类别下拉选项(根据实际业务调整)
|
||||
const reportOptiontypeOptions = ref([
|
||||
{ label: "默认", value: "0",color: "#56BBBD" },
|
||||
{ label: "单列", value: "1",color: "#67C23A" },
|
||||
{ label: "双列", value: "2",color: "#FF443F" },
|
||||
{ label: "单列带图", value: "3",color: "#F08784" },
|
||||
{ label: "双列带图", value: "4",color: "#909399" },
|
||||
{ label: "细菌阳性", value: "5",color: "#3282F6" },
|
||||
{ label: "细菌阴性", value: "6",color: "#507F80" },
|
||||
{ label: "标签", value: "7",color: "#7E84F7" },
|
||||
{ label: "回单", value: "8",color: "#377D22" },
|
||||
]);
|
||||
function getreportOptionTypeColor(type) {
|
||||
// 匹配对应类别的颜色,无匹配时用默认色
|
||||
const item = reportOptiontypeOptions.value.find(item => item.value === type);
|
||||
return item?.color || "#909399"; // 默认灰色
|
||||
}
|
||||
/*** 用户导入参数 */
|
||||
const upload = reactive({
|
||||
// 是否显示弹出层(用户导入)
|
||||
open: false,
|
||||
// 弹出层标题(用户导入)
|
||||
title: "",
|
||||
// 是否禁用上传
|
||||
isUploading: false,
|
||||
// 更新的模板号
|
||||
reportId: 0,
|
||||
// 设置上传的请求头部
|
||||
headers: { Authorization: "Bearer " + getToken() },
|
||||
// 上传的地址
|
||||
url: import.meta.env.VITE_APP_BASE_API + "/reportdict/importfile"
|
||||
});
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { sys_normal_disable } = proxy.useDict("sys_normal_disable");
|
||||
const regdictList = ref([]);
|
||||
const open = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
const menuname = ref("报表模板");
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
reportCode: undefined,
|
||||
reportName: undefined,
|
||||
reportType:"0",
|
||||
status: undefined
|
||||
},
|
||||
rules: {
|
||||
reportType: [{ required: true, message: menuname.value+"类别不能为空", trigger: "blur" }],
|
||||
reportName: [{ required: true, message: menuname.value+"名称不能为空", trigger: "blur" }],
|
||||
reportCode: [{ required: true, message: menuname.value+"编码不能为空", trigger: "blur" }],
|
||||
reportSort: [{ required: true, message: menuname.value+"顺序不能为空", trigger: "blur" }],
|
||||
}
|
||||
});
|
||||
<script setup lang="ts">
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 查询模板列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
listreportdict(queryParams.value).then(response => {
|
||||
console.log('response:', response);
|
||||
regdictList.value = response.data;
|
||||
total.value = response.data.length;
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
/** 取消按钮 */
|
||||
function cancel() {
|
||||
open.value = false;
|
||||
reset();
|
||||
}
|
||||
/** 表单重置 */
|
||||
function reset() {
|
||||
form.value = {
|
||||
reportId: undefined,
|
||||
reportCode: undefined,
|
||||
reportName: undefined,
|
||||
reportType: reportTypeOptions.value[0]?.value || "",
|
||||
reportOptiontype: reportOptiontypeOptions.value[0]?.value || "",
|
||||
reportDefvalue:undefined,
|
||||
reportSort: 0,
|
||||
status: "0",
|
||||
remark: undefined
|
||||
};
|
||||
proxy.resetForm("reportdictRef");
|
||||
}
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
}
|
||||
/** 重置按钮操作 */
|
||||
function resetQuery() {
|
||||
proxy.resetForm("queryRef");
|
||||
handleQuery();
|
||||
}
|
||||
/** 多选框选中数据 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map(item => item.reportId);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
/** 新增按钮操作 */
|
||||
function handleAdd() {
|
||||
upload.reportId=0;
|
||||
upload.title = "新增模板";
|
||||
upload.open = true;
|
||||
}
|
||||
/** 修改按钮操作 */
|
||||
function handleUpdate(row) {
|
||||
reset();
|
||||
const reportId = row.reportId || ids.value;
|
||||
getreportdict(reportId).then(response => {
|
||||
form.value = response.data;
|
||||
open.value = true;
|
||||
title.value = "修改"+menuname.value;
|
||||
});
|
||||
}
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
proxy.$refs["reportdictRef"].validate(valid => {
|
||||
if (valid) {
|
||||
|
||||
if (form.value.reportId != undefined) {
|
||||
updatereportdict(form.value).then(response => {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
} else {
|
||||
addreportdict(form.value).then(response => {
|
||||
proxy.$modal.msgSuccess("新增成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
/**文件上传中处理 */
|
||||
const handleFileUploadProgress = (event, file, fileList) => {
|
||||
upload.isUploading = true;
|
||||
};
|
||||
/** 文件上传成功处理 */
|
||||
const handleFileSuccess = (response, file, fileList) => {
|
||||
upload.open = false;
|
||||
upload.isUploading = false;
|
||||
proxy.$refs["uploadRef"].handleRemove(file);
|
||||
proxy.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", { dangerouslyUseHTMLString: true });
|
||||
handleQuery()
|
||||
};
|
||||
/** 提交上传文件 */
|
||||
function submitFileForm() {
|
||||
proxy.$refs["uploadRef"].submit();
|
||||
};
|
||||
/** 导入按钮操作 */
|
||||
function uploadfile(row) {
|
||||
upload.reportId= row.reportId;
|
||||
upload.title = "模板上传";
|
||||
upload.open = true;
|
||||
};
|
||||
/** 下载模板操作 */
|
||||
function downloadfile(row) {
|
||||
const params = {
|
||||
filename: row.reportCode
|
||||
};
|
||||
proxy.download("reportdict/downloadfile", params, `${row.reportCode}.jrxml`);
|
||||
};
|
||||
/** 删除按钮操作 */
|
||||
function handleDelete(row) {
|
||||
const reportIds = row.reportId || ids.value;
|
||||
proxy.$modal.confirm('是否确认删除"' + menuname.value + '"编号为"' + reportIds + '"的数据项?').then(function() {
|
||||
|
||||
return delreportdict(reportIds);
|
||||
}).then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
}
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
proxy.download("delreportdict/export", {
|
||||
...queryParams.value
|
||||
}, `dict_${new Date().getTime()}.xlsx`);
|
||||
}
|
||||
|
||||
function autoloading(){
|
||||
loading.value = true;
|
||||
autoload().then(response => {
|
||||
getList();
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
getList();
|
||||
</script>
|
||||
<style scoped>
|
||||
.app-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 90vh;
|
||||
/* 容器高度等于窗口高度 */
|
||||
overflow: hidden;
|
||||
}
|
||||
.mb8 {
|
||||
height: 30px;
|
||||
/* 固定高度 */
|
||||
}
|
||||
.table-container {
|
||||
flex: 1;
|
||||
/* 占满剩余高度 */
|
||||
overflow: hidden;
|
||||
/* 避免表格超出容器 */
|
||||
}
|
||||
/* 1. 减小表格行高(核心) */
|
||||
:deep(.report-table .el-table__row) {
|
||||
height: 30px !important; /* 原默认行高约40px,按需调整(建议28-35px) */
|
||||
line-height: 30px !important; /* 行高与height一致,保证垂直居中 */
|
||||
}
|
||||
|
||||
/* 2. 减小单元格内边距(配合行高优化) */
|
||||
:deep(.report-table .el-table__cell) {
|
||||
padding: 2px 4px !important;
|
||||
height: 30px !important; /* 单元格高度与行高一致 */
|
||||
line-height: 1.2 !important; /* 文字行高适配矮行 */
|
||||
vertical-align: middle !important; /* 强制垂直居中 */
|
||||
}
|
||||
|
||||
/* 3. 类别单元格适配矮行高 */
|
||||
.report-type-cell {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
min-height: 26px; /* 适配30px行高,略小一点 */
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 0;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
/* 可选:优化操作列按钮大小,适配矮行 */
|
||||
:deep(.report-table .el-button--link) {
|
||||
padding: 0 4px !important;
|
||||
font-size: 12px !important;
|
||||
}
|
||||
.disabled-input-gray :deep(.el-input__inner){
|
||||
background-color: #e9e9e9 !important; /* 灰色底色(可根据需求调整色值) */
|
||||
color: #666 !important; /* 文字颜色加深,提升可读性 */
|
||||
cursor: not-allowed !important; /* 鼠标悬浮显示禁止图标 */
|
||||
}
|
||||
</style>
|
||||
<style scoped></style>
|
||||
@ -1,52 +1,59 @@
|
||||
<template>
|
||||
<!--报告单设定-->
|
||||
<el-form ref="form" :model="formData" label-width="80px">
|
||||
<el-form-item label="仪器" prop="yq">
|
||||
<YQSelectTable v-model:data="formData.yq" width="200px" @getDataValue="getList"/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="handAdd" size="default">新增</el-button>
|
||||
<el-button type="primary" @click="handDelete" size="default">删除</el-button>
|
||||
<el-button type="primary" @click="handSave" size="default">保存</el-button>
|
||||
</el-form-item>
|
||||
<div class="app-container">
|
||||
<!--报告单设定-->
|
||||
<el-form ref="form" :model="formData" label-width="80px">
|
||||
<el-form-item label="仪器" prop="yq">
|
||||
<YQSelectTable v-model:data="formData.yq" width="200px" @getDataValue="getList" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="handAdd" size="default">新增</el-button>
|
||||
<el-button type="primary" @click="handDelete" size="default">删除</el-button>
|
||||
<el-button type="primary" @click="handSave" size="default">保存</el-button>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<el-table ref="reportTable" :data="tableData" border width="100%" height="700px" @row-click="onRowClick"
|
||||
highlight-current-row>
|
||||
<el-table-column label="仪器" prop="yq" align="center">
|
||||
<template #default="scope">
|
||||
{{ formatInstr(scope.row.yq) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="序号" prop="xh" align="center"></el-table-column>
|
||||
<el-table-column label="报告单号" prop="bgdh" align="center">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.bgdh" placeholder="请输入报告单号" class="full-width-input"
|
||||
@change="handleRowChange(scope.row, scope.$index)"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="医疗机构" prop="yljg" align="center"></el-table-column>
|
||||
<el-table-column label="使用类型" prop="type" align="center">
|
||||
<template #default="scope">
|
||||
<el-select v-model="scope.row.type" placeholder="请选择" class="full-width-input"
|
||||
@change="handleRowChange(scope.row, scope.$index)">
|
||||
<el-option label="默认" value="1"></el-option>
|
||||
<el-option label="参数" value="2"></el-option>
|
||||
<el-option label="根据项目来判断" value="3"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="使用条件" prop="condition" align="center">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.condition" placeholder="请输入使用条件" class="full-width-input"
|
||||
@change="handleRowChange(scope.row, scope.$index)"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
</el-form>
|
||||
<el-table ref="reportTable" :data="tableData" border width="100%" height="700px" @row-click="onRowClick" highlight-current-row>
|
||||
<el-table-column label="仪器" prop="yq" align="center">
|
||||
<template #default="scope">
|
||||
{{ formatInstr(scope.row.yq) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="序号" prop="xh" align="center"></el-table-column>
|
||||
<el-table-column label="报告单号" prop="bgdh" align="center" >
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.bgdh" placeholder="请输入报告单号" class="full-width-input" @change="handleRowChange(scope.row, scope.$index)"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="医疗机构" prop="yljg" align="center"></el-table-column>
|
||||
<el-table-column label="使用类型" prop="type" align="center">
|
||||
<template #default="scope">
|
||||
<el-select v-model="scope.row.type" placeholder="请选择" class="full-width-input" @change="handleRowChange(scope.row, scope.$index)">
|
||||
<el-option label="默认" value="1"></el-option>
|
||||
<el-option label="参数" value="2"></el-option>
|
||||
<el-option label="根据项目来判断" value="3"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="使用条件" prop="condition" align="center">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.condition" placeholder="请输入使用条件" class="full-width-input" @change="handleRowChange(scope.row, scope.$index)"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {addReportService,queryReportService,updateReportService,deleteReportService} from '@/api/liswork/xtwh/reportSettingApi';
|
||||
import { addReportService, queryReportService, updateReportService, deleteReportService } from '@/api/liswork/xtwh/reportSettingApi';
|
||||
import { LabReportInstr } from '@/types/index';
|
||||
import YQSelectTable from '@/components/SelectTable/YQSelectTable/index.vue';
|
||||
import { ElMessage,ElMessageBox } from 'element-plus';
|
||||
import { formatInstr,getYqData } from '@/hooks/index';
|
||||
import { ElMessage, ElMessageBox } from 'element-plus';
|
||||
import { formatInstr, getYqData } from '@/hooks/index';
|
||||
|
||||
const formData = ref({
|
||||
yq: ''
|
||||
@ -63,10 +70,10 @@ const maxXh = computed(() => {
|
||||
|
||||
//新增数据
|
||||
const handAdd = () => {
|
||||
if(formData.value.yq === ''){
|
||||
if (formData.value.yq === '') {
|
||||
ElMessage.warning('请先选择仪器');
|
||||
return;
|
||||
}
|
||||
}
|
||||
const newReport: LabReportInstr = {
|
||||
yq: formData.value.yq,
|
||||
xh: maxXh.value + 1,
|
||||
@ -81,14 +88,14 @@ const handAdd = () => {
|
||||
|
||||
//删除数据
|
||||
const handDelete = async () => {
|
||||
await ElMessageBox.confirm('是否要删除选中的数据?','Warning',
|
||||
await ElMessageBox.confirm('是否要删除选中的数据?', 'Warning',
|
||||
{
|
||||
confirmButtonText: 'OK',
|
||||
cancelButtonText: 'Cancel',
|
||||
type: 'warning',
|
||||
}
|
||||
);
|
||||
await deleteReportService({yq: selectedRows.value?.yq, xh: selectedRows.value?.xh,bgdh: selectedRows.value?.bgdh});
|
||||
await deleteReportService({ yq: selectedRows.value?.yq, xh: selectedRows.value?.xh, bgdh: selectedRows.value?.bgdh });
|
||||
ElMessage.success('删除成功');
|
||||
getList();
|
||||
};
|
||||
@ -96,12 +103,12 @@ const handDelete = async () => {
|
||||
//保存数据
|
||||
const handSave = async () => {
|
||||
let updateReports = tableData.value.filter(item => item.type === '1');
|
||||
if(updateReports.length > 1){
|
||||
if (updateReports.length > 1) {
|
||||
ElMessage.error('默认的报告单类型不能有两个,请修改后再保存');
|
||||
return;
|
||||
}
|
||||
updateReports = tableData.value.filter(item => item.type === '2' && item.condition.trim() === '');
|
||||
if(updateReports.length > 0){
|
||||
if (updateReports.length > 0) {
|
||||
ElMessage.error('参数类型的使用条件不能为空,请修改后再保存');
|
||||
return;
|
||||
}
|
||||
@ -109,7 +116,7 @@ const handSave = async () => {
|
||||
let newReports = tableData.value.filter(item => item.status === 'new');
|
||||
let res = await addReportService(newReports);
|
||||
newReports = tableData.value.filter(item => item.status === 'update');
|
||||
console.log('更新的数据',newReports);
|
||||
console.log('更新的数据', newReports);
|
||||
res = await updateReportService(newReports);
|
||||
ElMessage.success('保存成功');
|
||||
getList();
|
||||
@ -123,8 +130,8 @@ const getList = async () => {
|
||||
|
||||
//监听数据是否发生改变
|
||||
const handleRowChange = (row: LabReportInstr, index: number) => {
|
||||
if(row.status !== 'new') {
|
||||
tableData.value[index].status = 'update';
|
||||
if (row.status !== 'new') {
|
||||
tableData.value[index].status = 'update';
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -1,272 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch">
|
||||
<el-form-item label="模板编码" prop="zddh">
|
||||
<el-input
|
||||
v-model="queryParams.zddh"
|
||||
placeholder="请输入模板编码"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="模板名称" prop="zdmc">
|
||||
<el-input
|
||||
v-model="queryParams.zdmc"
|
||||
placeholder="请输入模板名称"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="userflag">
|
||||
<el-select v-model="queryParams.userflag" placeholder="模板状态" clearable style="width: 200px">
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @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="Plus"
|
||||
@click="handleAdd"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="Edit"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="Delete"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="Download"
|
||||
@click="handleExport"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="diagnosisList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="模板编码" align="center" prop="zddh" />
|
||||
<el-table-column label="模板名称" align="center" prop="zdmc" />
|
||||
<el-table-column label="模板排序" align="center" prop="diagSort" />
|
||||
<el-table-column label="状态" align="center" prop="userflag">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="sys_normal_disable" :value="scope.row.userflag" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="180" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" >修改</el-button>
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" >删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改模板对话框 -->
|
||||
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
|
||||
<el-form ref="diagnosisRef" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="模板名称" prop="diagName">
|
||||
<el-input v-model="form.diagName" placeholder="请输入模板名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="模板编码" prop="diagCode">
|
||||
<el-input v-model="form.diagCode" placeholder="请输入编码名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="模板顺序" prop="diagSort">
|
||||
<el-input-number v-model="form.diagSort" controls-position="right" :min="0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="模板状态" prop="status">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio
|
||||
v-for="dict in sys_normal_disable"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{ dict.label }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="diagnosis">
|
||||
import { listdiagnosis, adddiagnosis, deldiagnosis, getdiagnosis, updatediagnosis } from "@/api/regional/dict/diagnosis";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { sys_normal_disable } = proxy.useDict("sys_normal_disable");
|
||||
|
||||
const diagnosisList = ref([]);
|
||||
const open = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 15,
|
||||
diagCode: undefined,
|
||||
diagName: undefined,
|
||||
status: undefined
|
||||
},
|
||||
rules: {
|
||||
diagName: [{ required: true, message: "模板名称不能为空", trigger: "blur" }],
|
||||
diagCode: [{ required: true, message: "模板编码不能为空", trigger: "blur" }],
|
||||
diagSort: [{ required: true, message: "模板顺序不能为空", trigger: "blur" }],
|
||||
}
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 查询模板列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
listdiagnosis(queryParams.value).then(response => {
|
||||
diagnosisList.value = response.rows;
|
||||
total.value = response.total;
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
/** 取消按钮 */
|
||||
function cancel() {
|
||||
open.value = false;
|
||||
reset();
|
||||
}
|
||||
/** 表单重置 */
|
||||
function reset() {
|
||||
form.value = {
|
||||
diagId: undefined,
|
||||
diagCode: undefined,
|
||||
diagName: undefined,
|
||||
diagSort: 0,
|
||||
status: "0",
|
||||
remark: undefined
|
||||
};
|
||||
proxy.resetForm("diagnosisRef");
|
||||
}
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
}
|
||||
/** 重置按钮操作 */
|
||||
function resetQuery() {
|
||||
proxy.resetForm("queryRef");
|
||||
handleQuery();
|
||||
}
|
||||
/** 多选框选中数据 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map(item => item.diagId);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
/** 新增按钮操作 */
|
||||
function handleAdd() {
|
||||
reset();
|
||||
open.value = true;
|
||||
title.value = "添加模板";
|
||||
}
|
||||
/** 修改按钮操作 */
|
||||
function handleUpdate(row) {
|
||||
reset();
|
||||
const diagId = row.diagId || ids.value;
|
||||
getdiagnosis(diagId).then(response => {
|
||||
form.value = response.data;
|
||||
open.value = true;
|
||||
title.value = "修改模板";
|
||||
});
|
||||
}
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
proxy.$refs["diagnosisRef"].validate(valid => {
|
||||
if (valid) {
|
||||
if (form.value.diagId != undefined) {
|
||||
updatediagnosis(form.value).then(response => {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
} else {
|
||||
adddiagnosis(form.value).then(response => {
|
||||
proxy.$modal.msgSuccess("新增成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
/** 删除按钮操作 */
|
||||
function handleDelete(row) {
|
||||
const diagIds = row.diagId || ids.value;
|
||||
proxy.$modal.confirm('是否确认删除模板编号为"' + diagIds + '"的数据项?').then(function() {
|
||||
return deldiagnosis(diagIds);
|
||||
}).then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
}
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
proxy.download("system/diagnosis/export", {
|
||||
...queryParams.value
|
||||
}, `diag_${new Date().getTime()}.xlsx`);
|
||||
}
|
||||
|
||||
getList();
|
||||
</script>
|
||||
@ -1,31 +1,34 @@
|
||||
<template>
|
||||
<!--仪器收费项目对照-->
|
||||
<el-row>
|
||||
<el-form ref="form" :model="formData" label-width="80px" inline>
|
||||
<el-form-item label="仪器" prop="yq">
|
||||
<YQSelectTable v-model:data="formData.yq" width="200px" @getDataValue="getList"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目检索" prop="item">
|
||||
<el-input placeholder="名称,简拼" v-model="formData.item" @change="getList"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="onQueryClick">查询</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<span>说明:双击左侧列表,能删除对照数据,双击右边列表能新增数据到对照当中</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<CustomTable ref="tableRefLeft" :data="dataListLeft" :columns="columnsLeft" :enable-column-drag="true" @column-drag-end="handleColumnDragEnd"
|
||||
:config="tableConfig" @row-dblclick="onDBClickLeft"/>
|
||||
</el-col>
|
||||
<el-col :span="19">
|
||||
<CustomTable ref="tableRefRight" :data="dataListRight" :columns="columnsRight" :enable-column-drag="true" @column-drag-end="handleColumnDragEnd"
|
||||
:config="tableConfig" @row-dblclick="onDBClickRight"/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row>
|
||||
<el-form ref="form" :model="formData" label-width="80px" inline>
|
||||
<el-form-item label="仪器" prop="yq">
|
||||
<YQSelectTable v-model:data="formData.yq" width="200px" @getDataValue="getList" />
|
||||
</el-form-item>
|
||||
<el-form-item label="项目检索" prop="item">
|
||||
<el-input placeholder="名称,简拼" v-model="formData.item" @change="getList"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="onQueryClick">查询</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<span class="tips">说明:双击左侧列表,能删除对照数据,双击右边列表能新增数据到对照当中</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-row>
|
||||
<el-row :gutter="20" class="table-row">
|
||||
<el-col :span="6" class="table-col">
|
||||
<CustomTable ref="tableRefLeft" :data="dataListLeft" :columns="columnsLeft" :config="tableConfig"
|
||||
@row-dblclick="onDBClickLeft" />
|
||||
</el-col>
|
||||
<el-col :span="18" class="table-col">
|
||||
<CustomTable ref="tableRefRight" :data="dataListRight" :columns="columnsRight" :enable-column-drag="true"
|
||||
@column-drag-end="handleColumnDragEnd" :config="tableConfig" @row-dblclick="onDBClickRight" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</template>
|
||||
@ -33,88 +36,97 @@
|
||||
<script setup lang="ts">
|
||||
import CustomTable from '@/components/elTable/index.vue'
|
||||
import YQSelectTable from '@/components/SelectTable/YQSelectTable/index.vue';
|
||||
import { queryService,queryXmService,addService,delService } from '@/api/liswork/xtwh/xmFeeinstrApi';
|
||||
import { queryService, queryXmService, addService, delService } from '@/api/liswork/xtwh/xmFeeinstrApi';
|
||||
import { queryOneService } from '@/api/system/parameter'
|
||||
import { ElMessage } from 'element-plus';
|
||||
|
||||
const tableConfig = ref({
|
||||
border: true, // 边框
|
||||
height: '76vh', // 高度
|
||||
height: '100%', // 高度
|
||||
highlightCurrentRow: true, // 高亮当前行
|
||||
// cellStyle: cellStyleHd
|
||||
})
|
||||
|
||||
//退拽属性
|
||||
const handleColumnDragEnd = (data: any) => {
|
||||
// 更新列配置
|
||||
columnsLeft.value = data.columns;
|
||||
columnsRight.value = data.columns;
|
||||
}
|
||||
|
||||
const columnsLeft = ref([
|
||||
{ prop: 'sfxmmc', label: '当前仪器对应的收费项目', visible: true, align: 'center', width: 300 },
|
||||
{ prop: 'sfxmmc', label: '当前仪器对应的收费项目', visible: true, },
|
||||
{ prop: 'yq', label: '仪器', visible: false, align: 'center', width: 100 },
|
||||
]);
|
||||
const columnsRight = ref([
|
||||
{ prop: 'xmlb', label: '类别', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'sfxmdh', label: '收费项目代号', visible: true, align: 'center', width: 200 },
|
||||
{ prop: 'sfxmmc', label: '收费项目名称', visible: true, align: 'center', width: 300 },
|
||||
{ prop: 'dj', label: '单价', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'cp_yq', label: '分配了仪器', visible: true, align: 'center', width: 400 }
|
||||
{ prop: 'xmlb', label: '类别', visible: true, align: 'center', },
|
||||
{ prop: 'sfxmdh', label: '收费项目代号', visible: true, align: 'center', },
|
||||
{ prop: 'sfxmmc', label: '收费项目名称', visible: true, align: 'center', },
|
||||
{ prop: 'dj', label: '单价', visible: true, align: 'center', },
|
||||
{ prop: 'cp_yq', label: '分配了仪器', visible: true, align: 'center', }
|
||||
]);
|
||||
|
||||
const dataListLeft = ref([
|
||||
{'sfxmdh':'','yq':''}
|
||||
])
|
||||
const dataListLeft = ref([])
|
||||
const dataListRight = ref([])
|
||||
const formData = ref({
|
||||
yq: '',
|
||||
yq: '46',
|
||||
item: ''
|
||||
})
|
||||
|
||||
//刷新数据
|
||||
const getList = async () => {
|
||||
if(!formData.value.yq) formData.value.yq = ''
|
||||
let res = await queryService({yq: formData.value.yq});
|
||||
dataListLeft.value = res.data;
|
||||
res = await queryOneService('HISOPT','sp_gyxmyljg')
|
||||
let param = res.data.value
|
||||
//先写固定值,后面再改
|
||||
if(param && param !== ''){
|
||||
param = '1'
|
||||
}else{
|
||||
param = '1'
|
||||
}
|
||||
res = await queryXmService({yljg: param,yq: formData.value.yq,queryValue: formData.value.item});
|
||||
dataListRight.value = res.data;
|
||||
if (!formData.value.yq) formData.value.yq = ''
|
||||
let res = await queryService({ yq: formData.value.yq });
|
||||
dataListLeft.value = res.data;
|
||||
// res = await queryOneService('HISOPT', 'sp_gyxmyljg')
|
||||
// let param = res.data.value
|
||||
//先写固定值,后面再改
|
||||
let param = '1'
|
||||
if (param && param !== '') {
|
||||
param = '1'
|
||||
} else {
|
||||
param = '1'
|
||||
}
|
||||
res = await queryXmService({ yljg: param, yq: formData.value.yq, queryValue: formData.value.item });
|
||||
dataListRight.value = res.data;
|
||||
};
|
||||
|
||||
const onDBClickRight = async (row:any)=> {
|
||||
const onDBClickRight = async (row: any) => {
|
||||
//新增数据
|
||||
await addService({sfxmdh:row.sfxmdh,yq: formData.value.yq})
|
||||
await addService({ sfxmdh: row.sfxmdh, yq: formData.value.yq })
|
||||
ElMessage.success('新增成功!')
|
||||
getList()
|
||||
}
|
||||
|
||||
const onDBClickLeft = async (row:any) => {
|
||||
const onDBClickLeft = async (row: any) => {
|
||||
//删除数据
|
||||
await delService({yq: formData.value.yq,sfxmdh: row.sfxmdh})
|
||||
await delService({ yq: formData.value.yq, sfxmdh: row.sfxmdh })
|
||||
ElMessage.success('删除成功!')
|
||||
getList()
|
||||
}
|
||||
|
||||
const onQueryClick = () => {
|
||||
if(!formData.value.yq) {
|
||||
if (!formData.value.yq) {
|
||||
ElMessage.error('请先选择仪器!')
|
||||
return
|
||||
}
|
||||
getList()
|
||||
}
|
||||
|
||||
|
||||
|
||||
getList()
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.tips {
|
||||
font-family: SourceHanSansCN, SourceHanSansCN;
|
||||
font-size: 16px;
|
||||
color: #409eff;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.table-row {
|
||||
height: calc(100% - 58px);
|
||||
|
||||
.table-col {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
199
src/views/liswork/xtwh/xmReqItemVs/index.vue
Normal file
199
src/views/liswork/xtwh/xmReqItemVs/index.vue
Normal file
@ -0,0 +1,199 @@
|
||||
<!-- 收费项目,报告项目对照 -->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form ref="form" :model="formData" label-width="80px" inline>
|
||||
<el-form-item label="仪器" prop="yq">
|
||||
<YQSelectTable v-model:data="formData.yq" width="200px" placeholder="请输入仪器名称" @get-data-value="getDataValue" />
|
||||
</el-form-item>
|
||||
<el-form-item label="项目" prop="xmdh">
|
||||
<el-input placeholder="请输入项目名称" v-model="formData.sqxmmc" style="width: 200px;" @keyup.enter="getList" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-checkbox v-model="formData.sl" label="只看仪器对照收费项目" true-value="1" false-value="" @change="getList" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row>
|
||||
<el-button type="primary" icon="Plus" @click="onClickAdd">新增</el-button>
|
||||
<el-button type="danger" icon="Delete" @click="onClickDel">删除</el-button>
|
||||
<el-button type="primary" icon="Edit" @click="searchHandle">搜索申请项目</el-button>
|
||||
<el-button type="primary" icon="Edit" @click="onClickSave">保存</el-button>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20" class="table-row">
|
||||
<el-col :span="8" class="table-col">
|
||||
<CustomTable ref="tableRefLeft" :data="dataListLeft" :columns="columnsLeft" :config="tableConfig"
|
||||
@row-click="rowClickLeft" />
|
||||
</el-col>
|
||||
<el-col :span="16" class="table-col">
|
||||
<CustomTable ref="tableRefRight" :data="dataListRight" :columns="columnsRight" :enable-column-drag="true"
|
||||
@column-drag-end="handleColumnDragEnd" :config="tableConfig" @row-click="rowHandle">
|
||||
<template #xmdh="{ row }">
|
||||
<SelectTable v-model:data="row.xmdh" :tableData="xmList" class="full-width-input" :keyValue="true" />
|
||||
</template>
|
||||
<template #tdh="{ row }">
|
||||
<el-input placeholder="" v-model="row.tdh" class="full-width-input"></el-input>
|
||||
</template>
|
||||
<template #mrz="{ row }">
|
||||
<el-input v-model="row.mrz" class="full-width-input"></el-input>
|
||||
</template>
|
||||
<template #seq="{ row }">
|
||||
<el-input v-model="row.seq" class="full-width-input"></el-input>
|
||||
</template>
|
||||
<template #def="{ row }">
|
||||
<el-checkbox v-model="row.def" true-value="1" false-value="0" />
|
||||
</template>
|
||||
</CustomTable>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { queryListService, queryDetailService, queryOldxminfo, addXminfo, delXminfo, searchxminfo } from '@/api/liswork/xtwh/xmReqItemVsApi';
|
||||
import YQSelectTable from '@/components/SelectTable/YQSelectTable/index.vue';
|
||||
import CustomTable from '@/components/elTable/index.vue'
|
||||
import { ElMessage } from 'element-plus';
|
||||
|
||||
const formData = ref({
|
||||
yq: '46',
|
||||
sqxmmc: '',
|
||||
sl: ''
|
||||
})
|
||||
|
||||
interface tableItem {
|
||||
xmdh: string;
|
||||
tdh: string;
|
||||
mrz: string;
|
||||
seq: number;
|
||||
def: string;
|
||||
}
|
||||
const dataListLeft = ref([])
|
||||
const dataListRight = ref<tableItem[]>([])
|
||||
const xmList = ref([])
|
||||
const selectRow = ref<any>(null)
|
||||
|
||||
//退拽属性
|
||||
const handleColumnDragEnd = (data: any) => {
|
||||
// 更新列配置
|
||||
columnsRight.value = data.columns;
|
||||
}
|
||||
|
||||
const tableConfig = ref({
|
||||
border: true, // 边框
|
||||
height: '100%', // 高度
|
||||
highlightCurrentRow: true, // 高亮当前行
|
||||
})
|
||||
|
||||
const columnsLeft = ref([
|
||||
{ prop: 'sqxmmc', label: '申请/收费项目名称', visible: true, align: 'center', },
|
||||
{ prop: 'sqxmdh', label: '申请/收费项目代号', visible: true, align: 'center', },
|
||||
]);
|
||||
|
||||
const columnsRight = ref([
|
||||
{ prop: 'xmdh', label: '报告项目', visible: true, align: 'center', width: 250, slot: 'xmdh', showOverflowTooltip: false },
|
||||
{ prop: 'tdh', label: '双工代号', visible: true, align: 'center', slot: 'tdh' },
|
||||
{ prop: 'mrz', label: '默认值', visible: true, align: 'center', slot: 'mrz' },
|
||||
{ prop: 'seq', label: '序号', visible: true, align: 'center', slot: 'seq' },
|
||||
{ prop: 'def', label: '非必做', visible: true, align: 'center', slot: 'def' },
|
||||
]);
|
||||
const tableRefLeft = ref()
|
||||
// 获取数据列表
|
||||
const getList = async () => {
|
||||
const res = await queryListService(formData.value)
|
||||
dataListLeft.value = res.data
|
||||
if (dataListLeft.value.length) {
|
||||
rowClickLeft(dataListLeft.value[0])
|
||||
tableRefLeft.value?.setCurrentRow(dataListLeft.value[0])
|
||||
} else {
|
||||
dataListRight.value = []
|
||||
selectRow.value = null
|
||||
}
|
||||
}
|
||||
|
||||
const rowHandle = (row: any) => {
|
||||
selectRow.value = row
|
||||
}
|
||||
|
||||
const onClickAdd = () => {
|
||||
dataListRight.value.push({
|
||||
xmdh: '',
|
||||
tdh: '',
|
||||
mrz: '',
|
||||
seq: dataListRight.value.length + 1,
|
||||
def: '0',
|
||||
})
|
||||
}
|
||||
|
||||
const onClickDel = () => {
|
||||
if (!selectRow.value) return ElMessage.warning('请选择要删除的行!')
|
||||
|
||||
if (selectRow.value.sqxmdh) {
|
||||
delXminfo(selectRow.value)
|
||||
rowClickLeft(xmInfo.value)
|
||||
} else {
|
||||
dataListRight.value = dataListRight.value.filter(item => item.xmdh != selectRow.value.xmdh)
|
||||
}
|
||||
selectRow.value = null
|
||||
}
|
||||
|
||||
const onClickSave = () => {
|
||||
dataListRight.value = dataListRight.value.filter(item => item.xmdh)
|
||||
const arr = dataListRight.value.map(item => {
|
||||
return {
|
||||
...item,
|
||||
sqxmdh: xmInfo.value.sqxmdh,
|
||||
sqxmmc: xmInfo.value.sqxmmc,
|
||||
yq: formData.value.yq,
|
||||
}
|
||||
})
|
||||
|
||||
addXminfo(arr).then(() => {
|
||||
ElMessage.success('保存成功')
|
||||
rowClickLeft(xmInfo.value)
|
||||
})
|
||||
}
|
||||
|
||||
const searchHandle = () => {
|
||||
searchxminfo({ yq: formData.value.yq })
|
||||
}
|
||||
const getDataValue = (value: any) => {
|
||||
getOldXminfoList()
|
||||
getList()
|
||||
}
|
||||
|
||||
const xmInfo: any = ref({})
|
||||
//点击事件
|
||||
const rowClickLeft = async (row: any) => {
|
||||
selectRow.value = null
|
||||
xmInfo.value = row
|
||||
const res = await queryDetailService({ sqxmdh: row.sqxmdh, sqxmmc: row.sqxmmc, yq: formData.value.yq })
|
||||
dataListRight.value = res.rows
|
||||
}
|
||||
|
||||
const getOldXminfoList = async () => {
|
||||
const res = await queryOldxminfo({ yq: formData.value.yq })
|
||||
xmList.value = res.data.map((item: any) => {
|
||||
return {
|
||||
label: item.xmmc,
|
||||
value: item.xmdh,
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
getOldXminfoList()
|
||||
getList()
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.table-row {
|
||||
height: calc(100% - 90px);
|
||||
padding-top: 10px;
|
||||
|
||||
.table-col {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -71,20 +71,20 @@
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<CustomTable ref="tableRefs" :data="tableData" :columns="columns" :config="tableConfig" :pagination="pagination"
|
||||
@size-change="sizeChange" @page-change="currentChange" @row-click="rowHandle">
|
||||
<template #patAge="{ row }">
|
||||
{{ row.patAge }}{{ row.ageUnit }}
|
||||
</template>
|
||||
<template #status="{ row }">
|
||||
{{ formatDict(row.status, regdictList) }}
|
||||
</template>
|
||||
<template #patSex="{ row }">
|
||||
{{ row.patSex == 1 ? '男' : '女' }}
|
||||
</template>
|
||||
</CustomTable>
|
||||
|
||||
<div>
|
||||
<CustomTable ref="tableRefs" :data="tableData" :columns="columns" :config="tableConfig" :pagination="pagination"
|
||||
@size-change="sizeChange" @page-change="currentChange" @row-click="rowHandle">
|
||||
<template #patAge="{ row }">
|
||||
{{ row.patAge }}{{ row.ageUnit }}
|
||||
</template>
|
||||
<template #status="{ row }">
|
||||
{{ formatDict(row.status, regdictList) }}
|
||||
</template>
|
||||
<template #patSex="{ row }">
|
||||
{{ row.patSex == 1 ? '男' : '女' }}
|
||||
</template>
|
||||
</CustomTable>
|
||||
</div>
|
||||
<!-- 样本流程 -->
|
||||
<div class="time-line-box">
|
||||
<div v-for="(item, i) in timelineItems" :key="i" class="time-line-item">
|
||||
@ -258,6 +258,8 @@ const formatDict = (v: string, arr: Array<any>) => {
|
||||
|
||||
<style scoped lang="scss">
|
||||
.compact-form {
|
||||
height: 80px;
|
||||
|
||||
.el-form-item {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
@ -60,20 +60,20 @@
|
||||
<el-button type="primary" @click="qsHandle(110)">标本拒签</el-button>
|
||||
<el-button type="primary" plain @click="bbThHandle">标本退回</el-button>
|
||||
</div>
|
||||
|
||||
<CustomTable ref="tableRefs" :data="tableData" :columns="columns" :config="tableConfig" :pagination="pagination"
|
||||
@selection-change="handleSelectionChange" @size-change="sizeChange" @page-change="currentChange">
|
||||
<template #patAge="{ row }">
|
||||
{{ row.patAge }}{{ row.ageUnit }}
|
||||
</template>
|
||||
<template #status="{ row }">
|
||||
{{ formatDict(row.status, regdictList) }}
|
||||
</template>
|
||||
<template #patSex="{ row }">
|
||||
{{ row.patSex == 1 ? '男' : '女' }}
|
||||
</template>
|
||||
</CustomTable>
|
||||
|
||||
<div style="height: calc(100% - 180px)">
|
||||
<CustomTable ref="tableRefs" :data="tableData" :columns="columns" :config="tableConfig" :pagination="pagination"
|
||||
@selection-change="handleSelectionChange" @size-change="sizeChange" @page-change="currentChange">
|
||||
<template #patAge="{ row }">
|
||||
{{ row.patAge }}{{ row.ageUnit }}
|
||||
</template>
|
||||
<template #status="{ row }">
|
||||
{{ formatDict(row.status, regdictList) }}
|
||||
</template>
|
||||
<template #patSex="{ row }">
|
||||
{{ row.patSex == 1 ? '男' : '女' }}
|
||||
</template>
|
||||
</CustomTable>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -113,7 +113,7 @@ const columns: any = ref([
|
||||
])
|
||||
const tableConfig = ref({
|
||||
border: true, // 边框
|
||||
height: '68vh', // 高度
|
||||
height: '100%', // 高度
|
||||
highlightCurrentRow: true, // 高亮当前行
|
||||
// fit: true, // 列宽自适应
|
||||
})
|
||||
@ -228,6 +228,8 @@ const formatDict = (v: string, arr: Array<any>) => {
|
||||
|
||||
<style scoped lang="scss">
|
||||
.compact-form {
|
||||
height: 80px;
|
||||
|
||||
.el-form-item {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
@ -60,18 +60,20 @@
|
||||
<el-button type="primary" @click="thHandle(90)">申请作废</el-button>
|
||||
|
||||
</div>
|
||||
<CustomTable ref="tableRefs" :data="tableData" :columns="columns" :config="tableConfig" :pagination="pagination"
|
||||
@selection-change="handleSelectionChange" @size-change="sizeChange" @page-change="currentChange">
|
||||
<template #patAge="{ row }">
|
||||
{{ row.patAge }}{{ row.ageUnit }}
|
||||
</template>
|
||||
<template #status="{ row }">
|
||||
{{ formatDict(row.status, regdictList) }}
|
||||
</template>
|
||||
<template #patSex="{ row }">
|
||||
{{ row.patSex == 1 ? '男' : '女' }}
|
||||
</template>
|
||||
</CustomTable>
|
||||
<div style="height: calc(100% - 180px)">
|
||||
<CustomTable ref="tableRefs" :data="tableData" :columns="columns" :config="tableConfig" :pagination="pagination"
|
||||
@selection-change="handleSelectionChange" @size-change="sizeChange" @page-change="currentChange">
|
||||
<template #patAge="{ row }">
|
||||
{{ row.patAge }}{{ row.ageUnit }}
|
||||
</template>
|
||||
<template #status="{ row }">
|
||||
{{ formatDict(row.status, regdictList) }}
|
||||
</template>
|
||||
<template #patSex="{ row }">
|
||||
{{ row.patSex == 1 ? '男' : '女' }}
|
||||
</template>
|
||||
</CustomTable>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -109,7 +111,7 @@ const columns: any = ref([
|
||||
])
|
||||
const tableConfig = ref({
|
||||
border: true, // 边框
|
||||
height: '68vh', // 高度
|
||||
height: '100%', // 高度
|
||||
highlightCurrentRow: true, // 高亮当前行
|
||||
// fit: true, // 列宽自适应
|
||||
})
|
||||
@ -200,6 +202,8 @@ const formatDict = (v: string, arr: Array<any>) => {
|
||||
|
||||
<style scoped lang="scss">
|
||||
.compact-form {
|
||||
height: 80px;
|
||||
|
||||
.el-form-item {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
@ -69,20 +69,20 @@
|
||||
<el-col :span="1.5"> <el-button type="primary" :size="aotuSize" @click="sjHandle(20)">取消送检</el-button></el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<CustomTable ref="tableRefs" :data="tableData" :columns="columns" :config="tableConfig" :pagination="pagination"
|
||||
@selection-change="handleSelectionChange" @size-change="sizeChange" @page-change="currentChange">
|
||||
<template #patAge="{ row }">
|
||||
{{ row.patAge }}{{ row.ageUnit }}
|
||||
</template>
|
||||
<template #status="{ row }">
|
||||
{{ formatDict(row.status, regdictList) }}
|
||||
</template>
|
||||
<template #patSex="{ row }">
|
||||
{{ row.patSex == 1 ? '男' : '女' }}
|
||||
</template>
|
||||
</CustomTable>
|
||||
|
||||
<div style="height: calc(100% - 180px);">
|
||||
<CustomTable ref="tableRefs" :data="tableData" :columns="columns" :config="tableConfig" :pagination="pagination"
|
||||
@selection-change="handleSelectionChange" @size-change="sizeChange" @page-change="currentChange">
|
||||
<template #patAge="{ row }">
|
||||
{{ row.patAge }}{{ row.ageUnit }}
|
||||
</template>
|
||||
<template #status="{ row }">
|
||||
{{ formatDict(row.status, regdictList) }}
|
||||
</template>
|
||||
<template #patSex="{ row }">
|
||||
{{ row.patSex == 1 ? '男' : '女' }}
|
||||
</template>
|
||||
</CustomTable>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -121,7 +121,7 @@ const columns: any = ref([
|
||||
])
|
||||
const tableConfig = ref({
|
||||
border: true, // 边框
|
||||
height: '70vh', // 高度
|
||||
height: '100%', // 高度
|
||||
highlightCurrentRow: true, // 高亮当前行
|
||||
// fit: true, // 列宽自适应
|
||||
})
|
||||
@ -229,6 +229,8 @@ const formatDict = (v: string, arr: Array<any>) => {
|
||||
|
||||
<style scoped lang="scss">
|
||||
.compact-form {
|
||||
height: 80px;
|
||||
|
||||
.el-form-item {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
@ -35,10 +35,12 @@
|
||||
<el-button type="primary" @click="thHandle(50)">撤销退回</el-button>
|
||||
<el-button type="primary" @click="thHandle(90)">申请作废</el-button> -->
|
||||
</div>
|
||||
<CustomTable ref="tableRefs" :data="tableData" :columns="columns" :config="tableConfig" :pagination="pagination"
|
||||
@size-change="sizeChange" @page-change="currentChange">
|
||||
<div style="height: calc(100% - 100px)">
|
||||
<CustomTable ref="tableRefs" :data="tableData" :columns="columns" :config="tableConfig" :pagination="pagination"
|
||||
@size-change="sizeChange" @page-change="currentChange">
|
||||
|
||||
</CustomTable>
|
||||
</CustomTable>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -70,7 +72,7 @@ const columns: any = ref([
|
||||
])
|
||||
const tableConfig = ref({
|
||||
border: true, // 边框
|
||||
height: '75vh', // 高度
|
||||
height: '100%', // 高度
|
||||
highlightCurrentRow: true, // 高亮当前行
|
||||
summary: true,
|
||||
summaryField: ['sl'],//计算列总和
|
||||
@ -156,6 +158,8 @@ const formatDict = (v: string, arr: Array<any>) => {
|
||||
|
||||
<style scoped lang="scss">
|
||||
.compact-form {
|
||||
height: 40px;
|
||||
|
||||
.el-form-item {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
@ -35,10 +35,12 @@
|
||||
<el-button type="primary" @click="thHandle(50)">撤销退回</el-button>
|
||||
<el-button type="primary" @click="thHandle(90)">申请作废</el-button> -->
|
||||
</div>
|
||||
<CustomTable ref="tableRefs" :data="tableData" :columns="columns" :config="tableConfig" :pagination="pagination"
|
||||
@size-change="sizeChange" @page-change="currentChange">
|
||||
<div style="height: calc(100% - 100px);">
|
||||
<CustomTable ref="tableRefs" :data="tableData" :columns="columns" :config="tableConfig" :pagination="pagination"
|
||||
@size-change="sizeChange" @page-change="currentChange">
|
||||
|
||||
</CustomTable>
|
||||
</CustomTable>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -71,7 +73,7 @@ const columns: any = ref([
|
||||
])
|
||||
const tableConfig = ref({
|
||||
border: true, // 边框
|
||||
height: '75vh', // 高度
|
||||
height: '100%', // 高度
|
||||
highlightCurrentRow: true, // 高亮当前行
|
||||
summary: true,
|
||||
summaryField: ['sl', 'cost'],//计算列总和
|
||||
@ -165,6 +167,8 @@ const formatDict = (v: string, arr: Array<any>) => {
|
||||
|
||||
<style scoped lang="scss">
|
||||
.compact-form {
|
||||
height: 40px;
|
||||
|
||||
.el-form-item {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user