Browse Source

change player

tags/v1.0.0^2
zhangtao 2 years ago
parent
commit
142b8336ad
4 changed files with 28 additions and 7 deletions
  1. +1
    -1
      src/views/dashboard/components/TaskCard.vue
  2. +12
    -5
      src/views/dashboard/components/VideoCard.vue
  3. +1
    -0
      src/views/task-manage/question/index.vue
  4. +14
    -1
      src/views/task-manage/question/tools/search.js

+ 1
- 1
src/views/dashboard/components/TaskCard.vue View File

@@ -11,7 +11,7 @@
:columns="columns"
:data="tableData"
:pagination="false"
:max-heght="350"
:max-height="340"
>
<template #empty>
<img src="@/assets/images/no-task.png" alt="">

+ 12
- 5
src/views/dashboard/components/VideoCard.vue View File

@@ -90,11 +90,11 @@ export default {
* @param {*} res
* @return {*}
*/
const loadAirport = (async function() {
const loadAirport = (async function(id) {
const res = await airportList({ page: 1, limit: 60 })
if (res.code === 0) {
data.airOptions = dataToSelect(res.data, { label: 'name', value: 'id' })
data.videoForm.airportId = res.data[0]?.id
data.videoForm.airportId = id || res.data[0]?.id
handleAirportChange(data.videoForm.airportId)
}
})()
@@ -107,7 +107,7 @@ export default {
}

function handleAirportChange(value) {
if (value === data.airportIdBack) return
// if (value === data.airportIdBack) return
data.airportIdBack = value
data.videoForm.taskId = null
missionLive(value)
@@ -123,10 +123,15 @@ export default {
loadTaskOption(value)
}

function handleVideoChange(value) {
async function handleVideoChange(value) {
const row = data.taskOptions.find((item) => { return item.id === value })
if (!value) {
data.liveUrl = { ...data.airportUrl, isLive: true }
const res = await airportList({ page: 1, limit: 60 })
if (res.code === 0) {
data.airOptions = dataToSelect(res.data, { label: 'name', value: 'id' })
handleAirportChange(data.videoForm.airportId)
}
// data.liveUrl = { ...data.airportUrl, isLive: true }
} else {
data.liveUrl = {
origin: row.videoUrl,
@@ -158,6 +163,7 @@ export default {
width: '100%',
height: '100%',
source: data.liveUrl.origin,
autoplay: data.liveUrl.isLive,
isLive: data.liveUrl.isLive
}
originRef.value?.init(origin)
@@ -174,6 +180,7 @@ export default {
width: '100%',
height: '100%',
source: data.liveUrl.analyse,
autoplay: data.liveUrl.isLive,
isLive: data.liveUrl.isLive
}
analyseRef.value?.init(analyse)

+ 1
- 0
src/views/task-manage/question/index.vue View File

@@ -68,6 +68,7 @@ export default {
...res
}
if (_params.type === 'all') _params.type = null
if (_params.status === 'all') _params.status = null
return await getQuestionList(_params)
}


+ 14
- 1
src/views/task-manage/question/tools/search.js View File

@@ -1,5 +1,5 @@
import { reactive } from 'vue'
import { QUESTION_TYPE } from '@/utils/dictionary.js'
import { QUESTION_TYPE, QUESTION_STATUS } from '@/utils/dictionary.js'

const data = reactive([
{
@@ -14,6 +14,19 @@ const data = reactive([
...QUESTION_TYPE
]
}
},
{
label: '问题状态',
key: 'status',
type: 'select',
value: 'all',
props: {
placeholder: '请选择问题状态',
options: [
{ label: '全部', value: 'all' },
...QUESTION_STATUS
]
}
}
])


Loading…
Cancel
Save