mirror of
https://gitee.com/dromara/go-view.git
synced 2025-10-15 15:02:10 +08:00
Pre Merge pull request !37 from dodu/dev
This commit is contained in:
commit
3b8f13e3fc
@ -6,7 +6,9 @@
|
||||
"build": "vue-tsc --noEmit && vite build",
|
||||
"preview": "vite preview",
|
||||
"new": "plop --plopfile ./plop/plopfile.js",
|
||||
"postinstall": "husky install"
|
||||
"postinstall": "husky install",
|
||||
"lint": "eslint --ext .vue,.js,.jsx,.ts,.tsx ./ --max-warnings 0",
|
||||
"lint:fix": "eslint --ext .vue,.js,jsx,.ts,.tsx ./ --fix"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/color": "^3.0.3",
|
||||
@ -69,4 +71,4 @@
|
||||
"vue-echarts": "^6.0.2",
|
||||
"vue-tsc": "^0.28.10"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ export const option = {
|
||||
{
|
||||
name: '地图',
|
||||
type: 'map',
|
||||
map: 'china',
|
||||
map: 'chinaWithoutHainanIsLands',
|
||||
zoom: 1, //缩放
|
||||
itemStyle: {
|
||||
// 背景色
|
||||
@ -49,7 +49,8 @@ export const option = {
|
||||
},
|
||||
color: '#ffffff',
|
||||
borderColor: '#75ecaa',
|
||||
borderWidth: 1
|
||||
borderWidth: 1,
|
||||
showHainanIsLands: true // 是否显示海南群岛
|
||||
},
|
||||
label: {
|
||||
show: true,
|
||||
|
@ -43,6 +43,11 @@
|
||||
></n-input-number>
|
||||
</SettingItem>
|
||||
</SettingItemBox>
|
||||
<SettingItemBox name="其他">
|
||||
<SettingItem>
|
||||
<n-checkbox v-model:checked="seriesList[1].itemStyle.showHainanIsLands" size="small">显示海南群岛</n-checkbox>
|
||||
</SettingItem>
|
||||
</SettingItemBox>
|
||||
</CollapseItem>
|
||||
<CollapseItem name="标记" :expanded="true">
|
||||
<SettingItemBox name="样式">
|
||||
|
@ -14,8 +14,8 @@ import { useChartDataFetch } from '@/hooks'
|
||||
import { mergeTheme } from '@/packages/public/chart'
|
||||
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
||||
import { isPreview } from '@/utils'
|
||||
import dataJson from './data.json'
|
||||
import mapJson from './map.json'
|
||||
import mapJsonWithoutHainanIsLands from './mapWithoutHainanIsLands.json'
|
||||
import { DatasetComponent, GridComponent, TooltipComponent, LegendComponent, GeoComponent } from 'echarts/components'
|
||||
|
||||
const props = defineProps({
|
||||
@ -45,6 +45,7 @@ use([
|
||||
])
|
||||
|
||||
registerMap('china', { geoJSON: mapJson as any, specialAreas: {} })
|
||||
registerMap('chinaWithoutHainanIsLands', { geoJSON: mapJsonWithoutHainanIsLands as any, specialAreas: {} })
|
||||
|
||||
const option = reactive({
|
||||
value: mergeTheme(props.chartConfig.option, props.themeSetting, includes)
|
||||
@ -58,6 +59,27 @@ const dataSetHandle = (dataset: any) => {
|
||||
})
|
||||
}
|
||||
|
||||
const mapTypeHandle = (config: boolean) => {
|
||||
// props.chartConfig.option.series.forEach((item: any) => {
|
||||
// if (item.type === 'effectScatter' && dataset.point) item.data = dataset.point
|
||||
// else if (item.type === 'map' && dataset.point) item.data = dataset.map
|
||||
// option.value = props.chartConfig.option
|
||||
// })
|
||||
props.chartConfig.option.series[1].map = config ? 'china' : 'chinaWithoutHainanIsLands'
|
||||
option.value = props.chartConfig.option
|
||||
}
|
||||
|
||||
watch(
|
||||
() => props.chartConfig.option.series[1].itemStyle.showHainanIsLands,
|
||||
newData => {
|
||||
mapTypeHandle(newData)
|
||||
},
|
||||
{
|
||||
deep: true,
|
||||
immediate: true
|
||||
}
|
||||
)
|
||||
|
||||
watch(
|
||||
() => props.chartConfig.option.dataset,
|
||||
newData => {
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -600,7 +600,7 @@ export const useChartEditStore = defineStore({
|
||||
ids.push(item.id)
|
||||
})
|
||||
} else {
|
||||
;(historyData[0] as CreateComponentGroupType).groupList.forEach(item => {
|
||||
(historyData[0] as CreateComponentGroupType).groupList.forEach(item => {
|
||||
ids.push(item.id)
|
||||
})
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ export const useSync = () => {
|
||||
}
|
||||
|
||||
if (e.isGroup) {
|
||||
;(e as CreateComponentGroupType).groupList.forEach(groupItem => {
|
||||
(e as CreateComponentGroupType).groupList.forEach(groupItem => {
|
||||
intComponent(groupItem)
|
||||
})
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user