Browse Source

Merge branch 'zhangtao' of gitadmin/tuoheng_lc_web into develop

tags/v1.0.0^2
zhangtao 2 years ago
parent
commit
1cc940ba6a
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

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

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

* @param {*} res * @param {*} res
* @return {*} * @return {*}
*/ */
const loadAirport = (async function() {
const loadAirport = (async function(id) {
const res = await airportList({ page: 1, limit: 60 }) const res = await airportList({ page: 1, limit: 60 })
if (res.code === 0) { if (res.code === 0) {
data.airOptions = dataToSelect(res.data, { label: 'name', value: 'id' }) 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) handleAirportChange(data.videoForm.airportId)
} }
})() })()
} }


function handleAirportChange(value) { function handleAirportChange(value) {
if (value === data.airportIdBack) return
// if (value === data.airportIdBack) return
data.airportIdBack = value data.airportIdBack = value
data.videoForm.taskId = null data.videoForm.taskId = null
missionLive(value) missionLive(value)
loadTaskOption(value) loadTaskOption(value)
} }


function handleVideoChange(value) {
async function handleVideoChange(value) {
const row = data.taskOptions.find((item) => { return item.id === value }) const row = data.taskOptions.find((item) => { return item.id === value })
if (!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 { } else {
data.liveUrl = { data.liveUrl = {
origin: row.videoUrl, origin: row.videoUrl,
width: '100%', width: '100%',
height: '100%', height: '100%',
source: data.liveUrl.origin, source: data.liveUrl.origin,
autoplay: data.liveUrl.isLive,
isLive: data.liveUrl.isLive isLive: data.liveUrl.isLive
} }
originRef.value?.init(origin) originRef.value?.init(origin)
width: '100%', width: '100%',
height: '100%', height: '100%',
source: data.liveUrl.analyse, source: data.liveUrl.analyse,
autoplay: data.liveUrl.isLive,
isLive: data.liveUrl.isLive isLive: data.liveUrl.isLive
} }
analyseRef.value?.init(analyse) analyseRef.value?.init(analyse)

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

...res ...res
} }
if (_params.type === 'all') _params.type = null if (_params.type === 'all') _params.type = null
if (_params.status === 'all') _params.status = null
return await getQuestionList(_params) return await getQuestionList(_params)
} }



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

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


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



Loading…
Cancel
Save