#1 人工质控代码合并

已合并
yifan 2 月之前 将 1 次代码提交从 jiankun/rgzk合并至 jiankun/master

+ 144 - 46
src/api/qc.js

@@ -1,63 +1,62 @@
-import request from '@/utils/request'
-import request2 from '@/utils/request_bazb'
-import request3 from '@/utils/request_api'
-import store from '@/store';
+import request from '@/utils/request';
+import request2 from '@/utils/request_bazb';
+import request3 from '@/utils/request_api';
 
 // 病案室-质控列表
 export function getBlZkList(data) {
   return request({
     url: '/getBlZkList',
     method: 'post',
-    params: data
-  })
+    params: data,
+  });
 }
 
 export function getQualityControlStatus(data) {
   return request({
     url: '/getQualityControlStatus',
     method: 'post',
-    params: data
-  })
+    params: data,
+  });
 }
 
 export function updateQualityControl(data) {
   return request({
     url: '/updateQualityControl',
     method: 'post',
-    params: data
-  })
+    params: data,
+  });
 }
 
 export function applyForReview(data) {
   return request({
     url: '/applyForReview',
     method: 'post',
-    params: data
-  })
+    params: data,
+  });
 }
 
 export function getRevokeList(data) {
   return request({
     url: '/getRevokeList',
     method: 'post',
-    params: data
-  })
+    params: data,
+  });
 }
 
 export function revokeUpdate(data) {
   return request({
     url: '/revokeUpdate',
     method: 'post',
-    params: data
-  })
+    params: data,
+  });
 }
 
 export function getDataExamine(data) {
   return request({
     url: '/getDataExamine',
     method: 'post',
-    data
-  })
+    data,
+  });
 }
 
 // 病案室-病案详情-左侧菜单
@@ -65,16 +64,18 @@ export function getBlMenuList(data) {
   return request({
     url: '/bl_zk/getBlMenuList',
     method: 'post',
-    params: data
-  })
+    params: data,
+  });
 }
 // 病案室-病案详情-左侧菜单
+// 导出一个函数,用于获取树形列表
 export function getTreeList(data) {
+  // 发送请求,获取树形列表
   return request({
     url: '/getTree',
     method: 'post',
-    data
-  })
+    data,
+  });
 }
 
 // 病案室-病案详情-右侧质控栏
@@ -83,8 +84,35 @@ export function getCaseQuality(data) {
     // url: '/bl_zk/getCaseQuality',
     url: '/get_case_quality_v2',
     method: 'post',
-    data: data
-  })
+    data: data,
+  });
+}
+
+// 病案室-病案详情-右侧质控栏-申诉驳回接口
+export function examineAppeal(data) {
+  return request({
+    url: '/examineAppeal',
+    method: 'get',
+    params: data,
+  });
+}
+
+// 驳回信息接口
+export function getAppealData(data) {
+  return request({
+    url: '/getAppeal',
+    method: 'get',
+    params: data,
+  });
+}
+
+// 住院病历接口
+export function getCaseQualityBazb(data) {
+  return request2({
+    url: '/get_case_quality_v2',
+    method: 'post',
+    params: data,
+  });
 }
 
 // 病案室-病案详情-病历内容
@@ -99,31 +127,39 @@ export function getCasePlatform(data) {
   return request2({
     url: '/get_case_platform',
     method: 'post',
-    data: data
-  })
+    data: data,
+  });
 }
 export function getAllCase(data) {
   return request3({
     url: '/getAllCase',
     method: 'post',
-    data: data
-  })
+    data: data,
+  });
 }
 
 export function getLong(data) {
   return request3({
     url: '/long',
     method: 'post',
-    data: data
-  })
+    data: data,
+  });
 }
 
 export function getTemporary(data) {
   return request({
     url: '/bl_zk/temporary',
     method: 'post',
-    params: data
-  })
+    params: data,
+  });
+}
+
+export function getCaseResultData(data) {
+  return request({
+    url: '/getCaseResult',
+    method: 'get',
+    params: data,
+  });
 }
 
 // export function getPacsData(data) {
@@ -137,8 +173,8 @@ export function getPacsData(data) {
   return request3({
     url: '/get_pacs_data',
     method: 'post',
-    data: data
-  })
+    data: data,
+  });
 }
 // export function getBcData(data) {
 //   return request({
@@ -151,45 +187,107 @@ export function getBcData(data) {
   return request3({
     url: '/get_bc_data',
     method: 'post',
-    data: data
-  })
+    data: data,
+  });
 }
 export function getHomeData(data) {
   return request({
     url: '/bl_zk/getHomeData',
     method: 'post',
-    params: data
-  })
+    params: data,
+  });
 }
 
 export function getSurgeryData(data) {
   return request({
     url: '/bl_zk/getSurgeryData',
     method: 'post',
-    params: data
-  })
+    params: data,
+  });
 }
 
 export function getRuleData(data) {
   return request({
     url: '/bl_zk/getRule',
     method: 'post',
-    params: data
-  })
+    params: data,
+  });
 }
 
 export function getBlInfo(data) {
   return request({
     url: '/bl_zk/getBlInfo',
     method: 'post',
-    params: data
-  })
+    params: data,
+  });
 }
 
 export function addCaseQuality(data) {
   return request({
     url: '/bl_zk/addCaseQuality',
     method: 'post',
-    params: data
-  })
+    params: data,
+  });
+}
+
+export function getStaffListData(data) {
+  return request({
+    url: '/getStaffList',
+    method: 'get',
+    params: data,
+  });
+}
+
+// 获取院区
+export function getCampusArea(data) {
+  return request({
+    url: '/getCampusAreaList',
+    method: 'get',
+    params: data,
+  });
+}
+
+// 获取接收端
+export function getCaseCate(data) {
+  return request({
+    url: '/bl_zk/getCaseCate',
+    method: 'post',
+    params: data,
+  });
+}
+
+// 获取管床
+export function getPipeBedding(data) {
+  return request({
+    url: '/getPipeBeddingList',
+    method: 'get',
+    params: data,
+  });
+}
+
+//获取消息
+export function getNumberInfo(data) {
+  return request({
+    url: '/getCaseNumberInfo',
+    method: 'get',
+    params: data,
+  });
+}
+
+// 获取病案首页接口
+export function getQualityResult(data) {
+  return request({
+    url: '/home_quality/getQualityResult',
+    method: 'post',
+    data: data,
+  });
+}
+
+// 质控目录接口
+export function getSelectValue(data) {
+  return request({
+    url: '/getSelectObjectValue',
+    method: 'get',
+    params: data,
+  });
 }

二进制
src/assets/images/ysicon.png


二进制
src/assets/images/zsicon.png


+ 845 - 0
src/views/recordsRoom/qc/caseViews copy.vue

