Explorar o código

限制血压只能添加9个标签明细

Luolei %!s(int64=6) %!d(string=hai) anos
pai
achega
11644611c7
Modificáronse 1 ficheiros con 9 adicións e 0 borrados
  1. 9 0
      src/components/icss/BloodPressTagGroup.vue

+ 9 - 0
src/components/icss/BloodPressTagGroup.vue

@@ -295,6 +295,15 @@ export default {
       this.$emit('changeActionData', this.rightTagsList2, false);
     },
     toRightList() {
+      let rLength = this.rightTagsList.length
+      let lLength = this.selectLeftTagsList.length
+      if(rLength + lLength > 9){
+        this.$message({
+          message: '血压类型最多能添加9个标签,已添加'+rLength+'个',
+          type: 'warning'
+        });
+        return;
+      }
       this.rightTagsList.push(...this.selectLeftTagsList);
       let textItem = { text: '', type: 'input' }
       for (let i = 0; i < this.selectLeftTagsList.length; i++) { //选中标签每个前后加入输入框