院系统计报表查询
diff --git a/leave-school-vue/src/mock/department.js b/leave-school-vue/src/mock/department.js
index 0ce4f87..98ef5b3 100644
--- a/leave-school-vue/src/mock/department.js
+++ b/leave-school-vue/src/mock/department.js
@@ -34,9 +34,17 @@
code: 200
}
},
- getAllList: config => {
+ getDeptList: config => {
+ const mockList = deptList.filter(item => item.lbm === '院系')
return {
- items: deptList,
+ items: mockList,
+ code: 200
+ }
+ },
+ getSectionList: config => {
+ const mockList = deptList.filter(item => item.lbm === '部门')
+ return {
+ items: mockList,
code: 200
}
},
diff --git a/leave-school-vue/src/mock/deptreport.js b/leave-school-vue/src/mock/deptreport.js
new file mode 100644
index 0000000..0e08084
--- /dev/null
+++ b/leave-school-vue/src/mock/deptreport.js
@@ -0,0 +1,38 @@
+import Mock from 'mockjs'
+import { param2Obj } from '@/utils'
+
+const recordList = Mock.mock({
+ 'list|4': [{
+ 'id': '@increment',
+ 'yx|1': ['教育学院', '经管学院', '人文学院'],
+ 'yxid|1': [1, 2, 3],
+ 'zylx|1-1000': 100,
+ 'bzylx|1-1000': 100
+ }]
+}).list
+
+export default{
+ getList: config => {
+ const { pcmc, pageIndex = 1, pageSize = 20 } = param2Obj(config.url)
+ const mockList = recordList.filter(item => {
+ if (pcmc && item.pcmc + '' !== pcmc + '') 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
+ }
+ },
+ getLeaveAuditResult: config => {
+ return {
+ data: {
+ zylx: 100,
+ bzylx: 200
+ },
+ code: 200
+ }
+ }
+}
diff --git a/leave-school-vue/src/mock/index.js b/leave-school-vue/src/mock/index.js
index 5fa59ec..fe83b76 100644
--- a/leave-school-vue/src/mock/index.js
+++ b/leave-school-vue/src/mock/index.js
@@ -13,8 +13,9 @@
import instructorApi from './instructor'
import newspublishApi from './newspublish'
import handlingApi from './handling'
-import nodereportApi from './nodereport'
import leavestudentApi from './leavestudent'
+import nodereportApi from './nodereport'
+import deptreportApi from './deptreport'
// 登录
Mock.mock(/\/api\/login\/login/, 'post', loginApi.loginByUsername)
@@ -29,7 +30,8 @@
// 院系部门管理
Mock.mock(/\/api\/system\/department\/list-api/, 'get', departmentApi.getList)
-Mock.mock(/\/api\/system\/department\/all-list/, 'get', departmentApi.getAllList)
+Mock.mock(/\/api\/system\/department\/dept-list/, 'get', departmentApi.getDeptList)
+Mock.mock(/\/api\/system\/department\/section-list/, 'get', departmentApi.getSectionList)
Mock.mock(/\/api\/system\/department\/create-department/, 'post', departmentApi.createData)
Mock.mock(/\/api\/system\/department\/delete-department/, 'delete', departmentApi.deleteData)
Mock.mock(/\/api\/system\/department\/get-item/, 'get', departmentApi.getItem)
@@ -95,12 +97,15 @@
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\/statistical\/nodereport\/list-api/, 'get', nodereportApi.getList)
Mock.mock(/\/api\/statistical\/nodereport\/get-item/, 'get', nodereportApi.getItem)
Mock.mock(/\/api\/statistical\/nodereport\/leaveresult/, 'get', nodereportApi.getLeaveAuditResult)
-// 离校学生审核查询
-Mock.mock(/\/api\/leaveprocess\/leavestudent\/auditlist-api/, 'get', leavestudentApi.getList)
+// 院系统计报表查询
+Mock.mock(/\/api\/statistical\/deptreport\/list-api/, 'get', deptreportApi.getList)
export default Mock
diff --git a/leave-school-vue/src/mock/major.js b/leave-school-vue/src/mock/major.js
index 2999c65..2eacdbc 100644
--- a/leave-school-vue/src/mock/major.js
+++ b/leave-school-vue/src/mock/major.js
@@ -9,7 +9,7 @@
'sfky|1': ['可用', '不可用'],
'sfkycode|1': ['1', '0'],
'ssyx|1': ['教育学院', '经管学院', '人文学院', '数学学院', '计算机学院', '电子学院', '电气学院', '生命科学院'],
- 'ssyxid|1': ['1', '2', '3', '4', '5', '6', '7', '8'],
+ 'ssyxid|1': [1, 2, 3, 4, 5, 6, 7, 8],
'sszygb|1': ['计算机', '哲学']
}]
}).list
@@ -21,7 +21,7 @@
if (zydm && item.zydm !== zydm) return false
if (zymc && item.zymc !== zymc) return false
if (sfky && item.sfkycode !== sfky) return false
- if (ssyx && item.ssyxid !== ssyx) return false
+ if (ssyx && item.ssyxid + '' !== ssyx + '') return false
return true
})
@@ -34,7 +34,7 @@
},
getZyListByYx: config => {
const { yx } = param2Obj(config.url)
- const mockList = majorList.filter(item => item.ssyxid === yx)
+ const mockList = majorList.filter(item => item.ssyxid + '' === yx + '')
return {
items: mockList,
diff --git a/leave-school-vue/src/mock/menulist.js b/leave-school-vue/src/mock/menulist.js
index cc1ded8..659e74f 100644
--- a/leave-school-vue/src/mock/menulist.js
+++ b/leave-school-vue/src/mock/menulist.js
@@ -105,6 +105,19 @@
code: 'nodereport',
resource: '/views/statistical/nodereport/index',
meta: { title: '环节统计报表查询', icon: 'nodereport' }
+ },
+ {
+ path: 'deptreport',
+ code: 'deptreport',
+ resource: '/views/statistical/deptreport/index',
+ meta: { title: '院系统计报表查询', icon: 'deptreport' }
+ },
+ {
+ path: 'deptsectionrep',
+ code: 'deptsectionrep',
+ hidden: true,
+ resource: '/views/statistical/deptsectionrep/index',
+ meta: { title: '院系各部门统计报表', icon: 'deptsectionrep' }
}
]
}
diff --git a/leave-school-vue/src/mock/nodereport.js b/leave-school-vue/src/mock/nodereport.js
index bb91f1c..bd2d607 100644
--- a/leave-school-vue/src/mock/nodereport.js
+++ b/leave-school-vue/src/mock/nodereport.js
@@ -6,6 +6,7 @@
'id': '@increment',
'hjmc|1': ['后勤处', '财务处', '学生处'],
'hjid': '@word(5)',
+ 'yxid|1': [1, 2, 3],
'dsh|1-1000': 100,
'shtg|1-1000': 100,
'shbtg|1-1000': 100
@@ -20,7 +21,7 @@
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 (yx && item.yxid + '' !== yx + '') return false
if (zy && item.zy !== zy) return false
if (bj && item.bj !== bj) return false
if (xslb && item.xslb !== xslb) return false