4b6eabfb56d2b736c5f16796614318770c606fd6..201e38e8f961269c3961e0709563338536196242
2025-07-28 qx
Merge branch 'master' of http://101.42.27.146:5001/r/ltkj_peisweb
201e38 对比 | 目录
2025-07-28 wwl
全选问题,动态url
582166 对比 | 目录
2025-07-28 qx
Merge branch 'master' of http://101.42.27.146:5001/r/ltkj_peisweb
93f544 对比 | 目录
2025-07-28 qx
qx
5e6bca 对比 | 目录
2025-07-28 lkk
1
483f16 对比 | 目录
2025-07-25 lkk
1
18f35f 对比 | 目录
2025-07-25 wwl
1
05c1bc 对比 | 目录
7个文件已修改
482 ■■■■■ 已修改文件
src/main.js 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/websocket.js 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/doctor/checkAll/index.vue 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/doctor/inspectCheck/index.vue 221 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/hosp/order/index.vue 174 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/user/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
vue.config.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main.js
@@ -17,7 +17,7 @@
import "./assets/icons";
import "./permission";
import { getDicts } from "@/api/system/dict/data";
import { getConfigKey } from "@/api/system/config";
import { getConfigKey,yidu } from "@/api/system/config";
import {
  parseTime,
  resetForm,
@@ -36,7 +36,7 @@
import DictData from "@/components/DictData";
import * as echarts from "echarts";
import VueBarcode from "vue-barcode";
// import { initWebSocket, closeWebSocket } from "@/utils/websocket";
import { initWebSocket, closeWebSocket } from "@/utils/websocket";
import RightToolbar from "@/components/RightToolbar"
// 注册全局组件
@@ -63,7 +63,7 @@
Vue.prototype.$echarts = echarts;
// 通知管理:跟踪当前通知和偏移量
/* const notificationManager = {
const notificationManager = {
  notifications: [], // 存储当前显示的通知实例
  baseOffset: 50, // 基础偏移量
  notificationHeight: 80, // 每个通知的估计高度(包括间距)
@@ -94,10 +94,10 @@
      notification.customClass = notification.customClass.replace(/notification-\d+/, `notification-${index + 1}`);
    });
  }
}; */
};
// 全局通知方法,添加“已读”按钮
/* Vue.prototype.$showNotification = function (type, title, message, onClick, noticeId) {
 Vue.prototype.$showNotification = function (type, title, message, onClick, noticeId) {
  console.log('触发通知:', { type, title, message, noticeId, noticeIdType: typeof noticeId }); // 调试:记录 noticeId 和类型
  const h = this.$createElement;
  const notification = this.$notify({
@@ -134,7 +134,8 @@
    appendTo: document.body
  });
  notificationManager.addNotification(notification); // 添加到通知管理
}; */
};
// 监听路由变化
router.afterEach(() => {
@@ -142,14 +143,14 @@
});
// 定义 WebSocket 初始化标志,防止重复连接
// let isWebSocketInitialized = false;
let isWebSocketInitialized = false;
const app = new Vue({
  el: "#app",
  router,
  store,
  render: (h) => h(App),
  /* mounted() {
 mounted() {
    const token = store.state.user.token || Cookies.get('token') || '';
    if (token && !isWebSocketInitialized) {
      console.log('初始化 WebSocket,Token:', token);
@@ -207,7 +208,7 @@
      isWebSocketInitialized = false;
      console.log('Vue 实例销毁,WebSocket 已清理');
    }
  } */
  }
});
// 注册插件
src/utils/websocket.js
@@ -24,7 +24,15 @@
    closeWebSocket();
  }
  const wsUrl = `ws://192.168.1.244:5011/ws?token=${token}`;
// 取当前页面的协议(http/https),主机(域名 + 端口)
const loc = window.location;
const protocol = loc.protocol === 'https:' ? 'wss:' : 'ws:'; // 安全协议自动切换
const host = loc.host; // 域名 + 端口,比如 localhost:8080
// 拼接 WebSocket 地址
const wsUrl = `${protocol}//${host}/ws?token=${token}`;
console.log(wsUrl,"wsUrl");
  ws = new WebSocket(wsUrl);
  ws.onopen = () => {
src/views/doctor/checkAll/index.vue
@@ -733,7 +733,7 @@
                    placeholder="请输入内容"
                    v-model="textarea1"
                    :autosize="{ minRows: minRows, maxRows: maxRows }"
                    style="font-size: 16px;"
                    style="font-size: 16px"
                  ></el-input>
                </el-form-item>
              </el-form>
@@ -779,6 +779,7 @@
                      style="width: 100%"
                      :header-cell-style="{ background: '#67C23A' }"
                      :row-key="getRowKeys"
                      :expand-row-keys="expends"
                    >
                      <!--  :expand-row-keys="expends" -->
                      <el-table-column type="expand">
@@ -2009,7 +2010,6 @@
      flags: false,
      jianqianwenzhendata: [],
      jianqians: false,
      adviceLoading: false,
      sex: true,
      activeName: "1",
      hosproy: true,
@@ -2066,7 +2066,7 @@
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
              picker.$emit("pick", [start, end]);
              picker.$adviceLoading("pick", [start, end]);
            },
          },
          {
@@ -2151,6 +2151,8 @@
      status1: 0,
      viewportHeight: 0,
      expends: [],
      expandRowKeys: [],
      shouldExpand: false,
    };
  },
