Merge branch 'develop' of https://github.com/Frappet/bma-ehr-frontend into develop

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-09-02 11:07:10 +07:00
commit 2f4b6dadb8
11 changed files with 18 additions and 17 deletions

View file

@ -33,11 +33,12 @@ export default {
kpiEvaluation,
kpiEvaluationUser,
kpiPlan,
kpiPlanById: (id: string) => `${kpiPlan}/${id}`,
kpiPlanById: (id: string) => `${kpiPlan}/edit/${id}`,
/** role */
kpiRole,
kpiRoleMainList: `${KPI}/role`,
kpiRoleMainEdit: `${KPI}/role/edit`,
kpiSpecial,
kpiCapacity,

View file

@ -65,7 +65,7 @@ const roundOp = ref<DataOption[]>([
function fetchspecialByid(id: string) {
showLoader();
http
.get(config.API.kpiSpecial + `/${id}`)
.get(config.API.kpiSpecial + `/edit/${id}`)
.then((res) => {
console.log(res);
const data = res.data.result;

View file

@ -127,7 +127,7 @@ function selectAgency() {
/** บันทึกข้อมูล */
function onSubmit() {
const url = id.value
? config.API.kpiRoleMainList + `/${id.value}`
? config.API.kpiRoleMainEdit + `/${id.value}`
: config.API.kpiRoleMainList;
const body = {
@ -177,7 +177,7 @@ function onSubmit() {
function getDetail() {
showLoader();
http
.get(config.API.kpiRoleMainList + `/${id.value}`)
.get(config.API.kpiRoleMainEdit + `/${id.value}`)
.then((res) => {
const data = res.data.result;
form.position = data.position;

View file

@ -78,7 +78,7 @@ async function fetchList() {
await http
.get(
config.API.kpiCapacity +
`?page=${formQuery.page}&pageSize=${formQuery.pageSize}&keyword=${formQuery.keyword}&type=${store.competencyTypeVal}`
`/edit?page=${formQuery.page}&pageSize=${formQuery.pageSize}&keyword=${formQuery.keyword}&type=${store.competencyTypeVal}`
)
.then(async (res) => {
total.value = res.data.result.total;

View file

@ -37,7 +37,7 @@ const formData = reactive({
function fetchDetail() {
showLoader();
http
.get(config.API.kpiCapacity + `/${competencyId.value}`)
.get(config.API.kpiCapacity + `/edit/${competencyId.value}`)
.then((res) => {
const data = res.data.result;
formData.competencyType = data.type;

View file

@ -92,7 +92,7 @@ function fetchList() {
showLoader();
formFilter.year = formFilter.year ? formFilter.year.toString() : null;
http
.post(config.API.kpiSpecial + `/search`, formFilter)
.post(config.API.kpiSpecial + `/search-edit`, formFilter)
.then((res: ResAssignment) => {
maxPage.value = Math.ceil(res.data.result.total / formFilter.pageSize);
totalList.value = res.data.result.total;
@ -115,7 +115,7 @@ function onClickDelete(id: string) {
dialogRemove($q, () => {
showLoader();
http
.delete(config.API.kpiSpecial + `/${id}`)
.delete(config.API.kpiSpecial + `/edit/${id}`)
.then(() => {
fetchList();
success($q, "ลบข้อมูลสำเร็จ");

View file

@ -154,7 +154,7 @@ function onSubmit() {
};
try {
const method = isStatusEdit.value ? "patch" : "post";
await http[method](config.API.devStrategy, formData);
await http[method](config.API.devStrategy+`/edit`, formData);
fetchDataTree();
success($q, "บันทึกข้อมูลสำเร็จ");
} catch (err) {

View file

@ -72,7 +72,7 @@ function fetchList() {
if (nodeData.nodeId) {
showLoader();
http
.post(config.API.kpiPlan + `/search`, {
.post(config.API.kpiPlan + `/search-edit`, {
isAll: isAll.value,
keyword: nodeData.keyword,
node: nodeData.node ? nodeData.node : 0,

View file

@ -102,7 +102,7 @@ const roundOp = ref<DataOption[]>([
function fetchList() {
http
.post(config.API.kpiRoleMainList + `/search`, {
.post(config.API.kpiRoleMainList + `/search-edit`, {
// ?page=${formFilter.page}&pageSize=${formFilter.pageSize}&period=${formFilter.round}&position=${formFilter.position}&keyword=${formFilter.keyword}&year=${formFilter.year}
keyword: formFilter.keyword,
position: formFilter.position,
@ -141,7 +141,7 @@ function onClickDelete(id: number) {
dialogRemove($q, () => {
showLoader();
http
.delete(config.API.kpiRoleMainList + `/${id}`)
.delete(config.API.kpiRoleMainEdit + `/${id}`)
.then(() => {
success($q, "ลบข้อมูลสำเร็จ");
fetchList();

View file

@ -94,7 +94,7 @@ function fetchListPlan() {
showLoader();
http
.post(config.API.kpiPlan + `/search`, formFilter)
.post(config.API.kpiPlan + `/search-edit`, formFilter)
.then((res) => {
listTarget.value = res.data.result.data;
maxPage.value = Math.ceil(res.data.result.total / formFilter.pageSize);
@ -148,7 +148,7 @@ function fetchListRole() {
formFilter.position = store.dataProfile.position;
http
.post(config.API.kpiRole + `/search`, formFilter)
.post(config.API.kpiRole + `/search-edit`, formFilter)
.then((res) => {
listTarget.value = res.data.result.data;
maxPage.value = Math.ceil(res.data.result.total / formFilter.pageSize);
@ -208,7 +208,7 @@ function fetchListSpecial() {
showLoader();
http
.post(config.API.kpiSpecial + `/search`, body)
.post(config.API.kpiSpecial + `/search-edit`, body)
.then((res) => {
listTarget.value = res.data.result.data;
maxPage.value = Math.ceil(res.data.result.total / formFilter.pageSize);

View file

@ -677,9 +677,9 @@ watch(
</q-card-section>
<q-separator />
<q-card-actions align="right" class="bg-white text-teal">
<q-space />
<div class="text-red q-px-sm">
<div v-if="isRoundClose" class="text-red q-px-sm">
รอบการประเมนนดแล
</div>
<q-btn