修改判定是否有记录被选定的方法,更严谨一些
This commit is contained in:
@@ -178,6 +178,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
beforeInit() {
|
beforeInit() {
|
||||||
this.url = 'api/deploy'
|
this.url = 'api/deploy'
|
||||||
|
this.selectIndex = ''
|
||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
// 打开新增弹窗前做的操作
|
// 打开新增弹窗前做的操作
|
||||||
@@ -204,7 +205,7 @@ export default {
|
|||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
deploy() {
|
deploy() {
|
||||||
if (this.selectIndex === '') {
|
if (!this.selectIndex) {
|
||||||
this.$message.error('请先选择服务')
|
this.$message.error('请先选择服务')
|
||||||
} else {
|
} else {
|
||||||
this.$refs.deploy.dialog = true
|
this.$refs.deploy.dialog = true
|
||||||
@@ -212,7 +213,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
sysRestore() {
|
sysRestore() {
|
||||||
if (this.selectIndex === '') {
|
if (!this.selectIndex) {
|
||||||
this.$message.error('请先选择服务')
|
this.$message.error('请先选择服务')
|
||||||
} else {
|
} else {
|
||||||
this.$refs.sysRestore.dialog = true
|
this.$refs.sysRestore.dialog = true
|
||||||
@@ -227,7 +228,7 @@ export default {
|
|||||||
this.deployId = !row ? null : row.id
|
this.deployId = !row ? null : row.id
|
||||||
},
|
},
|
||||||
startServer() {
|
startServer() {
|
||||||
if (this.selectIndex === '') {
|
if (!this.selectIndex) {
|
||||||
this.$message.error('请先选择服务')
|
this.$message.error('请先选择服务')
|
||||||
} else {
|
} else {
|
||||||
this.crudMethod.startServer(JSON.stringify(this.currentRow))
|
this.crudMethod.startServer(JSON.stringify(this.currentRow))
|
||||||
@@ -239,7 +240,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
stopServer() {
|
stopServer() {
|
||||||
if (this.selectIndex === '') {
|
if (!this.selectIndex) {
|
||||||
this.$message.error('请先选择服务')
|
this.$message.error('请先选择服务')
|
||||||
} else {
|
} else {
|
||||||
this.crudMethod.stopServer(JSON.stringify(this.currentRow))
|
this.crudMethod.stopServer(JSON.stringify(this.currentRow))
|
||||||
@@ -251,7 +252,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
serverStatus() {
|
serverStatus() {
|
||||||
if (this.selectIndex === '') {
|
if (!this.selectIndex) {
|
||||||
this.$message.error('请先选择服务')
|
this.$message.error('请先选择服务')
|
||||||
} else {
|
} else {
|
||||||
this.crudMethod.serverStatus(JSON.stringify(this.currentRow))
|
this.crudMethod.serverStatus(JSON.stringify(this.currentRow))
|
||||||
|
|||||||
Reference in New Issue
Block a user