提交 1a605ce7 authored 作者: 徐立's avatar 徐立

兼容场景设计器

上级 3d43a333
...@@ -34,7 +34,7 @@ export default class ZdyTable extends Component { ...@@ -34,7 +34,7 @@ export default class ZdyTable extends Component {
init: this.props.init || {}, init: this.props.init || {},
datas: {}, datas: {},
isEdit: true, isEdit: true,
isRowCol:false, isRowCol: false,
isReady: false, isReady: false,
formConfig: {}, formConfig: {},
}; };
...@@ -91,7 +91,7 @@ export default class ZdyTable extends Component { ...@@ -91,7 +91,7 @@ export default class ZdyTable extends Component {
datas: obj.datas, datas: obj.datas,
width: this.props.table ? obj.datas[val.formKey].width : xxx.width, width: this.props.table ? obj.datas[val.formKey].width : xxx.width,
isBorder: this.props.table ? obj.datas[val.formKey].isBorder : xxx.isBorder, isBorder: this.props.table ? obj.datas[val.formKey].isBorder : xxx.isBorder,
isRowCol:this.props.table ? obj.datas[val.formKey].isRowCol : xxx.isRowCol, isRowCol: this.props.table ? obj.datas[val.formKey].isRowCol : xxx.isRowCol,
mapData, mapData,
currentFormKey: this.props.table ? val.formKey : obj.init, currentFormKey: this.props.table ? val.formKey : obj.init,
sqlData, sqlData,
...@@ -147,7 +147,7 @@ export default class ZdyTable extends Component { ...@@ -147,7 +147,7 @@ export default class ZdyTable extends Component {
currentFormKey: obj.init, currentFormKey: obj.init,
width: xxx.width, width: xxx.width,
isBorder: xxx.isBorder, isBorder: xxx.isBorder,
isRowCol:xxx.isRowCol, isRowCol: xxx.isRowCol,
mapData, mapData,
sqlData, sqlData,
defaultValues: val.unifiedServicePatternModel.defaultValues, defaultValues: val.unifiedServicePatternModel.defaultValues,
...@@ -324,7 +324,7 @@ export default class ZdyTable extends Component { ...@@ -324,7 +324,7 @@ export default class ZdyTable extends Component {
currentFormKey: obj.init, currentFormKey: obj.init,
width: xxx.width, width: xxx.width,
isBorder: xxx.isBorder, isBorder: xxx.isBorder,
isRowCol:xxx.isRowCol, isRowCol: xxx.isRowCol,
mapData, mapData,
sqlData, sqlData,
defaultValues: val.unifiedServicePatternModel.defaultValues, defaultValues: val.unifiedServicePatternModel.defaultValues,
...@@ -372,7 +372,7 @@ export default class ZdyTable extends Component { ...@@ -372,7 +372,7 @@ export default class ZdyTable extends Component {
defaultBinds: this.props.table ? obj.datas[val.taskFormKey].defaultBinds : xxx.defaultBinds, defaultBinds: this.props.table ? obj.datas[val.taskFormKey].defaultBinds : xxx.defaultBinds,
width: this.props.table ? obj.datas[val.taskFormKey].width : xxx.width, width: this.props.table ? obj.datas[val.taskFormKey].width : xxx.width,
isBorder: this.props.table ? obj.datas[val.taskFormKey].isBorder : xxx.isBorder, isBorder: this.props.table ? obj.datas[val.taskFormKey].isBorder : xxx.isBorder,
isRowCol: this.props.table ? obj.datas[val.taskFormKey].isRowCol: xxx.isRowCol, isRowCol: this.props.table ? obj.datas[val.taskFormKey].isRowCol : xxx.isRowCol,
items: this.props.table ? obj.datas[val.taskFormKey].items : xxx.items, items: this.props.table ? obj.datas[val.taskFormKey].items : xxx.items,
isReady: true, isReady: true,
init: { ...this.state.init, ...(val.isSecond ? this.props.obj : {}) }, init: { ...this.state.init, ...(val.isSecond ? this.props.obj : {}) },
...@@ -436,6 +436,7 @@ export default class ZdyTable extends Component { ...@@ -436,6 +436,7 @@ export default class ZdyTable extends Component {
modalInit, modalInit,
concealModel, // 场景设计器内置跳转函数 concealModel, // 场景设计器内置跳转函数
paddingBottom, paddingBottom,
isDynamic, // 是否为大数据页面
} = this.props; } = this.props;
let style = {}; let style = {};
if (formConfig.style != null) { if (formConfig.style != null) {
...@@ -472,13 +473,15 @@ export default class ZdyTable extends Component { ...@@ -472,13 +473,15 @@ export default class ZdyTable extends Component {
let updateTime; let updateTime;
const styleDiv = this.props.height const styleDiv = this.props.height
? { ? {
overflow: 'auto', overflow: isDynamic ? 'hidden' : 'auto',
// overflowY: isDynamic && 'auto',
width: '100%', width: '100%',
height: this.props.height, height: this.props.height,
paddingBottom: paddingBottom != null ? paddingBottom : '10px', paddingBottom: paddingBottom != null ? paddingBottom : '10px',
} }
: { : {
overflow: 'auto', overflow: isDynamic ? 'hidden' : 'auto',
// overflowY: isDynamic && 'auto',
width: '100%', width: '100%',
paddingBottom: paddingBottom != null ? paddingBottom : '10px', paddingBottom: paddingBottom != null ? paddingBottom : '10px',
}; };
...@@ -657,6 +660,7 @@ export default class ZdyTable extends Component { ...@@ -657,6 +660,7 @@ export default class ZdyTable extends Component {
routerState={routerState} // 兼容表单设计器路由传参 routerState={routerState} // 兼容表单设计器路由传参
messageData={messageData} // 场景设计器共享变量参数 messageData={messageData} // 场景设计器共享变量参数
concealModel={concealModel || {}} // 场景设计器内置路由跳转函数 concealModel={concealModel || {}} // 场景设计器内置路由跳转函数
isDynamic={isDynamic} // 是否为场景配置器调用
/> />
</td> </td>
); );
...@@ -755,6 +759,7 @@ export default class ZdyTable extends Component { ...@@ -755,6 +759,7 @@ export default class ZdyTable extends Component {
formId={formId} formId={formId}
fatherObj={this.props.fatherObj} fatherObj={this.props.fatherObj}
concealModel={concealModel || {}} // 场景设计器内置路由跳转函数 concealModel={concealModel || {}} // 场景设计器内置路由跳转函数
isDynamic={isDynamic} // 是否为场景配置器调用
/> />
{/* { {/* {
items.map((item, i) => { items.map((item, i) => {
......
...@@ -803,7 +803,7 @@ export default class tableCom extends Component { ...@@ -803,7 +803,7 @@ export default class tableCom extends Component {
reqUrls[url] = { params: params }; reqUrls[url] = { params: params };
isChange = true; isChange = true;
} }
console.log(isChange) console.log(isChange);
if (!isChange) { if (!isChange) {
if (callback) { if (callback) {
const data = reqUrls[url].data; const data = reqUrls[url].data;
...@@ -1154,7 +1154,12 @@ export default class tableCom extends Component { ...@@ -1154,7 +1154,12 @@ export default class tableCom extends Component {
this.props.init, this.props.init,
this.props.modalInit, this.props.modalInit,
this.props.defaultValues, this.props.defaultValues,
{ clientType: this.props.get, formCode: this.props.formCode, formId: this.props.formId,isEdit:this.props.isEdit }, {
clientType: this.props.get,
formCode: this.props.formCode,
formId: this.props.formId,
isEdit: this.props.isEdit,
},
this.props.index, this.props.index,
this.props.fatherCode, this.props.fatherCode,
{ {
...@@ -1162,7 +1167,7 @@ export default class tableCom extends Component { ...@@ -1162,7 +1167,7 @@ export default class tableCom extends Component {
sql: this.sqlUtil.bind(this, base52, json, callback), sql: this.sqlUtil.bind(this, base52, json, callback),
message: message, message: message,
router: router, router: router,
uuid:UUID, uuid: UUID,
setValues: this.setValues.bind(this, base52, json), setValues: this.setValues.bind(this, base52, json),
req: this.reqUtil.bind(this, base52, json, callback), req: this.reqUtil.bind(this, base52, json, callback),
md5: md5, md5: md5,
...@@ -2606,6 +2611,13 @@ export default class tableCom extends Component { ...@@ -2606,6 +2611,13 @@ export default class tableCom extends Component {
placeholder={json.placeholder} placeholder={json.placeholder}
style={{ width: json.width }} style={{ width: json.width }}
optionFilterProp="children" optionFilterProp="children"
getPopupContainer={
this.props.isDynamic
? () => {
return document.querySelector('#dynamic_div');
}
: ''
}
onFocus={() => { onFocus={() => {
get === 'mobile' // 移动端取消输入键盘弹出 get === 'mobile' // 移动端取消输入键盘弹出
? setTimeout(() => { ? setTimeout(() => {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论