|
@@ -38,10 +38,10 @@
|
|
|
<li
|
|
|
v-for="item in indexList"
|
|
|
class="diagItem ellipsis"
|
|
|
- :title="item.diseaseName"
|
|
|
- @click="selectDiag(item)"
|
|
|
- :key="item.diseaseId">
|
|
|
- {{item.diseaseName}}
|
|
|
+ :title="item.conceptName"
|
|
|
+ @click="selectIndex(item)"
|
|
|
+ :key="item.conceptName">
|
|
|
+ {{item.conceptName}}
|
|
|
</li>
|
|
|
</ul>
|
|
|
</div>
|
|
@@ -52,6 +52,11 @@
|
|
|
<td class="selectedContentGrop">已选内容分组(只可输入数字,相同数字归为一组展示)</td>
|
|
|
<td class="selectedContentOpera">操作</td>
|
|
|
</tr>
|
|
|
+ <tr v-for="(item, index) in selectedIndexList" :key="item.indexUnique">
|
|
|
+ <td class="selectedContent">{{item.indexUnique}}</td>
|
|
|
+ <td class="selectedContentGrop"><input class="groupInput" type="number" v-model="item.indexDesc"></td>
|
|
|
+ <td class="selectedContentOpera"><el-button type="text" size="small" class="delete" @click="delSelectedIndex(item, index)">删除</el-button></td>
|
|
|
+ </tr>
|
|
|
</table>
|
|
|
</div>
|
|
|
<div class="btn">
|
|
@@ -78,6 +83,8 @@
|
|
|
titleText: '添加关联',
|
|
|
diagList: [],
|
|
|
indexList: [],
|
|
|
+ selectedIndexMap: [], //已经选择过的指标
|
|
|
+ selectedIndexList: [], //选择的指标列表
|
|
|
searchDiagVal: '',
|
|
|
searchIndexVal: '',
|
|
|
isEdit: false,
|
|
@@ -87,10 +94,12 @@
|
|
|
const { isEdit, data } = this.$route.params;
|
|
|
if(isEdit) {
|
|
|
if(isEdit) {
|
|
|
- this.titleText = '修改关联'
|
|
|
+ this.isEdit = isEdit;
|
|
|
+ this.titleText = '修改关联';
|
|
|
+ this.form.diseaseId = data.diseaseId
|
|
|
+ this.form.diseaseName = data.diseaseName
|
|
|
+ this.selectedIndexList = data.data
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
} else {
|
|
|
|
|
|
}
|
|
@@ -120,7 +129,7 @@
|
|
|
})
|
|
|
},
|
|
|
selectDiag(item) {
|
|
|
- this.form.diseaseId = item.id
|
|
|
+ this.form.diseaseId = item.diseaseId
|
|
|
this.form.diseaseName = item.diseaseName
|
|
|
this.$refs['diagList'].style.display='none'
|
|
|
this.searchDiagVal = ''
|
|
@@ -133,40 +142,69 @@
|
|
|
},
|
|
|
searchIndex() {
|
|
|
const param = {
|
|
|
- conceptName: this.searchIndexVal
|
|
|
+ conceptName: this.searchIndexVal,
|
|
|
+ excludedConceptNames: this.selectedIndexMap
|
|
|
}
|
|
|
+
|
|
|
api.getAllLisConcept(param).then((res)=>{
|
|
|
if(res.data.code === '0') {
|
|
|
console.log('res.data.data', res.data.data)
|
|
|
- this.indexList = res.data.data
|
|
|
+ // this.indexList = res.data.data
|
|
|
+ this.indexList =[
|
|
|
+ {conceptName : '空腹血糖'},
|
|
|
+ {conceptName : '餐后2小时血糖'},
|
|
|
+ {conceptName : '随机血糖'},
|
|
|
+ {conceptName : '糖化血红蛋白'},
|
|
|
+ {conceptName : '血常规'},
|
|
|
+ ]
|
|
|
this.$refs['indexList'].style.display='block'
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ selectIndex(item) {
|
|
|
+ this.selectedIndexList.push({indexUnique: item.conceptName, indexDesc:''})
|
|
|
+ this.selectedIndexMap.push(item.conceptName)
|
|
|
+ this.indexList = []
|
|
|
+ this.$refs['indexList'].style.display='none'
|
|
|
+ },
|
|
|
+ delSelectedIndex(selectedItem, index) {
|
|
|
+ this.selectedIndexMap = this.selectedIndexMap.filter((item) => {return item != selectedItem.indexUnique})
|
|
|
+ this.selectedIndexList.splice(index, 1)
|
|
|
+ },
|
|
|
submitForm(formName) {
|
|
|
if(!this.form.diseaseId) {
|
|
|
this.warning('请选择诊断')
|
|
|
return
|
|
|
}
|
|
|
- // if(this.rightTagsList.length === 0) {
|
|
|
- // this.warning('请选择量表')
|
|
|
- // return
|
|
|
- // }
|
|
|
+ if(this.selectedIndexList.length === 0) {
|
|
|
+ this.warning('请选择指标')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ for (let i = 0; i < this.selectedIndexList.length; i++) {
|
|
|
+ if(!this.selectedIndexList[i].indexDesc) {
|
|
|
+ this.warning('请填写内容分组')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
this.showDelDialog()
|
|
|
},
|
|
|
showDelDialog() {
|
|
|
- const scaleId = this.selectedTags()
|
|
|
+ this.selectedIndexList.map((item) => {
|
|
|
+ item.diseaseId = this.form.diseaseId
|
|
|
+ return item
|
|
|
+ })
|
|
|
const param ={
|
|
|
"diseaseId": this.form.diseaseId,
|
|
|
- "scaleId": scaleId
|
|
|
+ "indexConfigData": this.selectedIndexList
|
|
|
}
|
|
|
this.showConfirmDialog('是否建立该关联?', () => {
|
|
|
- api.addDisScaleInfo(param).then((res) => {
|
|
|
+ const url = this.isEdit ?api.updateIndexConfigList(param) : api.saveIndexConfigLists(param)
|
|
|
+ url.then((res) => {
|
|
|
if (res.data.code === '0') {
|
|
|
this.warning(res.data.msg || '关联成功', 'success','1000')
|
|
|
setTimeout(() => {
|
|
|
this.$router.push({
|
|
|
- path:'/admin/LT-YXSJWH-LBGLWH'
|
|
|
+ path:'/admin/LT-YXSJWH-MBZBZGLWH'
|
|
|
})
|
|
|
}, 1000);
|
|
|
} else {
|
|
@@ -262,7 +300,7 @@
|
|
|
background-color: #fff;
|
|
|
padding: 20px;
|
|
|
margin: 0px 20px 0px 20px;
|
|
|
- height: 500px;
|
|
|
+ min-height: 400px;
|
|
|
}
|
|
|
.screenIndexLabel {
|
|
|
float: left;
|
|
@@ -297,15 +335,19 @@
|
|
|
.indexList {
|
|
|
left: 128px;
|
|
|
}
|
|
|
+ .groupInput {
|
|
|
+ text-align: center;
|
|
|
+ height: 28px;
|
|
|
+ }
|
|
|
.btn {
|
|
|
position: relative;
|
|
|
background-color: #fff;
|
|
|
margin: 0px 20px;
|
|
|
+ height: 40px;
|
|
|
padding: 20px;
|
|
|
.el-button {
|
|
|
position: absolute;
|
|
|
right: 20px;
|
|
|
- top: -20px;
|
|
|
}
|
|
|
}
|
|
|
.selectDepart {
|