11
lkk
2025-05-14 17ba250da6998622130df092e687b03ba144cf66
src/views/doctor/checkAll/index.vue
@@ -226,8 +226,9 @@
                </table>
              </div>
            </div>
            <div class="section-title">职业病总检</div>
            <el-form ref="numberValidateForm" label-width="80px" class="demo-ruleForm">
            <div v-if="tableAll && tableAll.tjCategory === '02'" class="section-title">职业病总检</div>
            <el-form v-if="tableAll && tableAll.tjCategory === '02'" ref="numberValidateForm" label-width="80px"
              class="demo-ruleForm">
              <el-form-item label="检查结论">
                <el-input type="textarea" placeholder="请输入内容" v-model="textarea1" :rows="3"
                  style="width: 96%"></el-input>
@@ -235,7 +236,6 @@
              <el-form-item label="体检结果">
                <el-input type="textarea" placeholder="请输入内容" v-model="res" :rows="3" style="width: 96%"></el-input>
              </el-form-item>
            </el-form>
            <div style="margin: 0 0px 10px 15px" v-if="tjproject != '1'">
              <el-button type="primary" @click="propoChange">快捷建议</el-button>
@@ -400,7 +400,7 @@
                    项目选择
                  </span>
                  <div v-if="xmChange.length > 0" style="display: flex;">
                    <div style="margin:0 40px;font-size: 0.8vw;">项目名称:{{ xmChange[0].pro_name || "" }}</div>
                    <div style="margin:0 40px;font-size: 0.8vw;">项目名称:{{ xmChange[0].proName || "" }}</div>
                    <div style="margin:0 40px ;font-size: 0.8vw;">价格:{{ xmChange[0].price || "" }}</div>
                  </div>
                  <div v-else style="display: flex;">
@@ -412,20 +412,19 @@
                <el-table :row-style="redxiangmu" :data="fcList" style="width: 100%">
                  <el-table-column type="selection" width="40" align="center" />
                  <el-table-column label="序号" align="center" prop="index" />
                  <el-table-column label="名称" align="center" prop="pro_name" width="100px" />
                  <el-table-column label="序号" align="center" prop="newID" />
                  <el-table-column label="名称" align="center" prop="proName" width="100px" />
                  <el-table-column label="价格" align="center" prop="price" />
                  <el-table-column label="科室" align="center" prop="dept_name" />
                  <el-table-column label="科室" align="center" prop="deptName" />
                  <el-table-column label="操作" align="center" width="130px">
                    <template slot-scope="scope">
                      <el-button type="primary" icon="el-icon-share" size="mini" @click="handledeleteClick(scope.row)"
                        title="删除"></el-button>
                      <el-button type="primary" size="mini" @click="handledeleteClick(scope.row)">删除</el-button>
                    </template>
                  </el-table-column>
                </el-table>
              </div>
            </template>
            <template v-if="wenzhen">
            <template v-if="status1 == 3">
              <div class="hist3">
                <span class="txt">问诊信息</span>
                <el-form ref="form" :model="formobj" label-width="100px" :inline="true" size="mini">
@@ -725,9 +724,9 @@
        <el-table :data="datasList" ref="elTable" v-loading="loading" @selection-change="handlexmChange" border
          height="320px">
          <el-table-column type="selection" width="40" align="center" />
          <el-table-column label="名称" align="center" prop="pro_name" width="100px" />
          <el-table-column label="名称" align="center" prop="proName" width="100px" />
          <el-table-column label="价格" align="center" prop="price" />
          <el-table-column label="科室" align="center" prop="dept_name" />
          <el-table-column label="科室" align="center" prop="deptName" />
        </el-table>
      </div>
@@ -848,7 +847,6 @@
      jianqians: false,
      sex: true,
      activeName: "1",
      wenzhen: false,
      hosproy: true,
      remarks: "",
      remark: "",
@@ -965,6 +963,7 @@
  },
  created() {
    console.log(this.dict.type.dict_tjtype, "职业体检"); // 打印字典数据
    this.getConfigKey();
    this.getdate();
  },
