修改dataeaseName为gisbiName
This commit is contained in:
parent
abf14fc7ba
commit
e12552eb1f
@ -8,7 +8,7 @@ export interface Field {
|
|||||||
datasetGroupId: number | string
|
datasetGroupId: number | string
|
||||||
originName: string
|
originName: string
|
||||||
name: string
|
name: string
|
||||||
dataeaseName: string
|
gisbiName: string
|
||||||
groupType: string
|
groupType: string
|
||||||
type: string
|
type: string
|
||||||
deType: number
|
deType: number
|
||||||
|
@ -97,6 +97,7 @@ const storeCacheProxy = byteArray => {
|
|||||||
}
|
}
|
||||||
const pluginProxy = ref(null)
|
const pluginProxy = ref(null)
|
||||||
const invokeMethod = param => {
|
const invokeMethod = param => {
|
||||||
|
debugger
|
||||||
if (pluginProxy.value && pluginProxy.value['invokeMethod']) {
|
if (pluginProxy.value && pluginProxy.value['invokeMethod']) {
|
||||||
pluginProxy.value['invokeMethod'](param)
|
pluginProxy.value['invokeMethod'](param)
|
||||||
} else if (param.methodName && pluginProxy.value[param.methodName]) {
|
} else if (param.methodName && pluginProxy.value[param.methodName]) {
|
||||||
|
@ -141,7 +141,7 @@ const initCurFields = chartDetails => {
|
|||||||
dataRowFiledName.value.push(`[记录数*]`)
|
dataRowFiledName.value.push(`[记录数*]`)
|
||||||
}
|
}
|
||||||
const sourceFieldNameIdMap = chartDetails.data.fields.reduce((pre, next) => {
|
const sourceFieldNameIdMap = chartDetails.data.fields.reduce((pre, next) => {
|
||||||
pre[next['dataeaseName']] = next['name']
|
pre[next['gisbiName']] = next['name']
|
||||||
return pre
|
return pre
|
||||||
}, {})
|
}, {})
|
||||||
const rowData = chartDetails.data.tableRow[0]
|
const rowData = chartDetails.data.tableRow[0]
|
||||||
|
@ -629,25 +629,25 @@ const initCurFields = chartDetails => {
|
|||||||
}
|
}
|
||||||
// Get the corresponding relationship between id and value
|
// Get the corresponding relationship between id and value
|
||||||
const nameIdMap = chartDetails.data.fields.reduce((pre, next) => {
|
const nameIdMap = chartDetails.data.fields.reduce((pre, next) => {
|
||||||
pre[next['dataeaseName']] = next['id']
|
pre[next['gisbiName']] = 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['gisbiName']] = next['name']
|
||||||
return pre
|
return pre
|
||||||
}, {})
|
}, {})
|
||||||
const rowData = chartDetails.data.tableRow[0]
|
const rowData = chartDetails.data.tableRow[0]
|
||||||
if (chartDetails.type === 'rich-text') {
|
if (chartDetails.type === 'rich-text') {
|
||||||
let yAxis = JSON.parse(JSON.stringify(chartDetails.yAxis))
|
let yAxis = JSON.parse(JSON.stringify(chartDetails.yAxis))
|
||||||
const yDataeaseNames = []
|
const ygisbiNames = []
|
||||||
const yDataeaseNamesCfg = []
|
const ygisbiNamesCfg = []
|
||||||
yAxis.forEach(yItem => {
|
yAxis.forEach(yItem => {
|
||||||
yDataeaseNames.push(yItem.dataeaseName)
|
ygisbiNames.push(yItem.gisbiName)
|
||||||
yDataeaseNamesCfg[yItem.dataeaseName] = yItem.formatterCfg
|
ygisbiNamesCfg[yItem.gisbiName] = yItem.formatterCfg
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const valueFieldMap: Record<string, Axis> = chartDetails.yAxis.reduce((p, n) => {
|
const valueFieldMap: Record<string, Axis> = chartDetails.yAxis.reduce((p, n) => {
|
||||||
p[n.dataeaseName] = n
|
p[n.gisbiName] = n
|
||||||
return p
|
return p
|
||||||
}, {})
|
}, {})
|
||||||
for (const key in rowData) {
|
for (const key in rowData) {
|
||||||
|
@ -640,7 +640,7 @@ declare interface CalcTotals {
|
|||||||
* 汇总聚合配置
|
* 汇总聚合配置
|
||||||
*/
|
*/
|
||||||
declare interface CalcTotalCfg extends Axis {
|
declare interface CalcTotalCfg extends Axis {
|
||||||
dataeaseName: string
|
gisbiName: string
|
||||||
/**
|
/**
|
||||||
* 聚合方式
|
* 聚合方式
|
||||||
*/
|
*/
|
||||||
|
@ -187,7 +187,7 @@ declare interface ChartViewField {
|
|||||||
/**
|
/**
|
||||||
* de名称
|
* de名称
|
||||||
*/
|
*/
|
||||||
dataeaseName: string
|
gisbiName: string
|
||||||
/**
|
/**
|
||||||
* id
|
* id
|
||||||
*/
|
*/
|
||||||
|
@ -10,25 +10,25 @@ export function viewFieldTimeTrans(viewDataInfo, params) {
|
|||||||
: []
|
: []
|
||||||
|
|
||||||
const idNameMap = fields.reduce((pre, next) => {
|
const idNameMap = fields.reduce((pre, next) => {
|
||||||
pre[next['id']] = next['dataeaseName']
|
pre[next['id']] = next['gisbiName']
|
||||||
return pre
|
return pre
|
||||||
}, {})
|
}, {})
|
||||||
|
|
||||||
const nameTypeMap = fields.reduce((pre, next) => {
|
const nameTypeMap = fields.reduce((pre, next) => {
|
||||||
pre[next['dataeaseName']] = next['deType']
|
pre[next['gisbiName']] = next['deType']
|
||||||
return pre
|
return pre
|
||||||
}, {})
|
}, {})
|
||||||
|
|
||||||
const nameDateStyleMap = fields.reduce((pre, next) => {
|
const nameDateStyleMap = fields.reduce((pre, next) => {
|
||||||
pre[next['dataeaseName']] = next['dateStyle']
|
pre[next['gisbiName']] = next['dateStyle']
|
||||||
return pre
|
return pre
|
||||||
}, {})
|
}, {})
|
||||||
|
|
||||||
params.dimensionList.forEach(dimension => {
|
params.dimensionList.forEach(dimension => {
|
||||||
const dataeaseName = idNameMap[dimension.id]
|
const gisbiName = idNameMap[dimension.id]
|
||||||
// deType === 1 表示是时间类型
|
// deType === 1 表示是时间类型
|
||||||
if (nameTypeMap[dataeaseName] === 1) {
|
if (nameTypeMap[gisbiName] === 1) {
|
||||||
dimension['timeValue'] = getRange(dimension.value, nameDateStyleMap[dataeaseName])
|
dimension['timeValue'] = getRange(dimension.value, nameDateStyleMap[gisbiName])
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ export function getItemType(dimensionData, quotaData, item) {
|
|||||||
if (item.chartId) {
|
if (item.chartId) {
|
||||||
if (
|
if (
|
||||||
ele.originName === item.originName &&
|
ele.originName === item.originName &&
|
||||||
ele.dataeaseName === item.dataeaseName &&
|
ele.gisbiName === item.gisbiName &&
|
||||||
ele.deType === item.deType &&
|
ele.deType === item.deType &&
|
||||||
ele.groupType === item.groupType
|
ele.groupType === item.groupType
|
||||||
) {
|
) {
|
||||||
@ -39,7 +39,7 @@ export function getItemType(dimensionData, quotaData, item) {
|
|||||||
if (item.chartId) {
|
if (item.chartId) {
|
||||||
if (
|
if (
|
||||||
ele.originName === item.originName &&
|
ele.originName === item.originName &&
|
||||||
ele.dataeaseName === item.dataeaseName &&
|
ele.gisbiName === item.gisbiName &&
|
||||||
ele.deType === item.deType &&
|
ele.deType === item.deType &&
|
||||||
ele.groupType === item.groupType
|
ele.groupType === item.groupType
|
||||||
) {
|
) {
|
||||||
|
@ -87,7 +87,7 @@ const initFieldCtrl = () => {
|
|||||||
if (item.groupType === 'q') {
|
if (item.groupType === 'q') {
|
||||||
fieldOptions.value.push({
|
fieldOptions.value.push({
|
||||||
label: item.name,
|
label: item.name,
|
||||||
value: item.dataeaseName
|
value: item.gisbiName
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -182,7 +182,7 @@ const initTableColumnWidth = () => {
|
|||||||
const { tableHeader } = customAttr
|
const { tableHeader } = customAttr
|
||||||
if (allAxis.length && tableHeader.showIndex) {
|
if (allAxis.length && tableHeader.showIndex) {
|
||||||
const indexColumn = {
|
const indexColumn = {
|
||||||
dataeaseName: SERIES_NUMBER_FIELD,
|
gisbiName: SERIES_NUMBER_FIELD,
|
||||||
name: tableHeader.indexLabel
|
name: tableHeader.indexLabel
|
||||||
} as unknown as Axis
|
} as unknown as Axis
|
||||||
allAxis.unshift(indexColumn)
|
allAxis.unshift(indexColumn)
|
||||||
@ -197,7 +197,7 @@ const initTableColumnWidth = () => {
|
|||||||
const defaultWidth = parseFloat((100 / allAxis.length).toFixed(2))
|
const defaultWidth = parseFloat((100 / allAxis.length).toFixed(2))
|
||||||
allAxis.forEach(item => {
|
allAxis.forEach(item => {
|
||||||
state.basicStyleForm.tableFieldWidth.push({
|
state.basicStyleForm.tableFieldWidth.push({
|
||||||
fieldId: item.dataeaseName,
|
fieldId: item.gisbiName,
|
||||||
name: item.name,
|
name: item.name,
|
||||||
width: defaultWidth
|
width: defaultWidth
|
||||||
})
|
})
|
||||||
@ -210,11 +210,11 @@ const initTableColumnWidth = () => {
|
|||||||
state.basicStyleForm.tableFieldWidth.splice(0)
|
state.basicStyleForm.tableFieldWidth.splice(0)
|
||||||
allAxis.forEach(item => {
|
allAxis.forEach(item => {
|
||||||
let width = 10
|
let width = 10
|
||||||
if (fieldMap[item.dataeaseName]) {
|
if (fieldMap[item.gisbiName]) {
|
||||||
width = fieldMap[item.dataeaseName].width
|
width = fieldMap[item.gisbiName].width
|
||||||
}
|
}
|
||||||
state.basicStyleForm.tableFieldWidth.push({
|
state.basicStyleForm.tableFieldWidth.push({
|
||||||
fieldId: item.dataeaseName,
|
fieldId: item.gisbiName,
|
||||||
name: item.name,
|
name: item.name,
|
||||||
width
|
width
|
||||||
})
|
})
|
||||||
|
@ -438,9 +438,9 @@ watch(chartType, () => {
|
|||||||
|
|
||||||
const allFields = computed(() => {
|
const allFields = computed(() => {
|
||||||
return defaultTo(props.allFields, []).map(item => ({
|
return defaultTo(props.allFields, []).map(item => ({
|
||||||
key: item.dataeaseName,
|
key: item.gisbiName,
|
||||||
name: item.name,
|
name: item.name,
|
||||||
value: `${item.dataeaseName}@${item.name}`,
|
value: `${item.gisbiName}@${item.name}`,
|
||||||
disabled: false
|
disabled: false
|
||||||
}))
|
}))
|
||||||
})
|
})
|
||||||
|
@ -81,7 +81,7 @@ const init = () => {
|
|||||||
const tempList = []
|
const tempList = []
|
||||||
for (let i = 0; i < axisList.length; i++) {
|
for (let i = 0; i < axisList.length; i++) {
|
||||||
const axis = axisList[i]
|
const axis = axisList[i]
|
||||||
let savedAxis = find(state.basicStyleForm.seriesSummary, s => s.field === axis.dataeaseName)
|
let savedAxis = find(state.basicStyleForm.seriesSummary, s => s.field === axis.gisbiName)
|
||||||
if (savedAxis) {
|
if (savedAxis) {
|
||||||
if (savedAxis.summary == undefined) {
|
if (savedAxis.summary == undefined) {
|
||||||
savedAxis.summary = 'sum'
|
savedAxis.summary = 'sum'
|
||||||
@ -91,7 +91,7 @@ const init = () => {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
savedAxis = {
|
savedAxis = {
|
||||||
field: axis.dataeaseName,
|
field: axis.gisbiName,
|
||||||
summary: 'sum',
|
summary: 'sum',
|
||||||
show: true
|
show: true
|
||||||
}
|
}
|
||||||
@ -148,8 +148,8 @@ onMounted(() => {
|
|||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="c in computedAxis"
|
v-for="c in computedAxis"
|
||||||
:key="c.dataeaseName"
|
:key="c.gisbiName"
|
||||||
:value="c.dataeaseName"
|
:value="c.gisbiName"
|
||||||
:label="c.chartShowName ?? c.name"
|
:label="c.chartShowName ?? c.name"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
@ -420,9 +420,9 @@ const updateAxis = (form: AxisEditForm) => {
|
|||||||
}
|
}
|
||||||
const allFields = computed(() => {
|
const allFields = computed(() => {
|
||||||
return defaultTo(props.allFields, []).map(item => ({
|
return defaultTo(props.allFields, []).map(item => ({
|
||||||
key: item.dataeaseName,
|
key: item.gisbiName,
|
||||||
name: item.name,
|
name: item.name,
|
||||||
value: `${item.dataeaseName}@${item.name}`,
|
value: `${item.gisbiName}@${item.name}`,
|
||||||
disabled: false
|
disabled: false
|
||||||
}))
|
}))
|
||||||
})
|
})
|
||||||
|
@ -19,7 +19,7 @@ export interface CalcFieldType {
|
|||||||
datasetGroupId?: string // 有就传,没有null
|
datasetGroupId?: string // 有就传,没有null
|
||||||
originName: string // 物理字段名
|
originName: string // 物理字段名
|
||||||
name: string // 字段显示名
|
name: string // 字段显示名
|
||||||
dataeaseName?: string // 字段别名
|
gisbiName?: string // 字段别名
|
||||||
groupType: 'd' | 'q' // d=维度,q=指标
|
groupType: 'd' | 'q' // d=维度,q=指标
|
||||||
type: string
|
type: string
|
||||||
params?: Array<{ id: string; name: string; value: number }>
|
params?: Array<{ id: string; name: string; value: number }>
|
||||||
|
@ -55,7 +55,7 @@ const onCancelConfig = () => {
|
|||||||
|
|
||||||
const onConfigChange = () => {
|
const onConfigChange = () => {
|
||||||
const allAxis = props.chart.xAxis
|
const allAxis = props.chart.xAxis
|
||||||
?.map(axis => axis.hide !== true && axis.dataeaseName)
|
?.map(axis => axis.hide !== true && axis.gisbiName)
|
||||||
.filter(i => i)
|
.filter(i => i)
|
||||||
const { fields, meta } = s2.dataCfg
|
const { fields, meta } = s2.dataCfg
|
||||||
const groupMeta = meta.filter(item => !allAxis.includes(item.field))
|
const groupMeta = meta.filter(item => !allAxis.includes(item.field))
|
||||||
@ -68,7 +68,7 @@ const init = () => {
|
|||||||
const { headerGroupConfig } = chart.customAttr.tableHeader
|
const { headerGroupConfig } = chart.customAttr.tableHeader
|
||||||
const showColumns = []
|
const showColumns = []
|
||||||
xAxis?.forEach(axis => {
|
xAxis?.forEach(axis => {
|
||||||
axis.hide !== true && showColumns.push({ key: axis.dataeaseName })
|
axis.hide !== true && showColumns.push({ key: axis.gisbiName })
|
||||||
})
|
})
|
||||||
if (!showColumns.length) {
|
if (!showColumns.length) {
|
||||||
return
|
return
|
||||||
@ -110,17 +110,17 @@ const renderTable = (chart: ChartObj) => {
|
|||||||
const meta = [...headerGroupConfig.meta]
|
const meta = [...headerGroupConfig.meta]
|
||||||
const columns = headerGroupConfig.columns
|
const columns = headerGroupConfig.columns
|
||||||
const axisMap = chart.xAxis.reduce((pre, cur) => {
|
const axisMap = chart.xAxis.reduce((pre, cur) => {
|
||||||
pre[cur.dataeaseName] = cur
|
pre[cur.gisbiName] = cur
|
||||||
return pre
|
return pre
|
||||||
}, {})
|
}, {})
|
||||||
if (data?.fields?.length) {
|
if (data?.fields?.length) {
|
||||||
data.fields.forEach(ele => {
|
data.fields.forEach(ele => {
|
||||||
const f = axisMap[ele.dataeaseName]
|
const f = axisMap[ele.gisbiName]
|
||||||
if (f?.hide === true) {
|
if (f?.hide === true) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
meta.push({
|
meta.push({
|
||||||
field: ele.dataeaseName,
|
field: ele.gisbiName,
|
||||||
name: ele.chartShowName ?? ele.name,
|
name: ele.chartShowName ?? ele.name,
|
||||||
formatter: function (value) {
|
formatter: function (value) {
|
||||||
if (!f) {
|
if (!f) {
|
||||||
@ -144,7 +144,7 @@ const renderTable = (chart: ChartObj) => {
|
|||||||
chart.xAxis?.forEach(axis => {
|
chart.xAxis?.forEach(axis => {
|
||||||
if (axis.hide !== true) {
|
if (axis.hide !== true) {
|
||||||
meta.push({
|
meta.push({
|
||||||
field: axis.dataeaseName,
|
field: axis.gisbiName,
|
||||||
name: axis.chartShowName ?? axis.name
|
name: axis.chartShowName ?? axis.name
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -99,7 +99,7 @@ const groupConfigValid = computed(() => {
|
|||||||
const xAxis = props.chart.xAxis
|
const xAxis = props.chart.xAxis
|
||||||
const showColumns = []
|
const showColumns = []
|
||||||
xAxis?.forEach(axis => {
|
xAxis?.forEach(axis => {
|
||||||
axis.hide !== true && showColumns.push({ key: axis.dataeaseName })
|
axis.hide !== true && showColumns.push({ key: axis.gisbiName })
|
||||||
})
|
})
|
||||||
if (!showColumns.length) {
|
if (!showColumns.length) {
|
||||||
return false
|
return false
|
||||||
|
@ -96,11 +96,11 @@ const initSubTotalDimensionList = () => {
|
|||||||
//排除最后一个
|
//排除最后一个
|
||||||
const old = includes(
|
const old = includes(
|
||||||
state.tableTotalForm.row.subTotalsDimensions,
|
state.tableTotalForm.row.subTotalsDimensions,
|
||||||
props.chart.xAxis[i].dataeaseName
|
props.chart.xAxis[i].gisbiName
|
||||||
)
|
)
|
||||||
list.push({
|
list.push({
|
||||||
displayName: props.chart.xAxis[i].name,
|
displayName: props.chart.xAxis[i].name,
|
||||||
name: props.chart.xAxis[i].dataeaseName,
|
name: props.chart.xAxis[i].gisbiName,
|
||||||
checked: !!state.tableTotalForm.row.subTotalsDimensionsNew ? old : true
|
checked: !!state.tableTotalForm.row.subTotalsDimensionsNew ? old : true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -139,12 +139,12 @@ const init = () => {
|
|||||||
}
|
}
|
||||||
const yAxis = props.chart.yAxis
|
const yAxis = props.chart.yAxis
|
||||||
if (yAxis?.length > 0) {
|
if (yAxis?.length > 0) {
|
||||||
const axisArr = yAxis.map(i => i.dataeaseName)
|
const axisArr = yAxis.map(i => i.gisbiName)
|
||||||
if (axisArr.indexOf(state.tableTotalForm.row.totalSortField) === -1) {
|
if (axisArr.indexOf(state.tableTotalForm.row.totalSortField) === -1) {
|
||||||
state.tableTotalForm.row.totalSortField = yAxis[0].dataeaseName
|
state.tableTotalForm.row.totalSortField = yAxis[0].gisbiName
|
||||||
}
|
}
|
||||||
if (axisArr.indexOf(state.tableTotalForm.col.totalSortField) === -1) {
|
if (axisArr.indexOf(state.tableTotalForm.col.totalSortField) === -1) {
|
||||||
state.tableTotalForm.col.totalSortField = yAxis[0].dataeaseName
|
state.tableTotalForm.col.totalSortField = yAxis[0].gisbiName
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
state.tableTotalForm.row.totalSortField = ''
|
state.tableTotalForm.row.totalSortField = ''
|
||||||
@ -168,16 +168,16 @@ const init = () => {
|
|||||||
totalTupleArr.forEach(tuple => {
|
totalTupleArr.forEach(tuple => {
|
||||||
const [total, totalCfg] = tuple
|
const [total, totalCfg] = tuple
|
||||||
if (!totalCfg.length) {
|
if (!totalCfg.length) {
|
||||||
total.dataeaseName = ''
|
total.gisbiName = ''
|
||||||
total.aggregation = ''
|
total.aggregation = ''
|
||||||
total.originName = ''
|
total.originName = ''
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const totalIndex = totalCfg.findIndex(i => i.dataeaseName === total.dataeaseName)
|
const totalIndex = totalCfg.findIndex(i => i.gisbiName === total.gisbiName)
|
||||||
if (totalIndex !== -1) {
|
if (totalIndex !== -1) {
|
||||||
total.aggregation = totalCfg[totalIndex].aggregation
|
total.aggregation = totalCfg[totalIndex].aggregation
|
||||||
} else {
|
} else {
|
||||||
total.dataeaseName = totalCfg[0].dataeaseName
|
total.gisbiName = totalCfg[0].gisbiName
|
||||||
total.aggregation = totalCfg[0].aggregation
|
total.aggregation = totalCfg[0].aggregation
|
||||||
total.originName = totalCfg[0].originName
|
total.originName = totalCfg[0].originName
|
||||||
total.label = totalCfg[0].label
|
total.label = totalCfg[0].label
|
||||||
@ -193,7 +193,7 @@ const showProperty = prop => props.propertyInner?.includes(prop)
|
|||||||
const changeTotal = (totalItem, totals) => {
|
const changeTotal = (totalItem, totals) => {
|
||||||
for (let i = 0; i < totals.length; i++) {
|
for (let i = 0; i < totals.length; i++) {
|
||||||
const item = totals[i]
|
const item = totals[i]
|
||||||
if (item.dataeaseName === totalItem.dataeaseName) {
|
if (item.gisbiName === totalItem.gisbiName) {
|
||||||
totalItem.aggregation = item.aggregation
|
totalItem.aggregation = item.aggregation
|
||||||
totalItem.originName = item.originName
|
totalItem.originName = item.originName
|
||||||
totalItem.label = item.label
|
totalItem.label = item.label
|
||||||
@ -204,7 +204,7 @@ const changeTotal = (totalItem, totals) => {
|
|||||||
const changeTotalAggr = (totalItem, totals, colOrNum) => {
|
const changeTotalAggr = (totalItem, totals, colOrNum) => {
|
||||||
for (let i = 0; i < totals.length; i++) {
|
for (let i = 0; i < totals.length; i++) {
|
||||||
const item = totals[i]
|
const item = totals[i]
|
||||||
if (item.dataeaseName === totalItem.dataeaseName) {
|
if (item.gisbiName === totalItem.gisbiName) {
|
||||||
item.aggregation = totalItem.aggregation
|
item.aggregation = totalItem.aggregation
|
||||||
item.label = totalItem.label
|
item.label = totalItem.label
|
||||||
break
|
break
|
||||||
@ -219,7 +219,7 @@ const setupTotalCfg = (totalCfg, axis) => {
|
|||||||
if (!totalCfg.length) {
|
if (!totalCfg.length) {
|
||||||
axis.forEach(i => {
|
axis.forEach(i => {
|
||||||
totalCfg.push({
|
totalCfg.push({
|
||||||
dataeaseName: i.dataeaseName,
|
gisbiName: i.gisbiName,
|
||||||
aggregation: 'SUM',
|
aggregation: 'SUM',
|
||||||
label: i.chartShowName ?? i.name
|
label: i.chartShowName ?? i.name
|
||||||
})
|
})
|
||||||
@ -231,17 +231,17 @@ const setupTotalCfg = (totalCfg, axis) => {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
const cfgMap = totalCfg.reduce((p, n) => {
|
const cfgMap = totalCfg.reduce((p, n) => {
|
||||||
p[n.dataeaseName] = n
|
p[n.gisbiName] = n
|
||||||
return p
|
return p
|
||||||
}, {})
|
}, {})
|
||||||
totalCfg.splice(0, totalCfg.length)
|
totalCfg.splice(0, totalCfg.length)
|
||||||
axis.forEach(i => {
|
axis.forEach(i => {
|
||||||
totalCfg.push({
|
totalCfg.push({
|
||||||
dataeaseName: i.dataeaseName,
|
gisbiName: i.gisbiName,
|
||||||
aggregation: cfgMap[i.dataeaseName] ? cfgMap[i.dataeaseName].aggregation : 'SUM',
|
aggregation: cfgMap[i.gisbiName] ? cfgMap[i.gisbiName].aggregation : 'SUM',
|
||||||
originName: cfgMap[i.dataeaseName] ? cfgMap[i.dataeaseName].originName : '',
|
originName: cfgMap[i.gisbiName] ? cfgMap[i.gisbiName].originName : '',
|
||||||
label: cfgMap[i.dataeaseName]?.label
|
label: cfgMap[i.gisbiName]?.label
|
||||||
? cfgMap[i.dataeaseName].label
|
? cfgMap[i.gisbiName].label
|
||||||
: i.chartShowName ?? i.name
|
: i.chartShowName ?? i.name
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@ -269,7 +269,7 @@ const confirmEditCalc = () => {
|
|||||||
calcEdit.value.setFieldForm()
|
calcEdit.value.setFieldForm()
|
||||||
const obj = cloneDeep(calcEdit.value.fieldForm)
|
const obj = cloneDeep(calcEdit.value.fieldForm)
|
||||||
state.totalCfg?.forEach(item => {
|
state.totalCfg?.forEach(item => {
|
||||||
if (item.dataeaseName === obj.dataeaseName) {
|
if (item.gisbiName === obj.gisbiName) {
|
||||||
item.originName = obj.originName
|
item.originName = obj.originName
|
||||||
setFieldDefaultValue(item)
|
setFieldDefaultValue(item)
|
||||||
state.totalItem.originName = item.originName
|
state.totalItem.originName = item.originName
|
||||||
@ -352,15 +352,15 @@ onMounted(() => {
|
|||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<el-select
|
<el-select
|
||||||
:effect="themes"
|
:effect="themes"
|
||||||
v-model="state.rowTotalItem.dataeaseName"
|
v-model="state.rowTotalItem.gisbiName"
|
||||||
:placeholder="t('chart.aggregation')"
|
:placeholder="t('chart.aggregation')"
|
||||||
@change="changeTotal(state.rowTotalItem, state.tableTotalForm.row.calcTotals.cfg)"
|
@change="changeTotal(state.rowTotalItem, state.tableTotalForm.row.calcTotals.cfg)"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="option in chart.yAxis"
|
v-for="option in chart.yAxis"
|
||||||
:key="option.dataeaseName"
|
:key="option.gisbiName"
|
||||||
:label="option.name"
|
:label="option.name"
|
||||||
:value="option.dataeaseName"
|
:value="option.gisbiName"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -452,9 +452,9 @@ onMounted(() => {
|
|||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="option in chart.yAxis"
|
v-for="option in chart.yAxis"
|
||||||
:key="option.dataeaseName"
|
:key="option.gisbiName"
|
||||||
:label="option.name"
|
:label="option.name"
|
||||||
:value="option.dataeaseName"
|
:value="option.gisbiName"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -550,16 +550,16 @@ onMounted(() => {
|
|||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<el-select
|
<el-select
|
||||||
:effect="themes"
|
:effect="themes"
|
||||||
v-model="state.rowSubTotalItem.dataeaseName"
|
v-model="state.rowSubTotalItem.gisbiName"
|
||||||
:disabled="chart.xAxis.length < 2"
|
:disabled="chart.xAxis.length < 2"
|
||||||
:placeholder="t('chart.aggregation')"
|
:placeholder="t('chart.aggregation')"
|
||||||
@change="changeTotal(state.rowSubTotalItem, state.tableTotalForm.row.calcSubTotals.cfg)"
|
@change="changeTotal(state.rowSubTotalItem, state.tableTotalForm.row.calcSubTotals.cfg)"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="option in chart.yAxis"
|
v-for="option in chart.yAxis"
|
||||||
:key="option.dataeaseName"
|
:key="option.gisbiName"
|
||||||
:label="option.name"
|
:label="option.name"
|
||||||
:value="option.dataeaseName"
|
:value="option.gisbiName"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -659,15 +659,15 @@ onMounted(() => {
|
|||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<el-select
|
<el-select
|
||||||
:effect="themes"
|
:effect="themes"
|
||||||
v-model="state.colTotalItem.dataeaseName"
|
v-model="state.colTotalItem.gisbiName"
|
||||||
:placeholder="t('chart.aggregation')"
|
:placeholder="t('chart.aggregation')"
|
||||||
@change="changeTotal(state.colTotalItem, state.tableTotalForm.col.calcTotals.cfg)"
|
@change="changeTotal(state.colTotalItem, state.tableTotalForm.col.calcTotals.cfg)"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="option in chart.yAxis"
|
v-for="option in chart.yAxis"
|
||||||
:key="option.dataeaseName"
|
:key="option.gisbiName"
|
||||||
:label="option.name"
|
:label="option.name"
|
||||||
:value="option.dataeaseName"
|
:value="option.gisbiName"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -758,9 +758,9 @@ onMounted(() => {
|
|||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="option in chart.yAxis"
|
v-for="option in chart.yAxis"
|
||||||
:key="option.dataeaseName"
|
:key="option.gisbiName"
|
||||||
:label="option.name"
|
:label="option.name"
|
||||||
:value="option.dataeaseName"
|
:value="option.gisbiName"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -820,16 +820,16 @@ onMounted(() => {
|
|||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<el-select
|
<el-select
|
||||||
:effect="themes"
|
:effect="themes"
|
||||||
v-model="state.colSubTotalItem.dataeaseName"
|
v-model="state.colSubTotalItem.gisbiName"
|
||||||
:disabled="chart.xAxisExt?.length < 2"
|
:disabled="chart.xAxisExt?.length < 2"
|
||||||
:placeholder="t('chart.aggregation')"
|
:placeholder="t('chart.aggregation')"
|
||||||
@change="changeTotal(state.colSubTotalItem, state.tableTotalForm.col.calcSubTotals.cfg)"
|
@change="changeTotal(state.colSubTotalItem, state.tableTotalForm.col.calcSubTotals.cfg)"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="option in chart.yAxis"
|
v-for="option in chart.yAxis"
|
||||||
:key="option.dataeaseName"
|
:key="option.gisbiName"
|
||||||
:label="option.name"
|
:label="option.name"
|
||||||
:value="option.dataeaseName"
|
:value="option.gisbiName"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -1729,7 +1729,7 @@ const setFieldDefaultValue = field => {
|
|||||||
field.extField = 2
|
field.extField = 2
|
||||||
field.chartId = view.value.id
|
field.chartId = view.value.id
|
||||||
field.datasetGroupId = view.value.tableId
|
field.datasetGroupId = view.value.tableId
|
||||||
field.dataeaseName = null
|
field.gisbiName = null
|
||||||
field.lastSyncTime = null
|
field.lastSyncTime = null
|
||||||
field.columnIndex = state.dimension.length + state.quota.length
|
field.columnIndex = state.dimension.length + state.quota.length
|
||||||
field.deExtractType = field.deType
|
field.deExtractType = field.deType
|
||||||
|
File diff suppressed because one or more lines are too long
@ -68,22 +68,22 @@ export class StockLine extends G2PlotChartView<MixOptions, Mix> {
|
|||||||
const xAxis = chart.xAxis
|
const xAxis = chart.xAxis
|
||||||
const yAxis = chart.yAxis
|
const yAxis = chart.yAxis
|
||||||
// 时间字段
|
// 时间字段
|
||||||
const xAxisDataeaseName = xAxis[0].dataeaseName
|
const xAxisgisbiName = xAxis[0].gisbiName
|
||||||
// 收盘价字段
|
// 收盘价字段
|
||||||
const yAxisDataeaseName = yAxis[1].dataeaseName
|
const yAxisgisbiName = yAxis[1].gisbiName
|
||||||
const result = []
|
const result = []
|
||||||
for (let i = 0; i < data.length; i++) {
|
for (let i = 0; i < data.length; i++) {
|
||||||
if (i < dayCount) {
|
if (i < dayCount) {
|
||||||
result.push({
|
result.push({
|
||||||
[xAxisDataeaseName]: data[i][xAxisDataeaseName],
|
[xAxisgisbiName]: data[i][xAxisgisbiName],
|
||||||
value: null
|
value: null
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
const sum = data
|
const sum = data
|
||||||
.slice(i - dayCount + 1, i + 1)
|
.slice(i - dayCount + 1, i + 1)
|
||||||
.reduce((sum, item) => sum + item[yAxisDataeaseName], 0)
|
.reduce((sum, item) => sum + item[yAxisgisbiName], 0)
|
||||||
result.push({
|
result.push({
|
||||||
[xAxisDataeaseName]: data[i][xAxisDataeaseName],
|
[xAxisgisbiName]: data[i][xAxisgisbiName],
|
||||||
value: parseFloat((sum / dayCount).toFixed(3))
|
value: parseFloat((sum / dayCount).toFixed(3))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -228,7 +228,7 @@ export class StockLine extends G2PlotChartView<MixOptions, Mix> {
|
|||||||
const data = parseJson(chart.data?.tableRow)
|
const data = parseJson(chart.data?.tableRow)
|
||||||
|
|
||||||
// 时间字段
|
// 时间字段
|
||||||
const xAxisDataeaseName = xAxis[0].dataeaseName
|
const xAxisgisbiName = xAxis[0].gisbiName
|
||||||
const averages = [5, 10, 20, 60, 120, 180]
|
const averages = [5, 10, 20, 60, 120, 180]
|
||||||
const legendItems: any[] = [
|
const legendItems: any[] = [
|
||||||
{
|
{
|
||||||
@ -262,9 +262,9 @@ export class StockLine extends G2PlotChartView<MixOptions, Mix> {
|
|||||||
|
|
||||||
// 将均线数据设置到主数据中
|
// 将均线数据设置到主数据中
|
||||||
data.forEach((item: any) => {
|
data.forEach((item: any) => {
|
||||||
const date = item[xAxisDataeaseName]
|
const date = item[xAxisgisbiName]
|
||||||
for (const [key, value] of averagesLineData) {
|
for (const [key, value] of averagesLineData) {
|
||||||
item[key] = value.find(m => m[xAxisDataeaseName] === date)?.value
|
item[key] = value.find(m => m[xAxisgisbiName] === date)?.value
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -283,7 +283,7 @@ export class StockLine extends G2PlotChartView<MixOptions, Mix> {
|
|||||||
top: true,
|
top: true,
|
||||||
options: {
|
options: {
|
||||||
smooth: false,
|
smooth: false,
|
||||||
xField: xAxisDataeaseName,
|
xField: xAxisgisbiName,
|
||||||
yField: key,
|
yField: key,
|
||||||
color: colors[index - 1],
|
color: colors[index - 1],
|
||||||
xAxis: null,
|
xAxis: null,
|
||||||
@ -349,7 +349,7 @@ export class StockLine extends G2PlotChartView<MixOptions, Mix> {
|
|||||||
|
|
||||||
options: {
|
options: {
|
||||||
meta: {
|
meta: {
|
||||||
[xAxisDataeaseName]: {
|
[xAxisgisbiName]: {
|
||||||
mask: dateFormat
|
mask: dateFormat
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -363,12 +363,12 @@ export class StockLine extends G2PlotChartView<MixOptions, Mix> {
|
|||||||
min: minValue,
|
min: minValue,
|
||||||
max: maxValue
|
max: maxValue
|
||||||
},
|
},
|
||||||
xField: xAxisDataeaseName,
|
xField: xAxisgisbiName,
|
||||||
yField: [
|
yField: [
|
||||||
yAxis[0].dataeaseName,
|
yAxis[0].gisbiName,
|
||||||
yAxis[1].dataeaseName,
|
yAxis[1].gisbiName,
|
||||||
yAxis[2].dataeaseName,
|
yAxis[2].gisbiName,
|
||||||
yAxis[3].dataeaseName
|
yAxis[3].gisbiName
|
||||||
],
|
],
|
||||||
legend: {
|
legend: {
|
||||||
position: 'top',
|
position: 'top',
|
||||||
@ -384,7 +384,7 @@ export class StockLine extends G2PlotChartView<MixOptions, Mix> {
|
|||||||
const plot = new MixClass(container, option)
|
const plot = new MixClass(container, option)
|
||||||
this.registerEvent(data, plot, averagesLineData)
|
this.registerEvent(data, plot, averagesLineData)
|
||||||
plot.on('schema:click', evt => {
|
plot.on('schema:click', evt => {
|
||||||
const selectSchema = evt.data.data[xAxisDataeaseName]
|
const selectSchema = evt.data.data[xAxisgisbiName]
|
||||||
const paramData = parseJson(chart.data?.data)
|
const paramData = parseJson(chart.data?.data)
|
||||||
const selectData = paramData.filter(item => item.field === selectSchema)
|
const selectData = paramData.filter(item => item.field === selectSchema)
|
||||||
const quotaList = []
|
const quotaList = []
|
||||||
@ -463,7 +463,7 @@ export class StockLine extends G2PlotChartView<MixOptions, Mix> {
|
|||||||
const showFiled = chart.data.fields
|
const showFiled = chart.data.fields
|
||||||
const customTooltipItems = originalItems => {
|
const customTooltipItems = originalItems => {
|
||||||
const formattedItems = originalItems.map(item => {
|
const formattedItems = originalItems.map(item => {
|
||||||
const fieldObj = showFiled.find(q => q.dataeaseName === item.name)
|
const fieldObj = showFiled.find(q => q.gisbiName === item.name)
|
||||||
const displayName = fieldObj?.chartShowName || fieldObj?.name || item.name
|
const displayName = fieldObj?.chartShowName || fieldObj?.name || item.name
|
||||||
const formattedName = displayName.startsWith('ma') ? displayName.toUpperCase() : displayName
|
const formattedName = displayName.startsWith('ma') ? displayName.toUpperCase() : displayName
|
||||||
tooltipAttr.tooltipFormatter.decimalCount = 3
|
tooltipAttr.tooltipFormatter.decimalCount = 3
|
||||||
|
@ -143,13 +143,13 @@ export class FlowMap extends L7ChartView<Scene, L7Config> {
|
|||||||
let lineWidthField = null
|
let lineWidthField = null
|
||||||
const yAxis = deepCopy(chart.yAxis)
|
const yAxis = deepCopy(chart.yAxis)
|
||||||
if (yAxis.length > 0) {
|
if (yAxis.length > 0) {
|
||||||
lineWidthField = yAxis[0].dataeaseName
|
lineWidthField = yAxis[0].gisbiName
|
||||||
}
|
}
|
||||||
// 线条颜色
|
// 线条颜色
|
||||||
let lineColorField = null
|
let lineColorField = null
|
||||||
const yAxisExt = deepCopy(chart.yAxisExt)
|
const yAxisExt = deepCopy(chart.yAxisExt)
|
||||||
if (yAxisExt.length > 0) {
|
if (yAxisExt.length > 0) {
|
||||||
lineColorField = yAxisExt[0].dataeaseName
|
lineColorField = yAxisExt[0].gisbiName
|
||||||
}
|
}
|
||||||
const asteriskField = '*'
|
const asteriskField = '*'
|
||||||
const data = []
|
const data = []
|
||||||
@ -173,10 +173,10 @@ export class FlowMap extends L7ChartView<Scene, L7Config> {
|
|||||||
.source(data, {
|
.source(data, {
|
||||||
parser: {
|
parser: {
|
||||||
type: 'json',
|
type: 'json',
|
||||||
x: xAxis[0].dataeaseName,
|
x: xAxis[0].gisbiName,
|
||||||
y: xAxis[1].dataeaseName,
|
y: xAxis[1].gisbiName,
|
||||||
x1: xAxisExt[0].dataeaseName,
|
x1: xAxisExt[0].gisbiName,
|
||||||
y1: xAxisExt[1].dataeaseName
|
y1: xAxisExt[1].gisbiName
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.size(flowLineStyle.size)
|
.size(flowLineStyle.size)
|
||||||
@ -226,11 +226,11 @@ export class FlowMap extends L7ChartView<Scene, L7Config> {
|
|||||||
.source(chart.data?.tableRow, {
|
.source(chart.data?.tableRow, {
|
||||||
parser: {
|
parser: {
|
||||||
type: 'json',
|
type: 'json',
|
||||||
x: xAxis[0].dataeaseName,
|
x: xAxis[0].gisbiName,
|
||||||
y: xAxis[1].dataeaseName
|
y: xAxis[1].gisbiName
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.shape(flowMapStartName[0].dataeaseName, args => {
|
.shape(flowMapStartName[0].gisbiName, args => {
|
||||||
if (has.has('from-' + args)) {
|
if (has.has('from-' + args)) {
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
@ -254,11 +254,11 @@ export class FlowMap extends L7ChartView<Scene, L7Config> {
|
|||||||
.source(chart.data?.tableRow, {
|
.source(chart.data?.tableRow, {
|
||||||
parser: {
|
parser: {
|
||||||
type: 'json',
|
type: 'json',
|
||||||
x: xAxisExt[0].dataeaseName,
|
x: xAxisExt[0].gisbiName,
|
||||||
y: xAxisExt[1].dataeaseName
|
y: xAxisExt[1].gisbiName
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.shape(flowMapEndName[0].dataeaseName, args => {
|
.shape(flowMapEndName[0].gisbiName, args => {
|
||||||
if (has.has('from-' + args) || has.has('to-' + args)) {
|
if (has.has('from-' + args) || has.has('to-' + args)) {
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
@ -287,8 +287,8 @@ export class FlowMap extends L7ChartView<Scene, L7Config> {
|
|||||||
.source(chart.data?.tableRow, {
|
.source(chart.data?.tableRow, {
|
||||||
parser: {
|
parser: {
|
||||||
type: 'json',
|
type: 'json',
|
||||||
x: xAxis[0].dataeaseName,
|
x: xAxis[0].gisbiName,
|
||||||
y: xAxis[1].dataeaseName
|
y: xAxis[1].gisbiName
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.shape('circle')
|
.shape('circle')
|
||||||
@ -301,8 +301,8 @@ export class FlowMap extends L7ChartView<Scene, L7Config> {
|
|||||||
.source(chart.data?.tableRow, {
|
.source(chart.data?.tableRow, {
|
||||||
parser: {
|
parser: {
|
||||||
type: 'json',
|
type: 'json',
|
||||||
x: xAxisExt[0].dataeaseName,
|
x: xAxisExt[0].gisbiName,
|
||||||
y: xAxisExt[1].dataeaseName
|
y: xAxisExt[1].gisbiName
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.shape('circle')
|
.shape('circle')
|
||||||
|
@ -117,9 +117,9 @@ export class SymbolicMap extends L7ChartView<Scene, L7Config> {
|
|||||||
chart.data?.tableRow.length
|
chart.data?.tableRow.length
|
||||||
) {
|
) {
|
||||||
// 经度
|
// 经度
|
||||||
const lng = chart.data?.tableRow?.[0][chart.xAxis[0].dataeaseName]
|
const lng = chart.data?.tableRow?.[0][chart.xAxis[0].gisbiName]
|
||||||
// 纬度
|
// 纬度
|
||||||
const lat = chart.data?.tableRow?.[0][chart.xAxis[1].dataeaseName]
|
const lat = chart.data?.tableRow?.[0][chart.xAxis[1].gisbiName]
|
||||||
center = [lng, lat]
|
center = [lng, lat]
|
||||||
}
|
}
|
||||||
const chartObj = drawOption.chartObj as unknown as L7Wrapper<L7Config, Scene>
|
const chartObj = drawOption.chartObj as unknown as L7Wrapper<L7Config, Scene>
|
||||||
@ -161,17 +161,17 @@ export class SymbolicMap extends L7ChartView<Scene, L7Config> {
|
|||||||
const quotaList = []
|
const quotaList = []
|
||||||
chart.data.fields.forEach((item, index) => {
|
chart.data.fields.forEach((item, index) => {
|
||||||
Object.keys(data).forEach(key => {
|
Object.keys(data).forEach(key => {
|
||||||
if (key.startsWith('f_') && item.dataeaseName === key) {
|
if (key.startsWith('f_') && item.gisbiName === key) {
|
||||||
if (index === 0) {
|
if (index === 0) {
|
||||||
dimensionList.push({
|
dimensionList.push({
|
||||||
id: item.id,
|
id: item.id,
|
||||||
dataeaseName: item.dataeaseName,
|
gisbiName: item.gisbiName,
|
||||||
value: data[key]
|
value: data[key]
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
quotaList.push({
|
quotaList.push({
|
||||||
id: item.id,
|
id: item.id,
|
||||||
dataeaseName: item.dataeaseName,
|
gisbiName: item.gisbiName,
|
||||||
value: data[key]
|
value: data[key]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -219,7 +219,7 @@ export class SymbolicMap extends L7ChartView<Scene, L7Config> {
|
|||||||
let colorIndex = 0
|
let colorIndex = 0
|
||||||
// 存储已分配的颜色
|
// 存储已分配的颜色
|
||||||
const colorAssignments = new Map()
|
const colorAssignments = new Map()
|
||||||
const sizeKey = extBubble.length > 0 ? extBubble[0].dataeaseName : ''
|
const sizeKey = extBubble.length > 0 ? extBubble[0].gisbiName : ''
|
||||||
|
|
||||||
//条件颜色
|
//条件颜色
|
||||||
const { threshold } = parseJson(chart.senior)
|
const { threshold } = parseJson(chart.senior)
|
||||||
@ -237,7 +237,7 @@ export class SymbolicMap extends L7ChartView<Scene, L7Config> {
|
|||||||
? chart.data.tableRow.map((item, index) => {
|
? chart.data.tableRow.map((item, index) => {
|
||||||
item['_index'] = '_index' + index
|
item['_index'] = '_index' + index
|
||||||
// 颜色标识
|
// 颜色标识
|
||||||
const identifier = item[xAxisExt[0]?.dataeaseName]
|
const identifier = item[xAxisExt[0]?.gisbiName]
|
||||||
// 检查该标识是否已有颜色分配,如果没有则分配
|
// 检查该标识是否已有颜色分配,如果没有则分配
|
||||||
let color = colorAssignments.get(identifier)
|
let color = colorAssignments.get(identifier)
|
||||||
if (!color) {
|
if (!color) {
|
||||||
@ -251,7 +251,7 @@ export class SymbolicMap extends L7ChartView<Scene, L7Config> {
|
|||||||
if (conditions.length > 0) {
|
if (conditions.length > 0) {
|
||||||
for (let i = 0; i < conditions.length; i++) {
|
for (let i = 0; i < conditions.length; i++) {
|
||||||
const c = conditions[i]
|
const c = conditions[i]
|
||||||
const value = item[c.field.dataeaseName]
|
const value = item[c.field.gisbiName]
|
||||||
for (const t of c.conditions) {
|
for (const t of c.conditions) {
|
||||||
const v = t.value
|
const v = t.value
|
||||||
|
|
||||||
@ -312,12 +312,12 @@ export class SymbolicMap extends L7ChartView<Scene, L7Config> {
|
|||||||
.source(data, {
|
.source(data, {
|
||||||
parser: {
|
parser: {
|
||||||
type: 'json',
|
type: 'json',
|
||||||
x: xAxis[0].dataeaseName,
|
x: xAxis[0].gisbiName,
|
||||||
y: xAxis[1].dataeaseName
|
y: xAxis[1].gisbiName
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.active(true)
|
.active(true)
|
||||||
if (xAxisExt[0]?.dataeaseName) {
|
if (xAxisExt[0]?.gisbiName) {
|
||||||
if (basicStyle.mapSymbol === 'custom' && basicStyle.customIcon) {
|
if (basicStyle.mapSymbol === 'custom' && basicStyle.customIcon) {
|
||||||
// 图片无法改色
|
// 图片无法改色
|
||||||
if (basicStyle.customIcon.startsWith('data')) {
|
if (basicStyle.customIcon.startsWith('data')) {
|
||||||
@ -432,8 +432,8 @@ export class SymbolicMap extends L7ChartView<Scene, L7Config> {
|
|||||||
let showFields = tooltip.showFields || []
|
let showFields = tooltip.showFields || []
|
||||||
if (!tooltip.showFields || tooltip.showFields.length === 0) {
|
if (!tooltip.showFields || tooltip.showFields.length === 0) {
|
||||||
showFields = [
|
showFields = [
|
||||||
...chart.xAxisExt.map(i => `${i.dataeaseName}@${i.name}`),
|
...chart.xAxisExt.map(i => `${i.gisbiName}@${i.name}`),
|
||||||
...chart.xAxis.map(i => `${i.dataeaseName}@${i.name}`)
|
...chart.xAxis.map(i => `${i.gisbiName}@${i.name}`)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
// 修改背景色
|
// 修改背景色
|
||||||
@ -564,8 +564,8 @@ export class SymbolicMap extends L7ChartView<Scene, L7Config> {
|
|||||||
let showFields = label.showFields || []
|
let showFields = label.showFields || []
|
||||||
if (!label.showFields || label.showFields.length === 0) {
|
if (!label.showFields || label.showFields.length === 0) {
|
||||||
showFields = [
|
showFields = [
|
||||||
...chart.xAxisExt.map(i => `${i.dataeaseName}@${i.name}`),
|
...chart.xAxisExt.map(i => `${i.gisbiName}@${i.name}`),
|
||||||
...chart.xAxis.map(i => `${i.dataeaseName}@${i.name}`)
|
...chart.xAxis.map(i => `${i.gisbiName}@${i.name}`)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
data.forEach(item => {
|
data.forEach(item => {
|
||||||
@ -593,8 +593,8 @@ export class SymbolicMap extends L7ChartView<Scene, L7Config> {
|
|||||||
.source(data, {
|
.source(data, {
|
||||||
parser: {
|
parser: {
|
||||||
type: 'json',
|
type: 'json',
|
||||||
x: xAxis[0].dataeaseName,
|
x: xAxis[0].gisbiName,
|
||||||
y: xAxis[1].dataeaseName
|
y: xAxis[1].gisbiName
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.shape('textLayerContent', 'text')
|
.shape('textLayerContent', 'text')
|
||||||
|
@ -469,8 +469,8 @@ export class CarouselManager {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
if (this.chart.type === 'symbolic-map') {
|
if (this.chart.type === 'symbolic-map') {
|
||||||
const lngField = this.chart.xAxis[0].dataeaseName
|
const lngField = this.chart.xAxis[0].gisbiName
|
||||||
const latField = this.chart.xAxis[1].dataeaseName
|
const latField = this.chart.xAxis[1].gisbiName
|
||||||
const { _id } = this.scene
|
const { _id } = this.scene
|
||||||
?.getLayers()
|
?.getLayers()
|
||||||
?.find(i => i.type === 'PointLayer')
|
?.find(i => i.type === 'PointLayer')
|
||||||
@ -554,8 +554,8 @@ export class CarouselManager {
|
|||||||
let showFields = tooltip.showFields || []
|
let showFields = tooltip.showFields || []
|
||||||
if (!tooltip.showFields || tooltip.showFields.length === 0) {
|
if (!tooltip.showFields || tooltip.showFields.length === 0) {
|
||||||
showFields = [
|
showFields = [
|
||||||
...this.chart.xAxisExt.map(i => `${i.dataeaseName}@${i.name}`),
|
...this.chart.xAxisExt.map(i => `${i.gisbiName}@${i.name}`),
|
||||||
...this.chart.xAxis.map(i => `${i.dataeaseName}@${i.name}`)
|
...this.chart.xAxis.map(i => `${i.gisbiName}@${i.name}`)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
const style = document.createElement('style')
|
const style = document.createElement('style')
|
||||||
@ -571,8 +571,8 @@ export class CarouselManager {
|
|||||||
}
|
}
|
||||||
`
|
`
|
||||||
document.head.appendChild(style)
|
document.head.appendChild(style)
|
||||||
const lngField = this.chart.xAxis[0].dataeaseName
|
const lngField = this.chart.xAxis[0].gisbiName
|
||||||
const latField = this.chart.xAxis[1].dataeaseName
|
const latField = this.chart.xAxis[1].gisbiName
|
||||||
const htmlPrefix = `<div style='font-size:${tooltip.fontSize}px;color:${tooltip.color};'>`
|
const htmlPrefix = `<div style='font-size:${tooltip.fontSize}px;color:${tooltip.color};'>`
|
||||||
const htmlSuffix = '</div>'
|
const htmlSuffix = '</div>'
|
||||||
const data = this.view.sourceOption.data[index]
|
const data = this.view.sourceOption.data[index]
|
||||||
|
@ -119,9 +119,9 @@ export class TableHeatmap extends G2PlotChartView<HeatmapOptions, Heatmap> {
|
|||||||
if (!xAxis?.length || !xAxisExt?.length || !extColor?.length) {
|
if (!xAxis?.length || !xAxisExt?.length || !extColor?.length) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const xField = xAxis[0].dataeaseName
|
const xField = xAxis[0].gisbiName
|
||||||
const xFieldExt = xAxisExt[0].dataeaseName
|
const xFieldExt = xAxisExt[0].gisbiName
|
||||||
const extColorField = extColor[0].dataeaseName
|
const extColorField = extColor[0].gisbiName
|
||||||
// data
|
// data
|
||||||
const tmpData = cloneDeep(chart.data.tableRow)
|
const tmpData = cloneDeep(chart.data.tableRow)
|
||||||
const data = tmpData.filter(cell => cell[xField] && cell[xFieldExt] && cell[extColorField])
|
const data = tmpData.filter(cell => cell[xField] && cell[xFieldExt] && cell[extColorField])
|
||||||
@ -172,10 +172,10 @@ export class TableHeatmap extends G2PlotChartView<HeatmapOptions, Heatmap> {
|
|||||||
const dimensionList = []
|
const dimensionList = []
|
||||||
chart.data.fields.forEach(item => {
|
chart.data.fields.forEach(item => {
|
||||||
Object.keys(pointData).forEach(key => {
|
Object.keys(pointData).forEach(key => {
|
||||||
if (key.startsWith('f_') && item.dataeaseName === key) {
|
if (key.startsWith('f_') && item.gisbiName === key) {
|
||||||
dimensionList.push({
|
dimensionList.push({
|
||||||
id: item.id,
|
id: item.id,
|
||||||
dataeaseName: item.dataeaseName,
|
gisbiName: item.gisbiName,
|
||||||
value: pointData[key]
|
value: pointData[key]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -198,7 +198,7 @@ export class TableHeatmap extends G2PlotChartView<HeatmapOptions, Heatmap> {
|
|||||||
newChart.on('afterrender', ev => {
|
newChart.on('afterrender', ev => {
|
||||||
const l = JSON.parse(JSON.stringify(parseJson(chart.customStyle).legend))
|
const l = JSON.parse(JSON.stringify(parseJson(chart.customStyle).legend))
|
||||||
if (l.show) {
|
if (l.show) {
|
||||||
const rail = ev.view.getController('legend').option[extColor[0].dataeaseName]?.['rail']
|
const rail = ev.view.getController('legend').option[extColor[0].gisbiName]?.['rail']
|
||||||
if (rail) {
|
if (rail) {
|
||||||
rail.defaultLength = this.getDefaultLength(chart, l)
|
rail.defaultLength = this.getDefaultLength(chart, l)
|
||||||
}
|
}
|
||||||
@ -242,7 +242,7 @@ export class TableHeatmap extends G2PlotChartView<HeatmapOptions, Heatmap> {
|
|||||||
const items = []
|
const items = []
|
||||||
const createItem = (fieldObj, items, originalItems) => {
|
const createItem = (fieldObj, items, originalItems) => {
|
||||||
const name = fieldObj?.chartShowName ? fieldObj?.chartShowName : fieldObj?.name
|
const name = fieldObj?.chartShowName ? fieldObj?.chartShowName : fieldObj?.name
|
||||||
let value = originalItems[0].data[fieldObj.dataeaseName]
|
let value = originalItems[0].data[fieldObj.gisbiName]
|
||||||
if (!isNaN(Number(value))) {
|
if (!isNaN(Number(value))) {
|
||||||
value = valueFormatter(value, fieldObj?.formatterCfg)
|
value = valueFormatter(value, fieldObj?.formatterCfg)
|
||||||
}
|
}
|
||||||
@ -336,7 +336,7 @@ export class TableHeatmap extends G2PlotChartView<HeatmapOptions, Heatmap> {
|
|||||||
position: 'middle',
|
position: 'middle',
|
||||||
layout,
|
layout,
|
||||||
formatter: data => {
|
formatter: data => {
|
||||||
const value = data[extColor[0]?.dataeaseName]
|
const value = data[extColor[0]?.gisbiName]
|
||||||
if (!isNaN(Number(value))) {
|
if (!isNaN(Number(value))) {
|
||||||
return valueFormatter(value, extColor[0]?.formatterCfg)
|
return valueFormatter(value, extColor[0]?.formatterCfg)
|
||||||
}
|
}
|
||||||
|
@ -84,7 +84,7 @@ export class TableInfo extends S2ChartView<TableSheet> {
|
|||||||
const columns = []
|
const columns = []
|
||||||
const meta = []
|
const meta = []
|
||||||
const axisMap = chart.xAxis.reduce((pre, cur) => {
|
const axisMap = chart.xAxis.reduce((pre, cur) => {
|
||||||
pre[cur.dataeaseName] = cur
|
pre[cur.gisbiName] = cur
|
||||||
return pre
|
return pre
|
||||||
}, {})
|
}, {})
|
||||||
const drillFieldMap = {}
|
const drillFieldMap = {}
|
||||||
@ -102,17 +102,17 @@ export class TableInfo extends S2ChartView<TableSheet> {
|
|||||||
fields = fields.filter(ele => {
|
fields = fields.filter(ele => {
|
||||||
return !filterFields.includes(ele.id)
|
return !filterFields.includes(ele.id)
|
||||||
})
|
})
|
||||||
drillFieldMap[curDrillField.dataeaseName] = chart.drillFields[0].dataeaseName
|
drillFieldMap[curDrillField.gisbiName] = chart.drillFields[0].gisbiName
|
||||||
fields.splice(drillFieldIndex, 0, curDrillField)
|
fields.splice(drillFieldIndex, 0, curDrillField)
|
||||||
}
|
}
|
||||||
fields.forEach(ele => {
|
fields.forEach(ele => {
|
||||||
const f = axisMap[ele.dataeaseName]
|
const f = axisMap[ele.gisbiName]
|
||||||
if (f?.hide === true) {
|
if (f?.hide === true) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
columns.push(ele.dataeaseName)
|
columns.push(ele.gisbiName)
|
||||||
meta.push({
|
meta.push({
|
||||||
field: ele.dataeaseName,
|
field: ele.gisbiName,
|
||||||
name: ele.chartShowName ?? ele.name,
|
name: ele.chartShowName ?? ele.name,
|
||||||
formatter: function (value) {
|
formatter: function (value) {
|
||||||
if (!f) {
|
if (!f) {
|
||||||
@ -185,7 +185,7 @@ export class TableInfo extends S2ChartView<TableSheet> {
|
|||||||
// 自适应列宽模式下,URL 字段的宽度固定为 120
|
// 自适应列宽模式下,URL 字段的宽度固定为 120
|
||||||
if (basicStyle.tableColumnMode === 'adapt') {
|
if (basicStyle.tableColumnMode === 'adapt') {
|
||||||
const urlFields = fields.filter(
|
const urlFields = fields.filter(
|
||||||
field => field.deType === 7 && !axisMap[field.dataeaseName]?.hide
|
field => field.deType === 7 && !axisMap[field.gisbiName]?.hide
|
||||||
)
|
)
|
||||||
s2Options.style.colCfg.widthByFieldValue = urlFields?.reduce((p, n) => {
|
s2Options.style.colCfg.widthByFieldValue = urlFields?.reduce((p, n) => {
|
||||||
p[n.chartShowName ?? n.name] = 120
|
p[n.chartShowName ?? n.name] = 120
|
||||||
@ -290,8 +290,8 @@ export class TableInfo extends S2ChartView<TableSheet> {
|
|||||||
}
|
}
|
||||||
// 第一次渲染初始化,把图片字段固定为 120 进行计算
|
// 第一次渲染初始化,把图片字段固定为 120 进行计算
|
||||||
const urlFields = fields
|
const urlFields = fields
|
||||||
.filter(field => field.deType === 7 && !axisMap[field.dataeaseName]?.hide)
|
.filter(field => field.deType === 7 && !axisMap[field.gisbiName]?.hide)
|
||||||
.map(f => f.dataeaseName)
|
.map(f => f.gisbiName)
|
||||||
const totalWidthWithImg = ev.colLeafNodes.reduce((p, n) => {
|
const totalWidthWithImg = ev.colLeafNodes.reduce((p, n) => {
|
||||||
return p + (urlFields.includes(n.field) ? 120 : n.width)
|
return p + (urlFields.includes(n.field) ? 120 : n.width)
|
||||||
}, 0)
|
}, 0)
|
||||||
@ -336,7 +336,7 @@ export class TableInfo extends S2ChartView<TableSheet> {
|
|||||||
const cell = newChart.getCell(ev.target)
|
const cell = newChart.getCell(ev.target)
|
||||||
const meta = cell.getMeta() as ViewMeta
|
const meta = cell.getMeta() as ViewMeta
|
||||||
const nameIdMap = fields.reduce((pre, next) => {
|
const nameIdMap = fields.reduce((pre, next) => {
|
||||||
pre[next['dataeaseName']] = next['id']
|
pre[next['gisbiName']] = next['id']
|
||||||
return pre
|
return pre
|
||||||
}, {})
|
}, {})
|
||||||
|
|
||||||
@ -493,7 +493,7 @@ export class TableInfo extends S2ChartView<TableSheet> {
|
|||||||
}
|
}
|
||||||
return new SummaryCell(viewMeta, viewMeta?.spreadsheet)
|
return new SummaryCell(viewMeta, viewMeta?.spreadsheet)
|
||||||
}
|
}
|
||||||
const field = fields.find(f => f.dataeaseName === viewMeta.valueField)
|
const field = fields.find(f => f.gisbiName === viewMeta.valueField)
|
||||||
if (field?.deType === 7 && chart.showPosition !== 'dialog') {
|
if (field?.deType === 7 && chart.showPosition !== 'dialog') {
|
||||||
return new ImageCell(viewMeta, viewMeta?.spreadsheet)
|
return new ImageCell(viewMeta, viewMeta?.spreadsheet)
|
||||||
}
|
}
|
||||||
|
@ -93,18 +93,18 @@ export class TableNormal extends S2ChartView<TableSheet> {
|
|||||||
fields.splice(drillFieldIndex, 0, ...curDrillField)
|
fields.splice(drillFieldIndex, 0, ...curDrillField)
|
||||||
}
|
}
|
||||||
const axisMap = [...chart.xAxis, ...chart.yAxis].reduce((pre, cur) => {
|
const axisMap = [...chart.xAxis, ...chart.yAxis].reduce((pre, cur) => {
|
||||||
pre[cur.dataeaseName] = cur
|
pre[cur.gisbiName] = cur
|
||||||
return pre
|
return pre
|
||||||
}, {})
|
}, {})
|
||||||
// add drill list
|
// add drill list
|
||||||
fields.forEach(ele => {
|
fields.forEach(ele => {
|
||||||
const f = axisMap[ele.dataeaseName]
|
const f = axisMap[ele.gisbiName]
|
||||||
if (f?.hide === true) {
|
if (f?.hide === true) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
columns.push(ele.dataeaseName)
|
columns.push(ele.gisbiName)
|
||||||
meta.push({
|
meta.push({
|
||||||
field: ele.dataeaseName,
|
field: ele.gisbiName,
|
||||||
name: ele.chartShowName ?? ele.name,
|
name: ele.chartShowName ?? ele.name,
|
||||||
formatter: function (value) {
|
formatter: function (value) {
|
||||||
if (!f) {
|
if (!f) {
|
||||||
@ -240,7 +240,7 @@ export class TableNormal extends S2ChartView<TableSheet> {
|
|||||||
const cell = newChart.getCell(ev.target)
|
const cell = newChart.getCell(ev.target)
|
||||||
const meta = cell.getMeta() as ViewMeta
|
const meta = cell.getMeta() as ViewMeta
|
||||||
const nameIdMap = fields.reduce((pre, next) => {
|
const nameIdMap = fields.reduce((pre, next) => {
|
||||||
pre[next['dataeaseName']] = next['id']
|
pre[next['gisbiName']] = next['id']
|
||||||
return pre
|
return pre
|
||||||
}, {})
|
}, {})
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ export class TablePivot extends S2ChartView<PivotSheet> {
|
|||||||
|
|
||||||
const { xAxisExt: columnFields, xAxis: rowFields, yAxis: valueFields } = chart
|
const { xAxisExt: columnFields, xAxis: rowFields, yAxis: valueFields } = chart
|
||||||
const [c, r, v] = [columnFields, rowFields, valueFields].map(arr =>
|
const [c, r, v] = [columnFields, rowFields, valueFields].map(arr =>
|
||||||
arr.map(i => i.dataeaseName)
|
arr.map(i => i.gisbiName)
|
||||||
)
|
)
|
||||||
|
|
||||||
// fields
|
// fields
|
||||||
@ -150,14 +150,14 @@ export class TablePivot extends S2ChartView<PivotSheet> {
|
|||||||
...chart.xAxisExt,
|
...chart.xAxisExt,
|
||||||
...chart.yAxis
|
...chart.yAxis
|
||||||
].reduce((p, n) => {
|
].reduce((p, n) => {
|
||||||
p[n.dataeaseName] = n
|
p[n.gisbiName] = n
|
||||||
return p
|
return p
|
||||||
}, {})
|
}, {})
|
||||||
fields.forEach(ele => {
|
fields.forEach(ele => {
|
||||||
const f = valueFieldMap[ele.dataeaseName]
|
const f = valueFieldMap[ele.gisbiName]
|
||||||
columns.push(ele.dataeaseName)
|
columns.push(ele.gisbiName)
|
||||||
meta.push({
|
meta.push({
|
||||||
field: ele.dataeaseName,
|
field: ele.gisbiName,
|
||||||
name: ele.chartShowName ?? ele.name,
|
name: ele.chartShowName ?? ele.name,
|
||||||
formatter: value => {
|
formatter: value => {
|
||||||
if (!f) {
|
if (!f) {
|
||||||
@ -238,7 +238,7 @@ export class TablePivot extends S2ChartView<PivotSheet> {
|
|||||||
sortMethod: sortField.sort.toUpperCase(),
|
sortMethod: sortField.sort.toUpperCase(),
|
||||||
sortByMeasure: TOTAL_VALUE,
|
sortByMeasure: TOTAL_VALUE,
|
||||||
query: {
|
query: {
|
||||||
[EXTRA_FIELD]: sortField.dataeaseName
|
[EXTRA_FIELD]: sortField.gisbiName
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sortParams.push(sort)
|
sortParams.push(sort)
|
||||||
@ -264,7 +264,7 @@ export class TablePivot extends S2ChartView<PivotSheet> {
|
|||||||
if (!tableTotal.col.calcTotals.cfg?.length) {
|
if (!tableTotal.col.calcTotals.cfg?.length) {
|
||||||
tableTotal.col.calcTotals.cfg = chart.yAxis.map(y => {
|
tableTotal.col.calcTotals.cfg = chart.yAxis.map(y => {
|
||||||
return {
|
return {
|
||||||
dataeaseName: y.dataeaseName,
|
gisbiName: y.gisbiName,
|
||||||
aggregation: 'SUM'
|
aggregation: 'SUM'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -278,7 +278,7 @@ export class TablePivot extends S2ChartView<PivotSheet> {
|
|||||||
if (total.cfg?.length) {
|
if (total.cfg?.length) {
|
||||||
delete total.aggregation
|
delete total.aggregation
|
||||||
const totalCfgMap = total.cfg.reduce((p, n) => {
|
const totalCfgMap = total.cfg.reduce((p, n) => {
|
||||||
p[n.dataeaseName] = n
|
p[n.gisbiName] = n
|
||||||
return p
|
return p
|
||||||
}, {})
|
}, {})
|
||||||
total.calcFunc = (query, data, _, status) => {
|
total.calcFunc = (query, data, _, status) => {
|
||||||
@ -428,7 +428,7 @@ export class TablePivot extends S2ChartView<PivotSheet> {
|
|||||||
tableTotal.col.calcTotals?.cfg?.length
|
tableTotal.col.calcTotals?.cfg?.length
|
||||||
) {
|
) {
|
||||||
const colTotalCfgMap = tableTotal.col.calcTotals.cfg.reduce((p, n) => {
|
const colTotalCfgMap = tableTotal.col.calcTotals.cfg.reduce((p, n) => {
|
||||||
p[n.dataeaseName] = n
|
p[n.gisbiName] = n
|
||||||
return p
|
return p
|
||||||
}, {})
|
}, {})
|
||||||
s2Options.layoutCoordinate = (_, __, col) => {
|
s2Options.layoutCoordinate = (_, __, col) => {
|
||||||
@ -447,7 +447,7 @@ export class TablePivot extends S2ChartView<PivotSheet> {
|
|||||||
tableTotal.row.calcTotals?.cfg?.length
|
tableTotal.row.calcTotals?.cfg?.length
|
||||||
) {
|
) {
|
||||||
const rowTotalCfgMap = tableTotal.row.calcTotals.cfg.reduce((p, n) => {
|
const rowTotalCfgMap = tableTotal.row.calcTotals.cfg.reduce((p, n) => {
|
||||||
p[n.dataeaseName] = n
|
p[n.gisbiName] = n
|
||||||
return p
|
return p
|
||||||
}, {})
|
}, {})
|
||||||
// eslint-disable-next-line
|
// eslint-disable-next-line
|
||||||
@ -630,7 +630,7 @@ export class TablePivot extends S2ChartView<PivotSheet> {
|
|||||||
const cell = s2Instance.getCell(ev.target)
|
const cell = s2Instance.getCell(ev.target)
|
||||||
const meta = cell.getMeta()
|
const meta = cell.getMeta()
|
||||||
const nameIdMap = chart.data.fields.reduce((pre, next) => {
|
const nameIdMap = chart.data.fields.reduce((pre, next) => {
|
||||||
pre[next['dataeaseName']] = next['id']
|
pre[next['gisbiName']] = next['id']
|
||||||
return pre
|
return pre
|
||||||
}, {})
|
}, {})
|
||||||
const rowData = { ...meta.rowQuery, ...meta.colQuery }
|
const rowData = { ...meta.rowQuery, ...meta.colQuery }
|
||||||
@ -658,7 +658,7 @@ export class TablePivot extends S2ChartView<PivotSheet> {
|
|||||||
const meta = cell.getMeta()
|
const meta = cell.getMeta()
|
||||||
const rowData = meta.query
|
const rowData = meta.query
|
||||||
const nameIdMap = chart.data.fields.reduce((pre, next) => {
|
const nameIdMap = chart.data.fields.reduce((pre, next) => {
|
||||||
pre[next['dataeaseName']] = next['id']
|
pre[next['gisbiName']] = next['id']
|
||||||
return pre
|
return pre
|
||||||
}, {})
|
}, {})
|
||||||
const dimensionList = []
|
const dimensionList = []
|
||||||
@ -1106,7 +1106,7 @@ function getCustomCalcResult(query, axisMap, chart: ChartObj, status: TotalStatu
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getSubLevel(query, axis) {
|
function getSubLevel(query, axis) {
|
||||||
const fields: [] = axis.map(a => a.dataeaseName)
|
const fields: [] = axis.map(a => a.gisbiName)
|
||||||
let subLevel = -1
|
let subLevel = -1
|
||||||
const queryFields = keys(query)
|
const queryFields = keys(query)
|
||||||
for (let i = fields.length - 1; i >= 0; i--) {
|
for (let i = fields.length - 1; i >= 0; i--) {
|
||||||
@ -1123,9 +1123,9 @@ function getTreePath(query, axis) {
|
|||||||
const path = []
|
const path = []
|
||||||
const fields = keys(query)
|
const fields = keys(query)
|
||||||
axis.forEach(a => {
|
axis.forEach(a => {
|
||||||
const index = fields.findIndex(f => f === a.dataeaseName)
|
const index = fields.findIndex(f => f === a.gisbiName)
|
||||||
if (index !== -1) {
|
if (index !== -1) {
|
||||||
path.push(query[a.dataeaseName])
|
path.push(query[a.gisbiName])
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
return path
|
return path
|
||||||
|
@ -1334,19 +1334,19 @@ export function configL7Zoom(
|
|||||||
const endAxis = chart.xAxisExt
|
const endAxis = chart.xAxisExt
|
||||||
if (startAxis?.length === 2) {
|
if (startAxis?.length === 2) {
|
||||||
chart.data?.tableRow?.forEach(row => {
|
chart.data?.tableRow?.forEach(row => {
|
||||||
coordinates.push([row[startAxis[0].dataeaseName], row[startAxis[1].dataeaseName]])
|
coordinates.push([row[startAxis[0].gisbiName], row[startAxis[1].gisbiName]])
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if (endAxis?.length === 2) {
|
if (endAxis?.length === 2) {
|
||||||
chart.data?.tableRow?.forEach(row => {
|
chart.data?.tableRow?.forEach(row => {
|
||||||
coordinates.push([row[endAxis[0].dataeaseName], row[endAxis[1].dataeaseName]])
|
coordinates.push([row[endAxis[0].gisbiName], row[endAxis[1].gisbiName]])
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const axis = chart.xAxis
|
const axis = chart.xAxis
|
||||||
if (axis?.length === 2) {
|
if (axis?.length === 2) {
|
||||||
chart.data?.tableRow?.forEach(row => {
|
chart.data?.tableRow?.forEach(row => {
|
||||||
coordinates.push([row[axis[0].dataeaseName], row[axis[1].dataeaseName]])
|
coordinates.push([row[axis[0].gisbiName], row[axis[1].gisbiName]])
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -523,8 +523,8 @@ export function getStyle(chart: Chart, dataConfig: S2DataConfig): Style {
|
|||||||
item => item.id === chart.drillFilters[0].fieldId
|
item => item.id === chart.drillFilters[0].fieldId
|
||||||
)
|
)
|
||||||
const drillEnterField = xAxis[drillEnterFieldIndex]
|
const drillEnterField = xAxis[drillEnterFieldIndex]
|
||||||
fieldMap[curDrillField.dataeaseName] = {
|
fieldMap[curDrillField.gisbiName] = {
|
||||||
width: fieldMap[drillEnterField.dataeaseName]?.width
|
width: fieldMap[drillEnterField.gisbiName]?.width
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 铺满
|
// 铺满
|
||||||
@ -598,7 +598,7 @@ export function getCurrentField(valueFieldList: Axis[], field: ChartViewField) {
|
|||||||
if (list) {
|
if (list) {
|
||||||
for (let i = 0; i < list.length; i++) {
|
for (let i = 0; i < list.length; i++) {
|
||||||
const f = list[i]
|
const f = list[i]
|
||||||
if (field.dataeaseName === f.dataeaseName) {
|
if (field.gisbiName === f.gisbiName) {
|
||||||
res = f
|
res = f
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@ -619,7 +619,7 @@ export function getConditions(chart: Chart) {
|
|||||||
}
|
}
|
||||||
const conditions = threshold.tableThreshold ?? []
|
const conditions = threshold.tableThreshold ?? []
|
||||||
|
|
||||||
const dimFields = [...chart.xAxis, ...chart.xAxisExt].map(i => i.dataeaseName)
|
const dimFields = [...chart.xAxis, ...chart.xAxisExt].map(i => i.gisbiName)
|
||||||
if (conditions?.length > 0) {
|
if (conditions?.length > 0) {
|
||||||
const { tableCell, basicStyle, tableHeader } = parseJson(chart.customAttr)
|
const { tableCell, basicStyle, tableHeader } = parseJson(chart.customAttr)
|
||||||
// 合并单元格时斑马纹失效
|
// 合并单元格时斑马纹失效
|
||||||
@ -645,12 +645,12 @@ export function getConditions(chart: Chart) {
|
|||||||
let defaultValueColor = valueColor
|
let defaultValueColor = valueColor
|
||||||
let defaultBgColor = valueBgColor
|
let defaultBgColor = valueBgColor
|
||||||
// 透视表表头颜色配置
|
// 透视表表头颜色配置
|
||||||
if (chart.type === 'table-pivot' && dimFields.includes(field.field.dataeaseName)) {
|
if (chart.type === 'table-pivot' && dimFields.includes(field.field.gisbiName)) {
|
||||||
defaultValueColor = headerValueColor
|
defaultValueColor = headerValueColor
|
||||||
defaultBgColor = headerValueBgColor
|
defaultBgColor = headerValueBgColor
|
||||||
}
|
}
|
||||||
res.text.push({
|
res.text.push({
|
||||||
field: field.field.dataeaseName,
|
field: field.field.gisbiName,
|
||||||
mapping(value, rowData) {
|
mapping(value, rowData) {
|
||||||
// 总计小计
|
// 总计小计
|
||||||
if (rowData?.isTotals) {
|
if (rowData?.isTotals) {
|
||||||
@ -666,7 +666,7 @@ export function getConditions(chart: Chart) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
res.background.push({
|
res.background.push({
|
||||||
field: field.field.dataeaseName,
|
field: field.field.gisbiName,
|
||||||
mapping(value, rowData) {
|
mapping(value, rowData) {
|
||||||
if (rowData?.isTotals) {
|
if (rowData?.isTotals) {
|
||||||
return null
|
return null
|
||||||
@ -864,7 +864,7 @@ function getFieldValueMap(view) {
|
|||||||
|
|
||||||
function getValue(field, filedValueMap, rowData) {
|
function getValue(field, filedValueMap, rowData) {
|
||||||
if (field.summary === 'value') {
|
if (field.summary === 'value') {
|
||||||
return rowData ? rowData[field.field?.dataeaseName] : undefined
|
return rowData ? rowData[field.field?.gisbiName] : undefined
|
||||||
} else {
|
} else {
|
||||||
return filedValueMap[field.summary + '-' + field.fieldId]
|
return filedValueMap[field.summary + '-' + field.fieldId]
|
||||||
}
|
}
|
||||||
@ -1844,7 +1844,7 @@ export function configMergeCells(chart: Chart, options: S2Options, dataConfig: S
|
|||||||
const fields = chart.data.fields || []
|
const fields = chart.data.fields || []
|
||||||
const fieldsMap =
|
const fieldsMap =
|
||||||
fields.reduce((p, n) => {
|
fields.reduce((p, n) => {
|
||||||
p[n.dataeaseName] = n
|
p[n.gisbiName] = n
|
||||||
return p
|
return p
|
||||||
}, {}) || {}
|
}, {}) || {}
|
||||||
const quotaIndex = dataConfig.meta.findIndex(m => fieldsMap[m.field]?.groupType === 'q')
|
const quotaIndex = dataConfig.meta.findIndex(m => fieldsMap[m.field]?.groupType === 'q')
|
||||||
@ -2201,7 +2201,7 @@ const getWrapTextHeight = (wrapText, textStyle, spreadsheet, maxLines) => {
|
|||||||
export function getSummaryRow(data, axis, sumCon = []) {
|
export function getSummaryRow(data, axis, sumCon = []) {
|
||||||
const summaryObj = { SUMMARY: true }
|
const summaryObj = { SUMMARY: true }
|
||||||
for (let i = 0; i < axis.length; i++) {
|
for (let i = 0; i < axis.length; i++) {
|
||||||
const a = axis[i].dataeaseName
|
const a = axis[i].gisbiName
|
||||||
let savedAxis = find(sumCon, s => s.field === a)
|
let savedAxis = find(sumCon, s => s.field === a)
|
||||||
if (savedAxis) {
|
if (savedAxis) {
|
||||||
if (savedAxis.summary == undefined) {
|
if (savedAxis.summary == undefined) {
|
||||||
|
@ -514,7 +514,7 @@ const getExcelDownloadRequest = (data, type?) => {
|
|||||||
const tableRow = JSON.parse(JSON.stringify(data.tableRow))
|
const tableRow = JSON.parse(JSON.stringify(data.tableRow))
|
||||||
const excelHeader = fields.map(item => item.chartShowName ?? item.name)
|
const excelHeader = fields.map(item => item.chartShowName ?? item.name)
|
||||||
const excelTypes = fields.map(item => item.deType)
|
const excelTypes = fields.map(item => item.deType)
|
||||||
const excelHeaderKeys = fields.map(item => item.dataeaseName)
|
const excelHeaderKeys = fields.map(item => item.gisbiName)
|
||||||
let excelData = tableRow.map(item => excelHeaderKeys.map(i => item[i]))
|
let excelData = tableRow.map(item => excelHeaderKeys.map(i => item[i]))
|
||||||
let detailFields = []
|
let detailFields = []
|
||||||
if (data.detailFields?.length) {
|
if (data.detailFields?.length) {
|
||||||
@ -522,7 +522,7 @@ const getExcelDownloadRequest = (data, type?) => {
|
|||||||
return {
|
return {
|
||||||
name: item.name,
|
name: item.name,
|
||||||
deType: item.deType,
|
deType: item.deType,
|
||||||
dataeaseName: item.dataeaseName
|
gisbiName: item.gisbiName
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
excelData = tableRow.map(item => {
|
excelData = tableRow.map(item => {
|
||||||
@ -530,7 +530,7 @@ const getExcelDownloadRequest = (data, type?) => {
|
|||||||
if (i === 'detail' && !item[i] && Array.isArray(item['details'])) {
|
if (i === 'detail' && !item[i] && Array.isArray(item['details'])) {
|
||||||
const arr = item['details']
|
const arr = item['details']
|
||||||
if (arr?.length) {
|
if (arr?.length) {
|
||||||
return arr.map(ele => detailFields.map(field => ele[field.dataeaseName]))
|
return arr.map(ele => detailFields.map(field => ele[field.gisbiName]))
|
||||||
}
|
}
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ export interface CalcFieldType {
|
|||||||
datasetGroupId?: string // 有就传,没有null
|
datasetGroupId?: string // 有就传,没有null
|
||||||
originName: string // 物理字段名
|
originName: string // 物理字段名
|
||||||
name: string // 字段显示名
|
name: string // 字段显示名
|
||||||
dataeaseName?: string // 字段别名
|
gisbiName?: string // 字段别名
|
||||||
groupType: 'd' | 'q' // d=维度,q=指标
|
groupType: 'd' | 'q' // d=维度,q=指标
|
||||||
type: string
|
type: string
|
||||||
params?: Array<{ id: string; name: string; value: number }>
|
params?: Array<{ id: string; name: string; value: number }>
|
||||||
|
@ -77,7 +77,7 @@ interface DragEvent extends MouseEvent {
|
|||||||
interface Field {
|
interface Field {
|
||||||
fieldShortName: string
|
fieldShortName: string
|
||||||
name: string
|
name: string
|
||||||
dataeaseName: string
|
gisbiName: string
|
||||||
originName: string
|
originName: string
|
||||||
deType: number
|
deType: number
|
||||||
}
|
}
|
||||||
@ -462,7 +462,7 @@ const copyField = item => {
|
|||||||
param.extField = 2
|
param.extField = 2
|
||||||
param.originName = item.extField === 2 ? item.originName : '[' + item.id + ']'
|
param.originName = item.extField === 2 ? item.originName : '[' + item.id + ']'
|
||||||
param.name = getFieldName(dimensions.value.concat(quota.value), item.name)
|
param.name = getFieldName(dimensions.value.concat(quota.value), item.name)
|
||||||
param.dataeaseName = null
|
param.gisbiName = null
|
||||||
param.lastSyncTime = null
|
param.lastSyncTime = null
|
||||||
const index = allfields.value.findIndex(ele => ele.id === item.id)
|
const index = allfields.value.findIndex(ele => ele.id === item.id)
|
||||||
allfields.value.splice(index + 1, 0, param)
|
allfields.value.splice(index + 1, 0, param)
|
||||||
@ -657,9 +657,9 @@ const confirmEditCalc = () => {
|
|||||||
|
|
||||||
const generateColumns = (arr: Field[]) =>
|
const generateColumns = (arr: Field[]) =>
|
||||||
arr.map(ele => ({
|
arr.map(ele => ({
|
||||||
key: ele.dataeaseName,
|
key: ele.gisbiName,
|
||||||
deType: ele.deType,
|
deType: ele.deType,
|
||||||
dataKey: ele.dataeaseName,
|
dataKey: ele.gisbiName,
|
||||||
title: ele.name,
|
title: ele.name,
|
||||||
width: 150,
|
width: 150,
|
||||||
headerCellRenderer: ({ column }) => (
|
headerCellRenderer: ({ column }) => (
|
||||||
|
@ -89,7 +89,7 @@ const { wsCache } = useCache()
|
|||||||
interface Field {
|
interface Field {
|
||||||
fieldShortName: string
|
fieldShortName: string
|
||||||
name: string
|
name: string
|
||||||
dataeaseName: string
|
gisbiName: string
|
||||||
originName: string
|
originName: string
|
||||||
deType: number
|
deType: number
|
||||||
}
|
}
|
||||||
@ -269,9 +269,9 @@ const { handleDrop, allowDrop, handleDragStart } = treeDraggble(
|
|||||||
|
|
||||||
const generateColumns = (arr: Field[]) =>
|
const generateColumns = (arr: Field[]) =>
|
||||||
arr.map(ele => ({
|
arr.map(ele => ({
|
||||||
key: ele.dataeaseName,
|
key: ele.gisbiName,
|
||||||
deType: ele.deType,
|
deType: ele.deType,
|
||||||
dataKey: ele.dataeaseName,
|
dataKey: ele.gisbiName,
|
||||||
title: ele.name,
|
title: ele.name,
|
||||||
width: 150,
|
width: 150,
|
||||||
headerCellRenderer: ({ column }) => (
|
headerCellRenderer: ({ column }) => (
|
||||||
|
@ -97,7 +97,7 @@ const interactiveStore = interactiveStoreWithOut()
|
|||||||
interface Field {
|
interface Field {
|
||||||
fieldShortName: string
|
fieldShortName: string
|
||||||
name: string
|
name: string
|
||||||
dataeaseName: string
|
gisbiName: string
|
||||||
originName: string
|
originName: string
|
||||||
deType: number
|
deType: number
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ export interface CalcFieldType {
|
|||||||
datasetGroupId?: string // 有就传,没有null
|
datasetGroupId?: string // 有就传,没有null
|
||||||
originName: string // 物理字段名
|
originName: string // 物理字段名
|
||||||
name: string // 字段显示名
|
name: string // 字段显示名
|
||||||
dataeaseName?: string // 字段别名
|
gisbiName?: string // 字段别名
|
||||||
groupType: 'd' | 'q' // d=维度,q=指标
|
groupType: 'd' | 'q' // d=维度,q=指标
|
||||||
type: string
|
type: string
|
||||||
params?: Array<{ id: string; name: string; value: number }>
|
params?: Array<{ id: string; name: string; value: number }>
|
||||||
|
@ -77,7 +77,7 @@ interface DragEvent extends MouseEvent {
|
|||||||
interface Field {
|
interface Field {
|
||||||
fieldShortName: string
|
fieldShortName: string
|
||||||
name: string
|
name: string
|
||||||
dataeaseName: string
|
gisbiName: string
|
||||||
originName: string
|
originName: string
|
||||||
deType: number
|
deType: number
|
||||||
}
|
}
|
||||||
@ -466,7 +466,7 @@ const copyField = item => {
|
|||||||
param.extField = 2
|
param.extField = 2
|
||||||
param.originName = item.extField === 2 ? item.originName : '[' + item.id + ']'
|
param.originName = item.extField === 2 ? item.originName : '[' + item.id + ']'
|
||||||
param.name = getFieldName(dimensions.value.concat(quota.value), item.name)
|
param.name = getFieldName(dimensions.value.concat(quota.value), item.name)
|
||||||
param.dataeaseName = null
|
param.gisbiName = null
|
||||||
param.lastSyncTime = null
|
param.lastSyncTime = null
|
||||||
const index = allfields.value.findIndex(ele => ele.id === item.id)
|
const index = allfields.value.findIndex(ele => ele.id === item.id)
|
||||||
allfields.value.splice(index + 1, 0, param)
|
allfields.value.splice(index + 1, 0, param)
|
||||||
@ -661,9 +661,9 @@ const confirmEditCalc = () => {
|
|||||||
|
|
||||||
const generateColumns = (arr: Field[]) =>
|
const generateColumns = (arr: Field[]) =>
|
||||||
arr.map(ele => ({
|
arr.map(ele => ({
|
||||||
key: ele.dataeaseName,
|
key: ele.gisbiName,
|
||||||
deType: ele.deType,
|
deType: ele.deType,
|
||||||
dataKey: ele.dataeaseName,
|
dataKey: ele.gisbiName,
|
||||||
title: ele.name,
|
title: ele.name,
|
||||||
width: 150,
|
width: 150,
|
||||||
headerCellRenderer: ({ column }) => (
|
headerCellRenderer: ({ column }) => (
|
||||||
|
@ -6,19 +6,11 @@ import icon_intoItem_outlined from '@/assets/svg/icon_into-item_outlined.svg'
|
|||||||
import { debounce } from 'lodash-es'
|
import { debounce } from 'lodash-es'
|
||||||
import Header from '../header.vue'
|
import Header from '../header.vue'
|
||||||
import icon_rename_outlined from '@/assets/svg/icon_rename_outlined.svg'
|
import icon_rename_outlined from '@/assets/svg/icon_rename_outlined.svg'
|
||||||
import dvNewFolder from '@/assets/svg/dv-new-folder.svg'
|
|
||||||
import icon_fileAdd_outlined from '@/assets/svg/icon_file-add_outlined.svg'
|
|
||||||
import { moveDatasetTree } from '@/api/dataset'
|
import { moveDatasetTree } from '@/api/dataset'
|
||||||
import icon_searchOutline_outlined from '@/assets/svg/icon_search-outline_outlined.svg'
|
import icon_searchOutline_outlined from '@/assets/svg/icon_search-outline_outlined.svg'
|
||||||
import dvSortAsc from '@/assets/svg/dv-sort-asc.svg'
|
|
||||||
import dvSortDesc from '@/assets/svg/dv-sort-desc.svg'
|
|
||||||
import dvFolder from '@/assets/svg/dv-folder.svg'
|
import dvFolder from '@/assets/svg/dv-folder.svg'
|
||||||
import { treeDraggble } from '@/utils/treeDraggble'
|
import { treeDraggble } from '@/utils/treeDraggble'
|
||||||
import icon_add_outlined from '@/assets/svg/icon_add_outlined.svg'
|
import icon_add_outlined from '@/assets/svg/icon_add_outlined.svg'
|
||||||
import icon_info_outlined from '@/assets/svg/icon_info_outlined.svg'
|
|
||||||
import icon_dashboard_outlined from '@/assets/svg/icon_dashboard_outlined.svg'
|
|
||||||
import icon_operationAnalysis_outlined from '@/assets/svg/icon_operation-analysis_outlined.svg'
|
|
||||||
import icon_download_outlined from '@/assets/svg/icon_download_outlined.svg'
|
|
||||||
import icon_edit_outlined from '@/assets/svg/icon_edit_outlined.svg'
|
import icon_edit_outlined from '@/assets/svg/icon_edit_outlined.svg'
|
||||||
import { findApplicationById } from "@/api/application/application"
|
import { findApplicationById } from "@/api/application/application"
|
||||||
import { useI18n } from '@/hooks/web/useI18n'
|
import { useI18n } from '@/hooks/web/useI18n'
|
||||||
@ -113,7 +105,7 @@ const { wsCache } = useCache()
|
|||||||
interface Field {
|
interface Field {
|
||||||
fieldShortName: string
|
fieldShortName: string
|
||||||
name: string
|
name: string
|
||||||
dataeaseName: string
|
gisbiName: string
|
||||||
originName: string
|
originName: string
|
||||||
deType: number
|
deType: number
|
||||||
}
|
}
|
||||||
@ -291,9 +283,9 @@ const { handleDrop, allowDrop, handleDragStart } = treeDraggble(
|
|||||||
|
|
||||||
const generateColumns = (arr: Field[]) =>
|
const generateColumns = (arr: Field[]) =>
|
||||||
arr.map(ele => ({
|
arr.map(ele => ({
|
||||||
key: ele.dataeaseName,
|
key: ele.gisbiName,
|
||||||
deType: ele.deType,
|
deType: ele.deType,
|
||||||
dataKey: ele.dataeaseName,
|
dataKey: ele.gisbiName,
|
||||||
title: ele.name,
|
title: ele.name,
|
||||||
width: 150,
|
width: 150,
|
||||||
headerCellRenderer: ({ column }) => (
|
headerCellRenderer: ({ column }) => (
|
||||||
@ -1037,12 +1029,11 @@ const proxyAllowDrop = debounce((arg1, arg2) => {
|
|||||||
key="structPreview"
|
key="structPreview"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
v-loading="dataPreviewLoading"
|
v-loading="dataPreviewLoading"
|
||||||
header-class="header-cell"
|
|
||||||
:data="tableData"
|
:data="tableData"
|
||||||
|
header-class="excel-header-cell"
|
||||||
:width="width"
|
:width="width"
|
||||||
:height="height"
|
:height="height"
|
||||||
fixed
|
fixed
|
||||||
border
|
|
||||||
><template #empty>
|
><template #empty>
|
||||||
<empty-background
|
<empty-background
|
||||||
:description="t('data_set.no_data')"
|
:description="t('data_set.no_data')"
|
||||||
@ -1055,7 +1046,6 @@ const proxyAllowDrop = debounce((arg1, arg2) => {
|
|||||||
<el-table
|
<el-table
|
||||||
v-loading="dataPreviewLoading"
|
v-loading="dataPreviewLoading"
|
||||||
class="dataset-preview_table"
|
class="dataset-preview_table"
|
||||||
header-class="header-cell"
|
|
||||||
:data="tableData"
|
:data="tableData"
|
||||||
@row-click="rowClick"
|
@row-click="rowClick"
|
||||||
key="dataPreview"
|
key="dataPreview"
|
||||||
@ -1108,9 +1098,6 @@ const proxyAllowDrop = debounce((arg1, arg2) => {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<div v-if="activeName === 'dataPreview'" class="preview-num">
|
|
||||||
{{ t('data_set.pieces_in_total', { msg: total }) }}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="mounted">
|
<template v-else-if="mounted">
|
||||||
|
@ -101,7 +101,7 @@ const interactiveStore = interactiveStoreWithOut()
|
|||||||
interface Field {
|
interface Field {
|
||||||
fieldShortName: string
|
fieldShortName: string
|
||||||
name: string
|
name: string
|
||||||
dataeaseName: string
|
gisbiName: string
|
||||||
originName: string
|
originName: string
|
||||||
deType: number
|
deType: number
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user