diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java index 2d4dc70a..82853457 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java @@ -393,6 +393,29 @@ public class AnnualCompPointController extends JeecgController edit1(@RequestBody AnnualCompPoint annualCompPoint) { + + boolean isUpdate = annualCompPointService.updateById(annualCompPoint); + + + + if (!isUpdate){ + return Result.error("编辑失败!"); + } else { + return Result.OK("编辑成功!"); + } + } + /** * 通过id删除 * diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java index 682ec7b7..4c9424e8 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java @@ -966,7 +966,7 @@ public class AnnualCompetitionProjectRegistrationController { if (!one.getEnrollStatic().equals("3")) { AnnualCompetitionProjectRegistration a = new AnnualCompetitionProjectRegistration(); a.setId(id); - a.setEnrollStatic("3"); + a.setEnrollStatic("4"); annualCompetitionProjectRegistrationService.updateById(a); return Result.OK("已申请驳回!"); } diff --git a/jeecgboot-vue3-master/src/views/annualCompPoint/committee/AnnualCompPoint.api.ts b/jeecgboot-vue3-master/src/views/annualCompPoint/committee/AnnualCompPoint.api.ts index 9a30ef48..89ed9b11 100644 --- a/jeecgboot-vue3-master/src/views/annualCompPoint/committee/AnnualCompPoint.api.ts +++ b/jeecgboot-vue3-master/src/views/annualCompPoint/committee/AnnualCompPoint.api.ts @@ -7,6 +7,7 @@ enum Api { list = '/AnnualCompPoint/annualCompPoint/list', save='/AnnualCompPoint/annualCompPoint/add', edit='/AnnualCompPoint/annualCompPoint/edit', + edit1='/AnnualCompPoint/annualCompPoint/edit1', deleteOne = '/AnnualCompPoint/annualCompPoint/delete', deleteBatch = '/AnnualCompPoint/annualCompPoint/deleteBatch', importExcel = '/AnnualCompPoint/annualCompPoint/importExcel', @@ -106,6 +107,11 @@ export const saveOrUpdate = (params, isUpdate) => { return defHttp.post({ url: url, params }, { isTransformResponse: false }); } +export const saveOrUpdate1 = (params, isUpdate) => { + let url = isUpdate ? Api.edit1 : Api.save; + return defHttp.post({ url: url, params }, { isTransformResponse: false }); +} + /** * 提交或申请修改 * @param params diff --git a/jeecgboot-vue3-master/src/views/annualCompPoint/committee/components/AnnualCompPointFormscgl.vue b/jeecgboot-vue3-master/src/views/annualCompPoint/committee/components/AnnualCompPointFormscgl.vue index 1d164c65..0050dd72 100644 --- a/jeecgboot-vue3-master/src/views/annualCompPoint/committee/components/AnnualCompPointFormscgl.vue +++ b/jeecgboot-vue3-master/src/views/annualCompPoint/committee/components/AnnualCompPointFormscgl.vue @@ -226,7 +226,7 @@ import JSwitch from '/@/components/Form/src/jeecg/components/JSwitch.vue'; import JSelectMultiple from '/@/components/Form/src/jeecg/components/JSelectMultiple.vue'; import JPopup from '/@/components/Form/src/jeecg/components/JPopup.vue'; import {getValueType} from '/@/utils'; -import {saveOrUpdate} from '../AnnualCompPoint.api'; +import {saveOrUpdate1} from '../AnnualCompPoint.api'; import {Form} from 'ant-design-vue'; const props = defineProps({ @@ -367,7 +367,7 @@ async function submitForm() { } } } - await saveOrUpdate(model, isUpdate.value) + await saveOrUpdate1(model, isUpdate.value) .then((res) => { if (res.success) { createMessage.success(res.message);