@@ -1273,21 +1272,32 @@
    handleaddClick() {
      console.log(this.xmChange)
      let data = {
        orderId: this.xmChange[0].order_id,
        orderId: this.xmChange[0].orderId,
        data: [{
          proId: this.xmChange[0].pro_id,
          proId: this.xmChange[0].proId,
          type: 1
        }]
      }
      UpdFcPro(data).then(res => {
        if (res.code == 200) {
          this.xmChange = []
          this.fuchaxiangmu()
        }
      })
    },
    handledeleteClick() {
    handledeleteClick(row) {
      let data = {
        orderId: row.orderId,
        data: [{
          proId: row.proId,
          type: 0
        }]
      }
      UpdFcPro(data).then(res => {
        if (res.code == 200) {
          this.fuchaxiangmu()
        }
      })
    },
@@ -1327,17 +1337,23 @@
    getRowKeys(row) {
      return row.orderDetailId;
    },
    xiangmuqingkuang() {
      cSWebGetPro(this.tjNumber).then((res) => {
        this.status1 = 1;
        this.wenzhen = false
        this.statusList = res.data;
        if (this.statusList.length == 0) {
          this.$message.msgSuccess("暂无项目情况");
        }
      });
      this.loading = true;
      cSWebGetPro(this.tjNumber)
        .then((res) => {
          this.status1 = 1;
          this.statusList = res.data;
          if (this.statusList.length == 0) {
            this.$message.success("暂无项目情况");
          }
        })
        .catch((error) => {
          console.error('获取项目情况失败:', error);
          this.$message.error('获取项目情况失败');
        })
        .finally(() => {
          this.loading = false;
        });
    },
    guanbi() {
@@ -1345,40 +1361,54 @@
    },
    yichangjieguo() {
      this.loading = true;
      this.status1 = 0;
      let _this = this;
      yichang({
        tjNum: this.tjNumber,
      }).then((res) => {
        this.yichangList = res.data;
        this.yichangList.forEach((item) => {
          item.sone.forEach((soneItem) => {
            if (!Array.isArray(soneItem.advices) || soneItem.advices.length === 0) {
              soneItem.advices = [{ bt: "", nr: "" }];
            }
      })
        .then((res) => {
          this.yichangList = res.data;
          this.yichangList.forEach((item) => {
            item.sone.forEach((soneItem) => {
              if (!Array.isArray(soneItem.advices) || soneItem.advices.length === 0) {
                soneItem.advices = [{ bt: "", nr: "" }];
              }
            });
          });
          if (!this.yichangList) {
            this.$message.warning("暂无异常报告");
          }
        })
        .catch((error) => {
          console.error('获取异常结果失败:', error);
          this.$message.error('获取异常结果失败');
        })
        .finally(() => {
          this.loading = false;
        });
        if (!this.yichangList) {
          _this.$message({
            type: "warning",
            message: "暂无异常报告",
          });
        }
      });
    },
    fuchaxiangmu() {
      this.loading = true;
      this.status1 = 2;
      this.wenzhen = false
      let data = {
        tjNum: this.tjNumber,
        type: 1
      }
      getFcList(data).then(res => {
        this.fcList = res.data
      })
      };
      getFcList(data)
        .then((res) => {
          this.fcList = res.data;
          this.fcList.forEach((item,index) => {
            item.newID = index + 1;
          })
        })
        .catch((error) => {
          console.error('获取复查项目失败:', error);
          this.$message.error('获取复查项目失败');
        })
        .finally(() => {
          this.loading = false;
        });
    },
    getdate() {
@@ -1495,82 +1525,110 @@
    },
    Graphicreport() {
      this.loading = true;
      let dictType = "dict_ageunit";
      getDicts(dictType).then((res) => {
        if (res.code == 200) {
          res.data.forEach((item) => {
            if (this.tableAll.age_unit == item.dictValue) {
              this.tableAll.age_unit = item.dictLabel;
            }
          });
          let dictTypes = "sys_user_sex";
          getDicts(dictTypes).then((res) => {
            if (res.code == 200) {
              res.data.forEach((item) => {
                if (this.tableAll.cusSex == item.dictValue) {
                  this.tableAll.cusSex = item.dictLabel;
                }
              });
              let data = {
                patname: this.tableAll.cusName,
                sex: this.tableAll.cusSex,
                patage: this.tableAll.age,
                patagename: this.tableAll.age_unit,
                patbirth: this.tableAll.cusBrithday,
              };
              getTjYxjcList(data).then((res) => {
                this.baogao = res.data;
              });
              this.$refs.bbb.open = true;
              this.$refs.bbb.title = "报告字典";
            }
          });
        }
      });
      getDicts(dictType)
        .then((res) => {
          if (res.code == 200) {
            res.data.forEach((item) => {
              if (this.tableAll.age_unit == item.dictValue) {
                this.tableAll.age_unit = item.dictLabel;
              }
            });
            let dictTypes = "sys_user_sex";
            return getDicts(dictTypes);
          } else {
            throw new Error('获取年龄单位字典失败');
          }
        })
        .then((res) => {
          if (res.code == 200) {
            res.data.forEach((item) => {
              if (this.tableAll.cusSex == item.dictValue) {
                this.tableAll.cusSex = item.dictLabel;
              }
            });
            let data = {
              patname: this.tableAll.cusName,
              sex: this.tableAll.cusSex,
              patage: this.tableAll.age,
              patagename: this.tableAll.age_unit,
              patbirth: this.tableAll.cusBrithday,
            };
            return getTjYxjcList(data);
          } else {
            throw new Error('获取性别字典失败');
          }
        })
        .then((res) => {
          this.baogao = res.data;
          this.$refs.bbb.open = true;
          this.$refs.bbb.title = "报告字典";
        })
        .catch((error) => {
          console.error('生成图文报告失败:', error);
          this.$message.error('生成图文报告失败');
        })
        .finally(() => {
          this.loading = false;
        });
    },
    historicalreport() {
      this.loading = true;
      this.wenzhen = false;
      this.hosproy = true;
      let data = {
        cusId: this.tableAll.cusId,
      };
      reportHistory(data).then((res) => {
        this.loading = false;
        if (res.data[0] != null) {
          this.reportHistorydata = res.data;
        } else {
          this.reportHistorydata = [];
        }
      });
      reportHistory(data)
        .then((res) => {
          if (res.data[0] != null) {
            this.reportHistorydata = res.data;
          } else {
            this.reportHistorydata = [];
          }
        })
        .catch((error) => {
          console.error('获取历史报告失败:', error);
          this.$message.error('获取历史报告失败');
        })
        .finally(() => {
          this.loading = false;
        });
    },
    medicalhistory() {
      this.wenzhen = true;
      this.hosproy = false;
      this.loading = true;
      this.status1 = 3;
      let tjNumber = this.tableAll.tjNumber;
      getInfoById(tjNumber).then((response) => {
        this.formobj = response.data;
        if (this.formobj.xiyan == null) {
          this.formobj.xiyan = "1";
        }
        if (this.formobj.xiyanpinlv == null) {
          this.formobj.xiyanpinlv = "0";
        }
        if (this.formobj.xiyanyear == null) {
          this.formobj.xiyanyear = "0";
        }
        if (this.formobj.yinjiu == null) {
          this.formobj.yinjiu = "1";
        }
        if (this.formobj.yinjiupinlv == null) {
          this.formobj.yinjiupinlv = "0";
        }
        if (this.formobj.yinjiuyear == null) {
          this.formobj.yinjiuyear = "0";
        }
      });
      getInfoById(tjNumber)
        .then((response) => {
          this.formobj = response.data;
          if (this.formobj.xiyan == null) {
            this.formobj.xiyan = "1";
          }
          if (this.formobj.xiyanpinlv == null) {
            this.formobj.xiyanpinlv = "0";
          }
          if (this.formobj.xiyanyear == null) {
            this.formobj.xiyanyear = "0";
          }
          if (this.formobj.yinjiu == null) {
            this.formobj.yinjiu = "1";
          }
          if (this.formobj.yinjiupinlv == null) {
            this.formobj.yinjiupinlv = "0";
          }
          if (this.formobj.yinjiuyear == null) {
            this.formobj.yinjiuyear = "0";
          }
        })
        .catch((error) => {
          console.error('获取职业病史失败:', error);
          this.$message.error('获取职业病史失败');
        })
        .finally(() => {
          this.loading = false;
        });
    },
    downLoadFileImg(row) {
@@ -1893,7 +1951,6 @@
    handleClose1(done) {
      this.jianqians = false;
      this.wenzhen = false;
      this.flags = false;
      done();
    },