แก้ สรุปผล

This commit is contained in:
setthawutttty 2023-12-06 14:46:29 +07:00
parent 65c9aab134
commit 0731d6e399
3 changed files with 8 additions and 11 deletions

View file

@ -21,6 +21,7 @@ import DialogHeader from "@/components/DialogHeader.vue";
import http from "@/plugins/http"; import http from "@/plugins/http";
import config from "@/app.config"; import config from "@/app.config";
const type = ref<string>("");
const rows = ref<DataListRow[]>([]) const rows = ref<DataListRow[]>([])
const $q = useQuasar(); const $q = useQuasar();
const selected = ref<ResponseData[]>([]); const selected = ref<ResponseData[]>([]);
@ -53,8 +54,6 @@ const props = defineProps({
getData: Function, getData: Function,
rows2: Array, rows2: Array,
filterKeyword2: String, filterKeyword2: String,
type: String,
}); });
const checkSelected = computed(() => { const checkSelected = computed(() => {
@ -65,7 +64,7 @@ const checkSelected = computed(() => {
//popup //popup
const saveOrder = () => { const saveOrder = () => {
if (props.type) { if (type.value) {
dialogConfirm( dialogConfirm(
$q, $q,
() => Ordersave(), () => Ordersave(),
@ -85,7 +84,7 @@ const Ordersave = async () => {
console.log(body); console.log(body);
showLoader(); showLoader();
await http await http
.put(config.API.reportresult(props.type as string), body) .put(config.API.reportresult(type.value as string), body)
.then((res: any) => { .then((res: any) => {
success($q, "ส่งไปออกคำสั่งสำเร็จ"); success($q, "ส่งไปออกคำสั่งสำเร็จ");
props.closeModal?.(); props.closeModal?.();
@ -141,6 +140,7 @@ const fecthTypeOption = async () => {
watchEffect(() => { watchEffect(() => {
if (props.Modal === true) { if (props.Modal === true) {
selected.value = []; selected.value = [];
type.value = ''
// console.log(props.data.status) // console.log(props.data.status)
rows.value = props.data.persons.filter((item: any) => item.status !== 'REPORT'); rows.value = props.data.persons.filter((item: any) => item.status !== 'REPORT');
} }
@ -162,8 +162,7 @@ onMounted(async () => {
<q-select <q-select
outlined outlined
dense dense
:model-value="type" v-model="type"
@update:model-value="updateInputType"
:options="optionsType" :options="optionsType"
label="ประเภทคำสั่ง" label="ประเภทคำสั่ง"
style="width: 400px; max-width: auto" style="width: 400px; max-width: auto"

View file

@ -28,7 +28,7 @@ const { showLoader, hideLoader, messageError } = mixin;
const router = useRouter(); const router = useRouter();
const route = useRoute(); const route = useRoute();
const id = ref<string>(route.params.id as string); const id = ref<string>(route.params.id as string);
const type = ref<string>("");
/** /**
* นทกขอมลทเเกไข * นทกขอมลทเเกไข
@ -46,7 +46,6 @@ function closeModal() {
modal.value = false; modal.value = false;
} }
function getData() {}
/** ยืนยัน ส่งไปออกคำสั่ง */ /** ยืนยัน ส่งไปออกคำสั่ง */
function sentIssue() { function sentIssue() {
@ -335,8 +334,7 @@ watch(
:visibleColumns="mainStore.visibleColumnsDirector" :visibleColumns="mainStore.visibleColumnsDirector"
:data="dataResult" :data="dataResult"
v-model:filterKeyword2="filterKeyword" v-model:filterKeyword2="filterKeyword"
:getData="getData" :getData="fetchDetailResult"
v-model:type="type"
/> />
</template> </template>

View file

@ -99,7 +99,7 @@ export const useDisciplineResultStore = defineStore(
{ {
name: "title", name: "title",
align: "left", align: "left",
label: "เรื่อง", label: "เรื่องร้องเรียน",
sortable: true, sortable: true,
field: "title", field: "title",
headerStyle: "font-size: 14px", headerStyle: "font-size: 14px",