liyanyan 2 тижнів тому
батько
коміт
94b8ac0fc7

+ 1 - 1
src/api/admin.js

@@ -207,7 +207,7 @@ export function getCaseAppealList(data) {
   return request({
     url: '/getCaseAppeal',
     method: 'get',
-    data
+    params: data
   })
 }
 //  申诉审核

+ 10 - 5
src/api/qc.js

@@ -90,13 +90,18 @@ export function getCaseQuality(data) {
 
 // 病案室-病案详情-右侧质控栏-申诉驳回接口
 export function examineAppeal(data) {
-  return request({
-    url: '/examineAppeal',
-    method: 'get',
-    params: data,
+  return request2({
+    url: '/appeal',
+    method: 'post',
+    data: data,
   });
 }
 
+// 病案室-病案详情-右侧质控栏-审核接口
+export function examineReview(data) {
+  return request.post('/examineCaseAppeal', data);
+}
+
 // 驳回信息接口
 export function getAppealData(data) {
   return request({
@@ -111,7 +116,7 @@ export function getCaseQualityBazb(data) {
   return request2({
     url: '/get_case_quality_v2',
     method: 'post',
-    params: data,
+    data: data,
   });
 }
 

+ 9 - 0
src/router/index.js

@@ -1060,6 +1060,15 @@ router.beforeEach(async (to,
     to.meta.keepAlive = true;
   }
 
+  console.log('=============', to.path == '/qc/caseViews' && to.query && to.query.from == 'review')
+  if(to.path == '/qc/caseViews') {
+    if(to.query && to.query.from == 'review') {
+      to.meta.title = '申诉详情';
+    } else {
+      to.meta.title = '质控详情';
+    }
+  }
+
   next()
 
 })

+ 7 - 0
src/styles/index.scss

@@ -75,6 +75,13 @@ div:focus {
   padding: 22px;
   background-color: #fff;
   // margin-bottom: 20px;
+  .el-row {
+    margin-bottom: 15px
+  }
+  .table-pagination {
+    padding: 0px !important;
+    margin-bottom: 0 !important
+  }
 } 
 .filter-list-table {
   padding: 0 22px;

+ 1 - 1
src/views/middleCaseControl/defectNumber.vue

@@ -81,7 +81,7 @@ export default {
       departmentList: [],
     };
   },
-  mounted() {
+  activated() {
     this.error_rule = this.$route.query.rule_id
     this.formData.startTime = this.storageGet('start_time');
     this.formData.endTime = this.storageGet('end_time');

+ 91 - 0
src/views/recordsRoom/qc/appeal.vue

@@ -0,0 +1,91 @@
+<template>
+  <div class="app-container">
+    <SearchBoxVue class="filter-list-form" ref="SearchBoxRef" @search="handleSearch" @reset="handleReset" />
+    <div class="filter-list-action">
+      <el-row type="flex" justify="space-between" align="middle">
+        <mPagination v-if="tableData && tableData.length !== 0" :data="paginationData" @pageChangeEvent="pageHasChanged"></mPagination>
+
+        <el-row type="flex" justify="end" style="flex:1">
+          <el-button @click="actionYes">批量通过</el-button>
+          <el-button>批量驳回</el-button>
+          <el-button>筛选</el-button>
+          <el-button icon="el-icon-download">下载</el-button>
+        </el-row>
+      </el-row>
+      <TableBoxVue :loading="loading" :data="tableData" ref="tableRef"/>
+    </div>
+  </div>
+</template>
+
+<script>
+import mPagination from '@/components/m-pagination';
+import SearchBoxVue from '@/views/recordsRoom/qc/components/review/SearchBox.vue'
+import TableBoxVue from '@/views/recordsRoom/qc/components/review//TableBox.vue'
+import pagination from '@/components/Pagination/index2.vue'
+import { getCaseAppealList } from '@/api/admin'
+
+export default {
+  components: {
+    mPagination,
+    SearchBoxVue,
+    TableBoxVue,
+    pagination
+  },
+  data() {
+    return {
+      loading: false,
+      tableData: [],
+      paginationData: {
+        total: 0,
+        currentPage: 1,
+        pageSize: 10
+      },
+    }
+  },
+  created() {
+  },
+  mounted() {
+    this.getList()
+  },
+  methods: {
+    getList() {
+      this.loading = true
+      getCaseAppealList({
+        ...this.$refs.SearchBoxRef.formData,
+        page: this.paginationData.currentPage,
+        page_size: this.paginationData.pageSize
+      }).then(res => {
+        this.paginationData.total = res.data.count
+        this.tableData = res.data.list
+        this.$refs.tableRef.selectedArray = []
+      }).catch(error => {
+        console.log(error)
+      }).finally(() => {
+        this.loading = false
+      })
+    },
+
+    pageHasChanged() {
+      this.getList()
+    },
+    handleSearch() {
+      this.paginationData.currentPage = 1
+      this.getList()
+    },
+    handleReset() {
+      this.handleSearch()
+    },
+    actionYes() {
+      if(this.$refs.tableRef.selectedArray.length == 0) {
+        this.$message.warning('请至少选择一条数据!')
+        return
+      } else {
+        this.$message.success('操作成功!')
+      }
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 5 - 15
src/views/recordsRoom/qc/caseViews.vue

@@ -119,7 +119,7 @@
         <!-- status 不存在 意味着不脱敏、医院自助查询 -->
         <template v-if="!$route.query.status">
           <!-- 住院病案质控 -->
-          <CaseQualityBox :resultsList="resultsData" v-if="results.data" @clickAppealBtn="clickAppealBtn" :width="340"
+          <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"/>
         </template>
@@ -404,6 +404,9 @@ export default {
     // 刷新质控结果
     handelRefreshResults() {
       this.getCaseQualityResults()
+      if (this.$refs.CaseQualityBox) {
+        this.$refs.CaseQualityBox.getTabsData();
+      }
     },
     // 鼠标右击事件
     openMenu(e) {
@@ -444,24 +447,11 @@ export default {
         that.results = null;
         that.$nextTick(() => {
           that.results = res.data;
+          
         })
       }).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);
-      });
     },
     reload() {
       // 移除组件

+ 417 - 284
src/views/recordsRoom/qc/components/CaseQualityBox2.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="content">
+  <div class="CaseQualityBox2">
     <!-- 标题 -->
     <!-- <div class="title-content">
       <div class="title-contentIcon">
@@ -18,37 +18,39 @@
         <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">{{ 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 == '良'"
-                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 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">{{ 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 == '良'"
+                  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 resultsList.list" :key="index">
               <div class="cont-reight-bottom" @click="toJump(items.basis[0], items, index)">
@@ -79,12 +81,37 @@
                   </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-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>
+              <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('reject', items, 2)">申诉</div>
+                  <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 v-if="items.type === 2" class="appeal_in_progress">申诉中</div>
                 </div>
               </div>
               <div class="hz"></div>
@@ -92,37 +119,39 @@
           </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 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="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)">
@@ -147,16 +176,45 @@
                   </div>
                   <p>
                     <span class="bold">提示:</span>
-                    {{ items.basises }}
+                    {{ 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)">
+                    通过
+                  </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>
-              <div class="btn-content">
-                <div v-if="items.type === 3" class="rebuttal" @click="fetchAppealInfo('appeal', items, 3, MEDRECID)">驳回</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('reject', items, 2)">申诉</div>
+                  <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 v-if="items.type === 2" class="appeal_in_progress">申诉中</div>
                 </div>
               </div>
               <div class="hz"></div>
@@ -164,7 +222,7 @@
           </div>
           <!-- 住院病历 -->
           <div class="second-content" v-if="item.name === 'second'">
-            <div class="score-box" :class="scoreLevel == '甲' ? 'scoreLevel_1' : scoreLevel == '乙' ? 'scoreLevel_2' : scoreLevel == '丙' ? 'scoreLevel_3' : ''">
+            <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>
@@ -187,7 +245,7 @@
                   </div>
                   <p>
                     <span class="bold">提示:</span>
-                    {{ items.desc }}
+                    {{ items.notice }}
                   </p>
                 </div>
               </div>
@@ -195,14 +253,39 @@
                 <div class="gist-zkyj">质控依据&gt;&gt;</div>
               </div>
               <div class="gist-center" v-if="items.show">
-                {{ items.notice ? items.notice : '' }}
+                {{ items.desc ? items.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 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-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 v-if="items.appeal_type === 2" class="appeal_in_progress">申诉中</div>
                 </div>
               </div>
               <div class="hz"></div>
@@ -211,7 +294,7 @@
         </template>
       </el-tab-pane>
     </el-tabs>
-    <el-dialog :visible.sync="dialogVisible" custom-class="my-dialog" :modal="false" :title="dialogTitle" width="40%">
+    <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>
@@ -220,48 +303,45 @@
         </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 :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="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 :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>
-          {{ zd_field_name }}
+          {{ dialogFormsLabel.zd_field_name }}
         </p>
         <p style="margin-top: 10px">
           <span class="bold" style="color: #606266 !important">提示:</span>
-          {{ ts_desc }}
+          {{ dialogFormsLabel.ts_desc }}
         </p>
       </div>
-      <template #footer>
-        <el-button type="primary" @click="submitAppeal(MED_REC_ID)">{{ buttonText }}</el-button>
+      <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>
   </div>
 </template>
 
 <script>
-import { examineAppeal, getCaseQualityBazb, getAppealData, getNumberInfo } from '@/api/qc';
+import { examineAppeal, examineReview, getCaseQualityBazb, getAppealData, getNumberInfo } from '@/api/qc';
 export default {
+  emits: ['changeTab'],
   props: {
-    caseShow: {
-      type: Boolean,
-      required: true,
-    },
-    resultsList: {
-      type: Object,
-      default() {
-        return {
-          list: [],
-        };
-      },
-    },
     MED_REC_ID: {
       type: [String, Number], // 根据实际类型定义
       required: true, // 是否必传
@@ -300,34 +380,19 @@ export default {
       ],
       dialogVisible: false,
       dialogType: '',
-      dialogTitle: '',
       appealForm: {
         reason: '',
         phone: '',
       },
       appealRules: {
-        doctor: [{ required: true, message: '请输入医师姓名及工号', trigger: 'blur' }],
-        reason: [{ required: true, message: '请输入原因', trigger: 'blur' }],
-      },
-      formLabels: {
-        reason: '', // 动态设置
-        doctor: '', // 动态设置
+        doctor: [{ required: true, message: '请输入', trigger: 'blur' }],
+        reason: [{ required: true, message: '请输入', trigger: 'blur' }],
       },
-      formPlaceholders: {
-        reason: '', // 动态设置
-        doctor: '', // 动态设置
-      },
-      localCaseShow: this.caseShow,
       data: {
         score: 100, // 示例数据
         data: [], // 示例数据
       },
-      tableData: [], // 初始化 tableData
-      resultsData: [],
-      value1: null, // 初始化 value1
-      is_show: false,
-      appeal_document: '',
-      appeal_docter: '',
+      resultsList: [],
       controls: {
         ZYH: '',
         score: {
@@ -343,20 +408,16 @@ export default {
       active_zk_index: 0,
       currentId: '',
       MEDRECID: '',
-      caseHistory: [],
       medicalRecord: [],
       messageStatus: {
         first: true,
         second: false,
         third: false,
       },
-      buttonText: '提交',
-      zd_field_name: '',
-      ts_desc: '',
-      cate_type: '',
-      ssIndex: '',
-      savedItems: null,
-      savedIndex: null
+      dialogFormsLabel: {
+        zd_field_name: '',
+        ts_desc: '',
+      },
     };
   },
   computed: {
@@ -379,9 +440,6 @@ export default {
       }
       return str;
     },
-    scrollHeight() {
-      return `100%`;
-    },
     scoreLevel_ylzc() {
       /**
        * 优>=97分
@@ -405,27 +463,37 @@ export default {
     },
   },
   watch: {
-    // MED_REC_ID(newVal) {
-    //   if (newVal) {
-    //     this.MEDRECID = newVal;
-    //     console.log('MED_REC_ID 已更新:', newVal);
-    //     this.qualityBazb(newVal);
-    //     this.getData(newVal);
-    //     this.getMessageNum(newVal);
-    //   }
-    // },
+    activeName(val) {
+      this.getTabsData();
+      if(val == 'first' || 'second') {
+        this.$emit('changeTab', '1')
+      }
+      if(val == 'third') {
+        this.$emit('changeTab', '2')
+      }
+    }
   },
   created() {
   },
   mounted() {
-    this.getTableData();
     const { ZYH } = this.$route.query
     this.MEDRECID = ZYH;
-    this.qualityBazb(ZYH);
-    this.getData(ZYH);
     this.getMessageNum(ZYH);
+    this.getTabsData()
   },
+
   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 '驳回'
+      }
+    },
     getMessageNum(newVal){
       getNumberInfo({ZYH: newVal}).then(res => {
         this.tabList[0].medical = res.data.errorV2;
@@ -516,9 +584,9 @@ export default {
       }
     },
     // 获取编码员数据
-    getData(newVal) {
+    getData() {
       const params = {
-        ZYH: newVal,
+        ZYH: this.MEDRECID,
       };
       this.$axios.post('/home_bmy_quality/bmyQualityResult', params).then(res => {
         console.log('编码员数据', res.data);
@@ -579,50 +647,67 @@ export default {
         this.$emit('codes', this.zk_codes);
       });
     },
-    openAppealDialog(type, items, index) {
+    // 获取病案首页
+    getQualityResult() {
+      this.$axios.post('/home_quality/getQualityResult', {
+        id: this.MEDRECID
+      }).then(res => {
+        this.resultsList = res.data; // 清空结果 
+      }).catch(e => {
+        console.log(e);
+      });
+    }, 
+    //  住院病历
+    qualityBazb() {
+      const params = {
+        id: this.MEDRECID,
+      };
+      getCaseQualityBazb(params).then(res => {
+        if (res && res.data) {
+          this.data.score = res.data.score;
+          for(let i=0; i<res.data.data.length; i++) {
+            res.data.data[i].show = true;
+          }
+          this.$nextTick(() => {
+            this.medicalRecord = res.data.data;
+          });
+        }
+      });
+    },
+    async openAppealDialog(type, items, index) {
       console.log(items, index, 'items');
-      this.zd_field_name = items.error_name || items.field_name || items.error_field;
+      this.dialogFormsLabel.zd_field_name = items.error_name || items.field_name || items.error_field;
       if (items.cate === 3) {
-        this.ts_desc = items.basises;
+        this.dialogFormsLabel.ts_desc = items.basises;
       } else {
-        this.ts_desc = items.desc;
+        this.dialogFormsLabel.ts_desc = 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.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.zd_field_name = items.error_name || items.field_name || items.error_field;
+      this.dialogFormsLabel.zd_field_name = items.error_name || items.field_name || items.error_field;
       if (items.cate === 3) {
-        this.ts_desc = items.basises;
+        this.dialogFormsLabel.ts_desc = items.basises;
       } else {
-        this.ts_desc = items.desc;
+        this.dialogFormsLabel.ts_desc = items.desc;
       }
-      this.savedItems = items;
-      this.savedIndex = index;
       this.dialogType = type;
 
       try {
@@ -636,16 +721,6 @@ export default {
         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; // 驳回原因
         }
@@ -654,19 +729,17 @@ export default {
         console.error('获取驳回信息失败:', error);
       }
     },
-    submitAppeal(MEDRECID) {
-      console.log(MEDRECID, this.appealForm.reason, this.appealForm.doctor, 'MEDRECID99999999');
+    submitAppeal() {
 
-      if (this.buttonText === '提交') {
+      if (this.dialogType === 'appeal') {
         // 申诉逻辑
         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,
+          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');
 
@@ -675,20 +748,59 @@ export default {
             message: '提交申诉成功',
             type: 'success',
           });
-          this.qualityBazb(MEDRECID);
+          this.getTabsData()
+          // 提交后关闭弹框
+          this.dialogVisible = false;
         });
-        // 提交后关闭弹框
-        this.dialogVisible = false;
-      } else if (this.buttonText === '申诉') {
-        this.openAppealDialog('reject', this.savedItems, this.savedIndex);
+      }
+      // 申诉审核通过和驳回逻辑
+      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',
+            });
+          }
+        })
+      }
+    },
+    getTabsData() {
+      // 病案首页
+      if(this.activeName == 'first') {
+        this.getQualityResult();
+      } 
+      //  住院病历
+      if(this.activeName == 'second') {
+        this.qualityBazb();
+      }
+      // 编码
+      if(this.activeName == 'third') {
+        this.getData();
       }
     },
     handleIgnore(items, MEDRECID, type, index) {
       const pramse = {
-        id: items.error_rule || items.rule_id,
-        type: type,
-        cate: 1,
-        ZYH: MEDRECID,
+        id: items.rule_id,
+        type: 1,
+        quality_type: this.activeName == 'first' ? 1 : this.activeName == 'second' ? 2 : 3,
+        zyh: this.MEDRECID
       };
 
       examineAppeal(pramse).then(res => {
@@ -708,34 +820,7 @@ export default {
       }
     },
     clickListItem(idx) {
-      let tableData = this.medicalRecord;
-      tableData[idx].show = !tableData[idx].show;
-      this.$nextTick(() => {
-        this.medicalRecord = tableData;
-      });
-    },
-    qualityBazb(newVal) {
-      const params = {
-        id: newVal,
-      };
-      getCaseQualityBazb(params).then(res => {
-        if (res && res.data) {
-          this.data.score = res.data.score;
-          for(let i=0; i<res.data.data.length; i++) {
-            res.data.data[i].show = true;
-          }
-          this.$nextTick(() => {
-            this.medicalRecord = res.data.data;
-          });
-        }
-      });
-    },
-    getTableData() {
-      let data = this.data.data;
-      for (let i = 0; i < data.length; i++) {
-        data[i].show = true;
-      }
-      this.tableData = data;
+      this.medicalRecord[idx].show = !this.medicalRecord[idx].show
     },
     closeClick() {
       this.$emit('close'); // 触发 close 事件
@@ -772,70 +857,108 @@ export default {
   display: flex;
   align-items: center;
   justify-content: space-between;
-  padding: 0px 10px;
+  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;
+    align-items: center;
+    gap: 10px;
+  }
 
   .btn-right {
-    width: 95%;
     display: flex;
     justify-content: flex-end;
     align-items: center;
-    margin-right: 10px;
-    margin-top: 10px;
-
+    gap: 10px;
+    flex: 1;
+    // margin-right: 10px;
+    // margin-top: 10px;
     .appeal {
-      width: 64px;
-      height: 30px;
-      line-height: 20px;
-      border-radius: 4px;
+      @include appealMixin();
       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;
+      @include appealMixin();
       background-color: rgba(229, 229, 229, 1);
       color: rgba(238, 138, 12, 1);
-      font-size: 14px;
-      text-align: center;
-      font-family: -regular;
+      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 {
-      width: 64px;
-      height: 30px;
-      line-height: 20px;
-      border-radius: 4px;
+      @include appealMixin();
       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;
-    }
+    // 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 {
@@ -914,7 +1037,7 @@ export default {
 }
 
 .second-content {
-  padding: 10px 10px;
+  padding: 0 10px 10px 10px;
 
   .score-second {
     width: 300px;
@@ -1115,7 +1238,7 @@ export default {
   display: inline-block;
   width: 20px;
   height: 20px;
-  line-height: 23px;
+  line-height: 20px;
   background-color: red;
   border-radius: 50%;
   color: #fff;
@@ -1124,7 +1247,7 @@ export default {
 }
 
 .first-content {
-  padding: 10px 10px;
+  padding: 0 10px 10px 10px;
 
   .message-tip {
     display: inline-block;
@@ -1217,7 +1340,7 @@ export default {
 }
 
 .suggest-content {
-  width: 346px;
+  width: 100%;
   // height: 182px;
   line-height: 20px;
   background-color: #f1f5fe;
@@ -1225,6 +1348,8 @@ export default {
   font-size: 14px;
   text-align: left;
   font-family: -regular;
+  padding: 0 5px;
+  margin-bottom: 15px
 }
 
 .legend-box {
@@ -1273,7 +1398,7 @@ export default {
 }
 
 .cont-reight-bottom {
-  margin: 24px 0 15px;
+  margin-bottom: 15px;
   display: flex;
   cursor: pointer;
 
@@ -1458,10 +1583,18 @@ export default {
     align-content: space-around;
   }
 }
-.custom-tabs {
-  ::v-deep.el-tabs__content {
-    height: calc(100vh - 184px);
-    overflow-y: scroll
+.CaseQualityBox2 {
+  width: 100%;
+  height: 100%;
+  display: flex;
+  .custom-tabs {
+    flex: 1;
+    width: 100%;
+    ::v-deep.el-tabs__content {
+      height: calc(100% - 55px) !important;
+      overflow-y: scroll;
+    }
   }
 }
+
 </style>

+ 258 - 0
src/views/recordsRoom/qc/components/review/SearchBox.vue

@@ -0,0 +1,258 @@
+<template>
+  <el-form style="width: 100%" ref="filterListFormRef" :model="formData" class="demo-form-inline" label-suffix=":"
+    label-width="74px">
+    <el-row :gutter="24">
+      <el-col :span="7">
+        <el-form-item label="出院日期">
+          <div style="width: 100%;display: flex;gap: 5px;">
+            <el-form-item prop="AAC01_START">
+              <el-date-picker style="width: 100%" v-model="formData.AAC01_START" type="date" placeholder="开始日期"
+                :picker-options="AAC01PickerOptions" value-format="yyyyMMdd" format="yyyy年MM月dd日">
+              </el-date-picker>
+            </el-form-item>
+            <el-form-item prop="AAC01_END">
+              <el-date-picker style="width: 100%" v-model="formData.AAC01_END" type="date" placeholder="结束日期"
+                value-format="yyyyMMdd" format="yyyy年MM月dd日">
+              </el-date-picker>
+            </el-form-item>
+          </div>
+        </el-form-item>
+      </el-col>
+      <el-col :span="5">
+        <el-form-item label="病案号" prop="AAA28">
+          <el-input v-model="formData.AAA28" placeholder="病案号"></el-input>
+        </el-form-item>
+      </el-col>
+      <el-col :span="6">
+        <el-form-item label="出院科室" prop="AAC02C">
+          <el-select style="width:100%" v-model="formData.AAC02C" filterable clearable placeholder="出院科室">
+            <el-option v-for="item of departments" :key="item.dep_id" :label="item.name" :value="item.dep_id" />
+          </el-select>
+        </el-form-item>
+      </el-col>
+      <el-col :span="6">
+        <el-form-item label="质控类型" prop="AAC02C">
+          <el-select style="width:100%" v-model="formData.quality_type" filterable clearable placeholder="出院科室">
+            <el-option label="运行首页" value="1" />
+            <el-option label="运行病历" value="2" />         
+            <el-option label="编目首页" value="3" />
+          </el-select>
+        </el-form-item>
+      </el-col>
+    </el-row>
+    <el-row :gutter="24">
+      <el-col :span="7">
+        <el-form-item label="入院日期">
+          <div style="width: 100%;display: flex;gap: 5px;">
+            <el-form-item prop="AAB01_START">
+              <el-date-picker style="width: 100%" v-model="formData.AAB01_START" type="date" placeholder="开始日期"
+                :picker-options="AAB01PickerOptions" value-format="yyyyMMdd" format="yyyy年MM月dd日">
+              </el-date-picker>
+            </el-form-item>
+            <el-form-item prop="AAB01_END">
+              <el-date-picker style="width: 100%" v-model="formData.AAB01_END" type="date" placeholder="结束日期"
+                value-format="yyyyMMdd" format="yyyy年MM月dd日">
+              </el-date-picker>
+            </el-form-item>
+          </div>
+        </el-form-item>
+      </el-col>
+      <el-col :span="5">
+        <el-form-item label="审核状态" prop="status">
+          <el-select style="width: 100%;" v-model="formData.status" filterable clearable placeholder="审核状态">
+            <el-option label="待审核" :value="0" />
+            <el-option label="已通过" :value="1" />
+            <el-option label="未通过" :value="2" />
+          </el-select>
+        </el-form-item>
+      </el-col>
+      <el-col :span="6" :offset="6">
+        <el-form-item label="" prop="" style="float: right;">
+          <el-button type="primary" @click="onSubmit">查询</el-button>
+          <el-button @click="onReset">重置</el-button>
+        </el-form-item>
+      </el-col>
+    </el-row>
+  </el-form>
+</template>
+<script>
+import moment from 'moment/moment';
+
+export default {
+  emits: ['search', 'reset'],
+  data() {
+    const that = this
+    return {
+      formData: {
+        AAC01_START: '',
+        AAC01_END: '',
+        AAB01_START: '',
+        AAB01_END: '',
+        AAA28: '',
+        AAC02C: '',
+        status: '',
+        quality_type: ''
+      },
+      departments: [],
+      AAC01PickerOptions: {
+        disabledDate: (time) => {
+          if (that.formData.AAC01_END != "") {
+            return time.getTime() > Date.now();
+          }
+        },
+        shortcuts: [{
+          text: '今天',
+          onClick(picker) {
+            picker.$emit('pick', moment().format('YYYYMMDD'));
+            that.formData.AAC01_END = moment().format('YYYYMMDD')
+          }
+        }, {
+          text: '近7天',
+          onClick(picker) {
+            picker.$emit('pick', moment().subtract(7, 'days').format('YYYYMMDD'));
+            that.formData.AAC01_END = moment().format('YYYYMMDD')
+          }
+        }, {
+          text: '近30天',
+          onClick(picker) {
+            picker.$emit('pick', moment().subtract(30, 'days').format('YYYYMMDD'));
+            that.formData.AAC01_END = moment().format('YYYYMMDD')
+          }
+        }, {
+          text: '一季度',
+          onClick(picker) {
+            picker.$emit('pick', moment().startOf('year').format('YYYYMMDD'));
+            that.formData.AAC01_END = moment().startOf('year').add(3,'M').subtract(1, 'days').format('YYYYMMDD')
+          }
+        },  {
+          text: '二季度',
+          onClick(picker) {
+            picker.$emit('pick', moment().startOf('year').add(3,'M').format('YYYYMMDD'));
+            that.formData.AAC01_END = moment().startOf('year').add(6,'M').subtract(1, 'days').format('YYYYMMDD')
+          }
+        },  {
+          text: '三季度',
+          onClick(picker) {
+            picker.$emit('pick', moment().startOf('year').add(6,'M').format('YYYYMMDD'));
+            that.formData.AAC01_END = moment().startOf('year').add(9,'M').subtract(1, 'days').format('YYYYMMDD')
+          }
+        },  {
+          text: '四季度',
+          onClick(picker) {
+            picker.$emit('pick', moment().startOf('year').add(9,'M').format('YYYYMMDD'));
+            that.formData.AAC01_END = moment().startOf('year').add(12,'M').subtract(1, 'days').format('YYYYMMDD')
+          }
+        }, {
+          text: moment().add(-2,'Y').format("YYYY"),
+          onClick(picker) {
+            picker.$emit('pick', moment().add(-2,'Y').startOf('year').format('YYYYMMDD'));
+            that.formData.AAC01_END = moment().add(-2,'Y').endOf('year').format('YYYYMMDD')
+          }
+        }, {
+          text: moment().add(-1,'Y').format("YYYY"),
+          onClick(picker) {
+            picker.$emit('pick', moment().add(-1,'Y').startOf('year').format('YYYYMMDD'));
+            that.formData.AAC01_END = moment().add(-1,'Y').endOf('year').format('YYYYMMDD')
+          }
+        }, {
+          text: moment().format("YYYY"),
+          onClick(picker) {
+            picker.$emit('pick', moment().startOf('year').format('YYYYMMDD'));
+            that.formData.AAC01_END = moment().endOf('year').format('YYYYMMDD')
+          }
+        }]
+      },
+      AAB01PickerOptions: {
+        disabledDate: (time) => {
+          if (that.formData.AAB01_END != "") {
+            return time.getTime() > Date.now();
+          }
+        },
+        shortcuts: [{
+          text: '今天',
+          onClick(picker) {
+            picker.$emit('pick', moment().format('YYYYMMDD'));
+            that.formData.AAB01_END = moment().format('YYYYMMDD')
+          }
+        }, {
+          text: '近7天',
+          onClick(picker) {
+            picker.$emit('pick', moment().subtract(7, 'days').format('YYYYMMDD'));
+            that.formData.AAB01_END = moment().format('YYYYMMDD')
+          }
+        }, {
+          text: '近30天',
+          onClick(picker) {
+            picker.$emit('pick', moment().subtract(30, 'days').format('YYYYMMDD'));
+            that.formData.AAB01_END = moment().format('YYYYMMDD')
+          }
+        }, {
+          text: '一季度',
+          onClick(picker) {
+            picker.$emit('pick', moment().startOf('year').format('YYYYMMDD'));
+            that.formData.AAB01_END = moment().startOf('year').add(3,'M').subtract(1, 'days').format('YYYYMMDD')
+          }
+        },  {
+          text: '二季度',
+          onClick(picker) {
+            picker.$emit('pick', moment().startOf('year').add(3,'M').format('YYYYMMDD'));
+            that.formData.AAB01_END = moment().startOf('year').add(6,'M').subtract(1, 'days').format('YYYYMMDD')
+          }
+        },  {
+          text: '三季度',
+          onClick(picker) {
+            picker.$emit('pick', moment().startOf('year').add(6,'M').format('YYYYMMDD'));
+            that.formData.AAB01_END = moment().startOf('year').add(9,'M').subtract(1, 'days').format('YYYYMMDD')
+          }
+        },  {
+          text: '四季度',
+          onClick(picker) {
+            picker.$emit('pick', moment().startOf('year').add(9,'M').format('YYYYMMDD'));
+            that.formData.AAB01_END = moment().startOf('year').add(12,'M').subtract(1, 'days').format('YYYYMMDD')
+          }
+        }, {
+          text: moment().add(-2,'Y').format("YYYY"),
+          onClick(picker) {
+            picker.$emit('pick', moment().add(-2,'Y').startOf('year').format('YYYYMMDD'));
+            that.formData.AAB01_END = moment().add(-2,'Y').endOf('year').format('YYYYMMDD')
+          }
+        }, {
+          text: moment().add(-1,'Y').format("YYYY"),
+          onClick(picker) {
+            picker.$emit('pick', moment().add(-1,'Y').startOf('year').format('YYYYMMDD'));
+            that.formData.AAB01_END = moment().add(-1,'Y').endOf('year').format('YYYYMMDD')
+          }
+        }, {
+          text: moment().format("YYYY"),
+          onClick(picker) {
+            picker.$emit('pick', moment().startOf('year').format('YYYYMMDD'));
+            that.formData.AAB01_END = moment().endOf('year').format('YYYYMMDD')
+          }
+        }]
+      },
+    }
+  },
+  created() {
+    this.getDeportmentList()
+  },
+  methods: {
+    onSubmit() {
+      this.$emit('search')
+    },
+    onReset() {
+      this.$refs.filterListFormRef.resetFields();
+      this.$emit('reset')
+    },
+    getDeportmentList() {
+      this.$axios.get('/user/depDropDown').then(res => {
+        const { data } = res
+        this.departments = data;
+      }).catch(error => {
+        console.log(error)
+      })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped></style>

+ 247 - 0
src/views/recordsRoom/qc/components/review/TableBox.vue

@@ -0,0 +1,247 @@
+<template>
+  <el-table
+    v-loading="loading"
+    :data="data"
+    style="width: 100%"
+    @selection-change="handleSelectionChange"
+  >
+    <el-table-column type="selection" width="55"></el-table-column>
+    <el-table-column type="index" label="序号" width="80" />
+    <el-table-column prop="AAA28" label="病案号" width="100">
+      <template slot-scope="scope">
+        <el-button class="blue-link" type="text" @click="toPage(scope.row)">{{ scope.row.AAA28 }}</el-button>
+      </template>
+    </el-table-column>
+    <el-table-column prop="AAA29" label="住院次数" width="100" />
+    <el-table-column prop="CWH" label="床号" width="100" />
+    <el-table-column
+      prop=""
+      label="质控类型"
+      width="80"
+      show-overflow-tooltip>
+      <template slot-scope="scope">
+        <div :class="`quality-type-${scope.row.quality_type}`">
+          <span v-if="scope.row.quality_type == 1">运行首页</span>
+          <span v-if="scope.row.quality_type == 2">运行病历</span>
+          <span v-if="scope.row.quality_type == 3">编目首页</span>
+        </div>
+      </template>
+    </el-table-column>
+    <el-table-column
+      prop=""
+      label="审核状态"
+      width="80"
+      show-overflow-tooltip>
+      <template slot-scope="scope">
+        <div :class="`status-${scope.row.status}`">
+          <span v-if="scope.row.status == 0">待审核</span>
+          <span v-if="scope.row.status == 1">已通过</span>
+          <span v-if="scope.row.status == 2">未通过</span>
+        </div>
+      </template>
+    </el-table-column>
+    <el-table-column
+      width="160"
+      prop="defect_content"
+      label="申诉问题"
+      show-overflow-tooltip
+    />
+    <!-- <el-table-column
+      prop=""
+      label="整改级别"
+      width="80"
+      show-overflow-tooltip
+    >
+      <template slot-scope="scope">
+        <span>
+          <el-tag style="max-width: 80px" :type="scope.row.levels === 1 ? 'danger' : ''">
+            {{ scope.row.levels == 1?'必改':'建议' }}
+          </el-tag>
+        </span>
+      </template>
+    </el-table-column> -->
+    <el-table-column
+      width="120"
+      prop="appeal_docter"
+      label="申诉医师"
+    />
+    <el-table-column
+      width="160"
+      prop="appeal_time"
+      label="申诉时间"
+    >
+      <template slot-scope="scope">
+        <span>{{scope.row.appeal_time ? moment(scope.row.appeal_time * 1000).format('YYYY-MM-DD HH:MM') : ''}}</span>
+      </template>
+    </el-table-column>
+    <!-- <el-table-column
+      prop="appeal_document"
+      label="申诉科室"
+      show-overflow-tooltip
+    /> -->
+    <el-table-column
+      width="120"
+      prop="case_docter"
+      label="审核医师"
+    />
+    <!-- <el-table-column prop="" label="科室质控医师" width="120">
+      <template slot-scope="scope">
+        <span>{{Array.isArray(scope.row.ZKR) && scope.row.ZKR.map(item => item.ZKR).join(',') || ''}}</span>
+      </template>
+    </el-table-column> -->
+    <el-table-column
+      width="160"
+      prop="examine_time"
+      label="审核时间"
+    >
+      <template slot-scope="scope">
+        <span>{{scope.row.examine_time ? moment(scope.row.examine_time * 1000).format('YYYY-MM-DD HH:MM') : ''}}</span>
+      </template>
+    </el-table-column>
+    <!-- <el-table-column prop="review_time" label="科室审核时间" width="160"/> -->
+    <el-table-column prop="" label="病历得分" width="120">
+      <template slot-scope="scope">
+        <span v-if="scope.row.score" :class="`score-level-${
+          scope.row.score_lv == '甲' ? '1' : 
+          scope.row.score_lv == '乙' ? '3' : '4'}`"
+        >{{scope.row.score}} / {{scope.row.score_lv}}</span>
+      </template>
+    </el-table-column>
+
+    <el-table-column prop="" label="首页得分" width="120">
+      <template slot-scope="scope">
+        <span v-if="scope.row.home_ysz_score" :class="`score-level-${
+          scope.row.home_ysz_score_lv == '优' ? '1' : 
+          scope.row.home_ysz_score_lv == '良' ? '2' : 
+          scope.row.home_ysz_score_lv == '中' ? '3' :  '4'}`"
+        >{{scope.row.home_ysz_score}} / {{scope.row.home_ysz_score_lv}}</span>
+      </template>
+    </el-table-column>
+    
+    <!-- <el-table-column prop="ZKY" label="审核问题数量" width="120" /> -->
+    <el-table-column prop="in_hospital" label="是否在院" width="120">
+      <template slot-scope="scope">
+        <span>{{scope.row.in_hospital == 1 ? '是' : '否'}}</span>
+      </template>
+    </el-table-column>
+    <el-table-column prop="AAB01" label="入院时间" width="160"/>
+    <el-table-column prop="AAC01" label="出院时间" width="160"/>
+    <el-table-column prop="AAC02C_name" label="出院科室" width="120" show-overflow-tooltip />
+    <el-table-column prop="GCYSMC" label="管床医师" width="120" />
+    <el-table-column prop="AEE03_name" label="主治医师" width="120" />
+    <el-table-column proYLZZp="" label="诊疗组长" width="120" />
+    <el-table-column prop="AEE01_name" label="科主任" width="120" />
+  </el-table>
+</template>
+
+<script>
+import moment from 'moment/moment';
+
+export default {
+  props: {
+    data: {
+      type: Array,
+      default() {
+        return [];
+      },
+    },
+    loading: {
+      type: Boolean,
+      default() {
+        return false;
+      },
+    }
+  },
+  data() {
+    return {
+      selectedArray: []
+    }
+  },
+  methods: {
+    moment,
+    toPage(row) {
+      const { ZYH } = row;
+      this.$router.push({ path: '/qc/caseViews', query: {
+        ZYH,
+        from: 'review'
+      }, meta: {
+        title: '申诉详情'
+      }});
+    },
+
+    handleSelectionChange(val) {
+      this.selectedArray = val;
+    }
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+// ::v-deep.el-table {
+//   .selected-row {
+//     background-color:#ecf5ff !important;
+//   }
+// }
+
+@mixin status() {
+    width: 60px;
+    text-align: center;
+    border-width: 1px;
+    border-style: solid;
+    border-radius: 4px;
+    font-weight: 500
+}
+
+.status-0 {
+  @include status();
+  background-color: #fccbd4;
+  border-color: #ef1f3a;
+  color: #ef1f3a;
+}
+.status-1 {
+  @include status();
+  background-color: #d2e4d6;
+  border-color: #318240;
+  color: #318240;
+}
+.status-2 {
+  @include status();
+  background-color: #ef1f3a;
+  border-color: #ef1f3a;
+  color: #ffffff;
+}
+
+@mixin score-level() {
+    font-weight: 500
+}
+
+.score-level-1 {
+  @include score-level();
+  color: #318240;
+}
+.score-level-2 {
+  @include score-level();
+  color: #89c30f;
+}
+.score-level-3 {
+  @include score-level();
+  color: #ec890e;
+}
+.score-level-4 {
+  @include score-level();
+  color: #ef1f3a;
+}
+
+.quality-type-1 {
+  @include score-level();
+  color: #07818a;
+}
+.quality-type-2 {
+  @include score-level();
+  color: #3c108f;
+}
+.quality-type-3 {
+  @include score-level();
+  color: #a26d0a
+}
+</style>