| | |
| | | params: query, |
| | | }); |
| | | } |
| | | //使用记录 导出 |
| | | export function exportUseRecord(query) { |
| | | return request({ |
| | | url: "/deviceRecord/exportUseRecord", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //新增设备档案 |
| | | export function addDocument(data) { |
| | |
| | | } |
| | | |
| | | //设备验收(装备)导出 |
| | | export function exportUseRecord(query) { |
| | | export function exportDeviceAcceptance(query) { |
| | | return request({ |
| | | url: "/deviceRecord/exportUseRecord", |
| | | url: "/deviceAcceptance/exportDeviceAcceptance", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | |
| | | }); |
| | | } |
| | | |
| | | //设备操作日志和记录 |
| | | export function deviceLog(query) { |
| | | //设备校准 新增 更新 |
| | | export function saveOrUpdateDeviceMetric(data) { |
| | | return request({ |
| | | url: "/api/deviceLog/" + query, |
| | | method: "get", |
| | | // params: query, |
| | | url: "/deviceMetrics/saveOrUpdateDeviceMetric", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | //设备维护删除 |
| | | export function deviceMaintainDelete(query) { |
| | | export function deleteDeviceMaintenance(query) { |
| | | return request({ |
| | | url: "/deviceMaintain/delete/" + query, |
| | | url: "/deviceMaintain/deleteDeviceMaintenance", |
| | | method: "delete", |
| | | // params: query, |
| | | 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({ |
| | | url: "/deviceBorrow/saveDeviceBorrow", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //借用-查看 |
| | | export function getDeviceBorrow(query) { |
| | | return request({ |
| | | url: "/deviceBorrow/getDeviceBorrow", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //借用-导出 |
| | | export function deviceBorrowExport(query) { |
| | | return request({ |
| | | url: "/deviceBorrow/deviceBorrowExport", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //借用-删除 |
| | | export function deleteDeviceBorrow(query) { |
| | | return request({ |
| | | url: "/deviceBorrow/deleteDeviceBorrow", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //借用-列表 |
| | | export function deviceBorrowPage(query) { |
| | | return request({ |
| | | url: "/deviceBorrow/deviceBorrowPage", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // 设备启用/停用 保存,提交,驳回,通过接口 |
| | | export function saveDeviceState(data) { |
| | | return request({ |
| | | url: "/deviceState/saveDeviceState", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | |
| | | }); |
| | | } |
| | | |
| | | // 借用-保存 |
| | | export function saveDeviceBorrow(data) { |
| | | //设备停启用单条导出 |
| | | export function exportDeviceStatus(query) { |
| | | return request({ |
| | | url: "/deviceBorrow/saveDeviceBorrow", |
| | | url: "/deviceState/exportDeviceStatus", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //设备启用/停用 删除 |
| | | export function deleteDeviceState(query) { |
| | | return request({ |
| | | url: "/deviceState/deleteDeviceState", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //设备状态导出 |
| | | export function deviceStateExport(query) { |
| | | return request({ |
| | | url: "/deviceState/deviceStateExport", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //设备启用/停用 分页 |
| | | export function getDeviceStatePage(query) { |
| | | return request({ |
| | | url: "/deviceState/getDeviceStatePage", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //设备报废申请列表 |
| | | export function pageDeviceScrapped(query) { |
| | | return request({ |
| | | url: "/deviceScrapped/pageDeviceScrapped", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // 导出 |
| | | export function exportDeviceScrapped(query) { |
| | | return request({ |
| | | url: "/deviceScrapped/exportDeviceScrapped", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //删除设备报废申请 |
| | | export function delDeviceScrapped(query) { |
| | | return request({ |
| | | url: "/deviceScrapped/delDeviceScrapped", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //查询设备报废申请 |
| | | export function getDeviceScrapped(query) { |
| | | return request({ |
| | | url: "/deviceScrapped/getDeviceScrapped", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // 新增设备报废申请 |
| | | export function addDeviceScrapped(data) { |
| | | return request({ |
| | | url: "/deviceScrapped/addDeviceScrapped", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //设备故障维修列表 |
| | | export function pageDeviceBreakdownMaintenance(query) { |
| | | return request({ |
| | | url: "/deviceBreakdownMaintenance/pageDeviceBreakdownMaintenance", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // 设备故障与维修-导出 |
| | | export function exportDeviceBreakdownMaintenance(query) { |
| | | return request({ |
| | | url: "/deviceBreakdownMaintenance/exportDeviceBreakdownMaintenance", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //删除设备故障维修 |
| | | export function delDeviceBreakdownMaintenance(query) { |
| | | return request({ |
| | | url: "/deviceBreakdownMaintenance/delDeviceBreakdownMaintenance", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //查询设备故障维修 |
| | | export function getDeviceBreakdownMaintenance(query) { |
| | | return request({ |
| | | url: "/deviceBreakdownMaintenance/getDeviceBreakdownMaintenance", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // 新增设备故障维修 |
| | | export function addDeviceBreakdownMaintenance(data) { |
| | | return request({ |
| | | url: "/deviceBreakdownMaintenance/addDeviceBreakdownMaintenance", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //分页查询设备点检记录 |
| | | export function getDeviceInspectionRecordByPage(query) { |
| | | return request({ |
| | | url: "/deviceInspectionRecord/getDeviceInspectionRecordByPage", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // 导出设备点检记录 |
| | | export function exportDeviceInspectionRecord(query) { |
| | | return request({ |
| | | url: "/deviceInspectionRecord/exportDeviceInspectionRecord", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //删除设备点检记录 |
| | | export function deleteDeviceInspectionRecord(query) { |
| | | return request({ |
| | | url: "/deviceInspectionRecord/deleteDeviceInspectionRecord", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //设备点检记录详情 |
| | | export function getDeviceInspectionRecord(query) { |
| | | return request({ |
| | | url: "/deviceInspectionRecord/getDeviceInspectionRecord", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // 新增设备点检记录 |
| | | export function addDeviceInspectionRecord(data) { |
| | | return request({ |
| | | url: "/deviceInspectionRecord/addDeviceInspectionRecord", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // 修改设备点检记录 |
| | | export function updateDeviceInspectionRecord(data) { |
| | | return request({ |
| | | url: "/deviceInspectionRecord/updateDeviceInspectionRecord", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // 复核设备点检记录 |
| | | export function reviewDeviceInspectionRecord(data) { |
| | | return request({ |
| | | url: "/deviceInspectionRecord/reviewDeviceInspectionRecord", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //设备事故报告列表 |
| | | export function pageDeviceAccidentReport(query) { |
| | | return request({ |
| | | url: "/deviceAccidentReport/pageDeviceAccidentReport", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // 导出设备事故 |
| | | export function exportDeviceAccidentReport(query) { |
| | | return request({ |
| | | url: "/deviceAccidentReport/exportDeviceAccidentReport", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //删除设备事故报告 |
| | | export function delDeviceAccidentReport(query) { |
| | | return request({ |
| | | url: "/deviceAccidentReport/delDeviceAccidentReport", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //查询设备事故报告 |
| | | export function getDeviceAccidentReport(query) { |
| | | return request({ |
| | | url: "/deviceAccidentReport/getDeviceAccidentReport", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // 新增设备事故报告 |
| | | export function addDeviceAccidentReport(data) { |
| | | return request({ |
| | | url: "/deviceAccidentReport/addDeviceAccidentReport", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //作业指导书 审批 |
| | | export function approvalOfHomeworkInstructionManual(data) { |
| | | return request({ |
| | | url: "/deviceInstruction/approvalOfHomeworkInstructionManual", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //作业指导书 删除 |
| | | export function homeworkGuidebook(query) { |
| | | return request({ |
| | | url: "/deviceInstruction/homeworkGuidebook", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //作业指导书 编辑查询 |
| | | export function homeworkGuidebookEditor(query) { |
| | | return request({ |
| | | url: "/deviceInstruction/homeworkGuidebookEditor", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //作业指导书新增 |
| | | export function newHomeworkGuidebookAdded(data) { |
| | | return request({ |
| | | url: "/deviceInstruction/newHomeworkGuidebookAdded", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //作业指导书受控文件删除 |
| | | export function deleteHomeworkGuidebook(query) { |
| | | return request({ |
| | | url: "/deviceInstruction/deleteHomeworkGuidebook", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //作业指导书 查询 |
| | | export function pageByPageQueryOfHomeworkInstructions(query) { |
| | | return request({ |
| | | url: "/deviceInstruction/pageByPageQueryOfHomeworkInstructions", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | |
| | | |
| | | <script> |
| | | import { selectUserCondition } from "@/api/business/inspectionTask"; |
| | | import { |
| | | getDeviceAccidentReport, |
| | | addDeviceAccidentReport, |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | export default { |
| | | name: "accident-form", |
| | | // import 引入的组件需要注入到对象中才能使用 |
| | |
| | | }, |
| | | // 查询详情 |
| | | searchInfo() { |
| | | this.$axios.get(this.$api.deviceAccidentReport.getDeviceAccidentReport + '?accidentReportId=' + this.form.accidentReportId).then(res => { |
| | | getDeviceAccidentReport({ accidentReportId: this.form.accidentReportId }).then(res => { |
| | | if (res.code === 200) { |
| | | this.form = { ...res.data } |
| | | if (res.data.isFinish === 0) { |
| | |
| | | this.form.flowType = this.currentStep |
| | | this.$refs.modelForm.validate((valid) => { |
| | | if (valid) { |
| | | this.$axios.post(this.$api.deviceAccidentReport.addDeviceAccidentReport, |
| | | this.form, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | }, |
| | | noQs: true |
| | | }).then(res => { |
| | | addDeviceAccidentReport(this.form).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('新增成功') |
| | | this.resetForm() |
| | |
| | | }, |
| | | getUserList() { |
| | | selectUserCondition().then(res => { |
| | | let data = []; |
| | | res.data.forEach((a) => { |
| | | data.push({ |
| | | label: a.name, |
| | | value: a.id, |
| | | }); |
| | | }); |
| | | this.userList = data |
| | | this.userList = res.data |
| | | }) |
| | | }, |
| | | }, |
| | |
| | | <div class="search"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">流程编号:</div> |
| | | <div><el-input size="small" placeholder="请输入" clearable v-model="componentData.entity.processNumber" |
| | | <div><el-input size="small" placeholder="请输入" clearable v-model="queryParams.processNumber" |
| | | @keyup.enter.native="refreshTable()"></el-input></div> |
| | | </div> |
| | | <div class="search_thing" style="padding-left: 30px;"> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="tables" style="margin-top: 10px;"> |
| | | <ValueTable ref="ValueTable" :url="$api.deviceBorrow.deviceBorrowPage" |
| | | :delUrl="$api.deviceBorrow.deleteDeviceBorrow" :componentData="componentData" :key="upIndex" /> |
| | | <lims-table :tableData="tableData" :column="column" :tableLoading="tableLoading" :height="'calc(100vh - 290px)'" |
| | | :page="page" @pagination="pagination"></lims-table> |
| | | <!-- <ValueTable ref="ValueTable" :url="$api.deviceBorrow.deviceBorrowPage" |
| | | :delUrl="$api.deviceBorrow.deleteDeviceBorrow" :componentData="componentData" :key="upIndex" /> --> |
| | | </div> |
| | | <el-dialog title="仪器设备领(借)用登记" top="5vh" :visible.sync="dialogVisible" width="60%"> |
| | | <el-steps :active="currentStep" finish-status="success" align-center> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import ValueTable from '@/components/Table/value-table.vue' |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import { dateFormat } from '@/utils/date' |
| | | import { |
| | | saveDeviceBorrow, |
| | | deleteCNASFile, |
| | | getDeviceBorrow, |
| | | deviceBorrowExport, |
| | | deleteDeviceBorrow, |
| | | deviceBorrowPage, |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | import { selectUserCondition } from "@/api/business/inspectionTask"; |
| | | import { mapGetters } from "vuex"; |
| | | export default { |
| | | props: { |
| | | clickNodeVal: { |
| | |
| | | } |
| | | }, |
| | | components: { |
| | | ValueTable |
| | | limsTable |
| | | }, |
| | | data() { |
| | | return { |
| | | dialogVisible: false, |
| | | dialogVisible0: false, |
| | | //表头显示 |
| | | componentData: { |
| | | entity: { |
| | | processNumber: null, |
| | | deviceId: null, |
| | | orderBy: { |
| | | field: 'id', |
| | | order: 'asc' |
| | | } |
| | | }, |
| | | isIndex: true, |
| | | showSelect: false, |
| | | select: false, |
| | | do: [ |
| | | { |
| | | id: 'show', |
| | | font: '查看', |
| | | type: 'text', |
| | | method: 'lookDetail' |
| | | }, |
| | | { |
| | | id: 'delete', |
| | | font: '删除', |
| | | type: 'text', |
| | | method: 'doDiy' |
| | | }, |
| | | { |
| | | id: '111', |
| | | font: '流程跟踪', |
| | | type: 'text', |
| | | method: 'handleLookList' |
| | | }], |
| | | init: false, |
| | | tagField: { |
| | | recipientState: { |
| | | select: [{ |
| | | value: 0, |
| | | type: 'success', |
| | | label: '合格' |
| | | }, { |
| | | value: 1, |
| | | type: 'warning', |
| | | label: '维修' |
| | | }, { |
| | | value: 2, |
| | | type: 'info', |
| | | label: '停用' |
| | | }, { |
| | | value: 3, |
| | | type: 'danger', |
| | | label: '报废' |
| | | }] |
| | | } |
| | | }, |
| | | selectField: {}, |
| | | requiredAdd: [], |
| | | requiredUp: [], |
| | | }, |
| | | upIndex: 0, |
| | | entityCopy: null, |
| | | currentStep: 0, // 步骤条显示第几步 |
| | | currentStepClick: 0, // 点击步骤条变化 |
| | | steps: ['借出', '借用'], |
| | |
| | | nextUser: [{ required: true, message: '请选择下环节负责人', trigger: 'change' }], |
| | | }, |
| | | deviceLogs: [], |
| | | outLoading: false |
| | | outLoading: false, |
| | | recipientStateList: [{ |
| | | value: 0, |
| | | type: 'success', |
| | | label: '合格' |
| | | }, { |
| | | value: 1, |
| | | type: 'warning', |
| | | label: '维修' |
| | | }, { |
| | | value: 2, |
| | | type: 'info', |
| | | label: '停用' |
| | | }, { |
| | | value: 3, |
| | | type: 'danger', |
| | | label: '报废' |
| | | }], |
| | | queryParams: {}, |
| | | tableData: [], |
| | | column: [ |
| | | { label: "流程编号", prop: "processNumber" }, |
| | | { label: "设备名称", prop: "deviceName" }, |
| | | { |
| | | label: "管理编号", |
| | | prop: "unifyNumber" |
| | | }, |
| | | { label: "借用人", prop: "recipientUser" }, |
| | | { label: "借用人联系方式", prop: "borrowerContactInformation", width: '140px' }, |
| | | { label: "借用日期", prop: "recipientTime" }, |
| | | { |
| | | label: "借用时状态", prop: "recipientState", dataType: "tag", |
| | | formatData: (params) => { |
| | | return this.recipientStateList.find((m) => m.value == params).label; |
| | | }, |
| | | formatType: (params) => { |
| | | return this.recipientStateList.find((m) => m.value == params).type; |
| | | }, |
| | | }, |
| | | { label: "借出人", prop: "submitUser" }, |
| | | { label: "借出日期", prop: "createTime" }, |
| | | { |
| | | label: "当前状态", prop: "nowState" |
| | | }, |
| | | { label: "当前责任人", prop: "nowUser" }, |
| | | { label: "附件", prop: "fileName" }, |
| | | { |
| | | dataType: "action", |
| | | fixed: "right", |
| | | label: "操作", |
| | | operation: [ |
| | | { |
| | | name: "查看", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.lookDetail(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "删除", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleDelete(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "流程跟踪", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleLookList(row); |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 0, |
| | | }, |
| | | tableLoading: false, |
| | | } |
| | | }, |
| | | watch: { |
| | | // 监听点击el-tree的数据,进行数据刷新 |
| | | clickNodeVal(newVal) { |
| | | if (newVal.value) { |
| | | this.componentData.entity.deviceId = this.clickNodeVal.value |
| | | this.entityCopy = this.HaveJson(this.componentData.entity) |
| | | thisqueryParams.deviceId = this.clickNodeVal.value |
| | | this.refreshTable() |
| | | } |
| | | }, |
| | |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["nickName"]), |
| | | action() { |
| | | return this.javaApi + '/personBasicInfo/saveCNASFile' |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.componentData.entity.deviceId = this.clickNodeVal.value |
| | | this.entityCopy = this.HaveJson(this.componentData.entity) |
| | | // console.log(333,this.clickNodeVal) |
| | | this.queryParams.deviceId = this.clickNodeVal.value |
| | | this.getUserList() |
| | | this.refreshTable() |
| | | }, |
| | | methods: { |
| | | refreshTable(e) { |
| | | this.$refs['ValueTable'].selectList(e) |
| | | getList() { |
| | | this.tableLoading = true; |
| | | let param = { ...this.queryParams, ...this.page }; |
| | | delete param.total; |
| | | deviceBorrowPage({ ...param }) |
| | | .then((res) => { |
| | | this.tableLoading = false; |
| | | if (res.code === 200) { |
| | | this.tableData = res.data.records; |
| | | this.page.total = res.data.total; |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | this.tableLoading = false; |
| | | }); |
| | | }, |
| | | pagination({ page, limit }) { |
| | | this.page.current = page; |
| | | this.page.size = limit; |
| | | this.getList(); |
| | | }, |
| | | refresh() { |
| | | this.componentData.entity = this.HaveJson(this.entityCopy) |
| | | this.refreshTable() |
| | | // this.upIndex++ |
| | | this.queryParams = {}; |
| | | this.page.current = 1; |
| | | this.getList(); |
| | | }, |
| | | refreshTable() { |
| | | this.page.current = 1; |
| | | this.getList(); |
| | | }, |
| | | choiceStep(index) { |
| | | this.currentStepClick = index |
| | |
| | | // 获取当前环节操作人与日期 |
| | | switch (this.currentStep) { |
| | | case 0: |
| | | this.form.submitOperationUser = user.name |
| | | this.form.submitOperationUser = this.nickName |
| | | this.form.submitOperationTime = dateTime |
| | | break |
| | | case 1: |
| | | this.form.receiveOperationUser = user.name |
| | | this.form.receiveOperationUser = this.nickName |
| | | this.form.receiveOperationTime = dateTime |
| | | break |
| | | default: |
| | |
| | | }, |
| | | // 查看详情 |
| | | lookDetail(row) { |
| | | this.$axios.get(this.$api.deviceBorrow.getDeviceBorrow + '?id=' + row.id).then(res => { |
| | | getDeviceBorrow({ id: row.id }).then(res => { |
| | | if (res.code == 200) { |
| | | this.form = res.data |
| | | this.form.deviceName = this.clickNodeVal.label |
| | |
| | | //导出 |
| | | handleDown() { |
| | | this.outLoading = true |
| | | this.$axios.post(this.$api.deviceBorrow.deviceBorrowExport, { deviceId: this.clickNodeVal.value }, { responseType: 'blob' }).then(res => { |
| | | deviceBorrowExport({ deviceId: this.clickNodeVal.value }).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { |
| | | type: 'application/force-download' |
| | | }) |
| | | const filename = decodeURI(this.clickNodeVal.label + '设备借出统计' + '.xlsx') |
| | | //将Blob 对象转换成字符串 |
| | | let reader = new FileReader(); |
| | | reader.readAsText(blob, 'utf-8'); |
| | | reader.onload = () => { |
| | | try { |
| | | let result = JSON.parse(reader.result); |
| | | if (result.message) { |
| | | this.$message.error(result.message); |
| | | } else { |
| | | // 创建一个超链接,将文件流赋进去,然后实现这个超链接的单击事件 |
| | | const elink = document.createElement('a') |
| | | elink.download = filename |
| | | elink.style.display = 'none' |
| | | elink.href = URL.createObjectURL(blob) |
| | | document.body.appendChild(elink) |
| | | elink.click(); |
| | | URL.revokeObjectURL(elink.href) // 释放URL 对象 |
| | | document.body.removeChild(elink) |
| | | this.$message.success('导出成功') |
| | | } |
| | | } catch (err) { |
| | | console.log(err); |
| | | // 创建一个超链接,将文件流赋进去,然后实现这个超链接的单击事件 |
| | | const elink = document.createElement('a') |
| | | elink.download = filename |
| | | elink.style.display = 'none' |
| | | elink.href = URL.createObjectURL(blob) |
| | | document.body.appendChild(elink) |
| | | elink.click(); |
| | | URL.revokeObjectURL(elink.href) // 释放URL 对象 |
| | | document.body.removeChild(elink) |
| | | this.$message.success('导出成功') |
| | | } |
| | | } |
| | | this.$download.saveAs(blob, filename) |
| | | this.$message.success('导出成功') |
| | | }) |
| | | }, |
| | | handleLookList(row) { |
| | | this.$axios.get(this.$api.deviceBorrow.getDeviceBorrow + '?id=' + row.id).then(res => { |
| | | getDeviceBorrow({ id: row.id }).then(res => { |
| | | if (res.code == 200) { |
| | | this.deviceLogs = res.data.deviceLogs |
| | | this.dialogVisible0 = true |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | handleDelete(row) { |
| | | this.$confirm("是否删除该条数据?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | deleteDeviceBorrow({ id: row.id }).then((res) => { |
| | | if (res.code == 201) return; |
| | | this.$message.success("删除成功"); |
| | | this.refresh(); |
| | | }); |
| | | }) |
| | | .catch(() => { }); |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | |
| | | <div class="btnS"> |
| | | <el-button size="small" type="primary" @click="calibrationMaintenance()">校准项目维护</el-button> |
| | | <el-button size="small" type="primary" @click="add('add')">添加校准记录</el-button> |
| | | <el-button size="small" type="primary" @click="handleDown">导出Excel</el-button> |
| | | <!-- <el-button size="small" type="primary" @click="handleDown">导出Excel</el-button> --> |
| | | </div> |
| | | <div class="tables" style="margin-top: 10px;"> |
| | | <el-table :data="tableData" height="calc(100vh - 20em)"> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <!-- 操作日志 --> |
| | | <!-- <h4>--> |
| | | <!-- <div style="display: flex;--> |
| | | <!-- align-items: center;">--> |
| | | <!-- <span class="line"></span><span>本记录状态和操作日志</span>--> |
| | | <!-- </div>--> |
| | | <!-- </h4>--> |
| | | <!-- <el-table :data="tableDataOperate" style="width: 100%">--> |
| | | <!-- <el-table-column type="index" label="序号" width="100"></el-table-column>--> |
| | | <!-- <el-table-column prop="operator" label="操作人" width="120"></el-table-column>--> |
| | | <!-- <el-table-column prop="operationTime" label="操作时间" width="180"></el-table-column>--> |
| | | <!-- <el-table-column prop="operationType" label="操作类型" width="120"></el-table-column>--> |
| | | <!-- <el-table-column prop="operationContent" label="操作内容"></el-table-column>--> |
| | | <!-- </el-table>--> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button v-if="operationType === 'add'" @click="dialogVisible1 = false">取 消</el-button> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import fileDownload from "@/utils/file"; |
| | | import { |
| | | deviceMetricRecordPage, |
| | | deviceLog, |
| | | showDeviceMetricsCopy, |
| | | deleteDeviceMetricRecord, |
| | | deviceMetricRecordExport, |
| | |
| | | selectDeviceMetric, |
| | | deleteDeviceMetrics, |
| | | addOrUpdateDeviceMetricRecord, |
| | | saveOrUpdateDeviceMetric |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | import { mapGetters } from "vuex"; |
| | | export default { |
| | | props: { |
| | | clickNodeVal: { |
| | |
| | | ], |
| | | }, |
| | | addRecordLoading: false, |
| | | tableDataOperate: [], // 本记录状态和操作日志 |
| | | upLoading: false, |
| | | operationType: '', |
| | | search: { |
| | |
| | | }, |
| | | // 用于上传文件的信息 |
| | | computed: { |
| | | ...mapGetters(["nickName"]), |
| | | action() { |
| | | return this.javaApi + '/personBasicInfo/saveCNASFile' |
| | | } |
| | | }, |
| | | mounted() { |
| | | //获取操作记录信息 |
| | | this.getOperateMsg(); |
| | | this.getTableList(this.clickNodeVal.value) // 获取设备校准列表数据 |
| | | }, |
| | | methods: { |
| | |
| | | this.search.total = res.data.total |
| | | }) |
| | | }, |
| | | getOperateMsg() { |
| | | deviceLog(this.clickNodeVal.value).then(res => { |
| | | this.tableDataOperate = res.data |
| | | }) |
| | | }, |
| | | // 添加核查记录 |
| | | add(type) { |
| | | this.operationType = type |
| | |
| | | }, |
| | | // 查看详情 |
| | | handleViewClick(type, row) { |
| | | showDeviceMetricsCopy({ id: row.id, type: calibrate }).then(res => { |
| | | showDeviceMetricsCopy({ id: row.id, type: 'calibrate' }).then(res => { |
| | | this.calibrateParams = res.data |
| | | }) |
| | | this.calibrationRecord = { ...row } |
| | |
| | | let state = /\.(jpg|jpeg|png|gif)$/i.test(row.systemFileName) |
| | | if (state) { |
| | | let url = this.javaApi + '/img/' + row.systemFileName; |
| | | fileDownload.downloadIamge(url, row.systemFileName) |
| | | this.$download.saveAs(url, row.systemFileName) |
| | | this.$message.success('下载成功') |
| | | } else { |
| | | const url = this.javaApi + '/word/' + row.systemFileName |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = row.systemFileName; |
| | | link.click(); |
| | | this.$download.saveAs(url, row.systemFileName) |
| | | this.$message.success('下载成功') |
| | | } |
| | | }, |
| | |
| | | this.outLoading = true |
| | | deviceMetricRecordExport({ |
| | | deviceId: this.clickNodeVal.value, |
| | | type: calibrate |
| | | type: 'calibrate' |
| | | }).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | |
| | | this.calibrateParamsLoading = true |
| | | this.addCalibrateLoading = true |
| | | this.form0.deviceId = this.clickNodeVal.value; |
| | | const user = JSON.parse(localStorage.getItem('user')) |
| | | this.form0.createdBy = user.name; |
| | | this.form0.createdBy = this.nickName; |
| | | this.form0.type = 'calibrate' |
| | | deleteDeviceMetrics(this.form0).then(res => { |
| | | saveOrUpdateDeviceMetric(this.form0).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('保存成功') |
| | | this.$refs['form0'].resetFields() |
| | |
| | | } |
| | | this.addRecordLoading = true |
| | | this.calibrationRecord.deviceId = this.clickNodeVal.value; |
| | | let user = JSON.parse(localStorage.getItem('user')) |
| | | this.calibrationRecord.createUser = user.name |
| | | this.calibrationRecord.createUser = this.nickName |
| | | this.calibrationRecord.type = 'calibrate' |
| | | this.calibrationRecord.deviceMetricsCopyList = this.calibrateParams |
| | | addOrUpdateDeviceMetricRecord(this.calibrationRecord).then(res => { |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | function downloadImage(url) { |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.target = "_blank" |
| | | link.download = 'attachment.jpg'; // 文件名 |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | document.body.removeChild(link); |
| | | } |
| | | |
| | | </script> |
| | |
| | | @click="deleteFile"></el-button> |
| | | </el-input> |
| | | <el-upload v-if="operationType === 'add'" ref="upload" :action="action" :before-upload="beforeUpload" |
| | | :headers="headers" :limit="1" :on-error="onError" :on-success="handleSuccessUp" |
| | | :headers="uploadHeader" :limit="1" :on-error="onError" :on-success="handleSuccessUp" |
| | | :show-file-list="false" style="float: right;"> |
| | | <el-button :loading="upLoading" size="small" style="position: relative; top: -4px;" |
| | | type="primary">附件上传 |
| | |
| | | <script> |
| | | import ValueTable from "@/components/Table/value-table.vue"; |
| | | import file from '@/utils/file'; |
| | | import { mapGetters } from "vuex"; |
| | | export default { |
| | | components: { |
| | | ValueTable |
| | |
| | | }, |
| | | // 用于上传文件的信息 |
| | | computed: { |
| | | headers() { |
| | | return { |
| | | 'token': sessionStorage.getItem('token') |
| | | } |
| | | }, |
| | | ...mapGetters(["nickName"]), |
| | | action() { |
| | | return this.javaApi + this.$api.personnel.saveCNASFile |
| | | } |
| | |
| | | this.calibrateParamsLoading = true |
| | | this.addCalibrateLoading = true |
| | | this.form0.deviceId = this.clickNodeVal.value; |
| | | const user = JSON.parse(localStorage.getItem('user')) |
| | | this.form0.createdBy = user.name; |
| | | this.form0.createdBy = this.nickName; |
| | | this.form0.type = 'examine' |
| | | this.$axios.post(this.$api.deviceCheck.saveOrUpdateDeviceMetric, this.form0, { |
| | | headers: { |
| | |
| | | } |
| | | this.addRecordLoading = true |
| | | this.calibrationRecord.deviceId = this.clickNodeVal.value; |
| | | let user = JSON.parse(localStorage.getItem('user')) |
| | | this.calibrationRecord.createUser = user.name |
| | | this.calibrationRecord.createUser = this.nickName |
| | | this.calibrationRecord.deviceMetricsCopyList = this.calibrateParams |
| | | this.calibrationRecord.type = 'examine' |
| | | this.$axios.post(this.$api.deviceCheck.addOrUpdateDeviceMetricRecord, this.calibrationRecord, { |
| | |
| | | pageDeviceAcceptance, |
| | | getDeviceAcceptanceFileList, |
| | | delDeviceAcceptanceFileList, |
| | | exportUseRecord, |
| | | exportDeviceAcceptance, |
| | | delDeviceAcceptance, |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | export default { |
| | |
| | | let url = ''; |
| | | if (row.type == 1) { |
| | | url = this.javaApi + '/img/' + row.fileUrl |
| | | file.downloadIamge(url, row.fileName) |
| | | this.$download.saveAs(url, row.fileName) |
| | | } else { |
| | | url = this.javaApi + '/word/' + row.fileUrl |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = row.fileName; |
| | | link.click(); |
| | | this.$download.saveAs(url, row.fileName) |
| | | } |
| | | }, |
| | | // 删除 |
| | |
| | | // 导出 |
| | | handleDownOne(id) { |
| | | this.outLoading = true |
| | | exportUseRecord({ acceptanceId: id }).then(res => { |
| | | exportDeviceAcceptance({ acceptanceId: id }).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | this.$download.saveAs(blob, '设备验收.doc') |
| | |
| | | |
| | | <script> |
| | | import AccidentForm from "./accidentForm.vue"; |
| | | |
| | | import { |
| | | pageDeviceAccidentReport, |
| | | exportDeviceAccidentReport, |
| | | delDeviceAccidentReport, |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | export default { |
| | | name: "equipment-accident", |
| | | // import 引入的组件需要注入到对象中才能使用 |
| | |
| | | // 查询 |
| | | getYearTableDetailData(deviceId) { |
| | | this.yearTableDetailDataLoading = true |
| | | this.$axios.post(this.$api.deviceAccidentReport.pageDeviceAccidentReport, { |
| | | page: { |
| | | current: this.pagination1.current, |
| | | size: this.pagination1.size, |
| | | }, |
| | | entity: { |
| | | deviceId: deviceId, |
| | | } |
| | | }, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | }, |
| | | noQs: true |
| | | pageDeviceAccidentReport({ |
| | | current: this.pagination1.current, |
| | | size: this.pagination1.size, |
| | | deviceId: deviceId, |
| | | }).then(res => { |
| | | if (res.code == 200) { |
| | | this.yearTableDetailData = res.data.records |
| | |
| | | // 导出 |
| | | handleDownOne(id) { |
| | | this.outLoading = true |
| | | this.$axios.get(this.$api.deviceAccidentReport.exportDeviceAccidentReport + '?accidentReportId=' + id, { |
| | | responseType: "blob" |
| | | }).then(res => { |
| | | exportDeviceAccidentReport({ accidentReportId: id }).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | //将Blob 对象转换成字符串 |
| | | let reader = new FileReader(); |
| | | reader.readAsText(blob, 'utf-8'); |
| | | reader.onload = () => { |
| | | try { |
| | | let result = JSON.parse(reader.result); |
| | | if (result.message) { |
| | | this.$message.error(result.message); |
| | | } else { |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = '仪器设备事故报告单.doc'; |
| | | link.click(); |
| | | this.$message.success('导出成功') |
| | | } |
| | | } catch (err) { |
| | | console.log(err); |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = '仪器设备事故报告单.doc'; |
| | | link.click(); |
| | | this.$message.success('导出成功') |
| | | } |
| | | } |
| | | this.$download.saveAs(blob, '仪器设备事故报告单.doc') |
| | | }) |
| | | }, |
| | | // 删除 |
| | |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.$axios.get(this.$api.deviceAccidentReport.delDeviceAccidentReport + '?accidentReportId=' + id).then(res => { |
| | | delDeviceAccidentReport({ accidentReportId: id }).then(res => { |
| | | this.$message.success('删除成功!'); |
| | | this.getYearTableDetailData(this.clickNodeVal.value); |
| | | }); |
| | |
| | | |
| | | <script> |
| | | import FailureForm from "./failureForm.vue"; |
| | | |
| | | import { |
| | | pageDeviceBreakdownMaintenance, |
| | | exportDeviceBreakdownMaintenance, |
| | | delDeviceBreakdownMaintenance, |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | export default { |
| | | name: "equipment-failure", |
| | | // import 引入的组件需要注入到对象中才能使用 |
| | |
| | | // 查询 |
| | | getYearTableDetailData(deviceId) { |
| | | this.yearTableDetailDataLoading = true |
| | | this.$axios.post(this.$api.deviceBreakdownMaintenance.pageDeviceBreakdownMaintenance, { |
| | | page: { |
| | | current: this.pagination1.current, |
| | | size: this.pagination1.size, |
| | | }, |
| | | entity: { |
| | | deviceId: deviceId, |
| | | } |
| | | }, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | }, |
| | | noQs: true |
| | | pageDeviceBreakdownMaintenance({ |
| | | current: this.pagination1.current, |
| | | size: this.pagination1.size, |
| | | deviceId: deviceId, |
| | | }).then(res => { |
| | | if (res.code == 200) { |
| | | this.yearTableDetailData = res.data.records |
| | |
| | | // 导出 |
| | | handleDownOne(id) { |
| | | this.outLoading = true |
| | | this.$axios.get(this.$api.deviceBreakdownMaintenance.exportDeviceBreakdownMaintenance + '?maintenanceId=' + id, { |
| | | responseType: "blob" |
| | | exportDeviceBreakdownMaintenance({ |
| | | maintenanceId: id |
| | | }).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | //将Blob 对象转换成字符串 |
| | | let reader = new FileReader(); |
| | | reader.readAsText(blob, 'utf-8'); |
| | | reader.onload = () => { |
| | | try { |
| | | let result = JSON.parse(reader.result); |
| | | if (result.message) { |
| | | this.$message.error(result.message); |
| | | } else { |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = '仪器设备修理申请表.doc'; |
| | | link.click(); |
| | | this.$message.success('导出成功') |
| | | } |
| | | } catch (err) { |
| | | console.log(err); |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = '仪器设备修理申请表.doc'; |
| | | link.click(); |
| | | this.$message.success('导出成功') |
| | | } |
| | | } |
| | | this.$download.saveAs(blob, '仪器设备修理申请表.doc') |
| | | this.$message.success('导出成功') |
| | | }) |
| | | }, |
| | | // 删除 |
| | |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.$axios.get(this.$api.deviceBreakdownMaintenance.delDeviceBreakdownMaintenance + '?maintenanceId=' + id).then(res => { |
| | | delDeviceBreakdownMaintenance({ |
| | | maintenanceId: id |
| | | }).then(res => { |
| | | this.$message.success('删除成功!'); |
| | | this.getYearTableDetailData(this.clickNodeVal.value); |
| | | }); |
| | |
| | | </div> |
| | | <div> |
| | | <el-table ref="yearTable" v-loading="yearTableDetailDataLoading" :data="yearTableDetailData" |
| | | height="calc(100vh - 18em)" |
| | | style="width: 100% ;"> |
| | | height="calc(100vh - 18em)" style="width: 100% ;"> |
| | | <!-- 表格列 --> |
| | | <el-table-column align="center" header-align="center" label="序号" prop="prop" type="index" width="70"></el-table-column> |
| | | <!-- <el-table-column label="仪器名称" min-width="150" prop="unitName"></el-table-column>--> |
| | | <!-- <el-table-column label="型号" min-width="100" prop="address"></el-table-column>--> |
| | | <el-table-column align="center" header-align="center" label="序号" prop="prop" type="index" |
| | | width="70"></el-table-column> |
| | | <!-- <el-table-column label="仪器名称" min-width="150" prop="unitName"></el-table-column>--> |
| | | <!-- <el-table-column label="型号" min-width="100" prop="address"></el-table-column>--> |
| | | <el-table-column label="配件" min-width="150" prop="parts"></el-table-column> |
| | | <el-table-column label="编号" min-width="100" prop="number"></el-table-column> |
| | | <el-table-column label="报废理由" min-width="150" prop="reasonsForScrap"></el-table-column> |
| | | <!-- 操作按钮 --> |
| | | <el-table-column align="center" fixed="right" label="操作" min-width="120"> |
| | | <template slot-scope="scope"> |
| | | <el-button :disabled="scope.row.ratifyStatus === 1" size="small" type="text" @click="handleForm(scope.row.scrappedId)">操作</el-button> |
| | | <el-button :disabled="scope.row.ratifyStatus === 1" size="small" type="text" |
| | | @click="handleForm(scope.row.scrappedId)">操作</el-button> |
| | | <el-button size="small" type="text" @click="handleDownOne(scope.row.scrappedId)">导出</el-button> |
| | | <el-button size="small" style="color: #f56c6c" type="text" @click="deleteFun(scope.row.scrappedId)">删除</el-button> |
| | | <el-button size="small" style="color: #f56c6c" type="text" |
| | | @click="deleteFun(scope.row.scrappedId)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-pagination :current-page="1" :page-size="pagination1.size" :page-sizes="[10, 20, 30, 50, 100]" |
| | | :total="pagination1.total" layout="->,total, sizes, prev, pager, next, jumper" @size-change="handleSizeChange1" |
| | | @current-change="handleCurrentChange1"> |
| | | :total="pagination1.total" layout="->,total, sizes, prev, pager, next, jumper" |
| | | @size-change="handleSizeChange1" @current-change="handleCurrentChange1"> |
| | | </el-pagination> |
| | | </div> |
| | | </div> |
| | | <scrap-application-form v-if="applicationForm" ref="applicationForm" @closeDialog="closeDialog"></scrap-application-form> |
| | | <scrap-application-form v-if="applicationForm" ref="applicationForm" |
| | | @closeDialog="closeDialog"></scrap-application-form> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import scrapApplicationForm from "./scrapApplicationForm.vue"; |
| | | |
| | | import { |
| | | pageDeviceScrapped, |
| | | exportDeviceScrapped, |
| | | delDeviceScrapped, |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | export default { |
| | | name: "equipment-scrap", |
| | | // import 引入的组件需要注入到对象中才能使用 |
| | | components: {scrapApplicationForm}, |
| | | components: { scrapApplicationForm }, |
| | | props: { |
| | | clickNodeVal: { |
| | | type: Object, |
| | |
| | | // 方法集合 |
| | | methods: { |
| | | // 查询 |
| | | getYearTableDetailData (deviceId) { |
| | | getYearTableDetailData(deviceId) { |
| | | this.yearTableDetailDataLoading = true |
| | | this.$axios.post(this.$api.deviceScrapped.pageDeviceScrapped,{ |
| | | page: { |
| | | current: this.pagination1.current, |
| | | size: this.pagination1.size, |
| | | }, |
| | | entity: { |
| | | deviceId: deviceId, |
| | | } |
| | | }, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | }, |
| | | noQs: true |
| | | pageDeviceScrapped({ |
| | | current: this.pagination1.current, |
| | | size: this.pagination1.size, |
| | | deviceId: deviceId, |
| | | }).then(res => { |
| | | if (res.code == 200) { |
| | | this.yearTableDetailData = res.data.records |
| | |
| | | this.yearTableDetailDataLoading = false |
| | | }) |
| | | }, |
| | | handleForm (id) { |
| | | handleForm(id) { |
| | | this.applicationForm = true |
| | | this.$nextTick(() => { |
| | | this.$refs.applicationForm.openDialog(id, this.clickNodeVal.value) |
| | | }) |
| | | }, |
| | | closeDialog () { |
| | | closeDialog() { |
| | | this.applicationForm = false |
| | | this.getYearTableDetailData(this.clickNodeVal.value) |
| | | }, |
| | |
| | | // 导出 |
| | | handleDownOne(id) { |
| | | this.outLoading = true |
| | | this.$axios.get(this.$api.deviceScrapped.exportDeviceScrapped + '?scrappedId=' + id, { |
| | | responseType: "blob" |
| | | }).then(res => { |
| | | exportDeviceScrapped({ scrappedId: id }).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | //将Blob 对象转换成字符串 |
| | | let reader = new FileReader(); |
| | | reader.readAsText(blob, 'utf-8'); |
| | | reader.onload = () => { |
| | | try { |
| | | let result = JSON.parse(reader.result); |
| | | if (result.message) { |
| | | this.$message.error(result.message); |
| | | } else { |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = '仪器设备报废申请表.doc'; |
| | | link.click(); |
| | | this.$message.success('导出成功') |
| | | } |
| | | } catch (err) { |
| | | console.log(err); |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = '仪器设备报废申请表.doc'; |
| | | link.click(); |
| | | this.$message.success('导出成功') |
| | | } |
| | | } |
| | | this.$download.saveAs(blob, '仪器设备报废申请表.doc') |
| | | this.$message.success('导出成功') |
| | | }) |
| | | }, |
| | | // 删除 |
| | |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.$axios.get(this.$api.deviceScrapped.delDeviceScrapped + '?scrappedId=' + id).then(res => { |
| | | delDeviceScrapped({ scrappedId: id }).then(res => { |
| | | this.$message.success('删除成功!'); |
| | | this.getYearTableDetailData(this.clickNodeVal.value); |
| | | }); |
| | |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | } |
| | | |
| | | .title-search { |
| | | display: flex; |
| | | align-items: center; |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getDeviceBreakdownMaintenance, |
| | | addDeviceBreakdownMaintenance, |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | import { selectUserCondition } from "@/api/business/inspectionTask"; |
| | | export default { |
| | | name: "failure-form", |
| | | // import 引入的组件需要注入到对象中才能使用 |
| | |
| | | }, |
| | | // 查询详情 |
| | | searchInfo() { |
| | | this.$axios.get(this.$api.deviceBreakdownMaintenance.getDeviceBreakdownMaintenance + '?maintenanceId=' + this.form.maintenanceId).then(res => { |
| | | getDeviceBreakdownMaintenance({ |
| | | maintenanceId: this.form.maintenanceId |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | this.form = { ...res.data } |
| | | if (this.form.isFinish === 0) { |
| | |
| | | this.form.flowType = this.currentStep |
| | | this.$refs.modelForm.validate((valid) => { |
| | | if (valid) { |
| | | this.$axios.post(this.$api.deviceBreakdownMaintenance.addDeviceBreakdownMaintenance, |
| | | this.form, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | }, |
| | | noQs: true |
| | | }).then(res => { |
| | | addDeviceBreakdownMaintenance(this.form).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('新增成功') |
| | | this.resetForm() |
| | |
| | | this.$emit('closeDialog') |
| | | }, |
| | | getUserList() { |
| | | this.$axios.post(this.$api.user.selectUserList, { |
| | | page: { current: -1, size: -1, }, |
| | | entity: { name: null } |
| | | }, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | selectUserCondition().then(res => { |
| | | if (res.code === 201) { |
| | | return |
| | | } |
| | | this.userList = res.data.records |
| | | this.userList = res.data |
| | | }) |
| | | }, |
| | | }, |
| | |
| | | |
| | | <script> |
| | | import { dateFormat } from '@/utils/date' |
| | | |
| | | import { mapGetters } from "vuex"; |
| | | export default { |
| | | props: { |
| | | clickNodeVal: { |
| | |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["nickName"]), |
| | | action() { |
| | | return this.javaApi + this.$api.personnel.saveCNASFile |
| | | } |
| | |
| | | this.$refs.form.validate((valid) => { |
| | | if (valid === true || saveState !== '1submit') { |
| | | // 给当前环节设置创建人与时间 |
| | | let user = JSON.parse(localStorage.getItem('user')) |
| | | const dateTime = dateFormat(new Date()) |
| | | // 获取当前环节操作人与日期 |
| | | switch (this.currentStep) { |
| | | case 0: |
| | | this.form.submitUser = user.name |
| | | this.form.submitOperatingPersonnel = user.name |
| | | this.form.submitUser = this.nickName |
| | | this.form.submitOperatingPersonnel = this.nickName |
| | | this.form.submitDate = dateTime |
| | | break |
| | | case 1: |
| | | this.form.adminOperatingPersonnel = user.name |
| | | this.form.adminOperatingPersonnel = this.nickName |
| | | this.form.adminDate = dateTime |
| | | break |
| | | case 2: |
| | | this.form.technicalOperatingPersonnel = user.name |
| | | this.form.technicalOperatingPersonnel = this.nickName |
| | | this.form.technicalDate = dateTime |
| | | break |
| | | case 3: |
| | | this.form.maintainOperatingPersonnel = user.name |
| | | this.form.maintainOperatingPersonnel = this.nickName |
| | | this.form.maintainDate = dateTime |
| | | break |
| | | case 4: |
| | | this.form.afterMaintenanceOperatingPersonnel = user.name |
| | | this.form.afterMaintenanceOperatingPersonnel = this.nickName |
| | | this.form.afterMaintenanceDate = dateTime |
| | | break |
| | | default: |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getDeviceInspectionRecord, |
| | | addDeviceInspectionRecord, |
| | | updateDeviceInspectionRecord, |
| | | reviewDeviceInspectionRecord, |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | import { selectUserCondition } from "@/api/business/inspectionTask"; |
| | | export default { |
| | | name: "inspection-form", |
| | | // import 引入的组件需要注入到对象中才能使用 |
| | |
| | | } |
| | | }, |
| | | searchInfo() { |
| | | this.$axios.get(this.$api.deviceInspectionRecord.getDeviceInspectionRecord + '?inspectionRecordId=' + this.form.inspectionRecordId).then(res => { |
| | | getDeviceInspectionRecord({ |
| | | inspectionRecordId: this.form.inspectionRecordId |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | this.form = { ...res.data } |
| | | this.details = this.form.details || [] |
| | |
| | | this.form.details = this.HaveJson(this.details) |
| | | this.submitFormLoading = true |
| | | if (this.operationType === 'add') { |
| | | this.$axios.post(this.$api.deviceInspectionRecord.addDeviceInspectionRecord, |
| | | this.form, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | }, |
| | | noQs: true |
| | | }).then(res => { |
| | | addDeviceInspectionRecord(this.form).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('新增成功') |
| | | this.resetForm() |
| | |
| | | this.submitFormLoading = false |
| | | }) |
| | | } else { |
| | | this.$axios.post(this.$api.deviceInspectionRecord.updateDeviceInspectionRecord, |
| | | this.form, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | }, |
| | | noQs: true |
| | | }).then(res => { |
| | | updateDeviceInspectionRecord(this.form).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('新增成功') |
| | | this.resetForm() |
| | |
| | | inspectionRecordId: this.form.inspectionRecordId, |
| | | status: status, |
| | | } |
| | | this.$axios.post(this.$api.deviceInspectionRecord.reviewDeviceInspectionRecord, |
| | | params, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | }, |
| | | noQs: true |
| | | }).then(res => { |
| | | reviewDeviceInspectionRecord(params).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('审核成功') |
| | | this.resetForm() |
| | |
| | | this.$emit('closeDialog') |
| | | }, |
| | | getUserList() { |
| | | this.$axios.post(this.$api.user.selectUserList, { |
| | | page: { current: -1, size: -1, }, |
| | | entity: { name: null } |
| | | }, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | selectUserCondition().then(res => { |
| | | if (res.code === 201) { |
| | | return |
| | | } |
| | | this.userList = res.data.records |
| | | this.userList = res.data |
| | | }) |
| | | }, |
| | | }, |
| | |
| | | |
| | | <script> |
| | | import InspectionForm from "./inspectionForm.vue"; |
| | | |
| | | import { |
| | | getDeviceInspectionRecordByPage, |
| | | exportDeviceInspectionRecord, |
| | | deleteDeviceInspectionRecord, |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | export default { |
| | | name: "inspection-of-equipment", |
| | | // import 引入的组件需要注入到对象中才能使用 |
| | |
| | | // 查询 |
| | | getYearTableDetailData(deviceId) { |
| | | this.yearTableDetailDataLoading = true |
| | | this.$axios.post(this.$api.deviceInspectionRecord.getDeviceInspectionRecordByPage, { |
| | | page: { |
| | | current: this.pagination1.current, |
| | | size: this.pagination1.size, |
| | | }, |
| | | entity: { |
| | | deviceId: deviceId, |
| | | } |
| | | }, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | }, |
| | | noQs: true |
| | | getDeviceInspectionRecordByPage({ |
| | | current: this.pagination1.current, |
| | | size: this.pagination1.size, |
| | | deviceId: deviceId, |
| | | }).then(res => { |
| | | if (res.code == 200) { |
| | | this.yearTableDetailData = res.data.records |
| | |
| | | // 导出 |
| | | handleDownOne(id) { |
| | | this.outLoading = true |
| | | this.$axios.get(this.$api.deviceInspectionRecord.exportDeviceInspectionRecord + '?inspectionRecordId=' + id, { |
| | | responseType: "blob" |
| | | exportDeviceInspectionRecord({ |
| | | inspectionRecordId: id |
| | | }).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | //将Blob 对象转换成字符串 |
| | | let reader = new FileReader(); |
| | | reader.readAsText(blob, 'utf-8'); |
| | | reader.onload = () => { |
| | | try { |
| | | let result = JSON.parse(reader.result); |
| | | if (result.message) { |
| | | this.$message.error(result.message); |
| | | } else { |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = '设备点检记录表.doc'; |
| | | link.click(); |
| | | this.$message.success('导出成功') |
| | | } |
| | | } catch (err) { |
| | | console.log(err); |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = '设备点检记录表.doc'; |
| | | link.click(); |
| | | this.$message.success('导出成功') |
| | | } |
| | | } |
| | | this.$download.saveAs(blob, '设备点检记录表.doc') |
| | | }) |
| | | }, |
| | | // 删除 |
| | |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.$axios.get(this.$api.deviceInspectionRecord.deleteDeviceInspectionRecord + '?inspectionRecordId=' + id).then(res => { |
| | | deleteDeviceInspectionRecord({ inspectionRecordId: id }).then(res => { |
| | | this.$message.success('删除成功!'); |
| | | this.getYearTableDetailData(this.clickNodeVal.value); |
| | | }); |
| | |
| | | <script> |
| | | import { |
| | | exportMaintenanceRecord, |
| | | deviceMaintainDelete, |
| | | deleteDeviceMaintenance, |
| | | selectDeviceByCode, |
| | | addDeviceMaintenance, |
| | | getDeviceMaintenancePage, |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | export default { |
| | | props: { |
| | |
| | | exportMaintenanceRecord({ deviceId: this.clickNodeVal.value }).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | this.$download.saveAs(blob, '设备维护保养记录.doc') |
| | | this.$message.success('导出成功') |
| | | //将Blob 对象转换成字符串 |
| | | let reader = new FileReader(); |
| | | reader.readAsText(blob, 'utf-8'); |
| | | reader.onload = () => { |
| | | try { |
| | | let result = JSON.parse(reader.result); |
| | | if (result.message) { |
| | | this.$message.error(result.message); |
| | | } else { |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = '设备维护保养记录.doc'; |
| | | link.click(); |
| | | this.$message.success('导出成功') |
| | | } |
| | | } catch (err) { |
| | | console.log(err); |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = '设备维护保养记录.doc'; |
| | | link.click(); |
| | | this.$message.success('导出成功') |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | //操作详情删除 |
| | |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | deviceMaintainDelete(row.id).then(res => { |
| | | deleteDeviceMaintenance({ id: row.id }).then(res => { |
| | | }) |
| | | this.MaintainParam.splice(index, 1); |
| | | // this.MaintainParam.splice(index, 1); |
| | | this.getAllMessage(this.clickNodeVal.value) |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '删除成功!' |
| | |
| | | this.$refs['form'].validate((valid) => { |
| | | if (valid) { |
| | | this.formData.deviceId = this.clickNodeVal.value; |
| | | this.$axios.post(this.$api.deviceCheck.deviceMaintainAdd, this.formData).then(res => { |
| | | addDeviceMaintenance(this.formData).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('添加成功'); |
| | | this.getAllMessage(this.clickNodeVal.value) |
| | | this.dialogVisible = false; |
| | | this.formData = {}; //清空表单 |
| | | } |
| | | }) |
| | | this.MaintainParam.push(this.formData) |
| | | this.dialogVisible = false; |
| | | this.formData = {}; //清空表单 |
| | | // this.MaintainParam.push(this.formData) |
| | | } |
| | | }) |
| | | }, |
| | |
| | | }, |
| | | //获取表单设备维护信息 |
| | | getAllMessage(deviceId) { |
| | | this.$axios.get(this.$api.deviceCheck.getDeviceMaintenancePage + "?deviceId=" + deviceId + "&size=" + this.search.size + "¤t=" + this.search.current + "&deviceNumber=" + this.search.deviceNumber).then(res => { |
| | | getDeviceMaintenancePage({ |
| | | deviceId, |
| | | ...this.search |
| | | }).then(res => { |
| | | if (res.code == 200) { |
| | | this.MaintainParam = res.data.records |
| | | this.search.total = res.data.total |
| | |
| | | <!-- 作业指导书 --> |
| | | <template> |
| | | <div> |
| | | <div style="width:100%;height:30px;margin:5px 0px"> |
| | | <el-row> |
| | | <el-col :span="12" style="text-align: left;"> |
| | | <p style="line-height: 30px;">作业指导书</p> |
| | | </el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <el-button size="small" type="primary" @click="getList">刷新</el-button> |
| | | <el-button size="small" type="primary" @click="dialogVisible = true">受控申请</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <div style="margin: 10px 0;text-align: right"> |
| | | <el-button size="small" type="primary" @click="getList">刷新</el-button> |
| | | <el-button size="small" type="primary" @click="dialogVisible = true">受控申请</el-button> |
| | | </div> |
| | | <el-table :data="tableData" border height="calc(100vh - 18em)"> |
| | | <el-table-column type="index" label="序号" width="120"> |
| | |
| | | </el-form-item> |
| | | <el-form-item label="附件:" style="float: left;"> |
| | | <el-upload ref="uploadFile" :action="action" :before-remove="beforeRemove" :file-list="fileList1" |
| | | :headers="headers" :limit="1" :on-error="onError" :on-exceed="handleExceed" :on-remove="handleRemove1" |
| | | :on-success="onSuccess1" class="upload-demo" multiple> |
| | | :headers="uploadHeader" :limit="1" :on-error="onError" :on-exceed="handleExceed" |
| | | :on-remove="handleRemove1" :on-success="onSuccess1" class="upload-demo" multiple> |
| | | <el-button size="small" type="primary">点击上传</el-button> |
| | | </el-upload> |
| | | </el-form-item> |
| | |
| | | <el-button size="small" @click="delFile">删除</el-button> |
| | | </div> |
| | | <el-table :data="documentTableData" border style="width: 100%;" tooltip-effect="dark" :row-key="getRowKey" |
| | | @selection-change="handleSelectionChange" height="30em"> |
| | | @selection-change="handleSelectionChange" height="29em"> |
| | | <el-table-column type="selection" width="55%"> |
| | | </el-table-column> |
| | | <el-table-column label="序号" prop="id" type="index" width="60"></el-table-column> |
| | |
| | | <el-col :span="24"> |
| | | <el-form-item label="附件:" style="float: left;"> |
| | | <el-upload ref="uploadFile" :action="action" :before-remove="beforeRemove" :file-list="fileList" |
| | | :headers="headers" :limit="1" :on-error="onError" :on-exceed="handleExceed" :on-remove="handleRemove" |
| | | :on-success="onSuccess" class="upload-demo" multiple> |
| | | :headers="uploadHeader" :limit="1" :on-error="onError" :on-exceed="handleExceed" |
| | | :on-remove="handleRemove" :on-success="onSuccess" class="upload-demo" multiple> |
| | | <el-button size="small" type="primary">点击上传</el-button> |
| | | </el-upload> |
| | | </el-form-item> |
| | |
| | | |
| | | <script> |
| | | import fileDownload from "@/utils/file"; |
| | | |
| | | import { |
| | | approvalOfHomeworkInstructionManual, |
| | | homeworkGuidebook, |
| | | homeworkGuidebookEditor, |
| | | newHomeworkGuidebookAdded, |
| | | deleteHomeworkGuidebook, |
| | | pageByPageQueryOfHomeworkInstructions, |
| | | selectDeviceParameter, |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | export default { |
| | | props: { |
| | | clickNodeVal: { |
| | |
| | | }); |
| | | }, |
| | | approvalFun(id, status) { |
| | | this.$axios.get(this.$api.deviceCheck.approvalOfHomeworkInstructionManual + "?id=" + id + "&status=" + status).then(res => { |
| | | approvalOfHomeworkInstructionManual({ id, status }).then(res => { |
| | | this.getList() |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '操作成功!' |
| | | }); |
| | | }) |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '操作成功!' |
| | | }); |
| | | |
| | | }, |
| | | getRowKey(row) { |
| | | return row.index |
| | |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.$axios.get(this.$api.deviceCheck.homeworkGuidebook + "?id=" + row.id + "&instructionId=" + row.instructionId).then(res => { |
| | | homeworkGuidebook({ |
| | | id: row.id, |
| | | instructionId: row.instructionId |
| | | }).then(res => { |
| | | this.$message.success('删除成功!') |
| | | this.getList() |
| | | }) |
| | |
| | | }, |
| | | instructionEditFun(row) { |
| | | this.dialogVisible = true |
| | | this.$axios.get(this.$api.deviceCheck.homeworkGuidebookEditor + "?instructionId=" + row.instructionId).then(res => { |
| | | homeworkGuidebookEditor({ instructionId: row.instructionId }).then(res => { |
| | | if (res.code == 200) { |
| | | this.instructionForm = res.data.instruction; |
| | | if (this.instructionForm.fileSystemName) { |
| | |
| | | this.$refs.form1.validate((valid) => { |
| | | if (valid) { |
| | | this.instructionForm.feTempHumRecordList = this.documentTableData |
| | | this.$axios.post(this.$api.deviceCheck.newHomeworkGuidebookAdded, this.instructionForm, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | newHomeworkGuidebookAdded(this.instructionForm).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('操作成功!') |
| | | this.dialogVisible = false |
| | |
| | | .filter(item => item.id !== undefined) |
| | | .map(item => item.id).join(','); |
| | | //有错误 |
| | | const res = await this.$axios.get(this.$api.deviceCheck.deleteHomeworkGuidebook + '?ids=' + ids); |
| | | const res = await deleteHomeworkGuidebook({ ids }); |
| | | if (res.code === 200) { |
| | | // 删除视图的数据 |
| | | for (const resKey in this.selectedRow) { |
| | |
| | | this.$message.warning(`当前限制选择 1 个文件,本次选择了 ${files.length} 个文件。`); |
| | | }, |
| | | getList() { |
| | | this.$axios.get(this.$api.deviceCheck.pageByPageQueryOfHomeworkInstructions + "?size=" + this.search.size + "¤t=" + this.search.current).then(res => { |
| | | pageByPageQueryOfHomeworkInstructions({ ...this.search }).then(res => { |
| | | if (res.code == 200) { |
| | | this.tableData = res.data.records; |
| | | this.search.total = res.data.total |
| | |
| | | }) |
| | | }, |
| | | getAllDevice() { |
| | | this.$axios.post(this.$api.deviceScope.selectDeviceParameter + "?laboratoryNameIsNull=" + this.laboratoryNameIsNull, { |
| | | page: { |
| | | current: 1, |
| | | size: -1 |
| | | }, |
| | | entity: this.entity |
| | | }, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | selectDeviceParameter({ laboratoryNameIsNull: this.laboratoryNameIsNull }).then(res => { |
| | | if (res.code == 200) { |
| | | this.devices = res.data.records; |
| | | this.updateDeviceNameOptions(); |
| | |
| | | }, |
| | | }, |
| | | computed: { |
| | | headers() { |
| | | return { |
| | | 'token': sessionStorage.getItem('token') |
| | | } |
| | | }, |
| | | action() { |
| | | return this.javaApi + this.$api.personnel.saveCNASFile |
| | | return this.javaApi + '/personBasicInfo/saveCNASFile' |
| | | } |
| | | }, |
| | | } |
| | |
| | | }, |
| | | getUserList() { |
| | | selectUserCondition().then(res => { |
| | | let data = []; |
| | | res.data.forEach((a) => { |
| | | data.push({ |
| | | label: a.name, |
| | | value: a.id, |
| | | }); |
| | | }); |
| | | this.userList = data |
| | | this.userList = res.data |
| | | }) |
| | | }, |
| | | }, |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getDeviceScrapped, |
| | | addDeviceScrapped, |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | import { selectUserCondition } from "@/api/business/inspectionTask"; |
| | | export default { |
| | | name: "scrapApplicationForm", |
| | | // import 引入的组件需要注入到对象中才能使用 |
| | |
| | | }, |
| | | // 查询详情 |
| | | searchInfo() { |
| | | this.$axios.get(this.$api.deviceScrapped.getDeviceScrapped + '?scrappedId=' + this.form.scrappedId).then(res => { |
| | | getDeviceScrapped({ |
| | | scrappedId: this.form.scrappedId |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | this.form = { ...res.data } |
| | | if (this.form.isFinish === 0) { |
| | |
| | | this.form.flowType = this.currentStep |
| | | this.$refs.modelForm.validate((valid) => { |
| | | if (valid) { |
| | | this.$axios.post(this.$api.deviceScrapped.addDeviceScrapped, |
| | | this.form, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | }, |
| | | noQs: true |
| | | }).then(res => { |
| | | addDeviceScrapped(this.form).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('新增成功') |
| | | this.resetForm() |
| | |
| | | this.$emit('closeDialog') |
| | | }, |
| | | getUserList() { |
| | | this.$axios.post(this.$api.user.selectUserList, { |
| | | page: { current: -1, size: -1, }, |
| | | entity: { name: null } |
| | | }, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | selectUserCondition().then(res => { |
| | | if (res.code === 201) { |
| | | return |
| | | } |
| | | this.userList = res.data.records |
| | | this.userList = res.data |
| | | }) |
| | | }, |
| | | }, |
| | |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import { |
| | | saveDeviceState, |
| | | selectDeviceByCode, |
| | | exportDeviceStatus, |
| | | deleteDeviceState, |
| | | deviceStateExport, |
| | | getDeviceStatePage, |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | import { selectUserCondition } from "@/api/business/inspectionTask"; |
| | | import { dateFormat } from '@/utils/date' |
| | | import { mapGetters } from "vuex"; |
| | | export default { |
| | | props: { |
| | | clickNodeVal: { |
| | |
| | | return {}; |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["nickName"]), |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | this.$refs.form.validate((valid) => { |
| | | if (valid === true || saveState !== '1submit') { |
| | | // 给当前环节设置创建人与时间 |
| | | let user = JSON.parse(localStorage.getItem('user')) |
| | | const dateTime = dateFormat(new Date()) |
| | | // 获取当前环节操作人与日期 |
| | | switch (this.currentStep) { |
| | | case 0: |
| | | this.form.createUser = user.name |
| | | this.form.submitOperatingPersonnel = user.name |
| | | this.form.createUser = this.nickName |
| | | this.form.submitOperatingPersonnel = this.nickName |
| | | this.form.submitDate = dateTime |
| | | break |
| | | case 1: |
| | | this.form.departmentOperatingPersonnel = user.name |
| | | this.form.departmentOperatingPersonnel = this.nickName |
| | | this.form.departmentDate = dateTime |
| | | break |
| | | case 2: |
| | | this.form.measuringRoomOperatingPersonnel = user.name |
| | | this.form.measuringRoomOperatingPersonnel = this.nickName |
| | | this.form.measuringRoomDate = dateTime |
| | | break |
| | | case 3: |
| | | this.form.approvalOperatingPersonnel = user.name |
| | | this.form.approvalOperatingPersonnel = this.nickName |
| | | this.form.approvalDate = dateTime |
| | | break |
| | | default: |
| | |
| | | // 获取当前状态 |
| | | this.form.currentState = currentStepAction === 4 ? '关闭' : this.steps[currentStepAction] |
| | | this.form.deviceId = this.clickNodeVal.value |
| | | this.$axios.post(this.$api.deviceCheck.saveDeviceState, this.form, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | saveDeviceState(this.form).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('提交成功') |
| | | this.getDeviceStatePage(this.clickNodeVal.value) |
| | |
| | | }, |
| | | openRecordAcceptance() { |
| | | // 获取设备基础信息 |
| | | this.$axios.get(this.$api.deviceScope.selectDeviceByCode + '?id=' + this.clickNodeVal.value).then(res => { |
| | | selectDeviceByCode({ id: this.clickNodeVal.value }).then(res => { |
| | | this.form.deviceName = res.data.deviceName |
| | | this.form.specificationModel = res.data.specificationModel |
| | | this.form.managementNumber = res.data.managementNumber |
| | |
| | | }, |
| | | // 获取负责人信息接口 |
| | | getUserList() { |
| | | this.$axios.get(this.$api.deviceScope.selectUserList).then(res => { |
| | | selectUserCondition().then(res => { |
| | | if (res.code == 200) { |
| | | this.responsibleOptions = res.data |
| | | } |
| | |
| | | // 导出 |
| | | handleDownOne(row) { |
| | | this.outLoading = true |
| | | this.$axios.get(this.$api.deviceCheck.exportDeviceStatus + '?deviceId=' + row.deviceId + '&processNumber=' + row.processNumber, { |
| | | responseType: "blob" |
| | | }).then(res => { |
| | | exportDeviceStatus({ deviceId: row.deviceId, processNumber: row.processNumber }).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | //将Blob 对象转换成字符串 |
| | | let reader = new FileReader(); |
| | | reader.readAsText(blob, 'utf-8'); |
| | | reader.onload = () => { |
| | | try { |
| | | let result = JSON.parse(reader.result); |
| | | if (result.message) { |
| | | this.$message.error(result.message); |
| | | } else { |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = '设备停/启用.doc'; |
| | | link.click(); |
| | | this.$message.success('导出成功') |
| | | } |
| | | } catch (err) { |
| | | console.log(err); |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = '设备停/启用.doc'; |
| | | link.click(); |
| | | this.$message.success('导出成功') |
| | | } |
| | | } |
| | | this.$download.saveAs(blob, '设备停/启用.doc') |
| | | this.$message.success('导出成功') |
| | | }) |
| | | }, |
| | | // 删除 |
| | |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.$axios.delete(this.$api.deviceCheck.deleteDeviceState + '?stateId=' + row.stateId).then(res => { |
| | | deleteDeviceState({ stateId: row.stateId }).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('删除成功') |
| | | this.getDeviceStatePage(this.clickNodeVal.value) |
| | |
| | | message: '已取消删除' |
| | | }); |
| | | }); |
| | | |
| | | }, |
| | | //导出 |
| | | handleDown() { |
| | | this.outLoading = true |
| | | this.$axios.post(this.$api.deviceCheck.deviceStateExport, { |
| | | deviceStateExport({ |
| | | deviceId: this.clickNodeVal.value, |
| | | processNumber: this.search.processNumber |
| | | }, { responseType: "blob" }).then(res => { |
| | | }).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | //将Blob 对象转换成字符串 |
| | | let reader = new FileReader(); |
| | | reader.readAsText(blob, 'utf-8'); |
| | | reader.onload = () => { |
| | | try { |
| | | let result = JSON.parse(reader.result); |
| | | if (result.message) { |
| | | this.$message.error(result.message); |
| | | } else { |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = '设备停用/启用.xlsx'; |
| | | link.click(); |
| | | this.$message.success('导出成功') |
| | | } |
| | | } catch (err) { |
| | | console.log(err); |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = '设备停用/启用.xlsx'; |
| | | link.click(); |
| | | this.$message.success('导出成功') |
| | | } |
| | | } |
| | | this.$download.saveAs(blob, '设备停用/启用.xlsx') |
| | | this.$message.success('导出成功') |
| | | }).finally(() => { |
| | | this.outLoading = false |
| | | }) |
| | |
| | | this.getDeviceStatePage(this.clickNodeVal.value); |
| | | }, |
| | | getDeviceStatePage(deviceId) { |
| | | this.$axios.get(this.$api.deviceCheck.getDeviceStatePage + '?deviceId=' + deviceId + "&size=" + this.search.size + "¤t=" + this.search.current + "&processNumber=" + this.search.processNumber).then(res => { |
| | | getDeviceStatePage({ deviceId, ...this.search }).then(res => { |
| | | if (res.code == 200) { |
| | | this.tableDatalist = res.data.records |
| | | this.search.total = res.data.total |
| | |
| | | <!-- <check v-if="tabListActiveName == '设备核查'" :clickNodeVal="clickNodeVal"/>--> |
| | | <!-- </el-tab-pane>--> |
| | | <el-tab-pane label="设备维护" name="设备维护"> |
| | | <!-- 完成接口 --> |
| | | <maintenance v-if="tabListActiveName == '设备维护'" :clickNodeVal="clickNodeVal" /> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="设备借用" name="设备借用"> |
| | | <!-- 完成接口 --> |
| | | <borrow v-if="tabListActiveName == '设备借用'" :clickNodeVal="clickNodeVal" /> |
| | | </el-tab-pane> |
| | | <!-- <el-tab-pane label="设备故障" name="设备故障">--> |
| | | <!-- <fault v-if="tabListActiveName == '设备故障'" :clickNodeVal="clickNodeVal" />--> |
| | | <!-- </el-tab-pane>--> |
| | | <!-- 完成接口 --> |
| | | <el-tab-pane label="使用记录" name="使用记录"> |
| | | <record v-if="tabListActiveName == '使用记录'" :clickNodeVal="clickNodeVal" /> |
| | | </el-tab-pane> |
| | | <!-- 完成接口 --> |
| | | <el-tab-pane label="设备停用/启用" name="设备停用/启用"> |
| | | <state v-if="tabListActiveName == '设备停用/启用'" :clickNodeVal="clickNodeVal" /> |
| | | </el-tab-pane> |
| | | <!-- 完成接口 --> |
| | | <el-tab-pane label="设备报废" name="设备报废"> |
| | | <equipment-scrap v-if="tabListActiveName == '设备报废'" :clickNodeVal="clickNodeVal" /> |
| | | </el-tab-pane> |
| | | <!-- 完成接口 --> |
| | | <el-tab-pane label="设备故障与维修" name="设备故障与维修"> |
| | | <equipment-failure v-if="tabListActiveName == '设备故障与维修'" :clickNodeVal="clickNodeVal" /> |
| | | </el-tab-pane> |
| | | <!-- 完成接口 --> |
| | | <el-tab-pane label="设备点检" name="设备点检"> |
| | | <inspection-of-equipment v-if="tabListActiveName == '设备点检'" :clickNodeVal="clickNodeVal" /> |
| | | </el-tab-pane> |
| | | <!-- 完成接口 --> |
| | | <el-tab-pane label="设备事故" name="设备事故"> |
| | | <equipment-accident v-if="tabListActiveName == '设备事故'" :clickNodeVal="clickNodeVal" /> |
| | | </el-tab-pane> |
| | |
| | | } |
| | | }, |
| | | nodeOpen(data, node, el) { |
| | | $($(el.$el).find(".node_i")[0]).attr( |
| | | "class", |
| | | "node_i el-icon-folder-opened" |
| | | ); |
| | | // $($(el.$el).find(".node_i")[0]).attr( |
| | | // "class", |
| | | // "node_i el-icon-folder-opened" |
| | | // ); |
| | | }, |
| | | nodeClose(data, node, el) { |
| | | $($(el.$el).find(".node_i")[0]).attr("class", "node_i el-icon-folder"); |
| | | // $($(el.$el).find(".node_i")[0]).attr("class", "node_i el-icon-folder"); |
| | | }, |
| | | } |
| | | }; |
| | |
| | | <el-col :span="16" style="text-align: right"> |
| | | <el-button size="small" type="primary" @click="refreshView">刷新</el-button> |
| | | <el-button v-if="typeSource == 1" size="small" type="primary" @click="openPurchase">进货验证</el-button> |
| | | <el-button v-if="state == 1 && typeSource == 1" size="small" type="primary" @click="openUnPassDialog('add')">不合格处理</el-button> |
| | | <el-button size="small" type="primary" @click="sampleVisible = true;uploadSample();">样品切换</el-button> |
| | | <!-- <el-button v-if="state == 1" size="small" type="primary" @click="taskVisible = true">任务切换</el-button>--> |
| | | <el-button v-if="state == 1 && typeSource == 1" size="small" type="primary" |
| | | @click="openUnPassDialog('add')">不合格处理</el-button> |
| | | <el-button size="small" type="primary" @click="sampleVisible = true; uploadSample();">样品切换</el-button> |
| | | <!-- <el-button v-if="state == 1" size="small" type="primary" @click="taskVisible = true">任务切换</el-button>--> |
| | | <el-button v-if="state == 1" size="small" type="primary" @click="addVerifyDia = true">提交</el-button> |
| | | <!-- 复核 --> |
| | | <el-button v-if="state == 2" size="medium" type="primary" @click="openAddCheck">通过</el-button> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <lims-table :tableData="tableData" :column="column" |
| | | :height="'calc(100vh - 250px)'" @pagination="pagination" |
| | | :page="page" :tableLoading="tableLoading"></lims-table> |
| | | <lims-table :tableData="tableData" :column="column" :height="'calc(100vh - 250px)'" @pagination="pagination" |
| | | :page="page" :tableLoading="tableLoading"></lims-table> |
| | | </div> |
| | | <!-- 新增实验室--> |
| | | <el-dialog :title="formTitle" :visible.sync="addDia" width="450px"> |
| | |
| | | }, |
| | | computed: { |
| | | action() { |
| | | return this.javaApi |
| | | return this.javaApi + '/deviceScope/uploadFile' |
| | | } |
| | | }, |
| | | data() { |