Browse Source

病例条目

zhangxc 5 năm trước cách đây
mục cha
commit
9711f21f9d

+ 269 - 0
src/components/recordInput/AddRecordItem.vue

@@ -0,0 +1,269 @@
+<template>
+    <div>
+        <crumbs :title="title" :param="$route.params" linkTo="RecordManager"></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>
+                    <el-form-item label="血型:" prop="brbaxx">
+                        <el-select v-model="form.brbaxx"
+                                   placeholder="请选择"
+                                   size="small">
+                            <el-option
+                                    v-for="item in bloodType"
+                                    :key="String(item.key)"
+                                    :label="item.name"
+                                    :value="String(item.key)">
+                            </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>
+                    <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>
+                    <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>
+                    <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>
+                    <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>
+                    <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';
+  export default {
+    name:'AddRecordItem',
+    data(){
+      return{
+        // data:{},
+        labelPosition:'left',
+        /*zybljlList:[
+          {name:'aaa',content:'333333'},
+          {name:'vvv',content:'333sa'}
+        ],*/
+        sexType:[],
+        bloodType:[],
+        rhType:[],
+        title:'测试病例记录维护-修改测试病例记录',
+        form:{
+          brbaxb:'',
+          brbaxx:'',
+          brbarh:'',
+          mjzzdmc:'',
+          zyzyzdmc:'',
+          zyqtzdmc:'',
+          zybljlList:[]
+        },
+        id:null,
+      }
+    },
+    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);
+      }
+    },
+    methods:{
+      getTypes(){
+        api.getTypes().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;
+          }else{
+            this.$message({
+              message:result.msg,
+              type:'warning'
+            });
+          }
+        })
+      },
+      getDetail(syid,zyid){
+        api.getRecordDetail({basyid:syid,brzyid:zyid}).then((res)=>{
+          const result = res.data;
+          if(result.code==0){
+            this.form = result.data;
+          }else{
+            this.$message({
+              message:result.msg,
+              type:'warning'
+            });
+          }
+        })
+      },
+      cancel(){
+        this.$router.push({
+          name: 'RecordManager',
+          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;
+          }
+        });*/
+      },
+    }
+  }
+</script>
+<style lang="less">
+    @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: '诊断编码:';
+    }
+    }
+    }
+
+</style>

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


+ 258 - 0
src/components/recordInput/RecordItemList.vue

@@ -0,0 +1,258 @@
+<template>
+    <div>
+        <crumbs title="病例条目" style="min-width: 980px">
+            <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-form-item>
+               <el-form-item label="层级定义:">
+                   <el-input size="mini" v-model.trim="filter.level" placeholder="层级定义" clearable></el-input>
+               </el-form-item>
+               <el-form-item label="条目编码:">
+                   <el-input size="mini" v-model.trim="filter.itemCode" placeholder="条目编码" clearable></el-input>
+               </el-form-item>
+               <el-form-item>
+                   <el-button size="mini" @click="filterDatas">查找</el-button>
+                   <el-button size="mini" type="warning" @click="AddRecordItem">新增条目</el-button>
+                   <el-button size="mini" type="warning" @click="manageBatch">批量管理</el-button>
+               </el-form-item>
+            </el-form>
+        </crumbs>
+        <div class="contents">
+            <el-table
+                    :data="list"
+                    border
+                    style="width: 100%">
+                <el-table-column
+                        :resizable = "false"
+                        prop="caseNumber"
+                        label="病案号"
+                      >
+                </el-table-column>
+                <el-table-column
+                        :resizable = "false"
+                        prop="hospitalName"
+                        label="医院"
+                >
+                </el-table-column>
+                <el-table-column
+                        :resizable = "false"
+                        prop="creator"
+                        label="是否标注"
+                        width="">
+                    <template slot-scope="scope">
+                       
+                        <span style="margin:0 3px;">{{scope.isTag ? "是":"否"}}</span>
+                        
+                    </template>
+                </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:{
+          itemName:'',
+          module:'',
+          level:'',
+          itemCode:''
+        },
+        /*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;
+        },
+      AddRecordItem(){
+        this.$router.push({
+          name:'AddRecordItem',
+        })
+      },
+      manageBatch(){
+        this.$router.push({
+          name:'ManageItemBatch',
+        })
+      },
+      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,*/
+          // textId:
+          caseNumber:this.filter.brzyid.trim(),
+          hospitalName: this.filter.hospitalName.trim()
+        };
+        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){
+        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

@@ -126,6 +126,11 @@ import ShowRecord from '@components/recordManager/showRecord.vue';
 import RecordInput from '@components/recordInput/RecordList.vue';
 import AddRecordInput from '@components/recordInput/AddRecord.vue';
 
+//病历条目
+import RecordItemList from '@components/recordInput/RecordItemList.vue';
+import AddRecordItem from '@components/recordInput/AddRecordItem.vue';
+import ManageItemBatch from '@components/recordInput/ManageItemBatch.vue';
+
 export default [
   {
     path: '/',
@@ -307,6 +312,9 @@ export default [
       {path: 'LT-BLGL-CKBLGL',name:'ShowRecord', component: ShowRecord},//添加病历
       {path: 'LT-BLZK-BLRl',name:'RecordInput', component: RecordInput},//病例录入
       {path: 'LT-BLZK-TJBLRl',name:'AddRecordInput', component: AddRecordInput},//病例录入
+      {path: 'LT-BLZK-BLTM',name:'RecordItemList', component: RecordItemList},//病例条目
+      {path: 'LT-BLZK-TJBLTM',name:'AddRecordItem', component: AddRecordItem},//病例条目
+      {path: 'LT-BLZK-PLGLBLTM',name:'ManageItemBatch', component: ManageItemBatch},//病例条目
 
     ]
   }