จัดโค้ด
This commit is contained in:
parent
72373a1259
commit
c5168bd87a
3 changed files with 34 additions and 12 deletions
|
|
@ -25,6 +25,7 @@ const {
|
|||
dateToISO,
|
||||
dialogConfirm,
|
||||
} = mixin;
|
||||
|
||||
const route = useRoute();
|
||||
const assignId = ref<string>(route.params.form.toString());
|
||||
const { assign } = probationStore;
|
||||
|
|
@ -42,6 +43,7 @@ const apply_level = ref<number>(0);
|
|||
const success_level = ref<number>(0);
|
||||
const etc = ref<any>(false);
|
||||
const achievement_other = ref<any>({ text: "", level: 0 });
|
||||
|
||||
// part 2
|
||||
const conduct_level = ref<any>([]);
|
||||
const moral_level = ref<any>([]);
|
||||
|
|
@ -50,11 +52,13 @@ const etc2 = ref<any>(false); // checkBox 2.4
|
|||
const behavio_orther = ref<any>({ text: "", level: 0 });
|
||||
const behavio_strength_desc = ref<string>("");
|
||||
const behavior_improve_desc = ref<string>("");
|
||||
|
||||
// part 3
|
||||
const orientation = ref<any>(null);
|
||||
const self_learning = ref<any>(null);
|
||||
const training_seminar = ref<any>(null);
|
||||
const other_training = ref<any>(null);
|
||||
|
||||
//rules
|
||||
const behavio_strengthRef = ref<any>(null);
|
||||
const person = ref<any>([]);
|
||||
|
|
|
|||
|
|
@ -40,8 +40,7 @@ const Autherise = ref<any>(null);
|
|||
const dateAutherise = ref<any>(new Date());
|
||||
const option = ref<any>([]);
|
||||
|
||||
// part 1
|
||||
|
||||
/** part 1 */
|
||||
const skill_level = ref<number>(0);
|
||||
const competency_level = ref<number>(0);
|
||||
const learn_level = ref<number>(0);
|
||||
|
|
@ -49,7 +48,8 @@ const apply_level = ref<number>(0);
|
|||
const success_level = ref<number>(0);
|
||||
const etc = ref<any>(false);
|
||||
const achievement_other = ref<any>({ text: "", level: 0 });
|
||||
// part 2
|
||||
|
||||
/** part 2 */
|
||||
const conduct_level = ref<any>([]);
|
||||
const moral_level = ref<any>([]);
|
||||
const discipline_level = ref<any>([]);
|
||||
|
|
@ -70,7 +70,11 @@ const list2_1 = probationStore.behavior_no1;
|
|||
const list2_2 = probationStore.behavior_no2;
|
||||
const list2_3 = probationStore.behavior_no3;
|
||||
|
||||
const fecthAssign = async (id: string) => {
|
||||
/**
|
||||
* get ประเมิน
|
||||
* @param id
|
||||
*/
|
||||
async function fecthAssign(id: string){
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.evaluateCreate(id))
|
||||
|
|
@ -95,7 +99,7 @@ const fecthAssign = async (id: string) => {
|
|||
});
|
||||
};
|
||||
|
||||
// part 3
|
||||
/** part 3 */
|
||||
const alerts = Array(20)
|
||||
.fill(null)
|
||||
.map(() => ref<boolean>(false));
|
||||
|
|
@ -110,8 +114,8 @@ const lengthdiscipline_level = computed(() => {
|
|||
return discipline_level.value.filter((item: number) => item !== 0).length;
|
||||
});
|
||||
|
||||
//rules
|
||||
|
||||
/** rules */
|
||||
const behavio_strengthRules = [
|
||||
(val: any) => (val && val.length > 0) || "กรุณากรอกข้อมูลจุดเด่น",
|
||||
];
|
||||
|
|
@ -190,7 +194,8 @@ const savaForm = () => {
|
|||
}
|
||||
};
|
||||
|
||||
const putformData = () => {
|
||||
/** ฟังชั่น post data*/
|
||||
function putformData(){
|
||||
const data = {
|
||||
evaluate_no: evaluate_no.value,
|
||||
start_date: start_date.value,
|
||||
|
|
@ -236,11 +241,13 @@ const putformData = () => {
|
|||
});
|
||||
};
|
||||
|
||||
const getBordered = (i: boolean) => {
|
||||
/** ฟังชั่น คลาส css*/
|
||||
function getBordered(i: boolean){
|
||||
return {
|
||||
border_custom: i,
|
||||
};
|
||||
};
|
||||
|
||||
variablesToWatch.forEach((variable, index) => {
|
||||
watch(variable, (item: any) => {
|
||||
if (item !== 0) {
|
||||
|
|
@ -256,21 +263,25 @@ ArrayCountbotton.forEach((variable, index) => {
|
|||
}
|
||||
});
|
||||
});
|
||||
|
||||
watch(lengthconduct, (newLength) => {
|
||||
if (newLength === 4) {
|
||||
alerts[6].value = false;
|
||||
}
|
||||
});
|
||||
|
||||
watch(lengthmoral_level, (newLength) => {
|
||||
if (newLength === 3) {
|
||||
alerts[7].value = false;
|
||||
}
|
||||
});
|
||||
|
||||
watch(lengthdiscipline_level, (newLength) => {
|
||||
if (newLength === 5) {
|
||||
alerts[8].value = false;
|
||||
}
|
||||
});
|
||||
|
||||
onMounted(async () => {
|
||||
fecthAssign(assignId.value);
|
||||
});
|
||||
|
|
@ -296,12 +307,12 @@ onMounted(async () => {
|
|||
</div>
|
||||
</q-toolbar>
|
||||
<q-separator />
|
||||
|
||||
<q-card-section>
|
||||
<div class="row col-12 no-margin q-px-md q-pt-sm">
|
||||
<div class="toptitle text-dark col-12 row items-center">
|
||||
<div>แบบประเมินผล (ผู้บังคับบัญชา)</div>
|
||||
</div>
|
||||
|
||||
<div class="row col-12 q-gutter-lg">
|
||||
<div class="col-12 row">
|
||||
<div class="col-12 text-top0 row items-center">
|
||||
|
|
@ -310,19 +321,22 @@ onMounted(async () => {
|
|||
ผู้ทดลองปฏิบัติหน้าที่ราชการ {{ person.name }}
|
||||
</div>
|
||||
<div class="col-12 q-pl-md q-pb-md">
|
||||
<!-- <div class="col-12"><span class="text-top0 q-pl-sm">ตำแหน่ง</span> {{ person.Position }}</div> -->
|
||||
|
||||
<div class="col-12">
|
||||
<span class="text-top0 q-pl-sm">ตำแหน่งในสายงาน</span>
|
||||
{{ person.PositionLineName }}
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
<span class="text-top0 q-pl-sm">ระดับ</span>
|
||||
{{ person.PositionLevelName }}
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
<span class="text-top0 q-pl-sm">สังกัด</span> {{ person.Oc }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
|
||||
การทดลองปฎิบัติหน้าที่ราชการ<span class="text-primary q-pr-sm">{{
|
||||
"ครั้งที่ " + assign.round_no
|
||||
|
|
@ -336,6 +350,7 @@ onMounted(async () => {
|
|||
date2Thai(assign.date_finish)
|
||||
}}</span>
|
||||
</div>
|
||||
|
||||
<div class="col-12 text-top0 row items-center">
|
||||
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
|
||||
ประเมินผล
|
||||
|
|
@ -343,6 +358,7 @@ onMounted(async () => {
|
|||
"ครั้งที่ " + round
|
||||
}}</span>
|
||||
</div>
|
||||
|
||||
<div class="col-12 text-top0 row items-center">
|
||||
<div class="col-6 q-px-sm">
|
||||
<datepicker
|
||||
|
|
@ -383,6 +399,7 @@ onMounted(async () => {
|
|||
</template>
|
||||
</datepicker>
|
||||
</div>
|
||||
|
||||
<div class="col-6 q-px-sm">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
|
|
@ -423,6 +440,7 @@ onMounted(async () => {
|
|||
</datepicker>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 q-pt-md">
|
||||
<q-separator size="3px" color="grey-2" />
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -52,8 +52,8 @@ export const useComplainstDataStore = defineStore("DisciplineComplainst", () =>
|
|||
// filter options
|
||||
const complainantoptionsMain = ref<DataOption[]>([
|
||||
{ id: "0", name: "บุคคล" },
|
||||
{ id: "1", name: "หน่ายงาน" },
|
||||
{ id: "2", name: "กรุงเทพหมานคร" },
|
||||
{ id: "1", name: "หน่วยงาน" },
|
||||
{ id: "2", name: "กรุงเทพมหานคร" },
|
||||
]);
|
||||
const complainantoptions = ref<DataOption[]>(complainantoptionsMain.value)
|
||||
const agencytoptionsMain = ref<DataOption[]>([
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue