spring
2025-03-03 f01d916828cf9746a0f438d9472af9271efd9729
完成设备搬迁
已修改21个文件
1412 ■■■■ 文件已修改
src/api/cnas/resourceDemand/device.js 392 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/component/accidentForm.vue 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/component/borrow.vue 262 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/component/calibration.vue 58 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/component/check.vue 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/component/equipmentAcceptance.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/component/equipmentAccident.vue 56 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/component/equipmentFailure.vue 59 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/component/equipmentScrap.vue 89 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/component/failureForm.vue 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/component/fault.vue 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/component/inspectionForm.vue 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/component/inspectionOfEquipment.vue 56 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/component/maintenance.vue 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/component/operationInstruction.vue 80 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/component/record.vue 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/component/scrapApplicationForm.vue 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/component/state.vue 103 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/index.vue 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/inspectionTask/inspection.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/structural/premises/index.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/cnas/resourceDemand/device.js
@@ -647,6 +647,15 @@
    params: query,
  });
}
//使用记录 导出
export function exportUseRecord(query) {
  return request({
    url: "/deviceRecord/exportUseRecord",
    method: "get",
    responseType: "blob",
    params: query,
  });
}
//新增设备档案
export function addDocument(data) {
@@ -704,9 +713,9 @@
}
//设备验收(装备)导出
export function exportUseRecord(query) {
export function exportDeviceAcceptance(query) {
  return request({
    url: "/deviceRecord/exportUseRecord",
    url: "/deviceAcceptance/exportDeviceAcceptance",
    method: "get",
    responseType: "blob",
    params: query,
@@ -758,12 +767,12 @@
  });
}
//设备操作日志和记录
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,
  });
}
@@ -852,11 +861,83 @@
}
//设备维护删除
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,
  });
}
@@ -869,11 +950,296 @@
  });
}
// 借用-保存
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,
  });
}
src/views/CNAS/resourceDemand/device/component/accidentForm.vue
@@ -96,6 +96,10 @@
<script>
import { selectUserCondition } from "@/api/business/inspectionTask";
import {
  getDeviceAccidentReport,
  addDeviceAccidentReport,
} from '@/api/cnas/resourceDemand/device.js'
export default {
  name: "accident-form",
  // import 引入的组件需要注入到对象中才能使用
@@ -150,7 +154,7 @@
    },
    // 查询详情
    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) {
@@ -187,13 +191,7 @@
      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()
@@ -212,14 +210,7 @@
    },
    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
      })
    },
  },
src/views/CNAS/resourceDemand/device/component/borrow.vue
@@ -4,7 +4,7 @@
    <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;">
@@ -17,8 +17,10 @@
      </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>
@@ -197,13 +199,18 @@
</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: {
@@ -214,72 +221,12 @@
    }
  },
  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: ['借出', '借用'],
@@ -307,15 +254,94 @@
        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()
      }
    },
@@ -329,25 +355,46 @@
    }
  },
  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
@@ -362,11 +409,11 @@
          // 获取当前环节操作人与日期
          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:
@@ -452,7 +499,7 @@
    },
    // 查看详情
    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
@@ -493,56 +540,39 @@
    //导出
    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>
src/views/CNAS/resourceDemand/device/component/calibration.vue
@@ -4,7 +4,7 @@
    <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)">
@@ -240,20 +240,6 @@
            </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>
