Commit 4c611427 authored by 何虹's avatar 何虹 💬

优化健壮

parent d1447e4a
...@@ -1990,7 +1990,7 @@ class Control { ...@@ -1990,7 +1990,7 @@ class Control {
this.moduleName = 'WebChartConfigModule' this.moduleName = 'WebChartConfigModule'
} }
// 处理传入的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 } = parms
if (!appCode) { if (!appCode) {
parms.appCode = this.requestClient.appCode //|| urlParam.appCode parms.appCode = this.requestClient.appCode //|| urlParam.appCode
...@@ -2063,7 +2063,7 @@ class Control { ...@@ -2063,7 +2063,7 @@ class Control {
return this.requestClient.post(_common_commonModule__WEBPACK_IMPORTED_MODULE_0__.WEB_QUERY_QUERY, postData) return this.requestClient.post(_common_commonModule__WEBPACK_IMPORTED_MODULE_0__.WEB_QUERY_QUERY, postData)
} }
// 获取将要另存到本地的配置 // 获取将要另存到本地的配置
webChartConfigSaveAs (data) { webChartConfigSaveAs (data = {}) {
this.packParamHandle(data) this.packParamHandle(data)
const { appCode, pageName, dbName, dbCode } = data const { appCode, pageName, dbName, dbCode } = data
const postData = { const postData = {
...@@ -2074,7 +2074,7 @@ class Control { ...@@ -2074,7 +2074,7 @@ class Control {
return this.requestClient.post(_common_commonModule__WEBPACK_IMPORTED_MODULE_0__.WEB_QUERY_QUERY_VALUE, postData) return this.requestClient.post(_common_commonModule__WEBPACK_IMPORTED_MODULE_0__.WEB_QUERY_QUERY_VALUE, postData)
} }
// 另存配置 // 另存配置
async saveAsDataToLocal (data) { async saveAsDataToLocal (data = {}) {
this.packParamHandle(data) this.packParamHandle(data)
const { appCode, pageName } = data const { appCode, pageName } = data
const res = await this.webChartConfigSaveAs(data) const res = await this.webChartConfigSaveAs(data)
...@@ -2099,7 +2099,7 @@ class Control { ...@@ -2099,7 +2099,7 @@ class Control {
} }
// 直接执行sql语句 // 直接执行sql语句
execSql (data) { execSql (data) {
this.packParamHandle(data) this.packParamHandle(data = {})
const { execSql, dbName, dbCode } = data const { execSql, dbName, dbCode } = data
const postData = { const postData = {
exec_sql: execSql, exec_sql: execSql,
...@@ -2108,7 +2108,7 @@ class Control { ...@@ -2108,7 +2108,7 @@ class Control {
} }
return this.requestClient.post(_common_commonModule__WEBPACK_IMPORTED_MODULE_0__.WEB_QUERY_QUERY, postData) return this.requestClient.post(_common_commonModule__WEBPACK_IMPORTED_MODULE_0__.WEB_QUERY_QUERY, postData)
} }
webChartConfigQueryLog (data) { webChartConfigQueryLog (data = {}) {
this.packParamHandle(data) this.packParamHandle(data)
const { appCode, pageName, controlName, dbName, dbCode } = data const { appCode, pageName, controlName, dbName, dbCode } = data
const postData = { const postData = {
...@@ -2118,7 +2118,7 @@ class Control { ...@@ -2118,7 +2118,7 @@ class Control {
} }
return this.requestClient.post(_common_commonModule__WEBPACK_IMPORTED_MODULE_0__.WEB_QUERY_QUERY, postData) return this.requestClient.post(_common_commonModule__WEBPACK_IMPORTED_MODULE_0__.WEB_QUERY_QUERY, postData)
} }
webChartConfigRevert (data) { webChartConfigRevert (data = {}) {
this.packParamHandle(data) this.packParamHandle(data)
const { appCode, pageName, dbName, dbCode, controlName, version } = data const { appCode, pageName, dbName, dbCode, controlName, version } = data
const postData = { const postData = {
...@@ -2129,7 +2129,7 @@ class Control { ...@@ -2129,7 +2129,7 @@ class Control {
return this.requestClient.post(_common_commonModule__WEBPACK_IMPORTED_MODULE_0__.WEB_QUERY, postData) return this.requestClient.post(_common_commonModule__WEBPACK_IMPORTED_MODULE_0__.WEB_QUERY, postData)
} }
// 控件配置查询 // 控件配置查询
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 } = data
const postData = { const postData = {
...@@ -22099,7 +22099,7 @@ class System { ...@@ -22099,7 +22099,7 @@ class System {
return this.requestClient.get(`${_common_commonProxy__WEBPACK_IMPORTED_MODULE_0__.TOOL_PROXY}/common/new_id/${number}/`) return this.requestClient.get(`${_common_commonProxy__WEBPACK_IMPORTED_MODULE_0__.TOOL_PROXY}/common/new_id/${number}/`)
} }
// 获取 动态中的action列表 // 获取 动态中的action列表
queryBillpbWebDyncCode (data) { queryBillpbWebDyncCode (data = {}) {
const { appCode, pageName } = data const { appCode, pageName } = data
const params = { const params = {
parms: { parms: {
...@@ -22113,7 +22113,7 @@ class System { ...@@ -22113,7 +22113,7 @@ class System {
return this.restfulClient.query(params) return this.restfulClient.query(params)
} }
// 获取 动态中的action列表 // 获取 动态中的action列表
saveBillpbWebDyncCode (data) { saveBillpbWebDyncCode (data = {}) {
const { appCode, pageName, app_code, page_name } = data const { appCode, pageName, app_code, page_name } = data
if (!appCode && !app_code) { if (!appCode && !app_code) {
data.app_code = this.requestClient.appCode data.app_code = this.requestClient.appCode
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -11,7 +11,7 @@ class System { ...@@ -11,7 +11,7 @@ class System {
return this.requestClient.get(`${TOOL_PROXY}/common/new_id/${number}/`) return this.requestClient.get(`${TOOL_PROXY}/common/new_id/${number}/`)
} }
// 获取 动态中的action列表 // 获取 动态中的action列表
queryBillpbWebDyncCode (data) { queryBillpbWebDyncCode (data = {}) {
const { appCode, pageName } = data const { appCode, pageName } = data
const params = { const params = {
parms: { parms: {
...@@ -25,7 +25,7 @@ class System { ...@@ -25,7 +25,7 @@ class System {
return this.restfulClient.query(params) return this.restfulClient.query(params)
} }
// 获取 动态中的action列表 // 获取 动态中的action列表
saveBillpbWebDyncCode (data) { saveBillpbWebDyncCode (data = {}) {
const { appCode, pageName, app_code, page_name } = data const { appCode, pageName, app_code, page_name } = data
if (!appCode && !app_code) { if (!appCode && !app_code) {
data.app_code = this.requestClient.appCode data.app_code = this.requestClient.appCode
......
...@@ -9,7 +9,7 @@ class Control { ...@@ -9,7 +9,7 @@ class Control {
this.moduleName = 'WebChartConfigModule' this.moduleName = 'WebChartConfigModule'
} }
// 处理传入的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 } = parms
if (!appCode) { if (!appCode) {
parms.appCode = this.requestClient.appCode //|| urlParam.appCode parms.appCode = this.requestClient.appCode //|| urlParam.appCode
...@@ -82,7 +82,7 @@ class Control { ...@@ -82,7 +82,7 @@ class Control {
return this.requestClient.post(WEB_QUERY_QUERY, postData) return this.requestClient.post(WEB_QUERY_QUERY, postData)
} }
// 获取将要另存到本地的配置 // 获取将要另存到本地的配置
webChartConfigSaveAs (data) { webChartConfigSaveAs (data = {}) {
this.packParamHandle(data) this.packParamHandle(data)
const { appCode, pageName, dbName, dbCode } = data const { appCode, pageName, dbName, dbCode } = data
const postData = { const postData = {
...@@ -93,7 +93,7 @@ class Control { ...@@ -93,7 +93,7 @@ class Control {
return this.requestClient.post(WEB_QUERY_QUERY_VALUE, postData) return this.requestClient.post(WEB_QUERY_QUERY_VALUE, postData)
} }
// 另存配置 // 另存配置
async saveAsDataToLocal (data) { async saveAsDataToLocal (data = {}) {
this.packParamHandle(data) this.packParamHandle(data)
const { appCode, pageName } = data const { appCode, pageName } = data
const res = await this.webChartConfigSaveAs(data) const res = await this.webChartConfigSaveAs(data)
...@@ -118,7 +118,7 @@ class Control { ...@@ -118,7 +118,7 @@ class Control {
} }
// 直接执行sql语句 // 直接执行sql语句
execSql (data) { execSql (data) {
this.packParamHandle(data) this.packParamHandle(data = {})
const { execSql, dbName, dbCode } = data const { execSql, dbName, dbCode } = data
const postData = { const postData = {
exec_sql: execSql, exec_sql: execSql,
...@@ -127,7 +127,7 @@ class Control { ...@@ -127,7 +127,7 @@ class Control {
} }
return this.requestClient.post(WEB_QUERY_QUERY, postData) return this.requestClient.post(WEB_QUERY_QUERY, postData)
} }
webChartConfigQueryLog (data) { webChartConfigQueryLog (data = {}) {
this.packParamHandle(data) this.packParamHandle(data)
const { appCode, pageName, controlName, dbName, dbCode } = data const { appCode, pageName, controlName, dbName, dbCode } = data
const postData = { const postData = {
...@@ -137,7 +137,7 @@ class Control { ...@@ -137,7 +137,7 @@ class Control {
} }
return this.requestClient.post(WEB_QUERY_QUERY, postData) return this.requestClient.post(WEB_QUERY_QUERY, postData)
} }
webChartConfigRevert (data) { webChartConfigRevert (data = {}) {
this.packParamHandle(data) this.packParamHandle(data)
const { appCode, pageName, dbName, dbCode, controlName, version } = data const { appCode, pageName, dbName, dbCode, controlName, version } = data
const postData = { const postData = {
...@@ -148,7 +148,7 @@ class Control { ...@@ -148,7 +148,7 @@ class Control {
return this.requestClient.post(WEB_QUERY, postData) return this.requestClient.post(WEB_QUERY, postData)
} }
// 控件配置查询 // 控件配置查询
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 } = data
const postData = { const 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