แก้ตามเทส
This commit is contained in:
parent
1307690d54
commit
14b2a4992f
4 changed files with 52 additions and 14 deletions
|
|
@ -35,7 +35,7 @@ const {
|
|||
dialogMessageNotify,
|
||||
} = mixin;
|
||||
|
||||
const checkRoute = ref<boolean>(route.name == 'KPIIndicatorByPlanView')
|
||||
const checkRoute = ref<boolean>(route.name == "KPIIndicatorByPlanView");
|
||||
|
||||
const id = ref<string>(route.params.id ? route.params.id.toLocaleString() : "");
|
||||
const editCheck = ref<boolean>(route.params.id ? true : false);
|
||||
|
|
@ -276,6 +276,7 @@ onMounted(async () => {
|
|||
:locale="'th'"
|
||||
autoApply
|
||||
year-picker
|
||||
:readonly="checkRoute"
|
||||
:enableTimePicker="false"
|
||||
>
|
||||
<template #year="{ year }">{{ year + 543 }}</template>
|
||||
|
|
@ -287,6 +288,7 @@ onMounted(async () => {
|
|||
dense
|
||||
outlined
|
||||
class="inputgreen"
|
||||
:readonly="checkRoute"
|
||||
hide-bottom-space
|
||||
:model-value="!!year ? year + 543 : null"
|
||||
:label="`${'ปีงบประมาณ'}`"
|
||||
|
|
@ -301,7 +303,7 @@ onMounted(async () => {
|
|||
</template>
|
||||
<template v-slot:append>
|
||||
<q-icon
|
||||
v-if="year"
|
||||
v-if="year && !checkRoute"
|
||||
name="cancel"
|
||||
class="cursor-pointer"
|
||||
@click.stop.prevent="year = 0"
|
||||
|
|
@ -323,6 +325,7 @@ onMounted(async () => {
|
|||
option-value="id"
|
||||
map-options
|
||||
emit-value
|
||||
:readonly="checkRoute"
|
||||
class="inputgreen"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -333,6 +336,7 @@ onMounted(async () => {
|
|||
label="ค่าเป้าหมาย"
|
||||
bg-color="white"
|
||||
dense
|
||||
:readonly="checkRoute"
|
||||
class="inputgreen"
|
||||
:rules="[(val:string) => !!val || `${'กรุณากรอกค่าเป้าหมาย'}`]"
|
||||
hide-bottom-space
|
||||
|
|
@ -344,6 +348,7 @@ onMounted(async () => {
|
|||
v-model="planData.unit"
|
||||
label="หน่วยนับ"
|
||||
bg-color="white"
|
||||
:readonly="checkRoute"
|
||||
dense
|
||||
lazy-rules
|
||||
class="inputgreen"
|
||||
|
|
@ -359,6 +364,7 @@ onMounted(async () => {
|
|||
type="number"
|
||||
bg-color="white"
|
||||
dense
|
||||
:readonly="checkRoute"
|
||||
class="inputgreen"
|
||||
:rules="[(val:string) => !!val || `${'กรุณากรอกน้ำหนัก'}`]"
|
||||
hide-bottom-space
|
||||
|
|
@ -382,6 +388,7 @@ onMounted(async () => {
|
|||
<div class="col-8 q-pa-sm">
|
||||
<q-input
|
||||
outlined
|
||||
:readonly="checkRoute"
|
||||
v-model="planData.achievement5"
|
||||
label="กรอกผลสำเร็จของงาน"
|
||||
bg-color="white"
|
||||
|
|
@ -401,6 +408,7 @@ onMounted(async () => {
|
|||
<div class="col-8 q-pa-sm">
|
||||
<q-input
|
||||
outlined
|
||||
:readonly="checkRoute"
|
||||
v-model="planData.achievement4"
|
||||
label="กรอกผลสำเร็จของงาน"
|
||||
bg-color="white"
|
||||
|
|
@ -419,6 +427,7 @@ onMounted(async () => {
|
|||
</div>
|
||||
<div class="col-8 q-pa-sm">
|
||||
<q-input
|
||||
:readonly="checkRoute"
|
||||
outlined
|
||||
v-model="planData.achievement3"
|
||||
label="กรอกผลสำเร็จของงาน"
|
||||
|
|
@ -439,6 +448,7 @@ onMounted(async () => {
|
|||
<div class="col-8 q-pa-sm">
|
||||
<q-input
|
||||
outlined
|
||||
:readonly="checkRoute"
|
||||
v-model="planData.achievement2"
|
||||
label="กรอกผลสำเร็จของงาน"
|
||||
bg-color="white"
|
||||
|
|
@ -458,6 +468,7 @@ onMounted(async () => {
|
|||
<div class="col-8 q-pa-sm">
|
||||
<q-input
|
||||
outlined
|
||||
:readonly="checkRoute"
|
||||
v-model="planData.achievement1"
|
||||
label="กรอกผลสำเร็จของงาน"
|
||||
bg-color="white"
|
||||
|
|
@ -476,6 +487,7 @@ onMounted(async () => {
|
|||
<div class="col-12">
|
||||
<q-input
|
||||
outlined
|
||||
:readonly="checkRoute"
|
||||
v-model="planData.meaning"
|
||||
label="นิยามหรือความหมาย"
|
||||
type="textarea"
|
||||
|
|
@ -488,6 +500,7 @@ onMounted(async () => {
|
|||
</div>
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
:readonly="checkRoute"
|
||||
outlined
|
||||
v-model="planData.formula"
|
||||
label="สูตรคำนวณ"
|
||||
|
|
@ -509,7 +522,13 @@ onMounted(async () => {
|
|||
<q-separator />
|
||||
|
||||
<q-card-section class="q-pa-sm">
|
||||
<q-input dense outlined v-model="filterAgency" label="ค้นหา">
|
||||
<q-input
|
||||
dense
|
||||
outlined
|
||||
v-model="filterAgency"
|
||||
label="ค้นหา"
|
||||
:readonly="checkRoute"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon name="search" />
|
||||
</template>
|
||||
|
|
@ -525,11 +544,10 @@ onMounted(async () => {
|
|||
no-results-label="ไม่พบข้อมูลที่ค้นหา"
|
||||
no-nodes-label="ไม่มีข้อมูล"
|
||||
v-model:expanded="expandedAgency"
|
||||
v-model:selected="planData.nodeId"
|
||||
>
|
||||
<template v-slot:default-header="prop">
|
||||
<q-item
|
||||
clickable
|
||||
:clickable="!checkRoute"
|
||||
@click.stop="updateSelectedAgency(prop.node)"
|
||||
:active="planData.nodeId == prop.node.orgTreeId"
|
||||
active-class="my-list-link text-primary text-weight-medium"
|
||||
|
|
@ -566,7 +584,13 @@ onMounted(async () => {
|
|||
<q-separator />
|
||||
|
||||
<q-card-section class="q-pa-sm">
|
||||
<q-input dense outlined v-model="filter" label="ค้นหา">
|
||||
<q-input
|
||||
dense
|
||||
outlined
|
||||
v-model="filter"
|
||||
label="ค้นหา"
|
||||
:readonly="checkRoute"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon name="search" />
|
||||
</template>
|
||||
|
|
@ -582,11 +606,10 @@ onMounted(async () => {
|
|||
no-results-label="ไม่พบข้อมูลที่ค้นหา"
|
||||
no-nodes-label="ไม่มีข้อมูล"
|
||||
v-model:expanded="expandedPlan"
|
||||
v-model:selected="planData.strategyId"
|
||||
>
|
||||
<template v-slot:default-header="prop">
|
||||
<q-item
|
||||
clickable
|
||||
:clickable="!checkRoute"
|
||||
@click.stop="updateSelected(prop.node)"
|
||||
:active="planData.strategyId == prop.node.id"
|
||||
active-class="my-list-link text-primary text-weight-medium"
|
||||
|
|
@ -609,6 +632,7 @@ onMounted(async () => {
|
|||
v-model="planData.documentInfoEvidence"
|
||||
label="ข้อมูลเอกสารหลักฐาน"
|
||||
outlined
|
||||
:readonly="checkRoute"
|
||||
dense
|
||||
type="textarea"
|
||||
></q-input>
|
||||
|
|
@ -618,7 +642,7 @@ onMounted(async () => {
|
|||
<q-separator color="grey-4" />
|
||||
<q-card-actions align="right">
|
||||
<q-btn
|
||||
v-if="!isView"
|
||||
v-if="!isView && !checkRoute"
|
||||
label="บันทึก"
|
||||
id="onSubmit"
|
||||
type="submit"
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ const expanded = ref<string[]>([]);
|
|||
const orgName = ref<string>("");
|
||||
const nodeId = ref<string>("");
|
||||
|
||||
const checkRoute = ref<boolean>(route.name == "KPIIndicatorByRoleView");
|
||||
const id = ref<string>(route.params.id ? route.params.id.toLocaleString() : "");
|
||||
const {
|
||||
showLoader,
|
||||
|
|
@ -276,6 +277,7 @@ onMounted(() => {
|
|||
<div class="row q-col-gutter-sm">
|
||||
<div class="col-8">
|
||||
<q-select
|
||||
:readonly="checkRoute"
|
||||
dense
|
||||
:model-value="form.position"
|
||||
label="ตำแหน่งในสายงาน"
|
||||
|
|
@ -310,6 +312,7 @@ onMounted(() => {
|
|||
v-model="form.year"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
:readonly="checkRoute"
|
||||
year-picker
|
||||
:enableTimePicker="false"
|
||||
>
|
||||
|
|
@ -322,6 +325,7 @@ onMounted(() => {
|
|||
dense
|
||||
class="inputgreen"
|
||||
outlined
|
||||
:readonly="checkRoute"
|
||||
:model-value="
|
||||
form.year === 0 ? null : Number(form.year) + 543
|
||||
"
|
||||
|
|
@ -337,7 +341,7 @@ onMounted(() => {
|
|||
</template>
|
||||
<template v-slot:append>
|
||||
<q-icon
|
||||
v-if="form.year"
|
||||
v-if="form.year && !checkRoute"
|
||||
name="cancel"
|
||||
class="cursor-pointer"
|
||||
@click.stop.prevent="form.year = 0"
|
||||
|
|
@ -356,6 +360,7 @@ onMounted(() => {
|
|||
option-label="name"
|
||||
option-value="id"
|
||||
emit-value
|
||||
:readonly="checkRoute"
|
||||
map-options
|
||||
input-class="text-red"
|
||||
label="รอบการประเมิน"
|
||||
|
|
@ -378,6 +383,7 @@ onMounted(() => {
|
|||
v-model="form.includingName"
|
||||
outlined
|
||||
dense
|
||||
:readonly="checkRoute"
|
||||
class="inputgreen"
|
||||
lazy-rules
|
||||
:rules="[(val:string) => !!val || `${'กรุณากรอกชื่อตัวชี้วัด'}`,]"
|
||||
|
|
@ -390,6 +396,7 @@ onMounted(() => {
|
|||
v-model="form.target"
|
||||
outlined
|
||||
dense
|
||||
:readonly="checkRoute"
|
||||
class="inputgreen"
|
||||
lazy-rules
|
||||
:rules="[(val:string) => !!val || `${'กรุณากรอกค่าเป้าหมาย'}`,]"
|
||||
|
|
@ -400,6 +407,7 @@ onMounted(() => {
|
|||
<q-input
|
||||
label="หน่วยนับ"
|
||||
v-model="form.unit"
|
||||
:readonly="checkRoute"
|
||||
outlined
|
||||
dense
|
||||
class="inputgreen"
|
||||
|
|
@ -414,6 +422,7 @@ onMounted(() => {
|
|||
v-model="form.weight"
|
||||
outlined
|
||||
dense
|
||||
:readonly="checkRoute"
|
||||
class="inputgreen"
|
||||
lazy-rules
|
||||
:rules="[(val:string) => !!val || `${'กรุณากรอกน้ำหนัก'}`,]"
|
||||
|
|
@ -432,6 +441,7 @@ onMounted(() => {
|
|||
<q-card-section class="q-pa-sm">
|
||||
<q-input
|
||||
dense
|
||||
:readonly="checkRoute"
|
||||
outlined
|
||||
v-model="filter"
|
||||
label="ค้นหา"
|
||||
|
|
@ -457,7 +467,7 @@ onMounted(() => {
|
|||
>
|
||||
<template v-slot:default-header="prop">
|
||||
<q-item
|
||||
clickable
|
||||
:clickable="!checkRoute"
|
||||
@click.stop="updateSelected(prop.node)"
|
||||
:active="form.nodeId === prop.node.orgTreeId"
|
||||
active-class="my-list-link text-primary text-weight-medium"
|
||||
|
|
@ -512,6 +522,7 @@ onMounted(() => {
|
|||
v-model="formScore[field]"
|
||||
dense
|
||||
outlined
|
||||
:readonly="checkRoute"
|
||||
class="inputgreen"
|
||||
label="กรอกผลสำเร็จของงาน"
|
||||
:rules="[(val:string) => !!val || `${'กรุณากรอกผลสำเร็จของงาน'}`,]"
|
||||
|
|
@ -533,6 +544,7 @@ onMounted(() => {
|
|||
<q-input
|
||||
v-model="form.meaning"
|
||||
label="นิยามหรือความหมาย"
|
||||
:readonly="checkRoute"
|
||||
dense
|
||||
outlined
|
||||
lazy-rules
|
||||
|
|
@ -548,6 +560,7 @@ onMounted(() => {
|
|||
label="สูตรคำนวณ"
|
||||
dense
|
||||
outlined
|
||||
:readonly="checkRoute"
|
||||
lazy-rules
|
||||
class="inputgreen"
|
||||
:rules="[(val:string) => !!val || `${'กรุณากรอกสูตรคำนวณ'}`,]"
|
||||
|
|
@ -561,6 +574,7 @@ onMounted(() => {
|
|||
v-model="form.documentInfoEvidence"
|
||||
label="ข้อมูลเอกสารหลักฐาน"
|
||||
outlined
|
||||
:readonly="checkRoute"
|
||||
dense
|
||||
type="textarea"
|
||||
></q-input>
|
||||
|
|
@ -570,7 +584,7 @@ onMounted(() => {
|
|||
<q-separator />
|
||||
<q-card-actions align="right">
|
||||
<q-btn
|
||||
v-if="!isView"
|
||||
v-if="!isView && !checkRoute"
|
||||
color="public"
|
||||
label="บันทึก"
|
||||
type="submit"
|
||||
|
|
|
|||
|
|
@ -105,8 +105,8 @@ async function onViewDetailPage(id: string) {
|
|||
}
|
||||
|
||||
function deleteData(id: string) {
|
||||
showLoader();
|
||||
dialogRemove($q, async () => {
|
||||
showLoader();
|
||||
await http
|
||||
.delete(config.API.kpiCapacity + `/${id}`)
|
||||
.then(async () => {
|
||||
|
|
|
|||
|
|
@ -572,7 +572,7 @@ onMounted(async () => {
|
|||
}}
|
||||
</div>
|
||||
|
||||
<div v-else class="table_ellipsis">
|
||||
<div v-else >
|
||||
{{ col.value ? col.value : "-" }}
|
||||
</div>
|
||||
</q-td>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue