修改基础设施BUG 以及 能力统计金字塔图

This commit is contained in:
a0049873 2022-10-13 17:07:51 +08:00
parent 75299e8648
commit 78aabf704b
4 changed files with 709 additions and 560 deletions

View File

@ -345,10 +345,10 @@ export default {
update: 'put' update: 'put'
} }
this.dataForm.fuseResourceList = this.getFuseResourceList() this.dataForm.fuseResourceList = this.getFuseResourceList()
if (this.imageUrl == '') { // if (this.imageUrl == '') {
this.$message.error('请上传图片!') // this.$message.error('')
return // return
} // }
this.dataForm.fuseAttrList.find(v => v.attrType == '服务图片').attrValue = this.imageUrl || '' this.dataForm.fuseAttrList.find(v => v.attrType == '服务图片').attrValue = this.imageUrl || ''
const _obj = Object.assign({}, this.dataForm, { const _obj = Object.assign({}, this.dataForm, {
type: '赋能场景' type: '赋能场景'

View File

@ -345,90 +345,207 @@
echarts.init(document.getElementById('right')).dispose() echarts.init(document.getElementById('right')).dispose()
let chartDom = document.getElementById('right') let chartDom = document.getElementById('right')
let myChart = echarts.init(chartDom) let myChart = echarts.init(chartDom)
// let option = {
// tooltip: {
// trigger: 'item',
// formatter: function (info) {
// let _obj = dataList.find((v) => v.fanwei == info.data.name) || {}
// let dom = ref()
// dom.value =
// '<br/>' +
// (_obj.fanwei || '--') +
// ' : ' +
// (_obj.value || _obj.value === 0 ? _obj.value : '--') +
// ''
// console.log('name', info.data)
// return dom.value
// },
// },
// grid: {
// height: '65%',
// width: '45%',
// left: '20%',
// bottom: 30,
// },
// xAxis: {
// show: false,
// type: 'category',
// data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
// },
// yAxis: {
// show: false,
// type: 'value',
// min: 0,
// max: 20,
// },
// series: [
// {
// name: '',
// type: 'funnel',
// left: '28%',
// right: '35%',
// top: '15%',
// bottom: '10%',
// minSize: '0%',
// maxSize: '100%',
// sort: 'ascending',
// label: {
// show: true,
// formatter: function (info) {
// let _obj = dataList.find((v) => v.fanwei == info.data.name) || {}
// let dom = ref()
// dom.value =
// (_obj.fanwei || '--') +
// ' : ' +
// (_obj.value || _obj.value === 0 ? _obj.value : '--') +
// ''
// console.log('name', info.data)
// return dom.value
// },
// rich: {
// b: {
// fontSize: 14,
// },
// },
// },
// labelLine: {
// length: 40,
// lineStyle: {
// width: 1,
// type: 'solid',
// },
// },
// itemStyle: {
// borderColor: '#fff',
// borderWidth: 1,
// },
// emphasis: {
// label: {
// fontSize: 20,
// },
// },
// data: chartData,
// },
// ],
// }
let option = { let option = {
// title: {
// text: 'ECharts '
// },
tooltip: { tooltip: {
trigger: 'item', trigger: 'item',
formatter: function (info) { formatter: function (info) {
let _obj = dataList.find((v) => v.fanwei == info.data.name) || {} let _obj = dataList.find((v) => v.fanwei == info.name) || {}
let dom = ref() let dom = ref()
dom.value = dom.value =
'部门数<br/>' + '部门数<br/>' +
(_obj.fanwei || '--') + (_obj.fanwei || '--') +
' : ' + ' : ' +
(_obj.value || _obj.value === 0 ? _obj.value : '--') + (_obj.value || _obj.value === 0 ? _obj.value : '--') +
'项' ''
console.log('name', info.data) console.log('name', info)
return dom.value return dom.value
}, },
}, },
grid: { legend: {
height: '65%', data: [],
width: '45%',
left: '20%',
bottom: 30,
}, },
xAxis: { xAxis: {
show: false, data: [],
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
},
yAxis: {
show: false,
type: 'value',
min: 0,
max: 20,
}, },
yAxis: {},
series: [ series: [
{ {
name: '部门数', name: '',
type: 'funnel', type: 'bar',
left: '28%', barGap: '-100%',
right: '35%',
top: '15%',
bottom: '10%',
minSize: '0%',
maxSize: '100%',
sort: 'ascending',
label: {
show: true,
formatter: function (info) {
let _obj = dataList.find((v) => v.fanwei == info.data.name) || {}
let dom = ref()
dom.value =
(_obj.fanwei || '--') +
' : ' +
(_obj.value || _obj.value === 0 ? _obj.value : '--') +
'项'
console.log('name', info.data)
return dom.value
},
rich: {
b: {
fontSize: 14,
},
},
},
labelLine: {
length: 40,
lineStyle: {
width: 1,
type: 'solid',
},
},
itemStyle: { itemStyle: {
borderColor: '#fff', normal: {
borderWidth: 1, color: '#C1232B',
},
emphasis: {
label: {
fontSize: 20,
}, },
}, },
data: chartData, // data: [5, 20, 36, 10, 10, 20]
data: [],
},
{
name: '',
type: 'bar',
barGap: '-100%',
itemStyle: {
normal: {
color: '#B5C334',
},
},
// data: [5, 20, 36, 10, 10, 20]
data: [],
},
{
name: '',
type: 'bar',
barGap: '-100%',
itemStyle: {
normal: {
color: '#FCCE10',
},
},
// data: [5, 20, 36, 10, 10, 20]
data: [],
},
{
name: '',
type: 'bar',
barGap: '-100%',
itemStyle: {
normal: {
color: '#E87C25',
},
},
// data: [5, 20, 36, 10, 10, 20]
data: [],
},
{
name: '',
type: 'bar',
barGap: '-100%',
itemStyle: {
normal: {
color: '#27727B',
},
},
// data: [5, 20, 36, 10, 10, 20]
data: [],
},
{
name: '',
type: 'bar',
barGap: '-100%',
itemStyle: {
normal: {
color: '#FE8463',
},
},
// data: [5, 20, 36, 10, 10, 20]
data: [],
}, },
], ],
} }
option.legend.data = []
option.xAxis.data = []
dataList.map((val, index) => {
// option.legend.data.push(val.fanwei)
option.xAxis.data.push(val.fanwei)
option.series[index].name = val.fanwei
let arr = []
for (let i = 0; i < 5; i++) {
if (i == index) {
arr.push(val.value)
} else {
arr.push(0)
}
}
option.series[index].data = arr
})
option && myChart.setOption(option) option && myChart.setOption(option)
} }
onMounted(() => { onMounted(() => {

View File

@ -331,10 +331,7 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item <a-form-item name="phone" label="联系电话">
name="phone"
label="联系电话"
>
<a-input v-model:value="formState.phone" style="width: 72%" /> <a-input v-model:value="formState.phone" style="width: 72%" />
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -551,7 +548,10 @@
> >
<template #footer></template> <template #footer></template>
<div style="width: 100%; display: flex; justify-content: center"> <div style="width: 100%; display: flex; justify-content: center">
<div style="width: 100%; height: 100%; position: relative" v-show="isXiHaiAn"> <div
style="width: 100%; height: 100%; position: relative"
v-show="isXiHaiAn"
>
<!-- 西海岸--预览视频--遮罩 todo--> <!-- 西海岸--预览视频--遮罩 todo-->
<div class="video-cover" @click="videoShowMsg"></div> <div class="video-cover" @click="videoShowMsg"></div>
<div class="waterMark waterMark-left-top"> <div class="waterMark waterMark-left-top">
@ -635,17 +635,33 @@
style="width: 100%; height: 100%; position: relative" style="width: 100%; height: 100%; position: relative"
> >
<!-- 批量预览视频--遮罩 --> <!-- 批量预览视频--遮罩 -->
<div class="batch-video-cover" @click="videoShowMsg(index)" v-show="isXiHaiAn"></div> <div
<div class="batch-waterMark batch-waterMark-left-top" v-show="isXiHaiAn"> class="batch-video-cover"
@click="videoShowMsg(index)"
v-show="isXiHaiAn"
></div>
<div
class="batch-waterMark batch-waterMark-left-top"
v-show="isXiHaiAn"
>
{{ userInfo.usernameShow }} {{ userInfo.usernameShow }}
</div> </div>
<div class="batch-waterMark batch-waterMark-right-top" v-show="isXiHaiAn"> <div
class="batch-waterMark batch-waterMark-right-top"
v-show="isXiHaiAn"
>
{{ userInfo.realNameShow }} {{ userInfo.realNameShow }}
</div> </div>
<div class="batch-waterMark batch-waterMark-left-bottom" v-show="isXiHaiAn"> <div
class="batch-waterMark batch-waterMark-left-bottom"
v-show="isXiHaiAn"
>
{{ userInfo.usernameShow }} {{ userInfo.usernameShow }}
</div> </div>
<div class="batch-waterMark batch-waterMark-right-bottom" v-show="isXiHaiAn"> <div
class="batch-waterMark batch-waterMark-right-bottom"
v-show="isXiHaiAn"
>
{{ userInfo.realNameShow }} {{ userInfo.realNameShow }}
</div> </div>
<p></p> <p></p>
@ -958,7 +974,7 @@
let clickList = ref([]) //tab let clickList = ref([]) //tab
if (!isXiHaiAn) { if (!isXiHaiAn) {
tabList.value.push({ tabList.value.push({
title: '视频标签', title: '政务云资源',
content: [], content: [],
}) })
} }
@ -1383,6 +1399,7 @@
'点击tab================>', '点击tab================>',
indexFather, indexFather,
name, name,
clickList.value,
clickList.value[indexFather] clickList.value[indexFather]
) )
@ -1397,7 +1414,7 @@
tabList.value[1].title = '视频标签' tabList.value[1].title = '视频标签'
} }
selectType.value = '视频资源' selectType.value = '视频资源'
console.log('444------------>', 444); console.log('444------------>', 444)
} else if (name == '政务云资源') { } else if (name == '政务云资源') {
room.value = true room.value = true
tableHeight.value = 600 tableHeight.value = 600
@ -1579,7 +1596,10 @@
clickList.value[1].content = [] clickList.value[1].content = []
} }
clickList.value[indexFather].content[0] = name clickList.value[indexFather].content[0] = name
console.log('clickList.value[indexFather].content[0]------------>', clickList.value[indexFather].content[0]); console.log(
'clickList.value[indexFather].content[0]------------>',
clickList.value[indexFather].content[0]
)
if (tabList.value[1]) { if (tabList.value[1]) {
tabList.value[1].title = '' tabList.value[1].title = ''
@ -1814,22 +1834,32 @@
// 西-loading // 西-loading
const loadingCamera = ref(false) const loadingCamera = ref(false)
const getCamera = (flag, str) => { const getCamera = (flag, str) => {
loadingCamera.value = true; loadingCamera.value = true
if (flag) { if (flag) {
mapSearchParam.value.cameraName = str mapSearchParam.value.cameraName = str
} }
console.log('初始化调用') console.log('初始化调用')
console.log('不选左侧树的时候不调用接口', mapSearchParam.value) console.log(
'不选左侧树的时候不调用接口',
mapSearchParam.value,
selectType.value
)
if (!whoShow1.value.itShowXiHaiAn) { if (!whoShow1.value.itShowXiHaiAn) {
getCameraByParentId(mapSearchParam.value).then((res) => { if (selectType.value == '视频资源') {
console.log('res--查询摄像头---------->', res); getCameraByParentId(mapSearchParam.value)
loadingCamera.value = false; .then((res) => {
console.log('res--查询摄像头---------->', res)
loadingCamera.value = false
dataSource.value = res.data.data dataSource.value = res.data.data
pagination.value.total = res.data.count pagination.value.total = res.data.count
}).catch(err => { })
loadingCamera.value = false; .catch((err) => {
loadingCamera.value = false
message.error(err) message.error(err)
}) })
} else {
loadingCamera.value = false
}
} else { } else {
let params = { let params = {
regionId: regionId:
@ -1866,13 +1896,15 @@
} }
} }
} }
getCameraByCondition(params).then((res) => { getCameraByCondition(params)
console.log('res--查询摄像头---------->', res); .then((res) => {
loadingCamera.value = false; console.log('res--查询摄像头---------->', res)
loadingCamera.value = false
dataSource.value = res.data.data dataSource.value = res.data.data
pagination.value.total = res.data.count pagination.value.total = res.data.count
}).catch(err => { })
loadingCamera.value = false; .catch((err) => {
loadingCamera.value = false
message.error(err) message.error(err)
}) })
} }
@ -1884,7 +1916,7 @@
const addShoppingCart = () => { const addShoppingCart = () => {
if (selectedList.value.length > 0) { if (selectedList.value.length > 0) {
let _arr = [] let _arr = []
selectedList.value.map(v => { selectedList.value.map((v) => {
_arr.push({ _arr.push({
delFlag: '0', delFlag: '0',
resourceId: v.idtCameraChannel, resourceId: v.idtCameraChannel,

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-23 16:41:49 * @Date: 2022-06-23 16:41:49
* @LastEditors: hisense.liangjunhua * @LastEditors: Light
* @LastEditTime: 2022-07-04 17:53:27 * @LastEditTime: 2022-10-13 16:40:15
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
--> -->
<template> <template>