Commit 3f758edb authored by 李纪文's avatar 李纪文

feat: 视频回放去除熊猫、组态组件sitecode取值修改

parent e1958bae
...@@ -147,7 +147,7 @@ const RecVideo = (props, ref) => { ...@@ -147,7 +147,7 @@ const RecVideo = (props, ref) => {
</> </>
) : ( ) : (
<div className={classNames(`${prefixCls}-empty`)}> <div className={classNames(`${prefixCls}-empty`)}>
<Empty theme={'dark'} description={''} /> {/* <Empty theme={'dark'} description={''} /> */}
</div> </div>
)} )}
</div> </div>
......
...@@ -75,6 +75,7 @@ const ConfigurationView = (props) => { ...@@ -75,6 +75,7 @@ const ConfigurationView = (props) => {
} = props; } = props;
let devicesCode = []; let devicesCode = [];
const globalConfig = window.globalConfig || config; const globalConfig = window.globalConfig || config;
const siteCodeStr = globalConfig?.userInfo?.LocalSite || globalConfig?.userInfo?.site || '';
let isClose = false; let isClose = false;
/** **********************************获取工艺图画板信息*********************** */ /** **********************************获取工艺图画板信息*********************** */
...@@ -84,15 +85,9 @@ const ConfigurationView = (props) => { ...@@ -84,15 +85,9 @@ const ConfigurationView = (props) => {
// 获取画板信息 // 获取画板信息
const drawInfo = await getSketchPadList({ const drawInfo = await getSketchPadList({
name: props.name, name: props.name,
siteCode: siteCode: siteCodeStr,
globalConfig.userInfo && globalConfig.userInfo.LocalSite
? globalConfig.userInfo.LocalSite
: '',
version: '全部', version: '全部',
_site: _site: siteCodeStr,
globalConfig.userInfo && globalConfig.userInfo.LocalSite
? globalConfig.userInfo.LocalSite
: '',
}); });
if (drawInfo.code === 0) { if (drawInfo.code === 0) {
const data = drawInfo.data ? (drawInfo.data.list ? drawInfo.data.list : []) : []; const data = drawInfo.data ? (drawInfo.data.list ? drawInfo.data.list : []) : [];
...@@ -138,10 +133,7 @@ const ConfigurationView = (props) => { ...@@ -138,10 +133,7 @@ const ConfigurationView = (props) => {
// 获取点表信息 // 获取点表信息
const pointInfo = await getPointAddress({ const pointInfo = await getPointAddress({
code: devicesCode.join(','), code: devicesCode.join(','),
_site: _site: siteCodeStr,
globalConfig.userInfo && globalConfig.userInfo.LocalSite
? globalConfig.userInfo.LocalSite
: '',
}); });
editionArr = deepCopy(pointInfo && pointInfo.data ? pointInfo.data : [], []); editionArr = deepCopy(pointInfo && pointInfo.data ? pointInfo.data : [], []);
}; };
...@@ -658,10 +650,7 @@ const ConfigurationView = (props) => { ...@@ -658,10 +650,7 @@ const ConfigurationView = (props) => {
dimension: list.dimension, dimension: list.dimension,
siteCode: list.siteCode, siteCode: list.siteCode,
fileName: list.deployURL.split('\\').pop(), fileName: list.deployURL.split('\\').pop(),
_site: _site: siteCodeStr,
globalConfig.userInfo && globalConfig.userInfo.LocalSite
? globalConfig.userInfo.LocalSite
: '',
}); });
if (response.code === 0) { if (response.code === 0) {
if (isClose) return false; if (isClose) return false;
...@@ -1231,9 +1220,7 @@ const ConfigurationView = (props) => { ...@@ -1231,9 +1220,7 @@ const ConfigurationView = (props) => {
const own = myDiagram ? myDiagram.model.findNodeDataForKey('bgCase') : {}; const own = myDiagram ? myDiagram.model.findNodeDataForKey('bgCase') : {};
props.bgMethod && props.bgMethod(own); props.bgMethod && props.bgMethod(own);
return v return v
? `/PandaMonitor/Monitor/SketchPad/PreviewResource?name=${v}&_site=${ ? `/PandaMonitor/Monitor/SketchPad/PreviewResource?name=${v}&_site=${siteCodeStr}`
globalConfig?.userInfo?.LocalSite || ''
}`
: ''; : '';
}).makeTwoWay(), }).makeTwoWay(),
new go.Binding('scale', 'scale').makeTwoWay(), new go.Binding('scale', 'scale').makeTwoWay(),
...@@ -1399,9 +1386,7 @@ const ConfigurationView = (props) => { ...@@ -1399,9 +1386,7 @@ const ConfigurationView = (props) => {
new go.Binding('source', 'imgSrc', function (v) { new go.Binding('source', 'imgSrc', function (v) {
return !v return !v
? require('./images/组态/默认.png') ? require('./images/组态/默认.png')
: `/PandaMonitor/Monitor/SketchPad/PreviewResource?name=${v}&_site=${ : `/PandaMonitor/Monitor/SketchPad/PreviewResource?name=${v}&_site=${siteCodeStr}`;
globalConfig?.userInfo?.LocalSite || ''
}`;
}).makeTwoWay(), }).makeTwoWay(),
new go.Binding('scale', 'scale').makeTwoWay(), new go.Binding('scale', 'scale').makeTwoWay(),
new go.Binding('width', 'width').makeTwoWay(), new go.Binding('width', 'width').makeTwoWay(),
......
...@@ -114,6 +114,7 @@ const ConfigurationView = (props) => { ...@@ -114,6 +114,7 @@ const ConfigurationView = (props) => {
const { devices = [], config, isZoom = false, flowShow = true, deviceName = [] } = props; const { devices = [], config, isZoom = false, flowShow = true, deviceName = [] } = props;
let devicesCode = []; let devicesCode = [];
const globalConfig = window.globalConfig || config; const globalConfig = window.globalConfig || config;
const siteCodeStr = globalConfig?.userInfo?.LocalSite || globalConfig?.userInfo?.site || '';
let isClose = false; let isClose = false;
// 子应用包名查找 // 子应用包名查找
const widgets = queryProduct(globalConfig?.widgets || [], decodeURI(window.location.pathname)); const widgets = queryProduct(globalConfig?.widgets || [], decodeURI(window.location.pathname));
...@@ -134,15 +135,9 @@ const ConfigurationView = (props) => { ...@@ -134,15 +135,9 @@ const ConfigurationView = (props) => {
// 获取画板信息 // 获取画板信息
const drawInfo = await getSketchPadList({ const drawInfo = await getSketchPadList({
name: props.name, name: props.name,
siteCode: siteCode: siteCodeStr,
globalConfig.userInfo && globalConfig.userInfo.LocalSite
? globalConfig.userInfo.LocalSite
: '',
version: '全部', version: '全部',
_site: _site: siteCodeStr,
globalConfig.userInfo && globalConfig.userInfo.LocalSite
? globalConfig.userInfo.LocalSite
: '',
}); });
if (drawInfo.code === 0) { if (drawInfo.code === 0) {
const data = drawInfo.data ? (drawInfo.data.list ? drawInfo.data.list : []) : []; const data = drawInfo.data ? (drawInfo.data.list ? drawInfo.data.list : []) : [];
...@@ -192,10 +187,7 @@ const ConfigurationView = (props) => { ...@@ -192,10 +187,7 @@ const ConfigurationView = (props) => {
const pointInfo = devicesCode.length const pointInfo = devicesCode.length
? await getPointAddress({ ? await getPointAddress({
code: devicesCode.join(','), code: devicesCode.join(','),
_site: _site: siteCodeStr,
globalConfig.userInfo && globalConfig.userInfo.LocalSite
? globalConfig.userInfo.LocalSite
: '',
}) })
: null; : null;
editionArr = deepCopy(pointInfo && pointInfo.data ? pointInfo.data : [], []); editionArr = deepCopy(pointInfo && pointInfo.data ? pointInfo.data : [], []);
...@@ -985,10 +977,7 @@ const ConfigurationView = (props) => { ...@@ -985,10 +977,7 @@ const ConfigurationView = (props) => {
dimension: list.dimension, dimension: list.dimension,
siteCode: list.siteCode, siteCode: list.siteCode,
fileName: list.deployURL.split('\\').pop(), fileName: list.deployURL.split('\\').pop(),
_site: _site: siteCodeStr,
globalConfig.userInfo && globalConfig.userInfo.LocalSite
? globalConfig.userInfo.LocalSite
: '',
}); });
setSpinning(false); setSpinning(false);
if (response.code === 0) { if (response.code === 0) {
...@@ -1549,10 +1538,7 @@ const ConfigurationView = (props) => { ...@@ -1549,10 +1538,7 @@ const ConfigurationView = (props) => {
const detail = await getVideoDetail({ const detail = await getVideoDetail({
UserID: 1, UserID: 1,
DeviceCode: vdCode, DeviceCode: vdCode,
_site: _site: siteCodeStr,
globalConfig.userInfo && globalConfig.userInfo.LocalSite
? globalConfig.userInfo.LocalSite
: '',
}); });
const dataList = detail?.data; const dataList = detail?.data;
if (!dataList) return setVideoData([]); if (!dataList) return setVideoData([]);
...@@ -1800,9 +1786,7 @@ const ConfigurationView = (props) => { ...@@ -1800,9 +1786,7 @@ const ConfigurationView = (props) => {
const own = myDiagram ? myDiagram.model.findNodeDataForKey('bgCase') : {}; const own = myDiagram ? myDiagram.model.findNodeDataForKey('bgCase') : {};
props.bgMethod && props.bgMethod(own); props.bgMethod && props.bgMethod(own);
return v return v
? `/PandaMonitor/Monitor/SketchPad/PreviewResource?name=${v}&_site=${ ? `/PandaMonitor/Monitor/SketchPad/PreviewResource?name=${v}&_site=${siteCodeStr}`
globalConfig?.userInfo?.LocalSite || ''
}`
: ''; : '';
}).makeTwoWay(), }).makeTwoWay(),
new go.Binding('scale', 'scale').makeTwoWay(), new go.Binding('scale', 'scale').makeTwoWay(),
...@@ -1968,9 +1952,7 @@ const ConfigurationView = (props) => { ...@@ -1968,9 +1952,7 @@ const ConfigurationView = (props) => {
new go.Binding('source', 'imgSrc', function (v) { new go.Binding('source', 'imgSrc', function (v) {
return !v return !v
? require('./images/组态/默认.png') ? require('./images/组态/默认.png')
: `/PandaMonitor/Monitor/SketchPad/PreviewResource?name=${v}&_site=${ : `/PandaMonitor/Monitor/SketchPad/PreviewResource?name=${v}&_site=${siteCodeStr}`;
globalConfig?.userInfo?.LocalSite || ''
}`;
}).makeTwoWay(), }).makeTwoWay(),
new go.Binding('scale', 'scale').makeTwoWay(), new go.Binding('scale', 'scale').makeTwoWay(),
new go.Binding('width', 'width').makeTwoWay(), new go.Binding('width', 'width').makeTwoWay(),
......
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