main
biubiubiu 7 months ago
parent 3e93854416
commit 0c792d4b9d

2737
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -36,7 +36,7 @@
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.0",
"eslint-plugin-vue": "^8.0.3",
"eslint-plugin-vue": "^7.0.0",
"postcss": "^8.4.49",
"sass": "^1.32.7",
"sass-loader": "^12.0.0",

@ -134,47 +134,47 @@ export default {
});
xbStartData.push(
new Date(
this.$moment().format("yyyy") +
"/" +
(xbListCopy[item] && xbListCopy[item][0].yf
? xbListCopy[item][0].yf
: "") +
"/01"
)
xbListCopy[item] && xbListCopy[item][0].yf
? new Date(
this.$moment().format("yyyy") +
"/" +
xbListCopy[item][0].yf +
"/01"
)
: ""
);
xbEndData.push(
new Date(
this.$moment().format("yyyy") +
"/" +
(xbListCopy[item] && xbListCopy[item].length > 0
? xbListCopy[item][xbListCopy[item].length - 1].yf
: "") +
"/01"
)
xbListCopy[item] && xbListCopy[item].length > 0
? new Date(
this.$moment().format("yyyy") +
"/" +
xbListCopy[item][xbListCopy[item].length - 1].yf +
"/01"
)
: ""
);
// =====
ydStartData.push(
new Date(
this.$moment().format("yyyy") +
"/" +
(ydListCopy[item] && ydListCopy[item].length > 0
? ydListCopy[item][0].yf
: "") +
"/01"
)
ydListCopy[item] && ydListCopy[item].length > 0
? new Date(
this.$moment().format("yyyy") +
"/" +
ydListCopy[item][0].yf +
"/01"
)
: ""
);
ydEndData.push(
new Date(
this.$moment().format("yyyy") +
"/" +
(ydListCopy[item] && ydListCopy[item].length > 0
? ydListCopy[item][ydListCopy[item].length - 1].yf
: "") +
"/01"
)
ydListCopy[item] && ydListCopy[item].length > 0
? new Date(
this.$moment().format("yyyy") +
"/" +
ydListCopy[item][ydListCopy[item].length - 1].yf +
"/01"
)
: ""
);
});
//
@ -400,41 +400,49 @@ export default {
},
formatter: (params) => {
if (params && params.length) {
var res = "";
var xbRes = "";
var ydRes = "";
var date0 = this.$moment(params[0].data).format("yyyy-MM");
var date1 =
params.length > 1
params.length > 1 && params[1].data
? this.$moment(params[1].data).format("yyyy-MM")
: "";
var date2 =
params.length > 2
params.length > 2 && params[2].data
? this.$moment(params[2].data).format("yyyy-MM")
: "";
var date3 =
params.length > 3
params.length > 3 && params[3].data
? this.$moment(params[3].data).format("yyyy-MM")
: "";
res =
params[0].name +
"</br>" +
(params.length > 1
? params[1].marker + params[1].seriesName
: "") +
":</br>" +
date0 +
"~" +
date1 +
"</br>" +
(params.length > 3
? params[3].marker + params[3].seriesName
: "") +
":</br>" +
date2 +
"~" +
date3 +
"</br>";
return res;
if (date0 || date1) {
xbRes =
params[0].name +
"</br>" +
params[1].marker +
params[1].seriesName +
":</br>" +
date0 +
"~" +
date1 +
"</br>";
} else {
xbRes = "";
}
if (date2 || date3) {
ydRes =
params[3].marker +
params[3].seriesName +
":</br>" +
date2 +
"~" +
date3 +
"</br>";
} else {
ydRes = "";
}
return xbRes + ydRes;
}
},
},

Loading…
Cancel
Save