guoxiaohuan 4 rokov pred
rodič
commit
1a5b3974c3
71 zmenil súbory, kde vykonal 91230 pridanie a 337 odobranie
  1. 3 0
      .gitignore
  2. 12 6
      package.json
  3. 72 2
      public/index.html
  4. 6 6
      public/systemConf.js
  5. 9 2
      src/App.vue
  6. 50 1
      src/api/coreDeviceReport.js
  7. 5 0
      src/api/ganttChart.js
  8. 34 0
      src/api/homePage.js
  9. 2 2
      src/api/httputils.js
  10. 8 0
      src/api/room.js
  11. 4 0
      src/api/specificationUpdateRecord.js
  12. 39 0
      src/assets/CHN.geo2.json
  13. 31986 0
      src/assets/china.json
  14. 1594 0
      src/assets/cityData/济南区域.json
  15. 1447 0
      src/assets/cityData/青岛区域.json
  16. BIN
      src/assets/images/icons/1001.png
  17. BIN
      src/assets/images/icons/1002.png
  18. BIN
      src/assets/images/icons/1003.png
  19. BIN
      src/assets/images/icons/1004.png
  20. BIN
      src/assets/images/icons/1005.png
  21. BIN
      src/assets/images/icons/1006.png
  22. BIN
      src/assets/images/icons/1007.png
  23. BIN
      src/assets/images/icons/audit.png
  24. BIN
      src/assets/images/icons/contract.png
  25. BIN
      src/assets/images/icons/edit_blue_b.png
  26. BIN
      src/assets/images/icons/edit_red_b.png
  27. BIN
      src/assets/images/icons/edit_yellow_b.png
  28. BIN
      src/assets/images/icons/fix_blue_b.png
  29. BIN
      src/assets/images/icons/fix_red_b.png
  30. BIN
      src/assets/images/icons/fix_yellow_b.png
  31. BIN
      src/assets/images/icons/hydrant.png
  32. BIN
      src/assets/images/icons/ratio.png
  33. BIN
      src/assets/images/icons/right.png
  34. BIN
      src/assets/images/icons/search_blue_b.png
  35. BIN
      src/assets/images/icons/search_red_b.png
  36. BIN
      src/assets/images/icons/search_yellow_b.png
  37. BIN
      src/assets/images/warning.png
  38. BIN
      src/assets/images/图标/1001.png
  39. BIN
      src/assets/images/图标/1002.png
  40. BIN
      src/assets/images/图标/1003.png
  41. BIN
      src/assets/images/图标/1004.png
  42. BIN
      src/assets/images/图标/1005.png
  43. BIN
      src/assets/images/图标/1006.png
  44. BIN
      src/assets/images/图标/1007.png
  45. BIN
      src/assets/images/图标/供电系统_n.png
  46. BIN
      src/assets/images/图标/土建系统_n.png
  47. BIN
      src/assets/images/图标/土建系统_s.png
  48. BIN
      src/assets/images/图标/弱点系统_n.png
  49. BIN
      src/assets/images/图标/提示.png
  50. BIN
      src/assets/images/图标/暖通系统_n.png
  51. BIN
      src/assets/images/图标/消防系统_n.png
  52. BIN
      src/assets/images/图标/燃气系统_n.png
  53. BIN
      src/assets/images/图标/电梯系统_n.png
  54. BIN
      src/assets/images/图标/给排水系统_n.png
  55. 1 0
      src/components/Legend/src/legend.vue
  56. 4 4
      src/components/menuList.vue
  57. 1 0
      src/main.ts
  58. 68 66
      src/router/index.js
  59. 15 23
      src/store/index.js
  60. 438 0
      src/utils/ganttChart/GanttChart.js
  61. 26486 0
      src/utils/ganttChart/g.js
  62. 1 2
      src/views/Device/index.vue
  63. 338 201
      src/views/analysis/CoreDeviceReport.vue
  64. 184 6
      src/views/analysis/GanttChart.vue
  65. 82 12
      src/views/analysis/SpecificationUpdateRecord.vue
  66. 3 2
      src/views/equipment/table/lookPageTable.vue
  67. 461 0
      src/views/homepage/index.vue
  68. 5 2
      src/views/legendRules/index.vue
  69. 1378 0
      src/views/statistics/index.vue
  70. 26486 0
      static/g.js
  71. 8 0
      vue.config.js

+ 3 - 0
.gitignore

@@ -1,6 +1,9 @@
 .DS_Store
 node_modules
 package-lock.json
+/src/assets/geoData
+/src/assets/regionData
+/src/assets/provinceData
 /dist
 # 忽略提交打包后的wandaBmGuide目录
 /wandaBmGuide 

+ 12 - 6
package.json

@@ -8,20 +8,25 @@
         "lint": "vue-cli-service lint"
     },
     "dependencies": {
-        "@saga-web/base": "2.1.22",
-        "@saga-web/big": "1.0.67",
-        "@saga-web/draw": "2.1.100",
-        "@saga-web/feng-map": "1.0.19",
-        "@saga-web/graph": "2.1.102",
+        "@mapbox/geojson-merge": "^1.1.1",
+        "@saga-web/base": "2.1.19",
+        "@saga-web/big": "1.0.40",
+        "@saga-web/draw": "2.1.94",
+        "@saga-web/feng-map": "1.0.11",
+        "@saga-web/graph": "2.1.82",
         "ant-design-vue": "^1.4.10",
         "axios": "^0.19.2",
         "core-js": "^3.4.4",
         "element-ui": "^2.13.2",
+        "leaflet": "^1.6.0",
+        "leaflet-contextmenu": "^1.4.0",
+        "lodash": "^4.17.19",
         "meri-design": "^1.3.4",
         "moment": "^2.24.0",
         "quill": "^1.3.7",
         "vue": "^2.6.10",
         "vue-cookie": "^1.1.4",
+        "vue-pdf": "^4.1.0",
         "vue-quill-editor": "^3.0.6",
         "vue-router": "^3.1.3",
         "vuex": "^3.4.0"
@@ -43,6 +48,7 @@
         "fengmap": "^2.5.3",
         "less": "^3.0.4",
         "less-loader": "^5.0.0",
+        "lodash": "^4.17.19",
         "polybooljs": "^1.2.0",
         "style-resources-loader": "^1.3.3",
         "stylus": "^0.54.7",
@@ -52,4 +58,4 @@
         "vue-svg-loader": "^0.15.0",
         "vue-template-compiler": "^2.6.10"
     }
-}
+}

+ 72 - 2
public/index.html

@@ -1,3 +1,4 @@
+ 
 <!DOCTYPE html>
 <html lang="en">
 
@@ -8,15 +9,84 @@
     <link rel="icon" href="<%= BASE_URL %>favicon.ico">
     <script src="<%= BASE_URL %>systemConf.js"></script>
     <title>万达广场管理说明书</title>
+    <style>
+        .map-p-label{
+            background-color:transparent!important;
+            border:none!important;
+            box-shadow:none!important;
+        }
+        .leaflet-container{
+            background: #f7f9fa!important;
+        }
+        
+        .leaflet-popup-content-wrapper{
+            padding: 0px!important;
+            border-radius: 0px!important;
+            box-shadow: none!important;
+        }
+        .leaflet-popup-content-wrapper .leaflet-popup-content {
+            margin: 0!important;
+            min-width: 250px;
+            background: rgba(255, 255, 255, 0.5);
+            
+        }
+        .leaflet-mypopup-content {
+            padding: 8px 12px!important;
+        }
+        .leaflet-mypopup-content .title{
+            margin-bottom: 12px;
+        }
+        .leaflet-mypopup-content .title span{
+            font-size: 14px;
+            font-weight: bold;
+        }
+        .leaflet-mypopup-content .line {
+            margin-bottom: 12px;
+        }
+        .leaflet-mypopup-content .line span{
+            margin-right: 10px;
+        }
+        .leaflet-mypopup-content .line span:nth-of-type(1){
+            font-size: 12px;
+            color: #8D9399;
+        }
+        .leaflet-mypopup-content .line span:nth-of-type(2){
+            font-size: 16px;
+            color: #1F2429;
+        }
+        .leaflet-mypopup-content .line span:nth-of-type(3) i{
+            display: inline-block;
+            width: 16px;
+            height: 16px;
+            border-radius: 8px;
+            color: #F54E45;
+        }
+        .leaflet-mypopup-content .line span:nth-of-type(3) em{
+            font-size: 12px;
+            color: #F54E45;
+        }
+    </style>
+    <script>
+        var remHandle = function () {
+            var html = document.documentElement;
+            var width = html.clientWidth;
+            html.style.fontSize = width / 192 + 'px'; 
+        }
+        remHandle();
+        window.onresize = function () {
+            remHandle();
+        }
+    </script>
 </head>
 
 <body>
     <noscript>
         <strong>We're sorry but wandaspecificationofsanming doesn't work properly without JavaScript enabled. Please enable
             it to continue.</strong>
-    </noscript>
+        </noscript>
+    <script src="http://localhost/g.js" type="text/JavaScript"></script>
     <div id="app"></div>
-    <!-- built files will be auto injected -->
+ 
 </body>
 
 </html>

+ 6 - 6
public/systemConf.js

@@ -21,14 +21,14 @@
  */
 var __systemConf = {
     // 系统编码
-    systemCode: "wandaBmGuide",
+    systemCode: 'wandaBmGuide',
     conf: {
         // 阿里云
-        // editerUrl: "http://60.205.177.43:80/wandaEditer/", // 编辑器地址
-        // wandaBmGuideUrl: "http://60.205.177.43:80/wandaBmGuide/", //管理书地址
+        editerUrl: 'http://60.205.177.43:80/wandaEditer/', // 编辑器地址
+        wandaBmGuideUrl: 'http://60.205.177.43:80/wandaBmGuide/', //管理书地址
         // http://glsms.wanda-dev.cn/ 测试服
-        editerUrl: "http://glsms.wanda-dev.cn/wandaEditer/", // 编辑器地址
-        wandaBmGuideUrl: "http://glsms.wanda-dev.cn/wandaBmGuide/", //管理书地址
+        // editerUrl: "http://glsms.wanda-dev.cn/wandaEditer/", // 编辑器地址
+        // wandaBmGuideUrl: "http://glsms.wanda-dev.cn/wandaBmGuide/", //管理书地址
     },
 }
-window.__systemConf = __systemConf
+window.__systemConf = __systemConf

+ 9 - 2
src/App.vue

