Compare commits

...

2 Commits

6 changed files with 44 additions and 8 deletions

View File

@ -123,7 +123,6 @@
</setting-item-box>
</collapse-item>
<collapse-item name="地形设置" :expanded="true">
@ -181,7 +180,7 @@ props.optionData.mapOptions.basemaps = [
"icon": "https://data.mars3d.cn/img/thumbnail/basemap/tdt_img.png",
"type": "group",
"layers": [
{
{
"name": "底图",
"type": "tdt",
"layer": "img_d"

View File

@ -154,7 +154,7 @@ const handlerLoadFirePoint = (points:[])=>{
}
//
const handlerFireDetail = (item) => {
const handlerFireDetail = (item) => {
//
eventHandlerHook(
@ -181,8 +181,6 @@ const handlerFireDetail = (item) => {
}
//
</script>

View File

@ -71,8 +71,20 @@ onMounted(()=>{
}
data.push(info);
})
props.chartConfig.option.dataset.imgArr = [VITE_GLOB_API_URL+"/"+resData[0].image]
console.log("0000",)
//
props.chartConfig.option.dataset.imgArr = [];
let tempImages = resData[0].image.split(",");
if(tempImages.length>0){
tempImages?.forEach((img,idx)=>{
props.chartConfig.option.dataset.imgArr.push(VITE_GLOB_API_URL+"/"+img)
})
}else{
props.chartConfig.option.dataset.imgArr = [VITE_GLOB_API_URL+"/"+resData[0].image]
}
props.chartConfig.option.dataset.data = data;
});
});

View File

@ -14,9 +14,10 @@
</template>
<script setup lang="ts">
import { onMounted } from 'vue'
import { onMounted,watch } from 'vue'
import { eventHandlerHook } from '@/hooks/eventHandler.hook';
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore';
import { EventBus } from '@/utils/eventBus';
const chartEditStore = useChartEditStore();
@ -26,7 +27,11 @@ const props = defineProps({
required: true
}
})
const defaultClick = props.chartConfig.option.selectButton;
const changeButton = (type) => {
props.chartConfig.option.selectButton = type
eventHandlerHook(
chartEditStore.getComponentList,
@ -35,6 +40,17 @@ const changeButton = (type) => {
type,
);
}
//
watch(
()=> props.chartConfig.status.hide,
(newVal)=>{
if(newVal){
changeButton(defaultClick)
}
}
)
const getClassName = (type) => {
let className = ''
switch(type){
@ -60,6 +76,7 @@ const getClassName = (type) => {
return className
}
const { list, selectButton } = props.chartConfig.option
</script>
<style lang="scss" scoped>

View File

@ -24,16 +24,21 @@ const props = defineProps({
required: true
}
})
const changeButton = (type) => {
props.chartConfig.option.selectButton = type
eventHandlerHook(
chartEditStore.getComponentList,
props.chartConfig.events.interactConfigEvents[type],
'click',
type,
);
}
const { list, selectButton } = props.chartConfig.option
</script>
<style lang="scss" scoped>

View File

@ -18,6 +18,7 @@
import { replaceSqlParams } from '@/utils/sqlHandler';
const chartEditStore = useChartEditStore();
const props = defineProps({
chartConfig: {
type: Object as PropType<CreateComponentType>,
@ -32,6 +33,8 @@
dataStyle: props.chartConfig.option.dataStyle,
});
const primary_id = ref(null);
//
const clickBtn = (val) => {
//
@ -41,6 +44,7 @@
'click',
val,
);
useChartDataFetch(props.chartConfig, useChartEditStore, (resData: any) => {
// console.log('resData', resData);
});
@ -52,6 +56,7 @@
EventBus.on(props.chartConfig.id + 'dataupdate', (data) => {
const keys = Object.keys(data);
let interactConfigEvents = props.chartConfig.events.interactConfigEvents;
interactConfigEvents.forEach((item, index) => {
item?.movementList.forEach((m, mindex) => {