NEZ-717 fix: 修复param没回显的问题
This commit is contained in:
@@ -150,6 +150,7 @@ export default {
|
||||
components: { assetTagEx },
|
||||
data () {
|
||||
return {
|
||||
ready: false,
|
||||
editAssetMeta: {},
|
||||
rightBox: { // 面板弹出框相关
|
||||
show: false
|
||||
@@ -253,6 +254,9 @@ export default {
|
||||
},
|
||||
mounted () {
|
||||
this.getGroupData()
|
||||
setTimeout(() => {
|
||||
this.ready = true
|
||||
}, 500)
|
||||
},
|
||||
methods: {
|
||||
switchSearch (value) {
|
||||
@@ -369,12 +373,15 @@ export default {
|
||||
})
|
||||
},
|
||||
selectType (val, init) {
|
||||
if (init) {
|
||||
this.showParam = true
|
||||
} else {
|
||||
if (this.ready) {
|
||||
switch (val) {
|
||||
case 'RADIO' :
|
||||
case 'CHECKBOX' :
|
||||
case 'SELECT' :
|
||||
this.showParam = true
|
||||
if (init) return
|
||||
this.editAssetMeta.param = {}
|
||||
this.editAssetMeta.param.items = [{
|
||||
name: 'Option 1',
|
||||
@@ -386,7 +393,6 @@ export default {
|
||||
break
|
||||
case 'DATETIME' :
|
||||
this.showParam = true
|
||||
if (init) return
|
||||
this.editAssetMeta.param = {
|
||||
subType: 'date',
|
||||
interval: false
|
||||
@@ -394,7 +400,6 @@ export default {
|
||||
break
|
||||
case 'DOUBLE' :
|
||||
this.showParam = true
|
||||
if (init) return
|
||||
this.editAssetMeta.param = {
|
||||
decimals: 2
|
||||
}
|
||||
@@ -403,6 +408,8 @@ export default {
|
||||
this.showParam = false
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
inputChange (index, val) {
|
||||
this.$forceUpdate()
|
||||
|
||||
@@ -210,13 +210,13 @@ export default {
|
||||
let str = ''
|
||||
arr.forEach((item, index) => {
|
||||
if (index === 0) {
|
||||
str += `<div>DC <div class="active-icon inline-block ${item == '0' ? 'gray-bg' : 'green-bg'}"></div></div>`
|
||||
str += `<div><div class="active-icon inline-block ${item == '0' ? 'gray-bg' : 'green-bg'}"></div> DC</div>`
|
||||
}
|
||||
if (index === 1) {
|
||||
str += `<div>ASSET <div class="active-icon inline-block ${item == '0' ? 'gray-bg' : 'green-bg'}"></div></div>`
|
||||
str += `<div><div class="active-icon inline-block ${item == '0' ? 'gray-bg' : 'green-bg'}"></div> ASSET</div>`
|
||||
}
|
||||
if (index === 2) {
|
||||
str += `<div>ENDPOINT <div class="active-icon inline-block ${item == '0' ? 'gray-bg' : 'green-bg'}"></div></div>`
|
||||
str += `<div><div class="active-icon inline-block ${item == '0' ? 'gray-bg' : 'green-bg'}"></div> ENDPOINT</div>`
|
||||
}
|
||||
// if (index === 3) {
|
||||
// str += `<div>PROMETHEUS <div class="active-icon inline-block ${item == '0' ? 'red-bg' : 'green-bg'}"></div></div>`
|
||||
|
||||
@@ -239,8 +239,12 @@ export default {
|
||||
this.rightBox.metaShow = true
|
||||
},
|
||||
edit (row) {
|
||||
this.object = JSON.parse(JSON.stringify(row))
|
||||
this.$get(`${this.url}/${row.id}`).then(response => {
|
||||
if (response.code === 200) {
|
||||
this.object = response.data
|
||||
this.rightBox.metaShow = true
|
||||
}
|
||||
})
|
||||
},
|
||||
closeRightBox (refresh) {
|
||||
this.rightBox.metaShow = false
|
||||
|
||||
Reference in New Issue
Block a user