|
|
|
|
@ -1,7 +1,9 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div v-show="isShow">
|
|
|
|
|
<Table class="table" :data="showInfo" :columns="columns"></Table>
|
|
|
|
|
<transition name="fade">
|
|
|
|
|
<div v-show="isShow" ref="tooltip">
|
|
|
|
|
<Table class="table" height="500" stripe :data="showInfo" :columns="columns"></Table>
|
|
|
|
|
</div>
|
|
|
|
|
</transition>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
@ -22,13 +24,6 @@ export default {
|
|
|
|
|
key: "name",
|
|
|
|
|
title: "资产名称"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
key: "land_id",
|
|
|
|
|
title: "资产类型",
|
|
|
|
|
render: (h,{ row }) => {
|
|
|
|
|
return h('span',row.hasOwnProperty("land_id") ? "房产" : "土地")
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
key: "dengjimianji",
|
|
|
|
|
title: "登记面积"
|
|
|
|
|
@ -42,40 +37,54 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
hide () {
|
|
|
|
|
this.isShow = false;
|
|
|
|
|
},
|
|
|
|
|
clickListener (e) {
|
|
|
|
|
const tooltipDom = this.$el;
|
|
|
|
|
if (!(tooltipDom === e.target || tooltipDom.contains(e.target))) {
|
|
|
|
|
this.hide()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
|
|
|
|
showInfo () {
|
|
|
|
|
return this.info?.slice(this.index, this.index + 8) || [];
|
|
|
|
|
return this.info
|
|
|
|
|
//return this.info?.slice(this.index, this.index + 8) || [];
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
watch: {
|
|
|
|
|
info (newData) {
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
clearInterval(this.timer)
|
|
|
|
|
if (this.info?.length > 8) {
|
|
|
|
|
this.timer = setInterval(() => {
|
|
|
|
|
this.index = (++this.index) % (this.info?.length || 0);
|
|
|
|
|
},3000)
|
|
|
|
|
isShow (newVal) {
|
|
|
|
|
if (newVal) {
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
document.body.addEventListener('click', this.clickListener)
|
|
|
|
|
},500)
|
|
|
|
|
} else {
|
|
|
|
|
this.index = 0;
|
|
|
|
|
document.body.removeEventListener('click', this.clickListener)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
info (newData) {
|
|
|
|
|
// this.$nextTick(() => {
|
|
|
|
|
// clearInterval(this.timer)
|
|
|
|
|
// if (this.info?.length > 8) {
|
|
|
|
|
// this.timer = setInterval(() => {
|
|
|
|
|
// this.index = (++this.index) % (this.info?.length || 0);
|
|
|
|
|
// },3000)
|
|
|
|
|
// } else {
|
|
|
|
|
// this.index = 0;
|
|
|
|
|
// }
|
|
|
|
|
// })
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
},
|
|
|
|
|
beforeDestroy () {
|
|
|
|
|
clearInterval(this.timer)
|
|
|
|
|
console.log('des')
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
.table {
|
|
|
|
|
width: 320px;
|
|
|
|
|
height: auto;
|
|
|
|
|
max-height: 400px;
|
|
|
|
|
overflow-y: hidden;
|
|
|
|
|
width: 350px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
::v-deep .ivu-table {}
|
|
|
|
|
|