Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
易企天创
zendata
提交
a2f072bd
Z
zendata
项目概览
易企天创
/
zendata
8 个月 前同步成功
通知
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 搜索 >>
提交
a2f072bd
编写于
4月 27, 2023
作者:
aaronchen2k2k
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix issues
上级
518e4fc5
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
45 addition
and
22 deletion
+45
-22
ui/src/components/FieldRefer.vue
ui/src/components/FieldRefer.vue
+28
-10
ui/src/locales/lang/en-US.js
ui/src/locales/lang/en-US.js
+2
-1
ui/src/locales/lang/zh-CN.js
ui/src/locales/lang/zh-CN.js
+2
-1
users/test.yaml
users/test.yaml
+6
-3
users/test/01.yaml
users/test/01.yaml
+4
-4
users/test/dir/content.yaml
users/test/dir/content.yaml
+3
-3
未找到文件。
ui/src/components/FieldRefer.vue
浏览文件 @
a2f072bd
...
...
@@ -54,13 +54,28 @@
</a-form-model-item>
</a-row>
<!-- column list -->
<a-row
v-if=
"showColSection"
:gutter=
"colsFull"
>
<a-form-model-item
:label=
"$t('form.col')"
prop=
"colName"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-select
v-model=
"referColNames"
:mode=
"fieldMultiple"
>
<a-select
v-
if=
"fileMultiple === 'multiple'"
v-
model=
"referColNames"
:mode=
"fieldMultiple"
>
<a-select-option
v-for=
"f in fields"
:key=
"f.name"
>
{{
f
.
name
}}
</a-select-option>
</a-select>
<a-select
v-if=
"fileMultiple !== 'multiple'"
v-model=
"refer.colName"
>
<a-select-option
v-for=
"f in fields"
:key=
"f.name"
>
{{
f
.
name
}}
</a-select-option>
</a-select>
</a-form-model-item>
</a-row>
<!-- sql where -->
<a-row
v-if=
"refer.type==='excel'"
:gutter=
"colsFull"
>
<a-form-model-item
:label=
"$t('form.where')"
prop=
"colName"
:labelCol=
"labelColFull"
:wrapperCol=
"wrapperColFull"
>
<a-input
v-model=
"refer.condition"
/>
</a-form-model-item>
</a-row>
...
...
@@ -211,7 +226,7 @@ export default {
return
col
.
split
(
'
:
'
)[
0
]
})
this
.
removeSheet
()
this
.
convertExcelFileColToPath
()
this
.
listReferFileForSelection
(
this
.
refer
.
type
,
true
)
})
},
...
...
@@ -224,7 +239,7 @@ export default {
this
.
listReferFileForSelection
(
this
.
refer
.
type
,
false
)
},
onReferFileChanged
()
{
console
.
log
(
"
onReferFileChanged
"
,
this
.
referFiles
,
this
.
refer
.
file
)
console
.
log
(
"
onReferFileChanged
"
)
if
(
this
.
refer
.
type
==
'
excel
'
)
{
this
.
listReferSheetForSelection
(
false
)
...
...
@@ -258,24 +273,27 @@ export default {
this
.
refer
.
file
=
this
.
referFiles
}
else
if
(
this
.
refer
.
type
===
'
excel
'
)
{
console
.
log
(
'
use this.refer.file
'
)
this
.
refer
.
colName
=
this
.
referColNames
if
(
this
.
refer
.
file
.
lastIndexOf
(
'
.xlsx
'
)
>
0
)
{
this
.
refer
.
file
=
this
.
refer
.
file
.
substring
(
0
,
this
.
refer
.
file
.
lastIndexOf
(
'
.xlsx
'
))
}
}
else
{
this
.
refer
.
file
=
this
.
referFiles
this
.
refer
.
colName
=
this
.
referColNames
}
console
.
log
(
'
###
'
)
console
.
log
(
this
.
refer
.
file
)
let
data
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
refer
))
if
(
data
.
type
===
'
excel
'
)
data
.
file
=
data
.
file
+
'
.
'
+
data
.
sheet
data
.
count
=
parseInt
(
data
.
count
)
data
.
step
=
parseInt
(
data
.
step
)
console
.
log
(
'
###
'
,
data
)
updateRefer
(
data
,
this
.
type
).
then
(
json
=>
{
console
.
log
(
'
updateRefer
'
,
json
)
if
(
json
.
code
==
1
)
{
this
.
loadData
()
this
.
$notification
[
'
success
'
]({
message
:
this
.
$i18n
.
t
(
'
tips.success.to.submit
'
),
duration
:
3
,
...
...
@@ -356,9 +374,9 @@ export default {
})
}
},
removeSheet
()
{
convertExcelFileColToPath
()
{
if
(
this
.
refer
.
type
==
'
excel
'
)
{
this
.
refer
.
file
=
this
.
refer
.
file
.
substring
(
0
,
this
.
refer
.
file
.
lastIndexOf
(
'
.
'
))
this
.
refer
.
file
=
this
.
refer
.
file
.
substring
(
0
,
this
.
refer
.
file
.
lastIndexOf
(
'
.
'
))
+
'
.xlsx
'
}
}
}
...
...
ui/src/locales/lang/en-US.js
浏览文件 @
a2f072bd
...
...
@@ -146,6 +146,7 @@ const locale = {
'
form.reset
'
:
'
Reset
'
,
'
form.cancel
'
:
'
Cancel
'
,
'
form.close
'
:
'
Close
'
,
'
form.where
'
:
'
Where
'
,
'
valid.required
'
:
'
Can not be empty.
'
,
'
valid.type.empty
'
:
'
Type cannot be empty.
'
,
...
...
@@ -176,7 +177,7 @@ const locale = {
'
copy.success
'
:
'
Copy Success
'
,
'
copy.title
'
:
'
Copy Link
'
,
'
preview.title
'
:
'
Refresh Data
'
,
}
...
...
ui/src/locales/lang/zh-CN.js
浏览文件 @
a2f072bd
...
...
@@ -146,6 +146,7 @@ const locale = {
'
form.reset
'
:
'
重置
'
,
'
form.cancel
'
:
'
取消
'
,
'
form.close
'
:
'
关闭
'
,
'
form.where
'
:
'
Where条件
'
,
'
valid.required
'
:
'
该字段不能为空。
'
,
'
valid.type.empty
'
:
'
类型不能为空
'
,
...
...
@@ -176,7 +177,7 @@ const locale = {
'
copy.success
'
:
'
复制成功
'
,
'
copy.title
'
:
'
复制链接
'
,
'
preview.title
'
:
'
刷新数据
'
,
}
...
...
users/test.yaml
浏览文件 @
a2f072bd
title
:
测试
desc
:
"
"
fields
:
-
field
:
新字段
-
field
:
新字段
222
range
:
1-9
prefix
:
=
postfix
:
'
-'
from
:
color.v1.xlsx.color
select
:
english
from
:
city.v1.city
select
:
name
where
:
state like '%山东%'
-
field
:
新字段333
range
:
1-3
users/test/01.yaml
浏览文件 @
a2f072bd
title
:
测试
desc
:
"
"
fields
:
-
field
:
新字段
range
:
1-9
prefix
:
"
="
postfix
:
"
-"
-
field
:
新字段1111
range
:
1-9
prefix
:
=
postfix
:
'
-'
users/test/dir/content.yaml
浏览文件 @
a2f072bd
...
...
@@ -44,11 +44,11 @@ fields:
postfix
:
"
\t
"
from
:
ip.v1.yaml
use
:
privateC{1}
-
field
:
field_use_excel
-
field
:
field_use_excel
666
postfix
:
"
\t
"
rand
:
true
from
:
city.v1.city
select
:
nam
e
from
:
xiehouyu.v1.xiehouyu
select
:
riddl
e
where
:
state like '%山东%'
-
field
:
field_with_children
fields
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录