| | |
| | | }); |
| | | } |
| | | |
| | | //设å¤ä¿å
»åæ¡å¯¼åº |
| | | export function exportMaintenanceRecord(query) { |
| | | return request({ |
| | | url: "/deviceMaintain/exportMaintenanceRecord", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //设å¤ç»´æ¤å é¤ |
| | | export function deleteDeviceMaintenance(query) { |
| | | return request({ |
| | | url: "/deviceMaintain/deleteDeviceMaintenance", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æ°å¢è®¾å¤ç»´æ¤ä¿å
» |
| | | export function addDeviceMaintenance(data) { |
| | | return request({ |
| | | url: "/deviceMaintain/addDeviceMaintenance", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | //设å¤ç»´æ¤è¡¨ æ¥è¯¢ |
| | | export function getDeviceMaintenancePage(query) { |
| | | return request({ |
| | | url: "/deviceMaintain/getDeviceMaintenancePage", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // åç¨-ä¿å |
| | | export function saveDeviceBorrow(data) { |
| | | return request({ |
| | |
| | | params: query, |
| | | }); |
| | | } |
| | | //设å¤ç»´æ¤ä¿å
» æ¥è¯¢ |
| | | export function selectDeviceMaintenancePage(query) { |
| | | return request({ |
| | | url: "/deviceMaintain/selectDeviceMaintenancePage", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | //设å¤ç»´æ¤ä¿å
» å é¤ |
| | | export function deleteDeviceMaintenance(query) { |
| | | return request({ |
| | | url: "/deviceMaintain/deleteDeviceMaintenance", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | //设å¤ç»´æ¤ä¿å
» æ°å¢ |
| | | export function addDeviceMaintenance(query) { |
| | | return request({ |
| | | url: "/deviceMaintain/addDeviceMaintenance", |
| | | method: "post", |
| | | data: query, |
| | | }); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <div class="search"> |
| | | <el-button size="small" type="primary" @click="refreshTableList">å·æ°</el-button> |
| | | <el-button size="small" type="primary" @click="openDia('add')">æ° å»º</el-button> |
| | | <el-button :loading="outLoading" size="small" type="primary" @click="openHandleOut">导 åº</el-button> |
| | | </div> |
| | | <div> |
| | | <lims-table :tableData="tableData" :column="column" |
| | | height="calc(100vh - 20em)" @pagination="pagination" |
| | | :page="page" :tableLoading="tableLoading"></lims-table> |
| | | </div> |
| | | <el-dialog :visible.sync="dialogVisible" title="仪å¨è®¾å¤ä½¿ç¨ç»´æ¤ä¿å
»è¡¨" width="55%"> |
| | | <el-form ref="form" :model="form" label-width="130px" :rules="rules"> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ç»´æ¤æ¥æ:" prop="maintenanceDate"> |
| | | <el-date-picker v-model="form.maintenanceDate" :disabled="operationType === 'view'" |
| | | format="yyyy-MM-dd" size="small" placeholder="éæ©æ¥æ" style="width:100%" |
| | | type="date" value-format="yyyy-MM-dd"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="ç»´æ¤å
容:" prop="maintenanceContentArr"> |
| | | <el-checkbox-group v-model="form.maintenanceContentArr" :disabled="operationType === 'view'"> |
| | | <el-checkbox v-for="city in qualificationList" :key="city.label" :label="city.label" |
| | | :value="city.label"></el-checkbox> |
| | | </el-checkbox-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ç»´æ¤äºº:" prop="maintenanceUserId"> |
| | | <el-select v-model="form.maintenanceUserId" |
| | | clearable filterable |
| | | placeholder="è¯·éæ©" size="small" style="width: 100%;"> |
| | | <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="夿³¨:" prop="remark"> |
| | | <el-input v-model="form.remark" :disabled="operationType === 'view'" size="small" |
| | | style="width: 100%;"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="closeDia">å æ¶</el-button> |
| | | <el-button v-if="operationType !== 'view'" type="primary" @click="saveRecord" :loading="buttonLoading">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | addDeviceMaintenance, |
| | | deleteDeviceMaintenance, |
| | | selectDeviceMaintenancePage |
| | | } from "@/api/cnas/resourceDemand/device"; |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import {selectUserCondition} from "@/api/system/user"; |
| | | |
| | | export default { |
| | | name: '', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {limsTable}, |
| | | props: { |
| | | clickNodeVal: { |
| | | type: Object, |
| | | default: () => { |
| | | return {}; |
| | | } |
| | | }, |
| | | }, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | search: { |
| | | maintenanceDate: '', |
| | | }, |
| | | total: 0, |
| | | outLoading: false, |
| | | tableData: [], |
| | | tableLoading: false, |
| | | page: { |
| | | total: 0, |
| | | size: 20, |
| | | current: 1 |
| | | }, |
| | | column: [ |
| | | { label: 'ç»´æ¤æ¥æ', prop: 'maintenanceDate' }, |
| | | { label: 'ç»´æ¤å
容', prop: 'maintenanceContent' }, |
| | | { label: 'ç»´æ¤äºº', prop: 'maintenanceUserName' }, |
| | | { label: '夿³¨', prop: 'remark' }, |
| | | { |
| | | dataType: 'action', |
| | | label: 'æä½', |
| | | operation: [ |
| | | { |
| | | name: 'ç¼è¾', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.openDia('edit', row); |
| | | }, |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.handleDeleteClick(row); |
| | | }, |
| | | }, |
| | | ] |
| | | } |
| | | ], |
| | | dialogVisible: false, |
| | | form: { |
| | | id: '', |
| | | deviceId: '', |
| | | maintenanceDate: '', |
| | | maintenanceContentArr: [], |
| | | maintenanceContent: '', |
| | | maintenanceUserId: '', |
| | | remark: '', |
| | | }, |
| | | operationType: '', |
| | | buttonLoading: false, |
| | | qualificationList: [], |
| | | rules: { |
| | | maintenanceDate: [{ required: true, message: 'è¯·éæ©ç»´æ¤æ¥æ', trigger: 'change' }], |
| | | maintenanceContentArr: [{ required: true, message: 'è¯·éæ©ç»´æ¤å
容', trigger: 'change' }], |
| | | maintenanceUserId: [{ required: true, message: 'è¯·éæ©ç»´æ¤äºº', trigger: 'change' }], |
| | | }, |
| | | responsibleOptions: [], |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.refreshTableList() |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // ç¹å»å·æ° |
| | | refreshTableList () { |
| | | this.page.current = 1; |
| | | this.getTableList() |
| | | }, |
| | | // å页忢 |
| | | pagination(page) { |
| | | this.page.size = page.limit |
| | | this.getTableList() |
| | | }, |
| | | getTableList () { |
| | | this.tableLoading = true |
| | | selectDeviceMaintenancePage({ |
| | | deviceId: this.clickNodeVal.value, |
| | | ...this.page |
| | | }).then(res => { |
| | | this.tableLoading = false |
| | | this.tableData = res.data.records |
| | | this.page.total = res.data.total |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | }) |
| | | }, |
| | | // æå¼æä½å¼¹æ¡ |
| | | openDia (type, row) { |
| | | this.operationType = type |
| | | this.dialogVisible = true |
| | | this.$nextTick(() => { |
| | | this.$refs['form'].resetFields() |
| | | this.form.id = '' |
| | | if (this.operationType === 'edit') { |
| | | this.form = {...row} |
| | | this.$set(this.form, 'maintenanceContentArr', this.form.maintenanceContent.split(',')) |
| | | } |
| | | }) |
| | | this.getDictS() |
| | | this.getUserList() |
| | | }, |
| | | // æ¥è¯¢ç»´æ¤å
容鿩æ¡å
容 |
| | | getDictS () { |
| | | // å®ä¹å®éªå®¤åç§°ä¸ç»´æ¤å
容类åçæ å°å
³ç³» |
| | | const labTypeMapping = { |
| | | 'èå室': 'aging_maintenance_content', |
| | | 'èåå®éªå®¤': 'aging_maintenance_content', |
| | | 'çµæ§è½å®éªå®¤': 'electrical_maintenance_content', |
| | | 'ç¯å¢å®éªå®¤': 'environmental_maintenance_content', |
| | | 'çç§å®éªå®¤': 'burn_maintenance_content', |
| | | 'æ··ç¼å®éªå®¤': 'mixing_maintenance_content', |
| | | 'æ£æµä¸å¿çµæ§è½å®éªå®¤': 'center_electrical_maintenance_content', |
| | | 'ææ¸©äº': 'temperature2_maintenance_content', |
| | | 'ææ¸©ä¸': 'temperature1_maintenance_content', |
| | | 'åå¦å®éªå®¤': 'chemistry_maintenance_content', |
| | | 'å¶æ ·å®¤': 'sample_maintenance_content', |
| | | '使¸©å®éªå®¤': 'hypothermia_maintenance_content', |
| | | }; |
| | | // è·åå½åèç¹çå®éªå®¤åç§° |
| | | const name = this.clickNodeVal.parent.label; |
| | | // æ ¹æ®æ å°å
³ç³»è·å对åºçç±»å |
| | | const type = labTypeMapping[name]; |
| | | this.getDicts(type).then((response) => { |
| | | this.qualificationList = response.data.map((m) => { |
| | | return { |
| | | label: m.dictLabel, |
| | | value: m.dictValue, |
| | | }; |
| | | }); |
| | | }); |
| | | }, |
| | | openHandleOut () { |
| | | |
| | | }, |
| | | handleDeleteClick(row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æä»¶, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | deleteDeviceMaintenance({ id: row.id }).then(res => { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'å 餿å!' |
| | | }); |
| | | this.refreshTableList() |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | // æäº¤æ°å¢åä¿å |
| | | saveRecord () { |
| | | this.$refs.form.validate((valid) => { |
| | | if (valid) { |
| | | this.buttonLoading = true; |
| | | this.form.maintenanceContent = this.form.maintenanceContentArr.join(',') |
| | | this.form.deviceId = this.clickNodeVal.value |
| | | addDeviceMaintenance(this.form).then(res => { |
| | | this.buttonLoading = false; |
| | | this.$message.success('æ°å¢æå') |
| | | this.closeDia() |
| | | this.getTableList() |
| | | }).catch(err => { |
| | | this.buttonLoading = false; |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | closeDia () { |
| | | this.$refs['form'].resetFields(); |
| | | this.dialogVisible = false |
| | | this.refreshTableList() |
| | | }, |
| | | // è·åè´è´£äººä¿¡æ¯æ¥å£ |
| | | getUserList() { |
| | | selectUserCondition({type: 2}).then(res => { |
| | | if (res.code == 200) { |
| | | this.responsibleOptions = res.data |
| | | } |
| | | }) |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .search { |
| | | height: 46px; |
| | | text-align: right; |
| | | margin-top: 10px; |
| | | } |
| | | </style> |
| | |
| | | <el-tab-pane label="è®¾å¤æ ¡å" name="è®¾å¤æ ¡å"> |
| | | <calibration v-if="tabListActiveName == 'è®¾å¤æ ¡å'" :clickNodeVal="clickNodeVal" /> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="设å¤ç»´æ¤" name="设å¤ç»´æ¤"> |
| | | <maintenance v-if="tabListActiveName == '设å¤ç»´æ¤'" :clickNodeVal="clickNodeVal" /> |
| | | <el-tab-pane label="设å¤ç»´æ¤ä¿å
»" name="设å¤ç»´æ¤ä¿å
»"> |
| | | <equipmentMaintenance v-if="tabListActiveName == '设å¤ç»´æ¤ä¿å
»'" :clickNodeVal="clickNodeVal" /> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="设å¤åç¨" name="设å¤åç¨"> |
| | | <borrow v-if="tabListActiveName == '设å¤åç¨'" :clickNodeVal="clickNodeVal" /> |
| | |
| | | import files from "./component/files.vue"; |
| | | import calibration from "./component/calibration.vue"; |
| | | import check from "./component/check.vue"; |
| | | import maintenance from "./component/maintenance.vue"; |
| | | import borrow from "./component/borrow.vue"; |
| | | import fault from "./component/fault.vue"; |
| | | import record from "./component/record.vue"; |
| | |
| | | import EquipmentMaintenancePlan from "./component/equipmentMaintenancePlan.vue"; |
| | | import EquipmentAcceptance from "./component/equipmentAcceptance.vue"; |
| | | import QuantityValueTraceabilityPlan from "./component/quantityValueTraceabilityPlan.vue"; |
| | | import equipmentMaintenance from "./component/equipmentMaintenance.vue"; |
| | | import { |
| | | treeDevice, |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | |
| | | files, |
| | | calibration, |
| | | check, |
| | | maintenance, |
| | | borrow, |
| | | fault, |
| | | record, |
| | |
| | | management, |
| | | overview, |
| | | resourceReservation, |
| | | operationInstruction |
| | | operationInstruction, |
| | | equipmentMaintenance, |
| | | }, |
| | | data() { |
| | | return { |