Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <template>
- <v-app :class="$vuetify.theme.dark ? 'primary' : 'secondary'" dark>
- <cpHeader
- :key="cmKeyHeader"
- :prIsModeMobile="cmIsModeMobile"
- :prIsHomeLayout="cmSetIsHomeLayout"
- :prIsMainHome="cmSetIsMainHome"
- :prHeaderTitle="cmSetHeaderTitle"
- :prIsShowParamSetting="dtIsShowParamSetting"
- :prIsParamSetWithSegmen="dtIsParamSetWithSegmen"
- :prIsParamSetWithKodeProgram="dtIsParamSetWithKodeProgram"
- :prIsParamSetWithAgen="dtIsParamSetWithAgen"
- :prIsParamSetWithKantor="dtIsParamSetWithKantor"
- :prIsShowBtnHomePopup="dtIsShowBtnHomePopup"
- :prIsShowBtnSearchNpp="dtIsShowBtnSearchNpp"
- :prHeaderShowProgress="dtHeaderShowProgress"
- :prHeaderProgressVal="dtHeaderProgressVal"
- @onSetButtonBack="mtOnSetButtonBack"
- @onSetShowHomePopup="mtOnSetShowHomePopup"
- @onSetShowSearchNpp="mtOnSetShowSearchNpp"
- />
- <v-content>
- <div
- style="padding: 0px 0px 0px 0px;"
- class="no-gutters fill-height"
- fluid
- align="center"
- id="divHome"
- >
- <v-flex
- :class="cmIsModeMobile ? 'mt-n10' : ''"
- text-xs-center
- fill-height
- >
- <v-card class="mx-auto" flat color="transparent">
- <v-container>
- <cpSubHeader
- :key="cmKeySubheader"
- :prIsModeMobile="cmIsModeMobile"
- :prIsHomeLayout="cmSetIsHomeLayout"
- :prIsMainHome="cmSetIsMainHome"
- :prTextSatu="dtTextSatu"
- :prTextDua="dtTextDua"
- :prTextTiga="dtTextTiga"
- :prTextEmpat="dtTextEmpat"
- :prIsShowSwitchToGrid="dtIsShowSwitchToGrid"
- @OnChangeSwitchToGrid="mtOnChangeSwitchToGrid"
- />
- <router-view
- :key="cmKeyRoutView"
- :prIsModeMobile="cmIsModeMobile"
- :prValSwitchToGrid="dtValSwitchToGrid"
- :prIsDoCloseDetilDua="dtIsDoCloseDetilDua"
- :prIsShowSearchNpp="dtIsShowSearchNpp"
- @onSetIsHomeLayout="mtOnSetIsHomeLayout"
- @onSetSubHeader="mtOnSetSubHeader"
- @onSetSubFooter="mtOnSetSubFooter"
- @onSetSwitchBack="mtOnSetSwitchBack"
- @onClickToDetilDua="mtSetOnClickToDetilDua"
- @onCloseHomePopup="mtSetOnCloseHomePopup"
- @onCloseShowSearchNpp="mtOnCloseShowSearchNpp"
- @onSetShowHeaderProgress="mtSetShowHeaderProgress"
- @onSetCloseHeaderProgress="mtSetCloseHeaderProgress"
- />
- <cpSubFooter
- :key="cmKeySubFooter"
- :prIsModeMobile="cmIsModeMobile"
- :prIsHomeLayout="cmSetIsHomeLayout"
- :prIsMainHome="cmSetIsMainHome"
- :prTextSubFooter="dtTextSubFooter"
- />
- </v-container>
- </v-card>
- </v-flex>
- <cpCornerFab
- v-if="cmIsShowCorFab"
- :key="cmKeyCornerFab"
- :prIsModeMobile="cmIsModeMobile"
- />
- </div>
- </v-content>
- <cpFooter />
- </v-app>
- </template>
- <script>
- export default {
- name: "Dashboard",
- components: {
- cpHeader: () => import("@/views/dashboard/core/Header.vue"),
- cpSubHeader: () => import("@/views/dashboard/core/SubHeader.vue"),
- cpSubFooter: () => import("@/views/dashboard/core/SubFooter.vue"),
- cpCornerFab: () => import("@/views/dashboard/core/CornerFab.vue"),
- cpFooter: () => import("@/views/dashboard/core/Footer.vue"),
- },
- data: () => ({
- dtCounterHeader: 0,
- dtCounterSubHeader: 0,
- dtCounterSubFooter: 0,
- dtCounterCornerFab: 0,
- dtCounterRoutView: 0,
- dtIsHomeLayout: false,
- dtIsShowParamSetting: false,
- dtIsParamSetWithSegmen: false,
- dtIsParamSetWithKodeProgram: false,
- dtIsParamSetWithAgen: false,
- dtIsParamSetWithKantor: true,
- dtIsShowBtnHomePopup: false,
- dtTextSatu: "",
- dtTextDua: "",
- dtTextTiga: "",
- dtTextEmpat: "",
- dtIsShowSwitchToGrid: false,
- dtTextSubFooter: "",
- dtValSwitchToGrid: false,
- dtSwitchBackTo: "",
- dtIsDetilDua: false,
- dtIsDoCloseDetilDua: false,
- dtIsShowBtnSearchNpp: false,
- dtIsShowSearchNpp: false,
- dtHeaderProgressVal: 0,
- dtHeaderProgressInterval: 0,
- dtHeaderShowProgress: "off",
- }),
- computed: {
- storeParams() {
- return this.$store.getters.params;
- },
- paramsData() {
- return {
- kantor: this.$store.getters.role.KODE_KANTOR,
- nama_kantor: this.$store.getters.role.NAMA_KANTOR_SINGKAT,
- kode_role: this.$store.getters.role.KODE_FUNGSI,
- nama_role: this.$store.getters.role.NAMA_FUNGSI,
- npk: this.$store.getters.userInfo.NPK,
- user: this.$store.getters.userInfo.KODE,
- nama_user: this.$store.getters.userInfo.NAMA_USER,
- flag_akses_01: this.$getRoles().FLAG_AKSES_01,
- flag_akses_02: this.$getRoles().FLAG_AKSES_02,
- ...this.$store.getters.params,
- };
- },
- cmKeyHeader() {
- return "Header" + this.dtCounterHeader;
- },
- cmKeySubheader() {
- return "SubHeader" + this.dtCounterSubHeader;
- },
- cmKeySubFooter() {
- return "SubFooter" + this.dtCounterSubFooter;
- },
- cmKeyCornerFab() {
- return "CornerFab" + this.dtCounterCornerFab;
- },
- cmKeyRoutView() {
- return "RoutView" + this.dtCounterRoutView;
- },
- cmIsShowCorFab() {
- if (this.$route.name && this.$route.name === "main") {
- return true;
- }
- return false;
- },
- cmIsModeMobile() {
- switch (this.$vuetify.breakpoint.name) {
- case "xs":
- return true;
- case "sm":
- return false;
- case "md":
- return false;
- case "lg":
- return false;
- case "xl":
- return false;
- }
- return false;
- },
- cmSetHeaderTitle() {
- if (this.$route.name) {
- if (this.$route.name.substr(0, 4).toUpperCase() === "XD01") {
- if (this.$route.name.substr(0, 6).toUpperCase() === "XD0107") {
- return "W A S R I K";
- } else if (this.$route.name.substr(0, 6).toUpperCase() === "XD0108") {
- return "DATA POTENSI TK";
- } else if (this.$route.name.substr(0, 6).toUpperCase() === "XD0109") {
- return "KEAGENAN";
- } else if (this.$route.name.substr(0, 6).toUpperCase() === "XD0110") {
- return "SERTAKAN";
- } else if (this.$route.name.substr(0, 6).toUpperCase() === "XD0111") {
- return "Lapangan Usaha";
- } else {
- return "KEPESERTAAN";
- }
- } else if (this.$route.name.substr(0, 4).toUpperCase() === "XD02") {
- if (this.$route.name.toUpperCase() === "XD020114") {
- return "JHT JATUH TEMPO";
- } else if (this.$route.name.toUpperCase() === "XD020106") {
- return "KLAIM USIA JT";
- } else if (this.$route.name.substr(0, 6).toUpperCase() === "XD0201") {
- return "KLAIM JHT";
- } else if (this.$route.name.substr(0, 6).toUpperCase() === "XD0202") {
- return "KLAIM JKK";
- } else if (this.$route.name.substr(0, 6).toUpperCase() === "XD0203") {
- return "KLAIM JKM";
- } else if (this.$route.name.substr(0, 6).toUpperCase() === "XD0204") {
- return "KLAIM JP";
- } else if (this.$route.name.substr(0, 6).toUpperCase() === "XD0205") {
- return "KLAIM JKP";
- } else if (this.$route.name.substr(0, 6).toUpperCase() === "XD0206") {
- return "ESTIMASI & REALISASI";
- } else if (this.$route.name.substr(0, 6).toUpperCase() === "XD0207") {
- if (this.$route.name.substr(0, 8).toUpperCase() === "XD020277") {
- return "BEASISWA";
- } else if (
- this.$route.name.substr(0, 8).toUpperCase() === "XD020701"
- ) {
- return "CADANGAN TEKNIS";
- }
- return "BEASISWA";
- } else if (this.$route.name.substr(0, 6).toUpperCase() === "XD0208") {
- return "REALISASI MLT";
- } else if ( this.$route.name.substr(0, 6).toUpperCase() === "XD020508"
- ) {
- return "jo mama";
- } else {
- return "PELAYANAN";
- }
- } else if (this.$route.name.substr(0, 4).toUpperCase() === "XD03") {
- return "PROFIL PK/BU";
- } else if (this.$route.name.substr(0, 4).toUpperCase() === "XD04") {
- if (this.$route.name.substr(0, 6).toUpperCase() === "XD0401") {
- return "LAPAK ASIK";
- } else {
- return "E-SERVICE";
- } } else if (this.$route.name.substr(0, 4).toUpperCase() === "XD05") {
- return "OVERVIEW"; } else if (this.$route.name.substr(0, 4).toUpperCase() === "XD06") { if (this.$route.name.substr(0, 6).toUpperCase() === "XD0601") {
- return "KINERJA KEPESERTAAN"; } else if (this.$route.name.substr(0, 6).toUpperCase() === "XD0602") {
- return "KINERJA PELAYANAN"; } else if (this.$route.name.substr(0, 6).toUpperCase() === "XD0603") { if (this.$route.name.substr(0, 8).toUpperCase() === "XD060301") {
- return "ALL SEGMENT";
- } else if (
- this.$route.name.substr(0, 8).toUpperCase() === "XD060302"
- ) {
- return "PENERIMA UPAH";
- } else if (
- this.$route.name.substr(0, 8).toUpperCase() === "XD060302"
- ) {
- return "PENERIMA UPAH";
- } else if (
- this.$route.name.substr(0, 8).toUpperCase() === "XD060303"
- ) {
- return "PEKERJA MIGRAN INDONESIA";
- } else if (
- this.$route.name.substr(0, 8).toUpperCase() === "XD060304"
- ) {
- return "BUKAN PENERIMA UPAH";
- } else if ( this.$route.name.substr(0, 8).toUpperCase() === "XD060305"
- ) {
- return "JASA KONSTRUKSI";
- } else if (
- this.$route.name.substr(0, 8).toUpperCase() === "XD060306"
- ) {
- return "YEAR ON YEAR";
- } else if (
- this.$route.name.substr(0, 8).toUpperCase() === "XD060307"
- ) {
- return "TK Keluar PU by KBLI";
- } else if ( this.$route.name.substr(0, 8).toUpperCase() === "XD060308"
- ) {
- return "TK Keluar JAKON by Sumber Pembiayaan";
- } else if (
- this.$route.name.substr(0, 8).toUpperCase() === "XD060309"
- ) {
- return "TK Keluar BPU by Engine";
- } else if ( this.$route.name.substr(0, 8).toUpperCase() === "XD060309"
- ) { return "TK Keluar BPU by Sumber Pembiayaan";
- }
- return "KINERJA KEPESERTAAN";
- }
- return "KINERJA"; } else if (this.$route.name.substr(0, 4).toUpperCase() === "XD07") { if (this.$route.name.substr(0, 6).toUpperCase() === "XD0704") {
- return "ALL SEGMENT"; } else if (this.$route.name.substr(0, 6).toUpperCase() === "XD0701") {
- return "PENERIMA UPAH"; } else if (this.$route.name.substr(0, 6).toUpperCase() === "XD0702") {
- return "BUKAN PENERIMA UPAH"; } else if (this.$route.name.substr(0, 6).toUpperCase() === "XD0703") {
- return "PEKERJA MIGRAN INDONESIA";
- } else {
- return "DATA KUALITAS";
- }
- }
- }
- return "E X S I S T";
- },
- cmSetIsHomeLayout() {
- if (this.$route.name && this.$route.name === "main") {
- return true;
- } else {
- return this.dtIsHomeLayout;
- }
- },
- cmSetIsMainHome() {
- if (this.$route.name && this.$route.name === "main") {
- return true;
- } else {
- return false;
- }
- },
- cmRouteName() {
- return this.$route.name;
- },
- cmRouteHomePopup() {
- switch (this.$route.name.substr(0, 6)) {
- case "xd0201":
- return "xd020100";
- case "xd0202":
- return "xd020200";
- case "xd0203":
- return "xd020300";
- case "xd0204":
- return "xd020400";
- case "xd0205":
- return "xd020500";
- case "xd0207":
- return "xd020277";
- case "xd060302":
- return "xd0603020";
- case "xd060305":
- return "xd0603020";
- }
- switch (this.$route.name.substr(0, 8)) {
- case "xd060302":
- return "xd0603020";
- case "xd060305":
- return "xd0603050";
- case "xd060304":
- return "xd0603040";
- }
- return "";
- },
- cmRevRouteHomePopup() {
- switch (this.$route.name) {
- case "xd020100":
- return "xd0201";
- case "xd020200":
- return "xd0202";
- case "xd020300":
- return "xd0203";
- case "xd020400":
- return "xd0204";
- case "xd020500":
- return "xd0205";
- case "xd020277":
- return "xd020700";
- case "xd0603020":
- return "xd060302";
- case "xd0603050":
- return "xd060305";
- case "xd0603040":
- return "xd060304";
- }
- return "";
- },
- },
- watch: {
- cmIsMobile(newVal, oldVal) {
- if (newVal !== oldVal) {
- this.dtCounterRoutView++;
- }
- },
- cmRouteName(newVal, oldVal) {
- if (newVal !== oldVal) {
- this.dtCounterRoutView++;
- }
- },
- storeParams(newVal, oldVal) {
- if (this.$IsChangedParams(newVal, oldVal)) {
- this.dtCounterHeader++;
- }
- },
- },
- methods: {
- async mtOnSetIsHomeLayout(val) {
- this.dtIsHomeLayout = val;
- if (this.dtIsHomeLayout) {
- this.dtIsShowParamSetting = false;
- this.dtIsParamSetWithSegmen = false;
- this.dtIsParamSetWithKodeProgram = false;
- this.dtIsParamSetWithKantor = true;
- this.dtIsShowBtnHomePopup = false;
- this.dtIsShowBtnSearchNpp = false;
- } else {
- this.dtIsShowParamSetting = true;
- this.dtIsShowBtnSearchNpp = false;
- if (this.$route.name) {
- let vJnsMenu = this.$route.name.toUpperCase();
- let vJnsMenu04 = this.$route.name.substr(0, 4).toUpperCase();
- let vJnsMenu06 = this.$route.name.substr(0, 6).toUpperCase();
- let vJnsMenu08 = this.$route.name.substr(0, 8).toUpperCase();
- //set is paramsetting with segmen
- if (
- vJnsMenu04 === "XD01" &&
- vJnsMenu06 !== "XD0107" &&
- vJnsMenu04 !== "XD07"
- ) {
- this.dtIsParamSetWithSegmen = false;
- // this.dtIsParamSetWithKodeProgram = false;
- } else if ( ["XD0206", "XD0207", "XD0208", "XD020508"].findIndex(
- (x) => x === vJnsMenu06
- ) >= 0
- ) {
- if (vJnsMenu06 === "XD0206") {
- this.dtIsParamSetWithKantor = false;
- }
- this.dtIsParamSetWithSegmen = false;
- this.dtIsShowParamSetting = true;
- } else if (vJnsMenu04 === "XD02") {
- this.dtIsShowParamSetting = true;
- this.dtIsParamSetWithSegmen = true;
- this.dtIsParamSetWithKodeProgram = false;
- } else if (vJnsMenu04 === "XD03") {
- this.dtIsShowParamSetting = false;
- this.dtIsParamSetWithSegmen = false;
- // this.dtIsParamSetWithKodeProgram = false;
- this.dtIsShowBtnSearchNpp = true;
- } else if (vJnsMenu06 === "XD0603") {
- this.dtIsShowParamSetting = true;
- this.dtIsParamSetWithSegmen = false;
- // this.dtIsParamSetWithKodeProgram = false;
- // this.dtIsShowBtnSearchNpp = true;
- } else if (vJnsMenu04 === "XD07") {
- this.dtIsShowParamSetting = true;
- this.dtIsParamSetWithSegmen = false;
- // this.dtIsParamSetWithKodeProgram = false;
- // this.dtIsShowBtnSearchNpp = true;
- } else {
- // this.dtIsParamSetWithSegmen = true;
- this.dtIsParamSetWithKodeProgram = true;
- }
- if (
- vJnsMenu04 === "XD02" &&
- vJnsMenu06 !== "XD0206" &&
- vJnsMenu06 !== "XD0207" &&
- vJnsMenu06 !== "XD0208" &&
- vJnsMenu !== "XD020114" &&
- vJnsMenu !== "XD020106" &&
- vJnsMenu08 !== "XD060302" &&
- vJnsMenu08 !== "XD060305" &&
- vJnsMenu06 !== "XD020508"
- ) {
- this.dtIsShowBtnHomePopup = true;
- this.dtIsParamSetWithSegmen = true;
- // this.dtIsParamSetWithKodeProgram = true;
- } else if (vJnsMenu06 == "XD0207") {
- this.dtIsShowBtnHomePopup = true;
- this.dtIsParamSetWithSegmen = true;
- // this.dtIsParamSetWithKodeProgram = false;
- } else if (vJnsMenu08 == "XD060302") {
- this.dtIsShowBtnHomePopup = true;
- this.dtIsParamSetWithSegmen = false;
- this.dtIsParamSetWithKodeProgram = false;
- } else if (vJnsMenu08 == "XD060305") {
- this.dtIsShowBtnHomePopup = true;
- this.dtIsParamSetWithSegmen = false;
- this.dtIsParamSetWithKodeProgram = false;
- } else if (vJnsMenu08 == "XD060304") {
- this.dtIsShowBtnHomePopup = true;
- this.dtIsParamSetWithSegmen = false;
- this.dtIsParamSetWithKodeProgram = false;
- } else if (vJnsMenu06 == "XD0205") {
- this.dtIsShowBtnHomePopup = true;
- this.dtIsParamSetWithSegmen = false;
- // this.dtIsParamSetWithKodeProgram = false;
- } else {
- this.dtIsShowBtnHomePopup = false;
- }
- if (vJnsMenu06 == "XD0109") {
- this.dtIsParamSetWithAgen = true;
- this.dtIsParamSetWithSegmen = true;
- this.dtIsParamSetWithKodeProgram = true;
- } else this.dtIsParamSetWithAgen = false;
- if (vJnsMenu06 == "XD0207") {
- this.dtIsShowBtnHomePopup = true;
- } else this.dtIsParamSetWithAgen = false;
- // end param agen
- } else {
- this.dtIsParamSetWithSegmen = false;
- this.dtIsParamSetWithKodeProgram = false;
- this.dtIsShowBtnHomePopup = false;
- }
- }
- },
- async mtOnSetSubHeader(val) {
- this.dtTextSatu = val.dtTextSatu;
- this.dtTextDua = val.dtTextDua;
- this.dtTextTiga = val.dtTextTiga;
- this.dtTextEmpat = val.dtTextEmpat;
- this.dtIsShowSwitchToGrid = val.dtIsShowSwitchToGrid;
- },
- async mtOnSetSubFooter(val) {
- this.dtTextSubFooter = val;
- },
- async mtOnSetSwitchBack(val) {
- this.dtSwitchBackTo = val;
- },
- async mtOnSetButtonBack() {
- this.mtSetCloseHeaderProgress();
- if (this.dtIsDetilDua) {
- this.dtIsDoCloseDetilDua = true;
- this.dtIsDetilDua = false;
- this.dtIsShowSwitchToGrid = false;
- this.dtValSwitchToGrid = false;
- this.dtIsShowSearchNpp = false;
- this.dtCounterSubHeader++;
- if (this.$route.name.substr(0, 4).toUpperCase() === "XD01") {
- this.dtIsShowParamSetting = true;
- }
- } else {
- this.dtIsShowSwitchToGrid = false;
- this.dtValSwitchToGrid = false;
- this.dtIsShowSearchNpp = false;
- this.dtCounterSubHeader++;
- if (this.dtSwitchBackTo) {
- if (this.$route.name !== this.dtSwitchBackTo) {
- this.$router.push({
- name: this.dtSwitchBackTo,
- });
- }
- } else {
- if (this.$route.name !== "main") {
- this.$router.push({
- name: "main",
- });
- }
- }
- }
- },
- async mtOnSetShowHomePopup() {
- this.dtIsShowSwitchToGrid = false;
- this.dtValSwitchToGrid = false;
- this.dtCounterSubHeader++;
- if (this.cmRouteHomePopup) {
- if (this.$route.name !== this.cmRouteHomePopup) {
- this.$router.push({
- name: this.cmRouteHomePopup,
- });
- }
- }
- },
- async mtSetOnCloseHomePopup() {
- this.dtIsShowSwitchToGrid = false;
- this.dtValSwitchToGrid = false;
- if (this.cmRevRouteHomePopup) {
- if (this.$route.name !== this.cmRevRouteHomePopup) {
- this.$router.push({
- name: this.cmRevRouteHomePopup,
- });
- }
- }
- },
- async mtSetOnClickToDetilDua(valIsDetilDua) {
- this.dtIsDetilDua = valIsDetilDua;
- this.dtIsDoCloseDetilDua = false;
- if (this.$route.name.substr(0, 4).toUpperCase() === "XD01") {
- this.dtIsShowParamSetting = false;
- }
- },
- async mtOnChangeSwitchToGrid(val) {
- this.dtValSwitchToGrid = val;
- },
- async mtOnSetShowSearchNpp() {
- this.dtIsShowSearchNpp = true;
- },
- async mtOnCloseShowSearchNpp() {
- this.dtIsShowSearchNpp = false;
- },
- async mtSetShowHeaderProgress() {
- this.dtHeaderShowProgress = "on";
- this.dtHeaderProgressVal = 0;
- this.dtHeaderProgressInterval = setInterval(() => {
- if (this.dtHeaderProgressVal === 100) {
- return (this.dtHeaderProgressVal = 0);
- }
- this.dtHeaderProgressVal += 1;
- }, 500);
- },
- async mtSetCloseHeaderProgress() {
- this.dtHeaderShowProgress = "off";
- clearInterval(this.dtHeaderProgressInterval);
- },
- },
- mounted() {
- //this.setTheme();
- },
- beforeDestroy() {
- clearInterval(this.dtHeaderProgressInterval);
- },
- };
- </script>
- <style lang="scss">
- #divHome .v-btn--corner {
- bottom: 0;
- position: absolute;
- margin: 0 0 16px 16px;
- }
- body {
- width: 100%;
- height: 100%;
- opacity: 0.95;
- background-repeat: no-repeat;
- background-position: center;
- background-image: url("../../assets/icon/img_background.png");
- -webkit-background-size: cover;
- -moz-background-size: cover;
- -o-background-size: cover;
- background-size: cover;
- }
- </style>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement