提交 2db7c039 authored 作者: 钟是志's avatar 钟是志

铁道问题修改

上级 3b6caec3
......@@ -24,7 +24,7 @@ import { setOneStopConfig } from '@/webPublic/zyd_public/utils/utils';
export const fetchTemplateByCode = code =>
uaaRequest('/UnifiedServicePatternApi/getDetail', { code });
export const fetchTemplateById = id => uaaRequest('/UnifiedAppApi/getDetail', { id });
export const fetchTemplateById = id => uaaRequest('/UnifiedAppApi/getDetail', { id, });
/**
* 查询表格中某条数据
......
......@@ -51,18 +51,18 @@ export default class ZdyTable extends Component {
isChild, // 是否为子表单
isQRCode = false, // 是否为二维码快捷发起
formDeafault = '', // 为二维码快捷发起默认值
} = this.props;
if (isPreview || isChild) {
this.setState({
...this.state,
...this.props,
isReady: true,
formConfig: { ...this.state.formConfig, style: this.props.style },
},()=> this.initExcel({ datas: this.props.datas, trees: this.props.trees }));
return;
}
......@@ -247,10 +247,10 @@ export default class ZdyTable extends Component {
}
importExcel = (res) => {
const{datas,trees} = this.configs
const sheets = res.sheets
for (var s = 0; s < sheets.length; s++) {
const uuid = sheets[s].key;
const items = []
......@@ -309,7 +309,7 @@ export default class ZdyTable extends Component {
isBorder: true,
items: items,
};
}
this.initExcel({ datas, trees },()=>this.setState({isChange:!this.state.isChange}))
console.log("公式导入excel成功")
......@@ -347,11 +347,11 @@ childExcel = (sheetData, datas, tr) => {
}
configs
initExcel = (configs, callback) => {
if (configs == null || configs.trees == null) return
if(configs.trees!=null) this.configs=configs
const sheetData = {}
for (var key in configs.trees) {
......@@ -366,7 +366,7 @@ initExcel = (configs, callback) => {
}
getCellValue = (i, j, currentTitle) => {
let hfInstance = this.props.hfInstance||this.hfInstance
if (hfInstance && currentTitle) {
let x = hfInstance.getCellValue({ col: j, row: i, sheet: hfInstance.getSheetId(currentTitle) })
......@@ -375,7 +375,7 @@ getCellValue = (i, j, currentTitle) => {
}
return x;
}
}
componentWillReceiveProps(nextProps) {
const {
......@@ -384,7 +384,7 @@ componentWillReceiveProps(nextProps) {
isForm,
isPreview, // 是否为预览模式
isChild, // 是否为子表单
} = nextProps;
if (isPreview || isChild) {
......@@ -396,7 +396,7 @@ componentWillReceiveProps(nextProps) {
},()=>this.initExcel({ datas: nextProps.datas, trees: nextProps.trees }));
return;
}
......@@ -559,7 +559,7 @@ countMax = items => {
return max;
};
getCurrentFormTitle = (obj, key) => {
if(obj==null) return
const { trees } = obj
if(trees==null) return
......@@ -575,14 +575,14 @@ getCurrentFormTitle2 = ( key) => {
}
getT=(trees,key)=>{
for (var i = 0; i < trees.length; i++) {
if(trees[i].children==null||trees[i].children.length==0){
if (trees[i].key == key) {
return trees[i].title
}
}else{
return this.getT(trees[i].children,key)
}
}
......@@ -757,7 +757,7 @@ render() {
return (
<tr key={i}>
{row.map((cell, j) => {
if (!cell.content) {
return;
}
......@@ -948,7 +948,7 @@ render() {
concealModel={concealModel || {}} // 场景设计器内置路由跳转函数
isDynamic={isDynamic} // 是否为场景配置器调用
/>
</Form>
)}
</>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论