Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
0b410f94
提交
0b410f94
authored
4月 07, 2021
作者:
junjie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(数据集):数据集 excel、自助数据集,先创建几个界面
上级
a0ef8e0a
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
354 行增加
和
4 行删除
+354
-4
zh.js
frontend/src/lang/zh.js
+4
-1
AddCustom.vue
frontend/src/views/dataset/add/AddCustom.vue
+144
-0
AddExcel.vue
frontend/src/views/dataset/add/AddExcel.vue
+195
-0
Group.vue
frontend/src/views/dataset/group/Group.vue
+2
-2
index.vue
frontend/src/views/dataset/index.vue
+9
-1
没有找到文件。
frontend/src/lang/zh.js
浏览文件 @
0b410f94
...
@@ -770,7 +770,10 @@ export default {
...
@@ -770,7 +770,10 @@ export default {
current_update_time
:
'当前更新时间'
,
current_update_time
:
'当前更新时间'
,
param
:
'参数'
,
param
:
'参数'
,
edit_sql
:
'编辑SQL'
,
edit_sql
:
'编辑SQL'
,
showRow
:
'显示行'
showRow
:
'显示行'
,
add_excel_table
:
'添加Excel数据集'
,
add_custom_table
:
'添加自助数据集'
,
upload_file
:
'上传文件'
},
},
datasource
:
{
datasource
:
{
create
:
'新建数据连接'
,
create
:
'新建数据连接'
,
...
...
frontend/src/views/dataset/add/AddCustom.vue
0 → 100644
浏览文件 @
0b410f94
<
template
>
<el-col>
<el-row>
<el-row
style=
"height: 26px;"
>
<span
style=
"line-height: 26px;"
>
{{
$t
(
'dataset.add_custom_table'
)
}}
</span>
<el-row
style=
"float: right"
>
<el-button
size=
"mini"
@
click=
"cancel"
>
{{
$t
(
'dataset.cancel'
)
}}
</el-button>
<el-button
size=
"mini"
type=
"primary"
:disabled=
"checkTableList.length
<
1
"
@
click=
"save"
>
{{
$t
(
'dataset.confirm'
)
}}
</el-button>
</el-row>
</el-row>
<el-divider
/>
<el-row>
<el-col>
123
</el-col>
<el-col>
456
</el-col>
</el-row>
</el-row>
</el-col>
</
template
>
<
script
>
import
{
post
}
from
'@/api/dataset/dataset'
export
default
{
name
:
'AddCustom'
,
props
:
{
param
:
{
type
:
Object
,
default
:
null
}
},
data
()
{
return
{
searchTable
:
''
,
options
:
[],
dataSource
:
''
,
tables
:
[],
checkTableList
:
[],
mode
:
'0'
,
tableData
:
[]
}
},
watch
:
{
// dataSource(val) {
// if (val) {
// post('/datasource/getTables', { id: val }).then(response => {
// this.tables = response.data
// this.tableData = JSON.parse(JSON.stringify(this.tables))
// })
// }
// },
// searchTable(val) {
// if (val && val !== '') {
// this.tableData = JSON.parse(JSON.stringify(this.tables.filter(ele => { return ele.includes(val) })))
// } else {
// this.tableData = JSON.parse(JSON.stringify(this.tables))
// }
// }
},
mounted
()
{
// this.initDataSource()
},
activated
()
{
// this.initDataSource()
},
methods
:
{
// initDataSource() {
// listDatasource().then(response => {
// this.options = response.data
// })
// },
save
()
{
// console.log(this.checkTableList);
// console.log(this.scene);
const
sceneId
=
this
.
param
.
id
const
dataSourceId
=
this
.
dataSource
const
tables
=
[]
// const mode = this.mode
this
.
checkTableList
.
forEach
(
function
(
name
)
{
tables
.
push
({
name
:
name
,
sceneId
:
sceneId
,
dataSourceId
:
dataSourceId
,
type
:
'excel'
,
mode
:
1
})
})
post
(
'/dataset/table/batchAdd'
,
tables
).
then
(
response
=>
{
this
.
$store
.
dispatch
(
'dataset/setSceneData'
,
new
Date
().
getTime
())
this
.
cancel
()
})
},
cancel
()
{
this
.
dataReset
()
// this.$router.push('/dataset/home')
this
.
$emit
(
'switchComponent'
,
{
name
:
''
})
},
dataReset
()
{
this
.
searchTable
=
''
this
.
options
=
[]
this
.
dataSource
=
''
this
.
tables
=
[]
this
.
checkTableList
=
[]
}
}
}
</
script
>
<
style
scoped
>
.el-divider--horizontal
{
margin
:
12px
0
;
}
.form-item
{
margin-bottom
:
6px
;
}
.el-checkbox
{
margin-bottom
:
14px
;
margin-left
:
0
;
margin-right
:
14px
;
}
.el-checkbox.is-bordered
+
.el-checkbox.is-bordered
{
margin-left
:
0
;
}
span
{
font-size
:
14px
;
}
</
style
>
frontend/src/views/dataset/add/AddExcel.vue
0 → 100644
浏览文件 @
0b410f94
<
template
>
<el-col>
<el-row>
<el-row
style=
"height: 26px;"
>
<span
style=
"line-height: 26px;"
>
{{
$t
(
'dataset.add_excel_table'
)
}}
</span>
<el-row
style=
"float: right"
>
<el-button
size=
"mini"
@
click=
"cancel"
>
{{
$t
(
'dataset.cancel'
)
}}
</el-button>
<el-button
size=
"mini"
type=
"primary"
@
click=
"save"
>
{{
$t
(
'dataset.confirm'
)
}}
</el-button>
</el-row>
</el-row>
<el-divider
/>
<el-row>
<el-row>
<el-col
style=
"width: 500px;"
>
<el-form
:model=
"form"
:inline=
"true"
size=
"mini"
class=
"row-style"
>
<el-form-item>
<el-input
v-model=
"form.name"
:placeholder=
"$t('commons.name')"
/>
</el-form-item>
<el-form-item>
<el-upload
action=
"https://jsonplaceholder.typicode.com/posts/"
:multiple=
"false"
:show-file-list=
"false"
accept=
".xls,.xlsx,.csv"
>
<el-button
size=
"mini"
type=
"primary"
>
{{
$t
(
'dataset.upload_file'
)
}}
</el-button>
</el-upload>
</el-form-item>
</el-form>
</el-col>
</el-row>
</el-row>
<el-row>
<el-card
class=
"box-card dataPreview"
shadow=
"never"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
{{
$t
(
'dataset.data_preview'
)
}}
</span>
</div>
<div
class=
"text item"
>
<ux-grid
ref=
"plxTable"
size=
"mini"
style=
"width: 100%;"
:height=
"height"
:checkbox-config=
"
{highlight: true}"
:width-resize="true"
>
<ux-table-column
v-for=
"field in fields"
:key=
"field.fieldName"
min-width=
"200px"
:field=
"field.fieldName"
:title=
"field.remarks"
:resizable=
"true"
/>
</ux-grid>
</div>
</el-card>
</el-row>
</el-row>
</el-col>
</
template
>
<
script
>
import
{
post
}
from
'@/api/dataset/dataset'
export
default
{
name
:
'AddExcel'
,
props
:
{
param
:
{
type
:
Object
,
default
:
null
}
},
data
()
{
return
{
form
:
{
name
:
''
},
fields
:
[],
mode
:
'1'
,
height
:
600
}
},
watch
:
{
// dataSource(val) {
// if (val) {
// post('/datasource/getTables', { id: val }).then(response => {
// this.tables = response.data
// this.tableData = JSON.parse(JSON.stringify(this.tables))
// })
// }
// },
// searchTable(val) {
// if (val && val !== '') {
// this.tableData = JSON.parse(JSON.stringify(this.tables.filter(ele => { return ele.includes(val) })))
// } else {
// this.tableData = JSON.parse(JSON.stringify(this.tables))
// }
// }
},
mounted
()
{
// this.initDataSource()
},
activated
()
{
// this.initDataSource()
},
methods
:
{
// initDataSource() {
// listDatasource().then(response => {
// this.options = response.data
// })
// },
save
()
{
// console.log(this.checkTableList);
// console.log(this.scene);
const
sceneId
=
this
.
param
.
id
const
dataSourceId
=
this
.
dataSource
const
tables
=
[]
const
mode
=
this
.
mode
this
.
checkTableList
.
forEach
(
function
(
name
)
{
tables
.
push
({
name
:
name
,
sceneId
:
sceneId
,
dataSourceId
:
dataSourceId
,
type
:
'excel'
,
mode
:
parseInt
(
mode
)
})
})
post
(
'/dataset/table/batchAdd'
,
tables
).
then
(
response
=>
{
this
.
$store
.
dispatch
(
'dataset/setSceneData'
,
new
Date
().
getTime
())
this
.
cancel
()
})
},
cancel
()
{
this
.
dataReset
()
// this.$router.push('/dataset/home')
this
.
$emit
(
'switchComponent'
,
{
name
:
''
})
},
dataReset
()
{
this
.
searchTable
=
''
this
.
options
=
[]
this
.
dataSource
=
''
this
.
tables
=
[]
this
.
checkTableList
=
[]
}
}
}
</
script
>
<
style
scoped
>
.el-divider--horizontal
{
margin
:
12px
0
;
}
.form-item
{
margin-bottom
:
6px
;
}
.el-checkbox
{
margin-bottom
:
14px
;
margin-left
:
0
;
margin-right
:
14px
;
}
.el-checkbox.is-bordered
+
.el-checkbox.is-bordered
{
margin-left
:
0
;
}
span
{
font-size
:
14px
;
}
.row-style
>>>
.el-form-item__label
{
font-size
:
12px
;
}
.dataPreview
>>>
.el-card__header
{
padding
:
6px
8px
;
}
.dataPreview
>>>
.el-card__body
{
padding
:
10px
;
}
</
style
>
frontend/src/views/dataset/group/Group.vue
浏览文件 @
0b410f94
...
@@ -536,10 +536,10 @@ export default {
...
@@ -536,10 +536,10 @@ export default {
this
.
addData
(
'AddSQL'
)
this
.
addData
(
'AddSQL'
)
break
break
case
'excel'
:
case
'excel'
:
this
.
$message
(
param
.
type
)
this
.
addData
(
'AddExcel'
)
break
break
case
'custom'
:
case
'custom'
:
this
.
$message
(
param
.
type
)
this
.
addData
(
'AddCustom'
)
break
break
}
}
},
},
...
...
frontend/src/views/dataset/index.vue
浏览文件 @
0b410f94
...
@@ -22,10 +22,12 @@ import DataHome from './data/DataHome'
...
@@ -22,10 +22,12 @@ import DataHome from './data/DataHome'
import
ViewTable
from
'./data/ViewTable'
import
ViewTable
from
'./data/ViewTable'
import
AddDB
from
'./add/AddDB'
import
AddDB
from
'./add/AddDB'
import
AddSQL
from
'./add/AddSQL'
import
AddSQL
from
'./add/AddSQL'
import
AddExcel
from
'./add/AddExcel'
import
AddCustom
from
'./add/AddCustom'
export
default
{
export
default
{
name
:
'DataSet'
,
name
:
'DataSet'
,
components
:
{
DeMainContainer
,
DeContainer
,
DeAsideContainer
,
Group
,
DataHome
,
ViewTable
,
AddDB
,
AddSQL
},
components
:
{
DeMainContainer
,
DeContainer
,
DeAsideContainer
,
Group
,
DataHome
,
ViewTable
,
AddDB
,
AddSQL
,
AddExcel
,
AddCustom
},
data
()
{
data
()
{
return
{
return
{
component
:
DataHome
,
component
:
DataHome
,
...
@@ -46,6 +48,12 @@ export default {
...
@@ -46,6 +48,12 @@ export default {
case
'AddSQL'
:
case
'AddSQL'
:
this
.
component
=
AddSQL
this
.
component
=
AddSQL
break
break
case
'AddExcel'
:
this
.
component
=
AddExcel
break
case
'AddCustom'
:
this
.
component
=
AddCustom
break
default
:
default
:
this
.
component
=
DataHome
this
.
component
=
DataHome
break
break
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论