forked from github/dataease
Merge branch 'dev' into pr@dev_memory_component
This commit is contained in:
commit
6b56908db7
@ -1215,7 +1215,8 @@ public class OracleQueryProvider extends QueryProvider {
|
||||
whereName = String.format(OracleConstants.FROM_UNIXTIME, cast, format);
|
||||
}
|
||||
if (field.getDeExtractType() == 1) {
|
||||
whereName = String.format(OracleConstants.TO_CHAR, format);
|
||||
whereName = originName;
|
||||
// whereName = String.format(OracleConstants.TO_CHAR, originName, format);
|
||||
}
|
||||
} else if (field.getDeType() == 2 || field.getDeType() == 3) {
|
||||
if (field.getDeExtractType() == 0 || field.getDeExtractType() == 5) {
|
||||
|
@ -141,10 +141,10 @@
|
||||
style="position: absolute;right: 70px;top:15px"
|
||||
>
|
||||
<el-button
|
||||
v-if="showChartInfoType==='enlarge' && hasDataPermission('export',panelInfo.privileges)&& showChartInfo && showChartInfo.type !== 'symbol-map'"
|
||||
v-if="showChartInfoType==='enlarge' && hasDataPermission('export',panelInfo.privileges)&& showChartInfo && !equalsAny(showChartInfo.type, 'symbol-map', 'flow-map')"
|
||||
class="el-icon-picture-outline"
|
||||
size="mini"
|
||||
:disabled ="imageDownloading"
|
||||
:disabled="imageDownloading"
|
||||
@click="exportViewImg"
|
||||
>
|
||||
{{ $t('chart.export_img') }}
|
||||
@ -152,7 +152,7 @@
|
||||
<el-button
|
||||
v-if="showChartInfoType==='details' && hasDataPermission('export',panelInfo.privileges)"
|
||||
size="mini"
|
||||
:disabled="$store.getters.loadingMap[$store.getters.currentPath]"
|
||||
:disabled="$store.getters.loadingMap[$store.getters.currentPath] || dialogLoading"
|
||||
@click="exportExcel"
|
||||
>
|
||||
<svg-icon
|
||||
@ -218,6 +218,7 @@ import Vue from 'vue'
|
||||
import { formatterItem, valueFormatter } from '@/views/chart/chart/formatter'
|
||||
import UserViewDialog from '@/components/canvas/customComponent/UserViewDialog'
|
||||
import UserViewMobileDialog from '@/components/canvas/customComponent/UserViewMobileDialog'
|
||||
import { equalsAny } from '@/utils/StringUtils'
|
||||
|
||||
export default {
|
||||
name: 'UserView',
|
||||
@ -308,6 +309,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogLoading: false,
|
||||
imageDownloading: false,
|
||||
innerRefreshTimer: null,
|
||||
mobileChartDetailsVisible: false,
|
||||
@ -576,6 +578,7 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
equalsAny,
|
||||
tabSwitch(tabCanvasId) {
|
||||
if (this.charViewS2ShowFlag && tabCanvasId === this.canvasId && this.$refs[this.element.propValue.id]) {
|
||||
this.$refs[this.element.propValue.id].chartResize()
|
||||
@ -601,7 +604,10 @@ export default {
|
||||
}
|
||||
},
|
||||
exportExcel() {
|
||||
this.$refs['userViewDialog'].exportExcel()
|
||||
this.dialogLoading = true
|
||||
this.$refs['userViewDialog'].exportExcel(() => {
|
||||
this.dialogLoading = false
|
||||
})
|
||||
},
|
||||
exportViewImg() {
|
||||
this.imageDownloading = true
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<de-container
|
||||
v-loading="$store.getters.loadingMap[$store.getters.currentPath]"
|
||||
v-loading="$store.getters.loadingMap[$store.getters.currentPath] || linkLoading"
|
||||
:class="isAbsoluteContainer ? 'abs-container' : ''"
|
||||
>
|
||||
<de-main-container
|
||||
@ -120,7 +120,8 @@ export default {
|
||||
return {
|
||||
refId: null,
|
||||
element: {},
|
||||
lastMapChart: null
|
||||
lastMapChart: null,
|
||||
linkLoading: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -239,28 +240,28 @@ export default {
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
exportExcel() {
|
||||
exportExcel(callBack) {
|
||||
const _this = this
|
||||
if (this.isOnlyDetails) {
|
||||
_this.exportExcelDownload()
|
||||
_this.exportExcelDownload(null, null, null, callBack)
|
||||
} else {
|
||||
if (this.showChartCanvas) {
|
||||
html2canvas(document.getElementById('chartCanvas')).then(canvas => {
|
||||
const snapshot = canvas.toDataURL('image/jpeg', 1)
|
||||
_this.exportExcelDownload(snapshot, canvas.width, canvas.height)
|
||||
_this.exportExcelDownload(snapshot, canvas.width, canvas.height, callBack)
|
||||
})
|
||||
} else {
|
||||
_this.exportExcelDownload()
|
||||
_this.exportExcelDownload(null, null, null, callBack)
|
||||
}
|
||||
}
|
||||
},
|
||||
exportViewImg(callback) {
|
||||
exportImg(this.chart.name,callback)
|
||||
exportImg(this.chart.name, callback)
|
||||
},
|
||||
setLastMapChart(data) {
|
||||
this.lastMapChart = JSON.parse(JSON.stringify(data))
|
||||
},
|
||||
exportExcelDownload(snapshot, width, height) {
|
||||
exportExcelDownload(snapshot, width, height, callBack) {
|
||||
const excelHeader = JSON.parse(JSON.stringify(this.chart.data.fields)).map(item => item.name)
|
||||
const excelTypes = JSON.parse(JSON.stringify(this.chart.data.fields)).map(item => item.deType)
|
||||
const excelHeaderKeys = JSON.parse(JSON.stringify(this.chart.data.fields)).map(item => item.dataeaseName)
|
||||
@ -291,7 +292,7 @@ export default {
|
||||
})
|
||||
}
|
||||
const request = {
|
||||
proxy:null,
|
||||
proxy: null,
|
||||
viewId: this.chart.id,
|
||||
viewName: excelName,
|
||||
header: excelHeader,
|
||||
@ -309,6 +310,7 @@ export default {
|
||||
const linkToken = this.$store.getters.linkToken || getLinkToken()
|
||||
if (!token && linkToken) {
|
||||
method = exportDetails
|
||||
this.linkLoading = true
|
||||
}
|
||||
|
||||
if (this.panelInfo.proxy) {
|
||||
@ -323,6 +325,11 @@ export default {
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
document.body.removeChild(link)
|
||||
this.linkLoading = false
|
||||
callBack && callBack()
|
||||
}).catch(() => {
|
||||
this.linkLoading = false
|
||||
callBack && callBack()
|
||||
})
|
||||
},
|
||||
|
||||
|
@ -27,7 +27,7 @@ import { ApplicationContext } from '@/utils/ApplicationContext'
|
||||
import { timeSection } from '@/utils'
|
||||
import bus from '@/utils/bus'
|
||||
import customInput from '@/components/widget/deWidget/customInput'
|
||||
|
||||
import { mapState } from 'vuex'
|
||||
export default {
|
||||
mixins: [customInput],
|
||||
props: {
|
||||
@ -59,7 +59,8 @@ export default {
|
||||
operator: 'between',
|
||||
values: null,
|
||||
onFocus: false,
|
||||
show: true
|
||||
show: true,
|
||||
timer: null
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -126,10 +127,19 @@ export default {
|
||||
return ['00:00:00', '23:59:59']
|
||||
}
|
||||
return null
|
||||
}
|
||||
},
|
||||
...mapState([
|
||||
'canvasStyleData'
|
||||
])
|
||||
|
||||
},
|
||||
watch: {
|
||||
canvasStyleData: {
|
||||
handler(newVal, oldVla) {
|
||||
this.canvasStyleDataInit()
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
'viewIds': function(value, old) {
|
||||
if (typeof value === 'undefined' || value === old) return
|
||||
this.setCondition()
|
||||
@ -163,18 +173,8 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (this.element.options.attrs.default && this.element.options.attrs.default.isDynamic) {
|
||||
if (this.element.options.attrs.default) {
|
||||
const widget = ApplicationContext.getService(this.element.serviceName)
|
||||
this.values = widget.dynamicDateFormNow(this.element)
|
||||
this.dateChange(this.values)
|
||||
}
|
||||
return
|
||||
}
|
||||
if (this.element.options.value) {
|
||||
this.values = this.fillValueDerfault()
|
||||
this.dateChange(this.values)
|
||||
}
|
||||
this.loadInit()
|
||||
this.canvasStyleDataInit()
|
||||
},
|
||||
mounted() {
|
||||
bus.$on('onScroll', this.onScroll)
|
||||
@ -187,6 +187,38 @@ export default {
|
||||
bus.$off('reset-default-value', this.resetDefaultValue)
|
||||
},
|
||||
methods: {
|
||||
loadInit() {
|
||||
if (this.element.options.attrs.default && this.element.options.attrs.default.isDynamic) {
|
||||
if (this.element.options.attrs.default) {
|
||||
const widget = ApplicationContext.getService(this.element.serviceName)
|
||||
this.values = widget.dynamicDateFormNow(this.element)
|
||||
this.dateChange(this.values)
|
||||
}
|
||||
return
|
||||
}
|
||||
if (this.element.options.value) {
|
||||
this.values = this.fillValueDerfault()
|
||||
this.dateChange(this.values)
|
||||
}
|
||||
},
|
||||
canvasStyleDataInit() {
|
||||
if (this.inDraw && this.canvasStyleData.refreshViewEnable && this.element.options.attrs.default && this.element.options.attrs.default.isDynamic) {
|
||||
this.searchCount = 0
|
||||
this.timer && clearInterval(this.timer)
|
||||
let refreshTime = 300000
|
||||
if (this.canvasStyleData.refreshTime && this.canvasStyleData.refreshTime > 0) {
|
||||
if (this.canvasStyleData.refreshUnit === 'second') {
|
||||
refreshTime = this.canvasStyleData.refreshTime * 1000
|
||||
} else {
|
||||
refreshTime = this.canvasStyleData.refreshTime * 60000
|
||||
}
|
||||
}
|
||||
this.timer = setInterval(() => {
|
||||
this.loadInit()
|
||||
this.searchCount++
|
||||
}, refreshTime)
|
||||
}
|
||||
},
|
||||
clearHandler() {
|
||||
this.values = null
|
||||
},
|
||||
|
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 714 KiB After Width: | Height: | Size: 673 KiB |
1
frontend/src/icons/svg/buddle-map_mini.svg
Normal file
1
frontend/src/icons/svg/buddle-map_mini.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 9.5 KiB |
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 712 KiB After Width: | Height: | Size: 672 KiB |
1
frontend/src/icons/svg/map_mini.svg
Normal file
1
frontend/src/icons/svg/map_mini.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 7.9 KiB |
@ -3220,7 +3220,7 @@ export const TYPE_CONFIGS = [
|
||||
category: 'chart.chart_type_space',
|
||||
value: 'map',
|
||||
title: 'chart.chart_map',
|
||||
icon: 'map',
|
||||
icon: 'map_mini',
|
||||
properties: [
|
||||
'color-selector',
|
||||
'label-selector',
|
||||
|
@ -19,7 +19,6 @@
|
||||
v-for="(item, idx) in container"
|
||||
:key="idx"
|
||||
style="position: relative;display: block;"
|
||||
:style="{'top': item.isPlugin ? '5px' : '0'}"
|
||||
>
|
||||
<el-radio
|
||||
v-if="item.placeholder"
|
||||
|
@ -420,8 +420,11 @@ export default {
|
||||
return
|
||||
}
|
||||
const regep = new RegExp(/^1[3-9]\d{9}$/)
|
||||
|
||||
if (!regep.test(value)) {
|
||||
let phoneNumber = value
|
||||
if (value.length > 3 && value.startsWith('+86')) {
|
||||
phoneNumber = value.substr(3)
|
||||
}
|
||||
if (!regep.test(phoneNumber)) {
|
||||
const msg = this.$t('user.phone_format')
|
||||
callback(new Error(msg))
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user