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
4670659f
Commit
4670659f
authored
Aug 12, 2020
by
kangzhenfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
saas--数据源管理
parent
c47a7dea
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
51 additions
and
11 deletions
+51
-11
zh-CN.js
i18n/locale/zh-CN.js
+1
-0
add.vue
pages/system/datasource/add.vue
+24
-5
api.js
pages/system/datasource/api.js
+3
-0
detail.vue
pages/system/datasource/detail.vue
+1
-0
edit.vue
pages/system/datasource/edit.vue
+20
-4
index.vue
pages/system/datasource/index.vue
+2
-1
api.js
pages/system/tanant/api.js
+0
-1
No files found.
i18n/locale/zh-CN.js
View file @
4670659f
...
...
@@ -1002,6 +1002,7 @@ export default {
id
:
''
,
hostName
:
'主机名称'
,
hostId
:
'数据源ID'
,
hostsq
:
'数据库类型'
,
port
:
'端口'
,
userName
:
'用户名'
,
password
:
'密码'
,
...
...
pages/system/datasource/add.vue
View file @
4670659f
...
...
@@ -3,12 +3,15 @@
<Row>
<Col
:span=
"24"
>
<FormItem
:label=
"l('hostName')"
prop=
"hostName"
>
<Input
v-model=
"entity.hostName"
></Input>
<Select
@
on-change=
"onchange_host"
v-model=
"entity.hostId"
>
<Option
v-for=
"(item,index) in hostlist"
:key=
"index"
:value=
"item.id"
>
{{
item
.
name
}}
</Option>
</Select>
</FormItem>
</Col>
<Col
:span=
"24"
>
<FormItem
:label=
"l('hostId')"
prop=
"hostId"
>
<Dictionary
v-model=
"entity.hostId"
></Dictionary>
<FormItem
:label=
"l('hostsq')"
prop=
"hostId"
>
<Input
v-model=
"entity.hostId"
></Input>
<!--
<Dictionary
v-model=
"entity.hostId"
></Dictionary>
-->
</FormItem>
</Col>
<Col
:span=
"24"
>
...
...
@@ -42,13 +45,26 @@ export default {
disabled
:
false
,
entity
:
{},
rules
:
{
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}]
}
hostName
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}]
},
hostlist
:
[],
};
},
props
:
{
v
:
Object
},
mounted
()
{
Api
.
bindhostlist
()
.
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
hostlist
=
r
.
result
}
else
{
}
})
.
catch
((
err
)
=>
{
console
.
warn
(
err
)
})
},
methods
:
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
(
v
=>
{
...
...
@@ -71,6 +87,9 @@ export default {
});
}
});
},
onchange_host
(
val
)
{
this
.
entity
.
hostId
=
val
},
handleClose
()
{
this
.
$emit
(
"on-close"
);
...
...
pages/system/datasource/api.js
View file @
4670659f
...
...
@@ -4,6 +4,9 @@ export default {
paged
(
params
){
return
Api
.
post
(
`
${
systemNew
}
/datasource/paged`
,
params
);
},
bindhostlist
()
{
return
Api
.
post
(
`
${
systemNew
}
/host/list`
,
{});
},
get
(
params
){
return
Api
.
get
(
`
${
systemNew
}
/datasource/get`
,
params
);
},
...
...
pages/system/datasource/detail.vue
View file @
4670659f
...
...
@@ -2,6 +2,7 @@
<div
class=
"detail"
>
<Row>
<Filed
:span=
"24"
:name=
"l('hostName')"
>
{{
entity
.
hostName
}}
</Filed>
<Filed
:span=
"24"
:name=
"l('hostsq')"
>
{{
entity
.
hostName
}}
</Filed>
<Filed
:span=
"24"
:name=
"l('port')"
>
{{
entity
.
port
}}
</Filed>
<Filed
:span=
"24"
:name=
"l('userName')"
>
{{
entity
.
userName
}}
</Filed>
<Filed
:span=
"24"
:name=
"l('password')"
>
{{
entity
.
password
}}
</Filed>
...
...
pages/system/datasource/edit.vue
View file @
4670659f
...
...
@@ -3,12 +3,15 @@
<Row>
<Col
:span=
"24"
>
<FormItem
:label=
"l('hostName')"
prop=
"hostName"
>
<Input
v-model=
"entity.hostName"
></Input>
<Select
@
on-change=
"onchange_host"
v-model=
"entity.hostId"
>
<Option
v-for=
"(item,index) in hostlist"
:key=
"index"
:value=
"item.id"
>
{{
item
.
name
}}
</Option>
</Select>
</FormItem>
</Col>
<Col
:span=
"24"
>
<FormItem
:label=
"l('hostId')"
prop=
"hostId"
>
<Dictionary
v-model=
"entity.hostId"
></Dictionary>
<FormItem
:label=
"l('hostsq')"
prop=
"hostId"
>
<Input
v-model=
"entity.hostId"
></Input>
<!--
<Dictionary
v-model=
"entity.hostId"
></Dictionary>
-->
</FormItem>
</Col>
<Col
:span=
"24"
>
...
...
@@ -43,12 +46,25 @@ export default {
entity
:
{},
rules
:
{
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}]
}
},
hostlist
:
[],
};
},
props
:
{
eid
:
Number
},
mounted
()
{
Api
.
bindhostlist
()
.
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
hostlist
=
r
.
result
}
else
{
}
})
.
catch
((
err
)
=>
{
console
.
warn
(
err
)
})
},
methods
:
{
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
(
r
=>
{
...
...
pages/system/datasource/index.vue
View file @
4670659f
...
...
@@ -60,7 +60,8 @@ export default {
columns
:
[
{
key
:
'id'
,
title
:
this
.
l
(
'id'
),
hide
:
true
,
align
:
'left'
},
{
key
:
'hostName'
,
title
:
this
.
l
(
'hostName'
),
align
:
'left'
,
high
:
true
},
{
key
:
'hostId'
,
title
:
this
.
l
(
'hostId'
),
align
:
'left'
,
high
:
true
},
{
key
:
'hostId'
,
title
:
this
.
l
(
'hostsq'
),
align
:
'left'
,
high
:
true
},
// { key: 'hostId', title: this.l('hostId'), align: 'left', high: true },
{
key
:
'port'
,
title
:
this
.
l
(
'port'
),
align
:
'left'
,
high
:
true
},
{
key
:
'userName'
,
...
...
pages/system/tanant/api.js
View file @
4670659f
...
...
@@ -19,7 +19,6 @@ export default {
},
bindhostlist
()
{
return
Api
.
post
(
`
${
systemNew
}
/host/list`
,
{});
},
tanantinit
(
params
)
{
...
...
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