method: 'PUT', | method: 'PUT', | ||||
data | data | ||||
}) | }) | ||||
/** | |||||
* 平台列表 | |||||
* @param {*} params | |||||
* @returns | |||||
*/ | |||||
export const PilotPlatform = () => request({ | |||||
url: '/PilotPlatform/index', | |||||
method: 'GET' | |||||
}) |
<n-layout-header class="layout__header" bordered> | <n-layout-header class="layout__header" bordered> | ||||
<div class="header__logo"> | <div class="header__logo"> | ||||
<n-image height="18" src="/logo.png" preview-disabled /> | <n-image height="18" src="/logo.png" preview-disabled /> | ||||
<span class="sp">欢迎回来, {{ getUserInfo.realname }}</span> | |||||
</div> | </div> | ||||
<n-dropdown v-if="getUserInfo.hasLogin" trigger="hover" :options="options" @select="handleSelect"> | <n-dropdown v-if="getUserInfo.hasLogin" trigger="hover" :options="options" @select="handleSelect"> | ||||
.header__logo{ | .header__logo{ | ||||
height: 18px; | height: 18px; | ||||
} | } | ||||
.sp { | |||||
font-size: 14px; | |||||
font-weight: blod; | |||||
} | |||||
.user_msg { | .user_msg { | ||||
display: flex; | display: flex; | ||||
justify-content: flex-end; | justify-content: flex-end; |
<div class="title">飞行文件</div> | <div class="title">飞行文件</div> | ||||
<UploadVod | <UploadVod | ||||
v-if="data.photographyWay === 1 && !data.videoUrl" | |||||
v-if="data.photographyWay === 1 && roleId === data.flightHandId && !data.videoUrl" | |||||
ref="videoRefs" | ref="videoRefs" | ||||
:upload-name="'视频'" | :upload-name="'视频'" | ||||
:limit="1" | :limit="1" | ||||
@upload-status="vodStatusVideo" | @upload-status="vodStatusVideo" | ||||
/> | /> | ||||
<fileOss | <fileOss | ||||
v-if="data.photographyWay === 1 && data.videoUrl" | |||||
v-if="data.photographyWay === 1 && roleId === data.flightHandId && data.videoUrl" | |||||
:file-type="'video'" | :file-type="'video'" | ||||
:btn-name="'视频'" | :btn-name="'视频'" | ||||
:limit="1" | :limit="1" | ||||
/> | /> | ||||
<fileOss | <fileOss | ||||
v-if="data.photographyWay === 1" | |||||
v-if="data.photographyWay === 1 && roleId === data.flightHandId" | |||||
ref="srtRefs" | ref="srtRefs" | ||||
:file-type="'srt'" | :file-type="'srt'" | ||||
:key-name="'srtUrl'" | :key-name="'srtUrl'" | ||||
/> | /> | ||||
<n-button | <n-button | ||||
v-if="data.photographyWay === 1 && !data.videoUrl" | |||||
v-if="data.photographyWay === 1 && roleId === data.flightHandId && !data.videoUrl" | |||||
type="primary" | type="primary" | ||||
class="btn" | class="btn" | ||||
:loading="loading" | :loading="loading" |
</template> | </template> | ||||
<script> | <script> | ||||
import { search } from './tools/search.js' | |||||
import { search, getPlatform } from './tools/search.js' | |||||
import table from './tools/table.js' | import table from './tools/table.js' | ||||
import headSearch from '@/components/Search/index.vue' | import headSearch from '@/components/Search/index.vue' | ||||
import dataTable from '@/components/DataTable/index.vue' | import dataTable from '@/components/DataTable/index.vue' | ||||
name: 'TaskManage', | name: 'TaskManage', | ||||
components: { dataTable, UserModal, headSearch, DrawComp }, | components: { dataTable, UserModal, headSearch, DrawComp }, | ||||
setup() { | setup() { | ||||
getPlatform() | |||||
const data = reactive({ | const data = reactive({ | ||||
...toRefs(table), | ...toRefs(table), | ||||
...toRefs(search) | ...toRefs(search) |
import { ref, reactive, computed } from 'vue' | import { ref, reactive, computed } from 'vue' | ||||
import { TASK_STATUS } from '@/utils/dictionary' | import { TASK_STATUS } from '@/utils/dictionary' | ||||
import { PilotPlatform } from '@/api/task/index' | |||||
const platformList = ref([]) | |||||
export const search = reactive({ | export const search = reactive({ | ||||
search: [ | search: [ | ||||
}, | }, | ||||
{ | { | ||||
label: '平台名称', | label: '平台名称', | ||||
type: 'select', | |||||
key: 'platformName', | key: 'platformName', | ||||
props: { | props: { | ||||
placeholder: '请输入平台名称' | |||||
placeholder: '请输入平台名称', | |||||
options: platformList | |||||
} | } | ||||
}, | }, | ||||
{ | { | ||||
label: '租户名称', | |||||
label: '客户名称', | |||||
key: 'tenantName', | key: 'tenantName', | ||||
props: { | props: { | ||||
placeholder: '请输入租户名称' | |||||
placeholder: '请输入客户名称' | |||||
} | } | ||||
}, | }, | ||||
{ | { | ||||
] | ] | ||||
}) | }) | ||||
export const getPlatform = () => { | |||||
PilotPlatform().then(({ data }) => { | |||||
platformList.value = data?.records.map(it => ({ | |||||
...it, | |||||
label: it.platformName, | |||||
value: it.platformName | |||||
})) | |||||
}) | |||||
} | |||||
key: 'taskCode', | key: 'taskCode', | ||||
align: 'center' | align: 'center' | ||||
}, | }, | ||||
{ | |||||
title: '平台名称', | |||||
key: 'platformName', | |||||
align: 'center' | |||||
}, | |||||
{ | { | ||||
title: '任务名称', | title: '任务名称', | ||||
key: 'taskName', | key: 'taskName', | ||||
align: 'center' | align: 'center' | ||||
}, | }, | ||||
{ | { | ||||
title: '租户名称', | |||||
title: '客户名称', | |||||
key: 'tenantName', | key: 'tenantName', | ||||
align: 'center' | align: 'center' | ||||
}, | }, | ||||
{ | { | ||||
title: '期望执行时间', | |||||
title: '任务发起时间', | |||||
key: 'taskStartTime', | key: 'taskStartTime', | ||||
align: 'center' | align: 'center' | ||||
}, | }, | ||||
align: 'center' | align: 'center' | ||||
}, | }, | ||||
{ | { | ||||
title: '飞手姓名', | |||||
title: '飞手', | |||||
key: 'flightHandName', | key: 'flightHandName', | ||||
align: 'center' | align: 'center' | ||||
}, | }, |