fix avd bug

pull/24/head
StarsL.cn 2022-06-13 12:57:01 +08:00
parent d96c5db515
commit ecc61322fc
1 changed files with 6 additions and 4 deletions

View File

@ -24,7 +24,7 @@
<el-button @click="dialogFormVisible = false"> <el-button @click="dialogFormVisible = false">
取消 取消
</el-button> </el-button>
<el-button type="primary" @click="createData(avd_config)"> <el-button type="primary" @click="createData">
确认 确认
</el-button> </el-button>
</div> </div>
@ -63,7 +63,9 @@ export default {
handleCreate() { handleCreate() {
this.listLoading = true this.listLoading = true
getAvdConfig().then(response => { getAvdConfig().then(response => {
this.avd_config = response.avd_config if (Object.keys(response.avd_config).length !== 0) {
this.avd_config = response.avd_config
}
this.listLoading = false this.listLoading = false
this.dialogFormVisible = true this.dialogFormVisible = true
}) })
@ -75,12 +77,12 @@ export default {
this.listLoading = false this.listLoading = false
}) })
}, },
createData(avd_config) { createData() {
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (valid) {
this.dialogFormVisible = false this.dialogFormVisible = false
this.listLoading = true this.listLoading = true
postAvdJob(avd_config).then(response => { postAvdJob(this.avd_config).then(response => {
this.fetchData() this.fetchData()
this.$message({ this.$message({
message: response.data, message: response.data,