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
ed162585
Commit
ed162585
authored
Apr 01, 2019
by
姜雷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加获取服务类型时状态字段
parent
1fd5fe7c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
4 deletions
+12
-4
mixin.js
src/components/input/ServiceTypeSelect/mixin.js
+10
-2
serviceTypeStore.js
src/components/input/ServiceTypeSelect/serviceTypeStore.js
+2
-2
No files found.
src/components/input/ServiceTypeSelect/mixin.js
View file @
ed162585
...
...
@@ -3,16 +3,24 @@ import store from './store';
export
default
{
props
:
{
// null所有/1自助/2三方
//
服务类型:
null所有/1自助/2三方
ServiceType
:
{
type
:
Number
,
default
:
null
,
},
// 服务状态:null所有/1开启/0关闭
ServiceState
:
{
type
:
Number
,
default
:
null
,
},
},
created
()
{
store
.
install
(
this
.
$store
);
if
(
!
this
.
serviceTypeLists
[
this
.
ServiceType
].
length
)
{
this
.
fetchServiceTypeList
(
this
.
ServiceType
);
this
.
fetchServiceTypeList
({
serviceType
:
this
.
ServiceType
,
state
:
this
.
ServiceState
,
});
}
},
computed
:
{
...
...
src/components/input/ServiceTypeSelect/serviceTypeStore.js
View file @
ed162585
...
...
@@ -21,11 +21,11 @@ const getters = {
};
const
actions
=
{
fetchServiceTypeList
({
state
,
commit
},
serviceType
)
{
fetchServiceTypeList
({
state
,
commit
},
{
serviceType
,
state
}
)
{
if
(
state
.
fetching
[
serviceType
])
return
;
commit
(
FETCH_STATE
,
{
value
:
true
,
index
:
serviceType
});
return
fetchServiceList
({
params
:
{
serviceType
},
params
:
{
serviceType
,
state
},
}).
then
(
res
=>
{
const
{
selfService
}
=
res
;
commit
(
SERVICE_TYPE_LIST
,
{
list
:
selfService
,
index
:
serviceType
});
...
...
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