shaogen1995 4 gadi atpakaļ
vecāks
revīzija
dd8ebafaf8

+ 15 - 0
src/assets/css/reset.less

@@ -118,4 +118,19 @@ textarea{
 }
 }
 .w-e-toolbar .w-e-menu:nth-of-type(19) {
 .w-e-toolbar .w-e-menu:nth-of-type(19) {
 	display: none !important;
 	display: none !important;
+}
+.w-e-toolbar .w-e-menu:nth-of-type(13) {
+	display: none !important;
+}
+.w-e-toolbar .w-e-menu:nth-of-type(14) {
+	display: none !important;
+}
+.w-e-toolbar .w-e-menu:nth-of-type(16) {
+	display: none !important;
+}
+.w-e-toolbar .w-e-menu:nth-of-type(20) {
+	display: none !important;
+}
+.w-e-toolbar .w-e-menu:nth-of-type(21) {
+	display: none !important;
 }
 }

+ 10 - 7
src/pages/home/rotation.vue

@@ -14,8 +14,8 @@
             </div>
             </div>
 
 
             <div class="my-move">
             <div class="my-move">
-              <div class="pre" @click.stop="switchPic('pre',item)" >上一张</div>
-              <div class="next" @click.stop="switchPic('next',item)">下一张</div>
+              <div class="pre" @click.stop="switchPic('pre',item)" v-if="index!==0">上一张</div>
+              <div class="next" @click.stop="switchPic('next',item)" v-if="index!==dataList.length-1">下一张</div>
             </div>
             </div>
           </li>
           </li>
           <li v-if="dataList.length < 5" @click="edit({}, 'add')">
           <li v-if="dataList.length < 5" @click="edit({}, 'add')">
@@ -27,8 +27,8 @@
         </ul>
         </ul>
         <div class="desc">
         <div class="desc">
           <p>
           <p>
-            格式要求:支持png、jpg、gif和jpeg的图片格式,<br>
-            单张最大支持20M,建议尺寸1920*1080<br>
+            格式要求:支持png、jpg和jpeg的图片格式,<br>
+            单张最大支持10M,建议尺寸1920*1080<br>
             数量:最多可上传5张图片。
             数量:最多可上传5张图片。
           </p>
           </p>
           
           
@@ -211,7 +211,9 @@ export default {
 }
 }
 .top-body {
 .top-body {
   ul {
   ul {
+    display: flex;
     width: 100%;
     width: 100%;
+    height: 303px;
     li {
     li {
       display: inline-block;
       display: inline-block;
       border: 10px solid gray;
       border: 10px solid gray;
@@ -243,14 +245,15 @@ export default {
         width: 100%;
         width: 100%;
         height: 40px;
         height: 40px;
         margin-top: 10px;
         margin-top: 10px;
-        display: inline-block;
+        display: flex;
+        justify-content: center;
         .pre {
         .pre {
           width: 45%;
           width: 45%;
           line-height: 40px;
           line-height: 40px;
           text-align: center;
           text-align: center;
           background: dodgerblue;
           background: dodgerblue;
           cursor: pointer;
           cursor: pointer;
-          float: left;
+          margin-right: 15px;
         }
         }
         .next {
         .next {
           width: 45%;
           width: 45%;
@@ -258,9 +261,9 @@ export default {
           text-align: center;
           text-align: center;
           background: dodgerblue;
           background: dodgerblue;
           cursor: pointer;
           cursor: pointer;
-          float: right;
         }
         }
       }
       }
+
     }
     }
   }
   }
 }
 }

+ 18 - 7
src/pages/home/rotationEdit.vue

@@ -9,7 +9,7 @@
     >
     >
       <el-row>
       <el-row>
         <el-col :span="24">
         <el-col :span="24">
-          <el-form-item label="链接:" prop="url">
+          <el-form-item label="链接:">
             <el-input v-model="ruleForm.url"></el-input>
             <el-input v-model="ruleForm.url"></el-input>
           </el-form-item>
           </el-form-item>
         </el-col>
         </el-col>
@@ -166,12 +166,23 @@ export default {
       this.refresh = "刷新了";
       this.refresh = "刷新了";
     },
     },
     beforeIconUpload(file) {
     beforeIconUpload(file) {
-      let size = 10;
-      const isLt = file.size / 1024 / 1024 < size;
-      if (!isLt) {
-        this.$message.error(`上传头像图片大小不能超过 ${size}MB!`);
-        return isLt;
-      }
+      // console.log('上传文件前校验', file)
+      // 限制图片大小和格式
+      const sizeOk = file.size / 1024 / 1024 < 10
+      const typeOk =
+        file.type === 'image/png' ||
+        file.type === 'image/jpeg' 
+      return new Promise((resolve, reject) => {
+        if (!typeOk) {
+          this.$message.error('照片格式有误!')
+          reject(file)
+        } else if (!sizeOk) {
+          this.$message.error('照片大小超过10M!')
+          reject(file)
+        } else {
+          resolve(file)
+        }
+      })
     },
     },
     handleChange(file) {
     handleChange(file) {
       this.fileList = this.fileList.length === 0 ? this.fileList : [];
       this.fileList = this.fileList.length === 0 ? this.fileList : [];

+ 1 - 1
src/pages/survey/surveyList.vue

@@ -26,7 +26,7 @@
           </el-row>
           </el-row>
 
 
           <el-row>
           <el-row>
-            <el-col :span="14">
+            <el-col :span="24">
               <el-form-item label="内容" prop="content">
               <el-form-item label="内容" prop="content">
                 <!-- <vue-editor class="quill-editor" v-model="form.content" /> -->
                 <!-- <vue-editor class="quill-editor" v-model="form.content" /> -->
                 <div id="div1" style="z-index:1"></div>
                 <div id="div1" style="z-index:1"></div>