提交 9a05d688 authored 作者: 徐立's avatar 徐立

解决冲突

......@@ -2,7 +2,7 @@ import React from 'react';
import PageTypeMatching from '@/highOrderComponent/PageTypeMatching';
import getInfoGenerator from '../getInfoGenerator';
export { DataType } from '../getInfoGenerator'
export { DataType } from '../getInfoGenerator';
const defaultNameSpan = { big: 9, small: 9 };
const defaultFieldSpan = { big: 4, small: 4 };
......@@ -14,13 +14,12 @@ const defaultPageSetting = {
buttonArea: true, // 是否拥有 按钮区,
};
export default function AuditPage({ appId, tab1 = {}, tab2 = {} }) {
const pageSearch = {
tab1: {
search: {
searchType: 'cascadeSearchNew',
getInfo: getInfoGenerator(tab1.condition),
getInfo: tab1.getInfo || getInfoGenerator(tab1.condition),
url: '/common/assigneeTasks',
field: {
appId: {
......@@ -38,7 +37,7 @@ export default function AuditPage({ appId, tab1 = {}, tab2 = {} }) {
tab2: {
search: {
searchType: 'cascadeSearchNew',
getInfo: getInfoGenerator(tab2.condition),
getInfo: tab2.getInfo || getInfoGenerator(tab2.condition),
url: '/common/assigneeDTasks',
field: {
appId: {
......
......@@ -18,7 +18,7 @@ export default function getInfoGenerator(condition) {
item => item.key === key && typeof item.dataType !== 'undefined'
);
if (conditionItemHasDataType) {
if (conditionItemHasDataType && typeof value !== 'undefined') {
const oldQueryInfo = acc.queryInfo || [];
return {
...acc,
......
......@@ -20,6 +20,8 @@ export default class ZdyTable extends Component {
left: 0,
top: 0,
max: 4,
formId:null,
formCode:null,
width: 100,
mapData:{},
defaultBinds:{},
......@@ -70,6 +72,7 @@ export default class ZdyTable extends Component {
* this.props.table有传入值表明需要渲染流程中最新表单
*/
if(isForm){ // 由表格的操作按钮进入
const mapData = {};
const sqlData={}
const dataObjs = val.form.dataObjModels;
......@@ -183,9 +186,10 @@ export default class ZdyTable extends Component {
}
const obj = JSON.parse(val.unifiedServicePatternModel.content);
const xxx = obj.datas[this.props.formKey ? this.props.formKey : obj.init]; // 是否是存在历史表单传入值
this.setState({
appId: val.id,
formId:val.id,
formCode:val.code,
datas:obj.datas,
mapData,sqlData,
defaultValues:val.unifiedServicePatternModel.defaultValues,
......@@ -359,7 +363,7 @@ export default class ZdyTable extends Component {
}
render() {
let { width,isBorder,sqlData,mapData,defaultBinds,defaultValues,items, init,currentFormKey ,isEdit ,datas,isReady,formConfig} = this.state
let { width,isBorder,sqlData,mapData,defaultBinds,defaultValues,items, init,currentFormKey ,isEdit ,datas,isReady,formConfig,formCode,formId} = this.state
let { border, get, obj,index,fatherCode} = this.props
let style={}
......@@ -418,36 +422,7 @@ export default class ZdyTable extends Component {
<Col span={24}>
<div style={styleDiv} ref={ref => { this.root = ref }}
>
{
false ?
<div
style={{
overflow: "auto",
margin: max * width > 550 ? "auto" : '',
...style}}
border={border}
>
<IsNewTable
items={items}
checkAllHidden={this.checkAllHidden}
isBorder={isBorder}
borderStyle={borderStyle}
width={width}
fatherCode={fatherCode}
index={index}
datas={datas}
isEdit={isEdit}
currentFormKey={currentFormKey}
init={init}
get={get}
obj={ obj||{}}
mapData={mapData}
form={this.props.form}
sqlData={sqlData}
defaultValues={defaultValues || {}}
/>
</div>
:<table style={{ overflow: "auto", margin: max * width > 550 ? "auto" : '',...style }} border={border} cellSpacing="0" cellPadding="0" >
<table style={{ overflow: "auto", margin: max * width > 550 ? "auto" : '',...style }} border={border} cellSpacing="0" cellPadding="0" >
<tbody>
{items.map((row, i) => {
const allhidden = this.checkAllHidden(row)
......@@ -462,16 +437,15 @@ export default class ZdyTable extends Component {
console.log(`第${i}行第${j}列样式配置有误,${e}`)
}
}
return !allhidden && cell.hidden ? "" : <td width={i==0?((cell.content!=null&&cell.content.cwidth!=null?cell.content.cwidth:width) * (cell.col ? cell.col : 1)) :width * (cell.col ? cell.col : 1)} rowSpan={cell.row} colSpan={cell.col} key={j} style={{
overflow: "auto",
textAlign: cell.content&&cell.content.calign?cell.content.calign:"left",
...isBorder?(cell.content.comName=="InputHidden"?{}:borderStyle):{},
...isBorder?(cell.content.comName=="InputHidden"||!cell?.content?.comName?{}:borderStyle):{},
...styles
}} >
<TableCom i={i} j={j} fatherCode={fatherCode} index={index} datas={datas} uuid={cell.uuid} isEdit={isEdit} formKey={currentFormKey} init={init} get={get} json={cell.content} obj={ obj||{}} mapData={mapData} form={this.props.form} sqlData={sqlData} defaultValues={defaultValues || {}} />
<TableCom formCode={formCode} formId={formId} i={i} j={j} fatherCode={fatherCode} index={index} datas={datas} uuid={cell.uuid} isEdit={isEdit} formKey={currentFormKey} init={init} get={get} json={cell.content} obj={ obj||{}} mapData={mapData} form={this.props.form} sqlData={sqlData} defaultValues={defaultValues || {}} />
</td>}
)
......@@ -483,8 +457,6 @@ export default class ZdyTable extends Component {
})}
</tbody>
</table>
}
{style.pageBreakAfter!=null?<div style={{pageBreakAfter:style.pageBreakAfter}}></div>:""}
</div>
......@@ -522,7 +494,7 @@ export default class ZdyTable extends Component {
{
item.map((ary, j) => {
return !allhidden && ary.hidden ? ""
: <><TableCom i={i} j={j} index={index} fatherCode={fatherCode} datas={datas} isEdit={isEdit} formKey={currentFormKey} init={init} get={get} key={j} sqlData={sqlData} obj={ obj||{}} form={this.props.form} mapData={mapData} json={ary.content} uuid={ary.uuid} defaultValues={defaultValues || {}} /></>
: <><TableCom formCode={formCode} formId={formId} i={i} j={j} index={index} fatherCode={fatherCode} datas={datas} isEdit={isEdit} formKey={currentFormKey} init={init} get={get} key={j} sqlData={sqlData} obj={ obj||{}} form={this.props.form} mapData={mapData} json={ary.content} uuid={ary.uuid} defaultValues={defaultValues || {}} /></>
})
}
</div>)
......
......@@ -1104,8 +1104,13 @@ export default class tableCom extends Component {
const obj = { ...this.props.obj, ...this.props.form.getFieldsValue(), ...this.props.defaultValues[this.props.formKey] }
<<<<<<< HEAD
const value = fun1(obj,this.props.init, this.props.defaultValues, { clientType: this.props.get }, this.props.index, this.props.fatherCode,
{
=======
const value = fun1(obj,this.props.init, this.props.defaultValues, { clientType: this.props.get,formCode:this.props.formCode,formId:this.props.formId }, this.props.index, this.props.fatherCode,
{
>>>>>>> b2747db5f35669ed350d5ebb2bf1ce42c5064462
moment: moment,
sql: this.sqlUtil.bind(this, base52, json,callback),
message: message,router:router,
......
......@@ -7,10 +7,25 @@ import FormdataWrapper from '../utils/object-to-formdata-custom';
import { isJSON } from '../utils/utils';
let ws = null;
/**
* props 定义
* url: 二维码url
* show: 是否显示二维码Modal
* wxSocketGateWay: webscoket 链接地址
* mockServer: 接口地址前缀 用于获取sessionid;
* */
export default class LoginWithQrCode extends Component {
constructor(props) {
super(props);
const { wxSocketGateWay, mockServer } = this.props;
this.wxSocketGateWay = wxSocketGateWay;
this.mockServer = mockServer;
if(!wxSocketGateWay){
this.wxSocketGateWay = config.wxSocketGateWay;
}
if(!mockServer){
this.mockServer = config.mockServer;
}
this.state = {
connectTimes: 0,
sessionId: '',
......@@ -42,11 +57,11 @@ export default class LoginWithQrCode extends Component {
message.warning('服务器错误,无法使用扫码登录');
return false;
}
if (!config.wxSocketGateWay) {
if (!this.wxSocketGateWay) {
return console.warn('没有配置socket接口地址,无法使用消息中心接口');
}
ws = new WebSocket(`${config.wxSocketGateWay}/${sessionId}`);
ws = new WebSocket(`${this.wxSocketGateWay}/${sessionId}`);
ws.onopen = (evt) => {
that.setState({
connectStatus: true,
......@@ -99,7 +114,7 @@ export default class LoginWithQrCode extends Component {
Accept: 'application/json',
},
};
fetch(`${config.mockServer}/wx/` + 'wxAuthApi/getScanSessionId', options)
fetch(`${this.mockServer}/wx/` + 'wxAuthApi/getScanSessionId', options)
.then(response => {
if (response.status !== 200) {
return response.text();
......
import React from 'react';
import LoginWithQrCode from './LoginWithQrCode';
export default function LoginByQrCode({ url, LoginType }) {
/**
* url 二维码url
* LoginType: 1 表示 显示二维码 其他不显示
* wxSocketGateWay: websocket链接地址 'ws://scjoyedu.eicp.net:51337/wswx/test106/socket/'
* mockServer: 获取sessionId 接口前缀 'http://scjoyedu.eicp.net:51337/test106',
* */
export default function LoginByQrCode({ url, LoginType, wxSocketGateWay, mockServer }) {
return (
<div>
<div style={{ backgroundColor: 'white', width: 288, padding: 10, margin: 'auto' }}>
<LoginWithQrCode url={url} show={LoginType === 1}/>
<LoginWithQrCode
url={url}
show={LoginType === 1}
mockServer={mockServer}
wxSocketGateWay={wxSocketGateWay}
/>
</div>
<div style={{ marginTop: 20, color: 'white' }}>
请使用
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论