guoxiaohuan 4 years ago
parent
commit
1e10b30f75

+ 0 - 1
package.json

@@ -22,7 +22,6 @@
         "quill": "^1.3.7",
         "quill": "^1.3.7",
         "vue": "^2.6.10",
         "vue": "^2.6.10",
         "vue-cookie": "^1.1.4",
         "vue-cookie": "^1.1.4",
-        "vue-pdf": "^4.1.0",
         "vue-quill-editor": "^3.0.6",
         "vue-quill-editor": "^3.0.6",
         "vue-router": "^3.1.3",
         "vue-router": "^3.1.3",
         "vuex": "^3.4.0"
         "vuex": "^3.4.0"

+ 128 - 138
src/App.vue

@@ -1,80 +1,69 @@
 <template>
 <template>
-  <div id="app">
-    <div :id="`fengMap${id}`" class="fengMap"></div>
-    <router-view />
-  </div>
+    <div id='app'>
+        <div :id='`fengMap${id}`' class='fengMap'></div>
+        <router-view />
+    </div>
 </template>
 </template>
 <script>
 <script>
-import { mapGetters, mapActions, mapMutations } from "vuex";
-import { SFengParser } from "@saga-web/feng-map";
-window.fengmapData = null;
+import { mapGetters, mapActions, mapMutations } from 'vuex'
+import { SFengParser } from '@saga-web/feng-map'
+window.fengmapData = null
 export default {
 export default {
-  data() {
-    return {
-      view: "",
-      scene: "",
-      id: "2",
-      canvasID: "",
-      key: "23f30a832a862c58637a4aadbf50a566",
-      appName: "万达可视化系统",
-      mapServerURL: `http://map.wanda.cn/editor`
-    };
-  },
-  mounted() {
-    // 监听页面刷新事件
-    window.addEventListener("unload", this.unload);
-    // 页面加载完成后,移除session里的存储的信息
-    window.addEventListener("load", this.load);
-    // 请求该项目下的楼层数据
-    this.getFengMap();
-  },
-  computed: {
-    ...mapGetters(["plazaId", "fmapID", "haveFengMap"])
-  },
-  methods: {
-    ...mapActions(["getfmapID"]),
-    ...mapMutations(["SETHAVEFENGMAP"]),
-    unload() {
-      // const { userInfo, projectId, menuStatus,manualAutoMode } = this.$store.state;
-      const state = this.$store.state;
-      sessionStorage.setItem("state", JSON.stringify(state));
+    data() {
+        return {
+            view: '',
+            scene: '',
+            id: '2',
+            canvasID: '',
+            key: '23f30a832a862c58637a4aadbf50a566',
+            appName: '万达可视化系统',
+            mapServerURL: `http://map.wanda.cn/editor`
+        }
     },
     },
-    load() {
-      sessionStorage.clear();
+    mounted() {
+        // 监听页面刷新事件
+        window.addEventListener('unload', this.unload)
+        // 页面加载完成后,移除session里的存储的信息
+        window.addEventListener('load', this.load)
+        // 请求该项目下的楼层数据
+        this.getFengMap()
     },
     },
-    getFengMap() {
-      if (!this.fmapID) {
-        this.getfmapID().then(() => {
-          this.getMap();
-        });
-        return;
-      }
-      this.getMap();
+    computed: {
+        ...mapGetters(['plazaId', 'fmapID', 'haveFengMap'])
     },
     },
-    getMap() {
-      if (!window.fengmapData) {
-        window.fengmapData = new SFengParser(
-          `fengMap${this.id}`,
-          `${this.mapServerURL}/fmap/${this.fmapID}`,
-          this.key,
-          this.appName,
-          null
-        );
-        window.fengmapData.loadMap(this.fmapID, () => {
-          // 获取主题数据
-          window.fengmapData
-            .loadTheme(
-              `${this.mapServerURL}/webtheme/${this.fmapID}/${this.fmapID}.theme`
-            )
-            .then(res => {
-              console.log("获取rf成功", res);
-               this.SETHAVEFENGMAP()
-            });
-        });
-      }
+    methods: {
+        ...mapActions(['getfmapID']),
+        ...mapMutations(['SETHAVEFENGMAP']),
+        unload() {
+            // const { userInfo, projectId, menuStatus,manualAutoMode } = this.$store.state;
+            const state = this.$store.state
+            sessionStorage.setItem('state', JSON.stringify(state))
+        },
+        load() {
+            sessionStorage.clear()
+        },
+        getFengMap() {
+            if (!this.fmapID) {
+                this.getfmapID().then(() => {
+                    this.getMap()
+                })
+                return
+            }
+            this.getMap()
+        },
+        getMap() {
+            if (!window.fengmapData) {
+                window.fengmapData = new SFengParser(`fengMap${this.id}`, `${this.mapServerURL}/fmap/${this.fmapID}`, this.key, this.appName, null)
+                window.fengmapData.loadMap(this.fmapID, () => {
+                    // 获取主题数据
+                    window.fengmapData.loadTheme(`${this.mapServerURL}/webtheme/${this.fmapID}/${this.fmapID}.theme`).then(res => {
+                        this.SETHAVEFENGMAP()
+                    })
+                })
+            }
+        }
     }
     }
-  },
-};
+}
 </script>
 </script>
 <style lang="less">
 <style lang="less">
 body,
 body,
@@ -102,8 +91,8 @@ input,
 textarea,
 textarea,
 th,
 th,
 td {
 td {
-  margin: 0;
-  padding: 0;
+    margin: 0;
+    padding: 0;
 }
 }
 
 
 body,
 body,
@@ -111,7 +100,7 @@ button,
 input,
 input,
 select,
 select,
 textarea {
 textarea {
-  font: 12px/1.5 Arial, "Microsoft YaHei", "\65b0\5b8b\4f53";
+    font: 12px/1.5 Arial, 'Microsoft YaHei', '\65b0\5b8b\4f53';
 }
 }
 
 
 h1,
 h1,
@@ -120,7 +109,7 @@ h3,
 h4,
 h4,
 h5,
 h5,
 h6 {
 h6 {
-  font-size: 100%;
+    font-size: 100%;
 }
 }
 
 
 address,
 address,
