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

This commit is contained in:
chenchenzai 2022-11-21 11:16:51 +08:00
commit cde4f5d82e
6 changed files with 293 additions and 99 deletions

View File

@ -60,6 +60,7 @@
<el-form :inline="true" style="margin-right: 40px;"> <el-form :inline="true" style="margin-right: 40px;">
<!--操作按钮查询--> <!--操作按钮查询-->
<el-form-item> <el-form-item>
<el-button type="primary" @click="getDataList()">{{ $t('query') }}</el-button>
</el-form-item> </el-form-item>
<!--操作按钮重置--> <!--操作按钮重置-->
<el-form-item> <el-form-item>

View File

@ -2,7 +2,7 @@
* @Author: hisense.wuhongjian * @Author: hisense.wuhongjian
* @Date: 2022-05-06 11:12:00 * @Date: 2022-05-06 11:12:00
* @LastEditors: Light * @LastEditors: Light
* @LastEditTime: 2022-11-16 10:21:49 * @LastEditTime: 2022-11-21 10:45:07
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
--> -->
<template> <template>
@ -117,7 +117,7 @@
realName.charCodeAt() realName.charCodeAt()
) )
// //
if (oldValue == '/login' || oldValue == '/') { if (newValue == '/home') {
waterMarkInit(newValue) waterMarkInit(newValue)
} }
changeWaterMark(newValue) changeWaterMark(newValue)
@ -125,7 +125,7 @@
{ immediate: true } { immediate: true }
) )
onMounted(() => { onMounted(() => {
waterMarkInit() // waterMarkInit()
}) })
onBeforeUnmount(() => { onBeforeUnmount(() => {
// 4., // 4.,

View File

@ -2,7 +2,7 @@
* @Author: hisense.wuhongjian * @Author: hisense.wuhongjian
* @Date: 2022-04-20 17:16:35 * @Date: 2022-04-20 17:16:35
* @LastEditors: Light * @LastEditors: Light
* @LastEditTime: 2022-11-18 17:52:05 * @LastEditTime: 2022-11-21 10:51:25
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
*/ */
import request from '@/utils/request' import request from '@/utils/request'
@ -106,6 +106,13 @@ export function getListForPOI(params) {
) )
} }
//西
export function getPlaceType() {
return axios.get(
'http://10.134.135.92:9537/data_service/placeTypes/getPlaceType',
config2
)
}
// 西-- (10.134.135.92:9537) // 西-- (10.134.135.92:9537)
let _cameraUrl = let _cameraUrl =
(_global && (_global &&

View File

@ -2,7 +2,7 @@
* @Author: Light * @Author: Light
* @Date: 2022-11-16 16:46:16 * @Date: 2022-11-16 16:46:16
* @LastEditors: Light * @LastEditors: Light
* @LastEditTime: 2022-11-18 15:35:25 * @LastEditTime: 2022-11-21 10:54:23
* @Description: 政务云资源列表 * @Description: 政务云资源列表
--> -->
<template> <template>

View File

@ -0,0 +1,178 @@
<!--
* @Author: Light
* @Date: 2022-11-18 11:53:43
* @LastEditors: Light
* @LastEditTime: 2022-11-19 17:15:15
* @Description: 告诉大家这是什么
-->
<template>
<div class="infrastructureApplication">
<div class="top">
<a-list size="small" bordered :data-source="dataList.toBeApplied">
<template #renderItem="{ item }">
<a-list-item>
<div class="name">
<a-tooltip>
<template #title>{{ item.channelName }}</template>
{{ item.channelName }}
</a-tooltip>
</div>
<a-button type="link" danger @click="delWillApplyCamera(item.id)">
移出
</a-button>
</a-list-item>
</template>
<template #header>
<div class="title">待申请列表</div>
</template>
<template #footer>
<a-button type="primary">一键申请</a-button>
</template>
</a-list>
</div>
<div class="bottom">
<a-list size="small" bordered :data-source="data">
<template #renderItem="{ item }">
<a-list-item>
<div class="name">
<a-tooltip>
<template #title>{{ item }}</template>
{{ item }}
</a-tooltip>
</div>
<a-button type="link" danger>删除</a-button>
</a-list-item>
</template>
<template #header>
<div class="title">已申请列表</div>
</template>
</a-list>
</div>
</div>
</template>
<script setup>
import {
willApplyCameraSelect,
willApplyCameraBatchInsert,
willApplyCameraBatchDelete,
} from '@/api/home'
import { onBeforeUnmount, reactive, ref } from 'vue'
import { message } from 'ant-design-vue'
import mybus from '@/myplugins/mybus'
const dataList = reactive({ toBeApplied: [], requested: [] })
//
const addWacFlag = ref(true)
const delWacFlag = ref(true)
const delWillApplyCamera = (id) => {
console.log('删除===>', id)
if (delWacFlag.value) {
delWacFlag.value = false
willApplyCameraBatchDelete([id]).then((res) => {
if (res.data.code == 0) {
message.success('移出成功')
} else {
message.warning('移出失败')
}
init()
})
}
}
const init = () => {
willApplyCameraSelect().then((res) => {
if (res.data.code == 0) {
dataList.toBeApplied = res.data.data
delWacFlag.value = true
addWacFlag.value = true
} else {
message.warning('查询失败')
dataList.toBeApplied = []
}
})
}
init()
mybus.on('selectCamera', (obj) => {
// 10
if (dataList.toBeApplied.length + dataList.requested.length > 10) {
message.warning('最多只能申请10个摄像头')
return
}
//
let addFlag = true
dataList.toBeApplied.map((val) => {
if (addFlag && val.channelId == obj.channelId) {
addFlag = false
}
})
dataList.requested.map((val) => {
if (addFlag && val.channelId == obj.channelId) {
addFlag = false
}
})
if (addWacFlag.value) {
if (addFlag) {
addWacFlag.value = false
willApplyCameraBatchInsert([obj]).then((res) => {
if (res.data.code == 0) {
message.success('移入成功')
} else {
message.warning('移入失败')
}
init()
})
} else {
message.warning('已申请该摄像头!')
}
}
})
onBeforeUnmount(() => {
mybus.off('selectCamera')
})
const data = [
'Racing car sprays burning fuel into crowd.',
'Japanese princess to wed commoner.',
'Australian walks 100km after outback crash.',
'Man charged over missing wedding girl.',
'Los Angeles battles huge wildfires.',
'Racing car sprays burning fuel into crowd.',
'Japanese princess to wed commoner.',
'Australian walks 100km after outback crash.',
'Man charged over missing wedding girl.',
'Los Angeles battles huge wildfires.',
]
</script>
<style lang="less" scoped>
.infrastructureApplication {
background: #fff;
position: fixed;
top: 50%;
right: 0.16rem;
margin-top: -3.5rem;
.bottom {
margin-top: 32px;
}
.title {
font-size: 16px;
font-weight: 600;
}
.name {
width: 150px;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
word-break: break-all;
}
:deep(.ant-list-footer) {
display: flex;
justify-content: flex-end;
}
:deep(.ant-list-items) {
height: 2.45rem;
overflow-y: scroll;
}
:deep(.ant-spin-nested-loading) {
height: 2.45rem;
}
}
</style>

View File

@ -205,8 +205,7 @@ import { ElMessage } from 'element-plus'
this.addResourceTomap('videoMap', data) this.addResourceTomap('videoMap', data)
}) })
}, },
methods: { methods: { //
//
handleEnter(){ handleEnter(){
console.log('查询',this.address,this.addressType) console.log('查询',this.address,this.addressType)
if(this.address){ if(this.address){
@ -742,4 +741,13 @@ import { ElMessage } from 'element-plus'
max-width: 2.4rem; max-width: 2.4rem;
} }
} }
.input-with-select{
width: 2.4rem;
svg{
position: relative;
bottom: 0;
right: 0;
}
}
</style> </style>