|
@@ -8,7 +8,9 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-import { AppletOrderType } from '@/constant.js'
|
|
|
|
|
|
|
+import {
|
|
|
|
|
+ AppletOrderType, TaskStatus
|
|
|
|
|
+} from '@/constant.js'
|
|
|
import { getServerAsyncTasks } from '../api.js'
|
|
import { getServerAsyncTasks } from '../api.js'
|
|
|
|
|
|
|
|
const TypeInfo = {
|
|
const TypeInfo = {
|
|
@@ -21,10 +23,28 @@ export default {
|
|
|
name: 'ServerAsyncTaskDialog',
|
|
name: 'ServerAsyncTaskDialog',
|
|
|
data () {
|
|
data () {
|
|
|
return {
|
|
return {
|
|
|
- schema: {
|
|
|
|
|
|
|
+ type: null
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ computed: {
|
|
|
|
|
+ schema () {
|
|
|
|
|
+ return {
|
|
|
list: getServerAsyncTasks,
|
|
list: getServerAsyncTasks,
|
|
|
autoRefreshEachPage: true,
|
|
autoRefreshEachPage: true,
|
|
|
refreshInterval: 5000,
|
|
refreshInterval: 5000,
|
|
|
|
|
+ condition: { type: this.type },
|
|
|
|
|
+ filters: [
|
|
|
|
|
+ { key: 'type', type: 'select', options: [
|
|
|
|
|
+ { value: AppletOrderType.PACKAGE, label: '大屏播出单' },
|
|
|
|
|
+ { value: AppletOrderType.SOON, label: '大屏上下线记录' },
|
|
|
|
|
+ { value: AppletOrderType.DAILY, label: '人流量统计' }
|
|
|
|
|
+ ], placeholder: '任务类型' },
|
|
|
|
|
+ { key: 'status', type: 'select', options: [
|
|
|
|
|
+ { value: TaskStatus.CANCELLED, label: '待完成' },
|
|
|
|
|
+ { value: TaskStatus.DISABLE, label: '已完成' },
|
|
|
|
|
+ { value: TaskStatus.ENABLE, label: '下载失败' }
|
|
|
|
|
+ ], placeholder: '状态' }
|
|
|
|
|
+ ],
|
|
|
cols: [
|
|
cols: [
|
|
|
{ label: '任务类型', render: ({ type }) => TypeInfo[type] },
|
|
{ label: '任务类型', render: ({ type }) => TypeInfo[type] },
|
|
|
{ prop: 'createTime', label: '创建时间' },
|
|
{ prop: 'createTime', label: '创建时间' },
|
|
@@ -42,7 +62,8 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- show () {
|
|
|
|
|
|
|
+ show (type) {
|
|
|
|
|
+ this.type = typeof type === 'number' ? type : null
|
|
|
this.$refs.dialog.show()
|
|
this.$refs.dialog.show()
|
|
|
},
|
|
},
|
|
|
onDownload ({ downloadUrl }) {
|
|
onDownload ({ downloadUrl }) {
|