@@ -265,10 +251,8 @@
</template>
<script>
import fileDownload from "@/utils/file";
import {
  deviceMetricRecordPage,
  deviceLog,
  showDeviceMetricsCopy,
  deleteDeviceMetricRecord,
  deviceMetricRecordExport,
@@ -276,7 +260,9 @@
  selectDeviceMetric,
  deleteDeviceMetrics,
  addOrUpdateDeviceMetricRecord,
  saveOrUpdateDeviceMetric
} from '@/api/cnas/resourceDemand/device.js'
import { mapGetters } from "vuex";
export default {
  props: {
    clickNodeVal: {
@@ -343,7 +329,6 @@
        ],
      },
      addRecordLoading: false,
      tableDataOperate: [], // 本记录状态和操作日志
      upLoading: false,
      operationType: '',
      search: {
@@ -355,13 +340,13 @@
  },
  // 用于上传文件的信息
  computed: {
    ...mapGetters(["nickName"]),
    action() {
      return this.javaApi + '/personBasicInfo/saveCNASFile'
    }
  },
  mounted() {
    //获取操作记录信息
    this.getOperateMsg();
    this.getTableList(this.clickNodeVal.value) // 获取设备校准列表数据
  },
  methods: {
@@ -397,11 +382,6 @@
        this.search.total = res.data.total
      })
    },
    getOperateMsg() {
      deviceLog(this.clickNodeVal.value).then(res => {
        this.tableDataOperate = res.data
      })
    },
    // 添加核查记录
    add(type) {
      this.operationType = type
@@ -410,7 +390,7 @@
    },
    // 查看详情
    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 }
@@ -439,13 +419,11 @@
      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('下载成功')
      }
    },
@@ -454,7 +432,7 @@
      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' });
@@ -527,10 +505,9 @@
          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()
@@ -559,8 +536,7 @@
            }
            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 => {
@@ -636,16 +612,6 @@
      }
    }
  }
}
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>
src/views/CNAS/resourceDemand/device/component/check.vue
@@ -177,7 +177,7 @@
                    @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">附件上传
@@ -247,6 +247,7 @@
<script>
import ValueTable from "@/components/Table/value-table.vue";
import file from '@/utils/file';
import { mapGetters } from "vuex";
export default {
  components: {
    ValueTable
@@ -330,11 +331,7 @@
  },
  // 用于上传文件的信息
  computed: {
    headers() {
      return {
        'token': sessionStorage.getItem('token')
      }
    },
    ...mapGetters(["nickName"]),
    action() {
      return this.javaApi + this.$api.personnel.saveCNASFile
    }
@@ -397,8 +394,7 @@
          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: {
@@ -441,8 +437,7 @@
            }
            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, {
src/views/CNAS/resourceDemand/device/component/equipmentAcceptance.vue
@@ -63,7 +63,7 @@
  pageDeviceAcceptance,
  getDeviceAcceptanceFileList,
  delDeviceAcceptanceFileList,
  exportUseRecord,
  exportDeviceAcceptance,
  delDeviceAcceptance,
} from '@/api/cnas/resourceDemand/device.js'
export default {
@@ -200,13 +200,10 @@
      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)
      }
    },
    // 删除
@@ -272,7 +269,7 @@
    // 导出
    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')
src/views/CNAS/resourceDemand/device/component/equipmentAccident.vue
@@ -40,7 +40,11 @@
<script>
import AccidentForm from "./accidentForm.vue";
import {
  pageDeviceAccidentReport,
  exportDeviceAccidentReport,
  delDeviceAccidentReport,
} from '@/api/cnas/resourceDemand/device.js'
export default {
  name: "equipment-accident",
  // import 引入的组件需要注入到对象中才能使用
@@ -73,19 +77,10 @@
    // 查询
    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
@@ -119,37 +114,10 @@
    // 导出
    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')
      })
    },
    // 删除
@@ -159,7 +127,7 @@
        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);
        });
src/views/CNAS/resourceDemand/device/component/equipmentFailure.vue
@@ -38,7 +38,11 @@
<script>
import FailureForm from "./failureForm.vue";
import {
  pageDeviceBreakdownMaintenance,
  exportDeviceBreakdownMaintenance,
  delDeviceBreakdownMaintenance,
} from '@/api/cnas/resourceDemand/device.js'
export default {
  name: "equipment-failure",
  // import 引入的组件需要注入到对象中才能使用
@@ -71,19 +75,10 @@
    // 查询
    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
@@ -117,37 +112,13 @@
    // 导出
    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('导出成功')
      })
    },
    // 删除
@@ -157,7 +128,9 @@
        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);
        });
src/views/CNAS/resourceDemand/device/component/equipmentScrap.vue
@@ -7,41 +7,48 @@
      </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,
@@ -68,21 +75,12 @@
  // 方法集合
  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
@@ -93,13 +91,13 @@
        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)
    },
@@ -116,37 +114,11 @@
    // 导出
    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('导出成功')
      })
    },
    // 删除
@@ -156,7 +128,7 @@
        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);
        });
@@ -185,6 +157,7 @@
  justify-content: space-between;
  align-items: center;
}
.title-search {
  display: flex;
  align-items: center;
src/views/CNAS/resourceDemand/device/component/failureForm.vue
@@ -67,6 +67,11 @@
</template>
<script>
import {
  getDeviceBreakdownMaintenance,
  addDeviceBreakdownMaintenance,
} from '@/api/cnas/resourceDemand/device.js'
import { selectUserCondition } from "@/api/business/inspectionTask";
export default {
  name: "failure-form",
  // import 引入的组件需要注入到对象中才能使用
@@ -115,7 +120,9 @@
    },
    // 查询详情
    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) {
@@ -144,13 +151,7 @@
      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()
@@ -168,18 +169,11 @@
      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
      })
    },
  },
src/views/CNAS/resourceDemand/device/component/fault.vue
@@ -277,7 +277,7 @@
<script>
import { dateFormat } from '@/utils/date'
import { mapGetters } from "vuex";
export default {
  props: {
    clickNodeVal: {
@@ -308,6 +308,7 @@
    }
  },
  computed: {
    ...mapGetters(["nickName"]),
    action() {
      return this.javaApi + this.$api.personnel.saveCNASFile
    }
@@ -351,29 +352,28 @@
      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:
src/views/CNAS/resourceDemand/device/component/inspectionForm.vue
@@ -136,6 +136,13 @@
</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 引入的组件需要注入到对象中才能使用
@@ -181,7 +188,9 @@
      }
    },
    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 || []
@@ -198,13 +207,7 @@
      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()
@@ -214,13 +217,7 @@
          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()
@@ -236,13 +233,7 @@
        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()
@@ -257,18 +248,11 @@
      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
      })
    },
  },
src/views/CNAS/resourceDemand/device/component/inspectionOfEquipment.vue
@@ -48,7 +48,11 @@
<script>
import InspectionForm from "./inspectionForm.vue";
import {
  getDeviceInspectionRecordByPage,
  exportDeviceInspectionRecord,
  deleteDeviceInspectionRecord,
} from '@/api/cnas/resourceDemand/device.js'
export default {
  name: "inspection-of-equipment",
  // import 引入的组件需要注入到对象中才能使用
@@ -81,19 +85,10 @@
    // 查询
    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
@@ -127,37 +122,12 @@
    // 导出
    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')
      })
    },
    // 删除
@@ -167,7 +137,7 @@
        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);
        });
src/views/CNAS/resourceDemand/device/component/maintenance.vue
@@ -118,8 +118,10 @@
<script>
import {
  exportMaintenanceRecord,
  deviceMaintainDelete,
  deleteDeviceMaintenance,
  selectDeviceByCode,
  addDeviceMaintenance,
  getDeviceMaintenancePage,
} from '@/api/cnas/resourceDemand/device.js'
export default {
  props: {
@@ -180,33 +182,8 @@
      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('导出成功')
          }
        }
      })
    },
    //操作详情删除
@@ -216,9 +193,10 @@
        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: '删除成功!'
@@ -246,15 +224,15 @@
      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)
        }
      })
    },
@@ -269,7 +247,10 @@
    },
    //获取表单设备维护信息
    getAllMessage(deviceId) {
      this.$axios.get(this.$api.deviceCheck.getDeviceMaintenancePage + "?deviceId=" + deviceId + "&size=" + this.search.size + "&current=" + 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
src/views/CNAS/resourceDemand/device/component/operationInstruction.vue
@@ -1,16 +1,9 @@
<!-- 作业指导书 -->
<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">
@@ -58,8 +51,8 @@
              </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>
@@ -86,7 +79,7 @@
          <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>
@@ -165,8 +158,8 @@
            <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>
@@ -184,7 +177,15 @@
<script>
import fileDownload from "@/utils/file";
import {
  approvalOfHomeworkInstructionManual,
  homeworkGuidebook,
  homeworkGuidebookEditor,
  newHomeworkGuidebookAdded,
  deleteHomeworkGuidebook,
  pageByPageQueryOfHomeworkInstructions,
  selectDeviceParameter,
} from '@/api/cnas/resourceDemand/device.js'
export default {
  props: {
    clickNodeVal: {
@@ -275,13 +276,14 @@
      });
    },
    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
@@ -292,7 +294,10 @@
        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()
        })
@@ -319,7 +324,7 @@
    },
    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) {
@@ -345,11 +350,7 @@
      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
@@ -445,7 +446,7 @@
        .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) {
@@ -483,7 +484,7 @@
      this.$message.warning(`当前限制选择 1 个文件,本次选择了 ${files.length} 个文件。`);
    },
    getList() {
      this.$axios.get(this.$api.deviceCheck.pageByPageQueryOfHomeworkInstructions + "?size=" + this.search.size + "&current=" + 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
@@ -491,17 +492,7 @@
      })
    },
    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();
@@ -527,13 +518,8 @@
    },
  },
  computed: {
    headers() {
      return {
        'token': sessionStorage.getItem('token')
      }
    },
    action() {
      return this.javaApi + this.$api.personnel.saveCNASFile
      return this.javaApi + '/personBasicInfo/saveCNASFile'
    }
  },
}
src/views/CNAS/resourceDemand/device/component/record.vue
@@ -350,14 +350,7 @@
    },
    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
      })
    },
  },
src/views/CNAS/resourceDemand/device/component/scrapApplicationForm.vue
@@ -73,6 +73,11 @@
</template>
<script>
import {
  getDeviceScrapped,
  addDeviceScrapped,
} from '@/api/cnas/resourceDemand/device.js'
import { selectUserCondition } from "@/api/business/inspectionTask";
export default {
  name: "scrapApplicationForm",
  // import 引入的组件需要注入到对象中才能使用
@@ -122,7 +127,9 @@
    },
    // 查询详情
    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) {
@@ -155,13 +162,7 @@
      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()
@@ -179,18 +180,11 @@
      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
      })
    },
  },
src/views/CNAS/resourceDemand/device/component/state.vue
@@ -237,7 +237,17 @@
  </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: {
@@ -246,6 +256,9 @@
        return {};
      }
    }
  },
  computed: {
    ...mapGetters(["nickName"]),
  },
  data() {
    return {
@@ -311,25 +324,24 @@
      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:
@@ -355,11 +367,7 @@
          // 获取当前状态
          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)
@@ -385,7 +393,7 @@
    },
    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
@@ -398,7 +406,7 @@
    },
    // 获取负责人信息接口
    getUserList() {
      this.$axios.get(this.$api.deviceScope.selectUserList).then(res => {
      selectUserCondition().then(res => {
        if (res.code == 200) {
          this.responsibleOptions = res.data
        }
@@ -418,37 +426,11 @@
    // 导出
    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('导出成功')
      })
    },
    // 删除
@@ -458,7 +440,7 @@
        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)
@@ -470,43 +452,18 @@
          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
      })
@@ -521,7 +478,7 @@
      this.getDeviceStatePage(this.clickNodeVal.value);
    },
    getDeviceStatePage(deviceId) {
      this.$axios.get(this.$api.deviceCheck.getDeviceStatePage + '?deviceId=' + deviceId + "&size=" + this.search.size + "&current=" + 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
src/views/CNAS/resourceDemand/device/index.vue
@@ -97,29 +97,37 @@
          <!--            <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>
@@ -233,13 +241,13 @@
      }
    },
    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");
    },
  }
};
src/views/business/inspectionTask/inspection.vue
@@ -19,9 +19,10 @@
      <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>
src/views/structural/premises/index.vue
@@ -22,9 +22,8 @@
      </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">
@@ -102,7 +101,7 @@
  },
  computed: {
    action() {
      return this.javaApi
      return this.javaApi + '/deviceScope/uploadFile'
    }
  },
  data() {