master
xy 2 years ago
parent fd994f3b53
commit db912b017b

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

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

@ -136,14 +136,42 @@
<template v-if="histories && histories.length > 0"> <template v-if="histories && histories.length > 0">
<Timeline> <Timeline>
<TimelineItem v-for="(item, index) in histories" :key="item.id"> <TimelineItem v-for="(item, index) in histories" :key="item.id">
<p>{{ item.riqi }}</p> <el-descriptions :column="1" size="mini" border :title="item.created_at" :label-style="{ 'width': '86px' }">
<div v-html="item.neirong"></div> <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 <el-image
style="width: 78%; height: 160px" style="height: 200px"
v-for="img in item.id_his_tupian_files_asset_history_id_relation" v-for="img in item.id_his_tupian_files_asset_history_id_relation"
:src="img.url" :src="img.url"
fit="contain" fit="contain"
></el-image> ></el-image>
</el-descriptions-item>
</el-descriptions>
</TimelineItem> </TimelineItem>
</Timeline> </Timeline>
</template> </template>
@ -214,7 +242,6 @@ export default {
center: [120.283692, 31.614211], center: [120.283692, 31.614211],
marker: {}, marker: {},
histories: [],
detail: {}, detail: {},
fields: [], fields: [],
relation: [], relation: [],
@ -223,6 +250,7 @@ export default {
tableName: "", tableName: "",
}, },
histories: [],
units: new Map([ units: new Map([
["jianzhumianji", "m²"], ["jianzhumianji", "m²"],
["jianzhugaodu", "m"], ["jianzhugaodu", "m"],
@ -268,7 +296,7 @@ export default {
"//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png"; "//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png";
let markerSpan = document.createElement("span"); let markerSpan = document.createElement("span");
markerSpan.setAttribute("class", "map-marker__text"); markerSpan.setAttribute("class", "map-marker__text");
markerSpan.innerText = this.detail.dikuaimingcheng; markerSpan.innerText = this.detail.name;
markerContent.appendChild(markerImg); markerContent.appendChild(markerImg);
markerContent.appendChild(markerSpan); markerContent.appendChild(markerSpan);
marker.setContent(markerContent); marker.setContent(markerContent);
@ -369,23 +397,22 @@ export default {
this.init(); this.init();
}, },
async getHistory() {
async getHistories () {
const res = await index({ const res = await index({
table_name: 'his_evolutions',
page: 1, page: 1,
page_size: 999, page_size: 999,
table_name: "asset_histories", filter:[
filter: [
{ {
key: "asset_id", key: /\/land/g.test(this.$route.path) ? 'land_id' : 'house_id',
op: "eq", op: 'eq',
value: this.detail.id, value: this.$route.params.id
}, }
], ]
}); })
this.histories = res.data.sort(function (a, b) { this.histories = res.data;
return new Date(a.riqi).getTime() - new Date(b.riqi).getTime(); }
});
},
}, },
computed: { computed: {
@ -430,14 +457,30 @@ export default {
}, },
}, },
created() { created() {
this.getFields().then((res) => { this.getFields().then(res => {
this.getHistory(); this.getHistories()
}); })
}, },
}; };
</script> </script>
<style scoped lang="scss"> <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 { ::v-deep .el-card {
margin-bottom: 20px; margin-bottom: 20px;
} }
@ -460,6 +503,10 @@ a:hover {
transition: all 0.2s; transition: all 0.2s;
color: $primaryColor !important; color: $primaryColor !important;
} }
.el-image + .el-image {
margin-left: 6px;
}
</style> </style>
<style lang="scss"> <style lang="scss">
.map-marker { .map-marker {

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

Loading…
Cancel
Save