Compare commits

...

2 Commits

Author SHA1 Message Date
a0049873 9e609538f1 Merge branch 'hi-ucs-dev' of http://15.2.21.221:3000/wuhongjian/hi-ucs into hi-ucs-dev
# Conflicts:
#	front/src/views/personalCenter/components/MyApply.vue
2022-07-01 14:32:40 +08:00
a0049873 4f11e078b8 新增能力集市 和详情页申请功能 摄像头申请功能完善 2022-07-01 14:31:46 +08:00
8 changed files with 188 additions and 118 deletions

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua
* @Date: 2022-06-08 11:56:28
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-13 15:29:27
* @LastEditTime: 2022-07-01 14:16:18
* @Description: 算法详情页头部
-->
<template>
@ -83,12 +83,28 @@
//
function toView() {
// window.open(newpage.href, '_blank')
console.log('一键申请===================>', props.dataList)
localStorage.setItem(
'applyList',
JSON.stringify([
{
arr: [
{
delFlag: props.dataList.delFlag,
description: props.dataList.description,
resourceId: props.dataList.id,
resourceName: props.dataList.name,
time: props.dataList.createDate,
type: props.dataList.type,
},
],
deptId: props.dataList.deptId,
deptName: props.dataList.deptName,
},
])
)
router.push({
path: '/apply',
query: {
name: props.dataList.name,
resourceId: [props.dataList.id],
},
})
}
const componentType = ref('')

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua
* @Date: 2022-06-08 11:56:28
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-14 11:31:12
* @LastEditTime: 2022-07-01 14:20:52
* @Description: 算法详情页头部
-->
<template>
@ -40,14 +40,14 @@
</a-tooltip>
</div>
<div class="bottom" v-if="props.dataList.id">
<!-- <a-button type="primary" @click="toView()">
<a-button type="primary" @click="toView()">
<template #icon><form-outlined /></template>
申请使用
</a-button>
<a-button type="primary" @click="addShoppingCart()">
<template #icon><shopping-cart-outlined /></template>
加入申购车
</a-button> -->
</a-button>
<a-button type="primary" @click="goTOCollection()">收藏</a-button>
</div>
</div>
@ -55,42 +55,58 @@
</div>
</template>
<script setup>
// import { ShoppingCartOutlined } from '@ant-design/icons-vue'
import { ShoppingCartOutlined } from '@ant-design/icons-vue'
import { defineProps, ref, watch } from 'vue'
import { scInsert } from '@/api/personalCenter'
// import { sgcInsert } from '@/api/home'
// import { useRouter } from 'vue-router'
// import mybus from '@/myplugins/mybus'
import { sgcInsert } from '@/api/home'
import { useRouter } from 'vue-router'
import mybus from '@/myplugins/mybus'
import { message } from 'ant-design-vue'
const props = defineProps({
dataList: { type: Object, default: null },
})
// const router = useRouter()
const router = useRouter()
const businessArea = ref('')
// //
// const addShoppingCart = () => {
// console.log('==================>', props.dataList)
// sgcInsert({
// delFlag: '0',
// resourceId: props.dataList.id,
// // userId: userId.value,
// }).then((res) => {
// console.log(res)
// message.success('')
// mybus.emit('getSgcNum')
// })
// }
const addShoppingCart = () => {
console.log('加入申购车==================>', props.dataList)
sgcInsert({
delFlag: '0',
resourceId: props.dataList.id,
// userId: userId.value,
}).then((res) => {
console.log(res)
message.success('添加申购车成功!')
mybus.emit('getSgcNum')
})
}
// //
// function toView() {
// // window.open(newpage.href, '_blank')
// router.push({
// path: '/apply',
// query: {
// name: props.dataList.name,
// resourceId: [props.dataList.id],
// },
// })
// }
function toView() {
// window.open(newpage.href, '_blank')
console.log('一键申请===================>', props.dataList)
localStorage.setItem(
'applyList',
JSON.stringify([
{
arr: [
{
delFlag: props.dataList.delFlag,
description: props.dataList.description,
resourceId: props.dataList.id,
resourceName: props.dataList.name,
time: props.dataList.createDate,
type: props.dataList.type,
},
],
deptId: props.dataList.deptId,
deptName: props.dataList.deptName,
},
])
)
router.push({
path: '/apply',
})
}
//
const goTOCollection = () => {
console.log('收藏===================》', props.dataList)

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua
* @Date: 2022-06-08 11:56:28
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-14 11:31:12
* @LastEditTime: 2022-07-01 14:21:04
* @Description: 开发组件详情页头部
-->
<template>
@ -83,12 +83,28 @@
//
function toView() {
// window.open(newpage.href, '_blank')
console.log('一键申请===================>', props.dataList)
localStorage.setItem(
'applyList',
JSON.stringify([
{
arr: [
{
delFlag: props.dataList.delFlag,
description: props.dataList.description,
resourceId: props.dataList.id,
resourceName: props.dataList.name,
time: props.dataList.createDate,
type: props.dataList.type,
},
],
deptId: props.dataList.deptId,
deptName: props.dataList.deptName,
},
])
)
router.push({
path: '/apply',
query: {
name: props.dataList.name,
resourceId: [props.dataList.id],
},
})
}
//

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua
* @Date: 2022-06-08 11:56:28
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-14 11:31:12
* @LastEditTime: 2022-07-01 14:21:10
* @Description: 算法详情页头部
-->
<template>
@ -83,12 +83,28 @@
//
function toView() {
// window.open(newpage.href, '_blank')
console.log('一键申请===================>', props.dataList)
localStorage.setItem(
'applyList',
JSON.stringify([
{
arr: [
{
delFlag: props.dataList.delFlag,
description: props.dataList.description,
resourceId: props.dataList.id,
resourceName: props.dataList.name,
time: props.dataList.createDate,
type: props.dataList.type,
},
],
deptId: props.dataList.deptId,
deptName: props.dataList.deptName,
},
])
)
router.push({
path: '/apply',
query: {
name: props.dataList.name,
resourceId: [props.dataList.id],
},
})
}
//

View File

@ -387,7 +387,9 @@
resourceName: item.resourceName,
})
console.log(item.id)
ids.push(item.id)
if (item.id) {
ids.push(item.id)
}
} else {
let obj = {}
Object.assign(obj, formName)

View File

@ -182,21 +182,15 @@
>
免费试用
</a-button> -->
<!-- <a-button
<a-button
type="primary"
@click="toView('apply', item)"
v-show="
cardType !== '数据资源' &&
!(
cardType == '组件服务' &&
findComponentName(item, '智能算法')
)
"
v-show="cardType == '组件服务'"
>
{{
item.shareCondition == '免批申请' ? '免批申请' : '立即申请'
}}
</a-button> -->
</a-button>
</div>
<div class="right" v-else>
<a-button type="primary" @click="openVideo(item)">
@ -382,13 +376,28 @@
)
} else {
if (type === 'apply') {
// window.open(newpage.href, '_blank')
console.log('一键申请===================>', item)
localStorage.setItem(
'applyList',
JSON.stringify([
{
arr: [
{
delFlag: item.delFlag,
description: item.description,
resourceId: item.id,
resourceName: item.name,
time: item.createDate,
type: item.type,
},
],
deptId: item.deptId,
deptName: item.deptName,
},
])
)
router.push({
path: '/apply',
query: {
name: [item.name],
resourceId: [item.id],
},
})
} else {
console.log(

View File

@ -76,8 +76,11 @@
</p>
</div>
<div v-else>
<p class="content-body-content-son">
<span v-if="item.name === '申请摄像头列表'">
<p
class="content-body-content-son"
v-if="item.name === '申请摄像头列表'"
>
<span>
申请结果{{
'列表地址:' +
backUrl +
@ -89,7 +92,27 @@
'/resource/hls/getHls/?channelId='
}}
</span>
<span v-else>申请结果{{ item.comment || '暂无' }}</span>
<a-button
type="primary"
size="small"
@click="
copyComment(
'列表地址:' +
backUrl +
'resource/getApplyCameraList/' +
item.processInstanceId +
';' +
'视频流地址:' +
backUrl +
'/resource/hls/getHls/?channelId='
)
"
>
复制
</a-button>
</p>
<p class="content-body-content-son" v-else>
<span>申请结果{{ item.comment || '暂无' }}</span>
<a-button
type="primary"
size="small"
@ -289,50 +312,7 @@
dataIndex: 'name',
},
])
const xVideoList = ref([
{
name: '111',
},
{
name: '222',
},
{
name: '111',
},
{
name: '222',
},
{
name: '111',
},
{
name: '222',
},
{
name: '111',
},
{
name: '222',
},
{
name: '111',
},
{
name: '222',
},
{
name: '111',
},
{
name: '222',
},
{
name: '111',
},
{
name: '222',
},
])
const xVideoList = ref([])
function tabqiehuan(item, index) {
// debugger
tabIndex.value = index
@ -375,9 +355,14 @@
resourceId.value = item.resourceId
}
const showVideoList = (item) => {
// getApplyCameraList(item.processInstanceId).then(res=>{
// console.log('res', res)
// })
console.log('显示列表', item)
getApplyCameraList(item.processInstanceId).then((res) => {
console.log('res', res)
xVideoList.value = []
res.data.data.map((val) => {
xVideoList.value.push({ name: val.channelName, key: val.channelId })
})
})
videoVisible.value = true
}
const copyComment = (data) => {

View File

@ -233,21 +233,30 @@
// scInsert
// )
let scArr = []
if (checkedList.value.length === 0) {
if (checkedListAbility.value.length === 0) {
message.error('请选择需要收藏的数据')
} else {
list.value.forEach((val) => {
if (checkedList.value.indexOf(val.deptId) !== -1) {
if (val.delFlag == 0) {
scArr.push({ id: val.id })
}
if (val.children) {
val.children.map((item) => {
if (item.resourceId == '8888888880000000001') {
message.warning('摄像头无法添加收藏!')
} else {
if (
checkedListAbility.value.indexOf(item.id) > -1 &&
item.delFlag == 0
) {
scArr.push({ resourceId: item.resourceId })
}
}
})
}
})
if (scArr.length > 0) {
scInsert(scArr).then((res) => {
if (res.data.code === 0) {
message.success('收藏成功')
checkedList.value = []
clean()
}
})
} else {
@ -373,6 +382,7 @@
pageNum.value = '1'
pageSize.value = '99999'
checkedList.value = []
checkedListAbility.value = []
checkedListAll.value = []
checkAll.value = false
showKey.value++
@ -631,11 +641,11 @@
}
//
const delList = () => {
if (checkedList.value.length == 0) {
if (checkedListAbility.value.length == 0) {
message.error('请先选择需要操作的数据!')
} else {
sgcDel({
ids: checkedList.value,
ids: checkedListAbility.value,
}).then((res) => {
if (res.data.msg === 'success') {
message.success('删除成功')