forked from github/dataease
feat(frontend): 数据集
This commit is contained in:
parent
daf441a0c9
commit
edeba4bb6a
25
frontend/src/business/components/dataset/data/AddDB.vue
Normal file
25
frontend/src/business/components/dataset/data/AddDB.vue
Normal file
@ -0,0 +1,25 @@
|
||||
<template>
|
||||
<el-col>
|
||||
<el-row>
|
||||
111111
|
||||
</el-row>
|
||||
</el-col>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "AddDB",
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
activated() {
|
||||
},
|
||||
methods: {}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
25
frontend/src/business/components/dataset/data/DataHome.vue
Normal file
25
frontend/src/business/components/dataset/data/DataHome.vue
Normal file
@ -0,0 +1,25 @@
|
||||
<template>
|
||||
<el-col style="height: 100%;">
|
||||
<el-row style="height: 100%;" class="custom-position">
|
||||
{{$t('dataset.pls_slc_tbl_left')}}
|
||||
</el-row>
|
||||
</el-col>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "DataHome"
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.custom-position {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
flex-flow: row nowrap;
|
||||
color: #9ea6b2;
|
||||
}
|
||||
</style>
|
@ -1,5 +1,6 @@
|
||||
<template xmlns:el-col="http://www.w3.org/1999/html">
|
||||
<el-col>
|
||||
<!-- group -->
|
||||
<el-col v-if="!sceneMode">
|
||||
<span>
|
||||
{{ $t('dataset.datalist') }}
|
||||
@ -49,7 +50,7 @@
|
||||
</span>
|
||||
<span>
|
||||
<span @click.stop v-if="data.type ==='group'">
|
||||
<el-dropdown trigger="click" @command="clickAdd">
|
||||
<el-dropdown trigger="click" @command="clickAdd" size="small">
|
||||
<span class="el-dropdown-link">
|
||||
<el-button
|
||||
icon="el-icon-plus"
|
||||
@ -68,7 +69,7 @@
|
||||
</el-dropdown>
|
||||
</span>
|
||||
<span @click.stop style="margin-left: 12px;">
|
||||
<el-dropdown trigger="click" @command="clickMore">
|
||||
<el-dropdown trigger="click" @command="clickMore" size="small">
|
||||
<span class="el-dropdown-link">
|
||||
<el-button
|
||||
icon="el-icon-more"
|
||||
@ -95,33 +96,50 @@
|
||||
</div>
|
||||
</el-col>
|
||||
|
||||
<el-dialog :title="dialogTitle" :visible="editGroup" :show-close="false">
|
||||
<el-dialog :title="dialogTitle" :visible="editGroup" :show-close="false" width="30%">
|
||||
<el-form :model="groupForm" :rules="groupFormRules" ref="groupForm">
|
||||
<el-form-item :label="$t('commons.name')" prop="name">
|
||||
<el-input v-model="groupForm.name"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="close()">{{$t('dataset.cancel')}}</el-button>
|
||||
<el-button type="primary" @click="saveGroup(groupForm)">{{$t('dataset.confirm')}}</el-button>
|
||||
<el-button @click="close()" size="mini">{{$t('dataset.cancel')}}</el-button>
|
||||
<el-button type="primary" @click="saveGroup(groupForm)" size="mini">{{$t('dataset.confirm')}}</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</el-col>
|
||||
|
||||
<!--scene-->
|
||||
<el-col v-if="sceneMode">
|
||||
<el-row>
|
||||
<span>
|
||||
{{ $t('dataset.scene') }}
|
||||
{{currGroup.name}}
|
||||
</span>
|
||||
<el-button icon="el-icon-back" size="mini" @click="sceneMode = false" style="float: right">
|
||||
<el-button icon="el-icon-back" size="mini" @click="back" style="float: right">
|
||||
{{$t('dataset.back')}}
|
||||
</el-button>
|
||||
</el-row>
|
||||
<el-divider/>
|
||||
<el-row>
|
||||
<el-button type="primary" size="mini" plain>
|
||||
{{$t('dataset.add_table')}}
|
||||
</el-button>
|
||||
<el-dropdown style="margin-right: 10px;" size="small" @command="clickAddData">
|
||||
<el-button type="primary" size="mini" plain>
|
||||
{{$t('dataset.add_table')}}
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="beforeClickAddData('db')">
|
||||
{{$t('dataset.db_data')}}
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="beforeClickAddData('sql')">
|
||||
{{$t('dataset.sql_data')}}
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="beforeClickAddData('excel')">
|
||||
{{$t('dataset.excel_data')}}
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="beforeClickAddData('custom')">
|
||||
{{$t('dataset.custom_data')}}
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
<el-button type="primary" size="mini" plain>
|
||||
{{$t('dataset.update')}}
|
||||
</el-button>
|
||||
@ -200,6 +218,7 @@ export default {
|
||||
search: '',
|
||||
editGroup: false,
|
||||
data: null,
|
||||
currGroup: null,
|
||||
expandedArray: [],
|
||||
groupForm: {
|
||||
name: '',
|
||||
@ -346,6 +365,7 @@ export default {
|
||||
// console.log(node);
|
||||
if (data.type === 'scene') {
|
||||
this.sceneMode = true;
|
||||
this.currGroup = data;
|
||||
}
|
||||
if (node.expanded) {
|
||||
this.expandedArray.push(data.id);
|
||||
@ -357,6 +377,39 @@ export default {
|
||||
}
|
||||
// console.log(this.expandedArray);
|
||||
},
|
||||
|
||||
back() {
|
||||
this.sceneMode = false;
|
||||
this.$router.push('/dataset/home');
|
||||
},
|
||||
|
||||
clickAddData(param) {
|
||||
console.log(param);
|
||||
switch (param.type) {
|
||||
case 'db':
|
||||
this.addDB();
|
||||
break;
|
||||
case 'sql':
|
||||
|
||||
break;
|
||||
case 'excel':
|
||||
|
||||
break;
|
||||
case 'custom':
|
||||
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
beforeClickAddData(type) {
|
||||
return {
|
||||
'type': type
|
||||
}
|
||||
},
|
||||
|
||||
addDB() {
|
||||
this.$router.push('/dataset/add_db');
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -1,5 +1,6 @@
|
||||
|
||||
const DataSet = () => import('@/business/components/dataset/DataSet');
|
||||
const DataSetHome = () => import('@/business/components/dataset/data/DataHome');
|
||||
const DataSetAddDB = () => import('@/business/components/dataset/data/AddDB');
|
||||
// const PerformanceTestHome = () => import('@/business/components/performance/home/PerformanceTestHome')
|
||||
// const EditPerformanceTest = () => import('@/business/components/performance/test/EditPerformanceTest')
|
||||
// const PerformanceTestList = () => import('@/business/components/performance/test/PerformanceTestList')
|
||||
@ -10,16 +11,21 @@ const DataSet = () => import('@/business/components/dataset/DataSet');
|
||||
export default {
|
||||
path: "/dataset",
|
||||
name: "dataset",
|
||||
// redirect: "/dataset/home",
|
||||
redirect: "/dataset/home",
|
||||
components: {
|
||||
content: DataSet
|
||||
},
|
||||
children: [
|
||||
// {
|
||||
// path: 'home',
|
||||
// name: 'datasetHome',
|
||||
// component: PerformanceTestHome,
|
||||
// },
|
||||
{
|
||||
path: 'home',
|
||||
name: 'DataSetHome',
|
||||
component: DataSetHome,
|
||||
},
|
||||
{
|
||||
path: 'add_db',
|
||||
name: 'DataSetAddDB',
|
||||
component: DataSetAddDB,
|
||||
},
|
||||
// {
|
||||
// path: 'test/create',
|
||||
// name: "createPerTest",
|
||||
|
@ -1519,24 +1519,29 @@ export default {
|
||||
title: 'Auth Source',
|
||||
auth_name_valid: 'Name does not support special characters',
|
||||
},
|
||||
dataset:{
|
||||
datalist:'Data List',
|
||||
add_group:'Add Group',
|
||||
add_scene:'Add Scene',
|
||||
group:'Group',
|
||||
scene:'Scene',
|
||||
delete:'Delete',
|
||||
move_to:'Move',
|
||||
rename:'Rename',
|
||||
tips:'Tips',
|
||||
confirm_delete:'Confirm Delete',
|
||||
delete_success:'Delete Success',
|
||||
confirm:'Confirm',
|
||||
cancel:'Cancel',
|
||||
search:'Search',
|
||||
back:'Back',
|
||||
add_table:'Add Table',
|
||||
process:'Process',
|
||||
update:'Update'
|
||||
dataset: {
|
||||
datalist: 'Data List',
|
||||
add_group: 'Add Group',
|
||||
add_scene: 'Add Scene',
|
||||
group: 'Group',
|
||||
scene: 'Scene',
|
||||
delete: 'Delete',
|
||||
move_to: 'Move',
|
||||
rename: 'Rename',
|
||||
tips: 'Tips',
|
||||
confirm_delete: 'Confirm Delete',
|
||||
delete_success: 'Delete Success',
|
||||
confirm: 'Confirm',
|
||||
cancel: 'Cancel',
|
||||
search: 'Search',
|
||||
back: 'Back',
|
||||
add_table: 'Add Table',
|
||||
process: 'Process',
|
||||
update: 'Update',
|
||||
db_data: 'DB Table',
|
||||
sql_data: 'SQL Data',
|
||||
excel_data: 'Excel Data',
|
||||
custom_data: 'Custom Data',
|
||||
pls_slc_tbl_left:'Please select table from left'
|
||||
}
|
||||
};
|
||||
|
@ -1,7 +1,7 @@
|
||||
export default {
|
||||
commons: {
|
||||
cover:'覆盖',
|
||||
not_cover:'不覆盖',
|
||||
cover: '覆盖',
|
||||
not_cover: '不覆盖',
|
||||
import_mode: '导入模式',
|
||||
import_module: '导入模块',
|
||||
please_fill_in_the_template: '请填写模版内容',
|
||||
@ -593,7 +593,7 @@ export default {
|
||||
create_info: '创建',
|
||||
update_info: '更新',
|
||||
batch_edit: "批量编辑",
|
||||
batch_move:"批量移动",
|
||||
batch_move: "批量移动",
|
||||
path_valid_info: "请求路径无效",
|
||||
other_config: "其他设置",
|
||||
message_template: "报文模版",
|
||||
@ -1523,25 +1523,30 @@ export default {
|
||||
title: '认证设置',
|
||||
auth_name_valid: '名称不支持特殊字符',
|
||||
},
|
||||
dataset:{
|
||||
datalist:'数据列表',
|
||||
add_group:'添加分组',
|
||||
add_scene:'添加场景',
|
||||
group:'分组',
|
||||
scene:'场景',
|
||||
delete:'删除',
|
||||
move_to:'移动到',
|
||||
rename:'重命名',
|
||||
tips:'提示',
|
||||
confirm_delete:'确认删除',
|
||||
delete_success:'删除成功',
|
||||
confirm:'确认',
|
||||
cancel:'取消',
|
||||
search:'搜索',
|
||||
back:'返回',
|
||||
add_table:'添加表',
|
||||
process:'进度',
|
||||
update:'更新'
|
||||
dataset: {
|
||||
datalist: '数据列表',
|
||||
add_group: '添加分组',
|
||||
add_scene: '添加场景',
|
||||
group: '分组',
|
||||
scene: '场景',
|
||||
delete: '删除',
|
||||
move_to: '移动到',
|
||||
rename: '重命名',
|
||||
tips: '提示',
|
||||
confirm_delete: '确认删除',
|
||||
delete_success: '删除成功',
|
||||
confirm: '确认',
|
||||
cancel: '取消',
|
||||
search: '搜索',
|
||||
back: '返回',
|
||||
add_table: '添加表',
|
||||
process: '进度',
|
||||
update: '更新',
|
||||
db_data: '数据库表',
|
||||
sql_data: 'SQL数据集',
|
||||
excel_data: 'Excel数据集',
|
||||
custom_data: '自助数据集',
|
||||
pls_slc_tbl_left:'请从左侧选择表'
|
||||
},
|
||||
datasource: {
|
||||
create: '新建数据连接',
|
||||
|
@ -1,7 +1,7 @@
|
||||
export default {
|
||||
commons: {
|
||||
cover:'覆蓋',
|
||||
not_cover:'不覆蓋',
|
||||
cover: '覆蓋',
|
||||
not_cover: '不覆蓋',
|
||||
import_mode: '導入模式',
|
||||
import_module: '導入模塊',
|
||||
please_fill_in_the_template: '請填寫模版內容',
|
||||
@ -591,7 +591,7 @@ export default {
|
||||
create_info: '創建',
|
||||
update_info: '更新',
|
||||
batch_edit: "批量編輯",
|
||||
batch_move:"批量移動",
|
||||
batch_move: "批量移動",
|
||||
path_valid_info: "請求路徑無效",
|
||||
other_config: "其他設置",
|
||||
message_template: "報文模版",
|
||||
@ -1520,24 +1520,29 @@ export default {
|
||||
title: '認證設置',
|
||||
auth_name_valid: '名稱不支持特殊字符',
|
||||
},
|
||||
dataset:{
|
||||
datalist:'數據列表',
|
||||
add_group:'添加分組',
|
||||
add_scene:'添加場景',
|
||||
group:'分組',
|
||||
scene:'場景',
|
||||
delete:'刪除',
|
||||
move_to:'移動到',
|
||||
rename:'重命名',
|
||||
tips:'提示',
|
||||
confirm_delete:'確認刪除',
|
||||
delete_success:'刪除成功',
|
||||
confirm:'確認',
|
||||
cancel:'取消',
|
||||
search:'搜索',
|
||||
back:'返回',
|
||||
add_table:'添加表',
|
||||
process:'進度',
|
||||
update:'更新'
|
||||
dataset: {
|
||||
datalist: '數據列表',
|
||||
add_group: '添加分組',
|
||||
add_scene: '添加場景',
|
||||
group: '分組',
|
||||
scene: '場景',
|
||||
delete: '刪除',
|
||||
move_to: '移動到',
|
||||
rename: '重命名',
|
||||
tips: '提示',
|
||||
confirm_delete: '確認刪除',
|
||||
delete_success: '刪除成功',
|
||||
confirm: '確認',
|
||||
cancel: '取消',
|
||||
search: '搜索',
|
||||
back: '返回',
|
||||
add_table: '添加表',
|
||||
process: '進度',
|
||||
update: '更新',
|
||||
db_data: '數據庫表',
|
||||
sql_data: 'SQL數據集',
|
||||
excel_data: 'Excel數據集',
|
||||
custom_data: '自助數據集',
|
||||
pls_slc_tbl_left:'請從左側選擇表'
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user