|
@@ -78,6 +78,8 @@
|
|
|
:page="cusTransfer.result.device.pageNum"
|
|
|
:pageSize="cusTransfer.result.device.pageSize"
|
|
|
@handlePage="handlePageDevice"
|
|
|
+ :row-class-name="deviceTableRowClassName"
|
|
|
+ @row-click="deviceHandleRowClick"
|
|
|
>
|
|
|
</CusTable>
|
|
|
</div>
|
|
@@ -195,7 +197,7 @@ export default defineComponent({
|
|
|
const id = 'analysisDrawHelpTooltipElementId'
|
|
|
if (state.cusTransfer.analysisDrawHelpTooltipElement) {
|
|
|
props.map.removeOverlay(props.map.getOverlayById(id))
|
|
|
- state.cusTransfer.analysisDrawHelpTooltipElement.parentNode.removeChild(state.cusTransfer.analysisDrawHelpTooltipElement);
|
|
|
+ state.cusTransfer.analysisDrawHelpTooltipElement.parentNode?.removeChild(state.cusTransfer.analysisDrawHelpTooltipElement);
|
|
|
}
|
|
|
state.cusTransfer.analysisDrawHelpTooltipElement = document.createElement('div');
|
|
|
state.cusTransfer.analysisDrawHelpTooltipElement.className = 'tooltip hidden';
|
|
@@ -260,9 +262,11 @@ export default defineComponent({
|
|
|
if (sketch) {
|
|
|
helpMsg = '双击结束标绘';
|
|
|
}
|
|
|
- state.cusTransfer.analysisDrawHelpTooltipElement.innerHTML = helpMsg; //将提示信息设置到对话框中显示
|
|
|
- helpTooltip.setPosition(evt.coordinate);//设置帮助提示框的位置
|
|
|
- state.cusTransfer.analysisDrawHelpTooltipElement.classList.remove('hidden');//移除帮助提示框的隐藏样式进行显示
|
|
|
+ if (state.cusTransfer.analysisDrawHelpTooltipElement) {
|
|
|
+ state.cusTransfer.analysisDrawHelpTooltipElement.innerHTML = helpMsg; //将提示信息设置到对话框中显示
|
|
|
+ helpTooltip.setPosition(evt.coordinate);//设置帮助提示框的位置
|
|
|
+ state.cusTransfer.analysisDrawHelpTooltipElement.classList.remove('hidden');//移除帮助提示框的隐藏样式进行显示
|
|
|
+ }
|
|
|
};
|
|
|
props.map.on('pointermove', pointerMoveHandler); //地图容器绑定鼠标移动事件,动态显示帮助提示框内容
|
|
|
}
|
|
@@ -324,6 +328,23 @@ export default defineComponent({
|
|
|
const onCancel = () => {
|
|
|
emit('cancel')
|
|
|
}
|
|
|
+ const deviceTableRowClassName = ({row}) => {
|
|
|
+ if (row.id === store.state.gis.gisParams.default.feature?.getId()) {
|
|
|
+ return 'row-active'
|
|
|
+ }
|
|
|
+ return ''
|
|
|
+ }
|
|
|
+ const deviceHandleRowClick = (row) => {
|
|
|
+ if (row.id === store.state.gis.gisParams.default.feature?.getId()) {
|
|
|
+ store.dispatch('gis/LOAD_GIS_PARAMS_DEFAULT_RESET')
|
|
|
+ } else {
|
|
|
+ store.dispatch('gis/LOAD_GIS_PARAMS_DEFAULT_SB', {
|
|
|
+ wkt: row.wkt,
|
|
|
+ id: row.id,
|
|
|
+ info: row.info
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
watch(() => state.cusTransfer, () => {
|
|
|
emit('update:transfer', state.cusTransfer)
|
|
|
}, { deep: true })
|
|
@@ -348,6 +369,7 @@ export default defineComponent({
|
|
|
if (state.cusTransfer.analysisDraw) {
|
|
|
props.map.removeInteraction(state.cusTransfer.analysisDraw);
|
|
|
}
|
|
|
+ state.cusTransfer.analysisDrawHelpTooltipElement?.parentNode.removeChild(state.cusTransfer.analysisDrawHelpTooltipElement);
|
|
|
store.dispatch('gis/LOAD_GIS_ANALYSIS_RESET')
|
|
|
})
|
|
|
return {
|
|
@@ -365,7 +387,9 @@ export default defineComponent({
|
|
|
handlePageDevice,
|
|
|
onSearchDevice,
|
|
|
onResetDevice,
|
|
|
- onCancel
|
|
|
+ onCancel,
|
|
|
+ deviceTableRowClassName,
|
|
|
+ deviceHandleRowClick,
|
|
|
}
|
|
|
},
|
|
|
})
|
|
@@ -496,6 +520,11 @@ export default defineComponent({
|
|
|
}
|
|
|
.table {
|
|
|
flex: 1;
|
|
|
+ :deep(.row-active) {
|
|
|
+ >td {
|
|
|
+ background: rgba(16,140,243,0.1);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|