รายละเอียดงานที่ได้รับมอบหมาย
This commit is contained in:
parent
0c05cc41a6
commit
ec80361a81
2 changed files with 43 additions and 58 deletions
|
|
@ -477,9 +477,6 @@ onMounted(async () => {
|
||||||
<q-img src="@/assets/avatar_user.jpg" v-else />
|
<q-img src="@/assets/avatar_user.jpg" v-else />
|
||||||
</q-avatar>
|
</q-avatar>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="row text-center">
|
|
||||||
|
|
||||||
</div> -->
|
|
||||||
|
|
||||||
<div
|
<div
|
||||||
v-if="$q.screen.gt.xs"
|
v-if="$q.screen.gt.xs"
|
||||||
|
|
@ -588,23 +585,7 @@ onMounted(async () => {
|
||||||
>ส่งให้ผู้ประเมินรายงานผลสำเร็จของงาน</q-tooltip
|
>ส่งให้ผู้ประเมินรายงานผลสำเร็จของงาน</q-tooltip
|
||||||
>
|
>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<!-- <q-btn
|
|
||||||
v-if="
|
|
||||||
store.rolePerson == 'EVALUATOR' &&
|
|
||||||
store.dataEvaluation.evaluationStatus ==
|
|
||||||
'EVALUATING_EVALUATOR' &&
|
|
||||||
store.tabMain == '3'
|
|
||||||
"
|
|
||||||
unelevated
|
|
||||||
round
|
|
||||||
icon="mdi-send"
|
|
||||||
color="grey-2"
|
|
||||||
text-color="blue-6"
|
|
||||||
size="md"
|
|
||||||
@click="sendToSummary('SUMMARY')"
|
|
||||||
>
|
|
||||||
<q-tooltip>ส่งไปสรุปผลการประเมิน</q-tooltip>
|
|
||||||
</q-btn> -->
|
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="
|
v-if="
|
||||||
store.rolePerson == 'USER' &&
|
store.rolePerson == 'USER' &&
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ 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 { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
import { useRoute, useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
@ -15,21 +15,12 @@ const profileId = ref<string>("");
|
||||||
const rows = ref<ListMain[]>([]);
|
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();
|
||||||
const route = useRoute();
|
|
||||||
const idEva = ref<string>(route.params.id as string);
|
|
||||||
const formData = reactive<any>({
|
const formData = reactive<any>({
|
||||||
prefix: "",
|
prefix: "",
|
||||||
firstName: "",
|
firstName: "",
|
||||||
|
|
@ -42,16 +33,8 @@ const formData = reactive<any>({
|
||||||
});
|
});
|
||||||
const sizeImg = ref<string>("");
|
const sizeImg = ref<string>("");
|
||||||
|
|
||||||
/** ข้อมูลที่เเสดงในตาราง */
|
/** Table */
|
||||||
const visibleColumns = ref<string[]>([
|
const filter = ref<string>("");
|
||||||
"no",
|
|
||||||
"date_start",
|
|
||||||
"date_finish",
|
|
||||||
"mentors",
|
|
||||||
"commander",
|
|
||||||
]);
|
|
||||||
|
|
||||||
/** หัวตาราง */
|
|
||||||
const columns = ref<QTableProps["columns"]>([
|
const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "no",
|
name: "no",
|
||||||
|
|
@ -101,22 +84,25 @@ 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}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
function getMain() {
|
function getMain() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.orgPosition + `/${idEva.value}`)
|
.get(config.API.profilePosition())
|
||||||
.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;
|
||||||
|
|
@ -127,12 +113,15 @@ function getMain() {
|
||||||
formData.posLevelName = data.posLevelName;
|
formData.posLevelName = data.posLevelName;
|
||||||
formData.org = findOrgName(data);
|
formData.org = findOrgName(data);
|
||||||
profileId.value = data.profileId;
|
profileId.value = data.profileId;
|
||||||
|
const promises = [];
|
||||||
|
promises.push(getList(data.profileId));
|
||||||
if (data.avatarName) {
|
if (data.avatarName) {
|
||||||
getImg(data.profileId, data.avatarName);
|
promises.push(getImg(data.profileId, data.avatarName));
|
||||||
} 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);
|
||||||
|
|
@ -143,17 +132,24 @@ function getMain() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function getList(id: string) {
|
function getList(id: string) {
|
||||||
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.probationMain(id))
|
.get(config.API.probationMain(id))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.data;
|
const data = res.data.data;
|
||||||
rows.value = data;
|
rows.value = data;
|
||||||
})
|
})
|
||||||
.catch((e) => {})
|
.catch((e) => {
|
||||||
.finally(() => {});
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
function getImg(id: string, pathName: string) {
|
|
||||||
http
|
async function getImg(id: string, pathName: string) {
|
||||||
|
showLoader();
|
||||||
|
await http
|
||||||
.get(config.API.fileByFile("ทะเบียนประวัติ", "โปรไฟล์", id, pathName))
|
.get(config.API.fileByFile("ทะเบียนประวัติ", "โปรไฟล์", id, pathName))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
profileImg.value = res.data.downloadUrl;
|
profileImg.value = res.data.downloadUrl;
|
||||||
|
|
@ -161,7 +157,9 @@ function getImg(id: string, pathName: string) {
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {});
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function onDetail(id: string) {
|
function onDetail(id: string) {
|
||||||
|
|
@ -203,7 +201,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"
|
||||||
/>
|
/>
|
||||||
|
|
@ -212,7 +210,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">
|
||||||
|
|
@ -220,7 +218,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 : "-" }}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue