From f0bf8c399c354c22227f8f1a76ed806098db59c0 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 21 五月 2024 16:51:02 +0800 Subject: [PATCH] 2024-05-21 --- src/tabviews/custom/components/chart/antv-G6/index.jsx | 58 ++++++++++++++-------------------------------------------- 1 files changed, 14 insertions(+), 44 deletions(-) diff --git a/src/tabviews/custom/components/chart/antv-G6/index.jsx b/src/tabviews/custom/components/chart/antv-G6/index.jsx index 64536d5..fef955f 100644 --- a/src/tabviews/custom/components/chart/antv-G6/index.jsx +++ b/src/tabviews/custom/components/chart/antv-G6/index.jsx @@ -1,7 +1,7 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' -import { Modal, notification, Spin, Empty } from 'antd' +import { Spin, Empty } from 'antd' import G6 from '@antv/g6' import Api from '@/api' @@ -1167,36 +1167,14 @@ this.data = result.data || [] this.handleData() } - if (result.message) { - if (result.ErrCode === 'Y') { - Modal.success({ - title: result.message - }) - } else if (result.ErrCode === 'S') { - notification.success({ - top: 92, - message: result.message, - duration: 2 - }) - } - } + + UtilsDM.querySuccess(result) } else { this.setState({ loading: false }) - if (!result.message) return - if (result.ErrCode === 'N') { - Modal.error({ - title: result.message, - }) - } else if (result.ErrCode !== '-2') { - notification.error({ - top: 92, - message: result.message, - duration: 10 - }) - } + UtilsDM.queryFail(result) } } @@ -1643,17 +1621,13 @@ MenuName: menu.MenuName, MenuNo: menu.MenuNo || '', type: menu.tabType, - param: {} + param: {$BID: data.$$uuid || ''} } - if (plot.joint === 'true') { - newtab.param.$BID = data.$$uuid || '' - - Object.keys(data).forEach(key => { - if (/^\$/.test(key)) return - newtab.param[key] = data[key] - }) - } + Object.keys(data).forEach(key => { + if (/^\$/.test(key)) return + newtab.param[key] = data[key] + }) MKEmitter.emit('modifyTabs', newtab, true) } else if (plot.click === 'menu') { @@ -1674,16 +1648,12 @@ if (!menu) return - menu.param = {} + menu.param = {$BID: data.$$uuid || ''} - if (plot.joint === 'true') { - menu.param.$BID = data.$$uuid || '' - - Object.keys(data).forEach(key => { - if (/^\$/.test(key)) return - menu.param[key] = data[key] - }) - } + Object.keys(data).forEach(key => { + if (/^\$/.test(key)) return + menu.param[key] = data[key] + }) MKEmitter.emit('modifyTabs', menu, true) } else { -- Gitblit v1.8.0