no message
This commit is contained in:
parent
30b420ae6c
commit
5acca0efa6
6 changed files with 90 additions and 43 deletions
|
|
@ -43,6 +43,7 @@ const visibleColumns = ref<string[]>([
|
||||||
"no",
|
"no",
|
||||||
"idcard",
|
"idcard",
|
||||||
"fullName",
|
"fullName",
|
||||||
|
"positionNo",
|
||||||
"position",
|
"position",
|
||||||
"positionLevel",
|
"positionLevel",
|
||||||
"salary",
|
"salary",
|
||||||
|
|
@ -78,6 +79,15 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "positionNo",
|
||||||
|
align: "left",
|
||||||
|
label: "ตำแหน่งเลขที่",
|
||||||
|
sortable: true,
|
||||||
|
field: "positionNo",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "position",
|
name: "position",
|
||||||
align: "left",
|
align: "left",
|
||||||
|
|
@ -205,6 +215,7 @@ onMounted(() => {
|
||||||
prefix: "นาง",
|
prefix: "นาง",
|
||||||
firstName: "ศิรินภา",
|
firstName: "ศิรินภา",
|
||||||
lastName: "คงน้อย",
|
lastName: "คงน้อย",
|
||||||
|
positionNo: "สกก.1",
|
||||||
position: "ตำเเหน่ง1",
|
position: "ตำเเหน่ง1",
|
||||||
positionLevel: "level1",
|
positionLevel: "level1",
|
||||||
salary: "100",
|
salary: "100",
|
||||||
|
|
@ -217,6 +228,7 @@ onMounted(() => {
|
||||||
prefix: "นาย",
|
prefix: "นาย",
|
||||||
firstName: "แก้ว",
|
firstName: "แก้ว",
|
||||||
lastName: "คำ",
|
lastName: "คำ",
|
||||||
|
positionNo: "สกก.1",
|
||||||
position: "ตำแหน่ง2",
|
position: "ตำแหน่ง2",
|
||||||
positionLevel: "level2",
|
positionLevel: "level2",
|
||||||
salary: "100",
|
salary: "100",
|
||||||
|
|
@ -229,6 +241,7 @@ onMounted(() => {
|
||||||
prefix: "นาย",
|
prefix: "นาย",
|
||||||
firstName: "ภัทรานุย",
|
firstName: "ภัทรานุย",
|
||||||
lastName: "คงนอย",
|
lastName: "คงนอย",
|
||||||
|
positionNo: "สกก.1",
|
||||||
position: "ตำแหน่ง2",
|
position: "ตำแหน่ง2",
|
||||||
positionLevel: "level3",
|
positionLevel: "level3",
|
||||||
salary: "100",
|
salary: "100",
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ const id = ref<string>(route.params.id as string);
|
||||||
const personOj = reactive<ArrayPerson>({
|
const personOj = reactive<ArrayPerson>({
|
||||||
idcard: "",
|
idcard: "",
|
||||||
name: "",
|
name: "",
|
||||||
|
positionNo: "",
|
||||||
position: "",
|
position: "",
|
||||||
positionLevel: "",
|
positionLevel: "",
|
||||||
salary: "",
|
salary: "",
|
||||||
|
|
@ -76,6 +77,7 @@ const fetchData = async () => {
|
||||||
{
|
{
|
||||||
idcard: "1529900022223",
|
idcard: "1529900022223",
|
||||||
name: "นางศิรินภา คงน้อย",
|
name: "นางศิรินภา คงน้อย",
|
||||||
|
positionNo: "สกก.1",
|
||||||
position: "ธุรการ",
|
position: "ธุรการ",
|
||||||
positionLevel: "ต้น",
|
positionLevel: "ต้น",
|
||||||
salary: "10000",
|
salary: "10000",
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ import type {
|
||||||
MyObjectComplaintsRef,
|
MyObjectComplaintsRef,
|
||||||
DataAddRequest,
|
DataAddRequest,
|
||||||
ArrayPerson,
|
ArrayPerson,
|
||||||
ArrayFileList
|
ArrayFileList,
|
||||||
} from "@/modules/11_discipline/interface/request/complaint";
|
} from "@/modules/11_discipline/interface/request/complaint";
|
||||||
|
|
||||||
/** importStroe*/
|
/** importStroe*/
|
||||||
|
|
@ -26,7 +26,7 @@ const fileDocDataUpload = ref<File[]>([]);
|
||||||
/** เรียกใช้ store */
|
/** เรียกใช้ store */
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const complainstStore = useComplainstDataStore();
|
const complainstStore = useComplainstDataStore();
|
||||||
const { date2Thai, dialogConfirm,dialogRemove,success } = mixin;
|
const { date2Thai, dialogConfirm, dialogRemove, success } = mixin;
|
||||||
const { selectComplainantTpye, filterSelector } = complainstStore; // function จาก store complainstStore
|
const { selectComplainantTpye, filterSelector } = complainstStore; // function จาก store complainstStore
|
||||||
|
|
||||||
/** validateForm */
|
/** validateForm */
|
||||||
|
|
@ -60,6 +60,7 @@ const props = defineProps({
|
||||||
const personOj = reactive<ArrayPerson>({
|
const personOj = reactive<ArrayPerson>({
|
||||||
idcard: "",
|
idcard: "",
|
||||||
name: "",
|
name: "",
|
||||||
|
positionNo: "",
|
||||||
position: "",
|
position: "",
|
||||||
positionLevel: "",
|
positionLevel: "",
|
||||||
salary: "",
|
salary: "",
|
||||||
|
|
@ -67,10 +68,10 @@ const personOj = reactive<ArrayPerson>({
|
||||||
});
|
});
|
||||||
|
|
||||||
const fileListOj = reactive<ArrayFileList>({
|
const fileListOj = reactive<ArrayFileList>({
|
||||||
id:"",
|
id: "",
|
||||||
file:"",
|
file: "",
|
||||||
fileName:"",
|
fileName: "",
|
||||||
fileType:""
|
fileType: "",
|
||||||
});
|
});
|
||||||
|
|
||||||
const formData = reactive<FormData>({
|
const formData = reactive<FormData>({
|
||||||
|
|
@ -92,7 +93,7 @@ const formData = reactive<FormData>({
|
||||||
personId: [],
|
personId: [],
|
||||||
organizationId: null,
|
organizationId: null,
|
||||||
respondentId: [],
|
respondentId: [],
|
||||||
fileList:[fileListOj]
|
fileList: [fileListOj],
|
||||||
});
|
});
|
||||||
|
|
||||||
/** maping ref เข้าตัวแปรเพื่อเตรียมตรวจสอบ */
|
/** maping ref เข้าตัวแปรเพื่อเตรียมตรวจสอบ */
|
||||||
|
|
@ -161,6 +162,15 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "positionNo",
|
||||||
|
align: "left",
|
||||||
|
label: "ตำแหน่งเลขที่",
|
||||||
|
sortable: true,
|
||||||
|
field: "positionNo",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "position",
|
name: "position",
|
||||||
align: "left",
|
align: "left",
|
||||||
|
|
@ -204,6 +214,7 @@ const visibleColumns = ref<string[]>([
|
||||||
"no",
|
"no",
|
||||||
"idcard",
|
"idcard",
|
||||||
"name",
|
"name",
|
||||||
|
'positionNo',
|
||||||
"position",
|
"position",
|
||||||
"positionLevel",
|
"positionLevel",
|
||||||
"salary",
|
"salary",
|
||||||
|
|
@ -320,6 +331,7 @@ async function addPerson() {
|
||||||
id: "001",
|
id: "001",
|
||||||
idcard: "0000000000001",
|
idcard: "0000000000001",
|
||||||
name: "นางศิรินภา คงน้อย",
|
name: "นางศิรินภา คงน้อย",
|
||||||
|
positionNo: "สกก.1",
|
||||||
position: "ตำเเหน่ง1",
|
position: "ตำเเหน่ง1",
|
||||||
positionLevel: "level1",
|
positionLevel: "level1",
|
||||||
salary: "10000",
|
salary: "10000",
|
||||||
|
|
@ -329,6 +341,7 @@ async function addPerson() {
|
||||||
id: "002",
|
id: "002",
|
||||||
idcard: "0000000000002",
|
idcard: "0000000000002",
|
||||||
name: "นายแก้ว คำ",
|
name: "นายแก้ว คำ",
|
||||||
|
positionNo: "สกก.1",
|
||||||
position: "ตำแหน่ง2",
|
position: "ตำแหน่ง2",
|
||||||
positionLevel: "level2",
|
positionLevel: "level2",
|
||||||
salary: "1000",
|
salary: "1000",
|
||||||
|
|
@ -338,6 +351,7 @@ async function addPerson() {
|
||||||
id: "003",
|
id: "003",
|
||||||
idcard: "0000000000003",
|
idcard: "0000000000003",
|
||||||
name: "นายภัทรานุย คงนอย",
|
name: "นายภัทรานุย คงนอย",
|
||||||
|
positionNo: "สกก.1",
|
||||||
position: "ตำแหน่ง2",
|
position: "ตำแหน่ง2",
|
||||||
positionLevel: "level3",
|
positionLevel: "level3",
|
||||||
salary: "100",
|
salary: "100",
|
||||||
|
|
@ -350,19 +364,28 @@ async function addPerson() {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* เปิดลิงค์ไฟล์
|
* เปิดลิงค์ไฟล์
|
||||||
* @param link รับมาเป็น https ลิงค์
|
* @param link รับมาเป็น https ลิงค์
|
||||||
*/
|
*/
|
||||||
function downloadFile(link:string){
|
function downloadFile(link: string) {
|
||||||
window.open(link, '_blank');
|
window.open(link, "_blank");
|
||||||
}
|
}
|
||||||
|
|
||||||
function deleteFile(id:string){
|
/**
|
||||||
dialogRemove($q,() => confirmDelete(id))
|
* ลบไฟล์
|
||||||
|
* @param id id file
|
||||||
|
*/
|
||||||
|
function deleteFile(id: string) {
|
||||||
|
dialogRemove($q, () => confirmDelete(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
function confirmDelete(id:string){
|
/**
|
||||||
|
* ยืนยัน ลบ ไฟล์
|
||||||
|
* @param id id file
|
||||||
|
*/
|
||||||
|
function confirmDelete(id: string) {
|
||||||
success($q, `ลบไฟล์สำเร็จ #id:${id}`);
|
success($q, `ลบไฟล์สำเร็จ #id:${id}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* เช็คข้อมูลจาก props
|
* เช็คข้อมูลจาก props
|
||||||
* เมื่อมีข้อมูล
|
* เมื่อมีข้อมูล
|
||||||
|
|
@ -943,36 +966,40 @@ onMounted(() => {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="q-pa-md">
|
<div class="q-pa-md">
|
||||||
<q-list bordered separator v-for="data in formData.fileList" :key="data.id">
|
<q-list
|
||||||
<q-item clickable v-ripple class="items-center">
|
bordered
|
||||||
<q-item-section>{{ data.fileName }}</q-item-section>
|
separator
|
||||||
<q-space/>
|
v-for="data in formData.fileList"
|
||||||
<q-btn
|
:key="data.id"
|
||||||
size="12px"
|
>
|
||||||
flat
|
<q-item clickable v-ripple class="items-center">
|
||||||
round
|
<q-item-section>{{ data.fileName }}</q-item-section>
|
||||||
dense
|
<q-space />
|
||||||
color="blue"
|
<q-btn
|
||||||
class="q-ml-sm"
|
size="12px"
|
||||||
icon="mdi-download"
|
flat
|
||||||
@click="downloadFile(data.file)"
|
round
|
||||||
><q-tooltip>ดาวน์โหลดไฟล์</q-tooltip></q-btn
|
dense
|
||||||
>
|
color="blue"
|
||||||
<q-btn
|
class="q-ml-sm"
|
||||||
size="12px"
|
icon="mdi-download"
|
||||||
flat
|
@click="downloadFile(data.file)"
|
||||||
round
|
><q-tooltip>ดาวน์โหลดไฟล์</q-tooltip></q-btn
|
||||||
dense
|
>
|
||||||
color="red"
|
<q-btn
|
||||||
class="q-ml-sm"
|
size="12px"
|
||||||
icon="mdi-delete-outline"
|
flat
|
||||||
@click="deleteFile(data.id)"
|
round
|
||||||
><q-tooltip>ลบไฟล์</q-tooltip></q-btn
|
dense
|
||||||
>
|
color="red"
|
||||||
</q-item>
|
class="q-ml-sm"
|
||||||
|
icon="mdi-delete-outline"
|
||||||
</q-list>
|
@click="deleteFile(data.id)"
|
||||||
</div>
|
><q-tooltip>ลบไฟล์</q-tooltip></q-btn
|
||||||
|
>
|
||||||
|
</q-item>
|
||||||
|
</q-list>
|
||||||
|
</div>
|
||||||
</q-card>
|
</q-card>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ interface FormData {
|
||||||
interface ArrayPerson {
|
interface ArrayPerson {
|
||||||
idcard: string,
|
idcard: string,
|
||||||
name: string,
|
name: string,
|
||||||
|
positionNo: string,
|
||||||
position: string,
|
position: string,
|
||||||
positionLevel: string,
|
positionLevel: string,
|
||||||
salary: string,
|
salary: string,
|
||||||
|
|
@ -54,6 +55,7 @@ interface DataAddRequest {
|
||||||
id: string
|
id: string
|
||||||
idcard: string
|
idcard: string
|
||||||
name: string
|
name: string
|
||||||
|
positionNo: string
|
||||||
position: string
|
position: string
|
||||||
positionLevel: string
|
positionLevel: string
|
||||||
salary: string
|
salary: string
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ interface DataAdd {
|
||||||
id:string
|
id:string
|
||||||
idcard:string
|
idcard:string
|
||||||
name:string
|
name:string
|
||||||
|
positionNo:string
|
||||||
position:string
|
position:string
|
||||||
positionLevel:string
|
positionLevel:string
|
||||||
salary:string
|
salary:string
|
||||||
|
|
@ -22,6 +23,7 @@ interface DataAddResponse {
|
||||||
id:string
|
id:string
|
||||||
idcard:string
|
idcard:string
|
||||||
name:string
|
name:string
|
||||||
|
positionNo:string
|
||||||
position:string
|
position:string
|
||||||
positionLevel:string
|
positionLevel:string
|
||||||
salary:string
|
salary:string
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@ export const useComplainstDataStore = defineStore("DisciplineComplainst", () =>
|
||||||
id: e.id,
|
id: e.id,
|
||||||
idcard: e.idcard,
|
idcard: e.idcard,
|
||||||
name: e.name,
|
name: e.name,
|
||||||
|
positionNo: e.positionNo,
|
||||||
position: e.position,
|
position: e.position,
|
||||||
positionLevel: e.positionLevel,
|
positionLevel: e.positionLevel,
|
||||||
salary: addCommas(e.salary),
|
salary: addCommas(e.salary),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue