From c7d99f5e11c4cf0667f67b8170e1c585db2e2016 Mon Sep 17 00:00:00 2001 From: liukangdong <898885815@qq.com> Date: 星期六, 08 二月 2025 15:34:15 +0800 Subject: [PATCH] Merge branch '2.0.1' of http://139.186.142.91:10010/r/productDev/funingyunwei into 2.0.1 --- admin/src/views/project/components/houseDetails.vue | 135 +++++++++++++++++++++++--------------------- 1 files changed, 71 insertions(+), 64 deletions(-) diff --git a/admin/src/views/project/components/houseDetails.vue b/admin/src/views/project/components/houseDetails.vue index 98310e9..634af23 100644 --- a/admin/src/views/project/components/houseDetails.vue +++ b/admin/src/views/project/components/houseDetails.vue @@ -121,10 +121,6 @@ label="绛捐鏃�"> </el-table-column> <el-table-column - prop="address" - label="鍚堝悓鏉ユ簮"> - </el-table-column> - <el-table-column label="鍚堝悓鐘舵��"> <template slot-scope="{row}"> <span class="primaryColor" v-if="row.status === 0">寰呮墽琛�</span> @@ -254,10 +250,14 @@ <div class="xm"> <div class="xm_chat"> <el-card class="xm_chat_row"> - <div id="chat1"></div> + <div class="xm_chat_row_info"> + <span>鎬昏</span> + <span>{{amount}}</span> + </div> + <div id="chat1" v-if="activeName === 'third'"></div> </el-card> <el-card class="xm_chat_row"> - <div id="chat2"></div> + <div id="chat2" v-if="activeName === 'third'"></div> </el-card> </div> <el-card style="margin-top: 20px;"> @@ -387,7 +387,8 @@ categaryList: [], deviceList: [], showDetail: false, - showEdit1: false + showEdit1: false, + amount: 0 } }, methods: { @@ -408,6 +409,7 @@ this.$refs.EditRef.param.rooms = [this.info.projectId, this.info.buildingId, this.info.floor, this.info.id] this.$refs.EditRef.isShowModal = true this.$refs.EditRef.changeProject() + this.$refs.EditRef.getHouseVal([this.info.projectId, this.info.buildingId, this.info.floor, this.info.id]) }) }, handleDetail(row) { @@ -435,6 +437,7 @@ { value: res.exceptionAmount || 0, name: '寮傚父' }, { value: res.errAmount || 0, name: '鎶ュ簾' } ] + this.amount = res.amount this.reand() }) }) @@ -582,13 +585,7 @@ { name: '璁惧鐘舵��', type: 'pie', - radius: ['40%', '80%'], - label: { - show: true, - position: 'center', - fontWeight: 'bold', - fontSize: 22 - }, + radius: ['50%', '80%'], data: this.deviceList } ] @@ -599,51 +596,24 @@ var chartDom = document.getElementById('chat2'); var myChart = echarts.init(chartDom); var option; - const rawData = [ - [100, 302, 301, 334, 390, 330, 320], - [320, 132, 101, 134, 90, 230, 210], - [220, 182, 191, 234, 290, 330, 310], - [150, 212, 201, 154, 190, 330, 410], - [820, 832, 901, 934, 1290, 1330, 1320] - ]; - const totalData = []; - for (let i = 0; i < rawData[0].length; ++i) { - let sum = 0; - for (let j = 0; j < rawData.length; ++j) { - sum += rawData[j][i]; - } - totalData.push(sum); - } - const series = [ - 'Direct', - 'Mail Ad', - 'Affiliate Ad', - 'Video Ad', - 'Search Engine' - ].map((name, sid) => { - return { - name, - type: 'bar', - stack: 'total', - barWidth: '60%', - data: rawData[sid].map((d, did) => - totalData[did] <= 0 ? 0 : d / totalData[did] - ) - }; - }); - let seriesArr = this.categaryList.map(item => { - return { - name: item.cateName, - type: 'bar', - stack: 'total', - barWidth: '60%', - data: item.ywDeviceCateDataVOList.map((child) => - child.deviceAmount - ) - } + let seriesArr = [] + this.categaryList.forEach((one, index) => { + one.ywDeviceCateDataVOList.forEach(two => { + let data = [] + this.categaryList.forEach(item => { + data.push(0) + }) + data[index] = two.deviceAmount + seriesArr.push({ + name: two.cateName, + type: 'bar', + barGap:-1, + stack: one.cateName, + data + }) + }) }) let xAxisData = this.categaryList.map(item => item.cateName) - console.log(series) console.log(seriesArr) console.log(xAxisData) option = { @@ -660,15 +630,30 @@ trigger: 'axis', axisPointer: { type: 'shadow' + }, + formatter: params => { + var res = `${params[0].name} <br/>` + for (const item of params) { + if (item.value !== 0) { + res += `<span style="background: ${item.color}; height:10px; width: 10px; border-radius: 50%;display: inline-block;margin-right:10px;"></span> ${item.seriesName} 锛�${item.value}<br/>` + } + } + return res } }, - yAxis: { - type: 'value' - }, - xAxis: { - type: 'category', - data: xAxisData - }, + xAxis: [ + { + type: 'category', + position: 'bottom', + data: xAxisData + } + ], + yAxis: [ + { + type: 'value', + data: Array.from({ length: 100 }, (_, i) => i + 1) + } + ], series: seriesArr }; @@ -870,6 +855,28 @@ .xm_chat_row { width: 49%; height: 300px; + position: relative; + .xm_chat_row_info { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + span { + &:nth-child(1) { + font-size: 20px; + color: #222222; + } + &:nth-child(2) { + font-size: 28px; + color: #222222; + font-weight: bold; + } + } + } #chat1 { width: 100%; height: 260px; -- Gitblit v1.9.3