Commit fbafe19e authored by 李纪文's avatar 李纪文

fix: 指标选择增加isCommonTag参数

parent 5c4f7901
...@@ -50,3 +50,4 @@ group: ...@@ -50,3 +50,4 @@ group:
| onModalClose | 模态框点击关闭回调 | function(value){ } | - | | onModalClose | 模态框点击关闭回调 | function(value){ } | - |
| quotaListService`必需` | 获取指标列表的服务 | promise | - | | quotaListService`必需` | 获取指标列表的服务 | promise | - |
| updateDeviceConfService`user存在时必需` | 更新设备配置的服务 | promise | - | | updateDeviceConfService`user存在时必需` | 更新设备配置的服务 | promise | - |
| isCommonTag | 是否展示点表存在差异的指标 | boolean | false |
...@@ -12,6 +12,7 @@ import { ...@@ -12,6 +12,7 @@ import {
Tree, Tree,
ConfigProvider, ConfigProvider,
message, message,
Tooltip
} from 'antd'; } from 'antd';
import Empty from '@wisdom-components/empty'; import Empty from '@wisdom-components/empty';
import { import {
...@@ -19,6 +20,7 @@ import { ...@@ -19,6 +20,7 @@ import {
ExclamationCircleFilled, ExclamationCircleFilled,
SearchOutlined, SearchOutlined,
CloseOutlined, CloseOutlined,
InfoCircleOutlined
} from '@ant-design/icons'; } from '@ant-design/icons';
import './index.less'; import './index.less';
import { getQuataList, updateMonitorConf } from './apis'; import { getQuataList, updateMonitorConf } from './apis';
...@@ -45,6 +47,7 @@ const QuotaSelect = ({ ...@@ -45,6 +47,7 @@ const QuotaSelect = ({
treeProps, treeProps,
defaultSelect, defaultSelect,
disabledList, disabledList,
isCommonTag,
}) => { }) => {
const { getPrefixCls } = useContext(ConfigProvider.ConfigContext); const { getPrefixCls } = useContext(ConfigProvider.ConfigContext);
const prefixCls = getPrefixCls('ec-quota-select'); const prefixCls = getPrefixCls('ec-quota-select');
...@@ -62,7 +65,8 @@ const QuotaSelect = ({ ...@@ -62,7 +65,8 @@ const QuotaSelect = ({
// 请求指标列表 // 请求指标列表
getQuataList({ getQuataList({
accountName: item.deviceType, accountName: item.deviceType,
addrSchemeID: item.pointAddressID, // addrSchemeID: item.pointAddressID,
isCommonTag: isCommonTag,
}).then((res) => { }).then((res) => {
if (res.code === 0) { if (res.code === 0) {
const data = const data =
...@@ -428,6 +432,7 @@ const QuotaSelect = ({ ...@@ -428,6 +432,7 @@ const QuotaSelect = ({
onChange={(e) => handleCheckboxChange(e, item)} onChange={(e) => handleCheckboxChange(e, item)}
> >
{item.title} {item.title}
{item.notInFVersion && <Tooltip placement="bottom" title={`${item.notInFVersion} 版本不存在当前指标`}><InfoCircleOutlined className={classNames(`${prefixCls}-modal-class-mark`)}/></Tooltip>}
</Checkbox> </Checkbox>
</Col> </Col>
))} ))}
...@@ -483,6 +488,7 @@ QuotaSelect.defaultProps = { ...@@ -483,6 +488,7 @@ QuotaSelect.defaultProps = {
onModalClose: () => {}, onModalClose: () => {},
defaultSelect: 'emphasis', defaultSelect: 'emphasis',
disabledList: [], disabledList: [],
isCommonTag: false,
}; };
QuotaSelect.propTypes = { QuotaSelect.propTypes = {
...@@ -505,6 +511,7 @@ QuotaSelect.propTypes = { ...@@ -505,6 +511,7 @@ QuotaSelect.propTypes = {
onModalClose: PropTypes.func, onModalClose: PropTypes.func,
defaultSelect: PropTypes.string, defaultSelect: PropTypes.string,
disabledList: PropTypes.array, disabledList: PropTypes.array,
isCommonTag: PropTypes.bool,
}; };
export default QuotaSelect; export default QuotaSelect;
...@@ -102,6 +102,16 @@ ...@@ -102,6 +102,16 @@
} }
} }
&-class-mark {
margin-left: 5px;
color: #aaaaaa;;
}
.@{ant-prefix}-checkbox + span {
display: flex;
align-items: center;
}
&-number { &-number {
margin-bottom: 10px; margin-bottom: 10px;
padding: 4px 0 10px 20px; padding: 4px 0 10px 20px;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment