| | |
| | | :model="queryParams" |
| | | ref="queryFormRef" |
| | | :inline="true" |
| | | label-width="68px" |
| | | label-width="100px" |
| | | > |
| | | <el-form-item label="采购日期" prop="purchaseDate"> |
| | | <el-date-picker |
| | | v-model="queryParams.purchaseDate" |
| | | value-format="YYYY-MM-DD HH:mm:ss" |
| | | type="daterange" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期" |
| | | :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]" |
| | | class="!w-220px" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="设备编号" prop="devId"> |
| | | <el-form-item label="设备部门编号" prop="devId"> |
| | | <el-input |
| | | v-model="queryParams.devId" |
| | | placeholder="请输入设备编号" |
| | | v-model="queryParams.devCodeDept" |
| | | placeholder="请输入设备部门编号" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | class="!w-240px" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="设备医院编号" prop="devId"> |
| | | <el-input |
| | | v-model="queryParams.devCodeHosp" |
| | | placeholder="请输入设备医院编号" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | class="!w-240px" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="设备固有编号" prop="devId"> |
| | | <el-input |
| | | v-model="queryParams.devCodeIntrinsic" |
| | | placeholder="请输入设备固有编号" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | class="!w-240px" |
| | | /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="状态" prop="state"> |
| | | <el-select |
| | | v-model="queryParams.state" |
| | | multiple |
| | | placeholder="请选择状态" |
| | | clearable |
| | | class="!w-240px" |
| | | > |
| | | <el-option |
| | | v-for="dict in stateOptions" |
| | | v-for="dict in DevStateOptions" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="采购日期" prop="purchaseDate"> |
| | | <el-date-picker |
| | | v-model="queryParams.purchaseDate" |
| | | value-format="YYYY-MM-DD HH:mm:ss" |
| | | type="daterange" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期" |
| | | :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]" |
| | | class="!w-220px" |
| | | /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item> |
| | | <el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button> |
| | | <el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button> |
| | |
| | | <el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true"> |
| | | <!-- <el-table-column label="id" align="center" prop="id" />--> |
| | | <el-table-column label="设备编号" align="center" prop="devId" width="100px" /> |
| | | <el-table-column label="分类名" align="center" prop="category"> |
| | | <el-table-column label="分类" align="center" prop="category" width="60px"> |
| | | <template #default="scope"> |
| | | <dict-tag :type="DICT_TYPE.ECG_DEV_CATEGORY" :value="scope.row.category" /> |
| | | </template> |
| | |
| | | <dict-tag :type="DICT_TYPE.ECG_DEV_BRAND" :value="scope.row.brand" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="型号" align="center" prop="model" /> |
| | | <el-table-column label="状态" align="center" prop="lost" > |
| | | <el-table-column label="型号" align="center" prop="model" width="100px"/> |
| | | <el-table-column label="状态" align="center" prop="lost" width="80px"> |
| | | <template #default="scope"> |
| | | <span>{{tranlateDevState(scope.row.state)}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="采购日期" align="center" prop="purchaseDate" :formatter="dateFormatter2" width="120px"/> |
| | | <el-table-column label="状态日期" align="center" prop="stateDate" :formatter="dateFormatter2" width="120px"/> |
| | | <!-- |
| | | <el-table-column |
| | | label="创建时间" |
| | | align="center" |
| | | prop="createTime" |
| | | :formatter="dateFormatter2" |
| | | width="180px" |
| | | /> |
| | | --> |
| | | <el-table-column label="操作" align="center" min-width="120px"> |
| | | |
| | | <el-table-column label="患者" align="center" prop="patDetails" width="400px"> |
| | | <template #default="scope"> |
| | | <span>{{scope.row.patDetails?.name}} {{scope.row.patDetails?.mobile}} {{scope.row.patDetails?.wardDesc}} {{scope.row.patDetails?.bedNo}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column label="状态日期" align="center" prop="stateDate" :formatter="dateFormatter2" width="120px"/> |
| | | <el-table-column label="采购日期" align="center" prop="purchaseDate" :formatter="dateFormatter2" width="120px"/> |
| | | |
| | | <el-table-column label="备注" align="center" prop="comment" width="100px" /> |
| | | |
| | | <!-- |
| | | <el-table-column |
| | | label="创建时间" |
| | | align="center" |
| | | prop="createTime" |
| | | :formatter="dateFormatter2" |
| | | width="180px" |
| | | /> |
| | | --> |
| | | <el-table-column label="操作" align="center" min-width="170px"> |
| | | <template #default="scope"> |
| | | <!-- |
| | | <el-button |
| | | link |
| | | type="primary" |
| | | @click="showPatient(scope.row.rentId)" |
| | | v-hasPermi="['ecg:device:update']" |
| | | v-if= scope.row.rentId |
| | | > |
| | | 查患者 |
| | | </el-button> |
| | | --> |
| | | <el-button |
| | | link |
| | | type="primary" |
| | |
| | | @click="openForm('devState', scope.row.id)" |
| | | v-hasPermi="['ecg:device:update']" |
| | | > |
| | | 设备状态 |
| | | 改状态 |
| | | </el-button> |
| | | <el-button |
| | | link |
| | |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { ElMessageBox } from 'element-plus' |
| | | import {getStrDictOptions, DICT_TYPE, DictDataType} from '@/utils/dict' |
| | | import {dateFormatter2} from '@/utils/formatTime' |
| | | import {tranlateDevState} from "@/utils/statusFormatter"; |
| | | import {DevStateOptions, tranlateDevState} from "@/utils/statusFormatter"; |
| | | import download from '@/utils/download' |
| | | import {DeviceApi, DeviceVO, DevModelApi, OptionsVO} from '@/api/ecg/devmanage' |
| | | import DeviceForm from './DeviceForm.vue' |
| | | import {DevRentApi} from "@/api/ecg/devrent"; |
| | | |
| | | /** 设备 列表 */ |
| | | defineOptions({ name: 'Device' }) |
| | |
| | | purchaseDate: [], |
| | | createTime: [], |
| | | devId: undefined, |
| | | state: undefined, |
| | | devCodeIntrinsic: undefined, |
| | | devCodeHosp: undefined, |
| | | devCodeDept: undefined, |
| | | state: [], |
| | | category: undefined, |
| | | brand: undefined, |
| | | model: undefined |
| | |
| | | const resetQuery = () => { |
| | | queryFormRef.value.resetFields() |
| | | handleQuery() |
| | | } |
| | | |
| | | const showPatient = async (rentId: number) => { |
| | | if (!rentId) return |
| | | |
| | | const devRent = await DevRentApi.getDevRent(rentId) |
| | | ElMessageBox.alert(devRent.patName + " " + devRent.patDetails, '患者信息'); |
| | | } |
| | | |
| | | /** 添加/修改操作 */ |
| | |
| | | } |
| | | |
| | | const categoryChanged = async () => { |
| | | const data = await DevModelApi.getBrandOption(queryParams.category!) |
| | | const data = await DevModelApi.getBrandOption(queryParams.category??'') |
| | | brandOptions.value = data |
| | | |
| | | queryParams.brand = '' |
| | |
| | | } |
| | | |
| | | const brandChanged = async () => { |
| | | const data = await DevModelApi.getModelOption(queryParams.category!, queryParams.brand!) |
| | | const data = await DevModelApi.getModelOption(queryParams.category??'', queryParams.brand??'') |
| | | modelOptions.value = data |
| | | |
| | | queryParams.model = '' |
| | |
| | | const data = await getStrDictOptions(DICT_TYPE.ECG_DEV_CATEGORY) |
| | | categoryOptions.value = data |
| | | |
| | | categoryChanged() |
| | | |
| | | getList() |
| | | }) |
| | | </script> |