| | |
| | | class="!w-220px" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="创建时间" prop="createTime"> |
| | | <el-date-picker |
| | | v-model="queryParams.createTime" |
| | | 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-input |
| | | v-model="queryParams.devId" |
| | |
| | | @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 DevStateOptions" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="分类名" prop="category"> |
| | | <el-select |
| | |
| | | </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="lost" > |
| | | <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" |
| | |
| | | :formatter="dateFormatter2" |
| | | width="180px" |
| | | /> |
| | | --> |
| | | <el-table-column label="操作" align="center" min-width="120px"> |
| | | <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 {dateFormatter, dateFormatter2} from '@/utils/formatTime' |
| | | import {dateFormatter2} from '@/utils/formatTime' |
| | | 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: [], |
| | | category: undefined, |
| | | brand: undefined, |
| | | model: undefined |
| | |
| | | handleQuery() |
| | | } |
| | | |
| | | const showPatient = async (rentId: number) => { |
| | | if (!rentId) return |
| | | |
| | | const devRent = await DevRentApi.getDevRent(rentId) |
| | | ElMessageBox.alert(devRent.patName + " " + devRent.patDetails, '患者信息'); |
| | | } |
| | | |
| | | /** 添加/修改操作 */ |
| | | const formRef = ref() |
| | | const openForm = (type: string, id?: number) => { |
| | |
| | | } finally { |
| | | exportLoading.value = false |
| | | } |
| | | } |
| | | |
| | | const tranlateDevState = (state) => { |
| | | if (state === 0) return "空闲"; |
| | | else if (state=== 5) return "已领用"; |
| | | else if (state=== 10) return "已装机"; |
| | | else if (state=== 20) return "已遗失"; |
| | | else if (state=== 30) return "维修中"; |
| | | else if (state=== 40) return "已报废"; |
| | | } |
| | | |
| | | const categoryChanged = async () => { |