src/views/CNAS/resourceDemand/device/component/files.vue
@@ -5,7 +5,7 @@
      <h4><span class="line"></span><span>设备档案</span></h4>
      <div class="btns">
        <el-button type="primary" size="small" @click="openEditForm" style="">修订档案</el-button>
        <el-button type="primary" size="small" @click="dialogVisible1 = true" style="">添加附件</el-button>
        <el-button type="primary" size="small" @click="openAddFileDia" style="">添加附件</el-button>
        <el-button type="primary" size="small" @click="deviceDialog = true" style="">查看设备二维码</el-button>
        <el-button type="primary" size="small" @click="handleDownOne" style="">导出</el-button>
      </div>
@@ -504,7 +504,9 @@
} from '@/api/cnas/resourceDemand/device.js'
import { selectUserCondition } from "@/api/business/inspectionTask";
import { selectQualifiedSupplierManagementPage } from '@/api/cnas/externalService/supplierManage/supplierManage'
import draftSave from '@/mixins/draftSave'
export default {
  mixins: [draftSave],
  props: {
    clickNodeVal: {
      type: Object,
@@ -682,6 +684,14 @@
        })
        this.fileList.push(obj)
      }
      this.draftRestore('fileAdd', 'addFile', row.id, 'dialogVisible1')
    },
    // 打开添加附件弹窗
    openAddFileDia() {
      this.dialogVisible1 = true
      this.$nextTick(() => {
        this.draftRestore('fileAdd', 'addFile', this.clickNodeVal.value, 'dialogVisible1')
      })
    },
    handleDeleteClick(row) {
      // 删除逻辑
@@ -712,6 +722,7 @@
        updateDocument(this.addFile).then(res => {
          if (res.code == 200) {
            this.$message.success('更新成功')
            this.draftClear('fileAdd')
            this.dialogVisible1 = false;
            this.getPage()
          }
@@ -721,6 +732,7 @@
        addDocument(this.addFile).then(res => {
          if (res.code == 200) {
            this.$message.success('保存成功')
            this.draftClear('fileAdd')
            this.dialogVisible1 = false;
            this.getPage()
          }
@@ -804,6 +816,7 @@
      this.editData = JSON.parse(JSON.stringify(this.Mdata))
      this.$nextTick(() => {
        this.dialogVisible = true
        this.draftRestore('fileRevision', 'editData', this.clickNodeVal.value, 'dialogVisible')
      })
    },
    // 下次日期 = 最近日期 + 周期(月),自动计算
@@ -875,6 +888,7 @@
      upDeviceParameter(formData).then(res => {
        this.$message.success('修改成功')
        this.upLoad = false
        this.draftClear('fileRevision')
        this.getList(this.clickNodeVal.value)
        this.dialogVisible = false
      }).catch(e => {
@@ -977,6 +991,7 @@
    },
    dialogVisible1(newVal) {
      if (newVal == false) {
        this.draftStop('fileAdd')
        this.isAddFileUpdate = false
        this.addFile = {}
        this.fileList = []