Browse Source

病例录入

zhangxc 5 years ago
parent
commit
6532e96522

+ 4 - 0
src/api/config.js

@@ -282,6 +282,10 @@ export default {
       'getRecordDetail':'/api/mrman/arRechome/getBABLContent',//病历管理--病历详情
       'saveRecord':'/api/mrman/arRechome/saveBABLContent',  //保存病例
       'getTypes':'/api/mrman/getMrEnumsData',//枚举类型
+      'getRecordInpList':'/api/mrman/qcInputcases/getInputcasesAll',//获取全部病历录入
+      'removeRecordInpById':'/api/mrman/qcInputcases/cancelById',//删除病历录入
+      'addRecordInp':'/api/mrman/qcInputcases/getInputcasesAlls', //保存和修改全部病历录入 
+      'getRecordInpModule':'/api/mrman/qcCases/getAll' //获取全部模块及条目
   },
 	menuIconList: { //菜单对应图标
 		'YH-KZT': 'el-icon-menu',

+ 12 - 0
src/api/records.js

@@ -15,4 +15,16 @@ export default {
   getTypes:(param)=>{
     return axios.post(urls.getTypes,param);
   },
+  getRecordInpList: (param) =>{ //获取全部病历录入
+    return axios.post(urls.getRecordInpList,param);
+  },
+  removeRecordInpById: (param) =>{ //删除病历录入
+    return axios.post(urls.removeRecordInpById,param);
+  },
+  addRecordInp: (param) =>{ //保存和修改全部病历录入 
+    return axios.post(urls.addRecordInp,param);
+  },
+  getRecordInpModule: (param) =>{ //获取全部模块及条目
+    return axios.post(urls.getRecordInpModule,param);
+  },
 }

+ 306 - 0
src/components/recordInput/AddRecord.vue

@@ -0,0 +1,306 @@
+<template>
+    <div>
+        <crumbs :title="title" :param="$route.params" linkTo="RecordInput"></crumbs>
+        <div class="contents">
+            <div class="content ">
+                <el-form ref="form" :label-position="labelPosition" label-width="90px" class="add-record-form clearfix" :model="form">
+                    <div class="contentBox clearfix">
+                        <div class="left fl clearfix">
+                            <el-form-item label="病例信息:" prop="recordInfo">
+                                <el-input
+                                      v-model="form.recordInfo"
+                                      type="textarea"
+                                      :rows="20"
+                                      placeholder="请输入内容">
+                                </el-input>
+                            </el-form-item>
+                        </div>
+                        <div class="right fr clearfix">
+                            <el-select v-model="form.casesId" placeholder="请选择" @change="changeSelectCase">
+                              <el-option
+                                v-for="item in caseLIst"
+                                :key="item.id"
+                                :label="item.name"
+                                :value="item.id">
+                              </el-option>
+                            </el-select>
+                            <div class="casesEntryList">
+                                <el-checkbox-group v-model="form.checkedcasesEntrys" >
+                                    <el-checkbox v-for=" casesEntry in casesEntryList" :label="casesEntry.id" :key="casesEntry.id">{{casesEntry.name}}</el-checkbox>
+                                </el-checkbox-group>
+                            </div>
+                        </div>
+
+
+                    </div>
+                    
+                   
+                    <p class="oper">
+                        <el-button style="margin-right: 30px" size="small" type="primary" @click="confirm('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';
+  export default {
+    name:'AddRecord',
+    data(){
+      return{
+        // data:{},
+        labelPosition:'left',
+        /*zybljlList:[
+          {name:'aaa',content:'333333'},
+          {name:'vvv',content:'333sa'}
+        ],*/
+        caseLIst:[],
+        casesEntryList:[],
+        title:'病历录入-添加病例',
+        form:{
+          recordInfo:'',
+          casesId:'',
+          checkedcasesEntrys:[]
+        },
+        id:null,
+      }
+    },
+    created(){
+      
+      
+      const { isEdit, data } = this.$route.params;
+      if(isEdit) {
+          this.titleText = '修改病例';
+          this.id= data.id
+          this.form.casesId = data.qcInputcasesMapping[0].casesId
+          this.form.recordInfo = data.text
+          let checkedcasesEntrys = []
+           this.getRecordInpModule().then(()=>{
+            this.changeSelectCase(this.form.casesId)
+             for(let i = 0; i <  data.qcInputcasesMapping.length; i++) {
+                checkedcasesEntrys.push(data.qcInputcasesMapping[i].casesEntryId)
+              }
+              this.form.checkedcasesEntrys = checkedcasesEntrys
+              })
+         
+          console.log( this.form.checkedcasesEntrys)
+         
+      }else {
+         this.getRecordInpModule()
+      }
+
+    },
+    methods:{
+      getRecordInpModule(){
+        return api.getRecordInpModule({}).then((res)=>{
+          const result = res.data;
+          if(result.code==0){
+            this.caseLIst = result.data
+          }else{
+            this.$message({
+              message:result.msg,
+              type:'warning'
+            });
+          }
+        })
+      },
+      changeSelectCase(value){
+
+        this.form.checkedcasesEntrys = []
+        this.casesEntryList = this.caseLIst.filter(item => item.id === value)[0].qcCasesEntry
+      },
+      cancel(){
+        this.$router.push({
+          name: 'RecordInput',
+          params: Object.assign({}, this.$route.params)
+        });
+      },
+      confirm(form){
+        const {recordInfo, casesId, checkedcasesEntrys} = this.form
+        if(!recordInfo) {
+          this.warning('请输入病例信息')
+          return
+        }
+         if(casesId === '') {
+          this.warning('请选择模块ID')
+           return
+        }
+         if(!checkedcasesEntrys.length) {
+          this.warning('请选择条目')
+           return
+        }
+        let qcInputMappingSaveVO = [];
+        for(let i = 0; i < checkedcasesEntrys.length; i++) {
+          qcInputMappingSaveVO.push({
+            casesEntryId: checkedcasesEntrys[i],
+            casesId: casesId,
+            pass: 0
+          })
+        }
+        let param = {
+          text: recordInfo,
+          qcInputMappingSaveVO,
+        }
+        if(this.id){
+          param = Object.assign(param,{id: this.id})
+        }
+        api.addRecordInp(param).then((res)=>{
+            if(res.data.code==0){
+                if(this.id){
+                  this.warning('修改成功', 'success')
+                }else{
+                  this.warning('添加成功', 'success')
+                }
+               
+                //返回带搜索条件的首页
+                this.$router.push({
+                  name: 'RecordInput',
+                  // params: Object.assign({}, this.$route.params)
+                });
+            }else{
+                this.warning(res.data.msg)
+               
+            }
+        })
+        /*if(!this.form.name.trim() || !this.form.refreshTime.trim()){
+          this.$message({
+            message:'请填写相关内容',
+            type:'warning'
+          });
+          return
+        }*/
+        /*this.$refs[form].validate((valid) => {
+          if (valid) {*/
+            // if(id){//修改
+            //   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;
+          }
+        });*/
+      },
+      warning(msg,type){
+        this.$message({
+          showClose: true,
+          message:msg,
+          type:type||'warning'
+        })
+      },
+    }
+  }
+</script>
+<style lang="less">
+    @import "../../less/admin.less";
+    .content{
+        background: #fff;
+        padding: 20px 20px 50px;
+        color: #545455;
+        min-width: 980px;
+        position: relative;
+        .left,.right{
+          width: 50%;
+          height: 450px;
+        }
+        .right{
+          width: 45%;
+          margin-left: 5%;
+          .el-select{
+            width: 80%;
+          }
+        }
+        .casesEntryList{
+          margin-top: 20px;
+          padding: 10px 0;
+          width: 80%;
+          border: 1px solid #dcdfe6;
+          height: 350px;
+          overflow-y: auto;
+          .el-checkbox{
+            position: relative;
+            display: block;
+            width: calc(100% - 60px);
+            margin-left: 30px;
+            line-height: 30px;
+            .el-checkbox__input{
+              position: absolute;
+              top: 9px;
+            }
+            .el-checkbox__label{
+              padding: 0 0 0 20px;
+              white-space: normal;
+              line-height: 30px;
+            }
+          }
+        }
+        .short-inp{
+            width: 200px;
+        }
+        .sub-title{
+            font-weight: bold;
+            font-size: 16px;
+            margin-bottom: 20px;
+        }
+        .oper{
+            padding-right: 80px;
+            text-align: right;
+        }
+        .treatments{
+          .el-input{
+              width:200px;
+              display: inline-block;
+          }
+        }
+    }
+
+</style>

