Quellcode durchsuchen

审核列表和单链接相关功能修改

liyanyan vor 1 Woche
Ursprung
Commit
5ba5a35189

+ 11 - 0
src/api/qc.js

@@ -1,6 +1,7 @@
 import request from '@/utils/request';
 import request2 from '@/utils/request_bazb';
 import request3 from '@/utils/request_api';
+import axios from '@/axios/index';
 
 // 病案室-质控列表
 export function getBlZkList(data) {
@@ -296,3 +297,13 @@ export function getSelectValue(data) {
     params: data,
   });
 }
+
+export function getBrry(params) {
+  return axios.get('/get_brry', {
+    params: params
+  })
+}
+
+export function setCorrection(data) {
+  return axios.post('/set_correction', data)
+}

+ 2 - 1
src/axios/index2.js

@@ -41,8 +41,9 @@ const service2 = axios.create({
 // 请求拦截器
 service2.interceptors.request.use(
   config => {
+    const { isNeedLoading = false } = config.data || {};
     const { NODE_ENV } = process.env
-    if (loadingCount == 0 && NODE_ENV !== 'development') {
+    if (!isNeedLoading && loadingCount == 0 && NODE_ENV == 'development') {
       loadingInstance = Loading.service({
         lock: false,
         customClass: 'z-index999',

+ 214 - 0
src/components/MedicalRecord/index.scss

@@ -0,0 +1,214 @@
+
+.btn-content {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  margin-top: 10px;
+
+  .btn-left {
+    display: flex;
+    align-items: center;
+    gap: 10px;
+  }
+
+  .btn-right {
+    display: flex;
+    justify-content: flex-end;
+    align-items: center;
+    gap: 10px;
+    flex: 1;
+  }
+
+  .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;
+}
+
+.zsIcon {
+  width: 35px;
+  height: 35px;
+}
+
+.ysIcon {
+  width: 30px;
+  height: 30px;
+}
+
+.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;
+  }
+
+  span {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    font-size: 12px;
+    position: absolute;
+    top: 2px;
+    right: 2px;
+    color: #fff;
+    z-index: 99;
+  }
+}
+
+.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;
+}
+
+.score-box div {
+  font-size: 20px;
+}
+
+.score-box .score-f {
+  padding-left: 20px;
+  font-size: 20px;
+  font-weight: bold;
+}
+
+.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: 100%;
+  // height: 182px;
+  line-height: 20px;
+  background-color: #f1f5fe;
+  color: rgba(16, 16, 16, 1);
+  font-size: 14px;
+  text-align: left;
+  font-family: -regular;
+  padding: 0 5px;
+  margin-bottom: 15px
+}
+
+.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;
+      }
+    }
+
+    &.jy {
+      &::before {
+        background: #78b2f1;
+      }
+    }
+  }
+}

+ 110 - 0
src/components/MedicalRecord/index.vue

@@ -0,0 +1,110 @@
+<template>
+    <div>
+        <div v-if="$route.query.from != 'review'">
+            <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">{{ responseData.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>
+        <div class="suggest-content" v-for="(items, index) in responseData.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 == 0"
+                            :src="require('@/assets/images/zsicon.png')" fit="contain"></el-image>
+                        <el-image class="ysIcon" v-if="items.is_artificial == 1"
+                            :src="require('@/assets/images/ysicon.png')" fit="contain"></el-image>
+                    </div>
+                    <p>
+                        <span class="bold">提示:</span>
+                        {{ items.desc }}
+                    </p>
+                    <p>
+                        <span class="bold">质控依据:</span>
+                        {{ items.basis }}
+                    </p>
+                </div>
+            </div>
+            <div class="btn-content" v-if="$route.query.from == 'review'">
+                <div class="btn-left" v-if="items.type == 2">
+                    <div class="appeal_progress" v-if="items.status == 0">
+                        申诉中
+                    </div>
+                    <div class="appeal_yes" v-if="items.status == 1" @click="openAppealDialog('appeal_yes', items, 1)">
+                        通过
+                    </div>
+                    <div class="appeal_no" v-if="items.status == 2" @click="openAppealDialog('appeal_no', items, 1)">
+                        驳回
+                    </div>
+                </div>
+
+                <div class="btn-right" v-if="items.type == 2 && items.status == 0">
+                    <div class="appeal_in_yes" @click="openAppealDialog('appeal_in_yes', items, 1)">
+                        通过
+                    </div>
+                    <div class="appeal_in_no" @click="openAppealDialog('appeal_in_no', items, 1)">
+                        驳回
+                    </div>
+                </div>
+            </div>
+            <div class="hz"></div>
+        </div>
+    </div>
+</template>
+<script>
+    export default {
+        data() {
+            return {
+                responseData: {
+
+                }
+            }
+        },
+        mounted() {
+            getData()
+        },
+        methods: {
+            getData() {
+                this.$axios.post('/home_quality/getQualityResult', {
+                    id: this.MEDRECID
+                }).then(res => {
+                    this.responseData = res.data; // 清空结果 
+                }).catch(e => {
+                    console.log(e);
+                });
+            }
+        }
+    }
+</script>
+<style lang="scss" scoped>
+@import './index.scss';
+</style>

+ 215 - 0
src/components/appealModal/index.vue

