Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
thirdlucky
uml-demo
提交
aed0dcf1
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 搜索 >>
提交
aed0dcf1
编写于
12月 22, 2021
作者:
S
shenjizhe
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1
上级
b1133ba9
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
59 addition
and
9 deletion
+59
-9
common/api.js
common/api.js
+10
-4
manifest.json
manifest.json
+3
-1
pages/guide/guide.vue
pages/guide/guide.vue
+46
-4
未找到文件。
common/api.js
浏览文件 @
aed0dcf1
...
...
@@ -7,15 +7,17 @@ module.exports = {
generateCode
:
generateCode
,
getComponents
:
getComponents
,
saveComponents
:
saveComponents
,
addComponent
:
addComponent
,
getDataSources
:
getDataSources
,
getTemplates
:
getTemplates
,
createGit
,
createGit
,
createGit
,
createGit
,
pushGit
:
pushGit
}
let
url
=
'
http://localhost:8099
'
;
let
url
=
'
http://localhost:8071
'
;
// let url = 'http://dzlc.licaiedu.com/code
';
let
headers
=
{
"
Access-Control-Allow-Origin
"
:
"
http://
localhost:8099
"
"
Access-Control-Allow-Origin
"
:
"
http://
dzlc.licaiedu.com/code
"
};
function
loadEntities
(
domainId
,
success
,
fail
,
complete
)
{
...
...
@@ -46,6 +48,10 @@ function saveComponents(datas, success, fail, complete) {
http
.
put
(
url
+
'
/components/batch/
'
,
datas
,
headers
,
success
,
fail
,
complete
);
}
function
addComponent
(
data
,
success
,
fail
,
complete
)
{
http
.
post
(
url
+
'
/components/
'
,
data
,
headers
,
success
,
fail
,
complete
);
}
function
getDataSources
(
success
,
fail
,
complete
)
{
http
.
get
(
url
+
'
/db-sources/batch/?ids=
'
,
headers
,
success
,
fail
,
complete
);
}
...
...
manifest.json
浏览文件 @
aed0dcf1
...
...
@@ -44,7 +44,9 @@
},
"ios"
:
{},
/*
ios打包配置
*/
"sdkConfigs"
:
{}
"sdkConfigs"
:
{
"ad"
:
{}
}
},
"nvueLaunchMode"
:
""
},
...
...
pages/guide/guide.vue
浏览文件 @
aed0dcf1
...
...
@@ -2,7 +2,7 @@
<view
style=
"display: flex;flex-direction: column;justify-content: space-between;"
>
<view><uni-steps
:options=
"progress"
:active=
"processIndex"
></uni-steps></view>
<scroll-view
style=
"height: 88vh"
>
<thirdlucky-data-form
v-if=
"processIndex == 0"
:showButton=
"false"
:columns=
"
repository.columns"
:formData=
"repository
.data"
></thirdlucky-data-form>
<thirdlucky-data-form
v-if=
"processIndex == 0"
:showButton=
"false"
:columns=
"
component.columns"
:formData=
"component
.data"
></thirdlucky-data-form>
<thirdlucky-data-view
v-if=
"processIndex == 1"
:buttons=
"buttons"
...
...
@@ -13,10 +13,18 @@
@
selected=
"onSelected"
></thirdlucky-data-view>
<thirdlucky-data-form
v-if=
"processIndex == 2"
:showButton=
"false"
:columns=
"code.columns"
:formData=
"code.data"
></thirdlucky-data-form>
<view
v-if=
"processIndex == 3"
>
<button
@
click=
"onCreateComponent"
>
新建组件
</button>
<button
@
click=
"onCreateGit"
>
新建git
</button>
<button
@
click=
"onSaveModel"
>
保存模型
</button>
<button
@
click=
"onGenerateCode"
>
生成代码
</button>
<button
@
click=
"onUpload"
>
上传代码
</button>
<thirdlucky-console-view
ref=
"console"
class=
"console-view"
></thirdlucky-console-view>
</view>
</scroll-view>
<view
style=
"display: flex;flex-direction: row;"
>
<button
style=
"flex: 1;"
:disabled=
"processIndex == 0"
@
click=
"onPrevious"
>
上一步
</button>
<button
style=
"flex: 1;"
:disabled=
"processIndex ==
4
"
@
click=
"onNext"
>
下一步
</button>
<button
style=
"flex: 1;"
:disabled=
"processIndex ==
3
"
@
click=
"onNext"
>
下一步
</button>
</view>
</view>
</
template
>
...
...
@@ -59,7 +67,7 @@ export default {
datas
:
[],
tableNames
:
[
'
name
'
,
'
comment
'
]
},
repository
:
{
component
:
{
columns
:
[
{
name
:
'
name
'
,
...
...
@@ -179,9 +187,43 @@ export default {
}
this
.
processIndex
++
;
}
},
onCreateComponent
()
{
callApi
(
this
.
api
.
addComponent
,
this
.
component
.
data
);
},
onCreateGit
()
{},
onSaveModel
()
{},
onGenerateCode
()
{},
onUpload
()
{},
callApi
(
apifunc
,
data
)
{
apifunc
(
data
,
res
=>
{
uni
.
showToast
({
title
:
'
提交成功:
'
,
icon
:
'
succes
'
,
duration
:
2000
});
},
res
=>
{
uni
.
showToast
({
title
:
'
提交失败:
'
+
res
.
errMsg
,
icon
:
'
error
'
,
duration
:
2000
});
}
);
}
}
};
</
script
>
<
style
></
style
>
<
style
>
.console-view
{
background
:
white
;
border-style
:
solid
;
border-width
:
100%
;
height
:
60vh
;
}
</
style
>
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录