@@ -2581,6 +2583,15 @@
    yichangjieguo() {
      this.loading = true;
      this.status1 = 0;
      getConfigKey("kzycxmsfzk").then((res) => {
        this.shouldExpand = res.msg;
        // 只有Y/y才展开,其它(包括空、N、null、undefined)都不展开
        if (this.shouldExpand === "Y") {
          this.getExpends();
        } else {
          this.expends = [];
        }
      });
      yichang({
        tjNum: this.tjNumber,
      })
@@ -2599,6 +2610,12 @@
          if (!this.yichangList) {
            this.$message.warning("暂无异常报告");
          }
          // 这里也可以根据shouldExpand再调用一次getExpends,确保数据已加载
          if (this.shouldExpand === "Y" || this.shouldExpand === "y") {
            this.getExpends();
          } else {
            this.expends = [];
          }
        })
        .catch((error) => {
          this.isLoading = false;
@@ -2610,6 +2627,7 @@
          this.loading = false;
        });
    },
    fuchaxiangmu() {
      this.loading = true;
@@ -2937,7 +2955,7 @@
    propoChange() {
      this.cusobj = { sex: this.tableAll.cusSex, isZj: 0 };
       this.$refs.proposal.clearSearchFields()
      this.$refs.proposal.clearSearchFields();
      getConfigKey("mrzscyjy").then((res) => {
        this.mrjy = res.msg; // 会触发 watch → 设置 tjproposal = "1"
        // 等数据状态准备好后再打开弹窗
@@ -3134,18 +3152,18 @@
      this.qingkong();
      this.$refs.Pre.open = false;
      this.tableAll = row;
      let dict = "dict_tjtype"
      getDicts(dict).then(res => {
         if (res.code == 200) {
            res.data.forEach((item) => {
              if (this.tableAll.tjCategory == item.dictValue) {
                this.tableAll.tjCategory = item.dictLabel;
              }
            });
          } else {
            throw new Error('获取体检类型字典失败');
          }
      })
      let dict = "dict_tjtype";
      getDicts(dict).then((res) => {
        if (res.code == 200) {
          res.data.forEach((item) => {
            if (this.tableAll.tjCategory == item.dictValue) {
              this.tableAll.tjCategory = item.dictLabel;
            }
          });
        } else {
          throw new Error("获取体检类型字典失败");
        }
      });
      this.tjproject = "0";
      this.tjNumber = this.tableAll.tjNumber;
@@ -3349,7 +3367,7 @@
              id: this.MsgId,
            };
             /* gettoPdf(tjNumber)
            /* gettoPdf(tjNumber)
              .then((res) => {
                this.$modal.msgSuccess("已生成报告!请前往报告核收页面确认!");
              })
src/views/doctor/inspectCheck/index.vue
@@ -1,48 +1,18 @@
<template>
  <div class="app-container">
    <el-form
      :model="queryParams"
      ref="queryForm"
      size="small"
      :inline="true"
      label-width="68px"
      @submit.native.prevent
    >
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px" @submit.native.prevent>
      <el-form-item label="体检号" prop="reportDoctorCode">
        <el-input
          ref="inputName"
          v-model="queryParams.tjNum"
          placeholder="请输入体检号"
          clearable
          @keyup.enter.native="handleQuery"
          style="width: 170px"
        />
        <el-input ref="inputName" v-model="queryParams.tjNum" placeholder="请输入体检号" clearable
          @keyup.enter.native="handleQuery" style="width: 170px" />
      </el-form-item>
      <el-form-item>
        <el-button
          type="primary"
          icon="el-icon-search"
          size="mini"
          @click="handleQuery"
          style="margin-right: 15px"
        >
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery" style="margin-right: 15px">
          查询
        </el-button>
        <el-button
          icon="el-icon-refresh"
          type="primary"
          size="mini"
          @click="resetQuery"
        >
        <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"
        >
        <el-button icon="el-icon-check" type="primary" size="mini" style="margin-right: 15px" @click="tongbu">
          同步
        </el-button>
      </el-form-item>
@@ -51,27 +21,15 @@
    <div class="box">
      <div class="table-header">检验记录</div>
      <div>
        <el-table
          :data="exaLists"
          border
          style="width: 100%"
          @selection-change="handleSelectionChange"
          :header-cell-style="{ background: '#aad8df', fontSize: '14px', color: '#333' }"
          height="350"
          ref="firstTable"
        >
        <el-table :data="exaLists" border style="width: 100%" @selection-change="handleSelectionChange"
          @select-all="handleSelectAll" :header-cell-style="{ background: '#aad8df', fontSize: '14px', color: '#333' }"
          height="350" ref="firstTable">
          <el-table-column fixed type="selection" align="center" label="选择" width="50" />
          <el-table-column label="姓名" align="center" prop="name" width="80" />
          <el-table-column label="性别" align="center" prop="gender" width="80" />
          <el-table-column label="年龄" align="center" prop="patientAge" width="80" />
          <el-table-column label="送检科室" align="center" prop="deptName" width="100" />
          <el-table-column
            label="检验项目"
            align="center"
            prop="checkParts"
            width="350"
            :show-overflow-tooltip="true"
          />
          <el-table-column label="检验项目" align="center" prop="checkParts" width="350" :show-overflow-tooltip="true" />
          <el-table-column label="项目编号" align="center" prop="jcxmid" width="150" />
          <el-table-column label="审核医师" align="center" prop="shys" width="150" />
          <el-table-column label="报告时间" align="center" prop="examinationDate" width="150" />
@@ -102,8 +60,8 @@
            infoList.tjCustomerSex == 0
              ? "男"
              : infoList.tjCustomerSex == 1
              ? "女"
              : "暂无"
                ? "女"
                : "暂无"
          }}
        </span>
        <span class="highlight">年龄:{{ infoList.tjCustomerAge || "暂无" }}</span>
@@ -111,24 +69,11 @@
      </h3>
    </div>
    <el-table
      border
      height="350"
      ref="tab1"
      :data="checkList"
      v-loading="loading"
      style="width: 100%"
    <el-table border height="350" ref="tab1" :data="checkList" v-loading="loading" style="width: 100%"
      @selection-change="handleSelectionChangeSecond"
      :header-cell-style="{ background: '#aad8df', fontSize: '14px', color: '#333' }"
    >
      :header-cell-style="{ background: '#aad8df', fontSize: '14px', color: '#333' }">
      <el-table-column type="selection" width="60" />
      <el-table-column
        label="状态"
        align="center"
        prop="type"
        :show-overflow-tooltip="true"
        min-width="60"
      >
      <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>
@@ -145,7 +90,6 @@
    </el-table>
  </div>
</template>
<script>
import { getlisList, getJyTjList, asyncPacs } from "@/api/doctor/pacsCheck";
import { getOrderList } from "@/api/hosp/order";
@@ -201,57 +145,59 @@
      this.exaLists = [];
      this.checkList = [];
      this.infoList = {};
      this.selectedFirstTable = [];
      this.selectedSecondTable = [];
    },
handleSelectionChange(selected) {
  if (this.isProcessingSelection) return;
  this.isProcessingSelection = true;
  // 找到用户刚操作的那一条(对比之前和现在的差异)
  const old = this.selectedFirstTable;
  let changedRow = null;
    // ✅ 分组多选稳固版
    handleSelectionChange(selection) {
      if (this.isProcessingSelection) return;
      this.isProcessingSelection = true;
  if (selected.length > old.length) {
    // 新增:找出新增的
    changedRow = selected.find(row => !old.includes(row));
  } else {
    // 删除:找出删除的
    changedRow = old.find(row => !selected.includes(row));
  }
  if (changedRow) {
    const group = this.exaLists.filter(r => r.brid === changedRow.brid);
    const isAdding = selected.length > old.length;
    this.$refs.firstTable.clearSelection();
    if (isAdding) {
      // 添加,整个组选上 + 原有选的 brid 也选上
      // 计算所有被选中的分组 brid
      const allBrids = new Set();
      selected.forEach(row => allBrids.add(row.brid));
      allBrids.add(changedRow.brid);
      const newSelection = this.exaLists.filter(row => allBrids.has(row.brid));
      newSelection.forEach(row => {
        this.$refs.firstTable.toggleRowSelection(row, true);
      selection.forEach(row => allBrids.add(row.brid));
      // 清空后重选
      this.$refs.firstTable.clearSelection();
      this.$nextTick(() => {
        const newSelection = this.exaLists.filter(row => allBrids.has(row.brid));
        newSelection.forEach(row => {
          this.$refs.firstTable.toggleRowSelection(row, true);
        });
        this.selectedFirstTable = newSelection;
        this.isProcessingSelection = false;
        this.fetchRightTableData();
      });
      this.selectedFirstTable = newSelection;
    } else {
      // 删除,整个组取消,再把剩下 brid 分组补回去
      const remaining = old.filter(row => row.brid !== changedRow.brid);
      const remainBrids = [...new Set(remaining.map(r => r.brid))];
      const newSelection = this.exaLists.filter(row => remainBrids.includes(row.brid));
      newSelection.forEach(row => {
        this.$refs.firstTable.toggleRowSelection(row, true);
      });
      this.selectedFirstTable = newSelection;
    }
  } else {
    this.selectedFirstTable = selected;
  }
    },
  this.fetchRightTableData();
  this.isProcessingSelection = false;
},
    handleSelectAll(selection) {
      if (this.isProcessingSelection) return;
      this.isProcessingSelection = true;
      if (selection.length === 0) {
        // 取消全选
        this.$refs.firstTable.clearSelection();
        this.selectedFirstTable = [];
        this.isProcessingSelection = false;
        this.fetchRightTableData();
      } else {
        // 全选所有分组
        const allBrids = new Set(this.exaLists.map(row => row.brid));
        this.$refs.firstTable.clearSelection();
        this.$nextTick(() => {
          const newSelection = this.exaLists.filter(row => allBrids.has(row.brid));
          newSelection.forEach(row => {
            this.$refs.firstTable.toggleRowSelection(row, true);
          });
          this.selectedFirstTable = newSelection;
          this.isProcessingSelection = false;
          this.fetchRightTableData();
        });
      }
    },
    // 第二个表格只允许单选
    handleSelectionChangeSecond(selected) {
      this.selectedSecondTable = selected.slice(0, 1);
    },
@@ -269,28 +215,53 @@
    },
    tongbu() {
      this.$modal.loading("正在同步,请稍候...");
      const requestData = {
        lis: this.selectedFirstTable,
        lis: this.selectedFirstTable
          ? this.selectedFirstTable.map(item => ({
              ...item,
              tjNum: this.queryParams.tjNum,
            }))
          : [],
        jcxmid:
          this.selectedFirstTable && this.selectedFirstTable.length > 0
            ? this.selectedFirstTable[0].jcxmid
            : null,
        shys:
          this.selectedFirstTable && this.selectedFirstTable.length > 0
            ? this.selectedFirstTable[0].shys
            : null,
        tj: this.selectedSecondTable[0],
      };
      asyncPacs(requestData).then(res => {
        if (res.code === 200) {
          this.$message.success("同步成功!");
          this.fetchRightTableData();
        } else {
          this.$message.error(res.message || "同步失败");
        }
      });
      asyncPacs(requestData)
        .then(res => {
          if (res.code === 200) {
            this.fetchRightTableData();
            clearInterval(this.clearTimeSet);
            this.clearTimeSet = null;
            this.$modal.closeLoading();
            this.$modal.msgSuccess("同步成功!");
          } else {
            this.$message.error(res.message || "同步失败,请稍后重试");
          }
        })
        .catch(() => {
          clearInterval(this.clearTimeSet);
          this.clearTimeSet = null;
          this.$modal.closeLoading();
        });
    },
  },
};
</script>
<style lang="scss" scoped>
.app-container {
  padding: 20px;
  background: #f5f7fa;
}
.table-header {
  text-align: center;
  background-color: #aad8df;
@@ -301,11 +272,13 @@
  margin-top: 10px;
  border-radius: 4px 4px 0 0;
}
.table-title {
  text-align: left;
  margin: 20px 0;
  padding: 10px 0;
}
.table-title h3 {
  font-size: 16px;
  color: #333;
@@ -316,10 +289,12 @@
  flex-wrap: wrap;
  gap: 20px;
}
.table-title .highlight {
  font-weight: bold;
  color: #2c3e50;
}
.el-table {
  border-radius: 4px;
  font-size: 14px;
src/views/hosp/order/index.vue
@@ -589,19 +589,33 @@
            </el-tabs>
          </div>
          <div class="grid-content bg-purple">
            <div style="text-align: center; margin-bottom: 10px; margin-top: 9px">
              已选项目列表
            </div>
            <el-table :data="DataList3" border style="width: 100%; table-layout: fixed" height="560"
              :span-method="objectspanmethod">
              <el-table-column prop="propinName" label="检查项目" width="200px" :show-overflow-tooltip="true">
              <el-table-column prop="propinName" label="检查项目" width="160px" :show-overflow-tooltip="true">
              </el-table-column>
              <el-table-column prop="proName" label="明细项目" width="200px" :show-overflow-tooltip="true">
              <el-table-column prop="proName" label="明细项目" width="160px" :show-overflow-tooltip="true">
              </el-table-column>
              <el-table-column prop="sl" label="数量" width="56px">
              </el-table-column>
              <el-table-column prop="proPrice" label="原价" width="56px">
              </el-table-column>
              <el-table-column label="折扣" width="150px">
                <template slot-scope="scope">
                  <!-- @input="validateDiscount(scope.row)" -->
                  <el-input-number v-model.number="scope.row.discount" @change="handleManualChange(scope.row)"
                    placeholder="输入折扣" size="small" type="number" :precision="1" :step="0.1" :max="10" :min="0">
                  </el-input-number>
                </template>
              </el-table-column>
              <el-table-column prop="nowPrice" label="现价">
                <template slot-scope="scope">
                  {{ scope.row.nowPrice ? scope.row.nowPrice.toFixed(2) : scope.row.nowPrice }}
                </template>
              </el-table-column>
              <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="50px">
@@ -629,14 +643,24 @@
            <el-input placeholder="原价" :value="TotalPrice1" disabled style="width: 90px"></el-input>
          </el-form-item>
          <!-- 折扣设定 -->
          <el-form-item label="折扣" style="display: flex">
         <!-- 折扣设定 -->
          <!-- <el-form-item label="折扣" style="display: flex">
            <el-input style="width: 90px" type="number" v-model="discount" :value="discount"></el-input>
          </el-form-item> -->
          <el-form-item label="折扣">
            <!-- {{ discount }} -->
            <el-input-number ref="inputNumber" style="width: 150px" v-model="discount" :precision="1" :step="0.1"
              :max="10" :min="0" @change="debounceNumberChange"></el-input-number>
          </el-form-item>
          <!-- 应付金额 -->
          <el-form-item label="应付" style="display: flex">
          <!-- <el-form-item label="应付" style="display: flex">
            <el-input placeholder="应付金额" :value="TotalPrice1 * (discount / 10)" style="width: 90px"></el-input>
          </el-form-item> -->
          <el-form-item label="应付">
            <el-input placeholder="应付金额" v-model="TotalPrice" style="width: 206px" @input="changeXianjia"
              @blur="numberChangeXianPrice(discount, discount)" />
          </el-form-item>
          <!-- 付款类型 -->
@@ -1008,6 +1032,7 @@
      TotalPrice1: 0,
      TotalPrice6: 0,
      TotalPrice7: 0,
      TotalPrice: 0,
      numberList: [],
      dialogVisible: false,
      CheckBox: {},
@@ -2229,7 +2254,119 @@
        }
      }
    },
    handleDel(row) {
     handleManualChange(row) {
      this.updateProPrice(row);
    },
    updateProPrice(row) {
      if (row.proPrice == 0) {
        row.discount = 10
        return
      } else {
        const ordPrice = new Big(row.proPrice);
        const discount = new Big(row.discount);
        const result = ordPrice.times(discount.div(10)); // ordPrice * (discount / 10)
        row.nowPrice = result.toNumber();
        this.TotalPrice = this.DataList3.reduce((sum, item) => {
          return sum.plus(new Big(item.nowPrice || "0"));
        }, new Big(0));
        this.discount =
          (Math.floor((this.TotalPrice / this.TotalPrice1) * 100) / 100) * 10;
      }
    },
       debounceNumberChange(currentValue, oldValue) {
      clearTimeout(this.debounceTimer);
      this.debounceTimer = setTimeout(() => {
        this.numberChange(currentValue, oldValue);
      }, 300);
    },
     // 折扣
    numberChange(currentValue, oldValue) {
      this.$confirm("确定修改所有子项的折扣吗?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          this.discount = currentValue;
          this.DataList3.forEach((item) => {
            item.discount = this.discount;
            const ordPrice = new Big(item.proPrice.toString());
            const discount = new Big(item.discount.toString());
            const result = ordPrice.times(discount.div(10));
            item.nowPrice = result.toNumber();
            // this.TotalPrice = this.DataList3.reduce((sum, item) => {
            //   return sum.plus(new Big(item.nowPrice || "0"));
            // }, new Big(0));
            this.TotalPrice = new Big(this.TotalPrice1 * (this.discount / 10)).toFixed(2)
          });
        })
        .catch(() => {
          this.discount = oldValue;
        });
    },
    changeXianjia() {
      // 原始折扣率计算
      if (this.TotalPrice1 !== 0) {
        this.discount =
          (Math.floor((this.TotalPrice / this.TotalPrice1) * 100) / 100) * 10;
      }
    },
    numberChangeXianPrice(currentValue, oldValue) {
      // 如果现价没有变化,直接返回
      if (this.TotalPrice === this.lastXianPrice || !this.TotalPrice) {
        console.log(2222333)
        return;
      }
      this.$confirm("确定修改所有子项的折扣吗?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          this.discount = currentValue;
          // if (this.discount < this.getInfodis) {
          //   this.discount = this.getInfodis;
          // }
          let totalYsprice = new Big(0);
          console.log(this.DataList3, 11111)
          this.DataList3.forEach((item) => {
            item.discount = this.discount;
            const ordPrice = new Big(item.proPrice);
            const discount = new Big(item.discount);
            const result = ordPrice.times(discount.div(10));
            item.nowPrice = result.toNumber();
            totalYsprice = totalYsprice.plus(new Big(item.nowPrice));
          });
          if (!totalYsprice.eq(this.TotalPrice)) {
            const diff = new Big(this.TotalPrice).minus(totalYsprice);
            if (this.tableData1.length > 0) {
              const lastItem = this.tableData3[this.tableData3.length - 1];
              const newYsPrice = new Big(lastItem.nowPrice)
                .plus(diff)
                .toNumber();
              // console.log(
              //   "hhh",
              //   this.tableData1[this.tableData1.length - 1].nowPrice,
              //   newYsPrice
              // );
              this.$set(
                this.tableData3[this.tableData3.length - 1],
                "nowPrice",
                newYsPrice
              );
            }
          }
          this.lastXianPrice = this.TotalPrice;
        })
        .catch(() => {
          this.discount = oldValue;
        });
    },
     handleDel(row) {
      this.Datalists.forEach((item, index) => {
        if (item.proId == row.proId) {
          this.Datalists.splice(index, 1);
@@ -2239,8 +2376,18 @@
          });
        }
      });
      this.DataList3.forEach((item, index) => {
        if (item.proId == row.proId) {
          let proParentId = item.proParentId
          // 获取当前选中的节点key
          const currentCheckedKeys = this.$refs.tree.getCheckedKeys();
          // 创建一个新数组,移除想要取消选中的节点key(这里假设是1)
          const newCheckedKeys = currentCheckedKeys.filter(key => key !== proParentId);
          // 使用setCheckedKeys方法更新选中状态
          this.$refs.tree.setCheckedKeys(newCheckedKeys);
          this.DataList3.splice(index, 1);
          this.marryalls = 0;
          this.DataList3.forEach((item1) => {
@@ -2248,21 +2395,36 @@
          });
        }
      });
      if (this.DataList3.length == 0) {
        this.discount = 10
        this.checkedkey = []
        this.$refs.tree.setCheckedKeys([])
        this.TotalPrice1 = this.marryalls;
        this.TotalPrice = new Big(this.TotalPrice1 * (this.discount / 10))
      } else if (this.DataList3.length == 1) {
        this.discount = this.DataList3[0].discount
        this.TotalPrice = new Big(this.TotalPrice1 * (this.discount / 10)).toFixed(2)
      }
      this.DataList.forEach((item, index) => {
        if (item.proId == row.proId) {
          this.DataList.splice(index, 1);
          this.TotalPrice1 = 0;
          this.TotalPrice = 0;
          this.DataList.forEach((item1) => {
            this.TotalPrice1 = item1.proPrice + this.TotalPrice1;
            this.TotalPrice = new Big(this.TotalPrice1 * (this.discount / 10))
          });
          if (this.marryalls != 0) {
            this.TotalPrice1 += this.marryalls;
            this.TotalPrice = new Big(this.TotalPrice1 * (this.discount / 10))
          }
        }
      });
      this.TotalPrice1 = 0;
      this.TotalPrice = 0;
      this.DataList3.forEach((item) => {
        this.TotalPrice1 += item.proPrice;
        this.TotalPrice = new Big(this.TotalPrice1 * (this.discount / 10))
      });
    },
    /** 删除按钮操作 */
src/views/system/user/index.vue
@@ -1878,6 +1878,10 @@
      this.getlistHosp();
      this.reset();
      this.form = row;
      this.form = {
        ...row,
        deptId: row.deptId != null ? String(row.deptId) : null, // 👈 确保为字符串
      };
      if (this.form.hospId) {
        this.sendhospName();
      }
vue.config.js
@@ -54,7 +54,7 @@
      [process.env.VUE_APP_BASE_API]: {
        // target: `https://ltpeis.xaltjdkj.cn:5801/`,
        // target: `http://192.168.1.99:5012`,
        target: `http://192.168.1.113:5011`,
        target: `http://192.168.1.244:5011`,
        // target: `http://192.168.1.244:5011`,
        // // target: `http://192.168.0.99:8080/ltkj-admin`,
        // target: `https://ltpeis.xaltjdkj.cn:5011/ltkj-admin`,