|
@@ -12,7 +12,7 @@
|
|
|
@click='selectLeftTag(item, index, $event)'
|
|
|
>
|
|
|
<p class="ellipsis" >
|
|
|
- <span class="tagName">{{item.recTypeDetail}}</span>
|
|
|
+ <span class="tagName">{{item.name}}</span>
|
|
|
<span :class="activeId==item.id?'tip-icon active':'tip-icon'" @click="showTipPop(item,$event)"></span>
|
|
|
</p>
|
|
|
</li>
|
|
@@ -33,7 +33,7 @@
|
|
|
@click='selectRightTag(item)'
|
|
|
>
|
|
|
<p class="ellipsis">
|
|
|
- <span class="tagName">{{item.recTypeDetail}}</span>
|
|
|
+ <span class="tagName">{{item.name}}</span>
|
|
|
<span :class="activeId==item.id?'tip-icon active':'tip-icon'" @click="showTipPop(item,$event)"></span>
|
|
|
</p>
|
|
|
</li>
|
|
@@ -53,7 +53,7 @@ import QCTipPop from './QCTipPop.vue';
|
|
|
|
|
|
export default {
|
|
|
name: "QCTypePour",
|
|
|
- props: ['hospital','moduleName'],
|
|
|
+ props: ['hospital','moduleName','selectedTag'],
|
|
|
data() {
|
|
|
return {
|
|
|
checkedExc:false,
|
|
@@ -77,8 +77,9 @@ export default {
|
|
|
if(this.hospital&&this.moduleName){
|
|
|
const that = this;
|
|
|
setTimeout(function(){ //等watch执行后赋值tags,否则这里先执行,会被watch里清空
|
|
|
+ that.rightTagsList = [...that.selectedTag];
|
|
|
that.getModuleTypeList();
|
|
|
- //that.$emit('changeActionData',that.rightTagsList);
|
|
|
+ that.$emit('changeActionData',that.getModuleTypeIds());
|
|
|
},100);
|
|
|
}
|
|
|
},
|
|
@@ -97,9 +98,17 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
showTipPop(item,e){
|
|
|
- console.log(e)
|
|
|
+ if(this.showPop){
|
|
|
+ this.activeId = '';
|
|
|
+ this.curName = '';
|
|
|
+ this.curEmp = '';
|
|
|
+ this.popTop = 0;
|
|
|
+ this.popLeft=0;
|
|
|
+ this.showPop=false;
|
|
|
+ return;
|
|
|
+ }
|
|
|
this.activeId = item.id;
|
|
|
- this.curName = item.recTypeDetail;
|
|
|
+ this.curName = item.name;
|
|
|
this.curEmp = item.behospitalCodes;
|
|
|
this.popTop = e.clientX;
|
|
|
this.popLeft=e.clientY;
|
|
@@ -127,7 +136,7 @@ export default {
|
|
|
return it;
|
|
|
});
|
|
|
this.rightTagsList=arr;
|
|
|
- this.$emit('changeActionData',this.rightTagsList);
|
|
|
+ this.$emit('changeActionData',this.getModuleTypeIds());
|
|
|
},
|
|
|
transOptions(opt){
|
|
|
return opt&&opt.map((it)=>{
|
|
@@ -194,7 +203,7 @@ export default {
|
|
|
tmpRightLis.splice(i,1);
|
|
|
tmpRightLis.splice(i-1,0,tmp1);
|
|
|
this.rightTagsList = [...tmpRightLis];
|
|
|
- this.$emit('changeActionData',this.rightTagsList, false);
|
|
|
+ this.$emit('changeActionData',this.getModuleTypeIds(), false);
|
|
|
return
|
|
|
}
|
|
|
}
|
|
@@ -209,7 +218,7 @@ export default {
|
|
|
tmpRightLis.splice(i,1);
|
|
|
tmpRightLis.splice(i+1,0,tmp1);
|
|
|
this.rightTagsList = [...tmpRightLis];
|
|
|
- this.$emit('changeActionData',this.rightTagsList, false);
|
|
|
+ this.$emit('changeActionData',this.getModuleTypeIds(), false);
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
@@ -234,7 +243,7 @@ export default {
|
|
|
this.selectLeftTagsList = [];
|
|
|
this.selectRightTagsList = [];
|
|
|
this.getModuleTypeList();
|
|
|
- this.$emit('changeActionData',this.rightTagsList, false);
|
|
|
+ this.$emit('changeActionData',this.getModuleTypeIds(), false);
|
|
|
},
|
|
|
toRightList() {
|
|
|
this.rightTagsList.push(...this.selectLeftTagsList);
|
|
@@ -244,14 +253,14 @@ export default {
|
|
|
this.selectLeftTagsList = [];
|
|
|
this.selectRightTagsList = [];
|
|
|
this.getModuleTypeList();
|
|
|
- this.$emit('changeActionData',this.rightTagsList, false);
|
|
|
+ this.$emit('changeActionData',this.getModuleTypeIds(), false);
|
|
|
},
|
|
|
getModuleTypeList() {
|
|
|
this.leftTagsList = []
|
|
|
if(this.hospital === "" || this.moduleName===""){
|
|
|
return
|
|
|
}
|
|
|
- return api.getModuleTypeList({hospitalId: this.hospital, modeId: this.moduleName}).then((res) =>{
|
|
|
+ return api.getModuleTypeList({hospitalId: this.hospital, modeId: this.moduleName,notIdList:this.getModuleTypeIds()||[]}).then((res) =>{
|
|
|
if(res.data.code==="0"){
|
|
|
const data = res.data.data;
|
|
|
this.leftTagsList = data;
|
|
@@ -265,6 +274,10 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ getModuleTypeIds(){
|
|
|
+ const list=this.rightTagsList;
|
|
|
+ return list.map((it)=>it.id);
|
|
|
+ }
|
|
|
},
|
|
|
components:{
|
|
|
QCTipPop
|