yyAnslysis.vue 9.65 KB
// 阴影分析弹窗
<template>
    <div class="container">
        <div class="wrapper">
            <div class="box">
            </div>
        </div>
        <div class="mian">
            <div class="title-bt">
                <span>阴影分析</span>
                <span @click="closePop" class="close">×</span>
            </div>

            <div class="func-input">
                <span>分析日期</span>
                <el-date-picker v-model="anslysisTime" type="date" style="margin-left: 12px; width: 245px;"
                    placeholder="选择分析日期">
                </el-date-picker>
            </div>

            <div class="func-input">
                <span>开始时间</span>
                <el-time-picker style="margin:0 12px; width: 245px;" v-model="staTime" :picker-options="pickerOptions"
                    placeholder="选择开始时间">
                </el-time-picker>
            </div>
            <div class="func-input">
                <span>结束时间</span>
                <el-time-picker style="margin:0 12px; width: 245px;" v-model="endTime" :picker-options="pickerOptions"
                    placeholder="选择结束时间">
                </el-time-picker>
            </div>

            <!-- <div class="func-input">
                <div class="btn-wrapper2" :class="[isCF?'add-bg2': '']" @click="handleIsXmbj('isCF')">
                    <span class="center">春分</span>
                </div>
                <div class="btn-wrapper2" :class="[isXZ?'add-bg2': '']" @click="handleIsXmbj('isXZ')">
                    <span class="center">夏至</span>
                </div>
                <div class="btn-wrapper2" :class="[isQF?'add-bg2': '']" @click="handleIsXmbj('isQF')">
                    <span class="center">秋分</span>
                </div>
                <div class="btn-wrapper2" :class="[isLD?'add-bg2': '']" @click="handleIsXmbj('isLD')">
                    <span class="center">立冬</span>
                </div>
                <div class="btn-wrapper2" :class="[isDZ?'add-bg2': '']" @click="handleIsXmbj('isDZ')">
                    <span class="center">冬至</span>
                </div>
            </div> -->

            <div class="func-input">
                <span>时间间隔 </span>
                <el-input-number v-model="timeS" controls-position="right" :min="0" :max="1000"
                    style="margin:0 12px; width: 245px;"></el-input-number>
                <span>分钟</span>
            </div>

            <div class="" style="padding: 18px 24px 0px 24px;">
                <el-slider v-model="time" :min='0' :max='max' :step="timeS" :marks="marks"
                    :format-tooltip="formatTooltip" @change='EtimeChange'></el-slider>
            </div>

            <div class="func-btn">
                <div class="btn-wrapper add-bg" @click="startAnalysis">
                    <img style="width: 20px; height: 20px; margin: 0 5px 0 44px" src="../assets/icon_开始分析.png" alt="">
                    <span>开始分析</span>
                </div>
                <div class="btn-wrapper" @click="stopAnalysis" style="margin-left: 30px;">
                    <img style="width: 20px; height: 20px;margin: 0 5px 0 26px" src="../assets/icon_清除分析结果.png" alt="">
                    <span>清除分析结果</span>
                </div>
            </div>
        </div>
    </div>
</template>

<script>
    let maxW = 24 * 60 * 60 * 1000 - 1 * 60 * 1000
    export default {
        name: 'yyAnslysis',
        components: {},
        data() {
            return {
                // isCF: true, // 春分
                // isXZ: false, // 夏至
                // isQF: false, // 秋分
                // isLD: false, // 立冬
                // isDZ: false, // 冬至
                // keepTqArr: ['isCF', 'isXZ', 'isQF', 'isLD', 'isDZ'],

                anslysisTime: '',
                timeS: 30, // 时间间隔
                time: 0 * 60 * 60 * 1000, // 滑块时间
                max: (24 * 60 * 60 * 1000 - 1 * 60 * 1000),
                marks: {
                    0: '0:00',
                    [maxW]: '23:59',
                    // 50: {
                    //     style: {
                    //         color: '#1989FA'
                    //     },
                    //     label: this.$createElement('strong', '50%')
                    // }
                },
                pickerOptions: { // 时间选择器 时间范围限制
                    selectableRange: '00:00:00 - 23:59:59'
                },
                staTime: '', // 开始时间
                endTime: '', // 结束时间
            }
        },
        watch: {

        },
        mounted() {
            this.shadow instanceof shadow || (this.shadow = new shadow());
        },
        methods: {
            closePop() {
                this.$emit('closePop', 'yyAnslysis')
            },
            startAnalysis() {
                console.log(this.shadow);
            },
            stopAnalysis() {

            },
            /**
             * val 值分别对应
             * isCF,  // 春分
               isXZ, // 夏至
               isQF, // 秋分
               isLD, // 立冬
               isDZ, // 冬至
             */
            handleIsXmbj(val) {
                let self = this;
                this.keepTqArr.forEach(ele => {
                    if (val == ele) {
                        self[ele] = true;
                    } else {
                        self[ele] = false;
                    };
                })
            },
            EtimeChange() {

            },
            formatTooltip(val) {
                let nowTime = this.commons.dateZhuan('yyyy-MM-dd 00:00:00', new Date());
                let nowSjc = new Date(nowTime).getTime();
                nowSjc += val;
                let sfd = this.commons.dateZhuan('hh:mm', new Date(nowSjc));
                return sfd;
            }
        }
    }
</script>

<style scoped>
    .container {
        position: relative;
        color: #fff;
        font-size: 16px;
        width: 450px;
    }

    .wrapper {
        position: absolute;
        width: 100%;
        height: 100%;
        z-index: 1;
        border: 1px solid rgba(151, 151, 151, 0.58);
    }

    .box {
        background: rgba(4, 10, 10, 0.58);
        box-shadow: 0px 4px 9px 0px rgba(0, 0, 0, 0.5);
        height: 100px;
        position: absolute;
        width: 100%;
        height: 100%;
        z-index: 1;
    }

    .mian {
        position: relative;
        width: 100%;
        height: 100%;
        z-index: 1000;
    }

    .list-box span:nth-of-type(1) {
        display: inline-block;
        width: 98px;
        margin-right: 20px;
        color: rgba(255, 255, 255, .7);
    }

    .list-box span:nth-of-type(2) {
        margin-top: 14px;
        display: inline-block;
    }


    .title-bt {
        display: flex;
        justify-content: space-between;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
        padding: 18px 24px;
        font-size: 20px;
    }


    .func-input {
        display: flex;
        align-items: center;
        padding: 18px 24px 0px 24px;
        font-size: 18px;
        cursor: pointer;
    }

    .func {
        padding: 18px 24px;
    }



    .func-btn {
        display: flex;
        padding: 40px 24px 37px 24px;
        align-items: center;
        font-size: 18px;
        cursor: pointer;
    }

    .btn-wrapper {
        display: flex;
        align-items: center;
        width: 190px;
        height: 36px;
        background-image: url('../assets/弹窗按钮背景-默认.png');
        background-size: 100% 100%;
        background-repeat: no-repeat;
        line-height: 36px;
    }

    .add-bg {
        background-image: url('../assets/弹窗按钮背景-选中.png');
    }


    .btn-wrapper2 {
        display: flex;
        align-items: center;
        width: 70px;
        height: 38px;
        background-image: url('../assets/一张图/bg_专题分析.png');
        background-size: 100% 100%;
        background-repeat: no-repeat;
        text-align: center;
        line-height: 38px;
        margin-right: 13px;
    }

    .add-bg2 {
        background-image: url('../assets/一张图/bg_资源目录.png');
    }

    .close {
        cursor: pointer;
    }

    .center {
        display: inline-block;
        width: 100%;
        height: 100%;
        text-align: center;
    }

    .text-right {
        display: inline-block;
        width: 90px;
        text-align: right;
        font-size: 18px;
    }

    >>>input::-webkit-input-placeholder {
        font-size: 16px;
        color: rgba(255, 255, 255, 0.78) !important;
    }

    >>>.el-input__inner {
        background: rgba(4, 10, 10, 0.58) !important;
        /* border: 1px solid rgba(23, 34, 38, 0.57); */
        color: #fff;
    }

    >>>.el-input-number .el-input__inner {
        text-align: left;
    }

    >>>.el-input__suffix {
        color: #fff;
        font-size: 17px;
    }

    >>>.el-input-number__increase,
    >>>.el-input-number__decrease {
        background: rgba(4, 10, 10, 0.58);
    }

    >>>.el-input-number.is-controls-right .el-input-number__decrease,
    >>>.el-input-number__increase {
        border-left: 1px solid rgba(4, 10, 10, 0.58);
    }

    >>>.el-icon-arrow-up:before,
    >>>.el-icon-arrow-down:before {
        color: #fff;
        cursor: pointer;
    }

    >>>.el-input-number.is-controls-right .el-input-number__increase {
        border-bottom: 1px solid rgba(4, 10, 10, 0.58);
    }

    >>>.el-slider__button {
        background-color: #2FA5FF;
        border: 2px solid #FFFFFF;
        box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.20);
    }

    >>>.el-slider__marks-text {
        color: #fff;
    }
</style>