提交 7b77139d authored 作者: wanyielin's avatar wanyielin

判断必选1

......@@ -189,6 +189,7 @@ export default class AffairPage extends React.Component {
const { workId, dataBaseId, addFields, showIframe, renderIframe } = this.state;
const url = config.onestopPC.split('/#/');
let iframeUrl = `${url[0]}/#/IFrameForApply?id=${workId}&token=${getToken()}`;
console.log(iframeUrl);
// iframeUrl = `http://localhost:8000/onestop/IFrameForApply?id=${workId}&token=${getToken()}`;
return (
<PageHeaderWrapper title="">
......
import { text, number, date, format, taskNode } from '../config/index';
import { isJSON } from '@/baseComponent/utils';
import { translateAddFields } from '../config/index';
import ColumnsRender from '@/highOrderComponent/ColumnsRender';
import config from '@/config/config';
import { Tooltip } from 'antd';
import moment from 'moment';
import React from 'react';
......@@ -314,7 +314,12 @@ export function handleColumns(columns){
if (item.dataType) {
if (text.indexOf(item.dataType) > -1) { // 文本类型字段
item.render = (text) => {
if (typeof text === 'string' && text.length > 20) {
if(item.extendType === 'file' && typeof text === 'string'){
let url = text.includes('http') ? text : config.sqlFormsServer + text;
console.log(url);
return <a href={url} target={'_blank'}>点击查看</a>;
}
else if (typeof text === 'string' && text.length > 20) {
const oldTitle = text;
const newTitle = text.slice(0, 7) + '...';
return (
......@@ -322,8 +327,14 @@ export function handleColumns(columns){
<span key={text}>{newTitle}</span>
</Tooltip>
);
} else if (typeof text === 'object' && Array.isArray(text.files) && text.files.length) {
return <a href={text.files[0].path} target={'_blank'}>点击查看</a>;
} else if (item.extendType === 'file' &&
typeof text === 'object' && Array.isArray(text.files) && text.files.length) {
let url = text.files[0].path.includes('http') ?
text.files[0].path :
config.sqlFormsServer + text.files[0].path;
return <a href={url} target={'_blank'}>
点击查看
</a>;
} else {
return text;
}
......
......@@ -731,7 +731,7 @@ class FormList extends React.Component {
{form.getFieldDecorator(item.name, {
initialValue: formData == null ? '' : formData[item.name],
rules: [{ required: !item.isNull }],
})(<Input readOnly={!isAdd} placeholder="请输入"/>)}
})(<Input style={{ width: '70%' }} readOnly={!isAdd} placeholder="请输入"/>)}
</FormItem>
);
}
......@@ -771,7 +771,7 @@ class FormList extends React.Component {
{form.getFieldDecorator(item.name, {
initialValue: formData == null ? '' : formData[item.name],
rules: [{ required: !item.isNull }],
})(<Input placeholder="请输入"/>)}
})(<Input style={{ width: '70%' }} placeholder="请输入"/>)}
</FormItem>
);
} else if (number.indexOf(item.type) > -1) {
......@@ -818,7 +818,7 @@ class FormList extends React.Component {
{form.getFieldDecorator(item.name, {
initialValue: formData == null ? '' : formData[item.name],
rules: [{ required: !item.isNull }],
})(<Input placeholder="请输入"/>)}
})(<Input style={{ width: '70%' }} placeholder="请输入"/>)}
</FormItem>
);
}
......@@ -832,11 +832,12 @@ class FormList extends React.Component {
if (querys.length == 0) {
return '';
}
return (
<Form layout="inline">
<Row >
{querys.map((item) =>
<Col span={8} key={item.id}>
<Col style={{height:58}} span={8} key={item.id}>
{this.getItem(true,form, {
...item,
isNull: true
......
......@@ -503,7 +503,9 @@ export default class tableCom extends Component {
}
}
}
} */
}
}
} */
if (!this.props.isEdit && this.props.fatherCode) {
if (bindObj != null) {
......@@ -1219,14 +1221,37 @@ export default class tableCom extends Component {
if (Object.keys(mapData).length > 0) {
const columnIds = json.columnIds;
if (columnIds && columnIds['c1']) {
const columnId = columnIds['c1'][columnIds['c1'].length - 1];
if (mapData[columnId] != null) {
dataColumn = mapData[columnId]
const bindObj = this.getColumn('c1');
let dataColumn = this.props.fatherCode != null ? (bindObj ? { ...bindObj, base52: `${this.props.fatherCode}.[${this.props.index}].${bindObj.base52}` } :
{ base52: `${this.props.fatherCode}.[${this.props.index}].${this.props.uuid}` })
: bindObj;
if (this.props.fatherCode == null && dataColumn == null) dataColumn = { base52: this.props.uuid }
/* if (this.props.fatherCode != null) {
dataColumn = { base52: `${this.props.fatherCode}.[${this.props.index}].${this.props.uuid}` }
} else {
dataColumn = { base52: this.props.uuid }
if (Object.keys(mapData).length > 0) {
const columnIds = json.columnIds;
if (columnIds && columnIds['c1']) {
const columnId = columnIds['c1'][columnIds['c1'].length - 1];
if (mapData[columnId] != null) {
dataColumn = mapData[columnId]
}
}
}
}
} */
} */
// if (!this.props.isEdit && this.props.fatherCode) {
// if (bindObj != null) {
// dataColumn.base52 = bindObj.base52
// } else {
// dataColumn.base52 = this.props.uuid
// }
// }
if (!this.props.isEdit && this.props.fatherCode) {
if (bindObj != null) {
......@@ -1701,7 +1726,7 @@ export default class tableCom extends Component {
if (this.props.fatherCode == null && dataColumn == null) {
dataColumn = { base52: this.props.uuid }
}
if (!dataColumn.isNull) {
if (dataColumn.isNull != null && !dataColumn.isNull) {
required = true;
}
......
......@@ -8,7 +8,7 @@ import LoginWithQrCode from './LoginWithQrCode';
* 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 }) {
export default function LoginByQrCode({ hintStyle, url, LoginType, wxSocketGateWay, mockServer }) {
return (
<div>
<div style={{ backgroundColor: 'white', width: 288, padding: 10, margin: 'auto' }}>
......@@ -19,7 +19,7 @@ export default function LoginByQrCode({ url, LoginType, wxSocketGateWay, mockSer
wxSocketGateWay={wxSocketGateWay}
/>
</div>
<div style={{ marginTop: 20, color: 'white' }}>
<div style={{ marginTop: 20, color: 'white', ...hintStyle, }}>
请使用
<span style={{ color: 'red' }}>微信扫一扫</span>
扫码登录
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论