提交 1bb62ce7 authored 作者: tb53863844's avatar tb53863844

开发

上级 899dcf0d
...@@ -815,7 +815,7 @@ export default class tableCom extends Component { ...@@ -815,7 +815,7 @@ export default class tableCom extends Component {
); );
//message.error(`页面${this.props.formKey}第${this.props.i + 1}行,第${this.props.j + 1}列:公式配置有误,回调函数内部错误${e}`, 10) //message.error(`页面${this.props.formKey}第${this.props.i + 1}行,第${this.props.j + 1}列:公式配置有误,回调函数内部错误${e}`, 10)
} }
} else if (json.comName == 'Echart' || json.comName == 'QRCode'|| json.comName == 'Graph') { } else if (json.comName == 'Echart' || json.comName == 'QRCode' || json.comName == 'Graph') {
try { try {
const x = callback(data); const x = callback(data);
if (x != null) { if (x != null) {
...@@ -845,12 +845,13 @@ export default class tableCom extends Component { ...@@ -845,12 +845,13 @@ export default class tableCom extends Component {
} }
return 'norefeshxxxxxxxxxxxxxxxxxxxx'; return 'norefeshxxxxxxxxxxxxxxxxxxxx';
} }
this.setState({}, () => {
for (let i in params) { for (let i in params) {
if (params[i] == null) { if (params[i] == null) {
delete params[i]; delete params[i];
} }
} }
if (getToken() != null) { if (getToken() != null) {
params.token = getToken(); params.token = getToken();
} }
...@@ -889,7 +890,7 @@ export default class tableCom extends Component { ...@@ -889,7 +890,7 @@ export default class tableCom extends Component {
e, e,
); );
} }
} else if (json.comName == 'Echart' || json.comName == 'QRCode'|| json.comName == 'Graph') { } else if (json.comName == 'Echart' || json.comName == 'QRCode' || json.comName == 'Graph') {
try { try {
const x = callback(data); const x = callback(data);
if (x != null) { if (x != null) {
...@@ -919,7 +920,7 @@ export default class tableCom extends Component { ...@@ -919,7 +920,7 @@ export default class tableCom extends Component {
} }
}); });
}); });
});
return 'norefeshxxxxxxxxxxxxxxxxxxxx'; return 'norefeshxxxxxxxxxxxxxxxxxxxx';
}; };
...@@ -941,8 +942,23 @@ export default class tableCom extends Component { ...@@ -941,8 +942,23 @@ export default class tableCom extends Component {
} }
} }
} }
if (!isChange) {
const os = sqlKeys[sqlKey].options;
if (Object.keys(options).length != Object.keys(os).length) {
isChange = true;
} else {
for (var k in options) {
if (os[k] == null || options[k] != os[k]) {
isChange = true;
break;
}
}
}
}
} else { } else {
sqlKeys[sqlKey] = { params: params }; sqlKeys[sqlKey] = { params: params, options: options };
isChange = true; isChange = true;
} }
if (!isChange) { if (!isChange) {
...@@ -965,7 +981,7 @@ export default class tableCom extends Component { ...@@ -965,7 +981,7 @@ export default class tableCom extends Component {
e, e,
); );
} }
} else if (json.comName == 'Echart' || json.comName == 'QRCode'||json.comName == 'Graph') { } else if (json.comName == 'Echart' || json.comName == 'QRCode' || json.comName == 'Graph') {
try { try {
const x = callback(data); const x = callback(data);
if (x != null) { if (x != null) {
...@@ -1002,8 +1018,8 @@ export default class tableCom extends Component { ...@@ -1002,8 +1018,8 @@ export default class tableCom extends Component {
this.setState({ sqlKeys }, () => { this.setState({ sqlKeys }, () => {
const umiRequest = extend({ const umiRequest = extend({
errorHandler, // 默认错误处理 errorHandler, // 默认错误处理
credentials: options.credentials||'omit', // 默认请求是否带上cookie credentials: options.credentials || 'omit', // 默认请求是否带上cookie
mode: options.mode||'cors' mode: options.mode || 'cors'
}); });
const allValues = JSON.stringify({ const allValues = JSON.stringify({
...this.props.obj, ...this.props.obj,
...@@ -1047,7 +1063,7 @@ export default class tableCom extends Component { ...@@ -1047,7 +1063,7 @@ export default class tableCom extends Component {
e, e,
); );
} }
} else if (json.comName == 'Echart' || json.comName == 'QRCode'||json.comName=="Graph") { } else if (json.comName == 'Echart' || json.comName == 'QRCode' || json.comName == "Graph") {
try { try {
const x = callback(data); const x = callback(data);
if (x != null) { if (x != null) {
...@@ -1082,7 +1098,7 @@ export default class tableCom extends Component { ...@@ -1082,7 +1098,7 @@ export default class tableCom extends Component {
}; };
getFunctionValue = (fun, column, json, callback) => { getFunctionValue = (fun, column, json, callback) => {
if(this.props.safe) return if (this.props.safe) return
const base52 = column.base52; const base52 = column.base52;
/** /**
...@@ -1121,7 +1137,7 @@ export default class tableCom extends Component { ...@@ -1121,7 +1137,7 @@ export default class tableCom extends Component {
}; };
} else { } else {
obj = { obj = {
...(this.props.fatherObj?this.props.fatherObj:{}), ...(this.props.fatherObj ? this.props.fatherObj : {}),
...this.props.obj, ...this.props.obj,
...this.props.form.getFieldsValue(), ...this.props.form.getFieldsValue(),
...this.props.defaultValues[this.props.formKey], ...this.props.defaultValues[this.props.formKey],
...@@ -1147,7 +1163,7 @@ export default class tableCom extends Component { ...@@ -1147,7 +1163,7 @@ export default class tableCom extends Component {
moment: moment, moment: moment,
sql: this.sqlUtil.bind(this, base52, json, callback), sql: this.sqlUtil.bind(this, base52, json, callback),
message: message, message: message,
importExcel:this.props.importExcel, importExcel: this.props.importExcel,
router: router, router: router,
uuid: UUID, uuid: UUID,
setValues: this.setValues.bind(this, base52, json), setValues: this.setValues.bind(this, base52, json),
...@@ -1182,7 +1198,7 @@ export default class tableCom extends Component { ...@@ -1182,7 +1198,7 @@ export default class tableCom extends Component {
if (callback) callback(); if (callback) callback();
}); });
} }
} else if (json.comName == 'Echart' || json.comName == 'QRCode'||json.comName == 'Graph' ) { } else if (json.comName == 'Echart' || json.comName == 'QRCode' || json.comName == 'Graph') {
this.setState({ option: value }); this.setState({ option: value });
} else { } else {
try { try {
...@@ -1428,7 +1444,7 @@ export default class tableCom extends Component { ...@@ -1428,7 +1444,7 @@ export default class tableCom extends Component {
isEdit, isEdit,
datas, datas,
taskAssignee, taskAssignee,
userId,i, userId, i,
j, j,
isPreview, isPreview,
currentFormTitle, currentFormTitle,
...@@ -1474,7 +1490,7 @@ export default class tableCom extends Component { ...@@ -1474,7 +1490,7 @@ export default class tableCom extends Component {
<Neo4jD3Com <Neo4jD3Com
key={this.props.uuid} key={this.props.uuid}
json={json} json={json}
option={this.state.option || []}/> option={this.state.option || []} />
); );
} }
...@@ -1495,7 +1511,7 @@ export default class tableCom extends Component { ...@@ -1495,7 +1511,7 @@ export default class tableCom extends Component {
})(<Input type="hidden" />)}{' '} })(<Input type="hidden" />)}{' '}
<ZdyTable <ZdyTable
hfInstance={this.props.hfInstance} hfInstance={this.props.hfInstance}
currentFormTitle={this.props.getCurrentFormTitle?this.props.getCurrentFormTitle(fk):null} currentFormTitle={this.props.getCurrentFormTitle ? this.props.getCurrentFormTitle(fk) : null}
getCellValue={getCellValue} getCellValue={getCellValue}
taskAssignee={taskAssignee} taskAssignee={taskAssignee}
isWebPrint={this.props.isWebPrint || false} isWebPrint={this.props.isWebPrint || false}
...@@ -1521,9 +1537,9 @@ export default class tableCom extends Component { ...@@ -1521,9 +1537,9 @@ export default class tableCom extends Component {
</> </>
); );
} }
if(json.comName=='Excel'){ if (json.comName == 'Excel') {
const value= getCellValue(i,j,currentFormTitle) const value = getCellValue(i, j, currentFormTitle)
const xx=<div style={{textAlign:"center",height:value==null?20:null}}>{value}</div> const xx = <div style={{ textAlign: "center", height: value == null ? 20 : null }}>{value}</div>
return xx; return xx;
} }
if (json.comName == 'Label') { if (json.comName == 'Label') {
...@@ -2193,7 +2209,7 @@ export default class tableCom extends Component { ...@@ -2193,7 +2209,7 @@ export default class tableCom extends Component {
case 'ChildForm': case 'ChildForm':
const xxxxx = obj[dataColumn.base52]; const xxxxx = obj[dataColumn.base52];
if (xxxxx == null) { if (xxxxx == null) {
cm = <></>;Chil cm = <></>; Chil
break; break;
} }
if (Object.keys(xxxxx).length > 0) { if (Object.keys(xxxxx).length > 0) {
...@@ -2809,7 +2825,7 @@ export default class tableCom extends Component { ...@@ -2809,7 +2825,7 @@ export default class tableCom extends Component {
} }
}); });
} }
: () => {} : () => { }
} }
format={json.format ? json.format : 'YYYY-MM-DD HH:mm:ss'} format={json.format ? json.format : 'YYYY-MM-DD HH:mm:ss'}
/>, />,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论