Commit 6a033d1d by zhujian

'fix'

parent 6a844944
......@@ -16,6 +16,25 @@ class Permission {
return this.permissionCodes.includes('ShopStaff');
}
CreateNewExam() {
return this.permissionCodes.includes('AddExam');
}
export default Permission;
// AddExam() { //创建考试
// return this.permissionCodes.includes('AddExam');
// }
SeeExamData() { // 查看考试数据
return this.permissionCodes.includes('SeeExamData');
}
DelExam() { // 删除考试
return this.permissionCodes.includes('SeeExamData');
}
}
Permission.prototype.AddExam = function () { //创建考试
return this.permissionCodes.includes('AddExam');
}
export default Permission;
.xm-search-filter {
position: relative;
.ant-input-search-button{
border-left:none;
}
.search-condition {
width: calc(100% - 80px);
display: flex;
align-items: center;
flex-wrap: wrap;
&__item {
width: 30%;
margin-right: 3%;
margin-bottom: 12px;
display: flex;
.search-name{
vertical-align: middle;
display:inline-block;
height:32px;
line-height:32px;
margin-right: 4px;
}
.search-input{
flex:1;
}
}
}
.reset-fold-area {
position: absolute;
right: 12px;
}
.resetBtn {
color: #999999;
font-size: 18px;
margin-right: 8px;
}
.fold-btn {
font-size: 14px;
color: #666666;
line-height: 20px;
.fold-icon {
font-size: 12px;
margin-left:4px;
}
}
}
\ No newline at end of file
......@@ -1665,3 +1665,34 @@ input:focus {
.row-dragging .drag-visible {
visibility: visible;
}
.oneLineText{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.table_operate {
display: flex;
align-items: center;
flex-wrap: wrap;
.operate-text {
color: #5289FA;
cursor: pointer;
}
.operate__item {
color: #5289FA;
cursor: pointer;
&.split {
margin: 0 8px;
color: #BFBFBF;
}
}
.more{
color: #5289FA;
cursor: pointer;
cursor: pointer;
}
}
import React, { useState, useRef, useEffect } from 'react'
import { Select } from 'antd';
import StoreService from "@/domains/store-domain/storeService";
export default function ExaminationManager(props: any) {
const queryInit: any = {
planName: ''
}
const teacherQueryInit: any = {};
const [teacherQuery, setTeacherQuery] = useState({
current:1,
size: 10
});
const [teacherList, setTeacherList] = useState([]);
const [hasNext, setHasNext] = useState(true);
const teacherQueryRef = useRef({})
useEffect(() => {
teacherQueryRef.current = teacherQuery;
getTeacherList()
}, [teacherQuery])
function getTeacherList() {
const _query: any = {
...teacherQueryRef.current,
};
StoreService.getStoreUserBasicPage(_query).then((res) => {
const { result = {} } = res;
const { records = [], total = 0, hasNext } = result;
const list = _query.current > 1 ? teacherList.concat(records) : records;
setTeacherList(list);
setHasNext(hasNext)
});
}
// 滑动加载更多讲师列表
function handleScrollTeacherList(e: any) {
const container = e.target;
const scrollToBottom = container && container.scrollHeight <= container.clientHeight + container.scrollTop;
if (scrollToBottom && hasNext) {
let _teacherQuery: any = { ...teacherQueryRef.current };
_teacherQuery.current = _teacherQuery.current + 1;
setTeacherQuery(_teacherQuery)
}
}
return <div className="search-condition__item">
<span className="search-name">创建人:</span>
<Select
placeholder="请选择创建人"
className='search-input'
showSearch
allowClear
onPopupScroll={handleScrollTeacherList}
suffixIcon={<span className="icon iconfont" style={{ fontSize: '12px', color: '#BFBFBF' }}>&#xe835;</span>}
value={props.val || null}
onChange={(value) => {
props.onChange(value)
}}
onSearch={(value) => {
let _teacherQuery: any = { ...teacherQueryRef.current };
_teacherQuery.nickName = value;
setTeacherQuery(_teacherQuery)
}}
onClear={() => {
props.onChange(null)
setTeacherQuery({
current:1,
size: 10
})
}}
>
{teacherList.map((item: any) => {
return (
<Select.Option value={item.id} key={item.id}>{item.nickName}</Select.Option>
);
})}
</Select>
</div>
}
\ No newline at end of file
......@@ -33,9 +33,11 @@ class GraphicsCourseFilter extends React.Component {
expandFilter:false
}
}
componentDidMount() {
this.getTeacherList();
}
getTeacherList(current = 1, selectList){
const { teacherQuery,teacherList} = this.state;
const _query = {
......@@ -53,6 +55,7 @@ class GraphicsCourseFilter extends React.Component {
})
});
}
// 滑动加载更多讲师列表
handleScrollTeacherList = (e) => {
const { hasNext } = this.state;
......
......@@ -2,6 +2,7 @@
@import '../../core/page.less';
@import '../../core/table.less';
@import '../../core/global.less';
@import '../../core/filter.less';
@top-height: 50px;
......
.examination-manager{
.status{
display: inline-block;
margin-left: 20px;
border: 1px solid #999;
padding: 2px 4px;
line-height: 16px;
}
}
\ No newline at end of file
......@@ -31,6 +31,8 @@ import AddNewQuestion from '@/modules/teach-tool/question-bank/AddNewQuestion';
import ExaminationPaperIndex from '@/modules/teach-tool/examination-paper/ExaminationPaperIndex';
import NewExaminationPaper from '@/modules/teach-tool/examination-paper/NewExaminationPaper';
import ExaminationManagerIndex from '@/modules/teach-tool/examination-manager/Index';
const mainRoutes = [
{
path: '/home',
......@@ -117,6 +119,14 @@ const mainRoutes = [
component:NewExaminationPaper,
name: '新建试卷'
},
{
path: '/examination-manage-index',
component:ExaminationManagerIndex,
name: '考试'
},
{
path: '/course-category-manage',
component:CourseCategoryManage,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment