Commit 77be9253 by wangweidong

首页优化修改

parent 67c9a9f7
......@@ -346,5 +346,11 @@ export default {
http.get('meter/v1/report/generate_pdf_auto?id=' + data),
pageCertificate: data =>
http.post('meter/v1/report/page', data).then(res => res)
http.post('meter/v1/report/page', data).then(res => res),
testingCount: data =>
http.post('meter/v1/sample/testing_count', data).then(res => res),
inspectionCount: data =>
http.post('meter/v1/sample/inspection_count', data).then(res => res),
makingCount: data =>
http.post('meter/v1/sample/making_count', data).then(res => res)
}
......@@ -32,6 +32,7 @@
<script>
import Global from '../../../api/config'
import { meterSample } from '../../../api'
export default {
data() {
return {
......@@ -43,16 +44,17 @@ export default {
},
mounted() {
if (Global.getLn()) {
// this._request();
this._request()
}
},
methods: {
// _request() {
// //type 请求 0:当天 1:本周 2:本月
// this.$store.dispatch('FoodContract/contractCount', {type: this.type}).then(() => {
// this.num = this.$store.state.FoodContract.model;
// });
// },
_request: async function() {
// type 请求 0:当天 1:本周 2:本月
const result = await meterSample.testingCount({ type: this.type })
if (result) {
this.num = result
}
},
_buttonChange(index) {
this.activityIndex = index
switch (index) {
......
......@@ -32,6 +32,7 @@
<script>
import Global from '../../../api/config'
import { meterSample } from '../../../api'
export default {
data() {
return {
......@@ -43,16 +44,17 @@ export default {
},
mounted() {
if (Global.getLn()) {
// this._request();
this._request()
}
},
methods: {
// _request() {
// //type 请求 0:当天 1:本周 2:本月
// this.$store.dispatch('FoodContract/contractCount', {type: this.type}).then(() => {
// this.num = this.$store.state.FoodContract.model;
// });
// },
_request: async function() {
// type 请求 0:当天 1:本周 2:本月
const result = await meterSample.inspectionCount({ type: this.type })
if (result) {
this.num = result
}
},
_buttonChange(index) {
this.activityIndex = index
switch (index) {
......
......@@ -3,7 +3,7 @@
<Card style="width:100%">
<div class="config_meta">
<p class="fl">
待编报告
待编证书
</p>
<div class="fr">
<ButtonGroup shape="circle" size="small">
......@@ -32,6 +32,7 @@
<script>
import Global from '../../../api/config'
import { meterSample } from '../../../api'
export default {
data() {
return {
......@@ -43,16 +44,17 @@ export default {
},
mounted() {
if (Global.getLn()) {
// this._request();
this._request()
}
},
methods: {
// _request() {
// //type 请求 0:当天 1:本周 2:本月
// this.$store.dispatch('FoodContract/contractCount', {type: this.type}).then(() => {
// this.num = this.$store.state.FoodContract.model;
// });
// },
_request: async function() {
// type 请求 0:当天 1:本周 2:本月
const result = await meterSample.makingCount({ type: this.type })
if (result) {
this.num = result
}
},
_buttonChange(index) {
this.activityIndex = index
switch (index) {
......
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