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
387c3363
Commit
387c3363
authored
Aug 14, 2020
by
kangzhenfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
saas--数据源配置
parent
47749de4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
51 deletions
+43
-51
index.vue
pages/system/tanant/index.vue
+7
-1
menuset.vue
pages/system/tanant/menuset.vue
+2
-2
setdetail.vue
pages/system/tanant/setdetail.vue
+34
-48
No files found.
pages/system/tanant/index.vue
View file @
387c3363
...
...
@@ -28,7 +28,7 @@
<Detail
:eid=
"curId"
/>
</Modal>
<Modal
v-model=
"datadetailModal"
title=
"数据源配置"
footer-hide
width=
'830'
>
<dataDetail
:elid=
"datacurId"
/>
<dataDetail
ref=
'dataDetail'
@
set-ok=
"setSqlOk"
:elid=
"datacurId"
/>
</Modal>
<Modal
v-model=
"setModal"
title=
"套餐配置"
footer-hide
width=
'830'
>
<menuSet
:companyId=
"curId"
@
set-ok=
"setOk"
/>
...
...
@@ -342,9 +342,15 @@ export default {
this
.
curId
=
id
},
datadetail
(
id
)
{
this
.
$refs
.
dataDetail
.
list
=
[]
this
.
datadetailModal
=
true
this
.
datacurId
=
id
},
setSqlOk
(){
this
.
$refs
.
grid
.
load
()
this
.
datadetailModal
=
false
this
.
datacurId
=
0
},
setAps
(
id
){
this
.
aps
=
[]
this
.
disabled
=
false
...
...
pages/system/tanant/menuset.vue
View file @
387c3363
<
template
>
<div>
<
div
class=
"f
r pb5"
>
<
p
class=
"t
r pb5"
>
<Button
type=
"primary"
@
click=
"set()"
:disabled=
"disabled"
>
保存
</Button>
</
div
>
</
p
>
<DataGrid
:columns=
"columns"
ref=
"grid"
...
...
pages/system/tanant/setdetail.vue
View file @
387c3363
<
template
>
<div>
<p
class=
"tr pb5"
>
<Button
type=
"primary"
@
click=
"setSql()"
:disabled=
"disabled"
>
保
11
存
</Button>
<Button
type=
"primary"
@
click=
"setSql()"
:disabled=
"disabled"
>
保存
</Button>
</p>
<DataGrid
:columns=
"columns"
...
...
@@ -12,10 +12,11 @@
:tool=
"false"
:height=
"400"
:page=
"false"
:batch=
"false"
@
on-selection-change=
"selectInfo"
></DataGrid>
<!--
<Modal
v-model=
"detailModal"
title=
"详情"
>
<Detail
:eid=
"curId"
/>
</Modal>
-->
</Modal>
-->
</div>
</
template
>
<
script
>
...
...
@@ -41,45 +42,20 @@ export default {
list
:
[],
curId
:
0
,
currentChoose
:
0
,
selecIds
:[],
columns
:
[
{
key
:
"id"
,
title
:
""
,
width
:
70
,
align
:
"center"
,
render
:
(
h
,
params
)
=>
{
let
self
=
this
;
let
id
=
params
.
row
.
id
;
// let cid=params.row.checkedId
let
flag
=
false
;
if
(
self
.
currentChoose
===
id
)
{
flag
=
true
;
}
else
{
flag
=
false
;
}
return
h
(
"div"
,
[
h
(
"Checkbox"
,
{
props
:
{
value
:
flag
},
on
:
{
"on-change"
:
()
=>
{
// var ra=
self
.
currentChoose
=
id
;
}
}
})
]);
}
type
:
"selection"
,
// key:'_checked',
width
:
60
,
align
:
"center"
},
{
key
:
"hostName"
,
title
:
this
.
l
(
"hostName"
),
align
:
"center"
,
easy
:
true
,
high
:
true
,
high
:
true
},
// { key:"remark",title:this.l("remark") ,align:"left" ,easy:true ,high:true },
{
...
...
@@ -87,7 +63,7 @@ export default {
title
:
this
.
l
(
"ip"
),
align
:
"center"
,
high
:
true
,
width
:
140
,
width
:
140
// code: "crm.customer.status"
},
{
...
...
@@ -107,7 +83,7 @@ export default {
title
:
this
.
l
(
"port"
),
align
:
"center"
,
width
:
80
}
,
}
// {
// title: "操作",
// key: "id",
...
...
@@ -140,15 +116,15 @@ export default {
methods
:
{
//保存公司的数据源
setSql
()
{
// console.log(this.currentChoose)
if
(
this
.
currentChoose
==
0
)
{
return
;
}
let
id
=
this
.
elid
;
var
a
=
{};
(
a
.
tenantId
=
id
),
(
a
.
dbSourceIdList
=
this
.
currentChoose
);
var
params
=
{
tenantId
:
this
.
elid
,
dbSourceIdList
:
this
.
selecIds
};
// ( = id), (a.dbSourceIdList = );
console
.
log
(
params
)
this
.
disabled
=
true
;
Api
.
setMenuSql
(
a
).
then
(
r
=>
{
Api
.
setMenuSql
(
params
).
then
(
r
=>
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
this
.
currentChoose
=
0
;
...
...
@@ -165,23 +141,33 @@ export default {
this
.
curId
=
id
;
},
getAll
()
{
// debugger
let
params
=
{
pageIndex
:
1
,
pageSize
:
20
,
conditions
:
[],
t
ype
:
this
.
elid
t
enantId
:
this
.
elid
};
this
.
currentChoose
=
0
;
Api
.
pagedSql
(
params
).
then
(
r
=>
{
// console.log(r);
this
.
list
=
r
.
result
;
r
.
result
.
forEach
(
data
=>
{
if
(
data
.
id
==
data
.
checkedId
)
{
this
.
currentChoose
=
data
.
id
;
this
.
list
.
forEach
(
data
=>
{
if
(
data
.
tenantId
>
0
)
{
data
.
_checked
=
true
this
.
selecIds
.
push
(
data
.
id
);
}
else
{
data
.
_checked
=
false
}
});
});
},
selectInfo
(
itemRow
)
{
this
.
selecIds
=
[];
let
selecArry
=
itemRow
selecArry
.
map
(
item
=>
{
this
.
selecIds
.
push
(
item
.
id
);
})
console
.
log
(
'选中:'
,
this
.
selecIds
)
},
l
(
key
)
{
/*
databases:{
...
...
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