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">
|
||||
import { ref, watch } from "vue";
|
||||
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 { useComplainstDataStore } from "@/modules/11_discipline/store/ComplaintsStore";
|
||||
const complainstStore = useComplainstDataStore();
|
||||
|
||||
const mixin = useCounterMixin();
|
||||
const { dialogConfirm, success } = mixin;
|
||||
const $q = useQuasar();
|
||||
|
||||
const { dialogConfirm, dialogMessageNotify, success } = mixin;
|
||||
|
||||
const props = defineProps({
|
||||
modal: {
|
||||
|
|
@ -112,7 +114,8 @@ const visibleColumns = ref<string[]>([
|
|||
|
||||
const selected = ref<any>([]);
|
||||
const inspectionResults = ref<string>("");
|
||||
const inputRef = ref<any>(null);
|
||||
const filter = ref<string>("");
|
||||
// const inputRef = ref<any>(null);
|
||||
|
||||
const initialPagination = ref<any>({
|
||||
descending: false,
|
||||
|
|
@ -120,8 +123,8 @@ const initialPagination = ref<any>({
|
|||
});
|
||||
|
||||
function onclickSend() {
|
||||
inputRef.value.validate();
|
||||
if (!inputRef.value.hasError && selected.value.length > 0) {
|
||||
// inputRef.value.validate();
|
||||
if (selected.value.length > 0) {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
async () => {
|
||||
|
|
@ -133,6 +136,8 @@ function onclickSend() {
|
|||
"ยืนยันการส่งไปสืบสวน",
|
||||
"ต้องการยืนยันการส่งไปสืบสวนหรือไม่"
|
||||
);
|
||||
} else {
|
||||
dialogMessageNotify($q, "กรุณาเลือกรายชื่อ");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -149,25 +154,59 @@ watch([() => props.modal], () => {
|
|||
</script>
|
||||
<template>
|
||||
<q-dialog v-model="props.modal">
|
||||
<q-card style="width: 700px; max-width: 80vw">
|
||||
<q-toolbar class="q-py-md">
|
||||
<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-card style="width: 820px; max-width: 80vw">
|
||||
<DialogHeader tittle="มีมูลส่งไปสืบสวน" :close="onClickClose" />
|
||||
|
||||
<q-separator />
|
||||
|
||||
<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
|
||||
ref="table"
|
||||
:columns="columns"
|
||||
:rows="complainstStore.rowsAdd"
|
||||
:filter="filter"
|
||||
row-key="id"
|
||||
flat
|
||||
bordered
|
||||
|
|
@ -178,7 +217,6 @@ watch([() => props.modal], () => {
|
|||
selection="multiple"
|
||||
v-model:selected="selected"
|
||||
:pagination="initialPagination"
|
||||
hide-bottom
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
|
|
@ -221,7 +259,7 @@ watch([() => props.modal], () => {
|
|||
</q-tr>
|
||||
</template>
|
||||
</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
|
||||
for="inputInspectionResults"
|
||||
ref="inputRef"
|
||||
|
|
@ -235,7 +273,7 @@ watch([() => props.modal], () => {
|
|||
type="textarea"
|
||||
rows="5"
|
||||
/>
|
||||
</div>
|
||||
</div> -->
|
||||
</q-card-section>
|
||||
<q-separator />
|
||||
<q-card-actions align="right" class="bg-white text-teal">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue