Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
WebPublic
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
前端开发小组
WebPublic
Commits
ba1a5ebc
提交
ba1a5ebc
authored
4月 28, 2023
作者:
liqiufan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
2072 开发需求 1228
上级
6ee393d4
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
21 个修改的文件
包含
514 行增加
和
509 行删除
+514
-509
index.js
FormInsertDiy/Export/index.js
+33
-36
ImportUtil.js
FormInsertDiy/ImportUtil/ImportUtil.js
+61
-70
ExportInfo.js
one_stop_public/App/ExportInfo.js
+6
-9
ImportUtil.js
one_stop_public/App/ImportUtil.js
+57
-71
ProgressDiy.js
one_stop_public/App/ProgressDiy.js
+6
-10
SearchInfo.js
one_stop_public/App/SearchInfo.js
+33
-37
index.js
one_stop_public/App/StatisticsInfo/index.js
+60
-68
DetailSplit.js
one_stop_public/DetailForAudit/DetailSplit.js
+38
-49
index.jsx
...op_public/DetailForAudit/components/Countersign/index.jsx
+22
-20
Image.js
...ublic/DetailForAudit/components/FlowExamineModal/Image.js
+9
-11
index.jsx
...op_public/DetailForAudit/components/trunToModel/index.jsx
+27
-37
index.jsx
...c/DetailForAudit/components/trunToModel/recycle/index.jsx
+10
-12
index.jsx
...ic/DetailForAudit/components/trunToModel/trunTo/index.jsx
+8
-10
trunToDetail.jsx
one_stop_public/DetailForAudit/trunToDetail.jsx
+8
-12
index.js
one_stop_public/ForZydApply/index.js
+7
-11
apiConfig.js
one_stop_public/Services/apiConfig.js
+58
-0
services.js
one_stop_public/Services/services.js
+35
-0
TreeList.js
one_stop_public/libs/formList/TreeList.js
+0
-0
edit.js
one_stop_public/libs/formList/edit.js
+36
-46
index.js
one_stop_public/libs/formList/index.js
+0
-0
index.jsx
one_stop_public/tableCompon/index.jsx
+0
-0
没有找到文件。
FormInsertDiy/Export/index.js
浏览文件 @
ba1a5ebc
...
...
@@ -21,6 +21,8 @@ import OrderItem from './OrderItem';
import
ButtonDiy
from
'@/baseComponent/ButtonDiy'
;
import
FormdataWrapper
from
'@/utils/object-to-formdata-custom'
;
import
{
getServicesNomal
}
from
'@/webPublic/one_stop_public/Services/services'
;
import
{
getExportInfoApi
}
from
'@/webPublic/one_stop_public/Services/apiConfig'
;
const
Option
=
Select
.
Option
;
let
keyX
=
1
;
...
...
@@ -82,44 +84,39 @@ export default class Index extends React.Component {
this
.
setState
({
groups
});
};
open
=
()
=>
{
const
{
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'DataObj/getExportInfo'
,
payload
:
{
objId
:
this
.
props
.
objId
,
},
callback
:
(
infos
)
=>
{
const
mockData
=
[];
const
qs
=
[];
const
gs
=
[];
const
os
=
[];
for
(
var
key
in
infos
)
{
const
x
=
infos
[
key
];
mockData
.
push
({
key
:
x
.
field
,
title
:
x
.
name
,
chosen
:
false
,
});
if
(
x
.
canQuery
)
{
qs
.
push
(
x
);
}
if
(
x
.
canGroup
)
{
gs
.
push
(
x
);
}
if
(
x
.
canOrder
)
{
os
.
push
(
x
);
}
getServicesNomal
(
getExportInfoApi
,
{
objId
:
this
.
props
.
objId
,
}).
then
(
infos
=>
{
const
mockData
=
[];
const
qs
=
[];
const
gs
=
[];
const
os
=
[];
for
(
var
key
in
infos
)
{
const
x
=
infos
[
key
];
mockData
.
push
({
key
:
x
.
field
,
title
:
x
.
name
,
chosen
:
false
,
});
if
(
x
.
canQuery
)
{
qs
.
push
(
x
);
}
if
(
x
.
canGroup
)
{
gs
.
push
(
x
);
}
if
(
x
.
canOrder
)
{
os
.
push
(
x
);
}
}
this
.
setState
({
mockData
,
infos
,
visiable
:
true
,
qs
,
gs
,
os
,
});
},
this
.
setState
({
mockData
,
infos
,
visiable
:
true
,
qs
,
gs
,
os
,
});
});
};
onCancle
=
()
=>
{
...
...
FormInsertDiy/ImportUtil/ImportUtil.js
浏览文件 @
ba1a5ebc
...
...
@@ -11,6 +11,9 @@ import {
getSassApiHeader
,
getSysCode
}
from
'@/webPublic/one_stop_public/2023yunshangguizhou/utils'
;
import
{
getServicesNomal
,
importExecute
}
from
'../../one_stop_public/Services/services'
;
import
{
importAnalyseApi
}
from
'../../one_stop_public/Services/apiConfig'
;
const
Step
=
Steps
.
Step
;
const
TabPane
=
Tabs
.
TabPane
;
...
...
@@ -95,92 +98,80 @@ export default class ImportUtil extends React.PureComponent {
}
import
()
{
const
{
dispatch
,
importParams
}
=
this
.
props
;
dispatch
({
type
:
'DataObj/importExecute'
,
payload
:
{
...(
importParams
||
{}),
cacheKey
:
this
.
state
.
filekey
,
const
{
importParams
}
=
this
.
props
;
importExecute
({
...(
importParams
||
{}),
cacheKey
:
this
.
state
.
filekey
,
objId
:
this
.
props
.
objId
,
},
callback
:
(
res
)
=>
{
this
.
next
();
message
.
success
(
'导入成功'
);
objId
:
this
.
props
.
objId
,
}).
then
(()
=>
{
this
.
next
();
message
.
success
(
'导入成功'
);
this
.
setState
({
current
:
3
,
isShow
:
true
,
visible
:
false
,
});
if
(
this
.
props
.
callback
)
{
this
.
props
.
callback
();
}
},
this
.
setState
({
current
:
3
,
isShow
:
true
,
visible
:
false
,
});
if
(
this
.
props
.
callback
)
{
this
.
props
.
callback
();
}
});
}
getCachKey
=
(
filePath
)
=>
{
const
{
dispatch
,
importParams
}
=
this
.
props
;
dispatch
({
type
:
'DataObj/importAnalyse'
,
payload
:
{
...(
importParams
||
{}),
isLocal
:
false
,
filePath
,
objId
:
this
.
props
.
objId
,
},
callback
:
(
res
)
=>
{
this
.
setState
({
filekey
:
res
.
cacheKey
,
});
this
.
queryFile
(
res
.
cacheKey
);
},
const
{
importParams
}
=
this
.
props
;
getServicesNomal
(
importAnalyseApi
,
{
...(
importParams
||
{}),
isLocal
:
false
,
filePath
,
objId
:
this
.
props
.
objId
,
}).
then
(
res
=>
{
this
.
setState
({
filekey
:
res
.
cacheKey
,
});
this
.
queryFile
(
res
.
cacheKey
);
});
};
queryFile
=
(
cacheKey
)
=>
{
const
{
dispatch
,
importParams
}
=
this
.
props
;
dispatch
({
type
:
'DataObj/importDataQuery'
,
payload
:
{
...(
importParams
||
{}),
cacheKey
,
objId
:
this
.
props
.
objId
,
},
callback
:
(
res
)
=>
{
this
.
setState
({
current
:
1
,
isShow
:
false
,
const
{
importParams
}
=
this
.
props
;
getServicesNomal
(
importDataQueryApi
,
{
...(
importParams
||
{}),
cacheKey
,
objId
:
this
.
props
.
objId
,
}).
then
(
res
=>
{
this
.
setState
({
current
:
1
,
isShow
:
false
,
sucData
:
res
.
pass
,
errData
:
res
.
noPass
,
column
:
res
.
column
,
});
if
(
res
.
noPass
&&
res
.
noPass
.
length
==
0
)
{
if
(
res
.
pass
.
length
==
0
)
{
message
.
error
(
'当前没有验证成功的数据,无法导入。'
);
this
.
setState
({
currentKey
:
'1'
,
ch
:
!
this
.
state
.
ch
,
isNextDisabled
:
true
,
});
}
else
{
message
.
success
(
'所有数据验证通过,请确认后点击下一步。'
);
this
.
setState
({
currentKey
:
'2'
,
ch
:
!
this
.
state
.
ch
,
isNextDisabled
:
false
,
});
}
}
else
{
message
.
error
(
'当前存在未验证通过的数据,请按错误提示检测更正导入文件'
);
sucData
:
res
.
pass
,
errData
:
res
.
noPass
,
column
:
res
.
column
,
});
if
(
res
.
noPass
&&
res
.
noPass
.
length
==
0
)
{
if
(
res
.
pass
.
length
==
0
)
{
message
.
error
(
'当前没有验证成功的数据,无法导入。'
);
this
.
setState
({
currentKey
:
'1'
,
ch
:
!
this
.
state
.
ch
,
isNextDisabled
:
true
,
});
}
else
{
message
.
success
(
'所有数据验证通过,请确认后点击下一步。'
);
this
.
setState
({
currentKey
:
'2'
,
ch
:
!
this
.
state
.
ch
,
isNextDisabled
:
false
,
});
}
},
}
else
{
message
.
error
(
'当前存在未验证通过的数据,请按错误提示检测更正导入文件'
);
this
.
setState
({
currentKey
:
'1'
,
ch
:
!
this
.
state
.
ch
,
isNextDisabled
:
true
,
});
}
});
};
changePane
=
(
activeKey
)
=>
{
...
...
one_stop_public/App/ExportInfo.js
浏览文件 @
ba1a5ebc
...
...
@@ -22,6 +22,8 @@ import OrderItem from './OrderItem';
import
FormdataWrapper
from
'../utils/object-to-formdata-custom'
;
import
ButtonDiy
from
'./ButtonDiy/ButtonDiy'
;
import
{
getHeaders
}
from
'@/webPublic/zyd_public/utils/utils'
;
import
{
getServicesNomal
}
from
'../Services/services'
;
import
{
getExportInfoApi
}
from
'../Services/apiConfig'
;
const
Option
=
Select
.
Option
;
var
keyX
=
1
;
...
...
@@ -97,14 +99,10 @@ export default class ExportInfo extends React.Component {
this
.
setState
({
groups
});
};
open
=
()
=>
{
const
{
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'DataObj/getExportInfo'
,
payload
:
{
objId
:
this
.
props
.
objId
,
},
callback
:
(
infos
)
=>
{
const
mockData
=
[];
getServicesNomal
(
getExportInfoApi
,
{
objId
:
this
.
props
.
objId
,
}).
then
(
infos
=>
{
const
mockData
=
[];
const
qs
=
[];
const
gs
=
[];
const
os
=
[];
...
...
@@ -134,7 +132,6 @@ export default class ExportInfo extends React.Component {
gs
,
os
,
});
},
});
};
onCancle
=
()
=>
{
...
...
one_stop_public/App/ImportUtil.js
浏览文件 @
ba1a5ebc
...
...
@@ -14,6 +14,8 @@ import {
getSassApiHeader
,
getSysCode
}
from
'@/webPublic/one_stop_public/2023yunshangguizhou/utils'
;
import
{
getServicesNomal
,
importExecute
}
from
'../Services/services'
;
import
{
importDataQueryApi
,
importAnalyseApi
}
from
'../Services/apiConfig'
;
const
Modal
=
getModal
();
const
message
=
getMessage
();
...
...
@@ -126,107 +128,91 @@ export default class ImportUtil extends React.PureComponent {
import
()
{
const
{
dispatch
,
importParams
,
}
=
this
.
props
;
dispatch
({
type
:
'DataObj/importExecute'
,
payload
:
{
...(
importParams
||
{}),
cacheKey
:
this
.
state
.
fileCacheKey
,
objId
:
this
.
props
.
objId
,
},
callback
:
(
res
)
=>
{
if
(
res
&&
res
.
sync
===
false
&&
res
.
total
)
{
// 23013 学生事务/学生医保管理/学生平安险/保险办理,2001010248 高职界面已购买 导入 报错【接口超时】
this
.
setState
({
openProgress
:
res
,
});
return
;
}
this
.
next
();
importExecute
({
...(
importParams
||
{}),
cacheKey
:
this
.
state
.
fileCacheKey
,
objId
:
this
.
props
.
objId
,
}).
then
(
res
=>
{
if
(
res
&&
res
.
sync
===
false
&&
res
.
total
)
{
// 23013 学生事务/学生医保管理/学生平安险/保险办理,2001010248 高职界面已购买 导入 报错【接口超时】
this
.
setState
({
openProgress
:
res
,
});
return
;
}
this
.
next
();
message
.
success
(
'导入成功'
,
1
);
this
.
setState
({
current
:
3
,
isShow
:
true
,
visible
:
false
,
});
},
});
}
getCachKey
=
(
filePath
)
=>
{
const
{
dispatch
,
importParams
,
importConfig
,
}
=
this
.
props
;
dispatch
({
type
:
'DataObj/importAnalyse'
,
payload
:
{
...(
importParams
||
{}),
isLocal
:
false
,
filePath
,
getServicesNomal
(
importAnalyseApi
,
{
...(
importParams
||
{}),
isLocal
:
false
,
filePath
,
importConfig
:
importConfig
?
JSON
.
stringify
(
importConfig
)
:
null
,
objId
:
this
.
props
.
objId
,
},
callback
:
(
res
)
=>
{
this
.
setState
({
fileCacheKey
:
res
.
cacheKey
,
});
this
.
queryFile
(
res
.
cacheKey
);
},
importConfig
:
importConfig
?
JSON
.
stringify
(
importConfig
)
:
null
,
objId
:
this
.
props
.
objId
,
}).
then
(
res
=>
{
this
.
setState
({
fileCacheKey
:
res
.
cacheKey
,
});
this
.
queryFile
(
res
.
cacheKey
);
});
};
queryFile
=
(
cacheKey
)
=>
{
const
{
dispatch
,
importParams
,
}
=
this
.
props
;
dispatch
({
type
:
'DataObj/importDataQuery'
,
payload
:
{
...(
importParams
||
{}),
cacheKey
,
objId
:
this
.
props
.
objId
,
},
callback
:
(
res
)
=>
{
this
.
setState
({
current
:
1
,
isShow
:
false
,
getServicesNomal
(
importDataQueryApi
,
{
...(
importParams
||
{}),
cacheKey
,
objId
:
this
.
props
.
objId
,
}).
then
(
res
=>
{
this
.
setState
({
current
:
1
,
isShow
:
false
,
sucData
:
res
.
pass
,
errData
:
res
.
noPass
,
column
:
res
.
column
,
});
if
(
res
.
noPass
&&
res
.
noPass
.
length
===
0
)
{
if
(
res
.
pass
.
length
===
0
)
{
message
.
error
(
'当前没有验证成功的数据,无法导入。'
);
this
.
setState
({
currentKey
:
'1'
,
ch
:
!
this
.
state
.
ch
,
isNextDisabled
:
true
,
});
}
else
{
message
.
success
(
'所有数据验证通过,请确认后点击下一步。'
);
this
.
setState
({
currentKey
:
'2'
,
ch
:
!
this
.
state
.
ch
,
isNextDisabled
:
false
,
});
}
}
else
{
message
.
error
(
'当前存在未验证通过的数据,请按错误提示检测更正导入文件'
);
sucData
:
res
.
pass
,
errData
:
res
.
noPass
,
column
:
res
.
column
,
});
if
(
res
.
noPass
&&
res
.
noPass
.
length
===
0
)
{
if
(
res
.
pass
.
length
===
0
)
{
message
.
error
(
'当前没有验证成功的数据,无法导入。'
);
this
.
setState
({
currentKey
:
'1'
,
ch
:
!
this
.
state
.
ch
,
isNextDisabled
:
true
,
});
}
else
{
message
.
success
(
'所有数据验证通过,请确认后点击下一步。'
);
this
.
setState
({
currentKey
:
'2'
,
ch
:
!
this
.
state
.
ch
,
isNextDisabled
:
false
,
});
}
},
}
else
{
message
.
error
(
'当前存在未验证通过的数据,请按错误提示检测更正导入文件'
);
this
.
setState
({
currentKey
:
'1'
,
ch
:
!
this
.
state
.
ch
,
isNextDisabled
:
true
,
});
}
});
};
...
...
one_stop_public/App/ProgressDiy.js
浏览文件 @
ba1a5ebc
...
...
@@ -2,11 +2,12 @@ import React, { useEffect, useState, useRef, useMemo } from 'react';
import
{
Progress
,
message
}
from
'antd'
;
import
styles
from
'./ImportUtil.less'
;
import
{
connect
}
from
'dva'
;
import
{
getServicesNomal
}
from
'../Services/services'
;
import
{
importProcessApi
}
from
'../Services/apiConfig'
;
function
ProgressDiy
(
props
)
{
const
{
fileCacheKey
,
dispatch
,
changeOpenProgress
=
()
=>
{
},
}
=
props
;
...
...
@@ -14,20 +15,15 @@ function ProgressDiy(props) {
const
[
speedData
,
setData
]
=
useState
({
...
props
});
useEffect
(()
=>
{
interv
.
current
=
setInterval
(()
=>
{
dispatch
({
type
:
'DataObj/importProcess'
,
payload
:
{
cacheKey
:
fileCacheKey
,
},
callback
:
res
=>
{
console
.
log
(
res
);
setData
(
res
);
getServicesNomal
(
importProcessApi
,
{
cacheKey
:
fileCacheKey
,
}).
then
(
res
=>
{
setData
(
res
);
if
(
res
.
finished
)
{
clearInterval
(
interv
.
current
);
// message.success('导入完成');
changeOpenProgress
(
false
);
// 导入成功
}
},
});
},
1000
);
},
[]);
...
...
one_stop_public/App/SearchInfo.js
浏览文件 @
ba1a5ebc
...
...
@@ -23,6 +23,7 @@ import OrderItem from './OrderItem';
import
FormdataWrapper
from
'../utils/object-to-formdata-custom'
;
import
ButtonDiy
from
'./ButtonDiy/ButtonDiy'
;
import
{
getHeaders
}
from
'@/webPublic/zyd_public/utils/utils'
;
import
{
getServicesNomal
}
from
'../Services/services'
;
const
Option
=
Select
.
Option
;
var
keyX
=
1
;
...
...
@@ -98,45 +99,40 @@ export default class SearchInfo extends React.Component {
this
.
setState
({
groups
});
};
open
=
()
=>
{
const
{
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'DataObj/getExportInfo'
,
payload
:
{
objId
:
this
.
props
.
objId
,
},
callback
:
(
infos
)
=>
{
const
mockData
=
[];
const
qs
=
[];
const
gs
=
[];
const
os
=
[];
for
(
var
key
in
infos
)
{
const
x
=
infos
[
key
];
mockData
.
push
({
key
:
x
.
field
,
title
:
x
.
name
,
chosen
:
false
,
});
if
(
x
.
canQuery
)
{
qs
.
push
(
x
);
}
if
(
x
.
canGroup
)
{
gs
.
push
(
x
);
}
if
(
x
.
canOrder
)
{
os
.
push
(
x
);
}
getServicesNomal
(
getExportInfoApi
,
{
objId
:
this
.
props
.
objId
,
}).
then
(
infos
=>
{
const
mockData
=
[];
const
qs
=
[];
const
gs
=
[];
const
os
=
[];
for
(
var
key
in
infos
)
{
const
x
=
infos
[
key
];
mockData
.
push
({
key
:
x
.
field
,
title
:
x
.
name
,
chosen
:
false
,
});
if
(
x
.
canQuery
)
{
qs
.
push
(
x
);
}
if
(
x
.
canGroup
)
{
gs
.
push
(
x
);
}
if
(
x
.
canOrder
)
{
os
.
push
(
x
);
}
}
this
.
setState
({
mockData
,
infos
,
visiable
:
true
,
qs
,
gs
,
os
,
});
},
});
this
.
setState
({
mockData
,
infos
,
visiable
:
true
,
qs
,
gs
,
os
,
});
})
};
onCancle
=
()
=>
{
this
.
setState
({
visiable
:
false
});
...
...
one_stop_public/App/StatisticsInfo/index.js
浏览文件 @
ba1a5ebc
...
...
@@ -9,6 +9,8 @@ import FormdataWrapper from '../../utils/object-to-formdata-custom';
import
ButtonDiy
from
'../ButtonDiy/ButtonDiy'
;
import
{
nameSpan
,
nameSpan3
,
nameSpan2
}
from
'./config'
;
import
{
getHeaders
}
from
'@/webPublic/zyd_public/utils/utils'
;
import
{
getServicesNomal
}
from
'../../Services/services'
;
import
{
getExportInfoApi
,
getStatisticsApi
}
from
'../../Services/apiConfig'
;
const
Option
=
Select
.
Option
;
const
FormItem
=
Form
.
Item
;
...
...
@@ -79,37 +81,25 @@ export default class StatisticsInfo extends React.Component {
);
};
open
=
()
=>
{
const
{
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'DataObj/getExportInfo'
,
payload
:
{
objId
:
this
.
props
.
objId
,
},
callback
:
(
infos
)
=>
{
const
filterXZKeys
=
this
.
props
.
filterXZKeys
;
const
mockData
=
[];
const
mockXZData
=
[];
const
qs
=
[];
const
gs
=
[];
const
os
=
[];
for
(
var
key
in
infos
)
{
const
x
=
infos
[
key
];
mockData
.
push
({
key
:
x
.
field
,
title
:
x
.
name
,
chosen
:
false
,
hql
:
x
.
hql
,
});
if
(
filterXZKeys
!=
null
)
{
if
(
filterXZKeys
.
includes
(
key
))
{
mockXZData
.
push
({
key
:
x
.
field
,
title
:
x
.
name
,
chosen
:
false
,
hql
:
x
.
hql
,
});
}
}
else
{
getServicesNomal
(
getExportInfoApi
,
{
objId
:
THIS
.
props
.
objId
,
}).
then
(
infos
=>
{
const
filterXZKeys
=
this
.
props
.
filterXZKeys
;
const
mockData
=
[];
const
mockXZData
=
[];
const
qs
=
[];
const
gs
=
[];
const
os
=
[];
for
(
var
key
in
infos
)
{
const
x
=
infos
[
key
];
mockData
.
push
({
key
:
x
.
field
,
title
:
x
.
name
,
chosen
:
false
,
hql
:
x
.
hql
,
});
if
(
filterXZKeys
!=
null
)
{
if
(
filterXZKeys
.
includes
(
key
))
{
mockXZData
.
push
({
key
:
x
.
field
,
title
:
x
.
name
,
...
...
@@ -117,27 +107,33 @@ export default class StatisticsInfo extends React.Component {
hql
:
x
.
hql
,
});
}
if
(
x
.
canQuery
)
{
qs
.
push
(
x
);
}
if
(
x
.
canGroup
)
{
gs
.
push
(
x
);
}
if
(
x
.
canOrder
)
{
os
.
push
(
x
);
}
}
else
{
mockXZData
.
push
({
key
:
x
.
field
,
title
:
x
.
name
,
chosen
:
false
,
hql
:
x
.
hql
,
});
}
this
.
setState
({
mockData
,
mockXZData
,
infos
,
visiable
:
true
,
qs
,
gs
,
os
,
});
},
if
(
x
.
canQuery
)
{
qs
.
push
(
x
);
}
if
(
x
.
canGroup
)
{
gs
.
push
(
x
);
}
if
(
x
.
canOrder
)
{
os
.
push
(
x
);
}
}
this
.
setState
({
mockData
,
mockXZData
,
infos
,
visiable
:
true
,
qs
,
gs
,
os
,
});
});
};
onCancle
=
()
=>
{
...
...
@@ -184,7 +180,7 @@ export default class StatisticsInfo extends React.Component {
this
.
setState
({
querys
,
queryVisiable
:
false
,
currentQueryKey
:
null
});
};
finish
=
()
=>
{
const
{
dispatch
,
objId
}
=
this
.
props
;
const
{
objId
}
=
this
.
props
;
const
{
x
,
y
,
z
,
infos
,
XxX
,
currentKey
,
groups
}
=
this
.
state
;
if
(
x
==
null
)
{
...
...
@@ -254,21 +250,17 @@ export default class StatisticsInfo extends React.Component {
ttz
=
infos
[
z
].
hql
;
}
}
dispatch
({
type
:
'DataObj/getStatistics'
,
payload
:
{
x
:
ttx
,
y
:
tty
,
z
:
ttz
,
objId
,
xXx
:
XxX
,
hql
:
currentKey
&&
infos
[
currentKey
]
?
infos
[
currentKey
].
hql
:
null
,
querys
:
JSON
.
stringify
(
qqs
),
groups
:
JSON
.
stringify
(
ggs
),
},
callback
:
(
data
)
=>
{
this
.
setState
({
dataSource
:
data
.
dataSource
,
columns
:
data
.
columns
});
},
getServicesNomal
(
getStatisticsApi
,
{
x
:
ttx
,
y
:
tty
,
z
:
ttz
,
objId
,
xXx
:
XxX
,
hql
:
currentKey
&&
infos
[
currentKey
]
?
infos
[
currentKey
].
hql
:
null
,
querys
:
JSON
.
stringify
(
qqs
),
groups
:
JSON
.
stringify
(
ggs
),
}).
then
(
data
=>
{
this
.
setState
({
dataSource
:
data
.
dataSource
,
columns
:
data
.
columns
});
});
});
};
...
...
@@ -316,7 +308,7 @@ export default class StatisticsInfo extends React.Component {
}
export
=
()
=>
{
const
{
dispatch
,
objId
}
=
this
.
props
;
const
{
objId
}
=
this
.
props
;
const
{
x
,
y
,
z
,
infos
,
XxX
,
currentKey
,
groups
}
=
this
.
state
;
if
(
x
==
null
)
{
...
...
one_stop_public/DetailForAudit/DetailSplit.js
浏览文件 @
ba1a5ebc
...
...
@@ -49,6 +49,8 @@ import {
}
from
'@/webPublic/one_stop_public/utils/queryConfig'
;
import
{
getIsGui_Jian
,
isJSON
}
from
'@/webPublic/zyd_public/utils/utils'
;
import
HistoryFormList
from
'@/webPublic/one_stop_public/DetailForAudit/HistoryFormList'
;
import
{
getServicesNomal
,
getUaaServicesNomal
}
from
'../Services/services'
;
import
{
getAllApi
,
getDetailsApi
,
queryUserSetApi
}
from
'../Services/apiConfig'
;
@
connect
()
class
DetailSplit
extends
Component
{
...
...
@@ -176,7 +178,7 @@ class DetailSplit extends Component {
* @function 默认请求
*/
getInit
=
(
handleUser
)
=>
{
const
{
dispatch
,
formPrepareData
}
=
this
.
props
;
const
{
formPrepareData
}
=
this
.
props
;
const
id
=
this
.
props
.
history
.
location
.
state
&&
this
.
props
.
history
.
location
.
state
.
id
;
const
code
=
this
.
props
.
history
.
location
.
state
&&
this
.
props
.
history
.
location
.
state
.
code
;
const
queryId
=
this
.
props
.
history
.
location
.
query
&&
this
.
props
.
history
.
location
.
query
.
id
;
...
...
@@ -232,21 +234,17 @@ class DetailSplit extends Component {
},
()
=>
{
if
(
val
.
isSecond
)
{
this
.
props
.
dispatch
({
type
:
'urge/GetMyBtn'
,
payload
:
{},
callback
:
(
arr
)
=>
{
this
.
setState
(
{
btnList
:
arr
,
radiovalue
:
val
.
formLevelId
?
val
.
formLevelId
:
arr
[
arr
.
length
-
1
].
id
,
},
()
=>
{
// this.giveMessageTop();
},
);
},
});
getUaaServicesNomal
(
getAllApi
,
{}).
then
(
arr
=>
{
this
.
setState
(
{
btnList
:
arr
,
radiovalue
:
val
.
formLevelId
?
val
.
formLevelId
:
arr
[
arr
.
length
-
1
].
id
,
},
()
=>
{
// this.giveMessageTop();
},
);
})
}
else
{
// this.giveMessageTop();
}
...
...
@@ -255,41 +253,32 @@ class DetailSplit extends Component {
});
}
}
dispatch
({
type
:
'emailorphone/GetLogo'
,
payload
:
{
configKeys
:
[
'isCloseUserDetail'
,
'isCloseFlowPath'
,
'isAllPrint'
,
'closeAutoSign'
],
},
callback
:
(
val
)
=>
{
const
closeAutoSign
=
!!
(
val
[
3
]
&&
val
[
3
].
configValue
===
'true'
);
this
.
setState
({
isCloseUserDetail
:
!!
(
val
[
0
]
&&
val
[
0
].
configValue
===
'true'
),
isAllPrint
:
!!
(
val
[
2
]
&&
val
[
2
].
configValue
===
'true'
),
closeAutoSign
,
});
if
(
!
closeAutoSign
)
{
/**
* 获取设置的数据
*/
this
.
props
.
dispatch
({
type
:
'UserSetCenterApi/queryUserSet'
,
payload
:
{},
callback
:
(
val
)
=>
{
this
.
setState
({
setData
:
val
,
});
},
getUaaServicesNomal
(
getDetailsApi
,
{
configKeys
:
[
'isCloseUserDetail'
,
'isCloseFlowPath'
,
'isAllPrint'
,
'closeAutoSign'
],
}).
then
(
val
=>
{
const
closeAutoSign
=
!!
(
val
[
3
]
&&
val
[
3
].
configValue
===
'true'
);
this
.
setState
({
isCloseUserDetail
:
!!
(
val
[
0
]
&&
val
[
0
].
configValue
===
'true'
),
isAllPrint
:
!!
(
val
[
2
]
&&
val
[
2
].
configValue
===
'true'
),
closeAutoSign
,
});
if
(
!
closeAutoSign
)
{
/**
* 获取设置的数据
*/
getServicesNomal
(
queryUserSetApi
,
{}).
then
(
val
=>
{
this
.
setState
({
setData
:
val
,
});
}
});
}
if
(
val
[
1
]?.
configValue
)
{
sessionStorage
.
setItem
(
'isCloseFlowPath'
,
val
[
1
]?.
configValue
===
'true'
?
JSON
.
stringify
(
true
)
:
JSON
.
stringify
(
false
),
);
}
},
if
(
val
[
1
]?.
configValue
)
{
sessionStorage
.
setItem
(
'isCloseFlowPath'
,
val
[
1
]?.
configValue
===
'true'
?
JSON
.
stringify
(
true
)
:
JSON
.
stringify
(
false
),
);
}
});
if
(
getToken
())
{
const
user
=
localStorage
.
getItem
(
'user'
);
...
...
one_stop_public/DetailForAudit/components/Countersign/index.jsx
浏览文件 @
ba1a5ebc
...
...
@@ -6,6 +6,8 @@ import { Modal, Input, Table, Row, Col, Tooltip, Spin, Tag } from 'antd';
import
styles
from
'./style.less'
;
import
{
openToast
}
from
'../Notification'
;
import
{
connect
}
from
'dva'
;
import
{
getUaaServicesNomal
}
from
'../../../Services/services'
;
import
{
addSignsApi
}
from
'../../../Services/apiConfig'
;
const
{
Search
}
=
Input
;
...
...
@@ -126,13 +128,6 @@ export default class Countersign extends Component {
});
};
getInit
=
async
()
=>
{
const
{
dispatch
,
data
:
{
addSignSql
,
id
,
},
}
=
this
.
props
;
// 用户名列表
this
.
getData
();
await
this
.
setState
({
...
...
@@ -166,7 +161,6 @@ export default class Countersign extends Component {
};
userPaginationChange
=
value
=>
{
const
{
dispatch
}
=
this
.
props
;
const
{
realname
,
username
,
...
...
@@ -183,7 +177,6 @@ export default class Countersign extends Component {
* @param { string } value 用户输入值
*/
searchNameChange
=
value
=>
{
const
{
dispatch
}
=
this
.
props
;
this
.
getData
({
realname
:
value
,
pageNo
:
1
,
...
...
@@ -206,7 +199,6 @@ export default class Countersign extends Component {
* @param { stirng } value 用户输入值
*/
serachStuNoChange
=
value
=>
{
const
{
dispatch
}
=
this
.
props
;
this
.
setState
({
username
:
value
,
});
...
...
@@ -234,7 +226,6 @@ export default class Countersign extends Component {
handleOk
=
e
=>
{
const
{
selectUserData
}
=
this
.
state
;
const
{
dispatch
}
=
this
.
props
;
let
ary
=
[];
selectUserData
.
map
(
item
=>
{
ary
.
push
(
item
.
id
);
...
...
@@ -248,21 +239,32 @@ export default class Countersign extends Component {
btnLoading
:
true
,
},
()
=>
{
dispatch
({
type
:
'countersign/countersignHandle'
,
payload
:
{
taskId
:
this
.
props
.
taskId
,
userIds
:
ary
,
},
callback
:
()
=>
{
openToast
(
'success'
,
'加签成功'
);
getUaaServicesNomal
(
addSignsApi
,
{
taskId
:
this
.
props
.
taskId
,
userIds
:
ary
,
}).
then
(()
=>
{
openToast
(
'success'
,
'加签成功'
);
this
.
props
.
getInit
();
this
.
setState
({
visible
:
false
,
btnLoading
:
false
,
});
},
});
// dispatch({
// type: 'countersign/countersignHandle',
// payload: {
// taskId: this.props.taskId,
// userIds: ary,
// },
// callback: () => {
// openToast('success', '加签成功');
// this.props.getInit();
// this.setState({
// visible: false,
// btnLoading: false,
// });
// },
// });
},
);
};
...
...
one_stop_public/DetailForAudit/components/FlowExamineModal/Image.js
浏览文件 @
ba1a5ebc
...
...
@@ -3,6 +3,8 @@ import Loading from '../loadThree';
import
{
Slider
,
Row
,
Col
}
from
'antd'
;
import
{
connect
}
from
'dva'
;
import
classNames
from
'classnames/bind'
;
import
{
getUaaServicesNomal
}
from
'../../../Services/services'
;
import
{
getDetailsApi
}
from
'../../../Services/apiConfig'
;
const
names
=
classNames
.
bind
(
require
(
'./style.less'
));
...
...
@@ -73,17 +75,13 @@ export default class PortalFlowExamineModalImage extends React.Component {
});
},
});
this
.
props
.
dispatch
({
// 获取配置信息
type
:
'emailorphone/GetLogo'
,
payload
:
{
configKeys
:
'IsOldFlow'
,
},
callback
:
val
=>
{
this
.
setState
({
configValue
:
val
[
0
].
configValue
==
'true'
,
});
},
// 获取配置信息
getUaaServicesNomal
(
getDetailsApi
,
{
configKeys
:
'IsOldFlow'
,
}).
then
(
val
=>
{
this
.
setState
({
configValue
:
val
[
0
].
configValue
==
'true'
,
});
});
};
...
...
one_stop_public/DetailForAudit/components/trunToModel/index.jsx
浏览文件 @
ba1a5ebc
...
...
@@ -15,6 +15,8 @@ import Recycle from './recycle';
import
styles
from
'./style.less'
;
import
{
confirm
,
openToast
}
from
'../Notification'
;
import
{
connect
}
from
'dva'
;
import
{
getUaaServicesNomal
}
from
'../../../Services/services'
;
import
{
refuseProcessApi
,
resetProcessApi
,
turnsProcessApi
}
from
'../../../Services/apiConfig'
;
@
connect
()
export
default
class
TurnToModel
extends
Component
{
constructor
(
props
){
...
...
@@ -55,39 +57,31 @@ export default class TurnToModel extends Component {
if
(
status
===
'转办'
){
// 发起转办提交处理
const
{
user
}
=
this
.
state
if
(
user
){
dispatch
({
type
:
'trunTo/turnsProcess'
,
payload
:
{
taskIds
:[
value
.
taskId
],
reason
,
turnsUserCode
:
user
.
stuNo
},
callback
:
(
val
)
=>
{
openToast
(
'success'
,
'成功'
,
'当前流程已成功移交'
)
this
.
props
.
init
()
this
.
setState
({
loading
:
false
})
}
getUaaServicesNomal
(
turnsProcessApi
,
{
taskIds
:[
value
.
taskId
],
reason
,
turnsUserCode
:
user
.
stuNo
}).
then
(()
=>
{
openToast
(
'success'
,
'成功'
,
'当前流程已成功移交'
)
this
.
props
.
init
()
this
.
setState
({
loading
:
false
})
})
}
else
{
openToast
(
'info'
,
'错误'
,
'请选择移交人员'
)
}
}
else
if
(
status
===
'回退'
)
{
// 发起回退提交处理
dispatch
({
type
:
'trunTo/refuseProcess'
,
payload
:
{
taskIds
:[
value
.
taskId
],
reason
},
callback
:
(
val
)
=>
{
openToast
(
'success'
,
'回退'
,
'当前流程已成功回退'
)
this
.
props
.
init
()
this
.
setState
({
loading
:
false
})
}
getUaaServicesNomal
(
refuseProcessApi
,
{
taskIds
:[
value
.
taskId
],
reason
}).
then
(()
=>
{
openToast
(
'success'
,
'回退'
,
'当前流程已成功回退'
)
this
.
props
.
init
()
this
.
setState
({
loading
:
false
})
});
}
else
{
console
.
log
(
'缺乏匹配字段提交方法'
)
}
...
...
@@ -96,16 +90,12 @@ export default class TurnToModel extends Component {
recallConfim
=
()
=>
{
const
{
status
,
dispatch
,
value
}
=
this
.
props
confirm
(
'撤回'
,
'是否撤回当前转办流程'
,()
=>
{
dispatch
({
type
:
'trunTo/resetProcess'
,
payload
:{
taskIds
:[
value
.
taskId
],
},
callback
:(
val
)
=>
{
openToast
(
'success'
,
'成功'
,
'该转办流程已成功撤回'
)
this
.
props
.
init
()
}
})
getUaaServicesNomal
(
resetProcessApi
,
{
taskIds
:[
value
.
taskId
],
}).
then
(()
=>
{
openToast
(
'success'
,
'成功'
,
'该转办流程已成功撤回'
)
this
.
props
.
init
()
});
this
.
props
.
handleCancel
()
},()
=>
{
this
.
props
.
handleCancel
()
...
...
one_stop_public/DetailForAudit/components/trunToModel/recycle/index.jsx
浏览文件 @
ba1a5ebc
...
...
@@ -8,6 +8,8 @@ import React, { Component } from 'react'
import
styles
from
'../style.less'
;
import
{
Row
,
Col
,
Input
,
Spin
}
from
'antd'
;
import
{
connect
}
from
'dva'
;
import
{
getUaaServicesNomal
}
from
'../../../../Services/services'
;
import
{
getListApi
}
from
'../../../../Services/services'
;
const
{
TextArea
}
=
Input
;
@
connect
()
export
default
class
index
extends
Component
{
...
...
@@ -24,18 +26,14 @@ export default class index extends Component {
this
.
setState
({
isLoading
:
true
})
await
dispatch
({
type
:
'trunTo/detailProcess'
,
payload
:
{
taskId
:
value
.
taskId
,
},
callback
:
(
val
)
=>
{
this
.
setState
({
data
:
Array
.
isArray
(
val
)
&&
val
?.
length
>
0
?
val
[
val
.
length
-
1
]:
''
,
isLoading
:
false
,
})
}
})
await
getUaaServicesNomal
(
getListApi
,
{
taskId
:
value
.
taskId
,
}).
then
(
val
=>
{
this
.
setState
({
data
:
Array
.
isArray
(
val
)
&&
val
?.
length
>
0
?
val
[
val
.
length
-
1
]:
''
,
isLoading
:
false
,
})
});
}
/**
* 多行文本输入
...
...
one_stop_public/DetailForAudit/components/trunToModel/trunTo/index.jsx
浏览文件 @
ba1a5ebc
...
...
@@ -9,6 +9,8 @@ import React, { Component } from 'react';
import
{
Input
,
Table
,
Row
,
Col
,
Tooltip
,
Spin
}
from
'antd'
;
import
styles
from
'../style.less'
;
import
{
connect
}
from
'dva'
;
import
{
getUaaServicesNomal
}
from
'../../../../Services/services'
;
import
{
getListApi
}
from
'../../../../Services/apiConfig'
;
const
{
Search
}
=
Input
;
const
{
TextArea
}
=
Input
;
@
connect
()
...
...
@@ -91,16 +93,12 @@ export default class index extends Component {
});
},
});
await
dispatch
({
type
:
'trunTo/detailProcess'
,
payload
:
{
taskId
:
value
.
taskId
,
},
callback
:
val
=>
{
this
.
setState
({
userData
:
Array
.
isArray
(
val
)
&&
val
?.
length
>
0
?
val
[
val
.
length
-
1
]
:
''
,
});
},
await
getUaaServicesNomal
(
getListApi
,
{
taskId
:
value
.
taskId
,
}).
then
(
val
=>
{
this
.
setState
({
userData
:
Array
.
isArray
(
val
)
&&
val
?.
length
>
0
?
val
[
val
.
length
-
1
]
:
''
,
});
});
await
this
.
setState
({
isLoading
:
false
,
...
...
one_stop_public/DetailForAudit/trunToDetail.jsx
浏览文件 @
ba1a5ebc
...
...
@@ -11,6 +11,8 @@ import SVG from './components/SVG';
import
{
Spin
,
Timeline
,
Icon
}
from
'antd'
;
import
{
connect
}
from
'dva'
;
import
moment
from
'moment'
;
import
{
getUaaServicesNomal
}
from
'../Services/services'
;
import
{
getListApi
}
from
'../Services/apiConfig'
;
@
connect
()
export
default
class
trunToDetail
extends
Component
{
constructor
(
props
){
...
...
@@ -35,18 +37,12 @@ export default class trunToDetail extends Component {
isLoading
:
true
,
})
// 发起请求获取数据
dispatch
({
type
:
'trunTo/detailProcess'
,
payload
:
{
taskId
:
item
.
id
,
},
callback
:
(
val
)
=>
{
this
.
setState
({
isLoading
:
false
,
trunToData
:
val
})
}
})
getUaaServicesNomal
(
getListApi
,
{
taskId
:
item
.
id
}).
then
(
val
=>
{
this
.
setState
({
isLoading
:
false
,
trunToData
:
val
});
});
}
else
{
// 为关闭状态清空数据
this
.
setState
({
trunToData
:
''
...
...
one_stop_public/ForZydApply/index.js
浏览文件 @
ba1a5ebc
...
...
@@ -9,10 +9,10 @@ import React from 'react';
import
classNames
from
'classnames/bind'
;
import
{
connect
}
from
'dva'
;
import
SponsorForm
from
'./SponsorForm/index'
;
import
{
isJSON
}
from
'@/webPublic/one_stop_public/copy'
;
import
{
getUrlInfo
}
from
'@/webPublic/one_stop_public/DetailForAudit/utils'
;
import
{
setToken
}
from
'@/webPublic/one_stop_public/utils/token'
;
import
{
Button
}
from
'antd'
;
import
{
getUaaServicesNomal
}
from
'../Services/services'
;
import
{
getAllApi
}
from
'../Services/apiConfig'
;
const
names
=
classNames
.
bind
(
require
(
'./style.less'
));
...
...
@@ -60,15 +60,11 @@ export default class IframeForApply extends React.Component {
}
componentDidMount
()
{
this
.
props
.
dispatch
({
type
:
'urge/GetMyBtn'
,
payload
:
{},
callback
:
val
=>
{
this
.
setState
({
btnList
:
val
,
value
:
val
[
val
.
length
-
1
].
id
,
});
},
getUaaServicesNomal
(
getAllApi
,
{}).
then
(
val
=>
{
this
.
setState
({
btnList
:
val
,
value
:
val
[
val
.
length
-
1
].
id
,
});
});
// document.getElementById('root').style.backgroundColor = '#fff';
}
...
...
one_stop_public/Services/apiConfig.js
0 → 100644
浏览文件 @
ba1a5ebc
// 请求地址
const
DataObjApi
=
'/DataObjApi'
;
const
DataColumnApi
=
"/DataColumnApi"
;
const
SqlManageEntityApi
=
'/SqlManageEntityApi'
;
const
UnifiedAppFormApi
=
'/UnifiedAppFormApi'
;
// formList model层相关api
export
const
getFormDataPageApi
=
DataObjApi
+
'/getFormDataPage'
export
const
getHeaderListApi
=
DataColumnApi
+
'/getHeaderList'
;
export
const
getBatchOptionsApi
=
DataColumnApi
+
'/getBatchOptions'
;
export
const
getFormDataApi
=
DataObjApi
+
'/getFormData'
;
export
const
deleteFormDataApi
=
DataObjApi
+
'/deleteFormData'
;
export
const
getDetailByCodeApi
=
UnifiedAppFormApi
+
'/getDetailByCode'
;
export
const
getDetailApi
=
DataObjApi
+
'/getDetail'
;
export
const
addFormDataApi
=
DataObjApi
+
'/addFormData'
;
export
const
getGroupListApi
=
DataColumnApi
+
'/getGroupList'
;
export
const
getFormDataListApi
=
DataObjApi
+
'/getFormDataList'
;
// DataColumn model层相关api
export
const
getSqlDataApi
=
DataColumnApi
+
'/getSqlData'
;
export
const
getSqlOptionsApi
=
DataColumnApi
+
'/getSqlOptions'
;
export
const
getSqlLabelsApi
=
DataColumnApi
+
'/getSqlLabels'
;
export
const
getLabelsApi
=
DataColumnApi
+
'/getLabels'
;
export
const
getOptionsApi
=
DataColumnApi
+
'/getOptions'
;
// SqlManageEntity model层相关api
export
const
findApi
=
SqlManageEntityApi
+
'/find'
// DataObj model层相关api
export
const
getExportInfoApi
=
DataObjApi
+
'/getExportInfo'
export
const
importExecuteApi
=
DataObjApi
+
'/importExecute'
export
const
importAnalyseApi
=
DataObjApi
+
'/importAnalyse'
export
const
importDataQueryApi
=
DataObjApi
+
'/importDataQuery'
export
const
importProcessApi
=
DataObjApi
+
'/importProcess'
export
const
getStatisticsApi
=
DataObjApi
+
'/getStatistics'
export
const
findByCodeApi
=
DataObjApi
+
'/findByCode'
;
// countersign model层相关api
export
const
addSignsApi
=
UnifiedAppFormApi
+
"/addSigns"
// emailorphone model层相关api
export
const
getDetailsApi
=
'/ConfigApi/getDetails'
// UserSetCenterApi model层相关api
export
const
queryUserSetApi
=
'/UserSetCenterApi/queryUserSet'
// trunTo model层相关api
export
const
turnsProcessApi
=
'/ActCommentApi/turnsProcess'
export
const
refuseProcessApi
=
'/ActCommentApi/refuseProcess'
export
const
resetProcessApi
=
'/ActCommentApi/resetProcess'
export
const
getListApi
=
'/ActCommentApi/getList'
// urge model层相关api
export
const
getAllApi
=
'/UnifiedAppFormLevelApi/getAll'
\ No newline at end of file
one_stop_public/Services/services.js
0 → 100644
浏览文件 @
ba1a5ebc
import
{
apiRequest
,
uaaRequest
}
from
'../utils/request'
;
import
{
importExecuteApi
,
getFormDataPageApi
}
from
'./apiConfig'
// apiRequest
export
const
getServicesNomal
=
(
apiAddress
,
params
)
=>
{
return
apiRequest
(
apiAddress
,
params
);
};
// uaaRequest
export
const
getUaaServicesNomal
=
(
apiAddress
,
params
)
=>
{
return
uaaRequest
(
apiAddress
,
params
);
};
export
const
getFormDataPage
=
(
params
)
=>
{
return
apiRequest
(
getFormDataPageApi
,
params
).
then
((
response
)
=>
{
if
(
response
)
{
return
{
list
:
response
.
rows
,
pagination
:
{
current
:
response
.
pageNo
,
pageSize
:
response
.
pageSize
,
total
:
response
.
total
,
},
};
}
});
};
export
const
importExecute
=
(
params
)
=>
{
return
apiRequest
(
importExecuteApi
,
{
...
params
,
customErrMsg
:
'导入的文件中可能存在字段不一致、字段类型不匹配、唯一性字段冲突,请检查或联系系统管理员'
,
// 自定义errMsg
});
};
one_stop_public/libs/formList/TreeList.js
浏览文件 @
ba1a5ebc
差异被折叠。
点击展开。
one_stop_public/libs/formList/edit.js
浏览文件 @
ba1a5ebc
import
React
,
{
Fragment
}
from
'react'
;
import
{
Button
,
Card
,
Col
,
DatePicker
,
Form
,
Input
,
InputNumber
,
message
,
Row
}
from
'antd'
;
import
React
from
'react'
;
import
{
Col
,
Form
,
message
,
Row
}
from
'antd'
;
import
{
connect
}
from
'dva'
;
import
PageHeaderWrapper
from
'./PageHeaderWrapper'
;
import
router
from
'umi/router'
;
...
...
@@ -7,6 +7,13 @@ import { getFormArrayConfig } from './config/index';
import
FormArray
from
'../../App/ButtonDiy/FormArray'
;
import
ButtonDiy
from
'../../App/ButtonDiy/ButtonDiy'
;
import
Shell
from
'./Shell'
;
import
{
getServicesNomal
}
from
'../../Services/services'
;
import
{
getBatchOptionsApi
,
getFormDataApi
,
getHeaderListApi
,
addFormDataApi
,
}
from
'../../Services/apiConfig'
;
@
connect
(({
formEdit
,
formList
,
loading
})
=>
({
formEdit
,
...
...
@@ -29,50 +36,37 @@ class FormEdit extends React.Component {
//渲染值
componentDidMount
()
{
const
{
dispatch
}
=
this
.
props
;
const
{
objId
,
recordKey
,
recordId
}
=
this
.
state
;
dispatch
({
type
:
'formList/getHead'
,
payload
:
{
dataObjId
:
objId
},
callback
:
(
dates
)
=>
{
if
(
dates
)
{
this
.
state
.
formItem
=
dates
;
const
refIds
=
[];
for
(
let
t
in
dates
)
{
if
(
dates
[
t
].
referenceObjId
!=
null
&&
this
.
state
.
options
[
this
.
state
.
formItem
[
t
].
id
+
''
]
==
null
)
{
refIds
.
push
(
dates
[
t
].
id
);
}
getServicesNomal
(
getHeaderListApi
,
{
dataObjId
:
objId
}).
then
(
dates
=>
{
if
(
dates
)
{
this
.
state
.
formItem
=
dates
;
const
refIds
=
[];
for
(
let
t
in
dates
)
{
if
(
dates
[
t
].
referenceObjId
!=
null
&&
this
.
state
.
options
[
this
.
state
.
formItem
[
t
].
id
+
''
]
==
null
)
{
refIds
.
push
(
dates
[
t
].
id
);
}
}
if
(
refIds
.
length
>
0
)
{
dispatch
({
type
:
'formList/getBatchOptions'
,
payload
:
{
ids
:
refIds
},
callback
:
(
options
)
=>
{
this
.
setState
({
options
});
},
});
}
if
(
refIds
.
length
>
0
)
{
getServicesNomal
(
getBatchOptionsApi
,
{
ids
:
refIds
}).
then
(
options
=>
{
this
.
setState
({
options
});
});
}
}
,
}
});
//渲染表单字段
if
(
recordId
!=
null
)
{
dispatch
({
type
:
'formList/getDetail'
,
payload
:
{
dataObjId
:
objId
,
key
:
recordKey
,
value
:
recordId
,
},
callback
:
(
date
)
=>
{
if
(
date
)
{
this
.
state
.
formData
=
date
;
}
},
getServicesNomal
(
getFormDataApi
,
{
dataObjId
:
objId
,
key
:
recordKey
,
value
:
recordId
,
}).
then
(
date
=>
{
if
(
date
)
{
this
.
state
.
formData
=
date
;
}
});
}
}
...
...
@@ -85,13 +79,9 @@ class FormEdit extends React.Component {
isAdd
,
isSelf
:
true
,
};
this
.
props
.
dispatch
({
type
:
'formList/add'
,
payload
,
callback
:
()
=>
{
message
.
success
(
'操作成功'
);
router
.
goBack
();
},
getServicesNomal
(
addFormDataApi
,
payload
).
then
(()
=>
{
message
.
success
(
'操作成功'
);
router
.
goBack
();
});
};
...
...
one_stop_public/libs/formList/index.js
浏览文件 @
ba1a5ebc
差异被折叠。
点击展开。
one_stop_public/tableCompon/index.jsx
浏览文件 @
ba1a5ebc
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论