master
xy 2 years ago
parent d6816020a2
commit 52d5a1a72f

@ -68,8 +68,12 @@
detail.id_assets_file_files_file_id_relation.length > 0 detail.id_assets_file_files_file_id_relation.length > 0
" "
> >
<div v-for="item in detail.id_assets_file_files_file_id_relation"> <div v-for="item in detail.id_assets_file_files_file_id_relation" style="display: flex;justify-content: space-between;">
<a :download="item.url">{{ item.original_name }}</a> <a :download="item.url">{{ item.original_name }}</a>
<div>
<el-button type="primary" icon="el-icon-download" circle size="mini" @click="down(item)"></el-button>
<el-button type="primary" icon="el-icon-search" circle size="mini" @click="open(item.url)"></el-button>
</div>
</div> </div>
</template> </template>
<template v-else> <template v-else>
@ -95,7 +99,7 @@
<el-image <el-image
style="width: 100%; height: 100%" style="width: 100%; height: 100%"
:src="item.url" :src="item.url"
:preview-src-list="picList" :preview-src-list="detail.id_assets_picture_files_file_id_relation.map(i=>i.url)"
fit="contain" fit="contain"
></el-image> ></el-image>
</div> </div>
@ -144,6 +148,24 @@
</el-card> </el-card>
</el-col> </el-col>
</el-row> </el-row>
<Modal
:width="76"
transfer
:z-index="6000"
v-model="showModal"
:footer-hide="true"
title="预览"
>
<template>
<iframe
style="width: 100%; height: 57vh"
:src="codeUri"
border="0"
></iframe>
</template>
</Modal>
</div> </div>
</template> </template>
@ -152,10 +174,13 @@ import { show, index } from "@/api/system/baseForm";
import { show as formShow } from "@/api/system/customForm"; import { show as formShow } from "@/api/system/customForm";
import { getparameter } from "@/api/system/dictionary"; import { getparameter } from "@/api/system/dictionary";
import { listdept } from "@/api/system/department"; import { listdept } from "@/api/system/department";
import { download } from "@/utils/downloadRequest";
export default { export default {
name: "detail", name: "detail",
data() { data() {
return { return {
showModal:false,
codeUri: "",
center: [120.283692, 31.614211], center: [120.283692, 31.614211],
marker: {}, marker: {},
@ -178,6 +203,18 @@ export default {
}; };
}, },
methods: { methods: {
open(url) {
this.codeUri = `http://view.ali251.langye.net:8012/onlinePreview?url=${encodeURIComponent(
new Buffer(url).toString("base64")
)}`;
this.showModal = true;
},
down(e) {
download(e.url, "get", {}, e.original_name);
},
init() { init() {
this.map = new AMap.Map("detail-map", { this.map = new AMap.Map("detail-map", {
center: this.center, center: this.center,
@ -374,6 +411,17 @@ export default {
::v-deep .el-empty__image { ::v-deep .el-empty__image {
width: 120px; width: 120px;
} }
a {
color: red;
text-decoration: none;
transition: all 0.2s;
}
a:hover {
color: red;
text-decoration: underline;
}
</style> </style>
<style lang="scss"> <style lang="scss">
.map-marker { .map-marker {

Loading…
Cancel
Save