| | |
| | | <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> |
| | |
| | | <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 |
| | |
| | | <template slot-scope="{row}"> |
| | | <div style="display: flex; align-items: center;"> |
| | | {{row.renterName}} |
| | | <el-tag type="success" v-if="row.status === 1">当前租户</el-tag> |
| | | <el-tag type="success" v-if="[1,2,3].includes(row.status)">当前租户</el-tag> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <el-table-column |
| | | prop="signDate" |
| | | label="签订日"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="address" |
| | | label="合同来源"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="合同状态"> |
| | |
| | | <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;"> |
| | |
| | | categaryList: [], |
| | | deviceList: [], |
| | | showDetail: false, |
| | | showEdit1: false |
| | | showEdit1: false, |
| | | amount: 0 |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | 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) { |
| | |
| | | this.$refs.operaYwWorkorderWindow.open('新建工单', { |
| | | rooms: [this.info.projectId, this.info.buildingId, this.info.floor, this.info.id], |
| | | areaType: 0, |
| | | content: '' |
| | | content: '', |
| | | projectId: this.info.projectId, |
| | | buildingId: this.info.buildingId, |
| | | floorId: this.info.floor, |
| | | roomId: this.info.id |
| | | }) |
| | | }, |
| | | // 获取设备状态 |
| | |
| | | this.$nextTick(() => { |
| | | this.deviceList = [ |
| | | { value: res.workAmount || 0, name: '正常' }, |
| | | { value: res.exceptionAmount || 0, name: '异常' }, |
| | | { value: res.exceptionAmount || 0, name: '损坏' }, |
| | | { value: res.errAmount || 0, name: '报废' } |
| | | ] |
| | | this.amount = res.amount |
| | | this.reand() |
| | | }) |
| | | }) |
| | |
| | | page: 1, |
| | | model: { |
| | | roomId: this.houseId, |
| | | status: this.form.status, |
| | | dealStatus: this.form.dealStatus, |
| | | cateId: this.form.cateId |
| | | } |
| | | }).then(res => { |
| | |
| | | { |
| | | name: '设备状态', |
| | | type: 'pie', |
| | | radius: ['40%', '80%'], |
| | | label: { |
| | | show: true, |
| | | position: 'center', |
| | | fontWeight: 'bold', |
| | | fontSize: 22 |
| | | }, |
| | | radius: ['50%', '80%'], |
| | | data: this.deviceList |
| | | } |
| | | ] |
| | |
| | | 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: '设备数量分类统计' |
| | |
| | | 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 |
| | | }; |
| | | |
| | |
| | | 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() |
| | |
| | | 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() |
| | |
| | | .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; |