离校批量审核管理
diff --git a/leave-school-vue/src/mock/handling.js b/leave-school-vue/src/mock/handling.js
deleted file mode 100644
index 32cd9dd..0000000
--- a/leave-school-vue/src/mock/handling.js
+++ /dev/null
@@ -1,113 +0,0 @@
-import Mock from 'mockjs'
-import { param2Obj } from '@/utils'
-
-const recordList = Mock.mock({
- 'list|26': [{
- 'id': '@increment',
- 'xh': '@word(5)',
- 'xm': '@cword(2, 3)',
- 'yx': '@cword(6, 15)',
- 'zy': '@cword(6, 15)',
- 'bj': '@cword(6, 15)',
- 'xslb': '@cword(3, 5)',
- 'sfzylx|1': ['准予', '不准予'],
- 'shjllist|4': [{
- 'shhj': '@cword(6, 8)',
- 'shzt|1': ['通过', '不通过'],
- 'shyj|3': [{
- 'shzt|1': ['通过', '不通过'],
- 'shsj': '@datetime',
- 'shr': '@cword(2, 3)',
- 'shyj': '@cword(6, 10)'
- }]
- }],
- 'blbmlist': [{
- 'bmmc': '后勤处',
- 'shjg|1': ['—', '×', '√']
- },
- {
- 'bmmc': '财务处',
- 'shjg|1': ['—', '×', '√']
- },
- {
- 'bmmc': '学生处',
- 'shjg|1': ['—', '×', '√']
- },
- {
- 'bmmc': '图书馆',
- 'shjg|1': ['—', '×', '√']
- }]
- }]
-}).list
-
-export default{
- getList: config => {
- const { pcmc, xh, xm, sfzylx, yx, zy, bj, xslb, pageIndex = 1, pageSize = 20 } = param2Obj(config.url)
- const mockList = recordList.filter(item => {
- if (pcmc && item.pcmc + '' !== pcmc + '') return false
- if (xh && item.xh !== xh) return false
- if (xm && item.xm !== xm) return false
- if (sfzylx && item.sfzylx !== sfzylx) return false
- if (yx && item.yx !== yx) return false
- if (zy && item.zy !== zy) return false
- if (bj && item.bj !== bj) return false
- if (xslb && item.xslb !== xslb) return false
- return true
- })
-
- const pageList = mockList.filter((item, index) => index < pageSize * pageIndex && index >= pageSize * (pageIndex - 1))
- return {
- items: pageList,
- recordCount: mockList.length,
- code: 200
- }
- },
- getAllList: config => {
- return {
- items: recordList,
- code: 200
- }
- },
- getItem: config => {
- const { id } = param2Obj(config.url)
- const mockList = recordList.filter(item => item.id + '' === id + '')
- return {
- data: mockList.length > 0 ? mockList[0] : null,
- code: 200
- }
- },
- createData: config => {
- const record = JSON.parse(config.body)
- if (!record.id) {
- record.id = '' + parseInt(Math.random() * 100) + 1024 // mock a id
- recordList.unshift(record)
- } else {
- for (let i = 0; i < recordList.length; i++) {
- if (recordList[i].id + '' === record.id + '') {
- recordList.splice(i, 1, record)
- break
- }
- }
- }
- return {
- item: record,
- code: 200
- }
- },
- deleteData: config => {
- const record = JSON.parse(config.body)
- let index = -1
- for (let i = 0; i < recordList.length; i++) {
- if (recordList[i].id + '' === record.id + '') {
- index = i
- break
- }
- }
- if (index > -1) {
- recordList.splice(index, 1)
- }
- return {
- code: 200
- }
- }
-}
diff --git a/leave-school-vue/src/mock/index.js b/leave-school-vue/src/mock/index.js
index f4c79a2..300b502 100644
--- a/leave-school-vue/src/mock/index.js
+++ b/leave-school-vue/src/mock/index.js
@@ -13,7 +13,6 @@
import instructorApi from './instructor'
import newspublishApi from './newspublish'
-import handlingApi from './handling'
import leavestudentApi from './leavestudent'
import nodereportApi from './nodereport'
import deptreportApi from './deptreport'
@@ -107,12 +106,9 @@
Mock.mock(/\/api\/news\/newspublish\/delete-newspublish/, 'delete', newspublishApi.deleteData)
Mock.mock(/\/api\/news\/newspublish\/get-item/, 'get', newspublishApi.getItem)
-// 办理情况查询
-Mock.mock(/\/api\/statistical\/handling\/list-api/, 'get', handlingApi.getList)
-Mock.mock(/\/api\/statistical\/handling\/get-item/, 'get', handlingApi.getItem)
-
// 离校学生审核查询
Mock.mock(/\/api\/leaveprocess\/leavestudent\/auditlist-api/, 'get', leavestudentApi.getList)
+Mock.mock(/\/api\/leaveprocess\/leavestudent\/save-audit/, 'post', leavestudentApi.saveAudit)
// 环节统计报表查询
Mock.mock(/\/api\/statistical\/nodereport\/list-api/, 'get', nodereportApi.getList)
diff --git a/leave-school-vue/src/mock/leavestudent.js b/leave-school-vue/src/mock/leavestudent.js
index 17eefb4..919aef4 100644
--- a/leave-school-vue/src/mock/leavestudent.js
+++ b/leave-school-vue/src/mock/leavestudent.js
@@ -18,7 +18,34 @@
'studentType': '@cword(6, 7)',
'leaveSchoolType': '@cword(6, 7)',
'graduateYear': '@cword(6, 7)',
- 'graduateMonth': '@cword(6, 7)'
+ 'graduateMonth': '@cword(6, 7)',
+ 'allowedLeave|1': ['准予', '不准予'],
+ 'auditLogList|4': [{
+ 'auditNode|1': ['后勤处', '财务处', '学生处', '图书馆'],
+ 'auditResult|1': ['通过', '不通过'],
+ 'auditOpinionList|3': [{
+ 'auditResult|1': ['通过', '不通过'],
+ 'auditTime': '@datetime',
+ 'auditor': '@cword(2, 3)',
+ 'auditOpinion': '@cword(6, 10)'
+ }]
+ }],
+ 'nodelist': [{
+ 'auditNode': '后勤处',
+ 'auditResult|1': ['—', '×', '√']
+ },
+ {
+ 'auditNode': '财务处',
+ 'auditResult|1': ['—', '×', '√']
+ },
+ {
+ 'auditNode': '学生处',
+ 'auditResult|1': ['—', '×', '√']
+ },
+ {
+ 'auditNode': '图书馆',
+ 'auditResult|1': ['—', '×', '√']
+ }]
}]
}).list
@@ -56,9 +83,26 @@
'label': '其他'
}]
)
+const auditResultList = Mock.mock(
+ [{
+ 'value': 'TO_BE_AUDITED',
+ 'label': '待审核'
+ },
+ {
+ 'value': 'APPROVED',
+ 'label': '审核通过'
+ },
+ {
+ 'value': 'NOT_PASSED',
+ 'label': '审核不通过'
+ }]
+)
export default{
getList: config => {
- const { studentNumber, name, department, major, clazz, leaveSchoolBatch, studentType, leaveSchoolType, graduateYear, graduateMonth, pageIndex = 1, pageSize = 20 } = param2Obj(config.url)
+ const { studentNumber, name, department, major, clazz,
+ leaveSchoolBatch, studentType, leaveSchoolType, graduateYear, graduateMonth,
+ auditNode, allowedLeave, auditResult,
+ pageIndex = 1, pageSize = 20 } = param2Obj(config.url)
const mockList = clsList.filter(item => {
if (studentNumber && item.studentNumber && item.studentNumber !== studentNumber) return false
if (name && item.name && item.name !== name) return false
@@ -70,6 +114,9 @@
if (leaveSchoolType && item.leaveSchoolType && item.leaveSchoolType !== leaveSchoolType) return false
if (graduateYear && item.graduateYear && item.graduateYear !== graduateYear) return false
if (graduateMonth && item.graduateMonth && item.graduateMonth !== graduateMonth) return false
+ if (auditNode && item.auditNode && item.auditNode !== auditNode) return false
+ if (allowedLeave && item.allowedLeave && item.allowedLeave !== allowedLeave) return false
+ if (auditResult && item.auditResult && item.auditResult !== auditResult) return false
return true
})
@@ -79,9 +126,16 @@
leaveSchoolTypeList: leaveSchoolTypeList,
studentTypeList: studentTypeList,
leaveSchoolBatchList: leaveSchoolBatchList,
+ auditResultList: auditResultList,
items: pageList,
recordCount: mockList.length,
code: 200
}
+ },
+ saveAudit: config => {
+ return {
+ code: 200
+ }
}
}
+