Commit be5feb62 authored by Gwofoo's avatar Gwofoo

实现:场景案例点击跳转

parent c59e380f
......@@ -25,7 +25,8 @@ export const UrlConsts = {
exportAgency: (url) => completePrefix(baseURI, 'atl/agency/export/{agencyCode}/{ipSeq}/{sequenceNbrs}'),
generateSqlUrl: url => completePrefix(baseURI, 'atl/v1/dataApi/generateSQL'), // 通用导出SQL脚本 get
getSortSencesUrl: () => completePrefix()(gateWay.atl, 'scene/select/all'), // 查询场景案例列表 get
getSceneLoginToken: () => completePrefix()(gateWay.atl, 'forward') // 查询场景案例大屏被点击后的登录token get
getSceneLoginTokenUrl: () => 'atl/forward' // 查询场景案例大屏被点击后的登录token get
// getSceneLoginTokenUrl: () => completePrefix(gateWay.atl, 'forward') // 查询场景案例大屏被点击后的登录token get
};
/**
......@@ -63,5 +64,5 @@ export const getSortSences = (categoryScene, miniSences) => {
* 查询场景案例大屏被点击后的登录token
*/
export const getSceneLoginToken = () => {
return commonGet(UrlConsts.getSceneLoginToken());
return commonGet(UrlConsts.getSceneLoginTokenUrl());
};
......@@ -137,6 +137,20 @@ class DownloadView extends Component {
<ExecuteProgress visible={logsVisible} mqttUrl={dataConfig.mqttUrl} exeId={selectId} onClose={() => this.handleClose('logsVisible')} />
</div>
);
default:
return (
<div>
{dataConfig.position === 'header' ?
<div className="ig-stage-toolbar-right">
<BarGroup label="导出脚本" mode="none" position="right">
<IconButton colorful icon="export" title="导出SQL脚本" style={{ borderRadius: 4 }} onClick={() => this.handleItemClick()} />
</BarGroup>
</div>
:
<p onClick={this.handleItemClick}><Icon icon="download" />下载</p>}
<ExecuteProgress visible={logsVisible} mqttUrl={dataConfig.mqttUrl} exeId={selectId} onClose={() => this.handleClose('logsVisible')} />
</div>
);
}
}
......
......@@ -85,10 +85,13 @@ class Scene extends Component {
handleClick = (templateLink) => {
getSceneLoginToken().then(d => {
if(d){
window.open(templateLink + "&token=" + d);
}
window.open(templateLink + "&token=" + d);
})
.catch(e => {
window.open(templateLink);
});
}
renderListCards = (cardItems) => {
......@@ -99,7 +102,7 @@ class Scene extends Component {
const cols = rowItems.map((cardItems, index) => (
<Col span={6} key={index}>
<div style={{ margin: 15, display: 'flex', justifyContent: 'center' }}>
<button style={{ width: '100%', height: '100%', border: 0, padding: 0 }} onClick={this.handleClick(cardItems.templateLink)}>
<button style={{ width: '100%', height: '100%', border: 0, padding: 0 }} onClick={() => this.handleClick(cardItems.templateLink)}>
<CardPane style={{ width: '100%', height: 270, border: 0 }} bodyStyle={{ height: 270, padding: 0 }}>
<div style={{ height: '75%' }}>
<img alt="example" width="100%" height="100%" style={{ objectFit: 'cover', borderRadius: 10 }} src={cardItems.sketch} />
......
const proxy = {
// '/baseURI': {
// target: 'http://172.16.3.18:10005/',
// pathRewrite: { '^/baseURI': '' }
// },
'/baseURI/atl': {
target: 'http://39.98.45.134:50090/',
'/baseURI': {
target: 'http://172.16.3.18:10005/',
pathRewrite: { '^/baseURI': '' }
},
'/atl': {
target: 'http://172.16.0.120:30002/',
target: 'http://172.16.3.18:30002/',
// target: 'http://172.16.0.118:30002/',
},
'/bizURI/atl': {
target: 'http://172.16.0.14:30002/',
// changeOrigin: true,
target: 'http://172.16.3.18:30002/',
// target: 'http://172.16.0.118:30002/',
pathRewrite: { '^/bizURI': '' }
},
'/bizURI': {
......@@ -20,7 +17,7 @@ const proxy = {
pathRewrite: { '^/bizURI': '' }
},
'/group1': {
target: 'http://39.98.246.31:8888/'
target: 'http://172.16.3.18:9000/'
},
'/public': {
// target: 'http://172.16.10.202:9000/'
......
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