updated portfolio
This commit is contained in:
parent
cad424140e
commit
080ef0b4e8
5 changed files with 63 additions and 50 deletions
|
|
@ -11,6 +11,7 @@ const KpiFile = `${env.API_URI}/salary/file`;
|
||||||
const KpiEvaluationInfo = `${env.API_URI}/kpi/evaluation`;
|
const KpiEvaluationInfo = `${env.API_URI}/kpi/evaluation`;
|
||||||
const Kpiorg = `${env.API_URI}/org/profile/commander`;
|
const Kpiorg = `${env.API_URI}/org/profile/commander`;
|
||||||
|
|
||||||
|
const Kpi = `${env.API_URI}/kpi`;
|
||||||
const KpiUser = `${env.API_URI}/kpi/user`;
|
const KpiUser = `${env.API_URI}/kpi/user`;
|
||||||
const kpiAchievement = `${env.API_URI}/kpi/user/achievement`;
|
const kpiAchievement = `${env.API_URI}/kpi/user/achievement`;
|
||||||
const kpiReason = `${env.API_URI}/kpi/reason`;
|
const kpiReason = `${env.API_URI}/kpi/reason`;
|
||||||
|
|
@ -60,5 +61,5 @@ export default {
|
||||||
sendToSummary: (id: string) => `${kpiEvaluation}/summary/${id}`,
|
sendToSummary: (id: string) => `${kpiEvaluation}/summary/${id}`,
|
||||||
updatePoint: (id: string) => `${kpiEvaluation}/point/${id}`,
|
updatePoint: (id: string) => `${kpiEvaluation}/point/${id}`,
|
||||||
openPoint: (id: string) => `${kpiEvaluation}/open/${id}`,
|
openPoint: (id: string) => `${kpiEvaluation}/open/${id}`,
|
||||||
kpiReport: (id: string) => `${kpiEvaluation}/report/${id}`,
|
kpiReport: (id: string) => `${Kpi}/report/kpi9/${id}`,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
9
src/api/api.development.ts
Normal file
9
src/api/api.development.ts
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
import env from "./index";
|
||||||
|
|
||||||
|
const development = `${env.API_URI}/development`;
|
||||||
|
|
||||||
|
export default {
|
||||||
|
// portfolio
|
||||||
|
portfolio: `${development}/portfolio`,
|
||||||
|
portfolioId: (id: string) => `${development}/portfolio/${id}`,
|
||||||
|
};
|
||||||
|
|
@ -12,6 +12,7 @@ import org from "./api/org/api.org";
|
||||||
import scholarship from "./api/scholarship/api.scholarship";
|
import scholarship from "./api/scholarship/api.scholarship";
|
||||||
import kpi from "./api/KPI/api.kpis";
|
import kpi from "./api/KPI/api.kpis";
|
||||||
import probation from "./api/probation/api.probation";
|
import probation from "./api/probation/api.probation";
|
||||||
|
import development from "./api/api.development";
|
||||||
|
|
||||||
const API = {
|
const API = {
|
||||||
...testtest,
|
...testtest,
|
||||||
|
|
@ -25,6 +26,7 @@ const API = {
|
||||||
...scholarship,
|
...scholarship,
|
||||||
...kpi,
|
...kpi,
|
||||||
...probation,
|
...probation,
|
||||||
|
...development,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ const { success, messageError, showLoader, hideLoader, dialogConfirm } = mixin;
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const files = ref<any>();
|
const files = ref<any>();
|
||||||
const name = ref("");
|
const name = ref("");
|
||||||
const description = ref("");
|
const detail = ref("");
|
||||||
const id = ref<string>("");
|
const id = ref<string>("");
|
||||||
const nameFile = ref<string>("");
|
const nameFile = ref<string>("");
|
||||||
const routeName = router.currentRoute.value.name;
|
const routeName = router.currentRoute.value.name;
|
||||||
|
|
@ -49,22 +49,22 @@ const saveData = async () => {
|
||||||
*/
|
*/
|
||||||
const createTransfer = async () => {
|
const createTransfer = async () => {
|
||||||
showLoader();
|
showLoader();
|
||||||
const formData = new FormData();
|
// const formData = new FormData();
|
||||||
formData.append("Organization", name.value);
|
// formData.append("name", name.value);
|
||||||
formData.append("Reason", description.value);
|
// formData.append("detail", detail.value);
|
||||||
formData.append("file", files.value);
|
// formData.append("file", files.value);
|
||||||
// await http
|
await http
|
||||||
// .post(config.API.listtransfer(), formData)
|
.post(config.API.portfolio, { name: name.value, detail: detail.value })
|
||||||
// .then((res: any) => {
|
.then((res: any) => {
|
||||||
// success($q, "บันทึกข้อมูลสำเร็จ");
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
// router.push(`/transfer`);
|
router.push(`/portfolio`);
|
||||||
// })
|
})
|
||||||
// .catch((e: any) => {
|
.catch((e: any) => {
|
||||||
// messageError($q, e);
|
messageError($q, e);
|
||||||
// })
|
})
|
||||||
// .finally(() => {
|
.finally(() => {
|
||||||
// hideLoader();
|
hideLoader();
|
||||||
// });
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -72,21 +72,21 @@ const createTransfer = async () => {
|
||||||
* @param id ไอดีของข้อมูล
|
* @param id ไอดีของข้อมูล
|
||||||
*/
|
*/
|
||||||
const fecthData = async (id: string) => {
|
const fecthData = async (id: string) => {
|
||||||
// showLoader();
|
showLoader();
|
||||||
// await http
|
await http
|
||||||
// .get(config.API.transferByid(id))
|
.get(config.API.portfolioId(id))
|
||||||
// .then((res: any) => {
|
.then((res: any) => {
|
||||||
// let data = res.data.result;
|
let data = res.data.result;
|
||||||
// name.value = data.organization;
|
name.value = data.organization;
|
||||||
// description.value = data.reason;
|
detail.value = data.reason;
|
||||||
// files.value = data.docs;
|
files.value = data.docs;
|
||||||
// })
|
})
|
||||||
// .catch((e: any) => {
|
.catch((e: any) => {
|
||||||
// messageError($q, e);
|
messageError($q, e);
|
||||||
// })
|
})
|
||||||
// .finally(() => {
|
.finally(() => {
|
||||||
// hideLoader();
|
hideLoader();
|
||||||
// });
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -153,7 +153,7 @@ function fileOpen(url: string) {
|
||||||
"
|
"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
v-model="description"
|
v-model="detail"
|
||||||
label="รายละเอียดเอกสาร/ผลงาน"
|
label="รายละเอียดเอกสาร/ผลงาน"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
type="textarea"
|
type="textarea"
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ const pagination = ref({
|
||||||
*/
|
*/
|
||||||
const filter = ref<string>("");
|
const filter = ref<string>("");
|
||||||
const rows = ref<any>([]);
|
const rows = ref<any>([]);
|
||||||
const visibleColumns = ref<String[]>(["no", "name", "description"]);
|
const visibleColumns = ref<String[]>(["no", "name", "detail"]);
|
||||||
const columns = ref<QTableProps["columns"]>([
|
const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "no",
|
name: "no",
|
||||||
|
|
@ -45,11 +45,11 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
style: "font-size: 14px; width:5px;",
|
style: "font-size: 14px; width:5px;",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "description",
|
name: "detail",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "รายละเอียดเอกสาร/ผลงาน",
|
label: "รายละเอียดเอกสาร/ผลงาน",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "description",
|
field: "detail",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px; width:5px;",
|
style: "font-size: 14px; width:5px;",
|
||||||
},
|
},
|
||||||
|
|
@ -64,17 +64,18 @@ onMounted(async () => {
|
||||||
|
|
||||||
//นำข้อมูลมาแสดง
|
//นำข้อมูลมาแสดง
|
||||||
const fecthList = async () => {
|
const fecthList = async () => {
|
||||||
// showLoader();
|
showLoader();
|
||||||
// await http
|
await http
|
||||||
// .get(config.API.listUserTransfer())
|
.get(config.API.portfolio)
|
||||||
// .then((res: any) => {
|
.then((res: any) => {
|
||||||
// })
|
rows.value = res.data.result;
|
||||||
// .catch((e: any) => {
|
})
|
||||||
// messageError($q, e);
|
.catch((e: any) => {
|
||||||
// })
|
messageError($q, e);
|
||||||
// .finally(() => {
|
})
|
||||||
// hideLoader();
|
.finally(() => {
|
||||||
// });
|
hideLoader();
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -211,7 +212,7 @@ const clickBack = () => {
|
||||||
v-for="col in props.cols"
|
v-for="col in props.cols"
|
||||||
:key="col.name"
|
:key="col.name"
|
||||||
:props="props"
|
:props="props"
|
||||||
@click="router.push(`/transfer/` + props.row.id)"
|
@click="router.push(`/portfolio/` + props.row.id)"
|
||||||
>
|
>
|
||||||
<div v-if="col.name == 'no'">
|
<div v-if="col.name == 'no'">
|
||||||
{{ props.rowIndex + 1 }}
|
{{ props.rowIndex + 1 }}
|
||||||
|
|
@ -227,7 +228,7 @@ const clickBack = () => {
|
||||||
<q-card
|
<q-card
|
||||||
bordered
|
bordered
|
||||||
flat
|
flat
|
||||||
@click="router.push(`/transfer/` + props.row.id)"
|
@click="router.push(`/portfolio/` + props.row.id)"
|
||||||
>
|
>
|
||||||
<q-list>
|
<q-list>
|
||||||
<q-item
|
<q-item
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue