แก้ไขอุทธรณ์/ร้องทุกข์ => ปรับ 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 appeal = `${env.API_URI}/discipline/complaint_appeal`;
|
||||||
const profile = `${env.API_URI}/profile/keycloak`
|
const profile = `${env.API_URI}/profile/keycloak`;
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
profileBykeycloak:()=>`${profile}`,
|
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}`,
|
positionBykeycloak: () => `${env.API_URI}/org/profile/keycloak/position`,
|
||||||
appealAdd:()=>`${appeal}`,
|
|
||||||
|
|
||||||
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 $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
|
|
||||||
const { fails, success, messageError, showLoader, hideLoader } = mixin;
|
const { findOrgName, success, messageError, showLoader, hideLoader } = mixin;
|
||||||
|
|
||||||
const formProfile = reactive<any>({
|
const formProfile = reactive<any>({
|
||||||
profileId: "",
|
profileId: "",
|
||||||
|
|
@ -24,13 +24,13 @@ const formProfile = reactive<any>({
|
||||||
function getProFile() {
|
function getProFile() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.profileBykeycloak())
|
.get(config.API.positionBykeycloak())
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
formProfile.profileId = data.id;
|
formProfile.profileId = data.profileId;
|
||||||
formProfile.fullname = `${data.prefix}${data.firstName} ${data.lastName}`;
|
formProfile.fullname = `${data.prefix}${data.firstName} ${data.lastName}`;
|
||||||
formProfile.citizenId = data.citizenId;
|
formProfile.citizenId = data.citizenId;
|
||||||
formProfile.oc = data.oc;
|
formProfile.oc = findOrgName(data);
|
||||||
formProfile.position = data.position;
|
formProfile.position = data.position;
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
|
@ -53,9 +53,9 @@ function onSubmit(data: any) {
|
||||||
formData.append("title", data.title);
|
formData.append("title", data.title);
|
||||||
formData.append("description", data.description);
|
formData.append("description", data.description);
|
||||||
formData.append("type", data.type);
|
formData.append("type", data.type);
|
||||||
formData.append("year", '');
|
formData.append("year", "");
|
||||||
formData.append("caseType", '');
|
formData.append("caseType", "");
|
||||||
formData.append("caseNumber", '');
|
formData.append("caseNumber", "");
|
||||||
formData.append("file", data.files);
|
formData.append("file", data.files);
|
||||||
formData.append("oc", data.oc);
|
formData.append("oc", data.oc);
|
||||||
formData.append("position", data.position);
|
formData.append("position", data.position);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue