jn517618 2 years ago
commit c81b5ac135
  1. 53
      src/views/dataStatistics/carbon.vue
  2. 49
      src/views/dataStatistics/carbonIntensity.vue
  3. 55
      src/views/dataStatistics/carbonTrend.vue

@ -19,12 +19,26 @@
:model="searchForm"
label-width="120px"
style="border: 0px solid red; margin-bottom: 8px"
>
>
<el-row>
<el-col :span="2.5">
<el-date-picker
:clearable="false"
class="search-picker"
v-model="searchForm.currentYear"
format="yyyy"
value-format="yyyy"
type="year"
placeholder="选择日期">
</el-date-picker>
</el-col>
<el-col style="margin-left: 18px" :span="3.5">
<el-button class="search" @click="searchHandle(0)"
>查询</el-button
>
<el-button class="reset" @click="searchHandle(1)"
>重置</el-button
>
</el-col>
</el-row>
</el-form>
@ -81,7 +95,7 @@ export default {
},
//
searchForm: {
name: "",
currentYear:null,
},
searchText: {
flag: 3,
@ -220,9 +234,9 @@ export default {
};
},
mounted() {
if (JSON.stringify(this.$store.state.client.supplierParams) !== "{}") {
this.searchForm = this.$store.state.client.supplierParams;
}
// if (JSON.stringify(this.$store.state.client.supplierParams) !== "{}") {
// this.searchForm = this.$store.state.client.supplierParams;
// }
this.onLoad();
},
methods: {
@ -236,20 +250,20 @@ export default {
this.onLoad();
},
//
searchHandle(item, index) {
this.page.current = 1;
if (index === 1) {
this.searchForm = {
name: "",
};
searchHandle(val) {
if (val == 0) {
this.onLoad()
} else {
this.searchForm = item;
this.searchForm = {
currentYear:null
}
this.onLoad()
}
this.onLoad();
this.$store.dispatch("changeSetting", {
title: "supplierParams",
form: this.searchForm,
});
// this.onLoad();
// this.$store.dispatch("changeSetting", {
// title: "supplierParams",
// form: this.searchForm,
// });
},
//
addHandle() {
@ -259,7 +273,7 @@ export default {
onLoad() {
this.loading = true;
const { current, size } = this.page;
getCarborList( Object.assign({ current, size })).then((res) => {
getCarborList({current:this.page.current,size:this.page.size,...this.searchForm}).then((res) => {
const {records,total} = res.data.data
this.data = records
this.page.total = total
@ -407,6 +421,9 @@ export default {
height: 46px;
border-radius: 0;
margin-left: 10px;
/deep/ .el-input__inner{
height: 100% !important;
}
}
.search-select {
width: 240px !important;

@ -21,10 +21,20 @@
style="border: 0px solid red; margin-bottom: 8px"
>
<el-row>
<el-col :span="2.5">
<el-date-picker
:clearable="false"
class="search-picker"
v-model="searchForm.currentMonth"
type="month"
placeholder="选择日期"
format="yyyy-MM"
value-format="yyyy-MM">
</el-date-picker>
</el-col>
<el-col style="margin-left: 18px" :span="3.5">
<el-button class="search" @click="searchHandle(0)"
>查询</el-button
>
<el-button class="search" @click="searchHandle(0)">查询</el-button>
<el-button class="reset" @click="searchHandle(1)">重置</el-button>
</el-col>
</el-row>
</el-form>
@ -81,7 +91,7 @@ export default {
},
//
searchForm: {
name: "",
currentMonth: null,
},
searchText: {
flag: 3,
@ -154,9 +164,9 @@ export default {
};
},
mounted() {
if (JSON.stringify(this.$store.state.client.supplierParams) !== "{}") {
this.searchForm = this.$store.state.client.supplierParams;
}
// if (JSON.stringify(this.$store.state.client.supplierParams) !== "{}") {
// this.searchForm = this.$store.state.client.supplierParams;
// }
this.onLoad();
},
methods: {
@ -170,20 +180,15 @@ export default {
this.onLoad();
},
//
searchHandle(item, index) {
this.page.current = 1;
if (index === 1) {
searchHandle(val) {
if(val == 0){
this.onLoad()
}else{
this.searchForm = {
name: "",
};
} else {
this.searchForm = item;
currentMonth:null
}
this.onLoad()
}
this.onLoad();
this.$store.dispatch("changeSetting", {
title: "supplierParams",
form: this.searchForm,
});
},
//
addHandle() {
@ -192,8 +197,7 @@ export default {
onLoad() {
this.loading = true;
const { current, size } = this.page;
getIntensity( Object.assign({ current, size })).then((res) => {
getIntensity({current:this.page.current,size:this.page.size,...this.searchForm}).then((res) => {
const {records,total} = res.data.data
this.data = records
this.page.total = total
@ -338,6 +342,9 @@ export default {
height: 46px;
border-radius: 0;
margin-left: 10px;
/deep/ .el-input__inner{
height: 100% !important;
}
}
.search-select {
width: 240px !important;

@ -21,21 +21,22 @@
style="border: 0px solid red; margin-bottom: 8px"
>
<el-row>
<!-- <el-col :span="2.5">
<el-select
v-model="searchForm.status"
class="search-select"
placeholder="请选择状态"
>
<el-option label="启用" :value="1"></el-option>
<el-option label="停用" :value="0"></el-option>
</el-select>
</el-col> -->
<el-col :span="2.5">
<el-date-picker
:clearable="false"
class="search-picker"
v-model="searchForm.currentMonth"
type="month"
placeholder="选择日期"
format="yyyy-MM"
value-format="yyyy-MM">
</el-date-picker>
</el-col>
<el-col style="margin-left: 18px" :span="3.5">
<el-button class="search" @click="searchHandle(0)"
>查询</el-button
>
<!-- <el-button class="reset" @click="searchHandle(1)">重置</el-button> -->
<el-button class="reset" @click="searchHandle(1)">重置</el-button>
</el-col>
</el-row>
</el-form>
@ -92,7 +93,7 @@ export default {
},
//
searchForm: {
name: "",
currentMonth: null,
},
searchText: {
flag: 3,
@ -165,9 +166,9 @@ export default {
};
},
mounted() {
if (JSON.stringify(this.$store.state.client.supplierParams) !== "{}") {
this.searchForm = this.$store.state.client.supplierParams;
}
// if (JSON.stringify(this.$store.state.client.supplierParams) !== "{}") {
// this.searchForm = this.$store.state.client.supplierParams;
// }
this.onLoad();
},
methods: {
@ -181,20 +182,15 @@ export default {
this.onLoad();
},
//
searchHandle(item, index) {
this.page.current = 1;
if (index === 1) {
searchHandle(val) {
if(val == 0){
this.onLoad()
}else{
this.searchForm = {
name: "",
};
} else {
this.searchForm = item;
currentMonth:null
}
this.onLoad()
}
this.onLoad();
this.$store.dispatch("changeSetting", {
title: "supplierParams",
form: this.searchForm,
});
},
//
addHandle() {
@ -204,7 +200,7 @@ export default {
onLoad() {
this.loading = true;
const { current, size } = this.page;
getTrendList( Object.assign({ current, size })).then((res) => {
getTrendList({current:this.page.current,size:this.page.size,...this.searchForm}).then((res) => {
const {records,total} = res.data.data
this.data = records
this.page.total = total
@ -354,6 +350,9 @@ export default {
height: 46px;
border-radius: 0;
margin-left: 10px;
/deep/ .el-input__inner{
height: 100% !important;
}
}
.search-select {
width: 240px !important;

Loading…
Cancel
Save