@@ -0,0 +1,845 @@
+<template>
+  <div id="MyDiv" :class="{ nocopy: $route.query.status }">
+    <div style="display: flex;justify-content: flex-end;">
+      <el-button v-if="review_status == 2" disabled>审核通过</el-button>
+      <el-button type="primary" @click="toExamine" v-else>审核通过</el-button>
+    </div>
+    <div class="cont_container">
+      <!-- 左侧点击列表部分 -->
+      <div class="cont-left-tiem">
+        <ul class="el-menu-vertical-demo el-menu">
+          <li class="li-left-item" :class="is_active == 0 ? 'is-active' : ''" @click="clickTree(0, '住院病案')">
+            <span>住院病案</span>
+          </li>
+          <li
+            v-for="(item, index) in treeList"
+            :key="index"
+            :class="[is_active == item.bllb && item.bllb != 49 ? 'is-active' : '', item.bllb == 49 || [2000002, 294, 303, 329, 288, 34, 87].includes(item.bllb) ? 'li-left-itemyz' : 'li-left-item']"
+            @click="clickTree(item.bllb, item.name, item)"
+          >
+            <span>{{ item.name }}</span>
+            <div v-if="item.bllb == 49">
+              <div :class="['li-left-item-li', is_active == '长期医嘱' ? 'is-active' : '']" data-li="49-1" :id="item.bllb">长期医嘱</div>
+              <div :class="['li-left-item-li', is_active == '临时医嘱' ? 'is-active' : '']" data-li="49-2" :id="item.bllb">临时医嘱</div>
+            </div>
+            <div v-if="item.bllb == 2000002">
+              <div v-for="(jitem, jindex) in item.list" :id="jitem.type" :key="jindex" :class="['li-left-item-li', is_active == jitem.ExamType ? 'is-active' : '']">
+                {{ jitem.name }}
+              </div>
+            </div>
+            <!-- 病程记录、手术记录 -->
+            <div v-if="[294, 303, 329, 288, 34, 87].includes(item.bllb)">
+              <div
+                v-for="(jitem, jindex) in item.list"
+                :id="`${jitem.blbh}`"
+                :key="jindex"
+                :class="['li-left-item-li', is_active == jitem.blbh ? 'is-active' : '']"
+                :title="jitem.name.trim()"
+              >
+                {{ jitem.name.trim() }}
+              </div>
+            </div>
+          </li>
+        </ul>
+      </div>
+      <div class="cont-left-file" @mouseup.prevent="handleMouseupHandle" @contextmenu.prevent="openMenu($event)">
+        <div v-if="is_active == 0">
+          <mainHomePage ref="main" :data="mainHomeData" :if-file="ifFile" />
+        </div>
+        <div v-else-if="parentType == 292">
+          <!-- 入院记录 -->
+          <admissionRecord :data="admissionRecord" :if-file="ifFile" />
+        </div>
+        <div v-else-if="parentType == '1' && is_active == 1">
+          <!-- 出院记录 -->
+          <OutHospitalRecord :data="outHospitalRecordData" />
+        </div>
+        <div v-else-if="parentType == 294">
+          <!-- 病程记录 -->
+          <div>病程记录</div>
+          <CaseRecord v-if="caseRecodeInfo.is_format === 1" :data="caseRecodeInfo" />
+          <NoFormatText v-else :text="caseRecodeInfo.content" :data="caseRecodeInfo" name="" />
+        </div>
+        <div v-else-if="parentType == 303">
+          <!-- 手术记录 -->
+          <template v-if="surgeryData.is_format">
+            <ShouShuRecord1 v-if="surgeryData.type === 1" :data="surgeryData" />
+            <ShouShuRecord2 v-if="surgeryData.type === 2" :data="surgeryData" />
+            <ShouShuRecord4 v-if="surgeryData.type === 4" :data="surgeryData" />
+          </template>
+          <NoFormatText v-else :text="surgeryData.content" :data="surgeryData" :name="blname_title" />
+        </div>
+        <div v-else-if="is_active == '长期医嘱'">
+          <!-- 长期医嘱 -->
+          <medicalAdvice :data-obj="longAdvice" />
+        </div>
+        <div v-else-if="is_active == '临时医嘱'">
+          <!-- 临时医嘱 -->
+          <medicalTemporary :data-obj="happensAdvice" />
+        </div>
+        <div v-else-if="parentType == '2000002' && is_active == '1'">
+          <!-- 病历图文报告 -->
+          <caseImageText :data-obj-arr="pacsDetail" />
+        </div>
+        <div v-else-if="parentType == '2000002' && is_active == '2'">
+          <!-- 超声诊断 -->
+          <ultrasound :data-obj-arr="pacsDetail" />
+        </div>
+        <div v-else-if="parentType == '2000002' && is_active == '3'">
+          <!-- 影像诊断 -->
+          <imaging :data-obj-arr="pacsDetail" />
+        </div>
+        <div v-else-if="parentType == '2000002' && is_active == '4'">
+          <!-- 为心电 -->
+          <electrocar :data-obj-arr="pacsDetail" />
+        </div>
+        <div v-else-if="parentType == '2000002' && is_active == '5'">
+          <!-- 检验报告单 病理 -->
+          <checkout :data-obj-arr="pacsDetail" />
+        </div>
+        <div v-else-if="parentType == '2000002' && is_active == '6'">
+          <!-- 內窥镜检查报告 病理 -->
+          <sightGlass :data-obj-arr="pacsDetail" />
+        </div>
+        <div v-else-if="is_active == 288 || is_active == 18">
+          <!-- 死亡记录 或者 24小时内入院记录 -->
+          <DeathText :data-obj-arr="dataObj" v-if="update" />
+        </div>
+        <div v-else>
+          <div v-if="update">
+            <newContFile v-for="(item, index) of text" :key="index" :text="item.HJNR" :name="name_title" />
+          </div>
+        </div>
+      </div>
+      <!-- status 不存在 意味着不脱敏、医院自助查询 -->
+      <template v-if="!$route.query.status">
+        <!-- 住院病案质控 -->
+        <CaseQualityBox :data="results" v-if="results.data" @clickAppealBtn="clickAppealBtn" :width="340" :height="820" ref="CaseQualityBox"/>
+      </template>
+      <!-- 添加质控结果 -->
+      <CreateControlResultDialogVue v-if="dialogData.bSwitch" :AAA28="valData" :data="dialogData" @refresh="handelRefreshResults" />
+      <!-- 右键菜单 -->
+      <ul
+        v-show="gridCustomizeVisible"
+        :style="{ left: left + 'px', top: top + 'px' }"
+        class="contextmenu"
+      >
+        <li @click="onCreate">添加</li>
+      </ul>
+    </div>
+
+    <!-- 审核申诉弹窗 -->
+    <div class="dialog-box">
+      <el-dialog title="审核结果" :visible.sync="dialogVisible" :close-on-click-modal="false" width="340px">
+        <el-form ref="form" :model="alertForm">
+          <el-form-item label="驳回原因:">
+            <el-input v-model="alertForm.describe" type="textarea" placeholder="请输入驳回原因" />
+          </el-form-item>
+          <el-form-item label="审核科室:">
+            <el-input v-model="alertForm.case_document" placeholder="审核科室" />
+            <!-- <el-select v-model="alertForm.case_document">
+              <el-option v-for="(v,k) in groupList" :key="k" :label="v.name" :value="v.name"/>
+            </el-select> -->
+          </el-form-item>
+          <el-form-item label="审核医师:">
+            <el-input v-model="alertForm.case_docter" placeholder="审核医师" />
+          </el-form-item>
+          <el-form-item label="手机号">
+            <el-input v-model="alertForm.case_docter_mobile" placeholder="手机号" />
+          </el-form-item>
+        </el-form>
+
+        <span slot="footer" class="dialog-footer">
+          <el-button type="primary" @click="editSubmit">确 定</el-button>
+          <el-button @click="dialogVisible=false">取 消</el-button>
+        </span>
+      </el-dialog>
+    </div>
+  </div>
+</template>
+<script>
+import Mmenu from '@/components/m-menu'
+import mainHomePage from './contFile/mainHomePage'
+import newContFile from './contFile/newContFile'
+import admissionRecord from './contFile/admissionRecord'
+import medicalAdvice from './contFile/medicalAdvice'
+import medicalTemporary from './contFile/medicalTemporary'
+import caseImageText from './report/caseImageText'
+import ultrasound from './report/ultrasound'
+import imaging from './report/imaging'
+import electrocar from './report/electrocar'
+import checkout from './report/checkout'
+import sightGlass from './report/sightGlass'
+import CaseRecord from './components/CaseRecord2.vue'
+import ShouShuRecord1 from './components/ShouShuRecord1.vue'
+import ShouShuRecord2 from './components/ShouShuRecord2.vue'
+import ShouShuRecord4 from './components/ShouShuRecord4.vue'
+import NoFormatText from './components/NoFormatText.vue'
+import OutHospitalRecord from './components/OutHospitalRecord.vue'
+import CaseQualityBox from './components/CaseQualityBox2.vue'
+import DeathText from './components/DeathText.vue'
+import CreateControlResultDialogVue from './components/CreateControlResultDialog.vue'
+import { getTreeList,getBlMenuList,getCaseQuality, getCasePlatform, getAllCase, getLong, getTemporary, getPacsData, getBcData, getHomeData, getSurgeryData, getBlInfo, applyForReview } from '@/api/qc'
+import { getCaseExamineAppeal } from '@/api/admin'
+import { getToken, removeToken } from '@/utils/auth'
+
+export default {
+  components: {
+    Mmenu,
+    mainHomePage,
+    newContFile,
+    admissionRecord,
+    medicalAdvice,
+    medicalTemporary,
+    caseImageText,
+    ultrasound,
+    imaging,
+    electrocar,
+    sightGlass,
+    checkout,
+    CaseRecord,
+    ShouShuRecord1,
+    ShouShuRecord2,
+    ShouShuRecord4,
+    NoFormatText,
+    OutHospitalRecord,
+    CaseQualityBox,
+    DeathText,
+    CreateControlResultDialogVue
+  },
+  directives: {},
+  filters: {},
+  extends: {},
+  mixins: {},
+  props: {},
+  data() {
+    return {
+      mainHomeData: {},
+      admissionRecord: {},
+      longAdvice: {},
+      happensAdvice: {},
+      valData: '',
+      ifFile: false,
+      treeList: [],
+      is_active_blbh: 0,
+      is_active: 0,
+      parentType: 0,
+      name_title: '',
+      text: [],
+      update: true,
+      titleName: '住院病案',
+      pacsDetail: {},
+      // 病程记录详情
+      caseRecodeInfo: {
+        is_format: 1
+      },
+      surgeryData: {
+        mzfj: [],
+        ssqk: [],
+        sscxsj: [],
+        sslb: [],
+        is_format: 0
+      },
+      outHospitalRecordData: {
+        name: {},
+        ry_time: {},
+        sex: {},
+        age: {},
+        cy_time: {},
+        zyts: {},
+        ryqk: {},
+        cbzd: {},
+        zljg: {},
+        cyqk: {},
+        cyzd: {},
+        cyyz: {}
+      },
+      dataObj: [],
+      results: null,
+      dialogData: {
+        bSwitch: false,
+        text: '',
+        blbh: ''
+      },
+      top: 0,
+      left: 0,
+      gridCustomizeVisible: false,
+
+      dialogVisible: false,
+      alertForm: {},
+      appealInfo: {},
+      review_status: 0
+    }
+  },
+  computed: {
+    bcjlLiIds() {
+      // 病程记录子项数据
+      const arr = Object.values(this.treeList).filter(item => item.bllb === 294)
+      const liIds = []
+      if (arr.length) {
+        if (arr[0].list) {
+          for (let i = 0; i < arr[0].list.length; i++) {
+            liIds.push(arr[0].list[i].blbh)
+          }
+        }
+      }
+      return liIds
+    },
+    shoushuLiIds() {
+      // 病程记录子项数据
+      const arr = Object.values(this.treeList).filter(item => item.bllb === 303)
+      const liIds = []
+      if (arr.length) {
+        if (arr[0].list) {
+          for (let i = 0; i < arr[0].list.length; i++) {
+            liIds.push(arr[0].list[i].blbh)
+          }
+        }
+      }
+      return liIds
+    },
+    blname_title() {
+      let title
+      const type = this.surgeryData.type
+      if (type === 1) {
+        title = '手术风险评估表'
+      } else if (type === 2) {
+        title = '手术安全核查表'
+      } else if (type === 3) {
+        title = '手术同意书'
+      } else if (type === 4) {
+        title = '手术记录'
+      }
+      return title
+    }
+  },
+  watch: {
+    //变量名
+    gridCustomizeVisible(val) {
+      if (val) {
+        //点击事件,调用方法
+        document.body.addEventListener("click", this.closeMenu);
+      } else {
+        document.body.removeEventListener("click", this.closeMenu);
+      }
+    },
+  },
+  mounted() {
+    this.valData = localStorage.getItem('getData')
+    if (this.valData) {
+      this.funQuery()
+      this.getCaseQualityResults()
+    }
+    this.getTree();
+    this.getDataExamine();
+  },
+
+  methods: {
+    editSubmit(){
+      let that = this;
+      let params = {
+        id: that.appealInfo.id,
+        status: that.appealInfo.status,
+        describe: that.alertForm.describe,
+        case_document: that.alertForm.case_document,
+        case_docter: that.alertForm.case_docter,
+        case_docter_mobile: that.alertForm.case_docter_mobile,
+      }
+      let index = that.appealInfo.index;
+
+      getCaseExamineAppeal(params).then(res => {
+        const { c } = res
+        if(c == 0){
+          that.$message('提交成功');
+          that.dialogVisible = false;
+          that.alertForm = {};
+          that.$refs.CaseQualityBox.editSubmit(index);
+        }else{
+          that.$message('提交失败');
+        }
+
+      })
+    },
+    clickAppealBtn(e) {
+      console.log(e)
+      let that = this;
+      that.appealInfo = e;
+      that.alertForm.case_document = localStorage.getItem('KSMC');
+      that.alertForm.case_docter = localStorage.getItem('realname');
+      if(e.status == 1){
+        // 通过
+        that.editSubmit();
+      }else{
+
+        that.dialogVisible = true;
+
+      }
+
+    },
+    // 刷新质控结果
+    handelRefreshResults() {
+      this.getCaseQualityResults()
+    },
+    // 鼠标右击事件
+    openMenu(e) {
+      //获取右击时得坐标
+      var x = e.pageX;
+      var y = e.pageY;
+      //top,left在data种定义,初始值为0
+      //top,left是右键菜单得坐标值,可以通过运算调整
+      this.top = y - 80;
+      this.left = x - 200;
+
+      if (this.dialogData.text) {
+        this.gridCustomizeVisible = true;
+      }
+    },
+    closeMenu() {
+      this.gridCustomizeVisible = false;
+    },
+    // 鼠标右击事件
+    onCreate() {
+      this.dialogData.bSwitch = true
+    },
+    // 鼠标事件
+    handleMouseupHandle() {
+      const text = window.getSelection().toString()
+      if (text.trim().length) {
+        this.dialogData.blbh = this.is_active_blbh
+        this.dialogData.text = text
+      }
+    },
+    // 获取新病案指控结果
+    getCaseQualityResults() {
+      let that = this;
+      const params = {
+        id: that.valData
+      }
+      getCaseQuality(params).then(res => {
+        console.log(res)
+        that.results = null;
+        that.$nextTick(() =>{
+          that.results = res.data;
+        })
+      }).catch(e =>{
+        console.log(e)
+      })
+      // that.axios({
+      //   url:'http://10.10.11.65:8081/bazb/get_case_quality_v2',
+      //   method: 'post',
+      //   headers: { 'content-type': 'application/json', 'token': getToken() },
+      //   data: {
+      //     ZYH: Number(that.valData)
+      //   }
+      // }).then(res => {
+      //   this.results = res.data
+      // })
+    },
+    reload() {
+      // 移除组件
+      this.update = false
+      // 在组件移除后,重新渲染组件
+      // this.$nextTick可实现在DOM 状态更新后,执行传入的方法。
+      this.$nextTick(() => {
+        this.update = true
+      })
+    },
+    funEdit() {
+      this.ifFile = true
+      this.$message('errer:功能待开发')
+    },
+    getback() {
+      this.$router.go(-1)
+    },
+    /**
+     * 跳转对应病历首页
+     */
+    getBlankIndexss(item) {
+      this.$refs.main.getBlankIndex(item)
+    },
+    funQuery() {
+      const params = {
+        id: this.valData
+      }
+      if (this.$route.query.status) {
+        params.is_tm = 1
+      }
+      getHomeData(params).then(res => {
+        this.mainHomeData = res.data
+        this.is_active_blbh = this.mainHomeData.MED_REC_ID
+      })
+    },
+    getTree() {
+      const that = this
+      const pramse = {
+        id: this.valData
+      }
+      this.$axios.post('/getTree', pramse).then(res => {
+        that.treeList = res.data
+      })
+    },
+    clickTree(b, n, item) {
+      if (item) {
+        if (item.blbh) {
+          this.is_active_blbh = item.blbh
+        } else {
+          this.is_active_blbh = event.target.id
+        }
+      } else {
+        // this.is_active_blbh = this.mainHomeData.MED_REC_ID
+        this.is_active = 0;
+        this.funQuery();
+      }
+      this.titleName = n
+      this.parentType = b
+      const that = this
+      // 判断点击的
+      if (event.target.id || !item?.list) {
+        if (event.target.outerText == '长期医嘱' || event.target.outerText == '临时医嘱') {
+          that.is_active = event.target.outerText;
+        } else if (b == 2000002) {
+          that.is_active = event.target.id;
+        } else if (b == 294) {
+          that.is_active = event.target.id;
+        } else if (b == 303) {
+          that.is_active = event.target.id;
+        } else {
+          that.is_active = b;
+        }
+      }
+      that.name_title = n
+      if (b != 0 && b != 292 && b != 1) {
+        const params = {
+          MED_REC_ID: that.valData,
+          bllb: b
+        }
+        if (this.$route.query.status) {
+          params.is_tm = 1
+        }
+        this.$axios.post('/getAllCase', params).then(res => {
+          that.text = res.data
+          that.dataObj = res.data
+          that.reload()
+        })
+      } else if (b == 292) {
+        // 获取详情
+        const params = {
+          id: this.valData,
+          bllb: b
+        }
+        if (this.$route.query.status) {
+          params.is_tm = '1'
+        }
+        getCasePlatform(params).then(res => {
+          this.admissionRecord = res.data
+        })
+      } else if (b == 1) {
+        // 获取详情
+        const params = {
+          id: this.valData,
+          bllb: b
+        }
+        if (this.$route.query.status) {
+          params.is_tm = 1
+        }
+        getCasePlatform(params).then(res => {
+          this.outHospitalRecordData = res.data;
+        })
+      }
+      if (that.is_active == '长期医嘱') {
+        // 长期医嘱
+        const params = {
+          AAA28: that.valData
+        }
+        if (this.$route.query.status) {
+          params.is_tm = 1
+        }
+        getLong(params).then(res => {
+          this.longAdvice = res.data
+        })
+      }
+      if (that.is_active == '临时医嘱') {
+        // 临时医嘱
+        const params = {
+          AAA28: that.valData
+        }
+        if (this.$route.query.status) {
+          params.is_tm = 1
+        }
+        getTemporary(params).then(res => {
+          this.happensAdvice = res.data
+        })
+      }
+      if (that.parentType == '2000002' && that.is_active != '') {
+        // 报告单 相关
+        const parm = {
+          type: Number(that.is_active)
+        }
+        if (this.$route.query.status) {
+          parm.is_tm = 1
+        }
+        const treeListArr = Object.values(that.treeList)
+        treeListArr.forEach((item, index) => {
+          if (item.bllb == 2000002) {
+            parm.zyh = Number(item.list[0].ZYH)
+          }
+        })
+
+        getPacsData(parm).then(res => {
+          this.pacsDetail = res.data
+        })
+      }
+      // 病程记录
+      if (item.bllb === 294) {
+        if (that.is_active) {
+          // 请求前先重置之前的数据
+          that.caseRecodeInfo = {}
+          const parm = { blbh: that.is_active }
+          if (this.$route.query.status) {
+            parm.is_tm = 1
+          }
+          getBcData(parm).then(res => {
+            that.caseRecodeInfo = res.data[0].bc_data
+            that.caseRecodeInfo.is_format = res.data[0].is_format
+          })
+        }
+      }
+      // 手术记录
+      if (item.bllb === 303) {
+        if (that.is_active) {
+          // 请求前先重置之前的数据
+          that.surgeryData = {}
+          const parm = { blbh: that.is_active }
+          if (this.$route.query.status) {
+            parm.is_tm = 1
+          }
+          getSurgeryData(parm).then(res => {
+            that.surgeryData = res.p[0].surgery_data
+            that.surgeryData.is_format = res.p[0].is_format
+          })
+        }
+      }
+    },
+
+    /**
+     * 批量审核
+     */
+    toExamine() {
+      var ZYH = [this.valData];
+      applyForReview({ ZYH: ZYH, status: 2 } ).then(res => {
+        this.$message.success(res.msg || '申请成功');
+        this.getDataExamine();
+      }).catch(error => {
+        console.log(error);
+      })
+    },
+
+    /**
+     * 获取审核状态
+     */
+    getDataExamine() {
+      var ZYH = this.valData;
+      this.$axios.post('/getDataExamine', { ZYH: ZYH }).then(res => {
+        this.review_status = res.data.review_status ?? 0;
+      })
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+#MyDiv {
+  margin: 0;
+  padding: 0 !important;
+}
+.nocopy {
+  user-select: none;
+}
+.header {
+  margin: 10px 20px;
+  text-align: right;
+  display: flex;
+  justify-content: flex-end;
+}
+.cont_container {
+  display: flex;
+  justify-content: center;
+}
+.cont-left-tiem {
+  width: 250px;
+  margin: 0 0 0 15px;
+  min-height: 650px;
+  height: calc(100vh - 130px);
+  overflow-y: scroll;
+  background: #ffffff;
+}
+.cont-left-file {
+  flex: 1;
+  min-height: 650px;
+  margin: 0 5px;
+  height: calc(100vh - 130px);
+  overflow-y: scroll;
+  background: #ffffff;
+  border: 1px solid #e2e2e2;
+  padding: 10px;
+}
+.li-router {
+  display: inline-block;
+  width: 100%;
+  height: 100%;
+}
+.li-left-item {
+  line-height: 56px;
+  font-size: 14px;
+  color: #303133;
+  padding: 0 20px;
+  cursor: pointer;
+  -webkit-transition: border-color 0.3s, background-color 0.3s, color 0.3s;
+  transition: border-color 0.3s, background-color 0.3s, color 0.3s;
+  -webkit-box-sizing: border-box;
+  box-sizing: border-box;
+}
+.li-left-itemyz {
+  line-height: 56px;
+  font-size: 14px;
+  color: #303133;
+  padding-left: 20px;
+
+  -webkit-transition: border-color 0.3s, background-color 0.3s, color 0.3s;
+  transition: border-color 0.3s, background-color 0.3s, color 0.3s;
+  -webkit-box-sizing: border-box;
+  box-sizing: border-box;
+  .li-left-item-li {
+    width: 100%;
+    line-height: 36px;
+    padding: 0 20px;
+    cursor: pointer;
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
+  }
+  .li-left-item-li:hover {
+    outline: 0;
+    background-color: #ecf5ff;
+  }
+}
+.li-left-item:focus,
+.li-left-item:hover {
+  outline: 0;
+  background-color: #ecf5ff;
+}
+
+.is-active {
+  color: #409eff;
+}
+.dialog-box {
+  ::v-deep .el-dialog__header{
+    padding: 10px 20px;
+    background: rgb(27,100,169);
+    color: #fff !important;
+    .el-dialog__title{
+      color: #fff;
+    }
+    .el-dialog__headerbtn{
+      top: 14px;
+    }
+  }
+  ::v-deep .el-dialog__body{
+    .el-form-item {
+      background: #fff;
+    }
+    .el-input{
+      width: 100%;
+      input{
+        height: 35px;
+        border: 1px solid #C0C4CC;
+        border-radius: 6px;
+      }
+    }
+  }
+}
+</style>
+<style>
+/*  ================================== 文本形式样式 ↓ ======================== */
+.refachInput span {
+  height: auto;
+  line-height: 1;
+  padding: 10px 0;
+}
+.refachInput span.refachInput-text {
+  padding-left: 12px;
+}
+.el-row--flex.is-justify-space-around {
+  justify-content: flex-start;
+}
+.member-infobox {
+  width: 100%;
+}
+.member-infobox .info-box-1 {
+  /* display: flex;
+    flex-wrap: wrap; */
+  margin-top: 20px;
+}
+.infoBox-items {
+  width: auto;
+  display: flex;
+  align-items: center;
+  padding: 8px 0;
+}
+.padding-left20 {
+  padding-left: 20px;
+}
+.padding-right20 {
+  padding-right: 20px;
+}
+.infoBox-title {
+  color: #333;
+  font-size: 12px;
+  font-weight: bold;
+}
+.infoBox-items-text {
+  color: #666;
+  font-size: 12px;
+  padding-left: 5px;
+  padding-right: 20px;
+}
+.title-ff0000 {
+  color: #ff0000;
+}
+/* 高亮 */
+.choose-twinkle {
+  font-size: 20px;
+  color: red;
+  font-weight: 600;
+  background: yellow;
+}
+.table-value-look {
+  padding-left: 12px;
+  color: #ff0000;
+  cursor: pointer;
+}
+
+/* 右键菜单 */
+.contextmenu {
+  margin: 0;
+  background: #fff;
+  z-index: 3000;
+  position: absolute;
+  list-style-type: none;
+  padding: 5px 0;
+  border-radius: 4px;
+  font-size: 12px;
+  font-weight: 400;
+  color: #333;
+  box-shadow: 2px 2px 3px 0 rgba(0, 0, 0, 0.3);
+}
+
+.contextmenu li {
+  margin: 0;
+  padding: 7px 16px;
+  cursor: pointer;
+}
+
+.contextmenu li:hover {
+  background: #eee;
+}
+</style>

+ 144 - 47
src/views/recordsRoom/qc/caseViews.vue

@@ -1,8 +1,9 @@
 <template>
   <div id="MyDiv" :class="{ nocopy: $route.query.status }">
-    <div style="display: flex;justify-content: flex-end;">
+    <div style="display: flex;justify-content: flex-end;margin-bottom: 10px;">
       <el-button v-if="review_status == 2" disabled>审核通过</el-button>
       <el-button type="primary" @click="toExamine" v-else>审核通过</el-button>
+      <el-button type="primary" @click="caseShow = !caseShow">病历智审结果</el-button>
     </div>
     <div class="cont_container">
       <!-- 左侧点击列表部分 -->
@@ -11,31 +12,26 @@
           <li class="li-left-item" :class="is_active == 0 ? 'is-active' : ''" @click="clickTree(0, '住院病案')">
             <span>住院病案</span>
           </li>
-          <li
-            v-for="(item, index) in treeList"
-            :key="index"
+          <li v-for="(item, index) in treeList" :key="index"
             :class="[is_active == item.bllb && item.bllb != 49 ? 'is-active' : '', item.bllb == 49 || [2000002, 294, 303, 329, 288, 34, 87].includes(item.bllb) ? 'li-left-itemyz' : 'li-left-item']"
-            @click="clickTree(item.bllb, item.name, item)"
-          >
+            @click="clickTree(item.bllb, item.name, item)">
             <span>{{ item.name }}</span>
             <div v-if="item.bllb == 49">
-              <div :class="['li-left-item-li', is_active == '长期医嘱' ? 'is-active' : '']" data-li="49-1" :id="item.bllb">长期医嘱</div>
-              <div :class="['li-left-item-li', is_active == '临时医嘱' ? 'is-active' : '']" data-li="49-2" :id="item.bllb">临时医嘱</div>
+              <div :class="['li-left-item-li', is_active == '长期医嘱' ? 'is-active' : '']" data-li="49-1" :id="item.bllb">
+                长期医嘱</div>
+              <div :class="['li-left-item-li', is_active == '临时医嘱' ? 'is-active' : '']" data-li="49-2" :id="item.bllb">
+                临时医嘱</div>
             </div>
             <div v-if="item.bllb == 2000002">
-              <div v-for="(jitem, jindex) in item.list" :id="jitem.type" :key="jindex" :class="['li-left-item-li', is_active == jitem.ExamType ? 'is-active' : '']">
+              <div v-for="(jitem, jindex) in item.list" :id="jitem.type" :key="jindex"
+                :class="['li-left-item-li', is_active == jitem.ExamType ? 'is-active' : '']">
                 {{ jitem.name }}
               </div>
             </div>
             <!-- 病程记录、手术记录 -->
             <div v-if="[294, 303, 329, 288, 34, 87].includes(item.bllb)">
-              <div
-                v-for="(jitem, jindex) in item.list"
-                :id="`${jitem.blbh}`"
-                :key="jindex"
-                :class="['li-left-item-li', is_active == jitem.blbh ? 'is-active' : '']"
-                :title="jitem.name.trim()"
-              >
+              <div v-for="(jitem, jindex) in item.list" :id="`${jitem.blbh}`" :key="jindex"
+                :class="['li-left-item-li', is_active == jitem.blbh ? 'is-active' : '']" :title="jitem.name.trim()">
                 {{ jitem.name.trim() }}
               </div>
             </div>
@@ -111,19 +107,22 @@
           </div>
         </div>
       </div>
-      <!-- status 不存在 意味着不脱敏、医院自助查询 -->
-      <template v-if="!$route.query.status">
-        <!-- 住院病案质控 -->
-        <CaseQualityBox :data="results" v-if="results.data" @clickAppealBtn="clickAppealBtn" :width="340" :height="820" ref="CaseQualityBox"/>
-      </template>
+      <div class="case-content" :class="caseShow ? 'case-content-show' : 'case-content-hidden'"
+        @animationend="handleAnimationEnd">
+        <!-- status 不存在 意味着不脱敏、医院自助查询 -->
+        <template v-if="!$route.query.status">
+          <!-- 住院病案质控 -->
+          <CaseQualityBox :resultsList="resultsData" v-if="results.data" @clickAppealBtn="clickAppealBtn" :width="340"
+            :height="820" ref="CaseQualityBox" :caseShow="caseShow" @close="handleClose"
+            :MED_REC_ID="mainHomeData.MED_REC_ID" :CWH="mainHomeData.CWH" :AAA29="mainHomeData.AAA29" />
+        </template>
+      </div>
       <!-- 添加质控结果 -->
-      <CreateControlResultDialogVue v-if="dialogData.bSwitch" :AAA28="valData" :data="dialogData" @refresh="handelRefreshResults" />
+      <CreateControlResultDialogVue v-if="dialogData.bSwitch" :AAA28="valData" :data="dialogData"
+        @refresh="handelRefreshResults" :MED_REC_ID="mainHomeData.MED_REC_ID" :CWH="mainHomeData.CWH"
+        :AAA29="mainHomeData.AAA29" :JSKS="mainHomeData.AAC11C"/>
       <!-- 右键菜单 -->
-      <ul
-        v-show="gridCustomizeVisible"
-        :style="{ left: left + 'px', top: top + 'px' }"
-        class="contextmenu"
-      >
+      <ul v-show="gridCustomizeVisible" :style="{ left: left + 'px', top: top + 'px' }" class="contextmenu">
         <li @click="onCreate">添加</li>
       </ul>
     </div>
@@ -151,7 +150,7 @@
 
         <span slot="footer" class="dialog-footer">
           <el-button type="primary" @click="editSubmit">确 定</el-button>
-          <el-button @click="dialogVisible=false">取 消</el-button>
+          <el-button @click="dialogVisible = false">取 消</el-button>
         </span>
       </el-dialog>
     </div>
@@ -179,7 +178,7 @@ import OutHospitalRecord from './components/OutHospitalRecord.vue'
 import CaseQualityBox from './components/CaseQualityBox2.vue'
 import DeathText from './components/DeathText.vue'
 import CreateControlResultDialogVue from './components/CreateControlResultDialog.vue'
-import { getTreeList,getBlMenuList,getCaseQuality, getCasePlatform, getAllCase, getLong, getTemporary, getPacsData, getBcData, getHomeData, getSurgeryData, getBlInfo, applyForReview } from '@/api/qc'
+import { getTreeList, getBlMenuList, getCaseQuality, getCasePlatform, getAllCase, getLong, getTemporary, getPacsData, getBcData, getHomeData, getSurgeryData, getBlInfo, applyForReview } from '@/api/qc'
 import { getCaseExamineAppeal } from '@/api/admin'
 import { getToken, removeToken } from '@/utils/auth'
 
@@ -268,7 +267,9 @@ export default {
       dialogVisible: false,
       alertForm: {},
       appealInfo: {},
-      review_status: 0
+      review_status: 0,
+      caseShow: false,
+      resultsData: null,
     }
   },
   computed: {
@@ -335,7 +336,7 @@ export default {
   },
 
   methods: {
-    editSubmit(){
+    editSubmit() {
       let that = this;
       let params = {
         id: that.appealInfo.id,
@@ -346,15 +347,18 @@ export default {
         case_docter_mobile: that.alertForm.case_docter_mobile,
       }
       let index = that.appealInfo.index;
+      console.log(params, "params");
+
 
       getCaseExamineAppeal(params).then(res => {
         const { c } = res
-        if(c == 0){
+        if (c == 0) {
           that.$message('提交成功');
           that.dialogVisible = false;
           that.alertForm = {};
           that.$refs.CaseQualityBox.editSubmit(index);
-        }else{
+          that.$refs.CaseQualityBox.qualityBazb(index);
+        } else {
           that.$message('提交失败');
         }
 
@@ -366,10 +370,10 @@ export default {
       that.appealInfo = e;
       that.alertForm.case_document = localStorage.getItem('KSMC');
       that.alertForm.case_docter = localStorage.getItem('realname');
-      if(e.status == 1){
+      if (e.status == 1) {
         // 通过
         that.editSubmit();
-      }else{
+      } else {
 
         that.dialogVisible = true;
 
@@ -416,14 +420,27 @@ export default {
         id: that.valData
       }
       getCaseQuality(params).then(res => {
-        console.log(res)
         that.results = null;
-        that.$nextTick(() =>{
+        that.$nextTick(() => {
           that.results = res.data;
         })
-      }).catch(e =>{
+      }).catch(e => {
         console.log(e)
       })
+      this.$axios.post('/home_quality/getQualityResult', params).then(res => {
+        that.resultsData = null; // 清空结果
+        that.$nextTick(() => {
+          that.resultsData = res.data; // 更新结果
+          console.log('Results updated:', that.resultsData); // 打印更新后的结果
+          if (that.$refs.CaseQualityBox) {
+            that.$refs.CaseQualityBox.qualityBazb(params.id);
+            that.$refs.CaseQualityBox.getData(params.id);
+          }
+          this.$forceUpdate()
+        });
+      }).catch(e => {
+        console.log(e);
+      });
       // that.axios({
       //   url:'http://10.10.11.65:8081/bazb/get_case_quality_v2',
       //   method: 'post',
@@ -626,7 +643,7 @@ export default {
      */
     toExamine() {
       var ZYH = [this.valData];
-      applyForReview({ ZYH: ZYH, status: 2 } ).then(res => {
+      applyForReview({ ZYH: ZYH, status: 2 }).then(res => {
         this.$message.success(res.msg || '申请成功');
         this.getDataExamine();
       }).catch(error => {
@@ -642,7 +659,16 @@ export default {
       this.$axios.post('/getDataExamine', { ZYH: ZYH }).then(res => {
         this.review_status = res.data.review_status ?? 0;
       })
-    }
+    },
+    handleAnimationEnd(event) {
+      if (event.animationName === 'casehidden' && !this.caseShow) {
+        // 动画结束后隐藏元素
+        this.caseShow = false;
+      }
+    },
+    handleClose() {
+      this.caseShow = false; // 关闭弹框
+    },
   }
 }
 </script>
@@ -651,19 +677,23 @@ export default {
   margin: 0;
   padding: 0 !important;
 }
+
 .nocopy {
   user-select: none;
 }
+
 .header {
   margin: 10px 20px;
   text-align: right;
   display: flex;
   justify-content: flex-end;
 }
+
 .cont_container {
   display: flex;
   justify-content: center;
 }
+
 .cont-left-tiem {
   width: 250px;
   margin: 0 0 0 15px;
@@ -672,6 +702,7 @@ export default {
   overflow-y: scroll;
   background: #ffffff;
 }
+
 .cont-left-file {
   flex: 1;
   min-height: 650px;
@@ -682,11 +713,13 @@ export default {
   border: 1px solid #e2e2e2;
   padding: 10px;
 }
+
 .li-router {
   display: inline-block;
   width: 100%;
   height: 100%;
 }
+
 .li-left-item {
   line-height: 56px;
   font-size: 14px;
@@ -698,6 +731,7 @@ export default {
   -webkit-box-sizing: border-box;
   box-sizing: border-box;
 }
+
 .li-left-itemyz {
   line-height: 56px;
   font-size: 14px;
@@ -708,6 +742,7 @@ export default {
   transition: border-color 0.3s, background-color 0.3s, color 0.3s;
   -webkit-box-sizing: border-box;
   box-sizing: border-box;
+
   .li-left-item-li {
     width: 100%;
     line-height: 36px;
@@ -717,11 +752,13 @@ export default {
     overflow: hidden;
     text-overflow: ellipsis;
   }
+
   .li-left-item-li:hover {
     outline: 0;
     background-color: #ecf5ff;
   }
 }
+
 .li-left-item:focus,
 .li-left-item:hover {
   outline: 0;
@@ -731,25 +768,31 @@ export default {
 .is-active {
   color: #409eff;
 }
+
 .dialog-box {
-  ::v-deep .el-dialog__header{
+  ::v-deep .el-dialog__header {
     padding: 10px 20px;
-    background: rgb(27,100,169);
+    background: rgb(27, 100, 169);
     color: #fff !important;
-    .el-dialog__title{
+
+    .el-dialog__title {
       color: #fff;
     }
-    .el-dialog__headerbtn{
+
+    .el-dialog__headerbtn {
       top: 14px;
     }
   }
-  ::v-deep .el-dialog__body{
+
+  ::v-deep .el-dialog__body {
     .el-form-item {
       background: #fff;
     }
-    .el-input{
+
+    .el-input {
       width: 100%;
-      input{
+
+      input {
         height: 35px;
         border: 1px solid #C0C4CC;
         border-radius: 6px;
@@ -765,46 +808,57 @@ export default {
   line-height: 1;
   padding: 10px 0;
 }
+
 .refachInput span.refachInput-text {
   padding-left: 12px;
 }
+
 .el-row--flex.is-justify-space-around {
   justify-content: flex-start;
 }
+
 .member-infobox {
   width: 100%;
 }
+
 .member-infobox .info-box-1 {
   /* display: flex;
     flex-wrap: wrap; */
   margin-top: 20px;
 }
+
 .infoBox-items {
   width: auto;
   display: flex;
   align-items: center;
   padding: 8px 0;
 }
+
 .padding-left20 {
   padding-left: 20px;
 }
+
 .padding-right20 {
   padding-right: 20px;
 }
+
 .infoBox-title {
   color: #333;
   font-size: 12px;
   font-weight: bold;
 }
+
 .infoBox-items-text {
   color: #666;
   font-size: 12px;
   padding-left: 5px;
   padding-right: 20px;
 }
+
 .title-ff0000 {
   color: #ff0000;
 }
+
 /* 高亮 */
 .choose-twinkle {
   font-size: 20px;
@@ -812,6 +866,7 @@ export default {
   font-weight: 600;
   background: yellow;
 }
+
 .table-value-look {
   padding-left: 12px;
   color: #ff0000;
@@ -842,4 +897,46 @@ export default {
 .contextmenu li:hover {
   background: #eee;
 }
+
+.case-content {
+  width: 0;
+  background-color: #fff;
+}
+
+.case-content-hidden {
+  width: 0px;
+  animation: casehidden 1.4s ease;
+  /*动画名称:loading  动画时长:1.4s  动画循环:infinite*/
+}
+
+.case-content-show {
+  width: 340px;
+  /*初始宽度*/
+  animation: caseshow 1.4s ease;
+  /*动画名称:loading  动画时长:1.4s  动画循环:infinite*/
+}
+
+@keyframes caseshow {
+  0% {
+    width: 0px;
+    /*初始宽度*/
+  }
+
+  100% {
+    width: 340px;
+    /*结束宽度*/
+  }
+}
+
+@keyframes casehidden {
+  0% {
+    width: 340px;
+    /*初始宽度*/
+  }
+
+  100% {
+    width: 0px;
+    /*结束宽度*/
+  }
+}
 </style>

+ 488 - 0
src/views/recordsRoom/qc/components/CaseQualityBox2 copy.vue

@@ -0,0 +1,488 @@
+<template>
+  <div>
+
+    <div ref="box" class="box22" :style="{width: width ? width + 'px' : '100%'}">
+
+      <div class="score-box" :class="scoreLevel == '甲'? 'scoreLevel_1' : ( scoreLevel == '乙'?'scoreLevel_2': (scoreLevel == '丙'?'scoreLevel_3':'' ) ) ">
+        <div>病案评分<span class="score-f">{{ data.score  }}分</span></div>
+        <!-- <h2 class="score-dj">{{ scoreLevel }}</h2> -->
+      </div>
+      <el-scrollbar ref="scrollRef" class="scrollBox" :style="`height: ${scrollHeight};padding-bottom:60px;`">
+        <template v-for="(item, index) in tableData">
+          <div class="list-box box-card" :key="index" v-if="is_show && !item.appeal_status && item.is_appeal == 1">
+            <div class="list-score-tips-box">
+              <div class="list-left-score" :class=" item.level == 1 ? 'hover-1' : 'hover-2' ">
+                <div> {{ item.level == 1? '必改':'建议' }} </div>
+                <div>-{{ item.score }}</div>
+              </div>
+              <div class="list-right-tips">
+                <div><span class="font-size12 title-color">字段:</span><span class="font-size12">{{ item.category }}</span></div>
+                <div class="notice-box"><span class="font-size12 title-color">提示:</span><span class="font-size12">{{ item.notice }}</span></div>
+              </div>
+            </div>
+            <div class="list-basis-box">
+              <div class="list-basis-title" @click="clickListItem(index)">
+                <span>质控依据</span>
+                <span> >> </span>
+                <el-image class="typeImg" v-if="item.is_ai" :src="require('../../../../assets/images/jiqiren.png')" fit="contain">
+                </el-image>
+                <el-image v-else class="typeImg" :src="require('../../../../assets/images/kefu.png')" fit="contain">
+                </el-image>
+              </div>
+              <div class="list-basis-text">
+                <div class="list-basis-text-t" :class="item.show?'show':''">
+                  <div v-for="(yItem, yIndex) of item.basis" :key="yIndex" style="margin-bottom: 10px;">
+                    <div>
+                      <span class="span-index">{{ yIndex+1 }}</span>
+                      <span>
+                        <span v-for="(cItem, cIndex) of yItem" :key="cIndex" style="font-size: 12px;">{{ cItem }}</span>
+                      </span>
+                    </div>
+                  </div>
+                </div>
+                
+                <div class="list-basis-bottom-box">
+                  <div class="list-basis-bottom-tips">
+                    <el-tooltip class="appeal-status-box" effect="dark" :content="item.reject_content" placement="top">
+                      <el-button type="primary" class="appeal-status-1" v-if="item.appeal_status == 1">通过</el-button>
+                      <el-button type="danger" class="appeal-status-2"  v-if="item.appeal_status == 2">驳回</el-button>
+                    </el-tooltip>
+                  </div>
+                  <div class="list-basis-bottom-btn">
+                    <el-button type="primary" @click="clickAppeal( item,index,1 )">通过</el-button>
+                    <el-button @click="clickAppeal( item,index,2 )">驳回</el-button>
+                  </div>
+                </div>
+              </div>
+              
+            </div>
+            
+          </div>
+        </template>
+      </el-scrollbar>
+    </div>
+  </div>
+
+</template>
+
+<script>
+  export default {
+    props: {
+      data: {
+        type: Object,
+        default() {
+          return {
+            data: {}
+          }
+        }
+      },
+      type:{
+        type: String,
+        default() {
+          return ''
+        }
+      },
+      height: {
+        type: Number,
+        default() {
+          return 0
+        }
+      },
+      width: {
+        type: Number,
+        default() {
+          return 0
+        }
+      }
+    },
+    data(){
+      return {
+        tableData: [],
+        is_show: true,
+        appeal_document: '',
+        appeal_docter: ''
+      }
+    },
+    computed: {
+      scoreLevel() {
+        /**
+         * 甲>90分
+         * 乙75-90分
+         * 丙<75分
+         * */ 
+        let str
+        const { score } = this.data
+        console.log(score)
+        if (score > 90) {
+          str = '甲'
+        } else if (score < 75) {
+          str = '丙'
+        } else if ( score <= 90 && score >= 75 ) {
+          str = '乙'
+        }
+        return str
+      },
+      scrollHeight() {
+        // if (this.height) {
+        //   return (this.height - 214)+'px'
+        // } else {
+        //   return `calc(100vh - 314px)`
+        // }
+        return `100%`
+      }
+    },
+    created(){
+      this.getTableData();
+    },
+    methods: {
+      editSubmit(e){
+        let that = this;
+        console.log(e);
+        let tableData = this.tableData;
+        let index = e;
+        setTimeout( () =>{
+          tableData.splice(index,1);
+          that.tableData = tableData;
+        },2000)
+      },
+      getTableData(){
+        let data = this.data.data;
+        console.log(data)
+
+        for(let i=0; i<data.length; i++) {
+          data[i].show = true;
+        }
+        this.tableData = data;
+        this.appeal_document = this.data.appeal_document;
+        this.appeal_docter = this.data.appeal_docter;
+      },
+      onScroll(index) {
+        const el = this.$el.querySelector(`.category${index}`);
+        const node = el.parentNode.parentNode.parentNode
+        this.$refs["scrollRef"].wrap.scrollTop = node.offsetTop;
+      },
+      hightRight(hightKeyWord, bllb, zyh) {
+        this.$emit('hightRight',hightKeyWord,bllb,zyh)
+      },
+      clickListItem(idx){
+        let tableData = this.tableData;
+        tableData[idx].show = !tableData[idx].show;
+        this.is_show = false;
+        this.$nextTick( () =>{
+          this.tableData = tableData; 
+          this.is_show = true;
+        })
+        console.log(tableData)
+
+      },
+      // 点击通过、驳回按钮
+      clickAppeal(i,idx,type){
+        let that = this;
+        let item = i;
+        let index = idx;
+        let params = {
+          id: item.id, // 质控错误结果的数据ID
+          status: type,
+          case_document: that.appeal_document, //申诉科室名称
+          case_docter: that.appeal_docter,  // 申诉医生名称
+          index,
+        }
+        that.$emit('clickAppealBtn',params);
+      }
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+::v-deep .el-scrollbar__wrap {
+  overflow-x: hidden;
+}
+::v-deep .el-divider--horizontal {
+  margin: 10px 0;
+}
+
+
+.box22 {
+  padding: 16px;
+  background: #FFFFFF;
+  border-radius: 5px;
+  height: 100vh;
+  .score-box{
+    width: 100%;
+    margin-bottom: 16px;
+    padding: 30px 50px 30px 20px;
+    border-radius: 4px;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    color: #fff;
+    div{
+      font-size: 20px;
+    }
+    .score-f{
+      padding-left: 20px;
+      font-size: 20px;
+    }
+    .score-dj,.score-f{
+      font-weight: bold;
+    }
+  }
+  .score-box.scoreLevel_1{
+    background: rgb(11, 133, 63);
+    background-image: url('../../../../assets/images/icon-jia.png');
+    background-repeat: no-repeat;
+    background-size: 60px 52px;
+    background-position:80% 50%;
+  }
+  .score-box.scoreLevel_2{
+    background: rgb(152, 112, 20);
+    background-image: url('../../../../assets/images/icon-yi.png');
+    background-repeat: no-repeat;
+    background-size: 60px 52px;
+    background-position:80% 50%;
+  }
+  .score-box.scoreLevel_3{
+    background: rgb(199, 54, 13);
+    background-image: url('../../../../assets/images/icon-bing.png');
+    background-repeat: no-repeat;
+    background-size: 60px 52px;
+    background-position:80% 50%;
+  }
+  .card-box {
+    // height: 175px;
+    // background: #FFFFFF;
+    // border: 1px solid #E2E2E2;
+    background: #f1f5fe;
+    padding: 10px;
+    box-sizing: border-box;
+    margin-bottom: 14px;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    .title {
+      font-size: 12px;
+      font-family: PingFang-SC-Bold, PingFang-SC;
+      // font-weight: bold;
+      color: #333333;
+      line-height: 22px;
+      // span {
+      //   margin-left: 7px;
+      // }
+    }
+    .card-icon-btn{
+      width: auto;
+      padding: 4px 8px;
+      border-radius: 4px;
+      background: rgb(254, 240, 240);
+      color: rgb(245, 128, 140);
+      border: 1px solid rgb(245, 128, 140);
+      font-size: 10px;
+    }
+    .title2 {
+      font-size: 14px;
+      font-family: PingFang-SC-Bold, PingFang-SC;
+      // font-weight: bold;
+      color: #333333;
+      line-height: 26px;
+      cursor: pointer;
+      span {
+        margin-left: 7px;
+      }
+    }
+    .error {
+      color: #D81E06;
+    }
+  }
+  .box-card {
+    margin-bottom: 10px;
+    position: relative;
+    background: rgb(241, 245, 254);
+    .category {
+      font-family: PingFangSC-Semibold, PingFang SC;
+      font-weight: bold;
+      color: #333333;
+    }
+    .koufen {
+      font-weight: bold;
+      vertical-align: middle;
+      margin-left: 16px;
+    }
+    .typeImg {
+      width: 53px;
+      height: 53px;
+      position: absolute;
+      top: 12px;
+      right: 12px;
+      z-index: 999;
+    }
+  }
+
+  .box-card .el-table ::v-deep tr{
+    background: transparent;
+  }
+  ::v-deep .el-table__row {
+    background: #185DA6 !important;
+    color: #FFFFFF;
+    .el-icon-arrow-right {
+      color: #FFFFFF;
+    }
+  }
+  ::v-deep .el-descriptions__body{
+    background: transparent;
+  }
+  ::v-deep .el-table tr{
+    background: transparent;
+  }
+  ::v-deep .el-table--enable-row-hover .el-table__body tr:hover>td.el-table__cell {
+    background: #185DA6;
+  }
+  ::v-deep .el-table_1_column_1 {
+    border-radius: 8px 0 0 8px;
+  }
+  ::v-deep .el-table_1_column_2 {
+    border-radius: 0 8px 8px 0;
+    font-weight: bold;
+  }
+  ::v-deep .el-descriptions-item__label {
+    font-family: PingFang-SC-Bold, PingFang-SC;
+    font-weight: bold;
+    color: #333333;
+  }
+}
+.span-index{
+  width: 20px;
+  height: 20px;
+  line-height: 20px;
+  text-align: center;
+  display: inline-block;
+  border-radius: 50%;
+  background: #185DA6;
+  color: #fff;
+  margin-right: 10px;
+  margin-bottom: 4px;
+  font-size: 12px;
+}
+
+::v-deep .el-table .el-table__row td {
+  color: #fff;
+}
+::v-deep .el-tag{
+  height: auto;
+  line-height: 22px;
+}
+// =================   2024-07-27 新样式  ↓  ===============
+.font-size12{
+  font-size: 12px;
+}
+.list-box{
+  width: 100%;
+  padding: 10px 0;
+  .title-color{
+    color: rgba(27,100,176,1);
+    font-weight: bold;
+  }
+  .list-score-tips-box{
+    width: 100%;
+    display: flex;
+    .list-left-score{
+      width: 70px;
+      text-align: center;
+      font-size: 20px;
+      font-weight: 700;
+      position: relative;
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+      justify-content: center;
+      padding: 10px 0;
+      &.hover-1{
+        background: rgb(254, 240, 240);
+        color: rgb(238, 14, 14);
+        border-right: 3px solid rgb(238, 14, 14);
+      }
+      &.hover-2{
+        background: rgb(236, 245, 255);
+        color: rgb(52, 140, 235);
+        border-right: 3px solid rgb(52, 140, 235);
+      }
+      &>div{
+        font-size: 20px;
+      }
+    }
+    .list-right-tips{
+      flex: 1;
+      font-size: 12px;
+      padding-left: 10px;
+      .notice-box{
+        margin-top: 8px;
+      }
+    }
+  }
+  .list-basis-box{
+    .list-basis-title{
+      padding: 10px 0 10px 10px;
+      position: relative;
+      &>span{
+        font-size: 12px;
+        color: rgba(27,100,176,1);
+        font-weight: bold;
+      }
+      .typeImg {
+        width: 34px;
+        height: 34px;
+        position: absolute;
+        top: 0;
+        right: 12px;
+        z-index: 999;
+      }
+      
+    }
+    .list-basis-text {
+      height: auto;
+      .list-basis-text-t{
+        height: 0;
+        overflow: hidden;
+        position: relative;
+        &.show{
+          height: auto;
+          padding: 10px 0 10px 10px;
+        }
+      }
+    }
+    .list-basis-bottom-box{
+      margin-top: 14px;
+      width: 100%;
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      .list-basis-bottom-tips{
+        flex: 1;
+        &::v-deep .el-button{
+          padding: 0;
+          font-size: 12px;
+          width: 40px;
+          height: 40px;
+          border-radius: 50%;
+          &>span{
+            font-size: 12px;
+          }
+        }
+      }
+      .list-basis-bottom-btn{
+        width: auto;
+        &::v-deep .el-button{
+          padding: 6px 14px;
+        }
+        &::v-deep .el-button--primary,&::v-deep .el-button--primary:focus,&::v-deep .el-button--primary:hover{
+          background: #185DA6;
+          border-color: #185DA6;
+        }
+      }
+    }
+
+    
+
+  }
+}
+
+</style>

+ 1328 - 384
src/views/recordsRoom/qc/components/CaseQualityBox2.vue

@@ -1,488 +1,1432 @@
 <template>
-  <div>
-
-    <div ref="box" class="box22" :style="{width: width ? width + 'px' : '100%'}">
-
-      <div class="score-box" :class="scoreLevel == '甲'? 'scoreLevel_1' : ( scoreLevel == '乙'?'scoreLevel_2': (scoreLevel == '丙'?'scoreLevel_3':'' ) ) ">
-        <div>病案评分<span class="score-f">{{ data.score  }}分</span></div>
-        <!-- <h2 class="score-dj">{{ scoreLevel }}</h2> -->
+  <div class="content">
+    <!-- 标题 -->
+    <div class="title-content">
+      <div class="title-contentIcon">
+        <el-image class="zsIcon" :src="require('../../../../assets/images/zsicon.png')" fit="contain"></el-image>
+        病历智审结果
       </div>
-      <el-scrollbar ref="scrollRef" class="scrollBox" :style="`height: ${scrollHeight};padding-bottom:60px;`">
-        <template v-for="(item, index) in tableData">
-          <div class="list-box box-card" :key="index" v-if="is_show && !item.appeal_status && item.is_appeal == 1">
-            <div class="list-score-tips-box">
-              <div class="list-left-score" :class=" item.level == 1 ? 'hover-1' : 'hover-2' ">
-                <div> {{ item.level == 1? '必改':'建议' }} </div>
-                <div>-{{ item.score }}</div>
+      <i class="el-icon-close" @click="closeClick"></i>
+    </div>
+    <!-- tab选项卡 -->
+    <el-tabs v-model="activeName" :stretch="true">
+      <el-tab-pane v-for="item in tabList" :key="item.name" :label="item.label" :name="item.name">
+        <span slot="label">
+          {{ item.label }}
+          <span v-if="item.hasMessage && item.medical && item.medical !== '0'" class="dot">{{ item.medical }}</span>
+        </span>
+        <template>
+          <!-- 病案首页 -->
+          <div class="first-content" v-if="item.name === 'first'">
+            <div class="score-box score-box_bl" :class="{
+              scoreLevel_1_1: scoreLevel_ylzc == '优',
+              scoreLevel_2_2: scoreLevel_ylzc == '良',
+              scoreLevel_3_3: scoreLevel_ylzc == '中',
+              scoreLevel_4_4: scoreLevel_ylzc == '差',
+            }">
+              <span>首页评分</span>
+              <span class="score">{{ controls.score.score }}</span>
+              <el-image v-if="scoreLevel_ylzc == '优'" class="level" style="width: 47px; height: 41px"
+                :src="require('../../../../assets/images/you.png')" fit="contain"></el-image>
+              <el-image v-if="scoreLevel_ylzc == '良'" class="level" style="width: 47px; height: 41px"
+                :src="require('../../../../assets/images/liang.png')" fit="contain"></el-image>
+              <el-image v-if="scoreLevel_ylzc == '中'" class="level" style="width: 47px; height: 41px"
+                :src="require('../../../../assets/images/zhong.png')" fit="contain"></el-image>
+              <el-image v-if="scoreLevel_ylzc == '差'" class="level" style="width: 47px; height: 41px"
+                :src="require('../../../../assets/images/cha.png')" fit="contain"></el-image>
+            </div>
+            <div class="legend-box">
+              <span class="qz">强制</span>
+              <span class="jy">建议</span>
+            </div>
+            <div class="suggest-content" v-for="(items, index) in resultsList.list" :key="index">
+              <div class="cont-reight-bottom" @click="toJump(items.basis[0], items, index)">
+                <div :class="items.level == 1 ? 'cont-reight-bottom-title-null' : 'cont-reight-bottom-title'">
+                  <span v-if="items.category == 0">A类</span>
+                  <span v-if="items.category == 1">B类</span>
+                  <span v-if="items.category == 2">C类</span>
+                  <span v-if="items.category == 3">D类</span>
+                  <span v-if="items.category == 4">其他</span>
+                  <span>-{{ items.down }}</span>
+                </div>
+                <div class="cont-reight-bottom-conter">
+                  <div class="cont-reight-bottom-conter-flex">
+                    <p>
+                      <span class="bold">字段:</span>
+                      {{ items.error_name }}
+                    </p>
+                    <el-image class="zsIcon" v-if="items.is_artificial == 1"
+                      :src="require('../../../../assets/images/zsicon.png')" fit="contain"></el-image>
+                    <el-image class="ysIcon" v-if="items.is_artificial == 0"
+                      :src="require('../../../../assets/images/ysicon.png')" fit="contain"></el-image>
+                  </div>
+                  <p>
+                    <span class="bold">提示:</span>
+                    {{ items.desc }}
+                  </p>
+                </div>
               </div>
-              <div class="list-right-tips">
-                <div><span class="font-size12 title-color">字段:</span><span class="font-size12">{{ item.category }}</span></div>
-                <div class="notice-box"><span class="font-size12 title-color">提示:</span><span class="font-size12">{{ item.notice }}</span></div>
+              <div class="btn-content">
+                <div v-if="items.type === 3" class="rebuttal" @click="fetchAppealInfo('appeal', items, 3, MEDRECID)">驳回
+                </div>
+                <div class="btn-right">
+                  <div v-if="items.type === 0" class="appeal" @click="openAppealDialog('reject', items, 2)">申诉</div>
+                  <div v-if="items.type === 0 || items.type === 3" @click="handleIgnore(items, MED_REC_ID, 3)"
+                    class="ignore">忽略</div>
+                  <div v-if="items.type === 2" class="appeal_in_progress">申诉中</div>
+                </div>
               </div>
+              <div class="hz"></div>
             </div>
-            <div class="list-basis-box">
-              <div class="list-basis-title" @click="clickListItem(index)">
-                <span>质控依据</span>
-                <span> >> </span>
-                <el-image class="typeImg" v-if="item.is_ai" :src="require('../../../../assets/images/jiqiren.png')" fit="contain">
-                </el-image>
-                <el-image v-else class="typeImg" :src="require('../../../../assets/images/kefu.png')" fit="contain">
-                </el-image>
-              </div>
-              <div class="list-basis-text">
-                <div class="list-basis-text-t" :class="item.show?'show':''">
-                  <div v-for="(yItem, yIndex) of item.basis" :key="yIndex" style="margin-bottom: 10px;">
-                    <div>
-                      <span class="span-index">{{ yIndex+1 }}</span>
-                      <span>
-                        <span v-for="(cItem, cIndex) of yItem" :key="cIndex" style="font-size: 12px;">{{ cItem }}</span>
-                      </span>
-                    </div>
+          </div>
+          <!-- 编码员 -->
+          <div class="first-content" v-if="item.name === 'third'">
+            <div class="score-box score-box_bl" :class="{
+              scoreLevel_1_1: scoreLevel_ylzc == '优',
+              scoreLevel_2_2: scoreLevel_ylzc == '良',
+              scoreLevel_3_3: scoreLevel_ylzc == '中',
+              scoreLevel_4_4: scoreLevel_ylzc == '差',
+            }">
+              <span>首页评分</span>
+              <span class="score">{{ controls.score.score }}</span>
+              <el-image v-if="scoreLevel_ylzc == '优'" class="level" style="width: 47px; height: 41px"
+                :src="require('../../../../assets/images/you.png')" fit="contain"></el-image>
+              <el-image v-if="scoreLevel_ylzc == '良'" class="level" style="width: 47px; height: 41px"
+                :src="require('../../../../assets/images/liang.png')" fit="contain"></el-image>
+              <el-image v-if="scoreLevel_ylzc == '中'" class="level" style="width: 47px; height: 41px"
+                :src="require('../../../../assets/images/zhong.png')" fit="contain"></el-image>
+              <el-image v-if="scoreLevel_ylzc == '差'" class="level" style="width: 47px; height: 41px"
+                :src="require('../../../../assets/images/cha.png')" fit="contain"></el-image>
+            </div>
+            <div class="legend-box">
+              <span class="qz">强制</span>
+              <span class="jy">建议</span>
+            </div>
+            <div class="suggest-content" v-for="(items, index) in controls.list" :key="index">
+              <div class="cont-reight-bottom" @click="toJump(items.basis[0], items, index)">
+                <div :class="items.level == 1 ? 'cont-reight-bottom-title-null' : 'cont-reight-bottom-title'">
+                  <span v-if="items.category == 0">A类</span>
+                  <span v-if="items.category == 1">B类</span>
+                  <span v-if="items.category == 2">C类</span>
+                  <span v-if="items.category == 3">D类</span>
+                  <span v-if="items.category == 4">其他</span>
+                  <span>-{{ items.down }}</span>
+                </div>
+                <div class="cont-reight-bottom-conter">
+                  <div class="cont-reight-bottom-conter-flex">
+                    <p>
+                      <span class="bold">字段:</span>
+                      {{ items.field_name }}
+                    </p>
+                    <!-- <el-image class="zsIcon" :src="require('../../../../assets/images/zsicon.png')"
+                      fit="contain"></el-image> -->
+                    <el-image class="zsIcon" v-if="items.is_artificial == 1"
+                      :src="require('../../../../assets/images/zsicon.png')" fit="contain"></el-image>
+                    <el-image class="ysIcon" v-if="items.is_artificial == 0"
+                      :src="require('../../../../assets/images/ysicon.png')" fit="contain"></el-image>
                   </div>
+                  <p>
+                    <span class="bold">提示:</span>
+                    {{ items.desc }}
+                  </p>
+                </div>
+              </div>
+              <div class="btn-content">
+                <div v-if="items.type === 3" class="rebuttal" @click="fetchAppealInfo('appeal', items, 3, MEDRECID)">驳回
+                </div>
+                <div class="btn-right">
+                  <div v-if="items.type === 0" class="appeal" @click="openAppealDialog('reject', items, 2)">申诉</div>
+                  <div v-if="items.type === 0 || items.type === 3" @click="handleIgnore(items, MED_REC_ID, 3)"
+                    class="ignore">忽略</div>
+                  <div v-if="items.type === 2" class="appeal_in_progress">申诉中</div>
+                </div>
+              </div>
+              <div class="hz"></div>
+            </div>
+          </div>
+          <!-- 住院病历 -->
+          <div class="second-content" v-if="item.name === 'second'">
+            <div class="score-box"
+              :class="scoreLevel == '甲' ? 'scoreLevel_1' : scoreLevel == '乙' ? 'scoreLevel_2' : scoreLevel == '丙' ? 'scoreLevel_3' : ''">
+              <span style="margin-top: -10px">
+                病案评分
+                <span class="score-f">{{ data.score }}</span>
+              </span>
+            </div>
+            <div class="suggest-content" v-for="(items, index) in medicalRecord" :key="index">
+              <div class="cont-reight-bottom">
+                <div class="list-left-score" :class="items.level == 1 ? 'hover-1' : 'hover-2'">
+                  <div>{{ items.level == 1 ? '必改' : '建议' }}</div>
+                  <div>-{{ items.score }}</div>
                 </div>
-                
-                <div class="list-basis-bottom-box">
-                  <div class="list-basis-bottom-tips">
-                    <el-tooltip class="appeal-status-box" effect="dark" :content="item.reject_content" placement="top">
-                      <el-button type="primary" class="appeal-status-1" v-if="item.appeal_status == 1">通过</el-button>
-                      <el-button type="danger" class="appeal-status-2"  v-if="item.appeal_status == 2">驳回</el-button>
-                    </el-tooltip>
+                <div class="cont-reight-bottom-conter">
+                  <div class="cont-reight-bottom-conter-flex">
+                    <p>
+                      <span class="bold">字段:</span>
+                      {{ items.error_field }}
+                    </p>
+                    <el-image class="zsIcon" v-if="items.is_artificial == 1"
+                      :src="require('../../../../assets/images/zsicon.png')" fit="contain"></el-image>
+                    <el-image class="ysIcon" v-if="items.is_artificial == 0"
+                      :src="require('../../../../assets/images/ysicon.png')" fit="contain"></el-image>
                   </div>
-                  <div class="list-basis-bottom-btn">
-                    <el-button type="primary" @click="clickAppeal( item,index,1 )">通过</el-button>
-                    <el-button @click="clickAppeal( item,index,2 )">驳回</el-button>
+                  <p>
+                    <span class="bold">提示:</span>
+                    {{ items.notice }}
+                  </p>
+                </div>
+              </div>
+              <div class="gist" @click="clickListItem(index)">
+                <div class="gist-zkyj">质控依据&gt;&gt;</div>
+              </div>
+              <div class="gist-center">
+                {{ items.basis.length ? items.basis[0].desc : '' }}
+              </div>
+              <div class="btn-content">
+                <div v-if="items.appeal_type === 3" class="rebuttal"
+                  @click="fetchAppealInfo('appeal', items, 3, MEDRECID)">驳回
+                </div>
+                <div class="btn-right">
+                  <div v-if="items.appeal_type === 0" class="appeal" @click="openAppealDialog('reject', items, 2)">申诉
                   </div>
+                  <div v-if="items.appeal_type === 0 || items.appeal_type === 3"
+                    @click="handleIgnore(items, MED_REC_ID, 3)" class="ignore">忽略</div>
+                  <div v-if="items.appeal_type === 2" class="appeal_in_progress">申诉中</div>
                 </div>
               </div>
-              
+              <div class="hz"></div>
             </div>
-            
           </div>
         </template>
-      </el-scrollbar>
-    </div>
+      </el-tab-pane>
+    </el-tabs>
+    <el-dialog :visible.sync="dialogVisible" custom-class="my-dialog" :modal="false" :title="dialogTitle" width="40%">
+      <div class="medical-record" style="margin-top: 30px">
+        <el-descriptions>
+          <el-descriptions-item label="病案号">{{ MED_REC_ID }}</el-descriptions-item>
+          <el-descriptions-item label="床号">{{ CWH }}</el-descriptions-item>
+          <el-descriptions-item label="住院次数">{{ AAA29 }}</el-descriptions-item>
+        </el-descriptions>
+      </div>
+      <div class="reason" style="margin-top: 20px">
+        <el-form :model="appealForm" :rules="appealRules" ref="appealFormRef" label-width="80px">
+          <el-form-item :label="formLabels.doctor" prop="doctor">
+            <el-input v-model="appealForm.doctor" :placeholder="formPlaceholders.doctor"
+              :disabled="dialogType === 'appeal'"></el-input>
+          </el-form-item>
+          <el-form-item :label="formLabels.reason" prop="reason">
+            <el-input type="textarea" v-model="appealForm.reason" :placeholder="formPlaceholders.reason"
+              :disabled="dialogType === 'appeal'" :rows="2"></el-input>
+          </el-form-item>
+        </el-form>
+      </div>
+      <div class="cont-reight-bottom-conter" style="color: #606266 !important">
+        <p>
+          <span class="bold" style="color: #606266 !important">字段:</span>
+          {{ zd_field_name }}
+        </p>
+        <p style="margin-top: 10px">
+          <span class="bold" style="color: #606266 !important">提示:</span>
+          {{ ts_desc }}
+        </p>
+      </div>
+      <template #footer>
+        <el-button type="primary" @click="submitAppeal(MED_REC_ID)">{{ buttonText }}</el-button>
+      </template>
+    </el-dialog>
   </div>
-
 </template>
 
 <script>
-  export default {
-    props: {
+import { examineAppeal, getCaseQualityBazb, getNumberInfo,getAppealData } from '@/api/qc';
+export default {
+  props: {
+    caseShow: {
+      type: Boolean,
+      required: true,
+    },
+    resultsList: {
+      type: Object,
+      default() {
+        return {
+          list: [],
+        };
+      },
+    },
+    MED_REC_ID: {
+      type: [String, Number], // 根据实际类型定义
+      required: true, // 是否必传
+    },
+    CWH: {
+      type: [String, Number], // 根据实际类型定义
+      required: true,
+    },
+    AAA29: {
+      type: [String, Number], // 根据实际类型定义
+      required: true,
+    },
+  },
+  data() {
+    return {
+      activeName: 'first',
+      tabList: [
+        {
+          label: '病案首页',
+          name: 'first',
+          hasMessage: true,
+          medical: '',
+        },
+        {
+          label: '住院病历',
+          name: 'second',
+          hasMessage: true,
+          medical: '',
+        },
+        {
+          label: '编码员',
+          name: 'third',
+          hasMessage: false,
+        },
+      ],
+      dialogVisible: false,
+      dialogType: '',
+      dialogTitle: '',
+      appealForm: {
+        reason: '',
+        phone: '',
+      },
+      appealRules: {
+        doctor: [{ required: true, message: '请输入医师姓名及工号', trigger: 'blur' }],
+        reason: [{ required: true, message: '请输入原因', trigger: 'blur' }],
+      },
+      formLabels: {
+        reason: '', // 动态设置
+        doctor: '', // 动态设置
+      },
+      formPlaceholders: {
+        reason: '', // 动态设置
+        doctor: '', // 动态设置
+      },
+      localCaseShow: this.caseShow,
       data: {
-        type: Object,
-        default() {
-          return {
-            data: {}
-          }
-        }
+        score: 95, // 示例数据
+        data: [], // 示例数据
       },
-      type:{
-        type: String,
-        default() {
-          return ''
-        }
+      tableData: [], // 初始化 tableData
+      resultsData: [],
+      value1: null, // 初始化 value1
+      is_show: true,
+      appeal_document: '',
+      appeal_docter: '',
+      controls: {
+        ZYH: '',
+        score: {
+          score: 100,
+        },
+        list: [],
       },
-      height: {
-        type: Number,
-        default() {
-          return 0
-        }
+      zkcodeIndex: 0,
+      zk_codes: {
+        qz: [],
+        jy: [],
       },
-      width: {
-        type: Number,
-        default() {
-          return 0
-        }
+      active_zk_index: 0,
+      currentId: '',
+      MEDRECID: '',
+      caseHistory: [],
+      medicalRecord: [],
+      messageStatus: {
+        first: true,
+        second: false,
+        third: false,
+      },
+      medical: null,
+      errorV2: null,
+      buttonText: '提交',
+      zd_field_name: '',
+      ts_desc: '',
+      cate_type: '',
+      ssIndex: '',
+      savedItems: null,
+      savedIndex: null
+    };
+  },
+  computed: {
+    scoreLevel() {
+      /**
+       * 甲>90分
+       * 乙75-90分
+       * 丙<75分
+       * */
+      let str;
+      const { score } = this.data;
+      console.log(score, 'score12');
+
+      if (score > 90) {
+        str = '甲';
+      } else if (score < 75) {
+        str = '丙';
+      } else {
+        str = '乙';
       }
+      return str;
+    },
+    scrollHeight() {
+      return `100%`;
     },
-    data(){
-      return {
-        tableData: [],
-        is_show: true,
-        appeal_document: '',
-        appeal_docter: ''
+    scoreLevel_ylzc() {
+      /**
+       * 优>=97分
+       * 良90-96分
+       * 中75~89分
+       * 差<75分
+       * */
+      let str;
+      const { score } = this.controls.score;
+
+      if (score >= 97) {
+        str = '优';
+      } else if (score < 97 && score >= 90) {
+        str = '良';
+      } else if (score < 90 && score >= 75) {
+        str = '中';
+      } else {
+        str = '差';
       }
+      return str;
     },
-    computed: {
-      scoreLevel() {
-        /**
-         * 甲>90分
-         * 乙75-90分
-         * 丙<75分
-         * */ 
-        let str
-        const { score } = this.data
-        console.log(score)
-        if (score > 90) {
-          str = '甲'
-        } else if (score < 75) {
-          str = '丙'
-        } else if ( score <= 90 && score >= 75 ) {
-          str = '乙'
-        }
-        return str
-      },
-      scrollHeight() {
-        // if (this.height) {
-        //   return (this.height - 214)+'px'
-        // } else {
-        //   return `calc(100vh - 314px)`
-        // }
-        return `100%`
+  },
+  watch: {
+    MED_REC_ID(newVal) {
+      if (newVal) {
+        this.MEDRECID = newVal;
+        console.log('MED_REC_ID 已更新:', newVal);
+        this.qualityBazb(newVal);
+        this.getData(newVal);
       }
     },
-    created(){
-      this.getTableData();
+  },
+  created() {
+    getNumberInfo().then(res => {
+      this.medical = res.data.medicalRecord;
+      this.errorV2 = res.data.errorV2;
+      this.tabList[0].medical = this.medical;
+      this.tabList[1].medical = this.errorV2;
+    });
+  },
+  mounted() {
+    this.getTableData();
+    this.controlData.ZYH = this.$route.query.ZYH;
+  },
+  methods: {
+    hasMessage(tabName) {
+      return this.messageStatus[tabName];
     },
-    methods: {
-      editSubmit(e){
-        let that = this;
-        console.log(e);
-        let tableData = this.tableData;
-        let index = e;
-        setTimeout( () =>{
-          tableData.splice(index,1);
-          that.tableData = tableData;
-        },2000)
-      },
-      getTableData(){
-        let data = this.data.data;
-        console.log(data)
+    // 跳转锚点及高亮
+    toJump(item, pItem, pIndex) {
+      if (this.active_zk_index !== pIndex) {
+        this.zkcodeIndex = 0;
+        this.active_zk_index = pIndex;
+      }
+      const { user, zd, ss } = item.location;
+      const arr = [];
+      const { level } = pItem;
+      const level_arr = {
+        qz: [],
+        jy: [],
+      };
+      if (user && user.length) {
+        user.map(uItem => {
+          const obj = {
+            field: uItem,
+            key: 'user',
+          };
+          arr.push(obj);
 
-        for(let i=0; i<data.length; i++) {
-          data[i].show = true;
+          if (level) {
+            // 建议
+            level_arr.jy.push(uItem);
+          } else {
+            // 强制
+            level_arr.qz.push(uItem);
+          }
+        });
+      }
+
+      if (zd && zd.length) {
+        zd.map(zItem => {
+          zItem.key = 'zd';
+          arr.push(zItem);
+
+          var index;
+          if (zItem.ZZPB) {
+            index = 0;
+          } else {
+            index = zItem.DIA_ORDER;
+          }
+          if (level) {
+            // 建议
+            level_arr.jy.push(`zd-${index}-${zItem.field}`);
+          } else {
+            // 强制
+            level_arr.qz.push(`zd-${index}-${zItem.field}`);
+          }
+        });
+      }
+      if (ss && ss.length) {
+        ss.map(sItem => {
+          sItem.key = 'ss';
+          arr.push(sItem);
+
+          var index;
+          if (sItem.ZZPB) {
+            index = 0;
+          } else {
+            index = sItem.OPE_ORDER;
+          }
+          if (level) {
+            // 建议
+            level_arr.jy.push(`ss-${index}-${sItem.field}`);
+          } else {
+            // 强制
+            level_arr.qz.push(`ss-${index}-${sItem.field}`);
+          }
+        });
+      }
+      const maxIndex = arr.length - 1;
+      this.$emit('zk', { level: 0, anchor: arr[this.zkcodeIndex], codes: level_arr });
+      if (this.zkcodeIndex === maxIndex) {
+        this.zkcodeIndex = 0;
+      } else {
+        this.zkcodeIndex++;
+      }
+    },
+    // 获取编码员数据
+    getData(newVal) {
+      const params = {
+        ZYH: newVal,
+      };
+      this.$axios.post('/home_bmy_quality/bmyQualityResult', params).then(res => {
+        console.log('编码员数据', res.data);
+        const { qz, jy } = res.data;
+        const list = [...qz, ...jy];
+        this.$set(this, 'controls', { ...res.data, list });
+
+        list.map(item => {
+          item.basis.map(bItem => {
+            const { user, zd, ss } = bItem.location;
+            if (user && user.length) {
+              user.map(uItem => {
+                if (item.level) {
+                  // 建议
+                  this.zk_codes.jy.push(uItem);
+                } else {
+                  // 强制
+                  this.zk_codes.qz.push(uItem);
+                }
+              });
+            }
+            if (zd && zd.length) {
+              zd.map(zItem => {
+                var index;
+                if (zItem.ZZPB) {
+                  index = 0;
+                } else {
+                  index = zItem.DIA_ORDER;
+                }
+                if (item.level) {
+                  // 建议
+                  this.zk_codes.jy.push(`zd-${index}-${zItem.field}`);
+                } else {
+                  // 强制
+                  this.zk_codes.qz.push(`zd-${index}-${zItem.field}`);
+                }
+              });
+            }
+            if (ss && ss.length) {
+              ss.map(sItem => {
+                var index;
+                if (sItem.ZZPB) {
+                  index = 0;
+                } else {
+                  index = sItem.OPE_ORDER;
+                }
+                if (item.level) {
+                  // 建议
+                  this.zk_codes.jy.push(`ss-${index}-${sItem.field}`);
+                } else {
+                  // 强制
+                  this.zk_codes.qz.push(`ss-${index}-${sItem.field}`);
+                }
+              });
+            }
+          });
+        });
+        this.$emit('codes', this.zk_codes);
+      });
+    },
+    openAppealDialog(type, items, index) {
+      console.log(items, index, 'items');
+      this.zd_field_name = items.error_name || items.field_name || items.error_field;
+      this.ts_desc = items.notice || items.error_name || items.desc;
+      this.cate_type = items.cate;
+      this.dialogType = type;
+      this.currentId = items.error_rule || items.rule_id;
+      this.ssIndex = index;
+      this.savedItems = items;
+      this.savedIndex = index;
+
+      if (type === 'reject') {
+        this.dialogTitle = '申诉';
+        this.formLabels = {
+          doctor: '申诉医师',
+          reason: '申诉原因',
+        };
+        this.formPlaceholders = {
+          doctor: '请输入申诉医师姓名及工号',
+          reason: '请输入申诉原因',
+        };
+        this.buttonText = '提交';
+        // 初始化 appealForm 的值
+        this.appealForm = {
+          doctor: '',
+          reason: ''
+        };
+      }
+      this.dialogVisible = true;
+    },
+    async fetchAppealInfo(type, items, index, MEDRECID) {
+      this.zd_field_name = items.error_name || items.field_name || items.error_field;
+      this.ts_desc = items.notice || items.error_name || items.desc;
+      this.savedItems = items;
+      this.savedIndex = index;
+      this.dialogType = type;
+
+      try {
+        const params = {
+          id: items.rule_id || items.error_rule,
+          cate: items.cate,
+          ZYH: MEDRECID,
+        };
+        const res = await getAppealData(params);
+        console.log(res, 'getAppealData 接口返回');
+        this.dialogVisible = true;
+
+        if (type === 'appeal') {
+          this.dialogTitle = '驳回';
+          this.formLabels = {
+            doctor: '驳回医师',
+            reason: '驳回原因',
+          };
+          this.formPlaceholders = {
+            doctor: '请输入驳回医师姓名及工号',
+            reason: '请输入驳回原因',
+          };
+          this.buttonText = '申诉';
+          this.appealForm.doctor = res.data.case_docter; // 驳回医师
+          this.appealForm.reason = res.data.reject_content; // 驳回原因
         }
-        this.tableData = data;
-        this.appeal_document = this.data.appeal_document;
-        this.appeal_docter = this.data.appeal_docter;
-      },
-      onScroll(index) {
-        const el = this.$el.querySelector(`.category${index}`);
-        const node = el.parentNode.parentNode.parentNode
-        this.$refs["scrollRef"].wrap.scrollTop = node.offsetTop;
-      },
-      hightRight(hightKeyWord, bllb, zyh) {
-        this.$emit('hightRight',hightKeyWord,bllb,zyh)
-      },
-      clickListItem(idx){
-        let tableData = this.tableData;
-        tableData[idx].show = !tableData[idx].show;
-        this.is_show = false;
-        this.$nextTick( () =>{
-          this.tableData = tableData; 
-          this.is_show = true;
-        })
-        console.log(tableData)
+        // 将接口返回的数据渲染到表单中
+      } catch (error) {
+        console.error('获取驳回信息失败:', error);
+      }
+    },
+    submitAppeal(MEDRECID) {
+      console.log(MEDRECID, this.appealForm.reason, this.appealForm.doctor, 'MEDRECID99999999');
 
-      },
-      // 点击通过、驳回按钮
-      clickAppeal(i,idx,type){
-        let that = this;
-        let item = i;
-        let index = idx;
-        let params = {
-          id: item.id, // 质控错误结果的数据ID
-          status: type,
-          case_document: that.appeal_document, //申诉科室名称
-          case_docter: that.appeal_docter,  // 申诉医生名称
-          index,
+      if (this.buttonText === '提交') {
+        // 申诉逻辑
+        const pramse = {
+          id: this.currentId,
+          describe: this.appealForm.reason, // 使用 appealForm 中的原因
+          case_docter: this.appealForm.doctor, // 使用 appealForm 中的医师
+          statusY: 1, // 申诉状态
+          type: this.cate_type,
+          cate: this.ssIndex,
+          ZYH: MEDRECID,
+        };
+        console.log(pramse, 'pramse');
+
+        examineAppeal(pramse).then(res => {
+          this.$message({
+            message: '提交申诉成功',
+            type: 'success',
+          });
+          this.qualityBazb(MEDRECID);
+        });
+        // 提交后关闭弹框
+        this.dialogVisible = false;
+      } else if (this.buttonText === '申诉') {
+        this.openAppealDialog('reject', this.savedItems, this.savedIndex);
+      }
+    },
+    handleIgnore(items, MEDRECID) {
+      const pramse = {
+        id: items.error_rule || items.rule_id,
+        type: items.appeal_type || items.type,
+        cate: items.cate,
+        ZYH: MEDRECID,
+      };
+
+      examineAppeal(pramse).then(res => {
+        this.qualityBazb(MEDRECID);
+        console.log(res, 'examineAppeal for ignore');
+        this.$message({
+          message: '忽略成功',
+          type: 'success',
+        });
+      });
+    },
+    clickListItem(idx) {
+      console.log(idx, '0000');
+
+      let tableData = this.tableData;
+      tableData[idx].show = !tableData[idx].show;
+      this.is_show = false;
+      this.$nextTick(() => {
+        this.tableData = tableData;
+        this.is_show = true;
+      });
+      console.log(tableData);
+    },
+    qualityBazb(newVal) {
+      const params = {
+        id: newVal,
+      };
+      getCaseQualityBazb(params).then(res => {
+        if (res && res.data) {
+          this.$nextTick(() => {
+            this.medicalRecord = res.data.data;
+          });
         }
-        that.$emit('clickAppealBtn',params);
+      });
+    },
+    getTableData() {
+      let data = this.data.data;
+      for (let i = 0; i < data.length; i++) {
+        data[i].show = true;
       }
-    }
-  }
+      this.tableData = data;
+    },
+    closeClick() {
+      this.$emit('close'); // 触发 close 事件
+    },
+  },
+};
 </script>
 
 <style lang="scss" scoped>
-::v-deep .el-scrollbar__wrap {
-  overflow-x: hidden;
+::v-deep .el-dialog__header {
+  background-color: hsl(205.32deg 43.43% 49.22%);
+}
+
+::v-deep .el-dialog__close {
+  color: #fff;
+  border: 1px solid #fff;
+  border-radius: 20px;
 }
-::v-deep .el-divider--horizontal {
-  margin: 10px 0;
+
+::v-deep .el-dialog__title {
+  color: #fff;
 }
 
+::v-deep .el-descriptions-item__label {
+  font-weight: bold;
+  font-size: 15px;
+}
 
-.box22 {
-  padding: 16px;
-  background: #FFFFFF;
-  border-radius: 5px;
-  height: 100vh;
-  .score-box{
+::v-deep .el-tabs__item {
+  padding: 0 15px;
+}
+
+.btn-content {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  padding: 0px 10px;
+
+  .btn-right {
+    width: 95%;
+    display: flex;
+    justify-content: flex-end;
+    align-items: center;
+    margin-right: 10px;
+    margin-top: 10px;
+
+    .appeal {
+      width: 64px;
+      height: 30px;
+      line-height: 20px;
+      border-radius: 4px;
+      background-color: rgba(27, 100, 176, 1);
+      color: rgba(255, 255, 255, 1);
+      font-size: 14px;
+      text-align: center;
+      font-family: -regular;
+      cursor: pointer;
+    }
+
+    .appeal_in_progress {
+      width: 64px;
+      height: 30px;
+      line-height: 20px;
+      border-radius: 4px;
+      background-color: rgba(229, 229, 229, 1);
+      color: rgba(238, 138, 12, 1);
+      font-size: 14px;
+      text-align: center;
+      font-family: -regular;
+      border: none;
+    }
+
+    .ignore {
+      width: 64px;
+      height: 30px;
+      line-height: 20px;
+      border-radius: 4px;
+      background-color: rgba(229, 229, 229, 1);
+      color: #666666;
+      font-size: 14px;
+      text-align: center;
+      font-family: -regular;
+      border: none;
+      cursor: pointer;
+    }
+
+    div {
+      padding: 4px 6px;
+      font-size: 12px;
+      margin-left: 10px;
+      color: #000;
+      width: 60px;
+      height: 30px;
+      text-align: center;
+      line-height: 20px;
+      border-radius: 5px;
+      border: 1px solid #999;
+      cursor: pointer;
+      background-color: #fff;
+    }
+  }
+
+  .rebuttal {
+    width: 28px;
+    height: 28px;
+    line-height: 28px;
+    background-color: rgba(240, 31, 58, 1);
+    color: rgba(255, 255, 255, 1);
+    font-size: 12px;
+    text-align: center;
+    font-family: -regular;
+    cursor: pointer;
+    border-radius: 20px;
+  }
+
+  .disabled {
+    cursor: not-allowed;
+    opacity: 0.6;
+  }
+}
+
+.hz {
+  height: 20px;
+}
+
+.flow {
+  margin: 15px 10px;
+
+  span {
+    width: 20px;
+    height: 20px;
+    display: inline-block;
+    color: #fff;
+    border-radius: 50%;
+    text-align: center;
+    line-height: 20px;
+    background-color: blue;
+  }
+}
+
+.gist {
+  width: 93%;
+  display: flex;
+  font-size: 14px;
+  cursor: pointer;
+  padding: 0px 3px;
+  color: #ed3028;
+  line-height: 20px;
+  align-items: center;
+  justify-content: space-between;
+  font-family: Source Han Sans CN-Regular, Source Han Sans CN;
+
+  span {
+    margin-left: 10px;
+  }
+}
+
+.zsIcon {
+  width: 35px;
+  height: 35px;
+}
+
+.ysIcon {
+  width: 30px;
+  height: 30px;
+}
+
+.gist-center {
+  width: 93%;
+  font-size: 14px;
+  padding: 0px 3px;
+  line-height: 25px;
+  align-items: center;
+  justify-content: space-between;
+  font-family: Source Han Sans CN-Regular, Source Han Sans CN;
+}
+
+.second-content {
+  padding: 10px 10px;
+
+  .score-second {
+    width: 300px;
+    height: 60px;
+    margin: 0 auto;
+    color: #fff;
+    border-radius: 6px;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    background: rgb(152, 112, 20);
+  }
+
+  .suggest-card {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+
+    .card-left {
+      width: 60px;
+      height: 60px;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      font-size: 24px;
+      line-height: -20px;
+      align-content: center;
+      border-right: 3px solid #409eff;
+      flex-wrap: wrap;
+
+      div {
+        color: #409eff;
+      }
+    }
+
+    .card-right {
+      font-size: 14px;
+      display: flex;
+      flex-wrap: wrap;
+      height: 40px;
+      width: 80%;
+      align-content: space-around;
+
+      div {
+        width: 100%;
+      }
+    }
+  }
+
+  .score-box {
     width: 100%;
     margin-bottom: 16px;
-    padding: 30px 50px 30px 20px;
+    padding: 30px 50px 18px 20px;
     border-radius: 4px;
     display: flex;
     align-items: center;
     justify-content: space-between;
     color: #fff;
-    div{
+
+    div {
       font-size: 20px;
     }
-    .score-f{
+
+    .ban {
+      font-size: 20px;
+      font-family: Source Han Sans CN-Medium, Source Han Sans CN;
+      font-weight: 500;
+      color: #ffffff;
+      line-height: 40px;
+      vertical-align: middle;
+    }
+
+    .score-f {
       padding-left: 20px;
       font-size: 20px;
     }
-    .score-dj,.score-f{
+
+    .score-dj,
+    .score-f {
       font-weight: bold;
+      font-size: 40px;
     }
   }
-  .score-box.scoreLevel_1{
+
+  .score-box.scoreLevel_1 {
     background: rgb(11, 133, 63);
     background-image: url('../../../../assets/images/icon-jia.png');
     background-repeat: no-repeat;
-    background-size: 60px 52px;
-    background-position:80% 50%;
+    background-size: 47px 41px;
+    background-position: 80% 50%;
   }
-  .score-box.scoreLevel_2{
+
+  .score-box.scoreLevel_2 {
     background: rgb(152, 112, 20);
     background-image: url('../../../../assets/images/icon-yi.png');
     background-repeat: no-repeat;
-    background-size: 60px 52px;
-    background-position:80% 50%;
+    background-size: 47px 41px;
+    background-position: 80% 50%;
   }
-  .score-box.scoreLevel_3{
+
+  .score-box.scoreLevel_3 {
     background: rgb(199, 54, 13);
     background-image: url('../../../../assets/images/icon-bing.png');
     background-repeat: no-repeat;
-    background-size: 60px 52px;
-    background-position:80% 50%;
+    background-size: 47px 41px;
+    background-position: 80% 50%;
   }
-  .card-box {
-    // height: 175px;
-    // background: #FFFFFF;
-    // border: 1px solid #E2E2E2;
-    background: #f1f5fe;
-    padding: 10px;
-    box-sizing: border-box;
-    margin-bottom: 14px;
+}
+
+.title-content {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  padding: 12px;
+  font-size: 14px;
+
+  .title-contentIcon {
     display: flex;
     align-items: center;
     justify-content: space-between;
-    .title {
-      font-size: 12px;
-      font-family: PingFang-SC-Bold, PingFang-SC;
-      // font-weight: bold;
-      color: #333333;
-      line-height: 22px;
-      // span {
-      //   margin-left: 7px;
-      // }
-    }
-    .card-icon-btn{
-      width: auto;
-      padding: 4px 8px;
-      border-radius: 4px;
-      background: rgb(254, 240, 240);
-      color: rgb(245, 128, 140);
-      border: 1px solid rgb(245, 128, 140);
-      font-size: 10px;
-    }
-    .title2 {
-      font-size: 14px;
-      font-family: PingFang-SC-Bold, PingFang-SC;
-      // font-weight: bold;
-      color: #333333;
-      line-height: 26px;
-      cursor: pointer;
-      span {
-        margin-left: 7px;
-      }
-    }
-    .error {
-      color: #D81E06;
-    }
-  }
-  .box-card {
-    margin-bottom: 10px;
-    position: relative;
-    background: rgb(241, 245, 254);
-    .category {
-      font-family: PingFangSC-Semibold, PingFang SC;
-      font-weight: bold;
-      color: #333333;
-    }
-    .koufen {
-      font-weight: bold;
-      vertical-align: middle;
-      margin-left: 16px;
-    }
-    .typeImg {
-      width: 53px;
-      height: 53px;
-      position: absolute;
-      top: 12px;
-      right: 12px;
-      z-index: 999;
-    }
-  }
+    margin-left: -15px;
 
-  .box-card .el-table ::v-deep tr{
-    background: transparent;
-  }
-  ::v-deep .el-table__row {
-    background: #185DA6 !important;
-    color: #FFFFFF;
-    .el-icon-arrow-right {
-      color: #FFFFFF;
+    .zsIcon {
+      width: 30px;
+      height: 30px;
     }
   }
-  ::v-deep .el-descriptions__body{
-    background: transparent;
+
+  .title-contentIcon span {
+    margin-left: 10px;
   }
-  ::v-deep .el-table tr{
-    background: transparent;
+
+  .title-contentIcon .el-icon-close {
+    cursor: pointer;
   }
-  ::v-deep .el-table--enable-row-hover .el-table__body tr:hover>td.el-table__cell {
-    background: #185DA6;
+
+  .title-contentIcon .el-icon-close:hover {
+    color: red;
   }
-  ::v-deep .el-table_1_column_1 {
-    border-radius: 8px 0 0 8px;
+
+  .el-icon-close {
+    cursor: pointer;
   }
-  ::v-deep .el-table_1_column_2 {
-    border-radius: 0 8px 8px 0;
-    font-weight: bold;
+}
+
+.score-content {
+  width: 300px;
+  height: 60px;
+  margin: 0 auto;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  font-size: 30px;
+  border: 1px solid #000;
+  position: relative;
+
+  .triangle {
+    width: 0;
+    height: 0;
+    position: absolute;
+    top: 0;
+    right: 0;
+    border-left: 30px solid transparent;
+    border-top: 30px solid red;
   }
-  ::v-deep .el-descriptions-item__label {
-    font-family: PingFang-SC-Bold, PingFang-SC;
-    font-weight: bold;
-    color: #333333;
+
+  span {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    font-size: 12px;
+    position: absolute;
+    top: 2px;
+    right: 2px;
+    color: #fff;
+    z-index: 99;
   }
 }
-.span-index{
+
+.control-box {
+  position: fixed;
+  top: 106px;
+  // top: 70px;
+  right: 13px;
+  width: 400px;
+  padding: 20px;
+  background: #fff;
+  border-radius: 5px;
+  overflow-x: hidden;
+  transition: all 0.5s;
+}
+
+::v-deep .el-dialog__body {
+  padding-top: 10px;
+}
+
+.dot {
+  display: inline-block;
   width: 20px;
   height: 20px;
-  line-height: 20px;
-  text-align: center;
-  display: inline-block;
+  line-height: 23px;
+  background-color: red;
   border-radius: 50%;
-  background: #185DA6;
   color: #fff;
-  margin-right: 10px;
-  margin-bottom: 4px;
-  font-size: 12px;
+  text-align: center;
+  margin: -10px 5px;
 }
 
-::v-deep .el-table .el-table__row td {
+.first-content {
+  padding: 10px 10px;
+
+  .message-tip {
+    display: inline-block;
+    width: 20px;
+    height: 20px;
+    line-height: 23px;
+    color: #fff;
+    text-align: center;
+    background-color: red;
+    border-radius: 50%;
+    margin-left: 5px;
+    vertical-align: middle;
+    position: absolute;
+    top: 0px;
+  }
+}
+
+.score-box {
+  width: 100%;
+  margin-bottom: 16px;
+  padding: 30px 51px 18px 20px;
+  border-radius: 4px;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
   color: #fff;
 }
-::v-deep .el-tag{
-  height: auto;
-  line-height: 22px;
+
+.score-box div {
+  font-size: 20px;
 }
-// =================   2024-07-27 新样式  ↓  ===============
-.font-size12{
-  font-size: 12px;
+
+.score-box .score-f {
+  padding-left: 20px;
+  font-size: 20px;
+  font-weight: bold;
 }
-.list-box{
-  width: 100%;
-  padding: 10px 0;
-  .title-color{
-    color: rgba(27,100,176,1);
-    font-weight: bold;
-  }
-  .list-score-tips-box{
-    width: 100%;
-    display: flex;
-    .list-left-score{
-      width: 70px;
-      text-align: center;
-      font-size: 20px;
-      font-weight: 700;
-      position: relative;
-      display: flex;
-      flex-direction: column;
-      align-items: center;
-      justify-content: center;
-      padding: 10px 0;
-      &.hover-1{
-        background: rgb(254, 240, 240);
-        color: rgb(238, 14, 14);
-        border-right: 3px solid rgb(238, 14, 14);
-      }
-      &.hover-2{
-        background: rgb(236, 245, 255);
-        color: rgb(52, 140, 235);
-        border-right: 3px solid rgb(52, 140, 235);
-      }
-      &>div{
-        font-size: 20px;
+
+.score-box .score-dj {
+  font-weight: bold;
+}
+
+.score-box span {
+  font-size: 20px;
+  font-family: Source Han Sans CN-Medium, Source Han Sans CN;
+  font-weight: 500;
+  color: #ffffff;
+  line-height: 40px;
+  vertical-align: middle;
+}
+
+.score-box .score {
+  font-size: 40px;
+  font-family: Source Han Sans CN-Medium, Source Han Sans CN;
+  font-weight: 500;
+  color: #ffffff;
+  line-height: 40px;
+  vertical-align: middle;
+  margin-left: 20px;
+}
+
+.score-box .level {
+  float: right;
+}
+
+/* score-box 不同等级的背景颜色(旧的等级样式) */
+.score-box.scoreLevel_1_1 {
+  background: #328240;
+}
+
+.score-box.scoreLevel_2_2 {
+  background: #8ac410;
+}
+
+.score-box.scoreLevel_3_3 {
+  background: #ef8a0d;
+}
+
+.score-box.scoreLevel_4_4 {
+  background: #f0203a;
+}
+
+/* score-box 另一种样式 */
+.score-box_bl {
+  padding: 20px 50px 20px 20px;
+}
+
+.score-box_bl .score {
+  margin-left: -30px;
+}
+
+.suggest-content {
+  width: 346px;
+  // height: 182px;
+  line-height: 20px;
+  background-color: #f1f5fe;
+  color: rgba(16, 16, 16, 1);
+  font-size: 14px;
+  text-align: left;
+  font-family: -regular;
+}
+
+.legend-box {
+  text-align: center;
+  margin: 10px 0 10px;
+
+  span {
+    position: relative;
+    font-size: 14px;
+    font-family: Source Han Sans CN-Regular, Source Han Sans CN;
+    font-weight: 400;
+    color: #666666;
+    line-height: 20px;
+
+    &:nth-child(1) {
+      margin-right: 40px;
+    }
+
+    &::before {
+      position: absolute;
+      top: 5px;
+      left: -20px;
+      content: '';
+      width: 10px;
+      height: 10px;
+      border-radius: 5px;
+    }
+
+    &.qz {
+      &::before {
+        background: #ed3028;
       }
     }
-    .list-right-tips{
-      flex: 1;
-      font-size: 12px;
-      padding-left: 10px;
-      .notice-box{
-        margin-top: 8px;
+
+    &.jy {
+      &::before {
+        background: #78b2f1;
       }
     }
   }
-  .list-basis-box{
-    .list-basis-title{
-      padding: 10px 0 10px 10px;
-      position: relative;
-      &>span{
-        font-size: 12px;
-        color: rgba(27,100,176,1);
-        font-weight: bold;
-      }
-      .typeImg {
-        width: 34px;
-        height: 34px;
-        position: absolute;
-        top: 0;
-        right: 12px;
-        z-index: 999;
-      }
-      
+}
+
+.bag-code {
+  background-color: hsl(200deg 37.5% 96.86%);
+  height: 32%;
+}
+
+.cont-reight-bottom {
+  margin: 24px 0 15px;
+  display: flex;
+  cursor: pointer;
+
+  .list-left-score {
+    width: 70px;
+    text-align: center;
+    font-size: 14px;
+    font-weight: 700;
+    position: relative;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    justify-content: center;
+    padding: 10px 0;
+
+    &.hover-1 {
+      background: rgb(254, 240, 240);
+      color: rgb(238, 14, 14);
+      border-right: 3px solid rgb(238, 14, 14);
     }
-    .list-basis-text {
-      height: auto;
-      .list-basis-text-t{
-        height: 0;
-        overflow: hidden;
-        position: relative;
-        &.show{
-          height: auto;
-          padding: 10px 0 10px 10px;
-        }
-      }
+
+    &.hover-2 {
+      background: rgb(236, 245, 255);
+      color: rgb(52, 140, 235);
+      border-right: 3px solid rgb(52, 140, 235);
     }
-    .list-basis-bottom-box{
-      margin-top: 14px;
-      width: 100%;
-      display: flex;
-      align-items: center;
-      justify-content: space-between;
-      .list-basis-bottom-tips{
-        flex: 1;
-        &::v-deep .el-button{
-          padding: 0;
-          font-size: 12px;
-          width: 40px;
-          height: 40px;
-          border-radius: 50%;
-          &>span{
-            font-size: 12px;
-          }
-        }
-      }
-      .list-basis-bottom-btn{
-        width: auto;
-        &::v-deep .el-button{
-          padding: 6px 14px;
-        }
-        &::v-deep .el-button--primary,&::v-deep .el-button--primary:focus,&::v-deep .el-button--primary:hover{
-          background: #185DA6;
-          border-color: #185DA6;
-        }
-      }
+
+    &>div {
+      font-size: 14px;
+    }
+  }
+
+  .list-right-tips {
+    flex: 1;
+    font-size: 12px;
+    padding-left: 10px;
+
+    .notice-box {
+      margin-top: 8px;
     }
+  }
+}
+
+.cont-reight-bottom div span {
+  font-size: 14px;
+  margin-top: 10px;
+}
 
-    
+.cont-reight-bottom-title {
+  border-right: 3px solid #ed3028;
+  width: 90px;
+  height: 80px;
+  line-height: 20px;
+  background-color: rgba(254, 240, 240, 1);
+  color: #ed3028;
+  font-size: 14px;
+  text-align: center;
+  font-family: -regular;
+  font-weight: bold;
+  position: relative;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: center;
+}
 
+.cont-reight-bottom-title-null {
+  width: 90px;
+  height: 80px;
+  background-color: rgba(254, 240, 240, 1);
+  border-right: 3px solid #78b2f1;
+  text-align: center;
+  font-size: 14px;
+  font-weight: bold;
+  color: #78b2f1;
+  position: relative;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: center;
+}
+
+.cont-reight-bottom-conter {
+  margin-left: 8px;
+  min-height: 70px;
+  width: 100%;
+  margin-top: 7px;
+  line-height: 30px;
+
+  .cont-reight-bottom-conter-flex {
+    width: 90%;
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
   }
+
+  p {
+    font-size: 14px;
+    color: #666666;
+  }
+}
+
+.zkyj {
+  font-size: 14px;
+  font-family: Source Han Sans CN-Regular, Source Han Sans CN;
+  color: #ed3028;
+  line-height: 20px;
+  cursor: pointer;
+  padding: 0px 10px;
 }
 
-</style>
+.bold {
+  font-size: 14px !important;
+  font-weight: 600 !important;
+  color: #202020 !important;
+}
+
+.zsIcon {
+  width: 35px;
+  height: 35px;
+}
+
+.states-content {
+  margin: 20px auto;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  font-size: 22px;
+
+  .states-box {
+    font-size: 16px;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    width: 50%;
+
+    span {
+      width: 14px;
+      height: 14px;
+      border-radius: 50%;
+      background: red;
+      margin-right: 8px;
+    }
+  }
+}
+
+.first-card {
+  display: flex;
+  align-items: center;
+  justify-content: flex-start;
+  width: 300px;
+  margin: 0 auto;
+  height: 60px;
+  margin-bottom: 20px;
+
+  .card-left {
+    width: 60px;
+    height: 60px;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    font-size: 24px;
+    line-height: -20px;
+    align-content: center;
+    background: rgba(255, 0, 0, 0.4);
+    border-right: 3px solid red;
+    flex-wrap: wrap;
+
+    div {
+      width: 60px;
+      text-align: center;
+    }
+  }
+
+  .card-right {
+    font-size: 14px;
+    // display: flex;
+    flex-wrap: wrap;
+    margin-left: 10px;
+    height: 60px;
+    line-height: 24px;
+    align-content: space-around;
+  }
+}
+</style>

+ 428 - 0
src/views/recordsRoom/qc/components/CreateControlResultDialog copy.vue

@@ -0,0 +1,428 @@
+<template>
+  <div>
+    <el-dialog
+      title="添加质控信息"
+      :visible.sync="data.bSwitch"
+      :close-on-click-modal="false"
+      width="900px"
+      top="7vh">
+      <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm" label-suffix=":">
+        <el-row :gutter="0">
+          <el-col :span="12">
+            <el-form-item label="质控模板" prop="rule_id">
+              <el-select v-model="ruleForm.rule_id" clearable filterable @change="handleRuleIdChange" placeholder="请选择">
+                <el-option v-for="item of selectData.rule" :key="item.id" :label="item.category" :value="item.id"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="0">
+          <el-col :span="8">
+            <el-form-item label="住院号码" prop="ZYH">
+              <el-input v-model="ruleForm.ZYH" disabled placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="质控人" prop="ZKR">
+              <el-input v-model="ruleForm.ZKR" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="质控科室" prop="ZKKS">
+              <el-select v-model="ruleForm.ZKKS" filterable clearable placeholder="请选择" style="width: 100%;">
+                <el-option v-for="item of deportments" :key="item.id" :label="item.name" :value="item.name" />
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="接收人" prop="JSR">
+              <el-input v-model="ruleForm.JSR" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="接收科室" prop="JSKS">
+              <el-input v-model="ruleForm.JSKS" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="状态" prop="level">
+              <el-select v-model="ruleForm.level" placeholder="请选择">
+                <el-option v-for="item of selectData.level" :key="item.id" :label="item.name" :value="item.id"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="扣分" prop="score">
+              <el-input-number v-model="ruleForm.score" controls-position="right" :min="0" :max="100" placeholder="请输入" style="width: 100%;"></el-input-number>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="整改级别" prop="ZGJB">
+              <el-select v-model="ruleForm.ZGJB" placeholder="请选择">
+                <el-option v-for="item of selectData.zgjb" :key="item" :label="item" :value="item"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="整改期限" prop="ZGQX">
+              <el-date-picker
+                v-model="ruleForm.ZGQX"
+                type="datetime"
+                value-format="timestamp"
+                placeholder="请选择"
+                :picker-options="{ disabledDate: time => time.getTime() < Date.now() }"
+                style="width: 100%;"
+                >
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="质控分类" prop="category">
+              <el-autocomplete
+                class="inline-input"
+                v-model="ruleForm.category"
+                :fetch-suggestions="querySearchCategory"
+                placeholder="请输入"
+                @select="handleSelectCategory"
+              >
+                <template slot-scope="{ item }">
+                  <div class="name">{{ item }}</div>
+                </template>
+              </el-autocomplete>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="8">
+            <el-form-item label="质控项目" prop="title">
+              <el-autocomplete
+                class="inline-input"
+                v-model="ruleForm.title"
+                :fetch-suggestions="querySearchTitle"
+                placeholder="请输入"
+                @select="handleSelectTitle"
+              >
+                <template slot-scope="{ item }">
+                  <div class="name">{{ item }}</div>
+                </template>
+              </el-autocomplete>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="质控类型" prop="type">
+              <el-autocomplete
+                class="inline-input"
+                v-model="ruleForm.type"
+                :fetch-suggestions="querySearchType"
+                placeholder="请输入"
+                @select="handleSelectType"
+              >
+                <template slot-scope="{ item }">
+                  <div class="name">{{ item }}</div>
+                </template>
+              </el-autocomplete>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="0">
+          <el-col :span="12">
+            <el-form-item label="质控类别" prop="cate">
+              <el-select v-model="ruleForm.cate" clearable filterable @change="handleRuleIdChange" placeholder="请选择">
+                <el-option v-for="item of caseCates" :key="item.id" :label="item.name" :value="item.id"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="0">
+          <el-col :span="24">
+            <el-form-item label="质控内容" prop="basis">
+              <el-input type="textarea" v-model="ruleForm.basis" :autosize="{ minRows: 4 }" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="错误描述" prop="notice">
+              <el-input type="textarea" v-model="ruleForm.notice" :autosize="{ minRows: 4 }" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="onSubmit" :loading="loading">发送整改通知</el-button>
+        <el-button @click="data.bSwitch = false">关 闭</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { getRuleData, getBlInfo, addCaseQuality } from '@/api/qc'
+
+export default {
+  props: {
+    data: {
+      type: Object,
+      default() {
+        return {
+          bSwitch: false,
+          text: '',
+          blbh: ''
+        }
+      }
+    },
+    AAA28: {
+      type: String,
+      default() {
+        return false;
+      },
+    },
+  },
+  data() {
+    return {
+      loading: false,
+      selectData: {
+        rule: [],
+        category: [],
+        title: [],
+        type: [],
+        level: [],
+        zgjb: []
+      },
+      deportments: [],
+      caseCates: [],
+      ruleForm: {
+        AAA28: '',
+        ZYH: '',
+        ZKR: '',
+        ZKKS: '',
+        JSR: '',
+        JSKS: '',
+        ZGJB: '',
+        category: '',
+        title: '',
+        rule_id: '',
+        type: '',
+        notice: '',
+        basis: '',
+        level: '',
+        ZGQX: '',
+        score: undefined,
+        cate: 1
+      },
+      rules: {
+        AAA28: [
+          { required: true, message: '请输入', trigger: 'blur' }
+        ],
+        ZKR: [
+          { required: true, message: '请输入', trigger: 'blur' }
+        ],
+        ZKKS: [
+          { required: true, message: '请输入', trigger: 'blur' }
+        ],
+
+        JSR: [
+          { required: true, message: '请输入', trigger: 'blur' }
+        ],
+        JSKS: [
+          { required: true, message: '请输入', trigger: 'blur' }
+        ],
+        ZGJB: [
+          { required: true, message: '请选择', trigger: 'blur' }
+        ],
+        cate: [
+          { required: true, message: '请选择', trigger: 'blur' }
+        ],
+        category: [
+          { required: true, message: '请选择', trigger: 'change' }
+        ],
+        title: [
+          { required: true, message: '请选择', trigger: 'change' }
+        ],
+        notice: [
+          { required: true, message: '请输入', trigger: 'blur' }
+        ],
+        basis: [
+          { required: true, message: '请输入', trigger: 'blur' }
+        ],
+        score: [
+          { required: true, message: '请输入', trigger: 'blur' }
+        ],
+        level: [
+          { required: true, message: '请选择', trigger: 'blur' }
+        ],
+      }
+    }
+  },
+  mounted() {
+    this.getRuleData()
+    this.getBlInfo()
+    this.getDeportmentList()
+    this.getCaseCateList()
+    this.$set(this.ruleForm, 'basis', this.data.text)
+    this.$set(this.ruleForm, 'ZYH', this.AAA28)
+  },
+  methods: {
+    // 质控分类
+    querySearchCategory(queryString, cb) {
+      var categorys = this.selectData.category;
+      var results = queryString ? categorys.filter(this.createFilterCategory(queryString)) : categorys;
+      // 调用 callback 返回建议列表的数据
+      cb(results);
+    },
+    createFilterCategory(queryString) {
+      return (restaurant) => {
+        return (restaurant.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
+      };
+    },
+    handleSelectCategory(item) {
+      this.$set(this.ruleForm, 'category', item)
+    },
+    // 质控项目
+    querySearchTitle(queryString, cb) {
+      var titles = this.selectData.title;
+      var results = queryString ? titles.filter(this.createFilterTitle(queryString)) : titles;
+      // 调用 callback 返回建议列表的数据
+      cb(results);
+    },
+    createFilterTitle(queryString) {
+      return (restaurant) => {
+        return (restaurant.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
+      };
+    },
+    handleSelectTitle(item) {
+      this.$set(this.ruleForm, 'title', item)
+    },
+    // 质控类型
+    querySearchType(queryString, cb) {
+      var types = this.selectData.type;
+      var results = queryString ? types.filter(this.createFilterType(queryString)) : types;
+      // 调用 callback 返回建议列表的数据
+      cb(results);
+    },
+    createFilterType(queryString) {
+      return (restaurant) => {
+        return (restaurant.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
+      };
+    },
+    handleSelectType(item) {
+      this.$set(this.ruleForm, 'type', item)
+    },
+    // 获取规则数据
+    getRuleData() {
+      getRuleData().then(res => {
+        this.$set(this, 'selectData', res.data)
+      })
+    },
+    // 获取病历相关信息
+    getBlInfo() {
+      getBlInfo({ blbh: this.data.blbh }).then(res => {
+        const { AAA28, JSKS, JSR, ZYH } = res.data
+        this.$set(this.ruleForm, 'AAA28', AAA28)
+        // this.$set(this.ruleForm, 'ZYH', ZYH)
+        this.$set(this.ruleForm, 'JSKS', JSKS)
+        this.$set(this.ruleForm, 'JSR', JSR)
+      })
+    },
+    // 质控模板变化
+    handleRuleIdChange(val) {
+      if (val) {
+        const item = this.selectData.rule.filter(item => item.id)[0]
+        const { category, level, notice, score, type, title } = item
+        this.$set(this.ruleForm, 'category', category)
+        this.$set(this.ruleForm, 'level', level)
+        this.$set(this.ruleForm, 'notice', notice)
+        this.$set(this.ruleForm, 'score', score)
+        this.$set(this.ruleForm, 'type', type)
+        this.$set(this.ruleForm, 'title', title)
+      }
+    },
+
+    // 部门
+    getDeportmentList() {
+      this.$axios.get('/user/depDropDown').then(res => {
+        const { data } = res
+        if (data.length) {
+          data.forEach(ele => {
+            this.deportments.push({
+              id: ele.dep_id,
+              name: ele.name
+            })
+          });
+        }
+      }).catch(error => {
+        console.log(error)
+      })
+    },
+    // 类别
+    getCaseCateList() {
+      this.$axios.post('/bl_zk/getCaseCate').then(res => {
+        const { data } = res
+
+        if (data.length) {
+          this.caseCates = data
+        }
+      }).catch(error => {
+        console.log(error)
+      })
+    },
+    // 提交
+    onSubmit() {
+      this.$refs['ruleForm'].validate((valid) => {
+        if (valid) {
+          const {
+            ZYH,
+            ZKR,
+            ZKKS,
+            JSR,
+            JSKS,
+            ZGJB,
+            category,
+            title,
+            rule_id,
+            type,
+            notice,
+            basis,
+            level,
+            ZGQX,
+            score,
+            cate
+          } = this.ruleForm
+          const params = {
+            ZYH,
+            ZKR,
+            ZKKS,
+            JSR,
+            JSKS,
+            ZGJB,
+            category,
+            title,
+            rule_id,
+            type,
+            notice,
+            basis,
+            level,
+            ZGQX: ZGQX/1000,
+            score,
+            cate
+          }
+          this.loading=true
+          addCaseQuality(params).then(res => {
+            const { m } = res
+            this.$message.success(m || '成功')
+            this.data.bSwitch = false
+            this.$emit('refresh')
+          }).finally(res => {
+            this.loading=false
+          })
+        } else {
+          return false;
+        }
+      });
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.demo-ruleForm {
+ width: 95%;
+}
+</style>

+ 428 - 240
src/views/recordsRoom/qc/components/CreateControlResultDialog.vue

@@ -1,160 +1,124 @@
 <template>
   <div>
-    <el-dialog
-      title="添加质控信息"
-      :visible.sync="data.bSwitch"
-      :close-on-click-modal="false"
-      width="900px"
-      top="7vh">
-      <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm" label-suffix=":">
+    <el-dialog title="添加质控信息" :visible.sync="data.bSwitch" :close-on-click-modal="false" width="900px" top="7vh">
+      <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm"
+        label-suffix=":">
         <el-row :gutter="0">
-          <el-col :span="12">
+          <el-col :span="20">
             <el-form-item label="质控模板" prop="rule_id">
-              <el-select v-model="ruleForm.rule_id" clearable filterable @change="handleRuleIdChange" placeholder="请选择">
-                <el-option v-for="item of selectData.rule" :key="item.id" :label="item.category" :value="item.id"></el-option>
+              <el-select v-model="ruleForm.rule_id" clearable filterable @change="handleRuleIdChange"
+                placeholder="请选择质控模板">
+                <el-option v-for="item of selectData.rule" :key="item.id" :label="item.category"
+                  :value="item.id"></el-option>
               </el-select>
             </el-form-item>
           </el-col>
         </el-row>
         <el-row :gutter="0">
           <el-col :span="8">
-            <el-form-item label="住院号码" prop="ZYH">
-              <el-input v-model="ruleForm.ZYH" disabled placeholder="请输入"></el-input>
+            <el-form-item label="病案号" prop="MED_REC_ID">
+              <el-input v-model="ruleForm.MED_REC_ID" disabled placeholder="请输入"></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="8">
-            <el-form-item label="质控人" prop="ZKR">
-              <el-input v-model="ruleForm.ZKR" placeholder="请输入"></el-input>
+            <el-form-item label="床位号" prop="CWH">
+              <el-input v-model="ruleForm.CWH" disabled placeholder="请输入"></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="8">
-            <el-form-item label="质控科室" prop="ZKKS">
-              <el-select v-model="ruleForm.ZKKS" filterable clearable placeholder="请选择" style="width: 100%;">
-                <el-option v-for="item of deportments" :key="item.id" :label="item.name" :value="item.name" />
+            <el-form-item label="住院次数" prop="AAA29">
+              <el-input v-model="ruleForm.AAA29" disabled placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="接收端" prop="cate">
+              <el-select v-model="ruleForm.cate" filterable clearable placeholder="请选择" style="width: 100%">
+                <el-option v-for="item of receiving" :key="item.id" :label="item.name" :value="item.id" />
               </el-select>
             </el-form-item>
           </el-col>
           <el-col :span="8">
             <el-form-item label="接收人" prop="JSR">
-              <el-input v-model="ruleForm.JSR" placeholder="请输入"></el-input>
+              <el-select v-model="ruleForm.JSR" filterable clearable multiple :filter-method="filterRecipient"
+                placeholder="请选择" style="width: 100%">
+                <el-option v-for="item of recipient" :key="item.id" :label="`${item.name} ${item.base_code}`"
+                  :value="item.name" />
+              </el-select>
             </el-form-item>
           </el-col>
           <el-col :span="8">
             <el-form-item label="接收科室" prop="JSKS">
-              <el-input v-model="ruleForm.JSKS" placeholder="请输入"></el-input>
+              <el-select v-model="ruleForm.JSKS" filterable clearable multiple :filter-method="filterDeportments"
+                placeholder="请选择" style="width: 100%">
+                <el-option v-for="item of deportments" :key="item.id" :label="item.name" :value="item.name" />
+              </el-select>
             </el-form-item>
           </el-col>
           <el-col :span="8">
-            <el-form-item label="状态" prop="level">
-              <el-select v-model="ruleForm.level" placeholder="请选择">
-                <el-option v-for="item of selectData.level" :key="item.id" :label="item.name" :value="item.id"></el-option>
+            <el-form-item label="质控人" prop="ZKR">
+              <el-select v-model="ruleForm.ZKR" filterable clearable multiple :filter-method="filterRecipient"
+                placeholder="请选择" style="width: 100%">
+                <el-option v-for="item of recipient" :key="item.id" :label="`${item.name} ${item.base_code}`"
+                  :value="item.name" />
               </el-select>
             </el-form-item>
           </el-col>
           <el-col :span="8">
             <el-form-item label="扣分" prop="score">
-              <el-input-number v-model="ruleForm.score" controls-position="right" :min="0" :max="100" placeholder="请输入" style="width: 100%;"></el-input-number>
-            </el-form-item>
-          </el-col>
-          <el-col :span="8">
-            <el-form-item label="整改级别" prop="ZGJB">
-              <el-select v-model="ruleForm.ZGJB" placeholder="请选择">
-                <el-option v-for="item of selectData.zgjb" :key="item" :label="item" :value="item"></el-option>
-              </el-select>
+              <el-input-number v-model="ruleForm.score" controls-position="right" :min="0" :max="100" placeholder="请输入"
+                style="width: 100%"></el-input-number>
             </el-form-item>
           </el-col>
           <el-col :span="8">
             <el-form-item label="整改期限" prop="ZGQX">
-              <el-date-picker
-                v-model="ruleForm.ZGQX"
-                type="datetime"
-                value-format="timestamp"
-                placeholder="请选择"
-                :picker-options="{ disabledDate: time => time.getTime() < Date.now() }"
-                style="width: 100%;"
-                >
-              </el-date-picker>
-            </el-form-item>
-          </el-col>
-          <el-col :span="8">
-            <el-form-item label="质控分类" prop="category">
-              <el-autocomplete
-                class="inline-input"
-                v-model="ruleForm.category"
-                :fetch-suggestions="querySearchCategory"
-                placeholder="请输入"
-                @select="handleSelectCategory"
-              >
-                <template slot-scope="{ item }">
-                  <div class="name">{{ item }}</div>
-                </template>
-              </el-autocomplete>
+              <el-input-number v-model="ruleForm.ZGQX" controls-position="right" :min="0" :max="100" placeholder="请输入"
+                style="width: 100%"></el-input-number>
             </el-form-item>
           </el-col>
-
           <el-col :span="8">
-            <el-form-item label="质控项目" prop="title">
-              <el-autocomplete
-                class="inline-input"
-                v-model="ruleForm.title"
-                :fetch-suggestions="querySearchTitle"
-                placeholder="请输入"
-                @select="handleSelectTitle"
-              >
-                <template slot-scope="{ item }">
-                  <div class="name">{{ item }}</div>
-                </template>
-              </el-autocomplete>
+            <el-form-item label="状态" prop="level">
+              <el-select v-model="ruleForm.level" placeholder="请选择">
+                <el-option v-for="item of selectData.level" :key="item.id" :label="item.name"
+                  :value="item.id"></el-option>
+              </el-select>
             </el-form-item>
           </el-col>
-          <el-col :span="8">
-            <el-form-item label="质控类型" prop="type">
-              <el-autocomplete
-                class="inline-input"
-                v-model="ruleForm.type"
-                :fetch-suggestions="querySearchType"
-                placeholder="请输入"
-                @select="handleSelectType"
-              >
-                <template slot-scope="{ item }">
-                  <div class="name">{{ item }}</div>
-                </template>
-              </el-autocomplete>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row :gutter="0">
-          <el-col :span="12">
-            <el-form-item label="质控类别" prop="cate">
-              <el-select v-model="ruleForm.cate" clearable filterable @change="handleRuleIdChange" placeholder="请选择">
-                <el-option v-for="item of caseCates" :key="item.id" :label="item.name" :value="item.id"></el-option>
-              </el-select>
+          <el-col :span="10">
+            <el-form-item label="质控目录" prop="title">
+              <el-cascader v-model="ruleForm.title" :options="categoryOptions" placeholder="请选择质控目录" filterable
+                :filter-method="customFilterMethod" @change="handleCategoryChange" :props="{
+                  value: 'label',
+                  label: 'label',
+                  children: 'children',
+                }"></el-cascader>
             </el-form-item>
           </el-col>
         </el-row>
         <el-row :gutter="0">
           <el-col :span="24">
             <el-form-item label="质控内容" prop="basis">
-              <el-input type="textarea" v-model="ruleForm.basis" :autosize="{ minRows: 4 }" placeholder="请输入"></el-input>
+              <el-input type="textarea" v-model="ruleForm.basis" :autosize="{ minRows: 4 }"
+                placeholder="请输入"></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="24">
-            <el-form-item label="错误描述" prop="notice">
-              <el-input type="textarea" v-model="ruleForm.notice" :autosize="{ minRows: 4 }" placeholder="请输入"></el-input>
+            <el-form-item label="质控依据" prop="notice">
+              <el-input type="textarea" v-model="ruleForm.notice" :autosize="{ minRows: 4 }"
+                placeholder="请输入"></el-input>
             </el-form-item>
           </el-col>
         </el-row>
       </el-form>
       <span slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="onSubmit" :loading="loading">发送整改通知</el-button>
-        <el-button @click="data.bSwitch = false">关 闭</el-button>
+        {{ JSKS }}
+        <el-button type="primary" :loading="loading" @click="onSubmit">发送整改通知</el-button>
       </span>
     </el-dialog>
   </div>
 </template>
 
 <script>
-import { getRuleData, getBlInfo, addCaseQuality } from '@/api/qc'
+import { getRuleData, getBlInfo, addCaseQuality, getStaffListData, getCaseCate, getSelectValue } from '@/api/qc';
 
 export default {
   props: {
@@ -164,9 +128,9 @@ export default {
         return {
           bSwitch: false,
           text: '',
-          blbh: ''
-        }
-      }
+          blbh: '',
+        };
+      },
     },
     AAA28: {
       type: String,
@@ -174,6 +138,22 @@ export default {
         return false;
       },
     },
+    MED_REC_ID: {
+      type: [String, Number], // 根据实际类型定义
+      required: true, // 是否必传
+    },
+    CWH: {
+      type: [String, Number], // 根据实际类型定义
+      required: true,
+    },
+    AAA29: {
+      type: [String, Number], // 根据实际类型定义
+      required: true,
+    },
+    JSKS: {
+      type: [String, Number], // 根据实际类型定义
+      required: true,
+    }
   },
   data() {
     return {
@@ -184,17 +164,20 @@ export default {
         title: [],
         type: [],
         level: [],
-        zgjb: []
+        zgjb: [],
       },
       deportments: [],
+      recipient: [],
       caseCates: [],
+      receiving: [],
+      categoryOptions: [],
       ruleForm: {
         AAA28: '',
         ZYH: '',
-        ZKR: '',
+        ZKR: [],
         ZKKS: '',
-        JSR: '',
-        JSKS: '',
+        JSR: [],
+        JSKS: [this.JSKS],
         ZGJB: '',
         category: '',
         title: '',
@@ -203,61 +186,61 @@ export default {
         notice: '',
         basis: '',
         level: '',
-        ZGQX: '',
+        ZGQX: undefined,
         score: undefined,
-        cate: 1
+        cate: '',
+        MED_REC_ID: this.MED_REC_ID,
+        AAA29: this.AAA29,
+        CWH: this.CWH,
       },
       rules: {
-        AAA28: [
-          { required: true, message: '请输入', trigger: 'blur' }
-        ],
-        ZKR: [
-          { required: true, message: '请输入', trigger: 'blur' }
-        ],
-        ZKKS: [
-          { required: true, message: '请输入', trigger: 'blur' }
-        ],
+        AAA28: [{ required: true, message: '请输入', trigger: 'blur' }],
+        ZKR: [{ required: true, message: '请输入', trigger: 'blur' }],
+        ZKKS: [{ required: true, message: '请输入', trigger: 'blur' }],
 
-        JSR: [
-          { required: true, message: '请输入', trigger: 'blur' }
-        ],
-        JSKS: [
-          { required: true, message: '请输入', trigger: 'blur' }
-        ],
-        ZGJB: [
-          { required: true, message: '请选择', trigger: 'blur' }
-        ],
-        cate: [
-          { required: true, message: '请选择', trigger: 'blur' }
-        ],
-        category: [
-          { required: true, message: '请选择', trigger: 'change' }
-        ],
-        title: [
-          { required: true, message: '请选择', trigger: 'change' }
-        ],
-        notice: [
-          { required: true, message: '请输入', trigger: 'blur' }
-        ],
-        basis: [
-          { required: true, message: '请输入', trigger: 'blur' }
-        ],
-        score: [
-          { required: true, message: '请输入', trigger: 'blur' }
-        ],
-        level: [
-          { required: true, message: '请选择', trigger: 'blur' }
-        ],
-      }
-    }
+        JSR: [{ required: true, message: '请输入', trigger: 'blur' }],
+        JSKS: [{ required: true, message: '请输入', trigger: 'blur' }],
+        ZGJB: [{ required: true, message: '请选择', trigger: 'blur' }],
+        cate: [{ required: true, message: '请选择', trigger: 'blur' }],
+        category: [{ required: true, message: '请选择', trigger: 'change' }],
+        title: [{ required: true, message: '请选择', trigger: 'change' }],
+        notice: [{ required: true, message: '请输入', trigger: 'blur' }],
+        basis: [{ required: true, message: '请输入', trigger: 'blur' }],
+        score: [{ required: true, message: '请输入', trigger: 'blur' }],
+        level: [{ required: true, message: '请选择', trigger: 'blur' }],
+        MED_REC_ID: [{ required: true, message: '请输入', trigger: 'blur' }],
+        AAA29: [{ required: true, message: '请输入', trigger: 'blur' }],
+        CWH: [{ required: true, message: '请输入', trigger: 'blur' }],
+      },
+    };
+  },
+  watch: {
+    // Watch for changes in props and update ruleForm
+    MED_REC_ID(newVal) {
+      this.ruleForm.MED_REC_ID = newVal;
+    },
+    CWH(newVal) {
+      this.ruleForm.CWH = newVal;
+    },
+    AAA29(newVal) {
+      this.ruleForm.AAA29 = newVal;
+    },
+    // JSKS(newVal) {
+    //   this.ruleForm.JSKS = newVal; 
+    //   this.setDefaultValue(newVal);
+    // }
   },
   mounted() {
-    this.getRuleData()
-    this.getBlInfo()
-    this.getDeportmentList()
-    this.getCaseCateList()
-    this.$set(this.ruleForm, 'basis', this.data.text)
-    this.$set(this.ruleForm, 'ZYH', this.AAA28)
+    this.getRuleData();
+    // this.getBlInfo()
+    this.getStaff();
+    this.getDeportmentList();
+    this.getCaseCateList();
+    this.receivingEnd();
+    this.zkSelectValue();
+    this.$set(this.ruleForm, 'basis', this.data.text);
+    this.$set(this.ruleForm, 'ZYH', this.AAA28);
+    this.getStoredRealname(); // 获取当前登录人
   },
   methods: {
     // 质控分类
@@ -268,12 +251,12 @@ export default {
       cb(results);
     },
     createFilterCategory(queryString) {
-      return (restaurant) => {
-        return (restaurant.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
+      return restaurant => {
+        return restaurant.toLowerCase().indexOf(queryString.toLowerCase()) === 0;
       };
     },
     handleSelectCategory(item) {
-      this.$set(this.ruleForm, 'category', item)
+      this.$set(this.ruleForm, 'category', item);
     },
     // 质控项目
     querySearchTitle(queryString, cb) {
@@ -283,12 +266,12 @@ export default {
       cb(results);
     },
     createFilterTitle(queryString) {
-      return (restaurant) => {
-        return (restaurant.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
+      return restaurant => {
+        return restaurant.toLowerCase().indexOf(queryString.toLowerCase()) === 0;
       };
     },
     handleSelectTitle(item) {
-      this.$set(this.ruleForm, 'title', item)
+      this.$set(this.ruleForm, 'title', item);
     },
     // 质控类型
     querySearchType(queryString, cb) {
@@ -298,131 +281,336 @@ export default {
       cb(results);
     },
     createFilterType(queryString) {
-      return (restaurant) => {
-        return (restaurant.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
+      return restaurant => {
+        return restaurant.toLowerCase().indexOf(queryString.toLowerCase()) === 0;
       };
     },
     handleSelectType(item) {
-      this.$set(this.ruleForm, 'type', item)
+      this.$set(this.ruleForm, 'type', item);
     },
     // 获取规则数据
     getRuleData() {
       getRuleData().then(res => {
-        this.$set(this, 'selectData', res.data)
-      })
+        this.$set(this, 'selectData', res.data);
+      });
     },
     // 获取病历相关信息
-    getBlInfo() {
-      getBlInfo({ blbh: this.data.blbh }).then(res => {
-        const { AAA28, JSKS, JSR, ZYH } = res.data
-        this.$set(this.ruleForm, 'AAA28', AAA28)
-        // this.$set(this.ruleForm, 'ZYH', ZYH)
-        this.$set(this.ruleForm, 'JSKS', JSKS)
-        this.$set(this.ruleForm, 'JSR', JSR)
-      })
-    },
+    // getBlInfo() {
+    //   getBlInfo({ blbh: this.data.blbh }).then(res => {
+    //     const { AAA28, JSKS, JSR, ZYH,  } = res.data
+    //     this.$set(this.ruleForm, 'AAA28', AAA28)
+    //     // this.$set(this.ruleForm, 'ZYH', ZYH)
+    //     this.$set(this.ruleForm, 'JSKS', JSKS)
+    //     this.$set(this.ruleForm, 'JSR', JSR)
+    //   })
+    // },
     // 质控模板变化
     handleRuleIdChange(val) {
       if (val) {
-        const item = this.selectData.rule.filter(item => item.id)[0]
-        const { category, level, notice, score, type, title } = item
-        this.$set(this.ruleForm, 'category', category)
-        this.$set(this.ruleForm, 'level', level)
-        this.$set(this.ruleForm, 'notice', notice)
-        this.$set(this.ruleForm, 'score', score)
-        this.$set(this.ruleForm, 'type', type)
-        this.$set(this.ruleForm, 'title', title)
+        const item = this.selectData.rule.filter(item => item.id)[0];
+        const { category, level, notice, score, type, title } = item;
+        this.$set(this.ruleForm, 'category', category);
+        this.$set(this.ruleForm, 'level', level);
+        this.$set(this.ruleForm, 'notice', notice);
+        this.$set(this.ruleForm, 'score', score);
+        this.$set(this.ruleForm, 'type', type);
+        this.$set(this.ruleForm, 'title', title);
       }
     },
-
     // 部门
     getDeportmentList() {
-      this.$axios.get('/user/depDropDown').then(res => {
-        const { data } = res
-        if (data.length) {
-          data.forEach(ele => {
-            this.deportments.push({
-              id: ele.dep_id,
-              name: ele.name
-            })
-          });
-        }
-      }).catch(error => {
-        console.log(error)
-      })
+      this.$axios
+        .get('/user/depDropDown')
+        .then(res => {
+          const { data } = res;
+          if (data.length) {
+            data.forEach(ele => {
+              this.deportments.push({
+                id: ele.dep_id,
+                name: ele.name,
+              });
+            });
+          }
+        })
+        .catch(error => {
+          console.log(error);
+        });
+    },
+
+    filterDeportments(val) {
+      if (val) {
+        // 过滤逻辑,根据输入的值模糊匹配姓名和工号
+        this.deportments = this.deportments.filter(item => {
+          return item.name.includes(val) || item.id.includes(val);
+        });
+      } else {
+        // 若输入为空,显示所有选项
+        this.getDeportmentList();
+      }
     },
     // 类别
     getCaseCateList() {
-      this.$axios.post('/bl_zk/getCaseCate').then(res => {
-        const { data } = res
+      this.$axios
+        .post('/bl_zk/getCaseCate')
+        .then(res => {
+          const { data } = res;
 
-        if (data.length) {
-          this.caseCates = data
-        }
-      }).catch(error => {
-        console.log(error)
-      })
+          if (data.length) {
+            this.caseCates = data;
+          }
+        })
+        .catch(error => {
+          console.log(error);
+        });
     },
     // 提交
     onSubmit() {
-      this.$refs['ruleForm'].validate((valid) => {
+      this.$refs['ruleForm'].validate(valid => {
         if (valid) {
-          const {
-            ZYH,
-            ZKR,
-            ZKKS,
-            JSR,
-            JSKS,
-            ZGJB,
-            category,
-            title,
-            rule_id,
-            type,
-            notice,
-            basis,
-            level,
-            ZGQX,
-            score,
-            cate
-          } = this.ruleForm
+          const { ZYH, ZKR, ZKKS, JSR, JSKS, ZGJB, category, title, rule_id, type, notice, basis, level, ZGQX, score, cate, MED_REC_ID, AAA29, CWH } = this.ruleForm;
+
+          let JSRValue;
+          if (Array.isArray(JSR)) {
+            if (JSR.length === 1) {
+              JSRValue = JSR[0];
+            } else if (JSR.length > 1) {
+              JSRValue = `[${JSR.join('、')}]`;
+            } else {
+              JSRValue = '';
+            }
+          } else {
+            JSRValue = JSR;
+          }
+
+          let JSKSValue;
+          if (Array.isArray(JSKS)) {
+            JSKSValue = `[${JSKS.join('、')}]`;
+          } else {
+            JSKSValue = JSKS;
+          }
+
+          let ZKRValue;
+          if (Array.isArray(ZKR)) {
+            if (ZKR.length === 1) {
+              ZKRValue = ZKR[0];
+            } else if (ZKR.length > 1) {
+              ZKRValue = `[${ZKR.join('、')}]`;
+            } else {
+              ZKRValue = '';
+            }
+          } else {
+            ZKRValue = ZKR;
+          }
+
+          let ZKmlTitele;
+          if (Array.isArray(title)) {
+            if (title.length === 1) {
+              ZKmlTitele = title[0];
+            } else if (title.length > 1) {
+              ZKmlTitele = `[${title.join('、')}]`;
+            } else {
+              ZKmlTitele = '';
+            }
+          } else {
+            ZKmlTitele = title;
+          }
+
           const params = {
             ZYH,
-            ZKR,
+            ZKR: ZKRValue,
             ZKKS,
-            JSR,
-            JSKS,
+            JSR: JSRValue,
+            JSKS: JSKSValue,
             ZGJB,
             category,
-            title,
+            title: ZKmlTitele,
             rule_id,
             type,
             notice,
             basis,
             level,
-            ZGQX: ZGQX/1000,
+            ZGQX,
             score,
-            cate
-          }
-          this.loading=true
-          addCaseQuality(params).then(res => {
-            const { m } = res
-            this.$message.success(m || '成功')
-            this.data.bSwitch = false
-            this.$emit('refresh')
-          }).finally(res => {
-            this.loading=false
-          })
+            cate,
+            MED_REC_ID,
+            AAA29,
+            CWH,
+          };
+          console.log(params, "params");
+
+
+          this.loading = true;
+          addCaseQuality(params)
+            .then(res => {
+              const { m } = res;
+              this.$message.success(m || '成功');
+              this.data.bSwitch = false;
+              this.$emit('refresh');
+            })
+            .finally(res => {
+              this.loading = false;
+            });
         } else {
           return false;
         }
       });
-    }
-  }
-}
+    },
+    // 获取存储的 realname
+    getStoredRealname() {
+      const storedRealname = localStorage.getItem('realname');
+
+      if (storedRealname) {
+        // 如果 realname 是字符串,转换为数组
+        this.realname = storedRealname.split(',');
+        // 设置默认值
+        this.ruleForm.ZKR = this.realname;
+      }
+    },
+    // 接收人
+    getStaff() {
+      getStaffListData().then(res => {
+        const { data } = res;
+        if (data.length) {
+          data.forEach(ele => {
+            this.recipient.push({
+              id: ele.code,
+              name: ele.name,
+              base_code: ele.base_code,
+            });
+          });
+        }
+      });
+    },
+    filterRecipient(val) {
+      if (val) {
+        // 过滤逻辑,根据输入的值模糊匹配姓名和工号
+        this.recipient = this.recipient.filter(item => {
+          return item.name.includes(val) || item.id.includes(val);
+        });
+      } else {
+        // 若输入为空,显示所有选项
+        this.getStaff();
+      }
+    },
+    // 接收端
+    receivingEnd() {
+      getCaseCate().then(res => {
+        const { data } = res;
+        if (data.length) {
+          data.forEach(ele => {
+            this.receiving.push({
+              id: ele.id,
+              name: ele.name,
+            });
+          });
+        }
+      });
+    },
+    // 质控目录
+    zkSelectValue() {
+      getSelectValue()
+        .then(res => {
+          // 将接口返回的数据转换为 el-cascader 所需的格式
+          this.categoryOptions = this.transformData(res.data);
+        })
+        .catch(error => {
+          console.error('获取选择值时出现错误:', error);
+        });
+    },
+    // 转换数据格式
+    transformData(data) {
+      return data.map(item => ({
+        id: item.id,
+        label: item.field_name, // el-cascader 显示的字段
+        children: item.child ? this.transformData(item.child) : null, // 递归处理子节点
+      }));
+    },
+
+    // 处理选中的值
+    handleCategoryChange(value) {
+      // 根据选中的值执行逻辑
+      if (value.length > 0) {
+        const selectedIds = value; // 选中的 ID 数组
+        const selectedNames = this.getSelectedNames(value); // 选中的名称数组
+      }
+    },
+    // 获取选中的名称
+    getSelectedNames(selectedIds) {
+      let options = this.categoryOptions;
+      const names = [];
+      selectedIds.forEach(id => {
+        const item = options.find(opt => opt.id === id);
+        if (item) {
+          names.push(item.label);
+          if (item.children) options = item.children;
+        }
+      });
+      return names;
+    },
+    customFilterMethod(node, keyword) {
+      if (node.label.toLowerCase().includes(keyword.toLowerCase())) {
+        return true;
+      }
+
+      // 递归检查子节点
+      if (node.children && node.children.length > 0) {
+        return node.children.some(child => this.customFilterMethod(child, keyword));
+      }
+      return false;
+    },
+    handleCategoryChange(value) {
+      console.log('选中的值:', value);
+    },
+  },
+};
 </script>
 
 <style lang="scss" scoped>
 .demo-ruleForm {
- width: 95%;
+  width: 95%;
+}
+
+::v-deep .el-dialog__header {
+  background-color: hsl(205.32deg 43.43% 49.22%);
+}
+
+::v-deep .el-dialog__title {
+  color: #fff;
+}
+
+::v-deep .el-dialog__title {
+  color: #fff;
+}
+
+::v-deep .el-dialog__close {
+  color: #fff;
+  border: 1px solid #fff;
+  border-radius: 20px;
+}
+
+::v-deep .el-select .el-input__inner {
+  overflow: hidden;
+  white-space: nowrap;
+}
+
+::v-deep .el-select .el-select__tags {
+  display: flex;
+  flex-wrap: nowrap;
+  overflow-x: auto;
+  max-width: 100%;
+}
+
+::v-deep .el-select .el-select__tags::-webkit-scrollbar {
+  display: none;
+}
+
+::v-deep .el-select .el-select__tags {
+  -ms-overflow-style: none;
+  scrollbar-width: none;
+}
+
+::v-deep .el-select .el-tag {
+  margin-right: 4px;
+  white-space: nowrap;
 }
 </style>

+ 519 - 0
src/views/recordsRoom/qc/medicalRecord.vue

@@ -0,0 +1,519 @@
+<template>
+  <div class="container">
+    <div class="title-content">
+      <el-image class="zsIcon" :src="require('../../.././assets/images/zsicon.png')" fit="contain"></el-image>
+      <div class="title-contentIcon">病历智审结果</div>
+    </div>
+    <!-- 查询表单 -->
+    <div class="inputS">
+      <el-form ref="form" :model="form" label-width="80px">
+        <!-- 院区和科室在同一行 -->
+        <el-row class="custom-row">
+          <el-col :span="13">
+            <el-form-item label="院区">
+              <el-select v-model="form.region" placeholder="请选择院区">
+                <el-option v-for="campus in campusList" :key="campus.id" :label="campus.name"
+                  :value="campus.name"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="13">
+            <el-form-item label="科室">
+              <el-select v-model="form.department" placeholder="请选择科室">
+                <el-option v-for="item of deportments" :key="item.id" :label="item.name" :value="item.name" />
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <!-- 展开部分 -->
+        <div v-if="isExpanded">
+          <el-row>
+            <el-col :span="13">
+              <el-form-item label="病区">
+                <el-select v-model="form.ward" placeholder="请选择病区">
+                  <el-option v-for="item of deportments" :key="item.id" :label="item.name" :value="item.name" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="13">
+              <el-form-item label="管床">
+                <el-select v-model="form.bedManager" placeholder="请选择管床">
+                  <el-option v-for="pipe in pipeList" :key="pipe.id" :label="pipe.name" :value="pipe.name" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="13">
+              <el-form-item label="床号">
+                <el-input v-model="form.CWH" placeholder="请输入床号" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </div>
+      </el-form>
+
+      <!-- 查询按钮和展开/收起按钮 -->
+      <el-row>
+        <el-col :span="18" style="text-align: right">
+          <el-button type="primary" @click="onSubmit">查询</el-button>
+          <el-button type="text" @click="toggleExpand">
+            {{ isExpanded ? '收起' : '展开' }}
+            <i :class="isExpanded ? 'el-icon-arrow-up' : 'el-icon-arrow-down'" />
+          </el-button>
+        </el-col>
+      </el-row>
+    </div>
+
+    <!-- 数据表格 -->
+    <el-table :data="queryTableData" tooltip-effect="dark" @change="handleSizeChange" style="width: 100%"
+      v-if="!showQueryTable">
+      <el-table-column type="index" label="序号" width="50" v-loading="loading" />
+      <el-table-column prop="medicalRecordNumber" label="病案号" width="70">
+        <template #default="{ row }">
+          <el-button type="text" @click="openCaseQualityBox2(row)"
+            style="height: 32px; border-bottom: 2px solid rgb(64, 158, 255)">
+            {{ row.medicalRecordNumber }}
+          </el-button>
+        </template>
+      </el-table-column>
+      <el-table-column prop="bedNumber" label="床号" width="70" />
+      <el-table-column prop="admissionCount" label="住院次数" width="80" />
+      <el-table-column prop="homePageIssue" label="首页问题" width="80">
+        <template #default="{ row }">
+          <div class="message-badge">
+            <!-- 显示病历问题的值 -->
+            <span>{{ row.homePageIssue }}</span>
+            <!-- 消息提示标识 -->
+            <span v-if="row.medicalRecordIssue" class="dot">{{ medicalRecord }}</span>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column prop="medicalRecordIssue" label="病历问题" width="80">
+        <template #default="{ row }">
+          <div class="message-badge">
+            <!-- 显示病历问题的值 -->
+            <span>{{ row.medicalRecordIssue }}</span>
+            <!-- 消息提示标识 -->
+            <span v-if="row.medicalRecordIssue" class="dot">{{ errorV2 }}</span>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column prop="status" label="状态" width="50" />
+    </el-table>
+
+    <!-- 查询表格 -->
+    <el-table :data="queryTableData" tooltip-effect="dark" @change="handleSizeChange" style="width: 100%" v-else>
+      <el-table-column type="index" label="序号" width="50" />
+      <el-table-column prop="medicalRecordNumber" label="病案号" width="70">
+        <template #default="{ row }">
+          <el-button type="text" @click="openCaseQualityBox2(row)"
+            style="height: 32px; border-bottom: 2px solid rgb(64, 158, 255)">
+            {{ row.medicalRecordNumber }}
+          </el-button>
+        </template>
+      </el-table-column>
+      <el-table-column prop="bedNumber" label="床号" width="70" />
+      <el-table-column prop="admissionCount" label="住院次数" width="80" />
+      <el-table-column prop="homePageIssue" label="首页问题" width="80">
+        <template #default="{ row }">
+          <div class="message-badge">
+            <!-- 显示病历问题的值 -->
+            <span>{{ row.homePageIssue }}</span>
+            <!-- 消息提示标识 -->
+            <span v-if="row.medicalRecordIssue" class="dot">{{ medicalRecord }}</span>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column prop="medicalRecordIssue" label="病历问题" width="80">
+        <template #default="{ row }">
+          <div class="message-badge">
+            <!-- 显示病历问题的值 -->
+            <span>{{ row.medicalRecordIssue }}</span>
+            <!-- 消息提示标识 -->
+            <span v-if="row.medicalRecordIssue" class="dot">{{ errorV2 }}</span>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column prop="status" label="状态" width="50" />
+    </el-table>
+
+    <el-dialog :visible.sync="caseShow" custom-class="my-dialog" :modal="false" :show-close="false" width="420">
+      <CaseQualityBox v-if="showCaseDetails" :resultsList="results" :MED_REC_ID="selectedMedicalRecordNumber"
+        :CWH="selectedBedNumber" :in_hospital="selectedAdmissionCount" :AAA29="selectedAdmissionCount" @close="handleClose"
+        :caseShow="caseShow" ref="child" />
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { getStaffListData, getCampusArea, getPipeBedding, getNumberInfo, getCaseResultData, getCaseQuality } from '@/api/qc';
+import CaseQualityBox from './components/CaseQualityBox2';
+
+export default {
+  components: {
+    CaseQualityBox,
+  },
+  data() {
+    return {
+      dialogVisible: false,
+      loading: false, // 新增:加载状态
+      isExpanded: false, // 控制展开和折叠
+      form: {
+        region: '', // 院区
+        department: '', // 科室
+        ward: '', // 病区
+        bedManager: '', // 管床
+        CWH: '', // 床号
+      },
+      tableData: [],
+      showCaseDetails: false, // 控制 CaseQualityBox2 组件的显示
+      selectedMedicalRecordNumber: '', // 选中的病案号
+      selectedBedNumber: '', // 选中的床位号
+      selectedAdmissionCount: '', // 选中的住院次数
+      selectedStatus: '', // 选中的状态
+      employeeInformation: [],
+      multipleSelection: [],
+      tableHeight: 0, // 表格高度
+      campusList: [], // 存储院区信息的数组
+      pipeList: [], // 存储管床信息的数组
+      deportments: [], // 存储科室信息的数组
+      currentPage: 1,
+      pageSize: 10,
+      total: 0,
+      queryTableData: [], // 查询表格的数据
+      showQueryTable: false, // 是否显示查询表格
+      caseShow: false, // 是否显示病案详情
+      medicalRecord: '', // 消息内容
+      errorV2: '',
+    };
+  },
+  created() {
+    this.initData();
+    this.loadData({}); // 加载默认数据
+    window.addEventListener('resize', this.handleWindowResize);
+    this.handleWindowResize();
+    getCaseResultData().then(res => {
+      if (res.code === 200) {
+        this.tableData.forEach(row => {
+          this.getCaseQualityResults(row);
+        });
+      }
+    });
+  },
+  mounted() {
+    const observer = new MutationObserver(mutationsList => {
+      let sidebarFound = false;
+      let navbarFound = false;
+
+      for (const mutation of mutationsList) {
+        if (mutation.type === 'childList') {
+          const sidebar = document.querySelector('.sidebar-container');
+          const navbar = document.querySelector('.navbar');
+          const appMain = document.querySelector('.app-main');
+          const breadcrumbContainer = document.querySelector('.breadcrumb-container');
+
+          if (sidebar && !sidebarFound) {
+            sidebar.style.display = 'none';
+            sidebarFound = true;
+          }
+
+          if (navbar && !navbarFound) {
+            navbar.style.display = 'none';
+            navbarFound = true;
+          }
+
+          if (appMain) {
+            appMain.style.width = '100%';
+            appMain.style.paddingTop = '0px';
+            appMain.style.padding = '10px 10%';
+            appMain.style.background = '#fff';
+          }
+
+          if (breadcrumbContainer) {
+            breadcrumbContainer.style.display = 'none';
+          }
+
+          if (sidebarFound && navbarFound) {
+            observer.disconnect(); // 停止监听
+          }
+        }
+      }
+    });
+    observer.observe(document.documentElement, { childList: true, subtree: true });
+    this.getCaseQualityResults();
+  },
+  beforeDestroy() {
+    window.removeEventListener('resize', this.handleWindowResize);
+  },
+  methods: {
+    // 初始化数据
+    initData() {
+      this.getStaff();
+      this.getCampus();
+      this.getPipe();
+      this.message();
+      this.getDeportmentList();
+    },
+    // 切换展开/折叠状态
+    toggleExpand() {
+      this.isExpanded = !this.isExpanded;
+      this.handleWindowResize();
+    },
+    // 提交查询表单
+    onSubmit() {
+      const params = {
+        YQ: this.form.region,
+        KS: this.form.department,
+        BQ: this.form.ward,
+        GC: this.form.bedManager,
+        CH: this.form.CWH,
+        page: this.currentPage,
+        pageSize: this.pageSize,
+      };
+      this.loadData(params); // 重新加载数据
+    },
+    // 加载数据
+    loadData(params) {
+      this.loading = true; // 显示加载状态
+      getCaseResultData(params)
+        .then(res => {
+          if (res.code === 200) {
+            // 将接口返回的数据映射到表格数据结构
+            this.queryTableData = res.data.list.map(item => ({
+              medicalRecordNumber: item.MED_REC_ID, // 病案号
+              bedNumber: item.CWH, // 床号
+              admissionCount: item.AAA29, // 住院次数
+              homePageIssue: item.error, // 首页问题
+              medicalRecordIssue: item.medical, // 病历问题
+              status: item.in_hospital, // 状态
+            }));
+            this.total = res.data.count; // 更新总条数
+          } else {
+            this.$message.error(res.msg || '获取数据失败');
+          }
+        })
+        .catch(error => {
+          console.error('查询失败:', error);
+          this.$message.error('查询失败,请稍后重试');
+        })
+        .finally(() => {
+          this.loading = false; // 隐藏加载状态
+        });
+    },
+
+    // 每页条数变化
+    handleSizeChange(size) {
+      this.pageSize = size;
+      this.loadData({ page: 1, pageSize: this.pageSize }); // 直接加载数据,重置为第一页
+    },
+    // 处理排序
+    handleSortChange(column) {
+      console.log('排序字段:', column.prop, '排序方式:', column.order);
+      // 如果需要根据排序字段重新加载数据,可以在这里调用接口
+    },
+
+    // 打开病案详情组件
+    openCaseQualityBox2(row) {
+      var that = this;
+      this.$axios.post('/home_quality/getQualityResult', {
+        id: row.medicalRecordNumber
+      }).then(res => {
+        that.$nextTick(() => {
+          that.results = res.data;
+          that.$forceUpdate(); // 强制更新组件
+        });
+      })
+      this.selectedMedicalRecordNumber = row.medicalRecordNumber;
+      const MEDRECID = this.selectedMedicalRecordNumber;
+      localStorage.setItem('MEDRECID', MEDRECID);
+      this.selectedBedNumber = row.bedNumber;
+      this.selectedAdmissionCount = row.admissionCount;
+      this.selectedStatus = row.status;
+      this.showCaseDetails = true;
+      this.caseShow = true;
+      this.$nextTick(() => {
+        if (this.$refs.child) {
+          this.$refs.child.getData(row.medicalRecordNumber);
+          this.$refs.child.qualityBazb(row.medicalRecordNumber);
+        }
+      });
+    },
+    // 获取员工信息
+    getStaff() {
+      getStaffListData().then(res => {
+        if (res.code === 200) {
+          this.employeeInformation = res.data;
+        }
+      });
+    },
+    // 获取院区信息
+    getCampus() {
+      getCampusArea().then(res => {
+        const { data } = res;
+        // 直接遍历数组
+        data.forEach(campusName => {
+          this.campusList.push({
+            id: campusName,
+            name: campusName
+          });
+        });
+      });
+    },
+    // 获取管床信息
+    getPipe() {
+      getPipeBedding().then(res => {
+        const { data } = res;
+        console.log(data, "data222");
+        data.forEach(pipeList => {
+          this.pipeList.push({
+            id: pipeList,
+            name: pipeList
+          });
+        });
+      });
+    },
+    // 获取科室信息
+    getDeportmentList() {
+      this.$axios.get('/user/depDropDown').then(res => {
+        const { data } = res;
+        if (data.length) {
+          data.forEach(ele => {
+            this.deportments.push({
+              id: ele.dep_id,
+              name: ele.name,
+            });
+          });
+        }
+      });
+    },
+    // 获取消息信息
+    message() {
+      getNumberInfo().then(res => {
+        console.log(res, 'res消息');
+        this.medicalRecord = res.data.medicalRecord;
+        this.errorV2 = res.data.errorV2;
+      });
+    },
+    // 处理窗口大小改变事件
+    handleWindowResize() {
+      const formHeight = this.$el.querySelector('.inputS').offsetHeight;
+      this.tableHeight = window.innerHeight - formHeight - 40;
+    },
+    handleClose() {
+      this.caseShow = false; // 关闭弹框
+    }
+  },
+};
+</script>
+
+<style scoped lang="scss">
+.container {
+  position: fixed;
+  left: 0;
+  top: 0;
+  display: flex;
+  flex-direction: column;
+  height: 100vh;
+  width: 420px;
+}
+
+.title-content {
+  display: flex;
+  align-items: center;
+  padding: 12px;
+  font-size: 14px;
+
+  .zsIcon {
+    margin-right: 10px;
+    width: 37px;
+    height: 37px;
+  }
+
+  .title-contentIcon {
+    font-size: 16px;
+  }
+}
+
+::v-deep .my-dialog {
+  position: absolute;
+  left: 0;
+  top: 0;
+  width: 420px !important;
+  height: auto;
+  margin-top: 0px !important;
+}
+
+::v-deep .title-content {
+  padding: 0px 0px;
+}
+
+::v-deep .el-dialog__body {
+  margin-top: -20px;
+}
+
+::v-deep .el-col-12 {
+  width: 42%;
+}
+
+::v-deep .el-col-18 {
+  width: 100%;
+}
+
+::v-deep .el-tabs {
+  margin-top: 20px;
+}
+
+::v-deep .el-row {
+  display: flex;
+  margin-top: 30px;
+  margin-left: -37px;
+}
+
+::v-deep .el-dialog__body {
+  /* padding: 0px 0px; */
+  //   margin-top: -40px;
+  color: #606266;
+  font-size: 14px;
+  word-break: break-all;
+}
+
+.inputS {
+  margin-bottom: 50px;
+}
+
+.el-table {
+  flex: 1;
+}
+
+.dot {
+  display: inline-block;
+  width: 20px;
+  height: 20px;
+  line-height: 23px;
+  background-color: red;
+  border-radius: 50%;
+  color: #fff;
+  text-align: center;
+  margin: -10px 5px;
+}
+
+.el-form-item {
+  margin-bottom: 0px;
+}
+
+.el-form-item__label {
+  color: #000;
+}
+
+.el-form-item__content {
+  color: #000;
+}
+
+.el-form-item__label {
+  color: #000;
+}
+
+.el-form-item__content {
+  color: #000;
+}
+</style>