Update imports and variables in Type2.vue and fix data binding in Table_67.vue fixing for build

This commit is contained in:
Eko Haryadi 2024-02-24 15:41:23 +07:00
parent 21abb95623
commit f08a1cc9bc
2 changed files with 7 additions and 6 deletions

View File

@ -1,6 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import Select from '@/components/Select.vue' import Select from '@/components/Select.vue'
import { selectedUid, selectedUp3Ulp,fetchRegional,fetchUid,fetchUidWithRegional, itemsUid, itemsUp3, itemsUlp,itemsRegional ,months, years} from './reference'; import { selectedUid, selectedUp3Ulp,fetchRegional,fetchUid,fetchUidByRegional, itemsUid, itemsUp3, itemsUlp,itemsRegional ,months, years} from './reference';
import { onMounted, ref } from 'vue'; import { onMounted, ref } from 'vue';
import { getMonthName } from '@/utils/texts'; import { getMonthName } from '@/utils/texts';
const uidPlaceholder = 'Semua Unit Induk Distribusi/Wilayah'; const uidPlaceholder = 'Semua Unit Induk Distribusi/Wilayah';
@ -13,7 +13,7 @@ const bulanSelected = new Date().getMonth();
const tahunSelected = new Date().getFullYear(); const tahunSelected = new Date().getFullYear();
const uppp = ref({ id: 0, name: up3Placholder }); const uppp = ref({ id: 0, name: up3Placholder });
const uid = ref({ id: 0, name: uidPlaceholder }); const uid = ref({ id: 0, name: uidPlaceholder });
const ulp = ref({ id: "", name: ulpPlaceholder }); const ulp = ref({ id: 0, name: ulpPlaceholder });
const bulan = ref({ id: bulanSelected, name: bulanPlaceholder }); const bulan = ref({ id: bulanSelected, name: bulanPlaceholder });
const tahun = ref({ id: tahunSelected, name: tahunPlaceholder }); const tahun = ref({ id: tahunSelected, name: tahunPlaceholder });
const regional = ref({ id: 0, name: regionalPlaceholder }); const regional = ref({ id: 0, name: regionalPlaceholder });
@ -42,8 +42,7 @@ const data = ref({
const setRegional = (value: any) => { const setRegional = (value: any) => {
regional.value = value; regional.value = value;
fetchUid(); fetchUidByRegional(value);
// harusnya fetchUidWithRegional(value);
selectedUid(value); selectedUid(value);
uid.value = { id: 0, name: uidPlaceholder }; uid.value = { id: 0, name: uidPlaceholder };
data.value.regional = value; data.value.regional = value;
@ -59,7 +58,7 @@ const setUid = (value: any) => {
const setUp3 = (value: any) => { const setUp3 = (value: any) => {
uppp.value = value; uppp.value = value;
selectedUp3Ulp(value); selectedUp3Ulp(value);
ulp.value = { id: "", name: ulpPlaceholder }; ulp.value = { id: 0, name: ulpPlaceholder };
data.value.up3 = value; data.value.up3 = value;
}; };

View File

@ -6,7 +6,7 @@
" /> " />
</Filters> </Filters>
<div id="data"> <div id="data">
<DxDataGrid class="max-h-[calc(100vh-140px)]" :show-column-lines="true" :show-row-lines="false" :show-borders="true" <DxDataGrid class="max-h-[calc(100vh-140px)]" :data-source="data" :show-column-lines="true" :show-row-lines="false" :show-borders="true"
:row-alternation-enabled="true" :hover-state-enabled="true" @selection-changed="onSelectionChanged" :row-alternation-enabled="true" :hover-state-enabled="true" @selection-changed="onSelectionChanged"
:column-width="100" @exporting="onExporting" :allow-column-resizing="true" column-resizing-mode="widget" :column-width="100" @exporting="onExporting" :allow-column-resizing="true" column-resizing-mode="widget"
:word-wrap-enabled="true"> :word-wrap-enabled="true">
@ -81,6 +81,8 @@ const shading = ref(true)
const showPane = ref(true) const showPane = ref(true)
const dataDetail = ref<any>() const dataDetail = ref<any>()
const showDetail = ref(false) const showDetail = ref(false)
const data = ref<any[]>([])
const onExporting = (e: any) => { const onExporting = (e: any) => {
if (e.format === 'pdf') { if (e.format === 'pdf') {
const doc = new jsPDF() const doc = new jsPDF()