master
xy 1 year ago
parent d531e6f014
commit 8ce0535735

@ -90,6 +90,6 @@
}
}
.el-menu-item,.el-submenu__title,.el-table,.el-descriptions,.v-table .el-table__header th {
.el-menu-item,.el-submenu__title,.el-table,.el-descriptions,.v-table .el-table__header th,.el-form-item__label,.el-input {
font-size: 15px!important;
}

@ -51,6 +51,7 @@ export class CreateDialog {
props.onSuccess = (response, file, fileList) => {
that.file[info.field] = fileList;
that.form[info.field] = fileList.map(i => i.response?.id).filter(i => i)
};
props.onRemove = (file, fileList) => {

@ -775,7 +775,7 @@ export default {
numberLength += /^-?[0-9]+(\.[0-9]+)?$/.test(data[temp][i.field]) ? 1 : 0;
temp++;
}
if (numberLength === temp && !i._params) {
if (numberLength === temp && !i._params && numberLength !== 0) {
this.table.find(a => a.prop === i.field).align = 'right';
}
else if (Math.abs(maxLength - minLength) > 4) {

@ -763,7 +763,7 @@ export default {
numberLength += /^-?[0-9]+(\.[0-9]+)?$/.test(data[temp][i.field]) ? 1 : 0;
temp++;
}
if (numberLength === temp && !i._params) {
if (numberLength === temp && !i._params && numberLength !== 0) {
this.table.find(a => a.prop === i.field).align = 'right';
}
else if (Math.abs(maxLength - minLength) > 4) {

@ -601,7 +601,7 @@ export default {
numberLength += /^-?[0-9]+(\.[0-9]+)?$/.test(data[temp][i.field]) ? 1 : 0;
temp++;
}
if (numberLength === temp) {
if (numberLength === temp && numberLength !== 0) {
this.table.find(a => a.prop === i.field).align = 'right';
}
else if (Math.abs(maxLength - minLength) > 4) {

@ -1,15 +1,22 @@
<template>
<div id="map">
<div style="width: 100%;height: 100%">
<div id="map">
</div>
<tooltip ref="tooltip" class="tooltip-table" :info="params"></tooltip>
</div>
</template>
<script>
import Vue from "vue";
import * as echarts from "echarts";
import "echarts-gl";
import WUXI from "@/assets/wuxi.json";
import tooltip from "./tooltip.vue"
import Vue from 'vue'
import * as echarts from 'echarts'
import 'echarts-gl'
import WUXI from '@/assets/wuxi.json'
import tooltip from './tooltip.vue'
export default {
components: {
tooltip
},
data() {
return {
areas: new Map([
@ -58,14 +65,16 @@ export default {
echarts.registerMap("wuxi", WUXI);
this.chart = echarts.init(document.querySelector("#map"))
this.setOption()
this.chart.on("click", params => {
this.params = params?.data?.originalData;
this.$refs.tooltip.show()
})
},
setTooltip () {
const div = document.createElement("div");
let mapTooltip = new Vue({
this.mapTooltip = new Vue({
render: h => h(tooltip, { props: { info: this.params?.data?.originalData } })
})
mapTooltip.$mount(div);
this.mapTooltip = mapTooltip.$el;
});
document.body.appendChild(this.mapTooltip.$el)
},
setOption () {
this.chart.setOption(this.chartOption);
@ -74,14 +83,14 @@ export default {
computed: {
chartOption () {
return {
tooltip: {
trigger: 'item',
formatter: (params) => {
this.params = params;
return this.mapTooltip;
},
},
// tooltip: {
// trigger: 'item',
// formatter: (params) => {
// this.params = params;
//
// return this.mapTooltip;
// },
// },
series: [{
type: 'map3D', // mapmap3D
map: 'wuxi', //
@ -172,13 +181,13 @@ export default {
value: 0,
originalData: []
}))
houses.forEach(item => {
let find = temp.find(v => v.tag === item.area)
if (find) {
find.value++;
find.originalData.push(item)
}
})
// houses.forEach(item => {
// let find = temp.find(v => v.tag === item.area)
// if (find) {
// find.value++;
// find.originalData.push(item)
// }
// })
lands.forEach(item => {
let find = temp.find(v => v.tag === item.area)
if (find) {
@ -197,7 +206,6 @@ export default {
},
mounted() {
this.initMap();
this.setTooltip();
}
}
</script>
@ -208,4 +216,10 @@ export default {
height: 100%;
background: linear-gradient(to bottom, #00000022 , #61b9ac66);
}
.tooltip-table {
position: fixed;
z-index: 99999996;
top: 10%;
left: 10%;
}
</style>

@ -1,5 +1,5 @@
<template>
<div>
<div v-show="isShow">
<Table class="table" :data="showInfo" :columns="columns"></Table>
</div>
</template>
@ -7,10 +7,14 @@
<script>
export default {
props: {
info: Array
info: {
type: Array,
default: () => []
}
},
data() {
return {
isShow: false,
index: 0,
timer: null,
columns: [
@ -32,7 +36,14 @@ export default {
]
}
},
methods: {},
methods: {
show () {
this.isShow = true;
},
hide () {
this.isShow = false;
}
},
computed: {
showInfo () {
return this.info?.slice(this.index, this.index + 8) || [];

@ -188,8 +188,11 @@ export default {
{
"prop": "area",
"label": "区域",
"width": 0,
"align": "center"
"width": 80,
"align": "center",
"formatter": (data, row, value) => {
return this.wxAreas[value]
}
},
{
"prop": "name",
@ -411,8 +414,11 @@ export default {
{
"prop": "area",
"label": "区域",
"width": 0,
"align": "center"
"width": 80,
"align": "center",
"formatter": (data, row, value) => {
return this.wxAreas[value]
}
},
{
"prop": "name",
@ -550,6 +556,15 @@ export default {
},
data() {
return {
wxAreas: [
"宜兴市",
"惠山区",
"新吴区",
"梁溪区",
"江阴市",
"滨湖区",
"锡山区",
],
nowAssets: [],
houseDialog: false,
landDialog: false,
@ -683,10 +698,12 @@ export default {
// })
// this.form.id_lease_plans_lease_id_relation = this.leasePlans;
save(Object.assign(this.form, { table_name: 'lets' })).then(res => {
Promise.all(this.originalForm.id_lets_to_assets_let_id_relation?.map(i => destroy({
id: i.id,
table_name: "lets_to_assets"
},false)))
if (this.type !== 'add') {
Promise.all(this.originalForm.id_lets_to_assets_let_id_relation?.map(i => destroy({
id: i.id,
table_name: "lets_to_assets"
},false)))
}
let leaseToAssetsData = this.nowAssets.map(item => ({
id: item._relation_id,
land_id: !item.hasOwnProperty("land_id") ? item.id : "",

@ -33,6 +33,16 @@
<template v-if="item.edit_input === 'richtext'">
<div v-html="detail[item.field]"></div>
</template>
<template v-else-if="item.edit_input === 'file'">
<div>img</div>
</template>
<template v-else-if="item.edit_input === 'files'">
<div>
<a v-for="img in detail[`${item.field}_upload_details`]" :href="img.url" target="_blank">
{{ img.original_name }}
</a>
</div>
</template>
<template v-else>
{{ contentFormat(item) }}
</template>

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

@ -590,7 +590,7 @@ export default {
numberLength += /^-?[0-9]+(\.[0-9]+)?$/.test(data[temp][i.field]) ? 1 : 0;
temp++;
}
if (numberLength === temp) {
if (numberLength === temp && numberLength !== 0) {
this.table.find(a => a.prop === i.field).align = 'right';
}
else if (Math.abs(maxLength - minLength) > 4) {

@ -589,7 +589,7 @@ export default {
numberLength += /^-?[0-9]+(\.[0-9]+)?$/.test(data[temp][i.field]) ? 1 : 0;
temp++;
}
if (numberLength === temp) {
if (numberLength === temp && numberLength !== 0) {
this.table.find(a => a.prop === i.field).align = 'right';
}
else if (Math.abs(maxLength - minLength) > 4) {

@ -853,7 +853,7 @@ export default {
});
}
} else {
let house = this.originalForm.house?.find(
let house = this.originalForm.houses?.find(
(house) => house.id === item.house_id
);
if (house) {
@ -892,16 +892,18 @@ export default {
this.form.let_id = this.$route.params.letId;
save(Object.assign(this.form, { table_name: "leases" })).then((res) => {
Promise.all([
...this.originalForm.id_leases_to_assets_lease_id_relation.map(i => destroy({
id: i.id,
table_name: "leases_to_assets"
},false)),
...this.originalForm.id_lease_plans_lease_id_relation.map(i => destroy({
id: i.id,
table_name: "lease_plans"
},false))
])
if (this.type !== 'add') {
Promise.all([
...this.originalForm.id_leases_to_assets_lease_id_relation?.map(i => destroy({
id: i.id,
table_name: "leases_to_assets"
},false)),
...this.originalForm.id_lease_plans_lease_id_relation?.map(i => destroy({
id: i.id,
table_name: "lease_plans"
},false))
])
}
let leaseToAssetsData = this.nowAssets.map(item => ({
id: item._relation_id,
land_id: !item.hasOwnProperty("land_id") ? item.id : "",

@ -585,7 +585,7 @@ export default {
numberLength += /^-?[0-9]+(\.[0-9]+)?$/.test(data[temp][i.field]) ? 1 : 0;
temp++;
}
if (numberLength === temp) {
if (numberLength === temp && numberLength !== 0) {
this.table.find(a => a.prop === i.field).align = 'right';
}
else if (Math.abs(maxLength - minLength) > 4) {

Loading…
Cancel
Save