Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
WebPublic
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
前端开发小组
WebPublic
Commits
0f2901b8
提交
0f2901b8
authored
3月 01, 2022
作者:
钟是志
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
加密函数剥离出来在最外层处理
上级
0878a4bc
显示空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
100 行增加
和
86 行删除
+100
-86
publicApiService.js
FormInsertDiy/AffairPage/publicApiService.js
+0
-4
index.jsx
one_stop_public/Base16/index.jsx
+85
-1
prepareShow.js
one_stop_public/Table/prepareShow.js
+1
-10
TreeList.js
one_stop_public/libs/formList/TreeList.js
+3
-3
index.js
one_stop_public/libs/formList/index.js
+3
-14
DataColumn.js
one_stop_public/models/DataColumn.js
+1
-19
DataObj.js
one_stop_public/models/DataObj.js
+0
-6
DataRight.js
one_stop_public/models/DataRight.js
+0
-7
affairModels.js
one_stop_public/models/affairModels.js
+0
-16
index.jsx
one_stop_public/tableCompon/index.jsx
+4
-5
request.js
one_stop_public/utils/request.js
+3
-1
没有找到文件。
FormInsertDiy/AffairPage/publicApiService.js
浏览文件 @
0f2901b8
...
...
@@ -7,7 +7,6 @@
import
{
apiRequest
}
from
'../request'
;
import
{
getOneStopConfig
,
isJSON
}
from
'@/baseComponent/utils'
;
import
{
Base16Encode
}
from
'@/webPublic/one_stop_public/Base16'
;
const
giveValue
=
(
x
)
=>
{
if
(
x
&&
x
.
rows
)
{
...
...
@@ -204,9 +203,6 @@ const handleAudit = (info) => {
};
const
handleSqlData
=
(
info
)
=>
{
if
(
info
.
sqlKey
){
info
.
sqlKey
=
Base16Encode
(
info
.
sqlKey
);
}
return
apiRequest
(
'/DataColumnApi/getSqlData'
,
info
).
then
((
x
)
=>
{
if
(
x
)
{
return
x
;
...
...
one_stop_public/Base16/index.jsx
浏览文件 @
0f2901b8
import
baseX
from
'base-x'
;
import
{
connect
}
from
'dva'
;
var
BASE16
=
'0123456789abcdef'
;
var
bs16
=
baseX
(
BASE16
);
...
...
@@ -10,3 +10,87 @@ export function Base16Encode(value) {
if
(
is_open_base14
)
return
value
?
bs16
.
encode
(
new
Buffer
(
value
))
:
null
;
return
value
;
}
const
giveKey
=
(
key
,
datas
)
=>
{
if
(
datas
&&
datas
[
key
])
{
datas
[
key
]
=
Base16Encode
(
datas
[
key
]);
}
return
datas
;
};
export
function
giveBase16EnCode
(
datas
,
url
)
{
if
(
url
)
{
if
(
url
.
indexOf
(
'DataColumnApi/getOptions'
)
>
-
1
)
{
return
giveKey
(
'filterSql'
,
datas
);
}
if
(
url
.
indexOf
(
'DataRightApi/add'
)
>
-
1
)
{
return
giveKey
(
'filterSql'
,
datas
);
}
if
(
url
.
indexOf
(
'DataRightApi/addBatch'
)
>
-
1
)
{
return
giveKey
(
'filterSql'
,
datas
);
}
if
(
url
.
indexOf
(
'DataColumnApi/getLabels'
)
>
-
1
)
{
return
giveKey
(
'allValues'
,
datas
);
}
if
(
url
.
indexOf
(
'DataColumnApi/getSqlOptions'
)
>
-
1
)
{
return
giveKey
(
'allValues'
,
datas
);
}
if
(
url
.
indexOf
(
'DataColumnApi/getSqlLabels'
)
>
-
1
)
{
return
giveKey
(
'allValues'
,
datas
);
}
if
(
url
.
indexOf
(
'DataColumnApi/getSqlData'
)
>
-
1
)
{
datas
=
giveKey
(
'allValues'
,
datas
);
return
giveKey
(
'sqlKey'
,
datas
);
}
if
(
url
.
indexOf
(
'DataObjApi/add'
)
>
-
1
)
{
return
giveKey
(
'sqlScript'
,
datas
);
}
if
(
url
.
indexOf
(
'UserApi/getPage'
)
>
-
1
)
{
return
giveKey
(
'addSignSql'
,
datas
);
}
if
(
url
.
indexOf
(
'DataObjApi/getFormDataList'
)
>
-
1
)
{
return
giveKey
(
'custom'
,
datas
);
}
if
(
url
.
indexOf
(
'DataObjApi/getFormDataPage'
)
>
-
1
)
{
datas
=
giveKey
(
'custom'
,
datas
);
return
giveKey
(
'sql'
,
datas
);
}
if
(
url
.
indexOf
(
'UnifiedAppFormApi/examineProcess'
)
>
-
1
)
{
return
giveKey
(
'taskForm'
,
datas
);
}
if
(
url
.
indexOf
(
'UnifiedAppFormApi/saveDraft'
)
>
-
1
)
{
return
giveKey
(
'content'
,
datas
);
}
if
(
url
.
indexOf
(
'UnifiedAppFormApi/startProcess'
)
>
-
1
)
{
return
giveKey
(
'content'
,
datas
);
}
if
(
url
.
indexOf
(
'UnifiedAppFormApi/startProcessByService'
)
>
-
1
)
{
return
giveKey
(
'content'
,
datas
);
}
if
(
url
.
indexOf
(
'UnifiedAppFormApi/getHandleUser'
)
>
-
1
)
{
return
giveKey
(
'content'
,
datas
);
}
// if (url.indexOf('UnifiedServicePatternApi/updateForm') > -1) {
// return giveKey('content', datas);
// }
}
return
datas
;
}
one_stop_public/Table/prepareShow.js
浏览文件 @
0f2901b8
...
...
@@ -3,15 +3,6 @@ import {isJSON} from '@/webPublic/one_stop_public/copy';
import
{
uaaRequest
}
from
'@/webPublic/one_stop_public/utils/request'
;
import
{
Modal
,
message
,
Spin
}
from
'antd'
;
import
{
deepCopy
}
from
"@/webPublic/one_stop_public/utils/myutils"
;
import
{
Base16Encode
}
from
'@/webPublic/one_stop_public/Base16'
;
let
uaaRequestDiy
=
(
url
,
data
,
options
=
{})
=>
{
if
(
data
&&
data
.
sqlKey
&&
url
.
indexOf
(
'/DataColumnApi/getSqlData'
)
>
-
1
){
data
.
sqlKey
=
Base16Encode
(
data
.
sqlKey
);
}
return
uaaRequest
(
url
,
data
,
options
=
{});
}
export
default
function
prepareShow
(
postData
=
{}
,
content
=
''
)
{
// 模板挂载前执行的公式
let
agg
=
deepCopy
(
postData
);
...
...
@@ -22,7 +13,7 @@ export default function prepareShow(postData = {} , content = '') { // 模板挂
let
p
=
{
// 函数参数
message
,
Modal
,
uaaRequest
:
uaaRequestDiy
,
uaaRequest
,
userNowInfo
:
(
isJSON
(
localStorage
.
getItem
(
'user'
))
&&
JSON
.
parse
(
localStorage
.
getItem
(
'user'
)))
||
{},
...
...
one_stop_public/libs/formList/TreeList.js
浏览文件 @
0f2901b8
...
...
@@ -426,7 +426,7 @@ class TreeList extends React.Component {
window
.
removeEventListener
(
'resize'
,
this
.
resize
);
}
custom
=
this
.
props
.
value
?
Base16Encode
(
JSON
.
stringify
(
this
.
props
.
value
)
)
:
null
;
custom
=
this
.
props
.
value
?
JSON
.
stringify
(
this
.
props
.
value
)
:
null
;
componentWillReceiveProps
(
nextProps
)
{
const
b
=
nextProps
.
value
||
{};
...
...
@@ -442,7 +442,7 @@ class TreeList extends React.Component {
this
.
columns
=
nextProps
.
value
.
columns
;
}
this
.
custom
=
Base16Encode
(
JSON
.
stringify
(
b
)
);
this
.
custom
=
JSON
.
stringify
(
b
);
if
(
nextProps
.
value
.
getPage
)
{
this
.
getPage
(
params
,
null
,
nextProps
.
value
.
getPage
);
}
else
{
...
...
@@ -588,7 +588,7 @@ class TreeList extends React.Component {
});
}
};
sqlBs16
=
Base16Encode
(
this
.
props
.
sql
)
;
sqlBs16
=
this
.
props
.
sql
;
getPage
=
(
params
,
values
,
callPage
,
callback
)
=>
{
if
(
this
.
columns
==
null
||
this
.
columns
.
length
==
0
)
{
return
;
...
...
one_stop_public/libs/formList/index.js
浏览文件 @
0f2901b8
...
...
@@ -398,18 +398,7 @@ class FormList extends React.Component {
window
.
removeEventListener
(
'resize'
,
this
.
resize
);
}
custom
=
this
.
props
.
value
?
Base16Encode
(
JSON
.
stringify
(
this
.
props
.
value
))
:
null
;
// componentDidUpdate(prevProps, prevState) {
// console.log(this.props?.value?.columns, prevProps?.props?.value?.columns);
// if(this.props?.value && this.props?.value?.columns !== prevProps?.props?.value?.columns){
// if (Number(this.props.objCode) === 1) {
// this.initColumn();
// }
// }
// return null;
// }
custom
=
this
.
props
.
value
?
JSON
.
stringify
(
this
.
props
.
value
)
:
null
;
componentWillReceiveProps
(
nextProps
)
{
const
b
=
nextProps
.
value
||
{};
...
...
@@ -419,7 +408,7 @@ class FormList extends React.Component {
const
jsonb
=
JSON
.
stringify
(
b
);
const
jsona
=
JSON
.
stringify
(
a
);
this
.
custom
=
Base16Encode
(
jsonb
)
;
this
.
custom
=
jsonb
;
if
(
jsona
!=
jsonb
)
{
let
params
=
{
pageNo
:
b
.
pageNo
?
b
.
pageNo
:
1
,
...
...
@@ -657,7 +646,7 @@ class FormList extends React.Component {
});
}
};
sqlBs16
=
Base16Encode
(
this
.
props
.
sql
)
;
sqlBs16
=
this
.
props
.
sql
;
getPage
=
(
params
,
values
,
callPage
,
pageNo
)
=>
{
...
...
one_stop_public/models/DataColumn.js
浏览文件 @
0f2901b8
import
{
apiRequest
}
from
'../utils/request'
;
import
{
Base16Encode
}
from
'../Base16/index'
;
const
api
=
'/DataColumnApi'
;
export
default
{
...
...
@@ -72,9 +71,6 @@ export default {
if
(
callback
)
callback
(
response
);
},
*
getOptions
({
payload
,
callback
},
{
call
,
put
})
{
if
(
payload
.
filterSql
)
{
payload
.
filterSql
=
Base16Encode
(
payload
.
filterSql
);
}
const
response
=
yield
call
(
apiRequest
,
api
+
'/getOptions'
,
payload
);
if
(
!
response
)
{
yield
put
({
type
:
'nom'
});
...
...
@@ -88,9 +84,6 @@ export default {
if
(
callback
)
callback
(
response
);
},
*
getLabels
({
payload
,
callback
},
{
call
,
put
})
{
if
(
payload
.
allValues
)
{
payload
.
allValues
=
Base16Encode
(
payload
.
allValues
);
}
const
response
=
yield
call
(
apiRequest
,
api
+
'/getLabels'
,
payload
);
if
(
!
response
)
{
yield
put
({
type
:
'nom'
});
...
...
@@ -104,9 +97,6 @@ export default {
if
(
callback
)
callback
(
response
);
},
*
getSqlOptions
({
payload
,
callback
},
{
call
,
put
})
{
if
(
payload
.
allValues
)
{
payload
.
allValues
=
Base16Encode
(
payload
.
allValues
);
}
const
response
=
yield
call
(
apiRequest
,
api
+
'/getSqlOptions'
,
payload
);
if
(
!
response
)
{
yield
put
({
type
:
'nom'
});
...
...
@@ -120,9 +110,6 @@ export default {
if
(
callback
)
callback
(
response
);
},
*
getSqlLabels
({
payload
,
callback
},
{
call
,
put
})
{
if
(
payload
.
allValues
)
{
payload
.
allValues
=
Base16Encode
(
payload
.
allValues
);
}
const
response
=
yield
call
(
apiRequest
,
api
+
'/getSqlLabels'
,
payload
);
if
(
!
response
)
{
...
...
@@ -137,12 +124,7 @@ export default {
if
(
callback
)
callback
(
response
);
},
*
getSqlData
({
payload
,
callback
},
{
call
,
put
})
{
if
(
payload
.
sqlKey
)
{
payload
.
sqlKey
=
Base16Encode
(
payload
.
sqlKey
);
}
if
(
payload
.
allValues
)
{
payload
.
allValues
=
Base16Encode
(
payload
.
allValues
);
}
const
response
=
yield
call
(
apiRequest
,
api
+
'/getSqlData'
,
payload
);
if
(
!
response
)
{
yield
put
({
type
:
'nom'
});
...
...
one_stop_public/models/DataObj.js
浏览文件 @
0f2901b8
import
{
apiRequest
}
from
'../utils/request'
;
const
api
=
'/DataObjApi'
;
import
{
Base16Encode
}
from
'../Base16/index'
;
export
default
{
namespace
:
'DataObj'
,
...
...
@@ -148,9 +145,6 @@ export default {
if
(
callback
)
callback
(
response
);
},
*
add
({
payload
,
callback
},
{
call
,
put
})
{
if
(
payload
.
sqlScript
)
{
payload
.
sqlScript
=
Base16Encode
(
payload
.
sqlScript
);
}
const
response
=
yield
call
(
apiRequest
,
api
+
'/add'
,
payload
);
if
(
!
response
)
{
yield
put
({
type
:
'nom'
});
...
...
one_stop_public/models/DataRight.js
浏览文件 @
0f2901b8
import
{
apiRequest
}
from
'../utils/request'
;
import
{
Base16Encode
}
from
'../Base16/index'
;
const
api
=
'/DataRightApi'
;
...
...
@@ -19,9 +18,6 @@ export default {
if
(
callback
)
callback
();
},
*
add
({
payload
,
callback
},
{
call
,
put
})
{
if
(
payload
.
filterSql
)
{
payload
.
filterSql
=
Base16Encode
(
payload
.
filterSql
);
}
const
response
=
yield
call
(
apiRequest
,
api
+
'/add'
,
payload
);
if
(
!
response
)
{
yield
put
({
type
:
'nom'
});
...
...
@@ -35,9 +31,6 @@ export default {
if
(
callback
)
callback
(
response
);
},
*
addBatch
({
payload
,
callback
},
{
call
,
put
})
{
if
(
payload
.
filterSql
)
{
payload
.
filterSql
=
Base16Encode
(
payload
.
filterSql
);
}
const
response
=
yield
call
(
apiRequest
,
api
+
'/addBatch'
,
payload
);
if
(
!
response
)
{
yield
put
({
type
:
'nom'
});
...
...
one_stop_public/models/affairModels.js
浏览文件 @
0f2901b8
...
...
@@ -4,7 +4,6 @@
* 事务相关接口
*/
import
{
uaaRequest
}
from
'../utils/request'
;
import
{
Base16Encode
}
from
'../Base16/index'
;
import
prepareShow
from
"@/webPublic/one_stop_public/Table/prepareShow"
;
import
{
deepCopy
}
from
"@/webPublic/one_stop_public/utils/myutils"
;
...
...
@@ -125,9 +124,6 @@ const myCollect = {
* @param {examineMap} 审核内容
*/
*
getExamineProcess
({
payload
,
callback
},
{
call
,
put
})
{
if
(
payload
.
taskForm
)
{
payload
.
taskForm
=
Base16Encode
(
payload
.
taskForm
);
}
let
response
=
yield
call
(
uaaRequest
,
`
${
api
}
/examineProcess`
,
{
...
payload
,
});
...
...
@@ -198,9 +194,6 @@ const myCollect = {
* @param {title} 表单标题
*/
*
saveDraft
({
payload
,
callback
},
{
call
,
put
})
{
if
(
payload
.
content
)
{
payload
.
content
=
Base16Encode
(
payload
.
content
);
}
const
response
=
yield
call
(
uaaRequest
,
`
${
api
}
/saveDraft`
,
{
...
payload
,
});
...
...
@@ -220,9 +213,6 @@ const myCollect = {
* @param {title} 表单标题
*/
*
startProcess
({
payload
,
callback
},
{
call
,
put
})
{
if
(
payload
.
content
)
{
payload
.
content
=
Base16Encode
(
payload
.
content
);
}
const
response
=
yield
call
(
uaaRequest
,
`
${
api
}
/startProcess`
,
{
...
payload
,
});
...
...
@@ -235,9 +225,6 @@ const myCollect = {
}
},
*
startProcessByService
({
payload
,
callback
},
{
call
,
put
})
{
if
(
payload
.
content
)
{
payload
.
content
=
Base16Encode
(
payload
.
content
);
}
const
response
=
yield
call
(
uaaRequest
,
`
${
api
}
/startProcessByService`
,
{
...
payload
,
});
...
...
@@ -250,9 +237,6 @@ const myCollect = {
}
},
*
getHandleUser
({
payload
,
callback
},
{
call
,
put
})
{
if
(
payload
.
content
)
{
payload
.
content
=
Base16Encode
(
payload
.
content
);
}
const
response
=
yield
call
(
uaaRequest
,
`
${
api
}
/getHandleUser`
,
{
...
payload
,
});
...
...
one_stop_public/tableCompon/index.jsx
浏览文件 @
0f2901b8
...
...
@@ -51,7 +51,7 @@ import { extend } from 'umi-request';
import
Highlighter
from
'react-highlight-words'
;
import
Signature
from
'../Signature'
;
import
{
changeToDraftState
,
deepCopy
,
preHandle
}
from
'../utils/myutils'
;
import
{
Base16Enc
ode
}
from
'../Base16/index'
;
import
{
giveBase16EnC
ode
}
from
'../Base16/index'
;
import
{
getToken
}
from
'../utils/token'
;
import
{
formulaList
}
from
'../excelInitFuc/functionList'
;
import
FilePreview
from
'../filePreview'
;
...
...
@@ -452,7 +452,7 @@ export default class tableCom extends Component {
dispatch
({
type
:
'DataColumn/getSqlData'
,
payload
:
{
sqlKey
:
Base16Encode
(
sqlKey
)
,
allValues
},
payload
:
{
sqlKey
,
allValues
},
callback
:
list
=>
{
const
x
=
{
list
:
list
,
...
...
@@ -904,12 +904,11 @@ export default class tableCom extends Component {
...
this
.
props
.
defaultValues
[
this
.
props
.
formKey
],
...
options
,
});
const
pp
=
{
sqlKey
:
Base16Encode
(
sqlKey
),
params
,
allValues
:
Base16Encode
(
allValues
)
};
let
pp
=
{
sqlKey
,
params
,
allValues
,
};
if
(
getToken
()
!=
null
)
{
pp
.
token
=
getToken
();
}
console
.
log
(
pp
,
'0000002222'
);
pp
=
giveBase16EnCode
(
pp
,
url
);
umiRequest
(
url
,
{
data
:
pp
,
...
...
one_stop_public/utils/request.js
浏览文件 @
0f2901b8
...
...
@@ -14,7 +14,7 @@ import {
import
{
openToast
}
from
'../location/Notification'
;
import
{
showToast
}
from
'../location/Toast'
;
import
{
offline
}
from
'../location/Toast'
;
import
{
Base16Enc
ode
}
from
"@/webPublic/one_stop_public/Base16"
;
import
{
giveBase16EnC
ode
}
from
"@/webPublic/one_stop_public/Base16"
;
const
codeMessage
=
{
200
:
'服务器成功返回请求的数据。'
,
...
...
@@ -117,6 +117,8 @@ const loginUmiRequest = extend({
const
getUrl
=
url
=>
(
url
.
startsWith
(
'/'
)
?
url
:
'/'
+
url
);
export
const
request
=
(
url
,
data
,
options
=
{})
=>
{
data
=
giveBase16EnCode
(
url
,
data
);
let
version
=
localStorage
.
getItem
(
'version'
)
&&
localStorage
.
getItem
(
'version'
)
!==
'undefined'
?
JSON
.
parse
(
localStorage
.
getItem
(
'version'
))
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论