diff --git a/frontend/src/components/canvas/utils/utils.js b/frontend/src/components/canvas/utils/utils.js index 3edae4b655..aba32e1d9e 100644 --- a/frontend/src/components/canvas/utils/utils.js +++ b/frontend/src/components/canvas/utils/utils.js @@ -12,7 +12,7 @@ import { AIDED_DESIGN, PANEL_CHART_INFO, TAB_COMMON_STYLE } from '@/views/panel/ import html2canvas from 'html2canvasde' export function deepCopy(target) { - if (typeof target === 'object') { + if (typeof target === 'object' && target !== null) { const result = Array.isArray(target) ? [] : {} for (const key in target) { if (typeof target[key] === 'object') { diff --git a/frontend/src/components/gridTable/index.vue b/frontend/src/components/gridTable/index.vue index abd098799c..84f780b4d8 100644 --- a/frontend/src/components/gridTable/index.vue +++ b/frontend/src/components/gridTable/index.vue @@ -13,7 +13,10 @@ -
+
[] }, + showPagination: { + type: Boolean, + default: true + }, multipleSelection: { type: Array, default: () => [] @@ -179,6 +186,10 @@ export default { background-color: var(--TableBG, #ffffff) !important; } } + + ::v-deep .el-table__fixed-right::before { + display: none; + } .pagination-cont { text-align: right; margin-top: 10px; diff --git a/frontend/src/views/chart/components/component-style/dialog/RemarkEditor.vue b/frontend/src/views/chart/components/component-style/dialog/RemarkEditor.vue index 621086d4c7..0069f8b16a 100644 --- a/frontend/src/views/chart/components/component-style/dialog/RemarkEditor.vue +++ b/frontend/src/views/chart/components/component-style/dialog/RemarkEditor.vue @@ -16,7 +16,6 @@ import tinymce from 'tinymce/tinymce' // tinymce默认hidden,不引入不显 import Editor from '@tinymce/tinymce-vue' import { imgUrlTrans } from '@/components/canvas/utils/utils' import { mapState } from 'vuex' -import { hexColorToRGBA } from '@/views/chart/chart/util' // 编辑器引入 export default { name: 'RemarkEditor', diff --git a/frontend/src/views/dataset/add/AddSQL.vue b/frontend/src/views/dataset/add/AddSQL.vue index 2c46970430..03506438c9 100644 --- a/frontend/src/views/dataset/add/AddSQL.vue +++ b/frontend/src/views/dataset/add/AddSQL.vue @@ -208,152 +208,20 @@ @input="onCmCodeChange" />
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
+
- {{ $t('deDataset.running_results') }} - {{ + {{ + $t( + tabActive === 'result' + ? 'deDataset.running_results' + : 'dataset.task.record' + ) + }} + {{ `(${$t('dataset.preview_show')} 1000 ${$t( 'dataset.preview_item' )})` @@ -364,11 +232,27 @@ @mousedown="mousedownDrag" />
-
+ + + + +
{{ $t('deDataset.the_running_results') }} @@ -379,24 +263,91 @@ :image="errImg" :description="$t('deDataset.run_failed')" >{{ errMsgCont }} - - - + +
+
+ + + + + + + + + + + + + +
{ - this.openMessageSuccess('commons.copy_success') - }, (e) => { - this.openMessageSuccess('commons.copy_success') - }) + this.$copyText(text).then( + (e) => { + this.openMessageSuccess('commons.copy_success') + }, + (e) => { + this.openMessageSuccess('commons.copy_success') + } + ) }, - changeTab() { + formatter(row, column, cellValue) { + return cellValue ? `${cellValue} ${this.$t(`commons.millisecond`)}` : '-' }, handleSizeChange(pageSize) { this.paginationConfig.currentPage = 1 @@ -864,27 +820,30 @@ export default { } this.parseVariable() this.fields = [] - this.$refs.plxTable?.reloadData([]) - post('/dataset/table/sqlPreview', { - id: this.param.tableId, - dataSourceId: this.dataSource, - type: 'sql', - mode: parseInt(this.mode), - sqlVariableDetails: JSON.stringify(this.variables), - info: JSON.stringify({ - sql: Base64.encode(this.sql.trim()), - isBase64Encryption: true - }) - }, true, 60000, true) + this.plxTableData = [] + post( + '/dataset/table/sqlPreview', + { + id: this.param.tableId, + dataSourceId: this.dataSource, + type: 'sql', + mode: parseInt(this.mode), + sqlVariableDetails: JSON.stringify(this.variables), + info: JSON.stringify({ + sql: Base64.encode(this.sql.trim()), + isBase64Encryption: true + }) + }, + true, + 60000, + true + ) .then((response) => { if (response.success) { this.fields = response.data.fields - this.$nextTick(() => { - this.$refs.plxTable?.reloadData(response.data.data) - }) + this.plxTableData = response.data.data || [] if (!this.param.tableId) { - this.data.unshift(response.data.log) - this.$refs.tableLog?.reloadData(this.data) + this.sqlData.unshift(response.data.log) } else { this.listSqlLog() } @@ -892,8 +851,7 @@ export default { this.errMsgCont = response.message this.errMsg = true if (!this.param.tableId) { - this.data.unshift(response.data) - this.$refs.tableLog?.reloadData(this.data) + this.sqlData.unshift(response.data) } else { this.listSqlLog() } @@ -903,22 +861,25 @@ export default { this.errMsgCont = err this.errMsg = true if (!this.param.tableId) { - this.data.unshift(response.data) - this.$refs.tableLog?.reloadData(this.data) + this.sqlData.unshift(response.data) } else { this.listSqlLog() } }) }, listSqlLog() { - post('/dataset/table/sqlLog/' + this.paginationConfig.currentPage + '/' + this.paginationConfig.pageSize, { id: this.param.tableId, dataSourceId: this.dataSource }) + post( + '/dataset/table/sqlLog/' + + this.paginationConfig.currentPage + + '/' + + this.paginationConfig.pageSize, + { id: this.param.tableId, dataSourceId: this.dataSource } + ) .then((response) => { - this.data = response.data.listObject + this.sqlData = response.data.listObject this.paginationConfig.total = response.data.itemCount }) - .catch(() => { - - }) + .catch(() => {}) }, save() { if (!this.dataSource || this.datasource === '') { @@ -1246,9 +1207,15 @@ export default { } } + .padding-24 { + .el-tabs__nav-scroll { + padding-left: 24px; + } + } + .table-sql { - height: calc(100% - 54px); - padding: 18px 25px; + height: calc(100% - 110px); + padding: 0 25px 18px 25px; overflow-y: auto; box-sizing: border-box; .el-empty__bottom, @@ -1262,7 +1229,8 @@ export default { } } .table-container { - height: calc(100% - 50px); + height: calc(100% - 125px); + padding: 0 24px; .mar6 { margin-right: 6px; }