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

暂存

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