lex-xin 3 سال پیش
والد
کامیت
dfe6b8ae96
3فایلهای تغییر یافته به همراه10 افزوده شده و 11 حذف شده
  1. 8 11
      src/views/adapayAccount/form.vue
  2. 1 0
      src/views/teachManager/index.vue
  3. 1 0
      src/views/teachManager/modals/addRoot.vue

+ 8 - 11
src/views/adapayAccount/form.vue

@@ -143,10 +143,10 @@
             <el-upload class="avatar-upload"
                        ref="upload"
                        action="/api-web/uploadFile"
+                       :headers="headers"
                        :on-preview="handlePreview"
                        :on-remove="handleRemove"
                        :on-change="handleChange"
-                       :before-upload="beforeImgUpload"
                        :file-list="fileList"
                        accept=".zip"
                        :multiple="false"
@@ -317,16 +317,6 @@ export default {
         this.$refs["accountForm"].resetFields()
       }
     },
-    beforeImgUpload (file) {
-      const isLt2M = file.size / 1024 / 1024 < 9;
-      if (!isLt2M) {
-        this.$message.error(`上传文件大小不能超过 ${9}MB!`);
-      }
-      if (isSize) {
-        this.uploadImgLoading = true
-      }
-      return isSize;
-    },
     async onSubmit (formName) {
       this.$refs[formName].validate(valid => {
         if (valid) {
@@ -381,6 +371,13 @@ export default {
       });
     },
     handleChange (file) {
+      console.log(file)
+      const isLt2M = file.size / 1024 / 1024 < 9;
+      if (!isLt2M) {
+        this.$message.error(`上传文件大小不能超过 ${9}MB!`);
+        this.fileList = []
+        return
+      }
       this.files = file
       this.form.multipartFile = file.raw
       this.$refs["accountForm"].validateField('multipartFile')

+ 1 - 0
src/views/teachManager/index.vue

@@ -259,6 +259,7 @@ export default {
       let level = 0
       if(row) {
         level = this.formatParentId(row.id, this.tableList).length
+        console.log(row, row.id, this.formatParentId(row.id, this.tableList), 'tableList')
         row.level = level
       }
       this.activeRow = row || null;

+ 1 - 0
src/views/teachManager/modals/addRoot.vue

@@ -137,6 +137,7 @@ export default {
         this.imageWidthM = 210
         this.imageHeightM = 268
       }
+      console.log(this.activeRow, 'level')
       this.level = this.activeRow?.level || 0
       try {
         const res = await getSysMusicScoreDetail({ id: this.activeRow.id });