Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
易企天创
zendata
提交
979218ee
Z
zendata
项目概览
易企天创
/
zendata
10 个月 前同步成功
通知
17
Star
2
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Z
zendata
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
979218ee
编写于
2月 28, 2023
作者:
aaronchen2k2k
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix issues
上级
27bcf57a
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
31 addition
and
83 deletion
+31
-83
client/README.md
client/README.md
+4
-4
client/src/app/app.js
client/src/app/app.js
+9
-2
client/src/app/core/zd.js
client/src/app/core/zd.js
+1
-1
client/src/app/utils/comm.js
client/src/app/utils/comm.js
+13
-2
ui/src/layout/MainLayout.less
ui/src/layout/MainLayout.less
+4
-0
ui/src/layout/Menu.vue
ui/src/layout/Menu.vue
+0
-74
未找到文件。
client/README.md
浏览文件 @
979218ee
...
...
@@ -25,7 +25,7 @@ npm run start
在调试模式下可以通过制定环境变量来设置 ZD UI 服务访问地址和 ZD 可执行程序位置。
*
`UI_SERVER_URL`
:ZD UI 服务访问地址或静态资源文件目录,如果不指定会自动进入
`../ui/`
目录执行
`npm run serve`
获取开发服务器地址;
*
`UI_SERVER_PORT`
:ZD UI 服务端口,如果不指定则使用
`80
0
0`
;
*
`UI_SERVER_PORT`
:ZD UI 服务端口,如果不指定则使用
`80
8
0`
;
*
`SERVER_EXE_PATH`
:ZD 服务可执行文件位置(相对于
`/client`
目录),如果不指定则会自动进入
`../cmd/server/`
目录下执行
`go run main.go -p 8085`
启动 ZD 服务器。
*
`SERVER_CWD_PATH`
:ZD 服务运行目录;
*
`SKIP_SERVER`
:跳过启动 ZD 服务,适用于 ZD 服务已经在外部启动的情况。
...
...
@@ -35,13 +35,13 @@ npm run start
**模式一:使用外部 UI 服务**
```
SKIP_SERVER=1 UI_SERVER_URL=http://localhost:80
0
0 npm run start
SKIP_SERVER=1 UI_SERVER_URL=http://localhost:80
8
0 npm run start
```
**模式二:使用本地 UI 静态文件目录**
```
UI_SERVER_URL=../ui/dist UI_SERVER_PORT=80
0
0 npm run start
UI_SERVER_URL=../ui/dist UI_SERVER_PORT=80
8
0 npm run start
```
**模式三:自定义 ZD 服务执行文件路径**
...
...
@@ -59,7 +59,7 @@ SKIP_SERVER=1 npm run start
**模式五:综合使用外部 UI 服务和外部 ZD 服务**
```
UI_SERVER_URL=http://localhost:80
0
0 SKIP_SERVER=1 npm run start
UI_SERVER_URL=http://localhost:80
8
0 SKIP_SERVER=1 npm run start
```
## 代码检查
...
...
client/src/app/app.js
浏览文件 @
979218ee
...
...
@@ -52,14 +52,22 @@ export class ZdApp {
async
createWindow
()
{
process
.
env
[
'
ELECTRON_DISABLE_SECURITY_WARNINGS
'
]
=
'
true
'
;
const
frame
=
IS_MAC_OSX
?
true
:
false
;
const
mainWin
=
new
BrowserWindow
({
show
:
false
,
frame
:
false
,
frame
:
frame
,
// titleBarStyle: "hidden",
webPreferences
:
{
nodeIntegration
:
true
,
contextIsolation
:
false
,
}
})
// if (IS_MAC_OSX) {
// mainWin.setTrafficLightPosition && mainWin.setTrafficLightPosition({
// x: 10,
// y: 125
// })
// }
require
(
'
@electron/remote/main
'
).
initialize
()
require
(
'
@electron/remote/main
'
).
enable
(
mainWin
.
webContents
)
...
...
@@ -233,7 +241,6 @@ export class ZdApp {
}
get
windows
()
{
return
this
.
_windows
;
}
...
...
client/src/app/core/zd.js
浏览文件 @
979218ee
...
...
@@ -143,7 +143,7 @@ export function killZdServer() {
logInfo
(
`<
${
line
}
>`
)
const
cols
=
line
.
split
(
/
\s
/
)
if
(
line
.
indexOf
(
'
zd
'
)
>
-
1
&&
cols
.
length
>
3
)
{
if
(
line
.
indexOf
(
'
server
'
)
>
-
1
&&
cols
.
length
>
3
)
{
const
col3
=
cols
[
3
].
trim
()
console
.
log
(
`col3=
${
col3
}
`
);
logInfo
(
`col3=
${
col3
}
`
)
...
...
client/src/app/utils/comm.js
浏览文件 @
979218ee
...
...
@@ -113,14 +113,25 @@ export function getVersionUrl() {
return
url
}
export
function
getAppUrl
(
version
)
{
const
platform
=
os
.
platform
();
// 'darwin', 'linux', 'win32'
const
platform
=
getPlatform
();
// 'darwin', 'linux', 'win32', 'win64'
logInfo
(
`platform=
${
platform
}
`
)
const
url
=
new
URL
(
`
${
App
}
/
${
version
}
/
${
platform
}
/
${
App
}
-upgrade.zip`
,
downloadUrl
)
+
'
?ts=
'
+
Date
.
now
();
logInfo
(
`appUrl=
${
url
}
`
)
return
url
}
export
function
getPlatform
()
{
let
platform
=
os
.
platform
();
// 'darwin', 'linux', 'win32'
if
(
platform
===
'
win32
'
&&
[
'
arm64
'
,
'
ppc64
'
,
'
x64
'
,
'
s390x
'
].
includes
(
os
.
arch
()))
{
platform
=
'
win64
'
}
return
platform
}
export
async
function
checkMd5
(
version
,
file
)
{
const
platform
=
os
.
p
latform
();
// 'darwin', 'linux', 'win32'
const
platform
=
getP
latform
();
// 'darwin', 'linux', 'win32'
const
url
=
new
URL
(
`
${
App
}
/
${
version
}
/
${
platform
}
/
${
App
}
-upgrade.zip.md5`
,
downloadUrl
)
+
'
?ts=
'
+
Date
.
now
();
logInfo
(
`md5Url=
${
url
}
, file=
${
file
}
`
)
...
...
ui/src/layout/MainLayout.less
浏览文件 @
979218ee
...
...
@@ -97,4 +97,8 @@ a.common {
.clear-both {
clear: both;
}
.link {
cursor: pointer;
}
\ No newline at end of file
ui/src/layout/Menu.vue
已删除
100644 → 0
浏览文件 @
27bcf57a
<
template
>
<div>
<a-menu
:default-selected-keys=
"['mine']"
:open-keys.sync=
"openKeys"
mode=
"inline"
@
click=
"handleClick"
>
<a-menu-item
key=
"mine/list"
>
{{
$t
(
'
msg.mine
'
)
}}
</a-menu-item>
<a-sub-menu
key=
"buildin"
@
titleClick=
"titleClick"
>
<span
slot=
"title"
><span>
{{
$t
(
'
msg.buildin
'
)
}}
</span></span>
<a-menu-item
key=
"buildin/config/list"
>
{{
$t
(
'
msg.config
'
)
}}
</a-menu-item>
<a-menu-item
key=
"buildin/ranges/list"
>
{{
$t
(
'
msg.ranges
'
)
}}
</a-menu-item>
<a-menu-item
key=
"buildin/instances/list"
>
{{
$t
(
'
msg.instances
'
)
}}
</a-menu-item>
<a-menu-item
key=
"buildin/text/list"
>
{{
$t
(
'
msg.text
'
)
}}
</a-menu-item>
<a-menu-item
key=
"buildin/excel/list"
>
{{
$t
(
'
msg.excel
'
)
}}
</a-menu-item>
</a-sub-menu>
</a-menu>
</div>
</
template
>
<
script
>
export
default
{
name
:
'
Menu
'
,
components
:
{
},
data
()
{
return
{
current
:
[],
openKeys
:
[],
};
},
watch
:
{
openKeys
(
val
)
{
console
.
log
(
'
openKeys
'
,
val
);
},
},
computed
:
{
},
created
()
{
},
mounted
()
{
},
methods
:
{
handleClick
(
e
)
{
console
.
log
(
'
handleClick
'
,
e
,
this
.
$route
.
path
,
e
.
key
)
if
(
e
.
key
.
indexOf
(
'
buildin
'
)
>
-
1
)
this
.
openKeys
=
[
'
buildin
'
]
const
path
=
'
/data/
'
+
e
.
key
if
(
this
.
$route
.
path
!=
path
)
this
.
$router
.
push
(
path
);
},
titleClick
(
e
)
{
console
.
log
(
'
titleClick
'
,
e
)
},
}
}
</
script
>
<
style
lang=
"less"
scoped
>
</
style
>
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录