Unverified 提交 aa6a66b3 authored 作者: XiaJunjie2020's avatar XiaJunjie2020 提交者: GitHub

Merge pull request #440 from dataease/pr@v1.1@fix_数据集接口请求时间调整;视图tree优化

refactor: 视图tree增加分组默认展开;数据集数据预览接口请求时间延长
...@@ -103,11 +103,12 @@ export function batchEdit(data) { ...@@ -103,11 +103,12 @@ export function batchEdit(data) {
}) })
} }
export function post(url, data, showLoading = true) { export function post(url, data, showLoading = true, timeout = 10000) {
return request({ return request({
url: url, url: url,
method: 'post', method: 'post',
loading: showLoading, loading: showLoading,
timeout: timeout,
data data
}) })
} }
......
...@@ -535,7 +535,8 @@ export default { ...@@ -535,7 +535,8 @@ export default {
type: 'success', type: 'success',
showClose: true showClose: true
}) })
this.treeNode(this.groupForm) // this.treeNode(this.groupForm)
this.refreshNodeBy(group.pid)
}) })
} else { } else {
// this.$message({ // this.$message({
......
...@@ -72,7 +72,7 @@ export default { ...@@ -72,7 +72,7 @@ export default {
if (this.table.id) { if (this.table.id) {
this.dataLoading = true this.dataLoading = true
this.table.row = 100 this.table.row = 100
post('/dataset/table/getPreviewData/1/100', this.table, false).then(response => { post('/dataset/table/getPreviewData/1/100', this.table, false, 30000).then(response => {
this.fields = response.data.fields this.fields = response.data.fields
this.data = response.data.data this.data = response.data.data
const datas = this.data const datas = this.data
......
...@@ -130,7 +130,7 @@ export default { ...@@ -130,7 +130,7 @@ export default {
initPreviewData(page) { initPreviewData(page) {
if (this.table.id) { if (this.table.id) {
this.table.row = this.tableViewRowForm.row this.table.row = this.tableViewRowForm.row
post('/dataset/table/getPreviewData/' + page.page + '/' + page.pageSize, this.table).then(response => { post('/dataset/table/getPreviewData/' + page.page + '/' + page.pageSize, this.table, true, 30000).then(response => {
this.fields = response.data.fields this.fields = response.data.fields
this.data = response.data.data this.data = response.data.data
this.page = response.data.page this.page = response.data.page
......
...@@ -341,7 +341,7 @@ ...@@ -341,7 +341,7 @@
</template> </template>
<script> <script>
import { loadTable, getScene, addGroup, delGroup, addTable, delTable, post , isKettleRunning} from '@/api/dataset/dataset' import { loadTable, getScene, addGroup, delGroup, addTable, delTable, post, isKettleRunning } from '@/api/dataset/dataset'
import { authModel } from '@/api/system/sysAuth' import { authModel } from '@/api/system/sysAuth'
import GroupMoveSelector from './GroupMoveSelector' import GroupMoveSelector from './GroupMoveSelector'
import DsMoveSelector from './DsMoveSelector' import DsMoveSelector from './DsMoveSelector'
...@@ -427,9 +427,6 @@ export default { ...@@ -427,9 +427,6 @@ export default {
// return this.$store.state.dataset.sceneData // return this.$store.state.dataset.sceneData
// } // }
}, },
created() {
this.kettleState()
},
watch: { watch: {
search(val) { search(val) {
// if (val && val !== '') { // if (val && val !== '') {
...@@ -451,6 +448,9 @@ export default { ...@@ -451,6 +448,9 @@ export default {
this.refreshNodeBy(this.saveStatus.sceneId) this.refreshNodeBy(this.saveStatus.sceneId)
} }
}, },
created() {
this.kettleState()
},
mounted() { mounted() {
this.treeNode(this.groupForm) this.treeNode(this.groupForm)
this.refresh() this.refresh()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论