|
@@ -1,7 +1,7 @@
|
|
|
const Mock = require('mockjs')
|
|
|
const Random = Mock['Random']
|
|
|
|
|
|
-const mockGeneration = 4 // primary
|
|
|
+const mockGeneration = 8 // primary
|
|
|
const mockGroups = [1, 2, 3, 4, 5, 6]
|
|
|
const mockPreferenceCount = 3 // 1 or 3 // 1志愿/3志愿
|
|
|
|
|
@@ -56,14 +56,15 @@ module.exports = [
|
|
|
const groupDefines = [
|
|
|
{
|
|
|
category: 'actualCount',
|
|
|
+ queryCode: Random.cname(),
|
|
|
displayName: '已报名',
|
|
|
+ detailName: '报名组合',
|
|
|
values: mockGroups.map(groupId => ({
|
|
|
groupId: groupId,
|
|
|
value: Random.integer(120, 400),
|
|
|
color: 'B',
|
|
|
bold: false,
|
|
|
star: false,
|
|
|
- queryCode: 'abc',
|
|
|
disabled: false
|
|
|
}))
|
|
|
}
|
|
@@ -71,14 +72,15 @@ module.exports = [
|
|
|
const nonGroupDefines = [
|
|
|
{
|
|
|
category: 'unfinishedCount',
|
|
|
+ queryCode: Random.cname(),
|
|
|
displayName: '未报名',
|
|
|
+ detailName: '',
|
|
|
values: [{
|
|
|
groupId: 0,
|
|
|
value: Random.integer(0, 10),
|
|
|
color: '',
|
|
|
bold: false,
|
|
|
star: false,
|
|
|
- queryCode: 'abc',
|
|
|
disabled: false
|
|
|
}]
|
|
|
}
|
|
@@ -100,27 +102,29 @@ module.exports = [
|
|
|
factory: () => [
|
|
|
{
|
|
|
category: 'approvedCount',
|
|
|
+ queryCode: Random.cname(),
|
|
|
displayName: '正常录取',
|
|
|
+ detailName: '录取组合',
|
|
|
values: mockGroups.map(groupId => ({
|
|
|
groupId: groupId,
|
|
|
value: Random.integer(120, 300),
|
|
|
color: '',
|
|
|
bold: false,
|
|
|
star: false,
|
|
|
- queryCode: 'abc',
|
|
|
disabled: false
|
|
|
}))
|
|
|
},
|
|
|
{
|
|
|
category: 'forcedCount',
|
|
|
+ queryCode: Random.cname(),
|
|
|
displayName: '调剂录取',
|
|
|
+ detailName: '调剂组合',
|
|
|
values: mockGroups.map(groupId => ({
|
|
|
groupId: groupId,
|
|
|
value: Random.integer(0, 10),
|
|
|
color: '',
|
|
|
bold: false,
|
|
|
star: false,
|
|
|
- queryCode: 'abc',
|
|
|
disabled: false
|
|
|
}))
|
|
|
}
|
|
@@ -145,53 +149,57 @@ module.exports = [
|
|
|
},
|
|
|
{
|
|
|
category: 'approvedCount',
|
|
|
+ queryCode: Random.cname(),
|
|
|
displayName: '录取人数',
|
|
|
+ detailName: '录取组合',
|
|
|
values: mockGroups.map(groupId => ({
|
|
|
groupId: groupId,
|
|
|
value: Random.integer(120, 400),
|
|
|
color: '',
|
|
|
bold: false,
|
|
|
star: false,
|
|
|
- queryCode: 'abc',
|
|
|
disabled: false
|
|
|
}))
|
|
|
},
|
|
|
{
|
|
|
category: 'adjustCount',
|
|
|
+ queryCode: Random.cname(),
|
|
|
displayName: '调剂人数',
|
|
|
+ detailName: '调剂组合',
|
|
|
values: mockGroups.map(groupId => ({
|
|
|
groupId: groupId,
|
|
|
value: Random.integer(120, 400),
|
|
|
color: '',
|
|
|
bold: false,
|
|
|
star: false,
|
|
|
- queryCode: 'abc',
|
|
|
disabled: false
|
|
|
}))
|
|
|
},
|
|
|
{
|
|
|
category: 'matchedCount',
|
|
|
+ queryCode: Random.cname(),
|
|
|
displayName: '专业符合',
|
|
|
+ detailName: '推荐组合',
|
|
|
values: mockGroups.map(groupId => ({
|
|
|
groupId: groupId,
|
|
|
value: Random.integer(120, 400),
|
|
|
color: '',
|
|
|
bold: false,
|
|
|
star: false,
|
|
|
- queryCode: 'abc',
|
|
|
disabled: false
|
|
|
}))
|
|
|
},
|
|
|
{
|
|
|
category: 'nonmatchedCount',
|
|
|
+ queryCode: Random.cname(),
|
|
|
displayName: '专业不符',
|
|
|
+ detailName: '推荐组合',
|
|
|
values: mockGroups.map(groupId => ({
|
|
|
groupId: groupId,
|
|
|
value: Random.integer(120, 400),
|
|
|
color: '',
|
|
|
bold: false,
|
|
|
star: false,
|
|
|
- queryCode: 'abc',
|
|
|
disabled: false
|
|
|
}))
|
|
|
}
|
|
@@ -202,105 +210,113 @@ module.exports = [
|
|
|
factory: () => [
|
|
|
{
|
|
|
category: 'matchedApproved',
|
|
|
+ queryCode: Random.cname(),
|
|
|
displayName: '专业符合同意',
|
|
|
+ detailName: '报名组合',
|
|
|
values: mockGroups.map(groupId => ({
|
|
|
groupId: groupId,
|
|
|
value: Random.integer(120, 400),
|
|
|
color: '',
|
|
|
bold: false,
|
|
|
star: false,
|
|
|
- queryCode: 'abc',
|
|
|
disabled: false
|
|
|
}))
|
|
|
},
|
|
|
{
|
|
|
category: 'matchedNotOptional',
|
|
|
+ queryCode: Random.cname(),
|
|
|
displayName: '专业符合改选',
|
|
|
+ detailName: '报名组合',
|
|
|
values: mockGroups.map(groupId => ({
|
|
|
groupId: groupId,
|
|
|
value: Random.integer(120, 400),
|
|
|
color: '',
|
|
|
bold: false,
|
|
|
star: false,
|
|
|
- queryCode: 'abc',
|
|
|
disabled: false
|
|
|
}))
|
|
|
},
|
|
|
{
|
|
|
category: 'matchedRejected',
|
|
|
+ queryCode: Random.cname(),
|
|
|
displayName: '专业符合拒绝',
|
|
|
+ detailName: '拒绝组合',
|
|
|
values: mockGroups.map(groupId => ({
|
|
|
groupId: groupId,
|
|
|
value: Random.integer(120, 400),
|
|
|
color: '',
|
|
|
bold: false,
|
|
|
star: false,
|
|
|
- queryCode: 'abc',
|
|
|
disabled: false
|
|
|
}))
|
|
|
},
|
|
|
{
|
|
|
category: 'matchedNonaction',
|
|
|
+ queryCode: Random.cname(),
|
|
|
displayName: '专业符合未填',
|
|
|
+ detailName: '推荐组合',
|
|
|
values: mockGroups.map(groupId => ({
|
|
|
groupId: groupId,
|
|
|
value: Random.integer(120, 400),
|
|
|
color: '',
|
|
|
bold: false,
|
|
|
star: false,
|
|
|
- queryCode: 'abc',
|
|
|
disabled: false
|
|
|
}))
|
|
|
},
|
|
|
{
|
|
|
category: 'matchedRankout',
|
|
|
+ queryCode: Random.cname(),
|
|
|
displayName: '专业符合被挤出',
|
|
|
+ detailName: '报名组合',
|
|
|
values: mockGroups.map(groupId => ({
|
|
|
groupId: groupId,
|
|
|
value: Random.integer(120, 400),
|
|
|
color: '',
|
|
|
bold: false,
|
|
|
star: false,
|
|
|
- queryCode: 'abc',
|
|
|
disabled: false
|
|
|
}))
|
|
|
},
|
|
|
{
|
|
|
category: 'nonmatchedApproved',
|
|
|
+ queryCode: Random.cname(),
|
|
|
displayName: '专业符合已填',
|
|
|
+ detailName: '报名组合',
|
|
|
values: mockGroups.map(groupId => ({
|
|
|
groupId: groupId,
|
|
|
value: Random.integer(120, 400),
|
|
|
color: '',
|
|
|
bold: false,
|
|
|
star: false,
|
|
|
- queryCode: 'abc',
|
|
|
disabled: false
|
|
|
}))
|
|
|
},
|
|
|
{
|
|
|
category: 'nonmatchedRejected',
|
|
|
+ queryCode: Random.cname(),
|
|
|
displayName: '不可调剂拒绝',
|
|
|
+ detailName: '报名组合',
|
|
|
values: mockGroups.map(groupId => ({
|
|
|
groupId: groupId,
|
|
|
value: Random.integer(120, 400),
|
|
|
color: '',
|
|
|
bold: false,
|
|
|
star: false,
|
|
|
- queryCode: 'abc',
|
|
|
disabled: false
|
|
|
}))
|
|
|
},
|
|
|
{
|
|
|
category: 'nonmatchedNonaction',
|
|
|
+ queryCode: Random.cname(),
|
|
|
displayName: '不可调剂未填',
|
|
|
+ detailName: '报名组合',
|
|
|
values: mockGroups.map(groupId => ({
|
|
|
groupId: groupId,
|
|
|
value: Random.integer(120, 400),
|
|
|
color: '',
|
|
|
bold: false,
|
|
|
star: false,
|
|
|
- queryCode: 'abc',
|
|
|
disabled: false
|
|
|
}))
|
|
|
}
|
|
@@ -311,53 +327,57 @@ module.exports = [
|
|
|
factory: () => [
|
|
|
{
|
|
|
category: 'approvedCount',
|
|
|
+ queryCode: Random.cname(),
|
|
|
displayName: '补录录取',
|
|
|
+ detailName: '录取组合',
|
|
|
values: mockGroups.map(groupId => ({
|
|
|
groupId: groupId,
|
|
|
value: Random.integer(120, 400),
|
|
|
color: '',
|
|
|
bold: false,
|
|
|
star: false,
|
|
|
- queryCode: 'abc',
|
|
|
disabled: false
|
|
|
}))
|
|
|
},
|
|
|
{
|
|
|
category: 'forcedCount',
|
|
|
+ queryCode: Random.cname(),
|
|
|
displayName: '调剂录取',
|
|
|
+ detailName: '录取组合',
|
|
|
values: mockGroups.map(groupId => ({
|
|
|
groupId: groupId,
|
|
|
value: Random.integer(120, 400),
|
|
|
color: '',
|
|
|
bold: false,
|
|
|
star: false,
|
|
|
- queryCode: 'abc',
|
|
|
disabled: false
|
|
|
}))
|
|
|
},
|
|
|
{
|
|
|
category: 'matchedCount',
|
|
|
+ queryCode: Random.cname(),
|
|
|
displayName: '可调剂人数',
|
|
|
+ detailName: '调剂组合',
|
|
|
values: mockGroups.map(groupId => ({
|
|
|
groupId: groupId,
|
|
|
value: Random.integer(120, 400),
|
|
|
color: '',
|
|
|
bold: false,
|
|
|
star: false,
|
|
|
- queryCode: 'abc',
|
|
|
disabled: false
|
|
|
}))
|
|
|
},
|
|
|
{
|
|
|
category: 'nonmatchedCount',
|
|
|
+ queryCode: Random.cname(),
|
|
|
displayName: '不可调剂人数',
|
|
|
+ detailName: '报名组合',
|
|
|
values: mockGroups.map(groupId => ({
|
|
|
groupId: groupId,
|
|
|
value: Random.integer(120, 400),
|
|
|
color: '',
|
|
|
bold: false,
|
|
|
star: false,
|
|
|
- queryCode: 'abc',
|
|
|
disabled: false
|
|
|
}))
|
|
|
}
|
|
@@ -368,27 +388,29 @@ module.exports = [
|
|
|
factory: () => [
|
|
|
{
|
|
|
category: 'approvedCount',
|
|
|
+ queryCode: Random.cname(),
|
|
|
displayName: '补录录取',
|
|
|
+ detailName: '录取组合',
|
|
|
values: mockGroups.map(groupId => ({
|
|
|
groupId: groupId,
|
|
|
value: Random.integer(120, 400),
|
|
|
color: '',
|
|
|
bold: false,
|
|
|
star: false,
|
|
|
- queryCode: 'abc',
|
|
|
disabled: false
|
|
|
}))
|
|
|
},
|
|
|
{
|
|
|
category: 'forcedCount',
|
|
|
+ queryCode: Random.cname(),
|
|
|
displayName: '调剂录取',
|
|
|
+ detailName: '录取组合',
|
|
|
values: mockGroups.map(groupId => ({
|
|
|
groupId: groupId,
|
|
|
value: Random.integer(120, 400),
|
|
|
color: '',
|
|
|
bold: false,
|
|
|
star: false,
|
|
|
- queryCode: 'abc',
|
|
|
disabled: false
|
|
|
}))
|
|
|
}
|
|
@@ -399,14 +421,15 @@ module.exports = [
|
|
|
factory: () => [
|
|
|
{
|
|
|
category: 'forcedCount',
|
|
|
+ queryCode: Random.cname(),
|
|
|
displayName: '调剂录取',
|
|
|
+ detailName: '录取组合',
|
|
|
values: mockGroups.map(groupId => ({
|
|
|
groupId: groupId,
|
|
|
value: Random.integer(120, 400),
|
|
|
color: '',
|
|
|
bold: false,
|
|
|
star: false,
|
|
|
- queryCode: 'abc',
|
|
|
disabled: false
|
|
|
}))
|
|
|
}
|
|
@@ -433,5 +456,79 @@ module.exports = [
|
|
|
data: results
|
|
|
}
|
|
|
}
|
|
|
+ },
|
|
|
+ {
|
|
|
+ url: '/mock/front/report/getElectiveGenerationDetails',
|
|
|
+ type: 'get',
|
|
|
+ response: config => {
|
|
|
+ return {
|
|
|
+ code: 200,
|
|
|
+ msg: 'success',
|
|
|
+ total: Random.integer(5, 200),
|
|
|
+ data: {
|
|
|
+ groupDescriptors: mockGroups.map(groupId => {
|
|
|
+ return {
|
|
|
+ groupId,
|
|
|
+ descriptors: [
|
|
|
+ { key: 'setting', value: Random.integer(100, 9999), description: '设置人数' },
|
|
|
+ { key: 'actual', value: Random.integer(0, 9999), description: '实报人数' }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ }),
|
|
|
+ 'details|5-20': [
|
|
|
+ {
|
|
|
+ 'id|+1': 1000,
|
|
|
+ 'roundId': 1,
|
|
|
+ 'studentId|+1': 100,
|
|
|
+ 'studentName': Random.cname(),
|
|
|
+ 'groupId': config.query.groupId,
|
|
|
+ 'groupName': Random.cname(),
|
|
|
+ 'classId|+1': 20,
|
|
|
+ 'className': Random.cname(),
|
|
|
+ 'datetime': Random.date(),
|
|
|
+ 'histories|4-15': [
|
|
|
+ {
|
|
|
+ 'generation|1': [1, 2, 3, 4, 5, 6, 7],
|
|
|
+ 'groupId|1': mockGroups,
|
|
|
+ 'description': Random.cname(),
|
|
|
+ 'rankDescriptors|1-3': [
|
|
|
+ { key: Random.cname(), value: Random.integer(1, 300), description: Random.cname() }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ url: '/mock/front/report/getGenerationOptionalMajorsBatch',
|
|
|
+ type: 'get',
|
|
|
+ response: config => {
|
|
|
+ let studentIds = config.query.studentIds
|
|
|
+ if (typeof studentIds === 'string') studentIds = studentIds.split(',')
|
|
|
+ const majorsMap = {}
|
|
|
+ studentIds.forEach(id => {
|
|
|
+ majorsMap[id] = {
|
|
|
+ 'bestMatchedGroupId|1': mockGroups,
|
|
|
+ 'majors|0-6': [{
|
|
|
+ 'collegeId|+1': 5000,
|
|
|
+ 'collegeName': Random.cname(),
|
|
|
+ 'majorCategoryCode': Random.cname(),
|
|
|
+ 'majorCategoryName': Random.cname(),
|
|
|
+ 'majors': {},
|
|
|
+ 'limitationA': '', // 选科限制1
|
|
|
+ 'limitationB': '', // 选科限制2
|
|
|
+ 'matchedGroupIds|0-3': mockGroups // 匹配的组合
|
|
|
+ }]
|
|
|
+ }
|
|
|
+ })
|
|
|
+ return {
|
|
|
+ code: 200,
|
|
|
+ msg: 'success',
|
|
|
+ data: majorsMap
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
]
|