diff --git a/src/assets/scss/common.scss b/src/assets/scss/common.scss index 235b0b2b..e8d4cfc5 100644 --- a/src/assets/scss/common.scss +++ b/src/assets/scss/common.scss @@ -4,8 +4,8 @@ box-sizing: border-box; } body { - font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', - 'Microsoft YaHei', '微软雅黑', Arial, sans-serif; + font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, + sans-serif; font-size: $--font-size-base; line-height: $base--line-height; color: $--color-text-primary; @@ -35,7 +35,7 @@ img { } .clearfix:before, .clearfix:after { - content: ' '; + content: " "; display: table; } .clearfix:after { @@ -144,8 +144,8 @@ img { background-color: transparent; } &-add { - > span > *[class*='el-icon-'], - > span > *[class*='icon'] { + > span > *[class*="el-icon-"], + > span > *[class*="icon"] { vertical-align: middle; font-size: 18px; margin-right: 5px; @@ -201,6 +201,12 @@ img { .aui-wrapper { position: relative; padding-top: $navbar--height; + &.z-iframe { + padding-top: 0; + .aui-content--tabs { + padding-top: 0; + } + } } /* Sidebar fold @@ -383,7 +389,7 @@ img { &::after { position: absolute; - content: ''; + content: ""; right: 0; top: 0; bottom: 0; @@ -448,8 +454,8 @@ img { } } &__search { - > *[class*='el-icon-'], - > *[class*='icon'] { + > *[class*="el-icon-"], + > *[class*="icon"] { display: inline-block; vertical-align: middle; } @@ -572,9 +578,7 @@ img { min-height: calc(#{$content--fill-height} - 2px); } > .aui-card--fill > .el-card__header + .el-card__body { - min-height: calc( - #{$content--fill-height} - #{$content--card-header-height} - 2px - ); + min-height: calc(#{$content--fill-height} - #{$content--card-header-height} - 2px); } &--tabs { padding: $content--tabs-header-height 0 0; @@ -646,7 +650,7 @@ img { position: absolute; bottom: 0; left: 0; - content: ''; + content: ""; width: 100%; height: 2px; background-color: $--color-primary; @@ -679,15 +683,10 @@ img { min-height: calc(#{$content--fill-height-tabs} - 2px); } > .aui-card--fill > .el-card__header + .el-card__body { - min-height: calc( - #{$content--fill-height-tabs} - #{$content--card-header-height} - - 2px - ); + min-height: calc(#{$content--fill-height-tabs} - #{$content--card-header-height} - 2px); } &.is-iframe { - height: calc( - #{$content--fill-height-tabs} + #{$content--padding * 2} - ); + height: calc(#{$content--fill-height-tabs} + #{$content--padding * 2}); margin: -$content--padding; min-height: auto; > .aui-card--fill { @@ -706,10 +705,7 @@ img { background-color: #fff; } > .aui-card--fill > .el-card__header + .el-card__body { - height: calc( - #{$content--fill-height-tabs} - #{$content--card-header-height} - - 2px - ); + height: calc(#{$content--fill-height-tabs} - #{$content--card-header-height} - 2px); } } } @@ -739,7 +735,7 @@ img { /* Page ------------------------------ */ -*[class*='aui-page__'] { +*[class*="aui-page__"] { padding-top: 0; .aui-content { min-height: auto; @@ -751,9 +747,7 @@ img { min-height: calc(100vh - #{$content--padding * 2} - 2px); } > .aui-card--fill > .el-card__header + .el-card__body { - min-height: calc( - 100vh - #{$content--padding * 2} - #{$content--card-header-height} - 2px - ); + min-height: calc(100vh - #{$content--padding * 2} - #{$content--card-header-height} - 2px); } } } diff --git a/src/js/store/index.js b/src/js/store/index.js index 335b5689..d3aca2ad 100644 --- a/src/js/store/index.js +++ b/src/js/store/index.js @@ -37,6 +37,8 @@ export default new Vuex.Store({ menuList: [], activeName: "", }, + + inIframe: window.self !== window.top, }, modules: { user, diff --git a/src/main.js b/src/main.js index ca2d3996..4da8f1c8 100644 --- a/src/main.js +++ b/src/main.js @@ -1,69 +1,76 @@ -import Vue from 'vue' -import Element from 'element-ui' +import Vue from "vue"; +import Element from "element-ui"; -import App from '@/App' -import i18n from '@/i18n' -import router from '@/router' +import App from "@/App"; +import i18n from "@/i18n"; +import router from "@/router"; // import store1 from '@/store' -import '@/icons' -import '@/element-ui/theme/index.css' -import '@/assets/scss/aui.scss' -import http from '@/utils/request' -import renRadioGroup from '@/components/ren-radio-group' -import renSelect from '@/components/ren-select' -import renProcessMultiple from '@/components/ren-process-multiple' -import renProcessStart from '@/components/ren-process-start' -import renProcessRunning from '@/components/ren-process-running' -import renProcessDetail from '@/components/ren-process-detail' -import renDeptTree from '@/components/ren-dept-tree' -import renRegionTree from '@/components/ren-region-tree' -import cloneDeep from 'lodash/cloneDeep' +import "@/icons"; +import "@/element-ui/theme/index.css"; +import "@/assets/scss/aui.scss"; +import http from "@/utils/request"; +import renRadioGroup from "@/components/ren-radio-group"; +import renSelect from "@/components/ren-select"; +import renProcessMultiple from "@/components/ren-process-multiple"; +import renProcessStart from "@/components/ren-process-start"; +import renProcessRunning from "@/components/ren-process-running"; +import renProcessDetail from "@/components/ren-process-detail"; +import renDeptTree from "@/components/ren-dept-tree"; +import renRegionTree from "@/components/ren-region-tree"; +import cloneDeep from "lodash/cloneDeep"; // axios封装 -import ajax from '@/js/ajax' +import ajax from "@/js/ajax"; // service -import service from '@/js/service' +import service from "@/js/service"; // vuex处理多个组件共享状态 -import store from '@/js/store' +import store from "@/js/store"; //系统工具 -import util from '@js/util' +import util from "@js/util"; +import Cookies from "js-cookie"; +import getQueryPara from "dai-js/modules/getQueryPara"; + +// 兼容token传参登录 +if (getQueryPara("token")) { + Cookies.set("token", getQueryPara("token")); +} window.app = Object.assign( {}, { util, ajax, - service + service, } -) +); -Vue.config.productionTip = false +Vue.config.productionTip = false; -Vue.use(renRadioGroup) -Vue.use(renSelect) -Vue.use(renDeptTree) -Vue.use(renRegionTree) -Vue.use(renProcessMultiple) -Vue.use(renProcessStart) -Vue.use(renProcessRunning) -Vue.use(renProcessDetail) -Vue.use(Element) +Vue.use(renRadioGroup); +Vue.use(renSelect); +Vue.use(renDeptTree); +Vue.use(renRegionTree); +Vue.use(renProcessMultiple); +Vue.use(renProcessStart); +Vue.use(renProcessRunning); +Vue.use(renProcessDetail); +Vue.use(Element); Vue.use(Element, { - size: 'default', - i18n: (key, value) => i18n.t(key, value) -}) + size: "default", + i18n: (key, value) => i18n.t(key, value), +}); // 挂载全局 -Vue.prototype.$http = http +Vue.prototype.$http = http; // Vue.prototype.$getDictLabel = getDictLabel // 保存整站vuex本地储存初始状态 -window.SITE_CONFIG['storeState'] = cloneDeep(store.state) +window.SITE_CONFIG["storeState"] = cloneDeep(store.state); new Vue({ i18n, router, store, - render: (h) => h(App) -}).$mount('#app') + render: (h) => h(App), +}).$mount("#app"); diff --git a/src/views/main-content.vue b/src/views/main-content.vue index d774f2a2..067cef1f 100644 --- a/src/views/main-content.vue +++ b/src/views/main-content.vue @@ -1,7 +1,7 @@