Refactoring code module 03_recruiting
This commit is contained in:
parent
b223c2433e
commit
87e2e3b080
36 changed files with 6139 additions and 6335 deletions
|
|
@ -1,86 +1,7 @@
|
|||
<!-- page:main page สรรหา -->
|
||||
<template>
|
||||
<div class="toptitle text-dark col-12 row items-center">
|
||||
รายการนำเข้าข้อมูลผู้สมัครสอบแข่งขัน
|
||||
</div>
|
||||
<q-card flat bordered class="col-12 q-mt-sm q-pt-sm q-pa-md">
|
||||
<div>
|
||||
<Table
|
||||
:rows="rows"
|
||||
:columns="columns"
|
||||
:filter="filter"
|
||||
:visible-columns="visibleColumns"
|
||||
v-model:inputfilter="filter"
|
||||
v-model:inputvisible="visibleColumns"
|
||||
:nornmalData="false"
|
||||
>
|
||||
<template #columns="props">
|
||||
<q-tr :props="props" class="cursor-pointer">
|
||||
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<div v-if="col.name == 'no'" @click="clickEdit(props.row.year)">
|
||||
{{ props.rowIndex + 1 }}
|
||||
</div>
|
||||
<div
|
||||
v-else-if="col.name == 'name'"
|
||||
class="table_ellipsis2"
|
||||
@click="clickEdit(props.row.year)"
|
||||
>
|
||||
{{ col.value }}
|
||||
</div>
|
||||
<div v-else-if="col.name == 'file'">
|
||||
<q-btn
|
||||
size="13px"
|
||||
flat
|
||||
class="bg-blue-1 q-ml-xs"
|
||||
color="blue"
|
||||
v-if="col.value == null || file == false"
|
||||
>
|
||||
<q-icon
|
||||
name="mdi-file-excel-outline"
|
||||
size="20px"
|
||||
class="q-mr-sm"
|
||||
/>
|
||||
นำเข้าไฟล์
|
||||
<q-tooltip>นำเข้าไฟล์ excel</q-tooltip>
|
||||
</q-btn>
|
||||
<div v-else>
|
||||
<q-chip
|
||||
removable
|
||||
color="grey-2"
|
||||
text-color="grey-9"
|
||||
:label="col.value"
|
||||
size="14px"
|
||||
square
|
||||
icon-remove="mdi-close"
|
||||
v-model="file"
|
||||
@remove="remove"
|
||||
>
|
||||
<q-tooltip>{{ col.value }}</q-tooltip>
|
||||
</q-chip>
|
||||
<q-btn
|
||||
size="14px"
|
||||
flat
|
||||
dense
|
||||
color="positive"
|
||||
icon="mdi-content-save-settings-outline"
|
||||
>
|
||||
<q-tooltip>บันทึกคะแนนสอบ</q-tooltip>
|
||||
</q-btn>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else @click="clickEdit(props.row.year)">
|
||||
{{ col.value }}
|
||||
</div>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
</Table>
|
||||
</div>
|
||||
</q-card>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import type { QTableProps } from "quasar";
|
||||
import { onMounted, ref, watch } from "vue";
|
||||
import { ref } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import { useQuasar } from "quasar";
|
||||
import Table from "@/modules/03_recruiting/components/Table.vue";
|
||||
|
|
@ -178,19 +99,17 @@ const columns = ref<QTableProps["columns"]>([
|
|||
},
|
||||
]);
|
||||
|
||||
/**
|
||||
* เปืด dialog digital
|
||||
* @param id
|
||||
*/
|
||||
const rows = ref<any[]>([]);
|
||||
|
||||
onMounted(async () => {
|
||||
await fetchData();
|
||||
});
|
||||
|
||||
const fetchData = () => {};
|
||||
|
||||
const clickEdit = (id: string) => {
|
||||
function clickEdit(id: string) {
|
||||
router.push(`/compete/import/${id}`);
|
||||
};
|
||||
}
|
||||
|
||||
const remove = () => {
|
||||
function remove() {
|
||||
$q.dialog({
|
||||
title: "ยืนยันการลบเอกสารข้อมูล",
|
||||
message: "ต้องการลบเอกสารนี้ใช่หรือไม่?",
|
||||
|
|
@ -207,7 +126,87 @@ const remove = () => {
|
|||
file.value = true;
|
||||
})
|
||||
.onDismiss(() => {});
|
||||
};
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<div class="toptitle text-dark col-12 row items-center">
|
||||
รายการนำเข้าข้อมูลผู้สมัครสอบแข่งขัน
|
||||
</div>
|
||||
<q-card flat bordered class="col-12 q-mt-sm q-pt-sm q-pa-md">
|
||||
<div>
|
||||
<Table
|
||||
:rows="rows"
|
||||
:columns="columns"
|
||||
:filter="filter"
|
||||
:visible-columns="visibleColumns"
|
||||
v-model:inputfilter="filter"
|
||||
v-model:inputvisible="visibleColumns"
|
||||
:nornmalData="false"
|
||||
>
|
||||
<template #columns="props">
|
||||
<q-tr :props="props" class="cursor-pointer">
|
||||
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<div v-if="col.name == 'no'" @click="clickEdit(props.row.year)">
|
||||
{{ props.rowIndex + 1 }}
|
||||
</div>
|
||||
<div
|
||||
v-else-if="col.name == 'name'"
|
||||
class="table_ellipsis2"
|
||||
@click="clickEdit(props.row.year)"
|
||||
>
|
||||
{{ col.value }}
|
||||
</div>
|
||||
<div v-else-if="col.name == 'file'">
|
||||
<q-btn
|
||||
size="13px"
|
||||
flat
|
||||
class="bg-blue-1 q-ml-xs"
|
||||
color="blue"
|
||||
v-if="col.value == null || file == false"
|
||||
>
|
||||
<q-icon
|
||||
name="mdi-file-excel-outline"
|
||||
size="20px"
|
||||
class="q-mr-sm"
|
||||
/>
|
||||
นำเข้าไฟล์
|
||||
<q-tooltip>นำเข้าไฟล์ excel</q-tooltip>
|
||||
</q-btn>
|
||||
<div v-else>
|
||||
<q-chip
|
||||
removable
|
||||
color="grey-2"
|
||||
text-color="grey-9"
|
||||
:label="col.value"
|
||||
size="14px"
|
||||
square
|
||||
icon-remove="mdi-close"
|
||||
v-model="file"
|
||||
@remove="remove"
|
||||
>
|
||||
<q-tooltip>{{ col.value }}</q-tooltip>
|
||||
</q-chip>
|
||||
<q-btn
|
||||
size="14px"
|
||||
flat
|
||||
dense
|
||||
color="positive"
|
||||
icon="mdi-content-save-settings-outline"
|
||||
>
|
||||
<q-tooltip>บันทึกคะแนนสอบ</q-tooltip>
|
||||
</q-btn>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else @click="clickEdit(props.row.year)">
|
||||
{{ col.value }}
|
||||
</div>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
</Table>
|
||||
</div>
|
||||
</q-card>
|
||||
</template>
|
||||
|
||||
|
||||
<style></style>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue