123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288 |
- import { MockMethod } from "vite-plugin-mock";
- export default [
- {
- url: "/role",
- method: "post",
- response: () => {
- return {
- code: 0,
- data: {
- list: [
- {
- createTime: 1609837428000,
- updateTime: 1645477701000,
- creator: "admin",
- updater: "",
- deleted: false,
- tenantId: 1,
- id: 1,
- name: "超级管理员",
- code: "super_admin",
- sort: 1,
- status: 0,
- type: 1,
- remark: "超级管理员",
- dataScope: 1,
- dataScopeDeptIds: null
- },
- {
- createTime: 1609837428000,
- updateTime: 1645477700000,
- creator: "admin",
- updater: "",
- deleted: false,
- tenantId: 1,
- id: 2,
- name: "普通角色",
- code: "common",
- sort: 2,
- status: 0,
- type: 1,
- remark: "普通角色",
- dataScope: 2,
- dataScopeDeptIds: null
- },
- {
- createTime: 1609912175000,
- updateTime: 1647698441000,
- creator: "",
- updater: "1",
- deleted: false,
- tenantId: 1,
- id: 101,
- name: "测试账号",
- code: "test",
- sort: 0,
- status: 0,
- type: 2,
- remark: "132",
- dataScope: 1,
- dataScopeDeptIds: []
- }
- ],
- total: 3
- }
- };
- }
- },
- {
- url: "/dept",
- method: "post",
- response: () => {
- return {
- code: 0,
- data: [
- {
- name: "杭州总公司",
- type: 1, // 1 公司 2 分公司 3 部门
- parentId: 0,
- sort: 0,
- leaderUserId: 1,
- phone: "15888888888",
- email: "ry@qq.com",
- status: 0,
- id: 100,
- createTime: 1609837427000,
- remark: "备注、备注、备注、备注、备注、备注、备注"
- },
- {
- name: "郑州分公司",
- type: 2,
- parentId: 100,
- sort: 1,
- leaderUserId: 104,
- phone: "15888888888",
- email: "ry@qq.com",
- status: 0,
- id: 101,
- createTime: 1609837427000,
- remark: "备注、备注、备注、备注、备注、备注、备注"
- },
- {
- name: "研发部门",
- type: 3,
- parentId: 101,
- sort: 1,
- leaderUserId: 104,
- phone: "15888888888",
- email: "ry@qq.com",
- status: 0,
- id: 103,
- createTime: 1609837427000,
- remark: "备注、备注、备注、备注、备注、备注、备注"
- },
- {
- name: "市场部门",
- type: 3,
- parentId: 102,
- sort: 1,
- leaderUserId: null,
- phone: "15888888888",
- email: "ry@qq.com",
- status: 0,
- id: 108,
- createTime: 1609837427000,
- remark: "备注、备注、备注、备注、备注、备注、备注"
- },
- {
- name: "深圳分公司",
- type: 2,
- parentId: 100,
- sort: 2,
- leaderUserId: null,
- phone: "15888888888",
- email: "ry@qq.com",
- status: 0,
- id: 102,
- createTime: 1609837427000,
- remark: "备注、备注、备注、备注、备注、备注、备注"
- },
- {
- name: "市场部门",
- type: 3,
- parentId: 101,
- sort: 2,
- leaderUserId: null,
- phone: "15888888888",
- email: "ry@qq.com",
- status: 1,
- id: 104,
- createTime: 1609837427000,
- remark: "备注、备注、备注、备注、备注、备注、备注"
- },
- {
- name: "财务部门",
- type: 3,
- parentId: 102,
- sort: 2,
- leaderUserId: null,
- phone: "15888888888",
- email: "ry@qq.com",
- status: 0,
- id: 109,
- createTime: 1609837427000,
- remark: "备注、备注、备注、备注、备注、备注、备注"
- },
- {
- name: "测试部门",
- type: 3,
- parentId: 101,
- sort: 3,
- leaderUserId: null,
- phone: "15888888888",
- email: "ry@qq.com",
- status: 0,
- id: 105,
- createTime: 1609837427000,
- remark: "备注、备注、备注、备注、备注、备注、备注"
- },
- {
- name: "财务部门",
- type: 3,
- parentId: 101,
- sort: 4,
- leaderUserId: 103,
- phone: "15888888888",
- email: "ry@qq.com",
- status: 1,
- id: 106,
- createTime: 1609837427000,
- remark: "备注、备注、备注、备注、备注、备注、备注"
- },
- {
- name: "运维部门",
- type: 3,
- parentId: 101,
- sort: 5,
- leaderUserId: null,
- phone: "15888888888",
- email: "ry@qq.com",
- status: 0,
- id: 107,
- createTime: 1609837427000,
- remark: "备注、备注、备注、备注、备注、备注、备注"
- }
- ]
- };
- }
- },
- {
- url: "/user",
- method: "post",
- response: () => {
- return {
- code: 0,
- data: {
- list: [
- {
- username: "admin",
- nickname: "admin",
- remark: "管理员",
- deptId: 103,
- postIds: [1],
- mobile: "15888888888",
- sex: 0,
- id: 1,
- status: 0,
- createTime: 1609837427000,
- dept: {
- id: 103,
- name: "研发部门"
- }
- },
- {
- username: "pure",
- nickname: "pure",
- remark: "不要吓我",
- deptId: 104,
- postIds: [1],
- mobile: "15888888888",
- sex: 0,
- id: 100,
- status: 1,
- createTime: 1609981637000,
- dept: {
- id: 104,
- name: "市场部门"
- }
- },
- {
- username: "小姐姐",
- nickname: "girl",
- remark: null,
- deptId: 106,
- postIds: null,
- mobile: "15888888888",
- sex: 1,
- id: 103,
- status: 1,
- createTime: 1610553035000,
- dept: {
- id: 106,
- name: "财务部门"
- }
- },
- {
- username: "小哥哥",
- nickname: "boy",
- remark: null,
- deptId: 107,
- postIds: [],
- mobile: "15888888888",
- sex: 0,
- id: 104,
- status: 0,
- createTime: 1611166433000,
- dept: {
- id: 107,
- name: "运维部门"
- }
- }
- ],
- total: 4
- }
- };
- }
- }
- ] as MockMethod[];
|