|
@@ -0,0 +1,233 @@
|
|
|
+
|
|
|
+<template>
|
|
|
+ <div class="aside-bottom-cont">
|
|
|
+ <div
|
|
|
+ class="action-img"
|
|
|
+ @click="clickHandler"
|
|
|
+ :class="timer ? 'play-class' : 'suspend-class'"
|
|
|
+ ></div>
|
|
|
+ <el-steps :active="activeVal" align-center class="stepClass">
|
|
|
+ <!-- <el-step /> -->
|
|
|
+ <el-step
|
|
|
+ :title="item"
|
|
|
+ v-for="(item, i) in dataArray"
|
|
|
+ :key="i + 'o'"
|
|
|
+ icon=""
|
|
|
+ :class="(i + 1) % 2 === 0 ? 'topText' : ''"
|
|
|
+ @click="stepPropsClick(i + 1)"
|
|
|
+ />
|
|
|
+ <!-- <el-step /> -->
|
|
|
+ </el-steps>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script >
|
|
|
+// import { ref } from "vue";
|
|
|
+// import { useTimerInterval } from '@/hooks/timerInterval'
|
|
|
+// const { config } = window;
|
|
|
+
|
|
|
+// const global = inject<any>("global");
|
|
|
+export function useTimerInterval(callback, t = 10000) {
|
|
|
+ const timer = setInterval(callback, t);
|
|
|
+ b(() => clearInterval(timer));
|
|
|
+ return timer;
|
|
|
+}
|
|
|
+export default {
|
|
|
+ props: {
|
|
|
+ interObj: {
|
|
|
+ type: Object,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ components: {},
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ dataArray: ["2020", "2021", "2022", "2023", "2024"],
|
|
|
+ activeVal: "2024",
|
|
|
+ timer: "",
|
|
|
+ };
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ // this.init();
|
|
|
+ this.$emit("activeValChange", this.getdate());
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ stepPropsClick(active) {
|
|
|
+ if (this.activeVal == active) return;
|
|
|
+ this.activeVal = active;
|
|
|
+ if (this.timer) {
|
|
|
+ clearInterval(this.timer);
|
|
|
+ this.timer = null;
|
|
|
+ global.setMonthTimer(false);
|
|
|
+ }
|
|
|
+ this.$emit("activeValChange", this.getdate());
|
|
|
+ },
|
|
|
+ // // methods 方法
|
|
|
+ clickHandler() {
|
|
|
+ if (this.timer) {
|
|
|
+ clearInterval(this.timer);
|
|
|
+ this.timer = null;
|
|
|
+ global.setMonthTimer(false);
|
|
|
+ } else {
|
|
|
+ global.setMonthTimer(true);
|
|
|
+ this.addActiveValFun();
|
|
|
+ this.timer = useTimerInterval(
|
|
|
+ this.addActiveValFun,
|
|
|
+ config.data.timerInterval
|
|
|
+ );
|
|
|
+ }
|
|
|
+ },
|
|
|
+ addActiveValFun() {
|
|
|
+ this.activeVal++;
|
|
|
+ if (this.activeVal > 12) this.activeVal = 1;
|
|
|
+ this.$emit("activeValChange", this.getdate());
|
|
|
+ },
|
|
|
+ getdate() {
|
|
|
+ return (
|
|
|
+ new Date().getFullYear() +
|
|
|
+ (this.activeVal > 9 ? "-" : "-0") +
|
|
|
+ this.activeVal
|
|
|
+ );
|
|
|
+ },
|
|
|
+ },
|
|
|
+
|
|
|
+ watch: {},
|
|
|
+};
|
|
|
+</script>
|
|
|
+<style lang="scss" scoped>
|
|
|
+.aside-bottom-cont {
|
|
|
+ width: 50%;
|
|
|
+ height: 120px;
|
|
|
+ position: absolute;
|
|
|
+ bottom: 22px;
|
|
|
+ left: 25%;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+
|
|
|
+ .action-img {
|
|
|
+ cursor: pointer;
|
|
|
+ width: 40px;
|
|
|
+ height: 40px;
|
|
|
+ z-index: 100;
|
|
|
+ // margin: 0px 46px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .suspend-class {
|
|
|
+ background: url("/static/images/land/suspend.png") no-repeat;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ }
|
|
|
+
|
|
|
+ .play-class {
|
|
|
+ background: url("/static/images/land/play.png") no-repeat;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ }
|
|
|
+
|
|
|
+ .stepClass {
|
|
|
+ margin-top: 20px;
|
|
|
+ margin-left: -5%;
|
|
|
+ flex: 1;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+::v-deep(.el-steps) {
|
|
|
+ .el-step {
|
|
|
+ position: relative;
|
|
|
+ top: -5px;
|
|
|
+ left: 0px;
|
|
|
+
|
|
|
+ .el-step__head {
|
|
|
+ .el-step__line {
|
|
|
+ top: 4px;
|
|
|
+ height: 2px;
|
|
|
+ background-color: #63718b;
|
|
|
+
|
|
|
+ .el-step__line-inner {
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-step__icon {
|
|
|
+ background-color: #495a98;
|
|
|
+ width: 9px;
|
|
|
+ height: 9px;
|
|
|
+ border: none;
|
|
|
+ position: absolute;
|
|
|
+ top: 0px;
|
|
|
+
|
|
|
+ &::after {
|
|
|
+ content: "";
|
|
|
+ display: block;
|
|
|
+ width: 15px;
|
|
|
+ height: 15px;
|
|
|
+ position: absolute;
|
|
|
+ top: 50%;
|
|
|
+ left: 48%;
|
|
|
+ border-radius: 50%;
|
|
|
+ border: 1px solid rgba(73, 90, 152, 0.32);
|
|
|
+ background-image: radial-gradient(
|
|
|
+ circle,
|
|
|
+ rgba(73, 90, 152, 0) 30%,
|
|
|
+ rgba(73, 90, 152, 0.52)
|
|
|
+ );
|
|
|
+ transform: translate(-50%, -50%);
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-step__icon-inner {
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .is-process {
|
|
|
+ .el-step__icon {
|
|
|
+ background-color: rgba(255, 168, 50, 1);
|
|
|
+
|
|
|
+ &::after {
|
|
|
+ border: rgba(255, 168, 50, 0.32);
|
|
|
+ background-image: radial-gradient(
|
|
|
+ circle,
|
|
|
+ rgba(255, 168, 50, 0) 20%,
|
|
|
+ rgba(255, 168, 50, 0.52)
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-step__main {
|
|
|
+ .el-step__title {
|
|
|
+ position: relative;
|
|
|
+ top: 14px;
|
|
|
+ left: 5px;
|
|
|
+ font: 400 12px/17px SourceHanSansSC;
|
|
|
+ color: #c9d3ea;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ &:first-child,
|
|
|
+ &:last-child {
|
|
|
+ .el-step__head {
|
|
|
+ .el-step__icon {
|
|
|
+ &::after {
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .is-process {
|
|
|
+ .el-step__icon {
|
|
|
+ &::after {
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .topText {
|
|
|
+ .el-step__main {
|
|
|
+ .el-step__title {
|
|
|
+ top: -26px;
|
|
|
+ left: 5px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|