|
|
@@ -161,7 +161,7 @@
|
|
|
export default {
|
|
|
name: 'index',
|
|
|
|
|
|
- data() {
|
|
|
+ data () {
|
|
|
return {
|
|
|
// dimension 信息
|
|
|
// btndim: 2,
|
|
|
@@ -171,11 +171,11 @@
|
|
|
// 饼状图&柱状图
|
|
|
deviceChartPie: null,
|
|
|
deviceChartBar: null,
|
|
|
- //折线图
|
|
|
- deviceContractline: null, //合同
|
|
|
- deviceCustomerline: null, //客户
|
|
|
- deviceCollectionline: null, //样本采集
|
|
|
- devicePrepareline: null, //制备
|
|
|
+ // 折线图
|
|
|
+ deviceContractline: null, // 合同
|
|
|
+ deviceCustomerline: null, // 客户
|
|
|
+ deviceCollectionline: null, // 样本采集
|
|
|
+ devicePrepareline: null, // 制备
|
|
|
// num: 0,
|
|
|
usertotal: {},
|
|
|
user: {
|
|
|
@@ -184,31 +184,31 @@
|
|
|
Realname: '',
|
|
|
host: ''
|
|
|
},
|
|
|
- contracttotal: { //合同统计
|
|
|
- Total: 0, //总数
|
|
|
- Inprogress: 0, //执行中
|
|
|
- Addcontract: 0, //本月新增
|
|
|
- MonthTotal: [] //月总数
|
|
|
+ contracttotal: { // 合同统计
|
|
|
+ Total: 0, // 总数
|
|
|
+ Inprogress: 0, // 执行中
|
|
|
+ Addcontract: 0, // 本月新增
|
|
|
+ MonthTotal: [] // 月总数
|
|
|
},
|
|
|
- customertotal: { //客户统计
|
|
|
- Total: 0, //总数
|
|
|
- Addcontract: 0, //本月新增
|
|
|
- MonthTotal: [] //月总数
|
|
|
+ customertotal: { // 客户统计
|
|
|
+ Total: 0, // 总数
|
|
|
+ Addcontract: 0, // 本月新增
|
|
|
+ MonthTotal: [] // 月总数
|
|
|
},
|
|
|
- collectiontotal: { //样本采集统计
|
|
|
- Total: 0, //总数
|
|
|
- Addcontract: 0, //本月新增
|
|
|
- MonthTotal: [] //月总数
|
|
|
+ collectiontotal: { // 样本采集统计
|
|
|
+ Total: 0, // 总数
|
|
|
+ Addcontract: 0, // 本月新增
|
|
|
+ MonthTotal: [] // 月总数
|
|
|
},
|
|
|
- preparetotal: { //制备统计
|
|
|
- InPreparation: 0, //制备中
|
|
|
- EndPreparation: 0, //制备完成
|
|
|
- MonthTotal: [] //月总数
|
|
|
+ preparetotal: { // 制备统计
|
|
|
+ InPreparation: 0, // 制备中
|
|
|
+ EndPreparation: 0, // 制备完成
|
|
|
+ MonthTotal: [] // 月总数
|
|
|
},
|
|
|
- tjzztitles: [], //样本统计图
|
|
|
- tjzzdata: [], //样本统计图
|
|
|
- tjdevicex: [], //容器统计图
|
|
|
- tjdevicey: [], //容器统计图
|
|
|
+ tjzztitles: [], // 样本统计图
|
|
|
+ tjzzdata: [], // 样本统计图
|
|
|
+ tjdevicex: [], // 容器统计图
|
|
|
+ tjdevicey: [], // 容器统计图
|
|
|
tjdevicecolor: [
|
|
|
'#6A5ACD', '#B5C334', '#FCCE10', '#E87C25', '#27727B', '#FE8463', '#9BCA63', '#FAD860', '#F3A43B',
|
|
|
'#60C0DD', '#E87C25', '#27727B', '#FE8463'
|
|
|
@@ -216,12 +216,12 @@
|
|
|
downloading: true
|
|
|
}
|
|
|
},
|
|
|
- created() {
|
|
|
+ created () {
|
|
|
this.initData()
|
|
|
- this.getContractinfo() //合同统计
|
|
|
- this.getCustomerinfo() //客户统计
|
|
|
- this.getCollectioninfo() //采集
|
|
|
- this.getPrepareinfo() //制备
|
|
|
+ this.getContractinfo() // 合同统计
|
|
|
+ this.getCustomerinfo() // 客户统计
|
|
|
+ this.getCollectioninfo() // 采集
|
|
|
+ this.getPrepareinfo() // 制备
|
|
|
let _this = this
|
|
|
_this.user.photo = _this.authUser.Profile.Photo
|
|
|
_this.user.name = _this.authUser.Profile.name
|
|
|
@@ -232,7 +232,7 @@
|
|
|
authUser: 'authUser'
|
|
|
}),
|
|
|
methods: {
|
|
|
- initData() {
|
|
|
+ initData () {
|
|
|
let _this = this
|
|
|
this.$axios.get('/users/getaccountingo', {})
|
|
|
.then(res => {
|
|
|
@@ -242,11 +242,12 @@
|
|
|
})
|
|
|
.catch(err => {
|
|
|
// handle error
|
|
|
+ this.downloading = false
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
- //获取合同信息
|
|
|
- getContractinfo() {
|
|
|
+ // 获取合同信息
|
|
|
+ getContractinfo () {
|
|
|
let _this = this
|
|
|
this.$axios.get('/cellstotal/getcontractinfo', {})
|
|
|
.then(res => {
|
|
|
@@ -260,15 +261,15 @@
|
|
|
length - 1 - index].Month
|
|
|
total[index] = _this.contracttotal.MonthTotal[length - 1 - index].Count
|
|
|
}
|
|
|
- _this.drawContractline('deviceContractline', time, total) //合同
|
|
|
+ _this.drawContractline('deviceContractline', time, total) // 合同
|
|
|
})
|
|
|
.catch(err => {
|
|
|
// handle error
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
- //获取客户信息
|
|
|
- getCustomerinfo() {
|
|
|
+ // 获取客户信息
|
|
|
+ getCustomerinfo () {
|
|
|
let _this = this
|
|
|
this.$axios.get('/cellstotal/getcustomerinfo', {})
|
|
|
.then(res => {
|
|
|
@@ -282,15 +283,15 @@
|
|
|
length - 1 - index].Month
|
|
|
total[index] = _this.customertotal.MonthTotal[length - 1 - index].Count
|
|
|
}
|
|
|
- _this.drawContractline('deviceCustomerline', time, total) //客户
|
|
|
+ _this.drawContractline('deviceCustomerline', time, total) // 客户
|
|
|
})
|
|
|
.catch(err => {
|
|
|
// handle error
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
- //获取采集信息
|
|
|
- getCollectioninfo() {
|
|
|
+ // 获取采集信息
|
|
|
+ getCollectioninfo () {
|
|
|
let _this = this
|
|
|
this.$axios.get('/cellstotal/getcollectioninfo', {})
|
|
|
.then(res => {
|
|
|
@@ -304,15 +305,15 @@
|
|
|
length - 1 - index].Month
|
|
|
total[index] = _this.collectiontotal.MonthTotal[length - 1 - index].Count
|
|
|
}
|
|
|
- _this.drawContractline('deviceCollectionline', time, total) //样本采集
|
|
|
+ _this.drawContractline('deviceCollectionline', time, total) // 样本采集
|
|
|
})
|
|
|
.catch(err => {
|
|
|
// handle error
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
- //获取制备信息
|
|
|
- getPrepareinfo() {
|
|
|
+ // 获取制备信息
|
|
|
+ getPrepareinfo () {
|
|
|
let _this = this
|
|
|
this.$axios.get('/cellstotal/getprepareinfo', {})
|
|
|
.then(res => {
|
|
|
@@ -326,14 +327,14 @@
|
|
|
length - 1 - index].Month
|
|
|
total[index] = _this.preparetotal.MonthTotal[length - 1 - index].Count
|
|
|
}
|
|
|
- _this.drawContractline('devicePrepareline', time, total) //制备
|
|
|
+ _this.drawContractline('devicePrepareline', time, total) // 制备
|
|
|
})
|
|
|
.catch(err => {
|
|
|
// handle error
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
- getgroupzzqg() {
|
|
|
+ getgroupzzqg () {
|
|
|
let _this = this
|
|
|
_this.$axios.get('/users/gettotalbysampletype', {})
|
|
|
.then(res => {
|
|
|
@@ -365,7 +366,7 @@
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
- getgroupdevice() {
|
|
|
+ getgroupdevice () {
|
|
|
let _this = this
|
|
|
_this.$axios.get('/users/gettotalbygroupbydevice', {})
|
|
|
.then(res => {
|
|
|
@@ -387,7 +388,7 @@
|
|
|
})
|
|
|
},
|
|
|
// 统计样本总数的饼状图
|
|
|
- drawPieChart() {
|
|
|
+ drawPieChart () {
|
|
|
var chartPie = echarts.init(document.getElementById('deviceChartPie'))
|
|
|
chartPie.setOption({
|
|
|
title: {
|
|
|
@@ -418,8 +419,8 @@
|
|
|
}]
|
|
|
})
|
|
|
},
|
|
|
- //容器数据统计柱状图
|
|
|
- drawBarChart() {
|
|
|
+ // 容器数据统计柱状图
|
|
|
+ drawBarChart () {
|
|
|
let _this = this
|
|
|
var chartBar = echarts.init(document.getElementById('deviceChartBar'))
|
|
|
chartBar.setOption({
|
|
|
@@ -458,8 +459,8 @@
|
|
|
}]
|
|
|
})
|
|
|
},
|
|
|
- //折线图
|
|
|
- drawContractline(val, xdata, ydata) {
|
|
|
+ // 折线图
|
|
|
+ drawContractline (val, xdata, ydata) {
|
|
|
let _this = this
|
|
|
var chartBar = echarts.init(document.getElementById(val))
|
|
|
chartBar.setOption({
|
|
|
@@ -485,7 +486,6 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
</script>
|
|
|
|
|
|
<style lang="css">
|