Merge branch 'develop' of https://github.com/Frappet/bma-ehr-frontend into develop
This commit is contained in:
commit
03fae6a877
1 changed files with 59 additions and 21 deletions
|
|
@ -1,16 +1,18 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, watch } from "vue";
|
import { ref, watch } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import type { QTableProps } from "quasar";
|
import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
|
|
||||||
const $q = useQuasar();
|
import type { QTableProps } from "quasar";
|
||||||
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useComplainstDataStore } from "@/modules/11_discipline/store/ComplaintsStore";
|
import { useComplainstDataStore } from "@/modules/11_discipline/store/ComplaintsStore";
|
||||||
const complainstStore = useComplainstDataStore();
|
const complainstStore = useComplainstDataStore();
|
||||||
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { dialogConfirm, success } = mixin;
|
const $q = useQuasar();
|
||||||
|
|
||||||
|
const { dialogConfirm, dialogMessageNotify, success } = mixin;
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
modal: {
|
modal: {
|
||||||
|
|
@ -112,7 +114,8 @@ const visibleColumns = ref<string[]>([
|
||||||
|
|
||||||
const selected = ref<any>([]);
|
const selected = ref<any>([]);
|
||||||
const inspectionResults = ref<string>("");
|
const inspectionResults = ref<string>("");
|
||||||
const inputRef = ref<any>(null);
|
const filter = ref<string>("");
|
||||||
|
// const inputRef = ref<any>(null);
|
||||||
|
|
||||||
const initialPagination = ref<any>({
|
const initialPagination = ref<any>({
|
||||||
descending: false,
|
descending: false,
|
||||||
|
|
@ -120,8 +123,8 @@ const initialPagination = ref<any>({
|
||||||
});
|
});
|
||||||
|
|
||||||
function onclickSend() {
|
function onclickSend() {
|
||||||
inputRef.value.validate();
|
// inputRef.value.validate();
|
||||||
if (!inputRef.value.hasError && selected.value.length > 0) {
|
if (selected.value.length > 0) {
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
$q,
|
$q,
|
||||||
async () => {
|
async () => {
|
||||||
|
|
@ -133,6 +136,8 @@ function onclickSend() {
|
||||||
"ยืนยันการส่งไปสืบสวน",
|
"ยืนยันการส่งไปสืบสวน",
|
||||||
"ต้องการยืนยันการส่งไปสืบสวนหรือไม่"
|
"ต้องการยืนยันการส่งไปสืบสวนหรือไม่"
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
dialogMessageNotify($q, "กรุณาเลือกรายชื่อ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -149,25 +154,59 @@ watch([() => props.modal], () => {
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<q-dialog v-model="props.modal">
|
<q-dialog v-model="props.modal">
|
||||||
<q-card style="width: 700px; max-width: 80vw">
|
<q-card style="width: 820px; max-width: 80vw">
|
||||||
<q-toolbar class="q-py-md">
|
<DialogHeader tittle="มีมูลส่งไปสืบสวน" :close="onClickClose" />
|
||||||
<q-toolbar-title class="header-text">มีมูลส่งไปสืบสวน </q-toolbar-title>
|
|
||||||
<q-btn
|
|
||||||
icon="close"
|
|
||||||
unelevated
|
|
||||||
round
|
|
||||||
dense
|
|
||||||
@click="onClickClose"
|
|
||||||
style="color: #ff8080; background-color: #ffdede"
|
|
||||||
/>
|
|
||||||
</q-toolbar>
|
|
||||||
<q-separator />
|
<q-separator />
|
||||||
|
|
||||||
<q-card-section class="q-pt-none q-mt-md">
|
<q-card-section class="q-pt-none q-mt-md">
|
||||||
|
<div class="col-12 row q-pb-sm items-center">
|
||||||
|
<q-space />
|
||||||
|
<div class="items-center" style="display: flex">
|
||||||
|
<!-- ค้นหาข้อความใน table -->
|
||||||
|
<q-input
|
||||||
|
for="inputfilterRef"
|
||||||
|
standout
|
||||||
|
dense
|
||||||
|
v-model="filter"
|
||||||
|
outlined
|
||||||
|
debounce="300"
|
||||||
|
placeholder="ค้นหา"
|
||||||
|
style="max-width: 200px"
|
||||||
|
class="q-ml-sm"
|
||||||
|
>
|
||||||
|
<template v-slot:append>
|
||||||
|
<q-icon v-if="filter == ''" name="search" />
|
||||||
|
<q-icon
|
||||||
|
v-if="filter !== ''"
|
||||||
|
name="clear"
|
||||||
|
class="cursor-pointer"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
|
<!-- แสดงคอลัมน์ใน table -->
|
||||||
|
<q-select
|
||||||
|
for="selectVisibleColumns"
|
||||||
|
v-model="visibleColumns"
|
||||||
|
:display-value="$q.lang.table.columns"
|
||||||
|
multiple
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
:options="columns"
|
||||||
|
options-dense
|
||||||
|
option-value="name"
|
||||||
|
map-options
|
||||||
|
emit-value
|
||||||
|
style="min-width: 150px"
|
||||||
|
class="gt-xs q-ml-sm"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<d-table
|
<d-table
|
||||||
ref="table"
|
ref="table"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:rows="complainstStore.rowsAdd"
|
:rows="complainstStore.rowsAdd"
|
||||||
|
:filter="filter"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
flat
|
flat
|
||||||
bordered
|
bordered
|
||||||
|
|
@ -178,7 +217,6 @@ watch([() => props.modal], () => {
|
||||||
selection="multiple"
|
selection="multiple"
|
||||||
v-model:selected="selected"
|
v-model:selected="selected"
|
||||||
:pagination="initialPagination"
|
:pagination="initialPagination"
|
||||||
hide-bottom
|
|
||||||
>
|
>
|
||||||
<template v-slot:header="props">
|
<template v-slot:header="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
|
|
@ -221,7 +259,7 @@ watch([() => props.modal], () => {
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
</d-table>
|
</d-table>
|
||||||
<div class="col-xs-12 col-sm-12 q-mt-sm">
|
<!-- <div class="col-xs-12 col-sm-12 q-mt-sm">
|
||||||
<q-input
|
<q-input
|
||||||
for="inputInspectionResults"
|
for="inputInspectionResults"
|
||||||
ref="inputRef"
|
ref="inputRef"
|
||||||
|
|
@ -235,7 +273,7 @@ watch([() => props.modal], () => {
|
||||||
type="textarea"
|
type="textarea"
|
||||||
rows="5"
|
rows="5"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div> -->
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<q-card-actions align="right" class="bg-white text-teal">
|
<q-card-actions align="right" class="bg-white text-teal">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue