diff --git a/cloud/bigscreen-design/src/api/db.js b/cloud/bigscreen-design/src/api/db.js index cd5d05b..9e38a4e 100644 --- a/cloud/bigscreen-design/src/api/db.js +++ b/cloud/bigscreen-design/src/api/db.js @@ -54,8 +54,6 @@ export const dbTest = (data) => { return request({ url: url + '/db/db-test', method: 'post', - // todo 借助spring网关处理解密待重写 - //data: crypto.encrypt(JSON.stringify(data)) - data: data + data: crypto.encrypt(JSON.stringify(data)) }) } diff --git a/cloud/bigscreen-design/src/echart/common.js b/cloud/bigscreen-design/src/echart/common.js index e15ec5e..c92733c 100644 --- a/cloud/bigscreen-design/src/echart/common.js +++ b/cloud/bigscreen-design/src/echart/common.js @@ -368,14 +368,11 @@ export default (() => { bindEvent(); } } else if (isSql) { - // todo 借助spring网关处理解密待重写 - //let sql = JSON.parse(crypto.decrypt(safe.sql)); - let sql = safe.sql; + let sql = JSON.parse(crypto.decrypt(safe.sql)); let data, result; try { sql.sql = funEval(sql.sql)(this.dataParams) - // todo 借助spring网关处理解密待重写 - //data = crypto.encrypt(JSON.stringify(sql)); + data = crypto.encrypt(JSON.stringify(sql)); data = sql; } catch (error) { data = safe.sql; diff --git a/cloud/bigscreen-design/src/page/build.vue b/cloud/bigscreen-design/src/page/build.vue index dd48803..63cdf66 100644 --- a/cloud/bigscreen-design/src/page/build.vue +++ b/cloud/bigscreen-design/src/page/build.vue @@ -914,9 +914,7 @@ export default { activeObj: { handler () { if (this.activeObj.sql && this.isSql) { - // todo 借助spring网关处理解密待重写 - // let mode = JSON.parse(crypto.decrypt(this.activeObj.sql)); - let mode = this.activeObj.sql; + let mode = JSON.parse(crypto.decrypt(this.activeObj.sql)); this.db = mode.id; this.sql = mode.sql; } else { @@ -1030,15 +1028,10 @@ export default { }, handleRes (tip = true) { if (this.isSql) { - // todo 借助spring网关处理解密待重写 - // this.activeObj.sql = crypto.encrypt(JSON.stringify({ - // id: this.db, - // sql: this.sql - // })) - this.activeObj.sql = { + this.activeObj.sql = crypto.encrypt(JSON.stringify({ id: this.db, sql: this.sql - } + })) } this.handleRefresh().then((res = {}) => { if (!this.validatenull(res)) { diff --git a/cloud/bigscreen-design/src/page/list/record.vue b/cloud/bigscreen-design/src/page/list/record.vue index 7334012..630a857 100644 --- a/cloud/bigscreen-design/src/page/list/record.vue +++ b/cloud/bigscreen-design/src/page/list/record.vue @@ -206,15 +206,10 @@ export default { }); }, getSql (row) { - // todo 借助spring网关处理解密待重写 - /*return crypto.encrypt(JSON.stringify({ + return crypto.encrypt(JSON.stringify({ id: row.dbId, sql: row.dbSql - }))*/ - return { - id: row.dbId, - sql: row.dbSql - } + })) }, handleClose () { this.client.close && this.client.close()