From 77946261ec663aa1fe7f6f97e550532ed879f982 Mon Sep 17 00:00:00 2001 From: jiangping <jp@doumee.com> Date: 星期五, 06 六月 2025 13:47:46 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/2.0.1' into 2.0.1 --- admin/src/views/project/components/houseDetails.vue | 273 ++++++++++++++++++++++-------------------------------- 1 files changed, 112 insertions(+), 161 deletions(-) diff --git a/admin/src/views/project/components/houseDetails.vue b/admin/src/views/project/components/houseDetails.vue index 394d64a..d3c18b0 100644 --- a/admin/src/views/project/components/houseDetails.vue +++ b/admin/src/views/project/components/houseDetails.vue @@ -6,10 +6,10 @@ width="100%"> <div class="right"> <div class="right_head"> - <span>{{info.roomNum}}</span> - <el-tag type="success" v-if="info.leaseStatus === 0">寰呯璧�</el-tag> - <el-tag type="success" v-if="info.leaseStatus === 1">宸茬璧�</el-tag> - <el-tag type="success" v-if="info.leaseStatus === 2">鏈紑鍚璧�</el-tag> + <span class="right_head_title">{{info.roomNum}}</span> + <el-tag type="info" v-if="info.leaseStatus == 0">寰呯璧�</el-tag> + <el-tag type="success" v-if="info.leaseStatus == 1">宸茬璧�</el-tag> + <el-tag type="info" v-if="info.leaseStatus == 2">鏈紑鍚璧�</el-tag> </div> <div class="right_cate"> <el-tabs v-model="activeName" @tab-click="handleClick"> @@ -64,9 +64,6 @@ <el-tab-pane label="绉熷鍚堝悓" name="project"> <div class="xm"> <el-card style="margin-top: 20px;"> - <div slot="header" class="clearfix"> - <span>褰撳墠鍦ㄧ鍚堝悓</span> - </div> <div class="xm_table"> <div style="width: 100%; display: flex; align-items: center; margin-bottom: 15px;"> <el-input v-model="form.code" style="width: 300px;" placeholder="璇疯緭鍏ュ悎鍚岀紪鍙�"></el-input> @@ -80,13 +77,17 @@ <el-table-column label="鍚堝悓缂栧彿"> <template slot-scope="{row}"> - <el-button type="text" @click="$refs.ContractDetailRef.open('鍚堝悓璇︽儏', row.id)" v-if="row.status === 1">{{row.code}}</el-button> - <el-button type="text" v-else>{{row.code}}</el-button> + <el-button type="text" @click="$refs.ContractDetailRef.open('鍚堝悓璇︽儏', row.id)">{{row.code}}</el-button> </template> </el-table-column> <el-table-column - prop="renterName" label="瀹㈡埛鍚嶇О"> + <template slot-scope="{row}"> + <div style="display: flex; align-items: center;"> + {{row.renterName}} + <el-tag type="success" v-if="[1,2,3].includes(row.status)">褰撳墠绉熸埛</el-tag> + </div> + </template> </el-table-column> <el-table-column prop="startDate" @@ -114,10 +115,6 @@ <el-table-column prop="signDate" label="绛捐鏃�"> - </el-table-column> - <el-table-column - prop="address" - label="鍚堝悓鏉ユ簮"> </el-table-column> <el-table-column label="鍚堝悓鐘舵��"> @@ -177,14 +174,15 @@ value: 'id', children: 'childCategoryList' }" /> - <el-select v-model="form.status" style="width: 150px; margin-right: 15px;" placeholder="宸ュ崟鐘舵��"> - <el-option label="鍚敤" :value="0"></el-option> - <el-option label="绂佺敤" :value="1"></el-option> + <el-select v-model="form.dealStatus" style="width: 150px; margin-right: 15px;" placeholder="宸ュ崟鐘舵��"> + <el-option label="寰呮寚娲�" :value="0"></el-option> + <el-option label="宸叉寚娲�" :value="1"></el-option> + <el-option label="宸插鐞�" :value="2"></el-option> </el-select> <el-button type="primary" @click="getFetchList">鏌ヨ</el-button> <el-button @click="clear">娓呯┖</el-button> </div> - <el-button type="primary" @click="$refs.operaYwWorkorderWindow.open('鏂板缓宸ュ崟')">鏂板宸ュ崟</el-button> + <el-button type="primary" @click="addWorkOrder">鏂板宸ュ崟</el-button> </div> <el-table :data="tableData" @@ -248,10 +246,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;"> @@ -322,80 +324,6 @@ </el-card> </div> </el-tab-pane> - <el-tab-pane label="璧勪骇淇℃伅" name="fourth"> - <div class="xm"> - <el-card> - <div slot="header" class="clearfix"> - <span>璧勪骇娓呭崟</span> - </div> - <div class="xm_table"> - <div class="xm_table_search"> - <div class="xm_table_search_left"> - <el-input v-model="form.code" placeholder="璇疯緭鍏ヨ祫浜у悕绉�/缂栫爜" style="width: 200px; margin-right: 15px;"></el-input> - <el-select v-model="value" style="width: 200px; margin-right: 15px;" placeholder="璧勪骇鍒嗙被"> - <el-option - v-for="item in options" - :key="item.value" - :label="item.label" - :value="item.value"> - </el-option> - </el-select> - <el-button type="primary" @click="getPropertyLists">鏌ヨ</el-button> - <el-button @click="clear">娓呯┖</el-button> - </div> - <el-button type="primary" @click="$refs.newMaterial.open('鏂板缓鐗╂枡')">鏂板</el-button> - </div> - <el-table - :data="tableData" - border - v-loading="loading" - style="width: 100%"> - <el-table-column - prop="code" - label="璧勪骇缂栫爜"> - </el-table-column> - <el-table-column - prop="name" - label="璧勪骇鍚嶇О"> - </el-table-column> - <el-table-column - prop="qrcode" - label="鏉$爜"> - </el-table-column> - <el-table-column - prop="brand" - label="鍝佺墝"> - </el-table-column> - <el-table-column - prop="attr" - label="瑙勬牸鍨嬪彿"> - </el-table-column> - <el-table-column - prop="unitName" - label="鍗曚綅"> - </el-table-column> - <el-table-column - label="搴撳瓨鏁伴噺"> - <template v-slot="scope"> - <span>{{ scope.row.maxStock }} ~ {{ scope.row.minStock }}</span> - </template> - </el-table-column> - </el-table> - <div class="xm_table_f"> - <el-pagination - @size-change="handleSizeChange" - @current-change="handleCurrentChange" - :current-page="page" - :page-sizes="[10, 20, 30, 40]" - :page-size="pageTotal" - layout="total, sizes, prev, pager, next, jumper" - :total="total"> - </el-pagination> - </div> - </div> - </el-card> - </div> - </el-tab-pane> </el-tabs> </div> </div> @@ -448,18 +376,21 @@ areaIds: [], cateId: '', status: '', - name: '' + name: '', + dealStatus: '' }, cateList: [], categaryList: [], deviceList: [], showDetail: false, - showEdit1: false + showEdit1: false, + amount: 0 } }, methods: { open (title, id) { this.title = title + this.activeName = 'houseinfo' this.houseId = id detailById(id) .then(res => { @@ -470,7 +401,11 @@ handleEdit(row) { this.showEdit1 = true this.$nextTick(() => { + this.$refs.EditRef.param.projectId = this.info.projectId + 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) { @@ -481,6 +416,17 @@ this.$refs.DetailRef.getDetail() }) }, + addWorkOrder() { + this.$refs.operaYwWorkorderWindow.open('鏂板缓宸ュ崟', { + rooms: [this.info.projectId, this.info.buildingId, this.info.floor, this.info.id], + areaType: 0, + content: '', + projectId: this.info.projectId, + buildingId: this.info.buildingId, + floorId: this.info.floor, + roomId: this.info.id + }) + }, // 鑾峰彇璁惧鐘舵�� getDevice() { getDeviceStatus({ roomId: this.houseId }) @@ -488,9 +434,10 @@ this.$nextTick(() => { this.deviceList = [ { value: res.workAmount || 0, name: '姝e父' }, - { value: res.exceptionAmount || 0, name: '寮傚父' }, + { value: res.exceptionAmount || 0, name: '鎹熷潖' }, { value: res.errAmount || 0, name: '鎶ュ簾' } ] + this.amount = res.amount this.reand() }) }) @@ -562,6 +509,7 @@ this.form.status = '' this.form.areaIds = [] this.form.cateId = '' + this.form.dealStatus = '' this.form.name = '' if (this.propsName === 'project') { this.getTenantContract() @@ -590,7 +538,7 @@ page: 1, model: { roomId: this.houseId, - status: this.form.status, + dealStatus: this.form.dealStatus, cateId: this.form.cateId } }).then(res => { @@ -607,7 +555,7 @@ capacity: this.pageTotal, page: this.page, model: { - roomIds: [this.houseId], + roomId: this.houseId, code: this.form.code } }).then(res => { @@ -637,13 +585,7 @@ { name: '璁惧鐘舵��', type: 'pie', - radius: ['40%', '80%'], - label: { - show: true, - position: 'center', - fontWeight: 'bold', - fontSize: 22 - }, + radius: ['50%', '80%'], data: this.deviceList } ] @@ -654,53 +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 = { title: { text: '璁惧鏁伴噺鍒嗙被缁熻' @@ -715,15 +628,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 }; @@ -739,6 +667,7 @@ this.form.cateId = '' this.form.status = '' this.form.name = '' + this.form.dealStatus = '' this.propsName = tab._props.name if (tab._props.name === 'project') { this.getTenantContract() @@ -760,7 +689,7 @@ this.getTenantContract() } else if (this.propsName === 'second') { this.getFetchList() - } else if (tab._props.name === 'third') { + } else if (this.propsName === 'third') { this.getDevicePage() } else if (this.propsName === 'fourth') { this.getPropertyLists() @@ -772,7 +701,7 @@ this.getTenantContract() } else if (this.propsName === 'second') { this.getFetchList() - } else if (tab._props.name === 'third') { + } else if (tab.propsName === 'third') { this.getDevicePage() } else if (this.propsName === 'fourth') { this.getPropertyLists() @@ -791,7 +720,7 @@ width: 100%; padding: 20px; box-sizing: border-box; - span { + .right_head_title { font-size: 16px; font-weight: bold; color: black; @@ -924,6 +853,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