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

Merge remote-tracking branch 'origin/master'

# Conflicts: # one_stop_public/tableCompon/index.jsx
...@@ -79,10 +79,15 @@ import getOneStopUploadUrl from '@/webPublic/one_stop_public/Base16/getOneStopUp ...@@ -79,10 +79,15 @@ import getOneStopUploadUrl from '@/webPublic/one_stop_public/Base16/getOneStopUp
import SwitchWeb from '@/webPublic/one_stop_public/tableCompon/Split_Index/SwitchWeb'; import SwitchWeb from '@/webPublic/one_stop_public/tableCompon/Split_Index/SwitchWeb';
import CronEditorDiy from '@/webPublic/one_stop_public/tableCompon/Split_Index/CronEditorDiy/index'; import CronEditorDiy from '@/webPublic/one_stop_public/tableCompon/Split_Index/CronEditorDiy/index';
import ButtonDiy from '@/webPublic/one_stop_public/tableCompon/Split_Index/ButtonDiy'; import ButtonDiy from '@/webPublic/one_stop_public/tableCompon/Split_Index/ButtonDiy';
import giveVarcharRules from '@/webPublic/one_stop_public/tableCompon/Split_Index/giveVarcharLength'; import giveVarcharRules
import getPopupContainer from '@/webPublic/one_stop_public/tableCompon/Split_Index/getPopupContainer'; from '@/webPublic/one_stop_public/tableCompon/Split_Index/giveVarcharLength';
import getPopupContainer
const { MonthPicker, WeekPicker } = DatePicker; from '@/webPublic/one_stop_public/tableCompon/Split_Index/getPopupContainer';
const {
MonthPicker,
WeekPicker
} = DatePicker;
/** /**
* 日期组件antd3.x有bug 详情见禅道 27152 毕业跟踪调查管理 毕业时间改为年级筛选 * 日期组件antd3.x有bug 详情见禅道 27152 毕业跟踪调查管理 毕业时间改为年级筛选
*/ */
...@@ -103,7 +108,12 @@ const giveRender = (column = {}) => { ...@@ -103,7 +108,12 @@ const giveRender = (column = {}) => {
return column; return column;
}; };
@connect(({ DataColumn, SqlManageEntity, formList, loading }) => ({ @connect(({
DataColumn,
SqlManageEntity,
formList,
loading
}) => ({
DataColumn, DataColumn,
SqlManageEntity, SqlManageEntity,
formList, formList,
...@@ -176,7 +186,7 @@ export default class TableCom extends Component { ...@@ -176,7 +186,7 @@ export default class TableCom extends Component {
file = { file = {
name: 'file', name: 'file',
action: getOneStopUploadUrl(), action: getOneStopUploadUrl(),
onChange: (info) => { onChange: info => {
if (info.file.status !== 'uploading') { if (info.file.status !== 'uploading') {
this.setState({ this.setState({
img: info.file.response, img: info.file.response,
...@@ -197,7 +207,7 @@ export default class TableCom extends Component { ...@@ -197,7 +207,7 @@ export default class TableCom extends Component {
this.setState({ searchText: selectedKeys[0] }); this.setState({ searchText: selectedKeys[0] });
}; };
handleReset = (clearFilters) => { handleReset = clearFilters => {
clearFilters(); clearFilters();
this.resetSearchText(); this.resetSearchText();
}; };
...@@ -209,15 +219,20 @@ export default class TableCom extends Component { ...@@ -209,15 +219,20 @@ export default class TableCom extends Component {
}; };
getColumnSearchProps = (dataIndex, title) => ({ getColumnSearchProps = (dataIndex, title) => ({
filterDropdown: ({ setSelectedKeys, selectedKeys, confirm, clearFilters }) => ( filterDropdown: ({
setSelectedKeys,
selectedKeys,
confirm,
clearFilters
}) => (
<div style={{ padding: 8 }}> <div style={{ padding: 8 }}>
<Input <Input
ref={(node) => { ref={node => {
this.searchInput = node; this.searchInput = node;
}} }}
placeholder={`请输入${title}`} placeholder={`请输入${title}`}
value={selectedKeys[0]} value={selectedKeys[0]}
onChange={(e) => setSelectedKeys(e.target.value ? [e.target.value] : [])} onChange={e => setSelectedKeys(e.target.value ? [e.target.value] : [])}
onPressEnter={() => this.handleSearch(selectedKeys, confirm)} onPressEnter={() => this.handleSearch(selectedKeys, confirm)}
style={{ style={{
width: 188, width: 188,
...@@ -234,21 +249,21 @@ export default class TableCom extends Component { ...@@ -234,21 +249,21 @@ export default class TableCom extends Component {
style={{ style={{
width: 90, width: 90,
marginRight: 8, marginRight: 8,
}}> }}
>
搜索 搜索
</Button> </Button>
<Button <Button
loading={this.props.loading} loading={this.props.loading}
onClick={() => this.handleReset(clearFilters)} onClick={() => this.handleReset(clearFilters)}
size="small" size="small"
style={{ width: 90 }}> style={{ width: 90 }}
>
重置 重置
</Button> </Button>
</div> </div>
), ),
filterIcon: (filtered) => ( filterIcon: filtered => <Icon type="search" style={{ color: filtered ? '#1890ff' : 'red' }}/>,
<Icon type="search" style={{ color: filtered ? '#1890ff' : 'red' }} />
),
onFilter: (value, record) => onFilter: (value, record) =>
record[dataIndex] record[dataIndex]
? record[dataIndex] ? record[dataIndex]
...@@ -256,12 +271,12 @@ export default class TableCom extends Component { ...@@ -256,12 +271,12 @@ export default class TableCom extends Component {
.toLowerCase() .toLowerCase()
.includes(value.toLowerCase()) .includes(value.toLowerCase())
: '', : '',
onFilterDropdownVisibleChange: (visible) => { onFilterDropdownVisibleChange: visible => {
if (visible) { if (visible) {
setTimeout(() => this.searchInput.select()); setTimeout(() => this.searchInput.select());
} }
}, },
render: (text) => { render: text => {
if (text != null) { if (text != null) {
return ( return (
<Highlighter <Highlighter
...@@ -296,7 +311,11 @@ export default class TableCom extends Component { ...@@ -296,7 +311,11 @@ export default class TableCom extends Component {
}; };
componentWillReceiveProps(props) { componentWillReceiveProps(props) {
const { json, mapData, obj } = props; const {
json,
mapData,
obj
} = props;
if (json == null || this.props.safe) { if (json == null || this.props.safe) {
return; return;
} }
...@@ -409,7 +428,10 @@ export default class TableCom extends Component { ...@@ -409,7 +428,10 @@ export default class TableCom extends Component {
dataFilter = ['Select', 'Radio', 'Checkbox', 'Cascader']; dataFilter = ['Select', 'Radio', 'Checkbox', 'Cascader'];
getData = (json, dataColumn, obj, init) => { getData = (json, dataColumn, obj, init) => {
const { formKey, uuid } = this.props; const {
formKey,
uuid
} = this.props;
let jsonStatic = json; let jsonStatic = json;
json = { json = {
...jsonStatic, ...jsonStatic,
...@@ -420,18 +442,21 @@ export default class TableCom extends Component { ...@@ -420,18 +442,21 @@ export default class TableCom extends Component {
allValues = JSON.stringify(allValues); allValues = JSON.stringify(allValues);
if (json.comName === 'TableSelect') { if (json.comName === 'TableSelect') {
const { dispatch } = this.props; const { dispatch } = this.props;
const { sqlKey, optionType } = json; const {
sqlKey,
optionType
} = json;
if (optionType === 'sql') { if (optionType === 'sql') {
dispatch({ dispatch({
type: 'SqlManageEntity/find', type: 'SqlManageEntity/find',
payload: { sqlKey }, payload: { sqlKey },
callback: (sqlModel) => { callback: sqlModel => {
this.setState({ sqlModel }); this.setState({ sqlModel });
if (sqlModel.dataObjId) { if (sqlModel.dataObjId) {
dispatch({ dispatch({
type: 'formList/getHead', type: 'formList/getHead',
payload: { dataObjId: sqlModel.dataObjId }, payload: { dataObjId: sqlModel.dataObjId },
callback: (datas) => { callback: datas => {
if (datas) { if (datas) {
const columns = []; const columns = [];
for (var i = 0; i < datas.length; i++) { for (var i = 0; i < datas.length; i++) {
...@@ -442,7 +467,8 @@ export default class TableCom extends Component { ...@@ -442,7 +467,8 @@ export default class TableCom extends Component {
if ( if (
['DATE', 'DATETIME', 'TIME', 'TIMESTAMP', 'YEAR'].includes(datas[i].type) ['DATE', 'DATETIME', 'TIME', 'TIMESTAMP', 'YEAR'].includes(datas[i].type)
) { ) {
column.render = (val) => moment(val).format('YYYY-MM-DD HH:mm:ss'); column.render = val => moment(val)
.format('YYYY-MM-DD HH:mm:ss');
} }
column = giveRender(column); column = giveRender(column);
...@@ -479,7 +505,8 @@ export default class TableCom extends Component { ...@@ -479,7 +505,8 @@ export default class TableCom extends Component {
break; break;
} }
column.render = (val) => moment(parseInt(val)).format(ff); column.render = val => moment(parseInt(val))
.format(ff);
} }
if (cll[k].isQuery) { if (cll[k].isQuery) {
column = { column = {
...@@ -501,7 +528,7 @@ export default class TableCom extends Component { ...@@ -501,7 +528,7 @@ export default class TableCom extends Component {
sqlKey, sqlKey,
allValues, allValues,
}, },
callback: (list) => { callback: list => {
const x = { const x = {
list: list, list: list,
pagination: false, pagination: false,
...@@ -516,7 +543,7 @@ export default class TableCom extends Component { ...@@ -516,7 +543,7 @@ export default class TableCom extends Component {
dispatch({ dispatch({
type: 'formList/getHead', type: 'formList/getHead',
payload: { dataObjId: dataColumn.referenceObjId }, payload: { dataObjId: dataColumn.referenceObjId },
callback: (datas) => { callback: datas => {
if (datas) { if (datas) {
const columns = []; const columns = [];
for (var i = 0; i < datas.length; i++) { for (var i = 0; i < datas.length; i++) {
...@@ -525,7 +552,8 @@ export default class TableCom extends Component { ...@@ -525,7 +552,8 @@ export default class TableCom extends Component {
column.title = datas[i].title; column.title = datas[i].title;
column.dataIndex = datas[i].name; column.dataIndex = datas[i].name;
if (['DATE', 'DATETIME', 'TIME', 'TIMESTAMP', 'YEAR'].includes(datas[i].type)) { if (['DATE', 'DATETIME', 'TIME', 'TIMESTAMP', 'YEAR'].includes(datas[i].type)) {
column.render = (val) => moment(val).format('YYYY-MM-DD HH:mm:ss'); column.render = val => moment(val)
.format('YYYY-MM-DD HH:mm:ss');
} }
column = giveRender(column); column = giveRender(column);
columns.push(column); columns.push(column);
...@@ -764,7 +792,8 @@ export default class TableCom extends Component { ...@@ -764,7 +792,8 @@ export default class TableCom extends Component {
delete params[i]; delete params[i];
} }
} }
noPrefixRequest(url, params).then((data) => { noPrefixRequest(url, params)
.then(data => {
// if (!data || !Array.isArray(data)) { // if (!data || !Array.isArray(data)) {
// data = []; // data = [];
// } // }
...@@ -966,7 +995,8 @@ export default class TableCom extends Component { ...@@ -966,7 +995,8 @@ export default class TableCom extends Component {
if (getToken() != null) { if (getToken() != null) {
pp.token = getToken(); pp.token = getToken();
} }
uaaRequest(url, pp).then((data) => { uaaRequest(url, pp)
.then(data => {
const { sqlKeys } = this.state; const { sqlKeys } = this.state;
sqlKeys[sqlKey].data = data; sqlKeys[sqlKey].data = data;
this.setState({ sqlKeys }); this.setState({ sqlKeys });
...@@ -1071,6 +1101,7 @@ export default class TableCom extends Component { ...@@ -1071,6 +1101,7 @@ export default class TableCom extends Component {
}; };
} }
let obj = {}; let obj = {};
if (!isEdit && fatherCode) { if (!isEdit && fatherCode) {
obj = { obj = {
...@@ -1092,8 +1123,8 @@ export default class TableCom extends Component { ...@@ -1092,8 +1123,8 @@ export default class TableCom extends Component {
* 动态生成表单配置函数所使用 * 动态生成表单配置函数所使用
*/ */
let functionObj = {}; let functionObj = {};
formulaList.map((item) => { formulaList.map(item => {
item.children.map((arr) => { item.children.map(arr => {
functionObj[arr.callKey] = arr.function; functionObj[arr.callKey] = arr.function;
}); });
}); });
...@@ -1140,7 +1171,8 @@ export default class TableCom extends Component { ...@@ -1140,7 +1171,8 @@ export default class TableCom extends Component {
messageData, messageData,
concealModel, concealModel,
}; };
};
}
getFunctionValue = (fun, column, json, callback) => { getFunctionValue = (fun, column, json, callback) => {
if (this.props.safe) return; if (this.props.safe) return;
...@@ -1238,7 +1270,12 @@ export default class TableCom extends Component { ...@@ -1238,7 +1270,12 @@ export default class TableCom extends Component {
}; };
componentDidMount() { componentDidMount() {
const { json, mapData, obj, init } = this.props; const {
json,
mapData,
obj,
init
} = this.props;
if (json == null) { if (json == null) {
return; return;
} }
...@@ -1247,7 +1284,7 @@ export default class TableCom extends Component { ...@@ -1247,7 +1284,7 @@ export default class TableCom extends Component {
dispatch({ dispatch({
type: 'SqlManageEntity/find', type: 'SqlManageEntity/find',
payload: { sqlKey: json.sqlKey }, payload: { sqlKey: json.sqlKey },
callback: (res) => { callback: res => {
this.setState({ sqlContent: res.sql }); this.setState({ sqlContent: res.sql });
}, },
}); });
...@@ -1283,7 +1320,13 @@ export default class TableCom extends Component { ...@@ -1283,7 +1320,13 @@ export default class TableCom extends Component {
} }
fetchData3 = (obj, dataColumn, init, json, allValues) => { fetchData3 = (obj, dataColumn, init, json, allValues) => {
const { sqlKey, labelName, valueName, isMeta, filterSql } = json; const {
sqlKey,
labelName,
valueName,
isMeta,
filterSql
} = json;
if (isMeta) { if (isMeta) {
// 2022年7月5日 2022 姚鑫国说的 如果是元数据 不需要传这个allValues // 2022年7月5日 2022 姚鑫国说的 如果是元数据 不需要传这个allValues
// 解决禅道bug 28017 // 解决禅道bug 28017
...@@ -1306,7 +1349,7 @@ export default class TableCom extends Component { ...@@ -1306,7 +1349,7 @@ export default class TableCom extends Component {
dispatch({ dispatch({
type: 'DataColumn/getSqlOptions', type: 'DataColumn/getSqlOptions',
payload: params, payload: params,
callback: (options) => { callback: options => {
const optionsx = []; const optionsx = [];
let base52 = dataColumn.base52; let base52 = dataColumn.base52;
let vl = this.props.form.getFieldsValue()[base52]; let vl = this.props.form.getFieldsValue()[base52];
...@@ -1358,7 +1401,7 @@ export default class TableCom extends Component { ...@@ -1358,7 +1401,7 @@ export default class TableCom extends Component {
dispatch({ dispatch({
type: 'DataColumn/getSqlLabels', type: 'DataColumn/getSqlLabels',
payload: params, payload: params,
callback: (labels) => { callback: labels => {
this.setState({ this.setState({
getSqlOptionsCache, getSqlOptionsCache,
labels, labels,
...@@ -1383,7 +1426,7 @@ export default class TableCom extends Component { ...@@ -1383,7 +1426,7 @@ export default class TableCom extends Component {
dispatch({ dispatch({
type: 'DataColumn/getSqlOptions', type: 'DataColumn/getSqlOptions',
payload: params, payload: params,
callback: (options) => { callback: options => {
// console.log(options); // console.log(options);
let base52 = dataColumn.base52; let base52 = dataColumn.base52;
let vl = this.props.form.getFieldsValue()[base52]; let vl = this.props.form.getFieldsValue()[base52];
...@@ -1466,7 +1509,7 @@ export default class TableCom extends Component { ...@@ -1466,7 +1509,7 @@ export default class TableCom extends Component {
filterSql, filterSql,
allValues, allValues,
}, },
callback: (options) => { callback: options => {
const optionsx = []; const optionsx = [];
for (var i = 0; i < options.length; i++) { for (var i = 0; i < options.length; i++) {
optionsx.push({ optionsx.push({
...@@ -1490,7 +1533,7 @@ export default class TableCom extends Component { ...@@ -1490,7 +1533,7 @@ export default class TableCom extends Component {
filterSql, filterSql,
allValues, allValues,
}, },
callback: (labels) => { callback: labels => {
this.setState({ this.setState({
labels, labels,
selectDis: false, selectDis: false,
...@@ -1506,7 +1549,7 @@ export default class TableCom extends Component { ...@@ -1506,7 +1549,7 @@ export default class TableCom extends Component {
filterSql, filterSql,
allValues, allValues,
}, },
callback: (options) => { callback: options => {
const optionsx = []; const optionsx = [];
for (var i = 0; i < options.length; i++) { for (var i = 0; i < options.length; i++) {
optionsx.push({ optionsx.push({
...@@ -1522,8 +1565,11 @@ export default class TableCom extends Component { ...@@ -1522,8 +1565,11 @@ export default class TableCom extends Component {
}); });
} }
}; };
getColumn = (key) => { getColumn = key => {
let { mapData, json } = this.props; let {
mapData,
json
} = this.props;
const columnIds = json?.columnIds; const columnIds = json?.columnIds;
...@@ -1575,13 +1621,24 @@ export default class TableCom extends Component { ...@@ -1575,13 +1621,24 @@ export default class TableCom extends Component {
...getActiveJson(formKey, uuid), ...getActiveJson(formKey, uuid),
}; };
} }
// if(uuid === 'violation_type_id'){
// if (uuid === 'violation_type_id') { // console.log(formKey, json);
// console.log(formKey, json.options);
// } // }
const { options, labels, selectDis, modalCode, modalTitle, modalInit, modalProps } = this.state; const {
const { getFieldDecorator, getFieldError, getFieldProps } = this.props.form; options,
labels,
selectDis,
modalCode,
modalTitle,
modalInit,
modalProps
} = this.state;
const {
getFieldDecorator,
getFieldError,
getFieldProps
} = this.props.form;
const disabled = json != null ? json.disabled : false; const disabled = json != null ? json.disabled : false;
const permRank = json != null ? (json.permRank != null ? json.permRank : 0) : 0; const permRank = json != null ? (json.permRank != null ? json.permRank : 0) : 0;
if (json?.label === '账号') { if (json?.label === '账号') {
...@@ -1604,7 +1661,7 @@ export default class TableCom extends Component { ...@@ -1604,7 +1661,7 @@ export default class TableCom extends Component {
) { ) {
return <></>; return <></>;
} }
return <QRCode {...this.state.option} key={uuid} />; return <QRCode {...this.state.option} key={uuid}/>;
} }
if (json.comName == 'Echart') { if (json.comName == 'Echart') {
return ( return (
...@@ -1620,7 +1677,7 @@ export default class TableCom extends Component { ...@@ -1620,7 +1677,7 @@ export default class TableCom extends Component {
); );
} }
if (json.comName == 'Graph') { if (json.comName == 'Graph') {
return <Neo4jD3Com key={uuid} json={json} option={this.state.option || []} />; return <Neo4jD3Com key={uuid} json={json} option={this.state.option || []}/>;
} }
if (json.comName == 'PartForm') { if (json.comName == 'PartForm') {
...@@ -1635,7 +1692,7 @@ export default class TableCom extends Component { ...@@ -1635,7 +1692,7 @@ export default class TableCom extends Component {
<> <>
{this.props.form.getFieldDecorator(uuid, { {this.props.form.getFieldDecorator(uuid, {
initialValue: fk, initialValue: fk,
})(<Input type="hidden" />)}{' '} })(<Input type="hidden"/>)}{' '}
<ZdyTable <ZdyTable
taskId={this.props.taskId} taskId={this.props.taskId}
importExcel={this.props.importExcel} importExcel={this.props.importExcel}
...@@ -1689,7 +1746,8 @@ export default class TableCom extends Component { ...@@ -1689,7 +1746,8 @@ export default class TableCom extends Component {
style={{ style={{
textAlign: 'center', textAlign: 'center',
height: value == null ? 20 : null, height: value == null ? 20 : null,
}}> }}
>
{value} {value}
</div> </div>
); );
...@@ -1710,13 +1768,14 @@ export default class TableCom extends Component { ...@@ -1710,13 +1768,14 @@ export default class TableCom extends Component {
<> <>
{this.props.form.getFieldDecorator(uid, { {this.props.form.getFieldDecorator(uid, {
initialValue: obj[uuid] || json.initialValue, initialValue: obj[uuid] || json.initialValue,
})(<Input type="hidden" />)} })(<Input type="hidden"/>)}
<span <span
style={{ style={{
fontWeight: get === 'mobile' ? 'bold' : '', fontWeight: get === 'mobile' ? 'bold' : '',
marginRight: get === 'mobile' ? 12 : '', marginRight: get === 'mobile' ? 12 : '',
}} }}
{...json.props}> {...json.props}
>
{obj[uuid] || json.initialValue} {obj[uuid] || json.initialValue}
</span> </span>
</> </>
...@@ -1726,13 +1785,14 @@ export default class TableCom extends Component { ...@@ -1726,13 +1785,14 @@ export default class TableCom extends Component {
<> <>
{this.props.form.getFieldDecorator(uid, { {this.props.form.getFieldDecorator(uid, {
initialValue: this.props.form.getFieldsValue()[uid] || json.initialValue, initialValue: this.props.form.getFieldsValue()[uid] || json.initialValue,
})(<Input type="hidden" />)} })(<Input type="hidden"/>)}
<span <span
style={{ style={{
fontWeight: get === 'mobile' ? 'bold' : '', fontWeight: get === 'mobile' ? 'bold' : '',
marginRight: get === 'mobile' ? 12 : '', marginRight: get === 'mobile' ? 12 : '',
}} }}
{...json.props}> {...json.props}
>
{this.props.form.getFieldsValue()[uid]} {this.props.form.getFieldsValue()[uid]}
</span> </span>
</> </>
...@@ -1774,7 +1834,7 @@ export default class TableCom extends Component { ...@@ -1774,7 +1834,7 @@ export default class TableCom extends Component {
cm = ( cm = (
<span style={{ paddingRight: get === 'mobile' ? 8 : '' }}> <span style={{ paddingRight: get === 'mobile' ? 8 : '' }}>
{value} {value}
{get === 'mobile' ? <br /> : ''} {get === 'mobile' ? <br/> : ''}
</span> </span>
); );
break; break;
...@@ -1782,7 +1842,7 @@ export default class TableCom extends Component { ...@@ -1782,7 +1842,7 @@ export default class TableCom extends Component {
cm = ( cm = (
<span> <span>
{value} {value}
{get === 'mobile' ? <br /> : ''} {get === 'mobile' ? <br/> : ''}
</span> </span>
); );
...@@ -1800,7 +1860,7 @@ export default class TableCom extends Component { ...@@ -1800,7 +1860,7 @@ export default class TableCom extends Component {
cm = ( cm = (
<span style={{ paddingRight: get == 'mobile' ? 8 : '' }}> <span style={{ paddingRight: get == 'mobile' ? 8 : '' }}>
{value} {value}
{get === 'mobile' ? <br /> : ''} {get === 'mobile' ? <br/> : ''}
</span> </span>
); );
...@@ -1809,7 +1869,7 @@ export default class TableCom extends Component { ...@@ -1809,7 +1869,7 @@ export default class TableCom extends Component {
cm = ( cm = (
<span> <span>
{value} {value}
{get === 'mobile' ? <br /> : ''} {get === 'mobile' ? <br/> : ''}
</span> </span>
); );
...@@ -1817,8 +1877,9 @@ export default class TableCom extends Component { ...@@ -1817,8 +1877,9 @@ export default class TableCom extends Component {
case 'DatePicker': case 'DatePicker':
cm = value ? ( cm = value ? (
<span> <span>
{moment(parseInt(value)).format('YYYY-MM-DD HH:mm:ss')} {moment(parseInt(value))
{get === 'mobile' ? <br /> : ''} .format('YYYY-MM-DD HH:mm:ss')}
{get === 'mobile' ? <br/> : ''}
</span> </span>
) : ( ) : (
'' ''
...@@ -1840,7 +1901,7 @@ export default class TableCom extends Component { ...@@ -1840,7 +1901,7 @@ export default class TableCom extends Component {
); );
})} })}
</ul> </ul>
{get === 'mobile' ? <br /> : ''} {get === 'mobile' ? <br/> : ''}
</> </>
); );
...@@ -1860,7 +1921,7 @@ export default class TableCom extends Component { ...@@ -1860,7 +1921,7 @@ export default class TableCom extends Component {
); );
})} })}
</ul> </ul>
{get === 'mobile' ? <br /> : ''} {get === 'mobile' ? <br/> : ''}
</> </>
); );
...@@ -1885,7 +1946,7 @@ export default class TableCom extends Component { ...@@ -1885,7 +1946,7 @@ export default class TableCom extends Component {
height: json.height, height: json.height,
}} }}
/> />
{get === 'mobile' ? <br /> : ''} {get === 'mobile' ? <br/> : ''}
</> </>
); );
} }
...@@ -1911,7 +1972,7 @@ export default class TableCom extends Component { ...@@ -1911,7 +1972,7 @@ export default class TableCom extends Component {
height: json.height, height: json.height,
}} }}
/> />
{get === 'mobile' ? <br /> : ''} {get === 'mobile' ? <br/> : ''}
</> </>
); );
} }
...@@ -1928,7 +1989,8 @@ export default class TableCom extends Component { ...@@ -1928,7 +1989,8 @@ export default class TableCom extends Component {
isPreview={isPreview} isPreview={isPreview}
labelCol={{ span: json.mLabelSpan || json.labelSpan }} labelCol={{ span: json.mLabelSpan || json.labelSpan }}
wrapperCol={{ span: json.mWrapperSpan || json.wrapperSpan }} wrapperCol={{ span: json.mWrapperSpan || json.wrapperSpan }}
label={json.label ? json.label : sqlData[key] ? sqlData[key].title : ''}> label={json.label ? json.label : sqlData[key] ? sqlData[key].title : ''}
>
{cm} {cm}
</MobileItem> </MobileItem>
); );
...@@ -1939,12 +2001,13 @@ export default class TableCom extends Component { ...@@ -1939,12 +2001,13 @@ export default class TableCom extends Component {
isPreview={isPreview} isPreview={isPreview}
labelCol={{ span: json.mLabelSpan || json.labelSpan }} labelCol={{ span: json.mLabelSpan || json.labelSpan }}
wrapperCol={{ span: json.mWrapperSpan || json.wrapperSpan }} wrapperCol={{ span: json.mWrapperSpan || json.wrapperSpan }}
label={json.label ? json.label : sqlData[key] ? sqlData[key].title : ''}> label={json.label ? json.label : sqlData[key] ? sqlData[key].title : ''}
>
{cm} {cm}
</MobileItem> </MobileItem>
{this.props.form.getFieldDecorator(`defaultValues.${formKey}.${key}`, { {this.props.form.getFieldDecorator(`defaultValues.${formKey}.${key}`, {
initialValue: value, initialValue: value,
})(<Input type="hidden" />)} })(<Input type="hidden"/>)}
</> </>
); );
} }
...@@ -1957,7 +2020,7 @@ export default class TableCom extends Component { ...@@ -1957,7 +2020,7 @@ export default class TableCom extends Component {
{cm} {cm}
{this.props.form.getFieldDecorator(`defaultValues.${formKey}.${key}`, { {this.props.form.getFieldDecorator(`defaultValues.${formKey}.${key}`, {
initialValue: value, initialValue: value,
})(<Input type="hidden" />)} })(<Input type="hidden"/>)}
</> </>
); );
} }
...@@ -1971,7 +2034,8 @@ export default class TableCom extends Component { ...@@ -1971,7 +2034,8 @@ export default class TableCom extends Component {
style={{ style={{
minHeight: 40, minHeight: 40,
lineHeight: '40px', lineHeight: '40px',
}}> }}
>
<Col <Col
className={json.label ? json.label : sqlData[key] ? styles.row_col_div : ''} className={json.label ? json.label : sqlData[key] ? styles.row_col_div : ''}
span={json.labelSpan} span={json.labelSpan}
...@@ -1982,7 +2046,8 @@ export default class TableCom extends Component { ...@@ -1982,7 +2046,8 @@ export default class TableCom extends Component {
overflow: 'hidden', overflow: 'hidden',
fontSize: 14, fontSize: 14,
color: 'rgba(0,0,0,0.85)', color: 'rgba(0,0,0,0.85)',
}}> }}
>
{json.label ? ( {json.label ? (
<> <>
{json.label} {json.label}
...@@ -1991,7 +2056,8 @@ export default class TableCom extends Component { ...@@ -1991,7 +2056,8 @@ export default class TableCom extends Component {
position: 'relative', position: 'relative',
top: '-0.5px', top: '-0.5px',
margin: '0 8px 0 2px', margin: '0 8px 0 2px',
}}> }}
>
: :
</span> </span>
</> </>
...@@ -2003,7 +2069,8 @@ export default class TableCom extends Component { ...@@ -2003,7 +2069,8 @@ export default class TableCom extends Component {
position: 'relative', position: 'relative',
top: '-0.5px', top: '-0.5px',
margin: '0 8px 0 2px', margin: '0 8px 0 2px',
}}> }}
>
: :
</span> </span>
</> </>
...@@ -2018,7 +2085,8 @@ export default class TableCom extends Component { ...@@ -2018,7 +2085,8 @@ export default class TableCom extends Component {
lineHeight: '40px', lineHeight: '40px',
zoom: 1, zoom: 1,
fontSize: 14, fontSize: 14,
}}> }}
>
{cm} {cm}
</Col> </Col>
</Row> </Row>
...@@ -2028,7 +2096,8 @@ export default class TableCom extends Component { ...@@ -2028,7 +2096,8 @@ export default class TableCom extends Component {
<Form.Item <Form.Item
labelCol={{ span: json.labelSpan }} labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }} wrapperCol={{ span: json.wrapperSpan }}
label={json.label ? json.label : sqlData[key] ? sqlData[key].title : ''}> label={json.label ? json.label : sqlData[key] ? sqlData[key].title : ''}
>
{cm} {cm}
</Form.Item> </Form.Item>
); );
...@@ -2039,12 +2108,13 @@ export default class TableCom extends Component { ...@@ -2039,12 +2108,13 @@ export default class TableCom extends Component {
<Form.Item <Form.Item
labelCol={{ span: json.labelSpan }} labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }} wrapperCol={{ span: json.wrapperSpan }}
label={json.label ? json.label : sqlData[key] ? sqlData[key].title : ''}> label={json.label ? json.label : sqlData[key] ? sqlData[key].title : ''}
>
{cm} {cm}
</Form.Item> </Form.Item>
{this.props.form.getFieldDecorator(`defaultValues.${formKey}.${key}`, { {this.props.form.getFieldDecorator(`defaultValues.${formKey}.${key}`, {
initialValue: value, initialValue: value,
})(<Input type="hidden" />)} })(<Input type="hidden"/>)}
</> </>
); );
} }
...@@ -2057,7 +2127,7 @@ export default class TableCom extends Component { ...@@ -2057,7 +2127,7 @@ export default class TableCom extends Component {
{cm} {cm}
{this.props.form.getFieldDecorator(`defaultValues.${formKey}.${key}`, { {this.props.form.getFieldDecorator(`defaultValues.${formKey}.${key}`, {
initialValue: value, initialValue: value,
})(<Input type="hidden" />)} })(<Input type="hidden"/>)}
</> </>
); );
} }
...@@ -2136,22 +2206,19 @@ export default class TableCom extends Component { ...@@ -2136,22 +2206,19 @@ export default class TableCom extends Component {
case 'MobileCard': case 'MobileCard':
let value = obj[dataColumn.base52]; let value = obj[dataColumn.base52];
if (!value || value === 'null') { if (!value || value === 'null') {
return <div />; return <div/>;
} }
cm = ( cm = <MobileCard value={value}
<MobileCard
value={value}
json={json} json={json}
getArguments={this.functionArguments} getArguments={this.functionArguments}
tableComProps={this.props} tableComProps={this.props}
dataColumn={dataColumn} dataColumn={dataColumn}
/> />;
);
break; break;
case 'WangEditor': case 'WangEditor':
let textV = obj[dataColumn.base52]; let textV = obj[dataColumn.base52];
if (!textV || textV === 'null') { if (!textV || textV === 'null') {
return <div />; return <div/>;
} }
cm = ( cm = (
<div <div
...@@ -2168,7 +2235,8 @@ ${obj[dataColumn.base52]} ...@@ -2168,7 +2235,8 @@ ${obj[dataColumn.base52]}
<span <span
style={{ style={{
wordBreak: 'break-all', wordBreak: 'break-all',
}}> }}
>
{obj[dataColumn.base52]} {obj[dataColumn.base52]}
</span> </span>
); );
...@@ -2184,7 +2252,8 @@ ${obj[dataColumn.base52]} ...@@ -2184,7 +2252,8 @@ ${obj[dataColumn.base52]}
data-obj-comname={'Input'} data-obj-comname={'Input'}
style={{ style={{
wordBreak: 'break-all', wordBreak: 'break-all',
}}> }}
>
{obj[dataColumn.base52]} {obj[dataColumn.base52]}
</span> </span>
); );
...@@ -2213,8 +2282,7 @@ ${obj[dataColumn.base52]} ...@@ -2213,8 +2282,7 @@ ${obj[dataColumn.base52]}
cm = ( cm = (
<span> <span>
{labels != null {labels != null
? labels.map( ? labels.map((r, i) =>
(r, i) =>
i == 0 ? ( i == 0 ? (
typeof r == 'string' ? ( typeof r == 'string' ? (
<span>{r}</span> <span>{r}</span>
...@@ -2237,12 +2305,6 @@ ${obj[dataColumn.base52]} ...@@ -2237,12 +2305,6 @@ ${obj[dataColumn.base52]}
let stringLabels = labels != null && labels.length > 0 ? labels.join(' ') : ''; let stringLabels = labels != null && labels.length > 0 ? labels.join(' ') : '';
if (Array.isArray(labels) && labels.length && typeof labels[0] === 'object') { if (Array.isArray(labels) && labels.length && typeof labels[0] === 'object') {
stringLabels = Object.values(labels[0]); stringLabels = Object.values(labels[0]);
}
if(!stringLabels && Array.isArray(json.options) && obj[dataColumn.base52]){
let findLabels = json.options.find((g) => obj[dataColumn.base52] === g.value);
if(findLabels){
stringLabels = findLabels.label;
}
} }
cm = <span>{stringLabels}</span>; cm = <span>{stringLabels}</span>;
...@@ -2292,11 +2354,13 @@ ${obj[dataColumn.base52]} ...@@ -2292,11 +2354,13 @@ ${obj[dataColumn.base52]}
} else { } else {
cm = ( cm = (
<span> <span>
{moment(parseInt(obj[begin.base52])).format( {moment(parseInt(obj[begin.base52]))
.format(
json.format ? json.format : 'YYYY-MM-DD HH:mm:ss', json.format ? json.format : 'YYYY-MM-DD HH:mm:ss',
)}{' '} )}{' '}
{' '} {' '}
{moment(parseInt(obj[end.base52])).format( {moment(parseInt(obj[end.base52]))
.format(
json.format ? json.format : 'YYYY-MM-DD HH:mm:ss', json.format ? json.format : 'YYYY-MM-DD HH:mm:ss',
)} )}
</span> </span>
...@@ -2312,14 +2376,16 @@ ${obj[dataColumn.base52]} ...@@ -2312,14 +2376,16 @@ ${obj[dataColumn.base52]}
if (vTime && typeof vTime === 'string' && vTime.indexOf('-') <= -1) { if (vTime && typeof vTime === 'string' && vTime.indexOf('-') <= -1) {
cm = ( cm = (
<span> <span>
{moment(parseInt(vTime)).format(json.format ? json.format : 'YYYY-MM-DD HH:mm:ss')} {moment(parseInt(vTime))
.format(json.format ? json.format : 'YYYY-MM-DD HH:mm:ss')}
</span> </span>
); );
} else { } else {
cm = ( cm = (
<span> <span>
{vTime {vTime
? moment(+new Date(vTime)).format( ? moment(+new Date(vTime))
.format(
json.format ? json.format : 'YYYY-MM-DD HH:mm:ss', json.format ? json.format : 'YYYY-MM-DD HH:mm:ss',
) )
: ''} : ''}
...@@ -2470,7 +2536,8 @@ ${obj[dataColumn.base52]} ...@@ -2470,7 +2536,8 @@ ${obj[dataColumn.base52]}
display: 'inline-block', display: 'inline-block',
width: '100%', width: '100%',
textAlign: 'center', textAlign: 'center',
}}> }}
>
暂无附件 暂无附件
</span> </span>
); );
...@@ -2556,14 +2623,14 @@ ${obj[dataColumn.base52]} ...@@ -2556,14 +2623,14 @@ ${obj[dataColumn.base52]}
marginLeft: 5, marginLeft: 5,
width: width:
get === 'mobile' get === 'mobile'
? document.documentElement.clientWidth - 10 || ? document.documentElement.clientWidth - 10 || document.body.clientWidth - 10
document.body.clientWidth - 10
: json.width, : json.width,
height: get === 'mobile' ? '' : json.height, height: get === 'mobile' ? '' : json.height,
}} }}
/> />
); );
} }
} }
break; break;
...@@ -2740,14 +2807,15 @@ ${obj[dataColumn.base52]} ...@@ -2740,14 +2807,15 @@ ${obj[dataColumn.base52]}
], ],
})} })}
disabled={disabled} disabled={disabled}
onClick={(checked) => { onClick={checked => {
// set new value // set new value
this.props.form.setFieldsValue({ this.props.form.setFieldsValue({
[dataColumn.base52]: checked, [dataColumn.base52]: checked,
}); });
}} }}
/> />
}> }
>
{(json.isMobileLabel != null && json.isMobileLabel) || {(json.isMobileLabel != null && json.isMobileLabel) ||
(json.isMobileLabel == null && json.isLabel) (json.isMobileLabel == null && json.isLabel)
? title ? title
...@@ -2768,7 +2836,7 @@ ${obj[dataColumn.base52]} ...@@ -2768,7 +2836,7 @@ ${obj[dataColumn.base52]}
message: '请选择' + title, message: '请选择' + title,
}, },
], ],
})(<SwitchWeb json={json} disabled={disabled} />); })(<SwitchWeb json={json} disabled={disabled}/>);
break; break;
case 'TextArea': case 'TextArea':
...@@ -2809,7 +2877,8 @@ ${obj[dataColumn.base52]} ...@@ -2809,7 +2877,8 @@ ${obj[dataColumn.base52]}
isPreview={isPreview} isPreview={isPreview}
labelCol={{ span: json.mLabelSpan || json.labelSpan }} labelCol={{ span: json.mLabelSpan || json.labelSpan }}
wrapperCol={{ span: json.mWrapperSpan || json.wrapperSpan }} wrapperCol={{ span: json.mWrapperSpan || json.wrapperSpan }}
label={title}> label={title}
>
{cm} {cm}
</MobileItem> </MobileItem>
); );
...@@ -2846,7 +2915,10 @@ ${obj[dataColumn.base52]} ...@@ -2846,7 +2915,10 @@ ${obj[dataColumn.base52]}
otherProps = {}; otherProps = {};
} }
} }
const { disabledInputStyle = {}, addonAfter } = otherProps; const {
disabledInputStyle = {},
addonAfter
} = otherProps;
let inputStyle = { let inputStyle = {
width: json.width, width: json.width,
}; };
...@@ -2885,7 +2957,8 @@ ${obj[dataColumn.base52]} ...@@ -2885,7 +2957,8 @@ ${obj[dataColumn.base52]}
isPreview={isPreview} isPreview={isPreview}
labelCol={{ span: json.mLabelSpan || json.labelSpan }} labelCol={{ span: json.mLabelSpan || json.labelSpan }}
wrapperCol={{ span: json.mWrapperSpan || json.wrapperSpan }} wrapperCol={{ span: json.mWrapperSpan || json.wrapperSpan }}
label={title}> label={title}
>
{cm} {cm}
</MobileItem> </MobileItem>
); );
...@@ -2895,7 +2968,7 @@ ${obj[dataColumn.base52]} ...@@ -2895,7 +2968,7 @@ ${obj[dataColumn.base52]}
case 'InputHidden': case 'InputHidden':
cm = getFieldDecorator(dataColumn.base52, { cm = getFieldDecorator(dataColumn.base52, {
initialValue: initValue, initialValue: initValue,
})(<Input type="hidden" />); })(<Input type="hidden"/>);
break; break;
case 'InputNumber': case 'InputNumber':
if (json?.otherProps) { if (json?.otherProps) {
...@@ -2940,7 +3013,8 @@ ${obj[dataColumn.base52]} ...@@ -2940,7 +3013,8 @@ ${obj[dataColumn.base52]}
isPreview={isPreview} isPreview={isPreview}
labelCol={{ span: json.mLabelSpan || json.labelSpan }} labelCol={{ span: json.mLabelSpan || json.labelSpan }}
wrapperCol={{ span: json.mWrapperSpan || json.wrapperSpan }} wrapperCol={{ span: json.mWrapperSpan || json.wrapperSpan }}
label={title}> label={title}
>
{cm} {cm}
</MobileItem> </MobileItem>
); );
...@@ -2963,7 +3037,7 @@ ${obj[dataColumn.base52]} ...@@ -2963,7 +3037,7 @@ ${obj[dataColumn.base52]}
message: '请选择' + dataColumn.title, message: '请选择' + dataColumn.title,
}, },
], ],
})(<Radio.Group options={options} disabled={disabled} />); })(<Radio.Group options={options} disabled={disabled}/>);
if (get == 'mobile') { if (get == 'mobile') {
cm = <div>{cm}</div>; cm = <div>{cm}</div>;
if ( if (
...@@ -2976,7 +3050,8 @@ ${obj[dataColumn.base52]} ...@@ -2976,7 +3050,8 @@ ${obj[dataColumn.base52]}
isPreview={isPreview} isPreview={isPreview}
labelCol={{ span: json.mLabelSpan || json.labelSpan }} labelCol={{ span: json.mLabelSpan || json.labelSpan }}
wrapperCol={{ span: json.mWrapperSpan || json.wrapperSpan }} wrapperCol={{ span: json.mWrapperSpan || json.wrapperSpan }}
label={title}> label={title}
>
{cm} {cm}
</MobileItem> </MobileItem>
); );
...@@ -3002,7 +3077,7 @@ ${obj[dataColumn.base52]} ...@@ -3002,7 +3077,7 @@ ${obj[dataColumn.base52]}
message: '请选择' + dataColumn.title, message: '请选择' + dataColumn.title,
}, },
], ],
})(<Checkbox.Group options={options} disabled={disabled} />)} })(<Checkbox.Group options={options} disabled={disabled}/>)}
</Flex> </Flex>
); );
...@@ -3016,7 +3091,8 @@ ${obj[dataColumn.base52]} ...@@ -3016,7 +3091,8 @@ ${obj[dataColumn.base52]}
isPreview={isPreview} isPreview={isPreview}
labelCol={{ span: json.mLabelSpan || json.labelSpan }} labelCol={{ span: json.mLabelSpan || json.labelSpan }}
wrapperCol={{ span: json.mWrapperSpan || json.wrapperSpan }} wrapperCol={{ span: json.mWrapperSpan || json.wrapperSpan }}
label={title}> label={title}
>
{cm} {cm}
</MobileItem> </MobileItem>
); );
...@@ -3054,16 +3130,8 @@ ${obj[dataColumn.base52]} ...@@ -3054,16 +3130,8 @@ ${obj[dataColumn.base52]}
otherProps = {}; otherProps = {};
} }
} }
// if (uuid === 'violation_type_id') {
// console.log(json.options);
// }
const optionsDiy = Array.isArray(json.options)
? json.options
: Array.isArray(options)
? options
: [];
cm = getFieldDecorator(dataColumn.base52, { cm = getFieldDecorator(dataColumn.base52, {
initialValue: !initValue && otherProps?.mode === 'multiple' ? undefined : initValue, initialValue: !initValue && otherProps?.mode === 'multiple' ? undefined : initValue ,
rules: rules:
json.vlds && json.vlds.length > 0 json.vlds && json.vlds.length > 0
? json.vlds ? json.vlds
...@@ -3087,7 +3155,7 @@ ${obj[dataColumn.base52]} ...@@ -3087,7 +3155,7 @@ ${obj[dataColumn.base52]}
? setTimeout(() => { ? setTimeout(() => {
if (document.querySelectorAll(`.ant-select-search__field`).length > 0) { if (document.querySelectorAll(`.ant-select-search__field`).length > 0) {
let ary = [...document.querySelectorAll(`.ant-select-search__field`)]; let ary = [...document.querySelectorAll(`.ant-select-search__field`)];
ary.map((item) => { ary.map(item => {
item.setAttribute('readonly', 'readonly'); item.setAttribute('readonly', 'readonly');
// setTimeout(() => { // setTimeout(() => {
// ary.map(arr => { // ary.map(arr => {
...@@ -3101,17 +3169,27 @@ ${obj[dataColumn.base52]} ...@@ -3101,17 +3169,27 @@ ${obj[dataColumn.base52]}
}} }}
filterOption={(input, option) => filterOption={(input, option) =>
option option
? option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0 ? option.props.children.toLowerCase()
.indexOf(input.toLowerCase()) >= 0
: false : false
} }
{...otherProps}> {...otherProps}
{optionsDiy.map((r) => { >
{json.options && Array.isArray(json.options)
? json.options.map(r => {
return ( return (
<Option key={r.value} value={r.value}> <Option key={r.value} value={r.value}>
{r.label} {r.label}
</Option> </Option>
); );
})} })
: options && options instanceof Array
? options.map(r => (
<Option key={r.value} value={r.value}>
{r.label}
</Option>
))
: ''}
</Select>, </Select>,
); );
if ( if (
...@@ -3125,7 +3203,8 @@ ${obj[dataColumn.base52]} ...@@ -3125,7 +3203,8 @@ ${obj[dataColumn.base52]}
isPreview={isPreview} isPreview={isPreview}
labelCol={{ span: json.mLabelSpan || json.labelSpan }} labelCol={{ span: json.mLabelSpan || json.labelSpan }}
wrapperCol={{ span: json.mWrapperSpan || json.wrapperSpan }} wrapperCol={{ span: json.mWrapperSpan || json.wrapperSpan }}
label={title}> label={title}
>
{cm} {cm}
</MobileItem> </MobileItem>
); );
...@@ -3148,7 +3227,8 @@ ${obj[dataColumn.base52]} ...@@ -3148,7 +3227,8 @@ ${obj[dataColumn.base52]}
} }
const filterF = function filter(inputValue, path) { const filterF = function filter(inputValue, path) {
return path.some( return path.some(
(option) => option?.label?.toLowerCase()?.indexOf(inputValue.toLowerCase()) > -1, option => option?.label?.toLowerCase()
?.indexOf(inputValue.toLowerCase()) > -1,
); );
}; };
// if(this.props.uuid === 'id_32691685234912400529714267d34dc585a2'){ // if(this.props.uuid === 'id_32691685234912400529714267d34dc585a2'){
...@@ -3196,7 +3276,7 @@ ${obj[dataColumn.base52]} ...@@ -3196,7 +3276,7 @@ ${obj[dataColumn.base52]}
message: '请选择' + dataColumn.title, message: '请选择' + dataColumn.title,
}, },
], ],
})(<MobileCascader options={options} label={title} disabled={disabled} json={json} />); })(<MobileCascader options={options} label={title} disabled={disabled} json={json}/>);
} }
if ( if (
...@@ -3210,7 +3290,8 @@ ${obj[dataColumn.base52]} ...@@ -3210,7 +3290,8 @@ ${obj[dataColumn.base52]}
isPreview={isPreview} isPreview={isPreview}
labelCol={{ span: json.mLabelSpan || json.labelSpan }} labelCol={{ span: json.mLabelSpan || json.labelSpan }}
wrapperCol={{ span: json.mWrapperSpan || json.wrapperSpan }} wrapperCol={{ span: json.mWrapperSpan || json.wrapperSpan }}
label={title}> label={title}
>
{cm} {cm}
</MobileItem> </MobileItem>
); );
...@@ -3266,7 +3347,8 @@ ${obj[dataColumn.base52]} ...@@ -3266,7 +3347,8 @@ ${obj[dataColumn.base52]}
isPreview={isPreview} isPreview={isPreview}
labelCol={{ span: json.mLabelSpan || json.labelSpan }} labelCol={{ span: json.mLabelSpan || json.labelSpan }}
wrapperCol={{ span: json.mWrapperSpan || json.wrapperSpan }} wrapperCol={{ span: json.mWrapperSpan || json.wrapperSpan }}
label={title}> label={title}
>
{cm} {cm}
</MobileItem> </MobileItem>
); );
...@@ -3299,11 +3381,13 @@ ${obj[dataColumn.base52]} ...@@ -3299,11 +3381,13 @@ ${obj[dataColumn.base52]}
if (!isEdit) { if (!isEdit) {
cm = ( cm = (
<span> <span>
{moment(parseInt(obj[begin.base52])).format( {moment(parseInt(obj[begin.base52]))
.format(
json.format ? json.format : 'YYYY-MM-DD HH:mm:ss', json.format ? json.format : 'YYYY-MM-DD HH:mm:ss',
)}{' '} )}{' '}
{' '} {' '}
{moment(parseInt(obj[end.base52])).format( {moment(parseInt(obj[end.base52]))
.format(
json.format ? json.format : 'YYYY-MM-DD HH:mm:ss', json.format ? json.format : 'YYYY-MM-DD HH:mm:ss',
)} )}
</span> </span>
...@@ -3341,7 +3425,8 @@ ${obj[dataColumn.base52]} ...@@ -3341,7 +3425,8 @@ ${obj[dataColumn.base52]}
labelCol={{ span: json.mLabelSpan || json.labelSpan }} labelCol={{ span: json.mLabelSpan || json.labelSpan }}
wrapperCol={{ span: json.mWrapperSpan || json.wrapperSpan }} wrapperCol={{ span: json.mWrapperSpan || json.wrapperSpan }}
label={title} label={title}
required={required}> required={required}
>
{cm} {cm}
</MobileItem> </MobileItem>
); );
...@@ -3361,7 +3446,7 @@ ${obj[dataColumn.base52]} ...@@ -3361,7 +3446,7 @@ ${obj[dataColumn.base52]}
message: '请选择起止时间', message: '请选择起止时间',
}, },
], ],
})(<RangePickerDiy json={json} disabled={disabled} uuid={uuid} />); })(<RangePickerDiy json={json} disabled={disabled} uuid={uuid}/>);
} }
if (json.label == null) title = '起止时间'; if (json.label == null) title = '起止时间';
break; break;
...@@ -3415,7 +3500,8 @@ ${obj[dataColumn.base52]} ...@@ -3415,7 +3500,8 @@ ${obj[dataColumn.base52]}
} }
}); });
} }
: () => {} : () => {
}
} }
format={json.format ? json.format : 'YYYY-MM-DD HH:mm:ss'} format={json.format ? json.format : 'YYYY-MM-DD HH:mm:ss'}
{...otherProps} {...otherProps}
...@@ -3432,7 +3518,8 @@ ${obj[dataColumn.base52]} ...@@ -3432,7 +3518,8 @@ ${obj[dataColumn.base52]}
isPreview={isPreview} isPreview={isPreview}
labelCol={{ span: json.mLabelSpan || json.labelSpan }} labelCol={{ span: json.mLabelSpan || json.labelSpan }}
wrapperCol={{ span: json.mWrapperSpan || json.wrapperSpan }} wrapperCol={{ span: json.mWrapperSpan || json.wrapperSpan }}
label={title}> label={title}
>
{cm} {cm}
</MobileItem> </MobileItem>
); );
...@@ -3475,7 +3562,8 @@ ${obj[dataColumn.base52]} ...@@ -3475,7 +3562,8 @@ ${obj[dataColumn.base52]}
isPreview={isPreview} isPreview={isPreview}
labelCol={{ span: json.mLabelSpan || json.labelSpan }} labelCol={{ span: json.mLabelSpan || json.labelSpan }}
wrapperCol={{ span: json.mWrapperSpan || json.wrapperSpan }} wrapperCol={{ span: json.mWrapperSpan || json.wrapperSpan }}
label={title}> label={title}
>
{cm} {cm}
</MobileItem> </MobileItem>
); );
...@@ -3525,7 +3613,8 @@ ${obj[dataColumn.base52]} ...@@ -3525,7 +3613,8 @@ ${obj[dataColumn.base52]}
isPreview={isPreview} isPreview={isPreview}
labelCol={{ span: json.mLabelSpan || json.labelSpan }} labelCol={{ span: json.mLabelSpan || json.labelSpan }}
wrapperCol={{ span: json.mWrapperSpan || json.wrapperSpan }} wrapperCol={{ span: json.mWrapperSpan || json.wrapperSpan }}
label={title}> label={title}
>
{cm} {cm}
</MobileItem> </MobileItem>
); );
...@@ -3543,7 +3632,7 @@ ${obj[dataColumn.base52]} ...@@ -3543,7 +3632,7 @@ ${obj[dataColumn.base52]}
message: '请输入', message: '请输入',
}, },
], ],
})(<WangEditor json={json} dataColumn={dataColumn} disabled={disabled} uuid={uuid} />); })(<WangEditor json={json} dataColumn={dataColumn} disabled={disabled} uuid={uuid}/>);
break; break;
case 'MobileCard': case 'MobileCard':
cm = getFieldDecorator(dataColumn.base52, { cm = getFieldDecorator(dataColumn.base52, {
...@@ -3555,8 +3644,7 @@ ${obj[dataColumn.base52]} ...@@ -3555,8 +3644,7 @@ ${obj[dataColumn.base52]}
getArguments={this.functionArguments} getArguments={this.functionArguments}
tableComProps={this.props} tableComProps={this.props}
dataColumn={dataColumn} dataColumn={dataColumn}
/>, />);
);
break; break;
case 'RichText': case 'RichText':
cm = getFieldDecorator(dataColumn.base52, { cm = getFieldDecorator(dataColumn.base52, {
...@@ -3570,7 +3658,7 @@ ${obj[dataColumn.base52]} ...@@ -3570,7 +3658,7 @@ ${obj[dataColumn.base52]}
message: '请输入', message: '请输入',
}, },
], ],
})(<DraftEditorCom placeholder={json.placeholder} disabled={json.disabled} />); })(<DraftEditorCom placeholder={json.placeholder} disabled={json.disabled}/>);
if ( if (
get === 'mobile' && get === 'mobile' &&
((json.isMobileLabel != null && json.isMobileLabel) || ((json.isMobileLabel != null && json.isMobileLabel) ||
...@@ -3582,7 +3670,8 @@ ${obj[dataColumn.base52]} ...@@ -3582,7 +3670,8 @@ ${obj[dataColumn.base52]}
isPreview={isPreview} isPreview={isPreview}
labelCol={{ span: json.mLabelSpan || json.labelSpan }} labelCol={{ span: json.mLabelSpan || json.labelSpan }}
wrapperCol={{ span: json.mWrapperSpan || json.wrapperSpan }} wrapperCol={{ span: json.mWrapperSpan || json.wrapperSpan }}
label={title}> label={title}
>
{cm} {cm}
</MobileItem> </MobileItem>
); );
...@@ -3600,7 +3689,7 @@ ${obj[dataColumn.base52]} ...@@ -3600,7 +3689,7 @@ ${obj[dataColumn.base52]}
message: '请输入' + title, message: '请输入' + title,
}, },
], ],
})(<CronEditorDiy />); })(<CronEditorDiy/>);
break; break;
case 'LocationCom': case 'LocationCom':
cm = getFieldDecorator(dataColumn.base52, { cm = getFieldDecorator(dataColumn.base52, {
...@@ -3616,7 +3705,8 @@ ${obj[dataColumn.base52]} ...@@ -3616,7 +3705,8 @@ ${obj[dataColumn.base52]}
let errors = []; let errors = [];
console.log(valueThis); console.log(valueThis);
if ( if (
(!valueThis || !JSON.stringify(valueThis).includes('address')) && (!valueThis || !JSON.stringify(valueThis)
.includes('address')) &&
required required
) { ) {
errors.push(new Error('请获取定位信息', rule.field)); errors.push(new Error('请获取定位信息', rule.field));
...@@ -3646,16 +3736,15 @@ ${obj[dataColumn.base52]} ...@@ -3646,16 +3736,15 @@ ${obj[dataColumn.base52]}
isPreview={isPreview} isPreview={isPreview}
labelCol={{ span: json.mLabelSpan || json.labelSpan }} labelCol={{ span: json.mLabelSpan || json.labelSpan }}
wrapperCol={{ span: json.mWrapperSpan || json.wrapperSpan }} wrapperCol={{ span: json.mWrapperSpan || json.wrapperSpan }}
label={title}> label={title}
>
{cm} {cm}
</MobileItem> </MobileItem>
); );
} }
break; break;
case 'ChildForm': case 'ChildForm':
if(typeof initValue !== 'object'){ // console.log(datas, json);
initValue = null;
}
cm = getFieldDecorator(dataColumn.base52, { initialValue: initValue || {} })( cm = getFieldDecorator(dataColumn.base52, { initialValue: initValue || {} })(
<ChildForm <ChildForm
taskId={this.props.taskId} taskId={this.props.taskId}
...@@ -3697,7 +3786,8 @@ ${obj[dataColumn.base52]} ...@@ -3697,7 +3786,8 @@ ${obj[dataColumn.base52]}
isPreview={isPreview} isPreview={isPreview}
labelCol={{ span: json.mLabelSpan || json.labelSpan }} labelCol={{ span: json.mLabelSpan || json.labelSpan }}
wrapperCol={{ span: json.mWrapperSpan || json.wrapperSpan }} wrapperCol={{ span: json.mWrapperSpan || json.wrapperSpan }}
label={title}> label={title}
>
{cm} {cm}
</MobileItem> </MobileItem>
); );
...@@ -3715,7 +3805,7 @@ ${obj[dataColumn.base52]} ...@@ -3715,7 +3805,7 @@ ${obj[dataColumn.base52]}
message: '请上传图片', message: '请上传图片',
}, },
], ],
})(<ImgUploadCom json={json} disabled={disabled} />); })(<ImgUploadCom json={json} disabled={disabled}/>);
if ( if (
get === 'mobile' && get === 'mobile' &&
((json.isMobileLabel != null && json.isMobileLabel) || ((json.isMobileLabel != null && json.isMobileLabel) ||
...@@ -3727,7 +3817,8 @@ ${obj[dataColumn.base52]} ...@@ -3727,7 +3817,8 @@ ${obj[dataColumn.base52]}
isPreview={isPreview} isPreview={isPreview}
labelCol={{ span: json.mLabelSpan || json.labelSpan }} labelCol={{ span: json.mLabelSpan || json.labelSpan }}
wrapperCol={{ span: json.mWrapperSpan || json.wrapperSpan }} wrapperCol={{ span: json.mWrapperSpan || json.wrapperSpan }}
label={title}> label={title}
>
{cm} {cm}
</MobileItem> </MobileItem>
); );
...@@ -3745,7 +3836,7 @@ ${obj[dataColumn.base52]} ...@@ -3745,7 +3836,7 @@ ${obj[dataColumn.base52]}
message: '请上传视频', message: '请上传视频',
}, },
], ],
})(<VideoUploadCom json={json} disabled={disabled} />); })(<VideoUploadCom json={json} disabled={disabled}/>);
if ( if (
get === 'mobile' && get === 'mobile' &&
((json.isMobileLabel != null && json.isMobileLabel) || ((json.isMobileLabel != null && json.isMobileLabel) ||
...@@ -3757,7 +3848,8 @@ ${obj[dataColumn.base52]} ...@@ -3757,7 +3848,8 @@ ${obj[dataColumn.base52]}
isPreview={isPreview} isPreview={isPreview}
labelCol={{ span: json.mLabelSpan || json.labelSpan }} labelCol={{ span: json.mLabelSpan || json.labelSpan }}
wrapperCol={{ span: json.mWrapperSpan || json.wrapperSpan }} wrapperCol={{ span: json.mWrapperSpan || json.wrapperSpan }}
label={title}> label={title}
>
{cm} {cm}
</MobileItem> </MobileItem>
); );
...@@ -3775,7 +3867,7 @@ ${obj[dataColumn.base52]} ...@@ -3775,7 +3867,7 @@ ${obj[dataColumn.base52]}
message: '请进行签名', message: '请进行签名',
}, },
], ],
})(<Signature width={json.width} height={json.height} get={get} />); })(<Signature width={json.width} height={json.height} get={get}/>);
if ( if (
get === 'mobile' && get === 'mobile' &&
((json.isMobileLabel != null && json.isMobileLabel) || ((json.isMobileLabel != null && json.isMobileLabel) ||
...@@ -3787,7 +3879,8 @@ ${obj[dataColumn.base52]} ...@@ -3787,7 +3879,8 @@ ${obj[dataColumn.base52]}
isPreview={isPreview} isPreview={isPreview}
labelCol={{ span: json.mLabelSpan || json.labelSpan }} labelCol={{ span: json.mLabelSpan || json.labelSpan }}
wrapperCol={{ span: json.mWrapperSpan || json.wrapperSpan }} wrapperCol={{ span: json.mWrapperSpan || json.wrapperSpan }}
label={title}> label={title}
>
{cm} {cm}
</MobileItem> </MobileItem>
); );
...@@ -3831,13 +3924,15 @@ ${obj[dataColumn.base52]} ...@@ -3831,13 +3924,15 @@ ${obj[dataColumn.base52]}
margin: 5, margin: 5,
border: '1px solid #ccc', border: '1px solid #ccc',
}} }}
className={styles.mobileList}> className={styles.mobileList}
>
{modalCode ? ( {modalCode ? (
<FormModal <FormModal
{...modalProps} {...modalProps}
visible={this.props.DataColumn.isShowModal[modalCode]} visible={this.props.DataColumn.isShowModal[modalCode]}
handleCancel={this.closeModal.bind(this, modalCode)} handleCancel={this.closeModal.bind(this, modalCode)}
title={modalTitle}> title={modalTitle}
>
<ZdyTable <ZdyTable
taskId={this.props.taskId} taskId={this.props.taskId}
taskAssignee={taskAssignee} taskAssignee={taskAssignee}
...@@ -3878,7 +3973,8 @@ ${obj[dataColumn.base52]} ...@@ -3878,7 +3973,8 @@ ${obj[dataColumn.base52]}
style={{ style={{
minHeight: 40, minHeight: 40,
lineHeight: '40px', lineHeight: '40px',
}}> }}
>
<Col <Col
className={title ? styles.row_col_div : ''} className={title ? styles.row_col_div : ''}
span={json.labelSpan} span={json.labelSpan}
...@@ -3889,7 +3985,8 @@ ${obj[dataColumn.base52]} ...@@ -3889,7 +3985,8 @@ ${obj[dataColumn.base52]}
overflow: 'hidden', overflow: 'hidden',
fontSize: 14, fontSize: 14,
color: 'rgba(0,0,0,0.85)', color: 'rgba(0,0,0,0.85)',
}}> }}
>
{title} {title}
{title && ( {title && (
<span <span
...@@ -3898,7 +3995,8 @@ ${obj[dataColumn.base52]} ...@@ -3898,7 +3995,8 @@ ${obj[dataColumn.base52]}
position: 'relative', position: 'relative',
top: '-0.5px', top: '-0.5px',
margin: '0 8px 0 2px', margin: '0 8px 0 2px',
}}> }}
>
: :
</span> </span>
)} )}
...@@ -3910,7 +4008,8 @@ ${obj[dataColumn.base52]} ...@@ -3910,7 +4008,8 @@ ${obj[dataColumn.base52]}
lineHeight: '40px', lineHeight: '40px',
zoom: 1, zoom: 1,
fontSize: 14, fontSize: 14,
}}> }}
>
{cm} {cm}
</Col> </Col>
{modalCode ? ( {modalCode ? (
...@@ -3918,7 +4017,8 @@ ${obj[dataColumn.base52]} ...@@ -3918,7 +4017,8 @@ ${obj[dataColumn.base52]}
{...modalProps} {...modalProps}
visible={this.props.DataColumn.isShowModal[modalCode]} visible={this.props.DataColumn.isShowModal[modalCode]}
handleCancel={this.closeModal.bind(this, modalCode)} handleCancel={this.closeModal.bind(this, modalCode)}
title={modalTitle}> title={modalTitle}
>
<ZdyTable <ZdyTable
taskId={this.props.taskId} taskId={this.props.taskId}
taskAssignee={taskAssignee} taskAssignee={taskAssignee}
...@@ -3954,7 +4054,8 @@ ${obj[dataColumn.base52]} ...@@ -3954,7 +4054,8 @@ ${obj[dataColumn.base52]}
{...modalProps} {...modalProps}
visible={this.props.DataColumn.isShowModal[modalCode]} visible={this.props.DataColumn.isShowModal[modalCode]}
handleCancel={this.closeModal.bind(this, modalCode)} handleCancel={this.closeModal.bind(this, modalCode)}
title={modalTitle}> title={modalTitle}
>
<ZdyTable <ZdyTable
taskId={this.props.taskId} taskId={this.props.taskId}
taskAssignee={taskAssignee} taskAssignee={taskAssignee}
...@@ -3984,8 +4085,9 @@ ${obj[dataColumn.base52]} ...@@ -3984,8 +4085,9 @@ ${obj[dataColumn.base52]}
labelCol={{ span: json.labelSpan }} labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }} wrapperCol={{ span: json.wrapperSpan }}
label={title} label={title}
data-cell-component-name={json.comName || 'no_com'}> data-cell-component-name={json.comName || 'no_com'}
<ShowComName json={json} /> >
<ShowComName json={json}/>
{cm} {cm}
</Form.Item> </Form.Item>
</> </>
...@@ -3999,7 +4101,8 @@ ${obj[dataColumn.base52]} ...@@ -3999,7 +4101,8 @@ ${obj[dataColumn.base52]}
{...modalProps} {...modalProps}
visible={this.props.DataColumn.isShowModal[modalCode]} visible={this.props.DataColumn.isShowModal[modalCode]}
handleCancel={this.closeModal.bind(this, modalCode)} handleCancel={this.closeModal.bind(this, modalCode)}
title={modalTitle}> title={modalTitle}
>
<ZdyTable <ZdyTable
taskId={this.props.taskId} taskId={this.props.taskId}
taskAssignee={taskAssignee} taskAssignee={taskAssignee}
...@@ -4037,7 +4140,8 @@ ${obj[dataColumn.base52]} ...@@ -4037,7 +4140,8 @@ ${obj[dataColumn.base52]}
{...modalProps} {...modalProps}
visible={this.props.DataColumn.isShowModal[modalCode]} visible={this.props.DataColumn.isShowModal[modalCode]}
handleCancel={this.closeModal.bind(this, modalCode)} handleCancel={this.closeModal.bind(this, modalCode)}
title={modalTitle}> title={modalTitle}
>
<ZdyTable <ZdyTable
taskId={this.props.taskId} taskId={this.props.taskId}
taskAssignee={taskAssignee} taskAssignee={taskAssignee}
...@@ -4067,7 +4171,8 @@ ${obj[dataColumn.base52]} ...@@ -4067,7 +4171,8 @@ ${obj[dataColumn.base52]}
isPreview={isPreview} isPreview={isPreview}
labelCol={{ span: json.mLabelSpan || json.labelSpan }} labelCol={{ span: json.mLabelSpan || json.labelSpan }}
wrapperCol={{ span: json.mWrapperSpan || json.wrapperSpan }} wrapperCol={{ span: json.mWrapperSpan || json.wrapperSpan }}
label={title}> label={title}
>
{cm} {cm}
</MobileItem> </MobileItem>
) : isEdit && get == 'web' ? ( ) : isEdit && get == 'web' ? (
...@@ -4075,13 +4180,14 @@ ${obj[dataColumn.base52]} ...@@ -4075,13 +4180,14 @@ ${obj[dataColumn.base52]}
<Form.Item <Form.Item
labelCol={{ span: json.labelSpan }} labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }} wrapperCol={{ span: json.wrapperSpan }}
label={title}> label={title}
<ShowComName json={json} /> >
<ShowComName json={json}/>
{cm} {cm}
</Form.Item> </Form.Item>
) : ( ) : (
<Form.Item> <Form.Item>
<ShowComName json={json} /> <ShowComName json={json}/>
{cm} {cm}
</Form.Item> </Form.Item>
) )
......
...@@ -290,3 +290,9 @@ ...@@ -290,3 +290,9 @@
min-height: 50px; min-height: 50px;
} }
} }
.bigTitle{
text-align: center;
font-size: 18px;
margin-bottom: 20px;
font-weight: 600;
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论