Commit 6d90f322 authored by 范加坤's avatar 范加坤

沼气

parent e7901ca5
...@@ -2590,6 +2590,14 @@ ...@@ -2590,6 +2590,14 @@
"integrity": "sha1-1h9G2DslGSUOJ4Ta9bCUeai0HFk=", "integrity": "sha1-1h9G2DslGSUOJ4Ta9bCUeai0HFk=",
"dev": true "dev": true
}, },
"axios": {
"version": "0.21.1",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz",
"integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==",
"requires": {
"follow-redirects": "^1.10.0"
}
},
"babel-eslint": { "babel-eslint": {
"version": "10.1.0", "version": "10.1.0",
"resolved": "https://registry.npm.taobao.org/babel-eslint/download/babel-eslint-10.1.0.tgz?cache=0&sync_timestamp=1611946213770&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbabel-eslint%2Fdownload%2Fbabel-eslint-10.1.0.tgz", "resolved": "https://registry.npm.taobao.org/babel-eslint/download/babel-eslint-10.1.0.tgz?cache=0&sync_timestamp=1611946213770&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbabel-eslint%2Fdownload%2Fbabel-eslint-10.1.0.tgz",
...@@ -5816,8 +5824,7 @@ ...@@ -5816,8 +5824,7 @@
"follow-redirects": { "follow-redirects": {
"version": "1.14.1", "version": "1.14.1",
"resolved": "https://registry.nlark.com/follow-redirects/download/follow-redirects-1.14.1.tgz?cache=0&sync_timestamp=1620555246888&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ffollow-redirects%2Fdownload%2Ffollow-redirects-1.14.1.tgz", "resolved": "https://registry.nlark.com/follow-redirects/download/follow-redirects-1.14.1.tgz?cache=0&sync_timestamp=1620555246888&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ffollow-redirects%2Fdownload%2Ffollow-redirects-1.14.1.tgz",
"integrity": "sha1-2RFN7Qoc/dM04WTmZirQK/2R/0M=", "integrity": "sha1-2RFN7Qoc/dM04WTmZirQK/2R/0M="
"dev": true
}, },
"for-in": { "for-in": {
"version": "1.0.2", "version": "1.0.2",
......
...@@ -9,16 +9,17 @@ ...@@ -9,16 +9,17 @@
}, },
"dependencies": { "dependencies": {
"ant-design-vue": "^1.7.6", "ant-design-vue": "^1.7.6",
"axios": "^0.21.1",
"core-js": "^3.6.5", "core-js": "^3.6.5",
"echarts": "^5.1.1",
"echarts-gl": "^2.0.4",
"element-resize-detector": "^1.2.2",
"element-ui": "^2.15.3", "element-ui": "^2.15.3",
"less-loader": "7", "less-loader": "7",
"mapbox-gl": "1.13.1", "mapbox-gl": "1.13.1",
"vue": "^2.6.11", "vue": "^2.6.11",
"vue-router": "^3.2.0", "vue-router": "^3.2.0",
"vuex": "^3.4.0", "vuex": "^3.4.0"
"echarts": "^5.1.1",
"echarts-gl": "^2.0.4",
"element-resize-detector": "^1.2.2"
}, },
"devDependencies": { "devDependencies": {
"@vue/cli-plugin-babel": "~4.5.0", "@vue/cli-plugin-babel": "~4.5.0",
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
<li <li
v-for="(item, index) in list" v-for="(item, index) in list"
:key="index" :key="index"
:class="{ acitive: value === item.key }" :class="{ acitive: value.key === item.key }"
@click="onStatusChange(item.key)" @click="onStatusChange(item)"
> >
{{ item.value }} {{ item.value }}
</li> </li>
...@@ -16,32 +16,34 @@ ...@@ -16,32 +16,34 @@
<script> <script>
// #144683 // #144683
export default { export default {
name: "statusControl", name: 'statusControl',
props: { props: {
list: { list: {
type: Array, type: Array,
default: function () { default: function () {
return []; return []
}, }
}, },
statusStyle: { statusStyle: {
type: [Object, String], type: [Object, String],
default: "", default: ''
}, },
value: { value: {
type: String, type: Object,
default: "", default: function () {
}, return {}
}
}
}, },
data() { data() {
return {}; return {}
}, },
methods: { methods: {
onStatusChange(key) { onStatusChange(item) {
this.$emit("input", key); this.$emit('input', item)
}, }
}, }
}; }
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
......
...@@ -15,21 +15,6 @@ ...@@ -15,21 +15,6 @@
label="地区" label="地区"
align="center" align="center"
></el-table-column> ></el-table-column>
<!-- <el-table-column
prop="name"
label="年末累积(处)"
align="center"
></el-table-column>
<el-table-column
prop="name"
label="年末累积(处)"
align="center"
></el-table-column>
<el-table-column
prop="name"
label="年末累积(处)"
align="center"
></el-table-column> -->
<el-table-column <el-table-column
prop="name" prop="name"
label="年末累积(处)" label="年末累积(处)"
...@@ -114,8 +99,8 @@ ...@@ -114,8 +99,8 @@
</template> </template>
<script> <script>
import request from '../../api/layer'
import DateWidget from '../../components/DateWidget/DateWidget.vue' import DateWidget from '../../components/DateWidget/DateWidget.vue'
// import PartInfo from '../../components/PartInfo/PartInfo.vue'
import Echart from '../../components/Echart/Echarts.vue' import Echart from '../../components/Echart/Echarts.vue'
import PartWrap from '../../components/PartWrap/PartWrap.vue' import PartWrap from '../../components/PartWrap/PartWrap.vue'
import StatusControl from '@/components/statusControl/index.vue' import StatusControl from '@/components/statusControl/index.vue'
...@@ -124,13 +109,15 @@ export default { ...@@ -124,13 +109,15 @@ export default {
name: 'MethaneUpgrade', name: 'MethaneUpgrade',
data() { data() {
return { return {
thisYear: '2015',
statusControlList: [ statusControlList: [
{ key: 'all', value: '汇总' },
{ key: 'small', value: '小型沼气工程' }, { key: 'small', value: '小型沼气工程' },
{ key: 'middle', value: '中型沼气工程' }, { key: 'middle', value: '中型沼气工程' },
{ key: 'big', value: '大型沼气工程' }, { key: 'big', value: '大型沼气工程' },
{ key: 'ExtraLarge', value: '特大型沼气工程' } { key: 'ExtraLarge', value: '特大型沼气工程' }
], ],
statusValue: 'small', statusValue: { key: 'all', value: '汇总' },
thisTable: '供气户数', thisTable: '供气户数',
echart3_option: { echart3_option: {
xAxis: { xAxis: {
...@@ -190,7 +177,32 @@ export default { ...@@ -190,7 +177,32 @@ export default {
MethaneMap, MethaneMap,
StatusControl StatusControl
}, },
methods: {} mounted() {
this.getYearRange()
},
methods: {
async getYearRange() {
let res = await request.aggregation('ra_biogas', {
groupFields: ['year'],
aggregates: [
['year', 'max'],
['year', 'min']
]
})
console.log(res)
},
async get() {
let res = await request.query('ra_biogas', {
filter: [
'all',
['=', 'pcode', '10'],
['=', 'year', this.thisYear],
['=', 'type', this.statusValue.value]
]
})
console.log(res)
}
}
} }
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment