Explorar o código

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

shaun-sheep %!s(int64=4) %!d(string=hai) anos
pai
achega
6f39176dfb
Modificáronse 2 ficheiros con 16 adicións e 4 borrados
  1. 4 3
      src/views/legendLibrary/addForm.vue
  2. 12 1
      src/views/legendLibrary/addLegend.vue

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

@@ -18,7 +18,7 @@
             </div>
             <div class='input-right' v-if='ruleForm.Type=="Zone" || ruleForm.Type=="Icon" || ruleForm.Type =="Line"'>
                 <div v-if=' ruleForm.Type=="Icon" ' class='input-right'>
-                    <img :src='`/serve/Picture/query/${imgSrc}`' alt />
+                    <img :src='`/serve/Picture/query/${ruleForm.Url}`' alt />
                 </div>
                 <div
                     v-else-if='ruleForm.Type=="Zone" '
@@ -152,7 +152,7 @@ export default {
                 }
             ],
             fileList: [],
-            imgSrc: '', //图标的key,/serve/Picture/query/${imgSrc}
+            // this.ruleForm.Url 图标的key,/serve/Picture/query/${this.ruleForm.Url}
             value: '',
             linepxObject: {},
             borderLineOptionObject: {}
@@ -168,8 +168,9 @@ export default {
             let postParams = formData
             uploadImg({ postParams }).then(res => {
                 if (res.Result == 'success') {
-                    this.imgSrc = res.EntityList[0]
+                    this.$set(this.ruleForm, 'Url', res.EntityList[0])
                     this.$message.success('图标上传成功!')
+                    this.fileList = []
                 }
             })
         },

+ 12 - 1
src/views/legendLibrary/addLegend.vue

@@ -22,7 +22,8 @@ export default {
                 Name: '',
                 Type: 'None',
                 Unit: '',
-                FillColor: ''
+                FillColor: '',
+                Url: ''
             },
             title: '',
             GraphCategoryId: ''
@@ -48,6 +49,15 @@ export default {
                 this.$refs.searchList.queryAll()
             }
         },
+        cancal() {
+            this.info = {
+                Name: '',
+                Type: 'None',
+                Unit: '',
+                FillColor: '',
+                Url: ''
+            }
+        },
         mesg() {
             this.$emit('mesg')
         },
@@ -56,6 +66,7 @@ export default {
         },
         addSuccess() {
             this.$emit('addSuccess')
+            this.cancal()
         },
         save() {
             this.dialogVisible = false