| | |
| | | <!-- 列表 --> |
| | | <ContentWrap> |
| | | <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="purchaseDate" :formatter="dateFormatter2" width="120px"/> |
| | | <!-- <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"> |
| | | <template #default="scope"> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="型号" align="center" prop="model" /> |
| | | <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="createTime" |
| | | :formatter="dateFormatter" |
| | | :formatter="dateFormatter2" |
| | | width="180px" |
| | | /> |
| | | <el-table-column label="操作" align="center" min-width="120px"> |
| | |
| | | v-hasPermi="['ecg:device:update']" |
| | | > |
| | | 编辑 |
| | | </el-button> |
| | | <el-button |
| | | link |
| | | type="primary" |
| | | @click="openForm('devState', scope.row.id)" |
| | | v-hasPermi="['ecg:device:update']" |
| | | > |
| | | 设备状态 |
| | | </el-button> |
| | | <el-button |
| | | link |
| | |
| | | } |
| | | } |
| | | |
| | | 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 "已报废"; |
| | | } |
| | | |
| | | /** 初始化 **/ |
| | | onMounted(() => { |
| | | getList() |