|
@@ -1,86 +1,105 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
<el-dialog title="添加质控信息" :visible.sync="data.bSwitch" :close-on-click-modal="false" width="900px" top="7vh">
|
|
|
- <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm"
|
|
|
+ <el-form :model="ruleForm" :rules="rules" ref="ruleFormRef" label-width="100px" class="demo-ruleForm"
|
|
|
label-suffix=":">
|
|
|
- <el-row :gutter="0">
|
|
|
+ <el-row :gutter="24">
|
|
|
<el-col :span="20">
|
|
|
- <el-form-item label="质控规则" prop="rule_id">
|
|
|
- <el-cascader :options="zkInfoArray" v-model="ruleForm.ruleArray" placeholder="请选择质控规则" filterable clearable></el-cascader>
|
|
|
- <i class="el-icon-circle-plus-outline" style="font-size: 28px;margin-left: 10px;" @click="addRule"></i>
|
|
|
+ <el-form-item label="质控模板" prop="ruleArray">
|
|
|
+ <el-row type="flex" align="middle">
|
|
|
+ <el-cascader ref="zkInfoRef" :options="zkInfoArray" style="width: 100%;" v-model="ruleForm.ruleArray" placeholder="请选择质控规则" filterable clearable @change="handleRuleIdChange"></el-cascader>
|
|
|
+ <i class="el-icon-plus" style="font-size: 28px;margin-left: 10px;" @click="addRule"></i>
|
|
|
+ </el-row>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
- <el-row :gutter="0">
|
|
|
+ <el-row :gutter="24">
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="病案号">
|
|
|
- <el-input v-model="ruleForm.MED_REC_ID" disabled placeholder="请输入"></el-input>
|
|
|
+ <el-input v-model="MED_REC_ID" disabled placeholder="请输入病案号"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="床位号" >
|
|
|
- <el-input v-model="ruleForm.CWH" disabled placeholder="请输入"></el-input>
|
|
|
+ <el-form-item label="床位号">
|
|
|
+ <el-input v-model="CWH" disabled placeholder="请输入床位号"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="住院次数">
|
|
|
- <el-input v-model="ruleForm.AAA29" disabled placeholder="请输入"></el-input>
|
|
|
+ <el-input v-model="AAA29" disabled placeholder="请输入住院次数"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="24">
|
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="错误扣分" prop="down" >
|
|
|
- <el-input v-model="ruleForm.down" disabled></el-input>
|
|
|
+ <el-form-item label="接收端" prop="cate">
|
|
|
+ <el-select v-model="ruleForm.cate" filterable clearable placeholder="请选择接收端" style="width: 100%">
|
|
|
+ <el-option v-for="item of receiving" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="错误等级">
|
|
|
- <el-select v-model="ruleForm.level" disabled>
|
|
|
- <el-option v-for="(item,index) of addRuleOptions.levelArray" :key="index" :label="item.name" :value="item.id"></el-option>
|
|
|
+ <el-form-item label="接收人" prop="JSR">
|
|
|
+ <el-select v-model="ruleForm.JSR" filterable clearable multiple :filter-method="filterRecipient"
|
|
|
+ placeholder="请选择接收人" style="width: 100%">
|
|
|
+ <el-option v-for="item of recipient" :key="item.code" :label="`${item.name} ${item.code}`"
|
|
|
+ :value="item.code" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="错误分类" >
|
|
|
- <el-select v-model="ruleForm.type" disabled>
|
|
|
- <el-option v-for="(item,index) of addRuleOptions.typeArray" :key="index" :label="item.name" :value="item.id"></el-option>
|
|
|
+ <el-form-item label="接收科室" prop="JSKS">
|
|
|
+ <el-select v-model="ruleForm.JSKS" filterable clearable multiple :filter-method="filterDeportments"
|
|
|
+ placeholder="请选择接收科室" style="width: 100%">
|
|
|
+ <el-option v-for="(item,index) of deportments" :key="index" :label="item.name" :value="item.dep_id" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="24">
|
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="接收端" prop="cate">
|
|
|
- <el-select v-model="ruleForm.cate" filterable clearable placeholder="请选择" style="width: 100%">
|
|
|
- <el-option v-for="item of receiving" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
- </el-select>
|
|
|
+ <el-form-item label="质控人" prop="ZKR">
|
|
|
+ <el-input v-model="ruleForm.ZKR" placeholder="请输入质控人"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="接收科室" prop="JSKS">
|
|
|
- <el-select v-model="ruleForm.JSKS" filterable clearable multiple :filter-method="filterDeportments"
|
|
|
- placeholder="请选择" style="width: 100%">
|
|
|
- <el-option v-for="(item,index) of deportments" :key="index" :label="item.name" :value="item.dep_id" />
|
|
|
- </el-select>
|
|
|
+ <el-form-item label="扣分">
|
|
|
+ <el-input v-model="ruleFormDisabled.score" placeholder="请输入扣分" disabled></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="接收人" prop="JSR">
|
|
|
- <el-select v-model="ruleForm.JSR" filterable clearable multiple :filter-method="filterRecipient"
|
|
|
- placeholder="请选择" style="width: 100%">
|
|
|
- <el-option v-for="item of recipient" :key="item.id" :label="`${item.name} ${item.base_code}`"
|
|
|
- :value="item.name" />
|
|
|
- </el-select>
|
|
|
+ <el-form-item label="整改期限" prop="correction_date">
|
|
|
+ <el-input style="width: 100%;" v-model="ruleForm.correction_date" controls-position="right" :min="0" :max="100" placeholder="请输入整改期限">
|
|
|
+ <template slot="append">小时</template>
|
|
|
+ </el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
-
|
|
|
- <el-col :span="8">
|
|
|
- <el-form-item label="整改期限">
|
|
|
- <el-input-number v-model="ruleForm.correction_date" controls-position="right" :min="0" :max="100" placeholder="请输入"></el-input-number>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="24">
|
|
|
+ <!-- <el-col :span="8">
|
|
|
+ <el-form-item label="状态" placeholder="请输入状态">
|
|
|
+ <el-select v-model="ruleFormDisabled.level" disabled>
|
|
|
+ <el-option v-for="(item,index) of addRuleOptions.levelArray" :key="index" :label="item.name" :value="item.id"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col> -->
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="质控目录" prop="error_field">
|
|
|
+ <el-input v-model="ruleForm.error_field" placeholder="请输入质控目录"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="24">
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="质控内容" prop="notice">
|
|
|
+ <el-input type="textarea" v-model="ruleForm.notice" placeholder="请填写质控内容"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
- <el-row :gutter="0">
|
|
|
+ <el-row :gutter="24">
|
|
|
<el-col :span="24">
|
|
|
- <el-form-item label="整改说明" prop="basis">
|
|
|
- <el-input type="textarea" v-model="ruleForm.basis" placeholder="请填写整改说明"></el-input>
|
|
|
+ <el-form-item label="质控依据" prop="basis">
|
|
|
+ <el-input type="textarea" v-model="ruleForm.basis" placeholder="请填写质控依据"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -210,8 +229,8 @@ export default {
|
|
|
],
|
|
|
addRuleOptions:{
|
|
|
levelArray:[
|
|
|
- {'id':0,'name':'强制'},
|
|
|
- {'id':1,'name':'建议'},
|
|
|
+ {'id':1,'name':'强制'},
|
|
|
+ {'id':2,'name':'建议'},
|
|
|
],
|
|
|
typeArray:[
|
|
|
{'id':1,'name':'患者基本信息'},
|
|
@@ -245,10 +264,6 @@ export default {
|
|
|
zkInfoArray:[],//
|
|
|
addRuleDialog:false,
|
|
|
addRuleForm:{zk_type:'1'},
|
|
|
- errorTypeArray:[
|
|
|
- {'id':1,'name':'强制'},
|
|
|
- {'id':2,'name':'建议'},
|
|
|
- ],
|
|
|
//
|
|
|
loading: false,
|
|
|
selectData: {
|
|
@@ -265,78 +280,51 @@ export default {
|
|
|
receiving: [],
|
|
|
categoryOptions: [],
|
|
|
ruleForm: {
|
|
|
- AAA28: '',
|
|
|
- ZYH: '',
|
|
|
- ZKR: [],
|
|
|
- ZKKS: '',
|
|
|
- JSR: [],
|
|
|
- JSKS: [this.JSKS],
|
|
|
- ZGJB: '',
|
|
|
- category: '',
|
|
|
- title: '',
|
|
|
- rule_id: '',
|
|
|
- type: '',
|
|
|
- notice: '',
|
|
|
- basis: '',
|
|
|
+ ruleArray: [], // 质控模板
|
|
|
+ cate: '', // 接收端
|
|
|
+ JSR: [], // 接收人
|
|
|
+ JSKS: this.JSKS ? [this.JSKS] : [], // 接收科室
|
|
|
+ ZKR: localStorage.getItem('realname') || '',
|
|
|
+ correction_date: '', // 整改期限
|
|
|
+ error_field: '', // 质控目录
|
|
|
+ // ZKR_CODE: '', // 质控人工号
|
|
|
+ basis: '', // 质控依据
|
|
|
+ notice: this.data.text, // 质控内容
|
|
|
+ },
|
|
|
+ ruleFormDisabled: {
|
|
|
level: '',
|
|
|
- ZGQX: undefined,
|
|
|
- score: undefined,
|
|
|
- cate: '',
|
|
|
- MED_REC_ID: this.MED_REC_ID,
|
|
|
- AAA29: this.AAA29,
|
|
|
- CWH: this.CWH,
|
|
|
+ score: ''
|
|
|
},
|
|
|
rules: {
|
|
|
- AAA28: [{ required: true, message: '请输入', trigger: 'blur' }],
|
|
|
- ZKR: [{ required: true, message: '请输入', trigger: 'blur' }],
|
|
|
- ZKKS: [{ required: true, message: '请输入', trigger: 'blur' }],
|
|
|
-
|
|
|
- JSR: [{ required: true, message: '请输入', trigger: 'blur' }],
|
|
|
- JSKS: [{ required: true, message: '请输入', trigger: 'blur' }],
|
|
|
- ZGJB: [{ required: true, message: '请选择', trigger: 'blur' }],
|
|
|
+ ruleArray: [{ required: true, message: '请选择', trigger: 'blur' }],
|
|
|
cate: [{ required: true, message: '请选择', trigger: 'blur' }],
|
|
|
- category: [{ required: true, message: '请选择', trigger: 'change' }],
|
|
|
- title: [{ required: true, message: '请选择', trigger: 'change' }],
|
|
|
- notice: [{ required: true, message: '请输入', trigger: 'blur' }],
|
|
|
+ JSR: [{ required: true, message: '请选择', trigger: 'blur' }],
|
|
|
+ JSKS: [{ required: true, message: '请选择', trigger: 'blur' }],
|
|
|
+ ZKR: [{ required: true, message: '请输入', trigger: 'blur' }],
|
|
|
+ correction_date: [{ required: true, message: '请输入', trigger: 'blur' }],
|
|
|
+ error_field: [{ required: true, message: '请输入', trigger: 'blur' }],
|
|
|
basis: [{ required: true, message: '请输入', trigger: 'blur' }],
|
|
|
- score: [{ required: true, message: '请输入', trigger: 'blur' }],
|
|
|
- level: [{ required: true, message: '请选择', trigger: 'blur' }],
|
|
|
- MED_REC_ID: [{ required: true, message: '请输入', trigger: 'blur' }],
|
|
|
- AAA29: [{ required: true, message: '请输入', trigger: 'blur' }],
|
|
|
- CWH: [{ required: true, message: '请输入', trigger: 'blur' }],
|
|
|
+ notice: [{ required: true, message: '请输入', trigger: 'change' }],
|
|
|
},
|
|
|
};
|
|
|
},
|
|
|
- watch: {
|
|
|
- // Watch for changes in props and update ruleForm
|
|
|
- MED_REC_ID(newVal) {
|
|
|
- this.ruleForm.MED_REC_ID = newVal;
|
|
|
- },
|
|
|
- CWH(newVal) {
|
|
|
- this.ruleForm.CWH = newVal;
|
|
|
- },
|
|
|
- AAA29(newVal) {
|
|
|
- this.ruleForm.AAA29 = newVal;
|
|
|
- },
|
|
|
- // JSKS(newVal) {
|
|
|
- // this.ruleForm.JSKS = newVal;
|
|
|
- // this.setDefaultValue(newVal);
|
|
|
- // }
|
|
|
- },
|
|
|
+
|
|
|
mounted() {
|
|
|
this.getRuleData();
|
|
|
- // this.getBlInfo()
|
|
|
this.getStaff();
|
|
|
this.getDeportmentList();
|
|
|
this.getCaseCateList();
|
|
|
this.receivingEnd();
|
|
|
this.zkSelectValue();
|
|
|
- this.$set(this.ruleForm, 'basis', this.data.text);
|
|
|
- this.$set(this.ruleForm, 'ZYH', this.AAA28);
|
|
|
- this.getStoredRealname(); // 获取当前登录人
|
|
|
this.getZkInfo();
|
|
|
},
|
|
|
methods: {
|
|
|
+ handleRuleIdChange(e) {
|
|
|
+ const nodeData = this.$refs.zkInfoRef.getCheckedNodes(true)
|
|
|
+ console.log('选中', nodeData)
|
|
|
+ this.ruleFormDisabled.level = nodeData[0].data.level
|
|
|
+ this.ruleFormDisabled.score = nodeData[0].data.score
|
|
|
+ },
|
|
|
success(msg) {
|
|
|
this.$message({
|
|
|
message: msg,
|
|
@@ -384,9 +372,6 @@ export default {
|
|
|
return restaurant.toLowerCase().indexOf(queryString.toLowerCase()) === 0;
|
|
|
};
|
|
|
},
|
|
|
- handleSelectCategory(item) {
|
|
|
- this.$set(this.ruleForm, 'category', item);
|
|
|
- },
|
|
|
// 质控项目
|
|
|
querySearchTitle(queryString, cb) {
|
|
|
var titles = this.selectData.title;
|
|
@@ -402,42 +387,13 @@ export default {
|
|
|
handleSelectTitle(item) {
|
|
|
this.$set(this.ruleForm, 'title', item);
|
|
|
},
|
|
|
- // 质控类型
|
|
|
- querySearchType(queryString, cb) {
|
|
|
- var types = this.selectData.type;
|
|
|
- var results = queryString ? types.filter(this.createFilterType(queryString)) : types;
|
|
|
- // 调用 callback 返回建议列表的数据
|
|
|
- cb(results);
|
|
|
- },
|
|
|
- createFilterType(queryString) {
|
|
|
- return restaurant => {
|
|
|
- return restaurant.toLowerCase().indexOf(queryString.toLowerCase()) === 0;
|
|
|
- };
|
|
|
- },
|
|
|
- handleSelectType(item) {
|
|
|
- this.$set(this.ruleForm, 'type', item);
|
|
|
- },
|
|
|
+
|
|
|
// 获取规则数据
|
|
|
getRuleData() {
|
|
|
getRuleData().then(res => {
|
|
|
this.$set(this, 'selectData', res.data);
|
|
|
});
|
|
|
},
|
|
|
-
|
|
|
- // 质控模板变化
|
|
|
- handleRuleIdChange(val) {
|
|
|
- if (val) {
|
|
|
- const item = this.zkInfoArray.filter(item => item.id)[0];
|
|
|
- const { category, error_type, notice, down, type, title ,level} = item;
|
|
|
- this.$set(this.ruleForm, 'category', category);
|
|
|
- this.$set(this.ruleForm, 'error_type', error_type);
|
|
|
- this.$set(this.ruleForm, 'notice', notice);
|
|
|
- this.$set(this.ruleForm, 'down', item['down']);
|
|
|
- this.$set(this.ruleForm, 'type', item['type']);
|
|
|
- this.$set(this.ruleForm, 'title', title);
|
|
|
- this.$set(this.ruleForm, 'level', level);
|
|
|
- }
|
|
|
- },
|
|
|
// 部门
|
|
|
getDeportmentList() {
|
|
|
this.$axios
|
|
@@ -478,133 +434,30 @@ export default {
|
|
|
},
|
|
|
// 提交
|
|
|
onSubmit() {
|
|
|
- let params = {};
|
|
|
- params['MED_REC_ID'] = this.ruleForm.MED_REC_ID;
|
|
|
- params['ruleArray'] = this.ruleForm.ruleArray;
|
|
|
- params['cate'] = this.ruleForm.cate;
|
|
|
- params['JSKS'] = this.ruleForm.JSKS;
|
|
|
- params['JSR'] = this.ruleForm.JSR;
|
|
|
- params['basis'] = this.ruleForm.basis;
|
|
|
- this.$axios.post('artificial/department/addQualityControlInfo',params).then(res=>{
|
|
|
- if (res.code == 200){
|
|
|
- this.$emit('close');
|
|
|
- this.success(res.msg);
|
|
|
- }
|
|
|
- })
|
|
|
- return;
|
|
|
- this.$refs['ruleForm'].validate(valid => {
|
|
|
+ this.$refs.ruleFormRef.validate((valid) => {
|
|
|
if (valid) {
|
|
|
- const { ZYH, ZKR, ZKKS, JSR, JSKS, ZGJB, category, title, rule_id, type, notice, basis, level, ZGQX, score, cate, MED_REC_ID, AAA29, CWH } = this.ruleForm;
|
|
|
-
|
|
|
- let JSRValue;
|
|
|
- if (Array.isArray(JSR)) {
|
|
|
- if (JSR.length === 1) {
|
|
|
- JSRValue = JSR[0];
|
|
|
- } else if (JSR.length > 1) {
|
|
|
- JSRValue = `[${JSR.join('、')}]`;
|
|
|
- } else {
|
|
|
- JSRValue = '';
|
|
|
- }
|
|
|
- } else {
|
|
|
- JSRValue = JSR;
|
|
|
- }
|
|
|
-
|
|
|
- let JSKSValue;
|
|
|
- if (Array.isArray(JSKS)) {
|
|
|
- JSKSValue = `[${JSKS.join('、')}]`;
|
|
|
- } else {
|
|
|
- JSKSValue = JSKS;
|
|
|
- }
|
|
|
-
|
|
|
- let ZKRValue;
|
|
|
- if (Array.isArray(ZKR)) {
|
|
|
- if (ZKR.length === 1) {
|
|
|
- ZKRValue = ZKR[0];
|
|
|
- } else if (ZKR.length > 1) {
|
|
|
- ZKRValue = `[${ZKR.join('、')}]`;
|
|
|
- } else {
|
|
|
- ZKRValue = '';
|
|
|
- }
|
|
|
- } else {
|
|
|
- ZKRValue = ZKR;
|
|
|
- }
|
|
|
-
|
|
|
- let ZKmlTitele;
|
|
|
- if (Array.isArray(title)) {
|
|
|
- if (title.length === 1) {
|
|
|
- ZKmlTitele = title[0];
|
|
|
- } else if (title.length > 1) {
|
|
|
- ZKmlTitele = `[${title.join('、')}]`;
|
|
|
- } else {
|
|
|
- ZKmlTitele = '';
|
|
|
+ this.$axios.post('artificial/department/addQualityControlInfo',{
|
|
|
+ ...this.ruleForm,
|
|
|
+ JSR: this.ruleForm.JSR.join(','),
|
|
|
+ JSKS: this.ruleForm.JSKS.join(',')
|
|
|
+ }).then(res=>{
|
|
|
+ if (res.code == 200){
|
|
|
+ this.$emit('close');
|
|
|
+ this.success(res.msg);
|
|
|
}
|
|
|
- } else {
|
|
|
- ZKmlTitele = title;
|
|
|
- }
|
|
|
-
|
|
|
- const params = {
|
|
|
- ZYH,
|
|
|
- ZKR: ZKRValue,
|
|
|
- ZKKS,
|
|
|
- JSR: JSRValue,
|
|
|
- JSKS: JSKSValue,
|
|
|
- ZGJB,
|
|
|
- category,
|
|
|
- title: ZKmlTitele,
|
|
|
- rule_id,
|
|
|
- type,
|
|
|
- notice,
|
|
|
- basis,
|
|
|
- level,
|
|
|
- ZGQX,
|
|
|
- score,
|
|
|
- cate,
|
|
|
- MED_REC_ID,
|
|
|
- AAA29,
|
|
|
- CWH,
|
|
|
- };
|
|
|
-
|
|
|
-
|
|
|
- this.loading = true;
|
|
|
- addCaseQuality(params)
|
|
|
- .then(res => {
|
|
|
- const { m } = res;
|
|
|
- this.$message.success(m || '成功');
|
|
|
- this.data.bSwitch = false;
|
|
|
- this.$emit('refresh');
|
|
|
- })
|
|
|
- .finally(res => {
|
|
|
- this.loading = false;
|
|
|
- });
|
|
|
+ })
|
|
|
} else {
|
|
|
+ console.log('error submit!!');
|
|
|
return false;
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- // 获取存储的 realname
|
|
|
- getStoredRealname() {
|
|
|
- const storedRealname = localStorage.getItem('realname');
|
|
|
|
|
|
- if (storedRealname) {
|
|
|
- // 如果 realname 是字符串,转换为数组
|
|
|
- this.realname = storedRealname.split(',');
|
|
|
- // 设置默认值
|
|
|
- this.ruleForm.ZKR = this.realname;
|
|
|
- }
|
|
|
- },
|
|
|
// 接收人
|
|
|
getStaff() {
|
|
|
getStaffListData().then(res => {
|
|
|
- const { data } = res;
|
|
|
- if (data.length) {
|
|
|
- data.forEach(ele => {
|
|
|
- this.recipient.push({
|
|
|
- id: ele.code,
|
|
|
- name: ele.name,
|
|
|
- base_code: ele.base_code,
|
|
|
- });
|
|
|
- });
|
|
|
- }
|
|
|
+ const { data = [] } = res;
|
|
|
+ this.recipient = data
|
|
|
});
|
|
|
},
|
|
|
filterRecipient(val) {
|