|
@@ -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;
|
|
|
}
|
|
|
}
|
|
|
}
|