Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
WebPublic
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
前端开发小组
WebPublic
Commits
8e8dee89
提交
8e8dee89
authored
4月 09, 2020
作者:
钟是志
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
一站式流程配置的配置项全部改成从接口中获取
上级
7049d1d3
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
97 行增加
和
117 行删除
+97
-117
List.js
FormInsertDiy/AffairPage/ApplyPage/List.js
+0
-4
index.js
FormInsertDiy/AffairPage/ApplyPage/index.js
+21
-11
index.js
FormInsertDiy/AffairPage/AuditPage/index.js
+17
-12
publicApiService.js
FormInsertDiy/AffairPage/publicApiService.js
+10
-89
Services.js
Services.js
+26
-0
utils.js
zyd_public/utils/utils.js
+23
-1
没有找到文件。
FormInsertDiy/AffairPage/ApplyPage/List.js
浏览文件 @
8e8dee89
...
@@ -2,13 +2,9 @@ import React, { Component, Fragment } from 'react';
...
@@ -2,13 +2,9 @@ import React, { Component, Fragment } from 'react';
import
SearchDom
from
'@/highOrderComponent/SearchDom'
;
import
SearchDom
from
'@/highOrderComponent/SearchDom'
;
import
ButtonListDom
from
'../ButtonListDom'
;
import
ButtonListDom
from
'../ButtonListDom'
;
import
Shell
from
'@/baseComponent/Shell'
;
import
Shell
from
'@/baseComponent/Shell'
;
import
ColumnsRender
from
'@/highOrderComponent/ColumnsRender'
;
import
StandardTable
from
'@/components/StandardTable'
;
import
StandardTable
from
'@/components/StandardTable'
;
import
PropTypes
from
'prop-types'
;
import
PropTypes
from
'prop-types'
;
import
{
deepCopy
}
from
'@/baseComponent/utils'
;
import
{
deepCopy
}
from
'@/baseComponent/utils'
;
import
{
date
,
format
,
text
,
taskNode
}
from
'../../config'
;
import
moment
from
'moment'
;
import
{
Tooltip
}
from
'antd'
;
import
{
handleColumns
}
from
'@/webPublic/FormInsertDiy/AffairPage/destruction'
;
import
{
handleColumns
}
from
'@/webPublic/FormInsertDiy/AffairPage/destruction'
;
export
default
class
List
extends
Component
{
export
default
class
List
extends
Component
{
...
...
FormInsertDiy/AffairPage/ApplyPage/index.js
浏览文件 @
8e8dee89
...
@@ -24,16 +24,14 @@ export default class AffairPage extends React.Component {
...
@@ -24,16 +24,14 @@ export default class AffairPage extends React.Component {
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
);
super
(
props
);
let
pathname
=
this
.
props
.
location
.
pathname
;
let
pathname
=
this
.
props
.
location
.
pathname
;
const
idObj
=
service
.
getId
(
pathname
);
if
(
!
idObj
)
{
message
.
error
(
'没有配置数据id,无法使用该功能'
);
}
this
.
state
=
{
this
.
state
=
{
showIframe
:
false
,
showIframe
:
false
,
columns
:
[],
columns
:
[],
workId
:
idObj
.
workId
,
pathname
,
workId
:
''
,
searchCondition
:
[],
searchCondition
:
[],
dataBaseId
:
idObj
.
dataBaseId
,
dataBaseId
:
''
,
addFields
:
[],
// 新增时填写的字段。
addFields
:
[],
// 新增时填写的字段。
renderIframe
:
true
,
renderIframe
:
true
,
};
};
...
@@ -121,11 +119,7 @@ export default class AffairPage extends React.Component {
...
@@ -121,11 +119,7 @@ export default class AffairPage extends React.Component {
return
pageSearch
;
return
pageSearch
;
};
};
componentDidMount
()
{
getColumns
=
()
=>
{
if
(
!
getToken
())
{
message
.
error
(
'您的数据未同步,请联系管理员!'
);
return
false
;
}
const
{
workId
}
=
this
.
state
;
const
{
workId
}
=
this
.
state
;
service
.
getColumns
(
workId
).
then
((
response
)
=>
{
service
.
getColumns
(
workId
).
then
((
response
)
=>
{
if
(
response
)
{
if
(
response
)
{
...
@@ -136,6 +130,22 @@ export default class AffairPage extends React.Component {
...
@@ -136,6 +130,22 @@ export default class AffairPage extends React.Component {
});
});
}
}
});
});
};
componentDidMount
()
{
if
(
!
getToken
())
{
message
.
error
(
'您的数据未同步,请联系管理员!'
);
return
false
;
}
const
{
pathname
}
=
this
.
state
;
service
.
getId
(
pathname
).
then
((
x
)
=>
{
this
.
setState
({
workId
:
x
.
workId
,
dataBaseId
:
x
.
dataBaseId
,
},()
=>
{
this
.
getColumns
();
})
});
window
.
addEventListener
(
'message'
,
(
event
)
=>
{
window
.
addEventListener
(
'message'
,
(
event
)
=>
{
if
(
event
.
data
===
'returnList'
)
{
if
(
event
.
data
===
'returnList'
)
{
...
...
FormInsertDiy/AffairPage/AuditPage/index.js
浏览文件 @
8e8dee89
...
@@ -16,17 +16,14 @@ export default class Index extends React.Component {
...
@@ -16,17 +16,14 @@ export default class Index extends React.Component {
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
);
super
(
props
);
let
pathname
=
this
.
props
.
location
.
pathname
;
let
pathname
=
this
.
props
.
location
.
pathname
;
const
idObj
=
service
.
getId
(
pathname
);
if
(
!
idObj
)
{
message
.
error
(
'没有配置数据id,无法使用该功能'
);
}
this
.
state
=
{
this
.
state
=
{
columns
:
[],
columns
:
[],
dataList
:
[],
dataList
:
[],
headerInfo
:
[],
headerInfo
:
[],
workId
:
idObj
.
workId
,
workId
:
''
,
searchCondition
:
[],
searchCondition
:
[],
dataBaseId
:
idObj
.
dataBaseId
,
pathname
,
dataBaseId
:
''
,
addCondition
:
[],
addCondition
:
[],
addFields
:
[],
// 新增时填写的字段。
addFields
:
[],
// 新增时填写的字段。
tableInfo
:
{},
// 表格配置属性
tableInfo
:
{},
// 表格配置属性
...
@@ -36,10 +33,6 @@ export default class Index extends React.Component {
...
@@ -36,10 +33,6 @@ export default class Index extends React.Component {
getFormDetail
=
(
workId
)
=>
{
getFormDetail
=
(
workId
)
=>
{
const
{
dataBaseId
}
=
this
.
state
;
const
{
dataBaseId
}
=
this
.
state
;
/*service.getQueryCondition(dataBaseId).then((response) => {
this.setState({searchCondition: response})
});*/
service
.
getFormDetail
(
workId
).
then
((
response
)
=>
{
service
.
getFormDetail
(
workId
).
then
((
response
)
=>
{
if
(
typeof
response
.
unifiedServicePatternModel
===
'undefined'
)
{
if
(
typeof
response
.
unifiedServicePatternModel
===
'undefined'
)
{
return
false
;
return
false
;
...
@@ -86,8 +79,8 @@ export default class Index extends React.Component {
...
@@ -86,8 +79,8 @@ export default class Index extends React.Component {
})
})
};
};
componentDidMount
()
{
getColumn
=
()
=>
{
const
{
workId
,
dataBaseId
,
addFields
}
=
this
.
state
;
const
{
workId
}
=
this
.
state
;
service
.
getColumns
(
workId
).
then
((
response
)
=>
{
service
.
getColumns
(
workId
).
then
((
response
)
=>
{
if
(
response
&&
response
.
length
)
{
if
(
response
&&
response
.
length
)
{
this
.
setState
({
this
.
setState
({
...
@@ -97,6 +90,18 @@ export default class Index extends React.Component {
...
@@ -97,6 +90,18 @@ export default class Index extends React.Component {
});
});
}
}
});
});
};
componentDidMount
()
{
const
{
pathname
}
=
this
.
state
;
service
.
getId
(
pathname
).
then
((
x
)
=>
{
this
.
setState
({
workId
:
x
.
workId
,
dataBaseId
:
x
.
dataBaseId
,
},()
=>
{
this
.
getColumn
();
})
});
}
}
render
()
{
render
()
{
...
...
FormInsertDiy/AffairPage/publicApiService.js
浏览文件 @
8e8dee89
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
import
{
apiRequest
}
from
'../request'
;
import
{
apiRequest
}
from
'../request'
;
import
{
getFormArrayConfig
}
from
'../config/index'
;
import
{
getFormArrayConfig
}
from
'../config/index'
;
import
{
setHuanGeToken
}
from
'@/utils/authority'
;
import
{
setHuanGeToken
}
from
'@/utils/authority'
;
import
{
isJSON
}
from
'@/baseComponent/utils'
;
import
{
getOneStopConfig
,
isJSON
}
from
'@/baseComponent/utils'
;
import
config
from
'@/config/config'
;
import
config
from
'@/config/config'
;
const
giveValue
=
(
x
)
=>
{
const
giveValue
=
(
x
)
=>
{
...
@@ -30,44 +30,20 @@ const giveValue = (x) => {
...
@@ -30,44 +30,20 @@ const giveValue = (x) => {
}
}
};
};
const
getOtherToken
=
()
=>
{
let
userName
=
sessionStorage
.
getItem
(
"currentUser"
);
if
(
isJSON
(
userName
)){
let
name
=
JSON
.
parse
(
userName
).
name
;
return
apiRequest
(
`/UserApi/loginByCount?username=
${
name
}
`
,
{}).
then
((
res
)
=>
{
if
(
res
){
setHuanGeToken
(
res
.
token
);
}
});
}
};
const
getId
=
(
pathname
)
=>
{
// 获取流程引擎 事务workId 和表dataBaseId
const
getId
=
async
(
pathname
)
=>
{
// 获取流程引擎 事务workId 和表dataBaseId
let
idObj
=
config
.
twOneStopConfig
[
pathname
];
// 路由 /tw/Pjpy/YXTYSBB/Apply
let
idObj
=
await
getOneStopConfig
(
pathname
);
if
(
typeof
idObj
===
'undefined'
)
{
if
(
typeof
idObj
===
'undefined'
||
!
idObj
)
{
console
.
error
(
'没有找到对应的流程引擎id'
);
console
.
error
(
'没有找到对应的流程引擎id'
);
return
false
;
return
false
;
}
else
{
}
else
{
return
{
return
{
dataBaseId
:
idObj
.
id
,
dataBaseId
:
idObj
,
workId
:
idObj
.
id
,
workId
:
idObj
,
};
};
}
}
};
};
const
getColumns2
=
(
id
)
=>
{
// 获取表头 workId
return
apiRequest
(
'/DataColumnApi/getHeaderList'
,
{
dataObjId
:
id
}).
then
((
response
)
=>
{
if
(
response
){
return
response
.
map
((
x
)
=>
{
return
{
title
:
x
.
title
,
dataIndex
:
x
.
name
,
type
:
x
.
type
,
}
})
}
});
};
const
getPages
=
(
info
)
=>
{
// 获取代办事项 分页数据 workId
const
getPages
=
(
info
)
=>
{
// 获取代办事项 分页数据 workId
// workId, pageSize, pageNo,
// workId, pageSize, pageNo,
...
@@ -78,44 +54,8 @@ const getPages = (info) => { // 获取代办事项 分页数据 workId
...
@@ -78,44 +54,8 @@ const getPages = (info) => { // 获取代办事项 分页数据 workId
return
apiRequest
(
'/UnifiedAppFormApi/getWaitPage'
,
info
);
return
apiRequest
(
'/UnifiedAppFormApi/getWaitPage'
,
info
);
};
};
const
getQueryCondition
=
(
dataObjId
)
=>
{
// 获取搜索条件 dataBaseId //暂时未生效. 因为欢哥那边不支持
return
[];
return
apiRequest
(
'/DataColumnApi/getHeaderList'
,
{
dataObjId
}).
then
((
response
)
=>
{
let
res
=
[];
if
(
response
){
for
(
let
item
of
response
){
if
(
item
.
isShowQuery
){
let
sear
=
getFormArrayConfig
([
item
]);
if
(
!
Array
.
isArray
(
sear
)){
return
false
;
}
delete
sear
[
0
].
required
;
delete
sear
[
0
].
placeHolder
;
res
.
push
(
sear
[
0
]);
}
}
}
return
res
;
});
};
const
getListPage
=
(
info
)
=>
{
// 获取表数据。dataObjId
if
(
typeof
info
.
pageNo
===
'undefined'
)
{
info
.
pageNo
=
1
;
info
.
pageSize
=
10
;
}
return
apiRequest
(
'/DataObjApi/getFormDataPage'
,
info
);
};
const
deleteFormData
=
(
dataBaseId
,
id
)
=>
{
// 删除表数据.
const
info
=
{
keys
:
JSON
.
stringify
({
id
}),
objId
:
dataBaseId
,
};
return
apiRequest
(
'/DataObjApi/deleteFormData'
,
info
);
};
/****************************** 以上接口暂时不用 ****************************/
...
@@ -271,33 +211,14 @@ const handleSqlfind = async(sqlKey = '') => {
...
@@ -271,33 +211,14 @@ const handleSqlfind = async(sqlKey = '') => {
})
})
};
};
/**
* 流程紧急度
* 2019年12月5日
* 钟是志
* 先默认给后台传个值 保证能提交申请
* */
const
getSeriousOptions
=
()
=>
{
return
apiRequest
(
'/UnifiedAppFormLevelApi/getAll'
,
{}).
then
((
x
)
=>
{
if
(
x
){
return
x
.
map
((
s
)
=>
{
return
{
key
:
s
.
id
,
name
:
s
.
name
,
color
:
s
.
color
,
}
})
}
});
};
export
{
export
{
getId
,
getColumns
,
getPages
,
getQueryCondition
,
getId
,
getColumns
,
getPages
,
get
ListPage
,
deleteFormData
,
getColumns2
,
get
FormDetail
,
getFormDetail
,
getOptions
,
startProcess
,
getApplyPage
,
getOtherToken
,
getOptions
,
startProcess
,
getApplyPage
,
getDetailInfo
,
getWaitPage
,
getHandledPage
,
handleAudit
,
getDetailInfo
,
getWaitPage
,
getHandledPage
,
handleAudit
,
handleSqlData
,
handleSqlfind
,
getSqlOptions
,
getSeriousOptions
,
handleSqlData
,
handleSqlfind
,
getSqlOptions
,
};
};
Services.js
浏览文件 @
8e8dee89
import
{
uaaRequest
}
from
'./one_stop_public/utils/request'
;
import
{
uaaRequest
}
from
'./one_stop_public/utils/request'
;
import
config
from
'@/config/config'
;
import
{
message
}
from
'antd'
;
import
{
setOneStopConfig
}
from
'@/webPublic/zyd_public/utils/utils'
;
// 根据模板code查询模板数据
// 根据模板code查询模板数据
// 查询表格中某条数据
// 查询表格中某条数据
...
@@ -88,3 +91,26 @@ export const addOrEditTableItem = ({ objId, data, isAdd, isBase = true }) => {
...
@@ -88,3 +91,26 @@ export const addOrEditTableItem = ({ objId, data, isAdd, isBase = true }) => {
export
const
getHistoryFormDetail
=
({
id
,
code
})
=>
{
export
const
getHistoryFormDetail
=
({
id
,
code
})
=>
{
return
uaaRequest
(
'/UnifiedAppFormApi/getFormDetail'
,
{
id
,
code
,
});
return
uaaRequest
(
'/UnifiedAppFormApi/getFormDetail'
,
{
id
,
code
,
});
};
};
export
function
getOnestopKey
(
key
=
''
,
formKey
=
'key_list'
,
formValue
=
'value_list'
){
return
fetchTableData
({
dataObjId
:
config
.
onestopConfigDataObjId
||
'1248169933162938368'
,
pageNo
:
1
,
pageSize
:
5000
,
}).
then
((
x
)
=>
{
if
(
x
&&
x
.
rows
&&
x
.
rows
.
length
){
let
onestopConfigList
=
{};
for
(
let
item
of
x
.
rows
){
onestopConfigList
[
item
[
formKey
]]
=
item
[
formValue
];
}
setOneStopConfig
(
onestopConfigList
);
if
(
key
){
return
onestopConfigList
[
key
];
}
}
else
{
message
.
warning
(
'没有配置服务,无法使用此功能'
);
return
false
;
}
})
}
zyd_public/utils/utils.js
浏览文件 @
8e8dee89
import
React
from
'react'
;
import
React
from
'react'
;
import
moment
from
'moment'
;
import
moment
from
'moment'
;
import
{
Icon
,
message
,
notification
}
from
'antd'
;
import
{
Icon
,
message
,
notification
}
from
'antd'
;
import
{
getOnestopKey
}
from
'../../Services'
;
let
messageTime
=
new
Date
().
getTime
()
-
3000
;
let
messageTime
=
new
Date
().
getTime
()
-
3000
;
...
@@ -218,3 +218,25 @@ export function controlNotification(props) {
...
@@ -218,3 +218,25 @@ export function controlNotification(props) {
});
});
return
true
;
return
true
;
}
}
export
function
setOneStopConfig
(
value
){
if
(
typeof
value
!==
'string'
){
value
=
JSON
.
stringify
(
value
);
}
localStorage
.
setItem
(
'oneStopConfig'
,
value
);
}
export
function
getOneStopConfig
(
key
){
let
configList
=
localStorage
.
getItem
(
'oneStopConfig'
);
if
(
configList
&&
isJSON
(
configList
)){
let
data
=
JSON
.
parse
(
configList
);
if
(
data
&&
typeof
data
===
'object'
){
if
(
typeof
data
===
'undefined'
){
return
''
;
}
return
data
[
key
]
||
false
;
}
}
else
{
return
getOnestopKey
(
key
);
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论