lkk
2024-11-27 e17811c1d7b1e6318af32a366d23bd586750b6d2
2024 11 27
7个文件已修改
2个文件已添加
694 ■■■■ 已修改文件
src/api/doctor/pacsCheck.js 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/request.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/request1.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/doctor/pacsCheck/index.vue 516 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/hosp/order/index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sampling/sampling/index.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/tijian/TreeTransfer.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/tijian/index.vue 129 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
vue.config.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/doctor/pacsCheck.js
New file
@@ -0,0 +1,31 @@
import request from '@/utils/request'
// 左边表格接口
export function getLeftList(data) {
    return request({
      url: '/api/His/pacs/getList',
      method: 'post',
      data:data
    })
  }
  // 体检科室列表显示接口
export function getRightList(code) {
  return request({
    url: '/api/His/getTjList',
    method: 'get',
    params:{
        code:code
    }
  })
}
// 同步接口
export function asyncPacs(data) {
  return request({
    url: '/api/His/asyncPacs',
    method: 'post',
    data:data
  })
}
src/utils/request.js
@@ -120,13 +120,13 @@
    // console.log('err' + error)
    let { message } = error;
    if (message == "Network Error") {
      message = "后端接口连接异常";
      message = "请检查网络!";
    }
    // else if (message.includes("timeout")) {
    //   message = "数据加载失败,请刷新页面";
    // }
    else if (message.includes("Request failed with status code")) {
      message = "系统接口" + message.substr(message.length - 3) + "异常";
      message = "系统接口异常, "+"请检查网络!";
    }
    Message({
      message: message,
src/utils/request1.js
@@ -121,13 +121,13 @@
    // console.log('err' + error)
    let { message } = error;
    if (message == "Network Error") {
      message = "后端接口连接异常";
      message = "请检查网络!";
    }
    // else if (message.includes("timeout")) {
    //   message = "数据加载失败,请刷新页面";
    // }
    else if (message.includes("Request failed with status code")) {
      message = "系统接口" + message.substr(message.length - 3) + "异常";
      message = "系统接口异常, "+"请检查网络!";
    }
    Message({
      message: message,
src/views/doctor/pacsCheck/index.vue
New file
@@ -0,0 +1,516 @@
<template>
  <div class="app-container">
    <el-form
      :model="queryParams"
      ref="queryForm"
      size="small"
      :inline="true"
      label-width="68px"
    >
      <el-form-item label="体检号" prop="reportDoctorCode">
        <el-input
          ref="inputName"
          v-model="queryParams.tjNum"
          placeholder="请输入体检号"
          clearable
          @keyup.enter.native="handleQuery"
          style="width: 170px"
        />
      </el-form-item>
      <el-form-item label="姓名" prop="name">
        <el-input
          v-model="queryParams.name"
          placeholder="请输入姓名"
          clearable
          @keyup.enter.native="handleQuery"
          style="width: 110px"
        />
      </el-form-item>
      <el-form-item label="登记时间" prop="createTimeList">
        <el-date-picker
          v-model="createTimeList"
          type="datetimerange"
          align="right"
          :picker-options="pickerOptions"
          style="width: 310px"
          start-placeholder="开始日期"
          end-placeholder="结束日期"
          format="yyyy.MM.dd"
          value-format="yyyy.MM.dd "
          @change="handleDateChange"
        >
        </el-date-picker>
      </el-form-item>
      <el-form-item>
        <el-button
          type="primary"
          icon="el-icon-search"
          size="mini"
          @click="handleQuery"
          style="margin-right: 15px"
          >查询</el-button
        >
        <!-- <el-button size="mini"  @click="tongbu(scope.row)"
          >同步</el-button
        > -->
        <el-button
          icon="el-icon-refresh"
          type="primary"
          size="mini"
          @click="resetQuery"
          >重置</el-button
        >
        <el-button
          icon="el-icon-check"
          type="primary"
          size="mini"
          style="margin-right: 15px"
          @click="tongbu"
          :disabled="!selectedFirstTable"
          >同步</el-button
        >
      </el-form-item>
    </el-form>
    <!-- <el-radio-group
      v-model="checkStatus"
      @input="radioChange"
      style="margin: 10px 15px"
    >
    </el-radio-group> -->
    <div class="table-title">
      <h3>检查记录</h3>
    </div>
    <!--  v-loading="loading" :row-class-name="tableRowClassName"  @current-change="handleCurrentChange" -->
    <el-table
      id="ta"
      ref="tb"
      :data="exaLists"
      v-loading="loading"
      border
      max-height="350"
      @current-change="handleCurrentChange"
      @selection-change="handleSelectionChange"
      :row-class-name="tableRowClassName"
    >
      <el-table-column
        fixed
        type="selection"
        align="center"
        label="选择"
        width="40"
        :selectable="isSelectable"
      >
      </el-table-column>
      <el-table-column label="姓名" align="center" prop="name" width="80px" />
      <el-table-column label="性别" align="center" prop="gender" width="80px" />
      <el-table-column
        label="年龄"
        align="center"
        prop="patientAge"
        width="80px"
      >
      </el-table-column>
      <el-table-column
        label="送检科室"
        align="center"
        prop="deptName"
        width="100px"
      />
      <el-table-column
        label="检查项目"
        align="center"
        prop="checkParts"
        width="150px"
      />
      <el-table-column
        label="报告时间"
        align="center"
        prop="examinationDate"
        width="150px"
      />
      <el-table-column label="门诊号" align="center" prop="mzh" width="140px" />
      <el-table-column
        label="申请单号"
        align="center"
        prop="brid"
        width="145px"
      />
      <el-table-column
        label="结果状态"
        align="center"
        prop="diagnosis"
        width="150"
        :show-overflow-tooltip="true"
      />
      <!--  :show-overflow-tooltip="true" -->
      <el-table-column
        label="报告医师"
        align="center"
        prop="reportDoctorName"
        width="120px"
      />
      <el-table-column
        label="检查医师名"
        align="center"
        prop="checkDoctorName"
        width="120px"
      />
      <el-table-column
        label="结果表现"
        align="center"
        prop="examination"
        :show-overflow-tooltip="true"
      />
    </el-table>
    <div class="table-title">
      <h3>体检记录</h3>
    </div>
    <el-table
      border
      max-height="280"
      ref="tab1"
      :data="checkList"
      v-loading="loading"
      @selection-change="handleSelectionChangeSecond"
    >
      <el-table-column type="selection" width="55"> </el-table-column>
      <el-table-column
        label="状态"
        align="center"
        prop="type"
        :show-overflow-tooltip="true"
        min-width="60"
      >
        <template slot-scope="scope">
          <span v-if="scope.row.type == '0'">未检</span>
          <span v-if="scope.row.type == '1'">已检</span>
          <span v-if="scope.row.type == '2'">弃检</span>
          <span v-if="scope.row.type == '3'">延期</span>
        </template>
      </el-table-column>
      <el-table-column
        label="科室"
        align="center"
        prop="deptName"
        min-width="115"
      />
      <el-table-column
        label="项目"
        align="center"
        prop="proName"
        min-width="160"
      />
      <el-table-column
        label="收费方式"
        align="center"
        prop="sffs"
        min-width="80"
      />
      <el-table-column
        label="是否收费"
        align="center"
        prop="isPay"
        min-width="80"
      />
      <el-table-column
        label="检查时间"
        align="center"
        prop="bcupdateTime"
        min-width="160"
      />
      <el-table-column
        label="最后修改时间"
        align="center"
        prop="zhupdateTime"
        min-width="160"
      />
    </el-table>
    <div class="pag">
      <div class="pag1">
        <!-- <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :pager-count="5" :current-page.sync="currentPage1" :current-page="page"
                  :page-sizes="pageSize" :page-size="size" layout="total, sizes, prev, pager, next, jumper" :total="total">
              </el-pagination> -->
        <!-- <pagination
          v-show="total > 0"
          :total="total"
          :pager-count="5"
          :page.sync="queryParams.page"
          :limit.sync="queryParams.pageSize"
          @pagination="getList"
        /> -->
      </div>
    </div>
  </div>
</template>
  <script>
import { getLeftList, getRightList, asyncPacs } from "@/api/doctor/pacsCheck";
import moment from "moment";
export default {
  dicts: ["dict_tj_status"],
  data() {
    return {
      dis: false,
      code: null,
      createTimeList: "",
      total: 0,
      loading: false,
      isSyncing: false,
      // 查询参数
      queryParams: {
        // page: 1,
        // pageSize: 20,
        name: null,
        start: null,
        end: null,
        tjNum: null,
      },
      // 绑定单选按钮
      checkStatus: "0",
      exaLists: [],
      selectedFirstTable: null, // 第一个表格选中行
      selectedSecondTable: [], // 第二个表格选中行
      // 表单参数
      form: {},
      clearTimeSet: null,
      tjNumbers: "",
      multipleSelection: "",
      tjnum: "",
      xiangmuList: [],
      checkList: [],
      tg: true,
      bh: true,
      pickerOptions: {
        shortcuts: [
          {
            text: "最近一周",
            onClick(picker) {
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
              picker.$emit("pick", [start, end]);
            },
          },
          {
            text: "最近一个月",
            onClick(picker) {
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
              picker.$emit("pick", [start, end]);
            },
          },
          {
            text: "最近三个月",
            onClick(picker) {
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
              picker.$emit("pick", [start, end]);
            },
          },
        ],
      },
    };
  },
  mounted() {
    this.$nextTick(() => {
      this.$refs.inputName.focus();
    });
  },
  methods: {
    handleDateChange(val){
      if (val && val.length === 2) {
        this.queryParams.start = val[0]; // 设置开始时间
        this.queryParams.end = val[1];   // 设置结束时间
      } else {
        this.queryParams.start = null;
        this.queryParams.end = null;
      }
      console.log('Query Params:', this.queryParams);
    },
    isSelectable(row) {
      return !!row.mzh;
    },
    tableRowClassName({ row }) {
      return !row.mzh ? "row-disabled" : "";
    },
    handleSelectionChange(val) {
      console.log(val);
      if (val.length > 1) {
        let del_row = val.shift();
        this.$refs.tb.toggleRowSelection(del_row, false); //设置这一行取消选中
      }
      console.log(val, 999);
      if (val.length > 0) {
        const selectedRow = val[0];
        console.log(val[0], 555);
        /*  if (!selectedRow.mzh) {
          this.$refs.tb.toggleRowSelection(selectedRow, false);
          this.$message.warning("当前行无有效门诊号,不能选中");
          return;
        } */
        this.selectedFirstTable = selectedRow;
        console.log("当前选中的行数据:", this.selectedFirstTable);
        this.fetchRightTableData(selectedRow);
      } else {
        this.selectedFirstTable = null;
        this.checkList = [];
      }
    },
    // 根据选中的行数据请求右边表格数据
    fetchRightTableData(selectedRow) {
      const code = selectedRow.mzh;
      if (!code) return;
      this.loading = true;
      getRightList(code).then((response) => {
        this.checkList = response.data;
        this.loading = false;
      });
    },
    handleSelectionChangeSecond(selectedRows) {
      this.selectedSecondTable = selectedRows;
      console.log("当前选中的行数据:", this.selectedSecondTable);
    },
    getList() {
      if (this.createTimeList) {
        this.queryParams.start = this.createTimeList[0];
        this.queryParams.end = this.createTimeList[1];
      } else if (this.createTimeList == null) {
        this.queryParams.start = null;
        this.queryParams.end = null;
      }
    },
    /** 搜索按钮操作 */
    handleQuery() {
      // this.queryParams.page = 1;
      this.loading = true;
      getLeftList(this.queryParams)
        .then((res) => {
          console.log(res, 1111);
          if (res.code == 200) {
            this.loading = false;
            this.exaLists = res.data;
            this.code = this.exaLists.mzh;
          }
        })
        .catch((error) => {
          this.loading = false;
          this.$message.error(res.msg || "查询失败,请稍后重试");
        });
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.createTimeList = [];
      this.resetForm("queryForm");
      this.queryParams = {
        name: null,
        start: null,
        end: null,
        tjNum: null,
      };
      // 清空其他依赖数据
      this.checkList = [];
      this.exaLists = [];
    },
    handleCurrentChange(row) {
      this.currentRow = row;
      // console.log('当前选中的行:', row);
    },
    setTime() {
      //设置定时器
      this.clearTimeSet = setInterval(() => {
        this.$modal.closeLoading();
      }, 300000);
    },
    tongbu(row) {
      this.$modal.loading("正在同步,请稍候...");
      this.setTime();
      // console.log(val, 66);
      const requestData = {
        pacs: this.selectedFirstTable, // 左侧表格选中数据
        tj: this.selectedSecondTable[0], // 右侧表格选中数据
      };
      if (!this.selectedSecondTable || this.selectedSecondTable.length === 0) {
        this.$message.error("至少选一条数据!");
        return;
      }
      asyncPacs(requestData)
        .then((res) => {
          if (res.code == 200) {
            this.fetchRightTableData(this.selectedFirstTable);
            clearInterval(this.clearTimeSet);
            this.clearTimeSet = null;
            this.$modal.closeLoading();
            this.$modal.msgSuccess("同步成功!");
          } else {
            this.$message.error(res.message || "同步失败,请稍后重试");
          }
        })
        .catch((error) => {
          clearInterval(this.clearTimeSet);
          this.clearTimeSet = null;
          this.$modal.closeLoading();
          // this.$modal.error("操作失败,请稍后重试");
        })
    },
  },
};
</script>
  <style lang="scss" scoped>
#ta .el-table__header-wrapper .el-checkbox {
  display: none;
}
.el-table .warning-row {
  background: #e5f3ff !important;
}
::v-deep .el-table__body tr.current-row > td {
  background: #edf2fa !important;
}
.table-title {
  text-align: center;
  margin-bottom: 15px;
}
.row-disabled {
  color: #ccc; /* 设置禁用行的字体颜色 */
  pointer-events: none; /* 禁止鼠标操作 */
  background-color: #f5f5f5; /* 设置禁用行的背景色 */
}
.pag {
  width: 100%;
  display: flex;
  justify-content: center;
}
.pag1 {
  width: 30%;
}
</style>
src/views/hosp/order/index.vue
@@ -1619,7 +1619,6 @@
  methods: {
    onPayTypeChange() {
      if (this.payType === "6" && this.form.tjType !== 3) {
        this.cannotSelectPayType = true;
        this.$message.warning("该付款类型在此体检类型下不允许选择!");
        this.payType = this.dict.type.dict_pay_type[0]?.value || null;
src/views/sampling/sampling/index.vue
@@ -803,11 +803,9 @@
      try {
        // 请求接口并获取宽度值
        const widthResponse = await getTxmkd();
        // console.log("从 getTxmkd 返回的响应:", widthResponse); // 打印后端返回值
        const barcodeWidth = `${Number(widthResponse.msg)}%` || "70%"; // 获取宽度值,默认使用 70%
        const jyxh = this.selectList.map((item) => item.jyxh);
        // console.log(this.selectList, 999);
        await this.$nextTick(); // 确保 DOM 更新
src/views/system/tijian/TreeTransfer.vue
@@ -87,12 +87,15 @@
  },
  created() {
    this.leftNodeData = this.nodeData
    console.log(this.leftNodeData,111);
    this.rightKeys.length > 0 ? this.rerenderData(this.rightKeys) : ''
  },
  methods: {
    clickLeftCheckAll(v) {
      //左侧全选
      if (v) {
        let keys = this.getChildNodeKeys(this.leftNodeData)
        this.$refs.tree.setCheckedKeys(keys)
        this.toRight = true
src/views/system/tijian/index.vue
@@ -574,6 +574,9 @@
                  :data="packagedataList"
                  node-key="proId"
                  :props="defaultpackProps"
                  :filter-node-method="filterpackage"
                  @check-change="handlePackageChecked"
                  :default-checked-keys="checkedListkey1"
                  :render-content="renderContent"
                >
                </el-tree>
@@ -1593,6 +1596,7 @@
      treedataList: [],
      checkedkey: [],
      checkedListkey: [],
      checkedListkey1: [],
      defaultProps: {
        children: [],
        label: "proName",
@@ -2915,33 +2919,6 @@
        getZhList().then((response) => {
          if (response.data) {
            this.packageList = response.data;
            // this.checkedkeys.push(this.packageList[0].id);
            // let datas = {
            //   zhId: this.packageList[0].id,
            // };
            // getlistByZhId(datas).then((res) => {
            //   this.packagedataList = res.data.tjProjectList;
            //   for (var i = 0; i < this.packagedataList.length; i++) {
            //     let proId = this.packagedataList[i].proId;
            //     getProSonDxList(proId).then((res) => {
            //       this.TreedataList = res.data.list;
            //       this.TreedataList.forEach((item) => {
            //         this.DataLists.push(item);
            //         if (this.DataLists.length >= 1) {
            //           this.marryalls = 0;
            //           this.DataLists.forEach((item1) => {
            //             this.marryalls += item1.proPrice;
            //             this.packagedataList.forEach((item3) => {
            //               if (item1.proParentId == item3.proId) {
            //                 item1.propinName = item3.proName;
            //               }
            //             });
            //           });
            //         }
            //       });
            //     });
            //   }
            // });
          }
          this.loading = false;
        });
@@ -2959,6 +2936,8 @@
      this.loading = true;
      getProParentIdDxList().then((response) => {
        this.Treedata = response.data.list;
        console.log(response, 77788);
        if (this.tableData[0]) {
          this.tableData[0].tjProjectList.forEach((selectionitem) => {
            this.Treedata.forEach((item) => {
@@ -2968,40 +2947,12 @@
            });
          });
        }
        // if (this.DataLists.length != 0) {
        //   this.DataLists.forEach((selectionitem) => {
        //     this.Treedata.forEach((item) => {
        //       if (selectionitem.propinName == item.proName) {
        //         item.disabled = true;
        //       }
        //     });
        //   });
        // }
        // this.checkedkey.push(this.Treedata[0].proId);
        // let proId = this.Treedata[0].proId;
        // getProSonDxList(proId).then((res) => {
        //   this.TreedataList = res.data.list;
        //   this.TreedataList.forEach((item) => {
        //     this.checkedListkey.push(item.proId);
        //     this.DataList.push(item);
        //     this.DataList.forEach((item) => {
        //       item.propinName = this.Treedata[0].proName;
        //     });
        //   });
        //   this.TotalPrice1 = 0;
        //   this.marryall = 0;
        //   if (this.DataList.length != 0) {
        //     this.list1 = false;
        //     this.DataList.forEach((item) => {
        //       this.TotalPrice1 = item.proPrice + this.TotalPrice1;
        //       this.marryall += item.proPrice;
        //     });
        //   }
        // });
        this.loading = false;
      });
    },
    handlepackage(data, checked, checkedNodes) {
      this.dataObj = data;
      if (checked.checkedNodes.length != 0) {
        this.$refs.treas.setCheckedKeys([data.id]);
        let datas = {
@@ -3009,16 +2960,27 @@
        };
        getlistByZhId(datas).then((res) => {
          this.packagedataList = res.data.tjProjectList;
          console.log(this.packagedataList, 1122);
          this.DataLists = [];
          this.checkedListkey1 = [];
          for (var i = 0; i < this.packagedataList.length; i++) {
            let proId = this.packagedataList[i].proId;
            this.checkedListkey1.push(proId);
            // this.DataLists.push(this.packagedataList[i]);
            getProSonDxList(proId).then((res) => {
              this.TreedataList = res.data.list;
              console.log(this.TreedataList,888);
              this.TreedataList.forEach((item) => {
                // this.checkedListkey1.push(item.proId);
                this.DataLists.push(item);
                // console.log(this.DataLists,556644);
                if (this.DataLists.length >= 1) {
                  this.marryalls = 0;
                  this.DataLists.forEach((item1) => {
                    this.marryalls += item1.proPrice;
                    this.packagedataList.forEach((item3) => {
                      if (item1.proParentId == item3.proId) {
                        item1.propinName = item3.proName;
@@ -3031,25 +2993,12 @@
          }
        });
      } else if (checked.checkedNodes.length == 0) {
        // for (var i = 0; i < data.tjProjectList.length; i++) {
        //   let proId = data.tjProjectList[i].proId;
        //   getProSonDxList(proId).then((res) => {
        //     this.TreedataList = res.data.list;
        //     this.TreedataList.forEach((item) => {
        //       this.DataLists.forEach((item1, index) => {
        //         if (item.proId == item1.proId) {
        //           this.DataLists.splice(index, 1);
        //         }
        //       });
        //     });
        //     this.marryalls = 0
        //     if(this.DataLists.length != 0){
        //       this.DataLists.forEach((item1, index) => {
        //       this.marryalls += item1.proPrice;
        //       })
        //     }
        //   });
        // }
        this.DataLists = [];
        this.marryalls = 0; // 清零总价
        this.checkedListkey1 = [];
        // 你可以在此处根据需要进行其他操作,如更新 UI
        console.log("取消选中,数据已清空,总价已重置");
      }
    },
    objectspanmethod({ row, column, rowIndex, columnIndex }) {
@@ -3082,17 +3031,43 @@
      //   return [rowspan, 1];
      // }
    },
    handlePackageChecked(data, checked, checkedNodes) {
      if (checked == false) {
        this.DataLists.forEach((item, index) => {
          if (item.proId == data.proId) {
            this.DataLists.splice(index, 1);
            this.marryalls = 0; // 重置合计金额
            this.DataLists.forEach((item1) => {
              this.marryalls += item1.proPrice; // 重新计算合计金额
            });
          }
        });
      } else if (checked == true) {
        this.DataLists.push(data); // 添加数据到已选列表
        this.DataLists.forEach((item1) => {
          if (item1.proParentId == this.dataObj.proId) {
            item1.propinName = this.dataObj.proName; // 设置父级名称
          }
        });
        // this.spliceData();
        this.marryalls = 0; // 重置合计金额
        this.DataLists.forEach((item1) => {
          this.marryalls += item1.proPrice; // 重新计算合计金额
        });
      }
    },
    // 点击获取每个树节点
    handleCurrentChecked(data, checked, checkedNodes) {
      this.dataObj = data;
      if (checked.checkedNodes.length != 0) {
        this.$refs.tree.setCheckedKeys([data.proId]);
        let proId = data.proId;
        getProSonDxList(proId).then((res) => {
          this.TreedataList = res.data.list;
          this.TreedataList.forEach((item) => {
            this.checkedListkey.push(item.proId);
            this.DataList.push(item);
            this.spliceData();
            this.DataList.forEach((item1) => {
vue.config.js
@@ -53,8 +53,8 @@
      // detail: https://cli.vuejs.org/config/#devserver-proxy
      [process.env.VUE_APP_BASE_API]: {
        // target: `https://ltpeis.xaltjdkj.cn:5801/`,
        // target: `http://192.168.1.3:5011`,
        target: `http://192.168.1.113:5011`,
        target: `http://192.168.1.3:5011`,
        // target: `http://192.168.1.113:5011`,
        // // target: `http://192.168.0.99:8080/ltkj-admin`,
        // target: `https://ltpeis.xaltjdkj.cn:5011/ltkj-admin`,
        // target: `http://10.168.0.9:5011`,