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) =>
|
||||
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 = [{
|
||||
position: 1,
|
||||
|
|
@ -106,7 +96,7 @@ const rows = [{
|
|||
ReportingDate: "30 พ.ค. 2566", //วันที่รายงานตัว
|
||||
BMAOfficer: true,
|
||||
Status: "บรรจุเเล้ว",
|
||||
chackList: "เว้นไว้"
|
||||
|
||||
|
||||
},
|
||||
{
|
||||
|
|
@ -117,7 +107,7 @@ const rows = [{
|
|||
ReportingDate: "30 พ.ค. 2566", //วันที่รายงานตัว
|
||||
BMAOfficer: true,
|
||||
Status: "บรรจุเเล้ว",
|
||||
chackList: "เว้นไว้"
|
||||
|
||||
|
||||
},
|
||||
|
||||
|
|
@ -127,17 +117,83 @@ const clickCancel = async () => {
|
|||
};
|
||||
</script>
|
||||
<template>
|
||||
<q-form ref="myForm">
|
||||
|
||||
<q-form ref="myForm">
|
||||
<Table
|
||||
:rows="rows"
|
||||
:columns="columns"
|
||||
|
||||
v-model:editvisible="editvisible"
|
||||
|
||||
:cancel="clickCancel"
|
||||
|
||||
:history="true"
|
||||
:boss="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>
|
||||
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@
|
|||
<!-- :rows-per-page-options="[0]" -->
|
||||
<template v-slot:header="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">
|
||||
<span class="text-weight-medium">{{ col.label }}</span>
|
||||
</q-th>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ interface TableName {
|
|||
ReportingDate: string; //วันที่รายงานตัว
|
||||
BMAOfficer: boolean;
|
||||
Status: string;
|
||||
chackList: any;
|
||||
|
||||
}
|
||||
|
||||
interface RequestReport2 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue