Commit 83ed0627 authored by 刘宇扬's avatar 刘宇扬

入库

parent e3427136
......@@ -53,7 +53,7 @@
</template>
<script>
import { getDictData, addIncome } from '@/api/income'
import { add, updatadevice } from '@/api/magnagement'
export default {
name: 'Role',
......@@ -102,17 +102,40 @@ export default {
},
// 提交时要调的接口
submitForm() {
},
// 调数据字典查询
getDict() {
const obj = {
key: 'GX_CODE'
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)
}
})
} 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)
}
getDictData(obj).then(res => {
if (res.code === 200 && res.data !== null) {
this.pissbList = res.data
})
}
} else {
// 校验失败,显示错误信息或进行其他操作
}
})
},
// 调数据字典查询
getDict() {
}
}
}
......
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