Merge branch 'develop' into devTee
This commit is contained in:
commit
66bb690fa1
5 changed files with 37 additions and 20 deletions
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, watch } from "vue";
|
||||
import { ref, watch, computed } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import config from "@/app.config";
|
||||
|
|
@ -103,7 +103,8 @@ const listMenu = ref<ListMenu[]>([
|
|||
color: "deep-purple",
|
||||
},
|
||||
]);
|
||||
const document = ref<DataDocument[]>([
|
||||
|
||||
const baseDocument = ref<DataDocument[]>([
|
||||
{
|
||||
name: "บัญชี 1",
|
||||
val: "report1",
|
||||
|
|
@ -118,6 +119,14 @@ const document = ref<DataDocument[]>([
|
|||
},
|
||||
]);
|
||||
|
||||
const document = computed(() => {
|
||||
if (store.typeOrganizational === "draft") {
|
||||
return baseDocument.value;
|
||||
} else {
|
||||
return baseDocument.value.filter((e: DataDocument) => e.val === "report2");
|
||||
}
|
||||
});
|
||||
|
||||
/** columns*/
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
{
|
||||
|
|
@ -513,14 +522,8 @@ watch(
|
|||
</q-btn>
|
||||
</div>
|
||||
|
||||
<q-btn
|
||||
v-if="store.typeOrganizational === 'draft'"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
color="deep-purple"
|
||||
icon="save_alt"
|
||||
>
|
||||
<!-- v-if="store.typeOrganizational === 'draft'" -->
|
||||
<q-btn flat round dense color="deep-purple" icon="save_alt">
|
||||
<q-menu>
|
||||
<q-list
|
||||
dense
|
||||
|
|
|
|||
|
|
@ -7,6 +7,12 @@ interface DataOption {
|
|||
name: string;
|
||||
}
|
||||
|
||||
interface DataOrgRevision {
|
||||
id: string;
|
||||
name: string;
|
||||
orgRevisionCreatedAt: string;
|
||||
}
|
||||
|
||||
interface DataDocument {
|
||||
name: string;
|
||||
val: string;
|
||||
|
|
@ -158,4 +164,5 @@ export type {
|
|||
FormPositionSelectRef,
|
||||
NewPagination,
|
||||
DataDocument,
|
||||
DataOrgRevision,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ interface OrgTree {
|
|||
}
|
||||
|
||||
interface OrgRevision {
|
||||
orgRevisionCreatedAt: string | null;
|
||||
orgRevisionCreatedAt: Date | null;
|
||||
orgRevisionId: string;
|
||||
orgRevisionIsCurrent: boolean;
|
||||
orgRevisionIsDraft: boolean;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import { useCounterMixin } from "@/stores/mixin";
|
|||
/**
|
||||
* importType
|
||||
*/
|
||||
import type { DataOption } from "@/modules/02_organization/interface/index/Main";
|
||||
import type { DataOrgRevision } from "@/modules/02_organization/interface/index/Main";
|
||||
import type { OrgRevision } from "@/modules/02_organization/interface/response/organizational";
|
||||
|
||||
/**
|
||||
|
|
@ -37,7 +37,7 @@ const modalDateTime = ref<boolean>(false); // ตั้งเวลาเผย
|
|||
const isStatusData = ref<boolean>(false); // แสดงตั้งเวลาเผยแพร่
|
||||
const typeStructure = ref<string>(""); // ประเภทการเพิ่มโครงสร้าง
|
||||
/** ประวัติโครงสร้าง*/
|
||||
const itemHistory = ref<DataOption[]>([]); // List ประวัติโครงสร้าง
|
||||
const itemHistory = ref<DataOrgRevision[]>([]); // List ประวัติโครงสร้าง
|
||||
const historyId = ref<string>(""); // ID ประวัติโครงสร้าง
|
||||
const labelHistory = ref<string>("ประวัติโครงสร้าง"); // ชื่อประวัติโครงสร้าง
|
||||
const count = ref<number>(0);
|
||||
|
|
@ -91,6 +91,9 @@ async function fetchHistory() {
|
|||
itemHistory.value = filterData.map((e: OrgRevision) => ({
|
||||
id: e.orgRevisionId,
|
||||
name: e.orgRevisionName,
|
||||
orgRevisionCreatedAt: e.orgRevisionCreatedAt
|
||||
? date2Thai(e.orgRevisionCreatedAt)
|
||||
: "",
|
||||
}));
|
||||
})
|
||||
.catch((err) => {
|
||||
|
|
@ -291,7 +294,10 @@ onMounted(async () => {
|
|||
@click="onClickHistory(item.id, item.name)"
|
||||
>
|
||||
<q-item-section>
|
||||
<q-item-label>{{ item.name }}</q-item-label>
|
||||
<q-item-label
|
||||
>{{ item.orgRevisionCreatedAt }}
|
||||
{{ item.name }}</q-item-label
|
||||
>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
import { ref, watch } from "vue";
|
||||
import { loadModules } from "esri-loader";
|
||||
|
||||
const apiKey = ref<string>(
|
||||
"AAPK4f700a4324d04e9f8a1a134e0771ac45FXWawdCl-OotFfr52gz9XKxTDJTpDzw_YYcwbmKDDyAJswf14FoPyw0qBkN64DvP"
|
||||
);
|
||||
// const apiKey = ref<string>(
|
||||
// "YLATgWuywoeRLHn6KImj5rg7UaP8bJoR9jiTldoCVBHlqFIebwMSA5wIXEmcYhwXwMHkmNISEYtUz3x0oiGIIx0bIXXnUwi0OzupoOEtDrQIsRPVtor7gaPpXEmH8TrNaMT3snf6zO_yujHLGzborg"
|
||||
// );
|
||||
const props = defineProps({
|
||||
modal: {
|
||||
type: Boolean,
|
||||
|
|
@ -33,9 +33,10 @@ async function initializeMap(lat: number, long: number) {
|
|||
"esri/Graphic",
|
||||
]);
|
||||
// Set apiKey
|
||||
esriConfig.apiKey = apiKey.value;
|
||||
// esriConfig.apiKey = apiKey.value;
|
||||
const map = new Map({
|
||||
basemap: "arcgis-topographic",
|
||||
// basemap: "arcgis-topographic",
|
||||
basemap: "streets",
|
||||
});
|
||||
|
||||
const point = new Point({
|
||||
|
|
@ -51,7 +52,7 @@ async function initializeMap(lat: number, long: number) {
|
|||
latitude: lat,
|
||||
longitude: long,
|
||||
}, // Set the initial map center current position
|
||||
zoom: 16,
|
||||
zoom: 18,
|
||||
ui: {
|
||||
components: [], // Empty array to remove all default UI components
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue