123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226 |
- <template>
- <section class="app-main">
- <transition name="fade-transform" mode="out-in">
- <keep-alive :include="cachedViews">
- <router-view :key="key" />
- </keep-alive>
- </transition>
- <div class="tkbox" v-if="open">
- <div class="tkbox-title">
- <div class="tkbox-title-left">
- <img src="../../assets/images/八一.png" alt />
- <span>重要消息</span>
- </div>
- <div class="tkbox-title-right">
- <img src="../../assets/images/关闭.png" alt @click="showfun" />
- </div>
- </div>
- <div class="tkbox-main">
- <p>
- <img src="../../assets/images/警示.png" alt />
- <span>您有一条打印文件需要处理,请尽快处理</span>
- </p>
- </div>
- <div class="tkbox-footer">
- <el-button type="primary" @click="quchulifun">去处理</el-button>
- </div>
- </div>
- </section>
- </template>
- <script>
- import { printTrigger, printTriggerClear } from "@/api/PrintsManage/manage";
- export default {
- name: "AppMain",
- data() {
- return {
- open: false,
- timer: null
- };
- },
- created() {
- this.timer = null;
- this.startTime();
- },
- computed: {
- cachedViews() {
- return this.$store.state.tagsView.cachedViews;
- },
- key() {
- return this.$route.path;
- }
- },
- methods: {
- showfun() {
- printTriggerClear().then(res => {
- // console.log(res)
- });
- this.open = false;
- },
- quchulifun() {
- // this.$router
- // .push({ path: "/index", query: { name: "/print" } })
- // .catch(() => {});
- printTriggerClear().then(res => {
- // if(res.code==200){
- // }
- });
- window.open(`/print/manage`, "_self");
- },
- startTime() {
- this.timer = setInterval(() => {
- printTrigger().then(res => {
- console.log(res);
- });
- }, 1000000); /* 每500毫秒执行一次,实现动态显示时间效果 */
- }
- },
- destroyed() {
- clearInterval(this.timer); // 清除定时器
- this.timer = null;
- }
- };
- </script>
- <style lang="scss" scoped>
- .app-main {
- /* 50= navbar 50 */
- min-height: calc(100vh - 50px);
- width: 100%;
- position: relative;
- overflow: hidden;
- position: relative;
- }
- .tkbox {
- width: 500px;
- height: 220px;
- background-image: url("../../assets/images/框.png");
- background-size: 100% 100%;
- background-repeat: no-repeat;
- position: absolute;
- left: 30%;
- top: 30%;
- }
- .tkbox-title {
- width: 100%;
- height: 90px;
- display: flex;
- flex-direction: row;
- }
- .tkbox-title-left {
- flex: 1;
- display: flex;
- align-items: center;
- }
- .tkbox-title-left img {
- margin-right: 10px;
- width: 30px;
- height: 30px;
- margin-left: 35px;
- display: inline-block;
- }
- .tkbox-title-left span {
- color: #fff;
- }
- .tkbox-title-right {
- flex: 1;
- display: flex;
- justify-content: right;
- align-items: center;
- margin-right: 35px;
- }
- .tkbox-main {
- width: 100%;
- height: 60px;
- }
- .tkbox-main p {
- width: 90%;
- height: auto;
- margin: 0 auto;
- color: #fff;
- font-size: 14px;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- .tkbox-main p span {
- margin-left: 10px;
- }
- .tkbox-footer {
- width: 100%;
- height: 30px;
- margin-bottom: 30px;
- text-align: center;
- }
- .fixed-header + .app-main {
- padding-top: 50px;
- }
- .hasTagsView {
- .app-main {
- /* 84 = navbar + tags-view = 50 + 34 */
- min-height: calc(100vh - 84px);
- }
- .fixed-header + .app-main {
- padding-top: 84px;
- }
- }
- </style>
- <style lang="scss">
- // fix css style bug in open el-dialog
- .el-popup-parent--hidden {
- .fixed-header {
- padding-right: 17px;
- }
- }
- // 设置背景颜色
- .app-main {
- background: #022845;
- }
- // 头部背景颜色、字体颜色
- .navbar {
- background: #114a80 !important;
- color: #fff !important;
- // box-shadow:5px 5px 10px black;
- border-bottom: 1px solid #15324e;
- }
- .el-scrollbar__view {
- background-color: #114a80;
- }
- .app-breadcrumb.el-breadcrumb .no-redirect {
- color: #fff !important;
- }
- .el-breadcrumb__inner a {
- color: #fff !important;
- }
- .tags-view-container {
- background: #022845 !important;
- border: 0px !important;
- }
- .navbar .right-menu .avatar-container .avatar-wrapper .el-icon-caret-bottom {
- color: #fff !important;
- }
- .navbar .right-menu .right-menu-item {
- color: #fff !important;
- }
- // 设置主题内外边距
- .app-container {
- margin: 10px 10px 10px 10px;
- padding: 15px 15px 15px 15px;
- }
- </style>
|