火情弹窗按钮处理
parent
7786d362a8
commit
bd6d258338
|
|
@ -18,8 +18,8 @@ export function mapFun() {
|
||||||
exact: false
|
exact: false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const handlerMeasureLenth = async () => {
|
sureLenth = async () => {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ let AMapIns: any = null
|
||||||
const vChartRef = ref<HTMLElement>()
|
const vChartRef = ref<HTMLElement>()
|
||||||
|
|
||||||
onMounted(()=>{
|
onMounted(()=>{
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const isFirstLoad = ref(true);
|
const isFirstLoad = ref(true);
|
||||||
|
|
|
||||||
|
|
@ -167,9 +167,10 @@ const handlerFireDetail = (item) => {
|
||||||
// 更新详情弹窗信息
|
// 更新详情弹窗信息
|
||||||
let bindEvents = props.chartConfig.events.interactConfigEvents
|
let bindEvents = props.chartConfig.events.interactConfigEvents
|
||||||
|
|
||||||
|
console.log("bindEvents",bindEvents);
|
||||||
for(let i=0;i<bindEvents.length;i++){
|
for(let i=0;i<bindEvents.length;i++){
|
||||||
for(let j=0;j<bindEvents[i].movementList.length;j++){
|
for(let j=0;j<bindEvents[i].movementList.length;j++){
|
||||||
EventBus.emit(bindEvents[i].movementList[j].elementId[0]+"dataupdate",item);
|
EventBus.emit(bindEvents[i].movementList[j].elementId[j]+"dataupdate",item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let graphic = window.graphicLayer.getGraphicById(item.id);
|
let graphic = window.graphicLayer.getGraphicById(item.id);
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,6 @@ export default class Config extends PublicConfigClass implements CreateComponent
|
||||||
public attr = { ...chartInitConfig, w: 400, h: 527, zIndex: 1 }
|
public attr = { ...chartInitConfig, w: 400, h: 527, zIndex: 1 }
|
||||||
public chartConfig = cloneDeep(TaskBannerConfig)
|
public chartConfig = cloneDeep(TaskBannerConfig)
|
||||||
public option = cloneDeep(option)
|
public option = cloneDeep(option)
|
||||||
public request = { ...requestSqlConfig, requestSQLContent: { sql: 'select * from fm_fireclueinfo where "Id" = #{Id}' }, }
|
public request = { ...requestSqlConfig, requestSQLContent: { sql: 'update fm_fireclueinfo set "status" = #{Status} where "Id" = #{Id}' }, }
|
||||||
public filter = "return res.result;"
|
public filter = "return res.result;"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
import cloneDeep from 'lodash/cloneDeep'
|
import cloneDeep from 'lodash/cloneDeep'
|
||||||
import { PublicConfigClass } from '@/packages/public'
|
import { PublicConfigClass } from '@/packages/public'
|
||||||
import { CreateComponentType } from '@/packages/index.d'
|
import { CreateComponentType } from '@/packages/index.d'
|
||||||
import { chartInitConfig } from '@/settings/designSetting'
|
import { chartInitConfig,requestSqlConfig } from '@/settings/designSetting'
|
||||||
import { ZhiGan_ModalButtonConfig } from './index'
|
import { ZhiGan_ModalButtonConfig } from './index'
|
||||||
|
|
||||||
export const option = {
|
export const option = {
|
||||||
dataset: {
|
dataset: {
|
||||||
value: '辅助决策',
|
// value: '辅助决策',
|
||||||
},
|
},
|
||||||
dataStyle:{
|
dataStyle:{
|
||||||
color: 'yellow',
|
color: 'yellow',
|
||||||
|
|
@ -20,4 +20,6 @@ export default class Config extends PublicConfigClass implements CreateComponent
|
||||||
public attr = { ...chartInitConfig, w: 121, h: 44, zIndex: 5 }
|
public attr = { ...chartInitConfig, w: 121, h: 44, zIndex: 5 }
|
||||||
public chartConfig = cloneDeep(ZhiGan_ModalButtonConfig)
|
public chartConfig = cloneDeep(ZhiGan_ModalButtonConfig)
|
||||||
public option = cloneDeep(option)
|
public option = cloneDeep(option)
|
||||||
|
public request = { ...requestSqlConfig, requestSQLContent: { sql: 'UPDATE fm_fireclueinfo SET "Status" = #{Status} WHERE "Id" = #{Id}' }}
|
||||||
|
public filter = "return res.result;"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,14 +7,16 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, PropType, toRefs, watch, reactive, ref } from 'vue';
|
import { computed, PropType, toRefs, watch, reactive, ref,onMounted } from 'vue';
|
||||||
import { CreateComponentType } from '@/packages/index.d';
|
import { CreateComponentType } from '@/packages/index.d';
|
||||||
import { icon } from '@/plugins';
|
import { icon } from '@/plugins';
|
||||||
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore';
|
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore';
|
||||||
import { useChartDataFetch } from '@/hooks';
|
import { useChartDataFetch } from '@/hooks';
|
||||||
import { eventHandlerHook } from '@/hooks/eventHandler.hook';
|
import { eventHandlerHook } from '@/hooks/eventHandler.hook';
|
||||||
import Button from './svg/button.vue';
|
import Button from './svg/button.vue';
|
||||||
|
import { EventBus } from '@/utils/eventBus';
|
||||||
|
import { replaceSqlParams } from '@/utils/sqlHandler';
|
||||||
|
|
||||||
const chartEditStore = useChartEditStore();
|
const chartEditStore = useChartEditStore();
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
chartConfig: {
|
chartConfig: {
|
||||||
|
|
@ -30,15 +32,39 @@
|
||||||
dataStyle: props.chartConfig.option.dataStyle,
|
dataStyle: props.chartConfig.option.dataStyle,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 单击交互
|
// 单击交互
|
||||||
const clickBtn = (val) => {
|
const clickBtn = (val) => {
|
||||||
|
|
||||||
|
// 隐藏方法
|
||||||
eventHandlerHook(
|
eventHandlerHook(
|
||||||
chartEditStore.getComponentList,
|
chartEditStore.getComponentList,
|
||||||
props.chartConfig.events.interactConfigEvents,
|
props.chartConfig.events.interactConfigEvents,
|
||||||
'click',
|
'click',
|
||||||
val,
|
val,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
console.log("props.chartConfig",);
|
||||||
|
useChartDataFetch(props.chartConfig, useChartEditStore, (resData: any) => {
|
||||||
|
console.log("resData",resData);
|
||||||
|
});
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
onMounted(()=>{
|
||||||
|
// let sql = props.chartConfig.request?.requestSQLContent?.sql;
|
||||||
|
// 组件通信 获取列表中的信息
|
||||||
|
EventBus.on(props.chartConfig.id+'dataupdate', (data) => {
|
||||||
|
// props.chartConfig.request.requestSQLContent.sql = replaceSqlParams(sql,{Status:3,Id:data.id});
|
||||||
|
props.chartConfig.request.requestParams.Params.id = data.id;
|
||||||
|
});
|
||||||
|
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue