巡查添加点击事件交互
parent
2a5e9e48b0
commit
0e4f422275
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="go-title-xuncha">
|
<div class="go-title-xuncha" @click="clickBtn">
|
||||||
<img class="img" src="@/assets/images/chart/xunchaguiji/back.png" />
|
<img class="img" src="@/assets/images/chart/xunchaguiji/back.png" />
|
||||||
<span class="span">返回</span>
|
<span class="span">返回</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -8,7 +8,10 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { PropType, toRefs } from 'vue'
|
import { PropType, toRefs } from 'vue'
|
||||||
import { CreateComponentType } from '@/packages/index.d'
|
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({
|
const props = defineProps({
|
||||||
chartConfig: {
|
chartConfig: {
|
||||||
type: Object as PropType<CreateComponentType>,
|
type: Object as PropType<CreateComponentType>,
|
||||||
|
|
@ -21,6 +24,14 @@ const {
|
||||||
textColor,
|
textColor,
|
||||||
textSize,
|
textSize,
|
||||||
} = toRefs(props.chartConfig.option)
|
} = toRefs(props.chartConfig.option)
|
||||||
|
// 单击交互
|
||||||
|
const clickBtn = () => {
|
||||||
|
eventHandlerHook(
|
||||||
|
chartEditStore.getComponentList,
|
||||||
|
props.chartConfig.events.interactConfigEvents,
|
||||||
|
'click'
|
||||||
|
);
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="go-title-xuncha">
|
<div class="go-title-xuncha">
|
||||||
<div class="selbox">
|
<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
|
<el-tree-select
|
||||||
v-model="areaValue"
|
v-model="areaValue"
|
||||||
:data="areaOptions"
|
:data="areaOptions"
|
||||||
|
|
@ -78,8 +68,12 @@ import { EventBus } from '@/utils/eventBus'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import * as mars3d from "mars3d";
|
import * as mars3d from "mars3d";
|
||||||
import { getAppEnvConfig } from '@/utils/env'
|
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({
|
const props = defineProps({
|
||||||
chartConfig: {
|
chartConfig: {
|
||||||
type: Object as PropType<CreateComponentType>,
|
type: Object as PropType<CreateComponentType>,
|
||||||
|
|
@ -150,6 +144,11 @@ const getAreaListData=(id)=>{
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const lisClick=(e)=>{
|
const lisClick=(e)=>{
|
||||||
|
eventHandlerHook(
|
||||||
|
chartEditStore.getComponentList,
|
||||||
|
props.chartConfig.events.interactConfigEvents,
|
||||||
|
'click'
|
||||||
|
);
|
||||||
EventBus.emit('clockinlistsenddata' , e);
|
EventBus.emit('clockinlistsenddata' , e);
|
||||||
if(entityArr.value.length>0){
|
if(entityArr.value.length>0){
|
||||||
entityArr.value.forEach(item =>{
|
entityArr.value.forEach(item =>{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue