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
0507bb2a
Commit
0507bb2a
authored
Aug 12, 2020
by
kangzhenfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
saas--数据资源管理ok
parent
5cb32912
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
332 additions
and
183 deletions
+332
-183
zh-CN.js
i18n/locale/zh-CN.js
+5
-2
add.vue
pages/system/host/add.vue
+18
-0
api.js
pages/system/host/api.js
+8
-9
detail.vue
pages/system/host/detail.vue
+48
-47
edit.vue
pages/system/host/edit.vue
+19
-1
index.vue
pages/system/host/index.vue
+232
-123
config.js
static/config.js
+2
-1
No files found.
i18n/locale/zh-CN.js
View file @
0507bb2a
...
...
@@ -908,8 +908,11 @@ export default {
},
//多租户-服务器数据源
host
:
{
id
:
''
,
name
:
'数据源名称'
,
ip
:
'服务器地址'
,
name
:
'描述'
,
//'数据源名称',
os
:
"操作系统"
,
ip
:
'Ip'
,
//'服务器地址',
domain
:
"域名"
,
supportDatabaseType
:
"支持的数据库"
,
user
:
'用户名'
,
password
:
'密码'
,
port
:
'ssh端口'
,
...
...
pages/system/host/add.vue
View file @
0507bb2a
...
...
@@ -8,10 +8,25 @@
</Col>
</Row>
<Row>
<Col
:span=
"24"
>
<FormItem
:label=
"l('os')"
prop=
"os"
>
<Input
v-model=
"entity.os"
></Input>
</FormItem>
</Col>
<Col
:span=
"24"
>
<FormItem
:label=
"l('ip')"
prop=
"ip"
>
<Input
v-model=
"entity.ip"
></Input>
</FormItem>
</Col>
<Col
:span=
"24"
>
<FormItem
:label=
"l('domain')"
prop=
"domain"
>
<Input
v-model=
"entity.domain"
></Input>
</FormItem>
</Col>
<Col
:span=
"24"
>
<FormItem
:label=
"l('supportDatabaseType')"
prop=
"supportDatabaseType"
>
<Input
v-model=
"entity.supportDatabaseType"
></Input>
</FormItem>
</Col>
</Row>
<Row>
...
...
@@ -63,6 +78,9 @@ export default {
name
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}],
ip
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}],
user
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}],
os
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}],
domain
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}],
supportDatabaseType
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}],
password
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}]
}
}
...
...
pages/system/host/api.js
View file @
0507bb2a
import
Api
from
'@/plugins/request'
export
default
{
index
:
`
${
authUrl
}
/api/services/app/host/paged`
,
// index:`${authUrl}/api/services/app/host/paged`,
index
:
`
${
systemNew
}
api/services/app/host/paged`
,
//new
paged
(
params
){
return
Api
.
post
(
`
${
authUrl
}
/api/services/app/host/paged`
,
params
);
// return Api.post(`${authUrl}/api/services/app/host/paged`,params); systemNew
return
Api
.
post
(
`
${
systemNew
}
api/services/app/host/paged`
,
params
);
},
get
(
params
){
return
Api
.
get
(
`
${
authUrl
}
/api/services/app/host/get`
,
params
);
return
Api
.
get
(
`
${
systemNew
}
api/services/app/host/get`
,
params
);
},
create
(
params
){
return
Api
.
post
(
`
${
authUrl
}
/api/services/app/host/create`
,
params
);
return
Api
.
post
(
`
${
systemNew
}
api/services/app/host/create`
,
params
);
},
update
(
params
){
return
Api
.
post
(
`
${
authUrl
}
/
api/services/app/host/update`
,
params
);
return
Api
.
post
(
`
${
systemNew
}
api/services/app/host/update`
,
params
);
},
//删除:
delete
(
params
)
{
return
Api
.
delete
(
`
${
authUrl
}
/
api/services/app/host/delete`
,{
params
:
params
});
return
Api
.
delete
(
`
${
systemNew
}
api/services/app/host/delete`
,{
params
:
params
});
},
}
\ No newline at end of file
pages/system/host/detail.vue
View file @
0507bb2a
<
template
>
<div
class=
"detail"
>
<Row>
<Filed
:span=
"24"
:name=
"l('name')"
>
{{
entity
.
name
}}
</Filed>
<Filed
:span=
"24"
:name=
"l('ip')"
>
{{
entity
.
ip
}}
</Filed>
<Filed
:span=
"24"
:name=
"l('user')"
>
{{
entity
.
user
}}
</Filed>
<Filed
:span=
"24"
:name=
"l('password')"
>
{{
entity
.
password
}}
</Filed>
<Filed
:span=
"24"
:name=
"l('port')"
>
{{
entity
.
port
}}
</Filed>
<Filed
:span=
"24"
:name=
"l('name')"
>
{{
entity
.
name
}}
</Filed>
<Filed
:span=
"24"
:name=
"l('os')"
>
{{
entity
.
os
}}
</Filed>
<Filed
:span=
"24"
:name=
"l('ip')"
>
{{
entity
.
ip
}}
</Filed>
<Filed
:span=
"24"
:name=
"l('domain')"
>
{{
entity
.
domain
}}
</Filed>
<Filed
:span=
"24"
:name=
"l('supportDatabaseType')"
>
{{
entity
.
supportDatabaseType
}}
</Filed>
<Filed
:span=
"24"
:name=
"l('user')"
>
{{
entity
.
user
}}
</Filed>
<Filed
:span=
"24"
:name=
"l('password')"
>
{{
entity
.
password
}}
</Filed>
<Filed
:span=
"24"
:name=
"l('port')"
>
{{
entity
.
port
}}
</Filed>
</Row>
</div>
</
template
>
<
script
>
import
Api
from
'./api'
export
default
{
name
:
'Add'
,
import
Api
from
"./api"
;
export
default
{
name
:
"Add"
,
data
()
{
return
{
entity
:
{},
rules
:
{
name
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}],
code
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}]
}
}
//
rules: {
// name: [{ required: true, message: "必填", trigger: "blur"
}],
// code: [{ required: true, message: "必填", trigger: "blur"
}]
//
}
};
},
props
:
{
eid
:
Number
...
...
@@ -31,15 +32,15 @@
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
(
r
=>
{
this
.
entity
=
r
.
result
;
this
.
$emit
(
'on-load'
)
})
this
.
$emit
(
"on-load"
);
});
},
handleClose
()
{
this
.
$emit
(
'on-close'
)
this
.
$emit
(
"on-close"
);
},
l
(
key
)
{
key
=
"host"
+
"."
+
key
;
return
this
.
$t
(
key
)
return
this
.
$t
(
key
);
}
},
watch
:
{
...
...
@@ -49,5 +50,5 @@
}
}
}
}
};
</
script
>
\ No newline at end of file
pages/system/host/edit.vue
View file @
0507bb2a
...
...
@@ -6,11 +6,26 @@
<Input
v-model=
"entity.name"
></Input>
</FormItem>
</Col>
<Col
:span=
"24"
>
<FormItem
:label=
"l('os')"
prop=
"os"
>
<Input
v-model=
"entity.os"
></Input>
</FormItem>
</Col>
<Col
:span=
"24"
>
<FormItem
:label=
"l('ip')"
prop=
"ip"
>
<Input
v-model=
"entity.ip"
></Input>
</FormItem>
</Col>
<Col
:span=
"24"
>
<FormItem
:label=
"l('domain')"
prop=
"domain"
>
<Input
v-model=
"entity.domain"
></Input>
</FormItem>
</Col>
<Col
:span=
"24"
>
<FormItem
:label=
"l('supportDatabaseType')"
prop=
"supportDatabaseType"
>
<Input
v-model=
"entity.supportDatabaseType"
></Input>
</FormItem>
</Col>
<Col
:span=
"24"
>
<FormItem
:label=
"l('user')"
prop=
"user"
>
<Input
v-model=
"entity.user"
></Input>
...
...
@@ -43,8 +58,11 @@ export default {
entity
:
{
name
:
''
,
ip
:
''
,
user
:
''
,
password
:
''
,
port
:
22
,
id
:
0
},
rules
:
{
name
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}],
os
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}],
ip
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}],
user
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}],
domain
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}],
supportDatabaseType
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}],
password
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}]
}
}
...
...
pages/system/host/index.vue
View file @
0507bb2a
<
template
>
<div>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
><template
slot=
"easySearch"
><Form
ref=
"formInline"
:model=
"easySearch"
inline
><FormItem
prop=
"keys"
><Input
placeholder=
"请输入数据源/服务器/用户"
class=
"w200"
v-model=
"easySearch.keys.value"
/>
</FormItem>
<FormItem><Button
type=
"primary"
@
click=
"search"
>
查询
</Button></FormItem>
</Form></
template
>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
>
<template
slot=
"easySearch"
>
<Form
ref=
"formInline"
:model=
"easySearch"
inline
>
<FormItem
prop=
"keys"
>
<Input
placeholder=
"请输入数据源/服务器/用户"
class=
"w200"
v-model=
"easySearch.keys.value"
/>
</FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"search"
>
查询
</Button>
</FormItem>
</Form>
</
template
>
<
template
slot=
"searchForm"
>
<Search
/>
</
template
>
...
...
@@ -19,80 +27,177 @@
<Modal
v-model=
"detailModal"
width=
"720px"
title=
"详情"
>
<Detail
:eid=
"curId"
/>
</Modal>
<Modal
v-model=
"deletelModal"
title=
"删除"
@
on-ok=
"removeOk"
@
on-cancel=
"cancel"
>
<Modal
v-model=
"deletelModal"
title=
"删除"
@
on-ok=
"removeOk"
@
on-cancel=
"cancel"
>
<p>
确定删除?
</p>
</Modal>
</div>
</template>
<
script
>
import
Api
from
'./api'
import
Add
from
'./add'
import
Edit
from
'./edit'
import
Detail
from
'./detail'
import
Search
from
'./search'
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
name
:
"list"
,
components
:
{
Add
,
Edit
,
Detail
,
Search
},
data
()
{
return
{
action
:
Api
.
index
,
easySearch
:
{
keys
:{
op
:
"name,ip,user"
,
value
:
null
}
},
keys
:
{
op
:
"name,ip,user"
,
value
:
null
}
},
addModal
:
false
,
editModal
:
false
,
detailModal
:
false
,
deletelModal
:
false
,
curId
:
0
,
columns
:
[
{
key
:
"id"
,
title
:
this
.
l
(
"id"
)
,
hide
:
true
,
align
:
"left"
},
{
key
:
"name"
,
title
:
this
.
l
(
"name"
)
,
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
"ip"
,
title
:
this
.
l
(
"ip"
)
,
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
"user"
,
title
:
this
.
l
(
"user"
)
,
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
"password"
,
title
:
this
.
l
(
"password"
)
,
align
:
"left"
},
{
key
:
"port"
,
title
:
this
.
l
(
"port"
)
,
align
:
"left"
,
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'
,
{
key
:
"id"
,
title
:
this
.
l
(
"id"
),
hide
:
true
,
align
:
"left"
},
{
key
:
"name"
,
title
:
this
.
l
(
"name"
),
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
"os"
,
title
:
this
.
l
(
"os"
),
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
"ip"
,
title
:
this
.
l
(
"ip"
),
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
"domain"
,
title
:
this
.
l
(
"domain"
),
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
"supportDatabaseType"
,
title
:
this
.
l
(
"supportDatabaseType"
),
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
"user"
,
title
:
this
.
l
(
"user"
),
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
"password"
,
title
:
this
.
l
(
"password"
),
align
:
"left"
},
{
key
:
"port"
,
title
:
this
.
l
(
"port"
),
align
:
"left"
,
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
:
140
,
align
:
'center'
,
align
:
"center"
,
render
:
(
h
,
params
)
=>
{
return
h
(
'div'
,
{
class
:
"action"
},
[
h
(
'op'
,
{
attrs
:
{
oprate
:
'detail'
},
on
:
{
click
:
()
=>
this
.
detail
(
params
.
row
.
id
)
}
},
'查看'
),
h
(
'op'
,
{
attrs
:
{
oprate
:
'edit'
},
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
.
id
)
}
},
'编辑'
)
,
h
(
'op'
,
{
attrs
:
{
oprate
:
'remove'
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
}
},
'删除'
)
])
}
return
h
(
"div"
,
{
class
:
"action"
},
[
h
(
"op"
,
{
attrs
:
{
oprate
:
"detail"
},
on
:
{
click
:
()
=>
this
.
detail
(
params
.
row
.
id
)
}
},
]
"查看"
),
h
(
"op"
,
{
attrs
:
{
oprate
:
"edit"
},
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
.
id
)
}
},
"编辑"
),
h
(
"op"
,
{
attrs
:
{
oprate
:
"remove"
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
}
},
"删除"
)
]);
}
}
]
};
},
mounted
(){
this
.
$refs
.
grid
.
load
()
mounted
()
{
this
.
$refs
.
grid
.
load
()
;
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
'loadDictionary'
)
// 加载数据字典
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
methods
:{
methods
:
{
addOk
()
{
this
.
$refs
.
grid
.
load
()
this
.
addModal
=
false
this
.
detailModal
=
false
this
.
$refs
.
grid
.
load
();
this
.
addModal
=
false
;
this
.
detailModal
=
false
;
this
.
editModal
=
false
;
this
.
curId
=
0
;
},
search
()
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
)
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
},
detail
(
id
)
{
this
.
detailModal
=
true
;
...
...
@@ -108,21 +213,21 @@ keys:{op:"name,ip,user",value:null}
this
.
curId
=
id
;
},
removeOk
()
{
Api
.
delete
({
id
:
this
.
curId
}).
then
((
r
)
=>
{
Api
.
delete
({
id
:
this
.
curId
}).
then
(
r
=>
{
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
();
this
.
deletelModal
=
false
;
this
.
$Message
.
success
(
'删除成功'
)
this
.
$Message
.
success
(
"删除成功"
);
}
})
});
},
removeCancel
()
{
this
.
deletelModal
=
false
;
},
cancel
()
{
this
.
curId
=
0
;
this
.
addModal
=
false
this
.
detailModal
=
false
this
.
addModal
=
false
;
this
.
detailModal
=
false
;
this
.
editModal
=
false
;
this
.
deletedlModal
=
false
;
},
...
...
@@ -142,13 +247,17 @@ keys:{op:"name,ip,user",value:null}
isDeleted:'是否删除',
deletionTime:'删除时间',
deleterUserId:'删除人',
creationTime: "2020-03-26 15:07:43"
domain: "域名"
os: "操作系统"
supportDatabaseType: "支持的数据库"
}
*/
*/
let
vkey
=
"host"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
return
this
.
$t
(
vkey
)
||
key
;
}
}
}
}
;
</
script
>
<
style
lang=
"less"
>
</
style
>
\ No newline at end of file
static/config.js
View file @
0507bb2a
...
...
@@ -10,7 +10,8 @@ let address=systemApi.dev;
//let address=systemApi.local;
window
.
systemUrl
=
`http://
${
address
}
:10000/system`
;
//System-api 系统管理(基础数据)
window
.
system
=
`http://
${
address
}
:10000/auth`
;
//多租户后台系统
window
.
system
=
`http://
${
address
}
:10000/auth`
;
//多租户后台系统
window
.
systemNew
=
`http://
${
address
}
:10130/`
;
//多租户后台系统-new 10130/platform/host/paged
window
.
authUrl
=
`http://
${
address
}
:10010`
;
//Authentication-api //统一登陆认证
window
.
designUrl
=
`http://
${
address
}
:10000/process`
;
// 工艺规程
window
.
PlanUrl
=
`http://
${
address
}
:10000/plan`
;
//订单
...
...
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