فهرست منبع

Merge remote-tracking branch 'origin/AIControl' into test

zhouna 5 سال پیش
والد
کامیت
414f301b80
2فایلهای تغییر یافته به همراه15 افزوده شده و 5 حذف شده
  1. 2 2
      src/components/qualityControl/QCTipPop.vue
  2. 13 3
      src/components/qualityControl/QCTypePour.vue

+ 2 - 2
src/components/qualityControl/QCTipPop.vue

@@ -17,8 +17,8 @@
       return {
         getStyle(){
             return {
-                top:(this.top-340)+"px",
-                left:(this.left-310)+"px",
+                top:(this.top-350)+"px",
+                left:(this.left-330)+"px",
                 display:this.show?"block":"none"
             }
         }

+ 13 - 3
src/components/qualityControl/QCTypePour.vue

@@ -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++) {