产出品管理页面调整

This commit is contained in:
2090205686@qq.com 2025-05-22 15:40:33 +08:00
parent 79ac695e43
commit f62526a22b
4 changed files with 111 additions and 24 deletions

View File

@ -33,10 +33,16 @@ export default {
type: Boolean,
default: false,
},
//
showMarkPoint: {
type: Boolean,
default: false,
},
//
isHorizontal: {
type: Boolean,
default: false,
},
},
emits: ['click'],
setup(props, { emit }) {
@ -67,10 +73,6 @@ export default {
type: 'value',
},
series: [],
isHorizontal: {
type: Boolean,
default: false,
},
});
watchEffect(() => {
@ -108,8 +110,9 @@ export default {
option.series = props.isSeries && option.series.length > 0 ? option.series : seriesData;
if (props.isHorizontal) {
option.yAxis.data = xAxisData;
} else {
option.xAxis.data = [];
} else {
option.xAxis.data = xAxisData;
}
console.log(option);
setOptions(option);

View File

@ -11,8 +11,6 @@
.custom-tooltip-container{
border-radius: 8px !important;
padding: 6px 16px 6px 8px !important;
background-color: rgba(0,0,0,0.7) !important;
backdrop-filter: blur(8px) !important;
& span{
width: 8px !important;

View File

@ -16,6 +16,15 @@ const props = defineProps({
},
});
let values = reactive([]);
const getValue = (dataList) => {
let arr = [];
for (let i = 0; i < dataList.length; i++) {
arr.push(dataList[i].value);
}
return arr;
};
const state = reactive({
data: [],
option: {
@ -45,10 +54,10 @@ const state = reactive({
extraCssText: 'backdrop-filter: blur(8px);',
},
barStyle: {
barWidth: 10,
barWidth: 14,
itemStyle: {
borderWidth: 10,
borderRadius: [8, 8, 8, 8], //
borderWidth: 14,
borderRadius: [10, 10, 10, 10], //
},
color: {
type: 'linear',
@ -86,25 +95,100 @@ const state = reactive({
show: false,
},
},
yAxis: {
type: 'category',
data: ['耿马镇', '勐撒镇', '勐永镇', '孟定镇', '大兴乡'],
axisTick: {
show: false,
yAxis: [
{
type: 'category',
data: ['耿马镇', '勐撒镇', '勐永镇', '孟定镇', '大兴乡'],
axisTick: {
show: false,
},
splitLine: {
show: false,
},
axisLine: {
show: false,
},
},
splitLine: {
show: false,
{
//
type: 'category',
inverse: true,
offset: 10,
axisTick: 'none',
axisLine: 'none',
show: true,
axisLabel: {
textStyle: {
color: '#ffffff',
fontSize: '16',
},
formatter: function (value) {
let str = '{title|' + value + '吨}';
return str;
},
rich: {
title: {
color: '#fff',
fontSize: 16,
},
},
},
data: [12000, 8000, 6000, 4000, 3500],
},
axisLine: {
show: false,
},
},
],
series: [
{
name: '值',
type: 'bar',
// barWidth: '40%', //
// barMinHeight: 2, //
// barGap: '20%', //
zlevel: 1,
barBorderRadius: 10,
itemStyle: {
borderRadius: [10, 10, 10, 10],
color: 'rgba(100, 200, 255, 0.3)',
},
backgroundStyle: {
color: 'rgba(100, 200, 255, 0.3)',
borderRadius: [10, 10, 10, 10], // barBorderRadius
},
barWidth: 20,
data: values,
label: {
position: [0, -16],
align: 'left',
show: true,
formatter: (params) => {
return params.name;
},
},
barMaxWidth: 40,
markLine: {
label: {
color: '#26a69a',
},
},
},
{
name: '背景',
type: 'bar',
barWidth: 20,
barGap: '-100%',
data: [],
barBorderRadius: 30,
itemStyle: {
normal: {
color: 'rgba(105,131,242,.3)',
borderRadius: 10,
},
},
label: {
show: false,
},
barMaxWidth: 40,
markLine: {
label: {
color: '#26a69a',
},
},
},
],
},
@ -148,6 +232,7 @@ const loadData = (val) => {
}
}
}
values = getValue(state.data);
console.log(val);
};
</script>

View File

@ -23,6 +23,7 @@ const state = reactive({
containLabel: true,
},
tooltip: {
show: true,
trigger: 'axis',
axisPointer: {
type: 'shadow',