Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
bdc
/
bdcjg-web
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
b76a9d2b
authored
2023-03-22 13:18:52 +0800
by
任超
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'master' of
http://yun.pashanhoo.com:9090/bdc/bdcjg-web
2 parents
a5e0414e
a3704cbf
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
101 additions
and
27 deletions
src/store/modules/permission.js
src/views/loginsb/index.vue
src/views/system/users/data/index.js
src/views/system/users/edit-dialog.vue
src/views/system/users/index.vue
src/store/modules/permission.js
View file @
b76a9d2
...
...
@@ -25,7 +25,7 @@ const mutations = {
}
const
actions
=
{
// 添加全部菜单
generateRoutes
({
commit
},
getMenuInfo
)
{
generateRoutes
({
commit
},
getMenuInfo
)
{
let
Layout
;
if
(
Vue
.
prototype
.
BASE_API
.
THEME
==
'sb'
)
{
Layout
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
`@/layout1`
)))
...
...
src/views/loginsb/index.vue
View file @
b76a9d2
...
...
@@ -16,8 +16,14 @@
placeholder=
"请输入密码"
show-password
></el-input>
</el-form-item>
<el-form-item
prop=
"yz"
>
<el-input
class=
"yz"
@
keyup
.
native=
"login('user')"
v-model=
"user.yz"
placeholder=
"请输入验证码"
></el-input>
<div
class=
"flex-container"
>
<div
class=
"flex-input"
>
<el-input
class=
"yz"
@
keyup
.
native=
"login('user')"
v-model=
"user.yz"
placeholder=
"请输入验证码"
></el-input>
</div>
<div
class=
"flex-line"
></div>
<div
class=
"flex-img"
><canvas
id=
"s-canvas"
ref=
"s-canvas"
></canvas></div>
<div
class=
"flex-renovate"
><font
id=
"renovate"
@
click=
"verification"
>
换一批
</font></div>
</div>
</el-form-item>
<el-form-item
class=
"login-btn"
>
<el-button
type=
"primary"
style=
"width: 100%"
@
click=
"login('user')"
>
登录
</el-button>
...
...
@@ -48,7 +54,8 @@
},
};
},
created
()
{
created
()
{
this
.
verification
();
const
params
=
{};
const
queryOptions
=
{
conditionGroup
:
{
...
...
@@ -78,7 +85,37 @@
mounted
()
{
// this.checkUserName();
},
methods
:
{
methods
:
{
verification
()
{
let
str
=
'1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ'
,
code
=
''
,
i
=
0
;
for
(
;
i
++
<
4
;
)
code
+=
str
[
Math
.
floor
(
Math
.
random
()
*
(
str
.
length
-
0
)
+
0
)
];
setTimeout
(
()
=>
{
let
canvas
=
document
.
getElementById
(
"s-canvas"
),
ctx
=
canvas
.
getContext
(
"2d"
);
canvas
.
width
=
80
;
canvas
.
height
=
28
;
ctx
.
fillStyle
=
'#ffffff'
;
ctx
.
fillRect
(
0
,
0
,
80
,
28
);
for
(
i
=
0
;
i
<
code
.
length
;
i
++
)
{
this
.
drawText
(
ctx
,
code
[
i
],
i
);
}
},
0
);
},
drawText
(
ctx
,
txt
,
i
)
{
ctx
.
fillStyle
=
this
.
randomColor
(
50
,
160
);
ctx
.
font
=
"18px SimHei"
;
let
x
=
(
i
+
1
)
*
(
80
/
(
4
+
1
)),
y
=
this
.
randomNum
(
18
,
28
-
5
);
ctx
.
translate
(
x
,
y
);
ctx
.
fillText
(
txt
,
0
,
0
);
ctx
.
rotate
((
-
0
*
Math
.
PI
)
/
180
);
ctx
.
translate
(
-
x
,
-
y
);
},
randomColor
(
min
,
max
)
{
let
r
=
this
.
randomNum
(
min
,
max
);
let
g
=
this
.
randomNum
(
min
,
max
);
let
b
=
this
.
randomNum
(
min
,
max
);
return
"rgb("
+
r
+
","
+
g
+
","
+
b
+
")"
;
},
randomNum
(
min
,
max
)
{
return
Math
.
floor
(
Math
.
random
()
*
(
max
-
min
)
+
min
);
},
//记住用户名
checkUserName
:
function
(
flag
)
{
this
.
user
.
checkStatus
=
flag
;
...
...
@@ -128,7 +165,6 @@
.password
,
.yz
{
position
:
relative
;
&:before
{
content
:
""
;
display
:
block
;
...
...
@@ -148,6 +184,40 @@
}
}
.flex-container
{
position
:
relative
;
display
:
-webkit-flex
;
display
:
flex
;
}
.flex-input
{
width
:
100%
;
}
.flex-line
{
position
:
absolute
;
width
:
1px
;
height
:
64%
;
margin
:
5px
;
right
:
36%
;
background-color
:
#CCCCCC
;
}
.flex-img
{
position
:
absolute
;
margin
:
2px
;
right
:
16%
;
}
.flex-renovate
{
position
:
absolute
;
margin
:
1px
;
right
:
3%
;
}
#renovate
{
color
:
#3F8FEA
;
font-size
:
16px
;
font-weight
:
700
;
cursor
:
pointer
;
}
.username
::before
{
background-image
:
url(../../image/userlogo.png)
;
}
...
...
src/views/system/users/data/index.js
View file @
b76a9d2
...
...
@@ -2,7 +2,7 @@
* @Author: xiaomiao 1158771342@qq.com
* @Date: 2023-01-30 17:59:51
* @LastEditors: xiaomiao 1158771342@qq.com
* @LastEditTime: 2023-03-21 1
5:00:39
* @LastEditTime: 2023-03-21 1
8:34:17
* @FilePath: \监管系统\js-web-jianguan\src\views\system\users\data\index.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
...
...
@@ -32,13 +32,13 @@ class data extends filter {
label
:
"组织机构"
},
{
prop
:
"job_group"
,
label
:
"职位"
},
{
prop
:
"telephone"
,
label
:
"电话"
}
},
{
prop
:
"jobLevel"
,
label
:
"职位"
},
]
}
}
...
...
src/views/system/users/edit-dialog.vue
View file @
b76a9d2
...
...
@@ -61,8 +61,8 @@
</el-row>
<el-row
:gutter=
"24"
>
<el-col
:span=
"24"
>
<el-form-item
label=
"组织机构:"
label-width=
"100px"
>
<el-select
class=
"selbig"
v-model=
"form.department
Name
"
placeholder=
"组织机构"
>
<el-form-item
label=
"组织机构:"
label-width=
"100px"
prop=
"departmentId"
>
<el-select
class=
"selbig"
v-model=
"form.department
Id
"
placeholder=
"组织机构"
>
<el-option
v-for=
"item in districtAreaList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
/>
</el-select>
</el-form-item>
...
...
@@ -93,10 +93,12 @@
districtAreaList
:
[],
form
:
{
sex
:
"0"
,
departmentId
:
''
,
},
rules
:
{
name
:
[{
required
:
true
,
message
:
"请输入姓名"
,
trigger
:
"blur"
}],
code
:
[{
required
:
true
,
message
:
"请输入工号"
,
trigger
:
"blur"
}],
departmentId
:
[{
required
:
true
,
message
:
"请选择组织机构"
,
trigger
:
'change'
}],
mobilePhone
:
[{
validator
:
"sddd"
,
trigger
:
"blur"
}],
loginName
:
[
{
required
:
true
,
message
:
"请输入用户名"
,
trigger
:
"blur"
},
...
...
@@ -109,11 +111,6 @@
dataUrl
:
api
.
users
};
},
computed
:
{
departmentid
()
{
return
this
.
$store
.
state
.
user
.
userInfo
;
},
},
watch
:
{
value
(
val
)
{
this
.
myValue
=
val
...
...
@@ -147,17 +144,17 @@
})
}
},
handleChange
(
value
)
{
this
.
form
.
departmentId
=
value
;
},
// 保存
submitForm
()
{
this
.
districtAreaList
.
forEach
((
item
)
=>
{
if
(
this
.
form
.
departmentId
==
item
.
id
)
{
this
.
form
.
organizationId
=
item
.
organizationId
}
})
this
.
$refs
.
form
.
validate
((
valid
)
=>
{
if
(
valid
)
{
let
method
=
''
let
url
=
''
this
.
form
.
organizationId
=
this
.
departmentid
.
organizationId
;
this
.
form
.
departmentId
=
this
.
departmentid
.
departmentId
;
const
formData
=
this
.
form
if
(
!
formData
.
id
)
{
method
=
'post'
...
...
@@ -166,7 +163,6 @@
method
=
'put'
url
=
`
${
this
.
dataUrl
}
/
${
formData
.
id
}
`
}
httpAction
(
url
,
formData
,
method
).
then
((
res
)
=>
{
if
(
res
.
status
===
1
)
{
this
.
$message
.
success
({
message
:
res
.
message
,
showClose
:
true
})
...
...
src/views/system/users/index.vue
View file @
b76a9d2
...
...
@@ -111,6 +111,15 @@
.
concat
(
data
.
columns
())
.
concat
([
{
label
:
"职位"
,
render
:
(
h
,
scope
)
=>
{
return
(
<
div
v
-
show
=
{
scope
.
row
.
jobLevel
!==
null
}
>
{
scope
.
row
.
jobLevel
?
"干事"
:
"经理"
}
<
/div
>
)
}
},
{
label
:
"负责人"
,
render
:
(
h
,
scope
)
=>
{
return
(
...
...
@@ -235,7 +244,6 @@
code
:
this
.
form
.
code
,
loginName
:
this
.
form
.
loginName
,
};
console
.
log
(
"this.queryParam"
,
this
.
queryParam
);
getUserLists
(
this
.
queryParam
).
then
((
res
)
=>
{
if
(
res
.
status
===
1
)
{
this
.
loading
=
false
;
...
...
@@ -271,7 +279,6 @@
getAction
(
api
.
departments
,
params
).
then
(
(
res
)
=>
{
let
deptsList
=
res
.
content
;
console
.
log
(
deptsList
);
deptsList
.
forEach
((
ele
)
=>
{
this
.
tableData
.
data
.
forEach
((
item
)
=>
{
if
(
ele
.
id
==
item
.
departmentId
)
{
...
...
@@ -367,6 +374,7 @@
// 修改人员信息
handleEdit
(
row
)
{
console
.
log
(
"rowwwww"
,
row
);
this
.
isDialog
=
true
this
.
$refs
.
dialogForm
.
edit
(
row
);
this
.
$refs
.
dialogForm
.
title
=
"修改"
;
...
...
Please
register
or
sign in
to post a comment