@@ -54,7 +54,14 @@ export default {
         },
         getMap() {
             if (!window.fengmapData) {
-                window.fengmapData = new SFengParser(`fengMap${this.id}`, `${this.mapServerURL}/fmap/${this.fmapID}`, this.key, this.appName, null, this.mapthemeUrl)
+                window.fengmapData = new SFengParser(
+                    `fengMap${this.id}`,
+                    `${this.mapServerURL}/fmap/${this.fmapID}`,
+                    this.key,
+                    this.appName,
+                    null,
+                    this.mapthemeUrl
+                )
                 window.fengmapData.loadMap(this.fmapID, () => {
                     // 获取主题数据
                     window.fengmapData.loadTheme(`${this.mapServerURL}/webtheme/${this.fmapID}/${this.fmapID}.theme`).then(res => {
@@ -261,4 +268,4 @@ body {
         width: 8%;
     }
 }
-</style>
+</style>

+ 50 - 1
src/api/coreDeviceReport.js

@@ -1,11 +1,60 @@
+/*
+ * @Author: your name
+ * @Date: 2020-07-03 19:04:47
+ * @LastEditTime: 2020-07-09 19:58:31
+ * @LastEditors: your name
+ * @Description: In User Settings Edit
+ * @FilePath: \wanda-bm-guide\src\api\coreDeviceReport.js
+ */
+
 // 核心设备报表 接口
 import httputils from '@/api/httputils'
 
 // 系统列表
+
 export function queryEquipmentList() {
     return httputils.getJson(`/data/v_glsms_systemcfg/querySmsxt`)
+
+    // export function queryEquipmentList() {
+    //     return httputils.getJson(`/data/v_glsms_systemcfg/querySmsxt`)
+}
+
+/**
+ * 系统列表
+ */
+export function querySystemList() {
+    return httputils.getJson(`/data/v_glsms_systemcfg/querySmsxt`)
 }
-// 表数据
+
+/**
+ * 系统下的设备
+ * @param { 接口地址 } url
+ * @param { 接口参数 } getParams
+ */
+export function queryEquipmentList(url, getParams) {
+    return httputils.getJson(url, getParams)
+}
+/**
+ * 表数据
+ */
 export function queryTableData(url, postParams) {
     return httputils.postJson(url, postParams)
 }
+
+/**
+ * 设备台账下所有历史事项信息
+ * @param { 接口地址 } url
+ * @param { 接口参数 } getParams
+ */
+export function queryHistoryTableData(url, getParams) {
+    return httputils.getJson(url, getParams)
+}
+
+/**
+ * 获取图片/报告详情
+ * @param { 接口地址 } url
+ * @param { 接口参数 } getParams
+ */
+export function queryDetailData(url, getParams) {
+    return httputils.getJson(url, getParams)
+}

+ 5 - 0
src/api/ganttChart.js

@@ -0,0 +1,5 @@
+import httputils from "@/api/httputils";
+
+export function queryGanttChart(url, getParams) {
+  return httputils.getJson(url, getParams);
+}

+ 34 - 0
src/api/homePage.js

@@ -0,0 +1,34 @@
+import httputils from "@/api/httputils"
+
+// 查询首页系统卡片
+export function getCardList({ getParams }) {
+    return httputils.getJson(`/data/home/querySystemCard`, getParams)
+}
+
+ // 综合事项记录
+export function getQueryList({ getParams }) {
+    return httputils.getJson(`/data/v_glsms_zhsxjl/query`, getParams)
+}
+
+// 说明书变更记录
+export function getChangeList({ getParams }) {
+    return httputils.getJson(`/data/rpt_change_record/query`, getParams)
+}
+
+
+
+// ==================== 集团首页接口 =======================
+// 查询项目信息统计数量
+export function getPlazaInfoCount({ getParams }) {
+    return httputils.getJson(`/data/home/queryPlazaInfoCount`, getParams)
+}
+
+// 查询首页系统卡片
+export function querySystemCard({ getParams }) {
+    return httputils.getJson(`/data/home/querySystemCard`, getParams)
+}
+
+// 查询集团首页事项状态统计
+export function queryEventStatus({ getParams }) {
+    return httputils.getJson(`/data/home/queryEventStatus`, getParams)
+}

+ 2 - 2
src/api/httputils.js

@@ -21,10 +21,10 @@ axiosservice.interceptors.request.use(
     (config) => {
         config.withCredentials = true // 允许携带token ,这个是解决跨域产生的相关问题
         let token = store.getters['ssoToken']
-        let isPreview = store.getters["isPreview"]
+        let isPreview = store.getters['isPreview']
         if (config.url.indexOf('mapapp') < 0) {
             config.headers = {
-                "sso-token": token,
+                'sso-token': token,
                 isPreview: isPreview, //默认false,当预览开启的时候是true
             }
         }

+ 8 - 0
src/api/room.js

@@ -1,3 +1,11 @@
+/*
+ * @Author: your name
+ * @Date: 2020-06-28 13:41:05
+ * @LastEditTime: 2020-07-06 11:43:33
+ * @LastEditors: your name
+ * @Description: In User Settings Edit
+ * @FilePath: \wanda-bm-guide\src\api\room.js
+ */ 
 import httputils from '@/api/httputils'
 
 // 机房-机房布置图

+ 4 - 0
src/api/specificationUpdateRecord.js

@@ -1,2 +1,6 @@
 // 说明说更新记录 接口
 import httputils from "@/api/httputils";
+
+export function getSpecificaltionData(url, param) {
+  return httputils.getJson(url, param);
+}

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 39 - 0
src/assets/CHN.geo2.json


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 31986 - 0
src/assets/china.json


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1594 - 0
src/assets/cityData/济南区域.json


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1447 - 0
src/assets/cityData/青岛区域.json


BIN
src/assets/images/icons/1001.png


BIN
src/assets/images/icons/1002.png


BIN
src/assets/images/icons/1003.png


BIN
src/assets/images/icons/1004.png


BIN
src/assets/images/icons/1005.png


BIN
src/assets/images/icons/1006.png


BIN
src/assets/images/icons/1007.png


BIN
src/assets/images/icons/audit.png


BIN
src/assets/images/icons/contract.png


BIN
src/assets/images/icons/edit_blue_b.png


BIN
src/assets/images/icons/edit_red_b.png


BIN
src/assets/images/icons/edit_yellow_b.png


BIN
src/assets/images/icons/fix_blue_b.png


BIN
src/assets/images/icons/fix_red_b.png


BIN
src/assets/images/icons/fix_yellow_b.png


BIN
src/assets/images/icons/hydrant.png


BIN
src/assets/images/icons/ratio.png


BIN
src/assets/images/icons/right.png


BIN
src/assets/images/icons/search_blue_b.png


BIN
src/assets/images/icons/search_red_b.png


BIN
src/assets/images/icons/search_yellow_b.png


BIN
src/assets/images/warning.png


BIN
src/assets/images/图标/1001.png


BIN
src/assets/images/图标/1002.png


BIN
src/assets/images/图标/1003.png


BIN
src/assets/images/图标/1004.png


BIN
src/assets/images/图标/1005.png


BIN
src/assets/images/图标/1006.png


BIN
src/assets/images/图标/1007.png


BIN
src/assets/images/图标/供电系统_n.png


BIN
src/assets/images/图标/土建系统_n.png


BIN
src/assets/images/图标/土建系统_s.png


BIN
src/assets/images/图标/弱点系统_n.png


BIN
src/assets/images/图标/提示.png


BIN
src/assets/images/图标/暖通系统_n.png


BIN
src/assets/images/图标/消防系统_n.png


BIN
src/assets/images/图标/燃气系统_n.png


BIN
src/assets/images/图标/电梯系统_n.png


BIN
src/assets/images/图标/给排水系统_n.png


+ 1 - 0
src/components/Legend/src/legend.vue

@@ -317,6 +317,7 @@ export default {
                 let viewTable = []
                 viewTable = res.data.Data ? res.data.Data : []
                 this.$store.commit('SETLEGENDTABLE', viewTable)
+
                 if (viewTable.length > 0) {
                     viewTable.forEach(el => {
                         if (el.Name == '主要设备房') {

+ 4 - 4
src/components/menuList.vue

@@ -47,12 +47,12 @@ export default {
         return {
             state: '',
             list: [
-                { name: '首页', state: false, route: 'first' },
+                { name: '首页', state: false, route: 'homepage' },
                 { name: '项目概况', state: false, route: 'overview' },
                 { name: '楼层功能', state: false, route: 'floorFunc' }, //楼层功能
                 { name: '设备设施', state: false, route: 'equipment' }, //设备设施
                 { name: '其他事项', state: false, route: 'other' }, //其他
-                { name: '分析 | 报表', state: false, route: 'analysis' }
+                { name: '分析|报表', state: false, route: 'analysis' }
             ],
             times: `${new Date().getFullYear()}.${formatTime(new Date().getMonth() + 1)}.${formatTime(new Date().getDate())} ${formatTime(
                 new Date().getHours()
@@ -62,7 +62,7 @@ export default {
             timer: null, //保存定时器
             // 路由词典
             dict: {
-                first: 1,
+                homepage: 1,
                 overview: 2,
                 floorFunc: 3,
                 equipment: 4,
@@ -109,7 +109,7 @@ export default {
                 }
             try {
                 // 调用接口
-                res = await queryDraftNum(data)
+                // res = await queryDraftNum(data)
             } catch (error) {
                 console.error(error)
             }

+ 1 - 0
src/main.ts

@@ -27,6 +27,7 @@ import cookies from 'vue-cookie'
 Vue.use(cookies)
 import Pui from 'meri-design'
 import 'meri-design/dist/index.css'
+import 'leaflet/dist/leaflet.css'
 Vue.use(Pui)
 
 new Vue({

+ 68 - 66
src/router/index.js

@@ -1,108 +1,110 @@
-import Vue from "vue"
-import store from "@/store"
-import VueRouter from "vue-router"
-import {
-    query
-} from "@/utils/query"
+import Vue from 'vue'
+import store from '@/store'
+import VueRouter from 'vue-router'
+import { query } from '@/utils/query'
 Vue.use(VueRouter)
-
 const routes = [
     // 登陆页面
     {
-        path: "/",
-        redirect: "/home/overview",
+        path: '/',
+        redirect: '/home/overview',
+    },
+    {
+        path: '/404',
+        component: () => import('../components/404'),
     },
     {
-        path: "/404",
-        component: () => import("../components/404"),
+        path: '/group',
+        component: () => import('../views/statistics/index'),
     },
     // home
     {
-        path: "/home",
-        name: "home",
-        component: () => import("../views/index"),
-        redirect: "/home/first",
-        children: [{
-                path: "first",
-                component: () => import("../views/first"),
+        path: '/home',
+        name: 'home',
+        component: () => import('../views/index'),
+        redirect: '/home/homepage',
+        children: [
+            {
+                path: 'homepage',
+                component: () => import('../views/homepage'),
             },
             //概览
             {
-                path: "overview",
-                component: () => import("../views/overview"),
+                path: 'overview',
+                component: () => import('../views/overview'),
             },
             // 楼层功能
             {
-                path: "floorFunc",
-                component: () => import("../views/floorFunc"),
+                path: 'floorFunc',
+                component: () => import('../views/floorFunc'),
             },
             // 设备设施
             {
-                path: "equipment",
-                component: () => import("../views/equipment"),
+                path: 'equipment',
+                component: () => import('../views/equipment'),
             },
             // 其他功能
             {
-                path: "other",
-                component: () => import("../views/other"),
+                path: 'other',
+                component: () => import('../views/other'),
             },
             // 分析
             {
-                path: "analysis",
-                component: () => import("../views/analysis"),
+                path: 'analysis',
+                component: () => import('../views/analysis'),
             },
             //图例库管理
             {
-                path: "legendLibrary",
-                component: () => import("../views/legendLibrary"),
+                path: 'legendLibrary',
+                component: () => import('../views/legendLibrary'),
             },
             //图例绘制规则
             {
-                path: "legendRules",
-                component: () => import("../views/legendRules"),
+                path: 'legendRules',
+                component: () => import('../views/legendRules'),
             },
         ],
     },
 ]
 const router = new VueRouter({
-    mode: "history",
+    mode: 'history',
     base: process.env.BASE_URL,
     routes,
 })
 //不需要token的路由
-const ignore = ["/404"]
+const ignore = ['/404']
 router.beforeEach(async (to, from, next) => {
-    if (!ignore.includes(to.path)) {
-        const token = query().token
-        const ssoToken = store.getters["ssoToken"]
-        if (ssoToken) {
-            store.commit("SETSSOTOKEN", ssoToken)
-            await store.dispatch("getUserInfo", router)
-            await store.dispatch("getFloors")
-            await store.dispatch("getBrand")
-            next()
-        } else if (token) {
-            store.commit("SETSSOTOKEN", token)
-            await store.dispatch("getUserInfo", router)
-            next()
-        } else {
-            let lastRoute = {
-                path: to.path,
-                params: to.params,
-                query: to.query,
-            }
-            store.commit("SETLASTROUTER", lastRoute)
-            let ssoServer = "http://oauth.wanda-dev.cn"
-            let systemcode = "CAD156",
-                signal = new Date().getTime(),
-                version = "1.0.0",
-                returnUrl = window.location.protocol + '//' + window.location.host
+    // if (!ignore.includes(to.path)) {
+    //     const token = query().token
+    //     const ssoToken = store.getters['ssoToken']
+    //     if (ssoToken) {
+    //         store.commit('SETSSOTOKEN', ssoToken)
+    // await store.dispatch('getUserInfo', router)
+    await store.dispatch('getFloors')
+    await store.dispatch('getBrand')
+    //         next()
+    //     } else if (token) {
+    //         store.commit('SETSSOTOKEN', token)
+    //         await store.dispatch('getUserInfo', router)
+    //         next()
+    //     } else {
+    //         let lastRoute = {
+    //             path: to.path,
+    //             params: to.params,
+    //             query: to.query,
+    //         }
+    //         store.commit('SETLASTROUTER', lastRoute)
+    //         let ssoServer = 'http://oauth.wanda-dev.cn'
+    //         let systemcode = 'CAD156',
+    //             signal = new Date().getTime(),
+    //             version = '1.0.0',
+    //             returnUrl = window.location.protocol + '//' + window.location.host
 
-            window.location.href = `${ssoServer}/login?systemcode=${systemcode}&signal=${signal}&version=${version}`
-        }
-    } else {
-        next()
-        return
-    }
+    //         window.location.href = `${ssoServer}/login?systemcode=${systemcode}&signal=${signal}&version=${version}`
+    //     }
+    // } else {
+    next()
+    //     return
+    // }
 })
-export default router
+export default router

+ 15 - 23
src/store/index.js

@@ -1,13 +1,7 @@
 import Vue from 'vue'
 import Vuex from 'vuex'
-import {
-    login,
-    queryFloor,
-    queryfmapID
-} from '@/api/login.js'
-import {
-    queryBrand
-} from '@/api/public.js'
+import { login, queryFloor, queryfmapID } from '@/api/login.js'
+import { queryBrand } from '@/api/public.js'
 import axios from 'axios'
 import router from '../router'
 
@@ -117,21 +111,19 @@ export default new Vuex.Store({
     },
     actions: {
         // 获取项目列表、userId
-        async getUserInfo({
-            commit
-        }, palyload) {
+        async getUserInfo({ commit }, palyload) {
             await login({}).then((res) => {
-                if (res.result == 'success') {
-                    // token校验成功 拿到权限
-                    //commit("SETISREQUESTtAUTH", true)
-                    if (res.permissions.length == 0) {
-                        router.push('/404')
-                    }
-                    commit('SETAUTHMSG', res)
-                } else {
-                    commit('SETISREQUESTtAUTH', false)
-                    router.push('/404')
-                }
+                // if (res.result == 'success') {
+                //     // token校验成功 拿到权限
+                //     //commit("SETISREQUESTtAUTH", true)
+                //     if (res.permissions.length == 0) {
+                //         router.push('/404')
+                //     }
+                //     commit('SETAUTHMSG', res)
+                // } else {
+                //     commit('SETISREQUESTtAUTH', false)
+                //     router.push('/404')
+                // }
             })
         },
         getFloors(context) {
@@ -169,4 +161,4 @@ export default new Vuex.Store({
         },
     },
     modules: {},
-})
+})

+ 438 - 0
src/utils/ganttChart/GanttChart.js

@@ -0,0 +1,438 @@
+import moment from 'moment';
+/**
+ * 数据定义区域
+ *
+ */
+/**
+ * 甘特图
+ * @param {} options 
+ */
+export function GanttChart(options) {
+  // 任务列表
+  this.tasks = options.tasks || [];
+  // AntVG Canvas
+  this.gCanvas = null;
+  // 视口宽度 800,可视区域
+  this.viewWidth = options['viewWidth'] || 800;
+  // 物理画布宽度 800
+  this.cWidth = options['cWidth'] || 2400;
+  this.cHeight = options['cHeight'] || 600;
+  // 画布偏移位置
+  this.startPos = 0;
+  // 是否拖动中
+  this.draging = false;
+  // 开始拖动事件
+  this.startEvent = null;
+  // 结束拖动事件
+  this.endEvent = null;
+  // 拖动过程事件
+  this.dragingEvent = null;
+  // 拖动偏移量
+  this.offsetDis = options['viewWidth'] || 800;
+  // 拖动定时器
+  this.dragTimer = null;
+  // 每天的间隔宽度
+  this.dayStep = 40;
+  // 分组标题高度
+  this.groupTitleHeight = 38;
+  // 任务矩形高度
+  this.taskRowHeight = 16;
+  // 每行任务的纵向间距
+  this.rowSpanDis = 22;
+  // 总天数
+  this.daysCount = options['daysCount'] || 60;
+  // 任务图距离顶部高度
+  this.graphTopDis = 20
+  
+  // 每像素代表的小时数
+  this.timePerPix = this.cWidth/this.daysCount/24/3600
+  // 当前视图开始时间,向前推N天
+  this.startAt = moment().subtract(this.daysCount / 3, 'days');
+  this.endAt = moment(this.startAt).add(this.daysCount, 'days');
+  this.graphDiv = document.getElementById(options['chartContainer']);
+  // 图形容器组
+  this.graphGroup = null;
+  // 上一次拖动的事件
+  this.lastDragEv = null;
+  // 回调事件
+  this.callback = options.callback || null;
+}
+
+
+/**
+ * 设置数据
+ * @param {*} _tasks 
+ */
+GanttChart.prototype.changeTasks = function(_tasks){
+  this.tasks = _tasks
+}
+
+/**
+ * 打开关闭分组
+ */
+
+GanttChart.prototype.toggle = function(index) {
+  if (this.tasks[index].open) {
+    this.tasks[index].open = false;
+  } else {
+    this.tasks[index].open = true;
+  }
+  this.processData();
+  this.drawTasks();
+}
+
+/**
+ * 预处理数据
+ */
+GanttChart.prototype.processData = function() {
+  for (let i = 0; i < this.tasks.length; i++) {
+    let currentTopTask = this.tasks[i];
+    let lastTopTask = null;
+    currentTopTask.renderOptions = {};
+    if (i != 0) {
+      // 非0个,要补上前面的数据
+      lastTopTask = this.tasks[i - 1];
+      currentTopTask.renderOptions.startY = lastTopTask.renderOptions.endY + 20;
+    } else {
+      // 第一个
+      currentTopTask.renderOptions.startY = this.graphTopDis;
+    }
+    if (currentTopTask.open) {
+      currentTopTask.renderOptions.endY =
+        currentTopTask.renderOptions.startY + this.rowSpanDis + this.groupTitleHeight + currentTopTask.dataList.length * this.taskRowHeight;
+    } else {
+      currentTopTask.renderOptions.endY = currentTopTask.renderOptions.startY + this.groupTitleHeight;
+    }
+  }
+}
+
+/**
+ * 强制清空图像,重绘
+ */
+GanttChart.prototype.forceRefreshGraph = function() {
+  this.tasks.forEach((topTask) => {
+    topTask.gGroup = null;
+  });
+  this.gCanvas.destroy();
+  this.initDrawingReady();
+}
+
+/**
+ * 准备绘制,用于初始化和强制刷新
+ */
+GanttChart.prototype.initDrawingReady = function() {
+  this.initCanvas();
+  this.initDragHandler();
+  this.drawTimeZone();
+  this.processData();
+  this.drawTasks();
+  this.graphGroup = null
+}
+
+/**
+ * 翻页
+ */
+GanttChart.prototype.pageTo = function(dir = 'next') {
+  if (dir == 'next') {
+    // 向后翻页`
+    this.startAt = this.startAt.add(this.daysCount, 'days');
+    this.offsetDis = 0
+  } else {
+    // 向前翻页
+    this.startAt = this.startAt.subtract(this.daysCount, 'days');
+    this.offsetDis = 2*this.viewWidth
+  }
+  this.endAt = moment(this.startAt).add(this.daysCount, 'days');
+  console.log('已翻页', this.startAt.format('YYYY-MM-DD'),this.endAt.format('YYYY-MM-DD'), this.offsetDis);
+  // offsetDis = viewWidth;
+  this.forceRefreshGraph();
+}
+// 上次点击时间,用于滚动时误触停止
+let lastClickAt = null;
+/**
+ * 执行拖动
+ * 改变graphDiv 滚动距离
+ * 到达边界距离后,刷新页面
+ */
+GanttChart.prototype.doDrag = function(sEvent, eEvent) {
+  if (sEvent == null) {
+    sEvent = this.startEvent;
+  }
+  
+  let sPos = sEvent.clientX;
+  let cPos = eEvent.clientX;
+  // 滚动距离
+  let dis = cPos - sPos;
+  let tempDis = this.offsetDis
+  // console.log('offsetDis before:', this.offsetDis, dis)
+  this.offsetDis = this.offsetDis - dis / 2;
+  // console.log('draging...',tempDis, this.offsetDis, dis)
+  if (this.offsetDis <= -20) {
+    // 向前滑动,向前翻页
+    console.log('此处应该向前翻页', this.startAt.format('YYYY-MM-DD'),this.endAt.format('YYYY-MM-DD'),this.offsetDis);
+    this.offsetDis = this.viewWidth;
+    this.pageTo('prev');
+  }
+  if (this.offsetDis - 20 >= 2964 ){ //cWidth - viewWidth) {
+    // 向后滑动,向后翻页
+    console.log('此处应该向后翻页', this.startAt.format('YYYY-MM-DD'),this.endAt.format('YYYY-MM-DD'),this.offsetDis);
+    this.offsetDis = this.viewWidth;
+    this.pageTo('next');
+  }
+  this.graphDiv.scrollLeft = this.offsetDis;
+}
+
+/**
+ * 初始化抓取拖动事件
+ */
+
+GanttChart.prototype.initDragHandler = function() {
+  this.graphDiv.scrollLeft = this.offsetDis;
+  let _canvas = document.getElementsByTagName('canvas')[1];
+  _canvas.addEventListener('mousedown', (ev) => {
+    this.draging = true;
+    this.startEvent = ev;
+    this.dragingEvent = null;
+    this.endEvent = null;
+    this.lastClickAt = new Date();
+    this.lastClickAt = ev;
+    this.lastDragEv = ev;
+  });
+
+  _canvas.addEventListener('mouseup', (ev) => {
+    this.draging = false;
+    this.endEvent = ev;
+  });
+
+  _canvas.addEventListener('mousemove', (ev) => {
+    // console.log('this over', this)
+    if (this.draging) {
+      if (new Date() - this.lastClickAt < 20) {
+        return false;
+      }
+      this.dragingEvent = ev;
+      this.doDrag(this.lastDragEv, ev);
+      this.lastDragEv = ev;
+    }
+  });
+  _canvas.addEventListener('mouseleave', (ev) => {
+    console.log('leave...恢复')
+    this.draging = false;
+    this.endEvent = ev;
+  });
+}
+/**
+ * 初始化画布
+ *
+ */
+
+GanttChart.prototype.initCanvas = function() {
+  this.gCanvas = new G.Canvas({
+    container: 'ganttContainer',
+    width: this.cWidth,
+    height: 800,
+  });
+}
+
+/**
+ * 绘制时间区域
+ */
+
+GanttChart.prototype.drawTimeZone = function() {
+  console.log('时间段', this.startAt.format('YYYY-MM-DD'),this.endAt.format('YYYY-MM-DD'));
+  let start = moment(this.startAt);
+  let timeGroup = this.gCanvas.addGroup();
+  timeGroup._tname = 'TimeGroup';
+  // 绘制第一级
+  timeGroup.addShape('text', {
+    attrs: {
+      x: 20,
+      y: 20,
+      fontSize: 12,
+      text: start.format('YYYY-MM'),
+      lineDash: [10, 10],
+      fill: '#8D9399',
+    },
+  });
+  timeGroup.addShape('text', {
+    attrs: {
+      x: 20 + this.viewWidth,
+      y: 20,
+      fontSize: 12,
+      text: start.add(this.daysCount / 3, 'days').format('YYYY-MM'),
+      lineDash: [10, 10],
+      fill: '#8D9399',
+    },
+  });
+  timeGroup.addShape('text', {
+    attrs: {
+      x: 20 + this.viewWidth * 2,
+      y: 20,
+      fontSize: 12,
+      text: start.add(this.daysCount / 3, 'days').format('YYYY-MM'),
+      lineDash: [10, 10],
+      fill: '#8D9399',
+    },
+  });
+  let startSecond = moment(this.startAt);
+  // 绘制第二级
+  for (let i = 0; i < this.daysCount; i++) {
+    let timeText = startSecond.add(1, 'days').format('DD');
+    timeGroup.addShape('text', {
+      attrs: {
+        x: 40 * i,
+        y: 40,
+        fontSize: 10,
+        text: timeText,
+        lineDash: [10, 10],
+        fill: '#8D9399',
+      },
+    });
+  }
+}
+
+/**
+ * 处理点击
+ */
+GanttChart.prototype.handleClick = function(task, flag, ev) {
+  // let detailDiv = document.getElementById('detailDiv')
+  if(flag == 'enter'){
+    // detailDiv.style.display = 'block'
+    // detailDiv.style.left = ev.clientX+'px';
+    // detailDiv.style.top = ev.clientY+'px';
+    // document.getElementById('detailTaskName').textContent = task._pdata.description
+    // document.getElementById('detailTaskStatus').textContent = task._pdata.status
+    // document.getElementById('detailTaskStartDate').textContent = task._pdata.startDate
+    // document.getElementById('detailTaskEndDate').textContent = task._pdata.endDate
+    console.log('show:', task);
+  } else if (flag === 'leave'){
+    // detailDiv.style.display = 'none'
+    console.log('hide:', task);
+  } else {
+    this.callback(task);
+    console.log('click:', task);
+  }
+}
+
+
+/**
+ * 根据任务状态区分颜色
+ * 
+ */
+GanttChart.prototype.statusColor =function(task) {
+  switch (task.status) {
+    case '按时完成':
+      return 'aqua';
+      break;
+    case '计划批准':
+      return '#ff9800';
+      break;
+    case '已完成':
+      return '#19b720';
+      break;
+    default:
+      break;
+  }
+}
+
+/**
+ * 判断任务是否在视图内
+ * 
+ */ 
+GanttChart.prototype.isInView = function(task) {
+  let isLessThanEndAt = (task.endDate <= this.startAt.format('YYYY-MM-DD'))
+  let isGreaterThanStartAt = task.startDate >= this.endAt.format('YYYY-MM-DD')
+  return !(isLessThanEndAt || isGreaterThanStartAt)
+}
+
+/**
+ * 分组绘制任务块
+ *
+ */
+
+GanttChart.prototype.drawTasks = function() {
+  if (this.graphGroup) {
+    this.graphGroup.clear();
+  } else {
+    this.graphGroup = this.gCanvas.addGroup();
+    this.graphGroup._tname = 'graphGroup';
+  }
+  // 第一层循环,用于分组,例如,维保--xxxx
+  this.tasks.forEach((topTask, topIndex) => {
+    if (topTask.open) {
+      let taskGroup = null;
+      taskGroup = this.graphGroup.addGroup();
+      taskGroup._tname = 'TaskGroup_' + topTask.id;
+      topTask.gGroup = taskGroup;
+      // 第二层循环,用于 区分具体多少任务,例如,维保-商管1/商管2...    
+      topTask.dataList.forEach((taskP, index) => {                            
+        let taskPGroup = taskGroup.addGroup();
+        taskGroup.addGroup(taskPGroup);
+        // 第三层循环,用户区分每个子任务的执行时间段,例如:维保-商管1-2020.05-2020.06 / 2020.08- 2020.09
+        taskP.tasks.forEach((_taskItem, _index) => {
+          let _isInView = this.isInView(_taskItem)
+          // 在视图中才显示
+          if(_isInView){
+            let pos = this.calRectPos(_taskItem);
+            // console.log('render rect:', _taskItem, pos, topTask.renderOptions.startY + index * taskRowHeight);
+            let rectEl = taskPGroup.addShape('rect', {
+              attrs: {
+                x: pos.x,
+                y: topTask.renderOptions.startY + (index* (this.taskRowHeight + this.rowSpanDis)),
+                width: pos.width,
+                height: this.taskRowHeight,
+                fill: this.statusColor(_taskItem),
+                stroke: 'black',
+                radius: [2, 4],
+              },
+            });
+            rectEl._pdata = _taskItem;
+            rectEl.on('mouseover', (ev) => {
+              this.handleClick(ev.target, 'enter', ev);
+            });
+            rectEl.on('mouseleave', (ev) => {
+              this.handleClick(ev.target, 'leave', ev);
+            });
+            rectEl.on('click', (ev) => {
+              this.handleClick(ev.target, 'click', ev);
+            });
+          }
+        });
+      });
+
+      taskGroup.show();
+    } else {
+      if (topTask.gGroup) {
+        // topTask.gGroup.hide()
+        topTask.gGroup = null;
+      }
+    }
+  });
+}
+
+/**
+ * 根据 Task 计算矩形位置
+ *
+ */
+GanttChart.prototype.calRectPos = function(taskItem) {
+  let duraStartAt = new Date(taskItem.startDate) - new Date(this.startAt.format('YYYY-MM-DD'));
+  let secondsStartAt = duraStartAt/1000
+
+  let duraEndAt = new Date(taskItem.endDate) - new Date(taskItem.startDate);        
+  let secondsEndAt = duraEndAt/1000
+  return {
+    x: secondsStartAt * this.timePerPix,
+    y: 0,
+    width: secondsEndAt * this.timePerPix,
+    height: 0,
+  };
+}
+
+/**
+ * 主函数
+ *
+ */
+
+GanttChart.prototype.main = function() {  
+  this.initDrawingReady();
+}

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 26486 - 0
src/utils/ganttChart/g.js


+ 1 - 2
src/views/Device/index.vue

@@ -7,8 +7,7 @@
     />
 
     <Modal
-      :obj="
-      obj"
+      :obj="obj"
       :routerName="routerName"
       @handlerouterName="handlerouterName"
     />

+ 338 - 201
src/views/analysis/CoreDeviceReport.vue

@@ -1,139 +1,156 @@
 <!-- 核心设备报表 -->
 <template>
-    <div class='core-device-report'>
-        <div class='main-left'>
-            <Select
-                class='system-select'
-                width='217'
-                :isReadOnly='true'
-                tipPlace='top'
-                caption='系统名称:'
-                @change='changeCurSystem'
-                v-model='systemName'
-                :selectdata='systemList'
-                :placeholder='"请选择"'
-            />
-            <div class='system-content'>
-                <div
-                    v-for='(item) in systemContentData'
-                    :key='"key_" + item.id'
-                    class='item-content'
-                    :class='{"active": item.isActive}'
-                    @click='changeEquipment(item.id)'
-                >
-                    <div class='first-row'>
-                        <div>{{item.name}}</div>
-                        <div>{{item.isMaintenance?'维保中' : ''}}</div>
-                    </div>
-                    <div class='sec-row'>
-                        <div>
-                            {{item.num}}
-                            <span>台</span>
-                        </div>
-                        <span :class='{"abnormal": item.abnormal}'>{{item.statusNum !== 0?item.statusNum : ''}}</span>
-                    </div>
-                </div>
-            </div>
+  <div class="core-device-report">
+    <div class="main-left">
+      <Select 
+        class="system-select"
+        width="217"
+        :isReadOnly="true" 
+        tipPlace="top" 
+        caption="系统名称:"
+        @change="changeCurSystem" 
+        v-model="systemId" 
+        :selectdata="systemList"
+        :placeholder="'请选择'"
+      />
+      <div class="system-content">
+        <div v-for="(item) in systemContentData" :key="'key_' + item.id" class="item-content" :class="{'active': item.isActive}" @click="changeEquipment(item.id)">
+          <div class="first-row">
+            <div>{{item.name}}</div>
+            <div>{{item.isMaintenance?'维保中' : ''}}</div>
+          </div>
+          <div class="sec-row">
+            <div>{{item.num}}<span>台</span></div>
+            <span :class="{'abnormal': item.abnormal}">{{item.statusNum !== 0?item.statusNum : ''}}</span>
+          </div>
         </div>
-        <div class='main-right'>
-            <div class='search-container'>
-                <Input iconType='search' v-model='searchKey' placeholder='搜索' width='192' />
-            </div>
-            <el-table :data='tableData' style='width: 100%;margin-bottom: 63px;' @row-click='showEquipmentStatus'>
-                <el-table-column label='序号' type='index' :index='indexMethod'></el-table-column>
-                <el-table-column prop='sbjc' label='设备简称'></el-table-column>
-                <el-table-column prop='assetnum' label='设备编号'></el-table-column>
-                <el-table-column prop='is_exception' label='状态'>
-                    <template slot-scope='scope'>
-                        <span
-                            style='display: inline-block;width: 6px;height:6px;border-radius: 3px;background: #0091FF;'
-                            :style='{"background": !scope.row.is_exception?"#0091FF" : "#F54E45"}'
-                        ></span>
-                        <span style='margin-left: 10px'>{{ !scope.row.status?'正常' : '异常' }}</span>
-                    </template>
-                </el-table-column>
-                <el-table-column prop='photos_num' label='照片'>
-                    <template slot-scope='scope'>
-                        <span style='color: #025BAA'>{{ scope.row.photos_num?scope.row.photos_num : 0 }}张</span>
-                    </template>
-                </el-table-column>
-                <el-table-column prop='report' label='报告'>
-                    <template slot-scope='scope'>
-                        <span style='color: #025BAA'>{{ scope.row.report }}</span>
-                    </template>
-                </el-table-column>
-            </el-table>
-            <div class='page'>
-                <el-pagination
-                    background
-                    layout='prev, pager, next'
-                    :total='tatol'
-                    :current-page='curPage'
-                    :page-size='pageSize'
-                    @current-change='changeTablePage'
-                ></el-pagination>
-            </div>
-            <el-dialog title='交换机-照明系统' :visible.sync='dialogTableVisible'>
-                <el-date-picker
-                    style='margin-bottom: 12px;'
-                    v-model='dialogTime'
-                    type='daterange'
-                    range-separator='至'
-                    start-placeholder='开始日期'
-                    end-placeholder='结束日期'
-                ></el-date-picker>
-                <el-table :data='tableData' style='margin-bottom: 55px'>
-                    <el-table-column property='serialNumber' label='日期'></el-table-column>
-                    <el-table-column property='equipmentName' label='事项类型'></el-table-column>
-                    <el-table-column property='equipmentNumber' label='事项名称'></el-table-column>
-                    <el-table-column property='photos_num' label='照片'>
-                        <template slot-scope='scope'>
-                            <span style='color: #025BAA'>{{ scope.row.photos_num?scope.row.photos_num : 0 }}张</span>
-                        </template>
-                    </el-table-column>
-                    <el-table-column property='report' label='报告'>
-                        <template slot-scope='scope'>
-                            <span style='color: #025BAA'>{{ scope.row.report }}</span>
-                        </template>
-                    </el-table-column>
-                </el-table>
-                <div class='page'>
-                    <el-pagination background layout='prev, pager, next' :total='tatol'></el-pagination>
-                </div>
-            </el-dialog>
+      </div>
+    </div>
+    <div class="main-right">
+      <div class="search-container">
+        <Input iconType="search" v-model="searchKey" placeholder="搜索" width="192"/>
+      </div>
+      <el-table :data="tableData" style="width: 100%;margin-bottom: 63px;" @row-click="showEquipmentStatus">
+        <el-table-column label="序号" type="index" :index="indexMethod"></el-table-column>
+        <el-table-column prop="sbjc" label="设备简称"></el-table-column>
+        <el-table-column prop="assetnum" label="设备编号"></el-table-column>
+        <el-table-column prop="is_exception" label="状态">
+          <template slot-scope="scope">
+            <span style="display: inline-block;width: 6px;height:6px;border-radius: 3px;background: #0091FF;" :style="{'background': !scope.row.is_exception?'#0091FF' : '#F54E45'}"></span>
+            <span style="margin-left: 10px">{{ !scope.row.is_exception?'正常' : '异常' }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="photos_num" label="照片">
+          <template slot-scope="scope">
+            <!-- <span style="color: #025BAA">{{ scope.row.photos_num || scope.row.photos_num === 0?(scope.row.photos_num + '张') : '—' }}</span> -->
+            <span style="color: #025BAA" @click="showPicturesDetail(scope.row)">1张</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="attachments_num" label="报告">
+          <template slot-scope="scope">
+            <span style="color: #025BAA">{{ scope.row.attachments_num || scope.row.attachments_num === 0?(scope.row.attachments_num+ '张') : '—'}}</span>
+          </template>
+        </el-table-column>
+      </el-table>
+      <div class="page">
+        <el-pagination
+          background
+          layout="prev, pager, next"
+          :total="tatol"
+          :current-page="curPage"
+          :page-size="pageSize"
+          @current-change="changeTablePage">
+        </el-pagination>
+      </div>
+      <el-dialog title="交换机-照明系统" :visible.sync="dialogTableVisible" width="1260px">
+        <el-date-picker
+          style="margin-bottom: 12px;"
+          v-model="dialogTime"
+          type="daterange"
+          range-separator="至"
+          @change="changeTime"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期">
+        </el-date-picker>
+        <el-table :data="historyTableData" style="margin-bottom: 55px;" max-height="500">
+          <el-table-column width="200" property="finishDate" label="日期"></el-table-column>
+          <el-table-column width="100" property="typeName" label="事项类型"></el-table-column>
+          <el-table-column property="taskName" label="事项名称"></el-table-column>
+          <el-table-column width="100" property="photosNum" label="照片">
+            <template slot-scope="scope">
+              <!-- <span style="color: #025BAA">{{ scope.row.photosNum || scope.row.photosNum === 0?(scope.row.photosNum + '张') : '—' }}</span> -->
+              <span style="color: #025BAA" @click="showPicturesDetail(scope.row)">1张</span>
+            </template>
+          </el-table-column>
+          <el-table-column width="100" property="attachmentsNum" label="报告">
+            <template slot-scope="scope">
+              <span style="color: #025BAA">{{ scope.row.attachmentsNum || scope.row.attachmentsNum === 0?(scope.row.attachmentsNum+ '张') : '—'}}</span>
+            </template>
+          </el-table-column>
+        </el-table>
+        <div class="page">
+          <el-pagination
+            background
+            layout="prev, pager, next"
+            :current-page="hisCurPage"
+            :page-size="hisPageSize"
+            :total="hisTotal"
+            @current-change="changeHisTablePage">
+          </el-pagination>
+        </div>
+      </el-dialog>
+      <el-dialog :title="detailTitle" :visible.sync="showDetail" width="1260px">
+        <div class="detail-container">
+          <div class="pictures-menu">
+
+          </div>
         </div>
+      </el-dialog>
     </div>
 </template>
 
 <script>
-import { Select, Input } from 'meri-design'
-import { queryEquipmentList, queryTableData } from '../../api/coreDeviceReport'
-import _ from 'lodash'
+import { Select, Input } from 'meri-design';
+import { querySystemList, queryEquipmentList, queryTableData, queryHistoryTableData, queryDetailData } from '../../api/coreDeviceReport';
+import _ from 'lodash';
+import moment from 'moment';
 export default {
-    data() {
-        return {
-            systemName: '', // 系统名称
-            systemList: [], // 系统
-            systemContentData: [
-                { id: 1, name: '高压配电柜', isMaintenance: true, num: 95, statusNum: 0, abnormal: false, isActive: true },
-                { id: 2, name: '变压器', isMaintenance: false, num: 256, statusNum: 12, abnormal: true, isActive: false },
-                { id: 3, name: '低压配电柜', isMaintenance: false, num: 354, statusNum: 0, abnormal: false, isActive: false },
-                { id: 4, name: '直流屏', isMaintenance: false, num: 175, statusNum: 0, abnormal: false, isActive: false },
-                { id: 5, name: '柴油发电机组', isMaintenance: false, num: 186, status: 0, abnormal: false, isActive: false }
-            ], // 系统下的各种组成
-            searchKey: '', // 搜索关键字
-            tableData: [
-                // {serialNumber: 1, equipmentName: 2, equipmentNumber: 3, status: '正常', photo: 5, report: 6},
-                // {serialNumber: 1, equipmentName: 2, equipmentNumber: 3, status: '异常', photo: 5, report: 6},
-                // {serialNumber: 1, equipmentName: 2, equipmentNumber: 3, status: '正常', photo: 5, report: 6},
-            ], // 表数据
-            curPage: 1, // 当前页码
-            pageSize: 10, // 每页条数
-            tatol: 0, // 总数据
-            dialogTableVisible: false, // 弹窗显示状态
-            dialogTime: '' // 弹框内的时间
-        }
-    },
+  data () {
+    return {
+      systemId: '', // 当前系统Id
+      systemList: [], // 系统
+      systemContentData: [
+        {id: 1, name: '高压配电柜', isMaintenance: true, num: 95, statusNum: 0, abnormal: false, isActive: true},
+        {id: 2, name: '变压器', isMaintenance: false, num: 256, statusNum: 12, abnormal: true, isActive: false},
+        {id: 3, name: '低压配电柜', isMaintenance: false, num: 354, statusNum: 0, abnormal: false, isActive: false},
+        {id: 4, name: '直流屏', isMaintenance: false, num: 175, statusNum: 0, abnormal: false, isActive: false},
+        {id: 5, name: '柴油发电机组', isMaintenance: false, num: 186, status: 0, abnormal: false, isActive: false},
+      ], // 系统下的各种组成
+      searchKey: '', // 搜索关键字
+      tableData: [
+        // {serialNumber: 1, equipmentName: 2, equipmentNumber: 3, status: '正常', photo: 5, report: 6},
+        // {serialNumber: 1, equipmentName: 2, equipmentNumber: 3, status: '异常', photo: 5, report: 6},
+        // {serialNumber: 1, equipmentName: 2, equipmentNumber: 3, status: '正常', photo: 5, report: 6},
+      ], // 表数据
+      curPage: 1, // 当前页码
+      pageSize: 10, // 每页条数
+      tatol: 0, // 总数据
+      dialogTableVisible: false, // 弹窗显示状态
+
+      // 核心设备实例
+      assetnum: null, // 设备台账编码
+      historyTableData: [], // 核心设备实例的所有历史事项信息
+      dialogTime: null, // 弹框内的时间
+      hisCurPage: 1, // 当前页码
+      hisPageSize: 8, // 当前页码
+      hisTotal: 0, // 总条数
+      startTime: null, // 开始时间
+      endTime: null, // 结束事件
+
+      showDetail: false, // 显示照片、报告详情
+      detailTitle: '图片预览', // 弹窗名称
+    }
+  },
 
     components: {
         Select,
@@ -142,84 +159,191 @@ export default {
 
     computed: {},
 
-    mounted() {
-        this.getSystemList()
-        this.getTableData()
-    },
+  mounted() {
+    this.getSystemList();
+    this.getEquipmentOfSystem();
+    this.getTableData();
+  },
 
-    methods: {
-        /**
-         * 获取系统列表数据
-         */
-        getSystemList() {
-            queryEquipmentList()
-                .then(res => {
-                    if (res.result === 'success') {
-                        let data = res.data
-                        let newData = []
-                        _.forEach(data, item => {
-                            newData.push({
-                                id: item.code,
-                                name: item.name
-                            })
-                        })
-                        this.systemList = newData
-                    }
-                })
-                .catch(err => {
-                    console.err(err)
-                })
-        },
-        /**
-         * 切换系统名称
-         */
-        changeCurSystem(val) {
-            console.log('val', val)
-        },
-        /**
-         * 切换系统下的设备
-         */
-        changeEquipment(id) {
-            _.map(this.systemContentData, o => {
-                return (o.isActive = o.id === id)
+  methods: {
+    /**
+     * 获取系统列表数据
+     */
+    getSystemList() {
+      querySystemList().then((res) => {
+        if (res.result === 'success') {
+          let data = res.data;
+          let newData = [];
+          _.forEach(data, (item) => {
+            newData.push({
+              id: item.code,
+              name: item.name
             })
-        },
-        /**
-         * 获取表数据
-         */
-        getTableData() {
-            let query = {
-                category_code: 'gdc'
+          })
+          this.systemList = newData;
+        }
+      })
+    },
+    /**
+     * 切换系统名称
+     */
+    changeCurSystem(val) {
+      console.log('val', val)
+    },
+    /**
+     * 获取系统下的设备
+     */
+    getEquipmentOfSystem() {
+      let param = {
+        plazaId: 1000423,
+        ccode: 1002347,
+      }
+      if (this.systemId !== '') {
+        param.smsxt = this.systemId;
+      }
+      queryEquipmentList('/data/home/querySystemCard', param).then((res) => {
+        console.log('res', res)
+      })
+    },
+    /**
+     * 切换系统下的设备
+     */
+    changeEquipment(id) {
+      _.map(this.systemContentData, (o) => {return o.isActive = o.id === id})
+    },
+    /**
+     * 获取表数据
+     */
+    getTableData() {
+      let query = {
+        category_code: 'gdc'
+      }
+      queryTableData(`/data/glsms_asset/query?plazaId=1000423&page=${this.curPage}&size=${this.pageSize}`, query).then((res) => {
+        const { result, count, data } = res;
+        if (result === 'success') {
+          this.tatol = count;
+          this.tableData = data;
+        }
+      })
+    },
+    /**
+     * 表第一列序号
+     */
+    indexMethod(index) {
+      return index + 1;
+    },
+    /**
+     * 切换页码
+     */
+    changeTablePage(page) {
+      this.curPage = page;
+      this.getTableData();
+    },
+    /**
+     * 显示设备实例的维保、专维等状态
+     */
+    showEquipmentStatus(row, column, e) {
+      setTimeout(() => {
+        if (this.showDetail) return
+        this.dialogTableVisible = true;
+        this.assetnum = row.assetnum;
+        this.initTimePicker();
+      }, 36)
+    },
+    /**
+     * 获取核心设备实例的所有历史事项信息
+     */
+    getEquipmentHistoryMsg() {
+      this.historyTableData = [];
+      let param = {
+        page: this.hisCurPage,
+        size: this.hisPageSize,
+        // assetnum: this.assetnum,
+        assetnum: 8952,
+        // startDate: this.startTime,
+        startDate: 20180101000000,
+        // endDate: this.endTime
+        endDate: 20180201000000
+      }
+      queryHistoryTableData('/data/base/queryDateByAssetNum', param).then((res) => {
+        const { result, data, count } = res;
+        if (result === 'success') {
+          this.historyTableData = data;
+          this.hisTotal = count;
+          _.forEach(this.historyTableData, (item) => {
+            let name;
+            switch (item.type) {
+              case '0':
+                name = '专维'
+                break
+              case '1':
+                name = '维保专业'
+                break
+              case '2':
+                name = '第三方视图'
+                break
             }
-            queryTableData(`/data/glsms_asset/query?plazaId=1000423&page=${this.curPage}&size=${this.pageSize}`, query).then(res => {
-                const { result, count, data } = res
-                if (result === 'success') {
-                    this.tatol = count
-                    this.tableData = data
-                }
-            })
-        },
-        /**
-         * 表第一列序号
-         */
-        indexMethod(index) {
-            return index + 1
-        },
-        /**
-         * 切换页码
-         */
-        changeTablePage(page) {
-            this.curPage = page
-            this.getTableData()
-        },
-        /**
-         * 显示设备实例的维保、专维等状态
-         */
-        showEquipmentStatus(row, column, e) {
-            console.log('row', row)
-            this.dialogTableVisible = true
+            item.typeName = name;
+          })
         }
+      })
+    },
+    /**
+     * 初始化时间选择器
+     */
+    initTimePicker() {
+      let endTime = new Date(),
+          startTime = new Date(endTime.getTime() - 1000*60*60*24*30);
+      this.dialogTime = [startTime, endTime];
+      this.changeTime();
+    },
+    /**
+     * 切换时间
+     */
+    changeTime() {
+      this.hisCurPage = 1;
+      if (this.dialogTime) {
+        this.startTime = moment.unix(new Date(this.dialogTime[0]).getTime() / 1000).format('YYYYMMDDHHmmss');
+        this.endTime = moment.unix(new Date(this.dialogTime[1]).getTime() / 1000).format('YYYYMMDDHHmmss');
+      } else {
+        this.initTimePicker();
+      }
+      this.getEquipmentHistoryMsg();
+    },
+    /**
+     * 切换设备台账下所有历史事项信息页码
+     */
+    changeHisTablePage(page) {
+      this.hisCurPage = page;
+      this.getEquipmentHistoryMsg();
+    },
+    /**
+     * 显示图片详情
+     */
+    showPicturesDetail(val) {
+      console.log('val', val)
+      // if (!val.file_type || !val.file_type_id) {
+      //   return
+      // }
+      this.showDetail = true;
+      this.detailTitle = '图片预览';
+      this.getDetailData(val);
+    },
+    /**
+     * 获取图片/报告详情
+     */
+    getDetailData(val) {
+      let param = {
+        file_type: 1, // val.file_type
+        file_type_id: 2467908, // val.file_type_id
+        type: this.detailTitle === '图片预览'? 0 : 1
+      }
+
+      queryDetailData('/data/base/queryFileDetails', param).then((res) => {
+        console.log('res', res)
+      })
     }
+  }
 }
 </script>
 
@@ -324,5 +448,18 @@ export default {
             justify-content: flex-end;
         }
     }
-}
+    .el-dialog{
+      min-height: 600px;
+    }
+    .detail-container{
+      display: flex;
+      min-height: 600px
+    }
+    .pictures-menu{
+      margin-right: 21px;
+      width: 180px;
+    }
+
+  }
+
 </style>

+ 184 - 6
src/views/analysis/GanttChart.vue

@@ -8,9 +8,10 @@
         :isReadOnly="true" 
         tipPlace="top" 
         caption="系统名称:"
-        v-model="systemName" 
+        v-model="systemId" 
         :selectdata="systemList" 
         :placeholder="'请选择'"
+        @change="getGanttChartData"
       />
       <div class="legend-container">
         <div v-for="(item) in legends" :key="'key_' + item.id" class="item-legend">
@@ -26,24 +27,46 @@
       </div>
     </div>
     <div class="main-gantt-container">
+      <div class="task-title">
+        <div class="title">任务标题</div>
+        <Tree :data="treeData" @openNode="toggleNode" />
+      </div>
+      <div class="chart-container" id="chartContainer" ref="chartContainer">
+        <div id="ganttContainer"></div>
+      </div>
+      <el-dialog :title="detailTitle" :visible.sync="showDetail" width="840px">
 
+      </el-dialog>
     </div>
   </div>
 </template>
 
 <script>
+import { queryGanttChart } from '../../api/ganttChart';
+import { querySystemList } from '../../api/coreDeviceReport';
+import { Tree } from 'meri-design';
+import _ from 'lodash';
+import moment from 'moment';
+// import '../../utils/ganttChart/g.js';
+import { GanttChart } from '../../utils/ganttChart/GanttChart.js';
+import { parse } from 'path';
 export default {
   data () {
     return {
       systemList: [], // 系统列表
-      systemName: '', // 系统名称
+      systemId: '', // 系统名称
       legends: [
         {id: 1, text: '按时完成', backgroundColor: '#E7E9EA', borderColor: '#C3C7CB'},
         {id: 2, text: '未开始/进行中', backgroundColor: 'rgba(91, 143, 249, 0.2)', borderColor: '#5B8FF9'},
-        {id: 3, text: '按时完成', backgroundColor: '#FBCE99', borderColor: '#F58300'},
-        {id: 4, text: '按时完成', backgroundColor: '#FBB8B5', borderColor: '#F54E45'},
+        {id: 3, text: '逾期完成', backgroundColor: '#FBCE99', borderColor: '#F58300'},
+        {id: 4, text: '逾期未完成', backgroundColor: '#FBB8B5', borderColor: '#F54E45'},
       ], // 图例
       timeType: 'month', // 甘特图时间类型
+      treeData: [], // 树结构数据
+      
+      // 弹窗相关
+      showDetail: false, // 弹框显示状态
+      detailTitle: '', // 弹窗标题
     }
   },
 
@@ -51,9 +74,143 @@ export default {
 
   computed: {},
 
-  mounted() {},
+  mounted() {
+    this.getSystemList();
+  },
 
-  methods: {}
+  methods: {
+    /**
+     * 获取系统列表数据
+     */
+    getSystemList() {
+      querySystemList().then((res) => {
+        if (res.result === 'success') {
+          let data = res.data;
+          let newData = [];
+          _.forEach(data, (item) => {
+            newData.push({
+              id: item.code,
+              name: item.name
+            })
+          })
+          this.systemId = newData[0].id;
+          this.systemList = newData;
+          this.getGanttChartData();
+        }
+      })
+    },
+    /**
+     * 处理请求数据的时间
+     */
+    disQueryTime() {
+      let startTime, endTime;
+      let curTime = new Date(),
+          curYear = curTime.getFullYear(),
+          curMonth = curTime.getMonth() + 1;
+      if (this.timeType === 'month') {
+        startTime = `${curYear}0101000000`;
+        endTime = `${curYear + 1}0101000000`;
+      } else {
+        startTime = `${curYear}${curMonth}01000000`;
+        if (curMonth + 1 > 12) {
+          endTime = `${curYear + 1}0101000000`;
+        } else {
+          endTime = `${curYear}${curMonth + 1}01000000`;
+        }
+      }
+      return [startTime, endTime];
+    },
+    /**
+     * 获取甘特图数据
+     */
+    getGanttChartData() {
+      let time = this.disQueryTime();
+      let param = {
+        smsxt: this.systemId,
+        plazaId: 1000423,
+        startDate: 20000101000000, // time[0]
+        endDate: 20200708000000, // time[1]
+      }
+      queryGanttChart('/data/base/queryGanttChart', param).then((res) => {
+        const { dsfList, wbList, zwList, result } = res;
+          console.log('res', res)
+        if (result === 'success') {
+          let newData = [],
+              data = [wbList, zwList, dsfList],
+              name = ['维保', '专维', '第三方检测'];
+          _.forEach(data, (item, index) => {
+            newData.push({
+              id: index + 1,
+              name: name[index],
+              open: true,
+              children: name[index] === '专维'?[] : this.disGanttData(dsfList)
+            })
+          })
+          
+          this.treeData = newData;
+          
+          let taskData = _.map(_.cloneDeep(newData), (item) => {
+            return {
+              id: item.id,
+              type: item.name,
+              open: item.open,
+              dataList: _.map(item.children, (_item) => {
+                return {
+                  id: _item.id,
+                  title: _item.name,
+                  tasks: _item.originData
+                }
+              })
+            }
+          })
+          console.log('taskData', taskData)
+          let width = this.$refs.chartContainer.offsetWidth;
+          window.gc = new GanttChart({
+            viewWidth: width,
+            cWidth: 3*width,
+            tasks: taskData,
+            chartContainer: 'chartContainer',
+            daysCount: parseInt(3*width/40),
+            callback: this.showDialog
+          });
+          gc.main()
+        }
+      })
+    },
+    /**
+     * 处理甘特图数据
+     */
+    disGanttData(arr) {
+      let data = [];
+      _.forEach(arr, (item) => {
+        data.push({
+          id: item.id,
+          name: item.name,
+          checked: 'uncheck',
+          originData: _.map(item.data, (_item) => {
+            _item.startDate = moment.unix((new Date().getTime() - 1000*60*60*24*7)/1000).format('YYYY-MM-DD HH:mm:ss');
+            _item.endDate = moment.unix(new Date().getTime()/1000).format('YYYY-MM-DD HH:mm:ss');
+            _item.description = _item.parentname;
+            return _item
+          })
+        })
+      })
+      return data
+    },
+    /**
+     * 展开收起节点
+     */
+    toggleNode(status) {
+      console.log('status', status)
+    },
+    /**
+     * 显示弹窗
+     */
+    showDialog(task) {
+      this.showDetail = true;
+      this.detailTitle = task._pdata.description;
+    }
+  }
 }
 </script>
 
@@ -99,6 +256,27 @@ export default {
     width: 100%;
     height: calc(100% - 44px);
     background: #F2F5F7;
+    border:1px solid rgba(239,240,241,1);
+    border-radius:4px;
+    display: flex;
+    .task-title{
+      width: 404px;
+      height: 100%;
+      border-right: 1px solid #EFF0F1;
+      .title{
+        padding-left: 32px;
+        padding-top: 15px;
+        padding-bottom: 15px;
+        font-size: 14px;
+        color: #646C73;
+        line-height: 19px;
+        border-bottom: 1px solid #EFF0F1;
+      }
+    }
+    .chart-container{
+      flex: 1;
+      overflow: hidden;
+    }
   }
 }
 </style>

+ 82 - 12
src/views/analysis/SpecificationUpdateRecord.vue

@@ -8,7 +8,7 @@
         :isReadOnly="true" 
         tipPlace="top" 
         caption="事件类型:"
-        @change="testClick" 
+        @change="changeTablePage(1)"
         v-model="incidentType" 
         :selectdata="incidentList" 
         :placeholder="'请选择'"
@@ -18,20 +18,24 @@
         type="daterange"
         range-separator="至"
         start-placeholder="开始日期"
-        end-placeholder="结束日期">
+        end-placeholder="结束日期"
+        @change="changeTime">
       </el-date-picker>
     </div>
     <el-table :data="tableData" style="margin-bottom: 19px">
-      <el-table-column property="date" label="日期"></el-table-column>
-      <el-table-column property="itemType" label="事项类型"></el-table-column>
-      <el-table-column property="serialNumber" label="编号"></el-table-column>
-      <el-table-column property="update" label="更新内容"></el-table-column>
+      <el-table-column property="time" label="日期"></el-table-column>
+      <el-table-column property="evenType" label="事项类型"></el-table-column>
+      <el-table-column property="objid" label="编号"></el-table-column>
+      <el-table-column property="content" label="更新内容"></el-table-column>
     </el-table>
     <div class="page">
       <el-pagination
         background
         layout="prev, pager, next"
-        :total="tatol">
+        :current-page="curPage"
+        :page-size="pageSize"
+        :total="tatol"
+        @current-change="changeTablePage">
       </el-pagination>
     </div>
   </div>
@@ -39,14 +43,26 @@
 </template>
 
 <script>
+import { getSpecificaltionData } from '../../api/specificationUpdateRecord';
+import moment from 'moment';
+import _ from 'lodash';
 export default {
   data () {
     return {
-      incidentList: [], // 事件列表
+      incidentList: [
+        {id: 0, name: '专维'},
+        {id: 1, name: '维保'},
+        {id: 2, name: '第三方检测'},
+        {id: 3, name: '重点关注'},
+      ], // 事件列表
       incidentType: '', // 事件类型
       timeVal: '', // 时间
       tableData: [], // 表数据
-      tatol: 100, // 数据总量
+      curPage: 1, // 当前页码
+      pageSize: 10, // 每页条数
+      tatol: 0, // 数据总量
+      startTime: 20171027000000, // 开始时间
+      endTime: 20171028000000, // 结束事件
     }
   },
 
@@ -54,11 +70,65 @@ export default {
 
   computed: {},
 
-  mounted() {},
+  mounted() {
+    this.getTableData();
+  },
 
   methods: {
-    testClick() {
-
+    /**
+     * 获取表数据
+     */
+    getTableData() {
+      let param = {
+        page: this.curPage,
+        size: this.pageSize,
+        plazaId: 1000423,
+        // changeDateStartDate: 20171027000000,
+        // changeDateEndDate: 20171028000000,
+      }
+      if (this.startTime !== '') {
+        param.changeDateStartDate = this.startTime;
+      }
+      if (this.endTime !== '') {
+        param.changeDateEndDate = this.endTime;
+      }
+      if (this.incidentType !== '') {
+        param.objtype = this.incidentType;
+      }
+      getSpecificaltionData('/data/rpt_change_record/query', param).then((res) => {
+        const { result, data, count } = res;
+        if (result === 'success') {
+          this.tatol = count;
+          _.map(data, (item) => {
+            let text = _.find(this.incidentList, (o) => {return o.id === item.objtype}).name
+            item.evenType = text;
+            item.time = moment.unix(item.changedate / 1000).format('YYYY.MM.DD')
+            return
+          })
+          this.tableData = data;
+        }
+      })
+    },
+    /**
+     * 切换页码
+     */
+    changeTablePage(page) {
+      this.curPage = page;
+      this.getTableData();
+    },
+    /**
+     * 切换时间
+     */
+    changeTime() {
+      this.curPage = 1;
+      if (this.timeVal) {
+        this.startTime = moment.unix(new Date(this.timeVal[0]).getTime() / 1000).format('YYYYMMDDHHmmss');
+        this.endTime = moment.unix(new Date(this.timeVal[1]).getTime() / 1000).format('YYYYMMDDHHmmss');
+      } else {
+        this.startTime = 20171027000000;
+        this.endTime = 20171028000000;
+      }
+      this.getTableData();
     }
   }
 }

+ 3 - 2
src/views/equipment/table/lookPageTable.vue

@@ -12,7 +12,7 @@
                 style='width:192px;margin-right:12px'
             ></el-input>
             <Select @change='getList' v-model='floor' width='180' tipPlace='top' caption='楼层 :' :selectdata='floorSelect'></Select>
-            <Select @change='getList' v-model='fileType' width='180' tipPlace='top' caption='文件类型:' :selectdata='floorSelect'></Select>
+            <Select @change='getList' v-model='fileType' width='180' tipPlace='top' caption='文件类型:' :selectdata='files'></Select>
         </div>
         <el-table :data='tableData' style='width: 100%' :border='true'>
             <el-table-column type='index' label='序号' width='60' :index='indexMethod'></el-table-column>
@@ -61,7 +61,8 @@ export default {
             size: 11,
             keyword: '',
             floor: '',
-            fileType: ''
+            fileType: '',
+            files: []
         }
     },
     props: ['major'],

+ 461 - 0
src/views/homepage/index.vue

@@ -0,0 +1,461 @@
+<template>
+    <main class="homepage">
+        <section class="homepage-cards-content">
+            <div class="cards-item" v-for="(item , index) in cardsList" :key="index" :style = itemStyle(item)>
+                <h4>{{item.smsxtname}}</h4>
+                <div class="equipment-list">
+                    <div @click="navToInnerPage(item, equip)" class="equipment-item" v-for="equip in item.assetTypeList" >
+                        <div class="equip-name">
+                            <h5>{{equip.category_name}}</h5>
+                            <div class="exception-number" v-if="equip.is_exception_num">{{equip.is_exception_num}}</div>
+                        </div>
+                        <div></div>
+                        <section>
+                            <div class="equip-statis"><span class="equip-number">{{equip.asset_num}}</span><span class="equip-unit">台</span></div>
+                            <div><em v-if="false">维保中</em></div>
+                        </section>
+                    </div>
+                </div>
+                <div v-if="item.rptGlsmsStatisticsList && item.rptGlsmsStatisticsList.length" class="alert-list" @click="navToGanttPage(item, equip)">
+                    <div class="alert-item"   v-for="(option , index) in  item.rptGlsmsStatisticsList" :key="index" >
+                        <img v-if="option.level"  :src="srcList[option.type][option.level]"> 
+                        <div  class="content">
+                            <p class="line">
+                                <span >{{option.type === 1 ? '维保': option.type === 0 ? '专维' :  '第三方检测' }}</span>
+                                <span><em :style="{color:item.level == 1? '#646C73': item.level == 2 ? '#E07A04 ' :'#C13830'}">{{option.unfinished}}</em>/<em>{{option.total}}</em></span>
+                            </p>
+                            <p class="desc">当月未完成/总任务</p>
+                        </div>
+                    </div>
+                </div>
+                <div v-else class="empty-content">暂无数据</div>
+            </div>
+        </section>
+        <section class="homepage-nav-list">
+            <nav>
+                <div class="main-title">
+                    <span>重点关注事项</span>
+                    <a @click="navToFocusItem">更多</a>
+                </div>
+                <div class="table">
+                    <div class="row table-header">
+                        <article>日期</article>
+                        <article>政府部门</article>
+                        <article>记录事项</article>
+                    </div>
+                    <div class="table-body">
+                        <div class="row" v-for="(item , index) in itemsList" :key="index">
+                            <article>{{item.createdate}}</article>
+                            <article>{{item.department}}</article>
+                            <article>{{item.recordsx}}</article>
+                        </div>
+                    </div>
+                </div>
+            </nav>
+            <nav>
+                <div class="main-title">
+                    <span>说明书更新记录</span>
+                    <a @click="navToIntroduce">更多</a>
+                </div>
+                <div class="table">
+                    <div class="row table-header">
+                        <article>日期</article>
+                        <article>事项类型</article>
+                        <article>更新内容</article>
+                    </div>
+                    <div class="table-body">
+                        <div class="row" v-for="(item , index) in changeList" :key="index">
+                            <article>{{item.changedate}}</article>
+                            <article>{{item.type}}</article>
+                            <article>{{item.content || '--'}}</article>
+                        </div>
+                    </div>
+                </div>
+            </nav>
+        </section>
+    </main>
+</template>
+
+<script>
+import {getCardList, getQueryList, getChangeList} from "@/api/homePage"
+import moment from 'moment'
+export default {
+    data() {
+        return {
+            cardsList:[],
+            itemsList:[],
+            changeList:[],
+            srcList:{
+                0:{ 
+                    1: require("../../assets/images/icons/edit_blue_b.png"),    //1.正常(蓝色) 2.警告(黄色) 3.严重(红色)
+                    2: require("../../assets/images/icons/edit_yellow_b.png"),
+                    3: require("../../assets/images/icons/edit_red_b.png")
+                },
+                1:{
+                    1: require("../../assets/images/icons/fix_blue_b.png"),    
+                    2: require("../../assets/images/icons/fix_yellow_b.png"),
+                    3: require("../../assets/images/icons/fix_red_b.png")
+                },
+                2:{
+                    1: require("../../assets/images/icons/search_blue_b.png"),    
+                    2: require( "../../assets/images/icons/search_yellow_b.png"),
+                    3: require("../../assets/images/icons/search_red_b.png")
+                }
+            }
+        }
+    },
+    mounted () {
+        this.testAjax()
+        this.getItemsQuery()
+        this.getInstructionList()
+    },
+    methods:{
+        /**
+         *  点击跳转进入综合事项管理页面
+         */
+        navToFocusItem () {
+            this.$router.push({path:"./调"})
+        },
+        /**
+         *  点击跳转进入 分析|报表 说明书更新记录页面
+         */
+        navToIntroduce () {
+            this.$router.push({path:"./analysis", query:{homepageKey:2}})
+        },
+        itemStyle (option) {
+            let num = 0
+            option.assetTypeList.forEach(item=>{
+                num +=  item.is_exception_num
+            })
+            if (option.rptGlsmsStatisticsList) {
+                option.rptGlsmsStatisticsList.forEach(option => {
+                    num +=  option.unfinished
+                })
+            }
+            if (num > 0) {
+                return {
+                    borderLeft:"3px solid #EF6B66"
+                }
+            }
+        },
+        navToInnerPage (item, equip) {
+            this.$router.push({path:"./analysis", query:{smsxt:item.smsxt, equipId: equip.id}})
+        },
+        /**
+         * 跳转到甘特图详情页
+         */
+        navToGanttPage (item, equip) {
+            this.$router.push({path:"./analysis", query:{smsxt:item.smsxt}})
+        },
+        //TODO plazaId目前是写死的 后期需要更换成用户对应的ID
+        testAjax () {
+            let params = {
+                getParams: {
+                    "plazaId":1000423,
+                }
+            }
+            getCardList(params).then(res => {
+                if (res.result == 'success') {
+                    let result = res.data
+                    if (result && Array.isArray(result)) {
+                        result[0].is_exception_num = 12
+                        this.cardsList = result
+                    }
+                }
+            })
+        },
+        /**
+         * 获取说明书变更记录
+         */
+        getInstructionList () {
+            let params = {
+                getParams: {
+                    "plazaId":1000423,
+                    "page":1,
+                    "size":10,
+                }
+            }
+ 
+            getChangeList(params).then(res => {
+                if (res.result == 'success') {
+                    let result = res.data
+                    result.forEach(item=>{
+                        item.changedate = moment.unix(item.changedate / 1000).format('YYYY.MM.DD')
+                        if (item.objtype === 0) {
+                            item.type = "专维"
+                        } else if( item.objtype === 1) {
+                            item.type = "维保"
+                        } else if( item.objtype === 2) {
+                            item.type = "第三方检测"
+                        } else {
+                            item.type = "重点关注"
+                        }
+                    })
+                   
+                    if (result && Array.isArray(result)) {
+                        this.changeList = result
+                    }
+                }
+            })
+        },
+        getItemsQuery () {
+            let params = {
+                getParams: {
+                    // department=部门 //部门
+                    "startDate":"20200208000000", //开始时间  
+                    "endDate":"20200608000000", //结束时间  
+                    "plazaId":1000423, //广场id 必填
+                    "page":1,//页数
+                    "size":10,//条数
+                    // "orderBy":字段名,1;//排序,1正序,0,倒序
+                    // keyword=关键字1:字段名11,字段名12;关键字2:字段名21,字段名22;//模糊查询参数
+                }
+            }
+            getQueryList(params).then(res=>{
+                moment().format('YYYY.MM.DD HH:mm')
+                if (res.result == 'success') {
+                    if (res.data && Array.isArray(res.data)) {
+                        res.data.forEach(item => {
+                            item.createdate = moment.unix(item.createdate / 1000).format('YYYY.MM.DD')
+                        })
+                        this.itemsList = res.data
+                    }
+                    
+                }
+            })
+        },
+    }
+}
+</script>
+
+<style lang='less'>
+.homepage {
+    display: flex;
+    justify-content: space-between;
+    height: calc(100vh - 48px);
+    padding: 15px;
+    background: rgba(242, 245, 247, 1);
+    overflow: auto;
+    .homepage-cards-content{
+        display: flex;
+        flex-wrap: wrap;
+        justify-content: space-between;
+        align-content:flex-start;
+        width: 70%;
+        .cards-item{
+            width: calc(50% - 5px);
+            height: 24%;
+            padding:0.4rem;    
+            padding-bottom: 0;
+            margin-bottom: 1rem;
+            background: #fff;
+            box-shadow: 0 2px 10px 0 rgba(31, 36, 41, 0.06);
+            h4 {
+                color: rgba(31, 36, 41, 1);
+                padding:1rem;
+                font-size: 1.6rem;
+                font-weight: bold;
+            }
+            .equipment-list{
+                display: flex;
+                padding-bottom: 2rem;
+                margin-bottom: 0.8rem;
+                padding:1rem;
+                padding-top: 0;
+                .equipment-item{
+                    width: 33.33%;
+                    padding: 0.6rem;
+                    box-sizing: border-box;
+                    border-radius: 4px;
+                    cursor: pointer;
+                    .equip-name{
+                        position: relative;
+                        display: inline-block;
+                        h5{
+                            position: relative;
+                            color: #1F2429;
+                            font-size: 1.4rem;
+                            em{
+                                margin-left: 1rem;
+                                color: #E19E51;
+                                font-size: 1.2rem;
+                            }
+                        }
+                        .exception-number{
+                            position: absolute;
+                            right: -20px;
+                            top:-5px;
+                            height: 1.6rem;
+                            border-radius: 8rem;
+                            padding: 0.2rem 0.4rem;
+                            line-height: 1.2rem;
+                            text-align: center;
+                            font-size: 1.2rem;
+                            color: #F54E45;
+                            background: #FFE0DF;
+                        }
+                    }
+                    section{
+                        display: flex;
+                        justify-content: flex-start;
+                        align-items: center;
+                        .equip-statis{
+                            .equip-number{
+                                font-size: 1.8rem;
+                                font-weight: bold;
+                                color:rgba(31, 36, 41, 1)
+                            }
+                            .equip-unit{
+                                color: #ccc;
+                                font-size: 1.2rem;
+                            }
+                        }
+                    }
+                }
+                .equipment-item:hover{
+                    background: #f5f6f7;
+                }
+            }
+            .alert-list{
+                display: flex;
+                align-items: center;
+                justify-content: flex-start;
+                padding-top: 2rem;
+                border-top: 1px solid #F5F6F7;
+                border-radius: 4px;
+                cursor: pointer;
+                padding:2.2rem 1.4rem;
+                &:hover{
+                    background: #F5F6F7;
+                }
+                .alert-item{
+                    display: flex;
+                    width: 33.33%;
+                    align-items: center;
+                    img{
+                        width: 4rem;
+                        height: 4rem;
+                        margin-right: 1.4rem;
+                    }
+                    .content{
+                        border-right: 1px solid #F5F6F7;
+                        padding-right: 2rem;
+                        .line{
+                            display: flex;
+                            justify-content: space-between;
+                            align-items: center;
+                            line-height: 1;
+                            span:first-child{
+                                margin-right: 1rem;
+                                font-size: 1.2rem;
+                                color: #1F2429;
+                                font-weight: bold;
+                            }
+                            em{
+                                font-weight: normal;
+                            }
+                            em:first-child{
+                                font-size: 1.6rem;
+                                font-weight: bold;
+                            }
+                        }
+                        .desc{
+                            padding-top: 0.6rem;
+                            color: #8D9399;
+                            font-size: 1.2rem;
+                            text-align: right;
+                        }
+                    }
+                }
+            }
+            .empty-content{
+                height: 9rem;
+                line-height: 9rem;
+                border-top: 1px solid #F5F6F7;
+                
+                text-align: center;
+                color: #8D9399;
+            }
+        }
+    }
+    .homepage-nav-list {
+        width: calc(30% - 10px);
+        nav:first-child{
+            height: 320px;
+        }
+        nav:last-child{
+            height: 320px;
+        }
+        nav{
+            padding: 14px 16px;
+            margin-bottom: 10px;
+            background: white;
+            overflow: hidden;
+            box-shadow: 0 2px 10px 0 rgba(31, 36, 41, 0.06);
+            .main-title{
+                display: flex;
+                justify-content: space-between;
+                margin-bottom: 12px;
+                span:first-child{
+                    color: #1F2429;
+                    font-weight: bold;
+                    font-size:1.4rem;
+                }
+            }
+            .table{
+                .row{
+                    display: flex;
+                    align-items: center;
+                    padding: 6px;
+                    border-bottom: 1px solid #E4E6E7;
+                    article{
+                        margin-right: 10px;
+                    }
+                    article:nth-of-type(1) {
+                        width: 20%;
+                    }
+                    article:nth-of-type(2) {
+                        width: 30%;
+                        white-space: nowrap;
+                        overflow: hidden;
+                        text-overflow: ellipsis;
+                    }
+                    article:nth-of-type(3) {
+                        width: calc(50% - 30px);
+                        overflow: hidden;
+                        text-overflow: ellipsis;
+                        display: -webkit-box;
+                        -webkit-line-clamp: 2;
+                        -webkit-box-orient: vertical;
+                    }
+                }
+                .table-header{
+                    height: 3.2rem;
+                    padding: 6px;
+                    line-height: 3.2rem;
+                    color:#646A73;
+                    font-weight: 600;
+                    border-bottom: none;
+                    background: #F8F9FA;
+                }
+                .table-body{
+                    overflow: auto;
+                }
+            }
+        }
+        nav:first-child{
+            height: 40%;
+            .table-body{
+                height: 27vh;
+            }
+        }
+        nav:last-child{
+            height: calc(60% - 12px);
+            .table-body{
+                height: 45vh;
+            }
+        }
+    }
+
+}
+</style>

+ 5 - 2
src/views/legendRules/index.vue

@@ -347,8 +347,11 @@ export default {
         background: transparent !important;
         color: #0091ff !important;
     }
-    /deep/ .ant-tree li .ant-tree-node-content-wrapper:hover{
-           background: transparent !important;
+    /deep/ .ant-tree li .ant-tree-node-content-wrapper:hover {
+        background: transparent !important;
+    }
+    /deep/ .p-inner-container {
+        overflow-x: hidden;
     }
     .is-current {
         background: #e1f2ff !important;

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1378 - 0
src/views/statistics/index.vue


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 26486 - 0
static/g.js


+ 8 - 0
vue.config.js

@@ -1,3 +1,11 @@
+/*
+ * @Author: your name
+ * @Date: 2020-06-28 13:40:38
+ * @LastEditTime: 2020-07-08 13:56:32
+ * @LastEditors: Please set LastEditors
+ * @Description: In User Settings Edit
+ * @FilePath: \wanda-bm-guide\vue.config.js
+ */ 
 module.exports = {
     devServer: {
         port: 8090,