Эх сурвалжийг харах

Merge branch 'http_test' into Qz-daily-0.0.7

qinzhipeng_v@didiglobal.com 4 жил өмнө
parent
commit
c146ff2d89

+ 1 - 1
src/components/input/normalArea.vue

@@ -71,7 +71,7 @@ export default {
       inputValue: '',
       edit: false,
       init: {
-        auto_focus: true,
+        auto_focus: false,
         language_url: '/tinymce/langs/zh_CN.js',
         language: 'zh_CN',
         skin_url: '/tinymce/skins/ui/oxide', // 编辑器需要一个skin才能正常工作,所以要设置一个skin_url指向之前复制出来的skin文件

+ 16 - 6
src/views/projectManage/bugList/details/index.vue

@@ -438,9 +438,7 @@
                 </span>
               </div>
             </el-upload>
-            <el-dialog :visible.sync="dialogVisible" :modal-append-to-body="false" width="80%">
-              <img width="100%" :src="dialogImageUrl" alt="图片加载失败···">
-            </el-dialog>
+            <el-image-viewer v-if="dialogVisible" :on-close="closeViewer" :url-list="srcList" style="z-index: 999999;" />
           </section>
         </el-main>
         <el-main :style="type=='page'?{'padding': '20px 30px','margin-top': '10px'}:{'padding-left':'30px'}" class="layout_main">
@@ -543,6 +541,7 @@
 
 <script>
 const _ = require('lodash')
+import ElImageViewer from 'element-ui/packages/image/src/image-viewer'
 import { EncryptId, analysisBizId_id } from '@/utils/crypto-js.js'
 import statusChange from '@/views/projectManage/bugList/details/statusChange'
 import '@/styles/PublicStyle/index.scss'
@@ -590,6 +589,7 @@ export default {
     normalDialog,
     statusChange,
     searchPeople,
+    ElImageViewer,
     normalArea
   },
   props: {
@@ -610,6 +610,7 @@ export default {
     return {
       bugId: -1, // 当前缺陷Id
       bizId: -1, // 当前缺陷BizId
+      srcList: [],
       // configure: {
       //   language_url: '/tinymce/langs/zh_CN.js',
       //   language: 'zh_CN',
@@ -644,7 +645,6 @@ export default {
       ImageList: [], // 文件图片数组
       accessory: null,
       dialogVisible: false,
-      dialogImageUrl: [],
       disabled: false,
       loading: {
         drawer: false,
@@ -901,8 +901,17 @@ export default {
         })
       })
     },
+    closeViewer() {
+      this.dialogVisible = false
+      this.srcList = []
+    },
     handlePictureCardPreview(file) {
-      this.dialogImageUrl = file.url
+      const index = this.ImageList.findIndex(item => item.url === file.url)
+      const thobj = this.ImageList.splice(index, 1)
+      this.ImageList.splice(0, 0, ...thobj)
+      this.ImageList.map(item => {
+        this.srcList.push(item.url)
+      })
       this.dialogVisible = true
     },
     handleChange(response, file, fileList) {
@@ -1245,6 +1254,7 @@ export default {
         reader.onload = () => {
           const reg = new RegExp(/image\/png/)
           this.imageUrl = reader.result
+          this.srcList.push(reader.result)
           if (this.imageUrl.match(reg)) { // 判断是否是图片
             this.showCopyFile = true
             this.imageName.name = this.generateMixed(10)
@@ -1623,7 +1633,7 @@ border-color: #DCDFE6;
       justify-content: center;
     }
     .image-url {
-      height: 100%;
+      height: 90vh;
     }
   }
 }

+ 1 - 0
src/views/reportManagement/ReleaseReport/releaePreview.vue

@@ -152,6 +152,7 @@ export default {
           })
         }, 500)
       } else {
+        this.$emit('loading')
         this.$message({ message: '请填写邮箱', type: 'error', offset: 150 })
       }
     }

+ 1 - 0
src/views/reportManagement/Testing/TestingPreview.vue

@@ -179,6 +179,7 @@ export default {
           })
         }, 500)
       } else {
+        this.$emit('loading')
         this.$message({ message: '请填写邮箱', type: 'error', offset: 150 })
       }
     }

+ 1 - 1
src/views/reportManagement/components/DailyReport.vue

@@ -59,7 +59,7 @@
       <!-- 新建日报模版 -->
 
       <!-- 日报预览 -->
-      <dailyPreview v-if="dailyPreview" ref="dailyPreview" class="daily" :daily-id="dailyId" @handleClose="handleClose" />
+      <dailyPreview v-if="dailyPreview" ref="dailyPreview" class="daily" :daily-id="dailyId" @handleClose="handleClose" @loading="loading = false" />
       <!-- 日报预览 -->
 
     </div>

+ 1 - 1
src/views/reportManagement/components/ReleaseReport.vue

@@ -56,7 +56,7 @@
       <!-- 新建准出模版 -->
 
       <!-- 准出预览 -->
-      <releaePreview v-if="dailyPreview" ref="dailyPreview" class="daily" :daily-id="dailyId" @handleClose="handleClose" />
+      <releaePreview v-if="dailyPreview" ref="dailyPreview" class="daily" :daily-id="dailyId" @handleClose="handleClose" @loading="loading = false" />
       <!-- 准出预览 -->
 
     </div>

+ 1 - 1
src/views/reportManagement/components/TestingReport.vue

@@ -56,7 +56,7 @@
       <!-- 新建日报模版 -->
 
       <!-- 日报预览 -->
-      <TestingPreview v-if="dailyPreview" ref="dailyPreview" class="daily" :daily-id="dailyId" @handleClose="handleClose" />
+      <TestingPreview v-if="dailyPreview" ref="dailyPreview" class="daily" :daily-id="dailyId" @handleClose="handleClose" @loading="loading = false" />
       <!-- 日报预览 -->
 
     </div>

+ 1 - 0
src/views/reportManagement/daily/dailyPreview.vue

@@ -107,6 +107,7 @@ export default {
           })
         }, 500)
       } else {
+        this.$emit('loading')
         this.$message({ message: '请填写邮箱', type: 'error', offset: 150 })
       }
     }