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
8a3ea4fa
Commit
8a3ea4fa
authored
Oct 15, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'portal' of
http://git.mes123.com/zhouyx/mes-ui
into portal
parents
0eafe329
93a5e8e0
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
4132 additions
and
1217 deletions
+4132
-1217
filed.vue
components/page/filed.vue
+59
-16
opration.vue
components/page/opration.vue
+2
-2
zh-CN.js
i18n/locale/zh-CN.js
+1212
-1195
api.js
pages/account/register/password/api.js
+8
-0
index.vue
pages/account/register/password/index.vue
+278
-0
add.vue
pages/basicData/cache/add.vue
+133
-0
api.js
pages/basicData/cache/api.js
+28
-0
detail.vue
pages/basicData/cache/detail.vue
+102
-0
edit.vue
pages/basicData/cache/edit.vue
+122
-0
index.vue
pages/basicData/cache/index.vue
+345
-0
search.vue
pages/basicData/cache/search.vue
+114
-0
edit.vue
pages/basicData/calendar/class/edit.vue
+2
-2
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 @
8a3ea4fa
<
template
>
<Col
:span=
"span"
class=
"filed-col"
>
<label
v-text=
"name"
class=
"label"
></label>
<span>
<div
class=
"label"
>
<label
v-text=
"name"
></label>
</div>
<div
class=
"value"
>
<slot></slot>
</
span
>
</
div
>
</Col>
</
template
>
<
script
>
export
default
{
name
:
'filed'
,
name
:
"filed"
,
props
:
{
name
:
{
type
:
String
...
...
@@ -18,29 +20,70 @@ export default {
default
:
12
}
}
}
}
;
</
script
>
<
style
lang=
"less"
>
.detail {
display: table;
height: 100%;
border-collapse: collapse;
background: white;
.ivu-row {
display: table-row
;
border-top:
1px solid #ddd
;
border-left: 1px solid #ddd
;
border: 1px solid #ddd
;
border-top:
none
;
height: 100%
;
.filed-col {
display: table-cell;
border-bottom: 1px solid #ddd;
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;
// margin: 0 0 -1px -1px;
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 {
width: 100% !important;
.filed-col {
box-sizing: border-box;
.label {
background: #e8eaf1;
line-height: 70px;
display: flex;
flex-direction: row;
> .label {
display: inline-block;
width: 100px;
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 @
8a3ea4fa
...
...
@@ -47,7 +47,7 @@ export default {
detail
:
"查看"
,
edit
:
"编辑"
,
add
:
"添加"
,
delete
:
"删除"
delete
:
"删除"
,
};
if
(
oprates
[
this
.
oprate
]){
...
...
@@ -56,7 +56,7 @@ export default {
}
else
if
(
this
.
oprate
){
this
.
css
=
this
.
oprate
;
}
else
if
(
this
.
type
==
'icon'
){
this
.
css
=
'icon'
this
.
css
=
'icon'
;
}
},
methods
:{
...
...
i18n/locale/zh-CN.js
View file @
8a3ea4fa
...
...
@@ -428,11 +428,11 @@ export default {
cityName
:
'省市县'
,
creationTime
:
'创建时间'
,
upMent
:
'上级部门'
,
code
:
'部门编号'
,
location
:
'省市县'
,
parent_Id
:
'上级部门'
,
property
:
'属性'
,
parentTitle
:
'上级部门'
code
:
'部门编号'
,
location
:
'省市县'
,
parent_Id
:
'上级部门'
,
property
:
'属性'
,
parentTitle
:
'上级部门'
},
instance
:
{
id
:
'主键'
,
...
...
@@ -1177,7 +1177,7 @@ export default {
requestUrl
:
'服务地址'
,
requestParam
:
'参数'
,
exception
:
'异常详细信息'
,
remark
:
'备注'
remark
:
'备注'
},
user_message_config
:
{
...
...
@@ -1198,10 +1198,27 @@ export default {
status
:
'启用状态'
,
code
:
'编码'
,
template
:
'模板'
,
title
:
'标题'
,
title
:
'标题'
,
departmentIds
:
'部门Id'
,
departments
:
'部门'
,
color
:
'颜色'
,
icon
:
'图标'
,
color
:
'颜色'
,
icon
:
'图标'
,
},
cache_config
:
{
creationTime
:
'创建时间'
,
creatorUserId
:
'创建人'
,
lastModificationTime
:
'更新时间'
,
lastModifierUserId
:
'更新人'
,
isDeleted
:
'删除人'
,
deletionTime
:
'删除时间'
,
deleterUserId
:
'删除人'
,
code
:
'编码'
,
name
:
'名称'
,
describe
:
'描述'
,
duration
:
'缓存时长'
,
strategy
:
'策略'
,
type
:
'类型'
,
state
:
'状态'
,
size
:
'数据长度'
,
}
}
\ No newline at end of file
pages/account/register/password/api.js
0 → 100644
View file @
8a3ea4fa
import
Api
from
'@/plugins/request'
export
default
{
//10010修改密码
authChangepassword
(
params
)
{
return
Api
.
post
(
`
${
UserUrl
}
/api/services/app/account/changepassword`
,
params
);
},
}
\ No newline at end of file
pages/account/register/password/index.vue
0 → 100644
View file @
8a3ea4fa
<
template
>
<div>
<Row>
<Col
span=
"24"
>
<Card
class=
"updatePass"
>
<p
slot=
"title"
>
修改密码
</p>
<p
class=
"rowWaring mt"
>
<Alert
type=
"warning"
>
<template
slot=
"desc"
>
密码过于简单,请重新设置密码!
</
template
>
</Alert>
</p>
<p
class=
"mt"
>
用户帐号:{{ userInfo.userName }}
</p>
<Form
ref=
"formCustom"
:model=
"formCustom"
:rules=
"ruleCustom"
:label-width=
"95"
>
<Row>
<Col
span=
"6"
>
<FormItem
label=
"原密码:"
prop=
"oldpass"
>
<Input
type=
"password"
v-model=
"formCustom.oldpass"
size=
"large"
></Input>
</FormItem>
</Col>
</Row>
<Row>
<Col
span=
"6"
class=
"container"
>
<FormItem
label=
"新密码:"
prop=
"passwd"
>
<Input
type=
"password"
v-model=
"formCustom.passwd"
size=
"large"
></Input>
</FormItem>
<div
class=
"input_span"
>
<label
style=
"margin-left: 40px"
>
强度:
</label>
<span
id=
"one"
></span>
<span
id=
"two"
></span>
<span
id=
"three"
></span>
</div>
<div
id=
"font"
>
<span>
弱
</span>
<span>
中
</span>
<span>
强
</span>
</div>
</Col>
</Row>
<Row>
<Col
span=
"6"
>
<FormItem
label=
"确认密码:"
prop=
"passwdCheck"
>
<Input
size=
"large"
type=
"password"
v-model=
"formCustom.passwdCheck"
></Input>
</FormItem>
</Col>
</Row>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit('formCustom')"
>
确认
</Button
>
<Button
@
click=
"handleReset('formCustom')"
style=
"margin-left: 8px"
>
取消
</Button
>
</FormItem>
</Form>
</Card>
</Col>
</Row>
</div>
</template>
<
script
>
import
Api
from
"./api"
;
export
default
{
data
()
{
const
validatePass
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
===
""
)
{
callback
(
new
Error
(
"请输入密码!"
));
}
else
{
if
(
this
.
formCustom
.
passwdCheck
!==
""
)
{
//对第二个密码框单独验证
this
.
$refs
.
formCustom
.
validateField
(
"passwdCheck"
);
}
callback
();
}
};
const
validatePassCheck
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
===
""
)
{
callback
(
new
Error
(
"请输入密码!"
));
}
else
if
(
value
!==
this
.
formCustom
.
passwd
)
{
callback
(
new
Error
(
"两次输入不一致请重新输入!"
));
}
else
{
callback
();
}
};
const
validateold
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
===
""
)
{
callback
(
new
Error
(
"请输入原密码!"
));
}
else
{
callback
();
}
};
return
{
userInfo
:
{
accountId
:
""
,
id
:
""
,
userName
:
""
,
},
msgText
:
""
,
formCustom
:
{
passwd
:
""
,
passwdCheck
:
""
,
oldpass
:
""
,
},
ruleCustom
:
{
passwd
:
[{
validator
:
validatePass
,
trigger
:
"blur"
,
required
:
true
}],
passwdCheck
:
[
{
validator
:
validatePassCheck
,
trigger
:
"blur"
,
required
:
true
},
],
oldpass
:
[{
validator
:
validateold
,
trigger
:
"blur"
,
required
:
true
}],
},
};
},
watch
:
{
"formCustom.passwd"
(
newname
,
oldname
)
{
this
.
msgText
=
this
.
checkStrong
(
newname
);
if
(
this
.
msgText
>
1
||
this
.
msgText
==
1
)
{
document
.
getElementById
(
"one"
).
style
.
background
=
"red"
;
}
else
{
document
.
getElementById
(
"one"
).
style
.
background
=
"#eee"
;
}
if
(
this
.
msgText
>
2
||
this
.
msgText
==
2
)
{
document
.
getElementById
(
"two"
).
style
.
background
=
"orange"
;
}
else
{
document
.
getElementById
(
"two"
).
style
.
background
=
"#eee"
;
}
if
(
this
.
msgText
==
4
)
{
document
.
getElementById
(
"three"
).
style
.
background
=
"#00D1B2"
;
}
else
{
document
.
getElementById
(
"three"
).
style
.
background
=
"#eee"
;
}
},
// deep: true,
},
created
()
{
this
.
userId
=
this
.
$store
.
state
.
userInfo
.
userId
;
},
mounted
()
{
this
.
initUserInfo
();
},
methods
:
{
//获取用户基本信息
initUserInfo
()
{
let
parma
=
{
Id
:
this
.
userId
,
};
this
.
$http
.
sysUser
.
getuserinfo
(
parma
).
then
((
res
)
=>
{
if
(
res
.
result
)
{
this
.
$nextTick
(
function
()
{
this
.
userInfo
=
res
.
result
;
});
}
else
{
this
.
$Message
.
error
(
"查询失败!"
);
}
});
},
checkStrong
(
sValue
)
{
var
modes
=
0
;
//正则表达式验证符合要求的
if
(
sValue
.
length
<
1
)
return
modes
;
if
(
/
\d
/
.
test
(
sValue
))
modes
++
;
//数字
if
(
/
[
a-z
]
/
.
test
(
sValue
))
modes
++
;
//小写
if
(
/
[
A-Z
]
/
.
test
(
sValue
))
modes
++
;
//大写
if
(
/
\W
/
.
test
(
sValue
))
modes
++
;
//特殊字符
//逻辑处理
switch
(
modes
)
{
case
1
:
return
1
;
break
;
case
2
:
return
2
;
break
;
case
3
:
case
4
:
return
sValue
.
length
<
4
?
3
:
4
;
break
;
}
return
modes
;
},
handleSubmit
(
name
)
{
this
.
$refs
[
name
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
this
.
msgText
<
2
){
this
.
$Message
.
warning
(
"密码过于简单,请重新设置密码!"
);
return
;
}
let
params
=
{
accountId
:
this
.
userInfo
.
accountId
,
userId
:
this
.
userInfo
.
id
,
newPassword
:
this
.
formCustom
.
passwdCheck
,
oldPassword
:
this
.
formCustom
.
oldpass
,
};
Api
.
authChangepassword
(
params
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
this
.
$router
.
push
(
"/"
);
this
.
$Message
.
success
(
"修改成功!"
);
}
else
{
this
.
$Message
.
error
(
"修改失败!"
);
}
});
}
});
},
handleReset
(
name
)
{
this
.
$refs
[
name
].
resetFields
();
},
},
};
</
script
>
<
style
lang=
"less"
scoped
>
.updatePass .mt {
margin: 20px 0;
text-indent: 7px;
}
.input_span span {
display: inline-block;
width: 85px;
height: 10px;
background: #eee;
line-height: 20px;
}
#one {
border-top-left-radius: 5px;
border-bottom-left-radius: 5px;
border-right: 0px solid;
margin-left: 10px;
margin-right: 3px;
}
#two {
border-left: 0px solid;
border-right: 0px solid;
margin-left: -5px;
margin-right: 3px;
}
#three {
border-top-right-radius: 5px;
border-bottom-right-radius: 5px;
border-left: 0px solid;
margin-left: -5px;
}
#font {
margin-bottom: 20px;
}
#font span:nth-child(1) {
color: red;
margin-left:100px;
}
#font span:nth-child(2) {
color: orange;
margin: 0 60px;
}
#font span:nth-child(3) {
color: #00d1b2;
}
</
style
>
\ No newline at end of file
pages/basicData/cache/add.vue
0 → 100644
View file @
8a3ea4fa
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
<Row>
<Col
:span=
"12"
><FormItem
:label=
"l('code')"
prop=
"code"
>
<Input
v-model=
"entity.code"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('name')"
prop=
"name"
>
<Input
v-model=
"entity.name"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('duration')"
prop=
"duration"
>
<InputNumber
v-model=
"entity.duration"
></InputNumber>
</FormItem>
</Col>
<Col
:span=
"12"
><FormItem
:label=
"l('strategy')"
prop=
"strategy"
>
<Dictionary
code=
"mes.cache_config.Strategy"
v-model=
"entity.strategy"
></Dictionary>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('type')"
prop=
"type"
>
<Dictionary
code=
"mes.cache_config.Type"
v-model=
"entity.type"
></Dictionary>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('state')"
prop=
"state"
>
<Dictionary
code=
"mes.cache_config.State"
v-model=
"entity.state"
></Dictionary>
</FormItem
></Col>
<Col
:span=
"24"
><FormItem
:label=
"l('describe')"
prop=
"describe"
>
<Input
v-model=
"entity.describe"
type=
"textarea"
:rows=
"5"
></Input>
</FormItem
></Col>
</Row>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button
>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</Form>
</
template
>
<
script
>
import
Api
from
"./api"
;
export
default
{
name
:
"Add"
,
data
()
{
return
{
disabled
:
false
,
entity
:
{
code
:
""
,
name
:
""
,
describe
:
""
,
duration
:
0
,
strategy
:
0
,
type
:
0
,
state
:
0
,
},
rules
:
{
code
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
duration
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
,
type
:
"number"
}],
},
};
},
props
:
{
v
:
Object
,
eid
:
Number
,
},
mounted
()
{
if
(
this
.
eid
>
0
)
{
this
.
load
(
this
.
eid
);
}
},
methods
:
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
this
.
disabled
=
true
;
Api
.
create
(
this
.
entity
)
.
then
((
r
)
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
"on-ok"
);
}
else
{
this
.
$Message
.
error
(
"保存失败"
);
}
})
.
catch
((
err
)
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
"保存失败"
);
console
.
warn
(
err
);
});
}
});
},
handleClose
()
{
this
.
$emit
(
"on-close"
);
},
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
this
.
entity
=
r
.
result
;
this
.
entity
.
id
=
0
;
});
},
l
(
key
)
{
key
=
"cache_config"
+
"."
+
key
;
return
this
.
$t
(
key
);
},
},
watch
:
{
v
()
{
this
.
entity
=
this
.
$u
.
clone
(
this
.
v
);
},
eid
(
v
)
{
if
(
v
>
0
)
{
this
.
load
(
v
);
}
},
},
};
</
script
>
\ No newline at end of file
pages/basicData/cache/api.js
0 → 100644
View file @
8a3ea4fa
import
Api
from
'@/plugins/request'
export
default
{
index
:
`
${
systemUrl
}
/cacheconfig/paged`
,
paged
(
params
)
{
return
Api
.
post
(
`
${
systemUrl
}
/cacheconfig/paged`
,
params
);
},
get
(
params
)
{
return
Api
.
get
(
`
${
systemUrl
}
/cacheconfig/get`
,
params
);
},
create
(
params
)
{
return
Api
.
post
(
`
${
systemUrl
}
/cacheconfig/create`
,
params
);
},
update
(
params
)
{
return
Api
.
post
(
`
${
systemUrl
}
/cacheconfig/update`
,
params
);
},
delete
(
id
)
{
return
Api
.
delete
(
`
${
systemUrl
}
/cacheconfig/delete`
,
{
params
:
{
id
:
id
}
});
},
deletes
(
params
)
{
return
Api
.
post
(
`
${
systemUrl
}
/cacheconfig/batchdelete`
,
params
);
},
clears
(
id
)
{
return
Api
.
post
(
`
${
systemUrl
}
/cacheconfig/clear`
,
{
"id"
:
id
});
},
allClears
(
params
)
{
return
Api
.
post
(
`
${
systemUrl
}
/cacheconfig/batchclearcache`
,
params
);
}
}
\ No newline at end of file
pages/basicData/cache/detail.vue
0 → 100644
View file @
8a3ea4fa
<
template
>
<div
class=
"detail"
>
<Row>
<!--
<Filed
:span=
"12"
:name=
"l('creationTime')"
>
{{
entity
.
creationTime
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('creatorUserId')"
>
{{
entity
.
creatorUserId
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('lastModificationTime')"
>
{{
entity
.
lastModificationTime
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('lastModifierUserId')"
>
{{
entity
.
lastModifierUserId
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('isDeleted')"
>
{{
entity
.
isDeleted
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('deletionTime')"
>
{{
entity
.
deletionTime
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('deleterUserId')"
>
{{
entity
.
deleterUserId
}}
</Filed>
-->
<Filed
:span=
"12"
:name=
"l('code')"
>
{{
entity
.
code
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('name')"
>
{{
entity
.
name
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('duration')"
>
{{
entity
.
duration
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('strategy')"
>
<State
code=
"mes.cache_config.Strategy"
:value=
"entity.strategy"
/>
</Filed>
<Filed
:span=
"12"
:name=
"l('type')"
>
<State
code=
"mes.cache_config.Type"
:value=
"entity.type"
/>
</Filed>
<Filed
:span=
"12"
:name=
"l('state')"
>
<State
code=
"mes.cache_config.State"
:value=
"entity.state"
/>
</Filed>
<Filed
:span=
"24"
:name=
"l('size')"
>
{{
entity
.
size
}}
<Button
type=
"error"
v-if=
"entity.size > 0"
@
click=
"clears(entity.id)"
>
清理缓存
</Button
>
</Filed>
<Filed
:span=
"24"
:name=
"l('describe')"
>
{{
entity
.
describe
}}
</Filed>
</Row>
</div>
</
template
>
<
script
>
import
Api
from
"./api"
;
export
default
{
name
:
"Add"
,
data
()
{
return
{
entity
:
{},
rules
:
{
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
code
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
},
};
},
props
:
{
eid
:
Number
,
},
mounted
()
{
if
(
this
.
eid
>
0
)
{
this
.
load
(
this
.
eid
);
}
},
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
=
"cache_config"
+
"."
+
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
:
{
eid
(
v
)
{
if
(
v
>
0
)
{
this
.
load
(
v
);
}
},
},
};
</
script
>
\ No newline at end of file
pages/basicData/cache/edit.vue
0 → 100644
View file @
8a3ea4fa
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
<Row>
<Col
:span=
"12"
><FormItem
:label=
"l('code')"
prop=
"code"
>
<Input
v-model=
"entity.code"
>
</Input>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('name')"
prop=
"name"
>
<Input
v-model=
"entity.name"
>
</Input>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('duration')"
prop=
"duration"
>
<InputNumber
v-model=
"entity.duration"
></InputNumber>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('strategy')"
prop=
"strategy"
>
<Dictionary
code=
"mes.cache_config.Strategy"
v-model=
"entity.strategy"
></Dictionary>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('type')"
prop=
"type"
>
<Dictionary
code=
"mes.cache_config.Type"
v-model=
"entity.type"
></Dictionary>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('state')"
prop=
"state"
>
<Dictionary
code=
"mes.cache_config.State"
v-model=
"entity.state"
></Dictionary>
</FormItem
></Col>
<Col
:span=
"24"
><FormItem
:label=
"l('describe')"
prop=
"describe"
>
<Input
v-model=
"entity.describe"
type=
"textarea"
:rows=
"5"
></Input>
</FormItem
></Col>
</Row>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button
>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</Form>
</
template
>
<
script
>
import
Api
from
"./api"
;
export
default
{
name
:
"Edit"
,
data
()
{
return
{
disabled
:
false
,
entity
:
{},
rules
:
{
code
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
duration
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
,
type
:
"number"
}],
},
};
},
props
:
{
eid
:
Number
,
},
mounted
()
{
if
(
this
.
eid
>
0
)
{
this
.
load
(
this
.
eid
);
}
},
methods
:
{
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
this
.
entity
=
r
.
result
;
});
},
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
this
.
disabled
=
true
;
Api
.
update
(
this
.
entity
)
.
then
((
r
)
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
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
=
"cache_config"
+
"."
+
key
;
return
this
.
$t
(
key
);
},
},
watch
:
{
eid
(
v
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
);
}
},
},
};
</
script
>
\ No newline at end of file
pages/basicData/cache/index.vue
0 → 100644
View file @
8a3ea4fa
<
template
>
<div>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
@
on-selection-change=
"selectInfo"
><template
slot=
"easySearch"
><Form
ref=
"formInline"
:model=
"easySearch"
inline
><FormItem
prop=
"keys"
><Input
placeholder=
"请输入关键字名称"
v-model=
"easySearch.keys.value"
/>
</FormItem>
<FormItem
><Button
type=
"primary"
@
click=
"search"
>
查询
</Button></FormItem
>
</Form></
template
>
<
template
slot=
"searchForm"
>
<Search
/>
</
template
>
<
template
slot=
"batch"
>
<Button
type=
"primary"
@
click=
"allClear"
>
批量清理
</Button>
<Button
type=
"error"
@
click=
"inSure"
>
批量删除
</Button>
</
template
>
<
template
slot=
"buttons"
>
<Button
type=
"primary"
@
click=
"add"
>
新增
</Button>
</
template
>
</DataGrid>
<Modal
v-model=
"modal"
:title=
"title"
width=
"1200"
footer-hide
>
<component
:is=
"detail"
:eid=
"curId"
@
on-close=
"cancel"
@
on-ok=
"ok"
/>
</Modal>
</div>
</template>
<
script
>
import
Api
from
"./api"
;
import
Search
from
"./search"
;
export
default
{
name
:
"list"
,
components
:
{
Search
,
},
head
:
{
title
:
""
,
author
:
"henq"
,
description
:
"cache_config 10/9/2020 2:37:46 PM"
,
},
data
()
{
return
{
results
:
[],
selectList
:
[],
action
:
Api
.
index
,
easySearch
:
{
keys
:
{
op
:
"name"
,
value
:
null
},
},
modal
:
false
,
title
:
"新增"
,
detail
:
null
,
curId
:
0
,
columns
:
[
{
key
:
"id"
,
title
:
this
.
$t
(
"id"
),
hide
:
true
,
align
:
"left"
,
high
:
true
,
},
{
key
:
"selection"
,
title
:
"多选"
,
width
:
60
,
align
:
"center"
,
type
:
"selection"
,
},
{
key
:
"name"
,
title
:
this
.
l
(
"name"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
render
:
(
h
,
params
)
=>
{
return
h
(
"op"
,
{
attrs
:
{
oprate
:
"detail"
,
},
on
:
{
click
:
()
=>
this
.
view
(
params
.
row
.
id
),
},
},
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"
,
title
:
this
.
l
(
"creatorUserId"
),
align
:
"left"
,
high
:
true
,
},
// {
// key: "lastModificationTime",
// title: this.l("lastModificationTime"),
// align: "left",
// high: true,
// },
// {
// key: "lastModifierUserId",
// title: this.l("lastModifierUserId"),
// align: "left",
// high: true,
// },
// {
// key: "isDeleted",
// title: this.l("isDeleted"),
// align: "left",
// high: true,
// },
// {
// key: "deletionTime",
// title: this.l("deletionTime"),
// align: "left",
// high: true,
// },
// {
// key: "deleterUserId",
// title: this.l("deleterUserId"),
// align: "left",
// high: true,
// },
{
key
:
"duration"
,
title
:
this
.
l
(
"duration"
),
align
:
"left"
,
high
:
true
,
},
{
key
:
"strategy"
,
title
:
this
.
l
(
"strategy"
),
align
:
"left"
,
high
:
true
,
code
:
"mes.cache_config.Strategy"
,
},
{
key
:
"type"
,
title
:
this
.
l
(
"type"
),
align
:
"left"
,
high
:
true
,
code
:
"mes.cache_config.Type"
,
},
{
key
:
"creationTime"
,
title
:
this
.
l
(
"creationTime"
),
align
:
"left"
,
high
:
true
,
},
{
title
:
"操作"
,
key
:
"action"
,
width
:
170
,
align
:
"right"
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
class
:
"action"
},
[
h
(
"op"
,
{
attrs
:
{
oprate
:
"detail"
},
on
:
{
click
:
()
=>
this
.
view
(
params
.
row
.
id
)
},
},
"查看"
),
//h('op', { attrs: { oprate: 'copy' }, on: { click: () => this.copy(params.row.id) } }, '克隆'),
h
(
"op"
,
{
attrs
:
{
oprate
:
"edit"
},
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
.
id
)
},
},
"编辑"
),
h
(
"op"
,
{
attrs
:
{
oprate
:
"delete"
,
msg
:
"确认要清理缓存吗?"
},
on
:
{
click
:
()
=>
this
.
clears
(
params
.
row
.
id
)
},
},
"清理"
),
h
(
"op"
,
{
attrs
:
{
oprate
:
"delete"
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
},
},
"删除"
),
]);
},
},
],
};
},
mounted
()
{
console
.
log
(
this
);
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
methods
:
{
ok
()
{
this
.
$refs
.
grid
.
load
();
this
.
modal
=
false
;
this
.
curId
=
0
;
},
search
()
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
},
add
()
{
this
.
curId
=
0
;
this
.
title
=
"新增"
;
this
.
detail
=
()
=>
import
(
"./add"
);
this
.
modal
=
true
;
},
// copy(id) {
// this.curId = id;
// this.title = "克隆";
// this.detail = () => import("./add");
// this.modal = true;
// },
view
(
id
)
{
this
.
curId
=
id
;
this
.
title
=
"详情"
;
this
.
detail
=
()
=>
import
(
"./detail"
);
this
.
modal
=
true
;
},
edit
(
id
)
{
this
.
curId
=
id
;
this
.
title
=
"编辑"
;
this
.
detail
=
()
=>
import
(
"./edit"
);
this
.
modal
=
true
;
},
remove
(
id
)
{
Api
.
delete
(
id
).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
();
this
.
$Message
.
success
(
"删除成功"
);
}
});
},
clears
(
id
)
{
Api
.
clears
(
id
).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
();
this
.
$Message
.
success
(
"缓存已清除"
);
}
});
},
cancel
()
{
this
.
curId
=
0
;
this
.
modal
=
false
;
},
l
(
key
)
{
/*
cache_config:{
creationTime:'创建时间',
creatorUserId:'创建人',
lastModificationTime:'更新时间',
lastModifierUserId:'更新人',
isDeleted:'删除人',
deletionTime:'删除时间',
deleterUserId:'删除人',
key:'键',
name:'名称',
describe:'描述',
duration:'缓存时长',
strategy:'策略',
type:'类型',
state:'状态',
}
*/
let
vkey
=
"cache_config"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
},
selectInfo
(
value
)
{
this
.
selectList
=
[];
this
.
selectList
=
value
;
let
statueArry
=
[];
value
.
forEach
((
data
)
=>
{
var
that
=
this
;
statueArry
.
push
(
data
.
id
);
});
this
.
results
=
[];
this
.
results
=
statueArry
;
},
inSure
()
{
this
.
$Modal
.
confirm
({
title
:
"确认"
,
content
:
"是否确认批量删除?"
,
onOk
:
()
=>
{
Api
.
deletes
(
this
.
results
).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
();
this
.
$refs
.
grid
.
selectAll
(
false
);
this
.
$Message
.
success
(
"删除成功"
);
}
});
},
});
},
allClear
()
{
this
.
$Modal
.
confirm
({
title
:
"确认"
,
content
:
"是否确认批量清除数据?"
,
onOk
:
()
=>
{
Api
.
allClears
(
this
.
results
).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
();
this
.
$refs
.
grid
.
selectAll
(
false
);
this
.
$Message
.
success
(
"缓存已清除"
);
}
});
},
});
},
},
};
</
script
>
<
style
lang=
"less"
>
</
style
>
\ No newline at end of file
pages/basicData/cache/search.vue
0 → 100644
View file @
8a3ea4fa
<
template
>
<Form
ref=
"form"
:model=
"condition"
:label-width=
"90"
>
<Row>
<Col
:span=
"12"
:v-if=
"condition.id.show"
><FormItem
:label=
"$t('id')"
prop=
"id"
>
<Input
v-model=
"condition.id.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.creatorUserId.show"
><FormItem
:label=
"l('creatorUserId')"
prop=
"creatorUserId"
>
<Input
v-model=
"condition.creatorUserId.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.lastModifierUserId.show"
><FormItem
:label=
"l('lastModifierUserId')"
prop=
"lastModifierUserId"
>
<Input
v-model=
"condition.lastModifierUserId.value"
>
</Input>
</FormItem
></Col>
<Col
:span=
"12"
:v-if=
"condition.deletionTime.show"
><FormItem
:label=
"l('deletionTime')"
prop=
"deletionTime"
>
<DatePicker
type=
"daterange"
v-model=
"condition.deletionTime.value"
></DatePicker>
</FormItem
></Col>
<Col
:span=
"12"
:v-if=
"condition.key.show"
><FormItem
:label=
"l('code')"
prop=
"code"
>
<Input
v-model=
"condition.code.value"
>
</Input>
</FormItem
></Col>
<Col
:span=
"12"
:v-if=
"condition.name.show"
><FormItem
:label=
"l('name')"
prop=
"name"
>
<Input
v-model=
"condition.name.value"
>
</Input>
</FormItem
></Col>
<Col
:span=
"24"
:v-if=
"condition.describe.show"
><FormItem
:label=
"l('describe')"
prop=
"describe"
>
<Input
v-model=
"condition.describe.value"
>
</Input>
</FormItem
></Col>
<Col
:span=
"12"
:v-if=
"condition.duration.show"
><FormItem
:label=
"l('duration')"
prop=
"duration"
>
<Input
v-model=
"condition.duration.value"
>
</Input>
</FormItem
></Col>
<Col
:span=
"12"
:v-if=
"condition.strategy.show"
><FormItem
:label=
"l('strategy')"
prop=
"strategy"
>
<Dictionary
code=
"mes.cache_config.Strategy"
v-model=
"condition.strategy.value"
></Dictionary>
</FormItem
></Col>
<Col
:span=
"12"
:v-if=
"condition.type.show"
><FormItem
:label=
"l('type')"
prop=
"type"
>
<Dictionary
code=
"mes.cache_config.Type"
v-model=
"condition.type.value"
></Dictionary>
</FormItem
></Col>
<Col
:span=
"12"
:v-if=
"condition.state.show"
><FormItem
:label=
"l('state')"
prop=
"state"
>
<Dictionary
code=
"mes.cache_config.State"
v-model=
"condition.state.value"
></Dictionary>
</FormItem
></Col>
</Row>
</Form>
</
template
>
<
script
>
import
Api
from
"./api"
;
export
default
{
name
:
"Add"
,
data
()
{
return
{
condition
:
{
id
:
{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
creationTime
:
{
op
:
"Range"
,
value
:
null
,
show
:
true
},
creatorUserId
:
{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
lastModificationTime
:
{
op
:
"Range"
,
value
:
null
,
show
:
true
},
lastModifierUserId
:
{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
deletionTime
:
{
op
:
"Range"
,
value
:
null
,
show
:
true
},
code
:
{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
name
:
{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
describe
:
{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
duration
:
{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
strategy
:
{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
type
:
{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
state
:
{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
},
};
},
methods
:
{
handleClose
()
{
this
.
$emit
(
"on-close"
);
},
l
(
key
)
{
key
=
"cache_config"
+
"."
+
key
;
return
this
.
$t
(
key
);
},
},
};
</
script
>
\ No newline at end of file
pages/basicData/calendar/class/edit.vue
View file @
8a3ea4fa
...
...
@@ -11,11 +11,11 @@
<Input
v-model=
"entity.shiftName"
></Input>
</FormItem>
</Col>
<
!--
<
Col
:span=
"24"
>
<Col
:span=
"24"
>
<FormItem
:label=
"l('shiftStartEnd')"
prop=
"shiftStartEnd"
>
<TimePicker
format=
"HH:mm"
v-model=
"entity.shiftStartEnd"
type=
"timerange"
placeholder=
"选择时间段"
style=
"width: 130px"
></TimePicker>
</FormItem>
</Col>
-->
</Col>
<Col
:span=
"24"
>
<FormItem
:label=
"l('shiftStart')"
prop=
"shiftStart"
>
<TimePicker
format=
"HH:mm"
v-model=
"entity.shiftStart"
placeholder=
"选择时间段"
style=
"width: 130px"
></TimePicker>
...
...
pages/basicData/systemUser/add.vue
0 → 100644
View file @
8a3ea4fa
<
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 @
8a3ea4fa
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 @
8a3ea4fa
<
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 @
8a3ea4fa
This diff is collapsed.
Click to expand it.
pages/basicData/systemUser/index.vue
0 → 100644
View file @
8a3ea4fa
This diff is collapsed.
Click to expand it.
pages/basicData/systemUser/search.vue
0 → 100644
View file @
8a3ea4fa
<
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
:
null
,
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 @
8a3ea4fa
...
...
@@ -123,7 +123,8 @@ export default {
entity
:
{
gender
:
1
,
status
:
1
,
property
:
false
property
:
false
,
userType
:
0
},
rules
:
{
userName
:
[{
...
...
pages/basicData/user/index.vue
View file @
8a3ea4fa
...
...
@@ -115,6 +115,10 @@ export default {
op
:
"In"
,
value
:
""
},
userType
:
{
op
:
"Equal"
,
value
:
"0"
},
},
treeData
:
[],
tdHeight
:
""
,
...
...
pages/basicData/user/search.vue
View file @
8a3ea4fa
...
...
@@ -172,7 +172,7 @@ export default {
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
:
null
,
show
:
false
},
userType
:
{
op
:
'Equal'
,
value
:
'0'
,
show
:
false
},
phone
:
{
op
:
'Equal'
,
value
:
null
,
show
:
true
},
email
:
{
op
:
'Equal'
,
value
:
null
,
show
:
true
},
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