master
xy 2 years ago
parent fd994f3b53
commit db912b017b

@ -277,9 +277,7 @@
(row) => {
$router.push({
path: '/houseDetail/' + row.id,
query: {
id: row.id,
},
});
}
"
@ -323,7 +321,7 @@
@refresh="$refs['xyTable'].getTableData()"
>
</add>
<addHistory ref="addHistory"></addHistory>
<history ref="history"></history>
<lease ref="lease"></lease>
<atlas ref="atlas"></atlas>
<!-- <imports-->
@ -355,6 +353,7 @@ import headerContent from "@/components/LxHeader/XyContent.vue";
import addHistory from "@/views/assets/component/addHistory.vue";
import lease from '@/views/assets/lease.vue'
import atlas from '@/views/assets/atlas.vue'
import history from '@/views/assets/history.vue'
// import drawer from "@/views/component/drawer.vue";
// import imports from "./imports.vue";
// import atlas from "@/views/assets/atlas.vue";
@ -362,12 +361,12 @@ import atlas from '@/views/assets/atlas.vue'
export default {
name: "tableList",
components: {
history,
atlas,
lease,
LxHeader,
add,
headerContent,
addHistory,
// drawer,
// imports,
@ -728,14 +727,8 @@ export default {
},
toHistory(row) {
if (row.id_his_evolutions_house_id_relation?.id) {
this.$refs["addHistory"].setType("editor");
this.$refs["addHistory"].setId(
row.id_his_evolutions_house_id_relation?.id
);
}
this.$refs["addHistory"].setRow(row);
this.$refs["addHistory"].show();
this.$refs['history'].setRow(row);
this.$refs['history'].show();
},
toLeave (row) {
this.$refs['lease'].setRow(row);

@ -252,10 +252,7 @@
@detail="
(row) => {
$router.push({
path: 'landDetail/' + row.id,
params: {
id: row.id
}
path: '/landDetail/' + row.id,
})
}
"

@ -136,14 +136,42 @@
<template v-if="histories && histories.length > 0">
<Timeline>
<TimelineItem v-for="(item, index) in histories" :key="item.id">
<p>{{ item.riqi }}</p>
<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>
<el-descriptions :column="1" size="mini" border :title="item.created_at" :label-style="{ 'width': '86px' }">
<el-descriptions-item>
<template slot="label">
<i class="el-icon-coordinate"></i>
面积调整
</template>
{{ item.mianjitiaozheng }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-office-building"></i>
资产来源
</template>
{{ item.zichanlaiyuan }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-chat-line-square"></i>
其他说明
</template>
{{ item.qitashuoming }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-picture-outline"></i>
相关图片
</template>
<el-image
style="height: 200px"
v-for="img in item.id_his_tupian_files_asset_history_id_relation"
:src="img.url"
fit="contain"
></el-image>
</el-descriptions-item>
</el-descriptions>
</TimelineItem>
</Timeline>
</template>
@ -214,7 +242,6 @@ export default {
center: [120.283692, 31.614211],
marker: {},
histories: [],
detail: {},
fields: [],
relation: [],
@ -223,6 +250,7 @@ export default {
tableName: "",
},
histories: [],
units: new Map([
["jianzhumianji", "m²"],
["jianzhugaodu", "m"],
@ -268,7 +296,7 @@ export default {
"//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;
markerSpan.innerText = this.detail.name;
markerContent.appendChild(markerImg);
markerContent.appendChild(markerSpan);
marker.setContent(markerContent);
@ -369,23 +397,22 @@ export default {
this.init();
},
async getHistory() {
async getHistories () {
const res = await index({
table_name: 'his_evolutions',
page: 1,
page_size: 999,
table_name: "asset_histories",
filter: [
filter:[
{
key: "asset_id",
op: "eq",
value: this.detail.id,
},
],
});
this.histories = res.data.sort(function (a, b) {
return new Date(a.riqi).getTime() - new Date(b.riqi).getTime();
});
},
key: /\/land/g.test(this.$route.path) ? 'land_id' : 'house_id',
op: 'eq',
value: this.$route.params.id
}
]
})
this.histories = res.data;
}
},
computed: {
@ -430,14 +457,30 @@ export default {
},
},
created() {
this.getFields().then((res) => {
this.getHistory();
});
this.getFields().then(res => {
this.getHistories()
})
},
};
</script>
<style scoped lang="scss">
.el-descriptions__title,::v-deep .el-descriptions__title {
position: relative;
padding-left: 14px;
&::before {
content: '';
width: 4px;
background: linear-gradient(to bottom,rgb(57, 129, 199), rgba(71, 112, 162 , .7));
position: absolute;
left: 0;
top: 2px;
bottom: 2px;
}
}
::v-deep .el-card {
margin-bottom: 20px;
}
@ -460,6 +503,10 @@ a:hover {
transition: all 0.2s;
color: $primaryColor !important;
}
.el-image + .el-image {
margin-left: 6px;
}
</style>
<style lang="scss">
.map-marker {

@ -3,7 +3,7 @@
<el-card class="statics">
<div class="statics-item">
<p class="statics-item__title">面积总量</p>
<p class="statics-item__num">{{ list.reduce((a,b) => a + Number(b.dikuaimianji),0) }} 平方</p>
<p class="statics-item__num">{{ listFilter.reduce((a,b) => a + Number(b.shijimianji),0) }} 平方</p>
</div>
<div class="statics-item">
<p class="statics-item__title">资产总量</p>
@ -15,7 +15,7 @@
</div>
<div class="statics-item">
<p class="statics-item__title">租聘面积</p>
<p class="statics-item__num">{{ list.reduce((a,b) => a + Number(b.jianzhumianji || 0),0) }} 平方</p>
<p class="statics-item__num">{{ listFilter.reduce((a,b) => a + Number(b.shijimianji || 0),0) }} 平方</p>
</div>
<div class="statics-item">
<p class="statics-item__title">公益产业</p>
@ -40,50 +40,50 @@
></el-option>
</el-select>
<span class="search-name">地块类型</span>
<el-select
clearable
style="width: 120px;"
v-model="select.filter[2].value"
size="mini"
placeholder="请选择地块类型"
>
<el-option
v-for="(item, index) in dikuaileixingTypes"
:value="item.value"
:label="item.key"
></el-option>
</el-select>
<!-- <span class="search-name">地块类型</span>-->
<!-- <el-select-->
<!-- clearable-->
<!-- style="width: 120px;"-->
<!-- v-model="select.filter[2].value"-->
<!-- size="mini"-->
<!-- placeholder="请选择地块类型"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="(item, index) in dikuaileixingTypes"-->
<!-- :value="item.value"-->
<!-- :label="item.key"-->
<!-- ></el-option>-->
<!-- </el-select>-->
<span class="search-name">建筑类型</span>
<el-select
clearable
style="width: 120px;"
v-model="select.filter[3].value"
size="mini"
placeholder="请选择建筑类型"
>
<el-option
v-for="(item, index) in jianzhuleixingTypes"
:value="item.value"
:label="item.key"
></el-option>
</el-select>
<!-- <span class="search-name">建筑类型</span>-->
<!-- <el-select-->
<!-- clearable-->
<!-- style="width: 120px;"-->
<!-- v-model="select.filter[3].value"-->
<!-- size="mini"-->
<!-- placeholder="请选择建筑类型"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="(item, index) in jianzhuleixingTypes"-->
<!-- :value="item.value"-->
<!-- :label="item.key"-->
<!-- ></el-option>-->
<!-- </el-select>-->
<span class="search-name">资产类型</span>
<el-select
clearable
style="width: 120px;"
v-model="select.filter[4].value"
size="mini"
placeholder="请选择资产类型"
>
<el-option
v-for="(item, index) in zichanleixingTypes"
:value="item.value"
:label="item.key"
></el-option>
</el-select>
<!-- <span class="search-name">资产类型</span>-->
<!-- <el-select-->
<!-- clearable-->
<!-- style="width: 120px;"-->
<!-- v-model="select.filter[4].value"-->
<!-- size="mini"-->
<!-- placeholder="请选择资产类型"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="(item, index) in zichanleixingTypes"-->
<!-- :value="item.value"-->
<!-- :label="item.key"-->
<!-- ></el-option>-->
<!-- </el-select>-->
<el-button size="mini" type="primary" style="margin-left: 10px;" @click="areaPick"></el-button>
</el-card>
@ -97,9 +97,9 @@
<div
class="search-list__bar"
>
<Button size="small" type="success" :ghost="select.filter[5].value !== 1" @click="select.filter[5].value = 1,areaPick()">有建筑</Button>
<Button size="small" type="primary" :ghost="select.filter[5].value !== 2" @click="select.filter[5].value = 2,areaPick()">无建筑</Button>
<Button size="small" type="info" :ghost="!!select.filter[5].value" @click="select.filter[5].value = '',areaPick()">全部</Button>
<Button size="small" type="success" :ghost="hasHouse !== 2" @click="hasHouse = 2">有房产</Button>
<Button size="small" type="primary" :ghost="hasHouse !== 3" @click="hasHouse = 3">无房产</Button>
<Button size="small" type="info" :ghost="hasHouse !== 1" @click="hasHouse = 1">全部</Button>
<el-input size="mini" style="margin-top: 4px;" placeholder="请输入地块名称" v-model="select.filter[1].value" clearable>
<el-button type="primary" slot="append" icon="el-icon-search" @click="areaPick"></el-button>
</el-input>
@ -134,11 +134,12 @@
<p style="zoom: .9;text-align: center;padding: 4px 0;font-weight: 600;">总共 {{total}} </p>
<ul v-if="list && list.length > 0">
<li v-for="(item,index) in list" :key="item.id" :style="{'border-color': openData.id === item.id ? 'blue' : ''}">
<li v-for="(item,index) in listFilter" :key="item.id" :style="{'border-color': openData.id === item.id ? 'blue' : ''}">
<div class="left">
<p>{{ item.dikuaimingcheng }}</p>
<Tag color="blue" v-if="item.suoshuqu">{{ wxAreas[item.suoshuqu-1] }}</Tag>
<Tag color="cyan" v-if="item.suoshuqu">{{ dikuaileixing(item.dikuaileixing) }}</Tag>
<p>{{ item.name }}</p>
<Tag color="blue" v-if="item.area">{{ wxAreas[item.area-1] }}</Tag>
<Tag color="cyan" v-if="item.shijimianji">{{ item.shijimianji }} m²</Tag>
<Tag color="red" v-if="item.id_house_properties_land_id_relation.id"></Tag>
<Tag color="gold" v-if="item.jianzhuleixing">{{ jianzhuleixing(item.jianzhuleixing) }}</Tag>
<Tag color="magenta" v-if="item.zichanleixing">{{ zichanleixing(item.zichanleixing) }}</Tag>
</div>
@ -233,17 +234,25 @@
<div ref="infoWindow" id="infoWindow" v-show="isShowInfoWindow">
<el-scrollbar style="height: 260px; width: 100%">
<div class="infoWindow-container">
<div class="infoWindow-container__item" v-for="item in form">
<p>{{ item.name }}</p>
<p>{{ contentFormat(item) }}{{ units.get(item.field) }}</p>
</div>
</div>
<el-descriptions size="small" border :column="2">
<el-descriptions-item v-for="item in form" :label="item.name">
{{ contentFormat(item) }}{{ units.get(item.field) }}
</el-descriptions-item>
<el-descriptions-item label="使用状态">
{{ shiyongzhuangtai }}
</el-descriptions-item>
</el-descriptions>
<!-- <div class="infoWindow-container">-->
<!-- <div class="infoWindow-container__item" v-for="item in form">-->
<!-- <p>{{ item.name }}</p>-->
<!-- <p>{{ contentFormat(item) }}{{ units.get(item.field) }}</p>-->
<!-- </div>-->
<!-- </div>-->
</el-scrollbar>
<p
class="to-detail"
@click="$router.push('/assetsDetail?id=' + openData.id)"
@click="$router.push('/landDetail/' + openData.id)"
>
查看详情
</p>
@ -263,6 +272,7 @@ export default {
loading: false,
dragging: false,
searchShow: true,
hasHouse: 1, //1 2 3
selectList: {
table_name: "assets",
filter: [
@ -287,7 +297,7 @@ export default {
value: "",
},
{
key: "dikuaimingcheng",
key: "name",
op: "like",
value: "",
},
@ -340,8 +350,8 @@ export default {
"锡山区",
],
units: new Map([
["jianzhumianji", "m²"],
["jianzhugaodu", "m"],
["dengjimianji", "m²"],
["shijimianji", "m²"],
["dikuaizongjia", "元"],
["dikuaimianji", "m²"],
["muqianjunjia", "元"],
@ -446,11 +456,11 @@ export default {
let markerSpan = document.createElement("span");
markerSpan.setAttribute("class", "map-marker__text");
markerSpan.innerText =
item.dikuaimingcheng.length > 4
? item.dikuaimingcheng.slice(0, 2) +
item.name.length > 4
? item.name.slice(0, 2) +
".." +
item.dikuaimingcheng.slice(item.dikuaimingcheng.length - 2)
: item.dikuaimingcheng;
item.name.slice(item.name.length - 2)
: item.name;
markerContent.appendChild(markerImg);
markerContent.appendChild(markerSpan);
marker.setContent(markerContent);
@ -713,6 +723,16 @@ export default {
},
},
computed: {
listFilter () {
if (this.hasHouse === 2) {
return this.list.filter(i => i.id_house_properties_land_id_relation?.id)
}
if (this.hasHouse === 3) {
return this.list.filter(i => !i.id_house_properties_land_id_relation?.id)
}
return this.list
},
contentFormat() {
return function (i) {
if (i._params && i._params.length > 0) {
@ -743,6 +763,24 @@ export default {
return this.openData[i.field] || "/";
};
},
shiyongzhuangtai () {
let row = this.openData;
let res = '无';
if (row.id_leases_land_id_relation) {
for (let i = 0;i < row.id_leases_land_id_relation.length;i++) {
let nowDate = this.$moment(new Date())
let startDate = this.$moment(new Date(row.id_leases_land_id_relation[i]?.zulinkaishiqixian))
let endDate = this.$moment(new Date(row.id_leases_land_id_relation[i]?.zulinjieshuqixian))
if (nowDate.isBetween(startDate,endDate)) {
res = "租凭给"+row.id_leases_land_id_relation[i]?.chengzufang
break;
}
}
}
return res;
},
dikuaileixing () {
return function (dikuaileixing) {
return this.form.find(j => j.field === 'dikuaileixing')?._params.find(i => i.value == dikuaileixing)?.key || ''
@ -806,24 +844,24 @@ $staticsHeight: 60px;
position: relative;
&__title {
zoom: .9;
color: #666;
}
&__num {
font-weight: 600;
line-height: 1.5;
font-size: 22px;
font-size: 20px;
}
&::after {
content: '';
width: 2px;
width: 1.5px;
border-radius: 6px;
background: #66666655;
position: absolute;
right: 1px;
top: 5px;
bottom: 5px;
top: 6px;
bottom: 6px;
}
&:nth-last-child(1){
&::after {
@ -1034,13 +1072,14 @@ $staticsHeight: 60px;
</style>
<style lang="scss">
#infoWindow {
min-width: 260px;
max-height: 260px;
min-width: 480px;
max-height: 340px;
box-sizing: border-box;
filter: drop-shadow(2px 2px 5px #00000055);
border-radius: 0 4px 4px 4px;
background: #fff;
padding: 2px;
animation: fade-in 0.4s forwards;
position: relative;
}

Loading…
Cancel
Save