Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
WebPublic
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
前端开发小组
WebPublic
Commits
0c2bfd13
提交
0c2bfd13
authored
2月 25, 2022
作者:
钟是志
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
动态菜单开发 未完成 下次直接修改 BasicLayout 文件
上级
2b4bb632
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
117 行增加
和
41 行删除
+117
-41
ActiveMenuComponent.js
FormInsertDiy/ExportComponent/ActiveMenuComponent.js
+33
-0
CheckRecord.js
FormInsertDiy/ExportComponent/CheckRecord.js
+24
-0
Services.js
Services.js
+44
-17
utils.js
zyd_public/utils/utils.js
+16
-24
没有找到文件。
FormInsertDiy/ExportComponent/ActiveMenuComponent.js
0 → 100644
浏览文件 @
0c2bfd13
import
React
from
"react"
;
import
CheckRecord
from
"@/webPublic/FormInsertDiy/ExportComponent/CheckRecord"
;
// 查询类
import
Apply
from
"@/webPublic/FormInsertDiy/AffairPage/ApplyPage"
;
// 申请
import
BatchAudit
from
"@/webPublic/FormInsertDiy/AffairPage/AuditPage/BatchAudit"
;
// 批量审批
import
Audit
from
"@/webPublic/FormInsertDiy/AffairPage/AuditPage/index.js"
;
// 审批
import
Detail
from
"@/webPublic/FormInsertDiy/AffairPage/Detail"
;
//详情
export
default
function
ActiveMenuComponent
({
routerConfig
,
...
otherProps
})
{
const
{
component
=
""
,
appId
}
=
routerConfig
;
switch
(
component
)
{
case
"CheckRecord"
:
// 查询类应用
return
<
CheckRecord
workId
=
{
appId
}
location
=
{
routerConfig
}
/>
;
case
"Apply"
:
// 申请类
return
<
Apply
location
=
{
routerConfig
}
workId
=
{
appId
}
/>
;
case
"Audit"
:
// 审批类
return
<
Audit
location
=
{
routerConfig
}
workId
=
{
appId
}
/>
;
case
"BatchAudit"
:
// 批量审批
return
<
Audit
location
=
{
routerConfig
}
workId
=
{
appId
}
/>
;
case
"Detail"
:
// 详情
return
<
Detail
location
=
{
routerConfig
}
{...
otherProps
}
/>
;
default
:
console
.
log
(
component
,
'没有找到此组件'
);
return
<
div
>
暂无此功能
<
/div>
;
}
}
FormInsertDiy/ExportComponent/CheckRecord.js
0 → 100644
浏览文件 @
0c2bfd13
import
RenderForm
from
"@/webPublic/FormInsertDiy/RenderForm"
;
import
{
fetchTemplateById
}
from
'@/webPublic/Services'
;
import
{
useState
,
useEffect
}
from
"react"
;
import
{
Form
}
from
'antd'
;
import
{
getOneStopConfig
}
from
"@/baseComponent/utils"
;
// const id = '1234718972352397312';
// 考核汇总页面
function
OtherCheckRecord
({
form
,
location
:
{
pathname
},
workId
})
{
const
[
data
,
setData
]
=
useState
();
useEffect
(()
=>
{
const
id
=
workId
||
getOneStopConfig
(
pathname
);
setData
(
undefined
);
fetchTemplateById
(
id
).
then
(
res
=>
{
if
(
res
)
setData
({...
res
,
content
:
"{}"
});
});
},
[
pathname
]);
return
!!
data
&&
<
RenderForm
form
=
{
form
}
postData
=
{
data
}
style
=
{{
padding
:
0
}}
/>
;
}
export
default
Form
.
create
()(
OtherCheckRecord
)
Services.js
浏览文件 @
0c2bfd13
...
...
@@ -8,9 +8,9 @@
import
{
uaaRequest
}
from
'./one_stop_public/utils/request'
;
import
config
from
'@/config/config'
;
import
{
message
}
from
'antd'
;
import
{
setOneStopConfig
}
from
'@/webPublic/zyd_public/utils/utils'
;
import
{
setOneStop
ActiveMenusConfig
,
setOneStop
Config
}
from
'@/webPublic/zyd_public/utils/utils'
;
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'
;
// 根据模板code查询模板数据
// 查询表格中某条数据
...
...
@@ -26,11 +26,12 @@ import prepareShow from "@/webPublic/one_stop_public/Table/prepareShow";
export
const
fetchTemplateByCode
=
(
code
)
=>
uaaRequest
(
'/UnifiedServicePatternApi/getDetail'
,
{
code
});
export
const
fetchTemplateById
=
(
id
)
=>
uaaRequest
(
'/UnifiedAppApi/getDetail'
,
{
id
}).
then
((
res
)
=>
{
return
prepareShow
(
res
).
then
((
x
)
=>
{
return
res
;
});
});
export
const
fetchTemplateById
=
(
id
)
=>
uaaRequest
(
'/UnifiedAppApi/getDetail'
,
{
id
}).
then
((
res
)
=>
{
return
prepareShow
(
res
).
then
((
x
)
=>
{
return
res
;
});
});
/**
* 查询表格中某条数据
...
...
@@ -50,13 +51,13 @@ export const fetchTableItem = ({ dataObjId, key, value, isBase = true }) => {
* @param {Number} pageSize
* @param {Number} pageNo
*/
export
const
fetchTableData
=
({
dataObjId
,
query
,
pageSize
,
pageNo
,...
other
})
=>
{
export
const
fetchTableData
=
({
dataObjId
,
query
,
pageSize
,
pageNo
,
...
other
})
=>
{
return
uaaRequest
(
'/DataObjApi/getFormDataPage'
,
{
dataObjId
,
query
:
JSON
.
stringify
(
query
),
pageNo
,
pageSize
,
...
other
,
...
other
,
});
};
...
...
@@ -107,8 +108,8 @@ export const getHistoryFormDetail = ({ id, code }) => {
};
export
const
getTaskDefinition
=
(
data
)
=>
{
return
uaaRequest
(
'/UnifiedAppFormApi/getTaskDefinition'
,
data
);
}
return
uaaRequest
(
'/UnifiedAppFormApi/getTaskDefinition'
,
data
);
}
;
/**
* 获取一站式应用列表
...
...
@@ -135,16 +136,40 @@ export const getListByTreeList = (params = {}) => {
};
export
const
getOneStopMyInfo
=
(
params
=
{})
=>
{
return
uaaRequest
(
'/UserApi/getMy'
,
params
);
return
uaaRequest
(
'/UserApi/getMy'
,
params
);
};
export
function
getOneStopActiveMenus
(
key
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
const
pathList
=
{
'/xg/stundents_record/'
:
[
// 一级
{
level
:
3
,
path
:
'/xg/stundents_record/student/asdasd/45380948502989040823094'
,
locale
:
'查询类页面'
,
component
:
'CheckRecord'
,
authority
:
[
this
.
path
],
exact
:
true
},
],
};
setOneStopActiveMenusConfig
(
pathList
);
if
(
key
&&
pathList
[
key
])
{
resolve
(
pathList
[
key
]);
}
else
{
resolve
(
false
);
}
});
}
export
function
getOnestopKey
(
key
=
''
,
formKey
=
'key_list'
,
formValue
=
'value_list'
)
{
getOneStopActiveMenus
().
then
((
res
)
=>
{});
getOneStopMyInfo
({}).
then
((
res
)
=>
{
if
(
res
)
{
localStorage
.
setItem
(
'user'
,
JSON
.
stringify
(
res
));
}
});
getOneStopMyInfo
({}).
then
((
res
)
=>
{
if
(
res
)
{
localStorage
.
setItem
(
'user'
,
JSON
.
stringify
(
res
));
}
});
return
fetchTableData
({
dataObjId
:
config
.
onestopConfigDataObjId
||
'1248169933162938368'
,
...
...
@@ -157,7 +182,9 @@ export function getOnestopKey(key = '', formKey = 'key_list', formValue = 'value
onestopConfigList
[
item
[
formKey
]]
=
item
[
formValue
];
}
setOneStopConfig
(
onestopConfigList
);
getOneStopConfigList
();
if
(
key
)
{
return
onestopConfigList
[
key
];
}
...
...
zyd_public/utils/utils.js
浏览文件 @
0c2bfd13
...
...
@@ -5,7 +5,7 @@
import
React
from
"react"
;
import
moment
from
"moment"
;
import
{
Icon
,
message
,
notification
}
from
"antd"
;
import
{
getOnestopKey
}
from
"../../Services"
;
import
{
getOne
StopActiveMenus
,
getOne
stopKey
}
from
"../../Services"
;
import
FormdataWrapper
from
"./object-to-formdata-custom"
;
let
messageTime
=
new
Date
().
getTime
()
-
3000
;
...
...
@@ -243,6 +243,20 @@ export function getOneStopConfig(key) {
}
}
export
function
setOneStopActiveMenusConfig
(
value
)
{
window
.
oneStopActiveMenusConfig
=
value
;
}
export
function
getOneStopActiveMenusConfig
(
key
)
{
if
(
window
.
oneStopActiveMenusConfig
&&
typeof
window
.
oneStopActiveMenusConfig
===
'object'
)
{
return
window
.
oneStopActiveMenusConfig
[
key
]
||
false
;
}
else
{
return
getOneStopActiveMenus
(
key
);
}
}
export
function
diGuiTree
(
treeData
=
[],
i
=
0
)
{
// for (let item of treeData) {
// if(i === 2){
...
...
@@ -297,7 +311,7 @@ export function downloadFile(url, params, fileName = "导出文件", ext = "xlsx
});
}
// 校验密码是否符合 包含数字 字母 和特殊字符 解决 中医大的安全漏洞
export
default
function
CheckPassWord
(
password
=
""
)
{
// console.log(password);
if
(
!
password
||
password
.
length
<
12
)
{
...
...
@@ -313,26 +327,4 @@ export default function CheckPassWord(password = "") {
}
return
true
;
// let includeNumber = false;
// let includeWord = false;
// for (let i = 0; i <= password.length; i++) {
// let iN = password.charCodeAt(i);
// //数字
// if (iN >= 48 && iN <= 57) {
// includeNumber = true;
// }
// // 大写 // 小写
// if ((iN >= 65 && iN <= 90) || (iN >= 97 && iN <= 122)) {
// includeWord = true;
// }
//
// if(includeWord && includeNumber){
// return true;
// }
// }
// if(includeWord && includeNumber){
// }else{
// // message.warning("密码过于简单, 请输入不小于8位的密码 且必须包含数字和字母!");
// return false;
// }
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论