@@ -0,0 +1,215 @@
+<template>
+    <el-dialog :visible.sync="dialogVisible" custom-class="my-dialog" :modal="false" :title="getDialogTitle()"
+        width="40%">
+        <div class="medical-record" style="margin-top: 30px">
+            <el-descriptions>
+                <el-descriptions-item label="病案号">{{ baseInfo.AAA28 }}</el-descriptions-item>
+                <el-descriptions-item label="床号">{{ baseInfo.CH }}</el-descriptions-item>
+                <el-descriptions-item label="患者姓名">{{ baseInfo.BRXM }}</el-descriptions-item>
+            </el-descriptions>
+        </div>
+        <div class="reason" style="margin-top: 20px">
+            <el-form :disabled="dialogType == 'appeal_yes' || dialogType == 'appeal_no'" :model="appealForm"
+                :rules="appealRules" ref="appealFormRef" label-width="80px">
+                <el-form-item :label="`${getDialogTitle()}医师`" prop="doctor">
+                    <el-input v-model="appealForm.doctor" :placeholder="`请输入${getDialogTitle()}医师姓名及工号`"></el-input>
+                </el-form-item>
+                <el-form-item :label="`${getDialogTitle()}原因`" prop="reason">
+                    <el-input type="textarea" v-model="appealForm.reason" :placeholder="`请输入${getDialogTitle()}原因`"
+                        :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>
+                {{ dialogFormsLabel.zd_field_name }}
+            </p>
+            <p style="margin-top: 10px">
+                <span class="bold" style="color: #606266 !important">提示:</span>
+                {{ dialogFormsLabel.ts_desc }}
+            </p>
+        </div>
+        <template #footer v-if="dialogType != 'appeal_yes' && dialogType != 'appeal_no'">
+            <el-button type="primary" :style="{
+                backgroundColor: `${dialogType == 'appeal_in_no' ? '#ef1f3a' : dialogType == 'appeal_in_no' ? '#1b64b0' : ''}`
+            }" @click="submitAppeal()">
+                {{ getDialogTitle() }}
+            </el-button>
+        </template>
+    </el-dialog>
+</template>
+<script>
+import { examineAppeal, getAppealData, getBrry } from '@/api/qc';
+export default {
+  emits: ['onUpdate'],
+  data() {
+    return {
+      dialogVisible: false,
+      dialogType: '',
+      appealForm: {
+        reason: '',
+        phone: '',
+      },
+      appealRules: {
+        doctor: [{ required: true, message: '请输入', trigger: 'blur' }],
+        reason: [{ required: true, message: '请输入', trigger: 'blur' }],
+      },
+      currentId: '',
+      MEDRECID: '',
+      dialogFormsLabel: {
+        zd_field_name: '',
+        ts_desc: '',
+      },
+      qualityType: '',
+      baseInfo: {},
+    };
+  },
+  computed: {},
+  watch: {},
+  created() {
+  },
+  mounted() {
+    const { ZYH, id } = this.$route.query
+    this.MEDRECID = this.$route.path === '/whitelist-caseControl' || this.$route.path === '/whitelist-qualityResults'? id : ZYH;
+  },
+
+  methods: {
+    getDialogTitle() {
+      if(this.dialogType === 'appeal') {
+        return '申诉'
+      }
+      if(this.dialogType === 'appeal_in_yes' || this.dialogType === 'appeal_yes') {
+        return '通过'
+      }
+      if(this.dialogType === 'appeal_in_no' || this.dialogType === 'appeal_no') {
+        return '驳回'
+      }
+    },
+
+    getBaseInfo() {
+        getBrry({zyh: this.MEDRECID}).then(res => {
+          if (res.code == 200) {
+           this.baseInfo = res.data || {}
+          }
+        })
+    },
+        
+    async openAppealDialog(type, items, quality_type) {
+      this.dialogFormsLabel.zd_field_name = items.error_name || items.field_name || items.error_field;
+      this.dialogFormsLabel.ts_desc =  quality_type == 3 ?  items.notice : items.desc;
+      this.dialogType = type;
+      this.currentId = type === 'appeal' ? items.rule_id : items.appeal_id;
+      this.qualityType = quality_type
+      // 初始化 appealForm 的值
+      this.appealForm = {
+        doctor: '',
+        reason: ''
+      };
+      if(type === 'appeal_yes' || type === 'appeal_no') {
+        const params = {
+          id: items.rule_id || items.error_rule,
+          cate: items.cate,
+          ZYH: this.MEDRECID,
+        };
+        const res = await getAppealData(params);
+        this.appealForm.doctor = res.data.case_docter; // 驳回医师
+        this.appealForm.reason = res.data.reject_content; // 驳回原因
+      }
+      this.dialogVisible = true;
+      this.getBaseInfo()
+    },
+    submitAppeal() {
+      if (this.dialogType === 'appeal') {
+        // 申诉逻辑
+        const pramse = {
+          id: this.currentId,
+          zyh: this.MEDRECID,
+          type: 2,
+          quality_type: this.qualityType,
+          defect_content: this.appealForm.reason, // 使用 appealForm 中的原因
+          appeal_docter: this.appealForm.doctor, // 使用 appealForm 中的医师
+        };
+        console.log(pramse, 'pramse');
+
+        examineAppeal(pramse).then(res => {
+          this.$message({
+            message: '提交申诉成功',
+            type: 'success',
+          });
+          // 提交后关闭弹框
+          this.dialogVisible = false;
+          this.$emit('onUpdate')
+        });
+      }
+      // 申诉审核通过和驳回逻辑
+      if (this.dialogType === 'appeal_in_yes' || this.dialogType === 'appeal_in_no') {
+        const params = {
+          id: this.currentId,
+          type: this.activeName == 'first' ? 1 : this.activeName == 'second' ? 2 : 3,
+          status: this.dialogType === 'appeal_in_yes' ? 1 : 2,
+          reject_content: this.appealForm.reason, // 使用 appealForm 中的原因
+          case_docter: this.appealForm.doctor, // 使用 appealForm 中的医师
+        };
+        console.log(params, 'params');
+        this.$axios.post('/examineCaseAppeal', params).then(res => {
+          if (res.code == 200) {
+            this.$message({
+              message: `申诉${this.getDialogTitle()}成功`,
+              type: 'success',
+            });
+            // 提交后关闭弹框
+            this.dialogVisible = false;
+            this.$emit('onUpdate')
+          } else {
+            this.$message({
+              message: res.msg,
+              type: 'error',
+            });
+          }
+        })
+      }
+    },
+    handleIgnore(items, quality_type) {
+      const pramse = {
+        id: items.rule_id,
+        type: 1,
+        quality_type: quality_type,
+        quality_type,
+        zyh: this.MEDRECID
+      };
+
+      examineAppeal(pramse).then(res => {
+        this.$message({
+          message: '忽略成功',
+          type: 'success',
+        });
+        this.$emit('onUpdate')
+      });
+    },
+
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+::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-dialog__title {
+  color: #fff;
+}
+
+::v-deep .el-descriptions-item__label {
+  font-weight: bold;
+  font-size: 15px;
+}
+
+</style>

+ 79 - 1
src/styles/index.scss

@@ -130,4 +130,82 @@ div:focus {
 //   flex: 1;
 //   width: 100%;
 //   box-sizing: border-box;
-// }
+// }
+
+@mixin appealMixin() {
+  padding: 4px 6px;
+  font-size: 12px;
+  width: 60px;
+  text-align: center;
+  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_progress {
+  @include appealMixin();
+  background-color: #f5eddf;
+  color: #ec890e;
+  border: 1px solid#ec890e;
+  cursor: text
+}
+
+.appeal_yes {
+  @include appealMixin();
+  background-color: #e7f0dd;
+  color: #318240;
+  border: 1px solid #318240;
+  // cursor: text
+}
+
+.appeal_no {
+  @include appealMixin();
+  background-color: #ffdfdf;
+  color: #ef1f3a;
+  border: 1px solid #ef1f3a;
+  // cursor: text
+}
+
+.appeal {
+  @include appealMixin();
+  background-color: rgba(27, 100, 176, 1);
+  color: rgba(255, 255, 255, 1);
+}
+
+.appeal_in_progress {
+  @include appealMixin();
+  background-color: rgba(229, 229, 229, 1);
+  color: rgba(238, 138, 12, 1);
+  border: none;
+}
+
+.appeal_in_yes {
+  @include appealMixin();
+  background-color: #206ccf;
+  color: #fff;
+  border: none;
+}
+
+.appeal_in_no {
+  @include appealMixin();
+  background-color: #ef1f3a;
+  color: #fff;
+  border: none;
+}
+
+.appeal_in_ignore {
+  @include appealMixin();
+  background-color: rgba(229, 229, 229, 1);
+  color: #666666;
+  border: none;
+}
+
+.appeal_in_edit {
+  @include appealMixin();
+  background-color: #409eff;
+  color: rgba(255, 255, 255, 1);
+}

+ 4 - 19
src/views/allcase/caseControl.vue

@@ -1,6 +1,6 @@
 <template>
   <div ref="box" class="box" :class="{'nocopy': $route.meta.nocopy}">
-    <CaseQualityBox v-if="data.data" :data="data" :width="400" />
+    <CaseQualityBox :MED_REC_ID="this.$route.query.id" ref="CaseQualityBoxRef" :width="400" @onUpdate="getCaseQualityResults()"/>
   </div>
 </template>
 
@@ -19,30 +19,15 @@ import CaseQualityBox from './components/CaseQualityBox2.vue';
     mounted() {
       if(this.$route.query.id) {
         const self = this
-        self.getCaseQualityResults()
         this.timer = setInterval(() => {
-          self.getCaseQualityResults()
+          self.$refs.CaseQualityBoxRef.getTableData(true);
         }, 15000); 
       }
     },
-    destroyed() {
+    beforeDestroy() {
       clearInterval(this.timer)
     },
-    methods: {
-      // 获取新病案指控结果
-      getCaseQualityResults() {
-        const params = {
-          id: Number(this.$route.query.id),
-        };
-        this.$axios2.post('/get_case_quality_v2', params).then(res => {
-          this.data = null;
-          this.$nextTick(() =>{
-            this.data = res.data;
-          })
-         
-        });
-      }
-    }
+    methods: { }
   }
 </script>
 

+ 97 - 107
src/views/allcase/components/CaseQualityBox2.vue

@@ -111,26 +111,26 @@
 
 
       <el-scrollbar ref="scrollRef" class="scrollBox" :style="`height: ${scrollHeight}`">
-        <template v-for="(item, index) in tableData">
+        <template v-for="(item, index) in data.data">
           <!-- is_appeal: 是否申述 -->
-          <div class="list-box box-card" :key="index" v-if="is_show && (!item.is_appeal || (item.is_appeal == 1 && item.appeal_status == 2))">
+          <div class="list-box box-card" :key="index">
             <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="title-color">字段:</span><span>{{ item.category }}</span></div>
+                <div><span class="title-color">字段:</span><span>{{ item.error_field }}</span></div>
                 <div class="notice-box"><span class="title-color">提示:</span><span>{{ item.notice }}</span></div>
               </div>
             </div>
             <div class="list-basis-box">
-              <div class="list-basis-title" @click="clickListItem(index)">
+              <div class="list-basis-title" @click="item.basis && 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 class="typeImg" v-if="item.is_artificial == 0" :src="require('../../../assets/images/zsicon.png')" fit="contain">
                 </el-image>
-                <el-image v-else class="typeImg" :src="require('../../../assets/images/kefu.png')" fit="contain">
+                <el-image v-if="item.is_artificial == 1" class="typeImg" :src="require('../../../assets/images/ysicon.png')" fit="contain">
                 </el-image>
               </div>
               <div class="list-basis-text">
@@ -151,59 +151,62 @@
                     </div>
                   </div>
                 </div>
-                <div class="list-basis-bottom-box">
+                <div class="list-basis-bottom-box" v-if="$route.path == '/whitelist-caseControl'">
                   <div class="list-basis-bottom-tips">
-                    <el-tooltip class="appeal-status-box" effect="dark" :content="item.reject_content" placement="top">
-                      <el-button type="danger" class="appeal-status-2"  v-if="item.appeal_status == 2">驳回</el-button>
-                    </el-tooltip>
+                    <div class="appeal_no" @click="clickAppeal('appeal_no', item, 2 )" v-if="item.appeal_type == 2 && item.appeal_status == 2">驳回</div>
+                    <div class="appeal_progress" v-if="item.appeal_type == 2 && item.appeal_status == 0">申诉中</div>
+                    <div class="appeal_in_edit" @click="clickAppealEdit(item, 2)" v-if="item.is_artificial == 1">已整改</div>
                   </div>
-                  <div class="list-basis-bottom-btn" v-if="data.valData != 'sl_001'">
-                    <el-button type="primary" @click="clickAppeal( item,index,2 )">申诉</el-button>
-                    <el-button @click="clickAppeal( item,index,1 )">忽略</el-button>
+                  <div class="list-basis-bottom-btn" v-if="item.appeal_type == 0">
+                    <div class="appeal" @click="clickAppeal('appeal', item, 2 )">申诉</div>
+                    <div class="appeal_in_ignore" @click="clickAppeal('appeal_in_ignore', item, 2 )">忽略</div>
                   </div>
                 </div>
               </div>
-
             </div>
           </div>
         </template>
       </el-scrollbar>
     </div>
   </div>
-
+  <AppealModal ref="AppealModalRef" @onUpdate="getTableData()"/>
 </div>
 
 </template>
 
 <script>
 import Hamburger from '@/components/Hamburger';
+import AppealModal from '@/components/appealModal/index.vue'
+import { setCorrection } from '@/api/qc'
+
   export default {
     components: {
-      Hamburger
+      Hamburger,
+      AppealModal
     },
     props: {
-      data: {
-        type: Object,
-        default() {
-          return {
-            data: {}
-          }
-        }
-      },
-      mainHomeData: {
-        type: Object,
-        default() {
-          return {
-            data: {}
-          }
-        }
-      },
-      type:{
-        type: String,
-        default() {
-          return ''
-        }
-      },
+      // data: {
+      //   type: Object,
+      //   default() {
+      //     return {
+      //       data: {}
+      //     }
+      //   }
+      // },
+      // mainHomeData: {
+      //   type: Object,
+      //   default() {
+      //     return {
+      //       data: {}
+      //     }
+      //   }
+      // },
+      // type:{
+      //   type: String,
+      //   default() {
+      //     return ''
+      //   }
+      // },
       height: {
         type: Number,
         default() {
@@ -225,6 +228,7 @@ import Hamburger from '@/components/Hamburger';
     },
     data(){
       return {
+        data: {},
         inputMessage:'',//消息输入框
         chatMessages:[],//内容显示
         tabsActive:'3',//tabs选择
@@ -270,7 +274,7 @@ import Hamburger from '@/components/Hamburger';
         return `100%`
       }
     },
-    created(){
+    mounted(){
       this.getTableData();
       this.getTaskNameList();
     },
@@ -352,16 +356,45 @@ import Hamburger from '@/components/Hamburger';
           return content;
         }).catch(err => console.error(err));
       },
-      getTableData(){
-        let data = this.data.data;
-        for(let i=0; i<data.length; i++) {
-          data[i].show = true;
-        }
-        this.tableData = data;
-        if(Array.isArray(this.tableData)) {
-          let ruleId = this.storageGet('getDataRule');
-          this.tableData = this.tableData.filter(item => item.rule_id == ruleId).concat(this.tableData.filter(item => item.rule_id != ruleId))
-        }
+      getTableData(isRender = false){
+        const params = {
+          id: this.$props.MED_REC_ID,
+          isNeedLoading: isRender ? true : false
+        };
+        this.$axios2.post('/get_case_quality_v2', params).then(res => {
+          this.$nextTick(() =>{
+            console.log('this.data', this.data, res.data)
+            if(isRender && this.data.is_case != res.data.is_case) {
+              this.data = res.data;
+              this.data && this.data.data && Array.isArray(this.data.data)&& this.data.data.map((item) => {
+                item.show = false
+              })
+            } else {
+              this.data = res.data;
+              this.data && this.data.data && Array.isArray(this.data.data)&& this.data.data.map((item) => {
+                item.show = true
+              })
+            }
+          })
+        });
+      },
+      clickAppealEdit(item, quality_type) {
+        this.$confirm('是否确认已整改?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          setCorrection({
+            id: item.id,
+            quality_type
+          }).then(res => {
+            if(res.code == 200) {
+              this.$message.success('已整改成功!')
+              this.getTableData()
+            }
+          });
+        }).catch(() => {          
+        });
       },
       onScroll(index) {
         const el = this.$el.querySelector(`.category${index}`);
@@ -372,49 +405,16 @@ import Hamburger from '@/components/Hamburger';
         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)
-
+        this.data.data[idx].show = !this.data.data[idx].show
+        this.$forceUpdate();
       },
       // 点击申诉、忽略按钮
-      clickAppeal(i,idx,type){
-        let that = this;
-        let item = i;
-        let index = idx;
-        let tableData = that.tableData;
-        let params = {
-          id: item.id, // 质控错误结果的数据ID
-          zyh: item.JZHM,
-          type: type,
-          quality_type: that.quality_type,  // 1、首页质控 2、病例质控
-          appeal_document: that.data.appeal_document, //申诉科室名称
-          appeal_docter: that.data.appeal_docter,  // 申诉医生名称
+      clickAppeal(type,items,quality_type){
+        if(type == 'appeal_in_ignore') {
+          this.$refs.AppealModalRef.handleIgnore(items, quality_type)
+        } else {
+          this.$refs.AppealModalRef.openAppealDialog(type, items, quality_type)
         }
-        that.$axios2.post('/appeal', params).then(res => {
-          if(res.code == 200){
-            that.$message({
-              type: 'success',
-              message: res.msg
-            });
-
-            setTimeout( () =>{
-              tableData.splice(index,1);
-              that.tableData = tableData;
-            },2000)
-
-          }else{
-            that.$message({
-              type: 'error',
-              message: res.msg
-            });
-          }
-        })
       }
     }
   }
@@ -775,28 +775,18 @@ import Hamburger from '@/components/Hamburger';
       display: flex;
       align-items: center;
       justify-content: space-between;
+      padding: 0 10px;
       .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;
-          }
-        }
+        display: flex;
+        gap: 10px;
       }
       .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;
