소스 검색

Merge branch 'zhangtao' of gitadmin/tuoheng_lc_web into develop

tags/v1.0.0^2
zhangtao 2 년 전
부모
커밋
e188308570
6개의 변경된 파일32개의 추가작업 그리고 15개의 파일을 삭제
  1. +4
    -1
      src/api/report/index.js
  2. +5
    -1
      src/components/PositionMsg/index.vue
  3. +2
    -2
      src/views/dashboard/components/AirCard.vue
  4. +10
    -9
      src/views/dashboard/components/VideoCard.vue
  5. +1
    -1
      src/views/question-manage/question-distribution/index.vue
  6. +10
    -1
      src/views/report-manage/all-report/components/ReportDrawer.vue

+ 4
- 1
src/api/report/index.js 파일 보기

@@ -33,7 +33,10 @@ export function getReportDetail(id) {
export function reportDownload(id) {
return request({
url: `report/${id}/word`,
method: 'GET'
method: 'GET',
headers: {
responseType: 'arraybuffer'
}
})
}


+ 5
- 1
src/components/PositionMsg/index.vue 파일 보기

@@ -5,7 +5,7 @@
<over-lay :data="problemData" :type="positionType" @close="closeOverlay" />
</div>

<ul class="legend_list">
<ul v-if="showLegend" class="legend_list">
<li v-for="(item, index) in legendList" :key="index" class="legend_item">
<div class="legend_point" :style="{background: item.color}" />
<span class="legend_name">{{ item.name }}</span>
@@ -39,6 +39,10 @@ export default {
type: {
type: String,
default: 'look'
},
showLegend: {
type: Boolean,
default: true
}
},
emits: {},

+ 2
- 2
src/views/dashboard/components/AirCard.vue 파일 보기

@@ -109,8 +109,8 @@ export default {
id: 'video-inner',
width: '100%',
height: '100%',
// source: row?.externalMonitorUrl,
source: 'http://101.43.84.72:8080/live/34020000001320000001@34020000001320000001.flv',
source: row?.externalMonitorUrl,
// source: 'http://101.43.84.72:8080/live/34020000001320000001@34020000001320000001.flv',
// source: 'https://live.play.t-aaron.com/live/THSAl_hd.m3u8',
isLive: true
}

+ 10
- 9
src/views/dashboard/components/VideoCard.vue 파일 보기

@@ -18,7 +18,7 @@
</n-form>
</p>
</div>
<div v-if="!hasLive" class="card__video">
<div v-if="!hasPlayer" class="card__video">
<div class="card__video--empty">
<img src="@/assets/images/no-live.png">
<p>当前暂无直播</p>
@@ -54,7 +54,7 @@ export default {
},
airOptions: [],
taskOptions: [],
hasLive: false,
hasPlayer: false,
airportIdBack: null,
airportUrl: {
origin: null,
@@ -99,7 +99,7 @@ export default {
origin: res.data?.playUrl,
analyse: res.data?.aiplayUrl
}
data.liveUrl = { ...data.airportUrl }
data.liveUrl = { ...data.airportUrl, isLive: true }
}
})
loadTaskOption(value)
@@ -108,11 +108,12 @@ export default {
function handleVideoChange(value) {
const row = data.taskOptions.find((item) => { return item.id === value })
if (!value) {
data.liveUrl = { ...data.airportUrl }
data.liveUrl = { ...data.airportUrl, isLive: true }
} else {
data.liveUrl = {
origin: row.videoUrl,
analyse: row.aiVideoUrl
analyse: row.aiVideoUrl,
isLive: false
}
}
}
@@ -120,26 +121,26 @@ export default {
watch(() => data.liveUrl,
(value) => {
nextTick(() => {
data.hasLive = (value.origin && value.analyse) || false
data.hasPlayer = (value.origin && value.analyse) || false
})
})

const getVideoOptions = computed(() => {
const { origin, analyse } = data.liveUrl
const { origin, analyse, isLive } = data.liveUrl
return {
origin: {
id: 'video-origin',
width: '100%',
height: '100%',
source: origin,
isLive: true
isLive: isLive
},
analyse: {
id: 'video-analyse',
width: '100%',
height: '100%',
source: analyse,
isLive: true
isLive: isLive
}
}
})

+ 1
- 1
src/views/question-manage/question-distribution/index.vue 파일 보기

@@ -4,7 +4,7 @@
<div class="question__container">
<HeadSearch :info="search" @search="handleSearch" @reset="handleSearch" />
<div class="question__position">
<PositionMsg :data="questionList" />
<PositionMsg :data="questionList" :show-legend="false" />
</div>
</div>
</n-card>

+ 10
- 1
src/views/report-manage/all-report/components/ReportDrawer.vue 파일 보기

@@ -51,7 +51,7 @@
</n-grid>
</div>
</div>
<div class="report__item">
<div v-if="reportDetail.questionCount>0" class="report__item">
<p class="report__item--title">问题清单</p>
<!-- <n-image-group> -->
<div v-for="(item,index) in reportDetail.questionReportList" :key="index">
@@ -156,6 +156,15 @@ export default defineComponent({

function handleDownload() {
reportDownload(props.data.id)
.then((res) => {
const blob = new Blob([res], { type: 'application/msword;charset=UTF-8' })
const fileName = '林场巡检报告【' + data.reportDetail.reportNo + '】'
const link = document.createElement('a')
link.href = window.URL.createObjectURL(blob)
link.download = fileName
link.click()
window.URL.revokeObjectURL(link.href)
})
}

return {

Loading…
취소
저장