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