处理筛选bug
This commit is contained in:
@@ -7,6 +7,9 @@
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
function queryParentByClass(el, parentClass) {
|
function queryParentByClass(el, parentClass) {
|
||||||
|
if(!el){
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (el === document) {
|
if (el === document) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -267,7 +267,10 @@ export default {
|
|||||||
},
|
},
|
||||||
// 指标
|
// 指标
|
||||||
handleIndexChange(e){
|
handleIndexChange(e){
|
||||||
|
if(!e){
|
||||||
|
this.yDisable = false
|
||||||
|
return
|
||||||
|
}
|
||||||
if(e=='全因子' || e=='纳污红线'){
|
if(e=='全因子' || e=='纳污红线'){
|
||||||
this.yDisable = true
|
this.yDisable = true
|
||||||
this.selectModel = 'default'
|
this.selectModel = 'default'
|
||||||
@@ -360,17 +363,25 @@ export default {
|
|||||||
// 趋势图
|
// 趋势图
|
||||||
drawTrend() {
|
drawTrend() {
|
||||||
|
|
||||||
if(this.queryParams.yco == 'Yco_3' && this.queryParams.monitorIndexList.length>0){
|
if(this.queryParams.monitorIndexList && this.queryParams.monitorIndexList.indexOf('全因子')==-1 && this.queryParams.monitorIndexList.indexOf('纳污红线')==-1){
|
||||||
this.$message.error('纵坐标为水质类别时,请勿选择监测指标!');
|
if(this.queryParams.yco == 'Yco_3' && this.queryParams.monitorIndexList.length>0){
|
||||||
return;
|
this.$message.error('纵坐标为水质类别时,请勿选择监测指标!');
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(this.queryParams.yco == 'Yco_1' && this.queryParams.monitorIndexList.length>1 && this.queryParams.placeList.length>1){
|
if(this.queryParams.yco == 'Yco_1' && this.queryParams.monitorIndexList.length>1 && this.queryParams.placeList.length>1){
|
||||||
this.$message.error('纵坐标为浓度时,请勿选择监测指标和断面名称不能同时为多选!');
|
this.$message.error('纵坐标为浓度时,请勿选择监测指标和断面名称不能同时为多选!');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
riverWaterTrend(this.queryParams).then((res) => {
|
let params = {...this.queryParams}
|
||||||
|
if(this.queryParams.monitorIndexList && !Array.isArray(this.queryParams.monitorIndexList)){
|
||||||
|
params.monitorIndexList = [...this.queryParams.monitorIndexList]
|
||||||
|
}
|
||||||
|
|
||||||
|
riverWaterTrend(params).then((res) => {
|
||||||
console.log("res", res);
|
console.log("res", res);
|
||||||
if (res.data.code == 0) {
|
if (res.data.code == 0) {
|
||||||
this.trendData = res.data.data || [];
|
this.trendData = res.data.data || [];
|
||||||
@@ -387,12 +398,18 @@ export default {
|
|||||||
let palceOptions = {};
|
let palceOptions = {};
|
||||||
let newPlace = [];
|
let newPlace = [];
|
||||||
data.forEach((item) => {
|
data.forEach((item) => {
|
||||||
palceOptions[item.sectionName] = item.sectionName;
|
if(item.sectionName){
|
||||||
|
palceOptions[item.sectionName] = item.sectionName;
|
||||||
|
}else if(item.stationName){
|
||||||
|
palceOptions[item.stationName] = item.stationName;
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
newPlace.push({
|
newPlace.push({
|
||||||
label: '全选',
|
label: '全选',
|
||||||
value: '全选',
|
value: '全选',
|
||||||
})
|
})
|
||||||
|
console.log('palceOptions',palceOptions)
|
||||||
for (let i in palceOptions) {
|
for (let i in palceOptions) {
|
||||||
newPlace.push({
|
newPlace.push({
|
||||||
label: palceOptions[i],
|
label: palceOptions[i],
|
||||||
|
|||||||
Reference in New Issue
Block a user