Commit 99c0aa63 authored by 何虹's avatar 何虹 💬

升级querypage webquery的接口

parent d5e054f2
...@@ -1983,7 +1983,6 @@ __webpack_require__.r(__webpack_exports__); ...@@ -1983,7 +1983,6 @@ __webpack_require__.r(__webpack_exports__);
const urlParam = hs_util_js__WEBPACK_IMPORTED_MODULE_1___default().SystemModule.getUrlParams() 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 { class Control {
constructor(requestClient) { constructor(requestClient) {
this.requestClient = requestClient this.requestClient = requestClient
...@@ -1991,7 +1990,7 @@ class Control { ...@@ -1991,7 +1990,7 @@ class Control {
} }
// 处理传入的data 如果有appCode,pageName dbName // 处理传入的data 如果有appCode,pageName dbName
packParamHandle (parms = {}) { packParamHandle (parms = {}) {
const { appCode, pageName, dbName, dbCode, userId } = parms const { appCode, pageName, dbName, dbCode, userId, configType } = parms
if (!appCode) { if (!appCode) {
parms.appCode = this.requestClient.appCode //|| urlParam.appCode parms.appCode = this.requestClient.appCode //|| urlParam.appCode
} }
...@@ -2004,8 +2003,11 @@ class Control { ...@@ -2004,8 +2003,11 @@ class Control {
if (!dbCode) { if (!dbCode) {
parms.dbCode = urlParam.dbCode || '' parms.dbCode = urlParam.dbCode || ''
} }
if (!userId) { if (!userId && userId !== 0) {
parms.userId = user_id || 1 parms.userId = -2
}
if (!configType && configType !== 0) {
parms.configType = -2
} }
} }
// 保存控件配置 // 保存控件配置
...@@ -2025,9 +2027,9 @@ class Control { ...@@ -2025,9 +2027,9 @@ class Control {
*/ */
webChartConfigSave (param) { // routerParms: page路由 position位置 other参数, sConfig 配置json sData 数据json webChartConfigSave (param) { // routerParms: page路由 position位置 other参数, sConfig 配置json sData 数据json
this.packParamHandle(param) 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 = { 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_name: dbName,
db_code: dbCode, db_code: dbCode,
param: { param: {
...@@ -2131,7 +2133,7 @@ class Control { ...@@ -2131,7 +2133,7 @@ class Control {
// 控件配置查询 // 控件配置查询
webControlQuery (data = {}) { webControlQuery (data = {}) {
this.packParamHandle(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 = { const postData = {
db_name: dbName, db_name: dbName,
app_code: appCode, app_code: appCode,
...@@ -2140,7 +2142,8 @@ class Control { ...@@ -2140,7 +2142,8 @@ class Control {
control_name: controlName, control_name: controlName,
return_type: returnType || 3, return_type: returnType || 3,
db_code: dbCode, 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) return this.requestClient.post(_common_commonModule__WEBPACK_IMPORTED_MODULE_0__.WEB_QUERY_PAGE, postData)
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
import { WEB_QUERY, WEB_QUERY_QUERY, WEB_QUERY_QUERY_VALUE, WEB_QUERY_PAGE } from '../common/commonModule' import { WEB_QUERY, WEB_QUERY_QUERY, WEB_QUERY_QUERY_VALUE, WEB_QUERY_PAGE } from '../common/commonModule'
import hsUtil from 'hs-util-js' import hsUtil from 'hs-util-js'
const urlParam = hsUtil.SystemModule.getUrlParams() const urlParam = hsUtil.SystemModule.getUrlParams()
const { user_id } = hsUtil.SystemModule.parseGlobalParams()
class Control { class Control {
constructor(requestClient) { constructor(requestClient) {
this.requestClient = requestClient this.requestClient = requestClient
...@@ -10,7 +9,7 @@ class Control { ...@@ -10,7 +9,7 @@ class Control {
} }
// 处理传入的data 如果有appCode,pageName dbName // 处理传入的data 如果有appCode,pageName dbName
packParamHandle (parms = {}) { packParamHandle (parms = {}) {
const { appCode, pageName, dbName, dbCode, userId } = parms const { appCode, pageName, dbName, dbCode, userId, configType } = parms
if (!appCode) { if (!appCode) {
parms.appCode = this.requestClient.appCode //|| urlParam.appCode parms.appCode = this.requestClient.appCode //|| urlParam.appCode
} }
...@@ -23,8 +22,11 @@ class Control { ...@@ -23,8 +22,11 @@ class Control {
if (!dbCode) { if (!dbCode) {
parms.dbCode = urlParam.dbCode || '' parms.dbCode = urlParam.dbCode || ''
} }
if (!userId) { if (!userId && userId !== 0) {
parms.userId = user_id || 1 parms.userId = -2
}
if (!configType && configType !== 0) {
parms.configType = -2
} }
} }
// 保存控件配置 // 保存控件配置
...@@ -44,9 +46,9 @@ class Control { ...@@ -44,9 +46,9 @@ class Control {
*/ */
webChartConfigSave (param) { // routerParms: page路由 position位置 other参数, sConfig 配置json sData 数据json webChartConfigSave (param) { // routerParms: page路由 position位置 other参数, sConfig 配置json sData 数据json
this.packParamHandle(param) 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 = { 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_name: dbName,
db_code: dbCode, db_code: dbCode,
param: { param: {
...@@ -150,7 +152,7 @@ class Control { ...@@ -150,7 +152,7 @@ class Control {
// 控件配置查询 // 控件配置查询
webControlQuery (data = {}) { webControlQuery (data = {}) {
this.packParamHandle(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 = { const postData = {
db_name: dbName, db_name: dbName,
app_code: appCode, app_code: appCode,
...@@ -159,7 +161,8 @@ class Control { ...@@ -159,7 +161,8 @@ class Control {
control_name: controlName, control_name: controlName,
return_type: returnType || 3, return_type: returnType || 3,
db_code: dbCode, db_code: dbCode,
user_id: userId user_id: userId,
config_type: configType
} }
return this.requestClient.post(WEB_QUERY_PAGE, postData) return this.requestClient.post(WEB_QUERY_PAGE, postData)
} }
......
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