修改基础设施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

@ -27,7 +27,7 @@
<el-form-item label="名称" prop="name">
<el-input v-model="dataForm.name" placeholder="请输入名称" style="width:90%"></el-input>
</el-form-item>
<el-form-item label="描述" prop="description">
<el-input type="textarea" :rows="3" v-model="dataForm.description" placeholder="请输入描述" style="width:90%">
</el-input>
@ -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: '赋能场景'

View File

@ -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 =
// '<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 = {
// 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 =
'部门数<br/>' +
(_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(() => {

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,8 @@
<!--
* @Author: hisense.liangjunhua
* @Date: 2022-06-23 16:41:49
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-04 17:53:27
* @LastEditors: Light
* @LastEditTime: 2022-10-13 16:40:15
* @Description: 告诉大家这是什么
-->
<template>
@ -32,21 +32,21 @@
import HomeFooter from '@/views/newHome/components/Footer'
</script>
<style lang="less" scoped>
@font-face {
font-family: 'text-typeface';
src: url('~@/assets/newHome/font/text-typeface.otf');
}
@font-face {
font-family: 'num-typeface';
src: url('~@/assets/newHome/font/num-typeface.otf');
}
.newHome {
font-family: text-typeface;
.num {
font-family: num-typeface;
}
}
.resource-aggregation {
background: #fff;
@font-face {
font-family: 'text-typeface';
src: url('~@/assets/newHome/font/text-typeface.otf');
}
@font-face {
font-family: 'num-typeface';
src: url('~@/assets/newHome/font/num-typeface.otf');
}
.newHome {
font-family: text-typeface;
.num {
font-family: num-typeface;
}
}
.resource-aggregation {
background: #fff;
}
</style>