@@ -130,67 +119,67 @@ var,
 em,
 em,
 i,
 i,
 u {
 u {
-  font-style: normal;
+    font-style: normal;
 }
 }
 
 
 ol,
 ol,
 ul {
 ul {
-  list-style: none;
+    list-style: none;
 }
 }
 
 
 a {
 a {
-  text-decoration: none;
+    text-decoration: none;
 }
 }
 
 
 a:hover {
 a:hover {
-  text-decoration: underline;
+    text-decoration: underline;
 }
 }
 
 
 img {
 img {
-  border: none;
-  vertical-align: middle;
+    border: none;
+    vertical-align: middle;
 }
 }
 
 
 :focus {
 :focus {
-  outline: 0;
+    outline: 0;
 }
 }
 
 
 button,
 button,
 input,
 input,
 select,
 select,
 textarea {
 textarea {
-  font-size: 100%;
+    font-size: 100%;
 }
 }
 
 
 table {
 table {
-  border-collapse: collapse;
-  border-spacing: 0;
+    border-collapse: collapse;
+    border-spacing: 0;
 }
 }
 
 
 /* 滚动条样式 */
 /* 滚动条样式 */
 
 
 body ::-webkit-scrollbar {
 body ::-webkit-scrollbar {
-  width: 5px;
-  height: 8px;
+    width: 5px;
+    height: 8px;
 }
 }
 
 
 body ::-webkit-scrollbar-track {
 body ::-webkit-scrollbar-track {
-  background-color: rgba(0, 0, 0, 0);
-  border-radius: 3px;
+    background-color: rgba(0, 0, 0, 0);
+    border-radius: 3px;
 }
 }
 
 
 body ::-webkit-scrollbar-thumb {
 body ::-webkit-scrollbar-thumb {
-  border-radius: 3px;
-  background: #e6e6e6;
-  border: 1px solid #e6e6e6;
+    border-radius: 3px;
+    background: #e6e6e6;
+    border: 1px solid #e6e6e6;
 }
 }
 
 
 body ::-webkit-scrollbar-thumb:vertical:hover {
 body ::-webkit-scrollbar-thumb:vertical:hover {
-  background: #e6e6e6;
-  border: 1px solid #e6e6e6;
+    background: #e6e6e6;
+    border: 1px solid #e6e6e6;
 }
 }
 
 
-#app{
+#app {
     //meri-design组件select的字体颜色
     //meri-design组件select的字体颜色
     /deep/ .p-select-fakePlaceholder {
     /deep/ .p-select-fakePlaceholder {
         span {
         span {
@@ -202,72 +191,73 @@ body ::-webkit-scrollbar-thumb:vertical:hover {
         }
         }
     }
     }
     //element 分页组件背景色
     //element 分页组件背景色
-    /deep/ .el-pagination.is-background .el-pager li:not(.disabled).active{
-        background:linear-gradient(180deg,rgba(54,156,247,1) 0%,rgba(2,91,170,1) 100%);
+    /deep/ .el-pagination.is-background .el-pager li:not(.disabled).active {
+        background: linear-gradient(180deg, rgba(54, 156, 247, 1) 0%, rgba(2, 91, 170, 1) 100%);
+    }
+    //element button
+    /deep/ .el-button--primary,
+    .p-button-primary {
+        background: linear-gradient(180deg, rgba(54, 156, 247, 1) 0%, rgba(2, 91, 170, 1) 100%);
     }
     }
-    //element button 
-   /deep/ .el-button--primary,.p-button-primary{
-      background:linear-gradient(180deg,rgba(54,156,247,1) 0%,rgba(2,91,170,1) 100%);
-   }
 }
 }
 .clearfix::after {
 .clearfix::after {
-  content: ".";
-  display: block;
-  height: 0;
-  clear: both;
-  visibility: hidden;
+    content: '.';
+    display: block;
+    height: 0;
+    clear: both;
+    visibility: hidden;
 }
 }
 .clearfix {
 .clearfix {
-  zoom: 1;
+    zoom: 1;
 }
 }
 
 
 .left {
 .left {
-  float: left;
+    float: left;
 }
 }
 
 
 .right {
 .right {
-  float: right;
+    float: right;
 }
 }
 html,
 html,
 body {
 body {
-  width: 100%;
-  height: 100%;
-  // min-width: 1920px;
-  //   background: url('./assets/images/back.jpg') no-repeat;
+    width: 100%;
+    height: 100%;
+    // min-width: 1920px;
+    //   background: url('./assets/images/back.jpg') no-repeat;
 }
 }
 #app {
 #app {
-  height: 100%;
-  width: 100%;
-  position: relative;
-  .fengMap {
-    position: fixed;
-    width: 100px;
-    height: 100px;
-    z-index: -1;
-    opacity: 0
-  }
+    height: 100%;
+    width: 100%;
+    position: relative;
+    .fengMap {
+        position: fixed;
+        width: 100px;
+        height: 100px;
+        z-index: -1;
+        opacity: 0;
+    }
 }
 }
 // element表头背景颜色修改
 // element表头背景颜色修改
 .core-device-report,
 .core-device-report,
-.specification-update-record{
-  .el-table thead th{
-    background-color: #F8F9FA;
-  }
-  .el-pagination.is-background .el-pager li:not(.disabled).active{
-    background: linear-gradient(180deg,rgba(54,156,247,1) 0%,rgba(2,91,170,1) 100%);
-  }
+.specification-update-record {
+    .el-table thead th {
+        background-color: #f8f9fa;
+    }
+    .el-pagination.is-background .el-pager li:not(.disabled).active {
+        background: linear-gradient(180deg, rgba(54, 156, 247, 1) 0%, rgba(2, 91, 170, 1) 100%);
+    }
 }
 }
 // 说明书更新记录 element 时间控件样式重写
 // 说明书更新记录 element 时间控件样式重写
 .specification-update-record,
 .specification-update-record,
-.core-device-report{
-  .el-input__inner{
-    height: 32px;
-    line-height: 32px;
-  }
-  .el-date-editor .el-range__icon,
-  .el-date-editor .el-range-separator{
-    line-height: 26px;
-    width: 8%;
-  }
+.core-device-report {
+    .el-input__inner {
+        height: 32px;
+        line-height: 32px;
+    }
+    .el-date-editor .el-range__icon,
+    .el-date-editor .el-range-separator {
+        line-height: 26px;
+        width: 8%;
+    }
 }
 }
 </style>
 </style>

+ 4 - 4
src/api/coreDeviceReport.js

@@ -1,11 +1,11 @@
 // 核心设备报表 接口
 // 核心设备报表 接口
-import httputils from "@/api/httputils";
+import httputils from '@/api/httputils'
 
 
 // 系统列表
 // 系统列表
 export function queryEquipmentList() {
 export function queryEquipmentList() {
-  return httputils.getJson(`/data/data/v_glsms_systemcfg/querySmsxt`);
+    return httputils.getJson(`/data/v_glsms_systemcfg/querySmsxt`)
 }
 }
 // 表数据
 // 表数据
 export function queryTableData(url, postParams) {
 export function queryTableData(url, postParams) {
-  return httputils.postJson(url, postParams);
-}
+    return httputils.postJson(url, postParams)
+}

+ 11 - 11
src/api/equipmentList.js

@@ -1,50 +1,50 @@
-import httputils from "@/api/httputils"
+import httputils from '@/api/httputils'
 
 
 // 设备设施-主要设备清单
 // 设备设施-主要设备清单
 export function queryEquipmentList({ data, postParams }) {
 export function queryEquipmentList({ data, postParams }) {
-    return httputils.fetchJson(`/data/data/glsms_asset/queryStatistics`, data, postParams)
+    return httputils.fetchJson(`/data/glsms_asset/queryStatistics`, data, postParams)
 }
 }
 
 
 // 设备设施-主要设备清单详情
 // 设备设施-主要设备清单详情
 export function queryAsset({ data, postParams }) {
 export function queryAsset({ data, postParams }) {
-    return httputils.fetchJson(`/data/data/glsms_asset/query`, data, postParams)
+    return httputils.fetchJson(`/data/glsms_asset/query`, data, postParams)
 }
 }
 // 设备设施-主要材料清单
 // 设备设施-主要材料清单
 export function queryMaterialList({ getParams }) {
 export function queryMaterialList({ getParams }) {
-    return httputils.getJson(`/data/data/gcglsms_material/query`, getParams)
+    return httputils.getJson(`/data/gcglsms_material/query`, getParams)
 }
 }
 
 
 // 设备设施-维保事项
 // 设备设施-维保事项
 export function queryWbsms({ data, getParams }) {
 export function queryWbsms({ data, getParams }) {
-    return httputils.getJson(`/data/data/v_glsms_wbsms/query`, data, getParams)
+    return httputils.getJson(`/data/v_glsms_wbsms/query`, data, getParams)
 }
 }
 
 
 // 设备设施-维修事项
 // 设备设施-维修事项
 export function queryWx({ data, getParams }) {
 export function queryWx({ data, getParams }) {
-    return httputils.getJson(`/data/data/v_glsms_wx/query`, data, getParams)
+    return httputils.getJson(`/data/v_glsms_wx/query`, data, getParams)
 }
 }
 
 
 // 设备设施-专维
 // 设备设施-专维
 export function queryZw({ data, getParams }) {
 export function queryZw({ data, getParams }) {
-    return httputils.getJson(`/data/data/v_glsms_zw/query`, data, getParams)
+    return httputils.getJson(`/data/v_glsms_zw/query`, data, getParams)
 }
 }
 
 
 // 设备设施-其他事项
 // 设备设施-其他事项
 export function queryQtsx({ data, getParams }) {
 export function queryQtsx({ data, getParams }) {
-    return httputils.getJson(`/data/data/v_glsms_qtsx/query`, data, getParams)
+    return httputils.getJson(`/data/v_glsms_qtsx/query`, data, getParams)
 }
 }
 
 
 // 设备设施-记录事项
 // 设备设施-记录事项
 export function queryRecord({ getParams }) {
 export function queryRecord({ getParams }) {
-    return httputils.getJson(`/data/data/v_gcglsms_wxwbsxline/query`, getParams)
+    return httputils.getJson(`/data/v_gcglsms_wxwbsxline/query`, getParams)
 }
 }
 
 
 // 设备设施=查看图纸
 // 设备设施=查看图纸
 export function queryxxx({ getParams }) {
 export function queryxxx({ getParams }) {
-    return httputils.getJson(`/data/data/xxX`, getParams)
+    return httputils.getJson(`/data/xxX`, getParams)
 }
 }
 
 
 // 设备设施-楼层电井口(间)控制商铺范围清单
 // 设备设施-楼层电井口(间)控制商铺范围清单
 export function queryShops({ getParams }) {
 export function queryShops({ getParams }) {
-    return httputils.getJson(`/data/data/v_glsms_shops/query`, getParams)
+    return httputils.getJson(`/data/v_glsms_shops/query`, getParams)
 }
 }

+ 11 - 21
src/api/httputils.js

