Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
55acb8a5
Unverified
提交
55acb8a5
authored
11月 09, 2021
作者:
XiaJunjie2020
提交者:
GitHub
11月 09, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1150 from dataease/pr@dev@feat_dataset_table_field_sync
feat(数据集):数据集字段管理页面,增加同步字段功能
上级
c6aa9af3
0bb4c9da
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
38 行增加
和
6 行删除
+38
-6
DataSetTableService.java
...java/io/dataease/service/dataset/DataSetTableService.java
+1
-1
en.js
frontend/src/lang/en.js
+4
-1
tw.js
frontend/src/lang/tw.js
+4
-1
zh.js
frontend/src/lang/zh.js
+4
-1
FieldEdit.vue
frontend/src/views/dataset/data/FieldEdit.vue
+24
-1
ViewTable.vue
frontend/src/views/dataset/data/ViewTable.vue
+1
-1
没有找到文件。
backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java
浏览文件 @
55acb8a5
...
@@ -1080,7 +1080,7 @@ public class DataSetTableService {
...
@@ -1080,7 +1080,7 @@ public class DataSetTableService {
}
}
// delete 数据库中多余的字段
// delete 数据库中多余的字段
DatasetTableFieldExample
datasetTableFieldExample
=
new
DatasetTableFieldExample
();
DatasetTableFieldExample
datasetTableFieldExample
=
new
DatasetTableFieldExample
();
datasetTableFieldExample
.
createCriteria
().
andTableIdEqualTo
(
datasetTable
.
getId
()).
andOriginNameNotIn
(
originNameList
);
datasetTableFieldExample
.
createCriteria
().
andTableIdEqualTo
(
datasetTable
.
getId
()).
and
ExtFieldEqualTo
(
0
).
and
OriginNameNotIn
(
originNameList
);
datasetTableFieldMapper
.
deleteByExample
(
datasetTableFieldExample
);
datasetTableFieldMapper
.
deleteByExample
(
datasetTableFieldExample
);
}
}
}
}
...
...
frontend/src/lang/en.js
浏览文件 @
55acb8a5
...
@@ -1144,7 +1144,10 @@ export default {
...
@@ -1144,7 +1144,10 @@ export default {
field_name_less_50
:
'Field name can not more 50 chars.'
,
field_name_less_50
:
'Field name can not more 50 chars.'
,
excel_info_1
:
'1、Merged cells cannot exist in the file;'
,
excel_info_1
:
'1、Merged cells cannot exist in the file;'
,
excel_info_2
:
'2、The first line of the file is the title line, which cannot be empty or date;'
,
excel_info_2
:
'2、The first line of the file is the title line, which cannot be empty or date;'
,
excel_info_3
:
'3、The file size shall not exceed 500m。'
excel_info_3
:
'3、The file size shall not exceed 500m。'
,
sync_field
:
'Sync Field'
,
confirm_sync_field
:
'Confirm Sync'
,
confirm_sync_field_tips
:
'Sync field maybe change edit field,please confirm'
},
},
datasource
:
{
datasource
:
{
datasource
:
'Data Source'
,
datasource
:
'Data Source'
,
...
...
frontend/src/lang/tw.js
浏览文件 @
55acb8a5
...
@@ -1145,7 +1145,10 @@ export default {
...
@@ -1145,7 +1145,10 @@ export default {
field_name_less_50
:
'字段名不能超過50個字符'
,
field_name_less_50
:
'字段名不能超過50個字符'
,
excel_info_1
:
'1、文件終不能存在合併單元格;'
,
excel_info_1
:
'1、文件終不能存在合併單元格;'
,
excel_info_2
:
'2、文件的第一行為標題行,不能為空,不能為日期;'
,
excel_info_2
:
'2、文件的第一行為標題行,不能為空,不能為日期;'
,
excel_info_3
:
'3、文件不超過500M。'
excel_info_3
:
'3、文件不超過500M。'
,
sync_field
:
'同步字段'
,
confirm_sync_field
:
'確認同步'
,
confirm_sync_field_tips
:
'同步字段可能會導致已編輯字段發生變更,請確認'
},
},
datasource
:
{
datasource
:
{
datasource
:
'數據源'
,
datasource
:
'數據源'
,
...
...
frontend/src/lang/zh.js
浏览文件 @
55acb8a5
...
@@ -1148,7 +1148,10 @@ export default {
...
@@ -1148,7 +1148,10 @@ export default {
field_name_less_50
:
'字段名不能超过50个字符'
,
field_name_less_50
:
'字段名不能超过50个字符'
,
excel_info_1
:
'1、文件中不能存在合并单元格;'
,
excel_info_1
:
'1、文件中不能存在合并单元格;'
,
excel_info_2
:
'2、文件的第一行为标题行,不能为空,不能为日期型;'
,
excel_info_2
:
'2、文件的第一行为标题行,不能为空,不能为日期型;'
,
excel_info_3
:
'3、Excel文件大小请确保在500M以内。'
excel_info_3
:
'3、Excel文件大小请确保在500M以内。'
,
sync_field
:
'同步字段'
,
confirm_sync_field
:
'确认同步'
,
confirm_sync_field_tips
:
'同步字段可能会导致已编辑字段发生变更,请确认'
},
},
datasource
:
{
datasource
:
{
datasource
:
'数据源'
,
datasource
:
'数据源'
,
...
...
frontend/src/views/dataset/data/FieldEdit.vue
浏览文件 @
55acb8a5
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
<el-form
:inline=
"true"
>
<el-form
:inline=
"true"
>
<el-form-item
class=
"form-item"
>
<el-form-item
class=
"form-item"
>
<el-button
v-if=
"hasDataPermission('manage',param.privileges)"
size=
"mini"
@
click=
"addCalcField"
>
{{
$t
(
'dataset.add_calc_field'
)
}}
</el-button>
<el-button
v-if=
"hasDataPermission('manage',param.privileges)"
size=
"mini"
@
click=
"addCalcField"
>
{{
$t
(
'dataset.add_calc_field'
)
}}
</el-button>
<el-button
v-if=
"hasDataPermission('manage',param.privileges) && table.type !== 'excel' && table.type !== 'custom'"
size=
"mini"
:loading=
"isSyncField"
@
click=
"syncField"
>
{{
$t
(
'dataset.sync_field'
)
}}
</el-button>
</el-form-item>
</el-form-item>
<el-form-item
class=
"form-item"
style=
"float: right;margin-right: 0;"
>
<el-form-item
class=
"form-item"
style=
"float: right;margin-right: 0;"
>
<el-input
<el-input
...
@@ -266,6 +267,10 @@ export default {
...
@@ -266,6 +267,10 @@ export default {
param
:
{
param
:
{
type
:
Object
,
type
:
Object
,
required
:
true
required
:
true
},
table
:
{
type
:
Object
,
required
:
true
}
}
},
},
data
()
{
data
()
{
...
@@ -287,7 +292,8 @@ export default {
...
@@ -287,7 +292,8 @@ export default {
fieldActiveNames
:
[
'd'
,
'q'
],
fieldActiveNames
:
[
'd'
,
'q'
],
searchField
:
''
,
searchField
:
''
,
editCalcField
:
false
,
editCalcField
:
false
,
currEditField
:
{}
currEditField
:
{},
isSyncField
:
false
}
}
},
},
watch
:
{
watch
:
{
...
@@ -388,6 +394,23 @@ export default {
...
@@ -388,6 +394,23 @@ export default {
})
})
}).
catch
(()
=>
{
}).
catch
(()
=>
{
})
})
},
syncField
()
{
this
.
$confirm
(
this
.
$t
(
'dataset.confirm_sync_field_tips'
),
this
.
$t
(
'dataset.confirm_sync_field'
),
{
confirmButtonText
:
this
.
$t
(
'chart.confirm'
),
cancelButtonText
:
this
.
$t
(
'chart.cancel'
),
type
:
'warning'
}).
then
(()
=>
{
this
.
isSyncField
=
true
post
(
'/dataset/table/syncField/'
+
this
.
param
.
id
,
null
).
then
(
response
=>
{
setTimeout
(()
=>
{
this
.
isSyncField
=
false
this
.
initField
()
},
500
)
})
}).
catch
(()
=>
{
})
}
}
}
}
}
}
...
...
frontend/src/views/dataset/data/ViewTable.vue
浏览文件 @
55acb8a5
...
@@ -51,7 +51,7 @@
...
@@ -51,7 +51,7 @@
<tab-data-preview
:param=
"param"
:table=
"table"
:fields=
"fields"
:data=
"data"
:page=
"page"
:form=
"tableViewRowForm"
@
reSearch=
"reSearch"
/>
<tab-data-preview
:param=
"param"
:table=
"table"
:fields=
"fields"
:data=
"data"
:page=
"page"
:form=
"tableViewRowForm"
@
reSearch=
"reSearch"
/>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
:label=
"$t('dataset.field_manage')"
name=
"fieldEdit"
>
<el-tab-pane
:label=
"$t('dataset.field_manage')"
name=
"fieldEdit"
>
<field-edit
:param=
"param"
/>
<field-edit
:param=
"param"
:table=
"table"
/>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
v-if=
"table.type !== 'custom' && !(table.type === 'sql' && table.mode === 0)"
:label=
"$t('dataset.join_view')"
name=
"joinView"
>
<el-tab-pane
v-if=
"table.type !== 'custom' && !(table.type === 'sql' && table.mode === 0)"
:label=
"$t('dataset.join_view')"
name=
"joinView"
>
<union-view
:param=
"param"
:table=
"table"
/>
<union-view
:param=
"param"
:table=
"table"
/>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论