当前位置: 首页 > news >正文

Element 选择季度组件

在这里插入图片描述

<template><el-dialogtitle="选择季度":show-close="false":close-on-click-modal="false":close-on-press-escape="false":visible="visiable"class="dialog list"append-to-body><div><div><el-inputv-model="showSeason"placeholder="请选择季度"style="width:209px;"@focus="showSeason=true"><i slot="prefix" class="el-input__icon el-icon-date" /></el-input>{{ text }}<el-cardv-show="showSeason"class="box-card"style="width:322px;padding: 0 3px 20px;margin-top:10px;position:fixed;z-index:9999;background-color: white !important;"><div slot="header" class="clearfix" style="text-align:center;padding:0"><buttontype="button"aria-label="前一年"class="el-picker-panel__icon-btn el-date-picker__prev-btn el-icon-d-arrow-left"@click="prev"/><span role="button" class="el-date-picker__header-label">{{ year }}</span><buttontype="button"aria-label="后一年"class="el-picker-panel__icon-btn el-date-picker__next-btn el-icon-d-arrow-right"@click="next"/></div><div class="text item" style="text-align:center;"><el-buttontype="text"size="medium"style="width:40%;color: #606266;float:left;"@click="selectSeason(0)">第一季度</el-button><el-buttontype="text"size="medium"style="float:right;width:40%;color: #606266;"@click="selectSeason(1)">第二季度</el-button></div><div class="text item" style="text-align:center;"><el-buttontype="text"size="medium"style="width:40%;color: #606266;float:left;"@click="selectSeason(2)">第三季度</el-button><el-buttontype="text"size="medium"style="float:right;width:40%;color: #606266;"@click="selectSeason(3)">第四季度</el-button></div></el-card></div></div></el-dialog>
</template>
<script>
/*** @file:  View 组件 季节选择控件* @description: UI组件  可选择季节*/
export default {data() {return {valueArr: ['-01', '-02', '-03', '-04'], // 接口接受的格式(一个季度传一个整体时间) //valueArr: ['01-02-03', '04-05-06', '07-08-09', '10-11-12'],//接口接受的格式(一个季度传一个每个的时间,一个季度三个月)showSeason: false,season: '',year: new Date().getFullYear(),visiable: false,text: null}},methods: {// 打开open() {this.visiable = !this.visiable},prev() {this.year = this.year - 1},next() {this.year = this.year + 1},selectSeason(i) {this.season = i + 1this.showSeason = `${this.year}` + this.valueArr[i]this.showSeason = falsethis.text = `${this.year}年第${this.season}季度`}}
}
</script>
http://www.lryc.cn/news/319070.html

相关文章:

  • 4.MongoDB中16个常用CURD
  • Tomcat数据源笔记
  • Spring-Kafka笔记整理
  • 已解决org.apache.hadoop.hdfs.protocol.QuotaExceededException异常的正确解决方法,亲测有效!!!
  • GitHub打不开的解决方案(超简单)
  • Unity开发一个FPS游戏之二
  • STM32F103 CubeMX 使用USB生成鼠标设备
  • HJXH-E1/U静态信号继电器 面板安装 辅助电源220VDC 启动电压220VDC JOSEF约瑟
  • SpringBoot3下Kafka分组均衡消费实现
  • 鸿蒙Harmony应用开发—ArkTS声明式开发(容器组件:GridItem)
  • Qt 使用RAW INPUT获取HID触摸屏,笔设备,鼠标的原始数据,最低受支持的客户端:Windows XP [仅限桌面应用]
  • easyexcel导出excel文件到s3服务器
  • xss.haozi.me靶场“0x0B-0x12”通关教程
  • linux--redhat系统Yum源配置
  • el-Switch 开关二次确认
  • (二)丶RabbitMQ的六大核心
  • 微信小程序实现上下手势滑动切换
  • 详解命令docker run -d --name container_name -e TZ=Asia/Shanghai your_image
  • javaEE7
  • int与integer的区别
  • Golang实现Redis分布式锁(Lua脚本+可重入+自动续期)
  • 音乐播放器-C#实现
  • 如何本地搭建hMailServer邮件服务
  • 裸机编程的几种模式、架构与缺陷。
  • TSINGSEE青犀视频AI方案:数据+算力+算法,人工智能的三大基石
  • Linux认识与学习BASH
  • Python JSON 序列化以及反序列化 文件读写
  • Spring MVC 返回JSON数据
  • 前端基础——HTML傻瓜式入门(1)
  • 【AI】如何创建自己的自定义ChatGPT