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

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

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