Browse Source

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

YaolongHan 4 năm trước cách đây
mục cha
commit
64a44bf0f8

+ 2 - 2
package.json

@@ -12,10 +12,10 @@
     "dependencies": {
         "@mapbox/geojson-merge": "^1.1.1",
         "@saga-web/base": "2.1.25",
-        "@saga-web/big": "1.0.102",
+        "@saga-web/big": "1.0.105",
         "@saga-web/draw": "2.1.106",
         "@saga-web/feng-map": "1.0.35",
-        "@saga-web/graph": "2.1.119",
+        "@saga-web/graph": "2.1.121",
         "ant-design-vue": "^1.4.10",
         "axios": "^0.19.2",
         "core-js": "^3.4.4",

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

@@ -16,16 +16,16 @@
 
             <div v-if="equipIds.length && !tabData.pointData.length" style="margin-top: 10px;">
                 <el-table :data="tabData.tableData" max-height="235" style="width: 100%" @row-click='handleClickEquipDetail' v-loading="eqLoading">
-                    <el-table-column prop="sbjc" label="设备简称" width="170" :show-overflow-tooltip='true'></el-table-column>
+                    <el-table-column prop="sbjc" label="设备简称" width="164" :show-overflow-tooltip='true'></el-table-column>
                     <el-table-column prop="sl" width="50" label="数量" :show-overflow-tooltip='true'></el-table-column>
                     <el-table-column prop="sb_status" width="70" label="设备状态" :show-overflow-tooltip='true'></el-table-column>
-                    <el-table-column prop="sbglgs" width="80" label="管理归属" :show-overflow-tooltip='true'></el-table-column>
-                    <el-table-column prop="assetnum" width="80" label="设备内码" :show-overflow-tooltip='true'></el-table-column>
+                    <el-table-column prop="sbglgs" width="70" label="管理归属" :show-overflow-tooltip='true'></el-table-column>
+                    <!-- <el-table-column prop="assetnum" width="80" label="设备内码" :show-overflow-tooltip='true'></el-table-column>
                     <el-table-column label="" width="80" :show-overflow-tooltip='true'>
                         <template slot-scope="scope">
                             <span class="equip-detail-btn">台账详情</span>
                         </template>
-                    </el-table-column>
+                    </el-table-column> -->
                 </el-table>
                 <!-- <div style="text-align: right; margin-top: 10px;">
                     <el-button size="mini" type="primary" @click="visible = false">关闭</el-button>
@@ -48,16 +48,16 @@
             <el-tabs v-else-if="equipIds.length && tabData.pointData.length" v-model="activeName">
                 <el-tab-pane label="设备设施" name="equip">
                     <el-table :data="tabData.tableData" max-height="235" style="width: 100%" @row-click='handleClickEquipDetail' v-loading="eqLoading">
-                        <el-table-column prop="sbjc" label="设备简称" width="170" :show-overflow-tooltip='true'></el-table-column>
+                        <el-table-column prop="sbjc" label="设备简称" width="164" :show-overflow-tooltip='true'></el-table-column>
                         <el-table-column prop="sl" width="50" label="数量" :show-overflow-tooltip='true' align="right"></el-table-column>
                         <el-table-column prop="sb_status" width="70" label="设备状态" :show-overflow-tooltip='true'></el-table-column>
-                        <el-table-column prop="sbglgs" width="80" label="管理归属" :show-overflow-tooltip='true'></el-table-column>
-                        <el-table-column prop="assetnum" width="80" label="设备内码" :show-overflow-tooltip='true'></el-table-column>
+                        <el-table-column prop="sbglgs" width="70" label="管理归属" :show-overflow-tooltip='true'></el-table-column>
+                        <!-- <el-table-column prop="assetnum" width="80" label="设备内码" :show-overflow-tooltip='true'></el-table-column>
                         <el-table-column label="" width="80" :show-overflow-tooltip='true'>
                             <template slot-scope="scope">
                                 <span class="equip-detail-btn">台账详情</span>
                             </template>
-                        </el-table-column>
+                        </el-table-column> -->
                     </el-table>
                     <div style="text-align: right; margin-top: 10px;">
                         <!-- <el-button size="mini" type="primary" @click="visible = false">关闭</el-button> -->

+ 2 - 0
src/lib/items/SCustomLegendItem.ts

@@ -77,8 +77,10 @@ export class SCustomLegendItem extends SPolygonItem {
         this._isActive = v;
         if (v) {
             this.cursor = "pointer";
+            this.textItem.cursor = "pointer";
         } else {
             this.cursor = "auto";
+            this.textItem.cursor = "auto";
         }
         this.update();
     } // Set isActive

+ 2 - 0
src/lib/items/SFHFQZoneLegendItem.ts

@@ -76,8 +76,10 @@ export class SFHFQZoneLegendItem extends SPolygonItem {
         this._isActive = v;
         if (v) {
             this.cursor = "pointer";
+            this.textItem.cursor = "pointer";
         } else {
             this.cursor = "auto";
+            this.textItem.cursor = "auto";
         }
         this.update();
     } // Set isActive

+ 4 - 0
src/lib/items/SImageLegendItem.ts

@@ -95,6 +95,9 @@ export class SImageLegendItem extends SIconTextItem {
         if (data.Properties.ImgPos) {
             this.img.moveTo(data.Properties.ImgPos.X, data.Properties.ImgPos.Y);
         }
+        if (data.Properties && data.Properties.ImgRotate) {
+            this.img.rotate = data.Properties.ImgRotate;
+        }
         if (data.Properties && data.Properties.font) {
             this.font = new SFont("sans-serif", data.Properties.font);
         }
@@ -138,6 +141,7 @@ export class SImageLegendItem extends SIconTextItem {
         this.data.Properties.Url = this.img.url;
         this.data.Properties.TextPos = { X: this.textItem.x, Y: this.textItem.y };
         this.data.Properties.ImgPos = { X: this.img.x, Y: this.img.y };
+        this.data.Properties.ImgRotate = this.img.rotate;
         this.data.Properties.Size = {
             Width: this.sWidth,
             Height: this.sHeight

+ 2 - 0
src/lib/items/SSCPZZoneLegendItem.ts

@@ -76,8 +76,10 @@ export class SSCPZZoneLegendItem extends SPolygonItem {
         this._isActive = v;
         if (v) {
             this.cursor = "pointer";
+            this.textItem.cursor = "pointer";
         } else {
             this.cursor = "auto";
+            this.textItem.cursor = "auto";
         }
         this.update();
     } // Set isActive

+ 2 - 0
src/lib/items/SZoneLegendItem.ts

@@ -76,8 +76,10 @@ export class SZoneLegendItem extends SPolygonItem {
         this._isActive = v;
         if (v) {
             this.cursor = "pointer";
+            this.textItem.cursor = "pointer";
         } else {
             this.cursor = "auto";
+            this.textItem.cursor = "auto";
         }
         this.update();
     } // Set isActive

+ 44 - 50
src/views/legendLibrary/addForm.vue

@@ -211,69 +211,69 @@ export default {
             options: [
                 {
                     id: 'None',
-                    name: '非图例'
+                    name: '非图例',
                 },
                 {
                     id: 'Zone',
-                    name: '区域'
+                    name: '区域',
                 },
                 {
                     id: 'Image',
-                    name: '图标'
+                    name: '图标',
                 },
                 {
                     id: 'Line',
-                    name: '线条'
-                }
+                    name: '线条',
+                },
             ],
             kuan: [
                 { id: '16', name: '16' },
                 { id: '32', name: '32' },
-                { id: '64', name: '64' }
+                { id: '64', name: '64' },
             ],
             gao: [
                 { id: '16', name: '16' },
                 { id: '32', name: '32' },
-                { id: '64', name: '64' }
+                { id: '64', name: '64' },
             ],
             selectedIds: [],
             borderLineOption: [
                 {
                     id: 'solid',
-                    src: require('@/assets/imgs/1pxlines.png')
+                    src: require('@/assets/imgs/1pxlines.png'),
                 },
                 {
                     id: 'dashed',
-                    src: require('@/assets/imgs/dashedLines.png')
+                    src: require('@/assets/imgs/dashedLines.png'),
                 },
                 {
                     id: 'dotted',
-                    src: require('@/assets/imgs/dotLines.png')
-                }
+                    src: require('@/assets/imgs/dotLines.png'),
+                },
             ],
             linepxOption: [
                 {
                     id: 1,
-                    src: require('@/assets/imgs/1pxline.jpg')
+                    src: require('@/assets/imgs/1pxline.jpg'),
                 },
                 {
                     id: 2,
-                    src: require('@/assets/imgs/2pxline.jpg')
+                    src: require('@/assets/imgs/2pxline.jpg'),
                 },
                 {
                     id: 3,
-                    src: require('@/assets/imgs/3pxline.jpg')
-                }
+                    src: require('@/assets/imgs/3pxline.jpg'),
+                },
             ],
             fileList: [],
             file: '',
             // this.ruleForm.Url 图标的key,/serve/topology-wanda/Picture/query/${this.ruleForm.Url}
             value: '',
             linepxObject: {
-                src: ''
+                src: '',
             },
             borderLineOptionObject: {
-                src: ''
+                src: '',
             },
             canvasWidth: 28,
             canvasHeight: 28,
@@ -286,7 +286,7 @@ export default {
             key: 1,
             InfoLocals: undefined, //工程信息化
             // InfoSystems: undefined, //工程信息化专业/系统
-            InfoTypeIds: undefined //铺位可视化typeid
+            InfoTypeIds: undefined, //铺位可视化typeid
         }
     },
     props: ['ruleForm', 'title', 'InfosList', 'InfoTypeIdList'],
@@ -301,10 +301,10 @@ export default {
         //业下设备分类和位置分类树形结构
         initQueryDeviceAndPOsition() {
             let postParams = {}
-            queryDeviceAndPOsition({ postParams }).then(res => {
-                this.deviceList = res.data.map(i => {
+            queryDeviceAndPOsition({ postParams }).then((res) => {
+                this.deviceList = res.data.map((i) => {
                     i.children &&
-                        i.children.map(child => {
+                        i.children.map((child) => {
                             child.id = child.id + child.type
                             child.name = child.name
                         })
@@ -321,7 +321,7 @@ export default {
             this.file = file.file
             var reader = new FileReader()
             reader.readAsDataURL(this.file)
-            reader.onload = e => {
+            reader.onload = (e) => {
                 this.view.url = e.target.result
             }
         },
@@ -333,9 +333,9 @@ export default {
                 this.ruleForm.FillColor = this.hexify(this.ruleForm.FillColor)
             }
             let postParams = {
-                Content: [this.ruleForm]
+                Content: [this.ruleForm],
             }
-            createLegend({ postParams }).then(res => {
+            createLegend({ postParams }).then((res) => {
                 if (res.Result == 'success') {
                     this.$message.success('添加图例成功!')
                     this.$emit('addSuccess')
@@ -353,9 +353,9 @@ export default {
                 this.ruleForm.FillColor = this.hexify(this.ruleForm.FillColor)
             }
             let postParams = {
-                Content: [this.ruleForm]
+                Content: [this.ruleForm],
             }
-            updateLegend({ postParams }).then(res => {
+            updateLegend({ postParams }).then((res) => {
                 if (res.Result == 'success') {
                     this.$message.success('图例修改成功!')
                     this.$emit('updateSuccess')
@@ -433,7 +433,7 @@ export default {
         //线条类型改变
         changeLineType(val) {
             if (val) {
-                this.borderLineOptionObject = val && this.borderLineOption.find(item => item.id == val)
+                this.borderLineOptionObject = val && this.borderLineOption.find((item) => item.id == val)
                 this.$nextTick(() => {
                     if (this.$refs.select1 && this.$refs.select1.$el) {
                         this.$refs.select1.$el.children[0].children[0].setAttribute(
@@ -494,7 +494,7 @@ export default {
                         formData.append('file', this.file)
                     }
                     let postParams = formData
-                    uploadImg({ postParams }).then(res => {
+                    uploadImg({ postParams }).then((res) => {
                         if (res.Result == 'success') {
                             this.$set(vm.ruleForm, 'Url', res.EntityList[0])
                             this.$message.success('图标上传成功!')
@@ -520,18 +520,12 @@ export default {
 
         //位置/设备
         treeConfirmDevice(id, info) {
-            console.log('%ctreeConfirmDevice=============','color:blue')
-            console.log(id, info)
-            console.log('%ctreeConfirmDevice=============','color:blue')
             let InfoSystem = [],
                 InfoSystems = [],
                 InfoLocal = []
-            this.deviceList.forEach(i => {
+            this.deviceList.forEach((i) => {
                 i.children.length > 0 &&
-                    i.children.forEach(j => {
-                          console.log('%this.deviceList.forEach=============','color:blue')
-                          console.log(id)
-                          console.log('%this.deviceList.forEach=============','color:blue')
+                    i.children.forEach((j) => {
                         if (id.includes(j.id)) {
                             InfoSystems.push(i)
                         }
@@ -539,22 +533,22 @@ export default {
             })
             InfoSystem = JSON.parse(JSON.stringify(InfoSystems))
                 .reduce((prev, element) => {
-                    if (!prev.find(el => el.id == element.id)) {
+                    if (!prev.find((el) => el.id == element.id)) {
                         prev.push(element)
                     }
                     return prev
                 }, [])
-                .map(i => {
+                .map((i) => {
                     if (i.children.length) {
                         delete i.children
                     }
                     return i
                 })
-            InfoLocal = info.map(i => {
+            InfoLocal = info.map((i) => {
                 return {
                     type: i.id.split('')[i.id.length - 1],
                     name: i.name,
-                    id: i.id.substr(0, i.id.length - 1)
+                    id: i.id.substr(0, i.id.length - 1),
                 }
             })
             this.$set(this.ruleForm, 'InfoLocal', InfoLocal)
@@ -564,21 +558,21 @@ export default {
             // //console.log('focusChange', status)
         },
         visualization() {
-            getVisualization({}).then(res => {
+            getVisualization({}).then((res) => {
                 this.typeVisualization =
                     res.Data &&
-                    res.Data.map(i => {
+                    res.Data.map((i) => {
                         return {
                             id: i.Id,
                             name: i.Name,
                             children: i.Children
-                                ? i.Children.map(j => {
+                                ? i.Children.map((j) => {
                                       return {
                                           id: j.Id,
-                                          name: j.Id + '-' + j.Name
+                                          name: j.Id + '-' + j.Name,
                                       }
                                   })
-                                : []
+                                : [],
                         }
                     })
             })
@@ -587,12 +581,12 @@ export default {
             return {
                 id: data.Id,
                 name: data.Name,
-                children: data.Children ? data.Children.map(i => this.getTree(i)) : []
+                children: data.Children ? data.Children.map((i) => this.getTree(i)) : [],
             }
         },
         focusChange(status) {
             //console.log('focusChange', status)
-        }
+        },
     },
     mounted() {
         console.log(this.ruleForm, 'form')
@@ -616,9 +610,9 @@ export default {
                     }
                     this.initGraph()
                 }
-            }
-        }
-    }
+            },
+        },
+    },
 }
 </script>
 

+ 43 - 39
src/views/legendLibrary/index.vue

@@ -188,7 +188,7 @@ import {
     deleteLegend,
     queryTypeId,
     getVisualization,
-    queryRelation
+    queryRelation,
 } from '@/api/legendLibrary.js'
 
 function hexToRgba(hex) {
@@ -224,40 +224,40 @@ export default {
                 { id: 'test1', name: '选择项' },
                 { id: 'test2', name: '单平米' },
                 { id: 'test3', name: '下级分项' },
-                { id: 'test4', name: '滑动平均滑动平均' }
+                { id: 'test4', name: '滑动平均滑动平均' },
             ],
             stateSelect: [
                 { id: '1', name: '正常' },
-                { id: '0', name: '已作废' }
+                { id: '0', name: '已作废' },
             ],
             Type: 'all', //所属分类
             selText: '图例库管理',
             selVal: '0',
             dataSelect: [
                 { id: '0', name: '图例库管理' },
-                { id: '1', name: '图例绘制规则' }
+                { id: '1', name: '图例绘制规则' },
             ],
             typeOptions: [
                 {
                     id: 'all',
-                    name: '全部'
+                    name: '全部',
                 },
                 {
                     id: 'None',
-                    name: '非图例'
+                    name: '非图例',
                 },
                 {
                     id: 'Zone',
-                    name: '区域'
+                    name: '区域',
                 },
                 {
                     id: 'Image',
-                    name: '图标'
+                    name: '图标',
                 },
                 {
                     id: 'Line',
-                    name: '线条'
-                }
+                    name: '线条',
+                },
             ],
             TypeId: '',
             typeIdSelect: [{ id: 'Zone', name: '铺位面' }],
@@ -275,7 +275,7 @@ export default {
             GraphCategoryIds: [], //说明书位置勾选集合
             InfoLocals: [], //工程信息化
             InfoSystems: [], //工程信息化专业/系统
-            InfoTypeIds: [] //铺位可视化typeid
+            InfoTypeIds: [], //铺位可视化typeid
         }
     },
     filters: {
@@ -285,12 +285,12 @@ export default {
             } else {
                 return val
             }
-        }
+        },
     },
     watch: {
         selVal(n, o) {
             if (n === o) return
-            this.selText = this.dataSelect.find(d => d.id === n).name
+            this.selText = this.dataSelect.find((d) => d.id === n).name
             console.log(n, o)
             if (n == 0) {
                 this.$router.push({ path: 'legendLibrary' })
@@ -298,13 +298,13 @@ export default {
             if (n == 1) {
                 this.$router.push({ path: 'legendRules' })
             }
-        }
+        },
     },
     methods: {
         //业下设备分类和位置分类树形结构
         initQueryDeviceAndPOsition() {
             let postParams = {}
-            queryDeviceAndPOsition({ postParams }).then(res => {
+            queryDeviceAndPOsition({ postParams }).then((res) => {
                 // let data = res.data
                 // data.forEach(data => {
                 //     const map = {
@@ -340,8 +340,8 @@ export default {
         //说明书位置
         instruction() {
             let getParams = {}
-            getLegendTree({ getParams }).then(res => {
-                this.positionSelect = res.Content && res.Content.map(i => this.getTree(i))
+            getLegendTree({ getParams }).then((res) => {
+                this.positionSelect = res.Content && res.Content.map((i) => this.getTree(i))
             })
         },
         //监听取消 修改的时候取消会导致表格不刷新
@@ -355,26 +355,26 @@ export default {
         },
         getTypeId() {
             let postParams = {}
-            queryTypeId({ postParams }).then(res => {
+            queryTypeId({ postParams }).then((res) => {
                 this.typeIdSelect = res.Content
             })
         },
         visualization() {
-            getVisualization({}).then(res => {
+            getVisualization({}).then((res) => {
                 this.typeVisualization =
                     res.Data &&
-                    res.Data.map(i => {
+                    res.Data.map((i) => {
                         return {
                             id: i.Id,
                             name: i.Name,
                             children: i.Children
-                                ? i.Children.map(j => {
+                                ? i.Children.map((j) => {
                                       return {
                                           id: j.Id,
-                                          name: j.Id + '-' + j.Name
+                                          name: j.Id + '-' + j.Name,
                                       }
                                   })
-                                : []
+                                : [],
                         }
                     })
             })
@@ -384,7 +384,7 @@ export default {
             return {
                 id: data.Id,
                 name: data.Name,
-                children: child ? child.map(i => this.getTree(i)) : []
+                children: child ? child.map((i) => this.getTree(i)) : [],
             }
         },
         add() {
@@ -396,15 +396,15 @@ export default {
         modalConfirm() {
             let postParams = [
                 {
-                    Id: this.deleteObject.Id
-                }
+                    Id: this.deleteObject.Id,
+                },
             ]
             deleteLegend({ postParams })
-                .then(res => {
+                .then((res) => {
                     if (res.Result == 'success') {
                         this.$message({
                             type: 'success',
-                            message: '作废成功!'
+                            message: '作废成功!',
                         })
                         this.modalStatusTip = false
                         this.getTableList()
@@ -413,7 +413,7 @@ export default {
                 .catch(() => {
                     this.$message({
                         type: 'info',
-                        message: '已取消删除'
+                        message: '已取消删除',
                     })
                 })
         },
@@ -428,7 +428,7 @@ export default {
         getTableListPosition(val) {
             let postParams = val.map(({ id }) => id)
             let data = {}
-            queryRelation({ data, postParams }).then(res => {
+            queryRelation({ data, postParams }).then((res) => {
                 this.tableData = res.data.Content
                 this.loading = false
                 this.total = res.Total
@@ -437,10 +437,10 @@ export default {
         transformDate(arr) {
             arr.map(({ GraphCategorys, InfoLocal, InfoSystems, InfoTypes }) => {
                 if (GraphCategorys.length) {
-                    GraphCategorys.map(i => i)
+                    GraphCategorys.map((i) => i)
                 }
                 if (InfoLocal.length) {
-                    GraphCategorys.map(i => {
+                    GraphCategorys.map((i) => {
                         i.name
                     })
                 }
@@ -463,15 +463,15 @@ export default {
                 Name: this.keyword,
                 PageNumber: this.currentPage,
                 PageSize: this.size,
-                Type: this.Type == 'all' ? undefined : this.Type
+                Type: this.Type == 'all' ? undefined : this.Type,
             }
-            graphElementSearch({ postParams }).then(res => {
+            graphElementSearch({ postParams }).then((res) => {
                 this.key++
                 // this.tableData = res.Content
                 this.total = res.Total
                 this.tableData =
                     res.Content &&
-                    res.Content.map(i => {
+                    res.Content.map((i) => {
                         if (i.FillColor.length == '9') {
                             i.FillColor = hexToRgba(i.FillColor)
                         }
@@ -506,9 +506,9 @@ export default {
             let InfoSystem = []
             this.InfoSystems = []
             this.InfoLocals = []
-            this.deviceList.forEach(i => {
+            this.deviceList.forEach((i) => {
                 i.children.length > 0 &&
-                    i.children.forEach(j => {
+                    i.children.forEach((j) => {
                         if (id.includes(j.id)) {
                             InfoSystem.push(i.id)
                         }
@@ -525,7 +525,7 @@ export default {
         },
         focusChange(status) {
             // console.log('focusChange', status)
-        }
+        },
     },
     mounted() {
         this.getTypeId()
@@ -533,7 +533,7 @@ export default {
         this.visualization()
         this.getTableList()
         this.initQueryDeviceAndPOsition()
-    }
+    },
 }
 </script>
 <style lang="less" scoped>
@@ -652,6 +652,10 @@ export default {
 }
 </style>
 <style lang="less">
+.el-tooltip__popper {
+    max-width: 600px !important;
+    line-height: 20px !important;
+}
 @media screen and (max-height: 800px) {
     .legend-library-bottom {
         overflow-y: auto;

+ 2 - 2
vue.config.js

@@ -4,8 +4,8 @@ module.exports = {
         port: 8090,
         proxy: {
             '/data': {
-                // target: "http://60.205.177.43",
-                target: 'http://10.199.143.126',
+                target: "http://60.205.177.43",
+                // target: 'http://10.199.143.126',
                 // target: 'http://192.168.200.11:9003', //yll
                 // target: 'http://localhost:6040/data/',
                 changeOrigin: true,