แก้ไขอุทธรณ์/ร้องทุกข์ => ปรับ API
This commit is contained in:
parent
d1b1701b58
commit
7d4af6044b
2 changed files with 26 additions and 16 deletions
|
|
@ -1,14 +1,24 @@
|
|||
import env from "../index"
|
||||
import env from "../index";
|
||||
|
||||
const appeal = `${env.API_URI}/discipline/complaint_appeal`
|
||||
const profile = `${env.API_URI}/profile/keycloak`
|
||||
const appeal = `${env.API_URI}/discipline/complaint_appeal`;
|
||||
const profile = `${env.API_URI}/profile/keycloak`;
|
||||
|
||||
export default {
|
||||
profileBykeycloak:()=>`${profile}`,
|
||||
appealMainList:(status: string, type: string, year: number, page: number, pageSize: number, keyword: string)=>`${appeal}/user?status=${status}&type=${type}&year=${year}&page=${page}&pageSize=${pageSize}&keyword=${keyword}`,
|
||||
appealAdd:()=>`${appeal}`,
|
||||
profileBykeycloak: () => `${profile}`,
|
||||
positionBykeycloak: () => `${env.API_URI}/org/profile/keycloak/position`,
|
||||
|
||||
appealByID:(id:string)=>`${appeal}/${id}`,
|
||||
appealMainList: (
|
||||
status: string,
|
||||
type: string,
|
||||
year: number,
|
||||
page: number,
|
||||
pageSize: number,
|
||||
keyword: string
|
||||
) =>
|
||||
`${appeal}/user?status=${status}&type=${type}&year=${year}&page=${page}&pageSize=${pageSize}&keyword=${keyword}`,
|
||||
appealAdd: () => `${appeal}`,
|
||||
|
||||
appealByPrintReport:(id:string)=>`${appeal}/report/${id}`
|
||||
}
|
||||
appealByID: (id: string) => `${appeal}/${id}`,
|
||||
|
||||
appealByPrintReport: (id: string) => `${appeal}/report/${id}`,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ const router = useRouter();
|
|||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin();
|
||||
|
||||
const { fails, success, messageError, showLoader, hideLoader } = mixin;
|
||||
const { findOrgName, success, messageError, showLoader, hideLoader } = mixin;
|
||||
|
||||
const formProfile = reactive<any>({
|
||||
profileId: "",
|
||||
|
|
@ -24,13 +24,13 @@ const formProfile = reactive<any>({
|
|||
function getProFile() {
|
||||
showLoader();
|
||||
http
|
||||
.get(config.API.profileBykeycloak())
|
||||
.get(config.API.positionBykeycloak())
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
formProfile.profileId = data.id;
|
||||
formProfile.profileId = data.profileId;
|
||||
formProfile.fullname = `${data.prefix}${data.firstName} ${data.lastName}`;
|
||||
formProfile.citizenId = data.citizenId;
|
||||
formProfile.oc = data.oc;
|
||||
formProfile.oc = findOrgName(data);
|
||||
formProfile.position = data.position;
|
||||
})
|
||||
.catch((e) => {
|
||||
|
|
@ -53,9 +53,9 @@ function onSubmit(data: any) {
|
|||
formData.append("title", data.title);
|
||||
formData.append("description", data.description);
|
||||
formData.append("type", data.type);
|
||||
formData.append("year", '');
|
||||
formData.append("caseType", '');
|
||||
formData.append("caseNumber", '');
|
||||
formData.append("year", "");
|
||||
formData.append("caseType", "");
|
||||
formData.append("caseNumber", "");
|
||||
formData.append("file", data.files);
|
||||
formData.append("oc", data.oc);
|
||||
formData.append("position", data.position);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue