Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
thirdlucky
uml-demo
提交
4d2802e6
U
uml-demo
项目概览
thirdlucky
/
uml-demo
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uml-demo
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
4d2802e6
编写于
12月 09, 2021
作者:
S
shenjizhe
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1
上级
002dc8a8
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
64 addition
and
20 deletion
+64
-20
pages/test/test-er/component.vue
pages/test/test-er/component.vue
+64
-20
未找到文件。
pages/test/test-er/component.vue
浏览文件 @
4d2802e6
...
@@ -4,15 +4,33 @@
...
@@ -4,15 +4,33 @@
<view
class=
"main-box"
>
<view
class=
"main-box"
>
<view
ref=
"componentView"
class=
"component-view"
>
<view
ref=
"componentView"
class=
"component-view"
>
<view
class=
"title-bar"
>
组件信息
</view>
<view
class=
"title-bar"
>
组件信息
</view>
<thirdlucky-data-view
style=
"height: 97%;"
:columns=
"component.columns"
:datas=
"component.datas"
:tableNames=
"component.tableNames"
></thirdlucky-data-view>
<thirdlucky-data-view
style=
"height: 97%;"
:columns=
"component.columns"
:datas=
"component.datas"
:tableNames=
"component.tableNames"
@
selected=
"componentSelected"
></thirdlucky-data-view>
</view>
</view>
<view
ref=
"moduleView"
class=
"module-view"
>
<view
ref=
"moduleView"
class=
"module-view"
>
<view
class=
"title-bar"
>
模型信息
</view>
<view
class=
"title-bar"
>
模型信息
</view>
<thirdlucky-data-view
style=
"height: 97%;"
:columns=
"model.columns"
:datas=
"model.datas"
:tableNames=
"model.tableNames"
></thirdlucky-data-view>
<thirdlucky-data-view
style=
"height: 97%;"
:columns=
"model.columns"
:datas=
"model.datas"
:tableNames=
"model.tableNames"
@
selected=
"modelSelected"
></thirdlucky-data-view>
</view>
</view>
<view
ref=
"templateView"
class=
"template-view"
>
<view
ref=
"templateView"
class=
"template-view"
>
<view
class=
"title-bar"
>
模板信息
</view>
<view
class=
"title-bar"
>
模板信息
</view>
<thirdlucky-data-view
style=
"height: 97%;"
:columns=
"template.columns"
:datas=
"template.datas"
:tableNames=
"template.tableNames"
></thirdlucky-data-view>
<thirdlucky-data-view
style=
"height: 97%;"
:columns=
"template.columns"
:datas=
"template.datas"
:tableNames=
"template.tableNames"
@
selected=
"templateSelected"
></thirdlucky-data-view>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -22,8 +40,9 @@
...
@@ -22,8 +40,9 @@
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
componentIndex
:
-
1
,
menuContent
:
[{
text
:
'
加载
'
},
{
text
:
'
保存
'
}],
menuContent
:
[{
text
:
'
加载
'
},
{
text
:
'
保存
'
}],
component
:{
component
:
{
columns
:
[
columns
:
[
{
{
name
:
'
name
'
,
name
:
'
name
'
,
...
@@ -37,6 +56,18 @@ export default {
...
@@ -37,6 +56,18 @@ export default {
type
:
'
text
'
,
type
:
'
text
'
,
tips
:
'
描述
'
tips
:
'
描述
'
},
},
{
name
:
'
modelId
'
,
info
:
'
模型ID
'
,
type
:
'
text
'
,
tips
:
''
},
{
name
:
'
templateId
'
,
info
:
'
模板ID
'
,
type
:
'
text
'
,
tips
:
''
},
{
{
name
:
'
domainName
'
,
name
:
'
domainName
'
,
info
:
'
域名
'
,
info
:
'
域名
'
,
...
@@ -99,9 +130,9 @@ export default {
...
@@ -99,9 +130,9 @@ export default {
}
}
],
],
datas
:
[],
datas
:
[],
tableNames
:
[
'
name
'
,
'
comment
'
]
,
tableNames
:
[
'
name
'
,
'
comment
'
]
},
},
model
:{
model
:
{
columns
:
[
columns
:
[
{
{
name
:
'
name
'
,
name
:
'
name
'
,
...
@@ -150,13 +181,12 @@ export default {
...
@@ -150,13 +181,12 @@ export default {
info
:
'
领域ID
'
,
info
:
'
领域ID
'
,
type
:
'
text
'
,
type
:
'
text
'
,
tips
:
'
领域ID
'
tips
:
'
领域ID
'
},
}
],
],
datas
:
[],
datas
:
[],
tableNames
:
[
'
name
'
,
'
comment
'
]
,
tableNames
:
[
'
name
'
,
'
comment
'
]
},
},
template
:{
template
:
{
columns
:
[
columns
:
[
{
{
name
:
'
name
'
,
name
:
'
name
'
,
...
@@ -175,14 +205,28 @@ export default {
...
@@ -175,14 +205,28 @@ export default {
info
:
'
启用
'
,
info
:
'
启用
'
,
type
:
'
switch
'
,
type
:
'
switch
'
,
tips
:
''
tips
:
''
}
,
}
],
],
datas
:
[],
datas
:
[],
tableNames
:
[
'
name
'
,
'
comment
'
]
,
tableNames
:
[
'
name
'
,
'
comment
'
]
}
,
}
};
};
},
},
methods
:
{
methods
:
{
componentSelected
(
index
,
action
,
data
)
{
this
.
componentIndex
=
index
;
},
modelSelected
(
index
,
action
,
data
)
{
if
(
index
>=
0
&&
this
.
componentIndex
>=
0
)
{
this
.
component
.
datas
[
this
.
componentIndex
].
modelId
=
data
.
id
;
}
},
templateSelected
(
index
,
action
,
data
)
{
console
.
log
(
'
选择:
'
,
data
);
if
(
index
>=
0
&&
this
.
componentIndex
>=
0
)
{
this
.
component
.
datas
[
this
.
componentIndex
].
templateId
=
data
.
id
;
}
},
menuClick
(
e
)
{
menuClick
(
e
)
{
switch
(
e
.
index
)
{
switch
(
e
.
index
)
{
case
0
:
case
0
:
...
@@ -195,34 +239,34 @@ export default {
...
@@ -195,34 +239,34 @@ export default {
break
;
break
;
}
}
},
},
loadDatas
(
data
,
name
,
func
)
{
loadDatas
(
data
,
name
,
func
)
{
func
(
func
(
res
=>
{
res
=>
{
data
.
datas
=
res
.
data
.
data
;
data
.
datas
=
res
.
data
.
data
;
uni
.
showToast
({
uni
.
showToast
({
title
:
'
加载
'
+
name
+
'
成功
'
,
title
:
'
加载
'
+
name
+
'
成功
'
,
icon
:
'
success
'
,
icon
:
'
success
'
,
duration
:
2000
duration
:
2000
});
});
},
},
res
=>
{
res
=>
{
uni
.
showToast
({
uni
.
showToast
({
title
:
'
加载
'
+
name
+
'
失败:
'
+
res
.
errMsg
,
title
:
'
加载
'
+
name
+
'
失败:
'
+
res
.
errMsg
,
icon
:
'
error
'
,
icon
:
'
error
'
,
duration
:
2000
duration
:
2000
});
});
}
}
);
);
},
},
loadComponents
()
{
loadComponents
()
{
this
.
loadDatas
(
this
.
component
,
'
组件
'
,
this
.
api
.
getComponents
);
this
.
loadDatas
(
this
.
component
,
'
组件
'
,
this
.
api
.
getComponents
);
},
},
loadDataSources
()
{
loadDataSources
()
{
this
.
loadDatas
(
this
.
model
,
'
模型
'
,
this
.
api
.
getDataSources
);
this
.
loadDatas
(
this
.
model
,
'
模型
'
,
this
.
api
.
getDataSources
);
},
},
loadTemplates
()
{
loadTemplates
()
{
this
.
loadDatas
(
this
.
template
,
'
模板
'
,
this
.
api
.
getTemplates
);
this
.
loadDatas
(
this
.
template
,
'
模板
'
,
this
.
api
.
getTemplates
);
},
},
saveComponents
()
{
saveComponents
()
{
this
.
api
.
saveComponents
(
this
.
api
.
saveComponents
(
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录