|
@@ -7,52 +7,40 @@
|
|
|
<div class="contentBox clearfix">
|
|
|
<div class="left fl clearfix">
|
|
|
<div class="selectHospital">
|
|
|
- <el-select v-model="form.hospitalCode" placeholder="请选择医院">
|
|
|
- <el-option
|
|
|
- v-for="item in hospitalList"
|
|
|
- :key="item.id"
|
|
|
- :label="item.name"
|
|
|
- :value="item.id">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </div>
|
|
|
- <div class="checkBox">
|
|
|
- <el-checkbox-group v-model="checkList" @change="changeCheck">
|
|
|
- <el-checkbox v-for="item in casesEntryListSelect" :label="item.id" :disabled="item.disabled" :key="item.id">{{item.name}}</el-checkbox>
|
|
|
- </el-checkbox-group>
|
|
|
+ <el-form-item label="医院名称:" prop="">
|
|
|
+ <span>{{form.hospitalCode}}</span>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="病案号:" prop="">
|
|
|
+ <span>{{form.caseNumber}}</span>
|
|
|
+ </el-form-item>
|
|
|
+ <div>
|
|
|
+ <p class="title">病例信息:</p>
|
|
|
+ <el-collapse v-model="activeLeftNames" @change="handleChange">
|
|
|
+ <el-collapse-item v-for="(item, index) in caseInfoList" :title="item.name" :name="item.id" :key="item.id">
|
|
|
+ <div v-for="it in item.text" class="caseInfo">
|
|
|
+ {{it}}
|
|
|
+ </div>
|
|
|
+ </el-collapse-item>
|
|
|
+ </el-collapse>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="contentBox">
|
|
|
- <el-form-item v-for="item in textList" :label="item.label+':'" :key="item.id" prop="recordInfo">
|
|
|
- <el-input
|
|
|
- v-model.trim="item.recordInfo"
|
|
|
- type="textarea"
|
|
|
- :rows="12"
|
|
|
- placeholder="请输入内容">
|
|
|
- </el-input>
|
|
|
- </el-form-item>
|
|
|
+
|
|
|
</div>
|
|
|
|
|
|
+
|
|
|
</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>
|
|
|
+ <p class="title">病例标注:</p>
|
|
|
+ <el-collapse v-model="activeRightNames" @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-checkbox>
|
|
|
</el-checkbox-group>
|
|
|
- </div>
|
|
|
+ </el-collapse-item>
|
|
|
+ </el-collapse>
|
|
|
</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>
|
|
@@ -71,27 +59,28 @@
|
|
|
return{
|
|
|
// data:{},
|
|
|
labelPosition:'left',
|
|
|
- /*zybljlList:[
|
|
|
- {name:'aaa',content:'333333'},
|
|
|
- {name:'vvv',content:'333sa'}
|
|
|
- ],*/
|
|
|
caseLIst:[],
|
|
|
caseRemarkList:[],
|
|
|
- hospitalList:[],
|
|
|
casesEntryList:[],
|
|
|
textList:[],
|
|
|
casesEntryListSelect:[],
|
|
|
checkList:[],
|
|
|
- title:'病例录入-添加病例',
|
|
|
+ caseInfoList:[],
|
|
|
+ checkAllMap:{},
|
|
|
+ textAllMap:{},
|
|
|
+ title:'病例录入-标注病例',
|
|
|
form:{
|
|
|
- casesId:'',
|
|
|
- checkedcasesEntrys:[],
|
|
|
+ caseNumber:'',
|
|
|
hospitalCode:'',
|
|
|
+ caseNumberId:'',
|
|
|
+ hospitalId:''
|
|
|
+
|
|
|
},
|
|
|
id:null,
|
|
|
modifier:'',
|
|
|
- canSumbit: true
|
|
|
-
|
|
|
+ canSumbit: true,
|
|
|
+ activeLeftNames: ['1'],
|
|
|
+ activeRightNames: ['1']
|
|
|
}
|
|
|
},
|
|
|
created(){
|
|
@@ -99,74 +88,55 @@
|
|
|
const userLoginDTO = JSON.parse(localStorage.getItem('userLoginDTO'));
|
|
|
this.modifier = userLoginDTO && userLoginDTO.linkman;
|
|
|
const { isEdit, data } = this.$route.params;
|
|
|
- console.log('data',data)
|
|
|
- this.getRecordHopitalList();
|
|
|
if(isEdit) {
|
|
|
- this.title = '病例录入-修改病例';
|
|
|
+ this.title = '病例录入-标注病例';
|
|
|
this.id= data.id
|
|
|
- this.form.casesId = data.qcInputcasesMapping[0].casesId
|
|
|
- this.form.hospitalCode = data.hospitalId
|
|
|
+ this.form.caseNumber = data.caseNumber
|
|
|
+ this.form.hospitalCode = data.hospitalName
|
|
|
+ this.form.hospitalId = data.hospitalId
|
|
|
// this.form.recordInfo = data.text
|
|
|
- let checkedcasesEntrys = []
|
|
|
- Promise.all([this.getRecordInpModule(), this.getRecordCases()])
|
|
|
- // this.getRecordInpModule()
|
|
|
+ this.caseInfoList = data.moduleMappingDTOList
|
|
|
+ const qcInputcasesMapping = data.qcInputcasesMapping
|
|
|
+ this.getRecordInpModule()
|
|
|
.then(()=>{
|
|
|
- console.log(' this.caseRemarkList', this.caseRemarkList)
|
|
|
- // this.changeSelectCase(this.form.casesId)
|
|
|
- this.casesEntryList = this.caseLIst.filter(item => item.id === this.form.casesId)[0].qcCasesEntry
|
|
|
- const caseListCopy =JSON.parse(JSON.stringify(this.caseLIst))
|
|
|
- const casesEntryListSelect = []
|
|
|
- for(let i = 0; i < caseListCopy.length; i++){
|
|
|
- if(caseListCopy[i].id != this.form.casesId) {
|
|
|
- casesEntryListSelect.push({
|
|
|
- id: caseListCopy[i].id,
|
|
|
- name: caseListCopy[i].name,
|
|
|
- disabled: false
|
|
|
- })
|
|
|
- }else{
|
|
|
- casesEntryListSelect.push({
|
|
|
- id: caseListCopy[i].id,
|
|
|
- name: caseListCopy[i].name,
|
|
|
- disabled: true
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
- this.casesEntryListSelect = casesEntryListSelect
|
|
|
-
|
|
|
-
|
|
|
- let casesEntryIdList = this.getIdList(this.casesEntryList)
|
|
|
- for(let i = 0; i < data.qcInputcasesMapping.length; i++) {
|
|
|
- if( data.qcInputcasesMapping[i].pass == '-1'){
|
|
|
- checkedcasesEntrys.push(data.qcInputcasesMapping[i].casesEntryId)
|
|
|
- }
|
|
|
- }
|
|
|
- this.form.checkedcasesEntrys = checkedcasesEntrys
|
|
|
- const keys = Object.keys(data)
|
|
|
- for(let i = 0; i < keys.length; i++){
|
|
|
- const hasItem = this.caseRemarkList.find(item => item.remark == keys[i])
|
|
|
- if(hasItem&&data[hasItem.remark]){
|
|
|
- this.checkList.push(hasItem.id)
|
|
|
- this.textList.push({
|
|
|
- id: hasItem.id,
|
|
|
- label: hasItem.name,
|
|
|
- remark: hasItem.remark,
|
|
|
- recordInfo: data[hasItem.remark]
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
+ // console.log('checkAllMap',this.checkAllMap)
|
|
|
+ // console.log('this.caseLIst',this.caseLIst)
|
|
|
+ if(qcInputcasesMapping){
|
|
|
+ const checkAllMapCopy = JSON.parse(JSON.stringify(this.checkAllMap))
|
|
|
+ for(let i = 0; i < this.caseLIst.length; i++){
|
|
|
+ const filterArr = qcInputcasesMapping.filter(item => item.casesId == this.caseLIst[i].id&& item.pass == -1)
|
|
|
+ let checkArr = []
|
|
|
+ for(let j = 0; j < filterArr.length; j++){
|
|
|
+ checkArr.push(filterArr[j].casesEntryId)
|
|
|
+ }
|
|
|
+ checkAllMapCopy[this.caseLIst[i].remark] = checkArr
|
|
|
+ }
|
|
|
+ this.checkAllMap = checkAllMapCopy
|
|
|
+ }
|
|
|
+
|
|
|
})
|
|
|
}else {
|
|
|
- this.getRecordCases();
|
|
|
this.getRecordInpModule()
|
|
|
}
|
|
|
|
|
|
},
|
|
|
methods:{
|
|
|
+ handleChange(val) {
|
|
|
+ // console.log(val);
|
|
|
+ },
|
|
|
getRecordInpModule(){
|
|
|
return api.getRecordInpModule({}).then((res)=>{
|
|
|
const result = res.data;
|
|
|
if(result.code==0){
|
|
|
this.caseLIst = result.data
|
|
|
+ const checkAllMap = {}
|
|
|
+ const textAllMap = {}
|
|
|
+ for(let i = 0; i < this.caseLIst.length; i++){
|
|
|
+ checkAllMap[this.caseLIst[i].remark] = []
|
|
|
+ textAllMap[this.caseLIst[i].remark] = []
|
|
|
+ }
|
|
|
+ this.checkAllMap = checkAllMap
|
|
|
+ this.textAllMap = textAllMap
|
|
|
}else{
|
|
|
this.$message({
|
|
|
message:result.msg,
|
|
@@ -175,84 +145,7 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- getRecordHopitalList(){
|
|
|
- return api.getRecordHopitalList({}).then((res)=>{
|
|
|
- const result = res.data;
|
|
|
- if(result.code==0){
|
|
|
- this.hospitalList = result.data
|
|
|
- }else{
|
|
|
- this.$message({
|
|
|
- message:result.msg,
|
|
|
- type:'warning'
|
|
|
- });
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- getRecordCases(){
|
|
|
- return api.getRecordCases({}).then((res)=>{
|
|
|
- const result = res.data;
|
|
|
- if(result.code==0){
|
|
|
- this.caseRemarkList = 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
|
|
|
- const casesEntryListSelect = []
|
|
|
- const caseListCopy =JSON.parse(JSON.stringify(this.caseLIst))
|
|
|
- this.checkList = []
|
|
|
- this.textList= []
|
|
|
- for(let i = 0; i < caseListCopy.length; i++){
|
|
|
- if(caseListCopy[i].id !=value) {
|
|
|
- casesEntryListSelect.push({
|
|
|
- id: caseListCopy[i].id,
|
|
|
- name: caseListCopy[i].name,
|
|
|
- disabled: false
|
|
|
- })
|
|
|
- }else{
|
|
|
- casesEntryListSelect.push({
|
|
|
- id: caseListCopy[i].id,
|
|
|
- name: caseListCopy[i].name,
|
|
|
- disabled: true
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
- this.casesEntryListSelect = casesEntryListSelect
|
|
|
- this.checkList.push(value)
|
|
|
- const selectCase = this.caseRemarkList.find(item => item.id == value)
|
|
|
- this.textList.push({
|
|
|
- id: selectCase.id,
|
|
|
- label: selectCase.name,
|
|
|
- remark: selectCase.remark,
|
|
|
- recordInfo: ''
|
|
|
- })
|
|
|
-
|
|
|
- },
|
|
|
- changeCheck(value){
|
|
|
- let textListId = []
|
|
|
- for(let i = 0; i < this.textList.length; i++){
|
|
|
- textListId.push(this.textList[i].id)
|
|
|
- }
|
|
|
- let noId = this.getArrDifference(textListId,value)[0]
|
|
|
- const noIndex = this.textList.findIndex(item => item.id == noId)
|
|
|
- if(noIndex > -1){
|
|
|
- this.textList.splice(noIndex,1)
|
|
|
- }else{
|
|
|
- const selectCase = this.caseRemarkList.find(item => item.id == noId)
|
|
|
- this.textList.push({
|
|
|
- id: selectCase.id,
|
|
|
- label: selectCase.name,
|
|
|
- remark: selectCase.remark,
|
|
|
- recordInfo: ''
|
|
|
- })
|
|
|
- }
|
|
|
- },
|
|
|
+
|
|
|
cancel(){
|
|
|
this.$router.push({
|
|
|
name: 'RecordInput',
|
|
@@ -272,43 +165,50 @@
|
|
|
return casesEntryIdList
|
|
|
},
|
|
|
confirm(form){
|
|
|
- const {hospitalCode, casesId, checkedcasesEntrys} = this.form
|
|
|
- if(!hospitalCode){
|
|
|
- this.warning('请选择医院')
|
|
|
- return
|
|
|
- }
|
|
|
- if(casesId === '') {
|
|
|
- this.warning('请选择模块ID')
|
|
|
- return
|
|
|
- }
|
|
|
+ const {casesId} = this.form
|
|
|
let qcInputMappingSaveVO = []
|
|
|
- let casesEntryIdList = this.getIdList(this.casesEntryList)
|
|
|
- let noCheckList = this.getArrDifference(casesEntryIdList,checkedcasesEntrys)
|
|
|
- for(let i = 0; i < noCheckList.length; i++) {
|
|
|
- qcInputMappingSaveVO.push({
|
|
|
- casesEntryId: noCheckList[i],
|
|
|
- casesId: casesId,
|
|
|
- pass: 0
|
|
|
- })
|
|
|
- }
|
|
|
- for(let i = 0; i < checkedcasesEntrys.length; i++) {
|
|
|
- qcInputMappingSaveVO.push({
|
|
|
- casesEntryId: checkedcasesEntrys[i],
|
|
|
- casesId: casesId,
|
|
|
- pass: -1
|
|
|
- })
|
|
|
+ const caseLIstCopy = JSON.parse(JSON.stringify(this.caseLIst))
|
|
|
+ for(let i = 0; i < caseLIstCopy.length; i++){
|
|
|
+ const CheckList = this.checkAllMap[caseLIstCopy[i].remark]
|
|
|
+ for(let j = 0; j < caseLIstCopy[i].qcCasesEntry.length; j++){
|
|
|
+ let item = {
|
|
|
+ casesEntryId: caseLIstCopy[i].qcCasesEntry[j].id,
|
|
|
+ casesId: caseLIstCopy[i].id,
|
|
|
+ pass: 0
|
|
|
+ }
|
|
|
+ if(CheckList.findIndex(item => item == caseLIstCopy[i].qcCasesEntry[j].id) > -1){
|
|
|
+ item.pass = -1
|
|
|
+ }
|
|
|
+ qcInputMappingSaveVO.push(item)
|
|
|
+ }
|
|
|
}
|
|
|
+ // for(let i = 0; i < noCheckList.length; i++) {
|
|
|
+ // qcInputMappingSaveVO.push({
|
|
|
+ // casesEntryId: noCheckList[i],
|
|
|
+ // casesId: casesId,
|
|
|
+ // pass: 0
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // for(let i = 0; i < checkedcasesEntrys.length; i++) {
|
|
|
+ // qcInputMappingSaveVO.push({
|
|
|
+ // casesEntryId: checkedcasesEntrys[i],
|
|
|
+ // casesId: casesId,
|
|
|
+ // pass: -1
|
|
|
+ // })
|
|
|
+ // }
|
|
|
let param = {
|
|
|
- creator: this.modifier,
|
|
|
- hospitalId: this.form.hospitalCode,
|
|
|
+ hospitalId: this.form.hospitalId,
|
|
|
+ caseNumberId: this.id,
|
|
|
+ caseNumber: this.form.caseNumber,
|
|
|
+ isTag: true,
|
|
|
qcInputMappingSaveVO,
|
|
|
}
|
|
|
- for(let i = 0; i < this.textList.length; i++){
|
|
|
- param[this.textList[i].remark] = this.textList[i].recordInfo
|
|
|
- }
|
|
|
- if(this.id){
|
|
|
- param = Object.assign(param,{id: this.id})
|
|
|
- }
|
|
|
+ // for(let i = 0; i < this.textList.length; i++){
|
|
|
+ // param[this.textList[i].remark] = this.textList[i].recordInfo
|
|
|
+ // }
|
|
|
+ // if(this.id){
|
|
|
+ // param = Object.assign(param,{id: this.id})
|
|
|
+ // }
|
|
|
this.canSumbit = false
|
|
|
api.addRecordInp(param).then((res)=>{
|
|
|
this.canSumbit = true
|
|
@@ -354,6 +254,16 @@
|
|
|
width: 100%;
|
|
|
}
|
|
|
}
|
|
|
+ .title{
|
|
|
+ font-size: 14px;
|
|
|
+ color: #606266;
|
|
|
+ line-height: 40px;
|
|
|
+ margin-bottom: 22px;
|
|
|
+ }
|
|
|
+ .caseInfo{
|
|
|
+ border: 1px solid #eee;
|
|
|
+ margin: 0 0 10px 0;
|
|
|
+ }
|
|
|
.checkBox{
|
|
|
margin: 20px 0 0 0;
|
|
|
.el-checkbox{
|
|
@@ -424,6 +334,9 @@
|
|
|
display: inline-block;
|
|
|
}
|
|
|
}
|
|
|
+ .el-checkbox{
|
|
|
+ margin: 0 30px 0 0;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
</style>
|