diff --git a/jeecgboot-vue3-master/src/views/annualcomp/uncommitted/AnnualComp.api.ts b/jeecgboot-vue3-master/src/views/annualcomp/uncommitted/AnnualComp.api.ts index e516b2a7..86bec4e2 100644 --- a/jeecgboot-vue3-master/src/views/annualcomp/uncommitted/AnnualComp.api.ts +++ b/jeecgboot-vue3-master/src/views/annualcomp/uncommitted/AnnualComp.api.ts @@ -1,12 +1,12 @@ -import {defHttp} from '/@/utils/http/axios'; -import { useMessage } from "/@/hooks/web/useMessage"; +import { defHttp } from '/@/utils/http/axios'; +import { useMessage } from '/@/hooks/web/useMessage'; const { createConfirm } = useMessage(); enum Api { list = '/annualcomp/annualComp/list', - save='/annualcomp/annualComp/add', - edit='/annualcomp/annualComp/edit', + save = '/annualcomp/annualComp/add', + edit = '/annualcomp/annualComp/edit', deleteOne = '/annualcomp/annualComp/delete', deleteBatch = '/annualcomp/annualComp/deleteBatch', importExcel = '/annualcomp/annualComp/importExcel', @@ -14,6 +14,7 @@ enum Api { submit = '/annualcomp/annualComp/submit', enable = '/annualcomp/annualComp/enable', deactivate = '/annualcomp/annualComp/deactivate', + bingProject = '/AnnualCompPoint/annualCompPoint/listByCid', } /** * 导出api @@ -28,32 +29,31 @@ export const getImportUrl = Api.importExcel; * 列表接口 * @param params */ -export const list = (params) => - defHttp.get({url: Api.list, params}); -export const submit = (params,handleSuccess) => { - return defHttp.get({url: Api.submit, params}, {joinParamsToUrl: true}).then(() => { +export const list = (params) => defHttp.get({ url: Api.list, params }); +export const submit = (params, handleSuccess) => { + return defHttp.get({ url: Api.submit, params }, { joinParamsToUrl: true }).then(() => { handleSuccess(); }); -} -export const enable = (params,handleSuccess) => { - return defHttp.get({url: Api.enable, params}, {joinParamsToUrl: true}).then(() => { +}; +export const enable = (params, handleSuccess) => { + return defHttp.get({ url: Api.enable, params }, { joinParamsToUrl: true }).then(() => { handleSuccess(); }); -} -export const deactivate = (params,handleSuccess) => { - return defHttp.get({url: Api.deactivate, params}, {joinParamsToUrl: true}).then(() => { +}; +export const deactivate = (params, handleSuccess) => { + return defHttp.get({ url: Api.deactivate, params }, { joinParamsToUrl: true }).then(() => { handleSuccess(); }); -} +}; /** * 删除单个 */ -export const deleteOne = (params,handleSuccess) => { - return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { +export const deleteOne = (params, handleSuccess) => { + return defHttp.delete({ url: Api.deleteOne, params }, { joinParamsToUrl: true }).then(() => { handleSuccess(); }); -} +}; /** * 批量删除 * @param params @@ -66,17 +66,21 @@ export const batchDelete = (params, handleSuccess) => { okText: '确认', cancelText: '取消', onOk: () => { - return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { + return defHttp.delete({ url: Api.deleteBatch, data: params }, { joinParamsToUrl: true }).then(() => { handleSuccess(); }); - } + }, }); -} +}; /** * 保存或者更新 * @param params */ export const saveOrUpdate = (params, isUpdate) => { let url = isUpdate ? Api.edit : Api.save; - return defHttp.post({url: url, params}); -} + return defHttp.post({ url: url, params }); +}; +// 绑定项目 +export const bingProjectApi = (params) => { + return defHttp.get({ url: Api.bingProject, params }); +}; diff --git a/jeecgboot-vue3-master/src/views/annualcomp/uncommitted/AnnualCompList.vue b/jeecgboot-vue3-master/src/views/annualcomp/uncommitted/AnnualCompList.vue index 714de756..340d19cf 100644 --- a/jeecgboot-vue3-master/src/views/annualcomp/uncommitted/AnnualCompList.vue +++ b/jeecgboot-vue3-master/src/views/annualcomp/uncommitted/AnnualCompList.vue @@ -43,6 +43,7 @@ @submitChange="handleSubmit" @enableChange="handleEnable" @deactivateChange="handleDeactivate" + @bindProjectChange="bindProject" />