Merge branch 'dev' of github.com:dataease/dataease into dev
This commit is contained in:
commit
e08d96c4ea
@ -175,7 +175,11 @@ export default {
|
||||
this.timer && clearInterval(this.timer)
|
||||
let refreshTime = 300000
|
||||
if (this.canvasStyleData.refreshTime && this.canvasStyleData.refreshTime > 0) {
|
||||
refreshTime = this.canvasStyleData.refreshTime * 60000
|
||||
if (this.canvasStyleData.refreshUnit === 'second') {
|
||||
refreshTime = this.canvasStyleData.refreshTime * 1000
|
||||
} else {
|
||||
refreshTime = this.canvasStyleData.refreshTime * 60000
|
||||
}
|
||||
}
|
||||
this.timer = setInterval(() => {
|
||||
this.searchCount++
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<div
|
||||
v-if="editShow"
|
||||
id="editor"
|
||||
class="editor"
|
||||
:class="[
|
||||
@ -943,7 +944,8 @@ export default {
|
||||
positionBoxInfoArray: [],
|
||||
yourList: [],
|
||||
linkJumpSetVisible: false,
|
||||
linkJumpSetViewId: null
|
||||
linkJumpSetViewId: null,
|
||||
editShow: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -1059,6 +1061,11 @@ export default {
|
||||
},
|
||||
|
||||
mounted() {
|
||||
setTimeout(() => {
|
||||
this.changeScale()
|
||||
this.editShow = true
|
||||
}, 500)
|
||||
// this.changeScale()
|
||||
// 获取编辑器元素
|
||||
this.$store.commit('getEditor')
|
||||
const _this = this
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div
|
||||
v-loading="requestStatus==='waiting'"
|
||||
v-loading="canvasStyleData.refreshViewLoading&&requestStatus==='waiting'"
|
||||
:class="[
|
||||
{
|
||||
['active']: active
|
||||
@ -211,7 +211,7 @@ export default {
|
||||
},
|
||||
// 监听外部计时器变化
|
||||
searchCount: function(val1) {
|
||||
if (val1 > 0) {
|
||||
if (val1 > 0 && this.requestStatus !== 'waiting') {
|
||||
this.getData(this.element.propValue.viewId)
|
||||
}
|
||||
},
|
||||
|
||||
@ -63,8 +63,9 @@ export function getComponentRotatedStyle(style) {
|
||||
|
||||
export function colorRgb(color, opacity) {
|
||||
var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/
|
||||
var sColor = color.toLowerCase()
|
||||
var sColor = color
|
||||
if (sColor && reg.test(sColor)) {
|
||||
sColor = sColor.toLowerCase()
|
||||
if (sColor.length === 4) {
|
||||
var sColorNew = '#'
|
||||
for (var i = 1; i < 4; i += 1) {
|
||||
|
||||
@ -126,9 +126,9 @@ export default {
|
||||
})
|
||||
}
|
||||
const v = `${this.sVal} ${this.mVal} ${this.hVal} ${this.dVal} ${this.monthVal} ${this.weekVal} ${this.yearVal}`
|
||||
if (v !== this.value) {
|
||||
this.$emit('input', v)
|
||||
}
|
||||
// if (v !== this.value) {
|
||||
this.$emit('input', v)
|
||||
// }
|
||||
return v
|
||||
}
|
||||
},
|
||||
|
||||
@ -1242,6 +1242,7 @@ export default {
|
||||
component_gap: 'Component Gap',
|
||||
refresh_time: 'Refresh Time',
|
||||
minute: 'minute',
|
||||
second: 'second',
|
||||
photo: 'Photo',
|
||||
default_panel: 'Default Dashboard',
|
||||
create_public_links: 'Create public links',
|
||||
|
||||
@ -1245,6 +1245,7 @@ export default {
|
||||
component_gap: '組件間隙',
|
||||
refresh_time: '刷新时间',
|
||||
minute: '分钟',
|
||||
second: '秒',
|
||||
photo: '圖片',
|
||||
default_panel: '默認儀表板',
|
||||
create_public_links: '創建公共鏈接',
|
||||
|
||||
@ -1253,6 +1253,7 @@ export default {
|
||||
component_gap: '组件间隙',
|
||||
refresh_time: '刷新时间',
|
||||
minute: '分钟',
|
||||
second: '秒',
|
||||
photo: '图片',
|
||||
default_panel: '默认仪表板',
|
||||
create_public_links: '创建公共链接',
|
||||
|
||||
@ -65,6 +65,7 @@
|
||||
:placeholder="$t('panel.select_jump_panel')"
|
||||
style="margin-right: 10px"
|
||||
@select="panelNodeClick"
|
||||
@input="inputVal"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -309,6 +310,13 @@ export default {
|
||||
this.linkJumpInfo.targetViewInfoList = []
|
||||
this.getPanelViewList(data.id)
|
||||
},
|
||||
inputVal(value) {
|
||||
if (!value) {
|
||||
this.linkJumpInfo.targetViewInfoList = []
|
||||
this.viewIdFieldArrayMap = {}
|
||||
this.currentLinkPanelViewArray = []
|
||||
}
|
||||
},
|
||||
addLinkJumpField() {
|
||||
this.linkJumpInfo.targetViewInfoList.push({
|
||||
targetViewId: '',
|
||||
|
||||
@ -7,9 +7,18 @@
|
||||
trigger="click"
|
||||
>
|
||||
<el-col>
|
||||
<el-form ref="colorForm" label-width="80px" size="mini">
|
||||
<el-form-item :label="$t('panel.minute')" class="form-item form-item-slider">
|
||||
<el-slider v-model="canvasStyleData.refreshTime" show-input :show-input-controls="false" input-size="mini" :min="1" :max="60" @change="onChangePanelStyle" />
|
||||
<el-form ref="colorForm" label-width="110px" size="mini">
|
||||
<el-form-item :label="'视图加载提示'" class="form-item form-item-slider">
|
||||
<el-checkbox v-model="canvasStyleData.refreshViewLoading" @change="onChangePanelStyle" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="'刷新时间单位'" class="form-item form-item-slider">
|
||||
<el-radio-group v-model="canvasStyleData.refreshUnit" @change="onChangePanelStyle">
|
||||
<el-radio label="second">秒</el-radio>
|
||||
<el-radio label="minute">分</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item :label="'刷新时间频率'" class="form-item form-item-slider">
|
||||
<el-slider v-model="canvasStyleData.refreshTime" show-input :show-input-controls="false" input-size="mini" :min="1" :max="3600" @change="onChangePanelStyle" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-col>
|
||||
|
||||
@ -423,6 +423,8 @@ export default {
|
||||
// this.$store.commit('setComponentData', this.resetID(JSON.parse(componentDataTemp)))
|
||||
const temp = JSON.parse(canvasStyleDataTemp)
|
||||
temp.refreshTime = (temp.refreshTime || 5)
|
||||
temp.refreshViewLoading = (temp.refreshViewLoading || false)
|
||||
temp.refreshUnit = (temp.refreshUnit || 'minute')
|
||||
|
||||
this.$store.commit('setCanvasStyle', temp)
|
||||
// 清空临时画布数据
|
||||
@ -444,6 +446,8 @@ export default {
|
||||
// this.$store.commit('setComponentData', this.resetID(JSON.parse(response.data.panelData)))
|
||||
const panelStyle = JSON.parse(response.data.panelStyle)
|
||||
panelStyle.refreshTime = (panelStyle.refreshTime || 5)
|
||||
panelStyle.refreshViewLoading = (panelStyle.refreshViewLoading || false)
|
||||
panelStyle.refreshUnit = (panelStyle.refreshUnit || 'minute')
|
||||
|
||||
this.$store.commit('setCanvasStyle', panelStyle)
|
||||
this.$store.commit('recordSnapshot', 'init')// 记录快照
|
||||
|
||||
@ -632,6 +632,8 @@ export default {
|
||||
// this.$store.commit('setComponentData', sourceInfo.type === 'custom' ? sourceInfo : this.resetID(sourceInfo))
|
||||
const temp = JSON.parse(response.data.panelStyle)
|
||||
temp.refreshTime = (temp.refreshTime || 5)
|
||||
temp.refreshViewLoading = (temp.refreshViewLoading || false)
|
||||
temp.refreshUnit = (temp.refreshUnit || 'minute')
|
||||
|
||||
this.$store.commit('setCanvasStyle', temp)
|
||||
this.$store.dispatch('panel/setPanelInfo', data)
|
||||
|
||||
@ -20,7 +20,9 @@ export const CANVAS_STYLE = {
|
||||
auxiliaryMatrix: true,
|
||||
openCommonStyle: true,
|
||||
panel: DEFAULT_PANEL_STYLE,
|
||||
refreshTime: 5 // 仪表板刷新时间 默认五分钟
|
||||
refreshViewLoading: true, // 仪表板视图loading提示
|
||||
refreshUnit: 'minute', // 仪表板刷新时间带外 默认 分钟
|
||||
refreshTime: 5 // 仪表板刷新时间 默认5分钟
|
||||
}
|
||||
|
||||
export const DEFAULT_COMMON_CANVAS_STYLE_STRING = {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user