Merge branch 'nice_dev' into develop
This commit is contained in:
commit
b8d77ede29
2 changed files with 53 additions and 31 deletions
|
|
@ -3,6 +3,7 @@ const development = `${env.API_URI}/development`;
|
||||||
const developmentOrg = `${env.API_URI}/org`;
|
const developmentOrg = `${env.API_URI}/org`;
|
||||||
const devScholarship = `${env.API_URI}/development/scholarship`;
|
const devScholarship = `${env.API_URI}/development/scholarship`;
|
||||||
const developmentReport = `${env.API_URI}/development/report`;
|
const developmentReport = `${env.API_URI}/development/report`;
|
||||||
|
const devStrategy = `${env.API_URI}/development/strategy`;
|
||||||
export default {
|
export default {
|
||||||
development,
|
development,
|
||||||
/** history */
|
/** history */
|
||||||
|
|
@ -32,13 +33,14 @@ export default {
|
||||||
`${developmentReport}/history-employee`,
|
`${developmentReport}/history-employee`,
|
||||||
developmentReportScholarship: () => `${developmentReport}/scholarship`,
|
developmentReportScholarship: () => `${developmentReport}/scholarship`,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// ปิดโครงการ
|
// ปิดโครงการ
|
||||||
developmentMainFinish: (id: string) => `${development}/main/finish/${id}`,
|
developmentMainFinish: (id: string) => `${development}/main/finish/${id}`,
|
||||||
// ข้อมูล status ของโครงการ
|
// ข้อมูล status ของโครงการ
|
||||||
developmentMainStatus: (id: string) => `${development}/main/status/${id}`,
|
developmentMainStatus: (id: string) => `${development}/main/status/${id}`,
|
||||||
|
|
||||||
/** โครงการ tab ข้อมูลเบื้องต้น */
|
/** โครงการ tab ข้อมูลเบื้องต้น */
|
||||||
developmentBasicInfoById: (id:string) => `${development}/main/tab1/${id}`
|
developmentBasicInfoById: (id: string) => `${development}/main/tab1/${id}`,
|
||||||
|
|
||||||
|
/**API ยุทธศาสตร์*/
|
||||||
|
devStrategy,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { ref, onMounted } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { ref } from "vue";
|
import http from "@/plugins/http";
|
||||||
|
import config from "@/app.config";
|
||||||
|
|
||||||
import DialogHeader from "@/components/DialogHeader.vue";
|
import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
|
|
||||||
|
|
@ -32,28 +34,28 @@ const ListMenu = ref<any>([
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const nodes = ref<any>([
|
const nodes = ref<any>([
|
||||||
{
|
// {
|
||||||
orgTreeName: " แผนพัฒนากรุงเทพมหานคร ระยะ 20 ปี ระยะที่ 3",
|
// orgTreeName: " แผนพัฒนากรุงเทพมหานคร ระยะ 20 ปี ระยะที่ 3",
|
||||||
level: "0",
|
// level: "0",
|
||||||
children: [
|
// children: [
|
||||||
{
|
// {
|
||||||
orgTreeName: "ยุทธศาสตร์ที่ 1",
|
// orgTreeName: "ยุทธศาสตร์ที่ 1",
|
||||||
level: "1",
|
// level: "1",
|
||||||
children: [
|
// children: [
|
||||||
{
|
// {
|
||||||
orgTreeName: "ยุทธศาสตร์ที่ 2",
|
// orgTreeName: "ยุทธศาสตร์ที่ 2",
|
||||||
level: "2",
|
// level: "2",
|
||||||
children: [
|
// children: [
|
||||||
{
|
// {
|
||||||
orgTreeName: "ยุทธศาสตร์ที่ 3",
|
// orgTreeName: "ยุทธศาสตร์ที่ 3",
|
||||||
level: "3",
|
// level: "3",
|
||||||
},
|
// },
|
||||||
],
|
// ],
|
||||||
},
|
// },
|
||||||
],
|
// ],
|
||||||
},
|
// },
|
||||||
],
|
// ],
|
||||||
},
|
// },
|
||||||
]);
|
]);
|
||||||
const filter = ref<string>("");
|
const filter = ref<string>("");
|
||||||
const notFound = ref<string>("ไม่พบข้อมูลที่ค้นหา");
|
const notFound = ref<string>("ไม่พบข้อมูลที่ค้นหา");
|
||||||
|
|
@ -61,6 +63,20 @@ const noData = ref<string>("ไม่มีข้อมูล");
|
||||||
const expanded = ref<Array<any>>([]);
|
const expanded = ref<Array<any>>([]);
|
||||||
const nodeId = ref<string>("");
|
const nodeId = ref<string>("");
|
||||||
|
|
||||||
|
function fetchDataTree() {
|
||||||
|
showLoader();
|
||||||
|
http
|
||||||
|
.get(config.API.devStrategy)
|
||||||
|
.then((res) => {
|
||||||
|
const data = res.data.result;
|
||||||
|
nodes.value = data;
|
||||||
|
})
|
||||||
|
.catch((err) => {})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function updateSelected(data: any) {
|
function updateSelected(data: any) {
|
||||||
nodeId.value = data.orgTreeName;
|
nodeId.value = data.orgTreeName;
|
||||||
}
|
}
|
||||||
|
|
@ -145,6 +161,10 @@ function onSubmit() {
|
||||||
function onDelete() {
|
function onDelete() {
|
||||||
dialogRemove($q, () => {});
|
dialogRemove($q, () => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
fetchDataTree();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div class="toptitle text-dark col-12 row items-center">ยุทธศาสตร์</div>
|
<div class="toptitle text-dark col-12 row items-center">ยุทธศาสตร์</div>
|
||||||
|
|
@ -179,8 +199,8 @@ function onDelete() {
|
||||||
class="q-pa-sm q-gutter-sm"
|
class="q-pa-sm q-gutter-sm"
|
||||||
dense
|
dense
|
||||||
:nodes="nodes"
|
:nodes="nodes"
|
||||||
node-key="orgTreeName"
|
node-key="strategyChild1Name"
|
||||||
label-key="orgTreeName"
|
label-key="strategyChild1Name"
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
:no-results-label="notFound"
|
:no-results-label="notFound"
|
||||||
:no-nodes-label="noData"
|
:no-nodes-label="noData"
|
||||||
|
|
@ -190,13 +210,13 @@ function onDelete() {
|
||||||
<q-item
|
<q-item
|
||||||
clickable
|
clickable
|
||||||
@click.stop
|
@click.stop
|
||||||
:active="nodeId == prop.node.orgTreeName"
|
:active="nodeId == prop.node.strategyChild1Name"
|
||||||
active-class="my-list-link text-primary text-weight-medium"
|
active-class="my-list-link text-primary text-weight-medium"
|
||||||
class="row col-12 items-center text-dark q-py-xs q-pl-sm rounded-borders my-list"
|
class="row col-12 items-center text-dark q-py-xs q-pl-sm rounded-borders my-list"
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
<div class="text-weight-medium">
|
<div class="text-weight-medium">
|
||||||
{{ prop.node.orgTreeName }}
|
{{ prop.node.strategyChild1Name }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<q-btn
|
<q-btn
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue