@@ -1,82 +0,0 @@
|
||||
import request from '@/utils/request.js'
|
||||
|
||||
// 查询器材目录列表
|
||||
export function getInstrumentList(query) {
|
||||
return request({
|
||||
url: '/inspection/instrument/information-page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询器材目录详细
|
||||
export function getInstrumentOne(id) {
|
||||
return request({
|
||||
url: '/inspection/instrument/information-one',
|
||||
method: 'get',
|
||||
params: { id } // 确保参数正确传递
|
||||
})
|
||||
}
|
||||
|
||||
// 新增器材目录
|
||||
export function addInstrument(data) {
|
||||
return request({
|
||||
url: '/inspection/instrument/information',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改器材目录
|
||||
export function editInstrument(data) {
|
||||
return request({
|
||||
url: '/inspection/instrument/information',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// // 删除器材目录
|
||||
// export function delUser(userId) {
|
||||
// return request({
|
||||
// url: '/system/user/' + userId,
|
||||
// method: 'delete'
|
||||
// })
|
||||
// }
|
||||
|
||||
// 器材目录分类查询
|
||||
export function getInstrumentInit() {
|
||||
return request({
|
||||
url: '/inspection/instrument/init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function editInstrumentStatus(ids,type) {
|
||||
return request({
|
||||
url: '/inspection/instrument/information-status',
|
||||
method: 'post',
|
||||
data: {
|
||||
ids: ids,
|
||||
type: type
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 查询部门树形数据
|
||||
export function deptTreeSelect(queryParams) {
|
||||
return request({
|
||||
url: '/base-data-manage/organization/organization',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
// 查询地点树形数据
|
||||
export function locationTreeSelect(queryParams) {
|
||||
return request({
|
||||
url: '/base-data-manage/location/location-page-tree',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
@@ -1,402 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 添加或修改用户配置对话框 -->
|
||||
<el-dialog :title="title" v-model="visible" width="955px" append-to-body>
|
||||
<el-form
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
ref="instrumentDialogRef"
|
||||
label-width="110px"
|
||||
label-position="left"
|
||||
>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="仪器类型" prop="instrumentTypeEnum">
|
||||
<el-tree-select
|
||||
v-model="form.instrumentTypeEnum"
|
||||
:data="instrumentTypeEnum"
|
||||
:props="{ value: 'value', label: 'info', children: 'children' }"
|
||||
:disabled="false"
|
||||
value-key="value"
|
||||
placeholder="请选择样本类型"
|
||||
check-strictly
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="仪器编号" prop="instrumentCode">
|
||||
<el-input v-model="form.instrumentCode" placeholder="请输入仪器编号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="仪器名称" prop="instrumentName">
|
||||
<el-input v-model="form.instrumentName" placeholder="请输入仪器名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="仪器主码" prop="instrumentMainCode">
|
||||
<el-input v-model="form.instrumentMainCode" placeholder="请输入仪器主码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="仪器型号" prop="instrumentModel">
|
||||
<el-input v-model="form.instrumentModel" placeholder="请输入仪器型号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="制造商" prop="manufacturer">
|
||||
<el-input v-model="form.manufacturer" placeholder="请输入制造商" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="序列号" prop="serialNumber">
|
||||
<el-input v-model="form.serialNumber" placeholder="请输入序列号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="采购公司" prop="purchasingCompany">
|
||||
<el-input v-model="form.purchasingCompany" placeholder="请输入采购公司" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="联系人" prop="contactPerson">
|
||||
<el-input v-model="form.contactPerson" placeholder="请输入联系人" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="采购日期" prop="purchaseDate">
|
||||
<el-date-picker
|
||||
v-model="form.purchaseDate"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="datetime"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="原始价格" prop="originalPrice">
|
||||
<el-input v-model="form.originalPrice" placeholder="请输入原始价格" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="交易价格" prop="transactionPrice">
|
||||
<el-input v-model="form.transactionPrice" placeholder="请输入交易价格" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="安装日期" prop="installationDate">
|
||||
<el-date-picker
|
||||
v-model="form.installationDate"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="datetime"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="安装人员" prop="installationPerson">
|
||||
<el-input v-model="form.installationPerson" placeholder="请输入安装人员" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="维护人员" prop="maintenancePerson">
|
||||
<el-input v-model="form.maintenancePerson" placeholder="请输入维护人员" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="使用科室" prop="orgId">
|
||||
<el-tree-select
|
||||
v-model="form.orgId"
|
||||
:data="deptOptions"
|
||||
:props="{ value: 'id', label: 'name', children: 'children' }"
|
||||
value-key="id"
|
||||
placeholder="请选择科室"
|
||||
check-strictly
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="鉴定人员" prop="identificationPerson">
|
||||
<el-input v-model="form.identificationPerson" placeholder="请输入鉴定人员" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="记录温度" prop="recordedTemperature">
|
||||
<el-input v-model="form.recordedTemperature" placeholder="请输入记录温度" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="配件" prop="accessories">
|
||||
<el-input v-model="form.accessories" placeholder="请输入配件" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="仪器状态" prop="instrumentStatusEnum">
|
||||
<el-select v-model="form.instrumentStatusEnum" placeholder="请选择" clearable>
|
||||
<el-option
|
||||
v-for="dict in InstrumentStatusEnumOption"
|
||||
:key="dict.value"
|
||||
:label="dict.info"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="损坏报告日期" prop="damageReportDate">
|
||||
<el-date-picker
|
||||
v-model="form.damageReportDate"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="datetime"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="是否可重新检查" prop="recheckableInstrumentEnum">
|
||||
<el-select v-model="form.recheckableInstrumentEnum" placeholder="请选择" clearable>
|
||||
<el-option label="是" :value="1"></el-option>
|
||||
<el-option label="否" :value="0"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="使用状态" prop="usageStatusEnum">
|
||||
<el-select
|
||||
v-model="form.usageStatusEnum"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in statusFlagOptions"
|
||||
:key="dict.value"
|
||||
:label="dict.info"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item >
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="报废原因" prop="decommissionReason">
|
||||
<el-input v-model="form.decommissionReason" placeholder="请输入报废原因" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="备注" prop="remarks">
|
||||
<el-input v-model="form.remarks" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer v-if="title != '查看'">
|
||||
<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="InstrumentDialog">
|
||||
import { editInstrument, addInstrument, deptTreeSelect, locationTreeSelect } from './instrument.js';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const title = ref('');
|
||||
const visible = ref(false);
|
||||
const emits = defineEmits(['submit']); // 声明自定义事件
|
||||
const instrumentTypeEnum = ref([]); // 仪器分类
|
||||
const statusFlagOptions = ref([]); // 使用状态标记
|
||||
const InstrumentStatusEnumOption = ref([]); // 仪器状态标记
|
||||
const deptOptions = ref(undefined); // 部门树选项
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
rules: {
|
||||
|
||||
},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
const props = defineProps({
|
||||
item: {
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
required: false,
|
||||
},
|
||||
instrumentTypeEnum: {
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
statusFlagOptions: {
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
instrumentStatusEnumOption:{
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
});
|
||||
|
||||
// 显示弹框
|
||||
function show() {
|
||||
console.log("2111",props.instrumentStatusEnumOption)
|
||||
reset();
|
||||
title.value = '';
|
||||
title.value = props.title;
|
||||
instrumentTypeEnum.value = props.instrumentTypeEnum;
|
||||
statusFlagOptions.value = props.statusFlagOptions;
|
||||
InstrumentStatusEnumOption.value = props.instrumentStatusEnumOption;
|
||||
getDeptTree()
|
||||
visible.value = true;
|
||||
|
||||
}
|
||||
//医保目录对照后,赋值
|
||||
function setValue(row) {
|
||||
form.value = {
|
||||
name: formatValue(row.consumableName), //医疗服务项目名称
|
||||
// modelNumber: formatValue(row.productModel), // 产品型号
|
||||
modelNumber: formatValue(row.specification), // 规格
|
||||
manufacturerText: formatValue(row.manufacturerName), // 厂家名称
|
||||
partPercent: 1,
|
||||
};
|
||||
}
|
||||
|
||||
// 显示弹框
|
||||
function edit() {
|
||||
reset();
|
||||
title.value = '';
|
||||
title.value = props.title;
|
||||
form.value = props.item;
|
||||
instrumentTypeEnum.value = props.instrumentTypeEnum;
|
||||
statusFlagOptions.value = props.statusFlagOptions;
|
||||
InstrumentStatusEnumOption.value = props.instrumentStatusEnumOption;
|
||||
getDeptTree();
|
||||
visible.value = true;
|
||||
}
|
||||
/** 重置操作表单 */
|
||||
function reset() {
|
||||
form.value = {
|
||||
id: undefined,
|
||||
instrumentCode: undefined,
|
||||
instrumentName: undefined,
|
||||
instrumentMainCode: undefined,
|
||||
instrumentType: 1, // 替换为 1
|
||||
instrumentModel: undefined,
|
||||
manufacturer: undefined,
|
||||
serialNumber: undefined,
|
||||
purchasingCompany: undefined,
|
||||
contactPerson: undefined,
|
||||
purchaseDate: undefined,
|
||||
originalPrice: undefined,
|
||||
transactionPrice: undefined,
|
||||
installationDate: undefined,
|
||||
installationPerson: undefined,
|
||||
maintenancePerson: undefined,
|
||||
department: undefined,
|
||||
identificationPerson: undefined,
|
||||
recordedTemperature: undefined,
|
||||
accessories: undefined,
|
||||
instrumentStatus: 1, // 替换为 1
|
||||
damageReportDate: undefined,
|
||||
recheckableInstrument: 1, // 替换为 1
|
||||
usageStatusEnum: 2, // 替换为 1
|
||||
decommissionReason: undefined,
|
||||
remarks: undefined
|
||||
};
|
||||
proxy.resetForm('instrumentDialogRef');
|
||||
}
|
||||
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
proxy.$refs['instrumentDialogRef'].validate((valid) => {
|
||||
if (valid) {
|
||||
console.log(form.value, 'form.value');
|
||||
if (form.value.id != undefined) {
|
||||
editInstrument(form.value).then((response) => {
|
||||
// 触发自定义事件,并传递数据给父组件
|
||||
emits('submit');
|
||||
proxy.$modal.msgSuccess('修改成功');
|
||||
visible.value = false;
|
||||
reset(); // 重置表单数据
|
||||
});
|
||||
} else {
|
||||
addInstrument(form.value).then((response) => {
|
||||
// 触发自定义事件,并传递数据给父组件
|
||||
emits('submit');
|
||||
proxy.$modal.msgSuccess('新增成功');
|
||||
visible.value = false;
|
||||
reset(); // 重置表单数据
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
function getDeptTree() {
|
||||
deptTreeSelect().then((response) => {
|
||||
console.log(response, 'response查询部门下拉树结构');
|
||||
deptOptions.value = response.data.records;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
function formatValue(str) {
|
||||
if (str === null || str === undefined || str === '' || str === 'null') {
|
||||
return undefined;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
/** 取消按钮 */
|
||||
function cancel() {
|
||||
visible.value = false;
|
||||
reset();
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
show,
|
||||
edit,
|
||||
setValue,
|
||||
});
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-form--inline .el-form-item {
|
||||
display: inline-flex;
|
||||
vertical-align: middle;
|
||||
margin-right: 10px !important;
|
||||
}
|
||||
|
||||
/* 使用深度选择器 */
|
||||
.custom-label-spacing :deep(.el-form-item__label) {
|
||||
line-height: 1.2; /* 调整行间距 */
|
||||
margin-bottom: 4px; /* 调整 label 和输入框之间的间距 */
|
||||
}
|
||||
</style>
|
||||
@@ -1,505 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="20">
|
||||
<!--器材目录-->
|
||||
<el-col :span="4" :xs="24">
|
||||
<div class="head-title">仪器类型目录</div>
|
||||
<div class="head-container">
|
||||
<el-tree
|
||||
:data="instrumentType"
|
||||
:props="{ label: 'info', children: 'children' }"
|
||||
:expand-on-click-node="false"
|
||||
:filter-node-method="filterNode"
|
||||
ref="treeRef"
|
||||
node-key="id"
|
||||
highlight-current
|
||||
default-expand-all
|
||||
@node-click="handleNodeClick"
|
||||
/>
|
||||
</div>
|
||||
</el-col>
|
||||
<!--器材目录-->
|
||||
<el-col :span="20" :xs="24">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="68px"
|
||||
>
|
||||
<el-row :gutter="24">
|
||||
<!-- <el-col :span="6"> -->
|
||||
<el-form-item label="仪器名" prop="searchKey" label-width="55">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="名称/编码/"
|
||||
clearable
|
||||
style="width: 220px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- </el-col> -->
|
||||
<!-- <el-col :span="5"> -->
|
||||
<el-form-item label="状态" prop="statusEnum" label-width="50">
|
||||
<el-select v-model="queryParams.statusEnum" clearable>
|
||||
<el-option
|
||||
v-for="status in statusFlagOptions"
|
||||
:key="status.value"
|
||||
:label="status.info"
|
||||
:value="status.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Plus"
|
||||
@click="openAddInstrument()"
|
||||
>添加</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="Remove"
|
||||
:disabled="multiple"
|
||||
@click="handleClose"
|
||||
>停用</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="CirclePlus"
|
||||
:disabled="multiple"
|
||||
@click="handleStart"
|
||||
>启用</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Search"
|
||||
@click="getList"
|
||||
>查询</el-button
|
||||
>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="Download"
|
||||
@click="handleExport"
|
||||
>导出Excel</el-button
|
||||
>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="instrumentList"
|
||||
@selection-change="handleSelectionChange"
|
||||
width="90%"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="仪器编码"
|
||||
align="center"
|
||||
key="instrumentCode"
|
||||
prop="instrumentCode"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="仪器名称"
|
||||
align="center"
|
||||
key="instrumentName"
|
||||
prop="instrumentName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="主编码"
|
||||
align="center"
|
||||
key="instrumentMainCode"
|
||||
prop="instrumentMainCode"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="类型"
|
||||
align="center"
|
||||
key="instrumentTypeEnumText"
|
||||
prop="instrumentTypeEnumText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="型号"
|
||||
align="center"
|
||||
key="instrumentModel"
|
||||
prop="instrumentModel"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="生产厂家"
|
||||
align="center"
|
||||
key="manufacturer"
|
||||
prop="manufacturer"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="序列号"
|
||||
align="center"
|
||||
key="serialNumber"
|
||||
prop="serialNumber"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="采购单位"
|
||||
align="center"
|
||||
key="purchasingCompany"
|
||||
prop="purchasingCompany"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="联系人"
|
||||
align="center"
|
||||
key="contactPerson"
|
||||
prop="contactPerson"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="采购日期"
|
||||
align="center"
|
||||
key="purchaseDate"
|
||||
prop="purchaseDate"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="原价"
|
||||
align="center"
|
||||
key="originalPrice"
|
||||
prop="originalPrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="成交价"
|
||||
align="center"
|
||||
key="transactionPrice"
|
||||
prop="transactionPrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="安装日期"
|
||||
align="center"
|
||||
key="installationDate"
|
||||
prop="installationDate"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.installationDate )}}</span>
|
||||
</template>
|
||||
</el-table-column>>
|
||||
<el-table-column
|
||||
label="安装人"
|
||||
align="center"
|
||||
key="installationPerson"
|
||||
prop="installationPerson"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="维护人"
|
||||
align="center"
|
||||
key="maintenancePerson"
|
||||
prop="maintenancePerson"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="使用科室"
|
||||
align="center"
|
||||
key="orgId_dictText"
|
||||
prop="orgId_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
</el-table-column>>
|
||||
<el-table-column
|
||||
label="鉴定人"
|
||||
align="center"
|
||||
key="identificationPerson"
|
||||
prop="identificationPerson"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="记录温度"
|
||||
align="center"
|
||||
key="recordedTemperature"
|
||||
prop="recordedTemperature"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="附件"
|
||||
align="center"
|
||||
key="accessories"
|
||||
prop="accessories"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="仪器状态"
|
||||
align="center"
|
||||
key="instrumentStatusEnum"
|
||||
prop="instrumentStatusEnum"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="报损日期"
|
||||
align="center"
|
||||
key="damageReportDate"
|
||||
prop="damageReportDate"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="可复检"
|
||||
align="center"
|
||||
key="recheckableInstrumentEnum"
|
||||
prop="recheckableInstrumentEnum"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="使用情况"
|
||||
align="center"
|
||||
key="usageStatusEnum"
|
||||
prop="usageStatusEnum"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="报废原因"
|
||||
align="center"
|
||||
key="decommissionReason"
|
||||
prop="decommissionReason"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="备注"
|
||||
align="center"
|
||||
key="remarks"
|
||||
prop="remarks"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="150"
|
||||
class-name="small-padding fixed-width"
|
||||
fixed="right"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Edit"
|
||||
@click="openEditInstrument(scope.row)"
|
||||
>编辑</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<instrument-dialog
|
||||
ref="instrumentRef"
|
||||
:title="title"
|
||||
:item="currentData"
|
||||
:instrument-type-enum="instrumentTypeList"
|
||||
:statusFlagOptions="statusFlagOptions"
|
||||
:instrument-status-enum-option="instrumentStatusEnumOptions"
|
||||
@submit="getList()"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="instrument">
|
||||
import {
|
||||
getInstrumentList,
|
||||
getInstrumentOne, getInstrumentInit, editInstrumentStatus,
|
||||
} from "./components/instrument.js";
|
||||
import instrumentDialog from "./components/instrumentDialog.vue";
|
||||
import { nextTick } from "vue";
|
||||
import {parseTime} from "../../../utils/his.js";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const instrumentList = ref([]);
|
||||
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 instrumentType = ref(undefined);
|
||||
const instrumentTypeList = ref(undefined);
|
||||
const statusFlagOptions = ref(undefined);
|
||||
const instrumentStatusEnumOptions = ref(undefined);
|
||||
|
||||
const currentData = ref({});
|
||||
|
||||
const viewData = ref({});
|
||||
const currentCategoryEnum = ref("");
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined, // 品名/商品名/英文品名/编码/拼音
|
||||
typeEnum: undefined, // 类型
|
||||
statusEnum: undefined, // 状态(
|
||||
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 通过条件过滤节点 */
|
||||
const filterNode = (value, data) => {
|
||||
if (!value) return true;
|
||||
return data.label.indexOf(value) !== -1;
|
||||
};
|
||||
|
||||
/** 样本分类查询下拉树结构 */
|
||||
function getTreatmentList() {
|
||||
getInstrumentInit().then((response) => {
|
||||
console.log(response, "response器材目录分类查询下拉树结构");
|
||||
instrumentType.value = JSON.parse(JSON.stringify(response.data.instrumentTypeList)).sort((a, b) => {
|
||||
return parseInt(a.value) - parseInt(b.value);
|
||||
});
|
||||
instrumentType.value.push({ info: "全部", value: "" });
|
||||
instrumentTypeList.value = response.data.instrumentTypeList.sort((a, b) => {
|
||||
return parseInt(a.value) - parseInt(b.value);
|
||||
});
|
||||
statusFlagOptions.value = response.data.statusFlagOptions;
|
||||
instrumentStatusEnumOptions.value = response.data.instrumentStatusEnumList;
|
||||
|
||||
});
|
||||
}
|
||||
/** 查询器材目录列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getInstrumentList(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
instrumentList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
/** 节点单击事件 */
|
||||
function handleNodeClick(data) {
|
||||
queryParams.value.instrumentTypeEnum = data.value;
|
||||
currentCategoryEnum.value = data.value;
|
||||
handleQuery();
|
||||
}
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 启用按钮操作 */
|
||||
function handleStart() {
|
||||
const startIds = ids.value;
|
||||
// selectedData
|
||||
proxy.$modal
|
||||
.confirm("是否确定启用数据!")
|
||||
.then(function () {
|
||||
return editInstrumentStatus(startIds,'启用');
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("启用成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
/** 停用按钮操作 */
|
||||
function handleClose() {
|
||||
const stopIds = ids.value;
|
||||
proxy.$modal
|
||||
.confirm("是否确认停用数据!")
|
||||
.then(function () {
|
||||
return editInstrumentStatus(stopIds,'停用');
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("停用成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
proxy.download(
|
||||
"system/user/export",
|
||||
{
|
||||
...queryParams.value,
|
||||
},
|
||||
`user_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
console.log(selection, "selection");
|
||||
// selectedData.value = selection.map((item) => ({ ...item })); // 存储选择的行数据
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 打开新增弹窗 */
|
||||
function openAddInstrument() {
|
||||
// if (!currentCategoryEnum.value) {
|
||||
// return proxy.$modal.msgError("请选择器材目录分类");
|
||||
// }
|
||||
title.value = "新增";
|
||||
nextTick(() => {
|
||||
proxy.$refs.instrumentRef.show();
|
||||
});
|
||||
}
|
||||
/** 打开编辑弹窗 */
|
||||
function openEditInstrument(row) {
|
||||
currentData.value = {};
|
||||
console.log("打开编辑弹窗");
|
||||
getInstrumentOne(row.id).then((response) => {
|
||||
console.log(response, "currentDataform");
|
||||
currentData.value = response.data;
|
||||
title.value = "编辑";
|
||||
nextTick(() => {
|
||||
proxy.$refs["instrumentRef"].edit();
|
||||
});
|
||||
getList();
|
||||
});
|
||||
}
|
||||
getTreatmentList();
|
||||
getList();
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-form--inline .el-form-item {
|
||||
display: inline-flex;
|
||||
vertical-align: middle;
|
||||
margin-right: 10px !important;
|
||||
}
|
||||
.el-select{
|
||||
width: 150px!important;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user