diff --git a/frontend/src/components/DeDrag/index.vue b/frontend/src/components/DeDrag/index.vue index 515f573c62..ebe445291d 100644 --- a/frontend/src/components/DeDrag/index.vue +++ b/frontend/src/components/DeDrag/index.vue @@ -731,14 +731,14 @@ export default { }, // private 监控dragging resizing dragging(val) { - if (this.enabled) { + if (this.enabled && this.curComponent) { this.curComponent.optStatus.dragging = val this.$store.commit('setScrollAutoMove', 0) } }, // private 监控dragging resizing resizing(val) { - if (this.enabled) { + if (this.enabled && this.curComponent) { this.curComponent.optStatus.resizing = val this.$store.commit('setScrollAutoMove', 0) } diff --git a/frontend/src/components/canvas/custom-component/DeRichTextView.vue b/frontend/src/components/canvas/custom-component/DeRichTextView.vue index 006caeee76..cdf84b1ad9 100644 --- a/frontend/src/components/canvas/custom-component/DeRichTextView.vue +++ b/frontend/src/components/canvas/custom-component/DeRichTextView.vue @@ -110,13 +110,13 @@ export default { // 监听内容变化 active(val) { if (!val) { + const ed = tinymce.editors[this.tinymceId] if (this.canEdit) { - this.element.propValue.textValue = this.myValue + this.element.propValue.textValue = ed.getContent() } this.canEdit = false this.reShow() this.myValue = this.assignment(this.element.propValue.textValue) - const ed = tinymce.editors[this.tinymceId] ed.setContent(this.myValue) } }, diff --git a/frontend/src/lang/en.js b/frontend/src/lang/en.js index 80961fc28f..e4e2de2c44 100644 --- a/frontend/src/lang/en.js +++ b/frontend/src/lang/en.js @@ -813,8 +813,10 @@ export default { login_type: 'Default login type', empty_front: 'If empty then default value is 10s', empty_msg: 'If empty then default value is 30 days', - front_error: 'Valid ranger [0 - 300]', // 修改了提示信息 - msg_error: 'Valid ranger [1 - 365]', + front_error: 'Valid range [0 - 300]', // 修改了提示信息 + msg_error: 'Valid range [1 - 365]', + limit_times_error: 'Valid range [1 - 100]', + relieve_times_error: 'Valid range [1 - 100]', SMTP_port: 'SMTP Port', SMTP_account: 'SMTP Account', SMTP_password: 'SMTP Password', @@ -2349,7 +2351,7 @@ export default { label: 'Search Button', text: 'Text', auto_trigger: 'Auto Trigger', - range: 'Ranger', + range: 'Range', relative: 'Relation', auto_trigger_tip: 'Automatically trigger once when entering the preview page', range_tip: 'Default association all filter components' diff --git a/frontend/src/lang/tw.js b/frontend/src/lang/tw.js index 9eaefd1367..31e848ab5f 100644 --- a/frontend/src/lang/tw.js +++ b/frontend/src/lang/tw.js @@ -815,6 +815,8 @@ export default { empty_msg: '為空則默認取值30天', front_error: '請填寫0-300正整數', // 修改了提示信息 msg_error: '請填寫1-365正整數', + limit_times_error: '請填寫1-100正整數', + relieve_times_error: '請填寫1-100正整數', SMTP_port: 'SMTP端口', SMTP_account: 'SMTP賬戶', SMTP_password: 'SMTP密碼', diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js index 0cf66591bf..09ed5853c8 100644 --- a/frontend/src/lang/zh.js +++ b/frontend/src/lang/zh.js @@ -814,6 +814,8 @@ export default { empty_msg: '为空则默认取30天', front_error: '请填写0-300正整数', // 修改了提示信息 msg_error: '请填写1-365正整数', + limit_times_error: '请填写1-100正整数', + relieve_times_error: '请填写1-100正整数', SMTP_port: 'SMTP端口', SMTP_account: 'SMTP账户', SMTP_password: 'SMTP密码', diff --git a/frontend/src/views/dataset/add/AddSQL.vue b/frontend/src/views/dataset/add/AddSQL.vue index 7837dc9077..e1269f9168 100644 --- a/frontend/src/views/dataset/add/AddSQL.vue +++ b/frontend/src/views/dataset/add/AddSQL.vue @@ -122,7 +122,7 @@ {{ $t('deDataset.to_start_using') }} -
+
{ this.calHeight() } this.calHeight() - this.initDataSource() + await this.initDataSource() this.$refs.myCm.codemirror.on('keypress', () => { this.$refs.myCm.codemirror.showHint() }) - this.initTableInfo() }, created() { @@ -562,8 +557,11 @@ export default { } } } + this.tableLoading = true post('/datasource/getTables/' + this.dataSource, {}).then((response) => { this.tableData = response.data + }).finally(() => { + this.tableLoading = false }) }, calHeight: _.debounce(function() { @@ -572,7 +570,7 @@ export default { this.height = currentHeight - sqlHeight - 56 - 54 - 36 - 64 }, 200), initDataSource() { - listDatasource().then((response) => { + return listDatasource().then((response) => { this.options = response.data.filter((item) => item.type !== 'api') }) }, @@ -582,6 +580,7 @@ export default { getTable(this.param.tableId).then((response) => { const table = response.data this.dataSource = table.dataSourceId + this.changeDatasource() this.mode = table.mode + '' if (JSON.parse(table.info).isBase64Encryption) { diff --git a/frontend/src/views/dataset/group/Group.vue b/frontend/src/views/dataset/group/Group.vue index 9261a9e947..73e0212b3f 100644 --- a/frontend/src/views/dataset/group/Group.vue +++ b/frontend/src/views/dataset/group/Group.vue @@ -419,7 +419,11 @@ export default { type: Object, required: false, default: null - } + }, + currentNodeId: { + type: String, + default: '' + }, }, data() { return { @@ -542,11 +546,16 @@ export default { queryAuthModel({ modelType: 'dataset' }, true) .then((res) => { localStorage.setItem('dataset-tree', JSON.stringify(res.data)) - this.tData = res.data + this.tData = res.data || [] this.$nextTick(() => { this.$refs.datasetTreeRef?.filter(this.filterText) if (id && name.includes(this.filterText)) { this.dfsTableData(this.tData, id) + } else { + const currentNodeId = sessionStorage.getItem('dataset-current-node') + if (currentNodeId) { + this.dfsTableData(this.tData, currentNodeId) + } } }) }) @@ -555,6 +564,9 @@ export default { }) this.refresh() }, + beforeDestroy() { + sessionStorage.setItem('dataset-current-node', this.currentNodeId) + }, methods: { dfsTableData(arr, id) { arr.some((ele) => { @@ -776,7 +788,7 @@ export default { .then((res) => { localStorage.setItem('dataset-tree', JSON.stringify(res.data)) if (!userCache) { - this.tData = res.data + this.tData = res.data || [] } this.$nextTick(() => { this.$refs.datasetTreeRef?.filter(this.filterText) diff --git a/frontend/src/views/dataset/index.vue b/frontend/src/views/dataset/index.vue index 2aa38bba0c..6eb63a6f56 100644 --- a/frontend/src/views/dataset/index.vue +++ b/frontend/src/views/dataset/index.vue @@ -3,7 +3,7 @@ v-loading="$store.getters.loadingMap[$store.getters.currentPath]" > - + - - + + @@ -139,7 +139,7 @@ export default { rules: { frontTimeOut: [ { - pattern: '^([0-9]|\\b[1-9]\\d\\b|\\b[1-2]\\d\\d\\b|\\b300\\b)$', // 修改了正则表达式,让其正确匹配0-300的数值 + pattern: '^([0-9]|\\b[1-9]\\d\\b|\\b[1-2]\\d\\d\\b|\\b300\\b)$', message: this.$t('system_parameter_setting.front_error'), trigger: 'blur' } @@ -150,6 +150,20 @@ export default { message: this.$t('system_parameter_setting.msg_error'), trigger: 'blur' } + ], + limitTimes: [ + { + pattern: '^([1-9]|[1-9]\\d|100)$', + message: this.$t('system_parameter_setting.limit_times_error'), + trigger: 'blur' + } + ], + relieveTimes: [ + { + pattern: '^([1-9]|[1-9]\\d|100)$', + message: this.$t('system_parameter_setting.relieve_times_error'), + trigger: 'blur' + } ] }, originLoginType: null