Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ElectricitySheep
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
黄媛媛
ElectricitySheep
Commits
f6942b12
Commit
f6942b12
authored
May 19, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
b5fd127a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
70 additions
and
57 deletions
+70
-57
EmployeesList.vue
src/components/StoreDesign/EmployeesList.vue
+68
-55
roleList.vue
src/components/StoreDesign/roleList.vue
+2
-2
No files found.
src/components/StoreDesign/EmployeesList.vue
View file @
f6942b12
...
...
@@ -23,20 +23,19 @@
</div>
</div>
<el-table
:data=
"dataList"
v-loading=
"loading"
border
style=
"width: 100%;margin:20px 0"
>
<el-table-column
prop=
"
ID
"
label=
"ID"
width=
"80"
>
<el-table-column
prop=
"
EmpId
"
label=
"ID"
width=
"80"
>
</el-table-column>
<el-table-column
prop=
"EmpName"
label=
"昵称"
>
</el-table-column>
<el-table-column
prop=
"EmpAccount"
label=
"用户名"
>
</el-table-column>
<el-table-column
prop=
"Create
Time
"
label=
"添加日期"
width=
"220"
>
<el-table-column
prop=
"Create
DateStr
"
label=
"添加日期"
width=
"220"
>
</el-table-column>
<el-table-column
label=
"操作"
width=
"260"
>
<template
slot-scope=
"scope"
>
<img
@
click=
"EditRole(scope.row)"
src=
"../../assets/img/userman/edit.png"
alt=
""
>
<img
@
click=
"upPwddialog=true"
style=
"margin:0 10px;"
src=
"../../assets/img/userman/change.png"
alt=
""
>
<img
@
click=
"RemmoveRole(scope.row)"
src=
"../../assets/img/userman/del.png"
alt=
""
>
<img
@
click=
"RemmoveRole(scope.row)"
src=
"../../assets/img/userman/del.png"
alt=
""
>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -62,10 +61,12 @@
<el-input
type=
"text"
v-model=
"addMsg.EmpName"
size=
"small"
class=
"w400"
/>
</el-form-item>
<el-form-item
label=
"角色"
>
<el-checkbox
:indeterminate=
"isIndeterminate"
v-model=
"checkAll"
@
change=
"handleCheckAllChange"
>
全选
</el-checkbox>
<el-checkbox
:indeterminate=
"isIndeterminate"
v-model=
"checkAll"
@
change=
"handleCheckAllChange"
>
全选
</el-checkbox>
<div
style=
"margin: 15px 0;"
></div>
<el-checkbox-group
v-model=
"checkedCities"
@
change=
"handleCheckedCitiesChange"
>
<el-checkbox
v-for=
"city in cities"
:label=
"city"
:key=
"city"
>
{{
city
}}
</el-checkbox>
<el-checkbox
v-for=
"item in RoleList"
:label=
"item.RoleName"
:key=
"item.RoleId"
>
{{
item
.
RoleName
}}
</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-form>
...
...
@@ -73,52 +74,47 @@
<el-button
size=
"small"
style=
"margin-top:20px;padding:9px 25px;"
type=
"primary"
@
click=
"submitform('addMsg')"
>
保存
</el-button>
</
template
>
<!-- 修改密码 -->
<!-- 修改密码 -->
<el-dialog
title=
"提示"
:visible
.
sync=
"upPwddialog"
width=
"400px"
>
<el-form
label-width=
"0"
>
<p
style=
"padding:10px 0"
>
请输入新密码
</p>
<el-input
type=
"text"
v-model=
"pwdMsg.password"
></el-input>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"upPwddialog = false"
>
取 消
</el-button>
<el-button
size=
"small"
type=
"primary"
>
确 定
</el-button>
</span>
<el-form
label-width=
"0"
>
<p
style=
"padding:10px 0"
>
请输入新密码
</p>
<el-input
type=
"text"
v-model=
"pwdMsg.password"
></el-input>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"upPwddialog = false"
>
取 消
</el-button>
<el-button
size=
"small"
type=
"primary"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
</template>
<
script
>
const
cityOptions
=
[
'上海'
,
'北京'
,
'广州'
,
'深圳'
];
export
default
{
data
()
{
return
{
loading
:
false
,
//修改密码弹窗
upPwddialog
:
false
,
upPwddialog
:
false
,
checkAll
:
false
,
isIndeterminate
:
true
,
checkedCities
:
[
'上海'
,
'北京'
],
cities
:
cityOptions
,
dataList
:
[{
ID
:
699
,
EmpName
:
'李四'
,
EmpAccount
:
'ck'
,
CreateTime
:
'2020-10-25'
}],
checkedCities
:
[],
dataList
:
[],
msg
:
{
pageIndex
:
1
,
pageSize
:
15
,
},
pwdMsg
:{
password
:
''
pwdMsg
:
{
password
:
''
},
total
:
0
,
empIsShowAdd
:
true
,
addMsg
:
{
EmpId
:
0
,
//员工编号
EmpAccount
:
''
,
//用户名
EmpPwd
:
''
,
//密码
EmpName
:
''
,
//昵称
RoleAuth
:
''
//角色
},
RoleList
:
[],
//角色列表
rules
:
{
RoleName
:
[{
required
:
true
,
...
...
@@ -147,9 +143,10 @@
this
.
getList
();
},
getList
()
{
this
.
apipost
(
"/api/Employee/Get
Rol
ePageList"
,
this
.
msg
,
res
=>
{
this
.
apipost
(
"/api/Employee/Get
Employe
ePageList"
,
this
.
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
dataList
=
res
.
data
.
data
.
pageData
;
console
.
log
(
"this.datalist"
,
this
.
dataList
);
this
.
total
=
res
.
data
.
data
.
count
;
}
else
{
this
.
Info
(
res
.
data
.
message
);
...
...
@@ -168,9 +165,9 @@
},
//保存
saveMsg
()
{
var
ckedKeys
=
this
.
$refs
.
tree
.
getCheckedKeys
();
this
.
addMsg
.
RoleAuth
=
ckedKeys
.
join
(
','
);
this
.
apipost
(
"/api/Employee/Set
Rol
e"
,
this
.
addMsg
,
res
=>
{
//
var ckedKeys = this.$refs.tree.getCheckedKeys();
//
this.addMsg.RoleAuth = ckedKeys.join(',');
this
.
apipost
(
"/api/Employee/Set
Employe
e"
,
this
.
addMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
getList
();
this
.
clearInfo
();
...
...
@@ -182,15 +179,16 @@
},
//清空
clearInfo
()
{
this
.
addMsg
.
RoleId
=
0
;
this
.
addMsg
.
RoleName
=
''
;
this
.
addMsg
.
RoleIntro
=
''
;
this
.
addMsg
.
EmpId
=
0
;
this
.
addMsg
.
EmpAccount
=
''
;
this
.
addMsg
.
EmpPwd
=
''
;
this
.
addMsg
.
EmpName
=
''
;
this
.
addMsg
.
RoleAuth
=
''
;
},
//修改
EditRole
(
item
)
{
this
.
apipost
(
"/api/Employee/Get
Rol
e"
,
{
RoleId
:
item
.
Role
Id
this
.
apipost
(
"/api/Employee/Get
Employe
e"
,
{
EmpId
:
item
.
Emp
Id
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
addMsg
=
res
.
data
.
data
;
...
...
@@ -208,8 +206,8 @@
RemmoveRole
(
item
)
{
var
that
=
this
;
that
.
Confirm
(
"是否要删除?"
,
function
()
{
that
.
apipost
(
"/api/Employee/Remove
Rol
e"
,
{
RoleId
:
item
.
Role
Id
that
.
apipost
(
"/api/Employee/Remove
Employe
e"
,
{
EmpId
:
item
.
Emp
Id
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
that
.
getList
();
...
...
@@ -221,27 +219,38 @@
},
//全选
handleCheckAllChange
(
val
)
{
this
.
checkedCities
=
val
?
cityOptions
:
[];
this
.
checkedCities
=
val
?
this
.
RoleList
:
[];
this
.
isIndeterminate
=
false
;
},
handleCheckedCitiesChange
(
value
)
{
let
checkedCount
=
value
.
length
;
this
.
checkAll
=
checkedCount
===
this
.
cities
.
length
;
this
.
isIndeterminate
=
checkedCount
>
0
&&
checkedCount
<
this
.
cities
.
length
;
this
.
checkAll
=
checkedCount
===
this
.
RoleList
.
length
;
this
.
isIndeterminate
=
checkedCount
>
0
&&
checkedCount
<
this
.
RoleList
.
length
;
},
//点击复制
copyCode
(){
copyCode
()
{
var
copycode
=
document
.
getElementById
(
"my_Link"
).
innerHTML
;
var
input
=
document
.
createElement
(
"input"
);
// 直接构建input
input
.
value
=
copycode
;
// 设置内容
document
.
body
.
appendChild
(
input
);
// 添加临时实例
input
.
select
();
// 选择实例内容
document
.
execCommand
(
"Copy"
);
// 执行复制
document
.
body
.
removeChild
(
input
);
// 删除临时实例
var
input
=
document
.
createElement
(
"input"
);
// 直接构建input
input
.
value
=
copycode
;
// 设置内容
document
.
body
.
appendChild
(
input
);
// 添加临时实例
input
.
select
();
// 选择实例内容
document
.
execCommand
(
"Copy"
);
// 执行复制
document
.
body
.
removeChild
(
input
);
// 删除临时实例
},
//获取角色列表
getRoleList
()
{
this
.
apipost
(
"/api/Employee/GetRoleList"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
RoleList
=
res
.
data
.
data
;
}
else
{
this
.
Info
(
res
.
data
.
message
);
}
})
}
},
mounted
()
{
//this.getList();
this
.
getRoleList
();
this
.
getList
();
}
};
...
...
@@ -275,14 +284,18 @@
padding
:
20px
;
box-sizing
:
border-box
;
}
.EmployeList
.el-alert__content
{
.EmployeList
.el-alert__content
{
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
}
.EmployeList
.el-alert
{
padding
:
0
0
5px
5px
;
.EmployeList
.el-alert
{
padding
:
0
0
5px
5px
;
}
.EmployeList
.el-alert__title
{
margin-top
:
5px
;
.EmployeList
.el-alert__title
{
margin-top
:
5px
;
}
</
style
>
src/components/StoreDesign/roleList.vue
View file @
f6942b12
...
...
@@ -24,9 +24,9 @@
</el-table-column>
<el-table-column
prop=
"RoleIntro"
label=
"备注/描述"
>
</el-table-column>
<el-table-column
prop=
"Create
r
"
label=
"创建者"
width=
"150"
>
<el-table-column
prop=
"Create
ByName
"
label=
"创建者"
width=
"150"
>
</el-table-column>
<el-table-column
prop=
"Create
Time
"
label=
"添加日期"
width=
"220"
>
<el-table-column
prop=
"Create
DateStr
"
label=
"添加日期"
width=
"220"
>
</el-table-column>
<el-table-column
label=
"操作"
width=
"260"
>
<template
slot-scope=
"scope"
>
...
...
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