提交 66cf2fce authored 作者: 钟是志's avatar 钟是志

bug修改

上级 6906c591
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
import { apiRequest } from '../request'; import { apiRequest } from '../request';
import { getOneStopConfig, isJSON } from '@/baseComponent/utils'; import { getOneStopConfig, isJSON } from '@/baseComponent/utils';
import { Base16Encode } from '@/webPublic/one_stop_public/Base16';
const giveValue = (x) => { const giveValue = (x) => {
if (x && x.rows) { if (x && x.rows) {
...@@ -203,6 +204,9 @@ const handleAudit = (info) => { ...@@ -203,6 +204,9 @@ const handleAudit = (info) => {
}; };
const handleSqlData = (info) => { const handleSqlData = (info) => {
if(info.sqlKey){
info.sqlKey = Base16Encode(info.sqlKey);
}
return apiRequest('/DataColumnApi/getSqlData', info).then((x) => { return apiRequest('/DataColumnApi/getSqlData', info).then((x) => {
if (x) { if (x) {
return x; return x;
......
...@@ -3,6 +3,15 @@ import {isJSON} from '@/webPublic/one_stop_public/copy'; ...@@ -3,6 +3,15 @@ import {isJSON} from '@/webPublic/one_stop_public/copy';
import {uaaRequest} from '@/webPublic/one_stop_public/utils/request'; import {uaaRequest} from '@/webPublic/one_stop_public/utils/request';
import {Modal, message, Spin} from 'antd'; import {Modal, message, Spin} from 'antd';
import {deepCopy} from "@/webPublic/one_stop_public/utils/myutils"; import {deepCopy} from "@/webPublic/one_stop_public/utils/myutils";
import { Base16Encode } from '@/webPublic/one_stop_public/Base16';
let uaaRequestDiy = (url, data, options = {}) => {
if(data && data.sqlKey && url.indexOf('/DataColumnApi/getSqlData') > -1){
data.sqlKey = Base16Encode(data.sqlKey);
}
return uaaRequest(url, data, options = {});
}
export default function prepareShow(postData = {} , content = '') { // 模板挂载前执行的公式 export default function prepareShow(postData = {} , content = '') { // 模板挂载前执行的公式
let agg = deepCopy(postData); let agg = deepCopy(postData);
...@@ -13,7 +22,7 @@ export default function prepareShow(postData = {} , content = '') { // 模板挂 ...@@ -13,7 +22,7 @@ export default function prepareShow(postData = {} , content = '') { // 模板挂
let p = { // 函数参数 let p = { // 函数参数
message, message,
Modal, Modal,
uaaRequest, uaaRequest: uaaRequestDiy,
userNowInfo: userNowInfo:
(isJSON(localStorage.getItem('user')) && JSON.parse(localStorage.getItem('user'))) || (isJSON(localStorage.getItem('user')) && JSON.parse(localStorage.getItem('user'))) ||
{}, {},
......
...@@ -449,9 +449,10 @@ export default class tableCom extends Component { ...@@ -449,9 +449,10 @@ export default class tableCom extends Component {
this.setState({ columns }); this.setState({ columns });
} }
// console.log(JSON.stringify(allValues)); // console.log(JSON.stringify(allValues));
dispatch({ dispatch({
type: 'DataColumn/getSqlData', type: 'DataColumn/getSqlData',
payload: { sqlKey, allValues }, payload: { sqlKey: Base16Encode(sqlKey), allValues },
callback: list => { callback: list => {
const x = { const x = {
list: list, list: list,
...@@ -798,6 +799,11 @@ export default class tableCom extends Component { ...@@ -798,6 +799,11 @@ export default class tableCom extends Component {
return 'norefeshxxxxxxxxxxxxxxxxxxxx'; return 'norefeshxxxxxxxxxxxxxxxxxxxx';
}; };
sqlUtil = (base52, json, orgCallback, sqlKey, params, callback, options = {}) => { sqlUtil = (base52, json, orgCallback, sqlKey, params, callback, options = {}) => {
console.log({
base52, json, orgCallback, sqlKey, params, callback, options
})
//查缓存 //查缓存
var isChange = false; var isChange = false;
const { sqlKeys } = this.state; const { sqlKeys } = this.state;
...@@ -902,6 +908,8 @@ export default class tableCom extends Component { ...@@ -902,6 +908,8 @@ export default class tableCom extends Component {
pp.token = getToken(); pp.token = getToken();
} }
console.log(pp, '0000002222');
umiRequest(url, { umiRequest(url, {
data: pp, data: pp,
method: 'POST', method: 'POST',
......
...@@ -298,9 +298,6 @@ export const request = (url, data, options = {}) => { ...@@ -298,9 +298,6 @@ export const request = (url, data, options = {}) => {
const setRequestConfig = config => { const setRequestConfig = config => {
return (url, data, options = {}) => { return (url, data, options = {}) => {
if(data && data.sqlKey){
data.sqlKey = Base16Encode(data.sqlKey);
}
if (Array.isArray(url)) { if (Array.isArray(url)) {
return Promise.all( return Promise.all(
url.map(ags => { url.map(ags => {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论