Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
易企天创
zendata
提交
cae30cf4
Z
zendata
项目概览
易企天创
/
zendata
11 个月 前同步成功
通知
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,发现更多精彩内容 >>
提交
cae30cf4
编写于
3月 11, 2021
作者:
陈
陈琦
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix path issue
上级
cf8ab3ee
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
43 addition
and
17 deletion
+43
-17
src/server/utils/common.go
src/server/utils/common.go
+3
-2
src/service/list.go
src/service/list.go
+2
-1
ui/src/api/utils.js
ui/src/api/utils.js
+7
-1
ui/src/utils/request.js
ui/src/utils/request.js
+1
-1
ui/src/views/data/buildin/config/List.vue
ui/src/views/data/buildin/config/List.vue
+5
-2
ui/src/views/data/buildin/excel/List.vue
ui/src/views/data/buildin/excel/List.vue
+5
-2
ui/src/views/data/buildin/instances/List.vue
ui/src/views/data/buildin/instances/List.vue
+5
-2
ui/src/views/data/buildin/ranges/List.vue
ui/src/views/data/buildin/ranges/List.vue
+5
-2
ui/src/views/data/buildin/text/List.vue
ui/src/views/data/buildin/text/List.vue
+5
-2
ui/src/views/data/mine/List.vue
ui/src/views/data/mine/List.vue
+5
-2
未找到文件。
src/server/utils/common.go
浏览文件 @
cae30cf4
...
...
@@ -2,12 +2,12 @@ package serverUtils
import
(
"encoding/json"
"fmt"
"github.com/easysoft/zendata/src/model"
constant
"github.com/easysoft/zendata/src/utils/const"
fileUtils
"github.com/easysoft/zendata/src/utils/file"
"github.com/easysoft/zendata/src/utils/vari"
"io/ioutil"
"regexp"
"strings"
)
...
...
@@ -112,7 +112,8 @@ func AddExt(pth, ext string) string {
}
func
GetDirs
(
dir
string
,
dirs
*
[]
model
.
Dir
)
{
if
strings
.
Contains
(
dir
,
fmt
.
Sprintf
(
"yaml%sarticle"
,
constant
.
PthSep
))
{
isArticleFiles
,
_
:=
regexp
.
MatchString
(
"yaml.article"
,
dir
)
if
isArticleFiles
{
return
}
...
...
src/service/list.go
浏览文件 @
cae30cf4
...
...
@@ -13,6 +13,7 @@ import (
"gopkg.in/yaml.v3"
"io/ioutil"
"path"
"regexp"
"sort"
"strings"
)
...
...
@@ -54,7 +55,7 @@ func LoadRes(resSrc string) (res map[string][]model.ResFile, nameWidth, titleWid
if
key
==
constant
.
ResDirData
{
// data dir contains excel
title
,
desc
,
tp
=
ReadExcelInfo
(
pth
)
}
else
if
key
==
constant
.
ResDirYaml
||
key
==
constant
.
ResDirUsers
{
isArticleFiles
=
strings
.
Contains
(
pth
,
fmt
.
Sprintf
(
"yaml%sarticle"
,
constant
.
PthSep
)
)
isArticleFiles
,
_
=
regexp
.
MatchString
(
"yaml.article"
,
pth
)
if
fileExt
==
".txt"
{
// ignore packaged article text file
title
,
desc
,
tp
=
ReadTextInfo
(
pth
,
key
)
...
...
ui/src/api/utils.js
浏览文件 @
cae30cf4
...
...
@@ -49,9 +49,15 @@ export function checkDirIsUsers (rule, value, callback){
callback
()
}
export
function
replacePathSep
(
path
){
const
pth
=
path
.
replaceAll
(
'
\\
'
,
"
/
"
)
return
pth
}
export
function
pathToRelated
(
path
){
if
(
!
config
.
workDir
)
return
''
const
name
=
path
.
substr
(
config
.
workDir
.
length
)
let
name
=
path
.
substr
(
config
.
workDir
.
length
)
name
=
replacePathSep
(
name
)
return
name
}
...
...
ui/src/utils/request.js
浏览文件 @
cae30cf4
...
...
@@ -10,7 +10,7 @@ const request = axios.create({
function
getUrl
()
{
let
url
=
''
if
(
process
.
env
.
NODE_ENV
===
"
development
"
)
{
url
=
'
http://
localhost
:8848
'
url
=
'
http://
172.16.13.3
:8848
'
console
.
log
(
'
dev env, url is
'
+
url
)
}
else
{
const
location
=
unescape
(
window
.
location
.
href
);
...
...
ui/src/views/data/buildin/config/List.vue
浏览文件 @
cae30cf4
...
...
@@ -4,7 +4,7 @@
<span
slot=
"folderWithPath"
slot-scope=
"text, record"
>
<a-tooltip
placement=
"top"
overlayClassName=
"tooltip-light"
>
<template
slot=
"title"
>
<span>
{{
record
.
path
}}
</span>
<span>
{{
record
.
path
|
replacePathSep
}}
</span>
</
template
>
<a>
{{record.path | pathToRelated}}
</a>
</a-tooltip>
...
...
@@ -74,7 +74,7 @@
<
script
>
import
{
listConfig
,
removeConfig
}
from
"
../../../../api/manage
"
;
import
{
PageSize
,
pathToRelated
}
from
"
../../../../api/utils
"
;
import
{
PageSize
,
pathToRelated
,
replacePathSep
}
from
"
../../../../api/utils
"
;
import
{
DesignComponent
}
from
'
../../../../components
'
import
debounce
from
"
lodash.debounce
"
import
Edit
from
'
./Edit
'
;
...
...
@@ -151,6 +151,9 @@ export default {
}
},
filters
:
{
replacePathSep
:
function
(
path
)
{
return
replacePathSep
(
path
)
},
pathToRelated
:
function
(
path
)
{
return
pathToRelated
(
path
)
}
...
...
ui/src/views/data/buildin/excel/List.vue
浏览文件 @
cae30cf4
...
...
@@ -4,7 +4,7 @@
<span
slot=
"folderWithPath"
slot-scope=
"text, record"
>
<a-tooltip
placement=
"top"
overlayClassName=
"tooltip-light"
>
<template
slot=
"title"
>
<span>
{{
record
.
path
}}
</span>
<span>
{{
record
.
path
|
replacePathSep
}}
</span>
</
template
>
<a>
{{record.path | pathToRelated}}
</a>
</a-tooltip>
...
...
@@ -62,7 +62,7 @@
<
script
>
import
{
listExcel
,
removeExcel
}
from
"
../../../../api/manage
"
;
import
{
PageSize
,
pathToRelated
}
from
"
../../../../api/utils
"
;
import
{
PageSize
,
pathToRelated
,
replacePathSep
}
from
"
../../../../api/utils
"
;
import
debounce
from
"
lodash.debounce
"
import
Edit
from
'
./Edit
'
;
...
...
@@ -137,6 +137,9 @@ export default {
this
.
loadData
()
},
filters
:
{
replacePathSep
:
function
(
path
)
{
return
replacePathSep
(
path
)
},
pathToRelated
:
function
(
path
)
{
return
pathToRelated
(
path
)
}
...
...
ui/src/views/data/buildin/instances/List.vue
浏览文件 @
cae30cf4
...
...
@@ -4,7 +4,7 @@
<span
slot=
"folderWithPath"
slot-scope=
"text, record"
>
<a-tooltip
placement=
"top"
overlayClassName=
"tooltip-light"
>
<template
slot=
"title"
>
<span>
{{
record
.
path
}}
</span>
<span>
{{
record
.
path
|
replacePathSep
}}
</span>
</
template
>
<a>
{{record.path | pathToRelated}}
</a>
</a-tooltip>
...
...
@@ -75,7 +75,7 @@
import
{
listInstances
,
removeInstances
}
from
"
../../../../api/manage
"
;
import
{
DesignComponent
}
from
'
../../../../components
'
import
{
PageSize
,
ResTypeInstances
,
pathToRelated
}
from
"
../../../../api/utils
"
;
import
{
PageSize
,
ResTypeInstances
,
pathToRelated
,
replacePathSep
}
from
"
../../../../api/utils
"
;
import
debounce
from
"
lodash.debounce
"
import
Edit
from
'
./Edit
'
;
...
...
@@ -154,6 +154,9 @@ export default {
mounted
()
{
},
filters
:
{
replacePathSep
:
function
(
path
)
{
return
replacePathSep
(
path
)
},
pathToRelated
:
function
(
path
)
{
return
pathToRelated
(
path
)
}
...
...
ui/src/views/data/buildin/ranges/List.vue
浏览文件 @
cae30cf4
...
...
@@ -4,7 +4,7 @@
<span
slot=
"folderWithPath"
slot-scope=
"text, record"
>
<a-tooltip
placement=
"top"
overlayClassName=
"tooltip-light"
>
<template
slot=
"title"
>
<span>
{{
record
.
path
}}
</span>
<span>
{{
record
.
path
|
replacePathSep
}}
</span>
</
template
>
<a>
{{record.path | pathToRelated}}
</a>
</a-tooltip>
...
...
@@ -77,7 +77,7 @@
import
{
listRanges
,
removeRanges
}
from
"
../../../../api/manage
"
;
import
{
DesignComponent
}
from
'
../../../../components
'
import
{
PageSize
,
pathToRelated
}
from
"
../../../../api/utils
"
;
import
{
PageSize
,
pathToRelated
,
replacePathSep
}
from
"
../../../../api/utils
"
;
import
debounce
from
"
lodash.debounce
"
import
Edit
from
'
./Edit
'
;
...
...
@@ -155,6 +155,9 @@ export default {
mounted
()
{
},
filters
:
{
replacePathSep
:
function
(
path
)
{
return
replacePathSep
(
path
)
},
pathToRelated
:
function
(
path
)
{
return
pathToRelated
(
path
)
}
...
...
ui/src/views/data/buildin/text/List.vue
浏览文件 @
cae30cf4
...
...
@@ -4,7 +4,7 @@
<span
slot=
"folderWithPath"
slot-scope=
"text, record"
>
<a-tooltip
placement=
"top"
overlayClassName=
"tooltip-light"
>
<template
slot=
"title"
>
<span>
{{
record
.
path
}}
</span>
<span>
{{
record
.
path
|
replacePathSep
}}
</span>
</
template
>
<a>
{{record.path | pathToRelated}}
</a>
</a-tooltip>
...
...
@@ -62,7 +62,7 @@
<
script
>
import
{
listText
,
removeText
}
from
"
../../../../api/manage
"
;
import
{
PageSize
,
pathToRelated
}
from
"
../../../../api/utils
"
;
import
{
PageSize
,
pathToRelated
,
replacePathSep
}
from
"
../../../../api/utils
"
;
import
debounce
from
"
lodash.debounce
"
import
Edit
from
'
./Edit
'
;
...
...
@@ -139,6 +139,9 @@ export default {
mounted
()
{
},
filters
:
{
replacePathSep
:
function
(
path
)
{
return
replacePathSep
(
path
)
},
pathToRelated
:
function
(
path
)
{
return
pathToRelated
(
path
)
}
...
...
ui/src/views/data/mine/List.vue
浏览文件 @
cae30cf4
...
...
@@ -19,7 +19,7 @@
<span
slot=
"folderWithPath"
slot-scope=
"text, record"
>
<a-tooltip
placement=
"top"
overlayClassName=
"tooltip-light"
>
<template
slot=
"title"
>
<span>
{{
record
.
path
}}
</span>
<span>
{{
record
.
path
|
replacePathSep
}}
</span>
</
template
>
<a>
{{record.path | pathToRelated}}
</a>
</a-tooltip>
...
...
@@ -76,7 +76,7 @@
import
{
Icon
,
Modal
}
from
'
ant-design-vue
'
import
{
listDef
,
removeDef
}
from
"
../../../api/manage
"
;
import
{
DesignComponent
}
from
'
../../../components
'
import
{
PageSize
,
ResTypeDef
,
pathToRelated
}
from
"
../../../api/utils
"
;
import
{
PageSize
,
ResTypeDef
,
replacePathSep
,
pathToRelated
}
from
"
../../../api/utils
"
;
import
debounce
from
"
lodash.debounce
"
import
Preview
from
'
./Preview
'
;
import
Edit
from
'
./Edit
'
;
...
...
@@ -144,6 +144,9 @@ export default {
mounted
()
{
},
filters
:
{
replacePathSep
:
function
(
path
)
{
return
replacePathSep
(
path
)
},
pathToRelated
:
function
(
path
)
{
return
pathToRelated
(
path
)
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录