zouyu
2025-03-11 0bb447f57ab45b86db18b0cfd7c2fda36da817d3
src/views/CNAS/resourceDemand/device/component/operationInstruction.vue
@@ -31,9 +31,9 @@
        <template v-slot="scope">
          <el-button type="text" size="small" @click="downloadFile(scope.row.fileSystemName)">下载</el-button>
          <el-button type="text" size="small" style="color: red;"
            @click="deleteHomeworkGuidebook(scope.row)">删除</el-button>
          <el-button type="text" size="small" @click="instructionEditFun(scope.row)">编辑</el-button>
          <el-button type="text" size="small" @click="approval(scope.row)">审批</el-button>
            @click="deleteHomeworkGuidebook(scope.row)" :disabled="scope.row.status === true">删除</el-button>
          <el-button type="text" size="small" @click="instructionEditFun(scope.row)" :disabled="scope.row.status === true">编辑</el-button>
          <el-button type="text" size="small" @click="approval(scope.row)" :disabled="scope.row.status === true">审批</el-button>
        </template>
      </el-table-column>
    </el-table>
@@ -309,18 +309,7 @@
      });
    },
    downloadFile(fileName) {
      let state = /\.(jpg|jpeg|png|gif)$/i.test(fileName)
      if (state) {
        let url = this.javaApi + '/img/' + fileName;
        fileDownload.downloadIamge(url, fileName)
      } else {
        const url = this.javaApi + '/word/' + fileName
        const link = document.createElement('a');
        link.href = url;
        link.download = fileName;
        link.click();
        this.$message.success('下载成功')
      }
      this.$download.saveAs(fileName, fileName)
    },
    instructionEditFun(row) {
      this.dialogVisible = true