แก้ data probation
This commit is contained in:
parent
c776d4e7f1
commit
7c63c3c32c
22 changed files with 167 additions and 118 deletions
|
|
@ -203,8 +203,8 @@ async function getList() {
|
|||
}&pageSize=${pagination.value.rowsPerPage}`
|
||||
)
|
||||
.then(async (res) => {
|
||||
const data = await res.data.data.data;
|
||||
const resTotal = await res.data.data.total;
|
||||
const data = await res.data.result.data;
|
||||
const resTotal = await res.data.result.total;
|
||||
rows.value = data;
|
||||
totalList.value = Math.ceil(resTotal / pagination.value.rowsPerPage);
|
||||
total.value = resTotal;
|
||||
|
|
|
|||
|
|
@ -320,7 +320,7 @@ async function getData() {
|
|||
await http
|
||||
.get(config.API.appointMain + `/${id.value}`)
|
||||
.then(async (res) => {
|
||||
const data = await res.data.data;
|
||||
const data = await res.data.result;
|
||||
topic.value = data.topic;
|
||||
status.value = data.status;
|
||||
profileId.value = data.profileId;
|
||||
|
|
|
|||
|
|
@ -314,7 +314,7 @@ function deleteProductivitys(item: number) {
|
|||
*/
|
||||
async function getAssignNew(id: string) {
|
||||
await http.get(config.API.newAssign(id)).then((res: any) => {
|
||||
const data = res.data.data;
|
||||
const data = res.data.result;
|
||||
|
||||
const monthOption = {
|
||||
value: data.assign_month,
|
||||
|
|
@ -375,7 +375,7 @@ async function getCompetencyGroup(id: string) {
|
|||
});
|
||||
|
||||
// await http.get(config.API.competencyGroupOptions(id)).then((res: any) => {
|
||||
// const data = res.data.data;
|
||||
// const data = res.data.result;
|
||||
// OPgroup.value = data;
|
||||
// group.value = data[0];
|
||||
// group2.value = data[1];
|
||||
|
|
@ -389,7 +389,7 @@ async function getCompetencyGroup(id: string) {
|
|||
*/
|
||||
async function getKnowledge(id: string) {
|
||||
await http.get(config.API.knowledgeOptions(id)).then((res: any) => {
|
||||
OPknowledge.value = res.data.data;
|
||||
OPknowledge.value = res.data.result;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -399,7 +399,7 @@ async function getKnowledge(id: string) {
|
|||
*/
|
||||
async function getSkill(id: string) {
|
||||
await http.get(config.API.skillOptions(id)).then((res: any) => {
|
||||
const skillData = res.data.data;
|
||||
const skillData = res.data.result;
|
||||
OPcomputer.value = [skillData.computer];
|
||||
OPenglish.value = [skillData.english];
|
||||
OPinfomation.value = [skillData.information];
|
||||
|
|
@ -417,7 +417,7 @@ async function getSkill(id: string) {
|
|||
*/
|
||||
async function getLaw(id: string) {
|
||||
await http.get(config.API.lawOptions(id)).then((res: any) => {
|
||||
checkRule.value = res.data.data;
|
||||
checkRule.value = res.data.result;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -762,7 +762,7 @@ async function DataSave(id: string) {
|
|||
async function getAssign() {
|
||||
await http.get(config.API.probationsGetAssign(assignId.value)).then((res) => {
|
||||
isEdit.value = false;
|
||||
const data = res.data.data;
|
||||
const data = res.data.result;
|
||||
fullname.value = data.profile.name;
|
||||
appointTopic.value = data.assign.appointId;
|
||||
position.value = data.profile.positionName;
|
||||
|
|
@ -974,7 +974,7 @@ async function getAppoint(id: string) {
|
|||
http
|
||||
.get(config.API.appointMainList(id))
|
||||
.then((res) => {
|
||||
const data = res.data.data;
|
||||
const data = res.data.result;
|
||||
appointOp.value = data;
|
||||
appointAll.value = data;
|
||||
})
|
||||
|
|
|
|||
|
|
@ -106,14 +106,14 @@ async function fecthAssign() {
|
|||
await http
|
||||
.get(config.API.evaluateCreate(assignId.value))
|
||||
.then(async (res) => {
|
||||
await fecthAssignoutput(res.data.data);
|
||||
await fecthAssignoutput(res.data.result);
|
||||
// if (props.action == "add") {
|
||||
person.value = res.data.data.person;
|
||||
// option.value.push(res.data.data.commander);
|
||||
Autherise.value = res.data.data.director;
|
||||
evaluate_no.value = res.data.data.evaluate_no;
|
||||
start_date.value = res.data.data.start_date;
|
||||
date_finish.value = res.data.data.end_date;
|
||||
person.value = res.data.result.person;
|
||||
// option.value.push(res.data.result.commander);
|
||||
Autherise.value = res.data.result.director;
|
||||
evaluate_no.value = res.data.result.evaluate_no;
|
||||
start_date.value = res.data.result.start_date;
|
||||
date_finish.value = res.data.result.end_date;
|
||||
// }
|
||||
// Autherise.value = probationStore.director;
|
||||
})
|
||||
|
|
@ -300,7 +300,9 @@ onMounted(async () => {
|
|||
|
||||
<div v-if="status == false">
|
||||
<q-btn
|
||||
v-if="!checkRoutePermisson && probationStore.dataPermissions?.tab4.isEdit"
|
||||
v-if="
|
||||
!checkRoutePermisson && probationStore.dataPermissions?.tab4.isEdit
|
||||
"
|
||||
dense
|
||||
flat
|
||||
round
|
||||
|
|
|
|||
|
|
@ -177,13 +177,13 @@ async function fecthAssign(id: string) {
|
|||
await http
|
||||
.get(config.API.evaluateCreate(id))
|
||||
.then(async (res: any) => {
|
||||
person.value = res.data.data.person;
|
||||
assign.value = res.data.data.assign;
|
||||
Autherise.value = res.data.data.director;
|
||||
evaluate_no.value = res.data.data.evaluate_no;
|
||||
start_date.value = res.data.data.start_date;
|
||||
date_finish.value = res.data.data.end_date;
|
||||
round.value = res.data.data.evaluate_no;
|
||||
person.value = res.data.result.person;
|
||||
assign.value = res.data.result.assign;
|
||||
Autherise.value = res.data.result.director;
|
||||
evaluate_no.value = res.data.result.evaluate_no;
|
||||
start_date.value = res.data.result.start_date;
|
||||
date_finish.value = res.data.result.end_date;
|
||||
round.value = res.data.result.evaluate_no;
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
|
|||
|
|
@ -218,15 +218,15 @@ async function fecthAssign() {
|
|||
await http
|
||||
.get(config.API.evaluateChairman(assignId.value))
|
||||
.then(async (res: any) => {
|
||||
await fecthAssignoutput(res.data.data);
|
||||
assign.value = res.data.data.assign;
|
||||
evaluate_no.value = res.data.data.evaluate_no;
|
||||
start_date.value = res.data.data.start_date;
|
||||
date_finish.value = res.data.data.end_date;
|
||||
director_id.value = res.data.data.chairman;
|
||||
director_id2.value = res.data.data.commander;
|
||||
if (res.data.data.mentors.length != 0) {
|
||||
director_id3.value = res.data.data.mentors[0];
|
||||
await fecthAssignoutput(res.data.result);
|
||||
assign.value = res.data.result.assign;
|
||||
evaluate_no.value = res.data.result.evaluate_no;
|
||||
start_date.value = res.data.result.start_date;
|
||||
date_finish.value = res.data.result.end_date;
|
||||
director_id.value = res.data.result.chairman;
|
||||
director_id2.value = res.data.result.commander;
|
||||
if (res.data.result.mentors.length != 0) {
|
||||
director_id3.value = res.data.result.mentors[0];
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
|
|
@ -423,7 +423,10 @@ onMounted(async () => {
|
|||
<div>แบบประเมินผล (คณะกรรมการ)</div>
|
||||
<div v-if="status == false">
|
||||
<q-btn
|
||||
v-if="!checkRoutePermisson && probationStore.dataPermissions?.tab5.isEdit"
|
||||
v-if="
|
||||
!checkRoutePermisson &&
|
||||
probationStore.dataPermissions?.tab5.isEdit
|
||||
"
|
||||
dense
|
||||
flat
|
||||
round
|
||||
|
|
|
|||
|
|
@ -99,16 +99,16 @@ const fecthAssign = async (id: string) => {
|
|||
await http
|
||||
.get(config.API.evaluateChairman(id))
|
||||
.then(async (res: any) => {
|
||||
person.value = await res.data.data.person;
|
||||
assign.value = await res.data.data.assign;
|
||||
evaluate_no.value = await res.data.data.evaluate_no;
|
||||
start_date.value = await res.data.data.start_date;
|
||||
date_finish.value = await res.data.data.end_date;
|
||||
person.value = await res.data.result.person;
|
||||
assign.value = await res.data.result.assign;
|
||||
evaluate_no.value = await res.data.result.evaluate_no;
|
||||
start_date.value = await res.data.result.start_date;
|
||||
date_finish.value = await res.data.result.end_date;
|
||||
|
||||
director_id.value = res.data.data.chairman;
|
||||
director_id2.value = res.data.data.commander;
|
||||
if (res.data.data.mentors.length != 0) {
|
||||
director_id3.value = res.data.data.mentors[0];
|
||||
director_id.value = res.data.result.chairman;
|
||||
director_id2.value = res.data.result.commander;
|
||||
if (res.data.result.mentors.length != 0) {
|
||||
director_id3.value = res.data.result.mentors[0];
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
|
|
|
|||
|
|
@ -71,27 +71,27 @@ async function fecthAssign(id: string) {
|
|||
await http
|
||||
.get(config.API.evaluateReportcreate(id))
|
||||
.then((res) => {
|
||||
assign.value = res.data.data.assign;
|
||||
person.value = res.data.data.person;
|
||||
mentors.value = res.data.data.mentors;
|
||||
date_start.value = res.data.data.assign.date_start;
|
||||
date_finish.value = res.data.data.assign.date_finish;
|
||||
assign.value = res.data.result.assign;
|
||||
person.value = res.data.result.person;
|
||||
mentors.value = res.data.result.mentors;
|
||||
date_start.value = res.data.result.assign.date_start;
|
||||
date_finish.value = res.data.result.assign.date_finish;
|
||||
|
||||
if (
|
||||
res.data.data.result.develop_complete != null &&
|
||||
res.data.data.result.evaluate_result != null
|
||||
res.data.result.result.develop_complete != null &&
|
||||
res.data.result.result.evaluate_result != null
|
||||
) {
|
||||
develop.value = res.data.data.result.develop_complete;
|
||||
result.value = res.data.data.result.evaluate_result;
|
||||
changeReson52(Number(res.data.data.result.evaluate_result));
|
||||
develop.value = res.data.result.result.develop_complete;
|
||||
result.value = res.data.result.result.evaluate_result;
|
||||
changeReson52(Number(res.data.result.result.evaluate_result));
|
||||
}
|
||||
|
||||
director_id.value = res.data.data.chairman;
|
||||
director_id2.value = res.data.data.commander;
|
||||
director_id.value = res.data.result.chairman;
|
||||
director_id2.value = res.data.result.commander;
|
||||
if (mentors.value.length != 0) {
|
||||
director_id3.value = mentors.value[0];
|
||||
}
|
||||
commander.value = res.data.data.commander;
|
||||
commander.value = res.data.result.commander;
|
||||
optionDirector.value = mentors.value;
|
||||
})
|
||||
.catch((e) => {
|
||||
|
|
@ -109,8 +109,8 @@ const fecthResult = async (id: string) => {
|
|||
await http
|
||||
.get(config.API.createformReport(id))
|
||||
.then(async (res: any) => {
|
||||
if (res.data.data != null) {
|
||||
const data = await res.data.data.evaluate;
|
||||
if (res.data.result != null) {
|
||||
const data = await res.data.result.evaluate;
|
||||
ID.value = data.id;
|
||||
date_start.value = data.date_start;
|
||||
date_finish.value = data.date_finish;
|
||||
|
|
@ -336,7 +336,11 @@ onMounted(() => {
|
|||
:locale="'th'"
|
||||
autoApply
|
||||
borderless
|
||||
:readonly="!status || checkRoutePermisson || probationStore.dataPermissions?.tab6.isEdit == false"
|
||||
:readonly="
|
||||
!status ||
|
||||
checkRoutePermisson ||
|
||||
probationStore.dataPermissions?.tab6.isEdit == false
|
||||
"
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
>
|
||||
|
|
@ -350,7 +354,11 @@ onMounted(() => {
|
|||
<q-input
|
||||
outlined
|
||||
dense
|
||||
:readonly="!status || checkRoutePermisson || probationStore.dataPermissions?.tab6.isEdit == false"
|
||||
:readonly="
|
||||
!status ||
|
||||
checkRoutePermisson ||
|
||||
probationStore.dataPermissions?.tab6.isEdit == false
|
||||
"
|
||||
class="full-width datepicker"
|
||||
:model-value="
|
||||
date_start != null ? date2Thai(date_start) : null
|
||||
|
|
@ -377,7 +385,11 @@ onMounted(() => {
|
|||
v-model="date_finish"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
:readonly="!status || checkRoutePermisson || probationStore.dataPermissions?.tab6.isEdit == false"
|
||||
:readonly="
|
||||
!status ||
|
||||
checkRoutePermisson ||
|
||||
probationStore.dataPermissions?.tab6.isEdit == false
|
||||
"
|
||||
borderless
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
|
|
@ -429,7 +441,11 @@ onMounted(() => {
|
|||
class="col-xs-12 col-sm-6"
|
||||
dense
|
||||
borderless
|
||||
:readonly="!status || checkRoutePermisson || probationStore.dataPermissions?.tab6.isEdit == false"
|
||||
:readonly="
|
||||
!status ||
|
||||
checkRoutePermisson ||
|
||||
probationStore.dataPermissions?.tab6.isEdit == false
|
||||
"
|
||||
emit-value
|
||||
map-options
|
||||
option-label="label"
|
||||
|
|
@ -458,7 +474,11 @@ onMounted(() => {
|
|||
]"
|
||||
hide-bottom-space
|
||||
:options="optionsResult"
|
||||
:readonly="!status || checkRoutePermisson || probationStore.dataPermissions?.tab6.isEdit == false"
|
||||
:readonly="
|
||||
!status ||
|
||||
checkRoutePermisson ||
|
||||
probationStore.dataPermissions?.tab6.isEdit == false
|
||||
"
|
||||
dense
|
||||
borderless
|
||||
emit-value
|
||||
|
|
@ -501,7 +521,11 @@ onMounted(() => {
|
|||
dense
|
||||
borderless
|
||||
outlined
|
||||
:readonly="!status || checkRoutePermisson || probationStore.dataPermissions?.tab6.isEdit == false"
|
||||
:readonly="
|
||||
!status ||
|
||||
checkRoutePermisson ||
|
||||
probationStore.dataPermissions?.tab6.isEdit == false
|
||||
"
|
||||
class="bg-white"
|
||||
type="textarea"
|
||||
v-model="reson"
|
||||
|
|
@ -554,7 +578,11 @@ onMounted(() => {
|
|||
menu-class-name="modalfix"
|
||||
v-model="chairman_dated"
|
||||
:locale="'th'"
|
||||
:readonly="!status || checkRoutePermisson || probationStore.dataPermissions?.tab6.isEdit == false"
|
||||
:readonly="
|
||||
!status ||
|
||||
checkRoutePermisson ||
|
||||
probationStore.dataPermissions?.tab6.isEdit == false
|
||||
"
|
||||
autoApply
|
||||
borderless
|
||||
:enableTimePicker="false"
|
||||
|
|
@ -616,7 +644,11 @@ onMounted(() => {
|
|||
:locale="'th'"
|
||||
autoApply
|
||||
borderless
|
||||
:readonly="!status || checkRoutePermisson || probationStore.dataPermissions?.tab6.isEdit == false"
|
||||
:readonly="
|
||||
!status ||
|
||||
checkRoutePermisson ||
|
||||
probationStore.dataPermissions?.tab6.isEdit == false
|
||||
"
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
>
|
||||
|
|
@ -679,7 +711,11 @@ onMounted(() => {
|
|||
v-model="director2_dated"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
:readonly="!status || checkRoutePermisson || probationStore.dataPermissions?.tab6.isEdit == false"
|
||||
:readonly="
|
||||
!status ||
|
||||
checkRoutePermisson ||
|
||||
probationStore.dataPermissions?.tab6.isEdit == false
|
||||
"
|
||||
borderless
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
|
|
@ -723,7 +759,11 @@ onMounted(() => {
|
|||
|
||||
<q-toolbar
|
||||
class="text-primary"
|
||||
v-if="action == 'add' && !checkRoutePermisson && probationStore.dataPermissions?.tab6.isEdit"
|
||||
v-if="
|
||||
action == 'add' &&
|
||||
!checkRoutePermisson &&
|
||||
probationStore.dataPermissions?.tab6.isEdit
|
||||
"
|
||||
>
|
||||
<q-space />
|
||||
<q-btn label="บันทึก" color="secondary" @click="savaForm" />
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ async function fecthFormdata() {
|
|||
await http
|
||||
.get(config.API.formevaluateRecord(assignId.value))
|
||||
.then(async (res: any) => {
|
||||
await fecthAssignoutput(res.data.data);
|
||||
await fecthAssignoutput(res.data.result);
|
||||
await fectFormfull();
|
||||
})
|
||||
.catch((e: any) => {})
|
||||
|
|
@ -371,7 +371,9 @@ onMounted(async () => {
|
|||
<div>แบบบันทึกผล (ผู้ดูเเล)</div>
|
||||
<div v-if="status == false">
|
||||
<q-btn
|
||||
v-if="!checkRoutePermisson && probationStore.dataPermissions?.tab2.isEdit"
|
||||
v-if="
|
||||
!checkRoutePermisson && probationStore.dataPermissions?.tab2.isEdit
|
||||
"
|
||||
dense
|
||||
flat
|
||||
round
|
||||
|
|
|
|||
|
|
@ -142,27 +142,27 @@ async function fecthFormdata(id: string) {
|
|||
await http
|
||||
.get(config.API.formevaluateRecord(id))
|
||||
.then((res: any) => {
|
||||
evaluate_no.value = res.data.data.evaluate_no;
|
||||
start_date.value = res.data.data.start_date;
|
||||
date_finish.value = res.data.data.end_date;
|
||||
round.value = res.data.data.evaluate_no;
|
||||
evaluate_no.value = res.data.result.evaluate_no;
|
||||
start_date.value = res.data.result.start_date;
|
||||
date_finish.value = res.data.result.end_date;
|
||||
round.value = res.data.result.evaluate_no;
|
||||
|
||||
person.value = res.data.data.person;
|
||||
assign.value = res.data.data.assign;
|
||||
option.value.push(res.data.data.director);
|
||||
Autherise.value = res.data.data.director;
|
||||
person.value = res.data.result.person;
|
||||
assign.value = res.data.result.assign;
|
||||
option.value.push(res.data.result.director);
|
||||
Autherise.value = res.data.result.director;
|
||||
|
||||
list1_1.value = res.data.data.assign_output;
|
||||
res.data.data.assign_output.forEach((e: any) => {
|
||||
list1_1.value = res.data.result.assign_output;
|
||||
res.data.result.assign_output.forEach((e: any) => {
|
||||
list1_2.push({ id: "", label: "" });
|
||||
});
|
||||
evaluate_expenct_level.value = res.data.data.assign_output.map(
|
||||
evaluate_expenct_level.value = res.data.result.assign_output.map(
|
||||
(e: any) => ({
|
||||
id: e.id,
|
||||
labal: e.output_desc,
|
||||
})
|
||||
);
|
||||
evaluate_ouptut.value = res.data.data.assign_output.map((e: any) => ({
|
||||
evaluate_ouptut.value = res.data.result.assign_output.map((e: any) => ({
|
||||
id: e.id,
|
||||
text: "",
|
||||
}));
|
||||
|
|
|
|||
|
|
@ -224,27 +224,27 @@ async function fecthFormdata(id: string) {
|
|||
await http
|
||||
.get(config.API.formevaluateRecordCommander(id))
|
||||
.then((res: any) => {
|
||||
evaluate_no.value = res.data.data.evaluate_no;
|
||||
start_date.value = res.data.data.start_date;
|
||||
date_finish.value = res.data.data.end_date;
|
||||
round.value = res.data.data.evaluate_no;
|
||||
evaluate_no.value = res.data.result.evaluate_no;
|
||||
start_date.value = res.data.result.start_date;
|
||||
date_finish.value = res.data.result.end_date;
|
||||
round.value = res.data.result.evaluate_no;
|
||||
|
||||
person.value = res.data.data.person;
|
||||
assign.value = res.data.data.assign;
|
||||
option.value.push(res.data.data.director);
|
||||
Autherise.value = res.data.data.director;
|
||||
person.value = res.data.result.person;
|
||||
assign.value = res.data.result.assign;
|
||||
option.value.push(res.data.result.director);
|
||||
Autherise.value = res.data.result.director;
|
||||
|
||||
list1_1.value = res.data.data.assign_output;
|
||||
res.data.data.assign_output.forEach((e: any) => {
|
||||
list1_1.value = res.data.result.assign_output;
|
||||
res.data.result.assign_output.forEach((e: any) => {
|
||||
list1_2.push({ id: "", label: "" });
|
||||
});
|
||||
evaluate_expenct_level.value = res.data.data.assign_output.map(
|
||||
evaluate_expenct_level.value = res.data.result.assign_output.map(
|
||||
(e: any) => ({
|
||||
id: e.id,
|
||||
labal: e.output_desc,
|
||||
})
|
||||
);
|
||||
evaluate_ouptut.value = res.data.data.assign_output.map((e: any) => ({
|
||||
evaluate_ouptut.value = res.data.result.assign_output.map((e: any) => ({
|
||||
id: e.id,
|
||||
text: "",
|
||||
}));
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ async function fecthFormdata() {
|
|||
await http
|
||||
.get(config.API.formevaluateRecordCommander(assignId.value))
|
||||
.then(async (res: any) => {
|
||||
await fecthAssignoutput(res.data.data);
|
||||
await fecthAssignoutput(res.data.result);
|
||||
await fectFormfull();
|
||||
})
|
||||
.catch((e: any) => {})
|
||||
|
|
@ -378,7 +378,9 @@ onMounted(async () => {
|
|||
<div>แบบบันทึกผล (ผู้บังคับบัญชา)</div>
|
||||
<div v-if="status == false">
|
||||
<q-btn
|
||||
v-if="!checkRoutePermisson && probationStore.dataPermissions?.tab3.isEdit"
|
||||
v-if="
|
||||
!checkRoutePermisson && probationStore.dataPermissions?.tab3.isEdit
|
||||
"
|
||||
dense
|
||||
flat
|
||||
round
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ async function fecthAssign(id: string) {
|
|||
await http
|
||||
.get(config.API.formevaluate(id))
|
||||
.then(async (res: any) => {
|
||||
await fecthdataAssign(res.data.data);
|
||||
await fecthdataAssign(res.data.result);
|
||||
dataArrayNumber.value = 1;
|
||||
})
|
||||
.catch((e: any) => {
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ async function fecthAssign(id: string) {
|
|||
await http
|
||||
.get(config.API.formevaluateCommander(id))
|
||||
.then(async (res: any) => {
|
||||
await fecthdataAssign(res.data.data);
|
||||
await fecthdataAssign(res.data.result);
|
||||
// fullname.value = res.data.person ? res.data.person.name : "";
|
||||
dataArrayNumber.value = 1;
|
||||
})
|
||||
|
|
|
|||
|
|
@ -55,10 +55,10 @@ async function fecthAssign(id: string) {
|
|||
await http
|
||||
.get(config.API.createformCommader(id))
|
||||
.then(async (res: any) => {
|
||||
await fecthdataAssign(res.data.data);
|
||||
await fecthdataAssign(res.data.result);
|
||||
evaluate.value = probationStore.evaluate;
|
||||
tabs.value = evaluate.value;
|
||||
// fullname.value = res.data.data.person ? res.data.data.person.name : "";
|
||||
// fullname.value = res.data.result.person ? res.data.result.person.name : "";
|
||||
dataArrayNumber.value = 1;
|
||||
})
|
||||
.catch((e: any) => {
|
||||
|
|
@ -159,7 +159,7 @@ onMounted(() => {
|
|||
label="สร้างแบบประเมิน"
|
||||
@click="addData"
|
||||
:disable="probationStore.dataPermissions?.tab4.isEdit == false"
|
||||
/>
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -49,9 +49,9 @@ const fecthAssign = async (id: string) => {
|
|||
await http
|
||||
.get(config.API.createformChairman(id))
|
||||
.then(async (res: any) => {
|
||||
await fecthdataAssign(res.data.data);
|
||||
await fecthdataAssign(res.data.result);
|
||||
evaluate.value = probationStore.evaluate;
|
||||
// fullname.value = res.data.data.person ? res.data.data.person.name : "";
|
||||
// fullname.value = res.data.result.person ? res.data.result.person.name : "";
|
||||
tabs.value = evaluate.value;
|
||||
dataArrayNumber.value = 1;
|
||||
})
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ async function getData() {
|
|||
await http
|
||||
.get(config.API.appointMain)
|
||||
.then(async (res) => {
|
||||
const data = await res.data.data;
|
||||
const data = await res.data.result;
|
||||
rows.value = data;
|
||||
hideLoader();
|
||||
})
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ async function getPermissions() {
|
|||
await http
|
||||
.get(config.API.permissionsCheck(assignId.value))
|
||||
.then(async (res) => {
|
||||
const data = await res.data.data;
|
||||
const data = await res.data.result;
|
||||
DataStore.dataPermissions = data;
|
||||
})
|
||||
.catch((e) => {
|
||||
|
|
|
|||
|
|
@ -247,8 +247,8 @@ async function getpersonalList() {
|
|||
`?status=${fillter.value}&page=${pagination.value.page}&pageSize=${pagination.value.rowsPerPage}&keyword=${filterKeyword.value}`
|
||||
)
|
||||
.then(async (res) => {
|
||||
const data = await res.data.data.data;
|
||||
const resTotal = await res.data.data.total;
|
||||
const data = await res.data.result.data;
|
||||
const resTotal = await res.data.result.total;
|
||||
rows.value = data;
|
||||
fillterStatus.value = data;
|
||||
dataUpdate.value = rows.value;
|
||||
|
|
@ -378,7 +378,7 @@ async function clickClose() {
|
|||
function resetFilter() {
|
||||
filterKeyword.value = "";
|
||||
filterRef.value.focus();
|
||||
getSearchMain()
|
||||
getSearchMain();
|
||||
}
|
||||
|
||||
/** reset ฟิลเตอร์ ใน dialog */
|
||||
|
|
@ -435,7 +435,7 @@ function onSubmitAdd() {
|
|||
if (res) {
|
||||
closeAdd();
|
||||
hideLoader();
|
||||
router.push(`/probation/assign/${res.data.data}`);
|
||||
router.push(`/probation/assign/${res.data.result}`);
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
|
|
@ -459,9 +459,9 @@ function closeAdd() {
|
|||
topic.value = "แต่งตั้งคณะกรรมการประเมินผลการทดลองปฏิบัติหน้าที่ราชการ";
|
||||
}
|
||||
|
||||
function getSearchMain(){
|
||||
pagination.value.page = 1
|
||||
getpersonalList()
|
||||
function getSearchMain() {
|
||||
pagination.value.page = 1;
|
||||
getpersonalList();
|
||||
}
|
||||
|
||||
watch([() => formProbation.page, () => formProbation.pageSize], () => {
|
||||
|
|
@ -471,7 +471,7 @@ watch([() => formProbation.page, () => formProbation.pageSize], () => {
|
|||
watch(
|
||||
() => pagination.value.rowsPerPage,
|
||||
async () => {
|
||||
getSearchMain()
|
||||
getSearchMain();
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ async function getAssignList() {
|
|||
await http
|
||||
.get(config.API.probationGetAssignList(personalId.value))
|
||||
.then(async (res) => {
|
||||
const data = await res.data.data;
|
||||
const data = await res.data.result;
|
||||
rows.value = await data.map((item: FormProbationDetail) => ({
|
||||
id: item.id,
|
||||
round_no: item.round_no,
|
||||
|
|
@ -176,7 +176,7 @@ async function getpersonalList() {
|
|||
await http
|
||||
.get(config.API.personal(personalId.value))
|
||||
.then(async (res) => {
|
||||
const data = await res.data.data;
|
||||
const data = await res.data.result;
|
||||
name.value = data.name;
|
||||
position_line.value = data.position_line;
|
||||
position_level.value = data.position_level;
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ async function getReportScore() {
|
|||
await http
|
||||
.get(config.API.summaryReportDetail(assignId.value))
|
||||
.then((res) => {
|
||||
const data = res.data.data;
|
||||
const data = res.data.result;
|
||||
develop_orientation_score.value = data.develop_orientation_score;
|
||||
develop_self_learning_score.value = data.develop_self_learning_score;
|
||||
develop_training_seminar_score.value =
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ async function getList(id: string) {
|
|||
await http
|
||||
.get(config.API.probationGetAssignList(id))
|
||||
.then(async (res) => {
|
||||
const data = await res.data.data;
|
||||
const data = await res.data.result;
|
||||
rows.value = data;
|
||||
})
|
||||
.catch((e) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue