Merge branch 'develop' of github.com:Frappet/BMA-EHR-USER into develop
* 'develop' of github.com:Frappet/BMA-EHR-USER: เปลี่ยนเป็นคะแนน
This commit is contained in:
commit
ff16a902b7
1 changed files with 61 additions and 30 deletions
|
|
@ -18,8 +18,9 @@ const numLevel = ref<string>("");
|
|||
const store = useKpiDataStore();
|
||||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin();
|
||||
const { dialogConfirm, showLoader, hideLoader, messageError, success } = mixin;
|
||||
const { dialogConfirm, showLoader, hideLoader, messageError, success,dialogMessageNotify } = mixin;
|
||||
|
||||
const check = ref<string>("");
|
||||
const rows = defineModel<any>("rows");
|
||||
const modal = defineModel<boolean>("modal", { required: true });
|
||||
const type = defineModel<string>("type", { required: true });
|
||||
|
|
@ -85,34 +86,39 @@ function clickList(index: string, data: any) {
|
|||
}
|
||||
|
||||
function onSubmitAdd() {
|
||||
dialogConfirm($q, () => {
|
||||
showLoader();
|
||||
http
|
||||
.put(
|
||||
config.API.kpiCommentP(
|
||||
"progress",
|
||||
type.value,
|
||||
store.rolePerson.toLocaleLowerCase(),
|
||||
idList.value
|
||||
),
|
||||
{
|
||||
reason: formDataAdd.reason,
|
||||
topic: formDataAdd.topic,
|
||||
score: type.value == "capacity" ? undefined : numLevel.value,
|
||||
}
|
||||
)
|
||||
.then((res) => {
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
getList();
|
||||
closeAdd();
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
});
|
||||
// type
|
||||
if (numLevel.value == "") {
|
||||
dialogMessageNotify($q,'กรุณาเลือกคะแนน')
|
||||
} else {
|
||||
dialogConfirm($q, () => {
|
||||
showLoader();
|
||||
http
|
||||
.put(
|
||||
config.API.kpiCommentP(
|
||||
"progress",
|
||||
type.value,
|
||||
store.rolePerson.toLocaleLowerCase(),
|
||||
idList.value
|
||||
),
|
||||
{
|
||||
reason: formDataAdd.reason,
|
||||
topic: formDataAdd.topic,
|
||||
score: type.value == "capacity" ? undefined : numLevel.value,
|
||||
}
|
||||
)
|
||||
.then((res) => {
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
getList();
|
||||
closeAdd();
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function onSubmit() {}
|
||||
|
|
@ -204,6 +210,10 @@ function onSubmitComment(role: string) {
|
|||
});
|
||||
}
|
||||
|
||||
function onCheckNumber(num: number) {
|
||||
numLevel.value = num.toString();
|
||||
}
|
||||
|
||||
watch(
|
||||
() => modal.value,
|
||||
() => {
|
||||
|
|
@ -543,7 +553,7 @@ watch(
|
|||
:rules="[(val:string) => !!val || `${type == 'capacity'||type == 'development' ? 'กรุณากรอกเหตุการณ์/พฤติกรรม':'กรุณากรอกหัวข้อความก้าวหน้า' }`,]"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
<!-- <div
|
||||
class="col-12"
|
||||
v-if="type !== 'capacity' && type !== 'development'"
|
||||
>
|
||||
|
|
@ -557,6 +567,27 @@ watch(
|
|||
hide-bottom-space
|
||||
:rules="[(val:string) => !!val || `${'กรุณากรอกคะแนน'}`,]"
|
||||
/>
|
||||
</div> -->
|
||||
<div
|
||||
class="col-12"
|
||||
v-if="type !== 'capacity' && type !== 'development'"
|
||||
>
|
||||
<q-btn-group outline>
|
||||
<q-btn
|
||||
v-for="i in 5"
|
||||
:class="numLevel == i.toString() && 'active'"
|
||||
outline
|
||||
color="grey-6"
|
||||
:label="i"
|
||||
@click="onCheckNumber(i)"
|
||||
>
|
||||
<q-tooltip>
|
||||
<div class="text-body2">
|
||||
<span>{{ i }}</span>
|
||||
</div>
|
||||
</q-tooltip>
|
||||
</q-btn>
|
||||
</q-btn-group>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue