master
xy 1 year ago
parent 8ce0535735
commit 149baff842

@ -133,7 +133,7 @@ export default {
},
methods: {
open(url) {
this.codeUri = `${process.env.VUE_APP_PREVIEW_API}?url=${encodeURIComponent(
this.codeUri = `${process.env.VUE_APP_PREVIEW}?url=${encodeURIComponent(
new Buffer(url).toString("base64")
)}`;

@ -101,7 +101,7 @@ export default {
},
methods: {
open(url) {
this.codeUri = `${process.env.VUE_APP_PREVIEW_API}?url=${encodeURIComponent(
this.codeUri = `${process.env.VUE_APP_PREVIEW}?url=${encodeURIComponent(
new Buffer(url).toString("base64")
)}`;

@ -2,7 +2,7 @@
<div style="width: 100%;height: 100%">
<div id="map">
</div>
<tooltip ref="tooltip" class="tooltip-table" :info="params"></tooltip>
<tooltip ref="tooltip" class="tooltip-table" :info="params" :style="{ left: mapTooltipPos.x + 'px', top: mapTooltipPos.y + 'px' }"></tooltip>
</div>
</template>
@ -55,8 +55,12 @@ export default {
},
}
},
params: {},
params: [],
mapTooltip: "",
mapTooltipPos: {
x: 0,
y: 0,
}
}
},
methods: {
@ -66,6 +70,8 @@ export default {
this.chart = echarts.init(document.querySelector("#map"))
this.setOption()
this.chart.on("click", params => {
this.mapTooltipPos.x = params.event.offsetX;
this.mapTooltipPos.y = params.event.offsetY;
this.params = params?.data?.originalData;
this.$refs.tooltip.show()
})
@ -219,7 +225,7 @@ export default {
.tooltip-table {
position: fixed;
z-index: 99999996;
top: 10%;
left: 10%;
top: 0;
left: 0;
}
</style>

@ -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 {}

@ -37,10 +37,27 @@
<div>img</div>
</template>
<template v-else-if="item.edit_input === 'files'">
<div
v-for="(item, index) in detail[`${item.field}_upload_details`]"
style="display: flex; justify-content: space-between;margin-bottom: 4px;"
>
<a :download="item.url">{{++index}}.{{ item.original_name }}</a>
<div>
<a v-for="img in detail[`${item.field}_upload_details`]" :href="img.url" target="_blank">
{{ img.original_name }}
</a>
<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>
</template>
<template v-else>
@ -143,7 +160,7 @@ export default {
},
methods: {
open(url) {
this.codeUri = `${process.env.VUE_APP_PREVIEW_API}?url=${encodeURIComponent(
this.codeUri = `${process.env.VUE_APP_PREVIEW}?url=${encodeURIComponent(
new Buffer(url).toString("base64")
)}`;

@ -594,14 +594,13 @@ export default {
numberLength += /^-?[0-9]+(\.[0-9]+)?$/.test(data[temp][i.field]) ? 1 : 0;
temp++;
}
if (numberLength === temp && numberLength !== 0) {
if (numberLength === temp && numberLength !== 0 && i.edit_input !== 'radio') {
this.table.find(a => a.prop === i.field).align = 'right';
}
else if (Math.abs(maxLength - minLength) > 4) {
this.table.find(a => a.prop === i.field).align = 'left';
}
})
console.log(this.table)
} catch (e) {
console.error(e)
}

@ -548,7 +548,7 @@ export default {
})
})
},
["select"]: (_) => {
["select"]: (selection, row) => {
if (selection.find(i => i.id === row.id)) {
this.nowAssets.push({
id: row.id,
@ -733,7 +733,7 @@ export default {
})
})
},
["select"]: (_) => {
["select"]: (selection, row) => {
if (selection.find(i => i.id === row.id)) {
this.nowAssets.push({
id: row.id,
@ -951,7 +951,7 @@ export default {
content: `${this.type === "add" ? "新增" : "编辑"}成功`,
});
this.$emit("refresh");
this.$router.back();
this.$router.push("/lease");
});
},
},
@ -990,17 +990,11 @@ export default {
}
}
});
this.columns = newVal.length > 11 ? "2" : "1";
},
//immediate: true,
},
dialogVisible(val) {
if (val) {
document.documentElement.style.setProperty(
"--column-num",
this.columns
);
if (this.type === "editor" || this.type === "change") {
this.$nextTick(() => this.getDetail());
}
@ -1096,7 +1090,7 @@ export default {
.form-body {
display: grid;
grid-gap: 10px;
grid-template-columns: repeat(var(--column-num), 1fr);
grid-template-columns: repeat(2, 1fr);
}
::v-deep .el-input-number input {
text-align: right;

Loading…
Cancel
Save