修改基础设施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-form-item label="名称" prop="name">
<el-input v-model="dataForm.name" placeholder="请输入名称" style="width:90%"></el-input> <el-input v-model="dataForm.name" placeholder="请输入名称" style="width:90%"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="描述" prop="description"> <el-form-item label="描述" prop="description">
<el-input type="textarea" :rows="3" v-model="dataForm.description" placeholder="请输入描述" style="width:90%"> <el-input type="textarea" :rows="3" v-model="dataForm.description" placeholder="请输入描述" style="width:90%">
</el-input> </el-input>
@ -198,7 +198,7 @@ export default {
name: '', name: '',
applicationArea: '', applicationArea: '',
description: '', description: '',
sceneUrl:'', sceneUrl: '',
fuseAttrList: [ fuseAttrList: [
{ {
attrType: '使用步骤', attrType: '使用步骤',
@ -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(() => {

File diff suppressed because it is too large Load Diff

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>
@ -32,21 +32,21 @@
import HomeFooter from '@/views/newHome/components/Footer' import HomeFooter from '@/views/newHome/components/Footer'
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
@font-face { @font-face {
font-family: 'text-typeface'; font-family: 'text-typeface';
src: url('~@/assets/newHome/font/text-typeface.otf'); src: url('~@/assets/newHome/font/text-typeface.otf');
} }
@font-face { @font-face {
font-family: 'num-typeface'; font-family: 'num-typeface';
src: url('~@/assets/newHome/font/num-typeface.otf'); src: url('~@/assets/newHome/font/num-typeface.otf');
} }
.newHome { .newHome {
font-family: text-typeface; font-family: text-typeface;
.num { .num {
font-family: num-typeface; font-family: num-typeface;
}
}
.resource-aggregation {
background: #fff;
} }
}
.resource-aggregation {
background: #fff;
}
</style> </style>