Commit 1777cf5f by lichengming

修改了统计分析

parents 2b2771e5 42781453
...@@ -67,11 +67,6 @@ export default { ...@@ -67,11 +67,6 @@ export default {
year: '' year: ''
} }
}, },
computed: {
tableHeight: function() {
return this.$tableHeight('noBtn')
}
},
mounted() { mounted() {
this.$refs.pageTable._hideLoading() this.$refs.pageTable._hideLoading()
}, },
......
<template>
<div>
<form id="form-customer-table">
<input name="queryDateBegin" type="hidden"/>
<input name="queryDateEnd" type="hidden"/>
</form>
<PTVXETable id="customer-contract-table" ref="pageTable"
:tableHeight="tableHeight" @on-result-change="_tableResultChange" :getPage="getPage" hide-checkbox click-value>
<vxe-table-column
:field="item.key"
:title="item.title"
:min-width="item.width?item.width:200"
:fixed="item.fixed?item.fixed:undefined"
v-for="item in pageColumns"
:key="item.key" sortable>
<template slot-scope="scope">
<a v-if="item.detail" @click.stop="_detail(scope.row)">{{scope.row[item.key]}}</a>
<span v-else>{{scope.row[item.key]}}</span>
</template>
</vxe-table-column>
</PTVXETable>
<!--详情-->
<Detail ref="detailModal"/>
</div>
</template>
<script>
import { meterContract } from '../../../api'
import Detail from './Detail'
export default {
components: { Detail },
data() {
return {
pageColumns: [
{
title: '客户名称',
key: 'client',
width: 120,
fixed: 'left'
},
{ title: '委托数量', key: 'total' },
{ title: '委托额度', key: 'price' },
{ title: '已收额度', key: 'collectPrice' },
{ title: '未收额度', key: 'noCollectPrice' }
],
formObj: {
client: undefined
},
getPage: {},
customer: '',
queryDateBegin: '',
queryDateEnd: ''
}
},
computed: {
tableHeight: function() {
return this.$tableHeight('noBtn')
}
},
methods: {
// 查看所有委托
_detail(data) {
this.$refs.detailModal._open({
cname: data.customer,
queryDateBegin: this.queryDateBegin,
queryDateEnd: this.queryDateEnd
})
},
_openTable(data) {
this.customer = data.customer
$('input[name=queryDateBegin]').val(data.queryDateBegin)
$('input[name=queryDateEnd]').val(data.queryDateEnd)
this.queryDateBegin = data.queryDateBegin
this.queryDateEnd = data.queryDateEnd
this._page()
},
_page: async function() {
Object.assign(this.formObj, this.$refs.pageTable._searchParams())
const result = await meterContract.page(this.formObj)
if (result) {
this.$refs.pageTable._hideLoading()
this.getPage = result
}
},
// _page() {
// const data = {}
// if (this.customer) {
// data.customer = this.customer
// }
// this.$refs.pageTable._page(
// 'form-customer-table',
// 'StatisticContract/pageCustomerContract',
// data
// )
// },
_tableResultChange(msg, data) {
switch (msg) {
case 'page':
this.getPage = this.$store.state.StatisticContract.page
break
case 'singleSelect':
// 单击
this.$emit('on-result-change', data)
break
case 'dbSelect':
// 双击
this.customer = ''
break
case 'changeSize':
// this._page()
break
}
},
/** *********************************导出客户委托分析表-begin*********************************************/
_exportSampleForm() {
let result = []
this.$store
.dispatch(
'StatisticContract/pageCustomerContract',
this._searchParams()
)
.then(() => {
result = this.$store.state.StatisticContract.page.records
if (result.length === 0) {
this.$Message.warning('暂无数据,不可导出!')
} else {
this.$Modal.confirm({
title: '提示',
content: '确定导出全部数据(最多导出5000条)?',
onOk: () => {
this.$exportExcel(
'customer-contract-table',
'客户委托分析表',
this.pageColumns,
result
)
}
})
}
})
},
// 参数
_searchParams() {
const data = this.$serialize('form-customer-table')
if (this.customer) {
data.customer = this.customer
}
return this.$extend(data, { page: 1, rows: 5000 })
}
/** *********************************导出客户委托分析表-end*********************************************/
}
}
</script>
<template> <template>
<div> <div>
<Modal v-model="showModal" width="1000" class="modal-footer-none"> <Modal v-model="showModal" width="1200" class="modal-footer-none">
<p slot="header">详情</p> <p slot="header">详情</p>
<div> <div>
<!--内容--> <!--内容-->
<Row> <Row>
<!--查询-->
<Col span="24"> <Col span="24">
<PTVXETable ref="pageTable" :tableHeight="tableHeight" <Form id="search-personal-detail" :label-width="70" inline onsubmit="return false">
@on-result-change="_tableResultChange" :getPage="getPage" hide-checkbox> <label class="label-sign"></label>
<vxe-table-column <Form-item style="width:32%" label="录入时间:">
:field="item.key" <Date-picker :editable="false" @on-change="_dateChange" v-model="dateList"
:title="item.title" type="daterange" placeholder="录入时间" format="yyyy-MM-dd"
:min-width="item.width?item.width:200" style="width:100%"></Date-picker>
:fixed="item.fixed?item.fixed:undefined" <input v-model="formObj.testDateBegin" type="hidden" name="testDateBegin">
v-for="item in pageColumns" <input v-model="formObj.testDateEnd" type="hidden" name="testDateEnd">
:key="item.key" sortable> <input v-model="groupIds" type="hidden" name="groupIds">
<template slot-scope="scope"> <input v-model="testerIds" type="hidden" name="testerIds">
<span>{{scope.row[item.key]}}</span> </Form-item>
</template> <Form-item style="width:32%" label="检测科室:">
</vxe-table-column> <SelMultiGroup ref="groupModal" @on-result-change="_groupResult"></SelMultiGroup>
</PTVXETable> </Form-item>
<Form-item style="width:32%" label="检测人:">
<!--显示某几个科室下的人员 isGroupIds为标识-->
<SelMultiUserGroup ref="userModal" @on-result-change="_userResult" is-group-ids></SelMultiUserGroup>
</Form-item>
<Form-item style="width:32%" label="检测项目:">
<Input v-model="formObj.name" @on-enter="_formSearch" name="name" placeholder="请输入检测项目" clearable/>
</Form-item>
<Form-item style="width:32%" label="检测依据:">
<Input v-model="formObj.testBasis" @on-enter="_formSearch" name="testBasis" placeholder="请输入检测依据"
clearable/>
</Form-item>
<Form-item class="search-btn">
<Button @click="_formSearch" type="primary">搜索</Button>
</Form-item>
</Form>
</Col>
<Col span="24">
<btn-list :msg="btn" @on-result-change="_btnClick" class="contHide"></btn-list>
</Col>
<Col span="24">
<PTVXETable id="groupStatisticTable" ref="pageTable" :tableHeight="tableHeight"
@on-result-change="_tableResultChange" :getPage="getPage" select-data>
<vxe-table-column
v-for="item in pageColumns"
:key="item.key"
:field="item.key"
:title="item.title"
:width="item.width"
:min-width="200"
:fixed="item.fixed?item.fixed:undefined"
sortable>
<template slot-scope="scope">
<span v-if="item.date">{{scope.row[item.key]?$dateformat(scope.row[item.key], "yyyy-mm-dd"):''}}</span>
<span v-else-if="item.status">{{scope.row[item.key]?scope.row[item.key].display:''}}</span>
<span v-else>{{scope.row[item.key]}}</span>
</template>
</vxe-table-column>
</PTVXETable>
</Col> </Col>
</Row> </Row>
</div> </div>
...@@ -27,24 +67,48 @@ ...@@ -27,24 +67,48 @@
</div> </div>
</template> </template>
<script> <script>
/* 个人检测量统计------项目查看项目详情 */
import SelMultiUserGroup from '../../../components/user-info/SelMultiUserGroup'
import SelMultiGroup from '../../../components/user-info/SelMultiGroup'
export default { export default {
components: { SelMultiUserGroup, SelMultiGroup },
data() { data() {
return { return {
btn: [{ type: '', id: '', name: '导出' }],
showModal: false, showModal: false,
selectData: [],
getPage: {}, getPage: {},
pageColumns: [ pageColumns: [
{ title: '委托名称', key: 'name' }, { title: '样品编号', key: 'num', width: 180, fixed: 'left' },
{ title: '委托编号', key: 'code', width: 180 }, { title: '样品名称', key: 'sampleName', width: 180 },
{ title: '委托金额(元)', key: 'contractAmount', width: 160 }, { title: '检测项目', key: 'name', width: 120 },
{ title: '已收金额(元) ', key: 'bereturnedAmount', width: 160 }, { title: '检测值', key: 'testValue', width: 140 },
{ title: '未收金额(元)', key: 'noreturnedAmount', width: 160 } { title: '单位', key: 'unit', width: 100 },
{ title: '结果判定', key: 'qualified', width: 100, status: true },
{ title: '单项结论', key: 'singleConclusion', width: 100 },
{ title: '复测值', key: 'retestValue', width: 100 },
{ title: '检出类别', key: 'detectionType', width: 100 },
{ title: '检出限', key: 'detection', width: 100 },
{ title: '检测依据', key: 'testBasis', width: 200 },
{ title: '检测依据名称', key: 'testBasisName', width: 200 },
{ title: '检测方法', key: 'testMethod', width: 200 },
{ title: '判定依据', key: 'judgeBasis', width: 200 },
{ title: '判定依据名称', key: 'judgeBasisName', width: 200 },
{ title: '限量', key: 'limitDefault', width: 100 },
{ title: '检测科室', key: 'groupName', width: 100 },
{ title: '检测人', key: 'tester', width: 100 },
{ title: '录入时间', key: 'testDate', width: 120, date: true }
], ],
dateList: [], dateList: [],
formObj: { formObj: {
cname: '', name: '',
queryDateBegin: '', testDateBegin: '',
queryDateEnd: '' testDateEnd: '',
} testBasis: ''
},
groupIds: [],
testerIds: []
} }
}, },
computed: { computed: {
...@@ -53,8 +117,51 @@ export default { ...@@ -53,8 +117,51 @@ export default {
} }
}, },
methods: { methods: {
_open(data) { // 选择科室返回
this.formObj = data _groupResult(data) {
this.groupIds = data
// 查询科室下的人员
if (data.length === 0) {
this.testerIds = []
}
this.$refs.userModal._openUserByGroup(data)
},
// 选择人员返回
_userResult(data) {
this.testerIds = data
},
_dateChange(data) {
this.formObj.testDateBegin = data[0]
this.formObj.testDateEnd = data[1]
},
_open(formObj) {
// 显示科室信息
this.groupIds = formObj.groupIds
this.$refs.groupModal._open(this.groupIds)
// 显示人员信息
this.testerIds = formObj.testerIds
this.$refs.userModal._openUserByGroup(this.groupIds, this.testerIds)
this.selectData = []
this.formObj = this.$resetFields(this.formObj)
/** ***********时间处理*********/
const beginDate = formObj.beginDate ? formObj.beginDate + '-01' : ''
const endDate = formObj.endDate ? formObj.endDate.split('-') : ''
this.formObj.testDateBegin = beginDate || ''
this.formObj.testDateEnd = formObj.endDate
? formObj.endDate + '-' + this.$getLastDay(endDate[0], endDate[1])
: ''
if (formObj.beginDate) {
this.dateList = [
new Date(this.formObj.testDateBegin),
new Date(this.formObj.testDateEnd)
]
} else {
this.dateList = []
}
/** ***********时间处理*********/
this.showModal = true this.showModal = true
this.$nextTick(function() { this.$nextTick(function() {
// this._page() // this._page()
...@@ -62,8 +169,8 @@ export default { ...@@ -62,8 +169,8 @@ export default {
}, },
_page() { _page() {
this.$refs.pageTable._page( this.$refs.pageTable._page(
'search-contract-detail', 'search-personal-detail',
'FoodContract/pageContractByCustomer', 'FoodItem/yearTestDetail',
this.$serializeFormSearch(this.formObj) this.$serializeFormSearch(this.formObj)
) )
}, },
...@@ -73,15 +180,77 @@ export default { ...@@ -73,15 +180,77 @@ export default {
_tableResultChange(msg, data) { _tableResultChange(msg, data) {
switch (msg) { switch (msg) {
case 'page': case 'page':
this.getPage = this.$store.state.FoodContract.page this.getPage = this.$store.state.FoodItem.page
break
case 'selectData':
this.selectData = data
break break
// default :
// this._page();
case 'changeSize': case 'changeSize':
// this._page() // this._page()
break break
} }
},
_btnClick(msg) {
switch (msg) {
case '导出':
if (this.getPage.records.length === 0) {
this.$Message.warning('暂无数据,不可导出!')
} else {
this._export()
}
break
}
},
/** *********************************************导出*****************************************/
_export() {
if (this.selectData.length === 0) {
// 导出全部数据
this._exportOk(this.getPage.total)
} else {
// 只导出选中的数据
this._exportOk(this.selectData.length)
}
},
_exportOk(length) {
this.$Message.destroy()
this.$Modal.confirm({
title: '提示',
content: '确定导出这' + length + '条数据?',
onOk: () => {
if (this.selectData.length > 0) {
this.$exportExcel(
'groupStatisticTable',
'项目统计信息',
this.pageColumns,
this.selectData
)
} else {
this.$Message.loading({
content: '正在处理,请稍后...',
duration: 0
})
this.$store
.dispatch('EnvItem/yearTestDetail', this._searchParams())
.then(() => {
const result = this.$store.state.EnvItem.page.records
this.$exportExcel(
'groupStatisticTable',
'项目统计信息',
this.pageColumns,
result
)
})
}
}
})
},
// 参数
_searchParams() {
const data = this.$serialize('search-personal-detail')
Object.assign(data, this.formObj)
return this.$extend(data, { page: 1, rows: this.$exportRows() })
} }
/** *********************************************导出*****************************************/
} }
} }
</script> </script>
...@@ -8,112 +8,283 @@ ...@@ -8,112 +8,283 @@
<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 label="客户名称:"> <Form-item label="委托日期:">
<Input v-model="tempData.customer" @on-click="_selectCustomer" @on-change="_cusChange"
placeholder="请选择客户名称" class="width-200" clearable icon="plus" readonly/>
</Form-item>
<Form-item label="制单日期:">
<el-date-picker <el-date-picker
v-model="queryDate" v-model="queryDate"
@change="_dateChange"
type="monthrange" type="monthrange"
range-separator="-" range-separator="-"
start-placeholder="开始月份" start-placeholder="开始月份"
end-placeholder="结束月份" end-placeholder="结束月份"
size="small" size="small"
value-format="yyyy-MM"> value-format="yyyy-MM"
@change="_dateChange">
</el-date-picker> </el-date-picker>
</Form-item> </Form-item>
<Form-item class="search-btn"> <Form-item class="search-btn">
<Button @click="_search" type="primary">搜索</Button> <Button type="primary" class="width-80" @click="_getData">搜索</Button>
</Form-item> </Form-item>
</Form> </Form>
</div> </div>
<div class="fr"> <div class="fr">
<Button @click="_export" class="width-80">导出</Button> <Button class="width-80" @click="_exportSampleForm">导出</Button>
</div> </div>
<div class="clear"></div> <div class="clear"></div>
</Col> </Col>
<!--内容--> <!--内容-->
<Col span="24"> <Col span="24">
<Row :gutter="16"> <Row :gutter="16">
<Col span="24"> <Col span="14">
<!--table--> <ElTableNoPage id="table-year" ref="pageTable" :table-height="tableHeight"
<CustomerTable ref="tableModal" @on-result-change="_customerChange"></CustomerTable> :get-page="getPage" hide-checkbox @on-result-change="_tableResultChange" >
<el-table-column fixed type="index" label="序号" width="100">
</el-table-column>
<el-table-column
v-for="item in pageColumns"
:key="item.key"
:prop="item.key"
:label="item.title"
:width="item.width"
:min-width="200"
:fixed="item.fixed?item.fixed:undefined">
<template slot-scope="scope">
<div v-if="item.detail"><a @click.stop="_detailModal(scope.row)">{{scope.row[item.key]}}</a></div>
<span v-else>{{scope.row[item.key]}}</span>
</template>
</el-table-column>
</ElTableNoPage>
</Col> </Col>
<Col span="10"> <Col span="10">
<!--pie--> <!--pie-->
<!-- <CustomerPie ref="pieModal"></CustomerPie>--> <UserTestPie ref="testPieModal"></UserTestPie>
</Col> </Col>
</Row> </Row>
</Col> </Col>
</Row> </Row>
</div> </div>
</div> </div>
<!--选择客户--> <!--检测项目详情-->
<Customer ref="cunstomerModal" @on-result-change="_customerResult"></Customer> <Detail ref="detailModal"></Detail>
</div> </div>
</template> </template>
<script> <script>
import Customer from '../../../components/user-info/customer' import { meterSample } from '../../../api'
import CustomerTable from './CustomerTable' import UserTestPie from './UserTestPie'
import Detail from './Detail'
export default { export default {
components: { components: {
CustomerTable, UserTestPie,
Customer Detail
}, },
data() { data() {
const now = new Date() const date = this.$dateformat(new Date(), 'yyyy-mm')
const date = this.$dateformat(now, 'yyyy-mm')
return { return {
beginDate: new Date(),
endDate: new Date(),
groupId: '',
groupName: '',
tester: '',
testerId: '',
pageColumns: [
{ title: '委托单位', key: 'client', detail: true },
{ title: '委托数量', key: 'quantity' },
{ title: '委托额度', key: 'fee' }
],
groupData: [],
getPage: {
records: []
},
formObj: {
edateBegin: undefined,
edateEnd: undefined
},
tempData: { tempData: {
queryDateBegin: date, groupId: '',
queryDateEnd: date, groupName: '',
customer: '' beginDate: date,
endDate: date
}, },
queryDate: [date, date] testerData: [],
queryDate: [date, date],
serviceType: '',
serviceTypeList: []
}
},
computed: {
tableHeight: function() {
return this.$tableHeight('search')
} }
}, },
mounted() { mounted() {
this._search() this.$refs.pageTable._hideLoading()
// this._contHide()
// this._getUserGroup()
this.formObj.edateBegin = this.tempData.beginDate
this.formObj.edateEnd = this.tempData.endDate
this._getData()
// this._getServiceTypeList()
}, },
methods: { methods: {
// 服务类型
_getData: async function() {
const result = await meterSample.pageCustomerEntrustStatistics(
this.formObj
)
if (result) {
this.getPage.records = result
this.$refs.testPieModal._openPie(this.getPage.records)
}
},
// 检测项目详情
_detailModal(data) {
const obj = {
testerIds: [data.testerId],
groupIds: this.groupIds,
beginDate: this.tempData.beginDate,
endDate: this.tempData.endDate
}
console.log(obj)
// this.$refs.detailModal._open(obj)
},
_dateChange(data) { _dateChange(data) {
if (data) { if (data) {
this.tempData.queryDateBegin = data[0] this.formObj.edateBegin = data[0]
this.tempData.queryDateEnd = data[1] this.formObj.edateEnd = data[1]
} else { } else {
this.tempData.queryDateBegin = '' this.tempData.edateBegin = ''
this.tempData.queryDateEnd = '' this.tempData.edateEnd = ''
} }
}, },
_open() { _contHide() {
this.$refs.tableModal._openTable(this.tempData) this.tempData.beginDate = this.$dateformat(new Date(), 'yyyy-mm')
// this.$refs.pieModal._openAllPie(this.tempData) this.tempData.endDate = this.$dateformat(new Date(), 'yyyy-mm')
// this._page()
// this._getById()
},
_page() {
const data = {}
if (this.groupId) {
data.groupId = this.groupId
}
if (this.tester && this.testerId) {
data.testerId = this.testerId
} else {
this.testerId = ''
}
if (this.tempData.beginDate) {
data.beginDate = this.tempData.beginDate
}
if (this.tempData.endDate) {
data.endDate = this.tempData.endDate
}
if (this.serviceType) {
data.serviceType = this.serviceType
}
this.$refs.pageTable._page(
'search-form',
'FoodItem/pagePersonalTask',
data
)
},
_formSearch() {
this.$refs.pageTable._pageChange(1)
}, },
_search() { _search() {
this._open() this.tempData.groupId = this.groupId
this.tempData.groupName = this.groupId ? this.groupName : ''
this.tempData.serviceType = this.serviceType ? this.serviceType : ''
this.$refs.testPieModal._openPie(this.tempData)
this._formSearch()
},
_tableResultChange(msg, data) {
switch (msg) {
case 'changeSize':
// this._page()
break
}
}, },
_export() { /** *********************************导出-begin*********************************************/
this.$refs.tableModal._exportSampleForm() _exportSampleForm() {
let result = []
this.$store
.dispatch('FoodItem/pagePersonalTask', this._searchParams())
.then(() => {
result = this.$store.state.FoodItem.page.records
this.$Modal.confirm({
title: '提示',
content: '确定导出全部数据?',
onOk: () => {
this.$exportExcel(
'personalTestNum',
'个人检测量统计表',
this.pageColumns,
result
)
}
})
})
},
// 参数
_searchParams() {
const data = {}
if (this.groupId) {
data.groupId = this.groupId
}
if (this.tester && this.testerId) {
data.testerId = this.testerId
} else {
this.testerId = ''
}
if (this.tempData.beginDate) {
data.beginDate = this.tempData.beginDate
}
if (this.tempData.endDate) {
data.endDate = this.tempData.endDate
}
return this.$extend(data, { page: 1, rows: 5000 })
}, },
_selectCustomer() { /** *********************************导出样品台账-end*********************************************/
this.$refs.cunstomerModal._open() _getUserGroup() {
this.$store.dispatch('LmsUserGroup/list').then(() => {
this.groupData = this.$store.state.LmsUserGroup.list
})
}, },
_customerResult(data) { // 主检人&检测科室
this.tempData.customer = data.cname _groupChange(data) {
this._search() if (data) {
this.groupName = data.label
this.groupId = data.value
this.testerId = ''
this.tester = ''
this._getUserList(data.value)
}
}, },
_customerChange(data) { _getUserList(groupId, realname) {
// this.$refs.pieModal._openPie(data, this.tempData) const data = { page: 1, rows: 50 }
if (groupId) {
Object.assign(data, { groupId: groupId })
}
if (realname) {
Object.assign(data, { realname: realname })
}
this.$store.dispatch('LmsUserGroup/getUserByGroupId', data).then(() => {
this.testerData = this.$store.state.LmsUserGroup.userPage.records
})
}, },
// 选择人员为空的情况 _testerChange(msg, data) {
_cusChange(data) { switch (msg) {
if (data.target.value === '') { case 'select':
this.tempData.customer = '' this.tester = data.realname
this._search() this.testerId = data.userId
break
case 'blur':
this.tester = ''
break
case 'query':
this.tester = data.realname
this._getUserList('', data.realname)
break
} }
} }
} }
......
<template>
<div class="border-chart-color">
<div class="chartTitle">
<label>{{groupName}} 客户委托量比率</label>
</div>
<div :style="heightObj" class="chartCont">
<div v-if="showStatistic" style="width:90%">
<IEcharts :option="option" :style="optionObj"></IEcharts>
</div>
<div v-else :style="noDataObj" class="no-statistic-bg"></div>
</div>
<form id="persontal-task-pie">
<input name="groupId" type="hidden"/>
<input name="beginDate" type="hidden"/>
<input name="endDate" type="hidden"/>
<input name="groupName" type="hidden"/>
<input name="serviceType" type="hidden"/>
</form>
</div>
</template>
<script>
// import IEcharts from 'vue-echarts-v3/src/full'
export default {
// components: { IEcharts },
data() {
return {
// 科室名称
groupName: '',
showStatistic: true,
heightObj: {
height: '300px'
},
option: {
title: {
x: 'center',
textStyle: {
fontSize: 14,
fontWeight: 'normal'
}
},
tooltip: {
trigger: 'item',
formatter: function(a) {
return (
a.name +
'</br>样品量: ' +
a.data.value +
'<br>占比: ' +
a.percent +
'%'
)
}
},
legend: {
type: 'scroll',
orient: 'vertical',
right: 0,
top: 20,
bottom: 20,
data: []
},
color: this.$echartColor,
series: [
{
name: '访问来源',
type: 'pie',
radius: ['50%', '70%'],
avoidLabelOverlap: false,
label: {
show: false,
position: 'center'
},
emphasis: {
label: {
show: true,
fontSize: '30',
fontWeight: 'bold'
}
},
labelLine: {
show: false
},
data: []
}
]
},
optionObj: {
height: ''
},
noDataObj: {
marginTop: ''
}
}
},
mounted() {
this._contHide()
},
methods: {
_contHide() {
this.optionObj.height = document.documentElement.clientHeight - 300 + 'px'
this.heightObj.height = document.documentElement.clientHeight - 272 + 'px'
this.noDataObj.marginTop =
(document.documentElement.clientHeight - 450) / 2 + 'px'
this.optionObj.width =
(document.documentElement.clientWidth - 200) / 2.6 + 'px'
},
_openPie(data) {
const testerList = []
const seriesList = []
let total = 0
for (let i = 0; i < data.length; i++) {
testerList.push(data[i].client)
total = total + data[i].quantity
seriesList.push({
value: data[i].quantity,
name: data[i].client,
total: data[i].quantity
})
}
this.option.title.text = '委托单总量(个):' + total
this.option.legend.data = testerList
this.option.series[0].data = seriesList
console.log(this.option.series[0].data)
},
_searchParams() {
const data = this.$serialize('persontal-task-pie')
return this.$extend(data)
}
}
}
</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