Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
WebPublic
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
前端开发小组
WebPublic
Commits
1edf9e12
提交
1edf9e12
authored
4月 05, 2020
作者:
钟是志
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8350 活动申报-报名时间和活动时间没有限制关系
上级
76d6c137
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
333 行增加
和
625 行删除
+333
-625
index.js
FormInsertDiy/AffairPage/ApplyPage/index.js
+4
-6
ModalForm.js
FormInsertDiy/AffairPage/ButtonListDom/ModalForm.js
+1
-2
index.js
FormInsertDiy/AffairPage/ButtonListDom/index.js
+0
-31
publicApiService.js
FormInsertDiy/AffairPage/publicApiService.js
+7
-2
index.js
FormInsertDiy/Edit/index.js
+139
-139
index.js
FormInsertDiy/Export/index.js
+0
-0
ImportUtil.js
FormInsertDiy/ImportUtil/ImportUtil.js
+0
-0
ImportUtil.less
FormInsertDiy/ImportUtil/ImportUtil.less
+178
-179
index.js
FormInsertDiy/List/index.js
+4
-4
DataObj.js
FormInsertDiy/models/DataObj.js
+0
-151
FormList.js
FormInsertDiy/models/FormList.js
+0
-111
没有找到文件。
FormInsertDiy/AffairPage/ApplyPage/index.js
浏览文件 @
1edf9e12
...
...
@@ -9,8 +9,7 @@ import { message } from 'antd';
import
React
,
{
Fragment
}
from
'react'
;
import
*
as
service
from
'../publicApiService'
;
import
*
as
destructionFunc
from
'../destruction'
;
import
{
Link
,
hashHistory
}
from
'dva/router'
;
import
{
getDefaultValues
}
from
'../destruction'
;
import
{
Link
}
from
'dva/router'
;
import
{
getApplyPage
}
from
'../publicApiService'
;
import
{
getHuanGeToken
}
from
'@/utils/authority'
;
...
...
@@ -20,12 +19,11 @@ import pageSetting from './pageSetting';
import
ButtonDiy
from
'@/baseComponent/ButtonDiy'
;
import
Shell
from
'@/baseComponent/Shell'
;
import
config
from
'@/config/config'
;
// import test from './2333';
export
default
class
AffairPage
extends
React
.
Component
{
constructor
(
props
)
{
super
(
props
);
//
const idObj = service.getId();
const
idObj
=
service
.
getId
();
if
(
!
idObj
)
{
message
.
error
(
'没有配置数据id,无法使用该功能'
);
}
...
...
@@ -145,7 +143,7 @@ export default class AffairPage extends React.Component {
this
.
ListComponent
.
getPage
();
});
}
if
(
event
.
data
.
indexOf
(
'iframeHeight'
)
>
-
1
)
{
if
(
event
.
data
.
indexOf
(
'iframeHeight'
)
>
-
1
)
{
let
height
=
Number
(
event
.
data
.
split
(
'-'
)[
1
]);
document
.
getElementById
(
'applyIframeId'
).
height
=
height
;
}
...
...
@@ -158,7 +156,7 @@ export default class AffairPage extends React.Component {
const
{
workId
,
dataBaseId
,
addFields
,
showIframe
}
=
this
.
state
;
const
url
=
config
.
onestopPC
.
split
(
'/#/'
);
let
iframeUrl
=
`
${
url
[
0
]}
/#/IFrameForApply?id=
${
workId
}
&token=
${
getHuanGeToken
()}
`
;
// iframeUrl = `http://localhost:8000/onestop/IFrameForApply?id=${workId}&token=${getHuanGeToken()}`;
// iframeUrl = `http://localhost:8000/onestop/IFrameForApply?id=${workId}&token=${getHuanGeToken()}`;
return
(
<
PageHeaderWrapper
title
=
""
>
<
div
style
=
{{
...
...
FormInsertDiy/AffairPage/ButtonListDom/ModalForm.js
浏览文件 @
1edf9e12
...
...
@@ -11,11 +11,10 @@ import ButtonDiy from '@/baseComponent/ButtonDiy';
import
ModalDiy
from
'@/baseComponent/ModalDiy'
;
import
React
,
{
Component
,
Fragment
}
from
'react'
;
import
{
deepCopy
,
}
from
'@/baseComponent/utils'
;
import
{
mustHaveValue
}
from
'../../config/index'
;
import
{
mustHaveValue
,
transLateTimeTOUnix
}
from
'../../config/index'
;
import
{
message
}
from
'antd'
;
import
PropTypes
from
'prop-types'
;
import
{
startProcess
}
from
'../publicApiService'
;
import
{
transLateTimeTOUnix
}
from
'@/pages/App/FormInsertDiy/config'
;
import
FormArray
from
'../component/FormArray'
;
export
default
class
ModalForm
extends
Component
{
...
...
FormInsertDiy/AffairPage/ButtonListDom/index.js
浏览文件 @
1edf9e12
import
ButtonDiy
from
'@/baseComponent/ButtonDiy'
;
import
React
,
{
Component
,
Fragment
}
from
'react'
;
/*
import ExportInfo from '@/components/App/ExportInfo';
import ImportUtil from '@/components/App/ImportUtil';
import ModalDelete from './ModalDelete';
import ModalConfirm from './ModalConfirm';
*/
import
ModalBatch
from
'./ModalBatch'
;
import
ModalForm
from
'./ModalForm'
;
...
...
@@ -24,31 +18,6 @@ export default class ButtonListDom extends Component {
getPage
=
{
getPage
}
selectRows
=
{
selectRows
}
/>
;
/* case 'ModalDelete': // 删除按钮
return <ModalDelete {...item}
key={item.type}
getPage={getPage}
selectRows={selectRows}
/>;
case 'ImportUtil': // 导入
return <ImportUtil {...item.props}
key={item.type}
callback={() => getPage()}
/>;
case 'ExportInfo': // 导出
return <ExportInfo {...item.props}
key={item.type}
/>;
case 'ModalConfirm': // 一般按钮 点击后弹出是否确定的 Modal Info
return <ModalConfirm key={item.type}
{...item}
getPage={getPage}
listData={listData}
formValues={formValues}
search={search}
selectRows={selectRows}/>;
*/
case
'ModalBatch'
:
// 一般按钮 点击后弹出 填写一些类似 审核理由 意见之类的信息
return
<
ModalBatch
key
=
{
item
.
type
}
{...
item
}
...
...
FormInsertDiy/AffairPage/publicApiService.js
浏览文件 @
1edf9e12
...
...
@@ -43,10 +43,15 @@ const getOtherToken = () => {
};
const
getId
=
()
=>
{
// 获取流程引擎 事务workId 和表dataBaseId
return
{
dataBaseId
:
'1243131275393368064'
,
workId
:
'1243131275393368064'
,
};
let
path
=
window
.
location
.
href
;
path
=
path
.
split
(
'/'
);
// let idObj = config[path.pop()];
let
idObj
;
console
.
log
(
path
.
pop
());
/// let idObj = config[path.pop()];
debugger
;
if
(
typeof
idObj
===
'undefined'
)
{
console
.
error
(
'没有找到对应的流程引擎id'
);
return
false
;
...
...
FormInsertDiy/Edit/index.js
浏览文件 @
1edf9e12
import
React
,
{
Fragment
}
from
'react'
;
import
{
Button
,
Card
,
Col
,
Form
,
message
,
Row
,
}
from
'antd'
;
import
{
connect
}
from
'dva'
;
import
PageHeaderWrapper
from
'@/components/PageHeaderWrapper'
;
import
moment
from
'moment'
;
import
router
from
'umi/router'
;
import
{
text
,
number
,
date
,
getFormArrayConfig
}
from
'../config/index'
;
import
FormArray
from
'../AffairPage/component/FormArray'
;
import
ButtonDiy
from
'@/baseComponent/ButtonDiy'
;
import
Shell
from
'../Shell'
;
@
connect
(({
formList
,
loading
})
=>
({
formList
,
}))
@
Form
.
create
()
class
Edit
extends
React
.
Component
{
state
=
{
modalVisible
:
false
,
formData
:
{},
formItem
:
[],
isAdd
:
false
,
objId
:
this
.
props
.
id
,
recordId
:
this
.
props
.
recordId
,
recordKey
:
this
.
props
.
recordKey
,
};
columns
=
[];
//渲染值
componentDidMount
()
{
const
{
dispatch
}
=
this
.
props
;
const
{
objId
,
recordKey
,
recordId
}
=
this
.
state
;
dispatch
({
type
:
'formList/getHead'
,
payload
:
{
dataObjId
:
objId
},
callback
:
(
dates
)
=>
{
if
(
dates
)
{
this
.
setState
({
formItem
:
dates
,
});
}
},
});
//渲染表单字段
if
(
recordId
!=
null
)
{
dispatch
({
type
:
'formList/getDetail'
,
payload
:
{
dataObjId
:
objId
,
key
:
recordKey
,
value
:
recordId
,
},
callback
:
(
res
)
=>
{
if
(
res
)
{
this
.
setState
({
formData
:
res
,
});
}
},
});
this
.
setState
({
isAdd
:
false
,
})
}
else
{
this
.
setState
({
isAdd
:
true
,
})
}
}
onSubmit
=
()
=>
{
//router.goBack();
const
{
isAdd
,
objId
,
formData
}
=
this
.
state
;
let
payload
=
{
params
:
{...
formData
},
objId
,
isAdd
,
};
this
.
props
.
dispatch
({
type
:
'formList/add'
,
payload
,
callback
:
()
=>
{
message
.
success
(
'操作成功'
);
this
.
props
.
returnThis
();
},
});
};
goBack
=
()
=>
{
this
.
props
.
returnThis
();
};
changeFormData
=
(
value
,
key
)
=>
{
let
oldValue
=
this
.
state
.
formData
;
oldValue
[
key
]
=
value
;
this
.
setState
({
formData
:
oldValue
,
});
};
render
()
{
let
{
formItem
,
formData
}
=
this
.
state
;
let
formConfig
=
getFormArrayConfig
(
formItem
);
return
(
<
Shell
>
<
Row
>
<
FormArray
config
=
{
formConfig
}
nameSpan
=
{{
big
:
10
,
small
:
12
}}
fileSpan
=
{{
big
:
4
,
small
:
3
}}
value
=
{
formData
}
changeValue
=
{
this
.
changeFormData
}
/
>
<
Col
span
=
{
24
}
style
=
{{
textAlign
:
'center'
,
paddingTop
:
'200px'
,
paddingBottom
:
'50px'
}}
>
<
ButtonDiy
className
=
{
'primaryBlue'
}
handleClick
=
{
this
.
onSubmit
}
name
=
{
'保存'
}
/
>
<
ButtonDiy
className
=
{
'defaultRed'
}
handleClick
=
{
this
.
goBack
}
name
=
{
'返回'
}
/
>
<
/Col
>
<
/Row
>
<
/Shell
>
);
}
}
export
default
Edit
;
//
import React, { Fragment } from 'react';
//
import {
//
Button,
//
Card, Col,
//
Form, message, Row,
//
} from 'antd';
//
import { connect } from 'dva';
//
import PageHeaderWrapper from '@/components/PageHeaderWrapper';
//
import moment from 'moment';
//
import router from 'umi/router';
//
import { text, number, date, getFormArrayConfig } from '../config/index';
//
import FormArray from '../AffairPage/component/FormArray';
//
import ButtonDiy from '@/baseComponent/ButtonDiy';
//
import Shell from '../Shell';
//
//
//
@connect(({ formList, loading }) => ({
//
formList,
//
}))
//
@Form.create()
//
class Edit extends React.Component {
//
//
state = {
//
modalVisible: false,
//
formData: {},
//
formItem: [],
//
isAdd: false,
//
objId: this.props.id,
//
recordId: this.props.recordId,
//
recordKey: this.props.recordKey,
//
};
//
columns = [];
//
//
//渲染值
//
componentDidMount() {
//
const { dispatch } = this.props;
//
const { objId, recordKey, recordId } = this.state;
//
dispatch({
//
type: 'formList/getHead',
//
payload: { dataObjId: objId },
//
callback: (dates) => {
//
if (dates) {
//
this.setState({
//
formItem: dates,
//
});
//
}
//
},
//
});
//
//渲染表单字段
//
if (recordId != null) {
//
dispatch({
//
type: 'formList/getDetail',
//
payload: {
//
dataObjId: objId,
//
key: recordKey,
//
value: recordId,
//
},
//
callback: (res) => {
//
if (res) {
//
this.setState({
//
formData: res,
//
});
//
}
//
},
//
});
//
this.setState({
//
isAdd: false,
//
})
//
}else{
//
this.setState({
//
isAdd: true,
//
})
//
}
//
}
//
//
onSubmit = () => {
//
//router.goBack();
//
const { isAdd, objId, formData } = this.state;
//
let payload = {
//
params: {...formData},
//
objId,
//
isAdd,
//
};
//
this.props.dispatch({
//
type: 'formList/add',
//
payload,
//
callback: () => {
//
message.success('操作成功');
//
this.props.returnThis();
//
},
//
});
//
};
//
//
goBack = () => {
//
this.props.returnThis();
//
};
//
//
changeFormData = (value, key) => {
//
let oldValue = this.state.formData;
//
oldValue[key] = value;
//
this.setState({
//
formData: oldValue,
//
});
//
};
//
//
render() {
//
let { formItem, formData } = this.state;
//
let formConfig = getFormArrayConfig(formItem);
//
return (
//
<Shell>
//
<Row>
//
<FormArray
//
config={formConfig}
//
nameSpan={{ big: 10, small: 12 }}
//
fileSpan={{ big: 4, small: 3 }}
//
value={formData}
//
changeValue={this.changeFormData}
//
/>
//
<Col span={24}
//
style={{ textAlign: 'center', paddingTop: '200px', paddingBottom: '50px' }}>
//
//
<ButtonDiy
//
className={'primaryBlue'}
//
handleClick={this.onSubmit}
//
name={'保存'}
//
/>
//
<ButtonDiy
//
className={'defaultRed'}
//
handleClick={this.goBack}
//
name={'返回'}
//
/>
//
</Col>
//
</Row>
//
</Shell>
//
);
//
}
//
}
//
//
export default Edit;
FormInsertDiy/Export/index.js
浏览文件 @
1edf9e12
差异被折叠。
点击展开。
FormInsertDiy/ImportUtil/ImportUtil.js
浏览文件 @
1edf9e12
差异被折叠。
点击展开。
FormInsertDiy/ImportUtil/ImportUtil.less
浏览文件 @
1edf9e12
.nomal{
background: #fff;
padding: 10px;
}
.title{
display: flex;
margin-bottom: 20px;
}
.info{
text-align: center;
font-weight: bold;
font-size: 18px;
}
.detail{
text-align: center;
margin:30px auto;
}
.detail img{
margin: auto 10px;
}
.button{
display: -webkit-box; /* 老版本语法: Safari, iOS, Android browser, older WebKit browsers. */
display: -moz-box; /* 老版本语法: Firefox (buggy) */
display: -ms-flexbox; /* 混合版本语法: IE 10 */
display: -webkit-flex; /* 新版本语法: Chrome 21+ */
display: -moz-flex;
display: flex;
-moz-box-pack: center; /*Firefox*/
-webkit-box-pack: center; /*Safari,Opera,Chrome*/
box-pack: center;
-moz-justify-content: center;
-webkit-justify-content: center;
justify-content: center;
}
.operation{
display: -webkit-box; /* 老版本语法: Safari, iOS, Android browser, older WebKit browsers. */
display: -moz-box; /* 老版本语法: Firefox (buggy) */
display: -ms-flexbox; /* 混合版本语法: IE 10 */
display: -webkit-flex; /* 新版本语法: Chrome 21+ */
display: -moz-flex;
display: flex;
-moz-box-pack: center; /*Firefox*/
-webkit-box-pack: center; /*Safari,Opera,Chrome*/
box-pack: center;
-moz-justify-content: center;
-webkit-justify-content: center;
justify-content: center;
}
.button Button{
margin: auto 10px;
}
.titleInfo p span{
font-weight: bold;
}
.import{
color: #6ca3c9;
font-size: 16px;
}
.button{
// background: #eff3f8;
text-align: center;
padding:20px;
margin-top: 20px;
}
.tip{
margin:20px auto;
padding:10px;
border-top: 1px solid #ccc;
}
.tip span{
display: block;
margin:10px;
font-size: 16px;
}
.tip::after{
content: '';
position: absolute;
width: 5px;
height: 57px;
background: #e5eaf1;
margin-top: -141px;
margin-left: -13px;
}
.select button{
color: #fff;
padding:10px;
background: #abbac3;
border: none;
margin: 10px;
}
.attentionItem{
background: #f4f5f4;
padding: 10px;
box-shadow: 1px 1px 1px #ccc;
}
.attentionItem p:nth-child(1){
font-size: 16px;
margin-left: 0;
}
.attentionItem p{
font-size: 14px;
margin-left: 45px;
}
.submitButtons{
margin-left: 34px;
}
.contentTable{
display: -webkit-box; /* 老版本语法: Safari, iOS, Android browser, older WebKit browsers. */
display: -moz-box; /* 老版本语法: Firefox (buggy) */
display: -ms-flexbox; /* 混合版本语法: IE 10 */
display: -webkit-flex; /* 新版本语法: Chrome 21+ */
display: -moz-flex;
display: flex;
-moz-box-pack: justify; /*Firefox*/
-webkit-box-pack:justify; /*Safari,Opera,Chrome*/
box-pack: justify;
-moz-justify-content: space-between;
-webkit-justify-content: space-between;
justify-content: space-between;
margin-top: 20px;
}
.left{
width: 50%;
}
.right{
width: 50%;
border-left: 1px solid #317ecc;
}
.error p{
color: #fff;
background: #317ecc;
// margin: 10px auto;
text-align: left;
font-size: 18px;
}
.download{
background: #f5f5f5;
padding: 5px;
margin-top: -16px;
}
.download img{
margin-top: -2px;
margin-right: 5px;
}
.download button{
border: none;
background: #f5f5f5
}
.download button:nth-child(1){
border-right: 1px solid #ccc;
}
.download button:nth-child(2){
border-right: 1px solid #ccc;
}
.buttonDown{
display: -webkit-box; /* 老版本语法: Safari, iOS, Android browser, older WebKit browsers. */
display: -moz-box; /* 老版本语法: Firefox (buggy) */
display: -ms-flexbox; /* 混合版本语法: IE 10 */
display: -webkit-flex; /* 新版本语法: Chrome 21+ */
display: -moz-flex;
display: flex;
-moz-box-pack: start; /*Firefox*/
-webkit-box-pack: start; /*Safari,Opera,Chrome*/
box-pack: start;
-moz-justify-content: flex-start;
-webkit-justify-content: flex-start;
justify-content: flex-start;
margin-bottom: 20px;
}
.buttonDown>button{
margin-left: 10px;
background: #abbac3;
border: none;
color: #fff;
padding: 5px 12px;
border-radius: 5px;
}
\ No newline at end of file
//.nomal{
// background: #fff;
// padding: 10px;
//}
//.title{
// display: flex;
// margin-bottom: 20px;
//}
//.info{
// text-align: center;
// font-weight: bold;
// font-size: 18px;
//}
//.detail{
// text-align: center;
// margin:30px auto;
//}
//.detail img{
// margin: auto 10px;
//}
//.button{
// display: -webkit-box; /* 老版本语法: Safari, iOS, Android browser, older WebKit browsers. */
// display: -moz-box; /* 老版本语法: Firefox (buggy) */
// display: -ms-flexbox; /* 混合版本语法: IE 10 */
// display: -webkit-flex; /* 新版本语法: Chrome 21+ */
// display: -moz-flex;
// display: flex;
// -moz-box-pack: center; /*Firefox*/
// -webkit-box-pack: center; /*Safari,Opera,Chrome*/
// box-pack: center;
// -moz-justify-content: center;
// -webkit-justify-content: center;
// justify-content: center;
//}
//.operation{
// display: -webkit-box; /* 老版本语法: Safari, iOS, Android browser, older WebKit browsers. */
// display: -moz-box; /* 老版本语法: Firefox (buggy) */
// display: -ms-flexbox; /* 混合版本语法: IE 10 */
// display: -webkit-flex; /* 新版本语法: Chrome 21+ */
// display: -moz-flex;
// display: flex;
// -moz-box-pack: center; /*Firefox*/
// -webkit-box-pack: center; /*Safari,Opera,Chrome*/
// box-pack: center;
// -moz-justify-content: center;
// -webkit-justify-content: center;
// justify-content: center;
//}
//.button Button{
// margin: auto 10px;
//
//}
//.titleInfo p span{
// font-weight: bold;
//}
//.import{
// color: #6ca3c9;
// font-size: 16px;
//}
//.button{
// // background: #eff3f8;
// text-align: center;
// padding:20px;
// margin-top: 20px;
//}
//.tip{
// margin:20px auto;
// padding:10px;
// border-top: 1px solid #ccc;
//}
//.tip span{
// display: block;
// margin:10px;
// font-size: 16px;
//}
//.tip::after{
// content: '';
// position: absolute;
// width: 5px;
// height: 57px;
// background: #e5eaf1;
// margin-top: -141px;
// margin-left: -13px;
//}
//.select button{
// color: #fff;
// padding:10px;
// background: #abbac3;
// border: none;
// margin: 10px;
//}
//.attentionItem{
// background: #f4f5f4;
// padding: 10px;
// box-shadow: 1px 1px 1px #ccc;
//}
//.attentionItem p:nth-child(1){
// font-size: 16px;
// margin-left: 0;
//}
//.attentionItem p{
// font-size: 14px;
// margin-left: 45px;
//}
//.submitButtons{
// margin-left: 34px;
//}
//.contentTable{
// display: -webkit-box; /* 老版本语法: Safari, iOS, Android browser, older WebKit browsers. */
// display: -moz-box; /* 老版本语法: Firefox (buggy) */
// display: -ms-flexbox; /* 混合版本语法: IE 10 */
// display: -webkit-flex; /* 新版本语法: Chrome 21+ */
// display: -moz-flex;
// display: flex;
// -moz-box-pack: justify; /*Firefox*/
// -webkit-box-pack:justify; /*Safari,Opera,Chrome*/
// box-pack: justify;
// -moz-justify-content: space-between;
// -webkit-justify-content: space-between;
// justify-content: space-between;
// margin-top: 20px;
//}
//.left{
// width: 50%;
//}
//.right{
// width: 50%;
// border-left: 1px solid #317ecc;
//}
//.error p{
// color: #fff;
// background: #317ecc;
// // margin: 10px auto;
// text-align: left;
// font-size: 18px;
//}
//.download{
// background: #f5f5f5;
// padding: 5px;
// margin-top: -16px;
//}
//.download img{
// margin-top: -2px;
// margin-right: 5px;
//}
//.download button{
// border: none;
// background: #f5f5f5
//}
//.download button:nth-child(1){
// border-right: 1px solid #ccc;
//}
//.download button:nth-child(2){
// border-right: 1px solid #ccc;
//}
//.buttonDown{
// display: -webkit-box; /* 老版本语法: Safari, iOS, Android browser, older WebKit browsers. */
// display: -moz-box; /* 老版本语法: Firefox (buggy) */
// display: -ms-flexbox; /* 混合版本语法: IE 10 */
// display: -webkit-flex; /* 新版本语法: Chrome 21+ */
// display: -moz-flex;
// display: flex;
// -moz-box-pack: start; /*Firefox*/
// -webkit-box-pack: start; /*Safari,Opera,Chrome*/
// box-pack: start;
// -moz-justify-content: flex-start;
// -webkit-justify-content: flex-start;
// justify-content: flex-start;
// margin-bottom: 20px;
//}
//.buttonDown>button{
// margin-left: 10px;
// background: #abbac3;
// border: none;
// color: #fff;
// padding: 5px 12px;
// border-radius: 5px;
//}
FormInsertDiy/List/index.js
浏览文件 @
1edf9e12
...
...
@@ -2,13 +2,13 @@ import React, { Fragment } from 'react';
import
{
Divider
,
message
,
Modal
,
Popconfirm
}
from
'antd'
;
import
moment
from
'moment'
;
import
router
from
'umi/router'
;
import
ExportInfo
from
'../Export/index'
;
//
import ExportInfo from '../Export/index';
import
{
text
,
number
,
date
,
getFormArrayConfig
}
from
'../config/index'
;
import
ButtonDiy
from
'@/baseComponent/ButtonDiy'
;
import
Shell
from
'../Shell'
;
import
FormArray
from
'../AffairPage/component/FormArray'
;
import
Edit
from
'../Edit/index'
;
import
ImportUtil
from
'../ImportUtil/ImportUtil'
;
//
import ImportUtil from '../ImportUtil/ImportUtil';
import
SearchDom
from
'@/highOrderComponent/SearchDom'
;
import
StandardTable
from
'@/components/StandardTable'
;
import
{
getHead
,
fetchData
,
deleteItem
,
add
}
from
'./services'
;
...
...
@@ -344,8 +344,8 @@ class FormList extends React.Component {
<
Shell
>
<
div
style
=
{{
paddingLeft
:
'10px'
,
marginTop
:
'20px'
}}
>
<
ButtonDiy
icon
=
"plus"
className
=
"primaryBlue"
handleClick
=
{
this
.
add
}
name
=
"新建"
/>
{
hasImport
&&
<
ImportUtil
objId
=
{
objId
}
/>
}
{
hasExport
&&
<
ExportInfo
objId
=
{
objId
}
/>
}
{
/*
{hasImport && <ImportUtil objId={objId} />}
{hasExport && <ExportInfo objId={objId} />}
*/
}
<
ButtonDiy
handleClick
=
{
this
.
batchDelete
}
name
=
"批量删除"
/>
<
/div
>
<
StandardTable
...
...
FormInsertDiy/models/DataObj.js
deleted
100644 → 0
浏览文件 @
76d6c137
import
{
apiRequest
}
from
'../request'
;
const
api
=
"/DataObjApi"
;
export
default
{
namespace
:
'DataObj'
,
state
:
{
list
:
[],
data
:{
list
:
[],
pagination
:
{},
},
code
:{
list
:
[],
pagination
:
{},
}
},
effects
:
{
*
getExportInfo
({
payload
,
callback
},
{
call
,
put
})
{
const
response
=
yield
call
(
apiRequest
,
api
+
"/getExportInfo"
,
payload
);
if
(
!
response
){
yield
put
({
type
:
'nom'
});
return
}
yield
put
({
type
:
'nom'
,
payload
:
response
,
});
if
(
callback
)
callback
(
response
);
},
*
changeCatalogue
({
payload
,
callback
},
{
call
,
put
})
{
const
response
=
yield
call
(
apiRequest
,
api
+
"/changeCatalogue"
,
payload
);
if
(
!
response
){
yield
put
({
type
:
'nom'
});
return
}
yield
put
({
type
:
'nom'
,
payload
:
response
,
});
if
(
callback
)
callback
(
response
);
},
*
find
({
payload
,
callback
},
{
call
,
put
})
{
const
response
=
yield
call
(
apiRequest
,
api
+
"/find"
,
payload
);
if
(
!
response
){
yield
put
({
type
:
'nom'
});
return
}
yield
put
({
type
:
'nom'
,
payload
:
response
,
});
if
(
callback
)
callback
(
response
);
},
*
add
({
payload
,
callback
},
{
call
,
put
})
{
const
response
=
yield
call
(
apiRequest
,
api
+
"/add"
,
payload
);
if
(
!
response
){
yield
put
({
type
:
'nom'
});
return
}
yield
put
({
type
:
'nom'
,
payload
:
response
,
});
if
(
callback
)
callback
(
response
);
},
*
fetch
({
payload
,
callback
},
{
call
,
put
})
{
const
response
=
yield
call
(
apiRequest
,
api
+
"/getPage"
,
payload
);
if
(
!
response
){
yield
put
({
type
:
'nom'
});
return
}
yield
put
({
type
:
'page'
,
payload
:
{...
response
,
isMain
:
payload
.
isMain
},
});
},
*
remove
({
payload
,
callback
},
{
call
,
put
})
{
const
response
=
yield
call
(
apiRequest
,
api
+
"/remove"
,
payload
);
if
(
!
response
){
yield
put
({
type
:
'nom'
});
return
}
yield
put
({
type
:
'nom'
,
payload
:
response
,
});
if
(
callback
){
callback
()
}
},
*
open
({
payload
,
callback
},
{
call
,
put
})
{
const
response
=
yield
call
(
apiRequest
,
api
+
"/open"
,
payload
);
if
(
!
response
){
yield
put
({
type
:
'nom'
});
return
}
yield
put
({
type
:
'nom'
,
payload
:
response
,
});
if
(
callback
){
callback
()
}
},
*
createTabel
({
payload
,
callback
},{
call
,
put
}){
const
response
=
yield
call
(
apiRequest
,
api
+
"/createTable"
,
payload
);
if
(
!
response
){
yield
put
({
type
:
'nom'
});
return
}
yield
put
({
type
:
'nom'
,
payload
:
response
,
});
if
(
callback
){
callback
()
}
}
},
reducers
:
{
list
(
state
,
action
)
{
return
{
...
state
,
list
:
action
.
payload
,
};
},
page
(
state
,
{
payload
})
{
if
(
payload
.
isMain
){
return
{
...
state
,
data
:{
list
:
payload
.
rows
,
pagination
:
{
current
:
payload
.
pageNo
,
pageSize
:
payload
.
pageSize
,
total
:
payload
.
total
,
},
}
};
}
else
{
return
{
...
state
,
code
:{
list
:
payload
.
rows
,
pagination
:
{
current
:
payload
.
pageNo
,
pageSize
:
payload
.
pageSize
,
total
:
payload
.
total
,
},
}
};
}
},
nom
(
state
,
action
)
{
return
{...
state
};
},
},
};
FormInsertDiy/models/FormList.js
deleted
100644 → 0
浏览文件 @
76d6c137
import
{
uaaRequest
}
from
'../../one_stop_public/utils/request'
;
const
api
=
'/DataObjApi'
;
export
default
{
namespace
:
'formList'
,
state
:
{
list
:
[],
data
:
{
list
:
[],
pagination
:
{},
},
},
effects
:
{
*
clear
({
payload
,
callback
},
{
call
,
put
})
{
yield
put
({
type
:
'clearAll'
,
payload
:
{},
});
},
*
getHead
({
payload
,
callback
},
{
call
,
put
})
{
console
.
log
(
'getHead'
,);
const
response
=
yield
call
(
uaaRequest
,
'/DataColumnApi/getHeaderList'
,
payload
);
console
.
log
(
' header response'
,
response
);
if
(
!
response
)
{
yield
put
({
type
:
'nom'
});
return
;
}
if
(
callback
)
callback
(
response
);
},
*
fetch
({
payload
,
callback
},
{
call
,
put
})
{
const
response
=
yield
call
(
uaaRequest
,
'/DataObjApi/getFormDataPage'
,
payload
);
if
(
!
response
)
{
yield
put
({
type
:
'nom'
});
return
;
}
/* yield put({
type: 'page',
payload: {
...response,
},
});*/
if
(
callback
)
callback
(
response
);
},
*
add
({
payload
,
callback
},
{
call
,
put
})
{
const
response
=
yield
call
(
apiRequest
,
api
+
'/addFormData'
,
{
data
:
JSON
.
stringify
(
payload
.
params
),
isAdd
:
payload
.
isAdd
,
objId
:
payload
.
objId
,
});
if
(
!
response
)
{
yield
put
({
type
:
'nom'
});
return
;
}
if
(
callback
)
callback
(
response
);
},
*
delete
({
payload
,
callback
},
{
call
,
put
})
{
const
response
=
yield
call
(
apiRequest
,
api
+
'/deleteFormData'
,
payload
);
if
(
!
response
)
{
yield
put
({
type
:
'nom'
});
return
;
}
if
(
callback
)
callback
(
response
);
},
*
getDetail
({
payload
,
callback
},
{
call
,
put
})
{
const
response
=
yield
call
(
apiRequest
,
api
+
'/getFormData'
,
payload
);
if
(
!
response
)
{
yield
put
({
type
:
'nom'
});
return
;
}
if
(
callback
)
callback
(
response
);
},
},
reducers
:
{
clearAll
(
state
,
action
)
{
return
{
...
state
,
data
:
{
list
:
[],
pagination
:
{},
},
};
},
list
(
state
,
action
)
{
return
{
...
state
,
list
:
action
.
payload
,
};
},
page
(
state
,
{
payload
})
{
return
{
...
state
,
data
:
{
list
:
payload
.
rows
,
pagination
:
{
current
:
payload
.
pageNo
,
pageSize
:
payload
.
pageSize
,
total
:
Number
(
payload
.
total
),
},
},
};
},
nom
(
state
,
action
)
{
return
{
...
state
};
},
},
};
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论