From c10c9a2dd0b977a61f9f4b4bf05acffc11dc8a92 Mon Sep 17 00:00:00 2001 From: xy <271556543@qq.com> Date: Mon, 12 Aug 2024 18:22:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 6 + src/components/onlineFile/onlineFile.vue | 49 +++++++++ src/store/modules/bigdata.js | 12 +- src/utils/createDialog.js | 134 +++++++++++++++-------- src/views/assets/detail.vue | 27 +---- src/views/assets/handleSignDetail.vue | 2 +- src/views/component/detail.vue | 20 +--- src/views/component/detailCpn.vue | 2 +- src/views/dataShow/right3.vue | 80 ++++++-------- src/views/dataShow/tooltip.vue | 1 + src/views/lease/detailLease.vue | 87 +++++++++------ src/views/lease/detailLet.vue | 2 +- src/views/lease/detailPlan.vue | 2 +- src/views/lease/leaseLogDetail.vue | 129 ++-------------------- src/views/lease/plan.vue | 49 +++++++-- src/views/lease/sign.vue | 15 ++- 16 files changed, 312 insertions(+), 305 deletions(-) create mode 100644 src/components/onlineFile/onlineFile.vue diff --git a/src/App.vue b/src/App.vue index ec9032c..ba2ec64 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,11 +1,17 @@ diff --git a/src/components/onlineFile/onlineFile.vue b/src/components/onlineFile/onlineFile.vue new file mode 100644 index 0000000..d8c33e4 --- /dev/null +++ b/src/components/onlineFile/onlineFile.vue @@ -0,0 +1,49 @@ + + + + + diff --git a/src/store/modules/bigdata.js b/src/store/modules/bigdata.js index 0d83671..e21f3d5 100644 --- a/src/store/modules/bigdata.js +++ b/src/store/modules/bigdata.js @@ -106,15 +106,15 @@ const actions = { page: 1, page_size: 999, filter: [ - { - key: 'zulinjieshuqixian', - op: 'range', - value: `${$moment().format("YYYY-MM-DD")},${preDate}` - }, + // { + // key: 'zulinjieshuqixian', + // op: 'range', + // value: `${$moment().format("YYYY-MM-DD")},${preDate}` + // }, { key: 'zulinkaishiqixian', op: 'range', - value: `` + value: `1999-01-01,${$moment().format("YYYY-MM-DD")}` } ] }).then(res => { diff --git a/src/utils/createDialog.js b/src/utils/createDialog.js index 4f2688b..b7d38b1 100644 --- a/src/utils/createDialog.js +++ b/src/utils/createDialog.js @@ -1,6 +1,6 @@ import { domMap } from "@/const/inputType"; import { addPropsMap } from "@/const/addProps"; - +import { download } from "@/utils/downloadRequest"; export class CreateDialog { replaces; self; @@ -44,6 +44,8 @@ export class CreateDialog { let that = this.self; that.file[field] = that.file[field].filter((item) => item !== file); that.file = Object.assign({}, that.file); + that.form[field] = that.file[field].map(i => i.response?.id).filter(i => i); + } extraProps(info) { let that = this.self; @@ -62,11 +64,12 @@ 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) + that.form[info.field] = fileList.map(i => i.response?.id).filter(i => i); }; props.onRemove = (file, fileList) => { that.file[info.field] = fileList; + that.form[info.field] = fileList.map(i => i.response?.id).filter(i => i); }; props.onError = (err, file, fileList) => { @@ -236,57 +239,96 @@ export class CreateDialog { file: (scope) => { let { file } = scope; return [ - h("div", {}, [ - h("i", { - class: { - "el-icon-circle-check": - file.status === - "success", - "el-icon-loading": - file.status === - "uploading", - }, - style: { - color: - file.status === - "success" - ? "green" - : "", - }, - }), - h( - "a", - { - attrs: { - href: file.url, - download: file.name, - target: "_blank", - }, + h('div', { + style: { + display: 'flex', + 'align-items': 'center' + } + },[h("div", { + style: { + 'margin-right': "auto" + } + }, [ + h("i", { class: { - "uploaded-a": + "el-icon-circle-check": file.status === "success", + "el-icon-loading": + file.status === + "uploading", }, style: { - padding: "0 4px", + color: + file.status === + "success" + ? "green" + : "", }, + }), + h( + "a", + { + attrs: { + href: file.url, + download: file.name, + target: "_blank", + }, + class: { + "uploaded-a": + file.status === + "success", + }, + style: { + padding: "0 4px", + }, + }, + file.original_name || file.name + ), + ]), + h("div",{ + style: { + "margin-right": "32px", + 'display': file.status === 'success' ? 'block' : 'none' + } + },[ + h("i",{ + class: "el-icon-view", + style: { + 'cursor': 'pointer', + 'margin-right': '12px' + }, + on: { + ['click']: _ => { + that.$bus.$emit('online-file', file.url) + } + } + }), + h("i",{ + class: "el-icon-download", + style: { + 'cursor': 'pointer' + }, + on: { + ['click']: _ => { + download(file.url) + } + } + }) + ]), + h("i", { + class: "el-icon-close", + style: { + "display": this.options.disabled ? "none" : "inline" }, - file.original_name || file.name - ), - ]), - h("i", { - class: "el-icon-close", - style: { - "display": this.options.disabled ? "none" : "inline" - }, - on: { - ["click"]: () => - this.fileRemoveHandler( - file, - i.field - ), - }, - }), + on: { + ["click"]: () => + this.fileRemoveHandler( + file, + i.field + ), + }, + })]) ]; }, } diff --git a/src/views/assets/detail.vue b/src/views/assets/detail.vue index 71627f7..32eaf69 100644 --- a/src/views/assets/detail.vue +++ b/src/views/assets/detail.vue @@ -270,7 +270,7 @@ > - - - -
@@ -368,7 +351,7 @@ >
- - - @@ -193,11 +177,11 @@ export default { > this.open(row.url) + ['click']:_ => this.$bus.$emit("online-file",row.url) }} > diff --git a/src/views/component/detailCpn.vue b/src/views/component/detailCpn.vue index a025cdf..d4a6746 100644 --- a/src/views/component/detailCpn.vue +++ b/src/views/component/detailCpn.vue @@ -185,7 +185,7 @@ export default { > - 资产数据 + 租赁台账
@@ -15,7 +15,21 @@
- +
+ {{ item.name }} +
+
承租方
+
{{ showLease.chengzufang }}
+
+
+
租赁期限
+
{{ showLease.zulinkaishiqixian }}~{{ showLease.zulinjieshuqixian }}
+
+
+
面积
+
{{ showLease.chengzufang }}
+
+
@@ -26,67 +40,35 @@ import SvgIcon from "@/components/SvgIcon" import Chart from "@/components/Charts" export default { components: { - SvgIcon, - Chart + SvgIcon }, data () { return { - drawTiming: null, - cdata: { - year: null, - weekCategory: [], - radarData: [], - radarDataAvg: [], - maxData: 12000, - weekMaxData: [], - weekLineData: [] - } + showLease: {}, + timer: null, + index: 0, } }, mounted () { - this.drawTimingFn(); + this.timer = setInterval(() => { + this.showLease = this.leaseList[this.index%this.leaseList.length] + this.index++; + },5000) }, beforeDestroy () { - clearInterval(this.drawTiming); + clearInterval(this.timer) }, methods: { - drawTimingFn () { - this.setData(); - this.drawTiming = setInterval(() => { - this.setData(); - }, 6000); - }, - setData () { - let myAsset,assets; - if (this.assetsList instanceof Array) { - assets = this.assetsList.filter(i => !!(i.jiaotong || i.jiaoyu || i.shangquan || i.shushidu)) - myAsset = assets[Math.floor(Math.random() * assets.length)]; - } - // if (this.leaseList instanceof Array) { - // console.log(this.leaseList) - // myLease = this.leaseList[Math.floor(Math.random() * this.leaseList.length)]; - // console.log(myLease) - // } - // 清空轮询数据 - this.cdata.asset = myAsset??{}; - this.cdata.lease = myAsset ? myAsset["id_leases_land_id_relation"] : []; - this.cdata.radarData = myAsset ? [myAsset.jiaotong, myAsset.jiaoyu, myAsset.shangquan, myAsset.shushidu] : []; - this.cdata.radarDataAvg = assets ? - [ - assets.reduce((a,b) => (a + Number(b.jiaotong??0)),0)/assets.length, - assets.reduce((a,b) => (a + Number(b.jiaoyu??0)),0)/assets.length, - assets.reduce((a,b) => (a + Number(b.shangquan??0)),0)/assets.length, - assets.reduce((a,b) => (a + Number(b.shushidu??0)),0)/assets.length - ] : - [0, 0, 0, 0]; - } + }, computed: { - assetsList () { - return this.$store.state.bigdata.assets[1] + leaseName () { + let temp = this.index; + return [...this.showLease?.land || [],...this.showLease?.houses || []] }, + leaseList () { - return this.$store.state.bigdata.leases + return this.$store.state.bigdata.adventLeases || [] } } }; diff --git a/src/views/dataShow/tooltip.vue b/src/views/dataShow/tooltip.vue index c5aeeca..900cf40 100644 --- a/src/views/dataShow/tooltip.vue +++ b/src/views/dataShow/tooltip.vue @@ -85,6 +85,7 @@ export default {