From 8b54d6b4b141e7ff29b246790a38091c63c3ae0b Mon Sep 17 00:00:00 2001 From: "STW_TTTY\\stwtt" Date: Thu, 8 Aug 2024 10:42:47 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=A3=E0=B8=B2=E0=B8=A2=E0=B8=81=E0=B8=B2?= =?UTF-8?q?=E0=B8=A3=E0=B8=AA=E0=B8=B7=E0=B8=9A=E0=B8=AA=E0=B8=A7=E0=B8=99?= =?UTF-8?q?=E0=B8=82=E0=B9=89=E0=B8=AD=E0=B9=80=E0=B8=97=E0=B9=87=E0=B8=88?= =?UTF-8?q?=E0=B8=88=E0=B8=A3=E0=B8=B4=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../2_InvestigateFacts/EditPage.vue | 6 +- .../components/2_InvestigateFacts/Form.vue | 111 ++++++++++-------- .../2_InvestigateFacts/MainPage.vue | 60 ++++++++-- src/modules/11_discipline/router.ts | 12 ++ 4 files changed, 123 insertions(+), 66 deletions(-) diff --git a/src/modules/11_discipline/components/2_InvestigateFacts/EditPage.vue b/src/modules/11_discipline/components/2_InvestigateFacts/EditPage.vue index f7f0ba468..441875bec 100644 --- a/src/modules/11_discipline/components/2_InvestigateFacts/EditPage.vue +++ b/src/modules/11_discipline/components/2_InvestigateFacts/EditPage.vue @@ -27,6 +27,8 @@ const store = useInvestigateFactStore(); const { dialogConfirm, showLoader, success, hideLoader, messageError } = mixin; const route = useRoute(); const router = useRouter(); + +const checkRoutePermisson = ref(route.name == "disciplineInvestigatefactsDetail"); const id = ref(route.params.id as string); const modalPopup = ref(false); @@ -349,10 +351,10 @@ watch( class="q-mr-sm" @click="$router.push(`/discipline/investigatefacts`)" /> -
แก้ไขรายการสืบสวนข้อเท็จจริง
+
{{ checkRoutePermisson ? 'รายละเอียดรายการสืบสวนข้อเท็จจริง':'แก้ไขรายการสืบสวนข้อเท็จจริง'}}
-
+
(""); const $q = useQuasar(); const route = useRoute(); const router = useRouter(); +const checkRoutePermisson = ref( + route.name == "disciplineInvestigatefactsDetail" +); const id = ref(route.params.id as string); const modalPerson = ref(false); const toggleModal = () => (modalPerson.value = !modalPerson.value); @@ -763,7 +766,7 @@ onMounted(async () => { ref="respondentTypeRef" dense outlined - :readonly="isReadonly" + :readonly="isReadonly || checkRoutePermisson" label="ผู้ถูกร้องเรียน" option-value="id" option-label="name" @@ -799,7 +802,7 @@ onMounted(async () => { ref="organizationIdRef" dense hide-bottom-space - :readonly="isReadonly" + :readonly="isReadonly || checkRoutePermisson" outlined option-label="name" option-value="id" @@ -836,7 +839,7 @@ onMounted(async () => {
{ > ผู้ถูกร้องเรียน { col.label }} - @@ -984,7 +984,7 @@ onMounted(async () => { > { {
{ { :class="inputEditExtend(isReadonly)" ref="dateRef" :readonly=" + checkRoutePermisson || isReadonly || formData.investigationExtendHistory.length > 0 @@ -1163,6 +1166,7 @@ onMounted(async () => { menu-class-name="modalfix" v-model="formData.investigationDateEnd" :readonly=" + checkRoutePermisson || formData.investigationDateStart === null || isReadonly || formData.investigationExtendHistory.length > 0 @@ -1186,6 +1190,7 @@ onMounted(async () => { ref="dateEndRef" :class="inputEditExtend(isReadonly)" :readonly=" + checkRoutePermisson || formData.investigationDateStart === null || isReadonly || formData.investigationExtendHistory.length > @@ -1274,7 +1279,7 @@ onMounted(async () => { > รายชื่อกรรมการ { แก้ไข ลบข้อมูล @@ -1349,7 +1356,6 @@ onMounted(async () => { {{ col.value ?? "-" }}
- @@ -1360,7 +1366,7 @@ onMounted(async () => {
{ for="#fault" outlined dense - :readonly="isReadonly" + :readonly="isReadonly || checkRoutePermisson" ref="investigationStatusResultRef" v-model="formData.investigationStatusResult" :options="optionStatusResult" @@ -1423,7 +1429,7 @@ onMounted(async () => { > { :class="inputEdit(isReadonly)" outlined ref="resultRef" - :readonly="isReadonly" + :readonly="isReadonly || checkRoutePermisson" dense borderless v-model="formData.result" @@ -1487,7 +1493,9 @@ onMounted(async () => {
{