Refactor form filters in Type3.vue
This commit is contained in:
parent
92586e7780
commit
8324570c88
@ -10,13 +10,13 @@ import {
|
|||||||
itemsUp3,
|
itemsUp3,
|
||||||
itemsUlp
|
itemsUlp
|
||||||
} from './reference'
|
} from './reference'
|
||||||
import { onMounted, ref, watch } from 'vue'
|
import { onMounted, ref } from 'vue'
|
||||||
const uidPlaceholder = 'Semua Unit Induk Distribusi/Wilayah'
|
const uidPlaceholder = 'Semua Unit Induk Distribusi/Wilayah'
|
||||||
const up3Placeholder = 'Semua Unit Pelaksanaan Pelayanan Pelanggan'
|
const up3Placeholder = 'Semua Unit Pelaksanaan Pelayanan Pelanggan'
|
||||||
const ulpPlaceholder = 'Semua Unit Layanan Pelanggan'
|
const ulpPlaceholder = 'Semua Unit Layanan Pelanggan'
|
||||||
const up3 = ref({ id: 0, name: up3Placeholder })
|
const uppp = ref({ id: 0, name: up3Placeholder })
|
||||||
const uid = ref({ id: 0, name: uidPlaceholder })
|
const uid = ref({ id: 0, name: uidPlaceholder })
|
||||||
const ulp = ref({ id: 0, name: ulpPlaceholder })
|
const ulp = ref({ id: '', name: ulpPlaceholder })
|
||||||
const emit = defineEmits(['update:filters'])
|
const emit = defineEmits(['update:filters'])
|
||||||
|
|
||||||
const data = ref({
|
const data = ref({
|
||||||
@ -32,21 +32,21 @@ watch(data.value, (value) => {
|
|||||||
const setUid = (value: any) => {
|
const setUid = (value: any) => {
|
||||||
uid.value = value
|
uid.value = value
|
||||||
selectedUid(value)
|
selectedUid(value)
|
||||||
up3.value = { id: 0, name: up3Placeholder }
|
uppp.value = { id: 0, name: up3Placeholder }
|
||||||
data.value.uid = value
|
data.value.uid = value
|
||||||
}
|
}
|
||||||
|
|
||||||
const setUp3 = (value: any) => {
|
const setUp3 = (value: any) => {
|
||||||
up3.value = value
|
uppp.value = value
|
||||||
selectedUp3Ulp(value)
|
selectedUp3Ulp(value)
|
||||||
ulp.value = { id: 0, name: ulpPlaceholder }
|
ulp.value = { id: '', name: ulpPlaceholder }
|
||||||
data.value.up3 = value
|
data.value.up3 = value
|
||||||
}
|
}
|
||||||
|
|
||||||
const setUlp = (value: any) => {
|
const setUlp = (value: any) => {
|
||||||
ulp.value = value
|
ulp.value = value
|
||||||
selectedUlp(value)
|
selectedUlp(value)
|
||||||
data.value.ulp = value
|
data.value.posko = value
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
fetchUid()
|
fetchUid()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user