更新细节

This commit is contained in:
yaooo 2023-12-06 11:19:30 +08:00
parent bed415a1e5
commit ffef7fc1db
1 changed files with 6 additions and 7 deletions

View File

@ -23,7 +23,7 @@
filterable
placeholder="请输入用户信息"
:remote-method="queryUser"
@blur="selectedUser"
@change="selectedUser"
:loading="loading"
>
<el-option
@ -42,7 +42,6 @@
filterable
placeholder="请输入土地信息"
:remote-method="queryLand"
@focus="selectedLand"
:loading="loading"
>
<el-option
@ -155,6 +154,7 @@ const queryUser = async (query: string) => {
const selectedUser = (value: any) => {
optionsData.land = []
formData.land_id = ''
queryLand(value)
}
const queryLand = async (user_id: string) => {
@ -167,10 +167,6 @@ const queryLand = async (user_id: string) => {
loading.value = false
}
const selectedLand = () => {
queryLand(formData.user_id)
}
//
const handleSubmit = async () => {
await formRef.value?.validate()
@ -192,11 +188,14 @@ const generateUuid = () => {
const open = (type = 'add') => {
mode.value = type
popupRef.value?.open()
formData.code = generateUuid()
formData.code = generateUuid()
getUserInfo()
.then((res: any) => {
const root = res.user.root ?? 0
formData.root = root
if (type == 'edit') {
queryLand(formData.user_id)
}
})
.catch((err: any) => {
console.log('err', err)