Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
L
laravelzh
Project
Project
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
冯超鹏
laravelzh
Commits
d58ff614
Commit
d58ff614
authored
Jul 24, 2020
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加用户
parent
9903a482
Pipeline
#105
failed with stages
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
5 deletions
+25
-5
index.vue
resources/js/views/device/index.vue
+1
-1
List.vue
resources/js/views/users/List.vue
+24
-4
No files found.
resources/js/views/device/index.vue
View file @
d58ff614
...
...
@@ -133,7 +133,7 @@
<
/el-form
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"设备
uuid"
prop
=
"deviceuuid
"
><
/el-table-column
>
<
el
-
table
-
column
label
=
"设备
UUID"
prop
=
"deviceuuid"
width
=
"380px
"
><
/el-table-column
>
<
el
-
table
-
column
label
=
"设备联系人"
prop
=
"devicelinkman"
><
/el-table-column
>
<
el
-
table
-
column
label
=
"设备手机号"
prop
=
"devicephone"
><
/el-table-column
>
<
/el-table
>
...
...
resources/js/views/users/List.vue
View file @
d58ff614
...
...
@@ -93,7 +93,7 @@
<el-card
class=
"box-card"
style=
"height: 20000px;"
>
<div
v-loading=
"userCreating"
class=
"form-container"
>
<el-form
ref=
"userForm"
:rules=
"rules"
:model=
"newUser"
label-position=
"left"
label-width=
"150px"
style=
"max-width: 500px;"
>
<el-form-item
label=
"选择
权限
"
prop=
"role"
>
<el-form-item
label=
"选择
角色
"
prop=
"role"
>
<el-select
v-model=
"newUser.role"
class=
"filter-item"
placeholder=
"Please select role"
>
<el-option
v-for=
"item in nonAdminRoles"
:key=
"item"
:label=
"item | uppercaseFirst"
:value=
"item"
/>
</el-select>
...
...
@@ -115,7 +115,9 @@
</el-form-item>
<el-form-item
label=
"坐标"
prop=
"mapcenter"
>
<el-input
v-model=
"newUser.mapcenter"
style=
"width:155px"
/>
<el-button
type=
"primary"
size=
"small"
plain
@
click=
"positionUrl"
>
拾取坐标
</el-button>
<el-button
type=
"primary"
@
click=
"drawerMap = true"
>
拾取坐标
</el-button>
</el-form-item>
<el-form-item
label=
"选择地址"
prop=
"role"
>
<el-select
v-model=
"newUser.province"
class=
"filter-item"
placeholder=
"省"
@
change=
"postcity"
>
...
...
@@ -147,6 +149,9 @@
</div>
</div>
</el-card>
<el-drawer
title=
"拾取坐标"
:visible
.
sync=
"drawerMap"
:modal=
"false"
:direction=
"directionMap"
:before-close=
"handleClose"
size=
"70%"
:with-header=
"false"
>
<div><CoordinateMap
@
map-confirm=
"mapConfirmData"
@
giveLnglat=
"getLnglat"
></CoordinateMap></div>
</el-drawer>
</el-drawer>
</div>
</template>
...
...
@@ -159,13 +164,14 @@ import Resource from '@/api/resource';
import
waves
from
'@/directive/waves'
;
// Waves directive
import
permission
from
'@/directive/permission'
;
// Permission directive
import
checkPermission
from
'@/utils/permission'
;
// Permission checking
import
CoordinateMap
from
'@/components/coordinateMap'
;
const
userResource
=
new
UserResource
();
const
permissionResource
=
new
Resource
(
'permissions'
);
export
default
{
name
:
'UserList'
,
components
:
{
Pagination
},
components
:
{
Pagination
,
CoordinateMap
},
directives
:
{
waves
,
permission
},
data
()
{
var
validateConfirmPassword
=
(
rule
,
value
,
callback
)
=>
{
...
...
@@ -176,10 +182,12 @@ export default {
}
};
return
{
drawerMap
:
false
,
directionMap
:
'rtl'
,
list
:
null
,
total
:
0
,
drawer
:
false
,
direction
:
'
rtl
'
,
direction
:
'
ltr
'
,
loading
:
true
,
downloading
:
false
,
userCreating
:
false
,
...
...
@@ -302,6 +310,18 @@ export default {
}
},
methods
:
{
mapConfirmData
(
text
)
{
if
(
text
.
state
===
true
)
{
this
.
newUser
.
mapcenter
=
text
.
location
;
this
.
drawerMap
=
false
;
}
if
(
text
.
state
===
false
)
{
this
.
drawerMap
=
false
;
}
},
getLnglat
(
lnglnt
)
{
console
.
log
(
lnglnt
);
},
checkPermission
,
async
getPermissions
()
{
const
{
data
}
=
await
permissionResource
.
list
({});
...
...
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