1 line
11 KiB
Plaintext
1 line
11 KiB
Plaintext
{"version":3,"sources":["webpack:///./src/views/layout/components/signOut.vue?a70c","webpack:///./src/views/layout/components/signOut.vue?becc","webpack:///src/views/layout/components/signOut.vue","webpack:///./src/views/layout/components/signOut.vue?1330","webpack:///./src/views/layout/components/signOut.vue"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","on","goScreen","_v","_s","$t","isAdmin","isHome","_e","goAdmin","class","isLang","lang","$event","changeLang","attrs","getUserType","userType","userName","goPerson","logout","staticRenderFns","name","props","type","required","data","isShow","timeout","openedWindow","filters","round","val","validateVal","mounted","logoForm","unitName","document","computed","$store","state","user","get","methods","window","$router","push","$i18n","locale","localStorage","$message","message","dispatch","then","location","component"],"mappings":"gHAAA,W,gECAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,YAAY,iBAAiB,CAACF,EAAG,MAAM,CAACE,YAAY,OAAOC,GAAG,CAAC,MAAQP,EAAIQ,WAAW,CAACJ,EAAG,IAAI,CAACE,YAAY,yBAAyBF,EAAG,OAAO,CAACJ,EAAIS,GAAGT,EAAIU,GAAGV,EAAIW,GAAG,qBAAuBX,EAAIY,SAAYZ,EAAIa,OAAoKb,EAAIc,KAAhKV,EAAG,MAAM,CAACE,YAAY,OAAOC,GAAG,CAAC,MAAQP,EAAIe,UAAU,CAACX,EAAG,IAAI,CAACE,YAAY,4BAA4BF,EAAG,OAAO,CAACJ,EAAIS,GAAGT,EAAIU,GAAGV,EAAIW,GAAG,oBAA6BP,EAAG,MAAM,CAACE,YAAY,WAAW,CAACF,EAAG,IAAI,CAACE,YAAY,wBAAwBF,EAAG,OAAO,CAACY,MAAM,CAAEC,OAAoB,MAAZjB,EAAIkB,MAAeX,GAAG,CAAC,MAAQ,SAASY,GAAQ,OAAOnB,EAAIoB,WAAW,SAAS,CAACpB,EAAIS,G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C,SAChBC,SAASA,MACf,wBACA,yBACA,uBAEMA,SAASA,MAAQA,IAGrBC,SAAUA,CACRpB,SADJ,WAEM,OAAOvB,KAAK4C,OAAOC,MAAMC,KAAKvB,UAEhCD,SAJJ,WAKM,OAAOtB,KAAK4C,OAAOC,MAAMC,KAAKxB,UAEhCkB,SAAUA,CACRO,IADN,WAEQ,OAAO/C,KAAK4C,OAAOC,MAAMC,KAAKN,YAIpCQ,QAASA,CACP3B,YADJ,SACAgB,GACM,OAAW,GAAPA,EACKrC,KAAKU,GAAG,mBAERV,KAAKU,GAAG,eAGnBH,SARJ,WASM,IAAN,wBAAAoB,gBACMsB,OAAOA,KAAKA,EAAOA,KAAMA,WAE3BnC,QAZJ,WAaM,IAAN,wBAAAa,iBACMsB,OAAOA,KAAKA,EAAOA,KAAMA,YAE3BzB,SAhBJ,WAiBUxB,KAAKW,SAGTX,KAAKkD,QAAQC,KAAK,CAAxBxB,mBAEIR,WAtBJ,SAsBAkB,GACUrC,KAAKiB,MAAQoB,IAGfrC,KAAKoD,MAAMC,OAAShB,EACpBrC,KAAKiB,KAAOoB,EACZiB,aAAaA,QAAQA,OAAQA,GAE/BtD,KAAKuD,SAAS,CACZC,QAASA,KAAKA,GAAGA,iBAAiBA,WAClC3B,KAAMA,cAGVJ,OAnCJ,WAoCMwB,OAAOA,aAAaA,WAAWA,YAC/BjD,KAAK4C,OAAOa,SAAS,UAAUC,MAAK,WAClCC,SAASA,gBC/H8V,I,wBCQ3WC,EAAY,eACd,EACA9D,EACA4B,GACA,EACA,KACA,WACA,MAIa,aAAAkC,E","file":"js/chunk-0a210700.dfa25b77.js","sourcesContent":["export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./signOut.vue?vue&type=style&index=0&id=58efc830&rel=stylesheet%2Fscss&lang=scss&scoped=true&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"header-goback\"},[_c('div',{staticClass:\"desk\",on:{\"click\":_vm.goScreen}},[_c('i',{staticClass:\"iconfont icon-shouye\"}),_c('span',[_vm._v(_vm._s(_vm.$t(\"home.screen\")))])]),(!_vm.isAdmin && !_vm.isHome)?_c('div',{staticClass:\"desk\",on:{\"click\":_vm.goAdmin}},[_c('i',{staticClass:\"iconfont icon-guanlitai\"}),_c('span',[_vm._v(_vm._s(_vm.$t(\"login.desk\")))])]):_vm._e(),_c('div',{staticClass:\"lanange\"},[_c('i',{staticClass:\"iconfont icon-yuyan\"}),_c('span',{class:{ isLang: _vm.lang == 'zh' },on:{\"click\":function($event){return _vm.changeLang('zh')}}},[_vm._v(\"中\")]),_c('el-divider',{attrs:{\"direction\":\"vertical\"}}),_c('span',{class:{ isLang: _vm.lang == 'en' },on:{\"click\":function($event){return _vm.changeLang('en')}}},[_vm._v(\"EN\")])],1),_c('div',{staticClass:\"name\"},[_c('i',{staticClass:\"iconfont icon-yonghu\"}),_c('span',[_vm._v(_vm._s(_vm.$t(\"login.welcome\")))]),_c('span',[_vm._v(_vm._s(_vm.getUserType(_vm.userType)))]),_c('span',[_vm._v(\"[\"+_vm._s(_vm.userName)+\"]\")]),(!_vm.isAdmin)?_c('el-tooltip',{attrs:{\"content\":_vm.$t('home.personal')}},[_c('i',{staticClass:\"iconfont icon-bianji\",on:{\"click\":function($event){return _vm.goPerson(_vm.isAdmin)}}})]):_vm._e(),_c('el-tooltip',{attrs:{\"content\":_vm.$t('login.signOut')}},[_c('i',{staticClass:\"iconfont icon-tuichu\",on:{\"click\":_vm.logout}})])],1)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\r\n <div class=\"header-goback\">\r\n <div class=\"desk\" @click=\"goScreen\">\r\n <i class=\"iconfont icon-shouye\" /><span>{{ $t(\"home.screen\") }}</span>\r\n </div>\r\n <div class=\"desk\" v-if=\"!isAdmin && !isHome\" @click=\"goAdmin\">\r\n <i class=\"iconfont icon-guanlitai\" /><span>{{ $t(\"login.desk\") }}</span>\r\n </div>\r\n <div class=\"lanange\">\r\n <i class=\"iconfont icon-yuyan\" />\r\n <span :class=\"{ isLang: lang == 'zh' }\" @click=\"changeLang('zh')\"\r\n >中</span\r\n >\r\n <el-divider direction=\"vertical\"></el-divider>\r\n <span :class=\"{ isLang: lang == 'en' }\" @click=\"changeLang('en')\"\r\n >EN</span\r\n >\r\n </div>\r\n <div class=\"name\">\r\n <i class=\"iconfont icon-yonghu\" />\r\n <span>{{ $t(\"login.welcome\") }}</span>\r\n <span>{{ getUserType(userType) }}</span>\r\n <span>[{{ userName }}]</span>\r\n <el-tooltip :content=\"$t('home.personal')\" v-if=\"!isAdmin\">\r\n <i class=\"iconfont icon-bianji\" @click=\"goPerson(isAdmin)\" />\r\n </el-tooltip>\r\n <el-tooltip :content=\"$t('login.signOut')\">\r\n <i class=\"iconfont icon-tuichu\" @click=\"logout\" />\r\n </el-tooltip>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nexport default {\r\n name: \"SignOut\",\r\n props: {\r\n isAdmin: {\r\n type: Boolean,\r\n required: true\r\n },\r\n isHome: {\r\n type: Boolean,\r\n required: true\r\n }\r\n },\r\n data() {\r\n return {\r\n isShow: false,\r\n timeout: 50000,\r\n lang: this.$i18n.locale,\r\n openedWindow: null\r\n }\r\n },\r\n filters: {\r\n round(val) {\r\n if (val) {\r\n // 保留一位小数\r\n val = val - 0\r\n const validateVal = parseFloat(val.toFixed(1))\r\n return validateVal\r\n } else {\r\n return 0\r\n }\r\n }\r\n },\r\n mounted() {\r\n if (this.logoForm.unitName) {\r\n document.title =\r\n this.$i18n.locale == \"en\"\r\n ? this.logoForm.enUnitName\r\n : this.logoForm.unitName\r\n } else {\r\n document.title = \"\"\r\n }\r\n },\r\n computed: {\r\n userName() {\r\n return this.$store.state.user.userName\r\n },\r\n userType() {\r\n return this.$store.state.user.userType\r\n },\r\n logoForm: {\r\n get() {\r\n return this.$store.state.user.logoForm\r\n }\r\n }\r\n },\r\n methods: {\r\n getUserType(val) {\r\n if (val == 1) {\r\n return this.$t(\"user.superAdmin\")\r\n } else {\r\n return this.$t(\"user.admin\")\r\n }\r\n },\r\n goScreen() {\r\n const routes = this.$router.resolve({ name: \"screen\" })\r\n window.open(routes.href, \"screen\")\r\n },\r\n goAdmin() {\r\n const routes = this.$router.resolve({ name: \"manager\" })\r\n window.open(routes.href, \"manager\")\r\n },\r\n goPerson() {\r\n if (this.isAdmin) {\r\n return\r\n }\r\n this.$router.push({ name: \"personal\" })\r\n },\r\n changeLang(val) {\r\n if (this.lang == val) {\r\n return\r\n } else {\r\n this.$i18n.locale = val\r\n this.lang = val\r\n localStorage.setItem(\"lang\", val)\r\n }\r\n this.$message({\r\n message: this.$t(\"changelangtip\").toString(), //方法中使用this.$t(\"xxxx.xx\")取到语言包中对应文字\r\n type: \"success\"\r\n })\r\n },\r\n logout() {\r\n window.localStorage.removeItem(\"sitename\")\r\n this.$store.dispatch(\"LogOut\").then(() => {\r\n location.reload() // In order to re-instantiate the vue-router object to avoid bugs\r\n })\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style rel=\"stylesheet/scss\" lang=\"scss\" scoped>\r\n.header-goback {\r\n display: flex;\r\n float: right;\r\n position: relative;\r\n font-family: Source Han Sans CN;\r\n font-weight: 400;\r\n color: #01ffe9;\r\n font-size: 13px;\r\n justify-content: flex-end;\r\n margin-left: -30px;\r\n}\r\n.desk,\r\n.lanange,\r\n.name {\r\n height: 36px;\r\n line-height: 36px;\r\n margin: 10px 0;\r\n font-size: 14px;\r\n font-family: Microsoft YaHei;\r\n font-weight: 400;\r\n color: #01ffe9;\r\n cursor: pointer;\r\n margin-right: 20px;\r\n .iconfont {\r\n margin: 0 8px;\r\n &:hover {\r\n color: #98fff7;\r\n }\r\n }\r\n}\r\n.isLang {\r\n color: #98fff7;\r\n}\r\n.desk:hover,\r\n.lanange span:hover {\r\n color: #98fff7;\r\n}\r\n</style>\r\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./signOut.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./signOut.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./signOut.vue?vue&type=template&id=58efc830&scoped=true&\"\nimport script from \"./signOut.vue?vue&type=script&lang=js&\"\nexport * from \"./signOut.vue?vue&type=script&lang=js&\"\nimport style0 from \"./signOut.vue?vue&type=style&index=0&id=58efc830&rel=stylesheet%2Fscss&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"58efc830\",\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""} |