Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
WebPublic
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
前端开发小组
WebPublic
Commits
55582527
提交
55582527
authored
10月 17, 2022
作者:
姚鑫国
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
http://scjoyedu.eicp.net:9121/front-team/webPublic
上级
0f7657a4
51b98175
显示空白字符变更
内嵌
并排
正在显示
14 个修改的文件
包含
981 行增加
和
24 行删除
+981
-24
BatchAudit.js
FormInsertDiy/AffairPage/AuditPage/BatchAudit.js
+6
-1
List.js
FormInsertDiy/AffairPage/AuditPage/List.js
+1
-0
exportHandledInfo.js
FormInsertDiy/AffairPage/AuditPage/exportHandledInfo.js
+40
-0
index.js
FormInsertDiy/AffairPage/AuditPage/index.js
+38
-8
index.js
FormInsertDiy/AffairPage/ButtonListDom/index.js
+2
-2
ActiveMenuComponent.js
FormInsertDiy/ExportComponent/ActiveMenuComponent.js
+19
-0
Index.js
FormInsertDiy/ExportComponent/SelectPerson/Index.js
+422
-0
lowCodeProps.js
FormInsertDiy/ExportComponent/SelectPerson/lowCodeProps.js
+122
-0
publicFunctions.js
...InsertDiy/ExportComponent/SelectPerson/publicFunctions.js
+82
-0
basicTitle.less
...rtDiy/ExportComponent/SelectPerson/styles/basicTitle.less
+18
-0
styles.less
...InsertDiy/ExportComponent/SelectPerson/styles/styles.less
+220
-0
index.js
FormInsertDiy/RenderForm/index.js
+2
-0
SplitBase16Index.js
one_stop_public/Base16/SplitBase16Index.js
+8
-10
UploadCom.js
one_stop_public/libs/UploadCom.js
+1
-3
没有找到文件。
FormInsertDiy/AffairPage/AuditPage/BatchAudit.js
浏览文件 @
55582527
...
@@ -9,5 +9,10 @@ import AuditPage from './index';
...
@@ -9,5 +9,10 @@ import AuditPage from './index';
import
{
getIsBei_Dian
}
from
'@/webPublic/zyd_public/utils/getSchoolType'
;
import
{
getIsBei_Dian
}
from
'@/webPublic/zyd_public/utils/getSchoolType'
;
export
default
function
BatchAudit
(
props
)
{
export
default
function
BatchAudit
(
props
)
{
return
<
AuditPage
{...
props
}
hasBatchAudit
=
{
!
getIsBei_Dian
()
&&
true
}
/>
;
let
noNeedForm
=
false
;
if
(
props
.
workId
===
'1492048888356405248'
)
{
noNeedForm
=
true
;
}
return
<
AuditPage
{...
props
}
hasBatchAudit
=
{
!
getIsBei_Dian
()
&&
true
}
noNeedForm
=
{
noNeedForm
}
/>
;
}
}
FormInsertDiy/AffairPage/AuditPage/List.js
浏览文件 @
55582527
...
@@ -332,6 +332,7 @@ export default class List extends Component {
...
@@ -332,6 +332,7 @@ export default class List extends Component {
search
=
{
pageSearch
.
search
}
search
=
{
pageSearch
.
search
}
getPage
=
{
this
.
getPage
}
getPage
=
{
this
.
getPage
}
children
=
{
children
}
children
=
{
children
}
columns
=
{
columns
}
/
>
/
>
)
:
null
}
)
:
null
}
<
StandardTable
{...
tableProps
}
/
>
<
StandardTable
{...
tableProps
}
/
>
...
...
FormInsertDiy/AffairPage/AuditPage/exportHandledInfo.js
0 → 100644
浏览文件 @
55582527
/**
* 禅道 30031 已处理的页面增加导出按钮
* */
import
{
message
}
from
'antd'
;
import
React
from
'react'
;
import
{
downloadFile
}
from
'@/webPublic/one_stop_public/Table/globalFunction'
;
import
{
getToken
}
from
'@/webPublic/one_stop_public/utils/token'
;
export
default
function
exportHandledInfo
({
columns
=
[],
appId
=
'1492048888356405248'
,
type
=
'handled'
,
})
{
const
headers
=
columns
.
filter
((
g
)
=>
{
return
g
.
dataIndex
!==
'operationDiy'
;
}).
map
((
g
)
=>
{
if
(
g
.
title
===
'流程审核状态'
){
return
{
key
:
'formStatusName'
,
title
:
g
.
title
,
};
}
return
{
key
:
g
.
dataIndex
,
title
:
g
.
title
,
};
});
const
data
=
{
appId
,
type
,
headers
:
JSON
.
stringify
(
headers
),
token
:
getToken
(),
};
if
(
appId
){
message
.
info
(
'正在导出文件,请耐心等待'
);
let
url
=
window
.
CONFIG
.
OAUTH_ACTION_PATH
+
'/UnifiedAppFormApi/exportData'
;
downloadFile
(
url
,
data
);
}
}
FormInsertDiy/AffairPage/AuditPage/index.js
浏览文件 @
55582527
...
@@ -39,12 +39,19 @@ class Index extends React.Component {
...
@@ -39,12 +39,19 @@ class Index extends React.Component {
getFormDetail
=
(
workId
)
=>
{
getFormDetail
=
(
workId
)
=>
{
const
{
dataBaseId
}
=
this
.
state
;
const
{
dataBaseId
}
=
this
.
state
;
service
.
getFormDetail
(
workId
).
then
((
response
)
=>
{
service
.
getFormDetail
(
workId
)
.
then
((
response
)
=>
{
if
(
typeof
response
.
unifiedServicePatternModel
===
'undefined'
)
{
if
(
typeof
response
.
unifiedServicePatternModel
===
'undefined'
)
{
return
false
;
return
false
;
}
}
destructionFunc
.
destructionGetDetail
(
response
).
then
((
x
)
=>
{
destructionFunc
.
destructionGetDetail
(
response
)
const
{
addFields
,
tableInfo
,
allConfigSetInfo
,
searchCondition
}
=
x
;
.
then
((
x
)
=>
{
const
{
addFields
,
tableInfo
,
allConfigSetInfo
,
searchCondition
}
=
x
;
this
.
setState
(
this
.
setState
(
{
{
addFields
,
addFields
,
...
@@ -61,8 +68,17 @@ class Index extends React.Component {
...
@@ -61,8 +68,17 @@ class Index extends React.Component {
};
};
giveDetailColumns
=
()
=>
{
giveDetailColumns
=
()
=>
{
const
{
columns
,
workId
,
dataBaseId
,
addFields
,
tableInfo
}
=
this
.
state
;
const
{
const
{
showPrint
,
routerConfig
}
=
this
.
props
;
columns
,
workId
,
dataBaseId
,
addFields
,
tableInfo
}
=
this
.
state
;
const
{
showPrint
,
routerConfig
}
=
this
.
props
;
const
process_status
=
columns
.
find
((
x
)
=>
{
const
process_status
=
columns
.
find
((
x
)
=>
{
return
x
.
name
===
'process_status'
;
return
x
.
name
===
'process_status'
;
});
});
...
@@ -101,7 +117,8 @@ class Index extends React.Component {
...
@@ -101,7 +117,8 @@ class Index extends React.Component {
getColumn
=
()
=>
{
getColumn
=
()
=>
{
const
{
workId
}
=
this
.
state
;
const
{
workId
}
=
this
.
state
;
service
.
getColumns
(
workId
).
then
((
response
)
=>
{
service
.
getColumns
(
workId
)
.
then
((
response
)
=>
{
if
(
!
response
||
!
Array
.
isArray
(
response
))
{
if
(
!
response
||
!
Array
.
isArray
(
response
))
{
response
=
[];
response
=
[];
}
}
...
@@ -137,7 +154,8 @@ class Index extends React.Component {
...
@@ -137,7 +154,8 @@ class Index extends React.Component {
if
(
workId
)
{
if
(
workId
)
{
this
.
getColumn
();
this
.
getColumn
();
}
else
{
}
else
{
service
.
getId
(
pathname
).
then
((
x
)
=>
{
service
.
getId
(
pathname
)
.
then
((
x
)
=>
{
this
.
setState
(
this
.
setState
(
{
{
workId
:
x
.
workId
,
workId
:
x
.
workId
,
...
@@ -171,6 +189,18 @@ class Index extends React.Component {
...
@@ -171,6 +189,18 @@ class Index extends React.Component {
if
(
!
workId
)
{
if
(
!
workId
)
{
return
null
;
return
null
;
}
}
if
(
Array
.
isArray
(
columns
)){
let
d
=
[];
for
(
let
item
of
columns
)
{
if
(
item
.
dataIndex
!==
'operationDiy'
)
{
d
.
push
({
key
:
item
.
dataIndex
,
title
:
item
.
title
,
});
}
}
console
.
log
(
JSON
.
stringify
(
d
));
}
return
(
return
(
<
AuditPage
<
AuditPage
hasBatchAudit
=
{
hasBatchAudit
}
hasBatchAudit
=
{
hasBatchAudit
}
...
@@ -192,5 +222,5 @@ class Index extends React.Component {
...
@@ -192,5 +222,5 @@ class Index extends React.Component {
export
default
function
Pr
(
props
)
{
export
default
function
Pr
(
props
)
{
const
{
routerConfig
}
=
useContext
(
CreateC
);
const
{
routerConfig
}
=
useContext
(
CreateC
);
return
<
Index
{...
props
}
routerConfig
=
{
routerConfig
}
/>
;
return
<
Index
{...
props
}
routerConfig
=
{
routerConfig
}
/>
;
}
}
FormInsertDiy/AffairPage/ButtonListDom/index.js
浏览文件 @
55582527
...
@@ -5,7 +5,7 @@ import ModalForm from './ModalForm';
...
@@ -5,7 +5,7 @@ import ModalForm from './ModalForm';
export
default
class
ButtonListDom
extends
Component
{
export
default
class
ButtonListDom
extends
Component
{
render
()
{
render
()
{
const
{
config
,
getPage
,
selectRows
,
formValues
,
children
,
search
,
listData
}
=
this
.
props
;
const
{
config
,
getPage
,
selectRows
,
formValues
,
children
,
search
,
listData
,
columns
}
=
this
.
props
;
return
(
return
(
<
div
style
=
{{
height
:
'50px'
,
padding
:
'12px 0 12px 12px'
,
positon
:
'relative'
}}
>
<
div
style
=
{{
height
:
'50px'
,
padding
:
'12px 0 12px 12px'
,
positon
:
'relative'
}}
>
{
config
.
map
((
item
,
i
)
=>
{
{
config
.
map
((
item
,
i
)
=>
{
...
@@ -33,7 +33,7 @@ export default class ButtonListDom extends Component {
...
@@ -33,7 +33,7 @@ export default class ButtonListDom extends Component {
key
=
{
item
.
type
}
key
=
{
item
.
type
}
className
=
{
item
.
className
||
'defaultBule'
}
className
=
{
item
.
className
||
'defaultBule'
}
handleClick
=
{()
=>
{
handleClick
=
{()
=>
{
item
.
handleClick
(
selectRows
,
formValues
,
getPage
,
search
);
item
.
handleClick
(
selectRows
,
formValues
,
getPage
,
search
,
columns
);
}}
}}
/
>
/
>
);
);
...
...
FormInsertDiy/ExportComponent/ActiveMenuComponent.js
浏览文件 @
55582527
...
@@ -12,6 +12,8 @@ import Detail from '@/webPublic/FormInsertDiy/AffairPage/Detail'; //详情
...
@@ -12,6 +12,8 @@ import Detail from '@/webPublic/FormInsertDiy/AffairPage/Detail'; //详情
import
{
Modal
,
message
,
notification
,
Popconfirm
}
from
'antd'
;
import
{
Modal
,
message
,
notification
,
Popconfirm
}
from
'antd'
;
import
{
connect
}
from
'dva'
;
import
{
connect
}
from
'dva'
;
import
router
from
'umi/router'
;
import
router
from
'umi/router'
;
import
{
getIsQian_Nan
}
from
'@/webPublic/zyd_public/utils/getSchoolType'
;
import
exportHandledInfo
from
'@/webPublic/FormInsertDiy/AffairPage/AuditPage/exportHandledInfo'
;
export
const
CreateC
=
createContext
({
export
const
CreateC
=
createContext
({
routerConfig
:
{},
routerConfig
:
{},
...
@@ -77,6 +79,23 @@ function ActiveMenuComponent({ routerConfig, ...otherProps }) {
...
@@ -77,6 +79,23 @@ function ActiveMenuComponent({ routerConfig, ...otherProps }) {
Res
=
<
Audit
workId
=
{
appId
}
{...
otherProps
}
/>
;
Res
=
<
Audit
workId
=
{
appId
}
{...
otherProps
}
/>
;
break
;
break
;
case
'BatchAudit'
:
// 批量审批
case
'BatchAudit'
:
// 批量审批
if
(
appId
===
'1492048888356405248'
&&
getIsQian_Nan
()
||
process
.
env
.
NODE_ENV
===
'development'
){
// 禅道30031
otherProps
.
tab2Buttons
=
[
{
type
:
'export'
,
name
:
'导出'
,
component
:
'Normal'
,
handleClick
:
(
selectRows
,
formValues
,
getPage
,
search
,
columns
)
=>
{
exportHandledInfo
({
columns
,
appId
,
handled
:
'handled'
,
});
},
},
];
}
Res
=
<
BatchAudit
workId
=
{
appId
}
{...
otherProps
}
/>
;
Res
=
<
BatchAudit
workId
=
{
appId
}
{...
otherProps
}
/>
;
break
;
break
;
case
'Detail'
:
// 详情
case
'Detail'
:
// 详情
...
...
FormInsertDiy/ExportComponent/SelectPerson/Index.js
0 → 100644
浏览文件 @
55582527
/**
* 钟是志
* 2022年10月12日
* 禅道 http://scjoyedu.eicp.net:88/zentao/bug-view-28974.html
* 选辅导员,教师,学生的通用组件
* api 文档 https://console-docs.apipost.cn/preview/caa25e097e7386d0/a2d8620d944c56b5
* */
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
styles
from
'./styles/styles.less'
;
import
{
Modal
,
Button
,
Input
,
Checkbox
,
message
,
Icon
,
Tree
,
Spin
,
Tooltip
}
from
'antd'
;
import
ButtonDiy
from
'@/baseComponent/ButtonDiy'
;
import
{
formatTreeData
,
colorTranslate
,
getApis
}
from
'./publicFunctions'
;
import
{
getInfo
as
requestData
}
from
'@/highOrderComponent/Service'
;
import
lowCodeProps
from
'./lowCodeProps'
;
export
default
function
SelectPerson
(
props
)
{
const
[
show
,
setShow
]
=
useState
(
false
);
const
propsDiy
=
window
.
smartFormSelectPersonComponent
?.
lowCodeProps
||
lowCodeProps
();
const
apis
=
getApis
(
propsDiy
.
searchType
);
const
[
authInstitutionInfo
,
setAuthInstitutionInfo
]
=
useState
(
null
);
// 楼栋信息
const
[
searchKey
,
setSearchKey
]
=
useState
(
''
);
// 搜索框的内容
const
[
searchResult
,
setSearchResult
]
=
useState
([]);
// 搜索到的内容
const
[
detailList
,
setDetailList
]
=
useState
([]);
// 第三列显示的列表
const
[
sgUsers
,
setSelectUsers
]
=
useState
([]);
// 选中的item
const
[
sgUserIds
,
setSgUserIds
]
=
useState
([]);
// 选中的businessKey
const
[
checkedList
,
setCheckedList
]
=
useState
([]);
// 树节点中选中的复选框
const
[
jqpp
,
setJqpp
]
=
useState
(
false
);
// 是否精确匹配
function
changeShow
()
{
setShow
(
!
show
);
}
function
initShowData
(
stateList
=
{})
{
setCheckedList
(
stateList
.
checkedList
||
[]);
setSgUserIds
(
stateList
.
sgUserIds
||
[]);
setSelectUsers
(
stateList
.
sgUsers
||
[]);
setSearchKey
(
stateList
.
searchKey
||
''
);
setSearchResult
(
stateList
.
searchResult
||
[]);
setDetailList
(
stateList
.
detailList
||
[]);
}
useEffect
(()
=>
{
window
.
smartFormSelectPersonComponent
=
{
changeShow
,
initShowData
,
lowCodeProps
:
lowCodeProps
(),
callback
:
({
value
,
componentState
,
})
=>
{
console
.
log
(
value
,
componentState
);
},
};
},
[]);
// 第二栏树形数据
const
getTreeList
=
()
=>
{
requestData
({},
apis
.
findTree
)
.
then
(
res
=>
{
if
(
res
)
{
res
=
formatTreeData
(
res
);
setAuthInstitutionInfo
(
res
);
}
});
};
//根据关键字搜索
const
search
=
()
=>
{
if
(
searchKey
===
''
)
{
setSearchResult
([]);
}
else
{
if
(
searchKey
.
length
<
2
)
{
message
.
warning
(
'请至少输入2个字符'
);
return
false
;
}
requestData
(
{
keyword
:
searchKey
,
isExact
:
jqpp
,
},
apis
.
search
,
)
.
then
(
res
=>
{
if
(
res
&&
Array
.
isArray
(
res
))
{
setSearchResult
(
res
);
}
});
}
};
//清空搜索条件
const
clear
=
()
=>
{
setSearchKey
(
''
);
setSearchResult
([]);
};
//根据id进行搜索
const
searchById
=
(
selectedKeys
,
e
)
=>
{
const
{
businessKey
,
selectType
}
=
e
.
node
.
props
;
let
bKey
=
businessKey
;
requestData
(
{
businessKey
:
bKey
,
selectType
,
},
apis
.
findList
,
)
.
then
(
res
=>
{
if
(
res
)
{
setDetailList
(
res
);
}
});
};
//选中的人
const
selectUser
=
user
=>
{
setSelectUsers
([...
sgUsers
,
user
]);
setSgUserIds
([...
sgUserIds
,
user
.
businessKey
]);
};
//删除选中的人
const
deleteSg
=
(
x
,
index
,
e
)
=>
{
// 阻止事件冒泡
e
.
stopPropagation
();
console
.
log
(
sgUsers
);
let
sgNew
=
[...
sgUsers
];
console
.
log
(
x
);
debugger
;
sgNew
=
sgNew
.
filter
(
g
=>
{
return
x
.
businessKey
!==
g
.
businessKey
;
});
setSelectUsers
(
sgNew
);
setSgUserIds
(
sgUserIds
.
filter
(
g
=>
{
return
x
.
businessKey
!==
g
;
}),
);
setCheckedList
(
checkedList
.
filter
((
g
)
=>
{
return
x
.
businessKey
!==
g
.
businessKey
&&
!
g
.
businessKey
.
startsWith
(
x
.
businessKey
);
}));
};
// 确认按钮
const
auth
=
()
=>
{
const
data
=
{
businessKey
:
[...
sgUserIds
,
...
checkedList
.
map
(
g
=>
g
.
businessKey
)],
};
if
(
!
data
.
businessKey
.
length
)
{
message
.
warning
(
propsDiy
.
getResultProps
.
emptySelectMessage
);
return
false
;
}
message
.
info
(
propsDiy
.
getResultProps
.
message
);
requestData
(
data
,
apis
.
getData
)
.
then
(
res
=>
{
if
(
res
)
{
message
.
success
(
'操作成功'
);
if
(
window
.
smartFormSelectPersonComponent
.
callback
)
{
window
.
smartFormSelectPersonComponent
.
callback
({
value
:
res
,
componentState
:
{
checkedList
,
sgUserIds
,
sgUsers
,
searchKey
,
searchResult
,
// detailList,
},
});
}
changeShow
();
// props.getData();
}
});
};
const
changeJqpp
=
e
=>
{
setJqpp
(
e
.
target
.
checked
);
};
useEffect
(()
=>
{
if
(
show
)
{
getTreeList
();
}
},
[
show
]);
const
changeTreeCheck
=
(
checkedKeys
,
e
)
=>
{
const
keys
=
e
.
checkedNodes
.
map
(
g
=>
{
const
{
businessKey
,
businessMemo
,
businessName
,
noCheckNum
,
preCheckInNum
,
selectType
,
level
,
bedNum
,
isSelect
,
checkInNum
,
womanNoCheckNum
,
manNoCheckNum
,
}
=
g
.
props
;
return
{
womanNoCheckNum
,
manNoCheckNum
,
businessKey
,
businessMemo
,
businessName
,
noCheckNum
,
preCheckInNum
,
selectType
,
level
,
bedNum
,
isSelect
,
checkInNum
,
};
});
setCheckedList
(
keys
);
};
const
distinctArr
=
()
=>
{
let
arr
=
checkedList
.
concat
(
sgUsers
);
let
map
=
new
Map
();
for
(
let
item
of
arr
)
{
map
.
set
(
item
.
businessKey
,
item
);
}
arr
=
[...
map
.
values
()];
arr
.
sort
((
a
,
b
)
=>
{
// 排序解决 多层子级的问题。
if
(
a
.
businessKey
&&
b
.
businessKey
)
{
return
a
.
businessKey
.
length
-
b
.
businessKey
.
length
;
}
return
0
;
});
const
distnctBusinessKey
=
arr
.
reduce
(
function
(
response
,
current
,
index
)
{
// 删除子级 key 保证数据唯一性
let
add
=
true
;
for
(
let
item
of
response
)
{
if
(
current
.
businessKey
.
startsWith
(
item
.
businessKey
))
{
add
=
false
;
}
}
if
(
add
)
{
response
.
push
(
current
);
return
response
;
}
return
response
;
},
[]);
return
distnctBusinessKey
;
};
const
distinctA
=
distinctArr
();
return
(
<>
{
show
&&
(
<
Modal
className
=
{
styles
.
distribution
}
visible
=
{
true
}
width
=
{
1300
}
onOk
=
{
auth
}
maskClosable
=
{
false
}
onCancel
=
{
changeShow
}
{...
propsDiy
.
ModalProps
}
>
<
div
className
=
{
styles
.
modalContent
}
>
<
div
className
=
{
styles
.
one
}
style
=
{{
border
:
'none'
}}
>
<
div
>
<
Input
{...
propsDiy
.
firstSearchProps
.
inputProps
}
value
=
{
searchKey
}
onChange
=
{
e
=>
setSearchKey
(
e
.
target
.
value
)}
/
>
<
div
className
=
{
styles
.
options
}
>
<
Button
className
=
{
styles
.
search
}
onClick
=
{
search
}
>
搜索
<
/Button
>
<
Button
className
=
{
styles
.
clear
}
onClick
=
{
clear
}
>
清空
<
/Button
>
<
/div
>
<
div
>
<
div
className
=
{
styles
.
search_option
}
>
搜索选项
<
/div
>
<
Checkbox
onChange
=
{
changeJqpp
}
checked
=
{
jqpp
}
>
精确匹配
<
/Checkbox
>
<
/div
>
<
div
className
=
{
styles
.
result
}
>
<
div
>
{
propsDiy
.
firstSearchProps
.
searchResultTitle
}
<
/div
>
<
div
className
=
{
styles
.
search
}
>
{
searchResult
.
length
>
0
?
(
<
div
className
=
{
styles
.
search_result
}
>
{
searchResult
?.
filter
(
g
=>
{
return
g
.
isSelect
;
})
.
map
(
x
=>
{
return
(
<
div
key
=
{
x
.
businessKey
}
onClick
=
{
sgUserIds
.
includes
(
x
.
businessKey
)
||
!
x
.
isSelect
?
null
:
()
=>
selectUser
(
x
)
}
>
<
span
style
=
{{
backgroundColor
:
sgUserIds
.
includes
(
x
.
businessKey
)
&&
'red'
}}
>
{
x
.
businessName
}
<
/span
>
<
/div
>
);
})}
<
/div
>
)
:
(
<
div
className
=
{
styles
.
search_no_result
}
>
无搜索结果
<
/div
>
)}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
{
styles
.
one
}
>
<
div
className
=
{
styles
.
one_title
}
>
{
propsDiy
.
secondTreeProps
.
title
}
<
/div
>
{
authInstitutionInfo
&&
Array
.
isArray
(
authInstitutionInfo
)
?
(
<
Tree
treeData
=
{
authInstitutionInfo
}
checkable
=
{
true
}
onSelect
=
{
searchById
}
className
=
{
styles
.
treeDiv
}
defaultExpandedKeys
=
{[
'0000'
]}
checkedKeys
=
{
checkedList
.
map
(
g
=>
g
.
businessKey
)}
onCheck
=
{
changeTreeCheck
}
/
>
)
:
(
<
div
className
=
{
styles
.
no_result
}
>
<
Spin
spinning
=
{
true
}
tip
=
{
propsDiy
.
secondTreeProps
.
loadingTreeDataMessage
}
size
=
"large"
/>
<
/div
>
)}
<
/div
>
<
div
className
=
{
styles
.
one
}
>
<
div
className
=
{
styles
.
one_title
}
>
{
propsDiy
.
thirdDetailListProps
.
title
}
<
/div
>
<
div
className
=
{
styles
.
list_content
}
>
{
detailList
.
length
>
0
?
(
<
div
className
=
{
styles
.
search_result
}
>
{
detailList
?.
filter
(
g
=>
{
return
g
.
isSelect
;
})
.
map
(
x
=>
{
return
(
<
div
key
=
{
x
.
businessKey
}
onClick
=
{
sgUserIds
.
includes
(
x
.
businessKey
)
?
null
:
()
=>
selectUser
(
x
)}
>
<
span
style
=
{
!
x
.
isSelect
?
{
cursor
:
'not-allowed'
,
fontWeight
:
'normal'
,
}
:
{
backgroundColor
:
sgUserIds
.
includes
(
x
.
businessKey
)
&&
'red'
,
}
}
>
{
x
.
businessName
}
<
/span
>
<
/div
>
);
})}
<
/div
>
)
:
(
<
div
className
=
{
styles
.
no_result
}
>
{
propsDiy
.
thirdDetailListProps
.
emptyMessage
}
<
/div
>
)}
<
/div
>
<
/div
>
<
div
className
=
{
styles
.
one
}
>
<
div
className
=
{
styles
.
one_title
}
>
{
propsDiy
.
fourRangeProps
.
title
}
<
/div
>
<
div
className
=
{
styles
.
list_content
}
>
{
distinctA
.
length
?
(
<
div
className
=
{
styles
.
search_result
}
>
{
distinctA
.
map
((
x
,
index
)
=>
{
return
(
<
div
key
=
{
x
.
businessKey
}
className
=
{
styles
.
selectSg
}
style
=
{{
backgroundColor
:
colorTranslate
(
x
),
}}
>
<
div
className
=
{
styles
.
oneSelectedInfo
}
>
<
Icon
type
=
"delete"
style
=
{{
marginRight
:
'5px'
}}
onClick
=
{
e
=>
deleteSg
(
x
,
index
,
e
)}
/
>
<
Tooltip
title
=
{
x
.
businessName
}
>
{
x
.
businessName
}
<
/Tooltip
>
<
/div
>
<
/div
>
);
})}
<
/div
>
)
:
(
<
div
className
=
{
styles
.
no_result
}
>
{
propsDiy
.
fourRangeProps
.
emptyMessage
}
<
/div
>
)}
<
/div
>
<
/div
>
<
/div
>
<
/Modal
>
)}
<
/
>
);
}
FormInsertDiy/ExportComponent/SelectPerson/lowCodeProps.js
0 → 100644
浏览文件 @
55582527
export
default
function
lowCodeProps
(
info
)
{
return
{
searchType
:
'instructorSearch'
,
// teacherSearch || studentSearch || instructorSearch
ModalProps
:
{
// 弹窗的属性
title
:
'选择辅导员'
,
},
firstSearchProps
:
{
// 最左侧搜索栏的属性
inputProps
:
{
placeholder
:
'输入辅导员姓名/工号搜索'
,
},
searchResultTitle
:
'搜索结果'
,
},
secondTreeProps
:
{
// 树形
title
:
'部门'
,
loadingTreeDataMessage
:
'正在加载数据'
,
},
thirdDetailListProps
:
{
// 第三栏
title
:
'详细辅导员列表'
,
emptyMessage
:
'暂无详细辅导员列表数据'
,
},
fourRangeProps
:
{
// 第四栏
title
:
'所选择的辅导员范围'
,
emptyMessage
:
'暂无选中的辅导员'
,
},
getResultProps
:
{
emptySelectMessage
:
'请至少选择一个辅导员'
,
message
:
'正在查询中,请耐心等待'
,
},
};
}
/**
* 使用方法
return {
before: [
{
children: "选择辅导员", type: "primary", onClick: () => {
// 钟是志
// 2022年10月12日
// 解决按部门选择 辅导员, 选择老师, 选择学生的需求
// window.smartFormSelectPersonComponent.lowCodeProps =
// {
// searchType: 'instructorSearch', // teacherSearch || studentSearch || instructorSearch
// ModalProps: { // 弹窗的属性
// title: '选择辅导员',
// },
// firstSearchProps: { // 最左侧搜索栏的属性
// inputProps: {
// placeholder: '输入辅导员姓名/工号搜索',
// },
// searchResultTitle: '搜索结果',
// },
// secondTreeProps: { // 树形
// title: '部门',
// loadingTreeDataMessage: '正在加载数据',
// },
// thirdDetailListProps: { // 第三栏
// title: '详细辅导员列表',
// emptyMessage: '暂无详细辅导员列表数据',
// },
// fourRangeProps: { // 第四栏
// title: '所选择的辅导员范围',
// emptyMessage: '暂无选中的辅导员',
// },
// getResultProps: {
// emptySelectMessage: '请至少选择一个辅导员',
// message: '正在查询中,请耐心等待',
// },
// };
if (window.smartFormSelectPersonComponent) {
// window.smartFormSelectPersonComponent.initShowData({
// 初始化显示的选中数据 从 callback 的componentState读取
// "checkedList": [],
// "sgUserIds": ['40-1723", "40-1470", "40-971'],
// "sgUsers": [{
// "businessKey": "40-1723",
// "businessMemo": "",
// "businessName": "丁心",
// "children": [],
// "ext": null,
// "isSelect": true,
// "level": 1
// }, {
// "businessKey": "40-1470",
// "businessMemo": "",
// "businessName": "程丽娜",
// "children": [],
// "ext": null,
// "isSelect": true,
// "level": 1
// }, {
// "businessKey": "40-971",
// "businessMemo": "",
// "businessName": "石头",
// "children": [],
// "ext": null,
// "isSelect": true,
// "level": 1
// }],
// "searchKey": "",
// "searchResult": []
// });
window.smartFormSelectPersonComponent.callback = ({ value, componentState }) => { // 回调函数
console.log(value, JSON.stringify(componentState));
// componentState 用于组件数据回显,
};
window.smartFormSelectPersonComponent.changeShow(); // 打开弹窗
}
}
},
]
}
** 使用方法
* */
FormInsertDiy/ExportComponent/SelectPerson/publicFunctions.js
0 → 100644
浏览文件 @
55582527
import
styles
from
'./styles/styles.less'
;
import
{
Tooltip
}
from
'antd'
;
import
React
from
'react'
;
const
formatTreeData
=
(
treeData
=
[],
res
=
[])
=>
{
for
(
let
item
of
treeData
)
{
item
.
title
=
(
<>
<
Tooltip
title
=
{
item
.
businessMemo
}
>
<
span
>
{
item
.
businessName
}
<
/span
>
<
/Tooltip
>
<
/
>
);
item
.
key
=
item
.
businessKey
||
'0000'
;
item
.
checkable
=
true
;
item
.
selectable
=
true
;
if
(
!
item
.
isSelect
)
{
item
.
selectable
=
false
;
}
// if (!item.isSelect) {
// item.checkable = false;
// item.disabled = true;
// } else {
// item.checkable = true;
// }
// item.selectable = item.selectType === 'floor';
if
(
item
.
children
&&
item
.
children
.
length
)
{
item
.
children
=
formatTreeData
(
item
.
children
,
[]);
}
else
{
item
.
isLeaf
=
true
;
}
}
return
treeData
;
};
const
colorTranslate
=
(
item
)
=>
{
const
colors
=
{
1
:
'#6164C1'
,
2
:
'rgb(202, 198, 46)'
,
3
:
'#BE0AC1'
,
};
if
(
item
&&
item
.
businessKey
)
{
return
colors
[
item
.
businessKey
.
split
(
'-'
).
length
];
}
return
colors
[
item
.
level
]
||
colors
[
'2'
];
};
export
function
getApis
(
searchType
)
{
const
apiUrls
=
{
// https://console-docs.apipost.cn/preview/caa25e097e7386d0/a2d8620d944c56b5?target_id=fe79cb0e-f0db-49ec-bed9-92f4a830bf75
instructorSearch
:
{
// 查询辅导员
search
:
'/instructorSearch/search'
,
findTree
:
'/instructorSearch/findTree'
,
findList
:
'/instructorSearch/findList'
,
getData
:
'/instructorSearch/getData'
,
getDataCacheKey
:
'/instructorSearch/getDataCacheKey'
,
readCacheData
:
'/instructorSearch/readCacheData'
,
},
teacherSearch
:
{
// 查询教师
search
:
'/teacherSearch/search'
,
findTree
:
'/teacherSearch/findTree'
,
findList
:
'/teacherSearch/findList'
,
getData
:
'/teacherSearch/getData'
,
getDataCacheKey
:
'/teacherSearch/getDataCacheKey'
,
readCacheData
:
'/teacherSearch/readCacheData'
,
},
studentSearch
:
{
// 查询学生
search
:
'/studentSearch/search'
,
findTree
:
'/studentSearch/findTree'
,
findList
:
'/studentSearch/findList'
,
getData
:
'/studentSearch/getData'
,
getDataCacheKey
:
'/studentSearch/getDataCacheKey'
,
readCacheData
:
'/studentSearch/readCacheData'
,
},
};
return
apiUrls
[
searchType
]
||
apiUrls
.
studentSearch
;
}
export
{
formatTreeData
,
colorTranslate
};
FormInsertDiy/ExportComponent/SelectPerson/styles/basicTitle.less
0 → 100644
浏览文件 @
55582527
@color1: #d43d52;
@color2: #2196F3;
.basicTitle{
background: #fff;
padding: 5px;
}
.man{
color: @color2;
}
.woman{
color: @color1;
}
.bg-green{
background: #4daf61;
padding: 5px 10px;
color: white;
}
FormInsertDiy/ExportComponent/SelectPerson/styles/styles.less
0 → 100644
浏览文件 @
55582527
@import "./basicTitle.less";
.btn-warning {
color: white;
background-color: #F2B776;
border-color: #F2B776;
}
.btn-success {
color: white;
background-color: #6FC080;
border-color: #6FC080;
margin-right: 3px;
}
.modalTitle {
text-align: center;
}
.numbers {
display: grid;
grid-template-columns: repeat(3, 300px);
margin: 0 auto;
justify-items: center;
align-items: center;
width: 300px;
padding: 10px;
div {
span {
color: red;
}
}
}
.modalContent {
display: grid;
grid-template-columns: 3fr 3fr 3fr 2fr;
column-gap: 10px;
height: 60vh;
.one {
border: 1px solid #e4e4e4;
overflow-y: auto;
.options {
display: flex;
justify-content: space-between;
margin: 16px 0;
.search {
flex: 1;
color: #fff;
background: #6164C1;
border-radius: 5px;
margin-right: 10px;
}
.clear {
flex: 1;
color: #fff;
background: rgb(163, 47, 47);
border-radius: 5px;
}
}
.search_option {
margin-bottom: 6px;
}
.result {
margin-top: 20px;
.search {
border: 1px solid #e4e4e4;
height: auto;
min-height: ~'calc(60vh - 185px)';
overflow-y: auto;
cursor: pointer;
.search_no_result {
height: 100%;
display: flex;
align-items: center;
justify-content: center;
font-size: 20px;
color: #c3c3c3;
}
}
}
.college_name {
height: 30px;
line-height: 30px;
padding-left: 20px;
cursor: pointer;
}
.search_result {
> div {
height: 32px;
padding: 0 16px;
display: flex;
justify-content: space-between;
align-items: center;
font-weight: 900;
& span:last-child {
background-color: #6164C1;
padding: 0 5px;
color: #fff;
border-radius: 20px;
font-weight: 100;
}
}
.selectSg {
width: 96%;
height: 30px;
margin: 10px auto;
line-height: 30px;
padding-left: 10px;
background-color: rgb(202, 198, 46);
color: #fff;
}
}
.search_result_list {
height: 32px;
padding: 0 16px;
line-height: 32px;
font-weight: 900;
.dormCode {
margin-left: 24px;
}
& span:last-child {
background-color: #6164C1;
padding: 0 5px;
color: #fff;
border-radius: 20px;
}
}
.one_title {
height: 30px;
line-height: 30px;
background-color: #F5F7FA;
padding-left: 10px;
border-bottom: 1px solid #e4e4e4;
}
.list_content {
height: 56vh;
overflow-y: auto;
cursor: pointer;
}
.no_result {
display: flex;
align-items: center;
justify-content: center;
font-size: 20px;
color: #c3c3c3;
// height: calc(60vh - 32px);
height: 56vh;
}
}
}
.distribution {
:global {
.ant-btn-round {
border-radius: 0;
border: none;
background-color: grey;
color: #fff;
}
.ant-btn-primary {
background-color: skyblue !important;
}
}
}
@color1: #d43d52;
@color2: #2196F3;
.man {
color: @color2;
}
.woman {
color: @color1;
}
.treeDiv {
:global {
.ant-tree-node-content-wrapper {
width: 85%;
}
}
}
.bgPurple {
background-color: #6164C1;
padding: 0 5px;
color: #fff;
border-radius: 20px;
font-weight: 100;
}
.oneSelectedInfo {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
FormInsertDiy/RenderForm/index.js
浏览文件 @
55582527
...
@@ -3,6 +3,7 @@ import ZdyTable from '@/webPublic/one_stop_public/Table';
...
@@ -3,6 +3,7 @@ import ZdyTable from '@/webPublic/one_stop_public/Table';
import
styles
from
'./index.less'
;
import
styles
from
'./index.less'
;
import
{
fetchTemplateByCode
,
fetchTableItem
}
from
'@/webPublic/Services'
;
import
{
fetchTemplateByCode
,
fetchTableItem
}
from
'@/webPublic/Services'
;
import
{
isJSON
}
from
'@/webPublic/zyd_public/utils/utils'
;
import
{
isJSON
}
from
'@/webPublic/zyd_public/utils/utils'
;
import
SelectPerson
from
'@/webPublic/FormInsertDiy/ExportComponent/SelectPerson/Index'
;
export
default
function
RenderForm
({
export
default
function
RenderForm
({
get
=
'web'
,
get
=
'web'
,
...
@@ -44,6 +45,7 @@ export default function RenderForm({
...
@@ -44,6 +45,7 @@ export default function RenderForm({
init
=
{
undefined
}
init
=
{
undefined
}
{...
content
}
{...
content
}
/
>
/
>
<
SelectPerson
/>
<
/div
>
<
/div
>
);
);
}
}
...
...
one_stop_public/Base16/SplitBase16Index.js
浏览文件 @
55582527
import
{
apiRequest
}
from
'@/webPublic/one_stop_public/utils/request'
;
import
{
apiRequest
}
from
'@/webPublic/one_stop_public/utils/request'
;
import
{
isJSON
}
from
'@/webPublic/zyd_public/utils/utils'
;
import
{
isJSON
}
from
'@/webPublic/zyd_public/utils/utils'
;
import
baseX
from
'base-x'
;
import
baseX
from
'base-x'
;
import
encryptApiList
from
'
@/webPublic/one_stop_public/Base16
/encryptApiList'
;
import
encryptApiList
from
'
.
/encryptApiList'
;
var
BASE16
=
'0123456789abcdef'
;
var
BASE16
=
'0123456789abcdef'
;
var
bs16
=
baseX
(
BASE16
);
var
bs16
=
baseX
(
BASE16
);
...
@@ -64,16 +64,15 @@ export async function countAllValues(datas, item) {
...
@@ -64,16 +64,15 @@ export async function countAllValues(datas, item) {
return
datas
;
return
datas
;
}
}
export
async
function
giveBase16EncodeAsync
(
datas
,
url
)
{
export
async
function
giveBase16EncodeAsync
(
datas
,
url
)
{
if
(
!
checkOpenBase16
())
{
return
datas
;
}
if
(
url
&&
typeof
url
===
'string'
)
{
if
(
url
&&
typeof
url
===
'string'
)
{
for
(
let
item
of
encryptApiList
)
{
// console.log(url);
if
(
url
.
indexOf
(
item
.
api
)
>
-
1
)
{
// console.log(encryptApiList);
for
(
const
item
of
encryptApiList
)
{
if
(
item
.
api
&&
url
.
indexOf
(
item
.
api
)
>
-
1
&&
item
.
key
)
{
for
(
let
g
of
item
.
key
)
{
for
(
let
g
of
item
.
key
)
{
if
(
datas
[
g
]
&&
item
.
filterEmpty
&&
item
.
filterEmpty
.
includes
(
g
))
{
// if (datas &&
datas[g] && item.filterEmpty && item.filterEmpty.includes(g)) {
// 压缩代码功能暂时屏蔽
// 压缩代码功能暂时屏蔽
/***
/***
// console.log(datas[g]);
// console.log(datas[g]);
...
@@ -83,8 +82,7 @@ export async function giveBase16EncodeAsync(datas, url) {
...
@@ -83,8 +82,7 @@ export async function giveBase16EncodeAsync(datas, url) {
// console.log('%c加密数据压缩后字段' + g + '= ', 'color: orange;');
// console.log('%c加密数据压缩后字段' + g + '= ', 'color: orange;');
// console.log('%c'+ datas[g] , 'color: orange;');
// console.log('%c'+ datas[g] , 'color: orange;');
***/
***/
}
// }
if
(
g
===
'allValues'
&&
typeof
datas
[
g
]
!==
'undefined'
)
{
if
(
g
===
'allValues'
&&
typeof
datas
[
g
]
!==
'undefined'
)
{
datas
=
await
countAllValues
(
datas
,
item
);
// 循环中 不要写await
datas
=
await
countAllValues
(
datas
,
item
);
// 循环中 不要写await
datas
=
giveKey
(
'allValues'
,
datas
);
datas
=
giveKey
(
'allValues'
,
datas
);
...
...
one_stop_public/libs/UploadCom.js
浏览文件 @
55582527
...
@@ -58,10 +58,8 @@ class UploadCom extends React.Component {
...
@@ -58,10 +58,8 @@ class UploadCom extends React.Component {
};
};
this
.
otherProps
=
{};
this
.
otherProps
=
{};
if
(
props
.
json
?.
otherProps
)
{
if
(
props
.
json
?.
otherProps
)
{
this
.
otherProps
=
props
.
json
?.
otherProps
;
try
{
try
{
this
.
otherProps
=
new
Function
(
this
.
otherProps
)();
this
.
otherProps
=
new
Function
(
props
.
json
?.
otherProps
)()
||
{};
// console.log(this.otherProps);
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
log
(
e
);
console
.
log
(
e
);
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论