Commit 0c561417 authored by 李纪文's avatar 李纪文

feat: 修改组态额外传递参数

parent 04f73f34
......@@ -134,6 +134,7 @@ const ConfigurationView = (props) => {
imgUrl = online ? `${url}PandaMonitor/Monitor/` : `/PandaMonitor/Monitor/`;
// 获取画板信息
const drawInfo = await getSketchPadList({
...(props.params || {}),
name: props.name,
siteCode: siteCodeStr,
version: '全部',
......@@ -186,6 +187,7 @@ const ConfigurationView = (props) => {
// 获取点表信息
const pointInfo = devicesCode.length
? await getPointAddress({
...(props.params || {}),
code: devicesCode.join(','),
_site: siteCodeStr,
})
......@@ -194,7 +196,9 @@ const ConfigurationView = (props) => {
// 获取数据字典组态控制权限
const dictInfoRes = await getDictionaryInfo({
...(props.params || {}),
level: '组态控制权限',
_site: siteCodeStr,
});
const dictInfo = dictInfoRes?.data || [];
const dictList = dictInfo.find((item) => {
......@@ -974,6 +978,7 @@ const ConfigurationView = (props) => {
/** ************************************获取画板JSON******************************* */
const getDiagramJson = async (list, siteInfo) => {
const response = await getSketchPadContent({
...(props.params || {}),
dimension: list.dimension,
siteCode: list.siteCode,
fileName: list.deployURL.split('\\').pop(),
......@@ -1041,7 +1046,7 @@ const ConfigurationView = (props) => {
equipmentCode: devicesCode.join(','),
accountFieldParams,
};
const results = await getDeviceRealInfo(params);
const results = await getDeviceRealInfo(params, props.params || {});
const realData = results && results.data && results.data.list ? results.data.list : [];
chartDataRender(flatten(realData));
} catch (err) {}
......@@ -1537,6 +1542,7 @@ const ConfigurationView = (props) => {
if (!vdCode) return setVideoData([]);
if (vdType && !vdList) return setVideoData([]);
const detail = await getVideoDetail({
...(props.params || {}),
UserID: 1,
DeviceCode: vdCode,
_site: siteCodeStr,
......
......@@ -42,11 +42,12 @@ export function getDictionaryList(params) {
}
// 获取设备实时数据
export function getDeviceRealInfo(data) {
export function getDeviceRealInfo(data, params) {
return request({
url: `${baseURI}/PandaMonitor/Monitor/Device/DeviceRealInfo`,
method: REQUEST_METHOD_POST,
data,
params,
});
}
......
......@@ -24,7 +24,7 @@ const Demo = () => {
deviceName={['工艺流程1', '工艺流程2', '工艺流程3']}
messaged={messaged}
params={{
name: '1213',
name1: '1213',
title: 'mqtt参数',
}}
// isZoom={true}
......
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