shaun-sheep před 4 roky
rodič
revize
1fa70b6bcb

+ 1 - 1
public/systemConf.js

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

+ 108 - 1
src/router/index.js

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

+ 185 - 1
src/store/index.js

@@ -169,4 +169,188 @@ export default new Vuex.Store({
         },
     },
     modules: {},
-})
+})
+
+
+// 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 router from "../router"
+
+// Vue.use(Vuex)
+// export default new Vuex.Store({
+//     state: {
+//         ssoToken: 'admin:lengqiang',
+//         // ssoToken: null,
+//         isPreview: false,
+//         lastRoute: "",
+//         isrequestAuth: true, // 是否请求登录校验接口
+//         permissions: [], //权限信息 "GLSMS_VIEW":"说明书查看"、"GLSMS_SYMBOL_MANAGE": "图例库管理"、 "GLSMS_PLANARGRAPH_MANAGE":"平面图维护"
+//         plazas: [], //项目列表
+//         userInfo: {
+//             employeename: "", //用户名称:艾宇;
+//             orgCode: "",
+//             username: "lengqiang", //账户名称
+//         },
+//         plazaId: "1000423", //项目Id
+//         projectName: "", //全局项目名称
+//         floorsArr: [], //楼层数组
+//         floorSelect: [], //楼层下拉框
+//         fmapID: "",
+//         haveFengMap: false, //是否有蜂鸟地图的数据
+//         isMessage: true, //是否有发布的图
+//         scpzTable: [], //土建系统图例展示
+//         legendTable: [], //除土建系统图例展示
+//         remarksText: "", //备注
+//         bunkObj: {}, // 铺位名称
+//         currentFloor: {}, //当前选中的楼层信息
+//     },
+//     getters: {
+//         isPreview: (state) => state.isPreview,
+//         ssoToken: (state) => state.ssoToken,
+//         lastRoute: (state) => state.lastRoute,
+//         floorsArr: (state) => state.floorsArr,
+//         floorSelect: (state) => state.floorSelect,
+//         plazaId: (state) => state.plazaId,
+//         plazas: (state) => state.plazas,
+//         fmapID: (state) => state.fmapID,
+//         haveFengMap: (state) => state.haveFengMap,
+//         isMessage: (state) => state.isMessage,
+//         scpzTable: (state) => state.scpzTable,
+//         legendTable: (state) => state.legendTable,
+//         remarksText: (state) => state.remarksText,
+//         bunkObj: (state) => state.bunkObj,
+//     },
+//     mutations: {
+//         SETISPREVIEW(state, data) {
+//             state.isPreview = data
+//         },
+//         SETSSOTOKEN(state, data) {
+//             state.ssoToken = data
+//         },
+//         // 设置是否登陆校验
+//         SETISREQUESTtAUTH(state, palyload) {
+//             state.isrequestAuth = palyload
+//         },
+//         SETLASTROUTER(state, data) {
+//             state.lastRoute = data
+//         },
+//         // 设置相关权限信息
+//         SETAUTHMSG(state, palyload) {
+//             state.permissions = palyload.permissions
+//             state.plazas = palyload.plazas
+//             state.userInfo.employeename = palyload.employeename
+//             state.userInfo.orgCode = palyload.orgCode
+//             state.userInfo.username = palyload.username
+//         },
+//         SETISMESSAGE(state, data) {
+//             state.isMessage = data
+//         },
+//         SETFLOORS(state, data) {
+//             state.floorsArr = data
+//             if (data.length > 0) {
+//                 data.forEach((e) => {
+//                     let obj = {
+//                         id: e.gname,
+//                         name: e.code,
+//                     }
+//                     state.floorSelect.push(obj)
+//                 })
+//             }
+//         },
+//         SETMAPID(state, data) {
+//             state.fmapID = data
+//         },
+//         SETHAVEFENGMAP(state) {
+//             state.haveFengMap = true
+//         },
+//         // 土建的图例
+//         SETSCPZTABLE(state, data) {
+//             state.scpzTable = data
+//         },
+//         SETLEGENDTABLE(state, data) {
+//             state.legendTable = data
+//         },
+//         SETREMARKSTEXT(state, data) {
+//             state.remarksText = data
+//         },
+//         SETBUNKOBJ(state, data) {
+//             state.bunkObj = data
+//         },
+//         SETCURRENTFLOOR(state, data) {
+//             state.currentFloor = data
+//         },
+//     },
+//     actions: {
+//         // 获取项目列表、userId
+//         async getUserInfo({
+//             commit
+//         }, palyload) {
+//             await login({}).then((res) => {
+//                 // if (res.result == "success") {
+//                 //     // token校验成功 拿到权限
+//                 //     //commit("SETISREQUESTtAUTH", true)
+//                 //     console.log("-----", palyload)
+//                 //     if (res.permissions.length == 0) {
+//                 //         //权限不足
+//                 //         console.log("权限不足!!")
+//                 //         router.push({ path: "/404", query: { result: "权限不足" } })
+//                 //     }
+//                 //     commit("SETAUTHMSG", res)
+//                 // } else if (res.result == "no_auth") {
+//                 //     //登录失败
+//                 //     console.log("登录失败!!")
+//                 //     commit("SETISREQUESTtAUTH", false)
+//                 //     router.push({ path: "/404", query: { result: "登录失败" } })
+//                 // } else {
+//                 //     //访问出错 500
+//                 //     console.log("访问出错!!")
+//                 //     commit("SETISREQUESTtAUTH", false)
+//                 //     router.push({ path: "/404", query: { result: "访问出错" } })
+//                 // }
+//             })
+//         },
+//         getFloors(context) {
+//             queryFloor({
+//                 plazaId: context.state.plazaId
+//             }).then((res) => {
+//                 if (res.result == "success") {
+//                     context.commit("SETFLOORS", res.data)
+//                 }
+//             })
+//         },
+//         async getfmapID(context) {
+//             await queryfmapID({
+//                 mapId: context.state.plazaId,
+//             }).then((res) => {
+//                 context.commit("SETMAPID", `${context.state.plazaId}_${res.mapVersion}`)
+//             })
+//         },
+//         async getBrand(context) {
+//             let data = {
+//                 plazaId: context.state.plazaId,
+//             }
+//             await queryBrand({
+//                 data
+//             }).then((res) => {
+//                 let obj = {}
+//                 if (res.data.data) {
+//                     let Data = res.data.data
+//                     Data.forEach((i) => {
+//                         obj[i.bunkdesc] = i
+//                     })
+//                 }
+//                 context.commit("SETBUNKOBJ", obj)
+//             })
+//         },
+//     },
+//     modules: {},
+// })

+ 4 - 1
src/views/legendLibrary/index.vue

@@ -165,7 +165,7 @@
                 ></el-pagination>
             </div>
         </div>
-        <add-legend ref='addLegend' @updateSuccess='updateSuccess' @addSuccess='addSuccess' @cancal='cancal' :key='Date.now()'></add-legend>
+        <add-legend ref='addLegend' @updateSuccess='updateSuccess' @addSuccess='addSuccess' @cancal='cancal' ></add-legend>
         <Modal :show='modalStatusTip' title='确定要作废图例吗?' mode='tip' type='error' @close='modalStatusTip=false'>
             <template #content>作废后则不可更改</template>
             <template #handle>
@@ -388,9 +388,12 @@ export default {
             }
         },
         add() {
+            console.log(this.$refs.addLegend, 'tianjia')
+
             this.$refs.addLegend.open('', '添加图例库')
         },
         modifyClick(row) {
+            console.log(this.$refs.addLegend, 'xiugai')
             this.$refs.addLegend.open(row, '修改图例库')
         },
         modalConfirm() {

+ 3 - 3
src/views/legendRules/index.vue

@@ -61,11 +61,11 @@
                     @tool-button-click='buttonClickHandle'
                 >
                     <img slot-scope='{col, row}' v-if='col.key==="Url"' class='img' :src='`/serve/topology-wanda/Picture/query/${row.Url}`' alt />
-                    <span slot-scope='{col, row}' v-else-if='col.key==="caozuo"' style='color:#0091FF'>删除</span>
+                    <span slot-scope='{col}' v-else-if='col.key==="caozuo"' style='color:#0091FF'>删除</span>
                 </Table>
             </div>
         </div>
-        <add-legend ref='addLegend' @mesg='mesg'></add-legend>
+        <add-legend ref='addLegends' @mesg='mesg'></add-legend>
     </div>
 </template>
 <script>
@@ -234,7 +234,7 @@ export default {
             this.getData()
         },
         add() {
-            this.$refs.addLegend.open('', '', this.GraphCategoryId)
+            this.$refs.addLegends.open('', '', this.GraphCategoryId)
         },
         init() {
             let getParams = {}