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
d9d6b1f3
Commit
d9d6b1f3
authored
Apr 02, 2020
by
周远喜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ok
parent
6ceaea37
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
1 addition
and
4526 deletions
+1
-4526
add.vue
pages/basicData/code/add.vue
+0
-105
api.js
pages/basicData/code/api.js
+0
-25
detail.vue
pages/basicData/code/detail.vue
+0
-53
edit.vue
pages/basicData/code/edit.vue
+0
-114
index.vue
pages/basicData/code/index.vue
+0
-292
search.vue
pages/basicData/code/search.vue
+0
-119
set.vue
pages/basicData/code/set.vue
+0
-112
Addrow.vue
pages/basicData/department/Addrow.vue
+0
-135
add.vue
pages/basicData/department/add.vue
+0
-127
api.js
pages/basicData/department/api.js
+0
-19
edit.vue
pages/basicData/department/edit.vue
+0
-135
index.vue
pages/basicData/department/index.vue
+0
-187
add.vue
pages/basicData/menu/add.vue
+0
-149
addApi.vue
pages/basicData/menu/addApi.vue
+0
-199
api.js
pages/basicData/menu/api.js
+0
-41
detail.vue
pages/basicData/menu/detail.vue
+0
-60
edit.vue
pages/basicData/menu/edit.vue
+0
-145
index.vue
pages/basicData/menu/index.vue
+0
-335
search.vue
pages/basicData/menu/search.vue
+0
-87
add.vue
pages/basicData/method/add.vue
+0
-89
api.js
pages/basicData/method/api.js
+0
-20
detail.vue
pages/basicData/method/detail.vue
+0
-58
edit.vue
pages/basicData/method/edit.vue
+0
-96
index.vue
pages/basicData/method/index.vue
+0
-283
search.vue
pages/basicData/method/search.vue
+0
-96
add.vue
pages/basicData/user/add.vue
+0
-224
detail.vue
pages/basicData/user/detail.vue
+0
-105
edit.vue
pages/basicData/user/edit.vue
+0
-231
index.vue
pages/basicData/user/index.vue
+0
-668
search.vue
pages/basicData/user/search.vue
+0
-216
api.js
pages/basicData/userManagent/api.js
+0
-0
userInfo.vue
pages/basicData/userManagent/userInfo.vue
+1
-1
No files found.
pages/basicData/code/add.vue
deleted
100644 → 0
View file @
6ceaea37
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"100"
>
<Row
class=
"rowTitle100"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('businessName')"
prop=
"businessName"
>
<Input
v-model=
"entity.businessName"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('businessCode')"
prop=
"businessCode"
>
<Input
v-model=
"entity.businessCode"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('prefix')"
prop=
"prefix"
>
<Input
v-model=
"entity.prefix"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('maxSerial')"
prop=
"maxSerial"
>
<InputNumber
v-model=
"entity.maxSerial"
></InputNumber>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('day')"
prop=
"day"
>
<Dictionary
code=
"mes_xingchi_system.business_code_config.day"
v-model=
"entity.day"
type=
"radio"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"24"
>
<FormItem
:label=
"l('remark')"
prop=
"remark"
>
<Input
v-model=
"entity.remark"
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
:
{
day
:
'1'
,
maxSerial
:
0
},
rules
:
{
businessName
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}],
businessCode
:
[{
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
)
=>
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
'保存成功'
)
this
.
$emit
(
'on-ok'
)
this
.
entity
=
{}
this
.
entity
.
maxSerial
=
0
;
this
.
disabled
=
false
}
else
{
this
.
$Message
.
error
(
'保存失败'
)
this
.
disabled
=
false
}
})
.
catch
((
err
)
=>
{
this
.
disabled
=
false
this
.
$Message
.
error
(
'保存失败'
)
console
.
warn
(
err
)
})
}
})
},
handleClose
()
{
this
.
$emit
(
'on-close'
)
},
l
(
key
)
{
key
=
'business_code_config'
+
'.'
+
key
return
this
.
$t
(
key
)
}
},
watch
:
{
v
()
{
this
.
entity
=
this
.
$u
.
clone
(
this
.
v
)
}
}
}
</
script
>
\ No newline at end of file
pages/basicData/code/api.js
deleted
100644 → 0
View file @
6ceaea37
import
Api
from
'@/plugins/request'
export
default
{
index
:
`
${
systemUrl
}
/businesscodeconfig/paged`
,
paged
(
params
)
{
return
Api
.
post
(
`
${
systemUrl
}
/businesscodeconfig/paged`
,
params
);
},
get
(
params
)
{
return
Api
.
get
(
`
${
systemUrl
}
/businesscodeconfig/get`
,
params
);
},
create
(
params
)
{
return
Api
.
post
(
`
${
systemUrl
}
/businesscodeconfig/create`
,
params
);
},
update
(
params
)
{
return
Api
.
put
(
`
${
systemUrl
}
/businesscodeconfig/update`
,
params
);
},
//删除:
delete
(
params
)
{
return
Api
.
delete
(
`
${
systemUrl
}
/businesscodeconfig/delete`
,
{
params
:
params
});
},
setrule
(
params
)
{
return
Api
.
post
(
`
${
systemUrl
}
/businesscodeconfig/setrule`
,
params
);
}
}
\ No newline at end of file
pages/basicData/code/detail.vue
deleted
100644 → 0
View file @
6ceaea37
<
template
>
<div
class=
"detail"
>
<Row>
<Filed
:span=
"12"
:name=
"l('businessName')"
>
{{
entity
.
businessName
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('businessCode')"
>
{{
entity
.
businessCode
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('prefix')"
>
{{
entity
.
prefix
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('maxSerial')"
>
{{
entity
.
maxSerial
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('day')"
>
<state
code=
"mes_xingchi_system.business_code_config.day"
:value=
"entity.day"
/>
</Filed>
<Filed
:span=
"12"
></Filed>
<Filed
:span=
"24"
:name=
"l('remark')"
>
{{
entity
.
remark
}}
</Filed>
</Row>
</div>
</
template
>
<
script
>
import
Api
from
'./api'
export
default
{
name
:
'Add'
,
data
()
{
return
{
entity
:
{
day
:
''
}
}
},
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
=
'business_code_config'
+
'.'
+
key
return
this
.
$t
(
key
)
}
},
watch
:
{
eid
(
v
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
)
}
}
}
}
</
script
>
\ No newline at end of file
pages/basicData/code/edit.vue
deleted
100644 → 0
View file @
6ceaea37
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"100"
>
<Row
class=
"rowTitle100"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('businessName')"
prop=
"businessName"
>
<Input
v-model=
"entity.businessName"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('businessCode')"
prop=
"businessCode"
>
<Input
v-model=
"entity.businessCode"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('prefix')"
prop=
"prefix"
>
<Input
v-model=
"entity.prefix"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('maxSerial')"
prop=
"maxSerial"
>
<InputNumber
v-model=
"entity.maxSerial"
disabled
></InputNumber>
</FormItem>
</Col>
<Col
:span=
"24"
>
<FormItem
:label=
"l('day')"
prop=
"day"
>
<Dictionary
code=
"mes_xingchi_system.business_code_config.day"
:value=
'entity.day'
:key=
"entity.day"
v-model=
"entity.day"
type=
"radio"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"24"
>
<FormItem
:label=
"l('remark')"
prop=
"remark"
>
<Input
v-model=
"entity.remark"
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
:
{
color
:
''
},
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
.
entity
.
day
=
this
.
entity
.
day
this
.
$emit
(
'on-load'
)
})
},
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
this
.
disabled
=
true
Api
.
update
(
this
.
entity
)
.
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
'保存成功'
)
this
.
$emit
(
'on-ok'
)
}
else
{
this
.
$Message
.
error
(
'保存失败'
)
this
.
disabled
=
false
}
})
.
catch
((
err
)
=>
{
this
.
disabled
=
false
this
.
$Message
.
error
(
'保存失败'
)
console
.
warn
(
err
)
})
}
})
},
handleClose
()
{
this
.
$emit
(
'on-close'
)
},
l
(
key
)
{
key
=
'business_code_config'
+
'.'
+
key
return
this
.
$t
(
key
)
}
},
watch
:
{
eid
(
v
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
)
}
this
.
disabled
=
false
;
}
}
}
</
script
>
\ No newline at end of file
pages/basicData/code/index.vue
deleted
100644 → 0
View file @
6ceaea37
<
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=
"新增"
width=
"800"
footer-hide
>
<Add
@
on-close=
"cancel"
@
on-ok=
"addOk"
/>
</Modal>
<Modal
v-model=
"editModal"
title=
"编辑"
width=
"800"
footer-hide
>
<Edit
:eid=
"curId"
@
on-close=
"cancel"
@
on-ok=
"addOk"
/>
</Modal>
<Modal
v-model=
"setModal"
title=
"设置"
width=
"600"
footer-hide
>
<Set
:eid=
"curId"
@
on-close=
"cancel"
@
on-ok=
"addOk"
/>
</Modal>
<Modal
v-model=
"detailModal"
title=
"详情"
width=
"800"
>
<Detail
:eid=
"curId"
/>
</Modal>
</div>
</template>
<
script
>
import
Api
from
"./api"
;
import
Add
from
"./add"
;
import
Edit
from
"./edit"
;
import
Detail
from
"./detail"
;
import
Search
from
"./search"
;
import
Set
from
"./set"
;
export
default
{
name
:
"list"
,
components
:
{
Add
,
Edit
,
Detail
,
Search
,
Set
},
data
()
{
return
{
action
:
Api
.
index
,
easySearch
:
{
keys
:
{
op
:
"businessName"
,
value
:
null
}
},
addModal
:
false
,
editModal
:
false
,
detailModal
:
false
,
setModal
:
false
,
deletelModal
:
false
,
curId
:
0
,
columns
:
[
{
key
:
"id"
,
title
:
this
.
l
(
"id"
),
hide
:
true
,
align
:
"left"
},
{
title
:
"序号"
,
type
:
"index"
,
width
:
65
,
align
:
"center"
},
{
key
:
"businessName"
,
title
:
this
.
l
(
"businessName"
),
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
"businessCode"
,
title
:
this
.
l
(
"businessCode"
),
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
"prefix"
,
title
:
this
.
l
(
"prefix"
),
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
"maxSerial"
,
title
:
this
.
l
(
"maxSerial"
),
align
:
"left"
,
high
:
true
},
{
key
:
"day"
,
title
:
this
.
l
(
"day"
),
align
:
"left"
,
high
:
true
,
code
:
"mes_xingchi_system.business_code_config.day"
},
{
key
:
"remark"
,
title
:
this
.
l
(
"remark"
),
align
:
"left"
,
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
:
"deletionTime"
,
title
:
this
.
l
(
"deletionTime"
),
hide
:
true
,
align
:
"left"
},
{
key
:
"deleterUserId"
,
title
:
this
.
l
(
"deleterUserId"
),
hide
:
true
,
align
:
"left"
},
{
title
:
"操作"
,
key
:
"id"
,
width
:
220
,
align
:
"center"
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
class
:
"action"
},
[
h
(
"op"
,
{
attrs
:
{
oprate
:
"set"
},
on
:
{
click
:
()
=>
this
.
set
(
params
.
row
.
id
)
}
},
"设置"
),
h
(
"op"
,
{
attrs
:
{
oprate
:
"detail"
},
on
:
{
click
:
()
=>
this
.
detail
(
params
.
row
.
id
)
}
},
"查看"
),
h
(
"op"
,
{
attrs
:
{
oprate
:
"detail"
,
class
:
"edit"
},
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
.
id
)
}
},
"编辑"
),
h
(
"op"
,
{
attrs
:
{
oprate
:
"delete"
,
class
:
"remove"
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
}
},
"删除"
)
]);
}
}
]
};
},
mounted
()
{},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
methods
:
{
addOk
()
{
this
.
$refs
.
grid
.
load
();
this
.
addModal
=
false
;
this
.
detailModal
=
false
;
this
.
editModal
=
false
;
this
.
setModal
=
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
;
},
set
(
id
)
{
this
.
setModal
=
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
;
this
.
setModal
=
false
;
},
l
(
key
)
{
/*
business_code_config:{
id:'',
businessName:'业务名称',
businessCode:'业务代号',
prefix:'编码前缀',
maxSerial:'最大序列号',
year:'年',
month:'月',
day:'',
clearSerial:'是否清零',
remark:'',
creationTime:'',
creatorUserId:'',
lastModificationTime:'',
lastModifierUserId:'',
isDeleted:'',
deletionTime:'',
deleterUserId:'',
}
*/
let
vkey
=
"business_code_config"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
}
}
};
</
script
>
<
style
lang=
"less"
>
</
style
>
\ No newline at end of file
pages/basicData/code/search.vue
deleted
100644 → 0
View file @
6ceaea37
<
template
>
<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.businessName.show"
>
<FormItem
:label=
"l('businessName')"
prop=
"businessName"
>
<Input
v-model=
"condition.businessName.value"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
:v-if=
"condition.businessCode.show"
>
<FormItem
:label=
"l('businessCode')"
prop=
"businessCode"
>
<Input
v-model=
"condition.businessCode.value"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
:v-if=
"condition.prefix.show"
>
<FormItem
:label=
"l('prefix')"
prop=
"prefix"
>
<Input
v-model=
"condition.prefix.value"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
:v-if=
"condition.maxSerial.show"
>
<FormItem
:label=
"l('maxSerial')"
prop=
"maxSerial"
>
<Input
v-model=
"condition.maxSerial.value"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
:v-if=
"condition.day.show"
>
<FormItem
:label=
"l('day')"
prop=
"day"
>
<Dictionary
code=
"mes_xingchi_system.business_code_config.day"
v-model=
"condition.day.value"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"24"
:v-if=
"condition.remark.show"
>
<FormItem
:label=
"l('remark')"
prop=
"remark"
>
<Input
v-model=
"condition.remark.value"
maxlength=
"50"
show-word-limit
type=
"textarea"
></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>
-->
</Row>
</Form>
</
template
>
<
script
>
import
Api
from
'./api'
export
default
{
name
:
'Add'
,
data
()
{
return
{
condition
:
{
id
:
{
op
:
'Equal'
,
value
:
null
,
show
:
false
},
businessName
:
{
op
:
'Equal'
,
value
:
null
,
show
:
true
},
businessCode
:
{
op
:
'Equal'
,
value
:
null
,
show
:
true
},
prefix
:
{
op
:
'Equal'
,
value
:
null
,
show
:
true
},
maxSerial
:
{
op
:
'Equal'
,
value
:
null
,
show
:
true
},
year
:
{
op
:
'Equal'
,
value
:
null
,
show
:
true
},
month
:
{
op
:
'Equal'
,
value
:
null
,
show
:
true
},
day
:
{
op
:
'Equal'
,
value
:
null
,
show
:
true
},
clearSerial
:
{
op
:
'Equal'
,
value
:
null
,
show
:
true
},
remark
:
{
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
},
deletionTime
:
{
op
:
'Range'
,
value
:
null
,
show
:
false
},
deleterUserId
:
{
op
:
'Equal'
,
value
:
null
,
show
:
false
}
}
}
},
methods
:
{
handleClose
()
{
this
.
$emit
(
'on-close'
)
},
l
(
key
)
{
key
=
'business_code_config'
+
'.'
+
key
return
this
.
$t
(
key
)
}
}
}
</
script
>
\ No newline at end of file
pages/basicData/code/set.vue
deleted
100644 → 0
View file @
6ceaea37
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"100"
>
<Row
class=
"rowTitle100"
>
<Col
:span=
"24"
>
<FormItem
:label=
"l('prefix')"
prop=
"prefix"
>
<Input
v-model=
"entity.prefix"
></Input>
</FormItem>
</Col>
<Col
:span=
"13"
>
<FormItem
:label=
"l('day')"
prop=
"day"
>
<Dictionary
code=
"mes_xingchi_system.business_code_config.day"
v-model=
"entity.day"
type=
"radio"
:value=
"entity.day"
:key=
"entity.day"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"11"
>
<div
style=
"font-size:12px;color:red;margin:10px"
>
{{
tishi
}}
</div>
</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
:
{},
tishi
:
''
,
rules
:
{
prefix
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}],
day
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}]
}
}
},
props
:
{
eid
:
Number
},
methods
:
{
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
this
.
entity
=
r
.
result
this
.
entity
.
day
=
this
.
entity
.
day
this
.
$emit
(
'on-load'
)
})
},
handleSubmit
()
{
this
.
entity
.
day
=
this
.
entity
.
day
+
''
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
this
.
disabled
=
true
Api
.
setrule
(
this
.
entity
)
.
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
'保存成功'
)
this
.
$emit
(
'on-ok'
)
}
else
{
this
.
$Message
.
error
(
'保存失败'
)
this
.
disabled
=
false
}
})
.
catch
((
err
)
=>
{
this
.
disabled
=
false
this
.
$Message
.
error
(
'保存失败'
)
console
.
warn
(
err
)
})
}
})
},
handleClose
()
{
this
.
$emit
(
'on-close'
)
},
l
(
key
)
{
key
=
'business_code_config'
+
'.'
+
key
return
this
.
$t
(
key
)
}
},
watch
:
{
eid
(
v
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
)
}
this
.
disabled
=
false
},
'entity.day'
:
{
handler
(
newValue
,
oldValue
)
{
if
(
newValue
==
'1'
)
{
this
.
tishi
=
'清零规则将按日清零'
}
else
if
(
newValue
==
'2'
)
{
this
.
tishi
=
'清零规则将按月清零'
}
else
if
(
newValue
==
'3'
)
{
this
.
tishi
=
'清零规则将按年清零'
}
else
{
this
.
tishi
=
''
}
}
}
}
}
</
script
>
pages/basicData/department/Addrow.vue
deleted
100644 → 0
View file @
6ceaea37
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"100"
>
<Row
class=
"rowTitle100"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('department')"
prop=
"title02"
>
<Input
v-model=
"entity.title02"
placeholder=
"请输入..."
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('departcode')"
>
<Input
v-model=
"entity.departcode"
placeholder=
"请输入..."
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('organizationType')"
prop=
"organizationType"
>
<Input
v-model=
"entity.organization_Type"
readonly
placeholder=
"请选择..."
>
<Button
slot=
"append"
@
click=
"selectDepart"
>
选择
</Button>
</Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('upMent')"
>
<b>
{{
entity
.
name
}}
</b>
</FormItem>
</Col>
<Col
:span=
"24"
>
<FormItem
:label=
"l('cityName')"
>
<Cascader
:data=
"citys"
v-model=
"entity.description02"
></Cascader>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('status')"
>
<RadioGroup
v-model=
"entity.isProduction"
>
<Radio
label=
"1"
>
是
</Radio>
<Radio
label=
"0"
>
否
</Radio>
</RadioGroup>
</FormItem>
</Col>
</Row>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
<!-- 组织类型 -->
<OrganizType
:show
.
sync=
"showTree"
:value
.
sync=
"entity.organization_Id"
:text
.
sync=
"entity.organization_Type"
/>
</Form>
</
template
>
<
script
>
import
Api
from
'./api'
import
OrganizType
from
'@/components/modalTree/organizType.vue'
import
citys
from
'@/libs/citys'
export
default
{
name
:
'Add'
,
components
:
{
OrganizType
},
data
()
{
return
{
showTree
:
false
,
//组织类型
disabled
:
false
,
citys
:
citys
(),
entity
:
{
organization_Id
:
0
,
organization_Type
:
''
},
rules
:
{
title02
:
[
{
required
:
true
,
message
:
'库位名不能为空'
,
trigger
:
'blur'
}
],
organizationType
:
[
{
required
:
true
,
message
:
'组织类型不能为空'
,
trigger
:
'blur'
}
]
}
}
},
props
:
{
val
:
Object
},
created
()
{
this
.
entity
=
{}
},
methods
:
{
handleSubmit
()
{
this
.
$refs
[
'form'
].
validate
(
value
=>
{
if
(
value
){
let
paramsdata
=
{
name
:
this
.
entity
.
title02
,
//部门名称
parent_Id
:
this
.
entity
.
id
,
//上级部门 [id]
code
:
this
.
entity
.
departcode
,
//部门编号
organization_Id
:
this
.
entity
.
organization_Id
,
//组织类型 [id]
location
:
this
.
entity
.
location
,
//省市县
isProduction
:
this
.
entity
.
isProduction
,
//是否生产班组:1是,0否
}
Api
.
create
(
paramsdata
)
.
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
(
'保存失败,请联系管理员'
)
})
}
})
},
selectDepart
()
{
this
.
showTree
=
true
},
handleClose
()
{
this
.
$emit
(
'on-close'
)
},
l
(
key
)
{
key
=
'DipartLocation'
+
'.'
+
key
return
this
.
$t
(
key
)
}
},
watch
:
{
val
(
v
)
{
this
.
entity
=
this
.
val
}
}
}
</
script
>
\ No newline at end of file
pages/basicData/department/add.vue
deleted
100644 → 0
View file @
6ceaea37
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"100"
>
<Row
class=
"rowTitle100"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('department')"
prop=
"title02"
>
<Input
v-model=
"entity.title02"
placeholder=
"请输入..."
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('departcode')"
>
<Input
v-model=
"entity.departcode"
placeholder=
"请输入..."
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('organizationType')"
prop=
"organizationType"
>
<Input
v-model=
"entity.organizationType"
readonly
placeholder=
"请选择..."
>
<Button
slot=
"append"
@
click=
"selectDepart"
>
选择
</Button>
</Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('status')"
>
<RadioGroup
v-model=
"entity.status"
>
<Radio
label=
"1"
>
是
</Radio>
<Radio
label=
"0"
>
否
</Radio>
</RadioGroup>
</FormItem>
</Col>
<Col
:span=
"24"
>
<FormItem
:label=
"l('cityName')"
>
<Cascader
:data=
"citys"
v-model=
"entity.location"
></Cascader>
</FormItem>
</Col>
</Row>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
<!-- 组织类型 -->
<OrganizType
:show
.
sync=
"showTree"
:value
.
sync=
"entity.organization_Id"
:text
.
sync=
"entity.organizationType"
/>
</Form>
</
template
>
<
script
>
import
Api
from
'./api'
import
OrganizType
from
'@/components/modalTree/organizType.vue'
import
citys
from
'@/libs/citys'
export
default
{
name
:
'Add'
,
components
:
{
OrganizType
},
data
()
{
return
{
showTree
:
false
,
//组织类型
disabled
:
false
,
citys
:
citys
(),
entity
:
{
organization_Id
:
0
,
organizationType
:
''
},
rules
:
{
title02
:
[
{
required
:
true
,
message
:
'库位名不能为空'
,
trigger
:
'blur'
}
],
organizationType
:
[
{
// type: 'array',
required
:
true
,
message
:
'组织类型不能为空'
,
trigger
:
'blur'
}
]
}
}
},
methods
:
{
handleSubmit
()
{
this
.
$refs
[
'form'
].
validate
(
value
=>
{
if
(
value
){
let
location
;
if
(
this
.
entity
.
location
){
location
=
this
.
entity
.
location
.
join
(
','
)
}
else
{
location
=
''
}
let
paramsdata
=
{
name
:
this
.
entity
.
title02
,
//部门名称
parent_Id
:
0
,
//上级部门 [id]
code
:
this
.
entity
.
departcode
,
//部门编号
organization_Id
:
this
.
entity
.
organization_Id
,
//组织类型 [id]
location
:
location
,
//省市县
isProduction
:
this
.
entity
.
status
,
//是否生产班组:1是,0否
}
Api
.
create
(
paramsdata
)
.
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
(
'保存失败,请联系管理员'
)
})
}
})
},
selectDepart
()
{
this
.
showTree
=
true
},
handleClose
()
{
this
.
$emit
(
'on-close'
)
},
l
(
key
)
{
key
=
'DipartLocation'
+
'.'
+
key
return
this
.
$t
(
key
)
}
}
}
</
script
>
\ No newline at end of file
pages/basicData/department/api.js
deleted
100644 → 0
View file @
6ceaea37
import
Api
from
'@/plugins/request'
export
default
{
getpaged
(
params
){
return
Api
.
get
(
`
${
systemUrl
}
/Department/GetDepartmentsWithOrganizations`
,
params
);
},
get
(
params
){
return
Api
.
get
(
`
${
systemUrl
}
/Department/get`
,
params
);
},
create
(
params
){
return
Api
.
post
(
`
${
systemUrl
}
/Department/Create`
,
params
);
},
update
(
params
){
return
Api
.
post
(
`
${
systemUrl
}
/Department/DepartUpdate`
,
params
);
},
//删除:
delete
(
params
)
{
return
Api
.
post
(
`
${
systemUrl
}
/Department/DepartDelete`
,
params
);
},
}
\ No newline at end of file
pages/basicData/department/edit.vue
deleted
100644 → 0
View file @
6ceaea37
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"100"
>
<Row
class=
"rowTitle100"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('department')"
prop=
"name"
>
<Input
v-model=
"entity.name"
placeholder=
"请输入..."
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('departcode')"
>
<Input
v-model=
"entity.code"
placeholder=
"请输入..."
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('organizationType')"
prop=
"organizationType"
>
<Input
v-model=
"entity.organizationType"
readonly
placeholder=
"请选择..."
>
<Button
slot=
"append"
@
click=
"selectDepart"
>
选择
</Button>
</Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('status')"
>
<RadioGroup
v-model=
"entity.isProduction"
>
<Radio
label=
"1"
>
是
</Radio>
<Radio
label=
"0"
>
否
</Radio>
</RadioGroup>
</FormItem>
</Col>
<Col
:span=
"24"
>
<FormItem
:label=
"l('cityName')"
>
<Cascader
:data=
"citys"
v-model=
"city_level"
></Cascader>
</FormItem>
</Col>
</Row>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
<!-- 组织类型 -->
<OrganizType
:show
.
sync=
"showTree"
:value
.
sync=
"entity.organization_Id"
:text
.
sync=
"entity.organizationType"
/>
</Form>
</
template
>
<
script
>
import
Api
from
'./api'
import
OrganizType
from
'@/components/modalTree/organizType.vue'
import
citys
from
'@/libs/citys'
export
default
{
name
:
'Add'
,
components
:
{
OrganizType
},
data
()
{
return
{
city_level
:[],
showTree
:
false
,
//组织类型
disabled
:
false
,
citys
:
citys
(),
entity
:
{
organization_Id
:
0
,
organizationType
:
''
},
rules
:
{
name
:
[
{
required
:
true
,
message
:
'库位名不能为空'
,
trigger
:
'blur'
}
],
organizationType
:
[
{
required
:
true
,
message
:
'组织类型不能为空'
,
trigger
:
'blur'
}
]
}
}
},
props
:
{
row
:
Object
},
created
()
{
// this.entity = {}
},
methods
:
{
handleSubmit
()
{
this
.
$refs
[
'form'
].
validate
(
value
=>
{
if
(
value
){
let
paramsdata
=
{
id
:
this
.
entity
.
id
,
name
:
this
.
entity
.
name
,
//部门名称
parent_Id
:
this
.
entity
.
parent_Id
,
//上级部门 [id]
code
:
this
.
entity
.
code
,
//部门编号
organizationType
:
this
.
entity
.
organizationType
,
//组织类型 [name]
organization_Id
:
this
.
entity
.
organization_Id
,
//组织类型 [id]
location
:
this
.
city_level
.
join
(
','
),
//省市县
isProduction
:
this
.
entity
.
isProduction
,
//是否生产班组:1是,0否
}
Api
.
update
(
paramsdata
)
.
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
(
'编辑失败,请联系管理员'
)
})
}
})
},
selectDepart
()
{
this
.
showTree
=
true
},
handleClose
()
{
this
.
$emit
(
'on-close'
)
},
l
(
key
)
{
key
=
'DipartLocation'
+
'.'
+
key
return
this
.
$t
(
key
)
}
},
watch
:
{
row
(
v
)
{
this
.
entity
=
this
.
row
this
.
entity
.
isProduction
=
this
.
row
.
isProduction
.
toString
()
this
.
city_level
=
this
.
row
.
location
.
split
(
','
)
}
}
}
</
script
>
\ No newline at end of file
pages/basicData/department/index.vue
deleted
100644 → 0
View file @
6ceaea37
<
template
>
<div>
<div>
<div
class=
"fr"
>
<Button
type=
"primary"
@
click=
"add()"
class=
"mb10"
>
新增部门
</Button>
</div>
</div>
<TreeGrid
:columns=
"columns"
:items=
"treeData"
>
</TreeGrid>
<Modal
v-model=
"addModal"
title=
"新增部门"
width=
'800'
footer-hide
>
<Add
@
on-close=
"cancel"
@
on-ok=
"addOk"
/>
</Modal>
<Modal
v-model=
"addrowModal"
title=
"新增部门"
width=
'800'
footer-hide
>
<AddRow
:val=
"rowdata"
@
on-close=
"cancel"
@
on-ok=
"addOk"
/>
</Modal>
<Modal
v-model=
"editModal"
title=
"编辑"
width=
'800'
footer-hide
>
<Edit
:row=
"rowData"
@
on-close=
"cancel"
@
on-ok=
"addOk"
/>
</Modal>
</div>
</
template
>
<
script
>
import
Api
from
'./api'
import
Add
from
'./add'
import
AddRow
from
'./Addrow'
import
Edit
from
'./edit'
export
default
{
name
:
'list'
,
components
:
{
Add
,
Edit
,
AddRow
},
data
()
{
return
{
searchValue
:
''
,
//搜索库位名称
modal
:
{
title
:
''
,
width
:
1000
,
show
:
false
,
items
:
{
add
:
false
,
edit
:
false
,
detail
:
false
},
id
:
-
1
,
data
:
{}
},
treeData
:
[],
addModal
:
false
,
editModal
:
false
,
addrowModal
:
false
,
deletelModal
:
false
,
rowdata
:
null
,
aId
:
0
,
rowData
:
null
,
columns
:
[
{
key
:
'name'
,
title
:
this
.
l
(
'name'
),
align
:
'left'
,
high
:
true
,
},
{
key
:
'organizationType'
,
title
:
this
.
l
(
'organizationType'
),
align
:
'left'
,
easy
:
true
,
high
:
true
},
{
key
:
'creationTime'
,
title
:
this
.
l
(
'creationTime'
),
align
:
'left'
,
easy
:
true
,
high
:
true
},
{
key
:
'isProduction'
,
title
:
this
.
l
(
'status'
),
align
:
'left'
,
code
:
'department.isProduction'
,
easy
:
true
,
high
:
true
},
{
title
:
'操作'
,
key
:
'id'
,
align
:
'left'
,
render
:
(
h
,
params
)
=>
{
let
actions
=
[
h
(
'op'
,
{
attrs
:
{
oprate
:
'add'
},
on
:
{
click
:
()
=>
this
.
addrow
(
params
.
row
)
}
},
'新增'
),
h
(
'op'
,
{
attrs
:
{
oprate
:
'edit'
},
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
)
}
},
'编辑'
),
h
(
'op'
,
{
attrs
:
{
oprate
:
'delete'
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
}
},
'删除'
)
]
return
h
(
'div'
,
{
class
:
'action'
},
actions
)
}
}
]
}
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
'loadDictionary'
)
// 加载数据字典
},
mounted
()
{
this
.
init
()
},
methods
:
{
init
()
{
Api
.
getpaged
().
then
((
r
)
=>
{
this
.
treeData
=
this
.
$u
.
toTree
(
r
.
result
.
items
,
0
,
undefined
,
"parent_Id"
);
})
},
addOk
()
{
this
.
init
()
this
.
addModal
=
false
this
.
editModal
=
false
this
.
addrowModal
=
false
},
add
()
{
this
.
addModal
=
true
this
.
aId
=
-
1
},
addrow
(
row
){
this
.
addrowModal
=
true
this
.
rowdata
=
row
},
edit
(
row
)
{
this
.
editModal
=
true
;
this
.
rowData
=
row
;
},
remove
(
id
)
{
this
.
editModal
=
false
;
this
.
deletelModal
=
true
Api
.
delete
({
id
:
id
}).
then
((
res
)
=>
{
if
(
res
.
result
==
1
)
{
this
.
init
()
//刷新列表:
this
.
$Message
.
info
(
'删除成功!'
)
}
else
if
(
res
.
result
==
2
)
{
this
.
$Message
.
info
(
'删除失败,找不到数据!'
)
}
else
if
(
res
.
result
==
3
)
{
this
.
$Message
.
info
(
'删除失败,该组织下有子节点!'
)
}
else
{
this
.
$Message
.
info
(
'删除失败!'
)
}
})
},
removeCancel
()
{
this
.
deletelModal
=
false
},
cancel
()
{
this
.
addModal
=
false
this
.
addrowModal
=
false
this
.
editModal
=
false
this
.
deletedlModal
=
false
},
l
(
key
)
{
let
vkey
=
'DipartLocation'
+
'.'
+
key
return
this
.
$t
(
vkey
)
||
key
}
}
}
</
script
>
<
style
lang=
"less"
>
</
style
>
\ No newline at end of file
pages/basicData/menu/add.vue
deleted
100644 → 0
View file @
6ceaea37
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"100"
>
<Row
class=
"rowTitle100"
>
<Col
:span=
"24"
>
<FormItem
:label=
"l('name')"
prop=
"name"
>
<Input
v-model=
"entity.name"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('upTitle')"
prop=
"upId"
>
<!--
<InputNumber
v-model=
"entity.upId"
></InputNumber>
-->
<span
v-html=
"v.name"
></span>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('type')"
prop=
"type"
>
<Dictionary
code=
"mes_xingchi_system.menu.type"
:disabled=
"true"
v-model=
"entity.type"
type=
"radio"
></Dictionary>
<!-- -->
</FormItem>
</Col>
<Col
:span=
"24"
>
<FormItem
:label=
"l('url')"
prop=
"url"
>
<Input
v-model=
"entity.url"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('icon')"
prop=
"icon"
>
<InputIcon
v-model=
"entity.icon"
></InputIcon>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('target')"
prop=
"target"
>
<Dictionary
code=
"mes_xingchi_system.menu.target"
v-model=
"entity.target"
type=
"radio"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('status')"
prop=
"status"
>
<Dictionary
code=
"mes_xingchi_system.menu.status"
v-model=
"entity.status"
type=
"radio"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('source')"
prop=
"source"
>
<Dictionary
code=
"mes_xingchi_system.menu.source"
type=
"radio"
disabled
v-model=
"entity.source"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"6"
>
<FormItem
:label=
"l('code')"
prop=
"code"
>
<Input
v-model=
"entity.code"
></Input>
</FormItem>
</Col>
<Col
:span=
"6"
>
<FormItem
:label=
"l('app')"
prop=
"app"
>
<Input
v-model=
"entity.app"
:disabled=
"entity.upId!=0"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('priority')"
prop=
"priority"
>
<InputNumber
v-model=
"entity.priority"
></InputNumber>
</FormItem>
</Col>
<Col
:span=
"24"
>
<FormItem
:label=
"l('description')"
prop=
"description"
>
<Input
v-model=
"entity.description"
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>
</
template
>
<
script
>
import
Api
from
'./api'
export
default
{
name
:
'Add'
,
data
()
{
return
{
disabled
:
false
,
entity
:
{
id
:
0
,
name
:
''
,
upId
:
0
,
type
:
1
,
code
:
''
,
icon
:
''
,
target
:
0
,
url
:
''
,
status
:
1
,
description
:
''
,
source
:
0
,
app
:
''
,
priority
:
0
},
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
)
=>
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
'保存成功'
)
this
.
$emit
(
'on-ok'
)
this
.
disabled
=
false
this
.
$refs
.
form
.
resetFields
()
}
else
{
this
.
$Message
.
error
(
'保存失败'
)
this
.
disabled
=
false
}
})
.
catch
((
err
)
=>
{
this
.
disabled
=
false
this
.
$Message
.
error
(
'保存失败'
)
console
.
warn
(
err
)
})
}
})
},
handleClose
()
{
this
.
$emit
(
'on-close'
)
},
l
(
key
)
{
key
=
'menu'
+
'.'
+
key
return
this
.
$t
(
key
)
}
},
watch
:
{
v
(
val
)
{
// console.log(JSON.stringify(this.$u.clone(this.v)));
console
.
log
(
this
.
v
)
this
.
entity
.
upId
=
this
.
v
.
id
this
.
entity
.
type
=
this
.
v
.
type
+
1
this
.
entity
.
app
=
this
.
v
.
app
}
}
}
</
script
>
\ No newline at end of file
pages/basicData/menu/addApi.vue
deleted
100644 → 0
View file @
6ceaea37
<
template
>
<div>
<DataGrid
:columns=
"columns"
:action=
"index"
border
:height=
"400"
:conditions=
"conditions"
@
on-selection-change=
"selectionChange"
:set=
"false"
:high=
"false"
></DataGrid>
<div>
<Button
v-if=
"items.length>0"
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</div>
</div>
</
template
>
<
script
>
import
Api
from
'./api'
export
default
{
name
:
'Add'
,
data
()
{
return
{
index
:
Api
.
method
,
disabled
:
false
,
list
:
[],
controller
:
null
,
keys
:
""
,
apis
:
[],
items
:[],
services
:[],
conditions
:
{
keys
:
{
op
:
'url'
,
value
:
null
,
default
:
true
},
// level:{op:'GreaterThan',value:-1}
},
entity
:
{},
columns
:
[
// { key: 'id', title: this.l('id'), hide: true, align: 'left' },
{
type
:
"selection"
,
width
:
60
},
{
key
:
'title'
,
title
:
this
.
l
(
'title'
),
width
:
200
,
align
:
'left'
,
high
:
true
}
,
{
key
:
'httpMethod'
,
title
:
this
.
l
(
'httpMethod'
),
width
:
100
,
align
:
'left'
,
high
:
true
},
{
key
:
'url'
,
title
:
this
.
l
(
'url'
),
width
:
350
,
align
:
'left'
,
easy
:
true
,
high
:
true
},
{
key
:
'methodDescription'
,
title
:
this
.
l
(
'methodDescription'
),
align
:
'left'
,
tooltip
:
true
,
high
:
true
},
// {
// key: 'service',
// title: this.l('service'),
// width: 150,
// align: 'left',
// easy: true,
// high: true
// },
// {
// key: 'controller',
// title: this.l('controller'),
// width: 150,
// align: 'left',
// easy: true,
// high: true
// },
// {
// key: 'level',
// title: this.l('level'),
// width: 80,
// align: 'left',
// high: true
// },
// {
// key: 'creatorUserId',
// title: this.l('creatorUserId'),
// hide: true,
// align: 'left'
// },
// {
// key: 'creationTime',
// title: this.l('creationTime'),
// align: 'left',
// width: 180,
// high: true
// }
]
}
},
props
:
{
v
:
Object
},
methods
:
{
groupBy
(
array
,
f
)
{
// debugger;
const
groups
=
{}
array
.
forEach
(
function
(
o
)
{
const
group
=
JSON
.
stringify
(
f
(
o
))
groups
[
group
]
=
groups
[
group
]
||
[]
groups
[
group
].
push
(
o
)
})
return
Object
.
keys
(
groups
).
map
(
function
(
group
)
{
return
groups
[
group
]
})
},
getService
()
{
let
map
=
[];
this
.
list
.
forEach
((
u
)
=>
{
if
(
map
.
indexOf
(
u
.
service
)
==-
1
){
map
.
push
(
u
.
service
);
}
})
return
map
},
getControllers
(
service
){
var
items
=
[];
var
apis
=
this
.
list
.
filter
(
u
=>
{
return
u
.
service
==
service
});
apis
.
forEach
(
u
=>
{
if
(
!
items
.
some
(
li
=>
{
return
li
.
controller
==
u
.
controller
}))
{
items
.
push
(
u
);
}
})
return
items
;
},
search
(){
if
(
this
.
controller
){
this
.
keys
=
this
.
controller
;
}
this
.
apis
=
this
.
list
.
filter
(
u
=>
{
return
u
.
url
.
toLowerCase
().
indexOf
(
this
.
keys
.
toLowerCase
())
>-
1
;
})
},
handleSubmit
(){
let
apis
=
[];
this
.
items
.
map
((
u
,
i
)
=>
{
var
api
=
{
upId
:
this
.
v
.
id
,
url
:
u
.
url
,
priority
:
i
,
name
:
u
.
title
|
u
.
methodDescription
,
type
:
4
,
target
:
0
,
status
:
1
,
source
:
2
,
app
:
this
.
v
.
app
,
methodId
:
u
.
id
}
apis
.
push
(
api
);
})
Api
.
addApis
(
apis
).
then
(
r
=>
{
if
(
r
.
result
){
this
.
$Message
.
success
(
"接口添加成功!"
)
this
.
$emit
(
'on-ok'
)
}
})
},
handleClose
(){
this
.
$emit
(
'on-close'
)
},
selectionChange
(
items
){
console
.
log
(
items
);
this
.
items
=
items
;
},
l
(
key
)
{
key
=
'method'
+
'.'
+
key
return
this
.
$t
(
key
)
}
},
computed
:
{
},
watch
:
{
v
(
val
)
{
console
.
log
(
this
.
v
)
// this.entity = v
// this.loadApi()
}
}
}
</
script
>
\ No newline at end of file
pages/basicData/menu/api.js
deleted
100644 → 0
View file @
6ceaea37
import
Api
from
'@/plugins/request'
export
default
{
index
:
`
${
systemUrl
}
/menu/paged`
,
method
:
`
${
systemUrl
}
/method/paged`
,
paged
(
params
)
{
return
Api
.
post
(
`
${
systemUrl
}
/menu/paged`
,
params
);
},
get
(
params
)
{
return
Api
.
get
(
`
${
systemUrl
}
/menu/get`
,
params
);
},
getSystem
()
{
var
params
=
{
"pageSize"
:
2000
,
"conditions"
:[{
"fieldName"
:
"Type"
,
"fieldValue"
:
"0"
,
"conditionalType"
:
"Equal"
}]}
return
Api
.
post
(
`
${
systemUrl
}
/menu/list`
,
params
);
},
getApi
(
params
)
{
// var params={"pageSize":2000,"conditions":[{"fieldName":"Level","fieldValue":"-1","conditionalType":"Than"}]}
return
Api
.
post
(
`
${
systemUrl
}
/method/list`
,
params
);
},
getTree
()
{
var
params
=
{
"pageSize"
:
2000
,
"sortBy"
:
"Priority"
,
"isDesc"
:
false
,
"conditions"
:[{
"fieldName"
:
"Type"
,
"fieldValue"
:
"3"
,
"conditionalType"
:
"LessThan"
}]}
return
Api
.
post
(
`
${
systemUrl
}
/menu/getTree`
,
params
);
},
importRouters
(
params
)
{
return
Api
.
post
(
`
${
systemUrl
}
/menu/import`
,
params
);
},
create
(
params
)
{
return
Api
.
post
(
`
${
systemUrl
}
/menu/create`
,
params
);
},
addApis
(
params
)
{
return
Api
.
post
(
`
${
systemUrl
}
/menu/addApis`
,
params
);
},
update
(
params
)
{
return
Api
.
post
(
`
${
systemUrl
}
/menu/update`
,
params
);
},
//删除:
delete
(
params
)
{
return
Api
.
delete
(
`
${
systemUrl
}
/menu/delete`
,
{
params
:
params
});
},
}
\ No newline at end of file
pages/basicData/menu/detail.vue
deleted
100644 → 0
View file @
6ceaea37
<
template
>
<div
class=
"detail"
>
<Row>
<Filed
:span=
"12"
:name=
"l('name')"
>
{{
entity
.
name
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('upId')"
>
{{
entity
.
upId
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('type')"
>
{{
entity
.
type
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('code')"
>
{{
entity
.
code
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('icon')"
>
{{
entity
.
icon
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('target')"
>
{{
entity
.
target
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('url')"
>
{{
entity
.
url
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('status')"
>
{{
entity
.
status
}}
</Filed>
<Filed
:span=
"24"
:name=
"l('description')"
>
{{
entity
.
description
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('source')"
>
{{
entity
.
source
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('app')"
>
{{
entity
.
app
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('priority')"
>
{{
entity
.
priority
}}
</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
=
"menu"
+
"."
+
key
;
return
this
.
$t
(
key
)
}
},
watch
:
{
eid
(
v
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
);
}
}
}
}
</
script
>
\ No newline at end of file
pages/basicData/menu/edit.vue
deleted
100644 → 0
View file @
6ceaea37
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"100"
>
<Row
class=
"rowTitle100"
>
<Col
:span=
"24"
>
<FormItem
:label=
"l('name')"
prop=
"name"
>
<Input
v-model=
"entity.name"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('type')"
prop=
"type"
>
<Dictionary
code=
"mes_xingchi_system.menu.type"
v-model=
"entity.type"
type=
"radio"
></Dictionary>
<!-- -->
</FormItem>
</Col>
<Col
:span=
"24"
>
<FormItem
:label=
"l('url')"
prop=
"url"
>
<Input
v-model=
"entity.url"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('icon')"
prop=
"icon"
>
<InputIcon
v-model=
"entity.icon"
></InputIcon>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('target')"
prop=
"target"
>
<Dictionary
code=
"mes_xingchi_system.menu.target"
v-model=
"entity.target"
type=
"radio"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('status')"
prop=
"status"
>
<Dictionary
code=
"mes_xingchi_system.menu.status"
v-model=
"entity.status"
type=
"radio"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('source')"
prop=
"source"
>
<Dictionary
code=
"mes_xingchi_system.menu.source"
type=
"radio"
disabled
v-model=
"entity.source"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"6"
>
<FormItem
:label=
"l('code')"
prop=
"code"
>
<Input
v-model=
"entity.code"
></Input>
</FormItem>
</Col>
<Col
:span=
"6"
>
<FormItem
:label=
"l('app')"
prop=
"app"
>
<Input
v-model=
"entity.app"
:disabled=
"entity.upId!=0"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('priority')"
prop=
"priority"
>
<InputNumber
v-model=
"entity.priority"
></InputNumber>
</FormItem>
</Col>
<Col
:span=
"24"
>
<FormItem
:label=
"l('description')"
prop=
"description"
>
<Input
v-model=
"entity.description"
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>
</
template
>
<
script
>
import
Api
from
'./api'
export
default
{
name
:
'Edit'
,
data
()
{
return
{
disabled
:
false
,
entity
:
{
color
:
''
},
rules
:
{
name
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}]
}
}
},
props
:
{
eid
:
Number
,
v
:
Object
},
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
)
=>
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
'保存成功'
)
this
.
$emit
(
'on-ok'
)
this
.
disabled
=
false
this
.
$refs
.
form
.
resetFields
()
}
else
{
this
.
$Message
.
error
(
'保存失败'
)
this
.
disabled
=
false
}
})
.
catch
((
err
)
=>
{
this
.
disabled
=
false
this
.
$Message
.
error
(
'保存失败'
)
console
.
warn
(
err
)
})
}
})
},
handleClose
()
{
this
.
$emit
(
'on-close'
)
},
l
(
key
)
{
key
=
'menu'
+
'.'
+
key
return
this
.
$t
(
key
)
}
},
watch
:
{
eid
(
v
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
)
}
}
}
}
</
script
>
\ No newline at end of file
pages/basicData/menu/index.vue
deleted
100644 → 0
View file @
6ceaea37
<
template
>
<div>
<TreeGrid
:columns=
"columns"
ref=
"grid"
:items=
"list"
>
<template
slot=
"buttons"
>
<Button
type=
"primary"
@
click=
"add()"
>
新增系统
</Button>
<!--
<Button
type=
"primary"
@
click=
"importModal=true"
>
导入菜单
</Button>
-->
</
template
>
</TreeGrid>
<Modal
v-model=
"addModal"
title=
"新增"
width=
"1000"
footer-hide
>
<Add
@
on-close=
"cancel"
:v=
"curModel"
@
on-ok=
"addOk"
/>
</Modal>
<Modal
v-model=
"apiModal"
title=
"设置接口"
width=
"1000"
footer-hide
>
<AddApi
@
on-close=
"cancel"
:v=
"curModel"
@
on-ok=
"apiOk"
/>
</Modal>
<Modal
v-model=
"editModal"
title=
"编辑"
width=
"1000"
footer-hide
>
<Edit
:eid=
"curId"
:v=
"curModel"
@
on-close=
"cancel"
@
on-ok=
"addOk"
/>
</Modal>
<Modal
v-model=
"detailModal"
title=
"详情"
>
<Detail
:eid=
"curId"
/>
</Modal>
<Modal
v-model=
"importModal"
title=
"导入系统菜单"
width=
"800"
@
on-ok=
"importOk"
>
<h1
v-if=
"systemList.length==0"
>
请先创建系统
</h1>
<div
v-else
>
<Select
placeholder=
"请选择系统"
v-model=
"systemId"
:data=
"systemList"
>
<Option
v-for=
"(li,i) in systemList"
:value=
"li.id"
:key=
"li.id"
>
{{li.name}}
</Option>
</Select>
<!-- <div class="h400">
<json-viewer :value="systemRouters" :expand-depth="5"></json-viewer>
</div> -->
</div>
</Modal>
</div>
</template>
<
script
>
import
Api
from
'./api'
import
Add
from
'./add'
import
AddApi
from
'./addApi'
import
Edit
from
'./edit'
import
Detail
from
'./detail'
import
Search
from
'./search'
// import { appRouter } from '@/router/router.js'
import
JsonViewer
from
'vue-json-viewer'
export
default
{
name
:
'list'
,
components
:
{
Add
,
AddApi
,
Edit
,
Detail
,
Search
,
JsonViewer
},
data
()
{
return
{
action
:
Api
.
index
,
easySearch
:
{
keys
:
{
op
:
'name,code,icon,url,description,app'
,
value
:
null
}
},
curModel
:
{
id
:
0
,
type
:
0
,
name
:
'根级'
},
testModal
:
true
,
addModal
:
false
,
apiModal
:
false
,
editModal
:
false
,
detailModal
:
false
,
deletelModal
:
false
,
importModal
:
false
,
systemId
:
0
,
systemList
:
[],
list
:
[],
// systemRouters: appRouter,
curId
:
0
,
columns
:
[
{
key
:
'name'
,
title
:
this
.
l
(
'name'
),
align
:
'left'
,
easy
:
true
,
high
:
true
},
// { key: 'upId', title: this.l('upId'), align: 'left', high: true ,hide:true},
{
key
:
'type'
,
width
:
60
,
title
:
this
.
l
(
'type'
),
align
:
'center'
,
high
:
true
,
code
:
'mes_xingchi_system.menu.type'
},
{
key
:
'code'
,
title
:
this
.
l
(
'code'
),
align
:
'left'
,
easy
:
true
,
high
:
true
},
{
key
:
'icon'
,
title
:
this
.
l
(
'icon'
),
align
:
'center'
,
type
:
'icons'
,
easy
:
true
,
high
:
true
},
{
key
:
'target'
,
title
:
this
.
l
(
'target'
),
align
:
'center'
,
high
:
true
,
code
:
'mes_xingchi_system.menu.target'
},
{
key
:
'url'
,
title
:
this
.
l
(
'url'
),
align
:
'left'
,
easy
:
true
,
high
:
true
},
{
key
:
'status'
,
title
:
this
.
l
(
'status'
),
align
:
'center'
,
high
:
true
,
code
:
'mes_xingchi_system.menu.status'
},
{
key
:
'description'
,
title
:
this
.
l
(
'description'
),
align
:
'left'
,
easy
:
true
,
high
:
true
},
{
key
:
'source'
,
title
:
this
.
l
(
'source'
),
align
:
'left'
,
high
:
true
,
code
:
'mes_xingchi_system.menu.source'
},
{
key
:
'app'
,
title
:
this
.
l
(
'app'
),
align
:
'left'
,
easy
:
true
,
high
:
true
},
{
key
:
'priority'
,
title
:
this
.
l
(
'priority'
),
align
:
'left'
,
high
:
true
},
{
title
:
'操作'
,
key
:
'id'
,
width
:
120
,
align
:
'center'
,
render
:
(
h
,
params
)
=>
{
return
h
(
'div'
,
{
class
:
'action'
},
[
h
(
'op'
,
{
attrs
:
{
oprate
:
'add'
},
on
:
{
click
:
()
=>
this
.
add
(
params
.
row
)
}
},
'新增'
),
h
(
'op'
,
{
attrs
:
{
oprate
:
'edit'
},
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
)
}
},
'编辑'
),
h
(
'op'
,
{
attrs
:
{
oprate
:
'delete'
},
on
:
{
click
:
()
=>
this
.
removeOk
(
params
.
row
)
}
},
'删除'
)
])
}
}
]
}
},
mounted
()
{
this
.
init
()
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
'loadDictionary'
)
// 加载数据字典
},
methods
:
{
init
()
{
Api
.
getSystem
().
then
((
r
)
=>
{
this
.
systemList
=
r
.
result
})
Api
.
getTree
().
then
((
r
)
=>
{
this
.
list
=
r
.
result
})
},
add
(
row
)
{
if
(
row
)
{
if
(
row
.
type
==
2
)
{
this
.
apiModal
=
true
this
.
curModel
=
{
id
:
row
.
id
,
name
:
row
.
name
,
type
:
row
.
type
,
app
:
row
.
app
}
return
}
else
{
this
.
addModal
=
true
this
.
curModel
=
{
id
:
row
.
id
,
name
:
row
.
name
,
type
:
row
.
type
,
app
:
row
.
app
}
}
}
else
{
this
.
addModal
=
true
this
.
curModel
=
{
id
:
0
,
name
:
'根级'
,
type
:
-
1
,
app
:
''
}
}
},
addOk
()
{
this
.
init
()
this
.
addModal
=
false
this
.
detailModal
=
false
this
.
editModal
=
false
this
.
curId
=
0
},
apiOk
()
{
this
.
apiModal
=
false
this
.
init
()
},
importMenu
()
{
this
.
importModal
=
true
},
importOk
()
{
Api
.
importRouters
({
id
:
this
.
systemId
,
routers
:
appRouter
}).
then
((
r
)
=>
{
console
.
warn
(
r
)
this
.
importModal
=
false
})
},
search
()
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
)
},
detail
(
id
)
{
this
.
detailModal
=
true
this
.
curId
=
id
},
edit
(
row
)
{
this
.
editModal
=
true
this
.
curId
=
row
.
id
this
.
curModel
=
row
},
remove
(
id
)
{
this
.
deletelModal
=
true
this
.
curId
=
id
},
removeOk
(
row
)
{
Api
.
delete
({
id
:
row
.
id
}).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
init
()
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
)
{
/*
menu:{
id:'',
creationTime:'',
creatorUserId:'',
lastModificationTime:'',
lastModifierUserId:'',
isDeleted:'',
deletionTime:'',
deleterUserId:'',
name:'名称',
upId:'父级',
type:'类型',
code:'编码',
icon:'图标',
target:'打开方式',
url:'地址',
status:'显示',
description:'备注',
source:'来源',
app:'系统',
priority:'排序',
}
*/
let
vkey
=
'menu'
+
'.'
+
key
return
this
.
$t
(
vkey
)
||
key
}
}
}
</
script
>
<
style
lang=
"less"
>
</
style
>
\ No newline at end of file
pages/basicData/menu/search.vue
deleted
100644 → 0
View file @
6ceaea37
<
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.name.show"
><FormItem
:label=
"l('name')"
prop=
"name"
>
<Input
v-model=
"condition.name.value"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.upId.show"
><FormItem
:label=
"l('upId')"
prop=
"upId"
>
<Input
v-model=
"condition.upId.value"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.type.show"
><FormItem
:label=
"l('type')"
prop=
"type"
>
<Dictionary
code=
"mes_xingchi_system.menu.type"
v-model=
"condition.type.value"
></Dictionary>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.code.show"
><FormItem
:label=
"l('code')"
prop=
"code"
>
<Input
v-model=
"condition.code.value"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.icon.show"
><FormItem
:label=
"l('icon')"
prop=
"icon"
>
<Input
v-model=
"condition.icon.value"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.target.show"
><FormItem
:label=
"l('target')"
prop=
"target"
>
<Dictionary
code=
"mes_xingchi_system.menu.target"
v-model=
"condition.target.value"
></Dictionary>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.url.show"
><FormItem
:label=
"l('url')"
prop=
"url"
>
<Input
v-model=
"condition.url.value"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.status.show"
><FormItem
:label=
"l('status')"
prop=
"status"
>
<Dictionary
code=
"mes_xingchi_system.menu.status"
v-model=
"condition.status.value"
></Dictionary>
</FormItem></Col>
<Col
:span=
"24"
:v-if=
"condition.description.show"
><FormItem
:label=
"l('description')"
prop=
"description"
>
<Input
v-model=
"condition.description.value"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.source.show"
><FormItem
:label=
"l('source')"
prop=
"source"
>
<Dictionary
code=
"mes_xingchi_system.menu.source"
v-model=
"condition.source.value"
></Dictionary>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.app.show"
><FormItem
:label=
"l('app')"
prop=
"app"
>
<Input
v-model=
"condition.app.value"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.priority.show"
><FormItem
:label=
"l('priority')"
prop=
"priority"
>
<Input
v-model=
"condition.priority.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
},
name
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
upId
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
type
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
code
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
icon
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
target
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
url
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
status
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
description
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
source
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
app
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
priority
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
},
}
},
methods
:
{
handleClose
()
{
this
.
$emit
(
'on-close'
)
},
l
(
key
)
{
key
=
"menu"
+
"."
+
key
;
return
this
.
$t
(
key
)
}
}
}
</
script
>
\ No newline at end of file
pages/basicData/method/add.vue
deleted
100644 → 0
View file @
6ceaea37
<
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=
"12"
><FormItem
:label=
"l('httpMethod')"
prop=
"httpMethod"
>
<Input
v-model=
"entity.httpMethod"
>
</Input>
</FormItem></Col>
<Col
:span=
"24"
><FormItem
:label=
"l('url')"
prop=
"url"
>
<Input
v-model=
"entity.url"
>
</Input>
</FormItem></Col>
<Col
:span=
"24"
><FormItem
:label=
"l('methodDescription')"
>
<Input
v-model=
"entity.methodDescription"
prop=
"methodDescription"
type=
"textarea"
:rows=
"5"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('service')"
prop=
"service"
>
<Input
v-model=
"entity.service"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('serviceDescription')"
prop=
"serviceDescription"
>
<Input
v-model=
"entity.serviceDescription"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('controller')"
prop=
"controller"
>
<Input
v-model=
"entity.controller"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('controllerDescription')"
prop=
"controllerDescription"
>
<Input
v-model=
"entity.controllerDescription"
></Input>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('level')"
prop=
"level"
>
<Dictionary
v-model=
"entity.level"
code=
"system.method.level"
type=
"radio"
></Dictionary>
</FormItem></Col>
<!--
<Col
:span=
"12"
><FormItem
:label=
"l('creationTime')"
prop=
"creationTime"
>
<DatePicker
type=
"date"
v-model=
"entity.creationTime"
></DatePicker>
</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
:
{
title
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}],
url
:
[{
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
=
"method"
+
"."
+
key
;
return
this
.
$t
(
key
)
}
},
watch
:
{
v
()
{
this
.
entity
=
this
.
$u
.
clone
(
this
.
v
)
}
}
}
</
script
>
\ No newline at end of file
pages/basicData/method/api.js
deleted
100644 → 0
View file @
6ceaea37
import
Api
from
'@/plugins/request'
export
default
{
index
:
`
${
systemUrl
}
/method/paged`
,
paged
(
params
){
return
Api
.
post
(
`
${
systemUrl
}
/method/paged`
,
params
);
},
get
(
params
){
return
Api
.
get
(
`
${
systemUrl
}
/method/get`
,
params
);
},
create
(
params
){
return
Api
.
post
(
`
${
systemUrl
}
/method/create`
,
params
);
},
update
(
params
){
return
Api
.
post
(
`
${
systemUrl
}
/method/update`
,
params
);
},
//删除:
delete
(
params
)
{
return
Api
.
delete
(
`
${
systemUrl
}
/method/delete`
,{
params
:
params
});
},
}
\ No newline at end of file
pages/basicData/method/detail.vue
deleted
100644 → 0
View file @
6ceaea37
<
template
>
<div
class=
"detail"
>
<Row>
<Filed
:span=
"12"
:name=
"l('methodDescription')"
>
{{
entity
.
methodDescription
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('controller')"
>
{{
entity
.
controller
}}
</Filed>
<Filed
:span=
"24"
:name=
"l('controllerDescription')"
>
{{
entity
.
controllerDescription
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('service')"
>
{{
entity
.
service
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('serviceDescription')"
>
{{
entity
.
serviceDescription
}}
</Filed>
<Filed
:span=
"24"
:name=
"l('url')"
>
{{
entity
.
url
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('httpMethod')"
>
{{
entity
.
httpMethod
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('level')"
>
{{
entity
.
level
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('creationTime')"
>
{{
entity
.
creationTime
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('creatorUserId')"
><User
:value=
"entity.creatorUserId"
/></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
=
"method"
+
"."
+
key
;
return
this
.
$t
(
key
)
}
},
watch
:
{
eid
(
v
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
);
}
}
}
}
</
script
>
\ No newline at end of file
pages/basicData/method/edit.vue
deleted
100644 → 0
View file @
6ceaea37
<
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=
"12"
><FormItem
:label=
"l('httpMethod')"
prop=
"httpMethod"
>
<Input
v-model=
"entity.httpMethod"
>
</Input>
</FormItem></Col>
<Col
:span=
"24"
><FormItem
:label=
"l('url')"
prop=
"url"
>
<Input
v-model=
"entity.url"
>
</Input>
</FormItem></Col>
<Col
:span=
"24"
><FormItem
:label=
"l('methodDescription')"
>
<Input
v-model=
"entity.methodDescription"
prop=
"methodDescription"
type=
"textarea"
:rows=
"5"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('service')"
prop=
"service"
>
<Input
v-model=
"entity.service"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('serviceDescription')"
prop=
"serviceDescription"
>
<Input
v-model=
"entity.serviceDescription"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('controller')"
prop=
"controller"
>
<Input
v-model=
"entity.controller"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('controllerDescription')"
prop=
"controllerDescription"
>
<Input
v-model=
"entity.controllerDescription"
></Input>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('level')"
prop=
"level"
>
<Dictionary
v-model=
"entity.level"
code=
"system.method.level"
type=
"radio"
></Dictionary>
</FormItem></Col>
<!--
<Col
:span=
"12"
><FormItem
:label=
"l('creationTime')"
prop=
"creationTime"
>
<DatePicker
type=
"date"
v-model=
"entity.creationTime"
></DatePicker>
</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
:
{
title
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}],
url
:
[{
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
=
"method"
+
"."
+
key
;
return
this
.
$t
(
key
)
}
},
watch
:
{
eid
(
v
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
);
}
}
}
}
</
script
>
\ No newline at end of file
pages/basicData/method/index.vue
deleted
100644 → 0
View file @
6ceaea37
<
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"
class=
"w300"
/>
</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
width=
"1000"
>
<Add
@
on-close=
"cancel"
@
on-ok=
"addOk"
/>
</Modal>
<Modal
v-model=
"editModal"
title=
"编辑"
footer-hide
width=
"1000"
>
<Edit
:eid=
"curId"
@
on-close=
"cancel"
@
on-ok=
"addOk"
/>
</Modal>
<Modal
v-model=
"detailModal"
title=
"详情"
width=
"1000"
>
<Detail
:eid=
"curId"
/>
</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
:
'controller,service,url'
,
value
:
null
}
},
addModal
:
false
,
editModal
:
false
,
detailModal
:
false
,
deletelModal
:
false
,
curId
:
0
,
columns
:
[
{
key
:
'id'
,
title
:
this
.
l
(
'id'
),
hide
:
true
,
align
:
'left'
},
{
key
:
'title'
,
title
:
this
.
l
(
'title'
),
width
:
200
,
align
:
'left'
,
high
:
true
},
{
key
:
'httpMethod'
,
title
:
this
.
l
(
'httpMethod'
),
width
:
100
,
align
:
'left'
,
high
:
true
},
{
key
:
'url'
,
title
:
this
.
l
(
'url'
),
width
:
350
,
align
:
'left'
,
easy
:
true
,
high
:
true
},
{
key
:
'methodDescription'
,
title
:
this
.
l
(
'methodDescription'
),
align
:
'left'
,
high
:
true
},
{
key
:
'service'
,
title
:
this
.
l
(
'service'
),
width
:
180
,
align
:
'left'
,
easy
:
true
,
high
:
true
},
{
key
:
'controller'
,
title
:
this
.
l
(
'controller'
),
width
:
240
,
align
:
'left'
,
easy
:
true
,
high
:
true
},
{
key
:
'controllerDescription'
,
title
:
this
.
l
(
'controllerDescription'
),
hide
:
true
,
align
:
'left'
,
high
:
true
},
{
key
:
'serviceDescription'
,
title
:
this
.
l
(
'serviceDescription'
),
align
:
'left'
,
hide
:
true
,
high
:
true
},
{
key
:
'level'
,
title
:
this
.
l
(
'level'
),
width
:
80
,
code
:
"system.method.level"
,
align
:
'left'
,
high
:
true
},
{
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
:
'creationTime'
,
title
:
this
.
l
(
'creationTime'
),
align
:
'left'
,
width
:
180
,
high
:
true
},
{
title
:
'操作'
,
key
:
'id'
,
width
:
160
,
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
:
'delete'
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
}
},
'删除'
)
])
}
}
]
}
},
mounted
()
{
},
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
)
{
/*
method:{
id:'',
methodDescription:'方法描述',
controller:'控制器',
controllerDescription:'控制器的描述',
service:'服务',
serviceDescription:'服务描述',
url:'地址',
httpMethod:'方法',
level:'级别',
creatorUserId:'',
lastModificationTime:'',
lastModifierUserId:'',
isDeleted:'',
deletionTime:'',
deleterUserId:'',
creationTime:'',
creationTime:'',
}
*/
let
vkey
=
'method'
+
'.'
+
key
return
this
.
$t
(
vkey
)
||
key
}
}
}
</
script
>
<
style
lang=
"less"
>
</
style
>
\ No newline at end of file
pages/basicData/method/search.vue
deleted
100644 → 0
View file @
6ceaea37
<
template
>
<Form
ref=
"form"
:model=
"condition"
:label-width=
"80"
>
<Row
class=
"rowTitle80"
>
<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.methodDescription.show"
><FormItem
:label=
"l('methodDescription')"
prop=
"methodDescription"
>
<Input
v-model=
"condition.methodDescription.value"
>
</Input>
</FormItem></Col>
-->
<Col
:span=
"12"
:v-if=
"condition.controller.show"
>
<FormItem
:label=
"l('controller')"
prop=
"controller"
>
<Input
v-model=
"condition.controller.value"
></Input>
</FormItem>
</Col>
<!--
<Col
:span=
"24"
:v-if=
"condition.controllerDescription.show"
><FormItem
:label=
"l('controllerDescription')"
prop=
"controllerDescription"
>
<Input
v-model=
"condition.controllerDescription.value"
>
</Input>
</FormItem></Col>
-->
<Col
:span=
"12"
:v-if=
"condition.service.show"
>
<FormItem
:label=
"l('service')"
prop=
"service"
>
<Input
v-model=
"condition.service.value"
></Input>
</FormItem>
</Col>
<!--
<Col
:span=
"12"
:v-if=
"condition.serviceDescription.show"
><FormItem
:label=
"l('serviceDescription')"
prop=
"serviceDescription"
>
<Input
v-model=
"condition.serviceDescription.value"
>
</Input>
</FormItem></Col>
-->
<Col
:span=
"12"
:v-if=
"condition.url.show"
>
<FormItem
:label=
"l('url')"
prop=
"url"
>
<Input
v-model=
"condition.url.value"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
:v-if=
"condition.httpMethod.show"
>
<FormItem
:label=
"l('httpMethod')"
prop=
"httpMethod"
>
<Input
v-model=
"condition.httpMethod.value"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
:v-if=
"condition.level.show"
>
<FormItem
:label=
"l('level')"
prop=
"level"
>
<Dictionary
v-model=
"condition.level.value"
code=
"system.method.level"
></Dictionary>
</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.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.creationTime.show"
><FormItem
:label=
"l('creationTime')"
prop=
"creationTime"
>
<DatePicker
type=
"daterange"
v-model=
"condition.creationTime.value"
></DatePicker>
</FormItem></Col>
-->
</Row>
</Form>
</
template
>
<
script
>
import
Api
from
'./api'
export
default
{
name
:
'Add'
,
data
()
{
return
{
condition
:
{
id
:
{
op
:
'Equal'
,
value
:
null
,
show
:
false
},
methodDescription
:
{
op
:
'Equal'
,
value
:
null
,
show
:
true
},
controller
:
{
op
:
'Equal'
,
value
:
null
,
show
:
true
},
controllerDescription
:
{
op
:
'Equal'
,
value
:
null
,
show
:
true
},
service
:
{
op
:
'Equal'
,
value
:
null
,
show
:
true
},
serviceDescription
:
{
op
:
'Equal'
,
value
:
null
,
show
:
true
},
url
:
{
op
:
'Equal'
,
value
:
null
,
show
:
true
},
httpMethod
:
{
op
:
'Equal'
,
value
:
null
,
show
:
true
},
level
:
{
op
:
'Equal'
,
value
:
null
,
show
:
true
},
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
},
creationTime
:
{
op
:
'Range'
,
value
:
null
,
show
:
true
},
creationTime
:
{
op
:
'Range'
,
value
:
null
,
show
:
false
}
}
}
},
methods
:
{
handleClose
()
{
this
.
$emit
(
'on-close'
)
},
l
(
key
)
{
key
=
'method'
+
'.'
+
key
return
this
.
$t
(
key
)
}
}
}
</
script
>
\ No newline at end of file
pages/basicData/user/add.vue
deleted
100644 → 0
View file @
6ceaea37
<
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=
"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
:
'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
},
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
)
{
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
,
//状态
tanantCode
:
this
.
$store
.
state
.
userInfo
.
tanantCode
//商户号
}
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/user/detail.vue
deleted
100644 → 0
View file @
6ceaea37
<
template
>
<div
class=
"addUser"
>
<Form
ref=
"form"
:model=
"entity"
:label-width=
"90"
>
<Row>
<Col
:span=
"12"
>
<FormItem
:label=
"l('userName')"
prop=
"userName"
>
{{
entity
.
userName
}}
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('cardNo')"
prop=
"cardNo"
>
{{
entity
.
cardNo
}}
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('gender')"
prop=
"gender"
>
<state
code=
"User.base.gender"
:value=
"entity.gender"
type=
"text"
></state>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('birthday')"
prop=
"birthday"
>
{{
entity
.
birthday
}}
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('degreeId')"
prop=
"degreeId"
>
<state
code=
"User.base.degree"
:value=
"entity.degreeId"
type=
"text"
></state>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('departmentTitle')"
prop=
"departmentTitle"
>
{{
entity
.
departmentTitle
}}
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('status')"
prop=
"status"
>
<state
code=
"User.base.status"
:value=
"entity.status"
type=
"text"
></state>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('phone')"
prop=
"phone"
>
{{
entity
.
phone
}}
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('email')"
prop=
"email"
>
{{
entity
.
email
}}
</FormItem>
</Col>
<!--
<Col
:span=
"12"
>
<FormItem
:label=
"l('enableEquip')"
prop=
"enableEquip"
>
{{
entity
.
enableEquip
}}
</FormItem>
</Col>
-->
<Col
:span=
"12"
>
<FormItem
:label=
"l('positionId')"
prop=
"positionId"
>
<state
code=
"User.base.position"
:value=
"entity.positionId"
type=
"text"
></state>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('titleId')"
prop=
"titleId"
>
<state
code=
"User.base.jobtitle"
:value=
"entity.titleId"
type=
"text"
></state>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('licensedToWork')"
prop=
"licensedToWork"
>
<state
code=
"User.base.workLicense"
:value=
"entity.licensedToWork"
type=
"text"
></state>
</FormItem>
</Col>
<Col
:span=
"24"
>
<FormItem
:label=
"l('remark')"
prop=
"remark"
>
{{
entity
.
remark
}}
</FormItem>
</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/user/edit.vue
deleted
100644 → 0
View file @
6ceaea37
<
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=
"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
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
(
'保存成功'
)
//账户同步操作start
if
(
this
.
entity
.
accountId
>
0
)
{
//账户已同步的情况下
let
parms2
=
{
accountId
:
this
.
entity
.
accountId
,
userId
:
this
.
entity
.
id
,
loginName
:
this
.
entity
.
phone
,
//用户电话
status
:
this
.
entity
.
status
,
tanantCode
:
this
.
$store
.
state
.
userInfo
.
tanantCode
//商户号
}
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
,
tanantCode
:
this
.
$store
.
state
.
userInfo
.
tanantCode
//商户号
}
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/user/index.vue
deleted
100644 → 0
View file @
6ceaea37
This diff is collapsed.
Click to expand it.
pages/basicData/user/search.vue
deleted
100644 → 0
View file @
6ceaea37
<
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/api.js
→
pages/basicData/user
Managent
/api.js
View file @
d9d6b1f3
File moved
pages/basicData/userManagent/userInfo.vue
View file @
d9d6b1f3
...
@@ -92,7 +92,7 @@
...
@@ -92,7 +92,7 @@
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
Api
from
".
./user
/api"
;
import
Api
from
"./api"
;
import
avatar
from
"@/assets/images/avatar.png"
;
import
avatar
from
"@/assets/images/avatar.png"
;
import
inputFiles
from
"@/components/page/inputFile.vue"
;
import
inputFiles
from
"@/components/page/inputFile.vue"
;
export
default
{
export
default
{
...
...
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