no message

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2023-09-19 17:37:50 +07:00
parent f592008bbe
commit fbb59b99ff
5 changed files with 17 additions and 264 deletions

View file

@ -8,8 +8,8 @@ import { useCounterMixin } from "@/stores/mixin";
import http from "@/plugins/http";
import config from "@/app.config";
const mixin = useCounterMixin(); //
const { success, showLoader, hideLoader, date2Thai, modalConfirm } = mixin;
const save = ref<boolean>(true);
const { showLoader, hideLoader, date2Thai } = mixin;
const $q = useQuasar();
const props = defineProps({
Modal: Boolean,
@ -80,49 +80,12 @@ const myForm = ref<any>([]);
const personalForm = ref<any>([]);
const selection = ref<any>([]);
const $q = useQuasar();
function isRequired(val: any): boolean | string {
return !!val || "กรุณาเลือกไฟล์เอกสารหลักฐาน";
}
watch(props, () => {
if (props.Modal === true) {
// console.log(props.getdetail);
fetchData();
}
});
const validateData = () => {
const selectedIds = personalForm.value.isProperty;
const selectedItems = personalForm.value.isProperty.filter(
(item: any) => item.value === true
// selectedIds.includes(item.value)
);
return (
selectedItems.length > 0 || selectedItems.length === selectedIds.length
);
};
// const ClickSave = () => {
// const isValid = validateData();
// if (isValid) {
// // props.close();
// // props.validate();
// // putpersonalForm();
// modalConfirm(
// $q,
// "",
// "",
// putpersonalForm
// );
// } else {
// success($q, "");
// console.log();
// }
// };
const fetchData = async () => {
showLoader();
await http
@ -164,24 +127,6 @@ const close = async () => {
selection.value = [];
rows.value = [];
};
const putpersonalForm = async () => {
props.close();
// await http
// .put(
// config.API.putProperty("0a846508-4932-40de-9a9e-5b519492217c"),
// personalForm.value.isProperty
// )
// .then((res) => {
// success($q, res.data.message);
// })
// .catch((e) => {
// console.log(e);
// })
// .finally(() => {
// props.close();
// props.validate();
// });
};
</script>
<template>
<q-dialog v-model="props.Modal">
@ -336,29 +281,7 @@ const putpersonalForm = async () => {
</div>
</q-card>
</div>
<!-- <div class="contanier-box-mini"> -->
<!-- <q-card bordered class="card-panding">
<div class="col-12 row items-center q-pa-sm header-text">
เอกสารเพมเต
</div> -->
<!-- <div v-for="(item, index) of personalForm.isProperty" :key="index" class="q-pa-sm">
<q-checkbox size="xs" v-model="item.value" :val="item.value" :label="item.name" keep-color color="teal"
:rules="[isRequired]" class="checkbox-group" />
<q-separator />
</div> -->
<!-- </q-card>
</div> -->
</div>
<!-- <q-separator />
<div>
<DialogFooter
@click="ClickSave"
:model="props.Modal"
:editvisible="save"
:validate="validateData"
/>
</div> -->
</q-form>
</q-card>
</q-dialog>