+ 238 - 0
src/components/recordInput/RecordList.vue

@@ -0,0 +1,238 @@
+<template>
+    <div>
+        <crumbs title="病例入录" style="min-width: 980px">
+            <el-form :inline="true" class="demo-form-inline">
+                <!-- <el-form-item label="病人住院ID:">
+                   <el-input size="mini" v-model="filter.brzyid" placeholder="病人住院ID" clearable></el-input>
+               </el-form-item> -->
+               <el-form-item>
+                   <!-- <el-button size="mini" @click="filterDatas">查找</el-button> -->
+                   <el-button size="mini" type="warning" @click="addRecord">添加测试病例</el-button>
+               </el-form-item>
+            </el-form>
+        </crumbs>
+        <div class="contents">
+            <el-table
+                    :data="list"
+                    border
+                    style="width: 100%">
+                <el-table-column
+                        :resizable = "false"
+                         type="index"
+                        :index = 'indexMethod'
+                        label="编号"
+                        width="60">
+                </el-table-column>
+                <el-table-column
+                        :resizable = "false"
+                        prop="gmtModified"
+                        label="操作时间"
+                        width="180">
+                </el-table-column>
+                <el-table-column
+                        :resizable = "false"
+                        prop="text"
+                        label="病历内容"
+                        show-overflow-tooltip>
+                </el-table-column>
+                <!--<el-table-column
+                        :resizable = "false"
+                        prop="operName"
+                        label="性别">
+                </el-table-column>-->
+                <el-table-column
+                        :resizable = "false"
+                        prop="operate"
+                        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>
+            <!--<div class="pagination">
+                <el-pagination :current-page.sync="currentPage"
+                               @current-change="currentChange"
+                               background
+                               :page-size="pageSize"
+                               :page-sizes="pageSizeArr"
+                               @size-change="handleSizeChange"
+                               :layout="pageLayout"
+                               :total="total">
+                </el-pagination>
+            </div>-->
+        </div>
+    </div>
+</template>
+
+<script>
+  import api from '@api/records.js';
+  /*import config from '@api/config.js';
+  import utils from '@api/utils.js';*/
+
+  export default {
+    name: 'RecordInput',   //慢病指标值关联维护
+    data: function() {
+      return {
+        list: [],
+        searched: false,
+        filter:{
+        },
+        /*currentPage: 1,
+        pageSize: config.pageSize,
+        pageSizeArr:config.pageSizeArr,
+        pageLayout:config.pageLayout,
+        total: 0,*/
+      }
+    },
+    created() {
+      const that = this;
+      //返回时避免参数未赋值就获取列表
+      setTimeout(function(){
+        that.getDataList();
+      });
+    },
+    watch: {
+      'filter': {
+        handler: function () {
+          this.searched = false;
+        },
+        deep: true
+      }
+    },
+    beforeRouteEnter(to, from, next) {
+      next(vm => {
+        //const pm = to.param;
+        Object.assign(vm, to.params);
+        //vm.inCurrentPage=to.params.currentPage;
+      })
+    },
+    methods: {
+      /*handleSizeChange(val){
+        this.pageSize = val;
+        this.currentPage = utils.getCurrentPage(this.currentPage, this.total, this.pageSize);
+        this.getDataList();
+      },*/
+      indexMethod(index) {
+            return   index + 1;
+        },
+      addRecord(){
+        this.$router.push({
+          name:'AddRecordInput',
+        })
+      },
+      getDataList(isTurnPage) {
+        const param = this.getFilterItems(isTurnPage);
+        this.searched = true;
+        const loading = this.$loading({
+          lock: true,
+          text: 'Loading',
+          spinner: 'el-icon-loading',
+          background: 'rgba(0, 0, 0, 0.7)'
+        });
+        api.getRecordInpList(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.currentPage=this.inCurrentPage;
+              this.inCurrentPage = undefined;
+            }*/
+          }
+        })
+      },
+      filterDatas() {
+        //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
+        // })
+      },
+      /*currentChange(next) {
+        this.currentPage = next;
+        this.getDataList(true);
+      },*/
+      getFilterItems(isTurnPage) {
+        //翻页时筛选条件没点确定则清空
+        if(isTurnPage&&!this.searched){
+        };
+        const param = {
+          /*current: this.inCurrentPage||this.currentPage,
+          size: this.pageSize,*/
+        };
+        return param;
+      },
+     warning(msg,type){
+        this.$message({
+          showClose: true,
+          message:msg,
+          type:type||'warning'
+        })
+      },
+      showConfirmDialog(msg,resolve){
+        this.$alert(msg, '提示', {
+          confirmButtonText: '确定',
+          type: 'warning'
+        }).then(() => {
+          resolve();
+        }).catch(() => {});
+      },
+      showDelDialog(row){
+        console.log('row', row)
+        const param = {
+         textId: row.id 
+        };
+        const txt ='是否删除该病例?';
+        this.showConfirmDialog(txt,()=>{
+          api.removeRecordInpById(param).then((res)=>{
+            if(res.data.code=='0'){
+              this.getDataList();
+              this.warning(res.data.msg || '操作成功','success');
+            }else{
+              this.warning(res.data.msg);
+            }
+          }).catch((error)=>{
+            this.warning(error);
+          })
+        });
+      }
+    }
+  }
+</script>
+
+
+<style lang="less">
+    @import "../../less/admin.less";
+    .delete{
+        color: red;
+    }
+    .delete:hover {
+        color: red;
+    }
+    .review{
+        color: #22ccc8;
+    }
+    .pagination {
+        min-width: 1010px;
+    }
+</style>

+ 8 - 0
src/routes.js

@@ -117,10 +117,15 @@ import RuleApply from '@components/RuleManager/RuleApply.vue';
 import AddRule from '@components/RuleManager/AddRule.vue';
 import AddRuleApply from '@components/RuleManager/AddRuleApply.vue';
 
+//病历管理
 import RecordManager from '@components/recordManager/recordList.vue';
 import AddRecord from '@components/recordManager/addRecord.vue';
 import ShowRecord from '@components/recordManager/showRecord.vue';
 
+//病历录入
+import RecordInput from '@components/recordInput/RecordList.vue';
+import AddRecordInput from '@components/recordInput/AddRecord.vue';
+
 export default [
   {
     path: '/',
@@ -300,6 +305,9 @@ export default [
       {path: 'LT-BLGL',name:'RecordManager', component: RecordManager},//病历管理
       {path: 'LT-BLGL-TJBLGL',name:'AddRecord', component: AddRecord},//添加病历
       {path: 'LT-BLGL-CKBLGL',name:'ShowRecord', component: ShowRecord},//添加病历
+      {path: 'LT-BLZK-BLRl',name:'RecordInput', component: RecordInput},//病例录入
+      {path: 'LT-BLZK-TJBLRl',name:'AddRecordInput', component: AddRecordInput},//病例录入
+
     ]
   }
 ]

+ 2 - 2
vue.config.js

@@ -1,7 +1,7 @@
 const path = require('path');
 // const proxy_path = 'http://192.168.2.236:80';
-const proxy_path = 'http://192.168.2.241:88';
-// const proxy_path = 'http://192.168.2.236:88';
+// const proxy_path = 'http://192.168.2.241:88';
+const proxy_path = 'http://192.168.2.236:88';
 // const proxy_path = 'http://192.168.3.101:5050';
 // const proxy_path = 'http://192.168.3.117:5050';//周铁刚
 // const proxy_path = 'http://192.168.3.115:5050';