提交 f214c831 authored 作者: 徐立's avatar 徐立

暂存

上级 7fc3df49
......@@ -35,6 +35,7 @@ export default class index extends Component {
};
render() {
let { path, pathName, width, height } = this.props;
console.log(path, '????');
const { visible } = this.state;
let isShow =
pathName?.indexOf('.pdf') !== -1 ||
......
......@@ -104,9 +104,7 @@ const CreateForm = Form.create()(props => {
//处理日期何时入库问题
try {
fieldsValue[d] = fieldsValue[d].format('YYYY-MM-DD HH:mm:ss');
}catch (e) {
}
} catch (e) {}
break;
}
}
......@@ -154,9 +152,11 @@ const CreateForm = Form.create()(props => {
);
});
@connect(({ formList,DataColumn,DataObj, loading }) => ({
formList,DataColumn,DataObj,
loading: loading.models.formList||loading.models.DataColumn||loading.models.DataObj,
@connect(({ formList, DataColumn, DataObj, loading }) => ({
formList,
DataColumn,
DataObj,
loading: loading.models.formList || loading.models.DataColumn || loading.models.DataObj,
}))
@Form.create()
class FormList extends React.Component {
......@@ -192,26 +192,26 @@ class FormList extends React.Component {
columns = [];
checkList = []; // 复选框内容
getOptions = () => {
const refIds = []
const refIds = [];
for (var i = 0; i < this.state.formItem.length; i++) {
if (this.state.formItem[i].referenceObjId != null && this.state.options[this.state.formItem[i].id + ''] == null) {
refIds.push(this.state.formItem[i].id)
if (
this.state.formItem[i].referenceObjId != null &&
this.state.options[this.state.formItem[i].id + ''] == null
) {
refIds.push(this.state.formItem[i].id);
}
}
if (refIds.length > 0) {
this.props.dispatch({
this.props.dispatch({
type: 'formList/getBatchOptions',
payload: { ids: refIds },
callback: (options) => {
this.setState({ options: { ...this.state.options, ...options } })
}
callback: options => {
this.setState({ options: { ...this.state.options, ...options } });
},
});
}
}
};
modify = record => {
// if (this.state.formItem.length < 10) {
this.getOptions();
......@@ -299,9 +299,11 @@ class FormList extends React.Component {
code: record.process_biz_key,
},
callback: data => {
const domainName = sessionStorage.getItem('domainName') ? sessionStorage.getItem('domainName') : '';
const domainName = sessionStorage.getItem('domainName')
? sessionStorage.getItem('domainName')
: '';
window.open(domainName+"/portal/serviceCentre/getdetail?id="+data.id, '_blank');
window.open(domainName + '/portal/serviceCentre/getdetail?id=' + data.id, '_blank');
//router.push({ pathname: '/portal/serviceCentre/getdetail', state: { id: data.id } });
},
});
......@@ -437,14 +439,13 @@ class FormList extends React.Component {
// 表头筛选逻辑
Array.isArray(this.props.value.columns) &&
this.props.value.columns.map(item => {
if(item.dataIndex!=null){
if (item.dataIndex != null) {
cacheList.push({
label: item.title,
value: item.dataIndex,
});
cacheChecked.push(item.dataIndex);
}
});
this.checkList = cacheList;
......@@ -515,13 +516,13 @@ class FormList extends React.Component {
let cacheChecked = [];
// 表头筛选逻辑
datas.map(item => {
if(item.name!=null){
cacheList.push({
label: item.title,
value: item.name,
});
cacheChecked.push(item.name);
}
if (item.name != null) {
cacheList.push({
label: item.title,
value: item.name,
});
cacheChecked.push(item.name);
}
});
this.checkList = cacheList;
this.setState({
......@@ -741,7 +742,7 @@ class FormList extends React.Component {
this.setState({
modalVisible: this.state.modalVisible ? false : true,
formData: {},
isView:false
isView: false,
});
};
......@@ -839,7 +840,7 @@ class FormList extends React.Component {
this.setState({
formValues: fieldsValue,
});
const params = {
const params = {
pageNo: 1,
pageSize: this.props.pageSize || 10,
query: JSON.stringify(values),
......@@ -907,14 +908,19 @@ class FormList extends React.Component {
initialValue: formData == null ? '' : formData[item.name],
rules: [{ required: !item.isNull }],
})(
<Select disabled={isView} style={{ width: '70%' }}
optionFilterProp="children"
showSearch
filterOption={(input, option) =>
option
? option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
: false
} placeholder="请选择" allowClear>
<Select
disabled={isView}
style={{ width: '70%' }}
optionFilterProp="children"
showSearch
filterOption={(input, option) =>
option
? option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
: false
}
placeholder="请选择"
allowClear
>
{ops.map(r => (
<Option value={r[item.referenceCodeName]} key={r[item.referenceCodeName]}>
{r[item.referenceNameName]}
......@@ -968,15 +974,19 @@ class FormList extends React.Component {
initialValue: formData == null ? '' : formData[item.name],
rules: [{ required: !item.isNull }],
})(
<Select disabled={isView} style={{ width: 200 }} placeholder="请选择"
optionFilterProp="children"
showSearch
filterOption={(input, option) =>
option
? option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
: false
}
allowClear>
<Select
disabled={isView}
style={{ width: 200 }}
placeholder="请选择"
optionFilterProp="children"
showSearch
filterOption={(input, option) =>
option
? option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
: false
}
allowClear
>
{ops.map(r => (
<Option value={r.value} key={r.value}>
{r.value}
......@@ -1203,7 +1213,7 @@ class FormList extends React.Component {
render: (text, record) => {
return (
<Fragment>
<div style={{ textAlign: 'center',"padding-left":"0px","padding-right":"0px"}}>
<div style={{ textAlign: 'center', 'padding-left': '0px', 'padding-right': '0px' }}>
{isSelect ? (
this.state.selects.includes(record[valueName]) ? (
<>
......@@ -1238,7 +1248,7 @@ class FormList extends React.Component {
{rights && rights.includes('viewProcess') && record.process_biz_key ? (
<>
<a onClick={this.viewProcess.bind(this, record)}>流程详情</a>
{rights.includes('delete') ?<Divider type="vertical" />:""}
{rights.includes('delete') ? <Divider type="vertical" /> : ''}
</>
) : (
''
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论