|
@@ -26,7 +26,7 @@
|
|
|
</div>
|
|
|
<div class='input-right' ref='graph' v-show='ruleForm.Type=="Zone" || ruleForm.Type=="Image" || ruleForm.Type =="Line"'>
|
|
|
<div v-show=' ruleForm.Type=="Image" && ruleForm.Url' class='input-right'>
|
|
|
- <img :src='`/serve/topology-wanda/Picture/query/${ruleForm.Url}`' alt />
|
|
|
+ <img :key='key' :src='`/serve/topology-wanda/Picture/query/${ruleForm.Url}`' alt />
|
|
|
<!-- {{ruleForm.Url}} -->
|
|
|
</div>
|
|
|
<canvas id='canvas' :width='canvasWidth' :height='canvasHeight' v-show='!(ruleForm.Type=="Image" && ruleForm.Url)'></canvas>
|
|
@@ -215,7 +215,8 @@ export default {
|
|
|
typeVisualization: [],
|
|
|
|
|
|
// majorList: [], //专业
|
|
|
- deviceList: []
|
|
|
+ deviceList: [],
|
|
|
+ key: 1
|
|
|
}
|
|
|
},
|
|
|
props: ['ruleForm', 'title'],
|
|
@@ -231,6 +232,8 @@ export default {
|
|
|
// //console.log(file, fileList, 'file')
|
|
|
},
|
|
|
getFile(file) {
|
|
|
+ // let imgSrc = document.querySelector('.input-right>img')
|
|
|
+ // console.log(imgSrc)
|
|
|
this.file = file.file
|
|
|
var formData = new FormData()
|
|
|
formData.append('file', file.file)
|
|
@@ -240,6 +243,7 @@ export default {
|
|
|
let postParams = formData
|
|
|
uploadImg({ postParams }).then(res => {
|
|
|
if (res.Result == 'success') {
|
|
|
+ this.key++
|
|
|
this.$set(this.ruleForm, 'Url', res.EntityList[0])
|
|
|
this.$message.success('图标上传成功!')
|
|
|
}
|
|
@@ -250,7 +254,6 @@ export default {
|
|
|
let postParams = {
|
|
|
Content: [this.ruleForm]
|
|
|
}
|
|
|
-
|
|
|
createLegend({ postParams }).then(res => {
|
|
|
if (res.Result == 'success') {
|
|
|
this.$message.success('添加图例成功!')
|
|
@@ -502,6 +505,10 @@ export default {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
+ img {
|
|
|
+ width: 28px;
|
|
|
+ height: 28px;
|
|
|
+ }
|
|
|
.model1 {
|
|
|
width: 56px;
|
|
|
height: 6px;
|