Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
web-tool
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tool
web-tool
Commits
c59e380f
Commit
c59e380f
authored
Dec 19, 2023
by
Gwofoo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了bug
parent
5cbf7fd2
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
81 additions
and
90 deletions
+81
-90
amos.config.js
packages/graphmod-atl/amos.config.js
+2
-2
api.js
packages/graphmod-atl/src/api.js
+21
-2
Scene.js
packages/graphmod-atl/src/scene/Scene.js
+47
-54
api.js
packages/graphmod-atl/src/scene/api.js
+0
-25
index.scss
packages/graphmod-atl/src/scene/index.scss
+5
-3
_proxy.js
packages/graphmod-scripts/src/_proxy.js
+5
-2
gateWay.js
packages/graphmod-utils/src/gateWay.js
+1
-2
No files found.
packages/graphmod-atl/amos.config.js
View file @
c59e380f
...
@@ -24,9 +24,9 @@
...
@@ -24,9 +24,9 @@
},
},
// 请求头信息
// 请求头信息
headers
:
{
headers
:
{
appKey
:
'
studio_normalapp_3144441
'
,
appKey
:
'
AMOS_STUDIO
'
,
product
:
'AMOS_STUDIO_WEB'
,
product
:
'AMOS_STUDIO_WEB'
,
token
:
'
6147861e-da09-4afb-a031-5ef2d9a6ebc9
'
token
:
'
d5828ba0-9670-42f5-bf9b-4046f32a6385
'
}
}
};
};
...
...
packages/graphmod-atl/src/api.js
View file @
c59e380f
...
@@ -4,7 +4,6 @@ import * as endConf from 'amos-processor/lib/config/endconf';
...
@@ -4,7 +4,6 @@ import * as endConf from 'amos-processor/lib/config/endconf';
import
{
request
,
gateWay
}
from
'@gm/graphmod-utils'
;
import
{
request
,
gateWay
}
from
'@gm/graphmod-utils'
;
const
completePrefix
=
endConf
.
completePrefix
;
const
AmosConfig
=
endConf
.
AmosConfig
;
const
AmosConfig
=
endConf
.
AmosConfig
;
const
baseURI
=
AmosConfig
.
httpURI
.
baseURI
;
const
baseURI
=
AmosConfig
.
httpURI
.
baseURI
;
...
@@ -13,6 +12,7 @@ const {
...
@@ -13,6 +12,7 @@ const {
commonPost
,
commonPost
,
commonPut
,
commonPut
,
formatUrl
,
formatUrl
,
completePrefix
,
commonDelete
,
commonDelete
,
formatObjUrl
,
formatObjUrl
,
fileDownload
fileDownload
...
@@ -23,7 +23,9 @@ export const UrlConsts = {
...
@@ -23,7 +23,9 @@ export const UrlConsts = {
deleteAgency
:
(
url
)
=>
completePrefix
(
baseURI
,
'atl/agency/relation/{agencyCode}/{sequenceNbrs}'
),
deleteAgency
:
(
url
)
=>
completePrefix
(
baseURI
,
'atl/agency/relation/{agencyCode}/{sequenceNbrs}'
),
// exportAgency: (url) => completePrefix(baseURI, 'atl/agency/export/{agencyCode}/{sequenceNbrs}'),
// exportAgency: (url) => completePrefix(baseURI, 'atl/agency/export/{agencyCode}/{sequenceNbrs}'),
exportAgency
:
(
url
)
=>
completePrefix
(
baseURI
,
'atl/agency/export/{agencyCode}/{ipSeq}/{sequenceNbrs}'
),
exportAgency
:
(
url
)
=>
completePrefix
(
baseURI
,
'atl/agency/export/{agencyCode}/{ipSeq}/{sequenceNbrs}'
),
generateSqlUrl
:
url
=>
completePrefix
(
baseURI
,
'atl/v1/dataApi/generateSQL'
)
// 通用导出SQL脚本 get
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
};
};
/**
/**
...
@@ -46,3 +48,20 @@ export const templateDownload = (params) => {
...
@@ -46,3 +48,20 @@ export const templateDownload = (params) => {
export
const
exportByAgencyCode
=
(
agencyCode
,
ipSeq
,
sequenceNbrs
)
=>
{
export
const
exportByAgencyCode
=
(
agencyCode
,
ipSeq
,
sequenceNbrs
)
=>
{
return
fileDownload
({
url
:
formatUrl
(
UrlConsts
.
exportAgency
(),
{
agencyCode
,
ipSeq
,
sequenceNbrs
})
});
return
fileDownload
({
url
:
formatUrl
(
UrlConsts
.
exportAgency
(),
{
agencyCode
,
ipSeq
,
sequenceNbrs
})
});
};
};
/**
* 查询场景案例列表
*/
export
const
getSortSences
=
(
categoryScene
,
miniSences
)
=>
{
const
formData
=
new
window
.
FormData
();
formData
.
append
(
'categoryScene'
,
categoryScene
);
formData
.
append
(
'miniSences'
,
miniSences
);
return
commonPost
(
UrlConsts
.
getSortSencesUrl
(),
formData
);
};
/**
* 查询场景案例大屏被点击后的登录token
*/
export
const
getSceneLoginToken
=
()
=>
{
return
commonGet
(
UrlConsts
.
getSceneLoginToken
());
};
packages/graphmod-atl/src/scene/Scene.js
View file @
c59e380f
import
React
,
{
Component
}
from
'react'
;
import
React
,
{
Component
}
from
'react'
;
import
PropTypes
from
'prop-types'
;
import
PropTypes
from
'prop-types'
;
import
{
Tabs
,
TagSelect
,
StdFormRow
,
CardPane
,
Row
,
Col
}
from
'amos-framework'
;
import
{
Tabs
,
TagSelect
,
StdFormRow
,
CardPane
,
Row
,
Col
}
from
'amos-framework'
;
import
{
getSortSences
}
from
'./api'
;
import
{
getSortSences
,
getSceneLoginToken
}
from
'./../api'
;
import
{
commonGet
}
from
'@gm/graphmod-utils/src/request'
;
import
'./index.scss'
;
import
'./index.scss'
;
const
{
TabList
,
Tab
,
TabPanel
}
=
Tabs
;
const
{
TabList
,
Tab
,
TabPanel
}
=
Tabs
;
const
categoryScene
=
[
'全部'
,
'新能源'
,
'水利环境'
,
'医疗健康'
,
'智慧城市'
,
'智慧园区'
,
'企业运营'
,
'物流仓库'
,
'生产制造'
,
'其他'
];
const
categoryScene
=
[
'全部'
,
'新能源'
,
'水利环境'
,
'医疗健康'
,
'智慧城市'
,
'智慧园区'
,
'企业运营'
,
'物流仓库'
,
'生产制造'
,
'其他'
];
const
miniSences
=
[
'综合排序'
,
'热门推荐'
,
'最新发布'
];
const
miniSences
=
[
'综合排序'
,
'热门推荐'
,
'最新发布'
];
function
ListCards
({
cardItems
})
{
const
rows
=
[];
// console.log("传入ListCards中的carditems:")
// console.log(cardItems)
function
handleClick
()
{
// window.open(this);
// 向后端先发送
const
backendUrl
=
"http://172.16.0.120:30002/atl/forward?url="
+
encodeURIComponent
(
this
);
commonGet
(
backendUrl
).
then
(
data
=>
{
console
.
log
(
'Data:'
,
data
);
window
.
open
(
this
+
"&token="
+
data
);
});
}
for
(
let
i
=
0
;
i
<
cardItems
.
length
;
i
+=
4
)
{
const
rowItems
=
cardItems
.
slice
(
i
,
i
+
4
);
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
=
{
handleClick
.
bind
(
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
}
/
>
<
/div
>
<
div
style
=
{{
padding
:
'10px 0px 10px 80px'
}}
>
<
h2
style
=
{{
textAlign
:
'left'
,
margin
:
0
}}
>
{
cardItems
.
templateName
}
<
/h2
>
<
div
style
=
{{
display
:
'flex'
}}
>
<
p
style
=
{{
textAlign
:
'left'
,
marginTop
:
'5px'
,
fontSize
:
'16px'
}}
>
{
cardItems
.
agencyName
}
|
热度指数
:{
cardItems
.
viewTimes
}
<
/p
>
<
/div
>
<
/div
>
<
/CardPane
>
<
/button
>
<
/div
>
<
/Col
>
));
rows
.
push
(
<
Row
gutter
=
{
16
}
key
=
{((
i
+
1
)
/
4
)
|
0
}
>
{
cols
}
<
/Row
>
);
}
return
<
div
>
{
rows
}
<
/div>
;
}
class
Scene
extends
Component
{
class
Scene
extends
Component
{
static
propTypes
=
{
static
propTypes
=
{
routeState
:
PropTypes
.
object
,
routeState
:
PropTypes
.
object
,
...
@@ -134,8 +83,52 @@ class Scene extends Component {
...
@@ -134,8 +83,52 @@ class Scene extends Component {
}
}
};
};
handleClick
=
(
templateLink
)
=>
{
getSceneLoginToken
().
then
(
d
=>
{
if
(
d
){
window
.
open
(
templateLink
+
"&token="
+
d
);
}
});
}
renderListCards
=
(
cardItems
)
=>
{
const
rows
=
[];
for
(
let
i
=
0
;
i
<
cardItems
.
length
;
i
+=
4
)
{
const
rowItems
=
cardItems
.
slice
(
i
,
i
+
4
);
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
)}
>
<
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
}
/
>
<
/div
>
<
div
style
=
{{
padding
:
'10px 0px 10px 80px'
}}
>
<
h2
style
=
{{
textAlign
:
'left'
,
margin
:
0
}}
>
{
cardItems
.
templateName
}
<
/h2
>
<
div
style
=
{{
display
:
'flex'
}}
>
<
p
style
=
{{
textAlign
:
'left'
,
marginTop
:
'5px'
,
fontSize
:
'16px'
}}
>
{
cardItems
.
agencyName
}
|
热度指数
:{
cardItems
.
viewTimes
}
<
/p
>
<
/div
>
<
/div
>
<
/CardPane
>
<
/button
>
<
/div
>
<
/Col
>
));
rows
.
push
(
<
Row
gutter
=
{
16
}
key
=
{((
i
+
1
)
/
4
)
|
0
}
>
{
cols
}
<
/Row
>
);
}
return
<
div
>
{
rows
}
<
/div>
;
}
render
()
{
render
()
{
const
{
mode
}
=
this
.
state
;
const
{
mode
,
cardItems
}
=
this
.
state
;
return
(
return
(
<
div
>
<
div
>
<
Tabs
mode
=
{
mode
}
>
<
Tabs
mode
=
{
mode
}
>
...
@@ -151,7 +144,7 @@ class Scene extends Component {
...
@@ -151,7 +144,7 @@ class Scene extends Component {
<
TagSelect
defaultValue
=
{
miniSences
[
0
]}
data
=
{
miniSences
}
onChange
=
{
this
.
handleMiniSenecesSubmit
}
expandable
single
/>
<
TagSelect
defaultValue
=
{
miniSences
[
0
]}
data
=
{
miniSences
}
onChange
=
{
this
.
handleMiniSenecesSubmit
}
expandable
single
/>
<
/StdFormRow
>
<
/StdFormRow
>
<
div
style
=
{{
overflowY
:
'auto'
,
height
:
'800px'
}}
>
<
div
style
=
{{
overflowY
:
'auto'
,
height
:
'800px'
}}
>
<
ListCards
cardItems
=
{
this
.
state
.
cardItems
}
/
>
{
this
.
renderListCards
(
cardItems
)}
<
/div
>
<
/div
>
<
/TabPanel
>
<
/TabPanel
>
<
/Tabs
>
<
/Tabs
>
...
...
packages/graphmod-atl/src/scene/api.js
deleted
100644 → 0
View file @
5cbf7fd2
import
{
request
,
gateWay
}
from
'@gm/graphmod-utils'
;
const
{
commonGet
,
commonPost
,
commonPut
,
formatUrl
,
completePrefix
,
commonDelete
,
formatObjUrl
,
fileDownload
,
buildPageable
,
}
=
request
;
export
const
UrlConsts
=
{
getSortSencesUrl
:
()
=>
completePrefix
()(
gateWay
.
atl
,
'scene/select/all'
)
};
export
const
getSortSences
=
(
categoryScene
,
miniSences
)
=>
{
const
formData
=
new
window
.
FormData
();
formData
.
append
(
'categoryScene'
,
categoryScene
);
formData
.
append
(
'miniSences'
,
miniSences
);
return
commonPost
(
UrlConsts
.
getSortSencesUrl
(),
formData
);
};
packages/graphmod-atl/src/scene/index.scss
View file @
c59e380f
...
@@ -34,9 +34,10 @@
...
@@ -34,9 +34,10 @@
}
}
#scene
{
#scene
{
.amos-stdform-row-title
>
span
{
.amos-stdform-row-title
{
span
{
height
:
42px
;
height
:
42px
;
line-height
:
42px
;
line-height
:
42px
;
}
}
}
}
}
\ No newline at end of file
packages/graphmod-scripts/src/_proxy.js
View file @
c59e380f
...
@@ -7,6 +7,9 @@ const proxy = {
...
@@ -7,6 +7,9 @@ const proxy = {
target
:
'http://39.98.45.134:50090/'
,
target
:
'http://39.98.45.134:50090/'
,
pathRewrite
:
{
'^/baseURI'
:
''
}
pathRewrite
:
{
'^/baseURI'
:
''
}
},
},
'/atl'
:
{
target
:
'http://172.16.0.120:30002/'
,
},
'/bizURI/atl'
:
{
'/bizURI/atl'
:
{
target
:
'http://172.16.0.14:30002/'
,
target
:
'http://172.16.0.14:30002/'
,
// changeOrigin: true,
// changeOrigin: true,
...
@@ -21,11 +24,11 @@ const proxy = {
...
@@ -21,11 +24,11 @@ const proxy = {
},
},
'/public'
:
{
'/public'
:
{
// target: 'http://172.16.10.202:9000/'
// target: 'http://172.16.10.202:9000/'
target
:
'http://172.16.
10.72
/'
target
:
'http://172.16.
3.18:9000
/'
},
},
'/upload'
:
{
'/upload'
:
{
// target: 'http://172.16.10.202:9000/'
// target: 'http://172.16.10.202:9000/'
target
:
'http://172.16.
10.72
/'
target
:
'http://172.16.
3.18:9000
/'
}
}
};
};
...
...
packages/graphmod-utils/src/gateWay.js
View file @
c59e380f
...
@@ -22,6 +22,5 @@ export default {
...
@@ -22,6 +22,5 @@ export default {
idx
:
'idx'
,
// 指标系统
idx
:
'idx'
,
// 指标系统
risk
:
'risk'
,
// 风险模型
risk
:
'risk'
,
// 风险模型
report
:
'report'
,
// 数据填报
report
:
'report'
,
// 数据填报
atl
:
'atl'
// 工具库
atl
:
'atl'
};
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment