สิทธิ tab
This commit is contained in:
parent
067a32f436
commit
aeab8ae15a
15 changed files with 122 additions and 24 deletions
|
|
@ -300,7 +300,7 @@ onMounted(async () => {
|
|||
|
||||
<div v-if="status == false">
|
||||
<q-btn
|
||||
v-if="!checkRoutePermisson"
|
||||
v-if="!checkRoutePermisson && probationStore.dataPermissions?.tab4.isEdit"
|
||||
dense
|
||||
flat
|
||||
round
|
||||
|
|
|
|||
|
|
@ -423,7 +423,7 @@ onMounted(async () => {
|
|||
<div>แบบประเมินผล (คณะกรรมการ)</div>
|
||||
<div v-if="status == false">
|
||||
<q-btn
|
||||
v-if="!checkRoutePermisson"
|
||||
v-if="!checkRoutePermisson && probationStore.dataPermissions?.tab5.isEdit"
|
||||
dense
|
||||
flat
|
||||
round
|
||||
|
|
|
|||
|
|
@ -336,7 +336,7 @@ onMounted(() => {
|
|||
:locale="'th'"
|
||||
autoApply
|
||||
borderless
|
||||
:readonly="!status || checkRoutePermisson"
|
||||
:readonly="!status || checkRoutePermisson || probationStore.dataPermissions?.tab6.isEdit == false"
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
>
|
||||
|
|
@ -350,7 +350,7 @@ onMounted(() => {
|
|||
<q-input
|
||||
outlined
|
||||
dense
|
||||
:readonly="!status || checkRoutePermisson"
|
||||
:readonly="!status || checkRoutePermisson || probationStore.dataPermissions?.tab6.isEdit == false"
|
||||
class="full-width datepicker"
|
||||
:model-value="
|
||||
date_start != null ? date2Thai(date_start) : null
|
||||
|
|
@ -377,7 +377,7 @@ onMounted(() => {
|
|||
v-model="date_finish"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
:readonly="!status || checkRoutePermisson"
|
||||
:readonly="!status || checkRoutePermisson || probationStore.dataPermissions?.tab6.isEdit == false"
|
||||
borderless
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
|
|
@ -429,7 +429,7 @@ onMounted(() => {
|
|||
class="col-xs-12 col-sm-6"
|
||||
dense
|
||||
borderless
|
||||
:readonly="!status || checkRoutePermisson"
|
||||
:readonly="!status || checkRoutePermisson || probationStore.dataPermissions?.tab6.isEdit == false"
|
||||
emit-value
|
||||
map-options
|
||||
option-label="label"
|
||||
|
|
@ -458,7 +458,7 @@ onMounted(() => {
|
|||
]"
|
||||
hide-bottom-space
|
||||
:options="optionsResult"
|
||||
:readonly="!status || checkRoutePermisson"
|
||||
:readonly="!status || checkRoutePermisson || probationStore.dataPermissions?.tab6.isEdit == false"
|
||||
dense
|
||||
borderless
|
||||
emit-value
|
||||
|
|
@ -501,7 +501,7 @@ onMounted(() => {
|
|||
dense
|
||||
borderless
|
||||
outlined
|
||||
:readonly="!status || checkRoutePermisson"
|
||||
:readonly="!status || checkRoutePermisson || probationStore.dataPermissions?.tab6.isEdit == false"
|
||||
class="bg-white"
|
||||
type="textarea"
|
||||
v-model="reson"
|
||||
|
|
@ -554,7 +554,7 @@ onMounted(() => {
|
|||
menu-class-name="modalfix"
|
||||
v-model="chairman_dated"
|
||||
:locale="'th'"
|
||||
:readonly="!status || checkRoutePermisson"
|
||||
:readonly="!status || checkRoutePermisson || probationStore.dataPermissions?.tab6.isEdit == false"
|
||||
autoApply
|
||||
borderless
|
||||
:enableTimePicker="false"
|
||||
|
|
@ -616,7 +616,7 @@ onMounted(() => {
|
|||
:locale="'th'"
|
||||
autoApply
|
||||
borderless
|
||||
:readonly="!status || checkRoutePermisson"
|
||||
:readonly="!status || checkRoutePermisson || probationStore.dataPermissions?.tab6.isEdit == false"
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
>
|
||||
|
|
@ -679,7 +679,7 @@ onMounted(() => {
|
|||
v-model="director2_dated"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
:readonly="!status || checkRoutePermisson"
|
||||
:readonly="!status || checkRoutePermisson || probationStore.dataPermissions?.tab6.isEdit == false"
|
||||
borderless
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
|
|
@ -723,7 +723,7 @@ onMounted(() => {
|
|||
|
||||
<q-toolbar
|
||||
class="text-primary"
|
||||
v-if="action == 'add' && !checkRoutePermisson"
|
||||
v-if="action == 'add' && !checkRoutePermisson && probationStore.dataPermissions?.tab6.isEdit"
|
||||
>
|
||||
<q-space />
|
||||
<q-btn label="บันทึก" color="secondary" @click="savaForm" />
|
||||
|
|
|
|||
|
|
@ -371,7 +371,7 @@ onMounted(async () => {
|
|||
<div>แบบบันทึกผล (ผู้ดูเเล)</div>
|
||||
<div v-if="status == false">
|
||||
<q-btn
|
||||
v-if="!checkRoutePermisson"
|
||||
v-if="!checkRoutePermisson && probationStore.dataPermissions?.tab2.isEdit"
|
||||
dense
|
||||
flat
|
||||
round
|
||||
|
|
|
|||
|
|
@ -378,7 +378,7 @@ onMounted(async () => {
|
|||
<div>แบบบันทึกผล (ผู้บังคับบัญชา)</div>
|
||||
<div v-if="status == false">
|
||||
<q-btn
|
||||
v-if="!checkRoutePermisson"
|
||||
v-if="!checkRoutePermisson && probationStore.dataPermissions?.tab3.isEdit"
|
||||
dense
|
||||
flat
|
||||
round
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import { useRoute } from "vue-router";
|
|||
const tabHead = ref<string>("save1");
|
||||
const route = useRoute();
|
||||
const checkRoutePermisson = ref<boolean>(route.name == "probationFormDetail");
|
||||
|
||||
/** รับค่ามาจากหน้าหลัก */
|
||||
const props = defineProps({
|
||||
FileDownload: {
|
||||
|
|
@ -28,6 +29,12 @@ const props = defineProps({
|
|||
return "Default function";
|
||||
},
|
||||
},
|
||||
checkPermission: {
|
||||
type: Boolean,
|
||||
default() {
|
||||
return true;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
/** เรียกใช้ฟังชั่นจากหน้าหลัก */
|
||||
|
|
@ -102,7 +109,7 @@ function nextPage() {
|
|||
</q-tabs>
|
||||
<div>
|
||||
<q-btn
|
||||
v-if="!checkRoutePermisson"
|
||||
v-if="!checkRoutePermisson && props.checkPermission"
|
||||
color="blue"
|
||||
flat
|
||||
dense
|
||||
|
|
|
|||
|
|
@ -129,6 +129,7 @@ onMounted(async () => {
|
|||
:add-data="addData"
|
||||
:loop="probationStore.tabs.length"
|
||||
:FileDownload="FileDownload"
|
||||
:checkPermission="probationStore?.dataPermissions?.tab2?.isEdit as boolean"
|
||||
/>
|
||||
<q-tab-panels
|
||||
v-model="tab"
|
||||
|
|
@ -162,6 +163,7 @@ onMounted(async () => {
|
|||
color="primary"
|
||||
label="สร้างแบบบันทึกผล"
|
||||
@click="addData"
|
||||
:disable="probationStore.dataPermissions?.tab2.isEdit == false"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -145,6 +145,7 @@ onMounted(async () => {
|
|||
:add-data="addData"
|
||||
:loop="probationStore.tabs.length"
|
||||
:FileDownload="FileDownload"
|
||||
:checkPermission="probationStore?.dataPermissions?.tab3?.isEdit as boolean"
|
||||
/>
|
||||
<q-tab-panels
|
||||
v-model="tab"
|
||||
|
|
@ -178,6 +179,7 @@ onMounted(async () => {
|
|||
color="primary"
|
||||
label="สร้างแบบบันทึกผล"
|
||||
@click="addData"
|
||||
:disable="probationStore.dataPermissions?.tab3.isEdit == false"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -124,6 +124,7 @@ onMounted(() => {
|
|||
:loop="tabs.length"
|
||||
:add-data="addData"
|
||||
:FileDownload="FileDownload"
|
||||
:checkPermission="probationStore?.dataPermissions?.tab4?.isEdit as boolean"
|
||||
/>
|
||||
|
||||
<q-tab-panels
|
||||
|
|
@ -157,7 +158,8 @@ onMounted(() => {
|
|||
color="primary"
|
||||
label="สร้างแบบประเมิน"
|
||||
@click="addData"
|
||||
/>
|
||||
:disable="probationStore.dataPermissions?.tab4.isEdit == false"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -102,6 +102,7 @@ const changeTab = (tabVal: string) => {
|
|||
:loop="tabs.length"
|
||||
:add-data="addData"
|
||||
:FileDownload="FileDownload"
|
||||
:checkPermission="probationStore?.dataPermissions?.tab5?.isEdit as boolean"
|
||||
/>
|
||||
|
||||
<q-tab-panels
|
||||
|
|
@ -134,6 +135,7 @@ const changeTab = (tabVal: string) => {
|
|||
color="primary"
|
||||
label="สร้างแบบประเมิน"
|
||||
@click="addData"
|
||||
:disable="probationStore.dataPermissions?.tab5.isEdit == false"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue