ปรับ readonly form สืบสวน

This commit is contained in:
Warunee Tamkoo 2023-12-01 16:42:51 +07:00
parent 4303af3046
commit 2c295dbd03
2 changed files with 55 additions and 21 deletions

View file

@ -11,7 +11,7 @@ import { useCounterMixin } from "@/stores/mixin";
const $q = useQuasar();
const mixin = useCounterMixin();
const { showLoader, hideLoader, success, messageError,dialogRemove } = mixin;
const { showLoader, hideLoader, success, messageError, dialogRemove } = mixin;
const fileRef = ref<Object | null>(null);
const file = ref<any>();
@ -47,6 +47,9 @@ const props = defineProps({
type: Function,
default: () => "",
},
isReadonly: {
type: Boolean,
},
});
/**
@ -73,8 +76,8 @@ async function uploadFile() {
});
}
function popupRemove(id:string){
dialogRemove($q,()=> removeFile(id))
function popupRemove(id: string) {
dialogRemove($q, () => removeFile(id));
}
async function removeFile(id: string) {
@ -109,7 +112,7 @@ function downloadFile(link: string) {
{{ title }}
</div>
<div class="col-12"><q-separator /></div>
<div class="row">
<div v-if="!isReadonly" class="row">
<div class="col-11 q-pa-sm">
<q-file
outlined
@ -169,6 +172,7 @@ function downloadFile(link: string) {
</div>
<div>
<q-btn
v-if="!isReadonly"
dense
flat
round