methods: { validateDate(rule, value, callback){ if (value) { let timestamp = new Date(value).getTime() let start = new Date(this.shiftStartTime).getTime() let end = new Date(this.shiftEndTime).getTime() if (end < timestamp || timestamp < start) { ca…
如果直接使用Element做时间选择器,其规则(rules)不添加type:'date',会提示类型错误,处理这个需要规范值的类型为date. 时间格式化过滤器 import Vue from 'vue' import service from './service.js' import onlineIcon from '@/assets/img/map/tsp_green.png' import unlineIcon from '@/assets/img/map/tsp_gray.png' i…