diff --git a/src/components/XyMap/index.vue b/src/components/XyMap/index.vue index 3fd5120..490cd14 100644 --- a/src/components/XyMap/index.vue +++ b/src/components/XyMap/index.vue @@ -1,7 +1,19 @@ @@ -17,10 +29,14 @@ export default { data() { return { map: {}, - } }, - methods: {}, + methods: { + inputHandle (e, key) { + this.map[key] = e; + this.map = Object.assign({}, this.map) + } + }, computed: {}, watch: { map(newVal) { @@ -47,27 +63,43 @@ export default { console.log(res) this.$emit('input', res) }, - value(newVal) { - if(typeof this.resultFormat === 'string') { - this.map[this.resultFormat] = Number(newVal) - } - if(this.resultFormat instanceof Array && newVal) { - let valArr = newVal.split(',') - this.resultFormat.forEach((i,index) => { - this.map[i] = Number(valArr[index]) - }) - } - if(typeof this.resultFormat === 'object' && (!this.resultFormat instanceof Array)) { - for(let key in this.resultFormat) { - this.map[key] = Number(newVal[key]) - } - } + value: { + handler: function(newVal) { + if (newVal) { + if(typeof this.resultFormat === 'string') { + this.map[this.resultFormat] = newVal + } + if(this.resultFormat instanceof Array && newVal) { + let valArr = newVal.split(',') + this.resultFormat.forEach((i,index) => { + this.map[i] = Number(valArr[index]) + }) + } + if(typeof this.resultFormat === 'object' && (!this.resultFormat instanceof Array)) { + for(let key in this.resultFormat) { + this.map[key] = newVal[key] + } + } - console.log(this.map) + console.log(this.map) + } + }, + immediate: true } } } diff --git a/src/components/XyTable/index.vue b/src/components/XyTable/index.vue index 61c4dba..1f90f3a 100644 --- a/src/components/XyTable/index.vue +++ b/src/components/XyTable/index.vue @@ -366,9 +366,9 @@ export default { clearSelection() { this.$refs.table.clearSelection(); }, - toggleRowSelection(row) { + toggleRowSelection(row, selected) { this.$nextTick(() => { - this.$refs.table.toggleRowSelection(row); + this.$refs.table.toggleRowSelection(row, selected); }); }, toggleAllSelection() { diff --git a/src/utils/createDialog.js b/src/utils/createDialog.js index 833eb8d..a9d1cec 100644 --- a/src/utils/createDialog.js +++ b/src/utils/createDialog.js @@ -309,7 +309,7 @@ export class CreateDialog { let info = that.formInfo.find((i) => i.field === replace.key); if (!info) { if (replace.label) { - dom.push( + dom.splice(replace.sort??dom.length,0, h( "el-form-item", { @@ -325,9 +325,9 @@ export class CreateDialog { }, [replace.render] ) - ); + ) } else { - dom.push(replace.render); + dom.splice(replace.sort??dom.length,0,replace.render) } } }); diff --git a/src/views/assets/house.vue b/src/views/assets/house.vue index 8e77a47..b970167 100644 --- a/src/views/assets/house.vue +++ b/src/views/assets/house.vue @@ -646,33 +646,33 @@ export default { "wuyedanwei", ]; switch (i.field) { - case "shiyongzhuangtai": - this.table.push({ - label: i.name, - width: i.width, - customFn:row => { - return ( - { - (() => { - let res = '无'; - for (let i = 0;i < row.id_leases_house_id_relation.length;i++) { - let nowDate = this.$moment(new Date()) - let startDate = this.$moment(new Date(row.id_leases_house_id_relation[i]?.zulinkaishiqixian)) - let endDate = this.$moment(new Date(row.id_leases_house_id_relation[i]?.zulinjieshuqixian)) - - if (nowDate.isBetween(startDate,endDate)) { - res = "租赁给"+row.id_leases_house_id_relation[i]?.chengzufang - break; - } - - } - return res; - })() - } - ) - } - }) - break; + // case "shiyongzhuangtai": + // this.table.push({ + // label: i.name, + // width: i.width, + // customFn:row => { + // return ( + // { + // (() => { + // let res = '无'; + // for (let i = 0;i < row.id_leases_house_id_relation.length;i++) { + // let nowDate = this.$moment(new Date()) + // let startDate = this.$moment(new Date(row.id_leases_house_id_relation[i]?.zulinkaishiqixian)) + // let endDate = this.$moment(new Date(row.id_leases_house_id_relation[i]?.zulinjieshuqixian)) + // + // if (nowDate.isBetween(startDate,endDate)) { + // res = "租赁给"+row.id_leases_house_id_relation[i]?.chengzufang + // break; + // } + // + // } + // return res; + // })() + // } + // ) + // } + // }) + // break; case "bufuqingkuang": this.table.push({ label: i.name, diff --git a/src/views/assets/land.vue b/src/views/assets/land.vue index a77f8c1..a1ad5df 100644 --- a/src/views/assets/land.vue +++ b/src/views/assets/land.vue @@ -622,33 +622,33 @@ export default { let alignLeft = ['dikuaimingcheng','chengjiandanwei','jianshedanwei','wuyedanwei'] switch (i.field) { - case "shiyongzhuangtai": - this.table.push({ - label: i.name, - width: i.width, - customFn:row => { - return ( - { - (() => { - let res = '无'; - 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; - })() - } - ) - } - }) - break; + // case "shiyongzhuangtai": + // this.table.push({ + // label: i.name, + // width: i.width, + // customFn:row => { + // return ( + // { + // (() => { + // let res = '无'; + // 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; + // })() + // } + // ) + // } + // }) + // break; case "fangchanzhuangtai": this.table.push({ label: i.name, @@ -745,6 +745,7 @@ export default { width: 60, label: "序号", }); + }, toHistory (row) { diff --git a/src/views/component/map.vue b/src/views/component/map.vue index 68fb0a7..fcec78d 100644 --- a/src/views/component/map.vue +++ b/src/views/component/map.vue @@ -3,7 +3,7 @@

面积总量

-

{{ areaTotal }} 平方

+

{{ areaTotal.toFixed(2) }} 平方

资产总量

@@ -11,11 +11,11 @@

闲置面积

-

{{ idleArea }} 平方

+

{{ idleArea.toFixed(2) }} 平方

租赁面积

-

{{ leaseAreaTotal }} 平方

+

{{ leaseAreaTotal.toFixed(2) }} 平方

@@ -478,10 +478,10 @@ export default { let markerSpan = document.createElement("span"); markerSpan.setAttribute("class", "map-marker__text"); markerSpan.innerText = - item.name.length > 4 - ? item.name.slice(0, 2) + + item.name?.length > 4 + ? item.name?.slice(0, 2) + ".." + - item.name.slice(item.name.length - 2) + item.name?.slice(item.name.length - 2) : item.name; markerContent.appendChild(markerImg); markerContent.appendChild(markerSpan); diff --git a/src/views/component/table.vue b/src/views/component/table.vue index f120085..c071809 100644 --- a/src/views/component/table.vue +++ b/src/views/component/table.vue @@ -583,7 +583,6 @@ export default { } } - //let alignLeft = ['dikuaimingcheng','chengjiandanwei','jianshedanwei','wuyedanwei'] this.table.push( Object.assign( { @@ -607,25 +606,29 @@ export default { adjustAlignment () { if (this.firstAdjustTable) { const data = this.$refs['xyTable'].getListData(); - if (data.length === 0) return; - this.form.filter(i => i.list_show).forEach((i) => { - let lengthTemp; - let temp = 0; - while (!lengthTemp || temp < data.length) { - lengthTemp = data[temp][i.field]?.length??0; - temp++; - } - for (let j = 0;j < data.length;j++) { - if (/^-?\d+\.\d+/.test(data[j][i.field])) { - this.table.find(a => a.prop === i.field).align = 'right'; - return + if (data.length < 2) return; + try { + this.form.filter(i => i.list_show).forEach((i) => { + let lengthTemp; + let temp = 0; + while (!lengthTemp || temp < data.length) { + lengthTemp = data[temp][i.field]?.length??0; + temp++; } - if (Math.abs(lengthTemp - (data[j][i.field]?.length)??0) > 4) { - this.table.find(a => a.prop === i.field).align = 'left'; - return + for (let j = 0;j < data.length;j++) { + if (/^-?\d+\.\d+/.test(data[j][i.field])) { + this.table.find(a => a.prop === i.field).align = 'right'; + return + } + if (Math.abs(lengthTemp - (data[j][i.field]?.length)??0) > 4) { + this.table.find(a => a.prop === i.field).align = 'left'; + return + } } - } - }) + }) + } catch (e) { + + } this.$nextTick(() => { this.$refs['xyTable'].doLayout(); this.firstAdjustTable = false; diff --git a/src/views/lease/component/addLease.vue b/src/views/lease/component/addLease.vue new file mode 100644 index 0000000..d9ca1ae --- /dev/null +++ b/src/views/lease/component/addLease.vue @@ -0,0 +1,620 @@ + + + + diff --git a/src/views/lease/index.vue b/src/views/lease/index.vue new file mode 100644 index 0000000..e2117c2 --- /dev/null +++ b/src/views/lease/index.vue @@ -0,0 +1,681 @@ + + + + +