123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564 |
- <template>
- <div class="main-data dialog-property-area" @click.stop="preventDefault" @mouseleave="leaveFun">
- <div class="dialog-title">
- <img
- src="@/assets/images/main/cont_title_bg.png"
- />
- <div class="title">物业服务</div>
- </div>
- <div class="dialog-cont">
- <div class="dialog-left">
- <div class="dialog-list">
- <div class="dialog-item wid100">
- <div class="content-title">
- <span class="title">数据概况(近三月)</span>
- </div>
- <div class="data-chart">
- <div class="data-content">
- <div class="data-item mar">
- <div class="data">
- <div>{{faultWarrantyNum.value}}</div>
- <div class="unit">个</div>
- </div>
- <div class="name">{{ faultWarrantyNum.name }}</div>
- </div>
- <div class="data-item mar">
- <div class="data">
- <div>{{dispatchedNum.value}}</div>
- <div class="unit">个</div>
- </div>
- <div class="name">{{ dispatchedNum.name }}</div>
- </div>
- <div class="data-item mar">
- <div class="data">
- <div>{{suggestedNum.value}}</div>
- <div class="unit">个</div>
- </div>
- <div class="name">{{ suggestedNum.name }}</div>
- </div>
- <div class="data-item mar">
- <div class="data">
- <div>{{repairOrdersNum.value}}</div>
- <div class="unit">个</div>
- </div>
- <div class="name">{{ repairOrdersNum.name }}</div>
- </div>
- <div class="data-item mar">
- <div class="data">
- <div>{{questionnairesNum.value}}</div>
- <div class="unit">个</div>
- </div>
- <div class="name">{{ questionnairesNum.name }}</div>
- </div>
- <!-- <div class="data-item mar">
- <div class="data">
- <div>{{carlicense.value}}</div>
- <div class="unit">个</div>
- </div>
- <div class="name">{{ carlicense.name }}</div>
- </div> -->
- </div>
- </div>
- </div>
- </div>
- <div class="dialog-list">
- <div class="dialog-item wid100">
- <div class="content-title">
- <span class="title">近一个月报修分类占比</span>
- </div>
- <div class="data-chart">
- <pie-chart
- :chart-data="pieData"
- :legend="pieLegend"
- :title="pieTitle"
- :labelShow="true"
- :labelLine="true"
- :center="pieCenter"
- width="515px"
- height="180px"
- />
- </div>
- </div>
- </div>
- <div class="dialog-list">
- <div class="dialog-item wid100">
- <div class="content-title">
- <span class="title">近六个月报修分类</span>
- </div>
- <div class="data-chart">
- <bar-chart
- :chart-data="barData"
- :x-axis="barAxis"
- :y-axis="barYaxis"
- :grid="barGrid"
- :legend="barLegend"
- y-color="#FFF"
- l-color="#FFF"
- width="500px"
- height="280px"
- />
- </div>
- </div>
- </div>
- <div class="dialog-list">
- <div class="dialog-item wid100">
- <div class="content-title">
- <span class="title">一周车流量统计</span>
- </div>
- <div class="data-chart">
- <bar-chart
- :chart-data="carFlowBarData"
- :x-axis="carFlowBarAxis"
- :y-axis="carFlowBarYaxis"
- y-color="#FFF"
- l-color="#FFF"
- width="515px"
- height="180px"
- />
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
- import PieChart from "@/components/Echarts/PieChart";
- import BarChart from "@/components/Echarts/BarChart.vue";
- import {
- getPostOverviewData,
- getPastMonthPieData,
- getPastSixMonthChartsData, getCarFlowData,
- } from "@/api/screen/service";
- export default {
- name: "PropertyDialog",
- components: {
- BarChart,
- PieChart,
- },
- props: {
- appOrg: {
- type: String,
- default: "0000",
- },
- },
- data() {
- return {
- //数据概况
- faultWarrantyNum: {},
- dispatchedNum: {},
- suggestedNum: {},
- repairOrdersNum: {},
- carlicense: {},
- questionnairesNum: {},
- //近一个月报修占比
- pieData: [],
- pieLegend: {
- top: 10,
- orient: "vertical",
- right: 0,
- itemWidth: 8, // 设置图例标记的宽度
- itemHeight: 8, // 设置图例标记的高度
- textStyle: {
- color: "#FFF",
- },
- },
- pieTitle: {},
- pieCenter: ["30%", "50%"],
- //近六个月报修订单分类
- barData: [],
- barAxis: {},
- barYaxis: {
- type: "value",
- boundaryGap: [0, 0.01],
- name: '单位:个',
- nameTextStyle: {
- color: '#fff',
- },
- axisLine:{
- show:false
- },
- axisLabel: {
- color: "white", // 设置横坐标轴字体颜色为红色
- },
- splitLine: {
- show: false,
- },
- axisTick: {
- show: false,
- },
- splitArea:false
- },
- barGrid: {
- top: 30,
- bottom: 50,
- left: "2%",
- right: "2%",
- containLabel: true,
- },
- barLegend: {
- left: 20,
- bottom: 0,
- itemWidth: 8, // 设置图例标记的宽度
- itemHeight: 8, // 设置图例标记的高度
- textStyle: {
- color: "#FFF",
- },
- },
- //一周车流量统计
- carFlowBarData: [],
- carFlowBarAxis: {},
- carFlowBarYaxis: {
- type: "value",
- boundaryGap: [0, 0.01],
- name: '单位:辆',
- nameTextStyle: {
- color: '#fff',
- },
- axisLine:{
- show:false
- },
- axisLabel: {
- color: "white", // 设置横坐标轴字体颜色为红色
- },
- splitLine: {
- show: false,
- },
- axisTick: {
- show: false,
- },
- splitArea:false
- },
- };
- },
- created() {
- //数据概况
- this.getPostOverviewData();
- //近一个月报修分类占比
- this.getPastMonthPieData();
- //近六个月报修订单分类
- this.getPastSixMonthChartsData();
- //一周车流量统计
- this.getCarFlowData();
- },
- destroyed() {},
- beforeDestroy() {},
- mounted() {},
- methods: {
- //获取数据概况
- getPostOverviewData() {
- getPostOverviewData(this.$props.appOrg).then((res) => {
- if (Number(res.code) === 200) {
- this.faultWarrantyNum = res.data.faultWarrantyNum
- this.dispatchedNum = res.data.dispatchedNum
- this.suggestedNum = res.data.suggestedNum
- this.repairOrdersNum = res.data.repairOrdersNum
- this.questionnairesNum = res.data.questionnairesNum
- this.carlicense = res.data.carlicense
- }
- });
- },
- //近一个月报修分类占比
- getPastMonthPieData() {
- getPastMonthPieData(this.$props.appOrg).then((res) => {
- if (Number(res.code) === 200) {
- this.pieData = res.data;
- }
- });
- },
- //近六个月报修订单分类
- getPastSixMonthChartsData() {
- getPastSixMonthChartsData(this.$props.appOrg).then((res) => {
- if (Number(res.code) === 200) {
- let list = [
- "seNum",
- "arNum",
- "otNum",
- "ofNum",
- "meNum",
- "laNum",
- "diNum",
- "colNum",
- "toNum",
- "elevatorNum",
- ];
- for (let index = 0; index < list.length; index++) {
- this.barData.push({
- name: res.data[list[index]].name,
- type: "bar",
- stack: "a",
- itemStyle: {
- color: res.data[list[index]].color,
- },
- barWidth: 30,
- data: res.data[list[index]].dataList,
- });
- }
- this.barAxis = {
- type: "category",
- data: res.data.xList,
- axisLabel: {
- color: "white", // 设置横坐标轴字体颜色为红色
- },
- axisTick: {
- show: false,
- },
- axisLine: {
- lineStyle: {
- color: "#0A7C80",
- },
- },
- };
- }
- });
- },
- //电子餐券
- getCarFlowData() {
- getCarFlowData(this.$props.appOrg).then((res) => {
- if (Number(res.code) === 200) {
- this.carFlowBarData = [
- {
- name: "",
- type: "bar",
- stack: "a",
- itemStyle: {
- color: res.data.yData.color,
- //barBorderRadius: [5, 5, 0, 0], // 统一设置四个角的圆角大小
- },
- barWidth: 30,
- data: res.data.yData.yList,
- },
- ];
- this.carFlowBarAxis = {
- type: "category",
- data: res.data.xList,
- axisLabel: {
- color: "white", // 设置横坐标轴字体颜色为红色
- rotate: 16,
- interval: 0
- },
- axisTick: {
- show: false,
- },
- axisLine: {
- lineStyle: {
- color: "#465A64",
- },
- },
- };
- }
- });
- },
- //鼠标移出
- leaveFun(){
- setTimeout(()=>{
- this.$emit("closeDialog")
- },200)
- },
- preventDefault() {
- console.log(11);
- },
- },
- };
- </script>
- <style lang="scss">
- .dialog-property-area {
- overflow: hidden;
- width: 580px;
- height:1000px;
- background: url("../../../assets/images/main/main_bg.png") no-repeat;
- background-size: 100% 100%;
- padding: 19px 15px 11px 15px;
- .dialog-title {
- display: flex;
- flex-direction: row;
- align-items: center;
- justify-content: center;
- position: relative;
- margin-bottom: 10px;
- img {
- width: 284px;
- height: 32px;
- }
- .title {
- font-size: 20px;
- font-weight: 900;
- font-family: "PingFangSC";
- width: 100%;
- position: absolute;
- display: flex;
- align-items: center;
- justify-content: center;
- top: -5px;
- color: #fff;
- }
- }
- .dialog-cont {
- width:100%;
- height: 920px;
- padding: 15px;
- overflow-y: scroll;
- background: url("../../../assets/images/main/components_long_bg.png") no-repeat;
- background-size: 100% 100%;
- .dialog-left{
- width: 520px;
- float: left;
- }
- .dialog-right{
- width: 520px;
- float: right;
- }
- }
- .dialog-list{
- width: 100%;
- display: flex;
- justify-content: space-between !important;
- margin-bottom:20px;
- .dialog-item{
- width: calc(50% - 20px);
- }
- .dialog-item-cont{
- display: flex;
- justify-content: center;
- align-items: center;
- margin-top:40px;
- }
- .wid100{
- width:100%;
- .content-title{
- width:100%;
- background: url("../../../assets/images/main/title_pro_long.png") no-repeat;
- }
- }
- }
- .content-title {
- width: 100%;
- height: 26px;
- background: url("../../../assets/images/main/title_pro.png") no-repeat;
- background-size: 100% 100%;
- font-family: "PingFangSC";
- font-size: 16px;
- font-weight: bold;
- color: #00ffff;
- padding-left: 25px;
- .title {
- display: block;
- position: relative;
- top:-5px;
- }
- }
- .tips{
- width: 12px;
- height: 12px;
- /* margin: 0 0 -4px 10px; */
- position: relative;
- top: -7px;
- left: 1px;
- }
- .data-chart {
- margin-top: 15px !important;
- margin-bottom: 5px !important;
- }
- .data-content{
- display: flex;
- justify-content: space-between;
- align-items: center;
- overflow: visible;
- padding-top:15px;
- .mar{
- margin-bottom: 15px;
- }
- .wid{
- width: 65px;
- }
- .data-item{
- width: 65px;
- height: 65px;
- background: url("../../../assets/images/service_new/img_5.png") no-repeat;
- background-size: 100% 100%;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- overflow: visible;
- .data{
- width: auto;
- font-size: 24px;
- color:#00FFFF;
- font-family: 'electronicFont';
- position: relative;
- top: -15px;
- display: flex;
- align-items: center;
- .unit{
- font-size:13px;
- color:#00FFFF;
- font-weight: 500;
- position: relative;
- top: 5px;
- left:2px;
- }
- }
- .name{
- font-size: 14px;
- color:#FFFFFF;
- position: relative;
- top: 16px;
- font-family: "fashionZh";
- }
- }
- }
- ::-webkit-scrollbar {
- display: none;
- width: 3px;
- height: 3px;
- }
- ::-webkit-scrollbar-thumb {
- //滑块部分
- // border-radius: 5px;
- background-color: #58cbbb;
- }
- ::-webkit-scrollbar-track {
- //轨道部分
- // box-shadow: inset 0 0 5px #ddd;
- background: #ddd;
- // border-radius: 5px;
- }
- }
- </style>
|