Compare commits
315 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
6ea0973298 | |
|
|
69343a6193 | |
|
|
0c235113f9 | |
|
|
8f9a3f1422 | |
|
|
cf472e7a26 | |
|
|
6e5eec06fe | |
|
|
a710334a37 | |
|
|
8312b214ff | |
|
|
9e6181d5f7 | |
|
|
403d040956 | |
|
|
a7a0de166e | |
|
|
26f19c3283 | |
|
|
1a87a3f118 | |
|
|
67947182fd | |
|
|
de6a309f42 | |
|
|
7c6e62c28f | |
|
|
35b783ca72 | |
|
|
56cb6a800a | |
|
|
72e58d764c | |
|
|
37e6757110 | |
|
|
72a3d27b16 | |
|
|
0e9eb6db03 | |
|
|
da97064838 | |
|
|
957c4d4774 | |
|
|
e37bc680bd | |
|
|
b15144beef | |
|
|
34202c6758 | |
|
|
bc38036b33 | |
|
|
638e110797 | |
|
|
00398d6930 | |
|
|
744174e49c | |
|
|
8e82c0e781 | |
|
|
0fac5a03a4 | |
|
|
3eebf5cb54 | |
|
|
089cab455f | |
|
|
a2066e8d68 | |
|
|
b71b401d7a | |
|
|
95735084d9 | |
|
|
fc1184c64d | |
|
|
5baac661e2 | |
|
|
07cc8573be | |
|
|
b15b08433f | |
|
|
8df95c873e | |
|
|
d98f86be17 | |
|
|
a88de27c35 | |
|
|
bd5d3b1704 | |
|
|
9560631638 | |
|
|
7dfc190df6 | |
|
|
a9bdbe3d2d | |
|
|
a3950f3343 | |
|
|
80b9c2f288 | |
|
|
54305211d4 | |
|
|
39da6bcd15 | |
|
|
72263eb5f7 | |
|
|
faf2782dba | |
|
|
1d1d974e8d | |
|
|
69620d54c4 | |
|
|
a709470921 | |
|
|
17063a3f10 | |
|
|
68c07ee8b9 | |
|
|
458606d1a4 | |
|
|
27729bf7c0 | |
|
|
55b503dc88 | |
|
|
04403d5d26 | |
|
|
2a79641bc8 | |
|
|
267e71e9ef | |
|
|
814cf971e0 | |
|
|
d48b404468 | |
|
|
28cbe4d7e1 | |
|
|
5cce357d78 | |
|
|
82b09416bb | |
|
|
aa77770e09 | |
|
|
9eeadb416e | |
|
|
6a6587bea7 | |
|
|
4318dc9830 | |
|
|
17bd109269 | |
|
|
25dd4020ca | |
|
|
1cdf8f6487 | |
|
|
bd5db8d4c0 | |
|
|
5b091c5e82 | |
|
|
3dbcad0bd0 | |
|
|
6b3f35374c | |
|
|
daea5ba97b | |
|
|
1fd6a4c644 | |
|
|
62e8ef22c1 | |
|
|
ddb59fa9f9 | |
|
|
71bc20765d | |
|
|
21002e1e7d | |
|
|
c4e93a30c7 | |
|
|
1a1441ac95 | |
|
|
967453d11b | |
|
|
3b4592adb5 | |
|
|
69441eca6c | |
|
|
9a3164e386 | |
|
|
bfc78bee60 | |
|
|
f2e3c11733 | |
|
|
8931a06127 | |
|
|
710293d536 | |
|
|
f4f27c8ad0 | |
|
|
a9282a27e1 | |
|
|
748aa1f740 | |
|
|
238ccbabf8 | |
|
|
9a9c243ec7 | |
|
|
f804b45dfa | |
|
|
291015e859 | |
|
|
4d79c64bcd | |
|
|
f4b11171b1 | |
|
|
ebf82547d2 | |
|
|
c9b6f9d701 | |
|
|
f9cb61f140 | |
|
|
8ca38016a7 | |
|
|
1e450a2c3c | |
|
|
edd7e4c2a6 | |
|
|
f3cfd3493f | |
|
|
e498634292 | |
|
|
7d73c055f0 | |
|
|
89587a6b1a | |
|
|
1db5570f3b | |
|
|
d651883081 | |
|
|
444a3576c0 | |
|
|
01dc126302 | |
|
|
29297b5c56 | |
|
|
0d3d6c79f0 | |
|
|
173de38912 | |
|
|
dfda1222c4 | |
|
|
c044172c8a | |
|
|
0b5f70a080 | |
|
|
b63006a7bc | |
|
|
e8c4068085 | |
|
|
f79a0a3ef5 | |
|
|
57b165f6d8 | |
|
|
a7592b2777 | |
|
|
cbfed11819 | |
|
|
bf8b1fecc4 | |
|
|
fc9c510619 | |
|
|
8a44f31d64 | |
|
|
ac8f61cc15 | |
|
|
4394a1abcb | |
|
|
8db2ed84c6 | |
|
|
59a0564a67 | |
|
|
64cfbffaf0 | |
|
|
579900a9fc | |
|
|
a578e4e3ab | |
|
|
d8909f5145 | |
|
|
2128fcae7c | |
|
|
aa80d43966 | |
|
|
67ccf9cbba | |
|
|
87b2bf78f5 | |
|
|
766df1a634 | |
|
|
210e79a145 | |
|
|
07d2ff9832 | |
|
|
7ba0a51fd4 | |
|
|
95afc993f0 | |
|
|
1d9ac506e8 | |
|
|
74f7329524 | |
|
|
919b778398 | |
|
|
5830d46577 | |
|
|
68af2808dd | |
|
|
f619a3cce0 | |
|
|
5849a22514 | |
|
|
5b24ef6e9f | |
|
|
9263c27fd3 | |
|
|
5977ad0d08 | |
|
|
d3ca08680f | |
|
|
cb010edefa | |
|
|
58b440ad47 | |
|
|
b5d1e00b91 | |
|
|
72ac0c5afe | |
|
|
234ca66f99 | |
|
|
39e60335ec | |
|
|
00fad37019 | |
|
|
38ceda8153 | |
|
|
db5101250e | |
|
|
cb020c5f66 | |
|
|
b5334c6830 | |
|
|
c52834678b | |
|
|
6e152af3a2 | |
|
|
dd023861d7 | |
|
|
d5e13c6057 | |
|
|
ba2d6f7f8b | |
|
|
0f4c438bbf | |
|
|
6609f8f886 | |
|
|
98bb6e3ae4 | |
|
|
07dec3350f | |
|
|
4630958a14 | |
|
|
c52d10323a | |
|
|
c51824695f | |
|
|
58b118ebe3 | |
|
|
b9d63ec406 | |
|
|
82b54b8bde | |
|
|
8de8feb216 | |
|
|
09d7776a3e | |
|
|
0c5e3cae8f | |
|
|
ebf1cb58d9 | |
|
|
fda7c7c0d0 | |
|
|
4878b6be1d | |
|
|
c81ff2bca5 | |
|
|
4102c1e135 | |
|
|
9fa6b9da32 | |
|
|
32a0c9cbd2 | |
|
|
74d5522239 | |
|
|
5bd1d12a76 | |
|
|
ed990bcfb2 | |
|
|
1dce448427 | |
|
|
860dd0212c | |
|
|
19e1d07e3c | |
|
|
2d1c756985 | |
|
|
5be0bb68e6 | |
|
|
a633a3a28c | |
|
|
8f0306b95f | |
|
|
2b1093ca1d | |
|
|
34d7ab154a | |
|
|
88dd830ce3 | |
|
|
1a35ec1bd5 | |
|
|
aa499d7855 | |
|
|
5bfb129380 | |
|
|
938e17aaad | |
|
|
6248c7d184 | |
|
|
74879c046d | |
|
|
d724566384 | |
|
|
faf37dba1d | |
|
|
88bf00cc8d | |
|
|
f50c8f2bde | |
|
|
cbaea8f2da | |
|
|
76c5ceed96 | |
|
|
14b7080a28 | |
|
|
dbc6134ccf | |
|
|
76051adc16 | |
|
|
d3f49f9be6 | |
|
|
ce77261397 | |
|
|
79916567d5 | |
|
|
58b99e41ff | |
|
|
84b6f732c6 | |
|
|
cca368c495 | |
|
|
772f0b66ee | |
|
|
3b49f1e92e | |
|
|
2b34890e6d | |
|
|
204613099a | |
|
|
f3877c843f | |
|
|
aefcb9772b | |
|
|
f5afc77283 | |
|
|
e2f8c060a6 | |
|
|
b8f7c82534 | |
|
|
064c40d299 | |
|
|
95b756b71d | |
|
|
24d9f3bc9e | |
|
|
5c2268f4f9 | |
|
|
74e4f4ca88 | |
|
|
211c0e6634 | |
|
|
3591986440 | |
|
|
88b8e435df | |
|
|
34107bee55 | |
|
|
4668fb43e1 | |
|
|
27c8a11576 | |
|
|
c195435037 | |
|
|
ed3a11e7b6 | |
|
|
35317e4b20 | |
|
|
3c8f0cbfaf | |
|
|
2a8f30575b | |
|
|
bb8920e3a0 | |
|
|
539a7e7ddd | |
|
|
5f478dcbfd | |
|
|
5172007efe | |
|
|
786bac5aa1 | |
|
|
ced190d417 | |
|
|
0d449516e2 | |
|
|
a907ebf6dd | |
|
|
395fdad5ac | |
|
|
502f084452 | |
|
|
4c2ff27e46 | |
|
|
d2305558be | |
|
|
de7e0d50c6 | |
|
|
2a0a1eb81d | |
|
|
669f92dbf2 | |
|
|
6dafc9b020 | |
|
|
d52cf8170e | |
|
|
fdc7db75d1 | |
|
|
337f8f8dff | |
|
|
6e7e5fa991 | |
|
|
8eb704e23d | |
|
|
aba9ee3840 | |
|
|
44715650db | |
|
|
e7e1410cef | |
|
|
b96ffa4205 | |
|
|
15e223269d | |
|
|
db16ec323a | |
|
|
c3d7a9db71 | |
|
|
a89634f0df | |
|
|
507ff9df6c | |
|
|
eff03741b2 | |
|
|
b073384fc7 | |
|
|
98ae042c26 | |
|
|
821c46bb9d | |
|
|
24f3350420 | |
|
|
81f9b5ca2f | |
|
|
9303fe3f3c | |
|
|
e1cc281cff | |
|
|
e0432a21c5 | |
|
|
dd9646213f | |
|
|
89aab7a742 | |
|
|
596816ebb2 | |
|
|
1bf9f9aa81 | |
|
|
aaa31935b3 | |
|
|
5bc2f44073 | |
|
|
bb7bd102ec | |
|
|
774bd7203f | |
|
|
559ed2cbee | |
|
|
9e8d36bbc4 | |
|
|
2e167f4099 | |
|
|
811c9da4d1 | |
|
|
67304df567 | |
|
|
8c6d1df37c | |
|
|
fb6ae67485 | |
|
|
b7c99835da | |
|
|
a2fa127bfe |
|
|
@ -1 +1,4 @@
|
||||||
node_modules
|
node_modules
|
||||||
|
.idea
|
||||||
|
.vscode
|
||||||
|
|
||||||
|
|
|
||||||
41
README.md
41
README.md
|
|
@ -8,35 +8,16 @@
|
||||||
泛微前端脚手架--组织架构图
|
泛微前端脚手架--组织架构图
|
||||||
|
|
||||||
|
|
||||||
#### 软件架构
|
#### 版本1.0 已封版
|
||||||
软件架构说明
|
|
||||||
|
该版本组织分为2套数据 采用单向同步的方式
|
||||||
|
|
||||||
|
#### 功能介绍
|
||||||
|
|
||||||
|
组织架构图
|
||||||
|
组织分权
|
||||||
|
人员卡片等自定义功能
|
||||||
|
|
||||||
|
|
||||||
#### 安装教程
|
#### 迭代计划
|
||||||
|
由于当前版本两套数据不好管理 下版计划将数据源统一换成ecology数据源
|
||||||
1. xxxx
|
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### 使用说明
|
|
||||||
|
|
||||||
1. xxxx
|
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### 参与贡献
|
|
||||||
|
|
||||||
1. Fork 本仓库
|
|
||||||
2. 新建 Feat_xxx 分支
|
|
||||||
3. 提交代码
|
|
||||||
4. 新建 Pull Request
|
|
||||||
|
|
||||||
|
|
||||||
#### 特技
|
|
||||||
|
|
||||||
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
|
|
||||||
2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com)
|
|
||||||
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目
|
|
||||||
4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目
|
|
||||||
5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
|
|
||||||
6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
|
||||||
|
|
@ -5,12 +5,15 @@
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"baidu-template-pro": "^1.0.0",
|
||||||
"dom-to-image": "^2.6.0",
|
"dom-to-image": "^2.6.0",
|
||||||
"file-saver": "^2.0.5",
|
"file-saver": "^2.0.5",
|
||||||
|
"lodash": "^4.17.21",
|
||||||
"orgchart": "^3.1.1",
|
"orgchart": "^3.1.1",
|
||||||
"rc-org-chart": "^1.0.6",
|
"rc-org-chart": "^1.0.6",
|
||||||
"react-org-tree": "^1.0.0",
|
"react-org-tree": "^1.0.0",
|
||||||
"react-orgchart": "^1.0.5",
|
"react-orgchart": "^1.0.5",
|
||||||
|
"react-router-dom": "5.1",
|
||||||
"yargs": "^15.0.2"
|
"yargs": "^15.0.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -300,6 +303,11 @@
|
||||||
"resolved": "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
|
"resolved": "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
|
||||||
"integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg=="
|
"integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg=="
|
||||||
},
|
},
|
||||||
|
"node_modules/baidu-template-pro": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/baidu-template-pro/-/baidu-template-pro-1.0.0.tgz",
|
||||||
|
"integrity": "sha512-gnw6uvCn4CvZZ9d1Tu+a0B7BjQuNXvDcxsJk7bwxTpNutj6JFIxcy2sS0rB2/0/t9GwatoEIXd8HV0qkXpdRow=="
|
||||||
|
},
|
||||||
"node_modules/base64-arraybuffer": {
|
"node_modules/base64-arraybuffer": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmmirror.com/base64-arraybuffer/-/base64-arraybuffer-1.0.2.tgz",
|
"resolved": "https://registry.npmmirror.com/base64-arraybuffer/-/base64-arraybuffer-1.0.2.tgz",
|
||||||
|
|
@ -546,6 +554,22 @@
|
||||||
"loose-envify": "^1.0.0"
|
"loose-envify": "^1.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/dva/node_modules/react-router-dom": {
|
||||||
|
"version": "4.3.1",
|
||||||
|
"resolved": "https://registry.npmmirror.com/react-router-dom/-/react-router-dom-4.3.1.tgz",
|
||||||
|
"integrity": "sha512-c/MlywfxDdCp7EnB7YfPMOfMD3tOtIjrQlj/CKfNMBxdmpJP8xcz5P/UAFn3JbnQCNUxsHyVVqllF9LhgVyFCA==",
|
||||||
|
"dependencies": {
|
||||||
|
"history": "^4.7.2",
|
||||||
|
"invariant": "^2.2.4",
|
||||||
|
"loose-envify": "^1.3.1",
|
||||||
|
"prop-types": "^15.6.1",
|
||||||
|
"react-router": "^4.3.1",
|
||||||
|
"warning": "^4.0.1"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"react": ">=15"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/emoji-regex": {
|
"node_modules/emoji-regex": {
|
||||||
"version": "8.0.0",
|
"version": "8.0.0",
|
||||||
"resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-8.0.0.tgz",
|
"resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-8.0.0.tgz",
|
||||||
|
|
@ -854,6 +878,20 @@
|
||||||
"dom-walk": "^0.1.0"
|
"dom-walk": "^0.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/mini-create-react-context": {
|
||||||
|
"version": "0.3.3",
|
||||||
|
"resolved": "https://registry.npmmirror.com/mini-create-react-context/-/mini-create-react-context-0.3.3.tgz",
|
||||||
|
"integrity": "sha512-TtF6hZE59SGmS4U8529qB+jJFeW6asTLDIpPgvPLSCsooAwJS7QprHIFTqv9/Qh3NdLwQxFYgiHX5lqb6jqzPA==",
|
||||||
|
"deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.",
|
||||||
|
"dependencies": {
|
||||||
|
"@babel/runtime": "^7.12.1",
|
||||||
|
"tiny-warning": "^1.0.3"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"prop-types": "^15.0.0",
|
||||||
|
"react": "^0.14.0 || ^15.0.0 || ^16.0.0 || ^17.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/mini-store": {
|
"node_modules/mini-store": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmmirror.com/mini-store/-/mini-store-2.0.0.tgz",
|
"resolved": "https://registry.npmmirror.com/mini-store/-/mini-store-2.0.0.tgz",
|
||||||
|
|
@ -1623,16 +1661,37 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/react-router-dom": {
|
"node_modules/react-router-dom": {
|
||||||
"version": "4.3.1",
|
"version": "5.1.2",
|
||||||
"resolved": "https://registry.npmmirror.com/react-router-dom/-/react-router-dom-4.3.1.tgz",
|
"resolved": "https://registry.npmmirror.com/react-router-dom/-/react-router-dom-5.1.2.tgz",
|
||||||
"integrity": "sha512-c/MlywfxDdCp7EnB7YfPMOfMD3tOtIjrQlj/CKfNMBxdmpJP8xcz5P/UAFn3JbnQCNUxsHyVVqllF9LhgVyFCA==",
|
"integrity": "sha512-7BPHAaIwWpZS074UKaw1FjVdZBSVWEk8IuDXdB+OkLb8vd/WRQIpA4ag9WQk61aEfQs47wHyjWUoUGGZxpQXew==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"history": "^4.7.2",
|
"@babel/runtime": "^7.1.2",
|
||||||
"invariant": "^2.2.4",
|
"history": "^4.9.0",
|
||||||
"loose-envify": "^1.3.1",
|
"loose-envify": "^1.3.1",
|
||||||
"prop-types": "^15.6.1",
|
"prop-types": "^15.6.2",
|
||||||
"react-router": "^4.3.1",
|
"react-router": "5.1.2",
|
||||||
"warning": "^4.0.1"
|
"tiny-invariant": "^1.0.2",
|
||||||
|
"tiny-warning": "^1.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"react": ">=15"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/react-router-dom/node_modules/react-router": {
|
||||||
|
"version": "5.1.2",
|
||||||
|
"resolved": "https://registry.npmmirror.com/react-router/-/react-router-5.1.2.tgz",
|
||||||
|
"integrity": "sha512-yjEuMFy1ONK246B+rsa0cUam5OeAQ8pyclRDgpxuSCrAlJ1qN9uZ5IgyKC7gQg0w8OM50NXHEegPh/ks9YuR2A==",
|
||||||
|
"dependencies": {
|
||||||
|
"@babel/runtime": "^7.1.2",
|
||||||
|
"history": "^4.9.0",
|
||||||
|
"hoist-non-react-statics": "^3.1.0",
|
||||||
|
"loose-envify": "^1.3.1",
|
||||||
|
"mini-create-react-context": "^0.3.0",
|
||||||
|
"path-to-regexp": "^1.7.0",
|
||||||
|
"prop-types": "^15.6.2",
|
||||||
|
"react-is": "^16.6.0",
|
||||||
|
"tiny-invariant": "^1.0.2",
|
||||||
|
"tiny-warning": "^1.0.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"react": ">=15"
|
"react": ">=15"
|
||||||
|
|
@ -2212,6 +2271,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"baidu-template-pro": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/baidu-template-pro/-/baidu-template-pro-1.0.0.tgz",
|
||||||
|
"integrity": "sha512-gnw6uvCn4CvZZ9d1Tu+a0B7BjQuNXvDcxsJk7bwxTpNutj6JFIxcy2sS0rB2/0/t9GwatoEIXd8HV0qkXpdRow=="
|
||||||
|
},
|
||||||
"base64-arraybuffer": {
|
"base64-arraybuffer": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmmirror.com/base64-arraybuffer/-/base64-arraybuffer-1.0.2.tgz",
|
"resolved": "https://registry.npmmirror.com/base64-arraybuffer/-/base64-arraybuffer-1.0.2.tgz",
|
||||||
|
|
@ -2401,6 +2465,21 @@
|
||||||
"react-router-dom": "^4.1.2",
|
"react-router-dom": "^4.1.2",
|
||||||
"react-router-redux": "5.0.0-alpha.9",
|
"react-router-redux": "5.0.0-alpha.9",
|
||||||
"redux": "^3.7.2"
|
"redux": "^3.7.2"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"react-router-dom": {
|
||||||
|
"version": "4.3.1",
|
||||||
|
"resolved": "https://registry.npmmirror.com/react-router-dom/-/react-router-dom-4.3.1.tgz",
|
||||||
|
"integrity": "sha512-c/MlywfxDdCp7EnB7YfPMOfMD3tOtIjrQlj/CKfNMBxdmpJP8xcz5P/UAFn3JbnQCNUxsHyVVqllF9LhgVyFCA==",
|
||||||
|
"requires": {
|
||||||
|
"history": "^4.7.2",
|
||||||
|
"invariant": "^2.2.4",
|
||||||
|
"loose-envify": "^1.3.1",
|
||||||
|
"prop-types": "^15.6.1",
|
||||||
|
"react-router": "^4.3.1",
|
||||||
|
"warning": "^4.0.1"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dva-core": {
|
"dva-core": {
|
||||||
|
|
@ -2698,6 +2777,15 @@
|
||||||
"dom-walk": "^0.1.0"
|
"dom-walk": "^0.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"mini-create-react-context": {
|
||||||
|
"version": "0.3.3",
|
||||||
|
"resolved": "https://registry.npmmirror.com/mini-create-react-context/-/mini-create-react-context-0.3.3.tgz",
|
||||||
|
"integrity": "sha512-TtF6hZE59SGmS4U8529qB+jJFeW6asTLDIpPgvPLSCsooAwJS7QprHIFTqv9/Qh3NdLwQxFYgiHX5lqb6jqzPA==",
|
||||||
|
"requires": {
|
||||||
|
"@babel/runtime": "^7.12.1",
|
||||||
|
"tiny-warning": "^1.0.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
"mini-store": {
|
"mini-store": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmmirror.com/mini-store/-/mini-store-2.0.0.tgz",
|
"resolved": "https://registry.npmmirror.com/mini-store/-/mini-store-2.0.0.tgz",
|
||||||
|
|
@ -3399,16 +3487,36 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"react-router-dom": {
|
"react-router-dom": {
|
||||||
"version": "4.3.1",
|
"version": "5.1.2",
|
||||||
"resolved": "https://registry.npmmirror.com/react-router-dom/-/react-router-dom-4.3.1.tgz",
|
"resolved": "https://registry.npmmirror.com/react-router-dom/-/react-router-dom-5.1.2.tgz",
|
||||||
"integrity": "sha512-c/MlywfxDdCp7EnB7YfPMOfMD3tOtIjrQlj/CKfNMBxdmpJP8xcz5P/UAFn3JbnQCNUxsHyVVqllF9LhgVyFCA==",
|
"integrity": "sha512-7BPHAaIwWpZS074UKaw1FjVdZBSVWEk8IuDXdB+OkLb8vd/WRQIpA4ag9WQk61aEfQs47wHyjWUoUGGZxpQXew==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"history": "^4.7.2",
|
"@babel/runtime": "^7.1.2",
|
||||||
"invariant": "^2.2.4",
|
"history": "^4.9.0",
|
||||||
"loose-envify": "^1.3.1",
|
"loose-envify": "^1.3.1",
|
||||||
"prop-types": "^15.6.1",
|
"prop-types": "^15.6.2",
|
||||||
"react-router": "^4.3.1",
|
"react-router": "5.1.2",
|
||||||
"warning": "^4.0.1"
|
"tiny-invariant": "^1.0.2",
|
||||||
|
"tiny-warning": "^1.0.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"react-router": {
|
||||||
|
"version": "5.1.2",
|
||||||
|
"resolved": "https://registry.npmmirror.com/react-router/-/react-router-5.1.2.tgz",
|
||||||
|
"integrity": "sha512-yjEuMFy1ONK246B+rsa0cUam5OeAQ8pyclRDgpxuSCrAlJ1qN9uZ5IgyKC7gQg0w8OM50NXHEegPh/ks9YuR2A==",
|
||||||
|
"requires": {
|
||||||
|
"@babel/runtime": "^7.1.2",
|
||||||
|
"history": "^4.9.0",
|
||||||
|
"hoist-non-react-statics": "^3.1.0",
|
||||||
|
"loose-envify": "^1.3.1",
|
||||||
|
"mini-create-react-context": "^0.3.0",
|
||||||
|
"path-to-regexp": "^1.7.0",
|
||||||
|
"prop-types": "^15.6.2",
|
||||||
|
"react-is": "^16.6.0",
|
||||||
|
"tiny-invariant": "^1.0.2",
|
||||||
|
"tiny-warning": "^1.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"react-router-redux": {
|
"react-router-redux": {
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,14 @@
|
||||||
{
|
{
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"baidu-template-pro": "^1.0.0",
|
||||||
"dom-to-image": "^2.6.0",
|
"dom-to-image": "^2.6.0",
|
||||||
"file-saver": "^2.0.5",
|
"file-saver": "^2.0.5",
|
||||||
|
"lodash": "^4.17.21",
|
||||||
"orgchart": "^3.1.1",
|
"orgchart": "^3.1.1",
|
||||||
"rc-org-chart": "^1.0.6",
|
"rc-org-chart": "^1.0.6",
|
||||||
"react-org-tree": "^1.0.0",
|
"react-org-tree": "^1.0.0",
|
||||||
"react-orgchart": "^1.0.5",
|
"react-orgchart": "^1.0.5",
|
||||||
|
"react-router-dom": "5.1",
|
||||||
"yargs": "^15.0.2"
|
"yargs": "^15.0.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
import {WeaTools} from "ecCom";
|
||||||
|
|
||||||
|
//基本信息
|
||||||
|
export const getForm = (params={}) => WeaTools.callApi("/api/integration/mail/getALYMailBaseSetForm", "POST", params);
|
||||||
|
export const getOperate = (params={}) => WeaTools.callApi("/api/integration/mail/getALYMailOperation", "POST", params);
|
||||||
|
|
||||||
|
// 日志
|
||||||
|
export const getLogMenus = (params={}) => WeaTools.callApi("/api/integration/mail/getMailLogRightMenu", "POST", params);
|
||||||
|
export const getLogCondition = (params={}) => WeaTools.callApi("/api/integration/mail/getMailLogCondition ", "POST", params);
|
||||||
|
export const getLogDatas = (params={}) => WeaTools.callApi("/api/integration/mail/getMailLogList", "POST", params);
|
||||||
|
|
||||||
|
// 基础信息页面
|
||||||
|
export const getMailList = (params={}) => WeaTools.callApi("/api/integration/mail/getMailList ", "POST", params);
|
||||||
|
export const getMailListConditions = (params={}) => WeaTools.callApi("/api/integration/mail/getMailListConditions ", "POST", params);
|
||||||
|
export const getMailSaveOperation = (params={}) => WeaTools.callApi("/api/integration/mail/getMailSaveOperation", "POST", params);
|
||||||
|
export const getMailOperation = (params={}) => WeaTools.callApi("/api/integration/mail/getMailOperation", "POST", params);
|
||||||
|
export const getMailDeleteOperation = (params={}) => WeaTools.callApi("/api/integration/mail/getMailDeleteOperation", "POST", params);
|
||||||
|
// mailMasterId:
|
||||||
|
export const getMailEditSetForm = (params={}) => WeaTools.callApi("/api/integration/mail/getMailEditSetForm", "POST", params);
|
||||||
|
// mailType:1
|
||||||
|
export const getMailAddSetForm = (params={}) => WeaTools.callApi("/api/integration/mail/getMailAddSetForm", "POST", params);
|
||||||
|
// 切换下拉框
|
||||||
|
export const getMailSelectSetForm = (params={}) => WeaTools.callApi("/api/integration/mail/getMailSelectSetForm", "POST", params);
|
||||||
|
|
||||||
|
// 日志清理tab页
|
||||||
|
export const getLogSettingFields = params => WeaTools.callApi(`/api/integration/mail/getMailLogSetting`, 'POST', params);
|
||||||
|
export const saveLogSetting = params => WeaTools.callApi(`/api/integration/mail/getMailLogSave`, 'POST', params);
|
||||||
|
|
@ -0,0 +1,59 @@
|
||||||
|
import { WeaTools } from 'ecCom';
|
||||||
|
|
||||||
|
export const getBaseInfoForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/authenticationcenter/getBaseInfoForm', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getBaseInfoFormOperation = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/authenticationcenter/getBaseInfoFormOperation', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getRegisterAppList = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/authenticationcenter/getRegisterAppList', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getRegisterAppRightMenu = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/authenticationcenter/getRegisterAppRightMenu', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getRegisterAppEditForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/authenticationcenter/getRegisterAppEditForm', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getRegisterAppOperation = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/authenticationcenter/getRegisterAppOperation', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getRegisterAppDataMappingEditForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/authenticationcenter/getRegisterAppDataMappingEditForm', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getRegisterAppDataMappingImportForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/authenticationcenter/getRegisterAppDataMappingImportForm', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getRegisterAppDataMappingList = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/authenticationcenter/getRegisterAppDataMappingList', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getRegisterAppDataMappingRightMenu = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/authenticationcenter/getRegisterAppDataMappingRightMenu', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getRegisterAppDataMappingCondition = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/authenticationcenter/getRegisterAppDataMappingCondition', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getRegisterAppDataMappingOperation = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/authenticationcenter/getRegisterAppDataMappingOperation', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getRegisterAppLoginLogList = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/authenticationcenter/getRegisterAppLoginLogList', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getRegisterAppLoginLogCondition = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/authenticationcenter/getRegisterAppLoginLogCondition', 'POST', params);
|
||||||
|
};
|
||||||
|
export const checkUserMappingLoginIdUnique = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/authenticationcenter/checkUserMappingLoginIdUnique', 'POST', params);
|
||||||
|
};
|
||||||
|
export const checkUserMappingAppLoginIdUnique = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/authenticationcenter/checkUserMappingAppLoginIdUnique', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getRegisterAppShareList = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/authenticationcenter/getRegisterAppShareList', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getRegisterAppShareForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/authenticationcenter/getRegisterAppShareForm', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getRegisterAppCondition = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/authenticationcenter/getRegisterAppCondition', 'POST', params);
|
||||||
|
};
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
import { WeaTools } from 'ecCom';
|
||||||
|
|
||||||
|
export const getAuthenticationSourceList = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/authenticationsource/getAuthenticationSourceList', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getAuthenticationSourceRightMenu = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/authenticationsource/getAuthenticationSourceRightMenu', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getAuthenticationSourceCondition = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/authenticationsource/getAuthenticationSourceCondition', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getAuthenticationSourceForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/authenticationsource/getAuthenticationSourceForm', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getAuthenticationSourceOperation = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/authenticationsource/getAuthenticationSourceOperation', 'POST', params);
|
||||||
|
};
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
import { WeaTools } from 'ecCom';
|
||||||
|
|
||||||
|
// 保存
|
||||||
|
export const save = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/cas/save', 'POST', params);
|
||||||
|
};
|
||||||
|
|
||||||
|
// 删除
|
||||||
|
export const deleteAPI = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/cas/delete', 'POST', params);
|
||||||
|
};
|
||||||
|
|
||||||
|
// 获取新建表单
|
||||||
|
export const getForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/cas/getForm', 'POST', params);
|
||||||
|
};
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
import { WeaTools } from 'ecCom';
|
||||||
|
|
||||||
|
export const checkTableFieldValueUnique = params => WeaTools.callApi('/api/integration/common1/checkTableFieldValueUnique', 'POST', params);
|
||||||
|
export const checkCasIsDeployed = params => WeaTools.callApi('/api/integration/common1/checkCasIsDeployed', 'POST', params);
|
||||||
|
export const checkValidateCode = params => WeaTools.callApi('/api/integration/common1/checkValidateCode', 'POST', params);
|
||||||
|
export const checkNonstandardStatus = params => WeaTools.callApi('/api/integration/common1/checkNonstandardStatus', 'GET', params);
|
||||||
|
export const checkIsHasOrganization = params => WeaTools.callApi('/api/common/hrmcommon/getManageDetachEnable', 'POST', params);
|
||||||
|
|
@ -0,0 +1,98 @@
|
||||||
|
import {WeaTools} from 'ecCom';
|
||||||
|
|
||||||
|
export const getDataShowList = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/datashow/getDataShowList', 'POST', params);
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getDataShowRightMenu = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/datashow/getDataShowRightMenu', 'POST', params);
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getDataShowCondition = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/datashow/getDataShowCondition', 'POST', params);
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getDataShowEditForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/datashow/getDataShowEditForm', 'POST', params);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
export const getDataShowEditForm4E7 = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/datashow/getDataShowEditForm4E7', 'POST', params);
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getDataShowOperation4E7 = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/datashow/getDataShowOperation4E7', 'POST', params);
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getDataShowOperation = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/datashow/getDataShowOperation', 'POST', params);
|
||||||
|
};
|
||||||
|
|
||||||
|
//获取测试的form
|
||||||
|
export const getDataShowTestForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/datashow/getDataShowTestForm', 'POST', params);
|
||||||
|
};
|
||||||
|
|
||||||
|
//校验数据源是否可连接
|
||||||
|
export const checkDataSource = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/datashow/checkDataSource', 'POST', params);
|
||||||
|
};
|
||||||
|
//校验数据库【查询SQL语句】是否能正常执行并返回查询结果
|
||||||
|
export const checkSqlOrProc = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/datashow/checkSqlOrProc', 'POST', params);
|
||||||
|
};
|
||||||
|
|
||||||
|
//判断数据库主键字段存不存在
|
||||||
|
export const checkKeyField = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/datashow/checkKeyField', 'POST', params);
|
||||||
|
};
|
||||||
|
|
||||||
|
//校验数据库【字段设置】中的【字段】项是否在【查询SQL语句】或【回显SQL语句】中存在
|
||||||
|
export const checkFieldSetting = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/datashow/checkFieldSetting', 'POST', params);
|
||||||
|
};
|
||||||
|
|
||||||
|
//校验数据库【字段设置】中的【转换方法】是否返回查询结果
|
||||||
|
export const checkTranSql = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/datashow/checkTranSql', 'POST', params);
|
||||||
|
};
|
||||||
|
|
||||||
|
//webservice接口返回内容是否是XML格式
|
||||||
|
export const checkIsXmlDocument = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/datashow/checkIsXmlDocument', 'POST', params);
|
||||||
|
};
|
||||||
|
|
||||||
|
//效验 自定义地址 是否可访问
|
||||||
|
export const checkURLS = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/datashow/checkURLS', 'POST', params);
|
||||||
|
};
|
||||||
|
|
||||||
|
//保存表单值
|
||||||
|
export const saveFormParam = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/datashow/saveFormParam', 'POST', params);
|
||||||
|
};
|
||||||
|
|
||||||
|
//查询参数form
|
||||||
|
export const getSqlTextForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/datashow/getSqlTextForm', 'POST', params);
|
||||||
|
};
|
||||||
|
|
||||||
|
//获取首页的测试数据
|
||||||
|
export const getIndexTest = (testId) => {
|
||||||
|
return WeaTools.callApi(`/api/integration/datashow/test/${testId}`, 'GET');
|
||||||
|
};
|
||||||
|
|
||||||
|
// 缓存管理页面
|
||||||
|
export const getDataShowCacheSetCondition = params => WeaTools.callApi('/api/integration/datashow/getDataShowCacheSetCondition', 'POST', params);
|
||||||
|
export const getDataShowCacheSetRightMenu = params => WeaTools.callApi('/api/integration/datashow/getDataShowCacheSetRightMenu', 'POST', params);
|
||||||
|
export const getDataShowCacheSetList = params => WeaTools.callApi('/api/integration/datashow/getDataShowCacheSetList', 'POST', params);
|
||||||
|
export const getDataShowCacheOperation = params => WeaTools.callApi('/api/integration/datashow/getDataShowCacheOperation', 'POST', params);
|
||||||
|
|
||||||
|
// 缓存数据管理
|
||||||
|
export const getDataShowCacheDataCondition = params => WeaTools.callApi('/api/integration/datashow/getDataShowCacheDataCondition', 'POST', params);
|
||||||
|
export const getDataShowCacheDataList = params => WeaTools.callApi('/api/integration/datashow/getDataShowCacheDataList', 'POST', params);
|
||||||
|
export const getDataShowCacheDataRightMenu = params => WeaTools.callApi('/api/integration/datashow/getDataShowCacheDataRightMenu', 'POST', params);
|
||||||
|
|
||||||
|
// 缓存数据新建form接口
|
||||||
|
export const getDataShowCacheDataForm = params => WeaTools.callApi('/api/integration/datashow/getDataShowCacheDataForm', 'POST', params);
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
import { WeaTools } from 'ecCom'
|
||||||
|
|
||||||
|
export const getBaseMenus = params => WeaTools.callApi('/api/integration/exchange/getExchangeRightMenu','POST', params);
|
||||||
|
export const getBaseInfoForm = params => WeaTools.callApi('/api/integration/exchange/GetFormCmd','GET', params);
|
||||||
|
export const getBaseInfoFormOperation = params => WeaTools.callApi('/api/integration/exchange/DoSaveCmd','POST', params);
|
||||||
|
|
||||||
|
//log
|
||||||
|
export const getExchangeLogList = params => WeaTools.callApi('/api/integration/exchange/getExchangeLogList','POST', params);
|
||||||
|
export const getExchangeCondition = params => WeaTools.callApi('/api/integration/exchange/getExchangeCondition','POST', params);
|
||||||
|
|
||||||
|
//USER
|
||||||
|
export const doSaveUserAndPwd = params => WeaTools.callApi('/api/integration/exchange/doSaveUserAndPwd','POST', params);
|
||||||
|
export const doOperationlimit = params => WeaTools.callApi('/api/integration/exchange/doOperationlimit','POST', params);
|
||||||
|
|
||||||
|
//Range
|
||||||
|
export const getExchangelimitsList = params => WeaTools.callApi('/api/integration/exchange/getExchangelimitsList','POST', params);
|
||||||
|
|
@ -0,0 +1,74 @@
|
||||||
|
import { WeaTools } from 'ecCom';
|
||||||
|
|
||||||
|
const getHrSyncSettingsForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/hrsync/getHrSyncSettingsForm', 'POST', params);
|
||||||
|
};
|
||||||
|
const getHrSyncSettingsRightMenu = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/hrsync/getHrSyncSettingsRightMenu', 'POST', params);
|
||||||
|
};
|
||||||
|
const getHrSyncSettingsOperation = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/hrsync/getHrSyncSettingsOperation', 'POST', params, 'json', true);
|
||||||
|
}
|
||||||
|
const getHrSyncDataSyncForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/hrsync/getHrSyncDataSyncForm', 'POST', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
const getHrSyncDataSyncRightMenu = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/hrsync/getHrSyncDataSyncRightMenu', 'POST', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
const getHrSyncDataSyncOperation = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/hrsync/getHrSyncDataSyncOperation', 'POST', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
const getHrSyncSettingsImportForm = params => {
|
||||||
|
return "";// WeaTools.callApi('/api/integration/hrsync/getHrSyncSettingsImportForm', 'POST', params);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// 日志高级搜索
|
||||||
|
const getListConditions = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/hrsync/getListConditions', 'POST', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 日志列表
|
||||||
|
const getLogList = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/hrsync/getLogList', 'POST', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 详情页列表
|
||||||
|
const getLogDetailList = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/hrsync/getLogDetailList', 'POST', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 详情页高级搜索
|
||||||
|
const getLogDetailListConditions = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/hrsync/getLogDetailListConditions', 'POST', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 详情页高级搜索
|
||||||
|
const getLogTab = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/hrsync/getLogTab', 'POST', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
const getRealError = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/hrsync/getRealError', 'POST', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export {
|
||||||
|
getHrSyncSettingsForm,
|
||||||
|
getHrSyncSettingsRightMenu,
|
||||||
|
getHrSyncSettingsOperation,
|
||||||
|
getHrSyncDataSyncForm,
|
||||||
|
getHrSyncDataSyncRightMenu,
|
||||||
|
getHrSyncDataSyncOperation,
|
||||||
|
getHrSyncSettingsImportForm,
|
||||||
|
getListConditions,
|
||||||
|
getLogList,
|
||||||
|
getLogDetailListConditions,
|
||||||
|
getLogDetailList,
|
||||||
|
getLogTab,
|
||||||
|
getRealError
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
import { WeaTools } from 'ecCom';
|
||||||
|
|
||||||
|
// 保存| 初始化
|
||||||
|
export const save = (params, cb) => {
|
||||||
|
cb && cb();
|
||||||
|
return WeaTools.callApi('/api/integration/imrtx/save', 'POST', params);
|
||||||
|
};
|
||||||
|
|
||||||
|
// 获取新建表单
|
||||||
|
export const getForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/imrtx/getForm', 'POST', params);
|
||||||
|
};
|
||||||
|
|
||||||
|
// 获取高级搜索条件
|
||||||
|
export const getCondition = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/imsynlog/getListConditions', 'POST', params);
|
||||||
|
};
|
||||||
|
|
||||||
|
// 获取列表
|
||||||
|
export const getTable = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/imsynlog/getLogList', 'POST', params);
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getPassWord = params => WeaTools.callApi('/api/integration/imrtx/getPassWord', 'POST', params);
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
import {WeaTools} from 'ecCom';
|
||||||
|
|
||||||
|
export const getForm = (params) => {
|
||||||
|
return WeaTools.callApi("/api/integration/ldap/getDataMigrationForm", 'POST', params);
|
||||||
|
};
|
||||||
|
|
||||||
|
export const save = (params) => {
|
||||||
|
return WeaTools.callApi("/api/integration/ldap/dataMigration", 'POST', params);
|
||||||
|
};
|
||||||
|
|
@ -0,0 +1,98 @@
|
||||||
|
import {WeaTools} from 'ecCom';
|
||||||
|
|
||||||
|
//保存LDAP基础信息,type=add添加,type=edit修改
|
||||||
|
export const saveBase = (type,params) => {
|
||||||
|
return WeaTools.callApi('/api/integration/ldap/' + type, 'POST', params);
|
||||||
|
};
|
||||||
|
|
||||||
|
//删除LDAP信息
|
||||||
|
export const deleteLdap = (params) => {
|
||||||
|
return WeaTools.callApi('/api/integration/ldap/delete', 'POST', params);
|
||||||
|
};
|
||||||
|
|
||||||
|
//配置定时任务
|
||||||
|
export const configSchedule = (params) => {
|
||||||
|
return WeaTools.callApi("/api/integration/ldap/schedule", 'POST', params);
|
||||||
|
};
|
||||||
|
|
||||||
|
//配置同步节点及映射信息
|
||||||
|
export const configSync = (ldapId, type, params) => {
|
||||||
|
let url = ldapId + '/' + type;
|
||||||
|
return WeaTools.callApi('/api/integration/ldap/config/' + url + '/sync', 'POST', params);
|
||||||
|
};
|
||||||
|
|
||||||
|
//配置映射关系
|
||||||
|
export const configMapping = (ldapId,type,params) => {
|
||||||
|
let url = ldapId + '/' + type;
|
||||||
|
return WeaTools.callApi('/api/integration/ldap/config/' + url + '/mapping', 'POST', params);
|
||||||
|
};
|
||||||
|
|
||||||
|
//获取模板信息
|
||||||
|
export const getTemplate = (type) => {
|
||||||
|
return WeaTools.callApi('/api/integration/ldap/template/' + type, 'GET', {});
|
||||||
|
};
|
||||||
|
|
||||||
|
//获取数据转换方法信息
|
||||||
|
export const getFormart = (type) => {
|
||||||
|
return WeaTools.callApi('/api/integration/ldap/formart/' + type, 'GET', {});
|
||||||
|
};
|
||||||
|
|
||||||
|
//执行同步
|
||||||
|
export const runSync = (ldapId,type,params) => {
|
||||||
|
let url = type + '/' + ldapId;
|
||||||
|
return WeaTools.callApi('/api/integration/ldap/' + url, 'POST',params);
|
||||||
|
};
|
||||||
|
|
||||||
|
//查看同步日志
|
||||||
|
export const showSyncLog = (ldapId,params) =>{
|
||||||
|
return WeaTools.callApi('/api/integration/ldap/synclog/' + ldapId, 'GET',params);
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getBase = (ldapId, type) => {
|
||||||
|
return WeaTools.callApi(`/api/integration/ldap/test/${ldapId}/${type}`, 'GET');
|
||||||
|
};
|
||||||
|
|
||||||
|
//获取基础信息维护控件
|
||||||
|
export const getFields = (apiUrl, params) => {
|
||||||
|
return WeaTools.callApi(apiUrl + '/getFields', 'GET', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取右键菜单
|
||||||
|
export const getRightMenu = (apiUrl, params) => {
|
||||||
|
return WeaTools.callApi(apiUrl + '/getRightMenu', 'GET', params);
|
||||||
|
};
|
||||||
|
|
||||||
|
//删除LDAP自定义接口信息
|
||||||
|
export const deleteCustomInterface = (params) => {
|
||||||
|
return WeaTools.callApi('/api/integration/ldap/deleteCustomInterface', 'POST', params);
|
||||||
|
};
|
||||||
|
|
||||||
|
//保存LDAP自定义接口基础信息,type=addCustomInterface添加,type=editCustomInterface修改
|
||||||
|
export const saveCustomInterfaceBase = (type,params) => {
|
||||||
|
return WeaTools.callApi('/api/integration/ldap/' + type, 'POST', params);
|
||||||
|
};
|
||||||
|
|
||||||
|
//删除LDAP同步日志接口信息
|
||||||
|
export const deleteLdapSyncLog = (params) => {
|
||||||
|
return WeaTools.callApi('/api/integration/ldap/deleteSyncLogs', 'POST', params);
|
||||||
|
};
|
||||||
|
|
||||||
|
// 指定部门确定接口
|
||||||
|
export const updateUserInfo = (params) => {
|
||||||
|
return WeaTools.callApi('/api/integration/ldap/updateUserInfo', 'POST', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 合并用户确定接口
|
||||||
|
export const mergeUserInfo = (params) => {
|
||||||
|
return WeaTools.callApi('/api/integration/ldap/mergeUserInfo', 'POST', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 批量合并点击测试
|
||||||
|
export const getTestMatchData = (params) => {
|
||||||
|
return WeaTools.callApi('/api/integration/ldap/getTestMatchData', 'POST', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 批量合并点击合并
|
||||||
|
export const batchMergeUserInfo = (params) => {
|
||||||
|
return WeaTools.callApi('/api/integration/ldap/batchMergeUserInfo', 'POST', params);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
import { WeaTools } from 'ecCom'
|
||||||
|
|
||||||
|
export const getMenuList = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/productmenu/getMenuList','GET', params);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,53 @@
|
||||||
|
import { WeaTools } from 'ecCom';
|
||||||
|
|
||||||
|
export const getBaseInfoForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/oauth2_client/getBaseInfoForm', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getBaseInfoFormOperation = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/oauth2_client/getBaseInfoFormOperation', 'POST', params);
|
||||||
|
};
|
||||||
|
export const doTest = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/oauth2_client/doTest', 'POST', params);
|
||||||
|
};
|
||||||
|
// export const getRegisterAppList = params => {
|
||||||
|
// return WeaTools.callApi('/api/integration/authenticationcenter/getRegisterAppList', 'POST', params);
|
||||||
|
// };
|
||||||
|
// export const getRegisterAppRightMenu = params => {
|
||||||
|
// return WeaTools.callApi('/api/integration/authenticationcenter/getRegisterAppRightMenu', 'POST', params);
|
||||||
|
// };
|
||||||
|
// export const getRegisterAppEditForm = params => {
|
||||||
|
// return WeaTools.callApi('/api/integration/authenticationcenter/getRegisterAppEditForm', 'POST', params);
|
||||||
|
// };
|
||||||
|
// export const getRegisterAppOperation = params => {
|
||||||
|
// return WeaTools.callApi('/api/integration/authenticationcenter/getRegisterAppOperation', 'POST', params);
|
||||||
|
// };
|
||||||
|
// export const getRegisterAppDataMappingEditForm = params => {
|
||||||
|
// return WeaTools.callApi('/api/integration/authenticationcenter/getRegisterAppDataMappingEditForm', 'POST', params);
|
||||||
|
// };
|
||||||
|
// export const getRegisterAppDataMappingImportForm = params => {
|
||||||
|
// return WeaTools.callApi('/api/integration/authenticationcenter/getRegisterAppDataMappingImportForm', 'POST', params);
|
||||||
|
// };
|
||||||
|
// export const getRegisterAppDataMappingList = params => {
|
||||||
|
// return WeaTools.callApi('/api/integration/authenticationcenter/getRegisterAppDataMappingList', 'POST', params);
|
||||||
|
// };
|
||||||
|
// export const getRegisterAppDataMappingRightMenu = params => {
|
||||||
|
// return WeaTools.callApi('/api/integration/authenticationcenter/getRegisterAppDataMappingRightMenu', 'POST', params);
|
||||||
|
// };
|
||||||
|
// export const getRegisterAppDataMappingCondition = params => {
|
||||||
|
// return WeaTools.callApi('/api/integration/authenticationcenter/getRegisterAppDataMappingCondition', 'POST', params);
|
||||||
|
// };
|
||||||
|
// export const getRegisterAppDataMappingOperation = params => {
|
||||||
|
// return WeaTools.callApi('/api/integration/authenticationcenter/getRegisterAppDataMappingOperation', 'POST', params);
|
||||||
|
// };
|
||||||
|
// export const getRegisterAppLoginLogList = params => {
|
||||||
|
// return WeaTools.callApi('/api/integration/authenticationcenter/getRegisterAppLoginLogList', 'POST', params);
|
||||||
|
// };
|
||||||
|
// export const getRegisterAppLoginLogCondition = params => {
|
||||||
|
// return WeaTools.callApi('/api/integration/authenticationcenter/getRegisterAppLoginLogCondition', 'POST', params);
|
||||||
|
// };
|
||||||
|
// export const checkUserMappingLoginIdUnique = params => {
|
||||||
|
// return WeaTools.callApi('/api/integration/authenticationcenter/checkUserMappingLoginIdUnique', 'POST', params);
|
||||||
|
// };
|
||||||
|
// export const checkUserMappingAppLoginIdUnique = params => {
|
||||||
|
// return WeaTools.callApi('/api/integration/authenticationcenter/checkUserMappingAppLoginIdUnique', 'POST', params);
|
||||||
|
// };
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
import { WeaTools } from 'ecCom';
|
||||||
|
|
||||||
|
export const getBaseInfoForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/saml/getBaseInfoForm', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getBaseInfoFormOperation = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/saml/getBaseInfoFormOperation', 'POST', params);
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getDetailInfoForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/saml/getDetailInfoForm', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getDetailInfoFormOperation = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/saml/getDetailInfoFormOperation', 'POST', params);
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getConfigurationResult = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/saml/getConfigurationResult', 'POST', params);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
@ -0,0 +1,92 @@
|
||||||
|
import { WeaTools } from "ecCom";
|
||||||
|
|
||||||
|
// ./api/integration/web/Schedule?methed=?
|
||||||
|
|
||||||
|
// methed:
|
||||||
|
// 根据标识(即id) 删除计划任务:getDelateScheduleById
|
||||||
|
// 查询计划任务:getFindSchedule
|
||||||
|
// 检查 用户及计划任务类:doCheckSchedule
|
||||||
|
// 批量删除计划任务:getBatchDel
|
||||||
|
// 编辑计划任务:doEditSchedule
|
||||||
|
// 添加计划任务:doAddSchedule
|
||||||
|
|
||||||
|
const API = {
|
||||||
|
getFormRightMenus: params =>
|
||||||
|
WeaTools.callApi(
|
||||||
|
"/api/integration/schedule/getFormRightMenus",
|
||||||
|
"POST",
|
||||||
|
params
|
||||||
|
),
|
||||||
|
getListRightMenus: params =>
|
||||||
|
WeaTools.callApi(
|
||||||
|
"/api/integration/schedule/getListRightMenus",
|
||||||
|
"POST",
|
||||||
|
params
|
||||||
|
),
|
||||||
|
getList: params =>
|
||||||
|
WeaTools.callApi("/api/integration/schedule/getList", "POST", params),
|
||||||
|
getListConditions: params =>
|
||||||
|
WeaTools.callApi(
|
||||||
|
"/api/integration/schedule/getListConditions",
|
||||||
|
"POST",
|
||||||
|
params
|
||||||
|
),
|
||||||
|
getForm: params =>
|
||||||
|
WeaTools.callApi("/api/integration/schedule/getForm", "POST", params),
|
||||||
|
insert: params =>
|
||||||
|
WeaTools.callApi("/api/integration/schedule/insert", "POST", params, "json", true),
|
||||||
|
update: params =>
|
||||||
|
WeaTools.callApi("/api/integration/schedule/update", "POST", params),
|
||||||
|
delete: params =>
|
||||||
|
WeaTools.callApi("/api/integration/schedule/delete", "POST", params),
|
||||||
|
batchDelete: params =>
|
||||||
|
WeaTools.callApi("/api/integration/schedule/batchDelete", "POST", params),
|
||||||
|
getListConditions: params =>
|
||||||
|
WeaTools.callApi("/api/integration/schedule/getListConditions", "POST", params),
|
||||||
|
// 系统日志
|
||||||
|
getSelectLog: params =>
|
||||||
|
WeaTools.callApi("/api/integration/schedule/getSelectLog", "POST", params),
|
||||||
|
// 运行日志
|
||||||
|
doRunLog: params =>
|
||||||
|
WeaTools.callApi("/api/integration/schedule/doRunLog", "POST", params),
|
||||||
|
// 运行日志 search advance
|
||||||
|
getLogListConditions: params =>
|
||||||
|
WeaTools.callApi("/api/integration/schedule/getLogListConditions", "POST", params),
|
||||||
|
// 系统日志
|
||||||
|
getSysLog: params =>
|
||||||
|
WeaTools.callApi("/api/common/log/viewexp", "POST", params),
|
||||||
|
getdata: params =>
|
||||||
|
WeaTools.callApi("/api/common/log/getdata", "GET", params),
|
||||||
|
trans: params =>
|
||||||
|
WeaTools.callApi("/api/common/log/audit/trans", "GET", params),
|
||||||
|
getSysLogConditions: params =>
|
||||||
|
WeaTools.callApi("/api/common/log/view", "POST", params),
|
||||||
|
// 运行
|
||||||
|
start: params =>
|
||||||
|
WeaTools.callApi("/api/integration/schedule/start", "POST", params),
|
||||||
|
// 禁止
|
||||||
|
stop: params =>
|
||||||
|
WeaTools.callApi("/api/integration/schedule/stop", "POST", params),
|
||||||
|
// 禁止
|
||||||
|
pause: params =>
|
||||||
|
WeaTools.callApi("/api/integration/schedule/pause", "POST", params),
|
||||||
|
// 禁止
|
||||||
|
resume: params =>
|
||||||
|
WeaTools.callApi("/api/integration/schedule/resume", "POST", params),
|
||||||
|
getTriggerList: params =>
|
||||||
|
WeaTools.callApi("/api/integration/schedule/triggerList", "POST", params),
|
||||||
|
getScheduleRunLogCondition: params =>
|
||||||
|
WeaTools.callApi("/api/integration/schedule/getScheduleRunLogCondition", "POST", params),
|
||||||
|
getScheduleMonitorCondition: params =>
|
||||||
|
WeaTools.callApi("/api/integration/schedule/getScheduleMonitorCondition", "POST", params),
|
||||||
|
getScheduleSysLogCondition: params =>
|
||||||
|
WeaTools.callApi("/api/integration/schedule/getScheduleSysLogCondition", "POST", params),
|
||||||
|
immediatelyRun: params =>
|
||||||
|
WeaTools.callApi("/api/integration/schedule/immediatelyRun", "POST", params),
|
||||||
|
test: params =>
|
||||||
|
WeaTools.callApi("/api/integration/schedule/test", "POST", params),
|
||||||
|
viewDetail: params =>
|
||||||
|
WeaTools.callApi("/api/common/log/viewdetail", 'GET', params)
|
||||||
|
};
|
||||||
|
|
||||||
|
export default API;
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
import {WeaTools} from 'ecCom';
|
||||||
|
|
||||||
|
export const getTencentMailList = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/tencentmail/getTencentMailList', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getTencentMailRightMenu = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/tencentmail/getTencentMailRightMenu', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getTencentMailCondition = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/tencentmail/getTencentMailCondition', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getBaseSetForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/tencentmail/getBaseSetForm', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getTencentMailAddForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/tencentmail/getTencentMailAddForm', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getTencentMailOperation = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/tencentmail/getTencentMailOperation', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getTencentMailLogList = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/tencentmail/getTencentMailLogList', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getTencentMailLogRightMenu = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/tencentmail/getTencentMailLogRightMenu', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getTencentMailLogCondition = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/tencentmail/getTencentMailLogCondition', 'POST', params);
|
||||||
|
};
|
||||||
|
|
@ -0,0 +1,100 @@
|
||||||
|
import { WeaTools } from 'ecCom';
|
||||||
|
|
||||||
|
export const getOfsInfoList = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/todocenter/getOfsInfoList', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getOfsInfoRightMenu = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/todocenter/getOfsInfoRightMenu', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getOfsInfoCondition = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/todocenter/getOfsInfoCondition', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getWorkflowList = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/todocenter/getWorkflowList', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getWorkflowRightMenu = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/todocenter/getWorkflowRightMenu', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getWorkflowCondition = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/todocenter/getWorkflowCondition', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getOfsLogList = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/todocenter/getOfsLogList', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getOfsLogCondition = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/todocenter/getOfsLogCondition', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getOfsSettingForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/todocenter/getOfsSettingForm', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getOfsSettingOperation = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/todocenter/getOfsSettingOperation', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getWorkflowViewForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/todocenter/getWorkflowViewForm', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getWorkflowOperation = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/todocenter/getWorkflowOperation', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getOfsInfoAddForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/todocenter/getOfsInfoAddForm', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getOfsInfoOperation = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/todocenter/getOfsInfoOperation', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getOfsInfoLogList = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/todocenter/getOfsInfoLogList', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getOfsInfoLogRightMenu = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/todocenter/getOfsInfoLogRightMenu', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getOfsInfoLogCondition = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/todocenter/getOfsInfoLogCondition', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getOfsInfoWorkflowList = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/todocenter/getOfsInfoWorkflowList', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getOfsInfoWorkflowRightMenu = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/todocenter/getOfsInfoWorkflowRightMenu', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getOfsInfoWorkflowCondition = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/todocenter/getOfsInfoWorkflowCondition', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getOfsInfoWorkflowTypeList = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/todocenter/getOfsInfoWorkflowTypeList', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getOfsInfoWorkflowTypeRightMenu = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/todocenter/getOfsInfoWorkflowTypeRightMenu', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getOfsInfoWorkflowTypeCondition = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/todocenter/getOfsInfoWorkflowTypeCondition', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getOfsInfoWorkflowTypeEditForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/todocenter/getOfsInfoWorkflowTypeEditForm', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getOfsInfoWorkflowTypeOperation = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/todocenter/getOfsInfoWorkflowTypeOperation', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getofsWorkflowShareList = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/todocenter/getofsWorkflowShareList', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getofsWorkflowShareForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/todocenter/getofsWorkflowShareForm', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getNetworkIPColumnsSet = () => {
|
||||||
|
return WeaTools.callApi('/api/integration/todocenter/getNetworkIPColumnsSet', 'POST');
|
||||||
|
};
|
||||||
|
|
||||||
|
//短信提醒
|
||||||
|
export const getSmstemplate = params => WeaTools.callApi('/api/integration/todocenter/getSmstemplate', 'POST', params);
|
||||||
|
export const resetSmstemplate = params => WeaTools.callApi('/api/integration/todocenter/resetSmstemplate', 'POST', params);
|
||||||
|
export const saveSmstemplate = params => WeaTools.callApi('/api/integration/todocenter/saveSmstemplate', 'POST', params);
|
||||||
|
// 自定义
|
||||||
|
export const getOfsCustomDefinition = params => WeaTools.callApi('/api/integration/todocenter/getOfsCustomDefinition', 'POST', params);
|
||||||
|
export const saveOfsCustomDefinition = params => WeaTools.callApi('/api/integration/todocenter/ofsCustomDefinitionOperation', 'POST', params);
|
||||||
|
// 流程注册
|
||||||
|
export const getWorkflowViewFormEdit = params => WeaTools.callApi('/api/integration/todocenter/getWorkflowViewFormEdit', 'POST', params);
|
||||||
|
export const ReceiveRequestInfoByJson = params => WeaTools.callApi('/rest/ofs/ReceiveRequestInfoByJson', 'POST', params, "text");
|
||||||
|
export const OfsHrmResourceTransfer = params => WeaTools.callApi('/api/integration/todocenter/OfsHrmResourceTransfer', 'POST', params);
|
||||||
|
export const OfsDataOperation = params => WeaTools.callApi('/api/integration/todocenter/OfsDataOperation', 'POST', params);
|
||||||
|
|
||||||
|
|
@ -0,0 +1,32 @@
|
||||||
|
import { WeaTools } from 'ecCom';
|
||||||
|
|
||||||
|
export const getOfsSendList = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/todoclient/getOfsSendList', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getOfsSendRightMenu = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/todoclient/getOfsSendRightMenu', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getOfsSendCondition = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/todoclient/getOfsSendCondition', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getOfsSendForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/todoclient/getOfsSendForm', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getOfsSendOperation = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/todoclient/getOfsSendOperation', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getOfsSendWhiteWorkflowList = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/todoclient/getOfsSendWhiteWorkflowList', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getOfsSendWhiteHrmList = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/todoclient/getOfsSendWhiteHrmList', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getOfsSendWhiteWorkflowForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/todoclient/getOfsSendWhiteWorkflowForm', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getAuth = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/todoclient/isAll', 'POST', params);
|
||||||
|
|
||||||
|
};
|
||||||
|
export const getOfsSendMessageTypeForm = params => WeaTools.callApi('/api/integration/todoclient/getOfsSendMessageTypeForm', 'POST', params);
|
||||||
|
export const getOfsSendMessageTypeOperationCmd = params => WeaTools.callApi('/api/integration/todoclient/getOfsSendMessageTypeOperationCmd', 'POST', params);
|
||||||
|
|
@ -0,0 +1,46 @@
|
||||||
|
import { WeaTools } from "ecCom";
|
||||||
|
|
||||||
|
// 高级搜索
|
||||||
|
export const getConditions = params => {
|
||||||
|
return WeaTools.callApi("/api/integration/webservice/getListConditions", "POST", params);
|
||||||
|
};
|
||||||
|
|
||||||
|
// 分页列表
|
||||||
|
export const getList = params => {
|
||||||
|
return WeaTools.callApi("/api/integration/webservice/getList", "POST", params);
|
||||||
|
};
|
||||||
|
|
||||||
|
// 右键菜单
|
||||||
|
export const getRightMenu = params => {
|
||||||
|
return WeaTools.callApi("/api/integration/webservice/getListRightMenus", "POST", params);
|
||||||
|
};
|
||||||
|
|
||||||
|
//新建表单保存、删除按钮
|
||||||
|
export const getFormRightMenus = params => {
|
||||||
|
return WeaTools.callApi("/api/integration/webservice/getFormRightMenus", "POST", params);
|
||||||
|
};
|
||||||
|
|
||||||
|
// 获取新建表单
|
||||||
|
export const getForm = params => {
|
||||||
|
return WeaTools.callApi("/api/integration/webservice/getForm", "POST", params);
|
||||||
|
};
|
||||||
|
|
||||||
|
//删除
|
||||||
|
export const delList = params => {
|
||||||
|
return WeaTools.callApi("/api/integration/webservice/batchDelete", "POST", params);
|
||||||
|
}
|
||||||
|
|
||||||
|
//解析WSDL/检查更新
|
||||||
|
export const parseWSDL = params => {
|
||||||
|
return WeaTools.callApi("/api/integration/webservice/parseWSDL", "POST", params);
|
||||||
|
}
|
||||||
|
|
||||||
|
//测试
|
||||||
|
export const doTest = params => {
|
||||||
|
return WeaTools.callApi("/api/integration/webservice/doTest", "POST", params);
|
||||||
|
}
|
||||||
|
|
||||||
|
//保存
|
||||||
|
export const doSave = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/webservice/doSave','POST',params);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,82 @@
|
||||||
|
import { WeaTools } from 'ecCom';
|
||||||
|
|
||||||
|
export const getRegisterFilterList = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/whitelist/getRegisterFilterList', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getWhiteList = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/whitelist/getWhiteList', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getBaseInfoForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/whitelist/getBaseInfoForm', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getBaseInfoFormOperation = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/whitelist/getBaseInfoFormOperation', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getRegisterFilterForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/whitelist/getRegisterFilterForm', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getRegisterFilterFormOperation = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/whitelist/getRegisterFilterFormOperation', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getRegisterFilterRightMenu = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/whitelist/getRegisterFilterRightMenu', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getWhiteListRightMenu = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/whitelist/getWhiteListRightMenu', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getBaseInfoCondition = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/whitelist/getBaseInfoCondition', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getRegisterFilterCondition = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/whitelist/getRegisterFilterCondition', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getWhiteListMappingOperation = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/whitelist/getWhiteListMappingOperation', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getRegisterFilterSelectedWhiteList = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/whitelist/getRegisterFilterSelectedWhiteList', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getRegisterFilterId = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/whitelist/getRegisterFilterId', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getRegisterFilterisValid = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/whitelist/getRegisterFilterisValid', 'POST', params);
|
||||||
|
};
|
||||||
|
|
||||||
|
//以下暂不使用
|
||||||
|
export const getRegisterAppEditForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/authenticationcenter/getRegisterAppEditForm', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getRegisterAppOperation = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/authenticationcenter/getRegisterAppOperation', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getRegisterAppDataMappingEditForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/authenticationcenter/getRegisterAppDataMappingEditForm', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getRegisterAppDataMappingImportForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/authenticationcenter/getRegisterAppDataMappingImportForm', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getRegisterAppDataMappingList = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/authenticationcenter/getRegisterAppDataMappingList', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getRegisterAppDataMappingRightMenu = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/authenticationcenter/getRegisterAppDataMappingRightMenu', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getRegisterAppDataMappingCondition = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/authenticationcenter/getRegisterAppDataMappingCondition', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getRegisterAppDataMappingOperation = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/authenticationcenter/getRegisterAppDataMappingOperation', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getRegisterAppLoginLogList = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/authenticationcenter/getRegisterAppLoginLogList', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getRegisterAppLoginLogCondition = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/authenticationcenter/getRegisterAppLoginLogCondition', 'POST', params);
|
||||||
|
};
|
||||||
|
export const checkUserMappingLoginIdUnique = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/authenticationcenter/checkUserMappingLoginIdUnique', 'POST', params);
|
||||||
|
};
|
||||||
|
export const checkUserMappingAppLoginIdUnique = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/authenticationcenter/checkUserMappingAppLoginIdUnique', 'POST', params);
|
||||||
|
};
|
||||||
|
|
@ -0,0 +1,115 @@
|
||||||
|
import {WeaTools} from 'ecCom';
|
||||||
|
|
||||||
|
export const getArchiveRegisterList = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowarchive/getArchiveRegisterList', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getArchiveRegisterRightMenu = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowarchive/getArchiveRegisterRightMenu', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getArchiveRegisterCondition = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowarchive/getArchiveRegisterCondition', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getArchiveLogList = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowarchive/getArchiveLogList', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getArchiveLogRightMenu = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowarchive/getArchiveLogRightMenu', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getArchiveLogCondition = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowarchive/getArchiveLogCondition', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getArchiveConfigFTPList = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowarchive/getArchiveConfigFTPList', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getArchiveConfigFTPRightMenu = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowarchive/getArchiveConfigFTPRightMenu', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getArchiveConfigLocalList = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowarchive/getArchiveConfigLocalList', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getArchiveConfigLocalRightMenu = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowarchive/getArchiveConfigLocalRightMenu', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getArchiveConfigDatabaseList = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowarchive/getArchiveConfigDatabaseList', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getArchiveConfigDatabaseRightMenu = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowarchive/getArchiveConfigDatabaseRightMenu', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getArchiveConfigSchemeList = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowarchive/getArchiveConfigSchemeList', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getArchiveConfigSchemeRightMenu = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowarchive/getArchiveConfigSchemeRightMenu', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getArchiveRegisterAddForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowarchive/getArchiveRegisterAddForm', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getArchiveRegisterEditForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowarchive/getArchiveRegisterEditForm', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getArchiveRegisterEditFormFieldXMLMapping = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowarchive/getArchiveRegisterEditFormFieldXMLMapping', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getArchiveRegisterEditFormFieldDBMapping = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowarchive/getArchiveRegisterEditFormFieldDBMapping', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getArchiveRegisterEditFormLogList = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowarchive/getArchiveRegisterEditFormLogList', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getArchiveRegisterEditFormLogCondition = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowarchive/getArchiveRegisterEditFormLogCondition', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getArchiveRegisterEditFormLogRightMenu = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowarchive/getArchiveRegisterEditFormLogRightMenu', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getArchiveRegisterOperation = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowarchive/getArchiveRegisterOperation', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getArchiveConfigFTPAddForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowarchive/getArchiveConfigFTPAddForm', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getArchiveConfigFTPEditForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowarchive/getArchiveConfigFTPEditForm', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getArchiveConfigFTPOperation = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowarchive/getArchiveConfigFTPOperation', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getArchiveConfigLocalAddForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowarchive/getArchiveConfigLocalAddForm', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getArchiveConfigLocalEditForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowarchive/getArchiveConfigLocalEditForm', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getArchiveConfigLocalOperation = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowarchive/getArchiveConfigLocalOperation', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getArchiveConfigDatabaseAddForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowarchive/getArchiveConfigDatabaseAddForm', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getArchiveConfigDatabaseEditForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowarchive/getArchiveConfigDatabaseEditForm', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getArchiveConfigDatabaseOperation = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowarchive/getArchiveConfigDatabaseOperation', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getArchiveConfigSchemeAddFormXML = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowarchive/getArchiveConfigSchemeAddFormXML', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getArchiveConfigSchemeEditFormXML = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowarchive/getArchiveConfigSchemeEditFormXML', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getArchiveConfigSchemeOperationXML = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowarchive/getArchiveConfigSchemeOperationXML', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getArchiveConfigSchemeAddFormDB = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowarchive/getArchiveConfigSchemeAddFormDB', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getArchiveConfigSchemeEditFormDB = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowarchive/getArchiveConfigSchemeEditFormDB', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getArchiveConfigSchemeOperationDB = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowarchive/getArchiveConfigSchemeOperationDB', 'POST', params);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,200 @@
|
||||||
|
import { WeaTools } from 'ecCom';
|
||||||
|
|
||||||
|
|
||||||
|
// 流程接口注册高级搜索
|
||||||
|
export const getInterfaceRegisterCondition = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowflow/getInterfaceRegisterCondition', 'POST', params);
|
||||||
|
};
|
||||||
|
|
||||||
|
// 流程接口部署高级搜索
|
||||||
|
export const getInterfaceDeploymentCondition = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowflow/getInterfaceDeploymentCondition', 'POST', params);
|
||||||
|
};
|
||||||
|
|
||||||
|
// 右键菜单
|
||||||
|
export const getRightMenus = (params,param) => {
|
||||||
|
let api = "/api/integration/workflowflow/getInterfaceDeploymentRightMenu";
|
||||||
|
if(params===0) {
|
||||||
|
api = "/api/integration/workflowflow/getInterfaceRegisterRightMenu";
|
||||||
|
}
|
||||||
|
return WeaTools.callApi(api, 'POST', param);
|
||||||
|
};
|
||||||
|
|
||||||
|
// 流程接口注册列表
|
||||||
|
export const getInterfaceRegisterList = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowflow/getInterfaceRegisterList', 'POST', params);
|
||||||
|
}
|
||||||
|
// 流程接口部署列表
|
||||||
|
export const getInterfaceDeploymentList = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowflow/getInterfaceDeploymentList', 'POST', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 流程接口注册DML表单
|
||||||
|
export const getInterfaceRegisterDMLAddForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowflow/getInterfaceRegisterDMLAddForm', 'POST', params);
|
||||||
|
}
|
||||||
|
export const getInterfaceRegisterDMLEditForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowflow/getInterfaceRegisterDMLEditForm', 'POST', params);
|
||||||
|
}
|
||||||
|
// 流程接口注册Webservice表单
|
||||||
|
export const getInterfaceRegisterWebserviceAddForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowflow/getInterfaceRegisterWebserviceAddForm', 'POST', params);
|
||||||
|
}
|
||||||
|
export const getInterfaceRegisterWebserviceOperation = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowflow/getInterfaceRegisterWebserviceOperation', 'POST', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
//注册ESB表单
|
||||||
|
export const getInterfaceRegisterESBAddForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowflow/getInterfaceRegisterESBAddForm', 'POST', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
//根据ESB服务id和version获取对应的分页列表数据
|
||||||
|
export const getESBPublishParam = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowflow/getESBPublishParam', 'POST', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
//根据传入的esbid和版本以及actionid获取规则数据
|
||||||
|
export const getESBReturnContralDatas = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowflow/getESBReturnContralData', 'POST', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
//根据传入的规则id删除ESB返回控制规则
|
||||||
|
export const deleteESBReturnContralData = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowflow/deleteESBReturnContralData', 'POST', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
//ESB接口增删改提交动作处理
|
||||||
|
export const getInterfaceRegisterESBOperation = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowflow/getInterfaceRegisterESBOperation', 'POST', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
//根据参数获取对应的下拉选项ESB
|
||||||
|
export const getlinkageSelectForESB = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowflow/getlinkageSelectForESB', 'POST', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 注册DML接口增删改提交动作处理
|
||||||
|
export const getInterfaceRegisterDMLOperation = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowflow/getInterfaceRegisterDMLOperation', 'POST', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getInterfaceRegisterCustomOperation = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowflow/getInterfaceRegisterCustomOperation', 'POST', params);
|
||||||
|
}
|
||||||
|
export const getInterfaceDeploymentOperation = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowflow/getInterfaceDeploymentOperation', 'POST', params);
|
||||||
|
}
|
||||||
|
export const getInterfaceRegisterCustomAddForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowflow/getInterfaceRegisterCustomAddForm', 'POST', params);
|
||||||
|
}
|
||||||
|
export const getInterfaceRegisterCustomAddFormOnline = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowflow/getInterfaceRegisterCustomAddFormOnline', 'POST', params);
|
||||||
|
}
|
||||||
|
export const getInterfaceRegisterRunLogList = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowflow/getInterfaceRegisterRunLogList', 'POST', params);
|
||||||
|
}
|
||||||
|
export const getInterfaceRegisterRunLogCondition = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowflow/getInterfaceRegisterRunLogCondition', 'POST', params);
|
||||||
|
}
|
||||||
|
export const getInterfaceDeploymentAddForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowflow/getInterfaceDeploymentAddForm', 'POST', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getDataShowOperation = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/datashow/getDataShowOperation', 'POST', params);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// ESB
|
||||||
|
|
||||||
|
export const getESBRightMenu = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/esbaction/base/getFQRightMenu', 'GET', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getESBFields = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/esbaction/base/getFields', 'GET', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getESBRequestDatas = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/esbaction/getEventRequestData', 'GET', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getESBDetailFields = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/esbaction/base/getDetailFields', 'GET', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getSelectData = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/esbaction/getSelectData', 'GET', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getWorkflowMainFields = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/esbaction/base/getMainFields', 'GET', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
export const saveAction = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/esbaction/saveAction', 'POST', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
export const delectAction = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/esbaction/deleteAction', 'POST', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
export const checkEsbService = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/esbaction/checkEsbService', 'GET', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取测试结果信息
|
||||||
|
export const getBase = (type,testId) => {
|
||||||
|
return WeaTools.callApi(`/api/integration/workflowaction/test/${type}/${testId}`, 'GET');
|
||||||
|
};
|
||||||
|
|
||||||
|
//获取预览信息
|
||||||
|
export const getPreview = (type,testId) => {
|
||||||
|
return WeaTools.callApi(`/api/integration/workflowaction/test/preview/${type}/${testId}`, 'GET');
|
||||||
|
};
|
||||||
|
|
||||||
|
//获取基础信息维护控件
|
||||||
|
export const getFields = (apiUrl, params) => {
|
||||||
|
return WeaTools.callApi(apiUrl + '/getFields', 'GET', params);
|
||||||
|
};
|
||||||
|
//获取右键菜单
|
||||||
|
export const getRightMenu = (apiUrl, params) => {
|
||||||
|
return WeaTools.callApi(apiUrl + '/getRightMenu', 'GET', params);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//获取右键菜单
|
||||||
|
export const getRightMenu2 = (apiUrl, params) => {
|
||||||
|
return WeaTools.callApi(apiUrl + '/getRightMenu2', 'GET', params);
|
||||||
|
};
|
||||||
|
|
||||||
|
//保存表单参数
|
||||||
|
export const saveParam =(params,type,testId)=>{
|
||||||
|
return WeaTools.callApi(`/api/integration/workflowaction/test/saveParam/${type}/${testId}`, 'POST', params);
|
||||||
|
};
|
||||||
|
|
||||||
|
//检测表单参数
|
||||||
|
export const checkHasParam=(type,testId)=>{
|
||||||
|
return WeaTools.callApi(`/api/integration/workflowaction/test/checkHasParam/${type}/${testId}`, 'POST');
|
||||||
|
};
|
||||||
|
|
||||||
|
// 建模对接
|
||||||
|
export const getFormModuleField = (params) => WeaTools.callApi('/api/integration/formmodule/esbaction/base/getFields', 'GET', params);
|
||||||
|
export const getFormModuleMainFields = (params) => WeaTools.callApi('/api/integration/formmodule/esbaction/base/getMainFields', 'GET', params);
|
||||||
|
export const getFormModuleSelectData = (params) => WeaTools.callApi('/api/integration/formmodule/esbaction/getSelectData', 'GET', params);
|
||||||
|
export const getFormModuleDetailFields = (params) => WeaTools.callApi('/api/integration/formmodule/esbaction/base/getDetailFields', 'GET', params);
|
||||||
|
export const getFormModuleFunFields = (params) => WeaTools.callApi('/api/integration/formmodule/esbaction/base/getFunFields', 'GET', params);
|
||||||
|
export const getFormModuleSave = (params) => WeaTools.callApi('/api/integration/formmodule/esbaction/saveAction', 'POST', params);
|
||||||
|
export const getFormModuleAutoMappingFields = (params) => WeaTools.callApi('/api/integration/formmodule/esbaction/automapping/getFields', 'GET', params);
|
||||||
|
export const getFormModuleAutoMapping = (params) => WeaTools.callApi('/api/integration/formmodule/esbaction/getTableFields', 'GET', params);
|
||||||
|
export const getFormModuleRequestDatas = (params) => WeaTools.callApi('/api/integration/formmodule/esbaction/getEventRequestData', 'GET', params);
|
||||||
|
// 字段联动
|
||||||
|
export const getFormModuleFieldInfo = (params) => WeaTools.callApi('/api/integration/formmodule/esbaction/field/base/getFields', 'GET', params);
|
||||||
|
export const getFormModuleFieldSelectData = (params) => WeaTools.callApi('/api/integration/formmodule/esbaction/field/getSelectData', 'GET', params);
|
||||||
|
export const getFormModuleFieldMainFields = (params) => WeaTools.callApi('/api/integration/formmodule/esbaction/field/base/getMainFields', 'GET', params);
|
||||||
|
export const getFormModuleFieldDetailFields = (params) => WeaTools.callApi('/api/integration/formmodule/esbaction/field/base/getDetailFields', 'GET', params);
|
||||||
|
export const getFormModuleFieldSave = (params) => WeaTools.callApi('/api/integration/formmodule/esbaction/field/saveAction', 'POST', params);
|
||||||
|
export const getFormModuleFieldRequestDatas = (params) => WeaTools.callApi('/api/integration/formmodule/esbaction/field/getEventRequestData', 'GET', params);
|
||||||
|
export const getFormModuleFieldAutoMapping = (params) => WeaTools.callApi('/api/integration/formmodule/esbaction/field/getTableFields', 'GET', params);
|
||||||
|
|
@ -0,0 +1,44 @@
|
||||||
|
import {WeaTools} from 'ecCom';
|
||||||
|
|
||||||
|
export const getTriggerList = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowtrigger/getTriggerList', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getTriggerRightMenu = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowtrigger/getTriggerRightMenu', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getTriggerCondition = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowtrigger/getTriggerCondition', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getTriggerIntervalSetForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowtrigger/getTriggerIntervalSetForm', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getTriggerAddForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowtrigger/getTriggerAddForm', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getTriggerEditDetailForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowtrigger/getTriggerEditDetailForm', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getTriggerOperation = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowtrigger/getTriggerOperation', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getTriggerTest = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowtrigger/getTriggerTest', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getTriggerCheckWorkflowForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowtrigger/getTriggerCheckWorkflowForm', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getTriggerLogList = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowtrigger/getTriggerLogList', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getTriggerLogRightMenu = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowtrigger/getTriggerLogRightMenu', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getTriggerLogCondition = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowtrigger/getTriggerLogCondition', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getTriggerResetFormFieldMapping = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowtrigger/getTriggerResetFormFieldMapping', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getTriggerEditDetailAttachmentSetForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/workflowtrigger/getTriggerEditDetailAttachmentSetForm', 'POST', params);
|
||||||
|
};
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
import { WeaTools } from 'ecCom';
|
||||||
|
|
||||||
|
// 所有账号的显示页面
|
||||||
|
const getForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/accountsetting/getForm', 'POST', params);
|
||||||
|
};
|
||||||
|
|
||||||
|
// 保存接口
|
||||||
|
const doSave = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/accountsetting/doSave', 'POST', params);
|
||||||
|
};
|
||||||
|
|
||||||
|
// 单个账号的显示页面
|
||||||
|
const getSysid = id => {
|
||||||
|
return WeaTools.callApi(`/api/integration/accountsetting/${id}`, 'GET');
|
||||||
|
}
|
||||||
|
|
||||||
|
// 右键菜单
|
||||||
|
const getRightMenu = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/accountsetting/getRightMenu', 'POST', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
export {
|
||||||
|
getForm,
|
||||||
|
doSave,
|
||||||
|
getSysid,
|
||||||
|
getRightMenu
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,93 @@
|
||||||
|
import { WeaTools } from 'ecCom';
|
||||||
|
|
||||||
|
const Method = {
|
||||||
|
Post: "POST",
|
||||||
|
Get: "GET"
|
||||||
|
}
|
||||||
|
|
||||||
|
const APIList = [{
|
||||||
|
// 基础信息(表单信息)
|
||||||
|
name: "getFields",
|
||||||
|
path: "/coremail/base/getFields",
|
||||||
|
type: Method.Get
|
||||||
|
}, {
|
||||||
|
// 基础信息菜单信息(标题、按钮等信息)
|
||||||
|
name: "baseGetRightMenu",
|
||||||
|
path: "/coremail/base/getRightMenu",
|
||||||
|
type: Method.Get
|
||||||
|
}, {
|
||||||
|
// 同步日志列表
|
||||||
|
name: "getDatas",
|
||||||
|
path: "/coremail/log/getDatas",
|
||||||
|
type: Method.Get
|
||||||
|
}, {
|
||||||
|
// 同步日志菜单信息(标题,按钮等信息)
|
||||||
|
name: "logGetRightMenu",
|
||||||
|
path: "/coremail/log/getRightMenu",
|
||||||
|
type: Method.Get
|
||||||
|
}, {
|
||||||
|
// 同步日志高级查询表单
|
||||||
|
name: "getCondition",
|
||||||
|
path: "/coremail/log/getCondition",
|
||||||
|
type: Method.Get
|
||||||
|
}, {
|
||||||
|
name: "init",
|
||||||
|
path: "/newcoremail/init",
|
||||||
|
type: Method.Post
|
||||||
|
}, {
|
||||||
|
name: "test",
|
||||||
|
path: "/newcoremail/test",
|
||||||
|
type: Method.Post
|
||||||
|
}, {
|
||||||
|
name: "save",
|
||||||
|
path: "/newcoremail/save",
|
||||||
|
type: Method.Post
|
||||||
|
}, {
|
||||||
|
name: "getCoreMailList",
|
||||||
|
path: "/newcoremail/getCoreMailList",
|
||||||
|
type: Method.Post
|
||||||
|
}, {
|
||||||
|
name: "getCoreMailRightMenu",
|
||||||
|
path: "/newcoremail/getCoreMailRightMenu",
|
||||||
|
type: Method.Post
|
||||||
|
}, {
|
||||||
|
name: "getCoremailMailAddForm",
|
||||||
|
path: "/newcoremail/getCoremailMailAddForm",
|
||||||
|
type: Method.Post
|
||||||
|
}, {
|
||||||
|
name: "getCoreMailSaveOperation",
|
||||||
|
path: "/newcoremail/getCoreMailSaveOperation",
|
||||||
|
type: Method.Post
|
||||||
|
}, {
|
||||||
|
name: "getCoreMailCondition",
|
||||||
|
path: "/newcoremail/getCoreMailCondition",
|
||||||
|
type: Method.Post
|
||||||
|
}, {
|
||||||
|
name: "getCoreMailDelete",
|
||||||
|
path: "/newcoremail/getCoreMailDelete",
|
||||||
|
type: Method.Post
|
||||||
|
} , {
|
||||||
|
name: "getCoreMailOperation",
|
||||||
|
path: "/newcoremail/getCoreMailOperation",
|
||||||
|
type: Method.Post
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
const API = (function () {
|
||||||
|
const Obj = {};
|
||||||
|
APIList.map(item => {
|
||||||
|
Obj[item.name] = (params) => {
|
||||||
|
return WeaTools.callApi(`/api/integration${item.path}`, item.type, params);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return Obj;
|
||||||
|
})();
|
||||||
|
|
||||||
|
|
||||||
|
API.view = params => {
|
||||||
|
return WeaTools.callApi('/api/common/log/view', 'POST', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export default API;
|
||||||
|
|
||||||
|
|
@ -0,0 +1,117 @@
|
||||||
|
import { WeaTools } from "ecCom";
|
||||||
|
|
||||||
|
const Method = {
|
||||||
|
post: "POST",
|
||||||
|
get: "GET"
|
||||||
|
};
|
||||||
|
|
||||||
|
const datasource = [
|
||||||
|
{
|
||||||
|
name: "getFormRightMenus",
|
||||||
|
type: Method.post
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "getList",
|
||||||
|
type: Method.post
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "insert",
|
||||||
|
type: Method.post
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "update",
|
||||||
|
type: Method.post
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "delete",
|
||||||
|
type: Method.post
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "getForm",
|
||||||
|
type: Method.post
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "batchDelete",
|
||||||
|
type: Method.post
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "getListConditions",
|
||||||
|
type: Method.post
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "getListRightMenus",
|
||||||
|
type: Method.post
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "test",
|
||||||
|
type: Method.post
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "listTest",
|
||||||
|
type: Method.post
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "getIsCluster",
|
||||||
|
type: Method.post
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
const datasourcetype = [
|
||||||
|
{
|
||||||
|
name: "getFormRightMenus",
|
||||||
|
type: Method.post
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "getList",
|
||||||
|
type: Method.post
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "insert",
|
||||||
|
type: Method.post
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "update",
|
||||||
|
type: Method.post
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "delete",
|
||||||
|
type: Method.post
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "getForm",
|
||||||
|
type: Method.post
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "batchDelete",
|
||||||
|
type: Method.post
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const API = () => {
|
||||||
|
const objDatasource = {};
|
||||||
|
datasource.map(item => {
|
||||||
|
objDatasource[item.name] = params =>
|
||||||
|
WeaTools.callApi(
|
||||||
|
`/api/integration/datasource/${item.name}`,
|
||||||
|
item.type,
|
||||||
|
params
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
const objDatasourcetype = {};
|
||||||
|
datasourcetype.map(item => {
|
||||||
|
objDatasourcetype[item.name] = params =>
|
||||||
|
WeaTools.callApi(
|
||||||
|
`/api/integration/datasourcetype/${item.name}`,
|
||||||
|
item.type,
|
||||||
|
params
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
return {
|
||||||
|
datasource: objDatasource,
|
||||||
|
datasourcetype: objDatasourcetype
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export default API();
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
import { WeaTools } from 'ecCom';
|
||||||
|
|
||||||
|
// 获取form表单
|
||||||
|
const getBaseInfoForm = params => WeaTools.callApi('/api/integration/delegate_client/getBaseInfoForm', 'POST', params);
|
||||||
|
|
||||||
|
// 对form表单操作的接口
|
||||||
|
const getBaseInfoOperation = params => WeaTools.callApi('/api/integration/delegate_client/getBaseInfoFormOperation', 'POST', params);
|
||||||
|
|
||||||
|
export {
|
||||||
|
getBaseInfoForm,
|
||||||
|
getBaseInfoOperation
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,68 @@
|
||||||
|
import {
|
||||||
|
WeaTools
|
||||||
|
} from 'ecCom'
|
||||||
|
|
||||||
|
export const getAuth = (params) => {
|
||||||
|
return WeaTools.callApi('/api/integration/Outter/operateUserRight', 'POST', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
export const operateSysForm = (params) => {
|
||||||
|
return WeaTools.callApi('/api/integration/Outter/operateSysForm', 'POST', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
//测试预览
|
||||||
|
export const getPreviewUrl = (params) => {
|
||||||
|
return WeaTools.callApi('/api/integration/OutterLogin/getPreviewUrl', 'POST', params);
|
||||||
|
};
|
||||||
|
|
||||||
|
export const operateEncryptForm = (params) => {
|
||||||
|
return WeaTools.callApi('/api/integration/Outter/operateEncryptForm', 'POST', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getOutterSysList = (params) => {
|
||||||
|
return WeaTools.callApi('/api/integration/Outter/getOutterSysList', 'POST', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getOutterEncryptList = (params) => {
|
||||||
|
return WeaTools.callApi('/api/integration/Outter/getOutterEncryptList', 'POST', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getDefaultEntranceUrl = (params) => {
|
||||||
|
return WeaTools.callApi('/api/integration/Outter/getOutterSysDefaultEntranceUrl', 'POST', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
export const operateShareForm = (params) => {
|
||||||
|
return WeaTools.callApi('/api/integration/Outter/operateShareForm', 'POST', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getCustomEncryptClass = (params) => {
|
||||||
|
return WeaTools.callApi('/api/integration/Outter/GetCustomEncryptClass', 'POST', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getOutterSysIsNeedPwdAndIv = (params) => {
|
||||||
|
return WeaTools.callApi('/api/integration/Outter/getOutterSysIsNeedPwdAndIv', 'POST', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
export const checkTableFieldValueUnique = (params) => {
|
||||||
|
return WeaTools.callApi('/api/integration/common1/checkTableFieldValueUnique', 'POST', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getNetworkIPColumnsSet = () => {
|
||||||
|
return WeaTools.callApi('/api/integration/todocenter/getNetworkIPColumnsSet', 'POST');
|
||||||
|
};
|
||||||
|
|
||||||
|
export const createSecretKey = () => {
|
||||||
|
return WeaTools.callApi('/api/integration/Outter/createSecretKey', 'POST');
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getOutterTypeList = (params) => {
|
||||||
|
return WeaTools.callApi('/api/integration/Outter/getOutterTypeList', 'POST', params);
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getOutterTypeShowOrder = (params) => {
|
||||||
|
return WeaTools.callApi('/api/integration/Outter/getOutterTypeShowOrder', 'POST', params);
|
||||||
|
};
|
||||||
|
|
||||||
|
export const operateTypeForm = (params) => {
|
||||||
|
return WeaTools.callApi('/api/integration/Outter/operateTypeForm', 'POST', params);
|
||||||
|
};
|
||||||
|
|
@ -0,0 +1,59 @@
|
||||||
|
import {WeaTools} from 'ecCom';
|
||||||
|
|
||||||
|
export const getOutterSysList = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/Outter/getOutterSysList', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getOutterSysShareList = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/Outter/getOutterSysShareList', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getOutterEncryptList = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/Outter/getOutterEncryptList', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getOutterSysRightMenu = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/Outter/getOutterSysRightMenu', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getOutterEncryptRightMenu = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/Outter/getOutterEncryptRightMenu', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getOutterSysNewForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/Outter/getOutterSysNewForm', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getOutterSysIpAddressOperates = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/Outter/getOutterSysIpAddressOperates', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getOutterSysTypeNameOperates = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/Outter/getOutterSysTypeNameOperates', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getOutterSysEncryptTypeOperates = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/Outter/getOutterSysEncryptTypeOperates', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getOutterSysEncryptClassOperates = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/Outter/getOutterSysEncryptClassOperates', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getOutterSysIsNeedPwdAndIv = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/Outter/getOutterSysIsNeedPwdAndIv', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getOutterSysDefaultEntranceUrl = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/Outter/getOutterSysDefaultEntranceUrl', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getOutterSysShowOrder = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/Outter/getOutterSysShowOrder', 'POST', params);
|
||||||
|
};
|
||||||
|
export const operateOutterEncrypt = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/Outter/operateOutterEncrypt', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getOutterEncryptEditForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/Outter/getOutterEncryptEditForm', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getOutterEncryptClassTestForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/Outter/getOutterEncryptClassTestForm', 'POST', params);
|
||||||
|
};
|
||||||
|
export const GetCustomEncryptClass = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/Outter/GetCustomEncryptClass', 'POST', params);
|
||||||
|
};
|
||||||
|
export const operateOutterSys = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/Outter/operateOutterSys', 'POST', params);
|
||||||
|
};
|
||||||
|
export const getOutterSysEditForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/Outter/getOutterSysEditForm', 'POST', params);
|
||||||
|
};
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
import { WeaTools } from 'ecCom';
|
||||||
|
|
||||||
|
// 保存
|
||||||
|
export const save = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/webseal/save', 'POST', params);
|
||||||
|
};
|
||||||
|
|
||||||
|
// 提交
|
||||||
|
export const complete = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/webseal/submit', 'POST', params);
|
||||||
|
};
|
||||||
|
|
||||||
|
// 获取新建表单
|
||||||
|
export const getForm = params => {
|
||||||
|
return WeaTools.callApi('/api/integration/webseal/getForm', 'POST', params);
|
||||||
|
};
|
||||||
|
|
@ -0,0 +1,122 @@
|
||||||
|
import React, {Component} from 'react';
|
||||||
|
import {inject, observer} from "mobx-react";
|
||||||
|
import {toJS} from 'mobx';
|
||||||
|
import {Table} from 'antd';
|
||||||
|
import {WeaLocaleProvider} from "ecCom";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
@inject("coremailPortal")
|
||||||
|
@observer
|
||||||
|
class Main extends Component {
|
||||||
|
componentDidMount() {
|
||||||
|
const {from, coremailPortal} = this.props;
|
||||||
|
let params = {};
|
||||||
|
if (from == 'portal') {
|
||||||
|
params = this.props.params;
|
||||||
|
coremailPortal.init('/api/integration/coremail/datas/top', params.esetting);
|
||||||
|
} else {
|
||||||
|
params = JSON.parse(this.props.location.query.jsonstr);
|
||||||
|
// 获取location 的参数走接口;
|
||||||
|
coremailPortal.init('/api/integration/coremail/datas/more', params.esetting);
|
||||||
|
}
|
||||||
|
// 根据配置信息设置columns
|
||||||
|
let fieldcolumnList = ['subject', 'coreMailUser', 'createtime'];
|
||||||
|
// let fieldcolumnList = ['coreMailTitle', 'coreMailUser', 'coreMailTime'];
|
||||||
|
if (params && params.fieldcolumnList) {
|
||||||
|
fieldcolumnList = params.fieldcolumnList
|
||||||
|
}
|
||||||
|
|
||||||
|
let fieldcolumnwidths = {
|
||||||
|
subject: '30%',
|
||||||
|
coreMailUser: '30%',
|
||||||
|
createtime: '30%',
|
||||||
|
}
|
||||||
|
|
||||||
|
if (params && params.fieldcolumnwidths) {
|
||||||
|
fieldcolumnwidths = params.fieldcolumnwidths;
|
||||||
|
}
|
||||||
|
|
||||||
|
let eContentHintText = '您有 $NoReadCnt$ 封未读邮件,$LoginLinkStart$请登录查看$LoginLinkEnd$!';
|
||||||
|
let eContentUnreadMailQuantityColor = 'red';
|
||||||
|
let eContentSingleSignOnLinkColor = 'red';
|
||||||
|
if (params && params.esetting) {
|
||||||
|
const {esetting} = params;
|
||||||
|
if (esetting.eContentHintText) {
|
||||||
|
eContentHintText = esetting.eContentHintText;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (esetting.eContentUnreadMailQuantityColor) {
|
||||||
|
eContentUnreadMailQuantityColor = esetting.eContentUnreadMailQuantityColor;
|
||||||
|
eContentSingleSignOnLinkColor = esetting.eContentSingleSignOnLinkColor;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const state = {
|
||||||
|
columns: this.getColums(fieldcolumnList, fieldcolumnwidths),
|
||||||
|
eContentHintText,
|
||||||
|
eContentUnreadMailQuantityColor,
|
||||||
|
eContentSingleSignOnLinkColor,
|
||||||
|
}
|
||||||
|
coremailPortal.setState(state);
|
||||||
|
}
|
||||||
|
|
||||||
|
getColums(fieldcolumnList, fieldcolumnwidths) {
|
||||||
|
const names = {
|
||||||
|
subject: getLabel(344, '主题'),
|
||||||
|
coreMailUser: getLabel(129935, '发送人'),
|
||||||
|
createtime: getLabel(129936, '发送时间'),
|
||||||
|
}
|
||||||
|
let columns = [];
|
||||||
|
fieldcolumnList && fieldcolumnList.forEach((item) => {
|
||||||
|
let col = {
|
||||||
|
key: item,
|
||||||
|
dataIndex: item,
|
||||||
|
title: names[item],
|
||||||
|
width: fieldcolumnwidths[item],
|
||||||
|
}
|
||||||
|
if ('subject' == item) {
|
||||||
|
col.render = (text, record, index) => <a target="_blank" href={record.link}>{text}</a>
|
||||||
|
}
|
||||||
|
columns.push(col);
|
||||||
|
})
|
||||||
|
return columns;
|
||||||
|
}
|
||||||
|
|
||||||
|
renderText(state = {}, res = {}) {
|
||||||
|
let text = state.eContentHintText.replace('$NoReadCnt$',
|
||||||
|
`<span style="color: ${state.eContentUnreadMailQuantityColor}">${res.unReadCount}</span>`)
|
||||||
|
.replace('$LoginLinkStart$',
|
||||||
|
`<a href="${res.unReadLink}" target=${res.linkMode == 2 ? "_blank" : "_self"} style="color: ${state.eContentSingleSignOnLinkColor}">`)
|
||||||
|
.replace('$LoginLinkEnd$', '</a>');
|
||||||
|
return <div dangerouslySetInnerHTML={{__html: text}}></div>
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const {coremailPortal} = this.props;
|
||||||
|
const {loaded} = coremailPortal;
|
||||||
|
// const state = toJS(coremailPortal.state);
|
||||||
|
const res = toJS(coremailPortal.res);
|
||||||
|
|
||||||
|
return (<div>
|
||||||
|
{
|
||||||
|
loaded && !res.status && <div style={{color: 'red'}}
|
||||||
|
onCilck={() => res.ext && window.open(res.ext)}
|
||||||
|
>
|
||||||
|
{res.error}
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
{
|
||||||
|
loaded && res.status && <div
|
||||||
|
>
|
||||||
|
{this.renderText(coremailPortal.state, res.data)}
|
||||||
|
<Table ecId={`${this && this.props && this.props.ecId || ''}_Table@548av7`} dataSource={res.data.mail} columns={toJS(coremailPortal.state.columns)} pagination={false}/>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
</div>);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Main;
|
||||||
|
|
||||||
|
|
@ -0,0 +1,125 @@
|
||||||
|
// import React, { Component } from 'react';
|
||||||
|
// import {
|
||||||
|
// WeaTableEditable
|
||||||
|
// } from "ecCom";
|
||||||
|
|
||||||
|
// export default class CustomClient extends Component {
|
||||||
|
// constructor(props) {
|
||||||
|
// super(props);
|
||||||
|
// props.getInstance && props.getInstance(this);
|
||||||
|
// this.state = {
|
||||||
|
// datas: [
|
||||||
|
// {
|
||||||
|
// id: "1",
|
||||||
|
// textarea: "50",
|
||||||
|
// datepicker: "2018-07-11",
|
||||||
|
// check: "0",
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// id: "2",
|
||||||
|
// textarea: "50",
|
||||||
|
// datepicker: "2017-07-11",
|
||||||
|
// check: "1",
|
||||||
|
// }
|
||||||
|
// ],
|
||||||
|
// title: ["Demo"],
|
||||||
|
// /* ======================= 列配置数据 ======================= */
|
||||||
|
// columns: [
|
||||||
|
// {
|
||||||
|
// title: (
|
||||||
|
// <span>
|
||||||
|
// WeaTextarea
|
||||||
|
// </span>
|
||||||
|
// ),
|
||||||
|
// rowSpan: 2,
|
||||||
|
// width: "6%",
|
||||||
|
// dataIndex: "textarea",
|
||||||
|
// com: [
|
||||||
|
// {
|
||||||
|
// type: "TEXTAREA",
|
||||||
|
// key: "textarea",
|
||||||
|
// hasHiddenField: true,
|
||||||
|
// defaultValue: "defaultValue"
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// title: (
|
||||||
|
// <span>
|
||||||
|
// WeaDatePicker
|
||||||
|
// </span>
|
||||||
|
// ),
|
||||||
|
// rowSpan: 1,
|
||||||
|
// dataIndex: "datepicker",
|
||||||
|
// com: [{ type: "DATEPICKER", key: "datepicker" }]
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// title: (
|
||||||
|
// <span>
|
||||||
|
// check
|
||||||
|
// </span>
|
||||||
|
// ),
|
||||||
|
// dataIndex: "check",
|
||||||
|
// com: [{ type: "checkbox", key: "check" }]
|
||||||
|
// }
|
||||||
|
// ],
|
||||||
|
// showTitle: true,
|
||||||
|
// showCopy: false,
|
||||||
|
// showCollapse: true,
|
||||||
|
// buttonsType: "inline",
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// onSave = () => {
|
||||||
|
// const {
|
||||||
|
// datas=[]
|
||||||
|
// } = this.state;
|
||||||
|
|
||||||
|
// // 做自己的保存的操作
|
||||||
|
// console.log('do self save operation');
|
||||||
|
// // 添加span,最终在第三个步骤条显示的是span
|
||||||
|
// let newDatas = datas.map(data => {
|
||||||
|
// data && Object.keys(data) && Object.keys(datas).forEach(key => {
|
||||||
|
// if(key === "check") {
|
||||||
|
// data[`${key}span`] = (data[key] == '1' ? 'Y' : 'N');
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// return data;
|
||||||
|
// })
|
||||||
|
// return {
|
||||||
|
// rowKeys: (this.props && this.props.datas) ? this.props.datas : [], // 选中的文件keys
|
||||||
|
// datas: newDatas || [] //需要回显在第三步“选择”列的数据
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// onCancel = () => {
|
||||||
|
|
||||||
|
// // 做自己清除的操作
|
||||||
|
// console.log('do self clean operation');
|
||||||
|
|
||||||
|
// return {
|
||||||
|
// rowKeys: [], // 选中的文件keys
|
||||||
|
// datas: [] //需要回显在第三步“选择”列的数据
|
||||||
|
// };
|
||||||
|
// }
|
||||||
|
|
||||||
|
// render() {
|
||||||
|
// return (
|
||||||
|
// <div>
|
||||||
|
// {/* 可通过 this.props 获取传递过来的参数 this.props.datas */}
|
||||||
|
// <div style={{textAlign: "center", marginBottom: 20}}>
|
||||||
|
// {
|
||||||
|
// this.props.datas
|
||||||
|
// ? JSON.stringify(this.props.datas)
|
||||||
|
// : ""
|
||||||
|
// }
|
||||||
|
// </div>
|
||||||
|
// {/* 要展示的内容 */}
|
||||||
|
// <WeaTableEditable
|
||||||
|
// {...this.state}
|
||||||
|
// onChange={(datas) => this.setState({datas})}
|
||||||
|
// />
|
||||||
|
// </div>
|
||||||
|
// )
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
@ -0,0 +1,555 @@
|
||||||
|
// import React, { Component } from 'react';
|
||||||
|
// import {
|
||||||
|
// WeaTableEditable,
|
||||||
|
// WeaLocaleProvider,
|
||||||
|
// WeaCheckbox,
|
||||||
|
// WeaHelpfulTip,
|
||||||
|
// WeaTools,
|
||||||
|
// } from "ecCom";
|
||||||
|
// import './index.less';
|
||||||
|
|
||||||
|
// const {getLabel} = WeaLocaleProvider;
|
||||||
|
|
||||||
|
// export default class CustomClient extends Component {
|
||||||
|
// constructor(props) {
|
||||||
|
// super(props);
|
||||||
|
// props.getInstance && props.getInstance(this);
|
||||||
|
// this.state = {
|
||||||
|
// titles: [],
|
||||||
|
// datas: props.datas || [],
|
||||||
|
// tableInfo: {
|
||||||
|
// rowKey: "fileid",
|
||||||
|
// title: ["CUSTOMPAGE"],
|
||||||
|
// showTitle: true,
|
||||||
|
// showCopy: false,
|
||||||
|
// showCollapse: true,
|
||||||
|
// buttonsType: "inline",
|
||||||
|
// showCollapse: true,
|
||||||
|
// showAdd: false,
|
||||||
|
// showDelete: false
|
||||||
|
// },
|
||||||
|
// viewColumns: [{
|
||||||
|
// title: getLabel(0, "名称"),
|
||||||
|
// width: "20%",
|
||||||
|
// dataIndex: "name",
|
||||||
|
// com: [
|
||||||
|
// {
|
||||||
|
// type: "INPUT",
|
||||||
|
// key: "name",
|
||||||
|
// viewAttr: 1
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// }, {
|
||||||
|
// title: <span>
|
||||||
|
// {getLabel(0, "导入类型")}
|
||||||
|
// <WeaHelpfulTip style={{marginLeft: 10}} title={getLabel(0, "请选择需要更新的路径,确保两个路径类型的id、表单id一致或两个路径存在导入导出的关联关系,否则系统不允许更新(支持路径新增版本导入)")} />
|
||||||
|
// </span>,
|
||||||
|
// width: "15%",
|
||||||
|
// dataIndex: "importtype",
|
||||||
|
// com: [
|
||||||
|
// {
|
||||||
|
// type: "SELECT",
|
||||||
|
// key: "importtype",
|
||||||
|
// viewAttr: 1,
|
||||||
|
// options: [
|
||||||
|
// { key: "0", showname: getLabel(0, "新增") },
|
||||||
|
// { key: "1", showname: getLabel(0, "更新") }
|
||||||
|
// ]
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// }, {
|
||||||
|
// title: getLabel(0, "是否创建表单"),
|
||||||
|
// width: "10%",
|
||||||
|
// dataIndex: "createForm",
|
||||||
|
// com: [
|
||||||
|
// {
|
||||||
|
// type: "CHECKBOX",
|
||||||
|
// key: "createForm",
|
||||||
|
// display: "switch",
|
||||||
|
// viewAttr: 1,
|
||||||
|
// defaultValue: "0",
|
||||||
|
// helpfulTip: getLabel(507312, '使用系统中原有对应表单新增路径')+","+getLabel(509522, '只对自定义表单生效'),
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// }, {
|
||||||
|
// title: getLabel(509448, "需要更新的路径"),
|
||||||
|
// width: "25%",
|
||||||
|
// dataIndex: "workflowid",
|
||||||
|
// com: [
|
||||||
|
// {
|
||||||
|
// type: "BROWSER",
|
||||||
|
// key: "workflowid",
|
||||||
|
// browserConditionParam: { type: -99991 },
|
||||||
|
// viewAttr: 1,
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// }, {
|
||||||
|
// title: <span>
|
||||||
|
// {getLabel(0, "导入基础数据")}
|
||||||
|
// <WeaHelpfulTip style={{marginLeft: 10}} title={getLabel(0, "提示信息")} />
|
||||||
|
// </span>,
|
||||||
|
// width: "10%",
|
||||||
|
// dataIndex: "importBase",
|
||||||
|
// com: [
|
||||||
|
// {
|
||||||
|
// type: "CHECKBOX",
|
||||||
|
// key: "importBase",
|
||||||
|
// display: "switch",
|
||||||
|
// defaultValue: "0",
|
||||||
|
// viewAttr: 1,
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// }, {
|
||||||
|
// title: <span>
|
||||||
|
// {getLabel(0, "导入集成数据")}
|
||||||
|
// <WeaHelpfulTip style={{marginLeft: 10}} title={getLabel(0, "提示信息")} />
|
||||||
|
// </span>,
|
||||||
|
// dataIndex: "importIntegration",
|
||||||
|
// width: "10%",
|
||||||
|
// com: [
|
||||||
|
// {
|
||||||
|
// type: "checkbox",
|
||||||
|
// key: "importIntegration",
|
||||||
|
// display: "switch",
|
||||||
|
// viewAttr: 1,
|
||||||
|
// defaultValue: "0"
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// }],
|
||||||
|
// columns: [{
|
||||||
|
// title: getLabel(0, "名称"),
|
||||||
|
// width: "20%",
|
||||||
|
// dataIndex: "name",
|
||||||
|
// com: [
|
||||||
|
// {
|
||||||
|
// type: "INPUT",
|
||||||
|
// key: "name",
|
||||||
|
// viewAttr: 1
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// }, {
|
||||||
|
// title: <span>
|
||||||
|
// {getLabel(0, "导入类型")}
|
||||||
|
// <WeaHelpfulTip style={{marginLeft: 10}} title={getLabel(0, "提示信息")} />
|
||||||
|
// </span>,
|
||||||
|
// width: "15%",
|
||||||
|
// dataIndex: "importtype",
|
||||||
|
// com: [
|
||||||
|
// {
|
||||||
|
// type: "SELECT",
|
||||||
|
// key: "importtype",
|
||||||
|
// options: [
|
||||||
|
// { key: "0", showname: getLabel(0, "新增") },
|
||||||
|
// { key: "1", showname: getLabel(0, "更新") }
|
||||||
|
// ]
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// }, {
|
||||||
|
// title: getLabel(0, "是否创建表单"),
|
||||||
|
// width: "10%",
|
||||||
|
// dataIndex: "createForm",
|
||||||
|
// com: [
|
||||||
|
// {
|
||||||
|
// type: "CHECKBOX",
|
||||||
|
// key: "createForm",
|
||||||
|
// display: "switch",
|
||||||
|
// defaultValue: "0",
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// }, {
|
||||||
|
// title: getLabel(509448, "需要更新的路径"),
|
||||||
|
// width: "25%",
|
||||||
|
// dataIndex: "workflowid",
|
||||||
|
// com: [
|
||||||
|
// {
|
||||||
|
// type: "BROWSER",
|
||||||
|
// key: "workflowid",
|
||||||
|
// browserConditionParam: { type: -99991 },
|
||||||
|
// viewAttr: 1,
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// }, {
|
||||||
|
// title: <span>
|
||||||
|
// {getLabel(0, "导入基础数据")}
|
||||||
|
// <WeaHelpfulTip style={{marginLeft: 10}} title={getLabel(0, "提示信息")} />
|
||||||
|
// </span>,
|
||||||
|
// width: "10%",
|
||||||
|
// dataIndex: "importBase",
|
||||||
|
// com: [
|
||||||
|
// {
|
||||||
|
// type: "CHECKBOX",
|
||||||
|
// key: "importBase",
|
||||||
|
// display: "switch",
|
||||||
|
// defaultValue: "0"
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// }, {
|
||||||
|
// title: <span>
|
||||||
|
// {getLabel(0, "导入集成数据")}
|
||||||
|
// <WeaHelpfulTip style={{marginLeft: 10}} title={getLabel(0, "提示信息")} />
|
||||||
|
// </span>,
|
||||||
|
// dataIndex: "importIntegration",
|
||||||
|
// width: "10%",
|
||||||
|
// com: [
|
||||||
|
// {
|
||||||
|
// type: "checkbox",
|
||||||
|
// key: "importIntegration",
|
||||||
|
// display: "switch",
|
||||||
|
// defaultValue: "0"
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// }],
|
||||||
|
// selectedRowKeys: [],
|
||||||
|
// createFormRead: {
|
||||||
|
// workflowid: {
|
||||||
|
// com: [{
|
||||||
|
// type: "BROWSER",
|
||||||
|
// key: "workflowid",
|
||||||
|
// browserConditionParam: { type: -99991 },
|
||||||
|
// viewAttr: 2
|
||||||
|
// }]
|
||||||
|
// },
|
||||||
|
// createForm: {
|
||||||
|
// com: [{
|
||||||
|
// type: "CHECKBOX",
|
||||||
|
// key: "createForm",
|
||||||
|
// display: "switch",
|
||||||
|
// defaultValue: "0",
|
||||||
|
// viewAttr: 1,
|
||||||
|
// helpfulTip: getLabel(507312, '使用系统中原有对应表单新增路径')+","+getLabel(509522, '只对自定义表单生效')
|
||||||
|
// }]
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// componentDidMount() {
|
||||||
|
// WeaTools.callApi('/api/workflow/workflowImport/getImportNewForm', 'POST').then(result => {
|
||||||
|
// if(result.titles) {
|
||||||
|
// this.setState({
|
||||||
|
// titles: result.titles || [],
|
||||||
|
// viewColumns: [{
|
||||||
|
// title: getLabel(0, "名称"),
|
||||||
|
// width: "20%",
|
||||||
|
// dataIndex: "name",
|
||||||
|
// com: [
|
||||||
|
// {
|
||||||
|
// type: "INPUT",
|
||||||
|
// key: "name",
|
||||||
|
// viewAttr: 1
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// }, {
|
||||||
|
// title: <span>
|
||||||
|
// {getLabel(0, "导入类型")}
|
||||||
|
// <WeaHelpfulTip style={{marginLeft: 10}} title={result.titles[13] || ""} />
|
||||||
|
// </span>,
|
||||||
|
// width: "15%",
|
||||||
|
// dataIndex: "importtype",
|
||||||
|
// com: [
|
||||||
|
// {
|
||||||
|
// type: "SELECT",
|
||||||
|
// key: "importtype",
|
||||||
|
// viewAttr: 1,
|
||||||
|
// options: [
|
||||||
|
// { key: "0", showname: getLabel(0, "新增") },
|
||||||
|
// { key: "1", showname: getLabel(0, "更新") }
|
||||||
|
// ]
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// }, {
|
||||||
|
// title: getLabel(0, "是否创建表单"),
|
||||||
|
// width: "10%",
|
||||||
|
// dataIndex: "createForm",
|
||||||
|
// com: [
|
||||||
|
// {
|
||||||
|
// type: "CHECKBOX",
|
||||||
|
// key: "createForm",
|
||||||
|
// display: "switch",
|
||||||
|
// viewAttr: 1,
|
||||||
|
// defaultValue: "0",
|
||||||
|
// helpfulTip: getLabel(507312, '使用系统中原有对应表单新增路径')+","+getLabel(509522, '只对自定义表单生效'),
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// }, {
|
||||||
|
// title: getLabel(509448, "需要更新的路径"),
|
||||||
|
// width: "25%",
|
||||||
|
// dataIndex: "workflowid",
|
||||||
|
// com: [
|
||||||
|
// {
|
||||||
|
// type: "BROWSER",
|
||||||
|
// key: "workflowid",
|
||||||
|
// browserConditionParam: { type: -99991 },
|
||||||
|
// viewAttr: 1,
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// }, {
|
||||||
|
// title: <span>
|
||||||
|
// {getLabel(0, "导入基础数据")}
|
||||||
|
// <WeaHelpfulTip style={{marginLeft: 10}} title={result.titles[2]} />
|
||||||
|
// </span>,
|
||||||
|
// width: "10%",
|
||||||
|
// dataIndex: "importBase",
|
||||||
|
// com: [
|
||||||
|
// {
|
||||||
|
// type: "CHECKBOX",
|
||||||
|
// key: "importBase",
|
||||||
|
// display: "switch",
|
||||||
|
// defaultValue: "0",
|
||||||
|
// viewAttr: 1,
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// }, {
|
||||||
|
// title: <span>
|
||||||
|
// {getLabel(0, "导入集成数据")}
|
||||||
|
// <WeaHelpfulTip style={{marginLeft: 10}} title={result.titles[16]} />
|
||||||
|
// </span>,
|
||||||
|
// dataIndex: "importIntegration",
|
||||||
|
// width: "10%",
|
||||||
|
// com: [
|
||||||
|
// {
|
||||||
|
// type: "checkbox",
|
||||||
|
// key: "importIntegration",
|
||||||
|
// display: "switch",
|
||||||
|
// viewAttr: 1,
|
||||||
|
// defaultValue: "0"
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// }],
|
||||||
|
// columns: [{
|
||||||
|
// title: getLabel(0, "名称"),
|
||||||
|
// width: "20%",
|
||||||
|
// dataIndex: "name",
|
||||||
|
// com: [
|
||||||
|
// {
|
||||||
|
// type: "INPUT",
|
||||||
|
// key: "name",
|
||||||
|
// viewAttr: 1
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// }, {
|
||||||
|
// title: <span>
|
||||||
|
// {getLabel(0, "导入类型")}
|
||||||
|
// <WeaHelpfulTip style={{marginLeft: 10}} title={result.titles[13] || ""} />
|
||||||
|
// </span>,
|
||||||
|
// width: "15%",
|
||||||
|
// dataIndex: "importtype",
|
||||||
|
// com: [
|
||||||
|
// {
|
||||||
|
// type: "SELECT",
|
||||||
|
// key: "importtype",
|
||||||
|
// options: [
|
||||||
|
// { key: "0", showname: getLabel(0, "新增") },
|
||||||
|
// { key: "1", showname: getLabel(0, "更新") }
|
||||||
|
// ]
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// }, {
|
||||||
|
// title: getLabel(0, "是否创建表单"),
|
||||||
|
// width: "10%",
|
||||||
|
// dataIndex: "createForm",
|
||||||
|
// com: [
|
||||||
|
// {
|
||||||
|
// type: "CHECKBOX",
|
||||||
|
// key: "createForm",
|
||||||
|
// display: "switch",
|
||||||
|
// defaultValue: "0",
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// }, {
|
||||||
|
// title: getLabel(509448, "需要更新的路径"),
|
||||||
|
// width: "25%",
|
||||||
|
// dataIndex: "workflowid",
|
||||||
|
// com: [
|
||||||
|
// {
|
||||||
|
// type: "BROWSER",
|
||||||
|
// key: "workflowid",
|
||||||
|
// browserConditionParam: { type: -99991 },
|
||||||
|
// viewAttr: 1,
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// }, {
|
||||||
|
// title: <span>
|
||||||
|
// {getLabel(0, "导入基础数据")}
|
||||||
|
// <WeaHelpfulTip style={{marginLeft: 10}} title={result.titles[2]} />
|
||||||
|
// </span>,
|
||||||
|
// width: "10%",
|
||||||
|
// dataIndex: "importBase",
|
||||||
|
// com: [
|
||||||
|
// {
|
||||||
|
// type: "CHECKBOX",
|
||||||
|
// key: "importBase",
|
||||||
|
// display: "switch",
|
||||||
|
// defaultValue: "0"
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// }, {
|
||||||
|
// title: <span>
|
||||||
|
// {getLabel(0, "导入集成数据")}
|
||||||
|
// <WeaHelpfulTip style={{marginLeft: 10}} title={result.titles[16]} />
|
||||||
|
// </span>,
|
||||||
|
// dataIndex: "importIntegration",
|
||||||
|
// width: "10%",
|
||||||
|
// com: [
|
||||||
|
// {
|
||||||
|
// type: "checkbox",
|
||||||
|
// key: "importIntegration",
|
||||||
|
// display: "switch",
|
||||||
|
// defaultValue: "0"
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// }],
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
|
||||||
|
// componentWillReceiveProps(nextProps) {
|
||||||
|
// this.setState({
|
||||||
|
// datas: nextProps.datas,
|
||||||
|
// selectedRowKeys: []
|
||||||
|
// })
|
||||||
|
// };
|
||||||
|
|
||||||
|
// onSave = () => {
|
||||||
|
// const {
|
||||||
|
// datas,
|
||||||
|
// tableInfo,
|
||||||
|
// selectedRowKeys=[]
|
||||||
|
// } = this.state, {
|
||||||
|
// rowKey
|
||||||
|
// } = tableInfo;
|
||||||
|
|
||||||
|
// let saveDatas = [];
|
||||||
|
// datas && datas.forEach(data => {
|
||||||
|
// if(selectedRowKeys.includes(data[rowKey])) {
|
||||||
|
// saveDatas.push(data);
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// return {
|
||||||
|
// datas: saveDatas,
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// getColumns = (columns=[]) => {
|
||||||
|
// columns && columns.forEach((column, index) => {
|
||||||
|
// if(column.dataIndex === "createForm") {
|
||||||
|
// columns[index].com = [{
|
||||||
|
// type: 'CUSTOM',
|
||||||
|
// key: column.dataIndex,
|
||||||
|
// render: (text, record, index, onEdit) => {
|
||||||
|
// return <div>
|
||||||
|
// <WeaCheckbox
|
||||||
|
// value={record[column.dataIndex]}
|
||||||
|
// display="switch"
|
||||||
|
// onChange={(value) => onEdit({ record, index, key: column.dataIndex, value })}
|
||||||
|
// />
|
||||||
|
// {
|
||||||
|
// record[column.dataIndex] != '1'
|
||||||
|
// ? <WeaHelpfulTip
|
||||||
|
// title={getLabel(507312, '使用系统中原有对应表单新增路径')+","+getLabel(509522, '只对自定义表单生效')}
|
||||||
|
// />
|
||||||
|
// : null
|
||||||
|
// }
|
||||||
|
// </div>;
|
||||||
|
// }
|
||||||
|
// }];
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// return columns;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// getCells = (datas=[]) => {
|
||||||
|
// const {
|
||||||
|
// createFormRead,
|
||||||
|
// } = this.state;
|
||||||
|
|
||||||
|
// let cells = [];
|
||||||
|
|
||||||
|
// datas && datas.forEach(data => {
|
||||||
|
// if(data.importtype == '1') {
|
||||||
|
// cells.push({
|
||||||
|
// fileid: data.fileid,
|
||||||
|
// ...createFormRead
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// return cells;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// willEdit = (datas=[], editData) => {
|
||||||
|
// const {
|
||||||
|
// key,
|
||||||
|
// value,
|
||||||
|
// index,
|
||||||
|
// } = editData;
|
||||||
|
|
||||||
|
// if(key === "importtype") {
|
||||||
|
// if(value == '0') {
|
||||||
|
// datas[index] = {
|
||||||
|
// ...datas[index],
|
||||||
|
// workflowid: "",
|
||||||
|
// updatePathInput: "" //需要到时候看传递的数据格式怎么约定
|
||||||
|
// }
|
||||||
|
// }else if(value == '1') {
|
||||||
|
// datas[index] = {
|
||||||
|
// ...datas[index],
|
||||||
|
// createForm: "0"
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }else if(key === "workflowid") {
|
||||||
|
// const {browserDatas=[]} = editData;
|
||||||
|
// if(browserDatas && browserDatas.length) {
|
||||||
|
// const {id="", name=""} = browserDatas[0];
|
||||||
|
// datas[index] = {
|
||||||
|
// ...datas[index],
|
||||||
|
// updatePathInput: name,
|
||||||
|
// workflowid: id
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// this.setState({datas});
|
||||||
|
// }
|
||||||
|
|
||||||
|
// // 重新渲染数据
|
||||||
|
// renderDatas = (datas=[]) => {
|
||||||
|
// return datas && datas.map(data => {
|
||||||
|
// return {
|
||||||
|
// ...data,
|
||||||
|
// workflowidspan: data.updatePathInput
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
|
||||||
|
// render() {
|
||||||
|
// const {
|
||||||
|
// datas,
|
||||||
|
// columns,
|
||||||
|
// viewColumns
|
||||||
|
// } = this.state;
|
||||||
|
|
||||||
|
// return (
|
||||||
|
// <WeaTableEditable
|
||||||
|
// {...this.state.tableInfo}
|
||||||
|
// className="inte-type-custom-page"
|
||||||
|
// columns={this.props.viewAttr == 1 ? viewColumns : this.getColumns(columns)}
|
||||||
|
// datas={this.renderDatas(datas)}
|
||||||
|
// cells={this.props.viewAttr == 1 ? [] : this.getCells(datas)}
|
||||||
|
// willEdit={(datas, editData) => this.willEdit(datas, editData)}
|
||||||
|
// onRowSelect={selectedRowKeys => {
|
||||||
|
// this.setState({selectedRowKeys});
|
||||||
|
// }}
|
||||||
|
// getRowSelection={v => {
|
||||||
|
// if(this.props.viewAttr == 1) {
|
||||||
|
// return false;
|
||||||
|
// }
|
||||||
|
// }}
|
||||||
|
// onChange={(datas) => {
|
||||||
|
// this.setState({
|
||||||
|
// datas
|
||||||
|
// });
|
||||||
|
// }}
|
||||||
|
// />
|
||||||
|
// )
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
// div.inte-type-custom-page{
|
||||||
|
// tbody.ant-table-tbody {
|
||||||
|
// span.wea-helpful-tip {
|
||||||
|
// position: relative !important;
|
||||||
|
// right: -10px !important;
|
||||||
|
// top: 0px !important;
|
||||||
|
// // margin-left: 5px;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
@ -0,0 +1,306 @@
|
||||||
|
import React, { Component } from 'react';
|
||||||
|
import {
|
||||||
|
WeaDialog,
|
||||||
|
WeaRightMenu,
|
||||||
|
WeaFormItem,
|
||||||
|
WeaLocaleProvider
|
||||||
|
} from "ecCom";
|
||||||
|
import {
|
||||||
|
WeaSwitch
|
||||||
|
} from "comsMobx";
|
||||||
|
import {
|
||||||
|
inject,
|
||||||
|
observer
|
||||||
|
} from "mobx-react";
|
||||||
|
import {toJS} from "mobx";
|
||||||
|
import {
|
||||||
|
Button
|
||||||
|
} from "antd";
|
||||||
|
import {
|
||||||
|
onCheck
|
||||||
|
} from "../../util/IntegrationUtil";
|
||||||
|
|
||||||
|
const {getLabel} = WeaLocaleProvider;
|
||||||
|
|
||||||
|
@inject("ExchangeStore")
|
||||||
|
@observer
|
||||||
|
export default class NewShare extends Component {
|
||||||
|
getRightMenus = () => {
|
||||||
|
return [{
|
||||||
|
type: "primary",
|
||||||
|
key: "BTN_SAVE",
|
||||||
|
icon: <i className="icon-coms-Preservation" />,
|
||||||
|
content: getLabel(30986, '保存'),
|
||||||
|
onClick: () => this.onMenuClick("BTN_SAVE")
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
getBtns = () => {
|
||||||
|
return [<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@0v9sxq@integrationExchangeNewShareButtonSave`} type="primary" key="BTN_SAVE" onClick={() => this.onMenuClick("BTN_SAVE")}>{getLabel(30986, '保存')}</Button>];
|
||||||
|
}
|
||||||
|
|
||||||
|
hideShareField = (params) => {
|
||||||
|
const {
|
||||||
|
permissiontype,
|
||||||
|
jobtitlelevel,
|
||||||
|
} = params;
|
||||||
|
|
||||||
|
let temp;
|
||||||
|
|
||||||
|
if (permissiontype == '1') {
|
||||||
|
temp = ['sharevalue6', 'sharevalue5', 'sharevalue2', 'sharevalue7', 'jobtitlesharevalue2', 'jobtitlesharevalue3'];
|
||||||
|
}
|
||||||
|
if (permissiontype == '6') {
|
||||||
|
temp = ['sharevalue1', 'sharevalue5', 'sharevalue2', 'sharevalue7', 'jobtitlesharevalue2', 'jobtitlesharevalue3'];
|
||||||
|
}
|
||||||
|
if (permissiontype == '3') {
|
||||||
|
temp = ['sharevalue1', 'sharevalue6', 'sharevalue5', 'sharevalue2', 'sharevalue7', 'jobtitlesharevalue2', 'jobtitlesharevalue3'];
|
||||||
|
}
|
||||||
|
if (permissiontype == '5') {
|
||||||
|
temp = ['sharevalue1', 'sharevalue6', 'sharevalue2', 'sharevalue7', 'jobtitlesharevalue2', 'jobtitlesharevalue3'];
|
||||||
|
}
|
||||||
|
if (permissiontype == '2') {
|
||||||
|
temp = ['sharevalue1', 'sharevalue6', 'sharevalue5', 'sharevalue7', 'jobtitlesharevalue2', 'jobtitlesharevalue3'];
|
||||||
|
}
|
||||||
|
if (permissiontype == '7') {
|
||||||
|
if (jobtitlelevel == '1') {
|
||||||
|
temp = ['sharevalue1', 'sharevalue6', 'sharevalue5', 'sharevalue2', 'jobtitlesharevalue2', 'jobtitlesharevalue3'];
|
||||||
|
}
|
||||||
|
if (jobtitlelevel == '2') {
|
||||||
|
temp = ['sharevalue1', 'sharevalue6', 'sharevalue5', 'sharevalue2', 'jobtitlesharevalue3'];
|
||||||
|
}
|
||||||
|
if (jobtitlelevel == '3') {
|
||||||
|
temp = ['sharevalue1', 'sharevalue6', 'sharevalue5', 'sharevalue2', 'jobtitlesharevalue2'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
window.e9HideFormFieldKeys = temp;
|
||||||
|
}
|
||||||
|
|
||||||
|
onMenuClick = (type="") => {
|
||||||
|
const{
|
||||||
|
ExchangeStore
|
||||||
|
} = this.props, {
|
||||||
|
doOperationlimit,
|
||||||
|
shareForm,
|
||||||
|
} = ExchangeStore;
|
||||||
|
if(type === "BTN_SAVE") {
|
||||||
|
const params = shareForm.getFormParams();
|
||||||
|
this.hideShareField(params);
|
||||||
|
onCheck(shareForm, () => {
|
||||||
|
doOperationlimit({
|
||||||
|
operate: "addShare",
|
||||||
|
...params
|
||||||
|
});
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getForm = (form, condition=[]) => {
|
||||||
|
const {
|
||||||
|
permissiontype,
|
||||||
|
} = form.getFormParams(), {
|
||||||
|
isFormInit,
|
||||||
|
} = form;
|
||||||
|
|
||||||
|
let arr = [];
|
||||||
|
isFormInit && condition.forEach(c => {
|
||||||
|
c && c.items && c.items.forEach(field => {
|
||||||
|
const key = field.domkey[0];
|
||||||
|
if (this.filter({
|
||||||
|
permissiontype,
|
||||||
|
key
|
||||||
|
})) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
arr.push(<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@8xbxrn@integrationExchangeNewShareForm${key}`}
|
||||||
|
label={`${field.label}`}
|
||||||
|
labelCol={{span: 5, offset: 3}}
|
||||||
|
wrapperCol={{span: 12}}
|
||||||
|
error={form.getError(field)}
|
||||||
|
tipPosition="bottom"
|
||||||
|
style={{padding: 8}}
|
||||||
|
>
|
||||||
|
<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@88h767@integrationExchangeNewShareForm${key}`} fieldConfig={field} form={form} formParams={form.getFormParams()} onChange={cb => this.handleChange(cb)}/>
|
||||||
|
</WeaFormItem>)
|
||||||
|
|
||||||
|
arr = [...arr, this.add({
|
||||||
|
permissiontype,
|
||||||
|
key,
|
||||||
|
form,
|
||||||
|
})];
|
||||||
|
|
||||||
|
|
||||||
|
})
|
||||||
|
})
|
||||||
|
return <div style={{paddingTop: 15}} className='integrated-share-form'>{arr}</div>
|
||||||
|
}
|
||||||
|
|
||||||
|
filter = (params) => {
|
||||||
|
const {
|
||||||
|
permissiontype,
|
||||||
|
key
|
||||||
|
} = params;
|
||||||
|
|
||||||
|
if (key == 'sharevalue2' || key == 'rolelevel' || key == 'jobtitlelevel' || key == 'jobtitlesharevalue2' || key == 'jobtitlesharevalue3') {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
if (permissiontype == '1' && !(key == 'permissiontype' || key == 'sharevalue1' || key == 'seclevel')) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
if (permissiontype == '6' && !(key == 'permissiontype' || key == 'sharevalue6' || key == 'seclevel')) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
if (permissiontype == '3' && !(key == 'permissiontype' || key == 'seclevel')) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
if (permissiontype == '5' && !(key == 'permissiontype' || key == 'sharevalue5')) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
if (permissiontype == '2' && !(key == 'permissiontype' || key == 'seclevel')) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
if (permissiontype == '7' && !(key == 'permissiontype' || key == 'sharevalue7')) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
add = (params) => {
|
||||||
|
const {
|
||||||
|
permissiontype,
|
||||||
|
key,
|
||||||
|
form,
|
||||||
|
} = params;
|
||||||
|
|
||||||
|
let temp = [];
|
||||||
|
if (permissiontype == '2' && key == 'permissiontype') {
|
||||||
|
temp.push(this.getRole(form));
|
||||||
|
}
|
||||||
|
if (permissiontype == '7' && key == 'sharevalue7') {
|
||||||
|
temp.push(this.getPost(form));
|
||||||
|
}
|
||||||
|
|
||||||
|
return temp
|
||||||
|
}
|
||||||
|
|
||||||
|
handleChange = (cb) => {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
getRole = (form) => {
|
||||||
|
const {
|
||||||
|
ExchangeStore
|
||||||
|
} = this.props, {
|
||||||
|
role
|
||||||
|
} = toJS(ExchangeStore.status);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@nhyt9h`}
|
||||||
|
label={getLabel(122,'角色')}
|
||||||
|
labelCol={{span: 5, offset: 3}}
|
||||||
|
wrapperCol={{span: 12}}
|
||||||
|
style={{padding: 8}}
|
||||||
|
>
|
||||||
|
{role.map((field, index) => {
|
||||||
|
return (<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@vuh1jm@integrationExchangeNewShareForm${field.domkey[0]}`}
|
||||||
|
label={index == 0 ? '' : getLabel(139,'级别')}
|
||||||
|
colon={index == 0 ? false : true}
|
||||||
|
labelCol={{span: (index == 0) ? 0 : 7}}
|
||||||
|
error={form.getError(field)}
|
||||||
|
tipPosition="bottom"
|
||||||
|
wrapperCol={{span: (index == 0) ? 24 : 17}}
|
||||||
|
style={{float:'left', width:150, marginLeft:(index == 1) ? 27 : 0}}
|
||||||
|
>
|
||||||
|
<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@a0waxc@integrationExchangeNewShareForm${field.domkey[0]}`} fieldConfig={field} form={form} formParams={form.getFormParams()} onChange={cb => this.handleChange(cb)}/>
|
||||||
|
</WeaFormItem>)
|
||||||
|
})}
|
||||||
|
</WeaFormItem>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
getPost = (form) => {
|
||||||
|
const {
|
||||||
|
ExchangeStore
|
||||||
|
} = this.props, {
|
||||||
|
post
|
||||||
|
} = toJS(ExchangeStore.status), {
|
||||||
|
jobtitlelevel
|
||||||
|
} = form.getFormParams();
|
||||||
|
|
||||||
|
let temp;
|
||||||
|
if (jobtitlelevel == '1') {
|
||||||
|
temp = post.slice(0, 1)
|
||||||
|
}
|
||||||
|
if (jobtitlelevel == '2') {
|
||||||
|
temp = post.slice(0, 2)
|
||||||
|
}
|
||||||
|
if (jobtitlelevel == '3') {
|
||||||
|
temp = post.slice(0, 1).concat(post.slice(2))
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@4oytog`}
|
||||||
|
label={getLabel(6086,'岗位')}
|
||||||
|
labelCol={{span: 5, offset: 3}}
|
||||||
|
wrapperCol={{span: 12}}
|
||||||
|
style={{padding: 8}}
|
||||||
|
>
|
||||||
|
{temp.map((field, index) => {
|
||||||
|
return (<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@zxak0z@integrationExchangeNewShareForm${field.domkey[0]}`}
|
||||||
|
label={''}
|
||||||
|
colon={false}
|
||||||
|
labelCol={{span:0}}
|
||||||
|
error={form.getError(field)}
|
||||||
|
tipPosition="bottom"
|
||||||
|
wrapperCol={{span: 24}}
|
||||||
|
style={{float:'left', width: (index == 0) ? 120 : 197, marginLeft:(index == 1) ? 10 : 0}}
|
||||||
|
>
|
||||||
|
<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@zqkedu@integrationExchangeNewShareForm${field.domkey[0]}`} fieldConfig={field} form={form} formParams={form.getFormParams()} onChange={cb => this.handleChange(cb)}/>
|
||||||
|
</WeaFormItem>)
|
||||||
|
})}
|
||||||
|
</WeaFormItem>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const{
|
||||||
|
ExchangeStore
|
||||||
|
} = this.props, {
|
||||||
|
status,
|
||||||
|
shareForm,
|
||||||
|
} = ExchangeStore, {
|
||||||
|
showShareForm,
|
||||||
|
shareFormCondition,
|
||||||
|
collectParams
|
||||||
|
} = toJS(status);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@px8bl6`}
|
||||||
|
title={getLabel(19910, '共享范围')}
|
||||||
|
moduleName="integration"
|
||||||
|
hasScroll={true}
|
||||||
|
style={{width: 800, height: 600}}
|
||||||
|
visible={showShareForm}
|
||||||
|
onCancel={v => ExchangeStore.setState({showShareForm: false})}
|
||||||
|
buttons={this.getBtns()}
|
||||||
|
moreBtn={{
|
||||||
|
datas: this.getRightMenus(),
|
||||||
|
collectParams
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@5c84wy`}
|
||||||
|
datas={this.getRightMenus()}
|
||||||
|
collectParams={collectParams}
|
||||||
|
>
|
||||||
|
{this.getForm(shareForm, shareFormCondition)}
|
||||||
|
</WeaRightMenu>
|
||||||
|
</WeaDialog>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,177 @@
|
||||||
|
import {inject, observer} from "mobx-react";
|
||||||
|
import {toJS} from "mobx";
|
||||||
|
import {
|
||||||
|
WeaTab,
|
||||||
|
WeaDialog,
|
||||||
|
WeaRightMenu,
|
||||||
|
WeaButtonIcon,
|
||||||
|
WeaLocaleProvider,
|
||||||
|
} from "ecCom";
|
||||||
|
import {
|
||||||
|
WeaTableNew,
|
||||||
|
} from "comsMobx";
|
||||||
|
import {
|
||||||
|
onCheck,
|
||||||
|
doConfirm
|
||||||
|
} from "../../util/IntegrationUtil";
|
||||||
|
import NewShare from './NewShare';
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
const { WeaTable } = WeaTableNew;
|
||||||
|
|
||||||
|
@inject("ExchangeStore")
|
||||||
|
@observer
|
||||||
|
class SyncDataRange extends React.Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
buttonLoading: false
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
const { ExchangeStore } = this.props;
|
||||||
|
ExchangeStore.doLoginURLInit();
|
||||||
|
this.setState({
|
||||||
|
buttonLoading: false
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps) {
|
||||||
|
const { ExchangeStore } = this.props;
|
||||||
|
if (this.props.location && nextProps.location && this.props.location.key !== nextProps.location.key) {
|
||||||
|
ExchangeStore.doLoginURLInit();
|
||||||
|
this.setState({
|
||||||
|
buttonLoading: false
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关闭弹窗
|
||||||
|
*/
|
||||||
|
handleCancle = () => {
|
||||||
|
const {
|
||||||
|
ExchangeStore
|
||||||
|
} = this.props;
|
||||||
|
|
||||||
|
ExchangeStore.setState({
|
||||||
|
showSyncDataRange: false
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 按钮的显示和事件
|
||||||
|
*/
|
||||||
|
onMenuClick = (type) => {
|
||||||
|
const {
|
||||||
|
ExchangeStore
|
||||||
|
} = this.props, {
|
||||||
|
loginURLForm,
|
||||||
|
doOperationlimit,
|
||||||
|
} = ExchangeStore;
|
||||||
|
if(type && "BTN_SAVE" === type.toLocaleUpperCase()) {
|
||||||
|
onCheck(loginURLForm, () => {
|
||||||
|
this.setState({buttonLoading: true});
|
||||||
|
doOperationlimit({...loginURLForm.getFormParams(), operate: "SaveUserAndPwd"}, (result) => {
|
||||||
|
this.setState({buttonLoading: false});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
getBtns = (datas=[], disabled) => {
|
||||||
|
const {
|
||||||
|
ExchangeStore
|
||||||
|
} = this.props;
|
||||||
|
|
||||||
|
return [
|
||||||
|
<WeaButtonIcon ecId={`${this && this.props && this.props.ecId || ''}_WeaButtonIcon@hh8o31@integrationExchangeSyncDataRangeButtonSHARE_ADD`}
|
||||||
|
disabled={disabled}
|
||||||
|
onClick={() => this.onMenuClick("SHARE_ADD")}
|
||||||
|
buttonType='add' type="primary" />,
|
||||||
|
<WeaButtonIcon ecId={`${this && this.props && this.props.ecId || ''}_WeaButtonIcon@yhqyou@integrationExchangeSyncDataRangeButtonSHARE_DELETE`}
|
||||||
|
disabled={disabled || toJS(ExchangeStore.authStore.selectedRowKeys).length === 0}
|
||||||
|
onClick={() => this.onMenuClick("SHARE_DELETE")}
|
||||||
|
buttonType='del' type="primary" />
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
||||||
|
getRightMenu = (datas=[], disabled) => {
|
||||||
|
const {
|
||||||
|
ExchangeStore
|
||||||
|
} = this.props;
|
||||||
|
return datas && datas.map(data => {
|
||||||
|
return {
|
||||||
|
...data,
|
||||||
|
icon: <i className={data.icon} />,
|
||||||
|
disabled: data.key === "SHARE_ADD" ? disabled : (disabled || toJS(ExchangeStore.authStore.selectedRowKeys).length === 0),
|
||||||
|
onClick: () => this.onMenuClick(data.key)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
onMenuClick = (type) => {
|
||||||
|
const {
|
||||||
|
ExchangeStore
|
||||||
|
} = this.props, {
|
||||||
|
doOperationlimit,
|
||||||
|
authStore
|
||||||
|
} = ExchangeStore, {
|
||||||
|
selectedRowKeys
|
||||||
|
} = toJS(authStore);
|
||||||
|
|
||||||
|
if("SHARE_DELETE" === type) {
|
||||||
|
doConfirm(getLabel(385625, '确定要删除选择的记录吗?'), () => {
|
||||||
|
doOperationlimit({operate: "delShare", id: selectedRowKeys});
|
||||||
|
})
|
||||||
|
}else if("SHARE_ADD" === type) {
|
||||||
|
ExchangeStore.setState({showShareForm: true});
|
||||||
|
doOperationlimit({operate: "getAddShareForm"});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const {
|
||||||
|
ExchangeStore
|
||||||
|
} = this.props, {
|
||||||
|
status,
|
||||||
|
authStore,
|
||||||
|
} = ExchangeStore, {
|
||||||
|
dataRangeMenus,
|
||||||
|
authLoading,
|
||||||
|
collectParams,
|
||||||
|
showSyncDataRange
|
||||||
|
} = toJS(status);
|
||||||
|
return (
|
||||||
|
<WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@nxumrx`}
|
||||||
|
title={getLabel('517147','同步数据范围') }
|
||||||
|
moduleName="integration"
|
||||||
|
visible={showSyncDataRange}
|
||||||
|
hasScroll={true}
|
||||||
|
loading={authLoading}
|
||||||
|
style={{width: 800, height: 600}}
|
||||||
|
onCancel={this.handleCancle}
|
||||||
|
>
|
||||||
|
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@2nxl3i`}
|
||||||
|
datas={this.getRightMenu(dataRangeMenus, authLoading)}
|
||||||
|
collectParams={collectParams}
|
||||||
|
>
|
||||||
|
<WeaTab ecId={`${this && this.props && this.props.ecId || ''}_WeaTab@8xosff`}
|
||||||
|
keyParams="viewcondition"
|
||||||
|
datas={[]}
|
||||||
|
buttons={this.getBtns(dataRangeMenus, authLoading)}
|
||||||
|
/>
|
||||||
|
<WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@y1lyup`}
|
||||||
|
comsWeaTableStore={authStore}
|
||||||
|
hasOrder={true}
|
||||||
|
needScroll={true}
|
||||||
|
/>
|
||||||
|
<NewShare ecId={`${this && this.props && this.props.ecId || ''}_NewShare@faxuda`} />
|
||||||
|
</WeaRightMenu>
|
||||||
|
</WeaDialog>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default SyncDataRange;
|
||||||
|
|
@ -0,0 +1,171 @@
|
||||||
|
import {inject, observer} from "mobx-react";
|
||||||
|
import {toJS} from "mobx";
|
||||||
|
import {
|
||||||
|
Button,
|
||||||
|
} from "antd";
|
||||||
|
import {
|
||||||
|
WeaTop,
|
||||||
|
WeaFormItem,
|
||||||
|
WeaRightMenu,
|
||||||
|
WeaNewScroll,
|
||||||
|
WeaSearchGroup,
|
||||||
|
WeaLocaleProvider,
|
||||||
|
} from "ecCom";
|
||||||
|
import {
|
||||||
|
WeaSwitch,
|
||||||
|
} from "comsMobx";
|
||||||
|
import NoRight from "../../public/NoRight";
|
||||||
|
import {
|
||||||
|
onCheck,
|
||||||
|
getForm
|
||||||
|
} from "../../util/IntegrationUtil";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
@inject("ExchangeStore")
|
||||||
|
@observer
|
||||||
|
class UserLoginURL extends React.Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
buttonLoading: false
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
const { ExchangeStore } = this.props;
|
||||||
|
ExchangeStore.doLoginURLInit();
|
||||||
|
this.setState({
|
||||||
|
buttonLoading: false
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps) {
|
||||||
|
const { ExchangeStore } = this.props;
|
||||||
|
if (this.props.location.key !== nextProps.location.key) {
|
||||||
|
ExchangeStore.doLoginURLInit();
|
||||||
|
this.setState({
|
||||||
|
buttonLoading: false
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 按钮的显示和事件
|
||||||
|
*/
|
||||||
|
onMenuClick = (type) => {
|
||||||
|
const {
|
||||||
|
ExchangeStore
|
||||||
|
} = this.props, {
|
||||||
|
loginURLForm,
|
||||||
|
doOperationlimit,
|
||||||
|
} = ExchangeStore;
|
||||||
|
if(type && "BTN_SAVE" === type.toLocaleUpperCase()) {
|
||||||
|
onCheck(loginURLForm, () => {
|
||||||
|
this.setState({buttonLoading: true});
|
||||||
|
doOperationlimit({...loginURLForm.getFormParams(), operate: "SaveUserAndPwd"}, (result) => {
|
||||||
|
this.setState({buttonLoading: false});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
getBtns = (datas=[]) => {
|
||||||
|
return datas && datas.map(data => <Button ecId={`${this && this.props && this.props.ecId || ''}_Button@g5fp4r@integrationExchangeUserLoginButton${data.key}`} disabled={this.state.buttonLoading} type={data.type} key={data.key} onClick={() => this.onMenuClick(data.key)}>{data.content}</Button>);
|
||||||
|
};
|
||||||
|
|
||||||
|
getRightMenu = (datas=[]) => {
|
||||||
|
return datas && datas.map(data => {
|
||||||
|
return {
|
||||||
|
...data,
|
||||||
|
disabled: this.state.buttonLoading,
|
||||||
|
onClick: () => this.onMenuClick(data.key)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
getForm = (form, datas=[]) => {
|
||||||
|
const {
|
||||||
|
isFormInit
|
||||||
|
} = form;
|
||||||
|
const formParams = form.getFormParams();
|
||||||
|
let group = [];
|
||||||
|
isFormInit && datas && datas.forEach((c, index) => {
|
||||||
|
let items = [];
|
||||||
|
c && c.items && c.items.forEach(fields => {
|
||||||
|
let key = fields.domkey[0];
|
||||||
|
items.push({
|
||||||
|
com: (
|
||||||
|
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@6qjgvw@integrationExchangeUserLoginForm${key}`}
|
||||||
|
label={fields.label}
|
||||||
|
labelCol={{span: fields.labelcol}}
|
||||||
|
wrapperCol={{span: fields.fieldcol}}
|
||||||
|
error={form.getError(fields)}
|
||||||
|
tipPosition="bottom"
|
||||||
|
>
|
||||||
|
<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@wcw5z1@integrationExchangeUserLoginForm${key}`} fieldConfig={fields} form={form} formParams={formParams} />
|
||||||
|
</WeaFormItem>),
|
||||||
|
colSpan: 1,
|
||||||
|
hide: form.isHide(fields, (keys, allParams) => {
|
||||||
|
let bool = false;
|
||||||
|
fields && fields.showWhere && fields.showWhere.length > 0 && fields.showWhere.forEach(w => {
|
||||||
|
if(!bool){
|
||||||
|
let show = false;
|
||||||
|
for(let val of w.value){
|
||||||
|
if(allParams[w.domkey] == val){
|
||||||
|
show = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
bool = !show;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return bool;
|
||||||
|
})
|
||||||
|
});
|
||||||
|
})
|
||||||
|
group.push(<WeaSearchGroup ecId={`${this && this.props && this.props.ecId || ''}_WeaSearchGroup@orktmw@integrationExchangeUserLoginForm${index}`} col={1} center={true} needTigger={true} title={c.title} showGroup={c.defaultshow} items={items}/>)
|
||||||
|
});
|
||||||
|
return group;
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const {
|
||||||
|
ExchangeStore
|
||||||
|
} = this.props, {
|
||||||
|
status,
|
||||||
|
loginURLForm,
|
||||||
|
} = ExchangeStore, {
|
||||||
|
urlMenus,
|
||||||
|
loginURLLoading,
|
||||||
|
loginURLhasRight,
|
||||||
|
urlCollectParams,
|
||||||
|
loginURLCondition,
|
||||||
|
} = toJS(status);
|
||||||
|
return (
|
||||||
|
loginURLLoading
|
||||||
|
? null
|
||||||
|
: loginURLhasRight
|
||||||
|
? <WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@emy4q9`}
|
||||||
|
datas={this.getRightMenu(urlMenus)}
|
||||||
|
collectParams={urlCollectParams}
|
||||||
|
>
|
||||||
|
<WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@lgxlg4`}
|
||||||
|
title={getLabel('517412','Exchange集成')}
|
||||||
|
icon={<i className="icon-coms-integration" />}
|
||||||
|
iconBgcolor="#1a57a0"
|
||||||
|
buttons={this.getBtns(urlMenus)}
|
||||||
|
showDropIcon={true}
|
||||||
|
dropMenuDatas={this.getRightMenu(urlMenus)}
|
||||||
|
dropMenuProps={{collectParams: urlCollectParams}}
|
||||||
|
/>
|
||||||
|
<WeaNewScroll ecId={`${this && this.props && this.props.ecId || ''}_WeaNewScroll@tdeens`} height={"calc(100% - 54px)"}>
|
||||||
|
{getForm(loginURLForm, loginURLCondition, true, null, null, null, this && this.props && this.props.ecId || '', "integrationExchangeLoginUrlForm")}
|
||||||
|
</WeaNewScroll>
|
||||||
|
</WeaRightMenu>
|
||||||
|
: <NoRight ecId={`${this && this.props && this.props.ecId || ''}_NoRight@1vvvkc`}/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default UserLoginURL;
|
||||||
|
|
@ -0,0 +1,393 @@
|
||||||
|
import {inject, observer} from "mobx-react";
|
||||||
|
import {toJS} from "mobx";
|
||||||
|
import {
|
||||||
|
Button,
|
||||||
|
message
|
||||||
|
} from "antd";
|
||||||
|
import {
|
||||||
|
WeaTop,
|
||||||
|
WeaTab,
|
||||||
|
WeaFormItem,
|
||||||
|
WeaRightMenu,
|
||||||
|
WeaNewScroll,
|
||||||
|
WeaHelpfulTip,
|
||||||
|
WeaSearchGroup,
|
||||||
|
WeaLocaleProvider,
|
||||||
|
} from "ecCom";
|
||||||
|
import {
|
||||||
|
WeaSwitch,
|
||||||
|
WeaTableNew
|
||||||
|
} from "comsMobx";
|
||||||
|
import NoRight from "../../public/NoRight";
|
||||||
|
import NonStand from "../../public/NonStand";
|
||||||
|
import {
|
||||||
|
onCheck,
|
||||||
|
getSearchBtns,
|
||||||
|
getAdvancedItem,
|
||||||
|
} from "../../util/IntegrationUtil";
|
||||||
|
import copy from 'copy-to-clipboard';
|
||||||
|
import CronExp from '../../public/CronExp';
|
||||||
|
import SyncDataRange from './SyncDataRange';
|
||||||
|
|
||||||
|
const { WeaTable } = WeaTableNew;
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
@inject("ExchangeStore")
|
||||||
|
@observer
|
||||||
|
class Exchange extends React.Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
selectedKey: 0,
|
||||||
|
visiable: false,
|
||||||
|
showSearchAd: false
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
const { ExchangeStore } = this.props;
|
||||||
|
ExchangeStore.doInit();
|
||||||
|
this.setState({
|
||||||
|
showSearchAd: false
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps) {
|
||||||
|
const { ExchangeStore } = this.props;
|
||||||
|
if (this.props.location && nextProps.location && this.props.location.key !== nextProps.location.key) {
|
||||||
|
ExchangeStore.doInit();
|
||||||
|
this.setState({
|
||||||
|
showSearchAd: false
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// tab高级搜索
|
||||||
|
getSearchBtns = () => {
|
||||||
|
const {
|
||||||
|
ExchangeStore
|
||||||
|
} = this.props, {
|
||||||
|
searchForm
|
||||||
|
} = ExchangeStore;
|
||||||
|
return getSearchBtns(
|
||||||
|
this.onSearch,
|
||||||
|
() => searchForm.reset(),
|
||||||
|
() => this.setState({showSearchAd: false}),
|
||||||
|
this && this.props && this.props.ecId || '',
|
||||||
|
"integrationExchange",
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
getAdvancedItem = () => {
|
||||||
|
const {
|
||||||
|
ExchangeStore
|
||||||
|
} = this.props, {
|
||||||
|
searchForm,
|
||||||
|
status
|
||||||
|
} = ExchangeStore, {
|
||||||
|
searchCondition
|
||||||
|
} = toJS(status);
|
||||||
|
|
||||||
|
return getAdvancedItem(
|
||||||
|
searchForm,
|
||||||
|
searchCondition,
|
||||||
|
this.onSearch,
|
||||||
|
false,
|
||||||
|
this && this.props && this.props.ecId || '',
|
||||||
|
"integrationExchange",
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
onSearch = () => {
|
||||||
|
const {
|
||||||
|
ExchangeStore
|
||||||
|
} = this.props, {
|
||||||
|
searchForm,
|
||||||
|
getExchangeLogList
|
||||||
|
} = ExchangeStore;
|
||||||
|
|
||||||
|
getExchangeLogList({...searchForm.getFormParams()});
|
||||||
|
this.setState({showSearchAd: false});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 按钮的显示和事件
|
||||||
|
*/
|
||||||
|
onMenuClick = (type) => {
|
||||||
|
const {
|
||||||
|
ExchangeStore
|
||||||
|
} = this.props, {
|
||||||
|
form,
|
||||||
|
tableStore,
|
||||||
|
getBaseInfoFormOperation,
|
||||||
|
} = ExchangeStore;
|
||||||
|
if(type && ["SAVE", "TEST"].includes(type.toLocaleUpperCase())) {
|
||||||
|
let params = form.getFormParams(), hideFormFields = [];
|
||||||
|
if(params.syndirection && !params.syndirection.includes('1')) {
|
||||||
|
hideFormFields.push("cronexpr");
|
||||||
|
}
|
||||||
|
if(params.logintype == 2) {
|
||||||
|
let hideFields = ["username", "password"];
|
||||||
|
hideFormFields = hideFormFields.concat(hideFields);
|
||||||
|
}
|
||||||
|
window.e9HideFormFieldKeys = hideFormFields;
|
||||||
|
onCheck(form, () => {
|
||||||
|
if(type === "TEST") {
|
||||||
|
params = Object.assign({}, params, {operate: "test"});
|
||||||
|
getBaseInfoFormOperation(params);
|
||||||
|
}else {
|
||||||
|
getBaseInfoFormOperation(Object.assign({}, params, {operate: "checkCron"}), () => {
|
||||||
|
params = Object.assign({}, params, {operate: "save"});
|
||||||
|
getBaseInfoFormOperation(params);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else if(type === "BTN_COLUMN") {
|
||||||
|
tableStore.setColSetVisible(true);
|
||||||
|
tableStore.tableColSet(true);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
getBtns = (datas=[], disabled, selectedKey="0") => {
|
||||||
|
if(selectedKey == 0) {
|
||||||
|
return datas && datas.map(data => <Button ecId={`${this && this.props && this.props.ecId || ''}_Button@re07ja@integrationExchangeButton${data.key}`} disabled={disabled} type={data.type} key={data.key} onClick={() => this.onMenuClick(data.key)}>{data.content}</Button>);
|
||||||
|
}else {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
getRightMenu(datas=[], disabled, selectedKey="0") {
|
||||||
|
if(selectedKey == 0) {
|
||||||
|
return datas && datas.map(data => {
|
||||||
|
return {
|
||||||
|
...data,
|
||||||
|
disabled,
|
||||||
|
icon: <i className={data.icon} />,
|
||||||
|
onClick: () => this.onMenuClick(data.key)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
return [{
|
||||||
|
key: "BTN_COLUMN",
|
||||||
|
icon: <i className="icon-coms-Custom" />,
|
||||||
|
content: `${getLabel(32535, "显示列定制")}`,
|
||||||
|
onClick: () => this.onMenuClick("BTN_COLUMN")
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 点击复制路径
|
||||||
|
copyURL = (url) => {
|
||||||
|
if (copy(url)) {
|
||||||
|
message.success(getLabel('126081', '地址已经复制成功,您可以使用Ctrl+v粘贴'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置数据同步的范围
|
||||||
|
setSynDataRange = () => {
|
||||||
|
const {
|
||||||
|
ExchangeStore
|
||||||
|
} = this.props, {
|
||||||
|
doOperationlimit,
|
||||||
|
getExchangelimitsList
|
||||||
|
} = ExchangeStore;
|
||||||
|
|
||||||
|
ExchangeStore.setState({
|
||||||
|
showSyncDataRange: true
|
||||||
|
});
|
||||||
|
doOperationlimit({operate: "getButtons"});
|
||||||
|
getExchangelimitsList();
|
||||||
|
}
|
||||||
|
|
||||||
|
getForm = (form, datas=[]) => {
|
||||||
|
const {
|
||||||
|
isFormInit
|
||||||
|
} = form;
|
||||||
|
const formParams = form.getFormParams();
|
||||||
|
let group = [];
|
||||||
|
isFormInit && datas && datas.forEach((c, index) => {
|
||||||
|
let items = [];
|
||||||
|
c && c.items && c.items.forEach(fields => {
|
||||||
|
let key = fields.domkey[0];
|
||||||
|
items.push({
|
||||||
|
com: (
|
||||||
|
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@hkc226@integrationExchangeForm${key}`}
|
||||||
|
label={"day" === key ? <span>{fields.label}<WeaHelpfulTip ecId={`${this && this.props && this.props.ecId || ''}_WeaHelpfulTip@bzj1vh@integrationExchangeForm${key}`} style={{marginLeft: "5px"}} title={getLabel('530048','同步定时时间当天之前7天到当天之后X天的范围')} /></span> : fields.label}
|
||||||
|
labelCol={{span: fields.labelcol}}
|
||||||
|
wrapperCol={{span: fields.fieldcol}}
|
||||||
|
error={form.getError(fields)}
|
||||||
|
tipPosition="bottom"
|
||||||
|
>
|
||||||
|
{
|
||||||
|
key === "syndatarange"
|
||||||
|
? <Button ecId={`${this && this.props && this.props.ecId || ''}_Button@ma2xdg@integrationExchangeForm${key}`}
|
||||||
|
onClick={this.setSynDataRange}
|
||||||
|
>
|
||||||
|
{getLabel('30747','设置')}
|
||||||
|
</Button>
|
||||||
|
: key === "cronexpr"
|
||||||
|
? <CronExp ecId={`${this && this.props && this.props.ecId || ''}_CronExp@e2tdld@integrationExchangeForm${key}`}
|
||||||
|
field={fields}
|
||||||
|
value={form.getFormParams()[key] || '0 0 * * * ?'}
|
||||||
|
onChange={(v="") => form.updateFields({[key]: v.trim() || '0 0 * * * ?'})}
|
||||||
|
/>
|
||||||
|
: <nobr>
|
||||||
|
<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@tjhqxf@integrationExchangeForm${key}`} fieldConfig={fields} form={form} formParams={formParams} onChange={v => {
|
||||||
|
if(["syndirection", "datatpye"].includes(key)) {
|
||||||
|
if(!form.getFormParams()[key]) {
|
||||||
|
form.updateFields({[key]: formParams[key] == "1" ? "2" : "1"});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}} />
|
||||||
|
{
|
||||||
|
key === "userloginurl"
|
||||||
|
? <Button ecId={`${this && this.props && this.props.ecId || ''}_Button@3app8r@integrationExchangeForm${key}`}
|
||||||
|
style={{marginLeft: "10px"}}
|
||||||
|
onClick={() => this.copyURL(formParams.userloginurl)}
|
||||||
|
>{getLabel('383573','点击复制')}</Button>
|
||||||
|
: key === "day"
|
||||||
|
? <span
|
||||||
|
style={{
|
||||||
|
marginLeft: "10px",
|
||||||
|
lineHeight: "30px"
|
||||||
|
}}
|
||||||
|
>{getLabel('1925','天')}</span>
|
||||||
|
: null
|
||||||
|
}
|
||||||
|
</nobr>
|
||||||
|
}
|
||||||
|
|
||||||
|
</WeaFormItem>),
|
||||||
|
colSpan: 1,
|
||||||
|
hide: form.isHide(fields, (keys, allParams) => {
|
||||||
|
let bool = false, key = fields.domkey[0];
|
||||||
|
["userloginurl"].includes(key) && allParams.logintype != '2' && (bool = true);
|
||||||
|
["username", "password"].includes(key) && allParams.logintype != '1' && (bool = true);
|
||||||
|
["cronexpr"].includes(key) && (!allParams.syndirection.includes('1')) && (bool = true);
|
||||||
|
fields && fields.showWhere && fields.showWhere.length > 0 && fields.showWhere.forEach(w => {
|
||||||
|
if(!bool){
|
||||||
|
let show = false;
|
||||||
|
for(let val of w.value){
|
||||||
|
if(allParams[w.domkey] == val){
|
||||||
|
show = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
bool = !show;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return bool;
|
||||||
|
})
|
||||||
|
});
|
||||||
|
if(["userloginurl"].includes(key) && formParams.logintype == '2') {
|
||||||
|
items.push({
|
||||||
|
com: <div
|
||||||
|
style={{
|
||||||
|
textAlign: "left",
|
||||||
|
color: "red"
|
||||||
|
}}
|
||||||
|
>{getLabel('517422','请管理员将【用户登录地址】作为菜单地址新增菜单,以供普通用户进行登录绑定Exchange')}。</div>
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
group.push(<WeaSearchGroup ecId={`${this && this.props && this.props.ecId || ''}_WeaSearchGroup@6fomub@integrationExchangeForm${index}`} col={1} center={true} needTigger={true} title={c.title} showGroup={c.defaultshow} items={items}/>)
|
||||||
|
});
|
||||||
|
return group;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 切换tab页
|
||||||
|
handleTabChange = (selectedKey) => {
|
||||||
|
const {
|
||||||
|
ExchangeStore
|
||||||
|
} = this.props, {
|
||||||
|
status,
|
||||||
|
getBaseInfo,
|
||||||
|
getExchangeLogInfo,
|
||||||
|
} = ExchangeStore;
|
||||||
|
|
||||||
|
if(selectedKey == 0) {
|
||||||
|
getBaseInfo();
|
||||||
|
}else if(selectedKey == 1) {
|
||||||
|
getExchangeLogInfo();
|
||||||
|
}
|
||||||
|
ExchangeStore.setState({
|
||||||
|
selectedKey
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const {
|
||||||
|
ExchangeStore
|
||||||
|
} = this.props, {
|
||||||
|
form,
|
||||||
|
status,
|
||||||
|
hasRight,
|
||||||
|
tableStore,
|
||||||
|
} = ExchangeStore, {
|
||||||
|
menus,
|
||||||
|
loading,
|
||||||
|
tabDatas,
|
||||||
|
condition,
|
||||||
|
selectedKey,
|
||||||
|
buttonStatus,
|
||||||
|
collectParams,
|
||||||
|
advancedHeight,
|
||||||
|
hasNonStandard,
|
||||||
|
nonStandLoading,
|
||||||
|
} = toJS(status), {
|
||||||
|
showSearchAd
|
||||||
|
} = this.state;
|
||||||
|
return (nonStandLoading
|
||||||
|
? null
|
||||||
|
: hasNonStandard
|
||||||
|
? loading
|
||||||
|
? null
|
||||||
|
: hasRight
|
||||||
|
? <WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@gb37di`}
|
||||||
|
datas={this.getRightMenu(menus, buttonStatus, selectedKey)}
|
||||||
|
collectParams={collectParams}
|
||||||
|
>
|
||||||
|
<WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@jub2gt`}
|
||||||
|
title={getLabel('517412','Exchange集成')}
|
||||||
|
icon={<i className="icon-coms-integration" />}
|
||||||
|
iconBgcolor="#1a57a0"
|
||||||
|
buttons={this.getBtns(menus, buttonStatus, selectedKey)}
|
||||||
|
showDropIcon={true}
|
||||||
|
dropMenuDatas={this.getRightMenu(menus, buttonStatus, selectedKey)}
|
||||||
|
dropMenuProps={{collectParams}}
|
||||||
|
/>
|
||||||
|
<WeaTab ecId={`${this && this.props && this.props.ecId || ''}_WeaTab@7nxjpl`}
|
||||||
|
keyParam={"viewcondition"}
|
||||||
|
selectedKey={selectedKey}
|
||||||
|
datas={tabDatas}
|
||||||
|
searchType={selectedKey == 1 ? ["advanced"] : []}
|
||||||
|
buttonsAd={this.getSearchBtns()}
|
||||||
|
searchsAd={this.getAdvancedItem()}
|
||||||
|
advanceHeight={advancedHeight}
|
||||||
|
showSearchAd={showSearchAd}
|
||||||
|
setShowSearchAd={() => this.setState({showSearchAd: !showSearchAd})}
|
||||||
|
hideSearchAd={() => this.setState({showSearchAd: false})}
|
||||||
|
onChange={this.handleTabChange}
|
||||||
|
/>
|
||||||
|
<WeaNewScroll ecId={`${this && this.props && this.props.ecId || ''}_WeaNewScroll@klm68w`} height={"calc(100% - 100px)"}>
|
||||||
|
{
|
||||||
|
selectedKey == 0
|
||||||
|
? this.getForm(form, condition)
|
||||||
|
: selectedKey == 1
|
||||||
|
? <WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@uwt9tr`}
|
||||||
|
comsWeaTableStore={tableStore}
|
||||||
|
hasOrder={true}
|
||||||
|
needScroll={true}
|
||||||
|
/>
|
||||||
|
: null
|
||||||
|
}
|
||||||
|
</WeaNewScroll>
|
||||||
|
<SyncDataRange ecId={`${this && this.props && this.props.ecId || ''}_SyncDataRange@u1l3h9`}/>
|
||||||
|
</WeaRightMenu>
|
||||||
|
: <NoRight ecId={`${this && this.props && this.props.ecId || ''}_NoRight@77jvpt`}/>
|
||||||
|
: <NonStand ecId={`${this && this.props && this.props.ecId || ''}_NonStand@k37czh`} />
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Exchange;
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
import {WeaLocaleProvider} from 'ecCom';
|
||||||
|
|
||||||
|
class Home extends React.Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
iframeStyle: {display: "none"}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
return (
|
||||||
|
<div style={{height:"100%"}}>
|
||||||
|
<iframe id="hiddenPreLoaderSingle" name="hiddenPreLoaderSingle" style={this.state.iframeStyle} width="0" height="0" border="0" frameborder="0"></iframe>
|
||||||
|
<WeaLocaleProvider ecId={`${this && this.props && this.props.ecId || ''}_WeaLocaleProvider@vexs0k`}>
|
||||||
|
{this.props.children}
|
||||||
|
</WeaLocaleProvider>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Home
|
||||||
|
|
@ -0,0 +1,119 @@
|
||||||
|
import React from 'react';
|
||||||
|
import {toJS} from 'mobx';
|
||||||
|
import {inject, observer} from "mobx-react";
|
||||||
|
import {WeaRightMenu, WeaTop, WeaFormItem, WeaSearchGroup, WeaLocaleProvider, WeaNewScroll} from 'ecCom';
|
||||||
|
import {WeaSwitch} from "comsMobx";
|
||||||
|
import {Button, Spin} from 'antd';
|
||||||
|
|
||||||
|
const {getLabel} = WeaLocaleProvider;
|
||||||
|
|
||||||
|
@inject("ldapInit")
|
||||||
|
@observer
|
||||||
|
export default class LDAPInit extends React.Component{
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
const {ldapInit} = this.props;
|
||||||
|
ldapInit.getForm();
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps) {
|
||||||
|
if(this.props.location.key != nextProps.location.key) {
|
||||||
|
this.props.ldapInit.getForm();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getRightMenus = () => {
|
||||||
|
return [{
|
||||||
|
key: "init",
|
||||||
|
icon: <i className="icon-coms-operation"/>,
|
||||||
|
content: getLabel(20873, "初始化"),
|
||||||
|
onClick: () => this.onMenuClick("init")
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
|
||||||
|
getBtns = () => {
|
||||||
|
return [
|
||||||
|
<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@j7i5z8@integrationLdapInitButtonInit`} type="primary" onClick={() => this.onMenuClick("init")}>{getLabel(20873, "初始化")}</Button>
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
onMenuClick = (type) => {
|
||||||
|
const {ldapInit} = this.props;
|
||||||
|
const {save, newForm} = ldapInit;
|
||||||
|
|
||||||
|
if(type === "init") {
|
||||||
|
newForm.validateForm().then(f => {
|
||||||
|
if(f.isValid) {
|
||||||
|
save();
|
||||||
|
}else {
|
||||||
|
f.showErrors();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getSearch = (form, condition) => {
|
||||||
|
const {isFormInit} = form;
|
||||||
|
const formParams = form.getFormParams();
|
||||||
|
let group = [];
|
||||||
|
|
||||||
|
isFormInit && condition && condition.map((c, index) => {
|
||||||
|
let items = [];
|
||||||
|
c.items && c.items.map(fields => {
|
||||||
|
items.push({
|
||||||
|
com: (<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@qqw4c3@integrationLdapInitForm${fields.domkey[0]}`}
|
||||||
|
label={`${fields.label}`}
|
||||||
|
labelCol={{span: `${fields.labelcol}`}}
|
||||||
|
wrapperCol={{span: `${fields.fieldcol}`}}
|
||||||
|
error={form.getError(fields)}
|
||||||
|
tipPosition="bottom"
|
||||||
|
>
|
||||||
|
<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@eqinbs@integrationLdapInitForm${fields.domkey[0]}`} form={form} fieldConfig={fields} formParams={formParams} />
|
||||||
|
</WeaFormItem>)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
group.push(<WeaSearchGroup ecId={`${this && this.props && this.props.ecId || ''}_WeaSearchGroup@zbnms8@integrationLdapInitForm${index}`} center={true} col={1} needTigger={true} title={c.title} showGroup={c.defaultshow} items={items} />)
|
||||||
|
})
|
||||||
|
|
||||||
|
return group;
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const {ldapInit} = this.props;
|
||||||
|
const {status, newForm} = ldapInit;
|
||||||
|
const {loading, condition} = toJS(status);
|
||||||
|
const collectParams = {
|
||||||
|
favname: "LDAP初始化",
|
||||||
|
favouritetype: 1,
|
||||||
|
objid: 0,
|
||||||
|
link: "wui/engine.html#/integration/LDAPInit",
|
||||||
|
importantlevel: 1
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@qw2vu5`}
|
||||||
|
datas={this.getRightMenus()}
|
||||||
|
collectParams={[collectParams]}
|
||||||
|
>
|
||||||
|
<WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@u9wz8p`}
|
||||||
|
title={"LDAP初始化"}
|
||||||
|
icon={<i className="icon-coms-integration" />}
|
||||||
|
iconBgcolor="#1a57a0"
|
||||||
|
buttons={this.getBtns()}
|
||||||
|
showDropIcon={true}
|
||||||
|
dropMenuDatas={this.getRightMenus()}
|
||||||
|
dropMenuProps={{collectParams}}
|
||||||
|
/>
|
||||||
|
<WeaNewScroll ecId={`${this && this.props && this.props.ecId || ''}_WeaNewScroll@di6umz`} height={"calc(100% - 48px)"}>
|
||||||
|
<Spin ecId={`${this && this.props && this.props.ecId || ''}_Spin@sqdvjf`} spinning={loading}>
|
||||||
|
{this.getSearch(newForm, condition)}
|
||||||
|
</Spin>
|
||||||
|
</WeaNewScroll>
|
||||||
|
</WeaRightMenu>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,206 @@
|
||||||
|
import React from "react";
|
||||||
|
import {
|
||||||
|
toJS,
|
||||||
|
} from "mobx";
|
||||||
|
import {
|
||||||
|
inject,
|
||||||
|
observer,
|
||||||
|
} from "mobx-react";
|
||||||
|
import {
|
||||||
|
WeaLocaleProvider,
|
||||||
|
WeaLeftRightLayout,
|
||||||
|
WeaTop,
|
||||||
|
WeaTab,
|
||||||
|
WeaRightMenu,
|
||||||
|
} from "ecCom";
|
||||||
|
import {
|
||||||
|
WeaTableNew,
|
||||||
|
} from "comsMobx";
|
||||||
|
import * as IntegrationUtil from "../../util/IntegrationUtil";
|
||||||
|
import NoRight from "../../public/NoRight";
|
||||||
|
import NonStand from "../../public/NonStand";
|
||||||
|
import OrganizationTree from '../../public/OrganizationTree';
|
||||||
|
import WebServiceCreate from './webServiceCreate';
|
||||||
|
|
||||||
|
const {WeaTable} = WeaTableNew;
|
||||||
|
const {getLabel} = WeaLocaleProvider;
|
||||||
|
|
||||||
|
@inject("webservice")
|
||||||
|
@observer
|
||||||
|
export default class Main extends React.Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
showSearchAd: false,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
const { webservice } = this.props;
|
||||||
|
webservice.doInit();
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps) {
|
||||||
|
if (this.props.location.key !== nextProps.location.key) {
|
||||||
|
const { webservice } = this.props;
|
||||||
|
webservice.doInit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 分权刷新
|
||||||
|
refreshData = (id, type) => {
|
||||||
|
const {
|
||||||
|
webservice
|
||||||
|
} = this.props;
|
||||||
|
if("1" === type) {
|
||||||
|
// 如果点击的是分部
|
||||||
|
webservice.setState({
|
||||||
|
subcompanyid: id,
|
||||||
|
});
|
||||||
|
} else{
|
||||||
|
webservice.setState({
|
||||||
|
subcompanyid: "",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
webservice.getConditions(webservice.getTableInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
getSearchs = () => {
|
||||||
|
const { webservice } = this.props;
|
||||||
|
const { status: { condition }, form } = webservice;
|
||||||
|
return IntegrationUtil.getAdvancedItem(
|
||||||
|
form,
|
||||||
|
condition,
|
||||||
|
this.handleSearchFun,
|
||||||
|
false,
|
||||||
|
this && this.props && this.props.ecId || '',
|
||||||
|
"integrationWebservice"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
handleSearchFun = () => {
|
||||||
|
const { webservice } = this.props;
|
||||||
|
webservice.setState({
|
||||||
|
subcompanyid: webservice.form.getFormParams().subcompanyid1,
|
||||||
|
});
|
||||||
|
webservice.getTableInfo();
|
||||||
|
this.setState({ showSearchAd: false });
|
||||||
|
}
|
||||||
|
|
||||||
|
getTabButtonsAd = () => {
|
||||||
|
const { webservice } = this.props;
|
||||||
|
const { form } = webservice;
|
||||||
|
return IntegrationUtil.getSearchBtns(
|
||||||
|
this.handleSearchFun,
|
||||||
|
() => form.reset(),
|
||||||
|
() => this.setState({ showSearchAd: false }),
|
||||||
|
this && this.props && this.props.ecId || '',
|
||||||
|
"integrationWebservice"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
getColumns = (columns) => {
|
||||||
|
const { webservice } = this.props;
|
||||||
|
return columns.map(column => {
|
||||||
|
if (column.dataIndex == 'customname') {
|
||||||
|
return {
|
||||||
|
...column,
|
||||||
|
render: (text, record, index) => {
|
||||||
|
return (<a onClick={() => webservice.edit(record)}>{record.customname}</a>);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (column.dataIndex == 'subcompanyid') {
|
||||||
|
return {
|
||||||
|
...column,
|
||||||
|
render: (text, record, index) => {
|
||||||
|
return (<a href={`${window.ecologyContentPath || ""}/spa/hrm/engine.html#/hrmengine/organization?showTree=false&isView=1&type=subcompany&id=${record.subcompanyid}`} target="_blank">{record.subcompanyidspan}</a>);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return column;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const {
|
||||||
|
webservice
|
||||||
|
} = this.props, {
|
||||||
|
status,
|
||||||
|
form,
|
||||||
|
tableStore,
|
||||||
|
getRightMenuData,
|
||||||
|
getTopButton,
|
||||||
|
onOperatesClick,
|
||||||
|
hasRight,
|
||||||
|
rightLoading,
|
||||||
|
} = webservice, {
|
||||||
|
loading,
|
||||||
|
advanceHeight,
|
||||||
|
hasNonStandard,
|
||||||
|
nonStandLoading,
|
||||||
|
collectParams,
|
||||||
|
hasOrganization,
|
||||||
|
subcompanyid,
|
||||||
|
} = toJS(status), {
|
||||||
|
showSearchAd,
|
||||||
|
} = this.state;
|
||||||
|
|
||||||
|
return (nonStandLoading
|
||||||
|
? null
|
||||||
|
: hasNonStandard
|
||||||
|
? rightLoading
|
||||||
|
? null
|
||||||
|
: hasRight
|
||||||
|
? <WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@l9tfxc`}
|
||||||
|
datas={getRightMenuData()}
|
||||||
|
collectParams={collectParams}
|
||||||
|
>
|
||||||
|
<WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@yi80f5`}
|
||||||
|
buttons={getTopButton()}
|
||||||
|
title={getLabel(33717, "WebService注册")}
|
||||||
|
icon={<i className={IntegrationUtil.GeneralTitleColor.icon} />}
|
||||||
|
iconBgcolor={IntegrationUtil.GeneralTitleColor.iconBgcolor}
|
||||||
|
showDropIcon={true}
|
||||||
|
dropMenuDatas={getRightMenuData()}
|
||||||
|
dropMenuProps={{collectParams}}
|
||||||
|
loading={loading}
|
||||||
|
/>
|
||||||
|
<WeaLeftRightLayout ecId={`${this && this.props && this.props.ecId || ''}_WeaLeftRightLayout@w2p5rj`}
|
||||||
|
showLeft={hasOrganization}
|
||||||
|
showBtn={hasOrganization}
|
||||||
|
leftCom={<OrganizationTree ecId={`${this && this.props && this.props.ecId || ''}_OrganizationTree@duqaq7`}
|
||||||
|
ref="webservice"
|
||||||
|
selectedKeys={[subcompanyid]}
|
||||||
|
refreshData={this.refreshData}
|
||||||
|
rightStr={"intergration:webserivcesetting"}
|
||||||
|
{...(this.props.orgTreeParams || {})}
|
||||||
|
/>}
|
||||||
|
>
|
||||||
|
<WeaTab ecId={`${this && this.props && this.props.ecId || ''}_WeaTab@9zsyae`}
|
||||||
|
searchType={['base', 'advanced']}
|
||||||
|
advanceHeight={advanceHeight}
|
||||||
|
buttonsAd={this.getTabButtonsAd()}
|
||||||
|
showSearchAd={showSearchAd}
|
||||||
|
setShowSearchAd={showSearchAd => this.setState({showSearchAd})}
|
||||||
|
hideSearchAd={() => this.setState({showSearchAd: false})}
|
||||||
|
searchsAd={this.getSearchs()}
|
||||||
|
searchsBaseValue={form.getFormParams().customname || ''}
|
||||||
|
onSearch={this.handleSearchFun}
|
||||||
|
onSearchChange={value => form.updateFields({customname: {value}})}
|
||||||
|
/>
|
||||||
|
<WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@lv0t2u`}
|
||||||
|
hasOrder={true}
|
||||||
|
onOperatesClick={onOperatesClick}
|
||||||
|
comsWeaTableStore={tableStore}
|
||||||
|
needScroll={true}
|
||||||
|
getColumns={this.getColumns}
|
||||||
|
/>
|
||||||
|
</WeaLeftRightLayout>
|
||||||
|
<WebServiceCreate ecId={`${this && this.props && this.props.ecId || ''}_WebServiceCreate@7g4xrn`} />
|
||||||
|
</WeaRightMenu>
|
||||||
|
: <NoRight ecId={`${this && this.props && this.props.ecId || ''}_NoRight@ptbhon`} />
|
||||||
|
: <NonStand ecId={`${this && this.props && this.props.ecId || ''}_NonStand@n61w6q`} />
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,273 @@
|
||||||
|
import React from "react";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { toJS } from "mobx";
|
||||||
|
import * as IntegrationUtil from "../../util/IntegrationUtil";
|
||||||
|
import {checkTableFieldValueUnique} from "../../apis/CommonService";
|
||||||
|
import {WeaSwitch} from 'comsMobx'
|
||||||
|
import {
|
||||||
|
WeaLocaleProvider,
|
||||||
|
WeaDialog,
|
||||||
|
WeaSearchGroup,
|
||||||
|
WeaButtonIcon,
|
||||||
|
WeaTableEditable,
|
||||||
|
WeaRightMenu,
|
||||||
|
WeaFormItem,
|
||||||
|
WeaTools,
|
||||||
|
} from "ecCom";
|
||||||
|
import { isEmpty } from 'lodash';
|
||||||
|
import { Spin, Button } from 'antd';
|
||||||
|
|
||||||
|
const { getKey } = WeaTools;
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
const { GeneralTitleColor } = IntegrationUtil;
|
||||||
|
|
||||||
|
@inject("webservice")
|
||||||
|
@observer
|
||||||
|
export default class Main extends React.Component {
|
||||||
|
onCancel = () => {
|
||||||
|
const { webservice } = this.props;
|
||||||
|
webservice.doInitCreate();
|
||||||
|
}
|
||||||
|
|
||||||
|
getOtherCom = () => {
|
||||||
|
const { webservice } = this.props;
|
||||||
|
const { parseWSDL, formCreate } = webservice;
|
||||||
|
const allParams = formCreate.getFormParams();
|
||||||
|
const com = <div style={{ position: 'absolute' }}>
|
||||||
|
<a className='webservicecreate-btn' onClick={() => parseWSDL({ webserviceurl: allParams.webserviceurl, type: '1' }, 'wsdl')}>{getLabel(32395,'解析')}WSDL</a>
|
||||||
|
<a className='webservicecreate-btn' onClick={() => parseWSDL({ webserviceurl: allParams.webserviceurl, type: '2' }, 'checked')}>{getLabel(32396,'检查更新')}</a>
|
||||||
|
</div>;
|
||||||
|
return com;
|
||||||
|
}
|
||||||
|
|
||||||
|
onChange = (datas) => {
|
||||||
|
const { webservice } = this.props;
|
||||||
|
const { setState } = webservice;
|
||||||
|
setState({wsdlParamData:datas});
|
||||||
|
}
|
||||||
|
|
||||||
|
save = () => {
|
||||||
|
const { webservice } = this.props;
|
||||||
|
let { status: { wsdlParamData }, formCreate, doSave } = webservice;
|
||||||
|
wsdlParamData = toJS(wsdlParamData);
|
||||||
|
const result = this.refs.serviceRegister.doValidate();
|
||||||
|
formCreate.validateForm().then(f => {
|
||||||
|
if (f.isValid) {
|
||||||
|
if (result.pass) {
|
||||||
|
wsdlParamData.forEach((v, l) => {
|
||||||
|
if (v.methodid.indexOf('$') > -1) {
|
||||||
|
wsdlParamData[l].methodid = '0';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
doSave(wsdlParamData);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
f.showErrors();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
del = () => {
|
||||||
|
const { webservice } = this.props;
|
||||||
|
const { delList, status: { webserviceid } } = webservice;
|
||||||
|
delList({ pointid: webserviceid }, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
onClick = type => {
|
||||||
|
const { webservice } = this.props;
|
||||||
|
const { formCreate, status } = webservice;
|
||||||
|
let checkParams = {
|
||||||
|
tableName: 'wsregiste',
|
||||||
|
fieldName: 'customname',
|
||||||
|
fieldValue: formCreate.getFormParams().customname.replace(/^(\s*)|(\s*)$/g, ''),
|
||||||
|
idName: 'id',
|
||||||
|
idValue: webservice.editRecordId
|
||||||
|
};
|
||||||
|
switch (type) {
|
||||||
|
case 'BTN_Save':
|
||||||
|
checkTableFieldValueUnique(checkParams).then(result => {
|
||||||
|
if(result&&result.isNotUnique) {
|
||||||
|
formCreate.showError('customname',getLabel('129943','名称已存在'));
|
||||||
|
}else {
|
||||||
|
this.save();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case 'BTN_Delete': this.del(); break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getSearchs = (form, datas, needTigger = true, center = true, lableCol, fieldcol, otherCom = null) => {
|
||||||
|
const { webservice } = this.props;
|
||||||
|
const { isFormInit } = form;
|
||||||
|
let group = [];
|
||||||
|
const formParams = form.getFormParams();
|
||||||
|
isFormInit && datas && datas.map((c, index) => {
|
||||||
|
let items = [];
|
||||||
|
c.items.map(fields => {
|
||||||
|
items.push({
|
||||||
|
com: (
|
||||||
|
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@dfs0fs@integrationWebserviceCreateForm${fields.domkey[0]}`}
|
||||||
|
label={`${fields.label}`}
|
||||||
|
labelCol={{ span: lableCol ? lableCol : `${fields.labelcol}` }}
|
||||||
|
wrapperCol={{ span: fieldcol ? fieldcol : `${fields.fieldcol}` }}
|
||||||
|
error={form.getError(fields)}
|
||||||
|
tipPosition="bottom"
|
||||||
|
>
|
||||||
|
<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@xp7e9w@integrationWebserviceCreateForm${fields.domkey[0]}`} fieldConfig={fields} form={form} formParams={formParams}
|
||||||
|
onChange={v => {
|
||||||
|
if(getKey(fields) === 'customname') {
|
||||||
|
let checkParams = {
|
||||||
|
tableName: 'wsregiste',
|
||||||
|
fieldName: 'customname',
|
||||||
|
fieldValue: form.getFormParams().customname.replace(/^(\s*)|(\s*)$/g, ''),
|
||||||
|
idName: 'id',
|
||||||
|
idValue: webservice.editRecordId
|
||||||
|
};
|
||||||
|
checkTableFieldValueUnique(checkParams).then(result => {
|
||||||
|
if(result&&result.isNotUnique) {
|
||||||
|
form.showError('customname',getLabel('129943','名称已存在'));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
{fields.showOtherCom && otherCom}
|
||||||
|
</WeaFormItem>),
|
||||||
|
colSpan: 1
|
||||||
|
})
|
||||||
|
});
|
||||||
|
if (needTigger) {
|
||||||
|
group.push(<WeaSearchGroup ecId={`${this && this.props && this.props.ecId || ''}_WeaSearchGroup@ulfcmo@integrationWebserviceCreateForm${index}`}
|
||||||
|
center={center} col={1} needTigger={needTigger} title={c.title}
|
||||||
|
showGroup={c.defaultshow || true} items={items} />)
|
||||||
|
} else {
|
||||||
|
group.push(<WeaSearchGroup ecId={`${this && this.props && this.props.ecId || ''}_WeaSearchGroup@gwxjln@integrationWebserviceCreateForm${index}`} center={center} col={1} needTigger={needTigger}
|
||||||
|
showGroup={c.defaultshow || true} items={items} />)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return group;
|
||||||
|
}
|
||||||
|
|
||||||
|
getBtn = () => {
|
||||||
|
const { webservice } = this.props;
|
||||||
|
const { rightMenuForm } = webservice.status;
|
||||||
|
let btnArr = [];
|
||||||
|
|
||||||
|
rightMenuForm && rightMenuForm.map( v => {
|
||||||
|
if(v.type == 'BTN_Save') {
|
||||||
|
btnArr.push(
|
||||||
|
<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@rz25oc@integrationWebserviceCreateButton${v.type}`} type='primary' onClick={() => this.onClick(v.type)}>{v.menuName}</Button>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
return btnArr;
|
||||||
|
}
|
||||||
|
|
||||||
|
getRightMenu = () => {
|
||||||
|
const { webservice } = this.props;
|
||||||
|
const { rightMenuForm } = webservice.status;
|
||||||
|
let btnArr = [];
|
||||||
|
|
||||||
|
rightMenuForm && rightMenuForm.map( v => {
|
||||||
|
if(v.type == 'BTN_Save') {
|
||||||
|
btnArr.push({
|
||||||
|
key: v.type,
|
||||||
|
content: v.menuName,
|
||||||
|
icon: <span className={v.menuIcon} />,
|
||||||
|
onClick: () => this.onClick(v.type),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
return btnArr;
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const {
|
||||||
|
webservice,
|
||||||
|
} = this.props, {
|
||||||
|
status: {
|
||||||
|
type,
|
||||||
|
visible,
|
||||||
|
conditionCreate,
|
||||||
|
loadingCreate,
|
||||||
|
columns,
|
||||||
|
showRegister,
|
||||||
|
analysisWSDL,
|
||||||
|
selectedRowKeys,
|
||||||
|
wsdlParamData,
|
||||||
|
wsdlParamPass,
|
||||||
|
},
|
||||||
|
formCreate,
|
||||||
|
setState,
|
||||||
|
addRegister,
|
||||||
|
delRegister,
|
||||||
|
} = webservice;
|
||||||
|
const validator = {
|
||||||
|
rules: {
|
||||||
|
methodname: 'required',
|
||||||
|
},
|
||||||
|
errorMessage: {
|
||||||
|
required: getLabel(385869,'此项必填'),
|
||||||
|
},
|
||||||
|
}, collectParams = {
|
||||||
|
favname: getLabel(33717, "WebService注册"),
|
||||||
|
favouritetype: 2,
|
||||||
|
objid: 0,
|
||||||
|
importantlevel: 1,
|
||||||
|
link: 'wui/engine.html#/main/integration/webservice',
|
||||||
|
};
|
||||||
|
const title = type === 'create' ? getLabel('365,33717','新建WebService注册') : getLabel('26473,33717','编辑WebService注册');
|
||||||
|
return (
|
||||||
|
<WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@zaf8rw`}
|
||||||
|
title={title}
|
||||||
|
className='wea-integration-webservicecreate'
|
||||||
|
visible={visible}
|
||||||
|
style={{ width: 1000, height: 500 }}
|
||||||
|
icon={GeneralTitleColor.icon}
|
||||||
|
iconBgcolor={GeneralTitleColor.iconBgcolor}
|
||||||
|
onCancel={this.onCancel}
|
||||||
|
hasScroll={true}
|
||||||
|
moreBtn={{
|
||||||
|
datas: this.getRightMenu(),
|
||||||
|
collectParams: collectParams,
|
||||||
|
}}
|
||||||
|
buttons={this.getBtn()}>
|
||||||
|
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@pj50mo`}
|
||||||
|
datas={this.getRightMenu()}
|
||||||
|
collectParams={collectParams}>
|
||||||
|
{this.getSearchs(formCreate, toJS(conditionCreate), true, true, 7, 16, this.getOtherCom())}
|
||||||
|
<Spin ecId={`${this && this.props && this.props.ecId || ''}_Spin@ytxvrr`} spinning={loadingCreate}>
|
||||||
|
<div className='register'>
|
||||||
|
<WeaSearchGroup ecId={`${this && this.props && this.props.ecId || ''}_WeaSearchGroup@reiai8`}
|
||||||
|
title={getLabel(32397,'注册方法')}
|
||||||
|
showGroup={showRegister}
|
||||||
|
onVisibleChange={(showRegister) => setState({ showRegister })}
|
||||||
|
customComponent={[
|
||||||
|
<WeaButtonIcon ecId={`${this && this.props && this.props.ecId || ''}_WeaButtonIcon@5qijhn@integrationWebserviceCreateButtonadd`} buttonType='add' type="primary" disabled={analysisWSDL} onClick={addRegister} />,
|
||||||
|
<WeaButtonIcon ecId={`${this && this.props && this.props.ecId || ''}_WeaButtonIcon@t8nsyk@integrationWebserviceCreateButtondel`} buttonType='del' type="primary" disabled={isEmpty(toJS(selectedRowKeys))} onClick={delRegister} />,
|
||||||
|
]}><WeaTableEditable ecId={`${this && this.props && this.props.ecId || ''}_WeaTableEditable@6bhl87`}
|
||||||
|
ref='serviceRegister'
|
||||||
|
tableProps={{showEmptyText:false}}
|
||||||
|
rowKey='methodid'
|
||||||
|
validator={validator}
|
||||||
|
showTitle={false}
|
||||||
|
showAdd={false}
|
||||||
|
showDelete={false}
|
||||||
|
showCopy={false}
|
||||||
|
showMove={false}
|
||||||
|
datas={!analysisWSDL && wsdlParamPass ? toJS(wsdlParamData) : []}
|
||||||
|
selectedRowKeys={toJS(selectedRowKeys)}
|
||||||
|
onRowSelect={selectedRowKeys => setState({ selectedRowKeys })}
|
||||||
|
columns={toJS(columns)}
|
||||||
|
onChange={this.onChange} />
|
||||||
|
</WeaSearchGroup>
|
||||||
|
</div>
|
||||||
|
</Spin>
|
||||||
|
</WeaRightMenu>
|
||||||
|
</WeaDialog>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,269 @@
|
||||||
|
import React from 'react';
|
||||||
|
import {
|
||||||
|
inject,
|
||||||
|
observer
|
||||||
|
} from "mobx-react";
|
||||||
|
import {
|
||||||
|
toJS
|
||||||
|
} from 'mobx';
|
||||||
|
import {
|
||||||
|
Button,
|
||||||
|
message
|
||||||
|
} from 'antd';
|
||||||
|
import {
|
||||||
|
WeaLocaleProvider,
|
||||||
|
WeaTop,
|
||||||
|
WeaRightMenu,
|
||||||
|
WeaFormItem,
|
||||||
|
WeaSearchGroup,
|
||||||
|
WeaTools,
|
||||||
|
} from "ecCom";
|
||||||
|
import * as IntegrationUtil from "../util/IntegrationUtil";
|
||||||
|
import {
|
||||||
|
WeaSwitch
|
||||||
|
} from "comsMobx";
|
||||||
|
import { checkValidateCode } from "../apis/CommonService";
|
||||||
|
import NoRight from '../public/NoRight';
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
const { getKey } = WeaTools;
|
||||||
|
|
||||||
|
@inject("accountSettingStore")
|
||||||
|
@observer
|
||||||
|
class Main extends React.Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
src: (window.ecologyContentPath || "") + '/weaver/weaver.file.MakeValidateCode?notneedvalidate=1&isView=1&validatetype=0&validatenum=4',
|
||||||
|
num: 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
const {
|
||||||
|
accountSettingStore
|
||||||
|
} = this.props;
|
||||||
|
const {
|
||||||
|
doInit,
|
||||||
|
singleInit
|
||||||
|
} = accountSettingStore;
|
||||||
|
|
||||||
|
if (this.props.params.id !== undefined) {
|
||||||
|
singleInit(this.props.params.id);
|
||||||
|
} else {
|
||||||
|
doInit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getDropMenuDatas = () => {
|
||||||
|
const {
|
||||||
|
accountSettingStore
|
||||||
|
} = this.props;
|
||||||
|
const {
|
||||||
|
doInit,
|
||||||
|
buttons
|
||||||
|
} = accountSettingStore;
|
||||||
|
const btnArr = [];
|
||||||
|
toJS(buttons).forEach(item => {
|
||||||
|
btnArr.push({
|
||||||
|
key: item.type,
|
||||||
|
icon: <i className={item.menuIcon} />,
|
||||||
|
content: item.menuName,
|
||||||
|
onClick: () => this.clickEvent(item.type)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
return btnArr;
|
||||||
|
}
|
||||||
|
|
||||||
|
getWeaTopBtns = () => {
|
||||||
|
return [
|
||||||
|
<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@9n4g8y@integrationAccountSettingButtonSave`} type="primary" onClick={() => this.clickEvent("BTN_Save")}>{getLabel("30986", "保存")}</Button>
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
clickEvent = type => {
|
||||||
|
const {
|
||||||
|
accountSettingStore
|
||||||
|
} = this.props;
|
||||||
|
const {
|
||||||
|
status,
|
||||||
|
setStatus,
|
||||||
|
form,
|
||||||
|
singleForm,
|
||||||
|
condition,
|
||||||
|
doSave,
|
||||||
|
doInit
|
||||||
|
} = accountSettingStore;
|
||||||
|
if("BTN_Save" == type) {
|
||||||
|
const params = form.getFormParams() || {};
|
||||||
|
const otherParams = singleForm.getFormParams();
|
||||||
|
|
||||||
|
if(this.props.params.id == undefined){
|
||||||
|
if(params.validatecode !== undefined) {
|
||||||
|
if(!(params.validatecode && params.validatecode.trim())) {
|
||||||
|
message.error(getLabel('390564','"验证码"未填写'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
checkValidateCode({validatecode: params.validatecode}).then(result => {
|
||||||
|
if(result&&result.isValid) {
|
||||||
|
doSave(this.props.params.id !== undefined ? { ...otherParams,
|
||||||
|
sysid: this.props.params.id
|
||||||
|
} : params, doInit);
|
||||||
|
this.setState({num: this.state.num + 1}, function() {
|
||||||
|
this.setState({src: `${window.ecologyContentPath || ""}/weaver/weaver.file.MakeValidateCode?notneedvalidate=1&isView=1&validatetype=0&validatenum=4&seriesnum_=${this.state.num}`})
|
||||||
|
})
|
||||||
|
}else {
|
||||||
|
form.showError('validatecode',getLabel('129308','无效的验证码!'));
|
||||||
|
this.setState({num: this.state.num+1}, function() {
|
||||||
|
this.setState({src: `${window.ecologyContentPath || ""}/weaver/weaver.file.MakeValidateCode?notneedvalidate=1&isView=1&validatetype=0&validatenum=4&seriesnum_=${this.state.num}`})
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else {
|
||||||
|
doSave(this.props.params.id !== undefined ? { ...otherParams,
|
||||||
|
sysid: this.props.params.id
|
||||||
|
} : params, doInit);
|
||||||
|
this.setState({num: this.state.num + 1}, function() {
|
||||||
|
this.setState({src: `${window.ecologyContentPath || ""}/weaver/weaver.file.MakeValidateCode?notneedvalidate=1&isView=1&validatetype=0&validatenum=4&seriesnum_=${this.state.num}`})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if(otherParams.validatecode !== undefined) {
|
||||||
|
if(!(otherParams.validatecode && otherParams.validatecode.trim())) {
|
||||||
|
singleForm.showError('validatecode', getLabel('390564','"验证码"未填写'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
checkValidateCode({validatecode: otherParams.validatecode}).then(result => {
|
||||||
|
if(result&&result.isValid) {
|
||||||
|
doSave(this.props.params.id !== undefined ? { ...otherParams,
|
||||||
|
sysid: this.props.params.id
|
||||||
|
} : params);
|
||||||
|
this.setState({num: this.state.num + 1}, function() {
|
||||||
|
this.setState({src: `${window.ecologyContentPath || ""}/weaver/weaver.file.MakeValidateCode?notneedvalidate=1&isView=1&validatetype=0&validatenum=4&seriesnum_=${this.state.num}`})
|
||||||
|
})
|
||||||
|
}else {
|
||||||
|
singleForm.showError('validatecode',getLabel('129308','无效的验证码!'));
|
||||||
|
this.setState({num: this.state.num+1}, function() {
|
||||||
|
this.setState({src: `${window.ecologyContentPath || ""}/weaver/weaver.file.MakeValidateCode?notneedvalidate=1&isView=1&validatetype=0&validatenum=4&seriesnum_=${this.state.num}`})
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else {
|
||||||
|
doSave(this.props.params.id !== undefined ? { ...otherParams,
|
||||||
|
sysid: this.props.params.id
|
||||||
|
} : params);
|
||||||
|
this.setState({num: this.state.num + 1}, function() {
|
||||||
|
this.setState({src: `${window.ecologyContentPath || ""}/weaver/weaver.file.MakeValidateCode?notneedvalidate=1&isView=1&validatetype=0&validatenum=4&seriesnum_=${this.state.num}`})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getFormSearchs = (form, datas=[]) => {
|
||||||
|
const { isFormInit } = form;
|
||||||
|
let group = [];
|
||||||
|
const formParams = form.getFormParams();
|
||||||
|
isFormInit && datas && datas.map((c, index) => {
|
||||||
|
let items = [];
|
||||||
|
c.items.map(fields => {
|
||||||
|
items.push({
|
||||||
|
com: (
|
||||||
|
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@hl8rpy@integrationAccountSettingForm${fields.domkey[0]}`}
|
||||||
|
label={`${fields.label}`}
|
||||||
|
labelCol={{ span: `${fields.labelcol}` }}
|
||||||
|
wrapperCol={{ span: `${fields.fieldcol}` }}
|
||||||
|
error={form.getError(fields)}
|
||||||
|
tipPosition="bottom"
|
||||||
|
>
|
||||||
|
{
|
||||||
|
getKey(fields) == 'validatecode'
|
||||||
|
? <div>
|
||||||
|
<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@szznju@integrationAccountSettingForm${fields.domkey[0]}`} fieldConfig={fields} form={form} formParams={formParams} />
|
||||||
|
<img style={{height:30, cursor: 'pointer'}} src={this.state.src} onClick={() => {
|
||||||
|
this.setState({num: this.state.num+1}, function() {
|
||||||
|
this.setState({src: `${window.ecologyContentPath || ""}/weaver/weaver.file.MakeValidateCode?notneedvalidate=1&isView=1&validatetype=0&validatenum=4&seriesnum_=${this.state.num}`})
|
||||||
|
})
|
||||||
|
}}></img>
|
||||||
|
</div>
|
||||||
|
: <WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@veqm4l@integrationAccountSettingForm${fields.domkey[0]}`} fieldConfig={fields} form={form} formParams={formParams} />
|
||||||
|
}
|
||||||
|
</WeaFormItem>),
|
||||||
|
colSpan: 1
|
||||||
|
})
|
||||||
|
});
|
||||||
|
group.push(<WeaSearchGroup ecId={`${this && this.props && this.props.ecId || ''}_WeaSearchGroup@2n4p94@integrationAccountSettingForm${index}`} center={true} col={1} needTigger={true} title={c.title} showGroup={true} items={items} />);
|
||||||
|
});
|
||||||
|
return group;
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const {
|
||||||
|
accountSettingStore
|
||||||
|
} = this.props;
|
||||||
|
const {
|
||||||
|
status,
|
||||||
|
form,
|
||||||
|
condition,
|
||||||
|
singleForm,
|
||||||
|
singleCondition,
|
||||||
|
hasRight
|
||||||
|
} = accountSettingStore;
|
||||||
|
const {
|
||||||
|
loading,
|
||||||
|
formLoading
|
||||||
|
} = toJS(status);
|
||||||
|
|
||||||
|
return (
|
||||||
|
formLoading
|
||||||
|
? null
|
||||||
|
: hasRight
|
||||||
|
?
|
||||||
|
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@0o9cqs`} datas={this.getDropMenuDatas()}
|
||||||
|
dropMenuProps={{
|
||||||
|
collectParams: {
|
||||||
|
favname: `${getLabel("129787", "账号设置")}`,
|
||||||
|
favouritetype: 1,
|
||||||
|
objid: 0,
|
||||||
|
link: "wui/engine.html#/integration/coremail",
|
||||||
|
importantlevel: 1
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@fzx1jf`}
|
||||||
|
loading={loading}
|
||||||
|
buttons={this.getWeaTopBtns()}
|
||||||
|
title={getLabel("19667", "账号设置")}
|
||||||
|
icon={<i className={IntegrationUtil.GeneralTitleColor.icon} />}
|
||||||
|
iconBgcolor={IntegrationUtil.GeneralTitleColor.iconBgcolor}
|
||||||
|
showDropIcon={true}
|
||||||
|
dropMenuDatas={this.getDropMenuDatas()}
|
||||||
|
dropMenuProps={{
|
||||||
|
collectParams: {
|
||||||
|
favname: `${getLabel("19667", "账号设置")}`,
|
||||||
|
favouritetype: 1,
|
||||||
|
objid: 0,
|
||||||
|
link: "wui/engine.html#/integration/129787",
|
||||||
|
importantlevel: 1
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{this.props.params.id !== undefined ? (
|
||||||
|
<div>
|
||||||
|
{this.getFormSearchs(singleForm, toJS(singleCondition))}
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
<div>
|
||||||
|
{this.getFormSearchs(form, toJS(condition))}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</WeaTop>
|
||||||
|
</WeaRightMenu>
|
||||||
|
: <NoRight ecId={`${this && this.props && this.props.ecId || ''}_NoRight@20kjyg`} />
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Main;
|
||||||
|
|
@ -0,0 +1,167 @@
|
||||||
|
import React from "react";
|
||||||
|
import {inject, observer} from "mobx-react";
|
||||||
|
import { Button} from "antd";
|
||||||
|
import {toJS} from "mobx";
|
||||||
|
import {WeaSwitch} from "comsMobx";
|
||||||
|
import {WeaDialog, WeaLocaleProvider, WeaTools, WeaSearchGroup, WeaFormItem, WeaRightMenu} from "ecCom";
|
||||||
|
import * as IntegrationUtil from "../../util/IntegrationUtil";
|
||||||
|
import {checkUserMappingLoginIdUnique,checkUserMappingAppLoginIdUnique} from "../../apis/AuthenticationCenterService"
|
||||||
|
const { getKey } = WeaTools;
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
const store = ["authenticationCenterStore"];
|
||||||
|
|
||||||
|
@inject(...store)
|
||||||
|
@observer
|
||||||
|
export default class AppDataMappingEditDialog extends React.Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
collectParams: {
|
||||||
|
favname: `${getLabel(381908, "统一认证中心")}`,
|
||||||
|
favouritetype: 1,
|
||||||
|
objid: 0,
|
||||||
|
link: "wui/engine.html#/integration/AuthenticationCenter",
|
||||||
|
importantlevel: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const {authenticationCenterStore} = this.props;
|
||||||
|
const status = toJS(authenticationCenterStore.status);
|
||||||
|
const {collectParams} = this.state;
|
||||||
|
return <WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@uzvyzz`}
|
||||||
|
title={authenticationCenterStore.operateDataMappingIndex == '' ? getLabel('31691,381943','注册数据映射') : getLabel('26473,381943','编辑数据映射')}
|
||||||
|
onCancel={()=> authenticationCenterStore.setState({appEditFormDetailDataMappingDialogVisible: false})}
|
||||||
|
visible={status.appEditFormDetailDataMappingDialogVisible}
|
||||||
|
style={{width: 700, height: 400}}
|
||||||
|
hasScroll
|
||||||
|
moduleName="integration"
|
||||||
|
buttons={[
|
||||||
|
<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@mg1lq8@SaveBtn`} type="primary" onClick={()=> this.onRightMenuClick('BTN_SAVE')}>{getLabel(86,'保存')}</Button>
|
||||||
|
]}
|
||||||
|
moreBtn={{
|
||||||
|
datas: this.getRightMenu(),
|
||||||
|
collectParams: collectParams
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@jfvcv3`}
|
||||||
|
datas={this.getRightMenu()}
|
||||||
|
collectParams={collectParams}
|
||||||
|
>
|
||||||
|
{
|
||||||
|
authenticationCenterStore.registerAppDataMappingEditForm.render({col: 1},{
|
||||||
|
onChange: (v)=> {
|
||||||
|
},
|
||||||
|
isHide: (key, formParams) => {}
|
||||||
|
|
||||||
|
},true,(c, idx)=>{
|
||||||
|
if(idx==0){
|
||||||
|
let items = [];
|
||||||
|
let bottomDis = 0;
|
||||||
|
let form = authenticationCenterStore.registerAppDataMappingEditForm;
|
||||||
|
let formParams = form.getFormParams();
|
||||||
|
c.items.map(fields => {
|
||||||
|
if(getKey(fields) == 'apploginid') {
|
||||||
|
bottomDis = 15;
|
||||||
|
}else {
|
||||||
|
bottomDis = 0;
|
||||||
|
}
|
||||||
|
items.push({
|
||||||
|
com: (
|
||||||
|
<div style={{marginBottom: bottomDis}}>
|
||||||
|
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@2lf3b3@authEditForm${fields.domkey[0]}`}
|
||||||
|
label={`${fields.label}`}
|
||||||
|
labelCol={{span: `${fields.labelcol}`}}
|
||||||
|
wrapperCol={{span: `${fields.fieldcol}`}}
|
||||||
|
error={form.getError(fields)}
|
||||||
|
tipPosition="bottom"
|
||||||
|
>
|
||||||
|
<nobr>
|
||||||
|
<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@2kihiv@authEditForm${fields.domkey[0]}`} fieldConfig={fields} form={form} formParams={formParams}
|
||||||
|
onChange={(v)=>{
|
||||||
|
if(getKey(fields) === 'userid') {
|
||||||
|
let params={userid:form.getFormParams().userid,operation:'getUserInfo'};
|
||||||
|
authenticationCenterStore.getRegisterAppDataMappingOperation(params,(result)=>{
|
||||||
|
if(result) {
|
||||||
|
if(result.depname) {
|
||||||
|
form.updateFields({depname: result.depname});
|
||||||
|
}
|
||||||
|
if(result.subname) {
|
||||||
|
form.updateFields({subname: result.subname});
|
||||||
|
}
|
||||||
|
if(result.loginid) {
|
||||||
|
form.updateFields({loginid: result.loginid});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
{/*{getKey(fields)==='account_rules'&&formParams.account_rules>5?<Button type="primary" style={{marginLeft:5}}>{getLabel(86,'数据映射')}</Button>:""}*/}
|
||||||
|
</nobr>
|
||||||
|
|
||||||
|
</WeaFormItem></div>),
|
||||||
|
colSpan: 1,
|
||||||
|
hide: form.isHide(fields, (key, formParams) => {
|
||||||
|
let hide = false;
|
||||||
|
if ('definebroswerType' == key && formParams.account_rules !== '7') {
|
||||||
|
hide = true;
|
||||||
|
}
|
||||||
|
return hide;
|
||||||
|
}),
|
||||||
|
onChange: (v)=> {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
return <WeaSearchGroup ecId={`${this && this.props && this.props.ecId || ''}_WeaSearchGroup@gf85qy`} center={true} col={1} needTigger={true} title={c.title} showGroup={c.defaultshow} items={items}/>
|
||||||
|
}
|
||||||
|
})}
|
||||||
|
</WeaRightMenu>
|
||||||
|
</WeaDialog>
|
||||||
|
}
|
||||||
|
|
||||||
|
getRightMenu() {
|
||||||
|
let btnArr = [
|
||||||
|
{
|
||||||
|
key: 'BTN_SAVE',
|
||||||
|
icon: <i className='icon-coms-Preservation'/>,
|
||||||
|
content : `${getLabel(86,'保存')}`,
|
||||||
|
onClick : () => this.onRightMenuClick('BTN_SAVE')
|
||||||
|
}
|
||||||
|
];
|
||||||
|
return btnArr;
|
||||||
|
}
|
||||||
|
|
||||||
|
onRightMenuClick = (type) => {
|
||||||
|
const {authenticationCenterStore} = this.props;
|
||||||
|
const {registerAppEditForm,registerAppDataMappingEditForm} = authenticationCenterStore;
|
||||||
|
if(type == 'BTN_SAVE'){
|
||||||
|
let id=authenticationCenterStore.registerAppDataMappingId||"";
|
||||||
|
let appid = registerAppEditForm.getFormParams().appid;
|
||||||
|
let loginid = registerAppDataMappingEditForm.getFormParams().loginid;
|
||||||
|
let apploginid = registerAppDataMappingEditForm.getFormParams().apploginid;
|
||||||
|
checkUserMappingLoginIdUnique({appId: appid, idValue: id, loginId: loginid, appLoginId: apploginid}).then(result=>{
|
||||||
|
if(result&&result.isNotUnique) {
|
||||||
|
registerAppDataMappingEditForm.showError('userid',getLabel('31053','已存在,请确认'));
|
||||||
|
}else{
|
||||||
|
checkUserMappingAppLoginIdUnique({appId: appid, idValue: id, loginId: loginid, appLoginId: apploginid}).then(result=>{
|
||||||
|
if(result&&result.isNotUnique) {
|
||||||
|
registerAppDataMappingEditForm.showError('apploginid',getLabel('31053','已存在,请确认'));
|
||||||
|
return;
|
||||||
|
}else{
|
||||||
|
IntegrationUtil.onCheck(registerAppDataMappingEditForm,function () {
|
||||||
|
let operation = id==""?"adduser":"edit";
|
||||||
|
let params = Object.assign({id:id,appid:appid,operation:operation}, registerAppDataMappingEditForm.getFormParams());
|
||||||
|
authenticationCenterStore.getRegisterAppDataMappingOperation(params);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,169 @@
|
||||||
|
import { Button } from "antd";
|
||||||
|
import { WeaSwitch } from "comsMobx";
|
||||||
|
import { WeaDialog, WeaFormItem, WeaLocaleProvider, WeaRightMenu, WeaSearchGroup, WeaUpload } from "ecCom";
|
||||||
|
import { toJS } from "mobx";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import React from "react";
|
||||||
|
import * as IntegrationUtil from "../../util/IntegrationUtil";
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
const store = ["authenticationCenterStore"];
|
||||||
|
|
||||||
|
@inject(...store)
|
||||||
|
@observer
|
||||||
|
export default class AppDataMappingImportDialog extends React.Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
file: [],
|
||||||
|
filelist: [],
|
||||||
|
collectParams: {
|
||||||
|
favname: `${getLabel(381908, "统一认证中心")}`,
|
||||||
|
favouritetype: 1,
|
||||||
|
objid: 0,
|
||||||
|
link: "wui/engine.html#/integration/AuthenticationCenter",
|
||||||
|
importantlevel: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
this.setState({
|
||||||
|
file: [],
|
||||||
|
filelist: [],
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { authenticationCenterStore } = this.props;
|
||||||
|
const status = toJS(authenticationCenterStore.status);
|
||||||
|
const {collectParams} = this.state;
|
||||||
|
|
||||||
|
return <WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@8cdb7y`}
|
||||||
|
title={getLabel('381943,18596', '数据映射导入')}
|
||||||
|
onCancel={() => authenticationCenterStore.setState({ appEditFormDetailDataMappingImportDialogVisible: false })}
|
||||||
|
visible={status.appEditFormDetailDataMappingImportDialogVisible}
|
||||||
|
style={{ width: 700, height: 400 }}
|
||||||
|
hasScroll
|
||||||
|
moduleName="integration"
|
||||||
|
buttons={[
|
||||||
|
<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@56jj5u@authAppImportBtn`} type="primary" onClick={() => this.onRightMenuClick('BTN_SAVE')}>{getLabel(18596, '导入')}</Button>
|
||||||
|
]}
|
||||||
|
moreBtn={{
|
||||||
|
datas: this.getRightMenu(),
|
||||||
|
collectParams: collectParams
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@djo650`}
|
||||||
|
datas={this.getRightMenu()}
|
||||||
|
collectParams={collectParams}
|
||||||
|
>
|
||||||
|
{
|
||||||
|
authenticationCenterStore.registerAppDataMappingImportForm.render({ col: 1, center: true }, {
|
||||||
|
onChange: (v) => {
|
||||||
|
},
|
||||||
|
isHide: (key, formParams) => { }
|
||||||
|
|
||||||
|
}, true, (c, idx) => {
|
||||||
|
if (idx == 0) {
|
||||||
|
let items = [];
|
||||||
|
let form = authenticationCenterStore.registerAppDataMappingImportForm;
|
||||||
|
let formParams = form.getFormParams();
|
||||||
|
c.items.map((fields, index) => {
|
||||||
|
if (index === 0) {
|
||||||
|
items.push({
|
||||||
|
com: (
|
||||||
|
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@fwjv0u@integrationauthImportForm${fields.domkey[0]}`}
|
||||||
|
label={`${fields.label}`}
|
||||||
|
labelCol={{ span: `${fields.labelcol}` }}
|
||||||
|
wrapperCol={{ span: `${fields.fieldcol}` }}
|
||||||
|
error={form.getError(fields)}
|
||||||
|
tipPosition="bottom"
|
||||||
|
>
|
||||||
|
<div>
|
||||||
|
<div style={{ float: 'left' }}>
|
||||||
|
<WeaUpload ecId={`${this && this.props && this.props.ecId || ''}_WeaUpload@56rli9@integrationauthImportForm${fields.domkey[0]}`}
|
||||||
|
uploadUrl='/api/doc/upload/uploadFile'
|
||||||
|
category='string'
|
||||||
|
limitType='xls,xlsx'
|
||||||
|
maxFilesNumber={1}
|
||||||
|
datas={this.state.filelist}
|
||||||
|
onChange={(ids, list) => {this.setState({ file: ids, filelist: list }) }}
|
||||||
|
>
|
||||||
|
<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@12raow@integrationauthImportForm${fields.domkey[0]}`}>{getLabel(125333, '选择文件')}</Button>
|
||||||
|
</WeaUpload>
|
||||||
|
</div>
|
||||||
|
<div style={{ float: 'left', paddingLeft: 10, paddingTop: 6 }}>
|
||||||
|
{this.state.filelist.length == 0 ? <p>{getLabel('384040','未选择任何文件')}</p> : this.state.filelist.map(file => <p>{file.filename}</p>)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</WeaFormItem>),
|
||||||
|
colSpan: 1,
|
||||||
|
hide: form.isHide(fields, (key, formParams) => {
|
||||||
|
let hide = false;
|
||||||
|
return hide;
|
||||||
|
}),
|
||||||
|
})
|
||||||
|
|
||||||
|
} else {
|
||||||
|
items.push({
|
||||||
|
com: (
|
||||||
|
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@wt5cq9@integrationauthImportForm${fields.domkey[0]}`}
|
||||||
|
label={`${fields.label}`}
|
||||||
|
labelCol={{ span: `${fields.labelcol}` }}
|
||||||
|
wrapperCol={{ span: `${fields.fieldcol}` }}
|
||||||
|
error={form.getError(fields)}
|
||||||
|
tipPosition="bottom"
|
||||||
|
>
|
||||||
|
<div style={{marginTop:7}}>
|
||||||
|
<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@2dij27@integrationauthImportForm${fields.domkey[0]}`} fieldConfig={fields} form={form} formParams={formParams}/>
|
||||||
|
</div>
|
||||||
|
</WeaFormItem>),
|
||||||
|
colSpan: 1,
|
||||||
|
hide: form.isHide(fields, (key, formParams) => {
|
||||||
|
let hide = false;
|
||||||
|
return hide;
|
||||||
|
}),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return <WeaSearchGroup ecId={`${this && this.props && this.props.ecId || ''}_WeaSearchGroup@1vy1zg`} center={true} col={1} needTigger={true} title={c.title} showGroup={c.defaultshow} items={items} />
|
||||||
|
}
|
||||||
|
})}
|
||||||
|
</WeaRightMenu>
|
||||||
|
</WeaDialog>
|
||||||
|
}
|
||||||
|
|
||||||
|
getRightMenu() {
|
||||||
|
let btnArr = [
|
||||||
|
{
|
||||||
|
key: 'BTN_SAVE',
|
||||||
|
icon: <i className='icon-coms-Preservation' />,
|
||||||
|
content: `${getLabel(18596, '导入')}`,
|
||||||
|
onClick: () => { this.onRightMenuClick('BTN_SAVE') }
|
||||||
|
}
|
||||||
|
];
|
||||||
|
return btnArr;
|
||||||
|
}
|
||||||
|
|
||||||
|
onRightMenuClick = (type) => {
|
||||||
|
const { authenticationCenterStore } = this.props;
|
||||||
|
const { registerAppEditForm, registerAppDataMappingImportForm } = authenticationCenterStore;
|
||||||
|
if (type == 'BTN_SAVE') {
|
||||||
|
//导入
|
||||||
|
IntegrationUtil.onCheck(registerAppDataMappingImportForm, () => {
|
||||||
|
let operation = "excelImport";
|
||||||
|
let params = Object.assign({ appid: registerAppEditForm.getFormParams().appid, operation: operation }, registerAppDataMappingImportForm.getFormParams());
|
||||||
|
params.file = JSON.stringify(this.state.file);
|
||||||
|
params.filelist = JSON.stringify(this.state.filelist);
|
||||||
|
authenticationCenterStore.getRegisterAppDataMappingOperation(params, (result) => {
|
||||||
|
authenticationCenterStore.setState({ resultTableHeader: result.resultTableHeader, resultTableData: result.resultTableData })
|
||||||
|
authenticationCenterStore.setState({ appEditFormDetailDataMappingImportDialogVisible: false, appEditFormDetailDataMappingImportResultDialogVisible: true })
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,75 @@
|
||||||
|
import React from "react";
|
||||||
|
import {inject, observer} from "mobx-react";
|
||||||
|
import { Button} from "antd";
|
||||||
|
import {toJS} from "mobx";
|
||||||
|
import {WeaDialog, WeaLocaleProvider, WeaSearchGroup, WeaRightMenu,WeaTable} from "ecCom";
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
const store = ["authenticationCenterStore"];
|
||||||
|
|
||||||
|
const transformArray = function (origin) {
|
||||||
|
if (origin.length === 0) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return Object.keys(origin[0]).map(item => {
|
||||||
|
return {
|
||||||
|
title: origin[0][item],
|
||||||
|
dataIndex: item,
|
||||||
|
key: item,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
@inject(...store)
|
||||||
|
@observer
|
||||||
|
export default class AppDataMappingImportResultDialog extends React.Component {
|
||||||
|
render() {
|
||||||
|
const {authenticationCenterStore} = this.props;
|
||||||
|
const status = toJS(authenticationCenterStore.status);
|
||||||
|
const {resultTableHeader,resultTableData} = toJS(status);
|
||||||
|
|
||||||
|
return <WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@t6i8jt`}
|
||||||
|
title={getLabel('387020','数据映射导入结果')}
|
||||||
|
onCancel={()=> authenticationCenterStore.setState({appEditFormDetailDataMappingImportResultDialogVisible: false})}
|
||||||
|
visible={status.appEditFormDetailDataMappingImportResultDialogVisible}
|
||||||
|
style={{width: 700, height: 600}}
|
||||||
|
hasScroll
|
||||||
|
moduleName="integration"
|
||||||
|
buttons={[
|
||||||
|
<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@zysnev@integrationauthImportResultSaveBtn`} type="primary" onClick={()=> this.onRightMenuClick('BTN_SAVE')}>{getLabel( 309 ,'关闭')}</Button>
|
||||||
|
]}
|
||||||
|
moreBtn={[]}
|
||||||
|
>
|
||||||
|
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@lgdqq5`}
|
||||||
|
datas={this.getRightMenu()}
|
||||||
|
collectParams={[]}
|
||||||
|
>
|
||||||
|
<WeaSearchGroup ecId={`${this && this.props && this.props.ecId || ''}_WeaSearchGroup@w4exf2`} center={false} col={1} needTigger={true} title={getLabel('82341','导入结果')} showGroup={true} items={[]}>
|
||||||
|
<WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@9exrfw`} columns={resultTableHeader?transformArray(resultTableHeader):[]} dataSource={resultTableData?resultTableData:[]} />
|
||||||
|
</WeaSearchGroup>
|
||||||
|
</WeaRightMenu>
|
||||||
|
</WeaDialog>
|
||||||
|
}
|
||||||
|
|
||||||
|
getRightMenu() {
|
||||||
|
let btnArr = [
|
||||||
|
{
|
||||||
|
key: 'BTN_SAVE',
|
||||||
|
icon: <i className='icon-coms-go-back'/>,
|
||||||
|
content : `${getLabel(309,'关闭')}`,
|
||||||
|
onClick : () => {this.onRightMenuClick('BTN_SAVE')}
|
||||||
|
}
|
||||||
|
];
|
||||||
|
return btnArr;
|
||||||
|
}
|
||||||
|
|
||||||
|
onRightMenuClick = (type) => {
|
||||||
|
const {authenticationCenterStore} = this.props;
|
||||||
|
if(type == 'BTN_SAVE'){
|
||||||
|
//关闭
|
||||||
|
authenticationCenterStore.setState({appEditFormDetailDataMappingImportResultDialogVisible: false});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,791 @@
|
||||||
|
import React from "react";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { message, Button } from "antd";
|
||||||
|
import { toJS } from "mobx";
|
||||||
|
import { WeaSwitch, WeaTableNew } from "comsMobx";
|
||||||
|
import { WeaDialog, WeaLocaleProvider, WeaSearchGroup, WeaFormItem, WeaRightMenu, WeaTab, WeaNewScroll, WeaButtonIcon, WeaPopoverHrm } from "ecCom";
|
||||||
|
import * as IntegrationUtil from "../../util/IntegrationUtil";
|
||||||
|
import AppDataMappingEditDialog from "./AppDataMappingEditDialog";
|
||||||
|
import AppDataMappingImportDialog from "./AppDataMappingImportDialog";
|
||||||
|
import AppDataMappingImportResultDialog from "./AppDataMappingImportResultDialog";
|
||||||
|
import uuid from 'uuid';
|
||||||
|
import { checkTableFieldValueUnique } from "../../apis/CommonService";
|
||||||
|
import NewShare from "./NewShare";
|
||||||
|
import UploadPic from '../../public/UploadPic';
|
||||||
|
import copy from 'copy-to-clipboard';
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
const { WeaTable } = WeaTableNew;
|
||||||
|
const store = ["authenticationCenterStore"];
|
||||||
|
|
||||||
|
@inject(...store)
|
||||||
|
@observer
|
||||||
|
export default class AppEditDetailDialog extends React.Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
showSearchAd: false,
|
||||||
|
tokenTopTab: [
|
||||||
|
{
|
||||||
|
color: "#000000",
|
||||||
|
groupid: "flowAll",
|
||||||
|
showcount: true,
|
||||||
|
title: `${getLabel(81711, "基本信息")}`,
|
||||||
|
viewcondition_dt: 0
|
||||||
|
}
|
||||||
|
, {
|
||||||
|
color: "#000000",
|
||||||
|
groupid: "flowAll",
|
||||||
|
showcount: true,
|
||||||
|
title: `${getLabel(131274, "运行日志")}`,
|
||||||
|
viewcondition_dt: 3
|
||||||
|
}
|
||||||
|
],
|
||||||
|
tokenTopTabAll: [
|
||||||
|
{
|
||||||
|
color: "#000000",
|
||||||
|
groupid: "flowAll",
|
||||||
|
showcount: true,
|
||||||
|
title: `${getLabel(81711, "基本信息")}`,
|
||||||
|
viewcondition_dt: 0
|
||||||
|
}
|
||||||
|
, {
|
||||||
|
color: "#000000",
|
||||||
|
groupid: "flowAll",
|
||||||
|
showcount: true,
|
||||||
|
title: `${getLabel(381943, "数据映射")}`,
|
||||||
|
viewcondition_dt: 2
|
||||||
|
}
|
||||||
|
, {
|
||||||
|
color: "#000000",
|
||||||
|
groupid: "flowAll",
|
||||||
|
showcount: true,
|
||||||
|
title: `${getLabel(131274, "运行日志")}`,
|
||||||
|
viewcondition_dt: 3
|
||||||
|
}
|
||||||
|
],
|
||||||
|
topTab: [
|
||||||
|
{
|
||||||
|
color: "#000000",
|
||||||
|
groupid: "flowAll",
|
||||||
|
showcount: true,
|
||||||
|
title: `${getLabel(81711, "基本信息")}`,
|
||||||
|
viewcondition_dt: 0
|
||||||
|
}, {
|
||||||
|
color: "#000000",
|
||||||
|
groupid: "flowAll",
|
||||||
|
showcount: true,
|
||||||
|
title: getLabel('501806', '授权设置'),
|
||||||
|
viewcondition_dt: 1
|
||||||
|
}
|
||||||
|
, {
|
||||||
|
color: "#000000",
|
||||||
|
groupid: "flowAll",
|
||||||
|
showcount: true,
|
||||||
|
title: `${getLabel(131274, "运行日志")}`,
|
||||||
|
viewcondition_dt: 3
|
||||||
|
}
|
||||||
|
],
|
||||||
|
topTabAll: [
|
||||||
|
{
|
||||||
|
color: "#000000",
|
||||||
|
groupid: "flowAll",
|
||||||
|
showcount: true,
|
||||||
|
title: `${getLabel(81711, "基本信息")}`,
|
||||||
|
viewcondition_dt: 0
|
||||||
|
}, {
|
||||||
|
color: "#000000",
|
||||||
|
groupid: "flowAll",
|
||||||
|
showcount: true,
|
||||||
|
title: getLabel('501806', '授权设置'),
|
||||||
|
viewcondition_dt: 1
|
||||||
|
}
|
||||||
|
, {
|
||||||
|
color: "#000000",
|
||||||
|
groupid: "flowAll",
|
||||||
|
showcount: true,
|
||||||
|
title: `${getLabel(381943, "数据映射")}`,
|
||||||
|
viewcondition_dt: 2
|
||||||
|
}
|
||||||
|
, {
|
||||||
|
color: "#000000",
|
||||||
|
groupid: "flowAll",
|
||||||
|
showcount: true,
|
||||||
|
title: `${getLabel(131274, "运行日志")}`,
|
||||||
|
viewcondition_dt: 3
|
||||||
|
}
|
||||||
|
],
|
||||||
|
collectParams: {
|
||||||
|
favname: `${getLabel(381908, "统一认证中心")}`,
|
||||||
|
favouritetype: 1,
|
||||||
|
objid: 0,
|
||||||
|
link: "wui/engine.html#/integration/AuthenticationCenter",
|
||||||
|
importantlevel: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillMount () {
|
||||||
|
this.setState({
|
||||||
|
showSearchAd: false,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
render () {
|
||||||
|
const {
|
||||||
|
authenticationCenterStore,
|
||||||
|
} = this.props, {
|
||||||
|
status,
|
||||||
|
registerAppEditForm,
|
||||||
|
tableStore2,
|
||||||
|
tableStore3,
|
||||||
|
} = authenticationCenterStore, {
|
||||||
|
registerAppEditFormCodition,
|
||||||
|
appEditFormDetailDialogVisible,
|
||||||
|
registerAppId = "",
|
||||||
|
editDetailDialogSelectedKey = "0",
|
||||||
|
} = status, {
|
||||||
|
collectParams,
|
||||||
|
} = this.state;
|
||||||
|
|
||||||
|
return <WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@rjbz1d`}
|
||||||
|
title={registerAppId ? getLabel('82178', '编辑应用') : getLabel('382079', '注册应用')}
|
||||||
|
onCancel={this.closeEditDialog}
|
||||||
|
visible={appEditFormDetailDialogVisible}
|
||||||
|
style={{ width: 900, height: 600 }}
|
||||||
|
hasScroll
|
||||||
|
moduleName="integration"
|
||||||
|
buttons={this.getBtns()}
|
||||||
|
moreBtn={{
|
||||||
|
datas: this.getRightMenu(),
|
||||||
|
collectParams
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<WeaPopoverHrm ecId={`${this && this.props && this.props.ecId || ''}_WeaPopoverHrm@c59gv2`} />
|
||||||
|
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@djmodb`}
|
||||||
|
datas={this.getRightMenu()}
|
||||||
|
collectParams={collectParams}
|
||||||
|
>
|
||||||
|
{this.getTabComp()}
|
||||||
|
<WeaNewScroll
|
||||||
|
ecId={`${this && this.props && this.props.ecId || ''}_WeaNewScroll@r3diqa`}
|
||||||
|
height={registerAppId ? 550 : 600}
|
||||||
|
>
|
||||||
|
{
|
||||||
|
(registerAppId && editDetailDialogSelectedKey == 0) || (registerAppId == "")
|
||||||
|
? this.getForm(registerAppEditForm, toJS(registerAppEditFormCodition))
|
||||||
|
: <WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@f5hg54`}
|
||||||
|
key={editDetailDialogSelectedKey}
|
||||||
|
comsWeaTableStore={editDetailDialogSelectedKey == 2 ? tableStore2 : tableStore3}
|
||||||
|
hasOrder={true}
|
||||||
|
needScroll={true}
|
||||||
|
getColumns={this.getColumns}
|
||||||
|
onOperatesClick={this.onOperatesClick}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
</WeaNewScroll>
|
||||||
|
<NewShare ecId={`${this && this.props && this.props.ecId || ''}_NewShare@7nf5dj`} />
|
||||||
|
<AppDataMappingEditDialog ecId={`${this && this.props && this.props.ecId || ''}_AppDataMappingEditDialog@g8l0r6`} />
|
||||||
|
<AppDataMappingImportDialog ecId={`${this && this.props && this.props.ecId || ''}_AppDataMappingImportDialog@h123gt`} />
|
||||||
|
<AppDataMappingImportResultDialog ecId={`${this && this.props && this.props.ecId || ''}_AppDataMappingImportResultDialog@ado7jj`} />
|
||||||
|
</WeaRightMenu>
|
||||||
|
</WeaDialog>
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关闭弹窗
|
||||||
|
*/
|
||||||
|
closeEditDialog = () => {
|
||||||
|
const { authenticationCenterStore } = this.props;
|
||||||
|
|
||||||
|
authenticationCenterStore.setState({
|
||||||
|
appEditFormDetailDialogVisible: false,
|
||||||
|
registerAppId: "",
|
||||||
|
editDetailDialogSelectedKey: "0",
|
||||||
|
});
|
||||||
|
|
||||||
|
this.setState({
|
||||||
|
showSearchAd: false,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否渲染weatab组件
|
||||||
|
*/
|
||||||
|
getTabComp = () => {
|
||||||
|
const {
|
||||||
|
authenticationCenterStore,
|
||||||
|
} = this.props, {
|
||||||
|
status,
|
||||||
|
} = authenticationCenterStore, {
|
||||||
|
registerAppId,
|
||||||
|
editDetailDialogSelectedKey,
|
||||||
|
} = status, {
|
||||||
|
showSearchAd,
|
||||||
|
} = this.state;
|
||||||
|
|
||||||
|
return registerAppId
|
||||||
|
? <WeaTab ecId={`${this && this.props && this.props.ecId || ''}_WeaTab@3u8rej`}
|
||||||
|
datas={this.getTabDatas()}
|
||||||
|
keyParam="viewcondition_dt"
|
||||||
|
selectedKey={editDetailDialogSelectedKey}
|
||||||
|
searchType={editDetailDialogSelectedKey == 2 ? ['advanced'] : []}
|
||||||
|
advanceHeight={80}
|
||||||
|
buttons={this.getTabButton()}
|
||||||
|
searchsAd={this.getAdvancedSearch()}
|
||||||
|
showSearchAd={showSearchAd}
|
||||||
|
buttonsAd={this.getTabButtonsAd()}
|
||||||
|
setShowSearchAd={this.setShowSearchAd}
|
||||||
|
hideSearchAd={this.hideSearchAd}
|
||||||
|
onChange={this.onTabChange}
|
||||||
|
/>
|
||||||
|
: null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑的时候获取weatab的datas数据
|
||||||
|
*/
|
||||||
|
getTabDatas = () => {
|
||||||
|
const {
|
||||||
|
authenticationCenterStore,
|
||||||
|
} = this.props, {
|
||||||
|
registerAppEditFormOrg,
|
||||||
|
} = authenticationCenterStore, {
|
||||||
|
topTab,
|
||||||
|
topTabAll,
|
||||||
|
tokenTopTab,
|
||||||
|
tokenTopTabAll,
|
||||||
|
} = this.state, {
|
||||||
|
account_rules,
|
||||||
|
auth_type_,
|
||||||
|
} = registerAppEditFormOrg.getFormParams();
|
||||||
|
|
||||||
|
if (['6', '7'].includes(account_rules)) {
|
||||||
|
return (auth_type_ === "TOKEN" ? tokenTopTabAll : topTabAll);
|
||||||
|
} else {
|
||||||
|
return (auth_type_ === "TOKEN" ? tokenTopTab : topTab);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* weatab高级搜索的方法
|
||||||
|
*/
|
||||||
|
showSearchAd = bool => this.setState({ showSearchAd: bool });
|
||||||
|
|
||||||
|
hideSearchAd = () => this.setState({ showSearchAd: false });
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 高级搜索
|
||||||
|
*/
|
||||||
|
getAdvancedSearch = () => {
|
||||||
|
const {
|
||||||
|
authenticationCenterStore
|
||||||
|
} = this.props, {
|
||||||
|
searchForm2,
|
||||||
|
status,
|
||||||
|
} = authenticationCenterStore, {
|
||||||
|
condition2 = [],
|
||||||
|
} = status;
|
||||||
|
|
||||||
|
return IntegrationUtil.getAdvancedItem(
|
||||||
|
searchForm2,
|
||||||
|
condition2,
|
||||||
|
this.onSearch,
|
||||||
|
false,
|
||||||
|
this && this.props && this.props.ecId || '',
|
||||||
|
"IntegrationAuthAppEditDetail",
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
onSearch = () => {
|
||||||
|
const {
|
||||||
|
authenticationCenterStore
|
||||||
|
} = this.props, {
|
||||||
|
status,
|
||||||
|
} = authenticationCenterStore;
|
||||||
|
|
||||||
|
authenticationCenterStore.getRegisterAppDataMappingList({ id: status.registerAppId });
|
||||||
|
this.setState({ showSearchAd: false });
|
||||||
|
}
|
||||||
|
|
||||||
|
getTabButtonsAd () {
|
||||||
|
const {
|
||||||
|
authenticationCenterStore,
|
||||||
|
} = this.props;
|
||||||
|
|
||||||
|
return IntegrationUtil.getSearchBtns(
|
||||||
|
this.onSearch,
|
||||||
|
() => authenticationCenterStore.searchForm2.reset(),
|
||||||
|
() => this.setState({ showSearchAd: false }),
|
||||||
|
this && this.props && this.props.ecId || '',
|
||||||
|
"IntegrationAuthAppEditDetail",
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* weatab切换tab时调用的接口
|
||||||
|
*/
|
||||||
|
onTabChange = v => {
|
||||||
|
const {
|
||||||
|
authenticationCenterStore,
|
||||||
|
} = this.props, {
|
||||||
|
registerAppId,
|
||||||
|
} = authenticationCenterStore.status;
|
||||||
|
|
||||||
|
if (v == 2) {
|
||||||
|
authenticationCenterStore.getRegisterAppDataMappingCondition({}, () => {
|
||||||
|
authenticationCenterStore.getRegisterAppDataMappingInfo({ id: registerAppId });
|
||||||
|
});
|
||||||
|
} else if (v == 3) {
|
||||||
|
authenticationCenterStore.getRegisterAppLoginLogList({ id: registerAppId });
|
||||||
|
} else if (v == 0) {
|
||||||
|
authenticationCenterStore.getRegisterAppEditForm({ id: registerAppId });
|
||||||
|
} else if (v == 1) {
|
||||||
|
authenticationCenterStore.getRegisterAppShareList({ sysid: registerAppId });
|
||||||
|
}
|
||||||
|
authenticationCenterStore.setState({
|
||||||
|
editDetailDialogSelectedKey: v,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* weatab的右侧按钮
|
||||||
|
*/
|
||||||
|
getTabButton = () => {
|
||||||
|
const {
|
||||||
|
authenticationCenterStore
|
||||||
|
} = this.props, {
|
||||||
|
status,
|
||||||
|
tableStore3,
|
||||||
|
tableStore2,
|
||||||
|
} = authenticationCenterStore, {
|
||||||
|
rightMenus2 = [],
|
||||||
|
editDetailDialogSelectedKey,
|
||||||
|
} = status;
|
||||||
|
|
||||||
|
if (editDetailDialogSelectedKey == 2) {
|
||||||
|
return rightMenus2 && rightMenus2.map((m, index) => (
|
||||||
|
<Button
|
||||||
|
ecId={`${this && this.props && this.props.ecId || ''}_Button@t4v3r6@AuthAppEditDetailSaveBtn`}
|
||||||
|
style={{ marginRight: index == 2 ? 10 : 0 }}
|
||||||
|
type="primary"
|
||||||
|
disabled={m.menuIcon === 'icon-coms-delete' && tableStore2.selectedRowKeys.length === 0}
|
||||||
|
onClick={() => this.onRightMenuClick(m.type)}
|
||||||
|
>{m.menuName}</Button>
|
||||||
|
));
|
||||||
|
} else if (editDetailDialogSelectedKey == "1") {
|
||||||
|
return [
|
||||||
|
<WeaButtonIcon
|
||||||
|
ecId={`${this && this.props && this.props.ecId || ''}_WeaButtonIcon@undkwa@AuthAppEditDetailaddBtn`}
|
||||||
|
buttonType='add'
|
||||||
|
type="primary"
|
||||||
|
onClick={() => this.onRightMenuClick("share_add")}
|
||||||
|
/>,
|
||||||
|
<WeaButtonIcon
|
||||||
|
ecId={`${this && this.props && this.props.ecId || ''}_WeaButtonIcon@qi5djj@AuthAppEditDetaildelBtn`}
|
||||||
|
buttonType='del'
|
||||||
|
type="primary"
|
||||||
|
disabled={tableStore3.selectedRowKeys.length == 0}
|
||||||
|
onClick={() => this.onRightMenuClick("share_delete")}
|
||||||
|
/>
|
||||||
|
];
|
||||||
|
}
|
||||||
|
return [];
|
||||||
|
};
|
||||||
|
|
||||||
|
getIconSize = (form) => {
|
||||||
|
const {
|
||||||
|
authenticationCenterStore
|
||||||
|
} = this.props, {
|
||||||
|
logoItems = [],
|
||||||
|
} = toJS(authenticationCenterStore);
|
||||||
|
return (
|
||||||
|
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@q6o4qs`}
|
||||||
|
label={getLabel('125422', '图标大小')}
|
||||||
|
labelCol={{ span: 6 }}
|
||||||
|
wrapperCol={{ span: 18 }}
|
||||||
|
>
|
||||||
|
{logoItems.map((field, index) => {
|
||||||
|
return (
|
||||||
|
<div style={{ width: "45%", display: "inline-block", marginLeft: (index == 1) ? "10%" : 0 }}>
|
||||||
|
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@s9wq9g@integrationauthAppEditDetail${field.domkey}`}
|
||||||
|
label={`${field.label}`}
|
||||||
|
labelCol={{ span: 9 }}
|
||||||
|
wrapperCol={{ span: 15 }}
|
||||||
|
error={form.getError(field)}
|
||||||
|
tipPosition="bottom"
|
||||||
|
style={{ padding: 0 }}
|
||||||
|
>
|
||||||
|
<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@c6ixnu@integrationauthAppEditDetail${field.domkey}`} fieldConfig={field} form={form} formParams={form.getFormParams()} />
|
||||||
|
</WeaFormItem>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
})}
|
||||||
|
</WeaFormItem>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
getForm = (form, datas) => {
|
||||||
|
const {
|
||||||
|
authenticationCenterStore,
|
||||||
|
} = this.props, {
|
||||||
|
urllinkimagid = "",
|
||||||
|
showPic,
|
||||||
|
registerAppId,
|
||||||
|
} = authenticationCenterStore.status;
|
||||||
|
const formParams = form.getFormParams();
|
||||||
|
const { isFormInit } = form;
|
||||||
|
let group = [];
|
||||||
|
isFormInit && datas && datas.forEach((c, groupI) => {
|
||||||
|
let items = [];
|
||||||
|
c.items && c.items.map(fields => {
|
||||||
|
let domkey = fields.domkey[0];
|
||||||
|
if ("logo_width" === domkey) {
|
||||||
|
return;
|
||||||
|
} else if (["logo_height"].includes(domkey) && form.getFormParams().auth_type_ != "" && form.getFormParams().auth_type_ != "TOKEN") {
|
||||||
|
items.push({
|
||||||
|
com: this.getIconSize(form),
|
||||||
|
colSpan: 1,
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
if ("service_id" === domkey) {
|
||||||
|
fields.viewAttr = form.getFormParams().auth_type_ === "OAUTH2" ? 3 : 2;
|
||||||
|
}
|
||||||
|
items.push({
|
||||||
|
com: (
|
||||||
|
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@6673rh@integrationauthAppEditDetail${fields.domkey}`}
|
||||||
|
label={`${fields.label}`}
|
||||||
|
labelCol={{ span: `${fields.labelcol}` }}
|
||||||
|
wrapperCol={{ span: `${fields.fieldcol}` }}
|
||||||
|
error={form.getError(fields)}
|
||||||
|
tipPosition="bottom"
|
||||||
|
>
|
||||||
|
{
|
||||||
|
domkey === "logo_pic"
|
||||||
|
? <UploadPic ecId={`${this && this.props && this.props.ecId || ''}_UploadPic@k202au@integrationauthAppEditDetail${fields.domkey}`}
|
||||||
|
fields={fields}
|
||||||
|
urllinkimagid={urllinkimagid}
|
||||||
|
showPic={showPic}
|
||||||
|
editRegister={registerAppId ? true : false}
|
||||||
|
onChange={id => authenticationCenterStore.setState({ urllinkimagid: id, showPic: false })}
|
||||||
|
onDel={() => authenticationCenterStore.setState({ urllinkimagid: "", showPic: false })}
|
||||||
|
/>
|
||||||
|
: <div style={{ position: "relative" }}>
|
||||||
|
<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@ydq4xd@integrationauthAppEditDetail${fields.domkey}`} fieldConfig={fields} form={form} formParams={formParams} onChange={v => {
|
||||||
|
if (domkey === 'appid') {
|
||||||
|
let checkParams = {
|
||||||
|
tableName: 'weaver_sso_app',
|
||||||
|
fieldName: 'appid',
|
||||||
|
fieldValue: form.getFormParams().appid.replace(/^(\s*)|(\s*)$/g, ''),
|
||||||
|
idName: 'id',
|
||||||
|
idValue: ''
|
||||||
|
};
|
||||||
|
checkTableFieldValueUnique(checkParams).then(result => {
|
||||||
|
if (result && result.isNotUnique) {
|
||||||
|
form.showError('appid', getLabel('387654', '标识已存在'));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}} />
|
||||||
|
<div style={{ position: "absolute", top: "0px", right: "-100px" }}>
|
||||||
|
{this.getFormOtherComp(domkey, fields, form)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
</WeaFormItem>),
|
||||||
|
colSpan: 1,
|
||||||
|
hide: form.isHide(fields, (key, allParams) => {
|
||||||
|
return this.getFormHiddenFields(domkey, allParams);
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
group.push(<WeaSearchGroup ecId={`${this && this.props && this.props.ecId || ''}_WeaSearchGroup@nolt7s@integrationauthAppEditDetail${groupI}`} center={true} col={1} needTigger={true} title={c.title} showGroup={c.defaultshow} items={items} />)
|
||||||
|
})
|
||||||
|
return group;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* form按钮的渲染
|
||||||
|
*/
|
||||||
|
getFormOtherComp = (domkey, fields, form) => {
|
||||||
|
if (domkey === "appid") {
|
||||||
|
return (<Button
|
||||||
|
ecId={`${this && this.props && this.props.ecId || ''}_Button@mnxq4b@integrationauthAppEditDetailCreateAppId`}
|
||||||
|
type="primary"
|
||||||
|
disabled={fields.viewAttr == 1}
|
||||||
|
onClick={v => form.updateFields({ appid: uuid() })}
|
||||||
|
>{getLabel('15413', '生成')}</Button>);
|
||||||
|
} else if (domkey === "app_secret_") {
|
||||||
|
return (<Button
|
||||||
|
ecId={`${this && this.props && this.props.ecId || ''}_Button@0shdyl@integrationauthAppEditDetailCreateAppSecret`}
|
||||||
|
type="primary"
|
||||||
|
disabled={fields.viewAttr == 1}
|
||||||
|
onClick={v => form.updateFields({ app_secret_: IntegrationUtil.getAppSecret(false, 24) })}
|
||||||
|
>{getLabel('15413', '生成')}</Button>);
|
||||||
|
} else if (domkey === "pub_key") {
|
||||||
|
return (<Button
|
||||||
|
ecId={`${this && this.props && this.props.ecId || ''}_Button@0shdyl@integrationauthAppEditDetailCopypublickey`}
|
||||||
|
type="primary"
|
||||||
|
onClick={v => {
|
||||||
|
if (copy(`${form.getFormParams()[domkey]}`)) {
|
||||||
|
message.success(getLabel('527609', '应用公钥已经复制成功,您可以使用Ctrl+v粘贴'));
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>{getLabel('77', '复制')}</Button>);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* form表单显隐控制
|
||||||
|
*/
|
||||||
|
getFormHiddenFields = (domkey, allParams) => {
|
||||||
|
const {
|
||||||
|
authenticationCenterStore,
|
||||||
|
} = this.props, {
|
||||||
|
registerAppId,
|
||||||
|
} = authenticationCenterStore.status;
|
||||||
|
let hide = false;
|
||||||
|
|
||||||
|
!["isuse", "auth_type_"].includes(domkey) && allParams.auth_type_ == '' && (hide = true);
|
||||||
|
'app_secret_' == domkey && allParams.auth_type_ == "CAS" && (hide = true);
|
||||||
|
['service_id', "logo_pic", "logo_height", "logo_width"].includes(domkey) && allParams.auth_type_ == "TOKEN" && (hide = true);
|
||||||
|
["app_secret_"].includes(domkey) && allParams.auth_type_ == "DELEGATE" && (hide = true);
|
||||||
|
['pub_key'].includes(domkey) && ((!registerAppId) || (registerAppId && allParams.auth_type_ != "DELEGATE")) && (hide = true);
|
||||||
|
'definebroswerType' == domkey && allParams.account_rules !== '7' && (hide = true);
|
||||||
|
|
||||||
|
return hide;
|
||||||
|
}
|
||||||
|
|
||||||
|
getBtns = () => {
|
||||||
|
const {
|
||||||
|
authenticationCenterStore,
|
||||||
|
} = this.props, {
|
||||||
|
status,
|
||||||
|
registerAppEditForm,
|
||||||
|
} = authenticationCenterStore, {
|
||||||
|
editDetailDialogSelectedKey,
|
||||||
|
registerAppId = "",
|
||||||
|
} = status;
|
||||||
|
if (!registerAppId) {
|
||||||
|
if (registerAppEditForm.getFormParams().auth_type_ === "TOKEN") {
|
||||||
|
return [
|
||||||
|
<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@37za1h@integrationauthAppEditDetailSaveBtn`} type="primary" onClick={() => this.onRightMenuClick('BTN_SAVE')}>{getLabel(86, '保存')}</Button>,
|
||||||
|
];
|
||||||
|
} else {
|
||||||
|
return [
|
||||||
|
<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@oeeq8w@integrationauthAppEditDetailSaveBtn`} type="primary" onClick={() => this.onRightMenuClick('BTN_SAVE')}>{getLabel(86, '保存')}</Button>,
|
||||||
|
<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@e3khcb@integrationauthAppEditDetailSaveAndOpenBtn`} type="primary" onClick={() => this.onRightMenuClick('BTN_SAVE_OPEN_SHARE')}>{getLabel('521924', '保存并进入授权设置')}</Button>,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (editDetailDialogSelectedKey == 0) {
|
||||||
|
return [
|
||||||
|
<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@de97t1@integrationauthAppEditDetailSave`} type="primary" onClick={() => this.onRightMenuClick('BTN_SAVE')}>{getLabel(86, '保存')}</Button>,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
getRightMenu = () => {
|
||||||
|
const {
|
||||||
|
authenticationCenterStore,
|
||||||
|
} = this.props, {
|
||||||
|
status,
|
||||||
|
registerAppEditForm,
|
||||||
|
} = authenticationCenterStore, {
|
||||||
|
rightMenus2,
|
||||||
|
rowSelectIds2,
|
||||||
|
registerAppId,
|
||||||
|
editDetailDialogSelectedKey,
|
||||||
|
} = status;
|
||||||
|
|
||||||
|
let btnArr = [];
|
||||||
|
if (editDetailDialogSelectedKey == 0) {
|
||||||
|
btnArr = [{
|
||||||
|
key: 'BTN_SAVE',
|
||||||
|
icon: <i className='icon-coms-Preservation' />,
|
||||||
|
content: `${getLabel(86, '保存')}`,
|
||||||
|
onClick: () => { this.onRightMenuClick('BTN_SAVE') }
|
||||||
|
}];
|
||||||
|
if ((!registerAppId) && registerAppEditForm.getFormParams().auth_type_ != "TOKEN") {
|
||||||
|
btnArr.push({
|
||||||
|
key: 'BTN_SAVE_OPEN_SHARE',
|
||||||
|
icon: <i className='icon-coms-Preservation' />,
|
||||||
|
content: getLabel('521924', '保存并进入授权设置'),
|
||||||
|
onClick: () => this.onRightMenuClick('BTN_SAVE_OPEN_SHARE')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else if (editDetailDialogSelectedKey == 2) {
|
||||||
|
rightMenus2 && rightMenus2.forEach(m => {
|
||||||
|
btnArr.push({
|
||||||
|
key: m.type,
|
||||||
|
icon: <i className={m.menuIcon} />,
|
||||||
|
content: m.menuName,
|
||||||
|
onClick: () => this.onRightMenuClick(m.type),
|
||||||
|
disabled: m.menuIcon === 'icon-coms-delete' && rowSelectIds2.length === 0
|
||||||
|
});
|
||||||
|
});
|
||||||
|
btnArr.push({
|
||||||
|
key: "BTN_COLUMN",
|
||||||
|
icon: <i className="icon-coms-Custom" />,
|
||||||
|
content: `${getLabel(32535, "显示列定制")}`,
|
||||||
|
onClick: () => this.onRightMenuClick("BTN_COLUMN")
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return btnArr;
|
||||||
|
}
|
||||||
|
|
||||||
|
ipv6Test = (value) => {
|
||||||
|
let reg = /^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;
|
||||||
|
let regV4 = /^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5]|(\*))\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5]|(\*))\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5]|(\*))\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5]|(\*))$/
|
||||||
|
|
||||||
|
let datas = value.split(',');
|
||||||
|
for (let i = 0; i < datas.length; i++) {
|
||||||
|
if (!reg.test(datas[i].trim()) && (!regV4.test(datas[i].trim()))) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
onBaseInfoSave = (type) => {
|
||||||
|
const { authenticationCenterStore } = this.props;
|
||||||
|
const { registerAppEditForm, status } = authenticationCenterStore;
|
||||||
|
const { registerAppId, urllinkimagid = "" } = status;
|
||||||
|
const formParams = registerAppEditForm.getFormParams();
|
||||||
|
|
||||||
|
if (formParams.auth_type_ != "OAUTH2") {
|
||||||
|
let hideFieldsKey = ["service_id"];
|
||||||
|
if (["CAS", "DELEGATE"].includes(formParams.auth_type_)) {
|
||||||
|
hideFieldsKey.push("app_secret_");
|
||||||
|
}
|
||||||
|
window.e9HideFormFieldKeys = hideFieldsKey;
|
||||||
|
}
|
||||||
|
let checkParams = {
|
||||||
|
tableName: 'weaver_sso_app',
|
||||||
|
fieldName: 'appid',
|
||||||
|
fieldValue: formParams.appid.replace(/^(\s*)|(\s*)$/g, ''),
|
||||||
|
idName: 'id',
|
||||||
|
idValue: ''
|
||||||
|
};
|
||||||
|
IntegrationUtil.checkUnique(checkParams, registerAppEditForm, "appid", "2", registerAppId, () => {
|
||||||
|
let value = formParams.allow_ip;
|
||||||
|
let ipv6 = this.ipv6Test(value.trim());
|
||||||
|
formParams.logo_pic = urllinkimagid;
|
||||||
|
IntegrationUtil.onCheck(registerAppEditForm, () => {
|
||||||
|
if (value.trim() == '' || (value.trim() && ipv6)) {
|
||||||
|
let params = Object.assign({ id: registerAppId, operation: registerAppId ? "edit" : "add" }, formParams);
|
||||||
|
authenticationCenterStore.getRegisterAppOperation(params, (record) => {
|
||||||
|
if ('BTN_SAVE_OPEN_SHARE' === type) {
|
||||||
|
authenticationCenterStore.setState({
|
||||||
|
editDetailDialogSelectedKey: '1',
|
||||||
|
registerAppId: record.id,
|
||||||
|
});
|
||||||
|
authenticationCenterStore.getRegisterAppShareList({ sysid: record.id });
|
||||||
|
}
|
||||||
|
}, 'BTN_SAVE_OPEN_SHARE' != type);
|
||||||
|
} else {
|
||||||
|
registerAppEditForm.showError('allow_ip', getLabel('531149', "ip格式不合法"));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
onRightMenuClick = (type) => {
|
||||||
|
const { authenticationCenterStore } = this.props;
|
||||||
|
const { registerAppEditForm, status, tableStore2, tableStore3 } = authenticationCenterStore;
|
||||||
|
const { registerAppId, editDetailDialogSelectedKey } = status;
|
||||||
|
const formParams = registerAppEditForm.getFormParams();
|
||||||
|
|
||||||
|
if (type === "BTN_COLUMN") {
|
||||||
|
if (editDetailDialogSelectedKey == 2) {
|
||||||
|
tableStore2.setColSetVisible(true);
|
||||||
|
tableStore2.tableColSet(true);
|
||||||
|
}
|
||||||
|
} else if ("BTN_SAVE_OPEN_SHARE" === type) {
|
||||||
|
this.onBaseInfoSave('BTN_SAVE_OPEN_SHARE');
|
||||||
|
} else if (type == 'BTN_SAVE') {
|
||||||
|
this.onBaseInfoSave('BTN_SAVE');
|
||||||
|
} else if (type == 'rb_1') {
|
||||||
|
//注册数据映射
|
||||||
|
this.doDataMappingEditById({ randomField0: '', appid: formParams.appid });
|
||||||
|
} else if (type == 'rb_2') {
|
||||||
|
//导入
|
||||||
|
authenticationCenterStore.registerAppDataMappingImportForm.reset();
|
||||||
|
let params = Object.assign({ id: registerAppId, operation: "import" }, formParams);
|
||||||
|
authenticationCenterStore.getRegisterAppDataMappingImportForm(params);
|
||||||
|
authenticationCenterStore.setState({ appEditFormDetailDataMappingImportDialogVisible: true });
|
||||||
|
} else if (type == 'rb_3') {
|
||||||
|
//删除
|
||||||
|
if (toJS(tableStore2.selectedRowKeys).length > 0) {
|
||||||
|
authenticationCenterStore.confirmModal(
|
||||||
|
`${getLabel(385625, '确定要删除选择的记录吗?')}`,
|
||||||
|
authenticationCenterStore.getRegisterAppDataMappingOperation,
|
||||||
|
{
|
||||||
|
operation: 'delete', id: toJS(tableStore2.selectedRowKeys)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else if (type === "share_delete") {
|
||||||
|
IntegrationUtil.doConfirm(
|
||||||
|
getLabel(385625, '确定要删除选择的记录吗?'),
|
||||||
|
authenticationCenterStore.getRegisterAppShareForm,
|
||||||
|
{ operate: "delShare", sysid: registerAppId, id: toJS(tableStore3.selectedRowKeys) }
|
||||||
|
)
|
||||||
|
} else if (type === "share_add") {
|
||||||
|
authenticationCenterStore.setState({
|
||||||
|
showAddShare: true
|
||||||
|
})
|
||||||
|
authenticationCenterStore.getRegisterAppShareForm({ operate: "getAddShareForm", sysid: registerAppId });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onOperatesClick = (record, index, operate) => {
|
||||||
|
const {
|
||||||
|
authenticationCenterStore,
|
||||||
|
} = this.props, {
|
||||||
|
registerAppId,
|
||||||
|
editDetailDialogSelectedKey,
|
||||||
|
} = authenticationCenterStore.status;
|
||||||
|
|
||||||
|
if (operate.index == "0") {
|
||||||
|
this.doDataMappingEditById(record);
|
||||||
|
} else if (operate.index == "1") {
|
||||||
|
//删除
|
||||||
|
if (editDetailDialogSelectedKey == "1") {
|
||||||
|
IntegrationUtil.doConfirm(
|
||||||
|
getLabel(15097, '确定要删除吗?'),
|
||||||
|
authenticationCenterStore.getRegisterAppShareForm,
|
||||||
|
{ operate: "delShare", sysid: registerAppId, id: record.randomFieldId }
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
authenticationCenterStore.confirmModal(
|
||||||
|
`${getLabel(15097, '确定要删除吗?')}`,
|
||||||
|
authenticationCenterStore.getRegisterAppDataMappingOperation,
|
||||||
|
{ operation: 'delete', id: record.randomField0 }
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
doDataMappingEditById = (record) => {
|
||||||
|
const { authenticationCenterStore } = this.props;
|
||||||
|
const { registerAppEditForm } = authenticationCenterStore;
|
||||||
|
authenticationCenterStore.registerAppDataMappingEditForm.reset();
|
||||||
|
authenticationCenterStore.setOperateDataMappingIndex(record.randomField0);
|
||||||
|
authenticationCenterStore.getRegisterAppDataMappingEditForm({ id: record.randomField0, appid: record.appid, account_rules: registerAppEditForm.getFormParams().account_rules });
|
||||||
|
authenticationCenterStore.setState({ appEditFormDetailDataMappingDialogVisible: true });
|
||||||
|
}
|
||||||
|
|
||||||
|
getColumns = (columns = []) => {
|
||||||
|
return columns && columns.map(item => {
|
||||||
|
if (item.dataIndex === "LoginId") {
|
||||||
|
item.render = (text, record) => {
|
||||||
|
return <a onClick={() => this.doDataMappingEditById(record)}>{text}</a>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return item;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,361 @@
|
||||||
|
import React, { Component } from 'react';
|
||||||
|
import {
|
||||||
|
WeaDialog,
|
||||||
|
WeaRightMenu,
|
||||||
|
WeaLocaleProvider,
|
||||||
|
WeaFormItem,
|
||||||
|
WeaCheckbox,
|
||||||
|
} from "ecCom";
|
||||||
|
import {
|
||||||
|
WeaSwitch
|
||||||
|
} from "comsMobx";
|
||||||
|
import {
|
||||||
|
inject,
|
||||||
|
observer
|
||||||
|
} from "mobx-react";
|
||||||
|
import {toJS} from "mobx";
|
||||||
|
import {
|
||||||
|
Button
|
||||||
|
} from "antd";
|
||||||
|
import {onCheck} from "../../util/IntegrationUtil";
|
||||||
|
|
||||||
|
const {getLabel} = WeaLocaleProvider;
|
||||||
|
|
||||||
|
@inject("authenticationCenterStore")
|
||||||
|
@observer
|
||||||
|
export default class NewShare extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
collectParams: {
|
||||||
|
favname: `${getLabel(381908, "统一认证中心")}`,
|
||||||
|
favouritetype: 1,
|
||||||
|
objid: 0,
|
||||||
|
link: "wui/engine.html#/integration/AuthenticationCenter",
|
||||||
|
importantlevel: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getRightMenus = () => {
|
||||||
|
return [{
|
||||||
|
type: "primary",
|
||||||
|
key: "BTN_SAVE",
|
||||||
|
icon: <i className="icon-coms-Preservation" />,
|
||||||
|
content: getLabel(30986, '保存'),
|
||||||
|
onClick: () => this.onMenuClick("BTN_SAVE")
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
getBtns = () => {
|
||||||
|
return [<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@u5gp5n@integrationauthAppNewShareSaveBtn`} type="primary" key="BTN_SAVE" onClick={() => this.onMenuClick("BTN_SAVE")}>{getLabel(30986, '保存')}</Button>];
|
||||||
|
}
|
||||||
|
|
||||||
|
hideShareField = (params) => {
|
||||||
|
const {
|
||||||
|
permissiontype,
|
||||||
|
jobtitlelevel,
|
||||||
|
} = params;
|
||||||
|
|
||||||
|
let temp;
|
||||||
|
|
||||||
|
if (permissiontype == '1') {
|
||||||
|
temp = ['sharevalue6', 'sharevalue5', 'sharevalue2', 'sharevalue7', 'jobtitlesharevalue2', 'jobtitlesharevalue3'];
|
||||||
|
}
|
||||||
|
if (permissiontype == '6') {
|
||||||
|
temp = ['sharevalue1', 'sharevalue5', 'sharevalue2', 'sharevalue7', 'jobtitlesharevalue2', 'jobtitlesharevalue3'];
|
||||||
|
}
|
||||||
|
if (permissiontype == '3') {
|
||||||
|
temp = ['sharevalue1', 'sharevalue6', 'sharevalue5', 'sharevalue2', 'sharevalue7', 'jobtitlesharevalue2', 'jobtitlesharevalue3'];
|
||||||
|
}
|
||||||
|
if (permissiontype == '5') {
|
||||||
|
temp = ['sharevalue1', 'sharevalue6', 'sharevalue2', 'sharevalue7', 'jobtitlesharevalue2', 'jobtitlesharevalue3'];
|
||||||
|
}
|
||||||
|
if (permissiontype == '2') {
|
||||||
|
temp = ['sharevalue1', 'sharevalue6', 'sharevalue5', 'sharevalue7', 'jobtitlesharevalue2', 'jobtitlesharevalue3'];
|
||||||
|
}
|
||||||
|
if (permissiontype == '7') {
|
||||||
|
if (jobtitlelevel == '1') {
|
||||||
|
temp = ['sharevalue1', 'sharevalue6', 'sharevalue5', 'sharevalue2', 'jobtitlesharevalue2', 'jobtitlesharevalue3'];
|
||||||
|
}
|
||||||
|
if (jobtitlelevel == '2') {
|
||||||
|
temp = ['sharevalue1', 'sharevalue6', 'sharevalue5', 'sharevalue2', 'jobtitlesharevalue3'];
|
||||||
|
}
|
||||||
|
if (jobtitlelevel == '3') {
|
||||||
|
temp = ['sharevalue1', 'sharevalue6', 'sharevalue5', 'sharevalue2', 'jobtitlesharevalue2'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
window.e9HideFormFieldKeys = temp;
|
||||||
|
}
|
||||||
|
|
||||||
|
onMenuClick = (type="") => {
|
||||||
|
const{
|
||||||
|
authenticationCenterStore
|
||||||
|
} = this.props, {
|
||||||
|
getRegisterAppShareForm,
|
||||||
|
addShareForm,
|
||||||
|
status,
|
||||||
|
} = authenticationCenterStore;
|
||||||
|
if(type === "BTN_SAVE") {
|
||||||
|
const params = addShareForm.getFormParams();
|
||||||
|
this.hideShareField(params);
|
||||||
|
onCheck(addShareForm, () => {
|
||||||
|
getRegisterAppShareForm({
|
||||||
|
operate: "addShare",
|
||||||
|
sysid: status.registerAppId,
|
||||||
|
...params
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getForm = (form, condition=[]) => {
|
||||||
|
const {
|
||||||
|
permissiontype,
|
||||||
|
} = form.getFormParams(), {
|
||||||
|
isFormInit,
|
||||||
|
} = form;
|
||||||
|
|
||||||
|
let arr = [];
|
||||||
|
isFormInit && condition.forEach(c => {
|
||||||
|
c && c.items && c.items.forEach(field => {
|
||||||
|
const key = field.domkey[0];
|
||||||
|
if (this.filter({
|
||||||
|
permissiontype,
|
||||||
|
key
|
||||||
|
})) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
arr.push(<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@kis43z@integrationauthAppNewShareForm${field.domkey[0]}`}
|
||||||
|
label={`${field.label}`}
|
||||||
|
labelCol={{span: 5, offset: 3}}
|
||||||
|
wrapperCol={{span: 12}}
|
||||||
|
error={form.getError(field)}
|
||||||
|
tipPosition="bottom"
|
||||||
|
style={{padding: 8}}
|
||||||
|
>
|
||||||
|
<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@vfqqy0@integrationauthAppNewShareForm${field.domkey[0]}`} fieldConfig={field} form={form} formParams={form.getFormParams()} onChange={cb => this.handleChange(cb, key, form)}/>
|
||||||
|
</WeaFormItem>)
|
||||||
|
|
||||||
|
arr = [...arr, this.add({
|
||||||
|
permissiontype,
|
||||||
|
key,
|
||||||
|
form,
|
||||||
|
})];
|
||||||
|
})
|
||||||
|
})
|
||||||
|
return <div style={{paddingTop: 15}} className='integrated-share-form'>{arr}</div>
|
||||||
|
}
|
||||||
|
|
||||||
|
filter = (params) => {
|
||||||
|
const {
|
||||||
|
permissiontype,
|
||||||
|
key
|
||||||
|
} = params;
|
||||||
|
|
||||||
|
if (key == 'sharevalue2' || key == 'rolelevel' || key == 'jobtitlelevel' || key == 'jobtitlesharevalue2' || key == 'jobtitlesharevalue3') {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
if (permissiontype == '1' && !(key == 'permissiontype' || key == 'seclevel')) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
if (permissiontype == '6' && !(key == 'permissiontype' || key == 'seclevel')) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
if (permissiontype == '3' && !(key == 'permissiontype' || key == 'seclevel')) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
if (permissiontype == '5' && !(key == 'permissiontype' || key == 'sharevalue5')) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
if (permissiontype == '2' && !(key == 'permissiontype' || key == 'seclevel')) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
if (permissiontype == '7' && !(key == 'permissiontype' || key == 'sharevalue7')) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
add = (params) => {
|
||||||
|
const {
|
||||||
|
permissiontype,
|
||||||
|
key,
|
||||||
|
form,
|
||||||
|
} = params;
|
||||||
|
|
||||||
|
let temp = [];
|
||||||
|
if (permissiontype == '2' && key == 'permissiontype') {
|
||||||
|
temp.push(this.getRole(form));
|
||||||
|
}
|
||||||
|
if (permissiontype == '7' && key == 'sharevalue7') {
|
||||||
|
temp.push(this.getPost(form));
|
||||||
|
}
|
||||||
|
if ((permissiontype == '6' || permissiontype == '1') && key == 'permissiontype') {
|
||||||
|
temp.push(this.getContainSubDom(form, permissiontype));
|
||||||
|
}
|
||||||
|
return temp
|
||||||
|
}
|
||||||
|
|
||||||
|
getContainSubDom = (form, permissiontype) => {
|
||||||
|
const {
|
||||||
|
authenticationCenterStore
|
||||||
|
} = this.props, {
|
||||||
|
shareFormDepFields,
|
||||||
|
shareFormSubFields,
|
||||||
|
} = toJS(authenticationCenterStore);
|
||||||
|
const temp = permissiontype == "1" ? [...shareFormDepFields] : [...shareFormSubFields];
|
||||||
|
return (
|
||||||
|
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@gtb5o8`}
|
||||||
|
label={getLabel('106','对象')}
|
||||||
|
labelCol={{span: 5, offset: 3}}
|
||||||
|
wrapperCol={{span: 12}}
|
||||||
|
style={{padding: 8}}
|
||||||
|
>
|
||||||
|
{temp.map((field, index) => {
|
||||||
|
return (<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@ngm4as@integrationauthAppNewShareForm${field.domkey[0]}`}
|
||||||
|
label={''}
|
||||||
|
colon={false}
|
||||||
|
labelCol={{span: 0}}
|
||||||
|
error={form.getError(field)}
|
||||||
|
tipPosition="bottom"
|
||||||
|
wrapperCol={{span: (index == 0) ? 24 : 17}}
|
||||||
|
style={{float:'left', width:150, marginLeft:(index == 1) ? 27 : 0}}
|
||||||
|
>
|
||||||
|
{
|
||||||
|
index == 0
|
||||||
|
? <WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@d92kju@integrationauthAppNewShareForm${field.domkey[0]}`} fieldConfig={field} form={form} formParams={form.getFormParams()} onChange={cb => this.handleChange(cb)}/>
|
||||||
|
: <WeaCheckbox ecId={`${this && this.props && this.props.ecId || ''}_WeaCheckbox@0sssza@integrationauthAppNewShareForm${field.domkey[0]}`} content={getLabel('125963','含下级')} value={form.getFormParams().has_child} onChange={v => form.updateFields({has_child: v})} />
|
||||||
|
}
|
||||||
|
|
||||||
|
</WeaFormItem>)
|
||||||
|
})}
|
||||||
|
</WeaFormItem>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
handleChange = (cb, key, form) => {
|
||||||
|
if(key === "permissiontype") {
|
||||||
|
if(['1', '6'].includes(form.getFormParams().permissiontype)) {
|
||||||
|
form.updateFields({has_child: '0'});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getRole = (form) => {
|
||||||
|
const {
|
||||||
|
authenticationCenterStore
|
||||||
|
} = this.props, {
|
||||||
|
shareFormRole
|
||||||
|
} = toJS(authenticationCenterStore);
|
||||||
|
return (
|
||||||
|
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@syb506`}
|
||||||
|
label={getLabel(122,'角色')}
|
||||||
|
labelCol={{span: 5, offset: 3}}
|
||||||
|
wrapperCol={{span: 12}}
|
||||||
|
style={{padding: 8}}
|
||||||
|
>
|
||||||
|
{shareFormRole.map((field, index) => {
|
||||||
|
return (<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@1bhqoa@integrationauthAppNewShareForm${field.domkey[0]}`}
|
||||||
|
label={index == 0 ? '' : getLabel(139,'级别')}
|
||||||
|
colon={index == 0 ? false : true}
|
||||||
|
labelCol={{span: (index == 0) ? 0 : 7}}
|
||||||
|
error={form.getError(field)}
|
||||||
|
tipPosition="bottom"
|
||||||
|
wrapperCol={{span: (index == 0) ? 24 : 17}}
|
||||||
|
style={{float:'left', width:150, marginLeft:(index == 1) ? 27 : 0}}
|
||||||
|
>
|
||||||
|
<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@yy0iiw@integrationauthAppNewShareForm${field.domkey[0]}`} fieldConfig={field} form={form} formParams={form.getFormParams()} onChange={cb => this.handleChange(cb)}/>
|
||||||
|
</WeaFormItem>)
|
||||||
|
})}
|
||||||
|
</WeaFormItem>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
getPost = (form) => {
|
||||||
|
const {
|
||||||
|
authenticationCenterStore
|
||||||
|
} = this.props, {
|
||||||
|
shareFormPost
|
||||||
|
} = toJS(authenticationCenterStore), {
|
||||||
|
jobtitlelevel
|
||||||
|
} = form.getFormParams();
|
||||||
|
|
||||||
|
let temp;
|
||||||
|
if (jobtitlelevel == '1') {
|
||||||
|
temp = shareFormPost.slice(0, 1)
|
||||||
|
}
|
||||||
|
if (jobtitlelevel == '2') {
|
||||||
|
temp = shareFormPost.slice(0, 2)
|
||||||
|
}
|
||||||
|
if (jobtitlelevel == '3') {
|
||||||
|
temp = shareFormPost.slice(0, 1).concat(shareFormPost.slice(2))
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@ch9gom`}
|
||||||
|
label={getLabel(6086,'岗位')}
|
||||||
|
labelCol={{span: 5, offset: 3}}
|
||||||
|
wrapperCol={{span: 12}}
|
||||||
|
style={{padding: 8}}
|
||||||
|
>
|
||||||
|
{temp.map((field, index) => {
|
||||||
|
return (<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@v0825u@integrationauthAppNewShareForm${field.domkey[0]}`}
|
||||||
|
label={''}
|
||||||
|
colon={false}
|
||||||
|
labelCol={{span:0}}
|
||||||
|
error={form.getError(field)}
|
||||||
|
tipPosition="bottom"
|
||||||
|
wrapperCol={{span: 24}}
|
||||||
|
style={{float:'left', width: (index == 0) ? 120 : 197, marginLeft:(index == 1) ? 10 : 0}}
|
||||||
|
>
|
||||||
|
<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@bnx468@integrationauthAppNewShareForm${field.domkey[0]}`} fieldConfig={field} form={form} formParams={form.getFormParams()} onChange={cb => this.handleChange(cb)}/>
|
||||||
|
</WeaFormItem>)
|
||||||
|
})}
|
||||||
|
</WeaFormItem>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const{
|
||||||
|
authenticationCenterStore
|
||||||
|
} = this.props, {
|
||||||
|
status,
|
||||||
|
addShareForm,
|
||||||
|
} = authenticationCenterStore, {
|
||||||
|
showAddShare,
|
||||||
|
addShareCondition,
|
||||||
|
} = toJS(status), {
|
||||||
|
collectParams
|
||||||
|
} = this.state;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@ppi1aa`}
|
||||||
|
title={getLabel('383958','添加对象')}
|
||||||
|
moduleName="integration"
|
||||||
|
hasScroll
|
||||||
|
style={{width: 800, height: 600}}
|
||||||
|
visible={showAddShare}
|
||||||
|
onCancel={v => authenticationCenterStore.setState({showAddShare: false})}
|
||||||
|
buttons={this.getBtns()}
|
||||||
|
moreBtn={{
|
||||||
|
datas: this.getRightMenus(),
|
||||||
|
collectParams
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@51mnn9`}
|
||||||
|
datas={this.getRightMenus()}
|
||||||
|
collectParams={collectParams}
|
||||||
|
>
|
||||||
|
{this.getForm(addShareForm, addShareCondition)}
|
||||||
|
</WeaRightMenu>
|
||||||
|
</WeaDialog>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,304 @@
|
||||||
|
import {inject, observer} from "mobx-react";
|
||||||
|
import {Button} from "antd";
|
||||||
|
import {WeaLocaleProvider, WeaRightMenu, WeaTab, WeaTop} from "ecCom";
|
||||||
|
import {WeaLogView, WeaTableNew} from "comsMobx";
|
||||||
|
import NoRight from "../../public/NoRight";
|
||||||
|
import {
|
||||||
|
getAdvancedItem,
|
||||||
|
getSearchBtns,
|
||||||
|
} from "../../util/IntegrationUtil";
|
||||||
|
import AppEditDetailDialog from "./AppEditDetailDialog";
|
||||||
|
|
||||||
|
const { WeaTable } = WeaTableNew;
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
const WeaLogViewComp = WeaLogView.Component;
|
||||||
|
|
||||||
|
@inject("authenticationCenterStore")
|
||||||
|
@observer
|
||||||
|
class AuthenticationCenter extends React.Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
visiable: false,
|
||||||
|
targetId: "",
|
||||||
|
showSearchAd: false,
|
||||||
|
searchType: ['base','advanced'],
|
||||||
|
collectParams: {
|
||||||
|
favname: getLabel('131607','应用管理'),
|
||||||
|
favouritetype: 1,
|
||||||
|
objid: 0,
|
||||||
|
link: "wui/engine.html#/integration/appcenter",
|
||||||
|
importantlevel: 1
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
const { authenticationCenterStore } = this.props;
|
||||||
|
authenticationCenterStore.doAppCenterInit();
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps) {
|
||||||
|
const { authenticationCenterStore } = this.props;
|
||||||
|
if (this.props.location.key !== nextProps.location.key) {
|
||||||
|
authenticationCenterStore.doAppCenterInit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取右键菜单
|
||||||
|
* @returns {Array}
|
||||||
|
*/
|
||||||
|
getRightMenu = () => {
|
||||||
|
const {
|
||||||
|
authenticationCenterStore,
|
||||||
|
} = this.props, {
|
||||||
|
status,
|
||||||
|
newForm,
|
||||||
|
tableStore,
|
||||||
|
} = authenticationCenterStore, {
|
||||||
|
rightMenus=[],
|
||||||
|
} = status, {
|
||||||
|
selectedRowKeys
|
||||||
|
} = tableStore, {
|
||||||
|
isuse,
|
||||||
|
token_isuse,
|
||||||
|
oauth2_isuse,
|
||||||
|
dlgt_isuse,
|
||||||
|
} = newForm.getFormParams();
|
||||||
|
|
||||||
|
let btnArr = rightMenus && rightMenus.map(m => {
|
||||||
|
return {
|
||||||
|
key: m.type,
|
||||||
|
icon: <i className={m.menuIcon} />,
|
||||||
|
content: m.menuName,
|
||||||
|
onClick: () => this.onRightMenuClick(m.type),
|
||||||
|
disabled: (m.menuIcon==='icon-coms-delete' && selectedRowKeys.length === 0) || (m.menuIcon === "icon-coms-New-Flow" && isuse == 0 && token_isuse == 0&& oauth2_isuse == 0&& dlgt_isuse == 0),
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//显示列定制
|
||||||
|
btnArr.push({
|
||||||
|
key: "BTN_COLUMN",
|
||||||
|
icon: <i className="icon-coms-Custom" />,
|
||||||
|
content: `${getLabel(32535, "显示列定制")}`,
|
||||||
|
onClick: () => this.onRightMenuClick("BTN_COLUMN")
|
||||||
|
});
|
||||||
|
return btnArr;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取顶部按钮
|
||||||
|
* @returns {Array}
|
||||||
|
*/
|
||||||
|
getBtns = () => {
|
||||||
|
const {
|
||||||
|
authenticationCenterStore,
|
||||||
|
} = this.props, {
|
||||||
|
status,
|
||||||
|
newForm,
|
||||||
|
tableStore,
|
||||||
|
} = authenticationCenterStore, {
|
||||||
|
rightMenus=[],
|
||||||
|
} = status, {
|
||||||
|
selectedRowKeys
|
||||||
|
} = tableStore, {
|
||||||
|
isuse,
|
||||||
|
token_isuse,
|
||||||
|
oauth2_isuse,
|
||||||
|
dlgt_isuse,
|
||||||
|
} = newForm.getFormParams();
|
||||||
|
|
||||||
|
return rightMenus && rightMenus.map(m => (
|
||||||
|
<Button
|
||||||
|
ecId={`${this && this.props && this.props.ecId || ''}_Button@authApp${m.type}`}
|
||||||
|
type="primary"
|
||||||
|
disabled={(m.menuIcon==='icon-coms-delete' && selectedRowKeys.length === 0) || (m.menuIcon === "icon-coms-New-Flow" && isuse == 0 && token_isuse == 0&& oauth2_isuse == 0&& dlgt_isuse == 0)}
|
||||||
|
onClick={() => this.onRightMenuClick(m.type)}
|
||||||
|
>{m.menuName}</Button>
|
||||||
|
));
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 打开编辑弹窗
|
||||||
|
*/
|
||||||
|
doEditDetailById = (record={}) => {
|
||||||
|
const { authenticationCenterStore } = this.props;
|
||||||
|
let tabIndex = record.tabIndex ? record.tabIndex : 0;
|
||||||
|
|
||||||
|
authenticationCenterStore.setState({
|
||||||
|
appEditFormDetailDialogVisible: true,
|
||||||
|
registerAppId: record.id || "",
|
||||||
|
editDetailDialogSelectedKey: tabIndex,
|
||||||
|
});
|
||||||
|
|
||||||
|
if("3" == tabIndex) {
|
||||||
|
authenticationCenterStore.getRegisterAppLoginLogList({id: record.id});
|
||||||
|
} else if("2" == tabIndex) {
|
||||||
|
authenticationCenterStore.getRegisterAppDataMappingCondition({}, () => {
|
||||||
|
authenticationCenterStore.getRegisterAppDataMappingInfo({id: record.id});
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
authenticationCenterStore.getRegisterAppEditForm({id: record.id});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 右键菜单点击事件
|
||||||
|
* @param type
|
||||||
|
*/
|
||||||
|
onRightMenuClick = (type, record) => {
|
||||||
|
const {
|
||||||
|
authenticationCenterStore,
|
||||||
|
} = this.props, {
|
||||||
|
tableStore,
|
||||||
|
confirmModal,
|
||||||
|
getRegisterAppOperation,
|
||||||
|
} = authenticationCenterStore;
|
||||||
|
let id = record ? record.id || "" : tableStore.selectedRowKeys || "";
|
||||||
|
|
||||||
|
if(type == "rb_1") {
|
||||||
|
authenticationCenterStore.getRegisterAppEditForm({id});
|
||||||
|
authenticationCenterStore.setState({
|
||||||
|
appEditFormDetailDialogVisible: true,
|
||||||
|
registerAppId: "",
|
||||||
|
editDetailDialogSelectedKey: "0",
|
||||||
|
});
|
||||||
|
} else if(type == "rb_2" || type == "1") {
|
||||||
|
let title = getLabel(385625, '确定要删除选择的记录吗?');
|
||||||
|
|
||||||
|
if(type == "1") {
|
||||||
|
title = getLabel( 15097, '确定要删除吗?');
|
||||||
|
}
|
||||||
|
|
||||||
|
confirmModal(title, getRegisterAppOperation, {operation:'delete', id});
|
||||||
|
} else if(type == "BTN_COLUMN") {
|
||||||
|
//显示列定制
|
||||||
|
tableStore.setColSetVisible(true);
|
||||||
|
tableStore.tableColSet(true);
|
||||||
|
} else if("0" === type) {
|
||||||
|
// 编辑
|
||||||
|
this.doEditDetailById({id});
|
||||||
|
} else if("2" === type) {
|
||||||
|
//数据映射
|
||||||
|
this.doEditDetailById({id, tabIndex: 2});
|
||||||
|
} else if("3" === type) {
|
||||||
|
this.setState({visiable: true, targetId: id});
|
||||||
|
} else if("4" === type) {
|
||||||
|
// 运行日志
|
||||||
|
this.doEditDetailById({id, tabIndex: 3});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据列表行数据的操作项
|
||||||
|
* @param record
|
||||||
|
* @param index
|
||||||
|
* @param operate
|
||||||
|
* @param flag
|
||||||
|
*/
|
||||||
|
onOperatesClick = (record, index, operate) => this.onRightMenuClick(operate.index, record);
|
||||||
|
|
||||||
|
getColumnsInfo = (datas=[]) => {
|
||||||
|
return datas && datas.map(data => {
|
||||||
|
if(data.dataIndex === "appid") {
|
||||||
|
data.render = (text, record, index) => <a onClick={() => this.onRightMenuClick("0", record)}>{text}</a>;
|
||||||
|
}
|
||||||
|
|
||||||
|
return data;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
getAdvancedSearch = (form, datas=[]) => {
|
||||||
|
return getAdvancedItem(
|
||||||
|
form,
|
||||||
|
datas,
|
||||||
|
this.handleSearchFun,
|
||||||
|
true,
|
||||||
|
this && this.props && this.props.ecId || '',
|
||||||
|
"authAppIndex"
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
handleSearchFun = () => {
|
||||||
|
const { authenticationCenterStore } = this.props;
|
||||||
|
authenticationCenterStore.getRegisterAppList();
|
||||||
|
this.setState({ showSearchAd: false });
|
||||||
|
}
|
||||||
|
|
||||||
|
getTabButtonsAd = () => {
|
||||||
|
const { authenticationCenterStore } = this.props;
|
||||||
|
return getSearchBtns(
|
||||||
|
this.handleSearchFun,
|
||||||
|
() => authenticationCenterStore.appCenterForm.reset(),
|
||||||
|
() => this.setState({ showSearchAd: false }),
|
||||||
|
this && this.props && this.props.ecId || '',
|
||||||
|
"authAppIndex",
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
onCloseLogDialog = () => {
|
||||||
|
this.setState({
|
||||||
|
visiable: false,
|
||||||
|
targetId: "",
|
||||||
|
})
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const {authenticationCenterStore} = this.props;
|
||||||
|
const {tableStore, hasRight, logStore, rightLoading, appCenterForm, status} = authenticationCenterStore;
|
||||||
|
const {appCenterCondition, advanceHeight} = status;
|
||||||
|
const {collectParams, showSearchAd=false, visiable, targetId, searchType} = this.state;
|
||||||
|
|
||||||
|
return (
|
||||||
|
rightLoading
|
||||||
|
? null
|
||||||
|
: hasRight
|
||||||
|
? <WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@nb4xqe`}
|
||||||
|
datas={this.getRightMenu()}
|
||||||
|
collectParams={collectParams}
|
||||||
|
>
|
||||||
|
<WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@wrg4ed`}
|
||||||
|
title={getLabel('131607','应用管理')}
|
||||||
|
icon={<i className="icon-coms-integration" />}
|
||||||
|
iconBgcolor="#1a57a0"
|
||||||
|
buttons={this.getBtns()}
|
||||||
|
showDropIcon={true}
|
||||||
|
dropMenuDatas={this.getRightMenu()}
|
||||||
|
dropMenuProps={{collectParams}}
|
||||||
|
>
|
||||||
|
<WeaTab ecId={`${this && this.props && this.props.ecId || ''}_WeaTab@dqi4g7`}
|
||||||
|
searchType={searchType}
|
||||||
|
searchsBaseValue={appCenterForm.getFormParams().appid}
|
||||||
|
advanceHeight={advanceHeight}
|
||||||
|
searchsAd={this.getAdvancedSearch(appCenterForm, appCenterCondition)}
|
||||||
|
buttonsAd={this.getTabButtonsAd()}
|
||||||
|
onSearch={this.handleSearchFun}
|
||||||
|
onSearchChange={value => appCenterForm.updateFields({appid: value})}
|
||||||
|
showSearchAd={showSearchAd}
|
||||||
|
setShowSearchAd={() => this.setState({ showSearchAd: !showSearchAd })}
|
||||||
|
hideSearchAd={() => this.setState({ showSearchAd: false })}
|
||||||
|
/>
|
||||||
|
<WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@1vilfa`}
|
||||||
|
comsWeaTableStore={tableStore}
|
||||||
|
hasOrder={true}
|
||||||
|
needScroll={true}
|
||||||
|
onOperatesClick={this.onOperatesClick}
|
||||||
|
getColumns={this.getColumnsInfo}
|
||||||
|
/>
|
||||||
|
</WeaTop>
|
||||||
|
<AppEditDetailDialog ecId={`${this && this.props && this.props.ecId || ''}_AppEditDetailDialog@d5h4fk`}/>
|
||||||
|
<WeaLogViewComp
|
||||||
|
ecId={`${this && this.props && this.props.ecId || ''}_WeaLogViewComp@l1npy1`}
|
||||||
|
onCancel={this.onCloseLogDialog}
|
||||||
|
visible={visiable}
|
||||||
|
logStore={logStore}
|
||||||
|
logSmallType="92"
|
||||||
|
targetId={targetId}
|
||||||
|
/>
|
||||||
|
</WeaRightMenu>
|
||||||
|
: <NoRight ecId={`${this && this.props && this.props.ecId || ''}_NoRight@jmntgm`}/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default AuthenticationCenter;
|
||||||
|
|
@ -0,0 +1,202 @@
|
||||||
|
import {inject, observer} from "mobx-react";
|
||||||
|
import {toJS} from "mobx";
|
||||||
|
import {Button} from "antd";
|
||||||
|
import {WeaFormItem, WeaLocaleProvider, WeaRightMenu, WeaSearchGroup, WeaTop} from "ecCom";
|
||||||
|
import {WeaSwitch} from "comsMobx";
|
||||||
|
import NoRight from "../../public/NoRight";
|
||||||
|
import * as IntegrationUtil from "../../util/IntegrationUtil";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
@inject("authenticationCenterStore")
|
||||||
|
@observer
|
||||||
|
class AuthenticationDelegate extends React.Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
visiable:false,
|
||||||
|
collectParams: {
|
||||||
|
favname: getLabel('521345','Delegate认证'),
|
||||||
|
favouritetype: 1,
|
||||||
|
objid: 0,
|
||||||
|
link: "wui/engine.html#/integration/delegate_server",
|
||||||
|
importantlevel: 1
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
const { authenticationCenterStore } = this.props;
|
||||||
|
authenticationCenterStore.doInit();
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillUnmount() {
|
||||||
|
this.props.authenticationCenterStore.clearStore();
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps) {
|
||||||
|
const { authenticationCenterStore } = this.props;
|
||||||
|
if (this.props.location.key !== nextProps.location.key) {
|
||||||
|
authenticationCenterStore.doInit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取右键菜单
|
||||||
|
* @returns {Array}
|
||||||
|
*/
|
||||||
|
getRightMenu = () => {
|
||||||
|
return [{
|
||||||
|
key: "BTN_BASE_SAVE",
|
||||||
|
icon: <i className="icon-coms-Preservation" />,
|
||||||
|
content: `${getLabel(30986, '保存')}`,
|
||||||
|
onClick: () => this.onRightMenuClick("BTN_BASE_SAVE")
|
||||||
|
}, {
|
||||||
|
key: 'BTN_TEST',
|
||||||
|
icon: <i className='icon-coms-currency-Task' />,
|
||||||
|
content: `${getLabel(25496, '测试')}`,
|
||||||
|
onClick: () => this.onRightMenuClick('BTN_TEST')
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取顶部按钮
|
||||||
|
* @returns {Array}
|
||||||
|
*/
|
||||||
|
getBtns = () => {
|
||||||
|
return [
|
||||||
|
<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@y4h5b9@integrationauthDelegateButtonSaveBtn`} type="primary" onClick={() => this.onRightMenuClick('BTN_BASE_SAVE')}>{getLabel(30986, '保存')}</Button>,
|
||||||
|
<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@y4h5b9@integrationauthDelegateButtonTestBtn`} type="primary" onClick={() => this.onRightMenuClick('BTN_TEST')}>{getLabel(25496, '测试')}</Button>
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 右键菜单点击事件
|
||||||
|
* @param type
|
||||||
|
*/
|
||||||
|
onRightMenuClick = (type) => {
|
||||||
|
const { authenticationCenterStore } = this.props;
|
||||||
|
const { newForm } = authenticationCenterStore;
|
||||||
|
|
||||||
|
IntegrationUtil.onCheck(newForm, () => {
|
||||||
|
let params = newForm.getFormParams();
|
||||||
|
delete params.isuse;
|
||||||
|
delete params.token_isuse;
|
||||||
|
delete params.oauth2_isuse;
|
||||||
|
delete params.spnego_isuse;
|
||||||
|
|
||||||
|
if (type == "BTN_BASE_SAVE") {
|
||||||
|
params.method = 'weaversso';
|
||||||
|
|
||||||
|
if(params.dlgt_isuse == "1") {
|
||||||
|
authenticationCenterStore.getBaseInfoFormOperation({casserverurl: params.loginurl || "", method: 'test', testBeforeSave: true}, (result) => {
|
||||||
|
if(result.success) {
|
||||||
|
if(params.dlgt_ec_isuse == '1') {
|
||||||
|
IntegrationUtil.doConfirm(
|
||||||
|
getLabel('529602','经检测,需要同时开启Delegate集成(会重新生成Delegate集成配置),保存后将自动重启服务,若有失败,请手动重启服务,以确保系统能正常使用!'),
|
||||||
|
authenticationCenterStore.getBaseInfoFormOperation,
|
||||||
|
params,
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
authenticationCenterStore.getBaseInfoFormOperation(params);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
if(params.dlgt_ec_isuse == '1') {
|
||||||
|
IntegrationUtil.doConfirm(
|
||||||
|
getLabel('529601','经检测,需要同时关闭Delegate集成,保存后将自动重启服务,若有失败,请手动重启服务,以确保系统能正常使用!'),
|
||||||
|
authenticationCenterStore.getBaseInfoFormOperation,
|
||||||
|
params
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
authenticationCenterStore.getBaseInfoFormOperation(params);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if ("BTN_TEST" === type) {
|
||||||
|
params = {
|
||||||
|
method: 'test',
|
||||||
|
casserverurl: params.loginurl || "",
|
||||||
|
};
|
||||||
|
authenticationCenterStore.getBaseInfoFormOperation(params);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
getBaseInfoForm = () => {
|
||||||
|
const {authenticationCenterStore} = this.props;
|
||||||
|
const {newForm, status} = authenticationCenterStore;
|
||||||
|
const {BaseInfoFormFields} = toJS(status);
|
||||||
|
const {isFormInit} = newForm;
|
||||||
|
let group = [];
|
||||||
|
|
||||||
|
isFormInit && BaseInfoFormFields && BaseInfoFormFields.forEach(c =>{
|
||||||
|
if(['delegate', 'desc'].includes(c.key)) {
|
||||||
|
let items = [];
|
||||||
|
c.items && c.items.forEach(fields => {
|
||||||
|
items.push({
|
||||||
|
com:(<div style={{margin: 'desc' == c.key ? "0 -20px" : "0 0"}}>
|
||||||
|
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@p0mz2x@integrationauthDelegateForm${fields.domkey[0]}`}
|
||||||
|
label={`${fields.label}`}
|
||||||
|
labelCol={{span: `${fields.labelcol}`}}
|
||||||
|
wrapperCol={{span: `${fields.fieldcol}`}}
|
||||||
|
error={newForm.getError(fields)}
|
||||||
|
tipPosition="bottom"
|
||||||
|
>
|
||||||
|
<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@a6y53g@integrationauthDelegateForm${fields.domkey[0]}`} fieldConfig={fields} form={newForm} />
|
||||||
|
</WeaFormItem>
|
||||||
|
</div>),
|
||||||
|
colSpan:1,
|
||||||
|
hide: newForm.isHide(fields, (keys, allParams) => {
|
||||||
|
let bool = false;
|
||||||
|
!["delegate_desc_", "dlgt_isuse"].includes(fields.domkey[0]) && allParams.dlgt_isuse != '1' && (bool = true);
|
||||||
|
return bool;
|
||||||
|
})
|
||||||
|
});
|
||||||
|
});
|
||||||
|
group.push(<WeaSearchGroup
|
||||||
|
ecId={`${this && this.props && this.props.ecId || ''}_WeaSearchGroup@ib3tkg@integrationauthDelegateFormSearchs4`}
|
||||||
|
center={'desc' != c.key}
|
||||||
|
col={1}
|
||||||
|
needTigger={true}
|
||||||
|
title={c.title}
|
||||||
|
showGroup={c.defaultshow}
|
||||||
|
items={items}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return group;
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const {authenticationCenterStore} = this.props;
|
||||||
|
const {hasRight, rightLoading} = authenticationCenterStore;
|
||||||
|
const {collectParams} = this.state;
|
||||||
|
|
||||||
|
return (
|
||||||
|
rightLoading
|
||||||
|
? null
|
||||||
|
: hasRight
|
||||||
|
? <WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@g45iys`}
|
||||||
|
datas={this.getRightMenu()}
|
||||||
|
collectParams={collectParams}
|
||||||
|
>
|
||||||
|
<WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@93q1do`}
|
||||||
|
title={getLabel('521345','Delegate认证')}
|
||||||
|
icon={<i className="icon-coms-integration" />}
|
||||||
|
iconBgcolor="#1a57a0"
|
||||||
|
buttons={this.getBtns()}
|
||||||
|
showDropIcon={true}
|
||||||
|
dropMenuDatas={this.getRightMenu()}
|
||||||
|
dropMenuProps={{collectParams}}
|
||||||
|
>
|
||||||
|
{this.getBaseInfoForm()}
|
||||||
|
</WeaTop>
|
||||||
|
</WeaRightMenu>
|
||||||
|
: <NoRight ecId={`${this && this.props && this.props.ecId || ''}_NoRight@hf3e3y`}/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default AuthenticationDelegate;
|
||||||
|
|
@ -0,0 +1,102 @@
|
||||||
|
import {inject, observer} from "mobx-react";
|
||||||
|
import {toJS} from "mobx";
|
||||||
|
import {WeaLocaleProvider, WeaRightMenu, WeaTab, WeaTop} from "ecCom";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
@inject("authenticationCenterStore")
|
||||||
|
@observer
|
||||||
|
class AuthenticationCenter extends React.Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
visiable:false,
|
||||||
|
topTab: [
|
||||||
|
{
|
||||||
|
color: "#000000",
|
||||||
|
groupid: "flowAll",
|
||||||
|
showcount: true,
|
||||||
|
title: `${getLabel(381910, "配置说明")}`,
|
||||||
|
viewcondition: 2
|
||||||
|
}
|
||||||
|
,{
|
||||||
|
color: "#000000",
|
||||||
|
groupid: "flowAll",
|
||||||
|
showcount: true,
|
||||||
|
title: `${getLabel(381911, "开发说明")}`,
|
||||||
|
viewcondition: 3
|
||||||
|
}
|
||||||
|
],
|
||||||
|
collectParams: {
|
||||||
|
favname: getLabel('516460','帮助中心'),
|
||||||
|
favouritetype: 1,
|
||||||
|
objid: 0,
|
||||||
|
link: "wui/engine.html#/integration/helpcenter",
|
||||||
|
importantlevel: 1
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillMount() {
|
||||||
|
this.props.authenticationCenterStore.setState({selectedKey: "2"});
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillUnmount() {
|
||||||
|
this.props.authenticationCenterStore.clearStore();
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
const {authenticationCenterStore} = this.props;
|
||||||
|
authenticationCenterStore.setState({selectedKey: "2"})
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps) {
|
||||||
|
const {authenticationCenterStore} = this.props;
|
||||||
|
if (this.props.location.key !== nextProps.location.key) {
|
||||||
|
authenticationCenterStore.setState({selectedKey: "2"});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { authenticationCenterStore } = this.props;
|
||||||
|
const {status} = authenticationCenterStore;
|
||||||
|
const {selectedKey} = toJS(status);
|
||||||
|
const {topTab, collectParams} = this.state;
|
||||||
|
|
||||||
|
return (<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@674cc1`}
|
||||||
|
datas={[]}
|
||||||
|
collectParams={collectParams}
|
||||||
|
>
|
||||||
|
<WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@y309b0`}
|
||||||
|
title={getLabel('516460','帮助中心')}
|
||||||
|
icon={<i className="icon-coms-integration" />}
|
||||||
|
iconBgcolor="#1a57a0"
|
||||||
|
buttons={[]}
|
||||||
|
showDropIcon={true}
|
||||||
|
dropMenuDatas={[]}
|
||||||
|
dropMenuProps={{collectParams}}
|
||||||
|
>
|
||||||
|
<WeaTab ecId={`${this && this.props && this.props.ecId || ''}_WeaTab@00qa1s`}
|
||||||
|
datas={topTab}
|
||||||
|
keyParam="viewcondition" //主键
|
||||||
|
selectedKey={selectedKey}
|
||||||
|
onChange={v => authenticationCenterStore.setState({selectedKey: v})}
|
||||||
|
/>
|
||||||
|
{
|
||||||
|
selectedKey == 2 ? (
|
||||||
|
<div style={{height:'90%'}}>
|
||||||
|
<iframe src={`${window.ecologyContentPath || ""}/integration/weaversso/summary_cfg.html`} width="100%" height="100%" scrolling="yes" frameBorder="0" align="top"></iframe>
|
||||||
|
</div>
|
||||||
|
) : selectedKey == 3 ? (
|
||||||
|
<div style={{height:'90%'}}>
|
||||||
|
<iframe src={`${window.ecologyContentPath || ""}/integration/weaversso/summary_dev.html`} width="100%" height="100%" scrolling="yes" frameBorder="0" align="top"></iframe>
|
||||||
|
</div>
|
||||||
|
):(<div></div>)
|
||||||
|
}
|
||||||
|
</WeaTop>
|
||||||
|
</WeaRightMenu>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default AuthenticationCenter;
|
||||||
|
|
@ -0,0 +1,203 @@
|
||||||
|
import {inject, observer} from "mobx-react";
|
||||||
|
import {toJS} from "mobx";
|
||||||
|
import {Button} from "antd";
|
||||||
|
import {WeaFormItem, WeaLocaleProvider, WeaRightMenu, WeaSearchGroup, WeaTop, WeaTools} from "ecCom";
|
||||||
|
import {WeaSwitch} from "comsMobx";
|
||||||
|
import NoRight from "../../public/NoRight";
|
||||||
|
import NonStand from "../../public/NonStand";
|
||||||
|
import * as IntegrationUtil from "../../util/IntegrationUtil";
|
||||||
|
import PopoverButton from '../../public/PopoverButton';
|
||||||
|
import "../../style/webxml.less";
|
||||||
|
|
||||||
|
const { getKey } = WeaTools;
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
@inject("authenticationCenterStore")
|
||||||
|
@observer
|
||||||
|
class AuthenticationCenter extends React.Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
visiable:false,
|
||||||
|
collectParams: {
|
||||||
|
favname: getLabel('518323','OAuth2认证'),
|
||||||
|
favouritetype: 1,
|
||||||
|
objid: 0,
|
||||||
|
link: "wui/engine.html#/integration/oauth2_server",
|
||||||
|
importantlevel: 1
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
const { authenticationCenterStore } = this.props;
|
||||||
|
authenticationCenterStore.doInit("oauth2");
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillUnmount() {
|
||||||
|
this.props.authenticationCenterStore.clearStore();
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps) {
|
||||||
|
const { authenticationCenterStore } = this.props;
|
||||||
|
if (this.props.location.key !== nextProps.location.key) {
|
||||||
|
authenticationCenterStore.doInit("oauth2");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取右键菜单
|
||||||
|
* @returns {Array}
|
||||||
|
*/
|
||||||
|
getRightMenu = () => {
|
||||||
|
return [{
|
||||||
|
key: "BTN_BASE_SAVE",
|
||||||
|
icon: <i className="icon-coms-Preservation" />,
|
||||||
|
content: getLabel(30986, '保存'),
|
||||||
|
onClick: () => this.onRightMenuClick("BTN_BASE_SAVE")
|
||||||
|
}
|
||||||
|
, {
|
||||||
|
key: 'BTN_TEST',
|
||||||
|
icon: <i className='icon-coms-currency-Task' />,
|
||||||
|
content: `${getLabel(25496, '测试')}`,
|
||||||
|
onClick: () => this.onRightMenuClick('BTN_TEST')
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取顶部按钮
|
||||||
|
* @returns {Array}
|
||||||
|
*/
|
||||||
|
getBtns = () => {
|
||||||
|
return [
|
||||||
|
<PopoverButton ecId={`${this && this.props && this.props.ecId || ''}_PopoverButton@9zafap@integrationauthOauth2ButtonSaveBtn`}
|
||||||
|
content={getLabel(30986, '保存')}
|
||||||
|
type="primary"
|
||||||
|
onClick={() => this.onRightMenuClick("BTN_BASE_SAVE")}
|
||||||
|
/>,
|
||||||
|
<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@juyi6s@integrationauthOauth2ButtonTestBtn`} type="primary" onClick={() => this.onRightMenuClick('BTN_TEST')}>{getLabel(25496,'测试')}</Button>
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 右键菜单点击事件
|
||||||
|
* @param type
|
||||||
|
*/
|
||||||
|
onRightMenuClick = (type) => {
|
||||||
|
const { authenticationCenterStore } = this.props;
|
||||||
|
const { newForm } = authenticationCenterStore;
|
||||||
|
|
||||||
|
if (type == "BTN_BASE_SAVE") {
|
||||||
|
IntegrationUtil.onCheck(newForm,()=>{
|
||||||
|
let params = Object.assign({}, newForm.getFormParams(), {method: 'weaversso'});
|
||||||
|
delete params.isuse;
|
||||||
|
delete params.token_isuse;
|
||||||
|
delete params.spnego_isuse;
|
||||||
|
delete params.dlgt_isuse;
|
||||||
|
if(params.oauth2_isuse == "1") {
|
||||||
|
authenticationCenterStore.getBaseInfoFormOperation({oauth2_heartbeat_url: params.oauth2_heartbeat_url, method: 'oauth2_test', testBeforeSave: true}, (result) => {
|
||||||
|
if(result.success) {
|
||||||
|
if(params.oauth2_client_isuse == '1') {
|
||||||
|
IntegrationUtil.doConfirm(
|
||||||
|
getLabel('521937','经检测,需要同时开启OAuth2集成(会重新生成OAuth2集成配置),保存后将自动重启服务,若有失败,请手动重启服务,以确保系统能正常使用!'),
|
||||||
|
authenticationCenterStore.getBaseInfoFormOperation,
|
||||||
|
params,
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
authenticationCenterStore.getBaseInfoFormOperation(params);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else {
|
||||||
|
if(params.oauth2_client_isuse == '1') {
|
||||||
|
IntegrationUtil.doConfirm(
|
||||||
|
getLabel('521939','经检测,需要同时关闭OAuth2集成,保存后将自动重启服务,若有失败,请手动重启服务,以确保系统能正常使用!'),
|
||||||
|
authenticationCenterStore.getBaseInfoFormOperation,
|
||||||
|
params
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
authenticationCenterStore.getBaseInfoFormOperation(params);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else if(type == "BTN_TEST") {
|
||||||
|
let loginurl = newForm.getFormParams().oauth2_heartbeat_url;
|
||||||
|
let params = {oauth2_heartbeat_url: loginurl, method: 'oauth2_test'};
|
||||||
|
authenticationCenterStore.getBaseInfoFormOperation(params);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
getBaseInfoForm = () => {
|
||||||
|
const {authenticationCenterStore} = this.props;
|
||||||
|
const {newForm, status} = authenticationCenterStore;
|
||||||
|
const {BaseInfoFormFields} = toJS(status);
|
||||||
|
const {isFormInit} = newForm;
|
||||||
|
let group = [];
|
||||||
|
const formParams = newForm.getFormParams();
|
||||||
|
|
||||||
|
isFormInit && BaseInfoFormFields && BaseInfoFormFields.map((c, index) =>{
|
||||||
|
if(index == 2) {
|
||||||
|
let items = [];
|
||||||
|
c.items && c.items.map(fields => {
|
||||||
|
items.push({
|
||||||
|
com:(
|
||||||
|
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@0w4975@integrationauthOauth2Form${fields.domkey[0]}`}
|
||||||
|
label={`${fields.label}`}
|
||||||
|
labelCol={{span: `${fields.labelcol}`}}
|
||||||
|
wrapperCol={{span: `${fields.fieldcol}`}}
|
||||||
|
error={newForm.getError(fields)}
|
||||||
|
tipPosition="bottom"
|
||||||
|
>
|
||||||
|
<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@tve9nr@integrationauthOauth2Form${fields.domkey[0]}`} fieldConfig={fields} form={newForm} formParams={formParams} onChange={v=> {}} />
|
||||||
|
</WeaFormItem>),
|
||||||
|
colSpan:1,
|
||||||
|
hide: newForm.isHide(fields, (keys, allParams) => {
|
||||||
|
let bool = false;
|
||||||
|
getKey(fields) != 'oauth2_isuse' && allParams.oauth2_isuse != '1' && (bool = true);
|
||||||
|
return bool;
|
||||||
|
})
|
||||||
|
});
|
||||||
|
});
|
||||||
|
group.push(<WeaSearchGroup ecId={`${this && this.props && this.props.ecId || ''}_WeaSearchGroup@j8uqi9@integrationauthOauth2Form${index}`} center col={1} needTigger={false} title={""} showGroup={c.defaultshow} items={items}/>);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return group;
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const {authenticationCenterStore} = this.props;
|
||||||
|
const {hasRight, rightLoading, status} = authenticationCenterStore;
|
||||||
|
const {hasNonStandard, nonStandLoading} = toJS(status);
|
||||||
|
const {collectParams} = this.state;
|
||||||
|
|
||||||
|
return (nonStandLoading
|
||||||
|
? null
|
||||||
|
: hasNonStandard
|
||||||
|
? rightLoading
|
||||||
|
? null
|
||||||
|
: hasRight
|
||||||
|
? <WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@sse454`}
|
||||||
|
className={"inte-webxml-rightmenu"}
|
||||||
|
datas={this.getRightMenu()}
|
||||||
|
collectParams={collectParams}
|
||||||
|
>
|
||||||
|
<WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@lk5y0e`}
|
||||||
|
title={getLabel('518323','OAuth2认证')}
|
||||||
|
icon={<i className="icon-coms-integration" />}
|
||||||
|
iconBgcolor="#1a57a0"
|
||||||
|
buttons={this.getBtns()}
|
||||||
|
showDropIcon={true}
|
||||||
|
dropMenuDatas={this.getRightMenu()}
|
||||||
|
dropMenuProps={{collectParams}}
|
||||||
|
>
|
||||||
|
{this.getBaseInfoForm()}
|
||||||
|
</WeaTop>
|
||||||
|
</WeaRightMenu>
|
||||||
|
: <NoRight ecId={`${this && this.props && this.props.ecId || ''}_NoRight@0xibbm`}/>
|
||||||
|
: <NonStand ecId={`${this && this.props && this.props.ecId || ''}_NonStand@vs9ghk`} />
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default AuthenticationCenter;
|
||||||
|
|
@ -0,0 +1,169 @@
|
||||||
|
import {inject, observer} from "mobx-react";
|
||||||
|
import {toJS} from "mobx";
|
||||||
|
import {Button} from "antd";
|
||||||
|
import {WeaFormItem, WeaLocaleProvider, WeaRightMenu, WeaSearchGroup, WeaTop, WeaTools} from "ecCom";
|
||||||
|
import {WeaSwitch} from "comsMobx";
|
||||||
|
import NoRight from "../../public/NoRight";
|
||||||
|
import * as IntegrationUtil from "../../util/IntegrationUtil";
|
||||||
|
|
||||||
|
const { getKey } = WeaTools;
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
@inject("authenticationCenterStore")
|
||||||
|
@observer
|
||||||
|
class AuthenticationSPNEGO extends React.Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
visiable:false,
|
||||||
|
collectParams: {
|
||||||
|
favname: getLabel('521386','SPNEGO认证'),
|
||||||
|
favouritetype: 1,
|
||||||
|
objid: 0,
|
||||||
|
link: "wui/engine.html#/integration/spnego",
|
||||||
|
importantlevel: 1
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
const { authenticationCenterStore } = this.props;
|
||||||
|
authenticationCenterStore.doInit();
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillUnmount() {
|
||||||
|
this.props.authenticationCenterStore.clearStore();
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps) {
|
||||||
|
const { authenticationCenterStore } = this.props;
|
||||||
|
if (this.props.location.key !== nextProps.location.key) {
|
||||||
|
authenticationCenterStore.doInit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取右键菜单
|
||||||
|
* @returns {Array}
|
||||||
|
*/
|
||||||
|
getRightMenu() {
|
||||||
|
return [{
|
||||||
|
key: "BTN_BASE_SAVE",
|
||||||
|
icon: <i className="icon-coms-Preservation" />,
|
||||||
|
content: `${getLabel(30986, '保存')}`,
|
||||||
|
onClick: () => this.onRightMenuClick("BTN_BASE_SAVE")
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取顶部按钮
|
||||||
|
* @returns {Array}
|
||||||
|
*/
|
||||||
|
getBtns = () => {
|
||||||
|
return [
|
||||||
|
<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@mtxc5f@integrationauthSPNEGOButtonSaveBtn`} type="primary" onClick={() => this.onRightMenuClick('BTN_BASE_SAVE')}>{getLabel(30986, '保存')}</Button>,
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 右键菜单点击事件
|
||||||
|
* @param type
|
||||||
|
*/
|
||||||
|
onRightMenuClick = (type) => {
|
||||||
|
const { authenticationCenterStore } = this.props;
|
||||||
|
const { newForm } = authenticationCenterStore;
|
||||||
|
|
||||||
|
if (type == "BTN_BASE_SAVE") {
|
||||||
|
IntegrationUtil.onCheck(newForm,()=>{
|
||||||
|
let params = Object.assign({}, newForm.getFormParams(), {method: 'weaversso'});
|
||||||
|
delete params.isuse;
|
||||||
|
delete params.token_isuse;
|
||||||
|
delete params.oauth2_isuse;
|
||||||
|
delete params.dlgt_isuse;
|
||||||
|
authenticationCenterStore.getBaseInfoFormOperation(params);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
getBaseInfoForm = () => {
|
||||||
|
const {authenticationCenterStore} = this.props;
|
||||||
|
const {newForm, status} = authenticationCenterStore;
|
||||||
|
const {BaseInfoFormFields, spnegoDescription=""} = toJS(status);
|
||||||
|
const {isFormInit} = newForm;
|
||||||
|
let group = [];
|
||||||
|
const formParams = newForm.getFormParams();
|
||||||
|
|
||||||
|
isFormInit && BaseInfoFormFields && BaseInfoFormFields.forEach((c, index) =>{
|
||||||
|
if(index == 3) {
|
||||||
|
let items = [];
|
||||||
|
c.items && c.items.forEach(fields => {
|
||||||
|
if(fields.domkey[0] != "spnego_desc_") {
|
||||||
|
items.push({
|
||||||
|
com:(
|
||||||
|
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@1eypgg@integrationauthSPNEGOForm${fields.domkey[0]}`}
|
||||||
|
label={`${fields.label}`}
|
||||||
|
labelCol={{span: `${fields.labelcol}`}}
|
||||||
|
wrapperCol={{span: `${fields.fieldcol}`}}
|
||||||
|
error={newForm.getError(fields)}
|
||||||
|
tipPosition="bottom"
|
||||||
|
>
|
||||||
|
<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@nx88fn@integrationauthSPNEGOForm${fields.domkey[0]}`} fieldConfig={fields} form={newForm} formParams={formParams} onChange={v=> {}} />
|
||||||
|
</WeaFormItem>),
|
||||||
|
colSpan:1,
|
||||||
|
hide: newForm.isHide(fields, (keys, allParams) => {
|
||||||
|
let bool = false;
|
||||||
|
getKey(fields) === 'spnego_ds' && allParams.spnego_isuse != '1' && (bool = true);
|
||||||
|
return bool;
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
group.push(<WeaSearchGroup ecId={`${this && this.props && this.props.ecId || ''}_WeaSearchGroup@xul6xr@integrationauthSPNEGOForm${index}`} center col={1} needTigger={true} title={getLabel('82743','基础信息')} showGroup={c.defaultshow} items={items}/>);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
group.push(
|
||||||
|
<WeaSearchGroup
|
||||||
|
ecId={`${this && this.props && this.props.ecId || ''}_WeaSearchGroup@xulxr2@integrationauthSPNEGOForm${2}`}
|
||||||
|
col={1}
|
||||||
|
needTigger={true}
|
||||||
|
title={getLabel('25734','说明')}
|
||||||
|
showGroup={true}
|
||||||
|
>
|
||||||
|
<div style={{margin: "0 10px"}} dangerouslySetInnerHTML={{__html: spnegoDescription}} />
|
||||||
|
</WeaSearchGroup>
|
||||||
|
);
|
||||||
|
return group;
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const {authenticationCenterStore} = this.props;
|
||||||
|
const {hasRight, rightLoading} = authenticationCenterStore;
|
||||||
|
const {collectParams} = this.state;
|
||||||
|
|
||||||
|
return (
|
||||||
|
rightLoading
|
||||||
|
? null
|
||||||
|
: hasRight
|
||||||
|
? <WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@r8im6g`}
|
||||||
|
datas={this.getRightMenu()}
|
||||||
|
collectParams={collectParams}
|
||||||
|
>
|
||||||
|
<WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@yz2cz5`}
|
||||||
|
title={getLabel('521386','SPNEGO认证')}
|
||||||
|
icon={<i className="icon-coms-integration" />}
|
||||||
|
iconBgcolor="#1a57a0"
|
||||||
|
buttons={this.getBtns()}
|
||||||
|
showDropIcon={true}
|
||||||
|
dropMenuDatas={this.getRightMenu()}
|
||||||
|
dropMenuProps={{collectParams}}
|
||||||
|
>
|
||||||
|
{this.getBaseInfoForm()}
|
||||||
|
</WeaTop>
|
||||||
|
</WeaRightMenu>
|
||||||
|
: <NoRight ecId={`${this && this.props && this.props.ecId || ''}_NoRight@l5plw4`}/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default AuthenticationSPNEGO;
|
||||||
|
|
@ -0,0 +1,167 @@
|
||||||
|
import {inject, observer} from "mobx-react";
|
||||||
|
import {toJS} from "mobx";
|
||||||
|
import {WeaFormItem, WeaLocaleProvider, WeaRightMenu, WeaSearchGroup, WeaTop, WeaTools} from "ecCom";
|
||||||
|
import {WeaSwitch} from "comsMobx";
|
||||||
|
import NoRight from "../../public/NoRight";
|
||||||
|
import * as IntegrationUtil from "../../util/IntegrationUtil";
|
||||||
|
import {Button} from "antd";
|
||||||
|
import "../../style/webxml.less";
|
||||||
|
|
||||||
|
const { getKey } = WeaTools;
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
@inject("authenticationCenterStore")
|
||||||
|
@observer
|
||||||
|
class AuthenticationCenter extends React.Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
visiable:false,
|
||||||
|
collectParams: {
|
||||||
|
favname: getLabel('516738','Token认证'),
|
||||||
|
favouritetype: 1,
|
||||||
|
objid: 0,
|
||||||
|
link: "wui/engine.html#/integration/token",
|
||||||
|
importantlevel: 1
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
const { authenticationCenterStore } = this.props;
|
||||||
|
authenticationCenterStore.doInit();
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillUnmount() {
|
||||||
|
this.props.authenticationCenterStore.clearStore();
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps) {
|
||||||
|
const { authenticationCenterStore } = this.props;
|
||||||
|
if (this.props.location.key !== nextProps.location.key) {
|
||||||
|
authenticationCenterStore.doInit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取右键菜单
|
||||||
|
* @returns {Array}
|
||||||
|
*/
|
||||||
|
getRightMenu() {
|
||||||
|
return [{
|
||||||
|
key: "BTN_BASE_SAVE",
|
||||||
|
icon: <i className="icon-coms-Preservation" />,
|
||||||
|
content: getLabel(30986, '保存'),
|
||||||
|
onClick: () => this.onRightMenuClick("BTN_BASE_SAVE")
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取顶部按钮
|
||||||
|
* @returns {Array}
|
||||||
|
*/
|
||||||
|
getBtns = () => {
|
||||||
|
return [
|
||||||
|
<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@integrationAuthToken@integrationauthTokenButtonSaveBtn`} type="primary" onClick={() => this.onRightMenuClick('BTN_BASE_SAVE')}>{getLabel(30986, '保存')}</Button>
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 右键菜单点击事件
|
||||||
|
* @param type
|
||||||
|
*/
|
||||||
|
onRightMenuClick = (type) => {
|
||||||
|
const { authenticationCenterStore } = this.props;
|
||||||
|
const { newForm } = authenticationCenterStore;
|
||||||
|
|
||||||
|
if (type == "BTN_BASE_SAVE") {
|
||||||
|
IntegrationUtil.onCheck(newForm,()=>{
|
||||||
|
let params = Object.assign({}, newForm.getFormParams(), {method: 'weaversso'});
|
||||||
|
delete params.isuse;
|
||||||
|
delete params.oauth2_isuse;
|
||||||
|
delete params.spnego_isuse;
|
||||||
|
delete params.dlgt_isuse;
|
||||||
|
IntegrationUtil.doConfirm(
|
||||||
|
getLabel('512788','保存后将自动重启服务,若有失败,请手动重启服务,以确保系统能正常使用!'),
|
||||||
|
authenticationCenterStore.getBaseInfoFormOperation,
|
||||||
|
params
|
||||||
|
)
|
||||||
|
});
|
||||||
|
}else if(type == "BTN_TEST") {
|
||||||
|
let loginurl = newForm.getFormParams().loginurl;
|
||||||
|
let params = {casserverurl: loginurl, method: 'test'};
|
||||||
|
authenticationCenterStore.getBaseInfoFormOperation(params);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
getBaseInfoForm = () => {
|
||||||
|
const {authenticationCenterStore} = this.props;
|
||||||
|
const {newForm, status} = authenticationCenterStore;
|
||||||
|
const {BaseInfoFormFields} = toJS(status);
|
||||||
|
const {isFormInit} = newForm;
|
||||||
|
let group = [];
|
||||||
|
const formParams = newForm.getFormParams();
|
||||||
|
|
||||||
|
isFormInit && BaseInfoFormFields && BaseInfoFormFields.map((c, index) =>{
|
||||||
|
if(index == 1) {
|
||||||
|
let items = [];
|
||||||
|
c.items && c.items.map(fields => {
|
||||||
|
items.push({
|
||||||
|
com:(
|
||||||
|
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@tg605w@integrationauthTokenForm${fields.domkey[0]}`}
|
||||||
|
label={`${fields.label}`}
|
||||||
|
labelCol={{span: `${fields.labelcol}`}}
|
||||||
|
wrapperCol={{span: `${fields.fieldcol}`}}
|
||||||
|
error={newForm.getError(fields)}
|
||||||
|
tipPosition="bottom"
|
||||||
|
>
|
||||||
|
<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@ftxvbp@integrationauthTokenForm${fields.domkey[0]}`} fieldConfig={fields} form={newForm} formParams={formParams} onChange={v=> {}} />
|
||||||
|
</WeaFormItem>),
|
||||||
|
colSpan:1,
|
||||||
|
hide: newForm.isHide(fields, (keys, allParams) => {
|
||||||
|
let bool = false;
|
||||||
|
getKey(fields) === 'get_token_url' && allParams.token_isuse != '1' && (bool = true);
|
||||||
|
getKey(fields) === 'check_token_url' && allParams.token_isuse != '1' && (bool = true);
|
||||||
|
return bool;
|
||||||
|
})
|
||||||
|
});
|
||||||
|
});
|
||||||
|
group.push(<WeaSearchGroup ecId={`${this && this.props && this.props.ecId || ''}_WeaSearchGroup@t6rvl3@integrationauthTokenForm${index}`} center col={1} needTigger={false} title={""} showGroup={c.defaultshow} items={items}/>);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return group;
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const {authenticationCenterStore} = this.props;
|
||||||
|
const {hasRight, rightLoading} = authenticationCenterStore;
|
||||||
|
const {collectParams} = this.state;
|
||||||
|
|
||||||
|
return (
|
||||||
|
rightLoading
|
||||||
|
? null
|
||||||
|
: hasRight
|
||||||
|
? <WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@9ck2za`}
|
||||||
|
className={"inte-webxml-rightmenu"}
|
||||||
|
datas={this.getRightMenu()}
|
||||||
|
collectParams={collectParams}
|
||||||
|
>
|
||||||
|
<WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@9h3747`}
|
||||||
|
title={getLabel('516738','Token认证')}
|
||||||
|
icon={<i className="icon-coms-integration" />}
|
||||||
|
iconBgcolor="#1a57a0"
|
||||||
|
buttons={this.getBtns()}
|
||||||
|
showDropIcon={true}
|
||||||
|
dropMenuDatas={this.getRightMenu()}
|
||||||
|
dropMenuProps={{collectParams}}
|
||||||
|
>
|
||||||
|
{this.getBaseInfoForm()}
|
||||||
|
</WeaTop>
|
||||||
|
</WeaRightMenu>
|
||||||
|
: <NoRight ecId={`${this && this.props && this.props.ecId || ''}_NoRight@jn0yz5`}/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default AuthenticationCenter;
|
||||||
|
|
@ -0,0 +1,167 @@
|
||||||
|
// import React from "react";
|
||||||
|
// import {inject, observer} from "mobx-react";
|
||||||
|
// import { Button} from "antd";
|
||||||
|
// import {toJS} from "mobx";
|
||||||
|
// import {WeaForm, WeaLogView, WeaNewScroll, WeaSwitch, WeaTableNew} from "comsMobx";
|
||||||
|
// import {WeaDialog, WeaLocaleProvider, WeaTools, WeaSearchGroup, WeaFormItem, WeaRightMenu} from "ecCom";
|
||||||
|
// import * as IntegrationUtil from "../../util/IntegrationUtil";
|
||||||
|
// import {checkUserMappingLoginIdUnique,checkUserMappingAppLoginIdUnique} from "../../apis/AuthenticationCenterService"
|
||||||
|
// const { getKey } = WeaTools;
|
||||||
|
// const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
// const store = ["authenticationCenterStore"];
|
||||||
|
|
||||||
|
// @inject(...store)
|
||||||
|
// @observer
|
||||||
|
// export default class AppDataMappingEditDialog extends React.Component {
|
||||||
|
// constructor(props) {
|
||||||
|
// super(props);
|
||||||
|
// this.state = {
|
||||||
|
// collectParams: {
|
||||||
|
// favname: `${getLabel(381908, "统一认证中心")}`,
|
||||||
|
// favouritetype: 1,
|
||||||
|
// objid: 0,
|
||||||
|
// link: "wui/engine.html#/integration/AuthenticationCenter",
|
||||||
|
// importantlevel: 1
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// render() {
|
||||||
|
// const {authenticationCenterStore} = this.props;
|
||||||
|
// const status = toJS(authenticationCenterStore.status);
|
||||||
|
// const {collectParams} = this.state;
|
||||||
|
// return <WeaDialog
|
||||||
|
// title={authenticationCenterStore.operateDataMappingIndex == '' ? getLabel('31691,381943','注册数据映射') : getLabel('26473,381943','编辑数据映射')}
|
||||||
|
// onCancel={()=> authenticationCenterStore.setState({appEditFormDetailDataMappingDialogVisible: false})}
|
||||||
|
// visible={status.appEditFormDetailDataMappingDialogVisible}
|
||||||
|
// style={{width: 700, height: 400}}
|
||||||
|
// hasScroll
|
||||||
|
// moduleName="integration"
|
||||||
|
// buttons={[
|
||||||
|
// <Button type="primary" onClick={()=> this.onRightMenuClick('BTN_SAVE')}>{getLabel(86,'保存')}</Button>
|
||||||
|
// ]}
|
||||||
|
// moreBtn={{
|
||||||
|
// datas: this.getRightMenu(),
|
||||||
|
// collectParams: collectParams
|
||||||
|
// }}
|
||||||
|
// >
|
||||||
|
// <WeaRightMenu
|
||||||
|
// datas={this.getRightMenu()}
|
||||||
|
// collectParams={collectParams}
|
||||||
|
// >
|
||||||
|
// {
|
||||||
|
// authenticationCenterStore.registerAppDataMappingEditForm.render({col: 1},{
|
||||||
|
// onChange: (v)=> {
|
||||||
|
// },
|
||||||
|
// isHide: (key, formParams) => {}
|
||||||
|
|
||||||
|
// },true,(c, idx)=>{
|
||||||
|
// if(idx==0){
|
||||||
|
// let items = [];
|
||||||
|
// let bottomDis = 0;
|
||||||
|
// let form = authenticationCenterStore.registerAppDataMappingEditForm;
|
||||||
|
// let formParams = form.getFormParams();
|
||||||
|
// c.items.map(fields => {
|
||||||
|
// if(getKey(fields) == 'apploginid') {
|
||||||
|
// bottomDis = 15;
|
||||||
|
// }else {
|
||||||
|
// bottomDis = 0;
|
||||||
|
// }
|
||||||
|
// items.push({
|
||||||
|
// com: (
|
||||||
|
// <div style={{marginBottom: bottomDis}}>
|
||||||
|
// <WeaFormItem
|
||||||
|
// label={`${fields.label}`}
|
||||||
|
// labelCol={{span: `${fields.labelcol}`}}
|
||||||
|
// wrapperCol={{span: `${fields.fieldcol}`}}
|
||||||
|
// error={form.getError(fields)}
|
||||||
|
// tipPosition="bottom"
|
||||||
|
// >
|
||||||
|
// <nobr>
|
||||||
|
// <WeaSwitch fieldConfig={fields} form={form} formParams={formParams}
|
||||||
|
// onChange={(v)=>{
|
||||||
|
// if(getKey(fields) === 'userid') {
|
||||||
|
// let params={userid:form.getFormParams().userid,operation:'getUserInfo'};
|
||||||
|
// authenticationCenterStore.getRegisterAppDataMappingOperation(params,(result)=>{
|
||||||
|
// if(result) {
|
||||||
|
// if(result.depname) {
|
||||||
|
// form.updateFields({depname: result.depname});
|
||||||
|
// }
|
||||||
|
// if(result.subname) {
|
||||||
|
// form.updateFields({subname: result.subname});
|
||||||
|
// }
|
||||||
|
// if(result.loginid) {
|
||||||
|
// form.updateFields({loginid: result.loginid});
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
// }}
|
||||||
|
// />
|
||||||
|
// {/*{getKey(fields)==='account_rules'&&formParams.account_rules>5?<Button type="primary" style={{marginLeft:5}}>{getLabel(86,'数据映射')}</Button>:""}*/}
|
||||||
|
// </nobr>
|
||||||
|
|
||||||
|
// </WeaFormItem></div>),
|
||||||
|
// colSpan: 1,
|
||||||
|
// hide: form.isHide(fields, (key, formParams) => {
|
||||||
|
// let hide = false;
|
||||||
|
// if ('definebroswerType' == key && formParams.account_rules !== '7') {
|
||||||
|
// hide = true;
|
||||||
|
// }
|
||||||
|
// return hide;
|
||||||
|
// }),
|
||||||
|
// onChange: (v)=> {
|
||||||
|
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// });
|
||||||
|
|
||||||
|
// return <WeaSearchGroup center={true} col={1} needTigger={true} title={c.title} showGroup={c.defaultshow} items={items}/>
|
||||||
|
// }
|
||||||
|
// })}
|
||||||
|
// </WeaRightMenu>
|
||||||
|
// </WeaDialog>
|
||||||
|
// }
|
||||||
|
|
||||||
|
// getRightMenu() {
|
||||||
|
// let btnArr = [
|
||||||
|
// {
|
||||||
|
// key: 'BTN_SAVE',
|
||||||
|
// icon: <i className='icon-coms-Preservation'/>,
|
||||||
|
// content : `${getLabel(86,'保存')}`,
|
||||||
|
// onClick : () => this.onRightMenuClick('BTN_SAVE')
|
||||||
|
// }
|
||||||
|
// ];
|
||||||
|
// return btnArr;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// onRightMenuClick = (type) => {
|
||||||
|
// const {authenticationCenterStore} = this.props;
|
||||||
|
// const {registerAppEditForm,registerAppDataMappingEditForm, status} = authenticationCenterStore;
|
||||||
|
// if(type == 'BTN_SAVE'){
|
||||||
|
// let id=authenticationCenterStore.registerAppDataMappingId||"";
|
||||||
|
// let appid = registerAppEditForm.getFormParams().appid;
|
||||||
|
// let loginid = registerAppDataMappingEditForm.getFormParams().loginid;
|
||||||
|
// let apploginid = registerAppDataMappingEditForm.getFormParams().apploginid;
|
||||||
|
// checkUserMappingLoginIdUnique({appId: appid, idValue: id, loginId: loginid, appLoginId: apploginid}).then(result=>{
|
||||||
|
// if(result&&result.isNotUnique) {
|
||||||
|
// registerAppDataMappingEditForm.showError('userid',getLabel('31053','已存在,请确认'));
|
||||||
|
// }else{
|
||||||
|
// checkUserMappingAppLoginIdUnique({appId: appid, idValue: id, loginId: loginid, appLoginId: apploginid}).then(result=>{
|
||||||
|
// if(result&&result.isNotUnique) {
|
||||||
|
// registerAppDataMappingEditForm.showError('apploginid',getLabel('31053','已存在,请确认'));
|
||||||
|
// return;
|
||||||
|
// }else{
|
||||||
|
// IntegrationUtil.onCheck(registerAppDataMappingEditForm,function () {
|
||||||
|
// let operation = id==""?"adduser":"edit";
|
||||||
|
// let params = Object.assign({id:id,appid:appid,operation:operation}, registerAppDataMappingEditForm.getFormParams());
|
||||||
|
// authenticationCenterStore.getRegisterAppDataMappingOperation(params);
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
@ -0,0 +1,183 @@
|
||||||
|
// import { Button } from "antd";
|
||||||
|
// import { WeaSwitch } from "comsMobx";
|
||||||
|
// import { WeaDialog, WeaFormItem, WeaLocaleProvider, WeaRightMenu, WeaSearchGroup, WeaTools, WeaUpload } from "ecCom";
|
||||||
|
// import { toJS } from "mobx";
|
||||||
|
// import { inject, observer } from "mobx-react";
|
||||||
|
// import React from "react";
|
||||||
|
// import * as IntegrationUtil from "../../util/IntegrationUtil";
|
||||||
|
// const { getKey } = WeaTools;
|
||||||
|
// const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
// const store = ["authenticationCenterStore"];
|
||||||
|
|
||||||
|
// @inject(...store)
|
||||||
|
// @observer
|
||||||
|
// export default class AppDataMappingImportDialog extends React.Component {
|
||||||
|
// constructor(props) {
|
||||||
|
// super(props);
|
||||||
|
// this.state = {
|
||||||
|
// file: [],
|
||||||
|
// filelist: [],
|
||||||
|
// collectParams: {
|
||||||
|
// favname: `${getLabel(381908, "统一认证中心")}`,
|
||||||
|
// favouritetype: 1,
|
||||||
|
// objid: 0,
|
||||||
|
// link: "wui/engine.html#/integration/AuthenticationCenter",
|
||||||
|
// importantlevel: 1
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// componentDidMount() {
|
||||||
|
// this.setState({
|
||||||
|
// file: [],
|
||||||
|
// filelist: [],
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
|
||||||
|
// render() {
|
||||||
|
// const { authenticationCenterStore } = this.props;
|
||||||
|
// const status = toJS(authenticationCenterStore.status);
|
||||||
|
// const {collectParams} = this.state;
|
||||||
|
|
||||||
|
// return <WeaDialog
|
||||||
|
// title={getLabel('381943,18596', '数据映射导入')}
|
||||||
|
// onCancel={() => authenticationCenterStore.setState({ appEditFormDetailDataMappingImportDialogVisible: false })}
|
||||||
|
// visible={status.appEditFormDetailDataMappingImportDialogVisible}
|
||||||
|
// style={{ width: 700, height: 400 }}
|
||||||
|
// hasScroll
|
||||||
|
// moduleName="integration"
|
||||||
|
// buttons={[
|
||||||
|
// <Button type="primary" onClick={() => this.onRightMenuClick('BTN_SAVE')}>{getLabel(18596, '导入')}</Button>
|
||||||
|
// ]}
|
||||||
|
// moreBtn={{
|
||||||
|
// datas: this.getRightMenu(),
|
||||||
|
// collectParams: collectParams
|
||||||
|
// }}
|
||||||
|
// >
|
||||||
|
// <WeaRightMenu
|
||||||
|
// datas={this.getRightMenu()}
|
||||||
|
// collectParams={collectParams}
|
||||||
|
// >
|
||||||
|
// {
|
||||||
|
// authenticationCenterStore.registerAppDataMappingImportForm.render({ col: 1, center: true }, {
|
||||||
|
// onChange: (v) => {
|
||||||
|
// },
|
||||||
|
// isHide: (key, formParams) => { }
|
||||||
|
|
||||||
|
// }, true, (c, idx) => {
|
||||||
|
// if (idx == 0) {
|
||||||
|
// let items = [];
|
||||||
|
// let form = authenticationCenterStore.registerAppDataMappingImportForm;
|
||||||
|
// let formParams = form.getFormParams();
|
||||||
|
// c.items.map((fields, index) => {
|
||||||
|
// if (index === 0) {
|
||||||
|
// items.push({
|
||||||
|
// com: (
|
||||||
|
// <WeaFormItem
|
||||||
|
// label={`${fields.label}`}
|
||||||
|
// labelCol={{ span: `${fields.labelcol}` }}
|
||||||
|
// wrapperCol={{ span: `${fields.fieldcol}` }}
|
||||||
|
// error={form.getError(fields)}
|
||||||
|
// tipPosition="bottom"
|
||||||
|
// >
|
||||||
|
// <div>
|
||||||
|
// <div style={{ float: 'left' }}>
|
||||||
|
// <WeaUpload
|
||||||
|
// uploadUrl='/api/doc/upload/uploadFile'
|
||||||
|
// category='string'
|
||||||
|
// limitType='xls,xlsx'
|
||||||
|
// maxFilesNumber={1}
|
||||||
|
// datas={this.state.filelist}
|
||||||
|
// onChange={(ids, list) => {this.setState({ file: ids, filelist: list }) }}
|
||||||
|
// >
|
||||||
|
// <Button>选择文件</Button>
|
||||||
|
// </WeaUpload>
|
||||||
|
// </div>
|
||||||
|
// <div style={{ float: 'left', paddingLeft: 10, paddingTop: 6 }}>
|
||||||
|
// {this.state.filelist.length == 0 ? <p>{getLabel('384040','未选择任何文件')}</p> : this.state.filelist.map(file => <p>{file.filename}</p>)}
|
||||||
|
// </div>
|
||||||
|
// </div>
|
||||||
|
// </WeaFormItem>),
|
||||||
|
// colSpan: 1,
|
||||||
|
// hide: form.isHide(fields, (key, formParams) => {
|
||||||
|
// let hide = false;
|
||||||
|
// return hide;
|
||||||
|
// }),
|
||||||
|
// onChange: (v) => {
|
||||||
|
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
|
||||||
|
// } else {
|
||||||
|
// items.push({
|
||||||
|
// com: (
|
||||||
|
// <WeaFormItem
|
||||||
|
// label={`${fields.label}`}
|
||||||
|
// labelCol={{ span: `${fields.labelcol}` }}
|
||||||
|
// wrapperCol={{ span: `${fields.fieldcol}` }}
|
||||||
|
// error={form.getError(fields)}
|
||||||
|
// tipPosition="bottom"
|
||||||
|
// >
|
||||||
|
// <div style={{marginTop:7}}>
|
||||||
|
// <WeaSwitch fieldConfig={fields} form={form} formParams={formParams}
|
||||||
|
// onChange={(v) => {
|
||||||
|
// if (getKey(fields) === 'userid') {
|
||||||
|
// }
|
||||||
|
// }}
|
||||||
|
// />
|
||||||
|
// </div>
|
||||||
|
|
||||||
|
// </WeaFormItem>),
|
||||||
|
// colSpan: 1,
|
||||||
|
// hide: form.isHide(fields, (key, formParams) => {
|
||||||
|
// let hide = false;
|
||||||
|
// return hide;
|
||||||
|
// }),
|
||||||
|
// onChange: (v) => {
|
||||||
|
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// return <WeaSearchGroup
|
||||||
|
// center={true} col={1} needTigger={true} title={c.title} showGroup={c.defaultshow} items={items} />
|
||||||
|
// }
|
||||||
|
// })}
|
||||||
|
// </WeaRightMenu>
|
||||||
|
// </WeaDialog>
|
||||||
|
// }
|
||||||
|
|
||||||
|
// getRightMenu() {
|
||||||
|
// let btnArr = [
|
||||||
|
// {
|
||||||
|
// key: 'BTN_SAVE',
|
||||||
|
// icon: <i className='icon-coms-Preservation' />,
|
||||||
|
// content: `${getLabel(18596, '导入')}`,
|
||||||
|
// onClick: () => { this.onRightMenuClick('BTN_SAVE') }
|
||||||
|
// }
|
||||||
|
// ];
|
||||||
|
// return btnArr;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// onRightMenuClick = (type) => {
|
||||||
|
// const { authenticationCenterStore } = this.props;
|
||||||
|
// const { registerAppEditForm, registerAppDataMappingImportForm, status } = authenticationCenterStore;
|
||||||
|
// if (type == 'BTN_SAVE') {
|
||||||
|
// //导入
|
||||||
|
// IntegrationUtil.onCheck(registerAppDataMappingImportForm, () => {
|
||||||
|
// let operation = "excelImport";
|
||||||
|
// let params = Object.assign({ appid: registerAppEditForm.getFormParams().appid, operation: operation }, registerAppDataMappingImportForm.getFormParams());
|
||||||
|
// params.file = JSON.stringify(this.state.file);
|
||||||
|
// params.filelist = JSON.stringify(this.state.filelist);
|
||||||
|
// authenticationCenterStore.getRegisterAppDataMappingOperation(params, (result) => {
|
||||||
|
// authenticationCenterStore.setState({ resultTableHeader: result.resultTableHeader, resultTableData: result.resultTableData })
|
||||||
|
// authenticationCenterStore.setState({ appEditFormDetailDataMappingImportDialogVisible: false, appEditFormDetailDataMappingImportResultDialogVisible: true })
|
||||||
|
// });
|
||||||
|
// });
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
@ -0,0 +1,80 @@
|
||||||
|
// import React from "react";
|
||||||
|
// import {inject, observer} from "mobx-react";
|
||||||
|
// import { Button} from "antd";
|
||||||
|
// import {toJS} from "mobx";
|
||||||
|
// import {WeaForm, WeaLogView, WeaNewScroll, WeaSwitch, WeaTableNew} from "comsMobx";
|
||||||
|
// import {WeaDialog, WeaLocaleProvider, WeaTools, WeaSearchGroup, WeaFormItem, WeaRightMenu,WeaTable} from "ecCom";
|
||||||
|
// import * as IntegrationUtil from "../../util/IntegrationUtil";
|
||||||
|
// const { getKey } = WeaTools;
|
||||||
|
// const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
// const store = ["authenticationCenterStore"];
|
||||||
|
|
||||||
|
// const transformArray = function (origin) {
|
||||||
|
// if (origin.length === 0) {
|
||||||
|
// return false;
|
||||||
|
// }
|
||||||
|
// return Object.keys(origin[0]).map(item => {
|
||||||
|
// return {
|
||||||
|
// title: origin[0][item],
|
||||||
|
// dataIndex: item,
|
||||||
|
// key: item,
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
|
||||||
|
// @inject(...store)
|
||||||
|
// @observer
|
||||||
|
// export default class AppDataMappingImportResultDialog extends React.Component {
|
||||||
|
// render() {
|
||||||
|
// const {authenticationCenterStore} = this.props;
|
||||||
|
// const status = toJS(authenticationCenterStore.status);
|
||||||
|
// const {resultTableHeader,resultTableData} = toJS(status);
|
||||||
|
|
||||||
|
// return <WeaDialog
|
||||||
|
// title={getLabel('387020','数据映射导入结果')}
|
||||||
|
// onCancel={()=> authenticationCenterStore.setState({appEditFormDetailDataMappingImportResultDialogVisible: false})}
|
||||||
|
// visible={status.appEditFormDetailDataMappingImportResultDialogVisible}
|
||||||
|
// style={{width: 700, height: 600}}
|
||||||
|
// hasScroll
|
||||||
|
// moduleName="integration"
|
||||||
|
// buttons={[
|
||||||
|
// <Button type="primary" onClick={()=> this.onRightMenuClick('BTN_SAVE')}>{getLabel( 309 ,'关闭')}</Button>
|
||||||
|
// ]}
|
||||||
|
// moreBtn={[]}
|
||||||
|
// >
|
||||||
|
// <WeaRightMenu
|
||||||
|
// datas={this.getRightMenu()}
|
||||||
|
// collectParams={[]}
|
||||||
|
// >
|
||||||
|
// <WeaSearchGroup center={false} col={1} needTigger={true} title={getLabel('82341','导入结果')} showGroup={true} items={[]}>
|
||||||
|
// <WeaTable columns={resultTableHeader?transformArray(resultTableHeader):[]} dataSource={resultTableData?resultTableData:[]} />
|
||||||
|
// </WeaSearchGroup>
|
||||||
|
// </WeaRightMenu>
|
||||||
|
// </WeaDialog>
|
||||||
|
// }
|
||||||
|
|
||||||
|
// getRightMenu() {
|
||||||
|
// let btnArr = [
|
||||||
|
// {
|
||||||
|
// key: 'BTN_SAVE',
|
||||||
|
// icon: <i className='icon-coms-go-back'/>,
|
||||||
|
// content : `${getLabel(309,'关闭')}`,
|
||||||
|
// onClick : () => {this.onRightMenuClick('BTN_SAVE')}
|
||||||
|
// }
|
||||||
|
// ];
|
||||||
|
// return btnArr;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// onRightMenuClick = (type) => {
|
||||||
|
// const {authenticationCenterStore} = this.props;
|
||||||
|
// const {registerAppEditForm,registerAppDataMappingImportForm, status} = authenticationCenterStore;
|
||||||
|
// if(type == 'BTN_SAVE'){
|
||||||
|
// //关闭
|
||||||
|
// authenticationCenterStore.setState({appEditFormDetailDataMappingImportResultDialogVisible: false});
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
@ -0,0 +1,381 @@
|
||||||
|
// import React from "react";
|
||||||
|
// import {inject, observer} from "mobx-react";
|
||||||
|
// import { Button} from "antd";
|
||||||
|
// import {toJS} from "mobx";
|
||||||
|
// import {WeaForm, WeaLogView, WeaSwitch, WeaTableNew} from "comsMobx";
|
||||||
|
// import {WeaDialog, WeaLocaleProvider, WeaTools, WeaSearchGroup, WeaFormItem, WeaRightMenu,WeaTab,WeaNewScroll,WeaTop,WeaPopoverHrm} from "ecCom";
|
||||||
|
// import * as IntegrationUtil from "../../util/IntegrationUtil";
|
||||||
|
// import AppDataMappingEditDialog from "./AppDataMappingEditDialog";
|
||||||
|
// import AppDataMappingImportDialog from "./AppDataMappingImportDialog";
|
||||||
|
// import AppDataMappingImportResultDialog from "./AppDataMappingImportResultDialog";
|
||||||
|
// import uuid from 'uuid';
|
||||||
|
// import {checkTableFieldValueUnique} from "../../apis/CommonService";
|
||||||
|
|
||||||
|
// const { getKey } = WeaTools;
|
||||||
|
// const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
// const { WeaTable } = WeaTableNew;
|
||||||
|
// const store = ["authenticationCenterStore"];
|
||||||
|
|
||||||
|
// @inject(...store)
|
||||||
|
// @observer
|
||||||
|
// export default class AppEditDetailDialog extends React.Component {
|
||||||
|
// constructor (props) {
|
||||||
|
// super(props);
|
||||||
|
// this.state = {
|
||||||
|
// topTab: [
|
||||||
|
// {
|
||||||
|
// color: "#000000",
|
||||||
|
// groupid: "flowAll",
|
||||||
|
// showcount: true,
|
||||||
|
// title: `${getLabel(81711, "基本信息")}`,
|
||||||
|
// viewcondition_dt: 0
|
||||||
|
// }
|
||||||
|
// ,{
|
||||||
|
// color: "#000000",
|
||||||
|
// groupid: "flowAll",
|
||||||
|
// showcount: true,
|
||||||
|
// title: `${getLabel(131274, "运行日志")}`,
|
||||||
|
// viewcondition_dt: 2
|
||||||
|
// }
|
||||||
|
// ],
|
||||||
|
// topTabAll: [
|
||||||
|
// {
|
||||||
|
// color: "#000000",
|
||||||
|
// groupid: "flowAll",
|
||||||
|
// showcount: true,
|
||||||
|
// title: `${getLabel(81711, "基本信息")}`,
|
||||||
|
// viewcondition_dt: 0
|
||||||
|
// }
|
||||||
|
// ,{
|
||||||
|
// color: "#000000",
|
||||||
|
// groupid: "flowAll",
|
||||||
|
// showcount: true,
|
||||||
|
// title: `${getLabel(381943, "数据映射")}`,
|
||||||
|
// viewcondition_dt: 1
|
||||||
|
// }
|
||||||
|
// ,{
|
||||||
|
// color: "#000000",
|
||||||
|
// groupid: "flowAll",
|
||||||
|
// showcount: true,
|
||||||
|
// title: `${getLabel(131274, "运行日志")}`,
|
||||||
|
// viewcondition_dt: 2
|
||||||
|
// }
|
||||||
|
// ],
|
||||||
|
// collectParams: {
|
||||||
|
// favname: `${getLabel(381908, "统一认证中心")}`,
|
||||||
|
// favouritetype: 1,
|
||||||
|
// objid: 0,
|
||||||
|
// link: "wui/engine.html#/integration/AuthenticationCenter",
|
||||||
|
// importantlevel: 1
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// render() {
|
||||||
|
// const {authenticationCenterStore} = this.props;
|
||||||
|
// const {status, registerAppEditForm, registerAppEditFormOrg, registerAppId, editDetailDialogSelectedKey, tableStore2, tableStore3} = authenticationCenterStore;
|
||||||
|
// const {showSearchAd2, selectedKey, registerAppEditFormHiddenFields, registerAppEditFormCodition, appEditFormDetailDialogVisible} = toJS(status);
|
||||||
|
// const {topTab, topTabAll, collectParams} = this.state;
|
||||||
|
|
||||||
|
// return <WeaDialog
|
||||||
|
// title={(registerAppEditFormHiddenFields && registerAppEditFormHiddenFields.id) ? getLabel('82178','编辑应用') : getLabel('382079','注册应用')}
|
||||||
|
// onCancel={()=> authenticationCenterStore.setState({appEditFormDetailDialogVisible: false})}
|
||||||
|
// visible={appEditFormDetailDialogVisible}
|
||||||
|
// style={{width: 900, height: 600}}
|
||||||
|
// hasScroll
|
||||||
|
// moduleName="integration"
|
||||||
|
// buttons={(registerAppEditFormHiddenFields && registerAppEditFormHiddenFields.id == "") || editDetailDialogSelectedKey == 0
|
||||||
|
// ? [<Button type="primary" onClick={()=> this.onRightMenuClick('BTN_SAVE')}>{getLabel(86,'保存')}</Button>] : []}
|
||||||
|
// moreBtn={{datas: this.getRightMenu(), collectParams: collectParams}}
|
||||||
|
// >
|
||||||
|
// <WeaPopoverHrm />
|
||||||
|
// <WeaRightMenu
|
||||||
|
// datas={this.getRightMenu()}
|
||||||
|
// collectParams={collectParams}
|
||||||
|
// >
|
||||||
|
// {
|
||||||
|
// registerAppEditFormHiddenFields && registerAppEditFormHiddenFields.id
|
||||||
|
// ? <WeaTab
|
||||||
|
// datas={['6', '7'].includes(registerAppEditFormOrg.getFormParams().account_rules) ? topTabAll : topTab}
|
||||||
|
// keyParam="viewcondition_dt"
|
||||||
|
// selectedKey={editDetailDialogSelectedKey}
|
||||||
|
// searchType={editDetailDialogSelectedKey == 1 ? ['advanced'] : []}
|
||||||
|
// advanceHeight={80}
|
||||||
|
// buttons={editDetailDialogSelectedKey == 1 ? this.getTabButton() : []}
|
||||||
|
// searchsAd={this.getAdvancedSearch()}
|
||||||
|
// showSearchAd={showSearchAd2}
|
||||||
|
// buttonsAd={this.getTabButtonsAd()}
|
||||||
|
// setShowSearchAd={() => {authenticationCenterStore.setState({ showSearchAd2: !showSearchAd2 })}}
|
||||||
|
// hideSearchAd={() => {authenticationCenterStore.setState({ showSearchAd2: false })}}
|
||||||
|
// onChange={v => {
|
||||||
|
// if(v == 1) {
|
||||||
|
// authenticationCenterStore.searchForm2 = new WeaForm();
|
||||||
|
// authenticationCenterStore.getRegisterAppDataMappingCondition();
|
||||||
|
// authenticationCenterStore.getRegisterAppDataMappingRightMenu();
|
||||||
|
// authenticationCenterStore.getRegisterAppDataMappingList({id: registerAppId});
|
||||||
|
// }else if(v == 2) {
|
||||||
|
// authenticationCenterStore.getRegisterAppLoginLogList({id: registerAppId});
|
||||||
|
// }else {
|
||||||
|
// authenticationCenterStore.getRegisterAppEditForm({id: registerAppId});
|
||||||
|
// }
|
||||||
|
// authenticationCenterStore.setEditDetailDialogSelectedKey(v);
|
||||||
|
// }}
|
||||||
|
// />
|
||||||
|
// : ""
|
||||||
|
// }
|
||||||
|
// <WeaNewScroll height={(registerAppEditFormHiddenFields && registerAppEditFormHiddenFields.id) ? 550 : 600}>
|
||||||
|
// {
|
||||||
|
// registerAppEditFormHiddenFields && registerAppEditFormHiddenFields.id
|
||||||
|
// ? editDetailDialogSelectedKey == 0
|
||||||
|
// ? this.getForm(registerAppEditForm, registerAppEditFormCodition)
|
||||||
|
// : <WeaTable
|
||||||
|
// key={editDetailDialogSelectedKey}
|
||||||
|
// comsWeaTableStore={editDetailDialogSelectedKey == 1 ? tableStore2 : tableStore3}
|
||||||
|
// hasOrder={true}
|
||||||
|
// needScroll={true}
|
||||||
|
// onOperatesClick={this.onOperatesClick.bind(this)}
|
||||||
|
// // uniqueId={true}
|
||||||
|
// />
|
||||||
|
// : this.getForm(registerAppEditForm, registerAppEditFormCodition)
|
||||||
|
// }
|
||||||
|
// </WeaNewScroll>
|
||||||
|
// <AppDataMappingEditDialog/>
|
||||||
|
// <AppDataMappingImportDialog/>
|
||||||
|
// <AppDataMappingImportResultDialog/>
|
||||||
|
// </WeaRightMenu>
|
||||||
|
// </WeaDialog>
|
||||||
|
// }
|
||||||
|
|
||||||
|
// getAdvancedSearch = () => {
|
||||||
|
// const { authenticationCenterStore } = this.props;
|
||||||
|
// const {searchForm2, status} = authenticationCenterStore;
|
||||||
|
// const {showSearchAd, selectedKey, condition2} = toJS(status);
|
||||||
|
// let btns = [];
|
||||||
|
// btns = IntegrationUtil.getAdvancedSearchs(
|
||||||
|
// searchForm2,
|
||||||
|
// condition2,
|
||||||
|
// false,
|
||||||
|
// 2
|
||||||
|
// );
|
||||||
|
// return btns;
|
||||||
|
// };
|
||||||
|
|
||||||
|
// getTabButtonsAd() {
|
||||||
|
// const { authenticationCenterStore } = this.props;
|
||||||
|
// let searchFun = () => {
|
||||||
|
// authenticationCenterStore.getRegisterAppDataMappingList({id: authenticationCenterStore.registerAppId});
|
||||||
|
// authenticationCenterStore.setState({showSearchAd2: false});
|
||||||
|
// };
|
||||||
|
// let resetFun = () => authenticationCenterStore.searchForm2.reset();
|
||||||
|
// let cancelFun = () => authenticationCenterStore.setState({showSearchAd2: false});
|
||||||
|
// return IntegrationUtil.getSearchBtns(searchFun, resetFun, cancelFun);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// getTabButton = () => {
|
||||||
|
// const {authenticationCenterStore} = this.props;
|
||||||
|
// let {rightMenus2, rowSelectIds2} = toJS(authenticationCenterStore.status);
|
||||||
|
// let btnArr = [];
|
||||||
|
// let rightDis = 0;
|
||||||
|
// if(!rightMenus2){return btnArr}
|
||||||
|
// for (let j = 0, len = rightMenus2.length; j < len; j++) {
|
||||||
|
// if (j == 4) break;
|
||||||
|
// if(j == 2) rightDis = 15;
|
||||||
|
// let m = rightMenus2[j];
|
||||||
|
// btnArr.push(
|
||||||
|
// <Button style={{marginRight:rightDis}} type="primary" disabled={m.menuIcon === 'icon-coms-delete' && toJS(authenticationCenterStore.tableStore2.selectedRowKeys).length === 0} onClick={() => this.onRightMenuClick(m.type)}>{`${m.menuName}`}</Button>
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
// return btnArr;
|
||||||
|
// };
|
||||||
|
|
||||||
|
// getForm = (form, datas) => {
|
||||||
|
// const formParams = form.getFormParams();
|
||||||
|
// const {isFormInit} = form;
|
||||||
|
// let group = [];
|
||||||
|
|
||||||
|
// isFormInit && datas && datas.forEach(c => {
|
||||||
|
// let items = [];
|
||||||
|
// c.items && c.items.map(fields => {
|
||||||
|
// let domkey = fields.domkey[0];
|
||||||
|
// items.push({
|
||||||
|
// com: (
|
||||||
|
// <WeaFormItem
|
||||||
|
// label={`${fields.label}`}
|
||||||
|
// labelCol={{span: `${fields.labelcol}`}}
|
||||||
|
// wrapperCol={{span: `${fields.fieldcol}`}}
|
||||||
|
// error={form.getError(fields)}
|
||||||
|
// tipPosition="bottom"
|
||||||
|
// >
|
||||||
|
// <nobr>
|
||||||
|
// <WeaSwitch fieldConfig={fields} form={form} formParams={formParams} onChange={v => {
|
||||||
|
// if(getKey(fields) === 'appid') {
|
||||||
|
// let checkParams = {
|
||||||
|
// tableName: 'weaver_sso_app',
|
||||||
|
// fieldName: 'appid',
|
||||||
|
// fieldValue: form.getFormParams().appid.replace(/^(\s*)|(\s*)$/g, ''),
|
||||||
|
// idName: 'id',
|
||||||
|
// idValue: ''
|
||||||
|
// };
|
||||||
|
// checkTableFieldValueUnique(checkParams).then(result => {
|
||||||
|
// if(result && result.isNotUnique) {
|
||||||
|
// form.showError('appid',getLabel('387654','标识已存在'));
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// }}/>
|
||||||
|
// {/*{getKey(fields)==='account_rules'&&formParams.account_rules>5?<Button type="primary" style={{marginLeft:5}}>{getLabel(86,'数据映射')}</Button>:""}*/}
|
||||||
|
// {getKey(fields) === "appid" && <Button type="primary" disabled={fields.viewAttr == 1} style={{marginLeft: 40}} onClick={v => form.updateFields({appid: uuid()})}>{getLabel('15413','生成')}</Button>}
|
||||||
|
// {getKey(fields) === "app_secret_" && <Button type="primary" disabled={fields.viewAttr == 1} style={{marginLeft: 40}} onClick={v => form.updateFields({app_secret_: IntegrationUtil.getAppSecret(true, 6, 16)})}>{getLabel('15413','生成')}</Button>}
|
||||||
|
// </nobr>
|
||||||
|
// </WeaFormItem>),
|
||||||
|
// colSpan: 1,
|
||||||
|
// hide: form.isHide(fields, (key, allParams) => {
|
||||||
|
// let hide = false;
|
||||||
|
// 'app_secret_' == domkey && allParams.auth_type_ == "CAS" && (hide = true);
|
||||||
|
// 'definebroswerType' == domkey && allParams.account_rules !== '7' && (hide = true);
|
||||||
|
// ["appid", "app_secret_", "appname", "allow_ip", "account_rules", "definebroswerType"].includes(domkey) && allParams.auth_type_ == "" && (hide = true);
|
||||||
|
// return hide;
|
||||||
|
// })
|
||||||
|
// })
|
||||||
|
// })
|
||||||
|
// group.push(<WeaSearchGroup center={true} col={1} needTigger={true} title={c.title} showGroup={c.defaultshow} items={items}/>)
|
||||||
|
// })
|
||||||
|
// return group;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// getRightMenu = () => {
|
||||||
|
// const {authenticationCenterStore} = this.props;
|
||||||
|
// let {rightMenus2,rowSelectIds2} = toJS(authenticationCenterStore.status);
|
||||||
|
// let btnArr = [];
|
||||||
|
// if(authenticationCenterStore.editDetailDialogSelectedKey==0) {
|
||||||
|
// btnArr=[
|
||||||
|
// {
|
||||||
|
// key: 'BTN_SAVE',
|
||||||
|
// icon: <i className='icon-coms-Preservation'/>,
|
||||||
|
// content : `${getLabel(86,'保存')}`,
|
||||||
|
// onClick : () => {this.onRightMenuClick('BTN_SAVE')}
|
||||||
|
// }
|
||||||
|
// ];
|
||||||
|
// }else if(authenticationCenterStore.editDetailDialogSelectedKey==1) {
|
||||||
|
// btnArr = [];
|
||||||
|
// rightMenus2&&rightMenus2.map(m => {
|
||||||
|
// var btn= {
|
||||||
|
// key: m.type,
|
||||||
|
// icon: <i className={m.menuIcon} />,
|
||||||
|
// content: m.menuName,
|
||||||
|
// onClick: () => this.onRightMenuClick(m.type),
|
||||||
|
// disabled: m.menuIcon==='icon-coms-delete' && rowSelectIds2.length === 0
|
||||||
|
// } ;
|
||||||
|
// btnArr.push(btn);
|
||||||
|
// });
|
||||||
|
// btnArr.push({
|
||||||
|
// key: "BTN_COLUMN",
|
||||||
|
// icon: <i className="icon-coms-Custom" />,
|
||||||
|
// content: `${getLabel(32535, "显示列定制")}`,
|
||||||
|
// onClick: () => this.onRightMenuClick("BTN_COLUMN")
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
|
||||||
|
// return btnArr;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// ipv6Test = (value) => {
|
||||||
|
// let reg = /^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;
|
||||||
|
// let regV4 = /^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/
|
||||||
|
|
||||||
|
// let datas = value.split(',');
|
||||||
|
// for(let i = 0; i < datas.length; i++) {
|
||||||
|
// if(!reg.test(datas[i].trim()) && (!regV4.test(datas[i].trim()))) {
|
||||||
|
// return false;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// return true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// onRightMenuClick = (type) => {
|
||||||
|
// const {authenticationCenterStore} = this.props;
|
||||||
|
// const {registerAppEditForm, status, editDetailDialogSelectedKey, tableStore2} = authenticationCenterStore;
|
||||||
|
// const {rowSelectIds2, registerAppEditFormHiddenFields} = toJS(authenticationCenterStore.status);
|
||||||
|
// const formParams = registerAppEditForm.getFormParams();
|
||||||
|
|
||||||
|
// if(type === "BTN_COLUMN") {
|
||||||
|
// if(editDetailDialogSelectedKey == 1) {
|
||||||
|
// authenticationCenterStore.tableStore2.setColSetVisible(true);
|
||||||
|
// authenticationCenterStore.tableStore2.tableColSet(true);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if(type == 'BTN_SAVE'){
|
||||||
|
// if(formParams.auth_type_ == "CAS") {
|
||||||
|
// window.e9HideFormFieldKeys = ["app_secret_"];
|
||||||
|
// }
|
||||||
|
// let checkParams = {
|
||||||
|
// tableName: 'weaver_sso_app',
|
||||||
|
// fieldName: 'appid',
|
||||||
|
// fieldValue: formParams.appid.replace(/^(\s*)|(\s*)$/g, ''),
|
||||||
|
// idName: 'id',
|
||||||
|
// idValue: ''
|
||||||
|
// };
|
||||||
|
// checkTableFieldValueUnique(checkParams).then(result => {
|
||||||
|
// if(result && result.isNotUnique && registerAppEditFormHiddenFields.id == "") {
|
||||||
|
// registerAppEditForm.showError('appid',getLabel('387654','标识已存在'));
|
||||||
|
// }else {
|
||||||
|
// let value = formParams.allow_ip;
|
||||||
|
// let ipv6 = this.ipv6Test(value.trim());
|
||||||
|
// IntegrationUtil.onCheck(registerAppEditForm,function () {
|
||||||
|
// if(value.trim() == '' || (value.trim() && ipv6)) {
|
||||||
|
// let params = Object.assign({id: registerAppEditFormHiddenFields.id || "", operation: registerAppEditFormHiddenFields.id ? "edit" : "add"}, formParams);
|
||||||
|
// authenticationCenterStore.getRegisterAppOperation(params);
|
||||||
|
// }else {
|
||||||
|
// registerAppEditForm.showError('allow_ip',getLabel('382232','应用服务器地址非法'));
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if(type == 'rb_1'){
|
||||||
|
// //注册数据映射
|
||||||
|
// this.doDataMappingEditById({randomField0: '',appid: formParams.appid});
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if(type == 'rb_2'){
|
||||||
|
// //导入
|
||||||
|
// authenticationCenterStore.registerAppDataMappingImportForm.reset();
|
||||||
|
// let id=authenticationCenterStore.registerAppId;
|
||||||
|
// let params = Object.assign({id: id, operation:"import"}, formParams);
|
||||||
|
// authenticationCenterStore.getRegisterAppDataMappingImportForm(params);
|
||||||
|
// authenticationCenterStore.setState({ appEditFormDetailDataMappingImportDialogVisible: true });
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if(type == 'rb_3'){
|
||||||
|
// //删除
|
||||||
|
// if(toJS(tableStore2.selectedRowKeys).length>0) {
|
||||||
|
// authenticationCenterStore.confirmModal(`${getLabel(385625, '确定要删除选择的记录吗?')}`, authenticationCenterStore.getRegisterAppDataMappingOperation, {operation:'delete', id: toJS(tableStore2.selectedRowKeys)});
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// onOperatesClick = (record, index, operate) => {
|
||||||
|
// const { authenticationCenterStore } = this.props;
|
||||||
|
// const { selectedKey } = toJS(authenticationCenterStore.status);
|
||||||
|
// if (operate.index == "0") {
|
||||||
|
// this.doDataMappingEditById(record);
|
||||||
|
// }
|
||||||
|
// if (operate.index == "1") {
|
||||||
|
// //删除
|
||||||
|
// authenticationCenterStore.confirmModal(`${getLabel(15097, '确定要删除吗?')}`, authenticationCenterStore.getRegisterAppDataMappingOperation, {operation:'delete',id: record.randomField0});
|
||||||
|
// }
|
||||||
|
// };
|
||||||
|
|
||||||
|
// doDataMappingEditById(record) {
|
||||||
|
// const { authenticationCenterStore } = this.props;
|
||||||
|
// const { registerAppEditForm } = authenticationCenterStore;
|
||||||
|
// authenticationCenterStore.registerAppDataMappingEditForm.reset();
|
||||||
|
// authenticationCenterStore.setOperateDataMappingIndex(record.randomField0);
|
||||||
|
// authenticationCenterStore.getRegisterAppDataMappingEditForm({ id: record.randomField0,appid:record.appid ,account_rules:registerAppEditForm.getFormParams().account_rules});
|
||||||
|
// authenticationCenterStore.setState({ appEditFormDetailDataMappingDialogVisible: true });
|
||||||
|
// }
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
@ -0,0 +1,187 @@
|
||||||
|
// import React from "react";
|
||||||
|
// import {inject, observer} from "mobx-react";
|
||||||
|
// import { Button} from "antd";
|
||||||
|
// import {toJS} from "mobx";
|
||||||
|
// import {WeaForm, WeaLogView, WeaNewScroll, WeaSwitch, WeaTableNew} from "comsMobx";
|
||||||
|
// import {WeaDialog, WeaLocaleProvider, WeaTools, WeaSearchGroup, WeaFormItem, WeaRightMenu} from "ecCom";
|
||||||
|
// import * as IntegrationUtil from "../../util/IntegrationUtil";
|
||||||
|
// import {checkTableFieldValueUnique} from "../../apis/CommonService";
|
||||||
|
// const { getKey } = WeaTools;
|
||||||
|
// const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
// const store = ["authenticationCenterStore"];
|
||||||
|
|
||||||
|
// @inject(...store)
|
||||||
|
// @observer
|
||||||
|
// export default class AppEditDialog extends React.Component {
|
||||||
|
// render() {
|
||||||
|
// const {authenticationCenterStore} = this.props;
|
||||||
|
// const status = toJS(authenticationCenterStore.status);
|
||||||
|
|
||||||
|
// return <WeaDialog
|
||||||
|
// title={getLabel('382079','注册应用')}
|
||||||
|
// onCancel={()=> authenticationCenterStore.setState({appEditFormDialogVisible: false})}
|
||||||
|
// visible={status.appEditFormDialogVisible}
|
||||||
|
// style={{width: 700, height: 600}}
|
||||||
|
// hasScroll
|
||||||
|
// moduleName="integration"
|
||||||
|
// buttons={[
|
||||||
|
// <Button type="primary" onClick={()=> this.onRightMenuClick('BTN_SAVE')}>{getLabel(86,'保存')}</Button>,
|
||||||
|
// // <Button type="primary" onClick={()=> this.onRightMenuClick('BTN_SAVE_AND_OPEN_DETAIL')}>{getLabel(125540,'保存后详细设置')}</Button>,
|
||||||
|
// ]}
|
||||||
|
// moreBtn={{
|
||||||
|
// datas : this.getRightMenu(),
|
||||||
|
// collectParams: []
|
||||||
|
// }}
|
||||||
|
// >
|
||||||
|
// <WeaRightMenu
|
||||||
|
// datas={this.getRightMenu()}
|
||||||
|
// collectParams={[]}
|
||||||
|
// >
|
||||||
|
// {
|
||||||
|
// authenticationCenterStore.registerAppEditForm.render({col: 1},{
|
||||||
|
// onChange: (v)=> {},
|
||||||
|
// isHide: (key, formParams) => {}
|
||||||
|
|
||||||
|
// },true,(c, idx)=>{
|
||||||
|
// if(idx==0){
|
||||||
|
// let items = [];
|
||||||
|
// let form = authenticationCenterStore.registerAppEditForm;
|
||||||
|
// let formParams = form.getFormParams();
|
||||||
|
// c.items.map(fields => {
|
||||||
|
// items.push({
|
||||||
|
// com: (
|
||||||
|
// <WeaFormItem
|
||||||
|
// label={`${fields.label}`}
|
||||||
|
// labelCol={{span: `${fields.labelcol}`}}
|
||||||
|
// wrapperCol={{span: `${fields.fieldcol}`}}
|
||||||
|
// error={form.getError(fields)}
|
||||||
|
// tipPosition="bottom"
|
||||||
|
// >
|
||||||
|
// <nobr>
|
||||||
|
// <WeaSwitch fieldConfig={fields} form={form} formParams={formParams}
|
||||||
|
// onChange={v => {
|
||||||
|
// if(getKey(fields) === 'appid') {
|
||||||
|
// let checkParams = {
|
||||||
|
// tableName: 'weaver_sso_app',
|
||||||
|
// fieldName: 'appid',
|
||||||
|
// fieldValue: form.getFormParams().appid.replace(/^(\s*)|(\s*)$/g, ''),
|
||||||
|
// idName: 'id',
|
||||||
|
// idValue: ''
|
||||||
|
// };
|
||||||
|
// checkTableFieldValueUnique(checkParams).then(result => {
|
||||||
|
// if(result&&result.isNotUnique) {
|
||||||
|
// form.showError('appid',getLabel('387654','标识已存在'));
|
||||||
|
// // message.error(getLabel('387654','标识已存在'));
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// }}
|
||||||
|
// />
|
||||||
|
// {/*{getKey(fields)==='account_rules'&&formParams.account_rules>5?<Button type="primary" style={{marginLeft:5}}>{getLabel(86,'数据映射')}</Button>:""}*/}
|
||||||
|
// </nobr>
|
||||||
|
|
||||||
|
// </WeaFormItem>),
|
||||||
|
// colSpan: 1,
|
||||||
|
// hide: form.isHide(fields, (key, formParams) => {
|
||||||
|
// let hide = false;
|
||||||
|
// if ('definebroswerType' == key && formParams.account_rules !== '7') {
|
||||||
|
// hide = true;
|
||||||
|
// }
|
||||||
|
// return hide;
|
||||||
|
// }),
|
||||||
|
// onChange: (v)=> {
|
||||||
|
// // console.log(v);
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// });
|
||||||
|
|
||||||
|
// return <WeaSearchGroup center={true} col={1} needTigger={true} title={c.title} showGroup={c.defaultshow} items={items}/>
|
||||||
|
// }
|
||||||
|
// })}
|
||||||
|
// </WeaRightMenu>
|
||||||
|
// </WeaDialog>
|
||||||
|
// }
|
||||||
|
|
||||||
|
// getRightMenu() {
|
||||||
|
// let btnArr = [
|
||||||
|
// {
|
||||||
|
// key: 'BTN_SAVE',
|
||||||
|
// icon: <i className='icon-coms-Preservation'/>,
|
||||||
|
// content : `${getLabel(86,'保存')}`,
|
||||||
|
// onClick : () => {this.onRightMenuClick('BTN_SAVE')}
|
||||||
|
// }
|
||||||
|
// // ,{
|
||||||
|
// // key: 'BTN_SAVE_AND_OPEN_DETAIL',
|
||||||
|
// // icon: <i className='icon-coms-Preservation'/>,
|
||||||
|
// // content : `${getLabel(125540,'保存后详细设置')}`,
|
||||||
|
// // onClick : () => {this.onRightMenuClick('BTN_SAVE_AND_OPEN_DETAIL')}
|
||||||
|
// // }
|
||||||
|
// ];
|
||||||
|
// return btnArr;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// ipv6Test = (value) => {
|
||||||
|
// let reg = /^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;
|
||||||
|
// let regV4 = /^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/
|
||||||
|
|
||||||
|
// let datas = value.split(',');
|
||||||
|
// for(let i = 0; i < datas.length; i++) {
|
||||||
|
// if(!reg.test(datas[i].trim()) && (!regV4.test(datas[i].trim()))) {
|
||||||
|
// return false;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// return true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// onRightMenuClick = (type) => {
|
||||||
|
// const {authenticationCenterStore} = this.props;
|
||||||
|
// const {registerAppEditForm, status} = authenticationCenterStore;
|
||||||
|
// const {interfaceRegisterCustomFormHiddenFields} = toJS(authenticationCenterStore.status);
|
||||||
|
// if(type == 'BTN_SAVE'){
|
||||||
|
// let checkParams = {
|
||||||
|
// tableName: 'weaver_sso_app',
|
||||||
|
// fieldName: 'appid',
|
||||||
|
// fieldValue: registerAppEditForm.getFormParams().appid.replace(/^(\s*)|(\s*)$/g, ''),
|
||||||
|
// idName: 'id',
|
||||||
|
// idValue: ''
|
||||||
|
// };
|
||||||
|
// checkTableFieldValueUnique(checkParams).then(result => {
|
||||||
|
// if(result&&result.isNotUnique) {
|
||||||
|
// registerAppEditForm.showError('appid',getLabel('387654','标识已存在'));
|
||||||
|
// // message.error(getLabel('387654','标识已存在'));
|
||||||
|
// }else {
|
||||||
|
// let value = registerAppEditForm.getFormParams().allow_ip;
|
||||||
|
// let ipv6 = this.ipv6Test(value.trim());
|
||||||
|
// IntegrationUtil.onCheck(registerAppEditForm,function () {
|
||||||
|
// if(value.trim() == '' || (value.trim() && ipv6)) {
|
||||||
|
// let id="";
|
||||||
|
// let operation = "add";
|
||||||
|
// let params = Object.assign({id:id,operation:operation}, registerAppEditForm.getFormParams());
|
||||||
|
// authenticationCenterStore.getRegisterAppOperation(params);
|
||||||
|
// }else {
|
||||||
|
// registerAppEditForm.showError('allow_ip',getLabel('382232','应用服务器地址非法'));
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if(type == 'BTN_SAVE_AND_OPEN_DETAIL'){
|
||||||
|
// IntegrationUtil.onCheck(registerAppEditForm,function () {
|
||||||
|
// let id="";
|
||||||
|
// let operation = ("add");
|
||||||
|
// let params = Object.assign({id:id,operation:operation}, registerAppEditForm.getFormParams());
|
||||||
|
// authenticationCenterStore.getRegisterAppOperation(params,(result)=>{
|
||||||
|
// if(result.id) {
|
||||||
|
// let p={id:result.id,operation:"edit"}
|
||||||
|
// authenticationCenterStore.getRegisterAppEditForm(p);
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// });
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
@ -0,0 +1,206 @@
|
||||||
|
import {inject, observer} from "mobx-react";
|
||||||
|
import {toJS} from "mobx";
|
||||||
|
import {Button} from "antd";
|
||||||
|
import {WeaFormItem, WeaLocaleProvider, WeaRightMenu, WeaSearchGroup, WeaTop, WeaTools} from "ecCom";
|
||||||
|
import {WeaSwitch} from "comsMobx";
|
||||||
|
import NoRight from "../../public/NoRight";
|
||||||
|
import NonStand from "../../public/NonStand";
|
||||||
|
import * as IntegrationUtil from "../../util/IntegrationUtil";
|
||||||
|
import PopoverButton from '../../public/PopoverButton';
|
||||||
|
import "../../style/webxml.less";
|
||||||
|
|
||||||
|
const { getKey } = WeaTools;
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
@inject("authenticationCenterStore")
|
||||||
|
@observer
|
||||||
|
class AuthenticationCenter extends React.Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
visiable:false,
|
||||||
|
collectParams: {
|
||||||
|
favname: getLabel('516737','CAS认证'),
|
||||||
|
favouritetype: 1,
|
||||||
|
objid: 0,
|
||||||
|
link: "wui/engine.html#/integration/authenticationcenter",
|
||||||
|
importantlevel: 1
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
const { authenticationCenterStore } = this.props;
|
||||||
|
authenticationCenterStore.doInit("cas");
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillUnmount() {
|
||||||
|
this.props.authenticationCenterStore.clearStore();
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps) {
|
||||||
|
const { authenticationCenterStore } = this.props;
|
||||||
|
if (this.props.location.key !== nextProps.location.key) {
|
||||||
|
authenticationCenterStore.doInit("cas");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 右键菜单点击事件
|
||||||
|
* @param type
|
||||||
|
*/
|
||||||
|
onRightMenuClick = (type) => {
|
||||||
|
const { authenticationCenterStore } = this.props;
|
||||||
|
const { newForm } = authenticationCenterStore;
|
||||||
|
const {BaseInfoFormHiddenFields} = toJS(authenticationCenterStore.status);
|
||||||
|
if (type == "BTN_BASE_SAVE") {
|
||||||
|
IntegrationUtil.onCheck(newForm,()=>{
|
||||||
|
let formParams = newForm.getFormParams();
|
||||||
|
let params = Object.assign({}, formParams, {method: 'weaversso'});
|
||||||
|
delete params.token_isuse;
|
||||||
|
delete params.oauth2_isuse;
|
||||||
|
delete params.spnego_isuse;
|
||||||
|
delete params.dlgt_isuse;
|
||||||
|
let isOpenCas = BaseInfoFormHiddenFields.isOpenCas;
|
||||||
|
|
||||||
|
// 开启需要检测是否通过
|
||||||
|
if(params.isuse == "1") {
|
||||||
|
authenticationCenterStore.getBaseInfoFormOperation({casserverurl: formParams.loginurl, method: 'test', testBeforeSave: true}, (result) => {
|
||||||
|
if(result.success) {
|
||||||
|
if(isOpenCas) {
|
||||||
|
if(newForm.getFormParams().isuse=="1"){
|
||||||
|
authenticationCenterStore.confirmModal(`${getLabel(382221 ,'经检测,需要同时开启CAS客户端,保存后将自动重启服务,若有失败,请手动重启服务,以确保系统能正常使用!')}`, authenticationCenterStore.getBaseInfoFormOperation , params);
|
||||||
|
}else{
|
||||||
|
authenticationCenterStore.confirmModal(`${getLabel(382222 ,'经检测,需要同时关闭CAS客户端,保存后将自动重启服务,若有失败,请手动重启服务,以确保系统能正常使用!')}`, authenticationCenterStore.getBaseInfoFormOperation , params);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
IntegrationUtil.doConfirm(getLabel('512788','保存后将自动重启服务,若有失败,请手动重启服务,以确保系统能正常使用!'), authenticationCenterStore.getBaseInfoFormOperation , params);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else {
|
||||||
|
if(isOpenCas) {
|
||||||
|
if(newForm.getFormParams().isuse=="1"){
|
||||||
|
authenticationCenterStore.confirmModal(`${getLabel( 382221 ,'经检测,需要同时开启CAS客户端,保存后将自动重启服务,若有失败,请手动重启服务,以确保系统能正常使用!')}`, authenticationCenterStore.getBaseInfoFormOperation , params);
|
||||||
|
}else{
|
||||||
|
authenticationCenterStore.confirmModal(`${getLabel( 382222 ,'经检测,需要同时关闭CAS客户端,保存后将自动重启服务,若有失败,请手动重启服务,以确保系统能正常使用!')}`, authenticationCenterStore.getBaseInfoFormOperation , params);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
IntegrationUtil.doConfirm(getLabel('512788','保存后将自动重启服务,若有失败,请手动重启服务,以确保系统能正常使用!'), authenticationCenterStore.getBaseInfoFormOperation , params);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else if(type == "BTN_TEST") {
|
||||||
|
let loginurl = newForm.getFormParams().loginurl;
|
||||||
|
let params = {casserverurl: loginurl, method: 'test'};
|
||||||
|
authenticationCenterStore.getBaseInfoFormOperation(params);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取右键菜单
|
||||||
|
* @returns {Array}
|
||||||
|
*/
|
||||||
|
getRightMenu() {
|
||||||
|
return [{
|
||||||
|
key: "BTN_BASE_SAVE",
|
||||||
|
icon: <i className="icon-coms-Preservation" />,
|
||||||
|
content: getLabel(30986, '保存'),
|
||||||
|
onClick: () => this.onRightMenuClick("BTN_BASE_SAVE")
|
||||||
|
}, {
|
||||||
|
key: 'BTN_TEST',
|
||||||
|
icon: <i className='icon-coms-currency-Task' />,
|
||||||
|
content: `${getLabel(25496, '测试')}`,
|
||||||
|
onClick: () => this.onRightMenuClick('BTN_TEST')
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取顶部按钮
|
||||||
|
* @returns {Array}
|
||||||
|
*/
|
||||||
|
getBtns = () => {
|
||||||
|
return [
|
||||||
|
<PopoverButton ecId={`${this && this.props && this.props.ecId || ''}_PopoverButton@q1sbg3@integrationauthCasButtonSaveBtn`}
|
||||||
|
type="primary"
|
||||||
|
content={getLabel(30986, '保存')}
|
||||||
|
onClick={() => this.onRightMenuClick('BTN_BASE_SAVE')}
|
||||||
|
/>,
|
||||||
|
<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@wweb1h@integrationauthCasButtonTestBtn`} type="primary" onClick={() => this.onRightMenuClick('BTN_TEST')}>{getLabel(25496,'测试')}</Button>
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
||||||
|
getBaseInfoForm = () => {
|
||||||
|
const {authenticationCenterStore} = this.props;
|
||||||
|
const {newForm, status} = authenticationCenterStore;
|
||||||
|
const {BaseInfoFormFields} = toJS(status);
|
||||||
|
const {isFormInit} = newForm;
|
||||||
|
let group = [];
|
||||||
|
const formParams = newForm.getFormParams();
|
||||||
|
|
||||||
|
isFormInit && BaseInfoFormFields && BaseInfoFormFields.map((c, index) =>{
|
||||||
|
if(index == 0) {
|
||||||
|
let items = [];
|
||||||
|
c.items && c.items.map(fields => {
|
||||||
|
items.push({
|
||||||
|
com:(
|
||||||
|
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@aqdyzp@integrationauthCasForm${fields.domkey[0]}`}
|
||||||
|
label={`${fields.label}`}
|
||||||
|
labelCol={{span: `${fields.labelcol}`}}
|
||||||
|
wrapperCol={{span: `${fields.fieldcol}`}}
|
||||||
|
error={newForm.getError(fields)}
|
||||||
|
tipPosition="bottom"
|
||||||
|
>
|
||||||
|
<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@qdreji@integrationauthCasForm${fields.domkey[0]}`} fieldConfig={fields} form={newForm} formParams={formParams} onChange={v=> {}} />
|
||||||
|
</WeaFormItem>),
|
||||||
|
colSpan:1,
|
||||||
|
hide: newForm.isHide(fields, (keys, allParams) => {
|
||||||
|
let bool = false;
|
||||||
|
getKey(fields) === 'loginurl' && allParams.isuse != '1' && (bool = true);
|
||||||
|
getKey(fields) === 'logouturl' && allParams.isuse != '1' && (bool = true);
|
||||||
|
getKey(fields) === 'oaadress' && allParams.isuse != '1' && (bool = true);
|
||||||
|
return bool;
|
||||||
|
})
|
||||||
|
});
|
||||||
|
});
|
||||||
|
group.push(<WeaSearchGroup ecId={`${this && this.props && this.props.ecId || ''}_WeaSearchGroup@mygvm1@integrationauthCasForm${index}`} center col={1} needTigger={false} title={""} showGroup={c.defaultshow} items={items}/>);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return group;
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const {authenticationCenterStore} = this.props;
|
||||||
|
const {hasRight, rightLoading, status: {hasNonStandard, nonStandLoading}} = authenticationCenterStore;
|
||||||
|
const {collectParams} = this.state;
|
||||||
|
return (
|
||||||
|
nonStandLoading
|
||||||
|
? null
|
||||||
|
: hasNonStandard
|
||||||
|
? rightLoading
|
||||||
|
? null
|
||||||
|
: hasRight
|
||||||
|
? <WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@utqtt4`}
|
||||||
|
className={"inte-webxml-rightmenu"}
|
||||||
|
datas={this.getRightMenu()}
|
||||||
|
collectParams={collectParams}
|
||||||
|
>
|
||||||
|
<WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@0ccpm0`}
|
||||||
|
title={getLabel('516737','CAS认证')}
|
||||||
|
icon={<i className="icon-coms-integration" />}
|
||||||
|
iconBgcolor="#1a57a0"
|
||||||
|
buttons={this.getBtns()}
|
||||||
|
showDropIcon={true}
|
||||||
|
dropMenuDatas={this.getRightMenu()}
|
||||||
|
dropMenuProps={{collectParams}}
|
||||||
|
>
|
||||||
|
{this.getBaseInfoForm()}
|
||||||
|
</WeaTop>
|
||||||
|
</WeaRightMenu>
|
||||||
|
: <NoRight ecId={`${this && this.props && this.props.ecId || ''}_NoRight@1tx2rv`}/>
|
||||||
|
: <NonStand ecId={`${this && this.props && this.props.ecId || ''}_NonStand@8hfmwi`}/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default AuthenticationCenter;
|
||||||
|
|
@ -0,0 +1,137 @@
|
||||||
|
import React from "react";
|
||||||
|
import {
|
||||||
|
inject,
|
||||||
|
observer,
|
||||||
|
} from "mobx-react";
|
||||||
|
import {
|
||||||
|
Button,
|
||||||
|
} from "antd";
|
||||||
|
import {
|
||||||
|
toJS,
|
||||||
|
} from "mobx";
|
||||||
|
import {
|
||||||
|
WeaDialog,
|
||||||
|
WeaLocaleProvider,
|
||||||
|
WeaRightMenu,
|
||||||
|
} from "ecCom";
|
||||||
|
import {
|
||||||
|
getForm,
|
||||||
|
checkUnique,
|
||||||
|
onCheck,
|
||||||
|
} from "../../util/IntegrationUtil"
|
||||||
|
|
||||||
|
const {getLabel} = WeaLocaleProvider;
|
||||||
|
|
||||||
|
@inject("authenticationSourceStore")
|
||||||
|
@observer
|
||||||
|
export default class EditFormDialog extends React.Component {
|
||||||
|
|
||||||
|
closeDialog = () => {
|
||||||
|
const {authenticationSourceStore} = this.props;
|
||||||
|
authenticationSourceStore.setState({showNewFormDialog: false});
|
||||||
|
}
|
||||||
|
|
||||||
|
getBtns = () => {
|
||||||
|
return [
|
||||||
|
<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@a5znki@integrationAuthSourceEditFormButtonSave`} type='primary' onClick={() => this.onRightMenuClick('BTN_SAVE')}>{getLabel(86,'保存')}</Button>
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
getRightMenu() {
|
||||||
|
return [{
|
||||||
|
key: 'BTN_SAVE',
|
||||||
|
icon: <i className='icon-coms-Preservation'/>,
|
||||||
|
content : `${getLabel(86,'保存')}`,
|
||||||
|
onClick : () => this.onRightMenuClick('BTN_SAVE')
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
onRightMenuClick = (type) => {
|
||||||
|
const {
|
||||||
|
authenticationSourceStore,
|
||||||
|
} = this.props, {
|
||||||
|
newForm,
|
||||||
|
status,
|
||||||
|
} = authenticationSourceStore, {
|
||||||
|
newFormHiddenFields,
|
||||||
|
paramsData,
|
||||||
|
} = toJS(status);
|
||||||
|
if(type == 'BTN_SAVE'){
|
||||||
|
onCheck(newForm, () => {
|
||||||
|
checkUnique({
|
||||||
|
tableName: 'weaver_sso_src',
|
||||||
|
fieldName: 'name_',
|
||||||
|
fieldValue: newForm.getFormParams()["name_"].replace(/^(\s*)|(\s*)$/g, ''),
|
||||||
|
idName: 'id',
|
||||||
|
idValue: newFormHiddenFields.id,
|
||||||
|
}, newForm, "name_", name="2", newFormHiddenFields.id, () => {
|
||||||
|
let formParams = newForm.getFormParams();
|
||||||
|
let params = Object.assign({}, newFormHiddenFields, formParams, {
|
||||||
|
orderNum: typeof(formParams.orderNum) === "object"
|
||||||
|
? formParams.orderNum.join && formParams.orderNum.join(",")
|
||||||
|
? formParams.orderNum
|
||||||
|
: "0"
|
||||||
|
: formParams.orderNum
|
||||||
|
});
|
||||||
|
params.dtinfo_paramsData = JSON.stringify(paramsData);
|
||||||
|
authenticationSourceStore.getAuthenticationSourceOperation(params);
|
||||||
|
});
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onChangeForm = (form, allParams, fields) => {
|
||||||
|
const {
|
||||||
|
authenticationSourceStore,
|
||||||
|
} = this.props, {
|
||||||
|
newFormHiddenFields,
|
||||||
|
} = toJS(authenticationSourceStore.status);
|
||||||
|
const key = fields.domkey[0], formParams = form.getFormParams();
|
||||||
|
if("name_" === key && formParams.name_ && formParams.name_.trim()) {
|
||||||
|
checkUnique({
|
||||||
|
tableName: 'weaver_sso_src',
|
||||||
|
fieldName: 'name_',
|
||||||
|
fieldValue: form.getFormParams()[key].replace(/^(\s*)|(\s*)$/g, ''),
|
||||||
|
idName: 'id',
|
||||||
|
idValue: newFormHiddenFields.id,
|
||||||
|
}, form, key, name="2");
|
||||||
|
}
|
||||||
|
if(typeof(form.getFormParams()[key]) === "string") {
|
||||||
|
form.updateFields({[key]: form.getFormParams()[key] ? form.getFormParams()[key].trim() : ""});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const {
|
||||||
|
authenticationSourceStore,
|
||||||
|
} = this.props, {
|
||||||
|
status,
|
||||||
|
newForm,
|
||||||
|
} = authenticationSourceStore, {
|
||||||
|
showNewFormDialog,
|
||||||
|
newFormHiddenFields,
|
||||||
|
newFormCondition=[],
|
||||||
|
} = toJS(status);
|
||||||
|
|
||||||
|
return <WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@t1k33y`}
|
||||||
|
title={newFormHiddenFields.id ? getLabel('524315','编辑认证源') : getLabel('524316','新建认证源')}
|
||||||
|
moduleName="integration"
|
||||||
|
onCancel={this.closeDialog}
|
||||||
|
visible={showNewFormDialog}
|
||||||
|
style={{width: 800, height: 600}}
|
||||||
|
hasScroll
|
||||||
|
buttons={this.getBtns()}
|
||||||
|
moreBtn={{
|
||||||
|
datas: this.getRightMenu(),
|
||||||
|
collectParams: []
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@e21t50`}
|
||||||
|
datas={this.getRightMenu()}
|
||||||
|
collectParams={[]}
|
||||||
|
>
|
||||||
|
{getForm(newForm, newFormCondition, true, this.onChangeForm, this && this.props && this.props.ecId || '', "integrationAuthSourceEditForm")}
|
||||||
|
</WeaRightMenu>
|
||||||
|
</WeaDialog>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,237 @@
|
||||||
|
import {inject, observer} from "mobx-react";
|
||||||
|
import {toJS} from "mobx";
|
||||||
|
import {Button} from "antd";
|
||||||
|
import {WeaLocaleProvider, WeaRightMenu, WeaTab, WeaTop} from "ecCom";
|
||||||
|
import {WeaLogView, WeaTableNew} from "comsMobx";
|
||||||
|
import NoRight from "../../public/NoRight";
|
||||||
|
import NonStand from "../../public/NonStand";
|
||||||
|
import * as IntegrationUtil from "../../util/IntegrationUtil";
|
||||||
|
import EditFormDialog from "./EditFormDialog";
|
||||||
|
|
||||||
|
const {WeaTable} = WeaTableNew;
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
const WeaLogViewComp = WeaLogView.Component;
|
||||||
|
|
||||||
|
@inject("authenticationSourceStore")
|
||||||
|
@observer
|
||||||
|
class TodoClient extends React.Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
showSearchAd: false,
|
||||||
|
visible: false,
|
||||||
|
targetId: "",
|
||||||
|
collectParams: {
|
||||||
|
favname: `${getLabel(521396, "认证源")}`,
|
||||||
|
favouritetype: 1,
|
||||||
|
objid: 0,
|
||||||
|
link: "wui/engine.html#/integration/authentication_source",
|
||||||
|
importantlevel: 1
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
const { authenticationSourceStore } = this.props;
|
||||||
|
authenticationSourceStore.doInit();
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps) {
|
||||||
|
const { authenticationSourceStore } = this.props;
|
||||||
|
if (this.props.location.key !== nextProps.location.key) {
|
||||||
|
authenticationSourceStore.doInit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getAdvancedSearch = () => {
|
||||||
|
const {authenticationSourceStore} = this.props;
|
||||||
|
const {searchForm, status} = authenticationSourceStore;
|
||||||
|
const {condition} = toJS(status);
|
||||||
|
return IntegrationUtil.getAdvancedItem(searchForm, condition, this.handleSearchFun, false, this && this.props && this.props.ecId || '', "integrationAuthSource");
|
||||||
|
};
|
||||||
|
|
||||||
|
handleSearchFun = () => {
|
||||||
|
const { authenticationSourceStore } = this.props;
|
||||||
|
authenticationSourceStore.getAuthenticationSourceList();
|
||||||
|
this.setState({showSearchAd: false});
|
||||||
|
}
|
||||||
|
|
||||||
|
getTabButtonsAd = () => {
|
||||||
|
const { authenticationSourceStore } = this.props;
|
||||||
|
return IntegrationUtil.getSearchBtns(
|
||||||
|
this.handleSearchFun,
|
||||||
|
() => authenticationSourceStore.searchForm.reset(),
|
||||||
|
() => this.setState({showSearchAd: false}),
|
||||||
|
this && this.props && this.props.ecId || '',
|
||||||
|
"integrationAuthSource"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
getRightMenu() {
|
||||||
|
const {
|
||||||
|
authenticationSourceStore,
|
||||||
|
} = this.props, {
|
||||||
|
tableStore,
|
||||||
|
status,
|
||||||
|
} = authenticationSourceStore, {
|
||||||
|
rightMenus,
|
||||||
|
} = toJS(status);
|
||||||
|
let btnArr = rightMenus && rightMenus.map(m => {
|
||||||
|
return {
|
||||||
|
key: m.type,
|
||||||
|
icon: <i className={m.menuIcon} />,
|
||||||
|
content: m.menuName,
|
||||||
|
onClick: () => this.onRightMenuClick(m.type),
|
||||||
|
disabled: m.type==='rb_2' && toJS(tableStore.selectedRowKeys).length === 0
|
||||||
|
};
|
||||||
|
});
|
||||||
|
btnArr = btnArr.concat([{
|
||||||
|
key: "BTN_Log",
|
||||||
|
icon: <i className="icon-coms-Custom" />,
|
||||||
|
content: getLabel('83','日志'),
|
||||||
|
onClick: () => this.onRightMenuClick("4")
|
||||||
|
}, {
|
||||||
|
key: "BTN_COLUMN",
|
||||||
|
icon: <i className="icon-coms-Custom" />,
|
||||||
|
content: `${getLabel(32535, "显示列定制")}`,
|
||||||
|
onClick: () => this.onRightMenuClick("BTN_COLUMN")
|
||||||
|
}]);
|
||||||
|
return btnArr;
|
||||||
|
}
|
||||||
|
|
||||||
|
getColumnsInfo = (data) => {
|
||||||
|
return data && data.map(item => {
|
||||||
|
if("name_" === item.dbField) {
|
||||||
|
item.render = (text, record) => <a onClick={() => this.onRightMenuClick("2", record)}>{text}</a>
|
||||||
|
}
|
||||||
|
return item;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
onRightMenuClick = (type, record={}) => {
|
||||||
|
const {
|
||||||
|
authenticationSourceStore,
|
||||||
|
} = this.props, {
|
||||||
|
tableStore,
|
||||||
|
} = authenticationSourceStore;
|
||||||
|
if (type == "rb_1") {
|
||||||
|
authenticationSourceStore.getAuthenticationSourceForm();
|
||||||
|
authenticationSourceStore.setState({showNewFormDialog: true});
|
||||||
|
}else if (type == "rb_2" || type == "3") {
|
||||||
|
let title = "3" == type ? getLabel( 15097, '确定要删除吗?') : getLabel(385625, '确定要删除选择的记录吗?');
|
||||||
|
let id = "3" == type ? record.randomFieldId : toJS(tableStore.selectedRowKeys);
|
||||||
|
IntegrationUtil.doConfirm(title, authenticationSourceStore.getAuthenticationSourceOperation, {operation:'delete', id});
|
||||||
|
}else if (type == "BTN_COLUMN") {
|
||||||
|
tableStore.setColSetVisible(true);
|
||||||
|
tableStore.tableColSet(true);
|
||||||
|
}else if (type == "2") {
|
||||||
|
authenticationSourceStore.getAuthenticationSourceForm({id: record.randomFieldId});
|
||||||
|
authenticationSourceStore.setState({showNewFormDialog: true});
|
||||||
|
}else if (type == "4") {
|
||||||
|
this.setState({
|
||||||
|
visible: true,
|
||||||
|
targetId: record.randomFieldId || "",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
getBtns = () => {
|
||||||
|
const {
|
||||||
|
authenticationSourceStore,
|
||||||
|
} = this.props, {
|
||||||
|
tableStore,
|
||||||
|
status,
|
||||||
|
} = authenticationSourceStore, {
|
||||||
|
rightMenus,
|
||||||
|
} = toJS(status);
|
||||||
|
let datas = rightMenus.slice(0, 2);
|
||||||
|
return datas && datas.map(m => <Button ecId={`${this && this.props && this.props.ecId || ''}_Button@xm0l1e@integrationAuthSourceButton${m.type}`} type="primary" disabled={m.type === 'rb_2' && toJS(tableStore.selectedRowKeys).length === 0} onClick={() => this.onRightMenuClick(m.type)}>{m.menuName}</Button>);
|
||||||
|
};
|
||||||
|
|
||||||
|
onOperatesClick = (record, index, operate) => {
|
||||||
|
this.onRightMenuClick(operate.index, record);
|
||||||
|
};
|
||||||
|
|
||||||
|
onCloseLogDialog = () => this.setState({visible: false, targetId: ""});
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const {
|
||||||
|
authenticationSourceStore,
|
||||||
|
} = this.props, {
|
||||||
|
searchForm,
|
||||||
|
tableStore,
|
||||||
|
status,
|
||||||
|
hasRight,
|
||||||
|
rightLoading,
|
||||||
|
logTable,
|
||||||
|
} = authenticationSourceStore, {
|
||||||
|
advanceHeight,
|
||||||
|
hasNonStandard,
|
||||||
|
nonStandLoading,
|
||||||
|
selectedKey=0,
|
||||||
|
tabDatas=[],
|
||||||
|
} = toJS(status), {
|
||||||
|
showSearchAd,
|
||||||
|
visible,
|
||||||
|
targetId,
|
||||||
|
collectParams,
|
||||||
|
} = this.state;
|
||||||
|
|
||||||
|
return (nonStandLoading
|
||||||
|
? null
|
||||||
|
: hasNonStandard
|
||||||
|
? rightLoading
|
||||||
|
? null
|
||||||
|
: hasRight
|
||||||
|
? <WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@0wc24v`}
|
||||||
|
datas={this.getRightMenu()}
|
||||||
|
collectParams={collectParams}
|
||||||
|
>
|
||||||
|
<WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@vdy8fo`}
|
||||||
|
title={getLabel(521396, "认证源")}
|
||||||
|
icon={<i className="icon-coms-integration" />}
|
||||||
|
iconBgcolor="#1a57a0"
|
||||||
|
buttons={this.getBtns()}
|
||||||
|
showDropIcon={true}
|
||||||
|
dropMenuDatas={this.getRightMenu()}
|
||||||
|
dropMenuProps={{collectParams}}
|
||||||
|
/>
|
||||||
|
<WeaTab ecId={`${this && this.props && this.props.ecId || ''}_WeaTab@yecy9p`}
|
||||||
|
datas={tabDatas}
|
||||||
|
keyParam="viewcondition"
|
||||||
|
selectedKey={selectedKey}
|
||||||
|
searchType={['base','advanced']}
|
||||||
|
advanceHeight={advanceHeight}
|
||||||
|
searchsAd={this.getAdvancedSearch()}
|
||||||
|
showSearchAd={showSearchAd}
|
||||||
|
buttonsAd={this.getTabButtonsAd()}
|
||||||
|
setShowSearchAd={() => this.setState({showSearchAd: !showSearchAd})}
|
||||||
|
hideSearchAd={() => this.setState({showSearchAd: false})}
|
||||||
|
searchsBaseValue={searchForm.getFormParams().name_}
|
||||||
|
onChange={v => authenticationSourceStore.setState({selectedKey: v})}
|
||||||
|
onSearch={this.handleSearchFun}
|
||||||
|
onSearchChange={value => searchForm.updateFields({name_: value})}
|
||||||
|
/>
|
||||||
|
<WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@jocqij`}
|
||||||
|
comsWeaTableStore={tableStore}
|
||||||
|
hasOrder={true}
|
||||||
|
needScroll={true}
|
||||||
|
onOperatesClick={this.onOperatesClick}
|
||||||
|
getColumns={this.getColumnsInfo}
|
||||||
|
/>
|
||||||
|
<WeaLogViewComp ecId={`${this && this.props && this.props.ecId || ''}_WeaLogViewComp@6ccx3o`}
|
||||||
|
visible={visible}
|
||||||
|
onCancel={this.onCloseLogDialog}
|
||||||
|
targetId={targetId}
|
||||||
|
logStore={logTable}
|
||||||
|
logSmallType={97}
|
||||||
|
/>
|
||||||
|
<EditFormDialog ecId={`${this && this.props && this.props.ecId || ''}_EditFormDialog@2bdtyw`}/>
|
||||||
|
</WeaRightMenu>
|
||||||
|
: <NoRight ecId={`${this && this.props && this.props.ecId || ''}_NoRight@srbzf5`}/>
|
||||||
|
: <NonStand ecId={`${this && this.props && this.props.ecId || ''}_NonStand@arpy95`} />
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default TodoClient;
|
||||||
|
|
@ -0,0 +1,581 @@
|
||||||
|
import React from "react";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { toJS } from "mobx";
|
||||||
|
import { Button, Spin, Modal } from "antd";
|
||||||
|
import NoRight from "../../public/NoRight";
|
||||||
|
import NonStand from "../../public/NonStand";
|
||||||
|
import WhiteList from '../../public/WhiteList';
|
||||||
|
import '../../style/cas.less';
|
||||||
|
import {
|
||||||
|
WeaLocaleProvider,
|
||||||
|
WeaTop,
|
||||||
|
WeaTab,
|
||||||
|
WeaRightMenu,
|
||||||
|
WeaFormItem,
|
||||||
|
WeaTools,
|
||||||
|
WeaSearchGroup,
|
||||||
|
WeaNewScroll,
|
||||||
|
WeaHelpfulTip,
|
||||||
|
WeaInput,
|
||||||
|
WeaDialog,
|
||||||
|
WeaCheckbox,
|
||||||
|
} from "ecCom";
|
||||||
|
|
||||||
|
import { WeaSwitch } from "comsMobx";
|
||||||
|
import DoubleInput from '../doubleInput';
|
||||||
|
import * as IntegrationUtil from "../../util/IntegrationUtil";
|
||||||
|
import PopoverButton from '../../public/PopoverButton';
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
@inject("cas")
|
||||||
|
@inject("whiteListStore")
|
||||||
|
@observer
|
||||||
|
export default class Cas extends React.Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
editTableSelected: [],
|
||||||
|
clazz: "weaver.interfaces.sso.cas.AuthenticationFilter",
|
||||||
|
ticketClazz: "weaver.interfaces.sso.cas.AbstractTicketValidationFilter",
|
||||||
|
datas: [{
|
||||||
|
title: getLabel('513856','登录校验'),
|
||||||
|
viewcondition: "0"
|
||||||
|
}, {
|
||||||
|
title: `Ticket${getLabel('128877','校验')}`,
|
||||||
|
viewcondition: "1"
|
||||||
|
}],
|
||||||
|
selectedKey: "0"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
const { cas, whiteListStore } = this.props;
|
||||||
|
whiteListStore.getRegisterFilterId({filter_clazz: this.state.clazz}, cas.doInit);
|
||||||
|
}
|
||||||
|
|
||||||
|
onRightMenuClick = (type, recordId) => {
|
||||||
|
const { cas } = this.props;
|
||||||
|
const { save, newBaseForm } = cas;
|
||||||
|
const formParams = newBaseForm.getFormParams();
|
||||||
|
switch (type) {
|
||||||
|
case "save":
|
||||||
|
save();
|
||||||
|
break;
|
||||||
|
case "test":
|
||||||
|
if (formParams.isuse == 1) {
|
||||||
|
Modal.confirm({
|
||||||
|
title: `${getLabel(131329,'信息确认')}`,
|
||||||
|
content: getLabel('514734','部署后会自动重启服务,若有失败,请手动重启服务,以确保系统能正常使用!'),
|
||||||
|
okText: `${getLabel(382958,'确定')}`,
|
||||||
|
cancelText:`${getLabel(31129,'取消')}`,
|
||||||
|
onOk: () => this.complete(),
|
||||||
|
});
|
||||||
|
}else {
|
||||||
|
Modal.confirm({
|
||||||
|
title: `${getLabel(131329,'信息确认')}`,
|
||||||
|
content: getLabel(387003,'是否要关闭CAS?'),
|
||||||
|
okText: `${getLabel(382958,'确定')}`,
|
||||||
|
cancelText:`${getLabel(31129,'取消')}`,
|
||||||
|
onOk: () => this.complete(),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成
|
||||||
|
*/
|
||||||
|
complete = () => {
|
||||||
|
const { cas } = this.props;
|
||||||
|
const { save, newBaseForm } = cas;
|
||||||
|
const formParams = newBaseForm.getFormParams();
|
||||||
|
if (formParams.isuse == '1' && formParams.appauth != 1 && formParams.pcauth != 1) {
|
||||||
|
Modal.info({
|
||||||
|
title: getLabel(15172,'系统提示'),
|
||||||
|
content: getLabel(386921,'请开启pc认证或手机认证!'),
|
||||||
|
okText: getLabel(826,'确定'),
|
||||||
|
onOk:() => {},
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
save(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getBtns = () => {
|
||||||
|
const { cas } = this.props;
|
||||||
|
const { loading } = cas;
|
||||||
|
let btns = [];
|
||||||
|
btns = [
|
||||||
|
<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@bgqidb@integrationCasSave`}
|
||||||
|
type="primary"
|
||||||
|
onClick={() => {
|
||||||
|
{
|
||||||
|
this.onRightMenuClick("save");
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
disabled={loading}
|
||||||
|
>
|
||||||
|
{getLabel("86", "保存")}
|
||||||
|
</Button>,
|
||||||
|
<PopoverButton ecId={`${this && this.props && this.props.ecId || ''}_PopoverButton@yes2p7@integrationCasTest`}
|
||||||
|
type="primary"
|
||||||
|
disabled={loading}
|
||||||
|
onClick={() => this.onRightMenuClick("test")}
|
||||||
|
/>,
|
||||||
|
];
|
||||||
|
return btns;
|
||||||
|
}
|
||||||
|
|
||||||
|
getRightMenu() {
|
||||||
|
const { cas } = this.props;
|
||||||
|
const { loading } = cas;
|
||||||
|
let btnArr = [{
|
||||||
|
key: "save",
|
||||||
|
disabled: loading,
|
||||||
|
icon: <i className="icon-coms-Preservation" />,
|
||||||
|
content: getLabel("86", "保存"),
|
||||||
|
onClick: () => this.onRightMenuClick("save")
|
||||||
|
},{
|
||||||
|
key: "test",
|
||||||
|
disabled: loading,
|
||||||
|
icon: <i className="icon-coms-Approval" />,
|
||||||
|
// content: ,
|
||||||
|
content: getLabel('514733','部署'),
|
||||||
|
onClick: () => this.onRightMenuClick("test")
|
||||||
|
}];
|
||||||
|
return btnArr;
|
||||||
|
}
|
||||||
|
getColumns = (columns) => {
|
||||||
|
let cols = [];
|
||||||
|
columns && columns.forEach((col)=> {
|
||||||
|
if (col.dataIndex === 'excludeurl') {
|
||||||
|
col.com = [{
|
||||||
|
type: 'CUSTOM',
|
||||||
|
key: 'excludeurl',
|
||||||
|
render: (text, record, index, onEdit) => {
|
||||||
|
return <WeaInput ecId={`${this && this.props && this.props.ecId || ''}_WeaInput@t4j817@integrationCas${col.dataIndex}${index}`}
|
||||||
|
value={record.excludeurl}
|
||||||
|
viewAttr={record.viewAttr =='1'?1:3}
|
||||||
|
hasBorder
|
||||||
|
onChange={(v) => {
|
||||||
|
onEdit({
|
||||||
|
type: 'CUSTOM',
|
||||||
|
record,
|
||||||
|
index,
|
||||||
|
key: 'excludeurl',
|
||||||
|
value: v
|
||||||
|
})
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
cols.push(col);
|
||||||
|
}else if (col.dataIndex === 'excludedescription') {
|
||||||
|
col.com = [{
|
||||||
|
type: 'CUSTOM',
|
||||||
|
key: 'excludedescription',
|
||||||
|
render: (text, record, index, onEdit) => {
|
||||||
|
return <WeaInput ecId={`${this && this.props && this.props.ecId || ''}_WeaInput@8lapqg@integrationCas${col.dataIndex}${index}`}
|
||||||
|
value={record.excludedescription}
|
||||||
|
inputType={"multilang"}
|
||||||
|
isMulti={true}
|
||||||
|
isBase64={true}
|
||||||
|
viewAttr={record.viewAttr =='1'?'1':2}
|
||||||
|
hasBorder
|
||||||
|
onChange={(v) => {
|
||||||
|
onEdit({
|
||||||
|
type: 'CUSTOM',
|
||||||
|
record: {
|
||||||
|
...record,
|
||||||
|
excludedescription: v ? v.trim() : "",
|
||||||
|
},
|
||||||
|
index,
|
||||||
|
})
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
cols.push(col);
|
||||||
|
}else if (col.dataIndex === 'logincheck') {
|
||||||
|
col.com = [{
|
||||||
|
type: 'CHECKBOX',
|
||||||
|
key: 'logincheck',
|
||||||
|
render: (text, record, index, onEdit) => {
|
||||||
|
return <WeaCheckbox ecId={`${this && this.props && this.props.ecId || ''}_WeaCheckbox@138xqq@integrationCas${col.dataIndex}${index}`}
|
||||||
|
value={record.logincheck}
|
||||||
|
viewAttr={2}
|
||||||
|
onChange={(v) => {
|
||||||
|
onEdit({
|
||||||
|
type: 'CHECKBOX',
|
||||||
|
record: {
|
||||||
|
...record,
|
||||||
|
logincheck: v,
|
||||||
|
},
|
||||||
|
index,
|
||||||
|
})
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
col.title=
|
||||||
|
<span>
|
||||||
|
<span>{col.title}<span className={"wf-backstage-linkAgeViewAttr-helpTip"}
|
||||||
|
style={{marginLeft: 5}}><WeaHelpfulTip ecId={`${this && this.props && this.props.ecId || ''}_WeaHelpfulTip@w12r3n@integrationCas${col.dataIndex}`}
|
||||||
|
title={<div><p>{getLabel('', '启用登录校验 : 勾选,表示认证排除地址生效,不走CAS认证。')}</p>
|
||||||
|
</div>}/></span></span>
|
||||||
|
</span>
|
||||||
|
cols.push(col);
|
||||||
|
}else if (col.dataIndex === 'ticketcheck') {
|
||||||
|
col.com = [{
|
||||||
|
type: 'CHECKBOX',
|
||||||
|
key: 'ticketcheck',
|
||||||
|
render: (text, record, index, onEdit) => {
|
||||||
|
return <WeaCheckbox ecId={`${this && this.props && this.props.ecId || ''}_WeaCheckbox@pg3t47@integrationCas${col.dataIndex}${index}`}
|
||||||
|
value={record.ticketcheck}
|
||||||
|
viewAttr={2}
|
||||||
|
onChange={(v) => {
|
||||||
|
onEdit({
|
||||||
|
type: 'CHECKBOX',
|
||||||
|
record: {
|
||||||
|
...record,
|
||||||
|
ticketcheck: v,
|
||||||
|
},
|
||||||
|
index,
|
||||||
|
})
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
col.title=
|
||||||
|
<span>
|
||||||
|
<span>{col.title}<span className={"wf-backstage-linkAgeViewAttr-helpTip"}
|
||||||
|
style={{marginLeft: 5}}><WeaHelpfulTip ecId={`${this && this.props && this.props.ecId || ''}_WeaHelpfulTip@khhqd1@integrationCas${col.dataIndex}`}
|
||||||
|
title={<div><p>{getLabel('', '启用Ticket校验:勾选,表示认证排除地址生效,若排除地址后带有ticket则不走Ticket校验。')}</p>
|
||||||
|
</div>}/></span></span>
|
||||||
|
</span>
|
||||||
|
cols.push(col);
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
return cols;
|
||||||
|
}
|
||||||
|
|
||||||
|
tableEditOperate = type => {
|
||||||
|
const { cas } = this.props;
|
||||||
|
const { tableEdit } = cas;
|
||||||
|
switch (type) {
|
||||||
|
case "add":
|
||||||
|
tableEdit.doAdd();
|
||||||
|
break;
|
||||||
|
case "del":
|
||||||
|
tableEdit.doDelete();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
willDelete = (datas, keys) => new Promise((resolve, reject) => {
|
||||||
|
Modal.confirm({
|
||||||
|
title: `${getLabel(131329,'信息确认')}`,
|
||||||
|
content: `${getLabel(385625,'确定要删除选择的记录吗?')}`,
|
||||||
|
okText: `${getLabel(382958,'确定')}`,
|
||||||
|
cancelText:`${getLabel(31129,'取消')}`,
|
||||||
|
onOk: () => resolve(true),
|
||||||
|
onCancel: () => resolve(false),
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
willAdd = (allDatas, addData) => {
|
||||||
|
const {cas} = this.props;
|
||||||
|
const {tableDatas} = toJS(cas.status);
|
||||||
|
let currentData = [];
|
||||||
|
|
||||||
|
currentData = {
|
||||||
|
...addData,
|
||||||
|
logincheck: '1'
|
||||||
|
}
|
||||||
|
|
||||||
|
allDatas && allDatas.map((v, index) => {
|
||||||
|
if(v.key === addData.key) {
|
||||||
|
allDatas[index] = currentData;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
cas.setState({tableDatas: allDatas});
|
||||||
|
}
|
||||||
|
|
||||||
|
getTabs = () => {
|
||||||
|
const {datas, selectedKey, ticketClazz, clazz} = this.state;
|
||||||
|
return <WeaTab ecId={`${this && this.props && this.props.ecId || ''}_WeaTab@1u7ybx`}
|
||||||
|
datas={datas}
|
||||||
|
keyParam="viewcondition" //主键
|
||||||
|
countParam="groupid" //数量
|
||||||
|
type="card"
|
||||||
|
selectedKey={selectedKey}
|
||||||
|
onChange={v => {
|
||||||
|
let clazz_ = "";
|
||||||
|
this.setState({selectedKey: v});
|
||||||
|
if(v == 0) {
|
||||||
|
clazz_ = clazz;
|
||||||
|
}else if(v == 1) {
|
||||||
|
clazz_ = ticketClazz;
|
||||||
|
}
|
||||||
|
this.props.whiteListStore.getRegisterFilterId({filter_clazz: clazz_});
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
|
||||||
|
getFormSearchs = (form, datas) => {
|
||||||
|
const { cas } = this.props;
|
||||||
|
const { res, userAgent } = toJS(cas.status);
|
||||||
|
const {isFormInit} = form;
|
||||||
|
let group = [];
|
||||||
|
const formParams = form.getFormParams();
|
||||||
|
isFormInit && datas && datas.forEach((c, idx) => {
|
||||||
|
let leftDis = idx == 6 ? -17 : 0;
|
||||||
|
let items = [];
|
||||||
|
c.items && c.items.forEach(field => {
|
||||||
|
let hideLabel = false;
|
||||||
|
let fieldcolSpan = field.fieldcol;
|
||||||
|
const key = WeaTools.getKey(field);
|
||||||
|
const bindObj = form.$(key);
|
||||||
|
if ('DESCRIPTION' == field.conditionType) {
|
||||||
|
fieldcolSpan = 24;
|
||||||
|
}
|
||||||
|
let dom = <WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@qiubv7@integrationCasForm${field.domkey[0]}`} fieldConfig={field} form={form} formParams={formParams}/>
|
||||||
|
if ('casserverurl' == field.domkey[0]) {
|
||||||
|
dom = <div style={{position: 'relative'}}>
|
||||||
|
{dom}
|
||||||
|
<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@nm2f3t@integrationCasForm${field.domkey[0]}TestBtn`} style={{position: 'absolute', right:'-65px', top: '4px'}} size="small" type={'ghost'}
|
||||||
|
onClick={()=> {cas.testCas()}}>{getLabel("25496", "测试")}</Button>
|
||||||
|
</div>
|
||||||
|
}else if ('casserverloginpage' == field.domkey[0] || 'casserverlogoutpage' == field.domkey[0]) {
|
||||||
|
dom = <DoubleInput ecId={`${this && this.props && this.props.ecId || ''}_DoubleInput@746ums@integrationCasForm${field.domkey[0]}`}
|
||||||
|
leftValue={formParams.casserverurl || res.defaultCasUrl}
|
||||||
|
viewAttr={3}
|
||||||
|
{...bindObj.bind()}
|
||||||
|
/>
|
||||||
|
}else if ('ecologyurl' == field.domkey[0]) {
|
||||||
|
dom = <div style={{position: 'relative'}}>
|
||||||
|
{dom}
|
||||||
|
<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@cpj71s@integrationCasForm${field.domkey[0]}SetBtn`} style={{position: 'absolute', right:'-65px', top: '4px'}}
|
||||||
|
size="small" type={'ghost'}
|
||||||
|
onClick={()=> {this.refs.systemSetting && this.refs.systemSetting.onShow()}}
|
||||||
|
>{getLabel("19653", "设置")}</Button>
|
||||||
|
</div>
|
||||||
|
}else if ('ecologyloginpage' == field.domkey[0] ) {
|
||||||
|
dom = <DoubleInput ecId={`${this && this.props && this.props.ecId || ''}_DoubleInput@1tb8mu@integrationCasForm${field.domkey[0]}`}
|
||||||
|
leftValue={formParams.ecologyurl || res.defaultEcologyUrl}
|
||||||
|
{...bindObj.bind()}
|
||||||
|
/>
|
||||||
|
}else if ('appauthAddress' == field.domkey[0]) {
|
||||||
|
dom = <div style={{position: 'relative'}}>
|
||||||
|
<DoubleInput ecId={`${this && this.props && this.props.ecId || ''}_DoubleInput@smf2tg`}
|
||||||
|
leftValue={formParams.casserverurl || res.defaultCasUrl}
|
||||||
|
viewAttr={3}
|
||||||
|
{...bindObj.bind()}
|
||||||
|
/>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
hideLabel = false;
|
||||||
|
}else if('strgy_ua_val' === field.domkey[0]) {
|
||||||
|
return;
|
||||||
|
}else if('strgy_ua' === field.domkey[0]) {
|
||||||
|
let userAgentDom = null;
|
||||||
|
if(form.getFormParams().strgy_ua == '1') {
|
||||||
|
userAgentDom = userAgent && userAgent.map((field, index) => {
|
||||||
|
return <div style={{width:300, marginLeft:45, marginTop: -35 }}>
|
||||||
|
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@msqf34@integrationCasForm${field.domkey[0]}`}
|
||||||
|
label={`${field.label}`}
|
||||||
|
// hideLabel={true}
|
||||||
|
labelCol={{span: 10}}
|
||||||
|
wrapperCol={{span: 14}}
|
||||||
|
error={form.getError(field)}
|
||||||
|
tipPosition="bottom"
|
||||||
|
>
|
||||||
|
<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@weu7d1@integrationCasForm${field.domkey[0]}`} fieldConfig={field} form={form} formParams={form.getFormParams()} />
|
||||||
|
</WeaFormItem>
|
||||||
|
</div>
|
||||||
|
});
|
||||||
|
}
|
||||||
|
dom = <nobr>
|
||||||
|
{dom}
|
||||||
|
{userAgentDom}
|
||||||
|
</nobr>
|
||||||
|
}else if('accounttype' === field.domkey[0] && form.getFormParams().accounttype == '7') {
|
||||||
|
let marginLeft = 15, marginTop = 5, title = "";
|
||||||
|
if(field.selectLinkageDatas && field.selectLinkageDatas["7"]) {
|
||||||
|
if(field.selectLinkageDatas["7"].conditionType.toLocaleLowerCase() == "textarea") {
|
||||||
|
field.selectLinkageDatas["7"].maxRows = 4;
|
||||||
|
field.selectLinkageDatas["7"].minRows = 4;
|
||||||
|
marginLeft = 20;
|
||||||
|
marginTop = 35;
|
||||||
|
}
|
||||||
|
title = field.selectLinkageDatas["7"].helpfulTip;
|
||||||
|
}
|
||||||
|
dom = <nobr>
|
||||||
|
{dom}
|
||||||
|
<WeaHelpfulTip ecId={`${this && this.props && this.props.ecId || ''}_WeaHelpfulTip@0a5ea6`} style={{position: "absolute", marginLeft, marginTop}} title={title} />
|
||||||
|
</nobr>
|
||||||
|
}
|
||||||
|
|
||||||
|
items.push({
|
||||||
|
com:(<div style={{marginLeft: leftDis}}>
|
||||||
|
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@0sn0o8@integrationCasForm${field.domkey[0]}`}
|
||||||
|
hideLabel={hideLabel}
|
||||||
|
label={field.label}
|
||||||
|
labelCol={{span: field.labelcol}}
|
||||||
|
wrapperCol={{span: fieldcolSpan}}
|
||||||
|
error={form.getError(field)}
|
||||||
|
fieldType={field.conditionType.toUpperCase()}
|
||||||
|
tipPosition="bottom"
|
||||||
|
>
|
||||||
|
{dom}
|
||||||
|
</WeaFormItem>
|
||||||
|
</div>),
|
||||||
|
colSpan: 1,
|
||||||
|
hide: form.isHide(field, (keys, allParams)=> {
|
||||||
|
let hide = false;
|
||||||
|
"strgy_ua_val" === field.domkey[0] && allParams.strgy_ua == 0 && (hide = true);
|
||||||
|
"clusterNodes" === field.domkey[0] && allParams.is_cluster == 0 && (hide = true);
|
||||||
|
return hide;
|
||||||
|
})
|
||||||
|
})
|
||||||
|
});
|
||||||
|
if (formParams.isuse == '0' && (idx == 1 || idx == 2 || idx == 3 || idx == 4 || idx == 5)) {
|
||||||
|
} else {
|
||||||
|
if (idx !== 5 && idx !== 6) {
|
||||||
|
group.push(<WeaSearchGroup ecId={`${this && this.props && this.props.ecId || ''}_WeaSearchGroup@0wvg1t@integrationCasForm${idx}`} center multiCol col={1} needTigger={true} title={c.title} showGroup={c.defaultshow} items={items}/>)
|
||||||
|
} else if(idx == 6) {
|
||||||
|
group.push(<WeaSearchGroup ecId={`${this && this.props && this.props.ecId || ''}_WeaSearchGroup@4acrea@integrationCasForm${idx}`} multiCol col={1} needTigger={true} title={c.title} showGroup={c.defaultshow} items={items}/>)
|
||||||
|
} else if(idx == 5){
|
||||||
|
group.push(<div className="inte-webseal-whitelist-custom"><WhiteList ecId={`${this && this.props && this.props.ecId || ''}_WhiteList@1v4cwz@integrationCasForm${idx}`} helpfulTip={this.getWhiteListTip()} otherCom={this.getTabs()} /></div>)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return group;
|
||||||
|
}
|
||||||
|
/**获取白名单的helpfulTip */
|
||||||
|
getWhiteListTip = () => {
|
||||||
|
return <div style={{wordBreak: "break-all"}}>
|
||||||
|
<p>1、{getLabel('514625','点击‘+’如果选择不到需要的白名单地址,可以去【统一白名单地址配置】-【通用白名单】里面进行设置;【统一白名单地址配置】页面需要“统一白名单地址配置”权限')}。</p>
|
||||||
|
<p>2、{getLabel('514627','白名单地址也可以直接在【统一白名单地址配置】-【过滤器白名单】中进行维护,登录校验对应过滤器weaver.interfaces.sso.cas.AuthenticationFilter;Ticket校验对应过滤器weaver.interfaces.sso.cas.AbstractTicketValidationFilter')}。</p>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
|
getRowSelection = rowSelection => {
|
||||||
|
const sel = { ...rowSelection };
|
||||||
|
sel.getCheckboxProps = record => {
|
||||||
|
return { disabled: record.viewAttr === '1' };
|
||||||
|
};
|
||||||
|
return sel;
|
||||||
|
}
|
||||||
|
|
||||||
|
getDialogBtnsRightMenu() {
|
||||||
|
const { cas } = this.props;
|
||||||
|
let btnArr = [{
|
||||||
|
key: "test",
|
||||||
|
icon: <i className="icon-coms-complete" />,
|
||||||
|
content: getLabel("25496", "测试"),
|
||||||
|
onClick: () => cas.telTest()
|
||||||
|
}];
|
||||||
|
return btnArr;
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { cas, whiteListStore } = this.props;
|
||||||
|
const { newBaseForm, status,hasRight, rightLoading, loading } = cas;
|
||||||
|
const { newBaseFormFields, testVisible, hasNonStandard, nonStandLoading } = toJS(status);
|
||||||
|
return (
|
||||||
|
nonStandLoading
|
||||||
|
? null
|
||||||
|
: hasNonStandard
|
||||||
|
? rightLoading
|
||||||
|
? null
|
||||||
|
: <div style={{height: '100%'}} className="bs-integration-cas">
|
||||||
|
{
|
||||||
|
hasRight
|
||||||
|
? <div>
|
||||||
|
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@qm1bcm`}
|
||||||
|
className="inte-webxml-rightmenu"
|
||||||
|
datas={this.getRightMenu()}
|
||||||
|
collectParams={{
|
||||||
|
favname: `${getLabel(128653, "CAS集成")}`,
|
||||||
|
favouritetype: 1,
|
||||||
|
objid: 0,
|
||||||
|
link: "wui/engine.html#/inteengine/cas",
|
||||||
|
importantlevel: 1
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Spin ecId={`${this && this.props && this.props.ecId || ''}_Spin@8dxeiv`} spinning={loading || false}>
|
||||||
|
<WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@d6znxk`}
|
||||||
|
title={getLabel(128653, "CAS集成")}
|
||||||
|
icon={<i className={IntegrationUtil.GeneralTitleColor.icon} />}
|
||||||
|
iconBgcolor={IntegrationUtil.GeneralTitleColor.iconBgcolor}
|
||||||
|
buttons={this.getBtns()}
|
||||||
|
showDropIcon={true}
|
||||||
|
dropMenuDatas={this.getRightMenu()}
|
||||||
|
loading={loading}
|
||||||
|
dropMenuProps={{
|
||||||
|
collectParams: {
|
||||||
|
favname: `${getLabel(128653, "CAS集成")}`,
|
||||||
|
favouritetype: 1,
|
||||||
|
objid: 0,
|
||||||
|
link: "wui/engine.html#/integration/cas",
|
||||||
|
importantlevel: 1
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<WeaNewScroll ecId={`${this && this.props && this.props.ecId || ''}_WeaNewScroll@2bxfjl`} height={'100%'}>
|
||||||
|
{this.getFormSearchs(newBaseForm, newBaseFormFields)}
|
||||||
|
</WeaNewScroll>
|
||||||
|
</WeaTop>
|
||||||
|
</Spin>
|
||||||
|
</WeaRightMenu>
|
||||||
|
<WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@03w77c`}
|
||||||
|
title={getLabel("128643", "手机认证")}
|
||||||
|
onCancel={()=> cas.setState({testVisible: false})}
|
||||||
|
visible={testVisible}
|
||||||
|
style={{width: 500, height: 300}}
|
||||||
|
icon={IntegrationUtil.GeneralTitleColor.icon}
|
||||||
|
iconBgcolor={IntegrationUtil.GeneralTitleColor.iconBgcolor}
|
||||||
|
hasScroll
|
||||||
|
buttons={[
|
||||||
|
<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@5g4bfj@integrationCasMobileTestBtn`} type="primary" onClick={()=> cas.telTest()}>{getLabel("25496", "测试")}</Button>
|
||||||
|
]}
|
||||||
|
moreBtn={{
|
||||||
|
datas: this.getDialogBtnsRightMenu(),
|
||||||
|
collectParams: {
|
||||||
|
favname: getLabel("128643", "手机认证"),
|
||||||
|
favouritetype: 1,
|
||||||
|
objid: 0,
|
||||||
|
link: "wui/engine.html#/integration/cas",
|
||||||
|
importantlevel: 1
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@t8o271`} datas={this.getDialogBtnsRightMenu()} collectParams={{
|
||||||
|
favname: getLabel("128643", "手机认证"),
|
||||||
|
favouritetype: 1,
|
||||||
|
objid: 0,
|
||||||
|
link: "wui/engine.html#/integration/cas",
|
||||||
|
importantlevel: 1
|
||||||
|
}}>
|
||||||
|
{cas.telForm.render({col: 1})}
|
||||||
|
</WeaRightMenu>
|
||||||
|
</WeaDialog>
|
||||||
|
{
|
||||||
|
window.weaPortalPublic && window.weaPortalPublic.WeaSystemSetting &&
|
||||||
|
<window.weaPortalPublic.WeaSystemSetting ecId={`${this && this.props && this.props.ecId || ''}_weaPortalPublic_WeaSystemSetting@nhj9c8`}
|
||||||
|
ref="systemSetting"
|
||||||
|
onSave={()=> whiteListStore.getRegisterFilterId({filter_clazz: this.state.clazz}, cas.doInit)}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
: <NoRight ecId={`${this && this.props && this.props.ecId || ''}_NoRight@ddulgt`}/>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
: <NonStand ecId={`${this && this.props && this.props.ecId || ''}_NonStand@j60t7q`} />
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,142 @@
|
||||||
|
import React from "react";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { toJS } from "mobx";
|
||||||
|
import { Button, Menu, Tabs, TopTitle, Tree } from "antd";
|
||||||
|
import {
|
||||||
|
WeaLocaleProvider,
|
||||||
|
WeaLeftRightLayout,
|
||||||
|
WeaTop,
|
||||||
|
WeaTab,
|
||||||
|
WeaRightMenu,
|
||||||
|
WeaFormItem,
|
||||||
|
WeaTools,
|
||||||
|
WeaSearchGroup
|
||||||
|
} from "ecCom";
|
||||||
|
|
||||||
|
import { WeaTableNew, WeaSwitch } from "comsMobx";
|
||||||
|
|
||||||
|
const { WeaTable } = WeaTableNew;
|
||||||
|
const { getKey } = WeaTools;
|
||||||
|
|
||||||
|
import * as IntegrationUtil from "../../util/IntegrationUtil";
|
||||||
|
const getFormSearchs = (form, datas, needTigger = true, lableCol, fieldcol) => {
|
||||||
|
const {isFormInit} = form;
|
||||||
|
let group = [];
|
||||||
|
const formParams = form.getFormParams();
|
||||||
|
isFormInit && datas && datas.map(c =>{
|
||||||
|
let items = [];
|
||||||
|
c.items.map(fields => {
|
||||||
|
items.push({
|
||||||
|
com:(
|
||||||
|
<WeaFormItem
|
||||||
|
label={`${fields.label}`}
|
||||||
|
labelCol={{span: lableCol ? lableCol : `${fields.labelcol}`}}
|
||||||
|
wrapperCol={{span: fieldcol ? fieldcol : `${fields.fieldcol}`}}
|
||||||
|
error={form.getError(fields)}
|
||||||
|
tipPosition="bottom"
|
||||||
|
>
|
||||||
|
<WeaSwitch fieldConfig={fields} form={form} formParams={formParams}/>
|
||||||
|
</WeaFormItem>),
|
||||||
|
colSpan: 1,
|
||||||
|
hide: form.isHide(fields, (keys, allParams) => {
|
||||||
|
let bool = false;
|
||||||
|
getKey(fields) === 'clusterNodes' && allParams.is_cluster != '1' && (bool = true);
|
||||||
|
return bool;
|
||||||
|
})
|
||||||
|
})
|
||||||
|
});
|
||||||
|
if(needTigger){
|
||||||
|
group.push(<WeaSearchGroup center col={1} needTigger={needTigger} title={c.title} showGroup={c.defaultshow} items={items}/>)
|
||||||
|
}else {
|
||||||
|
group.push(<WeaSearchGroup center col={1} needTigger={needTigger} showGroup={c.defaultshow} items={items}/>)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return group;
|
||||||
|
}
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
@inject("cas")
|
||||||
|
@observer
|
||||||
|
export default class Cas extends React.Component {
|
||||||
|
componentDidMount() {
|
||||||
|
const { cas } = this.props;
|
||||||
|
cas.doInit();
|
||||||
|
}
|
||||||
|
|
||||||
|
onRightMenuClick = (type, recordId) => {
|
||||||
|
const { cas } = this.props;
|
||||||
|
const { save } = cas;
|
||||||
|
switch (type) {
|
||||||
|
case "save":
|
||||||
|
save();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
getBtns = () => {
|
||||||
|
const { cas } = this.props;
|
||||||
|
let btns = [];
|
||||||
|
btns = [
|
||||||
|
<Button
|
||||||
|
type="primary"
|
||||||
|
onClick={() => {
|
||||||
|
{
|
||||||
|
// this.add(1)
|
||||||
|
this.onRightMenuClick("save");
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{getLabel("31691,82986", "保存")}
|
||||||
|
</Button>,
|
||||||
|
<Button
|
||||||
|
onClick={() => {
|
||||||
|
{
|
||||||
|
// this.add(3)
|
||||||
|
this.onRightMenuClick("test");
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{getLabel("31691,82988", "完成")}
|
||||||
|
</Button>
|
||||||
|
];
|
||||||
|
return btns;
|
||||||
|
};
|
||||||
|
|
||||||
|
getRightMenu() {
|
||||||
|
const { imrtx } = this.props;
|
||||||
|
// const { selectedKey, rightMenus, rightMenus1 } = toJS(
|
||||||
|
// workflowFlowStore.status
|
||||||
|
// );
|
||||||
|
let btnArr = [];
|
||||||
|
|
||||||
|
return btnArr;
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { cas } = this.props;
|
||||||
|
const { newBaseForm, status } = cas;
|
||||||
|
const { newBaseFormFields } = toJS(status);
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<WeaTop
|
||||||
|
title={getLabel(131795, "CAS集成")}
|
||||||
|
icon={<i className={IntegrationUtil.GeneralTitleColor.icon} />}
|
||||||
|
iconBgcolor={IntegrationUtil.GeneralTitleColor.iconBgcolor}
|
||||||
|
buttons={this.getBtns()}
|
||||||
|
showDropIcon={true}
|
||||||
|
dropMenuDatas={this.getRightMenu()}
|
||||||
|
dropMenuProps={{
|
||||||
|
collectParams: {
|
||||||
|
favname: `${getLabel(131795, "CAS集成")}`,
|
||||||
|
favouritetype: 1,
|
||||||
|
objid: 0,
|
||||||
|
link: "wui/engine.html#/inteengine/imrtx",
|
||||||
|
importantlevel: 1
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
{getFormSearchs(newBaseForm, newBaseFormFields)}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,120 @@
|
||||||
|
import React from "react";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { toJS } from "mobx";
|
||||||
|
import {
|
||||||
|
WeaLocaleProvider,
|
||||||
|
WeaRightMenu,
|
||||||
|
WeaFormItem,
|
||||||
|
WeaDialog,
|
||||||
|
WeaSearchGroup,
|
||||||
|
} from "ecCom";
|
||||||
|
import {WeaSwitch} from "comsMobx";
|
||||||
|
import {
|
||||||
|
onCheck,
|
||||||
|
} from "../../util/IntegrationUtil";
|
||||||
|
import {Button} from 'antd';
|
||||||
|
|
||||||
|
const {getLabel} = WeaLocaleProvider;
|
||||||
|
|
||||||
|
@inject("coremailStore")
|
||||||
|
@observer
|
||||||
|
export default class AddOrEdit extends React.Component {
|
||||||
|
|
||||||
|
getCondition = (form, datas=[]) => {
|
||||||
|
const {isFormInit} = form;
|
||||||
|
let group = [];
|
||||||
|
|
||||||
|
isFormInit && datas && datas.forEach((c, index) => {
|
||||||
|
let items = [];
|
||||||
|
c.items && c.items.forEach(fields => {
|
||||||
|
items.push({
|
||||||
|
com: (<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@355b1a@integrationCoremailEditForm${fields.domkey[0]}`}
|
||||||
|
label={`${fields.label}`}
|
||||||
|
labelCol={{ span: `${fields.labelcol}` }}
|
||||||
|
wrapperCol={{ span: `${fields.fieldcol}` }}
|
||||||
|
error={form.getError(fields)}
|
||||||
|
tipPosition={"bottom"}
|
||||||
|
>
|
||||||
|
<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@ry4rpw@integrationCoremailEditForm${fields.domkey[0]}`} fieldConfig={fields} form={form} />
|
||||||
|
</WeaFormItem>),
|
||||||
|
colSpan: 1
|
||||||
|
})
|
||||||
|
});
|
||||||
|
group.push(<WeaSearchGroup ecId={`${this && this.props && this.props.ecId || ''}_WeaSearchGroup@ungpwb@integrationCoremailEditForm${index}`} col={1} needTigger={true} title={c.title} showGroup={c.defaultshow} items={items} center />)
|
||||||
|
});
|
||||||
|
return group;
|
||||||
|
}
|
||||||
|
|
||||||
|
onMenuClick = () => {
|
||||||
|
const {coremailStore} = this.props;
|
||||||
|
const {newForm, getCoreMailSaveOperation} = coremailStore;
|
||||||
|
|
||||||
|
onCheck(newForm, getCoreMailSaveOperation);
|
||||||
|
}
|
||||||
|
|
||||||
|
onTestDatas=()=>{
|
||||||
|
const {coremailStore} = this.props;
|
||||||
|
const {status, newForm, testCoreMail} = coremailStore;
|
||||||
|
const {operateIndex} = status;
|
||||||
|
|
||||||
|
onCheck(newForm, () => {
|
||||||
|
let params = Object.assign({}, newForm.getFormParams(), {coremailid: operateIndex,operate:'test',isFormEdit:'1'});
|
||||||
|
testCoreMail(params);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const {
|
||||||
|
coremailStore,
|
||||||
|
} = this.props, {
|
||||||
|
status,
|
||||||
|
newForm,
|
||||||
|
flag,
|
||||||
|
} = coremailStore, {
|
||||||
|
coremailDialogVisible,
|
||||||
|
newFormCondition,
|
||||||
|
operateIndex,
|
||||||
|
} = status;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@9bunac`}
|
||||||
|
visible={coremailDialogVisible}
|
||||||
|
title={operateIndex ? getLabel('506091','编辑CoreMail集成') : getLabel('506014','新建CoreMail集成')}
|
||||||
|
icon={'icon-coms-integration'}
|
||||||
|
iconBgcolor={'#1a57a0'}
|
||||||
|
style={{width:800, height:600}}
|
||||||
|
hasScroll
|
||||||
|
loading={!flag}
|
||||||
|
onCancel={v => coremailStore.setStatus('coremailDialogVisible', false)}
|
||||||
|
buttons={[<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@5grw6l@integrationCoremailEditButtonSaveBtn`} type="primary" onClick={() => this.onMenuClick()}>{getLabel(30986, '保存')}</Button>,
|
||||||
|
<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@4aijen@integrationCoremailEditButtonTestBtn`} type="primary" onClick={() => this.onTestDatas()}>{getLabel(25496, '测试')}</Button>
|
||||||
|
]}
|
||||||
|
moreBtn={{
|
||||||
|
datas: [{
|
||||||
|
key: 'BTN_SAVE',
|
||||||
|
icon: <i className='icon-coms-Preservation'/>,
|
||||||
|
content : getLabel(30986, '保存'),
|
||||||
|
onClick : this.onMenuClick
|
||||||
|
}],
|
||||||
|
collectParams: []
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@8zuu4u`}
|
||||||
|
datas={[{
|
||||||
|
key: 'BTN_SAVE',
|
||||||
|
icon: <i className='icon-coms-Preservation'/>,
|
||||||
|
content : getLabel(30986, '保存'),
|
||||||
|
onClick : this.onMenuClick
|
||||||
|
}]}
|
||||||
|
collectParams={[]}
|
||||||
|
>
|
||||||
|
{
|
||||||
|
flag
|
||||||
|
? this.getCondition(newForm, newFormCondition)
|
||||||
|
: null
|
||||||
|
}
|
||||||
|
</WeaRightMenu>
|
||||||
|
</WeaDialog>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,560 @@
|
||||||
|
import React from "react";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { toJS } from "mobx";
|
||||||
|
import { Button, Spin} from "antd";
|
||||||
|
import {
|
||||||
|
WeaLocaleProvider,
|
||||||
|
WeaTop,
|
||||||
|
WeaTab,
|
||||||
|
WeaRightMenu,
|
||||||
|
WeaFormItem,
|
||||||
|
WeaSearchGroup,
|
||||||
|
WeaHelpfulTip
|
||||||
|
} from "ecCom";
|
||||||
|
import { WeaTableNew, WeaSwitch } from "comsMobx";
|
||||||
|
import * as IntegrationUtil from "../../util/IntegrationUtil";
|
||||||
|
import Login from "../login/index"
|
||||||
|
import AddOrEdit from './AddOrEdit';
|
||||||
|
import InitializedData from "./initializedData";
|
||||||
|
import NonStand from "../../public/NonStand";
|
||||||
|
|
||||||
|
const { WeaTable } = WeaTableNew;
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
@inject("coremailStore")
|
||||||
|
@inject('intelogin')
|
||||||
|
@observer
|
||||||
|
export default class DataShow extends React.Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
const { initPage } = this.props.coremailStore;
|
||||||
|
initPage();
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps) {
|
||||||
|
if (this.props.location.key !== nextProps.location.key) {
|
||||||
|
const { initPage } = this.props.coremailStore;
|
||||||
|
initPage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
getDropMenuDatas = () => {
|
||||||
|
const { coremailStore } = this.props;
|
||||||
|
const { status,tableStore } = coremailStore;
|
||||||
|
const { tabSelected, coremailRightMenu=[] } = toJS(status);
|
||||||
|
const btnArr = [];
|
||||||
|
// inteLogin
|
||||||
|
const { intelogin } = this.props;
|
||||||
|
const { menus } = intelogin;
|
||||||
|
const { dropMenuDatas } = menus;
|
||||||
|
const {selectedRowKeys} = toJS(tableStore);
|
||||||
|
|
||||||
|
switch (tabSelected) {
|
||||||
|
case 0:
|
||||||
|
coremailRightMenu && coremailRightMenu.map(item => {
|
||||||
|
btnArr.push({
|
||||||
|
key: item.type,
|
||||||
|
icon: <i className={item.menuIcon} />,
|
||||||
|
content: item.menuName,
|
||||||
|
onClick: () => this.onRightMenuClick(item.type),
|
||||||
|
disabled: (item.type != "rb_1" && selectedRowKeys.length === 0)||
|
||||||
|
(item.type=="rb_4"&&selectedRowKeys.length == 0)
|
||||||
|
||(item.type=="rb_3"&&selectedRowKeys.length == 0)
|
||||||
|
||(item.type=="rb_2"&&selectedRowKeys.length == 0),
|
||||||
|
})
|
||||||
|
})
|
||||||
|
btnArr.push({
|
||||||
|
key: "BTN_COLUMN",
|
||||||
|
icon: <i className="icon-coms-Custom" />,
|
||||||
|
content: `${getLabel(32535, "显示列定制")}`,
|
||||||
|
onClick: () => this.onRightMenuClick("BTN_COLUMN")
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
dropMenuDatas && dropMenuDatas.map(item => {
|
||||||
|
btnArr.push(item);
|
||||||
|
})
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
//显示列定制
|
||||||
|
btnArr.push({
|
||||||
|
key: "BTN_COLUMN",
|
||||||
|
icon: <i className="icon-coms-Custom" />,
|
||||||
|
content: `${getLabel(32535, "显示列定制")}`,
|
||||||
|
onClick: () => this.onRightMenuClick("BTN_COLUMN")
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
return btnArr;
|
||||||
|
}
|
||||||
|
|
||||||
|
getWeaTopBtns = () => {
|
||||||
|
const { coremailStore } = this.props;
|
||||||
|
const {status, tableStore} = coremailStore;
|
||||||
|
const {tabSelected, coremailRightMenu=[]} = toJS(status);
|
||||||
|
const {selectedRowKeys} = toJS(tableStore);
|
||||||
|
// inteLogin
|
||||||
|
const { intelogin } = this.props;
|
||||||
|
const { menus } = intelogin;
|
||||||
|
const btns = menus.buttons;
|
||||||
|
const btnArr = [];
|
||||||
|
|
||||||
|
switch (tabSelected) {
|
||||||
|
case 0:
|
||||||
|
coremailRightMenu && coremailRightMenu.forEach(item => {
|
||||||
|
btnArr.push(
|
||||||
|
<Button
|
||||||
|
ecId={`${this && this.props && this.props.ecId || ''}_Button@xz70fb@integrationCoremailButton${item.type}`}
|
||||||
|
disabled={
|
||||||
|
(item.type != "rb_1" && selectedRowKeys.length === 0)||
|
||||||
|
(item.type=="rb_4"&&selectedRowKeys.length == 0)
|
||||||
|
||(item.type=="rb_3"&&selectedRowKeys.length == 0)
|
||||||
|
||(item.type=="rb_2"&&selectedRowKeys.length == 0)
|
||||||
|
}
|
||||||
|
onClick={() => this.onRightMenuClick(item.type)}
|
||||||
|
type='primary'
|
||||||
|
>{item.menuName}</Button>
|
||||||
|
)
|
||||||
|
})
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
btns && btns.forEach(item => {
|
||||||
|
btnArr.push(item);
|
||||||
|
})
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return btnArr;
|
||||||
|
}
|
||||||
|
|
||||||
|
getTab = () => {
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
title: getLabel('505949','集成列表'),
|
||||||
|
viewcondition: 0
|
||||||
|
},{
|
||||||
|
title: getLabel('20960','集成登录'),
|
||||||
|
viewcondition: 1
|
||||||
|
},{
|
||||||
|
title: getLabel('125928','同步日志'),
|
||||||
|
viewcondition: 2
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
onRightMenuClick = (type, selectedIndex) => {
|
||||||
|
const { coremailStore } = this.props;
|
||||||
|
const { save, init, test, pageForm, logFormTable, tableStore, getCoreMailDelete ,getInitalDialog, testCoreMail, status: {tabSelected}} = coremailStore;
|
||||||
|
const {selectedRowKeys} = toJS(tableStore);
|
||||||
|
const params = pageForm.getFormParams();
|
||||||
|
selectedIndex = selectedIndex != undefined ? selectedIndex : selectedRowKeys;
|
||||||
|
|
||||||
|
switch (type) {
|
||||||
|
case "BTN_SAVE":
|
||||||
|
IntegrationUtil.onCheck(pageForm, () => {
|
||||||
|
save(params)
|
||||||
|
})
|
||||||
|
break;
|
||||||
|
case "BTN_INIT":
|
||||||
|
init(params);
|
||||||
|
break;
|
||||||
|
case "BTN_TEST":
|
||||||
|
IntegrationUtil.onCheck(pageForm, () => {
|
||||||
|
test(params)
|
||||||
|
})
|
||||||
|
break;
|
||||||
|
case "BTN_COLUMN":
|
||||||
|
if(tabSelected == 0) {
|
||||||
|
tableStore.setColSetVisible(true);
|
||||||
|
tableStore.tableColSet(true);
|
||||||
|
}else if(tabSelected == 2){
|
||||||
|
logFormTable.setColSetVisible(true);
|
||||||
|
logFormTable.tableColSet(true);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "BTN_NEW":
|
||||||
|
this.onRightMenuClick2("BTN_NEW");
|
||||||
|
break;
|
||||||
|
case "BTN_DEL":
|
||||||
|
this.onRightMenuClick2("BTN_DEL");
|
||||||
|
break;
|
||||||
|
case "BTN_LOG":
|
||||||
|
this.onRightMenuClick2("BTN_LOG");
|
||||||
|
break;
|
||||||
|
case "rb_1":
|
||||||
|
coremailStore.setStatus('coremailDialogVisible', true);
|
||||||
|
coremailStore.setStatus('operateIndex', '');
|
||||||
|
coremailStore.getCoremailMailAddForm();
|
||||||
|
break;
|
||||||
|
case "BTN_EDIT":
|
||||||
|
coremailStore.setStatus('coremailDialogVisible', true);
|
||||||
|
coremailStore.setStatus('operateIndex', selectedIndex);
|
||||||
|
coremailStore.getCoremailMailAddForm();
|
||||||
|
break;
|
||||||
|
case "rb_2":
|
||||||
|
IntegrationUtil.doConfirm(getLabel(385625, '确定要删除选择的记录吗?'), getCoreMailDelete, {coremailid: selectedIndex})
|
||||||
|
break;
|
||||||
|
case "rb_3":
|
||||||
|
getInitalDialog(selectedIndex);
|
||||||
|
break;
|
||||||
|
case "rb_4":
|
||||||
|
testCoreMail({coremailid: selectedIndex,operate:'test'});
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
resetSearchCondition=v=>{
|
||||||
|
const { coremailStore } = this.props;
|
||||||
|
const {listSearchForm,logSearchForm,getCoreMailList,getDatas} = coremailStore;
|
||||||
|
switch (v) {
|
||||||
|
case 0:
|
||||||
|
listSearchForm.reset();
|
||||||
|
getCoreMailList(listSearchForm.getFormParams());
|
||||||
|
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
const {
|
||||||
|
intelogin
|
||||||
|
} = this.props, {
|
||||||
|
search,
|
||||||
|
mainTab,
|
||||||
|
} = intelogin, {
|
||||||
|
form
|
||||||
|
} = mainTab;
|
||||||
|
form.reset();
|
||||||
|
search();
|
||||||
|
break;
|
||||||
|
case 2:;
|
||||||
|
logSearchForm.reset();
|
||||||
|
getDatas(null, true);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getSearchAD = () => {
|
||||||
|
const { coremailStore } = this.props;
|
||||||
|
const { logSearchForm, logSearchFormConditions=[], status, listSearchForm } = coremailStore;
|
||||||
|
const { tabSelected, listSearchCondition=[] } = toJS(status);
|
||||||
|
let searchForm = null, datas = [];
|
||||||
|
switch (Number(tabSelected)) {
|
||||||
|
case 0:
|
||||||
|
searchForm = listSearchForm;
|
||||||
|
datas = [...listSearchCondition];
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
searchForm = logSearchForm;
|
||||||
|
datas = [...toJS(logSearchFormConditions)];
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
const { intelogin } = this.props;
|
||||||
|
const { mainTab } = intelogin;
|
||||||
|
const {
|
||||||
|
form,
|
||||||
|
condition=[],
|
||||||
|
} = mainTab;
|
||||||
|
searchForm = form;
|
||||||
|
datas = [...condition];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
return IntegrationUtil.getAdvancedItem(searchForm, datas, this.onSearch, false, this && this.props && this.props.ecId || '', "integrationCoremail");
|
||||||
|
}catch(err){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
onSearch = () => {
|
||||||
|
const { coremailStore } = this.props;
|
||||||
|
const { status, getDatas, setStatus, getCoreMailList, listSearchForm } = coremailStore;
|
||||||
|
const { tabSelected } = toJS(status);
|
||||||
|
|
||||||
|
switch (tabSelected) {
|
||||||
|
case 0:
|
||||||
|
getCoreMailList(listSearchForm.getFormParams());
|
||||||
|
setStatus("searchShow", false);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
getDatas(null, true);
|
||||||
|
setStatus("searchShow", false);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
const {
|
||||||
|
intelogin
|
||||||
|
} = this.props, {
|
||||||
|
search,
|
||||||
|
} = intelogin;
|
||||||
|
search();
|
||||||
|
setStatus("searchShow", false);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getSearchButtonsAd = () => {
|
||||||
|
const { coremailStore } = this.props;
|
||||||
|
const { status, setStatus, listSearchForm, logSearchForm } = coremailStore;
|
||||||
|
const { tabSelected } = toJS(status);
|
||||||
|
let resetFun = null;
|
||||||
|
switch (Number(tabSelected)) {
|
||||||
|
case 0:
|
||||||
|
resetFun = () => listSearchForm.reset();
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
resetFun = () => logSearchForm.reset();
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
const {
|
||||||
|
intelogin
|
||||||
|
} = this.props, {
|
||||||
|
mainTab,
|
||||||
|
} = intelogin, {
|
||||||
|
form
|
||||||
|
} = mainTab;
|
||||||
|
resetFun = () => form.reset();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return IntegrationUtil.getSearchBtns(
|
||||||
|
this.onSearch,
|
||||||
|
resetFun,
|
||||||
|
() => setStatus("searchShow", false),
|
||||||
|
this && this.props && this.props.ecId || '',
|
||||||
|
"integrationCoremail",
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
handleSearch = () => {
|
||||||
|
const { intelogin } = this.props;
|
||||||
|
const { search } = intelogin;
|
||||||
|
let params = {}
|
||||||
|
params.typename = '8';//筛选
|
||||||
|
|
||||||
|
isPanelShow && changeSearchPanelStatus(false);
|
||||||
|
getTableInfo(params);
|
||||||
|
}
|
||||||
|
|
||||||
|
doOnSearchChange = v => {
|
||||||
|
const { coremailStore } = this.props;
|
||||||
|
const { status, setStatus, listSearchForm } = coremailStore;
|
||||||
|
const { tabSelected } = toJS(status);
|
||||||
|
switch (tabSelected) {
|
||||||
|
case 0:
|
||||||
|
listSearchForm.updateFields({systemaddress: v});
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
const {
|
||||||
|
intelogin
|
||||||
|
} = this.props, {
|
||||||
|
mainTab,
|
||||||
|
} = intelogin, {
|
||||||
|
form,
|
||||||
|
} = mainTab;
|
||||||
|
form.updateFields({name: v});
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
setStatus("searchValue", v);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
doOnSearch = () => {
|
||||||
|
const { coremailStore } = this.props;
|
||||||
|
const { status, getDatas, getCoreMailList, listSearchForm } = coremailStore;
|
||||||
|
const { tabSelected, searchValue } = toJS(status);
|
||||||
|
// intelogin
|
||||||
|
const { intelogin } = this.props;
|
||||||
|
const { search } = intelogin;
|
||||||
|
switch (tabSelected) {
|
||||||
|
case 0:
|
||||||
|
getCoreMailList({systemaddress: listSearchForm.getFormParams().systemaddress});
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
search();
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
getDatas({ operatedata: searchValue });
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getSearchBaseValue = () => {
|
||||||
|
const { coremailStore } = this.props;
|
||||||
|
const { status, listSearchForm } = coremailStore;
|
||||||
|
const { tabSelected } = toJS(status);
|
||||||
|
// intelogin
|
||||||
|
const {
|
||||||
|
intelogin
|
||||||
|
} = this.props, {
|
||||||
|
mainTab,
|
||||||
|
} = intelogin, {
|
||||||
|
form
|
||||||
|
} = mainTab;
|
||||||
|
return tabSelected == 0 ? listSearchForm.getFormParams().systemaddress : form.getFormParams().name;
|
||||||
|
}
|
||||||
|
|
||||||
|
getFormSearchs = (pageForm, pageFormConditions=[]) => {
|
||||||
|
const { isFormInit } = pageForm;
|
||||||
|
let group = [];
|
||||||
|
const formParams = pageForm.getFormParams();
|
||||||
|
isFormInit && pageFormConditions && pageFormConditions.map((c, index) => {
|
||||||
|
let items = [];
|
||||||
|
c && c.items && c.items.map(field => {
|
||||||
|
let key = field.domkey[0];
|
||||||
|
items.push({
|
||||||
|
com: (
|
||||||
|
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@1i8yla@integrationCoremailSearchForm${key}`}
|
||||||
|
label={`${field.label}`}
|
||||||
|
labelCol={{ span: `${field.labelcol}` }}
|
||||||
|
wrapperCol={{ span: `${field.fieldcol}` }}
|
||||||
|
error={pageForm.getError(field)}
|
||||||
|
tipPosition="bottom"
|
||||||
|
>
|
||||||
|
<nobr><WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@1xi2lz@integrationCoremailSearchForm${key}`} fieldConfig={field} form={pageForm} formParams={formParams} />
|
||||||
|
{key === 'domain' ? <WeaHelpfulTip ecId={`${this && this.props && this.props.ecId || ''}_WeaHelpfulTip@21eu44@integrationCoremailSearchForm${key}`} style={{marginLeft:10}} width={310}
|
||||||
|
title={`${getLabel(33010,'填写')}@${getLabel(387448, '后面部分')},${getLabel(18541, '例如')}test@163.com,${getLabel(33010, '填写')}163.com${getLabel(387449, '即可')}`} />
|
||||||
|
: ''
|
||||||
|
}
|
||||||
|
</nobr>
|
||||||
|
</WeaFormItem>
|
||||||
|
)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
group.push(<WeaSearchGroup ecId={`${this && this.props && this.props.ecId || ''}_WeaSearchGroup@iea56b@integrationCoremailSearchForm${index}`} center={true} col={1} needTigger={true} title={c.title} showGroup={c.defaultshow || true} items={items} />)
|
||||||
|
})
|
||||||
|
return group;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 列表的三个点
|
||||||
|
onOperatesClick = (record, index, operate) => {
|
||||||
|
let selectIndex = record.randomFieldId;
|
||||||
|
let type = '';
|
||||||
|
|
||||||
|
switch (Number(operate.index)) {
|
||||||
|
case 0:
|
||||||
|
type = 'BTN_EDIT';//编辑
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
type = 'rb_2';//删除
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
type = 'rb_4';//测试
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
type= 'rb_3';//初始化
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
this.onRightMenuClick(type, selectIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 列表重定义列
|
||||||
|
getColumns = (columns) => {
|
||||||
|
let newColumns = '';
|
||||||
|
|
||||||
|
newColumns = columns && columns.map(column => {
|
||||||
|
let newColumn = column;
|
||||||
|
newColumn.render = (text, record, index) => { //前端元素转义
|
||||||
|
let valueSpan = record[newColumn.dataIndex + "span"] !== undefined ? record[newColumn.dataIndex + "span"] : record[newColumn.dataIndex];
|
||||||
|
return (
|
||||||
|
newColumn && (newColumn.dataIndex === 'systemaddress'||newColumn.dataIndex === 'coremailsys')
|
||||||
|
? <a onClick={() => this.onRightMenuClick('BTN_EDIT', record.randomFieldId)} dangerouslySetInnerHTML={{__html: valueSpan}}/>
|
||||||
|
: <div dangerouslySetInnerHTML={{__html: valueSpan}}/>
|
||||||
|
)
|
||||||
|
};
|
||||||
|
return newColumn;
|
||||||
|
});
|
||||||
|
return newColumns;
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { coremailStore } = this.props;
|
||||||
|
const { status, setStatus, logFormTable, tableStore, initialList, showInitDia} = coremailStore;
|
||||||
|
const { loading, tabSelected, searchShow, rightLoading, hasNonStandard, nonStandLoading } = toJS(status);
|
||||||
|
|
||||||
|
return (nonStandLoading
|
||||||
|
? null
|
||||||
|
: hasNonStandard
|
||||||
|
? <div>
|
||||||
|
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@7rsd0z`}
|
||||||
|
datas={this.getDropMenuDatas()}
|
||||||
|
collectParams= {{
|
||||||
|
favname: `${getLabel("129787", "CoreMail集成")}`,
|
||||||
|
favouritetype: 1,
|
||||||
|
objid: 0,
|
||||||
|
link: "wui/engine.html#/integration/coremail",
|
||||||
|
importantlevel: 1
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Spin ecId={`${this && this.props && this.props.ecId || ''}_Spin@bpz96x`} spinning={rightLoading}>
|
||||||
|
<WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@nlajwu`}
|
||||||
|
loading={loading}
|
||||||
|
buttons={this.getWeaTopBtns()}
|
||||||
|
title={getLabel("129787", "CoreMail集成")}
|
||||||
|
icon={<i className={IntegrationUtil.GeneralTitleColor.icon} />}
|
||||||
|
iconBgcolor={IntegrationUtil.GeneralTitleColor.iconBgcolor}
|
||||||
|
showDropIcon={true}
|
||||||
|
dropMenuDatas={this.getDropMenuDatas()}
|
||||||
|
dropMenuProps={{
|
||||||
|
collectParams: {
|
||||||
|
favname: `${getLabel("129787", "CoreMail集成")}`,
|
||||||
|
favouritetype: 1,
|
||||||
|
objid: 0,
|
||||||
|
link: "wui/engine.html#/integration/coremail",
|
||||||
|
importantlevel: 1
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<WeaTab ecId={`${this && this.props && this.props.ecId || ''}_WeaTab@hob4jk`}
|
||||||
|
advanceHeight={130}
|
||||||
|
buttonsAd={this.getSearchButtonsAd()}
|
||||||
|
searchsAd={this.getSearchAD()}
|
||||||
|
searchType={tabSelected == "2" ? ["advanced"] : ["base, advanced"]}
|
||||||
|
datas={this.getTab()}
|
||||||
|
keyParam="viewcondition" //主键
|
||||||
|
countParam="groupid" //数量
|
||||||
|
selectedKey={tabSelected}
|
||||||
|
showSearchAd={searchShow}
|
||||||
|
setShowSearchAd={e => setStatus("searchShow", e)}
|
||||||
|
hideSearchAd={() => setStatus("searchShow", false)}
|
||||||
|
onChange={v =>{this.resetSearchCondition(Number(v)); setStatus("tabSelected", Number(v))}}
|
||||||
|
onSearchChange={v => { this.doOnSearchChange(v); }}
|
||||||
|
onSearch={v => this.doOnSearch()}
|
||||||
|
searchsBaseValue={this.getSearchBaseValue()}
|
||||||
|
/>
|
||||||
|
|
||||||
|
{tabSelected === 0 &&
|
||||||
|
<WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@ehw850`}
|
||||||
|
hasOrder={true}
|
||||||
|
onOperatesClick={this.onOperatesClick}
|
||||||
|
comsWeaTableStore={tableStore}
|
||||||
|
needScroll={true}
|
||||||
|
getColumns={this.getColumns}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
{tabSelected === 1 && (
|
||||||
|
<div>
|
||||||
|
<Login ecId={`${this && this.props && this.props.ecId || ''}_Login@ycmft6`} source="coremail" />
|
||||||
|
</div>)}
|
||||||
|
{tabSelected === 2 && (
|
||||||
|
<div>
|
||||||
|
<WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@3wjlbl`}
|
||||||
|
hasOrder={true}
|
||||||
|
//onOperatesClick={this.onOperatesClick}
|
||||||
|
comsWeaTableStore={logFormTable}
|
||||||
|
needScroll={true}
|
||||||
|
//getColumns={this.redoColumnsByName}
|
||||||
|
/>
|
||||||
|
</div>)}
|
||||||
|
</WeaTop>
|
||||||
|
<AddOrEdit ecId={`${this && this.props && this.props.ecId || ''}_AddOrEdit@ezuot4`} />
|
||||||
|
<InitializedData ecId={`${this && this.props && this.props.ecId || ''}_InitializedData@zs9n6l`} showInit={showInitDia} initialList={initialList}/>
|
||||||
|
</Spin>
|
||||||
|
</WeaRightMenu>
|
||||||
|
</div>
|
||||||
|
: <NonStand ecId={`${this && this.props && this.props.ecId || ''}_NonStand@26lmlf`} />
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,108 @@
|
||||||
|
import React from "react";
|
||||||
|
import {inject, observer} from 'mobx-react';
|
||||||
|
import {WeaDialog,WeaSearchGroup,WeaProgress,WeaLocaleProvider,WeaNewScroll,WeaRightMenu} from "ecCom";
|
||||||
|
import {Button} from 'antd';
|
||||||
|
import "./style/default.css"
|
||||||
|
|
||||||
|
import SycnProcess from './sycnProcess'
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
@inject("coremailStore")
|
||||||
|
@inject('intelogin')
|
||||||
|
@observer
|
||||||
|
class InitializedData extends React.Component{
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.getButtons = this.getButtons.bind(this);
|
||||||
|
this.getRightMenus = this.getRightMenus.bind(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
componentWillUnmount() {
|
||||||
|
const {coremailStore:cs}= this.props;
|
||||||
|
cs.clearTimer();
|
||||||
|
}
|
||||||
|
|
||||||
|
getButtons(){
|
||||||
|
let buttons = [];
|
||||||
|
return buttons;
|
||||||
|
}
|
||||||
|
|
||||||
|
getRightMenus(){
|
||||||
|
let menus = [];
|
||||||
|
return menus;
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const footer = [];
|
||||||
|
const {coremailStore: cs} = this.props;
|
||||||
|
const {oncancelInit} = cs;
|
||||||
|
const {showInit} = this.props;
|
||||||
|
const moreBtn = {
|
||||||
|
datas: [
|
||||||
|
{
|
||||||
|
key: "1",
|
||||||
|
disabled: false,
|
||||||
|
icon: <i className="icon-coms-Clear"/>,
|
||||||
|
content: getLabel('309','关闭') ,
|
||||||
|
onClick: key => oncancelInit()
|
||||||
|
},
|
||||||
|
|
||||||
|
]
|
||||||
|
};
|
||||||
|
let {initialList} = this.props;
|
||||||
|
if (!initialList) {
|
||||||
|
initialList = [];
|
||||||
|
}
|
||||||
|
return <WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@6xd6gg`}
|
||||||
|
title={getLabel('506793','CoreMail集成初始化') }
|
||||||
|
icon="icon-coms-portal"
|
||||||
|
iconBgcolor='#1a57a0'
|
||||||
|
style={{width: 1050, height: 734, paddingTop: '16px'}}
|
||||||
|
zIndex={100}
|
||||||
|
buttons={footer}
|
||||||
|
hasScroll={true}
|
||||||
|
scalable
|
||||||
|
visible={showInit}
|
||||||
|
onCancel={() => oncancelInit()}
|
||||||
|
moreBtn={moreBtn}
|
||||||
|
buttons={this.getButtons()}
|
||||||
|
>
|
||||||
|
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@zu96fp`} datas={this.getRightMenus()}>
|
||||||
|
<WeaNewScroll ecId={`${this && this.props && this.props.ecId || ''}_WeaNewScroll@6zdgys`}
|
||||||
|
height={'100%'}
|
||||||
|
onScroll={(e) => {
|
||||||
|
this.setState({
|
||||||
|
scrollTop: e.target.scrollTop,
|
||||||
|
})
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{initialList.length>0?
|
||||||
|
initialList.map((item, idx) =>
|
||||||
|
<WeaSearchGroup ecId={`${this && this.props && this.props.ecId || ''}_WeaSearchGroup@rr4s6c@integrationCoremailInitisalizeData${idx}`} key={idx} title={item.title} style={{width: '100%', height: '210px'}}
|
||||||
|
showGroup={true}>
|
||||||
|
<div className={'int-initial-sycn-item'}>
|
||||||
|
<SycnProcess ecId={`${this && this.props && this.props.ecId || ''}_SycnProcess@vi2zyo@integrationCoremailInitisalizeDataSub${idx}`} type={1} syncData={item.subSyncProcess}/>
|
||||||
|
<SycnProcess ecId={`${this && this.props && this.props.ecId || ''}_SycnProcess@zp0gpp@integrationCoremailInitisalizeDataDept${idx}`} type={2} syncData={item.deptSyncProcess}/>
|
||||||
|
<SycnProcess ecId={`${this && this.props && this.props.ecId || ''}_SycnProcess@ffvh2i@integrationCoremailInitisalizeDataHr${idx}`} type={3} syncData={item.hrSyncProcess}/>
|
||||||
|
</div>
|
||||||
|
</WeaSearchGroup>
|
||||||
|
):<div style={{width: '100%',
|
||||||
|
height: '30px',
|
||||||
|
position: 'relative',
|
||||||
|
top: '50%',
|
||||||
|
textAlign: 'center',
|
||||||
|
marginTop: '-15px',
|
||||||
|
color: '#333333',
|
||||||
|
fontSize: '14px',}}>
|
||||||
|
{getLabel('506794','暂无同步数据!') }
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
</WeaNewScroll>
|
||||||
|
</WeaRightMenu>
|
||||||
|
</WeaDialog>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default InitializedData;
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
.int-initial-process{
|
||||||
|
margin:5px 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.int-initial-sycn-item{
|
||||||
|
width:80%;
|
||||||
|
margin:10px auto;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,49 @@
|
||||||
|
import React from "react"
|
||||||
|
import {WeaLocaleProvider, WeaProgress} from "ecCom";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
class SycnProcess extends React.Component{
|
||||||
|
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
|
||||||
|
const {type, syncData} = this.props;
|
||||||
|
if(!syncData){
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
let tempSyncData = Number(syncData);
|
||||||
|
let typeName = type === 1 ? getLabel('506795','分部同步') : type === 2 ? getLabel('506796','部门同步') : getLabel('386890','人员同步');
|
||||||
|
let stateName ="";
|
||||||
|
if(tempSyncData){
|
||||||
|
if(tempSyncData==100){
|
||||||
|
stateName = getLabel('506797', '同步结束');
|
||||||
|
}else if(tempSyncData==0){
|
||||||
|
stateName = getLabel('506798', '未同步');
|
||||||
|
}else if(tempSyncData==-1){
|
||||||
|
stateName = getLabel('508158','coremail未启用');
|
||||||
|
}else if(tempSyncData==-2){
|
||||||
|
stateName = getLabel('508159','coremail同步组织架构开关没开启');
|
||||||
|
}else if(tempSyncData==-3){
|
||||||
|
stateName = getLabel('508160','同步中出现异常');
|
||||||
|
}else if(tempSyncData>0&&tempSyncData<100){
|
||||||
|
stateName = getLabel('391133', '同步中');
|
||||||
|
}else{
|
||||||
|
stateName = getLabel('32104','异常');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return <div>
|
||||||
|
<div>{typeName}:{stateName}</div>
|
||||||
|
{ syncData === -1|| tempSyncData< 0 ? <div style={{height: '20px'}}></div> :
|
||||||
|
<WeaProgress ecId={`${this && this.props && this.props.ecId || ''}_WeaProgress@y2tqku`} className={"int-initial-process"} percent={tempSyncData ?tempSyncData:0}
|
||||||
|
strokeColor="#81C7FC"/>}
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
export default SycnProcess;
|
||||||
|
|
@ -0,0 +1,408 @@
|
||||||
|
/**
|
||||||
|
* @description 21.04.25 重构数据源功能
|
||||||
|
* @author fyj
|
||||||
|
*/
|
||||||
|
|
||||||
|
import React from "react";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { toJS } from "mobx";
|
||||||
|
import { Spin, Button } from "antd";
|
||||||
|
import { WeaSwitch } from "comsMobx";
|
||||||
|
import { WeaLocaleProvider, WeaSearchGroup, WeaRightMenu, WeaCheckbox, WeaDialog, WeaFormItem, WeaTools, WeaUpload } from "ecCom";
|
||||||
|
import { GeneralTitleColor, checkFormValidator, checkFieldValueUnique } from "../../util/IntegrationUtil.js";
|
||||||
|
import { checkTableFieldValueUnique } from "../../apis/CommonService";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
const { getKey } = WeaTools;
|
||||||
|
|
||||||
|
@inject("dataSource")
|
||||||
|
@observer
|
||||||
|
export default class CreateOrEditTask extends React.Component {
|
||||||
|
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
src: '/weaver/weaver.file.MakeValidateCode?notneedvalidate=1&isView=1&validatetype=0&validatenum=4',
|
||||||
|
num: 0,
|
||||||
|
collectParams: {
|
||||||
|
favname: getLabel("28051", "新建模板"),
|
||||||
|
favouritetype: 1,
|
||||||
|
objid: 0,
|
||||||
|
link: "wui/engine.html#/blogengine/templateSetCreate",
|
||||||
|
importantlevel: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取弹窗的标题
|
||||||
|
* @returns title
|
||||||
|
*/
|
||||||
|
getDialogTitle = () => {
|
||||||
|
const {
|
||||||
|
tab,
|
||||||
|
dataSourceType={},
|
||||||
|
dataSourceCreateAndEdit={}
|
||||||
|
} = this.props.dataSource;
|
||||||
|
|
||||||
|
if(0 === Number(tab.selectedKey)) {
|
||||||
|
return (dataSourceCreateAndEdit.isEdit ? getLabel(26473, "编辑") : getLabel(365, "新建")) + getLabel(385388, "数据源");
|
||||||
|
} else if(1 === Number(tab.selectedKey)) {
|
||||||
|
return (dataSourceType.isEdit ? getLabel(26473, "编辑") : getLabel(365, "新建")) + getLabel(15025, "数据库类型");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取弹窗内的按钮
|
||||||
|
* @returns buttons
|
||||||
|
*/
|
||||||
|
getDialogBtns = () => {
|
||||||
|
const { tab, rightmenus } = this.props.dataSource;
|
||||||
|
const whichRightMenu = [rightmenus.dataSource, rightmenus.dataSourceType][Number(tab.selectedKey)] || [];
|
||||||
|
|
||||||
|
return whichRightMenu.map(m => (
|
||||||
|
<Button
|
||||||
|
ecId={`${this && this.props && this.props.ecId || ''}_Button@integrationDataSourceEditDialogButton${m.type}`}
|
||||||
|
type="primary"
|
||||||
|
onClick={() => this.onRightMenuClick(m.type)}
|
||||||
|
>{`${m.menuName}`}</Button>
|
||||||
|
));
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取右键的操作菜单
|
||||||
|
* @returns buttons
|
||||||
|
*/
|
||||||
|
getDialogBtnsRightMenu = () => {
|
||||||
|
const { tab, rightmenus } = this.props.dataSource;
|
||||||
|
const whichRightMenu = [rightmenus.dataSource, rightmenus.dataSourceType][Number(tab.selectedKey)] || [];
|
||||||
|
|
||||||
|
return whichRightMenu.map(item => (
|
||||||
|
{
|
||||||
|
key: item.type,
|
||||||
|
icon: <i className={item.menuIcon} />,
|
||||||
|
content: item.menuName,
|
||||||
|
onClick: () => this.onRightMenuClick(item.type)
|
||||||
|
}
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
onRightMenuClick = (type) => {
|
||||||
|
switch (type) {
|
||||||
|
case "BTN_Save":
|
||||||
|
this.saveBaseInfo();
|
||||||
|
break;
|
||||||
|
case "BTN_Test":
|
||||||
|
this.saveBaseInfo(this.testSaveCallBack);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 表单保存之前的必填项处理
|
||||||
|
*/
|
||||||
|
hideFormRequiredFieldKey = () => {
|
||||||
|
const { dataSourceCreateAndEdit } = this.props.dataSource;
|
||||||
|
const { form } = dataSourceCreateAndEdit;
|
||||||
|
const params = form.getFormParams();
|
||||||
|
|
||||||
|
if (params.iscluster == '1') {
|
||||||
|
window.e9HideFormFieldKeys = ["host", "port", "dbname", "sortid"];
|
||||||
|
} else if(["gs", "dm"].includes(params.type)) {
|
||||||
|
window.e9HideFormFieldKeys = ["url", "dbname", "sortid"];
|
||||||
|
} else {
|
||||||
|
window.e9HideFormFieldKeys = ["url", "sortid"];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理保存时传递给后端的数据
|
||||||
|
* @returns params
|
||||||
|
*/
|
||||||
|
handleFormParams = () => {
|
||||||
|
const { dataSourceCreateAndEdit, source } = this.props.dataSource;
|
||||||
|
const { form } = dataSourceCreateAndEdit;
|
||||||
|
const params = form.getFormParams();
|
||||||
|
|
||||||
|
if(source) {
|
||||||
|
// 新建保存时添加 typename 分类
|
||||||
|
params.typename = source;
|
||||||
|
}
|
||||||
|
params.id = dataSourceCreateAndEdit.editId || '';
|
||||||
|
params.iscluster = (params.iscluster === "0" ? "1" : "2");
|
||||||
|
params.sortid = (typeof(params.sortid) === "object"
|
||||||
|
? params.sortid.join && params.sortid.join(",")
|
||||||
|
? params.sortid
|
||||||
|
: "0"
|
||||||
|
: params.sortid);
|
||||||
|
|
||||||
|
return params;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存
|
||||||
|
* @param {function} testSaveCallBack 测试函数
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
saveBaseInfo = (testSaveCallBack=null) => {
|
||||||
|
const { tab, dataSourceType, datasourceAPI, dataSourceCreateAndEdit } = this.props.dataSource;
|
||||||
|
const { form } = dataSourceCreateAndEdit;
|
||||||
|
// 获取 form 表单提交时传递给接口的数据
|
||||||
|
const params = this.handleFormParams();
|
||||||
|
|
||||||
|
if (Number(tab.selectedKey) === 0) {
|
||||||
|
if(/^(ecology)$/gi.test(params.pointid)) {
|
||||||
|
form.showError('pointid', getLabel('519109','ecology不允许作为数据源名称'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 隐藏必填项的校验
|
||||||
|
this.hideFormRequiredFieldKey();
|
||||||
|
|
||||||
|
checkFormValidator(form)
|
||||||
|
.then(() => {
|
||||||
|
let checkParams = {
|
||||||
|
tableName: 'datasourcesetting',
|
||||||
|
fieldName: 'pointid',
|
||||||
|
fieldValue: form.getFormParams().pointid.replace(/^(\s*)|(\s*)$/g, ''),
|
||||||
|
idName: 'id',
|
||||||
|
idValue: dataSourceCreateAndEdit.editId
|
||||||
|
};
|
||||||
|
return checkFieldValueUnique(checkParams, 1);
|
||||||
|
})
|
||||||
|
.then(title => {
|
||||||
|
if(title) {
|
||||||
|
form.showError('pointid', title);
|
||||||
|
} else {
|
||||||
|
if(dataSourceCreateAndEdit.isEdit || dataSourceType.isEdit) {
|
||||||
|
if(testSaveCallBack && typeof(testSaveCallBack) === "function") {
|
||||||
|
params.operate = 'test';
|
||||||
|
}
|
||||||
|
datasourceAPI().update(params, (result) => {
|
||||||
|
if(result.status != "false") {
|
||||||
|
typeof(this.props.saveCallBack) === "function" && this.props.saveCallBack(result);
|
||||||
|
}
|
||||||
|
}, typeof(testSaveCallBack) != "function");
|
||||||
|
} else {
|
||||||
|
datasourceAPI().insert(params, (result) => {
|
||||||
|
if(result.status != "false") {
|
||||||
|
typeof(this.props.saveCallBack) === "function" && this.props.saveCallBack(result);
|
||||||
|
typeof(testSaveCallBack) === "function" && testSaveCallBack(result.datasourcesettingid);
|
||||||
|
}
|
||||||
|
}, typeof(testSaveCallBack) != "function");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(reason => {
|
||||||
|
console.error(reason.message);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
testSaveCallBack = (datasourcesettingid) => {
|
||||||
|
const {
|
||||||
|
dataSourceCreateAndEdit,
|
||||||
|
datasourceAPI,
|
||||||
|
getForm
|
||||||
|
} = this.props.dataSource;
|
||||||
|
|
||||||
|
datasourceAPI().test({datasourcesettingid}, () => {
|
||||||
|
getForm({ id: datasourcesettingid });
|
||||||
|
dataSourceCreateAndEdit.isEdit = true;
|
||||||
|
dataSourceCreateAndEdit.editId = datasourcesettingid;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
getSearchs = (form, datas, hide) => {
|
||||||
|
const { isFormInit } = form;
|
||||||
|
const { isclusterAttr, dataSourceCreateAndEdit } = this.props.dataSource;
|
||||||
|
const group = [];
|
||||||
|
const formParams = form.getFormParams();
|
||||||
|
|
||||||
|
isFormInit && datas && datas.forEach((c, index) => {
|
||||||
|
const items = [];
|
||||||
|
c && c.items && c.items.forEach(fields => {
|
||||||
|
const key = fields.domkey[0];
|
||||||
|
|
||||||
|
if('driverfilename' !== key) {
|
||||||
|
items.push({
|
||||||
|
com: (
|
||||||
|
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@kv402k@integrationDataSourceEditForm${key}`}
|
||||||
|
label={`${fields.label}`}
|
||||||
|
labelCol={{ span: fields.labelcol }}
|
||||||
|
wrapperCol={{ span: fields.fieldcol }}
|
||||||
|
fieldType={fields.conditionType.toUpperCase()}
|
||||||
|
error={form.getError(fields)}
|
||||||
|
tipPosition="bottom"
|
||||||
|
>
|
||||||
|
{"iscluster" === key ?
|
||||||
|
<WeaCheckbox ecId={`${this && this.props && this.props.ecId || ''}_WeaCheckbox@nqhnaf@integrationDataSourceEditForm${key}`}
|
||||||
|
viewAttr={isclusterAttr == 0 ? 1 : 2}
|
||||||
|
value={formParams.iscluster}
|
||||||
|
helpfulTip={<div dangerouslySetInnerHTML={{__html: `SqlServer:<br/>jdbc:sqlserver://${getLabel('83578', '地址')}:${getLabel('84629', '端口')};DatabaseName=${getLabel('504419','数据库名')}<br/>Oracle:<br/>jdbc:oracle:thin:@${getLabel('83578', '地址')}:${getLabel('84629','端口')}:${getLabel('504419','数据库名')}<br/>MySQL:<br/>jdbc:mysql://${getLabel('83578', '地址')}:${getLabel('84629','端口')}/${getLabel('504419','数据库名')}?useUnicode=true&characterEncoding=utf8<br/>DB2:<br/>jdbc:db2://${getLabel('83578', '地址')}:${getLabel('84629','端口')}/${getLabel('504419','数据库名')}<br/>Sybase:<br/>jdbc:sybase:Tds:${getLabel('83578', '地址')}:${getLabel('84629','端口')}/${getLabel('504419','数据库名')}?charset=cp936<br/>Informix:<br/>jdbc:informix-sqli://${getLabel('83578', '地址')}:${getLabel('84629','端口')}/${getLabel('504419','数据库名')}:INFORMIXSERVER=myserver<br/>Hana:<br/>jdbc:sap://${getLabel('83578', '地址')}:${getLabel('84629','端口')}?reconnect=true`}} />} onChange={v => form.updateFields({iscluster: v})}
|
||||||
|
onChange={v => form.updateFields({iscluster: v})}
|
||||||
|
/>
|
||||||
|
: <WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@nwa05l@integrationDataSourceEditForm${fields.domkey[0]}`} fieldConfig={fields} form={form} formParams={formParams}
|
||||||
|
onChange={v => {
|
||||||
|
if(getKey(fields) === 'pointid') {
|
||||||
|
if(v.pointid && v.pointid.value) {
|
||||||
|
if(/^(ecology)$/gi.test(v.pointid.value)) {
|
||||||
|
form.showError('pointid', getLabel('519109','ecology不允许作为数据源名称') );
|
||||||
|
}else {
|
||||||
|
let checkParams = {
|
||||||
|
tableName: 'datasourcesetting',
|
||||||
|
fieldName: 'pointid',
|
||||||
|
fieldValue: form.getFormParams().pointid.replace(/^(\s*)|(\s*)$/g, ''),
|
||||||
|
idName: 'id',
|
||||||
|
idValue: dataSourceCreateAndEdit.editId
|
||||||
|
};
|
||||||
|
checkFieldValueUnique(checkParams, 1)
|
||||||
|
.then(title => {
|
||||||
|
if(title) {
|
||||||
|
form.showError('pointid', title);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else if(getKey(fields) === 'dbtype') {
|
||||||
|
let checkParams = {
|
||||||
|
tableName: 'datasource_type',
|
||||||
|
fieldName: 'dbtype',
|
||||||
|
fieldValue: form.getFormParams().dbtype.replace(/^(\s*)|(\s*)$/g, ''),
|
||||||
|
idName: 'id',
|
||||||
|
idValue: ''
|
||||||
|
};
|
||||||
|
checkTableFieldValueUnique(checkParams).then(result => {
|
||||||
|
if(result&&result.isNotUnique) {
|
||||||
|
form.showError('dbtype',getLabel('129943','名称已存在'));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
</WeaFormItem>),
|
||||||
|
colSpan: 1,
|
||||||
|
hide: form.isHide(fields, (keys, allParams) => {
|
||||||
|
if (hide) {
|
||||||
|
return hide(getKey(fields), keys, allParams)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}else if(getKey(fields) === 'driverfilename') {
|
||||||
|
if(fields.datas[0]) {
|
||||||
|
let params = fields.datas[0];
|
||||||
|
Object.assign(params, {imgSrc : ''})
|
||||||
|
}
|
||||||
|
items.push({
|
||||||
|
com:(<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@jus5vs@integrationDataSourceEditForm${fields.domkey[0]}`}
|
||||||
|
label={`${fields.label}`}
|
||||||
|
labelCol={{ span: fields.labelcol }}
|
||||||
|
wrapperCol={{ span: fields.fieldcol }}
|
||||||
|
fieldType={fields.conditionType.toUpperCase()}
|
||||||
|
error={form.getError(fields)}
|
||||||
|
tipPosition="bottom"
|
||||||
|
>
|
||||||
|
<WeaUpload ecId={`${this && this.props && this.props.ecId || ''}_WeaUpload@hyuz5q@integrationDataSourceEditForm${fields.domkey[0]}`}
|
||||||
|
uploadUrl={fields.uploadUrl}
|
||||||
|
category='string'
|
||||||
|
maxFilesNumber={1}
|
||||||
|
showClearAll={false}
|
||||||
|
datas={fields.datas}
|
||||||
|
getShowListDatas={(...arr) => {
|
||||||
|
if(arr[0].length === 0) {
|
||||||
|
document.querySelector('.wea-upload-container').style.display='block';
|
||||||
|
form.updateFields({
|
||||||
|
driverfilename:''
|
||||||
|
})
|
||||||
|
}else {
|
||||||
|
document.querySelector('.wea-upload-container').style.display='none';
|
||||||
|
form.updateFields({
|
||||||
|
driverfilename: `${arr[0][0].fileid}`
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</WeaFormItem>)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
group.push(
|
||||||
|
<WeaSearchGroup
|
||||||
|
ecId={`${this && this.props && this.props.ecId || ''}_WeaSearchGroup@x7p43b@integrationDataSourceEditForm${index}`}
|
||||||
|
center={index === 0 ? true : false}
|
||||||
|
col={1}
|
||||||
|
needTigger={true}
|
||||||
|
title={c.title}
|
||||||
|
showGroup={c.defaultshow}
|
||||||
|
items={items}
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
});
|
||||||
|
return group;
|
||||||
|
}
|
||||||
|
|
||||||
|
closeDialog = () => {
|
||||||
|
const { dataSourceCreateAndEdit, dataSourceType } = this.props.dataSource;
|
||||||
|
|
||||||
|
dataSourceCreateAndEdit.show = false;
|
||||||
|
dataSourceType.show = false;
|
||||||
|
this.setState({num: 0});
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { loading, dataSourceCreateAndEdit, tab, dataSourceType} = this.props.dataSource;
|
||||||
|
const {collectParams} = this.state;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@huvj7p`}
|
||||||
|
icon={GeneralTitleColor.icon}
|
||||||
|
iconBgcolor={GeneralTitleColor.iconBgcolor}
|
||||||
|
style={{ width: 700, height: 600 }}
|
||||||
|
hasScroll={true}
|
||||||
|
title={this.getDialogTitle()}
|
||||||
|
visible={
|
||||||
|
Number(tab.selectedKey) === 0
|
||||||
|
? dataSourceCreateAndEdit.show
|
||||||
|
: dataSourceType.show
|
||||||
|
}
|
||||||
|
onCancel={this.closeDialog}
|
||||||
|
buttons={this.getDialogBtns()}
|
||||||
|
moreBtn={{
|
||||||
|
datas: this.getDialogBtnsRightMenu(),
|
||||||
|
collectParams,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<WeaRightMenu
|
||||||
|
ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@gdwiwj`}
|
||||||
|
datas={this.getDialogBtnsRightMenu()}
|
||||||
|
collectParams={collectParams}
|
||||||
|
>
|
||||||
|
<Spin ecId={`${this && this.props && this.props.ecId || ''}_Spin@3c5f03`} spinning={loading}>
|
||||||
|
{
|
||||||
|
Number(tab.selectedKey) === 0
|
||||||
|
? this.getSearchs(
|
||||||
|
dataSourceCreateAndEdit.form,
|
||||||
|
toJS(dataSourceCreateAndEdit.conditions),
|
||||||
|
(key, b, c) => {
|
||||||
|
switch (key) {
|
||||||
|
case "host":
|
||||||
|
case "port":
|
||||||
|
return c.iscluster == 1;
|
||||||
|
case "url":
|
||||||
|
return c.iscluster == 0 || c.iscluster == 2;
|
||||||
|
case "dbname":
|
||||||
|
return c.iscluster == 1 || ["gs", "dm"].includes(c.type);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
: this.getSearchs(dataSourceType.form, toJS(dataSourceType.conditions))
|
||||||
|
}
|
||||||
|
</Spin>
|
||||||
|
</WeaRightMenu>
|
||||||
|
</WeaDialog>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,553 @@
|
||||||
|
/**
|
||||||
|
* @description 21.04.25 重构数据源功能
|
||||||
|
* @author fyj
|
||||||
|
*/
|
||||||
|
|
||||||
|
import React from "react";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { toJS } from "mobx";
|
||||||
|
import { WeaTableNew, WeaLogView } from "comsMobx";
|
||||||
|
import { getSearchBtns, getAdvancedItem, GeneralTitleColor, findOriginFromRoute, showDeleteDataConfirmDialog } from "../../util/IntegrationUtil.js";
|
||||||
|
import {
|
||||||
|
WeaLocaleProvider,
|
||||||
|
WeaRightMenu,
|
||||||
|
WeaTop,
|
||||||
|
WeaTab,
|
||||||
|
WeaLeftRightLayout,
|
||||||
|
} from "ecCom";
|
||||||
|
import { Button } from "antd";
|
||||||
|
import NoRight from "../../public/NoRight";
|
||||||
|
import CreateAndEdit from "./createAndEdit.js";
|
||||||
|
import OrganizationTree from '../../public/OrganizationTree';
|
||||||
|
|
||||||
|
const { WeaTable } = WeaTableNew;
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
const WeaLogViewComp = WeaLogView.Component;
|
||||||
|
|
||||||
|
@inject("dataSource")
|
||||||
|
@observer
|
||||||
|
export default class DataSource extends React.Component {
|
||||||
|
|
||||||
|
state = {
|
||||||
|
/** tabData, weatab 的 datas 属性值 */
|
||||||
|
tabData: [
|
||||||
|
{
|
||||||
|
title: getLabel("32264", "数据源设置"),
|
||||||
|
viewcondition: 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: getLabel("129690", "数据库类型设置"),
|
||||||
|
viewcondition: 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillMount() {
|
||||||
|
const {dataSource} = this.props;
|
||||||
|
dataSource.source = findOriginFromRoute();
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
this.init();
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps) {
|
||||||
|
if(nextProps.location.key != this.props.location.key) {
|
||||||
|
this.init();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面挂载后初始化数据,所有初始化的操作都在该方法中进行
|
||||||
|
*/
|
||||||
|
init = () => {
|
||||||
|
const { init } = this.props.dataSource;
|
||||||
|
init();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 分权刷新
|
||||||
|
refreshData = (id, type) => {
|
||||||
|
const {
|
||||||
|
dataSource
|
||||||
|
} = this.props, {
|
||||||
|
datasourceAPI,
|
||||||
|
tab,
|
||||||
|
} = dataSource;
|
||||||
|
|
||||||
|
// 如果点击的是分部
|
||||||
|
dataSource.subcompanyid = ('1' === type ? id : '');
|
||||||
|
if(tab.selectedKey == 0) {
|
||||||
|
datasourceAPI().getListConditions(() => {
|
||||||
|
dataSource.getList();
|
||||||
|
datasourceAPI().getListRightMenus();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getTabButtonsAd = () => {
|
||||||
|
const { dataSource } = this.props;
|
||||||
|
const { searchAdvance } = dataSource;
|
||||||
|
return getSearchBtns(
|
||||||
|
this.handleSearchFun,
|
||||||
|
() => searchAdvance.form.reset(),
|
||||||
|
() => searchAdvance.show = false,
|
||||||
|
this && this.props && this.props.ecId || '',
|
||||||
|
"integrationDatasource"
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
getSearchAD = () => {
|
||||||
|
const { dataSource } = this.props;
|
||||||
|
const { form, conditions=[] } = dataSource.searchAdvance;
|
||||||
|
return getAdvancedItem(
|
||||||
|
form,
|
||||||
|
toJS(conditions),
|
||||||
|
this.handleSearchFun,
|
||||||
|
false,
|
||||||
|
this && this.props && this.props.ecId || '',
|
||||||
|
"integrationDatasource"
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取删除按钮的 disabled
|
||||||
|
* @returns disabled 获取按钮的 disabled 状态
|
||||||
|
*/
|
||||||
|
getBtnDisabledStatus = () => {
|
||||||
|
const {
|
||||||
|
dataSourceTable,
|
||||||
|
dataSourceType,
|
||||||
|
tab,
|
||||||
|
} = this.props.dataSource;
|
||||||
|
|
||||||
|
if (Number(tab.selectedKey) === 0) {
|
||||||
|
return toJS(dataSourceTable.selectedRowKeys).length === 0;
|
||||||
|
} else {
|
||||||
|
return toJS(dataSourceType.table.selectedRowKeys).length === 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getWeaTopBtns = () => {
|
||||||
|
const { tab, dropMenuDatas } = this.props.dataSource;
|
||||||
|
|
||||||
|
const disable = this.getBtnDisabledStatus();
|
||||||
|
if (Number(tab.selectedKey) === 0) {
|
||||||
|
return toJS(dropMenuDatas) && toJS(dropMenuDatas).map((item, i) => {
|
||||||
|
if (i < 2) {
|
||||||
|
if (item.type === "BTN_BatchDelete") {
|
||||||
|
return (
|
||||||
|
<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@q0kyli@integrationDataSourceButton${item.type}`} onClick={() => this.onRightMenuClick(item.type)} type="primary" disabled={disable}>
|
||||||
|
{item.menuName}
|
||||||
|
</Button>
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
return (
|
||||||
|
<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@k178fv@integrationDataSourceButton${item.type}`} onClick={() => this.onRightMenuClick(item.type)} type="primary">
|
||||||
|
{item.menuName}
|
||||||
|
</Button>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
getDropMenuDatas = () => {
|
||||||
|
const { dropMenuDatas, tab, source } = this.props.dataSource;
|
||||||
|
const btnArr = [];
|
||||||
|
|
||||||
|
toJS(dropMenuDatas) && toJS(dropMenuDatas).forEach((item, i) => {
|
||||||
|
let disable = false;
|
||||||
|
if (item.type === "BTN_BatchDelete") {
|
||||||
|
disable = this.getBtnDisabledStatus();
|
||||||
|
}
|
||||||
|
if (Number(tab.selectedKey) === 1 && i<2) {
|
||||||
|
}else{
|
||||||
|
if(!(Number(tab.selectedKey) === 0 && source && item.type === "BTN_log")) {
|
||||||
|
btnArr.push({
|
||||||
|
key: item.type,
|
||||||
|
icon: <i className={item.menuIcon} />,
|
||||||
|
content: item.menuName,
|
||||||
|
disabled: disable,
|
||||||
|
onClick: () => this.onRightMenuClick(item.type)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
btnArr.push({
|
||||||
|
key: "BTN_COLUMN",
|
||||||
|
icon: <i className="icon-coms-Custom" />,
|
||||||
|
content: `${getLabel(32535, "显示列定制")}`,
|
||||||
|
onClick: () => this.onRightMenuClick("BTN_COLUMN")
|
||||||
|
});
|
||||||
|
return btnArr;
|
||||||
|
}
|
||||||
|
|
||||||
|
onRightMenuClick = (type, record) => {
|
||||||
|
switch (type) {
|
||||||
|
case "BTN_Insert":
|
||||||
|
this.createTask();
|
||||||
|
break;
|
||||||
|
case "BTN_EDIT":
|
||||||
|
this.doEditById(record);
|
||||||
|
break;
|
||||||
|
case "BTN_BatchDelete":
|
||||||
|
this.deleteData('batch');
|
||||||
|
break;
|
||||||
|
case "BTN_DEL":
|
||||||
|
this.deleteData('single', record);
|
||||||
|
break;
|
||||||
|
case "BTN_TEST":
|
||||||
|
this.test(record);
|
||||||
|
break;
|
||||||
|
case "BTN_log":
|
||||||
|
this.handleClickBtnLog(record);
|
||||||
|
break;
|
||||||
|
case "BTN_COLUMN":
|
||||||
|
this.handleClickBtnColumn();
|
||||||
|
break;
|
||||||
|
case "BTN_DOWNLOAD":
|
||||||
|
this.downloadDriver(record);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下载驱动
|
||||||
|
* @param {object} record 操作的当前数据
|
||||||
|
*/
|
||||||
|
downloadDriver = (record) => {
|
||||||
|
const driverfilename = record.driverfilename || '';
|
||||||
|
|
||||||
|
if(isNaN(driverfilename)){
|
||||||
|
window.location.href = (window.ecologyContentPath || "") + '/resource/DriverFile/'+driverfilename;
|
||||||
|
}else{
|
||||||
|
window.location.href = (window.ecologyContentPath || "") + "/weaver/weaver.file.FileDownload?fileid="+driverfilename+"&download=1";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 【编辑】按钮对应的事件
|
||||||
|
* @param {object} record
|
||||||
|
*/
|
||||||
|
doEditById = (record) => {
|
||||||
|
const { dataSourceCreateAndEdit, dataSourceType, getForm, tab } = this.props.dataSource;
|
||||||
|
|
||||||
|
getForm({ id: record.id });
|
||||||
|
if (Number(tab.selectedKey) === 0) {
|
||||||
|
dataSourceCreateAndEdit.show = true;
|
||||||
|
dataSourceCreateAndEdit.isEdit = true;
|
||||||
|
dataSourceCreateAndEdit.editId = record.id;
|
||||||
|
} else {
|
||||||
|
dataSourceType.show = true;
|
||||||
|
dataSourceType.isEdit = true;
|
||||||
|
dataSourceType.editId = record.id;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 【测试】 按钮的对应事件
|
||||||
|
*/
|
||||||
|
test = (record) => {
|
||||||
|
const { datasourceAPI } = this.props.dataSource;
|
||||||
|
|
||||||
|
datasourceAPI().listTest({ id: record.id });
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 【新建】按钮对应的事件
|
||||||
|
*/
|
||||||
|
createTask = () => {
|
||||||
|
const { dataSourceCreateAndEdit, dataSourceType, tab, getFormDataSource, getFormDataSourceType, datasourceAPI } = this.props.dataSource;
|
||||||
|
|
||||||
|
if (Number(tab.selectedKey) === 0) {
|
||||||
|
getFormDataSource({isEdit: "0"});
|
||||||
|
datasourceAPI().getFormRightMenus({isEdit: "0"});
|
||||||
|
dataSourceCreateAndEdit.isEdit = false;
|
||||||
|
dataSourceCreateAndEdit.show = true;
|
||||||
|
} else {
|
||||||
|
getFormDataSourceType();
|
||||||
|
dataSourceType.isEdit = false;
|
||||||
|
dataSourceType.show = true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 【批量删除】 按钮的对应事件
|
||||||
|
*/
|
||||||
|
deleteData = (type, record) => {
|
||||||
|
const {
|
||||||
|
dataSourceTable,
|
||||||
|
datasourceAPI,
|
||||||
|
datasourcetypeAPI,
|
||||||
|
dataSourceType,
|
||||||
|
tab
|
||||||
|
} = this.props.dataSource;
|
||||||
|
|
||||||
|
showDeleteDataConfirmDialog(type)
|
||||||
|
.then(() => {
|
||||||
|
if (Number(tab.selectedKey) === 0) {
|
||||||
|
if('single' === type) {
|
||||||
|
datasourceAPI().delete({ pointids: record.pointid, id: record.id });
|
||||||
|
} else {
|
||||||
|
datasourceAPI().batchDelete({
|
||||||
|
ids: toJS(dataSourceTable.selectedRowKeysAllPages)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if('single' === type) {
|
||||||
|
datasourcetypeAPI().delete({ id: record.id });
|
||||||
|
} else {
|
||||||
|
datasourcetypeAPI().batchDelete({
|
||||||
|
ids: toJS(dataSourceType.table.selectedRowKeysAllPages)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 【日志】按钮的对应事件
|
||||||
|
*/
|
||||||
|
handleClickBtnLog = (record = {id: ''}) => {
|
||||||
|
const {
|
||||||
|
toggleView,
|
||||||
|
setOperateIndex
|
||||||
|
} = this.props.dataSource;
|
||||||
|
|
||||||
|
setOperateIndex(record.id);
|
||||||
|
toggleView();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 【显示列定制】按钮的对应事件
|
||||||
|
*/
|
||||||
|
handleClickBtnColumn = () => {
|
||||||
|
const {
|
||||||
|
dataSourceType={},
|
||||||
|
tab,
|
||||||
|
dataSourceTable,
|
||||||
|
} = this.props.dataSource;
|
||||||
|
|
||||||
|
if (Number(tab.selectedKey) === 0) {
|
||||||
|
dataSourceTable.setColSetVisible(true);
|
||||||
|
dataSourceTable.tableColSet(true);
|
||||||
|
} else {
|
||||||
|
dataSourceType.table.setColSetVisible(true);
|
||||||
|
dataSourceType.table.tableColSet(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 切换 tab 时调用的事件
|
||||||
|
* @param {string} v 当前选中的 tab key
|
||||||
|
*/
|
||||||
|
handleChangeTab = v => {
|
||||||
|
const { dataSource } = this.props;
|
||||||
|
const { tab, datasourceAPI } = dataSource;
|
||||||
|
|
||||||
|
dataSource.subcompanyid = "";
|
||||||
|
tab.selectedKey = Number(v);
|
||||||
|
if(v == 0) {
|
||||||
|
datasourceAPI().getListConditions(() => {
|
||||||
|
dataSource.getList();
|
||||||
|
datasourceAPI().getListRightMenus();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
dataSource.getList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 快速搜索框输入值联动到 form 表单中
|
||||||
|
* @param {string} v 快速搜索框输入的值
|
||||||
|
*/
|
||||||
|
onSearchChange = v => {
|
||||||
|
const { searchAdvance } = this.props.dataSource;
|
||||||
|
searchAdvance.form.updateFields({pointid: v});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索事件
|
||||||
|
*/
|
||||||
|
handleSearchFun = () => {
|
||||||
|
const { dataSource } = this.props;
|
||||||
|
|
||||||
|
dataSource.searchAdvance.show = false;
|
||||||
|
dataSource.subcompanyid = dataSource.searchAdvance.form.getFormParams().subcomId;
|
||||||
|
dataSource.getList(true);
|
||||||
|
dataSource.datasourceAPI().getListRightMenus();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置高级搜索面板是否显示
|
||||||
|
* @param {boolean} e
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
setShowSearchAd = e => this.props.dataSource.searchAdvance.show = e;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 隐藏高级搜索的面板
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
hideSearchAd = () => this.props.dataSource.searchAdvance.show = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 每行数据的操作菜单
|
||||||
|
* @param {object} record
|
||||||
|
* @param {number} recordIndex
|
||||||
|
* @param {object} operate
|
||||||
|
* @param {number} opertaeIndex
|
||||||
|
*/
|
||||||
|
onOperatesClick = (record, recordIndex, operate, opertaeIndex) => {
|
||||||
|
const { tab } = this.props.dataSource;
|
||||||
|
const arr = Number(tab.selectedKey) === 0 ? ['BTN_EDIT', 'BTN_DEL', 'BTN_TEST', 'BTN_log'] : ['BTN_EDIT', 'BTN_EDIT', 'BTN_DEL', 'BTN_DOWNLOAD', 'BTN_log'];
|
||||||
|
|
||||||
|
this.onRightMenuClick(arr[Number(opertaeIndex)], record);
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重新渲染列
|
||||||
|
* @param {array} columns 列信息
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
redoColumnsByName = columns => {
|
||||||
|
const { tab, getTableList } = this.props.dataSource;
|
||||||
|
|
||||||
|
return columns.map(column => {
|
||||||
|
column.render = (text, record, index) => {
|
||||||
|
//前端元素转义
|
||||||
|
const valueSpan =
|
||||||
|
record[column.dataIndex] !== undefined
|
||||||
|
? record[column.dataIndex]
|
||||||
|
: record[column.dataIndex + "span"];
|
||||||
|
|
||||||
|
switch (column.dataIndex.toString()) {
|
||||||
|
case "pointid":
|
||||||
|
case "dbtype":
|
||||||
|
return (
|
||||||
|
<a
|
||||||
|
onClick={() => this.doEditById(record)}
|
||||||
|
dangerouslySetInnerHTML={{ __html: valueSpan }}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
case "type":
|
||||||
|
return (
|
||||||
|
<a
|
||||||
|
onClick={() => {
|
||||||
|
tab.selectedKey = 1;
|
||||||
|
getTableList(true);
|
||||||
|
doEditById({id : record.dbtypeid});
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{record.typespan}
|
||||||
|
</a>
|
||||||
|
);
|
||||||
|
case 'subcompanyid':
|
||||||
|
return (
|
||||||
|
<a
|
||||||
|
href={`${window.ecologyContentPath || ""}/spa/hrm/engine.html#/hrmengine/organization?showTree=false&isView=1&type=subcompany&id=${record.subcompanyid}`}
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
|
{record.subcompanyidspan}
|
||||||
|
</a>
|
||||||
|
);
|
||||||
|
default:
|
||||||
|
return (<div dangerouslySetInnerHTML={{ __html: valueSpan }} />);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return column;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 渲染列表页面
|
||||||
|
* @returns 渲染列表页面
|
||||||
|
*/
|
||||||
|
getWhichTable = () => {
|
||||||
|
const { tab, dataSourceTable, dataSourceType } = this.props.dataSource;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@cejcez${tab.selectedKey}`}
|
||||||
|
key={`table_${tab.selectedKey}`}
|
||||||
|
hasOrder={true}
|
||||||
|
onOperatesClick={this.onOperatesClick}
|
||||||
|
comsWeaTableStore={1 === Number(tab.selectedKey) ? dataSourceType.table : dataSourceTable}
|
||||||
|
needScroll={true}
|
||||||
|
getColumns={this.redoColumnsByName}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { dataSource } = this.props;
|
||||||
|
const {
|
||||||
|
searchAdvance,
|
||||||
|
tab,
|
||||||
|
loading,
|
||||||
|
logStore,
|
||||||
|
logView,
|
||||||
|
toggleView,
|
||||||
|
rightLoading,
|
||||||
|
operateIndex,
|
||||||
|
hasOrganization,
|
||||||
|
subcompanyid,
|
||||||
|
hasManageDetachableRight,
|
||||||
|
} = dataSource;
|
||||||
|
const formParams = searchAdvance.form.getFormParams();
|
||||||
|
|
||||||
|
return (rightLoading
|
||||||
|
? null
|
||||||
|
: <WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@m0qwze`} datas={(!hasManageDetachableRight && tab.selectedKey == 0) ? [] : this.getDropMenuDatas()}>
|
||||||
|
<WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@6490e1`}
|
||||||
|
loading={loading}
|
||||||
|
buttons={(!hasManageDetachableRight && tab.selectedKey == 0) ? [] : this.getWeaTopBtns()}
|
||||||
|
title={getLabel("32264", "数据源设置")}
|
||||||
|
icon={<i className={GeneralTitleColor.icon} />}
|
||||||
|
iconBgcolor={GeneralTitleColor.iconBgcolor}
|
||||||
|
showDropIcon={true}
|
||||||
|
dropMenuDatas={(!hasManageDetachableRight && tab.selectedKey == 0) ? [] : this.getDropMenuDatas()}
|
||||||
|
/>
|
||||||
|
<WeaLeftRightLayout ecId={`${this && this.props && this.props.ecId || ''}_WeaLeftRightLayout@wrom7f`}
|
||||||
|
showLeft={tab.selectedKey != "1" && hasOrganization && hasManageDetachableRight}
|
||||||
|
showBtn={tab.selectedKey != "1" && hasOrganization && hasManageDetachableRight}
|
||||||
|
leftCom={<OrganizationTree ecId={`${this && this.props && this.props.ecId || ''}_OrganizationTree@sqv1g0`}
|
||||||
|
ref="dataSource"
|
||||||
|
selectedKeys={[subcompanyid]}
|
||||||
|
refreshData={this.refreshData}
|
||||||
|
rightStr="intergration:datasourcesetting"
|
||||||
|
{...(this.props.orgTreeParams || {})}
|
||||||
|
/>}
|
||||||
|
>
|
||||||
|
<WeaTab ecId={`${this && this.props && this.props.ecId || ''}_WeaTab@uo2vuu`}
|
||||||
|
buttonsAd={this.getTabButtonsAd()}
|
||||||
|
searchsAd={this.getSearchAD()}
|
||||||
|
advanceHeight={searchAdvance.advanceHeight}
|
||||||
|
searchType={Number(tab.selectedKey) === 0 && hasManageDetachableRight && ["base, advanced"]}
|
||||||
|
datas={this.state.tabData}
|
||||||
|
keyParam="viewcondition"
|
||||||
|
selectedKey={tab.selectedKey}
|
||||||
|
showSearchAd={searchAdvance.show}
|
||||||
|
setShowSearchAd={this.setShowSearchAd}
|
||||||
|
onChange={this.handleChangeTab}
|
||||||
|
hideSearchAd={this.hideSearchAd}
|
||||||
|
searchsBaseValue={formParams.pointid}
|
||||||
|
onSearchChange={this.onSearchChange}
|
||||||
|
onSearch={this.handleSearchFun}
|
||||||
|
/>
|
||||||
|
{
|
||||||
|
(!hasManageDetachableRight && tab.selectedKey == 0)
|
||||||
|
? <NoRight ecId={`${this && this.props && this.props.ecId || ''}_NoRight@oje60c`} />
|
||||||
|
: this.getWhichTable()
|
||||||
|
}
|
||||||
|
</WeaLeftRightLayout>
|
||||||
|
<WeaLogViewComp ecId={`${this && this.props && this.props.ecId || ''}_WeaLogViewComp@f27l2w`} onCancel={toggleView} visible={logView} logStore={logStore} logType="15"
|
||||||
|
logSmallType={Number(tab.selectedKey) === 0 ? "2" : "3"}
|
||||||
|
targetId={operateIndex}
|
||||||
|
/>
|
||||||
|
<CreateAndEdit ecId={`${this && this.props && this.props.ecId || ''}_CreateAndEdit@3i7pyv`} />
|
||||||
|
</WeaRightMenu>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,353 @@
|
||||||
|
import React, {
|
||||||
|
Component
|
||||||
|
} from 'react';
|
||||||
|
import {
|
||||||
|
inject,
|
||||||
|
observer,
|
||||||
|
} from "mobx-react";
|
||||||
|
import {
|
||||||
|
WeaTab,
|
||||||
|
WeaLocaleProvider,
|
||||||
|
WeaButtonIcon,
|
||||||
|
} from "ecCom";
|
||||||
|
import {
|
||||||
|
WeaTableNew,
|
||||||
|
} from "comsMobx";
|
||||||
|
import {
|
||||||
|
getAdvancedItem,
|
||||||
|
getSearchBtns,
|
||||||
|
getForm,
|
||||||
|
onCheck,
|
||||||
|
checkUnique,
|
||||||
|
doConfirm,
|
||||||
|
} from "../../util/IntegrationUtil";
|
||||||
|
import DataShowDialog from "./DataShowDialog";
|
||||||
|
|
||||||
|
const {getLabel} = WeaLocaleProvider;
|
||||||
|
const {WeaTable} = WeaTableNew;
|
||||||
|
|
||||||
|
@inject("dataShowStore")
|
||||||
|
@observer
|
||||||
|
export default class CacheDataManage extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
searchType: ["base", "advanced"],
|
||||||
|
showSearchAd: false,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps) {
|
||||||
|
this.setState({
|
||||||
|
showSearchAd: false,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillMount() {
|
||||||
|
this.setState({
|
||||||
|
showSearchAd: false,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 详情页面
|
||||||
|
handleChange = (form, allParams, fields) => {
|
||||||
|
const key = fields.domkey[0];
|
||||||
|
|
||||||
|
if("keyid" === key) {
|
||||||
|
this.checkFlagUnique();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
checkFlagUnique = (callBack) => {
|
||||||
|
const {
|
||||||
|
dataShowStore,
|
||||||
|
} = this.props, {
|
||||||
|
newForm,
|
||||||
|
status,
|
||||||
|
} = dataShowStore, {
|
||||||
|
cacheDataDetailOperateInfo={},
|
||||||
|
cacheDataDialogTitle,
|
||||||
|
} = status, {
|
||||||
|
id,
|
||||||
|
} = cacheDataDetailOperateInfo;
|
||||||
|
|
||||||
|
let func = () => {
|
||||||
|
if(callBack && typeof(callBack) === "function") {
|
||||||
|
callBack();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
let fieldValue = newForm.getFormParams().keyid.replace(/^(\s*)|(\s*)$/g, '');
|
||||||
|
if(fieldValue) {
|
||||||
|
checkUnique({
|
||||||
|
tableName: cacheDataDialogTitle,
|
||||||
|
fieldName: 'keyid',
|
||||||
|
fieldValue,
|
||||||
|
idName: 'id',
|
||||||
|
idValue: id
|
||||||
|
}, newForm, "keyid", "8", "", func);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onDetailMenuClick = (type) => {
|
||||||
|
const {
|
||||||
|
dataShowStore,
|
||||||
|
} = this.props, {
|
||||||
|
newForm,
|
||||||
|
status,
|
||||||
|
} = dataShowStore, {
|
||||||
|
cacheDataDetailOperateInfo,
|
||||||
|
} = status;
|
||||||
|
|
||||||
|
if("BTN_SAVE" === type) {
|
||||||
|
onCheck(newForm, () => this.checkFlagUnique(() => {
|
||||||
|
dataShowStore.getDataShowCacheOperation({
|
||||||
|
...newForm.getFormParams(),
|
||||||
|
operate: cacheDataDetailOperateInfo ? "updateCache" : "addCache",
|
||||||
|
id: cacheDataDetailOperateInfo ? cacheDataDetailOperateInfo.id : "",
|
||||||
|
});
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Table的一些操作
|
||||||
|
onOperatesClick = (record, index, operate, flag) => {
|
||||||
|
this.onMenuClick(operate.index, record);
|
||||||
|
};
|
||||||
|
|
||||||
|
getColumnsInfo = (datas=[]) => {
|
||||||
|
return datas && datas.map(item => {
|
||||||
|
if("keyid" === item.dataIndex) {
|
||||||
|
item.render = (text, record) => <a onClick={() => this.onMenuClick("0", record)}>{text}</a>;
|
||||||
|
}
|
||||||
|
|
||||||
|
return item;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
getTabButtonsAd = () => {
|
||||||
|
return getSearchBtns(
|
||||||
|
this.handleSearchFun,
|
||||||
|
() => this.props.dataShowStore.cacheDataSearchForm.reset(),
|
||||||
|
() => this.setState({ showSearchAd: false }),
|
||||||
|
this && this.props && this.props.ecId || '',
|
||||||
|
"integrationDatashowCacheDataManage"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 高级搜索的搜索方法
|
||||||
|
handleSearchFun = () => {
|
||||||
|
const {
|
||||||
|
dataShowStore,
|
||||||
|
} = this.props;
|
||||||
|
|
||||||
|
dataShowStore.getCacheDataManageInfo();
|
||||||
|
this.setState({ showSearchAd: false });
|
||||||
|
}
|
||||||
|
|
||||||
|
getAdvancedSearch = () => {
|
||||||
|
const {
|
||||||
|
dataShowStore,
|
||||||
|
} = this.props, {
|
||||||
|
cacheDataSearchForm,
|
||||||
|
status,
|
||||||
|
} = dataShowStore, {
|
||||||
|
cacheDataSearchCondition,
|
||||||
|
} = status;
|
||||||
|
return getAdvancedItem(cacheDataSearchForm, cacheDataSearchCondition, this.handleSearchFun, false, this && this.props && this.props.ecId || '', "integrationDatashowCacheDataManage");
|
||||||
|
};
|
||||||
|
|
||||||
|
onSearchChange = (value) => {
|
||||||
|
const {
|
||||||
|
dataShowStore,
|
||||||
|
} = this.props, {
|
||||||
|
cacheDataSearchForm,
|
||||||
|
} = dataShowStore;
|
||||||
|
|
||||||
|
cacheDataSearchForm.updateFields({key: value});
|
||||||
|
}
|
||||||
|
|
||||||
|
getSearchBaseValue = () => {
|
||||||
|
const {
|
||||||
|
dataShowStore,
|
||||||
|
} = this.props, {
|
||||||
|
cacheDataSearchForm,
|
||||||
|
} = dataShowStore, {
|
||||||
|
key,
|
||||||
|
} = cacheDataSearchForm.getFormParams();
|
||||||
|
|
||||||
|
return key;
|
||||||
|
}
|
||||||
|
|
||||||
|
setShowSearchAd = bool => this.setState({showSearchAd: bool});
|
||||||
|
|
||||||
|
hideSearchAd = () => this.setState({showSearchAd: false});
|
||||||
|
|
||||||
|
onMenuClick = (type, record) => {
|
||||||
|
const {
|
||||||
|
dataShowStore,
|
||||||
|
} = this.props, {
|
||||||
|
cacheDataTableStore,
|
||||||
|
status,
|
||||||
|
} = dataShowStore, {
|
||||||
|
selectedRowKeys,
|
||||||
|
} = cacheDataTableStore, {
|
||||||
|
cacheDataOperateInfo={},
|
||||||
|
} = status;
|
||||||
|
|
||||||
|
let id = record ? record.id : selectedRowKeys;
|
||||||
|
|
||||||
|
if("BTN_NEW" === type) {
|
||||||
|
dataShowStore.setState({
|
||||||
|
cacheDataManageDetailVisible: true,
|
||||||
|
cacheDataDetailOperateInfo: "",
|
||||||
|
});
|
||||||
|
|
||||||
|
dataShowStore.getDataShowCacheDataForm({browsertype: cacheDataOperateInfo ? cacheDataOperateInfo.showname : ""});
|
||||||
|
} else if("BTN_DEL" === type || "1" === type) {
|
||||||
|
let title = getLabel(385625, '确定要删除选择的记录吗?');
|
||||||
|
|
||||||
|
if("1" === type) {
|
||||||
|
title = getLabel(15097, '确定要删除吗?');
|
||||||
|
}
|
||||||
|
doConfirm(title, dataShowStore.getDataShowCacheOperation, {operate: "delCache", id, browsertype: cacheDataOperateInfo ? cacheDataOperateInfo.showname : ""});
|
||||||
|
} else if("BTN_COLUMN" === type) {
|
||||||
|
cacheDataTableStore.setColSetVisible(true);
|
||||||
|
cacheDataTableStore.tableColSet(true);
|
||||||
|
} else if("0" === type) {
|
||||||
|
dataShowStore.setState({
|
||||||
|
cacheDataManageDetailVisible: true,
|
||||||
|
cacheDataDetailOperateInfo: record,
|
||||||
|
});
|
||||||
|
|
||||||
|
dataShowStore.getDataShowCacheDataForm({
|
||||||
|
browsertype: cacheDataOperateInfo ? cacheDataOperateInfo.showname : "",
|
||||||
|
id,
|
||||||
|
browsertype: cacheDataOperateInfo ? cacheDataOperateInfo.showname : "",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getRightMenus = (datas=[]) => {
|
||||||
|
const {
|
||||||
|
dataShowStore,
|
||||||
|
} = this.props, {
|
||||||
|
selectedRowKeys,
|
||||||
|
} = dataShowStore.cacheDataTableStore;
|
||||||
|
|
||||||
|
let rightMenus = datas && datas.map(item => {
|
||||||
|
if(item.type === "BTN_DEL") {
|
||||||
|
item.disabled = selectedRowKeys.length === 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
key: item.type,
|
||||||
|
icon: <i className={item.menuIcon} />,
|
||||||
|
content: item.menuName,
|
||||||
|
onClick: () => this.onMenuClick(item.type),
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
rightMenus.push({
|
||||||
|
key: "BTN_COLUMN",
|
||||||
|
icon: <i className="icon-coms-Custom" />,
|
||||||
|
content: getLabel(32535, "显示列定制"),
|
||||||
|
onClick: () => this.onMenuClick("BTN_COLUMN"),
|
||||||
|
})
|
||||||
|
|
||||||
|
return rightMenus || [];
|
||||||
|
}
|
||||||
|
|
||||||
|
getButtons = (datas=[]) => {
|
||||||
|
const {
|
||||||
|
dataShowStore,
|
||||||
|
} = this.props, {
|
||||||
|
selectedRowKeys,
|
||||||
|
} = dataShowStore.cacheDataTableStore;
|
||||||
|
|
||||||
|
return datas && datas.map(item => <WeaButtonIcon ecId={`${this && this.props && this.props.ecId || ''}_WeaButtonIcon@q5dgm5@DatashowCacheDetail${item.type}`}
|
||||||
|
disabled={item.type === "BTN_DEL" && selectedRowKeys.length === 0}
|
||||||
|
buttonType={item.type === "BTN_NEW" ? "add" : item.type === "BTN_DEL" ? "del" : ""}
|
||||||
|
type="primary"
|
||||||
|
onClick={() => this.onMenuClick(item.type)}
|
||||||
|
/>);
|
||||||
|
}
|
||||||
|
|
||||||
|
onCancel = () => {
|
||||||
|
const {
|
||||||
|
dataShowStore,
|
||||||
|
} = this.props;
|
||||||
|
|
||||||
|
dataShowStore.setState({
|
||||||
|
cacheDataManageVisible: false,
|
||||||
|
cacheDataOperateInfo: "",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const {
|
||||||
|
dataShowStore,
|
||||||
|
} = this.props, {
|
||||||
|
status,
|
||||||
|
cacheDataTableStore,
|
||||||
|
newForm,
|
||||||
|
cleanCacheDetailDialogStore,
|
||||||
|
} = dataShowStore, {
|
||||||
|
cacheDataManageVisible,
|
||||||
|
menus=[],
|
||||||
|
cacheDataDialogTitle,
|
||||||
|
cacheDataSearchAdvancedHeight,
|
||||||
|
cacheDataManageDetailVisible,
|
||||||
|
cacheDetailMenus=[],
|
||||||
|
cacheDataDetailOperateInfo,
|
||||||
|
dataShowFormFields,
|
||||||
|
tabButtonDisabled,
|
||||||
|
} = status, {
|
||||||
|
searchType,
|
||||||
|
showSearchAd,
|
||||||
|
} = this.state;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<DataShowDialog ecId={`${this && this.props && this.props.ecId || ''}_DataShowDialog@drxedj`}
|
||||||
|
title={`【${cacheDataDialogTitle}】` + getLabel('525809','缓存数据管理')}
|
||||||
|
visible={cacheDataManageVisible}
|
||||||
|
menus={[]}
|
||||||
|
rightMenus={this.getRightMenus(menus)}
|
||||||
|
onCancel={this.onCancel}
|
||||||
|
>
|
||||||
|
<WeaTab ecId={`${this && this.props && this.props.ecId || ''}_WeaTab@y8o09n`}
|
||||||
|
buttons={this.getButtons(menus)}
|
||||||
|
searchType={searchType}
|
||||||
|
searchsBaseValue={this.getSearchBaseValue()}
|
||||||
|
advanceHeight={cacheDataSearchAdvancedHeight}
|
||||||
|
searchsAd={this.getAdvancedSearch()}
|
||||||
|
buttonsAd={this.getTabButtonsAd()}
|
||||||
|
showSearchAd={showSearchAd}
|
||||||
|
setShowSearchAd={this.setShowSearchAd}
|
||||||
|
hideSearchAd={this.hideSearchAd}
|
||||||
|
onSearch={this.handleSearchFun}
|
||||||
|
onSearchChange={this.onSearchChange}
|
||||||
|
/>
|
||||||
|
<WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@az504w`}
|
||||||
|
comsWeaTableStore={cacheDataTableStore}
|
||||||
|
hasOrder={true}
|
||||||
|
needScroll={true}
|
||||||
|
onOperatesClick={this.onOperatesClick}
|
||||||
|
getColumns={this.getColumnsInfo}
|
||||||
|
/>
|
||||||
|
<DataShowDialog ecId={`${this && this.props && this.props.ecId || ''}_DataShowDialog@apbrry`}
|
||||||
|
title={cacheDataDetailOperateInfo ? getLabel('527403','编辑缓存数据') : getLabel('527402','新建缓存数据')}
|
||||||
|
visible={cacheDataManageDetailVisible}
|
||||||
|
disabled={tabButtonDisabled}
|
||||||
|
style={{width: 600, height: 400}}
|
||||||
|
menus={cacheDetailMenus}
|
||||||
|
onMenuClick={this.onDetailMenuClick}
|
||||||
|
onCancel={cleanCacheDetailDialogStore}
|
||||||
|
>
|
||||||
|
{getForm(newForm, dataShowFormFields, true, this.handleChange)}
|
||||||
|
</DataShowDialog>
|
||||||
|
</DataShowDialog>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,74 @@
|
||||||
|
import React, {
|
||||||
|
Component
|
||||||
|
} from 'react';
|
||||||
|
import {
|
||||||
|
WeaDialog,
|
||||||
|
WeaRightMenu,
|
||||||
|
} from "ecCom";
|
||||||
|
import {
|
||||||
|
Button,
|
||||||
|
} from "antd";
|
||||||
|
|
||||||
|
export default class DataShowDialog extends Component {
|
||||||
|
|
||||||
|
getButton = () => {
|
||||||
|
const {menus=[], disabled} = this.props;
|
||||||
|
return menus && menus.map(item => <Button ecId={`${this && this.props && this.props.ecId || ''}_Button@61fqte@DatashowDialogButton${item.key || item.type}`}
|
||||||
|
key={item.key || item.type}
|
||||||
|
type={"primary"}
|
||||||
|
disabled={disabled}
|
||||||
|
onClick={() => this.onMenuClick(item.key || item.type)}
|
||||||
|
>{item.content || item.menuName}</Button>);
|
||||||
|
}
|
||||||
|
|
||||||
|
getMenus = () => {
|
||||||
|
const {menus=[], disabled} = this.props;
|
||||||
|
return menus && menus.map(item => {
|
||||||
|
return {
|
||||||
|
key: item.key || item.type,
|
||||||
|
icon: <i className={item.icon || item.menuIcon} />,
|
||||||
|
content: item.content || item.menuName,
|
||||||
|
disabled,
|
||||||
|
onClick: () => this.onMenuClick(item.key || item.type),
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
onMenuClick = (type) => {
|
||||||
|
if(this.props.onMenuClick && typeof(this.props.onMenuClick) === "function") {
|
||||||
|
this.props.onMenuClick(type);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onCancel = () => {
|
||||||
|
if(this.props.onCancel && typeof(this.props.onCancel) === "function") {
|
||||||
|
this.props.onCancel();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
return (
|
||||||
|
<WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@1cf1pj`}
|
||||||
|
visible={this.props.visible}
|
||||||
|
title={this.props.title}
|
||||||
|
moduleName={"integration"}
|
||||||
|
style={this.props.style || {width: 800, height: 600}}
|
||||||
|
hasScroll
|
||||||
|
onCancel={this.onCancel}
|
||||||
|
buttons={this.getButton()}
|
||||||
|
moreBtn={{
|
||||||
|
datas: this.getMenus(),
|
||||||
|
collectParams: [],
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@1kn5e9`}
|
||||||
|
datas={this.props.rightMenus || this.getMenus()}
|
||||||
|
collectParams={[]}
|
||||||
|
>
|
||||||
|
{this.props.children}
|
||||||
|
</WeaRightMenu>
|
||||||
|
</WeaDialog>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,244 @@
|
||||||
|
import React from "react";
|
||||||
|
import {inject, observer} from "mobx-react";
|
||||||
|
import {Button, Row} from "antd";
|
||||||
|
import {toJS} from "mobx";
|
||||||
|
import {
|
||||||
|
WeaSearchGroup,
|
||||||
|
WeaRightMenu,
|
||||||
|
WeaDialog,
|
||||||
|
WeaLocaleProvider,
|
||||||
|
WeaHelpfulTip,
|
||||||
|
WeaTable as WeaTableTest,
|
||||||
|
WeaTab,
|
||||||
|
WeaNewScroll,
|
||||||
|
} from "ecCom";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
@inject("dataShowStore")
|
||||||
|
@observer
|
||||||
|
export default class IndexTestDialog extends React.Component {
|
||||||
|
|
||||||
|
getTest = () => {
|
||||||
|
const {dataShowStore} = this.props;
|
||||||
|
const {status} = dataShowStore;
|
||||||
|
const {testInitDatas} = toJS(status);
|
||||||
|
let testTitle = {
|
||||||
|
"base": getLabel(82751, "基础设置"),
|
||||||
|
"field": getLabel(21903, "字段设置"),
|
||||||
|
};
|
||||||
|
let group = [];
|
||||||
|
for (let key in testInitDatas) {
|
||||||
|
let items = [];
|
||||||
|
items.push({
|
||||||
|
com: (<Row ecId={`${this && this.props && this.props.ecId || ''}_Row@20e39c@integrationDatashow${key}`}>
|
||||||
|
<WeaTableTest ecId={`${this && this.props && this.props.ecId || ''}_WeaTableTest@9ov0tf@integrationDatashow${key}`}
|
||||||
|
columns={this.getColumns()}
|
||||||
|
dataSource={testInitDatas[key]}
|
||||||
|
pagination={false}
|
||||||
|
/></Row>),
|
||||||
|
colSpan: 1
|
||||||
|
});
|
||||||
|
group.push(<WeaSearchGroup ecId={`${this && this.props && this.props.ecId || ''}_WeaSearchGroup@q1kukj@integrationDatashow${key}`} col={1} needTigger={true} showGroup={true} title={testTitle[key]} items={items}/>);
|
||||||
|
}
|
||||||
|
return group;
|
||||||
|
};
|
||||||
|
|
||||||
|
getColumns = () => {
|
||||||
|
let columns = [
|
||||||
|
{
|
||||||
|
"title":getLabel(511410, "测试项"),
|
||||||
|
"dataIndex": "name",
|
||||||
|
"key": "name",
|
||||||
|
"width": "30%",
|
||||||
|
"sorter": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": getLabel(509969, "测试内容"),
|
||||||
|
"dataIndex": "content",
|
||||||
|
"key": "content",
|
||||||
|
"width": "40%",
|
||||||
|
"sorter": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": getLabel(503912, "测试结果"),
|
||||||
|
"dataIndex": "status",
|
||||||
|
"key": "status",
|
||||||
|
"width": "30%",
|
||||||
|
"sorter": true
|
||||||
|
}
|
||||||
|
];
|
||||||
|
let datas = [];
|
||||||
|
columns && columns.forEach(column => {
|
||||||
|
if(column['key'] === 'status') {
|
||||||
|
datas.push({
|
||||||
|
dataIndex: column['dataIndex'],
|
||||||
|
key: column['key'],
|
||||||
|
sorter: column['sorter'],
|
||||||
|
title: column['title'],
|
||||||
|
width: column['width'],
|
||||||
|
render: (text, record) => {
|
||||||
|
if(text == '1') {
|
||||||
|
return <span style={{color: 'green'}}>√</span>
|
||||||
|
}else if(text == '0') {
|
||||||
|
return <nobr><span style={{color: 'red'}}>×</span>{record.details !== undefined ? <WeaHelpfulTip ecId={`${this && this.props && this.props.ecId || ''}_WeaHelpfulTip@6rft03`} style={{marginLeft: 10}} width={195} title={record.details}/> : ''}</nobr>
|
||||||
|
}else if(text == '2') {
|
||||||
|
return <nobr><span style={{color: '#FAA825'}}>!</span>{record.details !== undefined ? <WeaHelpfulTip ecId={`${this && this.props && this.props.ecId || ''}_WeaHelpfulTip@rw70bp`} style={{marginLeft: 10}} width={195} title={record.details}/> : ''}</nobr>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
datas.push({
|
||||||
|
dataIndex: column['dataIndex'],
|
||||||
|
key: column['key'],
|
||||||
|
sorter: column['sorter'],
|
||||||
|
title: column['title'],
|
||||||
|
width: column['width'],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return datas;
|
||||||
|
};
|
||||||
|
|
||||||
|
getTable = () => {
|
||||||
|
let topinfo = {
|
||||||
|
"tab": {
|
||||||
|
"datas": [
|
||||||
|
{
|
||||||
|
"title": getLabel(82743, "基础信息"),
|
||||||
|
"key": "base"
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"keyParam": "key",
|
||||||
|
"selectedKey": "base",
|
||||||
|
"advanceHeight": "123"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
if (topinfo && topinfo.tab) {
|
||||||
|
return (<WeaTab ecId={`${this && this.props && this.props.ecId || ''}_WeaTab@d7xt1d`} {...topinfo.tab}/>);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
getButtons = () => {
|
||||||
|
const {dataShowStore} = this.props;
|
||||||
|
const {dataShowFormHiddenFields} = toJS(dataShowStore.status);
|
||||||
|
let id = dataShowFormHiddenFields.id || "";
|
||||||
|
let buttoninfo = [
|
||||||
|
{
|
||||||
|
"btnName": getLabel(501169, "编辑"),
|
||||||
|
"btnType": "primary",
|
||||||
|
"type": "BTN_EDIT"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
let btnArr = [];
|
||||||
|
buttoninfo && buttoninfo.forEach(b => {
|
||||||
|
btnArr.push(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@exvmf4@integrationDatashowButton${b.key || "newAdd"}`} type={b.btnType} onClick={() =>{
|
||||||
|
dataShowStore.initIndexTestDialog();
|
||||||
|
dataShowStore.initSqlTestForm();
|
||||||
|
// dataShowStore.newForm.reset();
|
||||||
|
// dataShowStore.getDataShowEditForm({ id: id});
|
||||||
|
dataShowStore.setState({ showNewFormDialog: true });
|
||||||
|
}
|
||||||
|
}>
|
||||||
|
{b.btnName}
|
||||||
|
</Button>
|
||||||
|
);
|
||||||
|
});
|
||||||
|
return btnArr;
|
||||||
|
};
|
||||||
|
|
||||||
|
getMoreBtn = () => {
|
||||||
|
const {dataShowStore} = this.props;
|
||||||
|
const {dataShowFormHiddenFields} = toJS(dataShowStore.status);
|
||||||
|
let id = dataShowFormHiddenFields.id || "";
|
||||||
|
let moreBtninfo = [
|
||||||
|
{
|
||||||
|
"key": "1",
|
||||||
|
"type": "BTN_EDIT",
|
||||||
|
"icon": "icon-coms-Preservation",
|
||||||
|
"btnName": getLabel(501169, "编辑"),
|
||||||
|
}
|
||||||
|
];
|
||||||
|
let btnArr = [];
|
||||||
|
moreBtninfo && moreBtninfo.forEach(m => {
|
||||||
|
btnArr.push({
|
||||||
|
key: m.key,
|
||||||
|
icon: <i className={m.icon}/>,
|
||||||
|
content: m.btnName,
|
||||||
|
onClick: () =>{
|
||||||
|
dataShowStore.initIndexTestDialog();
|
||||||
|
dataShowStore.initSqlTestForm();
|
||||||
|
dataShowStore.newForm.reset();
|
||||||
|
dataShowStore.getDataShowEditForm({ id: id});
|
||||||
|
dataShowStore.setState({ showNewFormDialog: true });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
return btnArr;
|
||||||
|
};
|
||||||
|
|
||||||
|
getRightMenu = () => {
|
||||||
|
const {dataShowStore} = this.props;
|
||||||
|
const {dataShowFormHiddenFields} = toJS(dataShowStore.status);
|
||||||
|
let id = dataShowFormHiddenFields.id || "";
|
||||||
|
let menuinfo = [
|
||||||
|
{
|
||||||
|
"menuIcon": "icon-coms-Preservation",
|
||||||
|
"isTop": "1",
|
||||||
|
"menuName": getLabel(501169, "编辑"),
|
||||||
|
"isControl": "0",
|
||||||
|
"type": "BTN_EDIT"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
let btnArr = [];
|
||||||
|
menuinfo && menuinfo.forEach(m => {
|
||||||
|
btnArr.push({
|
||||||
|
key: m.type,
|
||||||
|
icon: <i className={m.menuIcon}/>,
|
||||||
|
content: m.menuName,
|
||||||
|
onClick: () => {
|
||||||
|
dataShowStore.initIndexTestDialog();
|
||||||
|
dataShowStore.initSqlTestForm();
|
||||||
|
dataShowStore.newForm.reset();
|
||||||
|
dataShowStore.getDataShowEditForm({ id: id});
|
||||||
|
dataShowStore.setState({ showNewFormDialog: true });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
return btnArr;
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const {dataShowStore, showTestVersion} = this.props;
|
||||||
|
return (
|
||||||
|
<WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@euc1kg`}
|
||||||
|
title={getLabel( '507567' ,'数据展现集成测试')}
|
||||||
|
icon={"icon-coms-integration"}
|
||||||
|
iconBgcolor={"#1a57a0"}
|
||||||
|
style={{width: 800, height: 600}}
|
||||||
|
visible={showTestVersion}
|
||||||
|
hasScroll={true}
|
||||||
|
onCancel={() => {
|
||||||
|
dataShowStore.initIndexTestDialog();
|
||||||
|
dataShowStore.initSqlTestForm();
|
||||||
|
}}
|
||||||
|
buttons={this.getButtons()}
|
||||||
|
moreBtn={{
|
||||||
|
datas: this.getMoreBtn(),
|
||||||
|
collectParams: []
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
|
||||||
|
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@2ft6pu`} datas={this.getRightMenu()} collectParams={[]}>
|
||||||
|
{this.getTable()}
|
||||||
|
<WeaNewScroll ecId={`${this && this.props && this.props.ecId || ''}_WeaNewScroll@gqeb3s`} height={550}>
|
||||||
|
{this.getTest()}
|
||||||
|
</WeaNewScroll>
|
||||||
|
</WeaRightMenu>
|
||||||
|
|
||||||
|
</WeaDialog>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,174 @@
|
||||||
|
import React from "react";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { Button } from "antd";
|
||||||
|
import { toJS } from "mobx";
|
||||||
|
import { WeaSwitch } from "comsMobx";
|
||||||
|
import {
|
||||||
|
WeaSearchGroup,
|
||||||
|
WeaFormItem,
|
||||||
|
WeaRightMenu,
|
||||||
|
WeaDialog,
|
||||||
|
WeaLocaleProvider
|
||||||
|
} from "ecCom";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
@inject("dataShowStore")
|
||||||
|
@observer
|
||||||
|
export default class NewE7Form extends React.Component {
|
||||||
|
constructor (props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {}
|
||||||
|
}
|
||||||
|
|
||||||
|
getBtns = () => {
|
||||||
|
const {
|
||||||
|
dataShowStore
|
||||||
|
} = this.props, {
|
||||||
|
menus=[],
|
||||||
|
buttonDisabled,
|
||||||
|
} = dataShowStore.status;
|
||||||
|
return menus && menus.map(item => <Button
|
||||||
|
ecId={`${this && this.props && this.props.ecId || ''}_Button@o7z8fq@integrationDatashowNewE7FormButton${item.key}`}
|
||||||
|
type='primary'
|
||||||
|
disabled={buttonDisabled}
|
||||||
|
onClick={() => this.onRightMenuClick(item.key)}
|
||||||
|
>{item.content}</Button>);
|
||||||
|
}
|
||||||
|
|
||||||
|
getRightMenu = () => {
|
||||||
|
const {
|
||||||
|
dataShowStore
|
||||||
|
} = this.props, {
|
||||||
|
menus=[],
|
||||||
|
buttonDisabled
|
||||||
|
} = dataShowStore.status;
|
||||||
|
|
||||||
|
return menus && menus.map(item => {
|
||||||
|
return {
|
||||||
|
key: item.key,
|
||||||
|
icon: <i className='icon-coms-Preservation'/>,
|
||||||
|
content : item.content,
|
||||||
|
disabled: buttonDisabled,
|
||||||
|
onClick : () => this.onRightMenuClick(item.key)
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
onRightMenuClick = (type) => {
|
||||||
|
const {dataShowStore} = this.props;
|
||||||
|
const {newE7Form, status} = dataShowStore;
|
||||||
|
const {dataShowE7FormHiddenFields} = toJS(status);
|
||||||
|
|
||||||
|
|
||||||
|
if(type == 'BTN_SAVE'){
|
||||||
|
newE7Form.validateForm().then(f=>{
|
||||||
|
if(f.isValid){
|
||||||
|
//合并hiddenfield参数
|
||||||
|
let params = Object.assign(dataShowE7FormHiddenFields, newE7Form.getFormParams());
|
||||||
|
params.method = "add";
|
||||||
|
dataShowStore.getDataShowOperation4E7(params);
|
||||||
|
}else{
|
||||||
|
f.showErrors();
|
||||||
|
this.setState({date: new Date()});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getSearchs = () => {
|
||||||
|
const {dataShowStore} = this.props;
|
||||||
|
const {newE7Form, status} = dataShowStore;
|
||||||
|
const {dataShowE7FormFields} = toJS(status);
|
||||||
|
const {isFormInit} = newE7Form;
|
||||||
|
let group = [];
|
||||||
|
let i = 0;
|
||||||
|
const formParams = newE7Form.getFormParams();
|
||||||
|
isFormInit && dataShowE7FormFields && dataShowE7FormFields.map(c =>{
|
||||||
|
let items = [];
|
||||||
|
|
||||||
|
c.items.map(fields => {
|
||||||
|
items.push({
|
||||||
|
com:(
|
||||||
|
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@k1nqk5@integrationDatashowNewE7Form${fields.domkey[0]}`}
|
||||||
|
label={`${fields.label}`}
|
||||||
|
labelCol={{span: `${fields.labelcol}`}}
|
||||||
|
wrapperCol={{span: `${fields.fieldcol}`}}
|
||||||
|
error={newE7Form.getError(fields)}
|
||||||
|
tipPosition="bottom"
|
||||||
|
>
|
||||||
|
|
||||||
|
<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@rg2dnq@integrationDatashowNewE7Form${fields.domkey[0]}`} fieldConfig={fields} form={newE7Form} formParams={formParams} onChange={v=> {}} />
|
||||||
|
</WeaFormItem>),
|
||||||
|
colSpan:1,
|
||||||
|
hide: newE7Form.isHide(fields, (keys, allParams) => {
|
||||||
|
let bool = false;
|
||||||
|
return bool;
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
if(i==1) {
|
||||||
|
//说明
|
||||||
|
items.push({
|
||||||
|
com: (
|
||||||
|
<div >
|
||||||
|
<div class='badge' style={{paddingLeft:5,paddingBottom:10}}><span style={{marginLeft:10}}>1、{getLabel(23953,'浏览按钮字段类型中有自定义单选和自定义多选两种类型字段,所引用的自定义浏览按钮即在此设置,自定义浏览框标识不能重复')};</span></div>
|
||||||
|
<div class='badge' style={{paddingLeft:5,paddingBottom:10}}><span style={{marginLeft:10}}>2、{getLabel(23954,'数据源选择——从指定数据源中查找并显示数据')}; </span></div>
|
||||||
|
<div class='badge' style={{paddingLeft:5,paddingBottom:10}}><span style={{marginLeft:10}}>3、{getLabel(23955,'自定义浏览页面只能显示一个查询条件和两列内容,即所有查询不能超过三个字段')};</span></div>
|
||||||
|
<div class='badge' style={{paddingLeft:5,paddingBottom:10}}><span style={{marginLeft:10}}>4、{getLabel(23956,'浏览选择时初始数据按“无条件查询”内容查询数据,条件搜索时按“条件2查询”内容查询数据')}; </span></div>
|
||||||
|
<div class='badge' style={{paddingLeft:5,paddingBottom:10}}><span style={{marginLeft:10}}>5、{getLabel(23957,'.选择后流程字段保存的是“无条件查询”的第一列的值,流程中显示值是按“条件1查询”内容查询出的第一列的值,第二列的值作为链接的title')}; </span></div>
|
||||||
|
<div class='badge' style={{paddingLeft:5,paddingBottom:10}}><span style={{marginLeft:10}}>6、{getLabel(23958,'“列1显示名”和“列2显示名”指定无条件查询的第二列和第三列对应的字段说明')}; </span></div>
|
||||||
|
<div class='badge' style={{paddingLeft:5,paddingBottom:10}}><span style={{marginLeft:10}}>7、{getLabel(23959,'所有查询中的参数变量用?代替')}。</span></div>
|
||||||
|
</div>
|
||||||
|
),
|
||||||
|
hide: newE7Form.isHide(newE7Form,(keys, allParams) => {
|
||||||
|
return ( false );
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
group.push(<WeaSearchGroup ecId={`${this && this.props && this.props.ecId || ''}_WeaSearchGroup@hg4xp1@integrationDatashowNewE7Form${i}`} center={i<1?true:false} col={1} needTigger={true} title={c.title} showGroup={c.defaultshow} items={items}/>);
|
||||||
|
i++;
|
||||||
|
});
|
||||||
|
return group;
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const {dataShowStore} = this.props;
|
||||||
|
const {showNewE7FormDialog} = toJS(dataShowStore.status);
|
||||||
|
return (
|
||||||
|
|
||||||
|
<div className='wea-integration-single'>
|
||||||
|
<WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@5oznyg`}
|
||||||
|
title={ `${getLabel( '32303' ,'数据展现集成')}` }
|
||||||
|
icon='icon-coms-integration'
|
||||||
|
iconBgcolor='#1a57a0'
|
||||||
|
visible={showNewE7FormDialog}
|
||||||
|
hasScroll={true}
|
||||||
|
style={{width: 900, height: 600}}
|
||||||
|
onCancel={()=> {
|
||||||
|
dataShowStore.setState({showNewE7FormDialog : false});
|
||||||
|
dataShowStore.newForm.reset();
|
||||||
|
}}
|
||||||
|
buttons={this.getBtns()}
|
||||||
|
moreBtn={{
|
||||||
|
datas : this.getRightMenu(),
|
||||||
|
collectParams: []
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@iisq1p`}
|
||||||
|
datas={this.getRightMenu()}
|
||||||
|
collectParams={[]}>
|
||||||
|
|
||||||
|
|
||||||
|
{this.getSearchs()}
|
||||||
|
|
||||||
|
|
||||||
|
</WeaRightMenu>
|
||||||
|
</WeaDialog>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,77 @@
|
||||||
|
import React from "react";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { Button} from "antd";
|
||||||
|
import { toJS } from "mobx";
|
||||||
|
import {
|
||||||
|
WeaRightMenu,
|
||||||
|
WeaDialog,
|
||||||
|
WeaLocaleProvider,
|
||||||
|
} from "ecCom";
|
||||||
|
|
||||||
|
import './style/index.css';
|
||||||
|
import TestForm from "./TestForm";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
@inject("dataShowStore")
|
||||||
|
@observer
|
||||||
|
export default class PreviewDialog extends React.Component {
|
||||||
|
|
||||||
|
getLastStep = () =>{
|
||||||
|
const {dataShowStore} = this.props;
|
||||||
|
dataShowStore.initTestFrom();
|
||||||
|
dataShowStore.testForm.reset();
|
||||||
|
dataShowStore.setState({showsSqlTextFormDialog: true});
|
||||||
|
};
|
||||||
|
|
||||||
|
getRightMenu = () => {
|
||||||
|
return [];
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
closeDialog = ()=> {
|
||||||
|
const {
|
||||||
|
dataShowStore,
|
||||||
|
} = this.props;
|
||||||
|
|
||||||
|
dataShowStore.initTestFrom();
|
||||||
|
dataShowStore.testForm.reset();
|
||||||
|
dataShowStore.initSqlTestForm();
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const {dataShowStore, showDialog} = this.props;
|
||||||
|
const {status} = dataShowStore;
|
||||||
|
const {dataShowFormHiddenFields,showIframe,showTextFormButton} = toJS(status);
|
||||||
|
let show = showIframe?`block`:`none`;
|
||||||
|
let url = showIframe && dataShowFormHiddenFields ? `${window.ecologyContentPath || ""}/spa/inte/static/index.html#/main/inte/tab/${dataShowFormHiddenFields.id}?from=1` : ``;
|
||||||
|
|
||||||
|
let buttons = showTextFormButton
|
||||||
|
? [<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@ps0mw1@integrationDatashowPreviewDialogButtonLastStep`} type="primary" onClick={() => {this.getLastStep()}}>{getLabel('1876','上一步') }</Button>]
|
||||||
|
: [];
|
||||||
|
return (
|
||||||
|
<WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@l2sorz`}
|
||||||
|
title={getLabel( '511478' ,'数据展现集成预览')}
|
||||||
|
moduleName="integration"
|
||||||
|
visible={showDialog}
|
||||||
|
hasScroll={true}
|
||||||
|
style={{width: 780, height: 520}}
|
||||||
|
onCancel={this.closeDialog}
|
||||||
|
buttons={buttons}
|
||||||
|
moreBtn={{
|
||||||
|
datas : this.getRightMenu(),
|
||||||
|
collectParams: []
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
|
||||||
|
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@ju6kzw`} datas={this.getRightMenu()} collectParams={[]}>
|
||||||
|
<TestForm ecId={`${this && this.props && this.props.ecId || ''}_TestForm@w6pvfh`} />
|
||||||
|
<div style={{width: 780, height: 420, display:show}}>
|
||||||
|
<iframe id="mainContent" style={{width: '100%', height: '100%'}} src={url}></iframe>
|
||||||
|
</div>
|
||||||
|
</WeaRightMenu>
|
||||||
|
</WeaDialog>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,144 @@
|
||||||
|
import React from "react";
|
||||||
|
import {inject, observer} from "mobx-react";
|
||||||
|
import {toJS} from "mobx";
|
||||||
|
import * as API from "../../apis/DataShowService";
|
||||||
|
import {
|
||||||
|
WeaTools,
|
||||||
|
WeaRightMenu,
|
||||||
|
WeaDialog,
|
||||||
|
WeaLocaleProvider,
|
||||||
|
} from "ecCom";
|
||||||
|
import {Button} from "antd";
|
||||||
|
import SqlTextForm from "./SqlTextForm";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
let Base64 = WeaTools.Base64;
|
||||||
|
const store = ["dataShowStore"];
|
||||||
|
|
||||||
|
@inject(...store)
|
||||||
|
@observer
|
||||||
|
export default class SqlTestDialog extends React.Component {
|
||||||
|
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
}
|
||||||
|
|
||||||
|
getRightMenu =() =>{
|
||||||
|
|
||||||
|
let btn = [];
|
||||||
|
return btn;
|
||||||
|
};
|
||||||
|
|
||||||
|
//检查返回值
|
||||||
|
checkValuePROC = (type) => {
|
||||||
|
const {dataShowStore} = this.props;
|
||||||
|
const {sqlTextForm, newForm,source} = dataShowStore;
|
||||||
|
const {form} = sqlTextForm;
|
||||||
|
const {dataShowFormHiddenFields, WebserviceMethodParameterDatas, WeaTableEdit_MergedFieldData} = toJS(dataShowStore.status);
|
||||||
|
|
||||||
|
let id = dataShowFormHiddenFields.id || "";
|
||||||
|
|
||||||
|
form.validateForm().then(f => {
|
||||||
|
if (f.isValid) {
|
||||||
|
//合并hiddenfield参数
|
||||||
|
let sqltextValue = newForm.getFormParams().sqltext ? newForm.getFormParams().sqltext : '';
|
||||||
|
let sqltext = Base64.encode(sqltextValue);
|
||||||
|
let searchByIdValue = newForm.getFormParams().searchById ? newForm.getFormParams().searchById : '';
|
||||||
|
let searchById = Base64.encode(searchByIdValue);
|
||||||
|
let formParams = Object.assign({}, newForm.getFormParams(), {
|
||||||
|
sqltext: sqltext,
|
||||||
|
searchById: searchById
|
||||||
|
});
|
||||||
|
let params = Object.assign(dataShowFormHiddenFields, formParams);
|
||||||
|
params.operator = "save";
|
||||||
|
if (source) {
|
||||||
|
params.typename = source;
|
||||||
|
}
|
||||||
|
|
||||||
|
let datas = WeaTableEdit_MergedFieldData && WeaTableEdit_MergedFieldData.map(data => {
|
||||||
|
let transSQL = data.new_transql ? data.new_transql : '';
|
||||||
|
return Object.assign({}, data, {new_transql: Base64.encode(transSQL)});
|
||||||
|
});
|
||||||
|
params.dtinfo_MergedFieldData = JSON.stringify(datas);
|
||||||
|
params.dtinfo_WebserviceMethodParameterDatas = JSON.stringify(WebserviceMethodParameterDatas);
|
||||||
|
|
||||||
|
//dataShowStore.setState({showsSqlTextFormDialog: false});
|
||||||
|
dataShowStore.setState({showTextFormButton: true});
|
||||||
|
let checkParams = {
|
||||||
|
showname: formParams.showname,
|
||||||
|
sqlTextForm: JSON.stringify(form.getFormParams()),
|
||||||
|
};
|
||||||
|
API.saveFormParam(checkParams).then(result => {
|
||||||
|
if (result.status === '1') {
|
||||||
|
//关闭sql表单,不是重置
|
||||||
|
//dataShowStore.initSqlTestForm();
|
||||||
|
dataShowStore.setState({
|
||||||
|
showsSqlTextFormDialog: false,
|
||||||
|
showsSqlTextFormDialog2:false,
|
||||||
|
});
|
||||||
|
|
||||||
|
API.getIndexTest(id).then(result=>{
|
||||||
|
if (result.ext === 'true') {
|
||||||
|
if (result.status) {
|
||||||
|
//获取测试的form数据
|
||||||
|
dataShowStore.getDataShowTestForm(newForm.getFormParams(),dataShowFormHiddenFields, WebserviceMethodParameterDatas,type);
|
||||||
|
} else {
|
||||||
|
dataShowStore.setState({
|
||||||
|
testInitDatas: result.data.base,
|
||||||
|
});
|
||||||
|
console.log("type================" + type);
|
||||||
|
if (type == 'INDEX_TEST') {
|
||||||
|
dataShowStore.setState({
|
||||||
|
showIndexTestDialog: true,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (type == 'BTN_TEST') {
|
||||||
|
dataShowStore.setState({
|
||||||
|
showIndexTestDialog2: true,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
//异常处理
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
} else {
|
||||||
|
f.showErrors();
|
||||||
|
this.setState({date: new Date()});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const {dataShowStore,showSqlDialog} = this.props;
|
||||||
|
const{type} = dataShowStore.status;
|
||||||
|
let buttons = [
|
||||||
|
<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@lr22nl@integrationDatashowPreviewDialogButtonNextStep`} type="primary" onClick={() => {this.checkValuePROC(type)}}>{getLabel('1402','下一步')}</Button>,
|
||||||
|
];
|
||||||
|
|
||||||
|
return (
|
||||||
|
<WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@bdidvr`}
|
||||||
|
title={getLabel('510613', '手动输入表单参数')}
|
||||||
|
moduleName="integration"
|
||||||
|
visible={showSqlDialog}
|
||||||
|
hasScroll={true}
|
||||||
|
style={{width: 780, height: 520}}
|
||||||
|
onCancel={dataShowStore.initSqlTestForm}
|
||||||
|
buttons={buttons}
|
||||||
|
moreBtn={{
|
||||||
|
datas : this.getRightMenu(),
|
||||||
|
collectParams: []
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@5qf51e`}>
|
||||||
|
<SqlTextForm ecId={`${this && this.props && this.props.ecId || ''}_SqlTextForm@ll2bdy`}/>
|
||||||
|
</WeaRightMenu>
|
||||||
|
|
||||||
|
</WeaDialog>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,57 @@
|
||||||
|
import React from "react";
|
||||||
|
import {inject, observer} from "mobx-react";
|
||||||
|
import {WeaSwitch} from "comsMobx";
|
||||||
|
import {toJS} from "mobx";
|
||||||
|
import {
|
||||||
|
WeaSearchGroup,
|
||||||
|
WeaFormItem,
|
||||||
|
} from "ecCom";
|
||||||
|
|
||||||
|
const store = ["dataShowStore"];
|
||||||
|
|
||||||
|
@inject(...store)
|
||||||
|
@observer
|
||||||
|
export default class SqlTextForm extends React.Component {
|
||||||
|
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
}
|
||||||
|
|
||||||
|
getItem = () => {
|
||||||
|
const {dataShowStore} = this.props;
|
||||||
|
const {sqlTextForm, status} = dataShowStore;
|
||||||
|
const {} = toJS(status);
|
||||||
|
const {form, condition} = sqlTextForm;
|
||||||
|
const {isFormInit} = form;
|
||||||
|
|
||||||
|
let arr = [];
|
||||||
|
isFormInit && condition && condition.map((c, index) => {
|
||||||
|
let items = [];
|
||||||
|
c.items.map((field) => {
|
||||||
|
items.push({
|
||||||
|
com: (<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@odwfbw@integrationDatashowsqlTestForm${field.domkey[0]}`}
|
||||||
|
label={`${field.label}`}
|
||||||
|
labelCol={{span: 5, offset: 2}}
|
||||||
|
wrapperCol={{span: 15}}
|
||||||
|
error={form.getError(field)}
|
||||||
|
tipPosition="bottom"
|
||||||
|
style={{padding: 10,}}
|
||||||
|
>
|
||||||
|
<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@r1svz7@integrationDatashowsqlTestForm${field.domkey[0]}`} fieldConfig={field} form={form} formParams={form.getFormParams()}/>
|
||||||
|
|
||||||
|
</WeaFormItem>),
|
||||||
|
colSpan: 1
|
||||||
|
})
|
||||||
|
});
|
||||||
|
arr.push(<WeaSearchGroup ecId={`${this && this.props && this.props.ecId || ''}_WeaSearchGroup@wsysae@integrationDatashowsqlTestForm${index}`} center col={1} needTigger={true} title={c.title} showGroup={c.defaultshow}
|
||||||
|
items={items}/>);
|
||||||
|
});
|
||||||
|
return <div style={{paddingTop: 15}}>{arr}</div>
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
return (<div className='wea-integration-single'>
|
||||||
|
{this.getItem()}
|
||||||
|
</div>)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,69 @@
|
||||||
|
import React from "react";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { toJS } from "mobx";
|
||||||
|
import { WeaSwitch } from "comsMobx";
|
||||||
|
import {
|
||||||
|
WeaFormItem,
|
||||||
|
WeaTools,
|
||||||
|
} from "ecCom";
|
||||||
|
import './style/index.css';
|
||||||
|
|
||||||
|
const { getKey } = WeaTools;
|
||||||
|
const store = ["dataShowStore"];
|
||||||
|
|
||||||
|
|
||||||
|
@inject(...store)
|
||||||
|
@observer
|
||||||
|
export default class TestForm extends React.Component{
|
||||||
|
|
||||||
|
constructor (props) {
|
||||||
|
super(props);
|
||||||
|
this.state={};
|
||||||
|
}
|
||||||
|
|
||||||
|
getItems = () => {
|
||||||
|
const {dataShowStore} = this.props;
|
||||||
|
const {testForm, status} = dataShowStore;
|
||||||
|
const {dataShowTestFormFields,showXml} = toJS(status);
|
||||||
|
const {isFormInit} = testForm;
|
||||||
|
|
||||||
|
let group = [];
|
||||||
|
isFormInit && dataShowTestFormFields && dataShowTestFormFields.forEach(c => {
|
||||||
|
c && c.items && c.items.forEach(fields => {
|
||||||
|
let key = fields.domkey[0];
|
||||||
|
|
||||||
|
// 处理浏览框的图标
|
||||||
|
if('BROWSER' === fields.conditionType && fields.browserConditionParam) {
|
||||||
|
// 设置图标
|
||||||
|
fields.browserConditionParam.icon = "icon-coms-integration";
|
||||||
|
fields.browserConditionParam.iconBgcolor = "#1a57a0";
|
||||||
|
}
|
||||||
|
|
||||||
|
group.push(
|
||||||
|
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@6wjxy5@integrationDatashowTestForm${key}`}
|
||||||
|
label={`${fields.label}`}
|
||||||
|
labelCol={{span: 4, offset: 5}}
|
||||||
|
wrapperCol={{span: 10}}
|
||||||
|
error={testForm.getError(fields)}
|
||||||
|
style={{paddingTop:15}}
|
||||||
|
tipPosition="bottom"
|
||||||
|
hideLabel={["pretty_xml"].includes(getKey(fields))? showXml:false}
|
||||||
|
className={["pretty_xml"].includes(getKey(fields)) ? 'specialCol_dataShow' : 'normalCol'}
|
||||||
|
>
|
||||||
|
<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@4i0z71@integrationDatashowTestForm${key}`} form={testForm} fieldConfig={fields} formParams={testForm.getFormParams()}/>
|
||||||
|
</WeaFormItem>
|
||||||
|
)
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
return <div style={{paddingTop: 25,paddingBottom:25}}>{group}</div>;
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
return (
|
||||||
|
<div className='wea-integration-single'>
|
||||||
|
{this.getItems()}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,514 @@
|
||||||
|
import React from "react";
|
||||||
|
import {
|
||||||
|
inject,
|
||||||
|
observer,
|
||||||
|
} from "mobx-react";
|
||||||
|
import {
|
||||||
|
Button,
|
||||||
|
} from "antd";
|
||||||
|
import {
|
||||||
|
WeaLocaleProvider,
|
||||||
|
WeaLeftRightLayout,
|
||||||
|
WeaTop,
|
||||||
|
WeaTab,
|
||||||
|
WeaRightMenu,
|
||||||
|
} from "ecCom";
|
||||||
|
import {
|
||||||
|
WeaTableNew,
|
||||||
|
WeaLogView,
|
||||||
|
} from "comsMobx";
|
||||||
|
import {
|
||||||
|
doConfirm,
|
||||||
|
getAdvancedItem,
|
||||||
|
getSearchBtns,
|
||||||
|
} from "../../util/IntegrationUtil";
|
||||||
|
import NewForm from "./NewForm";
|
||||||
|
import NewE7Form from "./NewE7Form";
|
||||||
|
import NoRight from "../../public/NoRight";
|
||||||
|
import PreviewDialog from "./PreviewDialog";
|
||||||
|
import IndexTestDialog from "./IndexTestDialog";
|
||||||
|
import SqlTestDialog from "./SqlTestDialog";
|
||||||
|
import OrganizationTree from '../../public/OrganizationTree';
|
||||||
|
import CacheDataManage from "./CacheDataManage";
|
||||||
|
|
||||||
|
const {getLabel} = WeaLocaleProvider;
|
||||||
|
const {WeaTable} = WeaTableNew;
|
||||||
|
const WeaLogViewComp = WeaLogView.Component;
|
||||||
|
|
||||||
|
@inject("dataShowStore")
|
||||||
|
@observer
|
||||||
|
export default class DataShow extends React.Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
visible: false,
|
||||||
|
targetId: "",
|
||||||
|
showSearchAd: false,
|
||||||
|
searchType: ['base','advanced'],
|
||||||
|
tabDatas: [{
|
||||||
|
key: "0",
|
||||||
|
title: getLabel("526043", "数据展现集成列表")
|
||||||
|
}, {
|
||||||
|
key: "1",
|
||||||
|
title: getLabel("526044", "缓存管理")
|
||||||
|
}],
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
// 从NC等产品集成入口进来的数据
|
||||||
|
componentWillMount() {
|
||||||
|
const {dataShowStore} = this.props;
|
||||||
|
let paramsIndex = location.href.trim() && location.href.trim().indexOf('?');
|
||||||
|
if((paramsIndex != -1) && (location.href.trim().indexOf('typename') > paramsIndex) && (location.href.trim().indexOf('from=productEntrance') > paramsIndex)) {
|
||||||
|
let url = location.href.split('?')[1];
|
||||||
|
if(url) {
|
||||||
|
let params = url.split('&');
|
||||||
|
let query = {};
|
||||||
|
for(let i = 0; i < params.length; i++) {
|
||||||
|
query[params[i].split('=')[0]] = params[i].split('=')[1];
|
||||||
|
}
|
||||||
|
dataShowStore.source = (query.typename ? query.typename : "");
|
||||||
|
}else {
|
||||||
|
dataShowStore.source = "";
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
dataShowStore.source = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 组件渲染后调用
|
||||||
|
componentDidMount() {
|
||||||
|
const { dataShowStore } = this.props;
|
||||||
|
dataShowStore.doInit();
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps) {
|
||||||
|
const { dataShowStore } = this.props;
|
||||||
|
if (this.props.location.key !== nextProps.location.key) {
|
||||||
|
dataShowStore.doInit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 分权刷新
|
||||||
|
refreshData = (id, type) => {
|
||||||
|
const {
|
||||||
|
dataShowStore
|
||||||
|
} = this.props, {
|
||||||
|
status,
|
||||||
|
} = dataShowStore, {
|
||||||
|
selectedKey,
|
||||||
|
} = status;
|
||||||
|
|
||||||
|
if("1" === type) {
|
||||||
|
// 如果点击的是分部
|
||||||
|
dataShowStore.setState({
|
||||||
|
subcompanyid: id,
|
||||||
|
})
|
||||||
|
} else{
|
||||||
|
dataShowStore.setState({
|
||||||
|
subcompanyid: "",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
if(selectedKey == "1") {
|
||||||
|
dataShowStore.getCacheManageCondition({}, dataShowStore.getCacheManageListInfo);
|
||||||
|
} else {
|
||||||
|
dataShowStore.getDataShowCondition({}, dataShowStore.getDataShowInfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getBtns = () => {
|
||||||
|
const {
|
||||||
|
dataShowStore,
|
||||||
|
} = this.props, {
|
||||||
|
status,
|
||||||
|
tableStore,
|
||||||
|
} = dataShowStore, {
|
||||||
|
rightMenus,
|
||||||
|
selectedKey,
|
||||||
|
tabButtonDisabled,
|
||||||
|
} = status, {
|
||||||
|
selectedRowKeys
|
||||||
|
} = tableStore;
|
||||||
|
|
||||||
|
return rightMenus && rightMenus.map(m => <Button
|
||||||
|
ecId={`${this && this.props && this.props.ecId || ''}_Button@gb279a@integrationDatashowButton${m.type}`}
|
||||||
|
type="primary"
|
||||||
|
disabled={tabButtonDisabled || (selectedKey == "0" ? (m.menuIcon==='icon-coms-delete' && selectedRowKeys.length === 0) : this.getButtonSelectProps(m.type))}
|
||||||
|
onClick={() => this.onRightMenuClick(m.type)}
|
||||||
|
>{m.menuName}</Button>);
|
||||||
|
};
|
||||||
|
|
||||||
|
getRightMenu = () => {
|
||||||
|
const {
|
||||||
|
dataShowStore,
|
||||||
|
} = this.props, {
|
||||||
|
status,
|
||||||
|
tableStore,
|
||||||
|
} = dataShowStore, {
|
||||||
|
rightMenus,
|
||||||
|
selectedKey,
|
||||||
|
tabButtonDisabled,
|
||||||
|
} = status;
|
||||||
|
|
||||||
|
let btnArr = rightMenus && rightMenus.map(m => {
|
||||||
|
return {
|
||||||
|
key: m.type,
|
||||||
|
icon: <i className={m.menuIcon} />,
|
||||||
|
content: m.menuName,
|
||||||
|
onClick: () => this.onRightMenuClick(m.type),
|
||||||
|
disabled: tabButtonDisabled || (selectedKey == "0" ? (m.menuIcon==='icon-coms-delete' && tableStore.selectedRowKeys.length === 0) : this.getButtonSelectProps(m.type)),
|
||||||
|
};
|
||||||
|
});
|
||||||
|
//显示列定制
|
||||||
|
btnArr.push({
|
||||||
|
key: "BTN_COLUMN",
|
||||||
|
icon: <i className="icon-coms-Custom" />,
|
||||||
|
content: getLabel(32535, "显示列定制"),
|
||||||
|
onClick: () => this.onRightMenuClick("BTN_COLUMN")
|
||||||
|
});
|
||||||
|
return btnArr;
|
||||||
|
}
|
||||||
|
|
||||||
|
getButtonSelectProps = (type) => {
|
||||||
|
const {
|
||||||
|
dataShowStore,
|
||||||
|
} = this.props, {
|
||||||
|
tableStore,
|
||||||
|
} = dataShowStore, {
|
||||||
|
selectedRowKeys,
|
||||||
|
datas,
|
||||||
|
} = tableStore;
|
||||||
|
let disabled = selectedRowKeys.length === 0,
|
||||||
|
list = [];
|
||||||
|
|
||||||
|
if(!disabled) {
|
||||||
|
selectedRowKeys && selectedRowKeys.forEach(key => {
|
||||||
|
let data = datas && datas.find(data => data.randomFieldId === key);
|
||||||
|
if(data) {
|
||||||
|
if(list.indexOf(data.isopencache) == -1) {
|
||||||
|
list.push(data.isopencache);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
if(list.length > 1) {
|
||||||
|
disabled = true;
|
||||||
|
} else {
|
||||||
|
return (type === "BTN_NEW" && list[0] == "1") || (type === "BTN_DEL" && list[0] == "0");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return disabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
onRightMenuClick = (type, record=null) => {
|
||||||
|
const {
|
||||||
|
dataShowStore,
|
||||||
|
} = this.props, {
|
||||||
|
tableStore,
|
||||||
|
status,
|
||||||
|
getDataShowCacheOperation,
|
||||||
|
getCacheDataManageCondition,
|
||||||
|
getCacheDataManageInfo,
|
||||||
|
} = dataShowStore, {
|
||||||
|
selectedKey,
|
||||||
|
} = status;
|
||||||
|
const operateKey = record ? record.id : tableStore.selectedRowKeys;
|
||||||
|
|
||||||
|
if("0" == selectedKey) {
|
||||||
|
if (type == "BTN_NEW") {
|
||||||
|
dataShowStore.setState({showNewFormDialog: true});
|
||||||
|
dataShowStore.getDataShowEditForm({id: ''});
|
||||||
|
}else if (type == "BTN_DEL" || type == "2") {
|
||||||
|
let ids = "", title = "";
|
||||||
|
if(type == "2") {
|
||||||
|
title = getLabel(15097, '确定要删除吗?');
|
||||||
|
ids = record.id;
|
||||||
|
} else {
|
||||||
|
title = getLabel(385625, '确定要删除选择的记录吗?');
|
||||||
|
ids = tableStore.selectedRowKeys;
|
||||||
|
}
|
||||||
|
doConfirm(
|
||||||
|
title,
|
||||||
|
dataShowStore.getDataShowOperation,
|
||||||
|
{operator: 'delete', id: ids}
|
||||||
|
);
|
||||||
|
}else if (type == "0") {
|
||||||
|
dataShowStore.setState({type: 'INDEX_TEST'});
|
||||||
|
dataShowStore.getIndexTest(record.id);
|
||||||
|
}else if (type == "1") {
|
||||||
|
if(record.browserfrom == '0') {
|
||||||
|
dataShowStore.getDataShowEditForm4E7({id: record.id, browserid:record.showname});
|
||||||
|
dataShowStore.setState({showNewE7FormDialog: true});
|
||||||
|
}else {
|
||||||
|
dataShowStore.getDataShowEditForm({id: record.id});
|
||||||
|
dataShowStore.setState({showNewFormDialog: true});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if ("1" == selectedKey) {
|
||||||
|
if("0" == type || "BTN_NEW" == type) {
|
||||||
|
// 开启缓存
|
||||||
|
let title = '';
|
||||||
|
if('0' == type) {
|
||||||
|
title = `${getLabel('529052','确定开启缓存吗')}?`;
|
||||||
|
} else {
|
||||||
|
title = `${getLabel('529054','确定要开启选择的记录的缓存吗')}?`;
|
||||||
|
}
|
||||||
|
doConfirm(
|
||||||
|
title,
|
||||||
|
getDataShowCacheOperation,
|
||||||
|
{operate: "openCache", id: operateKey}
|
||||||
|
);
|
||||||
|
} else if("1" == type || "BTN_DEL" == type) {
|
||||||
|
// 关闭缓存
|
||||||
|
let title = '';
|
||||||
|
if('1' == type) {
|
||||||
|
title = `${getLabel('529051','确定关闭缓存吗')}?` ;
|
||||||
|
} else {
|
||||||
|
title = `${getLabel('529053','确定要关闭选择的记录的缓存吗')}?`;
|
||||||
|
}
|
||||||
|
doConfirm(
|
||||||
|
title,
|
||||||
|
getDataShowCacheOperation,
|
||||||
|
{operate: "closeCache", id: operateKey}
|
||||||
|
);
|
||||||
|
} else if("2" == type) {
|
||||||
|
// 缓存数据管理
|
||||||
|
dataShowStore.setState({
|
||||||
|
cacheDataManageVisible: true,
|
||||||
|
cacheDataOperateInfo: record,
|
||||||
|
})
|
||||||
|
getCacheDataManageCondition({}, getCacheDataManageInfo);
|
||||||
|
} else if("3" == type) {
|
||||||
|
// 系统日志
|
||||||
|
this.setState({
|
||||||
|
visible: true,
|
||||||
|
targetId: record ? record.id : "",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (type == "BTN_COLUMN") {
|
||||||
|
tableStore.setColSetVisible(true);
|
||||||
|
tableStore.tableColSet(true);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
getAdvancedSearch = () => {
|
||||||
|
const {
|
||||||
|
dataShowStore,
|
||||||
|
} = this.props, {
|
||||||
|
searchForm,
|
||||||
|
status,
|
||||||
|
} = dataShowStore, {
|
||||||
|
dataShowConditionInfo
|
||||||
|
} = status;
|
||||||
|
return getAdvancedItem(searchForm, dataShowConditionInfo, this.handleSearchFun, false, this && this.props && this.props.ecId || '', "integrationDatashow");
|
||||||
|
};
|
||||||
|
|
||||||
|
handleSearchFun = () => {
|
||||||
|
const {
|
||||||
|
dataShowStore,
|
||||||
|
} = this.props, {
|
||||||
|
status,
|
||||||
|
searchForm,
|
||||||
|
} = dataShowStore, {
|
||||||
|
selectedKey,
|
||||||
|
}= status;
|
||||||
|
|
||||||
|
dataShowStore.setState({
|
||||||
|
subcompanyid: searchForm.getFormParams().subcompanyid1,
|
||||||
|
});
|
||||||
|
|
||||||
|
if(selectedKey == "1") {
|
||||||
|
dataShowStore.getCacheManageListInfo();
|
||||||
|
} else {
|
||||||
|
dataShowStore.getDataShowInfo();
|
||||||
|
}
|
||||||
|
|
||||||
|
this.setState({ showSearchAd: false });
|
||||||
|
}
|
||||||
|
|
||||||
|
getTabButtonsAd = () => {
|
||||||
|
return getSearchBtns(
|
||||||
|
this.handleSearchFun,
|
||||||
|
() => this.props.dataShowStore.searchForm.reset(),
|
||||||
|
() => this.setState({ showSearchAd: false }),
|
||||||
|
this && this.props && this.props.ecId || '',
|
||||||
|
"integrationDatashow"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
onOperatesClick = (record, index, operate) => {
|
||||||
|
this.onRightMenuClick(operate.index, record);
|
||||||
|
};
|
||||||
|
|
||||||
|
getColumnsInfo = (datas=[]) => {
|
||||||
|
const {selectedKey} = this.props.dataShowStore.status;
|
||||||
|
|
||||||
|
return datas && datas.map(item => {
|
||||||
|
if("0" == selectedKey) {
|
||||||
|
if("id" === item.dataIndex) {
|
||||||
|
item.render = (text, record) => <a onClick={() => this.onRightMenuClick("1", record)}>{record.showname}</a>;
|
||||||
|
} else if(["unconditionalQuery", "physicalPaging", "isPhyPage"].includes(item.dataIndex)) {
|
||||||
|
item.render = (text, record) => <span style={{color: record[item.dataIndex] == "1" ? "green" : "black"}}>{record[`${item.dataIndex}span`] || record[item.dataIndex]}</span>;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if("subcompanyid" === item.dataIndex) {
|
||||||
|
item.render = (text, record) => <a href={`${window.ecologyContentPath || ""}/spa/hrm/engine.html#/hrmengine/organization?showTree=false&isView=1&type=subcompany&id=${record.subcompanyid}`} target="_blank">{record.subcompanyidspan}</a>;
|
||||||
|
}
|
||||||
|
|
||||||
|
return item;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
setShowSearchAd = (bool) => this.setState({showSearchAd: bool});
|
||||||
|
|
||||||
|
hideSearchAd = () => this.setState({showSearchAd: false});
|
||||||
|
|
||||||
|
onSearchChange = value => {
|
||||||
|
const {
|
||||||
|
dataShowStore,
|
||||||
|
} = this.props, {
|
||||||
|
searchForm,
|
||||||
|
status,
|
||||||
|
} = dataShowStore, {
|
||||||
|
selectedKey,
|
||||||
|
} = status;
|
||||||
|
|
||||||
|
searchForm.updateFields({[selectedKey == "0" ? "name" : "showname"]: value})
|
||||||
|
};
|
||||||
|
|
||||||
|
getSearchBaseValue = () => {
|
||||||
|
const {
|
||||||
|
dataShowStore,
|
||||||
|
} = this.props, {
|
||||||
|
searchForm,
|
||||||
|
status,
|
||||||
|
} = dataShowStore, {
|
||||||
|
selectedKey,
|
||||||
|
} = status;
|
||||||
|
|
||||||
|
const formParams = searchForm.getFormParams();
|
||||||
|
|
||||||
|
return selectedKey == "0" ? formParams.name : formParams.showname;
|
||||||
|
}
|
||||||
|
|
||||||
|
onChange = (selectedKey) => {
|
||||||
|
const {
|
||||||
|
dataShowStore,
|
||||||
|
} = this.props;
|
||||||
|
|
||||||
|
if(selectedKey == "1") {
|
||||||
|
dataShowStore.getCacheManageCondition({}, dataShowStore.getCacheManageListInfo);
|
||||||
|
} else {
|
||||||
|
dataShowStore.getDataShowCondition({}, dataShowStore.getDataShowInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
dataShowStore.setState({selectedKey});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 关闭日志弹窗
|
||||||
|
closeLogDialog = () => {
|
||||||
|
this.setState({
|
||||||
|
visible: false,
|
||||||
|
targetId: "",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const {
|
||||||
|
dataShowStore,
|
||||||
|
} = this.props, {
|
||||||
|
tableStore,
|
||||||
|
status,
|
||||||
|
hasRight,
|
||||||
|
rightLoading,
|
||||||
|
logStore,
|
||||||
|
} = dataShowStore, {
|
||||||
|
advanceHeight,
|
||||||
|
showTestFormDialog,
|
||||||
|
showsSqlTextFormDialog,
|
||||||
|
showIndexTestDialog,
|
||||||
|
collectParams,
|
||||||
|
hasOrganization,
|
||||||
|
subcompanyid,
|
||||||
|
selectedKey,
|
||||||
|
} = status, {
|
||||||
|
showSearchAd,
|
||||||
|
searchType,
|
||||||
|
tabDatas=[],
|
||||||
|
visible,
|
||||||
|
targetId,
|
||||||
|
} = this.state;
|
||||||
|
|
||||||
|
return (rightLoading
|
||||||
|
? null
|
||||||
|
: hasRight
|
||||||
|
? <WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@z97us9`}
|
||||||
|
datas={this.getRightMenu()}
|
||||||
|
collectParams={collectParams}
|
||||||
|
>
|
||||||
|
<WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@uccb1l`}
|
||||||
|
title={getLabel(32303, "数据展现集成")}
|
||||||
|
icon={<i className="icon-coms-integration" />}
|
||||||
|
iconBgcolor="#1a57a0"
|
||||||
|
buttons={this.getBtns()}
|
||||||
|
showDropIcon={true}
|
||||||
|
dropMenuDatas={this.getRightMenu()}
|
||||||
|
dropMenuProps={{collectParams}}
|
||||||
|
/>
|
||||||
|
<WeaLeftRightLayout ecId={`${this && this.props && this.props.ecId || ''}_WeaLeftRightLayout@uitgs3`}
|
||||||
|
showLeft={hasOrganization}
|
||||||
|
showBtn={hasOrganization}
|
||||||
|
leftCom={<OrganizationTree ecId={`${this && this.props && this.props.ecId || ''}_OrganizationTree@le35kt`}
|
||||||
|
ref="datashow"
|
||||||
|
refreshData={this.refreshData}
|
||||||
|
selectedKeys={[subcompanyid]}
|
||||||
|
rightStr={"integration:datashowset"}
|
||||||
|
/>}
|
||||||
|
>
|
||||||
|
<WeaTab ecId={`${this && this.props && this.props.ecId || ''}_WeaTab@0mlh6h`}
|
||||||
|
datas={tabDatas}
|
||||||
|
keyParam="key"
|
||||||
|
selectedKey={selectedKey}
|
||||||
|
searchType={searchType}
|
||||||
|
searchsBaseValue={this.getSearchBaseValue()}
|
||||||
|
advanceHeight={advanceHeight}
|
||||||
|
searchsAd={this.getAdvancedSearch()}
|
||||||
|
showSearchAd={showSearchAd}
|
||||||
|
buttonsAd={this.getTabButtonsAd()}
|
||||||
|
setShowSearchAd={this.setShowSearchAd}
|
||||||
|
hideSearchAd={this.hideSearchAd}
|
||||||
|
onSearch={this.handleSearchFun}
|
||||||
|
onSearchChange={this.onSearchChange}
|
||||||
|
onChange={this.onChange}
|
||||||
|
/>
|
||||||
|
<WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@fqqf7f`}
|
||||||
|
comsWeaTableStore={tableStore}
|
||||||
|
hasOrder={true}
|
||||||
|
needScroll={true}
|
||||||
|
onOperatesClick={this.onOperatesClick}
|
||||||
|
getColumns={this.getColumnsInfo}
|
||||||
|
/>
|
||||||
|
</WeaLeftRightLayout>
|
||||||
|
<NewForm ecId={`${this && this.props && this.props.ecId || ''}_NewForm@k3560j`} />
|
||||||
|
<NewE7Form ecId={`${this && this.props && this.props.ecId || ''}_NewE7Form@bxxfhs`} />
|
||||||
|
<SqlTestDialog ecId={`${this && this.props && this.props.ecId || ''}_SqlTestDialog@w6ugu7`} showSqlDialog={showsSqlTextFormDialog}/>
|
||||||
|
<PreviewDialog ecId={`${this && this.props && this.props.ecId || ''}_PreviewDialog@un1blg`} showDialog={showTestFormDialog}/>
|
||||||
|
<IndexTestDialog ecId={`${this && this.props && this.props.ecId || ''}_IndexTestDialog@q0vvwn`} showTestVersion={showIndexTestDialog}/>
|
||||||
|
<CacheDataManage ecId={`${this && this.props && this.props.ecId || ''}_CacheDataManage@2rpraa`} />
|
||||||
|
<WeaLogViewComp ecId={`${this && this.props && this.props.ecId || ''}_WeaLogViewComp@gbkt78`}
|
||||||
|
logStore={logStore}
|
||||||
|
logType="15"
|
||||||
|
logSmallType="94"
|
||||||
|
targetId={targetId}
|
||||||
|
visible={visible}
|
||||||
|
onCancel={this.closeLogDialog}
|
||||||
|
/>
|
||||||
|
</WeaRightMenu>
|
||||||
|
: <NoRight ecId={`${this && this.props && this.props.ecId || ''}_NoRight@030ywc`}/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
.specialCol_dataShow span.wea-field-readonly {
|
||||||
|
margin-top:10px;
|
||||||
|
/*line-height: 30px;*/
|
||||||
|
word-break: break-all;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
span.inte-datashow-selectStyle>span.child-item {
|
||||||
|
word-break: keep-all !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
.specialCol2 span.wea-field-readonly {
|
||||||
|
cursor:pointer;
|
||||||
|
line-height: 80px;
|
||||||
|
}*/
|
||||||
|
|
@ -0,0 +1,230 @@
|
||||||
|
import {
|
||||||
|
inject,
|
||||||
|
observer,
|
||||||
|
} from "mobx-react";
|
||||||
|
import {
|
||||||
|
toJS
|
||||||
|
} from 'mobx';
|
||||||
|
import uuid from 'uuid';
|
||||||
|
import {
|
||||||
|
WeaFormItem,
|
||||||
|
WeaLocaleProvider,
|
||||||
|
WeaRightMenu,
|
||||||
|
WeaSearchGroup,
|
||||||
|
WeaTop,
|
||||||
|
WeaNewScroll,
|
||||||
|
} from "ecCom";
|
||||||
|
import {
|
||||||
|
WeaSwitch,
|
||||||
|
} from "comsMobx";
|
||||||
|
import {
|
||||||
|
onCheck,
|
||||||
|
doConfirm,
|
||||||
|
} from "../../util/IntegrationUtil";
|
||||||
|
import {
|
||||||
|
Button,
|
||||||
|
} from "antd";
|
||||||
|
import NoRight from "../../public/NoRight";
|
||||||
|
|
||||||
|
const {getLabel} = WeaLocaleProvider;
|
||||||
|
|
||||||
|
@inject("delegateClientStore")
|
||||||
|
@observer
|
||||||
|
class DelegateClient extends React.Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
collectParams: {
|
||||||
|
favname: getLabel('528480','Delegate集成'),
|
||||||
|
favouritetype: 1,
|
||||||
|
objid: 0,
|
||||||
|
link: "wui/engine.html#/integration/delegate_client",
|
||||||
|
importantlevel: 1
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
this.props.delegateClientStore.doInit();
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillUnmount() {
|
||||||
|
this.props.delegateClientStore.cleanStore();
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps) {
|
||||||
|
const { delegateClientStore } = this.props;
|
||||||
|
if (this.props.location && nextProps.location && (this.props.location.key !== nextProps.location.key)) {
|
||||||
|
delegateClientStore.doInit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取右键菜单
|
||||||
|
* @returns {Array}
|
||||||
|
*/
|
||||||
|
getRightMenu() {
|
||||||
|
const {
|
||||||
|
formLoading
|
||||||
|
} = this.props.delegateClientStore.status;
|
||||||
|
|
||||||
|
return [{
|
||||||
|
key: "BTN_SAVE",
|
||||||
|
icon: <i className="icon-coms-Preservation" />,
|
||||||
|
content: getLabel(30986, '保存'),
|
||||||
|
disabled: formLoading,
|
||||||
|
onClick: () => this.onMenuClick("BTN_SAVE")
|
||||||
|
}, {
|
||||||
|
key: "test",
|
||||||
|
icon: <i className="icon-coms-Approval" />,
|
||||||
|
content: getLabel('514733','部署'),
|
||||||
|
disabled: formLoading,
|
||||||
|
onClick: () => this.onMenuClick("test")
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取顶部按钮
|
||||||
|
* @returns {Array}
|
||||||
|
*/
|
||||||
|
getBtns = () => {
|
||||||
|
const {
|
||||||
|
formLoading
|
||||||
|
} = this.props.delegateClientStore.status;
|
||||||
|
|
||||||
|
return [
|
||||||
|
<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@jlw5f8@delegateClientBtnSave`} type="primary" key="BTN_SAVE" disabled={formLoading} onClick={() => this.onMenuClick('BTN_SAVE')}>{getLabel(30986, '保存')}</Button>,
|
||||||
|
<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@p1biy2@delegateClientBtnTest`} type="primary" key="test" disabled={formLoading} onClick={() => this.onMenuClick('test')}>{getLabel('514733','部署')}</Button>
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 右键菜单点击事件
|
||||||
|
* @param type
|
||||||
|
*/
|
||||||
|
onMenuClick = (type) => {
|
||||||
|
const {
|
||||||
|
delegateClientStore,
|
||||||
|
} = this.props, {
|
||||||
|
baseForm,
|
||||||
|
hiddenFields={},
|
||||||
|
} = delegateClientStore;
|
||||||
|
|
||||||
|
if (['BTN_SAVE', 'test'].includes(type)) {
|
||||||
|
const formParams = baseForm.getFormParams();
|
||||||
|
let params = Object.assign({}, formParams, toJS(hiddenFields));
|
||||||
|
// 提取保存的公共方法
|
||||||
|
let saveMethod = () => {
|
||||||
|
if('test' === type) {
|
||||||
|
doConfirm(
|
||||||
|
getLabel('514734','部署后会自动重启服务,若有失败,请手动重启服务,以确保系统能正常使用!'),
|
||||||
|
delegateClientStore.getBaseInfoFormOperation,
|
||||||
|
params,
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
delegateClientStore.getBaseInfoFormOperation(params);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
if('test' === type) {
|
||||||
|
params = Object.assign({}, params, {isdeploy: '1'});
|
||||||
|
}
|
||||||
|
|
||||||
|
if(formParams.isuse != '1') {
|
||||||
|
saveMethod();
|
||||||
|
} else {
|
||||||
|
onCheck(baseForm, () => {
|
||||||
|
if(formParams.isuse == '1' && formParams.ec_isuse != '1' && formParams.em_isuse != '1') {
|
||||||
|
doConfirm(getLabel('528310','请开启pc认证或移动端认证!'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
saveMethod();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 渲染form表单
|
||||||
|
*/
|
||||||
|
getBaseInfoForm = (form, datas=[]) => {
|
||||||
|
const {
|
||||||
|
isFormInit,
|
||||||
|
} = form;
|
||||||
|
let group = [];
|
||||||
|
|
||||||
|
isFormInit && datas && datas.forEach((c, index) =>{
|
||||||
|
let items = [];
|
||||||
|
|
||||||
|
if(form.getFormParams().isuse == '1' || ('1' != form.getFormParams().isuse && 'baseInfo' === c.key)) {
|
||||||
|
c.items && c.items.forEach(fields => {
|
||||||
|
let key = fields.domkey[0];
|
||||||
|
items.push({
|
||||||
|
com:(
|
||||||
|
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@untyu8@${key}`}
|
||||||
|
label={`${fields.label}`}
|
||||||
|
labelCol={{span: `${fields.labelcol}`}}
|
||||||
|
wrapperCol={{span: `${fields.fieldcol}`}}
|
||||||
|
error={form.getError(fields)}
|
||||||
|
tipPosition="bottom"
|
||||||
|
>
|
||||||
|
<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@8kycvi@${key}`} fieldConfig={fields} form={form} />
|
||||||
|
</WeaFormItem>
|
||||||
|
),
|
||||||
|
colSpan:1,
|
||||||
|
hide: form.isHide(fields, (keys, allParams) => {
|
||||||
|
let bool = false;
|
||||||
|
'customsql' === key && allParams.accounttype != '7' && (bool = true);
|
||||||
|
return bool;
|
||||||
|
})
|
||||||
|
});
|
||||||
|
});
|
||||||
|
group.push(<WeaSearchGroup ecId={`${this && this.props && this.props.ecId || ''}_WeaSearchGroup@czy0m6@${index}`} center col={1} needTigger={true} title={c.title} showGroup={c.defaultshow} items={items}/>);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return group;
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const {
|
||||||
|
delegateClientStore,
|
||||||
|
} = this.props, {
|
||||||
|
status,
|
||||||
|
baseForm,
|
||||||
|
} = delegateClientStore, {
|
||||||
|
hasRight,
|
||||||
|
loading,
|
||||||
|
condition,
|
||||||
|
} = status, {
|
||||||
|
collectParams,
|
||||||
|
} = this.state;
|
||||||
|
|
||||||
|
return (
|
||||||
|
loading
|
||||||
|
? null
|
||||||
|
: hasRight
|
||||||
|
? <WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@5z4r24`}
|
||||||
|
datas={this.getRightMenu()}
|
||||||
|
collectParams={collectParams}
|
||||||
|
>
|
||||||
|
<WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@u9f1vg`}
|
||||||
|
title={getLabel('528480','Delegate集成')}
|
||||||
|
icon={<i className="icon-coms-integration" />}
|
||||||
|
iconBgcolor="#1a57a0"
|
||||||
|
buttons={this.getBtns()}
|
||||||
|
showDropIcon={true}
|
||||||
|
dropMenuDatas={this.getRightMenu()}
|
||||||
|
dropMenuProps={{collectParams}}
|
||||||
|
/>
|
||||||
|
<WeaNewScroll ecId={`${this && this.props && this.props.ecId || ''}_WeaNewScroll@j1gtn2`} height={"calc(100% - 50px)"}>
|
||||||
|
{this.getBaseInfoForm(baseForm, condition)}
|
||||||
|
</WeaNewScroll>
|
||||||
|
</WeaRightMenu>
|
||||||
|
: <NoRight ecId={`${this && this.props && this.props.ecId || ''}_NoRight@7th6yc`}/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default DelegateClient;
|
||||||
|
|
@ -0,0 +1,231 @@
|
||||||
|
import React from 'react'
|
||||||
|
import {WeaTop, WeaTab, WeaTree, WeaDropMenu, WeaLocaleProvider} from 'ecCom';
|
||||||
|
import {Row, Col, Menu, Dropdown, Icon, Button} from 'antd';
|
||||||
|
import docxInfo from '../../util/docxInfo.js';
|
||||||
|
|
||||||
|
const SubMenu = Menu.SubMenu;
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
export default class Docx extends React.Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
version: '',
|
||||||
|
key: '',
|
||||||
|
selectedKey: '',
|
||||||
|
hash: '',
|
||||||
|
docxHeight: 0,
|
||||||
|
scrollWidth: 0,
|
||||||
|
}
|
||||||
|
this.resize.bind(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
this.init();
|
||||||
|
this.screenChange();
|
||||||
|
|
||||||
|
try{
|
||||||
|
let docxHeight = Number(document.body.clientHeight) + Number(window.screenTop);
|
||||||
|
let docxWidth = Number(document.body.clientWidth) + Number(window.screenLeft);
|
||||||
|
document.getElementById('docx').style.height = docxHeight + 'px';
|
||||||
|
document.getElementById('docx').style.width = window.screen.width + 'px';
|
||||||
|
let topHeight = document.getElementsByClassName('wea-new-top')[0].clientHeight;
|
||||||
|
document.getElementById('leftPart').style.height = Number(document.body.clientHeight) - Number(topHeight) + 'px';
|
||||||
|
let menuWidth = document.getElementsByClassName('wea-drop-menu')[0].clientWidth;
|
||||||
|
document.getElementById('rightPart').style.height = Number(docxHeight) - Number(topHeight) + 'px';
|
||||||
|
let tabHeight = document.getElementsByClassName('wea-tab')[0].clientHeight + 2;
|
||||||
|
let scrollWidth = (Number(document.body.clientWidth) - Number(menuWidth)) * 0.98 + 'px';
|
||||||
|
document.getElementById('srcIframe').style.height = Number(document.body.clientHeight) - Number(topHeight) - Number(tabHeight) + 'px';
|
||||||
|
let height = Number(document.getElementsByClassName('wea-tree')[0].clientHeight) + 35 + 'px';
|
||||||
|
document.getElementById('treePart').style.height = height + 'px';
|
||||||
|
this.setState({
|
||||||
|
docxHeight: docxHeight,
|
||||||
|
docxWidth: docxWidth,
|
||||||
|
scrollWidth: scrollWidth
|
||||||
|
})
|
||||||
|
}catch(err) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillUnmount() {
|
||||||
|
window.removeEventListener('resize',this.resize);
|
||||||
|
}
|
||||||
|
|
||||||
|
screenChange() {
|
||||||
|
window.addEventListener('resize', this.resize);
|
||||||
|
}
|
||||||
|
|
||||||
|
resize = () => {
|
||||||
|
try{
|
||||||
|
document.getElementById('docx').style.height = this.state.docxHeight + 'px';
|
||||||
|
document.getElementById('docx').style.width = window.screen.width + 'px';
|
||||||
|
let topHeight = document.getElementsByClassName('wea-new-top')[0].clientHeight;
|
||||||
|
let menuWidth = document.getElementsByClassName('wea-drop-menu')[0].clientWidth;
|
||||||
|
document.getElementById('leftPart').style.height = Number(document.body.clientHeight) - Number(topHeight) + 'px';
|
||||||
|
document.getElementById('rightPart').style.height = Number(this.state.docxHeight) - Number(topHeight) + 'px';
|
||||||
|
let tabHeight = document.getElementsByClassName('wea-tab')[0].clientHeight + 2;
|
||||||
|
let scrollWidth = (Number(document.body.clientWidth) - Number(menuWidth)) * 0.98 + 'px';
|
||||||
|
this.setState({
|
||||||
|
scrollWidth: scrollWidth
|
||||||
|
})
|
||||||
|
let height = Number(document.getElementsByClassName('wea-tree')[0].clientHeight) + 35 + 'px';
|
||||||
|
document.getElementById('treePart').style.height = height + 'px';
|
||||||
|
document.getElementById('srcIframe').style.height = Number(document.body.clientHeight) - Number(topHeight) - Number(tabHeight) + 'px';
|
||||||
|
}catch(err) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
scrollToAnchor = (anchorName) => {
|
||||||
|
if (anchorName) {
|
||||||
|
let anchorElement = document.getElementById(anchorName);
|
||||||
|
if(anchorElement) { anchorElement.scrollIntoView(); }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
init = () => {
|
||||||
|
this.setState({
|
||||||
|
version: 'e8',
|
||||||
|
showVersion: 'e-cology8.0',
|
||||||
|
key: 'datasource',
|
||||||
|
selectedKey: '1',
|
||||||
|
hash:'',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
getMenu = (children) => {
|
||||||
|
return children.map(child => (
|
||||||
|
child.children.length
|
||||||
|
? <SubMenu
|
||||||
|
ecId={`${this && this.props && this.props.ecId || ''}_SubMenu@rtor8e@integrationDocxButton${child.key}`}
|
||||||
|
title={child.title}
|
||||||
|
key={child.key}
|
||||||
|
onTitleClick={(item) => this.handleClick(item)}
|
||||||
|
>{this.getMenu(child.children)}</SubMenu>
|
||||||
|
: <Menu.Item
|
||||||
|
ecId={`${this && this.props && this.props.ecId || ''}_MenuItem@nmirrf@integrationDocxButton${child.key}`}
|
||||||
|
key={child.key}
|
||||||
|
>{child.title}</Menu.Item>
|
||||||
|
))
|
||||||
|
}
|
||||||
|
|
||||||
|
handleClick = (item) => {
|
||||||
|
item && item.key && this.setState({
|
||||||
|
hash: `#${item.key}`
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
getTopDatas = () => {
|
||||||
|
let topDatas = [];
|
||||||
|
|
||||||
|
docxInfo[this.state.version] && docxInfo[this.state.version].topTitle && docxInfo[this.state.version].topTitle.map(data => {
|
||||||
|
if(data && data[this.state.key]) {
|
||||||
|
data[this.state.key].length && data[this.state.key].map((ds, index) => {
|
||||||
|
let children = this.getMenu(ds.children)
|
||||||
|
let menu = (<Menu ecId={`${this && this.props && this.props.ecId || ''}_Menu@ttou1z@integrationDocxTopDatas${index}`} onClick={(key) => this.handleClick(key)}></Menu>);
|
||||||
|
menu.props.children = children;
|
||||||
|
|
||||||
|
topDatas.push({
|
||||||
|
title: this.state.selectedKey == ds.key
|
||||||
|
? <Dropdown ecId={`${this && this.props && this.props.ecId || ''}_Dropdown@1bg24m@integrationDocxTopDatas${index}`} overlay={ds.children.length ? menu : <div></div>} trigger={['click']}>
|
||||||
|
<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@ejptyt@integrationDocxTopDatas${index}`} type="primary" className="ant-dropdown-link" onClick={() => this.scrollToAnchor(ds.key)}>
|
||||||
|
{ds.title}{ds.children.length ? <Icon ecId={`${this && this.props && this.props.ecId || ''}_Icon@vpfsyx@integrationDocxTopDatas${index}`} type={"down"} /> : ''}
|
||||||
|
</Button>
|
||||||
|
</Dropdown> : ds.title,
|
||||||
|
viewcondition: ds.key
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return topDatas;
|
||||||
|
}
|
||||||
|
|
||||||
|
getDatas = () => {
|
||||||
|
let datas = [];
|
||||||
|
|
||||||
|
docxInfo[this.state.version] && docxInfo[this.state.version].leftTitle && docxInfo[this.state.version].leftTitle.map(title => {
|
||||||
|
title && datas.push({
|
||||||
|
"canClick": true, // 标识节点是否可以点击 (单选 多选模式下生效)
|
||||||
|
"icon": "", // 图标展示
|
||||||
|
"id": title.key, // 节点唯一标识,作为key值。
|
||||||
|
"nodeid": title.key, // 节点唯一标识,作为key值(没设置的情况下取id)。 注意: 在单多选模式下,节点的id或者nodeid必须唯一(选中受控)
|
||||||
|
"isParent": false, // 父节点标识
|
||||||
|
"name": title.showName, // 名称
|
||||||
|
"dragDisabled": true, // 禁止节点拖拽
|
||||||
|
})
|
||||||
|
})
|
||||||
|
return datas;
|
||||||
|
}
|
||||||
|
|
||||||
|
handleSelect = (item) => {
|
||||||
|
item && this.setState({
|
||||||
|
version: item.key,
|
||||||
|
showVersion: item.item.props.children
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const dropMenuDatas = [{
|
||||||
|
companyid: 'e8',
|
||||||
|
name: 'ecology8.0'
|
||||||
|
}, {
|
||||||
|
companyid: 'e9',
|
||||||
|
name: 'ecology9.0'
|
||||||
|
}]
|
||||||
|
|
||||||
|
return (<div id="docx">
|
||||||
|
<div id="topPart">
|
||||||
|
<WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@hdofz3`}
|
||||||
|
title={getLabel('32269',"集成中心") + getLabel('275',"帮助") + getLabel('30041',"文档")}
|
||||||
|
icon={<i className="icon-coms-integration" />}
|
||||||
|
iconBgcolor="#1a57a0"
|
||||||
|
buttons={[]}
|
||||||
|
showDropIcon={true}
|
||||||
|
dropMenuDatas={[]}
|
||||||
|
dropMenuProps={{
|
||||||
|
collectParams: {
|
||||||
|
favname: getLabel('32269',"集成中心") + getLabel('275',"帮助") + getLabel('30041',"文档"),
|
||||||
|
favouritetype: 1,
|
||||||
|
objid: 0,
|
||||||
|
link: (window.ecologyContentPath || "") + "/spa/integration/static4engine/engine.html#/main/integration/docx",
|
||||||
|
importantlevel: 1
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
/></div>
|
||||||
|
<Row ecId={`${this && this.props && this.props.ecId || ''}_Row@d6r5bd`}>
|
||||||
|
<Col ecId={`${this && this.props && this.props.ecId || ''}_Col@xi1nx3`} span={3}>
|
||||||
|
<div className="leftContent" id="leftPart" >
|
||||||
|
<div id="menuPart">
|
||||||
|
<WeaDropMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaDropMenu@och5yp`}
|
||||||
|
dropMenu={dropMenuDatas}
|
||||||
|
defaultMenu={this.state.showVersion}
|
||||||
|
onSelect={(item) => this.handleSelect(item)} />
|
||||||
|
</div>
|
||||||
|
<div id="treePart">
|
||||||
|
<WeaTree ecId={`${this && this.props && this.props.ecId || ''}_WeaTree@8r02ww`}
|
||||||
|
className='content'
|
||||||
|
datas={this.getDatas()}
|
||||||
|
selectedKeys={this.state.key}
|
||||||
|
onSelect={(key) => this.setState({key, selectedKey: '1'})}
|
||||||
|
/>
|
||||||
|
<div className="download" id="downloadPart" style={{height: 20, paddingTop: 15, margin: 'auto'}}>
|
||||||
|
<Icon ecId={`${this && this.props && this.props.ecId || ''}_Icon@69csiv`} className="downloadIcon" type="arrow-down" onClick={() =>this.setState({key: 'download'})}/><a className="downHelpTip" onClick={() =>this.setState({key: 'download'})}>{getLabel('389462',"下载文档")}</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</Col>
|
||||||
|
<Col ecId={`${this && this.props && this.props.ecId || ''}_Col@eehykl`} span={21}>
|
||||||
|
<div id="rightPart" style={{overflow: 'auto'}}>
|
||||||
|
<WeaTab ecId={`${this && this.props && this.props.ecId || ''}_WeaTab@m3vk88`}
|
||||||
|
datas={this.getTopDatas()}
|
||||||
|
keyParam="viewcondition" //主键
|
||||||
|
onChange={v => this.setState({selectedKey: v})}
|
||||||
|
/>
|
||||||
|
<div style={{width: '100%', position: 'fixed'}} id="srcIframe">
|
||||||
|
<iframe src={this.state.key == 'download' ? `${window.ecologyContentPath || ""}/integration/info/${this.state.key}_${this.state.version}.jsp` : `${window.ecologyContentPath || ""}/integration/info/${this.state.key}_${this.state.version}_${this.state.selectedKey}.html${this.state.hash}`} width='98%' height="100%" scrolling="yes" frameBorder="0" align="top" left="0px" top="0px"></iframe>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
</div>)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
import React, { Component } from 'react';
|
||||||
|
import {Row, Col} from "antd";
|
||||||
|
import {WeaInput} from 'ecCom';
|
||||||
|
|
||||||
|
class Main extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
}
|
||||||
|
render() {
|
||||||
|
return ( <Row ecId={`${this && this.props && this.props.ecId || ''}_Row@9okssx`}>
|
||||||
|
<Col ecId={`${this && this.props && this.props.ecId || ''}_Col@ogyme3`} span={12} style={{paddingRight: 8}}>
|
||||||
|
<WeaInput ecId={`${this && this.props && this.props.ecId || ''}_WeaInput@vc1r0c`} {...this.props}
|
||||||
|
viewAttr={1}
|
||||||
|
hasBorder
|
||||||
|
value={this.props.leftValue}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
<Col ecId={`${this && this.props && this.props.ecId || ''}_Col@opi9x2`} span={12} style={{paddingLeft: 8}}>
|
||||||
|
<WeaInput ecId={`${this && this.props && this.props.ecId || ''}_WeaInput@yatuen`} {...this.props}/>
|
||||||
|
</Col>
|
||||||
|
</Row> );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Main;
|
||||||
|
|
@ -0,0 +1,174 @@
|
||||||
|
import React, { Component } from 'react';
|
||||||
|
import {toJS} from "mobx";
|
||||||
|
import {Button, Spin} from "antd";
|
||||||
|
import {observer, inject} from "mobx-react";
|
||||||
|
import {WeaDialog, WeaLocaleProvider, WeaRightMenu} from 'ecCom';
|
||||||
|
import {getForm, onCheck, checkUnique, doConfirm} from '../../util/IntegrationUtil';
|
||||||
|
|
||||||
|
const {getLabel} = WeaLocaleProvider;
|
||||||
|
|
||||||
|
@inject("alyMail")
|
||||||
|
@observer
|
||||||
|
class AddOrEdit extends Component {
|
||||||
|
|
||||||
|
componentWillUnmount() {
|
||||||
|
const {alyMail} = this.props;
|
||||||
|
alyMail.closeDialog();
|
||||||
|
}
|
||||||
|
|
||||||
|
getButtons = () => {
|
||||||
|
const {status: {formLoading, buttonDisabled}} = this.props.alyMail;
|
||||||
|
return [
|
||||||
|
<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@f0uefe@integrationIntemailAddDialogButtonSave`} type="primary" disabled={formLoading || buttonDisabled} onClick={() => this.onMenuClick("BTN_SAVE")}>{getLabel(30986, "保存")}</Button>,
|
||||||
|
<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@rql2zx@integrationIntemailAddDialogButtonTest`} type="primary" disabled={formLoading || buttonDisabled} onClick={() => this.onMenuClick("BTN_TEST")}>{getLabel(25496, "测试")}</Button>,
|
||||||
|
<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@3uhgdp@integrationIntemailAddDialogButtonInit`} type="primary" disabled={formLoading || buttonDisabled} onClick={() => this.onMenuClick("BTN_INIT")}>{getLabel(20873, "初始化")}</Button>,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
getRightMenus = () => {
|
||||||
|
const {status: {formLoading, buttonDisabled}} = this.props.alyMail;
|
||||||
|
return [{
|
||||||
|
key: "BTN_SAVE",
|
||||||
|
icon: <i className="icon-coms-Preservation"/>,
|
||||||
|
content: getLabel(30986, "保存"),
|
||||||
|
disabled: formLoading || buttonDisabled,
|
||||||
|
onClick: () => this.onMenuClick("BTN_SAVE"),
|
||||||
|
}, {
|
||||||
|
key: "BTN_TEST",
|
||||||
|
icon: <i className="icon-coms-currency-Task"/>,
|
||||||
|
content: getLabel(25496, "测试"),
|
||||||
|
disabled: formLoading || buttonDisabled,
|
||||||
|
onClick: () => this.onMenuClick("BTN_TEST"),
|
||||||
|
}, {
|
||||||
|
key: "BTN_INIT",
|
||||||
|
icon: <i className="icon-coms-operation"/>,
|
||||||
|
content: getLabel(20873, "初始化"),
|
||||||
|
disabled: formLoading || buttonDisabled,
|
||||||
|
onClick: () => this.onMenuClick("BTN_INIT"),
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
|
||||||
|
handleMenuClick = (type) => {
|
||||||
|
const {alyMail} = this.props;
|
||||||
|
const {form, mailForm, getMailSaveOperation, getMailAddSetForm, status: {operateIndex}} = alyMail;
|
||||||
|
let params = {}
|
||||||
|
if(type === "BTN_TEST") {
|
||||||
|
params = {operate: "test", mailMasterId: operateIndex};
|
||||||
|
}else if(type === "BTN_INIT") {
|
||||||
|
params = {operate: "init", mailMasterId: operateIndex};
|
||||||
|
} else if ("BTN_SAVE" === type) {
|
||||||
|
params = {operate: "save", mailMasterId: operateIndex};
|
||||||
|
}
|
||||||
|
let saveCallBack = (callback) => checkUnique({
|
||||||
|
tableName: 'Mail_master',
|
||||||
|
fieldName: 'syscode',
|
||||||
|
fieldValue: form.getFormParams().syscode.replace(/^(\s*)|(\s*)$/g, ''),
|
||||||
|
idName: 'id',
|
||||||
|
idValue: operateIndex
|
||||||
|
}, form, "syscode", "2", operateIndex, callback);
|
||||||
|
onCheck(form, () => {
|
||||||
|
if(operateIndex == "") {
|
||||||
|
if("BTN_TEST" === type || "BTN_INIT" === type) {
|
||||||
|
onCheck(mailForm, () => {
|
||||||
|
saveCallBack(() => {
|
||||||
|
getMailSaveOperation({...params, operate: "save"}, (result) => {
|
||||||
|
alyMail.setState({operateIndex: result.maxId});
|
||||||
|
getMailAddSetForm({mailMasterId: result.maxId}, () => getMailSaveOperation({...params, mailMasterId: result.maxId}));
|
||||||
|
})
|
||||||
|
})
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
onCheck(mailForm, () => saveCallBack(() => getMailSaveOperation(params)));
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
if("BTN_TEST" === type || "BTN_INIT" === type) {
|
||||||
|
saveCallBack(() => {
|
||||||
|
getMailSaveOperation({...params, operate: "save"}, () => {
|
||||||
|
getMailAddSetForm({mailMasterId: operateIndex}, () => getMailSaveOperation(params));
|
||||||
|
})
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
saveCallBack(() => getMailSaveOperation(params));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
onMenuClick = (type) => {
|
||||||
|
if("BTN_INIT" === type) {
|
||||||
|
doConfirm(getLabel('519656','确定要初始化吗?'), () => {
|
||||||
|
this.handleMenuClick(type);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.handleMenuClick(type);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
handleChange = (form, formParams, fields) => {
|
||||||
|
const {alyMail} = this.props;
|
||||||
|
const {status: {operateIndex}} = alyMail;
|
||||||
|
const key = fields.domkey[0];
|
||||||
|
if(key === "mailtype") {
|
||||||
|
alyMail.getMailSelectSetForm(form.getFormParams());
|
||||||
|
}else if(key === "syscode") {
|
||||||
|
const value = form.getFormParams()[key].replace(/^(\s*)|(\s*)$/g, '');
|
||||||
|
if(value) {
|
||||||
|
checkUnique({
|
||||||
|
tableName: 'Mail_master',
|
||||||
|
fieldName: 'syscode',
|
||||||
|
fieldValue: form.getFormParams()[key].replace(/^(\s*)|(\s*)$/g, ''),
|
||||||
|
idName: 'id',
|
||||||
|
idValue: operateIndex
|
||||||
|
}, form, key, "2", operateIndex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
otherDom = (form, fields) => {
|
||||||
|
const key = fields.domkey[0];
|
||||||
|
if(key === "email163_pubkey") {
|
||||||
|
return <Button ecId={`${this && this.props && this.props.ecId || ''}_Button@7jpdjd`} style={{position: 'absolute', marginLeft: 30, marginTop: 25}} onClick={this.props.alyMail.createSecretKey}>{getLabel('503390','生成公私钥')}</Button>
|
||||||
|
}else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const {alyMail} = this.props;
|
||||||
|
const {status: {baseDialogVisible, condition, operateIndex, formLoading, mailFormCondition, mailFormLoading, buttonDisabled}, form, mailForm} = alyMail;
|
||||||
|
return (
|
||||||
|
<WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@g4kuwb`}
|
||||||
|
title={operateIndex ? getLabel('521921','编辑邮箱') : getLabel('521922','新建邮箱')}
|
||||||
|
visible={baseDialogVisible}
|
||||||
|
style={{width: 800, height: 600}}
|
||||||
|
onCancel={alyMail.closeDialog}
|
||||||
|
hasScroll
|
||||||
|
buttons={this.getButtons()}
|
||||||
|
moreBtn={{
|
||||||
|
datas: this.getRightMenus(),
|
||||||
|
collection: []
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@r84m7d`}
|
||||||
|
datas={this.getRightMenus()}
|
||||||
|
collection={[]}
|
||||||
|
>
|
||||||
|
<Spin ecId={`${this && this.props && this.props.ecId || ''}_Spin@wo4ork`} spinning={buttonDisabled}>
|
||||||
|
{
|
||||||
|
operateIndex
|
||||||
|
? (!formLoading) && getForm(form, toJS(condition), true, this.handleChange, this.otherDom)
|
||||||
|
: <div>
|
||||||
|
{(!formLoading) && getForm(form, toJS(condition), false, this.handleChange)}
|
||||||
|
<div style={{marginTop: -25}}>
|
||||||
|
{(!mailFormLoading) && getForm(mailForm, toJS(mailFormCondition), false, null, this.otherDom)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
</Spin>
|
||||||
|
</WeaRightMenu>
|
||||||
|
</WeaDialog>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default AddOrEdit;
|
||||||
|
|
@ -0,0 +1,405 @@
|
||||||
|
import React, { Component } from 'react';
|
||||||
|
import {
|
||||||
|
inject,
|
||||||
|
observer
|
||||||
|
} from 'mobx-react';
|
||||||
|
import {toJS} from "mobx";
|
||||||
|
import {WeaRightMenu, WeaTop, WeaTab, WeaLocaleProvider, WeaHelpfulTip, WeaFormItem, WeaSearchGroup} from "ecCom";
|
||||||
|
import {Button, Spin} from "antd";
|
||||||
|
import {WeaTableNew, WeaSwitch} from "comsMobx";
|
||||||
|
import {getSearchBtns, getAdvancedItem} from '../../util/IntegrationUtil';
|
||||||
|
import MainTable from "../login/MainTable";
|
||||||
|
import isEmpty from 'lodash/isEmpty';
|
||||||
|
import CronExp from '../../public/CronExp';
|
||||||
|
import '../../style/email.less';
|
||||||
|
|
||||||
|
const {getLabel} = WeaLocaleProvider;
|
||||||
|
const {WeaTable} = WeaTableNew;
|
||||||
|
|
||||||
|
@inject('intelogin')
|
||||||
|
@observer
|
||||||
|
export default class Header extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
tabDatas: [
|
||||||
|
{
|
||||||
|
color: "#000000",
|
||||||
|
groupid: "flowAll",
|
||||||
|
showcount: true,
|
||||||
|
title: getLabel('505949','集成列表'),
|
||||||
|
viewcondition: 0
|
||||||
|
}
|
||||||
|
, {
|
||||||
|
color: "#000000",
|
||||||
|
groupid: "flowAll",
|
||||||
|
showcount: true,
|
||||||
|
title: getLabel(20960, "集成登录"),
|
||||||
|
viewcondition: 1
|
||||||
|
}
|
||||||
|
, {
|
||||||
|
color: "#000000",
|
||||||
|
groupid: "flowAll",
|
||||||
|
showcount: true,
|
||||||
|
title: getLabel(125928, "同步日志"),
|
||||||
|
viewcondition: 2
|
||||||
|
}
|
||||||
|
, {
|
||||||
|
color: "#000000",
|
||||||
|
groupid: "flowAll",
|
||||||
|
showcount: true,
|
||||||
|
title: getLabel('516042','日志清理'),
|
||||||
|
viewcondition: 3
|
||||||
|
}
|
||||||
|
],
|
||||||
|
baseRightMenus: [{
|
||||||
|
key: "BTN_NEW",
|
||||||
|
icon: <i className="icon-coms-New-Flow"/>,
|
||||||
|
content: getLabel('365','新建'),
|
||||||
|
type: "primary"
|
||||||
|
}, {
|
||||||
|
key: "BTN_DELETE",
|
||||||
|
icon: <i className="icon-coms-delete"/>,
|
||||||
|
content: getLabel('32136','批量删除'),
|
||||||
|
type: "primary"
|
||||||
|
}],
|
||||||
|
logRightMenus: [{
|
||||||
|
key: "BTN_INTERVAL_SAVE",
|
||||||
|
icon: <i className="icon-coms-Preservation"/>,
|
||||||
|
content: getLabel(30986, "保存"),
|
||||||
|
type: "primary"
|
||||||
|
}],
|
||||||
|
showSearchAd: false,
|
||||||
|
selectedKey: "0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getBtns = () => {
|
||||||
|
const {selectedKey, baseRightMenus, logRightMenus} = this.state;
|
||||||
|
const {
|
||||||
|
intelogin,
|
||||||
|
initLoading,
|
||||||
|
} = this.props, {
|
||||||
|
menus
|
||||||
|
} = intelogin, {
|
||||||
|
outTopButtons=[]
|
||||||
|
} = menus;
|
||||||
|
let datas = [];
|
||||||
|
if(selectedKey == 1) {
|
||||||
|
return outTopButtons.map(item =>
|
||||||
|
<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@x4rvrh@integrationIntemailButton${item.key || ""}`}
|
||||||
|
disabled={item.disabled}
|
||||||
|
key={item.key}
|
||||||
|
type={item.type || "primary"}
|
||||||
|
onClick={() => item.onClick({type: "mail"})}
|
||||||
|
>{item.content}</Button>
|
||||||
|
)
|
||||||
|
}else {
|
||||||
|
if(selectedKey == 0) {
|
||||||
|
datas = [...baseRightMenus];
|
||||||
|
}else if(selectedKey == 2) {
|
||||||
|
datas = [...this.props.rightMenus];
|
||||||
|
}else if(selectedKey == 3) {
|
||||||
|
datas = [...logRightMenus];
|
||||||
|
}
|
||||||
|
return datas.map(item =>
|
||||||
|
<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@9p8xuw@integrationIntemailButton${item.key || ""}`}
|
||||||
|
disabled={this.props.buttonLoading || initLoading || (item.key==="BTN_DELETE" && toJS(this.props.tableStore.selectedRowKeys).length == 0)}
|
||||||
|
key={item.key}
|
||||||
|
type={item.type}
|
||||||
|
onClick={() => this.onMenuClick(item.key)}
|
||||||
|
>{item.content}</Button>);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
getRightMenus = () => {
|
||||||
|
const {selectedKey, baseRightMenus, logRightMenus} = this.state;
|
||||||
|
const {
|
||||||
|
intelogin,
|
||||||
|
initLoading,
|
||||||
|
} = this.props, {
|
||||||
|
menus
|
||||||
|
} = intelogin, {
|
||||||
|
dropMenuDatas=[]
|
||||||
|
} = menus;
|
||||||
|
|
||||||
|
if(selectedKey == 1) {
|
||||||
|
return dropMenuDatas.map(item => {
|
||||||
|
if(item.key === "BTN_NEW") {
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
disabled: item.disabled
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
onClick: () => item.onClick({typename: this.props.typename})
|
||||||
|
};
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else {
|
||||||
|
let buttons = [], columnSet = {
|
||||||
|
key: "BTN_COLUMN",
|
||||||
|
icon: <i className="icon-coms-Custom"/>,
|
||||||
|
content: getLabel(32535, "显示列定制"),
|
||||||
|
onClick: () => this.onMenuClick("BTN_COLUMN")
|
||||||
|
}, logSet = {
|
||||||
|
key: "BTN_LOG",
|
||||||
|
icon: <i className="icon-coms-Custom"/>,
|
||||||
|
content: getLabel('83','日志'),
|
||||||
|
onClick: () => this.onMenuClick("BTN_LOG")
|
||||||
|
};
|
||||||
|
if(selectedKey == 0) {
|
||||||
|
buttons = [...baseRightMenus];
|
||||||
|
buttons.push(logSet);
|
||||||
|
buttons.push(columnSet);
|
||||||
|
}else if(selectedKey == 2) {
|
||||||
|
buttons = [...this.props.rightMenus];
|
||||||
|
buttons.push(columnSet);
|
||||||
|
}else if(selectedKey == 3) {
|
||||||
|
buttons = [...logRightMenus];
|
||||||
|
}
|
||||||
|
return buttons.map(item => {
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
disabled: this.props.buttonLoading || initLoading || (item.key === "BTN_DELETE" && toJS(this.props.tableStore.selectedRowKeys).length === 0),
|
||||||
|
onClick: () => this.onMenuClick(item.key)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onMenuClick = (type, record=null) => {
|
||||||
|
const {selectedKey} = this.state;
|
||||||
|
this.props.onMenuClick(selectedKey, type, record);
|
||||||
|
}
|
||||||
|
|
||||||
|
getButtonAd = () => {
|
||||||
|
const {
|
||||||
|
intelogin,
|
||||||
|
} = this.props, {
|
||||||
|
mainTab,
|
||||||
|
} = intelogin, {
|
||||||
|
form,
|
||||||
|
} = mainTab;
|
||||||
|
let resetFun = () => this.state.selectedKey == 0 ? this.props.searchForm1.reset() : this.state.selectedKey == 1 ? form.reset() : this.props.searchForm.reset();
|
||||||
|
let closeFun = () => this.setState({showSearchAd: false});
|
||||||
|
return getSearchBtns(this.getSearchFun, resetFun, closeFun, this && this.props && this.props.ecId || '', "integrationIntemail");
|
||||||
|
}
|
||||||
|
|
||||||
|
getSearchFun = () => {
|
||||||
|
if(this.state.selectedKey == 1) {
|
||||||
|
const {
|
||||||
|
intelogin,
|
||||||
|
} = this.props;
|
||||||
|
intelogin.search({type: "mail"});
|
||||||
|
} else {
|
||||||
|
this.props.onSearch(this.state.selectedKey);
|
||||||
|
}
|
||||||
|
this.setState({showSearchAd: false});
|
||||||
|
}
|
||||||
|
|
||||||
|
onOperatesClick = (record, index, operate) => {
|
||||||
|
this.onMenuClick(operate.index, record);
|
||||||
|
};
|
||||||
|
|
||||||
|
getColumnsInfo = (data) => {
|
||||||
|
const {selectedKey} = this.state;
|
||||||
|
if(selectedKey == 0) {
|
||||||
|
if(!isEmpty(data)) {
|
||||||
|
for(let index = 0; index < data.length; index++) {
|
||||||
|
if(data[index].dbField == "syscode") {
|
||||||
|
data[index].render = (text, record, index) => {
|
||||||
|
return (<a onClick={() => this.onMenuClick("BTN_EDIT", record)}>{text}</a>);
|
||||||
|
}
|
||||||
|
} else if(data[index].dataIndex === "mailicon") {
|
||||||
|
data[index].render = (text, record, index) => {
|
||||||
|
return record.mailtype == '1'
|
||||||
|
? <div style={{
|
||||||
|
background: "red",
|
||||||
|
color: "white",
|
||||||
|
width: 30,
|
||||||
|
height: 30,
|
||||||
|
borderRadius: "50%",
|
||||||
|
textAlign: "center",
|
||||||
|
lineHeight: "30px",
|
||||||
|
fontSize: 18,
|
||||||
|
}}><i className="icon-coms02-ali-mail" /></div>
|
||||||
|
: record.mailtype == '2'
|
||||||
|
? <div style={{
|
||||||
|
background: "red",
|
||||||
|
color: "white",
|
||||||
|
width: 30,
|
||||||
|
height: 30,
|
||||||
|
borderRadius: "50%",
|
||||||
|
textAlign: "center",
|
||||||
|
lineHeight: "30px",
|
||||||
|
fontSize: 18,
|
||||||
|
}}><i className="icon-coms02-wangyi" /></div>
|
||||||
|
: null;
|
||||||
|
}
|
||||||
|
} else if(data[index].dataIndex === "isuse") {
|
||||||
|
data[index].render = (text, record, index) => {
|
||||||
|
return record.isuse == 0 ? getLabel('21888','未开启') : <span style={{color: "green"}}>{getLabel('21889','已开启')}</span>;
|
||||||
|
}
|
||||||
|
} else if(data[index].dataIndex === "issync") {
|
||||||
|
data[index].render = (text, record, index) => {
|
||||||
|
return record.issync == 0 ? getLabel('21888','未开启') : <span style={{color: "green"}}>{getLabel('21889','已开启')}</span>;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 日志清理
|
||||||
|
getForm = (form, datas=[]) => {
|
||||||
|
const {isFormInit} = form;
|
||||||
|
let group = [];
|
||||||
|
const formParams = form.getFormParams();
|
||||||
|
isFormInit && datas && datas.forEach((c, index) => {
|
||||||
|
let items = [];
|
||||||
|
c && c.items && c.items.forEach(fields => {
|
||||||
|
let dom = null, key = fields.domkey[0];
|
||||||
|
if(key === "cleanCronExpr") {
|
||||||
|
dom = <CronExp ecId={`${this && this.props && this.props.ecId || ''}_CronExp@rzes9u@integrationIntemailLogForm${key || ""}`}
|
||||||
|
key={key}
|
||||||
|
value={form.getFormParams().cleanCronExpr}
|
||||||
|
field={fields}
|
||||||
|
onChange={v => form.updateFields({cleanCronExpr: v.trim()})}
|
||||||
|
/>;
|
||||||
|
} else{
|
||||||
|
dom = <WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@tuaydj@integrationIntemailLogForm${key || ""}`} fieldConfig={fields} form={form} formParams={formParams} />;
|
||||||
|
}
|
||||||
|
items.push({
|
||||||
|
com: (
|
||||||
|
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@cb1o9j@integrationIntemailLogForm${key || ""}`}
|
||||||
|
label={`${fields.label}`}
|
||||||
|
labelCol={{span: `${fields.labelcol}`}}
|
||||||
|
wrapperCol={{span: `${fields.fieldcol}`}}
|
||||||
|
error={form.getError(fields)}
|
||||||
|
tipPosition="bottom"
|
||||||
|
>
|
||||||
|
<nobr>
|
||||||
|
{dom}
|
||||||
|
{
|
||||||
|
key === "cleanType"
|
||||||
|
? <WeaHelpfulTip ecId={`${this && this.props && this.props.ecId || ''}_WeaHelpfulTip@p7159s@integrationIntemailLogForm${key || ""}`} title={getLabel('516454','自动清理日志数据将清理该时间之前的数据')} style={{marginLeft: 15, lineHeight: "30px", position: "absolute"}} />
|
||||||
|
: null
|
||||||
|
}
|
||||||
|
</nobr>
|
||||||
|
</WeaFormItem>),
|
||||||
|
colSpan: 1,
|
||||||
|
hide: form.isHide(fields, (keys, allParams) => {
|
||||||
|
let bool = false;
|
||||||
|
fields.domkey[0] != "cleanStatus" && allParams.cleanStatus != 1 && (bool=true);
|
||||||
|
fields && fields.showWhere && fields.showWhere.length > 0 && fields.showWhere.map(w => {
|
||||||
|
if(!bool){
|
||||||
|
let show = false;
|
||||||
|
for(let val of w.value){
|
||||||
|
if(allParams[w.domkey] == val){
|
||||||
|
show = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
bool = !show;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return bool;
|
||||||
|
})
|
||||||
|
});
|
||||||
|
})
|
||||||
|
group.push(<WeaSearchGroup ecId={`${this && this.props && this.props.ecId || ''}_WeaSearchGroup@mgthpv@integrationIntemailLogForm${index || ""}`} col={1} center={true} needTigger={true} title={c.title} showGroup={c.defaultshow} items={items}/>)
|
||||||
|
});
|
||||||
|
return group;
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const {
|
||||||
|
tabDatas,
|
||||||
|
showSearchAd,
|
||||||
|
selectedKey,
|
||||||
|
} = this.state, {
|
||||||
|
intelogin,
|
||||||
|
initLoading,
|
||||||
|
} = this.props, {
|
||||||
|
searchsAd,
|
||||||
|
mainTab,
|
||||||
|
} = intelogin, {
|
||||||
|
condition,
|
||||||
|
} = mainTab;
|
||||||
|
let advanceHeight = 72,
|
||||||
|
datas = selectedKey == 0 ? this.props.searchCondition1 : selectedKey == 1 ? condition : this.props.searchCondition,
|
||||||
|
form = selectedKey == 0 ? this.props.searchForm1 : selectedKey == 1 ? mainTab.form : this.props.searchForm,
|
||||||
|
searchKey = selectedKey == 1 ? 'name' : this.props.searchKey;
|
||||||
|
try{
|
||||||
|
advanceHeight = Math.ceil(datas[0].items.length/2) * 72;
|
||||||
|
}catch(err){}
|
||||||
|
let hasAdSearch = selectedKey != 3;
|
||||||
|
return (
|
||||||
|
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@ve3z4i`}
|
||||||
|
datas={this.getRightMenus()}
|
||||||
|
collectParams={this.props.collectParams}
|
||||||
|
>
|
||||||
|
<div className="inte-email">
|
||||||
|
<WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@86n2hp`}
|
||||||
|
title={this.props.title}
|
||||||
|
icon={<i className="icon-coms-integration"/>}
|
||||||
|
iconBgcolor="#1a57a0"
|
||||||
|
buttons={this.getBtns()}
|
||||||
|
showDropIcon={true}
|
||||||
|
dropMenuDatas={this.getRightMenus()}
|
||||||
|
dropMenuProps={{
|
||||||
|
collectParams: this.props.collectParams
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<WeaTab ecId={`${this && this.props && this.props.ecId || ''}_WeaTab@2t9f5y`}
|
||||||
|
datas={tabDatas}
|
||||||
|
keyParam="viewcondition"
|
||||||
|
countParam="groupid"
|
||||||
|
selectedKey={selectedKey}
|
||||||
|
searchType={hasAdSearch ? ['base', 'advanced'] : []}
|
||||||
|
advanceHeight={advanceHeight}
|
||||||
|
searchsAd={selectedKey == 1 ? searchsAd : getAdvancedItem(form, datas, this.getSearchFun, false, this && this.props && this.props.ecId || '', "integrationIntemail")}
|
||||||
|
buttonsAd={this.getButtonAd()}
|
||||||
|
searchsBaseValue={hasAdSearch ? form.getFormParams()[searchKey] : ""}
|
||||||
|
onSearchChange={value => form.updateFields({[searchKey]: value})}
|
||||||
|
onSearch={this.getSearchFun}
|
||||||
|
showSearchAd={showSearchAd}
|
||||||
|
setShowSearchAd={showSearchAd => this.setState({showSearchAd})}
|
||||||
|
hideSearchAd={() => this.setState({showSearchAd: false})}
|
||||||
|
onChange={v => {
|
||||||
|
this.setState({selectedKey: v});
|
||||||
|
if(v == 1) {
|
||||||
|
mainTab.form.reset();
|
||||||
|
}
|
||||||
|
if(this.props.onChange && typeof(this.props.onChange) === "function") {
|
||||||
|
this.props.onChange(v);
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
{
|
||||||
|
selectedKey == 3
|
||||||
|
? <div className="email-log-setting">
|
||||||
|
{this.getForm(this.props.form, this.props.condition)}
|
||||||
|
</div>
|
||||||
|
: selectedKey == 1
|
||||||
|
? this.props.buttonLoading
|
||||||
|
? null
|
||||||
|
: <MainTable ecId={`${this && this.props && this.props.ecId || ''}_MainTable@yqs00l`} type={"mail"} />
|
||||||
|
: <Spin ecId={`${this && this.props && this.props.ecId || ''}_Spin@mkzk0o`} size="large" spinning={initLoading && selectedKey == 0 && (!this.props.showDialog)}>
|
||||||
|
<WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@mfrmcb`}
|
||||||
|
key={selectedKey}
|
||||||
|
comsWeaTableStore={this.props.tableStore}
|
||||||
|
hasOrder={true}
|
||||||
|
needScroll={true}
|
||||||
|
onOperatesClick={this.onOperatesClick}
|
||||||
|
getColumns={this.getColumnsInfo}
|
||||||
|
/>
|
||||||
|
</Spin>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</WeaRightMenu>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,195 @@
|
||||||
|
import React, { Component } from 'react';
|
||||||
|
import {toJS} from "mobx";
|
||||||
|
import {observer, inject} from "mobx-react";
|
||||||
|
import {WeaLocaleProvider} from "ecCom";
|
||||||
|
import {WeaForm, WeaLogView} from 'comsMobx';
|
||||||
|
import Header from './Header';
|
||||||
|
import {onCheck, doConfirm} from '../../util/IntegrationUtil';
|
||||||
|
import AddOrEdit from './AddOrEdit';
|
||||||
|
import NoRight from "../../public/NoRight";
|
||||||
|
import NonStand from "../../public/NonStand";
|
||||||
|
|
||||||
|
const WeaLogViewComp = WeaLogView.Component;
|
||||||
|
const {getLabel} = WeaLocaleProvider;
|
||||||
|
|
||||||
|
@inject("alyMail")
|
||||||
|
@observer
|
||||||
|
export default class alymail extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
targetId: "",
|
||||||
|
visible: false,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
this.props.alyMail.doInit();
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps) {
|
||||||
|
if(nextProps.location.key != this.props.location.key) {
|
||||||
|
this.props.alyMail.doInit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
handleChangeTab = (selectedKey) => {
|
||||||
|
const {alyMail} = this.props;
|
||||||
|
const {getMailCondition, getLogInfo, getMailList} = alyMail;
|
||||||
|
|
||||||
|
if(selectedKey == 3) {
|
||||||
|
alyMail.getLogSettingFields();
|
||||||
|
}else if(selectedKey == 2) {
|
||||||
|
getLogInfo();
|
||||||
|
}else if(selectedKey == 0) {
|
||||||
|
getMailCondition(getMailList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onSearch = (selectedKey) => {
|
||||||
|
const {alyMail} = this.props;
|
||||||
|
const {searchForm, getLogDatas, getMailList, searchForm1} = alyMail;
|
||||||
|
|
||||||
|
if(selectedKey == 2) {
|
||||||
|
getLogDatas(searchForm.getFormParams());
|
||||||
|
}else if(selectedKey == 0) {
|
||||||
|
getMailList(searchForm1.getFormParams());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onMenuClick = (selectedKey, type="", record=null) => {
|
||||||
|
const {alyMail} = this.props;
|
||||||
|
const {tableStore, getMailAddSetForm, getMailSaveOperation, getMailSelectSetForm, getMailDeleteOperation, logSettingForm, saveLogSetting} = alyMail;
|
||||||
|
|
||||||
|
if(type.toLocaleUpperCase() === "BTN_COLUMN") {
|
||||||
|
tableStore.setColSetVisible(true);
|
||||||
|
tableStore.tableColSet(true);
|
||||||
|
}else {
|
||||||
|
if(selectedKey == "0") {
|
||||||
|
let ids = record ? record.randomField0 : toJS(tableStore.selectedRowKeys);
|
||||||
|
if(type === "BTN_NEW") {
|
||||||
|
alyMail.setState({
|
||||||
|
baseDialogVisible: true,
|
||||||
|
operateIndex: "",
|
||||||
|
formLoading: false,
|
||||||
|
buttonDisabled: false,
|
||||||
|
});
|
||||||
|
alyMail.mailForm = new WeaForm();
|
||||||
|
getMailAddSetForm({mailtype: 1});
|
||||||
|
getMailSelectSetForm({mailtype: 1});
|
||||||
|
}else if(["BTN_DELETE", "1"].includes(type)) {
|
||||||
|
let content = getLabel(385625, '确定要删除选择的记录吗?');
|
||||||
|
if(record) {
|
||||||
|
content = getLabel(15097, '确定要删除吗?');
|
||||||
|
}
|
||||||
|
doConfirm(content, getMailDeleteOperation, {operate: "delete", mailMasterIds: ids});
|
||||||
|
}else if(["BTN_EDIT", "0"].includes(type)) {
|
||||||
|
alyMail.setState({
|
||||||
|
baseDialogVisible: true,
|
||||||
|
operateIndex: ids,
|
||||||
|
formLoading: false,
|
||||||
|
buttonDisabled: false,
|
||||||
|
});
|
||||||
|
getMailAddSetForm({mailMasterId: ids});
|
||||||
|
}else if(type === "2") {
|
||||||
|
getMailSaveOperation({operate: "test", mailMasterId: ids});
|
||||||
|
}else if(type === "3") {
|
||||||
|
let content = getLabel('519656','确定要初始化吗?');
|
||||||
|
doConfirm(content, getMailSaveOperation, {operate: "init", mailMasterId: ids});
|
||||||
|
}else if(type === "BTN_LOG" || type == "4") {
|
||||||
|
this.setState({
|
||||||
|
visible: true,
|
||||||
|
targetId: record ? record.randomField0 : "",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else if(selectedKey == "3") {
|
||||||
|
if(type === "BTN_INTERVAL_SAVE") {
|
||||||
|
onCheck(logSettingForm, () => {
|
||||||
|
const formParams = logSettingForm.getFormParams();
|
||||||
|
try{
|
||||||
|
if(formParams.cleanType == "4") {
|
||||||
|
if(formParams.cleanCustomValue === undefined) {
|
||||||
|
logSettingForm.showError("cleanType", getLabel('516269','"日志记录" 未填写'));
|
||||||
|
}else {
|
||||||
|
saveLogSetting({
|
||||||
|
...formParams,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
saveLogSetting({
|
||||||
|
...formParams,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}catch(err) {}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
closeLogDialog = () => this.setState({visible: false, targetId: ""});
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const {alyMail} = this.props;
|
||||||
|
const {logSettingForm, form, tableStore, searchForm, logStore, searchForm1, status: {
|
||||||
|
hasNonStandard,
|
||||||
|
nonStandLoading,
|
||||||
|
logSettingCondition,
|
||||||
|
buttonDisabled,
|
||||||
|
buttonLoading,
|
||||||
|
searchCondition,
|
||||||
|
buttons,
|
||||||
|
searchCondition1,
|
||||||
|
hasRightLoading,
|
||||||
|
hasRight,
|
||||||
|
baseDialogVisible,
|
||||||
|
}} = alyMail;
|
||||||
|
const {visible, targetId} = this.state;
|
||||||
|
return (nonStandLoading
|
||||||
|
? null
|
||||||
|
: hasNonStandard
|
||||||
|
? hasRightLoading
|
||||||
|
? null
|
||||||
|
: hasRight
|
||||||
|
? <div style={{height: "100%"}}>
|
||||||
|
<Header ecId={`${this && this.props && this.props.ecId || ''}_Header@p2amlc`}
|
||||||
|
showDialog={baseDialogVisible}
|
||||||
|
initLoading={buttonDisabled}
|
||||||
|
title={getLabel('517408','邮箱集成')}
|
||||||
|
typename={12}
|
||||||
|
buttonLoading={buttonLoading}
|
||||||
|
form={logSettingForm}
|
||||||
|
condition={toJS(logSettingCondition)}
|
||||||
|
searchForm={searchForm}
|
||||||
|
searchForm1={searchForm1}
|
||||||
|
searchCondition1={toJS(searchCondition1)}
|
||||||
|
searchCondition={toJS(searchCondition)}
|
||||||
|
addOutter={form.getFormParams().isuse}
|
||||||
|
rightMenus={buttons}
|
||||||
|
searchKey={"syscode"}
|
||||||
|
collectParams={{
|
||||||
|
favname: getLabel('517408','邮箱集成'),
|
||||||
|
favouritetype: 1,
|
||||||
|
objid: 0,
|
||||||
|
link: "wui/engine.html#/integration/alymail",
|
||||||
|
importantlevel: 1
|
||||||
|
}}
|
||||||
|
tableStore={tableStore}
|
||||||
|
onSearch={this.onSearch}
|
||||||
|
onMenuClick={this.onMenuClick}
|
||||||
|
onChange={v => this.handleChangeTab(v)}
|
||||||
|
/>
|
||||||
|
<AddOrEdit ecId={`${this && this.props && this.props.ecId || ''}_AddOrEdit@8ocs46`}/>
|
||||||
|
<WeaLogViewComp ecId={`${this && this.props && this.props.ecId || ''}_WeaLogViewComp@f961k4`}
|
||||||
|
visible={visible}
|
||||||
|
onCancel={this.closeLogDialog}
|
||||||
|
logStore={logStore}
|
||||||
|
logType="15"
|
||||||
|
logSmallType="99"
|
||||||
|
targetId={targetId} />
|
||||||
|
</div>
|
||||||
|
: <NoRight ecId={`${this && this.props && this.props.ecId || ''}_NoRight@9u6bqq`} />
|
||||||
|
: <NonStand ecId={`${this && this.props && this.props.ecId || ''}_NonStand@66pp7q`} />
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,119 @@
|
||||||
|
import React from 'react';
|
||||||
|
import { inject, observer } from 'mobx-react';
|
||||||
|
import { toJS } from 'mobx';
|
||||||
|
import {
|
||||||
|
WeaLocaleProvider,
|
||||||
|
WeaTop,
|
||||||
|
WeaTab,
|
||||||
|
WeaSearchGroup,
|
||||||
|
WeaAppCenter,
|
||||||
|
WeaRightMenu,
|
||||||
|
} from 'ecCom';
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
@inject('homepageStore','routing')
|
||||||
|
@observer
|
||||||
|
class IntegrationHomePage extends React.Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillMount() {
|
||||||
|
const { homepageStore } = this.props;
|
||||||
|
homepageStore.getApps();
|
||||||
|
}
|
||||||
|
|
||||||
|
onClick = datas => {
|
||||||
|
// const { pathname, basename } = this.props.location;
|
||||||
|
// const hashname = pathname + basename;
|
||||||
|
// const urlHashIndex = hashname.indexOf('/integration/');
|
||||||
|
|
||||||
|
// if(urlHashIndex === -1) {
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if(urlHashIndex === 0) {
|
||||||
|
// weaHistory.push({ pathname: datas.routeUrl });
|
||||||
|
// } else {
|
||||||
|
// const prefix = pathname.substr(0, urlHashIndex);
|
||||||
|
// weaHistory.push({ pathname: `${prefix}${datas.routeUrl}` });
|
||||||
|
// }
|
||||||
|
|
||||||
|
// console.log(this.props.location)
|
||||||
|
const { routing } = this.props;
|
||||||
|
window.doEngineThemeAction('onSubMenuClick', { infoId: datas.appid })
|
||||||
|
datas.issingle == '0' ? routing.push(datas.routeUrl) : window.open(datas.routeUrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { homepageStore } = this.props;
|
||||||
|
const {
|
||||||
|
loading,
|
||||||
|
tabDatas,
|
||||||
|
selectedKey,
|
||||||
|
functionals,
|
||||||
|
products,
|
||||||
|
auth_center_server,
|
||||||
|
auth_center_client,
|
||||||
|
auth_center_other
|
||||||
|
} = homepageStore;
|
||||||
|
const collectParams = {
|
||||||
|
favname: getLabel(32269, '集成中心'),
|
||||||
|
favouritetype: 2,
|
||||||
|
objid: 0,
|
||||||
|
importantlevel: 1,
|
||||||
|
link: 'wui/engine.html#/main/integration/homepage',
|
||||||
|
};
|
||||||
|
let datas = selectedKey == 0 ? toJS(functionals) : selectedKey == 1 ? toJS(products) : [];
|
||||||
|
return (
|
||||||
|
<WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@qg151p`}
|
||||||
|
title={getLabel(32269, '集成中心')}
|
||||||
|
icon={<i className='icon-coms-integration' />}
|
||||||
|
iconBgcolor='#1a57a0'
|
||||||
|
loading={loading}
|
||||||
|
buttons={[]}
|
||||||
|
buttonSpace={10}
|
||||||
|
showDropIcon={true}
|
||||||
|
dropMenuProps={{
|
||||||
|
collectParams: collectParams
|
||||||
|
}}>
|
||||||
|
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@tuv7yv`} collectParams={collectParams}>
|
||||||
|
<WeaTab ecId={`${this && this.props && this.props.ecId || ''}_WeaTab@583yt0`}
|
||||||
|
keyParam={"key"}
|
||||||
|
selectedKey={selectedKey}
|
||||||
|
datas={toJS(tabDatas)}
|
||||||
|
onChange={v => homepageStore.selectedKey = v}
|
||||||
|
/>
|
||||||
|
{
|
||||||
|
selectedKey == 2
|
||||||
|
? <div>
|
||||||
|
<WeaSearchGroup ecId={`${this && this.props && this.props.ecId || ''}_WeaSearchGroup@ispet3`} col={1} needTigger={true} title={getLabel('516457','认证服务管理')} showGroup={true} items={[]}>
|
||||||
|
<div className="portal-ac-center">
|
||||||
|
<WeaAppCenter ecId={`${this && this.props && this.props.ecId || ''}_WeaAppCenter@3u9wda`} pageNum={4} datas={toJS(auth_center_server)} dots={toJS(auth_center_server).length/4 > 1} onClick={this.onClick} />
|
||||||
|
</div>
|
||||||
|
</WeaSearchGroup>
|
||||||
|
<WeaSearchGroup ecId={`${this && this.props && this.props.ecId || ''}_WeaSearchGroup@cx7k3p`} col={1} needTigger={true} title={getLabel('516740','认证接入管理')} showGroup={true} items={[]}>
|
||||||
|
<div className="portal-ac-center">
|
||||||
|
<WeaAppCenter ecId={`${this && this.props && this.props.ecId || ''}_WeaAppCenter@5xz5li`} pageNum={4} datas={toJS(auth_center_client)} dots={toJS(auth_center_client).length/4 > 1} onClick={this.onClick} />
|
||||||
|
</div>
|
||||||
|
</WeaSearchGroup>
|
||||||
|
<WeaSearchGroup ecId={`${this && this.props && this.props.ecId || ''}_WeaSearchGroup@hr5rrl`} col={1} needTigger={true} title={getLabel('25740','其他')} showGroup={true} items={[]}>
|
||||||
|
<div className="portal-ac-center">
|
||||||
|
<WeaAppCenter ecId={`${this && this.props && this.props.ecId || ''}_WeaAppCenter@uzl2yk`} pageNum={4} datas={toJS(auth_center_other)} dots={toJS(auth_center_other).length/4 > 1} onClick={this.onClick} />
|
||||||
|
</div>
|
||||||
|
</WeaSearchGroup>
|
||||||
|
</div>
|
||||||
|
: <WeaSearchGroup ecId={`${this && this.props && this.props.ecId || ''}_WeaSearchGroup@j7mqmo`} col={1} needTigger={false} showGroup={true} items={[]}>
|
||||||
|
<div className="portal-ac-center">
|
||||||
|
<WeaAppCenter ecId={`${this && this.props && this.props.ecId || ''}_WeaAppCenter@oydt6r`} datas={datas} pageNum={Math.ceil(datas.length/4)*4} dots={false} onClick={this.onClick} />
|
||||||
|
</div>
|
||||||
|
</WeaSearchGroup>
|
||||||
|
}
|
||||||
|
</WeaRightMenu>
|
||||||
|
</WeaTop>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default IntegrationHomePage;
|
||||||
|
|
@ -0,0 +1,268 @@
|
||||||
|
import React from "react";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { toJS } from "mobx";
|
||||||
|
import {WeaTableNew} from 'comsMobx';
|
||||||
|
import {WeaDialog, WeaLocaleProvider, WeaTab, WeaRightMenu, WeaHelpfulTip} from 'ecCom';
|
||||||
|
import * as IntegrationUtil from "../../util/IntegrationUtil";
|
||||||
|
import uuid from "uuid";
|
||||||
|
|
||||||
|
const WeaTable = WeaTableNew.WeaTable;
|
||||||
|
const {getLabel} = WeaLocaleProvider;
|
||||||
|
|
||||||
|
@inject("hrSyncStore")
|
||||||
|
@observer
|
||||||
|
export default class LogList extends React.Component {
|
||||||
|
state = {
|
||||||
|
selectedKey: 0,
|
||||||
|
showSearchAd: false,
|
||||||
|
key: '',
|
||||||
|
errorTipDialogVisible: false,
|
||||||
|
}
|
||||||
|
|
||||||
|
// 列表重定义列
|
||||||
|
getColumns = (columns) => {
|
||||||
|
let newColumns = '';
|
||||||
|
|
||||||
|
newColumns = columns && columns.map(column => {
|
||||||
|
let newColumn = column;
|
||||||
|
newColumn.render = (text, record, index) => { //前端元素转义
|
||||||
|
let valueSpan = record[newColumn.dataIndex + "span"] !== undefined ? record[newColumn.dataIndex + "span"] : record[newColumn.dataIndex];
|
||||||
|
return (
|
||||||
|
newColumn && newColumn.dataIndex === 'synDetail'
|
||||||
|
? <a onClick={() => this.handleOpenDetailDialog(record.synDetail)} dangerouslySetInnerHTML={{__html: valueSpan}}/>
|
||||||
|
: <div dangerouslySetInnerHTML={{__html: valueSpan}}/>
|
||||||
|
)
|
||||||
|
};
|
||||||
|
return newColumn;
|
||||||
|
});
|
||||||
|
return newColumns;
|
||||||
|
}
|
||||||
|
|
||||||
|
handleOpenDetailDialog = (key) => {
|
||||||
|
const { hrSyncStore } = this.props;
|
||||||
|
const {getLogDetailList, getLogDetailListConditions, getLogTab} = hrSyncStore;
|
||||||
|
let type = 0;
|
||||||
|
// let type = dataSyncForm.getFormParams().type;
|
||||||
|
|
||||||
|
this.setState({key});
|
||||||
|
hrSyncStore.setState({detailDialogVisible: true});
|
||||||
|
type != 0 ? getLogDetailListConditions({synId: key, synType: type}) : getLogDetailListConditions({synId: key, synType: type, synTypeTab: 1});
|
||||||
|
type != 0 ? getLogDetailList({synId: key, synType: type}) : getLogDetailList({synId: key, synType: type, synTypeTab: 1});
|
||||||
|
getLogTab({synId: key, synType: type});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 同步日志的高级搜索框
|
||||||
|
getSearchAd = () => {
|
||||||
|
const {hrSyncStore} = this.props;
|
||||||
|
const {detailSearchForm, status} = hrSyncStore;
|
||||||
|
const {detailSearchFormCondition} = toJS(status);
|
||||||
|
|
||||||
|
return IntegrationUtil.getAdvancedItem(
|
||||||
|
detailSearchForm,
|
||||||
|
detailSearchFormCondition,
|
||||||
|
this.onEnterSearch,
|
||||||
|
false,
|
||||||
|
this && this.props && this.props.ecId || '',
|
||||||
|
"integrationHrSync",
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
onEnterSearch = () => {
|
||||||
|
const { hrSyncStore } = this.props;
|
||||||
|
const {detailSearchForm} = hrSyncStore;
|
||||||
|
const {key, selectedKey} = this.state;
|
||||||
|
let type = 0;
|
||||||
|
this.setState({ showSearchAd: false });
|
||||||
|
type != 0
|
||||||
|
? hrSyncStore.getLogDetailList({...detailSearchForm.getFormParams(), synId: key, synType: type})
|
||||||
|
: hrSyncStore.getLogDetailList({...detailSearchForm.getFormParams(), synId: key, synType: type, synTypeTab: Number(selectedKey) + 1});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// 高级搜索上的按钮
|
||||||
|
getTabButtonsAd = () => {
|
||||||
|
const { hrSyncStore } = this.props;
|
||||||
|
const {detailSearchForm} = hrSyncStore;
|
||||||
|
return IntegrationUtil.getSearchBtns(
|
||||||
|
this.onEnterSearch,
|
||||||
|
() => detailSearchForm.reset(),
|
||||||
|
() => this.setState({ showSearchAd: false }),
|
||||||
|
this && this.props && this.props.ecId || '',
|
||||||
|
"integrationHrSync",
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
onSearch = (value) => {
|
||||||
|
const { hrSyncStore } = this.props;
|
||||||
|
const {detailSearchForm} = hrSyncStore;
|
||||||
|
const {key, selectedKey} = this.state;
|
||||||
|
let type = 0;
|
||||||
|
|
||||||
|
detailSearchForm.updateFields({outpk: value});
|
||||||
|
this.setState({ showSearchAd: false });
|
||||||
|
type != 0
|
||||||
|
? hrSyncStore.getLogDetailList({outpk: value, synId: key, synType: type})
|
||||||
|
: hrSyncStore.getLogDetailList({outpk: value, synId: key, synType: type, synTypeTab: Number(selectedKey) + 1});
|
||||||
|
}
|
||||||
|
|
||||||
|
handleChangeTab = (v) => {
|
||||||
|
const { hrSyncStore } = this.props;
|
||||||
|
const {getLogDetailList, getLogDetailListConditions, getLogTab} = hrSyncStore;
|
||||||
|
let type = 0;
|
||||||
|
// let type = dataSyncForm.getFormParams().type;
|
||||||
|
const {key} = this.state;
|
||||||
|
|
||||||
|
this.setState({selectedKey: v, uid: uuid()});
|
||||||
|
getLogDetailListConditions({synId: key, synType: type, synTypeTab: Number(v) + 1});
|
||||||
|
getLogDetailList({synId: key, synType: type, synTypeTab: Number(v) + 1});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 详细日志
|
||||||
|
getDetailColumns = (columns) => {
|
||||||
|
let newColumns = '';
|
||||||
|
let resultStatus = [getLabel('25009','失败') , getLabel('83326','插入成功') , getLabel('31439','更新成功'), getLabel('20461','删除成功') , getLabel('502844','封存成功'), getLabel('502845','解封成功'), getLabel('127354','警告')];
|
||||||
|
|
||||||
|
newColumns = columns && columns.map(column => {
|
||||||
|
let newColumn = column;
|
||||||
|
newColumn.render = (text, record, index) => { //前端元素转义
|
||||||
|
let valueSpan = record[newColumn.dataIndex + "span"] !== undefined ? record[newColumn.dataIndex + "span"] : record[newColumn.dataIndex];
|
||||||
|
let title = '';
|
||||||
|
if(newColumn && newColumn.dataIndex === 'synState') {
|
||||||
|
if([0, 6].indexOf(Number(record.synState)) != -1) {
|
||||||
|
title = record.error.includes('#') ? getLabel(record.error.split('#')[0].trim(), '') : record.error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return (
|
||||||
|
newColumn && newColumn.dataIndex === 'synState'
|
||||||
|
? ([0, 6].indexOf(Number(record.synState)) != -1 ? <nobr><a onClick={() => this.handleOpenErrorTip(record.randomFieldId, record.error)} dangerouslySetInnerHTML={{__html: resultStatus[Number(record.synState)]}}/>
|
||||||
|
<WeaHelpfulTip ecId={`${this && this.props && this.props.ecId || ''}_WeaHelpfulTip@rbzx6n@integrationHrsyncLogList${record.synState}`} style={{marginLeft: 10, marginTop: 1}} title={title} />
|
||||||
|
</nobr>
|
||||||
|
: <div dangerouslySetInnerHTML={{__html: resultStatus[Number(record.synState)]}}/>)
|
||||||
|
: <div dangerouslySetInnerHTML={{__html: valueSpan}}/>
|
||||||
|
)
|
||||||
|
};
|
||||||
|
return newColumn;
|
||||||
|
});
|
||||||
|
return newColumns;
|
||||||
|
}
|
||||||
|
|
||||||
|
handleOpenErrorTip = (key, error) => {
|
||||||
|
this.props.hrSyncStore.getRealError({error: key});
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { hrSyncStore } = this.props;
|
||||||
|
const {logTableStore, status, logDetailTableStore, detailSearchForm} = hrSyncStore;
|
||||||
|
const {detailDialogVisible, detailDialogTab, errorInfo, errorTipDialogVisible} = toJS(status);
|
||||||
|
const {selectedKey, showSearchAd} = this.state;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@g8lj6z`}
|
||||||
|
comsWeaTableStore={logTableStore}
|
||||||
|
hasOrder={true}
|
||||||
|
needScroll={true}
|
||||||
|
getColumns={this.getColumns}
|
||||||
|
/>
|
||||||
|
<WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@kc7zqi`}
|
||||||
|
icon={IntegrationUtil.GeneralTitleColor.icon}
|
||||||
|
iconBgcolor={IntegrationUtil.GeneralTitleColor.iconBgcolor}
|
||||||
|
visible={detailDialogVisible}
|
||||||
|
onCancel={v => {hrSyncStore.setState({detailDialogVisible: false}), this.setState({
|
||||||
|
selectedKey: 0,
|
||||||
|
showSearchAd: false,
|
||||||
|
key: '',
|
||||||
|
errorTipDialogVisible: false
|
||||||
|
})}}
|
||||||
|
title={getLabel(501519, '同步详情')}
|
||||||
|
style={{width: 900, height:700}}
|
||||||
|
hasScroll
|
||||||
|
buttons={[]}
|
||||||
|
moreBtn={{
|
||||||
|
datas: [],
|
||||||
|
collectParams: [{
|
||||||
|
favname: `${getLabel(33719, "HR同步")}`,
|
||||||
|
favouritetype: 1,
|
||||||
|
objid: 0,
|
||||||
|
link: "wui/engine.html#/integration/hrsync",
|
||||||
|
importantlevel: 1
|
||||||
|
}]
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@468qm9`}
|
||||||
|
datas={[]}
|
||||||
|
collectParams={[{
|
||||||
|
favname: `${getLabel(33719, "HR同步")}`,
|
||||||
|
favouritetype: 1,
|
||||||
|
objid: 0,
|
||||||
|
link: "wui/engine.html#/integration/hrsync",
|
||||||
|
importantlevel: 1
|
||||||
|
}]}
|
||||||
|
>
|
||||||
|
<WeaTab ecId={`${this && this.props && this.props.ecId || ''}_WeaTab@05ycm0`}
|
||||||
|
datas={detailDialogTab}
|
||||||
|
keyParam="viewcondition"
|
||||||
|
selectedKey={selectedKey}
|
||||||
|
searchType={['base', 'advanced']}
|
||||||
|
searchsAd={this.getSearchAd()}
|
||||||
|
buttonsAd={this.getTabButtonsAd()}
|
||||||
|
showSearchAd={showSearchAd}
|
||||||
|
advanceHeight={170}
|
||||||
|
setShowSearchAd={bool=>{
|
||||||
|
this.setState({
|
||||||
|
showSearchAd: bool
|
||||||
|
})
|
||||||
|
}}
|
||||||
|
onChange={v => this.handleChangeTab(v)}
|
||||||
|
onSearch={this.onSearch}
|
||||||
|
onSearchChange={value => detailSearchForm.updateFields({outpk: value})}
|
||||||
|
searchsBaseValue={detailSearchForm.getFormParams().outpk}
|
||||||
|
/>
|
||||||
|
<WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@opvwfc`}
|
||||||
|
selectedKey={this.state.uid}
|
||||||
|
comsWeaTableStore={logDetailTableStore}
|
||||||
|
hasOrder={true}
|
||||||
|
// needScroll={true}
|
||||||
|
getColumns={this.getDetailColumns}
|
||||||
|
/>
|
||||||
|
</WeaRightMenu>
|
||||||
|
</WeaDialog>
|
||||||
|
<WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@j98fht`}
|
||||||
|
icon={IntegrationUtil.GeneralTitleColor.icon}
|
||||||
|
iconBgcolor={IntegrationUtil.GeneralTitleColor.iconBgcolor}
|
||||||
|
visible={errorTipDialogVisible}
|
||||||
|
onCancel={v => this.props.hrSyncStore.setState({errorTipDialogVisible: false, errorInfo: ''})}
|
||||||
|
title={getLabel('22045','详情')}
|
||||||
|
style={{width: 400, height:200}}
|
||||||
|
hasScroll
|
||||||
|
buttons={[]}
|
||||||
|
moreBtn={{
|
||||||
|
datas: [],
|
||||||
|
collectParams: [{
|
||||||
|
favname: `${getLabel(33719, "HR同步")}`,
|
||||||
|
favouritetype: 1,
|
||||||
|
objid: 0,
|
||||||
|
link: "wui/engine.html#/integration/hrsync",
|
||||||
|
importantlevel: 1
|
||||||
|
}]
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@wq9zws`}
|
||||||
|
datas={[]}
|
||||||
|
collectParams={[{
|
||||||
|
favname: `${getLabel(33719, "HR同步")}`,
|
||||||
|
favouritetype: 1,
|
||||||
|
objid: 0,
|
||||||
|
link: "wui/engine.html#/integration/hrsync",
|
||||||
|
importantlevel: 1
|
||||||
|
}]}
|
||||||
|
>
|
||||||
|
<div style={{paddingLeft:5, paddingRight: 5, overflow:'auto', width: 400, height: 200}}>
|
||||||
|
<div dangerouslySetInnerHTML={{__html: errorInfo}} />
|
||||||
|
</div>
|
||||||
|
</WeaRightMenu>
|
||||||
|
</WeaDialog>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,959 @@
|
||||||
|
import React from "react";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { toJS } from "mobx";
|
||||||
|
import NoRight from "../../public/NoRight";
|
||||||
|
import NonStand from "../../public/NonStand";
|
||||||
|
import { Button, Modal, Icon, message, } from "antd";
|
||||||
|
import { WeaUpload, WeaTable, WeaDialog, WeaTableEditable, WeaTools, WeaHelpfulTip, WeaLocaleProvider, WeaRightMenu, WeaTab, WeaTop, WeaFormItem, WeaSearchGroup, WeaNewScroll } from "ecCom";
|
||||||
|
import { WeaSwitch, WeaForm } from "comsMobx";
|
||||||
|
import SyncSetFields from "./partial/SyncSetFields";
|
||||||
|
import LogList from './LogList';
|
||||||
|
import * as IntegrationUtil from "../../util/IntegrationUtil";
|
||||||
|
import "./style/index.less"
|
||||||
|
|
||||||
|
const { getKey } = WeaTools;
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
@inject("hrSyncStore")
|
||||||
|
@observer
|
||||||
|
class HrSync extends React.Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
syncTableTab: "0",
|
||||||
|
hasSyncClick: false,
|
||||||
|
file: [],
|
||||||
|
filelist: [],
|
||||||
|
sync: true,
|
||||||
|
topTab: [
|
||||||
|
{
|
||||||
|
color: "#000000",
|
||||||
|
groupid: "flowAll",
|
||||||
|
showcount: true,
|
||||||
|
title: `${getLabel(32783, "集成设置")}`,
|
||||||
|
viewcondition: 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
color: "#000000",
|
||||||
|
groupid: "flowAll",
|
||||||
|
showcount: true,
|
||||||
|
title: `${getLabel(82923, "数据同步")}`,
|
||||||
|
viewcondition: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
color: "#000000",
|
||||||
|
groupid: "flowAll",
|
||||||
|
showcount: true,
|
||||||
|
title: `${getLabel(125928, "同步日志")}`,
|
||||||
|
viewcondition: 2
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
const { hrSyncStore } = this.props;
|
||||||
|
hrSyncStore.setState({selectedKey: 0});
|
||||||
|
hrSyncStore.doInit();
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps) {
|
||||||
|
const { hrSyncStore } = this.props;
|
||||||
|
if (this.props.location.key !== nextProps.location.key) {
|
||||||
|
hrSyncStore.setState({selectedKey: 0});
|
||||||
|
hrSyncStore.doInit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getFormSearchs = (form, datas, needTigger = true, lableCol, fieldcol) => {
|
||||||
|
const { isFormInit } = form;
|
||||||
|
const { hrSyncStore } = this.props;
|
||||||
|
const {getHrSyncSettingsOperation, status, webserviceParamValuesData, setWebserviceParamValuesData} = hrSyncStore;
|
||||||
|
const { WeaTableEdit_WebserviceParameterSet, } = toJS(status);
|
||||||
|
let group = [];
|
||||||
|
let className="";
|
||||||
|
const formParams = form.getFormParams();
|
||||||
|
isFormInit && datas && datas.map((c, index) => {
|
||||||
|
// render webService WeaTab 同步接口方法
|
||||||
|
const { intetype } = form.getFormParams();
|
||||||
|
if ([2].includes(index) && intetype === "2") {
|
||||||
|
const tabs = c.items.map((item, index) => {
|
||||||
|
return {
|
||||||
|
color: "#000000",
|
||||||
|
groupid: "flowAll",
|
||||||
|
showcount: true,
|
||||||
|
title: item.label,
|
||||||
|
viewcondition: index
|
||||||
|
};
|
||||||
|
})
|
||||||
|
// webService WeaTab
|
||||||
|
group.push(<div>
|
||||||
|
<WeaTab ecId={`${this && this.props && this.props.ecId || ''}_WeaTab@h9mas3@integrationHrsyncForm${index}`}
|
||||||
|
datas={tabs}
|
||||||
|
type="card"
|
||||||
|
keyParam="viewcondition"
|
||||||
|
selectedKey={this.state.syncTableTab}
|
||||||
|
onChange={v => this.setState({ syncTableTab: v })}
|
||||||
|
/>
|
||||||
|
</div>)
|
||||||
|
}
|
||||||
|
// render 基本信息 同步表设置 同步对应字段设置方法
|
||||||
|
let center = true;
|
||||||
|
if (index === 1) {
|
||||||
|
center = false;
|
||||||
|
}
|
||||||
|
let items = [];
|
||||||
|
// condition
|
||||||
|
c.items.map((fields, cIndex) => {
|
||||||
|
let onChange = (e) => { };
|
||||||
|
// 同步表设置
|
||||||
|
// subcomtable depttable jobtable hrmtable
|
||||||
|
|
||||||
|
if (["subcomouternew"].includes(getKey(fields))) {
|
||||||
|
className="hr-syn-table-setting";
|
||||||
|
fields.dataParams = {
|
||||||
|
mouldID: "integration", callSource: "hrsetting",
|
||||||
|
dmltablename: formParams["subcomtable"],
|
||||||
|
datasourceid: formParams["dbsource"],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (["deptouternew"].includes(getKey(fields))) {
|
||||||
|
className="hrsync-tablesetting";
|
||||||
|
fields.dataParams = {
|
||||||
|
mouldID: "integration", callSource: "hrsetting",
|
||||||
|
dmltablename: formParams["depttable"],
|
||||||
|
datasourceid: formParams["dbsource"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (["jobouternew"].includes(getKey(fields))) {
|
||||||
|
className="hrsync-tablesetting";
|
||||||
|
fields.dataParams = {
|
||||||
|
mouldID: "integration", callSource: "hrsetting",
|
||||||
|
dmltablename: formParams["jobtable"],
|
||||||
|
datasourceid: formParams["dbsource"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (["hrmouternew"].includes(getKey(fields))) {
|
||||||
|
className="hrsync-tablesetting";
|
||||||
|
fields.dataParams = {
|
||||||
|
mouldID: "integration", callSource: "hrsetting",
|
||||||
|
dmltablename: formParams["hrmtable"],
|
||||||
|
datasourceid: formParams["dbsource"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// WEBSERVICE地址 select onchange
|
||||||
|
if (getKey(fields) === "webserviceurl") {
|
||||||
|
onChange = (e) => {
|
||||||
|
getHrSyncSettingsOperation({ operation: "getregisteinfo", webserviceurl: e.webserviceurl.value }, res => {
|
||||||
|
// update fields
|
||||||
|
// subcommothod deptmothod jobmothod hrmmethod
|
||||||
|
status.newFormFields[2].items.forEach(item => {
|
||||||
|
item.options = res.webserviceMethodsList;
|
||||||
|
})
|
||||||
|
});
|
||||||
|
// 清空接口方法
|
||||||
|
form.updateFields({
|
||||||
|
subcommothod: "",
|
||||||
|
deptmothod: "",
|
||||||
|
jobmothod: "",
|
||||||
|
hrmmethod: ""
|
||||||
|
})
|
||||||
|
// 清空接口方法对应的数据
|
||||||
|
webserviceParamValuesData.subWebserviceParamValuesData = [];
|
||||||
|
webserviceParamValuesData.deptWebserviceParamValuesData = [];
|
||||||
|
webserviceParamValuesData.jobWebserviceParamValuesData = [];
|
||||||
|
webserviceParamValuesData.hrmWebserviceParamValuesData = [];
|
||||||
|
}
|
||||||
|
// 同步接口方法
|
||||||
|
} else if (["subcommothod", "deptmothod", "jobmothod", "hrmmethod"].includes(getKey(fields))) {
|
||||||
|
onChange = (e) => {
|
||||||
|
getHrSyncSettingsOperation({ operation: "getmethodinfo", methodid: e[Object.keys(e)[0]]["value"] }, res => {
|
||||||
|
const { webserviceParamValuesData } = hrSyncStore;
|
||||||
|
setWebserviceParamValuesData(this.state.syncTableTab, res.WebserviceMethodParameterDatas);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else if (["syncmethodHz"].includes(getKey(fields))) {
|
||||||
|
fields.otherParams = {
|
||||||
|
valueIsObject: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
items.push({
|
||||||
|
com: (
|
||||||
|
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@8yfhhe@integrationHrsyncForm${fields.domkey[0]}`}
|
||||||
|
label={`${fields.label}`}
|
||||||
|
labelCol={{ span: lableCol ? lableCol : `${fields.labelcol}` }}
|
||||||
|
wrapperCol={{ span: fieldcol ? fieldcol : `${fields.fieldcol}` }}
|
||||||
|
error={form.getError(fields)}
|
||||||
|
fieldType={fields.conditionType.toUpperCase()}
|
||||||
|
tipPosition="bottom"
|
||||||
|
>
|
||||||
|
<nobr>
|
||||||
|
<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@rrm1ra@integrationHrsyncForm${fields.domkey[0]}`} onChange={onChange} fieldConfig={fields} form={form} formParams={formParams} />
|
||||||
|
{getKey(fields) === 'defaultPwd' && <WeaHelpfulTip ecId={`${this && this.props && this.props.ecId || ''}_WeaHelpfulTip@ksl6pv@integrationHrsyncForm${fields.domkey[0]}`} style={{marginLeft: 13, top: 5}} title={getLabel(501544, '默认密码只在同步新增用户时使用')} width={195} />}
|
||||||
|
</nobr>
|
||||||
|
</WeaFormItem>),
|
||||||
|
col: 2,
|
||||||
|
hide: form.isHide(fields, (keys, allParams) => {
|
||||||
|
switch (getKey(fields)) {
|
||||||
|
// 集成方式 数据库
|
||||||
|
case "dbsource":
|
||||||
|
return allParams["intetype"] !== "1";
|
||||||
|
// 集成方式 接口方式
|
||||||
|
case "webserviceurl":
|
||||||
|
return allParams["intetype"] !== "2";
|
||||||
|
// 集成方式 自定义
|
||||||
|
case "custominterface":
|
||||||
|
return allParams["intetype"] !== "3";
|
||||||
|
case "defaultPwd":
|
||||||
|
case "pwdsynctype":
|
||||||
|
case "issynrtx":
|
||||||
|
return allParams["intetype"] === "3";
|
||||||
|
case "subcommothod":
|
||||||
|
return this.state.syncTableTab !== "0";
|
||||||
|
case "deptmothod":
|
||||||
|
return this.state.syncTableTab !== "1";
|
||||||
|
case "jobmothod":
|
||||||
|
return this.state.syncTableTab !== "2";
|
||||||
|
case "hrmmethod":
|
||||||
|
return this.state.syncTableTab !== "3";
|
||||||
|
case "syncmethodHz":
|
||||||
|
return allParams["hrmethod"] === '1';
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
})
|
||||||
|
})
|
||||||
|
});
|
||||||
|
let title = "";
|
||||||
|
if (needTigger) {
|
||||||
|
const intetype = form.getFormParams().intetype;
|
||||||
|
// 集成方式 数据库
|
||||||
|
if (intetype === "1" && [2].includes(index)) {
|
||||||
|
title = "";
|
||||||
|
items = [];
|
||||||
|
} else if (intetype === "2" && [1].includes(index)) {
|
||||||
|
// 集成方式 接口方式
|
||||||
|
title = "";
|
||||||
|
items = [];
|
||||||
|
} else if (intetype === "3" && index !== 0) {
|
||||||
|
// 集成方式 自定义方式
|
||||||
|
title = "";
|
||||||
|
items = [];
|
||||||
|
} else {
|
||||||
|
title = c.title;
|
||||||
|
}
|
||||||
|
// remove 同步接口方法 title
|
||||||
|
if ([2].includes(index)) {
|
||||||
|
needTigger = false;
|
||||||
|
title = "";
|
||||||
|
}
|
||||||
|
group.push(<WeaSearchGroup className={className} ecId={`${this && this.props && this.props.ecId || ''}_WeaSearchGroup@ymty5p@integrationHrsyncForm${index}`} center={center} col={1} needTigger={needTigger} title={title} showGroup={c.defaultshow} items={items} />)
|
||||||
|
} else {
|
||||||
|
group.push(<WeaSearchGroup className={className} ecId={`${this && this.props && this.props.ecId || ''}_WeaSearchGroup@w1559x@integrationHrsyncForm${index}`} center={center} col={1} needTigger={needTigger} showGroup={c.defaultshow} items={items} />)
|
||||||
|
}
|
||||||
|
|
||||||
|
// WEBSERVICE 明细表 table
|
||||||
|
if ([2].includes(index) && intetype === "2") {
|
||||||
|
const whichData = [
|
||||||
|
webserviceParamValuesData.subWebserviceParamValuesData,
|
||||||
|
webserviceParamValuesData.deptWebserviceParamValuesData,
|
||||||
|
webserviceParamValuesData.jobWebserviceParamValuesData,
|
||||||
|
webserviceParamValuesData.hrmWebserviceParamValuesData,
|
||||||
|
];
|
||||||
|
group.push(
|
||||||
|
<div>
|
||||||
|
<WeaTableEditable ecId={`${this && this.props && this.props.ecId || ''}_WeaTableEditable@7pg98t@integrationHrsyncForm${index}`}
|
||||||
|
rowKey="paramid"
|
||||||
|
getRowSelection={() => {
|
||||||
|
return false;
|
||||||
|
}}
|
||||||
|
showTitle={false}
|
||||||
|
tableProps={{
|
||||||
|
showEmptyText: false,
|
||||||
|
scroll: { x: "100%" }
|
||||||
|
}}
|
||||||
|
datas={toJS(whichData[this.state.syncTableTab])}
|
||||||
|
columns={WeaTableEdit_WebserviceParameterSet}
|
||||||
|
onChange={(datas) => {
|
||||||
|
switch (Number(this.state.syncTableTab)) {
|
||||||
|
case 0:
|
||||||
|
webserviceParamValuesData.subWebserviceParamValuesData = datas;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
webserviceParamValuesData.deptWebserviceParamValuesData = datas;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
webserviceParamValuesData.jobWebserviceParamValuesData = datas;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
webserviceParamValuesData.hrmWebserviceParamValuesData = datas;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return group;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 同步日志的高级搜索框
|
||||||
|
getSearchAd = () => {
|
||||||
|
const {hrSyncStore} = this.props;
|
||||||
|
const {logSearchForm, status} = hrSyncStore;
|
||||||
|
const {logSearchFormCondition} = toJS(status);
|
||||||
|
|
||||||
|
return IntegrationUtil.getAdvancedItem(logSearchForm, logSearchFormCondition, this.searchFun, false, this && this.props && this.props.ecId || '', "integrationHrSyncIndex");
|
||||||
|
}
|
||||||
|
|
||||||
|
searchFun = () => {
|
||||||
|
const { hrSyncStore } = this.props;
|
||||||
|
const {logSearchForm} = hrSyncStore;
|
||||||
|
hrSyncStore.getLogList(logSearchForm.getFormParams());
|
||||||
|
hrSyncStore.setState({ showSearchAd: false });
|
||||||
|
};
|
||||||
|
|
||||||
|
getTabButtonsAd() {
|
||||||
|
const { hrSyncStore } = this.props;
|
||||||
|
const {logSearchForm} = hrSyncStore;
|
||||||
|
let resetFun = () => logSearchForm.reset();
|
||||||
|
let cancelFun = () => hrSyncStore.setState({showSearchAd: false});
|
||||||
|
|
||||||
|
return IntegrationUtil.getSearchBtns(this.searchFun, resetFun, cancelFun, this && this.props && this.props.ecId || '', "integrationHrSyncIndex");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取右键菜单
|
||||||
|
* @returns {Array}
|
||||||
|
*/
|
||||||
|
getRightMenu() {
|
||||||
|
const { hrSyncStore } = this.props;
|
||||||
|
const {newForm, initialNewForm} = hrSyncStore;
|
||||||
|
const { selectedKey, rightMenus, rightMenusTab2, rowSelectIds, canexport, syncFlag, saveDisabled } = toJS(hrSyncStore.status);
|
||||||
|
const whichRightMenu = Number(selectedKey) === 0 ? rightMenus : Number(selectedKey) === 1 ? rightMenusTab2 : '';
|
||||||
|
|
||||||
|
let btnArr = [];
|
||||||
|
whichRightMenu && whichRightMenu.map(m => {
|
||||||
|
let btn = {
|
||||||
|
key: m.type,
|
||||||
|
icon: <i className={m.menuIcon} />,
|
||||||
|
content: m.menuName,
|
||||||
|
onClick: () => this.onRightMenuClick(m.type)
|
||||||
|
};
|
||||||
|
if (m.type == "BTN_EXP") {
|
||||||
|
if (!canexport) {
|
||||||
|
btn.disabled = true;
|
||||||
|
} else {
|
||||||
|
btn.disabled = false;
|
||||||
|
}
|
||||||
|
}else if(m.type == 'BTN_EXPDATA') {
|
||||||
|
btn.disabled = !this.state.hasSyncClick;
|
||||||
|
}else if(m.type == 'BTN_SYNC') {
|
||||||
|
btn.disabled = syncFlag;
|
||||||
|
}else if(m.type === "BTN_SAVE") {
|
||||||
|
btn.disabled = saveDisabled;
|
||||||
|
}
|
||||||
|
if (!(m.menuIcon === 'icon-coms-delete' && rowSelectIds.length === 0)) {
|
||||||
|
btnArr.push(btn);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (selectedKey === "1") {
|
||||||
|
if (initialNewForm.getFormParams()["isuselhr"] === "0"){
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
if (initialNewForm.getFormParams()["hrmethod"] === "2") {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
if(this.state.sync == false) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(selectedKey === '2') {
|
||||||
|
// 添加列定制
|
||||||
|
btnArr.push({
|
||||||
|
key: "BTN_COLUMN",
|
||||||
|
icon: <i className="icon-coms-Custom" />,
|
||||||
|
content: `${getLabel(32535, "显示列定制")}`,
|
||||||
|
onClick: () => this.onRightMenuClick("BTN_COLUMN")
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return btnArr;
|
||||||
|
}
|
||||||
|
|
||||||
|
getRightMenu2() {
|
||||||
|
const { hrSyncStore } = this.props;
|
||||||
|
const { importForm, getHrSyncSettingsOperation } = hrSyncStore;
|
||||||
|
const { selectedKey, rightMenus, rightMenusTab2, rowSelectIds } = toJS(
|
||||||
|
hrSyncStore.status
|
||||||
|
);
|
||||||
|
let btnArr = [];
|
||||||
|
var btn = {
|
||||||
|
key: 'aaa',
|
||||||
|
icon: <i className={"icon-coms-File"} />,
|
||||||
|
content: getLabel("725", "提交"),
|
||||||
|
onClick: () => {
|
||||||
|
this.doImport();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
btnArr.push(btn);
|
||||||
|
|
||||||
|
return btnArr;
|
||||||
|
}
|
||||||
|
|
||||||
|
doImport() {
|
||||||
|
const { hrSyncStore } = this.props;
|
||||||
|
const { importForm, getHrSyncSettingsOperation } = hrSyncStore;
|
||||||
|
const { selectedKey, rightMenus, rightMenusTab2, rowSelectIds } = toJS(
|
||||||
|
hrSyncStore.status
|
||||||
|
);
|
||||||
|
let params = Object.assign({ operation: "import" }, importForm.getFormParams());
|
||||||
|
params.file = JSON.stringify(this.state.file);
|
||||||
|
params.filelist = JSON.stringify(this.state.filelist);
|
||||||
|
IntegrationUtil.onCheck(importForm, () => {
|
||||||
|
getHrSyncSettingsOperation(params, () => {
|
||||||
|
hrSyncStore.setState({ showImportForm: false });
|
||||||
|
hrSyncStore.doInit();
|
||||||
|
this.setState({filelist:[]});
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 右键菜单点击事件
|
||||||
|
* @param type
|
||||||
|
*/
|
||||||
|
getAllPrams = () => {
|
||||||
|
const { hrSyncStore } = this.props;
|
||||||
|
const { newForm, SyncSetTable, webserviceParamValuesData } = hrSyncStore;
|
||||||
|
const params = newForm.getFormParams();
|
||||||
|
// 明细表数据
|
||||||
|
// webservice 明细表
|
||||||
|
const {
|
||||||
|
subWebserviceParamValuesData,
|
||||||
|
deptWebserviceParamValuesData,
|
||||||
|
jobWebserviceParamValuesData,
|
||||||
|
hrmWebserviceParamValuesData
|
||||||
|
} = toJS(webserviceParamValuesData);
|
||||||
|
const {
|
||||||
|
WeaTableEdit_subSyncFieldData,
|
||||||
|
WeaTableEdit_deptSyncFieldData,
|
||||||
|
WeaTableEdit_jobSyncFieldData,
|
||||||
|
WeaTableEdit_hrmSyncFieldData } = toJS(SyncSetTable);
|
||||||
|
|
||||||
|
const New_WeaTableEdit_jobSyncFieldData = ((params.intetype == 1 && params.jobtable == '') || (params.intetype == 2 && params.jobmothod == "")) ? [] : WeaTableEdit_jobSyncFieldData;
|
||||||
|
const allParams = {
|
||||||
|
...params,
|
||||||
|
isUnique: true,
|
||||||
|
subWebserviceParamValuesData: JSON.stringify(subWebserviceParamValuesData),
|
||||||
|
deptWebserviceParamValuesData: JSON.stringify(deptWebserviceParamValuesData),
|
||||||
|
jobWebserviceParamValuesData: JSON.stringify(jobWebserviceParamValuesData),
|
||||||
|
hrmWebserviceParamValuesData: JSON.stringify(hrmWebserviceParamValuesData),
|
||||||
|
WeaTableEdit_subSyncFieldData: JSON.stringify(WeaTableEdit_subSyncFieldData),
|
||||||
|
WeaTableEdit_deptSyncFieldData: JSON.stringify(WeaTableEdit_deptSyncFieldData),
|
||||||
|
WeaTableEdit_jobSyncFieldData: JSON.stringify(New_WeaTableEdit_jobSyncFieldData),
|
||||||
|
WeaTableEdit_hrmSyncFieldData: JSON.stringify(WeaTableEdit_hrmSyncFieldData)
|
||||||
|
};
|
||||||
|
|
||||||
|
[WeaTableEdit_subSyncFieldData, WeaTableEdit_deptSyncFieldData, New_WeaTableEdit_jobSyncFieldData, WeaTableEdit_hrmSyncFieldData].map(datas => {
|
||||||
|
let allConfig = '';
|
||||||
|
|
||||||
|
datas && datas.map(data => {
|
||||||
|
if (allConfig.indexOf(`(#@#)${data.oafieldspan}(#@#)`) < 0) {
|
||||||
|
allConfig += `(#@#)${data.oafieldspan}(#@#)`;
|
||||||
|
} else {
|
||||||
|
Modal.warning({
|
||||||
|
title: getLabel("15172", "系统提示"),
|
||||||
|
content: getLabel('389520',"存在重复属性,请检查")
|
||||||
|
})
|
||||||
|
allParams.isUnique = false;
|
||||||
|
return
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
const WebserviceParamValuesData = []
|
||||||
|
.concat(subWebserviceParamValuesData.map(item => ({ methodtype: 1, ...item })))
|
||||||
|
.concat(deptWebserviceParamValuesData.map(item => ({ methodtype: 2, ...item })))
|
||||||
|
.concat(jobWebserviceParamValuesData.map(item => ({ methodtype: 3, ...item })))
|
||||||
|
.concat(hrmWebserviceParamValuesData.map(item => ({ methodtype: 4, ...item })));
|
||||||
|
const syncFieldData = []
|
||||||
|
.concat(WeaTableEdit_subSyncFieldData.map(item => ({ type: 1, ...item })))
|
||||||
|
.concat(WeaTableEdit_deptSyncFieldData.map(item => ({ type: 2, ...item })))
|
||||||
|
.concat(New_WeaTableEdit_jobSyncFieldData.map(item => ({ type: 3, ...item })))
|
||||||
|
.concat(WeaTableEdit_hrmSyncFieldData.map(item => ({ type: 4, ...item })))
|
||||||
|
allParams.WebserviceParamValuesData = JSON.stringify(WebserviceParamValuesData);
|
||||||
|
allParams.syncFieldData = JSON.stringify(syncFieldData);
|
||||||
|
return allParams;
|
||||||
|
}
|
||||||
|
|
||||||
|
onRightMenuClick = (type, recordId) => {
|
||||||
|
const { hrSyncStore } = this.props;
|
||||||
|
const {
|
||||||
|
newForm,
|
||||||
|
dataSyncForm,
|
||||||
|
getHrSyncDataSyncOperation,
|
||||||
|
getHrSyncSettingsOperation, updateSyncData, logTableStore, status } = hrSyncStore;
|
||||||
|
switch (type) {
|
||||||
|
case "BTN_SAVE":
|
||||||
|
const allParams = this.getAllPrams();
|
||||||
|
if((allParams.intetype == 2) && allParams.jobmothod) {
|
||||||
|
if(JSON.parse(allParams.WeaTableEdit_jobSyncFieldData).length == 0) {
|
||||||
|
Modal.warning({
|
||||||
|
title: getLabel("15172", "系统提示"),
|
||||||
|
content: getLabel("32256", "岗位表必须有一个关键匹配标识字段,请选择")
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}else {
|
||||||
|
let WeaTableEdit_jobSyncFieldData = JSON.parse(allParams.WeaTableEdit_jobSyncFieldData);
|
||||||
|
let keyIndex = WeaTableEdit_jobSyncFieldData.findIndex(data => data.iskeyfield == 1)
|
||||||
|
if(keyIndex == -1) {
|
||||||
|
Modal.warning({
|
||||||
|
title: getLabel("15172", "系统提示"),
|
||||||
|
content: getLabel("32256", "岗位表必须有一个关键匹配标识字段,请选择")
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(allParams.isUnique) {
|
||||||
|
IntegrationUtil.onCheck(newForm, () => {
|
||||||
|
const result = hrSyncStore.syncSetField.table && hrSyncStore.syncSetField.table.doValidate();
|
||||||
|
if (result && (!result.pass)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// first validate
|
||||||
|
allParams.checkBeforeSave = true;
|
||||||
|
getHrSyncSettingsOperation(allParams, (result) => {
|
||||||
|
if (result && !result.error) {
|
||||||
|
// and save
|
||||||
|
delete allParams.checkBeforeSave;
|
||||||
|
getHrSyncSettingsOperation(allParams, () => {
|
||||||
|
if(result.ret == true) {
|
||||||
|
message.success(getLabel(22619, '保存成功'));
|
||||||
|
hrSyncStore.getHrSyncSettingsForm();
|
||||||
|
hrSyncStore.getRightMenu();
|
||||||
|
hrSyncStore.getHrSyncSettingsImportForm();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "BTN_EXP":
|
||||||
|
// 集成设置导出
|
||||||
|
const expAllParams = this.getAllPrams();
|
||||||
|
Modal.confirm({
|
||||||
|
title: getLabel("131329", "信息确认"),
|
||||||
|
content: getLabel("386087", "同步设置将以sql脚本文件的形式导出,确定要导出吗?"),
|
||||||
|
onOk: () => {
|
||||||
|
alert("The inteface named getHrSyncSettingsSqlFile is deleted!");
|
||||||
|
/*getHrSyncSettingsOperation({ operation: "export", ...expAllParams }, (result) => {
|
||||||
|
window.location.href = (window.ecologyContentPath || "") + "/api/integration/hrsync/getHrSyncSettingsSqlFile";
|
||||||
|
});*/
|
||||||
|
},
|
||||||
|
onCancel: () => { }
|
||||||
|
})
|
||||||
|
break
|
||||||
|
case "BTN_IMP":
|
||||||
|
// 集成设置导入
|
||||||
|
//status.showImportForm = true;
|
||||||
|
break;
|
||||||
|
case "BTN_SYNC":
|
||||||
|
const syncparams = dataSyncForm.getFormParams();
|
||||||
|
getHrSyncDataSyncOperation(syncparams, (res) => {
|
||||||
|
this.setState({ hasSyncClick: true });
|
||||||
|
updateSyncData(res);
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case "BTN_EXPDATA":
|
||||||
|
window.location.href = (window.ecologyContentPath || "") + "/weaver/weaver.file.ExcelOut";
|
||||||
|
break;
|
||||||
|
case "BTN_COLUMN":
|
||||||
|
logTableStore.setColSetVisible(true);
|
||||||
|
logTableStore.tableColSet(true);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取顶部按钮
|
||||||
|
* @returns {Array}
|
||||||
|
*/
|
||||||
|
getBtns = () => {
|
||||||
|
const { hrSyncStore } = this.props;
|
||||||
|
const { status, newForm, initialNewForm } = hrSyncStore;
|
||||||
|
const { selectedKey, rightMenus, rightMenusTab2, rowSelectIds, loading, syncLoading, canexport, syncFlag, saveDisabled } = toJS(status);
|
||||||
|
let btnArr = [];
|
||||||
|
const whichRightMenu = Number(selectedKey) === 0 ? rightMenus : Number(selectedKey) === 1 ? rightMenusTab2 : [];
|
||||||
|
if (whichRightMenu) {
|
||||||
|
for (let j = 0; j < whichRightMenu.length; j++) {
|
||||||
|
if (j == 3) {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
let m = whichRightMenu[j];
|
||||||
|
let btn = null;
|
||||||
|
if (m.type === "BTN_EXPDATA") {
|
||||||
|
btn = <Button ecId={`${this && this.props && this.props.ecId || ''}_Button@cwdxm2`}
|
||||||
|
type="primary"
|
||||||
|
disabled={!this.state.hasSyncClick}
|
||||||
|
onClick={() => {
|
||||||
|
this.onRightMenuClick(m.type);
|
||||||
|
}}>{`${m.menuName}`}</Button>;
|
||||||
|
}else if(m.type === "BTN_SAVE") {
|
||||||
|
btn = <Button ecId={`${this && this.props && this.props.ecId || ''}_Button@ejtwn6`}
|
||||||
|
type="primary"
|
||||||
|
disabled={saveDisabled}
|
||||||
|
onClick={() => {
|
||||||
|
this.onRightMenuClick(m.type);
|
||||||
|
}}>{`${m.menuName}`}</Button>;
|
||||||
|
} else {
|
||||||
|
btn =
|
||||||
|
<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@gx0tqk`}
|
||||||
|
type="primary"
|
||||||
|
disabled={(m.type === 'BTN_EXP' && !canexport) || (!this.state.sync && Number(selectedKey) === 1) || (m.type==="BTN_SYNC" && syncFlag)}
|
||||||
|
onClick={() => {
|
||||||
|
this.onRightMenuClick(m.type);
|
||||||
|
}}>{`${m.menuName}`}</Button>;
|
||||||
|
}
|
||||||
|
btnArr.push(btn);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 未启用 数据同步隐藏按钮
|
||||||
|
if (selectedKey === "1") {
|
||||||
|
if (initialNewForm.getFormParams()["isuselhr"] === "0"){
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
if (initialNewForm.getFormParams()["hrmethod"] === "2") {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return btnArr;
|
||||||
|
};
|
||||||
|
|
||||||
|
getDialogBtns = () => {
|
||||||
|
return [
|
||||||
|
(
|
||||||
|
<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@4jma6i@integrationHrsyncButtonSubmit`} onClick={() => {
|
||||||
|
this.doImport();
|
||||||
|
}} type="primary">{getLabel("725", "提交")}</Button>
|
||||||
|
)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
getDataSyncDescription = (form, condition=[]) => {
|
||||||
|
const {isFormInit} = form;
|
||||||
|
const formParams = form.getFormParams();
|
||||||
|
let group = [];
|
||||||
|
|
||||||
|
isFormInit && condition && condition.map((c, index) => {
|
||||||
|
let items = [];
|
||||||
|
c.items.map(fields => {
|
||||||
|
items.push({
|
||||||
|
com: (<div style={{marginLeft: -20}}>
|
||||||
|
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@ffg45q@integrationHrsyncDesForm${fields.domkey[0]}`}
|
||||||
|
label={`${fields.label}`}
|
||||||
|
labelCol={{ span: `${fields.labelcol}` }}
|
||||||
|
wrapperCol={{ span: `${fields.fieldcol}` }}
|
||||||
|
error={form.getError(fields)}
|
||||||
|
tipPosition="bottom"
|
||||||
|
>
|
||||||
|
<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@57ijnj@integrationHrsyncDesForm${fields.domkey[0]}`} fieldConfig={fields} form={form} formParams={formParams} />
|
||||||
|
{fields.showOtherCom && otherCom}
|
||||||
|
</WeaFormItem></div>),
|
||||||
|
colSpan: 1
|
||||||
|
})
|
||||||
|
});
|
||||||
|
group.push(<WeaSearchGroup ecId={`${this && this.props && this.props.ecId || ''}_WeaSearchGroup@u756c2@integrationHrsyncDesForm${index}`} title={c.title} col={1} showGroup={true} items={items} />)
|
||||||
|
})
|
||||||
|
|
||||||
|
return group;
|
||||||
|
}
|
||||||
|
|
||||||
|
handleChangeTab = (v) => {
|
||||||
|
const {hrSyncStore} = this.props;
|
||||||
|
const {initialNewForm, getLogList} = hrSyncStore;
|
||||||
|
const formParams = initialNewForm.getFormParams();
|
||||||
|
|
||||||
|
if(v == 1) {
|
||||||
|
this.setState({hasSyncClick: false, sync: true});
|
||||||
|
let content = formParams["isuselhr"] === "0" ? getLabel("386893", "HR同步未启用!")
|
||||||
|
: formParams["hrmethod"] === "2" ? getLabel("32326", "未启用HR同步手动同步!") : '';
|
||||||
|
|
||||||
|
if (formParams["isuselhr"] === "0" || formParams["hrmethod"] === "2") {
|
||||||
|
this.setState({sync: false});
|
||||||
|
hrSyncStore.setState({selectedKey: v});
|
||||||
|
Modal.warning({
|
||||||
|
title: getLabel("15172", "系统提示"),
|
||||||
|
content: content
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 刷新页面
|
||||||
|
hrSyncStore.getHrSyncDataSyncForm();
|
||||||
|
hrSyncStore.getHrSyncDataSyncRightMenu();
|
||||||
|
}else if(v == 0) {
|
||||||
|
hrSyncStore.newForm = new WeaForm();
|
||||||
|
hrSyncStore.initialNewForm = new WeaForm();
|
||||||
|
hrSyncStore.getHrSyncSettingsForm();
|
||||||
|
hrSyncStore.getRightMenu();
|
||||||
|
hrSyncStore.getHrSyncSettingsImportForm();
|
||||||
|
}else if(v == 2) {
|
||||||
|
hrSyncStore.getListConditions();
|
||||||
|
getLogList();
|
||||||
|
}
|
||||||
|
hrSyncStore.setState({selectedKey: v});
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { hrSyncStore } = this.props;
|
||||||
|
const {
|
||||||
|
status,
|
||||||
|
newForm,
|
||||||
|
dataSyncForm,
|
||||||
|
importForm,
|
||||||
|
syncTable,
|
||||||
|
hasRight,
|
||||||
|
rightLoading,
|
||||||
|
} = hrSyncStore;
|
||||||
|
const {
|
||||||
|
syncFieldRelationShipSummaryLabel,
|
||||||
|
showSearchAd,
|
||||||
|
newFormFields,
|
||||||
|
dataSyncFormFields,
|
||||||
|
selectedKey,
|
||||||
|
syncLoading,
|
||||||
|
advanceHeight,
|
||||||
|
showImportForm,
|
||||||
|
hasNonStandard,
|
||||||
|
nonStandLoading,
|
||||||
|
} = toJS(status);
|
||||||
|
const {
|
||||||
|
jobSyncResultHeaderList,
|
||||||
|
jobSyncResultDataList,
|
||||||
|
jobTypeSyncResultHeaderList,
|
||||||
|
jobTypeSyncResultDataList,
|
||||||
|
deptSyncResultHeaderList,
|
||||||
|
deptSyncResultDataList,
|
||||||
|
subSyncResultHeaderList,
|
||||||
|
subSyncResultDataList,
|
||||||
|
gwSyncResultHeaderList,
|
||||||
|
gwSyncResultDataList,
|
||||||
|
hrmSyncResultHeaderList,
|
||||||
|
hrmSyncResultDataList,
|
||||||
|
hqSyncResultHeaderList,
|
||||||
|
hqSyncResultDataList,
|
||||||
|
lastLineSyncResultDataList,
|
||||||
|
} = toJS(syncTable);
|
||||||
|
const {topTab} = this.state;
|
||||||
|
return (nonStandLoading
|
||||||
|
? null
|
||||||
|
: hasNonStandard
|
||||||
|
? rightLoading
|
||||||
|
? null
|
||||||
|
: hasRight
|
||||||
|
? <WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@uf63h0`}
|
||||||
|
datas={this.getRightMenu()}
|
||||||
|
collectParams={{
|
||||||
|
favname: `${getLabel(33719, "HR同步")}`,
|
||||||
|
favouritetype: 1,
|
||||||
|
objid: 0,
|
||||||
|
link: "wui/engine.html#/integration/hrsync",
|
||||||
|
importantlevel: 1
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@qa1vey`}
|
||||||
|
title={getLabel(33719, "HR同步")}
|
||||||
|
icon={<i className="icon-coms-integration" />}
|
||||||
|
iconBgcolor="#1a57a0"
|
||||||
|
buttons={this.getBtns()}
|
||||||
|
showDropIcon={true}
|
||||||
|
dropMenuDatas={this.getRightMenu()}
|
||||||
|
dropMenuProps={{
|
||||||
|
collectParams: {
|
||||||
|
favname: `${getLabel(33719, "HR同步")}`,
|
||||||
|
favouritetype: 1,
|
||||||
|
objid: 0,
|
||||||
|
link: "wui/engine.html#/integration/hrsync",
|
||||||
|
importantlevel: 1
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<WeaTab ecId={`${this && this.props && this.props.ecId || ''}_WeaTab@mt2vgj`}
|
||||||
|
datas={topTab}
|
||||||
|
keyParam="viewcondition" //主键
|
||||||
|
countParam="groupid" //数量
|
||||||
|
selectedKey={selectedKey}
|
||||||
|
searchType={selectedKey == 2 ? 'advanced' : ''}
|
||||||
|
advanceHeight={advanceHeight}
|
||||||
|
searchsAd={selectedKey == 2 ? this.getSearchAd() : []}
|
||||||
|
showSearchAd={showSearchAd}
|
||||||
|
buttonsAd={this.getTabButtonsAd()}
|
||||||
|
setShowSearchAd={() =>
|
||||||
|
hrSyncStore.setState({ showSearchAd: !showSearchAd })
|
||||||
|
}
|
||||||
|
hideSearchAd={() =>
|
||||||
|
hrSyncStore.setState({ showSearchAd: false })
|
||||||
|
}
|
||||||
|
onChange={this.handleChangeTab}
|
||||||
|
onSearch={() => hrSyncStore.getDataShowList()}
|
||||||
|
onSearchChange={value => {
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
{
|
||||||
|
Number(selectedKey) === 2
|
||||||
|
? <LogList ecId={`${this && this.props && this.props.ecId || ''}_LogList@srq6yy`} />
|
||||||
|
: <WeaNewScroll ecId={`${this && this.props && this.props.ecId || ''}_WeaNewScroll@5tcr9v`} height={"calc(100% - 110px)"}>
|
||||||
|
{
|
||||||
|
Number(selectedKey) === 0
|
||||||
|
? (
|
||||||
|
// 集成设置
|
||||||
|
<div>
|
||||||
|
{/* 基本信息 */}
|
||||||
|
{this.getFormSearchs(newForm, newFormFields)}
|
||||||
|
{/* 同步对应字段设置方法 */}
|
||||||
|
{newForm.getFormParams()["intetype"] !== "3" && (
|
||||||
|
<div>
|
||||||
|
<SyncSetFields ecId={`${this && this.props && this.props.ecId || ''}_SyncSetFields@lzutwo`} />
|
||||||
|
{/* 说明 */}
|
||||||
|
<WeaSearchGroup ecId={`${this && this.props && this.props.ecId || ''}_WeaSearchGroup@oaf62w`}
|
||||||
|
title={getLabel("25734", "说明")}
|
||||||
|
needTigger={true}
|
||||||
|
showGroup={true}
|
||||||
|
className="boring-align"
|
||||||
|
items={[{
|
||||||
|
com: <div dangerouslySetInnerHTML={{
|
||||||
|
__html: syncFieldRelationShipSummaryLabel && Object.keys(syncFieldRelationShipSummaryLabel).map(item => {
|
||||||
|
return `${syncFieldRelationShipSummaryLabel[item]}<br/>`;
|
||||||
|
}).join('')
|
||||||
|
}} />
|
||||||
|
}]}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
|
<WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@hhdhnl`}
|
||||||
|
icon={IntegrationUtil.GeneralTitleColor.icon}
|
||||||
|
iconBgcolor={IntegrationUtil.GeneralTitleColor.iconBgcolor}
|
||||||
|
style={{ width: 695, height: 300 }}
|
||||||
|
hasScroll={true}
|
||||||
|
title={getLabel("32935", "导入")}
|
||||||
|
visible={showImportForm}
|
||||||
|
onCancel={() => {
|
||||||
|
status.showImportForm = false;
|
||||||
|
}}
|
||||||
|
buttons={this.getDialogBtns()}
|
||||||
|
moreBtn={{
|
||||||
|
datas: this.getRightMenu2(),
|
||||||
|
collectParams: {
|
||||||
|
favname: getLabel("32935", "导入"),
|
||||||
|
favouritetype: 1,
|
||||||
|
objid: 0,
|
||||||
|
link: "wui/engine.html#/integration/hrsync",
|
||||||
|
importantlevel: 1
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@gk6lww`}
|
||||||
|
datas={this.getRightMenu2()}
|
||||||
|
collectParams={[]}
|
||||||
|
>
|
||||||
|
{importForm.render({ col: 1 }, {
|
||||||
|
onChange: () => { }
|
||||||
|
}, true, (item, index) => {
|
||||||
|
switch (Number(index)) {
|
||||||
|
case 0:
|
||||||
|
return <WeaSearchGroup ecId={`${this && this.props && this.props.ecId || ''}_WeaSearchGroup@kcvjqj`}
|
||||||
|
needTigger={true}
|
||||||
|
showGroup={true}
|
||||||
|
center={true}
|
||||||
|
col={1}
|
||||||
|
title={item.title}
|
||||||
|
>
|
||||||
|
<div>
|
||||||
|
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@uczesg`}
|
||||||
|
label={`${item.items[0].label}`}
|
||||||
|
labelCol={{ span: 9 }}
|
||||||
|
wrapperCol={{ span: 10 }}
|
||||||
|
tipPosition="bottom"
|
||||||
|
style={{textAlign: "center"}}
|
||||||
|
>
|
||||||
|
<div style={{ float: 'left', marginLeft:-10 }}>
|
||||||
|
<WeaUpload ecId={`${this && this.props && this.props.ecId || ''}_WeaUpload@434t8m`}
|
||||||
|
uploadUrl='/api/doc/upload/uploadFile'
|
||||||
|
category='string'
|
||||||
|
limitType='sql'
|
||||||
|
viewAttr="3"
|
||||||
|
maxFilesNumber={1}
|
||||||
|
datas={this.state.filelist}
|
||||||
|
onChange={(ids, list) => { this.setState({ file: ids, filelist: list }) }}
|
||||||
|
>
|
||||||
|
<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@mqedk0`}>{getLabel("125333", "选择文件")}</Button>
|
||||||
|
</WeaUpload>
|
||||||
|
</div>
|
||||||
|
<div style={{ float: 'left', paddingLeft: 10, paddingTop: 6 }}>
|
||||||
|
{this.state.filelist.length == 0 ? <p>{getLabel("384040", "未选择任何文件")}</p> : this.state.filelist.map(file => <p>{file.filename}</p>)}
|
||||||
|
</div>
|
||||||
|
</WeaFormItem>
|
||||||
|
</div>
|
||||||
|
</WeaSearchGroup>
|
||||||
|
case 1:
|
||||||
|
return <WeaSearchGroup ecId={`${this && this.props && this.props.ecId || ''}_WeaSearchGroup@8cmor5`}
|
||||||
|
needTigger={true}
|
||||||
|
showGroup={true}
|
||||||
|
col={1}
|
||||||
|
title={item.title}
|
||||||
|
items={[{
|
||||||
|
com: <div style={{marginLeft: -20}}>{item.items[0].value}</div>
|
||||||
|
}]}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
})}
|
||||||
|
</WeaRightMenu>
|
||||||
|
</WeaDialog>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
: (
|
||||||
|
// 数据同步
|
||||||
|
<div>
|
||||||
|
{IntegrationUtil.getFormSearchs(dataSyncForm, [dataSyncFormFields[0]], true, true, "", "", null, this && this.props && this.props.ecId || '', "integrationHrSyncIndex")}
|
||||||
|
{syncLoading && (
|
||||||
|
<div style={{ textAlign: "center", height: 200, lineHeight: "200px" }}>
|
||||||
|
<Icon ecId={`${this && this.props && this.props.ecId || ''}_Icon@9p9wvk`} style={{ color: "#2db7f5", fontSize: "22px", }} type="loading" />
|
||||||
|
{getLabel('386883', '正在同步,请不要离开该页面,请稍后…')}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{!syncLoading && this.state.hasSyncClick && (
|
||||||
|
<WeaSearchGroup ecId={`${this && this.props && this.props.ecId || ''}_WeaSearchGroup@f6mcdb`} title={dataSyncFormFields[1].title} needTigger={true} showGroup={true}>
|
||||||
|
<div style={{ textAlign: "center" }}>
|
||||||
|
{subSyncResultDataList.length > 0 && <WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@feq0n9`} columns={subSyncResultHeaderList} dataSource={subSyncResultDataList} />}
|
||||||
|
{jobSyncResultDataList.length > 0 && <WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@pwyp5q`} columns={jobSyncResultHeaderList} dataSource={jobSyncResultDataList} />}
|
||||||
|
{jobTypeSyncResultDataList.length > 0 && <WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@7okkg7`} columns={jobTypeSyncResultHeaderList} dataSource={jobTypeSyncResultDataList} />}
|
||||||
|
{deptSyncResultDataList.length > 0 && <WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@mofh0o`} columns={deptSyncResultHeaderList} dataSource={deptSyncResultDataList} />}
|
||||||
|
{gwSyncResultDataList.length > 0 && <WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@pr7xkr`} columns={gwSyncResultHeaderList} dataSource={gwSyncResultDataList} />}
|
||||||
|
{hrmSyncResultDataList.length > 0 && <WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@c8xi66`} columns={hrmSyncResultHeaderList} dataSource={hrmSyncResultDataList} />}
|
||||||
|
{hqSyncResultDataList.length > 0 && <WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@qivr7g`} columns={hqSyncResultHeaderList} dataSource={hqSyncResultDataList} />}
|
||||||
|
{lastLineSyncResultDataList.length > 0 && lastLineSyncResultDataList[0].lastLine}
|
||||||
|
</div>
|
||||||
|
</WeaSearchGroup>
|
||||||
|
)}
|
||||||
|
{!syncLoading && (!this.state.hasSyncClick) && this.getDataSyncDescription(dataSyncForm, [dataSyncFormFields[2]])}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
</WeaNewScroll>
|
||||||
|
}
|
||||||
|
</WeaRightMenu>
|
||||||
|
: <NoRight ecId={`${this && this.props && this.props.ecId || ''}_NoRight@1z7x3p`}/>
|
||||||
|
: <NonStand ecId={`${this && this.props && this.props.ecId || ''}_NonStand@3n1nlv`} />
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default HrSync;
|
||||||
|
|
@ -0,0 +1,164 @@
|
||||||
|
|
||||||
|
import React from "react";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { toJS } from "mobx";
|
||||||
|
import { Modal } from "antd";
|
||||||
|
import { WeaTableEditable, WeaLocaleProvider, WeaTab, WeaButtonIcon} from "ecCom";
|
||||||
|
|
||||||
|
const { confirm } = Modal;
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
// 为了排序 所以写死, 因为是字段名,变了也要改代码,所以无妨
|
||||||
|
const syncFileds = ['sub', 'dept', 'job', 'hrm'];
|
||||||
|
|
||||||
|
@inject("hrSyncStore")
|
||||||
|
@observer
|
||||||
|
class SyncSetFields extends React.Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
selectedKey: "0",
|
||||||
|
selectedRowDatas:[],
|
||||||
|
selectedRowKeys: []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getSyncTableEdit = () => {
|
||||||
|
const { hrSyncStore } = this.props;
|
||||||
|
const { newForm, SyncSetTable, setSyncSetTable } = hrSyncStore;
|
||||||
|
const
|
||||||
|
{ WeaTableEdit_subSyncFieldSet,
|
||||||
|
WeaTableEdit_subSyncFieldData,
|
||||||
|
WeaTableEdit_hrmSyncFieldSet,
|
||||||
|
WeaTableEdit_hrmSyncFieldData,
|
||||||
|
WeaTableEdit_deptSyncFieldSet,
|
||||||
|
WeaTableEdit_deptSyncFieldData,
|
||||||
|
WeaTableEdit_jobSyncFieldSet,
|
||||||
|
WeaTableEdit_jobSyncFieldData, } = toJS(SyncSetTable);
|
||||||
|
const whichFields = [WeaTableEdit_subSyncFieldSet, WeaTableEdit_deptSyncFieldSet, WeaTableEdit_jobSyncFieldSet, WeaTableEdit_hrmSyncFieldSet];
|
||||||
|
const whichDatas = [WeaTableEdit_subSyncFieldData, WeaTableEdit_deptSyncFieldData, WeaTableEdit_jobSyncFieldData, WeaTableEdit_hrmSyncFieldData];
|
||||||
|
const params = newForm.getFormParams();
|
||||||
|
const whichFather = [params.subcomtable, params.depttable, params.jobtable, params.hrmtable];
|
||||||
|
if (whichFields[this.state.selectedKey] && whichFields[this.state.selectedKey][1]) {
|
||||||
|
if (newForm.getFormParams().intetype === "1") {
|
||||||
|
whichFields[this.state.selectedKey][1].com[0].browserConditionParam.dataParams = {
|
||||||
|
datasourceid: params.dbsource,
|
||||||
|
dmltablename: whichFather[this.state.selectedKey]
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
whichFields[this.state.selectedKey][1].com[0].type = "INPUT";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<WeaTableEditable ecId={`${this && this.props && this.props.ecId || ''}_WeaTableEditable@080bmt`}
|
||||||
|
ref={el => { hrSyncStore.syncSetField.table = el }}
|
||||||
|
rowKey="id"
|
||||||
|
tableProps={{
|
||||||
|
showEmptyText: false,
|
||||||
|
scroll: {x: "100%"}
|
||||||
|
}}
|
||||||
|
showTitle={false}
|
||||||
|
// showCopy={false}
|
||||||
|
showAdd={false}
|
||||||
|
showDelete={false}
|
||||||
|
showCopy={false}
|
||||||
|
willDelete={this.willDelete}
|
||||||
|
selectedRowKeys={this.state.selectedRowKeys}
|
||||||
|
datas={whichDatas[this.state.selectedKey]}
|
||||||
|
columns={whichFields[this.state.selectedKey]}
|
||||||
|
onChange={(datas) => {
|
||||||
|
setSyncSetTable(this.state.selectedKey, datas)
|
||||||
|
}}
|
||||||
|
onRowSelect={v => {
|
||||||
|
this.setState({selectedRowDatas:v, selectedRowKeys: v})
|
||||||
|
}}
|
||||||
|
validator={{
|
||||||
|
rules: {
|
||||||
|
oafield: 'required',
|
||||||
|
outfield: 'required',
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
willDelete = (datas, keys) => new Promise((resolve, reject) => {
|
||||||
|
confirm({
|
||||||
|
content: `${getLabel(385625, '确定要删除选择的记录吗?')}`,
|
||||||
|
onOk: () => resolve(true),
|
||||||
|
onCancel: () => resolve(false)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
getBtn = () => {
|
||||||
|
const { hrSyncStore } = this.props;
|
||||||
|
let btnArr = [];
|
||||||
|
|
||||||
|
btnArr.push(
|
||||||
|
<WeaButtonIcon ecId={`${this && this.props && this.props.ecId || ''}_WeaButtonIcon@7ofv26@integrationHrsyncSetFieldButtonAdd`} onClick={() => {hrSyncStore.syncSetField.table.doAdd();}} buttonType='add' type="primary" />,
|
||||||
|
);
|
||||||
|
|
||||||
|
if(this.state.selectedKey == 0) {
|
||||||
|
btnArr.push([
|
||||||
|
<WeaButtonIcon ecId={`${this && this.props && this.props.ecId || ''}_WeaButtonIcon@cdmauo@integrationHrsyncSetFieldButtonDel`} onClick={() => {hrSyncStore.syncSetField.table.doDelete();}} buttonType='del' type="primary" disabled={this.state.selectedRowDatas.length == 0 ? true : false} />
|
||||||
|
]);
|
||||||
|
}else if(this.state.selectedKey == 1) {
|
||||||
|
btnArr.push([
|
||||||
|
<WeaButtonIcon ecId={`${this && this.props && this.props.ecId || ''}_WeaButtonIcon@3h0biq@integrationHrsyncSetFieldButtonDel`} onClick={() => {hrSyncStore.syncSetField.table.doDelete();}} buttonType='del' type="primary" disabled={this.state.selectedRowDatas.length == 0 ? true : false} />
|
||||||
|
]);
|
||||||
|
}else if(this.state.selectedKey == 2) {
|
||||||
|
btnArr.push([
|
||||||
|
<WeaButtonIcon ecId={`${this && this.props && this.props.ecId || ''}_WeaButtonIcon@dpkm6w@integrationHrsyncSetFieldButtonDel`} onClick={() => {hrSyncStore.syncSetField.table.doDelete();}} buttonType='del' type="primary" disabled={this.state.selectedRowDatas.length == 0 ? true : false} />
|
||||||
|
]);
|
||||||
|
}else if(this.state.selectedKey == 3) {
|
||||||
|
btnArr.push([
|
||||||
|
<WeaButtonIcon ecId={`${this && this.props && this.props.ecId || ''}_WeaButtonIcon@00hmki@integrationHrsyncSetFieldButtonDel`} onClick={() => {hrSyncStore.syncSetField.table.doDelete();}} buttonType='del' type="primary" disabled={this.state.selectedRowDatas.length == 0 ? true : false} />
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return btnArr;
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { hrSyncStore } = this.props;
|
||||||
|
const { status } = hrSyncStore;
|
||||||
|
const {
|
||||||
|
showSearchAd,
|
||||||
|
newFormFields,
|
||||||
|
dataSyncFormFields,
|
||||||
|
selectedKey,
|
||||||
|
syncFieldSettingsGroupLabel
|
||||||
|
} = toJS(status);
|
||||||
|
const tabs = []
|
||||||
|
for (let i = 0; i < syncFileds.length; i++) {
|
||||||
|
tabs.push({
|
||||||
|
color: "#000000",
|
||||||
|
groupid: "flowAll",
|
||||||
|
showcount: true,
|
||||||
|
title: syncFieldSettingsGroupLabel && syncFieldSettingsGroupLabel[syncFileds[i]],
|
||||||
|
viewcondition: i
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
{/* 同步关系设置说明 hrm deptjob*/}
|
||||||
|
<WeaTab ecId={`${this && this.props && this.props.ecId || ''}_WeaTab@fryb14`}
|
||||||
|
type="card"
|
||||||
|
datas={tabs}
|
||||||
|
keyParam="viewcondition" //主键
|
||||||
|
countParam="groupid" //数量
|
||||||
|
selectedKey={this.state.selectedKey}
|
||||||
|
onChange={v => {
|
||||||
|
this.setState({ selectedKey: v, selectedRowDatas: [], selectedRowKeys: [] });
|
||||||
|
}}
|
||||||
|
className="no-bg"
|
||||||
|
buttons={this.getBtn()}
|
||||||
|
/>
|
||||||
|
{this.getSyncTableEdit()}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
export default SyncSetFields;
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
.boring-align {
|
||||||
|
.wea-form-cell {
|
||||||
|
padding-left: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.no-bg {
|
||||||
|
.wea-tab-right {
|
||||||
|
background: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
同步表设置start
|
||||||
|
*/
|
||||||
|
.hrsync-tablesetting .ant-col-12 {
|
||||||
|
width: 33%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hrsync-tablesetting .wea-helpful-tip {
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
同步表设置end
|
||||||
|
*/
|
||||||
|
|
@ -0,0 +1,43 @@
|
||||||
|
import React from 'react';
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { toJS } from "mobx";
|
||||||
|
import { WeaDialog, WeaProgress, WeaLocaleProvider } from "ecCom";
|
||||||
|
|
||||||
|
const {getLabel} = WeaLocaleProvider;
|
||||||
|
|
||||||
|
@inject("imrtx")
|
||||||
|
@observer
|
||||||
|
export default class Main extends React.Component {
|
||||||
|
render() {
|
||||||
|
const { imrtx } = this.props;
|
||||||
|
const { status } = imrtx;
|
||||||
|
const { initializeVisible, initializeResult } = toJS(status);
|
||||||
|
return <WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@stmwen`}
|
||||||
|
title={getLabel("386731", "IM初始化进度")}
|
||||||
|
onCancel={()=> imrtx.closeInitialize()}
|
||||||
|
visible={initializeVisible}
|
||||||
|
style={{width: 500, height: 300}}
|
||||||
|
moduleName="integration"
|
||||||
|
>
|
||||||
|
<div style={{padding: '30px 30px'}}>
|
||||||
|
<h4 style={{marginBottom: 6}}>
|
||||||
|
{getLabel('31151', "组织结构同步")}
|
||||||
|
</h4>
|
||||||
|
{
|
||||||
|
initializeResult.flag == 'error'?
|
||||||
|
<div className="align-center">{initializeResult.errorMessage}</div>:
|
||||||
|
<WeaProgress ecId={`${this && this.props && this.props.ecId || ''}_WeaProgress@pq6gxn`} percent={initializeResult.company || 0} strokeColor="#B37BFA"/>
|
||||||
|
}
|
||||||
|
<br/><br/><br/>
|
||||||
|
<h4 style={{marginBottom: 6}}>
|
||||||
|
{getLabel('386890',"人员同步")}
|
||||||
|
</h4>
|
||||||
|
{
|
||||||
|
initializeResult.flag == 'error'?
|
||||||
|
<div className="align-center">{initializeResult.errorMessage}</div>:
|
||||||
|
<WeaProgress ecId={`${this && this.props && this.props.ecId || ''}_WeaProgress@squhi1`} percent={initializeResult.hrm || 0} strokeColor="#B37BFA"/>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</WeaDialog>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,321 @@
|
||||||
|
import React from "react";
|
||||||
|
import {CopyToClipboard} from 'react-copy-to-clipboard';
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { toJS } from "mobx";
|
||||||
|
import { Button, message } from "antd";
|
||||||
|
import { WeaTableNew, WeaSwitch } from "comsMobx";
|
||||||
|
import * as IntegrationUtil from "../../util/IntegrationUtil";
|
||||||
|
import NoRight from "../../public/NoRight";
|
||||||
|
import IMInitDialog from './IMInitDialog';
|
||||||
|
import {
|
||||||
|
WeaLocaleProvider,
|
||||||
|
WeaTop,
|
||||||
|
WeaTab,
|
||||||
|
WeaRightMenu,
|
||||||
|
WeaFormItem,
|
||||||
|
WeaTools,
|
||||||
|
WeaSearchGroup,
|
||||||
|
WeaNewScroll
|
||||||
|
} from "ecCom";
|
||||||
|
|
||||||
|
const { WeaTable } = WeaTableNew;
|
||||||
|
const { getKey } = WeaTools;
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
@inject("imrtx")
|
||||||
|
@observer
|
||||||
|
export default class IMrtx extends React.Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
topTab: [
|
||||||
|
{
|
||||||
|
title: `${getLabel(81711, "基本信息")}`,
|
||||||
|
viewcondition: 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: `${getLabel(125928, "同步日志")}`,
|
||||||
|
viewcondition: 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
collectParams: {
|
||||||
|
favname: `${getLabel('386889', "IM集成设置")}`,
|
||||||
|
favouritetype: 1,
|
||||||
|
objid: 0,
|
||||||
|
link: "wui/engine.html#/integration/imrtx",
|
||||||
|
importantlevel: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps) {
|
||||||
|
const { imrtx } = this.props;
|
||||||
|
if (this.props.location.key !== nextProps.location.key) {
|
||||||
|
imrtx.doInit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
const { imrtx } = this.props;
|
||||||
|
imrtx.doInit();
|
||||||
|
}
|
||||||
|
|
||||||
|
getRightMenu() {
|
||||||
|
const { imrtx } = this.props;
|
||||||
|
const { selectedKey} = toJS(imrtx.status);
|
||||||
|
let data = [];
|
||||||
|
if (selectedKey == 1) {
|
||||||
|
data = [{
|
||||||
|
key: "BTN_COLUMN",
|
||||||
|
icon: "icon-coms-Custom",
|
||||||
|
content: getLabel(32535, "显示列定制")
|
||||||
|
}]
|
||||||
|
}else {
|
||||||
|
data = [{
|
||||||
|
key: "save",
|
||||||
|
icon: "icon-coms-Preservation",
|
||||||
|
content: getLabel(86, "保存")
|
||||||
|
}, {
|
||||||
|
key: "test",
|
||||||
|
icon: "icon-coms-currency-Task",
|
||||||
|
content: getLabel(25496, "测试")
|
||||||
|
}, {
|
||||||
|
key: "initialize",
|
||||||
|
icon: "icon-coms-operation",
|
||||||
|
content: getLabel(20873, "初始化")
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
|
||||||
|
return data && data.map(v => {
|
||||||
|
return {
|
||||||
|
key: v.key,
|
||||||
|
icon: <i className={v.icon} />,
|
||||||
|
content: v.content,
|
||||||
|
onClick: () => this.onRightMenuClick(v.key)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
getAdvancedSearch = () => {
|
||||||
|
const { imrtx } = this.props;
|
||||||
|
const { status, searchForm } = imrtx;
|
||||||
|
const { searchFormFields } = toJS(status);
|
||||||
|
|
||||||
|
return IntegrationUtil.getAdvancedItem(
|
||||||
|
searchForm,
|
||||||
|
searchFormFields,
|
||||||
|
this.handleSearchFun,
|
||||||
|
false,
|
||||||
|
this && this.props && this.props.ecId || '',
|
||||||
|
"integrationImRtx",
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
handleSearchFun = () => {
|
||||||
|
const { imrtx } = this.props;
|
||||||
|
imrtx.getTable();
|
||||||
|
imrtx.setState({ showSearchAd: false });
|
||||||
|
}
|
||||||
|
|
||||||
|
getTabButtonsAd() {
|
||||||
|
const { imrtx } = this.props;
|
||||||
|
return IntegrationUtil.getSearchBtns(
|
||||||
|
this.handleSearchFun,
|
||||||
|
() => imrtx.searchForm.reset(),
|
||||||
|
() => imrtx.setState({ showSearchAd: false }),
|
||||||
|
this && this.props && this.props.ecId || '',
|
||||||
|
"integrationImRtx",
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
getBtns = () => {
|
||||||
|
let data = [{
|
||||||
|
key: "save",
|
||||||
|
content: getLabel(86, "保存")
|
||||||
|
}, {
|
||||||
|
key: "test",
|
||||||
|
content: getLabel(25496, "测试")
|
||||||
|
}, {
|
||||||
|
key: "initialize",
|
||||||
|
content: getLabel(20873, "初始化")
|
||||||
|
}];
|
||||||
|
return data.map(v => <Button ecId={`${this && this.props && this.props.ecId || ''}_Button@3qfvpl@integrationIMButton${v.key}`} type="primary" onClick={() => this.onRightMenuClick(v.key)}>{v.content}</Button>);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
onRightMenuClick = type => {
|
||||||
|
const { imrtx } = this.props;
|
||||||
|
const { save, newBaseForm, initialize, status} = imrtx;
|
||||||
|
const params = newBaseForm.getFormParams();
|
||||||
|
const { initializeResult } = toJS(status);
|
||||||
|
switch (type) {
|
||||||
|
case "save":
|
||||||
|
save(params);
|
||||||
|
break;
|
||||||
|
case "BTN_COLUMN":
|
||||||
|
imrtx.tableBaseInfo.setColSetVisible(true);
|
||||||
|
imrtx.tableBaseInfo.tableColSet(true);
|
||||||
|
break;
|
||||||
|
case "initialize":
|
||||||
|
if (initializeResult && initializeResult.flag && initializeResult.flag == 'syning') {
|
||||||
|
imrtx.initialize();
|
||||||
|
} else {
|
||||||
|
IntegrationUtil.doConfirm(getLabel(81592, "是否开始同步"), imrtx.initialize);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "test":
|
||||||
|
params.method = "test";
|
||||||
|
save(params);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
getFormSearchs = (form, datas) => {
|
||||||
|
const { imrtx } = this.props;
|
||||||
|
const { inputfaceOptions, inputface, getPassWord, status: {showOCSPassWord} } = imrtx;
|
||||||
|
const { isFormInit } = form;
|
||||||
|
const formParams = form.getFormParams();
|
||||||
|
let group = [];
|
||||||
|
|
||||||
|
isFormInit && datas && datas.map((c, index) => {
|
||||||
|
let items = [];
|
||||||
|
c.items && c.items.map(fields => {
|
||||||
|
items.push({
|
||||||
|
com: (
|
||||||
|
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@iehzyb@integrationIMForm${fields.domkey[0]}`}
|
||||||
|
label={(getKey(fields) === "rtxConnServer" && form.getFormParams().rtxOrElinkType == '1') ? getLabel('18782','端口号') : `${fields.label}`}
|
||||||
|
labelCol={{ span: fields.labelcol }}
|
||||||
|
wrapperCol={{ span: fields.fieldcol }}
|
||||||
|
error={form.getError(fields)}
|
||||||
|
tipPosition="bottom"
|
||||||
|
>
|
||||||
|
{
|
||||||
|
getKey(fields) === "download"
|
||||||
|
? <a className="common" href="javascript:void(0)" style={{display: 'inline-table', lineHeight: "30px"}} onClick={()=> {
|
||||||
|
window.location.href = `${location.origin}${fields.helpfulTip}`;
|
||||||
|
}}>{getLabel(31156, "下载")}</a>
|
||||||
|
: <nobr>
|
||||||
|
<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@v8dc7j@integrationIMForm${fields.domkey[0]}`} formParams={formParams} fieldConfig={fields} form={form} onChange={v=> {
|
||||||
|
if(getKey(fields) === 'rtxOrElinkType') {
|
||||||
|
if(form.getFormParams().rtxOrElinkType=="1"){
|
||||||
|
form.updateFields({inputface:inputfaceOptions.ocsInputface});
|
||||||
|
getPassWord();
|
||||||
|
}else{
|
||||||
|
form.updateFields({inputface:inputfaceOptions.rtxInputface});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}}/>
|
||||||
|
{
|
||||||
|
getKey(fields) === "inputface"
|
||||||
|
? <CopyToClipboard ecId={`${this && this.props && this.props.ecId || ''}_CopyToClipboard@ritmmv@integrationIMForm${fields.domkey[0]}`}
|
||||||
|
text={form.getFormParams().inputface}
|
||||||
|
onCopy={() => message.success(getLabel('126081', '地址已经复制成功,您可以使用Ctrl+v粘贴'))}
|
||||||
|
>
|
||||||
|
<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@1g06or@integrationIMForm${fields.domkey[0]}`} style={{position: 'absolute', right:'-55px', top: '4px'}} size="small" type={'ghost'}>{getLabel("77", "复制")}</Button>
|
||||||
|
</CopyToClipboard>
|
||||||
|
: ""
|
||||||
|
}
|
||||||
|
</nobr>
|
||||||
|
}
|
||||||
|
</WeaFormItem>
|
||||||
|
),
|
||||||
|
colSpan: 1,
|
||||||
|
hide: form.isHide(fields, (keys, allParams)=> {
|
||||||
|
let hide = true;
|
||||||
|
let key = keys[0];
|
||||||
|
if (allParams.rtxOrElinkType == '0' && ['rtxserverurl','rtxserverouturl','rtxserverport','rtxConnServer','rtxVersion','rtxDenyHrm',
|
||||||
|
'rtxOnload','impwd','rtxAlert','userattr',
|
||||||
|
'isDownload','download','userattr'].indexOf(key) > -1) {
|
||||||
|
hide = false;
|
||||||
|
} else if (allParams.rtxOrElinkType == '1' && ['domainName','rtxserverurl','rtxDenyHrm','rtxOnload','impwd', 'rtxConnServer',
|
||||||
|
'rtxAlert','userattr','rtxLoginToOA','isDownload'].indexOf(key) > -1) {
|
||||||
|
hide = false;
|
||||||
|
} else if (allParams.rtxOrElinkType == '2' && ['rtxserverurl','rtxDenyHrm',
|
||||||
|
'rtxOnload','rtxAlert','isDownload'].indexOf(key) > -1) {
|
||||||
|
hide = false;
|
||||||
|
}
|
||||||
|
if (key =='inputface' && allParams.rtxLoginToOA === '0') {
|
||||||
|
hide = true;
|
||||||
|
} else if (key =='inputface' && allParams.rtxLoginToOA === '1' && allParams.rtxOrElinkType == '1') {
|
||||||
|
hide = false;
|
||||||
|
}
|
||||||
|
if (key == 'isusedtx' || key == 'rtxOrElinkType') {
|
||||||
|
hide = false;
|
||||||
|
}
|
||||||
|
allParams.rtxOrElinkType == "1" && key === 'impwd' && showOCSPassWord == 0 && (hide = true);
|
||||||
|
return hide;
|
||||||
|
})
|
||||||
|
});
|
||||||
|
});
|
||||||
|
group.push(<WeaSearchGroup ecId={`${this && this.props && this.props.ecId || ''}_WeaSearchGroup@tea10p@$integrationIMForm${index}`} center col={1} needTigger={false} showGroup={c.defaultshow} items={items}/>);
|
||||||
|
});
|
||||||
|
return group;
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { imrtx } = this.props;
|
||||||
|
const { status, tableBaseInfo, newBaseForm,hasRight, rightLoading } = imrtx;
|
||||||
|
const { selectedKey, showSearchAd, baseFormFields, advanceHeight } = toJS(status);
|
||||||
|
const { topTab, collectParams } = this.state;
|
||||||
|
|
||||||
|
return (
|
||||||
|
!rightLoading && <div style={{height: "100%"}}>
|
||||||
|
{
|
||||||
|
hasRight
|
||||||
|
? <WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@8x0c4w`}
|
||||||
|
datas={this.getRightMenu()}
|
||||||
|
collectParams={collectParams}
|
||||||
|
>
|
||||||
|
<WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@jc6smj`}
|
||||||
|
key={selectedKey}
|
||||||
|
title={getLabel('386889',"IM集成设置")}
|
||||||
|
icon={<i className={IntegrationUtil.GeneralTitleColor.icon} />}
|
||||||
|
iconBgcolor={IntegrationUtil.GeneralTitleColor.iconBgcolor}
|
||||||
|
buttons={selectedKey == 0 ? this.getBtns() : []}
|
||||||
|
showDropIcon={true}
|
||||||
|
dropMenuDatas={this.getRightMenu()}
|
||||||
|
dropMenuProps={{
|
||||||
|
collectParams
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<WeaTab ecId={`${this && this.props && this.props.ecId || ''}_WeaTab@bufz5n`}
|
||||||
|
datas={topTab}
|
||||||
|
keyParam="viewcondition"
|
||||||
|
selectedKey={selectedKey}
|
||||||
|
searchType={selectedKey == 1 ? ["advanced"] : []}
|
||||||
|
advanceHeight={advanceHeight}
|
||||||
|
searchsAd={selectedKey == 1 ? this.getAdvancedSearch() : []}
|
||||||
|
showSearchAd={showSearchAd}
|
||||||
|
buttonsAd={this.getTabButtonsAd()}
|
||||||
|
setShowSearchAd={() => imrtx.setState({ showSearchAd: !showSearchAd })}
|
||||||
|
hideSearchAd={() => imrtx.setState({ showSearchAd: false })}
|
||||||
|
onChange={(v)=> {
|
||||||
|
imrtx.setState({ selectedKey: v })
|
||||||
|
if (v == 1) {
|
||||||
|
imrtx.getCondition();
|
||||||
|
imrtx.searchForm.reset();
|
||||||
|
imrtx.getTable();
|
||||||
|
} else {
|
||||||
|
imrtx.getForm();
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
{
|
||||||
|
selectedKey == 0
|
||||||
|
? <WeaNewScroll ecId={`${this && this.props && this.props.ecId || ''}_WeaNewScroll@kjt5ki`} height={"calc(100% - 100px)"}>
|
||||||
|
{this.getFormSearchs(newBaseForm, baseFormFields)}
|
||||||
|
</WeaNewScroll>
|
||||||
|
: <WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@977r56`}
|
||||||
|
comsWeaTableStore={tableBaseInfo}
|
||||||
|
hasOrder={true}
|
||||||
|
needScroll
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
<IMInitDialog ecId={`${this && this.props && this.props.ecId || ''}_IMInitDialog@uamdnv`} />
|
||||||
|
</WeaRightMenu>
|
||||||
|
: <NoRight ecId={`${this && this.props && this.props.ecId || ''}_NoRight@gmq1ul`}/>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue