Selaa lähdekoodia

Merge branch 'AIControlV1.3.1' into test

zhangxc 5 vuotta sitten
vanhempi
commit
91e1bfa9e4

+ 27 - 7
src/components/qualityControl/ItemDataType.vue

@@ -17,7 +17,7 @@
                 </el-form-item>
                 <el-form-item label="所属模块:">
                      <el-select size="mini" v-model.trim="filter.casesId"  placeholder="所属模块" clearable>
-                        <el-option v-for="item in moduleList" :label="item.name" :value="item.val" :key="item.id" ></el-option>
+                        <el-option v-for="item in moduleList" :label="item.name" :value="item.id" :key="item.id" ></el-option>
                     </el-select>
                 </el-form-item>
                 <el-form-item label="条目编码:">
@@ -98,7 +98,8 @@
 </template>
 
 <script>
-    import api from '@api/qualityControl.js';
+  import api from '@api/qualityControl.js';
+  import apis from '@api/records.js';
   import config from '@api/config.js';
   import utils from '@api/utils.js'
   export default {
@@ -127,6 +128,7 @@
     created() {
       const _this=this;
       this.getTypeNameList()
+      this.getModuleList()
       setTimeout(function(){
         _this.getAllTypes().then(()=>{
           _this.getDataList()
@@ -161,7 +163,6 @@
       getAllTypes(){
           if(localStorage.getItem("qcModuleTypes")){
               this.hospitalList = JSON.parse(localStorage.getItem("qcHospitalTypes"));
-              this.moduleList = JSON.parse(localStorage.getItem("qcModuleTypes"));
               return new Promise(function(resolve, reject){
                   resolve()
               });
@@ -174,20 +175,35 @@
                   localStorage.setItem("qcModuleTypes",JSON.stringify(data[12]));
                   localStorage.setItem("qcHospitalTypes",JSON.stringify(data[13]));
                   this.hospitalList = JSON.parse(localStorage.getItem("qcHospitalTypes"));
-                  this.moduleList = JSON.parse(localStorage.getItem("qcModuleTypes"));
               }else{
                   this.warning("获取枚举信息失败");
               }
           });
       },
+      
       getTypeNameList(hospitalId){
         api.getQcEntryTypeByHospital({hospitalId:hospitalId}).then((res) => {
           if(res.data.code == 0){
             // let list = res.data.data.records
               this.qcTypeNameList = res.data.data
+              this.qcTypeNameList.unshift({id: null, name:"无质控类型"})
           }
           
         })
+      },
+       getModuleList(){
+        return apis.getRecordCases({}).then((res)=>{
+          const result = res.data;
+          if(result.code==0){
+            this.moduleList = result.data
+          }else{
+            this.$message({
+              message:result.msg,
+              type:'warning',
+              showClose: true
+            });
+          }
+        })
       },
       handleSizeChange(val){
         this.pageSize = val;
@@ -195,8 +211,9 @@
         this.getDataList();
       },
       getValue(val) {
-        console.log('changeVal', )
-        THIS.filter.typeName = ""
+        this.filter.typeName = ""
+        this.qcTypeNameList=[]
+        this.getTypeNameList(val)
       },
       getDataList(isTurnPage) {
         const param = this.getFilterItems(isTurnPage);
@@ -291,7 +308,7 @@
           this.clearFilter();
         };
         const {hospitalId,typeName,entryName,casesId,code} = this.filter
-        const param = {
+        let param = {
           current: this.inCurrentPage||this.currentPage,
           size: this.pageSize,
           hospitalId: hospitalId,
@@ -300,6 +317,9 @@
           casesId:casesId,
           code:code
         };
+        if(typeName == "无质控类型"){
+          param = Object.assign({}, param,{typeName:"",typeIsNull:1})
+        }
         return param;
       },
       indexMethod(index) {

+ 2 - 0
src/components/qualityControl/ItemDataTypeQcTypePour.vue

@@ -406,6 +406,8 @@ export default {
         width: 60%;
         min-height: 300px;
         padding: 10px 0;
+        max-height: 450px;
+        overflow: auto;
     }
     .tagName{
         margin-right: 10px;

+ 4 - 4
src/components/qualityControl/ItemDataTypeRelation.vue

@@ -18,7 +18,7 @@
                     <el-form-item label="条目名称:" prop="tempName" class="formItem widthLarge">
                         <el-input v-model.trim="form.tempName"  :title="form.tempName"  :disabled="isEdit||isCopy" placeholder="请输入条目名称"></el-input>
                     </el-form-item>
-                    <el-form-item label="模块类型:" prop="moduleTypes" class="formItem widthLarge">
+                    <el-form-item label="质控类型:" prop="moduleTypes" class="formItem widthLarge">
                     </el-form-item>
                     <ItemDataTypeQcTypePour :hospital="form.hospitalId"
                                 :moduleName="form.entryId"
@@ -95,7 +95,7 @@ export default {
                 tempName:{ required: true, message: '请输入条目名称', trigger: ['blur', 'change']},
                 hospital:{ required: true, message: '请选择医院', trigger: ['blur', 'change']},
                 moduleName:{ required: true, message: '请选择所属模块', trigger: ['blur', 'change']},
-                moduleTypes:{ required: true, message: '请选择模块类型   ', trigger: ['blur', 'change']},
+                moduleTypes:{ required: true, message: '请选择质控类型   ', trigger: ['blur', 'change']},
                 /*name:[{ required: true, message: '请输入显示名称',trigger: ['blur', 'change'] }],*/
             },
             searchIndex: -1,
@@ -220,7 +220,7 @@ export default {
               return
             }
             if(!moduleTypes.length){
-              this.warning("请先选择模块类型");
+              this.warning("请先选择质控类型");
               return
             }
             this.moduleInfoList.push({   
@@ -342,7 +342,7 @@ export default {
                       return
                     }
                     if(!moduleTypes.length){
-                        this.warning("请选择模块类型");
+                        this.warning("请选择质控类型");
                         return
                     }