123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988 |
- <template>
- <div class="main-data unit-dialog-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">巡更次数统计(近6月)</span>
- </div>
- <div class="charts-cont">
- <bar-chart
- :chart-data="electricityAreaBarData"
- :x-axis="electricityAreaBarAxis"
- :yAxis="electricityAreaBarYaxis"
- y-color="#FFF"
- l-color="#FFF"
- width="515px"
- height="200px"
- />
- </div>
- </div>
- </div>
- <!-- 巡更及时率 -->
- <div class="dialog-list">
- <div class="dialog-item wid100">
- <div class="content-title">
- <span class="title">巡更及时率(近6月)</span>
- </div>
- <div class="content">
- <line-chart
- :chart-data="lineData"
- :x-axis="lineAxis"
- :yAxis="lineYAxis"
- :legend="lineLegend"
- y-color="#FFF"
- l-color="#FFF"
- width="515px"
- height="200px"
- />
- </div>
- </div>
- </div>
- <!-- 巡更点统计-->
- <div class="dialog-list">
- <div class="dialog-item wid100">
- <div class="content-title">
- <span class="title">巡更点统计</span>
- </div>
- <div class="tank">
- <div class="ocBox">
- <!-- 水箱 -->
- <div class="leftTank"></div>
- </div>
- <div class="ocBox">
- <div class="table-cont">
- <div class="table-top">
- <div class="flo">楼层</div>
- <div class="pot">点位数</div>
- </div>
- <div class="table-bot">
- <div class="table-list" v-for="(item,index) in floorDataList" :key="index">
- <div class="fir">{{item.floor}}</div>
- <div class="snd">{{item.number}}</div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
- import LineChart from "@/components/Echarts/LineChart";
- import PieChart from "@/components/Echarts/PieChart";
- import BarChart from "@/components/Echarts/BarChart.vue";
- import echarts from "echarts";
- import RaddarChart from "@/components/Echarts/RaddarChart.vue";
- import {frequency,patrol,patrolPoint} from "@/api/screen/service";
- export default {
- name: "UnitMonitorDialog",
- components: {
- RaddarChart,
- BarChart,
- PieChart,
- LineChart,
- },
- props: {
- monitorName:{
- type: String,
- default: ''
- },
- appOrg: {
- type: String,
- default: "0000",
- },
- },
- watch:{
- monitorName(newValue,oldValue){
- console.log(newValue, oldValue, "+++++")
- this.getMonitorList();
- },
- appOrg(){
- this.getMonitorList();
- this.handleUnitDataList();
- }
- },
- data() {
- return {
- //巡更次数
- electricityAreaBarData: [],
- electricityAreaBarAxis: {},
- electricityAreaBarYaxis: {
- type: "value",
- boundaryGap: [0, 0.01],
- name: '单位: 次',
- nameTextStyle: {
- color: '#fff',
- padding: [0,0,0,30]
- },
- axisLine:{
- lineStyle:{
- color:"#465A64"
- }
- },
- axisLabel: {
- color: "white", // 设置横坐标轴字体颜色为红色
- },
- splitLine: {
- show: false,
- },
- axisTick: {
- show: false,
- },
- splitArea:false
- },
- lineLegend: {
- top: 0,
- orient: "horizontal",
- right: 0,
- itemWidth: 17, // 设置图例标记的宽度
- itemHeight: 10, // 设置图例标记的高度
- textStyle: {
- color: "#FFF",
- },
- },
- //巡更及时率
- lineData: [],
- lineAxis: {},
- lineYAxis: {
- name: "单位: %",
- nameTextStyle: {
- color: "#fff",
- padding: [0, 0, 0, 30],
- },
- axisLabel: {
- color: "#FFF",
- },
- splitLine: {
- show: false,
- },
- axisLine: {
- show: false,
- },
- axisTick: {
- show: false,
- },
- splitArea: false,
- },
- cityNameList: ['长治市', '交城县', '晋中市', '岚县', '吕梁市', '平遥县', '寿阳县', '营销服务中心'],
- cityCodeList: ['changzhi', 'jiaocheng', 'jinzhong', 'lanxian', 'lvliang', 'pingyao', 'shouyang', 'yingxiao'],
- raddarData: [
- {
- name: '',
- type: 'radar',
- data: [
- {
- value: [10, 20, 30, 40, 50, 60],
- areaStyle: {
- color: '#43DCDB'
- }
- }
- ]
- },
- ],
-
- //巡更点统计
- floorDataList: [],
- };
- },
- created() {
- //巡更次数统计(近6月)
- this.frequency();
- //巡更点统计
- this.patrolPoint();
- this.patrol();
-
- this.handleUnitDataList();
- },
- destroyed() {},
- beforeDestroy() {},
- mounted() {},
- methods: {
- //巡更次数统计(近6月)
- frequency() {
- frequency(this.$props.appOrg).then((res) => {
- if (Number(res.code) === 200) {
- this.electricityAreaBarAxis = {
- type: "category",
- data: res.data.xList,
- axisLabel: {
- color: "white", // 设置横坐标轴字体颜色为红色
- rotate: 0,
- interval: 0
- },
- axisLine: {
- show: true
- },
- axisTick: {
- show: false,
- },
- splitArea: false
- };
- this.electricityAreaBarData = [
- {
- data: res.data.yList,
- type: "bar",
- barWidth: 30,
- itemStyle: {
- color: {
- type: 'linear',
- x: 0, //右
- y: 0, //下
- x2: 0, //左
- y2: 1, //上
- colorStops: [
- {
- offset: 0,
- color: '#FCE0BB' // 0% 处的颜色
- },
- {
- offset: 1,
- color: '#D47F1C' // 100% 处的颜色
- }
- ]
- }
- },
- },
- ];
- } else {
- //构造默认数据
- }
- });
- },
- // 巡更点统计
- patrolPoint() {
- patrolPoint(this.$props.appOrg).then((res) => {
- if (Number(res.code) === 200) {
- this.floorDataList=res.data;
- }
- });
- },
- // 巡更及时率
- patrol() {
- patrol(this.$props.appOrg).then((res) => {
- if (Number(res.code) === 200) {
- (this.lineData = [
- {
- name: "巡更及时率",
- type: "line",
- symbol: "none",
- areaStyle: {
- opacity: 0.8,
- color: new echarts.graphic.LinearGradient(0, 5, 15, 20, [
- {
- offset: 0.95,
- color: "#645727",
- },
- {
- offset: 0.98,
- color: "rgba(23, 240, 240, 0)",
- },
- ]),
- },
- lineStyle: {
- width: 2, // 设置线宽
- color: "#D67C15", // 设置线的颜色
- },
- smooth: true,
- data: res.data.patrolArray,
- },
- ]),
- (this.lineAxis = {
- type: "category",
- data: res.data.monthArray,
- axisLabel: {
- color: "white", // 设置横坐标轴字体颜色为红色
- },
- axisTick: {
- show: false,
- },
- axisLine: {
- lineStyle: {
- color: "#465A64",
- },
- },
- boundaryGap: false,
- });
- }
- });
- },
-
- //初始化
- handleUnitDataList() {
- let unitDataList = [];
- unitDataList.push({
- name: "国网太原供电公司",
- num: 10,
- });
- unitDataList.push({
- name: "国网运城供电公司",
- num: 8,
- });
- unitDataList.push({
- name: "国网临汾供电公司",
- num: 7,
- });
- unitDataList.push({
- name: "国网晋城供电公司",
- num: 6,
- });
- unitDataList.push({
- name: "国网吕梁供电公司",
- num: 4,
- });
- unitDataList.push({
- name: "国网大同供电公司",
- num: 4,
- });
- this.unitDataList = unitDataList;
- },
- //鼠标移出
- leaveFun(){
- setTimeout(()=>{
- this.$emit("closeDialog")
- },200)
- },
- preventDefault() {
- console.log(11)
- },
-
-
- },
- };
- </script>
- <style lang="scss">
- .unit-dialog-area {
- overflow: hidden;
- width: 580px;
- height:920px;
- background: url("../../../assets/images/main/main_bg.png") no-repeat;
- background-size: cover;
- 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: 850px;
- padding: 15px;
- overflow-y: scroll;
- background: url("../../../assets/images/main/components_long_bg.png") no-repeat;
- background-size: cover;
- .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;
- }
- }
- .content {
- margin-top: 20px;
- .title-format {
- display: flex;
- flex-direction: row;
- align-items: center;
- img {
- width: 6px;
- height: 24px;
- margin-right: 6px;
- }
- .title-info {
- display: flex;
- flex-direction: column;
- font-size: 12px;
- color: #ffffff;
- .title-en {
- font-size: 8px;
- color: #ffffff;
- opacity: 0.4;
- }
- }
- }
- .total-data {
- display: flex;
- align-items: baseline;
- color: #19fcde;
- margin-top: 4px;
- .total {
- font-size: 40px;
- font-family: 'electronicFont';
- }
- .unit {
- font-size: 12px;
- }
- }
- .data-content{
- display: flex;
- flex-direction: row;
- align-items: center;
- flex-wrap: wrap;
- .data-item{
- position: relative;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- margin-right: 24px;
- img{
- width: 89px;
- height: 82px;
- }
- .desc{
- font-size: 14px;
- color: #FFFFFF;
- margin-top: 7px;
- opacity: 0.4;
- }
- .data{
- position: absolute;
- top:20px;
- left:0;
- width: 89px;
- font-size: 30px;
- display: flex;
- align-items: center;
- justify-content: center;
- color:#19fcde;
- font-family: 'electronicFont';
- }
- }
- .data-item:nth-child(2n){
- margin-right: 0;
- }
- }
- .data-list {
- display: flex;
- flex: 1;
- flex-direction: row;
- align-items: center;
- justify-content: space-between;
- .data-item {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- flex: 1;
- border-right: 1px solid rgba(25, 252, 222, 0.2);
- .data-detail {
- display: flex;
- flex-direction: row;
- align-items: baseline;
- color: #00ffff;
- margin-top: 11px;
- font-size: 12px;
- .data {
- font-size: 30px;
- font-family: 'electronicFont';
- }
- }
- }
- .data-item:last-child {
- border-right: none;
- }
- }
- .rate-area{
- position: relative;
- img{
- width: 198px;
- height: 114px;
- }
- .rate{
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- width: 100%;
- position: absolute;
- top: 0;
- left: 0;
- color: #FFF;
- .rate-data{
- display: flex;
- flex-direction: row;
- align-items: baseline;
- color: #FFBA44;
- .data{
- font-family: 'electronicFont';
- font-size: 30px;
- }
- .unit{
- font-size: 12px;
- }
- }
- .desc{
- font-size: 12px;
- width: 58px;
- text-align: center;
- }
- }
- }
- }
- .tank{
- display: flex;
- height: 245px;
- .ocBox{
- width: 50%;
- .leftTank{
- height: 260px;
- background: url("../../../assets/images/building_guarantee/xpsota.png") no-repeat;
- margin: 10px 10px 10px 10px;
- }
- .table-cont{
- width:100%;
- .table-top{
- width:100%;
- height: 50px;
- background-color: #092B2C;
- padding:0 25px 0 10px;
- display: flex;
- justify-content: space-between;
- align-items: center;
- font-size:18px;
- color:#00FFFF;
- }
- .table-bot{
- width:100%;
- height: 165px;
- overflow: scroll;
- .table-list{
- width:100%;
- height:40px;
- padding:15px 25px 15px 0px;
- display: flex;
- justify-content: space-between;
- align-items: center;
- font-size:16px;
- color:#FFFFFF;
- font-weight: 500;
- //border: 1px dotted #14302F;
- }
- }
- .flo{
- width:50%;
- text-align: center;
- }
- .pot{
- width:50%;
- text-align: center;
- }
- .fir{
- width:50%;
- text-align: center;
- border-left: 1px solid #40E5F2;
- }
- .snd{
- width:50%;
- text-align: center;
- }
- // .color{
- // color:#FF8C00;
- // }
- }
- }
- }
- .other-cont{
- display: flex;
- .icon{
- display: block;
- width:70px;
- height:auto;
- }
- .other-info{
- padding-left:2px;
- .desc{
- font-size:12px;
- color:#FFFFFF;
- font-weight: bold;
- }
- .num-info{
- width:100%;
- padding-top:2px;
- display: flex;
- align-items: center;
- .num{
- font-size:30px;
- color:#19FCDE;
- font-weight: bold;
- font-family: "electronicFont";
- }
- .unit{
- font-size:12px;
- color:#00FFFF;
- font-weight: 500;
- position: relative;
- top:4px;
- }
- .mar{
- margin-left: 20px;
- }
- }
- }
- }
- .use-energy{
- width:100%;
- padding:0 15px;
- .use-energy-fir{
- width:100%;
- display: flex;
- align-items: center;
- font-size:14px;
- color:#FFFFFF;
- font-weight: 500;
- .num{
- font-weight: 900;
- color:#00FFFF;
- padding:0 8px;
- }
- }
- .use-energy-snd{
- width:100%;
- margin-top:15px;
- display: flex;
- align-items: center;
- .use-energy-snd-list{
- display: flex;
- align-items: center;
- .icon{
- display: block;
- width:34px;
- height: 34px;
- }
- .use-energy-snd-info{
- padding-left: 4px;
- .desc{
- font-size: 12px;
- color:#FFFFFF;
- }
- .num-info{
- display: flex;
- align-items: center;
- .num{
- font-size: 24px;
- color: #19FCDE;
- font-weight: bold;
- font-family: "electronicFont";
- }
- .unit{
- font-size:12px;
- color:#00FFFF;
- font-weight: 500;
- position: relative;
- top:4px;
- left:2px;
- }
- }
- }
- }
- .use-energy-snd-list:last-child{
- margin-left: 36px;
- }
- }
- }
- .circle-cont{
- width:100%;
- display: flex;
- flex-wrap: wrap;
- padding:0 15px;
- .circle-list {
- width:80px;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- margin-bottom: 10px;
- .name{
- font-size:12px;
- color:#FFFFFF;
- font-weight: 500;
- padding-top:6px;
- width:100%;
- overflow:hidden;
- text-align: center;
- white-space: nowrap;
- }
- }
- .el-progress__text{
- font-size:12px !important;
- color:#fff !important;
- }
- }
- .charts-cont{
- width:100%;
- padding-top:10px;
- }
- .data-chart {
- margin-top: 12px !important;
- margin-bottom: 10px !important;
- }
- .tab-cont {
- width: 100%;
- display: flex;
- align-items: center;
- padding-left: 15px;
- padding-bottom: 15px;
- .tab-list {
- width: 127px;
- height: 30px;
- background: url("../../../assets/images/building_guarantee/img_2.png")
- no-repeat;
- background-size: 100% 100%;
- font-family: "PingFangSC";
- font-size: 14px;
- font-weight: 500;
- color: #00ffff;
- padding-left: 15px;
- line-height: 30px;
- }
- .tab-list:last-child {
- margin-left: 20px;
- }
- }
- .camera-cont.pad{
- padding:20px 0 0 0;
- }
- .camera-cont{
- width:100%;
- padding:5px 0 25px 0;
- display: flex;
- justify-content: space-between;
- align-items: center;
- .camera-item{
- width: 139px;
- height: 80px;
- .camera-num{
- display: flex;
- justify-content: center;
- align-items: center;
- .num{
- font-size: 30px;
- color: #19FCDE;
- font-weight: bold;
- font-family: "electronicFont";
- padding-left:4px;
- }
- .unit{
- font-size: 12px;
- color: #00ffff;
- font-weight: 500;
- position: relative;
- top:6px;
- }
- }
- }
- .fir-bg{
- background: url("../../../assets/images/building_guarantee/img_5.png") no-repeat;
- background-size: 100% 100%;
- }
- .snd-bg{
- background: url("../../../assets/images/building_guarantee/img_6.png") no-repeat;
- background-size: 100% 100%;
- }
- }
- .monitor-cont{
- width:100%;
- display: flex;
- flex-wrap: wrap;
- padding:0 15px;
- .monitor-list{
- width:151px;
- position: relative;
- margin:0 10px 10px 0;
- .img{
- display: block;
- width:151px;
- height:104px;
- }
- .monitor-info{
- position: absolute;
- left:0;
- bottom: 0;
- width: 100%;
- height: 25px;
- opacity: 0.55;
- background: #000000;
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 0 8px;
- .name{
- font-size: 12px;
- color: #FFFFFF;
- font-weight: 500;
- }
- .online{
- font-size: 12px;
- color: #00F6EC;
- font-weight: 500;
- }
- .offline{
- font-size: 12px;
- color: #F60000;
- font-weight: 500;
- }
- }
- }
- .monitor-list:nth-child(3n){
- margin-right: 0;
- }
- }
- ::-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>
|