Commit fe6b48d0 authored by derong.zhang's avatar derong.zhang

权限问题

parent c0cb1f87
...@@ -146,7 +146,7 @@ ...@@ -146,7 +146,7 @@
<div class="updatetestclass"> <div class="updatetestclass">
<p> <p>
<span>当前权重:{{afterupdataweight}}</span> <span>当前权重:{{afterupdataweight}}</span>
<span style="margin-left:30px">修改权重:<Input v-model="updateweight" style="width: 200px"/></span> <span style="margin-left:30px">修改权重:<Input v-model="updateweight" type="number" style="width: 200px"/></span>
</p> </p>
</div> </div>
<div class="rollbackdivbtn"> <div class="rollbackdivbtn">
...@@ -196,7 +196,7 @@ ...@@ -196,7 +196,7 @@
</div> </div>
<div class="rollbackdivbtn"> <div class="rollbackdivbtn">
<Button type="primary" size='small' style="margin:0 20px" @click="ContrastnodeModal = false">取消</Button> <Button type="primary" size='small' style="margin:0 20px" @click="ContrastnodeModal = false">取消</Button>
<Button type="primary" size='small' @click="confirnode">发布</Button> <Button type="primary" size='small' @click="confirnode" :disabled='disabled' >发布</Button>
</div> </div>
</Modal> </Modal>
</div> </div>
...@@ -218,6 +218,7 @@ export default { ...@@ -218,6 +218,7 @@ export default {
colorupdata: false, colorupdata: false,
ContrastModal: false, ContrastModal: false,
changedivModal: false, changedivModal: false,
disabled: false,
testdiv: false, testdiv: false,
contrastlist: [], contrastlist: [],
logDataorigen: [], logDataorigen: [],
...@@ -743,6 +744,45 @@ export default { ...@@ -743,6 +744,45 @@ export default {
this.ContrastModal = false this.ContrastModal = false
this.ContrasttestModal = false this.ContrasttestModal = false
this.contrastlist = this.logDataorigen this.contrastlist = this.logDataorigen
} else {
this.$Message.error(data.body)
this.ContrastModal = false
this.ContrasttestModal = false
this.colorupdata = false
this.colorupdatacolor = false
this.getnodeList()
if (this.key === 'test_mode') {
let data = {
key: this.key,
service_name: this.server
}
getconfigurelist(data).then(data => {
this.testmostatus = data.body
this.aftertestmostatuorigen = data.body
if (data.body === true) {
this.opentest = true
this.closetest = false
} else {
this.closetest = true
this.opentest = false
}
})
} else {
this.logData = []
this.contrastlist = []
let data = {
key: this.key,
service_name: this.server
}
getconfigurelist(data).then(data => {
data.body.map(item => {
this.contrastlist.push(item)
this.logData.push({
sort: item
})
})
})
}
} }
}) })
}, },
...@@ -792,6 +832,7 @@ export default { ...@@ -792,6 +832,7 @@ export default {
this.ContrastnodeModal = true this.ContrastnodeModal = true
}, },
confirnode () { confirnode () {
this.disabled = true
let params = { let params = {
node_id: this.nodeupdataid, node_id: this.nodeupdataid,
service_name: this.server service_name: this.server
...@@ -805,8 +846,14 @@ export default { ...@@ -805,8 +846,14 @@ export default {
this.nodeData[this.updatenodeIndex].updatacolorclass = false this.nodeData[this.updatenodeIndex].updatacolorclass = false
this.nodeData = this.nodeData.slice() this.nodeData = this.nodeData.slice()
this.changeserverlist = false this.changeserverlist = false
this.disabled = false
} else { } else {
this.$Message.error(data.body) this.$Message.error(data.body)
this.colorupdatacolor = false
this.ContrastnodeModal = false
this.getnodeList()
this.changeserverlist = false
this.disabled = false
} }
}) })
}, },
...@@ -920,6 +967,10 @@ export default { ...@@ -920,6 +967,10 @@ export default {
this.changedivModal = false this.changedivModal = false
}, },
confireupdatenode () { confireupdatenode () {
if (this.updateweight == 0 || this.updateweight < 0) {
this.$Message.error('只能输入正整数')
return false
}
this.nodeData[this.updatenodeIndex].Meta.weight = this.updateweight this.nodeData[this.updatenodeIndex].Meta.weight = this.updateweight
this.nodeData[this.updatenodeIndex].updatacolorclass = true this.nodeData[this.updatenodeIndex].updatacolorclass = true
this.changeserverlist = true this.changeserverlist = true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment