Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mes-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
周远喜
mes-ui
Commits
b160bffd
Commit
b160bffd
authored
Oct 10, 2020
by
骆瑛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
系统用户及缓存管理
parent
255baf57
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
1867 additions
and
76 deletions
+1867
-76
filed.vue
components/page/filed.vue
+59
-16
opration.vue
components/page/opration.vue
+2
-2
add.vue
pages/basicData/cache/add.vue
+6
-8
detail.vue
pages/basicData/cache/detail.vue
+17
-3
edit.vue
pages/basicData/cache/edit.vue
+1
-1
index.vue
pages/basicData/cache/index.vue
+55
-44
add.vue
pages/basicData/systemUser/add.vue
+257
-0
api.js
pages/basicData/systemUser/api.js
+61
-0
detail.vue
pages/basicData/systemUser/detail.vue
+139
-0
edit.vue
pages/basicData/systemUser/edit.vue
+266
-0
index.vue
pages/basicData/systemUser/index.vue
+781
-0
search.vue
pages/basicData/systemUser/search.vue
+216
-0
add.vue
pages/basicData/user/add.vue
+2
-1
index.vue
pages/basicData/user/index.vue
+4
-0
search.vue
pages/basicData/user/search.vue
+1
-1
No files found.
components/page/filed.vue
View file @
b160bffd
<
template
>
<
template
>
<Col
:span=
"span"
class=
"filed-col"
>
<Col
:span=
"span"
class=
"filed-col"
>
<label
v-text=
"name"
class=
"label"
></label>
<div
class=
"label"
>
<span>
<label
v-text=
"name"
></label>
</div>
<div
class=
"value"
>
<slot></slot>
<slot></slot>
</
span
>
</
div
>
</Col>
</Col>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
name
:
'filed'
,
name
:
"filed"
,
props
:
{
props
:
{
name
:
{
name
:
{
type
:
String
type
:
String
...
@@ -18,29 +20,70 @@ export default {
...
@@ -18,29 +20,70 @@ export default {
default
:
12
default
:
12
}
}
}
}
}
}
;
</
script
>
</
script
>
<
style
lang=
"less"
>
<
style
lang=
"less"
>
.detail {
.detail {
display: table;
display: table;
height: 100%;
border-collapse: collapse;
border-collapse: collapse;
background: white;
.ivu-row {
border: 1px solid #ddd;
border-top: none;
height: 100%;
.filed-col {
border: 1px solid #ddd;
border-right: none;
margin: 0 -1px -1px -1px;
// box-sizing: border-box;
display: flex;
flex-direction: row;
line-height: 40px;
> .label {
background: #f7f7f7;
flex-grow: 0;
width: 120px;
text-align: right;
padding: 0 8px;
border-right: 1px solid #ddd;
flex-shrink: 0;
}
> .value {
word-break: break-all;
word-wrap: break-word;
flex-grow: 1;
padding-left: 10px;
> div {
line-height: 30px;
}
}
}
}
}
.new-detail {
.ivu-row {
.ivu-row {
display: table-row;
width: 100% !important;
border-top: 1px solid #ddd;
border-left: 1px solid #ddd;
.filed-col {
.filed-col {
display: table-cell;
border-bottom: 1px solid #ddd;
border-right: 1px solid #ddd;
// margin: 0 0 -1px -1px;
line-height: 30px;
box-sizing: border-box;
box-sizing: border-box;
.label {
line-height: 70px;
background: #e8eaf1;
display: flex;
flex-direction: row;
> .label {
display: inline-block;
display: inline-block;
width: 100px;
width: 100px;
text-align: right;
text-align: right;
padding: 0 5px;
line-height: 40px;
height: 100%;
font-weight: bold;
}
> .value {
text-align: left;
height: 100%;
word-break: break-all;
word-wrap: break-word;
line-height: 20px;
padding-top: 10px;
}
}
}
}
}
}
...
...
components/page/opration.vue
View file @
b160bffd
...
@@ -47,7 +47,7 @@ export default {
...
@@ -47,7 +47,7 @@ export default {
detail
:
"查看"
,
detail
:
"查看"
,
edit
:
"编辑"
,
edit
:
"编辑"
,
add
:
"添加"
,
add
:
"添加"
,
delete
:
"删除"
delete
:
"删除"
,
};
};
if
(
oprates
[
this
.
oprate
]){
if
(
oprates
[
this
.
oprate
]){
...
@@ -56,7 +56,7 @@ export default {
...
@@ -56,7 +56,7 @@ export default {
}
else
if
(
this
.
oprate
){
}
else
if
(
this
.
oprate
){
this
.
css
=
this
.
oprate
;
this
.
css
=
this
.
oprate
;
}
else
if
(
this
.
type
==
'icon'
){
}
else
if
(
this
.
type
==
'icon'
){
this
.
css
=
'icon'
this
.
css
=
'icon'
;
}
}
},
},
methods
:{
methods
:{
...
...
pages/basicData/cache/add.vue
View file @
b160bffd
...
@@ -3,17 +3,15 @@
...
@@ -3,17 +3,15 @@
<Row>
<Row>
<Col
:span=
"12"
<Col
:span=
"12"
><FormItem
:label=
"l('code')"
prop=
"code"
>
><FormItem
:label=
"l('code')"
prop=
"code"
>
<Input
v-model=
"entity.code"
>
</Input>
</FormItem
<Input
v-model=
"entity.code"
>
</Input>
</FormItem></Col>
></Col>
<Col
:span=
"12"
<Col
:span=
"12"
><FormItem
:label=
"l('name')"
prop=
"name"
>
><FormItem
:label=
"l('name')"
prop=
"name"
>
<Input
v-model=
"entity.name"
>
</Input>
</FormItem
<Input
v-model=
"entity.name"
>
</Input>
</FormItem></Col>
></Col>
<Col
:span=
"12"
<Col
:span=
"12"
><FormItem
:label=
"l('duration')"
prop=
"duration"
>
><FormItem
:label=
"l('duration')"
prop=
"duration"
>
<InputNumber
v-model=
"entity.duration"
></InputNumber>
</FormItem
<InputNumber
v-model=
"entity.duration"
></InputNumber>
</FormItem>
>
</Col>
</Col>
<Col
:span=
"12"
<Col
:span=
"12"
><FormItem
:label=
"l('strategy')"
prop=
"strategy"
>
><FormItem
:label=
"l('strategy')"
prop=
"strategy"
>
<Dictionary
<Dictionary
...
@@ -63,7 +61,7 @@ export default {
...
@@ -63,7 +61,7 @@ export default {
code
:
""
,
code
:
""
,
name
:
""
,
name
:
""
,
describe
:
""
,
describe
:
""
,
duration
:
null
,
duration
:
0
,
strategy
:
0
,
strategy
:
0
,
type
:
0
,
type
:
0
,
state
:
0
,
state
:
0
,
...
@@ -71,7 +69,7 @@ export default {
...
@@ -71,7 +69,7 @@ export default {
rules
:
{
rules
:
{
code
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
code
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
duration
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
duration
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
,
type
:
"number"
}],
},
},
};
};
},
},
...
...
pages/basicData/cache/detail.vue
View file @
b160bffd
...
@@ -33,10 +33,11 @@
...
@@ -33,10 +33,11 @@
<State
code=
"mes.cache_config.State"
:value=
"entity.state"
/>
<State
code=
"mes.cache_config.State"
:value=
"entity.state"
/>
</Filed>
</Filed>
<Filed
:span=
"24"
:name=
"l('size')"
>
<Filed
:span=
"24"
:name=
"l('size')"
>
{{
entity
.
size
}}
{{
entity
.
size
}}
<Button
type=
"primary"
v-if=
"entity.size > 0"
>
清理缓存
</Button>
<Button
type=
"error"
v-if=
"entity.size > 0"
@
click=
"clears(entity.id)"
>
清理缓存
</Button
>
</Filed>
</Filed>
<Filed
:span=
"24"
:name=
"l('describe')"
>
{{
entity
.
describe
}}
</Filed>
<Filed
:span=
"24"
:name=
"l('describe')"
>
{{
entity
.
describe
}}
</Filed>
</Row>
</Row>
</div>
</div>
...
@@ -76,6 +77,19 @@ export default {
...
@@ -76,6 +77,19 @@ export default {
key
=
"cache_config"
+
"."
+
key
;
key
=
"cache_config"
+
"."
+
key
;
return
this
.
$t
(
key
);
return
this
.
$t
(
key
);
},
},
clears
(
id
)
{
this
.
$Modal
.
confirm
({
title
:
"确认"
,
content
:
"确认要清理缓存吗?"
,
onOk
:
()
=>
{
Api
.
clears
(
id
).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"缓存已清除"
);
}
});
},
});
},
},
},
watch
:
{
watch
:
{
eid
(
v
)
{
eid
(
v
)
{
...
...
pages/basicData/cache/edit.vue
View file @
b160bffd
...
@@ -63,7 +63,7 @@ export default {
...
@@ -63,7 +63,7 @@ export default {
rules
:
{
rules
:
{
code
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
code
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
duration
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
duration
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
,
type
:
"number"
}],
},
},
};
};
},
},
...
...
pages/basicData/cache/index.vue
View file @
b160bffd
...
@@ -23,9 +23,7 @@
...
@@ -23,9 +23,7 @@
</
template
>
</
template
>
<
template
slot=
"batch"
>
<
template
slot=
"batch"
>
<Button
type=
"primary"
@
click=
"allClear"
>
批量清理
</Button>
<Button
type=
"primary"
@
click=
"allClear"
>
批量清理
</Button>
</
template
>
<Button
type=
"error"
@
click=
"inSure"
>
批量删除
</Button>
<
template
slot=
"batch"
>
<Button
type=
"primary"
@
click=
"inSure"
>
确定
</Button>
</
template
>
</
template
>
<
template
slot=
"buttons"
>
<
template
slot=
"buttons"
>
<Button
type=
"primary"
@
click=
"add"
>
新增
</Button>
<Button
type=
"primary"
@
click=
"add"
>
新增
</Button>
...
@@ -71,6 +69,7 @@ export default {
...
@@ -71,6 +69,7 @@ export default {
},
},
{
{
key
:
"selection"
,
key
:
"selection"
,
title
:
"多选"
,
width
:
60
,
width
:
60
,
align
:
"center"
,
align
:
"center"
,
type
:
"selection"
,
type
:
"selection"
,
...
@@ -81,26 +80,31 @@ export default {
...
@@ -81,26 +80,31 @@ export default {
align
:
"left"
,
align
:
"left"
,
easy
:
true
,
easy
:
true
,
high
:
true
,
high
:
true
,
render
:
(
h
,
params
)
=>
{
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
return
h
(
class
:
"action"
"op"
,
},
[
{
h
(
attrs
:
{
"op"
,
{
oprate
:
"detail"
,
attrs
:
{
},
oprate
:
"detail"
on
:
{
},
click
:
()
=>
this
.
view
(
params
.
row
.
id
),
on
:
{
},
click
:
()
=>
this
.
view
(
params
.
row
.
id
)
},
},
params
.
row
.
name
},
);
params
.
row
.
name
},
),
]);
},
},
},
{
{
key
:
"state"
,
title
:
this
.
l
(
"state"
),
align
:
"left"
,
high
:
true
,
code
:
"mes.cache_config.State"
,
},
{
key
:
"code"
,
title
:
this
.
l
(
"code"
),
align
:
"left"
,
high
:
true
},
{
key
:
"creatorUserId"
,
key
:
"creatorUserId"
,
title
:
this
.
l
(
"creatorUserId"
),
title
:
this
.
l
(
"creatorUserId"
),
align
:
"left"
,
align
:
"left"
,
...
@@ -136,7 +140,7 @@ export default {
...
@@ -136,7 +140,7 @@ export default {
// align: "left",
// align: "left",
// high: true,
// high: true,
// },
// },
{
key
:
"code"
,
title
:
this
.
l
(
"code"
),
align
:
"left"
,
high
:
true
},
{
{
key
:
"duration"
,
key
:
"duration"
,
...
@@ -151,20 +155,15 @@ export default {
...
@@ -151,20 +155,15 @@ export default {
high
:
true
,
high
:
true
,
code
:
"mes.cache_config.Strategy"
,
code
:
"mes.cache_config.Strategy"
,
},
},
{
{
key
:
"type"
,
key
:
"type"
,
title
:
this
.
l
(
"type"
),
title
:
this
.
l
(
"type"
),
align
:
"left"
,
align
:
"left"
,
high
:
true
,
high
:
true
,
code
:
"mes.cache_config.Type"
,
code
:
"mes.cache_config.Type"
,
},
},
{
key
:
"state"
,
title
:
this
.
l
(
"state"
),
align
:
"left"
,
high
:
true
,
code
:
"mes.cache_config.State"
,
},
{
{
key
:
"creationTime"
,
key
:
"creationTime"
,
title
:
this
.
l
(
"creationTime"
),
title
:
this
.
l
(
"creationTime"
),
...
@@ -175,7 +174,7 @@ export default {
...
@@ -175,7 +174,7 @@ export default {
title
:
"操作"
,
title
:
"操作"
,
key
:
"action"
,
key
:
"action"
,
width
:
170
,
width
:
170
,
align
:
"
center
"
,
align
:
"
right
"
,
render
:
(
h
,
params
)
=>
{
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
class
:
"action"
},
[
return
h
(
"div"
,
{
class
:
"action"
},
[
h
(
h
(
...
@@ -198,7 +197,7 @@ export default {
...
@@ -198,7 +197,7 @@ export default {
h
(
h
(
"op"
,
"op"
,
{
{
attrs
:
{
oprate
:
"
clears
"
},
attrs
:
{
oprate
:
"
delete"
,
msg
:
"确认要清理缓存吗?
"
},
on
:
{
click
:
()
=>
this
.
clears
(
params
.
row
.
id
)
},
on
:
{
click
:
()
=>
this
.
clears
(
params
.
row
.
id
)
},
},
},
"清理"
"清理"
...
@@ -310,21 +309,33 @@ export default {
...
@@ -310,21 +309,33 @@ export default {
this
.
results
=
statueArry
;
this
.
results
=
statueArry
;
},
},
inSure
()
{
inSure
()
{
Api
.
deletes
(
this
.
results
).
then
((
r
)
=>
{
this
.
$Modal
.
confirm
({
if
(
r
.
success
)
{
title
:
"确认"
,
this
.
$refs
.
grid
.
load
();
content
:
"是否确认批量删除?"
,
this
.
$refs
.
grid
.
selectAll
(
false
);
onOk
:
()
=>
{
this
.
$Message
.
success
(
"删除成功"
);
Api
.
deletes
(
this
.
results
).
then
((
r
)
=>
{
}
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
();
this
.
$refs
.
grid
.
selectAll
(
false
);
this
.
$Message
.
success
(
"删除成功"
);
}
});
},
});
});
},
},
allClear
()
{
allClear
()
{
Api
.
allClears
(
this
.
results
).
then
((
r
)
=>
{
this
.
$Modal
.
confirm
({
if
(
r
.
success
)
{
title
:
"确认"
,
this
.
$refs
.
grid
.
load
();
content
:
"是否确认批量清除数据?"
,
this
.
$refs
.
grid
.
selectAll
(
false
);
onOk
:
()
=>
{
this
.
$Message
.
success
(
"缓存已清除"
);
Api
.
allClears
(
this
.
results
).
then
((
r
)
=>
{
}
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
();
this
.
$refs
.
grid
.
selectAll
(
false
);
this
.
$Message
.
success
(
"缓存已清除"
);
}
});
},
});
});
},
},
},
},
...
...
pages/basicData/systemUser/add.vue
0 → 100644
View file @
b160bffd
<
template
>
<div
class=
"addUser"
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"100"
>
<Row
class=
"rowTitle100"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('userName')"
prop=
"userName"
>
<Input
v-model=
"entity.userName"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('cardNo')"
prop=
"cardNo"
>
<Input
v-model=
"entity.cardNo"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('status')"
prop=
"status"
>
<Dictionary
code=
"User.base.status"
v-model=
"entity.status"
type=
"radio"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('gender')"
prop=
"gender"
>
<Dictionary
code=
"User.base.gender"
v-model=
"entity.gender"
type=
"radio"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('birthday')"
prop=
"birthday"
>
<DatePicker
type=
"date"
v-model=
"entity.birthday"
placeholder=
"请选择"
></DatePicker>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('degreeId')"
prop=
"degreeId"
>
<Dictionary
code=
"User.base.degree"
v-model=
"entity.degreeId"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('departmentTitle')"
prop=
"departmentTitle"
>
<DepartmentSelect
v-model=
"entity.departmentId"
@
on-change=
"setDepartmentTitle"
/>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('phone')"
prop=
"phone"
>
<Input
v-model=
"entity.phone"
/>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('email')"
>
<Input
v-model=
"entity.email"
/>
</FormItem>
</Col>
<!--
<Col
:span=
"12"
>
<FormItem
:label=
"l('enableEquip')"
prop=
"enableEquip"
>
<Input
v-model=
"entity.enableEquip"
></Input>
</FormItem>
</Col>
-->
<Col
:span=
"12"
>
<FormItem
:label=
"l('positionId')"
prop=
"positionId"
>
<Dictionary
code=
"User.base.position"
v-model=
"entity.positionId"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('titleId')"
prop=
"titleId"
>
<Dictionary
code=
"User.base.jobtitle"
v-model=
"entity.titleId"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('licensedToWork')"
prop=
"licensedToWork"
>
<Dictionary
code=
"User.base.workLicense"
v-model=
"entity.licensedToWork"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('property')"
>
<Checkbox
v-model=
"entity.property"
>
排产资源
</Checkbox>
</FormItem>
</Col>
<Col
:span=
"24"
>
<FormItem
:label=
"l('remark')"
prop=
"remark"
>
<Input
v-model=
"entity.remark"
type=
"textarea"
:rows=
"3"
></Input>
</FormItem>
</Col>
</Row>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</Form>
</div>
</
template
>
<
script
>
import
Api
from
"./api"
;
import
util
from
'@/libs/util'
;
const
valideTel
=
(
rule
,
value
,
callback
)
=>
{
var
re
=
/^1
[
3-9
]{1}[
0-9
]{9}
/
;
if
(
value
===
""
||
value
===
null
)
{
callback
(
new
Error
(
"请输入手机号"
));
}
else
if
(
!
re
.
test
(
value
))
{
callback
(
new
Error
(
"请输入正确手机号"
));
}
else
{
callback
();
}
};
export
default
{
name
:
"Add"
,
components
:
{},
data
()
{
const
validateCarNo
=
(
rule
,
value
,
callback
)
=>
{
if
(
!
value
)
{
return
callback
(
new
Error
(
"员工编号不能为空"
));
}
Api
.
list
(
value
).
then
(
r
=>
{
if
(
r
.
result
.
length
>
0
)
{
return
callback
(
new
Error
(
"员工编号已经存在"
));
}
else
{
callback
();
}
});
};
return
{
disabled
:
false
,
showDeptTree
:
false
,
entity
:
{
gender
:
1
,
status
:
1
,
property
:
false
,
userType
:
2
},
rules
:
{
userName
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
cardNo
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
},
{
validator
:
validateCarNo
,
trigger
:
"blur"
}
],
departmentTitle
:
[{
required
:
true
,
message
:
"必选"
,
trigger
:
"change"
}],
// email: [
// { required: true, message: '必填', trigger: 'blur', type: 'email' }
// ],
phone
:
[{
validator
:
valideTel
,
required
:
true
,
trigger
:
"blur"
}]
// degreeId: [
// { required: true, message: '必填', trigger: 'blur', type: 'number' }
// ],
// phone: [{ required: true, message: '必填', trigger: 'blur' }]
}
};
},
props
:
{
v
:
Object
},
methods
:
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
(
v
=>
{
if
(
v
)
{
if
(
this
.
entity
.
property
)
{
this
.
entity
.
property
=
2
;
}
else
{
this
.
entity
.
property
=
""
;
}
this
.
disabled
=
true
;
Api
.
create
(
this
.
entity
)
.
then
(
r
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
//账户同步操作start
let
parms
=
{
userId
:
r
.
result
.
id
,
loginName
:
this
.
entity
.
phone
,
//用户电话
status
:
this
.
entity
.
status
,
//状态
// tenantCode: this.$store.state.userInfo.tenantCode, //商户号
tenantCode
:
util
.
cookies
.
get
(
'tenantCode'
),
//商户号
name
:
this
.
entity
.
userName
};
Api
.
authAccount
(
parms
).
then
(
res
=>
{
if
(
res
.
success
)
{
this
.
$Message
.
success
(
"账户同步成功"
);
//修改用户表的accountId start
let
parms1
=
{
userId
:
parms
.
userId
,
accountId
:
res
.
result
};
Api
.
updateAccount
(
parms1
).
then
(
res1
=>
{
if
(
res1
.
success
)
{
this
.
$Message
.
success
(
"操作成功"
);
this
.
$emit
(
"on-ok"
);
}
else
{
this
.
$Message
.
error
(
"同步失败"
);
}
});
//修改用户表的accountId end
}
});
//账户同步操作end
}
else
{
this
.
$Message
.
error
(
r
.
error
.
message
);
}
})
.
catch
(
err
=>
{
// alert(JSON.stringify(err))
console
.
warn
(
err
);
this
.
disabled
=
false
;
this
.
$Message
.
error
(
err
.
error
.
message
);
});
}
});
},
handleClose
()
{
this
.
$emit
(
"on-close"
);
},
l
(
key
)
{
key
=
"user"
+
"."
+
key
;
return
this
.
$t
(
key
);
},
setDepartmentTitle
(
v
,
item
)
{
this
.
entity
.
departmentTitle
=
item
.
name
;
},
selectDepart
()
{
this
.
showDeptTree
=
true
;
},
getBirthday
(
value
)
{
this
.
entity
.
birthday
=
value
;
}
},
watch
:
{
v
()
{
this
.
entity
=
this
.
$u
.
clone
(
this
.
v
);
}
}
};
</
script
>
<
style
lang=
"less"
>
.addUser {
.ivu-radio-wrapper {
vertical-align: top;
}
}
</
style
>
pages/basicData/systemUser/api.js
0 → 100644
View file @
b160bffd
import
Api
from
'@/plugins/request'
export
default
{
index
:
`
${
systemUrl
}
/user/paged`
,
paged
(
params
)
{
return
Api
.
post
(
`
${
systemUrl
}
/user/paged`
,
params
);
},
list
(
cardNo
)
{
var
params
=
{
"conditions"
:
[
{
"fieldName"
:
"cardNo"
,
"fieldValue"
:
cardNo
,
"conditionalType"
:
"Equal"
}
],
"pageSize"
:
3
}
return
Api
.
post
(
`
${
systemUrl
}
/user/list`
,
params
);
},
get
(
params
)
{
return
Api
.
get
(
`
${
systemUrl
}
/user/get`
,
params
);
},
create
(
params
)
{
return
Api
.
post
(
`
${
systemUrl
}
/user/create`
,
params
);
},
update
(
params
)
{
return
Api
.
post
(
`
${
systemUrl
}
/user/update`
,
params
);
},
//在10010上更新用户信息//新增、修改、删除、修改密码
authAccount
(
params
)
{
return
Api
.
post
(
`
${
Platform
}
/account/sync`
,
params
);
//168
// return Api.post(`${Platform}/api/services/app/useraccount/sync`, params);
},
//10010重置密码
authResetpassword
(
params
)
{
return
Api
.
post
(
`
${
UserUrl
}
/api/services/app/account/resetpassword`
,
params
);
},
//10010修改密码
authChangepassword
(
params
)
{
return
Api
.
post
(
`
${
authUrl
}
/api/services/app/useraccount/changepassword`
,
params
);
},
//在10020上更新用户AccountId信息
updateAccount
(
params
)
{
return
Api
.
post
(
`
${
systemUrl
}
/user/updateaccountid`
,
params
);
},
//删除:
delete
(
params
)
{
return
Api
.
delete
(
`
${
systemUrl
}
/user/delete`
,
{
params
:
params
});
},
//重置密码
accountreset
(
params
)
{
return
Api
.
post
(
`
${
systemUrl
}
/user/accountreset`
,
params
);
},
//批量导入用户
userImport
(
params
)
{
return
Api
.
post
(
`
${
systemUrl
}
/userimportservice/import`
,
params
);
},
}
\ No newline at end of file
pages/basicData/systemUser/detail.vue
0 → 100644
View file @
b160bffd
<
template
>
<div
class=
"addUser"
>
<Form
ref=
"form"
:model=
"entity"
:label-width=
"90"
>
<Row
class=
"row_border_bottom"
>
<Col
:span=
"8"
>
<!--
<FormItem
:label=
"l('userName')"
prop=
"userName"
>
{{
entity
.
userName
}}
</FormItem>
-->
<b>
{{
l
(
'userName'
)
}}
</b>
<p>
{{
entity
.
userName
}}
</p>
</Col>
<Col
:span=
"8"
>
<!--
<FormItem
:label=
"l('cardNo')"
prop=
"cardNo"
>
{{
entity
.
cardNo
}}
</FormItem>
-->
<b>
{{
l
(
'cardNo'
)
}}
</b>
<p>
{{
entity
.
cardNo
}}
</p>
</Col>
<Col
:span=
"8"
>
<!--
<FormItem
:label=
"l('gender')"
prop=
"gender"
>
<state
code=
"User.base.gender"
:value=
"entity.gender"
type=
"text"
></state>
</FormItem>
-->
<b>
{{
l
(
'gender'
)
}}
</b>
<p><state
code=
"User.base.gender"
:value=
"entity.gender"
type=
"text"
></state></p>
</Col>
</Row>
<Row
class=
"row_border_bottom"
>
<Col
:span=
"8"
>
<!--
<FormItem
:label=
"l('birthday')"
prop=
"birthday"
>
{{
entity
.
birthday
}}
</FormItem>
-->
<b>
{{
l
(
'birthday'
)
}}
</b>
<p>
{{
entity
.
birthday
}}
</p>
</Col>
<Col
:span=
"8"
>
<!--
<FormItem
:label=
"l('degreeId')"
prop=
"degreeId"
>
<state
code=
"User.base.degree"
:value=
"entity.degreeId"
type=
"text"
></state>
</FormItem>
-->
<b>
{{
l
(
'degreeId'
)
}}
</b>
<p><state
code=
"User.base.degree"
:value=
"entity.degreeId"
type=
"text"
></state></p>
</Col>
<Col
:span=
"8"
>
<!--
<FormItem
:label=
"l('departmentTitle')"
prop=
"departmentTitle"
>
{{
entity
.
departmentTitle
}}
</FormItem>
-->
<b>
{{
l
(
'departmentTitle'
)
}}
</b>
<p>
{{
entity
.
departmentTitle
}}
</p>
</Col>
</Row>
<Row
class=
"row_border_bottom"
>
<Col
:span=
"8"
>
<!--
<FormItem
:label=
"l('status')"
prop=
"status"
>
<state
code=
"User.base.status"
:value=
"entity.status"
type=
"text"
></state>
</FormItem>
-->
<b>
{{
l
(
'status'
)
}}
</b>
<p><state
code=
"User.base.status"
:value=
"entity.status"
type=
"text"
></state></p>
</Col>
<Col
:span=
"8"
>
<!--
<FormItem
:label=
"l('phone')"
prop=
"phone"
>
{{
entity
.
phone
}}
</FormItem>
-->
<b>
{{
l
(
'phone'
)
}}
</b>
<p>
{{
entity
.
phone
}}
</p>
</Col>
<Col
:span=
"8"
>
<!--
<FormItem
:label=
"l('email')"
prop=
"email"
>
{{
entity
.
email
}}
</FormItem>
-->
<b>
{{
l
(
'email'
)
}}
</b>
<p>
{{
entity
.
email
}}
</p>
</Col>
<!--
<Col
:span=
"12"
>
<FormItem
:label=
"l('enableEquip')"
prop=
"enableEquip"
>
{{
entity
.
enableEquip
}}
</FormItem>
</Col>
-->
</Row>
<Row
class=
"row_border_bottom"
>
<Col
:span=
"8"
>
<!--
<FormItem
:label=
"l('positionId')"
prop=
"positionId"
>
<state
code=
"User.base.position"
:value=
"entity.positionId"
type=
"text"
></state>
</FormItem>
-->
<b>
{{
l
(
'positionId'
)
}}
</b>
<p><state
code=
"User.base.position"
:value=
"entity.positionId"
type=
"text"
></state></p>
</Col>
<Col
:span=
"8"
>
<!--
<FormItem
:label=
"l('titleId')"
prop=
"titleId"
>
<state
code=
"User.base.jobtitle"
:value=
"entity.titleId"
type=
"text"
></state>
</FormItem>
-->
<b>
{{
l
(
'titleId'
)
}}
</b>
<p><state
code=
"User.base.titleId"
:value=
"entity.titleId"
type=
"text"
></state></p>
</Col>
<Col
:span=
"8"
>
<!--
<FormItem
:label=
"l('licensedToWork')"
prop=
"licensedToWork"
>
<state
code=
"User.base.workLicense"
:value=
"entity.licensedToWork"
type=
"text"
></state>
</FormItem>
-->
<b>
{{
l
(
'workLicense'
)
}}
</b>
<p><state
code=
"User.base.workLicense"
:value=
"entity.workLicense"
type=
"text"
></state></p>
</Col>
</Row>
<Row
class=
"row_border_bottom"
>
<Col
:span=
"24"
>
<!--
<FormItem
:label=
"l('remark')"
prop=
"remark"
>
{{
entity
.
remark
}}
</FormItem>
-->
<b>
{{
l
(
'remark'
)
}}
</b>
<p>
{{
entity
.
remark
}}
</p>
</Col>
</Row>
</Form>
</div>
</
template
>
<
script
>
import
Api
from
'./api'
export
default
{
name
:
'Add'
,
data
()
{
return
{
entity
:
{}
}
},
props
:
{
eid
:
Number
},
methods
:
{
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
this
.
entity
=
r
.
result
this
.
$emit
(
'on-load'
)
})
},
handleClose
()
{
this
.
$emit
(
'on-close'
)
},
l
(
key
)
{
key
=
'user'
+
'.'
+
key
return
this
.
$t
(
key
)
}
},
watch
:
{
eid
(
v
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
)
}
}
}
}
</
script
>
<
style
lang=
"less"
>
.addUser {
.ivu-radio-wrapper {
vertical-align: top;
}
}
</
style
>
pages/basicData/systemUser/edit.vue
0 → 100644
View file @
b160bffd
<
template
>
<div
class=
"addUser"
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"100"
>
<Row
class=
"rowTitle100"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('userName')"
prop=
"userName"
>
<Input
v-model=
"entity.userName"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('cardNo')"
prop=
"cardNo"
>
<span
v-text=
"entity.cardNo"
></span>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('status')"
prop=
"status"
>
<Dictionary
code=
"User.base.status"
v-model=
"entity.status"
type=
"radio"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('gender')"
prop=
"gender"
>
<Dictionary
code=
"User.base.gender"
v-model=
"entity.gender"
type=
"radio"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('birthday')"
prop=
"birthday"
>
<DatePicker
type=
"date"
v-model=
"entity.birthday"
style=
"width:100%"
placeholder=
"请选择"
></DatePicker>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('degreeId')"
prop=
"degreeId"
>
<Dictionary
code=
"User.base.degree"
v-model=
"entity.degreeId"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('departmentTitle')"
prop=
"departmentTitle"
>
<DepartmentSelect
v-model=
"entity.departmentId"
@
on-change=
"setDepartmentTitle"
/>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('phone')"
prop=
"phone"
>
<Input
v-model=
"entity.phone"
/>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('email')"
>
<Input
v-model=
"entity.email"
/>
</FormItem>
</Col>
<!--
<Col
:span=
"12"
>
<FormItem
:label=
"l('enableEquip')"
prop=
"enableEquip"
>
<Input
v-model=
"entity.enableEquip"
></Input>
</FormItem>
</Col>
-->
<Col
:span=
"12"
>
<FormItem
:label=
"l('positionId')"
prop=
"positionId"
>
<Dictionary
code=
"User.base.position"
v-model=
"entity.positionId"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('titleId')"
prop=
"titleId"
>
<Dictionary
code=
"User.base.jobtitle"
v-model=
"entity.titleId"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('licensedToWork')"
prop=
"licensedToWork"
>
<Dictionary
code=
"User.base.workLicense"
v-model=
"entity.licensedToWork"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('property')"
>
<Checkbox
v-model=
"entity.property"
>
排产资源
</Checkbox>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
label=
"用户类型"
>
<Dictionary
code=
"User.base.UserType"
v-model=
"entity.userType"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"24"
>
<FormItem
:label=
"l('remark')"
prop=
"remark"
>
<Input
v-model=
"entity.remark"
type=
"textarea"
:rows=
"3"
></Input>
</FormItem>
</Col>
</Row>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</Form>
</div>
</
template
>
<
script
>
import
Api
from
"./api"
;
const
valideTel
=
(
rule
,
value
,
callback
)
=>
{
var
re
=
/^1
[
3-9
]{1}[
0-9
]{9}
/
;
if
(
value
===
""
||
value
===
null
)
{
callback
(
new
Error
(
"请输入手机号"
));
}
else
if
(
!
re
.
test
(
value
))
{
callback
(
new
Error
(
"请输入正确手机号"
));
}
else
{
callback
();
}
};
export
default
{
name
:
"Edit"
,
data
()
{
return
{
disabled
:
false
,
showDeptTree
:
false
,
entity
:
{},
rules
:
{
userName
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
departmentTitle
:
[{
required
:
true
,
message
:
"必选"
,
trigger
:
"blur"
}],
//cardNo: [{ required: true, message: '必填', trigger: 'blur' }],
// birthday: [{ required: true, message: '必填', trigger: 'change' }],
// degreeId: [
// { required: true, message: '必填', trigger: 'blur', type: 'number' }
// ],
// email: [
// { required: true, message: '必填', trigger: 'blur', type: 'email' }
// ],
phone
:
[{
validator
:
valideTel
,
required
:
true
,
trigger
:
"blur"
}]
}
};
},
props
:
{
eid
:
Number
},
methods
:
{
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
(
r
=>
{
this
.
entity
=
r
.
result
;
if
(
r
.
result
.
property
==
2
)
{
this
.
entity
.
property
=
true
;
}
else
{
this
.
entity
.
property
=
false
;
}
this
.
$emit
(
"on-load"
);
});
},
handleSubmit
()
{
this
.
$refs
.
form
.
validate
(
v
=>
{
if
(
v
)
{
this
.
disabled
=
true
;
if
((
this
.
entity
.
property
=
true
))
{
this
.
entity
.
property
=
2
;
}
else
{
this
.
entity
.
property
=
""
;
}
Api
.
update
(
this
.
entity
)
.
then
(
r
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
//账户同步操作start
if
(
this
.
entity
.
accountId
>
0
)
{
//账户已同步的情况下
let
parms2
=
{
accountId
:
this
.
entity
.
accountId
,
userId
:
this
.
entity
.
id
,
loginName
:
this
.
entity
.
phone
,
//用户电话
status
:
this
.
entity
.
status
,
tenantCode
:
this
.
$store
.
state
.
userInfo
.
tenantCode
,
//商户号
name
:
this
.
entity
.
userName
};
Api
.
authAccount
(
parms2
).
then
(
res
=>
{
//同步电话信息等
if
(
res
.
success
)
{
this
.
$Message
.
success
(
"账户同步成功"
);
}
else
{
this
.
$Message
.
error
(
"账户同步失败"
);
}
});
}
else
{
//账户新建后还未同步成功的情况下
let
parms
=
{
userId
:
this
.
entity
.
id
,
loginName
:
this
.
entity
.
phone
,
//用户电话
status
:
this
.
entity
.
status
,
tenantCode
:
this
.
$store
.
state
.
userInfo
.
tenantCode
,
//商户号
name
:
this
.
entity
.
userName
};
Api
.
authAccount
(
parms
).
then
(
res1
=>
{
if
(
res1
.
success
)
{
this
.
$Message
.
success
(
"账户同步成功"
);
//修改用户表的accountId start
let
parms1
=
{
userId
:
parms
.
userId
,
accountId
:
res1
.
result
//账户同步成功后返回的accountId
};
Api
.
updateAccount
(
parms1
).
then
(
res2
=>
{
if
(
res2
.
success
)
{
this
.
$Message
.
success
(
"操作成功"
);
}
else
{
this
.
$Message
.
error
(
"操作失败"
);
}
});
//修改用户表的accountId end
}
});
}
//账户同步操作end
this
.
$emit
(
"on-ok"
);
}
else
{
this
.
$Message
.
error
(
"保存失败"
);
}
})
.
catch
(
err
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
"保存失败"
);
console
.
warn
(
err
);
});
}
});
},
handleClose
()
{
this
.
$emit
(
"on-close"
);
},
l
(
key
)
{
key
=
"user"
+
"."
+
key
;
return
this
.
$t
(
key
);
},
setDepartmentTitle
(
v
,
item
)
{
if
(
item
)
{
this
.
entity
.
departmentTitle
=
item
.
name
;
}
},
getBirthday
(
value
)
{
this
.
entity
.
birthday
=
value
;
}
},
watch
:
{
eid
(
v
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
);
}
}
}
};
</
script
>
<
style
lang=
"less"
>
.addUser {
.ivu-radio-wrapper {
vertical-align: top;
}
}
</
style
>
pages/basicData/systemUser/index.vue
0 → 100644
View file @
b160bffd
<
template
>
<Layout
class=
"full"
>
<Sider
hide-trigger
:style=
"
{background: '#fff'}" width="260" class="menu" style=" flex:0;border:none">
<div
class=
"zh-tree"
:style=
"
{height:treeHeight+'px'}">
<h3
class=
"zh-title"
>
部门结构
</h3>
<div
class=
"zh-box"
>
<Input
search
placeholder=
"请输入查询条件"
v-model=
"treeInputSearch"
/>
<Tree
:data=
"searchList"
class=
"tree-content"
@
on-select-change=
"selectTreeNode"
></Tree>
</div>
</div>
</Sider>
<Content
class=
"content"
>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
:conditions=
"easySearch"
placeholder=
"请输入姓名/员工编号"
exportTitle=
"用户管理"
:high=
"true"
:height=
"tdHeight"
>
<template
slot=
"searchForm"
>
<Search
/>
</
template
>
<
template
slot=
"buttons"
>
<Button
type=
"primary"
@
click=
"addModal=true"
>
新增
</Button>
<Button
@
click=
"openModalIm"
>
导入
</Button>
</
template
>
</DataGrid>
<Modal
v-model=
"addModal"
title=
"新增"
footer-hide
width=
"800"
>
<Add
@
on-close=
"cancel"
@
on-ok=
"addOk"
/>
</Modal>
<Modal
v-model=
"editModal"
title=
"编辑"
footer-hide
width=
"800"
>
<Edit
:eid=
"curId"
@
on-close=
"cancel"
@
on-ok=
"addOk"
/>
</Modal>
<Modal
v-model=
"detailModal"
title=
"详情"
width=
"900"
>
<Detail
:eid=
"curId"
/>
</Modal>
<Modal
v-model=
"deletelModal"
title=
"删除"
@
on-ok=
"removeOk"
@
on-cancel=
"cancel"
>
<p>
确定删除?
</p>
</Modal>
<!-- 重置密码 -->
<Modal
v-model=
"show7"
title=
"提示"
:mask-closable=
"false"
ok-text=
"确定"
cancel-text=
"取消"
@
on-ok=
"reset"
>
此操作将密码重置为初始密码, 是否继续?
</Modal>
<!-- 授权 -->
<Modal
v-model=
"show3"
title=
"授权-当前用户"
:width=
"800"
:mask-closable=
"false"
ok-text=
"保存"
cancel-text=
"取消"
@
on-ok=
"authOk"
@
on-cancel=
"authCancle"
>
<div
style=
"max-height:400px;overflow:auto"
>
<Form
:model=
"authModel"
:label-width=
"70"
>
<Row>
<Col
span=
"24"
>
默认角色
<!-- <Input type="textarea" size="large" :rows="2" v-model="defaultRole" placeholder="暂无数据"/>
-->
<div
style=
"width:750px;border:2px solid #E8EAEC;margin-top:10px"
>
<Row>
<CheckboxGroup
v-model=
"authModel.default"
>
<Col
span=
"5"
offset=
"1"
v-for=
"(item,index) in authList1"
:key=
"index"
style=
"line-height:33px;font-size:14px;"
>
<Checkbox
:label=
"item.id"
>
{{item.name}}
</Checkbox>
</Col>
</CheckboxGroup>
</Row>
</div>
</Col>
</Row>
<Row>
<Col
span=
"24"
>
<div
style=
"margin-top:10px;"
>
自定义角色
<div
style=
"width:750px;border:2px solid #E8EAEC;margin-top:10px"
>
<Row>
<CheckboxGroup
v-model=
"authModel.extra"
>
<Col
span=
"5"
offset=
"1"
v-for=
"(item,index) in authList"
:key=
"index"
style=
"line-height:33px;font-size:14px;"
>
<Checkbox
:label=
"item.id"
>
{{item.name}}
</Checkbox>
</Col>
</CheckboxGroup>
</Row>
</div>
</div>
</Col>
</Row>
</Form>
</div>
</Modal>
<Modal
v-model=
"syncAccountModal"
title=
"同步账户"
@
on-ok=
"syncAccountOk"
@
on-cancel=
"cancel"
>
<p>
确定同步账户?
</p>
</Modal>
<ImportExcel
ref=
"importExcel"
@
on-get-data=
"getData"
:modalTitle=
"temTitle"
:columns=
"columns"
:open=
"ModalIm"
@
on-cancel=
"ModalImCancel"
@
on-ok=
"ok"
/>
</Content>
</Layout>
</template>
<
script
>
import
Api
from
"./api"
;
import
ApiDepart
from
"../department/api"
;
import
Add
from
"./add"
;
import
Edit
from
"./edit"
;
import
Detail
from
"./detail"
;
import
Search
from
"./search"
;
import
service
from
"@/plugins/request"
;
import
util
from
"@/libs/util"
;
import
{
Time
}
from
"view-design"
;
import
XLSX
from
"xlsx"
;
export
default
{
name
:
"list"
,
components
:
{
Add
,
Edit
,
Detail
,
Search
,
},
data
()
{
return
{
action
:
Api
.
index
,
easySearch
:
{
keys
:
{
op
:
"userName,cardNo,national,phone,email,enableEquip,jobNo,remark,departmentTitle,roleTitles"
,
value
:
null
,
default
:
true
,
},
departmentId
:
{
op
:
"In"
,
value
:
""
},
userType
:
{
op
:
"Equal"
,
value
:
"2"
},
},
treeData
:
[],
tdHeight
:
""
,
tdHeightExcel
:
""
,
treeInputSearch
:
""
,
treeHeight
:
""
,
tableHeight
:
""
,
show7
:
false
,
//重置密码
show3
:
false
,
//授权角色
authList
:
[],
authList1
:
[],
authModel
:
{
default
:
[],
extra
:
[]
},
ids
:
[],
addModal
:
false
,
editModal
:
false
,
detailModal
:
false
,
deletelModal
:
false
,
syncAccountModal
:
false
,
curId
:
0
,
columns
:
[
// {
// title: '序号',
// type: 'index',
// width: 80,
// align: 'center'
// },
{
key
:
"id"
,
title
:
this
.
l
(
"id"
),
hide
:
true
,
align
:
"left"
},
{
key
:
"userName"
,
title
:
this
.
l
(
"userName"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
class
:
"action"
},
[
h
(
"op"
,
{
attrs
:
{
oprate
:
"detail"
},
on
:
{
click
:
()
=>
this
.
detail
(
params
.
row
.
id
)
},
},
params
.
row
.
userName
),
]);
},
},
// {
// key: 'cardTypeId',
// title: this.l('cardTypeId'),
// align: 'left',
// high: true,
// hide: true
// },
{
key
:
"cardNo"
,
title
:
this
.
l
(
"cardNo"
),
align
:
"left"
,
width
:
95
,
easy
:
true
,
high
:
true
,
},
{
key
:
"gender"
,
title
:
this
.
l
(
"gender"
),
align
:
"center"
,
high
:
true
,
width
:
65
,
code
:
"User.base.gender"
,
import
:
true
,
},
{
key
:
"birthday"
,
title
:
this
.
l
(
"birthday"
),
align
:
"center"
,
high
:
true
,
width
:
95
,
type
:
"date"
,
import
:
true
,
},
{
key
:
"degreeId"
,
title
:
this
.
l
(
"degreeId"
),
align
:
"left"
,
high
:
true
,
code
:
"User.base.degree"
,
import
:
true
,
},
{
key
:
"status"
,
title
:
this
.
l
(
"status"
),
align
:
"center"
,
high
:
true
,
code
:
"User.base.status"
,
import
:
true
,
},
{
key
:
"departmentId"
,
title
:
this
.
l
(
"departmentId"
),
align
:
"right"
,
easy
:
true
,
high
:
true
,
import
:
true
,
},
{
key
:
"departmentTitle"
,
title
:
this
.
l
(
"departmentTitle"
),
align
:
"left"
,
easy
:
true
,
width
:
100
,
high
:
true
,
import
:
true
,
},
{
key
:
"roleTitles"
,
title
:
this
.
l
(
"roleTitles"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
hide
:
true
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
class
:
"action"
},
[
h
(
"op"
,
{
attrs
:
{
oprate
:
"detail"
,
class
:
params
.
row
.
roleTitles
==
null
||
params
.
row
.
roleTitles
==
""
?
"empower"
:
"detail"
,
},
on
:
{
click
:
()
=>
this
.
authorize
(
params
.
row
.
id
)
},
},
params
.
row
.
roleTitles
==
null
||
params
.
row
.
roleTitles
==
""
?
"授权"
:
params
.
row
.
roleTitles
),
]);
},
},
{
key
:
"accountId"
,
title
:
this
.
l
(
"accountId"
),
hide
:
true
,
align
:
"left"
,
import
:
true
,
},
// {
// key: 'userType',
// title: this.l('userType'),
// hide: true,
// align: 'left'
// },
{
key
:
"phone"
,
title
:
this
.
l
(
"phone"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
import
:
true
,
},
{
key
:
"email"
,
title
:
this
.
l
(
"email"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
import
:
true
,
},
{
key
:
"licensedToWork"
,
title
:
this
.
l
(
"licensedToWork"
),
align
:
"left"
,
code
:
"User.base.workLicense"
,
import
:
true
,
},
{
key
:
"positionId"
,
title
:
this
.
l
(
"positionId"
),
align
:
"left"
,
high
:
true
,
code
:
"User.base.position"
,
import
:
true
,
},
{
key
:
"titleId"
,
title
:
this
.
l
(
"titleId"
),
align
:
"left"
,
high
:
true
,
code
:
"User.base.jobtitle"
,
import
:
true
,
},
{
key
:
"creatorUserId"
,
title
:
this
.
l
(
"creatorUserId"
),
align
:
"left"
,
import
:
false
,
hide
:
true
,
import
:
true
,
type
:
'user'
},
{
key
:
"creationTime"
,
title
:
this
.
l
(
"creationTime"
),
align
:
"left"
,
import
:
false
,
hide
:
true
,
import
:
true
,
},
{
key
:
"lastModifierUserId"
,
title
:
this
.
l
(
"lastModifierUserId"
),
align
:
"left"
,
import
:
false
,
hide
:
true
,
import
:
true
,
type
:
'user'
},
{
key
:
"lastModificationTime"
,
title
:
this
.
l
(
"lastModificationTime"
),
align
:
"left"
,
import
:
false
,
hide
:
true
,
import
:
true
,
},
{
title
:
"操作"
,
key
:
"action"
,
width
:
185
,
align
:
"right"
,
import
:
false
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
class
:
"action"
},
[
h
(
"op"
,
{
attrs
:
{
oprate
:
"detail"
,
class
:
"empower"
,
},
on
:
{
click
:
()
=>
this
.
syncAccount
(
params
.
row
)
},
},
params
.
row
.
accountId
==
0
?
"同步"
:
""
),
h
(
"op"
,
{
attrs
:
{
oprate
:
"edit"
},
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
.
id
)
},
},
"编辑"
),
h
(
"op"
,
{
attrs
:
{
oprate
:
"remove"
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
)
},
},
"删除"
),
h
(
"op"
,
{
attrs
:
{
oprate
:
"detail"
,
},
on
:
{
click
:
()
=>
this
.
openReset
(
params
.
row
)
},
},
"重置密码"
),
]);
},
},
],
selectRow
:
{},
//删除时选中的行数据
//导入导出时使用start
formatList
:
[
"xlsx"
],
searchs
:
{
pageIndex
:
1
,
pageSize
:
1000
,
conditions
:
[],
},
list
:
[],
modalImport
:
false
,
excelData
:
[],
departArr
:
[],
//部门list
columnsImport
:
[],
temTitle
:
'用户管理'
,
ModalIm
:
false
,
//导入导出时使用end
};
},
created
()
{
this
.
treeHeight
=
window
.
innerHeight
-
150
;
this
.
tdHeight
=
window
.
innerHeight
-
240
;
this
.
tdHeightExcel
=
window
.
innerHeight
-
240
;
//导出对列表头进行预加载start
let
tempCol
=
this
.
$u
.
clone
(
this
.
columns
);
tempCol
.
forEach
((
ele
,
index
)
=>
{
if
(
ele
.
key
==
"action"
)
{
ele
.
hide
=
true
;
}
});
this
.
columnsImport
=
tempCol
;
//导出对列表头进行预加载end
},
mounted
()
{
window
.
onresize
=
()
=>
{
///浏览器窗口大小变化
return
(()
=>
{
window
.
screenHeight
=
window
.
innerHeight
;
this
.
treeHeight
=
window
.
screenHeight
-
150
;
this
.
tdHeight
=
window
.
screenHeight
-
240
;
this
.
tdHeightExcel
=
window
.
innerHeight
-
240
;
})();
};
this
.
initTree
();
this
.
loadrole
(
0
);
this
.
loadrole
(
1
);
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
methods
:
{
addOk
()
{
this
.
$refs
.
grid
.
load
();
// this.$refs.grid.reload(this.easySearch)
this
.
addModal
=
false
;
this
.
detailModal
=
false
;
this
.
editModal
=
false
;
this
.
curId
=
0
;
//this.$refs.grid.easySearch()
},
search
()
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
},
detail
(
id
)
{
this
.
detailModal
=
true
;
this
.
curId
=
id
;
},
edit
(
id
)
{
this
.
editModal
=
true
;
this
.
curId
=
id
;
},
remove
(
row
)
{
this
.
deletelModal
=
true
;
this
.
curId
=
row
.
id
;
this
.
selectRow
=
row
;
},
removeOk
()
{
Api
.
delete
({
id
:
this
.
curId
}).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
();
this
.
deletelModal
=
false
;
if
(
this
.
selectRow
.
accountId
>
0
)
{
//删除成功后更新auth start
let
parms
=
{
userId
:
this
.
curId
,
accountId
:
this
.
selectRow
.
accountId
,
tenantCode
:
util
.
cookies
.
get
(
"tenantCode"
),
isDeleted
:
true
,
name
:
this
.
selectRow
.
userName
,
};
Api
.
authAccount
(
parms
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
this
.
$Message
.
success
(
"账户同步成功"
);
}
});
}
//删除成功后更新auth end
this
.
$Message
.
success
(
"删除成功"
);
}
});
},
removeCancel
()
{
this
.
deletelModal
=
false
;
},
cancel
()
{
this
.
curId
=
0
;
this
.
addModal
=
false
;
this
.
detailModal
=
false
;
this
.
editModal
=
false
;
this
.
deletedlModal
=
false
;
this
.
syncAccountModal
=
false
;
},
l
(
key
)
{
let
vkey
=
"user"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
},
initTree
()
{
this
.
$http
.
department
.
getDepartmentTree
(
this
.
treeData
);
},
selectTreeNode1
(
value
)
{
if
(
value
!=
""
)
{
this
.
searchObj
.
departmentId
=
null
;
this
.
searchObj
.
level_Desc
=
value
[
0
].
value
;
this
.
mDatas
.
splice
(
0
);
this
.
$http
.
sysUser
.
getSearchTable2
(
this
.
mDatas
,
this
.
searchObj
);
}
},
selectTreeNode
(
value
)
{
if
(
value
.
length
>
0
)
{
this
.
ids
=
[];
this
.
getAllIds
(
value
);
if
(
this
.
ids
.
length
>
0
)
{
this
.
easySearch
.
departmentId
.
value
=
this
.
ids
;
}
else
{
this
.
easySearch
.
departmentId
.
value
=
[
-
1
];
}
this
.
$refs
.
grid
.
easySearch
();
}
},
getAllIds
(
trees
)
{
trees
.
forEach
((
data
,
index
)
=>
{
var
that
=
this
;
this
.
ids
.
push
(
data
.
value
);
if
(
data
.
children
.
length
>
0
)
{
this
.
getAllIds
(
data
.
children
);
}
});
},
//重置密碼
openReset
(
row
)
{
this
.
show7
=
true
;
this
.
curId
=
row
.
id
;
this
.
selectRow
=
row
;
},
reset
()
{
let
parms
=
{
userId
:
this
.
curId
,
accountId
:
this
.
selectRow
.
accountId
,
};
Api
.
authResetpassword
(
parms
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
this
.
$Message
.
success
(
"重置成功!"
);
}
else
{
this
.
$Message
.
error
(
"重置失败!"
);
}
});
},
//授权角色
loadrole
(
type
)
{
var
url
=
`
${
systemUrl
}
/MyRole/GetRolesAsync`
;
var
data
=
[];
service
.
get
(
`
${
url
}
`
,
{
role_type
:
type
}).
then
((
response
)
=>
{
data
=
response
.
result
.
items
;
if
(
type
==
1
)
{
this
.
authList
=
data
;
}
if
(
type
==
0
)
{
this
.
authList1
=
data
;
}
});
},
authorize
(
id
)
{
//授权
this
.
authModel
.
default
=
[];
this
.
authModel
.
extra
=
[];
this
.
curId
=
id
;
this
.
show3
=
true
;
var
url
=
`
${
systemUrl
}
/MyUserRole/GetPaged`
;
service
.
get
(
`
${
url
}
`
,
{
userId
:
id
}).
then
((
response
)
=>
{
var
data
=
response
.
result
.
items
;
var
dt1
=
data
.
filter
(
function
(
ite
)
{
return
ite
.
role_type
==
0
;
});
var
dt2
=
data
.
filter
(
function
(
ite
)
{
return
ite
.
role_type
==
1
;
});
dt1
.
forEach
((
item
,
i
)
=>
{
this
.
authModel
.
default
.
push
(
item
.
roleId
);
});
dt2
.
forEach
((
item
,
i
)
=>
{
this
.
authModel
.
extra
.
push
(
item
.
roleId
);
});
});
},
authOk
()
{
var
url
=
`
${
systemUrl
}
/MyUserRole/CreateOrUpdate`
;
service
.
post
(
`
${
url
}
`
,
{
myUserRole
:
{
userId
:
this
.
curId
,
RoleIds
:
this
.
allChecked
.
join
(
","
),
},
})
.
then
((
response
)
=>
{
if
(
response
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
this
.
authModel
.
extra
=
[];
this
.
authModel
.
default
=
[];
this
.
$refs
.
grid
.
easySearch
();
}
})
.
catch
((
error
)
=>
{
this
.
$Message
.
error
(
"保存失败"
);
});
},
authCancle
()
{},
//同步账户start
syncAccount
(
row
)
{
this
.
syncAccountModal
=
true
;
this
.
selectRow
=
row
;
},
syncAccountOk
()
{
let
parms
=
{
userId
:
this
.
selectRow
.
id
,
loginName
:
this
.
selectRow
.
phone
,
status
:
this
.
selectRow
.
status
,
tenantCode
:
util
.
cookies
.
get
(
"tenantCode"
),
name
:
this
.
selectRow
.
userName
,
};
if
(
this
.
selectRow
.
phone
&&
this
.
selectRow
.
phone
!=
""
)
{
Api
.
authAccount
(
parms
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
this
.
$Message
.
success
(
"账户同步成功"
);
let
parms1
=
{
userId
:
parms
.
userId
,
accountId
:
res
.
result
,
};
Api
.
updateAccount
(
parms1
).
then
((
res1
)
=>
{
if
(
res1
.
success
)
{
this
.
$Message
.
success
(
"操作成功"
);
this
.
$refs
.
grid
.
easySearch
();
}
else
{
this
.
$Message
.
error
(
"同步失败"
);
}
});
}
});
}
else
{
this
.
$Message
.
error
(
"请完善个人电话信息"
);
}
},
//同步账户end
//导入excel
//导入功能
openModalIm
()
{
this
.
ModalIm
=
true
},
ModalImCancel
()
{
this
.
ModalIm
=
false
},
ok
()
{
this
.
$refs
.
grid
.
load
();
},
getData
(
val
)
{
let
url
=
`
${
systemUrl
}
/userimportservice/import`
;
this
.
$refs
.
importExcel
.
deelData
(
url
,
this
.
columns
,
this
.
formatMethod
(
val
))
},
//根据页面二次处理数据
formatMethod
(
val
)
{
let
tempData
=
this
.
$u
.
clone
(
val
);
let
tempList
=
[];
tempData
.
forEach
((
ele
)
=>
{
let
obj
=
{
userName
:
ele
.
userName
?
ele
.
userName
:
''
,
cardNo
:
ele
.
cardNo
?
ele
.
cardNo
:
''
,
//用户编号
gender
:
ele
.
gender
?
ele
.
gender
:
''
,
//性别
birthday
:
ele
.
birthday
?
ele
.
birthday
:
''
,
degreeId
:
ele
.
degreeId
?
ele
.
degreeId
:
''
,
departmentId
:
ele
.
departmentId
?
ele
.
departmentId
:
null
,
status
:
ele
.
status
?
ele
.
status
:
null
,
phone
:
ele
.
phone
?
ele
.
phone
:
''
,
email
:
ele
.
email
?
ele
.
email
:
''
,
licensedToWork
:
ele
.
licensedToWork
?
ele
.
licensedToWork
:
null
,
positionId
:
ele
.
positionId
?
ele
.
positionId
:
null
,
titleId
:
ele
.
titleId
?
ele
.
titleId
:
null
,
departmentTitle
:
ele
.
departmentTitle
?
ele
.
departmentTitle
:
''
,
};
if
(
ele
.
userName
&&
ele
.
userName
!=
''
&&
ele
.
cardNo
&&
ele
.
cardNo
!=
''
&&
ele
.
departmentId
&&
ele
.
departmentId
!=
null
&&
ele
.
phone
&&
ele
.
phone
!=
''
)
{
obj
.
ico
=
false
}
else
{
obj
.
ico
=
true
}
tempList
.
push
(
obj
);
});
return
tempList
},
//批量导入end
},
computed
:
{
searchList
()
{
let
nodeList
=
this
.
treeData
;
var
text
=
this
.
treeInputSearch
;
var
newNodeList
=
[];
function
searchTree
(
nodeLists
,
value
)
{
for
(
let
i
=
0
;
i
<
nodeLists
.
length
;
i
++
)
{
if
(
nodeLists
[
i
].
title
.
indexOf
(
value
)
!=
-
1
)
{
newNodeList
.
push
(
nodeLists
[
i
]);
}
else
if
(
nodeLists
[
i
].
children
.
length
>
0
)
{
searchTree
(
nodeLists
[
i
].
children
,
value
);
}
}
}
if
(
text
!=
""
)
{
searchTree
(
nodeList
,
text
);
}
else
{
return
nodeList
;
}
return
newNodeList
;
},
allChecked
:
function
()
{
return
[...
this
.
authModel
.
extra
,
...
this
.
authModel
.
default
];
},
},
};
</
script
>
<
style
lang=
"less"
scoped
>
.full {
margin-top: 0;
.content {
margin-top: 10px;
}
}
</
style
>
pages/basicData/systemUser/search.vue
0 → 100644
View file @
b160bffd
<
template
>
<div
class=
"addUser"
>
<Form
ref=
"form"
:model=
"condition"
:label-width=
"100"
>
<Row
class=
"rowTitle100"
>
<Col
:span=
"12"
v-if=
"condition.id.show"
>
<FormItem
:label=
"l('id')"
prop=
"id"
>
<Input
v-model=
"condition.id.value"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
v-if=
"condition.userName.show"
>
<FormItem
:label=
"l('userName')"
prop=
"userName"
>
<Input
v-model=
"condition.userName.value"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
v-if=
"condition.cardTypeId.show"
>
<FormItem
:label=
"l('cardTypeId')"
prop=
"cardTypeId"
>
<Input
v-model=
"condition.cardTypeId.value"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
v-if=
"condition.cardNo.show"
>
<FormItem
:label=
"l('cardNo')"
prop=
"cardNo"
>
<Input
v-model=
"condition.cardNo.value"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
v-if=
"condition.status.show"
>
<FormItem
:label=
"l('status')"
prop=
"status"
>
<Dictionary
code=
"User.base.status"
v-model=
"condition.status.value"
type=
"radio"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"12"
v-if=
"condition.gender.show"
>
<FormItem
:label=
"l('gender')"
prop=
"gender"
>
<Dictionary
code=
"User.base.gender"
v-model=
"condition.gender.value"
type=
"radio"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"12"
v-if=
"condition.birthday.show"
>
<FormItem
:label=
"l('birthday')"
prop=
"birthday"
>
<DTSearch
v-model=
"condition.birthday.value"
@
on-change=
"setTime"
:showFast=
"false"
type=
"date"
></DTSearch>
</FormItem>
</Col>
<Col
:span=
"12"
v-if=
"condition.departmentTitle.show"
>
<FormItem
:label=
"l('departmentTitle')"
prop=
"departmentTitle"
>
<DepartmentSelect
v-model=
"condition.departmentId.value"
@
on-change=
"setDepartmentTitle"
/>
</FormItem>
</Col>
<Col
:span=
"12"
v-if=
"condition.national.show"
>
<FormItem
:label=
"l('national')"
prop=
"national"
>
<Input
v-model=
"condition.national.value"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
v-if=
"condition.creatorUserId.show"
>
<FormItem
:label=
"l('creatorUserId')"
prop=
"creatorUserId"
>
<Input
v-model=
"condition.creatorUserId.value"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
v-if=
"condition.creationTime.show"
>
<FormItem
:label=
"l('creationTime')"
prop=
"creationTime"
>
<DatePicker
type=
"daterange"
v-model=
"condition.creationTime.value"
></DatePicker>
</FormItem>
</Col>
<Col
:span=
"12"
v-if=
"condition.lastModifierUserId.show"
>
<FormItem
:label=
"l('lastModifierUserId')"
prop=
"lastModifierUserId"
>
<Input
v-model=
"condition.lastModifierUserId.value"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
v-if=
"condition.lastModificationTime.show"
>
<FormItem
:label=
"l('lastModificationTime')"
prop=
"lastModificationTime"
>
<DatePicker
type=
"daterange"
v-model=
"condition.lastModificationTime.value"
></DatePicker>
</FormItem>
</Col>
<Col
:span=
"12"
v-if=
"condition.accountId.show"
>
<FormItem
:label=
"l('accountId')"
prop=
"accountId"
>
<Input
v-model=
"condition.accountId.value"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
v-if=
"condition.isDeleted.show"
>
<FormItem
:label=
"l('isDeleted')"
prop=
"isDeleted"
>
<Dictionary
v-model=
"condition.isDeleted.value"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"12"
v-if=
"condition.userType.show"
>
<FormItem
:label=
"l('userType')"
prop=
"userType"
>
<Input
v-model=
"condition.userType.value"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
v-if=
"condition.phone.show"
>
<FormItem
:label=
"l('phone')"
prop=
"phone"
>
<Input
v-model=
"condition.phone.value"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
v-if=
"condition.email.show"
>
<FormItem
:label=
"l('email')"
prop=
"email"
>
<Input
v-model=
"condition.email.value"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
v-if=
"condition.degreeId.show"
>
<FormItem
:label=
"l('degreeId')"
prop=
"degreeId"
>
<Dictionary
code=
"User.base.degree"
v-model=
"condition.degreeId.value"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"12"
v-if=
"condition.avatarUrl.show"
>
<FormItem
:label=
"l('avatarUrl')"
prop=
"avatarUrl"
>
<Input
v-model=
"condition.avatarUrl.value"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
v-if=
"condition.enableEquip.show"
>
<FormItem
:label=
"l('enableEquip')"
prop=
"enableEquip"
>
<Input
v-model=
"condition.enableEquip.value"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
v-if=
"condition.positionId.show"
>
<FormItem
:label=
"l('positionId')"
prop=
"positionId"
>
<Dictionary
code=
"User.base.position"
v-model=
"condition.positionId.value"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"12"
v-if=
"condition.titleId.show"
>
<FormItem
:label=
"l('titleId')"
prop=
"titleId"
>
<Dictionary
code=
"User.base.jobtitle"
v-model=
"condition.titleId.value"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"12"
v-if=
"condition.licensedToWork.show"
>
<FormItem
:label=
"l('licensedToWork')"
prop=
"licensedToWork"
>
<Dictionary
code=
"User.base.workLicense"
v-model=
"condition.licensedToWork.value"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"12"
v-if=
"condition.jobNo.show"
>
<FormItem
:label=
"l('jobNo')"
prop=
"jobNo"
>
<Input
v-model=
"condition.jobNo.value"
></Input>
</FormItem>
</Col>
<Col
:span=
"24"
v-if=
"condition.remark.show"
>
<FormItem
:label=
"l('remark')"
prop=
"remark"
>
<Input
v-model=
"condition.remark.value"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
v-if=
"condition.roleTitles.show"
>
<FormItem
:label=
"l('roleTitles')"
prop=
"roleTitles"
>
<Input
v-model=
"condition.roleTitles.value"
></Input>
</FormItem>
</Col>
</Row>
</Form>
</div>
</
template
>
<
script
>
import
Api
from
'./api'
export
default
{
name
:
'Search'
,
data
()
{
return
{
showDeptTree
:
false
,
values
:
[
'2001-01-01'
,
'2015-12-05'
],
condition
:
{
id
:
{
op
:
'Equal'
,
value
:
null
,
show
:
false
},
userName
:
{
op
:
'Equal'
,
value
:
null
,
show
:
true
},
cardTypeId
:
{
op
:
'Equal'
,
value
:
null
,
show
:
false
},
cardNo
:
{
op
:
'Equal'
,
value
:
null
,
show
:
true
},
gender
:
{
op
:
'Equal'
,
value
:
null
,
show
:
true
},
birthday
:
{
op
:
'Range'
,
value
:
null
,
show
:
true
},
degreeId
:
{
op
:
'Equal'
,
value
:
null
,
show
:
true
},
departmentId
:
{
op
:
'Equal'
,
value
:
null
,
show
:
false
},
national
:
{
op
:
'Equal'
,
value
:
null
,
show
:
false
},
status
:
{
op
:
'Equal'
,
value
:
null
,
show
:
true
},
creatorUserId
:
{
op
:
'Equal'
,
value
:
null
,
show
:
false
},
creationTime
:
{
op
:
'Range'
,
value
:
null
,
show
:
false
},
lastModifierUserId
:
{
op
:
'Equal'
,
value
:
null
,
show
:
false
},
lastModificationTime
:
{
op
:
'Range'
,
value
:
null
,
show
:
false
},
accountId
:
{
op
:
'Equal'
,
value
:
null
,
show
:
false
},
isDeleted
:
{
op
:
'Equal'
,
value
:
null
,
show
:
false
},
userType
:
{
op
:
'Equal'
,
value
:
'2'
,
show
:
false
},
phone
:
{
op
:
'Equal'
,
value
:
null
,
show
:
true
},
email
:
{
op
:
'Equal'
,
value
:
null
,
show
:
true
},
avatarUrl
:
{
op
:
'Equal'
,
value
:
null
,
show
:
false
},
enableEquip
:
{
op
:
'Equal'
,
value
:
null
,
show
:
false
},
licensedToWork
:
{
op
:
'Equal'
,
value
:
null
,
show
:
true
},
positionId
:
{
op
:
'Equal'
,
value
:
null
,
show
:
true
},
titleId
:
{
op
:
'Equal'
,
value
:
null
,
show
:
true
},
jobNo
:
{
op
:
'Equal'
,
value
:
null
,
show
:
false
},
remark
:
{
op
:
'Equal'
,
value
:
null
,
show
:
false
},
departmentTitle
:
{
op
:
'Equal'
,
value
:
null
,
show
:
true
},
departmentId
:
{
op
:
'Equal'
,
value
:
null
,
show
:
false
},
roleTitles
:
{
op
:
'Equal'
,
value
:
null
,
show
:
true
}
}
}
},
methods
:
{
handleClose
()
{
this
.
$emit
(
'on-close'
)
},
l
(
key
)
{
key
=
'user'
+
'.'
+
key
return
this
.
$t
(
key
)
},
setDepartmentTitle
(
v
,
item
)
{
this
.
condition
.
departmentTitle
.
value
=
item
.
name
},
setTime
(
v
)
{
this
.
condition
.
birthday
.
value
=
v
},
},
watch
:
{}
}
</
script
>
<
style
lang=
"less"
>
.addUser {
.ivu-radio-wrapper {
vertical-align: top;
}
}
</
style
>
pages/basicData/user/add.vue
View file @
b160bffd
...
@@ -123,7 +123,8 @@ export default {
...
@@ -123,7 +123,8 @@ export default {
entity
:
{
entity
:
{
gender
:
1
,
gender
:
1
,
status
:
1
,
status
:
1
,
property
:
false
property
:
false
,
userType
:
0
},
},
rules
:
{
rules
:
{
userName
:
[{
userName
:
[{
...
...
pages/basicData/user/index.vue
View file @
b160bffd
...
@@ -115,6 +115,10 @@ export default {
...
@@ -115,6 +115,10 @@ export default {
op
:
"In"
,
op
:
"In"
,
value
:
""
value
:
""
},
},
userType
:
{
op
:
"Equal"
,
value
:
"0"
},
},
},
treeData
:
[],
treeData
:
[],
tdHeight
:
""
,
tdHeight
:
""
,
...
...
pages/basicData/user/search.vue
View file @
b160bffd
...
@@ -172,7 +172,7 @@ export default {
...
@@ -172,7 +172,7 @@ export default {
lastModificationTime
:
{
op
:
'Range'
,
value
:
null
,
show
:
false
},
lastModificationTime
:
{
op
:
'Range'
,
value
:
null
,
show
:
false
},
accountId
:
{
op
:
'Equal'
,
value
:
null
,
show
:
false
},
accountId
:
{
op
:
'Equal'
,
value
:
null
,
show
:
false
},
isDeleted
:
{
op
:
'Equal'
,
value
:
null
,
show
:
false
},
isDeleted
:
{
op
:
'Equal'
,
value
:
null
,
show
:
false
},
userType
:
{
op
:
'Equal'
,
value
:
null
,
show
:
false
},
userType
:
{
op
:
'Equal'
,
value
:
'0'
,
show
:
false
},
phone
:
{
op
:
'Equal'
,
value
:
null
,
show
:
true
},
phone
:
{
op
:
'Equal'
,
value
:
null
,
show
:
true
},
email
:
{
op
:
'Equal'
,
value
:
null
,
show
:
true
},
email
:
{
op
:
'Equal'
,
value
:
null
,
show
:
true
},
avatarUrl
:
{
op
:
'Equal'
,
value
:
null
,
show
:
false
},
avatarUrl
:
{
op
:
'Equal'
,
value
:
null
,
show
:
false
},
...
...
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