diff --git a/src/assets/scss/main-shuju.scss b/src/assets/scss/main-shuju.scss index 092ff796..bb1f2171 100644 --- a/src/assets/scss/main-shuju.scss +++ b/src/assets/scss/main-shuju.scss @@ -1,5 +1,8 @@ @import "~@/element-ui/theme-variables.scss"; -@import "./variables.scss"; +@import "./shuju-variables.scss"; +@import "./c/config"; +@import "./c/function"; +@import "./modules/visual/c/common.scss"; // $navbar--height: 60px; body { @@ -19,6 +22,8 @@ body { background-image: url(../img/shuju/bg.jpg); background-size: cover; background-position: center 0; + height: 100%; + @include scrollBar; .el-card + .el-card { margin-top: 15px; @@ -171,6 +176,10 @@ body { // box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.05); background: linear-gradient(180deg, #00023f, #176dec); box-shadow: 0px 3px 16px 0px rgba(187, 187, 227, 0.35); + font-size: 18px; + .el-menu-item { + font-size: 18px; + } .navbar--colorful { .navbar__body { @@ -229,17 +238,17 @@ body { display: flex; justify-content: center; align-items: center; - padding: 5px; + padding: 10px 20px; margin: 0; width: 100%; height: 100%; - font-size: 24px; + font-size: 28px; + font-weight: bold; text-transform: uppercase; white-space: nowrap; // overflow: hidden; transition: width 0.3s; font-family: FZZCHJW; - font-weight: normal; color: #ffffff; background: linear-gradient(0deg, #03c7ff 24.609375%, #ffffff 81.0791015625%); -webkit-background-clip: text; @@ -288,6 +297,7 @@ body { .navbar__menu { background-color: transparent; border-bottom: 0 !important; + a:focus, a:hover { text-decoration: none; @@ -349,7 +359,7 @@ body { position: absolute; display: none; padding: 0 10px; - width: 120px; + width: 160px; left: -100px; right: -100px; margin: 0 auto; @@ -360,6 +370,9 @@ body { border-top: 1px dashed rgba(#fff, 0.4); color: rgba(#fff, 0.7); transition: all ease 0.5s; + padding: 10px 0; + line-height: $navbar--height * 0.5; + &.z-on { font-weight: bold; } @@ -409,7 +422,7 @@ body { } .navbar__icon-menu { vertical-align: middle; - font-size: 16px; + font-size: 20px; } .el-dropdown { color: #fff; diff --git a/src/assets/scss/shuju-variables.scss b/src/assets/scss/shuju-variables.scss new file mode 100644 index 00000000..70ce5241 --- /dev/null +++ b/src/assets/scss/shuju-variables.scss @@ -0,0 +1,24 @@ +// Base +$base--line-height: 1.15; + +// Navbar +$navbar--height: 75px; + +// Sidebar +$sidebar--width: 230px; +$sidebar--width-fold: 100px; +$sidebar--background-color-dark: #263238; +$sidebar--text-color-dark: #8a979e; +$sidebar--menu-item-height: 48px; + +// Content +$content--padding: 10px; +$content--background-color: #f1f4f5; +$content--card-header-height: 60px; +$content--tabs-header-height: 38px; +// Content, 填充整屏高度(非tabs状态) = 整屏高度 - 导航条高度 - aui-content上下内边距高度 +$content--fill-height: calc(100vh - #{$navbar--height} - #{$content--padding * 2}); +// Content, 填充整屏高度(是tabs状态) = 整屏高度 - 导航条高度 - tabs组件header高度 - tabs组件content上下内边距高度 +$content--fill-height-tabs: calc( + 100vh - #{$navbar--height} - #{$content--tabs-header-height} - #{$content--padding * 2} +); diff --git a/src/js/store/index.js b/src/js/store/index.js index 276c7f83..7ebb31e9 100644 --- a/src/js/store/index.js +++ b/src/js/store/index.js @@ -8,7 +8,7 @@ import { requestPost } from "@/js/dai/request"; import { dateFormats } from "@/utils/index"; Vue.use(Vuex); -let interTimer = null +let interTimer = null; export default new Vuex.Store({ namespaced: true, state: { @@ -42,6 +42,9 @@ export default new Vuex.Store({ tipsList: [], tipsTime: [], inIframe: window.self !== window.top, + fixed1920: { + height: document.documentElement.clientHeight, + }, }, modules: { user, @@ -56,69 +59,71 @@ export default new Vuex.Store({ }); }, SET_TIPS_LIST(state, tipsList) { - let _list = state.tipsList + let _list = state.tipsList; // state.tipsList = _list.concat(tipsList) - state.tipsList = tipsList + state.tipsList = tipsList; }, SET_TIPS_TIME(state, time) { - state.tipsTime = time - } + state.tipsTime = time; + }, }, actions: { clearInter() { - clearInterval(interTimer) + clearInterval(interTimer); }, setInterval({ commit, dispatch, state }) { interTimer = setInterval(() => { - const _t = dateFormats('YYYY-mm-dd HH:MM', (new Date(new Date().toLocaleDateString()).getTime())) - const _tt = new Date(_t).getTime() - console.log('230000---', _t) - const t = dateFormats('YYYY-mm-dd HH:MM', (new Date().getTime())) - const nt = new Date(t).getTime() + const _t = dateFormats( + "YYYY-mm-dd HH:MM", + new Date(new Date().toLocaleDateString()).getTime() + ); + const _tt = new Date(_t).getTime(); + console.log("230000---", _t); + const t = dateFormats("YYYY-mm-dd HH:MM", new Date().getTime()); + const nt = new Date(t).getTime(); // 判断当前时间是否为 00:00 if (nt == _tt) { - dispatch('setTipsTime') - return + dispatch("setTipsTime"); + return; } - let times = state.tipsTime - console.log('nt---000', nt) + let times = state.tipsTime; + console.log("nt---000", nt); state.tipsTime.forEach((item, index) => { - const _t = new Date(item).getTime() + const _t = new Date(item).getTime(); if (_t == nt) { - clearInterval(interTimer) - dispatch('setTipsList', item) - times.splice(index, 1) - commit('SET_TIPS_TIME', times) + clearInterval(interTimer); + dispatch("setTipsList", item); + times.splice(index, 1); + commit("SET_TIPS_TIME", times); } - }) - }, 60000) + }); + }, 60000); }, setTipsList({ commit }, time) { return new Promise(async (resolve, reject) => { - const url = '/gov/project/memoAttr/memosToRemind' + const url = "/gov/project/memoAttr/memosToRemind"; const params = { - remindTime: time || '' - } - const { data, code, msg } = await requestPost(url, params) + remindTime: time || "", + }; + const { data, code, msg } = await requestPost(url, params); if (code === 0) { - commit('SET_TIPS_LIST', data) - resolve() - } else reject(msg) - }) + commit("SET_TIPS_LIST", data); + resolve(); + } else reject(msg); + }); }, setTipsTime({ commit, dispatch }) { return new Promise(async (resolve, reject) => { - if (interTimer) clearInterval(interTimer) - const url = '/gov/project/memoAttr/memoTime' - - const { data, code, msg } = await requestPost(url) + if (interTimer) clearInterval(interTimer); + const url = "/gov/project/memoAttr/memoTime"; + + const { data, code, msg } = await requestPost(url); if (code === 0) { - - commit('SET_TIPS_TIME', data) - if (data.length > 0) dispatch('setInterval') - resolve() - } else reject(msg) - }) - } - } + commit("SET_TIPS_TIME", data); + if (data.length > 0) dispatch("setInterval"); + resolve(); + } else reject(msg); + }); + }, + }, }); diff --git a/src/views/components/fixed1920.vue b/src/views/components/fixed1920.vue new file mode 100644 index 00000000..e98ab311 --- /dev/null +++ b/src/views/components/fixed1920.vue @@ -0,0 +1,62 @@ + + + + diff --git a/src/views/main-shuju/main.vue b/src/views/main-shuju/main.vue index 4abb6808..6aa4e014 100644 --- a/src/views/main-shuju/main.vue +++ b/src/views/main-shuju/main.vue @@ -1,25 +1,28 @@