Parcourir la source

Merge branch 'develop' of http://39.106.8.246:3003/web/wanda-bm-guide into develop

shaun-sheep il y a 4 ans
Parent
commit
09fa21a599

BIN
src/assets/imgs/bg2.png


BIN
src/assets/imgs/dlsb.png


+ 83 - 0
src/components/404.vue

@@ -0,0 +1,83 @@
+<template>
+    <div class='notfond'>
+        <div class='not-img'>
+            <img src='@/assets/imgs/dlsb.png' alt />
+        </div>
+        <div class='not-text' v-if='!isPermissions'>
+            <span>您的权限不足……</span>
+            <span>建议您联系管理员开通管理说明书相关权限</span>
+        </div>
+        <div class='not-text' v-else>
+            <span>您的访问出错了!</span>
+            <span>建议您稍后再试,或直接联系管理员解决</span>
+        </div>
+        <div class='not-button'>
+            <span>关闭页面</span>
+        </div>
+    </div>
+</template>
+<script>
+export default {
+    data() {
+        return {
+            isPermissions: true //是否有访问权限
+        }
+    }
+}
+</script>
+<style lang="less" scoped>
+.notfond {
+    width: 100%;
+    height: 100%;
+    background: rgba(255, 255, 255, 1);
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    flex-direction: column;
+    .not-img {
+        width: 120px;
+        height: 120px;
+        img {
+            width: 100%;
+            height: 100%;
+        }
+    }
+    .not-text {
+        margin-top: 8px;
+        span {
+            display: block;
+            text-align: center;
+        }
+        span:nth-of-type(1) {
+            font-size: 16px;
+            font-family: MicrosoftYaHei;
+            color: rgba(31, 36, 41, 1);
+            line-height: 21px;
+        }
+        span:nth-of-type(2) {
+            margin-top: 4px;
+            font-size: 14px;
+            font-family: MicrosoftYaHei;
+            color: rgba(100, 108, 115, 1);
+            line-height: 19px;
+        }
+    }
+    .not-button {
+        margin-top: 32px;
+        width: 80px;
+        height: 32px;
+        background: rgba(255, 255, 255, 1);
+        border: 1px solid rgba(195, 199, 203, 1);
+        border-radius: 4px;
+        cursor: pointer;
+        span {
+            display: block;
+            font-size: 14px;
+            font-family: MicrosoftYaHei;
+            color: rgba(31, 35, 41, 1);
+            line-height: 32px;
+            text-align: center;
+        }
+    }
+}
+</style>

+ 3 - 2
src/components/Legend/src/legend.vue

@@ -55,7 +55,7 @@
                 </p>
             </el-tooltip>
             <!-- 新增分布图 -->
-            <el-tooltip effect='dark' content='新增分布图' placement='left' v-if='floorSelect.length!=floors.length'>
+            <el-tooltip effect='dark' content='新增分布图' placement='left' v-if='floorSelect.length!=floors.length && !isMessage && type==0'>
                 <p class='tltk' style='margin-left: -5px;' @click='addFloor'>
                     <img src='@/assets/imgs/bjj.png' alt />
                 </p>
@@ -286,7 +286,8 @@ export default {
             const { conf } = window.__systemConf,
                 { editerUrl } = conf
             let floorName = this.floorName ? this.floorName : this.$cookie.get('floorNow')
-            let data = `categoryId=${categoryId}&projectId=${this.plazaId}&BuildingID=1&FloorID=${FloorID}&FloorName=${floorName}&fmapID=${this.fmapID}`
+            let seq = this.$cookie.get('currentFloorId')
+            let data = `categoryId=${categoryId}&projectId=${this.plazaId}&BuildingID=1&FloorID=${FloorID}&FloorName=${floorName}&fmapID=${this.fmapID}&seq=${seq}`
             let url = editerUrl + 'editer?' + encodeURIComponent(data)
             window.open(url, true)
         },

+ 8 - 4
src/components/floorMap/index.vue

