zdl 1 rok temu
rodzic
commit
f496e8bfb4

+ 8 - 0
src/api/qc.js

@@ -107,3 +107,11 @@ export function getBlInfo(data) {
     data: data
     data: data
   })
   })
 }
 }
+
+export function addCaseQuality(data) {
+  return request({
+    url: '/bl_zk/addCaseQuality',
+    method: 'post',
+    data: data
+  })
+}

Plik diff jest za duży
+ 1 - 46
src/views/recordsRoom/qc/caseViews.vue


+ 153 - 69
src/views/recordsRoom/qc/components/CreateControlResultDialog.vue

@@ -3,13 +3,14 @@
     <el-dialog
     <el-dialog
       title="添加质控信息"
       title="添加质控信息"
       :visible.sync="data.bSwitch"
       :visible.sync="data.bSwitch"
+      :close-on-click-modal="false"
       width="900px"
       width="900px"
       top="7vh">
       top="7vh">
       <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm" label-suffix=":">
       <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm" label-suffix=":">
         <el-row :gutter="0">
         <el-row :gutter="0">
           <el-col :span="12">
           <el-col :span="12">
             <el-form-item label="质控模板" prop="rule_id">
             <el-form-item label="质控模板" prop="rule_id">
-              <el-select v-model="ruleForm.rule_id" clearable filterable placeholder="请选择">
+              <el-select v-model="ruleForm.rule_id" clearable filterable @change="handleRuleIdChange" placeholder="请选择">
                 <el-option v-for="item of selectData.rule" :key="item.id" :label="item.category" :value="item.id"></el-option>
                 <el-option v-for="item of selectData.rule" :key="item.id" :label="item.category" :value="item.id"></el-option>
               </el-select>
               </el-select>
             </el-form-item>
             </el-form-item>
@@ -28,7 +29,9 @@
           </el-col>
           </el-col>
           <el-col :span="8">
           <el-col :span="8">
             <el-form-item label="质控科室" prop="ZKKS">
             <el-form-item label="质控科室" prop="ZKKS">
-              <el-input v-model="ruleForm.ZKKS" placeholder="请输入"></el-input>
+              <el-select v-model="ruleForm.ZKKS" filterable clearable placeholder="请选择" style="width: 100%;">
+                <el-option v-for="item of deportments" :key="item.id" :label="item.name" :value="item.name" />
+              </el-select>
             </el-form-item>
             </el-form-item>
           </el-col>
           </el-col>
           <el-col :span="8">
           <el-col :span="8">
@@ -110,14 +113,15 @@
       </el-form>
       </el-form>
       <span slot="footer" class="dialog-footer">
       <span slot="footer" class="dialog-footer">
         <el-button @click="data.bSwitch">取 消</el-button>
         <el-button @click="data.bSwitch">取 消</el-button>
-        <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
+        <el-button type="primary" @click="onSubmit">确 定</el-button>
       </span>
       </span>
     </el-dialog>
     </el-dialog>
   </div>
   </div>
 </template>
 </template>
 
 
 <script>
 <script>
