feat(fixcontact): 新增定点联系单前端页面
列表页含展开反馈记录子表,表单使用原生 Ant Design Vue 模式, 选人组件使用 DeptRoleUserSelectDropDown 按部门角色过滤。
This commit is contained in:
@@ -0,0 +1,75 @@
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
|
||||
const { createConfirm } = useMessage();
|
||||
|
||||
enum Api {
|
||||
list = '/bg/fixcontact/fixedContact20260730/list',
|
||||
save = '/bg/fixcontact/fixedContact20260730/add',
|
||||
edit = '/bg/fixcontact/fixedContact20260730/edit',
|
||||
deleteOne = '/bg/fixcontact/fixedContact20260730/delete',
|
||||
deleteBatch = '/bg/fixcontact/fixedContact20260730/deleteBatch',
|
||||
importExcel = '/bg/fixcontact/fixedContact20260730/importExcel',
|
||||
exportXls = '/bg/fixcontact/fixedContact20260730/exportXls',
|
||||
queryById = '/bg/fixcontact/fixedContact20260730/queryById',
|
||||
fixedContactFeedbackList = '/bg/fixcontact/fixedContact20260730/queryFixedContactFeedback20260730ByMainId',
|
||||
}
|
||||
|
||||
export const getExportUrl = Api.exportXls;
|
||||
export const getImportUrl = Api.importExcel;
|
||||
|
||||
export const list = (params) =>
|
||||
defHttp.get({ url: Api.list, params });
|
||||
|
||||
export const deleteOne = (params, handleSuccess) => {
|
||||
return defHttp.delete({ url: Api.deleteOne, params }, { joinParamsToUrl: true }).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
};
|
||||
|
||||
export const batchDelete = (params, handleSuccess) => {
|
||||
createConfirm({
|
||||
iconType: 'warning',
|
||||
title: '确认删除',
|
||||
content: '是否删除选中数据',
|
||||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
onOk: () => {
|
||||
return defHttp.delete({ url: Api.deleteBatch, data: params }, { joinParamsToUrl: true }).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
export const saveOrUpdate = (params, isUpdate) => {
|
||||
let url = isUpdate ? Api.edit : Api.save;
|
||||
return defHttp.post({ url: url, params }, { isTransformResponse: false });
|
||||
};
|
||||
|
||||
export const queryById = (id) =>
|
||||
defHttp.get({ url: Api.queryById, params: { id } });
|
||||
|
||||
export const fixedContactFeedbackList = (params) => {
|
||||
if (params['id']) {
|
||||
return defHttp.get({ url: Api.fixedContactFeedbackList, params });
|
||||
}
|
||||
return Promise.resolve([]);
|
||||
};
|
||||
|
||||
const BpmApi = {
|
||||
saveBpmForm: '/bg/fixcontact/fixedContact20260730/saveBpmForm',
|
||||
setBpmVariableLocal: '/act/process/setBpmVariableLocal',
|
||||
};
|
||||
|
||||
export const saveBpmForm = (params) => {
|
||||
return defHttp.post({ url: BpmApi.saveBpmForm, params }, { isTransformResponse: false });
|
||||
};
|
||||
|
||||
export const setBpmVariableLocal = (params) => {
|
||||
return defHttp.post({ url: BpmApi.setBpmVariableLocal, params }, { isTransformResponse: false });
|
||||
};
|
||||
|
||||
export const withDrawFixContact = (params) => {
|
||||
return defHttp.post({ url: '/bg/fixcontact/fixedContact20260730/withDrawFixContact', params }, { joinParamsToUrl: true, isTransformResponse: false });
|
||||
};
|
||||
Reference in New Issue
Block a user