Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
易企天创
zendata
提交
c31e1067
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 搜索 >>
提交
c31e1067
编写于
12月 07, 2020
作者:
aaronchen2k2k
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
i118
上级
a622ae78
变更
23
隐藏空白更改
内联
并排
Showing
23 changed file
with
428 addition
and
421 deletion
+428
-421
tmp/cache/.data.db
tmp/cache/.data.db
+0
-0
ui/src/api/utils.js
ui/src/api/utils.js
+5
-3
ui/src/components/FieldInfo.vue
ui/src/components/FieldInfo.vue
+7
-7
ui/src/config/bootstrap.js
ui/src/config/bootstrap.js
+0
-0
ui/src/layout/ColLayout.vue
ui/src/layout/ColLayout.vue
+2
-2
ui/src/layout/Header.vue
ui/src/layout/Header.vue
+3
-3
ui/src/layout/Menu.vue
ui/src/layout/Menu.vue
+12
-14
ui/src/locales/lang/en-US.js
ui/src/locales/lang/en-US.js
+65
-0
ui/src/locales/lang/zh-CN.js
ui/src/locales/lang/zh-CN.js
+14
-14
ui/src/main.js
ui/src/main.js
+2
-11
ui/src/views/Index.vue
ui/src/views/Index.vue
+0
-33
ui/src/views/data/buildin/config/Edit.vue
ui/src/views/data/buildin/config/Edit.vue
+70
-53
ui/src/views/data/buildin/config/List.vue
ui/src/views/data/buildin/config/List.vue
+29
-28
ui/src/views/data/buildin/excel/Edit.vue
ui/src/views/data/buildin/excel/Edit.vue
+14
-12
ui/src/views/data/buildin/excel/List.vue
ui/src/views/data/buildin/excel/List.vue
+28
-27
ui/src/views/data/buildin/instances/Edit.vue
ui/src/views/data/buildin/instances/Edit.vue
+17
-35
ui/src/views/data/buildin/instances/List.vue
ui/src/views/data/buildin/instances/List.vue
+29
-28
ui/src/views/data/buildin/ranges/Edit.vue
ui/src/views/data/buildin/ranges/Edit.vue
+17
-35
ui/src/views/data/buildin/ranges/List.vue
ui/src/views/data/buildin/ranges/List.vue
+29
-28
ui/src/views/data/buildin/text/Edit.vue
ui/src/views/data/buildin/text/Edit.vue
+15
-13
ui/src/views/data/buildin/text/List.vue
ui/src/views/data/buildin/text/List.vue
+28
-27
ui/src/views/data/mine/Edit.vue
ui/src/views/data/mine/Edit.vue
+13
-20
ui/src/views/data/mine/List.vue
ui/src/views/data/mine/List.vue
+29
-28
未找到文件。
tmp/cache/.data.db
浏览文件 @
c31e1067
无法预览此类型文件
ui/src/api/utils.js
浏览文件 @
c31e1067
...
...
@@ -7,6 +7,8 @@ const ResTypeInstances = "instances"
const
ResTypeConfig
=
"
config
"
export
{
PageSize
,
ResTypeDef
,
ResTypeRanges
,
ResTypeInstances
,
ResTypeConfig
}
import
{
i18nRender
}
from
'
../locales
'
export
function
checkLoop
(
rule
,
value
,
callback
){
console
.
log
(
'
checkLoop
'
,
value
)
...
...
@@ -23,7 +25,7 @@ export function checkDirIsYaml (rule, value, callback){
console
.
log
(
'
checkDirIsYaml
'
,
value
)
if
(
value
.
indexOf
(
'
yaml/
'
)
!=
0
)
{
callback
(
'
存放资源的目录必须以yaml/
'
)
callback
(
i18nRender
(
'
valid.folder.yaml
'
)
)
}
callback
()
...
...
@@ -32,7 +34,7 @@ export function checkDirIsData (rule, value, callback){
console
.
log
(
'
checkDirIsData
'
,
value
)
if
(
value
.
indexOf
(
'
data/
'
)
!=
0
)
{
callback
(
'
存放Excel的目录必须以data/
'
)
callback
(
i18nRender
(
'
valid.folder.data
'
)
)
}
callback
()
...
...
@@ -41,7 +43,7 @@ export function checkDirIsUsers (rule, value, callback){
console
.
log
(
'
checkDirIsUsers
'
,
value
)
if
(
value
.
indexOf
(
'
users/
'
)
!=
0
)
{
callback
(
'
存放数据的目录必须以users/
'
)
callback
(
i18nRender
(
'
valid.folder.users
'
)
)
}
callback
()
...
...
ui/src/components/FieldInfo.vue
浏览文件 @
c31e1067
...
...
@@ -2,19 +2,19 @@
<div>
<a-form-model
ref=
"editForm"
:model=
"model"
:rules=
"rules"
>
<a-row
:gutter=
"colsFull"
>
<a-form-model-item
label=
"名称
"
prop=
"field"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-form-model-item
:label=
"$t('form.name')
"
prop=
"field"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-input
v-model=
"model.field"
/>
</a-form-model-item>
</a-row>
<a-row
:gutter=
"colsFull"
>
<a-form-model-item
label=
"前缀
"
:labelCol=
"labelColFull"
class=
"zui-input-group"
>
<a-form-model-item
:label=
"$t('form.prefix')
"
:labelCol=
"labelColFull"
class=
"zui-input-group"
>
<a-form-model-item
prop=
"prefix"
:style=
"
{ display: 'inline-block', width: 'calc(40% - 35px)' }">
<a-input
v-model=
"model.prefix"
/>
</a-form-model-item>
<span
class=
"zui-input-group-addon"
:style=
"
{ width: '60px' }">
<span>
后缀
</span>
<span>
{{
$t
(
'
form.postfix
'
)
}}
</span>
</span>
<a-form-model-item
prop=
"postfix"
:style=
"
{ display: 'inline-block', width: 'calc(27% - 30px)' }">
...
...
@@ -24,14 +24,14 @@
</a-row>
<a-row
:gutter=
"colsFull"
>
<a-form-model-item
label=
"循环
"
:labelCol=
"labelColFull"
class=
"zui-input-group"
>
<a-form-model-item
:label=
"$t('form.loop')
"
:labelCol=
"labelColFull"
class=
"zui-input-group"
>
<a-form-model-item
prop=
"loop"
:style=
"
{ display: 'inline-block', width: 'calc(40% - 35px)' }">
<a-input
v-model=
"model.loop"
placeholder=
"数字3,或区间1-3
"
/>
<a-input
v-model=
"model.loop"
:placeholder=
"$t('tips.range.int')
"
/>
</a-form-model-item>
<span
class=
"zui-input-group-addon"
:style=
"
{ width: '60px' }">
<span>
间隔
</span>
</span>
<span>
:label="$t('form.loopfix')"
</span>
</span>
<a-form-model-item
prop=
"loopfix"
:style=
"
{ display: 'inline-block', width: 'calc(27% - 30px)' }">
<a-input
v-model=
"model.loopfix"
/>
...
...
ui/src/co
re
/bootstrap.js
→
ui/src/co
nfig
/bootstrap.js
浏览文件 @
c31e1067
文件已移动
ui/src/layout/ColLayout.vue
浏览文件 @
c31e1067
...
...
@@ -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"
>
{{
$t
(
'
action.import.from.file
'
)
}}
</a-button>
</div>
</div>
<div
class=
"content"
>
...
...
@@ -38,7 +38,7 @@ export default {
console
.
log
(
'
syncData
'
,
json
)
if
(
json
.
code
==
1
)
{
this
.
$notification
[
'
success
'
]({
message
:
'
成功从文件导入定义!
'
,
message
:
this
.
$i18n
.
t
(
'
tips.success.to.import
'
)
,
placement
:
'
bottomLeft
'
,
duration
:
3
,
});
...
...
ui/src/layout/Header.vue
浏览文件 @
c31e1067
<
template
>
<div
class=
"header"
>
<h2
class=
"left"
>
<a
href=
"https://www.zendata.cn"
target=
"_blank"
>
ZenData
</a>
<a
href=
"https://www.zendata.cn"
target=
"_blank"
>
{{
$t
(
'
site.title
'
)
}}
</a>
</h2>
<div
class=
"center"
></div>
<div
class=
"right"
>
<span
class=
"dir"
>
工作目录:
{{
workDir
}}
</span>
<span
class=
"dir"
>
{{
$t
(
'
msg.workdir
'
)
}}
:
{{
workDir
}}
</span>
<select-lang
:prefixCls=
"'select-lang'"
/>
<a
href=
"https://www.zendata.cn/book/zendata/"
target=
"_blank"
>
帮助
</a>
<a
href=
"https://www.zendata.cn/book/zendata/"
target=
"_blank"
>
{{
$t
(
'
msg.help
'
)
}}
</a>
</div>
</div>
</
template
>
...
...
ui/src/layout/Menu.vue
浏览文件 @
c31e1067
...
...
@@ -7,26 +7,26 @@
@
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>
內置数据
</span></span>
<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>
...
...
@@ -41,7 +41,7 @@ export default {
data
()
{
return
{
current
:
[],
openKeys
:
[
'
buildin
'
],
openKeys
:
[],
};
},
watch
:
{
...
...
@@ -58,12 +58,10 @@ export default {
methods
:
{
handleClick
(
e
)
{
console
.
log
(
'
handleClick
'
,
e
,
this
.
$route
.
path
,
e
.
key
)
// if (e.key == 'mine' && this.$route.path != '/data/mine/index') {
// this.$router.push('/data/mine/index');
// } else {
const
path
=
'
/data/
'
+
e
.
key
if
(
this
.
$route
.
path
!=
path
)
this
.
$router
.
push
(
path
);
// }
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
)
...
...
ui/src/locales/lang/en-US.js
浏览文件 @
c31e1067
...
...
@@ -22,6 +22,71 @@ const locale = {
'
menu.excel.edit
'
:
'
Excel Edit
'
,
'
menu.text.list
'
:
'
Text List
'
,
'
menu.text.edit
'
:
'
Text Edit
'
,
'
title.data.create
'
:
'
Data Creation
'
,
'
title.config.create
'
:
'
Config Creation
'
,
'
title.ranges.create
'
:
'
Ranges Creation
'
,
'
title.instances.create
'
:
'
Instances Creation
'
,
'
title.excel.create
'
:
'
Excel Creation
'
,
'
title.text.create
'
:
'
Text Creation
'
,
'
msg.mine
'
:
'
My Data
'
,
'
msg.buildin
'
:
'
Build In
'
,
'
msg.workdir
'
:
'
WorkDir
'
,
'
msg.help
'
:
'
Help
'
,
'
msg.yes
'
:
'
Yes
'
,
'
msg.no
'
:
'
No
'
,
'
msg.data
'
:
'
Data
'
,
'
msg.config
'
:
'
Config
'
,
'
msg.ranges
'
:
'
Ranges
'
,
'
msg.instances
'
:
'
Instances
'
,
'
msg.excel
'
:
'
Excel
'
,
'
msg.text
'
:
'
Text
'
,
'
action.list
'
:
'
List
'
,
'
action.create
'
:
'
Create
'
,
'
action.edit
'
:
'
Edit
'
,
'
action.delete
'
:
'
Delete
'
,
'
action.preview
'
:
'
Preview
'
,
'
action.design
'
:
'
Design
'
,
'
action.back
'
:
'
Back
'
,
'
action.save
'
:
'
Save
'
,
'
action.reset
'
:
'
Reset
'
,
'
action.import.from.file
'
:
'
Import From Files
'
,
'
tips.refer
'
:
'
Reference
'
,
'
tips.pls.select
'
:
'
Please select
'
,
'
tips.range.int
'
:
'
Integer or a range of integers
'
,
'
tips.delete
'
:
'
Are you sure to delete?
'
,
'
tips.search
'
:
'
Input keywords to search
'
,
'
tips.success.to.import
'
:
'
Success to import.
'
,
'
form.name
'
:
'
Name
'
,
'
form.file
'
:
'
File
'
,
'
form.dir
'
:
'
Directory
'
,
'
form.sub.dir
'
:
'
Sub Directory
'
,
'
form.folder
'
:
'
Folder
'
,
'
form.path
'
:
'
Path
'
,
'
form.file.name
'
:
'
File Name
'
,
'
form.desc
'
:
'
Description
'
,
'
form.content
'
:
'
Content
'
,
'
form.prefix
'
:
'
Prefix
'
,
'
form.postfix
'
:
'
Postfix
'
,
'
form.loop
'
:
'
Loop
'
,
'
form.loopfix
'
:
'
LoopFix
'
,
'
form.format
'
:
'
Format
'
,
'
form.function
'
:
'
Function
'
,
'
form.opt
'
:
'
Operation
'
,
'
valid.required
'
:
'
Can not be empty.
'
,
'
valid.loop.format
'
:
'
Should be integer or a range of integers
'
,
'
valid.folder.users
'
:
'
Data must be saved in users/ dir
'
,
'
valid.folder.yaml
'
:
'
YAML must be saved in /yaml
'
,
'
valid.folder.data
'
:
'
Excel must be saved in data/ dir
'
,
}
export
default
{
...
...
ui/src/locales/lang/zh-CN.js
浏览文件 @
c31e1067
...
...
@@ -8,20 +8,20 @@ const components = {
}
const
locale
=
{
'
site.title
'
:
'
ZenData数据生成工具
'
,
'
menu.data.list
'
:
'
数据列表
'
,
'
menu.data.edit
'
:
'
数据编辑
'
,
'
menu.config.list
'
:
'
字段列表
'
,
'
menu.config.edit
'
:
'
字段编辑
'
,
'
menu.ranges.list
'
:
'
序列列表
'
,
'
menu.ranges.edit
'
:
'
序列编辑
'
,
'
menu.instances.list
'
:
'
实例列表
'
,
'
menu.instances.edit
'
:
'
实例编辑
'
,
'
menu.excel.list
'
:
'
表格列表
'
,
'
menu.excel.edit
'
:
'
表格编辑
'
,
'
menu.text.list
'
:
'
文本列表
'
,
'
menu.text.edit
'
:
'
文本编辑
'
,
// 'site.title': 'ZenData
',
//
//
'menu.data.list': '数据列表',
//
'menu.data.edit': '数据编辑',
//
'menu.config.list': '字段列表',
//
'menu.config.edit': '字段编辑',
//
'menu.ranges.list': '序列列表',
//
'menu.ranges.edit': '序列编辑',
//
'menu.instances.list': '实例列表',
//
'menu.instances.edit': '实例编辑',
//
'menu.excel.list': '表格列表',
//
'menu.excel.edit': '表格编辑',
//
'menu.text.list': '文本列表',
//
'menu.text.edit': '文本编辑',
}
export
default
{
...
...
ui/src/main.js
浏览文件 @
c31e1067
import
Vue
from
'
vue
'
import
App
from
'
./App.vue
'
import
i18n
from
'
./locales
'
import
store
from
'
./store/
'
import
bootstrap
from
'
./co
re
/bootstrap
'
import
bootstrap
from
'
./co
nfig
/bootstrap
'
import
VueI18n
from
'
vue-i18n
'
import
ConfigProvider
from
"
ant-design-vue/lib/config-provider
"
;
import
Button
from
"
ant-design-vue/lib/button
"
;
import
'
ant-design-vue/lib/button/style
'
;
...
...
@@ -71,12 +71,10 @@ import 'ant-design-vue/lib/message/style';
Vue
.
prototype
.
$message
=
message
;
Vue
.
prototype
.
$notification
=
notification
;
import
zhCN
from
'
./assets/lang/zh-CN
'
import
router
from
"
./router
"
Vue
.
config
.
productionTip
=
false
Vue
.
use
(
VueI18n
)
Vue
.
use
(
ConfigProvider
)
Vue
.
use
(
Modal
)
Vue
.
use
(
Menu
)
...
...
@@ -103,13 +101,6 @@ Vue.use(Popover)
Vue
.
use
(
Tooltip
)
Vue
.
use
(
Pagination
)
const
i18n
=
new
VueI18n
({
locale
:
'
zh-CN
'
,
messages
:
{
'
zh-CN
'
:
{
...
zhCN
}
},
});
new
Vue
({
router
,
store
,
...
...
ui/src/views/Index.vue
已删除
100644 → 0
浏览文件 @
a622ae78
<
template
>
<div>
<div>
INDEX
</div>
<router-link
to=
"/test"
>
Test
</router-link>
</div>
</
template
>
<
script
>
export
default
{
name
:
'
HelloWorld
'
,
props
:
{
msg
:
String
}
}
</
script
>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<
style
scoped
>
h3
{
margin
:
40px
0
0
;
}
ul
{
list-style-type
:
none
;
padding
:
0
;
}
li
{
display
:
inline-block
;
margin
:
0
10px
;
}
a
{
color
:
#42b983
;
}
</
style
>
ui/src/views/data/buildin/config/Edit.vue
浏览文件 @
c31e1067
...
...
@@ -2,105 +2,122 @@
<div>
<div
class=
"head"
>
<div
class=
"title"
>
字段
<span
v-if=
"id!=0"
>
编辑
</span><span
v-if=
"id==0"
>
新建
</span>
<div
class=
"title"
>
<span
v-if=
"id==0"
>
{{
$t
(
'
title.config.create
'
)
}}
</span>
<span
v-if=
"id!=0"
>
{{
$t
(
'
menu.config.edit
'
)
}}
</span>
</div>
</div>
<div
class=
"filter"
></div>
<div
class=
"buttons"
>
<a-button
type=
"primary"
@
click=
"back()"
>
返回
</a-button>
<a-button
type=
"primary"
@
click=
"back()"
>
{{
$t
(
'
action.back
'
)
}}
</a-button>
</div>
</div>
<div>
<a-form-model
ref=
"editForm"
:model=
"model"
:rules=
"rules"
>
<a-row
:gutter=
"colsFull"
>
<a-form-model-item
label=
"名称
"
prop=
"title"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-form-model-item
:label=
"$t('form.name')
"
prop=
"title"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-input
v-model=
"model.title"
/>
</a-form-model-item>
</a-row>
<a-row
:gutter=
"colsFull"
>
<a-form-model-item
label=
"目录"
prop=
"folder
"
class=
"zui-input-group zui-input-with-tips"
<a-form-model-item
:label=
"$t('form.dir')
"
class=
"zui-input-group zui-input-with-tips"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-form-model-item
prop=
"folder"
:style=
"
{ display: 'inline-block', width: 'calc(70% - 30px)' }">
<a-select
v-model=
"model.folder"
placeholder=
"请选择"
>
<a-form-model-item
prop=
"folder"
:style=
"
{ display: 'inline-block', width: 'calc(70% - 40px)' }">
<a-select
v-model=
"model.folder"
>
<a-select-option
v-for=
"(item, index) in dirs"
:value=
"item.name"
:key=
"index"
>
{{
item
.
name
}}
</a-select-option>
</a-select>
<span
class=
"zui-input-tips"
>
工作目录:
{{
workDir
}}
</span>
</a-form-model-item>
<span
class=
"zui-input-group-addon"
:style=
"
{ width: '
6
0px' }">
<span>
子目录
</span>
<span
class=
"zui-input-group-addon"
:style=
"
{ width: '
8
0px' }">
<span>
{{
$t
(
'
form.folder
'
)
}}
</span>
</span>
<a-form-model-item
:style=
"
{ display: 'inline-block', width: 'calc(30% -
3
0px)' }">
<a-form-model-item
:style=
"
{ display: 'inline-block', width: 'calc(30% -
4
0px)' }">
<a-input
v-model=
"model.subFolder"
></a-input>
</a-form-model-item>
</a-form-model-item>
</a-row>
<a-row
:gutter=
"colsFull"
>
<a-form-model-item
label=
"文件名
"
prop=
"fileName"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-form-model-item
:label=
"$t('form.file.name')
"
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"
>
<a-input
v-model=
"model.prefix"
/>
</a-form-model-item>
</a-col>
<a-col
:span=
"colsHalf"
>
<a-form-model-item
label=
"后缀"
prop=
"postfix"
:labelCol=
"labelColHalf2"
:wrapperCol=
"wrapperColHalf"
>
<a-input
v-model=
"model.postfix"
/>
<a-row
:gutter=
"colsFull"
>
<a-form-model-item
:label=
"$t('form.prefix')"
class=
"zui-input-group zui-input-with-tips"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-form-model-item
prop=
"prefix"
:style=
"
{ display: 'inline-block', width: 'calc(70% - 40px)' }">
<a-input
v-model=
"model.prefix"
/>
</a-form-model-item>
<span
class=
"zui-input-group-addon"
:style=
"
{ width: '80px' }">
<span>
{{
$t
(
'
form.postfix
'
)
}}
</span>
</span>
<a-form-model-item
prop=
"postfix"
:style=
"
{ display: 'inline-block', width: 'calc(30% - 40px)' }">
<a-input
v-model=
"model.postfix"
/>
</a-form-model-item>
</a-form-model-item>
</a-col>
</a-row>
</a-row>
<a-row
:gutter=
"colsFull"
>
<a-col
:span=
"colsHalf"
>
<a-form-model-item
label=
"循环"
prop=
"loop"
:labelCol=
"labelColHalf"
:wrapperCol=
"wrapperColHalf"
>
<a-input
v-model=
"model.loop"
placeholder=
"数字3,或区间1-3"
/>
<a-form-model-item
:label=
"$t('form.loop')"
class=
"zui-input-group zui-input-with-tips"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-form-model-item
prop=
"loop"
:style=
"
{ display: 'inline-block', width: 'calc(70% - 40px)' }">
<a-input
v-model=
"model.loop"
placeholder=
"数字或数字区间"
/>
</a-form-model-item>
</a-col>
<a-col
:span=
"colsHalf"
>
<a-form-model-item
label=
"循环间隔符"
prop=
"loopfix"
:labelCol=
"labelColHalf2"
:wrapperCol=
"wrapperColHalf"
>
<span
class=
"zui-input-group-addon"
:style=
"
{ width: '80px' }">
<span>
{{
$t
(
'
form.loopfix
'
)
}}
</span>
</span>
<a-form-model-item
prop=
"loopfix"
:style=
"
{ display: 'inline-block', width: 'calc(30% - 40px)' }">
<a-input
v-model=
"model.loopfix"
/>
</a-form-model-item>
</a-
col
>
</a-
form-model-item
>
</a-row>
<a-row
:gutter=
"colsFull"
>
<a-col
:span=
"colsHalf"
>
<a-form-model-item
label=
"格式"
prop=
"format"
:labelCol=
"labelColHalf"
:wrapperCol=
"wrapperColHalf"
>
<div
class=
"inline"
>
<a-input
v-model=
"model.format"
>
<a-select
slot=
"addonAfter"
default-value=
""
style=
"width: 80px"
>
<a-select-option
value=
""
>
函数
</a-select-option>
<a-select-option
value=
".jp"
>
md5
</a-select-option>
</a-select>
</a-input>
</div>
<a-row
:gutter=
"colsFull"
>
<a-form-model-item
:label=
"$t('form.format')"
class=
"zui-input-group zui-input-with-tips"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-form-model-item
prop=
"format"
:style=
"
{ display: 'inline-block', width: 'calc(70% - 40px)' }">
<a-input
v-model=
"model.format"
></a-input>
</a-form-model-item>
<span
class=
"zui-input-group-addon"
:style=
"
{ width: '80px' }">
<span>
{{
$t
(
'
form.function
'
)
}}
</span>
</span>
<a-form-model-item
prop=
"format"
:style=
"
{ display: 'inline-block', width: 'calc(30% - 40px)' }">
<a-select
v-model=
"model.format"
>
<a-select-option
value=
"md5"
>
md5
</a-select-option>
<a-select-option
value=
"sha1"
>
sha1
</a-select-option>
<a-select-option
value=
"base64"
>
base64
</a-select-option>
<a-select-option
value=
"urlencode"
>
urlencode
</a-select-option>
</a-select>
</a-form-model-item>
</a-form-model-item>
</a-col>
<a-col
:span=
"colsHalf"
></a-col>
</a-row>
</a-row>
<a-row
:gutter=
"colsFull"
>
<a-form-model-item
label=
"描述
"
prop=
"desc"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-form-model-item
:label=
"$t('form.desc')
"
prop=
"desc"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-input
v-model=
"model.desc"
type=
"textarea"
rows=
"3"
/>
</a-form-model-item>
</a-row>
<a-row
:gutter=
"colsFull"
>
<a-form-model-item
class=
"center"
>
<a-button
@
click=
"save"
type=
"primary"
>
保存
</a-button>
<a-button
@
click=
"reset"
style=
"margin-left: 10px;"
>
重置
</a-button>
<a-button
@
click=
"save"
type=
"primary"
>
{{
$t
(
'
action.save
'
)
}}
</a-button>
<a-button
@
click=
"reset"
style=
"margin-left: 10px;"
>
{{
$t
(
'
action.reset
'
)
}}
</a-button>
</a-form-model-item>
</a-row>
</a-form-model>
...
...
@@ -125,13 +142,13 @@ export default {
wrapperColHalf
:
{
lg
:
{
span
:
12
},
sm
:
{
span
:
12
}
},
rules
:
{
title
:
[
{
required
:
true
,
message
:
'
名称不能为空
'
,
trigger
:
'
change
'
},
{
required
:
true
,
message
:
this
.
$i18n
.
t
(
'
valid.required
'
)
,
trigger
:
'
change
'
},
],
fileName
:
[
{
required
:
true
,
message
:
'
文件名不能为空
'
,
trigger
:
'
change
'
},
{
required
:
true
,
message
:
this
.
$i18n
.
t
(
'
valid.required
'
)
,
trigger
:
'
change
'
},
],
loop
:
[
{
validator
:
checkLoop
,
message
:
'
需为正整数或其区间
'
,
trigger
:
'
change
'
},
{
validator
:
checkLoop
,
message
:
this
.
$i18n
.
t
(
'
valid.loop.format
'
)
,
trigger
:
'
change
'
},
],
folder
:
[
{
validator
:
checkDirIsYaml
,
trigger
:
'
change
'
},
...
...
ui/src/views/data/buildin/config/List.vue
浏览文件 @
c31e1067
<
template
>
<div>
<div
class=
"head"
>
<div
class=
"title"
>
字段列表
</div>
<div
class=
"title"
>
{{
$t
(
'
menu.config.list
'
)
}}
</div>
<div
class=
"filter"
>
<a-input-search
v-model=
"keywords"
@
change=
"onSearch"
:allowClear=
"true"
placeholder=
"输入关键字检索"
style=
"width: 300px"
/>
<a-input-search
v-model=
"keywords"
@
change=
"onSearch"
:allowClear=
"true"
placeholder=
"$t('tips.search')"
style=
"width: 300px"
/>
</div>
<div
class=
"buttons"
>
<a-button
type=
"primary"
@
click=
"create()"
>
新建
</a-button>
<a-button
type=
"primary"
@
click=
"create()"
>
{{
$t
(
'
action.create
'
)
}}
</a-button>
</div>
</div>
...
...
@@ -21,28 +22,28 @@
</span>
<span
slot=
"action"
slot-scope=
"record"
>
<a
@
click=
"edit(record)"
>
编辑
</a>
|
<a
@
click=
"design(record)"
>
设计
</a>
|
<a
@
click=
"edit(record)"
>
{{ $t('action.edit') }}
</a>
|
<a
@
click=
"design(record)"
>
{{ $t('action.design') }}
</a>
|
<a-popconfirm
title=
"确认删除?
"
ok-text=
"是
"
cancel-text=
"否
"
:title=
"$t('tips.delete')
"
:okText=
"$t('msg.yes')
"
:cancelText=
"$t('msg.no')
"
@
confirm=
"remove(record)"
>
<a
href=
"#"
>
删除
</a>
|
<a
href=
"#"
>
{{ $t('action.delete') }}
</a>
|
</a-popconfirm>
<a-tooltip
placement=
"top"
overlayClassName=
"tooltip-light"
>
<
template
slot=
"title"
>
<div
class=
"content-width"
style=
"min-width: 280px;"
>
<div
class=
"title"
>
引用字段
</div>
<div
class=
"title"
>
{{
$t
(
'
tips.refer
'
)
}}
</div>
<div
class=
"content"
>
<div>
config:
{{
record
.
referName
}}
</div>
</div>
</div>
</
template
>
<a
href=
"#"
>
引用
</a>
<a
href=
"#"
>
{{$t('tips.refer')}}
</a>
</a-tooltip>
</span>
...
...
@@ -74,29 +75,29 @@ import {PageSize, pathToRelated} from "../../../../api/utils";
import
{
DesignComponent
}
from
'
../../../../components
'
import
debounce
from
"
lodash.debounce
"
const
columns
=
[
{
title
:
'
名称
'
,
dataIndex
:
'
title
'
,
},
{
title
:
'
文件
'
,
dataIndex
:
'
folder
'
,
scopedSlots
:
{
customRender
:
'
folderWithPath
'
},
},
{
title
:
'
操作
'
,
key
:
'
action
'
,
scopedSlots
:
{
customRender
:
'
action
'
},
},
];
export
default
{
name
:
'
ConfigList
'
,
components
:
{
DesignComponent
},
data
()
{
const
columns
=
[
{
title
:
this
.
$i18n
.
t
(
'
form.name
'
),
dataIndex
:
'
title
'
,
},
{
title
:
this
.
$i18n
.
t
(
'
form.file
'
),
dataIndex
:
'
folder
'
,
scopedSlots
:
{
customRender
:
'
folderWithPath
'
},
},
{
title
:
this
.
$i18n
.
t
(
'
form.opt
'
),
key
:
'
action
'
,
scopedSlots
:
{
customRender
:
'
action
'
},
},
];
return
{
models
:
[],
columns
,
...
...
ui/src/views/data/buildin/excel/Edit.vue
浏览文件 @
c31e1067
...
...
@@ -2,35 +2,37 @@
<div>
<div
class=
"head"
>
<div
class=
"title"
>
表格
<span
v-if=
"id!=0"
>
编辑
</span><span
v-if=
"id==0"
>
新建
</span>
<div
class=
"title"
>
<span
v-if=
"id==0"
>
{{
$t
(
'
title.excel.create
'
)
}}
</span>
<span
v-if=
"id!=0"
>
{{
$t
(
'
menu.excel.edit
'
)
}}
</span>
</div>
</div>
<div
class=
"filter"
></div>
<div
class=
"buttons"
>
<a-button
type=
"primary"
@
click=
"back()"
>
返回
</a-button>
<a-button
type=
"primary"
@
click=
"back()"
>
{{
$t
(
'
action.back
'
)
}}
</a-button>
</div>
</div>
<div>
<a-form-model
ref=
"editForm"
:model=
"model"
:rules=
"rules"
>
<a-row
:gutter=
"colsFull"
>
<a-form-model-item
label=
"名称
"
prop=
"title"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-form-model-item
:label=
"$t('form.name')
"
prop=
"title"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-input
v-model=
"model.title"
/>
</a-form-model-item>
</a-row>
<a-row
:gutter=
"colsFull"
>
<a-form-model-item
label=
"目录
"
prop=
"folder"
class=
"zui-input-group zui-input-with-tips"
<a-form-model-item
:label=
"$t('form.dir')
"
prop=
"folder"
class=
"zui-input-group zui-input-with-tips"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-form-model-item
prop=
"folder"
:style=
"
{ display: 'inline-block', width: 'calc(70% - 30px)' }">
<a-select
v-model=
"model.folder"
placeholder=
"请选择"
>
<a-select
v-model=
"model.folder"
>
<a-select-option
v-for=
"(item, index) in dirs"
:value=
"item.name"
:key=
"index"
>
{{
item
.
name
}}
</a-select-option>
</a-select>
<span
class=
"zui-input-tips"
>
工作目录:
{{
workDir
}}
</span>
</a-form-model-item>
<span
class=
"zui-input-group-addon"
:style=
"
{ width: '60px' }">
<span>
子目录
</span>
<span>
{{
$t
(
'
form.folder
'
)
}}
</span>
</span>
<a-form-model-item
:style=
"
{ display: 'inline-block', width: 'calc(30% - 30px)' }">
...
...
@@ -40,15 +42,15 @@
</a-row>
<a-row
:gutter=
"colsFull"
>
<a-form-model-item
label=
"文件名
"
prop=
"fileName"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-form-model-item
:label=
"$t('form.file.name')
"
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>
<a-button
@
click=
"reset"
style=
"margin-left: 10px;"
>
重置
</a-button>
<a-button
@
click=
"save"
type=
"primary"
>
{{
$t
(
'
action.save
'
)
}}
</a-button>
<a-button
@
click=
"reset"
style=
"margin-left: 10px;"
>
{{
$t
(
'
action.reset
'
)
}}
</a-button>
</a-form-model-item>
</a-row>
</a-form-model>
...
...
@@ -73,10 +75,10 @@ export default {
wrapperColHalf
:
{
lg
:
{
span
:
12
},
sm
:
{
span
:
12
}
},
rules
:
{
title
:
[
{
required
:
true
,
message
:
'
名称不能为空
'
,
trigger
:
'
change
'
},
{
required
:
true
,
message
:
this
.
$i18n
.
t
(
'
valid.required
'
)
,
trigger
:
'
change
'
},
],
fileName
:
[
{
required
:
true
,
message
:
'
文件名不能为空
'
,
trigger
:
'
change
'
},
{
required
:
true
,
message
:
this
.
$i18n
.
t
(
'
valid.required
'
)
,
trigger
:
'
change
'
},
],
folder
:
[
{
validator
:
checkDirIsData
,
trigger
:
'
change
'
},
...
...
ui/src/views/data/buildin/excel/List.vue
浏览文件 @
c31e1067
<
template
>
<div>
<div
class=
"head"
>
<div
class=
"title"
>
表格列表
</div>
<div
class=
"title"
>
{{
$t
(
'
menu.excel.list
'
)
}}
</div>
<div
class=
"filter"
>
<a-input-search
v-model=
"keywords"
@
change=
"onSearch"
:allowClear=
"true"
placeholder=
"输入关键字检索"
style=
"width: 300px"
/>
<a-input-search
v-model=
"keywords"
@
change=
"onSearch"
:allowClear=
"true"
placeholder=
"$t('tips.search')"
style=
"width: 300px"
/>
</div>
<div
class=
"buttons"
>
<a-button
type=
"primary"
@
click=
"create()"
>
新建
</a-button>
<a-button
type=
"primary"
@
click=
"create()"
>
{{
$t
(
'
action.create
'
)
}}
</a-button>
</div>
</div>
...
...
@@ -21,21 +22,21 @@
</span>
<span
slot=
"action"
slot-scope=
"record"
>
<a
@
click=
"edit(record)"
>
编辑
</a>
|
<a
@
click=
"edit(record)"
>
{{ $t('action.edit') }}
</a>
|
<a-popconfirm
title=
"确认删除?
"
ok-text=
"是
"
cancel-text=
"否
"
:title=
"$t('tips.delete')
"
:okText=
"$t('msg.yes')
"
:cancelText=
"$t('msg.no')
"
@
confirm=
"remove(record)"
>
<a
href=
"#"
>
删除
</a>
<a
href=
"#"
>
{{ $t('action.delete') }}
</a>
</a-popconfirm>
|
<a-tooltip
placement=
"top"
overlayClassName=
"tooltip-light"
>
<
template
slot=
"title"
>
<div
class=
"content-width"
style=
"min-width: 280px;"
>
<div
class=
"title"
>
引用Excel表格
</div>
<div
class=
"title"
>
{{
$t
(
'
tips.refer
'
)
}}
</div>
<div
class=
"content"
>
<div>
from:
{{
record
.
referName
}}
</div>
<div>
select: field_name
</div>
...
...
@@ -43,7 +44,7 @@
</div>
</div>
</
template
>
<a
href=
"#"
>
引用
</a>
<a
href=
"#"
>
{{$t('tips.refer')}}
</a>
</a-tooltip>
</span>
...
...
@@ -63,28 +64,28 @@ import {listExcel, removeExcel} from "../../../../api/manage";
import
{
PageSize
,
pathToRelated
}
from
"
../../../../api/utils
"
;
import
debounce
from
"
lodash.debounce
"
const
columns
=
[
{
title
:
'
名称
'
,
dataIndex
:
'
title
'
,
},
{
title
:
'
文件
'
,
dataIndex
:
'
folder
'
,
scopedSlots
:
{
customRender
:
'
folderWithPath
'
},
},
{
title
:
'
操作
'
,
key
:
'
action
'
,
scopedSlots
:
{
customRender
:
'
action
'
},
},
];
export
default
{
name
:
'
ExcelList
'
,
components
:
{
},
data
()
{
const
columns
=
[
{
title
:
this
.
$i18n
.
t
(
'
form.name
'
),
dataIndex
:
'
title
'
,
},
{
title
:
this
.
$i18n
.
t
(
'
form.file
'
),
dataIndex
:
'
folder
'
,
scopedSlots
:
{
customRender
:
'
folderWithPath
'
},
},
{
title
:
this
.
$i18n
.
t
(
'
form.opt
'
),
key
:
'
action
'
,
scopedSlots
:
{
customRender
:
'
action
'
},
},
];
return
{
models
:
[],
columns
,
...
...
ui/src/views/data/buildin/instances/Edit.vue
浏览文件 @
c31e1067
...
...
@@ -2,35 +2,37 @@
<div>
<div
class=
"head"
>
<div
class=
"title"
>
序列
<span
v-if=
"id!=0"
>
编辑
</span><span
v-if=
"id==0"
>
新建
</span>
<div
class=
"title"
>
<span
v-if=
"id==0"
>
{{
$t
(
'
title.instances.create
'
)
}}
</span>
<span
v-if=
"id!=0"
>
{{
$t
(
'
menu.instances.edit
'
)
}}
</span>
</div>
</div>
<div
class=
"filter"
></div>
<div
class=
"buttons"
>
<a-button
type=
"primary"
@
click=
"back()"
>
返回
</a-button>
<a-button
type=
"primary"
@
click=
"back()"
>
{{
$t
(
'
action.back
'
)
}}
</a-button>
</div>
</div>
<div>
<a-form-model
ref=
"editForm"
:model=
"model"
:rules=
"rules"
>
<a-row
:gutter=
"colsFull"
>
<a-form-model-item
label=
"名称
"
prop=
"title"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-form-model-item
:label=
"$t('form.name')
"
prop=
"title"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-input
v-model=
"model.title"
/>
</a-form-model-item>
</a-row>
<a-row
:gutter=
"colsFull"
>
<a-form-model-item
label=
"目录
"
prop=
"folder"
class=
"zui-input-group zui-input-with-tips"
<a-form-model-item
:label=
"$t('form.dir')
"
prop=
"folder"
class=
"zui-input-group zui-input-with-tips"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-form-model-item
prop=
"folder"
:style=
"
{ display: 'inline-block', width: 'calc(70% - 30px)' }">
<a-select
v-model=
"model.folder"
placeholder=
"请选择"
>
<a-select
v-model=
"model.folder"
>
<a-select-option
v-for=
"(item, index) in dirs"
:value=
"item.name"
:key=
"index"
>
{{
item
.
name
}}
</a-select-option>
</a-select>
<span
class=
"zui-input-tips"
>
工作目录:
{{
workDir
}}
</span>
</a-form-model-item>
<span
class=
"zui-input-group-addon"
:style=
"
{ width: '60px' }">
<span>
子目录
</span>
<span>
{{
$t
(
'
form.folder
'
)
}}
</span>
</span>
<a-form-model-item
:style=
"
{ display: 'inline-block', width: 'calc(30% - 30px)' }">
...
...
@@ -40,54 +42,34 @@
</a-row>
<a-row
:gutter=
"colsFull"
>
<a-form-model-item
label=
"文件名
"
prop=
"fileName"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-form-model-item
:label=
"$t('form.file.name')
"
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"
>
<a-form-model-item
:label=
"$t('form.prefix')
"
prop=
"prefix"
:labelCol=
"labelColHalf"
:wrapperCol=
"wrapperColHalf"
>
<a-input
v-model=
"model.prefix"
/>
</a-form-model-item>
</a-col>
<a-col
:span=
"colsHalf"
>
<a-form-model-item
label=
"后缀
"
prop=
"postfix"
:labelCol=
"labelColHalf2"
:wrapperCol=
"wrapperColHalf"
>
<a-form-model-item
:label=
"$t('form.postfix')
"
prop=
"postfix"
:labelCol=
"labelColHalf2"
:wrapperCol=
"wrapperColHalf"
>
<a-input
v-model=
"model.postfix"
/>
</a-form-model-item>
</a-col>
</a-row>
<a-row
:gutter=
"colsFull"
>
<a-col
:span=
"colsHalf"
>
<a-form-model-item
label=
"格式"
prop=
"format"
:labelCol=
"labelColHalf"
:wrapperCol=
"wrapperColHalf"
>
<div
class=
"inline"
>
<a-input
v-model=
"model.format"
>
<a-select
slot=
"addonAfter"
default-value=
""
style=
"width: 80px"
>
<a-select-option
value=
""
>
函数
</a-select-option>
<a-select-option
value=
".jp"
>
md5
</a-select-option>
</a-select>
</a-input>
</div>
</a-form-model-item>
</a-col>
<a-col
:span=
"colsHalf"
></a-col>
</a-row>
<a-row
:gutter=
"colsFull"
>
<a-form-model-item
label=
"描述"
prop=
"desc"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-form-model-item
:label=
"$t('form.desc')"
prop=
"desc"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-input
v-model=
"model.desc"
type=
"textarea"
rows=
"3"
/>
</a-form-model-item>
</a-row>
<a-row
:gutter=
"colsFull"
>
<a-form-model-item
class=
"center"
>
<a-button
@
click=
"save"
type=
"primary"
>
保存
</a-button>
<a-button
@
click=
"reset"
style=
"margin-left: 10px;"
>
重置
</a-button>
<a-button
@
click=
"save"
type=
"primary"
>
{{
$t
(
'
action.save
'
)
}}
</a-button>
<a-button
@
click=
"reset"
style=
"margin-left: 10px;"
>
{{
$t
(
'
action.reset
'
)
}}
</a-button>
</a-form-model-item>
</a-row>
</a-form-model>
...
...
@@ -112,10 +94,10 @@ export default {
wrapperColHalf
:
{
lg
:
{
span
:
12
},
sm
:
{
span
:
12
}
},
rules
:
{
title
:
[
{
required
:
true
,
message
:
'
名称不能为空
'
,
trigger
:
'
change
'
},
{
required
:
true
,
message
:
this
.
$i18n
.
t
(
'
valid.required
'
)
,
trigger
:
'
change
'
},
],
fileName
:
[
{
required
:
true
,
message
:
'
文件名不能为空
'
,
trigger
:
'
change
'
},
{
required
:
true
,
message
:
this
.
$i18n
.
t
(
'
valid.required
'
)
,
trigger
:
'
change
'
},
],
folder
:
[
{
validator
:
checkDirIsYaml
,
trigger
:
'
change
'
},
...
...
ui/src/views/data/buildin/instances/List.vue
浏览文件 @
c31e1067
<
template
>
<div>
<div
class=
"head"
>
<div
class=
"title"
>
实例列表
</div>
<div
class=
"title"
>
{{
$t
(
'
menu.instances.list
'
)
}}
</div>
<div
class=
"filter"
>
<a-input-search
v-model=
"keywords"
@
change=
"onSearch"
:allowClear=
"true"
placeholder=
"输入关键字检索"
style=
"width: 300px"
/>
<a-input-search
v-model=
"keywords"
@
change=
"onSearch"
:allowClear=
"true"
placeholder=
"$t('tips.search')"
style=
"width: 300px"
/>
</div>
<div
class=
"buttons"
>
<a-button
type=
"primary"
@
click=
"create()"
>
新建
</a-button>
<a-button
type=
"primary"
@
click=
"create()"
>
{{
$t
(
'
action.create
'
)
}}
</a-button>
</div>
</div>
...
...
@@ -21,29 +22,29 @@
</span>
<span
slot=
"action"
slot-scope=
"record"
>
<a
@
click=
"edit(record)"
>
编辑
</a>
|
<a
@
click=
"design(record)"
>
设计
</a>
|
<a
@
click=
"edit(record)"
>
{{ $t('action.edit') }}
</a>
|
<a
@
click=
"design(record)"
>
{{ $t('action.design') }}
</a>
|
<a-popconfirm
title=
"确认删除?
"
ok-text=
"是
"
cancel-text=
"否
"
:title=
"$t('tips.delete')
"
:okText=
"$t('msg.yes')
"
:cancelText=
"$t('msg.no')
"
@
confirm=
"remove(record)"
>
<a
href=
"#"
>
删除
</a>
<a
href=
"#"
>
{{ $t('action.delete') }}
</a>
</a-popconfirm>
|
<a-tooltip
placement=
"top"
overlayClassName=
"tooltip-light"
>
<
template
slot=
"title"
>
<div
class=
"content-width"
style=
"min-width: 280px;"
>
<div
class=
"title"
>
引用实例
</div>
<div
class=
"title"
>
{{
$t
(
'
tips.refer
'
)
}}
</div>
<div
class=
"content"
>
<div>
from:
{{
record
.
referName
}}
</div>
<div>
use: field_name
</div>
</div>
</div>
</
template
>
<a
href=
"#"
>
引用
</a>
<a
href=
"#"
>
{{$t('tips.refer')}}
</a>
</a-tooltip>
</span>
...
...
@@ -76,29 +77,29 @@ import { DesignComponent } from '../../../../components'
import
{
PageSize
,
ResTypeInstances
,
pathToRelated
}
from
"
../../../../api/utils
"
;
import
debounce
from
"
lodash.debounce
"
const
columns
=
[
{
title
:
'
名称
'
,
dataIndex
:
'
title
'
,
},
{
title
:
'
文件
'
,
dataIndex
:
'
folder
'
,
scopedSlots
:
{
customRender
:
'
folderWithPath
'
},
},
{
title
:
'
操作
'
,
key
:
'
action
'
,
scopedSlots
:
{
customRender
:
'
action
'
},
},
];
export
default
{
name
:
'
InstanceList
'
,
components
:
{
DesignComponent
},
data
()
{
const
columns
=
[
{
title
:
this
.
$i18n
.
t
(
'
form.name
'
),
dataIndex
:
'
title
'
,
},
{
title
:
this
.
$i18n
.
t
(
'
form.file
'
),
dataIndex
:
'
folder
'
,
scopedSlots
:
{
customRender
:
'
folderWithPath
'
},
},
{
title
:
this
.
$i18n
.
t
(
'
form.opt
'
),
key
:
'
action
'
,
scopedSlots
:
{
customRender
:
'
action
'
},
},
];
return
{
models
:
[],
columns
,
...
...
ui/src/views/data/buildin/ranges/Edit.vue
浏览文件 @
c31e1067
...
...
@@ -2,35 +2,37 @@
<div>
<div
class=
"head"
>
<div
class=
"title"
>
序列
<span
v-if=
"id!=0"
>
编辑
</span><span
v-if=
"id==0"
>
新建
</span>
<div
class=
"title"
>
<span
v-if=
"id==0"
>
{{
$t
(
'
title.ranges.create
'
)
}}
</span>
<span
v-if=
"id!=0"
>
{{
$t
(
'
menu.ranges.edit
'
)
}}
</span>
</div>
</div>
<div
class=
"filter"
></div>
<div
class=
"buttons"
>
<a-button
type=
"primary"
@
click=
"back()"
>
返回
</a-button>
<a-button
type=
"primary"
@
click=
"back()"
>
{{
$t
(
'
action.back
'
)
}}
</a-button>
</div>
</div>
<div>
<a-form-model
ref=
"editForm"
:model=
"model"
:rules=
"rules"
>
<a-row
:gutter=
"colsFull"
>
<a-form-model-item
label=
"名称
"
prop=
"title"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-form-model-item
:label=
"$t('form.name')
"
prop=
"title"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-input
v-model=
"model.title"
/>
</a-form-model-item>
</a-row>
<a-row
:gutter=
"colsFull"
>
<a-form-model-item
label=
"目录
"
prop=
"folder"
class=
"zui-input-group zui-input-with-tips"
<a-form-model-item
:label=
"$t('form.dir')
"
prop=
"folder"
class=
"zui-input-group zui-input-with-tips"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-form-model-item
prop=
"folder"
:style=
"
{ display: 'inline-block', width: 'calc(70% - 30px)' }">
<a-select
v-model=
"model.folder"
placeholder=
"请选择"
>
<a-select
v-model=
"model.folder"
>
<a-select-option
v-for=
"(item, index) in dirs"
:value=
"item.name"
:key=
"index"
>
{{
item
.
name
}}
</a-select-option>
</a-select>
<span
class=
"zui-input-tips"
>
工作目录:
{{
workDir
}}
</span>
</a-form-model-item>
<span
class=
"zui-input-group-addon"
:style=
"
{ width: '60px' }">
<span>
子目录
</span>
<span>
{{
$t
(
'
form.folder
'
)
}}
</span>
</span>
<a-form-model-item
:style=
"
{ display: 'inline-block', width: 'calc(30% - 30px)' }">
...
...
@@ -40,54 +42,34 @@
</a-row>
<a-row
:gutter=
"colsFull"
>
<a-form-model-item
label=
"文件名
"
prop=
"fileName"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-form-model-item
:label=
"$t('form.file.name')
"
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"
>
<a-form-model-item
:label=
"$t('form.prefix')
"
prop=
"prefix"
:labelCol=
"labelColHalf"
:wrapperCol=
"wrapperColHalf"
>
<a-input
v-model=
"model.prefix"
/>
</a-form-model-item>
</a-col>
<a-col
:span=
"colsHalf"
>
<a-form-model-item
label=
"后缀
"
prop=
"postfix"
:labelCol=
"labelColHalf2"
:wrapperCol=
"wrapperColHalf"
>
<a-form-model-item
:label=
"$t('form.post')
"
prop=
"postfix"
:labelCol=
"labelColHalf2"
:wrapperCol=
"wrapperColHalf"
>
<a-input
v-model=
"model.postfix"
/>
</a-form-model-item>
</a-col>
</a-row>
<a-row
:gutter=
"colsFull"
>
<a-col
:span=
"colsHalf"
>
<a-form-model-item
label=
"格式"
prop=
"format"
:labelCol=
"labelColHalf"
:wrapperCol=
"wrapperColHalf"
>
<div
class=
"inline"
>
<a-input
v-model=
"model.format"
>
<a-select
slot=
"addonAfter"
default-value=
""
style=
"width: 80px"
>
<a-select-option
value=
""
>
函数
</a-select-option>
<a-select-option
value=
".jp"
>
md5
</a-select-option>
</a-select>
</a-input>
</div>
</a-form-model-item>
</a-col>
<a-col
:span=
"colsHalf"
></a-col>
</a-row>
<a-row
:gutter=
"colsFull"
>
<a-form-model-item
label=
"描述"
prop=
"desc"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-form-model-item
:label=
"$t('form.desc')"
prop=
"desc"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-input
v-model=
"model.desc"
type=
"textarea"
rows=
"3"
/>
</a-form-model-item>
</a-row>
<a-row
:gutter=
"colsFull"
>
<a-form-model-item
class=
"center"
>
<a-button
@
click=
"save"
type=
"primary"
>
保存
</a-button>
<a-button
@
click=
"reset"
style=
"margin-left: 10px;"
>
重置
</a-button>
<a-button
@
click=
"save"
type=
"primary"
>
{{
$t
(
'
action.save
'
)
}}
</a-button>
<a-button
@
click=
"reset"
style=
"margin-left: 10px;"
>
{{
$t
(
'
action.reset
'
)
}}
</a-button>
</a-form-model-item>
</a-row>
</a-form-model>
...
...
@@ -112,10 +94,10 @@ export default {
wrapperColHalf
:
{
lg
:
{
span
:
12
},
sm
:
{
span
:
12
}
},
rules
:
{
title
:
[
{
required
:
true
,
message
:
'
名称不能为空
'
,
trigger
:
'
change
'
},
{
required
:
true
,
message
:
this
.
$i18n
.
t
(
'
valid.required
'
)
,
trigger
:
'
change
'
},
],
fileName
:
[
{
required
:
true
,
message
:
'
文件名不能为空
'
,
trigger
:
'
change
'
},
{
required
:
true
,
message
:
this
.
$i18n
.
t
(
'
valid.required
'
)
,
trigger
:
'
change
'
},
],
folder
:
[
{
validator
:
checkDirIsYaml
,
trigger
:
'
change
'
},
...
...
ui/src/views/data/buildin/ranges/List.vue
浏览文件 @
c31e1067
<
template
>
<div>
<div
class=
"head"
>
<div
class=
"title"
>
序列列表
</div>
<div
class=
"title"
>
{{
$t
(
'
menu.ranges.list
'
)
}}
</div>
<div
class=
"filter"
>
<a-input-search
v-model=
"keywords"
@
change=
"onSearch"
:allowClear=
"true"
placeholder=
"输入关键字检索"
style=
"width: 300px"
/>
<a-input-search
v-model=
"keywords"
@
change=
"onSearch"
:allowClear=
"true"
placeholder=
"$t('tips.search')"
style=
"width: 300px"
/>
</div>
<div
class=
"buttons"
>
<a-button
type=
"primary"
@
click=
"create()"
>
新建
</a-button>
<a-button
type=
"primary"
@
click=
"create()"
>
{{
$t
(
'
action.create
'
)
}}
</a-button>
</div>
</div>
...
...
@@ -21,29 +22,29 @@
</span>
<span
slot=
"action"
slot-scope=
"record"
>
<a
@
click=
"edit(record)"
>
编辑
</a>
|
<a
@
click=
"design(record)"
>
设计
</a>
|
<a
@
click=
"edit(record)"
>
{{ $t('action.edit') }}
</a>
|
<a
@
click=
"design(record)"
>
{{ $t('action.design') }}
</a>
|
<a-popconfirm
title=
"确认删除?
"
ok-text=
"是
"
cancel-text=
"否
"
:title=
"$t('tips.delete')
"
:okText=
"$t('msg.yes')
"
:cancelText=
"$t('msg.no')
"
@
confirm=
"remove(record)"
>
<a
href=
"#"
>
删除
</a>
|
<a
href=
"#"
>
{{ $t('action.delete') }}
</a>
|
</a-popconfirm>
<a-tooltip
placement=
"top"
overlayClassName=
"tooltip-light"
>
<
template
slot=
"title"
>
<div
class=
"content-width"
style=
"min-width: 280px;"
>
<div
class=
"title"
>
引用序列
</div>
<div
class=
"title"
>
{{
$t
(
'
tips.refer
'
)
}}
</div>
<div
class=
"content"
>
<div>
from:
{{
record
.
referName
}}
</div>
<div>
use: field_name
</div>
</div>
</div>
</
template
>
<a
href=
"#"
>
引用
</a>
<a
href=
"#"
>
{{$t('tips.refer')}}
</a>
</a-tooltip>
</span>
...
...
@@ -76,29 +77,29 @@ import { DesignComponent } from '../../../../components'
import
{
PageSize
,
pathToRelated
}
from
"
../../../../api/utils
"
;
import
debounce
from
"
lodash.debounce
"
const
columns
=
[
{
title
:
'
名称
'
,
dataIndex
:
'
title
'
,
},
{
title
:
'
文件
'
,
dataIndex
:
'
folder
'
,
scopedSlots
:
{
customRender
:
'
folderWithPath
'
},
},
{
title
:
'
操作
'
,
key
:
'
action
'
,
scopedSlots
:
{
customRender
:
'
action
'
},
},
];
export
default
{
name
:
'
RangesList
'
,
components
:
{
DesignComponent
},
data
()
{
const
columns
=
[
{
title
:
this
.
$i18n
.
t
(
'
form.name
'
),
dataIndex
:
'
title
'
,
},
{
title
:
this
.
$i18n
.
t
(
'
form.file
'
),
dataIndex
:
'
folder
'
,
scopedSlots
:
{
customRender
:
'
folderWithPath
'
},
},
{
title
:
this
.
$i18n
.
t
(
'
form.opt
'
),
key
:
'
action
'
,
scopedSlots
:
{
customRender
:
'
action
'
},
},
];
return
{
models
:
[],
columns
,
...
...
ui/src/views/data/buildin/text/Edit.vue
浏览文件 @
c31e1067
...
...
@@ -2,35 +2,37 @@
<div>
<div
class=
"head"
>
<div
class=
"title"
>
文本
<span
v-if=
"id!=0"
>
编辑
</span><span
v-if=
"id==0"
>
新建
</span>
<div
class=
"title"
>
<span
v-if=
"id==0"
>
{{
$t
(
'
title.text.create
'
)
}}
</span>
<span
v-if=
"id!=0"
>
{{
$t
(
'
menu.text.edit
'
)
}}
</span>
</div>
</div>
<div
class=
"filter"
></div>
<div
class=
"buttons"
>
<a-button
type=
"primary"
@
click=
"back()"
>
返回
</a-button>
<a-button
type=
"primary"
@
click=
"back()"
>
{{
$t
(
'
action.back
'
)
}}
</a-button>
</div>
</div>
<div>
<a-form-model
ref=
"editForm"
:model=
"model"
:rules=
"rules"
>
<a-row
:gutter=
"colsFull"
>
<a-form-model-item
label=
"名称
"
prop=
"title"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-form-model-item
:label=
"$t('form.name')
"
prop=
"title"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-input
v-model=
"model.title"
/>
</a-form-model-item>
</a-row>
<a-row
:gutter=
"colsFull"
>
<a-form-model-item
label=
"目录
"
prop=
"folder"
class=
"zui-input-group zui-input-with-tips"
<a-form-model-item
:label=
"$t('form.dir')
"
prop=
"folder"
class=
"zui-input-group zui-input-with-tips"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-form-model-item
prop=
"folder"
:style=
"
{ display: 'inline-block', width: 'calc(70% - 30px)' }">
<a-select
v-model=
"model.folder"
placeholder=
"请选择"
>
<a-select
v-model=
"model.folder"
>
<a-select-option
v-for=
"(item, index) in dirs"
:value=
"item.name"
:key=
"index"
>
{{
item
.
name
}}
</a-select-option>
</a-select>
<span
class=
"zui-input-tips"
>
工作目录:
{{
workDir
}}
</span>
</a-form-model-item>
<span
class=
"zui-input-group-addon"
:style=
"
{ width: '60px' }">
<span>
子目录
</span>
<span>
{{
$t
(
'
form.folder
'
)
}}
</span>
</span>
<a-form-model-item
:style=
"
{ display: 'inline-block', width: 'calc(30% - 30px)' }">
...
...
@@ -40,21 +42,21 @@
</a-row>
<a-row
:gutter=
"colsFull"
>
<a-form-model-item
label=
"文件名
"
prop=
"fileName"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-form-model-item
:label=
"$t('form.file.name')
"
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-form-model-item
:label=
"$t('form.file.content')
"
prop=
"content"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-input
v-model=
"model.content"
type=
"textarea"
rows=
"3"
/>
</a-form-model-item>
</a-row>
<a-row
:gutter=
"colsFull"
>
<a-form-model-item
class=
"center"
>
<a-button
@
click=
"save"
type=
"primary"
>
保存
</a-button>
<a-button
@
click=
"reset"
style=
"margin-left: 10px;"
>
重置
</a-button>
<a-button
@
click=
"save"
type=
"primary"
>
{{
$t
(
'
action.save
'
)
}}
</a-button>
<a-button
@
click=
"reset"
style=
"margin-left: 10px;"
>
{{
$t
(
'
action.reset
'
)
}}
</a-button>
</a-form-model-item>
</a-row>
</a-form-model>
...
...
@@ -79,10 +81,10 @@ export default {
wrapperColHalf
:
{
lg
:
{
span
:
12
},
sm
:
{
span
:
12
}
},
rules
:
{
title
:
[
{
required
:
true
,
message
:
'
名称不能为空
'
,
trigger
:
'
change
'
},
{
required
:
true
,
message
:
this
.
$i18n
.
t
(
'
valid.required
'
)
,
trigger
:
'
change
'
},
],
fileName
:
[
{
required
:
true
,
message
:
'
文件名不能为空
'
,
trigger
:
'
change
'
},
{
required
:
true
,
message
:
this
.
$i18n
.
t
(
'
valid.required
'
)
,
trigger
:
'
change
'
},
],
folder
:
[
{
validator
:
checkDirIsYaml
,
trigger
:
'
change
'
},
...
...
ui/src/views/data/buildin/text/List.vue
浏览文件 @
c31e1067
<
template
>
<div>
<div
class=
"head"
>
<div
class=
"title"
>
文本列表
</div>
<div
class=
"title"
>
{{
$t
(
'
menu.text.list
'
)
}}
</div>
<div
class=
"filter"
>
<a-input-search
v-model=
"keywords"
@
change=
"onSearch"
:allowClear=
"true"
placeholder=
"输入关键字检索"
style=
"width: 300px"
/>
<a-input-search
v-model=
"keywords"
@
change=
"onSearch"
:allowClear=
"true"
placeholder=
"$t('tips.search')"
style=
"width: 300px"
/>
</div>
<div
class=
"buttons"
>
<a-button
type=
"primary"
@
click=
"create()"
>
新建
</a-button>
<a-button
type=
"primary"
@
click=
"create()"
>
{{
$t
(
'
action.create
'
)
}}
</a-button>
</div>
</div>
...
...
@@ -21,27 +22,27 @@
</span>
<span
slot=
"action"
slot-scope=
"record"
>
<a
@
click=
"edit(record)"
>
编辑
</a>
|
<a
@
click=
"edit(record)"
>
{{ $t('action.edit') }}
</a>
|
<a-popconfirm
title=
"确认删除?
"
ok-text=
"是
"
cancel-text=
"否
"
:title=
"$t('tips.delete')
"
:okText=
"$t('msg.yes')
"
:cancelText=
"$t('msg.no')
"
@
confirm=
"remove(record)"
>
<a
href=
"#"
>
删除
</a>
<a
href=
"#"
>
{{ $t('action.delete') }}
</a>
</a-popconfirm>
|
<a-tooltip
placement=
"top"
overlayClassName=
"tooltip-light"
>
<
template
slot=
"title"
>
<div
class=
"content-width"
style=
"min-width: 280px;"
>
<div
class=
"title"
>
引用文本
</div>
<div
class=
"title"
>
{{
$t
(
'
tips.refer
'
)
}}
</div>
<div
class=
"content"
>
<div>
range:
{{
record
.
referName
}}
</div>
</div>
</div>
</
template
>
<a
href=
"#"
>
引用
</a>
<a
href=
"#"
>
{{$t('tips.refer')}}
</a>
</a-tooltip>
</span>
...
...
@@ -61,28 +62,28 @@ import {listText, removeText} from "../../../../api/manage";
import
{
PageSize
,
pathToRelated
}
from
"
../../../../api/utils
"
;
import
debounce
from
"
lodash.debounce
"
const
columns
=
[
{
title
:
'
名称
'
,
dataIndex
:
'
title
'
,
},
{
title
:
'
文件
'
,
dataIndex
:
'
folder
'
,
scopedSlots
:
{
customRender
:
'
folderWithPath
'
},
},
{
title
:
'
操作
'
,
key
:
'
action
'
,
scopedSlots
:
{
customRender
:
'
action
'
},
},
];
export
default
{
name
:
'
TextList
'
,
components
:
{
},
data
()
{
const
columns
=
[
{
title
:
this
.
$i18n
.
t
(
'
form.name
'
),
dataIndex
:
'
title
'
,
},
{
title
:
this
.
$i18n
.
t
(
'
form.file
'
),
dataIndex
:
'
folder
'
,
scopedSlots
:
{
customRender
:
'
folderWithPath
'
},
},
{
title
:
this
.
$i18n
.
t
(
'
form.opt
'
),
key
:
'
action
'
,
scopedSlots
:
{
customRender
:
'
action
'
},
},
];
return
{
models
:
[],
columns
,
...
...
ui/src/views/data/mine/Edit.vue
浏览文件 @
c31e1067
...
...
@@ -2,31 +2,31 @@
<div>
<div
class=
"head"
>
<div
class=
"title"
>
测试数据
<span
v-if=
"id!=0"
>
编辑
</span><span
v-if=
"id==0"
>
新建
</span>
<span
v-if=
"id==0"
>
{{
$t
(
'
title.data.create
'
)
}}
</span>
<span
v-if=
"id!=0"
>
{{
$t
(
'
menu.data.edit
'
)
}}
</span>
</div>
<div
class=
"filter"
></div>
<div
class=
"buttons"
>
<a-button
type=
"primary"
@
click=
"back()"
>
返回
</a-button>
<a-button
type=
"primary"
@
click=
"back()"
>
{{
$t
(
'
action.back
'
)
}}
</a-button>
</div>
</div>
<div>
<a-form-model
ref=
"editForm"
:model=
"model"
:rules=
"rules"
:label-col=
"labelCol"
:wrapper-col=
"wrapperCol"
>
<a-form-model-item
label=
"名称
"
prop=
"title"
>
<a-form-model-item
:label=
"$t('form.name')
"
prop=
"title"
>
<a-input
v-model=
"model.title"
/>
</a-form-model-item>
<a-form-model-item
label=
"目录
"
class=
"zui-input-group zui-input-with-tips"
>
<a-form-model-item
:label=
"$t('form.dir')
"
class=
"zui-input-group zui-input-with-tips"
>
<a-form-model-item
prop=
"folder"
:style=
"
{ display: 'inline-block', width: 'calc(70% - 30px)' }">
<a-select
v-model=
"model.folder"
placeholder=
"请选择"
>
<a-select
v-model=
"model.folder"
>
<a-select-option
v-for=
"(item, index) in dirs"
:value=
"item.name"
:key=
"index"
>
{{
item
.
name
}}
</a-select-option>
</a-select>
<span
class=
"zui-input-tips"
>
工作目录:
{{
workDir
}}
</span>
</a-form-model-item>
<span
class=
"zui-input-group-addon"
:style=
"
{ width: '60px' }">
<span>
子目录
</span>
<span>
{{
$t
(
'
form.folder
'
)
}}
</span>
</span>
<a-form-model-item
:style=
"
{ display: 'inline-block', width: 'calc(30% - 30px)' }">
...
...
@@ -34,27 +34,20 @@
</a-form-model-item>
</a-form-model-item>
<a-form-model-item
label=
"文件名
"
prop=
"fileName"
>
<a-form-model-item
:label=
"$t('form.file.name')
"
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
label=
"描述"
prop=
"desc"
>
<a-form-model-item
:label=
"$t('form.desc')"
prop=
"desc"
>
<a-input
v-model=
"model.desc"
type=
"textarea"
rows=
"3"
/>
</a-form-model-item>
<a-form-model-item
:wrapper-col=
"
{ span: 14, offset: 6 }">
<a-button
@
click=
"save"
type=
"primary"
>
保存
{{
$t
(
'
action.save
'
)
}}
</a-button>
<a-button
@
click=
"reset"
style=
"margin-left: 10px;"
>
重置
{{
$t
(
'
action.reset
'
)
}}
</a-button>
</a-form-model-item>
</a-form-model>
...
...
@@ -76,10 +69,10 @@ export default {
wrapperCol
:
wrapperColLarge
,
rules
:
{
title
:
[
{
required
:
true
,
message
:
'
名称不能为空
'
,
trigger
:
'
change
'
},
{
required
:
true
,
message
:
this
.
$i18n
.
t
(
'
valid.required
'
)
,
trigger
:
'
change
'
},
],
fileName
:
[
{
required
:
true
,
message
:
'
文件名不能为空
'
,
trigger
:
'
change
'
},
{
required
:
true
,
message
:
this
.
$i18n
.
t
(
'
valid.required
'
)
,
trigger
:
'
change
'
},
],
folder
:
[
{
validator
:
checkDirIsUsers
,
trigger
:
'
change
'
},
...
...
ui/src/views/data/mine/List.vue
浏览文件 @
c31e1067
<
template
>
<div>
<div
class=
"head"
>
<div
class=
"title"
>
测试数据列表
</div>
<div
class=
"title"
>
{{
$t
(
'
menu.data.list
'
)
}}
</div>
<div
class=
"filter"
>
<a-input-search
v-model=
"keywords"
@
change=
"onSearch"
:allowClear=
"true"
placeholder=
"输入关键字检索"
style=
"width: 300px"
/>
<a-input-search
v-model=
"keywords"
@
change=
"onSearch"
:allowClear=
"true"
:placeholder=
"$t('tips.search')"
style=
"width: 300px"
/>
</div>
<div
class=
"buttons"
>
<a-button
type=
"primary"
@
click=
"create()"
>
新建
</a-button>
<a-button
type=
"primary"
@
click=
"create()"
>
{{
$t
(
'
action.create
'
)
}}
</a-button>
</div>
</div>
...
...
@@ -21,24 +22,24 @@
</span>
<span
slot=
"action"
slot-scope=
"record"
>
<a
@
click=
"edit(record)"
>
编辑
</a>
<a
@
click=
"design(record)"
>
设计
</a>
<a
@
click=
"edit(record)"
>
{{ $t('action.edit') }}
</a>
<a
@
click=
"design(record)"
>
{{ $t('action.design') }}
</a>
<a-popconfirm
title=
"确认删除?
"
ok-text=
"是
"
cancel-text=
"否
"
:title=
"$t('tips.delete')
"
:okText=
"$t('msg.yes')
"
:cancelText=
"$t('msg.no')
"
@
confirm=
"remove(record)"
>
<a
href=
"#"
>
删除
</a>
<a
href=
"#"
>
{{ $t('action.delete') }}
</a>
</a-popconfirm>
<a-popover
@
visibleChange=
"preview(record)"
title=
"数据预览
"
trigger=
"click"
<a-popover
:title=
"$t('msg.data')"
@
visibleChange=
"preview(record)
"
trigger=
"click"
placement=
"bottom"
:autoAdjustOverflow=
"true"
>
<
template
slot=
"content"
>
<div
v-html=
"previewData"
></div>
</
template
>
<a>
预览
</a>
<a>
{{ $t('action.preview') }}
</a>
</a-popover>
</span>
...
...
@@ -70,29 +71,29 @@ import { DesignComponent } from '../../../components'
import
{
PageSize
,
ResTypeDef
,
pathToRelated
}
from
"
../../../api/utils
"
;
import
debounce
from
"
lodash.debounce
"
const
columns
=
[
{
title
:
'
名称
'
,
dataIndex
:
'
title
'
,
},
{
title
:
'
文件
'
,
dataIndex
:
'
folder
'
,
scopedSlots
:
{
customRender
:
'
folderWithPath
'
},
},
{
title
:
'
操作
'
,
key
:
'
action
'
,
scopedSlots
:
{
customRender
:
'
action
'
},
},
];
export
default
{
name
:
'
Mine
'
,
components
:
{
DesignComponent
},
data
()
{
const
columns
=
[
{
title
:
this
.
$i18n
.
t
(
'
form.name
'
),
dataIndex
:
'
title
'
,
},
{
title
:
this
.
$i18n
.
t
(
'
form.file
'
),
dataIndex
:
'
folder
'
,
scopedSlots
:
{
customRender
:
'
folderWithPath
'
},
},
{
title
:
this
.
$i18n
.
t
(
'
form.opt
'
),
key
:
'
action
'
,
scopedSlots
:
{
customRender
:
'
action
'
},
},
];
return
{
defs
:
[],
previewData
:
''
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录