แก้ kpi
This commit is contained in:
parent
ffc11fd929
commit
8c5f1bd5a6
1 changed files with 8 additions and 11 deletions
|
|
@ -8,7 +8,10 @@ import http from "@/plugins/http";
|
|||
import config from "@/app.config";
|
||||
import { useRoute } from "vue-router";
|
||||
|
||||
import type { DataOptionTechnique,ProjectYearOp } from "@/modules/08_KPI/interface/index/Main";
|
||||
import type {
|
||||
DataOptionTechnique,
|
||||
ProjectYearOp,
|
||||
} from "@/modules/08_KPI/interface/index/Main";
|
||||
|
||||
const props = defineProps({
|
||||
getAll: Function,
|
||||
|
|
@ -181,7 +184,6 @@ function close() {
|
|||
reasonDevelopment10.value = "";
|
||||
development.value = [];
|
||||
|
||||
|
||||
props.getAll?.();
|
||||
}
|
||||
|
||||
|
|
@ -237,7 +239,7 @@ watch(
|
|||
showLoader();
|
||||
http
|
||||
.get(config.API.kpiAchievementDevelop + `/${id.value}`)
|
||||
.then(async(res) => {
|
||||
.then(async (res) => {
|
||||
const data = res.data.result;
|
||||
formData.year = data.selectTypeYear;
|
||||
await getDataByYear();
|
||||
|
|
@ -289,7 +291,7 @@ async function getDataByYear() {
|
|||
showLoader();
|
||||
http
|
||||
.get(config.API.developmentMain + `/done?year=${formData.year}`)
|
||||
.then(async(res) => {
|
||||
.then(async (res) => {
|
||||
const data = await res.data.result.data;
|
||||
projectOpMain.value = data;
|
||||
})
|
||||
|
|
@ -310,13 +312,9 @@ function getProjectDetail(val: any) {
|
|||
const data = res.data.result;
|
||||
formData.name = val.projectName;
|
||||
formData.group = data.group;
|
||||
formData.target = data.target;
|
||||
formData.isDevelopment70 = data.isDevelopment70;
|
||||
formData.isDevelopment20 = data.isDevelopment20;
|
||||
formData.isDevelopment10 = data.isDevelopment10;
|
||||
formData.achievement10 = data.achievement10;
|
||||
formData.achievement5 = data.achievement5;
|
||||
formData.achievement0 = data.achievement0;
|
||||
development.value = data.developmentProjectTechniqueActuals;
|
||||
reasonDevelopment70.value =
|
||||
data.developmentProjectTechniqueActuals.includes("other1")
|
||||
|
|
@ -344,7 +342,7 @@ function getProjectDetail(val: any) {
|
|||
* @param val คำค้นหา
|
||||
* @param update function
|
||||
*/
|
||||
function filterOptionFn(val: string, update: Function) {
|
||||
function filterOptionFn(val: string, update: Function) {
|
||||
projectName.value = "";
|
||||
update(() => {
|
||||
projectOp.value = projectOpMain.value.filter(
|
||||
|
|
@ -352,7 +350,6 @@ function getProjectDetail(val: any) {
|
|||
);
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
<template>
|
||||
<q-dialog persistent v-model="modal">
|
||||
|
|
@ -390,7 +387,7 @@ function getProjectDetail(val: any) {
|
|||
year-picker
|
||||
:alt-position="customPosition"
|
||||
:enableTimePicker="false"
|
||||
@update:model-value="getDataByYear(),projectName = ''"
|
||||
@update:model-value="getDataByYear(), (projectName = '')"
|
||||
>
|
||||
<template #year="{ year }">{{ year + 543 }}</template>
|
||||
<template #year-overlay-value="{ value }">{{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue