Browse Source

01/16 显示点区域外添加

panhui 7 years ago
parent
commit
95f24c5dd2
1 changed files with 9 additions and 3 deletions
  1. 9 3
      src/main/vue/src/components/DrugArea.vue

+ 9 - 3
src/main/vue/src/components/DrugArea.vue

@@ -246,18 +246,24 @@ export default {
       if (this.bgMove) {
         return
       }
-      if (this.canAdd(this.mapInfo[index])) {
+      if (this.canAdd(this.mapInfo[index])&&!this.isAreaShowPoint) {
         this.$emit('choosePoint', {
           x: this.getX(index),
           y: this.getY(index),
           index: index
         })
       }
+      else if(!this.canAdd(this.mapInfo[index])&&this.isAreaShowPoint){
+         this.$emit('choosePoint', {
+          x: this.getX(index),
+          y: this.getY(index),
+          index: index
+        })
+      }
       else {
-        this.$alert('只能在区域内添加', '提示', {
+        this.$alert('只能在区域'+(this.isAreaShowPoint?'外':'')+'添加', '提示', {
           confirmButtonText: '确定',
           callback: action => {
-
           }
         });
       }