浏览代码

病例条目

zhangxc 5 年之前
父节点
当前提交
33760ab696

+ 6 - 0
src/api/config.js

@@ -288,6 +288,12 @@ export default {
       'getRecordInpModule':'/api/mrman/qcCases/getAll', //获取全部模块及条目
       'getRecordHopitalList':'/api/mrman/qcHospitalInfo/getHospitalInfoAll',//获取医院信息 
       'getRecordCases':'/api/mrman/qcCases/getCases', //获取全部模块
+      'getRecordIremList': '/api/mrman/qcCasesEntry/getAll', //获取病例条目列表
+      'addRecordItem':'/api/mrman/casesEntryHospital/insertByHospital', //添加病例条目
+      'getRecordByHospital':'/api/mrman/casesEntryHospital/getAllByHospital', //获取指定医院的病例条目 
+      'updateRecordByHospital':'/api/mrman/casesEntryHospital/updateByHospital', //更新指定医院的病例条目 
+      'delRecordItem':'/api/mrman/qcCasesEntry/deleteQcCasesEntry', //删除病例条目
+      'getRecordDetail':'/api/mrman/qcCasesEntry/getUpdateInfo' //获取病例详情
   },
 	menuIconList: { //菜单对应图标
 		'YH-KZT': 'el-icon-menu',

+ 18 - 1
src/api/records.js

@@ -33,5 +33,22 @@ export default {
   getRecordCases: (param) =>{ //获取全部模块
     return axios.post(urls.getRecordCases,param);
   },
- 
+  getRecordIremList:(param) =>{ //获取病例条目列表
+    return axios.post(urls.getRecordIremList,param);
+  },
+  addRecordItem:(param) =>{ //添加病例条目
+    return axios.post(urls.addRecordItem,param);
+  },
+  getRecordByHospital:(param) =>{ //获取指定医院的病例条目
+    return axios.post(urls.getRecordByHospital,param);
+  },
+  updateRecordByHospital:(param) =>{ //更新指定医院的病例条目 
+    return axios.post(urls.updateRecordByHospital,param);
+  },
+  delRecordItem:(param) =>{ //删除病例条目
+    return axios.post(urls.delRecordItem,param);
+  },
+  getRecordDetail:(param) =>{ //获取病例详情
+    return axios.post(urls.getRecordDetail,param);
+  },
 }

+ 0 - 4
src/components/recordInput/AddRecordCopy.vue

@@ -48,11 +48,7 @@
                                 </el-checkbox-group>
                             </div>
                         </div>
-
-
                     </div>
-                    
-                   
                     <p class="oper">
                         <el-button style="margin-right: 30px" size="small" type="primary" :disabled="!canSumbit" @click="confirm('form')">确定</el-button>
                         <el-button size="small" @click="cancel">取消</el-button>

+ 280 - 190
src/components/recordInput/AddRecordItem.vue

@@ -1,83 +1,76 @@
 <template>
-    <div>
-        <crumbs :title="title" :param="$route.params" linkTo="RecordManager"></crumbs>
+    <div class="addRecordItemWrapper">
+        <crumbs :title="title" :param="$route.params" linkTo="RecordItemList"></crumbs>
         <div class="contents">
             <div class="content">
                 <el-form ref="form" :label-position="labelPosition" label-width="125px" class="add-record-form" :model="form">
-                    <el-form-item label="性别:" prop="sexType">
-                        <el-select v-model="form.brbaxb"
-                                   placeholder="请选择"
-                                   size="small">
-                            <el-option
-                                    v-for="item in sexType"
-                                    :key="String(item.key)"
-                                    :label="item.name"
-                                    :value="String(item.key)">
-                            </el-option>
-                        </el-select>
+                    <el-form-item label="条目名称:" prop="itemName">
+                      <el-input v-model="form.itemName" placeholder="请输入条目名称"></el-input>
                     </el-form-item>
-                    <el-form-item label="血型:" prop="brbaxx">
-                        <el-select v-model="form.brbaxx"
-                                   placeholder="请选择"
-                                   size="small">
+                    <el-form-item label="所属模块:" prop="brbaxx">
+                        <el-select v-model="form.casesId"
+                                   placeholder="请选择模块"
+                                   @change="changeModule"
+                                   >
                             <el-option
-                                    v-for="item in bloodType"
-                                    :key="String(item.key)"
+                                    v-for="item in caseLIst"
+                                    :key="item.id"
                                     :label="item.name"
-                                    :value="String(item.key)">
+                                    :value="item.id">
                             </el-option>
                         </el-select>
                     </el-form-item>
-                    <el-form-item label="RH型:" prop="brbarh">
-                        <el-select v-model="form.brbarh"
-                                   placeholder="请选择"
-                                   size="small">
-                            <el-option
-                                    v-for="item in rhType"
-                                    :key="String(item.key)"
-                                    :label="item.name"
-                                    :value="String(item.key)">
-                            </el-option>
-                        </el-select>
-                    </el-form-item>
-                    <p class="sub-title">门(急)诊诊断:</p>
-                    <el-form-item label="主要诊断:" prop="mjzzdmc">
-                        <p v-for="i in form.mjzzyzdList" class="treatments">
-                            <el-input v-model="i.zdjbmc" placeholder="请输入主要诊断"></el-input>
-                            <el-input v-model="i.jbdmid" placeholder="请输诊断编码"></el-input>
-                        </p>
+                    <el-form-item label="条目编码:" prop="brbarh">
+                         <el-input v-model="form.itemCode" placeholder="请输入条目编码"></el-input>
                     </el-form-item>
-                    <el-form-item label="其他诊断:" prop="mjzzdmc">
-                        <p v-for="i in form.mjzqtzdList" class="treatments">
-                            <el-input v-model="i.zdjbmc" placeholder="请输入其他诊断"></el-input>
-                            <el-input v-model="i.jbdmid" placeholder="请输诊断编码"></el-input>
-                        </p>
+                    <el-form-item label="层级定义:" prop="remark">
+                         <el-input v-model="form.levelNo" placeholder="请输入层级定义"></el-input>
                     </el-form-item>
-                    <p class="sub-title">出院诊断:</p>
-                    <el-form-item label="主要诊断:" prop="zyzyzdmc">
-                        <p v-for="i in form.zyzyzdList" class="treatments">
-                            <el-input v-model="i.zdjbmc" placeholder="请输入门(急)诊诊断"></el-input>
-                            <el-input v-model="i.jbdmid" placeholder="请输诊断编码"></el-input>
-                        </p>
+                    <el-form-item label="备注:" prop="remark">
+                         <el-input v-model="form.remark" placeholder="请输入备注"></el-input>
                     </el-form-item>
-                    <el-form-item label="其他诊断:" prop="zyqtzdmc">
-                        <p v-for="i in form.zyqtzdList" class="treatments">
-                            <el-input v-model="i.zdjbmc" placeholder="请输入门(急)诊诊断"></el-input>
-                            <el-input v-model="i.jbdmid" placeholder="请输诊断编码"></el-input>
-                        </p>
-                        <!--<el-input v-model="form.zyqtzdmc" placeholder="请输入次要诊断"></el-input>-->
+                     <el-form-item label="前置条件:" prop="remark" class="procent">
+                         <el-input v-model="form.precond" placeholder="请输入前置条件"></el-input>
                     </el-form-item>
-                    <el-form-item label="病例记录:">
-                        <el-tabs tab-position="left">
-                            <el-tab-pane :label="i.bljlmc" v-for="i in form.zybljlList">
-                                <el-input
-                                        type="textarea"
-                                        :rows="20"
-                                        v-model="i.bljlnr"
-                                        placeholder="请输入内容">
-                                </el-input>
-                            </el-tab-pane>
-                        </el-tabs>
+                    
+                    <el-form-item label="医院列表:" prop="hospitalList">
+                      <div>
+                          <el-table
+                            ref="multipleTable"
+                            :data="tableData"
+                            tooltip-effect="light"
+                            style="width: 100%"
+                            @selection-change="handleSelectionChange">
+                            <el-table-column
+                              type="selection"
+                              width="120">
+                            </el-table-column>
+                            <el-table-column
+                              label="医院名称"
+                              prop="hospitalName"
+                              width="240">
+                             
+                            </el-table-column>
+                            <el-table-column
+                              prop="name"
+                              label="扣分值"
+                              width="240">
+                                 <template slot-scope="scope">
+                                  <el-input  class="tipsMsg" v-model="scope.row.value" placeholder="请输入扣分值"></el-input>
+                                 </template>
+                            </el-table-column>
+                            <el-table-column
+                              prop="address"
+                              label="提示语"
+                              width="240"
+                              show-overflow-tooltip>
+                               <template slot-scope="scope">
+                                  <el-input class="tipsMsg" v-model="scope.row.tipMsg" placeholder="请输入提示语"></el-input>
+                                 </template>
+                            </el-table-column>
+                          </el-table>
+                      </div>
+                         
                     </el-form-item>
                     <p class="oper">
                         <el-button style="margin-right: 30px" size="small" type="primary" @click="comfirn('form')">确定</el-button>
@@ -100,40 +93,89 @@
           {name:'aaa',content:'333333'},
           {name:'vvv',content:'333sa'}
         ],*/
-        sexType:[],
-        bloodType:[],
-        rhType:[],
-        title:'测试病例记录维护-修改测试病例记录',
+        modifier:'',
+        hospitalList:[],
+        caseLIst:[],
+        title:'病例条目-新增',
         form:{
-          brbaxb:'',
-          brbaxx:'',
-          brbarh:'',
-          mjzzdmc:'',
-          zyzyzdmc:'',
-          zyqtzdmc:'',
-          zybljlList:[]
+          itemName:'',
+          casesId:'',
+          itemCode:'',
+          remark:'',
+          levelNo:'',
+          precond:''
         },
+        tableData:[],
+        selectHospital:[],
+        multipleSelection: [],
         id:null,
+        isEdit: false
       }
     },
     created(){
-      let info = this.$route.params;
-      this.getTypes();
-      if(Object.keys(info).length>0){
-        this.basyid = info.basyid;
-        this.brzyid = info.brzyid;
-        this.title = "测试病例记录维护-修改测试病例记录";
-        this.getDetail(info.basyid,info.brzyid);
+      let {isEdit, data} = this.$route.params;
+      const userLoginDTO = JSON.parse(localStorage.getItem('userLoginDTO'))
+      this.modifier = userLoginDTO && userLoginDTO.linkman
+     
+      console.log(data)
+      if(isEdit){
+        this.title = '病例条目-修改'
+        this.isEdit = isEdit
+        this.id = data.id
+        this.form.itemName = data.name
+        this.form.itemCode = data.code
+        this.form.casesId = data.casesId
+        this.form.remark = data.remark
+        this.form.levelNo = data.levelNo
+        this.form.precond = data.precond
+        this.selectHospital = data.getUpdateInfoDetialDTOS || []
       }
+       this.getRecordInpModule()
+      this.getRecordHopitalList()
     },
     methods:{
-      getTypes(){
-        api.getTypes().then((res)=>{
+      handleSelectionChange(val) {
+        this.multipleSelection = val;
+      },
+      toggleSelection(rows) {
+        setTimeout(()=>{
+          if (rows) {
+          rows.forEach(row => {
+            this.$refs.multipleTable.toggleRowSelection(row);
+          });
+        } else {
+          this.$refs.multipleTable.clearSelection();
+        }
+        })
+        
+      },
+      changeModule(val){
+        this.form.itemCode = this.caseLIst.find(item => item.id === val).prefix
+      },
+       getRecordHopitalList(){
+        return api.getRecordHopitalList({}).then((res)=>{
           const result = res.data;
           if(result.code==0){
-            this.sexType = result.data.sexEnum;
-            this.bloodType = result.data.bloodTypeEnum;
-            this.rhType = result.data.rhTypeEnum;
+            this.hospitalList = result.data
+            console.log('hospitalList',this.hospitalList)
+            const tableData = []
+            for(let i = 0; i < this.hospitalList.length; i++){
+              tableData.push({
+                hospitalId: this.hospitalList[i].id,
+                hospitalName:  this.hospitalList[i].name,
+                value: '',
+                tipMsg:''
+              })
+            }
+            for(let i = 0; i < this.selectHospital.length; i++){
+              const selectItem = this.selectHospital[i]
+              let item = tableData.find(item => item.hospitalName === selectItem.hospitalName)
+              item.value = selectItem.score
+              item.tipMsg = selectItem.msg
+              this.multipleSelection.push(item)
+            }
+            this.tableData = tableData
+            this.toggleSelection(this.multipleSelection)
           }else{
             this.$message({
               message:result.msg,
@@ -142,11 +184,13 @@
           }
         })
       },
-      getDetail(syid,zyid){
-        api.getRecordDetail({basyid:syid,brzyid:zyid}).then((res)=>{
+      
+      getRecordInpModule(){
+        return api.getRecordCases({}).then((res)=>{
           const result = res.data;
           if(result.code==0){
-            this.form = result.data;
+            this.caseLIst = result.data
+            console.log('caseLIst',this.caseLIst)
           }else{
             this.$message({
               message:result.msg,
@@ -157,113 +201,159 @@
       },
       cancel(){
         this.$router.push({
-          name: 'RecordManager',
+          name: 'RecordItemList',
           params: Object.assign({}, this.$route.params)
         });
       },
       comfirn(form){
-        /*if(!this.form.name.trim() || !this.form.refreshTime.trim()){
-          this.$message({
-            message:'请填写相关内容',
-            type:'warning'
-          });
-          return
-        }*/
-        /*this.$refs[form].validate((valid) => {
-          if (valid) {*/
-            if(this.basyid){//修改
-              const param = Object.assign({},this.form,{basyid:this.basyid,brzyid:this.brzyid});
-              api.saveRecord(param).then((res)=>{
-                if(res.data.code==0){
-                  this.$message({
-                    message:"修改成功",
-                    type:'success'
-                  });
-                  //返回带搜索条件的首页
-                  this.$router.push({
-                    name: 'RecordManager',
-                    params: Object.assign({}, this.$route.params)
-                  });
-                }else{
-                  this.$message({
-                    message:res.data.msg,
-                    type:'warning'
-                  });
-                }
-              })
-            }else{//添加
-              // 复制时把list多余字段过滤掉,如id等
-              const detail = this.list;
-              let copyDetail=[];
-              let item={};
-              if(detail && detail.length>0){
-                for(let i=0; i<detail.length; i++){
-                  item.title = detail[i].title;
-                  item.description = detail[i].description;
-                  copyDetail.push(item);
-                  item={};
-                }
-              }
-              const params = Object.assign({},this.form);
-              // api.addVersInfo(this.form).then((res)=>{
-              api.saveRecord(params).then((res)=>{
-                if(res.data.code==0){
-                  this.$message({
-                    message:"添加成功",
-                    type:'success'
-                  })
-                  // this.$router.push({path: 'LT-GBBXXWH-BBXXWH'});
-                  this.$router.push({name: 'RecordManager'});
-                }else{
-                  this.$message({
-                    message:res.data.msg,
-                    type:'warning'
-                  });
-                }
-              })
-            }
-          /*} else {
-            return false;
+          const {itemName,casesId,itemCode,remark,levelNo,precond} = this.form
+         
+          
+          let  casesEntryHospitals = []
+          for(let i = 0; i < this.multipleSelection.length; i++){
+            const item = this.multipleSelection[i]
+            casesEntryHospitals.push({
+              creator: '0',
+              score: item.value,
+              remark: '',
+              modifier:this.modifier,
+              hospitalId: item.hospitalId,
+              msg: item.tipMsg
+            })
           }
-        });*/
+           let params = {
+            id:this.id,
+            name:itemName,
+            levelNo: levelNo,
+            remark: remark,
+            code: itemCode,
+            precond:precond,
+            casesId: casesId,
+            caseName:  this.caseLIst.find(item => item.id === casesId).name,
+            modifier:this.modifier,
+            creator: '0',
+            casesEntryHospitals:casesEntryHospitals
+          }
+          console.log('params',params)
+           api.addRecordItem(params).then((res)=>{
+              if(res.data.code==0){
+                this.$message({
+                  message:"添加成功",
+                  type:'success'
+                })
+                // this.$router.push({path: 'LT-GBBXXWH-BBXXWH'});
+                this.$router.push({name: 'RecordItemList'});
+              }else{
+                this.$message({
+                  message:res.data.msg,
+                  type:'warning'
+                });
+              }
+            })
+          // return
+          // if(this.basyid){//修改
+          //   const param = Object.assign({},this.form,{basyid:this.basyid,brzyid:this.brzyid});
+          //   api.saveRecord(param).then((res)=>{
+          //     if(res.data.code==0){
+          //       this.$message({
+          //         message:"修改成功",
+          //         type:'success'
+          //       });
+          //       //返回带搜索条件的首页
+          //       this.$router.push({
+          //         name: 'RecordManager',
+          //         params: Object.assign({}, this.$route.params)
+          //       });
+          //     }else{
+          //       this.$message({
+          //         message:res.data.msg,
+          //         type:'warning'
+          //       });
+          //     }
+          //   })
+          // }else{//添加
+          //   // 复制时把list多余字段过滤掉,如id等
+          //   const detail = this.list;
+          //   let copyDetail=[];
+          //   let item={};
+          //   if(detail && detail.length>0){
+          //     for(let i=0; i<detail.length; i++){
+          //       item.title = detail[i].title;
+          //       item.description = detail[i].description;
+          //       copyDetail.push(item);
+          //       item={};
+          //     }
+          //   }
+          //   const params = Object.assign({},this.form);
+          //   // api.addVersInfo(this.form).then((res)=>{
+          //   api.saveRecord(params).then((res)=>{
+          //     if(res.data.code==0){
+          //       this.$message({
+          //         message:"添加成功",
+          //         type:'success'
+          //       })
+          //       // this.$router.push({path: 'LT-GBBXXWH-BBXXWH'});
+          //       this.$router.push({name: 'RecordManager'});
+          //     }else{
+          //       this.$message({
+          //         message:res.data.msg,
+          //         type:'warning'
+          //       });
+          //     }
+          //   })
+          // }
+          
       },
     }
   }
 </script>
-<style lang="less">
+<style lang="less" scoped>
     @import "../../less/admin.less";
-    .content{
-        background: #fff;
-        padding: 20px 20px 50px;
-        color: #545455;
-        min-width: 980px;
-        position: relative;
-    .short-inp{
-        width: 200px;
-    }
-    .sub-title{
-        font-weight: bold;
-        font-size: 16px;
-        margin-bottom: 20px;
-    }
-    .oper{
-        text-align: right;
-    }
-    .treatments{
-    .el-input{
-        width:200px;
-        display: inline-block;
-    }
-    .el-input:first-child{
-        margin-right:20px;
-        &:before{
-             content: '诊断名称:';
-         }
-    }
-    .el-input:last-child:before{
-        content: '诊断编码:';
-    }
-    }
-    }
+    .addRecordItemWrapper{
+        .content{                                         
+            background: #fff;
+            padding: 20px 20px 50px;
+            color: #545455;
+            min-width: 980px;
+            position: relative;
+            .short-inp{
+                width: 200px;
+            }
+            .sub-title{
+                font-weight: bold;
+                font-size: 16px;
+                margin-bottom: 20px;
+            }
+            .oper{
+                text-align: right;
+            }
+            /deep/.el-input{
+              width: 200px;
+            }
+            .procent{
+                /deep/.el-input{
+                width: 800px;
+              }
+            }
+            /deep/.el-form-item{
+              margin: 20px 0 0 0;
+
+            }
+            /deep/.el-table{
+              min-width: 0;
+            }
+            /deep/.tipsMsg{
+                .el-input__inner{
+                    width:200px;
+                    height: 30px;
+                    display: inline-block;
+                }
+            }
+        
+      }
+  
+
 
+    }
+    
 </style>

+ 376 - 0
src/components/recordInput/ManageItemBatch.vue

@@ -0,0 +1,376 @@
+<template>
+    <div class="ManageItemBatchWrapper">
+        <crumbs :title="title" :param="$route.params" linkTo="RecordItemList"></crumbs>
+        <div class="contents">
+            <div class="content">
+                <el-form ref="form" :label-position="labelPosition" label-width="125px" class="add-record-form" >
+                    
+                    <el-form-item label="选择医院:" prop="brbaxx">
+                        <el-select v-model="hospitalId"
+                                   placeholder="请选择医院"
+                                   size="small"
+                                   @change="changeHospital">
+                            <el-option
+                                    v-for="item in hospitalList"
+                                    :key="item.id"
+                                    :label="item.name"
+                                    :value="item.id">
+                            </el-option>
+                        </el-select>
+                    </el-form-item>
+                    
+                    <el-form-item label="条目列表:" prop="hospitalList">
+                        <!-- <el-table
+                            ref="multipleTable"
+                            :data="tableData"
+                            tooltip-effect="light"
+                            style="width: 100%"
+                            @selection-change="handleSelectionChange">
+                            <el-table-column
+                              type="selection"
+                              width="120">
+                            </el-table-column>
+                            <el-table-column
+                              label="医院名称"
+                              prop="hospitalName"
+                              width="240">
+                             
+                            </el-table-column>
+                            <el-table-column
+                              prop="name"
+                              label="扣分值"
+                              width="240">
+                                 <template slot-scope="scope">
+                                  <el-input  class="tipsMsg" v-model="scope.row.value" placeholder="请输入扣分值"></el-input>
+                                 </template>
+                            </el-table-column>
+                            <el-table-column
+                              prop="address"
+                              label="提示语"
+                              width="240"
+                              show-overflow-tooltip>
+                               <template slot-scope="scope">
+                                  <el-input class="tipsMsg" v-model="scope.row.tipMsg" placeholder="请输入提示语"></el-input>
+                                 </template>
+                            </el-table-column>
+                          </el-table> -->
+                          <el-collapse v-model="activeLeftNames" @change="handleChange">
+                                <el-collapse-item v-for="(item, index) in caseLIst" :title="item.name" :name="item.id" :key="item.id">
+                                    <!-- <el-checkbox-group v-model="checkAllMap[item.remark]" >
+                                      <el-checkbox v-for=" casesEntry in item.qcCasesEntry" :label="casesEntry.id" :key="casesEntry.id">{{casesEntry.name}}
+                                        <el-input placeholder="请输入扣分值"></el-input>
+                                      </el-checkbox>
+                                  </el-checkbox-group> -->
+                                  <el-table
+                                    ref="multipleTable"
+                                    :data="item.qcCasesEntry"
+                                    tooltip-effect="light"
+                                    style="width: 100%"
+                                    @selection-change="handleSelectionChange($event,item.remark)">
+                                    <el-table-column
+                                      type="selection"
+                                      width="120">
+                                    </el-table-column>
+                                    <el-table-column
+                                      label="条目名称"
+                                      prop="name"
+                                      width="240">
+                                    
+                                    </el-table-column>
+                                    <el-table-column
+                                      prop=""
+                                      label="扣分值"
+                                      width="240">
+                                        <template slot-scope="scope">
+                                          <el-input  class="tipsMsg" v-model="scope.row.score" placeholder="请输入扣分值"></el-input>
+                                        </template>
+                                    </el-table-column>
+                                    <el-table-column
+                                      prop="address"
+                                      label="提示语"
+                                      width="240"
+                                      show-overflow-tooltip>
+                                      <template slot-scope="scope">
+                                          <el-input class="tipsMsg" v-model="scope.row.msg" placeholder="请输入提示语"></el-input>
+                                        </template>
+                                    </el-table-column>
+                                  </el-table>
+                                </el-collapse-item>
+                              </el-collapse>
+                    </el-form-item>
+                    <p class="oper">
+                        <el-button style="margin-right: 30px" size="small" type="primary" @click="comfirn('form')">确定</el-button>
+                        <el-button size="small" @click="cancel">取消</el-button>
+                    </p>
+                </el-form>
+            </div>
+        </div>
+    </div>
+</template>
+<script type="text/javascript">
+ import api from '@api/records.js';
+ import config from '@api/config.js';
+  import utils from '@api/utils.js';
+
+  export default {
+    name:'ManageItemBatch',
+    data(){
+      return{
+        // data:{},
+        labelPosition:'left',
+        /*zybljlList:[
+          {name:'aaa',content:'333333'},
+          {name:'vvv',content:'333sa'}
+        ],*/
+        hospitalList:[],
+        caseLIst:[],
+        sexType:[],
+        bloodType:[],
+        rhType:[],
+        title:'批量管理',
+        hospitalId:'',
+        tableData:[],
+        checkAllMap:{
+
+        },
+        multipleSelection: [],
+        id:null,
+        activeLeftNames: ['1'],
+      }
+    },
+    created(){
+      let info = this.$route.params;
+      this.getRecordHopitalList()
+      this.getRecordInpModule()
+    },
+    methods:{
+      toggleSelection(values) {
+        console.log('ccccccccc',values) ///remark有空值,数据错误明天提醒下改下
+        setTimeout(()=>{
+          for(let i = 0; i < values.length; i++){
+            if(values[i]){
+              values[i].forEach(value=>{
+                this.$refs.multipleTable[i].toggleRowSelection(value);
+              })
+            }
+          }
+          // if (rows) {
+          // rows.forEach(row => {
+          //   this.$refs.multipleTable.toggleRowSelection(row);
+          //   // console.log('this.$refs.multipleTabl',this.$refs.multipleTable)
+          //   // const domLen = this.$refs.multipleTable.length
+          //   // const values = Object.values(this.checkAllMap)
+          //   // console.log('values,',values)
+          //   // for(let i = 0; i < values.length; i++){
+          //   //   if(values[i].length > 0){
+          //   //     console.length('aaaaaaaaaaa')
+          //   //     this.$refs.multipleTable[i].toggleRowSelection(value[i]);
+          //   //   }
+          //   // }
+          // });
+        // } else {
+        //   console.log('bbbb')
+        //    const domLen = this.$refs.multipleTabl.length
+        //     for(let i = 0; i < domLen; i++){
+        //       // this.$refs.multipleTable[i].clearSelection();
+        //     }
+        // }
+        })
+        
+      },
+      handleSelectionChange(val,remark) {
+        console.log('val',remark)
+        this.checkAllMap[remark] = val;
+      },
+       handleChange(val) {
+        // console.log(val);
+      },
+      changeHospital(val){
+        this.getRecordByHospital(val).then
+      },
+      getRecordInpModule(){
+        return api.getRecordInpModule({}).then((res)=>{
+          const result = res.data;
+          if(result.code==0){
+            let  caseLIst = result.data
+          
+            console.log('caseLIst', caseLIst)
+            this.caseLIst = caseLIst  //提醒每项加分值和备注
+
+             const checkAllMap = {}
+            for(let i = 0; i < this.caseLIst.length; i++){
+              checkAllMap[this.caseLIst[i].remark] = []
+            }
+            this.checkAllMap = checkAllMap
+          }else{
+            this.$message({
+              message:result.msg,
+              type:'warning'
+            });
+          }
+        })
+      },
+      getRecordHopitalList(){
+        return api.getRecordHopitalList({}).then((res)=>{
+          const result = res.data;
+          if(result.code==0){
+            this.hospitalList = result.data
+            console.log('hospitalList',this.hospitalList)
+            const tableData = []
+            for(let i = 0; i < this.hospitalList.length; i++){
+              tableData.push({
+                hospitalId: this.hospitalList[i].id,
+                hospitalName:  this.hospitalList[i].name,
+                value: '',
+                tipMsg:''
+              })
+            }
+            this.tableData = tableData
+          }else{
+            this.$message({
+              message:result.msg,
+              type:'warning'
+            });
+          }
+        })
+      },
+      getRecordByHospital(hospitalId){
+        const param = {
+          hospitalId: hospitalId
+        }
+        return api.getRecordByHospital(param).then((res)=>{
+          const result = res.data;
+          if(result.code==0){
+            console.log('hospitalRecord', result.data)
+            this.hospitalItemList =  result.data
+            for (let i = 0; i< this.hospitalItemList.length; i++){
+              const hospitalItem = this.hospitalItemList[i]
+              let caseItem = this.caseLIst.find(item =>item.id === hospitalItem.casesId)
+              for(let j = 0; j < hospitalItem.getAllByHospitalDetialDTOS.length; j++){
+                const checkedItem = hospitalItem.getAllByHospitalDetialDTOS[j]
+                let recordItem = caseItem.qcCasesEntry.find(item => item.id === checkedItem.cases_entry_id)
+                recordItem.score = checkedItem.score
+                recordItem.msg = checkedItem.msg
+                this.checkAllMap[caseItem.remark].push(recordItem)
+              }
+            }
+            this.caseLIst = JSON.parse(JSON.stringify(this.caseLIst))
+             const values = Object.values(this.checkAllMap)
+            this.toggleSelection(values)
+          }else{
+            this.$message({
+              message:result.msg,
+              type:'warning'
+            });
+          }
+        })
+      },
+      cancel(){
+        this.$router.push({
+          name: 'RecordItemList',
+          params: Object.assign({}, this.$route.params)
+        });
+      },
+      comfirn(form){
+        console.log('multipleSelection',this.checkAllMap)
+        return
+        /*if(!this.form.name.trim() || !this.form.refreshTime.trim()){
+          this.$message({
+            message:'请填写相关内容',
+            type:'warning'
+          });
+          return
+        }*/
+        /*this.$refs[form].validate((valid) => {
+          if (valid) {*/
+            if(this.basyid){//修改
+              const param = Object.assign({},this.form,{basyid:this.basyid,brzyid:this.brzyid});
+              api.saveRecord(param).then((res)=>{
+                if(res.data.code==0){
+                  this.$message({
+                    message:"修改成功",
+                    type:'success'
+                  });
+                  //返回带搜索条件的首页
+                  this.$router.push({
+                    name: 'RecordManager',
+                    params: Object.assign({}, this.$route.params)
+                  });
+                }else{
+                  this.$message({
+                    message:res.data.msg,
+                    type:'warning'
+                  });
+                }
+              })
+            }else{//添加
+              // 复制时把list多余字段过滤掉,如id等
+              const detail = this.list;
+              let copyDetail=[];
+              let item={};
+              if(detail && detail.length>0){
+                for(let i=0; i<detail.length; i++){
+                  item.title = detail[i].title;
+                  item.description = detail[i].description;
+                  copyDetail.push(item);
+                  item={};
+                }
+              }
+              const params = Object.assign({},this.form);
+              // api.addVersInfo(this.form).then((res)=>{
+              api.saveRecord(params).then((res)=>{
+                if(res.data.code==0){
+                  this.$message({
+                    message:"添加成功",
+                    type:'success'
+                  })
+                  // this.$router.push({path: 'LT-GBBXXWH-BBXXWH'});
+                  this.$router.push({name: 'RecordManager'});
+                }else{
+                  this.$message({
+                    message:res.data.msg,
+                    type:'warning'
+                  });
+                }
+              })
+            }
+          /*} else {
+            return false;
+          }
+        });*/
+      },
+    }
+  }
+</script>
+<style lang="less">
+    @import "../../less/admin.less";
+    .ManageItemBatchWrapper{
+      .content{
+        background: #fff;
+        padding: 20px 20px 50px;
+        color: #545455;
+        min-width: 980px;
+        position: relative;
+        .short-inp{
+            width: 200px;
+        }
+        .sub-title{
+            font-weight: bold;
+            font-size: 16px;
+            margin-bottom: 20px;
+        }
+        .oper{
+            text-align: right;
+        }
+        /deep/.tipsMsg{
+            .el-input__inner{
+                width:200px;
+                height: 30px;
+                display: inline-block;
+            }
+        }
+      }
+    }
+    
+
+</style>

+ 120 - 58
src/components/recordInput/RecordItemList.vue

@@ -1,12 +1,24 @@
 <template>
     <div>
-        <crumbs title="病例条目" style="min-width: 980px">
+        <crumbs title="病例条目" style="min-width: 980px" class="recordItemTitle">
             <el-form :inline="true" class="demo-form-inline">
                 <el-form-item label="条目名称:">
                    <el-input size="mini" v-model.trim="filter.itemName" placeholder="条目名称" clearable></el-input>
                </el-form-item>
                 <el-form-item label="所属模块:">
-                   <el-input size="mini" v-model.trim="filter.module" placeholder="所属模块" clearable></el-input>
+                   <!-- <el-input size="mini" v-model.trim="filter.module" placeholder="所属模块" clearable></el-input> -->
+                   <el-select v-model="filter.module"  
+                      clearable 
+                      filterable 
+                      placeholder="请选择模块" 
+                      size="mini">
+                    <el-option
+                      v-for="item in caseLIst"
+                      :key="item.id"
+                      :label="item.name"
+                      :value="item.id">
+                    </el-option>
+                  </el-select>
                </el-form-item>
                <el-form-item label="层级定义:">
                    <el-input size="mini" v-model.trim="filter.level" placeholder="层级定义" clearable></el-input>
@@ -28,40 +40,54 @@
                     style="width: 100%">
                 <el-table-column
                         :resizable = "false"
-                        prop="caseNumber"
-                        label="病案号"
+                        prop="id"
+                        label="条目ID"
                       >
                 </el-table-column>
                 <el-table-column
                         :resizable = "false"
-                        prop="hospitalName"
-                        label="医院"
+                        prop="name"
+                        label="条目名称"
                 >
                 </el-table-column>
                 <el-table-column
                         :resizable = "false"
-                        prop="creator"
-                        label="是否标注"
+                        prop="casesName"
+                        label="所属模块"
                         width="">
-                    <template slot-scope="scope">
-                       
-                        <span style="margin:0 3px;">{{scope.isTag ? "是":"否"}}</span>
-                        
-                    </template>
+                  
+                </el-table-column>
+                <el-table-column
+                        :resizable = "false"
+                        prop="code"
+                        label="条目编码"
+                        width="180">
+                    <!-- <template slot-scope="scope">
+                        <el-button  @click="editRecord(scope.row)" type="text" size="small">标注</el-button>
+                        <span style="margin:0 3px;">|</span>
+                        <el-button @click="showDelDialog(scope.row)" class="delete" type="text" size="small">删除</el-button>
+                    </template> -->
                 </el-table-column>
                 <el-table-column
                         :resizable = "false"
-                        prop="operate"
+                        prop="levelNo"
+                        label="层级定义"
+                        width="">
+                  
+                </el-table-column>
+                 <el-table-column
+                        :resizable = "false"
+                        prop=""
                         label="操作"
                         width="180">
                     <template slot-scope="scope">
-                        <el-button  @click="editRecord(scope.row)" type="text" size="small">标注</el-button>
+                        <el-button  @click="editRecord(scope.row)" type="text" size="small">修改</el-button>
                         <span style="margin:0 3px;">|</span>
                         <el-button @click="showDelDialog(scope.row)" class="delete" type="text" size="small">删除</el-button>
                     </template>
                 </el-table-column>
             </el-table>
-            <!--<div class="pagination">
+            <div class="pagination">
                 <el-pagination :current-page.sync="currentPage"
                                @current-change="currentChange"
                                background
@@ -71,33 +97,34 @@
                                :layout="pageLayout"
                                :total="total">
                 </el-pagination>
-            </div>-->
+            </div>
         </div>
     </div>
 </template>
 
 <script>
   import api from '@api/records.js';
-  /*import config from '@api/config.js';
-  import utils from '@api/utils.js';*/
+ import config from '@api/config.js';
+  import utils from '@api/utils.js';
 
   export default {
-    name: 'RecordInput',   //慢病指标值关联维护
+    name: 'RecordItemList',   //慢病指标值关联维护
     data: function() {
       return {
         list: [],
         searched: false,
+        caseLIst:[],
         filter:{
           itemName:'',
           module:'',
           level:'',
           itemCode:''
         },
-        /*currentPage: 1,
+        currentPage: 1,
         pageSize: config.pageSize,
         pageSizeArr:config.pageSizeArr,
         pageLayout:config.pageLayout,
-        total: 0,*/
+        total: 0,
       }
     },
     created() {
@@ -106,6 +133,7 @@
       setTimeout(function(){
         that.getDataList();
       });
+      this.getRecordInpModule()
     },
     watch: {
       'filter': {
@@ -117,28 +145,51 @@
     },
     beforeRouteEnter(to, from, next) {
       next(vm => {
-        //const pm = to.param;
+        const pm = to.param;
         Object.assign(vm, to.params);
-        //vm.inCurrentPage=to.params.currentPage;
+        vm.inCurrentPage=to.params.currentPage;
       })
     },
     methods: {
-      /*handleSizeChange(val){
+     handleSizeChange(val){
         this.pageSize = val;
         this.currentPage = utils.getCurrentPage(this.currentPage, this.total, this.pageSize);
         this.getDataList();
-      },*/
+      },
       indexMethod(index) {
             return   index + 1;
         },
       AddRecordItem(){
+         const pam = this.searched?{currentPage:this.currentPage,
+          pageSize:this.pageSize,
+          filter:this.filter}:{currentPage:this.currentPage,
+          pageSize:this.pageSize};
         this.$router.push({
           name:'AddRecordItem',
+          params:pam
         })
       },
       manageBatch(){
+         const pam = this.searched?{currentPage:this.currentPage,
+          pageSize:this.pageSize,
+          filter:this.filter}:{currentPage:this.currentPage,
+          pageSize:this.pageSize};
         this.$router.push({
           name:'ManageItemBatch',
+          params:pam
+        })
+      },
+       getRecordInpModule(){
+        return api.getRecordCases({}).then((res)=>{
+          const result = res.data;
+          if(result.code==0){
+            this.caseLIst = result.data
+          }else{
+            this.$message({
+              message:result.msg,
+              type:'warning'
+            });
+          }
         })
       },
       getDataList(isTurnPage) {
@@ -150,56 +201,66 @@
           spinner: 'el-icon-loading',
           background: 'rgba(0, 0, 0, 0.7)'
         });
-        api.getRecordInpList(param).then((res) => {
+        api.getRecordIremList(param).then((res) => {
           loading.close();
           if(res.data.code == '0') {
-            this.list = res.data.data;
-            this.total = res.data.data.length;
-            /*if(this.inCurrentPage!==undefined){
+            this.list = res.data.data.records;
+            this.total = res.data.data.total;
+           if(this.inCurrentPage!==undefined){
               this.currentPage=this.inCurrentPage;
               this.inCurrentPage = undefined;
-            }*/
+            }
           }
         })
       },
       filterDatas() {
-        //this.currentPage = 1;
+        this.currentPage = 1;
         this.getDataList();
       },
       editRecord(row,isShow) {
-        this.$router.push({
-          name: 'AddRecordInput',
-         params: {isEdit: true, data: row}
-        });
-       
-            
-        // const pam = this.searched ? {
-        //   /*currentPage: this.currentPage,
-        //   pageSize:this.pageSize,*/
-        //   filter: this.filter,
-          
-        // } : {
-        //   /*currentPage: this.currentPage,
-        //   pageSize:this.pageSize*/};
         // this.$router.push({
-        //   name:isShow?'ShowRecord':'AddRecordInput',
-        //   params: pam
-        // })
+        //   name: 'AddRecordInput',
+        //  params: {isEdit: true, data: row}
+        // });
+        const param = {
+          id: row.id
+        }
+       api.getRecordDetail(param).then(res =>{
+         if(res.data.code == '0'){
+          console.log('res', res)
+          const item = res.data.data[0]
+          const pam = this.searched ? {
+            currentPage: this.currentPage,
+            pageSize:this.pageSize,
+            filter: this.filter,
+          } : {
+            currentPage: this.currentPage,
+            pageSize:this.pageSize};
+          this.$router.push({
+            name:'AddRecordItem',
+            params: Object.assign(pam, {isEdit: true, data: item})
+          })
+         }
+       })
+            
+        
       },
-      /*currentChange(next) {
+      currentChange(next) {
         this.currentPage = next;
         this.getDataList(true);
-      },*/
+      },
       getFilterItems(isTurnPage) {
         //翻页时筛选条件没点确定则清空
         if(isTurnPage&&!this.searched){
         };
         const param = {
-          /*current: this.inCurrentPage||this.currentPage,
-          size: this.pageSize,*/
-          // textId:
-          caseNumber:this.filter.brzyid.trim(),
-          hospitalName: this.filter.hospitalName.trim()
+          casesId:this.filter.module,
+          code: this.filter.itemCode.trim(),
+          levelNo:this.filter.level.trim(),
+          name: this.filter.itemName.trim(),
+          current: this.inCurrentPage||this.currentPage,
+          size: this.pageSize,
+       
         };
         return param;
       },
@@ -220,11 +281,11 @@
       },
       showDelDialog(row){
         const param = {
-         textId: row.id 
+         id: row.id 
         };
         const txt ='是否删除该病例?';
         this.showConfirmDialog(txt,()=>{
-          api.removeRecordInpById(param).then((res)=>{
+          api.delRecordItem(param).then((res)=>{
             if(res.data.code=='0'){
               this.getDataList();
               this.warning(res.data.msg || '操作成功','success');
@@ -243,6 +304,7 @@
 
 <style lang="less">
     @import "../../less/admin.less";
+    
     .delete{
         color: red;
     }