diff --git a/src/assets/pageBg.png b/src/assets/pageBg.png new file mode 100644 index 0000000..d393f2b Binary files /dev/null and b/src/assets/pageBg.png differ diff --git a/src/components/XyTable/index.vue b/src/components/XyTable/index.vue index dab2ea7..99ed9de 100644 --- a/src/components/XyTable/index.vue +++ b/src/components/XyTable/index.vue @@ -9,7 +9,11 @@ export default { delayReq: { type: Boolean, default: false - },//是否延时请求 + },//created获取数据时,是否等select条件传入后再请求 + isFirstReq: { + type: Boolean, + default: true + },//created时是否请求 reqOpt: Object, //请求参数配置 destroyReqOpt:Object, resProp: { @@ -204,13 +208,6 @@ export default { }, methods: { //方法 - calculateTextWidth(text) { - const canvas = document.createElement('canvas'); - const context = canvas.getContext('2d'); - context.font = '14px Arial'; // Set the font size and family to match the table cell's font - const metrics = context.measureText(text); - return metrics.width; - }, initLoad() { if (this.height) return; let clientHeight = document.documentElement.clientHeight; @@ -777,18 +774,20 @@ export default { }, }, created() { - if(this.delayReq) { - let watch = this.$watch(()=>this.reqOpt,async (newVal,oldVal)=>{ - if(this.action) { - await this.getTableData(); - watch(); - } - },{ - deep: true, - immediate: true - }) - } else { - if(this.action) this.getTableData(); + if (this.isFirstReq) { + if(this.delayReq) { + let watch = this.$watch(()=>this.reqOpt,async (newVal,oldVal)=>{ + if(this.action) { + await this.getTableData(); + watch(); + } + },{ + deep: true, + immediate: true + }) + } else { + if(this.action) this.getTableData(); + } } }, mounted() { @@ -903,68 +902,68 @@ export default { scopedSlots={ item.customFn || item.type === "expand" ? { - default(scope) { - if (item.type === "expand") { - return item.expandFn(scope); - } - if (item.customFn) { - return item.customFn(scope.row, scope); - } - }, - } + default(scope) { + if (item.type === "expand") { + return item.expandFn(scope); + } + if (item.customFn) { + return item.customFn(scope.row, scope); + } + }, + } : "" } > {item.multiHd ? item.multiHd.map((item1, index1) => { - return ( - - ); - }) + return ( + + ); + }) : ""} ); @@ -1089,7 +1088,7 @@ export default { clip-path: polygon(0 30%, 100% 30%, 100% 100%, 0 100%); background: rgba(140, 140, 140, 0.7); transform: scale(0.8, 0.8) translateX(-22px) translateY(-10px) - rotate(-90deg); + rotate(-90deg); } } } diff --git a/src/const/validation.js b/src/const/validation.js new file mode 100644 index 0000000..edb4d35 --- /dev/null +++ b/src/const/validation.js @@ -0,0 +1,10 @@ +const validation = new Map([ + ['integer',/^-?\d+$/],//整数 + ['date',/(^\d{10})|(^\d{13})|(^((\d\d\d\d(.+)|\d\d(.+))?(0?[1-9](.+)|1[012](.+))?((0?[1-9]|[12]\d|3[01])(.+))?\s?)((0?[0-9]|1[0-9]|2[0-3])(.+))?((0?[0-9]|[1-5][0-9])(.+))?((0?[0-9]|[1-5][0-9])(.+))?)$/], + ['email',/^[^\s@]+@[^\s@]+\.[^\s@]+$/], + ['idcard',/(^([1-6][1-9]|50)\d{4}\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3})|(^([1-6][1-9]|50)\d{4}(18|19|20)\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx])$/], + ['mobile',/(^1[3456789]\d{9})|(^(0\d{2,3}(-)*)?\d{7})$/], + ['numeric',/^-?\d+(.\d+)?$/], +]) + +export default validation diff --git a/src/icons/svg/house.svg b/src/icons/svg/house.svg new file mode 100644 index 0000000..da168e2 --- /dev/null +++ b/src/icons/svg/house.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/qiandai.svg b/src/icons/svg/qiandai.svg new file mode 100644 index 0000000..1b66378 --- /dev/null +++ b/src/icons/svg/qiandai.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/weixiu.svg b/src/icons/svg/weixiu.svg new file mode 100644 index 0000000..3a83e68 --- /dev/null +++ b/src/icons/svg/weixiu.svg @@ -0,0 +1 @@ + diff --git a/src/styles/element-ui.scss b/src/styles/element-ui.scss index d232da3..f53dd33 100644 --- a/src/styles/element-ui.scss +++ b/src/styles/element-ui.scss @@ -71,3 +71,21 @@ } +.el-dialog { + background-color: #fff; + border: 0; + border-radius: 6px; + background-clip: padding-box; + box-shadow: 0 4px 12px rgba(0, 0, 0, .15); + + &__header { + border-bottom: 1px solid #e8eaec; + padding: 14px 16px; + line-height: 1; + } + &__footer { + border-top: 1px solid #e8eaec; + padding: 12px 18px; + text-align: right; + } +} diff --git a/src/views/assets/lease.vue b/src/views/assets/lease.vue index 18e2e0a..5837e40 100644 --- a/src/views/assets/lease.vue +++ b/src/views/assets/lease.vue @@ -70,7 +70,7 @@ export default { }, { label: '租赁面积', - prop: 'zupingmianji' + prop: 'zulinmianji' }, { label: '租赁期限起止', diff --git a/src/views/component/dialog.vue b/src/views/component/dialog.vue index 3859a9e..8d723e2 100644 --- a/src/views/component/dialog.vue +++ b/src/views/component/dialog.vue @@ -1,10 +1,15 @@ + + diff --git a/src/views/component/map.vue b/src/views/component/map.vue index fdadbeb..68fb0a7 100644 --- a/src/views/component/map.vue +++ b/src/views/component/map.vue @@ -3,7 +3,7 @@

面积总量

-

{{ listFilter.reduce((a,b) => a + Number(b.shijimianji),0) }} 平方

+

{{ areaTotal }} 平方

资产总量

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

闲置面积

-

{{ Math.round(Math.random()*5000+5000) }} 平方

+

{{ idleArea }} 平方

租赁面积

-

{{ listFilter.reduce((a,b) => a + Number(b.shijimianji || 0),0) }} 平方

+

{{ leaseAreaTotal }} 平方

@@ -827,6 +827,28 @@ export default { zichanleixingTypes () { return this.form.find(j => j.field === 'zichanleixing')?._params || [] }, + areaTotal () { + return this.listFilter.reduce((a,b) => a + Number(b.shijimianji??0),0) + }, + leaseAreaTotal () { + return this.listFilter.reduce((a,b) => { + if (b.id_leases_land_id_relation instanceof Array && b.id_leases_land_id_relation.length > 0 ) { + return a + Number(b.id_leases_land_id_relation.reduce((c,d) => { + if (this.$moment().isBetween(this.$moment(d.zulinkaishiqixian),this.$moment(d.zulinjieshuqixian))) { + return c + Number(d.zulinmianji) + } else { + return c + } + },0)) + } else { + return a + } + },0) + }, + + idleArea () { + return this.areaTotal - this.leaseAreaTotal + } }, created() { this.getFormDetail(); diff --git a/src/views/component/table.vue b/src/views/component/table.vue index 46a61d8..a1817bc 100644 --- a/src/views/component/table.vue +++ b/src/views/component/table.vue @@ -611,11 +611,11 @@ export default { this.form.forEach((i) => { let lengthTemp = data[0][i.field]?.length??0; for (let j = 0;j < data.length;j++) { - if (/^-?\d+.\d+/.test(data[j][i.field])) { + 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) > 4) { + if (Math.abs(lengthTemp - (data[j][i.field]?.length)??0) > 4) { this.table.find(a => a.prop === i.field).align = 'left'; return } diff --git a/src/views/dashboard/components/drawer.vue b/src/views/dashboard/components/drawer.vue index 4f24916..edadeaf 100644 --- a/src/views/dashboard/components/drawer.vue +++ b/src/views/dashboard/components/drawer.vue @@ -53,7 +53,7 @@ export default { hetongjiaozujieshushijian: "合同交租结束时间", zulinkaishiqixian: "租赁开始期限", zulinjieshuqixian: "租赁结束期限", - zupingmianji: "租赁面积", + zulingmianji: "租赁面积", yingshouzujin: "应收租金" } } @@ -90,7 +90,7 @@ export default { let splits = key.split('.'); let value = this.row; for (let i = 0;i < splits.length;i++) { - value = value[splits[i]] + value = (splits[i] && value) ? value[splits[i]] : "" } return value; diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index a7f591c..1d310b5 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -2,10 +2,43 @@
+ +
+
+

代办通知

+ + +
+ 更多 + +
+
+
+
合约中
+
临期
+
已过期
+ + + + +
+ + + + + + +
+ + +
+ + +
-

通知

+

通知公告

更多 @@ -47,37 +80,6 @@
- - -
-
-

租赁台账

- - -
- 更多 - -
-
-
-
合约中
-
临期
-
已过期
- - - - -
- - - - - - -
- - -
@@ -397,8 +399,8 @@ this.radio = e if (e === 1) { let date = this.$moment() - let preDate = date.subtract(this.config.time, this.config.unit).format("YYYY-MM-DD") - this.leaseSelect.filter[0].value = `${preDate},${date.format("YYYY-MM-DD")}` + let preDate = date.add(this.config.time, this.config.unit).format("YYYY-MM-DD") + this.leaseSelect.filter[0].value = `${this.$moment().format("YYYY-MM-DD")},${preDate}` this.leaseSelect.filter[1].value = '' } if (e === 2) { diff --git a/src/views/dataShow/btns.vue b/src/views/dataShow/btns.vue index 378ac39..c57d40c 100644 --- a/src/views/dataShow/btns.vue +++ b/src/views/dataShow/btns.vue @@ -1,35 +1,21 @@