Browse Source

change denoeid

tags/v1.0.0^2
zhangtao 2 years ago
parent
commit
9b7f619a48
6 changed files with 32 additions and 21 deletions
  1. +3
    -5
      src/views/dashboard/components/AirCard.vue
  2. +1
    -1
      src/views/dashboard/components/VideoCard.vue
  3. +15
    -3
      src/views/task-manage/all-task/components/TaskModal.vue
  4. +7
    -7
      src/views/task-manage/all-task/tools/form.js
  5. +3
    -2
      src/views/task-manage/all-task/tools/search.js
  6. +3
    -3
      src/views/task-manage/question/index.vue

+ 3
- 5
src/views/dashboard/components/AirCard.vue View File



const getVideoOptions = computed(() => { const getVideoOptions = computed(() => {
const row = data.airOptionsAll.find((item) => { return item.id === data.videoForm.airportId }) const row = data.airOptionsAll.find((item) => { return item.id === data.videoForm.airportId })
const live1 = 'https://live.play.t-aaron.com/live/THSBa_hd.m3u8'
const video1 = 'https://vod.play.t-aaron.com/af2f261d45fe4468bee5d4e501097405/53f0276aadc741909fd06c94484cd217-7184ea23b102c31c4a5e31d65206f539-fd.mp4'
const video2 = 'https://vod.play.t-aaron.com/408a38ee77ad4672b2b607e20a4e11d1/6d0d2ac3044a4992b4f2fe8563f75f20-0e1dfeb4f87ab08b10522d261f973f0d-fd.mp4'
return { return {
inner: { inner: {
id: 'video-inner', id: 'video-inner',
width: '100%', width: '100%',
height: '100%', height: '100%',
// source: row?.internalMonitorUrl,
source: row?.id === 2 ? live1 : video2,
source: row?.externalMonitorUrl,
// source: 'http://101.43.84.72:8080/live/34020000001320000001@34020000001320000001.flv',
// source: row?.id === 2 ? live1 : video2,
isLive: true isLive: true
} }
// outer: { // outer: {

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

} }


function handleVideoChange(value) { function handleVideoChange(value) {
// 1
} }


const getVideoOptions = computed(() => { const getVideoOptions = computed(() => {

+ 15
- 3
src/views/task-manage/all-task/components/TaskModal.vue View File

}, },
setup(props, { emit }) { setup(props, { emit }) {
getAirOptions() getAirOptions()
if (props?.data?.id) {
getLineOptions(props.data.droneId)
}
const MODAL_TYPE = { const MODAL_TYPE = {
'create': '新建任务', 'create': '新建任务',
'preview': '任务详情', 'preview': '任务详情',
show: props.visible, show: props.visible,
title: MODAL_TYPE[props.type], title: MODAL_TYPE[props.type],
width: 700, width: 700,
negativeText: '取消',
positiveText: '确认'
negativeText: props.type !== 'preview' ? '取消' : '',
positiveText: props.type !== 'preview' ? '确认' : ''
} }
}) })




watch(() => data.taskForm.airportId, watch(() => data.taskForm.airportId,
(val) => { (val) => {
const { airOptions } = getOptions()
const item = airOptions.value.find((item) => { return item.id === val })
data.taskForm.inspectionLine = '' data.taskForm.inspectionLine = ''
getLineOptions(val)
getLineOptions(item.droneId)
}) })


/** /**
.n-date-picker{ .n-date-picker{
width: 100%; width: 100%;
} }
::v-deep(.n-date-picker--disabled){
.n-input .n-input-wrapper .n-input__input {
.n-input__input-el{
text-decoration-color: transparent !important;
}
}
}
</style> </style>

+ 7
- 7
src/views/task-manage/all-task/tools/form.js View File



export const form = reactive({ export const form = reactive({
taskForm: { taskForm: {
name: '',
inspectionType: '',
airportId: '',
inspectionLine: '',
type: '',
name: null,
inspectionType: null,
airportId: null,
inspectionLine: null,
type: null,
executionStartTime: null, executionStartTime: null,
note: ''
note: null
}, },
taskRules: { taskRules: {
name: [{ required: true, message: '请输入任务名称', trigger: 'blur' }], name: [{ required: true, message: '请输入任务名称', trigger: 'blur' }],


export const getAirOptions = async function() { export const getAirOptions = async function() {
const res = await airportList() const res = await airportList()
airOptions.value = dataToSelect(res.data, { label: 'name', value: 'droneId' })
airOptions.value = dataToSelect(res.data, { label: 'name', value: 'id' })
} }


// 获取角色列表 // 获取角色列表

+ 3
- 2
src/views/task-manage/all-task/tools/search.js View File



export const getAirOptions = async function() { export const getAirOptions = async function() {
const res = await airportList() const res = await airportList()
airOptions.value = dataToSelect(res.data, { label: 'name', value: 'droneId' })
airOptions.value = dataToSelect(res.data, { label: 'name', value: 'id' })
} }


// 获取角色列表 // 获取角色列表
export const getLineOptions = async function(id) { export const getLineOptions = async function(id) {
const res = await airportLine(id)
const item = airOptions.value.find((item) => { return item.id === id })
const res = await airportLine(item.droneId)
lineOptions.value = dataToSelect(res.data, { label: 'name', value: 'id' }) lineOptions.value = dataToSelect(res.data, { label: 'name', value: 'id' })
} }



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

<template> <template>
<HeadSearch :info="search" />
<HeadSearch :info="search" @search="handleSearch" @reset="handleSearch" />
<DataTable <DataTable
ref="tableRef" ref="tableRef"
:columns="columns" :columns="columns"
</template> </template>
<template #toolbar> <template #toolbar>
<n-button @click="handleReported"> <n-button @click="handleReported">
{{ isReported ? '修改并生成报告': '提交并生成报告' }}
{{ reportStatus ? '修改并生成报告': '提交并生成报告' }}
</n-button> </n-button>
</template> </template>
</DataTable> </DataTable>
search, search,
...toRefs(table), ...toRefs(table),
pageData: [], pageData: [],
isReported: props.data?.isReported || false
isReported: props.data?.reportStatus === 1 || false
}) })


/** /**

Loading…
Cancel
Save