Compare commits
No commits in common. "dev" and "v1.1.158" have entirely different histories.
4 changed files with 16 additions and 53 deletions
|
|
@ -56,7 +56,6 @@ const optionsStatus = ref<ExamResultOption[]>([
|
||||||
{ label: "ขาดสอบ", value: "missed_exam" },
|
{ label: "ขาดสอบ", value: "missed_exam" },
|
||||||
{ label: "ผ่าน", value: "pass" },
|
{ label: "ผ่าน", value: "pass" },
|
||||||
{ label: "ไม่ผ่าน", value: "notpass" },
|
{ label: "ไม่ผ่าน", value: "notpass" },
|
||||||
{ label: "อื่น ๆ", value: "other" },
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const emit = defineEmits([
|
const emit = defineEmits([
|
||||||
|
|
|
||||||
|
|
@ -97,8 +97,6 @@ const develop_result_option = ref<any>([
|
||||||
|
|
||||||
const isCheckFile = ref<boolean>(false);
|
const isCheckFile = ref<boolean>(false);
|
||||||
|
|
||||||
const isSelectionPartfour = ref<boolean>(false);
|
|
||||||
|
|
||||||
// score
|
// score
|
||||||
const score1 = computed(() => {
|
const score1 = computed(() => {
|
||||||
if (
|
if (
|
||||||
|
|
@ -214,21 +212,20 @@ const percent_sum: any = computed(() => {
|
||||||
});
|
});
|
||||||
const score4 = computed(() => {
|
const score4 = computed(() => {
|
||||||
return (
|
return (
|
||||||
Number(orientation.value) +
|
(Number(orientation.value) +
|
||||||
Number(self_learning.value) +
|
Number(self_learning.value) +
|
||||||
Number(training_seminar.value) +
|
Number(training_seminar.value) +
|
||||||
(isSelectionPartfour.value ? Number(other_training.value) : 0)
|
Number(other_training.value)) /
|
||||||
|
4
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
const score5 = computed(() => {
|
const score5 = computed(() => {
|
||||||
const rawTotal =
|
const total =
|
||||||
(Number(orientation_percent.value) +
|
(Number(orientation_percent.value) +
|
||||||
Number(self_learning_percent.value) +
|
Number(self_learning_percent.value) +
|
||||||
Number(training_seminar_percent.value) +
|
Number(training_seminar_percent.value) +
|
||||||
Number(other_training_percent.value)) /
|
Number(other_training_percent.value)) /
|
||||||
(isSelectionPartfour.value ? 4 : 3);
|
4;
|
||||||
|
|
||||||
const total = Math.trunc(rawTotal);
|
|
||||||
|
|
||||||
develop_result.value = total > 60 ? 1 : 0;
|
develop_result.value = total > 60 ? 1 : 0;
|
||||||
|
|
||||||
|
|
@ -1136,20 +1133,10 @@ onMounted(async () => {
|
||||||
<q-separator class="q-my-xs" />
|
<q-separator class="q-my-xs" />
|
||||||
<div class="row q-gutter-md align-center q-pl-md">
|
<div class="row q-gutter-md align-center q-pl-md">
|
||||||
<div class="col-8">
|
<div class="col-8">
|
||||||
<q-checkbox
|
|
||||||
class="q-mr-sm"
|
|
||||||
dense
|
|
||||||
v-model="isSelectionPartfour"
|
|
||||||
@update:model-value="
|
|
||||||
other_training = 0;
|
|
||||||
other_training_percent = 0;
|
|
||||||
"
|
|
||||||
/>
|
|
||||||
4. การอบรมอื่น ๆ ตามที่หน่วยงานกำหนด (ถ้ามี)
|
4. การอบรมอื่น ๆ ตามที่หน่วยงานกำหนด (ถ้ามี)
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<q-input
|
<q-input
|
||||||
:disable="!isSelectionPartfour"
|
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
type="number"
|
type="number"
|
||||||
|
|
@ -1161,7 +1148,6 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<q-input
|
<q-input
|
||||||
:disable="!isSelectionPartfour"
|
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
type="number"
|
type="number"
|
||||||
|
|
|
||||||
|
|
@ -90,8 +90,6 @@ const develop_result_option = ref<any>([
|
||||||
// footer
|
// footer
|
||||||
const dateAutherise = ref<any>(null);
|
const dateAutherise = ref<any>(null);
|
||||||
|
|
||||||
const isSelectionPartfour = ref<boolean>(false);
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
fecthAssign(assignId.value);
|
fecthAssign(assignId.value);
|
||||||
});
|
});
|
||||||
|
|
@ -241,21 +239,20 @@ const percent_sum: any = computed(() => {
|
||||||
});
|
});
|
||||||
const score4 = computed(() => {
|
const score4 = computed(() => {
|
||||||
return (
|
return (
|
||||||
Number(orientation.value) +
|
(Number(orientation.value) +
|
||||||
Number(self_learning.value) +
|
Number(self_learning.value) +
|
||||||
Number(training_seminar.value) +
|
Number(training_seminar.value) +
|
||||||
(isSelectionPartfour.value ? Number(other_training.value) : 0)
|
Number(other_training.value)) /
|
||||||
|
4
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
const score5 = computed(() => {
|
const score5 = computed(() => {
|
||||||
const rawTotal =
|
const total =
|
||||||
(Number(orientation_percent.value) +
|
(Number(orientation_percent.value) +
|
||||||
Number(self_learning_percent.value) +
|
Number(self_learning_percent.value) +
|
||||||
Number(training_seminar_percent.value) +
|
Number(training_seminar_percent.value) +
|
||||||
Number(other_training_percent.value)) /
|
Number(other_training_percent.value)) /
|
||||||
(isSelectionPartfour.value ? 4 : 3);
|
4;
|
||||||
|
|
||||||
const total = Math.trunc(rawTotal);
|
|
||||||
|
|
||||||
develop_result.value = total > 60 ? 1 : 0;
|
develop_result.value = total > 60 ? 1 : 0;
|
||||||
|
|
||||||
|
|
@ -1217,20 +1214,10 @@ watch(lengthdiscipline_level, (newLength) => {
|
||||||
<q-separator class="q-my-xs" />
|
<q-separator class="q-my-xs" />
|
||||||
<div class="row q-gutter-md align-center q-pl-md">
|
<div class="row q-gutter-md align-center q-pl-md">
|
||||||
<div class="col-8">
|
<div class="col-8">
|
||||||
<q-checkbox
|
|
||||||
class="q-mr-sm"
|
|
||||||
dense
|
|
||||||
v-model="isSelectionPartfour"
|
|
||||||
@update:model-value="
|
|
||||||
other_training = 0;
|
|
||||||
other_training_percent = 0;
|
|
||||||
"
|
|
||||||
/>
|
|
||||||
4. การอบรมอื่น ๆ ตามที่หน่วยงานกำหนด (ถ้ามี)
|
4. การอบรมอื่น ๆ ตามที่หน่วยงานกำหนด (ถ้ามี)
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<q-input
|
<q-input
|
||||||
:disable="!isSelectionPartfour"
|
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
type="number"
|
type="number"
|
||||||
|
|
@ -1244,7 +1231,6 @@ watch(lengthdiscipline_level, (newLength) => {
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
type="number"
|
type="number"
|
||||||
:disable="!isSelectionPartfour"
|
|
||||||
v-model="other_training_percent"
|
v-model="other_training_percent"
|
||||||
:rules="[(val:number) => val <= 100 || 'ร้อยละต้องไม่เกิน 100']"
|
:rules="[(val:number) => val <= 100 || 'ร้อยละต้องไม่เกิน 100']"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
|
|
|
||||||
|
|
@ -362,21 +362,13 @@ export const useCounterMixin = defineStore("mixin", () => {
|
||||||
const messageError = (q: any, e: any = "", msg: string = "") => {
|
const messageError = (q: any, e: any = "", msg: string = "") => {
|
||||||
if (e.response !== undefined) {
|
if (e.response !== undefined) {
|
||||||
if (e.response.data.status !== undefined) {
|
if (e.response.data.status !== undefined) {
|
||||||
if (
|
if (e.response.data.status == 401) {
|
||||||
e.response.data.status == 401 ||
|
|
||||||
(e.response.data.status == 404 &&
|
|
||||||
e.response.data.message == "ไม่พบข้อมูลสิทธิ์")
|
|
||||||
) {
|
|
||||||
//invalid_token
|
//invalid_token
|
||||||
const msg =
|
|
||||||
e.response.data.status == 401
|
|
||||||
? "ล็อกอินหมดอายุ กรุณาล็อกอินใหม่อีกครั้ง"
|
|
||||||
: e.response.data.message;
|
|
||||||
q.dialog({
|
q.dialog({
|
||||||
component: CustomComponent,
|
component: CustomComponent,
|
||||||
componentProps: {
|
componentProps: {
|
||||||
title: `พบข้อผิดพลาด`,
|
title: `พบข้อผิดพลาด`,
|
||||||
message: msg,
|
message: `ล็อกอินหมดอายุ กรุณาล็อกอินใหม่อีกครั้ง`,
|
||||||
icon: "warning",
|
icon: "warning",
|
||||||
color: "red",
|
color: "red",
|
||||||
onlycancel: true,
|
onlycancel: true,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue