意见反馈
continuous-integration/drone/push Build is passing Details

uat_us
DESKTOP-6C3NK6N\WXS 2024-07-30 17:47:18 +08:00
parent d1f90a2525
commit c01c69a9fe
2 changed files with 14 additions and 35 deletions

View File

@ -16,7 +16,7 @@
>
<i slot="default" class="el-icon-plus"></i>
<div slot="file" slot-scope="{ file }">
<template>
<viewer :ref="file.url" :images="fileList">
<img
class="el-upload-list__item-thumbnail"
:src="`${file.url}`"
@ -38,19 +38,9 @@
<i class="el-icon-delete"></i>
</span>
</span>
</template>
</viewer>
</div>
</el-upload>
<el-dialog :visible.sync="dialogVisible" :modal="false">
<div class="showImg">
<img
width="70%"
:src="`${dialogImageUrl}`"
crossorigin="anonymous"
alt=""
/>
</div>
</el-dialog>
</div>
</template>
<script>
@ -73,8 +63,6 @@ export default {
return {
fileList: [],
btnDisabled: false,
dialogVisible: false,
dialogImageUrl: "",
};
},
mounted() {
@ -166,8 +154,7 @@ export default {
}
},
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url;
this.dialogVisible = true;
this.$refs[file.url].$viewer.show();
},
handleRemove(file) {
let index = this.fileList.findIndex((item) => item.uid === file.uid);
@ -208,16 +195,3 @@ export default {
line-height: 100px;
}
</style>
<style lang="scss" scoped>
.showImg {
width: 100%;
max-height: 500px;
display: flex;
justify-content: center;
align-items: center;
img {
max-height: 100%;
max-width: 100%;
}
}
</style>

View File

@ -1,5 +1,5 @@
<template>
<div v-if="visible" @click.stop="()=>false">
<div v-if="visible" @click.stop="() => false">
<el-dialog
:visible.sync="visible"
v-dialogDrag
@ -25,19 +25,24 @@ export default {
visible: false,
};
},
computed: {
disabled() {
return false;
},
},
computed: {},
methods: {
open(data) {
this.title = this.setTitle();
this.visible = true;
},
cancel() {
this.visible = false;
this.$emit("closed");
},
setTitle(code, name) {
if (this.hasPermi(["role:pm"])) {
return `${this.$t("feedBack:table:title:pm")}(${code},${name})`;
}
if (this.hasPermi(["role:ir", "role:crc"])) {
return `${this.$t("feedBack:table:title")}`;
}
},
},
};
</script>