feat(): 完成知识检索全部功能
parent
8098b39329
commit
bf68ca571e
|
|
@ -1,4 +1,4 @@
|
|||
import React, { useEffect, useState,useRef } from 'react'
|
||||
import React, { useEffect, useState, useRef } from 'react'
|
||||
import { useLocation } from 'react-router'
|
||||
import { useDispatch, useSelector } from 'react-redux'
|
||||
import { Collapse, DatePicker, Input, Modal, message } from 'antd';
|
||||
|
|
@ -152,13 +152,19 @@ const HomePage = ({ showPanels }) => {
|
|||
|
||||
Modal.destroyAll(); // 先销毁可能存在的其他Modal
|
||||
const modal = Modal.confirm({
|
||||
title: `${record.name}详情`,
|
||||
title: <div style={{ width: '100%', padding: '16px 24px', color: '#3B4859', borderBottom: '1px solid #f0f0f0', position: "absolute", top: 0, left: 0 }}>
|
||||
<div style={{ fontSize: 16, fontWeight: 'bold' }}>{record.name}详情</div>
|
||||
</div>,
|
||||
width: 1000,
|
||||
content: (
|
||||
<>
|
||||
<div style={{ marginTop: 45 }}></div>
|
||||
<ModalForm.default
|
||||
mode="view"
|
||||
record={res}
|
||||
/>
|
||||
</>
|
||||
|
||||
),
|
||||
icon: null,
|
||||
okButtonProps: { style: { display: 'none' } },
|
||||
|
|
@ -616,12 +622,18 @@ const HomePage = ({ showPanels }) => {
|
|||
// 清空搜索输入框
|
||||
setSearchVal('')
|
||||
dispatch.runtime.closeFeaturePopAll()
|
||||
mapObj && mapObj.getLayers().getArray().forEach(layer => {
|
||||
if (layer.values_.name && (layer.values_.name.indexOf('ZHZS_WXQ') > -1||layer.values_.name.indexOf('ZHZS_YQ') > -1)) {
|
||||
mapObj.removeLayer(layer);
|
||||
}
|
||||
});
|
||||
dispatch.runtime.setHome()
|
||||
if (a === undefined) {
|
||||
setCheckedObj({ key: '12', label: '雨情', labelRight: '统计', icon: 'yuqing' })
|
||||
setShowTable(false)
|
||||
} else if (a === '1') {
|
||||
setShowTable(true)
|
||||
dispatch.runtime.setHome()
|
||||
// dispatch.runtime.setHome()
|
||||
setCheckedObj({ key: '11', label: '预警', labelRight: '预警', icon: 'yujing' })
|
||||
} else if (a === '2') {
|
||||
setShowTable(true)
|
||||
|
|
@ -663,6 +675,12 @@ const HomePage = ({ showPanels }) => {
|
|||
setSearchVal('')
|
||||
setCheckedObj(item)
|
||||
setShowTable(true)
|
||||
mapObj && mapObj.getLayers().getArray().forEach(layer => {
|
||||
if (layer.values_.name && (layer.values_.name.indexOf('ZHZS_WXQ') > -1 ||layer.values_.name.indexOf('ZHZS_YQ') > -1)) {
|
||||
mapObj.removeLayer(layer);
|
||||
}
|
||||
});
|
||||
dispatch.runtime.setHome()
|
||||
}}>
|
||||
<img src={`${process.env.PUBLIC_URL}/assets/xyt/homeImg/${item.icon}.png`} width="20" height="20" alt="" style={{ marginRight: '10px' }} />
|
||||
{item.label}
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ useEffect(() => {
|
|||
name="type"
|
||||
rules={[{ required: true }]}
|
||||
>
|
||||
<Select allowClear style={{ width: '100%' }} options={opntios} placeholder='请选择' />
|
||||
<Select allowClear disabled={mode === 'view'} style={{ width: '100%' }} options={opntios} placeholder='请选择' />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
|
|
@ -95,7 +95,7 @@ useEffect(() => {
|
|||
name="status"
|
||||
rules={[{ required: true }]}
|
||||
>
|
||||
<Select allowClear style={{ width: '100%' }} options={opntios1} placeholder='请选择' />
|
||||
<Select allowClear disabled={mode === 'view'} style={{ width: '100%' }} options={opntios1} placeholder='请选择' />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={24}>
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ useEffect(() => {
|
|||
name="type"
|
||||
rules={[{ required: true }]}
|
||||
>
|
||||
<Select allowClear style={{ width: '100%' }} options={opntios} placeholder='请选择' />
|
||||
<Select allowClear disabled={mode === 'view'} style={{ width: '100%' }} options={opntios} placeholder='请选择' />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
|
|
@ -95,7 +95,7 @@ useEffect(() => {
|
|||
name="status"
|
||||
rules={[{ required: true }]}
|
||||
>
|
||||
<Select allowClear style={{ width: '100%' }} options={opntios1} placeholder='请选择' />
|
||||
<Select allowClear disabled={mode === 'view'} style={{ width: '100%' }} options={opntios1} placeholder='请选择' />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={24}>
|
||||
|
|
|
|||
Loading…
Reference in New Issue