licp
2024-12-24 c70e37453d06f8eb6eddeddb3085548541cd34b5
src/components/view/a7-Ensure-results-validity.vue
@@ -100,6 +100,15 @@
        <el-button :loading="ratifyLoading" type="primary" @click="handleRatify(1)">批 准</el-button>
      </span>
    </el-dialog>
    <el-dialog :visible.sync="downloadDialog" title="导出" width="600px">
      <span>
        <el-button plain type="primary" @click="controlDown">实施计划导出</el-button>
        <el-button plain type="primary" @click="processingDown">评价导出</el-button>
      </span>
      <span slot="footer" class="dialog-footer">
        <el-button @click="downloadDialog = false">取 消</el-button>
      </span>
    </el-dialog>
  </div>
</template>
@@ -333,6 +342,13 @@
              }
            },
            {
              name: '导出',
              type: 'text',
              clickFun: (row) => {
                this.downLoadPost(row);
              },
            },
            {
              name: '删除',
              type: 'text',
              color: '#f56c6c',
@@ -361,6 +377,8 @@
      examineInfo: {},
      ratifyInfo: {},
      upLoading: false,
      downloadDialog: false,
      download: {},
    };
  },
  mounted() {
@@ -573,6 +591,11 @@
      this.evaluateDialog = false
      this.getYearDetailPlanList()
    },
    // 打开导出弹框
    downLoadPost (row) {
      this.downloadDialog = true
      this.download = row
    },
    // 打开年度明细新增、修改弹框
    showDialog (type, row) {
      this.formDia = true
@@ -584,6 +607,32 @@
      this.formDia = false
      this.getYearDetailPlanList()
    },
    // 控制单导出
    controlDown() {
      this.$axios.get(this.$api.qualityMonitor.exportQualityMonitorRatify + '?qualityMonitorDetailsId=' + this.download.qualityMonitorDetailsId, { responseType: "blob" }).then(res => {
        this.outLoading = false
        this.$message.success('导出成功')
        const blob = new Blob([res], { type: 'application/msword' });
        const url = URL.createObjectURL(blob);
        const link = document.createElement('a');
        link.href = url;
        link.download = '质量监控实施计划.docx';
        link.click();
      })
    },
    // 处理单导出
    processingDown() {
      this.$axios.get(this.$api.qualityMonitor.exportQualityMonitorEvaluate + '?qualityMonitorDetailsId=' + this.download.qualityMonitorDetailsId, { responseType: "blob" }).then(res => {
        this.outLoading = false
        this.$message.success('导出成功')
        const blob = new Blob([res], { type: 'application/msword' });
        const url = URL.createObjectURL(blob);
        const link = document.createElement('a');
        link.href = url;
        link.download = '质量监控评价.docx';
        link.click();
      })
    },
    delYearPlanDetail (row) {
      this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
        confirmButtonText: '确定',