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

开发

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