@@ -199,9 +199,13 @@ export default {
             this.view = new FloorView(`canvas${this.id}`)
         },
         listChange(item, ev) {
-            let name = ev[0][0].data.Name
-            if (name.slice(name.length - 2, name.length) == '机房') {
-                this.$refs.boxRoom.open({ name: name, type: this.type })
+            let name = ev[0][0].data.Name,
+                location = ev[0][0].data.AttachObjectIds[0] ? ev[0][0].data.AttachObjectIds[0].id : ''
+            if (!location) {
+                this.$message('未添加位置类型')
+            }
+            if (name.slice(name.length - 2, name.length) == '机房' && location) {
+                this.$refs.boxRoom.open({ name: name, type: this.type, location: location })
             }
         },
         // 适配底图到窗口
@@ -338,4 +342,4 @@ export default {
         width: 100%;
     }
 }
-</style>
+</style>

+ 2 - 2
src/components/menuList.vue

@@ -123,7 +123,7 @@ export default {
         toDrafts() {
             const { conf } = window.__systemConf,
                 { editerUrl } = conf
-            let data = `projectId=${this.plazaId}&fmapID=${this.fmapID}`
+            let data = `projectId=${this.plazaId}&fmapID=${this.fmapID}&token=${this.$store.state.ssoToken}`
             let url = editerUrl + 'drafts?' + encodeURIComponent(data)
             window.open(url, true)
         },
@@ -174,7 +174,7 @@ export default {
         dumpLegend() {
             const { conf } = window.__systemConf,
                 { wandaBmGuideUrl } = conf
-            window.open(`${wandaBmGuideUrl}home/legendLibrary`, true)
+            window.open(`${wandaBmGuideUrl}home/legendLibrary&token=${this.$store.state.ssoToken}`, true)
         }
     }
 }

+ 3 - 3
src/lib/GraphView.js

@@ -76,15 +76,15 @@ export class GraphView extends SCanvasView {
         canvas.pen.color = new SColor(this.strokecolor);
         canvas.brush.color = new SColor(this.bgcolor);
         if (this.type == 0) {
-            canvas.drawLine(80, 57, 120, 57);
+            canvas.drawLine(0, 14, 28, 14);
         }
         else if (this.type == 1) {
-            canvas.drawRect(50, 28, 100, 57);
+            canvas.drawRect(0, 0, 28, 28);
         }
         else if (this.type == 2) {
             if (this.img) {
                 console.log(this.img);
-                canvas.drawImage(this.img, 86, 43, 28, 28);
+                canvas.drawImage(this.img, 0, 0, 28, 28);
             }
         }
     }

+ 3 - 3
src/lib/GraphView.ts

@@ -86,13 +86,13 @@ export class GraphView extends SCanvasView {
         canvas.pen.color = new SColor(this.strokecolor);
         canvas.brush.color = new SColor(this.bgcolor);
         if (this.type == 0) {
-            canvas.drawLine(80, 57, 120, 57);
+            canvas.drawLine(0, 14, 28, 14);
         } else if (this.type == 1) {
-            canvas.drawRect(50, 28, 100, 57);
+            canvas.drawRect(0, 0, 28, 28);
         } else if (this.type == 2) {
             if (this.img) {
                 console.log(this.img)
-                canvas.drawImage(this.img, 86, 43, 28, 28)
+                canvas.drawImage(this.img, 0, 0, 28, 28)
             }
         }
     }

+ 13 - 4
src/router/index.js

@@ -10,6 +10,10 @@ const routes = [
         path: '/',
         redirect: '/home/overview',
     },
+    {
+        path: '/404',
+        component: () => import('../components/404'),
+    },
     // home
     {
         path: '/home',
@@ -66,13 +70,17 @@ const router = new VueRouter({
 })
 router.beforeEach(async (to, from, next) => {
     const token = query().token
+    console.log(token)
     const ssoToken = store.getters['ssoToken']
     if (ssoToken) {
+        store.commit('SETSSOTOKEN', ssoToken)
+        await store.dispatch('getUserInfo')
         await store.dispatch('getFloors')
         await store.dispatch('getBrand')
         next()
     } else if (token) {
         store.commit('SETSSOTOKEN', token)
+        console.log(store.state.ssoToken)
         await store.dispatch('getUserInfo')
         next()
     } else {
@@ -83,12 +91,13 @@ router.beforeEach(async (to, from, next) => {
         }
         store.commit('SETLASTROUTER', lastRoute)
         let ssoServer = 'http://oauth.wanda-dev.cn'
-        let redirectUrl = window.location.protocol + '//' + window.location.host + '/'
         let systemcode = 'CAD156',
-            signal = 'abcdefg',
+            signal = new Date().getTime(),
             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}`
+            // returnurl = 'http://glsms.wanda-dev.cn/'
+            // returnurl = window.location.protocol + "//" + window.location.host + "/wandaBmGuide"
+            returnurl = 'http://localhost:8090/wandaBmGuide/home/equipment'
+        window.location.href = `${ssoServer}/login?token=${token}&systemcode=${systemcode}&signal=${signal}&version=${version}&returnurl=${returnurl}`
     }
 })
 export default router

+ 25 - 24
src/store/index.js

@@ -1,32 +1,33 @@
-import Vue from 'vue'
-import Vuex from 'vuex'
-import { login, queryFloor, queryfmapID } from '@/api/login.js'
-import { queryBrand } from '@/api/public.js'
-import axios from 'axios'
+import Vue from "vue"
+import Vuex from "vuex"
+import { login, queryFloor, queryfmapID } from "@/api/login.js"
+import { queryBrand } from "@/api/public.js"
+import axios from "axios"
 
 Vue.use(Vuex)
 export default new Vuex.Store({
     state: {
-        ssoToken: 'admin:lengqiang',
-        lastRoute: '',
+        ssoToken: "admin:lengqiang",
+        // ssoToken: null,
+        lastRoute: "",
         isrequestAuth: true, // 是否请求登录校验接口
         permissions: [], //权限信息 "GLSMS_VIEW":"说明书查看"、"GLSMS_SYMBOL_MANAGE": "图例库管理"、 "GLSMS_PLANARGRAPH_MANAGE":"平面图维护"
         plazas: [], //项目列表
         userInfo: {
-            employeename: '', //用户名称:艾宇;
-            orgCode: '',
-            username: 'lengqiang', //账户名称
+            employeename: "", //用户名称:艾宇;
+            orgCode: "",
+            username: "lengqiang", //账户名称
         },
-        plazaId: '1000423', //项目Id
-        projectName: '', //全局项目名称
+        plazaId: "1000423", //项目Id
+        projectName: "", //全局项目名称
         floorsArr: [], //楼层数组
         floorSelect: [], //楼层下拉框
-        fmapID: '',
+        fmapID: "",
         haveFengMap: false, //是否有蜂鸟地图的数据
         isMessage: true, //是否有发布的图
         scpzTable: [], //土建系统图例展示
         legendTable: [], //除土建系统图例展示
-        remarksText: '', //备注
+        remarksText: "", //备注
         bunkObj: {}, // 铺位名称
         currentFloor: {}, //当前选中的楼层信息
     },
@@ -47,7 +48,7 @@ export default new Vuex.Store({
     },
     mutations: {
         SETSSOTOKEN(state, data) {
-            state.ssoToke = data
+            state.ssoToken = data
         },
         // 设置是否登陆校验
         SETISREQUESTtAUTH(state, palyload) {
@@ -106,19 +107,19 @@ export default new Vuex.Store({
         // 获取项目列表、userId
         async getUserInfo({ commit }, palyload) {
             await login({ username: palyload }).then((res) => {
-                if (res.result == 'success') {
-                    commit('SETISREQUESTtAUTH', true)
-                    commit('SETAUTHMSG', res)
+                if (res.result == "success") {
+                    commit("SETISREQUESTtAUTH", true)
+                    commit("SETAUTHMSG", res)
                 } else {
-                    console.log('接口报错!!')
-                    commit('SETISREQUESTtAUTH', false)
+                    console.log("接口报错!!")
+                    commit("SETISREQUESTtAUTH", false)
                 }
             })
         },
         getFloors(context) {
             queryFloor({ plazaId: context.state.plazaId }).then((res) => {
-                if (res.result == 'success') {
-                    context.commit('SETFLOORS', res.data)
+                if (res.result == "success") {
+                    context.commit("SETFLOORS", res.data)
                 }
             })
         },
@@ -126,7 +127,7 @@ export default new Vuex.Store({
             await queryfmapID({
                 mapId: context.state.plazaId,
             }).then((res) => {
-                context.commit('SETMAPID', `${context.state.plazaId}_${res.mapVersion}`)
+                context.commit("SETMAPID", `${context.state.plazaId}_${res.mapVersion}`)
             })
         },
         async getBrand(context) {
@@ -141,7 +142,7 @@ export default new Vuex.Store({
                         obj[i.bunkdesc] = i
                     })
                 }
-                context.commit('SETBUNKOBJ', obj)
+                context.commit("SETBUNKOBJ", obj)
             })
         },
     },

+ 14 - 4
src/views/equipment/index.vue

@@ -30,9 +30,12 @@
                         <floorMap ref='floorMap' :id='"equip"' :loadName='loadName' :type='"system"'></floorMap>
                         <!--  -->
                         <div class='additional-box' v-if='fqPic.length>0'>
-                            <div class='additional' @click='additionalColl'>
+                            <div class='additional' @click='additionalColl' v-if='!show'>
                                 <img src='../../assets/imgs/bg.png' alt />
                             </div>
+                            <div class='additional2' @click='additionalColl' v-else>
+                                <img src='../../assets/imgs/bg2.png' alt />
+                            </div>
                             <el-collapse-transition>
                                 <div v-if='show' class='add-img'>
                                     <img :src='fqPic[0].url' alt />
@@ -271,11 +274,10 @@ export default {
                     }
                     .additional-box {
                         position: relative;
-                        .additional {
+                        .additional,
+                        .additional2 {
                             width: 44px;
                             height: 44px;
-                            background: rgba(255, 255, 255, 1);
-                            box-shadow: 0px 2px 15px 0px rgba(31, 36, 41, 0.08);
                             border-radius: 2px;
                             position: fixed;
                             right: 32px;
@@ -290,6 +292,14 @@ export default {
                                 height: 20px;
                             }
                         }
+                        .additional {
+                            background: rgba(255, 255, 255, 1);
+                            box-shadow: 0px 2px 15px 0px rgba(31, 36, 41, 0.08);
+                        }
+                        .additional2 {
+                            background: linear-gradient(180deg, rgba(54, 156, 247, 1) 0%, rgba(2, 91, 170, 1) 100%);
+                            box-shadow: 0px 2px 15px 0px rgba(31, 36, 41, 0.08);
+                        }
                         .add-img {
                             width: 560px;
                             height: 360px;

+ 4 - 4
src/views/equipment/table/djspTable.vue

@@ -20,19 +20,19 @@
                 clearable
                 style='width:192px;margin-right:12px'
             ></el-input>
-            <Select @change='getList' v-model='floor' width='120' tipPlace='top' caption='楼层 :' :selectdata='floorSelect'></Select>
+            <Select @change='getList' v-model='floor' width='180' tipPlace='top' caption='楼层 :' :selectdata='floorSelect'></Select>
         </div>
         <el-table :data='tableData' :span-method='objectSpanMethod' :border='true' style='width: 100%' @row-click='innerVisible = true'>
             <el-table-column prop='floor' label='楼层' width='50'>
                 <template slot-scope='{row}'>{{row.floor || '--'}}</template>
             </el-table-column>
-            <el-table-column prop='welldes' label='电井间' width="120">
+            <el-table-column prop='welldes' label='电井间' width='120'>
                 <template slot-scope='{row}'>{{row.welldes || '--'}}</template>
             </el-table-column>
             <el-table-column prop='meterbox' label='商铺电表数' width='200'>
                 <template slot-scope='{row}'>{{row.meterbox || '--'}}</template>
             </el-table-column>
-            <el-table-column prop='shopsnum' label='商铺编号' >
+            <el-table-column prop='shopsnum' label='商铺编号'>
                 <template slot-scope='{row}'>{{row.shopsnumList || '--'}}</template>
             </el-table-column>
         </el-table>
@@ -131,7 +131,7 @@ export default {
                 this.getList()
             }
         },
-        floor(){
+        floor() {
             this.getList()
         }
     },

+ 5 - 5
src/views/equipment/table/lookPageTable.vue

@@ -11,11 +11,11 @@
                 v-model='keyword'
                 style='width:192px;margin-right:12px'
             ></el-input>
-            <Select @change='getList' v-model='floor' style='margin-right:12px;' width='120' tipPlace='top' caption='楼层 :' :selectdata='floorSelect'></Select>
-            <Select @change='getList' v-model='fileType' width='140' tipPlace='top' caption='文件类型 :' :selectdata='floorSelect'></Select>
+            <Select @change='getList' v-model='floor' style='margin-right:12px;' width='180' tipPlace='top' caption='楼层 :' :selectdata='floorSelect'></Select>
+            <Select @change='getList' v-model='fileType' width='180' tipPlace='top' caption='文件类型 :' :selectdata='floorSelect'></Select>
         </div>
         <el-table :data='tableData' style='width: 100%'>
-            <el-table-column type='index' label='序号' width='60' :index="indexMethod"></el-table-column>
+            <el-table-column type='index' label='序号' width='60' :index='indexMethod'></el-table-column>
             <el-table-column prop='lb' label='分类' width='160'>
                 <template slot-scope='{row}'>{{row.assetnum || '--'}}</template>
             </el-table-column>
@@ -61,7 +61,7 @@ export default {
             size: 11,
             keyword: '',
             floor: '',
-            fileType:''
+            fileType: ''
         }
     },
     props: ['major'],
@@ -71,7 +71,7 @@ export default {
     methods: {
         //序号的方法
         indexMethod(index) {
-            return (this.currentPage - 1) * this.size + index +1
+            return (this.currentPage - 1) * this.size + index + 1
         },
         pageChanged(page, size) {
             this.currentPage = page

+ 3 - 3
src/views/legendLibrary/addForm.vue

@@ -41,7 +41,7 @@
             </div>
             <div v-show='ruleForm.Type=="Zone" || ruleForm.Type=="Image" || ruleForm.Type =="Line"'>
                 <div style='color:#646C73'>展示预览</div>
-                <div class='input-right' ref='graph'>
+                <div class='input-right' ref='graph' style="width:200px;height:114px;">
                     <canvas id='canvas' :width='canvasWidth' :height='canvasHeight'></canvas>
                 </div>
             </div>
@@ -210,8 +210,8 @@ export default {
             borderLineOptionObject: {
                 src: ''
             },
-            canvasWidth: 200,
-            canvasHeight: 114,
+            canvasWidth: 28,
+            canvasHeight: 28,
             view: null,
             scene: null,
             typeVisualization: [],

+ 8 - 6
src/views/room/index.vue

@@ -419,6 +419,7 @@ export default {
         return {
             content: '',
             activeName: '1',
+            location: '',
             visible: false,
             dialogFormVisible: false,
             systemName: '',
@@ -528,7 +529,7 @@ export default {
             this.picFloor = this.$cookie.get('floorNow')
             let getParams = {
                 typename: '位置布置图',
-                location: '1809',
+                location: this.location,
                 module: '1002',
                 // system: system,
                 plazaId: this.plazaId
@@ -554,7 +555,7 @@ export default {
         // 明细表
         Index1() {
             let getParams = {
-                location: '1890',
+                location: this.location,
                 plazaId: this.plazaId,
                 page: this.page1,
                 size: this.size1
@@ -605,7 +606,7 @@ export default {
         Index2() {
             let postParams = {}
             let data = {
-                location: '1890',
+                location: this.location,
                 plazaId: this.plazaId,
                 page: this.page2,
                 size: this.size2
@@ -659,7 +660,7 @@ export default {
         // 机房维修记录
         Index3() {
             let getParams = {
-                location: '1890',
+                location: this.location,
                 plazaId: this.plazaId,
                 page: this.page3,
                 size: this.size3,
@@ -707,7 +708,7 @@ export default {
         Index4() {
             let postParams = {}
             let data = {
-                location: '1890',
+                location: this.location,
                 plazaId: this.plazaId,
                 page: this.page4,
                 size: this.size4,
@@ -828,7 +829,7 @@ export default {
             this.smsxtArr = []
             let params = {
                 getParams: {
-                    locationid: '1890',
+                    locationid: this.location,
                     plazaId: this.plazaId
                 }
             }
@@ -842,6 +843,7 @@ export default {
         open(name) {
             this.visible = true
             this.systemName = name.name
+            this.location = name.location
             if (name.type == 'floor') {
                 this.init()
             } else if (name.type == 'system') {