zhulizhen1111 4 yıl önce
ebeveyn
işleme
8b8014aaa4

BIN
src/assets/imgs/mainIcon.png


+ 29 - 20
src/views/equipment/index.vue

@@ -23,8 +23,11 @@
             </div>
             <div class='eq-right'>
                 <div class='eq-right-bottom'>
-                    <div class='eq-title'>
-                        <span>{{floorInfo.floorName}}</span>
+                    <div class='title-box'>
+                        <img src='@/assets/imgs/mainIcon.png' />
+                        <div class='eq-title'>
+                            <span>{{floorInfo.floorName}}</span>
+                        </div>
                     </div>
                     <div class='eq-content'>
                         <floorMap ref='floorMap'></floorMap>
@@ -136,7 +139,7 @@ export default {
     display: flex;
     flex: 1;
     .eq-top {
-        margin-left: 245px;
+        margin-left: 196px;
         padding-top: 24px;
         position: fixed;
         z-index: 3;
@@ -164,7 +167,7 @@ export default {
         .eq-left {
             position: fixed;
             z-index: 2;
-            width: 245px;
+            width: 196px;
             padding-top: 100px;
             color: #646c73;
             font-size: 14px;
@@ -192,25 +195,31 @@ export default {
             .eq-right-bottom {
                 display: flex;
                 flex: 1;
-                .eq-title {
+                .title-box {
                     position: fixed;
                     z-index: 2;
                     top: 146px;
-                    left: 245px;
-                    width: 141px;
-                    height: 32px;
-                    background: linear-gradient(270deg, rgba(199, 217, 234, 0) 0%, rgba(199, 217, 234, 1) 100%);
-                    box-shadow: -6px 2px 8px 0px rgba(31, 36, 41, 0.1);
-                    color: #025baa;
-                    font-size: 16px;
-                    &::before {
-                        width: 2px;
-                        height: 16px;
-                        background: rgba(2, 91, 170, 1);
-                        display: inline-block;
-                        content: '';
-                        margin-right: 10px;
-                        margin-top: 8px;
+                    left: 229px;
+                    display: flex;
+                    img {
+                        margin-top: -5px;
+                    }
+                    .eq-title {
+                        width: 140px;
+                        height: 32px;
+                        background: linear-gradient(270deg, rgba(199, 217, 234, 0) 0%, rgba(199, 217, 234, 1) 100%);
+                        box-shadow: -6px 2px 8px 0px rgba(31, 36, 41, 0.1);
+                        color: #025baa;
+                        font-size: 16px;
+                        &::before {
+                            width: 2px;
+                            height: 16px;
+                            background: rgba(2, 91, 170, 1);
+                            display: inline-block;
+                            content: '';
+                            margin-right: 10px;
+                            margin-top: 8px;
+                        }
                     }
                 }
                 .eq-content {

+ 27 - 18
src/views/floorFunc/index.vue

@@ -1,7 +1,10 @@
 <template>
     <div class='floorFunc-box'>
-        <div class='eq-title'>
-            <span>{{floorInfo.floorName}}</span>
+        <div class='title-box'>
+            <img src='@/assets/imgs/mainIcon.png' />
+            <div class='eq-title'>
+                <span>{{floorInfo.floorName}}</span>
+            </div>
         </div>
         <floorMap ref='floorMap'></floorMap>
     </div>
@@ -35,25 +38,31 @@ export default {
     background: rgba(242, 245, 247, 1);
     height: calc(100vh - 48px);
     flex: 1;
-    .eq-title {
+    .title-box {
         position: fixed;
         z-index: 2;
         top: 92px;
-        left: 242px;
-        width: 140px;
-        height: 32px;
-        background: linear-gradient(270deg, rgba(199, 217, 234, 0) 0%, rgba(199, 217, 234, 1) 100%);
-        box-shadow: -6px 2px 8px 0px rgba(31, 36, 41, 0.1);
-        color: #025baa;
-        font-size: 16px;
-        &::before {
-            width: 2px;
-            height: 16px;
-            background: rgba(2, 91, 170, 1);
-            display: inline-block;
-            content: '';
-            margin-right: 10px;
-            margin-top: 8px;
+        left: 104px;
+        display: flex;
+        img {
+            margin-top: -5px;
+        }
+        .eq-title {
+            width: 140px;
+            height: 32px;
+            background: linear-gradient(270deg, rgba(199, 217, 234, 0) 0%, rgba(199, 217, 234, 1) 100%);
+            box-shadow: -6px 2px 8px 0px rgba(31, 36, 41, 0.1);
+            color: #025baa;
+            font-size: 16px;
+            &::before {
+                width: 2px;
+                height: 16px;
+                background: rgba(2, 91, 170, 1);
+                display: inline-block;
+                content: '';
+                margin-right: 10px;
+                margin-top: 8px;
+            }
         }
     }
 }

+ 21 - 13
src/views/legendLibrary/addForm.vue

@@ -17,7 +17,7 @@
                 </el-select>
             </div>
             <div class='input-right' ref='graph' v-show='ruleForm.Type=="Zone" || ruleForm.Type=="Image" || ruleForm.Type =="Line"'>
-                <div v-if=' ruleForm.Type=="Image" ' class='input-right'>
+                <div v-if=' ruleForm.Type=="Image" && ruleForm.Url' class='input-right'>
                     <img :src='`/serve/Picture/query/${ruleForm.Url}`' alt />
                 </div>
                 <canvas id='canvas' :width='canvasWidth' :height='canvasHeight' v-else></canvas>
@@ -156,8 +156,12 @@ export default {
             fileList: [],
             // this.ruleForm.Url 图标的key,/serve/Picture/query/${this.ruleForm.Url}
             value: '',
-            linepxObject: {},
-            borderLineOptionObject: {},
+            linepxObject: {
+                src: ''
+            },
+            borderLineOptionObject: {
+                src: ''
+            },
             canvasWidth: 200,
             canvasHeight: 114,
             view: null,
@@ -165,11 +169,6 @@ export default {
         }
     },
     props: ['ruleForm', 'title'],
-    updated() {
-        this.changeLineWidth(this.ruleForm.LineWidth)
-        this.changeLineType(this.ruleForm.LineDash)
-        this.initGraph()
-    },
     methods: {
         getFile(file) {
             var formData = new FormData()
@@ -264,7 +263,7 @@ export default {
         changeLineType(val) {
             this.$set(this.ruleForm, 'LineDash', val)
             this.borderLineOptionObject = val && this.borderLineOption.find(item => item.id == val)
-            if (this.$refs.select1) {
+            if (this.$refs.select1 && this.$refs.select1.$el) {
                 this.$refs.select1.$el.children[0].children[0].setAttribute(
                     'style',
                     'background:url(' + this.borderLineOptionObject.src + ')  center center no-repeat;color:transparent;'
@@ -278,7 +277,7 @@ export default {
         changeLineWidth(val) {
             this.$set(this.ruleForm, 'LineWidth', val)
             this.linepxObject = val && this.linepxOption.find(item => item.id == val)
-            if (this.$refs.select) {
+            if (this.$refs.select && this.$refs.select.$el) {
                 this.$refs.select.$el.children[0].children[0].setAttribute(
                     'style',
                     'background:url(' + this.linepxObject.src + ') center center no-repeat;color:transparent;'
@@ -329,9 +328,18 @@ export default {
         }
     },
     mounted() {
-        this.changeLineWidth(this.ruleForm.LineWidth)
-        this.changeLineType(this.ruleForm.LineDash)
-        this.initGraph()
+        if (this.title == '修改图例库') {
+            this.changeLineWidth(this.ruleForm.LineWidth)
+            this.changeLineType(this.ruleForm.LineDash)
+            this.initGraph()
+        }
+    },
+    updated() {
+        if (this.title == '修改图例库') {
+            this.changeLineWidth(this.ruleForm.LineWidth)
+            this.changeLineType(this.ruleForm.LineDash)
+            this.initGraph()
+        }
     }
 }
 </script>