Commit 6df4e103 by wangweidong

统计查询修改

parent 4507a217
...@@ -219,5 +219,9 @@ export default { ...@@ -219,5 +219,9 @@ export default {
pageCertificateRateSample: data => pageCertificateRateSample: data =>
http http
.post('meter/v1/sample/page_certificate_rate_sample', data) .post('meter/v1/sample/page_certificate_rate_sample', data)
.then(res => res),
pageSampleQuantityStatistics: data =>
http
.post('meter/v1/sample/page_sample_quantity_statistics', data)
.then(res => res) .then(res => res)
} }
...@@ -8,16 +8,6 @@ ...@@ -8,16 +8,6 @@
<div class="fl"> <div class="fl">
<Form id="search-form" :label-width="70" inline onsubmit="return false"> <Form id="search-form" :label-width="70" inline onsubmit="return false">
<label class="label-sign"></label> <label class="label-sign"></label>
<Form-item class="search-item" label="人员:">
<AutoCompletes :value="tester" :blur="true" :down-data="testerData" @on-result-change="_testerChange"
show-key="realname" placeholder="请选择人员"
></AutoCompletes>
</Form-item>
<!-- <Form-item class="search-item" label="服务类型:">-->
<!-- <Select v-model="serviceType" placeholder="请选择服务类型" clearable>-->
<!-- <Option v-for="item in serviceTypeList" :value="item.name" :key="item.name">{{ item.name }}</Option>-->
<!-- </Select>-->
<!-- </Form-item>-->
<Form-item label="委托日期:"> <Form-item label="委托日期:">
<el-date-picker <el-date-picker
v-model="queryDate" v-model="queryDate"
...@@ -78,7 +68,6 @@ ...@@ -78,7 +68,6 @@
</template> </template>
<script> <script>
import AutoCompletes from '../../../components/base/AutoCompletes'
import { meterSample } from '../../../api' import { meterSample } from '../../../api'
import UserTestPie from './UserTestPie' import UserTestPie from './UserTestPie'
import Detail from './Detail' import Detail from './Detail'
...@@ -86,7 +75,6 @@ import Detail from './Detail' ...@@ -86,7 +75,6 @@ import Detail from './Detail'
export default { export default {
components: { components: {
UserTestPie, UserTestPie,
AutoCompletes,
Detail Detail
}, },
data() { data() {
...@@ -99,8 +87,8 @@ export default { ...@@ -99,8 +87,8 @@ export default {
tester: '', tester: '',
testerId: '', testerId: '',
pageColumns: [ pageColumns: [
{ title: '仪器名称', key: 'tester', detail: true }, { title: '仪器名称', key: 'name', detail: true },
{ title: '样品量', key: 'total' }, { title: '样品量', key: 'quantity' },
{ title: '样品占比(%)', key: 'ratio' } { title: '样品占比(%)', key: 'ratio' }
], ],
groupData: [], groupData: [],
...@@ -154,7 +142,7 @@ export default { ...@@ -154,7 +142,7 @@ export default {
methods: { methods: {
// 服务类型 // 服务类型
_getData: async function() { _getData: async function() {
const result = await meterSample.pagePersonalTaskStatistics() const result = await meterSample.pageSampleQuantityStatistics()
if (result) { if (result) {
this.getPage.records = result this.getPage.records = result
this.$refs.testPieModal._openPie(this.getPage.records) this.$refs.testPieModal._openPie(this.getPage.records)
......
...@@ -112,16 +112,16 @@ export default { ...@@ -112,16 +112,16 @@ export default {
const seriesList = [] const seriesList = []
let total = 0 let total = 0
for (let i = 0; i < data.length; i++) { for (let i = 0; i < data.length; i++) {
testerList.push(data[i].tester) testerList.push(data[i].name)
total = total + data[i].total total = total + data[i].quantity
seriesList.push({ seriesList.push({
value: data[i].total, value: data[i].quantity,
name: data[i].tester, name: data[i].name,
total: data[i].total, total: data[i].quantity,
ratio: data[i].ratio ratio: data[i].ratio
}) })
} }
this.option.title.text = '检测项目总量(个):' + total this.option.title.text = '样品总量(个):' + total
this.option.legend.data = testerList this.option.legend.data = testerList
this.option.series[0].data = seriesList this.option.series[0].data = seriesList
console.log(this.option.series[0].data) console.log(this.option.series[0].data)
......
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