Merge branch 'v1.18' of github.com:dataease/dataease into v1.18

This commit is contained in:
taojinlong 2022-12-29 22:26:06 +08:00
commit 581438b9bc
14 changed files with 64 additions and 31 deletions

View File

@ -17,9 +17,11 @@ export default {
count: {
update: function(el, binding) {
const { value, maxlength, buttonDisabled } = binding.value
if (buttonDisabled) {
el.removeChild(el.querySelector('.el-input__count'))
if (buttonDisabled && el.querySelector('.el-input__count')) {
el.querySelector('.el-input__count').style.display = 'none'
return
} else if (el.querySelector('.el-input__count')) {
el.querySelector('.el-input__count').style.display = 'block'
}
const lg = value?.length || 0
const count = el.querySelector('.el-input__count')

View File

@ -79,17 +79,17 @@
@mousedown="elementMouseDown"
/>
<div
v-show="!this.element.editing"
v-show="!this.element.editing && this.element.type !=='de-tabs'"
class="de-drag-area de-drag-right"
@mousedown="elementMouseDown"
/>
<div
v-show="!this.element.editing"
v-show="!this.element.editing && this.element.type !=='de-tabs'"
class="de-drag-area de-drag-bottom"
@mousedown="elementMouseDown"
/>
<div
v-show="!this.element.editing"
v-show="!this.element.editing && this.element.type !=='de-tabs'"
class="de-drag-area de-drag-left"
@mousedown="elementMouseDown"
/>

View File

@ -381,6 +381,7 @@ export default {
ukey_title: 'API Keys',
thumbnail: 'thumbnail',
confirm_delete: 'Confirm delete',
delete_this_dashboard: 'Are you sure to delete this dashboard?',
confirm_stop: 'Confirm stop',
stop_success: 'Stop success',
treeselect: {

View File

@ -381,6 +381,7 @@ export default {
ukey_title: 'API Keys',
thumbnail: '縮略圖',
confirm_delete: '確認刪除',
delete_this_dashboard: '確認删除該儀錶板嗎?',
confirm_stop: '確認停止',
stop_success: '停止成功',
treeselect: {

View File

@ -380,6 +380,7 @@ export default {
ukey_title: 'API Keys',
thumbnail: '缩略图',
confirm_delete: '确认删除',
delete_this_dashboard: '确认删除该仪表板吗?',
confirm_stop: '确认停止',
stop_success: '停止成功',
treeselect: {

View File

@ -931,9 +931,12 @@ export default {
options.link = this.$t('datasource.click_to_check')
options.content = this.$t('datasource.cannot_be_deleted_dataset')
options.templateDel = msgContent
options.confirmButtonText = undefined
options.type = 'danger'
options.linkTo = this.linkTo.bind(this, { queryType, id })
this.withLink(options)
this.withLink(options, this.$t('commons.delete'))
return
}
this.handlerConfirm(options)

View File

@ -47,7 +47,7 @@
@command="(type) => clickMore(type, ele)"
>
<span class="el-dropdown-link">
<i class="el-icon-more" />
<i class="el-icon-more"/>
</span>
<el-dropdown-menu
slot="dropdown"
@ -63,13 +63,13 @@
icon="el-icon-edit"
command="edit"
>
{{ $t("commons.edit") }}
{{ $t('commons.edit') }}
</el-dropdown-item>
<el-dropdown-item
icon="el-icon-delete"
command="delete"
>
{{ $t("commons.delete") }}
{{ $t('commons.delete') }}
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
@ -83,7 +83,7 @@
secondary
@click="add()"
>
{{ $t("panel.add_app_category") }}
{{ $t('panel.add_app_category') }}
</deBtn>
</div>
</template>
@ -179,12 +179,14 @@ export default {
.de-template-list {
height: 100%;
position: relative;
ul {
margin: 16px 0 20px 0;
padding: 0;
overflow-y: auto;
max-height: calc(100% - 90px);
}
li {
list-style: none;
width: 100%;
@ -209,12 +211,14 @@ export default {
color: #8f959e;
margin-right: 9px;
}
.more {
position: absolute;
top: 50%;
right: 10px;
transform: translateY(-50%);
display: none;
.el-icon-more {
width: 24px;
height: 24px;
@ -247,16 +251,19 @@ export default {
li.select {
background: var(--deWhiteHover, #3370ff);
color: var(--primary, #3370ff);
color: var(--TextActive, #f4f4f5);
}
.de-btn-fix {
position: absolute;
bottom: 0;
left: 0;
}
}
.de-template-dropdown {
margin-top: 0 !important;
.popper__arrow {
display: none !important;
}

View File

@ -458,10 +458,12 @@ import { mapState } from 'vuex'
import { DEFAULT_COMMON_CANVAS_STYLE_STRING } from '@/views/panel/panel'
import TreeSelector from '@/components/treeSelector'
import { queryAuthModel } from '@/api/authModel/authModel'
import msgCfm from '@/components/msgCfm/index'
export default {
name: 'PanelList',
components: { GrantAuth, LinkGenerate, EditPanel, TreeSelector },
mixins: [msgCfm],
data() {
return {
lastActiveDefaultPanelId: null, //
@ -856,12 +858,10 @@ export default {
},
delete(data) {
this.$confirm(this.$t('panel.confirm_delete'), this.$t('panel.tips'), {
confirmButtonText: this.$t('panel.confirm'),
cancelButtonText: this.$t('panel.cancel'),
type: 'warning'
})
.then(() => {
const params = {
title: 'commons.delete_this_dashboard',
type: 'danger',
cb: () => {
delGroup(data.id).then((response) => {
this.$message({
type: 'success',
@ -872,9 +872,9 @@ export default {
this.tree()
this.defaultTree(false)
})
})
.catch(() => {
})
}
}
this.handlerConfirm(params, this.$t('commons.delete'))
},
clearCanvas() {

View File

@ -47,7 +47,7 @@
@command="(type) => clickMore(type, ele)"
>
<span class="el-dropdown-link">
<i class="el-icon-more" />
<i class="el-icon-more"/>
</span>
<el-dropdown-menu
slot="dropdown"
@ -57,19 +57,19 @@
icon="el-icon-upload2"
command="import"
>
{{ $t("panel.import") }}
{{ $t('panel.import') }}
</el-dropdown-item>
<el-dropdown-item
icon="el-icon-edit"
command="edit"
>
{{ $t("panel.rename") }}
{{ $t('panel.rename') }}
</el-dropdown-item>
<el-dropdown-item
icon="el-icon-delete"
command="delete"
>
{{ $t("panel.delete") }}
{{ $t('panel.delete') }}
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
@ -83,7 +83,7 @@
secondary
@click="add()"
>
{{ $t("panel.add_category") }}
{{ $t('panel.add_category') }}
</deBtn>
</div>
</template>
@ -174,12 +174,14 @@ export default {
.de-template-list {
height: 100%;
position: relative;
ul {
margin: 16px 0 20px 0;
padding: 0;
overflow-y: auto;
max-height: calc(100% - 90px);
}
li {
list-style: none;
width: 100%;
@ -200,7 +202,7 @@ export default {
overflow: hidden;
text-overflow: ellipsis;
.text-template-overflow{
.text-template-overflow {
display: inline-block;
max-width: 87%;
overflow: hidden;
@ -212,12 +214,14 @@ export default {
color: #8f959e;
margin-right: 9px;
}
.more {
position: absolute;
top: 50%;
right: 10px;
transform: translateY(-50%);
display: none;
.el-icon-more {
width: 24px;
height: 24px;
@ -250,16 +254,19 @@ export default {
li.select {
background: var(--deWhiteHover, #3370ff);
color: var(--primary, #3370ff);
color: var(--TextActive, #f4f4f5);
}
.de-btn-fix {
position: absolute;
bottom: 0;
left: 0;
}
}
.de-template-dropdown {
margin-top: 0 !important;
.popper__arrow {
display: none !important;
}

View File

@ -449,7 +449,7 @@
v-closePress
:title="api_table_title"
:visible.sync="edit_api_item"
custom-class="api-datasource-drawer"
custom-class="api-datasource-drawer ds-configuration-input"
size="840px"
:before-close="closeEditItem"
direction="rtl"
@ -1517,6 +1517,12 @@ export default {
text-overflow: ellipsis;
}
}
.ds-configuration-input {
.el-input__inner {
color: var(--deTextPrimary, #1F2329);
}
}
.checkbox-table {
.el-checkbox {
display: flex;

View File

@ -46,6 +46,7 @@
<div style="height: calc(100% - 56px)">
<DsFormContent
ref="DsFormContent"
@editeTodisable="backToList"
:outer-params="outerParams"
:reference-position="referencePosition"
:form-type.sync="formType"

View File

@ -661,7 +661,7 @@ export default {
},
methods: {
editDatasource(type) {
this.canEdit = type
this.$emit('update:canEdit', type)
this.disabled = !type
},
baseInfoDisabledCheck(privileges) {

View File

@ -23,11 +23,13 @@
<deBtn
v-if="privileges && canEdit"
secondary
key="cancel"
@click="editDatasource(false)"
>{{ $t('commons.cancel') }}
</deBtn>
<deBtn
v-if="privileges && !canEdit"
key="edit"
secondary
@click="editDatasource(true)"
>{{ $t('commons.edit') }}
@ -54,7 +56,7 @@
>{{ $t('commons.validate') }}
</deBtn>
<deBtn
v-if="privileges"
v-if="privileges && canEdit"
type="primary"
@click="save"
>{{ $t('commons.save') }}

View File

@ -74,7 +74,9 @@ export default {
res.data.name = this.current.label
res.data.type = this.current.queryType
const arr = res.data ? [res.data] : []
this.current = { num: id, label: name, queryType: 'datasource' }
if (id) {
this.current = { num: id, label: name, queryType: 'datasource' }
}
this.treeData = []
this.dfsTree(arr, id)
this.initEchart()