@@ -20,11 +20,16 @@ const axiosservice = axios.create({
 axiosservice.interceptors.request.use(
 axiosservice.interceptors.request.use(
     (config) => {
     (config) => {
         config.withCredentials = true // 允许携带token ,这个是解决跨域产生的相关问题
         config.withCredentials = true // 允许携带token ,这个是解决跨域产生的相关问题
-        let token = store.getters['token']
-        if (token) {
+        let token = store.getters['ssoToken']
+        // if (token) {
+        //     config.headers = {
+        //         'sso-token': token,
+        //     }
+        // }
+        if (config.url.indexOf('mapapp') < 0) {
             config.headers = {
             config.headers = {
                 'sso-token': token,
                 'sso-token': token,
-                'isPreview': false //默认false,当预览开启的时候是true
+                isPreview: false, //默认false,当预览开启的时候是true
             }
             }
         }
         }
         return config
         return config
@@ -37,7 +42,6 @@ axiosservice.interceptors.request.use(
 axiosservice.interceptors.response.use(
 axiosservice.interceptors.response.use(
     function(res) {
     function(res) {
         //在这里对返回的数据进行处理
         //在这里对返回的数据进行处理
-        //// //console.log('axios interceptors res = ', res.status, res)
         let resp = res.data
         let resp = res.data
         if (resp.result === 'unauthc') {
         if (resp.result === 'unauthc') {
             store.commit('logined', false)
             store.commit('logined', false)
@@ -47,23 +51,15 @@ axiosservice.interceptors.response.use(
                 type: 'error',
                 type: 'error',
             })
             })
                 .then((resp) => {
                 .then((resp) => {
-                    //// //console.log('--------------------------- confirm', resp)
-                    //router.push('/login')
                     window.location.reload()
                     window.location.reload()
                 })
                 })
-                .catch((error) => {
-                    //// //console.log('--------------------------- cancel', error)
-                    // //console.log("")
-                })
+                .catch((error) => {})
         } else if (resp.result == 'unauthorization') {
         } else if (resp.result == 'unauthorization') {
             MessageBox.alert('无权操作', { title: '警告', type: 'error' })
             MessageBox.alert('无权操作', { title: '警告', type: 'error' })
         }
         }
-        //// //console.log('axios interceptors resp2 = ', resp.success, resp.errorCode, resp.errorMessage, res)
         return res
         return res
     },
     },
     function(err) {
     function(err) {
-        //Do something with response error
-        // //console.log("axios interceptors err = ", err)
         return Promise.reject(err)
         return Promise.reject(err)
     }
     }
 )
 )
@@ -158,27 +154,21 @@ export default {
             .then((resp) => {
             .then((resp) => {
                 let headers = resp.headers
                 let headers = resp.headers
                 let contentType = headers['content-type']
                 let contentType = headers['content-type']
-
-                // //console.log("响应头信息", headers)
                 if (!resp.data) {
                 if (!resp.data) {
                     console.error('响应异常:', resp)
                     console.error('响应异常:', resp)
                     return false
                     return false
                 } else {
                 } else {
-                    // //console.log("下载文件:", resp)
+                    //console.log("下载文件:", resp)
                     const blob = new Blob([resp.data], { type: contentType })
                     const blob = new Blob([resp.data], { type: contentType })
-
                     const contentDisposition = resp.headers['content-disposition']
                     const contentDisposition = resp.headers['content-disposition']
                     let fileName = 'unknown'
                     let fileName = 'unknown'
                     if (contentDisposition) {
                     if (contentDisposition) {
                         fileName = window.decodeURI(resp.headers['content-disposition'].split('=')[1])
                         fileName = window.decodeURI(resp.headers['content-disposition'].split('=')[1])
                     }
                     }
-                    // //console.log("文件名称:", fileName)
                     downFile(blob, fileName)
                     downFile(blob, fileName)
                 }
                 }
             })
             })
-            .catch(function(error) {
-                // //console.log(error)
-            })
+            .catch(function(error) {})
     },
     },
     axios: axiosservice,
     axios: axiosservice,
 }
 }

+ 19 - 52
src/api/legendLibrary.js

@@ -1,14 +1,10 @@
-import httputils from "@/api/httputils"
+import httputils from '@/api/httputils'
 // 图例库-查询
 // 图例库-查询
-export function queryLegend({
-    postParams
-}) {
+export function queryLegend({ postParams }) {
     return httputils.postJson(`/serve/topology-wanda/graphElement/query`, postParams)
     return httputils.postJson(`/serve/topology-wanda/graphElement/query`, postParams)
 }
 }
 // 图例库-新增
 // 图例库-新增
-export function createLegend({
-    postParams
-}) {
+export function createLegend({ postParams }) {
     return httputils.postJson(`/serve/topology-wanda/graphElement/create`, postParams)
     return httputils.postJson(`/serve/topology-wanda/graphElement/create`, postParams)
 }
 }
 // 图例库-新增
 // 图例库-新增
@@ -18,78 +14,53 @@ export function createLegend({
 //     return httputils.postJson(`/serve/topology-wanda/graphElement/create`, postParams)
 //     return httputils.postJson(`/serve/topology-wanda/graphElement/create`, postParams)
 // }
 // }
 //图例库-更新
 //图例库-更新
-export function updateLegend({
-    postParams
-}) {
+export function updateLegend({ postParams }) {
     return httputils.postJson(`/serve/topology-wanda/graphElement/update`, postParams)
     return httputils.postJson(`/serve/topology-wanda/graphElement/update`, postParams)
 }
 }
 //图例库-作废
 //图例库-作废
-export function deleteLegend({
-    postParams
-}) {
+export function deleteLegend({ postParams }) {
     return httputils.postJson(`/serve/topology-wanda/graphElement/deleteByFlag`, postParams)
     return httputils.postJson(`/serve/topology-wanda/graphElement/deleteByFlag`, postParams)
 }
 }
 //图例库-系统tree查询
 //图例库-系统tree查询
-export function getLegendTree({
-    getParams
-}) {
+export function getLegendTree({ getParams }) {
     return httputils.getJson(`/serve/topology-wanda/graphCategory/queryByGroup`, getParams)
     return httputils.getJson(`/serve/topology-wanda/graphCategory/queryByGroup`, getParams)
 }
 }
 
 
 //图例库-系统tree相关表格查询
 //图例库-系统tree相关表格查询
-export function queryRelation({
-    data,
-    postParams
-}) {
+export function queryRelation({ data, postParams }) {
     return httputils.fetchJson(`/serve/topology-wanda/graphRelation/query`, data, postParams)
     return httputils.fetchJson(`/serve/topology-wanda/graphRelation/query`, data, postParams)
 }
 }
 //图例库-更新关系图
 //图例库-更新关系图
-export function updateRelation({
-    postParams
-}) {
+export function updateRelation({ postParams }) {
     return httputils.postJson(`/serve/topology-wanda/graphRelation/update`, postParams)
     return httputils.postJson(`/serve/topology-wanda/graphRelation/update`, postParams)
 }
 }
 //图例库-系统tree相关表格删除
 //图例库-系统tree相关表格删除
-export function deleteRelation({
-    postParams
-}) {
+export function deleteRelation({ postParams }) {
     return httputils.postJson(`/serve/topology-wanda/graphRelation/delete`, postParams)
     return httputils.postJson(`/serve/topology-wanda/graphRelation/delete`, postParams)
 }
 }
 //图例库-上传图片
 //图例库-上传图片
-export function uploadImg({
-    postParams
-}) {
+export function uploadImg({ postParams }) {
     return httputils.postJson(`/serve/topology-wanda/Picture/create`, postParams)
     return httputils.postJson(`/serve/topology-wanda/Picture/create`, postParams)
 }
 }
 //图例库-穿梭框的搜索
 //图例库-穿梭框的搜索
-export function getTransfer({
-    getParams
-}) {
+export function getTransfer({ getParams }) {
     return httputils.getJson(`/serve/topology-wanda/graphElement/search`, getParams)
     return httputils.getJson(`/serve/topology-wanda/graphElement/search`, getParams)
 }
 }
 //图例库typeId
 //图例库typeId
-export function queryTypeId({
-    postParams
-}) {
+export function queryTypeId({ postParams }) {
     return httputils.postJson(`/serve/topology-wanda/graphElement/type/query`, postParams)
     return httputils.postJson(`/serve/topology-wanda/graphElement/type/query`, postParams)
 }
 }
 // 搜索图铺位可视化类型信息
 // 搜索图铺位可视化类型信息
-export function getVisualization({
-    getParams
-}) {
+export function getVisualization({ getParams }) {
     return httputils.getJson(`/serve/topology-wanda/graphElement/type/search`, getParams)
     return httputils.getJson(`/serve/topology-wanda/graphElement/type/search`, getParams)
 }
 }
 // 图例分层展示
 // 图例分层展示
-export function groupByCategory({
-    getParams
-}) {
+export function groupByCategory({ getParams }) {
     // return httputils.getJson(`/serve/topology-wanda/graphRelation/groupByCategory`, getParams)
     // return httputils.getJson(`/serve/topology-wanda/graphRelation/groupByCategory`, getParams)
     return httputils.getJson(`/serve/topology-wanda/graphElement/groupByInfoSystem`, getParams)
     return httputils.getJson(`/serve/topology-wanda/graphElement/groupByInfoSystem`, getParams)
 }
 }
 // 图例搜索
 // 图例搜索
-export function graphElementSearch({
-    postParams
-}) {
+export function graphElementSearch({ postParams }) {
     return httputils.postJson(`/serve/topology-wanda/graphElement/search`, postParams)
     return httputils.postJson(`/serve/topology-wanda/graphElement/search`, postParams)
 }
 }
 // 更新图例关系信息
 // 更新图例关系信息
@@ -101,15 +72,11 @@ export function graphElementSearch({
 // }
 // }
 
 
 // 业下设备分类和位置分类树形结构
 // 业下设备分类和位置分类树形结构
-export function queryDeviceAndPOsition({
-    postParams
-}) {
-    return httputils.postJson(`/data/data/t_system_wzfl/query`, postParams)
+export function queryDeviceAndPOsition({ postParams }) {
+    return httputils.postJson(`/data/t_system_wzfl/query`, postParams)
 }
 }
 
 
 //图形查询
 //图形查询
-export function queryPics({
-    postParams
-}) {
+export function queryPics({ postParams }) {
     return httputils.postJson(`/serve/topology-wanda/graph/query`, postParams)
     return httputils.postJson(`/serve/topology-wanda/graph/query`, postParams)
-}
+}

+ 3 - 3
src/api/login.js

@@ -1,12 +1,12 @@
 // 登录校验接口
 // 登录校验接口
-import httputils from "@/api/httputils"
+import httputils from '@/api/httputils'
 
 
 export function login(params) {
 export function login(params) {
-    return httputils.getJson(`/data/data/auth/check`, params)
+    return httputils.getJson(`/data/auth/check`, params)
 }
 }
 // 查询楼层清单
 // 查询楼层清单
 export function queryFloor(params) {
 export function queryFloor(params) {
-    return httputils.getJson(`/data/data/plaza/floor`, params)
+    return httputils.getJson(`/data/plaza/floor`, params)
 }
 }
 export function queryfmapID(params) {
 export function queryfmapID(params) {
     return httputils.getJson(`http://mapapp.wanda.cn/sgmap/mapversion`, params)
     return httputils.getJson(`http://mapapp.wanda.cn/sgmap/mapversion`, params)

+ 5 - 5
src/api/other.js

@@ -1,23 +1,23 @@
 import httputils from '@/api/httputils'
 import httputils from '@/api/httputils'
 // 综合事项记录
 // 综合事项记录
 export function queryGlams({ getParams }) {
 export function queryGlams({ getParams }) {
-    return httputils.getJson(`/data/data/v_glsms_zhsxjl/query`, getParams)
+    return httputils.getJson(`/data/v_glsms_zhsxjl/query`, getParams)
 }
 }
 // 第三方检测事项
 // 第三方检测事项
 export function queryDsfrw({ getParams }) {
 export function queryDsfrw({ getParams }) {
-    return httputils.getJson(`/data/data/v_glsms_dsfrw/query`, getParams)
+    return httputils.getJson(`/data/v_glsms_dsfrw/query`, getParams)
 }
 }
 //综合事项管理-综合记录事项弹框
 //综合事项管理-综合记录事项弹框
 export function queryZhsxjl({ getParams }) {
 export function queryZhsxjl({ getParams }) {
-    return httputils.getJson(`/data/data/v_glsms_zhsxjl/queryWindown`, getParams)
+    return httputils.getJson(`/data/v_glsms_zhsxjl/queryWindown`, getParams)
 }
 }
 
 
 // 辅助用房管理-广场辅助用房汇总统计报
 // 辅助用房管理-广场辅助用房汇总统计报
 export function querygcfzyfhz({ getParams }) {
 export function querygcfzyfhz({ getParams }) {
-    return httputils.getJson(`/data/data/v_glsms_gcfzyfhz/query`, getParams)
+    return httputils.getJson(`/data/v_glsms_gcfzyfhz/query`, getParams)
 }
 }
 
 
 // 辅助用房管理-广场辅助用房调改变更记录
 // 辅助用房管理-广场辅助用房调改变更记录
 export function queryfzyfchange({ getParams }) {
 export function queryfzyfchange({ getParams }) {
-    return httputils.getJson(`/data/data/v_glsms_fzyfchange/query`, getParams)
+    return httputils.getJson(`/data/v_glsms_fzyfchange/query`, getParams)
 }
 }

+ 2 - 2
src/api/overview.js

@@ -1,5 +1,5 @@
-import httputils from "@/api/httputils"
+import httputils from '@/api/httputils'
 // 查询广场概况
 // 查询广场概况
 export function queryFact({ getParams }) {
 export function queryFact({ getParams }) {
-    return httputils.getJson(`/data/data/plaza/fact`, getParams)
+    return httputils.getJson(`/data/plaza/fact`, getParams)
 }
 }

+ 4 - 4
src/api/public.js

@@ -1,17 +1,17 @@
 import httputils from '@/api/httputils'
 import httputils from '@/api/httputils'
 // 查询图片
 // 查询图片
 export function queryPic({ getParams }) {
 export function queryPic({ getParams }) {
-    return httputils.getJson(`/data/data/glsms_proimgup/query`, getParams)
+    return httputils.getJson(`/data/glsms_proimgup/query`, getParams)
 }
 }
 
 
 // 查询下拉框
 // 查询下拉框
 export function querySelect({ data, postParams }) {
 export function querySelect({ data, postParams }) {
-    return httputils.fetchJson(`/data/data/base/queryOptions`, data, postParams)
+    return httputils.fetchJson(`/data/base/queryOptions`, data, postParams)
 }
 }
 
 
 // 查询Tab数据统计数量
 // 查询Tab数据统计数量
 export function queryTab({ data, postParams }) {
 export function queryTab({ data, postParams }) {
-    return httputils.fetchJson(`/data/data/base/queryTabStatistics`, data, postParams)
+    return httputils.fetchJson(`/data/base/queryTabStatistics`, data, postParams)
 }
 }
 
 
 // 查询图例统计信息
 // 查询图例统计信息
@@ -47,5 +47,5 @@ export function queryDraftNum(data) {
 }
 }
 // 查询铺位名称
 // 查询铺位名称
 export function queryBrand({ data, postParams }) {
 export function queryBrand({ data, postParams }) {
-    return httputils.fetchJson(`/data/data/tb_brand_intentiondetail/query`, data, postParams)
+    return httputils.fetchJson(`/data/tb_brand_intentiondetail/query`, data, postParams)
 }
 }

+ 7 - 7
src/api/room.js

@@ -2,34 +2,34 @@ import httputils from '@/api/httputils'
 
 
 // 机房-机房布置图
 // 机房-机房布置图
 export function xx({ getParams }) {
 export function xx({ getParams }) {
-    return httputils.getJson(`/data/data/v_glsms_zhsxjl/query`, getParams)
+    return httputils.getJson(`/data/v_glsms_zhsxjl/query`, getParams)
 }
 }
 
 
 // 机房-配电室低压柜及出线明细表
 // 机房-配电室低压柜及出线明细表
 export function queryDygjcxline({ getParams }) {
 export function queryDygjcxline({ getParams }) {
-    return httputils.getJson(`/data/data/glsms_dygjcxline/query`, getParams)
+    return httputils.getJson(`/data/glsms_dygjcxline/query`, getParams)
 }
 }
 
 
 // 机房-机房内核心设备
 // 机房-机房内核心设备
 export function queryHxsb({ data, postParams }) {
 export function queryHxsb({ data, postParams }) {
-    return httputils.fetchJson(`/data/data/glsms_asset/queryStatistics`, data, postParams)
+    return httputils.fetchJson(`/data/glsms_asset/queryStatistics`, data, postParams)
 }
 }
 
 
 // 机房-机房内核心设备钻取表
 // 机房-机房内核心设备钻取表
 export function queryHxsbDetail({ data, postParams }) {
 export function queryHxsbDetail({ data, postParams }) {
-    return httputils.fetchJson(`/data/data/glsms_asset/query`, data, postParams)
+    return httputils.fetchJson(`/data/glsms_asset/query`, data, postParams)
 }
 }
 
 
 // 机房-维修记录
 // 机房-维修记录
 export function queryWxjf({ getParams }) {
 export function queryWxjf({ getParams }) {
-    return httputils.getJson(`/data/data/v_glsms_wx/query`, getParams)
+    return httputils.getJson(`/data/v_glsms_wx/query`, getParams)
 }
 }
 
 
 // 机房-维保记录
 // 机房-维保记录
 export function queryWb({ data, postParams }) {
 export function queryWb({ data, postParams }) {
-    return httputils.fetchJson(`/data/data/v_glsms_wbzy/query`, data, postParams)
+    return httputils.fetchJson(`/data/v_glsms_wbzy/query`, data, postParams)
 }
 }
 // 查询位置属于哪个系统
 // 查询位置属于哪个系统
 export function querySystem({ getParams }) {
 export function querySystem({ getParams }) {
-    return httputils.getJson(`/data/data/t_system_wzfl/querySystem`, getParams)
+    return httputils.getJson(`/data/t_system_wzfl/querySystem`, getParams)
 }
 }

+ 3 - 10
src/components/Editor/src/editor.vue

@@ -52,17 +52,10 @@ export default {
         this.content = this.text
         this.content = this.text
     },
     },
     methods: {
     methods: {
-        onEditorReady(editor) {
-            console.log(editor)
-        },
-        onEditorBlur(val) {
-            console.log(val)
-        },
-        onEditorFocus(val) {
-            console.log(val)
-        },
+        onEditorReady(editor) {},
+        onEditorBlur(val) {},
+        onEditorFocus(val) {},
         onEditorChange(val) {
         onEditorChange(val) {
-            console.log(val.html)
             val.quill.deleteText(200, 6)
             val.quill.deleteText(200, 6)
             if (this.content === '') {
             if (this.content === '') {
                 this.valLen = 0
                 this.valLen = 0

+ 1 - 12
src/components/floorMap/index.vue

@@ -17,7 +17,7 @@ import { FloorView } from '@/lib/FloorView'
 import { FloorScene } from '@/lib/FloorScene'
 import { FloorScene } from '@/lib/FloorScene'
 import RoomBox from '@/views/room/index'
 import RoomBox from '@/views/room/index'
 import canvasFun from '@/components/floorMap/canvasFun'
 import canvasFun from '@/components/floorMap/canvasFun'
-import { readGroup, queryStatis, queryBrand } from '@/api/public'
+import { readGroup, queryStatis } from '@/api/public'
 import { STopologyParser } from '@/lib/parsers/STopologyParser'
 import { STopologyParser } from '@/lib/parsers/STopologyParser'
 import { mapGetters, mapActions } from 'vuex'
 import { mapGetters, mapActions } from 'vuex'
 import { SImageItem } from '@saga-web/graph/lib'
 import { SImageItem } from '@saga-web/graph/lib'
@@ -82,16 +82,6 @@ export default {
                 }
                 }
             }, 100)
             }, 100)
         },
         },
-        // 铺位
-        query(arr) {
-            let data = {
-                plazaId: '1001145'
-            }
-            // let postParams = arr
-            queryBrand({ data }).then(res => {
-                console.log(res)
-            })
-        },
         parserData(floor) {
         parserData(floor) {
             if (floor == 'g80') {
             if (floor == 'g80') {
                 // 屋顶
                 // 屋顶
@@ -319,7 +309,6 @@ export default {
     mounted() {
     mounted() {
         this.mapSize()
         this.mapSize()
         this.getEvent()
         this.getEvent()
-        console.log('bunkObjbunkObjbunkObj', this.bunkObj)
     },
     },
     created() {
     created() {
         this.urlMsg = {
         this.urlMsg = {

+ 1 - 13
src/main.ts

@@ -1,7 +1,7 @@
 import Vue from 'vue'
 import Vue from 'vue'
-import App from './App.vue'
 import router from './router'
 import router from './router'
 import store from './store'
 import store from './store'
+import App from './App.vue'
 Vue.config.productionTip = false
 Vue.config.productionTip = false
 
 
 import design from 'ant-design-vue'
 import design from 'ant-design-vue'
@@ -29,18 +29,6 @@ import Pui from 'meri-design'
 import 'meri-design/dist/index.css'
 import 'meri-design/dist/index.css'
 Vue.use(Pui)
 Vue.use(Pui)
 
 
-//////////模拟传入参数
-const username = 'lengqiang'
-/////////////////
-// 在跳入路由之前要请求获取权限信息
-router.beforeEach(async (to, from, next) => {
-    if (!store.state.isrequestAuth) {
-        await store.dispatch('getUserInfo', username)
-        await store.dispatch('getFloors')
-        await store.dispatch('getBrand')
-    }
-    next()
-})
 new Vue({
 new Vue({
     router,
     router,
     store,
     store,

+ 29 - 2
src/router/index.js

@@ -1,6 +1,7 @@
 import Vue from 'vue'
 import Vue from 'vue'
+import store from '@/store'
 import VueRouter from 'vue-router'
 import VueRouter from 'vue-router'
-
+import { query } from '@/utils/query'
 Vue.use(VueRouter)
 Vue.use(VueRouter)
 
 
 const routes = [
 const routes = [
@@ -63,5 +64,31 @@ const router = new VueRouter({
     base: process.env.BASE_URL,
     base: process.env.BASE_URL,
     routes,
     routes,
 })
 })
-
+router.beforeEach(async (to, from, next) => {
+    const token = query().token
+    const ssoToken = store.getters['ssoToken']
+    if (ssoToken) {
+        await store.dispatch('getFloors')
+        await store.dispatch('getBrand')
+        next()
+    } else if (token) {
+        store.commit('SETSSOTOKEN', token)
+        await store.dispatch('getUserInfo')
+        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 redirectUrl = window.location.protocol + '//' + window.location.host + '/'
+        let systemcode = 'CAD156',
+            signal = 'abcdefg',
+            version = '1.0.0',
+            returnurl = 'http://glsms.wanda-dev.cn/'
+        window.location.href = `${ssoServer}/login?systemcode=${systemcode}&signal=${signal}&version=${version}&returnurl=${returnurl}redirectUrl=${redirectUrl}`
+    }
+})
 export default router
 export default router

+ 13 - 4
src/store/index.js

@@ -2,11 +2,14 @@ import Vue from 'vue'
 import Vuex from 'vuex'
 import Vuex from 'vuex'
 import { login, queryFloor, queryfmapID } from '@/api/login.js'
 import { login, queryFloor, queryfmapID } from '@/api/login.js'
 import { queryBrand } from '@/api/public.js'
 import { queryBrand } from '@/api/public.js'
+import axios from 'axios'
 
 
 Vue.use(Vuex)
 Vue.use(Vuex)
 export default new Vuex.Store({
 export default new Vuex.Store({
     state: {
     state: {
-        isrequestAuth: false, // 是否请求登录校验接口
+        ssoToken: 'admin:lengqiang',
+        lastRoute: '',
+        isrequestAuth: true, // 是否请求登录校验接口
         permissions: [], //权限信息 "GLSMS_VIEW":"说明书查看"、"GLSMS_SYMBOL_MANAGE": "图例库管理"、 "GLSMS_PLANARGRAPH_MANAGE":"平面图维护"
         permissions: [], //权限信息 "GLSMS_VIEW":"说明书查看"、"GLSMS_SYMBOL_MANAGE": "图例库管理"、 "GLSMS_PLANARGRAPH_MANAGE":"平面图维护"
         plazas: [], //项目列表
         plazas: [], //项目列表
         userInfo: {
         userInfo: {
@@ -28,6 +31,8 @@ export default new Vuex.Store({
         currentFloor: {}, //当前选中的楼层信息
         currentFloor: {}, //当前选中的楼层信息
     },
     },
     getters: {
     getters: {
+        ssoToken: (state) => state.ssoToken,
+        lastRoute: (state) => state.lastRoute,
         floorsArr: (state) => state.floorsArr,
         floorsArr: (state) => state.floorsArr,
         floorSelect: (state) => state.floorSelect,
         floorSelect: (state) => state.floorSelect,
         plazaId: (state) => state.plazaId,
         plazaId: (state) => state.plazaId,
@@ -41,10 +46,16 @@ export default new Vuex.Store({
         bunkObj: (state) => state.bunkObj,
         bunkObj: (state) => state.bunkObj,
     },
     },
     mutations: {
     mutations: {
+        SETSSOTOKEN(state, data) {
+            state.ssoToke = data
+        },
         // 设置是否登陆校验
         // 设置是否登陆校验
         SETISREQUESTtAUTH(state, palyload) {
         SETISREQUESTtAUTH(state, palyload) {
             state.isrequestAuth = palyload
             state.isrequestAuth = palyload
         },
         },
+        SETLASTROUTER(state, data) {
+            state.lastRoute = data
+        },
         // 设置相关权限信息
         // 设置相关权限信息
         SETAUTHMSG(state, palyload) {
         SETAUTHMSG(state, palyload) {
             state.permissions = palyload.permissions
             state.permissions = palyload.permissions
@@ -94,9 +105,7 @@ export default new Vuex.Store({
     actions: {
     actions: {
         // 获取项目列表、userId
         // 获取项目列表、userId
         async getUserInfo({ commit }, palyload) {
         async getUserInfo({ commit }, palyload) {
-            await login({
-                username: palyload,
-            }).then((res) => {
+            await login({ username: palyload }).then((res) => {
                 if (res.result == 'success') {
                 if (res.result == 'success') {
                     commit('SETISREQUESTtAUTH', true)
                     commit('SETISREQUESTtAUTH', true)
                     commit('SETAUTHMSG', res)
                     commit('SETAUTHMSG', res)

+ 14 - 0
src/utils/query.js

@@ -0,0 +1,14 @@
+function query(search) {
+    let obj = {}
+    const _search = search || location.search.split('?')[1]
+    if (_search) {
+        _search.split('&').forEach((i) => {
+            let key = i.split('=')[0]
+            let value = i.split('=')[1]
+            obj[key] = value
+        })
+    }
+    return obj
+}
+
+export { query }

+ 301 - 291
src/views/analysis/CoreDeviceReport.vue

@@ -1,318 +1,328 @@
 <!-- 核心设备报表 -->
 <!-- 核心设备报表 -->
 <template>
 <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 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>
         </div>
-      </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 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>
-      </el-dialog>
     </div>
     </div>
-  </div>
 </template>
 </template>
 
 
 <script>
 <script>
-import { Select, Input } from 'meri-design';
-import { queryEquipmentList, queryTableData } from '../../api/coreDeviceReport';
-import _ from 'lodash';
+import { Select, Input } from 'meri-design'
+import { queryEquipmentList, queryTableData } from '../../api/coreDeviceReport'
+import _ from 'lodash'
 export default {
 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 {
+            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: '' // 弹框内的时间
+        }
+    },
 
 
-  components: {
-    Select,
-    Input
-  },
+    components: {
+        Select,
+        Input
+    },
 
 
-  computed: {},
+    computed: {},
 
 
-  mounted() {
-    this.getSystemList();
-    this.getTableData();
-  },
+    mounted() {
+        this.getSystemList()
+        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
+    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)
             })
             })
-          })
-          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})
-    },
-    /**
-     * 获取表数据
-     */
-    getTableData() {
-      let query = {
-        category_code: 'gdc'
-      }
-      queryTableData(`/data/data/glsms_asset/query?plazaId=1000423&page=${this.curPage}&size=${this.pageSize}`, query).then((res) => {
-        console.log('res', res)
-        const { result, count, data } = res;
-        if (result === 'success') {
-          this.tatol = count;
-          this.tableData = data;
+        },
+        /**
+         * 获取表数据
+         */
+        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) {
+            console.log('row', row)
+            this.dialogTableVisible = true
         }
         }
-      })
-    },
-    /**
-     * 表第一列序号
-     */
-    indexMethod(index) {
-      return index + 1;
-    },
-    /**
-     * 切换页码
-     */
-    changeTablePage(page) {
-      this.curPage = page;
-      this.getTableData();
-    },
-    /**
-     * 显示设备实例的维保、专维等状态
-     */
-    showEquipmentStatus(row, column, e) {
-      console.log('row', row)
-      this.dialogTableVisible = true;
-    },
-  }
+    }
 }
 }
 </script>
 </script>
 
 
 <style lang='less' scoped>
 <style lang='less' scoped>
-.core-device-report{
-  display: flex;
-  width: 100%;
-  height: 100%;
-  .main-left{
-    padding-left: 16px;
-    padding-right: 14px;
-    padding-top: 12px;
-    padding-bottom: 12px;
-    width: 247px;
-    border-top: 1px solid #E4E6E7;
-    border-right: 1px solid #E4E6E7;
-    .system-select{
-      margin-bottom: 16px;
-    }
-    .item-content{
-      padding-left: 12px;
-      padding-right: 21px;
-      padding-top: 7px;
-      padding-bottom: 8px;
-      border-bottom: 1px solid #E4E6E7;
-      cursor: pointer;
-      >div{
-        display: flex;
-      }
-      .first-row{
-        margin-bottom: 6px;
-        display: flex;
-        justify-content: space-between;
-        >div:first-child{
-          font-size: 14px;
-          color: #1F2429;
-          line-height: 19px;
-        }
-        >div:nth-of-type(2){
-          margin-left: 8px;
-          font-size: 12px;
-          color: #CD981D;
-          line-height: 20px;
+.core-device-report {
+    display: flex;
+    width: 100%;
+    height: 100%;
+    .main-left {
+        padding-left: 16px;
+        padding-right: 14px;
+        padding-top: 12px;
+        padding-bottom: 12px;
+        width: 247px;
+        border-top: 1px solid #e4e6e7;
+        border-right: 1px solid #e4e6e7;
+        .system-select {
+            margin-bottom: 16px;
         }
         }
-        
-      }
-      .sec-row{
-        margin-bottom: 6px;
-        >div:first-child{
-          font-size: 14px;
-          color: #1F2429;
-          line-height: 19px;
-          >span{
-            font-size: 12px;
-            color: #646C73;
-          }
+        .item-content {
+            padding-left: 12px;
+            padding-right: 21px;
+            padding-top: 7px;
+            padding-bottom: 8px;
+            border-bottom: 1px solid #e4e6e7;
+            cursor: pointer;
+            > div {
+                display: flex;
+            }
+            .first-row {
+                margin-bottom: 6px;
+                display: flex;
+                justify-content: space-between;
+                > div:first-child {
+                    font-size: 14px;
+                    color: #1f2429;
+                    line-height: 19px;
+                }
+                > div:nth-of-type(2) {
+                    margin-left: 8px;
+                    font-size: 12px;
+                    color: #cd981d;
+                    line-height: 20px;
+                }
+            }
+            .sec-row {
+                margin-bottom: 6px;
+                > div:first-child {
+                    font-size: 14px;
+                    color: #1f2429;
+                    line-height: 19px;
+                    > span {
+                        font-size: 12px;
+                        color: #646c73;
+                    }
+                }
+                // >div:nth-of-type(2){
+                //   padding-left: 8px;
+                //   padding-right: 8px;
+                //   font-size: 12px;
+                //   color: #0065B3;
+                //   line-height: 22px;
+                //   background: #E1F2FF;
+                // }
+                .abnormal {
+                    margin-left: 11px;
+                    padding-left: 3px;
+                    padding-right: 3px;
+                    font-size: 12px;
+                    color: #f54e45 !important;
+                    background: #fde3e2 !important;
+                    border-radius: 9px;
+                }
+            }
         }
         }
-        // >div:nth-of-type(2){
-        //   padding-left: 8px;
-        //   padding-right: 8px;
-        //   font-size: 12px;
-        //   color: #0065B3;
-        //   line-height: 22px;
-        //   background: #E1F2FF;
-        // }
-        .abnormal{
-          margin-left: 11px;
-          padding-left: 3px;
-          padding-right: 3px;
-          font-size: 12px;
-          color: #F54E45!important;
-          background: #FDE3E2!important;
-          border-radius:9px;
+        .system-content {
+            .active {
+                background: #e5eef5;
+                border-radius: 2px;
+                .first-row > div:first-child,
+                .sec-row > div {
+                    color: #025baa;
+                    > span {
+                        color: #025baa;
+                    }
+                }
+            }
         }
         }
-      }
     }
     }
-    .system-content{
-      .active{
-        background: #E5EEF5;
-        border-radius: 2px;
-        .first-row>div:first-child,
-        .sec-row>div{
-          color: #025BAA;
-          >span{
-            color: #025BAA;
-          }
+    .main-right {
+        flex: 1;
+        background: #fff;
+        padding-left: 15px;
+        padding-right: 13px;
+        padding-top: 13px;
+        padding-bottom: 25px;
+        .search-container {
+            margin-bottom: 12px;
+        }
+        .page {
+            display: flex;
+            justify-content: flex-end;
         }
         }
-      }
-    }
-  }
-  .main-right{
-    flex: 1;
-    background: #fff;
-    padding-left: 15px;
-    padding-right: 13px;
-    padding-top: 13px;
-    padding-bottom: 25px;
-    .search-container{
-      margin-bottom: 12px;
-    }
-    .page{
-      display: flex;
-      justify-content: flex-end;
     }
     }
-  }
 }
 }
 </style>
 </style>

+ 1 - 2
src/views/other/zhsxOtherTable1.vue

@@ -93,7 +93,6 @@ import { Select } from 'meri-design'
 // import Select from '@/components/Select/Select.vue'
 // import Select from '@/components/Select/Select.vue'
 import { queryGlams } from '@/api/other.js'
 import { queryGlams } from '@/api/other.js'
 import { querySelect } from '@/api/public.js'
 import { querySelect } from '@/api/public.js'
-import pdf from 'vue-pdf'
 
 
 export default {
 export default {
     data() {
     data() {
@@ -110,7 +109,7 @@ export default {
             isOpen: true
             isOpen: true
         }
         }
     },
     },
-    components: { Select, pdf },
+    components: { Select },
     methods: {
     methods: {
         formatter(date) {
         formatter(date) {
             return moment.unix(date / 1000).format('YYYY.MM.DD')
             return moment.unix(date / 1000).format('YYYY.MM.DD')

+ 2 - 1
vue.config.js

@@ -4,11 +4,12 @@ module.exports = {
         proxy: {
         proxy: {
             '/data': {
             '/data': {
                 target: 'http://60.205.177.43',
                 target: 'http://60.205.177.43',
+                // target: 'http://192.168.200.11:9003', //yll
                 // target: 'http://localhost:6040/data/',
                 // target: 'http://localhost:6040/data/',
                 changeOrigin: true,
                 changeOrigin: true,
                 secure: false,
                 secure: false,
                 pathRewrite: {
                 pathRewrite: {
-                    '^/data': '/data',
+                    '^/data': '/data/data',
                 },
                 },
             },
             },
             // // 工程信息化服务
             // // 工程信息化服务