รายการโครงการ
This commit is contained in:
parent
62bb318858
commit
ec36ffe6ba
9 changed files with 211 additions and 38 deletions
|
|
@ -20,10 +20,13 @@ export default {
|
||||||
/** ทุนการศึกษา/ฝึกอบรม*/
|
/** ทุนการศึกษา/ฝึกอบรม*/
|
||||||
devScholarship,
|
devScholarship,
|
||||||
devScholarshipByid: (id: string) => `${devScholarship}/${id}`,
|
devScholarshipByid: (id: string) => `${devScholarship}/${id}`,
|
||||||
|
devScholarshipStatus: (id: string, status: string) =>
|
||||||
|
`${devScholarship}/${id}/${status}`,
|
||||||
|
|
||||||
/** download File */
|
/** download File */
|
||||||
developmentReportMain:() =>`${developmentReport}/main`,
|
developmentReportMain: () => `${developmentReport}/main`,
|
||||||
developmentReportHistory:() =>`${developmentReport}/history-officer`,
|
developmentReportHistory: () => `${developmentReport}/history-officer`,
|
||||||
developmentReportHistoryOfficer:() =>`${developmentReport}/history-employee`,
|
developmentReportHistoryOfficer: () =>
|
||||||
developmentReportScholarship:() =>`${developmentReport}/scholarship`,
|
`${developmentReport}/history-employee`,
|
||||||
|
developmentReportScholarship: () => `${developmentReport}/scholarship`,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ const formData = reactive<FormCompetency>({
|
||||||
competencyType: "",
|
competencyType: "",
|
||||||
competencyName: "",
|
competencyName: "",
|
||||||
definition: "",
|
definition: "",
|
||||||
level_1: "",
|
level_1: ["", "", "", "", "", ""],
|
||||||
level_2: "",
|
level_2: "",
|
||||||
level_3: "",
|
level_3: "",
|
||||||
level_4: "",
|
level_4: "",
|
||||||
|
|
@ -42,8 +42,27 @@ const competencyTypeOp = ref<DataOption[]>([
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
const itemsFormCard = ref<any>([
|
||||||
|
{
|
||||||
|
id: "",
|
||||||
|
name: "",
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
|
function ocClickAdd() {
|
||||||
|
if (itemsFormCard.value.length !== 6) {
|
||||||
|
const data = {
|
||||||
|
id: "",
|
||||||
|
name: "",
|
||||||
|
};
|
||||||
|
itemsFormCard.value.push(data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/** บันทึก */
|
/** บันทึก */
|
||||||
function onSubmit() {}
|
function onSubmit() {
|
||||||
|
console.log(formData);
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -102,36 +121,151 @@ function onSubmit() {}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-card flat bordered>
|
<q-card flat bordered>
|
||||||
<q-item-section class="bg-grey-4">
|
<q-card-section class="bg-grey-4">
|
||||||
<div
|
<div
|
||||||
class="row items-center text-dark text-body2 text-weight-medium"
|
class="row items-center text-dark text-body2 text-weight-medium"
|
||||||
>
|
>
|
||||||
<div class="col-3 text-center">
|
<div class="col-3">
|
||||||
<span>ระดับสมรรถนะ</span>
|
<div class="row items-center">
|
||||||
|
<div class="col-1">
|
||||||
|
<q-btn
|
||||||
|
dense
|
||||||
|
flat
|
||||||
|
round
|
||||||
|
color="primary"
|
||||||
|
icon="add"
|
||||||
|
@click="ocClickAdd"
|
||||||
|
>
|
||||||
|
<q-tooltip>เพิ่ม</q-tooltip></q-btn
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="col-11 text-center">
|
||||||
|
<span>ระดับสมรรถนะ</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-9">
|
<div class="col-4">
|
||||||
<span>คำอธิบายระดับ/พฤติกรรมที่คาดหวัง/พฤติกรรมย่อย</span>
|
<span>คำอธิบายระดับ/พฤติกรรมที่คาดหวัง/พฤติกรรมย่อย</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-item-section>
|
</q-card-section>
|
||||||
<q-separator />
|
<q-card-section>
|
||||||
<q-item-section>
|
<div
|
||||||
<div class="row q-pa-sm">
|
class="row q-pa-sm"
|
||||||
|
v-for="(items, index) in itemsFormCard"
|
||||||
|
key="index"
|
||||||
|
>
|
||||||
<div
|
<div
|
||||||
class="col-3 text-center self-center text-body1 text-weight-medium"
|
class="col-3 text-center self-center text-body1 text-weight-medium"
|
||||||
>
|
>
|
||||||
<span>1</span>
|
<span>{{ index + 1 }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-9">
|
<div class="col-9">
|
||||||
<q-input
|
<!-- <q-input
|
||||||
v-model="formData.level_1"
|
v-model="formData.level_1"
|
||||||
label="คำอธิบาย"
|
label="คำอธิบาย"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
|
/> -->
|
||||||
|
<q-editor
|
||||||
|
v-model="formData.level_1[index]"
|
||||||
|
:dense="$q.screen.lt.md"
|
||||||
|
:toolbar="[
|
||||||
|
[
|
||||||
|
{
|
||||||
|
label: $q.lang.editor.align,
|
||||||
|
icon: $q.iconSet.editor.align,
|
||||||
|
fixedLabel: true,
|
||||||
|
list: 'only-icons',
|
||||||
|
options: ['left', 'center', 'right', 'justify'],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: $q.lang.editor.align,
|
||||||
|
icon: $q.iconSet.editor.align,
|
||||||
|
fixedLabel: true,
|
||||||
|
options: ['left', 'center', 'right', 'justify'],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'bold',
|
||||||
|
'italic',
|
||||||
|
'strike',
|
||||||
|
'underline',
|
||||||
|
'subscript',
|
||||||
|
'superscript',
|
||||||
|
],
|
||||||
|
['token', 'hr', 'link', 'custom_btn'],
|
||||||
|
['print', 'fullscreen'],
|
||||||
|
[
|
||||||
|
{
|
||||||
|
label: $q.lang.editor.formatting,
|
||||||
|
icon: $q.iconSet.editor.formatting,
|
||||||
|
list: 'no-icons',
|
||||||
|
options: [
|
||||||
|
'p',
|
||||||
|
'h1',
|
||||||
|
'h2',
|
||||||
|
'h3',
|
||||||
|
'h4',
|
||||||
|
'h5',
|
||||||
|
'h6',
|
||||||
|
'code',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: $q.lang.editor.fontSize,
|
||||||
|
icon: $q.iconSet.editor.fontSize,
|
||||||
|
fixedLabel: true,
|
||||||
|
fixedIcon: true,
|
||||||
|
list: 'no-icons',
|
||||||
|
options: [
|
||||||
|
'size-1',
|
||||||
|
'size-2',
|
||||||
|
'size-3',
|
||||||
|
'size-4',
|
||||||
|
'size-5',
|
||||||
|
'size-6',
|
||||||
|
'size-7',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: $q.lang.editor.defaultFont,
|
||||||
|
icon: $q.iconSet.editor.font,
|
||||||
|
fixedIcon: true,
|
||||||
|
list: 'no-icons',
|
||||||
|
options: [
|
||||||
|
'default_font',
|
||||||
|
'arial',
|
||||||
|
'arial_black',
|
||||||
|
'comic_sans',
|
||||||
|
'courier_new',
|
||||||
|
'impact',
|
||||||
|
'lucida_grande',
|
||||||
|
'times_new_roman',
|
||||||
|
'verdana',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
'removeFormat',
|
||||||
|
],
|
||||||
|
['quote', 'unordered', 'ordered', 'outdent', 'indent'],
|
||||||
|
|
||||||
|
['undo', 'redo'],
|
||||||
|
['viewsource'],
|
||||||
|
]"
|
||||||
|
:fonts="{
|
||||||
|
arial: 'Arial',
|
||||||
|
arial_black: 'Arial Black',
|
||||||
|
comic_sans: 'Comic Sans MS',
|
||||||
|
courier_new: 'Courier New',
|
||||||
|
impact: 'Impact',
|
||||||
|
lucida_grande: 'Lucida Grande',
|
||||||
|
times_new_roman: 'Times New Roman',
|
||||||
|
verdana: 'Verdana',
|
||||||
|
}"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-item-section>
|
</q-card-section>
|
||||||
</q-card>
|
</q-card>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ interface FormCompetency {
|
||||||
competencyType: string;
|
competencyType: string;
|
||||||
competencyName: string;
|
competencyName: string;
|
||||||
definition: string;
|
definition: string;
|
||||||
level_1: string;
|
level_1: any;
|
||||||
level_2: string;
|
level_2: string;
|
||||||
level_3: string;
|
level_3: string;
|
||||||
level_4: string;
|
level_4: string;
|
||||||
|
|
|
||||||
|
|
@ -88,15 +88,12 @@ function fetchDataProject(id: string) {
|
||||||
store.formAddProject.actualPeoples = actualPeoples;
|
store.formAddProject.actualPeoples = actualPeoples;
|
||||||
|
|
||||||
// ลักษณะโครงการ
|
// ลักษณะโครงการ
|
||||||
store.formAddProject.projectDay = store.formAddProject.projectDay
|
store.formAddProject.projectType = data.projectType;
|
||||||
? Number(store.formAddProject.projectDay)
|
store.formAddProject.projectCharacteristics = data.projectCharacteristics;
|
||||||
: null;
|
store.formAddProject.projectDay = data.projectDay;
|
||||||
store.formAddProject.projectNigth = store.formAddProject.projectNigth
|
store.formAddProject.projectNigth = data.projectNigth;
|
||||||
? Number(store.formAddProject.projectNigth)
|
store.formAddProject.projectTechniques = data.projectTechniques;
|
||||||
: null;
|
store.formAddProject.projectModal = data.projectModal;
|
||||||
store.formAddProject.projectModal = store.formAddProject.projectModal
|
|
||||||
? Number(store.formAddProject.projectModal)
|
|
||||||
: null;
|
|
||||||
|
|
||||||
/** การติดตามผลดารประเมิน*/
|
/** การติดตามผลดารประเมิน*/
|
||||||
store.formAddProject.metricType = data.metricType;
|
store.formAddProject.metricType = data.metricType;
|
||||||
|
|
@ -119,7 +116,7 @@ function fetchDataProject(id: string) {
|
||||||
store.formAddProject.dateEnd = data.dateEnd;
|
store.formAddProject.dateEnd = data.dateEnd;
|
||||||
store.formAddProject.totalDate = data.totalDate;
|
store.formAddProject.totalDate = data.totalDate;
|
||||||
store.formAddProject.address = data.address;
|
store.formAddProject.address = data.address;
|
||||||
store.formAddProject.provinceId = data.provinceId;
|
store.formAddProject.provinceIds = data.provinceIds;
|
||||||
store.formAddProject.budget = data.budget;
|
store.formAddProject.budget = data.budget;
|
||||||
store.formAddProject.accept = data.accept;
|
store.formAddProject.accept = data.accept;
|
||||||
store.formAddProject.receive = data.receive;
|
store.formAddProject.receive = data.receive;
|
||||||
|
|
@ -162,6 +159,17 @@ function onSubmit() {
|
||||||
store.formAddProject.isNoPass = false;
|
store.formAddProject.isNoPass = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ลักษณะโครงการ;
|
||||||
|
store.formAddProject.projectDay = store.formAddProject.projectDay
|
||||||
|
? Number(store.formAddProject.projectDay)
|
||||||
|
: null;
|
||||||
|
store.formAddProject.projectNigth = store.formAddProject.projectNigth
|
||||||
|
? Number(store.formAddProject.projectNigth)
|
||||||
|
: null;
|
||||||
|
store.formAddProject.projectModal = store.formAddProject.projectModal
|
||||||
|
? Number(store.formAddProject.projectModal)
|
||||||
|
: null;
|
||||||
|
|
||||||
/** อื่นๆ*/
|
/** อื่นๆ*/
|
||||||
store.formAddProject.totalDate = Number(store.formAddProject.totalDate);
|
store.formAddProject.totalDate = Number(store.formAddProject.totalDate);
|
||||||
store.formAddProject.accept =
|
store.formAddProject.accept =
|
||||||
|
|
|
||||||
|
|
@ -222,7 +222,7 @@ onMounted(() => {
|
||||||
<q-select
|
<q-select
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
v-model="store.formAddProject.provinceId"
|
v-model="store.formAddProject.provinceIds"
|
||||||
label="จังหวัด"
|
label="จังหวัด"
|
||||||
:options="provinceOp"
|
:options="provinceOp"
|
||||||
option-label="name"
|
option-label="name"
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ const title = ref<string>(route.params.id ? "แก้ไข" : "เพิ่ม
|
||||||
const scholarshipId = ref<string | null>(
|
const scholarshipId = ref<string | null>(
|
||||||
route.params.id ? route.params.id.toLocaleString() : null
|
route.params.id ? route.params.id.toLocaleString() : null
|
||||||
);
|
);
|
||||||
const isStatus = ref<string>();
|
const isStatus = ref<string>("");
|
||||||
const modalDialogGov = ref<boolean>(false);
|
const modalDialogGov = ref<boolean>(false);
|
||||||
|
|
||||||
const budgetSourceOp = ref<DataOption[]>([
|
const budgetSourceOp = ref<DataOption[]>([
|
||||||
|
|
@ -229,7 +229,14 @@ function fetchDataDetail(id: string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function fetchStatus(id: string) {
|
function fetchStatus(id: string) {
|
||||||
isStatus.value = "PENDING";
|
// http
|
||||||
|
// .get(config.API.devScholarshipStatus(id,"GRADUATE"))
|
||||||
|
// .then((res) => {
|
||||||
|
// const data = res.data.result;
|
||||||
|
// console.log(data);
|
||||||
|
isStatus.value = "PENDING";
|
||||||
|
// })
|
||||||
|
// .catch((err) => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSubmit() {
|
function onSubmit() {
|
||||||
|
|
@ -312,7 +319,22 @@ function changeStartDate(type: string) {
|
||||||
|
|
||||||
function onClickUpdateStatus(type: string) {
|
function onClickUpdateStatus(type: string) {
|
||||||
dialogConfirm($q, () => {
|
dialogConfirm($q, () => {
|
||||||
isStatus.value = type;
|
if (scholarshipId.value) {
|
||||||
|
showLoader();
|
||||||
|
http
|
||||||
|
.get(config.API.devScholarshipStatus(scholarshipId.value, type))
|
||||||
|
.then((res) => {
|
||||||
|
const data = res.data.result;
|
||||||
|
console.log(data);
|
||||||
|
isStatus.value = type;
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
messageError($q, err);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -139,7 +139,7 @@ interface FormAddProject {
|
||||||
dateEnd: Date | null;
|
dateEnd: Date | null;
|
||||||
totalDate: number | null;
|
totalDate: number | null;
|
||||||
address: string;
|
address: string;
|
||||||
provinceId: any | null;
|
provinceIds: any;
|
||||||
budget: string;
|
budget: string;
|
||||||
budgetSub: string;
|
budgetSub: string;
|
||||||
accept: number | string | null;
|
accept: number | string | null;
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ interface ResDataProject {
|
||||||
dateEnd: Date | null;
|
dateEnd: Date | null;
|
||||||
totalDate: number | null;
|
totalDate: number | null;
|
||||||
address: string;
|
address: string;
|
||||||
provinceId: string | null;
|
provinceIds: any;
|
||||||
budget: string;
|
budget: string;
|
||||||
accept: number | string | null;
|
accept: number | string | null;
|
||||||
receive: number | string | null;
|
receive: number | string | null;
|
||||||
|
|
@ -57,11 +57,17 @@ interface ResDataProject {
|
||||||
expect: string;
|
expect: string;
|
||||||
topicAcademic: string;
|
topicAcademic: string;
|
||||||
addressAcademic: string;
|
addressAcademic: string;
|
||||||
provinceActualId: string | null;
|
provinceActualId: string;
|
||||||
actualPeoples: ResPeople[];
|
actualPeoples: ResPeople[];
|
||||||
plannedPeoples: ResPeople[];
|
plannedPeoples: ResPeople[];
|
||||||
actualGoals: ResActualGoals[];
|
actualGoals: ResActualGoals[];
|
||||||
plannedGoals: ResPlannedGoals[];
|
plannedGoals: ResPlannedGoals[];
|
||||||
|
projectType: string;
|
||||||
|
projectCharacteristics: string;
|
||||||
|
projectDay: number | null;
|
||||||
|
projectNigth: number | null;
|
||||||
|
projectTechniques: string;
|
||||||
|
projectModal: number | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ResPeople {
|
interface ResPeople {
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ export const useDevelopmentDataStore = defineStore(
|
||||||
dateEnd: null, //วันที่สิ้นสุด
|
dateEnd: null, //วันที่สิ้นสุด
|
||||||
totalDate: null, //รวมระยะเวลา (วัน)
|
totalDate: null, //รวมระยะเวลา (วัน)
|
||||||
address: "", //ที่อยู่
|
address: "", //ที่อยู่
|
||||||
provinceId: null, //จังหวัด
|
provinceIds: null, //จังหวัด
|
||||||
budget: "", //ประเภทงบประมาณ(งบตามข้อบัญญัติ->REGULATIONBUDGET, งบประมาณกรุงเทพมหานคร->BANGKOKBUDGET, เงินนอกงบประมาณ->OUTSIDEBUDGET)
|
budget: "", //ประเภทงบประมาณ(งบตามข้อบัญญัติ->REGULATIONBUDGET, งบประมาณกรุงเทพมหานคร->BANGKOKBUDGET, เงินนอกงบประมาณ->OUTSIDEBUDGET)
|
||||||
budgetSub: "",
|
budgetSub: "",
|
||||||
accept: null, //จํานวนงบประมาณที่ขอรับการจัดสรรฯ
|
accept: null, //จํานวนงบประมาณที่ขอรับการจัดสรรฯ
|
||||||
|
|
@ -103,7 +103,7 @@ export const useDevelopmentDataStore = defineStore(
|
||||||
formAddProject.dateEnd = null;
|
formAddProject.dateEnd = null;
|
||||||
formAddProject.totalDate = null;
|
formAddProject.totalDate = null;
|
||||||
formAddProject.address = "";
|
formAddProject.address = "";
|
||||||
formAddProject.provinceId = [];
|
formAddProject.provinceIds = [];
|
||||||
formAddProject.budget = "";
|
formAddProject.budget = "";
|
||||||
formAddProject.accept = null;
|
formAddProject.accept = null;
|
||||||
formAddProject.receive = null;
|
formAddProject.receive = null;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue