办理情况查询页面功能
diff --git a/leave-school-vue/src/mock/dictionary.js b/leave-school-vue/src/mock/dictionary.js
index fbfb169..0f8166b 100644
--- a/leave-school-vue/src/mock/dictionary.js
+++ b/leave-school-vue/src/mock/dictionary.js
@@ -90,6 +90,16 @@
'id': '18',
'type': 'jszlx',
'name': '所有教职工'
+},
+{
+ 'id': '19',
+ 'type': 'xslb',
+ 'name': '本专科生'
+},
+{
+ 'id': '20',
+ 'type': 'xslb',
+ 'name': '研究生'
}]
export default{
diff --git a/leave-school-vue/src/mock/handling.js b/leave-school-vue/src/mock/handling.js
new file mode 100644
index 0000000..32cd9dd
--- /dev/null
+++ b/leave-school-vue/src/mock/handling.js
@@ -0,0 +1,113 @@
+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 1e9f075..981622e 100644
--- a/leave-school-vue/src/mock/index.js
+++ b/leave-school-vue/src/mock/index.js
@@ -12,6 +12,7 @@
import departmentleaderApi from './departmentleader'
import instructorApi from './instructor'
import newspublishApi from './newspublish'
+import handlinghApi from './handling'
// 登录
Mock.mock(/\/api\/login\/login/, 'post', loginApi.loginByUsername)
@@ -87,4 +88,8 @@
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', handlinghApi.getList)
+Mock.mock(/\/api\/statistical\/handling\/get-item/, 'get', handlinghApi.getItem)
+
export default Mock
diff --git a/leave-school-vue/src/mock/menulist.js b/leave-school-vue/src/mock/menulist.js
index 7453cd9..343a71e 100644
--- a/leave-school-vue/src/mock/menulist.js
+++ b/leave-school-vue/src/mock/menulist.js
@@ -88,6 +88,25 @@
meta: { title: '新闻公告查看', icon: 'newview' }
}
]
+ },
+ {
+ path: '/statistical',
+ code: 'statistical',
+ meta: { title: '离校统计查询', icon: 'news' },
+ children: [
+ {
+ path: 'handling',
+ code: 'HandlingSituation',
+ resource: '/views/statistical/handling/index',
+ meta: { title: '办理情况查询', icon: 'handling' }
+ },
+ {
+ path: 'nodereport',
+ code: 'nodereport',
+ resource: '/views/news/newview/index',
+ meta: { title: '环节统计报表查询', icon: 'newview' }
+ }
+ ]
}
]