diff --git a/env.d.ts b/env.d.ts index 11f02fe2a..33cd2182c 100644 --- a/env.d.ts +++ b/env.d.ts @@ -1 +1,2 @@ /// +declare module 'quasar-ui-q-draggable-table'; \ No newline at end of file diff --git a/package.json b/package.json index 403f6f025..cc3443f41 100644 --- a/package.json +++ b/package.json @@ -58,6 +58,7 @@ "node-sass": "^9.0.0", "npm-run-all": "^4.1.5", "prettier": "^2.7.1", + "quasar-ui-q-draggable-table": "^1.0.1", "sass": "^1.69.4", "start-server-and-test": "^1.15.2", "typescript": "~4.7.4", diff --git a/src/components/Dialogs/AddPersonal.vue b/src/components/Dialogs/AddPersonal.vue index 29789e049..40c173324 100644 --- a/src/components/Dialogs/AddPersonal.vue +++ b/src/components/Dialogs/AddPersonal.vue @@ -179,9 +179,9 @@ watch( /> - + - + - + - - - - - + + + + + - + { fetchData(id.value); }); + { fetchData(id.value); - console.log(id.value); }); async function onSubmit() { @@ -207,7 +207,7 @@ async function addData() { name: name.value, isActive: isActive.value, shortName: shortName.value, - note: note.value == "" ? "-" : "", + note: note.value == "" ? "-" : note.value, insigniaTypeId: id.value, }); fetchData(id.value); @@ -218,7 +218,7 @@ async function editData(idData: string) { name: name.value, isActive: isActive.value, shortName: shortName.value, - note: note.value == "" ? "-" : "", + note: note.value == "" ? "-" : note.value, insigniaTypeId: id.value, }); fetchData(id.value); @@ -232,10 +232,7 @@ async function deleteData(idData: string) { import { defineEmits } from "vue"; const emit = defineEmits(["nameType"]); - -const nameType = () => { - emit("nameType", insigniaTypeId.value); -}; +const dialogOrder = ref(false); @@ -255,6 +252,16 @@ const nameType = () => { > เพิ่มข้อมูล + (dialogOrder = true)" + > + จัดลำดับการแสดงผล + + diff --git a/src/modules/01_metadataNew/components/insignia/InsigniaType.vue b/src/modules/01_metadataNew/components/insignia/InsigniaType.vue index 684fe5740..224266e55 100644 --- a/src/modules/01_metadataNew/components/insignia/InsigniaType.vue +++ b/src/modules/01_metadataNew/components/insignia/InsigniaType.vue @@ -102,7 +102,6 @@ async function fetchData() { await http .get(config.API.insigniaTypeNew) .then(async (res) => { - console.log(res.data.result); store.fetchData(res.data.result); }) .catch((err) => { diff --git a/src/modules/01_metadataNew/components/insignia/TableDraggable.vue b/src/modules/01_metadataNew/components/insignia/TableDraggable.vue new file mode 100644 index 000000000..5f1d8bdc9 --- /dev/null +++ b/src/modules/01_metadataNew/components/insignia/TableDraggable.vue @@ -0,0 +1,153 @@ + + + + + + + + + + + + + + + + + + บันทึกข้อมูล + + + + + + diff --git a/src/modules/01_metadataNew/interface/response/insignia/Insignia.ts b/src/modules/01_metadataNew/interface/response/insignia/Insignia.ts index afa2247f4..b95bf82e2 100644 --- a/src/modules/01_metadataNew/interface/response/insignia/Insignia.ts +++ b/src/modules/01_metadataNew/interface/response/insignia/Insignia.ts @@ -5,6 +5,7 @@ interface DataResponse { lastUpdateFullName: String; lastUpdatedAt: Date; name: string; + level: Number; } interface DataRow { diff --git a/src/modules/01_metadataNew/stores/InsigniaStore.ts b/src/modules/01_metadataNew/stores/InsigniaStore.ts index b5b7873bd..c1a101b40 100644 --- a/src/modules/01_metadataNew/stores/InsigniaStore.ts +++ b/src/modules/01_metadataNew/stores/InsigniaStore.ts @@ -9,16 +9,18 @@ import { useCounterMixin } from "@/stores/mixin"; const { date2Thai } = useCounterMixin(); export const useInsigniaDataStore = defineStore("insigniaData", () => { - const row = ref(); - const name1 = ref(""); + const row = ref([]); function fetchData(data: DataResponse[], insigniaType?: string) { + data.forEach((row, index) => { + row.level = index + 1; + }); const list = data.map((e) => ({ ...e, insigniaType: insigniaType, createdAt: e.createdAt ? date2Thai(e.createdAt) : "", lastUpdatedAt: e.lastUpdatedAt ? date2Thai(e.lastUpdatedAt) : "", })); - console.log("test"); + list; row.value = list; } diff --git a/src/modules/11_discipline/components/1_Complaint/AddComplaintPage.vue b/src/modules/11_discipline/components/1_Complaint/AddComplaintPage.vue index b103acbe8..3c49bc768 100644 --- a/src/modules/11_discipline/components/1_Complaint/AddComplaintPage.vue +++ b/src/modules/11_discipline/components/1_Complaint/AddComplaintPage.vue @@ -87,6 +87,6 @@ async function onSubmit(data: any) { เพิ่มเรื่องร้องเรียน - + diff --git a/src/modules/11_discipline/components/1_Complaint/EditPage.vue b/src/modules/11_discipline/components/1_Complaint/EditPage.vue index 67691ce19..d6de14f06 100644 --- a/src/modules/11_discipline/components/1_Complaint/EditPage.vue +++ b/src/modules/11_discipline/components/1_Complaint/EditPage.vue @@ -406,7 +406,7 @@ onMounted(() => { - + { - - - - - แจ้งเตือน - ยังไม่ได้บันทึกข้อมูล - - + + + + แจ้งเตือน + ยังไม่ได้บันทึกข้อมูล + + + - - - - - - - filterSelector(inputValue, doneFn, 'filterrespondentType' - )" - @update:model-value="changeFormData()" - > - - - - ไม่มีข้อมูล - - - - - - - + + + + + + filterSelector(inputValue, doneFn, 'filterrespondentType' + )" + @update:model-value="changeFormData()" > - - + + + + ไม่มีข้อมูล + + + + + - - filterSelector(inputValue, doneFn, 'filterconsideredAgencytoptions' - )" - @update:model-value="changeFormData()" - > - - - - ไม่มีข้อมูล - - - - - + + + - + filterSelector(inputValue, doneFn, 'filterconsideredAgencytoptions' + )" + @update:model-value="changeFormData()" + > + + + + ไม่มีข้อมูล + + + + + + + + - - - ผู้ถูกร้องเรียน - เพิ่มผู้ถูกร้องเรียน + + + + + + + + + + + {{ + col.label + }} + + + + + + + + + ดูข้อมูลในทะเบียนประวัติ + + + + + {{ props.rowIndex + 1 }} + + + {{ props.row.organization }} + + + {{ props.row.salary.toLocaleString() }} + + + {{ col.value }} + + + + ลบผู้ถูกร้องเรียน + + + + + + + + + + + + + + + + + + + + {{ year + 543 }} + + + {{ parseInt(value + 543) }} + + + + + + + + + + + + + + + + + + + + {{ year + 543 }} + + + {{ parseInt(value + 543) }} + + + + + + + + + + + + + + + + + + + + + + + {{ year + 543 }} + + + {{ parseInt(value + 543) }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ + !isReadonly ? "อัปโหลดไฟล์เอกสารหลักฐาน" : "ไฟล์เอกสารหลักฐาน" + }} + + + + + + + + + + - เพิ่มผู้ถูกร้องเรียน - - - + icon="mdi-upload" + @click="upLoadFileDoc()" + >อัปโหลดไฟล์ + + - - - - - - - {{ - col.label - }} - - - - - - - - - ดูข้อมูลในทะเบียนประวัติ - - - - - {{ props.rowIndex + 1 }} - - - {{ props.row.organization }} - - - {{ props.row.salary.toLocaleString() }} - - - {{ col.value }} - - - - ลบผู้ถูกร้องเรียน - - - - - - - + + - - - + + + + {{ data.fileName }} + + ดาวน์โหลดไฟล์ + ลบไฟล์ + + + - - - - - - - - {{ year + 543 }} - - - {{ parseInt(value + 543) }} - - - - - - - - - - - - - - - - - - - - {{ year + 543 }} - - - {{ parseInt(value + 543) }} - - - - - - - - - - - - - - - - - - - - - - - {{ year + 543 }} - - - {{ parseInt(value + 543) }} - - - - - - - - - - - - - - - - - - - - - - - - - - + + ไม่มีรายการเอกสาร + + - + - + { >บันทึกข้อมูล - - + + - - - - - - - - {{ - !isReadonly ? "อัปโหลดไฟล์เอกสารหลักฐาน" : "ไฟล์เอกสารหลักฐาน" - }} - - - - - - - - - - - - อัปโหลดไฟล์ - - - - - - - {{ data.fileName }} - - ดาวน์โหลดไฟล์ - ลบไฟล์ - - - - - - ไม่มีรายการเอกสาร - - - - - - + diff --git a/src/modules/11_discipline/components/2_InvestigateFacts/AddPage.vue b/src/modules/11_discipline/components/2_InvestigateFacts/AddPage.vue index f37aa616a..aa5cbe6d9 100644 --- a/src/modules/11_discipline/components/2_InvestigateFacts/AddPage.vue +++ b/src/modules/11_discipline/components/2_InvestigateFacts/AddPage.vue @@ -27,6 +27,6 @@ async function onSubmit(){ เพิ่มรายการสืบสวนข้อเท็จจริง - + diff --git a/src/modules/11_discipline/components/2_InvestigateFacts/EditPage.vue b/src/modules/11_discipline/components/2_InvestigateFacts/EditPage.vue index a0a9636ce..2c5e84200 100644 --- a/src/modules/11_discipline/components/2_InvestigateFacts/EditPage.vue +++ b/src/modules/11_discipline/components/2_InvestigateFacts/EditPage.vue @@ -405,7 +405,7 @@ watch( - + { - - - - แจ้งเตือน - ยังไม่ได้บันทึกข้อมูล - - - - - - - + + + แจ้งเตือน + ยังไม่ได้บันทึกข้อมูล + + + + + + + + { - - - - - บันทึกข้อมูล - - + + - - + + + + + + อัปโหลดไฟล์เอกสารที่เกี่ยวข้องกับการสืบสวน + + - - - - - - - อัปโหลดไฟล์เอกสารที่เกี่ยวข้องกับการสืบสวน - - - - - - - - - - - อัปโหลดเอกสาร - - - - - - - {{ file.fileName }} - - - + + + + + - ดาวน์โหลดไฟล์ - - - - ลบไฟล์ - - - - - - + color="add" + icon="mdi-upload" + @click="uploadFileRelevant" + >อัปโหลดเอกสาร + + + - - ไม่มีรายการเอกสาร - - - - - - - อัปโหลดไฟล์เอกสารหลักฐาน - - - - - - - - - - - อัปโหลดไฟล์ 0" + class="col-xs-12 q-pa-sm row" > - - + + + {{ file.fileName }} + + + + + ดาวน์โหลดไฟล์ + + + + ลบไฟล์ + + + + + + - - - - {{ file.fileName }} - - - - - ดาวน์โหลดไฟล์ - - - - ลบไฟล์ - - - - - + + ไม่มีรายการเอกสาร + + + + + + อัปโหลดไฟล์เอกสารหลักฐาน + + + + + + + + - - ไม่มีรายการเอกสาร + + อัปโหลดไฟล์ + + + + + + + {{ file.fileName }} + + + + + ดาวน์โหลดไฟล์ + + + + ลบไฟล์ + + + + + + + + + ไม่มีรายการเอกสาร + + - + - - + + + + บันทึกข้อมูล + + + + + { - + { เพิ่มการสอบสวนความผิดทางวินัย - + diff --git a/src/modules/11_discipline/components/3_InvestigateDisciplinary/EditPage.vue b/src/modules/11_discipline/components/3_InvestigateDisciplinary/EditPage.vue index 6ddd4ec56..251fe61fd 100644 --- a/src/modules/11_discipline/components/3_InvestigateDisciplinary/EditPage.vue +++ b/src/modules/11_discipline/components/3_InvestigateDisciplinary/EditPage.vue @@ -459,7 +459,7 @@ onMounted(async () => { - + { - - - - แจ้งเตือน - ยังไม่ได้บันทึกข้อมูล - - - - - - - - - - - filterSelector(inputValue, doneFn, 'filterrespondentType' - )" - > - - - - ไม่มีข้อมูล - - - - - - - - - - + + แจ้งเตือน + ยังไม่ได้บันทึกข้อมูล + + + + + + + + + + + + filterSelector(inputValue, doneFn, 'filterrespondentType' + )" > - - + + + + ไม่มีข้อมูล + + + + + + + + - - - ผู้ถูกร้องเรียน - - เพิ่มผู้ถูกร้องเรียน - - - - - - - - - - - {{ - col.label - }} - - - - - - - - - ดูข้อมูลในทะเบียนประวัติ - - - - - {{ props.rowIndex + 1 }} - - - {{ props.row.organization }} - - - {{ props.row.salary.toLocaleString() }} - - - {{ col.value }} - - - - ลบผู้ถูกร้องเรียน - - - - - - + - - - + + + - - {{ year + 543 }} - - - {{ parseInt(value + 543) }} - - - - - - - - - - - - - - - - - {{ year + 543 }} - - - {{ parseInt(value + 543) }} - - - - - - - - - - - - - - - - - - - - วันที่สอบสวน - เพิ่มผู้ถูกร้องเรียน + + + + + + + + + + + {{ + col.label + }} + + + + + + + + + ดูข้อมูลในทะเบียนประวัติ + + + + + {{ props.rowIndex + 1 }} + + + {{ props.row.organization }} + + + {{ props.row.salary.toLocaleString() }} + + + {{ col.value }} + + + + ลบผู้ถูกร้องเรียน + + + + + + + + + + + + {{ year + 543 }} + + + {{ parseInt(value + 543) }} + + + + + + + + + - - - - + + + + + + + {{ year + 543 }} + + + {{ parseInt(value + 543) }} + + + + + - ปฏิทิน - - - - - - - - - - - - - ไม่มีข้อมูล - - - - - - - - - - - - {{ - year + 543 - }} - {{ - parseInt(value + 543) - }} - - - - - - - - - - - - - - - - - {{ - year + 543 - }} - {{ - parseInt(value + 543) - }} - - - - - - - - - - - - - - - - - - + - - - - {{ e.name }} ({{ e.daysExtend }} วัน) - - {{ date2Thai(e.dateStart) }} - - {{ date2Thai(e.dateEnd) }} - - - - - - - - - - + class="cursor-pointer" + /> + + + + { - + { - - - + + + - - รายชื่อกรรมการเพื่อพิจารณาความผิดทางวินัย + + วันที่สอบสวน + + + + - เพิ่มกรรมการ + ปฏิทิน - - - - - - - - {{ props.rowIndex + 1 }} - - - {{ col.value }} - - - - - - แก้ไข - - - - ลบข้อมูล - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ผลการพิจารณาความผิดทางวินัย - - - - - - - investigateDis.filterFnOptionsType(inputValue, doneFn, 'offenseDetailsOps' - )" - @update:model-value="changeFormData()" - > - - - ไม่มีข้อมูล - - - - - - - - - - ไม่มีข้อมูล - - - - - - + + + - + + + + + + ไม่มีข้อมูล + + + + + + + + + + + + {{ + year + 543 + }} + {{ + parseInt(value + 543) + }} + + + + + + + + + + + + + + + + + {{ + year + 543 + }} + {{ + parseInt(value + 543) + }} + + + + + + + + + + + + + + + + + + + + + + {{ e.name }} ({{ e.daysExtend }} วัน) + + {{ date2Thai(e.dateStart) }} - + {{ date2Thai(e.dateEnd) }} + + + + - + + + + + + + + รายชื่อกรรมการเพื่อพิจารณาความผิดทางวินัย + + เพิ่มกรรมการ + + + + + + + + + + {{ props.rowIndex + 1 }} + + + {{ col.value }} + + + + + + แก้ไข + + + + ลบข้อมูล + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ผลการพิจารณาความผิดทางวินัย + + + + + + + investigateDis.filterFnOptionsType(inputValue, doneFn, 'offenseDetailsOps' + )" + @update:model-value="changeFormData()" + > + + + ไม่มีข้อมูล + + + + + + + + + + ไม่มีข้อมูล + + + + + + + + + + + + - - - - บับทึกข้อมูล - - + + - - - - - - + + + + - - + + - + - - + + + + + + บับทึกข้อมูล + + + - + { /> --> - + - - - - แจ้งเตือน - ยังไม่ได้บันทึกข้อมูล - - + + + แจ้งเตือน + ยังไม่ได้บันทึกข้อมูล + + + + + - - - - dataStore.filterSelector(inputValue, doneFn, 'filterrespondentType' - )" - > - - - - ไม่มีข้อมูล - - - - - - - - - - + + + + + + + dataStore.filterSelector(inputValue, doneFn, 'filterrespondentType' + )" + > + + + + ไม่มีข้อมูล + + + + + - ผู้ถูกร้องเรียน + - - - + - - - - - {{ - col.label - }} - - - - - - - - ดูข้อมูลในทะเบียนประวัติ - - - - - {{ props.rowIndex + 1 }} - + + ผู้ถูกร้องเรียน + + + + + + + + + {{ + col.label + }} + + + + + + + + ดูข้อมูลในทะเบียนประวัติ + + + + + {{ props.rowIndex + 1 }} + - - {{ props.row.organization }} - - - {{ props.row.salary.toLocaleString() }} - - - {{ col.value }} - - - - - + + {{ props.row.organization }} + + + {{ props.row.salary.toLocaleString() }} + + + {{ col.value }} + + + + + + + - - - - - - - - + - - - - - - - - - {{ year + 543 }} - {{ - parseInt(value + 543) - }} - + + + + + + + + + + + + - - {{ year + 543 }} + {{ + parseInt(value + 543) + }} + + - + + + + + + + + - - - - - - + + + + + + + + + + + อัปโหลดไฟล์เอกสารหลักฐาน + + + + + + + + + อัปโหลดไฟล์ + + + + + + + {{ data.fileName }} + + ดาวน์โหลดไฟล์ + ลบไฟล์ + + + + + ไม่มีรายการเอกสาร + + + + + + + + บับทึกข้อมูล - - - - - บับทึกข้อมูล - - - - - อัปโหลดไฟล์เอกสารหลักฐาน - - - - - - - - - - - อัปโหลดไฟล์ - - - - - - {{ data.fileName }} - - ดาวน์โหลดไฟล์ - ลบไฟล์ - - - - - ไม่มีรายการเอกสาร - - - - - + - + - + - - + + - + - - - - - + + + + + - + + { - - + + { + @@ -281,7 +282,7 @@ onMounted(() => { - + { - + @@ -690,6 +690,7 @@ onMounted(() => { + diff --git a/src/modules/11_discipline/components/UploadFile.vue b/src/modules/11_discipline/components/UploadFile.vue index 2f9206894..70a5b0755 100644 --- a/src/modules/11_discipline/components/UploadFile.vue +++ b/src/modules/11_discipline/components/UploadFile.vue @@ -127,16 +127,16 @@ function downloadFile(link: string) { - + {{ title }} - + + + อัปโหลดไฟล์ + - - - อัปโหลดไฟล์ - @@ -212,9 +211,9 @@ function downloadFile(link: string) { - - ไม่มีรายการเอกสาร + + ไม่มีรายการเอกสาร - + diff --git a/src/views/Dashboard.vue b/src/views/Dashboard.vue index ce5834086..8357baf27 100644 --- a/src/views/Dashboard.vue +++ b/src/views/Dashboard.vue @@ -164,19 +164,17 @@ const thaiOptions: Intl.DateTimeFormatOptions = {
- {{ date2Thai(e.dateStart) }} - - {{ date2Thai(e.dateEnd) }} -
+ {{ date2Thai(e.dateStart) }} - + {{ date2Thai(e.dateEnd) }} +