diff --git a/src/views/sponeScreen/Echarts/SewageBODEchaer.vue b/src/views/sponeScreen/Echarts/SewageBODEchaer.vue index 8bbd193..221d693 100644 --- a/src/views/sponeScreen/Echarts/SewageBODEchaer.vue +++ b/src/views/sponeScreen/Echarts/SewageBODEchaer.vue @@ -12,7 +12,7 @@ refresh: Number, }, setup(props) { - console.log(props.data); + console.log(props.data, '1asdsad'); const allData = reactive({ series: [], @@ -117,6 +117,20 @@ bottom: '25%', // containLabel: true, }, + graphic: { + type: 'text', // 类型:文本 + left: 'center', + top: 'middle', + silent: true, // 不响应事件 + invisible: props.data.XName.length > 0 ? true : false, // 有数据就隐藏, // 有数据就隐藏 + style: { + fill: '#c6c6c6', + fontWeight: 'bold', + text: '暂无数据', + fontFamily: 'Microsoft YaHei', + fontSize: '18px', + }, + }, xAxis: [ { type: 'category', diff --git a/src/views/sponeScreen/Echarts/SewageBODEchaer.vue b/src/views/sponeScreen/Echarts/SewageBODEchaer.vue index 8bbd193..221d693 100644 --- a/src/views/sponeScreen/Echarts/SewageBODEchaer.vue +++ b/src/views/sponeScreen/Echarts/SewageBODEchaer.vue @@ -12,7 +12,7 @@ refresh: Number, }, setup(props) { - console.log(props.data); + console.log(props.data, '1asdsad'); const allData = reactive({ series: [], @@ -117,6 +117,20 @@ bottom: '25%', // containLabel: true, }, + graphic: { + type: 'text', // 类型:文本 + left: 'center', + top: 'middle', + silent: true, // 不响应事件 + invisible: props.data.XName.length > 0 ? true : false, // 有数据就隐藏, // 有数据就隐藏 + style: { + fill: '#c6c6c6', + fontWeight: 'bold', + text: '暂无数据', + fontFamily: 'Microsoft YaHei', + fontSize: '18px', + }, + }, xAxis: [ { type: 'category', diff --git a/src/views/sponeScreen/longYW/SewageBOD.vue b/src/views/sponeScreen/longYW/SewageBOD.vue index 0b56f1a..a7b7a91 100644 --- a/src/views/sponeScreen/longYW/SewageBOD.vue +++ b/src/views/sponeScreen/longYW/SewageBOD.vue @@ -40,6 +40,7 @@ XName: [], data1: [], controlMarkLine: [], + controlGraphic: '', }); const AllData = reactive({ queryParams: { @@ -82,13 +83,13 @@ // 下拉框事件 function changeSewage(val) { queryParams.value.sewageCode = val; - getDataList(queryParams.value); + getDataList(); } // 年份事件 function changeDataTime(val) { queryParams.value.dataTime = val; - getDataList(queryParams.value); + getDataList(); } onMounted(() => {