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
f020ca35
Commit
f020ca35
authored
Apr 28, 2019
by
姜雷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户框添加showMoney的key控制用户信息框中是否显示艾米豆信息
parent
d86ad317
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
77 additions
and
7 deletions
+77
-7
App.vue
src/App.vue
+1
-1
customer.js
src/api/base/customer.js
+5
-0
UserInfo.vue
src/components/UserCard/UserInfo.vue
+22
-6
UserWithContent.vue
src/components/UserCard/UserWithContent.vue
+5
-0
index.js
src/config/index.js
+9
-0
userBaseInfo.js
src/mixins/user/userBaseInfo.js
+35
-0
No files found.
src/App.vue
View file @
f020ca35
...
@@ -73,7 +73,7 @@ export default {
...
@@ -73,7 +73,7 @@ export default {
title
:
''
,
title
:
''
,
selectedRoute
:
[],
selectedRoute
:
[],
routerDone
:
false
,
routerDone
:
false
,
isInnerPage
:
tru
e
,
isInnerPage
:
fals
e
,
showFastLink
:
true
,
showFastLink
:
true
,
showSelected
:
false
,
showSelected
:
false
,
};
};
...
...
src/api/base/customer.js
View file @
f020ca35
...
@@ -12,3 +12,8 @@ export const fetchUserBaseInfoByPhone = entity =>
...
@@ -12,3 +12,8 @@ export const fetchUserBaseInfoByPhone = entity =>
url
:
path
+
'/dcxy/customerInfo/baseCustomer'
,
url
:
path
+
'/dcxy/customerInfo/baseCustomer'
,
params
:
entity
,
params
:
entity
,
});
});
export
const
fetchUserAccount
=
entity
=>
fetch
({
url
:
path
+
'/dcxy/customerInfo/queryAccount'
,
params
:
entity
,
});
src/components/UserCard/UserInfo.vue
View file @
f020ca35
...
@@ -61,6 +61,19 @@
...
@@ -61,6 +61,19 @@
</div>
</div>
<div
class=
"UserInfo-Content-Col"
>
注册时间:
{{
$formatDate
(
customerBaseInfo
.
createAt
,
'yyyy-MM-dd'
)
}}
</div>
<div
class=
"UserInfo-Content-Col"
>
注册时间:
{{
$formatDate
(
customerBaseInfo
.
createAt
,
'yyyy-MM-dd'
)
}}
</div>
<div
class=
"UserInfo-Content-Col UserInfo-CampusName"
>
{{
customerBaseInfo
.
areaName
}}
</div>
<div
class=
"UserInfo-Content-Col UserInfo-CampusName"
>
{{
customerBaseInfo
.
areaName
}}
</div>
<div
class=
"UserInfo-Content-serviceBox"
v-if=
"showMoney"
>
<div
v-for=
"(item, index) in serviceList"
:key=
"index"
class=
"UserInfo-Content-serviceBox-item"
>
<div>
{{
getServiceName
(
item
.
serviceId
)
}}
</div>
<div>
{{
item
.
money
}}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -71,10 +84,6 @@ import UserBaseInfoMixin from '../../mixins/user/userBaseInfo.js';
...
@@ -71,10 +84,6 @@ import UserBaseInfoMixin from '../../mixins/user/userBaseInfo.js';
import
getUserInfoLabelMixin
from
'@/mixins/user/getUserInfoLabel.js'
;
import
getUserInfoLabelMixin
from
'@/mixins/user/getUserInfoLabel.js'
;
export
default
{
export
default
{
props
:
{
customerId
:
Number
,
customerPhone
:
String
,
},
mixins
:
[
UserBaseInfoMixin
,
getUserInfoLabelMixin
],
mixins
:
[
UserBaseInfoMixin
,
getUserInfoLabelMixin
],
};
};
</
script
>
</
script
>
...
@@ -132,7 +141,7 @@ export default {
...
@@ -132,7 +141,7 @@ export default {
}
}
}
}
.UserInfo-Content
{
.UserInfo-Content
{
height
:
90px
;
//
height: 90px;
background-color
:
#fff
;
background-color
:
#fff
;
padding
:
10px
;
padding
:
10px
;
.UserInfo-Content-Col
{
.UserInfo-Content-Col
{
...
@@ -156,6 +165,13 @@ export default {
...
@@ -156,6 +165,13 @@ export default {
line-height
:
1
;
line-height
:
1
;
margin-top
:
0px
;
margin-top
:
0px
;
}
}
.UserInfo-Content-serviceBox
{
line-height
:
24px
;
.UserInfo-Content-serviceBox-item
{
display
:
flex
;
justify-content
:
space-between
;
}
}
}
}
}
}
@media
screen
and
(
min-width
:
$bigScreenWidth
)
{
@media
screen
and
(
min-width
:
$bigScreenWidth
)
{
...
@@ -187,7 +203,7 @@ export default {
...
@@ -187,7 +203,7 @@ export default {
}
}
}
}
.UserInfo-Content
{
.UserInfo-Content
{
height
:
180px
;
//
height: 180px;
padding
:
20px
;
padding
:
20px
;
.UserInfo-Content-Col
{
.UserInfo-Content-Col
{
line-height
:
38px
;
line-height
:
38px
;
...
...
src/components/UserCard/UserWithContent.vue
View file @
f020ca35
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
class=
"left-part"
class=
"left-part"
:customerId=
"customerId"
:customerId=
"customerId"
:customerPhone=
"customerPhone"
:customerPhone=
"customerPhone"
:showMoney=
"showMoney"
:visible=
"visible"
:visible=
"visible"
/>
/>
<div
class=
"right-part"
>
<div
class=
"right-part"
>
...
@@ -39,6 +40,10 @@ export default {
...
@@ -39,6 +40,10 @@ export default {
default
:
true
,
default
:
true
,
},
},
customerPhone
:
String
,
customerPhone
:
String
,
showMoney
:
{
type
:
Boolean
,
default
:
false
,
},
},
},
};
};
</
script
>
</
script
>
...
...
src/config/index.js
View file @
f020ca35
...
@@ -72,6 +72,15 @@ export const operClassifyName4User = [
...
@@ -72,6 +72,15 @@ export const operClassifyName4User = [
{
label
:
'新增'
,
value
:
'05'
},
{
label
:
'新增'
,
value
:
'05'
},
];
];
export
const
serviceMap
=
[
{
label
:
'艾米'
,
value
:
'0'
},
{
label
:
'通用'
,
value
:
'1'
},
{
label
:
'洗衣'
,
value
:
'2'
},
{
label
:
'饮水'
,
value
:
'3'
},
{
label
:
'吹风'
,
value
:
'4'
},
{
label
:
'洗浴'
,
value
:
'5'
},
];
export
default
{
export
default
{
selectTypeMapping
,
selectTypeMapping
,
customerStateOptions
,
customerStateOptions
,
...
...
src/mixins/user/userBaseInfo.js
View file @
f020ca35
import
{
mapActions
,
mapGetters
}
from
'vuex'
;
import
{
mapActions
,
mapGetters
}
from
'vuex'
;
import
{
fetchUserAccount
}
from
'../../api/base/customer'
;
import
{
serviceMap
}
from
'@/config'
;
export
default
{
export
default
{
props
:
{
props
:
{
visible
:
{
type
:
Boolean
,
default
:
false
},
visible
:
{
type
:
Boolean
,
default
:
false
},
customerId
:
Number
,
customerId
:
Number
,
customerPhone
:
String
,
customerPhone
:
String
,
showMoney
:
{
type
:
Boolean
,
default
:
false
,
},
},
data
()
{
return
{
serviceList
:
[],
};
},
},
watch
:
{
watch
:
{
visible
(
newVal
)
{
visible
(
newVal
)
{
...
@@ -12,6 +23,7 @@ export default {
...
@@ -12,6 +23,7 @@ export default {
this
.
fetchUserBaseInfo
({
this
.
fetchUserBaseInfo
({
customerId
:
this
.
customerId
,
customerId
:
this
.
customerId
,
});
});
this
.
getAllData
();
}
}
},
},
customerId
(
newId
)
{
customerId
(
newId
)
{
...
@@ -19,6 +31,7 @@ export default {
...
@@ -19,6 +31,7 @@ export default {
this
.
fetchUserBaseInfo
({
this
.
fetchUserBaseInfo
({
customerId
:
this
.
customerId
,
customerId
:
this
.
customerId
,
});
});
this
.
getAllData
();
}
}
},
},
customerPhone
(
newPhone
)
{
customerPhone
(
newPhone
)
{
...
@@ -26,6 +39,7 @@ export default {
...
@@ -26,6 +39,7 @@ export default {
this
.
fetchUserBaseInfoByPhone
({
this
.
fetchUserBaseInfoByPhone
({
customerPhone
:
this
.
customerPhone
,
customerPhone
:
this
.
customerPhone
,
});
});
this
.
getAllData
();
}
}
},
},
},
},
...
@@ -34,11 +48,13 @@ export default {
...
@@ -34,11 +48,13 @@ export default {
this
.
fetchUserBaseInfo
({
this
.
fetchUserBaseInfo
({
customerId
:
this
.
customerId
,
customerId
:
this
.
customerId
,
});
});
this
.
getAllData
();
}
}
if
(
this
.
visible
&&
!
this
.
customerId
&&
this
.
customerPhone
)
{
if
(
this
.
visible
&&
!
this
.
customerId
&&
this
.
customerPhone
)
{
this
.
fetchUserBaseInfoByPhone
({
this
.
fetchUserBaseInfoByPhone
({
customerPhone
:
this
.
customerPhone
,
customerPhone
:
this
.
customerPhone
,
});
});
this
.
getAllData
();
}
}
},
},
computed
:
{
computed
:
{
...
@@ -46,5 +62,24 @@ export default {
...
@@ -46,5 +62,24 @@ export default {
},
},
methods
:
{
methods
:
{
...
mapActions
([
'fetchUserBaseInfo'
,
'fetchUserBaseInfoByPhone'
]),
...
mapActions
([
'fetchUserBaseInfo'
,
'fetchUserBaseInfoByPhone'
]),
getAllData
()
{
console
.
log
(
'in getAllData'
,
this
.
showMoney
);
if
(
this
.
showMoney
)
{
fetchUserAccount
({
customerId
:
this
.
customerId
,
})
.
then
(
res
=>
{
this
.
serviceList
=
res
.
data
;
})
.
catch
(
err
=>
{
console
.
error
(
err
);
});
}
},
getServiceName
(
id
)
{
let
item
=
serviceMap
.
find
(
item
=>
item
.
value
===
id
);
return
item
?
item
.
label
:
id
;
},
},
},
};
};
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