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

拆分代码

上级 ae872145
...@@ -44,9 +44,8 @@ export function getBase64(value) { ...@@ -44,9 +44,8 @@ export function getBase64(value) {
return value ? base64.encode(new Buffer(value)) : null; return value ? base64.encode(new Buffer(value)) : null;
} }
const excludeKeys = ['defaultValues', ''];
const equal = (obj1, obj2, json, sqlContent, depth, props) => { const equal = (obj1, obj2, json, sqlContent, depth, props, excludeKeys) => {
if (obj1 == null && obj2 != null) { if (obj1 == null && obj2 != null) {
return false; return false;
} }
...@@ -135,7 +134,7 @@ const equal = (obj1, obj2, json, sqlContent, depth, props) => { ...@@ -135,7 +134,7 @@ const equal = (obj1, obj2, json, sqlContent, depth, props) => {
var xx = true; var xx = true;
for (var i = 0; i < obj1[key].length; i++) { for (var i = 0; i < obj1[key].length; i++) {
if (!equal(obj1[key][i], obj2[key][i], json, sqlContent, depth + 1)) { if (!equal(obj1[key][i], obj2[key][i], json, sqlContent, depth + 1, props, excludeKeys)) {
xx = false; xx = false;
break; break;
} }
...@@ -147,7 +146,7 @@ const equal = (obj1, obj2, json, sqlContent, depth, props) => { ...@@ -147,7 +146,7 @@ const equal = (obj1, obj2, json, sqlContent, depth, props) => {
} }
} }
} else if (obj1[key] instanceof Object) { } else if (obj1[key] instanceof Object) {
const x = equal(obj1[key], obj2[key], json, sqlContent, depth + 1); const x = equal(obj1[key], obj2[key], json, sqlContent, depth + 1, props, excludeKeys);
if (!x) { if (!x) {
res = false; res = false;
......
...@@ -57,13 +57,14 @@ import { formulaList } from '../excelInitFuc/functionList'; ...@@ -57,13 +57,14 @@ import { formulaList } from '../excelInitFuc/functionList';
import FilePreview from '../filePreview'; import FilePreview from '../filePreview';
import DraftEditorCom from '../App/DraftEditorCom'; import DraftEditorCom from '../App/DraftEditorCom';
import MobileItem from './MobileItem'; import MobileItem from './MobileItem';
import MobileCascader from './CascaderDiy/MobileCascader'; import MobileCascader from "./CascaderDiy/MobileCascader";
import { errorHandler, getBase64, equal, getRender, isJSON } from './Split_Index/staticInfo'; import { errorHandler, getBase64, equal, getRender, isJSON } from './Split_Index/staticInfo';
const { TextArea } = Input; const { TextArea } = Input;
const { Option } = Select; const { Option } = Select;
const { RangePicker } = DatePicker; const { RangePicker } = DatePicker;
@connect(({ DataColumn, SqlManageEntity, formList, loading }) => ({ @connect(({ DataColumn, SqlManageEntity, formList, loading }) => ({
DataColumn, DataColumn,
SqlManageEntity, SqlManageEntity,
...@@ -96,6 +97,7 @@ export default class tableCom extends Component { ...@@ -96,6 +97,7 @@ export default class tableCom extends Component {
pagination: false, pagination: false,
}, },
}; };
this.excludeKeys = ['defaultValues', ''];
} }
closeModal = (fk, callback) => { closeModal = (fk, callback) => {
...@@ -108,7 +110,6 @@ export default class tableCom extends Component { ...@@ -108,7 +110,6 @@ export default class tableCom extends Component {
callback: callback, callback: callback,
}); });
}; };
showModal = (fk, title, data, modalProps) => { showModal = (fk, title, data, modalProps) => {
const { dispatch } = this.props; const { dispatch } = this.props;
const x = this.props.DataColumn.isShowModal; const x = this.props.DataColumn.isShowModal;
...@@ -134,7 +135,7 @@ export default class tableCom extends Component { ...@@ -134,7 +135,7 @@ export default class tableCom extends Component {
file = { file = {
name: 'file', name: 'file',
action: queryApiActionPath() + '/upload', action: queryApiActionPath() + '/upload',
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,
...@@ -155,7 +156,7 @@ export default class tableCom extends Component { ...@@ -155,7 +156,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();
}; };
...@@ -170,12 +171,12 @@ export default class tableCom extends Component { ...@@ -170,12 +171,12 @@ export default class tableCom extends Component {
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={{ width: 188, marginBottom: 8, display: 'block' }} style={{ width: 188, marginBottom: 8, display: 'block' }}
/> />
...@@ -185,21 +186,21 @@ export default class tableCom extends Component { ...@@ -185,21 +186,21 @@ export default class tableCom extends Component {
icon="search" icon="search"
loading={this.props.loading} loading={this.props.loading}
size="small" size="small"
style={{ width: 90, marginRight: 8 }} style={{ width: 90, 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 => <Icon type="search" style={{ color: filtered ? '#1890ff' : 'red' }} />, filterIcon: (filtered) => (
<Icon type="search" style={{ color: filtered ? '#1890ff' : 'red' }} />
),
onFilter: (value, record) => onFilter: (value, record) =>
record[dataIndex] record[dataIndex]
? record[dataIndex] ? record[dataIndex]
...@@ -207,12 +208,12 @@ export default class tableCom extends Component { ...@@ -207,12 +208,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
...@@ -260,14 +261,14 @@ export default class tableCom extends Component { ...@@ -260,14 +261,14 @@ export default class tableCom extends Component {
return; return;
} }
const obj2 = props.form.getFieldsValue(); const obj2 = props.form.getFieldsValue();
const bb = equal(this.obj, obj2, json, this.state.sqlContent, 1, this.props); const bb = equal(this.obj, obj2, json, this.state.sqlContent, 1, this.props, this.excludeKeys);
let bb2 = true; let bb2 = true;
let childObj2 = {}; let childObj2 = {};
if (props.fatherCode) { if (props.fatherCode) {
if (obj2 != null && obj2[props.fatherCode]) { if (obj2 != null && obj2[props.fatherCode]) {
childObj2 = obj2[props.fatherCode][props.index]; childObj2 = obj2[props.fatherCode][props.index];
bb2 = equal(this.childObj, childObj2, json, this.state.sqlContent, 1, this.props); bb2 = equal(this.childObj, childObj2, json, this.state.sqlContent, 1, this.props, this.excludeKeys);
} }
} }
...@@ -352,13 +353,13 @@ export default class tableCom extends Component { ...@@ -352,13 +353,13 @@ export default class tableCom extends Component {
dispatch({ dispatch({
type: 'SqlManageEntity/find', type: 'SqlManageEntity/find',
payload: { sqlKey: sqlKey }, payload: { sqlKey: 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++) {
...@@ -369,7 +370,7 @@ export default class tableCom extends Component { ...@@ -369,7 +370,7 @@ 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');
} }
columns.push(column); columns.push(column);
} else { } else {
...@@ -403,7 +404,7 @@ export default class tableCom extends Component { ...@@ -403,7 +404,7 @@ 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 = {
...@@ -420,7 +421,7 @@ export default class tableCom extends Component { ...@@ -420,7 +421,7 @@ export default class tableCom extends Component {
dispatch({ dispatch({
type: 'DataColumn/getSqlData', type: 'DataColumn/getSqlData',
payload: { sqlKey, allValues }, payload: { sqlKey, allValues },
callback: list => { callback: (list) => {
const x = { const x = {
list: list, list: list,
pagination: false, pagination: false,
...@@ -435,7 +436,7 @@ export default class tableCom extends Component { ...@@ -435,7 +436,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++) {
...@@ -444,7 +445,7 @@ export default class tableCom extends Component { ...@@ -444,7 +445,7 @@ 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');
} }
columns.push(column); columns.push(column);
} else { } else {
...@@ -629,16 +630,8 @@ export default class tableCom extends Component { ...@@ -629,16 +630,8 @@ export default class tableCom extends Component {
if (json.optionType && json.optionType == 'func') { if (json.optionType && json.optionType == 'func') {
const res = callback(data); const res = callback(data);
if ( if (res != null && !(typeof res === 'function')) {
res != null && this.setState({ options: res, selectDis: false }, () => {
!(typeof res === 'function')
// && res !== 'norefeshxxxxxxxxxxxxxxxxxxxx'
) {
// console.table(res);
this.setState({
options: res,
selectDis: false,
}, () => {
if (orgCallback) orgCallback(); if (orgCallback) orgCallback();
}); });
} }
...@@ -712,28 +705,20 @@ export default class tableCom extends Component { ...@@ -712,28 +705,20 @@ export default class tableCom extends Component {
data: requestParams, data: requestParams,
method: method, method: method,
requestType: 'form', requestType: 'form',
}).then(data => { }).then((data) => {
// if (!data || !Array.isArray(data)) { // if (!data || !Array.isArray(data)) {
// data = []; // data = [];
// } // }
const { reqUrls } = this.state; const { reqUrls } = this.state;
if (reqUrls && reqUrls[url]) { if(reqUrls && reqUrls[url]){
reqUrls[url].data = data; reqUrls[url].data = data;
} }
this.setState({ res: data, reqUrls }, () => { this.setState({ res: data, reqUrls }, () => {
if (callback) { if (callback) {
if (json.optionType && json.optionType == 'func') { if (json.optionType && json.optionType == 'func') {
const res = callback(data); const res = callback(data);
if ( if (res != null && !(typeof res === 'function')) {
res != null && this.setState({ options: res, selectDis: false }, () => {
!(typeof res === 'function')
//&& res !== 'norefeshxxxxxxxxxxxxxxxxxxxx'
) {
// console.table(res);
this.setState({
options: res,
selectDis: false,
}, () => {
if (orgCallback) orgCallback(); if (orgCallback) orgCallback();
}); });
} }
...@@ -781,32 +766,30 @@ export default class tableCom extends Component { ...@@ -781,32 +766,30 @@ export default class tableCom extends Component {
} }
}); });
}); });
return 'norefeshxxxxxxxxxxxxxxxxxxxx'; return 'norefeshxxxxxxxxxxxxxxxxxxxx';
}; };
sqlUtil = (base52, json, orgCallback, sqlKey, params, callback, options = {}) => { sqlUtil = (base52, json, orgCallback, sqlKey, params, callback, options = {}) => {
//查缓存 //查缓存
var isChange = false; var isChange = false;
const { sqlKeys } = this.state; const { sqlKeys } = this.state;
if (sqlKeys[sqlKey] != null) { if (sqlKeys[sqlKey] != null) {
const ps = sqlKeys[sqlKey].params; // [] const ps = sqlKeys[sqlKey].params;
if (params.length !== ps.length) { if (params.length != ps.length) {
// 长度不想等 直接更新
isChange = true; isChange = true;
} else { } else {
for (var i = 0; i < params.length; i++) { for (var i = 0; i < params.length; i++) {
if (params[i] != ps[i]) { if (params[i] != ps[i]) {
// 某一个不相等 直接更新
isChange = true; isChange = true;
break; break;
} }
} }
} }
if (!isChange) { if (!isChange) {
const os = sqlKeys[sqlKey].options; // {} const os = sqlKeys[sqlKey].options;
if (Object.keys(options).length !== Object.keys(os).length) { if (Object.keys(options).length != Object.keys(os).length) {
// {}
isChange = true; isChange = true;
} else { } else {
for (var k in options) { for (var k in options) {
...@@ -818,32 +801,20 @@ export default class tableCom extends Component { ...@@ -818,32 +801,20 @@ export default class tableCom extends Component {
} }
} }
} else { } else {
sqlKeys[sqlKey] = { params, options }; sqlKeys[sqlKey] = { params: params, options: options };
isChange = true; isChange = true;
} }
if (!isChange) { if (!isChange) {
if (callback) { if (callback) {
const data = sqlKeys[sqlKey].data; // Array[8]; options const data = sqlKeys[sqlKey].data;
if (json.optionType && json.optionType === 'func') { if (json.optionType && json.optionType == 'func') {
const res = callback(data); const res = callback(data);
if ( if (res != null && !(typeof res === 'function')) {
res != null && this.setState({ options: res, selectDis: false }, () => {
!(typeof res === 'function')
// && res !== 'norefeshxxxxxxxxxxxxxxxxxxxx'
) {
// console.log(res);
this.setState(
{
options: res,
selectDis: false,
},
() => {
if (orgCallback) orgCallback(); if (orgCallback) orgCallback();
}, });
);
} }
} else if (json.comName === 'Button') { } else if (json.comName == 'Button') {
try { try {
callback(data); callback(data);
} catch (e) { } catch (e) {
...@@ -853,7 +824,11 @@ export default class tableCom extends Component { ...@@ -853,7 +824,11 @@ export default class tableCom extends Component {
e, e,
); );
} }
} else if (['Echart', 'QRCode', 'Graph'].includes(json.comName)) { } else if (
json.comName == 'Echart' ||
json.comName == 'QRCode' ||
json.comName == 'Graph'
) {
try { try {
const x = callback(data); const x = callback(data);
if (x != null) { if (x != null) {
...@@ -906,7 +881,7 @@ export default class tableCom extends Component { ...@@ -906,7 +881,7 @@ export default class tableCom extends Component {
data: pp, data: pp,
method: 'POST', method: 'POST',
requestType: 'form', requestType: 'form',
}).then(data => { }).then((data) => {
const { sqlKeys } = this.state; const { sqlKeys } = this.state;
sqlKeys[sqlKey].data = data; sqlKeys[sqlKey].data = data;
this.setState({ sqlKeys }); this.setState({ sqlKeys });
...@@ -917,14 +892,9 @@ export default class tableCom extends Component { ...@@ -917,14 +892,9 @@ export default class tableCom extends Component {
if (callback) { if (callback) {
if (json.optionType && json.optionType == 'func') { if (json.optionType && json.optionType == 'func') {
const res = callback(data); const res = callback(data);
if (res != null && !(typeof res === 'function')
// && res !== 'norefeshxxxxxxxxxxxxxxxxxxxx' if (res != null && !(typeof res === 'function')) {
) { this.setState({ options: res, selectDis: false }, () => {
// console.log(res);
this.setState({
options: res,
selectDis: false,
}, () => {
if (orgCallback) orgCallback(); if (orgCallback) orgCallback();
}); });
} }
...@@ -972,6 +942,7 @@ export default class tableCom extends Component { ...@@ -972,6 +942,7 @@ export default class tableCom extends Component {
} }
}); });
}); });
return 'norefeshxxxxxxxxxxxxxxxxxxxx'; return 'norefeshxxxxxxxxxxxxxxxxxxxx';
}; };
...@@ -984,8 +955,8 @@ export default class tableCom extends Component { ...@@ -984,8 +955,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;
}); });
}); });
...@@ -1059,26 +1030,19 @@ export default class tableCom extends Component { ...@@ -1059,26 +1030,19 @@ export default class tableCom extends Component {
this.props.concealModel, this.props.concealModel,
); );
if (base52) { if (base52) {
if (value === 'norefeshxxxxxxxxxxxxxxxxxxxx') if (value != null && value == 'norefeshxxxxxxxxxxxxxxxxxxxx') {
{} } else {
else {
/** /**
* 会出现重复调用2次,然后NAN造成无限循环 * 会出现重复调用2次,然后NAN造成无限循环
*/ */
if (isNaN(value)) { if (isNaN(value)) {
return; return;
} }
if (json.comName === 'Button') { if (json.comName == 'Button') {
return value; return value;
} else if (json.optionType && json.optionType === 'func') { } else if (json.optionType && json.optionType == 'func') {
if (value != null && !(typeof value === 'function') if (value != null && !(typeof value === 'function')) {
// && value !== 'norefeshxxxxxxxxxxxxxxxxxxxx' this.setState({ options: value, selectDis: false }, () => {
) {
// console.log(value);
this.setState({
options: value,
selectDis: false,
}, () => {
if (callback) callback(); if (callback) callback();
}); });
} }
...@@ -1087,9 +1051,7 @@ export default class tableCom extends Component { ...@@ -1087,9 +1051,7 @@ export default class tableCom extends Component {
json.comName == 'QRCode' || json.comName == 'QRCode' ||
json.comName == 'Graph' json.comName == 'Graph'
) { ) {
this.setState({ this.setState({ option: value });
option: value,
});
} else { } else {
try { try {
this.props.form.setFieldsValue({ [base52]: value }); this.props.form.setFieldsValue({ [base52]: value });
...@@ -1122,7 +1084,7 @@ export default class tableCom extends Component { ...@@ -1122,7 +1084,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 });
}, },
}); });
...@@ -1163,7 +1125,7 @@ export default class tableCom extends Component { ...@@ -1163,7 +1125,7 @@ export default class tableCom extends Component {
dispatch({ dispatch({
type: 'DataColumn/getSqlOptions', type: 'DataColumn/getSqlOptions',
payload: { sqlKey, allValues }, payload: { sqlKey, allValues },
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];
...@@ -1181,10 +1143,7 @@ export default class tableCom extends Component { ...@@ -1181,10 +1143,7 @@ export default class tableCom extends Component {
if (!isExist && vl != null && options.length > 0) { if (!isExist && vl != null && options.length > 0) {
this.props.form.setFieldsValue({ [base52]: null }); this.props.form.setFieldsValue({ [base52]: null });
} }
// console.log(optionsx); this.setState({ options: optionsx, selectDis: false });
this.setState({
options: optionsx,
selectDis: false });
}, },
}); });
} else if (!this.props.isEdit && Object.keys(obj).length > 0) { } else if (!this.props.isEdit && Object.keys(obj).length > 0) {
...@@ -1197,11 +1156,8 @@ export default class tableCom extends Component { ...@@ -1197,11 +1156,8 @@ export default class tableCom extends Component {
dispatch({ dispatch({
type: 'DataColumn/getSqlLabels', type: 'DataColumn/getSqlLabels',
payload: { sqlKey, values: obj[base52], labelName, valueName, allValues }, payload: { sqlKey, values: obj[base52], labelName, valueName, allValues },
callback: labels => { callback: (labels) => {
this.setState({ this.setState({ labels, selectDis: false });
labels,
selectDis: false,
});
}, },
}); });
} }
...@@ -1209,7 +1165,7 @@ export default class tableCom extends Component { ...@@ -1209,7 +1165,7 @@ export default class tableCom extends Component {
dispatch({ dispatch({
type: 'DataColumn/getSqlOptions', type: 'DataColumn/getSqlOptions',
payload: { sqlKey, allValues }, payload: { sqlKey, allValues },
callback: options => { callback: (options) => {
let base52 = dataColumn.base52; let base52 = dataColumn.base52;
let vl = this.props.form.getFieldsValue()[base52]; let vl = this.props.form.getFieldsValue()[base52];
const optionsx = []; const optionsx = [];
...@@ -1228,11 +1184,8 @@ export default class tableCom extends Component { ...@@ -1228,11 +1184,8 @@ export default class tableCom extends Component {
//console.log("isExist",optionsx,vl,isExist) //console.log("isExist",optionsx,vl,isExist)
this.props.form.setFieldsValue({ [base52]: null }); this.props.form.setFieldsValue({ [base52]: null });
} }
// console.log(optionsx);
this.setState({ this.setState({ options: optionsx, selectDis: false });
options: optionsx,
selectDis: false,
});
}, },
}); });
} }
...@@ -1259,15 +1212,9 @@ export default class tableCom extends Component { ...@@ -1259,15 +1212,9 @@ export default class tableCom extends Component {
} }
} }
this.setState({ this.setState({ labels: labels, selectDis: false });
labels,
selectDis: false,
});
} else { } else {
// console.log(options); this.setState({ options: options, selectDis: false });
this.setState({
options,
selectDis: false });
} }
}; };
fetchData = (obj, dataColumn, init, filterSql, allValues) => { fetchData = (obj, dataColumn, init, filterSql, allValues) => {
...@@ -1277,7 +1224,7 @@ export default class tableCom extends Component { ...@@ -1277,7 +1224,7 @@ export default class tableCom extends Component {
dispatch({ dispatch({
type: 'DataColumn/getOptions', type: 'DataColumn/getOptions',
payload: { id: dataColumn.id, filterSql, allValues }, payload: { id: dataColumn.id, filterSql, 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({
...@@ -1285,11 +1232,7 @@ export default class tableCom extends Component { ...@@ -1285,11 +1232,7 @@ export default class tableCom extends Component {
value: options[i][dataColumn.referenceCodeName], value: options[i][dataColumn.referenceCodeName],
}); });
} }
// console.log(optionsx); this.setState({ options: optionsx, selectDis: false });
this.setState({
options: optionsx,
selectDis: false,
});
}, },
}); });
} else if (!this.props.isEdit && Object.keys(obj).length > 0) { } else if (!this.props.isEdit && Object.keys(obj).length > 0) {
...@@ -1297,11 +1240,8 @@ export default class tableCom extends Component { ...@@ -1297,11 +1240,8 @@ export default class tableCom extends Component {
dispatch({ dispatch({
type: 'DataColumn/getLabels', type: 'DataColumn/getLabels',
payload: { id: dataColumn.id, values: obj[dataColumn.base52], filterSql, allValues }, payload: { id: dataColumn.id, values: obj[dataColumn.base52], filterSql, allValues },
callback: labels => { callback: (labels) => {
this.setState({ this.setState({ labels, selectDis: false });
labels,
selectDis: false,
});
}, },
}); });
} }
...@@ -1309,7 +1249,7 @@ export default class tableCom extends Component { ...@@ -1309,7 +1249,7 @@ export default class tableCom extends Component {
dispatch({ dispatch({
type: 'DataColumn/getOptions', type: 'DataColumn/getOptions',
payload: { id: dataColumn.id, filterSql, allValues }, payload: { id: dataColumn.id, filterSql, 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({
...@@ -1317,16 +1257,12 @@ export default class tableCom extends Component { ...@@ -1317,16 +1257,12 @@ export default class tableCom extends Component {
value: options[i][dataColumn.referenceCodeName], value: options[i][dataColumn.referenceCodeName],
}); });
} }
// console.log(optionsx); this.setState({ options: optionsx, selectDis: false });
this.setState({
options: optionsx,
selectDis: false,
});
}, },
}); });
} }
}; };
getColumn = key => { getColumn = (key) => {
let { mapData, json } = this.props; let { mapData, json } = this.props;
const columnIds = json.columnIds; const columnIds = json.columnIds;
...@@ -1480,8 +1416,7 @@ export default class tableCom extends Component { ...@@ -1480,8 +1416,7 @@ export default class tableCom extends Component {
fontWeight: get == 'mobile' ? 'bold' : '', fontWeight: get == 'mobile' ? 'bold' : '',
marginRight: get == 'mobile' ? 12 : '', marginRight: get == 'mobile' ? 12 : '',
}} }}
{...json.props} {...json.props}>
>
{obj[this.props.uuid] || json.initialValue} {obj[this.props.uuid] || json.initialValue}
</span> </span>
</> </>
...@@ -1497,8 +1432,7 @@ export default class tableCom extends Component { ...@@ -1497,8 +1432,7 @@ export default class tableCom extends Component {
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>
</> </>
...@@ -1652,8 +1586,7 @@ export default class tableCom extends Component { ...@@ -1652,8 +1586,7 @@ export default class tableCom extends Component {
isPreview={isPreview} isPreview={isPreview}
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}
</MobileItem> </MobileItem>
); );
...@@ -1664,8 +1597,7 @@ export default class tableCom extends Component { ...@@ -1664,8 +1597,7 @@ export default class tableCom extends Component {
isPreview={isPreview} isPreview={isPreview}
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}
</MobileItem> </MobileItem>
{this.props.form.getFieldDecorator(`defaultValues.${formKey}.${key}`, { {this.props.form.getFieldDecorator(`defaultValues.${formKey}.${key}`, {
...@@ -1697,8 +1629,7 @@ export default class tableCom extends Component { ...@@ -1697,8 +1629,7 @@ 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}
...@@ -1709,8 +1640,7 @@ export default class tableCom extends Component { ...@@ -1709,8 +1640,7 @@ 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}
...@@ -1719,8 +1649,7 @@ export default class tableCom extends Component { ...@@ -1719,8 +1649,7 @@ 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>
</> </>
...@@ -1732,8 +1661,7 @@ export default class tableCom extends Component { ...@@ -1732,8 +1661,7 @@ 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>
</> </>
...@@ -1748,8 +1676,7 @@ export default class tableCom extends Component { ...@@ -1748,8 +1676,7 @@ export default class tableCom extends Component {
lineHeight: '40px', lineHeight: '40px',
zoom: 1, zoom: 1,
fontSize: 14, fontSize: 14,
}} }}>
>
{cm} {cm}
</Col> </Col>
</Row> </Row>
...@@ -1759,8 +1686,7 @@ export default class tableCom extends Component { ...@@ -1759,8 +1686,7 @@ 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>
); );
...@@ -1771,8 +1697,7 @@ export default class tableCom extends Component { ...@@ -1771,8 +1697,7 @@ 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}`, {
...@@ -1875,8 +1800,7 @@ export default class tableCom extends Component { ...@@ -1875,8 +1800,7 @@ export default class tableCom extends Component {
<span <span
style={{ style={{
wordBreak: 'break-all', wordBreak: 'break-all',
}} }}>
>
{obj[dataColumn.base52]} {obj[dataColumn.base52]}
</span> </span>
); );
...@@ -1890,8 +1814,7 @@ export default class tableCom extends Component { ...@@ -1890,8 +1814,7 @@ export default class tableCom extends Component {
<span <span
style={{ style={{
wordBreak: 'break-all', wordBreak: 'break-all',
}} }}>
>
{obj[dataColumn.base52]} {obj[dataColumn.base52]}
</span> </span>
); );
...@@ -1920,7 +1843,8 @@ export default class tableCom extends Component { ...@@ -1920,7 +1843,8 @@ export default class tableCom extends Component {
cm = ( cm = (
<span> <span>
{labels != null {labels != null
? labels.map((r, i) => ? labels.map(
(r, i) =>
i == 0 ? ( i == 0 ? (
typeof r == 'string' ? ( typeof r == 'string' ? (
<span>{r}</span> <span>{r}</span>
...@@ -2097,8 +2021,7 @@ export default class tableCom extends Component { ...@@ -2097,8 +2021,7 @@ export default class tableCom extends Component {
<a <a
target="_blank" target="_blank"
key={f.filePath} key={f.filePath}
href={queryApiActionPath() + f.filePath} href={queryApiActionPath() + f.filePath}>
>
{f.fileName} {f.fileName}
</a> </a>
</li> </li>
...@@ -2369,8 +2292,7 @@ export default class tableCom extends Component { ...@@ -2369,8 +2292,7 @@ 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={title} label={title}>
>
{cm} {cm}
</Form.Item> </Form.Item>
); );
...@@ -2411,15 +2333,14 @@ export default class tableCom extends Component { ...@@ -2411,15 +2333,14 @@ export default class tableCom extends Component {
: [{ required: required, message: '请选择' + title }], : [{ required: required, message: '请选择' + title }],
})} })}
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
...@@ -2476,8 +2397,7 @@ export default class tableCom extends Component { ...@@ -2476,8 +2397,7 @@ export default class tableCom extends Component {
isPreview={isPreview} isPreview={isPreview}
labelCol={{ span: json.labelSpan }} labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }} wrapperCol={{ span: json.wrapperSpan }}
label={title} label={title}>
>
{cm} {cm}
</MobileItem> </MobileItem>
); );
...@@ -2518,8 +2438,7 @@ export default class tableCom extends Component { ...@@ -2518,8 +2438,7 @@ export default class tableCom extends Component {
isPreview={isPreview} isPreview={isPreview}
labelCol={{ span: json.labelSpan }} labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }} wrapperCol={{ span: json.wrapperSpan }}
label={title} label={title}>
>
{cm} {cm}
</MobileItem> </MobileItem>
); );
...@@ -2550,8 +2469,7 @@ export default class tableCom extends Component { ...@@ -2550,8 +2469,7 @@ export default class tableCom extends Component {
isPreview={isPreview} isPreview={isPreview}
labelCol={{ span: json.labelSpan }} labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }} wrapperCol={{ span: json.wrapperSpan }}
label={title} label={title}>
>
{cm} {cm}
</MobileItem> </MobileItem>
); );
...@@ -2586,8 +2504,7 @@ export default class tableCom extends Component { ...@@ -2586,8 +2504,7 @@ export default class tableCom extends Component {
isPreview={isPreview} isPreview={isPreview}
labelCol={{ span: json.labelSpan }} labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }} wrapperCol={{ span: json.wrapperSpan }}
label={title} label={title}>
>
{cm} {cm}
</MobileItem> </MobileItem>
); );
...@@ -2606,8 +2523,6 @@ export default class tableCom extends Component { ...@@ -2606,8 +2523,6 @@ export default class tableCom extends Component {
break; break;
case 'Select': case 'Select':
// console.table(selectDis, disabled);
cm = getFieldDecorator(dataColumn.base52, { cm = getFieldDecorator(dataColumn.base52, {
initialValue: initValue, initialValue: initValue,
rules: rules:
...@@ -2634,7 +2549,7 @@ export default class tableCom extends Component { ...@@ -2634,7 +2549,7 @@ export default class tableCom extends Component {
? 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 => {
...@@ -2650,10 +2565,9 @@ export default class tableCom extends Component { ...@@ -2650,10 +2565,9 @@ export default class tableCom extends Component {
option option
? option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0 ? option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
: false : false
} }>
>
{options && options instanceof Array {options && options instanceof Array
? options.map(r => ( ? options.map((r) => (
<Option key={r.value} value={r.value}> <Option key={r.value} value={r.value}>
{r.label} {r.label}
</Option> </Option>
...@@ -2672,8 +2586,7 @@ export default class tableCom extends Component { ...@@ -2672,8 +2586,7 @@ export default class tableCom extends Component {
isPreview={isPreview} isPreview={isPreview}
labelCol={{ span: json.labelSpan }} labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }} wrapperCol={{ span: json.wrapperSpan }}
label={title} label={title}>
>
{cm} {cm}
</MobileItem> </MobileItem>
); );
...@@ -2708,14 +2621,20 @@ export default class tableCom extends Component { ...@@ -2708,14 +2621,20 @@ export default class tableCom extends Component {
style={{ width: json.width }} style={{ width: json.width }}
/>, />,
); );
if (get === 'mobile') { if(get === 'mobile') {
cm = getFieldDecorator(dataColumn.base52, { cm = getFieldDecorator(dataColumn.base52, {
initialValue: initValue, initialValue: initValue,
rules: rules:
json.vlds && json.vlds.length > 0 json.vlds && json.vlds.length > 0
? json.vlds ? json.vlds
: [{ required: required, message: '请选择' + dataColumn.title }], : [{ required: required, message: '请选择' + dataColumn.title }],
})(<MobileCascader options={options} label={title} disabled={disabled} json={json} />); })(
<MobileCascader options={options}
label={title}
disabled={disabled}
json={json}
/>);
} }
if ( if (
...@@ -2729,8 +2648,7 @@ export default class tableCom extends Component { ...@@ -2729,8 +2648,7 @@ export default class tableCom extends Component {
isPreview={isPreview} isPreview={isPreview}
labelCol={{ span: json.labelSpan }} labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }} wrapperCol={{ span: json.wrapperSpan }}
label={title} label={title}>
>
{cm} {cm}
</MobileItem> </MobileItem>
); );
...@@ -2786,8 +2704,7 @@ export default class tableCom extends Component { ...@@ -2786,8 +2704,7 @@ export default class tableCom extends Component {
isPreview={isPreview} isPreview={isPreview}
labelCol={{ span: json.labelSpan }} labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }} wrapperCol={{ span: json.wrapperSpan }}
label={title} label={title}>
>
{cm} {cm}
</MobileItem> </MobileItem>
); );
...@@ -2836,8 +2753,7 @@ export default class tableCom extends Component { ...@@ -2836,8 +2753,7 @@ export default class tableCom extends Component {
isPreview={isPreview} isPreview={isPreview}
labelCol={{ span: json.labelSpan }} labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }} wrapperCol={{ span: json.wrapperSpan }}
label={title} label={title}>
>
{cm} {cm}
</MobileItem> </MobileItem>
); );
...@@ -2909,8 +2825,7 @@ export default class tableCom extends Component { ...@@ -2909,8 +2825,7 @@ export default class tableCom extends Component {
isPreview={isPreview} isPreview={isPreview}
labelCol={{ span: json.labelSpan }} labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }} wrapperCol={{ span: json.wrapperSpan }}
label={title} label={title}>
>
{cm} {cm}
</MobileItem> </MobileItem>
); );
...@@ -2924,6 +2839,7 @@ export default class tableCom extends Component { ...@@ -2924,6 +2839,7 @@ export default class tableCom extends Component {
files = initValue.files; files = initValue.files;
} }
cm = getFieldDecorator(dataColumn.base52, { cm = getFieldDecorator(dataColumn.base52, {
initialValue: { files: files }, initialValue: { files: files },
rules: [ rules: [
...@@ -2940,8 +2856,7 @@ export default class tableCom extends Component { ...@@ -2940,8 +2856,7 @@ export default class tableCom extends Component {
}, },
], ],
})( })(
<UploadCom <UploadCom isMultiple={json.isMultiple}
isMultiple={json.isMultiple}
accept={json.accept} accept={json.accept}
btnName={json.btnName} btnName={json.btnName}
disabled={disabled || isPreview} disabled={disabled || isPreview}
...@@ -2958,8 +2873,7 @@ export default class tableCom extends Component { ...@@ -2958,8 +2873,7 @@ export default class tableCom extends Component {
isPreview={isPreview} isPreview={isPreview}
labelCol={{ span: json.labelSpan }} labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }} wrapperCol={{ span: json.wrapperSpan }}
label={title} label={title}>
>
{cm} {cm}
</MobileItem> </MobileItem>
); );
...@@ -2984,8 +2898,7 @@ export default class tableCom extends Component { ...@@ -2984,8 +2898,7 @@ export default class tableCom extends Component {
isPreview={isPreview} isPreview={isPreview}
labelCol={{ span: json.labelSpan }} labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }} wrapperCol={{ span: json.wrapperSpan }}
label={title} label={title}>
>
{cm} {cm}
</MobileItem> </MobileItem>
); );
...@@ -3028,14 +2941,14 @@ export default class tableCom extends Component { ...@@ -3028,14 +2941,14 @@ export default class tableCom extends Component {
isPreview={isPreview} isPreview={isPreview}
labelCol={{ span: json.labelSpan }} labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }} wrapperCol={{ span: json.wrapperSpan }}
label={title} label={title}>
>
{cm} {cm}
</MobileItem> </MobileItem>
); );
} }
break; break;
case 'ChildForm': case 'ChildForm':
cm = getFieldDecorator(dataColumn.base52, { initialValue: initValue || {} })( cm = getFieldDecorator(dataColumn.base52, { initialValue: initValue || {} })(
<ChildForm <ChildForm
taskId={this.props.taskId} taskId={this.props.taskId}
...@@ -3075,8 +2988,7 @@ export default class tableCom extends Component { ...@@ -3075,8 +2988,7 @@ export default class tableCom extends Component {
isPreview={isPreview} isPreview={isPreview}
labelCol={{ span: json.labelSpan }} labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }} wrapperCol={{ span: json.wrapperSpan }}
label={title} label={title}>
>
{cm} {cm}
</MobileItem> </MobileItem>
); );
...@@ -3101,8 +3013,7 @@ export default class tableCom extends Component { ...@@ -3101,8 +3013,7 @@ export default class tableCom extends Component {
isPreview={isPreview} isPreview={isPreview}
labelCol={{ span: json.labelSpan }} labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }} wrapperCol={{ span: json.wrapperSpan }}
label={title} label={title}>
>
{cm} {cm}
</MobileItem> </MobileItem>
); );
...@@ -3127,8 +3038,7 @@ export default class tableCom extends Component { ...@@ -3127,8 +3038,7 @@ export default class tableCom extends Component {
isPreview={isPreview} isPreview={isPreview}
labelCol={{ span: json.labelSpan }} labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }} wrapperCol={{ span: json.wrapperSpan }}
label={title} label={title}>
>
{cm} {cm}
</MobileItem> </MobileItem>
); );
...@@ -3162,8 +3072,7 @@ export default class tableCom extends Component { ...@@ -3162,8 +3072,7 @@ export default class tableCom extends Component {
isPreview={isPreview} isPreview={isPreview}
labelCol={{ span: json.labelSpan }} labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }} wrapperCol={{ span: json.wrapperSpan }}
label={title} label={title}>
>
{cm} {cm}
</MobileItem> </MobileItem>
); );
...@@ -3207,8 +3116,7 @@ export default class tableCom extends Component { ...@@ -3207,8 +3116,7 @@ export default class tableCom extends Component {
{...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}
...@@ -3245,8 +3153,7 @@ export default class tableCom extends Component { ...@@ -3245,8 +3153,7 @@ export default class tableCom extends Component {
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}
...@@ -3257,8 +3164,7 @@ export default class tableCom extends Component { ...@@ -3257,8 +3164,7 @@ 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)',
}} }}>
>
{title} {title}
{title && ( {title && (
<span <span
...@@ -3266,8 +3172,7 @@ export default class tableCom extends Component { ...@@ -3266,8 +3172,7 @@ 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>
)} )}
...@@ -3279,8 +3184,7 @@ export default class tableCom extends Component { ...@@ -3279,8 +3184,7 @@ export default class tableCom extends Component {
lineHeight: '40px', lineHeight: '40px',
zoom: 1, zoom: 1,
fontSize: 14, fontSize: 14,
}} }}>
>
{cm} {cm}
</Col> </Col>
{modalCode ? ( {modalCode ? (
...@@ -3288,8 +3192,7 @@ export default class tableCom extends Component { ...@@ -3288,8 +3192,7 @@ export default class tableCom extends Component {
{...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}
...@@ -3324,8 +3227,7 @@ export default class tableCom extends Component { ...@@ -3324,8 +3227,7 @@ export default class tableCom extends Component {
{...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}
...@@ -3353,8 +3255,7 @@ export default class tableCom extends Component { ...@@ -3353,8 +3255,7 @@ 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={title} label={title}>
>
{cm} {cm}
</Form.Item> </Form.Item>
</> </>
...@@ -3368,8 +3269,7 @@ export default class tableCom extends Component { ...@@ -3368,8 +3269,7 @@ export default class tableCom extends Component {
{...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}
...@@ -3406,8 +3306,7 @@ export default class tableCom extends Component { ...@@ -3406,8 +3306,7 @@ export default class tableCom extends Component {
{...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}
...@@ -3437,8 +3336,7 @@ export default class tableCom extends Component { ...@@ -3437,8 +3336,7 @@ export default class tableCom extends Component {
isPreview={isPreview} isPreview={isPreview}
labelCol={{ span: json.labelSpan }} labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }} wrapperCol={{ span: json.wrapperSpan }}
label={title} label={title}>
>
{cm} {cm}
</MobileItem> </MobileItem>
) : isEdit && get == 'web' ? ( ) : isEdit && get == 'web' ? (
...@@ -3446,8 +3344,7 @@ export default class tableCom extends Component { ...@@ -3446,8 +3344,7 @@ 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={title} label={title}>
>
{cm} {cm}
</Form.Item> </Form.Item>
) : ( ) : (
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论