zhulizhen1111 4 سال پیش
والد
کامیت
f6a1ca7535
2فایلهای تغییر یافته به همراه9 افزوده شده و 6 حذف شده
  1. 5 4
      src/views/legendLibrary/addForm.vue
  2. 4 2
      src/views/legendLibrary/index.vue

+ 5 - 4
src/views/legendLibrary/addForm.vue

@@ -303,6 +303,7 @@ export default {
             this.view.strokecolor = this.ruleForm.Color
             this.view.lineType = this.ruleForm.LineDash
             this.view.lineWidth = this.ruleForm.LineWidth
+            //修改的时候canvas的image可以预览
             if (this.ruleForm.Url && type == 2) {
                 let url = `/serve/topology-wanda/Picture/query/${this.ruleForm.Url}`
                 this.view.url = url
@@ -467,7 +468,7 @@ export default {
                             this.update()
                             this.$emit('updateSuccess')
                             this.view.canvas.clearRect(0, 0, this.width, this.height)
-                        } 
+                        }
                     }
                 })
             }
@@ -545,9 +546,9 @@ export default {
             this.initGraph()
         }
     },
-    watch:{
-        'ruleForm.Id':{
-            handler(){
+    watch: {
+        'ruleForm.Id': {
+            handler() {
                 this.initQueryDeviceAndPOsition()
                 this.visualization()
                 if (this.title == '修改图例库') {

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

@@ -110,7 +110,7 @@
                 </el-table-column>
                 <el-table-column prop='style' label='图例样式' width='150'>
                     <template slot-scope='{row}'>
-                        <img class='img' :src='`/serve/topology-wanda/Picture/query/${row.Url}`' alt />
+                        <img :class='`${row.Type!="Image"?"img1":"img"}`' :src='`/serve/topology-wanda/Picture/query/${row.Url}`' alt />
                     </template>
                 </el-table-column>
                 <el-table-column prop='Unit' label='单位' width='120'>
@@ -624,11 +624,13 @@ export default {
             display: flex;
             align-items: center;
         }
-
         .img {
             width: 28px;
             height: 28px;
         }
+        .img1 {
+            width: 44px;
+        }
     }
     .foot {
         height: 32px;