|
|
@@ -83,6 +83,7 @@ import {
|
|
|
AssetType
|
|
|
} from '@/constant'
|
|
|
import { getAssetDuration } from '@/utils'
|
|
|
+import { getRatios } from '@/api/device'
|
|
|
import { getSchedules } from '@/api/calendar'
|
|
|
import { getPrograms } from '@/api/program'
|
|
|
import { assetTableMixin } from '@/mixins/asset-table'
|
|
|
@@ -144,8 +145,9 @@ export default {
|
|
|
|
|
|
return {
|
|
|
list: this.getListInvoke,
|
|
|
- condition: { name: '' },
|
|
|
+ condition: { resolutionRatio: this.ratio, name: '' },
|
|
|
filters: [
|
|
|
+ { key: 'resolutionRatio', type: 'select', placeholder: '分辨率', remote: getRatios },
|
|
|
{ key: 'name', type: 'search', placeholder: '名称' }
|
|
|
],
|
|
|
cols: [
|
|
|
@@ -211,20 +213,18 @@ export default {
|
|
|
this.currentTarget.detail = null
|
|
|
this.currentTarget.assets = []
|
|
|
},
|
|
|
- getListInvoke ({ pageSize, pageNum, name }) {
|
|
|
+ getListInvoke (params) {
|
|
|
switch (this.currentTarget.type) {
|
|
|
case EventTarget.RECUR:
|
|
|
return getSchedules({
|
|
|
- pageSize, pageNum, name,
|
|
|
type: ScheduleType.RECUR,
|
|
|
- resolutionRatio: this.ratio,
|
|
|
- status: State.AVAILABLE
|
|
|
+ status: State.AVAILABLE,
|
|
|
+ ...params
|
|
|
})
|
|
|
default:
|
|
|
return getPrograms({
|
|
|
- pageSize, pageNum, name,
|
|
|
- resolutionRatio: this.ratio,
|
|
|
- status: State.AVAILABLE
|
|
|
+ status: State.AVAILABLE,
|
|
|
+ ...params
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
@@ -300,8 +300,15 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
+ getSnapshot () {
|
|
|
+ return this.currentTarget
|
|
|
+ },
|
|
|
getValue () {
|
|
|
- return this.createEventTarget()
|
|
|
+ const eventTarget = this.createEventTarget()
|
|
|
+ if (eventTarget && !this.isAssets && this.ratio && this.ratio !== this.currentTarget.detail.resolutionRatio) {
|
|
|
+ eventTarget.adaptive = 1
|
|
|
+ }
|
|
|
+ return eventTarget
|
|
|
}
|
|
|
}
|
|
|
}
|