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);
|
whereName = String.format(OracleConstants.FROM_UNIXTIME, cast, format);
|
||||||
}
|
}
|
||||||
if (field.getDeExtractType() == 1) {
|
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) {
|
} else if (field.getDeType() == 2 || field.getDeType() == 3) {
|
||||||
if (field.getDeExtractType() == 0 || field.getDeExtractType() == 5) {
|
if (field.getDeExtractType() == 0 || field.getDeExtractType() == 5) {
|
||||||
|
@ -141,10 +141,10 @@
|
|||||||
style="position: absolute;right: 70px;top:15px"
|
style="position: absolute;right: 70px;top:15px"
|
||||||
>
|
>
|
||||||
<el-button
|
<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"
|
class="el-icon-picture-outline"
|
||||||
size="mini"
|
size="mini"
|
||||||
:disabled ="imageDownloading"
|
:disabled="imageDownloading"
|
||||||
@click="exportViewImg"
|
@click="exportViewImg"
|
||||||
>
|
>
|
||||||
{{ $t('chart.export_img') }}
|
{{ $t('chart.export_img') }}
|
||||||
@ -152,7 +152,7 @@
|
|||||||
<el-button
|
<el-button
|
||||||
v-if="showChartInfoType==='details' && hasDataPermission('export',panelInfo.privileges)"
|
v-if="showChartInfoType==='details' && hasDataPermission('export',panelInfo.privileges)"
|
||||||
size="mini"
|
size="mini"
|
||||||
:disabled="$store.getters.loadingMap[$store.getters.currentPath]"
|
:disabled="$store.getters.loadingMap[$store.getters.currentPath] || dialogLoading"
|
||||||
@click="exportExcel"
|
@click="exportExcel"
|
||||||
>
|
>
|
||||||
<svg-icon
|
<svg-icon
|
||||||
@ -218,6 +218,7 @@ import Vue from 'vue'
|
|||||||
import { formatterItem, valueFormatter } from '@/views/chart/chart/formatter'
|
import { formatterItem, valueFormatter } from '@/views/chart/chart/formatter'
|
||||||
import UserViewDialog from '@/components/canvas/customComponent/UserViewDialog'
|
import UserViewDialog from '@/components/canvas/customComponent/UserViewDialog'
|
||||||
import UserViewMobileDialog from '@/components/canvas/customComponent/UserViewMobileDialog'
|
import UserViewMobileDialog from '@/components/canvas/customComponent/UserViewMobileDialog'
|
||||||
|
import { equalsAny } from '@/utils/StringUtils'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'UserView',
|
name: 'UserView',
|
||||||
@ -308,6 +309,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
dialogLoading: false,
|
||||||
imageDownloading: false,
|
imageDownloading: false,
|
||||||
innerRefreshTimer: null,
|
innerRefreshTimer: null,
|
||||||
mobileChartDetailsVisible: false,
|
mobileChartDetailsVisible: false,
|
||||||
@ -576,6 +578,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
equalsAny,
|
||||||
tabSwitch(tabCanvasId) {
|
tabSwitch(tabCanvasId) {
|
||||||
if (this.charViewS2ShowFlag && tabCanvasId === this.canvasId && this.$refs[this.element.propValue.id]) {
|
if (this.charViewS2ShowFlag && tabCanvasId === this.canvasId && this.$refs[this.element.propValue.id]) {
|
||||||
this.$refs[this.element.propValue.id].chartResize()
|
this.$refs[this.element.propValue.id].chartResize()
|
||||||
@ -601,7 +604,10 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
exportExcel() {
|
exportExcel() {
|
||||||
this.$refs['userViewDialog'].exportExcel()
|
this.dialogLoading = true
|
||||||
|
this.$refs['userViewDialog'].exportExcel(() => {
|
||||||
|
this.dialogLoading = false
|
||||||
|
})
|
||||||
},
|
},
|
||||||
exportViewImg() {
|
exportViewImg() {
|
||||||
this.imageDownloading = true
|
this.imageDownloading = true
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<de-container
|
<de-container
|
||||||
v-loading="$store.getters.loadingMap[$store.getters.currentPath]"
|
v-loading="$store.getters.loadingMap[$store.getters.currentPath] || linkLoading"
|
||||||
:class="isAbsoluteContainer ? 'abs-container' : ''"
|
:class="isAbsoluteContainer ? 'abs-container' : ''"
|
||||||
>
|
>
|
||||||
<de-main-container
|
<de-main-container
|
||||||
@ -120,7 +120,8 @@ export default {
|
|||||||
return {
|
return {
|
||||||
refId: null,
|
refId: null,
|
||||||
element: {},
|
element: {},
|
||||||
lastMapChart: null
|
lastMapChart: null,
|
||||||
|
linkLoading: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -239,28 +240,28 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
exportExcel() {
|
exportExcel(callBack) {
|
||||||
const _this = this
|
const _this = this
|
||||||
if (this.isOnlyDetails) {
|
if (this.isOnlyDetails) {
|
||||||
_this.exportExcelDownload()
|
_this.exportExcelDownload(null, null, null, callBack)
|
||||||
} else {
|
} else {
|
||||||
if (this.showChartCanvas) {
|
if (this.showChartCanvas) {
|
||||||
html2canvas(document.getElementById('chartCanvas')).then(canvas => {
|
html2canvas(document.getElementById('chartCanvas')).then(canvas => {
|
||||||
const snapshot = canvas.toDataURL('image/jpeg', 1)
|
const snapshot = canvas.toDataURL('image/jpeg', 1)
|
||||||
_this.exportExcelDownload(snapshot, canvas.width, canvas.height)
|
_this.exportExcelDownload(snapshot, canvas.width, canvas.height, callBack)
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
_this.exportExcelDownload()
|
_this.exportExcelDownload(null, null, null, callBack)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
exportViewImg(callback) {
|
exportViewImg(callback) {
|
||||||
exportImg(this.chart.name,callback)
|
exportImg(this.chart.name, callback)
|
||||||
},
|
},
|
||||||
setLastMapChart(data) {
|
setLastMapChart(data) {
|
||||||
this.lastMapChart = JSON.parse(JSON.stringify(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 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 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)
|
const excelHeaderKeys = JSON.parse(JSON.stringify(this.chart.data.fields)).map(item => item.dataeaseName)
|
||||||
@ -291,7 +292,7 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
const request = {
|
const request = {
|
||||||
proxy:null,
|
proxy: null,
|
||||||
viewId: this.chart.id,
|
viewId: this.chart.id,
|
||||||
viewName: excelName,
|
viewName: excelName,
|
||||||
header: excelHeader,
|
header: excelHeader,
|
||||||
@ -309,6 +310,7 @@ export default {
|
|||||||
const linkToken = this.$store.getters.linkToken || getLinkToken()
|
const linkToken = this.$store.getters.linkToken || getLinkToken()
|
||||||
if (!token && linkToken) {
|
if (!token && linkToken) {
|
||||||
method = exportDetails
|
method = exportDetails
|
||||||
|
this.linkLoading = true
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.panelInfo.proxy) {
|
if (this.panelInfo.proxy) {
|
||||||
@ -323,6 +325,11 @@ export default {
|
|||||||
document.body.appendChild(link)
|
document.body.appendChild(link)
|
||||||
link.click()
|
link.click()
|
||||||
document.body.removeChild(link)
|
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 { timeSection } from '@/utils'
|
||||||
import bus from '@/utils/bus'
|
import bus from '@/utils/bus'
|
||||||
import customInput from '@/components/widget/deWidget/customInput'
|
import customInput from '@/components/widget/deWidget/customInput'
|
||||||
|
import { mapState } from 'vuex'
|
||||||
export default {
|
export default {
|
||||||
mixins: [customInput],
|
mixins: [customInput],
|
||||||
props: {
|
props: {
|
||||||
@ -59,7 +59,8 @@ export default {
|
|||||||
operator: 'between',
|
operator: 'between',
|
||||||
values: null,
|
values: null,
|
||||||
onFocus: false,
|
onFocus: false,
|
||||||
show: true
|
show: true,
|
||||||
|
timer: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -126,10 +127,19 @@ export default {
|
|||||||
return ['00:00:00', '23:59:59']
|
return ['00:00:00', '23:59:59']
|
||||||
}
|
}
|
||||||
return null
|
return null
|
||||||
}
|
},
|
||||||
|
...mapState([
|
||||||
|
'canvasStyleData'
|
||||||
|
])
|
||||||
|
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
canvasStyleData: {
|
||||||
|
handler(newVal, oldVla) {
|
||||||
|
this.canvasStyleDataInit()
|
||||||
|
},
|
||||||
|
deep: true
|
||||||
|
},
|
||||||
'viewIds': function(value, old) {
|
'viewIds': function(value, old) {
|
||||||
if (typeof value === 'undefined' || value === old) return
|
if (typeof value === 'undefined' || value === old) return
|
||||||
this.setCondition()
|
this.setCondition()
|
||||||
@ -163,18 +173,8 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
if (this.element.options.attrs.default && this.element.options.attrs.default.isDynamic) {
|
this.loadInit()
|
||||||
if (this.element.options.attrs.default) {
|
this.canvasStyleDataInit()
|
||||||
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)
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
bus.$on('onScroll', this.onScroll)
|
bus.$on('onScroll', this.onScroll)
|
||||||
@ -187,6 +187,38 @@ export default {
|
|||||||
bus.$off('reset-default-value', this.resetDefaultValue)
|
bus.$off('reset-default-value', this.resetDefaultValue)
|
||||||
},
|
},
|
||||||
methods: {
|
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() {
|
clearHandler() {
|
||||||
this.values = null
|
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',
|
category: 'chart.chart_type_space',
|
||||||
value: 'map',
|
value: 'map',
|
||||||
title: 'chart.chart_map',
|
title: 'chart.chart_map',
|
||||||
icon: 'map',
|
icon: 'map_mini',
|
||||||
properties: [
|
properties: [
|
||||||
'color-selector',
|
'color-selector',
|
||||||
'label-selector',
|
'label-selector',
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
v-for="(item, idx) in container"
|
v-for="(item, idx) in container"
|
||||||
:key="idx"
|
:key="idx"
|
||||||
style="position: relative;display: block;"
|
style="position: relative;display: block;"
|
||||||
:style="{'top': item.isPlugin ? '5px' : '0'}"
|
|
||||||
>
|
>
|
||||||
<el-radio
|
<el-radio
|
||||||
v-if="item.placeholder"
|
v-if="item.placeholder"
|
||||||
|
@ -420,8 +420,11 @@ export default {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
const regep = new RegExp(/^1[3-9]\d{9}$/)
|
const regep = new RegExp(/^1[3-9]\d{9}$/)
|
||||||
|
let phoneNumber = value
|
||||||
if (!regep.test(value)) {
|
if (value.length > 3 && value.startsWith('+86')) {
|
||||||
|
phoneNumber = value.substr(3)
|
||||||
|
}
|
||||||
|
if (!regep.test(phoneNumber)) {
|
||||||
const msg = this.$t('user.phone_format')
|
const msg = this.$t('user.phone_format')
|
||||||
callback(new Error(msg))
|
callback(new Error(msg))
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user