|
|
@@ -0,0 +1,754 @@
|
|
|
+<!-- 督查首页 -->
|
|
|
+<template>
|
|
|
+ <div class="mainDiv" style="height:100%;" :style="backgroundChangeColor">
|
|
|
+ <!-- 左侧组件 -->
|
|
|
+ <div class="left">
|
|
|
+ <div class="left_user">
|
|
|
+ <Systemstatus
|
|
|
+ :usersNum="usersNum"
|
|
|
+ :grounpNum="grounpNum"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div class="left_qusLineChart">
|
|
|
+ <PublicSentiment />
|
|
|
+ </div>
|
|
|
+ <div style="margin-left: 1%;" class="left_notices">
|
|
|
+ <Notices @showAnnouncement="showAnnouncementHandler" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 中部组件 -->
|
|
|
+ <div class="middle">
|
|
|
+ <div class="middle_button">
|
|
|
+ <HomeViewBar
|
|
|
+ @barsType="barTypeChangeHandler"
|
|
|
+ @globalTime="globalTimeHandler"
|
|
|
+ :dczNum="dczStatisticsData.total"
|
|
|
+ :dcyrNum="dcryStatisticsData.total"
|
|
|
+ :dcdxNum="dcdxStatisticsData.total"
|
|
|
+ :fxwtNum="fxwtStatisticsData.total"
|
|
|
+ :jbyywtNum="jbyywtStatisticsData.total"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div class="middle_map">
|
|
|
+ <CenterMap
|
|
|
+ @globalTime="globalTimeHandler"
|
|
|
+ @OrgListsEventToMainView="OrgListsEventToMainViewEvent"
|
|
|
+ @DctypeListsEventToMainView="DctypeListsEventToMainViewEvent"
|
|
|
+ @mapClick="mapClickHandler"
|
|
|
+ :barsChooseType="barsChooseType"
|
|
|
+ :barsChooseUnit="barsChooseUnit"
|
|
|
+ :dczLists="dczLists"
|
|
|
+ :transferUseLists="transferUseLists"
|
|
|
+ :mapData="GlobalCenterMapUseData"
|
|
|
+ :requestEntmTime="requestEntmTime"
|
|
|
+ :requestOrgId="requestOrgId"
|
|
|
+ :requestObjectType="requestObjectType"
|
|
|
+ :requestSttmTime="requestSttmTime"
|
|
|
+ :mapTitleFocusName="mapTitleFocusName"
|
|
|
+ :mapPointColor="mapPointColor"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div class="middle_bar">
|
|
|
+ <Centerbar
|
|
|
+ :mapTitleFocusName="mapTitleFocusName"
|
|
|
+ :barData="GlobalCenterMapUseData"
|
|
|
+ :barStartColor="barStartColor"
|
|
|
+ :barEndColor="barEndColor"
|
|
|
+ :barsChooseUnit="barsChooseUnit"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 右侧组件 -->
|
|
|
+ <div class="right">
|
|
|
+ <div class="right_qus">
|
|
|
+ <QuestionCount
|
|
|
+ @rightQustionTimeLimit="rightQustionTimeLimit"
|
|
|
+ :qustionsCountNums="qustionsCountNums"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div class="right_line">
|
|
|
+ <QuestionLineChart
|
|
|
+ @trendLineChartType="trendLineChartTypeHandler"
|
|
|
+ :GlobalSttmTime="GlobalSttmTime"
|
|
|
+ :GlobalEntmTime="GlobalEntmTime"
|
|
|
+ :xData="xData"
|
|
|
+ :yData="yData"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div class="right_pie_dcdx">
|
|
|
+ <FinishRate
|
|
|
+ :finishNumber="finishRateData.finishedCount"
|
|
|
+ :unfinishNumber="finishRateData.unfinishedCount"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div class="right_pie_wtfb">
|
|
|
+ <ProblemPieChart
|
|
|
+ :levelone="problemLevelStatisticsData.levelOne"
|
|
|
+ :leveltwo="problemLevelStatisticsData.levelTwo"
|
|
|
+ :levelthree="problemLevelStatisticsData.levelThree"
|
|
|
+ levelfour="0"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 督查组dialog -->
|
|
|
+ <a-modal :title="dcdxTitle + '督查组'" v-model:open="dczVisible" width="40%">
|
|
|
+ <DczDetails
|
|
|
+ v-if="dczVisible"
|
|
|
+ :adCode="dcdxAdcode"
|
|
|
+ :requestEntmTime="requestEntmTime"
|
|
|
+ :requestOrgId="requestOrgId"
|
|
|
+ :requestSttmTime="requestSttmTime"
|
|
|
+ :requestObjectType="requestObjectType"
|
|
|
+ />
|
|
|
+ </a-modal>
|
|
|
+
|
|
|
+ <!-- 督查人员dialog -->
|
|
|
+ <a-modal :title="dcdxTitle + '督查人员'" v-model:open="dcryVisible" width="40%">
|
|
|
+ <DcryDetails
|
|
|
+ v-if="dcryVisible"
|
|
|
+ :adCode="dcdxAdcode"
|
|
|
+ :requestEntmTime="requestEntmTime"
|
|
|
+ :requestOrgId="requestOrgId"
|
|
|
+ :requestSttmTime="requestSttmTime"
|
|
|
+ :requestObjectType="requestObjectType"
|
|
|
+ />
|
|
|
+ </a-modal>
|
|
|
+
|
|
|
+ <!-- 督查对象dialog -->
|
|
|
+ <a-modal :title="dcdxTitle + '督查对象'" v-model:open="dcdxVisible" width="40%">
|
|
|
+ <DcdxDetails
|
|
|
+ v-if="dcdxVisible"
|
|
|
+ :adCode="dcdxAdcode"
|
|
|
+ :requestEntmTime="requestEntmTime"
|
|
|
+ :requestOrgId="requestOrgId"
|
|
|
+ :requestSttmTime="requestSttmTime"
|
|
|
+ :requestObjectType="requestObjectType"
|
|
|
+ />
|
|
|
+ </a-modal>
|
|
|
+
|
|
|
+ <!-- 发现问题dialog -->
|
|
|
+ <a-modal :title="dcdxTitle + '问题详情'" v-model:open="fxwtVisible" width="40%">
|
|
|
+ <FxwtDetails
|
|
|
+ v-if="fxwtVisible"
|
|
|
+ :adCode="dcdxAdcode"
|
|
|
+ :requestEntmTime="requestEntmTime"
|
|
|
+ :requestOrgId="requestOrgId"
|
|
|
+ :requestSttmTime="requestSttmTime"
|
|
|
+ :requestObjectType="requestObjectType"
|
|
|
+ />
|
|
|
+ </a-modal>
|
|
|
+
|
|
|
+ <!-- 公告dialog -->
|
|
|
+ <a-modal title="公告" v-model:open="showAnnouncement" width="40%">
|
|
|
+ <div style="display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;min-height:200px;">
|
|
|
+ <div style="display:flex;flex-direction:row;justify-content:center;align-items:center">
|
|
|
+ <h1>{{ announcementItem.title }}</h1>
|
|
|
+ </div>
|
|
|
+ <div style="display:flex;flex-direction:row;justify-content:center;align-items:center;color:gray;margin-top:20px;">
|
|
|
+ <p>{{ announcementItem.persNm }}</p>
|
|
|
+ <p style="margin-left:10px;">{{ announcementItem.orgNm }}</p>
|
|
|
+ <p style="margin-left:10px;">{{ showStrDate(announcementItem.pubTm) }}</p>
|
|
|
+ </div>
|
|
|
+ <div v-html="announcementItem.content" class="ql-editor" />
|
|
|
+ </div>
|
|
|
+ </a-modal>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import axios from 'axios'
|
|
|
+// 左侧组件
|
|
|
+import Systemstatus from './Systemstatus'
|
|
|
+import Notices from './Notices'
|
|
|
+import PublicSentiment from './PublicSentiment'
|
|
|
+// 中部组件
|
|
|
+import HomeViewBar from './HomeViewBar'
|
|
|
+import CenterMap from './CenterMap'
|
|
|
+import Centerbar from './Centerbar'
|
|
|
+// 右侧组件
|
|
|
+import QuestionCount from './QuestionCount'
|
|
|
+import QuestionLineChart from './QuestionLineChart'
|
|
|
+import FinishRate from './FinishRate'
|
|
|
+import ProblemPieChart from './ProblemPieChart'
|
|
|
+import DcdxDetails from './DcdxDetails'
|
|
|
+import FxwtDetails from './FxwtDetails'
|
|
|
+import DczDetails from './DczDetails'
|
|
|
+import DcryDetails from './DcryDetails'
|
|
|
+// API
|
|
|
+import request from '@/utils/gw_ajax_request'
|
|
|
+import { dateFormat } from '@/utils/gw_date'
|
|
|
+import {
|
|
|
+ BarsDczNums,
|
|
|
+ BarsDcyrNums,
|
|
|
+ BarsDcdxNums,
|
|
|
+ BarsFxwtNums,
|
|
|
+ BarsFxwtReportNums,
|
|
|
+ userAndGroup,
|
|
|
+ getcountPlan,
|
|
|
+ getProblemCountByProAndLevel,
|
|
|
+ getAddvCountGroup,
|
|
|
+ getAddvCountPerson,
|
|
|
+ getAddvCountObject,
|
|
|
+ getAddvCountProblem,
|
|
|
+ getAddvCountProblemForReport,
|
|
|
+ getTrendLineData,
|
|
|
+ getQustionCountData,
|
|
|
+} from '@/api/homeMainView'
|
|
|
+
|
|
|
+export default {
|
|
|
+ name: 'HomeMainView',
|
|
|
+ components: {
|
|
|
+ Systemstatus,
|
|
|
+ QuestionCount,
|
|
|
+ QuestionLineChart,
|
|
|
+ Notices,
|
|
|
+ HomeViewBar,
|
|
|
+ CenterMap,
|
|
|
+ Centerbar,
|
|
|
+ PublicSentiment,
|
|
|
+ FinishRate,
|
|
|
+ ProblemPieChart,
|
|
|
+ DcdxDetails,
|
|
|
+ FxwtDetails,
|
|
|
+ DczDetails,
|
|
|
+ DcryDetails,
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ backgroundChangeColor: 'background: rgba(255, 255, 255,1);',
|
|
|
+ transformScale: 1,
|
|
|
+ showAnnouncement: false,
|
|
|
+ announcementItem: {
|
|
|
+ "id": "c2219c04336a46bd92163bf0463a773e",
|
|
|
+ "type": null,
|
|
|
+ "title": "测试",
|
|
|
+ "content": "<p>测试</p>",
|
|
|
+ "url": null,
|
|
|
+ "note": null,
|
|
|
+ "persId": "89E69B31FE1344A98316A0153BA7386C",
|
|
|
+ "persNm": "王晓辰",
|
|
|
+ "orgId": "041",
|
|
|
+ "orgNm": "北京金水公司",
|
|
|
+ "pubState": "0",
|
|
|
+ "pubTm": null,
|
|
|
+ "intm": 1561363050000,
|
|
|
+ "uptm": 1561363050000
|
|
|
+ },
|
|
|
+ dczStatisticsData: {
|
|
|
+ total: 0,
|
|
|
+ byObjectType: [],
|
|
|
+ byAddv: [],
|
|
|
+ },
|
|
|
+ dcryStatisticsData: {
|
|
|
+ total: 0,
|
|
|
+ byObjectType: [],
|
|
|
+ byAddv: [],
|
|
|
+ },
|
|
|
+ dcdxStatisticsData: {
|
|
|
+ total: 0,
|
|
|
+ byObjectType: [],
|
|
|
+ byAddv: [],
|
|
|
+ },
|
|
|
+ fxwtStatisticsData: {
|
|
|
+ total: 0,
|
|
|
+ byObjectType: [],
|
|
|
+ byAddv: [],
|
|
|
+ },
|
|
|
+ jbyywtStatisticsData: {
|
|
|
+ total: 0,
|
|
|
+ byObjectType: [],
|
|
|
+ byAddv: [],
|
|
|
+ },
|
|
|
+ finishRateData: {
|
|
|
+ total: 0,
|
|
|
+ finishedCount: 0,
|
|
|
+ unfinishedCount: 0,
|
|
|
+ },
|
|
|
+ problemLevelStatisticsData: {
|
|
|
+ levelOne: 0,
|
|
|
+ levelTwo: 0,
|
|
|
+ levelThree: 0,
|
|
|
+ total: 0,
|
|
|
+ },
|
|
|
+ rightTimeLimit: '',
|
|
|
+ qustionsCountNums: '',
|
|
|
+ pblmStateForLine: '',
|
|
|
+ yData: [],
|
|
|
+ xData: [],
|
|
|
+ GlobalSttmTime: '',
|
|
|
+ GlobalEntmTime: '',
|
|
|
+ GlobalOrgIds: [],
|
|
|
+ GlobalObjectType: "",
|
|
|
+ GlobalAdCode: '',
|
|
|
+ GlobalFocusType: 'dcz',
|
|
|
+ mapTitleFocusName: '督查组',
|
|
|
+ mapPointColor: '#13C5A6',
|
|
|
+ barStartColor: '#76E9C0',
|
|
|
+ barEndColor: '#13C4B8',
|
|
|
+ barsChooseUnit: '组',
|
|
|
+ GlobalCenterMapUseData: [],
|
|
|
+ barsChooseType: '',
|
|
|
+ dczLists: [],
|
|
|
+ usersNum: 0,
|
|
|
+ grounpNum: 0,
|
|
|
+ transferUseLists: [],
|
|
|
+ dcdxTitle: '',
|
|
|
+ dcdxVisible: false,
|
|
|
+ dcdxAdcode: '',
|
|
|
+ fxwtTitle: '',
|
|
|
+ fxwtVisible: false,
|
|
|
+ dczVisible: false,
|
|
|
+ dcryVisible: false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ requestQuote() {
|
|
|
+ if (this.GlobalFocusType == 'jbyywt') {
|
|
|
+ return "1"
|
|
|
+ } else {
|
|
|
+ return ""
|
|
|
+ }
|
|
|
+ },
|
|
|
+ requestAdCode() {
|
|
|
+ if (this.GlobalAdCode) {
|
|
|
+ return this.GlobalAdCode
|
|
|
+ } else {
|
|
|
+ return ''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ requestSttmTime() {
|
|
|
+ if (this.GlobalSttmTime) {
|
|
|
+ return this.GlobalSttmTime
|
|
|
+ } else {
|
|
|
+ return dateFormat(new Date(), 'yyyy-01-01')
|
|
|
+ }
|
|
|
+ },
|
|
|
+ requestEntmTime() {
|
|
|
+ if (this.GlobalEntmTime) {
|
|
|
+ return this.GlobalEntmTime
|
|
|
+ } else {
|
|
|
+ return dateFormat(new Date(), 'yyyy-MM-dd')
|
|
|
+ }
|
|
|
+ },
|
|
|
+ requestOrgId() {
|
|
|
+ if (this.GlobalOrgIds && this.GlobalOrgIds.length > 0) {
|
|
|
+ return this.GlobalOrgIds.join(',')
|
|
|
+ } else {
|
|
|
+ return ''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ requestObjectType() {
|
|
|
+ if (this.GlobalObjectType) {
|
|
|
+ return this.GlobalObjectType
|
|
|
+ } else {
|
|
|
+ return ''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ lineUseSttmTime() {
|
|
|
+ return this.GlobalSttmTime
|
|
|
+ },
|
|
|
+ lineUseEntmTime() {
|
|
|
+ return this.GlobalEntmTime
|
|
|
+ },
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ msg(n) {
|
|
|
+ if (n == 'dark') {
|
|
|
+ this.backgroundChangeColor = 'background: linear-gradient(#1C204D, #0F067D);'
|
|
|
+ } else {
|
|
|
+ this.backgroundChangeColor = 'background: rgba(255, 255, 255,1);'
|
|
|
+ }
|
|
|
+ window.document.documentElement.setAttribute('data-theme', n)
|
|
|
+ },
|
|
|
+ rightTimeLimit() {
|
|
|
+ this.rightQustionLine()
|
|
|
+ },
|
|
|
+ pblmStateForLine() {
|
|
|
+ this.rightQustionLine()
|
|
|
+ },
|
|
|
+ requestSttmTime() {
|
|
|
+ this.getDynamicDataRefresh()
|
|
|
+ this.getLeftMap()
|
|
|
+ },
|
|
|
+ requestEntmTime() {
|
|
|
+ this.getDynamicDataRefresh()
|
|
|
+ this.getLeftMap()
|
|
|
+ },
|
|
|
+ requestOrgId() {
|
|
|
+ this.getDynamicDataRefresh()
|
|
|
+ this.getLeftMap()
|
|
|
+ this.rightQustionLine()
|
|
|
+ },
|
|
|
+ requestObjectType() {
|
|
|
+ this.getDynamicDataRefresh()
|
|
|
+ this.getLeftMap()
|
|
|
+ this.rightQustionLine()
|
|
|
+ },
|
|
|
+ GlobalFocusType(newValue) {
|
|
|
+ this.GlobalFocusType = newValue
|
|
|
+ this.getDynamicDataRefresh()
|
|
|
+ this.getLeftMap()
|
|
|
+ this.getAddVcdCountByType()
|
|
|
+ },
|
|
|
+ lineUseSttmTime() {
|
|
|
+ this.rightQustionLine()
|
|
|
+ },
|
|
|
+ lineUseEntmTime() {
|
|
|
+ this.rightQustionLine()
|
|
|
+ },
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ showStrDate(pubTm) {
|
|
|
+ const d = new Date(pubTm)
|
|
|
+ return dateFormat(d, 'yyyy-MM-dd')
|
|
|
+ },
|
|
|
+ showAnnouncementHandler(params) {
|
|
|
+ this.showAnnouncement = true
|
|
|
+ this.announcementItem = params.announcement.item
|
|
|
+ },
|
|
|
+ getLeftMap() {
|
|
|
+ const self = this
|
|
|
+ const searchParmas = {
|
|
|
+ endTime: this.requestEntmTime,
|
|
|
+ orgIds: this.requestOrgId,
|
|
|
+ startTime: this.requestSttmTime
|
|
|
+ }
|
|
|
+ const searchParmasForReportqustions = {
|
|
|
+ endTime: this.requestEntmTime,
|
|
|
+ orgIds: this.requestOrgId,
|
|
|
+ startTime: this.requestSttmTime,
|
|
|
+ quote: this.requestQuote,
|
|
|
+ }
|
|
|
+ axios.all([BarsDczNums(searchParmas), BarsDcyrNums(searchParmas), BarsDcdxNums(searchParmas), BarsFxwtNums(searchParmas), BarsFxwtReportNums(searchParmasForReportqustions)]).then(
|
|
|
+ axios.spread(function (dcz, dcry, dcdx, fxwt, jbyywt) {
|
|
|
+ self.dczStatisticsData.byObjectType = dcz.data
|
|
|
+ self.dcryStatisticsData.byObjectType = dcry.data
|
|
|
+ self.dcdxStatisticsData.byObjectType = dcdx.data
|
|
|
+ self.fxwtStatisticsData.byObjectType = fxwt.data
|
|
|
+ self.jbyywtStatisticsData.byObjectType = jbyywt.data
|
|
|
+
|
|
|
+ if (self.GlobalFocusType === 'dcz') {
|
|
|
+ self.transferUseLists = self.dczStatisticsData.byObjectType
|
|
|
+ } else if (self.GlobalFocusType === 'dcry') {
|
|
|
+ self.transferUseLists = self.dcryStatisticsData.byObjectType
|
|
|
+ } else if (self.GlobalFocusType === 'dcdx') {
|
|
|
+ self.transferUseLists = self.dcdxStatisticsData.byObjectType
|
|
|
+ } else if (self.GlobalFocusType === 'fxwt') {
|
|
|
+ self.transferUseLists = self.fxwtStatisticsData.byObjectType
|
|
|
+ } else {
|
|
|
+ self.transferUseLists = self.jbyywtStatisticsData.byObjectType
|
|
|
+ }
|
|
|
+ })
|
|
|
+ )
|
|
|
+ },
|
|
|
+ getBarsDczNum() {
|
|
|
+ const self = this
|
|
|
+ const searchParmas = {
|
|
|
+ endTime: this.requestEntmTime,
|
|
|
+ orgIds: this.requestOrgId,
|
|
|
+ pTypes: this.requestObjectType,
|
|
|
+ startTime: this.requestSttmTime
|
|
|
+ }
|
|
|
+ const searchParmasForReportqustions = {
|
|
|
+ endTime: this.requestEntmTime,
|
|
|
+ orgIds: this.requestOrgId,
|
|
|
+ pTypes: this.requestObjectType,
|
|
|
+ startTime: this.requestSttmTime,
|
|
|
+ quote: '1',
|
|
|
+ }
|
|
|
+
|
|
|
+ axios.all([BarsDczNums(searchParmas), BarsDcyrNums(searchParmas), BarsDcdxNums(searchParmas), BarsFxwtNums(searchParmas), BarsFxwtReportNums(searchParmasForReportqustions)]).then(
|
|
|
+ axios.spread(function (dcz, dcry, dcdx, fxwt, jbyywt) {
|
|
|
+ self.dczStatisticsData.byObjectType = dcz.data
|
|
|
+ self.dcryStatisticsData.byObjectType = dcry.data
|
|
|
+ self.dcdxStatisticsData.byObjectType = dcdx.data
|
|
|
+ self.fxwtStatisticsData.byObjectType = fxwt.data
|
|
|
+ self.jbyywtStatisticsData.byObjectType = jbyywt.data
|
|
|
+
|
|
|
+ self.dczStatisticsData.total = self.countSum(self.dczStatisticsData.byObjectType, 'total')
|
|
|
+ self.dcryStatisticsData.total = self.countSum(self.dcryStatisticsData.byObjectType, 'total')
|
|
|
+ self.dcdxStatisticsData.total = self.countSum(self.dcdxStatisticsData.byObjectType, 'total')
|
|
|
+ self.fxwtStatisticsData.total = self.countSum(self.fxwtStatisticsData.byObjectType, 'total')
|
|
|
+ self.jbyywtStatisticsData.total = self.countSum(self.jbyywtStatisticsData.byObjectType, 'total')
|
|
|
+
|
|
|
+ self.finishRateData.finishedCount = self.dcdxStatisticsData.total
|
|
|
+ self.finishRateData.unfinishedCount = self.dcdxStatisticsData.total - self.finishRateData.total
|
|
|
+ })
|
|
|
+ )
|
|
|
+ },
|
|
|
+ getUsersAndGroup() {
|
|
|
+ userAndGroup({}).then(res => {
|
|
|
+ this.usersNum = res.data.countPers
|
|
|
+ this.grounpNum = res.data.countGroup
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getDynamicDataRefresh() {
|
|
|
+ const self = this
|
|
|
+ function* generatorGetTheData() {
|
|
|
+ self.getHeaderBarsDataAndObjectTypeCount()
|
|
|
+ yield console.log('督查对象总数'); self.getPlanCount()
|
|
|
+ yield console.log('问题严重程度分布'); self.getProblemLevelCount()
|
|
|
+ yield console.log('问题线图'); self.rightQustionLine()
|
|
|
+ yield console.log('问题累计图'); self.rightQustionCount()
|
|
|
+ yield self.getAddVcdCountByType()
|
|
|
+ }
|
|
|
+ const gu = generatorGetTheData()
|
|
|
+ setInterval(function () {
|
|
|
+ gu.next()
|
|
|
+ }, 500)
|
|
|
+ },
|
|
|
+ getAllDataRefresh() {
|
|
|
+ this.getLeftMap()
|
|
|
+ this.getUsersAndGroup()
|
|
|
+ this.getDynamicDataRefresh()
|
|
|
+ },
|
|
|
+ getPlanCount() {
|
|
|
+ const self = this
|
|
|
+ self.finishRateData.total = 0
|
|
|
+ getcountPlan(this.requestEntmTime, this.requestOrgId, this.requestObjectType, this.requestSttmTime).then((res) => {
|
|
|
+ if (res.data && res.data.length > 0) {
|
|
|
+ let result = 0
|
|
|
+ res.data.forEach((item) => {
|
|
|
+ result += Number(item['total'])
|
|
|
+ })
|
|
|
+ self.finishRateData.total = result
|
|
|
+ self.finishRateData.unfinishedCount = self.finishRateData.total - self.finishRateData.finishedCount
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getProblemLevelCount() {
|
|
|
+ const self = this
|
|
|
+ self.problemLevelStatisticsData.levelOne = 0
|
|
|
+ self.problemLevelStatisticsData.levelTwo = 0
|
|
|
+ self.problemLevelStatisticsData.levelThree = 0
|
|
|
+ getProblemCountByProAndLevel(this.requestEntmTime, this.requestOrgId, this.requestObjectType, this.requestSttmTime).then((res) => {
|
|
|
+ if (res.data && res.data.length > 0) {
|
|
|
+ res.data.forEach((item) => {
|
|
|
+ item.pblmDtoList.forEach((inspPblm) => {
|
|
|
+ switch (inspPblm.inspPblmCate) {
|
|
|
+ case '0': self.problemLevelStatisticsData.levelOne += inspPblm.total; break
|
|
|
+ case '1': self.problemLevelStatisticsData.levelTwo += inspPblm.total; break
|
|
|
+ case '2': self.problemLevelStatisticsData.levelThree += inspPblm.total; break
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getAddVcdCountByType() {
|
|
|
+ const self = this
|
|
|
+ if (this.GlobalFocusType == 'dcz') {
|
|
|
+ getAddvCountGroup(this.requestEntmTime, this.requestOrgId, this.requestObjectType, this.requestSttmTime).then((res) => {
|
|
|
+ self.dczStatisticsData.byAddv = res.data
|
|
|
+ self.GlobalCenterMapUseData = self.dczStatisticsData.byAddv
|
|
|
+ })
|
|
|
+ } else if (this.GlobalFocusType == 'dcry') {
|
|
|
+ getAddvCountPerson(this.requestEntmTime, this.requestOrgId, this.requestObjectType, this.requestSttmTime).then((res) => {
|
|
|
+ self.dcryStatisticsData.byAddv = res.data
|
|
|
+ self.GlobalCenterMapUseData = self.dcryStatisticsData.byAddv
|
|
|
+ })
|
|
|
+ } else if (this.GlobalFocusType == 'dcdx') {
|
|
|
+ getAddvCountObject(this.requestEntmTime, this.requestOrgId, this.requestObjectType, this.requestSttmTime).then((res) => {
|
|
|
+ self.dcdxStatisticsData.byAddv = res.data
|
|
|
+ self.GlobalCenterMapUseData = self.dcdxStatisticsData.byAddv
|
|
|
+ })
|
|
|
+ } else if (this.GlobalFocusType == 'fxwt') {
|
|
|
+ getAddvCountProblem(this.requestEntmTime, this.requestOrgId, this.requestObjectType, this.requestSttmTime).then((res) => {
|
|
|
+ self.fxwtStatisticsData.byAddv = res.data
|
|
|
+ self.GlobalCenterMapUseData = self.fxwtStatisticsData.byAddv
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ getAddvCountProblemForReport(this.requestEntmTime, this.requestOrgId, this.requestObjectType, this.requestSttmTime, this.requestQuote).then((res) => {
|
|
|
+ self.jbyywtStatisticsData.byAddv = res.data
|
|
|
+ self.GlobalCenterMapUseData = self.jbyywtStatisticsData.byAddv
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ getHeaderBarsDataAndObjectTypeCount() {
|
|
|
+ this.getBarsDczNum()
|
|
|
+ },
|
|
|
+ getRightLineData() {},
|
|
|
+ barTypeChangeHandler(item) {
|
|
|
+ this.GlobalFocusType = item.id
|
|
|
+ this.barsChooseUnit = item.unit
|
|
|
+ this.mapTitleFocusName = item.spanName
|
|
|
+ this.mapPointColor = item.mapPointColor
|
|
|
+ this.barStartColor = item.barStartColor
|
|
|
+ this.barEndColor = item.barEndColor
|
|
|
+ },
|
|
|
+ globalTimeHandler(item) {
|
|
|
+ this.GlobalSttmTime = item.sttm
|
|
|
+ this.GlobalEntmTime = item.entm
|
|
|
+ },
|
|
|
+ rightQustionTimeLimit(item) {
|
|
|
+ this.rightTimeLimit = item
|
|
|
+ },
|
|
|
+ trendLineChartTypeHandler(item) {
|
|
|
+ this.pblmStateForLine = item
|
|
|
+ },
|
|
|
+ rightQustionLine() {
|
|
|
+ const self = this
|
|
|
+ getTrendLineData('', this.rightTimeLimit, this.requestOrgId, this.pblmStateForLine, this.lineUseSttmTime, this.lineUseEntmTime, this.requestObjectType).then((res) => {
|
|
|
+ const dataList = res.data
|
|
|
+ const exData = []
|
|
|
+ const eyData = []
|
|
|
+ if (this.rightTimeLimit == 'day') {
|
|
|
+ dataList.forEach(element => {
|
|
|
+ exData.push(element.name + '日')
|
|
|
+ eyData.push(element.value)
|
|
|
+ })
|
|
|
+ } else if (this.rightTimeLimit == 'week') {
|
|
|
+ dataList.forEach(element => {
|
|
|
+ exData.push(element.name)
|
|
|
+ eyData.push(element.value)
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ dataList.forEach(element => {
|
|
|
+ exData.push(element.name + '月')
|
|
|
+ eyData.push(element.value)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ self.xData = exData
|
|
|
+ self.yData = eyData
|
|
|
+ })
|
|
|
+ },
|
|
|
+ rightQustionCount() {
|
|
|
+ getQustionCountData().then((res) => {
|
|
|
+ this.qustionsCountNums = res.data
|
|
|
+ })
|
|
|
+ },
|
|
|
+ OrgListsEventToMainViewEvent(item) {
|
|
|
+ this.GlobalOrgIds = item
|
|
|
+ },
|
|
|
+ DctypeListsEventToMainViewEvent(item) {
|
|
|
+ this.GlobalObjectType = item
|
|
|
+ },
|
|
|
+ countSum(arr, valueNameToSum) {
|
|
|
+ let result = 0
|
|
|
+ if (arr && arr.length > 0) {
|
|
|
+ if (valueNameToSum && valueNameToSum != '') {
|
|
|
+ arr.forEach(item => {
|
|
|
+ result += Number(item[valueNameToSum])
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ arr.forEach(item => {
|
|
|
+ result += Number(item)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ result = 0
|
|
|
+ }
|
|
|
+ return result
|
|
|
+ },
|
|
|
+ mapClickHandler(params) {
|
|
|
+ this.dcdxAdcode = params.onClickAdCode
|
|
|
+ this.dcdxTitle = params.onClickAdName
|
|
|
+ if (this.GlobalFocusType == 'dcz') {
|
|
|
+ this.dczVisible = true
|
|
|
+ } else if (this.GlobalFocusType == 'dcry') {
|
|
|
+ this.dcryVisible = true
|
|
|
+ } else if (this.GlobalFocusType == 'dcdx') {
|
|
|
+ this.dcdxVisible = true
|
|
|
+ } else {
|
|
|
+ this.fxwtVisible = true
|
|
|
+ }
|
|
|
+ },
|
|
|
+ autoSetScale() {
|
|
|
+ const zoom = (window.innerHeight / 1080).toFixed(3)
|
|
|
+ this.transformScale = `scale(${zoom})`
|
|
|
+ this.width = `${(window.innerWidth * zoom).toFixed(2)}px`
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.getAllDataRefresh()
|
|
|
+ window.document.documentElement.setAttribute('data-theme', this.msg)
|
|
|
+ },
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+.mainDiv {
|
|
|
+ height: 100%;
|
|
|
+}
|
|
|
+
|
|
|
+/* 所有div基础样式 */
|
|
|
+.left > div,
|
|
|
+.middle > div,
|
|
|
+.right > div {
|
|
|
+ background: rgba(226,250,255,1);
|
|
|
+ box-shadow: 0px 1px 10px 0px rgba(160, 170, 199, 0.15);
|
|
|
+ border-radius: 2px;
|
|
|
+ margin-top: 5px;
|
|
|
+}
|
|
|
+.left > div:first-child,
|
|
|
+.middle > div:first-child,
|
|
|
+.right > div:first-child {
|
|
|
+ margin-top: 0;
|
|
|
+}
|
|
|
+
|
|
|
+/* 左侧 */
|
|
|
+.left {
|
|
|
+ width: 20%;
|
|
|
+ float: left;
|
|
|
+}
|
|
|
+.left_user {
|
|
|
+ height: 11.1vh;
|
|
|
+}
|
|
|
+.left_qusLineChart {
|
|
|
+ height: 46.62vh;
|
|
|
+}
|
|
|
+.left_notices {
|
|
|
+ height: 25.53vh;
|
|
|
+}
|
|
|
+
|
|
|
+/* 中部 */
|
|
|
+.middle {
|
|
|
+ width: 59.2%;
|
|
|
+ float: left;
|
|
|
+ margin-left: 5px;
|
|
|
+}
|
|
|
+.middle_button {
|
|
|
+ height: 11.1vh;
|
|
|
+}
|
|
|
+.middle_map {
|
|
|
+ height: 53.28vh;
|
|
|
+}
|
|
|
+.middle_map span {
|
|
|
+ font-size: 12px;
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
+.middle_bar {
|
|
|
+ height: 18.87vh;
|
|
|
+}
|
|
|
+
|
|
|
+/* 右侧 */
|
|
|
+.right {
|
|
|
+ width: 20%;
|
|
|
+ float: left;
|
|
|
+ margin-left: 5px;
|
|
|
+}
|
|
|
+.right_qus {
|
|
|
+ height: 11.1vh;
|
|
|
+}
|
|
|
+.right_line {
|
|
|
+ height: 24.42vh;
|
|
|
+}
|
|
|
+.right_pie_dcdx {
|
|
|
+ height: 22.2vh;
|
|
|
+}
|
|
|
+.right_pie_wtfb {
|
|
|
+ height: 24.64vh;
|
|
|
+}
|
|
|
+
|
|
|
+/* 暗色主题 */
|
|
|
+[data-theme="dark"] .left > div,
|
|
|
+[data-theme="dark"] .middle > div,
|
|
|
+[data-theme="dark"] .right > div {
|
|
|
+ background: transparent;
|
|
|
+ box-shadow: none;
|
|
|
+ border: 1px solid rgba(54, 162, 252, 1);
|
|
|
+}
|
|
|
+</style>
|