巡查添加点击事件交互

main
userName 2025-05-08 08:46:23 +08:00
parent 2a5e9e48b0
commit 0e4f422275
2 changed files with 22 additions and 12 deletions

View File

@ -1,5 +1,5 @@
<template>
<div class="go-title-xuncha">
<div class="go-title-xuncha" @click="clickBtn">
<img class="img" src="@/assets/images/chart/xunchaguiji/back.png" />
<span class="span">返回</span>
</div>
@ -8,7 +8,10 @@
<script setup lang="ts">
import { PropType, toRefs } from 'vue'
import { CreateComponentType } from '@/packages/index.d'
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore';
import { eventHandlerHook } from '@/hooks/eventHandler.hook';
const chartEditStore = useChartEditStore();
const props = defineProps({
chartConfig: {
type: Object as PropType<CreateComponentType>,
@ -21,6 +24,14 @@ const {
textColor,
textSize,
} = toRefs(props.chartConfig.option)
//
const clickBtn = () => {
eventHandlerHook(
chartEditStore.getComponentList,
props.chartConfig.events.interactConfigEvents,
'click'
);
};
</script>
<style lang="scss" scoped>

View File

@ -1,16 +1,6 @@
<template>
<div class="go-title-xuncha">
<div class="selbox">
<!-- <n-tree-select
v-model:value="areaValue"
:options="areaOptions"
label-field="name"
key-field="id"
children-field="children"
placeholder="请选择行政区划"
clearable
style="width: 240px"
/> -->
<el-tree-select
v-model="areaValue"
:data="areaOptions"
@ -78,8 +68,12 @@ import { EventBus } from '@/utils/eventBus'
import axios from 'axios'
import * as mars3d from "mars3d";
import { getAppEnvConfig } from '@/utils/env'
var { VITE_GLOB_API_URL } = getAppEnvConfig();
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore';
import { eventHandlerHook } from '@/hooks/eventHandler.hook';
const chartEditStore = useChartEditStore();
var { VITE_GLOB_API_URL } = getAppEnvConfig();
const props = defineProps({
chartConfig: {
type: Object as PropType<CreateComponentType>,
@ -150,6 +144,11 @@ const getAreaListData=(id)=>{
})
}
const lisClick=(e)=>{
eventHandlerHook(
chartEditStore.getComponentList,
props.chartConfig.events.interactConfigEvents,
'click'
);
EventBus.emit('clockinlistsenddata' , e);
if(entityArr.value.length>0){
entityArr.value.forEach(item =>{