Commit 77be9253 by wangweidong

首页优化修改

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