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

fix: 替换组态服务及历史回放修改

parent 71d3bf70
......@@ -42,6 +42,7 @@ const ConfigurationView = (props) => {
const prefixCls = getPrefixCls('ec-configuration-view');
const [isHIModalVisible, setIsHIModalVisible] = useState(false); // 历史曲线模态框
const [spinning, setSpinning] = useState(true); // 画板loading
const [spinLoad, setSpinLoad] = useState(false);
const [isEmpty, setIsEmpty] = useState(false); // 画板无数据状态
const [description, setDescription] = useState(''); // 画板无数据描述
......@@ -573,6 +574,8 @@ const ConfigurationView = (props) => {
/** ************************************历史数据获取******************************* */
const getHistoryData = async (flag) => {
try {
if (!myDiagram) return false;
setSpinLoad(true);
speed = 0;
const json = JSON.parse(myDiagram.model.toJson());
const jsonCopy = JSON.parse(JSON.stringify(json));
......@@ -618,7 +621,10 @@ const ConfigurationView = (props) => {
});
chartHistoryDataRender(historyData);
if (flag) historyTimeRender();
} catch (err) {}
setSpinLoad(false);
} catch (err) {
setSpinLoad(false);
}
};
/** ****************************************数据去重******************************* */
......@@ -1909,6 +1915,9 @@ const ConfigurationView = (props) => {
<LoadBox spinning={spinning} />
{isEmpty && <Empty theme={'dark'} description={description} />}
</div>
<div className={classNames('configurationLoad')}>
<LoadBox spinning={spinLoad} />
</div>
{/* 历史曲线 */}
{isHIModalVisible && (
<Modal
......
......@@ -7,7 +7,7 @@ const baseURI = typeof DUMI_TYPE !== 'undefined' && DUMI_TYPE === 'dumi' ? '/api
// 获取画板列表接口
export function getSketchPadList(params) {
return request({
url: `${baseURI}/PandaCore/GCK/SketchPad/List`,
url: `${baseURI}/PandaMonitor/Monitor/SketchPad/List`,
method: REQUEST_METHOD_GET,
header: { 'content-type': 'application/x-www-form-urlencoded' },
params,
......@@ -17,7 +17,7 @@ export function getSketchPadList(params) {
// 获取画板JSON
export function getSketchPadContent(params) {
return request({
url: `${baseURI}/PandaCore/GCK/SketchPad/SketchContent`,
url: `${baseURI}/PandaMonitor/Monitor/SketchPad/SketchContent`,
method: REQUEST_METHOD_GET,
params,
});
......@@ -26,7 +26,7 @@ export function getSketchPadContent(params) {
// 获取点表地址信息
export function getPointAddress(params) {
return request({
url: `${baseURI}/PandaCore/GCK/PointAddress/GetPointAddress`,
url: `${baseURI}/PandaMonitor/Monitor/PointAddress/GetPointAddress`,
method: REQUEST_METHOD_GET,
params,
});
......@@ -44,7 +44,7 @@ export function getDictionaryList(params) {
// 获取设备实时数据
export function getDeviceRealInfo(data) {
return request({
url: `${baseURI}/PandaCore/GCK/Device/DeviceRealInfo`,
url: `${baseURI}/PandaMonitor/Monitor/Device/DeviceRealInfo`,
method: REQUEST_METHOD_POST,
data,
});
......
......@@ -3,6 +3,7 @@
@ec-configuration-view-prefix-cls: ~'@{ant-prefix}-ec-configuration-view';
.@{ec-configuration-view-prefix-cls} {
position: relative;
width: 100%;
height: 100%;
......@@ -271,4 +272,15 @@
outline: none;
}
}
.configurationLoad {
position: absolute;
top: 0;
left: 0;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
}
}
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