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

bug修改

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