【更新】更改新增编辑表单时错误的写法 #I7CH2V #I6SVT3 #I6KOVG

pull/125/head
小诺 2023-07-07 01:06:24 +08:00 committed by 俞宝山
parent 666720ed96
commit 3f6e44001a
34 changed files with 34 additions and 34 deletions

View File

@ -32,7 +32,7 @@ export default {
},
// 提交表单 edit为true时为编辑默认为新增
submitForm(data, edit = false) {
return request(edit ? 'add' : 'edit', data)
return request(edit ? 'edit' : 'add', data)
},
// 删除机构
orgDelete(data) {

View File

@ -28,7 +28,7 @@ export default {
},
// 提交表单 edit为true时为编辑默认为新增
submitForm(data, edit = false) {
return request(edit ? 'add' : 'edit', data)
return request(edit ? 'edit' : 'add', data)
},
// 删除岗位
positionDelete(data) {

View File

@ -24,7 +24,7 @@ export default {
},
// 提交表单 edit为true时为编辑默认为新增
submitForm(data, edit = false) {
return request(edit ? 'add' : 'edit', data)
return request(edit ? 'edit' : 'add', data)
},
// 删除人员
userDelete(data) {

View File

@ -28,7 +28,7 @@ export default {
},
// 提交表单 edit为true时为编辑默认为新增
submitForm(data, edit = false) {
return request(edit ? 'add' : 'edit', data)
return request(edit ? 'edit' : 'add', data)
},
// 删除配置
configDelete(data) {

View File

@ -32,7 +32,7 @@ export default {
},
// 提交表单 edit为true时为编辑默认为新增
submitForm(data, edit = false) {
return request(edit ? 'add' : 'edit', data)
return request(edit ? 'edit' : 'add', data)
},
// 删除字典
dictDelete(data) {

View File

@ -28,7 +28,7 @@ export default {
},
// 提交表单 edit为true时为编辑默认为新增
submitForm(data, edit = false) {
return request(edit ? 'add' : 'edit', data)
return request(edit ? 'edit' : 'add', data)
},
// 删除定时任务
jobDelete(data) {

View File

@ -9,7 +9,7 @@ export default {
},
// 提交表单 edit为true时为编辑默认为新增
submitForm(data, edit = false) {
return request(edit ? 'add' : 'edit', data)
return request(edit ? 'edit' : 'add', data)
},
// 删除代码生成基础
basicDelete(data) {

View File

@ -9,7 +9,7 @@ export default {
},
// 提交表单 edit为true时为编辑默认为新增
submitForm(data, edit = false) {
return request(edit ? 'add' : 'edit', data)
return request(edit ? 'edit' : 'add', data)
},
// 删除代码生成详情配置
configDelete(data) {

View File

@ -24,7 +24,7 @@ export default {
},
// 提交表单 edit为true时为编辑默认为新增
mobileButtonSubmitForm(data, edit = false) {
return request(edit ? 'add' : 'edit', data)
return request(edit ? 'edit' : 'add', data)
},
// 删除按钮
mobileButtonDelete(data) {

View File

@ -19,7 +19,7 @@ export default {
},
// 提交移动端菜单表单 edit为true时为编辑默认为新增
mobileMenuSubmitForm(data, edit = false) {
return request(edit ? 'add' : 'edit', data)
return request(edit ? 'edit' : 'add', data)
},
// 更改菜单所属模块
mobileMenuChangeModule(data) {

View File

@ -24,7 +24,7 @@ export default {
},
// 提交表单 edit为true时为编辑默认为新增
submitForm(data, edit = false) {
return request(edit ? 'add' : 'edit', data)
return request(edit ? 'edit' : 'add', data)
},
// 删除类别
moduleDelete(data) {

View File

@ -32,7 +32,7 @@ export default {
},
// 提交表单 edit为true时为编辑默认为新增
submitForm(data, edit = false) {
return request(edit ? 'add' : 'edit', data)
return request(edit ? 'edit' : 'add', data)
},
// 删除组织
orgDelete(data) {

View File

@ -28,7 +28,7 @@ export default {
},
// 提交表单 edit为true时为编辑默认为新增
submitForm(data, edit = false) {
return request(edit ? 'add' : 'edit', data)
return request(edit ? 'edit' : 'add', data)
},
// 删除职位
positionDelete(data) {

View File

@ -24,7 +24,7 @@ export default {
},
// 提交表单 edit为true时为编辑默认为新增
submitForm(data, edit = false) {
return request(edit ? 'add' : 'edit', data)
return request(edit ? 'edit' : 'add', data)
},
// 删除按钮
buttonDelete(data) {

View File

@ -28,7 +28,7 @@ export default {
},
// 提交表单 edit为true时为编辑默认为新增
submitForm(data, edit = false) {
return request(edit ? 'add' : 'edit', data)
return request(edit ? 'edit' : 'add', data)
},
// 删除字段
fieldDelete(data) {

View File

@ -24,7 +24,7 @@ export default {
},
// 提交表单 edit为true时为编辑默认为新增
submitForm(data, edit = false) {
return request(edit ? 'add' : 'edit', data)
return request(edit ? 'edit' : 'add', data)
},
// 更改菜单所属模块
menuChangeModule(data) {

View File

@ -24,7 +24,7 @@ export default {
},
// 提交表单 edit为true时为编辑默认为新增
submitForm(data, edit = false) {
return request(edit ? 'add' : 'edit', data)
return request(edit ? 'edit' : 'add', data)
},
// 删除模块
moduleDelete(data) {

View File

@ -24,7 +24,7 @@ export default {
},
// 提交表单 edit为true时为编辑默认为新增
submitForm(data, edit = false) {
return request(edit ? 'add' : 'edit', data)
return request(edit ? 'edit' : 'add', data)
},
// 删除菜单
spaDelete(data) {

View File

@ -28,7 +28,7 @@ export default {
},
// 提交表单 edit为true时为编辑默认为新增
submitForm(data, edit = false) {
return request(edit ? 'add' : 'edit', data)
return request(edit ? 'edit' : 'add', data)
},
// 删除角色
roleDelete(data) {

View File

@ -24,7 +24,7 @@ export default {
},
// 提交表单 edit为true时为编辑默认为新增
submitForm(data, edit = false) {
return request(edit ? 'add' : 'edit', data)
return request(edit ? 'edit' : 'add', data)
},
// 删除用户
userDelete(data) {

View File

@ -153,7 +153,7 @@
submitLoading.value = true
formData.value.extJson = JSON.stringify(extJson.value)
bizOrgApi
.submitForm(formData.value, !formData.value.id)
.submitForm(formData.value, formData.value.id)
.then(() => {
visible = false
emit('successful')

View File

@ -108,7 +108,7 @@
.then(() => {
submitLoading.value = true
bizPositionApi
.submitForm(formData.value, !formData.value.id)
.submitForm(formData.value, formData.value.id)
.then(() => {
visible = false
emit('successful')

View File

@ -69,7 +69,7 @@
formRef.value.validate().then(() => {
submitLoading.value = true
configApi
.submitForm(formData.value, !formData.value.id)
.submitForm(formData.value, formData.value.id)
.then(() => {
onClose()
emit('successful')

View File

@ -111,7 +111,7 @@
//
const onSubmit = () => {
formRef.value.validate().then(() => {
dictApi.submitForm(formData.value, !formData.value.id).then(() => {
dictApi.submitForm(formData.value, formData.value.id).then(() => {
visible = false
emit('successful')
})

View File

@ -84,7 +84,7 @@
formRef.value.validate().then(() => {
submitLoading.value = true
jobApi
.submitForm(formData.value, !formData.value.id)
.submitForm(formData.value, formData.value.id)
.then(() => {
onClose()
emit('successful')

View File

@ -397,7 +397,7 @@
.then(() => {
submitLoading.value = true
genBasicApi
.submitForm(formData.value, !formData.value.id)
.submitForm(formData.value, formData.value.id)
.then((data) => {
resolve(data)
})

View File

@ -61,7 +61,7 @@
parentId: recordData.value.id
}
const param = Object.assign(defParam, formData.value)
buttonApi.mobileButtonSubmitForm(param, !formData.value.id).then(() => {
buttonApi.mobileButtonSubmitForm(param, formData.value.id).then(() => {
onClose()
emit('successful')
})

View File

@ -73,7 +73,7 @@
//
const onSubmit = () => {
formRef.value.validate().then(() => {
moduleApi.submitForm(formData.value, !formData.value.id).then(() => {
moduleApi.submitForm(formData.value, formData.value.id).then(() => {
onClose()
emit('successful')
})

View File

@ -151,7 +151,7 @@
submitLoading.value = true
formData.value.extJson = JSON.stringify(extJson.value)
orgApi
.submitForm(formData.value, !formData.value.id)
.submitForm(formData.value, formData.value.id)
.then(() => {
visible = false
emit('successful')

View File

@ -104,7 +104,7 @@
const onSubmit = () => {
formRef.value.validate().then(() => {
submitLoading.value = true
positionApi.submitForm(formData.value, !formData.value.id).then(() => {
positionApi.submitForm(formData.value, formData.value.id).then(() => {
visible = false
submitLoading.value = false
emit('successful')

View File

@ -64,7 +64,7 @@
parentId: recordData.value.id
}
const param = Object.assign(defParam, formData.value)
buttonApi.submitForm(param, !formData.value.id).then((res) => {
buttonApi.submitForm(param, formData.value.id).then((res) => {
onClose()
emit('successful')
})

View File

@ -69,7 +69,7 @@
parentId: recordData.value.id
}
const param = Object.assign(defParam, formData.value)
fieldApi.submitForm(param, !formData.value.id).then((res) => {
fieldApi.submitForm(param, formData.value.id).then((res) => {
onClose()
emit('successful')
})

View File

@ -73,7 +73,7 @@
//
const onSubmit = () => {
formRef.value.validate().then(() => {
moduleApi.submitForm(formData.value, !formData.value.id).then(() => {
moduleApi.submitForm(formData.value, formData.value.id).then(() => {
onClose()
emit('successful')
})

View File

@ -104,7 +104,7 @@
formRef.value.validate().then(() => {
submitLoading.value = true
roleApi
.submitForm(formData.value, !formData.value.id)
.submitForm(formData.value, formData.value.id)
.then(() => {
visible = false
emit('successful')