-import { getRuleData, getBlInfo } from '@/api/qc'
+import { getRuleData, getBlInfo, addCaseQuality } from '@/api/qc'
+import { getDeportmentList } from '@/api/admin'
 
 
 export default {
 export default {
   props: {
   props: {
@@ -134,71 +138,72 @@ export default {
   },
   },
   data() {
   data() {
     return {
     return {
-      // selectData: {
-      //   rule: [],
-      //   category: [],
-      //   title: [],
-      //   type: [],
-      //   level: [],
-      //   zgjb: []
-      // },
-      blData: {},
       selectData: {
       selectData: {
-        "rule": [{
-            "id": 1,
-            "category": "病程类",
-            "title": "首次病程记录",
-            "notice": "入院后8小时内完成首次病程记录",
-            "score": 0.5,
-            "type": "时效性",
-            "level": 2
-          },
-          {
-            "id": 2,
-            "category": "出院记录",
-            "title": "输血记录",
-            "notice": "输血记录中无患者信息和核对情况描述",
-            "score": 1,
-            "type": "内涵质控",
-            "level": 2
-          }
-        ],
-        "category": [
-          "病程类",
-          "入院记录",
-          "出院记录"
-        ],
-        "title": [
-          "诊疗经过",
-          "输血记录",
-          "首次病程记录"
-        ],
-        "type": [
-          "时效性",
-          "内涵质控",
-          "专科质控"
-        ],
-        "level": [
-          {
-            "id": 1,
-            "name": "强制"
-          },
-          {
-            "id": 2,
-            "name": "建议"
-          }
-        ],
-        "zgjb": [
-          "终末质控",
-          "事中质控"
-        ]
-      },
-      blData: {
-        "AAA28": "00071350",
-        "ZYH": "399621",
-        "JSR": "赵阳",
-        "JSKS": "泌尿外科一病区"
+        rule: [],
+        category: [],
+        title: [],
+        type: [],
+        level: [],
+        zgjb: []
       },
       },
+      blData: {},
+      deportments: [],
+      // selectData: {
+      //   "rule": [{
+      //       "id": 1,
+      //       "category": "病程类",
+      //       "title": "首次病程记录",
+      //       "notice": "入院后8小时内完成首次病程记录",
+      //       "score": 0.5,
+      //       "type": "时效性",
+      //       "level": 2
+      //     },
+      //     {
+      //       "id": 2,
+      //       "category": "出院记录",
+      //       "title": "输血记录",
+      //       "notice": "输血记录中无患者信息和核对情况描述",
+      //       "score": 1,
+      //       "type": "内涵质控",
+      //       "level": 2
+      //     }
+      //   ],
+      //   "category": [
+      //     "病程类",
+      //     "入院记录",
+      //     "出院记录"
+      //   ],
+      //   "title": [
+      //     "诊疗经过",
+      //     "输血记录",
+      //     "首次病程记录"
+      //   ],
+      //   "type": [
+      //     "时效性",
+      //     "内涵质控",
+      //     "专科质控"
+      //   ],
+      //   "level": [
+      //     {
+      //       "id": 1,
+      //       "name": "强制"
+      //     },
+      //     {
+      //       "id": 2,
+      //       "name": "建议"
+      //     }
+      //   ],
+      //   "zgjb": [
+      //     "终末质控",
+      //     "事中质控"
+      //   ]
+      // },
+      // blData: {
+      //   "AAA28": "00071350",
+      //   "ZYH": "399621",
+      //   "JSR": "赵阳",
+      //   "JSKS": "泌尿外科一病区"
+      // },
       ruleForm: {
       ruleForm: {
         ZYH: '',
         ZYH: '',
         ZKR: '',
         ZKR: '',
@@ -257,8 +262,10 @@ export default {
     }
     }
   },
   },
   mounted() {
   mounted() {
-    // this.getRuleData()
-    // this.getBlInfo()
+    this.getRuleData()
+    this.getBlInfo()
+    this.getDeportmentList()
+    this.$set(this.ruleForm, 'rule', this.data.text)
   },
   },
   methods: {
   methods: {
     // 获取规则数据
     // 获取规则数据
@@ -272,6 +279,83 @@ export default {
       getBlInfo({ blbh: this.data.blbh }).then(res => {
       getBlInfo({ blbh: this.data.blbh }).then(res => {
         this.blData = res.p
         this.blData = res.p
       })
       })
+    },
+    // 质控模板变化
+    handleRuleIdChange(val) {
+      if (val) {
+        const item = this.selectData.rule.filter(item => item.id)[0]
+        const { category, level, notice, score, type, title } = item
+        this.$set(this.ruleForm, 'category', category)
+        this.$set(this.ruleForm, 'level', level)
+        this.$set(this.ruleForm, 'notice', notice)
+        this.$set(this.ruleForm, 'score', score)
+        this.$set(this.ruleForm, 'type', type)
+        this.$set(this.ruleForm, 'title', title)
+      }
+    },
+    // 部门
+    getDeportmentList() {
+      getDeportmentList().then(res => {
+        const { p } = res
+        if (Object.keys(p.list).length) {
+          for (const key in p.list) {
+            this.deportments.push({
+              id: key,
+              name: p.list[key]
+            })
+          }
+        }
+      })
+    },
+    // 提交
+    onSubmit() {
+      this.$refs['ruleForm'].validate((valid) => {
+        if (valid) {
+          alert('submit!');
+          const {
+            ZYH,
+            ZKR,
+            ZKKS,
+            JSR,
+            JSKS,
+            ZGJB,
+            category,
+            title,
+            rule_id,
+            type,
+            notice,
+            rule,
+            level,
+            ZGQX,
+            score
+          } = this.ruleForm
+          const params = {
+            ZYH,
+            ZKR,
+            ZKKS,
+            JSR,
+            JSKS,
+            ZGJB,
+            category,
+            title,
+            rule_id,
+            type,
+            notice,
+            rule,
+            level,
+            ZGQX: ZGQX/1000,
+            score
+          }
+          addCaseQuality(params).then(res => {
+            const { m } = res
+            this.$message.success(m || '成功')
+            this.data.bSwitch = false
+            this.$emit('refresh')
+          })
+        } else {
+          return false;
+        }
+      });
     }
     }
   }
   }
 }
 }

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików