意见反馈
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> <i slot="default" class="el-icon-plus"></i>
<div slot="file" slot-scope="{ file }"> <div slot="file" slot-scope="{ file }">
<template> <viewer :ref="file.url" :images="fileList">
<img <img
class="el-upload-list__item-thumbnail" class="el-upload-list__item-thumbnail"
:src="`${file.url}`" :src="`${file.url}`"
@ -38,19 +38,9 @@
<i class="el-icon-delete"></i> <i class="el-icon-delete"></i>
</span> </span>
</span> </span>
</template> </viewer>
</div> </div>
</el-upload> </el-upload>
<el-dialog :visible.sync="dialogVisible" :modal="false">
<div class="showImg">
<img
width="70%"
:src="`${dialogImageUrl}`"
crossorigin="anonymous"
alt=""
/>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
@ -73,8 +63,6 @@ export default {
return { return {
fileList: [], fileList: [],
btnDisabled: false, btnDisabled: false,
dialogVisible: false,
dialogImageUrl: "",
}; };
}, },
mounted() { mounted() {
@ -166,8 +154,7 @@ export default {
} }
}, },
handlePictureCardPreview(file) { handlePictureCardPreview(file) {
this.dialogImageUrl = file.url; this.$refs[file.url].$viewer.show();
this.dialogVisible = true;
}, },
handleRemove(file) { handleRemove(file) {
let index = this.fileList.findIndex((item) => item.uid === file.uid); let index = this.fileList.findIndex((item) => item.uid === file.uid);
@ -208,16 +195,3 @@ export default {
line-height: 100px; line-height: 100px;
} }
</style> </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> <template>
<div v-if="visible" @click.stop="()=>false"> <div v-if="visible" @click.stop="() => false">
<el-dialog <el-dialog
:visible.sync="visible" :visible.sync="visible"
v-dialogDrag v-dialogDrag
@ -25,19 +25,24 @@ export default {
visible: false, visible: false,
}; };
}, },
computed: { computed: {},
disabled() {
return false;
},
},
methods: { methods: {
open(data) { open(data) {
this.title = this.setTitle();
this.visible = true; this.visible = true;
}, },
cancel() { cancel() {
this.visible = false; this.visible = false;
this.$emit("closed"); 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> </script>