zhangyu 4 роки тому
батько
коміт
1d6e3782d3

+ 247 - 132
config/index.js

@@ -200,139 +200,254 @@ module.exports = {
     //     }
     //   },
     // },
-    proxyTable: { // 新版数据字典
-      '/admin': {
-        // target: 'http://192.168.12.238:8080/',
-        target: 'http://mbi.sagacloud.cn:8080/',
-        changeOrigin: true,
-        pathRewrite: {
-          "^/admin": "/"
-        }
-      },
-      '/api': {
-        // target: 'http://192.168.64.17:28888/',
-        target: 'http://192.168.64.14:28888/',
-        changeOrigin: true,
-        pathRewrite: {
-          "^/api": "/"
-        }
-      },
-      '/data-platform-3': {
-        // 目标 API 地址
-        // target: 'http://172.16.42.210:8080/',
-        target: 'http://39.97.179.199:9909/',
-        // 如果要代理 websockets
-        ws: true,
-        // 将主机标头的原点更改为目标URL
-        changeOrigin: false
-      },
-      '/rwd': {
-        // 目标 API 地址
-        // target: 'http://172.16.42.210:8080/',
-        target: 'http://39.102.40.239:9970/',
-        // 如果要代理 websockets
-        ws: true,
-        // 将主机标头的原点更改为目标URL
-        changeOrigin: false
-      },
-      '/business-space': {
-        // 目标 API 地址
-        // target: 'http://172.16.42.210:8080/',
-        target: 'http://39.97.179.199:9909',
-        // 如果要代理 websockets
-        ws: true,
-        // 将主机标头的原点更改为目标URL
-        changeOrigin: false
-      },
-      '/pointconfig': {
-        // 目标 API 地址
-        // target: 'http://192.168.12.238:8080/',
-        target: 'http://mbi.sagacloud.cn:8080/',
-        // 如果要代理 websockets
-        ws: true,
-        // 将主机标头的原点更改为目标URL
-        changeOrigin: false
-      },
-      '/venders-dp': {
-        // 目标 API 地址
-        // target: 'http://172.16.42.210:8080/',
-        target: 'http://39.97.179.199:9909',
-        // 如果要代理 websockets
-        ws: true,
-        // 将主机标头的原点更改为目标URL
-        changeOrigin: false
-      },
-      '/venders': {
-        // 目标 API 地址
-        // target: 'http://172.16.42.210:8080/',
-        target: 'http://39.97.179.199:9909',
-        // 如果要代理 websockets
-        ws: true,
-        // 将主机标头的原点更改为目标URL
-        changeOrigin: false,
-      },
-      '/ScanBuilding': {
-        // 目标 API 地址
-        // target: 'http://192.168.12.238:8080/',
-        target: 'http://mbi.sagacloud.cn:8080/',
-        // 如果要代理 websockets
-        ws: true,
-        // 将主机标头的原点更改为目标URL
-        changeOrigin: false
-      },
-      '/scanbuilding-2': {
-        // 目标 API 地址
-        // target: 'http://192.168.12.238:8080/',
-        target: 'http://mbi.sagacloud.cn:8080/',
-        // 如果要代理 websockets
-        ws: true,
-        // 将主机标头的原点更改为目标URL
-        changeOrigin: false
-      },
-      '/scanbuilding': {
-        // 目标 API 地址
-        // target: 'http://192.168.12.238:8080/',
-        // target: 'http://60.205.177.43:28888',
-        target: 'http://192.168.64.14:28888',
-        // target: 'http://192.168.64./17:28888',
-        // 如果要代理 websockets
-        ws: true,
-        // 将主机标头的原点更改为目标URL
-        changeOrigin: false
-      },
-      '/image-service': {
-        // 目标 API 地址
-        target: 'http://39.97.179.199:8891',
-        // target: 'http://api.sagacloud.cn',
-        // 如果要代理 websockets
-        ws: true,
-        // 将主机标头的原点更改为目标URL
-        changeOrigin: false,
-        // pathRewrite: {
-        //   "^/image-service": "/dp-auxiliary/image-service/"
-        // }
-        pathRewrite: {
-          "^/image-service": "/image-service/"
-        }
-      },
-      '/modelapi': {
-        // target: 'http://172.16.42.210:8082',
-        target: 'http://192.168.64.14:28888/',
-        // target: 'http://192.168.20.218:8082',//景灏
-        changeOrigin: true,
-        pathRewrite: {
-          "^/modelapi": "/revit-algorithm/"
-        }
-      },
-      '/schedulerapi': {
-        target: 'http://60.205.177.43:28888/',
-        // target: 'http://mbi.sagacloud.cn:8080',
-        changeOrigin: true,
-        pathRewrite: {
-          "^/schedulerapi": "/scheduler/"
-        }
+    // proxyTable: { // 新版数据字典
+    //   '/admin': {
+    //     // target: 'http://192.168.12.238:8080/',
+    //     target: 'http://mbi.sagacloud.cn:8080/',
+    //     changeOrigin: true,
+    //     pathRewrite: {
+    //       "^/admin": "/"
+    //     }
+    //   },
+    //   '/api': {
+    //     // target: 'http://192.168.64.17:28888/',
+    //     target: 'http://192.168.64.14:28888/',
+    //     changeOrigin: true,
+    //     pathRewrite: {
+    //       "^/api": "/"
+    //     }
+    //   },
+    //   '/data-platform-3': {
+    //     // 目标 API 地址
+    //     // target: 'http://172.16.42.210:8080/',
+    //     target: 'http://39.97.179.199:9909/',
+    //     // 如果要代理 websockets
+    //     ws: true,
+    //     // 将主机标头的原点更改为目标URL
+    //     changeOrigin: false
+    //   },
+    //   '/rwd': {
+    //     // 目标 API 地址
+    //     // target: 'http://172.16.42.210:8080/',
+    //     target: 'http://39.102.40.239:9970/',
+    //     // 如果要代理 websockets
+    //     ws: true,
+    //     // 将主机标头的原点更改为目标URL
+    //     changeOrigin: false
+    //   },
+    //   '/business-space': {
+    //     // 目标 API 地址
+    //     // target: 'http://172.16.42.210:8080/',
+    //     target: 'http://39.97.179.199:9909',
+    //     // 如果要代理 websockets
+    //     ws: true,
+    //     // 将主机标头的原点更改为目标URL
+    //     changeOrigin: false
+    //   },
+    //   '/pointconfig': {
+    //     // 目标 API 地址
+    //     // target: 'http://192.168.12.238:8080/',
+    //     target: 'http://mbi.sagacloud.cn:8080/',
+    //     // 如果要代理 websockets
+    //     ws: true,
+    //     // 将主机标头的原点更改为目标URL
+    //     changeOrigin: false
+    //   },
+    //   '/venders-dp': {
+    //     // 目标 API 地址
+    //     // target: 'http://172.16.42.210:8080/',
+    //     target: 'http://39.97.179.199:9909',
+    //     // 如果要代理 websockets
+    //     ws: true,
+    //     // 将主机标头的原点更改为目标URL
+    //     changeOrigin: false
+    //   },
+    //   '/venders': {
+    //     // 目标 API 地址
+    //     // target: 'http://172.16.42.210:8080/',
+    //     target: 'http://39.97.179.199:9909',
+    //     // 如果要代理 websockets
+    //     ws: true,
+    //     // 将主机标头的原点更改为目标URL
+    //     changeOrigin: false,
+    //   },
+    //   '/ScanBuilding': {
+    //     // 目标 API 地址
+    //     // target: 'http://192.168.12.238:8080/',
+    //     target: 'http://mbi.sagacloud.cn:8080/',
+    //     // 如果要代理 websockets
+    //     ws: true,
+    //     // 将主机标头的原点更改为目标URL
+    //     changeOrigin: false
+    //   },
+    //   '/scanbuilding-2': {
+    //     // 目标 API 地址
+    //     // target: 'http://192.168.12.238:8080/',
+    //     target: 'http://mbi.sagacloud.cn:8080/',
+    //     // 如果要代理 websockets
+    //     ws: true,
+    //     // 将主机标头的原点更改为目标URL
+    //     changeOrigin: false
+    //   },
+    //   '/scanbuilding': {
+    //     // 目标 API 地址
+    //     // target: 'http://192.168.12.238:8080/',
+    //     // target: 'http://60.205.177.43:28888',
+    //     target: 'http://192.168.64.14:28888',
+    //     // target: 'http://192.168.64./17:28888',
+    //     // 如果要代理 websockets
+    //     ws: true,
+    //     // 将主机标头的原点更改为目标URL
+    //     changeOrigin: false
+    //   },
+    //   '/image-service': {
+    //     // 目标 API 地址
+    //     target: 'http://39.97.179.199:8891',
+    //     // target: 'http://api.sagacloud.cn',
+    //     // 如果要代理 websockets
+    //     ws: true,
+    //     // 将主机标头的原点更改为目标URL
+    //     changeOrigin: false,
+    //     // pathRewrite: {
+    //     //   "^/image-service": "/dp-auxiliary/image-service/"
+    //     // }
+    //     pathRewrite: {
+    //       "^/image-service": "/image-service/"
+    //     }
+    //   },
+    //   '/modelapi': {
+    //     // target: 'http://172.16.42.210:8082',
+    //     target: 'http://192.168.64.14:28888/',
+    //     // target: 'http://192.168.20.218:8082',//景灏
+    //     changeOrigin: true,
+    //     pathRewrite: {
+    //       "^/modelapi": "/revit-algorithm/"
+    //     }
+    //   },
+    //   '/schedulerapi': {
+    //     target: 'http://60.205.177.43:28888/',
+    //     // target: 'http://mbi.sagacloud.cn:8080',
+    //     changeOrigin: true,
+    //     pathRewrite: {
+    //       "^/schedulerapi": "/scheduler/"
+    //     }
+    //   },
+    // },
+    proxyTable: { // 39环境
+        '/admin': {
+          target: 'http://39.102.40.239:8080/',
+          changeOrigin: true,
+          pathRewrite: {
+            "^/admin": "/"
+          }
+        },
+        '/api': {
+          target: 'http://39.102.40.239:8080/',
+          changeOrigin: true,
+          pathRewrite: {
+            "^/api": "/"
+          }
+        },
+        '/data-platform-3': {
+          // 目标 API 地址
+          target: 'http://39.97.179.199:9909/',
+          // 如果要代理 websockets
+          ws: true,
+          // 将主机标头的原点更改为目标URL
+          changeOrigin: false
+        },
+        '/rwd': {
+          // 目标 API 地址
+          target: 'http://39.102.40.239:9970/',
+          // 如果要代理 websockets
+          ws: true,
+          // 将主机标头的原点更改为目标URL
+          changeOrigin: false
+        },
+        '/business-space': {
+          // 目标 API 地址
+          target: 'http://39.97.179.199:9909',
+          // 如果要代理 websockets
+          ws: true,
+          // 将主机标头的原点更改为目标URL
+          changeOrigin: false
+        },
+        '/pointconfig': {
+          // 目标 API 地址
+          target: 'http://39.102.40.239:8080/',
+          // 如果要代理 websockets
+          ws: true,
+          // 将主机标头的原点更改为目标URL
+          changeOrigin: false
+        },
+        '/venders-dp': {
+          // 目标 API 地址
+          // target: 'http://172.16.42.210:8080/',
+          target: 'http://39.97.179.199:9909',
+          // 如果要代理 websockets
+          ws: true,
+          // 将主机标头的原点更改为目标URL
+          changeOrigin: false
+        },
+        '/venders': {
+          // 目标 API 地址
+          // target: 'http://172.16.42.210:8080/',
+          target: 'http://39.97.179.199:9909',
+          // 如果要代理 websockets
+          ws: true,
+          // 将主机标头的原点更改为目标URL
+          changeOrigin: false,
+        },
+        '/ScanBuilding': {
+          // 目标 API 地址
+          target: 'http://39.102.40.239:8080/',
+          // 如果要代理 websockets
+          ws: true,
+          // 将主机标头的原点更改为目标URL
+          changeOrigin: false
+        },
+        '/scanbuilding-2': {
+          // 目标 API 地址
+          target: 'http://39.102.40.239:8080/',
+          // 如果要代理 websockets
+          ws: true,
+          // 将主机标头的原点更改为目标URL
+          changeOrigin: false
+        },
+        '/scanbuilding': {
+          // 目标 API 地址
+          target: 'http://39.102.40.239:8080/',
+          // 如果要代理 websockets
+          ws: true,
+          // 将主机标头的原点更改为目标URL
+          changeOrigin: false
+        },
+        '/image-service': {
+          // 目标 API 地址
+          target: 'http://39.97.179.199:8891',
+          // 如果要代理 websockets
+          ws: true,
+          // 将主机标头的原点更改为目标URL
+          changeOrigin: false,
+          pathRewrite: {
+            "^/image-service": "/image-service/"
+          }
+        },
+        '/modelapi': {
+          target: 'http://39.102.40.239:8080/',
+          changeOrigin: true,
+          pathRewrite: {
+            "^/modelapi": "/revit-algorithm/"
+          }
+        },
+        '/schedulerapi': {
+          target: 'http://39.102.40.239:8080/',
+          changeOrigin: true,
+          pathRewrite: {
+            "^/schedulerapi": "/scheduler/"
+          }
+        },
       },
-    },
     // Various Dev Server settings
     host: '0.0.0.0', // can be overwritten by process.env.HOST
     port: 28080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined

+ 1 - 0
src/api/scan/config.js

@@ -10,6 +10,7 @@ export const component = '/equip-component'
 export const physics = '/data-platform-3';
 export const business = '/business-space'
 export const rwd = '/rwd'
+export const datasyn = '/datasyn'
 /******************* 适配新版数据字典接口 *********************/
 export const object = dataCenter + '/object'
 export const rel = dataCenter + '/rel'

+ 50 - 0
src/api/synclog/index.js

@@ -0,0 +1,50 @@
+import { baseUrl, datasyn } from "@/api/scan/config";
+import httputils from "@/api/scan/httpUtil";
+
+/**
+ * 查询项目id对应得集团id
+ * @param { 接口参数 } param
+ */
+ export function queryGroupCode(param, success, error) {
+	return httputils.getJson(`${baseUrl}${datasyn}/record/query/project`, param, success, error)
+}
+
+/**
+ * 查询项目下得日志
+ * @param { 接口参数 } param
+ */
+export function queryTableList(param, success, error) {
+    return httputils.postJson(`${baseUrl}${datasyn}/record/query`, param, success, error)
+}
+
+/**
+ * 查询对象类型
+ * @param { 接口参数 } param
+ */
+export function queryobjType(param, success, error) {
+    return httputils.getJson(`${baseUrl}${datasyn}/record/query/type`, param, success, error)
+}
+
+/**
+ * 查询中台是否在线
+ * @param { 接口参数 } param
+ */
+export function queryIsOnline(param, success, error) {
+    return httputils.getJson(`${baseUrl}${datasyn}/record/query/online`, param, success, error)
+}
+
+/**
+ * 重新同步消息
+ * @param { 接口参数 } param
+ */
+export function queryRecordSyn(param, success, error) {
+    return httputils.postJson(`${baseUrl}${datasyn}/record/syn/data`, param, success, error)
+}
+
+/**
+ * 更新日志信息
+ * @param { 接口参数 } param
+ */
+export function queryRecordUpdata(param, success, error) {
+    return httputils.postJson(`${baseUrl}${datasyn}/record/update`, param, success, error)
+}

BIN
src/assets/image/no-data.png


+ 10 - 0
src/data/menus.js

@@ -325,6 +325,16 @@ export default [
       permission: 'system:role:query'
     }]
   },
