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
91c4fddb
Commit
91c4fddb
authored
Apr 17, 2020
by
樊国敬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setmenu
parent
644fc8e0
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
1056 additions
and
1 deletion
+1056
-1
zh-CN.js
i18n/locale/zh-CN.js
+55
-1
saas.js
menu/saas.js
+72
-0
add.vue
pages/system/account/add.vue
+80
-0
api.js
pages/system/account/api.js
+20
-0
detail.vue
pages/system/account/detail.vue
+55
-0
edit.vue
pages/system/account/edit.vue
+84
-0
index.vue
pages/system/account/index.vue
+160
-0
search.vue
pages/system/account/search.vue
+102
-0
add.vue
pages/system/set_menu/add.vue
+70
-0
api.js
pages/system/set_menu/api.js
+20
-0
detail.vue
pages/system/set_menu/detail.vue
+51
-0
edit.vue
pages/system/set_menu/edit.vue
+77
-0
index.vue
pages/system/set_menu/index.vue
+150
-0
search.vue
pages/system/set_menu/search.vue
+60
-0
No files found.
i18n/locale/zh-CN.js
View file @
91c4fddb
...
...
@@ -938,7 +938,61 @@ export default {
deletionTime
:
'删除时间'
,
deleterUserId
:
'删除人'
,
hostId
:
'服务器'
,
},
},
//多租户-用户
account
:{
id
:
''
,
name
:
'姓名'
,
loginName
:
'登录账号'
,
password
:
'密码'
,
status
:
'状态'
,
remark
:
'备注'
,
creationTime
:
'创建时间'
,
creatorUserId
:
'创建人'
,
lastModificationTime
:
'更新时间'
,
lastModifierUserId
:
'更新人'
,
isDeleted
:
'是否删除'
,
deleterUserId
:
'删除人'
,
deletionTime
:
'删除时间'
,
lastLoginTime
:
'最后登录时间'
,
loginTimes
:
'累计登录次数'
,
},
//多租户-套餐管理
set_menu
:{
id
:
''
,
creationTime
:
'创建时间'
,
creatorUserId
:
'创建人'
,
lastModificationTime
:
'更新时间'
,
lastModifierUserId
:
'更新人'
,
isDeleted
:
'删除人'
,
deletionTime
:
'删除时间'
,
deleterUserId
:
'删除人'
,
title
:
'套餐名称'
,
remark
:
'备注'
,
status
:
'状态'
,
},
//多租户-菜单管理
menu
:
{
id
:
''
,
creationTime
:
''
,
creatorUserId
:
''
,
lastModificationTime
:
''
,
lastModifierUserId
:
''
,
isDeleted
:
''
,
deletionTime
:
''
,
deleterUserId
:
''
,
name
:
'名称'
,
upId
:
'父级'
,
upTitle
:
'上级名称'
,
type
:
'类型'
,
code
:
'编码'
,
icon
:
'图标'
,
target
:
'打开方式'
,
url
:
'地址'
,
status
:
'显示'
,
description
:
'备注'
,
source
:
'来源'
,
app
:
'系统'
,
priority
:
'排序'
,
},
data_source
:
{
id
:
''
,
hostId
:
'数据源ID'
,
...
...
menu/saas.js
View file @
91c4fddb
...
...
@@ -40,6 +40,78 @@ export default [
"closable"
:
true
}
},
{
"name"
:
"system-account"
,
"type"
:
2
,
"code"
:
""
,
"icon"
:
""
,
"url"
:
"/system/account"
,
"status"
:
1
,
"description"
:
""
,
"source"
:
0
,
"app"
:
"App"
,
"priority"
:
0
,
"id"
:
418
,
"title"
:
"用户管理"
,
"expand"
:
true
,
"upId"
:
410
,
"lay"
:
2
,
"path"
:
"/system/account"
,
"header"
:
"home"
,
"meta"
:
{
"auth"
:
false
,
"title"
:
"用户管理"
,
"closable"
:
true
}
},
{
"name"
:
"system-menu"
,
"type"
:
2
,
"code"
:
""
,
"icon"
:
""
,
"url"
:
"/system/menu"
,
"status"
:
1
,
"description"
:
""
,
"source"
:
0
,
"app"
:
"App"
,
"priority"
:
0
,
"id"
:
419
,
"title"
:
"资源管理"
,
"expand"
:
true
,
"upId"
:
410
,
"lay"
:
2
,
"path"
:
"/system/menu"
,
"header"
:
"home"
,
"meta"
:
{
"auth"
:
false
,
"title"
:
"菜单管理"
,
"closable"
:
true
}
},
{
"name"
:
"system-setMenu"
,
"type"
:
2
,
"code"
:
""
,
"icon"
:
""
,
"url"
:
"/system/setmenu"
,
"status"
:
1
,
"description"
:
""
,
"source"
:
0
,
"app"
:
"App"
,
"priority"
:
0
,
"id"
:
420
,
"title"
:
"套餐管理"
,
"expand"
:
true
,
"upId"
:
410
,
"lay"
:
2
,
"path"
:
"/system/set_menu"
,
"header"
:
"home"
,
"meta"
:
{
"auth"
:
false
,
"title"
:
"套餐管理"
,
"closable"
:
true
}
},
{
"name"
:
"system-host"
,
"type"
:
2
,
...
...
pages/system/account/add.vue
0 → 100644
View file @
91c4fddb
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
<Row>
<Col
:span=
"12"
><FormItem
:label=
"l('name')"
prop=
"name"
>
<Input
v-model=
"entity.name"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('loginName')"
prop=
"loginName"
>
<Input
v-model=
"entity.loginName"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('password')"
prop=
"password"
>
<Input
v-model=
"entity.password"
type=
"password"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('status')"
prop=
"status"
>
<Dictionary
code=
"system.account.status"
v-model=
"entity.status"
></Dictionary>
</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
:
{
},
rules
:
{
name
:
[{
required
:
true
,
message
:
'必填'
}],
loginName
:
[{
required
:
true
,
message
:
'必填'
}],
password
:
[{
required
:
true
,
message
:
'必填'
}]
}
}
},
props
:
{
v
:
Object
},
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'
)
},
l
(
key
)
{
key
=
"account"
+
"."
+
key
;
return
this
.
$t
(
key
)
}
},
watch
:
{
v
()
{
this
.
entity
=
this
.
$u
.
clone
(
this
.
v
)
}
}
}
</
script
>
\ No newline at end of file
pages/system/account/api.js
0 → 100644
View file @
91c4fddb
import
Api
from
'@/plugins/request'
export
default
{
index
:
`
${
system
}
account/paged`
,
paged
(
params
){
return
Api
.
post
(
`
${
system
}
account/paged`
,
params
);
},
get
(
params
){
return
Api
.
get
(
`
${
system
}
account/get`
,
params
);
},
create
(
params
){
return
Api
.
post
(
`
${
system
}
account/create`
,
params
);
},
update
(
params
){
return
Api
.
post
(
`
${
system
}
account/update`
,
params
);
},
//删除:
delete
(
params
)
{
return
Api
.
delete
(
`
${
system
}
account/delete`
,{
params
:
params
});
},
}
\ No newline at end of file
pages/system/account/detail.vue
0 → 100644
View file @
91c4fddb
<
template
>
<div
class=
"detail"
>
<Row>
<Filed
:span=
"12"
:name=
"l('name')"
>
{{
entity
.
name
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('loginName')"
>
{{
entity
.
loginName
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('status')"
>
{{
entity
.
status
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('lastLoginTime')"
>
{{
entity
.
lastLoginTime
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('loginTimes')"
>
{{
entity
.
loginTimes
}}
</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
},
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
=
"account"
+
"."
+
key
;
return
this
.
$t
(
key
)
}
},
watch
:
{
eid
(
v
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
);
}
}
}
}
</
script
>
\ No newline at end of file
pages/system/account/edit.vue
0 → 100644
View file @
91c4fddb
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
<Row>
<Col
:span=
"12"
><FormItem
:label=
"l('name')"
prop=
"name"
>
<Input
v-model=
"entity.name"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('loginName')"
prop=
"loginName"
>
<Input
v-model=
"entity.loginName"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('password')"
prop=
"password"
>
<Input
v-model=
"entity.password"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('status')"
prop=
"status"
>
<Dictionary
code=
"system.account.status"
v-model=
"entity.status"
></Dictionary>
</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
:
{
name
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}],
loginName
:
[{
required
:
true
,
message
:
'必填'
}],
password
:
[{
required
:
true
,
message
:
'必填'
}]
}
}
},
props
:
{
eid
:
Number
},
methods
:
{
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
(
r
=>
{
this
.
entity
=
r
.
result
;
this
.
$emit
(
'on-load'
)
})
},
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
=
"account"
+
"."
+
key
;
return
this
.
$t
(
key
)
}
},
watch
:
{
eid
(
v
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
);
}
}
}
}
</
script
>
\ No newline at end of file
pages/system/account/index.vue
0 → 100644
View file @
91c4fddb
<
template
>
<div>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
><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=
"buttons"
>
<Button
type=
"primary"
@
click=
"addModal=true"
>
新增
</Button>
</
template
>
</DataGrid>
<Modal
v-model=
"addModal"
title=
"新增"
footer-hide
>
<Add
@
on-close=
"cancel"
@
on-ok=
"addOk"
/>
</Modal>
<Modal
v-model=
"editModal"
title=
"编辑"
footer-hide
>
<Edit
:eid=
"curId"
@
on-close=
"cancel"
@
on-ok=
"addOk"
/>
</Modal>
<Modal
v-model=
"detailModal"
title=
"详情"
>
<Detail
:eid=
"curId"
/>
</Modal>
<Modal
v-model=
"deletelModal"
title=
"删除"
@
on-ok=
"removeOk"
@
on-cancel=
"cancel"
>
<p>
确定删除?
</p>
</Modal>
</div>
</template>
<
script
>
import
Api
from
'./api'
import
Add
from
'./add'
import
Edit
from
'./edit'
import
Detail
from
'./detail'
import
Search
from
'./search'
export
default
{
name
:
'list'
,
components
:{
Add
,
Edit
,
Detail
,
Search
},
data
()
{
return
{
action
:
Api
.
index
,
easySearch
:
{
keys
:{
op
:
"name,loginName,password,token,source,remark"
,
value
:
null
}
},
addModal
:
false
,
editModal
:
false
,
detailModal
:
false
,
deletelModal
:
false
,
curId
:
0
,
columns
:
[
{
key
:
"id"
,
title
:
this
.
l
(
"id"
)
,
hide
:
true
,
align
:
"left"
},
{
key
:
"name"
,
title
:
this
.
l
(
"name"
)
,
align
:
"center"
,
width
:
160
,
easy
:
true
,
high
:
true
},
{
key
:
"loginName"
,
title
:
this
.
l
(
"loginName"
)
,
align
:
"center"
,
width
:
160
,
easy
:
true
,
high
:
true
},
{
key
:
"creationTime"
,
title
:
this
.
l
(
"creationTime"
)
,
hide
:
true
,
align
:
"left"
},
{
key
:
"creatorUserId"
,
title
:
this
.
l
(
"creatorUserId"
)
,
hide
:
true
,
align
:
"left"
},
{
key
:
"lastModificationTime"
,
title
:
this
.
l
(
"lastModificationTime"
)
,
hide
:
true
,
align
:
"left"
},
{
key
:
"lastModifierUserId"
,
title
:
this
.
l
(
"lastModifierUserId"
)
,
hide
:
true
,
align
:
"left"
},
{
key
:
"isDeleted"
,
title
:
this
.
l
(
"isDeleted"
)
,
hide
:
true
,
align
:
"left"
},
{
key
:
"deleterUserId"
,
title
:
this
.
l
(
"deleterUserId"
)
,
hide
:
true
,
align
:
"left"
},
{
key
:
"deletionTime"
,
title
:
this
.
l
(
"deletionTime"
)
,
hide
:
true
,
align
:
"left"
},
{
key
:
"lastLoginTime"
,
title
:
this
.
l
(
"lastLoginTime"
)
,
align
:
"center"
,
width
:
260
,
high
:
true
},
{
key
:
"loginTimes"
,
title
:
this
.
l
(
"loginTimes"
)
,
align
:
"center"
,
width
:
160
,
high
:
true
},
{
key
:
"status"
,
title
:
this
.
l
(
"status"
)
,
align
:
"center"
,
width
:
160
,
high
:
true
,
code
:
'system.account.status'
},
{
title
:
'操作'
,
key
:
'id'
,
width
:
140
,
align
:
'center'
,
render
:
(
h
,
params
)
=>
{
return
h
(
'div'
,
{
class
:
"action"
},
[
h
(
'op'
,
{
attrs
:
{
oprate
:
'detail'
},
on
:
{
click
:
()
=>
this
.
detail
(
params
.
row
.
id
)
}
},
'查看'
),
h
(
'op'
,
{
attrs
:
{
oprate
:
'edit'
},
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
.
id
)
}
},
'编辑'
),
h
(
'op'
,
{
attrs
:
{
oprate
:
'remove'
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
}
},
'删除'
)
])
}
},
]
}
},
mounted
(){
console
.
log
(
this
);
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
'loadDictionary'
)
// 加载数据字典
},
methods
:{
addOk
()
{
this
.
$refs
.
grid
.
load
()
this
.
addModal
=
false
this
.
detailModal
=
false
this
.
editModal
=
false
;
this
.
curId
=
0
;
},
search
()
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
)
},
detail
(
id
)
{
this
.
detailModal
=
true
;
this
.
curId
=
id
;
},
edit
(
id
)
{
this
.
editModal
=
true
;
this
.
curId
=
id
;
},
remove
(
id
)
{
this
.
deletelModal
=
true
;
this
.
curId
=
id
;
},
removeOk
()
{
Api
.
delete
({
id
:
this
.
curId
}).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
();
this
.
deletelModal
=
false
;
this
.
$Message
.
success
(
'删除成功'
)
}
})
},
removeCancel
()
{
this
.
deletelModal
=
false
;
},
cancel
()
{
this
.
curId
=
0
;
this
.
addModal
=
false
this
.
detailModal
=
false
this
.
editModal
=
false
;
this
.
deletedlModal
=
false
;
},
l
(
key
)
{
/*
account:{
id:'',
userId:'',
name:'',
loginName:'',
tanantCode:'',
password:'',
token:'',
status:'',
source:'',
remark:'',
creationTime:'',
creatorUserId:'',
lastModificationTime:'',
lastModifierUserId:'',
isDeleted:'',
deleterUserId:'',
deletionTime:'',
lastLoginTime:'最后登录时间',
loginTimes:'累计登录次数',
}
*/
let
vkey
=
"account"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
}
}
}
</
script
>
<
style
lang=
"less"
>
</
style
>
\ No newline at end of file
pages/system/account/search.vue
0 → 100644
View file @
91c4fddb
<
template
>
<Form
ref=
"form"
:model=
"condition"
:label-width=
"90"
>
<Row>
<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=
"12"
:v-if=
"condition.loginName.show"
>
<FormItem
:label=
"l('loginName')"
prop=
"loginName"
>
<Input
v-model=
"condition.loginName.value"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
:v-if=
"condition.status.show"
>
<FormItem
:label=
"l('status')"
prop=
"status"
>
<Dictionary
code=
"system.account.status"
v-model=
"condition.status.value"
></Dictionary>
</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.isDeleted.show"
>
<FormItem
:label=
"l('isDeleted')"
prop=
"isDeleted"
>
<Input
v-model=
"condition.isDeleted.value"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
:v-if=
"condition.deleterUserId.show"
>
<FormItem
:label=
"l('deleterUserId')"
prop=
"deleterUserId"
>
<Input
v-model=
"condition.deleterUserId.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.lastLoginTime.show"
>
<FormItem
:label=
"l('lastLoginTime')"
prop=
"lastLoginTime"
>
<DatePicker
type=
"daterange"
v-model=
"condition.lastLoginTime.value"
></DatePicker>
</FormItem>
</Col>
<Col
:span=
"12"
:v-if=
"condition.loginTimes.show"
>
<FormItem
:label=
"l('loginTimes')"
prop=
"loginTimes"
>
<Input
v-model=
"condition.loginTimes.value"
></Input>
</FormItem>
</Col>
</Row>
</Form>
</
template
>
<
script
>
import
Api
from
"./api"
;
export
default
{
name
:
"Add"
,
data
()
{
return
{
condition
:
{
name
:
{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
loginName
:
{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
status
:
{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
creationTime
:
{
op
:
"Range"
,
value
:
null
,
show
:
false
},
creatorUserId
:
{
op
:
"Equal"
,
value
:
null
,
show
:
false
},
lastModificationTime
:
{
op
:
"Range"
,
value
:
null
,
show
:
false
},
lastModifierUserId
:
{
op
:
"Equal"
,
value
:
null
,
show
:
false
},
isDeleted
:
{
op
:
"Equal"
,
value
:
null
,
show
:
false
},
deleterUserId
:
{
op
:
"Equal"
,
value
:
null
,
show
:
false
},
deletionTime
:
{
op
:
"Range"
,
value
:
null
,
show
:
false
},
lastLoginTime
:
{
op
:
"Range"
,
value
:
null
,
show
:
true
},
loginTimes
:
{
op
:
"Equal"
,
value
:
null
,
show
:
true
}
}
};
},
methods
:
{
handleClose
()
{
this
.
$emit
(
"on-close"
);
},
l
(
key
)
{
key
=
"account"
+
"."
+
key
;
return
this
.
$t
(
key
);
}
}
};
</
script
>
\ No newline at end of file
pages/system/set_menu/add.vue
0 → 100644
View file @
91c4fddb
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
<Row>
<Col
:span=
"12"
><FormItem
:label=
"l('title')"
prop=
"title"
>
<Input
v-model=
"entity.title"
>
</Input>
</FormItem></Col>
<Col
:span=
"24"
><FormItem
:label=
"l('remark')"
prop=
"remark"
>
<Input
v-model=
"entity.remark"
type=
"textarea"
:rows=
"5"
></Input>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('status')"
prop=
"status"
>
<InputNumber
v-model=
"entity.status"
></InputNumber>
</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
:
{
},
rules
:
{
name
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}]
}
}
},
props
:
{
v
:
Object
},
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'
)
},
l
(
key
)
{
key
=
"set_menu"
+
"."
+
key
;
return
this
.
$t
(
key
)
}
},
watch
:
{
v
()
{
this
.
entity
=
this
.
$u
.
clone
(
this
.
v
)
}
}
}
</
script
>
\ No newline at end of file
pages/system/set_menu/api.js
0 → 100644
View file @
91c4fddb
import
Api
from
'@/plugins/request'
export
default
{
index
:
`
${
system
}
setmenu/paged`
,
paged
(
params
){
return
Api
.
post
(
`
${
system
}
setmenu/paged`
,
params
);
},
get
(
params
){
return
Api
.
get
(
`
${
system
}
setmenu/get`
,
params
);
},
create
(
params
){
return
Api
.
post
(
`
${
system
}
setmenu/create`
,
params
);
},
update
(
params
){
return
Api
.
post
(
`
${
system
}
setmenu/update`
,
params
);
},
//删除:
delete
(
params
)
{
return
Api
.
delete
(
`
${
system
}
setmenu/delete`
,{
params
:
params
});
},
}
\ No newline at end of file
pages/system/set_menu/detail.vue
0 → 100644
View file @
91c4fddb
<
template
>
<div
class=
"detail"
>
<Row>
<Filed
:span=
"12"
:name=
"l('title')"
>
{{
entity
.
title
}}
</Filed>
<Filed
:span=
"24"
:name=
"l('remark')"
>
{{
entity
.
remark
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('status')"
>
{{
entity
.
status
}}
</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
},
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
=
"set_menu"
+
"."
+
key
;
return
this
.
$t
(
key
)
}
},
watch
:
{
eid
(
v
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
);
}
}
}
}
</
script
>
\ No newline at end of file
pages/system/set_menu/edit.vue
0 → 100644
View file @
91c4fddb
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
<Row>
<Col
:span=
"12"
><FormItem
:label=
"l('title')"
prop=
"title"
>
<Input
v-model=
"entity.title"
>
</Input>
</FormItem></Col>
<Col
:span=
"24"
><FormItem
:label=
"l('remark')"
prop=
"remark"
>
<Input
v-model=
"entity.remark"
type=
"textarea"
:rows=
"5"
></Input>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('status')"
prop=
"status"
>
<InputNumber
v-model=
"entity.status"
></InputNumber>
</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
:
{
name
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}]
}
}
},
props
:
{
eid
:
Number
},
methods
:
{
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
(
r
=>
{
this
.
entity
=
r
.
result
;
this
.
$emit
(
'on-load'
)
})
},
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
=
"set_menu"
+
"."
+
key
;
return
this
.
$t
(
key
)
}
},
watch
:
{
eid
(
v
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
);
}
}
}
}
</
script
>
\ No newline at end of file
pages/system/set_menu/index.vue
0 → 100644
View file @
91c4fddb
<
template
>
<div>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
><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=
"buttons"
>
<Button
type=
"primary"
@
click=
"addModal=true"
>
新增
</Button>
</
template
>
</DataGrid>
<Modal
v-model=
"addModal"
title=
"新增"
footer-hide
>
<Add
@
on-close=
"cancel"
@
on-ok=
"addOk"
/>
</Modal>
<Modal
v-model=
"editModal"
title=
"编辑"
footer-hide
>
<Edit
:eid=
"curId"
@
on-close=
"cancel"
@
on-ok=
"addOk"
/>
</Modal>
<Modal
v-model=
"detailModal"
title=
"详情"
>
<Detail
:eid=
"curId"
/>
</Modal>
<Modal
v-model=
"deletelModal"
title=
"删除"
@
on-ok=
"removeOk"
@
on-cancel=
"cancel"
>
<p>
确定删除?
</p>
</Modal>
</div>
</template>
<
script
>
import
Api
from
'./api'
import
Add
from
'./add'
import
Edit
from
'./edit'
import
Detail
from
'./detail'
import
Search
from
'./search'
export
default
{
name
:
'list'
,
components
:{
Add
,
Edit
,
Detail
,
Search
},
data
()
{
return
{
action
:
Api
.
index
,
easySearch
:
{
keys
:{
op
:
"title,remark"
,
value
:
null
}
},
addModal
:
false
,
editModal
:
false
,
detailModal
:
false
,
deletelModal
:
false
,
curId
:
0
,
columns
:
[
{
key
:
"id"
,
title
:
this
.
l
(
"id"
)
,
hide
:
true
,
align
:
"left"
},
{
key
:
"creationTime"
,
title
:
this
.
l
(
"creationTime"
)
,
hide
:
true
,
align
:
"left"
},
{
key
:
"creatorUserId"
,
title
:
this
.
l
(
"creatorUserId"
)
,
hide
:
true
,
align
:
"left"
},
{
key
:
"lastModificationTime"
,
title
:
this
.
l
(
"lastModificationTime"
)
,
hide
:
true
,
align
:
"left"
},
{
key
:
"lastModifierUserId"
,
title
:
this
.
l
(
"lastModifierUserId"
)
,
hide
:
true
,
align
:
"left"
},
{
key
:
"isDeleted"
,
title
:
this
.
l
(
"isDeleted"
)
,
hide
:
true
,
align
:
"left"
},
{
key
:
"deletionTime"
,
title
:
this
.
l
(
"deletionTime"
)
,
hide
:
true
,
align
:
"left"
},
{
key
:
"deleterUserId"
,
title
:
this
.
l
(
"deleterUserId"
)
,
hide
:
true
,
align
:
"left"
},
{
key
:
"title"
,
title
:
this
.
l
(
"title"
)
,
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
"remark"
,
title
:
this
.
l
(
"remark"
)
,
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
"status"
,
title
:
this
.
l
(
"status"
)
,
align
:
"left"
,
high
:
true
},
{
title
:
'操作'
,
key
:
'id'
,
width
:
140
,
align
:
'center'
,
render
:
(
h
,
params
)
=>
{
return
h
(
'div'
,
{
class
:
"action"
},
[
h
(
'op'
,
{
attrs
:
{
oprate
:
'detail'
},
on
:
{
click
:
()
=>
this
.
detail
(
params
.
row
.
id
)
}
},
'查看'
),
h
(
'op'
,
{
attrs
:
{
oprate
:
'edit'
},
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
.
id
)
}
},
'编辑'
),
h
(
'op'
,
{
attrs
:
{
oprate
:
'remove'
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
}
},
'删除'
)
])
}
},
]
}
},
mounted
(){
console
.
log
(
this
);
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
'loadDictionary'
)
// 加载数据字典
},
methods
:{
addOk
()
{
this
.
$refs
.
grid
.
load
()
this
.
addModal
=
false
this
.
detailModal
=
false
this
.
editModal
=
false
;
this
.
curId
=
0
;
},
search
()
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
)
},
detail
(
id
)
{
this
.
detailModal
=
true
;
this
.
curId
=
id
;
},
edit
(
id
)
{
this
.
editModal
=
true
;
this
.
curId
=
id
;
},
remove
(
id
)
{
this
.
deletelModal
=
true
;
this
.
curId
=
id
;
},
removeOk
()
{
Api
.
delete
({
id
:
this
.
curId
}).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
();
this
.
deletelModal
=
false
;
this
.
$Message
.
success
(
'删除成功'
)
}
})
},
removeCancel
()
{
this
.
deletelModal
=
false
;
},
cancel
()
{
this
.
curId
=
0
;
this
.
addModal
=
false
this
.
detailModal
=
false
this
.
editModal
=
false
;
this
.
deletedlModal
=
false
;
},
l
(
key
)
{
/*
set_menu:{
id:'',
creationTime:'创建时间',
creatorUserId:'创建人',
lastModificationTime:'更新时间',
lastModifierUserId:'更新人',
isDeleted:'删除人',
deletionTime:'删除时间',
deleterUserId:'删除人',
title:'套餐名称',
remark:'备注',
status:'状态',
}
*/
let
vkey
=
"set_menu"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
}
}
}
</
script
>
<
style
lang=
"less"
>
</
style
>
\ No newline at end of file
pages/system/set_menu/search.vue
0 → 100644
View file @
91c4fddb
<
template
>
<Form
ref=
"form"
:model=
"condition"
:label-width=
"90"
>
<Row>
<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.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.isDeleted.show"
><FormItem
:label=
"l('isDeleted')"
prop=
"isDeleted"
>
<Input
v-model=
"condition.isDeleted.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.deleterUserId.show"
><FormItem
:label=
"l('deleterUserId')"
prop=
"deleterUserId"
>
<Input
v-model=
"condition.deleterUserId.value"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.title.show"
><FormItem
:label=
"l('title')"
prop=
"title"
>
<Input
v-model=
"condition.title.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.status.show"
><FormItem
:label=
"l('status')"
prop=
"status"
>
<Input
v-model=
"condition.status.value"
>
</Input>
</FormItem></Col>
</Row>
</Form>
</
template
>
<
script
>
import
Api
from
'./api'
export
default
{
name
:
'Add'
,
data
()
{
return
{
condition
:
{
id
:{
op
:
"Equal"
,
value
:
null
,
show
:
false
},
creationTime
:{
op
:
"Range"
,
value
:
null
,
show
:
false
},
creatorUserId
:{
op
:
"Equal"
,
value
:
null
,
show
:
false
},
lastModificationTime
:{
op
:
"Range"
,
value
:
null
,
show
:
false
},
lastModifierUserId
:{
op
:
"Equal"
,
value
:
null
,
show
:
false
},
isDeleted
:{
op
:
"Equal"
,
value
:
null
,
show
:
false
},
deletionTime
:{
op
:
"Range"
,
value
:
null
,
show
:
false
},
deleterUserId
:{
op
:
"Equal"
,
value
:
null
,
show
:
false
},
title
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
remark
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
status
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
},
}
},
methods
:
{
handleClose
()
{
this
.
$emit
(
'on-close'
)
},
l
(
key
)
{
key
=
"set_menu"
+
"."
+
key
;
return
this
.
$t
(
key
)
}
}
}
</
script
>
\ No newline at end of file
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