-        }
+        flex: 1;
+        display: flex;
+        justify-content: flex-end;
+        gap: 10px;
+        // width: auto;
       }
     }
 

+ 4 - 4
src/views/data/query/bmyQualityResult.vue

@@ -1,14 +1,14 @@
 <template>
   <div ref="box" class="box">
-    <bmyCaseQualityBox v-if="data" :data="data" :width="400"/>
+    <CaseQualityBox v-if="data" :data="data" :width="400"/>
   </div>
 </template>
 
 <script>
-import bmyCaseQualityBox from './components/bmyCaseQualityBox.vue';
-  export default {
+import CaseQualityBox from '@/views/recordsRoom/qc/components/CaseQualityBox2.vue';
+export default {
     components: {
-      bmyCaseQualityBox
+      CaseQualityBox
     },
     data() {
       return {

+ 1 - 1
src/views/data/query/qualityResults.vue

@@ -5,7 +5,7 @@
 </template>
 
 <script>
-import CaseQualityBox from './components/CaseQualityBox.vue';
+import CaseQualityBox from '@/views/recordsRoom/qc/components/CaseQualityBox2.vue';
   export default {
     components: {
       CaseQualityBox

+ 4 - 6
src/views/recordsRoom/qc/caseViews.vue

@@ -119,9 +119,7 @@
         <!-- status 不存在 意味着不脱敏、医院自助查询 -->
         <template v-if="!$route.query.status">
           <!-- 住院病案质控 -->
-          <CaseQualityBox 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" @changeTab="(e) => currentTab = e"/>
+          <CaseQualityBox ref="CaseQualityBoxRef" @changeTab="(e) => currentTab = e"/>
         </template>
       </div>
       <!-- 添加质控结果 -->
@@ -403,9 +401,8 @@ export default {
     },
     // 刷新质控结果
     handelRefreshResults() {
-      this.getCaseQualityResults()
-      if (this.$refs.CaseQualityBox) {
-        this.$refs.CaseQualityBox.getTabsData();
+      if (this.$refs.CaseQualityBoxRef) {
+        this.$refs.CaseQualityBoxRef.getTabsData();
       }
     },
     // 鼠标右击事件
@@ -694,6 +691,7 @@ export default {
     handleUpdate() {
       this.dialogData.bSwitch = false
       this.getInitData();
+      this.handelRefreshResults();
       this.caseShow = true
     }
   }

+ 257 - 460
src/views/recordsRoom/qc/components/CaseQualityBox2.vue

@@ -9,15 +9,16 @@
       <i class="el-icon-close" @click="closeClick"></i>
     </div> -->
     <!-- tab选项卡 -->
-    <el-tabs class="custom-tabs" v-model="activeName" :stretch="true">
+    <el-tabs class="custom-tabs" v-model="activeName" :stretch="true" v-if="!($route.path == '/whitelist-qualityResults' || $route.path == '/whitelist-bmyQualityResult')">
       <el-tab-pane v-for="item in tabList" :key="item.name" :label="item.label" :name="item.name">
-        <span slot="label">
+        <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'">
+      </el-tab-pane>
+    </el-tabs>
+      <!-- 病案首页 -->
+      <div class="first-content" v-if="activeName === 'first'">
             <div v-if="$route.query.from != 'review'">
               <div
                 class="score-box score-box_bl"
@@ -29,7 +30,7 @@
                 }"
               >
                 <span>首页评分</span>
-                <span class="score">{{ resultsList.score.score }}</span>
+                <span class="score">{{ resultsList.score && resultsList.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 == '良'"
@@ -81,283 +82,231 @@
                   </p>
                 </div>
               </div>
-              <div class="btn-content" v-if="$route.query.from == 'review'">
+              <div class="btn-content" v-if="$route.query.from == 'review' || $route.path == '/whitelist-qualityResults'">
                 <div class="btn-left" v-if="items.type == 2">
                   <div class="appeal_progress" v-if="items.status == 0">
                     申诉中
                   </div>
-                  <div class="appeal_yes" v-if="items.status == 1" @click="openAppealDialog('appeal_yes', items)">
+                  <div class="appeal_yes" v-if="items.status == 1" @click="openAppealDialog('appeal_yes', items, 1)">
                     通过
                   </div>
-                  <div class="appeal_no" v-if="items.status == 2" @click="openAppealDialog('appeal_no', items)">
+                  <div class="appeal_no" v-if="items.status == 2" @click="openAppealDialog('appeal_no', items, 1)">
                     驳回
                   </div>
+                  <div class="appeal_in_edit" @click="clickAppealEdit(items, 1)" v-if="$route.path == '/whitelist-qualityResults' && items.is_artificial == 1">已整改</div>
                 </div>
-                 
-                <div class="btn-right" v-if="items.type == 2 && items.status == 0">    
-                  <div class="appeal_in_yes" @click="openAppealDialog('appeal_in_yes', items)">
-                    通过
+                <div class="btn-right" v-if="$route.path == '/whitelist-qualityResults' && items.type == 0">    
+                  <div class="appeal_in_yes" @click="openAppealDialog('appeal', items, 1)">
+                    申诉
                   </div>
-                  <div class="appeal_in_no" @click="openAppealDialog('appeal_in_no', items)">
-                    驳回
+                  <div class="appeal_in_no" @click="openAppealDialog('appeal_in_ignore', items, 1)">
+                    忽略
                   </div>
                 </div>
-              </div>
-              <div class="btn-content" v-else>
-                <div class="btn-left" v-if="items.type == 2">
-                  <div class="appeal_progress" v-if="items.status == 0">
-                    申诉中
+                <div class="btn-right" v-if="$route.query.from == 'review' && items.type == 2 && items.status == 0">    
+                  <div class="appeal_in_yes" @click="openAppealDialog('appeal_in_yes', items, 1)">
+                    通过
+                  </div>
+                  <div class="appeal_in_no" @click="openAppealDialog('appeal_in_no', items, 1)">
+                    驳回
                   </div>
-                </div>
-                <div class="btn-right">
-                  <div v-if="items.type === 0" class="appeal" @click="openAppealDialog('appeal', items, 2)">申诉</div>
-                  <div v-if="items.type === 0 || items.type === 3" @click="handleIgnore(items, MED_REC_ID, 1, index)" class="ignore">忽略</div>
                 </div>
               </div>
               <div class="hz"></div>
             </div>
+      </div>
+      <!-- 编码员 -->
+      <div class="first-content" v-if="activeName === 'third'">
+        <div v-if="$route.query.from != 'review'">
+          <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="first-content" v-if="item.name === 'third'">
-            <div v-if="$route.query.from != 'review'">
-              <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 class="legend-box">
+            <span class="qz">强制</span>
+            <span class="jy">建议</span>
+          </div>
+        </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 == 0" :src="require('../../../../assets/images/zsicon.png')" fit="contain"></el-image>
+                <el-image class="ysIcon" v-if="items.is_artificial == 1" :src="require('../../../../assets/images/ysicon.png')" fit="contain"></el-image>
               </div>
-              <div class="legend-box">
-                <span class="qz">强制</span>
-                <span class="jy">建议</span>
+              <p>
+                <span class="bold">提示:</span>
+                {{ items.desc }}
+              </p>
+              <p>
+                <span class="bold">质控依据</span>
+                {{ items.basis }}
+              </p>
+            </div>
+          </div>
+          <div class="btn-content" v-if="$route.query.from == 'review' || $route.path == '/whitelist-bmyQualityResult'">
+            <div class="btn-left" v-if="items.type == 2">
+              <div class="appeal_progress" v-if="items.status == 0">
+                申诉中
+              </div>
+              <div class="appeal_yes" v-if="items.status == 1" @click="openAppealDialog('appeal_yes', items, 2)">
+                通过
               </div>
+              <div class="appeal_no" v-if="items.status == 2" @click="openAppealDialog('appeal_no', items, 2)">
+                驳回
+              </div>
+              <div class="appeal_in_edit" @click="clickAppealEdit(items, 3)" v-if="$route.path == '/whitelist-bmyQualityResult' && items.is_artificial == 1">已整改</div>
             </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 == 0" :src="require('../../../../assets/images/zsicon.png')" fit="contain"></el-image>
-                    <el-image class="ysIcon" v-if="items.is_artificial == 1" :src="require('../../../../assets/images/ysicon.png')" fit="contain"></el-image>
-                  </div>
-                  <p>
-                    <span class="bold">提示:</span>
-                    {{ items.desc }}
-                  </p>
-                  <p>
-                    <span class="bold">质控依据</span>
-                    {{ items.basis }}
-                  </p>
-                </div>
+            <div class="btn-right" v-if="$route.path == '/whitelist-bmyQualityResult' && items.type == 0">    
+              <div class="appeal_in_yes" @click="openAppealDialog('appeal', items, 1)">
+                申诉
               </div>
-              <div class="btn-content" v-if="$route.query.from == 'review'">
-                <div class="btn-left" v-if="items.type == 2">
-                  <div class="appeal_progress" v-if="items.status == 0">
-                    申诉中
-                  </div>
-                  <div class="appeal_yes" v-if="items.status == 1" @click="openAppealDialog('appeal_yes', items)">
-                    通过
-                  </div>
-                  <div class="appeal_no" v-if="items.status == 2" @click="openAppealDialog('appeal_no', items)">
-                    驳回
-                  </div>
-                </div>
-                 
-                <div class="btn-right" v-if="items.type == 2 && items.status == 0">    
-                  <div class="appeal_in_yes" @click="openAppealDialog('appeal_in_yes', items)">
-                    通过
-                  </div>
-                  <div class="appeal_in_no" @click="openAppealDialog('appeal_in_no', items)">
-                    驳回
-                  </div>
-                </div>
+              <div class="appeal_in_no" @click="openAppealDialog('appeal_in_ignore', items, 1)">
+                忽略
               </div>
-              <div class="btn-content" v-else>
-                <div class="btn-left" v-if="items.type == 2">
-                  <div class="appeal_progress" v-if="items.status == 0">
-                    申诉中
-                  </div>
-                </div>
-                <div class="btn-right">
-                  <div v-if="items.type === 0" class="appeal" @click="openAppealDialog('appeal', items, 2)">申诉</div>
-                  <div v-if="items.type === 0 || items.type === 3" @click="handleIgnore(items, MED_REC_ID, 3, index)" class="ignore">忽略</div>
-                </div>
+            </div>
+            <div class="btn-right" v-if="$route.query.from == 'review' && items.type == 2 && items.status == 0">    
+              <div class="appeal_in_yes" @click="openAppealDialog('appeal_in_yes', items, 2)">
+                通过
+              </div>
+              <div class="appeal_in_no" @click="openAppealDialog('appeal_in_no', items, 2)">
+                驳回
               </div>
-              <div class="hz"></div>
             </div>
           </div>
-          <!-- 住院病历 -->
-          <div class="second-content" v-if="item.name === 'second'">
-            <div v-if="$route.query.from != 'review'" 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>
+          <div class="hz"></div>
+        </div>
+      </div>
+      <!-- 住院病历 -->
+      <div class="second-content" v-if="activeName === 'second'">
+        <div v-if="$route.query.from != 'review'" 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="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 == 0" :src="require('../../../../assets/images/zsicon.png')" fit="contain"></el-image>
+                <el-image class="ysIcon" v-if="items.is_artificial == 1" :src="require('../../../../assets/images/ysicon.png')" fit="contain"></el-image>
+              </div>
+              <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="list-basis-text-t" :class="items.show?'show':''">
+            <div v-for="(yItem, yIndex) of items.basis" :key="yIndex" style="margin-bottom: 10px;">
+              <div v-if="items.rule_id !== 6">
+                <span class="span-index">{{ yIndex+1 }}</span>
+                <span v-if="items.category=='入院记录'">
+                <span v-for="(cItem, cIndex) of yItem" :key="cIndex" @click="hightRight(cItem,292,item.JZHM)" v-html="cItem"></span>
+              </span>
+                <span v-else>
+                <span v-for="(cItem, cIndex) of yItem" :key="cIndex" v-html="cItem"></span>
               </span>
+              </div>
+              <div v-else>
+                <span class="span-index">1</span>
+                <span style="font-size: 13px;">{{ yItem[0] }}</span>
+              </div>
             </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="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 == 0" :src="require('../../../../assets/images/zsicon.png')" fit="contain"></el-image>
-                    <el-image class="ysIcon" v-if="items.is_artificial == 1" :src="require('../../../../assets/images/ysicon.png')" fit="contain"></el-image>
-                  </div>
-                  <p>
-                    <span class="bold">提示:</span>
-                    {{ items.notice }}
-                  </p>
-                </div>
+          </div>
+          <div class="btn-content" v-if="$route.query.from == 'review'">
+            <div class="btn-left" v-if="items.appeal_type == 2">
+              <div class="appeal_progress" v-if="items.appeal_status == 0">
+                申诉中
               </div>
-              <div class="gist" @click="clickListItem(index)">
-                <div class="gist-zkyj">质控依据&gt;&gt;</div>
+              <div class="appeal_yes" v-if="items.appeal_status == 1" @click="openAppealDialog('appeal_yes', items, 3)">
+                通过
               </div>
-              <div class="gist-center" v-if="items.show">
-                {{ items.desc ? items.desc : '' }}
+              <div class="appeal_no" v-if="items.appeal_status == 2" @click="openAppealDialog('appeal_no', items, 3)">
+                驳回
               </div>
-              <div class="btn-content" v-if="$route.query.from == 'review'">
-                <div class="btn-left" v-if="items.appeal_type == 2">
-                  <div class="appeal_progress" v-if="items.appeal_status == 0">
-                    申诉中
-                  </div>
-                  <div class="appeal_yes" v-if="items.appeal_status == 1" @click="openAppealDialog('appeal_yes', items)">
-                    通过
-                  </div>
-                  <div class="appeal_no" v-if="items.appeal_status == 2" @click="openAppealDialog('appeal_no', items)">
-                    驳回
-                  </div>
-                </div>
-                 
-                <div class="btn-right" v-if="items.appeal_type == 2 && items.appeal_status == 0">    
-                  <div class="appeal_in_yes" @click="openAppealDialog('appeal_in_yes', items)">
-                    通过
-                  </div>
-                  <div class="appeal_in_no" @click="openAppealDialog('appeal_in_no', items)">
-                    驳回
-                  </div>
-                </div>
+            </div>
+              
+            <div class="btn-right" v-if="items.appeal_type == 2 && items.appeal_status == 0">    
+              <div class="appeal_in_yes" @click="openAppealDialog('appeal_in_yes', items, 3)">
+                通过
               </div>
-              <div class="btn-content" v-else>
-                <div class="btn-left" v-if="items.appeal_type == 2">
-                  <div class="appeal_progress" v-if="items.appeal_status == 0">
-                    申诉中
-                  </div>
-                </div>
-                <div class="btn-right" v-if="items.is_warning_msg != 1">
-                  <div v-if="items.appeal_type === 0" class="appeal" @click="openAppealDialog('appeal', items, 2)">申诉</div>
-                  <div v-if="items.appeal_type === 0 || items.appeal_type === 3" @click="handleIgnore(items, MED_REC_ID, 2, index)" class="ignore">忽略</div>
-                </div>
+              <div class="appeal_in_no" @click="openAppealDialog('appeal_in_no', items, 3)">
+                驳回
               </div>
-              <div class="hz"></div>
             </div>
           </div>
-        </template>
-      </el-tab-pane>
-    </el-tabs>
-    <el-dialog :visible.sync="dialogVisible" custom-class="my-dialog" :modal="false" :title="getDialogTitle()" 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 :disabled="dialogType == 'appeal_yes' || dialogType == 'appeal_no'" :model="appealForm" :rules="appealRules" ref="appealFormRef" label-width="80px">
-          <el-form-item :label="`${getDialogTitle()}医师`" prop="doctor">
-            <el-input v-model="appealForm.doctor" :placeholder="`请输入${getDialogTitle()}医师姓名及工号`"></el-input>
-          </el-form-item>
-          <el-form-item :label="`${getDialogTitle()}原因`" prop="reason">
-            <el-input type="textarea" v-model="appealForm.reason" :placeholder="`请输入${getDialogTitle()}原因`" :rows="2"></el-input>
-          </el-form-item>
-        </el-form>
+          <div class="hz"></div>
+        </div>
       </div>
-      <div class="cont-reight-bottom-conter" style="color: #606266 !important">
-        <p>
-          <span class="bold" style="color: #606266 !important">字段:</span>
-          {{ dialogFormsLabel.zd_field_name }}
-        </p>
-        <p style="margin-top: 10px">
-          <span class="bold" style="color: #606266 !important">提示:</span>
-          {{ dialogFormsLabel.ts_desc }}
-        </p>
-      </div>
-      <template #footer v-if="dialogType != 'appeal_yes' && dialogType != 'appeal_no'">
-        <el-button
-          type="primary" 
-          :style="{
-            backgroundColor: `${dialogType == 'appeal_in_no' ? '#ef1f3a' : dialogType == 'appeal_in_no' ? '#1b64b0' : '' }`
-          }" 
-          @click="submitAppeal(MED_REC_ID)"
-        >
-          {{ getDialogTitle() }}
-        </el-button>
-      </template>
-    </el-dialog>
+    <AppealModal ref="AppealModalRef" @onUpdate="getTabsData()"/>
   </div>
 </template>
 
 <script>
 import { examineAppeal, examineReview, getCaseQualityBazb, getAppealData, getNumberInfo } from '@/api/qc';
+import AppealModal from '@/components/appealModal/index.vue'
+import { setCorrection } from '@/api/qc'
+
 export default {
   emits: ['changeTab'],
-  props: {
-    MED_REC_ID: {
-      type: [String, Number], // 根据实际类型定义
-      required: true, // 是否必传
-    },
-    CWH: {
-      type: [String, Number], // 根据实际类型定义
-      required: true,
-    },
-    AAA29: {
-      type: [String, Number], // 根据实际类型定义
-      required: true,
-    },
+  components: {
+    AppealModal
   },
+  props: {},
   data() {
     return {
-      activeName: 'first',
+      activeName: this.$route.path == '/whitelist-bmyQualityResult' ? 'third' : 'first',
       tabList: [
         {
           label: '病案首页',
@@ -392,7 +341,7 @@ export default {
         score: 100, // 示例数据
         data: [], // 示例数据
       },
-      resultsList: [],
+      resultsList: {},
       controls: {
         ZYH: '',
         score: {
@@ -428,7 +377,7 @@ export default {
        * 丙<75分
        * */
       let str;
-      const { score } = this.data;
+      const { score } = this.data || {};
       console.log(score, 'score12');
 
       if (score > 90) {
@@ -476,9 +425,11 @@ export default {
   created() {
   },
   mounted() {
-    const { ZYH } = this.$route.query
-    this.MEDRECID = ZYH;
-    this.getMessageNum(ZYH);
+    const { ZYH, id } = this.$route.query
+    this.MEDRECID = this.$route.path == '/whitelist-qualityResults' ? id : ZYH;
+    if(!(this.$route.path == '/whitelist-qualityResults' || this.$route.path == '/whitelist-bmyQualityResult')) {
+      this.getMessageNum(ZYH);
+    }
     this.getTabsData()
   },
 
@@ -596,7 +547,7 @@ export default {
 
         list.map(item => {
           item.basis.map(bItem => {
-            const { user, zd, ss } = bItem.location;
+            const { user, zd, ss} = bItem.location || {};
             if (user && user.length) {
               user.map(uItem => {
                 if (item.level) {
@@ -674,111 +625,11 @@ export default {
         }
       });
     },
-    async openAppealDialog(type, items, index) {
-      console.log(items, index, 'items');
-      this.dialogFormsLabel.zd_field_name = items.error_name || items.field_name || items.error_field;
-      if (items.cate === 3) {
-        this.dialogFormsLabel.ts_desc = items.basises;
+    async openAppealDialog(type, items, quality_type) {
+      if(type == 'appeal_in_ignore') {
+        this.$refs.AppealModalRef.handleIgnore(items, quality_type)
       } else {
-        this.dialogFormsLabel.ts_desc = items.desc;
-      }
-      this.dialogType = type;
-      this.currentId = type === 'appeal' ? items.rule_id : items.appeal_id;
-      // 初始化 appealForm 的值
-      this.appealForm = {
-        doctor: '',
-        reason: ''
-      };
-      if(type === 'appeal_yes' || type === 'appeal_no') {
-        const params = {
-          id: items.rule_id || items.error_rule,
-          cate: items.cate,
-          ZYH: this.MEDRECID,
-        };
-        const res = await getAppealData(params);
-        this.appealForm.doctor = res.data.case_docter; // 驳回医师
-        this.appealForm.reason = res.data.reject_content; // 驳回原因
-      }
-      this.dialogVisible = true;
-    },
-    async fetchAppealInfo(type, items, index, MEDRECID) {
-      this.dialogFormsLabel.zd_field_name = items.error_name || items.field_name || items.error_field;
-      if (items.cate === 3) {
-        this.dialogFormsLabel.ts_desc = items.basises;
-      } else {
-        this.dialogFormsLabel.ts_desc = items.desc;
-      }
-      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.appealForm.doctor = res.data.case_docter; // 驳回医师
-          this.appealForm.reason = res.data.reject_content; // 驳回原因
-        }
-        // 将接口返回的数据渲染到表单中
-      } catch (error) {
-        console.error('获取驳回信息失败:', error);
-      }
-    },
-    submitAppeal() {
-
-      if (this.dialogType === 'appeal') {
-        // 申诉逻辑
-        const pramse = {
-          id: this.currentId,
-          zyh: this.MEDRECID,
-          type: 2,
-          quality_type: this.activeName == 'first' ? 1 : this.activeName == 'second' ? 2 : 3,
-          defect_content: this.appealForm.reason, // 使用 appealForm 中的原因
-          appeal_docter: this.appealForm.doctor, // 使用 appealForm 中的医师
-        };
-        console.log(pramse, 'pramse');
-
-        examineAppeal(pramse).then(res => {
-          this.$message({
-            message: '提交申诉成功',
-            type: 'success',
-          });
-          this.getTabsData()
-          // 提交后关闭弹框
-          this.dialogVisible = false;
-        });
-      }
-      // 申诉审核通过和驳回逻辑
-      if (this.dialogType === 'appeal_in_yes' || this.dialogType === 'appeal_in_no') {
-        const params = {
-          id: this.currentId,
-          type: this.activeName == 'first' ? 1 : this.activeName == 'second' ? 2 : 3,
-          status: this.dialogType === 'appeal_in_yes' ? 1 : 2,
-          reject_content: this.appealForm.reason, // 使用 appealForm 中的原因
-          case_docter: this.appealForm.doctor, // 使用 appealForm 中的医师
-        };
-        console.log(params, 'params');
-        this.$axios.post('/examineCaseAppeal', params).then(res => {
-          if (res.code == 200) {
-            this.$message({
-              message: `申诉${this.getDialogTitle()}成功`,
-              type: 'success',
-            });
-            this.getTabsData()
-            // 提交后关闭弹框
-            this.dialogVisible = false;
-          } else {
-            this.$message({
-              message: res.msg,
-              type: 'error',
-            });
-          }
-        })
+        this.$refs.AppealModalRef.openAppealDialog(type, items, quality_type)
       }
     },
     getTabsData() {
@@ -795,30 +646,24 @@ export default {
         this.getData();
       }
     },
-    handleIgnore(items, MEDRECID, type, index) {
-      const pramse = {
-        id: items.rule_id,
-        type: 1,
-        quality_type: this.activeName == 'first' ? 1 : this.activeName == 'second' ? 2 : 3,
-        zyh: this.MEDRECID
-      };
-
-      examineAppeal(pramse).then(res => {
-        console.log(res, 'examineAppeal for ignore');
-        this.$message({
-          message: '忽略成功',
-          type: 'success',
+    clickAppealEdit(item, quality_type) {
+        this.$confirm('是否确认已整改?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          setCorrection({
+            id: item.id,
+            quality_type
+          }).then(res => {
+            if(res.code == 200) {
+              this.$message.success('已整改成功!')
+              this.getTabsData()
+            }
+          });
+        }).catch(() => {          
         });
-      });
-
-      if (type == 1) {
-        this.resultsList.list.splice(index, 1);
-      } else if (type == 2) {
-        this.medicalRecord.splice(index, 1);
-      } else if (type == 3) {
-        this.controls.list.splice(index, 1);
-      }
-    },
+      },
     clickListItem(idx) {
       this.medicalRecord[idx].show = !this.medicalRecord[idx].show
     },
@@ -853,49 +698,35 @@ export default {
   padding: 0 15px;
 }
 
+.list-basis-text-t {
+  height: 0;
+  overflow: hidden;
+  position: relative;
+  &.show{
+    height: auto;
+    padding: 10px 0 10px 10px;
+  }
+}
+
+.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;
+}
+
 .btn-content {
   display: flex;
   align-items: center;
   justify-content: space-between;
   margin-top: 10px;
-  // padding: 0px 10px;
-  @mixin appealMixin() {
-    padding: 4px 6px;
-    font-size: 12px;
-    width: 60px;
-    text-align: center;
-    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_progress {
-    @include appealMixin();
-    background-color: #f5eddf;
-    color: #ec890e;
-    border: 1px solid#ec890e;
-    cursor: text
-  }
-
-  .appeal_yes {
-    @include appealMixin();
-    background-color: #e7f0dd;
-    color: #318240;
-    border: 1px solid #318240;
-    // cursor: text
-  }
-
-  .appeal_no {
-    @include appealMixin();
-    background-color: #ffdfdf;
-    color: #ef1f3a;
-    border: 1px solid #ef1f3a;
-    // cursor: text
-  }
 
   .btn-left {
     display: flex;
@@ -909,56 +740,6 @@ export default {
     align-items: center;
     gap: 10px;
     flex: 1;
-    // margin-right: 10px;
-    // margin-top: 10px;
-    .appeal {
-      @include appealMixin();
-      background-color: rgba(27, 100, 176, 1);
-      color: rgba(255, 255, 255, 1);
-    }
-
-    .appeal_in_progress {
-      @include appealMixin();
-      background-color: rgba(229, 229, 229, 1);
-      color: rgba(238, 138, 12, 1);
-      border: none;
-    }
-
-    .appeal_in_yes {
-      @include appealMixin();
-      background-color: #206ccf;
-      color: #fff;
-      border: none;
-    }
-
-    .appeal_in_no {
-      @include appealMixin();
-      background-color: #ef1f3a;
-      color: #fff;
-      border: none;
-    }
-
-    .ignore {
-      @include appealMixin();
-      background-color: rgba(229, 229, 229, 1);
-      color: #666666;
-      border: none;
-    }
-
-    // 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 {
@@ -1038,6 +819,10 @@ export default {
 
 .second-content {
   padding: 0 10px 10px 10px;
+  width: 100%;
+  height: calc(100% - 55px) !important;
+  overflow-y: scroll;
+  box-sizing: border-box;
 
   .score-second {
     width: 300px;
@@ -1248,6 +1033,10 @@ export default {
 
 .first-content {
   padding: 0 10px 10px 10px;
+  width: 100%;
+  height: calc(100% - 55px) !important;
+  overflow-y: scroll;
+  box-sizing: border-box;
 
   .message-tip {
     display: inline-block;
@@ -1413,6 +1202,7 @@ export default {
     align-items: center;
     justify-content: center;
     padding: 10px 0;
+    flex-shrink: 0;
 
     &.hover-1 {
       background: rgb(254, 240, 240);
@@ -1463,6 +1253,7 @@ export default {
   flex-direction: column;
   align-items: center;
   justify-content: center;
+  flex-shrink: 0;
 }
 
 .cont-reight-bottom-title-null {
@@ -1479,6 +1270,7 @@ export default {
   flex-direction: column;
   align-items: center;
   justify-content: center;
+  flex-shrink: 0;
 }
 
 .cont-reight-bottom-conter {
@@ -1498,6 +1290,8 @@ export default {
   p {
     font-size: 14px;
     color: #666666;
+    width: 100%;
+    word-break: break-all;
   }
 }
 
@@ -1587,12 +1381,15 @@ export default {
   width: 100%;
   height: 100%;
   display: flex;
+  background-color: #fff;
+  flex-direction: column;
   .custom-tabs {
     flex: 1;
     width: 100%;
     ::v-deep.el-tabs__content {
-      height: calc(100% - 55px) !important;
-      overflow-y: scroll;
+      // height: calc(100% - 55px) !important;
+      // overflow-y: scroll;
+      height: 0;
     }
   }
 }

+ 20 - 10
src/views/recordsRoom/qc/components/CreateControlResultDialog.vue

@@ -16,17 +16,17 @@
         <el-row :gutter="24">
           <el-col :span="8">
             <el-form-item label="病案号">
-              <el-input  v-model="AAA28" disabled placeholder="请输入病案号"></el-input>
+              <el-input  v-model="baseInfo.AAA28" disabled placeholder="请输入病案号"></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="8">
             <el-form-item label="床位号">
-              <el-input v-model="CWH" disabled placeholder="请输入床位号"></el-input>
+              <el-input v-model="baseInfo.CH" disabled placeholder="请输入床位号"></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="8">
-            <el-form-item label="住院次数">
-              <el-input v-model="AAA29" disabled placeholder="请输入住院次数"></el-input>
+            <el-form-item label="患者姓名">
+              <el-input v-model="baseInfo.BRXM" disabled placeholder="请输入患者姓名"></el-input>
             </el-form-item>
           </el-col>
         </el-row>
@@ -43,7 +43,7 @@
               <el-select v-model="ruleForm.JSR" filterable clearable multiple :filter-method="filterRecipient"
                 placeholder="请选择接收人" style="width: 100%" @change="handleJSRChange">
                 <el-option v-for="item of recipient" :key="item.code" :label="`${item.name} ${item.code}`"
-                  :value="item.code" />
+                  :value="`${item.code}`" />
               </el-select>
             </el-form-item>
           </el-col>
@@ -51,7 +51,7 @@
             <el-form-item label="接收科室" prop="JSKS">
               <el-select v-model="ruleForm.JSKS" filterable clearable multiple :filter-method="filterDeportments"
                          placeholder="请选择接收科室" style="width: 100%" disabled>
-                <el-option v-for="(item,index) of deportments" :key="index" :label="`${item.name}`" :value="item.dep_id" />
+                <el-option v-for="(item,index) of deportments" :key="index" :label="`${item.name}`" :value="`${item.dep_id}`" />
               </el-select>
             </el-form-item>
           </el-col>
@@ -160,7 +160,7 @@
 </template>
 
 <script>
-import { getRuleData, getBlInfo, addCaseQuality, getStaffListData, getCaseCate, getSelectValue } from '@/api/qc';
+import { getRuleData, getBlInfo, addCaseQuality, getStaffListData, getCaseCate, getSelectValue, getBrry } from '@/api/qc';
 
 export default {
   props: {
@@ -311,6 +311,7 @@ export default {
         basis: [{ required: true, message: '请输入', trigger: 'blur' }],
         notice: [{ required: true, message: '请输入', trigger: 'change' }],
       },
+      baseInfo: {},
     };
   },
 
@@ -323,13 +324,14 @@ export default {
     this.zkSelectValue();
     this.getZkInfo();
     this.getBlsy();
+    this.getBaseInfo();
   },
   methods: {
     handleJSRChange(e) {
       let depIds = []
       this.recipient.forEach((element) => {
         if(e.includes(element.code)) {
-          depIds.push(element.dep_id)
+          depIds.push(`${element.dep_id}`)
         }
       })
       this.ruleForm.JSKS = depIds
@@ -347,6 +349,14 @@ export default {
       });
     },
 
+    getBaseInfo() {
+        getBrry({zyh: this.$route.query.ZYH}).then(res => {
+          if (res.code == 200) {
+           this.baseInfo = res.data || {}
+          }
+        })
+    },
+
     getBlsy() {
       console.log('===================currentTreeItem', this.$props.currentTreeItem)
       let params = this.$props.currentTreeItem && this.$props.currentTreeItem.blbh ? {
@@ -360,8 +370,8 @@ export default {
       }).then(res => {
         if(res.code == 200) {
           if(Array.isArray(res.data) && !!res.data.length) {
-            this.ruleForm.JSR = res.data.map(item => item.SYYS)
-            this.ruleForm.JSKS = res.data.map(item => item.dep_id)
+            this.ruleForm.JSR = res.data.map(item => i`${tem.SYYS}`)
+            this.ruleForm.JSKS = res.data.map(item => `${item.dep_id}`)
           }
         }
       })