西海岸需求开发
This commit is contained in:
parent
089716c2a8
commit
56e11a088e
|
@ -46,11 +46,15 @@
|
||||||
LeftCircleOutlined,
|
LeftCircleOutlined,
|
||||||
RightCircleOutlined,
|
RightCircleOutlined,
|
||||||
} from '@ant-design/icons-vue'
|
} from '@ant-design/icons-vue'
|
||||||
import { useRouter } from 'vue-router'
|
// import { useRouter } from 'vue-router'
|
||||||
import H5Player from '@/views/home/components/H5Player.vue'
|
import H5Player from '@/views/home/components/H5Player.vue'
|
||||||
import mybus from '@/myplugins/mybus'
|
import mybus from '@/myplugins/mybus'
|
||||||
|
import { message } from 'ant-design-vue'
|
||||||
import { getStreamByChannelCode } from '@/api/videoSurveillance'
|
import { getStreamByChannelCode } from '@/api/videoSurveillance'
|
||||||
import {getCameraLiveStream} from '@/api/file'
|
import {getCameraLiveStream} from '@/api/file'
|
||||||
|
import {willApplyCameraSelect,
|
||||||
|
getApplyCameraListXha,
|
||||||
|
} from '@/api/home'
|
||||||
export default {
|
export default {
|
||||||
name: '',
|
name: '',
|
||||||
components: {
|
components: {
|
||||||
|
@ -81,7 +85,7 @@
|
||||||
videoStream: '',
|
videoStream: '',
|
||||||
videoUrl:'', //视频预览url
|
videoUrl:'', //视频预览url
|
||||||
defaultIndex:0,//默认显示列表中的对一个
|
defaultIndex:0,//默认显示列表中的对一个
|
||||||
router:useRouter()
|
// router:useRouter()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -94,13 +98,59 @@
|
||||||
},
|
},
|
||||||
//立即申请
|
//立即申请
|
||||||
applyNow(item){
|
applyNow(item){
|
||||||
console.log('applyNowapplyNow',item);
|
getApplyCameraListXha().then(res => {
|
||||||
//跳转至申请页面
|
let flag = true
|
||||||
this.router.push({
|
if (res.data.code == 0) {
|
||||||
path: '/apply',
|
res.data.data.map((val) => {
|
||||||
query: {
|
val.cameraInfo = JSON.parse(val.cameraInfo)
|
||||||
|
console.log('applyNowapplyNow',val.cameraInfo);
|
||||||
|
if(flag && val.cameraInfo.channelId == item.channelId){
|
||||||
|
flag = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
if(flag){
|
||||||
|
willApplyCameraSelect().then(res => {
|
||||||
|
if (res.data.code == 0) {
|
||||||
|
res.data.data.map(val => {
|
||||||
|
if(item.channelId == val.channelId){
|
||||||
|
item.id = val.id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
let obj = {
|
||||||
|
arr: [
|
||||||
|
{
|
||||||
|
checked: true,
|
||||||
|
delFlag: 0,
|
||||||
|
id: '1593084734789996545',
|
||||||
|
idtCameraChannel: '790582098133127168',
|
||||||
|
loading: false,
|
||||||
|
note1: '',
|
||||||
|
resourceId: '1522550195055828996',
|
||||||
|
resourceName: '摄像头列表',
|
||||||
|
type: '基础设施',
|
||||||
},
|
},
|
||||||
|
],
|
||||||
|
deptName: '西海岸新区工业和信息化局',
|
||||||
|
deptId: '732560225344761856',
|
||||||
|
}
|
||||||
|
item.type = '基础设施'
|
||||||
|
item.delFlag = 0
|
||||||
|
item.resourceId = item.channelId
|
||||||
|
item.resourceName = item.channelName
|
||||||
|
obj.arr[0].note1 = JSON.stringify([item])
|
||||||
|
if (obj.arr.length > 0) {
|
||||||
|
localStorage.setItem('applyList', JSON.stringify([obj]))
|
||||||
|
console.log('applyNowapplyNowobj',obj);
|
||||||
|
this.$router.push({
|
||||||
|
path: '/apply',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
message.warning('该摄像头已申请!')
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//加入申购车
|
//加入申购车
|
||||||
|
|
Loading…
Reference in New Issue