แก้ไขประเมินบุคคล

This commit is contained in:
Warunee Tamkoo 2023-12-23 12:18:19 +07:00
parent 74e65d80a4
commit 23b522f1ee
3 changed files with 33 additions and 17 deletions

View file

@ -11,6 +11,7 @@ const config = ref<any>({
// API_URI: "https://localhost:7260/api",
API_URI: "https://bma-ehr.frappet.synology.me/api/v1",
MEET_URI: "meet.frappet.com",
LINK_EVALUATE_PUBLISH: "https://bma-ehr-publish.frappet.synology.me",
},
test: {
API_URI: "http://localhost:5010/api/v1",
@ -21,15 +22,20 @@ const config = ref<any>({
API_URI_ORG_TREE:
"https://s3cluster.frappet.com/bma-ehr-fpt/organization/strueture/tree_20230707_115124.json",
MEET_URI: "meet.frappet.com",
LINK_EVALUATE_PUBLISH: `${window.location.protocol}//${window.location.host}`,
},
});
const API_URI = ref<string>(config.value[env.value].API_URI);
const MEET_URI = ref<string>(config.value[env.value].MEET_URI);
const LINK_EVALUATE_PUBLISH = ref<string>(
config.value[env.value].LINK_EVALUATE_PUBLISH
);
export default {
env: env.value,
config: config.value,
API_URI: API_URI.value,
MEET_URI: MEET_URI.value,
LINK_EVALUATE_PUBLISH: LINK_EVALUATE_PUBLISH.value,
};

View file

@ -139,8 +139,13 @@ async function fetchCheckDate() {
.get(config.API.evaluationCheckDate(props.evaluateId))
.then((res) => {
const data = res.data.result;
dateStartPrepareDoc2.value = date2Thai(data.dateStartPrepareDoc2);
dateEndPrepareDoc2.value = date2Thai(data.dateEndPrepareDoc2);
// dateStartPrepareDoc2.value = date2Thai(data.dateStartPrepareDoc2);
const endDate = new Date(data.dateStartAnnounce);
endDate.setDate(endDate.getDate() + 210);
dateEndPrepareDoc2.value = date2Thai(endDate);
dateEndPrepareDoc2.value = data.dateEndPrepareDoc2
? date2Thai(data.dateEndPrepareDoc2)
: dateEndPrepareDoc2.value;
})
.catch((err) => {}));
}

View file

@ -4,33 +4,38 @@ import { useQuasar } from "quasar";
import { useEvaluateStore } from "@/modules/06_evaluate/store";
import { useCounterMixin } from "@/stores/mixin";
import env from "@/api";
const mixin = useCounterMixin();
const stroe = useEvaluateStore();
const $q = useQuasar();
const { success } = mixin;
const link = ref<string>(
`https://bma-ehr-publish.frappet.synology.me/${stroe.evaluateId}`
);
const link = ref<string>(env.LINK_EVALUATE_PUBLISH);
async function onClickCopyLink() {
const textarea = document.createElement("textarea");
textarea.value = link.value;
document.body.appendChild(textarea);
textarea.select();
document.execCommand("copy");
success($q, "คัดลอกลิ้งค์สำเร็จ");
function copyLink() {
const linkById = `${link.value}/${stroe.evaluateId}`;
navigator.clipboard.writeText(linkById);
success($q, "คัดลอกสำเร็จ");
}
// async function onClickCopyLink() {
// const textarea = document.createElement("textarea");
// textarea.value = link.value;
// document.body.appendChild(textarea);
// textarea.select();
// document.execCommand("copy");
// success($q, "");
// }
</script>
<template>
<div class="row">
<div class="col-12 text-center">
<div>
<p class="text-weight-bold" style="font-size: 18px">Public URL</p>
<a :href="link" target="_blank">{{ link }}</a>
</div>
<!-- <div> -->
<p class="text-weight-bold q-mb-none">Public URL</p>
<!-- <a :href="link + '/' + id" target="_blank">{{ `${link}/${id}` }}</a> -->
<!-- </div> -->
<q-btn
class="q-mt-md"
@ -38,7 +43,7 @@ async function onClickCopyLink() {
icon="mdi-clipboard-outline"
label="คัดลอกลิ้งค์"
color="primary"
@click="onClickCopyLink"
@click="copyLink"
>
<q-tooltip> ดลอกลงค </q-tooltip></q-btn
>