Browse Source

Merge branch 'dev' into ChronicMag_zxc

zhangxc 6 years ago
parent
commit
3c1b03ee15

+ 1 - 1
src/components/common/HomePage.vue

@@ -132,7 +132,7 @@
     .user .logo {
         background: @userBase;
 
-    p {;
+    p {
         font-size: 16px;
         line-height: normal
     }

+ 7 - 1
src/components/common/Menu.vue

@@ -38,4 +38,10 @@
     methods: {
     }
   }
-</script>
+</script>
+
+<style lang="less" scoped>
+  .el-menu-vertical-demo {
+    min-width: 300px;
+  }
+</style>

+ 29 - 6
src/components/icss/AddMedicalName.vue

@@ -206,7 +206,8 @@ import pinyin from '../../js/Convert_Pinyin.js';
             name:'女',
             value:2
           }
-        ]
+        ],
+        unfit:false //点确认时是否弹提示
       }
     },
     created(){
@@ -314,10 +315,12 @@ import pinyin from '../../js/Convert_Pinyin.js';
               message:'无法输入纯数字,请输入正确数据!',
               type:'warning'
             });
-            this.data.name = '';
+            // this.data.name = '';
+            this.unfit = true;
           }else{
             let data = this.data;
             data.spell = pinyin.getCamelChars(data.name);
+            this.unfit = false;
           }
         }else if(type==2){
           // 修改时术语名称、拼音和类型均不能修改
@@ -328,10 +331,12 @@ import pinyin from '../../js/Convert_Pinyin.js';
                 message:'无法输入纯数字,请输入正确数据!',
                 type:'warning'
               });
-              this.synonymous[index-1].name = '';
+              // this.synonymous[index-1].name = '';
+              this.unfit = true;
             }else{
               let current = this.synonymous[index-1];
               current.spell = pinyin.getCamelChars(current.name);
+              this.unfit = false;
             }
           }else{
             if(this.synonymous[index].name && !pattern.test(this.synonymous[index].name)){
@@ -339,10 +344,12 @@ import pinyin from '../../js/Convert_Pinyin.js';
                 message:'无法输入纯数字,请输入正确数据!',
                 type:'warning'
               });
-              this.synonymous[index].name = '';
+              // this.synonymous[index].name = '';
+              this.unfit = true;
             }else{
               let current = this.synonymous[index];
               current.spell = pinyin.getCamelChars(current.name);
+              this.unfit = false;
             }
           }
         }
@@ -394,7 +401,7 @@ import pinyin from '../../js/Convert_Pinyin.js';
           this.warning('请输入标准词');
           return
         }
-        if(!this.data.type){
+        if(!this.data.type && !this.unfit){
           this.warning('请选择术语类型');
           return
         }
@@ -444,6 +451,22 @@ import pinyin from '../../js/Convert_Pinyin.js';
           realData[i].type = this.data.type;
           detailList.push(realData[i]);
         }
+        // 校验是否有名称全为数字
+        const pattern = /[^0-9]/g;
+        for(let i=0; i<detailList.length; i++){
+          if(detailList[i].name && !pattern.test(detailList[i].name)){
+            if(!this.unfit){
+              this.$message({
+                message:'无法输入纯数字,请输入正确数据!',
+                type:'warning'
+              });
+            }
+            this.unfit = false;
+            return false;
+            break
+          }
+        }
+        
         let params;
         if(this.showMore==1){
           // 下拉文字转code
@@ -488,7 +511,7 @@ import pinyin from '../../js/Convert_Pinyin.js';
         })
       },
       inputAge(){
-        console.log("输入年龄")
+        // console.log("输入年龄")
       },
       selectType(e){
         this.typeList.map((v,i)=>{

+ 3 - 3
src/components/icss/ChronicDiseaseAdd.vue

@@ -124,7 +124,7 @@ export default {
       for(let i = 0;i < tmpScale.length;i++){
         tmpScale[i].val = tmpScale[i].type
         tmpScale[i].order = tmpScale[i].orderNo
-        tmpScale[i].name = tmpScale[i].type == 1?'文本模块':'推送模块'
+        tmpScale[i].name = tmpScale[i].type == 0?'文本模块':'推送模块'
       }
       this.contentPool = tmpScale
     }
@@ -137,9 +137,9 @@ export default {
       if(JSON.stringify(tmpLeft) == '{}'){
         return
       }
-      if(tmpLeft.val == 2){
+      if(tmpLeft.val == 1){
         for(let i = 0;i < tmpPool.length;i++){
-          if(tmpPool[i].val == 2){
+          if(tmpPool[i].val == 1){
             // this.$message({
             //   message: '推送模块只能添加一次',
             //   type: 'warning'

+ 1 - 0
src/less/common.less

@@ -43,6 +43,7 @@
   height: 100%;
   .logo {
     width: 100%;
+    min-width: 300px;
     text-align: center;
     color: #fff;
     height: @header-height;