|
|
|
@ -1,7 +1,7 @@
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<el-page-header
|
|
|
|
<el-page-header
|
|
|
|
:content="$route.meta.title"
|
|
|
|
:content="$route.meta.title + (detail.dikuaimingcheng ? ' - ' : '') + detail.dikuaimingcheng"
|
|
|
|
style="
|
|
|
|
style="
|
|
|
|
padding: 1em;
|
|
|
|
padding: 1em;
|
|
|
|
font-size: 1em;
|
|
|
|
font-size: 1em;
|
|
|
|
@ -16,8 +16,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
<el-row :gutter="20">
|
|
|
|
<el-col :span="14">
|
|
|
|
<el-col :span="14">
|
|
|
|
<el-card v-if="detail.id_assets_picture_files_file_id_relation" style="margin-bottom: 20px;">
|
|
|
|
<el-card v-if="detail.id_assets_picture_files_file_id_relation && detail.id_assets_picture_files_file_id_relation.length > 0">
|
|
|
|
<div class="el-descriptions__header el-descriptions__title">图集</div>
|
|
|
|
<div class="el-descriptions__header el-descriptions__title">资产图集</div>
|
|
|
|
<el-carousel trigger="click" height="150px">
|
|
|
|
<el-carousel trigger="click" height="150px">
|
|
|
|
<el-carousel-item v-for="item in detail.id_assets_picture_files_file_id_relation">
|
|
|
|
<el-carousel-item v-for="item in detail.id_assets_picture_files_file_id_relation">
|
|
|
|
<el-image
|
|
|
|
<el-image
|
|
|
|
@ -29,24 +29,69 @@
|
|
|
|
</el-carousel>
|
|
|
|
</el-carousel>
|
|
|
|
</el-card>
|
|
|
|
</el-card>
|
|
|
|
<el-card>
|
|
|
|
<el-card>
|
|
|
|
<el-descriptions title="详情" :column="2" :label-style="{'font-weight': '600'}">
|
|
|
|
<el-descriptions title="基本信息" :column="2" :label-style="{'font-weight': '600'}">
|
|
|
|
<el-descriptions-item v-for="item in fields" :label="item.name">{{
|
|
|
|
<el-descriptions-item v-for="item in fields" :label="item.name" v-if="!['file','picture'].find(j => j === item.field)">{{
|
|
|
|
contentFormat(item)
|
|
|
|
contentFormat(item)
|
|
|
|
}}</el-descriptions-item>
|
|
|
|
}}{{ units.get(item.field) }}</el-descriptions-item>
|
|
|
|
</el-descriptions>
|
|
|
|
</el-descriptions>
|
|
|
|
</el-card>
|
|
|
|
</el-card>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-card>
|
|
|
|
|
|
|
|
<div class="el-descriptions__header el-descriptions__title">资产相关附件</div>
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
|
|
|
<template v-if="detail.id_assets_file_files_file_id_relation && detail.id_assets_file_files_file_id_relation.length > 0">
|
|
|
|
|
|
|
|
<div v-for="item in detail.id_assets_file_files_file_id_relation">
|
|
|
|
|
|
|
|
<a :download="item.url">{{ item.original_name }}</a>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<template v-else>
|
|
|
|
|
|
|
|
<el-empty description="无"></el-empty>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</el-card>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-card>
|
|
|
|
|
|
|
|
<div class="el-descriptions__header el-descriptions__title">资产证件图片</div>
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
|
|
|
<template v-if="detail.id_assets_picture_files_file_id_relation && detail.id_assets_picture_files_file_id_relation.length > 0">
|
|
|
|
|
|
|
|
<div v-for="item in detail.id_assets_picture_files_file_id_relation">
|
|
|
|
|
|
|
|
<el-image
|
|
|
|
|
|
|
|
style="width: 100%; height: 100%;"
|
|
|
|
|
|
|
|
:src="item.url"
|
|
|
|
|
|
|
|
:preview-src-list="picList"
|
|
|
|
|
|
|
|
fit="contain"></el-image>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<template v-else>
|
|
|
|
|
|
|
|
<el-empty description="无"></el-empty>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</el-card>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="10" >
|
|
|
|
<el-col :span="10" >
|
|
|
|
<el-card>
|
|
|
|
<el-card>
|
|
|
|
<div class="el-descriptions__header el-descriptions__title">资产历史</div>
|
|
|
|
<div class="el-descriptions__header el-descriptions__title">资产历史</div>
|
|
|
|
<Timeline>
|
|
|
|
<template>
|
|
|
|
<TimelineItem v-for="(item,index) in histories" :key="item.id">
|
|
|
|
<template v-if="histories && histories.length > 0">
|
|
|
|
<p>{{ item.riqi }}</p>
|
|
|
|
<Timeline>
|
|
|
|
<div v-html="item.neirong"></div>
|
|
|
|
<TimelineItem v-for="(item,index) in histories" :key="item.id">
|
|
|
|
<el-image style="width: 78%;height: 160px;" v-for="img in item.id_his_tupian_files_asset_history_id_relation" :src="img.url" fit="contain"></el-image>
|
|
|
|
<p>{{ item.riqi }}</p>
|
|
|
|
</TimelineItem>
|
|
|
|
<div v-html="item.neirong"></div>
|
|
|
|
|
|
|
|
<el-image style="width: 78%;height: 160px;" v-for="img in item.id_his_tupian_files_asset_history_id_relation" :src="img.url" fit="contain"></el-image>
|
|
|
|
</Timeline>
|
|
|
|
</TimelineItem>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</Timeline>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<template v-else>
|
|
|
|
|
|
|
|
<el-empty description="无"></el-empty>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</el-card>
|
|
|
|
|
|
|
|
<el-card>
|
|
|
|
|
|
|
|
<div class="el-descriptions__header el-descriptions__title">资产地图</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="map" id="detail-map" style="width: 100%;height: 300px;"></div>
|
|
|
|
</el-card>
|
|
|
|
</el-card>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
|
@ -61,6 +106,9 @@ import { listdept } from '@/api/system/department'
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
|
|
|
|
center: [120.283692, 31.614211],
|
|
|
|
|
|
|
|
marker: {},
|
|
|
|
|
|
|
|
|
|
|
|
histories: [],
|
|
|
|
histories: [],
|
|
|
|
picList: [],
|
|
|
|
picList: [],
|
|
|
|
detail: {},
|
|
|
|
detail: {},
|
|
|
|
@ -72,9 +120,52 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
units: new Map([
|
|
|
|
|
|
|
|
['jianzhu','m²'],
|
|
|
|
|
|
|
|
['jianzhugaodu','m'],
|
|
|
|
|
|
|
|
['dikuaizongjia','元'],
|
|
|
|
|
|
|
|
['dikuaimianji','m²'],
|
|
|
|
|
|
|
|
['muqianjunjia','元'],
|
|
|
|
|
|
|
|
])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
init() {
|
|
|
|
|
|
|
|
this.map = new AMap.Map("detail-map", {
|
|
|
|
|
|
|
|
center: this.center,
|
|
|
|
|
|
|
|
mapStyle: "amap://styles/bfb1bb3feb0db7082367abca96b8d214", // 设置地图的显示样式
|
|
|
|
|
|
|
|
zoom: 60
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.map.remove(this.marker);
|
|
|
|
|
|
|
|
if (this.detail.zichanweizhi) {
|
|
|
|
|
|
|
|
let lat, lng;
|
|
|
|
|
|
|
|
[lng, lat] = this.detail.zichanweizhi.split(",");
|
|
|
|
|
|
|
|
let marker = new AMap.Marker({
|
|
|
|
|
|
|
|
icon: "//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png",
|
|
|
|
|
|
|
|
position: [Number(lng), Number(lat)],
|
|
|
|
|
|
|
|
offset: new AMap.Pixel(-13, -30),
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
let markerContent = document.createElement("div");
|
|
|
|
|
|
|
|
markerContent.setAttribute("class", "map-marker");
|
|
|
|
|
|
|
|
let markerImg = document.createElement("img");
|
|
|
|
|
|
|
|
markerImg.src =
|
|
|
|
|
|
|
|
"//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png";
|
|
|
|
|
|
|
|
let markerSpan = document.createElement("span");
|
|
|
|
|
|
|
|
markerSpan.setAttribute("class", "map-marker__text");
|
|
|
|
|
|
|
|
markerSpan.innerText = this.detail.dikuaimingcheng;
|
|
|
|
|
|
|
|
markerContent.appendChild(markerImg);
|
|
|
|
|
|
|
|
markerContent.appendChild(markerSpan);
|
|
|
|
|
|
|
|
marker.setContent(markerContent);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.marker = marker;
|
|
|
|
|
|
|
|
this.map.add(this.marker)
|
|
|
|
|
|
|
|
this.map.setFitView(this.marker);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async getFields () {
|
|
|
|
async getFields () {
|
|
|
|
if (this.$route.meta.params?.custom_form) {
|
|
|
|
if (this.$route.meta.params?.custom_form) {
|
|
|
|
let decode = decodeURIComponent(this.$route.meta.params?.custom_form);
|
|
|
|
let decode = decodeURIComponent(this.$route.meta.params?.custom_form);
|
|
|
|
@ -158,6 +249,7 @@ export default {
|
|
|
|
table_name: this.customForm.tableName
|
|
|
|
table_name: this.customForm.tableName
|
|
|
|
})
|
|
|
|
})
|
|
|
|
this.detail = detail
|
|
|
|
this.detail = detail
|
|
|
|
|
|
|
|
this.init();
|
|
|
|
|
|
|
|
|
|
|
|
this.picList = detail?.id_assets_picture_files_file_id_relation?.map(i => i.url)
|
|
|
|
this.picList = detail?.id_assets_picture_files_file_id_relation?.map(i => i.url)
|
|
|
|
},
|
|
|
|
},
|
|
|
|
@ -215,4 +307,26 @@ export default {
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
|
|
|
::v-deep .el-card {
|
|
|
|
|
|
|
|
margin-bottom: 20px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
::v-deep .el-empty__image {
|
|
|
|
|
|
|
|
width: 120px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
</style>
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
|
|
|
|
.map-marker {
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
&__text {
|
|
|
|
|
|
|
|
background: #fff;
|
|
|
|
|
|
|
|
zoom: 0.9;
|
|
|
|
|
|
|
|
padding: 2px 6px;
|
|
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
|
|
filter: drop-shadow(2px 2px 5px #00000055);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</style>
|
|
|
|
|