提交 66911f8b authored 作者: tb53863844's avatar tb53863844

开发

上级 9b453fba
......@@ -19,6 +19,7 @@ export default class ZdyTable extends Component {
super(props);
this.state = {
objRealTime:{},
isChange: false,
selects: new Map(),
left: 0,
......@@ -590,6 +591,9 @@ export default class ZdyTable extends Component {
return this.getT(trees, key);
};
setRealTimeValues=(obj)=>{
this.setState({objRealTime:obj})
}
getT = (trees, key) => {
for (var i = 0; i < trees.length; i++) {
......@@ -845,13 +849,14 @@ export default class ZdyTable extends Component {
fatherObj={this.props.fatherObj}
datas={datas}
uuid={cell.uuid}
setRealTimeValues={this.setRealTimeValues}
isEdit={isEdit}
formKey={currentFormKey}
currentFormTitle={currentFormTitle}
init={init}
get={get} // 区分移动端或wen端
json={cell.content}
obj={obj || {}} // 是否存在默认值
obj={{...obj,...this.state.objRealTime} || {}} // 是否存在默认值
mapData={mapData}
form={this.props.form} // antd form控件
sqlData={sqlData}
......@@ -941,6 +946,7 @@ export default class ZdyTable extends Component {
importExcel={this.importExcel}
isPreview={isPreview}
trees={trees}
setRealTimeValues={this.setRealTimeValues}
isRowCol={isRowCol}
modalInit={modalInit}
items={items}
......@@ -955,7 +961,7 @@ export default class ZdyTable extends Component {
currentFormTitle={currentFormTitle}
init={init}
get={get}
obj={obj}
obj={{...obj,...this.state.objRealTime}}
mapData={mapData}
form={this.props.form}
sqlData={sqlData}
......
......@@ -94,6 +94,7 @@ export default class isNewTable extends Component {
isPreview={isPreview}
i={i}
j={j}
setRealTimeValues={this.props.setRealTimeValues}
index={index}
getCurrentFormTitle={ getCurrentFormTitle}
fatherCode={fatherCode}
......@@ -176,6 +177,7 @@ export default class isNewTable extends Component {
fatherCode={fatherCode}
datas={datas}
isEdit={isEdit}
setRealTimeValues={this.props.setRealTimeValues}
getCurrentFormTitle={getCurrentFormTitle}
importExcel={this.props.importExcel}
fatherObj={this.props.fatherObj}
......@@ -236,6 +238,7 @@ export default class isNewTable extends Component {
init={init}
get={get}
key={j}
setRealTimeValues={this.props.setRealTimeValues}
sqlData={sqlData}
obj={obj || {}}
form={this.props.form}
......
......@@ -147,6 +147,8 @@ export default class ChildForm extends React.Component {
span={isEdit ? 24 : span}
>
<ZdyTable
setRealTimeValues={this.props.setRealTimeValues}
trees={this.props.trees}
key={r}
modalInit={modalInit}
......@@ -224,6 +226,8 @@ export default class ChildForm extends React.Component {
return (
<Col span={span}>
<ZdyTable
setRealTimeValues={this.props.setRealTimeValues}
modalInit={modalInit}
hfInstance={hfInstance}
currentFormTitle={getCurrentFormTitle?getCurrentFormTitle(json.childFormKey):null}
......
......@@ -28,29 +28,7 @@ class GetLocation extends Component {
}
}
/* updateMap=(lng,lat,params)=>{
this.map.remove(this.fugai);
this.fugai.length = 0
this.map.setCenter([lng ? lng : 116.397428, lat ? lat : 39.90923]);
if (params && params.polygons) {
for (var i = 0; i < params.polygons.length; i++) {
const p = params.polygons[i]
const path = p.path
const paths = []
for (var j = 0; j < path.lngs.length; j++) {
paths.push(new AMap.LngLat(path.lngs[j], path.lats[j]))
}
var polygon = new AMap.Polygon({
...p,
path: paths
});
this.map.add(polygon);
this.fugai.push(polygon)
}
}
} */
componentWillMount() {
......@@ -58,6 +36,10 @@ class GetLocation extends Component {
componentDidMount = () => {
this.getLocation()
this.searchSiteSelection()
const{lng,lat,params}=this.props
if(params.setMap){
params.setMap(this.map,AMap)
}
}
// 12,[116.171731,40.06682]
//获取当前定位
......
......@@ -761,6 +761,15 @@ export default class tableCom extends Component {
e,
);
}
if(!this.props.isEdit){
if(this.props.setRealTimeValues){
this.props.setRealTimeValues(values)
}
}
};
reqUtil = (base52, json, orgCallback, url, method, params, callback, options = {}) => {
//查缓存
......@@ -1510,6 +1519,7 @@ export default class tableCom extends Component {
initialValue: fk,
})(<Input type="hidden" />)}{' '}
<ZdyTable
setRealTimeValues={this.props.setRealTimeValues}
hfInstance={this.props.hfInstance}
currentFormTitle={this.props.getCurrentFormTitle ? this.props.getCurrentFormTitle(fk) : null}
getCellValue={getCellValue}
......@@ -2274,6 +2284,8 @@ export default class tableCom extends Component {
cm = (
<ChildForm
setRealTimeValues={this.props.setRealTimeValues}
modalInit={modalInit}
trees={this.props.trees}
isPreview={isPreview}
......@@ -3028,6 +3040,8 @@ export default class tableCom extends Component {
initialValue: initValue || {},
})(
<ChildForm
setRealTimeValues={this.props.setRealTimeValues}
rights={json.rights || []}
hfInstance={this.props.hfInstance}
getCurrentFormTitle={this.props.getCurrentFormTitle}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论