日期格式

main
许宏杰 1 month ago
parent e41cab4f24
commit fc5763a11f

@ -360,13 +360,13 @@ export default {
allDate: [],
date: [],
newDate: [
this.$moment(this.$moment().subtract(7, "d")).format("MM.DD"),
this.$moment(this.$moment().subtract(6, "d")).format("MM.DD"),
this.$moment(this.$moment().subtract(5, "d")).format("MM.DD"),
this.$moment(this.$moment().subtract(4, "d")).format("MM.DD"),
this.$moment(this.$moment().subtract(3, "d")).format("MM.DD"),
this.$moment(this.$moment().subtract(2, "d")).format("MM.DD"),
this.$moment(this.$moment().subtract(1, "d")).format("MM.DD"),
this.$moment(this.$moment().subtract(7, "d")).format("M.DD"),
this.$moment(this.$moment().subtract(6, "d")).format("M.DD"),
this.$moment(this.$moment().subtract(5, "d")).format("M.DD"),
this.$moment(this.$moment().subtract(4, "d")).format("M.DD"),
this.$moment(this.$moment().subtract(3, "d")).format("M.DD"),
this.$moment(this.$moment().subtract(2, "d")).format("M.DD"),
this.$moment(this.$moment().subtract(1, "d")).format("M.DD"),
],
dtsx: {},
//========
@ -464,7 +464,7 @@ export default {
// });
this.allDate.forEach((value) => {
const index = this.newDate.indexOf(
this.$moment(value.dateTime).format("MM.DD")
this.$moment(value.dateTime).format("M.DD")
);
if (index !== -1) {
this.positiveOpinion[index] = value.count1; // count1

@ -53,7 +53,6 @@ export default {
// name: "",
// value: 0,
// },
// {
// name: "",
// value: 0,
@ -86,7 +85,7 @@ export default {
methods: {
getData() {
listMtlx().then((res) => {
let arr = []
let arr = [];
res.rows.forEach((value, index) => {
let obj = {};
obj.name = value.name;
@ -99,7 +98,9 @@ export default {
// });
});
// console.log(this.piedata);
arr = arr.sort((a, b) => a.value < b.value ? 1 : a.value > b.value ? -1 : 0)
arr = arr.sort((a, b) =>
a.value < b.value ? 1 : a.value > b.value ? -1 : 0
);
this.piedata = arr;
this.pieBox();
});
@ -198,7 +199,7 @@ export default {
};
</script>
<style lang='scss' scoped>
<style lang="scss" scoped>
#info {
position: relative;
}

Loading…
Cancel
Save