Merge branch 'hi-ucs-dev' of http://192.168.124.50:3000/wuhongjian/hi-ucs into hi-ucs-dev

This commit is contained in:
gongjiale 2022-11-28 17:28:22 +08:00
commit 4e2f7e9403
3 changed files with 64 additions and 13 deletions

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-09 15:41:19 * @Date: 2022-06-09 15:41:19
* @LastEditors: hisense.liangjunhua * @LastEditors: Light
* @LastEditTime: 2022-08-02 11:30:50 * @LastEditTime: 2022-11-28 17:05:33
* @Description: 上传组件 * @Description: 上传组件
--> -->
<template> <template>
@ -92,6 +92,7 @@
} }
if (!isLt10M) { if (!isLt10M) {
message.error(`${file.name} 超出100M的大小`) message.error(`${file.name} 超出100M的大小`)
flag = false
} }
return flag || Upload.LIST_IGNORE return flag || Upload.LIST_IGNORE
} }

View File

@ -72,7 +72,8 @@
(item.type === '组件服务' && (item.type === '组件服务' &&
item.infoList && item.infoList &&
item.infoList.filter((val) => val.attrType == '图层缩略图')[0]) || item.infoList.filter((val) => val.attrType == '图层缩略图')[0]) ||
item.infoList.filter((val) => val.attrType == '组件图片')[0] item.infoList.filter((val) => val.attrType == '组件图片')[0] ||
item.infoList.filter((val) => val.attrType == '算法效果图片')[0]
" "
> >
<a-image <a-image
@ -99,6 +100,18 @@
" "
:fallback="item.type == '开发组件' ? imgSrcKfzj : imgSrcYwzj" :fallback="item.type == '开发组件' ? imgSrcKfzj : imgSrcYwzj"
/> />
<a-image
v-else-if="
item.infoList.filter((val) => val.attrType == '算法效果图片')[0]
"
:width="106"
:preview="false"
:src="
item.infoList.filter((val) => val.attrType == '算法效果图片')[0]
.attrValue
"
:fallback="imgSrcZnsf"
/>
</div> </div>
<div <div
class="left" class="left"
@ -816,6 +829,7 @@
}) })
const imgSrcYyzy = ref(require('@/assets/home/yyzy_square.png')) const imgSrcYyzy = ref(require('@/assets/home/yyzy_square.png'))
const imgSrcTcfw = ref(require('@/assets/home/tcfw_square.png')) const imgSrcTcfw = ref(require('@/assets/home/tcfw_square.png'))
const imgSrcZnsf = ref(require('@/assets/home/znsf_square.png'))
const imgSrcKfzj = ref(require('@/assets/home/kfzj_square.png')) const imgSrcKfzj = ref(require('@/assets/home/kfzj_square.png'))
const imgSrcYwzj = ref(require('@/assets/home/ywzj_square.png')) const imgSrcYwzj = ref(require('@/assets/home/ywzj_square.png'))
let videoUrl = ref('') let videoUrl = ref('')
@ -900,6 +914,7 @@
getTagList, getTagList,
imgSrcYyzy, imgSrcYyzy,
imgSrcTcfw, imgSrcTcfw,
imgSrcZnsf,
imgSrcKfzj, imgSrcKfzj,
imgSrcYwzj, imgSrcYwzj,
} }

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: Light * @Author: Light
* @Date: 2022-11-18 11:53:43 * @Date: 2022-11-18 11:53:43
* @LastEditors: hisense.wuhongjian * @LastEditors: Light
* @LastEditTime: 2022-11-26 16:30:51 * @LastEditTime: 2022-11-28 16:45:50
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
--> -->
<template> <template>
@ -31,7 +31,7 @@
<div class="title">待申请列表</div> <div class="title">待申请列表</div>
</template> </template>
<template #footer> <template #footer>
<a-button type="primary" @click="apply">一键申请</a-button> <a-button type="primary" @click="showApply">一键申请</a-button>
</template> </template>
</a-list> </a-list>
</div> </div>
@ -134,6 +134,28 @@
></h5-player> ></h5-player>
</div> </div>
</a-modal> </a-modal>
<a-modal
:width="800"
v-model:visible="visibleApply"
title="视频监控申请"
@ok="apply"
@cancel="clear"
>
<p>本次申请的视频监控包含以下{{ showArrApply.length }}是否提交申请</p>
<a-table
:columns="columns"
:data-source="showArrApply"
:pagination="{
pageSize: 5,
}"
>
<template #bodyCell="{ column, text }">
<template v-if="column.dataIndex === 'name'">
<a>{{ text }}</a>
</template>
</template>
</a-table>
</a-modal>
</template> </template>
<script setup> <script setup>
import { import {
@ -158,8 +180,10 @@
const delWacFlag = ref(true) const delWacFlag = ref(true)
const delApply = ref(true) const delApply = ref(true)
const visible = ref(false) const visible = ref(false)
const visibleApply = ref(false)
const instanceId = ref('') const instanceId = ref('')
const showArr = ref({}) const showArr = ref([])
const showArrApply = ref([])
const columns = [ const columns = [
{ {
title: '名称', title: '名称',
@ -193,6 +217,18 @@
}) })
} }
}) })
const showApply = () => {
if (dataList.toBeApplied.length === 0) {
message.warning('待申请列表为空!')
return
}
if (dataList.toBeApplied.length + dataList.requested.length > 10) {
message.warning('最多只能申请10个视频监控!')
return
}
visibleApply.value = true
showArrApply.value = dataList.toBeApplied
}
const delWillApplyCamera = (id) => { const delWillApplyCamera = (id) => {
console.log('撤销===>', id) console.log('撤销===>', id)
if (delWacFlag.value) { if (delWacFlag.value) {
@ -209,10 +245,6 @@
} }
} }
const apply = () => { const apply = () => {
if (dataList.toBeApplied.length === 0) {
message.warning('待申请列表为空!')
return
}
let obj = { let obj = {
arr: [ arr: [
{ {
@ -311,10 +343,13 @@
console.log('清空') console.log('清空')
instanceId.value = '' instanceId.value = ''
showArr.value = [] showArr.value = []
showArrApply.value = []
visible.value = false visible.value = false
visibleApply.value = false
delApply.value = true delApply.value = true
dataList.selectItem = {} dataList.selectItem = {}
showVisible.value = false showVisible.value = false
showVisible.value = false
} }
const init = () => { const init = () => {
willApplyCameraSelect().then((res) => { willApplyCameraSelect().then((res) => {
@ -359,8 +394,8 @@
}) })
} }
mybus.on('selectCamera', (obj) => { mybus.on('selectCamera', (obj) => {
// 10 // 10 + dataList.requested.length
if (dataList.toBeApplied.length + dataList.requested.length >= 10) { if (dataList.toBeApplied.length >= 10) {
message.warning('最多只能申请10个视频监控') message.warning('最多只能申请10个视频监控')
return return
} }