Commit b6f6f8cd by 饶艳婷

合并分支 'develop_cd' 到 'master'

Develop cd

查看合并请求 !34
parents 66b63af6 18583dd7
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
@showViewDetails="openChartDetailsDialog" @showViewDetails="openChartDetailsDialog"
/> />
<div <div
v-if="requestStatus==='error'" v-if="requestStatus === 'error'"
class="chart-error-class" class="chart-error-class"
> >
<div class="chart-error-message-class"> <div class="chart-error-message-class">
...@@ -32,7 +32,13 @@ ...@@ -32,7 +32,13 @@
v-if="chart.isPlugin" v-if="chart.isPlugin"
:ref="element.propValue.id" :ref="element.propValue.id"
:component-name="chart.type + '-view'" :component-name="chart.type + '-view'"
:obj="{active, chart, trackMenu, searchCount, terminalType: scaleCoefficientType}" :obj="{
active,
chart,
trackMenu,
searchCount,
terminalType: scaleCoefficientType
}"
:chart="chart" :chart="chart"
:track-menu="trackMenu" :track-menu="trackMenu"
:in-screen="inScreen" :in-screen="inScreen"
...@@ -119,14 +125,19 @@ ...@@ -119,14 +125,19 @@
@onChartClick="chartClick" @onChartClick="chartClick"
@onJumpClick="jumpClick" @onJumpClick="jumpClick"
/> />
<div style="position: absolute;left: 8px;bottom:8px;"> <a-map
v-else-if="aMapShowFlag"
:ref="element.propValue.id"
class="amap-class"
:chart="chart"
/>
<div style="position: absolute; left: 8px; bottom: 8px">
<drill-path <drill-path
:drill-filters="drillFilters" :drill-filters="drillFilters"
:theme-style="element.commonBackground" :theme-style="element.commonBackground"
@onDrillJump="drillJump" @onDrillJump="drillJump"
/> />
</div> </div>
<!--dialog--> <!--dialog-->
<!--视图详情--> <!--视图详情-->
<el-dialog <el-dialog
...@@ -140,10 +151,15 @@ ...@@ -140,10 +151,15 @@
> >
<span <span
v-if="chartDetailsVisible" v-if="chartDetailsVisible"
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 && !equalsAny(showChartInfo.type, 'symbol-map', 'flow-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"
...@@ -152,15 +168,23 @@ ...@@ -152,15 +168,23 @@
{{ $t('chart.export_img') }} {{ $t('chart.export_img') }}
</el-button> </el-button>
<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] || dialogLoading" :disabled="
$store.getters.loadingMap[$store.getters.currentPath] ||
dialogLoading
"
@click="exportExcel" @click="exportExcel"
> >
<svg-icon <svg-icon
icon-class="ds-excel" icon-class="ds-excel"
class="ds-icon-excel" class="ds-icon-excel"
/>{{ $t('chart.export') }}Excel />{{
$t('chart.export')
}}Excel
</el-button> </el-button>
</span> </span>
<user-view-dialog <user-view-dialog
...@@ -207,8 +231,14 @@ import { getLinkToken, getToken } from '@/utils/auth' ...@@ -207,8 +231,14 @@ import { getLinkToken, getToken } from '@/utils/auth'
import DrillPath from '@/views/chart/view/DrillPath' import DrillPath from '@/views/chart/view/DrillPath'
import { areaMapping } from '@/api/map/map' import { areaMapping } from '@/api/map/map'
import ChartComponentG2 from '@/views/chart/components/ChartComponentG2' import ChartComponentG2 from '@/views/chart/components/ChartComponentG2'
import AMap from '@/views/chart/components/AMap'
import EditBarView from '@/components/canvas/components/editor/EditBarView' import EditBarView from '@/components/canvas/components/editor/EditBarView'
import { adaptCurTheme, customAttrTrans, customStyleTrans, recursionTransObj } from '@/components/canvas/utils/style' import {
adaptCurTheme,
customAttrTrans,
customStyleTrans,
recursionTransObj
} from '@/components/canvas/utils/style'
import ChartComponentS2 from '@/views/chart/components/ChartComponentS2' import ChartComponentS2 from '@/views/chart/components/ChartComponentS2'
import PluginCom from '@/views/system/plugin/PluginCom' import PluginCom from '@/views/system/plugin/PluginCom'
import LabelNormalText from '@/views/chart/components/normal/LabelNormalText' import LabelNormalText from '@/views/chart/components/normal/LabelNormalText'
...@@ -235,7 +265,8 @@ export default { ...@@ -235,7 +265,8 @@ export default {
TableNormal, TableNormal,
LabelNormal, LabelNormal,
DrillPath, DrillPath,
ChartComponentG2 ChartComponentG2,
AMap
}, },
props: { props: {
inScreen: { inScreen: {
...@@ -362,7 +393,10 @@ export default { ...@@ -362,7 +393,10 @@ export default {
computed: { computed: {
// 首次加载且非编辑状态新复制的视图,使用外部filter // 首次加载且非编辑状态新复制的视图,使用外部filter
initLoad() { initLoad() {
return !(this.isEdit && this.currentCanvasNewId.includes(this.element.id)) && this.isFirstLoad return (
!(this.isEdit && this.currentCanvasNewId.includes(this.element.id)) &&
this.isFirstLoad
)
}, },
scaleCoefficient() { scaleCoefficient() {
if (this.terminal === 'pc' && !this.mobileLayoutStatus) { if (this.terminal === 'pc' && !this.mobileLayoutStatus) {
...@@ -379,31 +413,82 @@ export default { ...@@ -379,31 +413,82 @@ export default {
} }
}, },
editBarViewShowFlag() { editBarViewShowFlag() {
return (this.active && this.inTab && !this.mobileLayoutStatus) && !this.showPosition.includes('multiplexing') || this.showPosition.includes('email-task') return (
(this.active &&
this.inTab &&
!this.mobileLayoutStatus &&
!this.showPosition.includes('multiplexing')) ||
this.showPosition.includes('email-task')
)
}, },
richTextViewShowFlag() { richTextViewShowFlag() {
return this.httpRequest.status && this.chart.type && this.chart.type === 'richTextView' return (
this.httpRequest.status &&
this.chart.type &&
this.chart.type === 'richTextView'
)
}, },
charViewShowFlag() { charViewShowFlag() {
return this.httpRequest.status && this.chart.type && !this.chart.type.includes('table') && !this.chart.type.includes('text') && this.chart.type !== 'label' && this.renderComponent() === 'echarts' return (
this.httpRequest.status &&
this.chart.type &&
!this.chart.type.includes('table') &&
!this.chart.type.includes('text') &&
this.chart.type !== 'label' &&
this.renderComponent() === 'echarts'
)
}, },
charViewG2ShowFlag() { charViewG2ShowFlag() {
return this.httpRequest.status && this.chart.type && !this.chart.type.includes('table') && !this.chart.type.includes('text') && this.chart.type !== 'label' && this.renderComponent() === 'antv' return (
this.httpRequest.status &&
this.chart.type &&
!this.chart.type.includes('table') &&
!this.chart.type.includes('text') &&
this.chart.type !== 'label' &&
this.renderComponent() === 'antv'
)
},
aMapShowFlag() {
return this.chart.type === 'amap' && this.renderComponent() === 'aMap'
}, },
charViewS2ShowFlag() { charViewS2ShowFlag() {
return this.httpRequest.status && this.chart.type && this.chart.type.includes('table') && !this.chart.type.includes('text') && this.chart.type !== 'label' && this.renderComponent() === 'antv' return (
this.httpRequest.status &&
this.chart.type &&
this.chart.type.includes('table') &&
!this.chart.type.includes('text') &&
this.chart.type !== 'label' &&
this.renderComponent() === 'antv'
)
}, },
tableShowFlag() { tableShowFlag() {
return this.httpRequest.status && this.chart.type && this.chart.type.includes('table') && this.renderComponent() === 'echarts' return (
this.httpRequest.status &&
this.chart.type &&
this.chart.type.includes('table') &&
this.renderComponent() === 'echarts'
)
}, },
labelShowFlag() { labelShowFlag() {
return this.httpRequest.status && this.chart.type && this.chart.type.includes('text') return (
this.httpRequest.status &&
this.chart.type &&
this.chart.type.includes('text')
)
}, },
labelTextShowFlag() { labelTextShowFlag() {
return this.httpRequest.status && this.chart.type && this.chart.type === 'label' return (
this.httpRequest.status &&
this.chart.type &&
this.chart.type === 'label'
)
}, },
loadingFlag() { loadingFlag() {
return (this.canvasStyleData.refreshViewLoading || (!this.innerRefreshTimer && this.searchCount === 0)) && this.requestStatus === 'waiting' return (
(this.canvasStyleData.refreshViewLoading ||
(!this.innerRefreshTimer && this.searchCount === 0)) &&
this.requestStatus === 'waiting'
)
}, },
panelInfo() { panelInfo() {
return this.$store.state.panel.panelInfo return this.$store.state.panel.panelInfo
...@@ -443,13 +528,17 @@ export default { ...@@ -443,13 +528,17 @@ export default {
jumpCount++ jumpCount++
} }
} else { } else {
this.chart.data && this.chart.data.fields && this.chart.data.fields.forEach(item => { this.chart.data &&
this.chart.data.fields &&
this.chart.data.fields.forEach((item) => {
const sourceInfo = this.chart.id + '#' + item.id const sourceInfo = this.chart.id + '#' + item.id
if (this.nowPanelTrackInfo[sourceInfo]) { if (this.nowPanelTrackInfo[sourceInfo]) {
linkageCount++ linkageCount++
} }
}) })
this.chart.data && this.chart.data.fields && this.chart.data.fields.forEach(item => { this.chart.data &&
this.chart.data.fields &&
this.chart.data.fields.forEach((item) => {
const sourceInfo = this.chart.id + '#' + item.id const sourceInfo = this.chart.id + '#' + item.id
if (this.nowPanelJumpInfo[sourceInfo]) { if (this.nowPanelJumpInfo[sourceInfo]) {
jumpCount++ jumpCount++
...@@ -469,16 +558,29 @@ export default { ...@@ -469,16 +558,29 @@ export default {
return this.outStyle.width * this.outStyle.height return this.outStyle.width * this.outStyle.height
}, },
resultMode() { resultMode() {
return this.canvasStyleData.panel && this.canvasStyleData.panel.resultMode || null return (
(this.canvasStyleData.panel && this.canvasStyleData.panel.resultMode) ||
null
)
}, },
resultCount() { resultCount() {
return this.canvasStyleData.panel && this.canvasStyleData.panel.resultCount || null return (
(this.canvasStyleData.panel &&
this.canvasStyleData.panel.resultCount) ||
null
)
}, },
gap() { gap() {
return this.canvasStyleData.panel && this.canvasStyleData.panel.gap || null return (
(this.canvasStyleData.panel && this.canvasStyleData.panel.gap) || null
)
}, },
innerPadding() { innerPadding() {
return this.element.commonBackground && this.element.commonBackground.innerPadding || 0 return (
(this.element.commonBackground &&
this.element.commonBackground.innerPadding) ||
0
)
}, },
...mapState([ ...mapState([
'currentCanvasNewId', 'currentCanvasNewId',
...@@ -494,7 +596,7 @@ export default { ...@@ -494,7 +596,7 @@ export default {
}, },
watch: { watch: {
'innerPadding': { innerPadding: {
handler: function(val1, val2) { handler: function(val1, val2) {
if (val1 !== val2) { if (val1 !== val2) {
this.resizeChart() this.resizeChart()
...@@ -502,7 +604,7 @@ export default { ...@@ -502,7 +604,7 @@ export default {
}, },
deep: true deep: true
}, },
'cfilters': { cfilters: {
handler: function(val1, val2) { handler: function(val1, val2) {
if (isChange(val1, val2) && !this.isFirstLoad) { if (isChange(val1, val2) && !this.isFirstLoad) {
this.getData(this.element.propValue.viewId) this.getData(this.element.propValue.viewId)
...@@ -529,7 +631,7 @@ export default { ...@@ -529,7 +631,7 @@ export default {
this.resizeChart() this.resizeChart()
}, },
// 监听外部的样式变化 (非实时性要求) // 监听外部的样式变化 (非实时性要求)
'hw': { hw: {
handler(newVal, oldVla) { handler(newVal, oldVla) {
if (newVal !== oldVla && this.$refs[this.element.propValue.id]) { if (newVal !== oldVla && this.$refs[this.element.propValue.id]) {
this.resizeChart() this.resizeChart()
...@@ -539,18 +641,21 @@ export default { ...@@ -539,18 +641,21 @@ export default {
}, },
// 监听外部的样式变化 (非实时性要求) // 监听外部的样式变化 (非实时性要求)
outStyle: { outStyle: {
handler(newVal, oldVla) { handler(newVal, oldVla) {},
},
deep: true deep: true
}, },
// 监听外部计时器变化 // 监听外部计时器变化
searchCount: function(val1) { searchCount: function(val1) {
// 内部计时器启动 忽略外部计时器 // 内部计时器启动 忽略外部计时器
if (val1 > 0 && this.requestStatus !== 'waiting' && !this.innerRefreshTimer) { if (
val1 > 0 &&
this.requestStatus !== 'waiting' &&
!this.innerRefreshTimer
) {
this.getData(this.element.propValue.viewId) this.getData(this.element.propValue.viewId)
} }
}, },
'chartType': function(newVal, oldVal) { chartType: function(newVal, oldVal) {
if ((newVal === 'map' || newVal === 'buddle-map') && newVal !== oldVal) { if ((newVal === 'map' || newVal === 'buddle-map') && newVal !== oldVal) {
this.initAreas() this.initAreas()
} }
...@@ -594,7 +699,11 @@ export default { ...@@ -594,7 +699,11 @@ export default {
}, },
created() { created() {
this.refId = uuid.v1 this.refId = uuid.v1
if (this.element && this.element.propValue && this.element.propValue.viewId) { if (
this.element &&
this.element.propValue &&
this.element.propValue.viewId
) {
// 如果watch.filters 已经进行数据初始化时候,此处放弃数据初始化 // 如果watch.filters 已经进行数据初始化时候,此处放弃数据初始化
this.getData(this.element.propValue.viewId, false) this.getData(this.element.propValue.viewId, false)
...@@ -603,15 +712,28 @@ export default { ...@@ -603,15 +712,28 @@ export default {
methods: { methods: {
equalsAny, 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()
} }
}, },
// 编辑状态下 不启动刷新 // 编辑状态下 不启动刷新
buildInnerRefreshTimer(refreshViewEnable = false, refreshUnit = 'minute', refreshTime = 5) { buildInnerRefreshTimer(
if (this.editMode === 'preview' && !this.innerRefreshTimer && refreshViewEnable) { refreshViewEnable = false,
refreshUnit = 'minute',
refreshTime = 5
) {
if (
this.editMode === 'preview' &&
!this.innerRefreshTimer &&
refreshViewEnable
) {
this.innerRefreshTimer && clearInterval(this.innerRefreshTimer) this.innerRefreshTimer && clearInterval(this.innerRefreshTimer)
const timerRefreshTime = refreshUnit === 'second' ? refreshTime * 1000 : refreshTime * 60000 const timerRefreshTime =
refreshUnit === 'second' ? refreshTime * 1000 : refreshTime * 60000
this.innerRefreshTimer = setInterval(() => { this.innerRefreshTimer = setInterval(() => {
this.clearViewLinkage() this.clearViewLinkage()
this.getData(this.element.propValue.viewId) this.getData(this.element.propValue.viewId)
...@@ -648,13 +770,14 @@ export default { ...@@ -648,13 +770,14 @@ export default {
}, },
optFromBatchSingleProp(param) { optFromBatchSingleProp(param) {
this.$store.commit('canvasChange') this.$store.commit('canvasChange')
const updateParams = { 'id': this.chart.id } const updateParams = { id: this.chart.id }
if (param.custom === 'customAttr') { if (param.custom === 'customAttr') {
const sourceCustomAttr = JSON.parse(this.sourceCustomAttrStr) const sourceCustomAttr = JSON.parse(this.sourceCustomAttrStr)
if (!sourceCustomAttr[param.property]) { if (!sourceCustomAttr[param.property]) {
this.$set(sourceCustomAttr, param.property, {}) this.$set(sourceCustomAttr, param.property, {})
} }
sourceCustomAttr[param.property][param.value.modifyName] = param.value[param.value.modifyName] sourceCustomAttr[param.property][param.value.modifyName] =
param.value[param.value.modifyName]
this.sourceCustomAttrStr = JSON.stringify(sourceCustomAttr) this.sourceCustomAttrStr = JSON.stringify(sourceCustomAttr)
this.chart.customAttr = this.sourceCustomAttrStr this.chart.customAttr = this.sourceCustomAttrStr
this.$store.commit('updateComponentViewsData', { this.$store.commit('updateComponentViewsData', {
...@@ -668,7 +791,8 @@ export default { ...@@ -668,7 +791,8 @@ export default {
if (param.property === 'margin') { if (param.property === 'margin') {
sourceCustomStyle[param.property] = param.value sourceCustomStyle[param.property] = param.value
} }
sourceCustomStyle[param.property][param.value.modifyName] = param.value[param.value.modifyName] sourceCustomStyle[param.property][param.value.modifyName] =
param.value[param.value.modifyName]
this.sourceCustomStyleStr = JSON.stringify(sourceCustomStyle) this.sourceCustomStyleStr = JSON.stringify(sourceCustomStyle)
this.chart.customStyle = this.sourceCustomStyleStr this.chart.customStyle = this.sourceCustomStyleStr
this.$store.commit('updateComponentViewsData', { this.$store.commit('updateComponentViewsData', {
...@@ -678,14 +802,17 @@ export default { ...@@ -678,14 +802,17 @@ export default {
}) })
updateParams['customStyle'] = this.sourceCustomStyleStr updateParams['customStyle'] = this.sourceCustomStyleStr
} }
viewPropsSave(this.panelInfo.id, updateParams).then(rsp => { viewPropsSave(this.panelInfo.id, updateParams).then((rsp) => {
this.active && bus.$emit('current-component-change') this.active && bus.$emit('current-component-change')
}) })
this.$store.commit('recordViewEdit', { viewId: this.chart.id, hasEdit: true }) this.$store.commit('recordViewEdit', {
viewId: this.chart.id,
hasEdit: true
})
this.mergeScale() this.mergeScale()
}, },
optFromBatchThemeChange() { optFromBatchThemeChange() {
const updateParams = { 'id': this.chart.id } const updateParams = { id: this.chart.id }
const sourceCustomAttr = JSON.parse(this.sourceCustomAttrStr) const sourceCustomAttr = JSON.parse(this.sourceCustomAttrStr)
const sourceCustomStyle = JSON.parse(this.sourceCustomStyleStr) const sourceCustomStyle = JSON.parse(this.sourceCustomStyleStr)
adaptCurTheme(sourceCustomStyle, sourceCustomAttr, this.chart.type) adaptCurTheme(sourceCustomStyle, sourceCustomAttr, this.chart.type)
...@@ -695,10 +822,13 @@ export default { ...@@ -695,10 +822,13 @@ export default {
this.sourceCustomStyleStr = JSON.stringify(sourceCustomStyle) this.sourceCustomStyleStr = JSON.stringify(sourceCustomStyle)
this.chart.customStyle = this.sourceCustomStyleStr this.chart.customStyle = this.sourceCustomStyleStr
updateParams['customStyle'] = this.sourceCustomStyleStr updateParams['customStyle'] = this.sourceCustomStyleStr
viewPropsSave(this.panelInfo.id, updateParams).then(rsp => { viewPropsSave(this.panelInfo.id, updateParams).then((rsp) => {
this.active && bus.$emit('current-component-change') this.active && bus.$emit('current-component-change')
}) })
this.$store.commit('recordViewEdit', { viewId: this.chart.id, hasEdit: true }) this.$store.commit('recordViewEdit', {
viewId: this.chart.id,
hasEdit: true
})
this.mergeScale() this.mergeScale()
}, },
resizeChart() { resizeChart() {
...@@ -708,28 +838,43 @@ export default { ...@@ -708,28 +838,43 @@ export default {
this.chartResize(this.changeIndex) this.chartResize(this.changeIndex)
} else if (this.$refs[this.element.propValue.id]) { } else if (this.$refs[this.element.propValue.id]) {
this.chart.isPlugin this.chart.isPlugin
? this.$refs[this.element.propValue.id].callPluginInner({ methodName: 'chartResize' }) ? this.$refs[this.element.propValue.id].callPluginInner({
methodName: 'chartResize'
})
: this.$refs[this.element.propValue.id].chartResize() : this.$refs[this.element.propValue.id].chartResize()
} }
}, },
pluginChartClick(param) { pluginChartClick(param) {
param.viewId && param.viewId === this.element.propValue.viewId && this.chartClick(param) param.viewId &&
param.viewId === this.element.propValue.viewId &&
this.chartClick(param)
}, },
pluginJumpClick(param) { pluginJumpClick(param) {
param.viewId && param.viewId === this.element.propValue.viewId && this.jumpClick(param) param.viewId &&
param.viewId === this.element.propValue.viewId &&
this.jumpClick(param)
}, },
pluginAddViewTrackFilter(param) { pluginAddViewTrackFilter(param) {
param.viewId && param.viewId === this.element.propValue.viewId && this.addViewTrackFilter(param) param.viewId &&
param.viewId === this.element.propValue.viewId &&
this.addViewTrackFilter(param)
}, },
viewInCache(param) { viewInCache(param) {
this.view = param.view this.view = param.view
if (this.view && this.view.customAttr) { if (this.view && this.view.customAttr) {
this.currentPage.pageSize = parseInt(JSON.parse(this.view.customAttr).size.tablePageSize) this.currentPage.pageSize = parseInt(
JSON.parse(this.view.customAttr).size.tablePageSize
)
} }
param.viewId && param.viewId === this.element.propValue.viewId && this.getDataEdit(param) param.viewId &&
param.viewId === this.element.propValue.viewId &&
this.getDataEdit(param)
}, },
clearPanelLinkage(param) { clearPanelLinkage(param) {
if (param.viewId === 'all' || param.viewId === this.element.propValue.viewId) { if (
param.viewId === 'all' ||
param.viewId === this.element.propValue.viewId
) {
try { try {
this.$refs[this.element.propValue.id]?.reDrawView() this.$refs[this.element.propValue.id]?.reDrawView()
} catch (e) { } catch (e) {
...@@ -753,11 +898,25 @@ export default { ...@@ -753,11 +898,25 @@ export default {
}, },
// 根据仪表板的缩放比例,修改视图内部参数 // 根据仪表板的缩放比例,修改视图内部参数
mergeScale() { mergeScale() {
this.scale = Math.min(this.previewCanvasScale.scalePointWidth, this.previewCanvasScale.scalePointHeight) * this.scaleCoefficient this.scale =
Math.min(
this.previewCanvasScale.scalePointWidth,
this.previewCanvasScale.scalePointHeight
) * this.scaleCoefficient
const customAttrChart = JSON.parse(this.sourceCustomAttrStr) const customAttrChart = JSON.parse(this.sourceCustomAttrStr)
const customStyleChart = JSON.parse(this.sourceCustomStyleStr) const customStyleChart = JSON.parse(this.sourceCustomStyleStr)
recursionTransObj(customAttrTrans, customAttrChart, this.scale, this.scaleCoefficientType) recursionTransObj(
recursionTransObj(customStyleTrans, customStyleChart, this.scale, this.scaleCoefficientType) customAttrTrans,
customAttrChart,
this.scale,
this.scaleCoefficientType
)
recursionTransObj(
customStyleTrans,
customStyleChart,
this.scale,
this.scaleCoefficientType
)
// 移动端地图标签不显示 // 移动端地图标签不显示
if (this.chart.type === 'map' && this.scaleCoefficientType === 'mobile') { if (this.chart.type === 'map' && this.scaleCoefficientType === 'mobile') {
customAttrChart.label.show = false customAttrChart.label.show = false
...@@ -770,7 +929,12 @@ export default { ...@@ -770,7 +929,12 @@ export default {
}, },
getData(id, cache = true, dataBroadcast = false) { getData(id, cache = true, dataBroadcast = false) {
if (id) { if (id) {
if (this.getDataLoading || Vue.prototype.$currentHttpRequestList.get(`/chart/view/getData/${id}/${this.panelInfo.id}`)) { if (
this.getDataLoading ||
Vue.prototype.$currentHttpRequestList.get(
`/chart/view/getData/${id}/${this.panelInfo.id}`
)
) {
const url = `/chart/view/getData/${id}/${this.panelInfo.id}` const url = `/chart/view/getData/${id}/${this.panelInfo.id}`
Vue.prototype.$cancelRequest(url) Vue.prototype.$cancelRequest(url)
Vue.prototype.$currentHttpRequestList.delete(url) Vue.prototype.$currentHttpRequestList.delete(url)
...@@ -803,23 +967,40 @@ export default { ...@@ -803,23 +967,40 @@ export default {
// table-info明细表增加分页 // table-info明细表增加分页
if (this.view && this.view.customAttr) { if (this.view && this.view.customAttr) {
const attrSize = JSON.parse(this.view.customAttr).size const attrSize = JSON.parse(this.view.customAttr).size
if (this.chart.type === 'table-info' && this.view.datasetMode === 0 && (!attrSize.tablePageMode || attrSize.tablePageMode === 'page')) { if (
this.chart.type === 'table-info' &&
this.view.datasetMode === 0 &&
(!attrSize.tablePageMode || attrSize.tablePageMode === 'page')
) {
requestInfo.goPage = this.currentPage.page requestInfo.goPage = this.currentPage.page
requestInfo.pageSize = this.currentPage.pageSize === parseInt(attrSize.tablePageSize) ? this.currentPage.pageSize : parseInt(attrSize.tablePageSize) requestInfo.pageSize =
this.currentPage.pageSize === parseInt(attrSize.tablePageSize)
? this.currentPage.pageSize
: parseInt(attrSize.tablePageSize)
} }
} }
if (this.isFirstLoad) { if (this.isFirstLoad) {
this.element.filters = this.filters?.length ? JSON.parse(JSON.stringify(this.filters)) : [] this.element.filters = this.filters?.length
? JSON.parse(JSON.stringify(this.filters))
: []
} }
method(id, this.panelInfo.id, requestInfo).then(response => { method(id, this.panelInfo.id, requestInfo)
.then((response) => {
// 将视图传入echart组件 // 将视图传入echart组件
if (response.success) { if (response.success) {
this.chart = response.data this.chart = response.data
this.view = response.data this.view = response.data
if (this.chart.type.includes('table')) { if (this.chart.type.includes('table')) {
this.$store.commit('setLastViewRequestInfo', { viewId: id, requestInfo: requestInfo }) this.$store.commit('setLastViewRequestInfo', {
viewId: id,
requestInfo: requestInfo
})
} }
this.buildInnerRefreshTimer(this.chart.refreshViewEnable, this.chart.refreshUnit, this.chart.refreshTime) this.buildInnerRefreshTimer(
this.chart.refreshViewEnable,
this.chart.refreshUnit,
this.chart.refreshTime
)
this.$emit('fill-chart-2-parent', this.chart) this.$emit('fill-chart-2-parent', this.chart)
this.getDataOnly(response.data, dataBroadcast) this.getDataOnly(response.data, dataBroadcast)
this.chart['position'] = this.inTab ? 'tab' : 'panel' this.chart['position'] = this.inTab ? 'tab' : 'panel'
...@@ -840,13 +1021,24 @@ export default { ...@@ -840,13 +1021,24 @@ export default {
} }
this.sourceCustomAttrStr = this.chart.customAttr this.sourceCustomAttrStr = this.chart.customAttr
this.sourceCustomStyleStr = this.chart.customStyle this.sourceCustomStyleStr = this.chart.customStyle
this.chart.drillFields = this.chart.drillFields ? JSON.parse(this.chart.drillFields) : [] this.chart.drillFields = this.chart.drillFields
? JSON.parse(this.chart.drillFields)
: []
if (!response.data.drill) { if (!response.data.drill) {
this.drillClickDimensionList.splice(this.drillClickDimensionList.length - 1, 1) this.drillClickDimensionList.splice(
this.drillClickDimensionList.length - 1,
1
)
this.resetDrill() this.resetDrill()
} }
this.drillFilters = JSON.parse(JSON.stringify(response.data.drillFilters ? response.data.drillFilters : [])) this.drillFilters = JSON.parse(
this.drillFields = JSON.parse(JSON.stringify(response.data.drillFields)) JSON.stringify(
response.data.drillFilters ? response.data.drillFilters : []
)
)
this.drillFields = JSON.parse(
JSON.stringify(response.data.drillFields)
)
this.requestStatus = 'merging' this.requestStatus = 'merging'
this.mergeScale() this.mergeScale()
this.initCurFields(this.chart) this.initCurFields(this.chart)
...@@ -859,7 +1051,8 @@ export default { ...@@ -859,7 +1051,8 @@ export default {
} }
this.isFirstLoad = false this.isFirstLoad = false
return true return true
}).catch(err => { })
.catch((err) => {
console.error('err-' + err) console.error('err-' + err)
this.requestStatus = 'error' this.requestStatus = 'error'
if (err.message && err.message.indexOf('timeout') > -1) { if (err.message && err.message.indexOf('timeout') > -1) {
...@@ -879,7 +1072,8 @@ export default { ...@@ -879,7 +1072,8 @@ export default {
} }
this.isFirstLoad = false this.isFirstLoad = false
return true return true
}).finally(() => { })
.finally(() => {
this.getDataLoading = false this.getDataLoading = false
}) })
} }
...@@ -889,8 +1083,12 @@ export default { ...@@ -889,8 +1083,12 @@ export default {
this.dataRowSelect = {} this.dataRowSelect = {}
this.dataRowNameSelect = {} this.dataRowNameSelect = {}
if (chartDetails.data && chartDetails.data.sourceFields) { if (chartDetails.data && chartDetails.data.sourceFields) {
const checkAllAxisStr = chartDetails.xaxis + chartDetails.xaxisExt + chartDetails.yaxis + chartDetails.yaxisExt const checkAllAxisStr =
chartDetails.data.sourceFields.forEach(field => { chartDetails.xaxis +
chartDetails.xaxisExt +
chartDetails.yaxis +
chartDetails.yaxisExt
chartDetails.data.sourceFields.forEach((field) => {
if (checkAllAxisStr.indexOf(field.id) > -1) { if (checkAllAxisStr.indexOf(field.id) > -1) {
this.curFields.push(field) this.curFields.push(field)
} }
...@@ -900,10 +1098,13 @@ export default { ...@@ -900,10 +1098,13 @@ export default {
pre[next['dataeaseName']] = next['id'] pre[next['dataeaseName']] = next['id']
return pre return pre
}, {}) }, {})
const sourceFieldNameIdMap = chartDetails.data.fields.reduce((pre, next) => { const sourceFieldNameIdMap = chartDetails.data.fields.reduce(
(pre, next) => {
pre[next['dataeaseName']] = next['name'] pre[next['dataeaseName']] = next['name']
return pre return pre
}, {}) },
{}
)
const rowData = chartDetails.data.tableRow[0] const rowData = chartDetails.data.tableRow[0]
if (chartDetails.type === 'richTextView') { if (chartDetails.type === 'richTextView') {
let yAxis = [] let yAxis = []
...@@ -914,7 +1115,7 @@ export default { ...@@ -914,7 +1115,7 @@ export default {
} }
const yDataeaseNames = [] const yDataeaseNames = []
const yDataeaseNamesCfg = [] const yDataeaseNamesCfg = []
yAxis.forEach(yItem => { yAxis.forEach((yItem) => {
yDataeaseNames.push(yItem.dataeaseName) yDataeaseNames.push(yItem.dataeaseName)
yDataeaseNamesCfg[yItem.dataeaseName] = yItem.formatterCfg yDataeaseNamesCfg[yItem.dataeaseName] = yItem.formatterCfg
}) })
...@@ -984,9 +1185,15 @@ export default { ...@@ -984,9 +1185,15 @@ export default {
} }
}, },
chartClick(param) { chartClick(param) {
if (this.drillClickDimensionList.length < this.chart.drillFields.length - 1) { if (
(this.chart.type === 'map' || this.chart.type === 'buddle-map') && this.sendToChildren(param) this.drillClickDimensionList.length <
this.drillClickDimensionList.push({ dimensionList: param.data.dimensionList }) this.chart.drillFields.length - 1
) {
(this.chart.type === 'map' || this.chart.type === 'buddle-map') &&
this.sendToChildren(param)
this.drillClickDimensionList.push({
dimensionList: param.data.dimensionList
})
this.getData(this.element.propValue.viewId) this.getData(this.element.propValue.viewId)
} else if (this.chart.drillFields.length > 0) { } else if (this.chart.drillFields.length > 0) {
this.$message({ this.$message({
...@@ -1001,8 +1208,11 @@ export default { ...@@ -1001,8 +1208,11 @@ export default {
let dimension, jumpInfo, sourceInfo let dimension, jumpInfo, sourceInfo
// 如果有名称name 获取和name匹配的dimension 否则倒序取最后一个能匹配的 // 如果有名称name 获取和name匹配的dimension 否则倒序取最后一个能匹配的
if (param.name) { if (param.name) {
param.dimensionList.forEach(dimensionItem => { param.dimensionList.forEach((dimensionItem) => {
if (dimensionItem.id === param.name || dimensionItem.value === param.name) { if (
dimensionItem.id === param.name ||
dimensionItem.value === param.name
) {
dimension = dimensionItem dimension = dimensionItem
sourceInfo = param.viewId + '#' + dimension.id sourceInfo = param.viewId + '#' + dimension.id
jumpInfo = this.nowPanelJumpInfo[sourceInfo] jumpInfo = this.nowPanelJumpInfo[sourceInfo]
...@@ -1053,7 +1263,12 @@ export default { ...@@ -1053,7 +1263,12 @@ export default {
} }
} else { } else {
const colList = [...param.dimensionList, ...param.quotaList] const colList = [...param.dimensionList, ...param.quotaList]
let url = this.setIdValueTrans('id', 'value', jumpInfo.content, colList) let url = this.setIdValueTrans(
'id',
'value',
jumpInfo.content,
colList
)
url = checkAddHttp(url) url = checkAddHttp(url)
this.windowsJump(url, jumpInfo.jumpType) this.windowsJump(url, jumpInfo.jumpType)
} }
...@@ -1078,7 +1293,7 @@ export default { ...@@ -1078,7 +1293,7 @@ export default {
}, {}) }, {})
const on = content.match(/\[(.+?)\]/g) const on = content.match(/\[(.+?)\]/g)
if (on) { if (on) {
on.forEach(itm => { on.forEach((itm) => {
const ele = itm.slice(1, -1) const ele = itm.slice(1, -1)
name2Id = name2Id.replace(itm, nameIdMap[ele]) name2Id = name2Id.replace(itm, nameIdMap[ele])
}) })
...@@ -1105,19 +1320,28 @@ export default { ...@@ -1105,19 +1320,28 @@ export default {
const current = this.$refs[this.element.propValue.id] const current = this.$refs[this.element.propValue.id]
if (this.chart.isPlugin) { if (this.chart.isPlugin) {
current && current.callPluginInner && this.setDetailMapCode(null) && current.callPluginInner({ current &&
current.callPluginInner &&
this.setDetailMapCode(null) &&
current.callPluginInner({
methodName: 'registerDynamicMap', methodName: 'registerDynamicMap',
methodParam: null methodParam: null
}) })
} else { } else {
current && current.registerDynamicMap && this.setDetailMapCode(null) && current.registerDynamicMap(null) current &&
current.registerDynamicMap &&
this.setDetailMapCode(null) &&
current.registerDynamicMap(null)
} }
} }
}, },
drillJump(index) { drillJump(index) {
const length = this.drillClickDimensionList.length const length = this.drillClickDimensionList.length
this.drillClickDimensionList = this.drillClickDimensionList.slice(0, index) this.drillClickDimensionList = this.drillClickDimensionList.slice(
0,
index
)
if (this.chart.type === 'map' || this.chart.type === 'buddle-map') { if (this.chart.type === 'map' || this.chart.type === 'buddle-map') {
this.backToParent(index, length) this.backToParent(index, length)
} }
...@@ -1138,12 +1362,18 @@ export default { ...@@ -1138,12 +1362,18 @@ export default {
this.currentAcreaNode = tempNode this.currentAcreaNode = tempNode
const current = this.$refs[this.element.propValue.id] const current = this.$refs[this.element.propValue.id]
if (this.chart.isPlugin) { if (this.chart.isPlugin) {
current && current.callPluginInner && this.setDetailMapCode(this.currentAcreaNode.code) && current.callPluginInner({ current &&
current.callPluginInner &&
this.setDetailMapCode(this.currentAcreaNode.code) &&
current.callPluginInner({
methodName: 'registerDynamicMap', methodName: 'registerDynamicMap',
methodParam: this.currentAcreaNode.code methodParam: this.currentAcreaNode.code
}) })
} else { } else {
current && current.registerDynamicMap && this.setDetailMapCode(this.currentAcreaNode.code) && current.registerDynamicMap(this.currentAcreaNode.code) current &&
current.registerDynamicMap &&
this.setDetailMapCode(this.currentAcreaNode.code) &&
current.registerDynamicMap(this.currentAcreaNode.code)
} }
}, },
...@@ -1162,18 +1392,33 @@ export default { ...@@ -1162,18 +1392,33 @@ export default {
aCode = this.currentAcreaNode.code aCode = this.currentAcreaNode.code
} }
const customAttr = JSON.parse(this.chart.customAttr) const customAttr = JSON.parse(this.chart.customAttr)
const currentNode = this.findEntityByCode(aCode || customAttr.areaCode, this.places) const currentNode = this.findEntityByCode(
if (currentNode && currentNode.children && currentNode.children.length > 0) { aCode || customAttr.areaCode,
const nextNode = currentNode.children.find(item => item.name === name) this.places
)
if (
currentNode &&
currentNode.children &&
currentNode.children.length > 0
) {
const nextNode = currentNode.children.find((item) => item.name === name)
this.currentAcreaNode = nextNode this.currentAcreaNode = nextNode
const current = this.$refs[this.element.propValue.id] const current = this.$refs[this.element.propValue.id]
if (this.chart.isPlugin) { if (this.chart.isPlugin) {
nextNode && current && current.callPluginInner && this.setDetailMapCode(nextNode.code) && current.callPluginInner({ nextNode &&
current &&
current.callPluginInner &&
this.setDetailMapCode(nextNode.code) &&
current.callPluginInner({
methodName: 'registerDynamicMap', methodName: 'registerDynamicMap',
methodParam: nextNode.code methodParam: nextNode.code
}) })
} else { } else {
nextNode && current && current.registerDynamicMap && this.setDetailMapCode(nextNode.code) && current.registerDynamicMap(nextNode.code) nextNode &&
current &&
current.registerDynamicMap &&
this.setDetailMapCode(nextNode.code) &&
current.registerDynamicMap(nextNode.code)
} }
} }
}, },
...@@ -1190,7 +1435,8 @@ export default { ...@@ -1190,7 +1435,8 @@ export default {
} }
}, },
initAreas() { initAreas() {
Object.keys(this.places).length === 0 && areaMapping().then(res => { Object.keys(this.places).length === 0 &&
areaMapping().then((res) => {
this.places = res.data this.places = res.data
}) })
}, },
...@@ -1205,12 +1451,16 @@ export default { ...@@ -1205,12 +1451,16 @@ export default {
const current = this.$refs[this.element.propValue.id] const current = this.$refs[this.element.propValue.id]
if (this.chart.isPlugin) { if (this.chart.isPlugin) {
current && current.callPluginInner && current.callPluginInner({ current &&
current.callPluginInner &&
current.callPluginInner({
methodName: 'registerDynamicMap', methodName: 'registerDynamicMap',
methodParam: areaNode.code methodParam: areaNode.code
}) })
} else { } else {
current && current.registerDynamicMap && current.registerDynamicMap(areaNode.code) current &&
current.registerDynamicMap &&
current.registerDynamicMap(areaNode.code)
} }
}, },
// 根据地名获取areaCode // 根据地名获取areaCode
...@@ -1240,7 +1490,9 @@ export default { ...@@ -1240,7 +1490,9 @@ export default {
this.timeMachine = setTimeout(() => { this.timeMachine = setTimeout(() => {
if (index === this.changeIndex) { if (index === this.changeIndex) {
this.chart.isPlugin this.chart.isPlugin
? this.$refs[this.element.propValue.id].callPluginInner({ methodName: 'chartResize' }) ? this.$refs[this.element.propValue.id].callPluginInner({
methodName: 'chartResize'
})
: this.$refs[this.element.propValue.id].chartResize() : this.$refs[this.element.propValue.id].chartResize()
} }
this.destroyTimeMachine() this.destroyTimeMachine()
...@@ -1278,7 +1530,8 @@ export default { ...@@ -1278,7 +1530,8 @@ export default {
if (this.componentViewsData[this.chart.id]) { if (this.componentViewsData[this.chart.id]) {
this.componentViewsData[this.chart.id]['title'] = this.chart.title this.componentViewsData[this.chart.id]['title'] = this.chart.title
if (param.refreshProp) { if (param.refreshProp) {
this.componentViewsData[this.chart.id][param.refreshProp] = this.chart[param.refreshProp] this.componentViewsData[this.chart.id][param.refreshProp] =
this.chart[param.refreshProp]
} }
} }
this.mergeScale() this.mergeScale()
...@@ -1286,7 +1539,10 @@ export default { ...@@ -1286,7 +1539,10 @@ export default {
}, },
getDataOnly(sourceResponseData, dataBroadcast) { getDataOnly(sourceResponseData, dataBroadcast) {
if (this.isEdit) { if (this.isEdit) {
if ((this.filter.filter && this.filter.filter.length) || (this.filter.linkageFilters && this.filter.linkageFilters.length)) { if (
(this.filter.filter && this.filter.filter.length) ||
(this.filter.linkageFilters && this.filter.linkageFilters.length)
) {
const requestInfo = { const requestInfo = {
filter: [], filter: [],
drill: [], drill: [],
...@@ -1295,18 +1551,24 @@ export default { ...@@ -1295,18 +1551,24 @@ export default {
// table-info明细表增加分页 // table-info明细表增加分页
if (this.view && this.view.customAttr) { if (this.view && this.view.customAttr) {
const attrSize = JSON.parse(this.view.customAttr).size const attrSize = JSON.parse(this.view.customAttr).size
if (this.chart.type === 'table-info' && this.view.datasetMode === 0 && (!attrSize.tablePageMode || attrSize.tablePageMode === 'page')) { if (
this.chart.type === 'table-info' &&
this.view.datasetMode === 0 &&
(!attrSize.tablePageMode || attrSize.tablePageMode === 'page')
) {
requestInfo.goPage = this.currentPage.page requestInfo.goPage = this.currentPage.page
requestInfo.pageSize = this.currentPage.pageSize requestInfo.pageSize = this.currentPage.pageSize
} }
} }
viewData(this.chart.id, this.panelInfo.id, requestInfo).then(response => { viewData(this.chart.id, this.panelInfo.id, requestInfo).then(
(response) => {
this.componentViewsData[this.chart.id] = response.data this.componentViewsData[this.chart.id] = response.data
this.view = response.data this.view = response.data
if (dataBroadcast) { if (dataBroadcast) {
bus.$emit('prop-change-data') bus.$emit('prop-change-data')
} }
}) }
)
} else { } else {
this.componentViewsData[this.chart.id] = sourceResponseData this.componentViewsData[this.chart.id] = sourceResponseData
if (dataBroadcast) { if (dataBroadcast) {
...@@ -1359,7 +1621,6 @@ export default { ...@@ -1359,7 +1621,6 @@ export default {
} }
.active { .active {
} }
.active ::v-deep .icon-fangda { .active ::v-deep .icon-fangda {
...@@ -1368,7 +1629,7 @@ export default { ...@@ -1368,7 +1629,7 @@ export default {
} }
.mobile-dialog-css ::v-deep .el-dialog__headerbtn { .mobile-dialog-css ::v-deep .el-dialog__headerbtn {
top: 7px top: 7px;
} }
.mobile-dialog-css ::v-deep .el-dialog__body { .mobile-dialog-css ::v-deep .el-dialog__body {
......
<template> <template>
<de-container <de-container
v-loading="$store.getters.loadingMap[$store.getters.currentPath] || linkLoading" v-loading="
$store.getters.loadingMap[$store.getters.currentPath] || linkLoading
"
:class="isAbsoluteContainer ? 'abs-container' : ''" :class="isAbsoluteContainer ? 'abs-container' : ''"
> >
<de-main-container <de-main-container
...@@ -19,25 +21,37 @@ ...@@ -19,25 +21,37 @@
<plugin-com <plugin-com
v-if="chart.isPlugin" v-if="chart.isPlugin"
:component-name="chart.type + '-view'" :component-name="chart.type + '-view'"
:obj="{chart: mapChart || chart}" :obj="{ chart: mapChart || chart }"
:chart="mapChart || chart" :chart="mapChart || chart"
:theme-style="element.commonBackground" :theme-style="element.commonBackground"
:canvas-style-data="canvasStyleData" :canvas-style-data="canvasStyleData"
class="chart-class" class="chart-class"
/> />
<chart-component <chart-component
v-else-if="!chart.type.includes('text') && chart.type !== 'label' && !chart.type.includes('table') && renderComponent() === 'echarts'" v-else-if="
!chart.type.includes('text') &&
chart.type !== 'label' &&
!chart.type.includes('table') &&
renderComponent() === 'echarts'
"
:theme-style="element.commonBackground" :theme-style="element.commonBackground"
class="chart-class" class="chart-class"
:chart="mapChart || chart" :chart="mapChart || chart"
/> />
<chart-component-g2 <chart-component-g2
v-else-if="!chart.type.includes('text') && chart.type !== 'label' && !chart.type.includes('table') && renderComponent() === 'antv'" v-else-if="
!chart.type.includes('text') &&
chart.type !== 'label' &&
!chart.type.includes('table') &&
renderComponent() === 'antv'
"
class="chart-class" class="chart-class"
:chart="chart" :chart="chart"
/> />
<chart-component-s2 <chart-component-s2
v-else-if="chart.type.includes('table') && renderComponent() === 'antv'" v-else-if="
chart.type.includes('table') && renderComponent() === 'antv'
"
class="chart-class" class="chart-class"
:chart="chart" :chart="chart"
/> />
...@@ -52,10 +66,17 @@ ...@@ -52,10 +66,17 @@
class="table-class" class="table-class"
/> />
<table-normal <table-normal
v-else-if="chart.type.includes('table') && renderComponent() === 'echarts'" v-else-if="
chart.type.includes('table') && renderComponent() === 'echarts'
"
:chart="chart" :chart="chart"
class="table-class" class="table-class"
/> />
<a-map
v-else-if="chart.type === 'amap'"
class="amap-class"
:chart="chart"
/>
</div> </div>
</div> </div>
</de-main-container> </de-main-container>
...@@ -71,7 +92,6 @@ ...@@ -71,7 +92,6 @@
</template> </template>
<script> <script>
import ChartComponent from '@/views/chart/components/ChartComponent.vue' import ChartComponent from '@/views/chart/components/ChartComponent.vue'
import TableNormal from '@/views/chart/components/table/TableNormal' import TableNormal from '@/views/chart/components/table/TableNormal'
import LabelNormal from '@/views/chart/components/normal/LabelNormal' import LabelNormal from '@/views/chart/components/normal/LabelNormal'
...@@ -83,8 +103,14 @@ import PluginCom from '@/views/system/plugin/PluginCom' ...@@ -83,8 +103,14 @@ import PluginCom from '@/views/system/plugin/PluginCom'
import ChartComponentS2 from '@/views/chart/components/ChartComponentS2' import ChartComponentS2 from '@/views/chart/components/ChartComponentS2'
import LabelNormalText from '@/views/chart/components/normal/LabelNormalText' import LabelNormalText from '@/views/chart/components/normal/LabelNormalText'
import html2canvas from 'html2canvasde' import html2canvas from 'html2canvasde'
import AMap from '@/views/chart/components/AMap'
import { hexColorToRGBA } from '@/views/chart/chart/util' import { hexColorToRGBA } from '@/views/chart/chart/util'
import { deepCopy, exportExcelDownload, exportImg, imgUrlTrans } from '@/components/canvas/utils/utils' import {
deepCopy,
exportExcelDownload,
exportImg,
imgUrlTrans
} from '@/components/canvas/utils/utils'
export default { export default {
name: 'UserViewDialog', name: 'UserViewDialog',
...@@ -97,7 +123,8 @@ export default { ...@@ -97,7 +123,8 @@ export default {
ChartComponent, ChartComponent,
TableNormal, TableNormal,
LabelNormal, LabelNormal,
PluginCom PluginCom,
AMap
}, },
props: { props: {
chart: { chart: {
...@@ -112,7 +139,6 @@ export default { ...@@ -112,7 +139,6 @@ export default {
type: String, type: String,
default: 'details' default: 'details'
} }
}, },
data() { data() {
return { return {
...@@ -133,18 +159,30 @@ export default { ...@@ -133,18 +159,30 @@ export default {
return this.openType === 'enlarge' return this.openType === 'enlarge'
}, },
isOnlyDetails() { isOnlyDetails() {
return this.chart.type === 'table-normal' || this.chart.type === 'table-info' return (
this.chart.type === 'table-normal' || this.chart.type === 'table-info'
)
}, },
customStyle() { customStyle() {
let style = {} let style = {}
if (this.canvasStyleData.openCommonStyle) { if (this.canvasStyleData.openCommonStyle) {
if (this.canvasStyleData.panel.backgroundType === 'image' && this.canvasStyleData.panel.imageUrl) { if (
this.canvasStyleData.panel.backgroundType === 'image' &&
this.canvasStyleData.panel.imageUrl
) {
style = { style = {
background: `url(${imgUrlTrans(this.canvasStyleData.panel.imageUrl)}) no-repeat`, background: `url(${imgUrlTrans(
this.canvasStyleData.panel.imageUrl
)}) no-repeat`,
...style ...style
} }
} else if (this.canvasStyleData.panel.backgroundType === 'color') { } else if (this.canvasStyleData.panel.backgroundType === 'color') {
const colorRGBA = hexColorToRGBA(this.canvasStyleData.panel.color, this.canvasStyleData.panel.alpha === undefined ? 100 : this.canvasStyleData.panel.alpha) const colorRGBA = hexColorToRGBA(
this.canvasStyleData.panel.color,
this.canvasStyleData.panel.alpha === undefined
? 100
: this.canvasStyleData.panel.alpha
)
style = { style = {
background: colorRGBA, background: colorRGBA,
...style ...style
...@@ -158,11 +196,18 @@ export default { ...@@ -158,11 +196,18 @@ export default {
}, },
svgInnerEnable() { svgInnerEnable() {
return !this.screenShot && this.element.commonBackground.enable && this.element.commonBackground.backgroundType === 'innerImage' && typeof this.element.commonBackground.innerImage === 'string' return (
!this.screenShot &&
this.element.commonBackground.enable &&
this.element.commonBackground.backgroundType === 'innerImage' &&
typeof this.element.commonBackground.innerImage === 'string'
)
}, },
mainSlotSvgInner() { mainSlotSvgInner() {
if (this.svgInnerEnable) { if (this.svgInnerEnable) {
return this.element.commonBackground.innerImage.replace('board/', '').replace('.svg', '') return this.element.commonBackground.innerImage
.replace('board/', '')
.replace('.svg', '')
} else { } else {
return null return null
} }
...@@ -173,18 +218,37 @@ export default { ...@@ -173,18 +218,37 @@ export default {
height: '100%' height: '100%'
} }
if (this.element.commonBackground) { if (this.element.commonBackground) {
style['padding'] = (this.element.commonBackground.innerPadding || 0) + 'px' style['padding'] =
style['border-radius'] = (this.element.commonBackground.borderRadius || 0) + 'px' (this.element.commonBackground.innerPadding || 0) + 'px'
style['border-radius'] =
(this.element.commonBackground.borderRadius || 0) + 'px'
let colorRGBA = '' let colorRGBA = ''
if (this.element.commonBackground.backgroundColorSelect) { if (this.element.commonBackground.backgroundColorSelect) {
colorRGBA = hexColorToRGBA(this.element.commonBackground.color, this.element.commonBackground.alpha) colorRGBA = hexColorToRGBA(
this.element.commonBackground.color,
this.element.commonBackground.alpha
)
} }
if (this.element.commonBackground.enable) { if (this.element.commonBackground.enable) {
if (this.screenShot && this.element.commonBackground.backgroundType === 'innerImage' && typeof this.element.commonBackground.innerImage === 'string') { if (
const innerImage = this.element.commonBackground.innerImage.replace('svg', 'png') this.screenShot &&
style['background'] = `url(${imgUrlTrans(innerImage)}) no-repeat ${colorRGBA}` this.element.commonBackground.backgroundType === 'innerImage' &&
} else if (this.element.commonBackground.backgroundType === 'outerImage' && typeof this.element.commonBackground.outerImage === 'string') { typeof this.element.commonBackground.innerImage === 'string'
style['background'] = `url(${imgUrlTrans(this.element.commonBackground.outerImage)}) no-repeat ${colorRGBA}` ) {
const innerImage = this.element.commonBackground.innerImage.replace(
'svg',
'png'
)
style['background'] = `url(${imgUrlTrans(
innerImage
)}) no-repeat ${colorRGBA}`
} else if (
this.element.commonBackground.backgroundType === 'outerImage' &&
typeof this.element.commonBackground.outerImage === 'string'
) {
style['background'] = `url(${imgUrlTrans(
this.element.commonBackground.outerImage
)}) no-repeat ${colorRGBA}`
} else { } else {
style['background-color'] = colorRGBA style['background-color'] = colorRGBA
} }
...@@ -203,24 +267,40 @@ export default { ...@@ -203,24 +267,40 @@ export default {
'lastViewRequestInfo' 'lastViewRequestInfo'
]), ]),
mapChart() { mapChart() {
if (this.chart.type && (this.chart.type === 'map' || this.chart.type === 'buddle-map')) { if (
this.chart.type &&
(this.chart.type === 'map' || this.chart.type === 'buddle-map')
) {
const temp = JSON.parse(JSON.stringify(this.chart)) const temp = JSON.parse(JSON.stringify(this.chart))
let DetailAreaCode = null let DetailAreaCode = null
if (this.curComponent && this.curComponent.DetailAreaCode && this.curComponent.DetailAreaCode.length) { if (
this.curComponent &&
this.curComponent.DetailAreaCode &&
this.curComponent.DetailAreaCode.length
) {
DetailAreaCode = this.curComponent.DetailAreaCode DetailAreaCode = this.curComponent.DetailAreaCode
} }
if (!this.curComponent && this.lastMapChart) { if (!this.curComponent && this.lastMapChart) {
return this.lastMapChart return this.lastMapChart
} }
if (this.curComponent && this.curComponent.options && this.curComponent.options.tabList && this.curComponent.options.tabList.length) { if (
const tabList = JSON.parse(JSON.stringify(this.curComponent.options.tabList)) this.curComponent &&
tabList.forEach(tab => { this.curComponent.options &&
if (tab.content && this.curComponent.options.tabList &&
this.curComponent.options.tabList.length
) {
const tabList = JSON.parse(
JSON.stringify(this.curComponent.options.tabList)
)
tabList.forEach((tab) => {
if (
tab.content &&
tab.content.propValue && tab.content.propValue &&
tab.content.propValue.viewId && tab.content.propValue.viewId &&
tab.content.propValue.viewId === this.chart.id && tab.content.propValue.viewId === this.chart.id &&
tab.content.DetailAreaCode && tab.content.DetailAreaCode &&
tab.content.DetailAreaCode.length) { tab.content.DetailAreaCode.length
) {
DetailAreaCode = tab.content.DetailAreaCode DetailAreaCode = tab.content.DetailAreaCode
} }
}) })
...@@ -236,8 +316,7 @@ export default { ...@@ -236,8 +316,7 @@ export default {
created() { created() {
this.element = deepCopy(this.curComponent) this.element = deepCopy(this.curComponent)
}, },
mounted() { mounted() {},
},
methods: { methods: {
exportExcel(callBack) { exportExcel(callBack) {
const _this = this const _this = this
...@@ -245,9 +324,14 @@ export default { ...@@ -245,9 +324,14 @@ export default {
_this.exportExcelDownload(null, null, null, callBack) _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, callBack) _this.exportExcelDownload(
snapshot,
canvas.width,
canvas.height,
callBack
)
}) })
} else { } else {
_this.exportExcelDownload(null, null, null, callBack) _this.exportExcelDownload(null, null, null, callBack)
...@@ -262,7 +346,14 @@ export default { ...@@ -262,7 +346,14 @@ export default {
}, },
exportExcelDownload(snapshot, width, height, callBack) { exportExcelDownload(snapshot, width, height, callBack) {
const loadingWrapper = { val: this.linkLoading } const loadingWrapper = { val: this.linkLoading }
exportExcelDownload(this.chart, snapshot, width, height, loadingWrapper, callBack) exportExcelDownload(
this.chart,
snapshot,
width,
height,
loadingWrapper,
callBack
)
}, },
renderComponent() { renderComponent() {
...@@ -282,7 +373,7 @@ export default { ...@@ -282,7 +373,7 @@ export default {
.ms-main-container { .ms-main-container {
height: 70vh; height: 70vh;
border: 1px solid #E6E6E6; border: 1px solid #e6e6e6;
} }
.chart-class { .chart-class {
...@@ -318,5 +409,4 @@ export default { ...@@ -318,5 +409,4 @@ export default {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
</style> </style>
...@@ -42,7 +42,8 @@ export default { ...@@ -42,7 +42,8 @@ export default {
} }
}, },
track: { track: {
upload_limit_format: 'The image format is incorrect. It supports JPG and PNG', upload_limit_format:
'The image format is incorrect. It supports JPG and PNG',
upload_limit_size: 'Picture size shall not exceed' upload_limit_size: 'Picture size shall not exceed'
}, },
route: { route: {
...@@ -126,7 +127,8 @@ export default { ...@@ -126,7 +127,8 @@ export default {
password: 'Password', password: 'Password',
any: 'any', any: 'any',
thirdparty: 'Or connect with', thirdparty: 'Or connect with',
thirdpartyTips: 'Can not be simulated on local, so please combine you own business simulation! ! !', thirdpartyTips:
'Can not be simulated on local, so please combine you own business simulation! ! !',
expires: 'Login token expired, please login again', expires: 'Login token expired, please login again',
tokenError: 'Token error, please login again', tokenError: 'Token error, please login again',
username_error: 'Please enter the correct ID', username_error: 'Please enter the correct ID',
...@@ -142,13 +144,15 @@ export default { ...@@ -142,13 +144,15 @@ export default {
unbind: 'Unbind', unbind: 'Unbind',
unlock: 'Unlock', unlock: 'Unlock',
unlock_success: 'Unlock success', unlock_success: 'Unlock success',
parameter_effect: 'Parameter values only take effect when editing a dataset', parameter_effect:
'Parameter values only take effect when editing a dataset',
uninstall: 'Uninstall', uninstall: 'Uninstall',
no_result: 'No Result', no_result: 'No Result',
manage_member: 'Managing members', manage_member: 'Managing members',
confirm_remove_cancel: 'Are you sure to delete the role?', confirm_remove_cancel: 'Are you sure to delete the role?',
user_confirm_remove_cancel: 'Are you sure you want to remove the user from the role?', user_confirm_remove_cancel:
'Are you sure you want to remove the user from the role?',
default_value: 'Default Value', default_value: 'Default Value',
params_value: 'Param Value', params_value: 'Param Value',
input_role_name: 'Enter a role name', input_role_name: 'Enter a role name',
...@@ -406,17 +410,24 @@ export default { ...@@ -406,17 +410,24 @@ export default {
cancel: 'Cancel' cancel: 'Cancel'
}, },
guide: { guide: {
description: 'The guide page is useful for some people who entered the project for the first time. You can briefly introduce the features of the project. Demo is based on ', description:
'The guide page is useful for some people who entered the project for the first time. You can briefly introduce the features of the project. Demo is based on ',
button: 'Show Guide' button: 'Show Guide'
}, },
components: { components: {
documentation: 'Documentation', documentation: 'Documentation',
tinymceTips: 'Rich text is a core feature of the management backend, but at the same time it is a place with lots of pits. In the process of selecting rich texts, I also took a lot of detours. The common rich texts on the market have been basically used, and I finally chose Tinymce. See the more detailed rich text comparison and introduction.', tinymceTips:
dropzoneTips: 'Because my business has special needs, and has to upload images to qiniu, so instead of a third party, I chose encapsulate it by myself. It is very simple, you can see the detail code in @/components/Dropzone.', 'Rich text is a core feature of the management backend, but at the same time it is a place with lots of pits. In the process of selecting rich texts, I also took a lot of detours. The common rich texts on the market have been basically used, and I finally chose Tinymce. See the more detailed rich text comparison and introduction.',
stickyTips: 'when the page is scrolled to the preset position will be sticky on the top.', dropzoneTips:
backToTopTips1: 'When the page is scrolled to the specified position, the Back to Top button appears in the lower right corner', 'Because my business has special needs, and has to upload images to qiniu, so instead of a third party, I chose encapsulate it by myself. It is very simple, you can see the detail code in @/components/Dropzone.',
backToTopTips2: 'You can customize the style of the button, show / hide, height of appearance, height of the return. If you need a text prompt, you can use element-ui el-tooltip elements externally', stickyTips:
imageUploadTips: 'Since I was using only the vue@1 version, and it is not compatible with mockjs at the moment, I modified it myself, and if you are going to use it, it is better to use official version.', 'when the page is scrolled to the preset position will be sticky on the top.',
backToTopTips1:
'When the page is scrolled to the specified position, the Back to Top button appears in the lower right corner',
backToTopTips2:
'You can customize the style of the button, show / hide, height of appearance, height of the return. If you need a text prompt, you can use element-ui el-tooltip elements externally',
imageUploadTips:
'Since I was using only the vue@1 version, and it is not compatible with mockjs at the moment, I modified it myself, and if you are going to use it, it is better to use official version.',
run_once: 'Run once', run_once: 'Run once',
continue: 'continue', continue: 'continue',
hour: 'hour', hour: 'hour',
...@@ -436,7 +447,8 @@ export default { ...@@ -436,7 +447,8 @@ export default {
name_is_required: 'User name is required', name_is_required: 'User name is required',
password_is_required: 'Password is required', password_is_required: 'Password is required',
help_document_link: 'Invalid help document link', help_document_link: 'Invalid help document link',
such_as_dataeasedataease: 'Please enter the login page title, such as: DataEase', such_as_dataeasedataease:
'Please enter the login page title, such as: DataEase',
for_example_dataease: 'Please enter the system name, for example: DataEase', for_example_dataease: 'Please enter the system name, for example: DataEase',
time_is_required: 'Start time is required', time_is_required: 'Start time is required',
delete_this_task: 'Are you sure to delete this task?', delete_this_task: 'Are you sure to delete this task?',
...@@ -504,12 +516,14 @@ export default { ...@@ -504,12 +516,14 @@ export default {
run_failed: 'Run failed', run_failed: 'Run failed',
select_data_table: 'Select Data Table', select_data_table: 'Select Data Table',
in_the_file: 'Merged cells cannot exist in the file', in_the_file: 'Merged cells cannot exist in the file',
or_date_type: 'The first line of the file is the header line, which cannot be empty or date type', or_date_type:
'The first line of the file is the header line, which cannot be empty or date type',
is_within_500m: 'Please ensure the size of Excel file is within 500M', is_within_500m: 'Please ensure the size of Excel file is within 500M',
upload_data: 'Upload data', upload_data: 'Upload data',
excel_data_first: 'Please upload Excel data first', excel_data_first: 'Please upload Excel data first',
is_currently_available: 'No data table is currently available', is_currently_available: 'No data table is currently available',
sure_to_synchronize: 'Synchronizing fields may cause changes to the edited fields. Are you sure to synchronize?', sure_to_synchronize:
'Synchronizing fields may cause changes to the edited fields. Are you sure to synchronize?',
folder_name: 'Folder Name', folder_name: 'Folder Name',
folder: 'Folder', folder: 'Folder',
edit_folder: 'Edit Folder', edit_folder: 'Edit Folder',
...@@ -527,7 +541,8 @@ export default { ...@@ -527,7 +541,8 @@ export default {
create_dashboard: 'Create Dashboard', create_dashboard: 'Create Dashboard',
cannot_be_empty: 'SQL cannot be empty', cannot_be_empty: 'SQL cannot be empty',
data_reference: 'Data Reference', data_reference: 'Data Reference',
want_to_replace: 'Replacement may affect custom dataset, associated dataset, dashboard, etc. Do you want to replace?', want_to_replace:
'Replacement may affect custom dataset, associated dataset, dashboard, etc. Do you want to replace?',
replace_the_data: 'Are you sure to replace the data?', replace_the_data: 'Are you sure to replace the data?',
append_successfully: 'Append successfully', append_successfully: 'Append successfully',
already_exists: 'Dataset name already exists', already_exists: 'Dataset name already exists',
...@@ -537,7 +552,8 @@ export default { ...@@ -537,7 +552,8 @@ export default {
left_to_edit: 'Select the data table on the left to edit', left_to_edit: 'Select the data table on the left to edit',
cannot_be_duplicate: 'The dataset name cannot be duplicate', cannot_be_duplicate: 'The dataset name cannot be duplicate',
set_saved_successfully: 'Data set saved successfully', set_saved_successfully: 'Data set saved successfully',
to_start_using: 'Browse the contents of your database, tables and columns. Choose a database to get started.', to_start_using:
'Browse the contents of your database, tables and columns. Choose a database to get started.',
to_run_query: 'Click to run query', to_run_query: 'Click to run query',
the_running_results: 'You can view the running results', the_running_results: 'You can view the running results',
item: 'item', item: 'item',
...@@ -554,11 +570,13 @@ export default { ...@@ -554,11 +570,13 @@ export default {
head_position: 'Head Position' head_position: 'Head Position'
}, },
example: { example: {
warning: 'Creating and editing pages cannot be cached by keep-alive because keep-alive include does not currently support caching based on routes, so it is currently cached based on component name. If you want to achieve a similar caching effect, you can use a browser caching scheme such as localStorage. Or do not use keep-alive include to cache all pages directly. See details' warning:
'Creating and editing pages cannot be cached by keep-alive because keep-alive include does not currently support caching based on routes, so it is currently cached based on component name. If you want to achieve a similar caching effect, you can use a browser caching scheme such as localStorage. Or do not use keep-alive include to cache all pages directly. See details'
}, },
errorLog: { errorLog: {
tips: 'Please click the bug icon in the upper right corner', tips: 'Please click the bug icon in the upper right corner',
description: 'Now the management system are basically the form of the spa, it enhances the user experience, but it also increases the possibility of page problems, a small negligence may lead to the entire page deadlock. Fortunately Vue provides a way to catch handling exceptions, where you can handle errors or report exceptions.', description:
'Now the management system are basically the form of the spa, it enhances the user experience, but it also increases the possibility of page problems, a small negligence may lead to the entire page deadlock. Fortunately Vue provides a way to catch handling exceptions, where you can handle errors or report exceptions.',
documentation: 'Document introduction' documentation: 'Document introduction'
}, },
excel: { excel: {
...@@ -627,7 +645,8 @@ export default { ...@@ -627,7 +645,8 @@ export default {
valid: 'Valid', valid: 'Valid',
invalid: 'Invalid', invalid: 'Invalid',
expired: 'Expired', expired: 'Expired',
expired_msg: 'license has expired since {0}. It is recommended to update the license, which does not affect the use of enterprise version functions' expired_msg:
'license has expired since {0}. It is recommended to update the license, which does not affect the use of enterprise version functions'
}, },
member: { member: {
create: 'Add members', create: 'Add members',
...@@ -640,18 +659,23 @@ export default { ...@@ -640,18 +659,23 @@ export default {
edit_information: 'Edit Information', edit_information: 'Edit Information',
input_name: 'Input Name', input_name: 'Input Name',
input_email: 'Input Email', input_email: 'Input Email',
special_characters_are_not_supported: 'Special characters are not supported', special_characters_are_not_supported:
mobile_number_format_is_incorrect: 'Incorrect format of mobile phone number', 'Special characters are not supported',
mobile_number_format_is_incorrect:
'Incorrect format of mobile phone number',
email_format_is_incorrect: 'The mailbox format is incorrect', email_format_is_incorrect: 'The mailbox format is incorrect',
password_format_is_incorrect: 'Valid password: 8-30 digits, English upper and lower case letters + numbers + special characters (optional)', password_format_is_incorrect:
'Valid password: 8-30 digits, English upper and lower case letters + numbers + special characters (optional)',
old_password: 'Old Password', old_password: 'Old Password',
new_password: 'New Password', new_password: 'New Password',
repeat_password: 'Confirm Password', repeat_password: 'Confirm Password',
inconsistent_passwords: 'The two passwords are inconsistent', inconsistent_passwords: 'The two passwords are inconsistent',
remove_member: 'Confirm to remove the member', remove_member: 'Confirm to remove the member',
org_remove_member: 'Removing the user from the organization will remove the permissions of all workspaces in the organization. Confirm to remove the member?', org_remove_member:
'Removing the user from the organization will remove the permissions of all workspaces in the organization. Confirm to remove the member?',
input_id_or_email: 'Please enter user ID or user email', input_id_or_email: 'Please enter user ID or user email',
no_such_user: 'No such user information, please enter the correct user ID or user email.' no_such_user:
'No such user information, please enter the correct user ID or user email.'
}, },
user: { user: {
create: 'Create User', create: 'Create User',
...@@ -669,9 +693,12 @@ export default { ...@@ -669,9 +693,12 @@ export default {
input_phone: 'Please enter the phone number', input_phone: 'Please enter the phone number',
input_roles: 'Please select role', input_roles: 'Please select role',
select_users: 'Please select user', select_users: 'Please select user',
user_name_pattern_error: 'IDs can only contain alphanumeric and ._- and start with a letter or number!', user_name_pattern_error:
special_characters_are_not_supported: 'Special characters are not supported', 'IDs can only contain alphanumeric and ._- and start with a letter or number!',
mobile_number_format_is_incorrect: 'Incorrect format of mobile phone number', special_characters_are_not_supported:
'Special characters are not supported',
mobile_number_format_is_incorrect:
'Incorrect format of mobile phone number',
email_format_is_incorrect: 'The mailbox format is incorrect', email_format_is_incorrect: 'The mailbox format is incorrect',
delete_confirm: 'Confirm to delete this user?', delete_confirm: 'Confirm to delete this user?',
apikey_delete_confirm: 'Confirm to delete this API key?', apikey_delete_confirm: 'Confirm to delete this API key?',
...@@ -720,7 +747,8 @@ export default { ...@@ -720,7 +747,8 @@ export default {
input_url_placeholder: 'Please key url (like ldap://localhost:389)', input_url_placeholder: 'Please key url (like ldap://localhost:389)',
input_ou_placeholder: 'Please key OU ', input_ou_placeholder: 'Please key OU ',
input_filter_placeholder: 'Please key filter', input_filter_placeholder: 'Please key filter',
input_mapping_placeholder: 'like:{"userName":"uid","nickName":"cn","email":"mail"}', input_mapping_placeholder:
'like:{"userName":"uid","nickName":"cn","email":"mail"}',
test_connect: 'Test connect', test_connect: 'Test connect',
edit: 'Edit', edit: 'Edit',
login_success: 'Login success', login_success: 'Login success',
...@@ -764,8 +792,10 @@ export default { ...@@ -764,8 +792,10 @@ export default {
role_exist: 'Failed to add, the role already exists', role_exist: 'Failed to add, the role already exists',
add_api_role: 'Add API role', add_api_role: 'Add API role',
can_not_move: `Can't be removed, keep at least one administrator`, can_not_move: `Can't be removed, keep at least one administrator`,
manage_can_not_move: 'Administrator is a preset role of the system. By default, he has all the permissions of system management and cannot be deleted', manage_can_not_move:
manage_can_not_update: 'Administrator is a preset role of the system. By default, he has all the permissions of system management and cannot be edit', 'Administrator is a preset role of the system. By default, he has all the permissions of system management and cannot be deleted',
manage_can_not_update:
'Administrator is a preset role of the system. By default, he has all the permissions of system management and cannot be edit',
role_description: 'Role description', role_description: 'Role description',
editer_role: 'Edit role', editer_role: 'Edit role',
add_role: 'Add role', add_role: 'Add role',
...@@ -804,7 +834,8 @@ export default { ...@@ -804,7 +834,8 @@ export default {
input_name: 'Please enter name', input_name: 'Please enter name',
select_organization: 'Please select organization', select_organization: 'Please select organization',
search_by_name: 'Search by name', search_by_name: 'Search by name',
special_characters_are_not_supported: 'Format error (special characters are not supported and cannot start and end with \'-\')', special_characters_are_not_supported:
"Format error (special characters are not supported and cannot start and end with '-')",
select: 'Select organization', select: 'Select organization',
member: 'Member', member: 'Member',
organization: 'Organization', organization: 'Organization',
...@@ -813,13 +844,15 @@ export default { ...@@ -813,13 +844,15 @@ export default {
move_success: 'Removed successfully', move_success: 'Removed successfully',
user: 'user', user: 'user',
add_organization: 'Add organization', add_organization: 'Add organization',
default_organization_cannot_move: 'The default organization cannot be deleted', default_organization_cannot_move:
'The default organization cannot be deleted',
organization_name: 'Organization name', organization_name: 'Organization name',
input_organization_name: 'Please enter the organization name', input_organization_name: 'Please enter the organization name',
relate_top_organization: 'Associated parent organization', relate_top_organization: 'Associated parent organization',
organization_name_exist: 'Organization name already exists', organization_name_exist: 'Organization name already exists',
cannot_delete: 'Cannot delete', cannot_delete: 'Cannot delete',
remove_user_first: 'Please remove all users and child nodes in the organization before deleting the organization', remove_user_first:
'Please remove all users and child nodes in the organization before deleting the organization',
sure_delete_organization: 'Are you sure to delete this organization?', sure_delete_organization: 'Are you sure to delete this organization?',
add_child_org: 'Add sub organization', add_child_org: 'Add sub organization',
edite_organization: 'Edit organization' edite_organization: 'Edit organization'
...@@ -831,7 +864,8 @@ export default { ...@@ -831,7 +864,8 @@ export default {
test_connection: 'Test connection', test_connection: 'Test connection',
SMTP_host: 'SMTP Host', SMTP_host: 'SMTP Host',
basic_setting: 'Basic Setting', basic_setting: 'Basic Setting',
front_time_out: 'Request timeOut(unit: second, Attention: Refresh browser takes effect after saving)', front_time_out:
'Request timeOut(unit: second, Attention: Refresh browser takes effect after saving)',
msg_time_out: 'Message retention time(unit: day)', msg_time_out: 'Message retention time(unit: day)',
login_type: 'Default login type', login_type: 'Default login type',
empty_front: 'If empty then default value is 100s', empty_front: 'If empty then default value is 100s',
...@@ -878,7 +912,8 @@ export default { ...@@ -878,7 +912,8 @@ export default {
the_subject_name: 'Please enter the subject name', the_subject_name: 'Please enter the subject name',
name_already_exists: 'The subject name already exists', name_already_exists: 'The subject name already exists',
successfully_and_apply: 'Save successfully and apply', successfully_and_apply: 'Save successfully and apply',
sure_to_exit: 'The information you filled in has not been saved. Are you sure to exit?', sure_to_exit:
'The information you filled in has not been saved. Are you sure to exit?',
copy_theme: 'Copy theme', copy_theme: 'Copy theme',
advanced_configuration: 'Advanced configuration', advanced_configuration: 'Advanced configuration',
no_custom_theme: 'No custom theme', no_custom_theme: 'No custom theme',
...@@ -893,15 +928,23 @@ export default { ...@@ -893,15 +928,23 @@ export default {
to_enable_tsl: 'If the SMTP port is 587, you usually need to enable TSL', to_enable_tsl: 'If the SMTP port is 587, you usually need to enable TSL',
to_enable_ssl: 'If the SMTP port is 465, you usually need to enable SSL', to_enable_ssl: 'If the SMTP port is 465, you usually need to enable SSL',
added_successfully: 'Added successfully', added_successfully: 'Added successfully',
text_link_etc: 'Applicable scenarios: call to action, selected status, information highlight, general prompt information, text link, etc', text_link_etc:
'Applicable scenarios: call to action, selected status, information highlight, general prompt information, text link, etc',
prompt_and_icon: 'Applicable scenario: success status prompt and Icon', prompt_and_icon: 'Applicable scenario: success status prompt and Icon',
prompt_and_icon_danger: 'Applicable scenario: warning status prompt and Icon', prompt_and_icon_danger:
icon_danger_button: 'Applicable scenario: error status prompt and icon, danger button', 'Applicable scenario: warning status prompt and Icon',
first_level_icon: 'Applicable scenario: first level title, first level text, important information display, first level Icon', icon_danger_button:
copy_secondary_icon: 'Applicable scenario: secondary title, secondary copy, secondary Icon', 'Applicable scenario: error status prompt and icon, danger button',
radio_checkbox_unchecked: 'Applicable scenario: input box guide, auxiliary copy, prompt copy, three-level icon, radio, checkbox unchecked', first_level_icon:
button_background_color: 'Applicable scenario: disable copy, disable icon, disable button background color', 'Applicable scenario: first level title, first level text, important information display, first level Icon',
background_header_background: 'Applicable scenario: page background, header background', copy_secondary_icon:
'Applicable scenario: secondary title, secondary copy, secondary Icon',
radio_checkbox_unchecked:
'Applicable scenario: input box guide, auxiliary copy, prompt copy, three-level icon, radio, checkbox unchecked',
button_background_color:
'Applicable scenario: disable copy, disable icon, disable button background color',
background_header_background:
'Applicable scenario: page background, header background',
scenario_component_stroking: 'Applicable scenario: component stroking', scenario_component_stroking: 'Applicable scenario: component stroking',
main_background: 'Main background', main_background: 'Main background',
content_background: 'Content background', content_background: 'Content background',
...@@ -921,13 +964,16 @@ export default { ...@@ -921,13 +964,16 @@ export default {
search_keywords: 'Search keywords:', search_keywords: 'Search keywords:',
delete_this_topic: 'Are you sure to delete this topic?', delete_this_topic: 'Are you sure to delete this topic?',
network_error: 'network error', network_error: 'network error',
to_overwrite_them: 'There are templates with the same name in the current classification. Do you want to overwrite them?', to_overwrite_them:
'There are templates with the same name in the current classification. Do you want to overwrite them?',
import_succeeded: 'Import succeeded', import_succeeded: 'Import succeeded',
name_already_exists_type: 'Classification name already exists', name_already_exists_type: 'Classification name already exists',
rename_succeeded: 'Rename succeeded', rename_succeeded: 'Rename succeeded',
the_same_category: 'The template name already exists under the same category', the_same_category:
'The template name already exists under the same category',
delete_this_template: 'Are you sure to delete this template?', delete_this_template: 'Are you sure to delete this template?',
also_be_deleted: 'After deletion, all templates in this category will also be deleted.', also_be_deleted:
'After deletion, all templates in this category will also be deleted.',
delete_this_category: 'Are you sure to delete this category?', delete_this_category: 'Are you sure to delete this category?',
edit_template: 'Edit template', edit_template: 'Edit template',
edit_classification: 'Edit classification', edit_classification: 'Edit classification',
...@@ -939,7 +985,8 @@ export default { ...@@ -939,7 +985,8 @@ export default {
chart: { chart: {
empty_hide: 'hide empty', empty_hide: 'hide empty',
hide: 'hide', hide: 'hide',
chart_refresh_tips: 'View refresh setting takes precedence over panel refresh setting', chart_refresh_tips:
'View refresh setting takes precedence over panel refresh setting',
'1-trend': 'trend', '1-trend': 'trend',
'2-state': 'State', '2-state': 'State',
'3-rank': 'Rank', '3-rank': 'Rank',
...@@ -961,14 +1008,16 @@ export default { ...@@ -961,14 +1008,16 @@ export default {
solid_color: 'Solid color', solid_color: 'Solid color',
split_gradient: 'Split gradient', split_gradient: 'Split gradient',
continuous_gradient: 'Continuous gradient', continuous_gradient: 'Continuous gradient',
map_center_lost: 'The graph is missing the centroid or center attribute, please complete it and try again', map_center_lost:
'The graph is missing the centroid or center attribute, please complete it and try again',
margin_model: 'Model', margin_model: 'Model',
margin_model_auto: 'Auto', margin_model_auto: 'Auto',
margin_model_absolute: 'Absolute', margin_model_absolute: 'Absolute',
margin_model_relative: 'Relative', margin_model_relative: 'Relative',
margin_placeholder: 'Please enter a number from 0-100', margin_placeholder: 'Please enter a number from 0-100',
margin_absolute_placeholder: 'Please enter a number from 0-40', margin_absolute_placeholder: 'Please enter a number from 0-40',
rich_text_view_result_tips: 'The rich text view selects only the first result', rich_text_view_result_tips:
'The rich text view selects only the first result',
rich_text_view: 'Rich Text View', rich_text_view: 'Rich Text View',
view_reset: 'View Reset', view_reset: 'View Reset',
view_reset_tips: 'Discard Changes To View?', view_reset_tips: 'Discard Changes To View?',
...@@ -1097,7 +1146,8 @@ export default { ...@@ -1097,7 +1146,8 @@ export default {
tooltip: 'Tips', tooltip: 'Tips',
tooltip_item: 'Data Item', tooltip_item: 'Data Item',
tooltip_axis: 'Coordinate Axis', tooltip_axis: 'Coordinate Axis',
formatter_plc: 'When the content format is empty, the default format is displayed', formatter_plc:
'When the content format is empty, the default format is displayed',
xAxis: 'Horizontal axis', xAxis: 'Horizontal axis',
yAxis: 'Longitudinal axis', yAxis: 'Longitudinal axis',
position: 'Position', position: 'Position',
...@@ -1222,7 +1272,8 @@ export default { ...@@ -1222,7 +1272,8 @@ export default {
text_style: 'Font Style', text_style: 'Font Style',
bolder: 'Bolder', bolder: 'Bolder',
change_ds: 'Change Dataset', change_ds: 'Change Dataset',
change_ds_tip: 'Tips:Change Dataset will change fields,you need rebuild chart', change_ds_tip:
'Tips:Change Dataset will change fields,you need rebuild chart',
axis_name_color: 'Name Color', axis_name_color: 'Name Color',
axis_name_fontsize: 'Name Fontsize', axis_name_fontsize: 'Name Fontsize',
pie_label_line_show: 'Line', pie_label_line_show: 'Line',
...@@ -1377,7 +1428,8 @@ export default { ...@@ -1377,7 +1428,8 @@ export default {
chart_heat_map: 'Heat Map', chart_heat_map: 'Heat Map',
chart_3d_column_chart_map: '3D Column Chart Map', chart_3d_column_chart_map: '3D Column Chart Map',
table_pivot_row: 'Data Row', table_pivot_row: 'Data Row',
field_error_tips: 'This field is changed(Include dimension、quota,field type,deleted),please edit again.', field_error_tips:
'This field is changed(Include dimension、quota,field type,deleted),please edit again.',
mark_field_error: 'The current field does not exist, please select again', mark_field_error: 'The current field does not exist, please select again',
table_border_color: 'Border Color', table_border_color: 'Border Color',
table_header_align: 'Header Align', table_header_align: 'Header Align',
...@@ -1396,7 +1448,8 @@ export default { ...@@ -1396,7 +1448,8 @@ export default {
slider_bg: 'Background', slider_bg: 'Background',
slider_fill_bg: 'Selected Background', slider_fill_bg: 'Selected Background',
slider_text_color: 'Font Color', slider_text_color: 'Font Color',
chart_no_senior: 'This chart type not support senior config,please look forward to.', chart_no_senior:
'This chart type not support senior config,please look forward to.',
chart_no_properties: 'This chart type not support properties config.', chart_no_properties: 'This chart type not support properties config.',
assist_line: 'Assist Line', assist_line: 'Assist Line',
field_fixed: 'Fixed', field_fixed: 'Fixed',
...@@ -1460,7 +1513,8 @@ export default { ...@@ -1460,7 +1513,8 @@ export default {
textColor: 'Text Color', textColor: 'Text Color',
backgroundColor: 'Background Color', backgroundColor: 'Background Color',
field_can_not_empty: 'Field can not empty', field_can_not_empty: 'Field can not empty',
conditions_can_not_empty: 'Conditions can not be empty,if unnecessary,please delete the field', conditions_can_not_empty:
'Conditions can not be empty,if unnecessary,please delete the field',
remark: 'Remark', remark: 'Remark',
remark_edit: 'Edit Remark', remark_edit: 'Edit Remark',
remark_bg_color: 'Background Fill', remark_bg_color: 'Background Fill',
...@@ -1471,7 +1525,8 @@ export default { ...@@ -1471,7 +1525,8 @@ export default {
dimension_text_style: 'Name Style', dimension_text_style: 'Name Style',
dimension_letter_space: 'Name Letter Space', dimension_letter_space: 'Name Letter Space',
font_family: 'Font Family', font_family: 'Font Family',
font_family_tip: 'The font will only take effect if it is installed on the operating system', font_family_tip:
'The font will only take effect if it is installed on the operating system',
letter_space: 'Letter Space', letter_space: 'Letter Space',
font_shadow: 'Font Shadow', font_shadow: 'Font Shadow',
chart_area: 'Area', chart_area: 'Area',
...@@ -1505,10 +1560,13 @@ export default { ...@@ -1505,10 +1560,13 @@ export default {
break_line: 'Keep', break_line: 'Keep',
set_zero: 'Set Zero', set_zero: 'Set Zero',
ignore_data: 'Hide Data', ignore_data: 'Hide Data',
sub_dimension_tip: 'This field is required, and cannot be included in the type axis, you should choose non-group chart if you don\'t need it, or you will get unexpected chart.', sub_dimension_tip:
"This field is required, and cannot be included in the type axis, you should choose non-group chart if you don't need it, or you will get unexpected chart.",
drill_dimension_tip: 'Only fields in the dataset can be drilled', drill_dimension_tip: 'Only fields in the dataset can be drilled',
table_scroll_tip: 'The detail table is only effective when the pagination mode is "Drop-down".', table_scroll_tip:
table_threshold_tip: 'Tip: Do not select fields repeatedly. If the same field is configured repeatedly, only the last field will take effect.', 'The detail table is only effective when the pagination mode is "Drop-down".',
table_threshold_tip:
'Tip: Do not select fields repeatedly. If the same field is configured repeatedly, only the last field will take effect.',
table_column_width_tip: `Column width do not always work.<br/> table_column_width_tip: `Column width do not always work.<br/>
The priority of the container width is higher than the column width, <br/> The priority of the container width is higher than the column width, <br/>
which means if the result of dividing the width of the table container by the number of columns is greater than specified column width, <br/> which means if the result of dividing the width of the table container by the number of columns is greater than specified column width, <br/>
...@@ -1516,9 +1574,11 @@ export default { ...@@ -1516,9 +1574,11 @@ export default {
reference_field_tip: `Reference fields start with "[" and end with "]". <br/> reference_field_tip: `Reference fields start with "[" and end with "]". <br/>
Do not modify the reference content, otherwise the reference will fail.<br/> Do not modify the reference content, otherwise the reference will fail.<br/>
If you enter content in the same format as the reference field, it will be treated as a reference field.`, If you enter content in the same format as the reference field, it will be treated as a reference field.`,
scatter_tip: 'When this indicator is in effect, the bubble size attribute in the style size will be invalid', scatter_tip:
'When this indicator is in effect, the bubble size attribute in the style size will be invalid',
place_name_mapping: 'Place name mapping', place_name_mapping: 'Place name mapping',
axis_tip: 'The minimum value, maximum value, and interval are all numeric types; it will be regarded as automatic if left blank.<br/>Please make sure that the filled values can be calculated correctly, otherwise the axis values will not be displayed normally.', axis_tip:
'The minimum value, maximum value, and interval are all numeric types; it will be regarded as automatic if left blank.<br/>Please make sure that the filled values can be calculated correctly, otherwise the axis values will not be displayed normally.',
format_tip: `The template variables include {a}, {b}, {c}, {d}, which represent series name, data name, data value, etc. respectively.<br> format_tip: `The template variables include {a}, {b}, {c}, {d}, which represent series name, data name, data value, etc. respectively.<br>
When the trigger position is 'coordinate axis', there will be multiple series of data. At this time, the index of the series can be represented by {a0}, {a1}, {a2} followed by an index.<br> When the trigger position is 'coordinate axis', there will be multiple series of data. At this time, the index of the series can be represented by {a0}, {a1}, {a2} followed by an index.<br>
{a}, {b}, {c}, {d} have different meanings under different graph types. Among them, variables {a}, {b}, {c}, {d} represent data meanings in different chart types:<br><br> {a}, {b}, {c}, {d} have different meanings under different graph types. Among them, variables {a}, {b}, {c}, {d} represent data meanings in different chart types:<br><br>
...@@ -1534,7 +1594,8 @@ export default { ...@@ -1534,7 +1594,8 @@ export default {
p_bottom: 'Bottom', p_bottom: 'Bottom',
p_center: 'Center', p_center: 'Center',
table_auto_break_line: 'Auto Line Feed', table_auto_break_line: 'Auto Line Feed',
table_break_line_tip: 'If open this option,the table item height will disabled.', table_break_line_tip:
'If open this option,the table item height will disabled.',
step: 'Step(px)', step: 'Step(px)',
no_function: 'Function not enter,please input.', no_function: 'Function not enter,please input.',
chart_flow_map: 'Flow Map', chart_flow_map: 'Flow Map',
...@@ -1586,9 +1647,12 @@ export default { ...@@ -1586,9 +1647,12 @@ export default {
sql_result: 'Result', sql_result: 'Result',
parse_filed: 'Parse Field', parse_filed: 'Parse Field',
field_rename: 'Rename Field', field_rename: 'Rename Field',
params_work: 'Effective only when editing: parameter values are effective only when editing data sets; Global Effective: It takes effect in dataset view, preview, and view where dataset is used.', params_work:
sql_variable_limit_1: '1、SQL variables can only be used in where conditions', 'Effective only when editing: parameter values are effective only when editing data sets; Global Effective: It takes effect in dataset view, preview, and view where dataset is used.',
sql_variable_limit_2: '2、Example:select * from table_name where column_name1=\'${param_name1}\' and column_name2 in ${param_name2}', sql_variable_limit_1:
'1、SQL variables can only be used in where conditions',
sql_variable_limit_2:
"2、Example:select * from table_name where column_name1='${param_name1}' and column_name2 in ${param_name2}",
select_year: 'Select Year', select_year: 'Select Year',
select_month: 'Select Month', select_month: 'Select Month',
select_date: 'Select Date', select_date: 'Select Date',
...@@ -1598,7 +1662,8 @@ export default { ...@@ -1598,7 +1662,8 @@ export default {
time_year_month_day: 'Date-YearMonthDay', time_year_month_day: 'Date-YearMonthDay',
time_all: 'TIme', time_all: 'TIme',
dataset_sync: ' ( Data sync... )', dataset_sync: ' ( Data sync... )',
sheet_warn: 'There are multiple sheet pages, and the first one is extracted by default', sheet_warn:
'There are multiple sheet pages, and the first one is extracted by default',
datalist: 'Data Set', datalist: 'Data Set',
name: 'DataSet Name', name: 'DataSet Name',
add_group: 'Add Group', add_group: 'Add Group',
...@@ -1610,7 +1675,8 @@ export default { ...@@ -1610,7 +1675,8 @@ export default {
rename: 'Rename', rename: 'Rename',
tips: 'Tips', tips: 'Tips',
confirm_delete: 'confirm_delete', confirm_delete: 'confirm_delete',
confirm_delete_msg: 'Deleting a dataset will affect its related user-defined dataset, associated dataset and dashboard. Confirm the delete?', confirm_delete_msg:
'Deleting a dataset will affect its related user-defined dataset, associated dataset and dashboard. Confirm the delete?',
delete_success: 'delete_success', delete_success: 'delete_success',
confirm: 'confirm', confirm: 'confirm',
cancel: 'cancel', cancel: 'cancel',
...@@ -1709,13 +1775,15 @@ export default { ...@@ -1709,13 +1775,15 @@ export default {
pls_setting_union_success: 'Please set the relationship correctly', pls_setting_union_success: 'Please set the relationship correctly',
invalid_dataset: 'Kettle is not running, invalid dataset', invalid_dataset: 'Kettle is not running, invalid dataset',
check_all: 'Select all', check_all: 'Select all',
can_not_union_self: 'The associated table cannot be the same as the associated table', can_not_union_self:
'The associated table cannot be the same as the associated table',
float: 'Decimal', float: 'Decimal',
edit_custom_table: 'Edit self help dataset', edit_custom_table: 'Edit self help dataset',
edit_field: 'Edit Field', edit_field: 'Edit Field',
preview_100_data: 'Show 100 lines data', preview_100_data: 'Show 100 lines data',
invalid_table_check: 'Please sync data first.', invalid_table_check: 'Please sync data first.',
parse_error: 'Parse failed,please check.Reference:https://dataease.io/docs/user_manual/dataset_configuration/dataset_Excel', parse_error:
'Parse failed,please check.Reference:https://dataease.io/docs/user_manual/dataset_configuration/dataset_Excel',
origin_field_type: 'Field Origin Type', origin_field_type: 'Field Origin Type',
edit_excel_table: 'Edit Excel Dataset', edit_excel_table: 'Edit Excel Dataset',
edit_excel: 'Edit Excel', edit_excel: 'Edit Excel',
...@@ -1745,7 +1813,8 @@ export default { ...@@ -1745,7 +1813,8 @@ export default {
pending: 'Pause', pending: 'Pause',
confirm_exec: 'Manual trigger execution?', confirm_exec: 'Manual trigger execution?',
change_success: 'State switch successful', change_success: 'State switch successful',
excel_replace_msg: 'Calculation fields, custom datasets, associated datasets, dashboards, etc. may be affected. Confirm the replacement?', excel_replace_msg:
'Calculation fields, custom datasets, associated datasets, dashboards, etc. may be affected. Confirm the replacement?',
effect_ext_field: 'Affect calculated fields' effect_ext_field: 'Affect calculated fields'
}, },
field_group_type: 'Type', field_group_type: 'Type',
...@@ -1770,15 +1839,18 @@ export default { ...@@ -1770,15 +1839,18 @@ export default {
ple_select_excel: 'Please select excel file to import', ple_select_excel: 'Please select excel file to import',
merge: 'Merge', merge: 'Merge',
no_merge: 'Dont Merge', no_merge: 'Dont Merge',
merge_msg: 'If the fields in the data table are consistent, merge them into one data set?', merge_msg:
'If the fields in the data table are consistent, merge them into one data set?',
merge_title: 'Merge data', merge_title: 'Merge data',
field_name_less_50: 'Field name can not more 50 chars.', field_name_less_50: 'Field name can not more 50 chars.',
excel_info_1: '1、Merged cells cannot exist in the Excel file;', excel_info_1: '1、Merged cells cannot exist in the Excel file;',
excel_info_2: '2、The first line of the Excel file is the title line, which cannot be empty or date;', excel_info_2:
'2、The first line of the Excel file is the title line, which cannot be empty or date;',
excel_info_3: '3、The file size shall not exceed 500m。', excel_info_3: '3、The file size shall not exceed 500m。',
sync_field: 'Sync Field', sync_field: 'Sync Field',
confirm_sync_field: 'Confirm Sync', confirm_sync_field: 'Confirm Sync',
confirm_sync_field_tips: 'Sync field maybe change edit field,please confirm', confirm_sync_field_tips:
'Sync field maybe change edit field,please confirm',
sync_success: 'Success', sync_success: 'Success',
sync_success_1: 'Success,please sync data again', sync_success_1: 'Success,please sync data again',
row_permission: { row_permission: {
...@@ -1869,7 +1941,8 @@ export default { ...@@ -1869,7 +1941,8 @@ export default {
data_source_table: 'Data Source Table', data_source_table: 'Data Source Table',
auth_method: 'Auth method', auth_method: 'Auth method',
passwd: 'UserName Password', passwd: 'UserName Password',
kerbers_info: 'Please make sure krb5 Conf, KeyTab key, added to path: /opt/dataease/conf', kerbers_info:
'Please make sure krb5 Conf, KeyTab key, added to path: /opt/dataease/conf',
client_principal: 'Client Principal', client_principal: 'Client Principal',
keytab_Key_path: 'Keytab Key Path', keytab_Key_path: 'Keytab Key Path',
datasource: 'Data Source', datasource: 'Data Source',
...@@ -1888,7 +1961,8 @@ export default { ...@@ -1888,7 +1961,8 @@ export default {
http_port: 'Http Port', http_port: 'Http Port',
port: 'Port', port: 'Port',
datasource_url: 'URL address', datasource_url: 'URL address',
please_input_datasource_url: 'Please enter Elasticsearch URL address,e.g: http://es_host:es_port', please_input_datasource_url:
'Please enter Elasticsearch URL address,e.g: http://es_host:es_port',
please_input_data_base: 'Please enter the database name', please_input_data_base: 'Please enter the database name',
please_select_oracle_type: 'Select connection type', please_select_oracle_type: 'Select connection type',
please_input_user_name: 'Please enter user name', please_input_user_name: 'Please enter user name',
...@@ -1916,8 +1990,10 @@ export default { ...@@ -1916,8 +1990,10 @@ export default {
targetCharset: 'Target Charset', targetCharset: 'Target Charset',
please_choose_targetCharset: 'Please select target charset', please_choose_targetCharset: 'Please select target charset',
please_choose_charset: 'Please select charset', please_choose_charset: 'Please select charset',
edit_datasource_msg: 'Modifying the data source information may make the data set under the modified data source unavailable. Confirm the modification?', edit_datasource_msg:
repeat_datasource_msg: 'Data source information with the same configuration already exists, ', 'Modifying the data source information may make the data set under the modified data source unavailable. Confirm the modification?',
repeat_datasource_msg:
'Data source information with the same configuration already exists, ',
confirm_save: 'Confirm save?', confirm_save: 'Confirm save?',
in_valid: 'Invalid datasource', in_valid: 'Invalid datasource',
initial_pool_size: 'Initial connections', initial_pool_size: 'Initial connections',
...@@ -1930,13 +2006,17 @@ export default { ...@@ -1930,13 +2006,17 @@ export default {
please_input_replication_num: 'Please enter Replication number', please_input_replication_num: 'Please enter Replication number',
acquire_increment: 'Growth number', acquire_increment: 'Growth number',
connect_timeout: 'Connection timeout (seconds)', connect_timeout: 'Connection timeout (seconds)',
please_input_initial_pool_size: 'Please enter the number of initial connections', please_input_initial_pool_size:
please_input_min_pool_size: 'Please enter the minimum number of connections', 'Please enter the number of initial connections',
please_input_max_pool_size: 'Please enter the maximum number of connections', please_input_min_pool_size:
'Please enter the minimum number of connections',
please_input_max_pool_size:
'Please enter the maximum number of connections',
please_input_max_idle_time: 'Please enter the maximum idle (seconds)', please_input_max_idle_time: 'Please enter the maximum idle (seconds)',
please_input_acquire_increment: 'Please enter the growth number', please_input_acquire_increment: 'Please enter the growth number',
please_input_query_timeout: 'Please enter query timeout', please_input_query_timeout: 'Please enter query timeout',
please_input_connect_timeout: 'Please enter the connection timeout (seconds)', please_input_connect_timeout:
'Please enter the connection timeout (seconds)',
no_less_then_0: 'Parameters in advanced settings cannot be less than zero', no_less_then_0: 'Parameters in advanced settings cannot be less than zero',
port_no_less_then_0: 'Port cannot be less than zero', port_no_less_then_0: 'Port cannot be less than zero',
priority: 'Advanced setting', priority: 'Advanced setting',
...@@ -1963,7 +2043,8 @@ export default { ...@@ -1963,7 +2043,8 @@ export default {
req_param: 'Request parameters', req_param: 'Request parameters',
headers: 'Request header', headers: 'Request header',
query_param: 'QUERY param', query_param: 'QUERY param',
query_info: 'Follow in the address bar? The following parameters, such as: updateAPI? id=112', query_info:
'Follow in the address bar? The following parameters, such as: updateAPI? id=112',
key: 'Key', key: 'Key',
value: 'Value', value: 'Value',
data_path: 'Extract data', data_path: 'Extract data',
...@@ -1981,7 +2062,8 @@ export default { ...@@ -1981,7 +2062,8 @@ export default {
username: 'Username', username: 'Username',
api_table_not_empty: 'API data table cannot be empty', api_table_not_empty: 'API data table cannot be empty',
has_repeat_name: 'Duplicate API data table name', has_repeat_name: 'Duplicate API data table name',
has_repeat_field_name: 'The field name is duplicate, please modify it before selecting', has_repeat_field_name:
'The field name is duplicate, please modify it before selecting',
api_field_not_empty: 'Field cannot be empty', api_field_not_empty: 'Field cannot be empty',
success_copy: 'Copy succeeded', success_copy: 'Copy succeeded',
valid: 'Valid', valid: 'Valid',
...@@ -2010,8 +2092,10 @@ export default { ...@@ -2010,8 +2092,10 @@ export default {
other: 'other', other: 'other',
this_data_source: 'Are you sure to delete this data source?', this_data_source: 'Are you sure to delete this data source?',
delete_this_dataset: 'Are you sure to delete this dataset?', delete_this_dataset: 'Are you sure to delete this dataset?',
cannot_be_deleted_dataset: 'This dataset has the following blood relationship. Deleting it will cause the view of related dashboard to be invalid. Are you sure to delete it?', cannot_be_deleted_dataset:
cannot_be_deleted_datasource: 'This datasource has the following blood relationship. Deleting it will cause the view of related dashboard to be invalid. Are you sure to delete it?', 'This dataset has the following blood relationship. Deleting it will cause the view of related dashboard to be invalid. Are you sure to delete it?',
cannot_be_deleted_datasource:
'This datasource has the following blood relationship. Deleting it will cause the view of related dashboard to be invalid. Are you sure to delete it?',
edit_folder: 'Edit Folder', edit_folder: 'Edit Folder',
click_to_check: 'Click to check the blood relationship', click_to_check: 'Click to check the blood relationship',
delete_this_item: 'Do you want to delete this item?', delete_this_item: 'Do you want to delete this item?',
...@@ -2035,7 +2119,8 @@ export default { ...@@ -2035,7 +2119,8 @@ export default {
view_style: 'View Style', view_style: 'View Style',
view_color_setting: 'View Color Setting', view_color_setting: 'View Color Setting',
border_color_setting: 'Border Color', border_color_setting: 'Border Color',
unpublished_tips: 'After unpublishing, the panel cannot be viewed. Are you sure you want to cancel publishing? ', unpublished_tips:
'After unpublishing, the panel cannot be viewed. Are you sure you want to cancel publishing? ',
position_adjust_component: 'Position adjust', position_adjust_component: 'Position adjust',
active_font_size: 'Selected font size', active_font_size: 'Selected font size',
carousel: 'Carousel', carousel: 'Carousel',
...@@ -2065,12 +2150,15 @@ export default { ...@@ -2065,12 +2150,15 @@ export default {
image_size_tips: 'Please do not exceed 15M in the picture', image_size_tips: 'Please do not exceed 15M in the picture',
image_add_tips: 'Only pictures can be inserted', image_add_tips: 'Only pictures can be inserted',
watermark: 'Watermark', watermark: 'Watermark',
panel_get_data_error: 'Failed to obtain panel information. The panel may have been deleted. Please check the panel status', panel_get_data_error:
'Failed to obtain panel information. The panel may have been deleted. Please check the panel status',
panel_no_save_tips: 'There are unsaved panel', panel_no_save_tips: 'There are unsaved panel',
panel_cache_use_tips: 'It was checked that the last dashboard could not be saved normally. Do you want to use the panel that was not saved last time?', panel_cache_use_tips:
template_name_tips: 'Panel\'s name should not be null', 'It was checked that the last dashboard could not be saved normally. Do you want to use the panel that was not saved last time?',
template_name_tips: "Panel's name should not be null",
panel_background_item: 'Customize panel background', panel_background_item: 'Customize panel background',
panel_background_image_tips: 'Currently.Jpeg,.Jpg,.Png,.Gif files are supported, and the size should not exceed 15m', panel_background_image_tips:
'Currently.Jpeg,.Jpg,.Png,.Gif files are supported, and the size should not exceed 15m',
reUpload: 'reUpload', reUpload: 'reUpload',
create_by: 'Create By', create_by: 'Create By',
create_time: 'Create Time', create_time: 'Create Time',
...@@ -2083,7 +2171,8 @@ export default { ...@@ -2083,7 +2171,8 @@ export default {
template_preview: 'Template Preview', template_preview: 'Template Preview',
apply: 'Apply', apply: 'Apply',
apply_this_template: 'Apply This Template', apply_this_template: 'Apply This Template',
market_network_tips: 'View template Market template requires server and template Market( https://dataease.io/templates ), please check the network... ', market_network_tips:
'View template Market template requires server and template Market( https://dataease.io/templates ), please check the network... ',
enter_name_tips: 'Please enter the name of the panel', enter_name_tips: 'Please enter the name of the panel',
name: 'Name', name: 'Name',
apply_template: 'Apply Template', apply_template: 'Apply Template',
...@@ -2100,9 +2189,11 @@ export default { ...@@ -2100,9 +2189,11 @@ export default {
data_format: 'Data Format', data_format: 'Data Format',
border_color: 'Border Color', border_color: 'Border Color',
theme_change_warn: 'Subject Change', theme_change_warn: 'Subject Change',
theme_change_tips: 'Changing the theme will overwrite the view related theme attributes. It is recommended to back up in advance. Do you want to continue the replacement?', theme_change_tips:
'Changing the theme will overwrite the view related theme attributes. It is recommended to back up in advance. Do you want to continue the replacement?',
theme_color_change_warn: 'Theme Color Change', theme_color_change_warn: 'Theme Color Change',
theme_color_change_tips: 'Theme Color change will overwrite the original view properties', theme_color_change_tips:
'Theme Color change will overwrite the original view properties',
theme_color: 'Theme Color', theme_color: 'Theme Color',
theme_color_dark: 'Dark', theme_color_dark: 'Dark',
theme_color_light: 'Light', theme_color_light: 'Light',
...@@ -2126,25 +2217,29 @@ export default { ...@@ -2126,25 +2217,29 @@ export default {
live_tips: 'User Https First', live_tips: 'User Https First',
stream_media_add_tips: 'And Add Stream Media Info...', stream_media_add_tips: 'And Add Stream Media Info...',
stream_mobile_tips: 'IOS terminal may not display', stream_mobile_tips: 'IOS terminal may not display',
json_params_error: 'Third Party Parameters Parsing Failed. Please Check Whether The Parameters Format Is Correct', json_params_error:
'Third Party Parameters Parsing Failed. Please Check Whether The Parameters Format Is Correct',
inner_padding: 'Inner Padding', inner_padding: 'Inner Padding',
board_radio: 'Board Radio', board_radio: 'Board Radio',
background: 'Background', background: 'Background',
component_style: 'Component Style', component_style: 'Component Style',
web_set_tips: 'Some Websites Cannot Be Displayed Because Of Not Allow Embedded ', web_set_tips:
'Some Websites Cannot Be Displayed Because Of Not Allow Embedded ',
repeat_params: 'Repeat Params Exist', repeat_params: 'Repeat Params Exist',
enable_outer_param_set: 'Enable Outer Param Set', enable_outer_param_set: 'Enable Outer Param Set',
select_param: 'Please Select Param...', select_param: 'Please Select Param...',
add_param_link_field: 'Add Params\' Linked Field', add_param_link_field: "Add Params' Linked Field",
add_param: 'Add Param', add_param: 'Add Param',
enable_param: 'Enable Param', enable_param: 'Enable Param',
param_name: 'Param Name', param_name: 'Param Name',
outer_param_set: 'Outer Param Set', outer_param_set: 'Outer Param Set',
outer_param_decode_error: 'External Parameter Parsing Error And Does Not Take Effect, Please Check', outer_param_decode_error:
input_param_name: 'Please Input Param\'s Name', 'External Parameter Parsing Error And Does Not Take Effect, Please Check',
input_param_name: "Please Input Param's Name",
params_setting: 'Outer Params Setting', params_setting: 'Outer Params Setting',
template_view_tips: 'Template\'s Views. Please Change', template_view_tips: "Template's Views. Please Change",
edit_web_tips: 'The Inner Event Can Be Used When Then Panel Not In Edit Status', edit_web_tips:
'The Inner Event Can Be Used When Then Panel Not In Edit Status',
no_auth_role: 'Unshared roles', no_auth_role: 'Unshared roles',
auth_role: 'Shared roles', auth_role: 'Shared roles',
picture_limit: 'Only pictures can be inserted', picture_limit: 'Only pictures can be inserted',
...@@ -2158,7 +2253,8 @@ export default { ...@@ -2158,7 +2253,8 @@ export default {
link_share: 'Share Link', link_share: 'Share Link',
over_time: 'Over time', over_time: 'Over time',
link_expire: 'Link is expire', link_expire: 'Link is expire',
link_share_desc: 'After opening the link, anyone can access the dashboard through this link.', link_share_desc:
'After opening the link, anyone can access the dashboard through this link.',
share: 'Share', share: 'Share',
remove_share_confirm: 'Sure removel All share ?', remove_share_confirm: 'Sure removel All share ?',
share_in: 'Share With Me', share_in: 'Share With Me',
...@@ -2301,8 +2397,8 @@ export default { ...@@ -2301,8 +2397,8 @@ export default {
content_style: 'Content Style', content_style: 'Content Style',
canvas_self_adaption: 'Canvas Self Adaption', canvas_self_adaption: 'Canvas Self Adaption',
panel_save_tips: 'Do you want to save the changes you made to.', panel_save_tips: 'Do you want to save the changes you made to.',
panel_save_warn_tips: 'Your changes will be lost if you don\'t save them!', panel_save_warn_tips: "Your changes will be lost if you don't save them!",
do_not_save: 'Don\'t Save', do_not_save: "Don't Save",
save_and_close: 'Save', save_and_close: 'Save',
drill: 'drill', drill: 'drill',
linkage: 'linkage', linkage: 'linkage',
...@@ -2322,9 +2418,11 @@ export default { ...@@ -2322,9 +2418,11 @@ export default {
aided_grid_open: 'Open', aided_grid_open: 'Open',
aided_grid_close: 'Close', aided_grid_close: 'Close',
export_pdf_page: 'Pagination Line', export_pdf_page: 'Pagination Line',
export_pdf_page_remark: 'Only valid for API export dashboard PDF pagination', export_pdf_page_remark:
'Only valid for API export dashboard PDF pagination',
subject_no_edit: 'System Subject Can Not Edit', subject_no_edit: 'System Subject Can Not Edit',
subject_name_not_null: 'Subject Name Can Not Be Null And Less Than 20 charts', subject_name_not_null:
'Subject Name Can Not Be Null And Less Than 20 charts',
is_enable: 'Enable', is_enable: 'Enable',
open_mode: 'Open Model', open_mode: 'Open Model',
new_window: 'New Window', new_window: 'New Window',
...@@ -2363,16 +2461,19 @@ export default { ...@@ -2363,16 +2461,19 @@ export default {
link_add_tips_pre: 'Please click', link_add_tips_pre: 'Please click',
web_add_tips_suf: 'Add Web Url Info...', web_add_tips_suf: 'Add Web Url Info...',
panel_view_result_show: 'View Result', panel_view_result_show: 'View Result',
panel_view_result_tips: 'Chose "Panel" Will Overwrite View`s Result,Range 1~10000', panel_view_result_tips:
'Chose "Panel" Will Overwrite View`s Result,Range 1~10000',
timeout_refresh: 'Timeout,Will Refresh...', timeout_refresh: 'Timeout,Will Refresh...',
mobile_layout: 'Mobile Layout', mobile_layout: 'Mobile Layout',
component_hidden: 'Component Hidden', component_hidden: 'Component Hidden',
public_link_tips: 'Currently in public link mode, the target panel does not have a public link and cannot jump to it', public_link_tips:
'Currently in public link mode, the target panel does not have a public link and cannot jump to it',
input_title: 'Input Title', input_title: 'Input Title',
show_title: 'Title', show_title: 'Title',
default_settings: 'Default Settings', default_settings: 'Default Settings',
choose_background: 'Choose Component Background', choose_background: 'Choose Component Background',
choose_background_tips: 'The component`s own background settings will overwrite the current settings', choose_background_tips:
'The component`s own background settings will overwrite the current settings',
setting_background: 'Set background', setting_background: 'Set background',
setting_jump: 'Jump settings', setting_jump: 'Jump settings',
select_view: 'Please select a view...', select_view: 'Please select a view...',
...@@ -2432,7 +2533,8 @@ export default { ...@@ -2432,7 +2533,8 @@ export default {
defaultHomeLink: 'Default is the system built-in home page', defaultHomeLink: 'Default is the system built-in home page',
showFoot: 'Show login page footer', showFoot: 'Show login page footer',
footContent: 'Foot content', footContent: 'Foot content',
webFormat: 'Please enter the correct URL starting with [https:// or http://]' webFormat:
'Please enter the correct URL starting with [https:// or http://]'
}, },
auth: { auth: {
no_item_selected: 'Please select organization、user or role on the left', no_item_selected: 'Please select organization、user or role on the left',
...@@ -2440,7 +2542,8 @@ export default { ...@@ -2440,7 +2542,8 @@ export default {
search_pre: 'Search by ', search_pre: 'Search by ',
search_suf: ' name', search_suf: ' name',
separate_auth: 'Separate Authorization', separate_auth: 'Separate Authorization',
auth_extent_tips: 'Permissions Inherited From The Following Organizations Or Roles:', auth_extent_tips:
'Permissions Inherited From The Following Organizations Or Roles:',
authConfig: 'Configure Permissions By User', authConfig: 'Configure Permissions By User',
sourceConfig: 'Configure Permissions By Source', sourceConfig: 'Configure Permissions By Source',
authQuickConfig: 'Auth Quick Config', authQuickConfig: 'Auth Quick Config',
...@@ -2478,7 +2581,8 @@ export default { ...@@ -2478,7 +2581,8 @@ export default {
row_permission: 'Row permission rules', row_permission: 'Row permission rules',
enable_row: 'Enable row permissions', enable_row: 'Enable row permissions',
white_list: 'White list', white_list: 'White list',
white_user_not: 'The above permission rules do not take effect for white list users', white_user_not:
'The above permission rules do not take effect for white list users',
organization_or_role: 'Please select an organization or role', organization_or_role: 'Please select an organization or role',
column_permission: 'Column permission rule', column_permission: 'Column permission rule',
enable_column: 'Enable column permissions', enable_column: 'Enable column permissions',
...@@ -2495,7 +2599,8 @@ export default { ...@@ -2495,7 +2599,8 @@ export default {
select_all: 'Select all', select_all: 'Select all',
added: 'Added', added: 'Added',
manual_input: 'Manual input', manual_input: 'Manual input',
please_fill: 'Please fill in one line and add 500 at most. Duplicate options and added options will be automatically filtered when identifying and entering', please_fill:
'Please fill in one line and add 500 at most. Duplicate options and added options will be automatically filtered when identifying and entering',
close: 'close', close: 'close',
add: 'add to', add: 'add to',
sure: 'determine' sure: 'determine'
...@@ -2517,7 +2622,8 @@ export default { ...@@ -2517,7 +2622,8 @@ export default {
remark: 'Remark' remark: 'Remark'
}, },
template: { template: {
exit_same_template_check: 'The Same Name Exists In Now Class. Do You Want To Override It?', exit_same_template_check:
'The Same Name Exists In Now Class. Do You Want To Override It?',
override: 'Override', override: 'Override',
cancel: 'Cancel', cancel: 'Cancel',
confirm_upload: 'Upload Confirm' confirm_upload: 'Upload Confirm'
...@@ -2568,7 +2674,8 @@ export default { ...@@ -2568,7 +2674,8 @@ export default {
}, },
dept: { dept: {
can_not_move_change_sort: 'Cannot move to change sort', can_not_move_change_sort: 'Cannot move to change sort',
can_not_move_parent_to_children: 'Parent organization cannot move to its own child node', can_not_move_parent_to_children:
'Parent organization cannot move to its own child node',
move_success: 'Mobile success', move_success: 'Mobile success',
name_exist_pre: 'already existed organization named [', name_exist_pre: 'already existed organization named [',
name_exist_suf: ']', name_exist_suf: ']',
...@@ -2620,7 +2727,8 @@ export default { ...@@ -2620,7 +2727,8 @@ export default {
auto_trigger: 'Auto Trigger', auto_trigger: 'Auto Trigger',
range: 'Range', range: 'Range',
relative: 'Relation', relative: 'Relation',
auto_trigger_tip: 'Automatically trigger once when entering the preview page', auto_trigger_tip:
'Automatically trigger once when entering the preview page',
range_tip: 'Default association all filter components' range_tip: 'Default association all filter components'
}, },
desresetbutton: { desresetbutton: {
...@@ -2685,7 +2793,6 @@ export default { ...@@ -2685,7 +2793,6 @@ export default {
select_openMode: 'Please select time category', select_openMode: 'Please select time category',
select_time_format: 'Please select time format', select_time_format: 'Please select time format',
select_date_format: 'Please select date format' select_date_format: 'Please select date format'
}, },
xpacktask: { xpacktask: {
add: 'Add task', add: 'Add task',
...@@ -2708,11 +2815,11 @@ export default { ...@@ -2708,11 +2815,11 @@ export default {
stopped: 'Stopped', stopped: 'Stopped',
start: 'Start', start: 'Start',
start_success: 'Start success', start_success: 'Start success',
start_success_but: ', But the task expired, please manually change the end time', start_success_but:
', But the task expired, please manually change the end time',
sure_batch_delete: 'Are you sure you want to delete tasks in bulk?', sure_batch_delete: 'Are you sure you want to delete tasks in bulk?',
pixel_error: 'Pixel only support {800 - 10000} * {500 - 6250}', pixel_error: 'Pixel only support {800 - 10000} * {500 - 6250}',
next_exec_time: 'Next execute time' next_exec_time: 'Next execute time'
}, },
emailtask: { emailtask: {
week_mon: 'Mon', week_mon: 'Mon',
...@@ -2809,11 +2916,15 @@ export default { ...@@ -2809,11 +2916,15 @@ export default {
teaching_video: 'Teaching', teaching_video: 'Teaching',
enterprise_edition: 'Enterprise', enterprise_edition: 'Enterprise',
contact_us: 'Contact Us', contact_us: 'Contact Us',
demo_video_hint: 'How to make a DataEase dashboard in 3 minutes and share it with others', demo_video_hint:
online_document_hint: 'It covers the installation steps, user manuals, tutorials, solutions to common problems, and secondary development of DataEase', 'How to make a DataEase dashboard in 3 minutes and share it with others',
online_document_hint:
'It covers the installation steps, user manuals, tutorials, solutions to common problems, and secondary development of DataEase',
teaching_video_bottom_hint: 'More videos', teaching_video_bottom_hint: 'More videos',
enterprise_edition_hint1: 'Provide enterprise application scenario X-Pack enhancement package', enterprise_edition_hint1:
enterprise_edition_hint2: 'Provide high-level original factory service support', 'Provide enterprise application scenario X-Pack enhancement package',
enterprise_edition_hint2:
'Provide high-level original factory service support',
enterprise_edition_hint3: 'Provide DataEase best practice recommendations', enterprise_edition_hint3: 'Provide DataEase best practice recommendations',
open_source_community: 'Open source community', open_source_community: 'Open source community',
click_show: 'Click To View', click_show: 'Click To View',
...@@ -2867,7 +2978,8 @@ export default { ...@@ -2867,7 +2978,8 @@ export default {
fileplaceholder: 'Please upload the JSON format coordinate file', fileplaceholder: 'Please upload the JSON format coordinate file',
delete_confirm: 'And child nodes will be deleted. Confirm to execute ?', delete_confirm: 'And child nodes will be deleted. Confirm to execute ?',
cur_node: 'Current node', cur_node: 'Current node',
prohibit_prompts: '000 and 156 are the global village and China area code prefixes respectively. Removal is prohibited. Please use other code prefixes!' prohibit_prompts:
'000 and 156 are the global village and China area code prefixes respectively. Removal is prohibited. Please use other code prefixes!'
}, },
map_mapping: { map_mapping: {
map: 'Map', map: 'Map',
...@@ -2875,8 +2987,8 @@ export default { ...@@ -2875,8 +2987,8 @@ export default {
empty: 'Empty', empty: 'Empty',
please_select_map: 'Please select a range of map' please_select_map: 'Please select a range of map'
}, },
'I18N_USER_TEMPLATE_ERROR': 'Template file error', I18N_USER_TEMPLATE_ERROR: 'Template file error',
'i18n_max_user_import_size': 'File size exceeds 10M', i18n_max_user_import_size: 'File size exceeds 10M',
app_template: { app_template: {
move: 'Move', move: 'Move',
move_item: 'Move App', move_item: 'Move App',
...@@ -2894,7 +3006,8 @@ export default { ...@@ -2894,7 +3006,8 @@ export default {
apply_logs: 'Apply logs', apply_logs: 'Apply logs',
app_group_delete_tips: 'Are you sure to delete this application category?', app_group_delete_tips: 'Are you sure to delete this application category?',
app_group_delete_content: 'After deletion, all application templates in this category will also be deleted.', app_group_delete_content:
'After deletion, all application templates in this category will also be deleted.',
panel_position: 'Panel position', panel_position: 'Panel position',
panel_name: 'Panel name', panel_name: 'Panel name',
dataset_group_position: 'Dataset group position', dataset_group_position: 'Dataset group position',
...@@ -2904,8 +3017,10 @@ export default { ...@@ -2904,8 +3017,10 @@ export default {
dataset_group: 'Dataset group', dataset_group: 'Dataset group',
panel: 'Panel', panel: 'Panel',
log_delete_tips: 'Are you sure to delete this application record?', log_delete_tips: 'Are you sure to delete this application record?',
log_resource_delete_tips: 'Delete related resources (irrecoverable after deletion)', log_resource_delete_tips:
file_error_tips: 'The relevant data file is not found. The current file may not be a DataEase application file, or the file may be damaged ', 'Delete related resources (irrecoverable after deletion)',
file_error_tips:
'The relevant data file is not found. The current file may not be a DataEase application file, or the file may be damaged ',
app_export: 'Application export', app_export: 'Application export',
app_version: 'Application version', app_version: 'Application version',
program_version: 'DataEase minimum version', program_version: 'DataEase minimum version',
...@@ -2915,12 +3030,14 @@ export default { ...@@ -2915,12 +3030,14 @@ export default {
logout: { logout: {
oidc_logout_error: 'OIDC failed to exit, do you continue to exit DataEase?', oidc_logout_error: 'OIDC failed to exit, do you continue to exit DataEase?',
cas_logout_error: 'The CAS service is abnormal, please contact the administrator!' cas_logout_error:
'The CAS service is abnormal, please contact the administrator!'
}, },
watermark: { watermark: {
support_params: 'Currently supported parameters:', support_params: 'Currently supported parameters:',
enable: 'Watermark Enable', enable: 'Watermark Enable',
enable_panel_custom: 'Allow the dashboard to open or close the watermark independently', enable_panel_custom:
'Allow the dashboard to open or close the watermark independently',
content: 'Watermark Content', content: 'Watermark Content',
custom_content: 'Custom Content', custom_content: 'Custom Content',
account: 'Account', account: 'Account',
...@@ -2943,6 +3060,18 @@ export default { ...@@ -2943,6 +3060,18 @@ export default {
label: 'Prohibit multi-terminal login!', label: 'Prohibit multi-terminal login!',
confirm_title: 'Forced login will cause other clients to go offline', confirm_title: 'Forced login will cause other clients to go offline',
confirm: 'Whether to force login?', confirm: 'Whether to force login?',
forced_offline: '`The current account is logged in on the client [${ip}],and you have been pushed off the line!`' forced_offline:
'`The current account is logged in on the client [${ip}],and you have been pushed off the line!`'
},
amap: {
layer: 'layer',
layer_type: 'type',
layer_path: 'path',
layer_name: 'name',
theme: 'theme',
light: 'light',
dark: 'dark',
hazardLevel: 'hazardLevel',
center: 'center'
} }
} }
...@@ -406,17 +406,22 @@ export default { ...@@ -406,17 +406,22 @@ export default {
cancel: '取消' cancel: '取消'
}, },
guide: { guide: {
description: '引導頁對於一些第一次進入項目的人很有用,妳可以簡單介紹下項目的功能。本 Demo 是基於', description:
'引導頁對於一些第一次進入項目的人很有用,妳可以簡單介紹下項目的功能。本 Demo 是基於',
button: '打開引導' button: '打開引導'
}, },
components: { components: {
documentation: '文檔', documentation: '文檔',
tinymceTips: '富文本是管理後臺一個核心的功能,但同時又是一個有很多坑的地方。在選擇富文本的過程中我也走了不少的彎路,市面上常見的富文本都基本用過了,最終權衡了一下選擇了Tinymce。更詳細的富文本比較和介紹見', tinymceTips:
dropzoneTips: '由於我司業務有特殊需求,而且要傳七牛 所以沒用第三方,選擇了自己封裝。代碼非常的簡單,具體代碼妳可以在這裏看到 @/components/Dropzone', '富文本是管理後臺一個核心的功能,但同時又是一個有很多坑的地方。在選擇富文本的過程中我也走了不少的彎路,市面上常見的富文本都基本用過了,最終權衡了一下選擇了Tinymce。更詳細的富文本比較和介紹見',
dropzoneTips:
'由於我司業務有特殊需求,而且要傳七牛 所以沒用第三方,選擇了自己封裝。代碼非常的簡單,具體代碼妳可以在這裏看到 @/components/Dropzone',
stickyTips: '當頁面滾動到預設的位置會吸附在頂部', stickyTips: '當頁面滾動到預設的位置會吸附在頂部',
backToTopTips1: '頁面滾動到指定位置會在右下角出現返回頂部按鈕', backToTopTips1: '頁面滾動到指定位置會在右下角出現返回頂部按鈕',
backToTopTips2: '可自定義按鈕的樣式、show/hide、出現的高度、返回的位置 如需文字提示,可在外部使用Element的el-tooltip元素', backToTopTips2:
imageUploadTips: '由於我在使用時它只有vue@1版本,而且和mockjs不兼容,所以自己改造了一下,如果大家要使用的話,優先還是使用官方版本。', '可自定義按鈕的樣式、show/hide、出現的高度、返回的位置 如需文字提示,可在外部使用Element的el-tooltip元素',
imageUploadTips:
'由於我在使用時它只有vue@1版本,而且和mockjs不兼容,所以自己改造了一下,如果大家要使用的話,優先還是使用官方版本。',
run_once: '運行一次', run_once: '運行一次',
continue: '繼續', continue: '繼續',
hour: '小時', hour: '小時',
...@@ -527,7 +532,8 @@ export default { ...@@ -527,7 +532,8 @@ export default {
create_dashboard: '創建儀表板', create_dashboard: '創建儀表板',
cannot_be_empty: 'SQL不能為空', cannot_be_empty: 'SQL不能為空',
data_reference: '數據參攷', data_reference: '數據參攷',
want_to_replace: '替換可能會影響自定義數據集、關聯數據集、儀表板等,是否替換?', want_to_replace:
'替換可能會影響自定義數據集、關聯數據集、儀表板等,是否替換?',
replace_the_data: '確定替換數據嗎?', replace_the_data: '確定替換數據嗎?',
append_successfully: '追加成功', append_successfully: '追加成功',
already_exists: '數據集名稱已存在', already_exists: '數據集名稱已存在',
...@@ -537,7 +543,8 @@ export default { ...@@ -537,7 +543,8 @@ export default {
left_to_edit: '選中左側的資料表可進行編輯', left_to_edit: '選中左側的資料表可進行編輯',
cannot_be_duplicate: '數據集名稱不允許重複', cannot_be_duplicate: '數據集名稱不允許重複',
set_saved_successfully: '數據集保存成功', set_saved_successfully: '數據集保存成功',
to_start_using: '瀏覽您的數據庫,表和列的內容。 選擇一個數據庫即可開始使用。', to_start_using:
'瀏覽您的數據庫,表和列的內容。 選擇一個數據庫即可開始使用。',
to_run_query: '點擊運行査詢', to_run_query: '點擊運行査詢',
the_running_results: '即可查看運行結果', the_running_results: '即可查看運行結果',
item: '項', item: '項',
...@@ -554,11 +561,13 @@ export default { ...@@ -554,11 +561,13 @@ export default {
head_position: '頭部位置' head_position: '頭部位置'
}, },
example: { example: {
warning: '創建和編輯頁面是不能被 keep-alive 緩存的,因爲keep-alive 的 include 目前不支持根據路由來緩存,所以目前都是基於 component name 來進行緩存的。如果妳想類似的實現緩存效果,可以使用 localStorage 等瀏覽器緩存方案。或者不要使用 keep-alive 的 include,直接緩存所有頁面。詳情見' warning:
'創建和編輯頁面是不能被 keep-alive 緩存的,因爲keep-alive 的 include 目前不支持根據路由來緩存,所以目前都是基於 component name 來進行緩存的。如果妳想類似的實現緩存效果,可以使用 localStorage 等瀏覽器緩存方案。或者不要使用 keep-alive 的 include,直接緩存所有頁面。詳情見'
}, },
errorLog: { errorLog: {
tips: '請點擊右上角bug小圖標', tips: '請點擊右上角bug小圖標',
description: '現在的管理後臺基本都是spa的形式了,它增強了用戶體驗,但同時也會增加頁面出問題的可能性,可能一個小小的疏忽就導致整個頁面的死鎖。好在 Vue 官網提供了一個方法來捕獲處理異常,妳可以在其中進行錯誤處理或者異常上報。', description:
'現在的管理後臺基本都是spa的形式了,它增強了用戶體驗,但同時也會增加頁面出問題的可能性,可能一個小小的疏忽就導致整個頁面的死鎖。好在 Vue 官網提供了一個方法來捕獲處理異常,妳可以在其中進行錯誤處理或者異常上報。',
documentation: '文檔介紹' documentation: '文檔介紹'
}, },
excel: { excel: {
...@@ -627,7 +636,8 @@ export default { ...@@ -627,7 +636,8 @@ export default {
valid: '有效', valid: '有效',
invalid: '無效', invalid: '無效',
expired: '已過期', expired: '已過期',
expired_msg: 'License已過期,過期時間:{0},為了不影響企業版功能的使用,建議您更新License' expired_msg:
'License已過期,過期時間:{0},為了不影響企業版功能的使用,建議您更新License'
}, },
member: { member: {
create: '添加成員', create: '添加成員',
...@@ -643,13 +653,15 @@ export default { ...@@ -643,13 +653,15 @@ export default {
special_characters_are_not_supported: '不支持特殊字符', special_characters_are_not_supported: '不支持特殊字符',
mobile_number_format_is_incorrect: '手機號碼格式不正確', mobile_number_format_is_incorrect: '手機號碼格式不正確',
email_format_is_incorrect: '郵箱格式不正確', email_format_is_incorrect: '郵箱格式不正確',
password_format_is_incorrect: '有效密碼:8-30位,英文大小寫字母+數字+特殊字符(可選)', password_format_is_incorrect:
'有效密碼:8-30位,英文大小寫字母+數字+特殊字符(可選)',
old_password: '舊密碼', old_password: '舊密碼',
new_password: '新密碼', new_password: '新密碼',
repeat_password: '確認密碼', repeat_password: '確認密碼',
inconsistent_passwords: '兩次輸入的密碼不一致', inconsistent_passwords: '兩次輸入的密碼不一致',
remove_member: '確定要移除該成員嗎', remove_member: '確定要移除該成員嗎',
org_remove_member: '將該用戶從組織中移除,將同時移除該組織下所有工作空間的權限,確定要移除該成員嗎?', org_remove_member:
'將該用戶從組織中移除,將同時移除該組織下所有工作空間的權限,確定要移除該成員嗎?',
input_id_or_email: '請輸入用戶 ID, 或者 用戶郵箱', input_id_or_email: '請輸入用戶 ID, 或者 用戶郵箱',
no_such_user: '無此用戶信息, 請輸入正確的用戶 ID 或者 用戶郵箱!' no_such_user: '無此用戶信息, 請輸入正確的用戶 ID 或者 用戶郵箱!'
}, },
...@@ -718,8 +730,10 @@ export default { ...@@ -718,8 +730,10 @@ export default {
input_username: '請輸入用戶名', input_username: '請輸入用戶名',
input_url_placeholder: '請輸入LDAP地址 (如 ldap://localhost:389)', input_url_placeholder: '請輸入LDAP地址 (如 ldap://localhost:389)',
input_ou_placeholder: '輸入用戶OU (使用|分隔各OU)', input_ou_placeholder: '輸入用戶OU (使用|分隔各OU)',
input_filter_placeholder: '輸入過濾器 [可能的選項是cn或uid或sAMAccountName={0}, 如:(uid={0})]', input_filter_placeholder:
input_mapping_placeholder: '如:{"userName":"uid","nickName":"cn","email":"mail"}, username映射的選項可能是cn或uid或sAMAccountName', '輸入過濾器 [可能的選項是cn或uid或sAMAccountName={0}, 如:(uid={0})]',
input_mapping_placeholder:
'如:{"userName":"uid","nickName":"cn","email":"mail"}, username映射的選項可能是cn或uid或sAMAccountName',
test_connect: '測試連接', test_connect: '測試連接',
test_login: '測試登錄', test_login: '測試登錄',
edit: '編輯', edit: '編輯',
...@@ -763,8 +777,10 @@ export default { ...@@ -763,8 +777,10 @@ export default {
role_exist: '添加失敗,該角色已存在', role_exist: '添加失敗,該角色已存在',
add_api_role: '添加API角色', add_api_role: '添加API角色',
can_not_move: '不可移除,至少保留一位管理員', can_not_move: '不可移除,至少保留一位管理員',
manage_can_not_move: '管理員是系統預置角色,默認擁有系統管理全部權限,無法刪除', manage_can_not_move:
manage_can_not_update: '管理員是系統預置角色,默認擁有系統管理全部權限,無法編輯', '管理員是系統預置角色,默認擁有系統管理全部權限,無法刪除',
manage_can_not_update:
'管理員是系統預置角色,默認擁有系統管理全部權限,無法編輯',
role_description: '角色描述', role_description: '角色描述',
editer_role: '編輯角色', editer_role: '編輯角色',
add_role: '添加角色', add_role: '添加角色',
...@@ -802,7 +818,8 @@ export default { ...@@ -802,7 +818,8 @@ export default {
input_name: '請輸入組織名稱', input_name: '請輸入組織名稱',
select_organization: '請選擇組織', select_organization: '請選擇組織',
search_by_name: '根據名稱搜索', search_by_name: '根據名稱搜索',
special_characters_are_not_supported: '格式錯誤(不支持特殊字符,且不能以\'-\'開頭結尾)', special_characters_are_not_supported:
"格式錯誤(不支持特殊字符,且不能以'-'開頭結尾)",
select: '選擇組織', select: '選擇組織',
member: '成員', member: '成員',
organization: '組織', organization: '組織',
...@@ -892,13 +909,15 @@ export default { ...@@ -892,13 +909,15 @@ export default {
to_enable_tsl: '如果SMTP埠是587,通常需要啟用TSL', to_enable_tsl: '如果SMTP埠是587,通常需要啟用TSL',
to_enable_ssl: '如果SMTP埠是465,通常需要啟用SSL', to_enable_ssl: '如果SMTP埠是465,通常需要啟用SSL',
added_successfully: '添加成功', added_successfully: '添加成功',
text_link_etc: '適用場景:行動號召、選中態、資訊高亮、常規提示資訊、文字連結等', text_link_etc:
'適用場景:行動號召、選中態、資訊高亮、常規提示資訊、文字連結等',
prompt_and_icon: '適用場景:成功狀態提示及圖標', prompt_and_icon: '適用場景:成功狀態提示及圖標',
prompt_and_icon_danger: '適用場景:警示狀態提示及圖標', prompt_and_icon_danger: '適用場景:警示狀態提示及圖標',
icon_danger_button: '適用場景:錯誤狀態提示及圖標、危險按鈕', icon_danger_button: '適用場景:錯誤狀態提示及圖標、危險按鈕',
first_level_icon: '適用場景:一級標題、一級正文、重要資訊展示、一級圖標', first_level_icon: '適用場景:一級標題、一級正文、重要資訊展示、一級圖標',
copy_secondary_icon: '適用場景:二級標題、二級文案、二級圖標', copy_secondary_icon: '適用場景:二級標題、二級文案、二級圖標',
radio_checkbox_unchecked: '適用場景:輸入框引導語、輔助文案、提示文案、三級圖標、radio、checkbox未選中態', radio_checkbox_unchecked:
'適用場景:輸入框引導語、輔助文案、提示文案、三級圖標、radio、checkbox未選中態',
button_background_color: '適用場景:禁用文案、禁用圖標、禁用按鈕背景色', button_background_color: '適用場景:禁用文案、禁用圖標、禁用按鈕背景色',
scenario_component_stroking: '適用場景:組件描邊', scenario_component_stroking: '適用場景:組件描邊',
background_header_background: '適用場景:頁面背景、表頭背景', background_header_background: '適用場景:頁面背景、表頭背景',
...@@ -1375,7 +1394,8 @@ export default { ...@@ -1375,7 +1394,8 @@ export default {
chart_heat_map: '热力图', chart_heat_map: '热力图',
chart_3d_column_chart_map: '3D柱图', chart_3d_column_chart_map: '3D柱图',
table_pivot_row: '數據行', table_pivot_row: '數據行',
field_error_tips: '該字段所對應的數據集原始字段發生變更(包括維度、指標,字段類型,字段被刪除等),建議重新編輯', field_error_tips:
'該字段所對應的數據集原始字段發生變更(包括維度、指標,字段類型,字段被刪除等),建議重新編輯',
mark_field_error: '數據集變更,當前字段不存在,請重新選擇', mark_field_error: '數據集變更,當前字段不存在,請重新選擇',
table_border_color: '邊框顏色', table_border_color: '邊框顏色',
table_header_align: '表頭對齊方式', table_header_align: '表頭對齊方式',
...@@ -1503,15 +1523,20 @@ export default { ...@@ -1503,15 +1523,20 @@ export default {
set_zero: '置為0', set_zero: '置為0',
ignore_data: '隱藏空值', ignore_data: '隱藏空值',
empty_data_field_ctrl: '字段設置', empty_data_field_ctrl: '字段設置',
sub_dimension_tip: '該字段為必填項,且不應使用類別軸中的字段,若無需該字段,請選擇基礎圖表進行展示,否則展示效果不理想', sub_dimension_tip:
'該字段為必填項,且不應使用類別軸中的字段,若無需該字段,請選擇基礎圖表進行展示,否則展示效果不理想',
drill_dimension_tip: '鑽取字段僅支持數據集中的字段', drill_dimension_tip: '鑽取字段僅支持數據集中的字段',
table_scroll_tip: '明細表僅在分頁模式為"下拉"時生效。', table_scroll_tip: '明細表僅在分頁模式為"下拉"時生效。',
table_threshold_tip: '提示:請勿重複選擇字段,若同一字段重複配置,則只有最後的字段配置生效。', table_threshold_tip:
table_column_width_tip: '列寬並非任何時候都能生效。<br/>容器寬度優先級高於列寬。即(表格容器寬度 / 列數 > 指定列寬),則列寬優先取(容器寬度 / 列數)', '提示:請勿重複選擇字段,若同一字段重複配置,則只有最後的字段配置生效。',
reference_field_tip: '引用字段以 "[" 開始,"]" 結束。請<br/>勿修改引用內容,否則將引用失敗。<br/>若輸入與引用字段相同格式的內容,將被當做引用字段處理。', table_column_width_tip:
'列寬並非任何時候都能生效。<br/>容器寬度優先級高於列寬。即(表格容器寬度 / 列數 > 指定列寬),則列寬優先取(容器寬度 / 列數)',
reference_field_tip:
'引用字段以 "[" 開始,"]" 結束。請<br/>勿修改引用內容,否則將引用失敗。<br/>若輸入與引用字段相同格式的內容,將被當做引用字段處理。',
scatter_tip: '該指標生效時,樣式大小中的氣泡大小屬性將失效', scatter_tip: '該指標生效時,樣式大小中的氣泡大小屬性將失效',
place_name_mapping: '地名映射', place_name_mapping: '地名映射',
axis_tip: '最小值、最大值、間隔均為數值類型;若不填,則該項視為自動。<br/>請確保填寫數值能正確計算,否則將無法正常顯示值軸', axis_tip:
'最小值、最大值、間隔均為數值類型;若不填,則該項視為自動。<br/>請確保填寫數值能正確計算,否則將無法正常顯示值軸',
format_tip: `模板變量有 {a}, {b},{c},{d},分別表示系列名,數據名,數據值等。<br> format_tip: `模板變量有 {a}, {b},{c},{d},分別表示系列名,數據名,數據值等。<br>
在 觸發位置 為 '坐標軸' 的時候,會有多個系列的數據,此時可以通過 {a0}, {a1}, {a2} 這種後面加索引的方式表示系列的索引。<br> 在 觸發位置 為 '坐標軸' 的時候,會有多個系列的數據,此時可以通過 {a0}, {a1}, {a2} 這種後面加索引的方式表示系列的索引。<br>
不同圖表類型下的 {a},{b},{c},{d} 含義不一樣。 其中變量{a}, {b}, {c}, {d}在不同圖表類型下代表數據含義為:<br><br> 不同圖表類型下的 {a},{b},{c},{d} 含義不一樣。 其中變量{a}, {b}, {c}, {d}在不同圖表類型下代表數據含義為:<br><br>
...@@ -1578,9 +1603,11 @@ export default { ...@@ -1578,9 +1603,11 @@ export default {
sql_result: '運行結果', sql_result: '運行結果',
parse_filed: '解析字段', parse_filed: '解析字段',
field_rename: '字段重命名', field_rename: '字段重命名',
params_work: '僅編輯時生效:參數值僅在數据集編輯時生效; 全域生效:在數据集查看、預覽、以及用到數据集的視圖中均生效。', params_work:
'僅編輯時生效:參數值僅在數据集編輯時生效; 全域生效:在數据集查看、預覽、以及用到數据集的視圖中均生效。',
sql_variable_limit_1: '1、SQL變數只能在WHERE條件中使用', sql_variable_limit_1: '1、SQL變數只能在WHERE條件中使用',
sql_variable_limit_2: '2、示例:select * from table_name where column_name1=\'${param_name1}\' and column_name2 in ${param_name2}', sql_variable_limit_2:
"2、示例:select * from table_name where column_name1='${param_name1}' and column_name2 in ${param_name2}",
selesql_variable_limit_2ct_year: '選擇年', selesql_variable_limit_2ct_year: '選擇年',
select_month: '選擇月', select_month: '選擇月',
select_date: '選擇日期', select_date: '選擇日期',
...@@ -1602,7 +1629,8 @@ export default { ...@@ -1602,7 +1629,8 @@ export default {
rename: '重命名', rename: '重命名',
tips: '提示', tips: '提示',
confirm_delete: '確認刪除', confirm_delete: '確認刪除',
confirm_delete_msg: '刪除數據機,會影響與其相關的自定義數據機、 關聯數據機、儀表板,確認刪除', confirm_delete_msg:
'刪除數據機,會影響與其相關的自定義數據機、 關聯數據機、儀表板,確認刪除',
delete_success: '刪除成功', delete_success: '刪除成功',
confirm: '確認', confirm: '確認',
cancel: '取消', cancel: '取消',
...@@ -1707,7 +1735,8 @@ export default { ...@@ -1707,7 +1735,8 @@ export default {
edit_field: '編輯字段', edit_field: '編輯字段',
preview_100_data: '顯示前100行數據', preview_100_data: '顯示前100行數據',
invalid_table_check: '非直連數據集請先完成數據同步', invalid_table_check: '非直連數據集請先完成數據同步',
parse_error: 'Excel解析失敗,請檢查格式、字段等信息。具體參考:https://dataease.io/docs/user_manual/dataset_configuration/dataset_Excel', parse_error:
'Excel解析失敗,請檢查格式、字段等信息。具體參考:https://dataease.io/docs/user_manual/dataset_configuration/dataset_Excel',
origin_field_type: '字段原始類型', origin_field_type: '字段原始類型',
edit_excel_table: '編輯Excel數據集', edit_excel_table: '編輯Excel數據集',
edit_excel: '編輯Excel', edit_excel: '編輯Excel',
...@@ -1737,7 +1766,8 @@ export default { ...@@ -1737,7 +1766,8 @@ export default {
pending: '暫停', pending: '暫停',
confirm_exec: '手動觸發執行?', confirm_exec: '手動觸發執行?',
change_success: '狀態切換成功', change_success: '狀態切換成功',
excel_replace_msg: '可能會影響計算欄位、自定義數據集、關聯數據集、儀表板等,確認替換?', excel_replace_msg:
'可能會影響計算欄位、自定義數據集、關聯數據集、儀表板等,確認替換?',
effect_ext_field: '會影響計算欄位' effect_ext_field: '會影響計算欄位'
}, },
field_group_type: '分類', field_group_type: '分類',
...@@ -1861,7 +1891,8 @@ export default { ...@@ -1861,7 +1891,8 @@ export default {
data_source_table: '數據源錶', data_source_table: '數據源錶',
auth_method: '認證方式', auth_method: '認證方式',
passwd: '用戶名密碼', passwd: '用戶名密碼',
kerbers_info: '請確保 krb5.Conf、Keytab Key,已經添加到路徑:/opt/dataease/conf', kerbers_info:
'請確保 krb5.Conf、Keytab Key,已經添加到路徑:/opt/dataease/conf',
client_principal: 'Client Principal', client_principal: 'Client Principal',
keytab_Key_path: 'Keytab Key Path', keytab_Key_path: 'Keytab Key Path',
datasource: '數據源', datasource: '數據源',
...@@ -1880,7 +1911,8 @@ export default { ...@@ -1880,7 +1911,8 @@ export default {
http_port: 'Http Port', http_port: 'Http Port',
port: '端口', port: '端口',
datasource_url: '地址', datasource_url: '地址',
please_input_datasource_url: '請輸入 Elasticsearch 地址,如: http://es_host:es_port', please_input_datasource_url:
'請輸入 Elasticsearch 地址,如: http://es_host:es_port',
please_input_data_base: '請輸入數據庫名稱', please_input_data_base: '請輸入數據庫名稱',
please_select_oracle_type: '選擇連接類型', please_select_oracle_type: '選擇連接類型',
please_input_user_name: '請輸入用戶名', please_input_user_name: '請輸入用戶名',
...@@ -1908,7 +1940,8 @@ export default { ...@@ -1908,7 +1940,8 @@ export default {
please_choose_schema: '請選擇數據庫 Schema', please_choose_schema: '請選擇數據庫 Schema',
please_choose_targetCharset: '請選擇目標字符集', please_choose_targetCharset: '請選擇目標字符集',
please_choose_charset: '請選擇數據庫字符集', please_choose_charset: '請選擇數據庫字符集',
edit_datasource_msg: '修改數據源信息,可能會導致改數據源下的數據集不可用,確認修改?', edit_datasource_msg:
'修改數據源信息,可能會導致改數據源下的數據集不可用,確認修改?',
repeat_datasource_msg: '已經存在相同配置的數據源信息,', repeat_datasource_msg: '已經存在相同配置的數據源信息,',
confirm_save: '確認保存?', confirm_save: '確認保存?',
in_valid: '無效數據源', in_valid: '無效數據源',
...@@ -2002,8 +2035,10 @@ export default { ...@@ -2002,8 +2035,10 @@ export default {
other: '其他', other: '其他',
this_data_source: '確定刪除該數據源嗎?', this_data_source: '確定刪除該數據源嗎?',
delete_this_dataset: '確定删除該數据集嗎?', delete_this_dataset: '確定删除該數据集嗎?',
cannot_be_deleted_dataset: '該數据集存在如下血緣關係,删除會造成相關儀錶板的視圖失效,確定删除?', cannot_be_deleted_dataset:
cannot_be_deleted_datasource: '該數據源存在如下血緣關係,删除會造成相關儀錶板的視圖失效,確定删除?', '該數据集存在如下血緣關係,删除會造成相關儀錶板的視圖失效,確定删除?',
cannot_be_deleted_datasource:
'該數據源存在如下血緣關係,删除會造成相關儀錶板的視圖失效,確定删除?',
edit_folder: '編輯資料夾', edit_folder: '編輯資料夾',
click_to_check: '點擊去查看血緣關係', click_to_check: '點擊去查看血緣關係',
delete_this_item: '是否要刪除此項?', delete_this_item: '是否要刪除此項?',
...@@ -2057,12 +2092,15 @@ export default { ...@@ -2057,12 +2092,15 @@ export default {
image_size_tips: '圖片請不要大於15M', image_size_tips: '圖片請不要大於15M',
image_add_tips: '只能插入圖片', image_add_tips: '只能插入圖片',
watermark: '水印', watermark: '水印',
panel_get_data_error: '獲取儀表板信息失敗,儀表板可能已經被刪除,請檢查儀表板狀態', panel_get_data_error:
'獲取儀表板信息失敗,儀表板可能已經被刪除,請檢查儀表板狀態',
panel_no_save_tips: '存在未保存的儀表板', panel_no_save_tips: '存在未保存的儀表板',
panel_cache_use_tips: '檢查到上次有儀表板未能正常保存,是否使用上次未保存的儀表板?', panel_cache_use_tips:
'檢查到上次有儀表板未能正常保存,是否使用上次未保存的儀表板?',
template_name_tips: '儀表板名稱必填', template_name_tips: '儀表板名稱必填',
panel_background_item: '自定義儀表板背景', panel_background_item: '自定義儀表板背景',
panel_background_image_tips: '當前支持.jpeg,.jpg,.png,.gif文件,大小不要超過15M', panel_background_image_tips:
'當前支持.jpeg,.jpg,.png,.gif文件,大小不要超過15M',
reUpload: '重新上傳', reUpload: '重新上傳',
create_by: '創建人', create_by: '創建人',
create_time: '創建時間', create_time: '創建時間',
...@@ -2075,7 +2113,8 @@ export default { ...@@ -2075,7 +2113,8 @@ export default {
template_preview: '預覽模板', template_preview: '預覽模板',
apply: '應用', apply: '應用',
apply_this_template: '應用此模板', apply_this_template: '應用此模板',
market_network_tips: '查看模板市場模板需要服務器與模板市場(https://dataease.io/templates)連通,請檢查網絡...', market_network_tips:
'查看模板市場模板需要服務器與模板市場(https://dataease.io/templates)連通,請檢查網絡...',
enter_name_tips: '請輸入儀表板名稱', enter_name_tips: '請輸入儀表板名稱',
name: '名稱', name: '名稱',
apply_template: '應用模板', apply_template: '應用模板',
...@@ -2092,7 +2131,8 @@ export default { ...@@ -2092,7 +2131,8 @@ export default {
data_format: '日期格式', data_format: '日期格式',
border_color: '邊框顏色', border_color: '邊框顏色',
theme_change_warn: '主題更換', theme_change_warn: '主題更換',
theme_change_tips: '更換主題將會覆蓋視圖相關主題屬性建議提前備份,是否繼續更換?', theme_change_tips:
'更換主題將會覆蓋視圖相關主題屬性建議提前備份,是否繼續更換?',
theme_color_change_warn: '主題色更換', theme_color_change_warn: '主題色更換',
theme_color_change_tips: '主題色變更將會覆蓋原有視圖屬性', theme_color_change_tips: '主題色變更將會覆蓋原有視圖屬性',
theme_color: '主題色', theme_color: '主題色',
...@@ -2355,7 +2395,8 @@ export default { ...@@ -2355,7 +2395,8 @@ export default {
link_add_tips_pre: '請點擊上方', link_add_tips_pre: '請點擊上方',
web_add_tips_suf: '添加網頁信息...', web_add_tips_suf: '添加網頁信息...',
panel_view_result_show: '視圖結果', panel_view_result_show: '視圖結果',
panel_view_result_tips: '選擇儀表闆會覆蓋視圖的結果展示數量,取值範圍1~10000', panel_view_result_tips:
'選擇儀表闆會覆蓋視圖的結果展示數量,取值範圍1~10000',
timeout_refresh: '請求超時,稍後刷新...', timeout_refresh: '請求超時,稍後刷新...',
mobile_layout: '移動端佈局', mobile_layout: '移動端佈局',
component_hidden: '隱藏的組件', component_hidden: '隱藏的組件',
...@@ -2487,7 +2528,8 @@ export default { ...@@ -2487,7 +2528,8 @@ export default {
select_all: '全 選', select_all: '全 選',
added: '已添加', added: '已添加',
manual_input: '手工輸入', manual_input: '手工輸入',
please_fill: '請一行填一個,最多添加500個,識別錄入時會自動過濾重復的選項和已經添加過的選項', please_fill:
'請一行填一個,最多添加500個,識別錄入時會自動過濾重復的選項和已經添加過的選項',
close: '關 閉', close: '關 閉',
add: '添 加', add: '添 加',
sure: '確 定' sure: '確 定'
...@@ -2677,7 +2719,6 @@ export default { ...@@ -2677,7 +2719,6 @@ export default {
select_openMode: '請選擇展示風格', select_openMode: '請選擇展示風格',
select_time_format: '請選擇時間各式', select_time_format: '請選擇時間各式',
select_date_format: '請選擇日期格式' select_date_format: '請選擇日期格式'
}, },
xpacktask: { xpacktask: {
add: '新增任務', add: '新增任務',
...@@ -2704,7 +2745,6 @@ export default { ...@@ -2704,7 +2745,6 @@ export default {
sure_batch_delete: '確定批量刪除任務嗎?', sure_batch_delete: '確定批量刪除任務嗎?',
pixel_error: '分辨率支持{800 - 10000} * {500 - 6250}', pixel_error: '分辨率支持{800 - 10000} * {500 - 6250}',
next_exec_time: '下次執行時間' next_exec_time: '下次執行時間'
}, },
emailtask: { emailtask: {
week_mon: '周一', week_mon: '周一',
...@@ -2802,7 +2842,8 @@ export default { ...@@ -2802,7 +2842,8 @@ export default {
enterprise_edition: '企業版', enterprise_edition: '企業版',
contact_us: '聯繫我們', contact_us: '聯繫我們',
demo_video_hint: '如何3分鐘製作一個DataEase數據看闆、並分享給他人', demo_video_hint: '如何3分鐘製作一個DataEase數據看闆、並分享給他人',
online_document_hint: '涵蓋DataEase的安裝步驟、用戶手冊、使用教程、常見問題的解決方案、以及二次開發等', online_document_hint:
'涵蓋DataEase的安裝步驟、用戶手冊、使用教程、常見問題的解決方案、以及二次開發等',
teaching_video_bottom_hint: '更多視頻資料', teaching_video_bottom_hint: '更多視頻資料',
enterprise_edition_hint1: '提供企業級應用場景X-Pack增強包', enterprise_edition_hint1: '提供企業級應用場景X-Pack增強包',
enterprise_edition_hint2: '提供高等級原廠服務支持', enterprise_edition_hint2: '提供高等級原廠服務支持',
...@@ -2859,7 +2900,8 @@ export default { ...@@ -2859,7 +2900,8 @@ export default {
fileplaceholder: '請上傳json格式坐標文件', fileplaceholder: '請上傳json格式坐標文件',
delete_confirm: '及子節點都會被刪除,確認執行?', delete_confirm: '及子節點都會被刪除,確認執行?',
cur_node: '當前節點', cur_node: '當前節點',
prohibit_prompts: '000、156分別是地球村和中華人民共和國區域代碼前綴,禁止移除,請使用其他代碼前綴!' prohibit_prompts:
'000、156分別是地球村和中華人民共和國區域代碼前綴,禁止移除,請使用其他代碼前綴!'
}, },
map_mapping: { map_mapping: {
map: '圖形', map: '圖形',
...@@ -2867,8 +2909,8 @@ export default { ...@@ -2867,8 +2909,8 @@ export default {
empty: '無數據', empty: '無數據',
please_select_map: '請先選擇地圖範圍' please_select_map: '請先選擇地圖範圍'
}, },
'I18N_USER_TEMPLATE_ERROR': '模版錯誤', I18N_USER_TEMPLATE_ERROR: '模版錯誤',
'i18n_max_user_import_size': '文件最大不能超過10M', i18n_max_user_import_size: '文件最大不能超過10M',
app_template: { app_template: {
move: '移動', move: '移動',
move_item: '移動應用', move_item: '移動應用',
...@@ -2896,7 +2938,8 @@ export default { ...@@ -2896,7 +2938,8 @@ export default {
panel: '儀表板', panel: '儀表板',
log_delete_tips: '確定刪除該條應用記錄嗎?', log_delete_tips: '確定刪除該條應用記錄嗎?',
log_resource_delete_tips: '刪除相關資源(刪除後不可恢復)', log_resource_delete_tips: '刪除相關資源(刪除後不可恢復)',
file_error_tips: '未找到相關數據文件,當前文件可能不是DataEase應用文件,或者文件已經損壞', file_error_tips:
'未找到相關數據文件,當前文件可能不是DataEase應用文件,或者文件已經損壞',
app_export: '應用導出', app_export: '應用導出',
app_version: '應用版本', app_version: '應用版本',
program_version: 'DataEase最低版本', program_version: 'DataEase最低版本',
...@@ -2935,5 +2978,16 @@ export default { ...@@ -2935,5 +2978,16 @@ export default {
confirm_title: '強行登錄會導致其他客戶端掉線', confirm_title: '強行登錄會導致其他客戶端掉線',
confirm: '是否強行登錄?', confirm: '是否強行登錄?',
forced_offline: '`當前賬號在客戶端【${ip}】登錄,您已被擠下線!`' forced_offline: '`當前賬號在客戶端【${ip}】登錄,您已被擠下線!`'
},
amap: {
layer: '區塊地圖',
layer_type: '類型',
layer_path: '路徑',
layer_name: '名稱',
theme: '主題',
light: '淺色',
dark: '深色',
hazardLevel: '等級',
center: '中心點'
} }
} }
...@@ -405,17 +405,22 @@ export default { ...@@ -405,17 +405,22 @@ export default {
cancel: '取消' cancel: '取消'
}, },
guide: { guide: {
description: '引导页对于一些第一次进入项目的人很有用,你可以简单介绍下项目的功能。本 Demo 是基于', description:
'引导页对于一些第一次进入项目的人很有用,你可以简单介绍下项目的功能。本 Demo 是基于',
button: '打开引导' button: '打开引导'
}, },
components: { components: {
documentation: '文档', documentation: '文档',
tinymceTips: '富文本是管理后台一个核心的功能,但同时又是一个有很多坑的地方。在选择富文本的过程中我也走了不少的弯路,市面上常见的富文本都基本用过了,最终权衡了一下选择了Tinymce。更详细的富文本比较和介绍见', tinymceTips:
dropzoneTips: '由于我司业务有特殊需求,而且要传七牛 所以没用第三方,选择了自己封装。代码非常的简单,具体代码你可以在这里看到 @/components/Dropzone', '富文本是管理后台一个核心的功能,但同时又是一个有很多坑的地方。在选择富文本的过程中我也走了不少的弯路,市面上常见的富文本都基本用过了,最终权衡了一下选择了Tinymce。更详细的富文本比较和介绍见',
dropzoneTips:
'由于我司业务有特殊需求,而且要传七牛 所以没用第三方,选择了自己封装。代码非常的简单,具体代码你可以在这里看到 @/components/Dropzone',
stickyTips: '当页面滚动到预设的位置会吸附在顶部', stickyTips: '当页面滚动到预设的位置会吸附在顶部',
backToTopTips1: '页面滚动到指定位置会在右下角出现返回顶部按钮', backToTopTips1: '页面滚动到指定位置会在右下角出现返回顶部按钮',
backToTopTips2: '可自定义按钮的样式、show/hide、出现的高度、返回的位置 如需文字提示,可在外部使用Element的el-tooltip元素', backToTopTips2:
imageUploadTips: '由于我在使用时它只有vue@1版本,而且和mockjs不兼容,所以自己改造了一下,如果大家要使用的话,优先还是使用官方版本。', '可自定义按钮的样式、show/hide、出现的高度、返回的位置 如需文字提示,可在外部使用Element的el-tooltip元素',
imageUploadTips:
'由于我在使用时它只有vue@1版本,而且和mockjs不兼容,所以自己改造了一下,如果大家要使用的话,优先还是使用官方版本。',
run_once: '运行一次', run_once: '运行一次',
continue: '继续', continue: '继续',
hour: '小时', hour: '小时',
...@@ -526,7 +531,8 @@ export default { ...@@ -526,7 +531,8 @@ export default {
create_dashboard: '创建仪表板', create_dashboard: '创建仪表板',
cannot_be_empty: 'SQL不能为空', cannot_be_empty: 'SQL不能为空',
data_reference: '数据参考', data_reference: '数据参考',
want_to_replace: '替换可能会影响自定义数据集、关联数据集、仪表板等,是否替换?', want_to_replace:
'替换可能会影响自定义数据集、关联数据集、仪表板等,是否替换?',
replace_the_data: '确定替换数据吗?', replace_the_data: '确定替换数据吗?',
append_successfully: '追加成功', append_successfully: '追加成功',
already_exists: '数据集名称已存在', already_exists: '数据集名称已存在',
...@@ -536,7 +542,8 @@ export default { ...@@ -536,7 +542,8 @@ export default {
left_to_edit: '选中左侧的数据表可进行编辑', left_to_edit: '选中左侧的数据表可进行编辑',
cannot_be_duplicate: '数据集名称不允许重复', cannot_be_duplicate: '数据集名称不允许重复',
set_saved_successfully: '数据集保存成功', set_saved_successfully: '数据集保存成功',
to_start_using: '浏览您的数据库,表和列的内容。 选择一个数据库即可开始使用。', to_start_using:
'浏览您的数据库,表和列的内容。 选择一个数据库即可开始使用。',
to_run_query: '点击运行查询', to_run_query: '点击运行查询',
the_running_results: '即可查看运行结果', the_running_results: '即可查看运行结果',
item: '项', item: '项',
...@@ -553,11 +560,13 @@ export default { ...@@ -553,11 +560,13 @@ export default {
head_position: '头部位置' head_position: '头部位置'
}, },
example: { example: {
warning: '创建和编辑页面是不能被 keep-alive 缓存的,因为keep-alive 的 include 目前不支持根据路由来缓存,所以目前都是基于 component name 来进行缓存的。如果你想类似的实现缓存效果,可以使用 localStorage 等浏览器缓存方案。或者不要使用 keep-alive 的 include,直接缓存所有页面。详情见' warning:
'创建和编辑页面是不能被 keep-alive 缓存的,因为keep-alive 的 include 目前不支持根据路由来缓存,所以目前都是基于 component name 来进行缓存的。如果你想类似的实现缓存效果,可以使用 localStorage 等浏览器缓存方案。或者不要使用 keep-alive 的 include,直接缓存所有页面。详情见'
}, },
errorLog: { errorLog: {
tips: '请点击右上角bug小图标', tips: '请点击右上角bug小图标',
description: '现在的管理后台基本都是spa的形式了,它增强了用户体验,但同时也会增加页面出问题的可能性,可能一个小小的疏忽就导致整个页面的死锁。好在 Vue 官网提供了一个方法来捕获处理异常,你可以在其中进行错误处理或者异常上报。', description:
'现在的管理后台基本都是spa的形式了,它增强了用户体验,但同时也会增加页面出问题的可能性,可能一个小小的疏忽就导致整个页面的死锁。好在 Vue 官网提供了一个方法来捕获处理异常,你可以在其中进行错误处理或者异常上报。',
documentation: '文档介绍' documentation: '文档介绍'
}, },
excel: { excel: {
...@@ -626,7 +635,8 @@ export default { ...@@ -626,7 +635,8 @@ export default {
valid: '有效', valid: '有效',
invalid: '无效', invalid: '无效',
expired: '已过期', expired: '已过期',
expired_msg: 'License已过期,过期时间:{0},为了不影响企业版功能的使用,建议您更新License' expired_msg:
'License已过期,过期时间:{0},为了不影响企业版功能的使用,建议您更新License'
}, },
member: { member: {
create: '添加成员', create: '添加成员',
...@@ -642,13 +652,15 @@ export default { ...@@ -642,13 +652,15 @@ export default {
special_characters_are_not_supported: '不支持特殊字符', special_characters_are_not_supported: '不支持特殊字符',
mobile_number_format_is_incorrect: '手机号码格式不正确', mobile_number_format_is_incorrect: '手机号码格式不正确',
email_format_is_incorrect: '邮箱格式不正确', email_format_is_incorrect: '邮箱格式不正确',
password_format_is_incorrect: '有效密码:8-30位,英文大小写字母+数字+特殊字符(可选)', password_format_is_incorrect:
'有效密码:8-30位,英文大小写字母+数字+特殊字符(可选)',
old_password: '旧密码', old_password: '旧密码',
new_password: '新密码', new_password: '新密码',
repeat_password: '确认密码', repeat_password: '确认密码',
inconsistent_passwords: '两次输入的密码不一致', inconsistent_passwords: '两次输入的密码不一致',
remove_member: '确定要移除该成员吗', remove_member: '确定要移除该成员吗',
org_remove_member: '将该用户从组织中移除,将同时移除该组织下所有工作空间的权限,确定要移除该成员吗?', org_remove_member:
'将该用户从组织中移除,将同时移除该组织下所有工作空间的权限,确定要移除该成员吗?',
input_id_or_email: '请输入用户 ID, 或者 用户邮箱', input_id_or_email: '请输入用户 ID, 或者 用户邮箱',
no_such_user: '无此用户信息, 请输入正确的用户 ID 或者 用户邮箱!' no_such_user: '无此用户信息, 请输入正确的用户 ID 或者 用户邮箱!'
}, },
...@@ -717,8 +729,10 @@ export default { ...@@ -717,8 +729,10 @@ export default {
input_username: '请输入用户名', input_username: '请输入用户名',
input_url_placeholder: '请输入LDAP地址 (如 ldap://localhost:389)', input_url_placeholder: '请输入LDAP地址 (如 ldap://localhost:389)',
input_ou_placeholder: '输入用户OU (使用|分隔各OU)', input_ou_placeholder: '输入用户OU (使用|分隔各OU)',
input_filter_placeholder: '输入过滤器 [可能的选项是cn或uid或sAMAccountName={0}, 如:(uid={0})]', input_filter_placeholder:
input_mapping_placeholder: '如:{"userName":"uid","nickName":"cn","email":"mail"}, username映射的选项可能是cn或uid或sAMAccountName', '输入过滤器 [可能的选项是cn或uid或sAMAccountName={0}, 如:(uid={0})]',
input_mapping_placeholder:
'如:{"userName":"uid","nickName":"cn","email":"mail"}, username映射的选项可能是cn或uid或sAMAccountName',
test_connect: '测试连接', test_connect: '测试连接',
test_login: '测试登录', test_login: '测试登录',
edit: '编辑', edit: '编辑',
...@@ -762,8 +776,10 @@ export default { ...@@ -762,8 +776,10 @@ export default {
role_exist: '添加失败,该角色已存在', role_exist: '添加失败,该角色已存在',
add_api_role: '添加API角色', add_api_role: '添加API角色',
can_not_move: '不可移除,至少保留一位管理员', can_not_move: '不可移除,至少保留一位管理员',
manage_can_not_move: '管理员是系统预置角色,默认拥有系统管理全部权限,无法删除', manage_can_not_move:
manage_can_not_update: '管理员是系统预置角色,默认拥有系统管理全部权限,无法编辑', '管理员是系统预置角色,默认拥有系统管理全部权限,无法删除',
manage_can_not_update:
'管理员是系统预置角色,默认拥有系统管理全部权限,无法编辑',
role_description: '角色描述', role_description: '角色描述',
editer_role: '编辑角色', editer_role: '编辑角色',
add_role: '添加角色', add_role: '添加角色',
...@@ -801,7 +817,8 @@ export default { ...@@ -801,7 +817,8 @@ export default {
input_name: '请输入组织名称', input_name: '请输入组织名称',
select_organization: '请选择组织', select_organization: '请选择组织',
search_by_name: '根据名称搜索', search_by_name: '根据名称搜索',
special_characters_are_not_supported: '格式错误(不支持特殊字符,且不能以\'-\'开头结尾)', special_characters_are_not_supported:
"格式错误(不支持特殊字符,且不能以'-'开头结尾)",
select: '选择组织', select: '选择组织',
member: '成员', member: '成员',
organization: '组织', organization: '组织',
...@@ -891,13 +908,15 @@ export default { ...@@ -891,13 +908,15 @@ export default {
to_enable_tsl: '如果SMTP端口是587,通常需要启用TSL', to_enable_tsl: '如果SMTP端口是587,通常需要启用TSL',
to_enable_ssl: '如果SMTP端口是465,通常需要启用SSL', to_enable_ssl: '如果SMTP端口是465,通常需要启用SSL',
added_successfully: '添加成功', added_successfully: '添加成功',
text_link_etc: '适用场景:行动号召、选中态、信息高亮、常规提示信息、文字链接等', text_link_etc:
'适用场景:行动号召、选中态、信息高亮、常规提示信息、文字链接等',
prompt_and_icon: '适用场景:成功状态提示及图标', prompt_and_icon: '适用场景:成功状态提示及图标',
prompt_and_icon_danger: '适用场景:警示状态提示及图标', prompt_and_icon_danger: '适用场景:警示状态提示及图标',
icon_danger_button: '适用场景:错误状态提示及图标、危险按钮', icon_danger_button: '适用场景:错误状态提示及图标、危险按钮',
first_level_icon: '适用场景:一级标题、一级正文、重要信息展示、一级图标', first_level_icon: '适用场景:一级标题、一级正文、重要信息展示、一级图标',
copy_secondary_icon: '适用场景:二级标题、二级文案、二级图标', copy_secondary_icon: '适用场景:二级标题、二级文案、二级图标',
radio_checkbox_unchecked: '适用场景:输入框引导语、辅助文案、提示文案、三级图标、radio、checkbox未选中态', radio_checkbox_unchecked:
'适用场景:输入框引导语、辅助文案、提示文案、三级图标、radio、checkbox未选中态',
button_background_color: '适用场景:禁用文案、禁用图标、禁用按钮背景色', button_background_color: '适用场景:禁用文案、禁用图标、禁用按钮背景色',
scenario_component_stroking: '适用场景:组件描边', scenario_component_stroking: '适用场景:组件描边',
background_header_background: '适用场景:页面背景、表头背景', background_header_background: '适用场景:页面背景、表头背景',
...@@ -1376,7 +1395,8 @@ export default { ...@@ -1376,7 +1395,8 @@ export default {
chart_building: '点击建筑', chart_building: '点击建筑',
chart_3d_column_chart_map: '3D柱图', chart_3d_column_chart_map: '3D柱图',
table_pivot_row: '数据行', table_pivot_row: '数据行',
field_error_tips: '该字段所对应的数据集原始字段发生变更(包括维度、指标,字段类型,字段被删除等),建议重新编辑', field_error_tips:
'该字段所对应的数据集原始字段发生变更(包括维度、指标,字段类型,字段被删除等),建议重新编辑',
mark_field_error: '数据集变更,当前字段不存在,请重新选择', mark_field_error: '数据集变更,当前字段不存在,请重新选择',
table_border_color: '边框颜色', table_border_color: '边框颜色',
table_header_align: '表头对齐方式', table_header_align: '表头对齐方式',
...@@ -1504,15 +1524,20 @@ export default { ...@@ -1504,15 +1524,20 @@ export default {
break_line: '保持为空', break_line: '保持为空',
set_zero: '置为0', set_zero: '置为0',
ignore_data: '隐藏空值', ignore_data: '隐藏空值',
sub_dimension_tip: '该字段为必填项,且不应使用类别轴中的字段,若无需该字段,请选择基础图表进行展示,否则展示效果不理想。', sub_dimension_tip:
'该字段为必填项,且不应使用类别轴中的字段,若无需该字段,请选择基础图表进行展示,否则展示效果不理想。',
drill_dimension_tip: '钻取字段仅支持数据集中的字段', drill_dimension_tip: '钻取字段仅支持数据集中的字段',
table_scroll_tip: '明细表仅在分页模式为"下拉"时生效。', table_scroll_tip: '明细表仅在分页模式为"下拉"时生效。',
table_threshold_tip: '提示:请勿重复选择字段,若同一字段重复配置,则只有最后的字段配置生效', table_threshold_tip:
table_column_width_tip: '列宽并非任何时候都能生效。<br/>容器宽度优先级高于列宽,即(表格容器宽度 / 列数 > 指定列宽),则列宽优先取(容器宽度 / 列数)。', '提示:请勿重复选择字段,若同一字段重复配置,则只有最后的字段配置生效',
reference_field_tip: '引用字段以 "[" 开始, "]" 结束。<br/>请勿修改引用内容,否则将引用失败。<br/>若输入与引用字段相同格式的内容,将被当作引用字段处理。', table_column_width_tip:
'列宽并非任何时候都能生效。<br/>容器宽度优先级高于列宽,即(表格容器宽度 / 列数 > 指定列宽),则列宽优先取(容器宽度 / 列数)。',
reference_field_tip:
'引用字段以 "[" 开始, "]" 结束。<br/>请勿修改引用内容,否则将引用失败。<br/>若输入与引用字段相同格式的内容,将被当作引用字段处理。',
scatter_tip: '该指标生效时,样式大小中的气泡大小属性将失效', scatter_tip: '该指标生效时,样式大小中的气泡大小属性将失效',
place_name_mapping: '地名映射', place_name_mapping: '地名映射',
axis_tip: '最小值、最大值、间隔均为数值类型;若不填,则该项视为自动。<br/>请确保填写数值能正确计算,否则将无法正常显示轴值。', axis_tip:
'最小值、最大值、间隔均为数值类型;若不填,则该项视为自动。<br/>请确保填写数值能正确计算,否则将无法正常显示轴值。',
format_tip: `模板变量有 {a}, {b},{c},{d},分别表示系列名,数据名,数据值等。<br> format_tip: `模板变量有 {a}, {b},{c},{d},分别表示系列名,数据名,数据值等。<br>
在 触发位置 为 '坐标轴' 的时候,会有多个系列的数据,此时可以通过 {a0}, {a1}, {a2} 这种后面加索引的方式表示系列的索引。<br> 在 触发位置 为 '坐标轴' 的时候,会有多个系列的数据,此时可以通过 {a0}, {a1}, {a2} 这种后面加索引的方式表示系列的索引。<br>
不同图表类型下的 {a},{b},{c},{d} 含义不一样。 其中变量{a}, {b}, {c}, {d}在不同图表类型下代表数据含义为:<br><br> 不同图表类型下的 {a},{b},{c},{d} 含义不一样。 其中变量{a}, {b}, {c}, {d}在不同图表类型下代表数据含义为:<br><br>
...@@ -1580,10 +1605,12 @@ export default { ...@@ -1580,10 +1605,12 @@ export default {
sql_result: '运行结果', sql_result: '运行结果',
parse_filed: '解析字段', parse_filed: '解析字段',
field_rename: '字段重命名', field_rename: '字段重命名',
params_work: '仅编辑时生效:参数值仅在数据集编辑时生效;全局生效:在数据集查看、预览、以及用到数据集的视图中均生效。', params_work:
'仅编辑时生效:参数值仅在数据集编辑时生效;全局生效:在数据集查看、预览、以及用到数据集的视图中均生效。',
select_year: '选择年', select_year: '选择年',
sql_variable_limit_1: '1、SQL 变量只能在 WHERE 条件中使用', sql_variable_limit_1: '1、SQL 变量只能在 WHERE 条件中使用',
sql_variable_limit_2: '2、示例:select * from table_name where column_name1=\'${param_name1}\' and column_name2 in ${param_name2}', sql_variable_limit_2:
"2、示例:select * from table_name where column_name1='${param_name1}' and column_name2 in ${param_name2}",
select_month: '选择月', select_month: '选择月',
select_date: '选择日期', select_date: '选择日期',
select_time: '选择时间', select_time: '选择时间',
...@@ -1604,7 +1631,8 @@ export default { ...@@ -1604,7 +1631,8 @@ export default {
rename: '重命名', rename: '重命名',
tips: '提示', tips: '提示',
confirm_delete: '确认删除', confirm_delete: '确认删除',
confirm_delete_msg: '数据集删除,会影响与其相关的自定义数据集、关联数据集、仪表板,确认删除?', confirm_delete_msg:
'数据集删除,会影响与其相关的自定义数据集、关联数据集、仪表板,确认删除?',
delete_success: '删除成功', delete_success: '删除成功',
confirm: '确认', confirm: '确认',
cancel: '取消', cancel: '取消',
...@@ -1709,7 +1737,8 @@ export default { ...@@ -1709,7 +1737,8 @@ export default {
edit_field: '编辑字段', edit_field: '编辑字段',
preview_100_data: '显示前100行数据', preview_100_data: '显示前100行数据',
invalid_table_check: '非直连数据集请先完成数据同步', invalid_table_check: '非直连数据集请先完成数据同步',
parse_error: 'Excel解析失败,请检查格式、字段等信息。具体参考:https://dataease.io/docs/user_manual/dataset_configuration/dataset_Excel', parse_error:
'Excel解析失败,请检查格式、字段等信息。具体参考:https://dataease.io/docs/user_manual/dataset_configuration/dataset_Excel',
origin_field_type: '字段原始类型', origin_field_type: '字段原始类型',
edit_excel_table: '编辑Excel数据集', edit_excel_table: '编辑Excel数据集',
edit_excel: '编辑Excel', edit_excel: '编辑Excel',
...@@ -1739,7 +1768,8 @@ export default { ...@@ -1739,7 +1768,8 @@ export default {
pending: '暂停', pending: '暂停',
confirm_exec: '手动触发执行?', confirm_exec: '手动触发执行?',
change_success: '状态切换成功', change_success: '状态切换成功',
excel_replace_msg: '可能会影响自定义数据集、关联数据集、仪表板等,确认替换?', excel_replace_msg:
'可能会影响自定义数据集、关联数据集、仪表板等,确认替换?',
effect_ext_field: '会影响计算字段' effect_ext_field: '会影响计算字段'
}, },
field_group_type: '分类', field_group_type: '分类',
...@@ -1863,7 +1893,8 @@ export default { ...@@ -1863,7 +1893,8 @@ export default {
data_source_table: '数据源表', data_source_table: '数据源表',
auth_method: '认证方式', auth_method: '认证方式',
passwd: '用户名密码', passwd: '用户名密码',
kerbers_info: '请确保 krb5.Conf、Keytab Key,已经添加到路径:/opt/dataease/conf', kerbers_info:
'请确保 krb5.Conf、Keytab Key,已经添加到路径:/opt/dataease/conf',
client_principal: 'Client Principal', client_principal: 'Client Principal',
keytab_Key_path: 'Keytab Key Path', keytab_Key_path: 'Keytab Key Path',
datasource: '数据源', datasource: '数据源',
...@@ -1882,7 +1913,8 @@ export default { ...@@ -1882,7 +1913,8 @@ export default {
http_port: 'Http Port', http_port: 'Http Port',
port: '端口', port: '端口',
datasource_url: '地址', datasource_url: '地址',
please_input_datasource_url: '请输入 Elasticsearch 地址,如: http://es_host:es_port', please_input_datasource_url:
'请输入 Elasticsearch 地址,如: http://es_host:es_port',
please_input_data_base: '请输入数据库名称', please_input_data_base: '请输入数据库名称',
please_select_oracle_type: '选择连接类型', please_select_oracle_type: '选择连接类型',
please_input_user_name: '请输入用户名', please_input_user_name: '请输入用户名',
...@@ -1910,7 +1942,8 @@ export default { ...@@ -1910,7 +1942,8 @@ export default {
please_choose_schema: '请选择数据库 Schema', please_choose_schema: '请选择数据库 Schema',
please_choose_charset: '请选择数据库字符集', please_choose_charset: '请选择数据库字符集',
please_choose_targetCharset: '请选择目标字符集', please_choose_targetCharset: '请选择目标字符集',
edit_datasource_msg: '修改数据源信息,可能会导致该数据源下的数据集不可用,确认修改?', edit_datasource_msg:
'修改数据源信息,可能会导致该数据源下的数据集不可用,确认修改?',
repeat_datasource_msg: '已经存在相同配置的数据源信息, ', repeat_datasource_msg: '已经存在相同配置的数据源信息, ',
confirm_save: '确认保存?', confirm_save: '确认保存?',
in_valid: '无效数据源', in_valid: '无效数据源',
...@@ -2004,8 +2037,10 @@ export default { ...@@ -2004,8 +2037,10 @@ export default {
other: '其他', other: '其他',
this_data_source: '确定删除该数据源吗?', this_data_source: '确定删除该数据源吗?',
delete_this_dataset: '确定删除该数据集吗?', delete_this_dataset: '确定删除该数据集吗?',
cannot_be_deleted_dataset: '该数据集存在如下血缘关系,删除会造成相关仪表板的视图失效,确定删除?', cannot_be_deleted_dataset:
cannot_be_deleted_datasource: '该数据源存在如下血缘关系,删除会造成相关仪表板的视图失效,确定删除?', '该数据集存在如下血缘关系,删除会造成相关仪表板的视图失效,确定删除?',
cannot_be_deleted_datasource:
'该数据源存在如下血缘关系,删除会造成相关仪表板的视图失效,确定删除?',
edit_folder: '编辑文件夹', edit_folder: '编辑文件夹',
click_to_check: '点击去查看血缘关系', click_to_check: '点击去查看血缘关系',
please_select: '请选择', please_select: '请选择',
...@@ -2060,12 +2095,15 @@ export default { ...@@ -2060,12 +2095,15 @@ export default {
image_size_tips: '图片请不要大于15M', image_size_tips: '图片请不要大于15M',
image_add_tips: '只能插入图片', image_add_tips: '只能插入图片',
watermark: '水印', watermark: '水印',
panel_get_data_error: '获取仪表板信息失败,仪表板可能已经被删除,请检查仪表板状态', panel_get_data_error:
'获取仪表板信息失败,仪表板可能已经被删除,请检查仪表板状态',
panel_no_save_tips: '存在未保存的仪表板', panel_no_save_tips: '存在未保存的仪表板',
panel_cache_use_tips: '检查到上次有仪表板未能正常保存,是否使用上次未保存的仪表板?', panel_cache_use_tips:
'检查到上次有仪表板未能正常保存,是否使用上次未保存的仪表板?',
template_name_tips: '仪表板名称必填', template_name_tips: '仪表板名称必填',
panel_background_item: '自定义仪表板背景', panel_background_item: '自定义仪表板背景',
panel_background_image_tips: '当前支持.jpeg,.jpg,.png,.gif文件,大小不要超过15M', panel_background_image_tips:
'当前支持.jpeg,.jpg,.png,.gif文件,大小不要超过15M',
reUpload: '重新上传', reUpload: '重新上传',
create_by: '创建人', create_by: '创建人',
create_time: '创建时间', create_time: '创建时间',
...@@ -2078,7 +2116,8 @@ export default { ...@@ -2078,7 +2116,8 @@ export default {
template_preview: '预览模板', template_preview: '预览模板',
apply: '应用', apply: '应用',
apply_this_template: '应用此模板', apply_this_template: '应用此模板',
market_network_tips: '查看模板市场模板需要服务器与模板市场(https://dataease.io/templates)连通,请检查网络...', market_network_tips:
'查看模板市场模板需要服务器与模板市场(https://dataease.io/templates)连通,请检查网络...',
enter_name_tips: '请输入仪表板名称', enter_name_tips: '请输入仪表板名称',
name: '名称', name: '名称',
apply_template: '应用模板', apply_template: '应用模板',
...@@ -2095,7 +2134,8 @@ export default { ...@@ -2095,7 +2134,8 @@ export default {
data_format: '日期格式', data_format: '日期格式',
border_color: '边框颜色', border_color: '边框颜色',
theme_change_warn: '主题更换', theme_change_warn: '主题更换',
theme_change_tips: '更换主题将会覆盖视图相关主题属性建议提前备份,是否继续更换?', theme_change_tips:
'更换主题将会覆盖视图相关主题属性建议提前备份,是否继续更换?',
theme_color_change_warn: '主题色更换', theme_color_change_warn: '主题色更换',
theme_color_change_tips: '主题色变更将会覆盖原有视图属性', theme_color_change_tips: '主题色变更将会覆盖原有视图属性',
theme_color: '主题色', theme_color: '主题色',
...@@ -2358,7 +2398,8 @@ export default { ...@@ -2358,7 +2398,8 @@ export default {
link_add_tips_pre: '请点击上方', link_add_tips_pre: '请点击上方',
web_add_tips_suf: '添加网页信息...', web_add_tips_suf: '添加网页信息...',
panel_view_result_show: '视图结果', panel_view_result_show: '视图结果',
panel_view_result_tips: '选择仪表板会覆盖视图的结果展示数量,取值范围1~10000', panel_view_result_tips:
'选择仪表板会覆盖视图的结果展示数量,取值范围1~10000',
timeout_refresh: '请求超时,稍后刷新...', timeout_refresh: '请求超时,稍后刷新...',
mobile_layout: '移动端布局', mobile_layout: '移动端布局',
component_hidden: '隐藏的组件', component_hidden: '隐藏的组件',
...@@ -2490,7 +2531,8 @@ export default { ...@@ -2490,7 +2531,8 @@ export default {
select_all: '全 选', select_all: '全 选',
added: '已添加', added: '已添加',
manual_input: '手工输入', manual_input: '手工输入',
please_fill: '请一行填一个,最多添加500个,识别录入时会自动过滤重复的选项和已经添加过的选项', please_fill:
'请一行填一个,最多添加500个,识别录入时会自动过滤重复的选项和已经添加过的选项',
close: '关 闭', close: '关 闭',
add: '添 加', add: '添 加',
sure: '确 定' sure: '确 定'
...@@ -2680,7 +2722,6 @@ export default { ...@@ -2680,7 +2722,6 @@ export default {
select_openMode: '请选择展示风格', select_openMode: '请选择展示风格',
select_time_format: '请选择时间格式', select_time_format: '请选择时间格式',
select_date_format: '请选择日期格式' select_date_format: '请选择日期格式'
}, },
xpacktask: { xpacktask: {
add: '新增任务', add: '新增任务',
...@@ -2707,7 +2748,6 @@ export default { ...@@ -2707,7 +2748,6 @@ export default {
sure_batch_delete: '确定批量删除任务吗?', sure_batch_delete: '确定批量删除任务吗?',
pixel_error: '分辨率支持{800 - 10000} * {500 - 6250}', pixel_error: '分辨率支持{800 - 10000} * {500 - 6250}',
next_exec_time: '下次执行时间' next_exec_time: '下次执行时间'
}, },
emailtask: { emailtask: {
week_mon: '周一', week_mon: '周一',
...@@ -2805,7 +2845,8 @@ export default { ...@@ -2805,7 +2845,8 @@ export default {
enterprise_edition: '企业版', enterprise_edition: '企业版',
contact_us: '联系我们', contact_us: '联系我们',
demo_video_hint: '如何3分钟制作一个DataEase数据看板、并分享给他人', demo_video_hint: '如何3分钟制作一个DataEase数据看板、并分享给他人',
online_document_hint: '涵盖DataEase的安装步骤、用户手册、使用教程、常见问题的解决方案、以及二次开发等', online_document_hint:
'涵盖DataEase的安装步骤、用户手册、使用教程、常见问题的解决方案、以及二次开发等',
teaching_video_bottom_hint: '更多视频资料', teaching_video_bottom_hint: '更多视频资料',
enterprise_edition_hint1: '提供企业级应用场景X-Pack增强包', enterprise_edition_hint1: '提供企业级应用场景X-Pack增强包',
enterprise_edition_hint2: '提供高等级原厂服务支持', enterprise_edition_hint2: '提供高等级原厂服务支持',
...@@ -2862,7 +2903,8 @@ export default { ...@@ -2862,7 +2903,8 @@ export default {
fileplaceholder: '请上传json格式坐标文件', fileplaceholder: '请上传json格式坐标文件',
delete_confirm: '及子节点都会被删除,确认执行?', delete_confirm: '及子节点都会被删除,确认执行?',
cur_node: '当前节点', cur_node: '当前节点',
prohibit_prompts: '000、156分别是地球村和中华人民共和国区域代码前缀,禁止移除,请使用其他代码前缀!' prohibit_prompts:
'000、156分别是地球村和中华人民共和国区域代码前缀,禁止移除,请使用其他代码前缀!'
}, },
map_mapping: { map_mapping: {
map: '图形', map: '图形',
...@@ -2870,8 +2912,8 @@ export default { ...@@ -2870,8 +2912,8 @@ export default {
empty: '无数据', empty: '无数据',
please_select_map: '请先选择地图范围' please_select_map: '请先选择地图范围'
}, },
'I18N_USER_TEMPLATE_ERROR': '模版错误', I18N_USER_TEMPLATE_ERROR: '模版错误',
'i18n_max_user_import_size': '文件最大不能超过10M', i18n_max_user_import_size: '文件最大不能超过10M',
app_template: { app_template: {
move: '移动', move: '移动',
move_item: '移动应用', move_item: '移动应用',
...@@ -2899,7 +2941,8 @@ export default { ...@@ -2899,7 +2941,8 @@ export default {
panel: '仪表板', panel: '仪表板',
log_delete_tips: '确定删除该条应用记录吗?', log_delete_tips: '确定删除该条应用记录吗?',
log_resource_delete_tips: '删除相关资源(删除后不可恢复)', log_resource_delete_tips: '删除相关资源(删除后不可恢复)',
file_error_tips: '未找到相关数据文件,当前文件可能不是DataEase应用文件,或者文件已经损坏', file_error_tips:
'未找到相关数据文件,当前文件可能不是DataEase应用文件,或者文件已经损坏',
app_export: '应用导出', app_export: '应用导出',
app_version: '应用版本', app_version: '应用版本',
program_version: 'DataEase最低版本', program_version: 'DataEase最低版本',
...@@ -2938,5 +2981,16 @@ export default { ...@@ -2938,5 +2981,16 @@ export default {
confirm_title: '强行登录会导致其他客户端掉线', confirm_title: '强行登录会导致其他客户端掉线',
confirm: '是否强行登录?', confirm: '是否强行登录?',
forced_offline: '`当前账号在客户端【${ip}】登录,您已被挤下线!`' forced_offline: '`当前账号在客户端【${ip}】登录,您已被挤下线!`'
},
amap: {
layer: '区块地图',
layer_type: '类型',
layer_path: '路径',
layer_name: '名称',
theme: '主题',
light: '浅色',
dark: '深色',
hazardLevel: '等级',
center: '中心点'
} }
} }
import Vue from 'vue' import Vue from "vue";
import Cookies from 'js-cookie' import Cookies from "js-cookie";
import '@/styles/index.scss' // global css import "@/styles/index.scss"; // global css
import ElementUI from 'element-ui' import ElementUI from "element-ui";
import Vuetify from 'vuetify' import Vuetify from "vuetify";
import Fit2CloudUI from 'fit2cloud-ui' import Fit2CloudUI from "fit2cloud-ui";
import i18n from './lang' // internationalization import i18n from "./lang"; // internationalization
import App from './App' import App from "./App";
import store from './store' import store from "./store";
import router from './router' import router from "./router";
import message from './utils/message' import message from "./utils/message";
import '@/icons' // icon import "@/icons"; // icon
import '@/permission' // permission control import "@/permission"; // permission control
import api from '@/api/index.js' import api from "@/api/index.js";
import filter from '@/filter/filter' import filter from "@/filter/filter";
import directives from './directive' import directives from "./directive";
import VueClipboard from 'vue-clipboard2' import VueClipboard from "vue-clipboard2";
import widgets from '@/components/widget' import widgets from "@/components/widget";
import Treeselect from '@riophae/vue-treeselect' import Treeselect from "@riophae/vue-treeselect";
import '@riophae/vue-treeselect/dist/vue-treeselect.css' import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import './utils/dialog' import "./utils/dialog";
import DeComplexInput from '@/components/business/conditionTable/DeComplexInput' import DeComplexInput from "@/components/business/conditionTable/DeComplexInput";
import DeComplexSelect from '@/components/business/conditionTable/DeComplexSelect' import DeComplexSelect from "@/components/business/conditionTable/DeComplexSelect";
import DeViewSelect from '@/components/deViewSelect' import DeViewSelect from "@/components/deViewSelect";
import RemarkEditor from '@/views/chart/components/componentStyle/dialog/RemarkEditor' import RemarkEditor from "@/views/chart/components/componentStyle/dialog/RemarkEditor";
import TitleRemark from '@/views/chart/view/TitleRemark' import TitleRemark from "@/views/chart/view/TitleRemark";
import '@/components/canvas/customComponent' // 注册自定义组件 import "@/components/canvas/customComponent"; // 注册自定义组件
import deBtn from '@/components/deCustomCm/DeBtn.vue' import deBtn from "@/components/deCustomCm/DeBtn.vue";
import '@/utils/DateUtil' import "@/utils/DateUtil";
import draggable from 'vuedraggable' import draggable from "vuedraggable";
import deWebsocket from '@/websocket' import deWebsocket from "@/websocket";
import { GaodeMap } from '@antv/l7-maps' import { GaodeMap } from "@antv/l7-maps";
import * as echarts from 'echarts' import * as echarts from "echarts";
import UmyUi from 'umy-ui' import UmyUi from "umy-ui";
// 全屏插件 // 全屏插件
import fullscreen from 'vue-fullscreen' import fullscreen from "vue-fullscreen";
import VueFriendlyIframe from 'vue-friendly-iframe' import VueFriendlyIframe from "vue-friendly-iframe";
import vueToPdf from 'vue-to-pdf' import vueToPdf from "vue-to-pdf";
import VueVideoPlayer from 'vue-video-player' import VueVideoPlayer from "vue-video-player";
import 'video.js/dist/video-js.css' import "video.js/dist/video-js.css";
import '@antv/s2/dist/style.min.css' import "@antv/s2/dist/style.min.css";
import VueAMap from "vue-amap";
// 控制标签宽高成比例的指令 // 控制标签宽高成比例的指令
import proportion from 'vue-proportion-directive' import proportion from "vue-proportion-directive";
import xss from 'xss' import xss from "xss";
// 定义全局XSS解决方法 // 定义全局XSS解决方法
Object.defineProperty(Vue.prototype, '$xss', { Object.defineProperty(Vue.prototype, "$xss", {
value: xss value: xss,
}) });
window._AMapSecurityConfig = {
Vue.config.productionTip = false securityJsCode: "1b336198f587a2a6e3a723f72db8358f",
Vue.use(VueClipboard) };
Vue.use(widgets) Vue.config.productionTip = false;
Vue.component('Draggable', draggable) Vue.use(VueClipboard);
Vue.prototype.$api = api Vue.use(widgets);
Vue.component("Draggable", draggable);
Vue.prototype.$echarts = echarts Vue.prototype.$api = api;
Vue.prototype.$gaodeMap = GaodeMap
Vue.prototype.$echarts = echarts;
Vue.use(UmyUi) Vue.prototype.$gaodeMap = GaodeMap;
Vue.use(fullscreen) Vue.use(UmyUi);
Vue.use(VueFriendlyIframe) Vue.use(fullscreen);
Vue.use(Vuetify)
Vue.use(VueFriendlyIframe);
Vue.use(Vuetify);
Vue.use(VueAMap);
VueAMap.initAMapApiLoader({
key: "9e49146176f7e9153ffe8a982638fae6",
plugin: [
"AMap.Scale",
"AMap.OverView",
"AMap.ToolBar",
"AMap.MapType",
"AMap.PlaceSearch",
"AMap.Geolocation",
"AMap.Geocoder",
"AMap.DistrictSearch",
"AMap.Polygon",
],
v: "2.0",
});
// import TEditor from '@/components/Tinymce/index.vue' // import TEditor from '@/components/Tinymce/index.vue'
// Vue.component('TEditor', TEditor) // Vue.component('TEditor', TEditor)
...@@ -76,80 +97,83 @@ Vue.use(Vuetify) ...@@ -76,80 +97,83 @@ Vue.use(Vuetify)
* Currently MockJs will be used in the production environment, * Currently MockJs will be used in the production environment,
* please remove it before going online ! ! ! * please remove it before going online ! ! !
*/ */
if (process.env.NODE_ENV === 'production') { if (process.env.NODE_ENV === "production") {
// const { mockXHR } = require('../mock') // const { mockXHR } = require('../mock')
// mockXHR() // mockXHR()
} }
// set ElementUI lang to EN // set ElementUI lang to EN
// Vue.use(ElementUI, { locale }) // Vue.use(ElementUI, { locale })
// 如果想要中文版 element-ui,按如下方式声明 // 如果想要中文版 element-ui,按如下方式声明
ElementUI.Dialog.props.closeOnClickModal.default = false ElementUI.Dialog.props.closeOnClickModal.default = false;
ElementUI.Dialog.props.closeOnPressEscape.default = false ElementUI.Dialog.props.closeOnPressEscape.default = false;
Vue.use(ElementUI, { Vue.use(ElementUI, {
size: Cookies.get('size') || 'medium', // set element-ui default size size: Cookies.get("size") || "medium", // set element-ui default size
i18n: (key, value) => i18n.t(key, value) i18n: (key, value) => i18n.t(key, value),
}) });
Vue.use(Fit2CloudUI, { Vue.use(Fit2CloudUI, {
i18n: (key, value) => i18n.t(key, value) i18n: (key, value) => i18n.t(key, value),
}) });
// Vue.use(VueAxios, axios) // Vue.use(VueAxios, axios)
Vue.use(filter) Vue.use(filter);
Vue.use(directives) Vue.use(directives);
Vue.use(message) Vue.use(message);
Vue.component('Treeselect', Treeselect) Vue.component("Treeselect", Treeselect);
Vue.component('DeComplexInput', DeComplexInput) Vue.component("DeComplexInput", DeComplexInput);
Vue.component('DeComplexSelect', DeComplexSelect) Vue.component("DeComplexSelect", DeComplexSelect);
Vue.component('DeViewSelect', DeViewSelect) Vue.component("DeViewSelect", DeViewSelect);
Vue.component('RemarkEditor', RemarkEditor) Vue.component("RemarkEditor", RemarkEditor);
Vue.component('TitleRemark', TitleRemark) Vue.component("TitleRemark", TitleRemark);
Vue.component('DeBtn', deBtn) Vue.component("DeBtn", deBtn);
Vue.config.productionTip = false Vue.config.productionTip = false;
Vue.use(vueToPdf) Vue.use(vueToPdf);
Vue.use(VueVideoPlayer) Vue.use(VueVideoPlayer);
Vue.use(proportion) Vue.use(proportion);
Vue.prototype.hasDataPermission = function(pTarget, pSource) { Vue.prototype.hasDataPermission = function (pTarget, pSource) {
if (this.$store.state.user.user.isAdmin || pSource === 'ignore') { if (this.$store.state.user.user.isAdmin || pSource === "ignore") {
return true return true;
} }
if (pSource && pTarget) { if (pSource && pTarget) {
return pSource.indexOf(pTarget) > -1 return pSource.indexOf(pTarget) > -1;
} }
return false return false;
} };
Vue.prototype.checkPermission = function(pers) { Vue.prototype.checkPermission = function (pers) {
const permissions = store.getters.permissions const permissions = store.getters.permissions;
const hasPermission = pers.every(needP => { const hasPermission = pers.every((needP) => {
const result = permissions.includes(needP) const result = permissions.includes(needP);
return result return result;
}) });
return hasPermission return hasPermission;
} };
Vue.use(deWebsocket) Vue.use(deWebsocket);
Vue.prototype.$currentHttpRequestList = new Map() Vue.prototype.$currentHttpRequestList = new Map();
Vue.prototype.$cancelRequest = function(cancelkey) { Vue.prototype.$cancelRequest = function (cancelkey) {
if (cancelkey) { if (cancelkey) {
if (cancelkey.indexOf('/**') > -1) { if (cancelkey.indexOf("/**") > -1) {
Vue.prototype.$currentHttpRequestList.forEach((item, key) => { Vue.prototype.$currentHttpRequestList.forEach((item, key) => {
key.indexOf(cancelkey.split('/**')[0]) > -1 && item('Operation canceled by the user.') key.indexOf(cancelkey.split("/**")[0]) > -1 &&
}) item("Operation canceled by the user.");
});
} else { } else {
Vue.prototype.$currentHttpRequestList.get(cancelkey) && Vue.prototype.$currentHttpRequestList.get(cancelkey)('Operation canceled by the user.') Vue.prototype.$currentHttpRequestList.get(cancelkey) &&
Vue.prototype.$currentHttpRequestList.get(cancelkey)(
"Operation canceled by the user."
);
} }
} }
} };
new Vue({ new Vue({
router, router,
store, store,
i18n, i18n,
render: h => h(App) render: (h) => h(App),
}).$mount('#app') }).$mount("#app");
...@@ -4,15 +4,17 @@ import _ from 'lodash' ...@@ -4,15 +4,17 @@ import _ from 'lodash'
export function hexColorToRGBA(hex, alpha) { export function hexColorToRGBA(hex, alpha) {
const rgb = [] // 定义rgb数组 const rgb = [] // 定义rgb数组
if (/^\#[0-9A-F]{3}$/i.test(hex)) { // 判断传入是否为#三位十六进制数 if (/^\#[0-9A-F]{3}$/i.test(hex)) {
// 判断传入是否为#三位十六进制数
let sixHex = '#' let sixHex = '#'
hex.replace(/[0-9A-F]/ig, function(kw) { hex.replace(/[0-9A-F]/gi, function(kw) {
sixHex += kw + kw // 把三位16进制数转化为六位 sixHex += kw + kw // 把三位16进制数转化为六位
}) })
hex = sixHex // 保存回hex hex = sixHex // 保存回hex
} }
if (/^#[0-9A-F]{6}$/i.test(hex)) { // 判断传入是否为#六位十六进制数 if (/^#[0-9A-F]{6}$/i.test(hex)) {
hex.replace(/[0-9A-F]{2}/ig, function(kw) { // 判断传入是否为#六位十六进制数
hex.replace(/[0-9A-F]{2}/gi, function(kw) {
// eslint-disable-next-line no-eval // eslint-disable-next-line no-eval
rgb.push(eval('0x' + kw)) // 十六进制转化为十进制并存如数组 rgb.push(eval('0x' + kw)) // 十六进制转化为十进制并存如数组
}) })
...@@ -163,10 +165,7 @@ export const TYPE_CONFIGS = [ ...@@ -163,10 +165,7 @@ export const TYPE_CONFIGS = [
'tableRowTooltip', 'tableRowTooltip',
'tableColTooltip' 'tableColTooltip'
], ],
'total-cfg': [ 'total-cfg': ['row', 'col'],
'row',
'col'
],
'title-selector-ant-v': [ 'title-selector-ant-v': [
'show', 'show',
'title', 'title',
...@@ -194,10 +193,7 @@ export const TYPE_CONFIGS = [ ...@@ -194,10 +193,7 @@ export const TYPE_CONFIGS = [
'title-selector-ant-v' 'title-selector-ant-v'
], ],
propertyInner: { propertyInner: {
'color-selector': [ 'color-selector': ['quotaColor', 'dimensionColor'],
'quotaColor',
'dimensionColor'
],
'size-selector-ant-v': [ 'size-selector-ant-v': [
'quotaFontSize', 'quotaFontSize',
'quotaFontFamily', 'quotaFontFamily',
...@@ -241,10 +237,7 @@ export const TYPE_CONFIGS = [ ...@@ -241,10 +237,7 @@ export const TYPE_CONFIGS = [
'title-selector-ant-v' 'title-selector-ant-v'
], ],
propertyInner: { propertyInner: {
'color-selector': [ 'color-selector': ['quotaColor', 'dimensionColor'],
'quotaColor',
'dimensionColor'
],
'size-selector-ant-v': [ 'size-selector-ant-v': [
'quotaFontSize', 'quotaFontSize',
'quotaFontFamily', 'quotaFontFamily',
...@@ -289,12 +282,7 @@ export const TYPE_CONFIGS = [ ...@@ -289,12 +282,7 @@ export const TYPE_CONFIGS = [
'title-selector-ant-v' 'title-selector-ant-v'
], ],
propertyInner: { propertyInner: {
'color-selector': [ 'color-selector': ['value', 'custom', 'gradient', 'alpha'],
'value',
'custom',
'gradient',
'alpha'
],
'size-selector-ant-v': [ 'size-selector-ant-v': [
'gaugeMin', 'gaugeMin',
'gaugeMax', 'gaugeMax',
...@@ -303,9 +291,7 @@ export const TYPE_CONFIGS = [ ...@@ -303,9 +291,7 @@ export const TYPE_CONFIGS = [
'gaugeTickCount', 'gaugeTickCount',
'gaugeAxisLine' 'gaugeAxisLine'
], ],
'label-selector-ant-v': [ 'label-selector-ant-v': ['labelGauge'],
'labelGauge'
],
'title-selector-ant-v': [ 'title-selector-ant-v': [
'show', 'show',
'title', 'title',
...@@ -334,19 +320,9 @@ export const TYPE_CONFIGS = [ ...@@ -334,19 +320,9 @@ export const TYPE_CONFIGS = [
'title-selector-ant-v' 'title-selector-ant-v'
], ],
propertyInner: { propertyInner: {
'color-selector': [ 'color-selector': ['value', 'custom', 'alpha'],
'value', 'size-selector-ant-v': ['liquidShape', 'liquidMax', 'liquidSize'],
'custom', 'label-selector-ant-v': ['labelGauge'],
'alpha'
],
'size-selector-ant-v': [
'liquidShape',
'liquidMax',
'liquidSize'
],
'label-selector-ant-v': [
'labelGauge'
],
'title-selector-ant-v': [ 'title-selector-ant-v': [
'show', 'show',
'title', 'title',
...@@ -368,13 +344,9 @@ export const TYPE_CONFIGS = [ ...@@ -368,13 +344,9 @@ export const TYPE_CONFIGS = [
value: 'richTextView', value: 'richTextView',
title: 'chart.rich_text_view', title: 'chart.rich_text_view',
icon: 'richTextView', icon: 'richTextView',
properties: [ properties: ['title-selector-ant-v'],
'title-selector-ant-v'
],
propertyInner: { propertyInner: {
'title-selector-ant-v': [ 'title-selector-ant-v': ['title']
'title'
]
} }
}, },
{ {
...@@ -394,27 +366,15 @@ export const TYPE_CONFIGS = [ ...@@ -394,27 +366,15 @@ export const TYPE_CONFIGS = [
'legend-selector-ant-v' 'legend-selector-ant-v'
], ],
propertyInner: { propertyInner: {
'color-selector': [ 'color-selector': ['value', 'colorPanel', 'customColor', 'alpha'],
'value',
'colorPanel',
'customColor',
'alpha'
],
'size-selector-ant-v': [ 'size-selector-ant-v': [
'lineWidth', 'lineWidth',
'lineSymbol', 'lineSymbol',
'lineSymbolSize', 'lineSymbolSize',
'lineSmooth' 'lineSmooth'
], ],
'label-selector-ant-v': [ 'label-selector-ant-v': ['show', 'fontSize', 'color'],
'show', 'tooltip-selector-ant-v': ['show', 'textStyle'],
'fontSize',
'color'
],
'tooltip-selector-ant-v': [
'show',
'textStyle'
],
'x-axis-selector-ant-v': [ 'x-axis-selector-ant-v': [
'show', 'show',
'position', 'position',
...@@ -487,15 +447,8 @@ export const TYPE_CONFIGS = [ ...@@ -487,15 +447,8 @@ export const TYPE_CONFIGS = [
'lineSymbolSize', 'lineSymbolSize',
'lineSmooth' 'lineSmooth'
], ],
'label-selector-ant-v': [ 'label-selector-ant-v': ['show', 'fontSize', 'color'],
'show', 'tooltip-selector-ant-v': ['show', 'textStyle'],
'fontSize',
'color'
],
'tooltip-selector-ant-v': [
'show',
'textStyle'
],
'x-axis-selector-ant-v': [ 'x-axis-selector-ant-v': [
'show', 'show',
'position', 'position',
...@@ -568,15 +521,8 @@ export const TYPE_CONFIGS = [ ...@@ -568,15 +521,8 @@ export const TYPE_CONFIGS = [
'lineSymbolSize', 'lineSymbolSize',
'lineSmooth' 'lineSmooth'
], ],
'label-selector-ant-v': [ 'label-selector-ant-v': ['show', 'fontSize', 'color'],
'show', 'tooltip-selector-ant-v': ['show', 'textStyle'],
'fontSize',
'color'
],
'tooltip-selector-ant-v': [
'show',
'textStyle'
],
'x-axis-selector-ant-v': [ 'x-axis-selector-ant-v': [
'show', 'show',
'position', 'position',
...@@ -643,20 +589,9 @@ export const TYPE_CONFIGS = [ ...@@ -643,20 +589,9 @@ export const TYPE_CONFIGS = [
'gradient', 'gradient',
'alpha' 'alpha'
], ],
'size-selector-ant-v': [ 'size-selector-ant-v': ['barDefault', 'barGap'],
'barDefault', 'label-selector-ant-v': ['show', 'fontSize', 'color', 'position-v'],
'barGap' 'tooltip-selector-ant-v': ['show', 'textStyle'],
],
'label-selector-ant-v': [
'show',
'fontSize',
'color',
'position-v'
],
'tooltip-selector-ant-v': [
'show',
'textStyle'
],
'x-axis-selector-ant-v': [ 'x-axis-selector-ant-v': [
'show', 'show',
'position', 'position',
...@@ -723,20 +658,9 @@ export const TYPE_CONFIGS = [ ...@@ -723,20 +658,9 @@ export const TYPE_CONFIGS = [
'gradient', 'gradient',
'alpha' 'alpha'
], ],
'size-selector-ant-v': [ 'size-selector-ant-v': ['barDefault', 'barGap'],
'barDefault', 'label-selector-ant-v': ['show', 'fontSize', 'color', 'position-v'],
'barGap' 'tooltip-selector-ant-v': ['show', 'textStyle'],
],
'label-selector-ant-v': [
'show',
'fontSize',
'color',
'position-v'
],
'tooltip-selector-ant-v': [
'show',
'textStyle'
],
'x-axis-selector-ant-v': [ 'x-axis-selector-ant-v': [
'show', 'show',
'position', 'position',
...@@ -803,20 +727,9 @@ export const TYPE_CONFIGS = [ ...@@ -803,20 +727,9 @@ export const TYPE_CONFIGS = [
'gradient', 'gradient',
'alpha' 'alpha'
], ],
'size-selector-ant-v': [ 'size-selector-ant-v': ['barDefault', 'barGap'],
'barDefault', 'label-selector-ant-v': ['show', 'fontSize', 'color', 'position-v'],
'barGap' 'tooltip-selector-ant-v': ['show', 'textStyle'],
],
'label-selector-ant-v': [
'show',
'fontSize',
'color',
'position-v'
],
'tooltip-selector-ant-v': [
'show',
'textStyle'
],
'x-axis-selector-ant-v': [ 'x-axis-selector-ant-v': [
'show', 'show',
'position', 'position',
...@@ -883,10 +796,7 @@ export const TYPE_CONFIGS = [ ...@@ -883,10 +796,7 @@ export const TYPE_CONFIGS = [
'gradient', 'gradient',
'alpha' 'alpha'
], ],
'size-selector-ant-v': [ 'size-selector-ant-v': ['barDefault', 'barGap'],
'barDefault',
'barGap'
],
'label-selector-ant-v': [ 'label-selector-ant-v': [
'show', 'show',
'fontSize', 'fontSize',
...@@ -894,10 +804,7 @@ export const TYPE_CONFIGS = [ ...@@ -894,10 +804,7 @@ export const TYPE_CONFIGS = [
'position-v', 'position-v',
'labelContent' 'labelContent'
], ],
'tooltip-selector-ant-v': [ 'tooltip-selector-ant-v': ['show', 'textStyle'],
'show',
'textStyle'
],
'x-axis-selector-ant-v': [ 'x-axis-selector-ant-v': [
'show', 'show',
'position', 'position',
...@@ -955,22 +862,9 @@ export const TYPE_CONFIGS = [ ...@@ -955,22 +862,9 @@ export const TYPE_CONFIGS = [
'title-selector-ant-v' 'title-selector-ant-v'
], ],
propertyInner: { propertyInner: {
'color-selector': [ 'color-selector': ['value', 'custom', 'gradient', 'alpha'],
'value', 'label-selector-ant-v': ['show', 'fontSize', 'color', 'position-v'],
'custom', 'tooltip-selector-ant-v': ['show', 'textStyle'],
'gradient',
'alpha'
],
'label-selector-ant-v': [
'show',
'fontSize',
'color',
'position-v'
],
'tooltip-selector-ant-v': [
'show',
'textStyle'
],
'x-axis-selector-ant-v': [ 'x-axis-selector-ant-v': [
'show', 'show',
'position', 'position',
...@@ -1029,20 +923,9 @@ export const TYPE_CONFIGS = [ ...@@ -1029,20 +923,9 @@ export const TYPE_CONFIGS = [
'gradient', 'gradient',
'alpha' 'alpha'
], ],
'size-selector-ant-v': [ 'size-selector-ant-v': ['barDefault', 'barGap'],
'barDefault', 'label-selector-ant-v': ['show', 'fontSize', 'color', 'position-h'],
'barGap' 'tooltip-selector-ant-v': ['show', 'textStyle'],
],
'label-selector-ant-v': [
'show',
'fontSize',
'color',
'position-h'
],
'tooltip-selector-ant-v': [
'show',
'textStyle'
],
'x-axis-selector-ant-v': [ 'x-axis-selector-ant-v': [
'show', 'show',
'position', 'position',
...@@ -1109,20 +992,9 @@ export const TYPE_CONFIGS = [ ...@@ -1109,20 +992,9 @@ export const TYPE_CONFIGS = [
'gradient', 'gradient',
'alpha' 'alpha'
], ],
'size-selector-ant-v': [ 'size-selector-ant-v': ['barDefault', 'barGap'],
'barDefault', 'label-selector-ant-v': ['show', 'fontSize', 'color', 'position-h'],
'barGap' 'tooltip-selector-ant-v': ['show', 'textStyle'],
],
'label-selector-ant-v': [
'show',
'fontSize',
'color',
'position-h'
],
'tooltip-selector-ant-v': [
'show',
'textStyle'
],
'x-axis-selector-ant-v': [ 'x-axis-selector-ant-v': [
'show', 'show',
'position', 'position',
...@@ -1195,10 +1067,7 @@ export const TYPE_CONFIGS = [ ...@@ -1195,10 +1067,7 @@ export const TYPE_CONFIGS = [
'position-h', 'position-h',
'reserveDecimalCount' 'reserveDecimalCount'
], ],
'tooltip-selector-ant-v': [ 'tooltip-selector-ant-v': ['show', 'textStyle'],
'show',
'textStyle'
],
'x-axis-selector-ant-v': [ 'x-axis-selector-ant-v': [
'show', 'show',
'position', 'position',
...@@ -1257,15 +1126,8 @@ export const TYPE_CONFIGS = [ ...@@ -1257,15 +1126,8 @@ export const TYPE_CONFIGS = [
'legend-selector-ant-v' 'legend-selector-ant-v'
], ],
propertyInner: { propertyInner: {
'color-selector': [ 'color-selector': ['value', 'colorPanel', 'customColor', 'alpha'],
'value', 'size-selector-ant-v': ['pieOuterRadius'],
'colorPanel',
'customColor',
'alpha'
],
'size-selector-ant-v': [
'pieOuterRadius'
],
'label-selector-ant-v': [ 'label-selector-ant-v': [
'show', 'show',
'fontSize', 'fontSize',
...@@ -1274,10 +1136,7 @@ export const TYPE_CONFIGS = [ ...@@ -1274,10 +1136,7 @@ export const TYPE_CONFIGS = [
'labelContent', 'labelContent',
'reserveDecimalCount' 'reserveDecimalCount'
], ],
'tooltip-selector-ant-v': [ 'tooltip-selector-ant-v': ['show', 'textStyle'],
'show',
'textStyle'
],
'title-selector-ant-v': [ 'title-selector-ant-v': [
'show', 'show',
'title', 'title',
...@@ -1316,16 +1175,8 @@ export const TYPE_CONFIGS = [ ...@@ -1316,16 +1175,8 @@ export const TYPE_CONFIGS = [
'legend-selector-ant-v' 'legend-selector-ant-v'
], ],
propertyInner: { propertyInner: {
'color-selector': [ 'color-selector': ['value', 'colorPanel', 'customColor', 'alpha'],
'value', 'size-selector-ant-v': ['pieInnerRadius', 'pieOuterRadius'],
'colorPanel',
'customColor',
'alpha'
],
'size-selector-ant-v': [
'pieInnerRadius',
'pieOuterRadius'
],
'label-selector-ant-v': [ 'label-selector-ant-v': [
'show', 'show',
'fontSize', 'fontSize',
...@@ -1334,10 +1185,7 @@ export const TYPE_CONFIGS = [ ...@@ -1334,10 +1185,7 @@ export const TYPE_CONFIGS = [
'labelContent', 'labelContent',
'reserveDecimalCount' 'reserveDecimalCount'
], ],
'tooltip-selector-ant-v': [ 'tooltip-selector-ant-v': ['show', 'textStyle'],
'show',
'textStyle'
],
'title-selector-ant-v': [ 'title-selector-ant-v': [
'show', 'show',
'title', 'title',
...@@ -1376,25 +1224,10 @@ export const TYPE_CONFIGS = [ ...@@ -1376,25 +1224,10 @@ export const TYPE_CONFIGS = [
'legend-selector-ant-v' 'legend-selector-ant-v'
], ],
propertyInner: { propertyInner: {
'color-selector': [ 'color-selector': ['value', 'colorPanel', 'customColor', 'alpha'],
'value', 'size-selector-ant-v': ['pieOuterRadius'],
'colorPanel', 'label-selector-ant-v': ['show', 'fontSize', 'color', 'position-pie'],
'customColor', 'tooltip-selector-ant-v': ['show', 'textStyle'],
'alpha'
],
'size-selector-ant-v': [
'pieOuterRadius'
],
'label-selector-ant-v': [
'show',
'fontSize',
'color',
'position-pie'
],
'tooltip-selector-ant-v': [
'show',
'textStyle'
],
'title-selector-ant-v': [ 'title-selector-ant-v': [
'show', 'show',
'title', 'title',
...@@ -1433,26 +1266,10 @@ export const TYPE_CONFIGS = [ ...@@ -1433,26 +1266,10 @@ export const TYPE_CONFIGS = [
'legend-selector-ant-v' 'legend-selector-ant-v'
], ],
propertyInner: { propertyInner: {
'color-selector': [ 'color-selector': ['value', 'colorPanel', 'customColor', 'alpha'],
'value', 'size-selector-ant-v': ['pieInnerRadius', 'pieOuterRadius'],
'colorPanel', 'label-selector-ant-v': ['show', 'fontSize', 'color', 'position-pie'],
'customColor', 'tooltip-selector-ant-v': ['show', 'textStyle'],
'alpha'
],
'size-selector-ant-v': [
'pieInnerRadius',
'pieOuterRadius'
],
'label-selector-ant-v': [
'show',
'fontSize',
'color',
'position-pie'
],
'tooltip-selector-ant-v': [
'show',
'textStyle'
],
'title-selector-ant-v': [ 'title-selector-ant-v': [
'show', 'show',
'title', 'title',
...@@ -1506,10 +1323,7 @@ export const TYPE_CONFIGS = [ ...@@ -1506,10 +1323,7 @@ export const TYPE_CONFIGS = [
'position-v', 'position-v',
'reserveDecimalCount' 'reserveDecimalCount'
], ],
'tooltip-selector-ant-v': [ 'tooltip-selector-ant-v': ['show', 'textStyle'],
'show',
'textStyle'
],
'x-axis-selector-ant-v': [ 'x-axis-selector-ant-v': [
'show', 'show',
'position', 'position',
...@@ -1575,16 +1389,8 @@ export const TYPE_CONFIGS = [ ...@@ -1575,16 +1389,8 @@ export const TYPE_CONFIGS = [
'gradient', 'gradient',
'alpha' 'alpha'
], ],
'label-selector-ant-v': [ 'label-selector-ant-v': ['show', 'fontSize', 'color', 'position-h'],
'show', 'tooltip-selector-ant-v': ['show', 'textStyle'],
'fontSize',
'color',
'position-h'
],
'tooltip-selector-ant-v': [
'show',
'textStyle'
],
'x-axis-selector-ant-v': [ 'x-axis-selector-ant-v': [
'show', 'show',
'position', 'position',
...@@ -1643,26 +1449,10 @@ export const TYPE_CONFIGS = [ ...@@ -1643,26 +1449,10 @@ export const TYPE_CONFIGS = [
'legend-selector-ant-v' 'legend-selector-ant-v'
], ],
propertyInner: { propertyInner: {
'color-selector': [ 'color-selector': ['value', 'colorPanel', 'customColor', 'alpha'],
'value', 'size-selector-ant-v': ['radarShape', 'radarSize'],
'colorPanel', 'label-selector-ant-v': ['show', 'fontSize', 'color', 'position-v'],
'customColor', 'tooltip-selector-ant-v': ['show', 'textStyle'],
'alpha'
],
'size-selector-ant-v': [
'radarShape',
'radarSize'
],
'label-selector-ant-v': [
'show',
'fontSize',
'color',
'position-v'
],
'tooltip-selector-ant-v': [
'show',
'textStyle'
],
'title-selector-ant-v': [ 'title-selector-ant-v': [
'show', 'show',
'title', 'title',
...@@ -1684,11 +1474,7 @@ export const TYPE_CONFIGS = [ ...@@ -1684,11 +1474,7 @@ export const TYPE_CONFIGS = [
'hPosition', 'hPosition',
'vPosition' 'vPosition'
], ],
'split-selector-ant-v': [ 'split-selector-ant-v': ['splitForm', 'name', 'lineStyle']
'splitForm',
'name',
'lineStyle'
]
} }
}, },
{ {
...@@ -1705,20 +1491,9 @@ export const TYPE_CONFIGS = [ ...@@ -1705,20 +1491,9 @@ export const TYPE_CONFIGS = [
'legend-selector-ant-v' 'legend-selector-ant-v'
], ],
propertyInner: { propertyInner: {
'color-selector': [ 'color-selector': ['value', 'custom', 'alpha'],
'value', 'label-selector-ant-v': ['show', 'fontSize', 'color'],
'custom', 'tooltip-selector-ant-v': ['show', 'textStyle'],
'alpha'
],
'label-selector-ant-v': [
'show',
'fontSize',
'color'
],
'tooltip-selector-ant-v': [
'show',
'textStyle'
],
'title-selector-ant-v': [ 'title-selector-ant-v': [
'show', 'show',
'title', 'title',
...@@ -1755,19 +1530,9 @@ export const TYPE_CONFIGS = [ ...@@ -1755,19 +1530,9 @@ export const TYPE_CONFIGS = [
'size-selector-ant-v' 'size-selector-ant-v'
], ],
propertyInner: { propertyInner: {
'color-selector': [ 'color-selector': ['value', 'custom', 'alpha'],
'value', 'size-selector-ant-v': ['wordSizeRange', 'wordSpacing'],
'custom', 'tooltip-selector-ant-v': ['show', 'textStyle'],
'alpha'
],
'size-selector-ant-v': [
'wordSizeRange',
'wordSpacing'
],
'tooltip-selector-ant-v': [
'show',
'textStyle'
],
'title-selector-ant-v': [ 'title-selector-ant-v': [
'show', 'show',
'title', 'title',
...@@ -1801,25 +1566,10 @@ export const TYPE_CONFIGS = [ ...@@ -1801,25 +1566,10 @@ export const TYPE_CONFIGS = [
'legend-selector-ant-v' 'legend-selector-ant-v'
], ],
propertyInner: { propertyInner: {
'color-selector': [ 'color-selector': ['value', 'colorPanel', 'customColor', 'alpha'],
'value', 'size-selector-ant-v': ['scatterSymbol', 'scatterSymbolSize'],
'colorPanel', 'label-selector-ant-v': ['show', 'fontSize', 'color'],
'customColor', 'tooltip-selector-ant-v': ['show', 'textStyle'],
'alpha'
],
'size-selector-ant-v': [
'scatterSymbol',
'scatterSymbolSize'
],
'label-selector-ant-v': [
'show',
'fontSize',
'color'
],
'tooltip-selector-ant-v': [
'show',
'textStyle'
],
'x-axis-selector-ant-v': [ 'x-axis-selector-ant-v': [
'show', 'show',
'position', 'position',
...@@ -1876,22 +1626,9 @@ export const TYPE_CONFIGS = [ ...@@ -1876,22 +1626,9 @@ export const TYPE_CONFIGS = [
'legend-selector-ant-v' 'legend-selector-ant-v'
], ],
propertyInner: { propertyInner: {
'color-selector': [ 'color-selector': ['value', 'colorPanel', 'customColor', 'alpha'],
'value', 'label-selector-ant-v': ['show', 'fontSize', 'color', 'position-h'],
'colorPanel', 'tooltip-selector-ant-v': ['show', 'textStyle'],
'customColor',
'alpha'
],
'label-selector-ant-v': [
'show',
'fontSize',
'color',
'position-h'
],
'tooltip-selector-ant-v': [
'show',
'textStyle'
],
'title-selector-ant-v': [ 'title-selector-ant-v': [
'show', 'show',
'title', 'title',
...@@ -1928,22 +1665,9 @@ export const TYPE_CONFIGS = [ ...@@ -1928,22 +1665,9 @@ export const TYPE_CONFIGS = [
'legend-selector-ant-v' 'legend-selector-ant-v'
], ],
propertyInner: { propertyInner: {
'color-selector': [ 'color-selector': ['value', 'colorPanel', 'customColor', 'alpha'],
'value', 'label-selector-ant-v': ['show', 'fontSize', 'color', 'position-h'],
'colorPanel', 'tooltip-selector-ant-v': ['show', 'textStyle'],
'customColor',
'alpha'
],
'label-selector-ant-v': [
'show',
'fontSize',
'color',
'position-h'
],
'tooltip-selector-ant-v': [
'show',
'textStyle'
],
'title-selector-ant-v': [ 'title-selector-ant-v': [
'show', 'show',
'title', 'title',
...@@ -2023,10 +1747,7 @@ export const TYPE_CONFIGS = [ ...@@ -2023,10 +1747,7 @@ export const TYPE_CONFIGS = [
'title-selector-ant-v' 'title-selector-ant-v'
], ],
propertyInner: { propertyInner: {
'color-selector': [ 'color-selector': ['mapStyle', 'value'],
'mapStyle',
'value'
],
'size-selector-ant-v': [ 'size-selector-ant-v': [
'mapPitch', 'mapPitch',
'mapLineType', 'mapLineType',
...@@ -2064,13 +1785,8 @@ export const TYPE_CONFIGS = [ ...@@ -2064,13 +1785,8 @@ export const TYPE_CONFIGS = [
'title-selector-ant-v' 'title-selector-ant-v'
], ],
propertyInner: { propertyInner: {
'color-selector': [ 'color-selector': ['mapStyle', 'value'],
'mapStyle', 'size-selector-ant-v': ['mapPitch'],
'value'
],
'size-selector-ant-v': [
'mapPitch'
],
'title-selector-ant-v': [ 'title-selector-ant-v': [
'show', 'show',
'title', 'title',
...@@ -2099,12 +1815,8 @@ export const TYPE_CONFIGS = [ ...@@ -2099,12 +1815,8 @@ export const TYPE_CONFIGS = [
'title-selector-ant-v' 'title-selector-ant-v'
], ],
propertyInner: { propertyInner: {
'color-selector': [ 'color-selector': ['mapStyle'],
'mapStyle' 'size-selector-ant-v': ['mapPitch'],
],
'size-selector-ant-v': [
'mapPitch'
],
'title-selector-ant-v': [ 'title-selector-ant-v': [
'show', 'show',
'title', 'title',
...@@ -2133,14 +1845,8 @@ export const TYPE_CONFIGS = [ ...@@ -2133,14 +1845,8 @@ export const TYPE_CONFIGS = [
'title-selector-ant-v' 'title-selector-ant-v'
], ],
propertyInner: { propertyInner: {
'color-selector': [ 'color-selector': ['mapStyle', 'value', 'gradient-color'],
'mapStyle', 'size-selector-ant-v': ['mapPitch'],
'value',
'gradient-color'
],
'size-selector-ant-v': [
'mapPitch'
],
'title-selector-ant-v': [ 'title-selector-ant-v': [
'show', 'show',
'title', 'title',
...@@ -2169,12 +1875,8 @@ export const TYPE_CONFIGS = [ ...@@ -2169,12 +1875,8 @@ export const TYPE_CONFIGS = [
'title-selector-ant-v' 'title-selector-ant-v'
], ],
propertyInner: { propertyInner: {
'color-selector': [ 'color-selector': ['mapStyle'],
'mapStyle' 'size-selector-ant-v': ['mapPitch'],
],
'size-selector-ant-v': [
'mapPitch'
],
'title-selector-ant-v': [ 'title-selector-ant-v': [
'show', 'show',
'title', 'title',
...@@ -2198,14 +1900,9 @@ export const TYPE_CONFIGS = [ ...@@ -2198,14 +1900,9 @@ export const TYPE_CONFIGS = [
value: 'float', value: 'float',
title: 'chart.chart_float_map', title: 'chart.chart_float_map',
icon: 'float', icon: 'float',
properties: [ properties: ['size-selector-ant-v', 'title-selector-ant-v'],
'size-selector-ant-v',
'title-selector-ant-v'
],
propertyInner: { propertyInner: {
'size-selector-ant-v': [ 'size-selector-ant-v': ['mapPitch'],
'mapPitch'
],
'title-selector-ant-v': [ 'title-selector-ant-v': [
'show', 'show',
'title', 'title',
...@@ -2235,13 +1932,8 @@ export const TYPE_CONFIGS = [ ...@@ -2235,13 +1932,8 @@ export const TYPE_CONFIGS = [
'title-selector-ant-v' 'title-selector-ant-v'
], ],
propertyInner: { propertyInner: {
'color-selector': ['mapStyle'],
'color-selector': [ 'size-selector-ant-v': ['mapPitch'],
'mapStyle'
],
'size-selector-ant-v': [
'mapPitch'
],
'title-selector-ant-v': [ 'title-selector-ant-v': [
'show', 'show',
'title', 'title',
...@@ -2264,11 +1956,7 @@ export const TYPE_CONFIGS = [ ...@@ -2264,11 +1956,7 @@ export const TYPE_CONFIGS = [
value: 'table-normal', value: 'table-normal',
title: 'chart.chart_table_normal', title: 'chart.chart_table_normal',
icon: 'table-normal', icon: 'table-normal',
properties: [ properties: ['color-selector', 'size-selector', 'title-selector'],
'color-selector',
'size-selector',
'title-selector'
],
propertyInner: { propertyInner: {
'color-selector': [ 'color-selector': [
'tableHeaderBgColor', 'tableHeaderBgColor',
...@@ -2306,11 +1994,7 @@ export const TYPE_CONFIGS = [ ...@@ -2306,11 +1994,7 @@ export const TYPE_CONFIGS = [
value: 'table-info', value: 'table-info',
title: 'chart.chart_table_info', title: 'chart.chart_table_info',
icon: 'table-info', icon: 'table-info',
properties: [ properties: ['color-selector', 'size-selector', 'title-selector'],
'color-selector',
'size-selector',
'title-selector'
],
propertyInner: { propertyInner: {
'color-selector': [ 'color-selector': [
'tableHeaderBgColor', 'tableHeaderBgColor',
...@@ -2352,17 +2036,9 @@ export const TYPE_CONFIGS = [ ...@@ -2352,17 +2036,9 @@ export const TYPE_CONFIGS = [
value: 'label', value: 'label',
title: 'chart.chart_label', title: 'chart.chart_label',
icon: 'label', icon: 'label',
properties: [ properties: ['color-selector', 'size-selector', 'title-selector'],
'color-selector',
'size-selector',
'title-selector'
],
propertyInner: { propertyInner: {
'color-selector': ['quotaColor', 'dimensionColor'],
'color-selector': [
'quotaColor',
'dimensionColor'
],
'size-selector': [ 'size-selector': [
'quotaFontSize', 'quotaFontSize',
'quotaFontFamily', 'quotaFontFamily',
...@@ -2399,17 +2075,9 @@ export const TYPE_CONFIGS = [ ...@@ -2399,17 +2075,9 @@ export const TYPE_CONFIGS = [
value: 'text', value: 'text',
title: 'chart.chart_card', title: 'chart.chart_card',
icon: 'text', icon: 'text',
properties: [ properties: ['color-selector', 'size-selector', 'title-selector'],
'color-selector',
'size-selector',
'title-selector'
],
propertyInner: { propertyInner: {
'color-selector': ['quotaColor', 'dimensionColor'],
'color-selector': [
'quotaColor',
'dimensionColor'
],
'size-selector': [ 'size-selector': [
'quotaFontSize', 'quotaFontSize',
'quotaFontFamily', 'quotaFontFamily',
...@@ -2453,12 +2121,7 @@ export const TYPE_CONFIGS = [ ...@@ -2453,12 +2121,7 @@ export const TYPE_CONFIGS = [
'title-selector' 'title-selector'
], ],
propertyInner: { propertyInner: {
'color-selector': ['value', 'custom', 'alpha'],
'color-selector': [
'value',
'custom',
'alpha'
],
'size-selector': [ 'size-selector': [
'gaugeMin', 'gaugeMin',
'gaugeMax', 'gaugeMax',
...@@ -2466,12 +2129,7 @@ export const TYPE_CONFIGS = [ ...@@ -2466,12 +2129,7 @@ export const TYPE_CONFIGS = [
'gaugeEndAngle', 'gaugeEndAngle',
'gaugeAxisLine' 'gaugeAxisLine'
], ],
'label-selector': [ 'label-selector': ['show', 'fontSize', 'color', 'gaugeFormatter'],
'show',
'fontSize',
'color',
'gaugeFormatter'
],
'title-selector': [ 'title-selector': [
'show', 'show',
'title', 'title',
...@@ -2510,11 +2168,7 @@ export const TYPE_CONFIGS = [ ...@@ -2510,11 +2168,7 @@ export const TYPE_CONFIGS = [
'marginLeft', 'marginLeft',
'marginRight' 'marginRight'
], ],
'color-selector': [ 'color-selector': ['value', 'custom', 'alpha'],
'value',
'custom',
'alpha'
],
'size-selector': [ 'size-selector': [
'lineWidth', 'lineWidth',
'lineSymbol', 'lineSymbol',
...@@ -2522,18 +2176,8 @@ export const TYPE_CONFIGS = [ ...@@ -2522,18 +2176,8 @@ export const TYPE_CONFIGS = [
'lineSymbolSize', 'lineSymbolSize',
'lineSmooth' 'lineSmooth'
], ],
'label-selector': [ 'label-selector': ['show', 'fontSize', 'color', 'formatter'],
'show', 'tooltip-selector': ['show', 'trigger', 'textStyle', 'formatter'],
'fontSize',
'color',
'formatter'
],
'tooltip-selector': [
'show',
'trigger',
'textStyle',
'formatter'
],
'x-axis-selector': [ 'x-axis-selector': [
'axisForm', 'axisForm',
'show', 'show',
...@@ -2598,11 +2242,7 @@ export const TYPE_CONFIGS = [ ...@@ -2598,11 +2242,7 @@ export const TYPE_CONFIGS = [
'marginLeft', 'marginLeft',
'marginRight' 'marginRight'
], ],
'color-selector': [ 'color-selector': ['value', 'custom', 'alpha'],
'value',
'custom',
'alpha'
],
'size-selector': [ 'size-selector': [
'lineWidth', 'lineWidth',
'lineSymbol', 'lineSymbol',
...@@ -2610,18 +2250,8 @@ export const TYPE_CONFIGS = [ ...@@ -2610,18 +2250,8 @@ export const TYPE_CONFIGS = [
'lineSymbolSize', 'lineSymbolSize',
'lineSmooth' 'lineSmooth'
], ],
'label-selector': [ 'label-selector': ['show', 'fontSize', 'color', 'formatter'],
'show', 'tooltip-selector': ['show', 'trigger', 'textStyle', 'formatter'],
'fontSize',
'color',
'formatter'
],
'tooltip-selector': [
'show',
'trigger',
'textStyle',
'formatter'
],
'x-axis-selector': [ 'x-axis-selector': [
'axisForm', 'axisForm',
'show', 'show',
...@@ -2687,14 +2317,8 @@ export const TYPE_CONFIGS = [ ...@@ -2687,14 +2317,8 @@ export const TYPE_CONFIGS = [
'marginLeft', 'marginLeft',
'marginRight' 'marginRight'
], ],
'color-selector': [ 'color-selector': ['value', 'custom', 'alpha'],
'value', 'size-selector': ['mix'],
'custom',
'alpha'
],
'size-selector': [
'mix'
],
'label-selector': [ 'label-selector': [
'show', 'show',
'fontSize', 'fontSize',
...@@ -2702,12 +2326,7 @@ export const TYPE_CONFIGS = [ ...@@ -2702,12 +2326,7 @@ export const TYPE_CONFIGS = [
'position-v', 'position-v',
'formatter' 'formatter'
], ],
'tooltip-selector': [ 'tooltip-selector': ['show', 'trigger', 'textStyle', 'formatter'],
'show',
'trigger',
'textStyle',
'formatter'
],
'x-axis-selector': [ 'x-axis-selector': [
'show', 'show',
'position', 'position',
...@@ -2780,16 +2399,8 @@ export const TYPE_CONFIGS = [ ...@@ -2780,16 +2399,8 @@ export const TYPE_CONFIGS = [
'marginLeft', 'marginLeft',
'marginRight' 'marginRight'
], ],
'color-selector': [ 'color-selector': ['value', 'custom', 'alpha'],
'value', 'size-selector': ['barDefault', 'barWidth', 'barGap'],
'custom',
'alpha'
],
'size-selector': [
'barDefault',
'barWidth',
'barGap'
],
'label-selector': [ 'label-selector': [
'show', 'show',
'fontSize', 'fontSize',
...@@ -2797,12 +2408,7 @@ export const TYPE_CONFIGS = [ ...@@ -2797,12 +2408,7 @@ export const TYPE_CONFIGS = [
'position-v', 'position-v',
'formatter' 'formatter'
], ],
'tooltip-selector': [ 'tooltip-selector': ['show', 'trigger', 'textStyle', 'formatter'],
'show',
'trigger',
'textStyle',
'formatter'
],
'x-axis-selector': [ 'x-axis-selector': [
'axisForm', 'axisForm',
'show', 'show',
...@@ -2867,16 +2473,8 @@ export const TYPE_CONFIGS = [ ...@@ -2867,16 +2473,8 @@ export const TYPE_CONFIGS = [
'marginLeft', 'marginLeft',
'marginRight' 'marginRight'
], ],
'color-selector': [ 'color-selector': ['value', 'custom', 'alpha'],
'value', 'size-selector': ['barDefault', 'barWidth', 'barGap'],
'custom',
'alpha'
],
'size-selector': [
'barDefault',
'barWidth',
'barGap'
],
'label-selector': [ 'label-selector': [
'show', 'show',
'fontSize', 'fontSize',
...@@ -2884,12 +2482,7 @@ export const TYPE_CONFIGS = [ ...@@ -2884,12 +2482,7 @@ export const TYPE_CONFIGS = [
'position-v', 'position-v',
'formatter' 'formatter'
], ],
'tooltip-selector': [ 'tooltip-selector': ['show', 'trigger', 'textStyle', 'formatter'],
'show',
'trigger',
'textStyle',
'formatter'
],
'x-axis-selector': [ 'x-axis-selector': [
'axisForm', 'axisForm',
'show', 'show',
...@@ -2954,16 +2547,8 @@ export const TYPE_CONFIGS = [ ...@@ -2954,16 +2547,8 @@ export const TYPE_CONFIGS = [
'marginLeft', 'marginLeft',
'marginRight' 'marginRight'
], ],
'color-selector': [ 'color-selector': ['value', 'custom', 'alpha'],
'value', 'size-selector': ['barDefault', 'barWidth', 'barGap'],
'custom',
'alpha'
],
'size-selector': [
'barDefault',
'barWidth',
'barGap'
],
'label-selector': [ 'label-selector': [
'show', 'show',
'fontSize', 'fontSize',
...@@ -2971,12 +2556,7 @@ export const TYPE_CONFIGS = [ ...@@ -2971,12 +2556,7 @@ export const TYPE_CONFIGS = [
'position-h', 'position-h',
'formatter' 'formatter'
], ],
'tooltip-selector': [ 'tooltip-selector': ['show', 'trigger', 'textStyle', 'formatter'],
'show',
'trigger',
'textStyle',
'formatter'
],
'x-axis-selector': [ 'x-axis-selector': [
'axisForm', 'axisForm',
'show', 'show',
...@@ -3041,16 +2621,8 @@ export const TYPE_CONFIGS = [ ...@@ -3041,16 +2621,8 @@ export const TYPE_CONFIGS = [
'marginLeft', 'marginLeft',
'marginRight' 'marginRight'
], ],
'color-selector': [ 'color-selector': ['value', 'custom', 'alpha'],
'value', 'size-selector': ['barDefault', 'barWidth', 'barGap'],
'custom',
'alpha'
],
'size-selector': [
'barDefault',
'barWidth',
'barGap'
],
'label-selector': [ 'label-selector': [
'show', 'show',
'fontSize', 'fontSize',
...@@ -3058,12 +2630,7 @@ export const TYPE_CONFIGS = [ ...@@ -3058,12 +2630,7 @@ export const TYPE_CONFIGS = [
'position-h', 'position-h',
'formatter' 'formatter'
], ],
'tooltip-selector': [ 'tooltip-selector': ['show', 'trigger', 'textStyle', 'formatter'],
'show',
'trigger',
'textStyle',
'formatter'
],
'x-axis-selector': [ 'x-axis-selector': [
'axisForm', 'axisForm',
'show', 'show',
...@@ -3120,15 +2687,8 @@ export const TYPE_CONFIGS = [ ...@@ -3120,15 +2687,8 @@ export const TYPE_CONFIGS = [
'legend-selector' 'legend-selector'
], ],
propertyInner: { propertyInner: {
'color-selector': ['value', 'custom', 'alpha'],
'color-selector': [ 'size-selector': ['pieOuterRadius'],
'value',
'custom',
'alpha'
],
'size-selector': [
'pieOuterRadius'
],
'label-selector': [ 'label-selector': [
'show', 'show',
'labelLine', 'labelLine',
...@@ -3137,12 +2697,7 @@ export const TYPE_CONFIGS = [ ...@@ -3137,12 +2697,7 @@ export const TYPE_CONFIGS = [
'position-pie', 'position-pie',
'formatter' 'formatter'
], ],
'tooltip-selector': [ 'tooltip-selector': ['show', 'trigger', 'textStyle', 'formatter'],
'show',
'trigger',
'textStyle',
'formatter'
],
'title-selector': [ 'title-selector': [
'show', 'show',
'title', 'title',
...@@ -3178,16 +2733,8 @@ export const TYPE_CONFIGS = [ ...@@ -3178,16 +2733,8 @@ export const TYPE_CONFIGS = [
'legend-selector' 'legend-selector'
], ],
propertyInner: { propertyInner: {
'color-selector': ['value', 'custom', 'alpha'],
'color-selector': [ 'size-selector': ['pieInnerRadius', 'pieOuterRadius'],
'value',
'custom',
'alpha'
],
'size-selector': [
'pieInnerRadius',
'pieOuterRadius'
],
'label-selector': [ 'label-selector': [
'show', 'show',
'labelLine', 'labelLine',
...@@ -3196,12 +2743,7 @@ export const TYPE_CONFIGS = [ ...@@ -3196,12 +2743,7 @@ export const TYPE_CONFIGS = [
'position-pie', 'position-pie',
'formatter' 'formatter'
], ],
'tooltip-selector': [ 'tooltip-selector': ['show', 'trigger', 'textStyle', 'formatter'],
'show',
'trigger',
'textStyle',
'formatter'
],
'title-selector': [ 'title-selector': [
'show', 'show',
'title', 'title',
...@@ -3237,17 +2779,8 @@ export const TYPE_CONFIGS = [ ...@@ -3237,17 +2779,8 @@ export const TYPE_CONFIGS = [
'legend-selector' 'legend-selector'
], ],
propertyInner: { propertyInner: {
'color-selector': ['value', 'custom', 'alpha'],
'color-selector': [ 'size-selector': ['pieOuterRadius', 'pieRoseType', 'pieRoseRadius'],
'value',
'custom',
'alpha'
],
'size-selector': [
'pieOuterRadius',
'pieRoseType',
'pieRoseRadius'
],
'label-selector': [ 'label-selector': [
'show', 'show',
'fontSize', 'fontSize',
...@@ -3255,12 +2788,7 @@ export const TYPE_CONFIGS = [ ...@@ -3255,12 +2788,7 @@ export const TYPE_CONFIGS = [
'position-pie', 'position-pie',
'formatter' 'formatter'
], ],
'tooltip-selector': [ 'tooltip-selector': ['show', 'trigger', 'textStyle', 'formatter'],
'show',
'trigger',
'textStyle',
'formatter'
],
'title-selector': [ 'title-selector': [
'show', 'show',
'title', 'title',
...@@ -3296,12 +2824,7 @@ export const TYPE_CONFIGS = [ ...@@ -3296,12 +2824,7 @@ export const TYPE_CONFIGS = [
'legend-selector' 'legend-selector'
], ],
propertyInner: { propertyInner: {
'color-selector': ['value', 'custom', 'alpha'],
'color-selector': [
'value',
'custom',
'alpha'
],
'size-selector': [ 'size-selector': [
'pieInnerRadius', 'pieInnerRadius',
'pieOuterRadius', 'pieOuterRadius',
...@@ -3315,12 +2838,7 @@ export const TYPE_CONFIGS = [ ...@@ -3315,12 +2838,7 @@ export const TYPE_CONFIGS = [
'position-pie', 'position-pie',
'formatter' 'formatter'
], ],
'tooltip-selector': [ 'tooltip-selector': ['show', 'trigger', 'textStyle', 'formatter'],
'show',
'trigger',
'textStyle',
'formatter'
],
'title-selector': [ 'title-selector': [
'show', 'show',
'title', 'title',
...@@ -3357,16 +2875,8 @@ export const TYPE_CONFIGS = [ ...@@ -3357,16 +2875,8 @@ export const TYPE_CONFIGS = [
'legend-selector' 'legend-selector'
], ],
propertyInner: { propertyInner: {
'color-selector': ['value', 'custom', 'alpha'],
'color-selector': [ 'size-selector': ['radarShape', 'radarSize'],
'value',
'custom',
'alpha'
],
'size-selector': [
'radarShape',
'radarSize'
],
'label-selector': [ 'label-selector': [
'show', 'show',
'fontSize', 'fontSize',
...@@ -3374,12 +2884,7 @@ export const TYPE_CONFIGS = [ ...@@ -3374,12 +2884,7 @@ export const TYPE_CONFIGS = [
'position-v', 'position-v',
'formatter' 'formatter'
], ],
'tooltip-selector': [ 'tooltip-selector': ['show', 'trigger', 'textStyle', 'formatter'],
'show',
'trigger',
'textStyle',
'formatter'
],
'split-selector': [ 'split-selector': [
'name', 'name',
'axisLine', 'axisLine',
...@@ -3421,28 +2926,10 @@ export const TYPE_CONFIGS = [ ...@@ -3421,28 +2926,10 @@ export const TYPE_CONFIGS = [
'title-selector' 'title-selector'
], ],
propertyInner: { propertyInner: {
'color-selector': ['value', 'custom', 'alpha'],
'color-selector': [ 'size-selector': ['treemapWidth', 'treemapHeight'],
'value', 'label-selector': ['show', 'fontSize', 'color', 'formatter'],
'custom', 'tooltip-selector': ['show', 'trigger', 'textStyle', 'formatter'],
'alpha'
],
'size-selector': [
'treemapWidth',
'treemapHeight'
],
'label-selector': [
'show',
'fontSize',
'color',
'formatter'
],
'tooltip-selector': [
'show',
'trigger',
'textStyle',
'formatter'
],
'title-selector': [ 'title-selector': [
'show', 'show',
'title', 'title',
...@@ -3480,15 +2967,8 @@ export const TYPE_CONFIGS = [ ...@@ -3480,15 +2967,8 @@ export const TYPE_CONFIGS = [
'marginLeft', 'marginLeft',
'marginRight' 'marginRight'
], ],
'color-selector': [ 'color-selector': ['value', 'custom', 'alpha'],
'value', 'size-selector': ['scatterSymbol', 'scatterSymbolSize'],
'custom',
'alpha'
],
'size-selector': [
'scatterSymbol',
'scatterSymbolSize'
],
'label-selector': [ 'label-selector': [
'show', 'show',
'fontSize', 'fontSize',
...@@ -3496,12 +2976,7 @@ export const TYPE_CONFIGS = [ ...@@ -3496,12 +2976,7 @@ export const TYPE_CONFIGS = [
'position-v', 'position-v',
'formatter' 'formatter'
], ],
'tooltip-selector': [ 'tooltip-selector': ['show', 'trigger', 'textStyle', 'formatter'],
'show',
'trigger',
'textStyle',
'formatter'
],
'x-axis-selector': [ 'x-axis-selector': [
'axisForm', 'axisForm',
'show', 'show',
...@@ -3556,15 +3031,8 @@ export const TYPE_CONFIGS = [ ...@@ -3556,15 +3031,8 @@ export const TYPE_CONFIGS = [
'legend-selector' 'legend-selector'
], ],
propertyInner: { propertyInner: {
'color-selector': ['value', 'custom', 'alpha'],
'color-selector': [ 'size-selector': ['funnelWidth'],
'value',
'custom',
'alpha'
],
'size-selector': [
'funnelWidth'
],
'label-selector': [ 'label-selector': [
'show', 'show',
'fontSize', 'fontSize',
...@@ -3572,12 +3040,7 @@ export const TYPE_CONFIGS = [ ...@@ -3572,12 +3040,7 @@ export const TYPE_CONFIGS = [
'position-h', 'position-h',
'formatter' 'formatter'
], ],
'tooltip-selector': [ 'tooltip-selector': ['show', 'trigger', 'textStyle', 'formatter'],
'show',
'trigger',
'textStyle',
'formatter'
],
'title-selector': [ 'title-selector': [
'show', 'show',
'title', 'title',
...@@ -3604,7 +3067,7 @@ export const TYPE_CONFIGS = [ ...@@ -3604,7 +3067,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_mini', icon: 'map_old',
properties: [ properties: [
'color-selector', 'color-selector',
'label-selector', 'label-selector',
...@@ -3614,7 +3077,6 @@ export const TYPE_CONFIGS = [ ...@@ -3614,7 +3077,6 @@ export const TYPE_CONFIGS = [
'condition-style-selector' 'condition-style-selector'
], ],
propertyInner: { propertyInner: {
'color-selector': [ 'color-selector': [
'value', 'value',
'custom', 'custom',
...@@ -3631,12 +3093,46 @@ export const TYPE_CONFIGS = [ ...@@ -3631,12 +3093,46 @@ export const TYPE_CONFIGS = [
'label-show-shadow', 'label-show-shadow',
'label-shadow-color' 'label-shadow-color'
], ],
'tooltip-selector': [ 'tooltip-selector': ['show', 'emptyHide', 'textStyle', 'formatter'],
'title-selector': [
'show', 'show',
'emptyHide', 'title',
'textStyle', 'fontSize',
'formatter' 'color',
'hPosition',
'vPosition',
'isItalic',
'isBolder'
],
'suspension-selector': ['show'],
'condition-style-selector': ['show']
}
},
{
render: 'aMap',
category: 'chart.chart_type_space',
value: 'amap',
title: 'amap.layer',
icon: 'map_mini',
properties: [
'color-selector',
// "label-selector",
// "tooltip-selector",
'title-selector',
// "suspension-selector",
'condition-style-selector'
],
propertyInner: {
'color-selector': ['theme'],
'label-selector': [
'show',
'fontSize',
'color',
'label-bg',
'label-show-shadow',
'label-shadow-color'
], ],
'tooltip-selector': ['show', 'emptyHide', 'textStyle', 'formatter'],
'title-selector': [ 'title-selector': [
'show', 'show',
'title', 'title',
...@@ -3647,12 +3143,8 @@ export const TYPE_CONFIGS = [ ...@@ -3647,12 +3143,8 @@ export const TYPE_CONFIGS = [
'isItalic', 'isItalic',
'isBolder' 'isBolder'
], ],
'suspension-selector': [ 'suspension-selector': ['show'],
'show' 'condition-style-selector': ['show']
],
'condition-style-selector': [
'show'
]
} }
} }
] ]
...@@ -3751,7 +3243,10 @@ export function getColors(chart, colors, reset) { ...@@ -3751,7 +3243,10 @@ export function getColors(chart, colors, reset) {
isCustom: false isCustom: false
}) })
} }
} else if (includesAny(chart.type, 'bar', 'scatter', 'radar', 'area') && !chart.type.includes('group')) { } else if (
includesAny(chart.type, 'bar', 'scatter', 'radar', 'area') &&
!chart.type.includes('group')
) {
if (Object.prototype.toString.call(chart.yaxis) === '[object Array]') { if (Object.prototype.toString.call(chart.yaxis) === '[object Array]') {
series = JSON.parse(JSON.stringify(chart.yaxis)) series = JSON.parse(JSON.stringify(chart.yaxis))
} else { } else {
...@@ -3813,7 +3308,9 @@ export function getColors(chart, colors, reset) { ...@@ -3813,7 +3308,9 @@ export function getColors(chart, colors, reset) {
// res,custom,以custom为准,去掉res中不存在的,并将custom中name一样的color赋值给res,不存在的name,即新增值,使用i % colors.length,从配色方案中选 // res,custom,以custom为准,去掉res中不存在的,并将custom中name一样的color赋值给res,不存在的name,即新增值,使用i % colors.length,从配色方案中选
if (!reset) { if (!reset) {
let sc = null let sc = null
if (Object.prototype.toString.call(chart.customAttr) === '[object Object]') { if (
Object.prototype.toString.call(chart.customAttr) === '[object Object]'
) {
sc = JSON.parse(JSON.stringify(chart.customAttr)).color.seriesColors sc = JSON.parse(JSON.stringify(chart.customAttr)).color.seriesColors
} else { } else {
sc = JSON.parse(chart.customAttr).color.seriesColors sc = JSON.parse(chart.customAttr).color.seriesColors
...@@ -3854,9 +3351,13 @@ export function getRemark(chart) { ...@@ -3854,9 +3351,13 @@ export function getRemark(chart) {
const customStyle = JSON.parse(chart.customStyle) const customStyle = JSON.parse(chart.customStyle)
if (customStyle.text) { if (customStyle.text) {
const title = JSON.parse(JSON.stringify(customStyle.text)) const title = JSON.parse(JSON.stringify(customStyle.text))
remark.show = title.remarkShow ? title.remarkShow : DEFAULT_TITLE_STYLE.remarkShow remark.show = title.remarkShow
? title.remarkShow
: DEFAULT_TITLE_STYLE.remarkShow
remark.content = title.remark ? title.remark : DEFAULT_TITLE_STYLE.remark remark.content = title.remark ? title.remark : DEFAULT_TITLE_STYLE.remark
remark.bgFill = title.remarkBackgroundColor ? title.remarkBackgroundColor : DEFAULT_TITLE_STYLE.remarkBackgroundColor remark.bgFill = title.remarkBackgroundColor
? title.remarkBackgroundColor
: DEFAULT_TITLE_STYLE.remarkBackgroundColor
} }
} }
return remark return remark
...@@ -3908,7 +3409,10 @@ function handleBreakLineMultiDimension(chart, data) { ...@@ -3908,7 +3409,10 @@ function handleBreakLineMultiDimension(chart, data) {
if (dimensionInfo) { if (dimensionInfo) {
dimensionInfo.set.add(item.category) dimensionInfo.set.add(item.category)
} else { } else {
dimensionInfoMap.set(item.field, { set: new Set([item.category]), index: i }) dimensionInfoMap.set(item.field, {
set: new Set([item.category]),
index: i
})
} }
subDimensionSet.add(item.category) subDimensionSet.add(item.category)
} }
...@@ -3917,7 +3421,7 @@ function handleBreakLineMultiDimension(chart, data) { ...@@ -3917,7 +3421,7 @@ function handleBreakLineMultiDimension(chart, data) {
dimensionInfoMap.forEach((dimensionInfo, field) => { dimensionInfoMap.forEach((dimensionInfo, field) => {
if (dimensionInfo.set.size < subDimensionSet.size) { if (dimensionInfo.set.size < subDimensionSet.size) {
let subInsertIndex = 0 let subInsertIndex = 0
subDimensionSet.forEach(dimension => { subDimensionSet.forEach((dimension) => {
if (!dimensionInfo.set.has(dimension)) { if (!dimensionInfo.set.has(dimension)) {
data.splice(dimensionInfo.index + insertCount + subInsertIndex, 0, { data.splice(dimensionInfo.index + insertCount + subInsertIndex, 0, {
field, field,
...@@ -3944,7 +3448,10 @@ function handleSetZeroMultiDimension(chart, data) { ...@@ -3944,7 +3448,10 @@ function handleSetZeroMultiDimension(chart, data) {
if (dimensionInfo) { if (dimensionInfo) {
dimensionInfo.set.add(item.category) dimensionInfo.set.add(item.category)
} else { } else {
dimensionInfoMap.set(item.field, { set: new Set([item.category]), index: i }) dimensionInfoMap.set(item.field, {
set: new Set([item.category]),
index: i
})
} }
subDimensionSet.add(item.category) subDimensionSet.add(item.category)
} }
...@@ -3952,7 +3459,7 @@ function handleSetZeroMultiDimension(chart, data) { ...@@ -3952,7 +3459,7 @@ function handleSetZeroMultiDimension(chart, data) {
dimensionInfoMap.forEach((dimensionInfo, field) => { dimensionInfoMap.forEach((dimensionInfo, field) => {
if (dimensionInfo.set.size < subDimensionSet.size) { if (dimensionInfo.set.size < subDimensionSet.size) {
let subInsertIndex = 0 let subInsertIndex = 0
subDimensionSet.forEach(dimension => { subDimensionSet.forEach((dimension) => {
if (!dimensionInfo.set.has(dimension)) { if (!dimensionInfo.set.has(dimension)) {
data.splice(dimensionInfo.index + insertCount + subInsertIndex, 0, { data.splice(dimensionInfo.index + insertCount + subInsertIndex, 0, {
field, field,
...@@ -3968,7 +3475,7 @@ function handleSetZeroMultiDimension(chart, data) { ...@@ -3968,7 +3475,7 @@ function handleSetZeroMultiDimension(chart, data) {
} }
function handleSetZeroSingleDimension(chart, data) { function handleSetZeroSingleDimension(chart, data) {
data.forEach(item => { data.forEach((item) => {
if (item.value === null) { if (item.value === null) {
item.value = 0 item.value = 0
} }
...@@ -4014,7 +3521,11 @@ export function handleTableEmptyStrategy(tableData, chart) { ...@@ -4014,7 +3521,11 @@ export function handleTableEmptyStrategy(tableData, chart) {
emptyDataStrategy = 'breakLine' emptyDataStrategy = 'breakLine'
} }
const emptyDataFieldCtrl = senior?.functionCfg?.emptyDataFieldCtrl const emptyDataFieldCtrl = senior?.functionCfg?.emptyDataFieldCtrl
if (emptyDataStrategy !== 'breakLine' && emptyDataFieldCtrl?.length && tableData?.length) { if (
emptyDataStrategy !== 'breakLine' &&
emptyDataFieldCtrl?.length &&
tableData?.length
) {
const deNames = _.keys(tableData[0]) const deNames = _.keys(tableData[0])
intersection = _.intersection(deNames, emptyDataFieldCtrl) intersection = _.intersection(deNames, emptyDataFieldCtrl)
} }
......
<template>
<el-amap
:vid="mapId"
default-cursor="default"
/>
</template>
<script>
import { lazyAMapApiLoaderInstance } from 'vue-amap'
import { uuid } from 'vue-uuid'
import { baseAMapData, hazardLevel } from './aMap/aMap'
export default {
props: {
chart: {
type: Object,
required: true
}
},
data() {
return {
map: {},
AMap: {},
layers: [],
allParkList: [],
center: [116.400586, 39.903475],
mapStyle: 'amap://styles/6ee1c8252c951da095d5e4eaf9c65a1f',
zoom: 14,
mapId: uuid.v1()
}
},
watch: {
chart: {
handler(newVal, oldVal) {
// this.drawLayer()
this.initMap()
},
deep: true
}
},
mounted() {
this.initMap()
},
destroyed() {},
methods: {
initMap() {
const _this = this
lazyAMapApiLoaderInstance.load().then(() => {
const colorAttr = JSON.parse(this.chart.customAttr)
this.map = new AMap.Map(_this.mapId, {
center: this.center, // 地图中心点的经纬度位置配置
zoom: this.zoom, // 地图缩放比例配置
mapStyle: colorAttr?.color?.theme === 'dark' ? this.mapStyle : ''
})
this.drawLayer()
})
},
renderMarker(color) {
return `<div style='width: 30px;height: 30px;overflow: hidden;'>
<img style='width: 30px;filter: drop-shadow(${color} 100px 0); transform: translateX(-100px);' src='/static/svg/marker.svg'></img>
</div>`
},
drawLayer() {
const data = baseAMapData(this.chart)
this.allParkList = JSON.parse(JSON.stringify(data))
this.layers = []
data.map((item) => {
const color = hazardLevel[item.hazardLevel]?.color
let layer = null
if (item.areaType === '1') {
layer = new AMap.Marker({
position: new AMap.LngLat(item.longitude, item.latitude),
content: this.renderMarker(color),
offset: new AMap.Pixel(-15, -30),
zIndex: 53,
extData: {
...item
}
})
} else if (item.areaType === '2') {
layer = new AMap.Polygon({
path: JSON.parse(item.path),
fillColor: color,
strokeColor: 'transparent',
fillOpacity: 0.6,
zIndex: 51,
extData: {
...item
}
})
} else if (item.areaType === '3') {
layer = new AMap.Polyline({
path: JSON.parse(item.path),
borderWeight: 3,
strokeColor: color,
strokeOpacity: 1,
strokeStyle: 'solid',
zIndex: 52,
extData: {
...item
}
})
}
if (layer) {
this.layers.push(layer)
const extData = layer.getExtData()
layer.on('click', (obj) => {
this.parkClick(extData)
})
}
})
this.map.add(this.layers)
this.map.setFitView()
},
parkClick(item) {
const id = item.id
const highLightColor = '#AF24FF'
const allPolyline = this.layers
this.allParkList.forEach((it, index) => {
if (allPolyline[index]) {
const color = hazardLevel[it.hazardLevel]?.color
if (it.areaType === '1') {
allPolyline[index].setContent(this.renderMarker(color))
if (it.id === id) {
this.map.setCenter([item.longitude, item.latitude])
this.map.setZoom(15)
allPolyline[index].setContent(this.renderMarker(highLightColor))
}
} else {
allPolyline[index].setOptions({
[it.areaType === '3' ? 'strokeColor' : 'fillColor']: color
})
if (it.id === id) {
if (item.path && typeof item.path === 'string') {
const path = JSON.parse(item.path)
if (path[0]) {
this.map.setCenter([path[0][0], path[0][1]])
this.map.setZoom(15)
}
}
allPolyline[index].setOptions({
[it.areaType === '3' ? 'strokeColor' : 'fillColor']:
highLightColor
})
}
}
}
})
// const currentDom = document.querySelector(`#${id}`)
// currentDom?.scrollIntoView({ behavior: 'smooth' })
}
}
}
</script>
<style>
#container {
padding: 0px;
margin: 0px;
width: 100%;
height: 100%;
}
</style>
<template>
<div>
<!-- <el-row class="padding-lr">
<span class="data-area-label">
<span>{{ $t('amap.center') }}</span>
<i
class="el-icon-arrow-down el-icon-delete data-area-clear"
@click="clearData('center')"
/>
</span>
<el-input
v-model="busiFieldMap.center"
placeholder="请输入中心点坐标"
size="mini"
@change="(e) => addItem(e, 'center')"
/>
</el-row> -->
<el-row class="padding-lr">
<span class="data-area-label">
<span>{{ $t('amap.layer_name') }}</span>
<span> / </span>
<span> {{ $t('chart.dimension') }}</span>
<i
class="el-icon-arrow-down el-icon-delete data-area-clear"
@click="clearData('name')"
/>
</span>
<draggable
v-model="busiFieldMap.name"
group="drag"
animation="300"
:move="onMove"
class="drag-block-style"
@add="(e) => addItem(e, 'name')"
@update="calcData(true)"
>
<transition-group class="draggable-group">
<detail-item
v-for="(item, index) in busiFieldMap.name"
:key="item.id"
:param="param"
:index="index"
:item="item"
:dimension-data="dimensionData"
:quota-data="quotaData"
@onDetailItemRemove="(e) => removeItem(e, 'name')"
/>
</transition-group>
</draggable>
<div
v-if="!busiFieldMap.name || busiFieldMap.name.length === 0"
class="drag-placeholder-style"
>
<span class="drag-placeholder-style-span">{{
$t('chart.placeholder_field')
}}</span>
</div>
</el-row>
<el-row class="padding-lr">
<span class="data-area-label">
<span>{{ $t('chart.longitude') }}</span>
<span> / </span>
<span> {{ $t('chart.dimension') }}</span>
<i
class="el-icon-arrow-down el-icon-delete data-area-clear"
@click="clearData('lng')"
/>
</span>
<draggable
v-model="busiFieldMap.lng"
group="drag"
animation="300"
:move="onMove"
class="drag-block-style"
@add="(e) => addItem(e, 'lng')"
@update="calcData(true)"
>
<transition-group class="draggable-group">
<detail-item
v-for="(item, index) in busiFieldMap.lng"
:key="item.id"
:param="param"
:index="index"
:item="item"
:dimension-data="dimensionData"
:quota-data="quotaData"
@onDetailItemRemove="(e) => removeItem(e, 'lng')"
/>
</transition-group>
</draggable>
<div
v-if="!busiFieldMap.lng || busiFieldMap.lng.length === 0"
class="drag-placeholder-style"
>
<span class="drag-placeholder-style-span">{{
$t('chart.placeholder_field')
}}</span>
</div>
</el-row>
<el-row class="padding-lr">
<span class="data-area-label">
<span>{{ $t('chart.latitude') }} / {{ $t('chart.dimension') }}</span>
<i
class="el-icon-arrow-down el-icon-delete data-area-clear"
@click="clearData('lat')"
/>
</span>
<draggable
v-model="busiFieldMap.lat"
group="drag"
animation="300"
:move="onMove"
class="drag-block-style"
@add="(e) => addItem(e, 'lat')"
@update="calcData(true)"
>
<transition-group class="draggable-group">
<detail-item
v-for="(item, index) in busiFieldMap.lat"
:key="item.id"
:param="param"
:index="index"
:item="item"
:dimension-data="dimensionData"
:quota-data="quotaData"
@onDetailItemRemove="(e) => removeItem(e, 'lat')"
/>
</transition-group>
</draggable>
<div
v-if="!busiFieldMap.lat || busiFieldMap.lat.length === 0"
class="drag-placeholder-style"
>
<span class="drag-placeholder-style-span">{{
$t('chart.placeholder_field')
}}</span>
</div>
</el-row>
<el-row class="padding-lr">
<span class="data-area-label">
<span>{{ $t('amap.layer_type') }} / {{ $t('chart.dimension') }}</span>
<i
class="el-icon-arrow-down el-icon-delete data-area-clear"
@click="clearData('areaType')"
/>
</span>
<draggable
v-model="busiFieldMap.areaType"
group="drag"
animation="300"
:move="onMove"
class="drag-block-style"
@add="(e) => addItem(e, 'areaType')"
@update="calcData(true)"
>
<transition-group class="draggable-group">
<detail-item
v-for="(item, index) in busiFieldMap.areaType"
:key="item.id"
:param="param"
:index="index"
:item="item"
:dimension-data="dimensionData"
:quota-data="quotaData"
@onDetailItemRemove="(e) => removeItem(e, 'areaType')"
/>
</transition-group>
</draggable>
<div
v-if="!busiFieldMap.areaType || busiFieldMap.areaType.length === 0"
class="drag-placeholder-style"
>
<span class="drag-placeholder-style-span">{{
$t('chart.placeholder_field')
}}</span>
</div>
</el-row>
<el-row class="padding-lr">
<span class="data-area-label">
<span>{{ $t('amap.layer_path') }} / {{ $t('chart.dimension') }}</span>
<i
class="el-icon-arrow-down el-icon-delete data-area-clear"
@click="clearData('path')"
/>
</span>
<draggable
v-model="busiFieldMap.path"
group="drag"
animation="300"
:move="onMove"
class="drag-block-style"
@add="(e) => addItem(e, 'path')"
@update="calcData(true)"
>
<transition-group class="draggable-group">
<detail-item
v-for="(item, index) in busiFieldMap.path"
:key="item.id"
:param="param"
:index="index"
:item="item"
:dimension-data="dimensionData"
:quota-data="quotaData"
@onDetailItemRemove="(e) => removeItem(e, 'path')"
/>
</transition-group>
</draggable>
<div
v-if="!busiFieldMap.path || busiFieldMap.path.length === 0"
class="drag-placeholder-style"
>
<span class="drag-placeholder-style-span">{{
$t('chart.placeholder_field')
}}</span>
</div>
</el-row>
<el-row class="padding-lr">
<span class="data-area-label">
<span>{{ $t('amap.hazardLevel') }} / {{ $t('chart.dimension') }}</span>
<i
class="el-icon-arrow-down el-icon-delete data-area-clear"
@click="clearData('hazardLevel')"
/>
</span>
<draggable
v-model="busiFieldMap.hazardLevel"
group="drag"
animation="300"
:move="onMove"
class="drag-block-style"
@add="(e) => addItem(e, 'path')"
@update="calcData(true)"
>
<transition-group class="draggable-group">
<detail-item
v-for="(item, index) in busiFieldMap.hazardLevel"
:key="item.id"
:param="param"
:index="index"
:item="item"
:dimension-data="dimensionData"
:quota-data="quotaData"
@onDetailItemRemove="(e) => removeItem(e, 'hazardLevel')"
/>
</transition-group>
</draggable>
<div
v-if="!busiFieldMap.path || busiFieldMap.path.length === 0"
class="drag-placeholder-style"
>
<span class="drag-placeholder-style-span">{{
$t('chart.placeholder_field')
}}</span>
</div>
</el-row>
</div>
</template>
<script>
import DetailItem from '@/views/chart/components/dragItem/DetailItem'
export default {
name: 'MarkMapDataEditor',
components: { DetailItem },
props: {
view: {
type: Object,
require: true
},
param: {
type: Object,
required: true
},
dimensionData: {
type: Array,
required: true
},
quotaData: {
type: Array,
required: true
}
},
data() {
return {
busiFieldMap: {
name: [],
lng: [],
lat: [],
areaType: [],
path: [],
hazardLevel: []
}
}
},
created() {
this.releaseViewFields()
},
methods: {
fillViewFields() {
const result = []
for (const key in this.busiFieldMap) {
if (Object.hasOwnProperty.call(this.busiFieldMap, key)) {
const element = JSON.parse(JSON.stringify(this.busiFieldMap[key]))
element.forEach((item) => {
item.busiType = key
result.push(item)
})
}
}
this.view.viewFields = result
this.view.xaxis = result
},
releaseViewFields() {
this.view.viewFields.forEach((item) => {
const busiType = item.busiType
if (this.busiFieldMap?.[busiType]) {
this.busiFieldMap[busiType].push(item)
}
})
},
clearData(type) {
this.busiFieldMap[type] = []
this.calcData(true)
},
onMove(e, originalEvent) {
this.moveId = e.draggedContext.element.id
return true
},
dragCheckType(list, type) {
if (list && list.length > 0) {
for (let i = 0; i < list.length; i++) {
if (list[i].groupType !== type) {
list.splice(i, 1)
}
}
}
},
dragMoveDuplicate(list, e) {
const that = this
const dup = list.filter(function(m) {
return m.id === that.moveId
})
if (dup && dup.length > 1) {
list.splice(e.newDraggableIndex, 1)
}
},
addItem(item, label) {
this.dragCheckType(this.busiFieldMap[label], 'd')
this.dragMoveDuplicate(this.busiFieldMap[label], item)
if (this.busiFieldMap[label]?.length) {
this.busiFieldMap[label] = [this.busiFieldMap[label][0]]
}
this.calcData(true)
},
removeItem(item, label) {
this.busiFieldMap[label].splice(item.index, 1)
this.calcData(true)
},
locationYItemRemove(item) {
this.busiFieldMap.locationYaxis.splice(item.index, 1)
this.calcData(true)
},
detailItemRemove(item) {
this.busiFieldMap.daxis.splice(item.index, 1)
this.calcData(true)
},
calcData(cache) {
this.fillViewFields()
console.log('cache', cache)
this.$emit('calc-data', cache)
}
}
}
</script>
<style lang="scss" scoped>
.padding-lr {
padding: 0 6px;
}
.itxst {
margin: 10px;
text-align: left;
}
.col {
width: 40%;
flex: 1;
padding: 10px;
border: solid 1px #eee;
border-radius: 5px;
float: left;
}
.col + .col {
margin-left: 10px;
}
.view-panel-row {
display: flex;
background-color: #f7f8fa;
overflow-y: auto;
overflow-x: hidden;
height: calc(100vh - 96px);
}
.view-panel-Mask {
display: flex;
height: calc(100vh - 80px);
background-color: rgba(92, 94, 97, 0.7);
position: absolute;
top: 0px;
left: 0px;
width: 350px;
z-index: 2;
cursor: not-allowed;
display: flex;
align-items: center;
justify-content: center;
}
.view-panel {
display: flex;
height: 100%;
background-color: #f7f8fa;
}
.blackTheme .view-panel {
background-color: var(--MainBG);
}
.drag-list {
height: calc(100% - 26px);
overflow: auto;
padding: 2px 0;
}
.item-dimension {
padding: 2px 10px;
margin: 2px 2px 0 2px;
border: solid 1px #eee;
text-align: left;
color: #606266;
/*background-color: rgba(35,46,64,.05);*/
background-color: white;
display: block;
word-break: break-all;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
position: relative;
}
.blackTheme .item-dimension {
border: solid 1px;
border-color: var(--TableBorderColor);
color: var(--TextPrimary);
background-color: var(--MainBG);
}
.item-dimension + .item-dimension {
margin-top: 2px;
}
.item-dimension:hover {
color: #1890ff;
background: #e8f4ff;
border-color: #a3d3ff;
cursor: pointer;
}
.blackTheme .item-dimension:hover {
color: var(--Main);
background: var(--ContentBG);
cursor: pointer;
}
.item-quota {
padding: 2px 10px;
margin: 2px 2px 0 2px;
border: solid 1px #eee;
text-align: left;
color: #606266;
background-color: white;
display: block;
word-break: break-all;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
position: relative;
}
.blackTheme .item-quota {
border: solid 1px;
border-color: var(--TableBorderColor);
color: var(--TextPrimary);
background-color: var(--MainBG);
}
.item-quota + .item-quota {
margin-top: 2px;
}
.item-quota:hover {
color: #67c23a;
background: #f0f9eb;
border-color: #b2d3a3;
cursor: pointer;
}
.blackTheme .item-quota:hover {
background: var(--ContentBG);
}
.el-form-item {
margin-bottom: 0;
}
span {
font-size: 12px;
}
.tab-header ::v-deep .el-tabs__header {
border-top: solid 1px #eee;
border-right: solid 1px #eee;
}
.tab-header ::v-deep .el-tabs__item {
font-size: 12px;
padding: 0 20px !important;
}
.blackTheme .tab-header ::v-deep .el-tabs__item {
background-color: var(--MainBG);
}
.tab-header ::v-deep .el-tabs__nav-scroll {
padding-left: 0 !important;
}
.tab-header ::v-deep .el-tabs__header {
margin: 0 !important;
}
.tab-header ::v-deep .el-tabs__content {
height: calc(100% - 40px);
}
.draggable-group {
display: block;
width: 100%;
height: calc(100% - 6px);
}
.chart-icon {
width: 20px !important;
height: 20px !important;
}
.el-radio {
margin: 5px;
}
.el-radio ::v-deep .el-radio__label {
padding-left: 0;
}
.attr-style {
height: calc(100vh - 76px - 60px - 40px - 40px);
}
.blackTheme .attr-style {
color: var(--TextPrimary);
}
.attr-selector {
width: 100%;
height: 100%;
margin: 6px 0;
padding: 0 4px;
display: flex;
align-items: center;
background-color: white;
}
.blackTheme .attr-selector {
background-color: var(--MainBG);
}
.disabled-none-cursor {
cursor: not-allowed;
pointer-events: none;
}
.chart-class {
height: 100%;
padding: 10px;
}
.table-class {
height: calc(100% - 20px);
}
.dialog-css ::v-deep .el-dialog__title {
font-size: 14px;
}
.dialog-css ::v-deep .el-dialog__header {
padding: 20px 20px 0;
}
.dialog-css ::v-deep .el-dialog__body {
padding: 10px 20px 20px;
}
.filter-btn-class {
padding: 6px;
border: none;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
}
.chart-error-class {
text-align: center;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
background-color: #ece7e7;
}
.blackTheme .chart-error-class {
background-color: var(--MainBG);
}
.field-height {
height: 100%;
border-top: 1px solid #e6e6e6;
}
.blackTheme .field-height {
border-top: 1px solid;
border-color: var(--TableBorderColor) !important;
}
.padding-tab {
padding: 0;
height: 100%;
}
.tree-select-span {
::v-deep div.vue-treeselect__control {
height: 32px !important;
font-weight: normal !important;
}
}
.drag-block-style {
padding: 2px 0 0 0;
width: 100%;
min-height: 32px;
border-radius: 4px;
border: 1px solid #dcdfe6;
overflow-x: hidden;
display: flex;
align-items: center;
background-color: white;
}
.blackTheme .drag-block-style {
border: 1px solid;
border-color: var(--TableBorderColor);
background-color: var(--ContentBG);
}
.drag-placeholder-style {
position: absolute;
top: calc(50% - 2px);
left: 0;
width: 100%;
color: #cccccc;
}
.blackTheme .drag-placeholder-style {
color: var(--TextPrimary);
}
.drag-placeholder-style-span {
padding-left: 16px;
}
.blackTheme .theme-border-class {
color: var(--TextPrimary) !important;
background-color: var(--ContentBG);
}
.blackTheme .padding-lr {
border-color: var(--TableBorderColor) !important;
}
.blackTheme .theme-item-class {
background-color: var(--MainBG) !important;
border-color: var(--TableBorderColor) !important;
}
.icon-class {
color: #6c6c6c;
}
.blackTheme .icon-class {
color: #cccccc;
}
.result-count {
width: 50px;
}
.result-count ::v-deep input {
padding: 0 4px;
}
.radio-span ::v-deep .el-radio__label {
margin-left: 4px;
}
.view-title-name {
display: -moz-inline-box;
display: inline-block;
width: 130px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
margin-left: 45px;
}
::v-deep .item-axis {
width: 168px !important;
}
::v-deep .el-slider__input {
width: 80px !important;
}
::v-deep .el-input-number--mini {
width: 100px !important;
}
::v-deep .el-slider__runway.show-input {
width: 80px !important;
}
.no-senior {
width: 100%;
text-align: center;
font-size: 12px;
padding-top: 40px;
overflow: auto;
border-right: 1px solid #e6e6e6;
height: 100%;
}
.form-item-slider::v-deep.el-form-item__label {
font-size: 12px;
line-height: 38px;
}
.form-item::v-deep.el-form-item__label {
font-size: 12px;
}
.field-name {
display: inline-block;
width: 90px;
word-break: break-all;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
position: absolute;
top: 2px;
}
.field-setting {
position: absolute;
right: 8px;
}
.father .child {
visibility: hidden;
}
.father:hover .child {
visibility: visible;
}
.field-split {
height: calc(100% - 40px);
}
.field-split ::v-deep .fu-split-pane__left {
padding-right: 0 !important;
}
.field-split ::v-deep .fu-split-pane__right {
padding-left: 0 !important;
}
.view-panel-row ::v-deep .el-collapse-item__header {
height: 34px !important;
line-height: 34px !important;
padding: 0 0 0 6px !important;
font-size: 12px !important;
font-weight: 400 !important;
}
.data-area-label {
text-align: left;
position: relative;
width: 100%;
display: inline-block;
}
.data-area-clear {
position: absolute;
top: 4px;
right: 6px;
color: rgb(135, 141, 159);
cursor: pointer;
z-index: 1;
}
</style>
export function baseAMapData(chart) {
const data = chart.data.tableRow;
const fields = chart.data.fields;
let layerData = [];
layerData = data.map((a, index) => {
const obj = {
id: index + 1,
};
fields.map((b) => {
for (const key in a) {
if (b.dataeaseName === key) {
obj[b.originName] = a[key];
}
}
});
return obj;
});
return layerData;
}
export const hazardLevel = {
0: {
text: "非重大危险源",
color: "#52c41a",
},
1: {
text: "一级危险源",
color: "#FF4D4F",
},
2: {
text: "二级危险源",
color: "#FF7A45",
},
3: {
text: "三级危险源",
color: "#FAAD14",
},
4: {
text: "四级危险源",
color: "#1890FF",
},
};
<template>
<div style="width: 100%">
<el-col>
<el-form
ref="colorForm"
:model="colorForm"
label-width="80px"
size="mini"
>
<div>
<el-form-item
v-show="showProperty('value') && showProperty('gradient-color')"
:label="$t('chart.color_case')"
class="form-item"
>
<gradient-color-selector
:color-dto="colorForm"
@color-change="gradientColorChange"
/>
</el-form-item>
<el-form-item
v-show="showProperty('value') && !showProperty('gradient-color')"
:label="$t('chart.color_case')"
class="form-item"
>
<el-popover
placement="bottom"
width="400"
trigger="click"
>
<div style="padding: 6px 10px;">
<div>
<span class="color-label">{{ $t('chart.system_case') }}</span>
<el-select
v-model="colorForm.value"
:placeholder="$t('chart.pls_slc_color_case')"
size="mini"
@change="changeColorOption('value')"
>
<el-option
v-for="option in colorCases"
:key="option.value"
:label="option.name"
:value="option.value"
style="display: flex;align-items: center;"
>
<div style="float: left">
<span
v-for="(c,index) in option.colors"
:key="index"
:style="{width: '20px',height: '20px',float: 'left',backgroundColor: c}"
/>
</div>
<span style="margin-left: 4px;">{{ option.name }}</span>
</el-option>
</el-select>
<el-button
size="mini"
type="text"
style="margin-left: 2px;"
@click="resetCustomColor"
>{{ $t('commons.reset') }}
</el-button>
</div>
<!--自定义配色方案-->
<div
v-show="showProperty('custom')"
>
<div style="display: flex;align-items: center;margin-top: 10px;">
<span class="color-label">{{ $t('chart.custom_case') }}</span>
<span>
<el-radio-group
v-model="customColor"
class="color-type"
>
<el-radio
v-for="(c,index) in colorForm.colors"
:key="index"
:label="c"
style="padding: 2px;"
@change="switchColor(index)"
>
<span :style="{width: '20px',height: '20px',display:'inline-block',backgroundColor: c}" />
</el-radio>
</el-radio-group>
</span>
</div>
<div style="display: flex;align-items: center;margin-top: 10px;">
<span class="color-label" />
<span>
<el-color-picker
v-model="customColor"
class="color-picker-style"
:predefine="predefineColors"
@change="switchColorCase"
/>
</span>
</div>
</div>
<!--自定义系列或维度枚举值颜色-->
<div
v-show="showProperty('colorPanel')"
style="display: flex;align-items: center;margin-top: 10px;"
>
<span class="color-label" />
<span>
<span
v-for="(c,index) in colorForm.colors"
:key="index"
style="padding: 2px;"
>
<span :style="{width: '20px',height: '20px',display:'inline-block',backgroundColor: c}" />
</span>
</span>
</div>
</div>
<div
v-if="!batchOptStatus"
v-show="showProperty('customColor')"
class="custom-color-style"
>
<div
v-for="(item,index) in colorForm.seriesColors"
:key="index"
style="display: flex;align-items: center;margin: 2px 0;"
>
<el-color-picker
v-model="item.color"
class="color-picker-style"
:predefine="predefineColors"
@change="switchCustomColor(index)"
/>
<span
class="span-label"
:title="item.name"
>{{ item.name }}</span>
</div>
</div>
<div
slot="reference"
style="cursor: pointer;margin-top: 2px;width: 180px;"
>
<span
v-for="(c,index) in colorForm.colors"
:key="index"
:style="{width: '20px',height: '20px',display:'inline-block',backgroundColor: c}"
/>
</div>
</el-popover>
</el-form-item>
<el-form-item
v-show="showProperty('gradient')"
:label="$t('chart.gradient')"
class="form-item"
>
<el-checkbox
v-model="colorForm.gradient"
@change="changeColorCase('gradient')"
/>
</el-form-item>
<el-form-item
v-show="showProperty('quotaColor')"
:label="$t('chart.quota_color')"
class="form-item"
>
<el-color-picker
v-model="colorForm.quotaColor"
class="color-picker-style"
:predefine="predefineColors"
@change="changeColorCase('quotaColor')"
/>
</el-form-item>
<el-form-item
v-show="showProperty('dimensionColor')"
:label="$t('chart.dimension_color')"
class="form-item"
>
<el-color-picker
v-model="colorForm.dimensionColor"
class="color-picker-style"
:predefine="predefineColors"
@change="changeColorCase('dimensionColor')"
/>
</el-form-item>
</div>
<div>
<el-form-item
v-show="showProperty('tableHeaderBgColor')"
:label="$t('chart.table_header_bg')"
class="form-item"
>
<el-color-picker
v-model="colorForm.tableHeaderBgColor"
class="color-picker-style"
:predefine="predefineColors"
@change="changeColorCase('tableHeaderBgColor')"
/>
</el-form-item>
<el-form-item
v-show="showProperty('tableItemBgColor')"
:label="$t('chart.table_item_bg')"
class="form-item"
>
<el-color-picker
v-model="colorForm.tableItemBgColor"
class="color-picker-style"
:predefine="predefineColors"
@change="changeColorCase('tableItemBgColor')"
/>
</el-form-item>
<el-form-item
v-show="showProperty('tableHeaderFontColor')"
:label="$t('chart.table_header_font_color')"
class="form-item"
>
<el-color-picker
v-model="colorForm.tableHeaderFontColor"
class="color-picker-style"
:predefine="predefineColors"
@change="changeColorCase('tableHeaderFontColor')"
/>
</el-form-item>
<el-form-item
v-show="showProperty('tableFontColor')"
:label="$t('chart.table_item_font_color')"
class="form-item"
>
<el-color-picker
v-model="colorForm.tableFontColor"
class="color-picker-style"
:predefine="predefineColors"
@change="changeColorCase('tableFontColor')"
/>
</el-form-item>
<el-form-item
v-show="showProperty('tableBorderColor')"
:label="$t('chart.table_border_color')"
class="form-item"
>
<el-color-picker
v-model="colorForm.tableBorderColor"
class="color-picker-style"
:predefine="predefineColors"
@change="changeColorCase('tableBorderColor')"
/>
</el-form-item>
<el-form-item
v-show="showProperty('tableScrollBarColor')"
:label="$t('chart.table_scroll_bar_color')"
class="form-item"
>
<el-color-picker
v-model="colorForm.tableScrollBarColor"
class="color-picker-style"
:predefine="predefineColors"
color-format="rgb"
show-alpha
@change="changeColorCase('tableScrollBarColor')"
/>
</el-form-item>
</div>
<el-form-item
v-show="showProperty('mapStyle')"
:label="$t('chart.map_style')"
class="form-item"
>
<el-select
v-model="colorForm.mapStyle"
@change="changeColorCase('mapStyle')"
>
<el-option
v-for="item in mapStyleOptions"
:key="item.name"
:label="item.name"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item
v-show="showProperty('alpha')"
:label="$t('chart.not_alpha')"
class="form-item form-item-slider"
>
<el-slider
v-model="colorForm.alpha"
show-input
:show-input-controls="false"
input-size="mini"
@change="changeColorCase('alpha')"
/>
</el-form-item>
<el-form-item
v-show="showProperty('mapLineGradient')"
:label="$t('chart.gradient')"
class="form-item"
>
<el-checkbox
v-model="colorForm.mapLineGradient"
:disabled="checkMapLineGradient"
@change="changeColorCase('mapLineGradient')"
/>
</el-form-item>
<el-form-item
v-show="showProperty('mapLineSourceColor')"
:label="colorForm.mapLineGradient ? $t('chart.map_line_color_source_color') : $t('chart.color')"
class="form-item"
>
<el-color-picker
v-model="colorForm.mapLineSourceColor"
@change="changeColorCase('mapLineSourceColor')"
/>
</el-form-item>
<el-form-item
v-show="showProperty('mapLineTargetColor')"
v-if="colorForm.mapLineGradient"
:label="$t('chart.map_line_color_target_color')"
class="form-item"
>
<el-color-picker
v-model="colorForm.mapLineTargetColor"
@change="changeColorCase('mapLineTargetColor')"
/>
</el-form-item>
<el-form-item
v-show="showProperty('area-border-color') "
:label="$t('chart.area_border_color')"
class="form-item"
>
<el-color-picker
v-model="colorForm.areaBorderColor"
class="color-picker-style"
:predefine="predefineColors"
@change="changeColorCase('areaBorderColor')"
/>
</el-form-item>
</el-form>
</el-col>
</div>
</template>
<script>
import { COLOR_PANEL, DEFAULT_COLOR_CASE } from '../../chart/chart'
import { getColors } from '@/views/chart/chart/util'
import { mapState } from 'vuex'
import GradientColorSelector from '@/components/gradientColorSelector'
import bus from '@/utils/bus'
import { equalsAny } from '@/utils/StringUtils'
export default {
name: 'ColorSelector',
components: { GradientColorSelector },
props: {
param: {
type: Object,
required: false
},
chart: {
type: Object,
required: true
},
propertyInner: {
type: Array,
required: false,
default: function() {
return []
}
},
sourceType: {
type: String,
default: 'view',
required: false
}
},
data() {
return {
colorCases: [
{
name: this.$t('chart.color_default'),
value: 'default',
colors: ['#5470c6', '#91cc75', '#fac858', '#ee6666', '#73c0de', '#3ba272', '#fc8452', '#9a60b4', '#ea7ccc']
},
{
name: this.$t('chart.color_retro'),
value: 'retro',
colors: ['#0780cf', '#765005', '#fa6d1d', '#0e2c82', '#b6b51f', '#da1f18', '#701866', '#f47a75', '#009db2']
},
{
name: this.$t('chart.color_elegant'),
value: 'elegant',
colors: ['#95a2ff', '#fa8080', '#ffc076', '#fae768', '#87e885', '#3cb9fc', '#73abf5', '#cb9bff', '#434348']
},
{
name: this.$t('chart.color_future'),
value: 'future',
colors: ['#63b2ee', '#76da91', '#f8cb7f', '#f89588', '#7cd6cf', '#9192ab', '#7898e1', '#efa666', '#eddd86']
},
{
name: this.$t('chart.color_gradual'),
value: 'gradual',
colors: ['#71ae46', '#96b744', '#c4cc38', '#ebe12a', '#eab026', '#e3852b', '#d85d2a', '#ce2626', '#ac2026']
},
{
name: this.$t('chart.color_simple'),
value: 'simple',
colors: ['#929fff', '#9de0ff', '#ffa897', '#af87fe', '#7dc3fe', '#bb60b2', '#433e7c', '#f47a75', '#009db2']
},
{
name: this.$t('chart.color_business'),
value: 'business',
colors: ['#194f97', '#555555', '#bd6b08', '#00686b', '#c82d31', '#625ba1', '#898989', '#9c9800', '#007f54']
},
{
name: this.$t('chart.color_gentle'),
value: 'gentle',
colors: ['#5b9bd5', '#ed7d31', '#70ad47', '#ffc000', '#4472c4', '#91d024', '#b235e6', '#02ae75', '#5b9bd5']
},
{
name: this.$t('chart.color_technology'),
value: 'technology',
colors: ['#05f8d6', '#0082fc', '#fdd845', '#22ed7c', '#09b0d3', '#1d27c9', '#f9e264', '#f47a75', '#009db2']
},
{
name: this.$t('chart.color_light'),
value: 'light',
colors: ['#884898', '#808080', '#82ae46', '#00a3af', '#ef8b07', '#007bbb', '#9d775f', '#fae800', '#5f9b3c']
},
{
name: this.$t('chart.color_classical'),
value: 'classical',
colors: ['#007bbb', '#ffdb4f', '#dd4b4b', '#2ca9e1', '#ef8b07', '#4a488e', '#82ae46', '#dd4b4b', '#bb9581']
},
{
name: this.$t('chart.color_fresh'),
value: 'fresh',
colors: ['#5f9b3c', '#75c24b', '#83d65f', '#aacf53', '#c7dc68', '#d8e698', '#e0ebaf', '#bbc8e6', '#e5e5e5']
},
{
name: this.$t('chart.color_energy'),
value: 'energy',
colors: ['#ef8b07', '#2a83a2', '#f07474', '#c55784', '#274a78', '#7058a3', '#0095d9', '#75c24b', '#808080']
},
{
name: this.$t('chart.color_red'),
value: 'red',
colors: ['#ff0000', '#ef8b07', '#4c6cb3', '#f8e944', '#69821b', '#9c5ec3', '#00ccdf', '#f07474', '#bb9581']
},
{
name: this.$t('chart.color_fast'),
value: 'fast',
colors: ['#fae800', '#00c039', '#0482dc', '#bb9581', '#ff7701', '#9c5ec3', '#00ccdf', '#00c039', '#ff7701']
},
{
name: this.$t('chart.color_spiritual'),
value: 'spiritual',
colors: ['#00a3af', '#4da798', '#57baaa', '#62d0bd', '#6ee4d0', '#86e7d6', '#aeede1', '#bde1e6', '#e5e5e5']
}
],
colorForm: JSON.parse(JSON.stringify(DEFAULT_COLOR_CASE)),
customColor: null,
colorIndex: 0,
predefineColors: COLOR_PANEL,
mapStyleOptions: [
{ name: this.$t('chart.map_style_normal'), value: 'normal' },
{ name: this.$t('chart.map_style_darkblue'), value: 'darkblue' },
{ name: this.$t('chart.map_style_light'), value: 'light' },
{ name: this.$t('chart.map_style_dark'), value: 'dark' },
{ name: this.$t('chart.map_style_whitesmoke'), value: 'whitesmoke' },
{ name: this.$t('chart.map_style_fresh'), value: 'fresh' },
{ name: this.$t('chart.map_style_grey'), value: 'grey' },
{ name: this.$t('chart.map_style_graffiti'), value: 'graffiti' },
{ name: this.$t('chart.map_style_macaron'), value: 'macaron' },
{ name: this.$t('chart.map_style_blue'), value: 'blue' },
{ name: this.$t('chart.map_style_wine'), value: 'wine' }
]
}
},
computed: {
checkMapLineGradient() {
const chart = this.chart
if (chart.type === 'flow-map') {
let customAttr = null
if (Object.prototype.toString.call(chart.customAttr) === '[object Object]') {
customAttr = JSON.parse(JSON.stringify(chart.customAttr))
} else {
customAttr = JSON.parse(chart.customAttr)
}
return customAttr.size.mapLineAnimate && equalsAny(customAttr.size.mapLineType, 'line', 'arc')
}
return false
},
...mapState([
'batchOptStatus',
'componentViewsData'
])
},
watch: {
'chart.id': {
handler: function() {
this.customColor = null
this.colorIndex = 0
}
},
'chart': {
handler: function() {
this.init()
}
}
},
mounted() {
this.init()
bus.$on('prop-change-data', this.initCustomColor)
},
beforeDestroy() {
bus.$off('prop-change-data', this.initCustomColor)
},
methods: {
gradientColorChange(colorDto) {
const modifyNames = ['value', 'colors', 'seriesColors']
modifyNames.forEach(item => {
this.colorForm['modifyName'] = item
this.$emit('onColorChange', this.colorForm)
})
},
changeColorOption(modifyName = 'value') {
const that = this
const items = this.colorCases.filter(ele => {
return ele.value === that.colorForm.value
})
this.colorForm.colors = JSON.parse(JSON.stringify(items[0].colors))
this.customColor = this.colorForm.colors[0]
this.colorIndex = 0
// reset custom color
this.colorForm.seriesColors = []
this.initCustomColor(true)
this.changeColorCase(modifyName)
},
changeColorCase(modifyName) {
this.colorForm['modifyName'] = modifyName
this.$emit('onColorChange', this.colorForm)
this.colorForm['modifyName'] = 'colors'
this.$emit('onColorChange', this.colorForm)
},
init() {
const chart = JSON.parse(JSON.stringify(this.chart))
if (chart.customAttr) {
let customAttr = null
if (Object.prototype.toString.call(chart.customAttr) === '[object Object]') {
customAttr = JSON.parse(JSON.stringify(chart.customAttr))
} else {
customAttr = JSON.parse(chart.customAttr)
}
if (customAttr.color) {
this.colorForm = customAttr.color
if (!this.customColor) {
this.customColor = this.colorForm.colors[0]
this.colorIndex = 0
}
this.colorForm.tableBorderColor = this.colorForm.tableBorderColor ? this.colorForm.tableBorderColor : DEFAULT_COLOR_CASE.tableBorderColor
this.colorForm.tableHeaderFontColor = this.colorForm.tableHeaderFontColor ? this.colorForm.tableHeaderFontColor : this.colorForm.tableFontColor
this.$set(this.colorForm, 'gradient', this.colorForm.gradient || false)
this.colorForm.tableScrollBarColor = this.colorForm.tableScrollBarColor ? this.colorForm.tableScrollBarColor : DEFAULT_COLOR_CASE.tableScrollBarColor
this.colorForm.mapStyle = this.colorForm.mapStyle ? this.colorForm.mapStyle : DEFAULT_COLOR_CASE.mapStyle
this.colorForm.mapLineGradient = this.colorForm.mapLineGradient ? this.colorForm.mapLineGradient : DEFAULT_COLOR_CASE.mapLineGradient
this.colorForm.mapLineSourceColor = this.colorForm.mapLineSourceColor ? this.colorForm.mapLineSourceColor : DEFAULT_COLOR_CASE.mapLineSourceColor
this.colorForm.mapLineTargetColor = this.colorForm.mapLineTargetColor ? this.colorForm.mapLineTargetColor : DEFAULT_COLOR_CASE.mapLineTargetColor
this.initCustomColor()
}
}
},
switchColor(index) {
this.colorIndex = index
},
switchColorCase() {
this.colorForm.colors[this.colorIndex] = this.customColor
this.colorForm['modifyName'] = 'value'
this.$emit('onColorChange', this.colorForm)
this.colorForm['modifyName'] = 'colors'
this.$emit('onColorChange', this.colorForm)
this.colorForm['modifyName'] = 'seriesColors'
this.$emit('onColorChange', this.colorForm)
},
resetCustomColor() {
this.changeColorOption()
},
showProperty(property) {
return this.propertyInner.includes(property)
},
switchCustomColor(index) {
this.colorForm.seriesColors[index].isCustom = true
this.switchColorCase()
},
initCustomColor(reset) {
if (!this.batchOptStatus && this.chart.render && this.chart.render === 'antv' &&
(this.chart.type.includes('bar') ||
this.chart.type.includes('line') ||
this.chart.type.includes('area') ||
this.chart.type.includes('pie') ||
this.chart.type === 'funnel' ||
this.chart.type === 'radar' ||
this.chart.type === 'scatter')) {
if (this.componentViewsData[this.chart.id]) {
const chart = JSON.parse(JSON.stringify(this.componentViewsData[this.chart.id]))
this.colorForm.seriesColors = getColors(chart, this.colorForm.colors, reset)
}
}
}
}
}
</script>
<style scoped>
.shape-item {
padding: 6px;
border: none;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center
}
.form-item-slider ::v-deep .el-form-item__label {
font-size: 12px;
line-height: 38px;
}
.form-item ::v-deep .el-form-item__label {
font-size: 12px;
}
.el-select-dropdown__item {
padding: 0 20px;
}
span {
font-size: 12px
}
.el-form-item {
margin-bottom: 6px;
}
.color-picker-style {
cursor: pointer;
z-index: 1003;
}
.color-label {
display: inline-block;
width: 60px;
}
.color-type ::v-deep .el-radio__input {
display: none;
}
.el-radio {
margin: 0 2px 0 0 !important;
border: 1px solid transparent;
}
.el-radio ::v-deep .el-radio__label {
padding-left: 0;
}
.el-radio.is-checked {
border: 1px solid #0a7be0;
}
.span-label {
width: 300px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: inline-block;
padding: 0 8px;
}
.custom-color-style {
height: 300px;
overflow-y: auto;
padding: 4px 12px;
border: 1px solid #e6e6e6;
}
</style>
...@@ -19,6 +19,25 @@ ...@@ -19,6 +19,25 @@
/> />
</el-form-item> </el-form-item>
<el-form-item <el-form-item
v-show="showProperty('theme')"
:label="$t('amap.theme')"
class="form-item"
>
<el-radio-group
v-model="colorForm.theme"
class="color-type"
@change="changeColorCase('theme')"
>
<el-radio-button
v-for="(c, index) in themeList"
:key="index"
:label="c.value"
style="padding: 2px"
>{{ c.label }}
</el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item
v-show="showProperty('value') && !showProperty('gradient-color')" v-show="showProperty('value') && !showProperty('gradient-color')"
:label="$t('chart.color_case')" :label="$t('chart.color_case')"
class="form-item" class="form-item"
...@@ -28,7 +47,7 @@ ...@@ -28,7 +47,7 @@
width="400" width="400"
trigger="click" trigger="click"
> >
<div style="padding: 6px 10px;"> <div style="padding: 6px 10px">
<div> <div>
<span class="color-label">{{ $t('chart.system_case') }}</span> <span class="color-label">{{ $t('chart.system_case') }}</span>
<el-select <el-select
...@@ -42,50 +61,65 @@ ...@@ -42,50 +61,65 @@
:key="option.value" :key="option.value"
:label="option.name" :label="option.name"
:value="option.value" :value="option.value"
style="display: flex;align-items: center;" style="display: flex; align-items: center"
> >
<div style="float: left"> <div style="float: left">
<span <span
v-for="(c,index) in option.colors" v-for="(c, index) in option.colors"
:key="index" :key="index"
:style="{width: '20px',height: '20px',float: 'left',backgroundColor: c}" :style="{
width: '20px',
height: '20px',
float: 'left',
backgroundColor: c
}"
/> />
</div> </div>
<span style="margin-left: 4px;">{{ option.name }}</span> <span style="margin-left: 4px">{{ option.name }}</span>
</el-option> </el-option>
</el-select> </el-select>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
style="margin-left: 2px;" style="margin-left: 2px"
@click="resetCustomColor" @click="resetCustomColor"
>{{ $t('commons.reset') }} >{{ $t('commons.reset') }}
</el-button> </el-button>
</div> </div>
<!--自定义配色方案--> <!--自定义配色方案-->
<div v-show="showProperty('custom')">
<div <div
v-show="showProperty('custom')" style="display: flex; align-items: center; margin-top: 10px"
> >
<div style="display: flex;align-items: center;margin-top: 10px;"> <span class="color-label">{{
<span class="color-label">{{ $t('chart.custom_case') }}</span> $t('chart.custom_case')
}}</span>
<span> <span>
<el-radio-group <el-radio-group
v-model="customColor" v-model="customColor"
class="color-type" class="color-type"
> >
<el-radio <el-radio
v-for="(c,index) in colorForm.colors" v-for="(c, index) in colorForm.colors"
:key="index" :key="index"
:label="c" :label="c"
style="padding: 2px;" style="padding: 2px"
@change="switchColor(index)"
> >
<span :style="{width: '20px',height: '20px',display:'inline-block',backgroundColor: c}" /> <span
:style="{
width: '20px',
height: '20px',
display: 'inline-block',
backgroundColor: c
}"
/>
</el-radio> </el-radio>
</el-radio-group> </el-radio-group>
</span> </span>
</div> </div>
<div style="display: flex;align-items: center;margin-top: 10px;"> <div
style="display: flex; align-items: center; margin-top: 10px"
>
<span class="color-label" /> <span class="color-label" />
<span> <span>
<el-color-picker <el-color-picker
...@@ -100,16 +134,23 @@ ...@@ -100,16 +134,23 @@
<!--自定义系列或维度枚举值颜色--> <!--自定义系列或维度枚举值颜色-->
<div <div
v-show="showProperty('colorPanel')" v-show="showProperty('colorPanel')"
style="display: flex;align-items: center;margin-top: 10px;" style="display: flex; align-items: center; margin-top: 10px"
> >
<span class="color-label" /> <span class="color-label" />
<span> <span>
<span <span
v-for="(c,index) in colorForm.colors" v-for="(c, index) in colorForm.colors"
:key="index" :key="index"
style="padding: 2px;" style="padding: 2px"
> >
<span :style="{width: '20px',height: '20px',display:'inline-block',backgroundColor: c}" /> <span
:style="{
width: '20px',
height: '20px',
display: 'inline-block',
backgroundColor: c
}"
/>
</span> </span>
</span> </span>
</div> </div>
...@@ -121,9 +162,9 @@ ...@@ -121,9 +162,9 @@
class="custom-color-style" class="custom-color-style"
> >
<div <div
v-for="(item,index) in colorForm.seriesColors" v-for="(item, index) in colorForm.seriesColors"
:key="index" :key="index"
style="display: flex;align-items: center;margin: 2px 0;" style="display: flex; align-items: center; margin: 2px 0"
> >
<el-color-picker <el-color-picker
v-model="item.color" v-model="item.color"
...@@ -134,18 +175,25 @@ ...@@ -134,18 +175,25 @@
<span <span
class="span-label" class="span-label"
:title="item.name" :title="item.name"
>{{ item.name }}</span> >{{
item.name
}}</span>
</div> </div>
</div> </div>
<div <div
slot="reference" slot="reference"
style="cursor: pointer;margin-top: 2px;width: 180px;" style="cursor: pointer; margin-top: 2px; width: 180px"
> >
<span <span
v-for="(c,index) in colorForm.colors" v-for="(c, index) in colorForm.colors"
:key="index" :key="index"
:style="{width: '20px',height: '20px',display:'inline-block',backgroundColor: c}" :style="{
width: '20px',
height: '20px',
display: 'inline-block',
backgroundColor: c
}"
/> />
</div> </div>
</el-popover> </el-popover>
...@@ -306,7 +354,11 @@ ...@@ -306,7 +354,11 @@
</el-form-item> </el-form-item>
<el-form-item <el-form-item
v-show="showProperty('mapLineSourceColor')" v-show="showProperty('mapLineSourceColor')"
:label="colorForm.mapLineGradient ? $t('chart.map_line_color_source_color') : $t('chart.color')" :label="
colorForm.mapLineGradient
? $t('chart.map_line_color_source_color')
: $t('chart.color')
"
class="form-item" class="form-item"
> >
<el-color-picker <el-color-picker
...@@ -326,7 +378,7 @@ ...@@ -326,7 +378,7 @@
/> />
</el-form-item> </el-form-item>
<el-form-item <el-form-item
v-show="showProperty('area-border-color') " v-show="showProperty('area-border-color')"
:label="$t('chart.area_border_color')" :label="$t('chart.area_border_color')"
class="form-item" class="form-item"
> >
...@@ -381,82 +433,242 @@ export default { ...@@ -381,82 +433,242 @@ export default {
{ {
name: this.$t('chart.color_default'), name: this.$t('chart.color_default'),
value: 'default', value: 'default',
colors: ['#5470c6', '#91cc75', '#fac858', '#ee6666', '#73c0de', '#3ba272', '#fc8452', '#9a60b4', '#ea7ccc'] colors: [
'#5470c6',
'#91cc75',
'#fac858',
'#ee6666',
'#73c0de',
'#3ba272',
'#fc8452',
'#9a60b4',
'#ea7ccc'
]
}, },
{ {
name: this.$t('chart.color_retro'), name: this.$t('chart.color_retro'),
value: 'retro', value: 'retro',
colors: ['#0780cf', '#765005', '#fa6d1d', '#0e2c82', '#b6b51f', '#da1f18', '#701866', '#f47a75', '#009db2'] colors: [
'#0780cf',
'#765005',
'#fa6d1d',
'#0e2c82',
'#b6b51f',
'#da1f18',
'#701866',
'#f47a75',
'#009db2'
]
}, },
{ {
name: this.$t('chart.color_elegant'), name: this.$t('chart.color_elegant'),
value: 'elegant', value: 'elegant',
colors: ['#95a2ff', '#fa8080', '#ffc076', '#fae768', '#87e885', '#3cb9fc', '#73abf5', '#cb9bff', '#434348'] colors: [
'#95a2ff',
'#fa8080',
'#ffc076',
'#fae768',
'#87e885',
'#3cb9fc',
'#73abf5',
'#cb9bff',
'#434348'
]
}, },
{ {
name: this.$t('chart.color_future'), name: this.$t('chart.color_future'),
value: 'future', value: 'future',
colors: ['#63b2ee', '#76da91', '#f8cb7f', '#f89588', '#7cd6cf', '#9192ab', '#7898e1', '#efa666', '#eddd86'] colors: [
'#63b2ee',
'#76da91',
'#f8cb7f',
'#f89588',
'#7cd6cf',
'#9192ab',
'#7898e1',
'#efa666',
'#eddd86'
]
}, },
{ {
name: this.$t('chart.color_gradual'), name: this.$t('chart.color_gradual'),
value: 'gradual', value: 'gradual',
colors: ['#71ae46', '#96b744', '#c4cc38', '#ebe12a', '#eab026', '#e3852b', '#d85d2a', '#ce2626', '#ac2026'] colors: [
'#71ae46',
'#96b744',
'#c4cc38',
'#ebe12a',
'#eab026',
'#e3852b',
'#d85d2a',
'#ce2626',
'#ac2026'
]
}, },
{ {
name: this.$t('chart.color_simple'), name: this.$t('chart.color_simple'),
value: 'simple', value: 'simple',
colors: ['#929fff', '#9de0ff', '#ffa897', '#af87fe', '#7dc3fe', '#bb60b2', '#433e7c', '#f47a75', '#009db2'] colors: [
'#929fff',
'#9de0ff',
'#ffa897',
'#af87fe',
'#7dc3fe',
'#bb60b2',
'#433e7c',
'#f47a75',
'#009db2'
]
}, },
{ {
name: this.$t('chart.color_business'), name: this.$t('chart.color_business'),
value: 'business', value: 'business',
colors: ['#194f97', '#555555', '#bd6b08', '#00686b', '#c82d31', '#625ba1', '#898989', '#9c9800', '#007f54'] colors: [
'#194f97',
'#555555',
'#bd6b08',
'#00686b',
'#c82d31',
'#625ba1',
'#898989',
'#9c9800',
'#007f54'
]
}, },
{ {
name: this.$t('chart.color_gentle'), name: this.$t('chart.color_gentle'),
value: 'gentle', value: 'gentle',
colors: ['#5b9bd5', '#ed7d31', '#70ad47', '#ffc000', '#4472c4', '#91d024', '#b235e6', '#02ae75', '#5b9bd5'] colors: [
'#5b9bd5',
'#ed7d31',
'#70ad47',
'#ffc000',
'#4472c4',
'#91d024',
'#b235e6',
'#02ae75',
'#5b9bd5'
]
}, },
{ {
name: this.$t('chart.color_technology'), name: this.$t('chart.color_technology'),
value: 'technology', value: 'technology',
colors: ['#05f8d6', '#0082fc', '#fdd845', '#22ed7c', '#09b0d3', '#1d27c9', '#f9e264', '#f47a75', '#009db2'] colors: [
'#05f8d6',
'#0082fc',
'#fdd845',
'#22ed7c',
'#09b0d3',
'#1d27c9',
'#f9e264',
'#f47a75',
'#009db2'
]
}, },
{ {
name: this.$t('chart.color_light'), name: this.$t('chart.color_light'),
value: 'light', value: 'light',
colors: ['#884898', '#808080', '#82ae46', '#00a3af', '#ef8b07', '#007bbb', '#9d775f', '#fae800', '#5f9b3c'] colors: [
'#884898',
'#808080',
'#82ae46',
'#00a3af',
'#ef8b07',
'#007bbb',
'#9d775f',
'#fae800',
'#5f9b3c'
]
}, },
{ {
name: this.$t('chart.color_classical'), name: this.$t('chart.color_classical'),
value: 'classical', value: 'classical',
colors: ['#007bbb', '#ffdb4f', '#dd4b4b', '#2ca9e1', '#ef8b07', '#4a488e', '#82ae46', '#dd4b4b', '#bb9581'] colors: [
'#007bbb',
'#ffdb4f',
'#dd4b4b',
'#2ca9e1',
'#ef8b07',
'#4a488e',
'#82ae46',
'#dd4b4b',
'#bb9581'
]
}, },
{ {
name: this.$t('chart.color_fresh'), name: this.$t('chart.color_fresh'),
value: 'fresh', value: 'fresh',
colors: ['#5f9b3c', '#75c24b', '#83d65f', '#aacf53', '#c7dc68', '#d8e698', '#e0ebaf', '#bbc8e6', '#e5e5e5'] colors: [
'#5f9b3c',
'#75c24b',
'#83d65f',
'#aacf53',
'#c7dc68',
'#d8e698',
'#e0ebaf',
'#bbc8e6',
'#e5e5e5'
]
}, },
{ {
name: this.$t('chart.color_energy'), name: this.$t('chart.color_energy'),
value: 'energy', value: 'energy',
colors: ['#ef8b07', '#2a83a2', '#f07474', '#c55784', '#274a78', '#7058a3', '#0095d9', '#75c24b', '#808080'] colors: [
'#ef8b07',
'#2a83a2',
'#f07474',
'#c55784',
'#274a78',
'#7058a3',
'#0095d9',
'#75c24b',
'#808080'
]
}, },
{ {
name: this.$t('chart.color_red'), name: this.$t('chart.color_red'),
value: 'red', value: 'red',
colors: ['#ff0000', '#ef8b07', '#4c6cb3', '#f8e944', '#69821b', '#9c5ec3', '#00ccdf', '#f07474', '#bb9581'] colors: [
'#ff0000',
'#ef8b07',
'#4c6cb3',
'#f8e944',
'#69821b',
'#9c5ec3',
'#00ccdf',
'#f07474',
'#bb9581'
]
}, },
{ {
name: this.$t('chart.color_fast'), name: this.$t('chart.color_fast'),
value: 'fast', value: 'fast',
colors: ['#fae800', '#00c039', '#0482dc', '#bb9581', '#ff7701', '#9c5ec3', '#00ccdf', '#00c039', '#ff7701'] colors: [
'#fae800',
'#00c039',
'#0482dc',
'#bb9581',
'#ff7701',
'#9c5ec3',
'#00ccdf',
'#00c039',
'#ff7701'
]
}, },
{ {
name: this.$t('chart.color_spiritual'), name: this.$t('chart.color_spiritual'),
value: 'spiritual', value: 'spiritual',
colors: ['#00a3af', '#4da798', '#57baaa', '#62d0bd', '#6ee4d0', '#86e7d6', '#aeede1', '#bde1e6', '#e5e5e5'] colors: [
'#00a3af',
'#4da798',
'#57baaa',
'#62d0bd',
'#6ee4d0',
'#86e7d6',
'#aeede1',
'#bde1e6',
'#e5e5e5'
]
} }
], ],
colorForm: JSON.parse(JSON.stringify(DEFAULT_COLOR_CASE)), colorForm: JSON.parse(JSON.stringify(DEFAULT_COLOR_CASE)),
...@@ -475,6 +687,17 @@ export default { ...@@ -475,6 +687,17 @@ export default {
{ name: this.$t('chart.map_style_macaron'), value: 'macaron' }, { name: this.$t('chart.map_style_macaron'), value: 'macaron' },
{ name: this.$t('chart.map_style_blue'), value: 'blue' }, { name: this.$t('chart.map_style_blue'), value: 'blue' },
{ name: this.$t('chart.map_style_wine'), value: 'wine' } { name: this.$t('chart.map_style_wine'), value: 'wine' }
],
theme: null,
themeList: [
{
label: this.$t('amap.light'),
value: 'light'
},
{
label: this.$t('amap.dark'),
value: 'dark'
}
] ]
} }
}, },
...@@ -483,19 +706,21 @@ export default { ...@@ -483,19 +706,21 @@ export default {
const chart = this.chart const chart = this.chart
if (chart.type === 'flow-map') { if (chart.type === 'flow-map') {
let customAttr = null let customAttr = null
if (Object.prototype.toString.call(chart.customAttr) === '[object Object]') { if (
Object.prototype.toString.call(chart.customAttr) === '[object Object]'
) {
customAttr = JSON.parse(JSON.stringify(chart.customAttr)) customAttr = JSON.parse(JSON.stringify(chart.customAttr))
} else { } else {
customAttr = JSON.parse(chart.customAttr) customAttr = JSON.parse(chart.customAttr)
} }
return customAttr.size.mapLineAnimate && equalsAny(customAttr.size.mapLineType, 'line', 'arc') return (
customAttr.size.mapLineAnimate &&
equalsAny(customAttr.size.mapLineType, 'line', 'arc')
)
} }
return false return false
}, },
...mapState([ ...mapState(['batchOptStatus', 'componentViewsData'])
'batchOptStatus',
'componentViewsData'
])
}, },
watch: { watch: {
'chart.id': { 'chart.id': {
...@@ -504,7 +729,7 @@ export default { ...@@ -504,7 +729,7 @@ export default {
this.colorIndex = 0 this.colorIndex = 0
} }
}, },
'chart': { chart: {
handler: function() { handler: function() {
this.init() this.init()
} }
...@@ -520,14 +745,14 @@ export default { ...@@ -520,14 +745,14 @@ export default {
methods: { methods: {
gradientColorChange(colorDto) { gradientColorChange(colorDto) {
const modifyNames = ['value', 'colors', 'seriesColors'] const modifyNames = ['value', 'colors', 'seriesColors']
modifyNames.forEach(item => { modifyNames.forEach((item) => {
this.colorForm['modifyName'] = item this.colorForm['modifyName'] = item
this.$emit('onColorChange', this.colorForm) this.$emit('onColorChange', this.colorForm)
}) })
}, },
changeColorOption(modifyName = 'value') { changeColorOption(modifyName = 'value') {
const that = this const that = this
const items = this.colorCases.filter(ele => { const items = this.colorCases.filter((ele) => {
return ele.value === that.colorForm.value return ele.value === that.colorForm.value
}) })
this.colorForm.colors = JSON.parse(JSON.stringify(items[0].colors)) this.colorForm.colors = JSON.parse(JSON.stringify(items[0].colors))
...@@ -542,6 +767,7 @@ export default { ...@@ -542,6 +767,7 @@ export default {
this.changeColorCase(modifyName) this.changeColorCase(modifyName)
}, },
changeColorCase(modifyName) { changeColorCase(modifyName) {
console.log(6666666)
this.colorForm['modifyName'] = modifyName this.colorForm['modifyName'] = modifyName
this.$emit('onColorChange', this.colorForm) this.$emit('onColorChange', this.colorForm)
this.colorForm['modifyName'] = 'colors' this.colorForm['modifyName'] = 'colors'
...@@ -551,7 +777,9 @@ export default { ...@@ -551,7 +777,9 @@ export default {
const chart = JSON.parse(JSON.stringify(this.chart)) const chart = JSON.parse(JSON.stringify(this.chart))
if (chart.customAttr) { if (chart.customAttr) {
let customAttr = null let customAttr = null
if (Object.prototype.toString.call(chart.customAttr) === '[object Object]') { if (
Object.prototype.toString.call(chart.customAttr) === '[object Object]'
) {
customAttr = JSON.parse(JSON.stringify(chart.customAttr)) customAttr = JSON.parse(JSON.stringify(chart.customAttr))
} else { } else {
customAttr = JSON.parse(chart.customAttr) customAttr = JSON.parse(chart.customAttr)
...@@ -563,15 +791,35 @@ export default { ...@@ -563,15 +791,35 @@ export default {
this.colorIndex = 0 this.colorIndex = 0
} }
this.colorForm.tableBorderColor = this.colorForm.tableBorderColor ? this.colorForm.tableBorderColor : DEFAULT_COLOR_CASE.tableBorderColor this.colorForm.tableBorderColor = this.colorForm.tableBorderColor
this.colorForm.tableHeaderFontColor = this.colorForm.tableHeaderFontColor ? this.colorForm.tableHeaderFontColor : this.colorForm.tableFontColor ? this.colorForm.tableBorderColor
this.$set(this.colorForm, 'gradient', this.colorForm.gradient || false) : DEFAULT_COLOR_CASE.tableBorderColor
this.colorForm.tableScrollBarColor = this.colorForm.tableScrollBarColor ? this.colorForm.tableScrollBarColor : DEFAULT_COLOR_CASE.tableScrollBarColor this.colorForm.tableHeaderFontColor = this.colorForm
.tableHeaderFontColor
? this.colorForm.tableHeaderFontColor
: this.colorForm.tableFontColor
this.$set(
this.colorForm,
'gradient',
this.colorForm.gradient || false
)
this.colorForm.tableScrollBarColor = this.colorForm
.tableScrollBarColor
? this.colorForm.tableScrollBarColor
: DEFAULT_COLOR_CASE.tableScrollBarColor
this.colorForm.mapStyle = this.colorForm.mapStyle ? this.colorForm.mapStyle : DEFAULT_COLOR_CASE.mapStyle this.colorForm.mapStyle = this.colorForm.mapStyle
this.colorForm.mapLineGradient = this.colorForm.mapLineGradient ? this.colorForm.mapLineGradient : DEFAULT_COLOR_CASE.mapLineGradient ? this.colorForm.mapStyle
this.colorForm.mapLineSourceColor = this.colorForm.mapLineSourceColor ? this.colorForm.mapLineSourceColor : DEFAULT_COLOR_CASE.mapLineSourceColor : DEFAULT_COLOR_CASE.mapStyle
this.colorForm.mapLineTargetColor = this.colorForm.mapLineTargetColor ? this.colorForm.mapLineTargetColor : DEFAULT_COLOR_CASE.mapLineTargetColor this.colorForm.mapLineGradient = this.colorForm.mapLineGradient
? this.colorForm.mapLineGradient
: DEFAULT_COLOR_CASE.mapLineGradient
this.colorForm.mapLineSourceColor = this.colorForm.mapLineSourceColor
? this.colorForm.mapLineSourceColor
: DEFAULT_COLOR_CASE.mapLineSourceColor
this.colorForm.mapLineTargetColor = this.colorForm.mapLineTargetColor
? this.colorForm.mapLineTargetColor
: DEFAULT_COLOR_CASE.mapLineTargetColor
this.initCustomColor() this.initCustomColor()
} }
...@@ -603,17 +851,27 @@ export default { ...@@ -603,17 +851,27 @@ export default {
}, },
initCustomColor(reset) { initCustomColor(reset) {
if (!this.batchOptStatus && this.chart.render && this.chart.render === 'antv' && if (
!this.batchOptStatus &&
this.chart.render &&
this.chart.render === 'antv' &&
(this.chart.type.includes('bar') || (this.chart.type.includes('bar') ||
this.chart.type.includes('line') || this.chart.type.includes('line') ||
this.chart.type.includes('area') || this.chart.type.includes('area') ||
this.chart.type.includes('pie') || this.chart.type.includes('pie') ||
this.chart.type === 'funnel' || this.chart.type === 'funnel' ||
this.chart.type === 'radar' || this.chart.type === 'radar' ||
this.chart.type === 'scatter')) { this.chart.type === 'scatter')
) {
if (this.componentViewsData[this.chart.id]) { if (this.componentViewsData[this.chart.id]) {
const chart = JSON.parse(JSON.stringify(this.componentViewsData[this.chart.id])) const chart = JSON.parse(
this.colorForm.seriesColors = getColors(chart, this.colorForm.colors, reset) JSON.stringify(this.componentViewsData[this.chart.id])
)
this.colorForm.seriesColors = getColors(
chart,
this.colorForm.colors,
reset
)
} }
} }
} }
...@@ -628,7 +886,7 @@ export default { ...@@ -628,7 +886,7 @@ export default {
width: 100%; width: 100%;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center align-items: center;
} }
.form-item-slider ::v-deep .el-form-item__label { .form-item-slider ::v-deep .el-form-item__label {
...@@ -645,7 +903,7 @@ export default { ...@@ -645,7 +903,7 @@ export default {
} }
span { span {
font-size: 12px font-size: 12px;
} }
.el-form-item { .el-form-item {
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
icon="el-icon-plus" icon="el-icon-plus"
type="text" type="text"
size="mini" size="mini"
style="float: right;" style="float: right"
@click="add('group')" @click="add('group')"
/> />
</el-row> </el-row>
...@@ -31,10 +31,13 @@ ...@@ -31,10 +31,13 @@
size="mini" size="mini"
type="primary" type="primary"
> >
{{ searchMap[searchType] }}<i class="el-icon-arrow-down el-icon--right" /> {{ searchMap[searchType]
}}<i class="el-icon-arrow-down el-icon--right" />
</el-button> </el-button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="searchTypeClick('all')">{{ $t('commons.all') }}</el-dropdown-item> <el-dropdown-item @click.native="searchTypeClick('all')">{{
$t('commons.all')
}}</el-dropdown-item>
<el-dropdown-item @click.native="searchTypeClick('folder')">{{ $t('commons.folder') }} <el-dropdown-item @click.native="searchTypeClick('folder')">{{ $t('commons.folder') }}
</el-dropdown-item> </el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
...@@ -57,25 +60,30 @@ ...@@ -57,25 +60,30 @@
@node-collapse="nodeCollapse" @node-collapse="nodeCollapse"
> >
<span <span
v-if="data.modelInnerType ==='group'" v-if="data.modelInnerType === 'group'"
slot-scope="{ node, data }" slot-scope="{ node, data }"
class="custom-tree-node father" class="custom-tree-node father"
> >
<span style="display: flex;flex: 1;width: 0;"> <span style="display: flex; flex: 1; width: 0">
<span> <span>
<i class="el-icon-folder" /> <i class="el-icon-folder" />
</span> </span>
<span <span
style="margin-left: 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;" style="
margin-left: 6px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
"
:title="data.name" :title="data.name"
>{{ data.name }}</span> >{{ data.name }}</span>
</span> </span>
<span <span
v-if="hasDataPermission('manage',data.privileges)" v-if="hasDataPermission('manage', data.privileges)"
class="child" class="child"
> >
<span <span
v-if="data.modelInnerType ==='group'" v-if="data.modelInnerType === 'group'"
@click.stop @click.stop
> >
<el-dropdown <el-dropdown
...@@ -93,13 +101,13 @@ ...@@ -93,13 +101,13 @@
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item <el-dropdown-item
icon="el-icon-folder-add" icon="el-icon-folder-add"
:command="beforeClickAdd('group',data,node)" :command="beforeClickAdd('group', data, node)"
> >
{{ $t('chart.group') }} {{ $t('chart.group') }}
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item <el-dropdown-item
icon="el-icon-circle-plus" icon="el-icon-circle-plus"
:command="beforeClickAdd('chart',data,node)" :command="beforeClickAdd('chart', data, node)"
> >
{{ $t('chart.add_chart') }} {{ $t('chart.add_chart') }}
</el-dropdown-item> </el-dropdown-item>
...@@ -107,7 +115,7 @@ ...@@ -107,7 +115,7 @@
</el-dropdown> </el-dropdown>
</span> </span>
<span <span
style="margin-left: 12px;" style="margin-left: 12px"
@click.stop @click.stop
> >
<el-dropdown <el-dropdown
...@@ -125,19 +133,19 @@ ...@@ -125,19 +133,19 @@
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item <el-dropdown-item
icon="el-icon-edit-outline" icon="el-icon-edit-outline"
:command="beforeClickMore('rename',data,node)" :command="beforeClickMore('rename', data, node)"
> >
{{ $t('chart.rename') }} {{ $t('chart.rename') }}
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item <el-dropdown-item
icon="el-icon-right" icon="el-icon-right"
:command="beforeClickMore('move',data,node)" :command="beforeClickMore('move', data, node)"
> >
{{ $t('dataset.move_to') }} {{ $t('dataset.move_to') }}
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item <el-dropdown-item
icon="el-icon-delete" icon="el-icon-delete"
:command="beforeClickMore('delete',data,node)" :command="beforeClickMore('delete', data, node)"
> >
{{ $t('chart.delete') }} {{ $t('chart.delete') }}
</el-dropdown-item> </el-dropdown-item>
...@@ -151,19 +159,24 @@ ...@@ -151,19 +159,24 @@
slot-scope="{ node, data }" slot-scope="{ node, data }"
class="custom-tree-node-list father" class="custom-tree-node-list father"
> >
<span style="display: flex;flex: 1;width: 0;"> <span style="display: flex; flex: 1; width: 0">
<span><svg-icon :icon-class="data.modelInnerType" /></span> <span><svg-icon :icon-class="data.modelInnerType" /></span>
<span <span
style="margin-left: 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;" style="
margin-left: 6px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
"
:title="data.name" :title="data.name"
>{{ data.name }}</span> >{{ data.name }}</span>
</span> </span>
<span <span
v-if="hasDataPermission('manage',data.privileges)" v-if="hasDataPermission('manage', data.privileges)"
class="child" class="child"
> >
<span <span
style="margin-left: 12px;" style="margin-left: 12px"
@click.stop @click.stop
> >
<el-dropdown <el-dropdown
...@@ -181,19 +194,19 @@ ...@@ -181,19 +194,19 @@
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item <el-dropdown-item
icon="el-icon-edit-outline" icon="el-icon-edit-outline"
:command="beforeClickMore('renameChart',data,node)" :command="beforeClickMore('renameChart', data, node)"
> >
{{ $t('chart.rename') }} {{ $t('chart.rename') }}
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item <el-dropdown-item
icon="el-icon-right" icon="el-icon-right"
:command="beforeClickMore('moveDs',data,node)" :command="beforeClickMore('moveDs', data, node)"
> >
{{ $t('dataset.move_to') }} {{ $t('dataset.move_to') }}
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item <el-dropdown-item
icon="el-icon-delete" icon="el-icon-delete"
:command="beforeClickMore('deleteChart',data,node)" :command="beforeClickMore('deleteChart', data, node)"
> >
{{ $t('chart.delete') }} {{ $t('chart.delete') }}
</el-dropdown-item> </el-dropdown-item>
...@@ -297,7 +310,7 @@ ...@@ -297,7 +310,7 @@
width="1000px" width="1000px"
class="dialog-css" class="dialog-css"
> >
<el-row style="width: 800px;"> <el-row style="width: 800px">
<el-form <el-form
ref="form" ref="form"
:model="table" :model="table"
...@@ -332,15 +345,17 @@ ...@@ -332,15 +345,17 @@
/> />
<el-row <el-row
v-show="createActive === 2" v-show="createActive === 2"
style="padding: 0 20px;" style="padding: 0 20px"
> >
<el-row class="chart-box"> <el-row class="chart-box">
<span> <span>
<span <span
class="theme-border-class" class="theme-border-class"
style="font-size: 12px" style="font-size: 12px"
>{{ $t('chart.chart_type') }}</span> >{{
<span style="float: right;"> $t('chart.chart_type')
}}</span>
<span style="float: right">
<el-select <el-select
v-model="view.render" v-model="view.render"
class="render-select" class="render-select"
...@@ -365,7 +380,7 @@ ...@@ -365,7 +380,7 @@
<chart-type <chart-type
ref="cu-chart-type" ref="cu-chart-type"
:chart="view" :chart="view"
style="height: 350px;" style="height: 350px"
/> />
</el-radio-group> </el-radio-group>
</div> </div>
...@@ -373,10 +388,14 @@ ...@@ -373,10 +388,14 @@
</el-row> </el-row>
<el-row <el-row
class="chart-box" class="chart-box"
style="text-align: center;" style="text-align: center"
> >
<svg-icon <svg-icon
:icon-class="view.isPlugin && view.type && view.type !== 'buddle-map' ? ('/api/pluginCommon/staticInfo/' + view.type + '/svg') : view.type" :icon-class="
view.isPlugin && view.type && view.type !== 'buddle-map'
? '/api/pluginCommon/staticInfo/' + view.type + '/svg'
: view.type
"
class="chart-icon" class="chart-icon"
/> />
</el-row> </el-row>
...@@ -396,9 +415,7 @@ ...@@ -396,9 +415,7 @@
type="primary" type="primary"
size="mini" size="mini"
@click="createPreview" @click="createPreview"
>{{ >{{ $t('chart.preview') }}
$t('chart.preview')
}}
</el-button> </el-button>
<el-button <el-button
v-if="createActive === 1" v-if="createActive === 1"
...@@ -446,9 +463,7 @@ ...@@ -446,9 +463,7 @@
type="primary" type="primary"
size="mini" size="mini"
@click="saveMoveGroup(tGroup)" @click="saveMoveGroup(tGroup)"
>{{ >{{ $t('dataset.confirm') }}
$t('dataset.confirm')
}}
</el-button> </el-button>
</div> </div>
</el-dialog> </el-dialog>
...@@ -480,9 +495,7 @@ ...@@ -480,9 +495,7 @@
type="primary" type="primary"
size="mini" size="mini"
@click="saveMoveDs(tDs)" @click="saveMoveDs(tDs)"
>{{ >{{ $t('dataset.confirm') }}
$t('dataset.confirm')
}}
</el-button> </el-button>
</div> </div>
</el-dialog> </el-dialog>
...@@ -516,7 +529,12 @@ import { adaptCurTheme } from '@/components/canvas/utils/style' ...@@ -516,7 +529,12 @@ import { adaptCurTheme } from '@/components/canvas/utils/style'
export default { export default {
name: 'Group', name: 'Group',
components: { ChartType, TableSelector, GroupMoveSelector, ChartMoveSelector }, components: {
ChartType,
TableSelector,
GroupMoveSelector,
ChartMoveSelector
},
props: { props: {
saveStatus: { saveStatus: {
type: Object, type: Object,
...@@ -565,14 +583,30 @@ export default { ...@@ -565,14 +583,30 @@ export default {
}, },
groupFormRules: { groupFormRules: {
name: [ name: [
{ required: true, message: this.$t('commons.input_content'), trigger: 'change' }, {
{ max: 50, message: this.$t('commons.char_can_not_more_50'), trigger: 'change' } required: true,
message: this.$t('commons.input_content'),
trigger: 'change'
},
{
max: 50,
message: this.$t('commons.char_can_not_more_50'),
trigger: 'change'
}
] ]
}, },
tableFormRules: { tableFormRules: {
name: [ name: [
{ required: true, message: this.$t('commons.input_content'), trigger: 'change' }, {
{ max: 50, message: this.$t('commons.char_can_not_more_50'), trigger: 'change' } required: true,
message: this.$t('commons.input_content'),
trigger: 'change'
},
{
max: 50,
message: this.$t('commons.char_can_not_more_50'),
trigger: 'change'
}
] ]
}, },
selectTableFlag: false, selectTableFlag: false,
...@@ -610,7 +644,8 @@ export default { ...@@ -610,7 +644,8 @@ export default {
}, },
renderOptions: [ renderOptions: [
{ name: 'AntV', value: 'antv' }, { name: 'AntV', value: 'antv' },
{ name: 'ECharts', value: 'echarts' } { name: 'ECharts', value: 'echarts' },
{ name: '地图', value: 'aMap' }
], ],
searchPids: [], // 查询命中的pid searchPids: [], // 查询命中的pid
filterText: '', filterText: '',
...@@ -637,8 +672,7 @@ export default { ...@@ -637,8 +672,7 @@ export default {
} }
}, },
watch: { watch: {
saveStatus() { saveStatus() {},
},
adviceGroupId() { adviceGroupId() {
// 仪表板新建视图建议的存放路径 // 仪表板新建视图建议的存放路径
if (this.optFrom === 'panel') { if (this.optFrom === 'panel') {
...@@ -660,20 +694,25 @@ export default { ...@@ -660,20 +694,25 @@ export default {
if (newVal.type === oldVal.type && newVal.render === oldVal.render) { if (newVal.type === oldVal.type && newVal.render === oldVal.render) {
return return
} }
this.view.isPlugin = this.$refs['cu-chart-type'] && this.$refs['cu-chart-type'].currentIsPlugin(newVal.type, newVal.render) this.view.isPlugin =
this.$refs['cu-chart-type'] &&
this.$refs['cu-chart-type'].currentIsPlugin(newVal.type, newVal.render)
} }
}, },
created() { created() {
const plugins = localStorage.getItem('plugin-views') && JSON.parse(localStorage.getItem('plugin-views')) const plugins =
localStorage.getItem('plugin-views') &&
JSON.parse(localStorage.getItem('plugin-views'))
if (plugins) { if (plugins) {
this.loadPluginType() this.loadPluginType()
} else { } else {
pluginTypes().then(res => { pluginTypes()
.then((res) => {
const plugins = res.data const plugins = res.data
localStorage.setItem('plugin-views', JSON.stringify(plugins)) localStorage.setItem('plugin-views', JSON.stringify(plugins))
this.loadPluginType() this.loadPluginType()
}).catch(e => { })
.catch((e) => {
localStorage.setItem('plugin-views', null) localStorage.setItem('plugin-views', null)
this.loadPluginType() this.loadPluginType()
}) })
...@@ -688,8 +727,16 @@ export default { ...@@ -688,8 +727,16 @@ export default {
}, },
methods: { methods: {
loadPluginType() { loadPluginType() {
const plugins = localStorage.getItem('plugin-views') && JSON.parse(localStorage.getItem('plugin-views')) || [] const plugins =
const pluginOptions = plugins.filter(plugin => !this.renderOptions.some(option => option.value === plugin.render)).map(plugin => { (localStorage.getItem('plugin-views') &&
JSON.parse(localStorage.getItem('plugin-views'))) ||
[]
const pluginOptions = plugins
.filter(
(plugin) =>
!this.renderOptions.some((option) => option.value === plugin.render)
)
.map((plugin) => {
return { name: plugin.render, value: plugin.render } return { name: plugin.render, value: plugin.render }
}) })
this.pluginRenderOptions = [...this.renderOptions, ...pluginOptions] this.pluginRenderOptions = [...this.renderOptions, ...pluginOptions]
...@@ -707,9 +754,9 @@ export default { ...@@ -707,9 +754,9 @@ export default {
beforeClickAdd(type, data, node) { beforeClickAdd(type, data, node) {
return { return {
'type': type, type: type,
'data': data, data: data,
'node': node node: node
} }
}, },
...@@ -742,9 +789,9 @@ export default { ...@@ -742,9 +789,9 @@ export default {
beforeClickMore(type, data, node) { beforeClickMore(type, data, node) {
return { return {
'type': type, type: type,
'data': data, data: data,
'node': node node: node
} }
}, },
...@@ -764,7 +811,7 @@ export default { ...@@ -764,7 +811,7 @@ export default {
saveGroup(group) { saveGroup(group) {
this.$refs['groupForm'].validate((valid) => { this.$refs['groupForm'].validate((valid) => {
if (valid) { if (valid) {
post('/chart/group/save', group).then(response => { post('/chart/group/save', group).then((response) => {
this.close() this.close()
this.$message({ this.$message({
message: this.$t('dataset.save_success'), message: this.$t('dataset.save_success'),
...@@ -784,7 +831,8 @@ export default { ...@@ -784,7 +831,8 @@ export default {
if (valid) { if (valid) {
view.title = view.name view.title = view.name
view.sceneId = view.pid view.sceneId = view.pid
post('/chart/view/save/' + this.panelInfo.id, view).then(response => { post('/chart/view/save/' + this.panelInfo.id, view).then(
(response) => {
this.closeTable() this.closeTable()
this.$message({ this.$message({
message: this.$t('dataset.save_success'), message: this.$t('dataset.save_success'),
...@@ -793,7 +841,8 @@ export default { ...@@ -793,7 +841,8 @@ export default {
}) })
this.treeNode() this.treeNode()
this.$emit('switchComponent', { name: '' }) this.$emit('switchComponent', { name: '' })
}) }
)
} else { } else {
// this.$message({ // this.$message({
// message: this.$t('commons.input_content'), // message: this.$t('commons.input_content'),
...@@ -810,8 +859,9 @@ export default { ...@@ -810,8 +859,9 @@ export default {
confirmButtonText: this.$t('chart.confirm'), confirmButtonText: this.$t('chart.confirm'),
cancelButtonText: this.$t('chart.cancel'), cancelButtonText: this.$t('chart.cancel'),
type: 'warning' type: 'warning'
}).then(() => { })
post('/chart/group/delete/' + data.id, null).then(response => { .then(() => {
post('/chart/group/delete/' + data.id, null).then((response) => {
this.$message({ this.$message({
type: 'success', type: 'success',
message: this.$t('chart.delete_success'), message: this.$t('chart.delete_success'),
...@@ -820,8 +870,8 @@ export default { ...@@ -820,8 +870,8 @@ export default {
this.treeNode() this.treeNode()
this.$emit('switchComponent', { name: '' }) this.$emit('switchComponent', { name: '' })
}) })
}).catch(() => {
}) })
.catch(() => {})
}, },
deleteChart(data) { deleteChart(data) {
...@@ -829,8 +879,9 @@ export default { ...@@ -829,8 +879,9 @@ export default {
confirmButtonText: this.$t('chart.confirm'), confirmButtonText: this.$t('chart.confirm'),
cancelButtonText: this.$t('chart.cancel'), cancelButtonText: this.$t('chart.cancel'),
type: 'warning' type: 'warning'
}).then(() => { })
post('/chart/view/delete/' + data.id, null).then(response => { .then(() => {
post('/chart/view/delete/' + data.id, null).then((response) => {
this.$message({ this.$message({
type: 'success', type: 'success',
message: this.$t('chart.delete_success'), message: this.$t('chart.delete_success'),
...@@ -840,8 +891,8 @@ export default { ...@@ -840,8 +891,8 @@ export default {
this.$emit('switchComponent', { name: '' }) this.$emit('switchComponent', { name: '' })
this.$store.dispatch('chart/setTable', null) this.$store.dispatch('chart/setTable', null)
}) })
}).catch(() => {
}) })
.catch(() => {})
}, },
close() { close() {
...@@ -865,7 +916,7 @@ export default { ...@@ -865,7 +916,7 @@ export default {
}, },
groupTree(group) { groupTree(group) {
post('/chart/group/tree', group).then(response => { post('/chart/group/tree', group).then((response) => {
this.tData = response.data this.tData = response.data
}) })
}, },
...@@ -882,12 +933,12 @@ export default { ...@@ -882,12 +933,12 @@ export default {
}, },
treeNode(cache = false) { treeNode(cache = false) {
const modelInfo = localStorage.getItem('chart-tree') const modelInfo = localStorage.getItem('chart-tree')
const userCache = (modelInfo && cache) const userCache = modelInfo && cache
if (userCache) { if (userCache) {
this.tData = JSON.parse(modelInfo) this.tData = JSON.parse(modelInfo)
this.initCurrentNode() this.initCurrentNode()
} }
queryAuthModel({ modelType: 'chart' }, !userCache).then(res => { queryAuthModel({ modelType: 'chart' }, !userCache).then((res) => {
localStorage.setItem('chart-tree', JSON.stringify(res.data)) localStorage.setItem('chart-tree', JSON.stringify(res.data))
if (!userCache) { if (!userCache) {
this.tData = res.data this.tData = res.data
...@@ -906,7 +957,7 @@ export default { ...@@ -906,7 +957,7 @@ export default {
post('/chart/view/list', { post('/chart/view/list', {
sort: 'create_time desc,name asc', sort: 'create_time desc,name asc',
sceneId: this.currGroup.id sceneId: this.currGroup.id
}).then(response => { }).then((response) => {
this.tables = response.data this.tables = response.data
this.chartData = JSON.parse(JSON.stringify(this.tables)) this.chartData = JSON.parse(JSON.stringify(this.tables))
}) })
...@@ -927,7 +978,7 @@ export default { ...@@ -927,7 +978,7 @@ export default {
beforeClickAddData(type) { beforeClickAddData(type) {
return { return {
'type': type type: type
} }
}, },
sceneClick(data, node) { sceneClick(data, node) {
...@@ -1037,18 +1088,24 @@ export default { ...@@ -1037,18 +1088,24 @@ export default {
this.setChartDefaultOptions(view) this.setChartDefaultOptions(view)
const _this = this const _this = this
post('/chart/view/newOne/' + this.panelInfo.id, view, true).then(response => { console.log(view)
post('/chart/view/newOne/' + this.panelInfo.id, view, true).then(
(response) => {
this.closeCreateChart() this.closeCreateChart()
this.$store.dispatch('chart/setTableId', null) this.$store.dispatch('chart/setTableId', null)
this.$store.dispatch('chart/setTableId', this.table.id) this.$store.dispatch('chart/setTableId', this.table.id)
if (this.optFrom === 'panel') { if (this.optFrom === 'panel') {
this.$emit('newViewInfo', { 'id': response.data.id, 'type': response.data.type }) this.$emit('newViewInfo', {
id: response.data.id,
type: response.data.type
})
} else { } else {
_this.expandedArray.push(response.data.sceneId) _this.expandedArray.push(response.data.sceneId)
_this.currentKey = response.data.id _this.currentKey = response.data.id
_this.treeNode() _this.treeNode()
} }
}) }
)
}, },
setChartDefaultOptions(view) { setChartDefaultOptions(view) {
...@@ -1095,7 +1152,7 @@ export default { ...@@ -1095,7 +1152,7 @@ export default {
if (path === '/chart/chart-edit') { if (path === '/chart/chart-edit') {
this.sceneMode = true this.sceneMode = true
const sceneId = this.$store.state.chart.sceneId const sceneId = this.$store.state.chart.sceneId
post('/chart/group/getScene/' + sceneId, null).then(response => { post('/chart/group/getScene/' + sceneId, null).then((response) => {
this.currGroup = response.data this.currGroup = response.data
}) })
} }
...@@ -1121,7 +1178,7 @@ export default { ...@@ -1121,7 +1178,7 @@ export default {
post('/chart/view/listAndGroup', { post('/chart/view/listAndGroup', {
sort: 'name asc,create_time desc', sort: 'name asc,create_time desc',
sceneId: node.data.id sceneId: node.data.id
}).then(response => { }).then((response) => {
this.tables = response.data this.tables = response.data
this.chartData = JSON.parse(JSON.stringify(this.tables)) this.chartData = JSON.parse(JSON.stringify(this.tables))
resolve(this.chartData) resolve(this.chartData)
...@@ -1135,7 +1192,10 @@ export default { ...@@ -1135,7 +1192,10 @@ export default {
moveTo(data) { moveTo(data) {
this.moveGroup = true this.moveGroup = true
this.moveDialogTitle = this.$t('dataset.m1') + (data.name.length > 10 ? (data.name.substr(0, 10) + '...') : data.name) + this.$t('dataset.m2') this.moveDialogTitle =
this.$t('dataset.m1') +
(data.name.length > 10 ? data.name.substr(0, 10) + '...' : data.name) +
this.$t('dataset.m2')
}, },
closeMoveGroup() { closeMoveGroup() {
this.moveGroup = false this.moveGroup = false
...@@ -1150,7 +1210,7 @@ export default { ...@@ -1150,7 +1210,7 @@ export default {
}, },
saveMoveGroup() { saveMoveGroup() {
this.groupForm.pid = this.tGroup.id this.groupForm.pid = this.tGroup.id
post('/chart/group/save', this.groupForm).then(res => { post('/chart/group/save', this.groupForm).then((res) => {
this.closeMoveGroup() this.closeMoveGroup()
this.treeNode() this.treeNode()
}) })
...@@ -1162,7 +1222,10 @@ export default { ...@@ -1162,7 +1222,10 @@ export default {
moveToDs(data) { moveToDs(data) {
this.moveDs = true this.moveDs = true
this.moveDialogTitle = this.$t('dataset.m1') + (data.name.length > 10 ? (data.name.substr(0, 10) + '...') : data.name) + this.$t('dataset.m2') this.moveDialogTitle =
this.$t('dataset.m1') +
(data.name.length > 10 ? data.name.substr(0, 10) + '...' : data.name) +
this.$t('dataset.m2')
}, },
closeMoveDs() { closeMoveDs() {
this.moveDs = false this.moveDs = false
...@@ -1178,7 +1241,7 @@ export default { ...@@ -1178,7 +1241,7 @@ export default {
saveMoveDs() { saveMoveDs() {
const newSceneId = this.tDs.id const newSceneId = this.tDs.id
this.dsForm.sceneId = newSceneId this.dsForm.sceneId = newSceneId
post('/chart/view/save/' + this.panelInfo.id, this.dsForm).then(res => { post('/chart/view/save/' + this.panelInfo.id, this.dsForm).then((res) => {
this.closeMoveDs() this.closeMoveDs()
this.expandedArray.push(newSceneId) this.expandedArray.push(newSceneId)
this.treeNode() this.treeNode()
...@@ -1194,7 +1257,7 @@ export default { ...@@ -1194,7 +1257,7 @@ export default {
}, },
getChartGroupTree() { getChartGroupTree() {
chartGroupTree({}).then(res => { chartGroupTree({}).then((res) => {
this.chartGroupTreeAvailable = res.data this.chartGroupTreeAvailable = res.data
}) })
}, },
...@@ -1218,7 +1281,10 @@ export default { ...@@ -1218,7 +1281,10 @@ export default {
filterNode(value, data) { filterNode(value, data) {
if (!value) return true if (!value) return true
if (this.searchType === 'folder') { if (this.searchType === 'folder') {
if (data.modelInnerType === 'group' && data.label.indexOf(value) !== -1) { if (
data.modelInnerType === 'group' &&
data.label.indexOf(value) !== -1
) {
this.searchPids.push(data.id) this.searchPids.push(data.id)
return true return true
} }
...@@ -1247,7 +1313,7 @@ export default { ...@@ -1247,7 +1313,7 @@ export default {
<style scoped> <style scoped>
.el-divider--horizontal { .el-divider--horizontal {
margin: 12px 0 margin: 12px 0;
} }
.search-input { .search-input {
......
<template> <template>
<el-row <el-row
v-loading="loading" v-loading="loading"
style="height: 100%;overflow-y: hidden;width: 100%;border-left: 1px solid #E6E6E6" style="
height: 100%;
overflow-y: hidden;
width: 100%;
border-left: 1px solid #e6e6e6;
"
> >
<el-tooltip :content="$t('chart.draw_back')"> <el-tooltip :content="$t('chart.draw_back')">
<el-button <el-button
class="el-icon-d-arrow-right" class="el-icon-d-arrow-right"
style="position:absolute;left: 4px;top: 5px;z-index: 1" style="position: absolute; left: 4px; top: 5px; z-index: 1"
size="mini" size="mini"
circle circle
@click="closePanelEdit" @click="closePanelEdit"
/> />
</el-tooltip> </el-tooltip>
<el-row <el-row
style="height: 40px;" style="height: 40px"
class="padding-lr" class="padding-lr"
> >
<el-popover <el-popover
...@@ -31,15 +36,22 @@ ...@@ -31,15 +36,22 @@
<svg-icon <svg-icon
slot="reference" slot="reference"
class="icon-class" class="icon-class"
style="position:absolute; margin-left: 30px; top:14px;cursor: pointer;" style="
position: absolute;
margin-left: 30px;
top: 14px;
cursor: pointer;
"
icon-class="icon_info_filled" icon-class="icon_info_filled"
/> />
</el-popover> </el-popover>
<span <span
class="title-text view-title-name" class="title-text view-title-name"
style="line-height: 40px;" style="line-height: 40px"
>{{ view.name }}</span> >{{
<span style="float: right;line-height: 40px;"> view.name
}}</span>
<span style="float: right; line-height: 40px">
<el-button <el-button
round round
size="mini" size="mini"
...@@ -63,21 +75,20 @@ ...@@ -63,21 +75,20 @@
style="width: 350px" style="width: 350px"
> >
<div <div
v-if="view.dataFrom==='template'" v-if="view.dataFrom === 'template'"
class="view-panel-Mask" class="view-panel-Mask"
> >
<span style="opacity: 1;"> <span style="opacity: 1">
<el-button <el-button
style="opacity: 1!important;" style="opacity: 1 !important"
type="warning" type="warning"
:title="$t('chart.change_ds')" :title="$t('chart.change_ds')"
size="mini" size="mini"
round round
@click="changeDs" @click="changeDs"
> >
<span style="font-weight: bold">{{ $t('panel.template_view_tips') }}<i <span style="font-weight: bold">{{ $t('panel.template_view_tips')
class="el-icon-refresh el-icon--right" }}<i class="el-icon-refresh el-icon--right" /></span>
/></span>
</el-button> </el-button>
</span> </span>
</div> </div>
...@@ -85,9 +96,16 @@ ...@@ -85,9 +96,16 @@
<el-col <el-col
class="theme-border-class" class="theme-border-class"
:span="11" :span="11"
style="border-right: 1px solid #E6E6E6;" style="border-right: 1px solid #e6e6e6"
>
<div
style="
display: flex;
align-items: center;
justify-content: center;
padding: 6px;
"
> >
<div style="display: flex;align-items: center;justify-content: center;padding: 6px;">
<el-input <el-input
v-model="searchField" v-model="searchField"
size="mini" size="mini"
...@@ -107,12 +125,14 @@ ...@@ -107,12 +125,14 @@
icon="el-icon-setting" icon="el-icon-setting"
type="text" type="text"
size="mini" size="mini"
style="float: right;width: 20px;margin-left: 4px;" style="float: right; width: 20px; margin-left: 4px"
/> />
</span> </span>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item <el-dropdown-item
:disabled="!table || !hasDataPermission('manage',table.privileges)" :disabled="
!table || !hasDataPermission('manage', table.privileges)
"
:command="beforeFieldEdit('ds')" :command="beforeFieldEdit('ds')"
icon="el-icon-s-grid" icon="el-icon-s-grid"
> >
...@@ -131,7 +151,7 @@ ...@@ -131,7 +151,7 @@
icon="el-icon-refresh" icon="el-icon-refresh"
type="text" type="text"
size="mini" size="mini"
style="float: right;width: 20px;margin-left: 4px;" style="float: right; width: 20px; margin-left: 4px"
@click="changeDs" @click="changeDs"
/> />
</div> </div>
...@@ -148,9 +168,14 @@ ...@@ -148,9 +168,14 @@
<div class="padding-lr field-height"> <div class="padding-lr field-height">
<span>{{ $t('chart.dimension') }}</span> <span>{{ $t('chart.dimension') }}</span>
<draggable <draggable
v-if="table && hasDataPermission('use',table.privileges)" v-if="
table && hasDataPermission('use', table.privileges)
"
v-model="dimensionData" v-model="dimensionData"
:options="{group:{name: 'drag',pull:'clone'},sort: true}" :options="{
group: { name: 'drag', pull: 'clone' },
sort: true
}"
animation="300" animation="300"
:move="onMove" :move="onMove"
class="drag-list" class="drag-list"
...@@ -197,18 +222,24 @@ ...@@ -197,18 +222,24 @@
</span> </span>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item <el-dropdown-item
:command="handleChartFieldEdit(item,'copy')" :command="handleChartFieldEdit(item, 'copy')"
icon="el-icon-document-copy" icon="el-icon-document-copy"
>{{ $t('commons.copy') }}</el-dropdown-item> >{{ $t('commons.copy') }}</el-dropdown-item>
<span v-if="item.chartId"> <span v-if="item.chartId">
<el-dropdown-item <el-dropdown-item
:command="handleChartFieldEdit(item,'edit')" :command="
handleChartFieldEdit(item, 'edit')
"
icon="el-icon-edit" icon="el-icon-edit"
>{{ $t('commons.edit') }}</el-dropdown-item> >{{ $t('commons.edit') }}</el-dropdown-item>
<el-dropdown-item <el-dropdown-item
:command="handleChartFieldEdit(item,'delete')" :command="
handleChartFieldEdit(item, 'delete')
"
icon="el-icon-delete" icon="el-icon-delete"
>{{ $t('commons.delete') }}</el-dropdown-item> >{{
$t('commons.delete')
}}</el-dropdown-item>
</span> </span>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
...@@ -221,9 +252,14 @@ ...@@ -221,9 +252,14 @@
<div class="padding-lr field-height"> <div class="padding-lr field-height">
<span>{{ $t('chart.quota') }}</span> <span>{{ $t('chart.quota') }}</span>
<draggable <draggable
v-if="table && hasDataPermission('use',table.privileges)" v-if="
table && hasDataPermission('use', table.privileges)
"
v-model="quotaData" v-model="quotaData"
:options="{group:{name: 'drag',pull:'clone'},sort: true}" :options="{
group: { name: 'drag', pull: 'clone' },
sort: true
}"
animation="300" animation="300"
:move="onMove" :move="onMove"
class="drag-list" class="drag-list"
...@@ -232,7 +268,12 @@ ...@@ -232,7 +268,12 @@
<transition-group> <transition-group>
<span <span
v-for="item in quotaData" v-for="item in quotaData"
v-show="chart.type && (chart.type !== 'table-info' || (chart.type === 'table-info' && item.id !=='count'))" v-show="
chart.type &&
(chart.type !== 'table-info' ||
(chart.type === 'table-info' &&
item.id !== 'count'))
"
:key="item.id" :key="item.id"
class="item-quota father" class="item-quota father"
:title="item.name" :title="item.name"
...@@ -272,18 +313,24 @@ ...@@ -272,18 +313,24 @@
</span> </span>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item <el-dropdown-item
:command="handleChartFieldEdit(item,'copy')" :command="handleChartFieldEdit(item, 'copy')"
icon="el-icon-document-copy" icon="el-icon-document-copy"
>{{ $t('commons.copy') }}</el-dropdown-item> >{{ $t('commons.copy') }}</el-dropdown-item>
<span v-if="item.chartId"> <span v-if="item.chartId">
<el-dropdown-item <el-dropdown-item
:command="handleChartFieldEdit(item,'edit')" :command="
handleChartFieldEdit(item, 'edit')
"
icon="el-icon-edit" icon="el-icon-edit"
>{{ $t('commons.edit') }}</el-dropdown-item> >{{ $t('commons.edit') }}</el-dropdown-item>
<el-dropdown-item <el-dropdown-item
:command="handleChartFieldEdit(item,'delete')" :command="
handleChartFieldEdit(item, 'delete')
"
icon="el-icon-delete" icon="el-icon-delete"
>{{ $t('commons.delete') }}</el-dropdown-item> >{{
$t('commons.delete')
}}</el-dropdown-item>
</span> </span>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
...@@ -298,23 +345,31 @@ ...@@ -298,23 +345,31 @@
<el-col <el-col
:span="13" :span="13"
style="height: 100%;border-right: 1px solid #E6E6E6;" style="height: 100%; border-right: 1px solid #e6e6e6"
class="theme-border-class" class="theme-border-class"
> >
<div <div
style="height: 60px;overflow:auto" style="height: 60px; overflow: auto"
class="padding-lr theme-border-class" class="padding-lr theme-border-class"
> >
<span class="theme-border-class"> <span class="theme-border-class">
<span>{{ $t('chart.chart_type') }}</span> <span>{{ $t('chart.chart_type') }}</span>
<el-row style="padding: 4px 0 4px 10px;"> <el-row style="padding: 4px 0 4px 10px">
<span> <span>
<svg-icon <svg-icon
:icon-class="view.isPlugin && view.type && view.type !== 'buddle-map' ? ('/api/pluginCommon/staticInfo/' + view.type + '/svg') : view.type" :icon-class="
view.isPlugin &&
view.type &&
view.type !== 'buddle-map'
? '/api/pluginCommon/staticInfo/' +
view.type +
'/svg'
: view.type
"
class="chart-icon" class="chart-icon"
/> />
</span> </span>
<span style="float: right;"> <span style="float: right">
<el-popover <el-popover
placement="bottom-end" placement="bottom-end"
width="400" width="400"
...@@ -323,8 +378,10 @@ ...@@ -323,8 +378,10 @@
> >
<div class="padding-lr"> <div class="padding-lr">
<span> <span>
<span class="theme-border-class">{{ $t('chart.chart_type') }}</span> <span class="theme-border-class">{{
<span style="float: right;"> $t('chart.chart_type')
}}</span>
<span style="float: right">
<el-select <el-select
v-model="view.render" v-model="view.render"
class="render-select" class="render-select"
...@@ -360,7 +417,7 @@ ...@@ -360,7 +417,7 @@
<el-button <el-button
slot="reference" slot="reference"
size="mini" size="mini"
style="padding: 6px;" style="padding: 6px"
> >
{{ $t('chart.change_chart_type') }} {{ $t('chart.change_chart_type') }}
<i class="el-icon-caret-bottom" /> <i class="el-icon-caret-bottom" />
...@@ -371,31 +428,38 @@ ...@@ -371,31 +428,38 @@
</span> </span>
</div> </div>
<div <div
style="overflow:auto;border-top: 1px solid #e6e6e6" style="overflow: auto; border-top: 1px solid #e6e6e6"
class="attr-style theme-border-class" class="attr-style theme-border-class"
> >
<el-row style="height: 100%;"> <el-row style="height: 100%">
<el-row class="padding-lr"> <el-row class="padding-lr">
<span <span
v-show="view.type==='richTextView'" v-show="view.type === 'richTextView'"
style="color: #909399; font-size: 8px;width: 80px;text-align: right;" style="
color: #909399;
font-size: 8px;
width: 80px;
text-align: right;
"
> >
Tips:{{ $t('chart.rich_text_view_result_tips') }} Tips:{{ $t('chart.rich_text_view_result_tips') }}
</span> </span>
<span <span
v-show="view.type!=='richTextView'" v-show="view.type !== 'richTextView'"
style="width: 80px;text-align: right;" style="width: 80px; text-align: right"
> >
{{ $t('chart.result_count') }} {{ $t('chart.result_count') }}
</span> </span>
<el-row v-show="view.type!=='richTextView'"> <el-row v-show="view.type !== 'richTextView'">
<el-radio-group <el-radio-group
v-model="view.resultMode" v-model="view.resultMode"
class="radio-span" class="radio-span"
size="mini" size="mini"
@change="calcData" @change="calcData"
> >
<el-radio label="all"><span>{{ $t('chart.result_mode_all') }}</span></el-radio> <el-radio label="all"><span>{{
$t('chart.result_mode_all')
}}</span></el-radio>
<el-radio label="custom"> <el-radio label="custom">
<el-input <el-input
v-model="view.resultCount" v-model="view.resultCount"
...@@ -413,9 +477,7 @@ ...@@ -413,9 +477,7 @@
<!-- >--> <!-- >-->
<!-- Tips:{{ $t('chart.rich_text_view_result_tips') }}--> <!-- Tips:{{ $t('chart.rich_text_view_result_tips') }}-->
<!-- </span>--> <!-- </span>-->
<span <span style="width: 80px; text-align: right">
style="width: 80px;text-align: right;"
>
{{ $t('panel.refresh_frequency') }} {{ $t('panel.refresh_frequency') }}
</span> </span>
<el-tooltip <el-tooltip
...@@ -428,7 +490,7 @@ ...@@ -428,7 +490,7 @@
</div> </div>
<i <i
class="el-icon-info" class="el-icon-info"
style="cursor: pointer;color: #606266;font-size: 12px" style="cursor: pointer; color: #606266; font-size: 12px"
/> />
</el-tooltip> </el-tooltip>
<span class="padding-lr"> <span class="padding-lr">
...@@ -473,16 +535,23 @@ ...@@ -473,16 +535,23 @@
<plugin-com <plugin-com
v-if="view.isPlugin" v-if="view.isPlugin"
:component-name="view.type + '-data'" :component-name="view.type + '-data'"
:obj="{view, param, chart, dimension, dimensionData, quota, quotaData}" :obj="{
view,
param,
chart,
dimension,
dimensionData,
quota,
quotaData
}"
:bus="bus" :bus="bus"
/> />
<div v-else> <div v-else>
<el-row <el-row
v-if="view.type ==='map'" v-if="view.type === 'map'"
class="padding-lr" class="padding-lr"
> >
<span style="width: 80px;text-align: right;"> <span style="width: 80px; text-align: right">
<span>{{ $t('chart.map_range') }}</span> <span>{{ $t('chart.map_range') }}</span>
</span> </span>
<span class="tree-select-span"> <span class="tree-select-span">
...@@ -492,9 +561,15 @@ ...@@ -492,9 +561,15 @@
:options="places" :options="places"
:placeholder="$t('chart.select_map_range')" :placeholder="$t('chart.select_map_range')"
:normalizer="normalizer" :normalizer="normalizer"
:no-children-text="$t('commons.treeselect.no_children_text')" :no-children-text="
:no-options-text="$t('commons.treeselect.no_options_text')" $t('commons.treeselect.no_children_text')
:no-results-text="$t('commons.treeselect.no_results_text')" "
:no-options-text="
$t('commons.treeselect.no_options_text')
"
:no-results-text="
$t('commons.treeselect.no_results_text')
"
@input="calcData" @input="calcData"
@deselect="calcData" @deselect="calcData"
/> />
...@@ -526,7 +601,7 @@ ...@@ -526,7 +601,7 @@
> >
<transition-group class="draggable-group"> <transition-group class="draggable-group">
<dimension-ext-item <dimension-ext-item
v-for="(item,index) in view.xaxisExt" v-for="(item, index) in view.xaxisExt"
:key="item.id" :key="item.id"
:param="param" :param="param"
:index="index" :index="index"
...@@ -545,12 +620,19 @@ ...@@ -545,12 +620,19 @@
v-if="!view.xaxisExt || view.xaxisExt.length === 0" v-if="!view.xaxisExt || view.xaxisExt.length === 0"
class="drag-placeholder-style" class="drag-placeholder-style"
> >
<span class="drag-placeholder-style-span">{{ $t('chart.placeholder_field') }}</span> <span class="drag-placeholder-style-span">{{
$t('chart.placeholder_field')
}}</span>
</div> </div>
</el-row> </el-row>
<!--xAxis--> <!--xAxis-->
<el-row <el-row
v-if="view.type !=='text' && view.type !== 'gauge' && view.type !== 'liquid'" v-if="
view.type !== 'text' &&
view.type !== 'gauge' &&
view.type !== 'liquid' &&
view.type !== 'amap'
"
class="padding-lr" class="padding-lr"
> >
<span class="data-area-label"> <span class="data-area-label">
...@@ -558,26 +640,40 @@ ...@@ -558,26 +640,40 @@
$t('chart.drag_block_table_data_column') $t('chart.drag_block_table_data_column')
}}</span> }}</span>
<span <span
v-else-if="view.type && (view.type.includes('bar') || view.type.includes('line') || view.type.includes('scatter') || view.type === 'chart-mix' || view.type === 'waterfall' || view.type === 'area')" v-else-if="
view.type &&
(view.type.includes('bar') ||
view.type.includes('line') ||
view.type.includes('scatter') ||
view.type === 'chart-mix' ||
view.type === 'waterfall' ||
view.type === 'area')
"
>{{ $t('chart.drag_block_type_axis') }}</span> >{{ $t('chart.drag_block_type_axis') }}</span>
<span <span
v-else-if="view.type && view.type.includes('pie')" v-else-if="view.type && view.type.includes('pie')"
>{{ $t('chart.drag_block_pie_label') }}</span> >{{ $t('chart.drag_block_pie_label') }}</span>
<span v-else-if="view.type && view.type.includes('funnel')">{{ <span
$t('chart.drag_block_funnel_split') v-else-if="view.type && view.type.includes('funnel')"
}}</span> >{{ $t('chart.drag_block_funnel_split') }}</span>
<span v-else-if="view.type && view.type.includes('radar')">{{ <span
$t('chart.drag_block_radar_label') v-else-if="view.type && view.type.includes('radar')"
>{{ $t('chart.drag_block_radar_label') }}</span>
<span v-else-if="view.type && view.type === 'map'">{{
$t('chart.area')
}}</span> }}</span>
<span v-else-if="view.type && view.type === 'map'">{{ $t('chart.area') }}</span> <span
<span v-else-if="view.type && view.type.includes('treemap')">{{ v-else-if="view.type && view.type.includes('treemap')"
$t('chart.drag_block_treemap_label') >{{ $t('chart.drag_block_treemap_label') }}</span>
<span
v-else-if="view.type && view.type === 'word-cloud'"
>{{ $t('chart.drag_block_word_cloud_label') }}</span>
<span v-else-if="view.type && view.type === 'label'">{{
$t('chart.drag_block_label')
}}</span> }}</span>
<span v-else-if="view.type && view.type === 'word-cloud'">{{ <span v-else-if="view.type === 'flow-map'">{{
$t('chart.drag_block_word_cloud_label') $t('chart.start_point')
}}</span> }}</span>
<span v-else-if="view.type && view.type === 'label'">{{ $t('chart.drag_block_label') }}</span>
<span v-else-if="view.type === 'flow-map'">{{ $t('chart.start_point') }}</span>
<span v-show="view.type !== 'richTextView'"> / </span> <span v-show="view.type !== 'richTextView'"> / </span>
<span v-if="view.type && view.type !== 'table-info'"> <span v-if="view.type && view.type !== 'table-info'">
{{ $t('chart.dimension') }} {{ $t('chart.dimension') }}
...@@ -601,7 +697,7 @@ ...@@ -601,7 +697,7 @@
> >
<transition-group class="draggable-group"> <transition-group class="draggable-group">
<dimension-item <dimension-item
v-for="(item,index) in view.xaxis" v-for="(item, index) in view.xaxis"
:key="item.id" :key="item.id"
:param="param" :param="param"
:index="index" :index="index"
...@@ -622,24 +718,32 @@ ...@@ -622,24 +718,32 @@
v-if="!view.xaxis || view.xaxis.length === 0" v-if="!view.xaxis || view.xaxis.length === 0"
class="drag-placeholder-style" class="drag-placeholder-style"
> >
<span class="drag-placeholder-style-span">{{ $t('chart.placeholder_field') }}</span> <span class="drag-placeholder-style-span">{{
$t('chart.placeholder_field')
}}</span>
</div> </div>
</el-row> </el-row>
<!--group field,use xaxisExt--> <!--group field,use xaxisExt-->
<el-row <el-row
v-if="view.type === 'bar-group' v-if="
|| view.type === 'bar-group-stack' view.type === 'bar-group' ||
|| (view.render === 'antv' && view.type === 'line') view.type === 'bar-group-stack' ||
|| view.type === 'flow-map'" (view.render === 'antv' && view.type === 'line') ||
view.type === 'flow-map'
"
class="padding-lr" class="padding-lr"
> >
<span class="data-area-label"> <span class="data-area-label">
<span> <span>
<span v-if="view.type !=='flow-map'">{{ $t('chart.chart_group') }}</span> <span v-if="view.type !== 'flow-map'">{{
<span v-else-if="view.type === 'flow-map'">{{ $t('chart.end_point') }}</span> $t('chart.chart_group')
}}</span>
<span v-else-if="view.type === 'flow-map'">{{
$t('chart.end_point')
}}</span>
<span <span
v-show="view.type !== 'line'" v-show="view.type !== 'line'"
style="color:#F54A45;" style="color: #f54a45"
>*</span> >*</span>
</span> </span>
/ /
...@@ -655,7 +759,7 @@ ...@@ -655,7 +759,7 @@
</div> </div>
<i <i
class="el-icon-info" class="el-icon-info"
style="cursor: pointer;color: #606266;" style="cursor: pointer; color: #606266"
/> />
</el-tooltip> </el-tooltip>
<i <i
...@@ -674,7 +778,7 @@ ...@@ -674,7 +778,7 @@
> >
<transition-group class="draggable-group"> <transition-group class="draggable-group">
<dimension-ext-item <dimension-ext-item
v-for="(item,index) in view.xaxisExt" v-for="(item, index) in view.xaxisExt"
:key="item.id" :key="item.id"
:param="param" :param="param"
:index="index" :index="index"
...@@ -693,54 +797,74 @@ ...@@ -693,54 +797,74 @@
v-if="!view.xaxisExt || view.xaxisExt.length === 0" v-if="!view.xaxisExt || view.xaxisExt.length === 0"
class="drag-placeholder-style" class="drag-placeholder-style"
> >
<span class="drag-placeholder-style-span">{{ $t('chart.placeholder_field') }}</span> <span class="drag-placeholder-style-span">{{
$t('chart.placeholder_field')
}}</span>
</div> </div>
</el-row> </el-row>
<!--yaxis--> <!--yaxis-->
<el-row <el-row
v-if="!equalsAny(view.type , 'table-info', 'label', 'flow-map')" v-if="
!equalsAny(
view.type,
'table-info',
'label',
'flow-map',
'amap'
)
"
class="padding-lr" class="padding-lr"
style="margin-top: 6px;" style="margin-top: 6px"
> >
<span class="data-area-label"> <span class="data-area-label">
<span v-if="view.type && view.type.includes('table')">{{ <span v-if="view.type && view.type.includes('table')">{{
$t('chart.drag_block_table_data_column') $t('chart.drag_block_table_data_column')
}}</span> }}</span>
<span <span
v-else-if="view.type v-else-if="
&& (includesAny(view.type,'bar','line','scatter') view.type &&
|| equalsAny(view.type,'waterfall','area','flow-map'))" (includesAny(view.type, 'bar', 'line', 'scatter') ||
equalsAny(
view.type,
'waterfall',
'area',
'flow-map',
'amap'
))
"
>{{ $t('chart.drag_block_value_axis') }}</span> >{{ $t('chart.drag_block_value_axis') }}</span>
<span <span
v-else-if="view.type && view.type.includes('pie')" v-else-if="view.type && view.type.includes('pie')"
>{{ $t('chart.drag_block_pie_angel') }}</span> >{{ $t('chart.drag_block_pie_angel') }}</span>
<span v-else-if="view.type && view.type.includes('funnel')">{{ <span
$t('chart.drag_block_funnel_width') v-else-if="view.type && view.type.includes('funnel')"
}}</span> >{{ $t('chart.drag_block_funnel_width') }}</span>
<span v-else-if="view.type && view.type.includes('radar')">{{ <span
$t('chart.drag_block_radar_length') v-else-if="view.type && view.type.includes('radar')"
}}</span> >{{ $t('chart.drag_block_radar_length') }}</span>
<span v-else-if="view.type && view.type.includes('gauge')">{{ <span
$t('chart.drag_block_gauge_angel') v-else-if="view.type && view.type.includes('gauge')"
}}</span> >{{ $t('chart.drag_block_gauge_angel') }}</span>
<span <span
v-else-if="view.type && view.type.includes('text')" v-else-if="view.type && view.type.includes('text')"
>{{ $t('chart.drag_block_label_value') }}</span> >{{ $t('chart.drag_block_label_value') }}</span>
<span v-else-if="view.type && view.type === 'map'">{{ $t('chart.chart_data') }}</span> <span v-else-if="view.type && view.type === 'map'">{{
<span v-else-if="view.type && view.type.includes('tree')">{{ $t('chart.chart_data')
$t('chart.drag_block_treemap_size')
}}</span>
<span v-else-if="view.type && view.type === 'chart-mix'">{{
$t('chart.drag_block_value_axis_main')
}}</span> }}</span>
<span <span
v-else-if="view.type && view.type === 'liquid'" v-else-if="view.type && view.type.includes('tree')"
>{{ $t('chart.drag_block_progress') }}</span> >{{ $t('chart.drag_block_treemap_size') }}</span>
<span v-else-if="view.type && view.type === 'word-cloud'">{{ <span
$t('chart.drag_block_word_cloud_size') v-else-if="view.type && view.type === 'chart-mix'"
>{{ $t('chart.drag_block_value_axis_main') }}</span>
<span v-else-if="view.type && view.type === 'liquid'">{{
$t('chart.drag_block_progress')
}}</span> }}</span>
<span
v-else-if="view.type && view.type === 'word-cloud'"
>{{ $t('chart.drag_block_word_cloud_size') }}</span>
<span v-show="view.type !== 'richTextView'"> / </span> <span v-show="view.type !== 'richTextView'"> / </span>
<span>{{ $t('chart.quota') }}</span> <span>{{ $t('chart.quota') }}2</span>
<i <i
class="el-icon-arrow-down el-icon-delete data-area-clear" class="el-icon-arrow-down el-icon-delete data-area-clear"
@click="clearData('yaxis')" @click="clearData('yaxis')"
...@@ -757,7 +881,7 @@ ...@@ -757,7 +881,7 @@
> >
<transition-group class="draggable-group"> <transition-group class="draggable-group">
<quota-item <quota-item
v-for="(item,index) in view.yaxis" v-for="(item, index) in view.yaxis"
:key="item.id" :key="item.id"
:param="param" :param="param"
:index="index" :index="index"
...@@ -778,14 +902,18 @@ ...@@ -778,14 +902,18 @@
v-if="!view.yaxis || view.yaxis.length === 0" v-if="!view.yaxis || view.yaxis.length === 0"
class="drag-placeholder-style" class="drag-placeholder-style"
> >
<span class="drag-placeholder-style-span">{{ $t('chart.placeholder_field') }}</span> <span class="drag-placeholder-style-span">{{
$t('chart.placeholder_field')
}}</span>
</div> </div>
</el-row> </el-row>
<!--yAxisExt--> <!--yAxisExt-->
<el-row <el-row
v-if="equalsAny(view.type , 'chart-mix', 'bidirectional-bar')" v-if="
equalsAny(view.type, 'chart-mix', 'bidirectional-bar')
"
class="padding-lr" class="padding-lr"
style="margin-top: 6px;" style="margin-top: 6px"
> >
<span class="data-area-label"> <span class="data-area-label">
<span>{{ $t('chart.drag_block_value_axis_ext') }}</span> <span>{{ $t('chart.drag_block_value_axis_ext') }}</span>
...@@ -807,7 +935,7 @@ ...@@ -807,7 +935,7 @@
> >
<transition-group class="draggable-group"> <transition-group class="draggable-group">
<quota-ext-item <quota-ext-item
v-for="(item,index) in view.yaxisExt" v-for="(item, index) in view.yaxisExt"
:key="item.id" :key="item.id"
:param="param" :param="param"
:index="index" :index="index"
...@@ -828,14 +956,16 @@ ...@@ -828,14 +956,16 @@
v-if="!view.yaxisExt || view.yaxisExt.length === 0" v-if="!view.yaxisExt || view.yaxisExt.length === 0"
class="drag-placeholder-style" class="drag-placeholder-style"
> >
<span class="drag-placeholder-style-span">{{ $t('chart.placeholder_field') }}</span> <span class="drag-placeholder-style-span">{{
$t('chart.placeholder_field')
}}</span>
</div> </div>
</el-row> </el-row>
<!--extStack--> <!--extStack-->
<el-row <el-row
v-if="view.type && view.type.includes('stack')" v-if="view.type && view.type.includes('stack')"
class="padding-lr" class="padding-lr"
style="margin-top: 6px;" style="margin-top: 6px"
> >
<span class="data-area-label"> <span class="data-area-label">
<span>{{ $t('chart.stack_item') }}</span> <span>{{ $t('chart.stack_item') }}</span>
...@@ -857,7 +987,7 @@ ...@@ -857,7 +987,7 @@
> >
<transition-group class="draggable-group"> <transition-group class="draggable-group">
<chart-drag-item <chart-drag-item
v-for="(item,index) in view.extStack" v-for="(item, index) in view.extStack"
:key="item.id" :key="item.id"
:conf="'sort'" :conf="'sort'"
:param="param" :param="param"
...@@ -876,14 +1006,16 @@ ...@@ -876,14 +1006,16 @@
v-if="!view.extStack || view.extStack.length === 0" v-if="!view.extStack || view.extStack.length === 0"
class="drag-placeholder-style" class="drag-placeholder-style"
> >
<span class="drag-placeholder-style-span">{{ $t('chart.placeholder_field') }}</span> <span class="drag-placeholder-style-span">{{
$t('chart.placeholder_field')
}}</span>
</div> </div>
</el-row> </el-row>
<!--extBubble--> <!--extBubble-->
<el-row <el-row
v-if="view.type && view.type.includes('scatter')" v-if="view.type && view.type.includes('scatter')"
class="padding-lr" class="padding-lr"
style="margin-top: 6px;" style="margin-top: 6px"
> >
<span class="data-area-label"> <span class="data-area-label">
<span>{{ $t('chart.bubble_size') }}</span> <span>{{ $t('chart.bubble_size') }}</span>
...@@ -899,7 +1031,7 @@ ...@@ -899,7 +1031,7 @@
</div> </div>
<i <i
class="el-icon-info" class="el-icon-info"
style="cursor: pointer;color: #606266;" style="cursor: pointer; color: #606266"
/> />
</el-tooltip> </el-tooltip>
<i <i
...@@ -918,7 +1050,7 @@ ...@@ -918,7 +1050,7 @@
> >
<transition-group class="draggable-group"> <transition-group class="draggable-group">
<chart-drag-item <chart-drag-item
v-for="(item,index) in view.extBubble" v-for="(item, index) in view.extBubble"
:key="item.id" :key="item.id"
:conf="'summary'" :conf="'summary'"
:param="param" :param="param"
...@@ -936,12 +1068,23 @@ ...@@ -936,12 +1068,23 @@
v-if="!view.extBubble || view.extBubble.length === 0" v-if="!view.extBubble || view.extBubble.length === 0"
class="drag-placeholder-style" class="drag-placeholder-style"
> >
<span class="drag-placeholder-style-span">{{ $t('chart.placeholder_field') }}</span> <span class="drag-placeholder-style-span">{{
$t('chart.placeholder_field')
}}</span>
</div> </div>
</el-row> </el-row>
<mark-map-data-editor <mark-map-data-editor
v-if="view.type === 'map'" v-if="view.render === 'echarts' && view.type === 'map'"
:view="view"
:param="param"
:dimension-data="dimension"
:quota-data="quota"
@clear-data="clearData"
@calc-data="calcData"
/>
<a-map-editor
v-if="view.type === 'amap'"
:view="view" :view="view"
:param="param" :param="param"
:dimension-data="dimension" :dimension-data="dimension"
...@@ -952,7 +1095,7 @@ ...@@ -952,7 +1095,7 @@
<el-row <el-row
class="padding-lr" class="padding-lr"
style="margin-top: 6px;" style="margin-top: 6px"
> >
<span>{{ $t('chart.result_filter') }}</span> <span>{{ $t('chart.result_filter') }}</span>
<draggable <draggable
...@@ -961,13 +1104,23 @@ ...@@ -961,13 +1104,23 @@
animation="300" animation="300"
:move="onMove" :move="onMove"
class="theme-item-class" class="theme-item-class"
style="padding:2px 0 0 0;width:100%;min-height: 32px;border-radius: 4px;border: 1px solid #DCDFE6;overflow-x: auto;display: flex;align-items: center;background-color: white;" style="
padding: 2px 0 0 0;
width: 100%;
min-height: 32px;
border-radius: 4px;
border: 1px solid #dcdfe6;
overflow-x: auto;
display: flex;
align-items: center;
background-color: white;
"
@add="addCustomFilter" @add="addCustomFilter"
@update="calcData(true)" @update="calcData(true)"
> >
<transition-group class="draggable-group"> <transition-group class="draggable-group">
<filter-item <filter-item
v-for="(item,index) in view.customFilter" v-for="(item, index) in view.customFilter"
:key="item.id" :key="item.id"
:param="param" :param="param"
:index="index" :index="index"
...@@ -980,18 +1133,22 @@ ...@@ -980,18 +1133,22 @@
</transition-group> </transition-group>
</draggable> </draggable>
<div <div
v-if="!view.customFilter || view.customFilter.length === 0" v-if="
!view.customFilter || view.customFilter.length === 0
"
class="drag-placeholder-style" class="drag-placeholder-style"
> >
<span class="drag-placeholder-style-span">{{ $t('chart.placeholder_field') }}</span> <span class="drag-placeholder-style-span">{{
$t('chart.placeholder_field')
}}</span>
</div> </div>
</el-row> </el-row>
<el-row <el-row
v-if="showDrill" v-if="showDrill"
class="padding-lr" class="padding-lr"
style="margin-top: 6px;" style="margin-top: 6px"
> >
<span style="width: 80px;text-align: right;"> <span style="width: 80px; text-align: right">
<span>{{ $t('chart.drill') }}</span> <span>{{ $t('chart.drill') }}</span>
/ /
<span>{{ $t('chart.dimension') }}</span> <span>{{ $t('chart.dimension') }}</span>
...@@ -1005,7 +1162,7 @@ ...@@ -1005,7 +1162,7 @@
</div> </div>
<i <i
class="el-icon-info" class="el-icon-info"
style="cursor: pointer;color: #606266;" style="cursor: pointer; color: #606266"
/> />
</el-tooltip> </el-tooltip>
</span> </span>
...@@ -1020,7 +1177,7 @@ ...@@ -1020,7 +1177,7 @@
> >
<transition-group class="draggable-group"> <transition-group class="draggable-group">
<drill-item <drill-item
v-for="(item,index) in view.drillFields" v-for="(item, index) in view.drillFields"
:key="item.id" :key="item.id"
:param="param" :param="param"
:index="index" :index="index"
...@@ -1033,10 +1190,14 @@ ...@@ -1033,10 +1190,14 @@
</transition-group> </transition-group>
</draggable> </draggable>
<div <div
v-if="!view.drillFields || view.drillFields.length === 0" v-if="
!view.drillFields || view.drillFields.length === 0
"
class="drag-placeholder-style" class="drag-placeholder-style"
> >
<span class="drag-placeholder-style-span">{{ $t('chart.placeholder_field') }}</span> <span class="drag-placeholder-style-span">{{
$t('chart.placeholder_field')
}}</span>
</div> </div>
</el-row> </el-row>
</div> </div>
...@@ -1083,17 +1244,20 @@ ...@@ -1083,17 +1244,20 @@
name="senior" name="senior"
:label="$t('chart.senior')" :label="$t('chart.senior')"
class="padding-tab" class="padding-tab"
style="width: 350px;" style="width: 350px"
> >
<el-row class="view-panel"> <el-row class="view-panel">
<div <div
v-if="showCfg" v-if="showCfg"
style="overflow:auto;border-right: 1px solid #e6e6e6;height: 100%;width: 100%;" style="
overflow: auto;
border-right: 1px solid #e6e6e6;
height: 100%;
width: 100%;
"
class="attr-style theme-border-class" class="attr-style theme-border-class"
> >
<el-row <el-row v-if="showSeniorCfg">
v-if="showSeniorCfg"
>
<span class="padding-lr">{{ $t('chart.senior_cfg') }}</span> <span class="padding-lr">{{ $t('chart.senior_cfg') }}</span>
<el-collapse <el-collapse
v-model="attrActiveNames" v-model="attrActiveNames"
...@@ -1125,9 +1289,7 @@ ...@@ -1125,9 +1289,7 @@
</el-collapse-item> </el-collapse-item>
</el-collapse> </el-collapse>
</el-row> </el-row>
<el-row <el-row v-if="showAnalyseCfg">
v-if="showAnalyseCfg"
>
<span class="padding-lr">{{ $t('chart.analyse_cfg') }}</span> <span class="padding-lr">{{ $t('chart.analyse_cfg') }}</span>
<el-collapse <el-collapse
v-model="styleActiveNames" v-model="styleActiveNames"
...@@ -1162,18 +1324,21 @@ ...@@ -1162,18 +1324,21 @@
</el-row> </el-row>
<el-row <el-row
v-if="view.type && (view.type === 'map' || view.type === 'buddle-map')" v-if="
view.type &&
(view.type === 'map' || view.type === 'buddle-map')
"
> >
<span <span
v-if="false" v-if="false"
class="padding-lr" class="padding-lr"
>{{ $t('chart.senior_cfg') }}</span> >{{
$t('chart.senior_cfg')
}}</span>
<el-collapse <el-collapse
v-model="mapActiveNames" v-model="mapActiveNames"
class="style-collapse" class="style-collapse"
> >
<el-collapse-item <el-collapse-item
:title="$t('chart.place_name_mapping')" :title="$t('chart.place_name_mapping')"
name="map-mapping" name="map-mapping"
...@@ -1185,12 +1350,9 @@ ...@@ -1185,12 +1350,9 @@
:dynamic-area-code="currentAreaCode" :dynamic-area-code="currentAreaCode"
@onMapMappingChange="onMapMappingChange" @onMapMappingChange="onMapMappingChange"
/> />
</el-collapse-item> </el-collapse-item>
</el-collapse> </el-collapse>
</el-row> </el-row>
</div> </div>
<div <div
v-else v-else
...@@ -1205,7 +1367,7 @@ ...@@ -1205,7 +1367,7 @@
name="position" name="position"
:label="$t('panel.position_adjust')" :label="$t('panel.position_adjust')"
class="padding-tab" class="padding-tab"
style="width: 350px;" style="width: 350px"
> >
<div class="attr-style theme-border-class"> <div class="attr-style theme-border-class">
<el-collapse <el-collapse
...@@ -1220,17 +1382,15 @@ ...@@ -1220,17 +1382,15 @@
</el-collapse-item> </el-collapse-item>
</el-collapse> </el-collapse>
</div> </div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<el-col <el-col
v-if="editFrom==='view'" v-if="editFrom === 'view'"
style="height: 100%;min-width: 500px;border-top: 1px solid #E6E6E6;" style="height: 100%; min-width: 500px; border-top: 1px solid #e6e6e6"
> >
<el-row <el-row
style="width: 100%;height: 100%;" style="width: 100%; height: 100%"
class="padding-lr" class="padding-lr"
> >
<div <div
...@@ -1241,7 +1401,7 @@ ...@@ -1241,7 +1401,7 @@
v-if="httpRequest.status && chart.type && view.isPlugin" v-if="httpRequest.status && chart.type && view.isPlugin"
ref="dynamicChart" ref="dynamicChart"
:component-name="chart.type + '-view'" :component-name="chart.type + '-view'"
:obj="{chart}" :obj="{ chart }"
:chart-id="chart.id" :chart-id="chart.id"
:chart="chart" :chart="chart"
:theme-style="curComponent.commonBackground" :theme-style="curComponent.commonBackground"
...@@ -1249,7 +1409,14 @@ ...@@ -1249,7 +1409,14 @@
@onChartClick="chartClick" @onChartClick="chartClick"
/> />
<chart-component <chart-component
v-else-if="httpRequest.status && chart.type && !chart.type.includes('table') && !chart.type.includes('text') && chart.type !== 'label' && renderComponent() === 'echarts'" v-else-if="
httpRequest.status &&
chart.type &&
!chart.type.includes('table') &&
!chart.type.includes('text') &&
chart.type !== 'label' &&
renderComponent() === 'echarts'
"
ref="dynamicChart" ref="dynamicChart"
:chart-id="chart.id" :chart-id="chart.id"
:chart="chart" :chart="chart"
...@@ -1258,7 +1425,14 @@ ...@@ -1258,7 +1425,14 @@
@onChartClick="chartClick" @onChartClick="chartClick"
/> />
<chart-component-g2 <chart-component-g2
v-else-if="httpRequest.status && chart.type && !chart.type.includes('table') && !chart.type.includes('text') && chart.type !== 'label' && renderComponent() === 'antv'" v-else-if="
httpRequest.status &&
chart.type &&
!chart.type.includes('table') &&
!chart.type.includes('text') &&
chart.type !== 'label' &&
renderComponent() === 'antv'
"
ref="dynamicChart" ref="dynamicChart"
:chart-id="chart.id" :chart-id="chart.id"
:chart="chart" :chart="chart"
...@@ -1266,7 +1440,14 @@ ...@@ -1266,7 +1440,14 @@
@onChartClick="chartClick" @onChartClick="chartClick"
/> />
<chart-component-s2 <chart-component-s2
v-else-if="httpRequest.status && chart.type && chart.type.includes('table') && !chart.type.includes('text') && chart.type !== 'label' && renderComponent() === 'antv'" v-else-if="
httpRequest.status &&
chart.type &&
chart.type.includes('table') &&
!chart.type.includes('text') &&
chart.type !== 'label' &&
renderComponent() === 'antv'
"
ref="dynamicChart" ref="dynamicChart"
:chart-id="chart.id" :chart-id="chart.id"
:chart="chart" :chart="chart"
...@@ -1274,18 +1455,28 @@ ...@@ -1274,18 +1455,28 @@
@onChartClick="chartClick" @onChartClick="chartClick"
/> />
<table-normal <table-normal
v-else-if="httpRequest.status && chart.type && chart.type.includes('table') && renderComponent() === 'echarts' && chart.type !== 'table-pivot'" v-else-if="
httpRequest.status &&
chart.type &&
chart.type.includes('table') &&
renderComponent() === 'echarts' &&
chart.type !== 'table-pivot'
"
:show-summary="chart.type === 'table-normal'" :show-summary="chart.type === 'table-normal'"
:chart="chart" :chart="chart"
class="table-class" class="table-class"
/> />
<label-normal <label-normal
v-else-if="httpRequest.status && chart.type && chart.type.includes('text')" v-else-if="
httpRequest.status && chart.type && chart.type.includes('text')
"
:chart="chart" :chart="chart"
class="table-class" class="table-class"
/> />
<label-normal-text <label-normal-text
v-else-if="httpRequest.status && chart.type && chart.type === 'label'" v-else-if="
httpRequest.status && chart.type && chart.type === 'label'
"
:chart="chart" :chart="chart"
class="table-class" class="table-class"
/> />
...@@ -1294,7 +1485,14 @@ ...@@ -1294,7 +1485,14 @@
class="chart-error-class" class="chart-error-class"
> >
<div <div
style="font-size: 12px; color: #9ea6b2;height: 100%;display: flex;align-items: center;justify-content: center;" style="
font-size: 12px;
color: #9ea6b2;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
"
> >
{{ httpRequest.msg }},{{ $t('chart.chart_show_error') }} {{ httpRequest.msg }},{{ $t('chart.chart_show_error') }}
<br> <br>
...@@ -1302,7 +1500,7 @@ ...@@ -1302,7 +1500,7 @@
</div> </div>
</div> </div>
</div> </div>
<div style="position: absolute;left: 8px;bottom:8px;"> <div style="position: absolute; left: 8px; bottom: 8px">
<drill-path <drill-path
:drill-filters="drillFilters" :drill-filters="drillFilters"
@onDrillJump="drillJump" @onDrillJump="drillJump"
...@@ -1331,7 +1529,7 @@ ...@@ -1331,7 +1529,7 @@
:label="$t('dataset.field_origin_name')" :label="$t('dataset.field_origin_name')"
class="form-item" class="form-item"
> >
<span style="padding: 0 16px;">{{ itemForm.dsFieldName }}</span> <span style="padding: 0 16px">{{ itemForm.dsFieldName }}</span>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
:label="$t('chart.show_name')" :label="$t('chart.show_name')"
...@@ -1463,7 +1661,9 @@ ...@@ -1463,7 +1661,9 @@
:checked-table="table" :checked-table="table"
@getTable="getTable" @getTable="getTable"
/> />
<p style="margin-top: 10px;color:#F56C6C;font-size: 12px;">{{ $t('chart.change_ds_tip') }}</p> <p style="margin-top: 10px; color: #f56c6c; font-size: 12px">
{{ $t('chart.change_ds_tip') }}
</p>
<div <div
slot="footer" slot="footer"
class="dialog-footer" class="dialog-footer"
...@@ -1500,13 +1700,13 @@ ...@@ -1500,13 +1700,13 @@
slot="title" slot="title"
class="dialog-footer title-text" class="dialog-footer title-text"
> >
<span style="font-size: 14px;"> <span style="font-size: 14px">
{{ $t('chart.ds_field_edit') }} {{ $t('chart.ds_field_edit') }}
<span v-if="table">[{{ table.name }}]</span> <span v-if="table">[{{ table.name }}]</span>
</span> </span>
<el-button <el-button
size="mini" size="mini"
style="float: right;" style="float: right"
@click="closeEditDsField" @click="closeEditDsField"
>{{ $t('chart.close') }} >{{ $t('chart.close') }}
</el-button> </el-button>
...@@ -1530,13 +1730,13 @@ ...@@ -1530,13 +1730,13 @@
slot="title" slot="title"
class="dialog-footer title-text" class="dialog-footer title-text"
> >
<span style="font-size: 14px;"> <span style="font-size: 14px">
{{ $t('chart.chart_field_edit') }} {{ $t('chart.chart_field_edit') }}
<span v-if="table">[{{ chart.title }}]</span> <span v-if="table">[{{ chart.title }}]</span>
</span> </span>
<el-button <el-button
size="mini" size="mini"
style="float: right;" style="float: right"
@click="closeEditChartField" @click="closeEditChartField"
>{{ $t('chart.close') }} >{{ $t('chart.close') }}
</el-button> </el-button>
...@@ -1762,6 +1962,7 @@ import CalcChartFieldEdit from '@/views/chart/view/CalcChartFieldEdit' ...@@ -1762,6 +1962,7 @@ import CalcChartFieldEdit from '@/views/chart/view/CalcChartFieldEdit'
import { equalsAny, includesAny } from '@/utils/StringUtils' import { equalsAny, includesAny } from '@/utils/StringUtils'
import PositionAdjust from '@/views/chart/view/PositionAdjust' import PositionAdjust from '@/views/chart/view/PositionAdjust'
import MarkMapDataEditor from '@/views/chart/components/map/MarkMapDataEditor' import MarkMapDataEditor from '@/views/chart/components/map/MarkMapDataEditor'
import AMapEditor from '@/views/chart/components/aMap/AMapEditor'
export default { export default {
name: 'ChartEdit', name: 'ChartEdit',
components: { components: {
...@@ -1799,7 +2000,8 @@ export default { ...@@ -1799,7 +2000,8 @@ export default {
DrillPath, DrillPath,
PluginCom, PluginCom,
MapMapping, MapMapping,
MarkMapDataEditor MarkMapDataEditor,
AMapEditor
}, },
props: { props: {
param: { param: {
...@@ -1883,8 +2085,16 @@ export default { ...@@ -1883,8 +2085,16 @@ export default {
}, },
itemFormRules: { itemFormRules: {
name: [ name: [
{ required: true, message: this.$t('commons.input_content'), trigger: 'change' }, {
{ max: 50, message: this.$t('commons.char_can_not_more_50'), trigger: 'change' } required: true,
message: this.$t('commons.input_content'),
trigger: 'change'
},
{
max: 50,
message: this.$t('commons.char_can_not_more_50'),
trigger: 'change'
}
] ]
}, },
tabStatus: false, tabStatus: false,
...@@ -1907,7 +2117,8 @@ export default { ...@@ -1907,7 +2117,8 @@ export default {
drillFilters: [], drillFilters: [],
renderOptions: [ renderOptions: [
{ name: 'AntV', value: 'antv' }, { name: 'AntV', value: 'antv' },
{ name: 'ECharts', value: 'echarts' } { name: 'ECharts', value: 'echarts' },
{ name: '地图', value: 'aMap' }
], ],
drill: false, drill: false,
hasEdit: false, hasEdit: false,
...@@ -1929,11 +2140,16 @@ export default { ...@@ -1929,11 +2140,16 @@ export default {
showStackCustomSort: false showStackCustomSort: false
} }
}, },
computed: { computed: {
chartConfig() { chartConfig() {
const _this = this const _this = this
if (_this.chart && _this.chart.render) { if (_this.chart && _this.chart.render) {
const viewConfig = this.allViewRender.filter(item => item.render === _this.chart.render && item.value === _this.chart.type) const viewConfig = this.allViewRender.filter(
(item) =>
item.render === _this.chart.render &&
item.value === _this.chart.type
)
if (viewConfig && viewConfig.length) { if (viewConfig && viewConfig.length) {
return viewConfig[0] return viewConfig[0]
} else { } else {
...@@ -1956,16 +2172,23 @@ export default { ...@@ -1956,16 +2172,23 @@ export default {
return this.$store.state.panel.panelInfo return this.$store.state.panel.panelInfo
}, },
showCfg() { showCfg() {
return includesAny(this.view.type, 'bar', 'line', 'area', 'gauge', 'table') && this.view.type !== 'race-bar' || return (
(includesAny(this.view.type, 'bar', 'line', 'area', 'gauge', 'table') &&
this.view.type !== 'race-bar') ||
equalsAny(this.view.type, 'text', 'label', 'map', 'buddle-map') equalsAny(this.view.type, 'text', 'label', 'map', 'buddle-map')
)
}, },
showSeniorCfg() { showSeniorCfg() {
return includesAny(this.view.type, 'bar', 'line', 'area', 'table') || return (
includesAny(this.view.type, 'bar', 'line', 'area', 'table') ||
equalsAny(this.view.type, 'table-normal', 'table-info', 'map') equalsAny(this.view.type, 'table-normal', 'table-info', 'map')
)
}, },
showFunctionCfg() { showFunctionCfg() {
return includesAny(this.view.type, 'bar', 'line', 'area', 'mix', 'table') || return (
includesAny(this.view.type, 'bar', 'line', 'area', 'mix', 'table') ||
equalsAny(this.view.type, 'map') equalsAny(this.view.type, 'map')
)
}, },
showScrollCfg() { showScrollCfg() {
return equalsAny(this.view.type, 'table-normal', 'table-info') return equalsAny(this.view.type, 'table-normal', 'table-info')
...@@ -1974,9 +2197,11 @@ export default { ...@@ -1974,9 +2197,11 @@ export default {
if (this.view.type === 'bidirectional-bar') { if (this.view.type === 'bidirectional-bar') {
return false return false
} }
return includesAny(this.view.type, 'bar', 'line', 'area', 'gauge') || return (
includesAny(this.view.type, 'bar', 'line', 'area', 'gauge') ||
equalsAny(this.view.type, 'text', 'label') || equalsAny(this.view.type, 'text', 'label') ||
(this.view.render === 'antv' && this.view.type.includes('table')) (this.view.render === 'antv' && this.view.type.includes('table'))
)
}, },
showAssistLineCfg() { showAssistLineCfg() {
return includesAny(this.view.type, 'bar', 'line', 'area', 'mix') return includesAny(this.view.type, 'bar', 'line', 'area', 'mix')
...@@ -1985,26 +2210,35 @@ export default { ...@@ -1985,26 +2210,35 @@ export default {
if (this.view.type === 'bidirectional-bar') { if (this.view.type === 'bidirectional-bar') {
return false return false
} }
return includesAny(this.view.type, 'gauge') || return (
includesAny(this.view.type, 'gauge') ||
equalsAny(this.view.type, 'text', 'label') || equalsAny(this.view.type, 'text', 'label') ||
(this.view.render === 'antv' && this.view.type.includes('table')) (this.view.render === 'antv' && this.view.type.includes('table'))
)
}, },
showDrill() { showDrill() {
return this.view.type && return (
this.view.type &&
!(this.view.type.includes('table') && this.view.render === 'echarts') && !(this.view.type.includes('table') && this.view.render === 'echarts') &&
!this.view.type.includes('amap') &&
!includesAny(this.view.type, 'text', 'gauge') && !includesAny(this.view.type, 'text', 'gauge') &&
!equalsAny(this.view.type, 'liquid', 'bidirectional-bar', !equalsAny(
'word-cloud', 'table-pivot', 'label', 'richTextView', 'flow-map') this.view.type,
'liquid',
'bidirectional-bar',
'word-cloud',
'table-pivot',
'label',
'richTextView',
'flow-map'
)
)
}, },
watchChartTypeChangeObj() { watchChartTypeChangeObj() {
const { type, render } = this.view const { type, render } = this.view
return { type, render } return { type, render }
}, },
...mapState([ ...mapState(['curComponent', 'panelViewEditInfo', 'allViewRender'])
'curComponent',
'panelViewEditInfo',
'allViewRender'
])
}, },
watch: { watch: {
'curComponent.auxiliaryMatrix': function(val) { 'curComponent.auxiliaryMatrix': function(val) {
...@@ -2012,13 +2246,13 @@ export default { ...@@ -2012,13 +2246,13 @@ export default {
this.tabActive = 'data' this.tabActive = 'data'
} }
}, },
'editStatus': function(val) { editStatus: function(val) {
if (val && this.param.id !== this.preChartId) { if (val && this.param.id !== this.preChartId) {
this.preChartId = this.param.id this.preChartId = this.param.id
this.chartInit() this.chartInit()
} }
}, },
'param': function(val) { param: function(val) {
if (this.param.optType === 'new') { if (this.param.optType === 'new') {
// Do Nothing // Do Nothing
} else if (this.param.id !== this.preChartId && this.editStatus) { } else if (this.param.id !== this.preChartId && this.editStatus) {
...@@ -2029,7 +2263,7 @@ export default { ...@@ -2029,7 +2263,7 @@ export default {
searchField(val) { searchField(val) {
this.fieldFilter(val) this.fieldFilter(val)
}, },
'chartType': function(newVal, oldVal) { chartType: function(newVal, oldVal) {
if ((newVal === 'map' || newVal === 'buddle-map') && newVal !== oldVal) { if ((newVal === 'map' || newVal === 'buddle-map') && newVal !== oldVal) {
this.initAreas() this.initAreas()
} }
...@@ -2039,32 +2273,43 @@ export default { ...@@ -2039,32 +2273,43 @@ export default {
if (newVal.type === oldVal.type && newVal.render === oldVal.render) { if (newVal.type === oldVal.type && newVal.render === oldVal.render) {
return return
} }
this.view.isPlugin = this.$refs['cu-chart-type'] && this.$refs['cu-chart-type'].currentIsPlugin(newVal.type, newVal.render) this.view.isPlugin =
this.$refs['cu-chart-type'] &&
this.$refs['cu-chart-type'].currentIsPlugin(newVal.type, newVal.render)
this.setChartDefaultOptions() this.setChartDefaultOptions()
this.calcData(true, 'chart', true, newVal.type !== oldVal.type, newVal.render !== oldVal.render) this.calcData(
true,
'chart',
true,
newVal.type !== oldVal.type,
newVal.render !== oldVal.render
)
} }
}, },
created() { created() {
this.bindPluginEvent() this.bindPluginEvent()
this.initFromPanel() this.initFromPanel()
this.chartInit() this.chartInit()
const plugins = localStorage.getItem('plugin-views') && JSON.parse(localStorage.getItem('plugin-views')) const plugins =
localStorage.getItem('plugin-views') &&
JSON.parse(localStorage.getItem('plugin-views'))
if (plugins) { if (plugins) {
this.loadPluginType() this.loadPluginType()
} else { } else {
pluginTypes().then(res => { pluginTypes()
.then((res) => {
const plugins = res.data const plugins = res.data
localStorage.setItem('plugin-views', JSON.stringify(plugins)) localStorage.setItem('plugin-views', JSON.stringify(plugins))
this.loadPluginType() this.loadPluginType()
}).catch(e => { })
.catch((e) => {
localStorage.setItem('plugin-views', null) localStorage.setItem('plugin-views', null)
this.loadPluginType() this.loadPluginType()
}) })
} }
}, },
mounted() { mounted() {},
},
beforeDestroy() { beforeDestroy() {
bus.$off('show-dimension-edit-filter', this.showDimensionEditFilter) bus.$off('show-dimension-edit-filter', this.showDimensionEditFilter)
bus.$off('show-rename', this.showRename) bus.$off('show-rename', this.showRename)
...@@ -2077,8 +2322,7 @@ export default { ...@@ -2077,8 +2322,7 @@ export default {
bus.$off('plugin-chart-click', this.chartClick) bus.$off('plugin-chart-click', this.chartClick)
bus.$off('set-dynamic-area-code', this.setDynamicAreaCode) bus.$off('set-dynamic-area-code', this.setDynamicAreaCode)
}, },
activated() { activated() {},
},
methods: { methods: {
includesAny, includesAny,
...@@ -2097,8 +2341,16 @@ export default { ...@@ -2097,8 +2341,16 @@ export default {
this.currentAreaCode = code this.currentAreaCode = code
}, },
loadPluginType() { loadPluginType() {
const plugins = localStorage.getItem('plugin-views') && JSON.parse(localStorage.getItem('plugin-views')) || [] const plugins =
const pluginOptions = plugins.filter(plugin => !this.renderOptions.some(option => option.value === plugin.render)).map(plugin => { (localStorage.getItem('plugin-views') &&
JSON.parse(localStorage.getItem('plugin-views'))) ||
[]
const pluginOptions = plugins
.filter(
(plugin) =>
!this.renderOptions.some((option) => option.value === plugin.render)
)
.map((plugin) => {
return { name: plugin.render, value: plugin.render } return { name: plugin.render, value: plugin.render }
}) })
this.pluginRenderOptions = [...this.renderOptions, ...pluginOptions] this.pluginRenderOptions = [...this.renderOptions, ...pluginOptions]
...@@ -2111,7 +2363,7 @@ export default { ...@@ -2111,7 +2363,7 @@ export default {
this.quotaData = [] this.quotaData = []
}, },
initFromPanel() { initFromPanel() {
this.hasEdit = (this.panelViewEditInfo[this.param.id] || false) this.hasEdit = this.panelViewEditInfo[this.param.id] || false
}, },
convertChart(chart) { convertChart(chart) {
if (equalsAny(chart.type, 'pie', 'pie-rose')) { if (equalsAny(chart.type, 'pie', 'pie-rose')) {
...@@ -2149,13 +2401,15 @@ export default { ...@@ -2149,13 +2401,15 @@ export default {
}, },
initTableData(id, optType) { initTableData(id, optType) {
if (id != null) { if (id != null) {
tableField(id).then(response => { tableField(id)
.then((response) => {
// If click too fast on the panel, the data here may be inconsistent, so make a verification // If click too fast on the panel, the data here may be inconsistent, so make a verification
if (this.view.tableId === id) { if (this.view.tableId === id) {
this.table = response.data this.table = response.data
this.initTableField(id, optType) this.initTableField(id, optType)
} }
}).catch(err => { })
.catch((err) => {
this.table = null this.table = null
this.resetDatasetField() this.resetDatasetField()
this.httpRequest.status = err.response.data.success this.httpRequest.status = err.response.data.success
...@@ -2166,13 +2420,25 @@ export default { ...@@ -2166,13 +2420,25 @@ export default {
}, },
initTableField(id, optType) { initTableField(id, optType) {
if (this.table) { if (this.table) {
post('/dataset/table/getFieldsFromDE', this.table).then(response => { post('/dataset/table/getFieldsFromDE', this.table)
.then((response) => {
// If click too fast on the panel, the data here may be inconsistent, so make a verification // If click too fast on the panel, the data here may be inconsistent, so make a verification
post('/chart/field/listByDQ/' + this.param.id + '/' + this.panelInfo.id, null).then(res => { post(
'/chart/field/listByDQ/' +
this.param.id +
'/' +
this.panelInfo.id,
null
)
.then((res) => {
if (this.view.tableId === id) { if (this.view.tableId === id) {
this.dimension = response.data.dimension.concat(res.data.dimensionList) this.dimension = response.data.dimension.concat(
res.data.dimensionList
)
this.quota = response.data.quota.concat(res.data.quotaList) this.quota = response.data.quota.concat(res.data.quotaList)
this.dimensionData = JSON.parse(JSON.stringify(this.dimension)) this.dimensionData = JSON.parse(
JSON.stringify(this.dimension)
)
this.quotaData = JSON.parse(JSON.stringify(this.quota)) this.quotaData = JSON.parse(JSON.stringify(this.quota))
this.fieldFilter(this.searchField) this.fieldFilter(this.searchField)
if (optType === 'change') { if (optType === 'change') {
...@@ -2184,14 +2450,16 @@ export default { ...@@ -2184,14 +2450,16 @@ export default {
} }
} }
this.fieldShow = true this.fieldShow = true
}).catch(err => { })
.catch((err) => {
console.error(err) console.error(err)
this.resetView() this.resetView()
this.httpRequest.status = err.response.data.success this.httpRequest.status = err.response.data.success
this.httpRequest.msg = err.response.data.message this.httpRequest.msg = err.response.data.message
return true return true
}) })
}).catch(err => { })
.catch((err) => {
console.error(err) console.error(err)
this.resetView() this.resetView()
...@@ -2205,18 +2473,27 @@ export default { ...@@ -2205,18 +2473,27 @@ export default {
}, },
resetChangeTable() { resetChangeTable() {
const compareData = {} const compareData = {}
this.dimensionData.forEach(deimension => { this.dimensionData.forEach((deimension) => {
compareData[deimension.originName] = deimension compareData[deimension.originName] = deimension
}) })
this.quotaData.forEach(quota => { this.quotaData.forEach((quota) => {
compareData[quota.originName] = quota compareData[quota.originName] = quota
}) })
const compareCols = ['xaxis', 'xaxisExt', 'yaxis', 'yaxisExt', 'customFilter', 'extStack', 'extBubble', 'drillFields'] const compareCols = [
'xaxis',
'xaxisExt',
'yaxis',
'yaxisExt',
'customFilter',
'extStack',
'extBubble',
'drillFields'
]
this.viewFieldChange(compareData, compareCols) this.viewFieldChange(compareData, compareCols)
}, },
viewFieldChange(compareData, compareCols) { viewFieldChange(compareData, compareCols) {
const _this = this const _this = this
compareCols.forEach(compareCol => { compareCols.forEach((compareCol) => {
_this.view[compareCol].forEach(function(item, index) { _this.view[compareCol].forEach(function(item, index) {
if (compareData[item.originName]) { if (compareData[item.originName]) {
const itemTemp = { const itemTemp = {
...@@ -2232,18 +2509,30 @@ export default { ...@@ -2232,18 +2509,30 @@ export default {
}) })
}) })
}, },
buildParam(getData, trigger, needRefreshGroup = false, switchType = false, switchRender = false) { buildParam(
if (!this.view.resultCount || getData,
trigger,
needRefreshGroup = false,
switchType = false,
switchRender = false
) {
if (
!this.view.resultCount ||
this.view.resultCount === '' || this.view.resultCount === '' ||
isNaN(Number(this.view.resultCount)) || isNaN(Number(this.view.resultCount)) ||
String(this.view.resultCount).includes('.') || String(this.view.resultCount).includes('.') ||
parseInt(this.view.resultCount) < 1) { parseInt(this.view.resultCount) < 1
) {
this.view.resultCount = '1000' this.view.resultCount = '1000'
} }
if (switchType) { if (switchType) {
this.view.senior.threshold = {} this.view.senior.threshold = {}
} }
if (switchType && (this.view.type === 'table-info' || this.chart.type === 'table-info') && this.view.xaxis.length > 0) { if (
switchType &&
(this.view.type === 'table-info' || this.chart.type === 'table-info') &&
this.view.xaxis.length > 0
) {
this.$message({ this.$message({
showClose: true, showClose: true,
message: this.$t('chart.table_info_switch'), message: this.$t('chart.table_info_switch'),
...@@ -2277,8 +2566,17 @@ export default { ...@@ -2277,8 +2566,17 @@ export default {
ele.filter = [] ele.filter = []
} }
}) })
if (equalsAny(view.type, 'table-pivot', 'bar-group', 'bar-group-stack', 'flow-map', 'race-bar') || if (
(view.render === 'antv' && view.type === 'line')) { equalsAny(
view.type,
'table-pivot',
'bar-group',
'bar-group-stack',
'flow-map',
'race-bar'
) ||
(view.render === 'antv' && view.type === 'line')
) {
view.xaxisExt.forEach(function(ele) { view.xaxisExt.forEach(function(ele) {
if (!ele.dateStyle || ele.dateStyle === '') { if (!ele.dateStyle || ele.dateStyle === '') {
ele.dateStyle = 'y_M_d' ele.dateStyle = 'y_M_d'
...@@ -2374,7 +2672,8 @@ export default { ...@@ -2374,7 +2672,8 @@ export default {
view.xaxis.splice(1, view.xaxis.length) view.xaxis.splice(1, view.xaxis.length)
} }
} }
if (view.type.startsWith('pie') || if (
view.type.startsWith('pie') ||
view.type.startsWith('funnel') || view.type.startsWith('funnel') ||
view.type.startsWith('text') || view.type.startsWith('text') ||
view.type.startsWith('gauge') || view.type.startsWith('gauge') ||
...@@ -2382,7 +2681,8 @@ export default { ...@@ -2382,7 +2681,8 @@ export default {
view.type === 'liquid' || view.type === 'liquid' ||
view.type === 'word-cloud' || view.type === 'word-cloud' ||
view.type === 'waterfall' || view.type === 'waterfall' ||
view.type.includes('group')) { view.type.includes('group')
) {
if (view.yaxis.length > 1) { if (view.yaxis.length > 1) {
view.yaxis.splice(1, view.yaxis.length) view.yaxis.splice(1, view.yaxis.length)
} }
...@@ -2393,11 +2693,13 @@ export default { ...@@ -2393,11 +2693,13 @@ export default {
if (view.type === 'line' && trigger === 'chart') { if (view.type === 'line' && trigger === 'chart') {
view.customAttr.size.lineArea = false view.customAttr.size.lineArea = false
} }
if (view.type === 'liquid' || if (
view.type === 'liquid' ||
(view.type.includes('table') && view.render === 'echarts') || (view.type.includes('table') && view.render === 'echarts') ||
view.type.includes('text') || view.type.includes('text') ||
view.type.includes('gauge') || view.type.includes('gauge') ||
view.type === 'table-pivot') { view.type === 'table-pivot'
) {
view.drillFields = [] view.drillFields = []
} }
view.customFilter.forEach(function(ele) { view.customFilter.forEach(function(ele) {
...@@ -2435,9 +2737,21 @@ export default { ...@@ -2435,9 +2737,21 @@ export default {
if (!view) return if (!view) return
viewEditSave(this.panelInfo.id, view) viewEditSave(this.panelInfo.id, view)
}, },
calcData(getData, trigger, needRefreshGroup = false, switchType = false, switchRender = false) { calcData(
getData,
trigger,
needRefreshGroup = false,
switchType = false,
switchRender = false
) {
this.changeEditStatus(true) this.changeEditStatus(true)
const view = this.buildParam(true, 'chart', false, switchType, switchRender) const view = this.buildParam(
true,
'chart',
false,
switchType,
switchRender
)
if (!view) return if (!view) return
viewEditSave(this.panelInfo.id, view).then(() => { viewEditSave(this.panelInfo.id, view).then(() => {
this.getChart(this.param.id) this.getChart(this.param.id)
...@@ -2481,7 +2795,11 @@ export default { ...@@ -2481,7 +2795,11 @@ export default {
refreshProp: 'customAttr' refreshProp: 'customAttr'
}) })
} else { } else {
bus.$emit('view-in-cache', { type: 'styleChange', viewId: this.view.id, viewInfo: view }) bus.$emit('view-in-cache', {
type: 'styleChange',
viewId: this.view.id,
viewInfo: view
})
} }
}, },
...@@ -2492,7 +2810,7 @@ export default { ...@@ -2492,7 +2810,7 @@ export default {
} }
const view = this.buildParam(true, 'chart', false, false) const view = this.buildParam(true, 'chart', false, false)
if (!view) return if (!view) return
post('/chart/view/save/' + this.panelInfo.id, view).then(response => { post('/chart/view/save/' + this.panelInfo.id, view).then((response) => {
this.getChart(response.data.id) this.getChart(response.data.id)
this.hasEdit = false this.hasEdit = false
this.refreshGroup(view) this.refreshGroup(view)
...@@ -2522,21 +2840,42 @@ export default { ...@@ -2522,21 +2840,42 @@ export default {
filter: [], filter: [],
drill: this.drillClickDimensionList, drill: this.drillClickDimensionList,
queryFrom: 'panel' queryFrom: 'panel'
}).then(response => { })
.then((response) => {
this.initTableData(response.data.tableId) this.initTableData(response.data.tableId)
this.view = JSON.parse(JSON.stringify(response.data)) this.view = JSON.parse(JSON.stringify(response.data))
this.view.viewFields = this.view.viewFields ? JSON.parse(this.view.viewFields) : [] this.view.viewFields = this.view.viewFields
? JSON.parse(this.view.viewFields)
: []
this.view.xaxis = this.view.xaxis ? JSON.parse(this.view.xaxis) : [] this.view.xaxis = this.view.xaxis ? JSON.parse(this.view.xaxis) : []
this.view.xaxisExt = this.view.xaxisExt ? JSON.parse(this.view.xaxisExt) : [] this.view.xaxisExt = this.view.xaxisExt
? JSON.parse(this.view.xaxisExt)
: []
this.view.yaxis = this.view.yaxis ? JSON.parse(this.view.yaxis) : [] this.view.yaxis = this.view.yaxis ? JSON.parse(this.view.yaxis) : []
this.view.yaxisExt = this.view.yaxisExt ? JSON.parse(this.view.yaxisExt) : [] this.view.yaxisExt = this.view.yaxisExt
this.view.extStack = this.view.extStack ? JSON.parse(this.view.extStack) : [] ? JSON.parse(this.view.yaxisExt)
this.view.drillFields = this.view.drillFields ? JSON.parse(this.view.drillFields) : [] : []
this.view.extBubble = this.view.extBubble ? JSON.parse(this.view.extBubble) : [] this.view.extStack = this.view.extStack
this.view.customAttr = this.view.customAttr ? JSON.parse(this.view.customAttr) : {} ? JSON.parse(this.view.extStack)
this.view.customStyle = this.view.customStyle ? JSON.parse(this.view.customStyle) : {} : []
this.view.customFilter = this.view.customFilter ? JSON.parse(this.view.customFilter) : {} this.view.drillFields = this.view.drillFields
this.view.senior = this.view.senior ? JSON.parse(this.view.senior) : {} ? JSON.parse(this.view.drillFields)
: []
this.view.extBubble = this.view.extBubble
? JSON.parse(this.view.extBubble)
: []
this.view.customAttr = this.view.customAttr
? JSON.parse(this.view.customAttr)
: {}
this.view.customStyle = this.view.customStyle
? JSON.parse(this.view.customStyle)
: {}
this.view.customFilter = this.view.customFilter
? JSON.parse(this.view.customFilter)
: {}
this.view.senior = this.view.senior
? JSON.parse(this.view.senior)
: {}
// 将视图传入echart组件 // 将视图传入echart组件
this.chart = response.data this.chart = response.data
this.data = response.data.data this.data = response.data.data
...@@ -2545,13 +2884,21 @@ export default { ...@@ -2545,13 +2884,21 @@ export default {
this.param.privileges = this.chart.privileges this.param.privileges = this.chart.privileges
} }
if (!response.data.drill) { if (!response.data.drill) {
this.drillClickDimensionList.splice(this.drillClickDimensionList.length - 1, 1) this.drillClickDimensionList.splice(
this.drillClickDimensionList.length - 1,
1
)
this.resetDrill() this.resetDrill()
} }
this.drill = response.data.drill this.drill = response.data.drill
this.drillFilters = JSON.parse(JSON.stringify(response.data.drillFilters ? response.data.drillFilters : [])) this.drillFilters = JSON.parse(
}).catch(err => { JSON.stringify(
response.data.drillFilters ? response.data.drillFilters : []
)
)
})
.catch((err) => {
this.resetView() this.resetView()
this.resetDrill() this.resetDrill()
this.$nextTick(() => { this.$nextTick(() => {
...@@ -2567,7 +2914,8 @@ export default { ...@@ -2567,7 +2914,8 @@ export default {
}, },
getChart(id, queryFrom = 'panel_edit') { getChart(id, queryFrom = 'panel_edit') {
if (id) { if (id) {
getChartDetails(id, this.panelInfo.id, { queryFrom: queryFrom }).then(response => { getChartDetails(id, this.panelInfo.id, { queryFrom: queryFrom })
.then((response) => {
// If click too fast on the panel, the data here may be inconsistent, so make a verification // If click too fast on the panel, the data here may be inconsistent, so make a verification
if (response.data.id === this.param.id) { if (response.data.id === this.param.id) {
if (response.data.dataFrom === 'template') { if (response.data.dataFrom === 'template') {
...@@ -2576,28 +2924,54 @@ export default { ...@@ -2576,28 +2924,54 @@ export default {
this.initTableData(response.data.tableId) this.initTableData(response.data.tableId)
} }
this.view = JSON.parse(JSON.stringify(response.data)) this.view = JSON.parse(JSON.stringify(response.data))
this.view.viewFields = this.view.viewFields ? JSON.parse(this.view.viewFields) : [] this.view.viewFields = this.view.viewFields
this.view.xaxis = this.view.xaxis ? JSON.parse(this.view.xaxis) : [] ? JSON.parse(this.view.viewFields)
this.view.xaxisExt = this.view.xaxisExt ? JSON.parse(this.view.xaxisExt) : [] : []
this.view.yaxis = this.view.yaxis ? JSON.parse(this.view.yaxis) : [] this.view.xaxis = this.view.xaxis
this.view.yaxisExt = this.view.yaxisExt ? JSON.parse(this.view.yaxisExt) : [] ? JSON.parse(this.view.xaxis)
this.view.extStack = this.view.extStack ? JSON.parse(this.view.extStack) : [] : []
this.view.drillFields = this.view.drillFields ? JSON.parse(this.view.drillFields) : [] this.view.xaxisExt = this.view.xaxisExt
this.view.extBubble = this.view.extBubble ? JSON.parse(this.view.extBubble) : [] ? JSON.parse(this.view.xaxisExt)
this.view.customAttr = this.view.customAttr ? JSON.parse(this.view.customAttr) : {} : []
this.view.customStyle = this.view.customStyle ? JSON.parse(this.view.customStyle) : {} this.view.yaxis = this.view.yaxis
this.view.customFilter = this.view.customFilter ? JSON.parse(this.view.customFilter) : {} ? JSON.parse(this.view.yaxis)
this.view.senior = this.view.senior ? JSON.parse(this.view.senior) : {} : []
this.view.yaxisExt = this.view.yaxisExt
? JSON.parse(this.view.yaxisExt)
: []
this.view.extStack = this.view.extStack
? JSON.parse(this.view.extStack)
: []
this.view.drillFields = this.view.drillFields
? JSON.parse(this.view.drillFields)
: []
this.view.extBubble = this.view.extBubble
? JSON.parse(this.view.extBubble)
: []
this.view.customAttr = this.view.customAttr
? JSON.parse(this.view.customAttr)
: {}
this.view.customStyle = this.view.customStyle
? JSON.parse(this.view.customStyle)
: {}
this.view.customFilter = this.view.customFilter
? JSON.parse(this.view.customFilter)
: {}
this.view.senior = this.view.senior
? JSON.parse(this.view.senior)
: {}
// 将视图传入echart组件 // 将视图传入echart组件
this.chart = response.data this.chart = response.data
this.data = response.data.data this.data = response.data.data
} }
}).catch(err => { })
.catch((err) => {
this.httpRequest.status = err.response.data.success this.httpRequest.status = err.response.data.success
this.httpRequest.msg = err.response.data.message this.httpRequest.msg = err.response.data.message
return true return true
}).then(() => { })
.then(() => {
// 视图为编辑状态才进行转换 // 视图为编辑状态才进行转换
if (this.editStatus) { if (this.editStatus) {
this.convertChart(this.chart) this.convertChart(this.chart)
...@@ -2759,7 +3133,11 @@ export default { ...@@ -2759,7 +3133,11 @@ export default {
saveDimensionFilter() { saveDimensionFilter() {
for (let i = 0; i < this.dimensionItem.filter.length; i++) { for (let i = 0; i < this.dimensionItem.filter.length; i++) {
const f = this.dimensionItem.filter[i] const f = this.dimensionItem.filter[i]
if (!f.term.includes('null') && !f.term.includes('empty') && (!f.value || f.value === '')) { if (
!f.term.includes('null') &&
!f.term.includes('empty') &&
(!f.value || f.value === '')
) {
this.$message({ this.$message({
message: this.$t('chart.filter_value_can_null'), message: this.$t('chart.filter_value_can_null'),
type: 'error', type: 'error',
...@@ -2768,7 +3146,8 @@ export default { ...@@ -2768,7 +3146,8 @@ export default {
return return
} }
} }
this.view.xaxis[this.dimensionItem.index].filter = this.dimensionItem.filter this.view.xaxis[this.dimensionItem.index].filter =
this.dimensionItem.filter
this.calcData(true) this.calcData(true)
this.closeDimensionFilter() this.closeDimensionFilter()
}, },
...@@ -2786,7 +3165,11 @@ export default { ...@@ -2786,7 +3165,11 @@ export default {
saveQuotaFilter() { saveQuotaFilter() {
for (let i = 0; i < this.quotaItem.filter.length; i++) { for (let i = 0; i < this.quotaItem.filter.length; i++) {
const f = this.quotaItem.filter[i] const f = this.quotaItem.filter[i]
if (!f.term.includes('null') && !f.term.includes('empty') && (!f.value || f.value === '')) { if (
!f.term.includes('null') &&
!f.term.includes('empty') &&
(!f.value || f.value === '')
) {
this.$message({ this.$message({
message: this.$t('chart.filter_value_can_null'), message: this.$t('chart.filter_value_can_null'),
type: 'error', type: 'error',
...@@ -2836,13 +3219,20 @@ export default { ...@@ -2836,13 +3219,20 @@ export default {
this.resultFilterEdit = false this.resultFilterEdit = false
}, },
saveResultFilter() { saveResultFilter() {
if (((this.filterItem.deType === 0 || this.filterItem.deType === 5) && this.filterItem.filterType !== 'enum') || if (
((this.filterItem.deType === 0 || this.filterItem.deType === 5) &&
this.filterItem.filterType !== 'enum') ||
this.filterItem.deType === 1 || this.filterItem.deType === 1 ||
this.filterItem.deType === 2 || this.filterItem.deType === 2 ||
this.filterItem.deType === 3) { this.filterItem.deType === 3
) {
for (let i = 0; i < this.filterItem.filter.length; i++) { for (let i = 0; i < this.filterItem.filter.length; i++) {
const f = this.filterItem.filter[i] const f = this.filterItem.filter[i]
if (!f.term.includes('null') && !f.term.includes('empty') && (!f.value || f.value === '')) { if (
!f.term.includes('null') &&
!f.term.includes('empty') &&
(!f.value || f.value === '')
) {
this.$message({ this.$message({
message: this.$t('chart.filter_value_can_null'), message: this.$t('chart.filter_value_can_null'),
type: 'error', type: 'error',
...@@ -2863,10 +3253,14 @@ export default { ...@@ -2863,10 +3253,14 @@ export default {
} }
} }
this.view.customFilter[this.filterItem.index].filter = this.filterItem.filter this.view.customFilter[this.filterItem.index].filter =
this.view.customFilter[this.filterItem.index].logic = this.filterItem.logic this.filterItem.filter
this.view.customFilter[this.filterItem.index].filterType = this.filterItem.filterType this.view.customFilter[this.filterItem.index].logic =
this.view.customFilter[this.filterItem.index].enumCheckField = this.filterItem.enumCheckField this.filterItem.logic
this.view.customFilter[this.filterItem.index].filterType =
this.filterItem.filterType
this.view.customFilter[this.filterItem.index].enumCheckField =
this.filterItem.enumCheckField
this.calcData(true) this.calcData(true)
this.closeResultFilter() this.closeResultFilter()
}, },
...@@ -2907,9 +3301,11 @@ export default { ...@@ -2907,9 +3301,11 @@ export default {
saveQuotaEditCompare() { saveQuotaEditCompare() {
// 更新指标 // 更新指标
if (this.quotaItemCompare.calcType === 'quota') { if (this.quotaItemCompare.calcType === 'quota') {
this.view.yaxis[this.quotaItemCompare.index].compareCalc = this.quotaItemCompare.compareCalc this.view.yaxis[this.quotaItemCompare.index].compareCalc =
this.quotaItemCompare.compareCalc
} else if (this.quotaItemCompare.calcType === 'quotaExt') { } else if (this.quotaItemCompare.calcType === 'quotaExt') {
this.view.yaxisExt[this.quotaItemCompare.index].compareCalc = this.quotaItemCompare.compareCalc this.view.yaxisExt[this.quotaItemCompare.index].compareCalc =
this.quotaItemCompare.compareCalc
} }
this.calcData(true) this.calcData(true)
this.closeQuotaEditCompare() this.closeQuotaEditCompare()
...@@ -2945,7 +3341,8 @@ export default { ...@@ -2945,7 +3341,8 @@ export default {
}, },
changeDs() { changeDs() {
const dialogTitle = (this.table && this.table.name) ? ('[' + this.table.name + ']') : '' const dialogTitle =
this.table && this.table.name ? '[' + this.table.name + ']' : ''
this.changeDsTitle = this.$t('chart.change_ds') + dialogTitle this.changeDsTitle = this.$t('chart.change_ds') + dialogTitle
this.selectTableFlag = true this.selectTableFlag = true
}, },
...@@ -2956,12 +3353,22 @@ export default { ...@@ -2956,12 +3353,22 @@ export default {
// 更换数据集 // 更换数据集
changeChart() { changeChart() {
const optType = this.view.tableId === this.changeTable.id && this.view.dataFrom !== 'template' ? 'same' : 'change' const optType =
this.view.tableId === this.changeTable.id &&
this.view.dataFrom !== 'template'
? 'same'
: 'change'
// 更换数据集后清空视图字段,并重新请求数据;否则没有操作 // 更换数据集后清空视图字段,并重新请求数据;否则没有操作
if (optType === 'change') { if (optType === 'change') {
this.view.dataFrom = 'dataset' this.view.dataFrom = 'dataset'
this.view.tableId = this.changeTable.id this.view.tableId = this.changeTable.id
post('/chart/field/deleteByChartId/' + this.param.id + '/' + this.panelInfo.id, null).then(response => { post(
'/chart/field/deleteByChartId/' +
this.param.id +
'/' +
this.panelInfo.id,
null
).then((response) => {
// reset gauge // reset gauge
this.view.customAttr.size.gaugeMinType = 'fix' this.view.customAttr.size.gaugeMinType = 'fix'
this.view.customAttr.size.gaugeMaxType = 'fix' this.view.customAttr.size.gaugeMaxType = 'fix'
...@@ -2976,12 +3383,24 @@ export default { ...@@ -2976,12 +3383,24 @@ export default {
fieldFilter(val) { fieldFilter(val) {
if (val && val !== '') { if (val && val !== '') {
this.dimensionData = JSON.parse(JSON.stringify(this.dimension.filter(ele => { this.dimensionData = JSON.parse(
return ele.name.toLocaleLowerCase().includes(val.toLocaleLowerCase()) JSON.stringify(
}))) this.dimension.filter((ele) => {
this.quotaData = JSON.parse(JSON.stringify(this.quota.filter(ele => { return ele.name
return ele.name.toLocaleLowerCase().includes(val.toLocaleLowerCase()) .toLocaleLowerCase()
}))) .includes(val.toLocaleLowerCase())
})
)
)
this.quotaData = JSON.parse(
JSON.stringify(
this.quota.filter((ele) => {
return ele.name
.toLocaleLowerCase()
.includes(val.toLocaleLowerCase())
})
)
)
} else { } else {
this.dimensionData = JSON.parse(JSON.stringify(this.dimension)) this.dimensionData = JSON.parse(JSON.stringify(this.dimension))
this.quotaData = JSON.parse(JSON.stringify(this.quota)) this.quotaData = JSON.parse(JSON.stringify(this.quota))
...@@ -3049,7 +3468,12 @@ export default { ...@@ -3049,7 +3468,12 @@ export default {
this.dragCheckType(this.view.xaxis, 'd') this.dragCheckType(this.view.xaxis, 'd')
} }
this.dragMoveDuplicate(this.view.xaxis, e) this.dragMoveDuplicate(this.view.xaxis, e)
if ((this.view.type === 'map' || this.view.type === 'word-cloud' || this.view.type === 'label') && this.view.xaxis.length > 1) { if (
(this.view.type === 'map' ||
this.view.type === 'word-cloud' ||
this.view.type === 'label') &&
this.view.xaxis.length > 1
) {
this.view.xaxis = [this.view.xaxis[0]] this.view.xaxis = [this.view.xaxis[0]]
} }
this.calcData(true) this.calcData(true)
...@@ -3059,7 +3483,10 @@ export default { ...@@ -3059,7 +3483,10 @@ export default {
this.dragCheckType(this.view.xaxisExt, 'd') this.dragCheckType(this.view.xaxisExt, 'd')
} }
this.dragMoveDuplicate(this.view.xaxisExt, e) this.dragMoveDuplicate(this.view.xaxisExt, e)
if ((this.view.type === 'map' || this.view.type === 'word-cloud') && this.view.xaxisExt.length > 1) { if (
(this.view.type === 'map' || this.view.type === 'word-cloud') &&
this.view.xaxisExt.length > 1
) {
this.view.xaxisExt = [this.view.xaxisExt[0]] this.view.xaxisExt = [this.view.xaxisExt[0]]
} }
this.calcData(true) this.calcData(true)
...@@ -3067,7 +3494,16 @@ export default { ...@@ -3067,7 +3494,16 @@ export default {
addYaxis(e) { addYaxis(e) {
this.dragCheckType(this.view.yaxis, 'q') this.dragCheckType(this.view.yaxis, 'q')
this.dragMoveDuplicate(this.view.yaxis, e) this.dragMoveDuplicate(this.view.yaxis, e)
if ((equalsAny(this.view.type, 'waterfall', 'word-cloud', 'bidirectional-bar') || this.view.type.includes('group')) && this.view.yaxis.length > 1) { if (
(equalsAny(
this.view.type,
'waterfall',
'word-cloud',
'bidirectional-bar'
) ||
this.view.type.includes('group')) &&
this.view.yaxis.length > 1
) {
this.view.yaxis = [this.view.yaxis[0]] this.view.yaxis = [this.view.yaxis[0]]
} }
this.calcData(true) this.calcData(true)
...@@ -3075,7 +3511,10 @@ export default { ...@@ -3075,7 +3511,10 @@ export default {
addYaxisExt(e) { addYaxisExt(e) {
this.dragCheckType(this.view.yaxisExt, 'q') this.dragCheckType(this.view.yaxisExt, 'q')
this.dragMoveDuplicate(this.view.yaxisExt, e) this.dragMoveDuplicate(this.view.yaxisExt, e)
if (equalsAny(this.view.type, 'map', 'bidirectional-bar') && this.view.yaxisExt.length > 1) { if (
equalsAny(this.view.type, 'map', 'bidirectional-bar') &&
this.view.yaxisExt.length > 1
) {
this.view.yaxisExt = [this.view.yaxisExt[0]] this.view.yaxisExt = [this.view.yaxisExt[0]]
} }
this.calcData(true) this.calcData(true)
...@@ -3104,7 +3543,8 @@ export default { ...@@ -3104,7 +3543,8 @@ export default {
}, },
initAreas() { initAreas() {
Object.keys(this.places).length === 0 && areaMapping().then(res => { Object.keys(this.places).length === 0 &&
areaMapping().then((res) => {
this.places = res.data this.places = res.data
}) })
}, },
...@@ -3118,7 +3558,10 @@ export default { ...@@ -3118,7 +3558,10 @@ export default {
resultNode.children = node.children resultNode.children = node.children
} }
if (resultNode.children && (!node.children || node.children.length === 0)) { if (
resultNode.children &&
(!node.children || node.children.length === 0)
) {
delete resultNode.children delete resultNode.children
} }
return resultNode return resultNode
...@@ -3172,14 +3615,21 @@ export default { ...@@ -3172,14 +3615,21 @@ export default {
}, },
chartClick(param) { chartClick(param) {
if (this.drillClickDimensionList.length < this.view.drillFields.length - 1) { if (
this.drillClickDimensionList.length <
this.view.drillFields.length - 1
) {
if (this.chart.type === 'map' || this.chart.type === 'buddle-map') { if (this.chart.type === 'map' || this.chart.type === 'buddle-map') {
if (this.sendToChildren(param)) { if (this.sendToChildren(param)) {
this.drillClickDimensionList.push({ dimensionList: param.data.dimensionList }) this.drillClickDimensionList.push({
dimensionList: param.data.dimensionList
})
this.calcData(true, 'chart', false, false) this.calcData(true, 'chart', false, false)
} }
} else { } else {
this.drillClickDimensionList.push({ dimensionList: param.data.dimensionList }) this.drillClickDimensionList.push({
dimensionList: param.data.dimensionList
})
this.calcData(true, 'chart', false, false) this.calcData(true, 'chart', false, false)
} }
} else if (this.view.drillFields.length > 0) { } else if (this.view.drillFields.length > 0) {
...@@ -3200,18 +3650,25 @@ export default { ...@@ -3200,18 +3650,25 @@ export default {
const current = this.$refs.dynamicChart const current = this.$refs.dynamicChart
this.setDetailMapCode(null) this.setDetailMapCode(null)
if (this.view.isPlugin) { if (this.view.isPlugin) {
current && current.callPluginInner && current.callPluginInner({ current &&
current.callPluginInner &&
current.callPluginInner({
methodName: 'registerDynamicMap', methodName: 'registerDynamicMap',
methodParam: null methodParam: null
}) })
} else { } else {
current && current.registerDynamicMap && current.registerDynamicMap(null) current &&
current.registerDynamicMap &&
current.registerDynamicMap(null)
} }
} }
}, },
drillJump(index) { drillJump(index) {
const length = this.drillClickDimensionList.length const length = this.drillClickDimensionList.length
this.drillClickDimensionList = this.drillClickDimensionList.slice(0, index) this.drillClickDimensionList = this.drillClickDimensionList.slice(
0,
index
)
if (this.chart.type === 'map' || this.chart.type === 'buddle-map') { if (this.chart.type === 'map' || this.chart.type === 'buddle-map') {
this.backToParent(index, length) this.backToParent(index, length)
} }
...@@ -3232,12 +3689,18 @@ export default { ...@@ -3232,12 +3689,18 @@ export default {
this.currentAcreaNode = tempNode this.currentAcreaNode = tempNode
const current = this.$refs.dynamicChart const current = this.$refs.dynamicChart
if (this.view.isPlugin) { if (this.view.isPlugin) {
current && current.callPluginInner && this.setDetailMapCode(this.currentAcreaNode.code) && current.callPluginInner({ current &&
current.callPluginInner &&
this.setDetailMapCode(this.currentAcreaNode.code) &&
current.callPluginInner({
methodName: 'registerDynamicMap', methodName: 'registerDynamicMap',
methodParam: this.currentAcreaNode.code methodParam: this.currentAcreaNode.code
}) })
} else { } else {
current && current.registerDynamicMap && this.setDetailMapCode(this.currentAcreaNode.code) && current.registerDynamicMap(this.currentAcreaNode.code) current &&
current.registerDynamicMap &&
this.setDetailMapCode(this.currentAcreaNode.code) &&
current.registerDynamicMap(this.currentAcreaNode.code)
} }
}, },
...@@ -3255,19 +3718,34 @@ export default { ...@@ -3255,19 +3718,34 @@ export default {
if (this.currentAcreaNode) { if (this.currentAcreaNode) {
aCode = this.currentAcreaNode.code aCode = this.currentAcreaNode.code
} }
const currentNode = this.findEntityByCode(aCode || this.view.customAttr.areaCode, this.places) const currentNode = this.findEntityByCode(
if (currentNode && currentNode.children && currentNode.children.length > 0) { aCode || this.view.customAttr.areaCode,
const nextNode = currentNode.children.find(item => item.name === name) this.places
)
if (
currentNode &&
currentNode.children &&
currentNode.children.length > 0
) {
const nextNode = currentNode.children.find((item) => item.name === name)
if (!nextNode || !nextNode.code) return null if (!nextNode || !nextNode.code) return null
this.currentAcreaNode = nextNode this.currentAcreaNode = nextNode
const current = this.$refs.dynamicChart const current = this.$refs.dynamicChart
if (this.view.isPlugin) { if (this.view.isPlugin) {
nextNode && current && current.callPluginInner && this.setDetailMapCode(nextNode.code) && current.callPluginInner({ nextNode &&
current &&
current.callPluginInner &&
this.setDetailMapCode(nextNode.code) &&
current.callPluginInner({
methodName: 'registerDynamicMap', methodName: 'registerDynamicMap',
methodParam: nextNode.code methodParam: nextNode.code
}) })
} else { } else {
nextNode && current && current.registerDynamicMap && this.setDetailMapCode(nextNode.code) && current.registerDynamicMap(nextNode.code) nextNode &&
current &&
current.registerDynamicMap &&
this.setDetailMapCode(nextNode.code) &&
current.registerDynamicMap(nextNode.code)
} }
return nextNode return nextNode
} }
...@@ -3291,23 +3769,39 @@ export default { ...@@ -3291,23 +3769,39 @@ export default {
reset() { reset() {
const _this = this const _this = this
this.$confirm(this.$t('chart.view_reset_tips'), this.$t('chart.view_reset'), { this.$confirm(
this.$t('chart.view_reset_tips'),
this.$t('chart.view_reset'),
{
confirmButtonText: this.$t('commons.confirm'), confirmButtonText: this.$t('commons.confirm'),
cancelButtonText: this.$t('commons.cancel'), cancelButtonText: this.$t('commons.cancel'),
type: 'warning' type: 'warning'
}).then(() => { }
resetViewCacheCallBack(_this.param.id, _this.panelInfo.id, function(rsp) { )
.then(() => {
resetViewCacheCallBack(
_this.param.id,
_this.panelInfo.id,
function(rsp) {
_this.changeEditStatus(false) _this.changeEditStatus(false)
_this.getChart(_this.param.id, 'panel') _this.getChart(_this.param.id, 'panel')
bus.$emit('view-in-cache', { type: 'propChange', viewId: _this.param.id }) bus.$emit('view-in-cache', {
type: 'propChange',
viewId: _this.param.id
})
}
)
}) })
}).catch(() => { .catch(() => {
// Do Nothing // Do Nothing
}) })
}, },
changeEditStatus(status) { changeEditStatus(status) {
this.hasEdit = status this.hasEdit = status
this.$store.commit('recordViewEdit', { viewId: this.param.id, hasEdit: status }) this.$store.commit('recordViewEdit', {
viewId: this.param.id,
hasEdit: status
})
}, },
changeChartRender() { changeChartRender() {
// Do Nothing // Do Nothing
...@@ -3334,10 +3828,14 @@ export default { ...@@ -3334,10 +3828,14 @@ export default {
customAttr.label.position = 'outer' customAttr.label.position = 'outer'
} }
if (type === 'pie-donut') { if (type === 'pie-donut') {
customAttr.size.pieInnerRadius = Math.round(customAttr.size.pieOuterRadius * 0.75) customAttr.size.pieInnerRadius = Math.round(
customAttr.size.pieOuterRadius * 0.75
)
} }
if (type === 'pie-donut-rose') { if (type === 'pie-donut-rose') {
customAttr.size.pieInnerRadius = Math.round(customAttr.size.pieOuterRadius * 0.5) customAttr.size.pieInnerRadius = Math.round(
customAttr.size.pieOuterRadius * 0.5
)
} }
if (equalsAny(type, 'pie', 'pie-rose')) { if (equalsAny(type, 'pie', 'pie-rose')) {
customAttr.size.pieInnerRadius = 0 customAttr.size.pieInnerRadius = 0
...@@ -3348,7 +3846,9 @@ export default { ...@@ -3348,7 +3846,9 @@ export default {
} else if (type.includes('line')) { } else if (type.includes('line')) {
this.view.customAttr.label.position = 'top' this.view.customAttr.label.position = 'top'
} else if (equalsAny(type, 'table-info', 'table-pivot')) { } else if (equalsAny(type, 'table-info', 'table-pivot')) {
if (this.view?.senior?.functionCfg?.emptyDataStrategy === 'ignoreData') { if (
this.view?.senior?.functionCfg?.emptyDataStrategy === 'ignoreData'
) {
this.view.senior.functionCfg.emptyDataStrategy = 'breakLine' this.view.senior.functionCfg.emptyDataStrategy = 'breakLine'
} }
} }
...@@ -3365,7 +3865,13 @@ export default { ...@@ -3365,7 +3865,13 @@ export default {
}, },
saveValueFormatter() { saveValueFormatter() {
const ele = this.valueFormatterItem.formatterCfg.decimalCount const ele = this.valueFormatterItem.formatterCfg.decimalCount
if (ele === undefined || ele.toString().indexOf('.') > -1 || parseInt(ele).toString() === 'NaN' || parseInt(ele) < 0 || parseInt(ele) > 10) { if (
ele === undefined ||
ele.toString().indexOf('.') > -1 ||
parseInt(ele).toString() === 'NaN' ||
parseInt(ele) < 0 ||
parseInt(ele) > 10
) {
this.$message({ this.$message({
message: this.$t('chart.formatter_decimal_count_error'), message: this.$t('chart.formatter_decimal_count_error'),
type: 'error', type: 'error',
...@@ -3375,11 +3881,14 @@ export default { ...@@ -3375,11 +3881,14 @@ export default {
} }
// 更新指标 // 更新指标
if (this.valueFormatterItem.formatterType === 'quota') { if (this.valueFormatterItem.formatterType === 'quota') {
this.view.yaxis[this.valueFormatterItem.index].formatterCfg = this.valueFormatterItem.formatterCfg this.view.yaxis[this.valueFormatterItem.index].formatterCfg =
this.valueFormatterItem.formatterCfg
} else if (this.valueFormatterItem.formatterType === 'quotaExt') { } else if (this.valueFormatterItem.formatterType === 'quotaExt') {
this.view.yaxisExt[this.valueFormatterItem.index].formatterCfg = this.valueFormatterItem.formatterCfg this.view.yaxisExt[this.valueFormatterItem.index].formatterCfg =
this.valueFormatterItem.formatterCfg
} else if (this.valueFormatterItem.formatterType === 'dimension') { } else if (this.valueFormatterItem.formatterType === 'dimension') {
this.view.xaxis[this.valueFormatterItem.index].formatterCfg = this.valueFormatterItem.formatterCfg this.view.xaxis[this.valueFormatterItem.index].formatterCfg =
this.valueFormatterItem.formatterCfg
} }
this.calcData(true) this.calcData(true)
this.closeValueFormatter() this.closeValueFormatter()
...@@ -3397,7 +3906,7 @@ export default { ...@@ -3397,7 +3906,7 @@ export default {
this.customSortList = [] this.customSortList = []
}, },
saveCustomSort() { saveCustomSort() {
this.view.xaxis.forEach(ele => { this.view.xaxis.forEach((ele) => {
if (ele.id === this.customSortField.id) { if (ele.id === this.customSortField.id) {
ele.sort = 'custom_sort' ele.sort = 'custom_sort'
ele.customSort = this.customSortList ele.customSort = this.customSortList
...@@ -3414,7 +3923,7 @@ export default { ...@@ -3414,7 +3923,7 @@ export default {
this.showStackCustomSort = false this.showStackCustomSort = false
}, },
saveStackCustomSort() { saveStackCustomSort() {
this.view.extStack.forEach(ele => { this.view.extStack.forEach((ele) => {
if (ele.id === this.customSortField.id) { if (ele.id === this.customSortField.id) {
ele.sort = 'custom_sort' ele.sort = 'custom_sort'
ele.customSort = this.customSortList ele.customSort = this.customSortList
...@@ -3480,8 +3989,12 @@ export default { ...@@ -3480,8 +3989,12 @@ export default {
confirmButtonText: this.$t('dataset.confirm'), confirmButtonText: this.$t('dataset.confirm'),
cancelButtonText: this.$t('dataset.cancel'), cancelButtonText: this.$t('dataset.cancel'),
type: 'warning' type: 'warning'
}).then(() => { })
post('/chart/field/delete/' + item.id + '/' + this.panelInfo.id, null).then(response => { .then(() => {
post(
'/chart/field/delete/' + item.id + '/' + this.panelInfo.id,
null
).then((response) => {
this.$message({ this.$message({
type: 'success', type: 'success',
message: this.$t('chart.delete_success'), message: this.$t('chart.delete_success'),
...@@ -3489,8 +4002,8 @@ export default { ...@@ -3489,8 +4002,8 @@ export default {
}) })
this.initTableField(this.table.id) this.initTableField(this.table.id)
}) })
}).catch(() => {
}) })
.catch(() => {})
}, },
clearData(data) { clearData(data) {
this.view[data] = [] this.view[data] = []
...@@ -3707,12 +4220,11 @@ span { ...@@ -3707,12 +4220,11 @@ span {
padding: 0 4px; padding: 0 4px;
display: flex; display: flex;
align-items: center; align-items: center;
background-color: white background-color: white;
} }
.blackTheme .attr-selector { .blackTheme .attr-selector {
background-color: var(--MainBG);
background-color: var(--MainBG)
} }
.disabled-none-cursor { .disabled-none-cursor {
...@@ -3760,17 +4272,15 @@ span { ...@@ -3760,17 +4272,15 @@ span {
} }
.blackTheme .chart-error-class { .blackTheme .chart-error-class {
background-color: var(--MainBG);
background-color: var(--MainBG)
} }
.field-height { .field-height {
height: 100%; height: 100%;
border-top: 1px solid #E6E6E6; border-top: 1px solid #e6e6e6;
} }
.blackTheme .field-height { .blackTheme .field-height {
border-top: 1px solid; border-top: 1px solid;
border-color: var(--TableBorderColor) !important; border-color: var(--TableBorderColor) !important;
} }
...@@ -3792,7 +4302,7 @@ span { ...@@ -3792,7 +4302,7 @@ span {
width: 100%; width: 100%;
min-height: 32px; min-height: 32px;
border-radius: 4px; border-radius: 4px;
border: 1px solid #DCDFE6; border: 1px solid #dcdfe6;
overflow-x: hidden; overflow-x: hidden;
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -3810,7 +4320,7 @@ span { ...@@ -3810,7 +4320,7 @@ span {
top: calc(50% - 2px); top: calc(50% - 2px);
left: 0; left: 0;
width: 100%; width: 100%;
color: #CCCCCC; color: #cccccc;
} }
.blackTheme .drag-placeholder-style { .blackTheme .drag-placeholder-style {
......
<?xml version="1.0"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="16" height="16" viewBox="0 0 16 16">
<defs>
<clipPath id="master_svg0_29_08980">
<rect x="0" y="0" width="16" height="16" rx="0"/>
</clipPath>
</defs>
<g clip-path="url(#master_svg0_29_08980)">
<g>
<path d="M8.06745609375,1.02983903885C5.11671609375,1.04304715625,2.72670529375,3.45439515625,2.73980069165,6.40546515625C2.75210569375,9.17445515625,7.16127609375,14.16478515625,7.66409609375,14.72448515625C7.91233609375,15.00178515625,8.347036093749999,14.99988515625,8.592846093750001,14.72038515625C9.090696093750001,14.15618515625,13.45534609375,9.12681515625,13.44304609375,6.35771515625C13.42994609375,3.40675515625,11.01841609375,1.01674315625,8.06745609375,1.02983903885ZM8.101766093750001,8.73079515625C6.90670609375,8.73609515625,5.92975609375,7.76805515625,5.924446093749999,6.57288515625C5.919146093749999,5.37771515625,6.88740609375,4.40098515625,8.08235609375,4.39578515625C9.27786609375,4.390365156250001,10.25459609375,5.35840515625,10.25990609375,6.55346515625C10.265206093749999,7.74875515625,9.29716609375,8.72537515625,8.101766093750001,8.73079515625Z" fill="#1890FF" fill-opacity="1"/>
</g>
</g>
</svg>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论