mirror of
https://github.com/dataease/dataease.git
synced 2025-02-25 03:52:59 +08:00
fix: 视图复制后修改名称bug修复 错误信息看不到按钮样式调整 数据源描述字符限制保存异常
This commit is contained in:
parent
66bf0a50a8
commit
c33d78cf4d
@ -137,7 +137,7 @@
|
||||
:target="curComponent.hyperlinks.openMode "
|
||||
:href="curComponent.hyperlinks.content "
|
||||
>
|
||||
<i class="icon iconfont icon-com-jump"/>
|
||||
<i class="icon iconfont icon-com-jump" />
|
||||
</a>
|
||||
</span>
|
||||
|
||||
@ -363,7 +363,7 @@ export default {
|
||||
])
|
||||
},
|
||||
mounted() {
|
||||
if (navigator.platform.indexOf('Mac') == -1) {
|
||||
if (navigator.platform.indexOf('Mac') === -1) {
|
||||
this.systemOS = 'Other'
|
||||
}
|
||||
this.initCurFields()
|
||||
|
@ -17,8 +17,7 @@
|
||||
v-if="curComponent.type != 'custom-button'"
|
||||
icon="el-icon-document-copy"
|
||||
@click.native="copy"
|
||||
><span>{{ $t('panel.copy') }}(<span v-show="systemOS==='Mac'"><i class="icon iconfont icon-command"
|
||||
/>+ D</span> <span v-show="systemOS!=='Mac'">Control + D</span>)</span>
|
||||
><span>{{ $t('panel.copy') }}(<span v-show="systemOS==='Mac'"><i class="icon iconfont icon-command" />+ D</span> <span v-show="systemOS!=='Mac'">Control + D</span>)</span>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
icon="el-icon-delete"
|
||||
@ -210,7 +209,7 @@ export default {
|
||||
])
|
||||
},
|
||||
mounted() {
|
||||
if (navigator.platform.indexOf('Mac') == -1) {
|
||||
if (navigator.platform.indexOf('Mac') === -1) {
|
||||
this.systemOS = 'Other'
|
||||
}
|
||||
},
|
||||
|
@ -1,12 +1,12 @@
|
||||
<template>
|
||||
<el-input
|
||||
v-count="value"
|
||||
v-count="{value, maxlength}"
|
||||
:placeholder="$t('fu.search_bar.please_input')"
|
||||
show-word-limit
|
||||
:disabled="disabled"
|
||||
:value="value"
|
||||
type="textarea"
|
||||
maxlength="200"
|
||||
:maxlength="maxlength"
|
||||
@input="handleChange"
|
||||
/>
|
||||
</template>
|
||||
@ -16,14 +16,14 @@ export default {
|
||||
directives: {
|
||||
count: {
|
||||
update: function(el, binding) {
|
||||
const lg = binding.value?.length || 0
|
||||
const lg = binding.value.value?.length || 0
|
||||
const count = el.querySelector('.el-input__count')
|
||||
if (!count) return
|
||||
if (!lg) {
|
||||
if (count?.classList?.contains('no-zore')) {
|
||||
count.classList.remove('no-zore')
|
||||
}
|
||||
count.innerHTML = '0/200'
|
||||
count.innerHTML = `0/${binding.value.maxlength || 200}`
|
||||
return
|
||||
}
|
||||
if (el.querySelector('.no-zore')) {
|
||||
@ -34,7 +34,7 @@ export default {
|
||||
const num = document.createElement('span')
|
||||
const total = document.createElement('span')
|
||||
num.style.color = '#1F2329'
|
||||
total.innerHTML = '/200'
|
||||
total.innerHTML = `/${binding.value.maxlength || 200}`
|
||||
num.innerHTML = lg
|
||||
if (!newCount) return
|
||||
newCount.classList.add('el-input__count', 'no-zore')
|
||||
@ -46,7 +46,11 @@ export default {
|
||||
},
|
||||
props: {
|
||||
disabled: Boolean,
|
||||
value: String
|
||||
value: String,
|
||||
maxlength: {
|
||||
type: Number,
|
||||
default: 200
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleChange(val) {
|
||||
|
@ -65,7 +65,7 @@
|
||||
@mousedown.stop.prevent="handleDown(handlei, $event)"
|
||||
@touchstart.stop.prevent="handleTouchDown(handlei, $event)"
|
||||
>
|
||||
<slot :name="handlei"/>
|
||||
<slot :name="handlei" />
|
||||
</div>
|
||||
<div
|
||||
:id="componentCanvasId"
|
||||
@ -78,7 +78,7 @@
|
||||
class="svg-background"
|
||||
:icon-class="mainSlotSvgInner"
|
||||
/>
|
||||
<slot/>
|
||||
<slot />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -108,13 +108,16 @@ service.interceptors.response.use(response => {
|
||||
const headers = error.response && error.response.headers || error.response || config.headers
|
||||
config.loading && tryHideLoading(store.getters.currentPath)
|
||||
|
||||
let msg
|
||||
let msg = ''
|
||||
if (error.response) {
|
||||
checkAuth(error.response)
|
||||
msg = error.response.data.message || error.response.data
|
||||
} else {
|
||||
msg = error.message
|
||||
}
|
||||
if (msg.length > 600) {
|
||||
msg = msg.slice(0, 600)
|
||||
}
|
||||
!config.hideMsg && (!headers['authentication-status']) && $error(msg)
|
||||
return Promise.reject(config.url === '/dataset/table/sqlPreview' ? msg : error)
|
||||
})
|
||||
|
@ -380,8 +380,8 @@ export default {
|
||||
if (!viewSave) return
|
||||
viewEditSave(this.panelInfo.id, viewSave).then(() => {
|
||||
this.chart.title = this.chartTitleUpdate
|
||||
bus.$emit('aside-set-title', this.chart.title)
|
||||
})
|
||||
bus.$emit('title-name', this.chart.title, chartView.id)
|
||||
bus.$emit('view-in-cache', {
|
||||
type: 'styleChange',
|
||||
viewId: chartView.id,
|
||||
|
@ -1934,7 +1934,8 @@ export default {
|
||||
},
|
||||
|
||||
methods: {
|
||||
setTitle(title) {
|
||||
setTitle(title, id) {
|
||||
if (this.view.id !== id) return
|
||||
this.view.customStyle.text = { ...this.view.customStyle.text, title }
|
||||
this.view.title = title
|
||||
this.view.name = title
|
||||
|
@ -861,7 +861,7 @@ export default {
|
||||
},
|
||||
disableExec(task) {
|
||||
return (
|
||||
task.status === 'Pending' || task.status ==='Exec' || !hasDataPermission('manage', task.privileges)
|
||||
task.status === 'Pending' || task.status === 'Exec' || !hasDataPermission('manage', task.privileges)
|
||||
)
|
||||
},
|
||||
disableDelete(task) {
|
||||
|
@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<el-row
|
||||
v-loading="$store.getters.loadingMap[$store.getters.currentPath]"
|
||||
style="text-align: left"
|
||||
class="de-search-table"
|
||||
v-loading="$store.getters.loadingMap[$store.getters.currentPath]"
|
||||
>
|
||||
<el-row class="top-operate">
|
||||
<el-col :span="12">
|
||||
@ -36,8 +36,8 @@
|
||||
icon="iconfont icon-icon-filter"
|
||||
@click="filterShow"
|
||||
>{{
|
||||
$t('user.filter')
|
||||
}}
|
||||
$t('user.filter')
|
||||
}}
|
||||
<template v-if="filterTexts.length">
|
||||
({{ cacheCondition.length }})
|
||||
</template>
|
||||
@ -50,7 +50,7 @@
|
||||
>
|
||||
<span class="sum">{{ paginationConfig.total }}</span>
|
||||
<span class="title">{{ $t('user.result_one') }}</span>
|
||||
<el-divider direction="vertical"/>
|
||||
<el-divider direction="vertical" />
|
||||
<i
|
||||
v-if="showScroll"
|
||||
class="el-icon-arrow-left arrow-filter"
|
||||
@ -63,9 +63,9 @@
|
||||
class="text"
|
||||
>
|
||||
{{ ele }} <i
|
||||
class="el-icon-close"
|
||||
@click="clearOneFilter(index)"
|
||||
/>
|
||||
class="el-icon-close"
|
||||
@click="clearOneFilter(index)"
|
||||
/>
|
||||
</p>
|
||||
</div>
|
||||
<i
|
||||
@ -180,11 +180,11 @@
|
||||
|
||||
<!--导入templatedialog-->
|
||||
<el-dialog
|
||||
v-loading="$store.getters.loadingMap[$store.getters.currentPath]"
|
||||
:title="$t('app_template.log_delete_tips')"
|
||||
:visible.sync="deleteConfirmDialog"
|
||||
:show-close="true"
|
||||
width="420px"
|
||||
v-loading="$store.getters.loadingMap[$store.getters.currentPath]"
|
||||
>
|
||||
<el-row>
|
||||
<el-checkbox
|
||||
|
@ -820,7 +820,7 @@ export default {
|
||||
bus.$off('change_panel_right_draw', this.changeRightDrawOpen)
|
||||
bus.$off('delete-condition', this.deleteCustomComponent)
|
||||
bus.$off('current-component-change', this.asideRefresh)
|
||||
bus.$off('aside-set-title', this.asideSetTitle)
|
||||
bus.$off('title-name', this.asideSetTitle)
|
||||
const elx = this.$refs.rightPanel
|
||||
elx && elx.remove()
|
||||
},
|
||||
@ -851,16 +851,16 @@ export default {
|
||||
bus.$on('change_panel_right_draw', this.changeRightDrawOpen)
|
||||
bus.$on('delete-condition', this.deleteCustomComponent)
|
||||
bus.$on('current-component-change', this.asideRefresh)
|
||||
bus.$on('aside-set-title', this.asideSetTitle)
|
||||
bus.$on('title-name', this.asideSetTitle)
|
||||
},
|
||||
asideRefresh() {
|
||||
if (this.$refs['chartEditRef']) {
|
||||
this.$refs['chartEditRef'].resetChartData()
|
||||
}
|
||||
},
|
||||
asideSetTitle(val) {
|
||||
asideSetTitle(val, id) {
|
||||
if (this.$refs['chartEditRef']) {
|
||||
this.$refs['chartEditRef'].setTitle(val)
|
||||
this.$refs['chartEditRef'].setTitle(val, id)
|
||||
}
|
||||
},
|
||||
deleteCustomComponent(param) {
|
||||
|
@ -182,6 +182,7 @@
|
||||
>
|
||||
<deTextarea
|
||||
v-model="form.desc"
|
||||
:maxlength="50"
|
||||
class="w100-textarea"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
@ -36,8 +36,8 @@
|
||||
icon="iconfont icon-icon-filter"
|
||||
@click="filterShow"
|
||||
>{{
|
||||
$t("user.filter")
|
||||
}}
|
||||
$t("user.filter")
|
||||
}}
|
||||
<template v-if="filterTexts.length">
|
||||
({{ filterTexts.length }})
|
||||
</template>
|
||||
@ -83,7 +83,7 @@
|
||||
>
|
||||
<span class="sum">{{ paginationConfig.total }}</span>
|
||||
<span class="title">{{ $t("user.result_one") }}</span>
|
||||
<el-divider direction="vertical"/>
|
||||
<el-divider direction="vertical" />
|
||||
<i
|
||||
v-if="showScroll"
|
||||
class="el-icon-arrow-left arrow-filter"
|
||||
@ -96,9 +96,9 @@
|
||||
class="text"
|
||||
>
|
||||
{{ ele }} <i
|
||||
class="el-icon-close"
|
||||
@click="clearOneFilter(index)"
|
||||
/>
|
||||
class="el-icon-close"
|
||||
@click="clearOneFilter(index)"
|
||||
/>
|
||||
</p>
|
||||
</div>
|
||||
<i
|
||||
@ -162,14 +162,14 @@
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.rate === 'SIMPLE'">{{
|
||||
$t("dataset.execute_once")
|
||||
}}</span>
|
||||
$t("dataset.execute_once")
|
||||
}}</span>
|
||||
<span v-if="scope.row.rate === 'CRON'">{{
|
||||
$t("dataset.cron_config")
|
||||
}}</span>
|
||||
$t("dataset.cron_config")
|
||||
}}</span>
|
||||
<span v-if="scope.row.rate === 'SIMPLE_CRON'">{{
|
||||
$t("dataset.simple_cron")
|
||||
}}</span>
|
||||
$t("dataset.simple_cron")
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@ -197,8 +197,8 @@
|
||||
v-if="scope.row.lastExecStatus"
|
||||
:class="[`de-${scope.row.lastExecStatus}-pre`, 'de-status']"
|
||||
>{{
|
||||
$t(`dataset.${scope.row.lastExecStatus.toLocaleLowerCase()}`)
|
||||
}}
|
||||
$t(`dataset.${scope.row.lastExecStatus.toLocaleLowerCase()}`)
|
||||
}}
|
||||
<svg-icon
|
||||
v-if="scope.row.lastExecStatus === 'Error'"
|
||||
style="cursor: pointer;"
|
||||
@ -333,18 +333,18 @@
|
||||
secondary
|
||||
@click="show_error_massage = false"
|
||||
>{{
|
||||
$t("dataset.close")
|
||||
}}</deBtn>
|
||||
$t("dataset.close")
|
||||
}}</deBtn>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {columnOptions} from './options'
|
||||
import {formatOrders} from '@/utils/index'
|
||||
import {datasetTaskList, post} from '@/api/dataset/dataset'
|
||||
import {hasDataPermission} from '@/utils/permission'
|
||||
import { columnOptions } from './options'
|
||||
import { formatOrders } from '@/utils/index'
|
||||
import { datasetTaskList, post } from '@/api/dataset/dataset'
|
||||
import { hasDataPermission } from '@/utils/permission'
|
||||
import GridTable from '@/components/gridTable/index.vue'
|
||||
import filterUser from './FilterUser.vue'
|
||||
import msgCfm from '@/components/msgCfm/index'
|
||||
@ -353,7 +353,7 @@ import keyEnter from '@/components/msgCfm/keyEnter.js'
|
||||
|
||||
export default {
|
||||
name: 'DatasetTaskList',
|
||||
components: {GridTable, filterUser},
|
||||
components: { GridTable, filterUser },
|
||||
mixins: [msgCfm, keyEnter],
|
||||
props: {
|
||||
transCondition: {
|
||||
@ -396,7 +396,7 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const {taskId, name} = this.transCondition
|
||||
const { taskId, name } = this.transCondition
|
||||
if (taskId) {
|
||||
this.nickName = name
|
||||
}
|
||||
@ -427,7 +427,7 @@ export default {
|
||||
document.querySelector('#resize-for-filter')
|
||||
)
|
||||
},
|
||||
layoutResize: _.debounce(function () {
|
||||
layoutResize: _.debounce(function() {
|
||||
this.getScrollStatus()
|
||||
}, 200),
|
||||
scrollPre() {
|
||||
@ -501,7 +501,7 @@ export default {
|
||||
this.handleCurrentChange(1)
|
||||
},
|
||||
search(showLoading = true) {
|
||||
const {taskId, name} = this.transCondition
|
||||
const { taskId, name } = this.transCondition
|
||||
const param = {
|
||||
orders: formatOrders(this.orderConditions),
|
||||
conditions: [...this.cacheCondition]
|
||||
@ -520,7 +520,7 @@ export default {
|
||||
field: 'dataset_table_task.id'
|
||||
})
|
||||
}
|
||||
const {currentPage, pageSize} = this.paginationConfig
|
||||
const { currentPage, pageSize } = this.paginationConfig
|
||||
datasetTaskList(currentPage, pageSize, param, showLoading).then(
|
||||
(response) => {
|
||||
const multipleSelection = this.multipleSelection.map(ele => ele.id)
|
||||
@ -568,7 +568,7 @@ export default {
|
||||
})
|
||||
},
|
||||
changeTaskStatus(task) {
|
||||
const {status} = task
|
||||
const { status } = task
|
||||
if (!['Pending', 'Underway'].includes(status)) {
|
||||
return
|
||||
}
|
||||
@ -613,7 +613,7 @@ export default {
|
||||
},
|
||||
selectDataset(row) {
|
||||
if (row) {
|
||||
const {datasetName, id, tableId} = row
|
||||
const { datasetName, id, tableId } = row
|
||||
this.$router.push({
|
||||
path: '/task-ds-form',
|
||||
query: {
|
||||
@ -634,7 +634,7 @@ export default {
|
||||
)
|
||||
},
|
||||
disableExec(task) {
|
||||
return (task.status === 'Pending' || task.status ==='Exec' || !hasDataPermission('manage', task.privileges))
|
||||
return (task.status === 'Pending' || task.status === 'Exec' || !hasDataPermission('manage', task.privileges))
|
||||
},
|
||||
disableDelete(task) {
|
||||
return false
|
||||
|
Loading…
Reference in New Issue
Block a user