浏览代码

规则配置列表

zdl 1 年之前
父节点
当前提交
8f136b61a4

+ 9 - 0
src/api/rule/config.js

@@ -17,3 +17,12 @@ export function get_select_department(data) {
     params: data
   })
 }
+
+// 规则模板列表
+export function get_rule_list(data) {
+  return request({
+    url: '/quality_rule/get_rule_list',
+    method: 'get',
+    params: data
+  })
+}

+ 1 - 1
src/views/dict/blml/components/DictDialog.vue

@@ -20,7 +20,7 @@
       <el-table
         :data="tableData"
         max-height="400"
-        style="width: 100%,"
+        style="width: 100%;"
       >
         <el-table-column
           type="index"

+ 30 - 5
src/views/rule/config/components/SearchBox.vue

@@ -1,8 +1,17 @@
 <template>
   <div>
+    <div>
+      <div class="title">病历评价总分:100分</div>
+      <div class="sub_msg">
+        <span class="sub_level">病历等级</span>
+        <span class="sub_text">甲级:91~100分</span>
+        <span class="sub_text">乙级:75~90分</span>
+        <span class="sub_text">丙级:0~74分</span>
+      </div>
+    </div>
     <el-form :inline="true" :model="data" class="demo-form-inline">
       <el-form-item label="">
-        <el-select v-model="data.sslb" filterable clearable placeholder="病历类型" style="width: 198px;">
+        <el-select v-model="data.case_type" filterable clearable placeholder="病历类型" style="width: 198px;">
           <el-option label="出院记录" value="出院记录" />
           <el-option label="入院记录" value="入院记录" />
           <el-option label="病程类" value="病程类" />
@@ -80,8 +89,8 @@
         </el-select>
       </el-form-item>
       <el-form-item label="">
-        <el-select v-model="data.changjing" multiple collapse-tags filterable clearable placeholder="风险等级" style="width: 198px;">
-          <el-option label="高风险" error_level="高风险" />
+        <el-select v-model="data.error_level" filterable clearable placeholder="风险等级" style="width: 198px;">
+          <el-option label="高风险" value="高风险" />
           <el-option label="中风险" value="中风险" />
           <el-option label="低风险" value="低风险" />
         </el-select>
