wwl
wwl
2025-02-26 27aa3005d9b05168f5d62ada3625165a207d5bdd
wwl
3个文件已修改
2个文件已添加
192 ■■■■ 已修改文件
src/api/doctor/examination.js 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/chat.vue 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/12.vue 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/doctor/examination/index.vue 77 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/login.vue 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/doctor/examination.js
@@ -45,7 +45,13 @@
        params: {tjNUm:tjNUm,proId:proId}
    })
}
export function yijian(tjNUm,proId) {
    return request({
        url: '/hosp/order/chushenyemianyijianjiekou',
        method: 'get',
        params: {tjNUm:tjNUm,proId:proId}
    })
}
// 点击恢复
export function huifu(tjNUm,proId) {
    return request({
src/components/chat.vue
New file
@@ -0,0 +1,86 @@
<template>
    <div>
      <h2>DeepSeek 聊天</h2>
      <textarea v-model="inputMessage" placeholder="请输入消息"></textarea>
      <button @click="sendMessage">发送</button>
      <p>回复: {{ reply }}</p>
      <p v-if="error" style="color: red">{{ error }}</p>
    </div>
  </template>
  <script>
  export default {
    name: 'Chat',
    data() {
      return {
        inputMessage: '',
        reply: '',
        error: ''
      };
    },
    methods: {
      async sendMessage() {
        if (!this.inputMessage.trim()) {
          this.error = '消息不能为空';
          return;
        }
        this.error = '';
        this.reply = '';
        try {
          const response = await fetch('http://localhost:3001/chat', {
            method: 'POST',
            headers: {
              'Content-Type': 'application/json'
            },
            body: JSON.stringify({ message: this.inputMessage })
          });
          if (!response.ok) {
            throw new Error('网络响应错误');
          }
          const reader = response.body.getReader();
          const decoder = new TextDecoder();
          while (true) {
            const { done, value } = await reader.read();
            if (done) break;
            const chunk = decoder.decode(value);
            const lines = chunk.split('\n').filter(line => line.trim());
            for (const line of lines) {
              if (line.startsWith('data: ')) {
                const data = line.replace('data: ', '');
                if (data === '[DONE]') return;
                try {
                  const parsedData = JSON.parse(data);
                  const content = parsedData.choices[0].delta.content;
                  if (content) {
                    this.reply += content;
                  }
                } catch (err) {
                  console.error('解析错误:', err);
                }
              }
            }
          }
        } catch (err) {
          this.error = '流式响应出错';
          console.error('Fetch 错误:', err);
        }
      }
    }
  };
  </script>
  <style scoped>
  textarea {
    width: 300px;
    height: 100px;
    margin-bottom: 10px;
  }
  button {
    padding: 5px 10px;
  }
  </style>
src/views/12.vue
New file
@@ -0,0 +1,16 @@
<template>
  <div id="app">
    <chat />
  </div>
</template>
<script>
import chat from '../components/chat.vue';
export default {
  name: 'App',
  components: {
    chat
  }
};
</script>
src/views/doctor/examination/index.vue
@@ -92,7 +92,7 @@
    </el-radio-group>
    <div style="width: 100%; margin-left: 10px; display: flex">
      <div style="width: 40.5%; margin-right: 20px">
      <div style="width: 45%">
        <el-table
          id="ta"
          v-loading="loading"
@@ -103,25 +103,26 @@
          :row-class-name="tableRowClassName"
          highlight-current-row
          @current-change="handleCurrentChange"
        >
          <!-- <el-table-column type="selection" width="40" align="center" /> -->
          <el-table-column
            label="体检号"
            align="center"
            prop="tjNumber"
            width="160px"
            min-width="160"
          />
          <el-table-column
            label="姓名"
            align="center"
            prop="cusName"
            width="80px"
            min-width="80"
          />
          <el-table-column
            label="性别"
            align="center"
            prop="cusSex"
            width="50px"
            min-width="50"
          >
            <template slot-scope="scope">
              <span v-if="scope.row.cusSex == '0'">男</span>
@@ -139,20 +140,20 @@
            label="手机号"
            align="center"
            prop="cusPhone"
            width="100px"
            min-width="100"
          />
          <el-table-column
            label="登记时间"
            align="center"
            prop="tjTime"
            width="120px"
            min-width="120"
          />
          <el-table-column
            v-if="checkStatus == '1'"
            label="审核状态"
            align="center"
            prop="confirmStatus"
            width="80px"
            min-width="80"
          >
            <template slot-scope="scope">
              <span
@@ -174,7 +175,7 @@
            </template>
          </el-table-column>
          <!--   v-hasPermi="['reservation:reservation:edit']" -->
          <el-table-column label="操作" align="center" width="120px">
          <el-table-column label="操作" align="center" min-width="120px">
            <template slot-scope="scope">
              <el-button
                size="mini"
@@ -208,7 +209,7 @@
          </el-table-column>
        </el-table>
      </div>
      <div style="width: 40%">
      <div style="width: 45%; margin-left: 5%">
        <el-table
          v-loading="loading"
          border
@@ -218,20 +219,21 @@
          :data="xiangmuList"
          highlight-current-row
          @row-click="handleRowClick"
        >
          <!-- <el-table-column type="selection" width="40" align="center" /> -->
          <el-table-column
            label="科室"
            align="center"
            prop="deptName"
            width="100"
            min-width="100"
            :show-overflow-tooltip="true"
          />
          <el-table-column
            label="项目"
            align="center"
            prop="proName"
            width="150"
            min-width="150"
            :show-overflow-tooltip="true"
          />
          <el-table-column
@@ -239,7 +241,7 @@
            align="center"
            prop="type"
            :show-overflow-tooltip="true"
            width="100"
            min-width="100"
          >
            <template slot-scope="scope">
              <span
@@ -283,7 +285,7 @@
            label="检查时间"
            align="center"
            prop="bcupdateTime"
            width="160"
            min-width="160"
          />
          <!-- <el-table-column
            label="保存医生"
@@ -297,7 +299,7 @@
            prop="zhupdateTime"
            width="160"
          /> -->
          <el-table-column label="操作" align="center" width="120px">
          <el-table-column label="操作" align="center" min-width="120px">
            <template slot-scope="scope">
              <el-button
                size="mini"
@@ -307,18 +309,18 @@
                @click="qijian(scope.row)"
                >{{ scope.row.type === 0 ? "弃检" : "恢复" }}</el-button
              >
              <!-- <el-button
              <el-button
                size="mini"
                type="text"
                @click="qijian(scope.row)"
                >恢复</el-button
              > -->
                @click="yijian(scope.row)"
                >已检</el-button
              >
              <el-button
                size="mini"
                type="text"
                :disabled="scope.row.type === 0 || scope.row.type === 2"
                @click="queryResultone(scope.row)"
                >结果查询</el-button
                >结果</el-button
              >
              <!--  @click="chaxun(scope.row) " -->
            </template>
@@ -401,6 +403,7 @@
  cSWebGetPro,
  dataSynchronization,
  qijian,
  yijian,
  resultList,
  typeOne,
  huifu,
@@ -812,7 +815,24 @@
        });
      }
    },
    yijian(row) {
      const tjNUm = this.selectedTjNumber;
      const proId = row.proId;
      row.isLoading = true;
      yijian(tjNUm, proId).then((res) => {
        if (res.code == 200) {
          this.$modal.msgSuccess("已检成功");
          cSWebGetPro(tjNUm).then((res) => {
            if (res.code === 200) {
              this.xiangmuList = res.data;
              row.isLoading = false;
            }
          });
        }
      }).catch(() => {
        row.isLoading = false;
      });
    },
    handleRowClick(row, column, event) {
      // console.log(row, 2323);
      this.name = row.proName;
@@ -958,4 +978,21 @@
.check-description.no-result {
  color: #bbb; /* 如果没有结论,文字为淡灰色 */
}
::v-deep .el-table {
  width: 100% !important;
}
::v-deep .el-table__body {
  width: 100% !important;
}
::v-deep .el-table__header {
  width: 100% !important;
}
/* 如果需要隐藏横向滚动条 */
::v-deep .el-table__body-wrapper::-webkit-scrollbar-horizontal {
  display: none;
}
</style>
src/views/login.vue
@@ -175,7 +175,7 @@
            this.loginForm.hospId = "pbkwyy";
            break;
          case '8095':
            this.loginForm.hospId = "jdczgzyy";
            this.loginForm.hospId = "sqyy";
            break;
        }
        Cookies.set("hospId", this.loginForm.hospId);
@@ -191,6 +191,9 @@
          case '9014':
            this.loginForm.hospId = "jdczgzyy";
            break;
          case '9015':
            this.loginForm.hospId = "sqyy";
            break;
        }
        Cookies.set("hospId", this.loginForm.hospId);
      }