Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform-ui
Project
Project
Details
Activity
Releases
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
youjj
cloud-platform-ui
Commits
c7502836
Commit
c7502836
authored
May 08, 2019
by
周健威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改用户相关
parent
a3ec92dd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
2 deletions
+45
-2
index.js
src/api/base_info/constant/index.js
+14
-1
baseInfo.js
src/store/modules/baseInfo.js
+1
-0
index.vue
src/views/admin/user/index.vue
+30
-1
No files found.
src/api/base_info/constant/index.js
View file @
c7502836
...
@@ -5,6 +5,7 @@ import {
...
@@ -5,6 +5,7 @@ import {
VEHICLE_CONSTANT_VEHICLE_USE
,
VEHICLE_CONSTANT_VEHICLE_USE
,
VEHICLE_CONSTANT_BRAND_CODE_UNKOWN
,
VEHICLE_CONSTANT_BRAND_CODE_UNKOWN
,
INSURANCE_COMPANY
,
INSURANCE_COMPANY
,
ZONE
,
VEHICLE_CONSTANT_INSURANCE_COMPANY_UNKOWN
,
VEHICLE_CONSTANT_INSURANCE_COMPANY_UNKOWN
,
VEHICLE_CONSTANT_USE_TYPE_UNKOWN
,
VEHICLE_CONSTANT_USE_TYPE_UNKOWN
,
VEHICLE_CONSTANT_STATUS_NORMAL
VEHICLE_CONSTANT_STATUS_NORMAL
...
@@ -107,7 +108,7 @@ export function getConstantListByType(type) {
...
@@ -107,7 +108,7 @@ export function getConstantListByType(type) {
return
constantMap
;
return
constantMap
;
}
}
/** 保险公司 */
export
function
getInsuranceCompany
(
code
)
{
export
function
getInsuranceCompany
(
code
)
{
if
(
code
==
null
||
typeof
(
code
)
==
"undefined"
||
code
===
VEHICLE_CONSTANT_INSURANCE_COMPANY_UNKOWN
)
{
if
(
code
==
null
||
typeof
(
code
)
==
"undefined"
||
code
===
VEHICLE_CONSTANT_INSURANCE_COMPANY_UNKOWN
)
{
return
'未知'
;
return
'未知'
;
...
@@ -118,3 +119,15 @@ export function getInsuranceCompany(code) {
...
@@ -118,3 +119,15 @@ export function getInsuranceCompany(code) {
export
function
getAllInsuranceCompany
()
{
export
function
getAllInsuranceCompany
()
{
return
getConstantListByType
(
INSURANCE_COMPANY
);
return
getConstantListByType
(
INSURANCE_COMPANY
);
}
}
/** 片区 */
export
function
getZone
(
code
)
{
if
(
code
==
null
||
typeof
(
code
)
==
"undefined"
)
{
return
'未知'
;
}
return
getConstantByTypeAndCode
(
ZONE
,
code
).
val
;
}
export
function
getAllZone
()
{
return
getConstantListByType
(
ZONE
);
}
src/store/modules/baseInfo.js
View file @
c7502836
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
export
const
VEHICLE_CONSTANT_VEHICLE_BRAND
=
1
;
// "车辆品牌"
export
const
VEHICLE_CONSTANT_VEHICLE_BRAND
=
1
;
// "车辆品牌"
export
const
VEHICLE_CONSTANT_VEHICLE_USE
=
2
;
// "车辆用途"
export
const
VEHICLE_CONSTANT_VEHICLE_USE
=
2
;
// "车辆用途"
export
const
INSURANCE_COMPANY
=
3
;
// "保险公司"
export
const
INSURANCE_COMPANY
=
3
;
// "保险公司"
export
const
ZONE
=
4
;
// "片区"
export
const
VEHICLE_CONSTANT_BRAND_CODE_UNKOWN
=
0
;
// 车辆品牌-未知
export
const
VEHICLE_CONSTANT_BRAND_CODE_UNKOWN
=
0
;
// 车辆品牌-未知
...
...
src/views/admin/user/index.vue
View file @
c7502836
...
@@ -49,6 +49,16 @@
...
@@ -49,6 +49,16 @@
<el-form-item
v-if=
"dialogStatus == 'create'"
label=
"密码"
placeholder=
"请输入密码"
prop=
"password"
>
<el-form-item
v-if=
"dialogStatus == 'create'"
label=
"密码"
placeholder=
"请输入密码"
prop=
"password"
>
<el-input
type=
"password"
v-model=
"form.password"
></el-input>
<el-input
type=
"password"
v-model=
"form.password"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"是否开启"
prop=
"status"
>
<el-radio-group
class=
"filter-item"
v-model=
"form.status"
>
<el-radio
v-for=
"item in statusOptions"
:key=
"item"
:label=
"item"
:value=
"item"
></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"所属片区"
>
<el-select
class=
"filter-item"
v-model=
"form.zone"
placeholder=
"请选择"
>
<el-option
v-for=
"(val, key, index) in getAllZone()"
:key=
"val.code"
:label=
"val.val"
:value=
"val.code"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"性别"
>
<el-form-item
label=
"性别"
>
<el-select
class=
"filter-item"
v-model=
"form.sex"
placeholder=
"请选择"
>
<el-select
class=
"filter-item"
v-model=
"form.sex"
placeholder=
"请选择"
>
<el-option
v-for=
"item in sexOptions"
:key=
"item"
:label=
"item"
:value=
"item"
>
</el-option>
<el-option
v-for=
"item in sexOptions"
:key=
"item"
:label=
"item"
:value=
"item"
>
</el-option>
...
@@ -75,7 +85,14 @@ import {
...
@@ -75,7 +85,14 @@ import {
delObj
,
delObj
,
putObj
putObj
}
from
'api/admin/user/index'
;
}
from
'api/admin/user/index'
;
import
{
mapGetters
}
from
'vuex'
;
import
{
mapGetters
}
from
'vuex'
;
import
{
getAllZone
,
getZone
}
from
'api/base_info/constant/'
;
export
default
{
export
default
{
name
:
'user'
,
name
:
'user'
,
data
()
{
data
()
{
...
@@ -84,6 +101,7 @@ export default {
...
@@ -84,6 +101,7 @@ export default {
username
:
undefined
,
username
:
undefined
,
name
:
undefined
,
name
:
undefined
,
sex
:
'男'
,
sex
:
'男'
,
status
:
'开启'
,
password
:
undefined
,
password
:
undefined
,
description
:
undefined
description
:
undefined
},
},
...
@@ -126,6 +144,11 @@ export default {
...
@@ -126,6 +144,11 @@ export default {
message
:
'长度在 5 到 20 个字符'
,
message
:
'长度在 5 到 20 个字符'
,
trigger
:
'blur'
trigger
:
'blur'
}
}
],
status
:
[
{
required
:
true
}
]
]
},
},
list
:
null
,
list
:
null
,
...
@@ -137,6 +160,8 @@ export default {
...
@@ -137,6 +160,8 @@ export default {
name
:
undefined
name
:
undefined
},
},
sexOptions
:
[
'男'
,
'女'
],
sexOptions
:
[
'男'
,
'女'
],
zoneOptions
:
[
'男'
,
'女'
],
statusOptions
:
[
'开启'
,
'禁用'
],
dialogFormVisible
:
false
,
dialogFormVisible
:
false
,
dialogStatus
:
''
,
dialogStatus
:
''
,
userManager_btn_edit
:
false
,
userManager_btn_edit
:
false
,
...
@@ -264,10 +289,14 @@ export default {
...
@@ -264,10 +289,14 @@ export default {
username
:
undefined
,
username
:
undefined
,
name
:
undefined
,
name
:
undefined
,
sex
:
'男'
,
sex
:
'男'
,
status
:
'开启'
,
zone
:
undefined
,
password
:
undefined
,
password
:
undefined
,
description
:
undefined
description
:
undefined
};
};
}
},
getAllZone
,
getZone
}
}
}
}
</
script
>
</
script
>
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