Merge branch 'develop' into develop-champ
This commit is contained in:
commit
ec9cf49516
3 changed files with 74 additions and 18 deletions
|
|
@ -86,17 +86,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
sort: (a: string, b: string) =>
|
sort: (a: string, b: string) =>
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: "chackList",
|
|
||||||
align: "left",
|
|
||||||
label: "",
|
|
||||||
sortable: true,
|
|
||||||
field: "chackList",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
|
||||||
]);
|
]);
|
||||||
const rows = [{
|
const rows = [{
|
||||||
position: 1,
|
position: 1,
|
||||||
|
|
@ -106,7 +96,7 @@ const rows = [{
|
||||||
ReportingDate: "30 พ.ค. 2566", //วันที่รายงานตัว
|
ReportingDate: "30 พ.ค. 2566", //วันที่รายงานตัว
|
||||||
BMAOfficer: true,
|
BMAOfficer: true,
|
||||||
Status: "บรรจุเเล้ว",
|
Status: "บรรจุเเล้ว",
|
||||||
chackList: "เว้นไว้"
|
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -117,7 +107,7 @@ const rows = [{
|
||||||
ReportingDate: "30 พ.ค. 2566", //วันที่รายงานตัว
|
ReportingDate: "30 พ.ค. 2566", //วันที่รายงานตัว
|
||||||
BMAOfficer: true,
|
BMAOfficer: true,
|
||||||
Status: "บรรจุเเล้ว",
|
Status: "บรรจุเเล้ว",
|
||||||
chackList: "เว้นไว้"
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -127,17 +117,83 @@ const clickCancel = async () => {
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<q-form ref="myForm">
|
|
||||||
|
<q-form ref="myForm">
|
||||||
<Table
|
<Table
|
||||||
:rows="rows"
|
:rows="rows"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
|
|
||||||
v-model:editvisible="editvisible"
|
v-model:editvisible="editvisible"
|
||||||
|
|
||||||
:cancel="clickCancel"
|
:cancel="clickCancel"
|
||||||
|
|
||||||
:history="true"
|
:history="true"
|
||||||
:boss="true"
|
:boss="true"
|
||||||
:saveNoDraft="true"
|
:saveNoDraft="true"
|
||||||
|
>
|
||||||
/>
|
<template #columns="props">
|
||||||
|
<q-tr :props="props">
|
||||||
|
|
||||||
|
<q-icon
|
||||||
|
class="q-mr-sm"
|
||||||
|
size="15px"
|
||||||
|
color="primary"
|
||||||
|
name="mdi-bookmark"
|
||||||
|
v-if="props.row.isDirector"
|
||||||
|
></q-icon>
|
||||||
|
|
||||||
|
<q-td
|
||||||
|
v-for="col in props.cols"
|
||||||
|
:key="col.name"
|
||||||
|
:props="props"
|
||||||
|
@click="selectData(props.row)"
|
||||||
|
class="cursor-pointer"
|
||||||
|
>
|
||||||
|
|
||||||
|
<div v-if="col.name == 'isActive'" class="table_ellipsis">
|
||||||
|
<div v-if="!editvisible">
|
||||||
|
<q-icon
|
||||||
|
v-if="col.value == false"
|
||||||
|
name="mdi-close"
|
||||||
|
color="red"
|
||||||
|
class="text-h5"
|
||||||
|
/>
|
||||||
|
<q-icon
|
||||||
|
v-else
|
||||||
|
name="mdi-check"
|
||||||
|
color="positive"
|
||||||
|
class="text-h5"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<q-toggle
|
||||||
|
v-else
|
||||||
|
v-model="props.row.isActive"
|
||||||
|
dense
|
||||||
|
color="green"
|
||||||
|
@update:model-value="
|
||||||
|
clickIsActive(props.row.id, props.row.isActive)
|
||||||
|
"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div v-else class="table_ellipsis">
|
||||||
|
{{ col.value }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</q-td>
|
||||||
|
<q-td auto-width>
|
||||||
|
<q-btn
|
||||||
|
color="red"
|
||||||
|
flat
|
||||||
|
dense
|
||||||
|
round
|
||||||
|
size="14px"
|
||||||
|
icon="mdi-history"
|
||||||
|
@click="clickHistory(props.row)"
|
||||||
|
/>
|
||||||
|
</q-td>
|
||||||
|
</q-tr>
|
||||||
|
</template>
|
||||||
|
</Table>
|
||||||
</q-form>
|
</q-form>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -173,7 +173,7 @@
|
||||||
<!-- :rows-per-page-options="[0]" -->
|
<!-- :rows-per-page-options="[0]" -->
|
||||||
<template v-slot:header="props">
|
<template v-slot:header="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
<q-th auto-width v-if="boss == true" />
|
|
||||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||||
<span class="text-weight-medium">{{ col.label }}</span>
|
<span class="text-weight-medium">{{ col.label }}</span>
|
||||||
</q-th>
|
</q-th>
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ interface TableName {
|
||||||
ReportingDate: string; //วันที่รายงานตัว
|
ReportingDate: string; //วันที่รายงานตัว
|
||||||
BMAOfficer: boolean;
|
BMAOfficer: boolean;
|
||||||
Status: string;
|
Status: string;
|
||||||
chackList: any;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
interface RequestReport2 {
|
interface RequestReport2 {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue