2019-03-06 14:02:59 +00:00
|
|
|
/* eslint-disable */
|
2019-03-07 13:56:05 +00:00
|
|
|
import mockjs from 'mockjs';
|
|
|
|
import { resultBody } from './mock-comment';
|
2019-03-01 10:15:12 +00:00
|
|
|
import adminMenu from './geographic/admin-menu.json';
|
|
|
|
import adminMenuAll from './geographic/admin-menu-all.json';
|
|
|
|
import adminUrls from './geographic/admin-urls';
|
2019-03-05 13:35:29 +00:00
|
|
|
import resourceTree from './geographic/resource-tree.json';
|
2019-03-06 12:08:39 +00:00
|
|
|
import roleQuery from './geographic/role-query.json';
|
2019-03-15 10:48:40 +00:00
|
|
|
import dictionaryList from './geographic/dictionary-list.json';
|
2019-03-01 10:15:12 +00:00
|
|
|
|
|
|
|
function getAdminMenu(req, res) {
|
|
|
|
return res.json(adminMenu);
|
|
|
|
}
|
|
|
|
|
|
|
|
function getAdminMenuAll(req, res) {
|
|
|
|
return res.json(adminMenuAll);
|
|
|
|
}
|
|
|
|
|
|
|
|
function getAdminUrls(req, res) {
|
|
|
|
return res.json(adminUrls);
|
|
|
|
}
|
|
|
|
|
2019-03-05 13:35:29 +00:00
|
|
|
function getResourceTree(req, res) {
|
|
|
|
return res.json(resourceTree);
|
|
|
|
}
|
|
|
|
|
2019-03-06 12:08:39 +00:00
|
|
|
function getQueryRole(req, res) {
|
|
|
|
return res.json(roleQuery);
|
|
|
|
}
|
|
|
|
|
2019-03-07 13:56:05 +00:00
|
|
|
function getDictionaryKeys(req, res) {
|
|
|
|
const values = mockjs.mock({
|
|
|
|
'list|5': [{ 'value|+1': 0, text: '@city' }],
|
|
|
|
});
|
|
|
|
|
|
|
|
return res.json(resultBody(values));
|
|
|
|
}
|
|
|
|
|
|
|
|
function getDictionaryText(req, res) {
|
|
|
|
const values = mockjs.mock({
|
|
|
|
text: '@city',
|
|
|
|
});
|
|
|
|
|
|
|
|
return res.json(resultBody(values));
|
|
|
|
}
|
|
|
|
|
2019-03-15 14:59:37 +00:00
|
|
|
function getDictionaryTree(req, res) {
|
|
|
|
return res.json(dictionaryList);
|
2019-03-15 10:48:40 +00:00
|
|
|
}
|
|
|
|
|
2019-03-01 10:15:12 +00:00
|
|
|
export default {
|
2019-03-30 16:12:15 +00:00
|
|
|
// 'GET /admin-api/admins/admin/menu_resource_tree': getAdminMenuAll,
|
|
|
|
// 'GET /admin-api/admins/admin/url_resource_list': getAdminUrls,
|
|
|
|
// 'GET /admin-api/admins/resource/tree': getResourceTree,
|
|
|
|
// 'GET /admin-api/admins/role/page': getQueryRole,
|
2019-03-18 19:39:17 +00:00
|
|
|
// 'GET /admin-api/admins/admin/page': getQueryRole,
|
2019-03-30 16:12:15 +00:00
|
|
|
// 'GET /admin-api/admins/data_dict/tree': getDictionaryTree,
|
2019-03-01 10:15:12 +00:00
|
|
|
};
|