Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
WebPublic
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
前端开发小组
WebPublic
Commits
b0540125
提交
b0540125
authored
5月 26, 2022
作者:
钟是志
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
发起页面修改
上级
042ce18f
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
25 行增加
和
25 行删除
+25
-25
Services.js
Services.js
+4
-13
prepareShow.js
one_stop_public/Table/prepareShow.js
+1
-3
index.tsx
one_stop_public/location/Notification/index.tsx
+1
-3
token.js
one_stop_public/utils/token.js
+7
-6
utils.js
one_stop_public/utils/utils.js
+12
-0
没有找到文件。
Services.js
浏览文件 @
b0540125
...
@@ -11,6 +11,7 @@ import { setOneStopActiveMenusConfig, setOneStopConfig } from '@/webPublic/zyd_p
...
@@ -11,6 +11,7 @@ import { setOneStopActiveMenusConfig, setOneStopConfig } from '@/webPublic/zyd_p
import
{
getOneStopConfigList
}
from
'@/webPublic/one_stop_public/publicServices'
;
import
{
getOneStopConfigList
}
from
'@/webPublic/one_stop_public/publicServices'
;
import
prepareShow
from
'@/webPublic/one_stop_public/Table/prepareShow'
;
import
prepareShow
from
'@/webPublic/one_stop_public/Table/prepareShow'
;
import
{
queryApiVersion
}
from
'@/webPublic/one_stop_public/utils/queryConfig'
;
import
{
queryApiVersion
}
from
'@/webPublic/one_stop_public/utils/queryConfig'
;
import
{
getOneStopMyInfo
}
from
'@/webPublic/one_stop_public/utils/utils'
;
// 根据模板code查询模板数据
// 根据模板code查询模板数据
// 查询表格中某条数据
// 查询表格中某条数据
...
@@ -145,7 +146,8 @@ export const getHistoryFormDetail = (params = {}) => {
...
@@ -145,7 +146,8 @@ export const getHistoryFormDetail = (params = {}) => {
}
else
{
}
else
{
return
null
;
return
null
;
}
}
}).
then
((
g
)
=>
{
})
.
then
((
g
)
=>
{
// console.log(g);
// console.log(g);
return
g
;
return
g
;
});
});
...
@@ -190,17 +192,7 @@ export const getAppTypeList = () => {
...
@@ -190,17 +192,7 @@ export const getAppTypeList = () => {
export
const
getListByTreeList
=
(
params
=
{})
=>
{
export
const
getListByTreeList
=
(
params
=
{})
=>
{
return
uaaRequest
(
'/UnifiedAppApi/getListByTree'
,
params
);
return
uaaRequest
(
'/UnifiedAppApi/getListByTree'
,
params
);
};
};
export
{
getOneStopMyInfo
};
export
const
getOneStopMyInfo
=
(
params
=
{})
=>
{
return
uaaRequest
(
'/UserApi/getMy'
,
params
).
then
((
res
)
=>
{
if
(
res
)
{
if
(
!
res
.
groupsId
){
res
.
groupsId
=
'pub'
;
}
localStorage
.
setItem
(
'user'
,
JSON
.
stringify
(
res
));
}
});
};
export
function
getOneStopActiveMenus
(
key
)
{
export
function
getOneStopActiveMenus
(
key
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
...
@@ -213,7 +205,6 @@ export function getOnestopKey(key = '', formKey = 'key_list', formValue = 'value
...
@@ -213,7 +205,6 @@ export function getOnestopKey(key = '', formKey = 'key_list', formValue = 'value
getOneStopActiveMenus
()
getOneStopActiveMenus
()
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
});
});
getOneStopMyInfo
({});
return
fetchTableData
({
return
fetchTableData
({
dataObjId
:
config
.
onestopConfigDataObjId
||
'1248169933162938368'
,
dataObjId
:
config
.
onestopConfigDataObjId
||
'1248169933162938368'
,
pageNo
:
1
,
pageNo
:
1
,
...
...
one_stop_public/Table/prepareShow.js
浏览文件 @
b0540125
import
React
from
'react'
;
import
React
from
'react'
;
import
{
Modal
,
message
}
from
'antd'
;
import
{
isJSON
}
from
'@/webPublic/one_stop_public/copy'
;
import
{
isJSON
}
from
'@/webPublic/one_stop_public/copy'
;
import
{
uaaRequest
}
from
'@/webPublic/one_stop_public/utils/request'
;
import
{
uaaRequest
}
from
'@/webPublic/one_stop_public/utils/request'
;
import
{
deepCopy
}
from
'@/webPublic/one_stop_public/utils/myutils'
;
import
{
deepCopy
}
from
'@/webPublic/one_stop_public/utils/myutils'
;
import
{
getMessage
,
getModal
}
from
'@/webPublic/one_stop_public/utils/utils'
;
import
moment
from
'moment'
;
import
moment
from
'moment'
;
import
{
giveSmartFormGlobalProps
}
from
'@/webPublic/one_stop_public/Table/giveSmartFormGlobalProps'
;
import
{
giveSmartFormGlobalProps
}
from
'@/webPublic/one_stop_public/Table/giveSmartFormGlobalProps'
;
import
{
getToken
}
from
'@/webPublic/one_stop_public/utils/token'
;
import
{
getToken
}
from
'@/webPublic/one_stop_public/utils/token'
;
const
Modal
=
getModal
();
const
message
=
getMessage
();
export
default
function
prepareShow
(
postData
=
{},
content
=
''
)
{
export
default
function
prepareShow
(
postData
=
{},
content
=
''
)
{
// 模板挂载前执行的公式
// 模板挂载前执行的公式
...
...
one_stop_public/location/Notification/index.tsx
浏览文件 @
b0540125
...
@@ -4,9 +4,7 @@
...
@@ -4,9 +4,7 @@
* 通知提醒框二次封装
* 通知提醒框二次封装
*/
*/
import
React
from
'react'
;
import
React
from
'react'
;
import
{
notification
}
from
'antd'
;
import
{
notification
,
Modal
}
from
'antd'
;
import
{
getModal
}
from
'@/webPublic/one_stop_public/utils/utils'
;
const
Modal
=
getModal
();
/**
/**
*
*
...
...
one_stop_public/utils/token.js
浏览文件 @
b0540125
...
@@ -2,20 +2,21 @@
...
@@ -2,20 +2,21 @@
* 设置token
* 设置token
* */
* */
import
{
isJSON
}
from
'@/webPublic/one_stop_public/copy'
;
import
{
isJSON
}
from
'@/webPublic/one_stop_public/copy'
;
import
{
getOneStopMyInfo
}
from
'@/webPublic/one_stop_public/utils/utils'
;
export
const
setToken
=
(
value
,
time
)
=>
{
export
function
setToken
(
value
,
time
)
{
if
(
getToken
()
!==
value
){
if
(
getToken
()
!==
value
){
localStorage
.
setItem
(
'antd-pro-token-onestop'
,
value
);
localStorage
.
setItem
(
'antd-pro-token-onestop'
,
value
);
localStorage
.
setItem
(
'antd-pro-token'
,
value
);
localStorage
.
setItem
(
'antd-pro-token'
,
value
);
localStorage
.
setItem
(
'wisdom-school-token'
,
value
);
localStorage
.
setItem
(
'wisdom-school-token'
,
value
);
getOneStopMyInfo
();
}
}
}
}
/**
/**
* 获取token
* 获取token
* */
* */
export
const
getToken
=
()
=>
{
export
function
getToken
()
{
const
x
=
localStorage
.
getItem
(
'antd-pro-token-onestop'
);
const
x
=
localStorage
.
getItem
(
'antd-pro-token-onestop'
);
if
(
x
&&
x
.
length
>
11
)
{
if
(
x
&&
x
.
length
>
11
)
{
return
x
;
return
x
;
...
@@ -26,7 +27,7 @@ export const getToken = () => {
...
@@ -26,7 +27,7 @@ export const getToken = () => {
}
}
return
null
;
return
null
;
}
;
}
/**
/**
* 删除token
* 删除token
...
@@ -35,7 +36,7 @@ export const delToken = () => {
...
@@ -35,7 +36,7 @@ export const delToken = () => {
localStorage
.
removeItem
(
'antd-pro-token-onestop'
);
localStorage
.
removeItem
(
'antd-pro-token-onestop'
);
localStorage
.
removeItem
(
'antd-pro-token'
);
localStorage
.
removeItem
(
'antd-pro-token'
);
localStorage
.
removeItem
(
'wisdom-school-token'
);
localStorage
.
removeItem
(
'wisdom-school-token'
);
}
}
;
export
const
getUserInfo
=
()
=>
{
export
const
getUserInfo
=
()
=>
{
let
x
=
localStorage
.
getItem
(
'user'
);
let
x
=
localStorage
.
getItem
(
'user'
);
...
@@ -50,4 +51,4 @@ export const getUserInfo = () => {
...
@@ -50,4 +51,4 @@ export const getUserInfo = () => {
groupsId
:
'pub'
,
groupsId
:
'pub'
,
};
};
}
}
}
}
;
one_stop_public/utils/utils.js
浏览文件 @
b0540125
/* eslint no-useless-escape:0 import/prefer-default-export:0 */
/* eslint no-useless-escape:0 import/prefer-default-export:0 */
import
{
Modal
,
Popconfirm
,
message
}
from
'antd'
;
import
{
Modal
,
Popconfirm
,
message
}
from
'antd'
;
import
{
uaaRequest
}
from
'@/webPublic/one_stop_public/utils/request'
;
const
reg
=
/
(((
^https
?
:
(?:\/\/)?)(?:[
-;:&=
\+\$
,
\w]
+@
)?[
A-Za-z0-9.-
]
+
(?:
:
\d
+
)?
|
(?:
www.|
[
-;:&=
\+\$
,
\w]
+@
)[
A-Za-z0-9.-
]
+
)((?:\/[\+
~%
\/
.
\w
-_
]
*
)?\??(?:[
-
\+
=&;%@.
\w
_
]
*
)
#
?(?:[\w]
*
))?)
$/
;
const
reg
=
/
(((
^https
?
:
(?:\/\/)?)(?:[
-;:&=
\+\$
,
\w]
+@
)?[
A-Za-z0-9.-
]
+
(?:
:
\d
+
)?
|
(?:
www.|
[
-;:&=
\+\$
,
\w]
+@
)[
A-Za-z0-9.-
]
+
)((?:\/[\+
~%
\/
.
\w
-_
]
*
)?\??(?:[
-
\+
=&;%@.
\w
_
]
*
)
#
?(?:[\w]
*
))?)
$/
;
...
@@ -54,3 +55,14 @@ export const getPopconfirm = () => {
...
@@ -54,3 +55,14 @@ export const getPopconfirm = () => {
export
const
getMessage
=
()
=>
{
export
const
getMessage
=
()
=>
{
return
isFromIframe
()
?
window
?.
parent
?.
iframeParentComponent
?.
message
:
message
;
return
isFromIframe
()
?
window
?.
parent
?.
iframeParentComponent
?.
message
:
message
;
};
};
export
const
getOneStopMyInfo
=
(
params
=
{})
=>
{
return
uaaRequest
(
'/UserApi/getMy'
,
params
).
then
((
res
)
=>
{
if
(
res
)
{
if
(
!
res
.
groupsId
){
res
.
groupsId
=
'pub'
;
}
localStorage
.
setItem
(
'user'
,
JSON
.
stringify
(
res
));
}
});
};
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论