소스 검색

医学术语静态知识维护

morphone1995 5 년 전
부모
커밋
2815d9b5bb
1개의 변경된 파일21개의 추가작업 그리고 10개의 파일을 삭제
  1. 21 10
      src/components/icss/AddMedicinePrompt.vue

+ 21 - 10
src/components/icss/AddMedicinePrompt.vue

@@ -66,6 +66,8 @@
                       </el-upload>
                       <!-- <el-button size="small" type="primary" >点击上传</el-button> -->
                 </el-form-item>
+                <el-form-item  label-width="160px"><div class="uploadInfo" v-if="isSuccessUpload===1">文件正在上传中,请稍等...</div></el-form-item>
+                
             </el-form>
             <div class="btn">
                 <el-button
@@ -129,15 +131,7 @@
                 }}, trigger: 'change' }
           ],
           fileList: [
-             { required: true, message: '请上传文件', trigger: 'change' },
-              // { validator: (rule,value,callback)=>{
-              //   if(value.length < 1){
-              //     callback(new Error('请上传文件'));
-              //   }else{
-              //     callback()
-              //   }                
-              //   }, trigger: 'change' 
-              // }
+             { required: true, message: '请上传文件', trigger: 'change' },             
           ]
         },
         saveDisable: false,  //保存按钮禁止点击
@@ -150,6 +144,7 @@
         isSuccessUpload: 0, //是否上传成功  0: 不在上传  1: 上传过程中  2: 上传成功
       }
     },
+
     /*watch:{
       'form.selectedTerm':function(newVal){
         const name = newVal.nameType;console.log(newVal)
@@ -319,6 +314,11 @@
         })
       },
       submitForm() {
+        if(this.isSuccessUpload === 1) {
+          this.warning('文件正在上传中,请稍等...')
+          return 
+        }
+
         //验证外层表单
         let goOn=true,it=null;
         this.$refs.groups.validate((valid) =>{
@@ -449,6 +449,8 @@
         // 上传过程中   上传按钮 隐藏
         this.isSuccessUpload = 1  // 上传过程中
         this.showFileList = true  // 新增 进度条  显示
+        this.$refs.upload && this.$refs.upload.clearValidate()  // 清除校验
+
         this.showUpLoad = false
         console.log('aaaaaaaaaa',file);
         if(file.size/1024/1024 >= 500){
@@ -521,9 +523,18 @@
         overflow:hidden;
         text-overflow:ellipsis;
       }
+      /deep/ .focusing{
+        // border: 1px solid transparent !important;
+        outline: transparent !important;
+      }
 
-
     }
+    .uploadInfo{
+      margin-top: -20px;
+      color: #606266;
+    }
+
+
 
  
 </style>