瀏覽代碼

人工精准管控-科室质控--住院号码下钻--质控详情--审核通过增加二次提示,选择后返回科室质控列表刷新数据选中数据

liyanyan 1 月之前
父節點
當前提交
ce21438aff

+ 1 - 1
src/router/index.js

@@ -1056,7 +1056,7 @@ router.beforeEach(async (to,
     // 让 列表页 即不缓存,刷新
     to.meta.keepAlive = false;
   }
-  if (to.path == '/allcase/index' || to.path == '/encoder/index') {
+  if (to.path == '/allcase/index' || to.path == '/encoder/index' || to.path == '/qc/index') {
     to.meta.keepAlive = true;
   }
 

+ 16 - 7
src/views/recordsRoom/qc/caseViews.vue

@@ -628,13 +628,22 @@ export default {
      * 批量审核
      */
     toExamine() {
-      var ZYH = [this.valData];
-      applyForReview({ ZYH: ZYH, status: 2 }).then(res => {
-        this.$message.success(res.msg || '申请成功');
-        this.getDataExamine();
-      }).catch(error => {
-        console.log(error);
-      })
+      this.$confirm('是否确认通过?', '提示', {
+        confirmButtonText: '是',
+        cancelButtonText: '否',
+        type: 'warning'
+      }).then(() => {
+        var ZYH = [this.valData];
+        applyForReview({ ZYH: ZYH, status: 2 }).then(res => {
+          this.$message.success(res.msg || '申请成功');
+          this.getDataExamine();
+          this.$router.back();
+        }).catch(error => {
+          console.log(error);
+        })
+      }).catch(() => {
+                
+      });
     },
 
     /**

+ 18 - 2
src/views/recordsRoom/qc/components/TableBox.vue

@@ -9,7 +9,7 @@
       :inactive-value="0"
       inactive-text="是否自动质控" @change="updateQualityControl">
     </el-switch>
-    <el-table v-loading="loading" :data="data" style="width: 100%" @selection-change="handleSelectionChange">
+    <el-table :row-class-name="tableRowClassName" 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="" label="审核状态" width="100" show-overflow-tooltip>
@@ -90,7 +90,17 @@ export default {
       },
     }
   },
+  beforeDestroy() {
+    localStorage.removeItem('getData');
+  },
   methods: {
+    tableRowClassName({row}) {
+      console.log('>>>>><<<<<<<', row)
+      if (row.selected) {
+        return 'selected-row'
+      }
+      return ''
+    },
     toPage(row) {
       const { ZYH } = row;
       localStorage.setItem('getData', ZYH);
@@ -157,4 +167,10 @@ export default {
 };
 </script>
 
-<style lang="scss" scoped></style>
+<style lang="scss" scoped>
+::v-deep.el-table {
+  .selected-row {
+    background-color:#ecf5ff !important;
+  }
+}
+</style>

+ 7 - 1
src/views/recordsRoom/qc/index.vue

@@ -50,9 +50,11 @@ export default {
     }
   },
   created() {
-    this.getList()
     this.getQualityControlStatus()
   },
+  activated() {
+    this.getList()
+  },
   methods: {
     getList() {
       const {
@@ -92,6 +94,10 @@ export default {
       getBlZkList(params).then(res => {
         this.paginationData.total = res.data.count
         this.tableData = res.data.list
+         // 切换选中状态
+        Array.isArray(this.tableData) && this.tableData.map(item => {
+          item.selected = (item.ZYH == localStorage.getItem('getData')) ? !item.selected : false
+        })
       }).catch(error => {
         console.log(error)
       }).finally(() => {