|
@@ -50,6 +50,7 @@
|
|
|
<script>
|
|
|
import api from '@api/qualityControl.js';
|
|
|
import QCTipPop from './QCTipPop.vue';
|
|
|
+import $ from 'jquery'
|
|
|
|
|
|
export default {
|
|
|
name: "QCTypePour",
|
|
@@ -85,9 +86,11 @@ export default {
|
|
|
},
|
|
|
watch: {
|
|
|
hospital(){
|
|
|
+ this.rightTagsList=[];
|
|
|
this.getModuleTypeList();
|
|
|
},
|
|
|
moduleName(){
|
|
|
+ this.rightTagsList=[];
|
|
|
this.getModuleTypeList();
|
|
|
},
|
|
|
/*'selectRightTagsList':{
|
|
@@ -110,10 +113,11 @@ export default {
|
|
|
this.closePop();
|
|
|
return;
|
|
|
}
|
|
|
+ const t=$(".el-main").scrollTop();
|
|
|
this.activeId = item.id;
|
|
|
this.curName = item.name;
|
|
|
this.curEmp = item.behospitalCodes;
|
|
|
- this.popTop = e.clientY;
|
|
|
+ this.popTop = t+e.clientY;
|
|
|
this.popLeft=e.clientX;
|
|
|
this.showPop = true;
|
|
|
},
|
|
@@ -166,13 +170,19 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
selectRightTag(tag) {
|
|
|
- let tmpArr = [];
|
|
|
+ /*let tmpArr = [];
|
|
|
tmpArr.push(tag);
|
|
|
if (this.selectRightTagsList.length > 0 && tag.id == this.selectRightTagsList[0].id) {
|
|
|
this.selectRightTagsList = this.selectRightTagsList.filter(item => item.id !== tag.id)
|
|
|
}else{
|
|
|
this.selectRightTagsList = tmpArr;
|
|
|
- }
|
|
|
+ }*/
|
|
|
+ const hasTag = this.isHasTag(tag, this.selectRightTagsList);
|
|
|
+ if (hasTag) {
|
|
|
+ this.selectRightTagsList = this.selectRightTagsList.filter(item => item.id !== tag.id)
|
|
|
+ } else {
|
|
|
+ this.selectRightTagsList.push(tag);
|
|
|
+ }
|
|
|
},
|
|
|
isHasTag(item, arr) {
|
|
|
for ( let i = 0; i <arr.length; i++) {
|