Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dcxy-system
Project
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
姜雷
dcxy-system
Commits
0b2c858f
Commit
0b2c858f
authored
Apr 29, 2019
by
姜雷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整储值和消费的筛选条件
parent
92db5481
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
53 additions
and
111 deletions
+53
-111
CustomerConsumption.vue
...ers/Dashboard/CustomerConsumption/CustomerConsumption.vue
+2
-38
CustomerConsumptionStore.js
...Dashboard/CustomerConsumption/CustomerConsumptionStore.js
+10
-16
CustomerData.vue
src/containers/Dashboard/CustomerData/CustomerData.vue
+8
-7
CustomerDataStore.js
src/containers/Dashboard/CustomerData/CustomerDataStore.js
+15
-0
CustomerRecharge.vue
...ontainers/Dashboard/CustomerRecharge/CustomerRecharge.vue
+2
-30
CustomerRechargeStore.js
...iners/Dashboard/CustomerRecharge/CustomerRechargeStore.js
+10
-16
Dashboard.js
src/containers/Dashboard/Dashboard.js
+6
-4
No files found.
src/containers/Dashboard/CustomerConsumption/CustomerConsumption.vue
View file @
0b2c858f
...
@@ -3,40 +3,6 @@
...
@@ -3,40 +3,6 @@
class=
"CustomerConsumption"
class=
"CustomerConsumption"
v-loading=
"loading"
v-loading=
"loading"
>
>
<!--
<div
class=
"Dashboard-SearchBar"
>
<search-item
label=
"运营商"
>
<operator-select
:accessType=
"1"
:value=
"filters.operateId"
@
input=
"val => getConsumeOrderList(
{operateId: val})"
/>
</search-item>
<search-item
label=
"区域"
>
<area-select
:value=
"filters.areaId"
@
input=
"val => getConsumeOrderList(
{areaId: val})"
type="user"
/>
</search-item>
<el-radio-group
class=
"Dashboard-Radio"
:value=
"filters.timeType"
@
input=
"val => getConsumeOrderList(
{timeType: val})"
>
<el-radio
class=
"Dashboard-Radio-item"
:label=
"0"
>
本日
</el-radio>
<el-radio
class=
"Dashboard-Radio-item"
:label=
"1"
>
本月
</el-radio>
<el-radio
class=
"Dashboard-Radio-item"
:label=
"2"
>
本年
</el-radio>
</el-radio-group>
</div>
-->
<div
class=
"Dashboard-title"
>
消费视图
<div
class=
"Dashboard-title"
>
消费视图
<div
<div
class=
"CustomerConsumptionChart-tip"
class=
"CustomerConsumptionChart-tip"
...
@@ -69,10 +35,9 @@ export default {
...
@@ -69,10 +35,9 @@ export default {
Chart
,
Chart
,
},
},
computed
:
{
computed
:
{
...
mapGetters
(
'Dashboard/customerConsumption'
,
[
...
mapGetters
(
'Dashboard/customer
Data/customer
Consumption'
,
[
'consumeList'
,
'consumeList'
,
'consumeCount'
,
'consumeCount'
,
'filters'
,
'loading'
,
'loading'
,
]),
]),
},
},
...
@@ -80,8 +45,7 @@ export default {
...
@@ -80,8 +45,7 @@ export default {
this
.
initData
();
this
.
initData
();
},
},
methods
:
{
methods
:
{
...
mapActions
(
'Dashboard/customerConsumption'
,
[
...
mapActions
(
'Dashboard/customerData/customerConsumption'
,
[
'updateFilters'
,
'getConsumeOrderList'
,
'getConsumeOrderList'
,
]),
]),
initData
()
{
initData
()
{
...
...
src/containers/Dashboard/CustomerConsumption/CustomerConsumptionStore.js
View file @
0b2c858f
import
{
getConsumeOrderList
}
from
'@/api/dashboard/dashboard'
;
import
{
getConsumeOrderList
}
from
'@/api/dashboard/dashboard'
;
import
initFiltersStore
from
'@/store/modules/filters'
;
//
import initFiltersStore from '@/store/modules/filters';
import
{
getFilters
,
formatDate
}
from
'@/utils/index'
;
import
{
getFilters
,
formatDate
}
from
'@/utils/index'
;
const
FETCH_CONSUME_LIST
=
'FETCH_CONSUME_LIST'
;
const
FETCH_CONSUME_LIST
=
'FETCH_CONSUME_LIST'
;
const
FETCH_DATA
=
'FETCH_DATA'
;
const
FETCH_DATA
=
'FETCH_DATA'
;
const
initFilters
=
()
=>
({
//
const initFilters = () => ({
operateId
:
undefined
,
//
operateId: undefined,
areaId
:
undefined
,
//
areaId: undefined,
timeType
:
0
,
// 0 本日,1 本月, 2 本年
//
timeType: 0, // 0 本日,1 本月, 2 本年
});
//
});
const
filtersStore
=
initFiltersStore
(
initFilters
);
//
const filtersStore = initFiltersStore(initFilters);
const
nowTime
=
new
Date
();
const
nowTime
=
new
Date
();
const
state
=
()
=>
({
const
state
=
()
=>
({
...
@@ -28,15 +28,9 @@ const getters = {
...
@@ -28,15 +28,9 @@ const getters = {
};
};
const
actions
=
{
const
actions
=
{
getConsumeOrderList
({
commit
,
getters
,
dispatch
},
data
)
{
getConsumeOrderList
({
commit
,
rootGetters
}
)
{
commit
(
FETCH_DATA
,
true
);
commit
(
FETCH_DATA
,
true
);
if
(
data
)
{
let
entity
=
getFilters
(
rootGetters
[
'Dashboard/customerData/filters'
]);
if
(
data
.
operateId
)
{
data
.
areaId
=
undefined
;
}
dispatch
(
'updateFilters'
,
data
);
}
let
entity
=
getFilters
(
getters
.
filters
);
switch
(
entity
.
timeType
)
{
switch
(
entity
.
timeType
)
{
case
1
:
case
1
:
entity
.
month
=
formatDate
(
nowTime
,
'yyyy-MM'
);
entity
.
month
=
formatDate
(
nowTime
,
'yyyy-MM'
);
...
@@ -76,7 +70,7 @@ const mutations = {
...
@@ -76,7 +70,7 @@ const mutations = {
export
default
{
export
default
{
namespaced
:
true
,
namespaced
:
true
,
modules
:
{
filtersStore
},
//
modules: { filtersStore },
state
,
state
,
getters
,
getters
,
actions
,
actions
,
...
...
src/containers/Dashboard/CustomerData/CustomerData.vue
View file @
0b2c858f
...
@@ -59,18 +59,19 @@ export default {
...
@@ -59,18 +59,19 @@ export default {
CustomerConsumption
,
CustomerConsumption
,
},
},
computed
:
{
computed
:
{
...
mapGetters
(
'Dashboard/customer
Consumption
'
,
[
'filters'
]),
...
mapGetters
(
'Dashboard/customer
Data
'
,
[
'filters'
]),
},
},
methods
:
{
methods
:
{
...
mapActions
(
'Dashboard/customerConsumption'
,
[
...
mapActions
(
'Dashboard/customerData'
,
[
'updateFilters'
]),
...
mapActions
(
'Dashboard/customerData/customerConsumption'
,
[
'getConsumeOrderList'
,
'getConsumeOrderList'
,
'updateFilters'
,
]),
]),
...
mapActions
(
'Dashboard/customerRecharge'
,
[
'getRechargeOrderList'
]),
...
mapActions
(
'Dashboard/customerData/customerRecharge'
,
[
'getRechargeOrderList'
,
]),
fetchAllData
()
{
fetchAllData
()
{
let
entity
=
getFilters
(
this
.
filters
);
this
.
getConsumeOrderList
();
this
.
getConsumeOrderList
(
entity
);
this
.
getRechargeOrderList
();
this
.
getRechargeOrderList
(
entity
);
},
},
},
},
};
};
...
...
src/containers/Dashboard/CustomerData/CustomerDataStore.js
0 → 100644
View file @
0b2c858f
import
customerRecharge
from
'../CustomerRecharge/CustomerRechargeStore'
;
import
customerConsumption
from
'../CustomerConsumption/CustomerConsumptionStore'
;
import
initFiltersStore
from
'@/store/modules/filters'
;
const
initFilters
=
()
=>
({
operateId
:
undefined
,
areaId
:
undefined
,
timeType
:
0
,
// 0 本日,1 本月, 2 本年
});
const
filtersStore
=
initFiltersStore
(
initFilters
);
export
default
{
namespaced
:
true
,
modules
:
{
filtersStore
,
customerRecharge
,
customerConsumption
},
};
src/containers/Dashboard/CustomerRecharge/CustomerRecharge.vue
View file @
0b2c858f
...
@@ -3,33 +3,6 @@
...
@@ -3,33 +3,6 @@
class=
"CustomerRecharge"
class=
"CustomerRecharge"
v-loading=
"loading"
v-loading=
"loading"
>
>
<!--
<div
class=
"Dashboard-SearchBar"
>
<search-item
label=
"运营商"
>
<operator-select
:accessType=
"1"
:value=
"filters.operateId"
@
input=
"val => getRechargeOrderList(
{operateId: val})"
/>
</search-item>
<el-radio-group
class=
"Dashboard-Radio"
:value=
"filters.timeType"
@
input=
"val => getRechargeOrderList(
{timeType: val})"
>
<el-radio
class=
"Dashboard-Radio-item"
:label=
"0"
>
本日
</el-radio>
<el-radio
class=
"Dashboard-Radio-item"
:label=
"1"
>
本月
</el-radio>
<el-radio
class=
"Dashboard-Radio-item"
:label=
"2"
>
本年
</el-radio>
</el-radio-group>
</div>
-->
<div
class=
"Dashboard-title"
>
储值视图
<div
class=
"Dashboard-title"
>
储值视图
<div
class=
"CustomerRechargeChart-tip"
>
<div
class=
"CustomerRechargeChart-tip"
>
<span
<span
...
@@ -58,7 +31,7 @@ export default {
...
@@ -58,7 +31,7 @@ export default {
Chart
,
Chart
,
},
},
computed
:
{
computed
:
{
...
mapGetters
(
'Dashboard/customerRecharge'
,
[
...
mapGetters
(
'Dashboard/customer
Data/customer
Recharge'
,
[
'rechargeList'
,
'rechargeList'
,
'rechargeCount'
,
'rechargeCount'
,
'loading'
,
'loading'
,
...
@@ -68,8 +41,7 @@ export default {
...
@@ -68,8 +41,7 @@ export default {
this
.
initData
();
this
.
initData
();
},
},
methods
:
{
methods
:
{
...
mapActions
(
'Dashboard/customerRecharge'
,
[
...
mapActions
(
'Dashboard/customerData/customerRecharge'
,
[
'updateFilters'
,
'getRechargeOrderList'
,
'getRechargeOrderList'
,
]),
]),
initData
()
{
initData
()
{
...
...
src/containers/Dashboard/CustomerRecharge/CustomerRechargeStore.js
View file @
0b2c858f
import
{
getRechargeOrderList
}
from
'@/api/dashboard/dashboard'
;
import
{
getRechargeOrderList
}
from
'@/api/dashboard/dashboard'
;
import
initFiltersStore
from
'@/store/modules/filters'
;
//
import initFiltersStore from '@/store/modules/filters';
import
{
getFilters
,
formatDate
}
from
'@/utils'
;
import
{
getFilters
,
formatDate
}
from
'@/utils'
;
const
FETCH_RECHARGE_LIST
=
'FETCH_RECHARGE_LIST'
;
const
FETCH_RECHARGE_LIST
=
'FETCH_RECHARGE_LIST'
;
const
FETCH_DATA
=
'FETCH_DATA'
;
const
FETCH_DATA
=
'FETCH_DATA'
;
const
initFilters
=
()
=>
({
//
const initFilters = () => ({
operateId
:
undefined
,
//
operateId: undefined,
areaId
:
undefined
,
//
areaId: undefined,
timeType
:
0
,
// 0 本日,1 本月, 2 本年
//
timeType: 0, // 0 本日,1 本月, 2 本年
});
//
});
const
filtersStore
=
initFiltersStore
(
initFilters
);
//
const filtersStore = initFiltersStore(initFilters);
const
nowTime
=
new
Date
();
const
nowTime
=
new
Date
();
const
state
=
()
=>
({
const
state
=
()
=>
({
...
@@ -28,15 +28,9 @@ const getters = {
...
@@ -28,15 +28,9 @@ const getters = {
};
};
const
actions
=
{
const
actions
=
{
getRechargeOrderList
({
commit
,
getters
,
dispatch
},
data
)
{
getRechargeOrderList
({
commit
,
rootGetters
}
)
{
commit
(
FETCH_DATA
,
true
);
commit
(
FETCH_DATA
,
true
);
if
(
data
)
{
let
entity
=
getFilters
(
rootGetters
[
'Dashboard/customerData/filters'
]);
if
(
data
.
operateId
)
{
data
.
areaId
=
undefined
;
}
dispatch
(
'updateFilters'
,
data
);
}
let
entity
=
getFilters
(
getters
.
filters
);
switch
(
entity
.
timeType
)
{
switch
(
entity
.
timeType
)
{
case
1
:
case
1
:
entity
.
month
=
formatDate
(
nowTime
,
'yyyy-MM'
);
entity
.
month
=
formatDate
(
nowTime
,
'yyyy-MM'
);
...
@@ -76,7 +70,7 @@ const mutations = {
...
@@ -76,7 +70,7 @@ const mutations = {
export
default
{
export
default
{
namespaced
:
true
,
namespaced
:
true
,
modules
:
{
filtersStore
},
//
modules: { filtersStore },
state
,
state
,
getters
,
getters
,
actions
,
actions
,
...
...
src/containers/Dashboard/Dashboard.js
View file @
0b2c858f
...
@@ -3,8 +3,9 @@ import {
...
@@ -3,8 +3,9 @@ import {
fetchReportList
,
fetchReportList
,
fetchTitleList
,
fetchTitleList
,
}
from
'@/api/dashboard/dashboard'
;
}
from
'@/api/dashboard/dashboard'
;
import
customerRecharge
from
'./CustomerRecharge/CustomerRechargeStore'
;
import
customerData
from
'./CustomerData/CustomerDataStore'
;
import
customerConsumption
from
'./CustomerConsumption/CustomerConsumptionStore'
;
// import customerRecharge from './CustomerRecharge/CustomerRechargeStore';
// import customerConsumption from './CustomerConsumption/CustomerConsumptionStore';
import
customerFeedback
from
'./CustomerFeedback/CustomerFeedbackStore'
;
import
customerFeedback
from
'./CustomerFeedback/CustomerFeedbackStore'
;
import
initFiltersStore
from
'@/store/modules/filters'
;
import
initFiltersStore
from
'@/store/modules/filters'
;
import
{
getFilters
,
formatDate
}
from
'@/utils/index'
;
import
{
getFilters
,
formatDate
}
from
'@/utils/index'
;
...
@@ -237,8 +238,9 @@ export default {
...
@@ -237,8 +238,9 @@ export default {
namespaced
:
true
,
namespaced
:
true
,
modules
:
{
modules
:
{
filtersStore
,
filtersStore
,
customerRecharge
,
customerData
,
customerConsumption
,
// customerRecharge,
// customerConsumption,
customerFeedback
,
customerFeedback
,
},
},
state
,
state
,
...
...
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