Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
patzn-cloud-web-back-soil
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangweidong
patzn-cloud-web-back-soil
Commits
c87e3b33
Commit
c87e3b33
authored
Jul 01, 2020
by
lichengming
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://git.patzn.com/root/patzn-cloud-service-metr-web
into dev
parents
e293af40
135c9927
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
61 additions
and
93 deletions
+61
-93
meter-sample.js
api/meter/meter-sample.js
+4
-0
MeterAnnualEntrust.vue
pages/meter-statistics/annual-entrust/MeterAnnualEntrust.vue
+20
-13
YearContractBar.vue
pages/meter-statistics/annual-entrust/YearContractBar.vue
+12
-7
YearContractPie.vue
pages/meter-statistics/annual-entrust/YearContractPie.vue
+12
-31
YearContractTable.vue
pages/meter-statistics/annual-entrust/YearContractTable.vue
+13
-42
No files found.
api/meter/meter-sample.js
View file @
c87e3b33
...
@@ -203,5 +203,9 @@ export default {
...
@@ -203,5 +203,9 @@ export default {
pagePersonalTaskStatistics
:
data
=>
pagePersonalTaskStatistics
:
data
=>
http
http
.
post
(
'meter/v1/sample/page_personal_task_statistics'
,
data
)
.
post
(
'meter/v1/sample/page_personal_task_statistics'
,
data
)
.
then
(
res
=>
res
),
pageAnnualEntrustStatistics
:
data
=>
http
.
post
(
'meter/v1/sample/page_annual_entrust_statistics'
,
data
)
.
then
(
res
=>
res
)
.
then
(
res
=>
res
)
}
}
pages/meter-statistics/annual-entrust/MeterAnnualEntrust.vue
View file @
c87e3b33
...
@@ -8,14 +8,14 @@
...
@@ -8,14 +8,14 @@
<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=
"
委托
日期:"
>
<DatePicker
v-model=
"
date"
:editable=
"false"
@
on-change=
"_dateChange"
:clearable=
"false"
type=
"year
"
<DatePicker
v-model=
"
entrustDate"
:editable=
"false"
:clearable=
"false"
type=
"year"
style=
"width:90px
"
style=
"width:90px
"
></DatePicker>
@
on-change=
"_dateChange
"
></DatePicker>
</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=
"_export
"
>
导出
</Button>
</div>
</div>
<div
class=
"clear"
></div>
<div
class=
"clear"
></div>
</Col>
</Col>
...
@@ -43,6 +43,7 @@
...
@@ -43,6 +43,7 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
meterSample
}
from
'../../../api'
import
YearContractTable
from
'./YearContractTable'
import
YearContractTable
from
'./YearContractTable'
import
YearContractBar
from
'./YearContractBar'
import
YearContractBar
from
'./YearContractBar'
import
YearContractPie
from
'./YearContractPie'
import
YearContractPie
from
'./YearContractPie'
...
@@ -55,22 +56,28 @@ export default {
...
@@ -55,22 +56,28 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
date
:
new
Date
()
entrustDate
:
new
Date
(),
formObj
:
{}
}
}
},
},
mounted
()
{
mounted
()
{
this
.
_
open
(
)
this
.
_
getData
(
this
.
entrustDate
.
getFullYear
()
)
},
},
methods
:
{
methods
:
{
_open
()
{
_getData
:
async
function
(
data
)
{
this
.
$refs
.
tableModal
.
_openTable
(
this
.
date
.
getFullYear
())
this
.
formObj
.
entrustDate
=
data
this
.
$refs
.
barModal
.
_openBar
(
this
.
date
.
getFullYear
())
const
result
=
await
meterSample
.
pageAnnualEntrustStatistics
(
this
.
formObj
)
this
.
$refs
.
pieModal
.
_openPie
(
this
.
date
.
getFullYear
())
if
(
result
)
{
this
.
_open
(
result
)
}
},
_open
(
data
)
{
this
.
$refs
.
tableModal
.
_openTable
(
this
.
entrustDate
.
getFullYear
(),
data
)
this
.
$refs
.
barModal
.
_openBar
(
this
.
entrustDate
.
getFullYear
(),
data
)
this
.
$refs
.
pieModal
.
_openPie
(
this
.
entrustDate
.
getFullYear
(),
data
)
},
},
_dateChange
(
data
)
{
_dateChange
(
data
)
{
this
.
$refs
.
tableModal
.
_openTable
(
data
)
this
.
_getData
(
data
)
this
.
$refs
.
barModal
.
_openBar
(
data
)
this
.
$refs
.
pieModal
.
_openPie
(
data
)
},
},
_export
()
{
_export
()
{
this
.
$refs
.
tableModal
.
_exportSampleForm
()
this
.
$refs
.
tableModal
.
_exportSampleForm
()
...
...
pages/meter-statistics/annual-entrust/YearContractBar.vue
View file @
c87e3b33
...
@@ -92,13 +92,13 @@ export default {
...
@@ -92,13 +92,13 @@ export default {
{
{
name
:
'委托量'
,
name
:
'委托量'
,
type
:
'bar'
,
type
:
'bar'
,
data
:
[
0
,
100
,
80
,
90
,
0
,
200
,
0
,
0
,
0
,
0
,
0
,
0
]
data
:
[]
},
},
{
{
name
:
'委托金额'
,
name
:
'委托金额'
,
type
:
'line'
,
type
:
'line'
,
yAxisIndex
:
1
,
yAxisIndex
:
1
,
data
:
[
0
,
200
,
150
,
60
,
0
,
100
,
0
,
0
,
0
,
0
,
0
,
0
]
data
:
[]
}
}
]
]
},
},
...
@@ -120,17 +120,22 @@ export default {
...
@@ -120,17 +120,22 @@ export default {
this
.
heightObj
.
height
=
this
.
heightObj
.
height
=
(
document
.
documentElement
.
clientHeight
-
272
)
*
(
2
/
3
)
+
'px'
(
document
.
documentElement
.
clientHeight
-
272
)
*
(
2
/
3
)
+
'px'
},
},
_openBar
(
data
)
{
_openBar
(
data
,
result
)
{
console
.
log
(
'data'
,
data
)
console
.
log
(
'data'
,
data
)
this
.
year
=
data
this
.
year
=
data
this
.
option
.
xAxis
[
0
].
data
=
[]
this
.
option
.
xAxis
[
0
].
data
=
[]
for
(
let
i
=
1
;
i
<
13
;
i
++
)
{
if
(
result
.
length
===
0
)
{
if
(
i
<
10
)
{
this
.
option
.
xAxis
[
0
].
data
=
[]
this
.
option
.
xAxis
[
0
].
data
.
push
(
data
+
'-0'
+
i
)
this
.
option
.
series
[
0
].
data
=
[]
this
.
option
.
series
[
1
].
data
=
[]
}
else
{
}
else
{
this
.
option
.
xAxis
[
0
].
data
.
push
(
data
+
'-'
+
i
)
for
(
let
i
=
0
;
i
<
result
.
length
;
i
++
)
{
this
.
option
.
xAxis
[
0
].
data
.
push
(
result
[
i
].
entrustDate
)
this
.
option
.
series
[
0
].
data
.
push
(
result
[
i
].
quantity
)
this
.
option
.
series
[
1
].
data
.
push
(
result
[
i
].
fee
)
}
}
}
}
// this.$store
// this.$store
// .dispatch('StatisticContract/pageYearContract', { year: data })
// .dispatch('StatisticContract/pageYearContract', { year: data })
// .then(() => {
// .then(() => {
...
...
pages/meter-statistics/annual-entrust/YearContractPie.vue
View file @
c87e3b33
...
@@ -61,13 +61,7 @@ export default {
...
@@ -61,13 +61,7 @@ export default {
type: 'pie',
type: 'pie',
radius: ['30%', '65%'],
radius: ['30%', '65%'],
center: ['40%', '50%'],
center: ['40%', '50%'],
data: [
data: [],
{ value: 335, name: '直接访问' },
{ value: 310, name: '邮件营销' },
{ value: 234, name: '联盟广告' },
{ value: 135, name: '视频广告' },
{ value: 1548, name: '搜索引擎' }
],
label: {
label: {
normal: {
normal: {
show: false
show: false
...
@@ -102,36 +96,23 @@ export default {
...
@@ -102,36 +96,23 @@ export default {
this.heightObj.height =
this.heightObj.height =
(document.documentElement.clientHeight - 272) * (2 / 3) + 'px'
(document.documentElement.clientHeight - 272) * (2 / 3) + 'px'
},
},
_openPie(data) {
_openPie(data
, result
) {
this.showStatistic = true
this.showStatistic = true
// this._page(data
)
this._page(data, result
)
},
},
_page(data) {
_page(data
, result
) {
this.year = data
this.year = data
this.$store
if (result.length === 0) {
.dispatch('StatisticContract/pageYearContract', { year: data })
.then(() => {
const pie = this.$store.state.StatisticContract.page
let num = 0
this.option.series[0].data = []
this.option.series[0].data = []
this.option.legend.data = []
for (let i = 0; i < pie.length; i++) {
this.option.series[0].data.push({
value: pie[i].price,
name: pie[i].yearMonth,
items: pie[i].radio
})
this.option.legend.data.push(pie[i].yearMonth)
num += pie[i].price
}
this.option.title.text = data + '年委托总金额(元):' + num
if (pie.length === 0) {
this.showStatistic = false
} else {
} else {
this.showStatistic = true
for (let i = 0; i < result.length; i++) {
const obj = {}
obj.name = result[i].entrustDate
obj.value = result[i].quantity
obj.fee = result[i].fee
this.option.series[0].data.push(obj)
}
}
}
})
},
},
_searchParams() {
_searchParams() {
const data = this.$serialize('customer-contract-pie')
const data = this.$serialize('customer-contract-pie')
...
...
pages/meter-statistics/annual-entrust/YearContractTable.vue
View file @
c87e3b33
...
@@ -20,16 +20,16 @@
...
@@ -20,16 +20,16 @@
<!--</PTVXETable>-->
<!--</PTVXETable>-->
<!--合计 暂时用此表格-->
<!--合计 暂时用此表格-->
<ElTableNoPage
id=
"table-year"
ref=
"pageTable"
:table
Height=
"300
"
<ElTableNoPage
id=
"table-year"
ref=
"pageTable"
:table
-height=
"tableHeight
"
@
on-result-change=
"_tableResultChange"
:getPage=
"getPage"
hide-checkbox
show-summary=
"tru
e"
>
:get-page=
"getPage"
hide-checkbox
show-summary=
"true"
@
on-result-change=
"_tableResultChang
e"
>
<el-table-column
<el-table-column
v-for=
"item in pageColumns"
:key=
"item.key"
:prop=
"item.key"
:prop=
"item.key"
:label=
"item.title"
:label=
"item.title"
:width=
"item.width"
:width=
"item.width"
:min-width=
"200"
:min-width=
"200"
:fixed=
"item.fixed?item.fixed:undefined"
:fixed=
"item.fixed?item.fixed:undefined"
sortable
>
v-for=
"item in pageColumns"
:key=
"item.key"
sortable
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<div
v-if=
"item.detail"
><a
@
click
.
stop=
"_detailModal(scope.row)"
>
{{
scope
.
row
[
item
.
key
]
}}
</a></div>
<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>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
...
@@ -53,60 +53,31 @@ export default {
...
@@ -53,60 +53,31 @@ export default {
pageColumns
:
[
pageColumns
:
[
{
{
title
:
'签订日期'
,
title
:
'签订日期'
,
key
:
'
yearMonth
'
,
key
:
'
entrustDate
'
,
width
:
200
,
width
:
200
,
detail
:
true
,
detail
:
true
,
month
:
true
month
:
true
},
},
{
title
:
'委托数量'
,
key
:
'total'
},
{
title
:
'委托数量'
,
key
:
'quantity'
},
{
title
:
'委托额度'
,
key
:
'price'
},
{
title
:
'委托额度'
,
key
:
'fee'
}
{
title
:
'实收额度'
,
key
:
'collectPrice'
},
{
title
:
'未收额度'
,
key
:
'noCollectPrice'
}
],
],
getPage
:
{
getPage
:
{
records
:
[
records
:
[]
{
yearMonth
:
'2020-6'
,
price
:
'230'
,
total
:
'1'
,
collectPrice
:
'200'
,
noCollectPrice
:
'30'
},
{
yearMonth
:
'2020-7'
,
price
:
'260'
,
total
:
'2'
,
collectPrice
:
'230'
,
noCollectPrice
:
'30'
}
]
},
},
year
:
''
year
:
''
}
}
},
},
methods
:
{
methods
:
{
_openTable
(
data
)
{
_openTable
(
data
,
result
)
{
this
.
year
=
data
this
.
year
=
data
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
$refs
.
pageTable
.
_hideLoading
()
// this._page(
)
this
.
_page
(
result
)
},
},
_page
()
{
_page
(
data
)
{
const
data
=
{}
this
.
getPage
.
records
=
data
if
(
this
.
year
)
{
data
.
year
=
this
.
year
}
this
.
$refs
.
pageTable
.
_page
(
'year-contract-table'
,
'StatisticContract/pageYearContract'
,
data
)
},
},
_tableResultChange
(
msg
,
data
)
{
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
switch
(
msg
)
{
case
'page'
:
this
.
getPage
.
records
=
this
.
$store
.
state
.
StatisticContract
.
page
this
.
$refs
.
pageTable
.
_hideLoading
()
break
case
'changeSize'
:
case
'changeSize'
:
// this._page()
// this._page()
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
$refs
.
pageTable
.
_hideLoading
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment