Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
H
hsWebHttpClient
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
何虹
hsWebHttpClient
Commits
99c0aa63
Commit
99c0aa63
authored
Mar 06, 2021
by
何虹
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
升级querypage webquery的接口
parent
d5e054f2
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
17 deletions
+23
-17
hsWebHttpClient.js
dist/hsWebHttpClient.js
+11
-8
hsWebHttpClient.min.js
dist/hsWebHttpClient.min.js
+1
-1
webChartConfig.js
src/packages/modules/webChartConfig.js
+11
-8
No files found.
dist/hsWebHttpClient.js
View file @
99c0aa63
...
...
@@ -1983,7 +1983,6 @@ __webpack_require__.r(__webpack_exports__);
const
urlParam
=
hs_util_js__WEBPACK_IMPORTED_MODULE_1___default
().
SystemModule
.
getUrlParams
()
const
{
user_id
}
=
hs_util_js__WEBPACK_IMPORTED_MODULE_1___default
().
SystemModule
.
parseGlobalParams
()
class
Control
{
constructor
(
requestClient
)
{
this
.
requestClient
=
requestClient
...
...
@@ -1991,7 +1990,7 @@ class Control {
}
// 处理传入的data 如果有appCode,pageName dbName
packParamHandle
(
parms
=
{})
{
const
{
appCode
,
pageName
,
dbName
,
dbCode
,
userId
}
=
parms
const
{
appCode
,
pageName
,
dbName
,
dbCode
,
userId
,
configType
}
=
parms
if
(
!
appCode
)
{
parms
.
appCode
=
this
.
requestClient
.
appCode
//|| urlParam.appCode
}
...
...
@@ -2004,8 +2003,11 @@ class Control {
if
(
!
dbCode
)
{
parms
.
dbCode
=
urlParam
.
dbCode
||
''
}
if
(
!
userId
)
{
parms
.
userId
=
user_id
||
1
if
(
!
userId
&&
userId
!==
0
)
{
parms
.
userId
=
-
2
}
if
(
!
configType
&&
configType
!==
0
)
{
parms
.
configType
=
-
2
}
}
// 保存控件配置
...
...
@@ -2025,9 +2027,9 @@ class Control {
*/
webChartConfigSave
(
param
)
{
// routerParms: page路由 position位置 other参数, sConfig 配置json sData 数据json
this
.
packParamHandle
(
param
)
const
{
appCode
,
pageName
,
controlName
,
controlType
,
querySql
,
mockData
,
userId
,
dbName
,
dbCode
,
config
,
data
}
=
param
const
{
appCode
,
pageName
,
controlName
,
controlType
,
querySql
,
mockData
,
userId
,
dbName
,
dbCode
,
config
,
data
,
configType
}
=
param
const
postData
=
{
exec_sql
:
`EXEC dbo.spappWebChartConfig_Save @sAppCode='
${
appCode
}
',@sPage='
${
pageName
}
',@sControl='
${
controlName
}
',@sControlType='
${
controlType
||
''
}
',@sConfig=:sConfig,@sData=:sData,@sQuerySql='
${
querySql
||
''
}
',@bMockData='
${
mockData
||
''
}
',@iUserId=
${
userId
||
1
}
`
,
exec_sql
:
`EXEC dbo.spappWebChartConfig_Save @sAppCode='
${
appCode
}
',@sPage='
${
pageName
}
',@sControl='
${
controlName
}
',@sControlType='
${
controlType
||
''
}
',@sConfig=:sConfig,@sData=:sData,@sQuerySql='
${
querySql
||
''
}
',@bMockData='
${
mockData
||
''
}
',@iUserId=
${
userId
}
,@iConfigType=
${
configType
}
`
,
db_name
:
dbName
,
db_code
:
dbCode
,
param
:
{
...
...
@@ -2131,7 +2133,7 @@ class Control {
// 控件配置查询
webControlQuery
(
data
=
{})
{
this
.
packParamHandle
(
data
)
const
{
dbName
,
pageName
,
param
,
appCode
,
controlName
,
returnType
,
dbCode
,
userId
}
=
data
const
{
dbName
,
pageName
,
param
,
appCode
,
controlName
,
returnType
,
dbCode
,
userId
,
configType
}
=
data
const
postData
=
{
db_name
:
dbName
,
app_code
:
appCode
,
...
...
@@ -2140,7 +2142,8 @@ class Control {
control_name
:
controlName
,
return_type
:
returnType
||
3
,
db_code
:
dbCode
,
user_id
:
userId
user_id
:
userId
,
config_type
:
configType
}
return
this
.
requestClient
.
post
(
_common_commonModule__WEBPACK_IMPORTED_MODULE_0__
.
WEB_QUERY_PAGE
,
postData
)
}
...
...
dist/hsWebHttpClient.min.js
View file @
99c0aa63
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/packages/modules/webChartConfig.js
View file @
99c0aa63
...
...
@@ -2,7 +2,6 @@
import
{
WEB_QUERY
,
WEB_QUERY_QUERY
,
WEB_QUERY_QUERY_VALUE
,
WEB_QUERY_PAGE
}
from
'../common/commonModule'
import
hsUtil
from
'hs-util-js'
const
urlParam
=
hsUtil
.
SystemModule
.
getUrlParams
()
const
{
user_id
}
=
hsUtil
.
SystemModule
.
parseGlobalParams
()
class
Control
{
constructor
(
requestClient
)
{
this
.
requestClient
=
requestClient
...
...
@@ -10,7 +9,7 @@ class Control {
}
// 处理传入的data 如果有appCode,pageName dbName
packParamHandle
(
parms
=
{})
{
const
{
appCode
,
pageName
,
dbName
,
dbCode
,
userId
}
=
parms
const
{
appCode
,
pageName
,
dbName
,
dbCode
,
userId
,
configType
}
=
parms
if
(
!
appCode
)
{
parms
.
appCode
=
this
.
requestClient
.
appCode
//|| urlParam.appCode
}
...
...
@@ -23,8 +22,11 @@ class Control {
if
(
!
dbCode
)
{
parms
.
dbCode
=
urlParam
.
dbCode
||
''
}
if
(
!
userId
)
{
parms
.
userId
=
user_id
||
1
if
(
!
userId
&&
userId
!==
0
)
{
parms
.
userId
=
-
2
}
if
(
!
configType
&&
configType
!==
0
)
{
parms
.
configType
=
-
2
}
}
// 保存控件配置
...
...
@@ -44,9 +46,9 @@ class Control {
*/
webChartConfigSave
(
param
)
{
// routerParms: page路由 position位置 other参数, sConfig 配置json sData 数据json
this
.
packParamHandle
(
param
)
const
{
appCode
,
pageName
,
controlName
,
controlType
,
querySql
,
mockData
,
userId
,
dbName
,
dbCode
,
config
,
data
}
=
param
const
{
appCode
,
pageName
,
controlName
,
controlType
,
querySql
,
mockData
,
userId
,
dbName
,
dbCode
,
config
,
data
,
configType
}
=
param
const
postData
=
{
exec_sql
:
`EXEC dbo.spappWebChartConfig_Save @sAppCode='
${
appCode
}
',@sPage='
${
pageName
}
',@sControl='
${
controlName
}
',@sControlType='
${
controlType
||
''
}
',@sConfig=:sConfig,@sData=:sData,@sQuerySql='
${
querySql
||
''
}
',@bMockData='
${
mockData
||
''
}
',@iUserId=
${
userId
||
1
}
`
,
exec_sql
:
`EXEC dbo.spappWebChartConfig_Save @sAppCode='
${
appCode
}
',@sPage='
${
pageName
}
',@sControl='
${
controlName
}
',@sControlType='
${
controlType
||
''
}
',@sConfig=:sConfig,@sData=:sData,@sQuerySql='
${
querySql
||
''
}
',@bMockData='
${
mockData
||
''
}
',@iUserId=
${
userId
}
,@iConfigType=
${
configType
}
`
,
db_name
:
dbName
,
db_code
:
dbCode
,
param
:
{
...
...
@@ -150,7 +152,7 @@ class Control {
// 控件配置查询
webControlQuery
(
data
=
{})
{
this
.
packParamHandle
(
data
)
const
{
dbName
,
pageName
,
param
,
appCode
,
controlName
,
returnType
,
dbCode
,
userId
}
=
data
const
{
dbName
,
pageName
,
param
,
appCode
,
controlName
,
returnType
,
dbCode
,
userId
,
configType
}
=
data
const
postData
=
{
db_name
:
dbName
,
app_code
:
appCode
,
...
...
@@ -159,7 +161,8 @@ class Control {
control_name
:
controlName
,
return_type
:
returnType
||
3
,
db_code
:
dbCode
,
user_id
:
userId
user_id
:
userId
,
config_type
:
configType
}
return
this
.
requestClient
.
post
(
WEB_QUERY_PAGE
,
postData
)
}
...
...
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