Commit b191cc0c by 前端

时间组件bug修复

1 parent 5632c974
...@@ -111,14 +111,13 @@ ...@@ -111,14 +111,13 @@
const timeRules = (rule, value, callback) => { const timeRules = (rule, value, callback) => {
if (value) { if (value) {
const date = new Date() const date = new Date()
let endYear = date.getFullYear() //获取年份 let endYear = date.getFullYear() //获取年份
let endMonth = date.getMonth() + 1 // 获取月份 let endMonth = date.getMonth() + 1 // 获取月份
let endDay = date.getDate() let endDay = date.getDate()
const startTime = endYear + '-' + endMonth + '-' + endDay + ' ' + value[0] const startTime = endYear + '/' + endMonth + '/' + endDay + ' ' + value[0]
const endTime = endYear + '-' + endMonth + '-' + endDay + ' ' + value[1] const endTime = endYear + '/' + endMonth + '/' + endDay + ' ' + value[1]
const start = endYear + '-' + endMonth + '-' + endDay + ' ' + '9:00' const start = endYear + '/' + endMonth + '/' + endDay + ' ' + '9:00'
const end = endYear + '-' + endMonth + '-' + endDay + ' ' + '20:00' const end = endYear + '/' + endMonth + '/' + endDay + ' ' + '20:00'
let result = new Date(startTime) >= new Date(start) && new Date(endTime) <= new Date(end) let result = new Date(startTime) >= new Date(start) && new Date(endTime) <= new Date(end)
if (!result) { if (!result) {
callback(new Error('外呼时间只限于09:00-20:00')) callback(new Error('外呼时间只限于09:00-20:00'))
...@@ -303,7 +302,7 @@ export default { ...@@ -303,7 +302,7 @@ export default {
{ {
label: '任务名称', label: '任务名称',
prop: 'taskName', prop: 'taskName',
width: 150, width: 210,
line: 1 line: 1
}, },
{ {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!