| // import Mock from 'mockjs' |
| import { param2Obj } from '@/utils' |
| |
| const deptList = [{ |
| 'id': '1', |
| 'type': 'lbm', |
| 'name': '院系' |
| }, |
| { |
| 'id': '2', |
| 'type': 'lbm', |
| 'name': '部门' |
| }, |
| { |
| 'id': '3', |
| 'type': 'gjzybz', |
| 'name': '文学' |
| }, |
| { |
| 'id': '4', |
| 'type': 'gjzybz', |
| 'name': '物理' |
| }, |
| { |
| 'id': '5', |
| 'type': 'gjzybz', |
| 'name': '数学' |
| }, |
| { |
| 'id': '6', |
| 'type': 'nj', |
| 'name': '2017' |
| }, |
| { |
| 'id': '7', |
| 'type': 'nj', |
| 'name': '2018' |
| }, |
| { |
| 'id': '8', |
| 'type': 'nj', |
| 'name': '2019' |
| }, |
| { |
| 'id': '9', |
| 'type': 'zzmm', |
| 'name': '党员' |
| }, |
| { |
| 'id': '10', |
| 'type': 'zzmm', |
| 'name': '群众' |
| }, |
| { |
| 'id': '11', |
| 'type': 'xb', |
| 'name': '男' |
| }, |
| { |
| 'id': '12', |
| 'type': 'xb', |
| 'name': '女' |
| }, |
| { |
| 'id': '13', |
| 'type': 'xswz', |
| 'name': '置顶' |
| }, |
| { |
| 'id': '14', |
| 'type': 'xswz', |
| 'name': '其他' |
| }, |
| { |
| 'id': '15', |
| 'type': 'gglx', |
| 'name': '离校公告' |
| }, |
| { |
| 'id': '16', |
| 'type': 'jszlx', |
| 'name': '所有人' |
| }, |
| { |
| 'id': '17', |
| 'type': 'jszlx', |
| 'name': '所有学生' |
| }, |
| { |
| 'id': '18', |
| 'type': 'jszlx', |
| 'name': '所有教职工' |
| }] |
| |
| export default{ |
| getDicList: config => { |
| const { type } = param2Obj(config.url) |
| const mockList = deptList.filter(item => { |
| if (type && item.type !== type) return false |
| return true |
| }) |
| |
| return { |
| items: mockList, |
| code: 200 |
| } |
| } |
| } |