Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
易企天创
zendata
提交
37cc644f
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,体验更适合开发者的 AI 搜索 >>
提交
37cc644f
编写于
11月 24, 2020
作者:
aaronchen2k2k
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix issues
上级
97966f8b
变更
31
隐藏空白更改
内联
并排
Showing
31 changed file
with
190 addition
and
186 deletion
+190
-186
src/model/domain.go
src/model/domain.go
+0
-1
src/server/service/common.go
src/server/service/common.go
+12
-1
src/server/service/config.go
src/server/service/config.go
+7
-4
src/server/service/def.go
src/server/service/def.go
+8
-3
src/server/service/excel.go
src/server/service/excel.go
+2
-3
src/server/service/instances.go
src/server/service/instances.go
+15
-4
src/server/service/ranges.go
src/server/service/ranges.go
+7
-4
src/server/service/text.go
src/server/service/text.go
+7
-4
src/server/utils/common.go
src/server/utils/common.go
+11
-6
tmp/cache/.data.db
tmp/cache/.data.db
+0
-0
ui/src/components/Design.vue
ui/src/components/Design.vue
+1
-1
ui/src/components/FieldRange.vue
ui/src/components/FieldRange.vue
+5
-5
ui/src/layout/ColLayout.vue
ui/src/layout/ColLayout.vue
+3
-5
ui/src/layout/Menu.vue
ui/src/layout/Menu.vue
+8
-7
ui/src/views/data/buildin/config/Edit.vue
ui/src/views/data/buildin/config/Edit.vue
+14
-22
ui/src/views/data/buildin/config/List.vue
ui/src/views/data/buildin/config/List.vue
+4
-3
ui/src/views/data/buildin/excel/Edit.vue
ui/src/views/data/buildin/excel/Edit.vue
+13
-21
ui/src/views/data/buildin/excel/List.vue
ui/src/views/data/buildin/excel/List.vue
+3
-2
ui/src/views/data/buildin/instances/Edit.vue
ui/src/views/data/buildin/instances/Edit.vue
+13
-21
ui/src/views/data/buildin/instances/List.vue
ui/src/views/data/buildin/instances/List.vue
+3
-2
ui/src/views/data/buildin/ranges/Edit.vue
ui/src/views/data/buildin/ranges/Edit.vue
+13
-21
ui/src/views/data/buildin/ranges/List.vue
ui/src/views/data/buildin/ranges/List.vue
+4
-2
ui/src/views/data/buildin/text/Edit.vue
ui/src/views/data/buildin/text/Edit.vue
+13
-21
ui/src/views/data/buildin/text/List.vue
ui/src/views/data/buildin/text/List.vue
+3
-2
ui/src/views/data/mine/Edit.vue
ui/src/views/data/mine/Edit.vue
+14
-16
ui/src/views/data/mine/List.vue
ui/src/views/data/mine/List.vue
+3
-2
users/test/_test-data.yaml
users/test/_test-data.yaml
+1
-1
yaml/test/_test-config.yaml
yaml/test/_test-config.yaml
+3
-2
yaml/zentao/ip/private.yaml
yaml/zentao/ip/private.yaml
+0
-0
yaml/zentao/number/v1.yaml
yaml/zentao/number/v1.yaml
+0
-0
yaml/zentao/users.txt
yaml/zentao/users.txt
+0
-0
未找到文件。
src/model/domain.go
浏览文件 @
37cc644f
...
...
@@ -174,5 +174,4 @@ type ResField struct {
type
Dir
struct
{
Name
string
`json:"name"`
Path
string
`json:-`
Children
[]
*
Dir
`json:"children"`
}
src/server/service/common.go
浏览文件 @
37cc644f
package
serverService
import
"github.com/easysoft/zendata/src/model"
import
(
"github.com/easysoft/zendata/src/model"
constant
"github.com/easysoft/zendata/src/utils/const"
)
func
zdFieldToFieldForExport
(
treeNode
model
.
ZdField
,
field
*
model
.
DefField
)
{
genFieldFromZdField
(
treeNode
,
field
)
...
...
@@ -40,8 +43,16 @@ func genFieldFromZdField(treeNode model.ZdField, field *model.DefField) () {
field
.
Loop
=
treeNode
.
Loop
field
.
Loopfix
=
treeNode
.
Loopfix
field
.
Format
=
treeNode
.
Format
field
.
Type
=
treeNode
.
Type
field
.
Mode
=
treeNode
.
Mode
if
field
.
Type
==
constant
.
FieldTypeList
{
field
.
Type
=
""
}
if
field
.
Mode
==
constant
.
ModeParallel
{
field
.
Mode
=
""
}
field
.
Length
=
treeNode
.
Length
field
.
LeftPad
=
treeNode
.
LeftPad
field
.
RightPad
=
treeNode
.
RightPad
...
...
src/server/service/config.go
浏览文件 @
37cc644f
...
...
@@ -25,13 +25,12 @@ func (s *ConfigService) List(keywords string, page int) (list []*model.ZdConfig,
return
}
func
(
s
*
ConfigService
)
Get
(
id
int
)
(
config
model
.
ZdConfig
,
dir
Tree
model
.
Dir
)
{
func
(
s
*
ConfigService
)
Get
(
id
int
)
(
config
model
.
ZdConfig
,
dir
s
[]
model
.
Dir
)
{
if
id
>
0
{
config
,
_
=
s
.
configRepo
.
Get
(
uint
(
id
))
}
dirTree
=
model
.
Dir
{
Name
:
fileUtils
.
AddSepIfNeeded
(
constant
.
ResDirYaml
)}
serverUtils
.
GetDirTree
(
&
dirTree
)
serverUtils
.
GetDirs
(
constant
.
ResDirYaml
,
&
dirs
)
return
}
...
...
@@ -139,7 +138,11 @@ func (s *ConfigService) SyncToDB(fi model.ResFile) (err error) {
po
.
Desc
=
fi
.
Desc
po
.
Path
=
fi
.
Path
po
.
Folder
=
serverUtils
.
GetRelativePath
(
po
.
Path
)
po
.
ReferName
=
service
.
PathToName
(
po
.
Path
,
constant
.
ResDirYaml
)
if
strings
.
Index
(
po
.
Path
,
constant
.
ResDirYaml
)
>
-
1
{
po
.
ReferName
=
service
.
PathToName
(
po
.
Path
,
constant
.
ResDirYaml
)
}
else
{
po
.
ReferName
=
service
.
PathToName
(
po
.
Path
,
constant
.
ResDirUsers
)
}
po
.
FileName
=
fileUtils
.
GetFileName
(
po
.
Path
)
po
.
Yaml
=
string
(
content
)
...
...
src/server/service/def.go
浏览文件 @
37cc644f
...
...
@@ -27,11 +27,10 @@ func (s *DefService) List(keywords string, page int) (list []*model.ZdDef, total
return
}
func
(
s
*
DefService
)
Get
(
id
int
)
(
def
model
.
ZdDef
,
dir
Tree
model
.
Dir
)
{
func
(
s
*
DefService
)
Get
(
id
int
)
(
def
model
.
ZdDef
,
dir
s
[]
model
.
Dir
)
{
def
,
_
=
s
.
defRepo
.
Get
(
uint
(
id
))
dirTree
=
model
.
Dir
{
Name
:
fileUtils
.
AddSepIfNeeded
(
constant
.
ResDirUsers
)}
serverUtils
.
GetDirTree
(
&
dirTree
)
serverUtils
.
GetDirs
(
constant
.
ResDirUsers
,
&
dirs
)
return
}
...
...
@@ -176,6 +175,12 @@ func (s *DefService) SyncToDB(fi model.ResFile) (err error) {
func
(
s
*
DefService
)
saveFieldToDB
(
item
*
model
.
ZdField
,
parentID
,
defID
uint
)
{
item
.
DefID
=
defID
item
.
ParentID
=
parentID
if
item
.
Type
==
""
{
item
.
Type
=
constant
.
FieldTypeList
}
if
item
.
Mode
==
""
{
item
.
Mode
=
constant
.
ModeParallel
}
s
.
fieldRepo
.
Save
(
item
)
for
_
,
child
:=
range
item
.
Fields
{
...
...
src/server/service/excel.go
浏览文件 @
37cc644f
...
...
@@ -22,11 +22,10 @@ func (s *ExcelService) List(keywords string, page int) (list []*model.ZdExcel, t
return
}
func
(
s
*
ExcelService
)
Get
(
id
int
)
(
excel
model
.
ZdExcel
,
dir
Tree
model
.
Dir
)
{
func
(
s
*
ExcelService
)
Get
(
id
int
)
(
excel
model
.
ZdExcel
,
dir
s
[]
model
.
Dir
)
{
excel
,
_
=
s
.
excelRepo
.
Get
(
uint
(
id
))
dirTree
=
model
.
Dir
{
Name
:
fileUtils
.
AddSepIfNeeded
(
constant
.
ResDirData
)}
serverUtils
.
GetDirTree
(
&
dirTree
)
serverUtils
.
GetDirs
(
constant
.
ResDirData
,
&
dirs
)
return
}
...
...
src/server/service/instances.go
浏览文件 @
37cc644f
...
...
@@ -26,11 +26,10 @@ func (s *InstancesService) List(keywords string, page int) (list []*model.ZdInst
return
}
func
(
s
*
InstancesService
)
Get
(
id
int
)
(
instances
model
.
ZdInstances
,
dir
Tree
model
.
Dir
)
{
func
(
s
*
InstancesService
)
Get
(
id
int
)
(
instances
model
.
ZdInstances
,
dir
s
[]
model
.
Dir
)
{
instances
,
_
=
s
.
instancesRepo
.
Get
(
uint
(
id
))
dirTree
=
model
.
Dir
{
Name
:
fileUtils
.
AddSepIfNeeded
(
constant
.
ResDirYaml
)}
serverUtils
.
GetDirTree
(
&
dirTree
)
serverUtils
.
GetDirs
(
constant
.
ResDirYaml
,
&
dirs
)
return
}
...
...
@@ -144,10 +143,15 @@ func (s *InstancesService) SyncToDB(file model.ResFile) (err error) {
err
=
yaml
.
Unmarshal
(
yamlContent
,
&
po
)
po
.
Title
=
file
.
Title
po
.
FileName
=
file
.
ReferName
po
.
Desc
=
file
.
Desc
po
.
Path
=
file
.
Path
po
.
Folder
=
serverUtils
.
GetRelativePath
(
po
.
Path
)
if
strings
.
Index
(
po
.
Path
,
constant
.
ResDirYaml
)
>
-
1
{
po
.
ReferName
=
service
.
PathToName
(
po
.
Path
,
constant
.
ResDirYaml
)
}
else
{
po
.
ReferName
=
service
.
PathToName
(
po
.
Path
,
constant
.
ResDirUsers
)
}
po
.
FileName
=
fileUtils
.
GetFileName
(
po
.
Path
)
po
.
Yaml
=
string
(
content
)
s
.
instancesRepo
.
Create
(
&
po
)
...
...
@@ -166,6 +170,13 @@ func (s *InstancesService) saveItemToDB(item *model.ZdInstancesItem, parentID, i
item
.
InstancesID
=
instancesID
item
.
ParentID
=
parentID
if
item
.
Type
==
""
{
item
.
Type
=
constant
.
FieldTypeList
}
if
item
.
Mode
==
""
{
item
.
Mode
=
constant
.
ModeParallel
}
s
.
instancesRepo
.
SaveItem
(
item
)
for
i
,
child
:=
range
item
.
Fields
{
...
...
src/server/service/ranges.go
浏览文件 @
37cc644f
...
...
@@ -25,11 +25,10 @@ func (s *RangesService) List(keywords string, page int) (list []*model.ZdRanges,
return
}
func
(
s
*
RangesService
)
Get
(
id
int
)
(
ranges
model
.
ZdRanges
,
dir
Tree
model
.
Dir
)
{
func
(
s
*
RangesService
)
Get
(
id
int
)
(
ranges
model
.
ZdRanges
,
dir
s
[]
model
.
Dir
)
{
ranges
,
_
=
s
.
rangesRepo
.
Get
(
uint
(
id
))
dirTree
=
model
.
Dir
{
Name
:
fileUtils
.
AddSepIfNeeded
(
constant
.
ResDirYaml
)}
serverUtils
.
GetDirTree
(
&
dirTree
)
serverUtils
.
GetDirs
(
constant
.
ResDirYaml
,
&
dirs
)
return
}
...
...
@@ -111,7 +110,11 @@ func (s *RangesService) SyncToDB(fi model.ResFile) (err error) {
po
.
Desc
=
fi
.
Desc
po
.
Path
=
fi
.
Path
po
.
Folder
=
serverUtils
.
GetRelativePath
(
po
.
Path
)
po
.
ReferName
=
service
.
PathToName
(
po
.
Path
,
constant
.
ResDirYaml
)
if
strings
.
Index
(
po
.
Path
,
constant
.
ResDirYaml
)
>
-
1
{
po
.
ReferName
=
service
.
PathToName
(
po
.
Path
,
constant
.
ResDirYaml
)
}
else
{
po
.
ReferName
=
service
.
PathToName
(
po
.
Path
,
constant
.
ResDirUsers
)
}
po
.
FileName
=
fileUtils
.
GetFileName
(
po
.
Path
)
po
.
Yaml
=
string
(
content
)
...
...
src/server/service/text.go
浏览文件 @
37cc644f
...
...
@@ -23,11 +23,10 @@ func (s *TextService) List(keywords string, page int) (list []*model.ZdText, tot
return
}
func
(
s
*
TextService
)
Get
(
id
int
)
(
text
model
.
ZdText
,
dir
Tree
model
.
Dir
)
{
func
(
s
*
TextService
)
Get
(
id
int
)
(
text
model
.
ZdText
,
dir
s
[]
model
.
Dir
)
{
text
,
_
=
s
.
textRepo
.
Get
(
uint
(
id
))
dirTree
=
model
.
Dir
{
Name
:
fileUtils
.
AddSepIfNeeded
(
constant
.
ResDirYaml
)}
serverUtils
.
GetDirTree
(
&
dirTree
)
serverUtils
.
GetDirs
(
constant
.
ResDirYaml
,
&
dirs
)
return
}
...
...
@@ -107,9 +106,13 @@ func (s *TextService) SyncToDB(file model.ResFile) (err error) {
Title
:
file
.
Title
,
Path
:
file
.
Path
,
Folder
:
serverUtils
.
GetRelativePath
(
file
.
Path
),
ReferName
:
service
.
PathToName
(
file
.
Path
,
constant
.
ResDirYaml
),
FileName
:
fileUtils
.
GetFileName
(
file
.
Path
),
}
if
strings
.
Index
(
text
.
Path
,
constant
.
ResDirYaml
)
>
-
1
{
text
.
ReferName
=
service
.
PathToName
(
text
.
Path
,
constant
.
ResDirYaml
)
}
else
{
text
.
ReferName
=
service
.
PathToName
(
text
.
Path
,
constant
.
ResDirUsers
)
}
text
.
Content
=
fileUtils
.
ReadFile
(
file
.
Path
)
s
.
textRepo
.
Create
(
&
text
)
...
...
src/server/utils/common.go
浏览文件 @
37cc644f
...
...
@@ -2,6 +2,7 @@ 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"
...
...
@@ -110,8 +111,14 @@ func AddExt(pth, ext string) string {
return
pth
}
func
GetDirTree
(
parent
*
model
.
Dir
)
{
folder
:=
parent
.
Name
func
GetDirs
(
dir
string
,
dirs
*
[]
model
.
Dir
)
{
if
strings
.
Contains
(
dir
,
fmt
.
Sprintf
(
"yaml%sarticle"
,
constant
.
PthSep
))
{
return
}
folder
:=
fileUtils
.
AddSepIfNeeded
(
dir
)
*
dirs
=
append
(
*
dirs
,
model
.
Dir
{
Name
:
dir
})
files
,
_
:=
ioutil
.
ReadDir
(
folder
)
for
_
,
fi
:=
range
files
{
name
:=
fi
.
Name
()
...
...
@@ -119,10 +126,8 @@ func GetDirTree(parent *model.Dir) {
continue
}
childFolder
:=
fileUtils
.
AddSepIfNeeded
(
folder
+
name
)
child
:=
&
model
.
Dir
{
Name
:
childFolder
}
parent
.
Children
=
append
(
parent
.
Children
,
child
)
GetDirTree
(
child
)
childFolder
:=
folder
+
name
GetDirs
(
childFolder
,
dirs
)
}
return
...
...
tmp/cache/.data.db
浏览文件 @
37cc644f
无法预览此类型文件
ui/src/components/Design.vue
浏览文件 @
37cc644f
...
...
@@ -55,7 +55,7 @@
</div>
</a-tab-pane>
<a-tab-pane
key=
"range"
tab=
"
配置区间
"
force-render
>
<a-tab-pane
key=
"range"
tab=
"
取值范围
"
force-render
>
<div>
<field-range-component
ref=
"rangeComp"
...
...
ui/src/components/FieldRange.vue
浏览文件 @
37cc644f
...
...
@@ -26,9 +26,9 @@
<a-col
:span=
"col"
>
<a-form-model-item
prop=
"range"
:wrapperCol=
"wrapperColFull"
>
<a-select
v-model=
"item.type"
>
<a-select-option
value=
"scope"
>
范围
</a-select-option>
<a-select-option
value=
"arr"
>
数组
</a-select-option>
<a-select-option
value=
"const"
>
字面
常量
</a-select-option>
<a-select-option
value=
"scope"
>
区间
</a-select-option>
<a-select-option
value=
"arr"
>
列表
</a-select-option>
<a-select-option
value=
"const"
>
常量
</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
...
...
@@ -93,7 +93,7 @@
<div
v-if=
"section.type==='arr'"
>
<a-row
:gutter=
"cols"
>
<a-col
:span=
"cols"
>
<a-form-model-item
label=
"
数组
"
prop=
"text"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-form-model-item
label=
"
列表
"
prop=
"text"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-input
v-model=
"section.text"
type=
"textarea"
rows=
"3"
/>
每行一个值
</a-form-model-item>
...
...
@@ -104,7 +104,7 @@
<div
v-if=
"section.type==='const'"
>
<a-row
:gutter=
"cols"
>
<a-col
:span=
"cols"
>
<a-form-model-item
label=
"
字面
常量"
prop=
"text"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-form-model-item
label=
"常量"
prop=
"text"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-input
v-model=
"section.text"
placeholder=
""
/>
</a-form-model-item>
</a-col>
...
...
ui/src/layout/ColLayout.vue
浏览文件 @
37cc644f
...
...
@@ -3,7 +3,7 @@
<div
class=
"left"
>
<Menu></Menu>
<div
class=
"sync"
>
<a-button
@
click=
"syncData"
size=
"small"
type=
"primary"
>
同步
数据
</a-button>
<a-button
@
click=
"syncData"
size=
"small"
type=
"primary"
>
刷新
数据
</a-button>
</div>
</div>
<div
class=
"content"
>
...
...
@@ -38,11 +38,9 @@ export default {
console
.
log
(
'
syncData
'
,
json
)
if
(
json
.
code
==
1
)
{
this
.
$notification
[
'
success
'
]({
message
:
'
提示
'
,
description
:
'
成功同步资源和数据!
'
,
message
:
'
成功刷新资源和数据!
'
,
placement
:
'
bottomLeft
'
,
duration
:
0.5
,
duration
:
3
,
});
}
})
...
...
ui/src/layout/Menu.vue
浏览文件 @
37cc644f
...
...
@@ -12,20 +12,21 @@
<a-sub-menu
key=
"buildin"
@
titleClick=
"titleClick"
>
<span
slot=
"title"
><span>
內置数据
</span></span>
<a-menu-item
key=
"buildin/config/list"
>
字段
</a-menu-item>
<a-menu-item
key=
"buildin/ranges/list"
>
序列
(Ranges)
序列
</a-menu-item>
<a-menu-item
key=
"buildin/instances/list"
>
实例(Instances)
</a-menu-item>
<a-menu-item
key=
"buildin/config/list"
>
配置(Config)
实例
</a-menu-item>
<a-menu-item
key=
"buildin/text/list"
>
文本
(Text)
文本
</a-menu-item>
<a-menu-item
key=
"buildin/excel/list"
>
表格
(Excel)
表格
</a-menu-item>
</a-sub-menu>
</a-menu>
...
...
ui/src/views/data/buildin/config/Edit.vue
浏览文件 @
37cc644f
...
...
@@ -2,7 +2,7 @@
<div>
<div
class=
"head"
>
<div
class=
"title"
>
配置
<span
v-if=
"id!=0"
>
编辑
</span><span
v-if=
"id==0"
>
新建
</span>
字段
<span
v-if=
"id!=0"
>
编辑
</span><span
v-if=
"id==0"
>
新建
</span>
</div>
<div
class=
"filter"
></div>
<div
class=
"buttons"
>
...
...
@@ -17,35 +17,28 @@
<a-input
v-model=
"model.title"
/>
</a-form-model-item>
</a-row>
<a-row
:gutter=
"colsFull"
>
<a-form-model-item
label=
"文件名"
prop=
"fileName"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-input
v-model=
"model.fileName"
/>
</a-form-model-item>
</a-row>
<a-row
:gutter=
"colsFull"
>
<a-form-model-item
label=
"引用名"
prop=
"fileName"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
{{
model
.
referName
}}
</a-form-model-item>
</a-row>
<a-row
:gutter=
"colsFull"
>
<a-form-model-item
label=
"目录"
prop=
"folder"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-input
v-model=
"model.folder"
>
<a-
tree-
select
<a-select
slot=
"addonAfter"
v-model=
"model.folder"
style=
"width: 400px"
:dropdown-style=
"
{ maxHeight: '400px', overflow: 'auto' }"
:tree-data="dirTreeData"
placeholder="请选择"
tree-default-expand-all
:replaceFields="dirFieldMap"
>
</a-tree-select>
placeholder=
"请选择"
>
<a-select-option
v-for=
"(item, index) in dirs"
:value=
"item.name"
:title=
"item.name"
:key=
"index"
>
{{
item
.
name
}}
</a-select-option>
</a-select>
</a-input>
</a-form-model-item>
</a-row>
<a-row
:gutter=
"colsFull"
>
<a-form-model-item
label=
"文件名"
prop=
"fileName"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-input
v-model=
"model.fileName"
/>
</a-form-model-item>
</a-row>
<a-row
:gutter=
"colsFull"
>
<a-form-model-item
label=
"定义"
prop=
"range"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-input
v-model=
"model.range"
/>
...
...
@@ -147,8 +140,7 @@ export default {
id
:
0
,
model
:
{
folder
:
'
yaml/
'
},
dirTreeData
:
[],
dirFieldMap
:
{
children
:
'
children
'
,
title
:
'
name
'
,
key
:
'
name
'
,
value
:
'
name
'
}
dirs
:
[],
};
},
...
...
@@ -167,7 +159,7 @@ export default {
getConfig
(
this
.
id
).
then
(
json
=>
{
console
.
log
(
'
getConfig
'
,
json
)
this
.
model
=
json
.
data
this
.
dir
TreeData
=
[
json
.
res
]
this
.
dir
s
=
json
.
res
})
},
save
()
{
...
...
ui/src/views/data/buildin/config/List.vue
浏览文件 @
37cc644f
<
template
>
<div>
<div
class=
"head"
>
<div
class=
"title"
>
配置
列表
</div>
<div
class=
"title"
>
字段
列表
</div>
<div
class=
"filter"
>
<a-input-search
v-model=
"keywords"
@
change=
"onSearch"
:allowClear=
"true"
placeholder=
"输入关键字检索"
style=
"width: 300px"
/>
</div>
...
...
@@ -118,8 +118,9 @@ export default {
})
},
onPageChange
()
{
console
.
log
(
'
onPageChange
'
)
onPageChange
(
page
,
pageSize
)
{
console
.
log
(
'
onPageChange
'
,
page
,
pageSize
)
this
.
page
=
page
this
.
loadData
()
},
onSearch
:
debounce
(
function
()
{
...
...
ui/src/views/data/buildin/excel/Edit.vue
浏览文件 @
37cc644f
...
...
@@ -17,35 +17,28 @@
<a-input
v-model=
"model.title"
/>
</a-form-model-item>
</a-row>
<a-row
:gutter=
"colsFull"
>
<a-form-model-item
label=
"文件名"
prop=
"fileName"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-input
v-model=
"model.fileName"
/>
</a-form-model-item>
</a-row>
<a-row
:gutter=
"colsFull"
>
<a-form-model-item
label=
"引用名"
prop=
"fileName"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
{{
model
.
referName
}}
</a-form-model-item>
</a-row>
<a-row
:gutter=
"colsFull"
>
<a-form-model-item
label=
"目录"
prop=
"folder"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-input
v-model=
"model.folder"
>
<a-
tree-
select
<a-select
slot=
"addonAfter"
v-model=
"model.folder"
style=
"width: 400px"
:dropdown-style=
"
{ maxHeight: '400px', overflow: 'auto' }"
:tree-data="dirTreeData"
placeholder="请选择"
tree-default-expand-all
:replaceFields="dirFieldMap"
>
</a-tree-select>
placeholder=
"请选择"
>
<a-select-option
v-for=
"(item, index) in dirs"
:value=
"item.name"
:key=
"index"
>
{{
item
.
name
}}
</a-select-option>
</a-select>
</a-input>
</a-form-model-item>
</a-row>
<a-row
:gutter=
"colsFull"
>
<a-form-model-item
label=
"文件名"
prop=
"fileName"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-input
v-model=
"model.fileName"
/>
</a-form-model-item>
</a-row>
<a-row
:gutter=
"colsFull"
>
<a-form-model-item
class=
"center"
>
<a-button
@
click=
"save"
type=
"primary"
>
保存
</a-button>
...
...
@@ -86,8 +79,7 @@ export default {
id
:
0
,
model
:
{
folder
:
'
data/
'
},
dirTreeData
:
[],
dirFieldMap
:
{
children
:
'
children
'
,
title
:
'
name
'
,
key
:
'
name
'
,
value
:
'
name
'
}
dirs
:
[],
};
},
...
...
@@ -108,7 +100,7 @@ export default {
getExcel
(
this
.
id
).
then
(
json
=>
{
console
.
log
(
'
getText
'
,
json
)
this
.
model
=
json
.
data
this
.
dir
TreeData
=
[
json
.
res
]
this
.
dir
s
=
json
.
res
})
},
save
()
{
...
...
ui/src/views/data/buildin/excel/List.vue
浏览文件 @
37cc644f
...
...
@@ -127,8 +127,9 @@ export default {
this
.
designVisible
=
false
},
onPageChange
()
{
console
.
log
(
'
onPageChange
'
)
onPageChange
(
page
,
pageSize
)
{
console
.
log
(
'
onPageChange
'
,
page
,
pageSize
)
this
.
page
=
page
this
.
loadData
()
},
onSearch
:
debounce
(
function
()
{
...
...
ui/src/views/data/buildin/instances/Edit.vue
浏览文件 @
37cc644f
...
...
@@ -17,35 +17,28 @@
<a-input
v-model=
"model.title"
/>
</a-form-model-item>
</a-row>
<a-row
:gutter=
"colsFull"
>
<a-form-model-item
label=
"文件名"
prop=
"fileName"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-input
v-model=
"model.fileName"
/>
</a-form-model-item>
</a-row>
<a-row
:gutter=
"colsFull"
>
<a-form-model-item
label=
"引用名"
prop=
"fileName"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
{{
model
.
referName
}}
</a-form-model-item>
</a-row>
<a-row
:gutter=
"colsFull"
>
<a-form-model-item
label=
"目录"
prop=
"folder"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-input
v-model=
"model.folder"
>
<a-
tree-
select
<a-select
slot=
"addonAfter"
v-model=
"model.folder"
style=
"width: 400px"
:dropdown-style=
"
{ maxHeight: '400px', overflow: 'auto' }"
:tree-data="dirTreeData"
placeholder="请选择"
tree-default-expand-all
:replaceFields="dirFieldMap"
>
</a-tree-select>
placeholder=
"请选择"
>
<a-select-option
v-for=
"(item, index) in dirs"
:value=
"item.name"
:key=
"index"
>
{{
item
.
name
}}
</a-select-option>
</a-select>
</a-input>
</a-form-model-item>
</a-row>
<a-row
:gutter=
"colsFull"
>
<a-form-model-item
label=
"文件名"
prop=
"fileName"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-input
v-model=
"model.fileName"
/>
</a-form-model-item>
</a-row>
<a-row
:gutter=
"colsFull"
>
<a-col
:span=
"colsHalf"
>
<a-form-model-item
label=
"前缀"
prop=
"prefix"
:labelCol=
"labelColHalf"
:wrapperCol=
"wrapperColHalf"
>
...
...
@@ -125,8 +118,7 @@ export default {
id
:
0
,
model
:
{
folder
:
'
yaml/
'
},
dirTreeData
:
[],
dirFieldMap
:
{
children
:
'
children
'
,
title
:
'
name
'
,
key
:
'
name
'
,
value
:
'
name
'
}
dirs
:
[],
};
},
...
...
@@ -147,7 +139,7 @@ export default {
getInstances
(
this
.
id
).
then
(
json
=>
{
console
.
log
(
'
getInstances
'
,
json
)
this
.
model
=
json
.
data
this
.
dir
TreeData
=
[
json
.
res
]
this
.
dir
s
=
json
.
res
})
},
save
()
{
...
...
ui/src/views/data/buildin/instances/List.vue
浏览文件 @
37cc644f
...
...
@@ -149,8 +149,9 @@ export default {
this
.
designVisible
=
false
},
onPageChange
()
{
console
.
log
(
'
onPageChange
'
)
onPageChange
(
page
,
pageSize
)
{
console
.
log
(
'
onPageChange
'
,
page
,
pageSize
)
this
.
page
=
page
this
.
loadData
()
},
onSearch
:
debounce
(
function
()
{
...
...
ui/src/views/data/buildin/ranges/Edit.vue
浏览文件 @
37cc644f
...
...
@@ -17,35 +17,28 @@
<a-input
v-model=
"model.title"
/>
</a-form-model-item>
</a-row>
<a-row
:gutter=
"colsFull"
>
<a-form-model-item
label=
"文件名"
prop=
"fileName"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-input
v-model=
"model.fileName"
/>
</a-form-model-item>
</a-row>
<a-row
:gutter=
"colsFull"
>
<a-form-model-item
label=
"引用名"
prop=
"fileName"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
{{
model
.
referName
}}
</a-form-model-item>
</a-row>
<a-row
:gutter=
"colsFull"
>
<a-form-model-item
label=
"目录"
prop=
"folder"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-input
v-model=
"model.folder"
>
<a-
tree-
select
<a-select
slot=
"addonAfter"
v-model=
"model.folder"
style=
"width: 400px"
:dropdown-style=
"
{ maxHeight: '400px', overflow: 'auto' }"
:tree-data="dirTreeData"
placeholder="请选择"
tree-default-expand-all
:replaceFields="dirFieldMap"
>
</a-tree-select>
placeholder=
"请选择"
>
<a-select-option
v-for=
"(item, index) in dirs"
:value=
"item.name"
:key=
"index"
>
{{
item
.
name
}}
</a-select-option>
</a-select>
</a-input>
</a-form-model-item>
</a-row>
<a-row
:gutter=
"colsFull"
>
<a-form-model-item
label=
"文件名"
prop=
"fileName"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-input
v-model=
"model.fileName"
/>
</a-form-model-item>
</a-row>
<a-row
:gutter=
"colsFull"
>
<a-col
:span=
"colsHalf"
>
<a-form-model-item
label=
"前缀"
prop=
"prefix"
:labelCol=
"labelColHalf"
:wrapperCol=
"wrapperColHalf"
>
...
...
@@ -125,8 +118,7 @@ export default {
id
:
0
,
model
:
{
folder
:
'
yaml/
'
},
dirTreeData
:
[],
dirFieldMap
:
{
children
:
'
children
'
,
title
:
'
name
'
,
key
:
'
name
'
,
value
:
'
name
'
}
dirs
:
[],
};
},
...
...
@@ -147,7 +139,7 @@ export default {
getRanges
(
this
.
id
).
then
(
json
=>
{
console
.
log
(
'
getRanges
'
,
json
)
this
.
model
=
json
.
data
this
.
dir
TreeData
=
[
json
.
res
]
this
.
dir
s
=
json
.
res
})
},
save
()
{
...
...
ui/src/views/data/buildin/ranges/List.vue
浏览文件 @
37cc644f
...
...
@@ -115,6 +115,7 @@ export default {
this
.
$router
.
push
({
path
:
'
/data/buildin/ranges/edit/0
'
});
},
loadData
()
{
this
.
page
=
this
.
current
listRanges
(
this
.
keywords
,
this
.
page
).
then
(
json
=>
{
console
.
log
(
'
listRanges
'
,
json
)
this
.
models
=
json
.
data
...
...
@@ -148,8 +149,9 @@ export default {
this
.
designVisible
=
false
},
onPageChange
()
{
console
.
log
(
'
onPageChange
'
)
onPageChange
(
page
,
pageSize
)
{
console
.
log
(
'
onPageChange
'
,
page
,
pageSize
)
this
.
page
=
page
this
.
loadData
()
},
onSearch
:
debounce
(
function
()
{
...
...
ui/src/views/data/buildin/text/Edit.vue
浏览文件 @
37cc644f
...
...
@@ -17,35 +17,28 @@
<a-input
v-model=
"model.title"
/>
</a-form-model-item>
</a-row>
<a-row
:gutter=
"colsFull"
>
<a-form-model-item
label=
"文件名"
prop=
"fileName"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-input
v-model=
"model.fileName"
/>
</a-form-model-item>
</a-row>
<a-row
:gutter=
"colsFull"
>
<a-form-model-item
label=
"引用名"
prop=
"fileName"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
{{
model
.
referName
}}
</a-form-model-item>
</a-row>
<a-row
:gutter=
"colsFull"
>
<a-form-model-item
label=
"目录"
prop=
"folder"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-input
v-model=
"model.folder"
>
<a-
tree-
select
<a-select
slot=
"addonAfter"
v-model=
"model.folder"
style=
"width: 400px"
:dropdown-style=
"
{ maxHeight: '400px', overflow: 'auto' }"
:tree-data="dirTreeData"
placeholder="请选择"
tree-default-expand-all
:replaceFields="dirFieldMap"
>
</a-tree-select>
placeholder=
"请选择"
>
<a-select-option
v-for=
"(item, index) in dirs"
:value=
"item.name"
:key=
"index"
>
{{
item
.
name
}}
</a-select-option>
</a-select>
</a-input>
</a-form-model-item>
</a-row>
<a-row
:gutter=
"colsFull"
>
<a-form-model-item
label=
"文件名"
prop=
"fileName"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-input
v-model=
"model.fileName"
/>
</a-form-model-item>
</a-row>
<a-row
:gutter=
"colsFull"
>
<a-form-model-item
label=
"内容"
prop=
"content"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-input
v-model=
"model.content"
type=
"textarea"
rows=
"3"
/>
...
...
@@ -92,8 +85,7 @@ export default {
id
:
0
,
model
:
{
folder
:
'
yaml/
'
},
dirTreeData
:
[],
dirFieldMap
:
{
children
:
'
children
'
,
title
:
'
name
'
,
key
:
'
name
'
,
value
:
'
name
'
}
dirs
:
[],
};
},
...
...
@@ -114,7 +106,7 @@ export default {
getText
(
this
.
id
).
then
(
json
=>
{
console
.
log
(
'
getText
'
,
json
)
this
.
model
=
json
.
data
this
.
dir
TreeData
=
[
json
.
res
]
this
.
dir
s
=
json
.
res
})
},
save
()
{
...
...
ui/src/views/data/buildin/text/List.vue
浏览文件 @
37cc644f
...
...
@@ -127,8 +127,9 @@ export default {
this
.
designVisible
=
false
},
onPageChange
()
{
console
.
log
(
'
onPageChange
'
)
onPageChange
(
page
,
pageSize
)
{
console
.
log
(
'
onPageChange
'
,
page
,
pageSize
)
this
.
page
=
page
this
.
loadData
()
},
onSearch
:
debounce
(
function
()
{
...
...
ui/src/views/data/mine/Edit.vue
浏览文件 @
37cc644f
...
...
@@ -15,32 +15,31 @@
<a-form-model-item
label=
"名称"
prop=
"title"
>
<a-input
v-model=
"model.title"
/>
</a-form-model-item>
<a-form-model-item
label=
"文件名"
prop=
"fileName"
>
<a-input
v-model=
"model.fileName"
/>
</a-form-model-item>
<a-form-model-item
label=
"目录"
prop=
"folder"
>
<a-input
v-model=
"model.folder"
>
<a-
tree-
select
<a-select
slot=
"addonAfter"
v-model=
"model.folder"
style=
"width: 400px"
:dropdown-style=
"
{ maxHeight: '400px', overflow: 'auto' }"
:tree-data="dirTreeData"
placeholder="请选择"
tree-default-expand-all
:replaceFields="dirFieldMap"
>
</a-tree-select>
placeholder=
"请选择"
>
<a-select-option
v-for=
"(item, index) in dirs"
:value=
"item.name"
:key=
"index"
>
{{
item
.
name
}}
</a-select-option>
</a-select>
</a-input>
</a-form-model-item>
<a-form-model-item
label=
"类型"
prop=
"type"
>
<a-form-model-item
label=
"文件名"
prop=
"fileName"
>
<a-input
v-model=
"model.fileName"
/>
</a-form-model-item>
<!--
<a-form-model-item
label=
"类型"
prop=
"type"
>
<a-select
v-model=
"model.type"
>
<a-select-option
value=
"text"
>
字符串
</a-select-option>
<a-select-option
value=
"article"
>
文章
</a-select-option>
</a-select>
</a-form-model-item>
</a-form-model-item>
-->
<a-form-model-item
label=
"描述"
prop=
"desc"
>
<a-input
v-model=
"model.desc"
type=
"textarea"
rows=
"3"
/>
</a-form-model-item>
...
...
@@ -80,8 +79,7 @@ export default {
},
id
:
0
,
model
:
{
folder
:
'
users/
'
,
type
:
'
text
'
},
dirTreeData
:
[],
dirFieldMap
:
{
children
:
'
children
'
,
title
:
'
name
'
,
key
:
'
name
'
,
value
:
'
name
'
}
dirs
:
[],
};
},
computed
:
{
...
...
@@ -95,7 +93,7 @@ export default {
getDef
(
this
.
id
).
then
(
json
=>
{
console
.
log
(
'
getDef
'
,
json
)
this
.
model
=
json
.
data
this
.
dir
TreeData
=
[
json
.
res
]
this
.
dir
s
=
json
.
res
})
},
mounted
()
{
...
...
ui/src/views/data/mine/List.vue
浏览文件 @
37cc644f
...
...
@@ -149,8 +149,9 @@ export default {
this
.
designVisible
=
false
},
onPageChange
()
{
console
.
log
(
'
onPageChange
'
)
onPageChange
(
page
,
pageSize
)
{
console
.
log
(
'
onPageChange
'
,
page
,
pageSize
)
this
.
page
=
page
this
.
loadData
()
},
onSearch
:
debounce
(
function
()
{
...
...
users/test/_test-data.yaml
浏览文件 @
37cc644f
title
:
数据测试
title
:
数据测试
2
desc
:
数据测试
fields
:
-
field
:
field_with_children
...
...
yaml/test/_test-config.yaml
浏览文件 @
37cc644f
title
:
配置测试
desc
:
配置测试
title
:
字段测试
desc
:
字段测试
range
:
1-9
prefix
:
"
\t
"
postfix
:
"
\t
"
...
...
users
/zentao/ip/private.yaml
→
yaml
/zentao/ip/private.yaml
浏览文件 @
37cc644f
文件已移动
users
/zentao/number/v1.yaml
→
yaml
/zentao/number/v1.yaml
浏览文件 @
37cc644f
文件已移动
users
/zentao/users.txt
→
yaml
/zentao/users.txt
浏览文件 @
37cc644f
文件已移动
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录