|
|
@@ -16,6 +16,7 @@
|
|
|
type="daterange"
|
|
|
range-separator="至"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
+ :picker-options="pickerOptions"
|
|
|
:editable="false"
|
|
|
:clearable="false"
|
|
|
/>
|
|
|
@@ -85,6 +86,7 @@
|
|
|
|
|
|
<script>
|
|
|
import {
|
|
|
+ ONE_DAY,
|
|
|
AssetType,
|
|
|
TaskFromType,
|
|
|
SCREEN_TIME_KEY,
|
|
|
@@ -110,10 +112,11 @@ export default {
|
|
|
{ value: TimeType.POINT, label: '时间点' }
|
|
|
]
|
|
|
},
|
|
|
- taskData: null,
|
|
|
+ taskDate: null,
|
|
|
taskTime: {},
|
|
|
taskCount: 100,
|
|
|
- taskDuration: 5
|
|
|
+ taskDuration: 5,
|
|
|
+ taskData: null
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -150,19 +153,26 @@ export default {
|
|
|
},
|
|
|
disableTaskDuration () {
|
|
|
return this.taskData?.type === AssetType.VIDEO
|
|
|
+ },
|
|
|
+ pickerOptions () {
|
|
|
+ return {
|
|
|
+ disabledDate: this.isDisableDate
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
show (active) {
|
|
|
this.active = active
|
|
|
const date = parseTime(new Date(), '{y}-{m}-{d}')
|
|
|
- this.taskData = null
|
|
|
this.taskDate = [date, date]
|
|
|
this.taskTime = parseTaskTime()
|
|
|
this.taskCount = 100
|
|
|
this.taskDuration = 5
|
|
|
this.$refs.taskDialog.show()
|
|
|
},
|
|
|
+ isDisableDate (date) {
|
|
|
+ return date <= Date.now() - ONE_DAY
|
|
|
+ },
|
|
|
onRefreshTable () {
|
|
|
this.$refs.table?.pageTo(1)
|
|
|
},
|