+  {
+    path: '/synclog',
+    name: '数据同步日志',
+    icon: 'icon-Log',
+    opts: [{
+      name: '查看',
+      basic: true,
+      permission: 'system:role:query'
+    }]
+  },
   /******************** 通用字典 ***************************/
 // {
 // 	path: '/dictionaries',

+ 146 - 146
src/framework/layout/layout-store.js

@@ -64,145 +64,7 @@ export default {
     //     group_code: "BR"
     //
     //   },],
-    // projects: [// 39环境
-    //   {
-    //     id: "Pj1101051029",
-    //     name: "北京万达广场",
-    //     pwd: "saga123456",
-    //     group_code: "WD"
-    //   }, {
-    //     id: "Pj0001110001",
-    //     name: "飞龙商场",
-    //     pwd: "saga123456",
-    //     group_code: "WD"
-    //   }, {
-    //     id: "Pj1101050029",
-    //     name: "东坝万达广场",
-    //     pwd: "saga123456",
-    //     group_code: "WD"
-    //   }, {
-    //     id: "Pj4403070003",
-    //     name: "深圳龙岗万达广场",
-    //     pwd: "saga123456",
-    //     group_code: "WD"
-    //   }, {
-    //     id: "Pj4403050019",
-    //     name: "招商深圳太子广场汇港二期",
-    //     pwd: "saga123456",
-    //     group_code: "ZS"
-    //   }, {
-    //     id: "Pj5001120003",
-    //     name: "香港置地约克北郡",
-    //     pwd: "saga123456",
-    //     group_code: "XG"
-    //   }, {
-    //     id: "Pj3201110003",
-    //     name: "弘阳集团弘云智慧管理平台",
-    //     pwd: "saga123456",
-    //     group_code: "HY"
-    //   }, {
-    //     id: "Pj3702020002",
-    //     name: "青岛海天中心",
-    //     pwd: "saga123456",
-    //     group_code: "GX"
-    //   }, {
-    //     id: "Pj1101010006",
-    //     name: "亚投行",
-    //     pwd: "saga123456",
-    //     group_code: "BT"
-    //   }, {
-    //     id: "Pj1101050013",
-    //     name: "BIM测试项目_亚投行",
-    //     pwd: "saga123456",
-    //     group_code: "BT"
-    //   }, {
-    //     id: "Pj1101080259",
-    //     name: "博锐尚格北京总部办公楼",
-    //     pwd: "saga123456",
-    //     group_code: "BR"
-    //   }, {
-    //     id: "Pj1101150002",
-    //     name: "华润生命科学园",
-    //     pwd: "saga123456",
-    //     group_code: "WD"
-    //   }, {
-    //     id: "Pj3101150007",
-    //     name: "招商上海森兰花园城",
-    //     pwd: "saga123456",
-    //     group_code: "WD"
-    //   }, {
-    //     id: "Pj5101080004",
-    //     name: "成都招商花园城",
-    //     pwd: "saga123456",
-    //     group_code: "WD"
-    //   }, {
-    //     id: "Pj3201130004",
-    //     name: "招商南京燕子矶花园城",
-    //     pwd: "saga123456",
-    //     group_code: "WD"
-    //   }, {
-    //     id: "Pj3702120001",
-    //     name: "金融中心",
-    //     pwd: "saga123456",
-    //     group_code: "WD"
-    //   }, {
-    //     id: "Pj1101051130",
-    //     name: "万达模型测试项目2",
-    //     pwd: "saga123456",
-    //     group_code: "WD"
-    //   } ,{
-    //     id: "Pj0002220001",
-    //     name: "数字化交付01",
-    //     pwd: "saga123456",
-    //     group_code: "BR"
-    //   },{
-    //     id: "Pj0002220002",
-    //     name: "数字化交付02",
-    //     pwd: "saga123456",
-    //     group_code: "BR"
-    //   },{
-    //     id: "Pj0002220003",
-    //     name: "数字化交付03",
-    //     pwd: "saga123456",
-    //     group_code: "BR"
-    //   },{
-    //     id: "Pj0002220004",
-    //     name: "数字化交付04",
-    //     pwd: "saga123456",
-    //     group_code: "BR"
-    //   },{
-    //     id: "Pj0002220005",
-    //     name: "数字化交付05",
-    //     pwd: "saga123456",
-    //     group_code: "BR"
-    //   },{
-    //     id: "Pj0002220006",
-    //     name: "数字化交付06",
-    //     pwd: "saga123456",
-    //     group_code: "BR"
-    //   },{
-    //     id: "Pj0002220007",
-    //     name: "数字化交付07",
-    //     pwd: "saga123456",
-    //     group_code: "BR"
-    //   },{
-    //     id: "Pj0002220008",
-    //     name: "数字化交付08",
-    //     pwd: "saga123456",
-    //     group_code: "BR"
-    //   },{
-    //     id: "Pj0002220009",
-    //     name: "数字化交付09",
-    //     pwd: "saga123456",
-    //     group_code: "BR"
-    //   },{
-    //     id: "Pj0002220010",
-    //     name: "数字化交付10",
-    //     pwd: "saga123456",
-    //     group_code: "BR"
-    //   }
-    // ],
-    projects: [// 18环境
+    projects: [// 39环境
       {
         id: "Pj1101051029",
         name: "北京万达广场",
@@ -212,12 +74,7 @@ export default {
         id: "Pj0001110001",
         name: "飞龙商场",
         pwd: "saga123456",
-        group_code: "MK"
-      }, {
-        id: "Pj0001110002",
-        name: "常州常武",
-        pwd: "saga123456",
-        group_code: "MK"
+        group_code: "WD"
       }, {
         id: "Pj1101050029",
         name: "东坝万达广场",
@@ -293,7 +150,150 @@ export default {
         name: "万达模型测试项目2",
         pwd: "saga123456",
         group_code: "WD"
-      }],
+      } ,{
+        id: "Pj0002220001",
+        name: "数字化交付01",
+        pwd: "saga123456",
+        group_code: "BR"
+      },{
+        id: "Pj0002220002",
+        name: "数字化交付02",
+        pwd: "saga123456",
+        group_code: "BR"
+      },{
+        id: "Pj0002220003",
+        name: "数字化交付03",
+        pwd: "saga123456",
+        group_code: "BR"
+      },{
+        id: "Pj0002220004",
+        name: "数字化交付04",
+        pwd: "saga123456",
+        group_code: "BR"
+      },{
+        id: "Pj0002220005",
+        name: "数字化交付05",
+        pwd: "saga123456",
+        group_code: "BR"
+      },{
+        id: "Pj0002220006",
+        name: "数字化交付06",
+        pwd: "saga123456",
+        group_code: "BR"
+      },{
+        id: "Pj0002220007",
+        name: "数字化交付07",
+        pwd: "saga123456",
+        group_code: "BR"
+      },{
+        id: "Pj0002220008",
+        name: "数字化交付08",
+        pwd: "saga123456",
+        group_code: "BR"
+      },{
+        id: "Pj0002220009",
+        name: "数字化交付09",
+        pwd: "saga123456",
+        group_code: "BR"
+      },{
+        id: "Pj0002220010",
+        name: "数字化交付10",
+        pwd: "saga123456",
+        group_code: "BR"
+      }
+    ],
+    // projects: [// 18环境
+    //   {
+    //     id: "Pj1101051029",
+    //     name: "北京万达广场",
+    //     pwd: "saga123456",
+    //     group_code: "WD"
+    //   }, {
+    //     id: "Pj0001110001",
+    //     name: "飞龙商场",
+    //     pwd: "saga123456",
+    //     group_code: "MK"
+    //   }, {
+    //     id: "Pj0001110002",
+    //     name: "常州常武",
+    //     pwd: "saga123456",
+    //     group_code: "MK"
+    //   }, {
+    //     id: "Pj1101050029",
+    //     name: "东坝万达广场",
+    //     pwd: "saga123456",
+    //     group_code: "WD"
+    //   }, {
+    //     id: "Pj4403070003",
+    //     name: "深圳龙岗万达广场",
+    //     pwd: "saga123456",
+    //     group_code: "WD"
+    //   }, {
+    //     id: "Pj4403050019",
+    //     name: "招商深圳太子广场汇港二期",
+    //     pwd: "saga123456",
+    //     group_code: "ZS"
+    //   }, {
+    //     id: "Pj5001120003",
+    //     name: "香港置地约克北郡",
+    //     pwd: "saga123456",
+    //     group_code: "XG"
+    //   }, {
+    //     id: "Pj3201110003",
+    //     name: "弘阳集团弘云智慧管理平台",
+    //     pwd: "saga123456",
+    //     group_code: "HY"
+    //   }, {
+    //     id: "Pj3702020002",
+    //     name: "青岛海天中心",
+    //     pwd: "saga123456",
+    //     group_code: "GX"
+    //   }, {
+    //     id: "Pj1101010006",
+    //     name: "亚投行",
+    //     pwd: "saga123456",
+    //     group_code: "BT"
+    //   }, {
+    //     id: "Pj1101050013",
+    //     name: "BIM测试项目_亚投行",
+    //     pwd: "saga123456",
+    //     group_code: "BT"
+    //   }, {
+    //     id: "Pj1101080259",
+    //     name: "博锐尚格北京总部办公楼",
+    //     pwd: "saga123456",
+    //     group_code: "BR"
+    //   }, {
+    //     id: "Pj1101150002",
+    //     name: "华润生命科学园",
+    //     pwd: "saga123456",
+    //     group_code: "WD"
+    //   }, {
+    //     id: "Pj3101150007",
+    //     name: "招商上海森兰花园城",
+    //     pwd: "saga123456",
+    //     group_code: "WD"
+    //   }, {
+    //     id: "Pj5101080004",
+    //     name: "成都招商花园城",
+    //     pwd: "saga123456",
+    //     group_code: "WD"
+    //   }, {
+    //     id: "Pj3201130004",
+    //     name: "招商南京燕子矶花园城",
+    //     pwd: "saga123456",
+    //     group_code: "WD"
+    //   }, {
+    //     id: "Pj3702120001",
+    //     name: "金融中心",
+    //     pwd: "saga123456",
+    //     group_code: "WD"
+    //   }, {
+    //     id: "Pj1101051130",
+    //     name: "万达模型测试项目2",
+    //     pwd: "saga123456",
+    //     group_code: "WD"
+    //   }],
     breadcrumb: [],
     uploaderList: [], //当前上传文件列表
     secret: "saga123456", //项目密码

+ 20 - 0
src/router/system.js

@@ -82,6 +82,9 @@ import relationShip from '@/views/relation/relationShip'
 import relationDetail from '@/views/relation/overview/detail'
 import data from '@/views/relation/data'
 import datatable from '@/views/relation/datatable'
+/**  数据日志同步 */
+import syncLog from '@/views/synclog'
+
 /**  厂家库 */
 /**  辅助屏 */
 import splitScreen from '@/views/screen/splitScreen'
@@ -789,6 +792,23 @@ export default [{
       {path: 'datatable', name: 'datatable', component: datatable}
     ]
   },
+  //数据同步日志
+  {
+		path: '/',
+    name: 'LayoutMain',
+    component: LayoutMain,
+		children: [
+			{
+				path: 'synclog',
+        name: 'synclog',
+        component: syncLog,
+        meta: {
+          keepAlive: false,
+          breadcrumbs: [{label: '数据同步日志', path: '/synclog'}]
+        }
+			}
+		]
+  }
   /******************** 通用字典 ***************************/
   //厂家库
   // {

+ 564 - 0
src/views/synclog/index.vue

@@ -0,0 +1,564 @@
+<template>
+    <div id="DataLog">
+        <div class="top">
+            <h2>数据同步日志</h2>
+            <div class="serve-updata">
+                <span> 中台状态 </span>
+                <el-popover placement="bottom" width="200" trigger="hover">
+                    <div>
+                        <div><span class="status-1"></span><span>:正常</span></div>
+                        <div><span class="status-2"></span><span>:异常</span></div>
+                    </div>
+                    <i slot="reference" className="infomations el-icon-information"></i> </el-popover
+                >:
+                <div ref="status" class="state"></div>
+                <el-button @click="queryIsOnline" type="text">刷新</el-button>
+            </div>
+        </div>
+        <div>
+            <div v-if="isShowTable" class="screen">
+                <p>筛选条件</p>
+                <ul class="screen-list">
+                    <li>
+                        <span>操作符:</span>
+                        <el-select v-model="operationValue" :clearable="true" @change="operationChange" placeholder="请选择">
+                            <el-option v-for="item in operation" :key="item.value" :label="item.label" :value="item.value"> </el-option>
+                        </el-select>
+                    </li>
+                    <li>
+                        <span>对象类型:</span>
+                        <el-select v-model="objTypeValue" :clearable="true" @change="objTypeChange" placeholder="请选择">
+                            <el-option v-for="item in objType" :key="item.value" :label="item.label" :value="item.value"> </el-option>
+                        </el-select>
+                    </li>
+                    <li v-if="objClassify.length">
+                        <span>对象分类:</span>
+                        <el-select v-model="objClassifyValue" :clearable="true" @change="objClassChange" placeholder="请选择">
+                            <el-option v-for="item in objClassify" :key="item.value" :label="item.label" :value="item.value"> </el-option>
+                        </el-select>
+                    </li>
+                </ul>
+
+                <el-table
+                    v-loading="loading"
+                    element-loading-text="拼命加载中"
+                    style="width: 100%"
+                    :data="data"
+                    :stripe="true"
+                    :maxHeight="620"
+                    @sort="handleSort"
+                >
+                    <el-table-column v-for="(item, key) in columns" :key="key" :label="item.label" :width="item.width">
+                        <template slot-scope="scope">
+                            <span style="margin-left: 10px">{{ scope.row[item.prop] ? scope.row[item.prop] : "--" }}</span>
+                        </template>
+                    </el-table-column>
+                </el-table>
+                <!-- {/* 分页 */} -->
+                <div class="pages">
+                    <el-pagination
+                        layout="total, sizes, prev, pager, next, jumper"
+                        :total="this.pageObj.total"
+                        :pageSizes="[15, 30, 50, 100]"
+                        @size-change="onSizeChange"
+                        @current-change="onCurrentChange"
+                        :pageSize="pageObj.pageSize"
+                        :currentPage="pageObj.pageNumber"
+                    />
+                </div>
+            </div>
+            <div v-else class="no-data">
+                <img src="@/assets/image/no-data.png" />
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+import { mapGetters } from 'vuex'
+import {
+    queryGroupCode,
+    queryTableList,
+    queryobjType,
+    queryIsOnline,
+    queryRecordSyn,
+    queryRecordUpdata,
+} from "@/api/synclog";
+// 操作符类型
+const tyleObj = {
+    create: "创建",
+    update: "修改",
+    delete: "删除",
+};
+export default {
+    data() {
+        return {
+            groupCode: "", //集团id
+            isShowTable: false, //是否显示table
+            columns: [
+                {
+                    label: "对象id",
+                    prop: "objId",
+                    width: 370,
+                },
+                {
+                    label: "时间",
+                    prop: "createTime",
+                    sortable: "custom",
+                },
+                {
+                    label: "名称",
+                    prop: "name",
+                    width: 120,
+                },
+                {
+                    label: "本地名称",
+                    prop: "localName",
+                    width: 120,
+                },
+
+                {
+                    label: "本地编码",
+                    prop: "localId",
+                    width: 120,
+                },
+                {
+                    label: "对象类型",
+                    prop: "objName",
+                },
+                {
+                    label: "操作类型",
+                    prop: "type",
+                    // render: (obj, a) => {
+                    //   return tyleObj[obj.type];
+                    // },
+                },
+                {
+                    label: "对象分类",
+                    prop: "classCode",
+                    // render: (obj) => {
+                    //   return obj.classCode && obj.classCodeName
+                    //     ? obj.classCodeName + "-" + obj.classCode
+                    //     : obj.classCode
+                    //     ? obj.classCode
+                    //     : "--";
+                    // },
+                },
+                {
+                    label: "报错信息",
+                    prop: "error",
+                    // render: (obj) => {
+                    //   return obj.error ? obj.error : "--";
+                    // },
+                },
+                // {
+                //   label: "操作",
+                //   prop: "zip",
+                //   fixed: "right",
+                //   width: 160,
+                //   render: (obj) => {
+                //     return (
+                //       <span>
+                //         <Button
+                //           type="text"
+                //           @click="queryRecordSyn"
+                //           size="small"
+                //         >
+                //           重新同步
+                //         </Button>
+                //         <Button
+                //           type="text"
+                //           size="small"
+                //           @click="hideMsg"
+                //         >
+                //           隐藏
+                //         </Button>
+                //       </span>
+                //     );
+                //   },
+                // },
+            ],
+            data: [],
+            objClassify: [],
+            //对象类型
+            objType: [
+                {
+                    value: "building",
+                    label: "建筑",
+                },
+                {
+                    value: "floor",
+                    label: "楼层",
+                },
+                {
+                    value: "equipment",
+                    label: "设备",
+                },
+                {
+                    value: "component",
+                    label: "部件",
+                },
+                {
+                    value: "space",
+                    label: "空间",
+                },
+                {
+                    value: "system",
+                    label: "系统",
+                },
+                {
+                    value: "shaft",
+                    label: "竖井",
+                },
+            ],
+            //操作下拉框
+            operation: [
+                {
+                    value: "create",
+                    label: "创建",
+                },
+                {
+                    value: "update",
+                    label: "修改",
+                },
+                {
+                    value: "delete",
+                    label: "删除",
+                },
+            ],
+            objClassifyValue: "", //对象分类状态
+            operationValue: "", //操作符状态
+            objTypeValue: "", //对象类型状态
+            loading: false, //是否加载
+            order: "lastUpdate asc, objId asc", //顺序
+            pageObj: {
+                total: 0, //总计
+                pageSize: 15, //每页数量
+                pageNumber: 1, //第几页
+            },
+        };
+    },
+    computed: {
+        ...mapGetters("layout", ["projectId"])
+    },
+    created() {
+        this.getData();
+    },
+    methods: {
+        // 项目id请求接口
+        getData() {
+            // 判断项目id是否为真
+            this.loading = true;
+            this.groupCode = "";
+            queryGroupCode({ projectId: this.projectId }, res => {
+                if (res.content.length) {
+                    // 允许显示table
+                    this.isShowTable = true;
+                    this.groupCode = res.content[0].groupCode;
+                    this.getTable();
+                    this.queryIsOnline();
+                } else {
+                    this.isShowTable = false;
+                    this.projectId = "";
+                    this.loading = false;
+                    this.$message({
+                        showClose: true,
+                        message: "项目id不存在!请重新输入",
+                        type: "error",
+                        duration: 3000,
+                    });
+                }
+            }, () => {
+                this.loading = false;
+                this.isShowTable = false;
+                this.projectId = "";
+                this.$message({
+                    showClose: true,
+                    message: "接口报错;请联系运维人员",
+                    type: "error",
+                    duration: 3000,
+                });
+            })
+        },
+        // 中台是否在线
+        queryIsOnline() {
+            const data = {
+                projectId: this.projectId,
+                groupCode: this.groupCode,
+            };
+            this.loading = true;
+            queryIsOnline(data, res => {
+                this.$message({
+                    showClose: true,
+                    message: res.message,
+                    type: res.result,
+                    duration: 3000,
+                });
+                this.loading = false;
+                if (res.result == "success") {
+                    this.$refs.status.style.background = "#19F704";
+                } else {
+                    this.$refs.status.style.background = "#4a4a4a";
+                }
+            }, () => {
+                this.loading = false;
+                this.$message({
+                    showClose: true,
+                    message: error,
+                    type: "error",
+                    duration: 3000,
+                });
+            });
+        },
+        // 获取对象类型下拉框
+        getObjTypeList() {
+            const data = {
+                projectId: this.projectId,
+                objType: this.objTypeValue,
+            };
+            queryobjType(data, res => {
+                const objClassify = res.content.map((item) => {
+                    return {
+                        value: item.code,
+                        label: item.name,
+                    };
+                });
+                this.objClassify = objClassify;
+            });
+        },
+        // 对象类型发生变化
+        objTypeChange(val) {
+            this.objTypeValue = val;
+            if (val == "equipment" || val == "space" || val == "system") {
+                this.getObjTypeList();
+            } else {
+                this.objClassify = [];
+            }
+            this.getTable();
+        },
+        // change变化触发获取tablelist
+        operationChange(val) {
+            this.operationValue = val;
+            this.getTable();
+        },
+        // 对象类型编号
+        objClassChange(val) {
+            this.objClassifyValue = val;
+            this.getTable();
+        },
+        // 请求table
+        getTable() {
+            this.loading = true;
+            if (this.projectId) {
+                // 请求table以及中台状态接口
+                //对象类型
+                const objectType = this.objTypeValue
+                    ? `;objectType='${this.objTypeValue}'`
+                    : "";
+                // 对象分类
+                const classCodeName = this.objClassifyValue
+                    ? `;classCode='${this.objClassifyValue}'`
+                    : "";
+                // 操作符状态
+                const type = this.operationValue
+                    ? `;type='${this.operationValue}'`
+                    : "";
+
+                const postParam = {
+                    order: this.order,
+                    pageNumber: this.pageObj.pageNumber,
+                    pageSize: this.pageObj.pageSize,
+                    filters: `projectId='${this.projectId}';sign=2${type}${classCodeName}${objectType}`,
+                };
+
+                queryTableList(postParam, res => {
+                    this.isShowTable = true;
+                    this.data = res.content;
+                    this.loading = false;
+                    this.pageObj = Object.assign(this.pageObj, {
+                        total: res.total,
+                        pageNumber: res.pageNumber,
+                        pageSize: res.pageSize,
+                    });
+                }, () => {
+                    this.isShowTable = false;
+                    this.loading = false;
+                    this.data = [];
+                })
+            } else {
+                this.isShowTable = false;
+            }
+        },
+        // 输入改变输入参数
+        onChange(key, value) {
+            this[key] = value;
+            // this.forceUpdate();
+        },
+        // 隐藏该条信息
+        hideMsg(res) {
+            const data = {
+                content: [
+                    {
+                        ...Object.assign(res, {
+                            sign: 3,
+                        }),
+                    },
+                ],
+            };
+            this.loading = true;
+            queryRecordUpdata(data, res => {
+                if (res.result == "success")
+                    this.$message({
+                        showClose: true,
+                        message: "隐藏完成",
+                        type: "success",
+                        duration: 3000,
+                    });
+                this.getTable();
+            }, () => {
+                this.$message({
+                    showClose: true,
+                    message: "隐藏失败,请重新同步或联系管理人员!",
+                    type: "error",
+                    duration: 3000,
+                });
+                this.loading = false;
+            })
+        },
+        // 同步信息
+        queryRecordSyn(res) {
+            const data = {
+                content: [
+                    {
+                        ...res,
+                    },
+                ],
+            };
+            this.loading = true;
+            queryRecordSyn(data, res => {
+                if (res.result == "success")
+                    this.$message({
+                        showClose: true,
+                        message: "同步完成!",
+                        type: "success",
+                        duration: 3000,
+                    });
+                this.getTable();
+            }, () => {
+                this.$message({
+                    showClose: true,
+                    message: "同步失败,请重新同步或联系管理人员!",
+                    type: "error",
+                    duration: 3000,
+                });
+                this.loading = false;
+            })
+        },
+        // 改变pageSize
+        onSizeChange(val) {
+            this.pageObj = Object.assign(this.pageObj, {
+                pageSize: val,
+            });
+            this.getTable();
+        },
+        // 改变当前页
+        onCurrentChange(val) {
+            this.pageObj = Object.assign(this.pageObj, {
+                pageNumber: val,
+            });
+            this.getTable();
+        },
+        // 时间排序
+        handleSort(data) {
+            if (data.order == "ascending") {
+                this.order = "lastUpdate asc, objId asc";
+            } else {
+                this.order = "lastUpdate desc, objId desc";
+            }
+            this.getTable();
+        },
+    },
+    watch: {
+        projectId() {
+            this.getData();
+        }
+    },
+};
+</script>
+<style lang="less">
+#DataLog {
+    padding: 20px 20px;
+    box-sizing: border-box;
+}
+.pages {
+    float: right;
+    margin-top: 12px;
+    margin-right: 24px;
+}
+
+.top {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+}
+
+.top .serve-updata {
+    display: flex;
+    align-items: center;
+    margin-right: 12px;
+}
+.top .serve-updata .state {
+    width: 20px;
+    height: 20px;
+    /* background: ; */
+    border-radius: 50% 50%;
+    margin-left: 6px;
+    margin-right: 6px;
+}
+.status-1 {
+    background: #19f704;
+    border-radius: 50% 50%;
+    width: 12px;
+    height: 12px;
+    display: inline-block;
+}
+.status-2 {
+    display: inline-block;
+    width: 12px;
+    height: 12px;
+    background: #4a4a4a;
+    border-radius: 50% 50%;
+}
+
+.project {
+    display: flex;
+    width: 300px;
+    align-items: center;
+    justify-content: space-between;
+    margin-bottom: 24px;
+}
+.project p {
+    width: 90px;
+}
+.screen {
+    margin-bottom: 12px;
+}
+.screen .screen-list {
+    display: flex;
+    align-items: center;
+    padding: 12px;
+}
+.screen ul li {
+    margin-left: 12px;
+}
+.infomations {
+    cursor: pointer;
+}
+.no-data {
+    width: 100%;
+    min-height: 600px;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+}
+</style>