Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
WebPublic
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
前端开发小组
WebPublic
Commits
e28fea6f
提交
e28fea6f
authored
10月 12, 2022
作者:
钟是志
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
28974 辅导员考核相关需求,有疑问联系我
上级
df7cd9cf
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
409 行增加
和
0 行删除
+409
-0
Index.js
FormInsertDiy/ExportComponent/SelectPerson/Index.js
+0
-0
lowCodeProps.js
FormInsertDiy/ExportComponent/SelectPerson/lowCodeProps.js
+87
-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
没有找到文件。
FormInsertDiy/ExportComponent/SelectPerson/Index.js
0 → 100644
浏览文件 @
e28fea6f
差异被折叠。
点击展开。
FormInsertDiy/ExportComponent/SelectPerson/lowCodeProps.js
0 → 100644
浏览文件 @
e28fea6f
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: () => {
if (window.smartFormSelectPersonComponent) {
// 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: '正在查询中,请耐心等待',
// },
// };
window.smartFormSelectPersonComponent.setSelectUsers([{ // 设置已经选中的用户
businessKey: "71-1300",
businessName: '钟是志',
isSelect: true,
}]);
window.smartFormSelectPersonComponent.callback = (selectUsers) => { // 回调函数
console.log(selectUsers);
};
window.smartFormSelectPersonComponent.changeShow(); // 打开弹窗
}
}
},
]
}
** 使用方法
* */
FormInsertDiy/ExportComponent/SelectPerson/publicFunctions.js
0 → 100644
浏览文件 @
e28fea6f
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
浏览文件 @
e28fea6f
@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
浏览文件 @
e28fea6f
@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
浏览文件 @
e28fea6f
...
@@ -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
>
);
);
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论