From b5e2e236828b7fbc0e8f2bdbf66651ad8907e3b1 Mon Sep 17 00:00:00 2001 From: heyujie <516346543@qq.com> Date: 星期三, 21 七月 2021 16:40:17 +0800 Subject: [PATCH] all --- src/pages/shuohuangMonitorAnalyze/components/guideIndex.vue | 1280 ++++++++++++++++++++++++++++++++++----------------------- 1 files changed, 754 insertions(+), 526 deletions(-) diff --git a/src/pages/shuohuangMonitorAnalyze/components/guideIndex.vue b/src/pages/shuohuangMonitorAnalyze/components/guideIndex.vue index 47156be..7e1fe8b 100644 --- a/src/pages/shuohuangMonitorAnalyze/components/guideIndex.vue +++ b/src/pages/shuohuangMonitorAnalyze/components/guideIndex.vue @@ -4,7 +4,7 @@ <el-tab-pane label="鏁版嵁缁熻鍒嗘瀽" name="dataStatistic"></el-tab-pane> <el-tab-pane label="浠诲姟缁熻鍒嗘瀽" name="taskStatistic"></el-tab-pane> </el-tabs> - <div class="tab-content" v-if="actCardTab=='dataStatistic'"> + <div class="tab-content" v-if="actCardTab == 'dataStatistic'"> <div class="card-view"> <el-card> <div class="title"> @@ -39,9 +39,12 @@ <i class="el-icon-warning-outline"></i> </span> </div> - <div class="val">{{$numberFormat(735)}}</div> + <div class="val">{{ $numberFormat(735) }}</div> <div class="trend"> - <line-chart :options="optionsOfWeekAnalyze" style="height:50px"></line-chart> + <line-chart + :options="optionsOfWeekAnalyze" + style="height: 50px" + ></line-chart> </div> <div class="devide"></div> <div class="detail"> @@ -56,9 +59,9 @@ <i class="el-icon-warning-outline"></i> </span> </div> - <div class="val">{{$numberFormat(1025)}}</div> + <div class="val">{{ $numberFormat(1025) }}</div> <div class="trend"> - <Bar :options="optionsOfTransferSumBar" style="height: 70px;"></Bar> + <Bar :options="optionsOfTransferSumBar" style="height: 70px"></Bar> </div> <div class="devide"></div> <div class="detail"> @@ -102,81 +105,105 @@ <div class="part"> <div class="part-top"> <div class="header-width-tab"> - <el-tabs class="tab-menu" v-model="actHiddanderTab" @tab-click="initTabContent"> - <el-tab-pane label="闅愭偅浜嬩欢缁熻" name="hidDanderStatistic"></el-tab-pane> - <el-tab-pane label="闅愭偅浜嬩欢瓒嬪娍" name="hidDanderTrend"></el-tab-pane> - </el-tabs> - <div class="rt"> - <time-shortcut actPicker="today" @actPickerChange="timeShortChange"></time-shortcut> - <el-date-picker - v-model="searchHidDanderTime" - type="datetimerange" - size="small" - range-separator="鑷�" - start-placeholder="寮�濮嬫棩鏈�" - end-placeholder="缁撴潫鏃ユ湡" - align="right" - ></el-date-picker> + <el-tabs + class="tab-menu" + v-model="actHiddanderTab" + @tab-click="initTabContent" + > + <el-tab-pane + label="闅愭偅浜嬩欢缁熻" + name="hidDanderStatistic" + ></el-tab-pane> + <el-tab-pane + label="闅愭偅浜嬩欢瓒嬪娍" + name="hidDanderTrend" + ></el-tab-pane> + </el-tabs> + <div class="rt"> + <time-shortcut + @actPickerChange="timeShortChange" + ></time-shortcut> + <el-date-picker + v-model="searchHidDanderTime" + type="datetimerange" + value-format="yyyy-MM-dd HH:mm:ss" + size="small" + range-separator="鑷�" + start-placeholder="寮�濮嬫棩鏈�" + end-placeholder="缁撴潫鏃ユ湡" + align="right" + ></el-date-picker> + </div> </div> - </div> - <div class="statics"> - <div class="lt"> - <template v-if="actHiddanderTab == 'hidDanderStatistic'"> - <el-radio-group v-model="actHidDanderStatiscChart" size="mini"> - <el-radio-button label="bar">鏌辩姸鍥�</el-radio-button> - <el-radio-button label="pie">楗煎浘</el-radio-button> - </el-radio-group> - <Bar - :options="optionsOfHidDangerBar" - v-if="actHidDanderStatiscChart=='bar'" - ></Bar> - <Pie - :options="optionsOfHidDangerPie" - v-if="actHidDanderStatiscChart=='pie'" - ></Pie> - </template> - <template v-if="actHiddanderTab == 'hidDanderTrend'"> - <el-radio-group v-model="actHidDanderTrendChart" size="mini"> - <el-radio-button label="line">鎶樼嚎鍥�</el-radio-button> - <el-radio-button label="pie">楗煎浘</el-radio-button> - </el-radio-group> - <line-chart - :options="optionsOfHidDangerTrend" - v-if="actHidDanderTrendChart=='line'" - style="height:350px" - ></line-chart> - <Pie - :options="optionsOfHidDangerTrendPie" - v-if="actHidDanderTrendChart=='pie'" - ></Pie> - </template> - </div> - <div class="rt"> - <div class="header"> - <span class="title">閮ㄩ棬闅愭偅鏁伴噺鎺掑悕</span> - <!-- <el-select v-if="actHiddanderTab=='hidDanderStatistic'" size="small"> + <div class="statics"> + <div class="lt"> + <template v-if="actHiddanderTab == 'hidDanderStatistic'"> + <el-radio-group v-model="actHidDanderStatiscChart" size="mini"> + <el-radio-button label="bar">鏌辩姸鍥�</el-radio-button> + <el-radio-button label="pie">楗煎浘</el-radio-button> + </el-radio-group> + <Bar ref="HidDangerBar" + :options="optionsOfHidDangerBar" + v-if="actHidDanderStatiscChart == 'bar'" + ></Bar> + <Pie + :options="optionsOfHidDangerPie" + v-if="actHidDanderStatiscChart == 'pie'" + ></Pie> + </template> + <template v-if="actHiddanderTab == 'hidDanderTrend'"> + <el-radio-group v-model="actHidDanderTrendChart" size="mini"> + <el-radio-button label="line">鎶樼嚎鍥�</el-radio-button> + <el-radio-button label="pie">楗煎浘</el-radio-button> + </el-radio-group> + <line-chart + :options="optionsOfHidDangerTrend" + v-if="actHidDanderTrendChart == 'line'" + style="height: 350px" + ></line-chart> + <Pie + :options="optionsOfHidDangerTrendPie" + v-if="actHidDanderTrendChart == 'pie'" + ></Pie> + </template> + </div> + <div class="rt"> + <div class="header"> + <span class="title">閮ㄩ棬闅愭偅鏁伴噺鎺掑悕</span> + <!-- <el-select v-if="actHiddanderTab=='hidDanderStatistic'" size="small"> <el-option>涓搧涓�灞�</el-option> </el-select>--> - </div> - <div class="rank-list"> - <div class="rank-item" v-for="(rankItem,index) in rankList" :key="rankItem.id"> - <span - class="rank-index" - :class="{'first':index==0,'second':index==1,'third':index==2}" - >{{index+1}}</span> - <span class="name">{{rankItem.name}}</span> - <span class="val">{{rankItem.val}}</span> + </div> + <div class="rank-list"> + <div + class="rank-item" + v-for="(rankItem, index) in rankList" + :key="rankItem.id" + > + <span + class="rank-index" + :class="{ + first: index == 0, + second: index == 1, + third: index == 2, + }" + >{{ index + 1 }}</span + > + <span class="name">{{ rankItem.name }}</span> + <span class="val">{{ rankItem.val }}</span> + </div> </div> </div> </div> - </div> </div> <div class="statics flex-box"> <div class="lt"> <div class="statics-part"> <div class="statics-header"> <span class="title">涔樺姟鍛樿繚瑙勭粺璁�</span> - <time-shortcut @actPickerChange="irregularMenStatistic"></time-shortcut> + <time-shortcut + @actPickerChange="irregularMenStatistic" + ></time-shortcut> </div> <div class="statics-content"> <div class="chart-area flex-box"> @@ -186,18 +213,28 @@ <span class="val">187</span> <span class="ratio">17.1%</span> </div> - <line-chart :options="optionsOfIrregularSum" style="height:70px"></line-chart> + <line-chart + :options="optionsOfIrregularSum" + style="height: 70px" + ></line-chart> </div> <div class="gt"> <div class="chart-theme">浜哄潎杩濊娆℃暟</div> <div class="sum"> <span class="val">1.31</span> </div> - <line-chart :options="optionsOfIrregularPer" style="height:70px"></line-chart> + <line-chart + :options="optionsOfIrregularPer" + style="height: 70px" + ></line-chart> </div> </div> <el-table class="thbg" :data="irregularTableData"> - <el-table-column label="鎺掑悕" type="index" width="90"></el-table-column> + <el-table-column + label="鎺掑悕" + type="index" + width="90" + ></el-table-column> <el-table-column label="濮撳悕" prop="name"></el-table-column> <el-table-column label="杩濊娆℃暟" prop="wg"></el-table-column> <!-- <el-table-column label="鍛ㄦ定骞�" prop="ratio"></el-table-column> --> @@ -227,7 +264,9 @@ <div class="statics-part"> <div class="statics-header"> <span class="title">閲嶇偣鍦版杩濊浜嬩欢缁熻</span> - <time-shortcut @actPickerChange="irregularEventStatistic"></time-shortcut> + <time-shortcut + @actPickerChange="irregularEventStatistic" + ></time-shortcut> </div> <div class="statics-content"> <el-radio-group @@ -241,27 +280,30 @@ <el-radio-button label="hc">浼氳溅</el-radio-button> <el-radio-button label="lsmx">涓存椂鎱㈣</el-radio-button> </el-radio-group> - - <Pie :options="optionsOfIrregularEventPie" style="padding-top:20px;"></Pie> + + <Pie + :options="optionsOfIrregularEventPie" + style="padding-top: 20px" + ></Pie> </div> </div> </div> </div> - <div class="part-bottom" > + <div class="part-bottom"> <div class="tab-swiper"> <swipe-tabs @checkTab="checkTabInSwipe"></swipe-tabs> </div> <div class="tab-detail"> - <dataset-chart style="width:100%"></dataset-chart> + <dataset-chart style="width: 100%"></dataset-chart> </div> </div> </div> </div> - <div class="tab-content" v-if="actCardTab=='taskStatistic'"> + <div class="tab-content" v-if="actCardTab == 'taskStatistic'"> <div class="general-view"> <div class="indicator"> <div class="icon"> - <i class="iconfont iconrenwuzhipai" style="color:#3399ff"></i> + <i class="iconfont iconrenwuzhipai" style="color: #3399ff"></i> </div> <div class="content"> <div class="indicator-title">鏈懆浠诲姟鎸囨淳閲�</div> @@ -270,7 +312,7 @@ </div> <div class="indicator"> <div class="icon"> - <i class="iconfont iconfenxi" style="color:#4c76ff"></i> + <i class="iconfont iconfenxi" style="color: #4c76ff"></i> </div> <div class="content"> <div class="indicator-title">鍒嗘瀽閲�</div> @@ -279,7 +321,7 @@ </div> <div class="indicator lastOne"> <div class="icon"> - <i class="iconfont iconweigui" style="color:#fdd476"></i> + <i class="iconfont iconweigui" style="color: #fdd476"></i> </div> <div class="content"> <div class="indicator-title">杩濊閲�</div> @@ -296,7 +338,9 @@ </div> <div class="statics-content"> <div class="flex-end"> - <time-shortcut @actPickerChange="taskAssignStatics"></time-shortcut> + <time-shortcut + @actPickerChange="taskAssignStatics" + ></time-shortcut> <el-date-picker v-model="searchTaskAssignTime" type="datetimerange" @@ -307,7 +351,10 @@ align="right" ></el-date-picker> </div> - <line-chart :options="optionsOfTaskAssign" style="height: 300px;"></line-chart> + <line-chart + :options="optionsOfTaskAssign" + style="height: 300px" + ></line-chart> </div> </div> </div> @@ -315,7 +362,9 @@ <div class="statics-part"> <div class="statics-header"> <span class="title">閮ㄩ棬鎸囨淳浠诲姟鍗犳瘮</span> - <time-shortcut @actPickerChange="partAssignstatics"></time-shortcut> + <time-shortcut + @actPickerChange="partAssignstatics" + ></time-shortcut> </div> <div class="statics-content"> <Pie :options="optionsOfTaskAssignPie"></Pie> @@ -330,7 +379,9 @@ </div> <div class="statics-content"> <div class="flex-end"> - <time-shortcut @actPickerChange="taskAnalyzeStatics"></time-shortcut> + <time-shortcut + @actPickerChange="taskAnalyzeStatics" + ></time-shortcut> <el-date-picker v-model="searchTaskAnalyzeTime" type="datetimerange" @@ -341,7 +392,10 @@ align="right" ></el-date-picker> </div> - <Bar :options="optionsOfTaskAnalyzeBar" style="height: 300px;"></Bar> + <Bar + :options="optionsOfTaskAnalyzeBar" + style="height: 300px" + ></Bar> </div> </div> </div> @@ -358,8 +412,14 @@ <el-table-column prop="name" label="濮撳悕"></el-table-column> <el-table-column prop="rwl" label="浠诲姟閲�"></el-table-column> <el-table-column prop="fxl" label="鍒嗘瀽閲�"></el-table-column> - <el-table-column prop="pdwgl" label="鍒ゅ畾杩濊閲�"></el-table-column> - <el-table-column prop="pdwglv" label="鍒ゅ畾杩濊鐜�"></el-table-column> + <el-table-column + prop="pdwgl" + label="鍒ゅ畾杩濊閲�" + ></el-table-column> + <el-table-column + prop="pdwglv" + label="鍒ゅ畾杩濊鐜�" + ></el-table-column> <el-table-column prop="wcl" label="瀹屾垚鐜�"></el-table-column> </el-table> </div> @@ -393,46 +453,52 @@ </template> <script> -import timeShortcut from './timeShortcut'; -import Bar from './charts/bar'; -import Pie from './charts/pie'; -import LineChart from './charts/line'; -import SwipeTabs from './swipeTabs'; -import DatasetChart from './charts/dataset'; +import timeShortcut from "./timeShortcut"; +import Bar from "./charts/bar"; +import Pie from "./charts/pie"; +import LineChart from "./charts/line"; +import SwipeTabs from "./swipeTabs"; +import DatasetChart from "./charts/dataset"; +import { getHiddenEventStatistics } from "@/api/shuohuang"; export default { components: { timeShortcut, Bar, Pie, LineChart, SwipeTabs, DatasetChart }, - mounted () { - let tempArr = [{ - "text": "Same but with checkboxes", - "children": [ - { - "text": "initially selected", - "selected": true - } - ] - }]; + mounted() { + let tempArr = [ + { + text: "Same but with checkboxes", + children: [ + { + text: "initially selected", + selected: true, + }, + ], + }, + ]; for (var i = 0; i < 20; i++) { tempArr[0].children.push({ - "text": "initially open", - "icon": "fa fa-folder icon-state-default", - "opened": true, - "children": [ + text: "initially open", + icon: "fa fa-folder icon-state-default", + opened: true, + children: [ { - "text": "Another node" - } - ] - }) + text: "Another node", + }, + ], + }); } - tempArr.forEach(node => { + tempArr.forEach((node) => { //if(node.children.length) - - }) - this.jsTreeNodes = tempArr - this.refreshShoubiNum() + }); + this.jsTreeNodes = tempArr; + // this.refreshShoubiNum() + const start = new Date(new Date().getFullYear(), 0); + const end = new Date(); + start.setHours(0, 0, 0); + this.timeShortChange([start, end]); }, - data () { + data() { return { - actCardTab: 'dataStatistic', + actCardTab: "dataStatistic", //actHiddanderTab: 'hidDanderStatistic', optionsOfWeekAnalyze: { animation: false, @@ -444,44 +510,44 @@ //containLabel: true }, tooltip: { - trigger: 'axis', + trigger: "axis", axisPointer: { - type: 'cross', + type: "cross", label: { - backgroundColor: '#6a7985' - } - } + backgroundColor: "#6a7985", + }, + }, }, xAxis: { show: false, - type: 'category', + type: "category", boundaryGap: false, - data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], + data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], label: { - show: false - } + show: false, + }, }, yAxis: { - type: 'value', + type: "value", show: false, label: { - show: false - } + show: false, + }, }, series: [ { data: [100, 103, 101, 107, 104, 111, 109], - type: 'line', + type: "line", smooth: true, areaStyle: { - opacity: 0.7 + opacity: 0.7, }, - color: '#975fe3' - } - ] + color: "#975fe3", + }, + ], }, optionsOfTransferSumBar: { - color: ['#3ba1ff'], + color: ["#3ba1ff"], grid: { top: 0, left: 10, @@ -490,86 +556,101 @@ //containLabel: true }, tooltip: { - trigger: 'axis', + trigger: "axis", axisPointer: { - type: 'cross', + type: "cross", label: { - backgroundColor: '#6a7985' - } - } + backgroundColor: "#6a7985", + }, + }, }, xAxis: { show: false, - type: 'category', + type: "category", boundaryGap: false, - data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], + data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], label: { - show: false - } + show: false, + }, }, yAxis: { - type: 'value', + type: "value", show: false, - boundaryGap: [0, '45%'], + boundaryGap: [0, "45%"], label: { - show: false - } + show: false, + }, }, series: [ { - name: '鏁伴噺', - type: 'bar', - barWidth: '24%', - data: [123, 120, 157, 140, 147, 172, 166] - } - ] + name: "鏁伴噺", + type: "bar", + barWidth: "24%", + data: [123, 120, 157, 140, 147, 172, 166], + }, + ], }, searchHidDanderTime: [], - actHiddanderTab: 'hidDanderStatistic', - actHidDanderStatiscChart: 'bar', - actHidDanderTrendChart: 'line', + actHiddanderTab: "hidDanderStatistic", + actHidDanderStatiscChart: "bar", + actHidDanderTrendChart: "line", optionsOfHidDangerBar: { - color: ['#9ed2f5'], + color: ["#9ed2f5"], tooltip: { - trigger: 'axis', + trigger: "axis", axisPointer: { - type: 'shadow' + type: "shadow", }, }, grid: { - left: '3%', - right: '4%', - bottom: '3%', - containLabel: true + left: "3%", + right: "4%", + bottom: "3%", + containLabel: true, }, xAxis: [ { - type: 'category', - data: ['鏈福绗�', '鏈墜姣�', '鏈懠鍞�', '杩愯涓潯瑙�', '鏈鏌�', '鏈簲绛�'], + type: "category", + data: [ + "鏈福绗�", + "鏈墜姣�", + "鏈懠鍞�", + "杩愯涓潯瑙�", + "鏈鏌�", + "鏈簲绛�", + ], axisTick: { - alignWithLabel: true + alignWithLabel: true, }, - } + }, ], yAxis: [ { - type: 'value', + type: "value", axisLine: { - show: false - } - } + show: false, + }, + }, ], series: [ { - name: '鏁伴噺', - type: 'bar', - barWidth: '60%', - label:{ - show:true,position: 'top' + name: "鏁伴噺", + type: "bar", + barWidth: "60%", + label: { + show: true, + position: "top", }, - data: [{value:1,itemStyle:{color:'#3aa0ff'}},{value:0,itemStyle:{color:'#36cbcb'}},{value:1,itemStyle:{color:'#4dcb73'}},{value:1,itemStyle:{color:'#fad337'}},{value:3,itemStyle:{color:'#f2637b'}}, {value:2,itemStyle:{color:'#975fe4'}}] - } - ] + data: [ + { value: 1, itemStyle: { color: "#3aa0ff" } }, + { value: 0, itemStyle: { color: "#36cbcb" } }, + { value: 1, itemStyle: { color: "#4dcb73" } }, + { value: 1, itemStyle: { color: "#fad337" } }, + { value: 3, itemStyle: { color: "#f2637b" } }, + { value: 2, itemStyle: { color: "#975fe4" } }, + ], + }, + ], }, optionsOfHidDangerTrend: { grid: { @@ -579,265 +660,310 @@ containLabel: true, }, tooltip: { - trigger: 'axis', + trigger: "axis", axisPointer: { - type: 'cross', + type: "cross", label: { - backgroundColor: '#6a7985' - } - } + backgroundColor: "#6a7985", + }, + }, }, xAxis: { - type: 'category', + type: "category", boundaryGap: false, - data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], + data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], label: { - show: false - } + show: false, + }, }, yAxis: { - type: 'value', + type: "value", axisLine: { - show: false + show: false, }, label: { - show: false - } + show: false, + }, }, series: [ { data: [83, 83, 85, 85, 80, 40, 30], - type: 'line', - color: '#5dbafd', + type: "line", + color: "#5dbafd", symbolSize: 10, - symbol: 'circle', + symbol: "circle", lineStyle: { - color: '#61b4ff', + color: "#61b4ff", width: 2, }, itemStyle: { - color: '#98d87d' - } - } - ] + color: "#98d87d", + }, + }, + ], }, optionsOfHidDangerTrendPie: { tooltip: { - trigger: 'item', - formatter: '{a}<br>{b}:{c} ({d}%)' + trigger: "item", + formatter: "{a}<br>{b}:{c} ({d}%)", }, legend: { - orient: 'vertical', + orient: "vertical", right: 10, - y: 'center', - data: ['鏈福绗�', '鏈墜姣�', '鏈懠鍞�', '杩愯涓潯瑙�', '鏈鏌�', '鏈簲绛�'], + y: "center", + data: [ + "鏈福绗�", + "鏈墜姣�", + "鏈懠鍞�", + "杩愯涓潯瑙�", + "鏈鏌�", + "鏈簲绛�", + ], }, series: [ { - name: '寮傚父浜嬩欢', - type: 'pie', - color: ['#3aa0ff', '#36cbcb', '#4dcb73', '#fad337', '#f2637b', '#975fe4'], - radius: ['50%', '80%'], + name: "寮傚父浜嬩欢", + type: "pie", + color: [ + "#3aa0ff", + "#36cbcb", + "#4dcb73", + "#fad337", + "#f2637b", + "#975fe4", + ], + radius: ["50%", "80%"], //center: ['40%','60%'], avoidLabelOverlap: false, label: { show: false, // position: 'center', - formatter: '{b}\n{c} ' + formatter: "{b}\n{c} ", }, emphasis: { label: { show: true, - fontSize: '20', - fontWeight: 'bold' - } + fontSize: "20", + fontWeight: "bold", + }, }, labelLine: { - show: false + show: false, }, data: [ - { value: 83, name: '鏈福绗�' }, - { value: 83, name: '鏈墜姣�' }, - { value: 85, name: '鏈懠鍞�' }, - { value: 80, name: '杩愯涓潯瑙�' }, - { value: 40, name: '鏈鏌�' }, - { value: 30, name: '鏈簲绛�' }, - ] - } - ] + { value: 83, name: "鏈福绗�" }, + { value: 83, name: "鏈墜姣�" }, + { value: 85, name: "鏈懠鍞�" }, + { value: 80, name: "杩愯涓潯瑙�" }, + { value: 40, name: "鏈鏌�" }, + { value: 30, name: "鏈簲绛�" }, + ], + }, + ], }, optionsOfHidDangerPie: { tooltip: { - trigger: 'item', - formatter: '{a}<br>{b}:{c} ({d}%)' + trigger: "item", + formatter: "{a}<br>{b}:{c} ({d}%)", }, legend: { - orient: 'vertical', + orient: "vertical", right: 10, - y: 'center', - data: ['鏈福绗�', '鏈墜姣�', '鏈懠鍞�', '杩愯涓潯瑙�', '鏈鏌�', '鏈簲绛�'], + y: "center", + data: [ + "鏈福绗�", + "鏈墜姣�", + "鏈懠鍞�", + "杩愯涓潯瑙�", + "鏈鏌�", + "鏈簲绛�", + ], }, series: [ { - name: '寮傚父浜嬩欢', - type: 'pie', - color: ['#3aa0ff', '#36cbcb', '#4dcb73', '#fad337', '#f2637b', '#975fe4'], - radius: ['70%', '90%'], + name: "寮傚父浜嬩欢", + type: "pie", + color: [ + "#3aa0ff", + "#36cbcb", + "#4dcb73", + "#fad337", + "#f2637b", + "#975fe4", + ], + radius: ["70%", "90%"], //center: ['40%','60%'], avoidLabelOverlap: false, label: { show: false, - position: 'center', - formatter: '{b}\n{c} ' + position: "center", + formatter: "{b}\n{c} ", }, emphasis: { label: { show: true, - fontSize: '30', - fontWeight: 'bold' - } + fontSize: "30", + fontWeight: "bold", + }, }, labelLine: { - show: false + show: false, }, data: [ - { value: 21, name: '鏈福绗�' }, - { value: 102, name: '鏈墜姣�' }, - { value: 100, name: '鏈懠鍞�' }, - { value: 1, name: '杩愯涓潯瑙�' }, - { value: 7, name: '鏈鏌�' }, - { value: 14, name: '鏈簲绛�' }, - ] - } - ] + { value: 21, name: "鏈福绗�" }, + { value: 102, name: "鏈墜姣�" }, + { value: 100, name: "鏈懠鍞�" }, + { value: 1, name: "杩愯涓潯瑙�" }, + { value: 7, name: "鏈鏌�" }, + { value: 14, name: "鏈簲绛�" }, + ], + }, + ], }, optionsOfTaskAssignPie: { tooltip: { - trigger: 'item', - formatter: '{a}<br>{b}:{c} ({d}%)' + trigger: "item", + formatter: "{a}<br>{b}:{c} ({d}%)", }, legend: { - orient: 'vertical', + orient: "vertical", right: 10, - y: 'center', - data: ['寮犵', '鏉庡洓', '鐜嬩附', '椹畯瀹�', '鍒樹箖瓒�', '浣曞厜瀹�'] + y: "center", + data: ["寮犵", "鏉庡洓", "鐜嬩附", "椹畯瀹�", "鍒樹箖瓒�", "浣曞厜瀹�"], }, series: [ { - name: '寮傚父浜嬩欢', - type: 'pie', - color: ['#3aa0ff', '#36cbcb', '#4dcb73', '#fad337', '#f2637b', '#975fe4'], - radius: ['70%', '90%'], + name: "寮傚父浜嬩欢", + type: "pie", + color: [ + "#3aa0ff", + "#36cbcb", + "#4dcb73", + "#fad337", + "#f2637b", + "#975fe4", + ], + radius: ["70%", "90%"], //center: ['40%','60%'], avoidLabelOverlap: false, label: { show: false, - position: 'center', - formatter: '{b}\n{c} ' + position: "center", + formatter: "{b}\n{c} ", }, emphasis: { label: { show: true, - fontSize: '30', - fontWeight: 'bold' - } + fontSize: "30", + fontWeight: "bold", + }, }, labelLine: { - show: false + show: false, }, data: [ - { value: 127, name: '寮犵' }, - { value: 130, name: '鏉庡洓' }, - { value: 128, name: '鐜嬩附' }, - { value: 129, name: '椹畯瀹�' }, - { value: 126, name: '鍒樹箖瓒�' }, - { value: 112, name: '浣曞厜瀹�' }, - ] - } - ] + { value: 127, name: "寮犵" }, + { value: 130, name: "鏉庡洓" }, + { value: 128, name: "鐜嬩附" }, + { value: 129, name: "椹畯瀹�" }, + { value: 126, name: "鍒樹箖瓒�" }, + { value: 112, name: "浣曞厜瀹�" }, + ], + }, + ], }, - rankList: [{ - id: 'jl', - name: '鏈鸿締鍒嗗叕鍙�', - val: 121 - }, { - id: 'ztyj', - name: '涓搧涓�灞�', - val: 52 - }, { - id: 'ztsj', - name: '涓搧鍥涘眬', - val: 40 - }, { - id: 'ztsanj', - name: '涓搧涓夊眬', - val: 38 - }, { - id: 'ztswj', - name: '涓搧鍗佷簲灞�', - val: 36 - }, { - id: 'ztslj', - name: '涓搧鍗佸叚灞�', - val: 33 - }, { - id: 'jtjw', - name: '浜搧鏈哄姟', - val: 24 - }, { - id: 'lhjw', - name: '璺崕鏈哄姟', - val: 15 - }, { - id: 'nhjw', - name: '鍗楃幆鏈哄姟', - val: 14 - }], + rankList: [ + { + id: "jl", + name: "鏈鸿締鍒嗗叕鍙�", + val: 121, + }, + { + id: "ztyj", + name: "涓搧涓�灞�", + val: 52, + }, + { + id: "ztsj", + name: "涓搧鍥涘眬", + val: 40, + }, + { + id: "ztsanj", + name: "涓搧涓夊眬", + val: 38, + }, + { + id: "ztswj", + name: "涓搧鍗佷簲灞�", + val: 36, + }, + { + id: "ztslj", + name: "涓搧鍗佸叚灞�", + val: 33, + }, + { + id: "jtjw", + name: "浜搧鏈哄姟", + val: 24, + }, + { + id: "lhjw", + name: "璺崕鏈哄姟", + val: 15, + }, + { + id: "nhjw", + name: "鍗楃幆鏈哄姟", + val: 14, + }, + ], optionsOfIrregularSum: { animation: false, grid: { top: 0, left: 0, bottom: 10, - containLabel: true + containLabel: true, }, tooltip: { - trigger: 'axis', + trigger: "axis", axisPointer: { - type: 'cross', + type: "cross", label: { - backgroundColor: '#6a7985' - } - } + backgroundColor: "#6a7985", + }, + }, }, xAxis: { show: false, - type: 'category', + type: "category", boundaryGap: false, - data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], + data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], label: { - show: false - } + show: false, + }, }, yAxis: { - type: 'value', + type: "value", show: false, - boundaryGap: [0, '30%'], + boundaryGap: [0, "30%"], label: { - show: false - } + show: false, + }, }, series: [ { data: [820, 932, 901, 934, 1290, 1330, 1320], - type: 'line', + type: "line", smooth: true, areaStyle: { - opacity: 0.3 + opacity: 0.3, }, - color: '#5dbafd' - } - ] + color: "#5dbafd", + }, + ], }, optionsOfIrregularPer: { animation: false, @@ -845,106 +971,116 @@ top: 0, left: 0, bottom: 10, - containLabel: true + containLabel: true, }, tooltip: { - trigger: 'axis', + trigger: "axis", axisPointer: { - type: 'cross', + type: "cross", label: { - backgroundColor: '#6a7985' - } - } + backgroundColor: "#6a7985", + }, + }, }, xAxis: { show: false, - type: 'category', + type: "category", boundaryGap: false, - data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], + data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], label: { - show: false - } + show: false, + }, }, yAxis: { - type: 'value', + type: "value", show: false, label: { - show: false - } + show: false, + }, }, series: [ { data: [820, 932, 901, 934, 1290, 1330, 1320], - type: 'line', + type: "line", smooth: true, areaStyle: { - opacity: 0.3 + opacity: 0.3, }, - color: '#8adee6' - } - ] + color: "#8adee6", + }, + ], }, - irregularTableData: [{ name: '鍚村浗姊�', wg: 2 }, { name: '鐜嬩粊鍏�', wg: 1 }, { name: '缃楀厓鍙�', wg: 1 }], + irregularTableData: [ + { name: "鍚村浗姊�", wg: 2 }, + { name: "鐜嬩粊鍏�", wg: 1 }, + { name: "缃楀厓鍙�", wg: 1 }, + ], PageIndex: 1, PageSize: 5, pageSizes: [5, 10], tableTotal: 0, - irregularEventType: 'fhdd', + irregularEventType: "fhdd", optionsOfIrregularEventPie: { tooltip: { - trigger: 'item', - formatter: '{a}<br>{b}:{c} ({d}%)' + trigger: "item", + formatter: "{a}<br>{b}:{c} ({d}%)", }, legend: { - orient: 'vertical', + orient: "vertical", right: 10, - y: 'center', - data: ['闃叉姢鍦版', '杩涘嚭绔�', '杩囧垎鐩�', '浼氳溅', '涓存椂鎱㈣'] + y: "center", + data: ["闃叉姢鍦版", "杩涘嚭绔�", "杩囧垎鐩�", "浼氳溅", "涓存椂鎱㈣"], }, series: [ { - name: '寮傚父浜嬩欢', - type: 'pie', - color: ['#3aa0ff', '#36cbcb', '#4dcb73', '#fad337', '#f2637b', '#975fe4'], - radius: ['50%', '80%'], + name: "寮傚父浜嬩欢", + type: "pie", + color: [ + "#3aa0ff", + "#36cbcb", + "#4dcb73", + "#fad337", + "#f2637b", + "#975fe4", + ], + radius: ["50%", "80%"], //center: ['40%','60%'], avoidLabelOverlap: false, label: { show: false, // position: 'center', - formatter: '{b}\n{c} ' + formatter: "{b}\n{c} ", }, emphasis: { label: { show: true, - fontSize: '20', - fontWeight: 'bold' - } + fontSize: "20", + fontWeight: "bold", + }, }, - itemStyle:{ - normal:{ - label:{ - show:true, - formatter: '{b}\n{c} ', - labelLine:{ - show:true - } - } - } + itemStyle: { + normal: { + label: { + show: true, + formatter: "{b}\n{c} ", + labelLine: { + show: true, + }, + }, + }, }, // labelLine: { // show: false // }, data: [ - { value: 32, name: '闃叉姢鍦版' }, - { value: 55, name: '杩涘嚭绔�' }, - { value: 42, name: '杩囧垎鐩�' }, - { value: 96, name: '浼氳溅' }, - { value: 20, name: '涓存椂鎱㈣' }, - - ] - } - ] + { value: 32, name: "闃叉姢鍦版" }, + { value: 55, name: "杩涘嚭绔�" }, + { value: 42, name: "杩囧垎鐩�" }, + { value: 96, name: "浼氳溅" }, + { value: 20, name: "涓存椂鎱㈣" }, + ], + }, + ], }, searchTaskAssignTime: [], optionsOfTaskAssign: { @@ -955,62 +1091,62 @@ containLabel: true, }, tooltip: { - trigger: 'axis', + trigger: "axis", axisPointer: { - type: 'cross', + type: "cross", label: { - backgroundColor: '#6a7985' - } - } + backgroundColor: "#6a7985", + }, + }, }, xAxis: { - type: 'category', + type: "category", boundaryGap: false, - data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], + data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], label: { - show: false - } + show: false, + }, }, yAxis: { - type: 'value', + type: "value", axisLine: { - show: false + show: false, }, label: { - show: false - } + show: false, + }, }, series: [ { data: [820, 932, 901, 934, 1290, 1330, 1320], - type: 'line', + type: "line", smooth: true, areaStyle: { - opacity: 0.3 + opacity: 0.3, }, - color: '#5dbafd' - } - ] + color: "#5dbafd", + }, + ], }, searchTaskAnalyzeTime: [new Date(2021, 1, 22), new Date(2021, 2, 1)], optionsOfTaskAnalyzeBar: { - color: ['#fbd438', '#4fcb74'], + color: ["#fbd438", "#4fcb74"], dataset: { source: [ - ['mon', 44, 83], - ['tue', 47, 83], - ['wed', 43, 85], - ['thu', 44, 85], - ['fri', 46, 80], - ['sat', 12, 40], - ['sun', 9, 34], - ] + ["mon", 44, 83], + ["tue", 47, 83], + ["wed", 43, 85], + ["thu", 44, 85], + ["fri", 46, 80], + ["sat", 12, 40], + ["sun", 9, 34], + ], }, legend: { - left: 0 + left: 0, }, tooltip: { - trigger: 'axis', + trigger: "axis", axisPointer: { //type: 'shadow' }, @@ -1018,15 +1154,15 @@ grid: { left: 10, right: 10, - bottom: '3%', - containLabel: true + bottom: "3%", + containLabel: true, }, xAxis: [ { - type: 'category', + type: "category", //data: ['鏈福绗�', '鏈墜姣�', '鏈懠鍞�', '杩愯涓潯瑙�', '鏈鏌�', '鏈簲绛�'], axisTick: { - alignWithLabel: true + alignWithLabel: true, }, // axisLine: { // lineStyle: { @@ -1036,102 +1172,197 @@ // nameTextStyle: { // color: "#333" // } - } + }, ], yAxis: [ { - type: 'value', + type: "value", axisLine: { - show: false - } - } + show: false, + }, + }, ], series: [ { - name: '鏈夊紓甯�', - type: 'bar', - stack: '寮傚父', + name: "鏈夊紓甯�", + type: "bar", + stack: "寮傚父", barWidth: 20, //data: [270, 500, 300, 430, 620, 540] }, { - name: '鏃犲紓甯�', - type: 'bar', - stack: '寮傚父', + name: "鏃犲紓甯�", + type: "bar", + stack: "寮傚父", barWidth: 20, //data: [270, 500, 300, 430, 620, 540] - } - ] + }, + ], }, taskAnalyzeCaseTableData: [ - { name: '寮犵', rwl: 127, fxl: 127, pdwgl: 44, pdwglv: '34.65%', wcl: '100%' }, - { name: '鏉庡洓', rwl: 130, fxl: 129, pdwgl: 47, pdwglv: '36.43%', wcl: '99.23%' }, - { name: '鐜嬩附', rwl: 128, fxl: 127, pdwgl: 43, pdwglv: '33.86%', wcl: '99.22%' }, - { name: '椹畯瀹�', rwl: 129, fxl: 125, pdwgl: 44, pdwglv: '35.2%', wcl: '96.90%' }, - { name: '鍒樹箖瓒�', rwl: 126, fxl: 126, pdwgl: 46, pdwglv: '33.50%', wcl: '100%' }, - { name: '浣曞厜瀹�', rwl: 112, fxl: 112, pdwgl: 12, pdwglv: '10.71%', wcl: '100%' }], + { + name: "寮犵", + rwl: 127, + fxl: 127, + pdwgl: 44, + pdwglv: "34.65%", + wcl: "100%", + }, + { + name: "鏉庡洓", + rwl: 130, + fxl: 129, + pdwgl: 47, + pdwglv: "36.43%", + wcl: "99.23%", + }, + { + name: "鐜嬩附", + rwl: 128, + fxl: 127, + pdwgl: 43, + pdwglv: "33.86%", + wcl: "99.22%", + }, + { + name: "椹畯瀹�", + rwl: 129, + fxl: 125, + pdwgl: 44, + pdwglv: "35.2%", + wcl: "96.90%", + }, + { + name: "鍒樹箖瓒�", + rwl: 126, + fxl: 126, + pdwgl: 46, + pdwglv: "33.50%", + wcl: "100%", + }, + { + name: "浣曞厜瀹�", + rwl: 112, + fxl: 112, + pdwgl: 12, + pdwglv: "10.71%", + wcl: "100%", + }, + ], jsTreeNodes: [], - } + }; }, methods: { - refreshShoubiNum(){ - let n = sessionStorage.getItem("shoubiNum") + refreshShoubiNum() { + let n = sessionStorage.getItem("shoubiNum"); // this.optionsOfHidDangerBar.series[0].data[1].value = +n - this.$set(this.optionsOfHidDangerBar.series,0, { - name: '鏁伴噺', - type: 'bar', - barWidth: '60%', - label:{ - show:true,position: 'top' - }, - data: [{value:1,itemStyle:{color:'#3aa0ff'}},{value:+n,itemStyle:{color:'#36cbcb'}},{value:1,itemStyle:{color:'#4dcb73'}},{value:1,itemStyle:{color:'#fad337'}},{value:3,itemStyle:{color:'#f2637b'}}, {value:2,itemStyle:{color:'#975fe4'}}] - }) + this.$set(this.optionsOfHidDangerBar.series, 0, { + name: "鏁伴噺", + type: "bar", + barWidth: "60%", + label: { + show: true, + position: "top", + }, + data: [ + { value: 1, itemStyle: { color: "#3aa0ff" } }, + { value: +n, itemStyle: { color: "#36cbcb" } }, + { value: 1, itemStyle: { color: "#4dcb73" } }, + { value: 1, itemStyle: { color: "#fad337" } }, + { value: 3, itemStyle: { color: "#f2637b" } }, + { value: 2, itemStyle: { color: "#975fe4" } }, + ], + }); }, - initTabContent(tab){ - if(tab.name == "hidDanderStatistic"){ - this.actHidDanderStatiscChart = 'bar' - }else{ - this.actHidDanderTrendChart = 'line' + initTabContent(tab) { + if (tab.name == "hidDanderStatistic") { + this.actHidDanderStatiscChart = "bar"; + } else { + this.actHidDanderTrendChart = "line"; } }, - checkTabInSwipe (tab) { - + checkTabInSwipe(tab) {}, + checkIrregularEventType(type) {}, + taskAnalyzeCase(time) {}, + taskAnalyzeStatics(time) {}, + partAssignstatics(time) {}, + taskAssignStatics(time) {}, + renderIrregularMenTable() {}, + handleTableSizeChange() {}, + timeShortChange(time) { + let that = this; + let startDate = this.$moment(time[0]).format("YYYY-MM-DD HH:mm:ss"); + let endDate = this.$moment(time[1]).format("YYYY-MM-DD HH:mm:ss"); + getHiddenEventStatistics({ + startDate, + endDate, + }).then((res) => { + let obj = { + color: ["#9ed2f5"], + tooltip: { + trigger: "axis", + axisPointer: { + type: "shadow", + }, + }, + grid: { + left: "3%", + right: "4%", + bottom: "3%", + containLabel: true, + }, + xAxis: [ + { + type: "category", + data: [ + "鏈福绗�", + "鏈墜姣�", + "鏈懠鍞�", + "杩愯涓潯瑙�", + "鏈鏌�", + "鏈簲绛�", + ], + axisTick: { + alignWithLabel: true, + }, + }, + ], + yAxis: [ + { + type: "value", + axisLine: { + show: false, + }, + }, + ], + series: [ + { + name: "鏁伴噺", + type: "bar", + barWidth: "60%", + label: { + show: true, + position: "top", + }, + data: [ + { value: 1, itemStyle: { color: "#3aa0ff" } }, + { value: +res.data, itemStyle: { color: "#36cbcb" } }, + { value: 1, itemStyle: { color: "#4dcb73" } }, + { value: 1, itemStyle: { color: "#fad337" } }, + { value: 3, itemStyle: { color: "#f2637b" } }, + { value: 2, itemStyle: { color: "#975fe4" } }, + ], + }, + ], + }; + that.optionsOfHidDangerBar = obj + that.$refs.HidDangerBar.initBar() + }); }, - checkIrregularEventType (type) { - - }, - taskAnalyzeCase (time) { - - }, - taskAnalyzeStatics (time) { - - }, - partAssignstatics (time) { - - }, - taskAssignStatics (time) { - - }, - renderIrregularMenTable () { - - }, - handleTableSizeChange () { - - }, - timeShortChange (time) { - - }, - irregularMenStatistic (time) { - - }, - irregularEventStatistic (time) { - - } + irregularMenStatistic(time) {}, + irregularEventStatistic(time) {}, }, - -} - - +}; // title : { // /* text: '鏌愮珯鐐圭敤鎴疯闂潵婧�', @@ -1156,28 +1387,27 @@ // center: ['40%', '60%'], // data: data, // /*鍦╯eries涓坊鍔爄temStyle鍗冲彲鐩磋鏄剧ず楗煎瀷鏁板��*/ -// itemStyle:{ -// normal:{ -// label:{ -// show: true, -// formatter: '{b} : {c} ({d}%)' -// }, -// labelLine :{show:true} -// } -// } +// itemStyle:{ +// normal:{ +// label:{ +// show: true, +// formatter: '{b} : {c} ({d}%)' +// }, +// labelLine :{show:true} +// } +// } // } // ] - + // }; // myChart_qyhhmd.setOption(option,true) </script> <style lang="scss"> - .guide-index { - background-color: #f0f2f5; + background-color: #f0f2f5; .tab-menu { - background-color: #fff; + background-color: #fff; height: 60px; } .el-progress-bar__outer { @@ -1203,10 +1433,10 @@ border-right-color: transparent; } } - .defined-progress{ + .defined-progress { position: relative; - &:before{ - content: ''; + &:before { + content: ""; position: absolute; width: 2px; height: 4px; @@ -1214,8 +1444,8 @@ top: -6px; right: -5px; } - &:after{ - content: ''; + &:after { + content: ""; position: absolute; width: 2px; height: 4px; @@ -1232,14 +1462,14 @@ } } .tab-content { - // padding: 18px 12px; + // padding: 18px 12px; padding: 20px; .card-view { display: flex; - margin-right: -20px; + margin-right: -20px; - // margin-left: -2px; + // margin-left: -2px; .el-card { flex: 1; margin-right: 20px; @@ -1296,30 +1526,29 @@ } } .part { - padding:20px 0; + padding: 20px 0; margin-bottom: 20px; - .part-top{ + .part-top { background-color: #fff; } - .part-bottom{ + .part-bottom { background-color: #fff; - // padding: 0 30px 30px 30px; - padding: 0 0 25px 0; + // padding: 0 30px 30px 30px; + padding: 0 0 25px 0; - .tab-detail{ - margin: 0 25px; + .tab-detail { + margin: 0 25px; } } .header-width-tab { display: flex; justify-content: space-between; - margin-bottom: 12px; + margin-bottom: 12px; .rt { display: flex; padding-top: 20px; - margin-right: 25px; - + margin-right: 25px; } } .statics { @@ -1367,15 +1596,14 @@ .lt { text-align: left; flex: 1; - padding: 3px 15px 15px 18px; - background-color: #fff; - margin-right: 18px; - + padding: 3px 15px 15px 18px; + background-color: #fff; + margin-right: 18px; } .rt { text-align: left; - background-color: #fff; - padding: 3px 15px 15px 18px; + background-color: #fff; + padding: 3px 15px 15px 18px; width: 400px; .header { display: flex; @@ -1436,8 +1664,8 @@ } } .tab-swiper { - width: calc(100vw - 367px); - margin: 0 0 20px 20px; + width: calc(100vw - 367px); + margin: 0 0 20px 20px; } } .general-view { @@ -1450,7 +1678,7 @@ align-items: center; position: relative; &:not(.lastOne):after { - content: ''; + content: ""; width: 1px; height: 57px; background: #e9e9e9; -- Gitblit v1.8.0