fix bug
This commit is contained in:
parent
db60969d3f
commit
2f95271b1b
5 changed files with 139 additions and 99 deletions
|
|
@ -100,8 +100,9 @@ export default {
|
||||||
orgDeceasedProfile: `${orgPos}/profile/search`,
|
orgDeceasedProfile: `${orgPos}/profile/search`,
|
||||||
|
|
||||||
//
|
//
|
||||||
orgCheckAvatar: (id: string) => `${orgProfile}/avatar/profileId/${id}`,
|
orgCheckAvatar: (id: string) => `${orgProfile}/avatar/profileId-admin/${id}`,
|
||||||
orgCheckAvatarAdmin: (id: string) => `${orgProfile}/avatar/profileid-admin/${id}`,
|
orgCheckAvatarAdmin: (id: string) =>
|
||||||
|
`${orgProfile}/avatar/profileid-admin/${id}`,
|
||||||
orgCheckAvatarCard: (path: string) => `${organization}/${path}`, //noPernission
|
orgCheckAvatarCard: (path: string) => `${organization}/${path}`, //noPernission
|
||||||
|
|
||||||
changePosition: `${organization}/placement/change-position`,
|
changePosition: `${organization}/placement/change-position`,
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,8 @@ const avatarProfile = ref<string>("");
|
||||||
const filterKeyword = ref<string>("");
|
const filterKeyword = ref<string>("");
|
||||||
const position_line = ref<string>("");
|
const position_line = ref<string>("");
|
||||||
const position_level = ref<string>("");
|
const position_level = ref<string>("");
|
||||||
|
const position_type = ref<string>("");
|
||||||
|
|
||||||
const probation_status = ref<any>();
|
const probation_status = ref<any>();
|
||||||
const probation_statusold = ref<string>("");
|
const probation_statusold = ref<string>("");
|
||||||
const pagination = ref({
|
const pagination = ref({
|
||||||
|
|
@ -148,9 +150,9 @@ async function getAssignList() {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.probationGetAssignList(personalId.value))
|
.get(config.API.probationGetAssignList(personalId.value))
|
||||||
.then((res) => {
|
.then(async (res) => {
|
||||||
const data = res.data.data;
|
const data = await res.data.data;
|
||||||
rows.value = data.map((item: FormProbationDetail) => ({
|
rows.value = await data.map((item: FormProbationDetail) => ({
|
||||||
id: item.id,
|
id: item.id,
|
||||||
round_no: item.round_no,
|
round_no: item.round_no,
|
||||||
date_start: date2Thai(new Date(item.date_start)),
|
date_start: date2Thai(new Date(item.date_start)),
|
||||||
|
|
@ -160,7 +162,9 @@ async function getAssignList() {
|
||||||
chairman: item.chairman,
|
chairman: item.chairman,
|
||||||
}));
|
}));
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch((err) => {
|
||||||
|
messageError($q, err);
|
||||||
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
|
|
@ -171,8 +175,8 @@ async function getpersonalList() {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.personal(personalId.value))
|
.get(config.API.personal(personalId.value))
|
||||||
.then((res) => {
|
.then(async (res) => {
|
||||||
const data = res.data.data;
|
const data = await res.data.data;
|
||||||
name.value = data.name;
|
name.value = data.name;
|
||||||
position_line.value = data.position_line;
|
position_line.value = data.position_line;
|
||||||
position_level.value = data.position_level;
|
position_level.value = data.position_level;
|
||||||
|
|
@ -180,24 +184,27 @@ async function getpersonalList() {
|
||||||
probation_status.value = data.probation_status;
|
probation_status.value = data.probation_status;
|
||||||
probation_statusold.value = data.probation_status;
|
probation_statusold.value = data.probation_status;
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch((err) => {
|
||||||
|
messageError($q, err);
|
||||||
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** เปลี่ยนสถานะ */
|
/** เปลี่ยนสถานะ */
|
||||||
async function selectStatus() {
|
function selectStatus() {
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
$q,
|
$q,
|
||||||
async () => {
|
() => {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
http
|
||||||
.put(config.API.changestatusProbations(personalId.value), {
|
.put(config.API.changestatusProbations(personalId.value), {
|
||||||
status: probation_status.value,
|
status: probation_status.value,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then(async () => {
|
||||||
success($q, "แก้ไขสถานะสำเร็จ");
|
await getpersonalList();
|
||||||
|
await success($q, "แก้ไขสถานะสำเร็จ");
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
@ -205,7 +212,6 @@ async function selectStatus() {
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
getpersonalList();
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
"ยืนยันการเปลี่ยนสถานะการทดลองปฏิบัติหน้าที่ราชการ",
|
"ยืนยันการเปลี่ยนสถานะการทดลองปฏิบัติหน้าที่ราชการ",
|
||||||
|
|
@ -271,9 +277,7 @@ async function fetchProfilePhoto() {
|
||||||
|
|
||||||
/** get ค่า เมื่อโหลดหน้า */
|
/** get ค่า เมื่อโหลดหน้า */
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await getpersonalList();
|
await Promise.all([getpersonalList(), getAssignList(), fetchProfilePhoto()]);
|
||||||
await getAssignList();
|
|
||||||
fetchProfilePhoto();
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
@ -289,7 +293,7 @@ onMounted(async () => {
|
||||||
class="q-mr-sm"
|
class="q-mr-sm"
|
||||||
@click="router.push(`/probation/`)"
|
@click="router.push(`/probation/`)"
|
||||||
/>
|
/>
|
||||||
รายละเอียดงานที่ได้รับมอบหมายของ {{ name }}
|
รายละเอียดงานที่ได้รับมอบหมายของ{{ name }}
|
||||||
</div>
|
</div>
|
||||||
<q-card bordered class="row col-12 text-dark">
|
<q-card bordered class="row col-12 text-dark">
|
||||||
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
||||||
|
|
@ -322,7 +326,7 @@ onMounted(async () => {
|
||||||
|
|
||||||
<div class="col-xs-6 col-sm-2 row items-center">
|
<div class="col-xs-6 col-sm-2 row items-center">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="col-12 text-top">ระดับ</div>
|
<div class="col-12 text-top">ประเภทตำแหน่ง</div>
|
||||||
<div class="col-12 text-detail">{{ position_level }}</div>
|
<div class="col-12 text-detail">{{ position_level }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -458,8 +462,7 @@ onMounted(async () => {
|
||||||
<q-tooltip>รายละเอียด</q-tooltip>
|
<q-tooltip>รายละเอียด</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="checkPermission($route)?.attrIsUpdate
|
v-if="checkPermission($route)?.attrIsUpdate"
|
||||||
"
|
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
round
|
round
|
||||||
|
|
|
||||||
|
|
@ -89,9 +89,9 @@ const router = useRouter();
|
||||||
async function fetchEvaluation() {
|
async function fetchEvaluation() {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.kpiEvaluationUser + `/${id.value}`)
|
.get(config.API.kpiEvaluationUser + `/admin/${id.value}`)
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
const data = res.data.result;
|
const data = await res.data.result;
|
||||||
store.dataEvaluation = await data;
|
store.dataEvaluation = await data;
|
||||||
formProfile.status = await store.convertStatus(data.evaluationStatus);
|
formProfile.status = await store.convertStatus(data.evaluationStatus);
|
||||||
formProfile.result = await store.convertResults(data.evaluationResults);
|
formProfile.result = await store.convertResults(data.evaluationResults);
|
||||||
|
|
@ -240,7 +240,7 @@ async function getProfile() {
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
const data = await res.data.result;
|
const data = await res.data.result;
|
||||||
store.dataProfile = await data;
|
store.dataProfile = await data;
|
||||||
await setTimeout(() => {
|
setTimeout(() => {
|
||||||
store.checkStep();
|
store.checkStep();
|
||||||
}, 1000);
|
}, 1000);
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,7 @@ function fetchRoundOption() {
|
||||||
|
|
||||||
roundOp.value = list;
|
roundOp.value = list;
|
||||||
store.formQuery.round = list[0].id;
|
store.formQuery.round = list[0].id;
|
||||||
fetchList();
|
await fetchList();
|
||||||
} else {
|
} else {
|
||||||
roundOp.value = [];
|
roundOp.value = [];
|
||||||
store.formQuery.round = "";
|
store.formQuery.round = "";
|
||||||
|
|
@ -127,7 +127,7 @@ function fetchRoundOption() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// const status = ref<string>("");
|
// const status = ref<string>("");
|
||||||
function fetchList() {
|
async function fetchList() {
|
||||||
showLoader();
|
showLoader();
|
||||||
const body = {
|
const body = {
|
||||||
page: formQuery.page,
|
page: formQuery.page,
|
||||||
|
|
@ -136,13 +136,12 @@ function fetchList() {
|
||||||
keyword: store.formQuery.keyword
|
keyword: store.formQuery.keyword
|
||||||
? store.formQuery.keyword.replace(/\s+/g, "")
|
? store.formQuery.keyword.replace(/\s+/g, "")
|
||||||
: store.formQuery.keyword,
|
: store.formQuery.keyword,
|
||||||
// status: status.value,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
http
|
await http
|
||||||
.post(config.API.kpiUserEvaluation + `/list`, body)
|
.post(config.API.kpiUserEvaluation + `/list`, body)
|
||||||
.then((res) => {
|
.then(async (res) => {
|
||||||
const data = res.data.result;
|
const data = await res.data.result;
|
||||||
maxPage.value = Math.ceil(data.total / formQuery.pageSize);
|
maxPage.value = Math.ceil(data.total / formQuery.pageSize);
|
||||||
totalList.value = data.total;
|
totalList.value = data.total;
|
||||||
rows.value = data.data;
|
rows.value = data.data;
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,8 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import avatar from "@/assets/avatar_user.jpg";
|
|
||||||
import { ref, reactive, onMounted } from "vue";
|
import { ref, reactive, onMounted } from "vue";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import avatar from "@/assets/avatar_user.jpg";
|
||||||
|
|
||||||
import { useRoute, useRouter } from "vue-router";
|
import { useRoute, useRouter } from "vue-router";
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useQuasar, type QTableProps } from "quasar";
|
import { useQuasar, type QTableProps } from "quasar";
|
||||||
|
|
@ -20,19 +18,10 @@ interface ListMain {
|
||||||
}
|
}
|
||||||
|
|
||||||
const profileId = ref<string>("");
|
const profileId = ref<string>("");
|
||||||
const rows = ref<ListMain[]>([]);
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const {
|
const { messageError, findOrgName, showLoader, hideLoader, date2Thai } = mixin;
|
||||||
messageError,
|
|
||||||
dialogConfirm,
|
|
||||||
findOrgName,
|
|
||||||
showLoader,
|
|
||||||
hideLoader,
|
|
||||||
date2Thai,
|
|
||||||
} = mixin;
|
|
||||||
|
|
||||||
const filter = ref<string>("");
|
|
||||||
const mode = ref<any>($q.screen.gt.xs);
|
const mode = ref<any>($q.screen.gt.xs);
|
||||||
const profileImg = ref<string>("");
|
const profileImg = ref<string>("");
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
@ -50,16 +39,9 @@ const formData = reactive<any>({
|
||||||
});
|
});
|
||||||
const sizeImg = ref<string>("");
|
const sizeImg = ref<string>("");
|
||||||
|
|
||||||
/** ข้อมูลที่เเสดงในตาราง */
|
/** Table */
|
||||||
const visibleColumns = ref<string[]>([
|
const rows = ref<ListMain[]>([]);
|
||||||
"no",
|
const filter = ref<string>("");
|
||||||
"date_start",
|
|
||||||
"date_finish",
|
|
||||||
"mentors",
|
|
||||||
"commander",
|
|
||||||
]);
|
|
||||||
|
|
||||||
/** หัวตาราง */
|
|
||||||
const columns = ref<QTableProps["columns"]>([
|
const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "no",
|
name: "no",
|
||||||
|
|
@ -109,38 +91,45 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
const visibleColumns = ref<string[]>([
|
||||||
|
"no",
|
||||||
|
"date_start",
|
||||||
|
"date_finish",
|
||||||
|
"mentors",
|
||||||
|
"commander",
|
||||||
|
]);
|
||||||
|
|
||||||
function onResize(size: any) {
|
function onResize(size: any) {
|
||||||
const width = size.width > 100 ? 100 : size.width;
|
const width = size.width > 100 ? 100 : size.width;
|
||||||
sizeImg.value = `${width}px`;
|
sizeImg.value = `${width}px`;
|
||||||
}
|
}
|
||||||
|
|
||||||
function onMobile(type: string) {
|
/**
|
||||||
router.push(`/registry/${type}`);
|
* fetch ข้แมูลส่วนตัว
|
||||||
}
|
*/
|
||||||
|
async function getMain() {
|
||||||
function getMain() {
|
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
await http
|
||||||
.get(config.API.profilePosition + `/${idEva.value}`)
|
.get(config.API.profilePosition + `/${idEva.value}`)
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
const data = res.data.result;
|
const data = await res.data.result;
|
||||||
formData.prefix = data.prefix;
|
formData.prefix = data.prefix;
|
||||||
formData.firstName = data.firstName;
|
formData.firstName = data.firstName;
|
||||||
formData.lastName = data.lastName;
|
formData.lastName = data.lastName;
|
||||||
formData.position = data.position;
|
formData.position = data.position;
|
||||||
|
|
||||||
formData.posTypeName = data.posTypeName;
|
formData.posTypeName = data.posTypeName;
|
||||||
formData.posExecutiveName = data.posExecutiveName;
|
formData.posExecutiveName = data.posExecutiveName;
|
||||||
formData.posLevelName = data.posLevelName;
|
formData.posLevelName = data.posLevelName;
|
||||||
formData.org = findOrgName(data);
|
formData.org = findOrgName(data);
|
||||||
profileId.value = data.profileId;
|
profileId.value = data.profileId;
|
||||||
if (data.avatarName) {
|
const promises = [];
|
||||||
getImg(data.profileId, data.avatarName);
|
promises.push(getList(data.profileId)); // fetch รายการทดลองงาน
|
||||||
|
if (profileId.value) {
|
||||||
|
promises.push(fetchProfilePhoto(profileId.value)); // fetch รูปโปรไฟล์
|
||||||
} else {
|
} else {
|
||||||
profileImg.value = avatar;
|
profileImg.value = avatar;
|
||||||
}
|
}
|
||||||
await getList(data.profileId);
|
await Promise.all(promises);
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
@ -150,28 +139,71 @@ function getMain() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function getList(id: string) {
|
/**
|
||||||
http
|
* fetch รายการทดลองงาน
|
||||||
|
* @param id โปรไฟล์
|
||||||
|
*/
|
||||||
|
async function getList(id: string) {
|
||||||
|
showLoader();
|
||||||
|
await http
|
||||||
.get(config.API.probationGetAssignList(id))
|
.get(config.API.probationGetAssignList(id))
|
||||||
.then((res) => {
|
.then(async (res) => {
|
||||||
const data = res.data.data;
|
const data = await res.data.data;
|
||||||
rows.value = data;
|
rows.value = data;
|
||||||
})
|
})
|
||||||
.catch((e) => {})
|
|
||||||
.finally(() => {});
|
|
||||||
}
|
|
||||||
function getImg(id: string, pathName: string) {
|
|
||||||
http
|
|
||||||
.get(config.API.fileByFile("ทะเบียนประวัติ", "โปรไฟล์", id, pathName))
|
|
||||||
.then((res) => {
|
|
||||||
profileImg.value = res.data.downloadUrl;
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {});
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* chceck รูปโปรไฟล์
|
||||||
|
* @param id โปรไฟล์
|
||||||
|
*/
|
||||||
|
async function fetchProfilePhoto(id: string) {
|
||||||
|
await http
|
||||||
|
.get(config.API.orgCheckAvatar(id))
|
||||||
|
.then(async (res) => {
|
||||||
|
// ถ้ามีรูปให่ fetch รูป
|
||||||
|
if (res.data.result.avatarName) {
|
||||||
|
await http
|
||||||
|
.get(
|
||||||
|
config.API.fileByFile(
|
||||||
|
"ทะเบียนประวัติ",
|
||||||
|
"โปรไฟล์",
|
||||||
|
id,
|
||||||
|
res.data.result.avatarName
|
||||||
|
)
|
||||||
|
)
|
||||||
|
.then(async (res) => {
|
||||||
|
profileImg.value = await res.data.downloadUrl;
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
messageError($q, err);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
// ไม่มีรูปให่ set รูป เป็น default
|
||||||
|
profileImg.value = avatar;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
messageError($q, err);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* redairect การทดลองปฏิบัติหน้าที่ราชการ
|
||||||
|
* @param id ทดลองงาน
|
||||||
|
*/
|
||||||
function onDetail(id: string) {
|
function onDetail(id: string) {
|
||||||
router.push(`/probation/detail/${profileId.value}/${id}`);
|
router.push(`/probation/detail/${profileId.value}/${id}`);
|
||||||
}
|
}
|
||||||
|
|
@ -209,7 +241,7 @@ onMounted(async () => {
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-2 text-center self-center">
|
<div class="col-2 text-center self-center">
|
||||||
<q-avatar :size="sizeImg" rounded>
|
<q-avatar :size="sizeImg" rounded>
|
||||||
<img
|
<q-img
|
||||||
:src="profileImg"
|
:src="profileImg"
|
||||||
style="border-radius: 10px; object-fit: cover"
|
style="border-radius: 10px; object-fit: cover"
|
||||||
/>
|
/>
|
||||||
|
|
@ -218,7 +250,7 @@ onMounted(async () => {
|
||||||
<div class="col-10 column justify-center no-wrap">
|
<div class="col-10 column justify-center no-wrap">
|
||||||
<div class="row text-grey-6">
|
<div class="row text-grey-6">
|
||||||
<div class="col-4">ตำแหน่งในสายงาน</div>
|
<div class="col-4">ตำแหน่งในสายงาน</div>
|
||||||
<div class="col-4">ระดับ</div>
|
<div class="col-4">ประเภทตำแหน่ง</div>
|
||||||
<div class="col-4">สังกัด</div>
|
<div class="col-4">สังกัด</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
@ -226,7 +258,13 @@ onMounted(async () => {
|
||||||
{{ formData.position ? formData.position : "-" }}
|
{{ formData.position ? formData.position : "-" }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4">
|
<div class="col-4">
|
||||||
{{ formData.posLevelName ? formData.posLevelName : "-" }}
|
{{
|
||||||
|
formData.posTypeName
|
||||||
|
? formData.posLevelName
|
||||||
|
? `${formData.posTypeName}(${formData.posLevelName})`
|
||||||
|
: formData.posTypeName
|
||||||
|
: "-"
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4">
|
<div class="col-4">
|
||||||
{{ formData.org ? formData.org : "-" }}
|
{{ formData.org ? formData.org : "-" }}
|
||||||
|
|
@ -289,16 +327,6 @@ onMounted(async () => {
|
||||||
<div class="col-12 row">
|
<div class="col-12 row">
|
||||||
<q-card bordered class="col-12 q-pa-md">
|
<q-card bordered class="col-12 q-pa-md">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<!-- <q-btn
|
|
||||||
@click="router.push(`/probation/add/${profileId}`)"
|
|
||||||
size="12px"
|
|
||||||
flat
|
|
||||||
round
|
|
||||||
color="add"
|
|
||||||
icon="mdi-plus"
|
|
||||||
>
|
|
||||||
<q-tooltip>เพิ่มงานที่ได้รับมอบหมาย</q-tooltip>
|
|
||||||
</q-btn> -->
|
|
||||||
<q-space />
|
<q-space />
|
||||||
<q-input
|
<q-input
|
||||||
class="inputgreen"
|
class="inputgreen"
|
||||||
|
|
@ -357,6 +385,7 @@ onMounted(async () => {
|
||||||
>
|
>
|
||||||
<template v-slot:header="props">
|
<template v-slot:header="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
|
<q-th auto-width />
|
||||||
<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>
|
||||||
|
|
@ -364,12 +393,20 @@ onMounted(async () => {
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-if="$q.screen.gt.xs" v-slot:body="props">
|
<template v-if="$q.screen.gt.xs" v-slot:body="props">
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
<q-tr :props="props">
|
||||||
<q-td
|
<q-td auto-width>
|
||||||
v-for="(col, index) in props.cols"
|
<q-btn
|
||||||
:key="col.name"
|
flat
|
||||||
@click="onDetail(props.row.id)"
|
dense
|
||||||
>
|
color="info"
|
||||||
|
icon="mdi-eye"
|
||||||
|
round
|
||||||
|
@click="onDetail(props.row.id)"
|
||||||
|
>
|
||||||
|
<q-tooltip> ดูรายละเอียด </q-tooltip>
|
||||||
|
</q-btn>
|
||||||
|
</q-td>
|
||||||
|
<q-td v-for="col in props.cols" :key="col.name">
|
||||||
<div v-if="col.name == 'no'">
|
<div v-if="col.name == 'no'">
|
||||||
{{ props.rowIndex + 1 }}
|
{{ props.rowIndex + 1 }}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue