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

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

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