Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
WebPublic
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
前端开发小组
WebPublic
Commits
52b082dd
提交
52b082dd
authored
4月 05, 2020
作者:
钟是志
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
团委评奖评优开发
上级
1edf9e12
显示空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
19 行增加
和
208 行删除
+19
-208
index.js
FormInsertDiy/AffairPage/ApplyPage/index.js
+5
-4
AuditPage.js
FormInsertDiy/AffairPage/AuditPage/AuditPage.js
+1
-1
List.js
FormInsertDiy/AffairPage/AuditPage/List.js
+2
-2
index.js
FormInsertDiy/AffairPage/AuditPage/index.js
+2
-1
Detail.js
FormInsertDiy/AffairPage/Detail.js
+2
-184
publicApiService.js
FormInsertDiy/AffairPage/publicApiService.js
+5
-14
request.js
FormInsertDiy/request.js
+2
-2
没有找到文件。
FormInsertDiy/AffairPage/ApplyPage/index.js
浏览文件 @
52b082dd
...
...
@@ -11,7 +11,7 @@ import * as service from '../publicApiService';
import
*
as
destructionFunc
from
'../destruction'
;
import
{
Link
}
from
'dva/router'
;
import
{
getApplyPage
}
from
'../publicApiService'
;
import
{
get
HuanGe
Token
}
from
'@/utils/authority'
;
import
{
getToken
}
from
'@/utils/authority'
;
import
PageHeaderWrapper
from
'@/components/PageHeaderWrapper'
;
import
List
from
'./List'
;
...
...
@@ -23,7 +23,8 @@ import config from '@/config/config';
export
default
class
AffairPage
extends
React
.
Component
{
constructor
(
props
)
{
super
(
props
);
const
idObj
=
service
.
getId
();
let
pathname
=
this
.
props
.
location
.
pathname
;
const
idObj
=
service
.
getId
(
pathname
);
if
(
!
idObj
)
{
message
.
error
(
'没有配置数据id,无法使用该功能'
);
}
...
...
@@ -120,7 +121,7 @@ export default class AffairPage extends React.Component {
};
componentDidMount
()
{
if
(
!
get
HuanGe
Token
())
{
if
(
!
getToken
())
{
message
.
error
(
'您的数据未同步,请联系管理员!'
);
return
false
;
}
...
...
@@ -155,7 +156,7 @@ export default class AffairPage extends React.Component {
render
()
{
const
{
workId
,
dataBaseId
,
addFields
,
showIframe
}
=
this
.
state
;
const
url
=
config
.
onestopPC
.
split
(
'/#/'
);
let
iframeUrl
=
`
${
url
[
0
]}
/#/IFrameForApply?id=
${
workId
}
&token=
${
get
HuanGe
Token
()}
`
;
let
iframeUrl
=
`
${
url
[
0
]}
/#/IFrameForApply?id=
${
workId
}
&token=
${
getToken
()}
`
;
// iframeUrl = `http://localhost:8000/onestop/IFrameForApply?id=${workId}&token=${getHuanGeToken()}`;
return
(
<
PageHeaderWrapper
title
=
""
>
...
...
FormInsertDiy/AffairPage/AuditPage/AuditPage.js
浏览文件 @
52b082dd
...
...
@@ -6,7 +6,7 @@ import PageHeaderWrapper from '@/components/PageHeaderWrapper';
import
List
from
'../ApplyPage/List'
;
import
ListTab
from
'./ListTab'
;
import
{
deepCopy
}
from
'@/baseComponent/utils'
;
import
{
getApplyPage
,
getHandledPage
,
getWaitPage
}
from
'
@/pages/App/FormInsertDiy/AffairPage
/publicApiService'
;
import
{
getApplyPage
,
getHandledPage
,
getWaitPage
}
from
'
..
/publicApiService'
;
export
default
class
AuditPage
extends
Component
{
constructor
(
props
)
{
...
...
FormInsertDiy/AffairPage/AuditPage/List.js
浏览文件 @
52b082dd
...
...
@@ -7,9 +7,9 @@ import * as services from '@/highOrderComponent/Service';
import
StandardTable
from
'@/components/StandardTable'
;
import
PropTypes
from
'prop-types'
;
import
{
deepCopy
}
from
'@/baseComponent/utils'
;
import
{
date
,
format
,
text
}
from
'
@/pages/App/FormInsertDiy
/config'
;
import
{
date
,
format
,
text
}
from
'
../..
/config'
;
import
moment
from
'moment'
;
import
{
handleAudit
}
from
'
@/pages/App/FormInsertDiy/AffairPage
/publicApiService'
;
import
{
handleAudit
}
from
'
..
/publicApiService'
;
import
{
Tooltip
}
from
'antd'
;
export
default
class
List
extends
Component
{
...
...
FormInsertDiy/AffairPage/AuditPage/index.js
浏览文件 @
52b082dd
...
...
@@ -15,7 +15,8 @@ import { Link ,hashHistory} from 'dva/router';
export
default
class
Index
extends
React
.
Component
{
constructor
(
props
)
{
super
(
props
);
// const idObj = service.getId();
let
pathname
=
this
.
props
.
location
.
pathname
;
const
idObj
=
service
.
getId
(
pathname
);
if
(
!
idObj
)
{
message
.
error
(
'没有配置数据id,无法使用该功能'
);
}
...
...
FormInsertDiy/AffairPage/Detail.js
浏览文件 @
52b082dd
import
React
,
{
Fragment
,
Component
}
from
'react'
;
import
PageHeaderWrapper
from
'@/components/PageHeaderWrapper'
;
import
Shell
from
'@/baseComponent/Shell'
;
import
BlockTitle
from
'@/baseComponent/BlockTitle'
;
import
ButtonDiy
from
'@/baseComponent/ButtonDiy'
;
import
router
from
'umi/router'
;
import
FormArray
from
'./component/FormArray'
;
import
{
getDetailInfo
,
handleAudit
}
from
'@/pages/App/FormInsertDiy/AffairPage/publicApiService'
;
import
{
isJSON
}
from
'@/baseComponent/utils'
;
import
{
Col
,
Row
,
Timeline
,
Icon
,
Tabs
}
from
'antd'
;
import
ModalBatch
from
'./ButtonListDom/ModalBatch'
;
import
FlowImg
from
'./component/FlowImg'
;
import
{
getHuanGeToken
}
from
'@/utils/authority'
;
import
{
getToken
}
from
'@/utils/authority'
;
import
config
from
'@/config/config'
;
const
{
TabPane
}
=
Tabs
;
/*
export default class Detail extends Component {
/!**
* workId,dataBaseId,record,addFields
* *!/
constructor(props) {
super(props);
this.state = {
detailInfo: {
content: {},
taskInfo: [],
},
show: false,
};
}
componentDidMount() {
const { state } = this.props.location;
const { record } = state;
getDetailInfo(record.id).then((x) => {
if (x) {
if (isJSON(x.content)) {
x.content = JSON.parse(x.content);
}
if(typeof x.content === 'object' && x.content.defaultValues){
for(let z in x.content.defaultValues){
x.content = {
...x.content,
...x.content.defaultValues[z],
}
} }
this.setState({
detailInfo: x,
show: true,
});
}
});
}
buttonDom = () => {
const { detailInfo } = this.state;
const { btns } = detailInfo;
let res = [];
if(typeof btns !== 'undefined' && Array.isArray(btns)){
for(let z of btns){
res.push(
{
type: z.name,
name: z.name,
component: 'ModalBatch',
className: z.name !== '通过' ? 'defaultRed' : 'defaultBlue',
nameSpan: { big: 4, small: 5 },
fileSpan: { big: 1, small: 1 },
values: {
[z.key]: z.value,
},
fields: [
{
key: 'reason',
name: '审核意见',
type: 'textarea',
},
],
beforeSubmit: (props, formValues) => {
return {
taskForm : {},
examineMap: JSON.stringify(formValues),
};
},
sourceKey: 'taskId',
postKey: 'taskIds',
apiServiceApi: handleAudit,
}
)
}
return res;
}
return [];
};
render() {
const { state } = this.props.location;
const { record, addFields, workId } = state;
const { detailInfo, show } = this.state;
const Btns = this.buttonDom();
const dot1 = <Icon type={'check-circle'}
style={{ fontSize: '16px', color: 'rgb(82, 196, 26)' }}/>;
const dot2 = <Icon type={'clock-circle-o'}
style={{ fontSize: '16px', color: 'red' }}/>;
if(!show){
return null;
}
return (<PageHeaderWrapper title="">
<Shell>
<div style={{ height: '54px', padding: '12px 0 12px 12px' }}>
<ButtonDiy name="返回"
className="defaultBlue"
icon="arrow-left"
handleClick={() => {
router.goBack();
}}
/>
{
Btns.map((item)=>{
return <ModalBatch key={item.type}
{...item}
handleSelectRows={()=>{console.log('清空')}}
getPage={()=>{router.goBack()}}
selectRows={[record]}/>
})
}
</div>
</Shell>
<Shell>
<BlockTitle
isSmall={true}
title={'申请信息'}
/>
<Row>
<Col span={20}>
<FormArray config={addFields}
value={detailInfo.content}
changeValue={() => {
console.log(xxx);
}}
disabled={true}
readOnly={true}
fileSpan={{ big: 2, small: 2 }}
nameSpan={{ big: 6, small: 7 }}
/>
</Col>
</Row>
</Shell>
<Shell>
<Tabs>
<TabPane tab={'审批状态'} key={'1'}>
<Row>
<Col span={16} offset={2} style={{paddingTop: '30px', paddingBottom: '30px'}}>
<Timeline>
{
detailInfo.taskInfo.map((item) => {
let reason = item.respdesc;
if(item.taskVariable && item.taskVariable.reason){
reason = item.taskVariable.reason;
}
return (
<Timeline.Item dot={item.endTime ? dot1 : dot2}
key={item.id}
>
{item.assignee ? <p><b>{item.assignee}</b></p> : <p> </p>}
<p>审批流程: {item.name}</p>
<p>审批状态: {item.status}</p>
<p>审批原因: {reason}</p>
</Timeline.Item>
);
})
}
</Timeline>
</Col>
</Row>
</TabPane>
<TabPane tab={'流程图'} key={'2'}>
<FlowImg id={workId}/>
</TabPane>
</Tabs>
</Shell>
</PageHeaderWrapper>)
;
}
}*/
export
default
class
Detail
extends
Component
{
constructor
(
props
){
...
...
@@ -221,7 +39,7 @@ export default class Detail extends Component{
render
(){
const
{
id
,
showAll
}
=
this
.
state
;
const
url
=
config
.
onestopPC
.
split
(
'/#/'
);
let
iframeUrl
=
`
${
url
[
0
]}
/#/IframeForDetail?id=
${
id
}
&token=
${
get
HuanGe
Token
()}
`
;
let
iframeUrl
=
`
${
url
[
0
]}
/#/IframeForDetail?id=
${
id
}
&token=
${
getToken
()}
`
;
// iframeUrl = `http://localhost:8000/onestop/IframeForDetail?id=${id}&token=${getHuanGeToken()}`;
return
(
<
PageHeaderWrapper
title
=
""
>
...
...
FormInsertDiy/AffairPage/publicApiService.js
浏览文件 @
52b082dd
...
...
@@ -9,7 +9,7 @@ import { apiRequest } from '../request';
import
{
getFormArrayConfig
}
from
'../config/index'
;
import
{
setHuanGeToken
}
from
'@/utils/authority'
;
import
{
isJSON
}
from
'@/baseComponent/utils'
;
import
config
from
'@/config/config'
;
const
giveValue
=
(
x
)
=>
{
if
(
x
&&
x
.
rows
){
...
...
@@ -42,24 +42,15 @@ const getOtherToken = () => {
}
};
const
getId
=
()
=>
{
// 获取流程引擎 事务workId 和表dataBaseId
return
{
dataBaseId
:
'1243131275393368064'
,
workId
:
'1243131275393368064'
,
};
let
path
=
window
.
location
.
href
;
path
=
path
.
split
(
'/'
);
console
.
log
(
path
.
pop
());
/// let idObj = config[path.pop()];
debugger
;
const
getId
=
(
pathname
)
=>
{
// 获取流程引擎 事务workId 和表dataBaseId
let
idObj
=
config
.
twOneStopConfig
[
pathname
];
// 路由 /tw/Pjpy/YXTYSBB/Apply
if
(
typeof
idObj
===
'undefined'
)
{
console
.
error
(
'没有找到对应的流程引擎id'
);
return
false
;
}
else
{
const
{
dataBaseId
,
workId
}
=
idObj
;
return
{
dataBaseId
,
workId
,
dataBaseId
:
idObj
.
id
,
workId
:
idObj
.
id
,
};
}
};
...
...
FormInsertDiy/request.js
浏览文件 @
52b082dd
...
...
@@ -5,7 +5,7 @@
import
{
extend
}
from
'umi-request'
;
import
{
notification
}
from
'antd'
;
import
FormdataWrapper
from
"@/utils/object-to-formdata-custom"
;
import
{
get
HuanGe
Token
}
from
'@/utils/authority'
;
import
{
getToken
}
from
'@/utils/authority'
;
import
{
offline
}
from
'./Toast'
;
import
systemConfig
from
'@/config/config'
;
...
...
@@ -70,7 +70,7 @@ const umiRequest = extend({
});
export
const
request
=
(
url
,
data
,
options
=
{})
=>
{
const
pp
=
{...
data
,
token
:
get
HuanGe
Token
()}
const
pp
=
{...
data
,
token
:
getToken
()}
const
requestParams
=
FormdataWrapper
(
pp
)
// 由于自动添加前缀 这里暂时修改getUrl(url)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论