Merge branch 'develop' of github.com:Frappet/bma-ehr-frontend into develop
This commit is contained in:
commit
bbb83f0da4
9 changed files with 40 additions and 46 deletions
3
.env
3
.env
|
|
@ -6,4 +6,5 @@ VITE_S3CLUSTER_PUBLIC_URL: "https://s3cluster.frappet.com/bma-ehr-fpt/organizati
|
||||||
VITE_URL_KEYCLOAK: "https://id.frappet.synology.me"
|
VITE_URL_KEYCLOAK: "https://id.frappet.synology.me"
|
||||||
VITE_REALM_KEYCLOAK: "bma-ehr"
|
VITE_REALM_KEYCLOAK: "bma-ehr"
|
||||||
VITE_CLIENTID_KEYCLOAK: "gettoken"
|
VITE_CLIENTID_KEYCLOAK: "gettoken"
|
||||||
VITE_CLIENTSECRET_KEYCLOAK: "qsFwDb5anVoXKKwoeivrByIn9VYWQNRn"
|
VITE_CLIENTSECRET_KEYCLOAK: "qsFwDb5anVoXKKwoeivrByIn9VYWQNRn"
|
||||||
|
VITE_URL_SSO: "https://bma-sso.frappet.synology.me"
|
||||||
|
|
@ -8,4 +8,5 @@ VITE_URL_KEYCLOAK: VITE_URL_KEYCLOAK
|
||||||
VITE_REALM_KEYCLOAK: VITE_REALM_KEYCLOAK
|
VITE_REALM_KEYCLOAK: VITE_REALM_KEYCLOAK
|
||||||
VITE_CLIENTID_KEYCLOAK: VITE_CLIENTID_KEYCLOAK
|
VITE_CLIENTID_KEYCLOAK: VITE_CLIENTID_KEYCLOAK
|
||||||
VITE_CLIENTSECRET_KEYCLOAK: VITE_CLIENTSECRET_KEYCLOAK
|
VITE_CLIENTSECRET_KEYCLOAK: VITE_CLIENTSECRET_KEYCLOAK
|
||||||
VITE_MANUAL_URL: VITE_MANUAL_URL
|
VITE_MANUAL_URL: VITE_MANUAL_URL
|
||||||
|
VITE_URL_SSO: VITE_URL_SSO
|
||||||
|
|
@ -19,6 +19,7 @@ do
|
||||||
sed -i 's|VITE_CLIENTID_KEYCLOAK|'${VITE_CLIENTID_KEYCLOAK}'|g' $file
|
sed -i 's|VITE_CLIENTID_KEYCLOAK|'${VITE_CLIENTID_KEYCLOAK}'|g' $file
|
||||||
sed -i 's|VITE_CLIENTSECRET_KEYCLOAK|'${VITE_CLIENTSECRET_KEYCLOAK}'|g' $file
|
sed -i 's|VITE_CLIENTSECRET_KEYCLOAK|'${VITE_CLIENTSECRET_KEYCLOAK}'|g' $file
|
||||||
sed -i 's|VITE_MANUAL_URL|'${VITE_MANUAL_URL}'|g' $file
|
sed -i 's|VITE_MANUAL_URL|'${VITE_MANUAL_URL}'|g' $file
|
||||||
|
sed -i 's|VITE_URL_SSO|'${VITE_URL_SSO}'|g' $file
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@ import { useCommandDetail } from "@/modules/18_command/store/DetailStore";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
import LiveView from "@/modules/18_command/components/Step/View0_Live.vue";
|
import LiveView from "@/modules/18_command/components/Step/View0_Live.vue"; //เซ็นสด
|
||||||
import DigitalView from "@/modules/18_command/components/Step/View0_Digital.vue";
|
import DigitalView from "@/modules/18_command/components/Step/View0_Digital.vue"; //Digital Signature
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
@ -19,7 +19,7 @@ const { showLoader, hideLoader, messageError, dialogConfirm } =
|
||||||
useCounterMixin();
|
useCounterMixin();
|
||||||
|
|
||||||
const commandId = ref<string>(route.params.id.toString()); //ID คำสั่ง
|
const commandId = ref<string>(route.params.id.toString()); //ID คำสั่ง
|
||||||
const step = ref<number>(1);
|
const step = ref<number>(1); //สถานะของคำสั่ง
|
||||||
const isStatus = ref<string>(""); //สถานะของคำสั่ง
|
const isStatus = ref<string>(""); //สถานะของคำสั่ง
|
||||||
const signaturetype = ref<string>(""); //วิธีการลงนาม
|
const signaturetype = ref<string>(""); //วิธีการลงนาม
|
||||||
const isSignature = ref<boolean | null>(null);
|
const isSignature = ref<boolean | null>(null);
|
||||||
|
|
@ -28,6 +28,7 @@ const isDraft = ref<boolean>(false); //ทำแบบร่าง
|
||||||
const isSign = ref<boolean>(false); //การลงนาม
|
const isSign = ref<boolean>(false); //การลงนาม
|
||||||
const isAttachment = ref<boolean>(false); //เอกสารแนบท้าย
|
const isAttachment = ref<boolean>(false); //เอกสารแนบท้าย
|
||||||
|
|
||||||
|
/** ฟังก์ชันเรียกข้อมูลสถานะคำสั่ง*/
|
||||||
async function fetchData() {
|
async function fetchData() {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
|
|
@ -55,6 +56,7 @@ async function fetchData() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** ฟังก์ชันยืนยันวิธีลงนาม*/
|
||||||
function onConfirmSignature() {
|
function onConfirmSignature() {
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
$q,
|
$q,
|
||||||
|
|
|
||||||
|
|
@ -36,21 +36,21 @@ const props = defineProps({
|
||||||
|
|
||||||
const commandId = ref<string>(route.params.id.toString()); //ID คำสั่ง
|
const commandId = ref<string>(route.params.id.toString()); //ID คำสั่ง
|
||||||
// ฟอร์มข้อมูล
|
// ฟอร์มข้อมูล
|
||||||
let formData = reactive({
|
let formData = reactive<FormDataDetail>({
|
||||||
commandNo: "",
|
issue: null, //คำสั่งเรื่อง
|
||||||
commandYear: null,
|
commandNo: "", //คำสั่งเลขที่
|
||||||
detailHeader: "",
|
commandYear: null, //พ.ศ.
|
||||||
detailBody: "",
|
detailHeader: "", //เนื้อหาคำสั่งขึ้นต้น
|
||||||
detailFooter: "",
|
detailBody: "", //เนื้อหาคำสั่งหลัก
|
||||||
issue: null,
|
detailFooter: "", //เนื้อหาคำสั่งลงท้าย
|
||||||
commandAffectDate: null, //วันที่ลงนาม
|
commandAffectDate: null, //วันที่ลงนาม
|
||||||
commandExcecuteDate: null, //วันที่คำสั่งมีผล
|
commandExcecuteDate: null, //วันที่คำสั่งมีผล
|
||||||
isBangkok: null,
|
isBangkok: null, //คำสั่งสำนักปลัดกรุงเทพมหานคร
|
||||||
// isAttachment: true,
|
|
||||||
});
|
});
|
||||||
const modalPreview = ref<boolean>(false); //แสดงตัวอย่าง
|
const modalPreview = ref<boolean>(false); //แสดงตัวอย่าง
|
||||||
const isIdofficer = ref<boolean>(false); //เช็ค สกจ.
|
const isIdofficer = ref<boolean>(false); //เช็ค สกจ.
|
||||||
|
|
||||||
|
/** ฟังก์ชันเช็ค สกจ.*/
|
||||||
async function fetchCheckIdofficer() {
|
async function fetchCheckIdofficer() {
|
||||||
await http
|
await http
|
||||||
.get(config.API.checkIdofficer)
|
.get(config.API.checkIdofficer)
|
||||||
|
|
@ -90,7 +90,6 @@ async function onSubmit() {
|
||||||
*/
|
*/
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await fetchCheckIdofficer();
|
await fetchCheckIdofficer();
|
||||||
|
|
||||||
formData.commandNo = props.formCommandList.commandNo;
|
formData.commandNo = props.formCommandList.commandNo;
|
||||||
formData.commandYear = props.formCommandList.commandYear;
|
formData.commandYear = props.formCommandList.commandYear;
|
||||||
formData.detailHeader = props.formCommandList.detailHeader;
|
formData.detailHeader = props.formCommandList.detailHeader;
|
||||||
|
|
@ -109,8 +108,6 @@ onMounted(async () => {
|
||||||
<q-form greedy @submit.prevent @validation-success="onSubmit">
|
<q-form greedy @submit.prevent @validation-success="onSubmit">
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
<div class="row q-col-gutter-sm">
|
<div class="row q-col-gutter-sm">
|
||||||
<!-- คำสั่งเลขที่ -->
|
|
||||||
<!-- คำสั่งเรื่อง -->
|
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input
|
<q-input
|
||||||
:class="store.classInput(!store.readonly)"
|
:class="store.classInput(!store.readonly)"
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,6 @@ const commandId = ref<string>(route.params.id.toString()); //ID คำสั่
|
||||||
const storePosSalary = usePosSalaryDataStore();
|
const storePosSalary = usePosSalaryDataStore();
|
||||||
const store = useCommandDetail();
|
const store = useCommandDetail();
|
||||||
const {
|
const {
|
||||||
dialogMessageNotify,
|
|
||||||
dialogConfirm,
|
dialogConfirm,
|
||||||
dialogRemove,
|
dialogRemove,
|
||||||
messageError,
|
messageError,
|
||||||
|
|
@ -34,7 +33,7 @@ const {
|
||||||
success,
|
success,
|
||||||
} = useCounterMixin();
|
} = useCounterMixin();
|
||||||
|
|
||||||
const isChangeData = defineModel<boolean>("isChangeData", { required: true }); //การเปลี่ยนแปลงของข้อมูล
|
// const isChangeData = defineModel<boolean>("isChangeData", { required: true }); //การเปลี่ยนแปลงของข้อมูล
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
onCheckChangeData: { type: Function, required: true },
|
onCheckChangeData: { type: Function, required: true },
|
||||||
fetchDataCommandList: { type: Function, required: true },
|
fetchDataCommandList: { type: Function, required: true },
|
||||||
|
|
@ -219,7 +218,6 @@ function savePosition() {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getCommandSalaryList(type: string) {
|
async function getCommandSalaryList(type: string) {
|
||||||
showLoader();
|
|
||||||
await http
|
await http
|
||||||
.get(config.API.commandSalaryList(type))
|
.get(config.API.commandSalaryList(type))
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
|
|
@ -228,15 +226,11 @@ async function getCommandSalaryList(type: string) {
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
hideLoader();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ดึงข้อมูล บุคคล */
|
/** ดึงข้อมูล บุคคล */
|
||||||
async function getPersonList() {
|
async function getPersonList() {
|
||||||
showLoader();
|
|
||||||
await http
|
await http
|
||||||
.get(config.API.commandAction(commandId.value, "tab2"))
|
.get(config.API.commandAction(commandId.value, "tab2"))
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
|
|
@ -247,17 +241,19 @@ async function getPersonList() {
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
hideLoader();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await getPersonList();
|
const promises = [getPersonList()];
|
||||||
|
|
||||||
if (props.commandSysId) {
|
if (props.commandSysId) {
|
||||||
await getCommandSalaryList(props.commandSysId);
|
promises.push(getCommandSalaryList(props.commandSysId));
|
||||||
}
|
}
|
||||||
|
showLoader();
|
||||||
|
await Promise.all(promises).finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -119,7 +119,6 @@ async function fetchData() {
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
const data = await res.data.result;
|
const data = await res.data.result;
|
||||||
rows.value = data;
|
rows.value = data;
|
||||||
|
|
||||||
isChangeData.value = false;
|
isChangeData.value = false;
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
|
|
|
||||||
|
|
@ -12,20 +12,15 @@ interface FormCommand {
|
||||||
}
|
}
|
||||||
|
|
||||||
interface FormDataDetail {
|
interface FormDataDetail {
|
||||||
id?: string;
|
issue: string | null; //คำสั่งเรื่อง
|
||||||
status?: string;
|
commandNo: string; //คำสั่งเลขที่
|
||||||
commandNo: string;
|
commandYear: number | null; //พ.ศ.
|
||||||
commandYear: number | null;
|
detailHeader: string; //เนื้อหาคำสั่งขึ้นต้น
|
||||||
detailHeader: string;
|
detailBody: string; //เนื้อหาคำสั่งหลัก
|
||||||
detailBody: string;
|
detailFooter: string; //เนื้อหาคำสั่งลงท้าย
|
||||||
detailFooter: string;
|
commandAffectDate: Date | null; //วันที่ลงนาม
|
||||||
issue: string | null;
|
commandExcecuteDate: Date | null; //วันที่คำสั่งมีผล
|
||||||
commandAffectDate: Date | null;
|
isBangkok: string | null; //คำสั่งสำนักปลัดกรุงเทพมหานคร
|
||||||
commandExcecuteDate: Date | null;
|
|
||||||
commandSysId?: string;
|
|
||||||
commandTypeName?: string;
|
|
||||||
isBangkok?: string | null;
|
|
||||||
isAttachment: boolean;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ListCommandSalaryType {
|
interface ListCommandSalaryType {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
const ACCESS_TOKEN = "BMAHRIS_KEYCLOAK_IDENTITY";
|
const ACCESS_TOKEN = "BMAHRIS_KEYCLOAK_IDENTITY";
|
||||||
|
const key_C_Config = {
|
||||||
|
url_Logout: import.meta.env.VITE_URL_SSO,
|
||||||
|
};
|
||||||
interface AuthResponse {
|
interface AuthResponse {
|
||||||
access_token: string;
|
access_token: string;
|
||||||
expires_in: number;
|
expires_in: number;
|
||||||
|
|
@ -15,7 +17,7 @@ async function setAuthen(r: AuthResponse) {
|
||||||
|
|
||||||
async function logout() {
|
async function logout() {
|
||||||
await deleteCookie(ACCESS_TOKEN);
|
await deleteCookie(ACCESS_TOKEN);
|
||||||
window.location.href = "/login";
|
window.location.href = key_C_Config.url_Logout;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getToken() {
|
async function getToken() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue