51 lines
1.6 KiB
TypeScript
Executable File
51 lines
1.6 KiB
TypeScript
Executable File
import { CMyCircuits } from '@/components/CMyCircuits'
|
|
import { CFinder } from '@/components/CFinder'
|
|
import { CGridTableRec } from '@/components/CGridTableRec'
|
|
import { tools } from '@store/Modules/tools'
|
|
import { toolsext } from '@store/Modules/toolsext'
|
|
import { computed, defineComponent, onMounted, ref, watch } from 'vue'
|
|
import { useUserStore } from '@store/UserStore'
|
|
import { useRoute, useRouter } from 'vue-router'
|
|
import { useGlobalStore } from '@store/globalStore'
|
|
import { useI18n } from '@/boot/i18n'
|
|
import { colmyUserCircuit } from '@store/Modules/fieldsTable'
|
|
import { costanti } from '@costanti'
|
|
import { shared_consts } from '@/common/shared_vuejs'
|
|
|
|
export default defineComponent({
|
|
name: 'mycircuits',
|
|
components: { CMyCircuits, CGridTableRec, CFinder },
|
|
props: {},
|
|
setup() {
|
|
const userStore = useUserStore()
|
|
const globalStore = useGlobalStore()
|
|
const { t } = useI18n()
|
|
|
|
const filter = ref(costanti.FIND_CIRCUIT)
|
|
|
|
const isfinishLoading = computed(() => globalStore.finishLoading)
|
|
|
|
function mounted() {
|
|
|
|
const filt_loaded = tools.getCookie(tools.COOK_SEARCH + tools.CIRCUIT_SEARCH, costanti.FIND_CIRCUIT, true)
|
|
console.log('filt_loaded', filt_loaded)
|
|
filter.value = filt_loaded ? filt_loaded : costanti.FIND_CIRCUIT
|
|
}
|
|
|
|
watch(() => filter.value, (newval: any, oldval) => {
|
|
tools.setCookie(tools.COOK_SEARCH + tools.CIRCUIT_SEARCH, newval)
|
|
|
|
})
|
|
onMounted(mounted)
|
|
|
|
return {
|
|
filter,
|
|
costanti,
|
|
shared_consts,
|
|
colmyUserCircuit,
|
|
toolsext,
|
|
isfinishLoading,
|
|
}
|
|
}
|
|
})
|