From 78aabf704b0a7114f8399c1b921e9ca7d4d476ab Mon Sep 17 00:00:00 2001 From: a0049873 <79py69t9wb@privaterelay.appleid.com> Date: Thu, 13 Oct 2022 17:07:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9F=BA=E7=A1=80=E8=AE=BE?= =?UTF-8?q?=E6=96=BDBUG=20=20=E4=BB=A5=E5=8F=8A=20=20=E8=83=BD=E5=8A=9B?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E9=87=91=E5=AD=97=E5=A1=94=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../assignedScene/add-update-scene.vue | 12 +- .../components/ResourceAggregation.vue | 237 +++-- front/src/views/home/infrastructurePage.vue | 984 +++++++++--------- front/src/views/newHome/index.vue | 36 +- 4 files changed, 709 insertions(+), 560 deletions(-) diff --git a/back/src/views/modules/ability/assignedScene/add-update-scene.vue b/back/src/views/modules/ability/assignedScene/add-update-scene.vue index 5f1f133e..b518967d 100644 --- a/back/src/views/modules/ability/assignedScene/add-update-scene.vue +++ b/back/src/views/modules/ability/assignedScene/add-update-scene.vue @@ -27,7 +27,7 @@ - + @@ -198,7 +198,7 @@ export default { name: '', applicationArea: '', description: '', - sceneUrl:'', + sceneUrl: '', fuseAttrList: [ { attrType: '使用步骤', @@ -345,10 +345,10 @@ export default { update: 'put' } this.dataForm.fuseResourceList = this.getFuseResourceList() - if (this.imageUrl == '') { - this.$message.error('请上传图片!') - return - } + // if (this.imageUrl == '') { + // this.$message.error('请上传图片!') + // return + // } this.dataForm.fuseAttrList.find(v => v.attrType == '服务图片').attrValue = this.imageUrl || '' const _obj = Object.assign({}, this.dataForm, { type: '赋能场景' diff --git a/front/src/views/abilityStatistics/components/ResourceAggregation.vue b/front/src/views/abilityStatistics/components/ResourceAggregation.vue index 018e14a8..0238d994 100644 --- a/front/src/views/abilityStatistics/components/ResourceAggregation.vue +++ b/front/src/views/abilityStatistics/components/ResourceAggregation.vue @@ -345,90 +345,207 @@ echarts.init(document.getElementById('right')).dispose() let chartDom = document.getElementById('right') 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 = + // '部门数
' + + // (_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 = { + // title: { + // text: 'ECharts 入门示例' + // }, tooltip: { trigger: 'item', 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() dom.value = '部门数
' + (_obj.fanwei || '--') + ' : ' + (_obj.value || _obj.value === 0 ? _obj.value : '--') + - '项' - console.log('name', info.data) + '个' + console.log('name', info) return dom.value }, }, - grid: { - height: '65%', - width: '45%', - left: '20%', - bottom: 30, + legend: { + data: [], }, xAxis: { - show: false, - type: 'category', - data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], - }, - yAxis: { - show: false, - type: 'value', - min: 0, - max: 20, + data: [], }, + yAxis: {}, 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', - }, - }, + name: '', + type: 'bar', + barGap: '-100%', itemStyle: { - borderColor: '#fff', - borderWidth: 1, - }, - emphasis: { - label: { - fontSize: 20, + normal: { + color: '#C1232B', }, }, - 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) } onMounted(() => { diff --git a/front/src/views/home/infrastructurePage.vue b/front/src/views/home/infrastructurePage.vue index ba77c2e5..1bc8a770 100644 --- a/front/src/views/home/infrastructurePage.vue +++ b/front/src/views/home/infrastructurePage.vue @@ -331,10 +331,7 @@ - + @@ -551,7 +548,10 @@ >
-
+
@@ -635,17 +635,33 @@ style="width: 100%; height: 100%; position: relative" > -
-
+
+
{{ userInfo.usernameShow }}
-
+
{{ userInfo.realNameShow }}
-
+
{{ userInfo.usernameShow }}
-
+
{{ userInfo.realNameShow }}

@@ -899,12 +915,12 @@ tabClick(0, '视频资源') } else { // 默认选中 - if(formPage && formPage == 'noticePage') { + if (formPage && formPage == 'noticePage') { tabClick(0, '城市云脑会客厅') roomYuyue.value = false roomResult.value = true onSearch() - }else { + } else { tabClick(0, '政务云资源') } } @@ -958,7 +974,7 @@ let clickList = ref([]) //存储点击的tab if (!isXiHaiAn) { tabList.value.push({ - title: '视频标签', + title: '政务云资源', content: [], }) } @@ -1383,6 +1399,7 @@ '点击tab================>', indexFather, name, + clickList.value, clickList.value[indexFather] ) @@ -1397,7 +1414,7 @@ tabList.value[1].title = '视频标签' } selectType.value = '视频资源' - console.log('444------------>', 444); + console.log('444------------>', 444) } else if (name == '政务云资源') { room.value = true tableHeight.value = 600 @@ -1579,8 +1596,11 @@ clickList.value[1].content = [] } 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]) { tabList.value[1].title = '' tabList.value[1].content = [] @@ -1814,22 +1834,32 @@ // 西海岸-视频资源loading const loadingCamera = ref(false) const getCamera = (flag, str) => { - loadingCamera.value = true; + loadingCamera.value = true if (flag) { mapSearchParam.value.cameraName = str } console.log('初始化调用') - console.log('不选左侧树的时候不调用接口', mapSearchParam.value) + console.log( + '不选左侧树的时候不调用接口', + mapSearchParam.value, + selectType.value + ) if (!whoShow1.value.itShowXiHaiAn) { - getCameraByParentId(mapSearchParam.value).then((res) => { - console.log('res--查询摄像头---------->', res); - loadingCamera.value = false; - dataSource.value = res.data.data - pagination.value.total = res.data.count - }).catch(err => { - loadingCamera.value = false; - message.error(err) - }) + if (selectType.value == '视频资源') { + getCameraByParentId(mapSearchParam.value) + .then((res) => { + console.log('res--查询摄像头---------->', res) + loadingCamera.value = false + dataSource.value = res.data.data + pagination.value.total = res.data.count + }) + .catch((err) => { + loadingCamera.value = false + message.error(err) + }) + } else { + loadingCamera.value = false + } } else { let params = { regionId: @@ -1866,15 +1896,17 @@ } } } - getCameraByCondition(params).then((res) => { - console.log('res--查询摄像头---------->', res); - loadingCamera.value = false; - dataSource.value = res.data.data - pagination.value.total = res.data.count - }).catch(err => { - loadingCamera.value = false; - message.error(err) - }) + getCameraByCondition(params) + .then((res) => { + console.log('res--查询摄像头---------->', res) + loadingCamera.value = false + dataSource.value = res.data.data + pagination.value.total = res.data.count + }) + .catch((err) => { + loadingCamera.value = false + message.error(err) + }) } } defineExpose({ @@ -1884,7 +1916,7 @@ const addShoppingCart = () => { if (selectedList.value.length > 0) { let _arr = [] - selectedList.value.map(v => { + selectedList.value.map((v) => { _arr.push({ delFlag: '0', resourceId: v.idtCameraChannel, @@ -1892,7 +1924,7 @@ }) }) xhaAddCart(_arr).then((res) => { - if(res.data.code !== 0) { + if (res.data.code !== 0) { return message.error(res.data.msg) } message.success('添加申购车成功!') @@ -1929,7 +1961,7 @@ }, ]) // 西海岸--状态展示 - if(isXiHaiAn) { + if (isXiHaiAn) { columns.value.splice(2, 0, { title: '状态', dataIndex: 'status', @@ -2085,236 +2117,104 @@ } diff --git a/front/src/views/newHome/index.vue b/front/src/views/newHome/index.vue index 3b524c7e..fc959896 100644 --- a/front/src/views/newHome/index.vue +++ b/front/src/views/newHome/index.vue @@ -1,8 +1,8 @@