@@ -109,10 +118,10 @@ export default {
       type: Object,
       default() {
         return {
-          changjing: '',
+          changjing: [],
           department: [],
           object: '',
-          type: [],
+          type: '',
           is_not: '',
           description: '',
           score: undefined,
@@ -163,4 +172,20 @@ export default {
     text-align: left;
   }
 }
+.title {
+  font-size: 22px;
+  line-height: 40px;
+}
+.sub_msg {
+  margin-bottom: 20px;
+  .sub_level {
+    font-size: 18px;
+    margin-right: 10px;
+    line-height: 30px;
+  }
+  .sub_text {
+    font-size: 14px;
+    line-height: 24px;
+  }
+}
 </style>

+ 74 - 16
src/views/rule/config/components/TableBox.vue

@@ -1,8 +1,27 @@
 <template>
   <div>
     <div class="btn-box">
-      <el-button type="primary" icon="el-icon-plus" @click="onCreate">新增</el-button>
-      <el-button type="primary" icon="el-icon-download" @click="onExport">配置</el-button>
+      <el-button type="primary" icon="el-icon-plus" style="margin-right: 10px;" @click="onCreate">新增</el-button>
+      <el-popover
+        placement="bottom-end"
+        title=""
+        trigger="click"
+        popper-class="table_code_popper"
+      >
+        <el-checkbox v-model="checkAll" :indeterminate="isIndeterminate" @change="handleCheckAllChange">全选</el-checkbox>
+        <el-checkbox-group v-model="codes" @change="handleChange">
+          <el-checkbox label="description">错误描述</el-checkbox>
+          <el-checkbox label="department">质控科室</el-checkbox>
+          <el-checkbox label="is_not">单项否决</el-checkbox>
+          <el-checkbox label="status">质控状态</el-checkbox>
+          <el-checkbox label="type">质控类型</el-checkbox>
+          <el-checkbox label="changjing">质控场景</el-checkbox>
+          <el-checkbox label="error_level">风险等级</el-checkbox>
+          <el-checkbox label="score">扣分</el-checkbox>
+          <el-checkbox label="rule">质控规则</el-checkbox>
+        </el-checkbox-group>
+        <el-button slot="reference" type="primary" icon="el-icon-setting">设置</el-button>
+      </el-popover>
     </div>
     <el-table
       v-loading="loading"
@@ -19,68 +38,76 @@
         align="center"
       />
       <el-table-column
-        prop="SSBM"
+        prop="case_type"
         label="病历类型"
         fixed="left"
         align="center"
         width="120"
       />
       <el-table-column
-        prop="SSLB"
+        prop="object"
         label="质控项目"
         align="center"
         width="240"
       />
       <el-table-column
-        prop="SSLB"
+        v-if="codes.includes('description')"
+        prop="description"
         label="错误描述"
         align="center"
-        width="240"
       />
       <el-table-column
-        prop="LRXX"
+        v-if="codes.includes('department')"
+        prop="department"
         label="质控科室"
         align="center"
         width="240"
       />
       <el-table-column
-        prop="LRXX"
+        v-if="codes.includes('is_not')"
+        prop="is_not"
         label="单项否决"
         align="center"
         width="120"
       />
       <el-table-column
-        prop="LRXX"
+        v-if="codes.includes('status')"
+        prop="status"
         label="质控状态"
         align="center"
         width="120"
       />
       <el-table-column
-        prop="LRXX"
+        v-if="codes.includes('type')"
+        prop="type"
         label="质控类型"
         align="center"
         width="120"
       />
       <el-table-column
-        prop="LRXX"
+        v-if="codes.includes('changjing')"
+        prop="changjing"
         label="质控场景"
         align="center"
         width="120"
       />
       <el-table-column
-        prop="LRXX"
+        v-if="codes.includes('error_level')"
+        prop="error_level"
         label="风险等级"
         align="center"
         width="120"
       />
       <el-table-column
-        prop="LRXX"
+        v-if="codes.includes('score')"
+        prop="score"
         label="扣分"
         align="center"
         width="120"
       />
       <el-table-column
-        prop="LRXX"
+        v-if="codes.includes('rule')"
+        prop=""
         label="质控规则"
         align="center"
         width="120"
@@ -132,12 +159,29 @@ export default {
   },
   data() {
     return {
+      codes: [
+        'changjing',
+        'department',
+        'type',
+        'is_not',
+        'score',
+        'error_level',
+        'status',
+        'description',
+        'rule'
+      ],
+      defaultCodes: [],
+      checkAll: true,
+      isIndeterminate: false,
       createData: {
         bSwitch: false,
         row: {}
       }
     }
   },
+  created() {
+    this.defaultCodes = JSON.parse(JSON.stringify(this.codes))
+  },
   methods: {
     onCreate() {
       this.createData.row = {}
@@ -167,8 +211,14 @@ export default {
     onRuleDetail() {
       alert('todo')
     },
-    onExport() {
-      this.$emit('export')
+    handleCheckAllChange(val) {
+      this.codes = val ? this.defaultCodes : []
+      this.isIndeterminate = false
+    },
+    // 展示字段发生变化
+    handleChange(val) {
+      const checkedCount = val.length
+      this.checkAll = checkedCount === this.defaultCodes.length
     }
   }
 }
@@ -180,3 +230,11 @@ export default {
   margin-bottom: 15px;
 }
 </style>
+<style lang="scss">
+.table_code_popper {
+  .el-checkbox {
+    display: block;
+    line-height: 26px;
+  }
+}
+</style>

+ 5 - 14
src/views/rule/config/index.vue

@@ -15,7 +15,7 @@
 <script>
 import SearchBoxVue from './components/SearchBox.vue'
 import TableBoxVue from './components/TableBox.vue'
-import { getSsczList } from '@/api/dict'
+import { get_rule_list } from '@/api/rule/config'
 
 export default {
   components: {
@@ -26,10 +26,10 @@ export default {
     return {
       loading: false,
       searchData: {
-        changjing: '',
+        changjing: [],
         department: [],
         object: '',
-        type: [],
+        type: '',
         is_not: '',
         description: '',
         score: undefined,
@@ -52,23 +52,14 @@ export default {
       this.getList()
     },
     async getList() {
-      const {
-        ssbm,
-        ssmc,
-        sslb,
-        lrxx
-      } = this.searchData
       const { page, limit } = this.paginationData
       const params = {
-        ssbm,
-        ssmc,
-        sslb,
-        lrxx,
+        ...this.seachData,
         page,
         page_size: limit
       }
       this.loading = true
-      getSsczList(params).then(res => {
+      get_rule_list(params).then(res => {
         const { p } = res
         this.paginationData.total = p.count
         this.tableData = p.list