fixing error & layout command template

This commit is contained in:
Warunee Tamkoo 2024-09-09 13:56:29 +07:00
parent d836432c3e
commit 7540311518
7 changed files with 56 additions and 35 deletions

View file

@ -14,7 +14,7 @@ import type {
} from "@/modules/05_command/interface/index/Main";
import Header from "@/components/DialogHeader.vue";
import PageOrder from "@/modules/05_command/components/ListOrder.vue";
import PageOrder from "@/modules/05_command/components/ViewPdf.vue";
const $q = useQuasar();
const mixin = useCounterMixin();
@ -117,29 +117,35 @@ function selectInbox(data: ListOrder) {
activeOrderId.value = data.id;
}
/**
* งกนดงรายการประเภทคำส
*/
async function fetchOrderType() {
showLoader();
await http
.get(config.API.commandType)
.then(async (res) => {
listOrder.value = res.data.result.map((item: any) => {
return {
name: item.name,
category: item.category,
commandCode: item.commandCode,
id: item.id,
status: true,
};
});
})
.catch((err) => {
messageError($q, err);
})
.finally(() => {
hideLoader();
});
}
/** เริ่มเมื่อโหลดหน้านี้*/
onMounted(() => {
const dataTest = [
{
id: "031952c2-a0d5-4a17-925c-d97993879621",
code: "C-PM-01",
name: "Test1",
status: true,
},
{
id: "031952c2-a0d5-4a17-925c-d97993879622",
code: "C-PM-01",
name: "Test2",
status: true,
},
{
id: "031952c2-a0d5-4a17-925c-d97993879623",
code: "C-PM-01",
name: "Test3",
status: false,
},
];
listOrder.value = dataTest;
fetchOrderType();
});
</script>
@ -170,7 +176,7 @@ onMounted(() => {
dense
v-model="inActive"
class="inputgreen"
label="status"
label="สถานะการใช้งาน"
:options="activeOptions"
option-label="label"
option-value="value"
@ -190,22 +196,21 @@ onMounted(() => {
<q-item
clickable
v-ripple
class="my-link q-my-xs"
:active="activeOrderId === item.id"
active-class="my-menu_link"
@click="selectInbox(item)"
>
<q-item-section>
<q-item-label class="text-weight-medium" caption lines="2">
{{ `- ${item.name}` }}
<q-item-label>
{{ item.name }}
</q-item-label>
</q-item-section>
<q-item-section side center>
<q-item-section side center @click.stop>
<q-icon
name="mdi-dots-horizontal"
color="secondary"
name="mdi-dots-vertical"
class="q-pa-none q-ml-xs"
color="grey-13"
flat
round
dense
>
<q-menu