Commit b475eaf3 authored by 高宇's avatar 高宇

Merge remote-tracking branch 'origin/project1' into project1

parents 3d05ad96 88a99261
......@@ -303,7 +303,11 @@ export default {
form: {
pn: '',
lot: '',
plocation: ''
plocation: '',
phd: '',
psm: '',
pzl: '',
prank: ''
},
defaultProps: {
children: 'children',
......
......@@ -54,7 +54,6 @@
<script>
import { add, updatadevice } from '@/api/magnagement'
export default {
name: 'Role',
data() {
......@@ -105,36 +104,40 @@ export default {
},
// 提交时要调的接口
submitForm() {
this.$refs.form.validate((valid) => {
if (valid) {
console.log('form', this.form)
// 校验通过,提交表单或进行其他操作
if (this.form.businessId !== undefined) {
updatadevice(this.form).then(res => {
if (res.code === 200) {
this.open = false
this.$message.success('操作成功')
this.getList()
this.reFrom()
} else if (res.code === null) {
this.$message.error(res.message)
}
})
this.$confirm('是否确认操作?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$refs.form.validate((valid) => {
if (valid) {
console.log('form', this.form)
// 校验通过,提交表单或进行其他操作
if (this.form.businessId !== undefined) {
updatadevice(this.form).then(res => {
if (res.code === 200) {
this.open = false
this.$message.success('操作成功')
this.resetFrom()
} else if (res.code === null) {
this.$message.error(res.message)
}
})
} else {
add(this.form).then(res => {
if (res.code === 200) {
this.open = false
this.$message.success('操作成功')
this.resetFrom()
} else if (res.code === null) {
this.$message.error(res.message)
}
})
}
} else {
add(this.form).then(res => {
if (res.code === 200) {
this.open = false
this.$message.success('操作成功')
this.getList()
this.reFrom()
} else if (res.code === null) {
this.$message.error(res.message)
}
})
// 校验失败,显示错误信息或进行其他操作
}
} else {
// 校验失败,显示错误信息或进行其他操作
}
})
})
},
// 调数据字典查询
......@@ -161,7 +164,7 @@ export default {
}
.button{
margin-top: 7%;
margin-left: 48%;
margin-left: 11%;
}
}
......
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