1
wwl
2025-02-18 a5fab491616e113a3560b4b053250418473628f9
1
3个文件已修改
188 ■■■■ 已修改文件
src/api/doctor/checkAll.js 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/jianceResult/index.vue 43 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/biol/index.vue 133 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/doctor/checkAll.js
@@ -40,7 +40,17 @@
  })
}
// 生成pdf
export function getPdfpre(tjNumber, flag, sfdy) {
  return request({
    url: '/system/report/previewprint/' + flag + '/' + tjNumber + '/' + sfdy,
    method: 'get',
    responseType: 'blob',
    headers: {
      "type": 'application/pdf'
    }
  })
}
export function isPdfOrJimu(tjNumber) {
  return request({
    url: '/system/report/isPdfOrJimu',
src/components/jianceResult/index.vue
@@ -7,15 +7,25 @@
          <el-input v-model="queryParams.xmgz" placeholder="请输入内容" clearable @keyup.enter.native="handleQuery"
            style="width: 130px;" />
        </el-form-item>
        <el-form-item>
        <el-form-item>
          <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
        </el-form-item>
        <el-form-item label="检测结果" prop="xmg">
          <el-input
            type="textarea"
            :autosize="{ minRows: 2, maxRows: 4 }"
            v-model="selectedContent"
            placeholder=""
            style="width: 400px;"
            clearable
          />
        </el-form-item>
      </el-form>
      <el-table :data="dataList" ref="elTable" v-loading="loading" border @selection-change="handleSelectionChange">
      <el-table :data="dataList" ref="elTable" v-loading="loading" border @selection-change="handleSelectionChange" style="max-height: 360px; overflow-y: auto;">
        <el-table-column type="selection" width="40" align="center" />
        <el-table-column label="标号" prop="aid" align="center" />
        <el-table-column label="结论值" prop="ruleStr" align="center" />
        <el-table-column label="参考范围" prop="reference" align="center" />
        <el-table-column label="参考范围" prop="reference" align="center" />
        <el-table-column label="简码" prop="jm" align="center" />
      </el-table>
      <span slot="footer" class="dialog-footer">
@@ -55,21 +65,26 @@
  mounted() {
  },
  methods: {
    handleOk() {
        this.open = false
        this.$emit('add', this.list);
        this.list = [];  // 清空已选列表
        this.queryParams.xmgz = '';  // 清空查询参数
    },
    quxiao(){
      this.open = false
      this.queryParams = {
        xmgz: ''
      }
    },
    handleOk() {
        this.open = false
        this.$emit('add', this.list);
      this.list = [];  // 清空已选列表
    },
    handleQuery() {
      this.getList();
    },
    handleSelectionChange(selection) {
      this.list = selection
      console.log(this.list);
    },
    getList() {
      this.loading = true;
@@ -88,6 +103,20 @@
      });
    },
  },
  computed: {
    selectedContent: {
      get() {
        return this.list.map(item => item.ruleStr).join(',');
      },
      set(value) {
        // 手动编辑时同步回list(需要根据实际数据结构调整)
        this.list = value.split(',').map(str => ({
          ...this.dataList.find(item => item.ruleStr === str.trim()),
          ruleStr: str.trim()
        })).filter(Boolean);
      }
    }
  },
};
</script>
src/views/system/biol/index.vue
@@ -544,9 +544,8 @@
import { getInfo } from "@/api/login";
import { isPdfOrJimu } from "@/api/doctor/checkAll";
import {
  listOrder,
  getNumber,
  getPdf,
  getPdfpre,
  getprint,
  hasReport,
  hasPrintCode,
@@ -819,14 +818,15 @@
    },
    baogaoyulan() {
      const tjNumber = this.report[0];
      console.log(tjNumber, 5555);
      this.isLoading = true;  
      isPdfOrJimu(tjNumber).then((response) => {
        if (response.data.flag == "0") {
          const flag = true;
          this.isLoading = false;  
          getPdf(tjNumber, flag).then((response) => {
          let sfdy = this.queryParams.dyzt
          getPdfpre(tjNumber, flag, sfdy).then((response) => {
            if (response.size === 0) {
              const loading = this.$loading({
                lock: true,
@@ -837,15 +837,12 @@
              setTimeout(() => {
                loading.close();
              }, 3000);
              // this.$message.msgSuccess("报告正在生成,请两分钟后预览!");
              this.$message({
                message: "报告正在生成,请两分钟后预览!",
                type: "warning",
              });
            } else {
              console.log(response);
              this.dialogVisible = true;
              this.url = window.webkitURL.createObjectURL(response); //将后端返回的blob文件读取出url
            }
          });
@@ -933,18 +930,6 @@
          contentType: "application/pdf",
        }).then((res) => {
          this.dialogVisible = true;
          // 转后后的blob对象
          console.log("blob", res.preview);
          // var ifr = document.createElement("iframe");
          // ifr.style.frameborder = "no";
          // ifr.style.display = "none";
          // ifr.style.pageBreakBefore = "always";
          // ifr.setAttribute("id", "printPdf");
          // ifr.setAttribute("name", "printPdf");
          // ifr.src =res.preview
          // document.body.appendChild(ifr);
          // this.doPrint("printPdf");
          // window.URL.revokeObjectURL( ifr.src);
          try {
            this.url = res.preview;
          } catch (error) {
@@ -954,116 +939,6 @@
      });
    },
    // 体检报告
    // viewReport() {
    //   const flag = true;
    //   this.failList = [];
    //   this.form.name = "报告打印失败:";
    //   if (this.report.length == 1) {
    //     this.report.forEach((item) => {
    //       this.tjNumber = item;
    //     });
    //     getPdf(this.tjNumber, flag).then((response) => {
    //       if (response.size == 0) {
    //         // this.$message.error("该用户体检报告暂未完成!");
    //         this.dialogVisible = false;
    //         this.DataList1.forEach((item) => {
    //           if (item.tjNumber === this.tjNumber) {
    //             this.userId = item.tjCustomerName;
    //             this.form.name += item.tjCustomerName;
    //           }
    //         });
    //         this.failList.push({
    //           tjNumber: this.tjNumber,
    //           printStatus: 0,
    //           printBy: this.userId,
    //           createBy: this.userIds,
    //         });
    //       } else {
    //         this.dialogVisible = true;
    //         this.url = window.webkitURL.createObjectURL(response); //将后端返回的blob文件读取出url
    //         console.log(this.url)
    //         this.DataList1.forEach((item) => {
    //           if (item.tjNumber === this.tjNumber) {
    //             this.userId = item.tjCustomerName;
    //             // this.form.name += item.tjCustomerName
    //           }
    //         });
    //         this.failList.push({
    //           tjNumber: this.tjNumber,
    //           printStatus: 1,
    //           printBy: this.userId,
    //           createBy: this.userIds,
    //         });
    //       }
    //       this.joggle(this.failList);
    //       this.getList();
    //     });
    //   } else {
    //     for (let i = 0; i < this.report.length; i++) {
    //       if (i <= this.report.length) {
    //         this.tjNumber = this.report[i];
    //         getPdf(this.tjNumber, flag).then((response) => {
    //           if (response.size == 0) {
    //             this.failList = [];
    //             this.DataList1.forEach((item) => {
    //               if (item.tjNumber === this.report[i]) {
    //                 this.userId = item.tjCustomerName;
    //                 if (this.form.name) {
    //                   this.form.name =
    //                     this.form.name + "," + item.tjCustomerName;
    //                 }
    //               }
    //             });
    //             this.failList.push({
    //               tjNumber: this.report[i],
    //               printStatus: 0,
    //               printBy: this.userId,
    //               createBy: this.userIds,
    //             });
    //             this.joggle(this.failList);
    //             this.getList();
    //             // this.$message.error("该用户体检报告暂未完成!");
    //             this.dialogVisible = false;
    //           } else {
    //             this.failList = [];
    //             this.DataList1.forEach((item) => {
    //               if (item.tjNumber === this.report[i]) {
    //                 this.userId = item.tjCustomerName;
    //               }
    //             });
    //             this.failList.push({
    //               tjNumber: this.report[i],
    //               printStatus: 1,
    //               printBy: this.userId,
    //               createBy: this.userIds,
    //             });
    //             this.joggle(this.failList);
    //             this.getList();
    //             // this.dialogVisible = true;
    //             // this.url = window.webkitURL.createObjectURL(response); //将后端返回的blob文件读取出url
    //             const newBlob = [];
    //             newBlob.push(response);
    //             const blob = new Blob(newBlob, { type: "application/pdf" });
    //             var date = new Date().getTime();
    //             var ifr = document.createElement("iframe");
    //             ifr.style.frameborder = "no";
    //             ifr.style.display = "none";
    //             ifr.style.pageBreakBefore = "always";
    //             ifr.setAttribute("id", "printPdf" + date);
    //             ifr.setAttribute("name", "printPdf" + date);
    //             ifr.src = window.URL.createObjectURL(blob);
    //             document.body.appendChild(ifr);
    //             this.doPrint("printPdf" + date);
    //             window.URL.revokeObjectURL(ifr.src); // 释放URL 对象
    //           }
    //         });
    //       }
    //     }
    //   }
    // },
    doPrint(val) {
      var ordonnance = document.getElementById(val).contentWindow;