Jelajahi Sumber

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

zhulizhen1111 4 tahun lalu
induk
melakukan
ee3dfcd65d

+ 2 - 2
public/systemConf.js

@@ -26,7 +26,7 @@ var __systemConf = {
         // 阿里云
         editerUrl: 'http://60.205.177.43:80/wandaEditer/', // 编辑器地址
         wandaBmGuideUrl: 'http://60.205.177.43:80/wandaBmGuide/', //管理书地址
-        // wandaBmGuideUrl: 'http://192.168.200.13:8090/wandaBmGuide/', //管理书地址
+        // wandaBmGuideUrl: 'http://192.168.200.26:8090/wandaBmGuide/', //管理书地址
     },
 }
-window.__systemConf = __systemConf
+window.__systemConf = __systemConf

+ 5 - 5
src/api/legendLibrary.js

@@ -93,12 +93,12 @@ export function graphElementSearch({
     return httputils.postJson(`/serve/topology-wanda/graphElement/search`, postParams)
 }
 // 更新图例关系信息
-export function graphElementUpdate({
-    postParams
-}) {
-    return httputils.postJson(`/serve/topology-wanda/graphRelation/update`, postParams)
+// export function graphElementUpdate({
+//     postParams
+// }) {
+//     return httputils.postJson(`/serve/topology-wanda/graphRelation/update`, postParams)
 
-}
+// }
 
 // 业下设备分类和位置分类树形结构
 export function queryDeviceAndPOsition({

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

@@ -171,7 +171,7 @@ export default {
                 floorId = this.$cookie.get('floorMapId'),
                 data = {
                     Distinct: true,
-                    Filters: `projectId=${this.plazaId};isPub=false;floorId='${floorId}'`,
+                    Filters: `projectId='${this.plazaId}';isPub=false;floorId='${floorId}'`,
                     PageNumber: 1,
                     PageSize: 500,
                     Projection: ['floorId']

+ 4 - 3
src/components/floorMap/canvasFun.vue

@@ -15,10 +15,10 @@
             <div class='small-block' @click='showText'>
                 <i>
                     <el-tooltip v-if='isShow' effect='dark' content='隐藏店铺名称' placement='top'>
-                        <img src='../../assets/imgs/er.png' alt />
+                        <img src='../../assets/imgs/yl.png' alt />
                     </el-tooltip>
                     <el-tooltip v-else effect='dark' content='显示店铺名称' placement='top'>
-                        <img src='../../assets/imgs/yl.png' alt />
+                        <img src='../../assets/imgs/er.png' alt />
                     </el-tooltip>
                 </i>
             </div>
@@ -102,7 +102,8 @@ export default {
             this.isShow = !this.isShow
             this.$emit('showText', this.isShow)
         }
-    }
+    },
+    mounted() {}
 }
 </script>
 <style lang="less" scoped>

+ 21 - 3
src/components/floorMap/index.vue

@@ -17,7 +17,7 @@ import { FloorView } from '@/lib/FloorView'
 import { FloorScene } from '@/lib/FloorScene'
 import RoomBox from '@/views/room/index'
 import canvasFun from '@/components/floorMap/canvasFun'
-import { readGroup, queryStatis } from '@/api/public'
+import { readGroup, queryStatis, queryBrand } from '@/api/public'
 import { STopologyParser } from '@/lib/parsers/STopologyParser'
 import { mapGetters, mapActions } from 'vuex'
 import { SImageItem } from '@saga-web/graph/lib'
@@ -61,14 +61,15 @@ export default {
     },
     components: { RoomBox, canvasFun },
     computed: {
-        ...mapGetters(['plazaId', 'fmapID', 'haveFengMap'])
+        ...mapGetters(['plazaId', 'fmapID', 'haveFengMap', 'bunkObj'])
     },
     methods: {
         ...mapActions(['getfmapID']),
         init(floorid) {
-            this.loading = true
+            // this.loading = true
             this.floorid = floorid
             this.mapSize()
+            this.$refs.canvasFun.isShow = false
             setTimeout(() => {
                 if (this.haveFengMap) {
                     this.clearGraphy()
@@ -81,6 +82,16 @@ export default {
                 }
             }, 100)
         },
+        // 铺位
+        query(arr) {
+            let data = {
+                plazaId: '1001145'
+            }
+            // let postParams = arr
+            queryBrand({ data }).then(res => {
+                console.log(res)
+            })
+        },
         parserData(floor) {
             if (floor == 'g80') {
                 // 屋顶
@@ -106,6 +117,11 @@ export default {
                         this.fParser.spaceList.forEach(t => {
                             //   t.selectable = true;
                             this.scene.addItem(t)
+                            if (t.data.Name && this.bunkObj[t.data.Name]) {
+                                t.name = this.bunkObj[t.data.Name].detailtype
+                            } else {
+                                t.name = ''
+                            }
                         })
                         this.fParser.wallList.forEach(t => this.scene.addItem(t))
                         this.fParser.virtualWallList.forEach(t => this.scene.addItem(t))
@@ -223,6 +239,7 @@ export default {
             let scale = this.view.scale
             this.view.scaleByPoint(val / scale, this.canvasWidth / 2, this.canvasHeight / 2)
         },
+        // 小眼睛控制显示铺位名称
         showText(val) {
             // this.topologyParser.zoneLegendList.forEach(t => {
             //     t.showText = val
@@ -302,6 +319,7 @@ export default {
     mounted() {
         this.mapSize()
         this.getEvent()
+        console.log('bunkObjbunkObjbunkObj', this.bunkObj)
     },
     created() {
         this.urlMsg = {

+ 1 - 1
src/components/menuList.vue

@@ -101,7 +101,7 @@ export default {
             let res = null,
                 data = {
                     Distinct: true,
-                    Filters: `projectId=${this.plazaId};isPub=false`,
+                    Filters: `projectId='${this.plazaId}';isPub=false`,
                     PageNumber: 1,
                     PageSize: 500,
                     Projection: ['floorId']

+ 1 - 0
src/main.js

@@ -44,6 +44,7 @@ router.beforeEach((to, from, next) => __awaiter(void 0, void 0, void 0, function
     if (!store.state.isrequestAuth) {
         yield store.dispatch('getUserInfo', username);
         yield store.dispatch('getFloors');
+        yield store.dispatch('getBrand');
     }
     next();
 }));

+ 1 - 0
src/main.ts

@@ -37,6 +37,7 @@ router.beforeEach(async (to, from, next) => {
     if (!store.state.isrequestAuth) {
         await store.dispatch('getUserInfo', username)
         await store.dispatch('getFloors')
+        await store.dispatch('getBrand')
     }
     next()
 })

+ 22 - 0
src/store/index.js

@@ -1,6 +1,8 @@
 import Vue from 'vue'
 import Vuex from 'vuex'
 import { login, queryFloor, queryfmapID } from '@/api/login.js'
+import { queryBrand } from '@/api/public.js'
+
 Vue.use(Vuex)
 export default new Vuex.Store({
     state: {
@@ -22,6 +24,7 @@ export default new Vuex.Store({
         scpzTable: [], //土建系统图例展示
         legendTable: [], //除土建系统图例展示
         remarksText: '', //备注
+        bunkObj: {}, // 铺位名称
     },
     getters: {
         floorsArr: (state) => state.floorsArr,
@@ -34,6 +37,7 @@ export default new Vuex.Store({
         scpzTable: (state) => state.scpzTable,
         legendTable: (state) => state.legendTable,
         remarksText: (state) => state.remarksText,
+        bunkObj: (state) => state.bunkObj,
     },
     mutations: {
         // 设置是否登陆校验
@@ -79,6 +83,9 @@ export default new Vuex.Store({
         SETREMARKSTEXT(state, data) {
             state.remarksText = data
         },
+        SETBUNKOBJ(state, data) {
+            state.bunkObj = data
+        },
     },
     actions: {
         // 获取项目列表、userId
@@ -109,6 +116,21 @@ export default new Vuex.Store({
                 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: {},
 })

+ 1 - 11
src/views/equipment/index.vue

@@ -54,7 +54,7 @@ import floorMap from '@/components/floorMap/index.vue'
 import eqDialog from './eqDialog'
 import editList from '@/components/edit.vue'
 import { system } from '@/utils/plugins/components.js'
-import { queryPic, queryBrand } from '@/api/public.js'
+import { queryPic } from '@/api/public.js'
 import { mapGetters } from 'vuex'
 
 export default {
@@ -82,15 +82,6 @@ export default {
     },
     components: { floorList, eqDialog, floorMap, editList },
     methods: {
-        query() {
-            let data = {
-                plazaId: '1000423'
-            }
-            // let postParams = []
-            queryBrand({ data }).then(res => {
-                console.log(res)
-            })
-        },
         // 查询tab页
         tabSyatem(item) {
             this.systemId = item.id
@@ -160,7 +151,6 @@ export default {
         this.everySystem = this.system[0].children
         this.init()
         this.$refs.floorMap.init(this.floorInfo.gname)
-        this.query()
     },
     computed: {
         ...mapGetters(['floorsArr', 'plazaId'])

+ 32 - 23
src/views/legendLibrary/addLegend.vue

@@ -15,23 +15,7 @@
                 <el-button type='primary' @click='save' size='small'>确 定</el-button>
             </span>
         </el-dialog>
-        <!-- <Modal :show='dialogVisible' :title='title' mode='middle' @close='dialogVisible=false'>
-            <template #content>
-                <add-form
-                    ref='add'
-                    :InfosList='InfosList'
-                    :InfoTypeIdList='InfoTypeIdList'
-                    :ruleForm='info'
-                    @addSuccess='addSuccess'
-                    @updateSuccess='updateSuccess'
-                    :title='title'
-                />
-            </template>
-            <template #handle>
-                <Button @click='dialogVisible = false,cancal()' type='default'>取 消</Button>
-                <Button @click='save' type='primary'>确 定</Button>
-            </template>
-        </Modal>-->
+
         <TransferSelectModal
             defaultExpandAll
             default-expand-all
@@ -51,7 +35,7 @@
 <script>
 import addForm from './addForm'
 import addList from '../legendRules/addList'
-import { groupByCategory, updateRelation } from '@/api/legendLibrary.js'
+import { groupByCategory, updateRelation, queryRelation } from '@/api/legendLibrary.js'
 
 export default {
     data() {
@@ -75,7 +59,8 @@ export default {
             title: '',
             GraphCategoryId: 'DTXT',
             modalShow4: false,
-            treeData: []
+            treeData: [],
+            tableData: []
         }
     },
     components: { addForm, addList },
@@ -89,6 +74,12 @@ export default {
                     this.treeData = []
                     this.treeData = res.Data.map(i => this.getTree(i))
                 })
+                //获取图例列表
+                let postParams = this.GraphCategoryId
+                let data = {}
+                queryRelation({ data, postParams }).then(res => {
+                    this.tableData = res.data.Content
+                })
                 //treeSelect
                 this.modalShow4 = true
                 this.info = {
@@ -125,8 +116,7 @@ export default {
                 // this.InfosList = [...row.InfoLocal.map(({ id }) => id), ...row.InfoSystem]
                 this.InfosList = row.InfoLocal ? [...row.InfoLocal.map(({ id }) => id)] : []
                 this.InfoTypeIdList = row.InfoTypeId
-                console.log(this.InfosList, this.InfoTypeIdList)
-                console.log(this.info)
+
                 // 图例库规则中的transform
             } else if (title == '' && this.$refs.searchList) {
                 this.$refs.searchList.queryAll()
@@ -189,11 +179,30 @@ export default {
                 this.dialogVisible = false
             }
         },
+
         treeConfirm(ids, dataObj) {
+            let tableList = [],
+                list = [],
+                totalLst = []
+            dataObj.forEach(i => {
+                list.push({
+                    Id: i.id,
+                    name: i.name
+                })
+            })
+            tableList = [...list, ...this.tableData]
+            tableList.forEach((i, index) => {
+                totalLst.push({
+                    GraphElementId: i.Id,
+                    OrderId: index
+                })
+            })
+
             let postParams = {
-                GraphCategoryId: this.GraphCategoryId.join(' '),
-                GraphElementIds: ids
+                GraphCategoryId: this.GraphCategoryId[0],
+                GraphRelations: totalLst
             }
+            console.log(totalLst, 'list')
             updateRelation({ postParams }).then(res => {
                 if (res.Result == 'success') {
                     this.$message.success('添加成功!')

+ 3 - 0
src/views/legendLibrary/index.vue

@@ -477,6 +477,9 @@ export default {
             })
         },
         getTableList() {
+            if (this.GraphCategoryIds || this.InfoLocals || this.InfoSystems || this.keyword) {
+                this.currentPage = 1
+            }
             let postParams = {
                 Deleted: this.state == 1 ? false : true,
                 GraphCategoryIds: this.GraphCategoryIds.length ? this.GraphCategoryIds : undefined, //说明书位置

+ 22 - 10
src/views/legendRules/index.vue

@@ -77,7 +77,7 @@
 </template>
 <script>
 import addLegend from '../legendLibrary/addLegend'
-import { getLegendTree, queryRelation, deleteRelation, graphElementUpdate } from '@/api/legendLibrary.js'
+import { updateRelation, getLegendTree, queryRelation, deleteRelation } from '@/api/legendLibrary.js'
 export default {
     components: { addLegend },
     data() {
@@ -163,38 +163,50 @@ export default {
                     break
             }
             function up() {
+                let list = []
                 if (index == 0) {
                     _this.$message.error('处于顶端,不可再上移')
                 } else {
                     let upDate = _this.tableData[index - 1]
                     _this.tableData.splice(index - 1, 1)
                     _this.tableData.splice(index, 0, upDate)
-                    let ids = _this.tableData.map(({ Id }) => Id)
-                    _this.upDateGraphy(ids)
+
+                    _this.tableData.forEach((i, index) => {
+                        list.push({
+                            GraphElementId: i.Id,
+                            OrderId: index
+                        })
+                    })
+                    _this.upDateGraphy(list)
                 }
             }
 
             function down() {
+                let list = []
                 if (index == _this.tableData.length - 1) {
                     _this.$message.error('处于底端,不可再下移')
                 } else {
                     let downDate = _this.tableData[index + 1]
                     _this.tableData.splice(index + 1, 1)
                     _this.tableData.splice(index, 0, downDate)
-                    let ids = _this.tableData.map(({ Id }) => Id)
-                    _this.upDateGraphy(ids)
+                    _this.tableData.forEach((i, index) => {
+                        list.push({
+                            GraphElementId: i.Id,
+                            OrderId: index
+                        })
+                    })
+                    _this.upDateGraphy(list)
                 }
             }
         },
         // 更新图例关系信息
-        upDateGraphy(ids) {
-            let posParams = {
+        upDateGraphy(list) {
+            let postParams = {
                 GraphCategoryId: this.GraphCategoryId[0],
-                GraphElementIds: ids,
-                Move: true
+                GraphRelations: list
             }
 
-            graphElementUpdate({ posParams }).then(res => {
+            updateRelation({ postParams }).then(res => {
                 this.getData()
             })
         },