Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
njgzx
dataease
Commits
c839b3cb
提交
c839b3cb
authored
6月 08, 2021
作者:
junjie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(数据集):编辑excel前端
上级
0195edea
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
32 行增加
和
17 行删除
+32
-17
DataSetTableController.java
...o/dataease/controller/dataset/DataSetTableController.java
+2
-2
DataSetTableRequest.java
...aease/controller/request/dataset/DataSetTableRequest.java
+2
-0
DataSetTableService.java
...java/io/dataease/service/dataset/DataSetTableService.java
+3
-3
AddExcel.vue
frontend/src/views/dataset/add/AddExcel.vue
+23
-10
ViewTable.vue
frontend/src/views/dataset/data/ViewTable.vue
+2
-2
没有找到文件。
backend/src/main/java/io/dataease/controller/dataset/DataSetTableController.java
浏览文件 @
c839b3cb
...
...
@@ -25,12 +25,12 @@ public class DataSetTableController {
private
DataSetTableService
dataSetTableService
;
@PostMapping
(
"batchAdd"
)
public
void
batchAdd
(
@RequestBody
List
<
Data
setTable
>
datasetTable
)
throws
Exception
{
public
void
batchAdd
(
@RequestBody
List
<
Data
SetTableRequest
>
datasetTable
)
throws
Exception
{
dataSetTableService
.
batchInsert
(
datasetTable
);
}
@PostMapping
(
"update"
)
public
DatasetTable
save
(
@RequestBody
Data
setTable
datasetTable
)
throws
Exception
{
public
DatasetTable
save
(
@RequestBody
Data
SetTableRequest
datasetTable
)
throws
Exception
{
return
dataSetTableService
.
save
(
datasetTable
);
}
...
...
backend/src/main/java/io/dataease/controller/request/dataset/DataSetTableRequest.java
浏览文件 @
c839b3cb
...
...
@@ -18,4 +18,6 @@ public class DataSetTableRequest extends DatasetTable {
private
String
row
=
"1000"
;
private
String
userId
;
private
Integer
editType
;
}
backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java
浏览文件 @
c839b3cb
...
...
@@ -84,13 +84,13 @@ public class DataSetTableService {
@Value
(
"${upload.file.path}"
)
private
String
path
;
public
void
batchInsert
(
List
<
Data
setTable
>
datasetTable
)
throws
Exception
{
for
(
Data
setTable
table
:
datasetTable
)
{
public
void
batchInsert
(
List
<
Data
SetTableRequest
>
datasetTable
)
throws
Exception
{
for
(
Data
SetTableRequest
table
:
datasetTable
)
{
save
(
table
);
}
}
public
DatasetTable
save
(
Data
setTable
datasetTable
)
throws
Exception
{
public
DatasetTable
save
(
Data
SetTableRequest
datasetTable
)
throws
Exception
{
checkName
(
datasetTable
);
if
(
StringUtils
.
equalsIgnoreCase
(
datasetTable
.
getType
(),
"sql"
))
{
DataSetTableRequest
dataSetTableRequest
=
new
DataSetTableRequest
();
...
...
frontend/src/views/dataset/add/AddExcel.vue
浏览文件 @
c839b3cb
...
...
@@ -20,7 +20,7 @@
<el-col
style=
"width: 500px;"
>
<el-form
:inline=
"true"
size=
"mini"
class=
"row-style"
>
<el-form-item
class=
"form-item"
>
<el-input
v-
model=
"name"
:disabled=
"!!param.tableId
"
:placeholder=
"$t('commons.name')"
/>
<el-input
v-
show=
"!param.tableId"
v-model=
"name
"
:placeholder=
"$t('commons.name')"
/>
</el-form-item>
<el-form-item
class=
"form-item"
>
<el-upload
...
...
@@ -176,15 +176,28 @@ export default {
})
return
}
const
table
=
{
id
:
this
.
param
.
tableId
,
name
:
this
.
name
,
sceneId
:
this
.
param
.
id
,
dataSourceId
:
null
,
type
:
'excel'
,
mode
:
parseInt
(
this
.
mode
),
info
:
'{"data":"'
+
this
.
path
+
'"}'
,
editType
:
this
.
param
.
editType
?
this
.
param
.
editType
:
0
let
table
=
{}
if
(
!
this
.
param
.
tableId
)
{
table
=
{
id
:
this
.
param
.
tableId
,
name
:
this
.
name
,
sceneId
:
this
.
param
.
id
,
dataSourceId
:
null
,
type
:
'excel'
,
mode
:
parseInt
(
this
.
mode
),
info
:
'{"data":"'
+
this
.
path
+
'"}'
}
}
else
{
table
=
{
id
:
this
.
param
.
tableId
,
name
:
this
.
param
.
table
.
name
,
sceneId
:
this
.
param
.
id
,
dataSourceId
:
null
,
type
:
'excel'
,
mode
:
parseInt
(
this
.
mode
),
info
:
'{"data":"'
+
this
.
path
+
'"}'
,
editType
:
this
.
param
.
editType
?
this
.
param
.
editType
:
0
}
}
post
(
'/dataset/table/update'
,
table
).
then
(
response
=>
{
this
.
$store
.
dispatch
(
'dataset/setSceneData'
,
new
Date
().
getTime
())
...
...
frontend/src/views/dataset/data/ViewTable.vue
浏览文件 @
c839b3cb
...
...
@@ -166,10 +166,10 @@ export default {
// console.log(param);
switch
(
param
.
type
)
{
case
'0'
:
this
.
$emit
(
'switchComponent'
,
{
name
:
'AddExcel'
,
param
:
{
id
:
this
.
table
.
sceneId
,
tableId
:
this
.
table
.
id
,
editType
:
0
}})
this
.
$emit
(
'switchComponent'
,
{
name
:
'AddExcel'
,
param
:
{
id
:
this
.
table
.
sceneId
,
tableId
:
this
.
table
.
id
,
editType
:
0
,
table
:
this
.
table
}})
break
case
'1'
:
this
.
$emit
(
'switchComponent'
,
{
name
:
'AddExcel'
,
param
:
{
id
:
this
.
table
.
sceneId
,
tableId
:
this
.
table
.
id
,
editType
:
1
}})
this
.
$emit
(
'switchComponent'
,
{
name
:
'AddExcel'
,
param
:
{
id
:
this
.
table
.
sceneId
,
tableId
:
this
.
table
.
id
,
editType
:
1
,
table
:
this
.
table
}})
break
}
},
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论