Merge branch 'dev' of github.com:dataease/dataease into dev

This commit is contained in:
taojinlong 2022-09-26 17:09:56 +08:00
commit 044471c3ac
9 changed files with 55 additions and 24 deletions

View File

@ -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)
}

View File

@ -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)
}
},

View File

@ -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'

View File

@ -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密碼',

View File

@ -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密码',

View File

@ -122,7 +122,7 @@
<span class="no-select-datasource" v-if="!dataSource">{{
$t('deDataset.to_start_using')
}}</span>
<div v-else-if="dataSource && !dataTable" class="item-list">
<div v-loading="tableLoading" v-else-if="dataSource && !dataTable" class="item-list">
<div
@click="typeSwitch(ele)"
:key="ele.name"
@ -414,6 +414,7 @@ export default {
sqlHeight: 248,
fields: [],
mode: '0',
tableLoading: false,
syncType: 'sync_now',
height: 500,
kettleRunning: false,
@ -485,27 +486,21 @@ export default {
dataSourceDetail() {}
},
watch: {
'param.tableId': {
handler: function () {
this.initTableInfo()
}
},
sqlHeight: {
handler: function () {
this.calHeight()
}
}
},
mounted() {
async mounted() {
window.onresize = () => {
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) {

View File

@ -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)

View File

@ -3,7 +3,7 @@
v-loading="$store.getters.loadingMap[$store.getters.currentPath]"
>
<de-aside-container type="dataset">
<group :save-status="saveStatus" @switchComponent="switchComponent" />
<group :currentNodeId="param.id" :save-status="saveStatus" @switchComponent="switchComponent" />
</de-aside-container>
<de-main-container>
<component

View File

@ -49,8 +49,8 @@
<el-form-item :label="$t('system_parameter_setting.ds_check_time')">
<el-form :inline="true" :disabled="show">
<el-form-item >
<el-input size="mini" v-model="formInline.dsCheckInterval" type="number" min="1" @change="onSimpleCronChange()" />
<el-form-item>
<el-input v-model="formInline.dsCheckInterval" size="mini" type="number" min="1" @change="onSimpleCronChange()" />
</el-form-item>
<el-form-item class="form-item">
@ -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