gaoluyang
2025-03-12 c5c23559e82c64b23dfb190e12952796d2be8bdd
设备搬迁-设备验收联调
已修改2个文件
53 ■■■■■ 文件已修改
src/api/cnas/resourceDemand/device.js 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/component/check-and-accept.vue 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/cnas/resourceDemand/device.js
@@ -1294,7 +1294,15 @@
//设备验收中四个table表格的删除功能
export function deleteIncidentReportAll(query) {
  return request({
    url: "/incident-report/deleteIncidentReportAll",
    url: "/incidentReport/deleteIncidentReportAll",
    method: "delete",
    params: query,
  });
}
//设备验收中四个table表格的删除功能
export function deleteIncidentReport(query) {
  return request({
    url: "/incidentReport/deleteIncidentReport",
    method: "delete",
    params: query,
  });
@@ -1303,7 +1311,7 @@
//设备验收 保存,提交,驳回,通过接口
export function saveIncidentReportData(query) {
  return request({
    url: "/incident-report/saveIncidentReportData",
    url: "/incidentReport/saveIncidentReportData",
    method: "post",
    data: query,
  });
@@ -1311,7 +1319,7 @@
//设备验收 保存,提交,驳回,通过接口
export function incidentReportPage(query) {
  return request({
    url: "/incident-report/incidentReportPage",
    url: "/incidentReport/incidentReportPage",
    method: "get",
    params: query,
  });
@@ -1319,7 +1327,7 @@
//设备验收 保存,提交,驳回,通过接口
export function getShowIncidentReport(query) {
  return request({
    url: "/incident-report/getShowIncidentReport",
    url: "/incidentReport/getShowIncidentReport",
    method: "get",
    params: query,
  });
@@ -1327,7 +1335,7 @@
//设备验收导出
export function incidentReportExport(query) {
  return request({
    url: "/incident-report/incidentReportExport",
    url: "/incidentReport/incidentReportExport",
    method: "get",
    params: query,
    responseType: "blob"
src/views/CNAS/resourceDemand/device/component/check-and-accept.vue
@@ -17,7 +17,7 @@
      </div>
    </div>
    <div class="tables" style="margin-top: 10px;">
      <el-table ref="table" :data="tableDataAlist" height="100%">
      <el-table ref="table" :data="tableDataAlist" height="100%" v-loading="tableLoading">
        <el-table-column label="序号" type="index" width="60">
          <template v-slot="scope">
            <span>{{ (search.current - 1) * search.size + scope.$index + 1 }}</span>
@@ -468,12 +468,13 @@
import { dateFormat } from '@/utils/date'
import file from "@/utils/file";
import {
  deleteCNASFile,
  deleteCNASFile, deleteIncidentReport,
  deleteIncidentReportAll, getShowIncidentReport, incidentReportExport, incidentReportPage,
  saveIncidentReportData,
  selectDeviceByCode
} from "@/api/cnas/resourceDemand/device";
import {selectUserCondition} from "@/api/system/user";
import {mapGetters} from "vuex";
export default {
  props: {
@@ -488,6 +489,7 @@
    return {
      //事故设备信息
      tableDataAlist: [], // 更改变量名称
      tableLoading: false,
      dialogVisible: false,
      rules: {
        quantity: [{ required: true, message: '请输入数量', trigger: 'blur' }],
@@ -517,7 +519,8 @@
  computed: {
    action() {
      return this.javaApi + '/personBasicInfo/saveCNASFile'
    }
    },
    ...mapGetters(["nickName"]),
  },
  mounted() {
    // 获取设备事故信息
@@ -661,32 +664,31 @@
      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.submitOperatingPersonnel = user.name
              this.form.submitOperatingPersonnel = this.nickName
              this.form.submitDate = dateTime
              break
            case 1:
              this.form.unpackingOperatingPersonnel = user.name
              this.form.unpackingOperatingPersonnel = this.nickName
              this.form.unpackingDate = dateTime
              break
            case 2:
              this.form.installOperatingPersonnel = user.name
              this.form.installOperatingPersonnel = this.nickName
              this.form.installDate = dateTime
              break
            case 3:
              this.form.installationAcceptanceOperatingPersonnel = user.name
              this.form.installationAcceptanceOperatingPersonnel = this.nickName
              this.form.installationAcceptanceDate = dateTime
              break
            case 4:
              this.form.acceptanceCheckOperatingPersonnel = user.name
              this.form.acceptanceCheckOperatingPersonnel = this.nickName
              this.form.acceptanceCheckDate = dateTime
              break
            case 5:
              this.form.acceptanceAuditOperatingPersonnel = user.name
              this.form.acceptanceAuditOperatingPersonnel = this.nickName
              this.form.acceptanceAuditDate = dateTime
              break
            default:
@@ -765,19 +767,21 @@
    },
    // 获取设备事故信息(根据从vuex中获取到的设备名称id进行数据查询)
    getDeviceAList(deviceId) {
      this.tableLoading = true
      incidentReportPage({deviceId: deviceId, size:this.search.size, current:this.search.current, processNumber: this.search.processNumber}).then(res => {
        this.tableLoading = false
        if (res.code == 200) {
          this.tableDataAlist = res.data.records
          this.search.total = res.data.total
        }
      }).catch(err => {
        this.tableLoading = false
      })
    },
    //table 事件处理开始处
    // 下载附件
    handleAttachmentClick(row) {
      // 模拟下载附件
      const imageUrl = this.javaApi+'/img/'+row.systemFileName; // 图片 URL
      // downloadImage(imageUrl);
      file.downloadIamge(imageUrl,row.fileName)
      this.$download.saveAs(row.systemFileName, row.fileName)
    },
    handleViewClick(row) {
      getShowIncidentReport({id: row.id}).then(res => {
@@ -797,7 +801,7 @@
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        deleteIncidentReportAll({id: row.id}).then(res => {
        deleteIncidentReport({id: row.id}).then(res => {
          if (res.code == 200) {
            this.$message.success('删除成功')
            this.getDeviceAList(this.clickNodeVal.value);
@@ -870,6 +874,7 @@
}
.search {
  margin-top: 10px;
  background-color: #fff;
  height: 40px;
  display: flex;