@@ -6,12 +6,8 @@ | |||||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | <meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||||
<meta name="viewport" content="width=device-width,initial-scale=0.8"> | <meta name="viewport" content="width=device-width,initial-scale=0.8"> | ||||
<!-- <link rel="icon" href="./zyic.ico"> --> | <!-- <link rel="icon" href="./zyic.ico"> --> | ||||
<title>农村资源资产清查监管系统</title> | |||||
<title>中农融信</title> | |||||
<script> | |||||
</script> | |||||
<style> | |||||
</style> | |||||
</head> | </head> | ||||
<body> | <body> | ||||
@@ -0,0 +1,3 @@ | |||||
http://218.59.175.43:92/index | |||||
demo | |||||
Rx@345678 |
@@ -1,130 +1 @@ | |||||
import request from '@/utils/request'; | import request from '@/utils/request'; | ||||
// 用户信息 | |||||
export function GetInfoByRole () { | |||||
return request({ | |||||
url: '/api/v1.0/admin/GetInfoByRole', | |||||
method: 'get', | |||||
}); | |||||
} | |||||
export function GetLayerInfoByAreaCode (query) { | |||||
return request({ | |||||
url: '/api/v1.0/admin/web/area/selectOneAreaCode', | |||||
method: 'get', | |||||
params: query | |||||
}); | |||||
} | |||||
// 地区字典 | |||||
export function getAreaList (query) { | |||||
return request({ | |||||
url: '/api/v1.0/admin/web/area/areaLevel', | |||||
method: 'get', | |||||
params: query | |||||
}); | |||||
} | |||||
// 保存承包人信息 | |||||
export function cbhtxx (params) { | |||||
return request({ | |||||
url: '/api/v1.0/admin/web/cbhtxx', | |||||
method: 'post', | |||||
data: { | |||||
...params | |||||
} | |||||
}); | |||||
} | |||||
// 保存地块基本信息 | |||||
export function cwdjbxx (params) { | |||||
return request({ | |||||
url: '/api/v1.0/admin/web/cwdjbxx', | |||||
method: 'post', | |||||
data: { | |||||
...params | |||||
} | |||||
}); | |||||
} | |||||
// 修改地块基本信息 | |||||
export function putcwdjbxx (params) { | |||||
return request({ | |||||
url: '/api/v1.0/admin/web/cwdjbxx', | |||||
method: 'put', | |||||
data: { | |||||
...params | |||||
} | |||||
}); | |||||
} | |||||
// 查询地块基本信息 | |||||
export function cwdjbxxinfo (id) { | |||||
return request({ | |||||
url: '/api/v1.0/admin/web/cwdjbxx/' + id, | |||||
method: 'get', | |||||
}); | |||||
} | |||||
// 查询承包人信息列表 | |||||
export function cbrxxList (query) { | |||||
return request({ | |||||
url: '/api/v1.0/admin/web/cbhtxx/list', | |||||
method: 'get', | |||||
params: query | |||||
}); | |||||
} | |||||
// 查询基本信息列表 | |||||
export function cwdjbxxList (query) { | |||||
return request({ | |||||
url: '/api/v1.0/admin/web/cwdjbxx/list', | |||||
method: 'get', | |||||
params: query | |||||
}); | |||||
} | |||||
// 删除承包人信息 | |||||
export function cbrxxdelete (id) { | |||||
return request({ | |||||
url: '/api/v1.0/admin/web/cbhtxx/' + id, | |||||
method: 'delete', | |||||
}); | |||||
} | |||||
// 查询承包人信息 | |||||
export function cbhtxxinfo (id) { | |||||
return request({ | |||||
url: '/api/v1.0/admin/web/cbhtxx/' + id, | |||||
method: 'get', | |||||
}); | |||||
} | |||||
// 修改承包人信息 | |||||
export function putcbhtxx (params) { | |||||
return request({ | |||||
url: '/api/v1.0/admin/web/cbhtxx', | |||||
method: 'put', | |||||
data: { | |||||
...params | |||||
} | |||||
}); | |||||
} | |||||
// 字典 | |||||
export function dictdata (type) { | |||||
return request({ | |||||
url: '/api/v1.0/admin/system/dict/data/type/' + type, | |||||
method: 'get', | |||||
}); | |||||
} | |||||
export function get (url, params) { | |||||
return request({ | |||||
url, | |||||
params: { | |||||
...params | |||||
} | |||||
}) | |||||
} | |||||
export function post (url, params) { | |||||
return request({ | |||||
headers: { | |||||
'Content-Type': 'application/xml' | |||||
}, | |||||
url, | |||||
method: 'post', | |||||
data: params | |||||
}) | |||||
} |
@@ -1,13 +1,10 @@ | |||||
import request from '@/utils/request'; | import request from '@/utils/request'; | ||||
// 登录系统 | |||||
export function login (params) { | |||||
return request({ | |||||
url: '/api/v1.0/admin/login', | |||||
method: 'post', | |||||
data: { | |||||
...params | |||||
} | |||||
}); | |||||
} | |||||
// 获取用户详细信息 | |||||
export function getInfo () { | |||||
return request({ | |||||
url: 'api/getInfo', | |||||
method: 'get' | |||||
}) | |||||
} |
@@ -0,0 +1,53 @@ | |||||
import request from '@/utils/request' | |||||
// 查询审批记录列表 | |||||
export function listApprove(query) { | |||||
return request({ | |||||
url: '/system/approve/list', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 查询审批记录详细 | |||||
export function getApprove(id) { | |||||
return request({ | |||||
url: '/system/approve/get/' + id, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 新增审批记录 | |||||
export function addApprove(data) { | |||||
return request({ | |||||
url: '/system/approve/add', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 修改审批记录 | |||||
export function updateApprove(data) { | |||||
return request({ | |||||
url: '/system/approve/edit', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 删除审批记录 | |||||
export function delApprove(id) { | |||||
return request({ | |||||
url: '/system/approve/remove/' + id, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 导出审批记录 | |||||
export function exportApprove(query) { | |||||
return request({ | |||||
url: '/system/approve/export', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} |
@@ -0,0 +1,62 @@ | |||||
import request from '@/utils/request' | |||||
// 查询附件信息列表 | |||||
export function listAttachment(query) { | |||||
return request({ | |||||
url: '/system/attachment/list', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 查询附件信息详细 | |||||
export function getAttachment(id) { | |||||
return request({ | |||||
url: '/system/attachment/get/' + id, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 查询附件信息详细 | |||||
export function findAttachment(data) { | |||||
return request({ | |||||
url: '/system/attachment/find', | |||||
method: 'get', | |||||
params: data | |||||
}) | |||||
} | |||||
// 新增附件信息 | |||||
export function addAttachment(data) { | |||||
return request({ | |||||
url: '/system/attachment/add', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 修改附件信息 | |||||
export function updateAttachment(data) { | |||||
return request({ | |||||
url: '/system/attachment/edit', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 删除附件信息 | |||||
export function delAttachment(id) { | |||||
return request({ | |||||
url: '/system/attachment/remove/' + id, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 导出附件信息 | |||||
export function exportAttachment(query) { | |||||
return request({ | |||||
url: '/system/attachment/export', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} |
@@ -0,0 +1,80 @@ | |||||
import request from '@/utils/request' | |||||
// 查询文件配置树 | |||||
export function treeView(query) { | |||||
return request({ | |||||
url: '/system/attachmentConfig/treeView', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 查询文件配置树 | |||||
export function treeSingleProcessView(query) { | |||||
return request({ | |||||
url: '/system/attachmentConfig/treeSingleProcessView', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 查询附件上传配置列表 | |||||
export function listAttachmentConfig(query) { | |||||
return request({ | |||||
url: '/system/attachmentConfig/list', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 查询附件上传配置详细 | |||||
export function getAttachmentConfig(id) { | |||||
return request({ | |||||
url: '/system/attachmentConfig/' + id, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 新增附件上传配置 | |||||
export function addAttachmentConfig(data) { | |||||
return request({ | |||||
url: '/system/attachmentConfig/add', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 修改附件上传配置 | |||||
export function updateAttachmentConfig(data) { | |||||
return request({ | |||||
url: '/system/attachmentConfig/edit', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 删除附件上传配置 | |||||
export function delAttachmentConfig(id) { | |||||
return request({ | |||||
url: '/system/attachmentConfig/remove/' + id, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 导出附件上传配置 | |||||
export function exportAttachmentConfig(query) { | |||||
return request({ | |||||
url: '/system/attachmentConfig/export', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 查询文件配置树 | |||||
export function getAttachmentConfigTree(query) { | |||||
return request({ | |||||
url: '/system/attachmentConfig/getAttachmentConfigTree', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} |
@@ -0,0 +1,53 @@ | |||||
import request from '@/utils/request' | |||||
// 查询用户和账套关系列表 | |||||
export function listBook(query) { | |||||
return request({ | |||||
url: '/system/book/list', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 查询用户和账套关系详细 | |||||
export function getBook(userId) { | |||||
return request({ | |||||
url: '/system/book/get/' + userId, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 新增用户和账套关系 | |||||
export function addBook(data) { | |||||
return request({ | |||||
url: '/system/book/add', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 修改用户和账套关系 | |||||
export function updateBook(data) { | |||||
return request({ | |||||
url: '/system/book/edit', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 删除用户和账套关系 | |||||
export function delBook(userId) { | |||||
return request({ | |||||
url: '/system/book/remove/' + userId, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 导出用户和账套关系 | |||||
export function exportBook(query) { | |||||
return request({ | |||||
url: '/system/book/export', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} |
@@ -0,0 +1,103 @@ | |||||
import request from '@/utils/request' | |||||
// 查询参数列表 | |||||
export function listConfig (query) { | |||||
return request({ | |||||
url: '/system/config/list', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 查询参数详细 | |||||
export function getConfig (configId) { | |||||
return request({ | |||||
url: '/api/system/config/get/' + configId, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 根据参数键名查询参数值 | |||||
export function getConfigKey (configKey) { | |||||
return request({ | |||||
url: '/api/system/config/configKey/' + configKey, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 新增参数配置 | |||||
export function addConfig (data) { | |||||
return request({ | |||||
url: '/system/config/add', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 修改参数配置 | |||||
export function updateConfig (data) { | |||||
return request({ | |||||
url: '/system/config/edit', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 删除参数配置 | |||||
export function delConfig (configId) { | |||||
return request({ | |||||
url: '/system/config/remove/' + configId, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 清理参数缓存 | |||||
export function clearCache () { | |||||
return request({ | |||||
url: '/system/config/clearCache', | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 导出参数 | |||||
export function exportConfig (query) { | |||||
return request({ | |||||
url: '/system/config/export', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
//查询geoserver服务地址 | |||||
export function getGeoServerConfigKey () { | |||||
return request({ | |||||
url: '/system/config/configKey/' + "system.geoServer.url", | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 查询application.yml键值 | |||||
export function propValue (key) { | |||||
return request({ | |||||
url: '/system/config/prop/' + key, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
export function getProperty (key, def) { | |||||
return propValue(key).then((resp) => { | |||||
return new Promise(function (resolve, reject) { | |||||
resolve(resp.code == 200 && resp.data !== null ? resp.data : def); | |||||
}); | |||||
}).catch((e) => { | |||||
return new Promise(function (resolve, reject) { | |||||
resolve(def); | |||||
}); | |||||
}); | |||||
} | |||||
export function usingExternalUploadService () { | |||||
return request({ | |||||
url: '/system/config/usingExternalUploadService', | |||||
method: 'get' | |||||
}) | |||||
} |
@@ -0,0 +1,208 @@ | |||||
import request from '@/utils/request' | |||||
// 查询部门列表 | |||||
export function listDept (query) { | |||||
return request({ | |||||
url: '/system/dept/list', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 查询部门列表(排除节点) | |||||
export function listDeptExcludeChild (deptId) { | |||||
return request({ | |||||
url: '/system/dept/list/exclude/' + deptId, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 查询部门详细 | |||||
export function getDept (deptId) { | |||||
return request({ | |||||
url: '/system/dept/get/' + deptId, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 查询部门下拉树结构 | |||||
export function treeselect () { | |||||
return request({ | |||||
url: '/system/dept/treeselect', | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 查询部门下拉树结构 | |||||
export function treeselectByDeptId (query) { | |||||
return request({ | |||||
url: 'api/system/dept/treeselectByDeptId', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 查询部门 | |||||
export function listData (query) { | |||||
return request({ | |||||
url: '/system/userDept/listData', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 查询组织机构下拉树结构 | |||||
export function treeselectByUser () { | |||||
return request({ | |||||
url: '/system/dept/treeselectByUser', | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 查询级联账套下拉 | |||||
export function listByDeptId (query) { | |||||
return request({ | |||||
url: '/finance/book/listByDeptId', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
//视图预览 查询级联账套下拉 | |||||
export function listByDeptIdAndBusinessKey (query) { | |||||
return request({ | |||||
url: '/finance/book/listByDeptIdAndBusinessKey', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
//提交部门权限 | |||||
export function userDept (data) { | |||||
return request({ | |||||
url: '/system/userDept/add', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 根据角色ID查询部门树结构 | |||||
export function roleDeptTreeselect (roleId) { | |||||
return request({ | |||||
url: '/system/dept/roleDeptTreeselect/' + roleId, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 新增部门 | |||||
export function addDept (data) { | |||||
return request({ | |||||
url: '/system/dept/add', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 修改部门 | |||||
export function updateDept (data) { | |||||
return request({ | |||||
url: '/system/dept/edit', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 删除部门 | |||||
export function delDept (deptId) { | |||||
return request({ | |||||
url: '/system/dept/remove/' + deptId, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 切换账套 | |||||
export function changeBook (query) { | |||||
return request({ | |||||
url: '/system/user/changeBook', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 切换部门 | |||||
export function changeDept (query) { | |||||
return request({ | |||||
url: '/system/user/changeDept', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
//右上代办事项闹铃-通用级 | |||||
export function noticeCount (businessOwnership) { | |||||
return request({ | |||||
url: '/home/notice/count/' + businessOwnership, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
//右上 帮助中心 | |||||
export function systemModel (query) { | |||||
return request({ | |||||
url: '/home/system/model/' + query, | |||||
method: 'get', | |||||
// params: query | |||||
}) | |||||
} | |||||
//查询账套权限列表 | |||||
export function systemBookList (query) { | |||||
return request({ | |||||
url: '/system/book/list', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
//提交账套权限 | |||||
export function bookDept (data) { | |||||
return request({ | |||||
url: '/system/book/add', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 根据deptId查询所在区县 | |||||
export function getCountyInfoByDeptId (deptId) { | |||||
return request({ | |||||
url: '/system/dept/getCountyInfoByDeptId/' + deptId, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 根据deptId查询所在乡镇 | |||||
export function getTownInfoByDeptId (deptId) { | |||||
return request({ | |||||
url: '/system/dept/getTownInfoByDeptId/' + deptId, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 更新所有部门的坐标信息 | |||||
export function coordinatesUpdate () { | |||||
return request({ | |||||
url: '/system/dept/coordinatesUpdate', | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 获取当前部门的信息 | |||||
export function getCurrentDept () { | |||||
return request({ | |||||
url: '/system/dept/get/current', | |||||
method: 'get', | |||||
}) | |||||
} |
@@ -0,0 +1,70 @@ | |||||
import request from '@/utils/request' | |||||
// 查询字典数据列表 | |||||
export function listData(query) { | |||||
return request({ | |||||
url: '/system/dict/data/list', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 查询字典数据详细 | |||||
export function getData(dictCode) { | |||||
return request({ | |||||
url: '/system/dict/data/get/' + dictCode, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 根据字典类型查询字典数据信息 | |||||
export function getDicts(dictType) { | |||||
return request({ | |||||
url: '/system/dict/data/type/' + dictType, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 新增字典数据 | |||||
export function addData(data) { | |||||
return request({ | |||||
url: '/system/dict/data/add', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 修改字典数据 | |||||
export function updateData(data) { | |||||
return request({ | |||||
url: '/system/dict/data/edit', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 删除字典数据 | |||||
export function delData(dictCode) { | |||||
return request({ | |||||
url: '/system/dict/data/remove/' + dictCode, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 导出字典数据 | |||||
export function exportData(query) { | |||||
return request({ | |||||
url: '/system/dict/data/export', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 启用/禁用 | |||||
export function setDictDataStatus(id, status) { | |||||
return request({ | |||||
url: `/system/dict/data/setStatus/${id}`, | |||||
method: 'post', | |||||
params: { status } | |||||
}) | |||||
} |
@@ -0,0 +1,77 @@ | |||||
import request from '@/utils/request' | |||||
// 查询字典类型列表 | |||||
export function listType(query) { | |||||
return request({ | |||||
url: '/system/dict/type/list', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 查询字典类型详细 | |||||
export function getType(dictId) { | |||||
return request({ | |||||
url: '/system/dict/type/get/' + dictId, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 新增字典类型 | |||||
export function addType(data) { | |||||
return request({ | |||||
url: '/system/dict/type/add', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 修改字典类型 | |||||
export function updateType(data) { | |||||
return request({ | |||||
url: '/system/dict/type/edit', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 删除字典类型 | |||||
export function delType(dictId) { | |||||
return request({ | |||||
url: '/system/dict/type/remove/' + dictId, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 清理参数缓存 | |||||
export function clearCache() { | |||||
return request({ | |||||
url: '/system/dict/type/clearCache', | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 导出字典类型 | |||||
export function exportType(query) { | |||||
return request({ | |||||
url: '/system/dict/type/export', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 获取字典选择框列表 | |||||
export function optionselect() { | |||||
return request({ | |||||
url: '/system/dict/type/optionselect', | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 刷新参数缓存 | |||||
export function refreshCache() { | |||||
return request({ | |||||
url: '/system/dict/type/refreshCache', | |||||
method: 'get' | |||||
}) | |||||
} |
@@ -0,0 +1,81 @@ | |||||
import request from '@/utils/request' | |||||
// 查询树状字典列表 | |||||
export function listDicttree(query) { | |||||
return request({ | |||||
url: '/system/dicttree/list', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 导出树状字典 | |||||
export function exportDicttree(query) { | |||||
return request({ | |||||
url: '/system/dicttree/export', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 查询树状字典详细 | |||||
export function getDicttree(id) { | |||||
return request({ | |||||
url: '/system/dicttree/get/' + id, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 新增树状字典 | |||||
export function addDicttree(data) { | |||||
return request({ | |||||
url: '/system/dicttree/add', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 修改树状字典 | |||||
export function updateDicttree(data) { | |||||
return request({ | |||||
url: '/system/dicttree/edit', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 删除树状字典 | |||||
export function delDicttree(id) { | |||||
return request({ | |||||
url: '/system/dicttree/remove/' + id, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 查询树状字典列表(树) | |||||
export function tree(query) { | |||||
return request({ | |||||
url: '/system/dicttree/tree', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 查询单个树状字典详细(树) | |||||
export function dictClassTree(dictClass) { | |||||
return request({ | |||||
url: '/system/dicttree/dictClassTree/' + dictClass, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 查询单个树状字典详细(列表) | |||||
export function dictClassList(dictClass, query) { | |||||
let q = query ? JSON.parse(JSON.stringify(query)) : {}; | |||||
q.dictClass = dictClass; | |||||
return request({ | |||||
url: '/system/dicttree/list', | |||||
method: 'get', | |||||
params: q | |||||
}) | |||||
} |
@@ -0,0 +1,53 @@ | |||||
import request from '@/utils/request' | |||||
// 查询导入执行状态列表 | |||||
export function listImport(query) { | |||||
return request({ | |||||
url: '/system/import/list', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 查询导入执行状态详细 | |||||
export function getImport(id) { | |||||
return request({ | |||||
url: '/system/import/get/' + id, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 新增导入执行状态 | |||||
export function addImport(data) { | |||||
return request({ | |||||
url: '/system/import/add', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 修改导入执行状态 | |||||
export function updateImport(data) { | |||||
return request({ | |||||
url: '/system/import/edit', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 删除导入执行状态 | |||||
export function delImport(id) { | |||||
return request({ | |||||
url: '/system/import/remove/' + id, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 导出导入执行状态 | |||||
export function exportImport(query) { | |||||
return request({ | |||||
url: '/system/import/export', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} |
@@ -0,0 +1,53 @@ | |||||
import request from '@/utils/request' | |||||
// 查询导入错误明细列表 | |||||
export function listImportDetail(query) { | |||||
return request({ | |||||
url: '/system/detail/list', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 查询导入错误明细详细 | |||||
export function getImportDetail(id) { | |||||
return request({ | |||||
url: '/system/detail/get/' + id, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 新增导入错误明细 | |||||
export function addImportDetail(data) { | |||||
return request({ | |||||
url: '/system/detail/add', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 修改导入错误明细 | |||||
export function updateImportDetail(data) { | |||||
return request({ | |||||
url: '/system/detail/edit', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 删除导入错误明细 | |||||
export function delImportDetail(id) { | |||||
return request({ | |||||
url: '/system/detail/remove/' + id, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 导出导入错误明细 | |||||
export function exportImportDetail(query) { | |||||
return request({ | |||||
url: '/system/detail/export', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} |
@@ -0,0 +1,11 @@ | |||||
import request from '@/utils/request' | |||||
import { praseStrEmpty } from "@/utils/ruoyi"; | |||||
// 系统首页 | |||||
export function systemIndex(query) { | |||||
return request({ | |||||
url: '/system/index/statistics', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} |
@@ -0,0 +1,60 @@ | |||||
import request from '@/utils/request' | |||||
// 查询菜单列表 | |||||
export function listMenu(query) { | |||||
return request({ | |||||
url: '/system/menu/list', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 查询菜单详细 | |||||
export function getMenu(menuId) { | |||||
return request({ | |||||
url: '/system/menu/get/' + menuId, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 查询菜单下拉树结构 | |||||
export function treeselect() { | |||||
return request({ | |||||
url: '/system/menu/treeselect', | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 根据角色ID查询菜单下拉树结构 | |||||
export function roleMenuTreeselect(roleId) { | |||||
return request({ | |||||
url: '/system/menu/roleMenuTreeselect/' + roleId, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 新增菜单 | |||||
export function addMenu(data) { | |||||
return request({ | |||||
url: '/system/menu/add', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 修改菜单 | |||||
export function updateMenu(data) { | |||||
return request({ | |||||
url: '/system/menu/edit', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 删除菜单 | |||||
export function delMenu(menuId) { | |||||
return request({ | |||||
url: '/system/menu/remove/' + menuId, | |||||
method: 'get' | |||||
}) | |||||
} |
@@ -0,0 +1,89 @@ | |||||
import request from '@/utils/request' | |||||
// 查询手机菜单列表 | |||||
export function listMobile(query) { | |||||
return request({ | |||||
url: '/system/mobile/list', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 导出手机菜单 | |||||
export function exportMobile(query) { | |||||
return request({ | |||||
url: '/system/mobile/export', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 查询手机菜单详细 | |||||
export function getMobile(id) { | |||||
return request({ | |||||
url: '/system/mobile/get/' + id, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 新增手机菜单 | |||||
export function addMobile(data) { | |||||
return request({ | |||||
url: '/system/mobile/add', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 修改手机菜单 | |||||
export function updateMobile(data) { | |||||
return request({ | |||||
url: '/system/mobile/edit', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 删除手机菜单 | |||||
export function delMobile(id) { | |||||
return request({ | |||||
url: '/system/mobile/remove/' + id, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 编辑角色 | |||||
export function setupMobileRoles(id, data) { | |||||
return request({ | |||||
url: '/system/mobile/setupRoles/' + id, | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 获取角色 | |||||
export function getMobileRoles(id) { | |||||
return request({ | |||||
url: '/system/mobile/getRoles/' + id, | |||||
method: 'get', | |||||
}) | |||||
} | |||||
// 获取菜单 | |||||
export function getMobileMenus(query) { | |||||
return request({ | |||||
url: '/system/mobile/menus', | |||||
method: 'get', | |||||
params: query, | |||||
}) | |||||
} | |||||
// 启用/禁用 | |||||
export function setMobileStatus(id, status) { | |||||
return request({ | |||||
url: `/system/mobile/setStatus/${id}`, | |||||
method: 'post', | |||||
params: { status } | |||||
}) | |||||
} | |||||
@@ -0,0 +1,63 @@ | |||||
import request from '@/utils/request' | |||||
// 查询模块配置列表 | |||||
export function listModel(query) { | |||||
return request({ | |||||
url: '/system/model/list', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 导出模块配置 | |||||
export function exportModel(query) { | |||||
return request({ | |||||
url: '/system/model/export', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 查询模块配置详细 | |||||
export function getModel(id) { | |||||
return request({ | |||||
url: '/system/model/get/' + id, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 新增模块配置 | |||||
export function addModel(data) { | |||||
return request({ | |||||
url: '/system/model/add', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 修改模块配置 | |||||
export function updateModel(data) { | |||||
return request({ | |||||
url: '/system/model/edit', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 删除模块配置 | |||||
export function delModel(id) { | |||||
return request({ | |||||
url: '/system/model/remove/' + id, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 启用/禁用 | |||||
export function setModelStatus(id, status) { | |||||
return request({ | |||||
url: `/system/model/setStatus/${id}`, | |||||
method: 'post', | |||||
params: { status } | |||||
}) | |||||
} | |||||
@@ -0,0 +1,61 @@ | |||||
import request from '@/utils/request' | |||||
/*// 查询统一通知列表 | |||||
export function listUnifiedNotice() { | |||||
return request({ | |||||
url: '/system/notice/unifiedNoticeList', | |||||
method: 'get' | |||||
}) | |||||
}*/ | |||||
// 查询通知公告列表 | |||||
export function listNotice(query) { | |||||
return request({ | |||||
url: '/system/notice/list', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 导出通知公告 | |||||
export function exportNotice(query) { | |||||
return request({ | |||||
url: '/system/notice/export', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 查询通知公告详细 | |||||
export function getNotice(noticeId) { | |||||
return request({ | |||||
url: '/system/notice/get/' + noticeId, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 新增通知公告 | |||||
export function addNotice(data) { | |||||
return request({ | |||||
url: '/system/notice/add', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 修改通知公告 | |||||
export function updateNotice(data) { | |||||
return request({ | |||||
url: '/system/notice/edit', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 删除通知公告 | |||||
export function delNotice(noticeId) { | |||||
return request({ | |||||
url: '/system/notice/remove/' + noticeId, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
@@ -0,0 +1,53 @@ | |||||
import request from '@/utils/request' | |||||
// 查询通讯录列表 | |||||
export function listPhones(query) { | |||||
return request({ | |||||
url: '/system/phones/list', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 查询通讯录详细 | |||||
export function getPhones(id) { | |||||
return request({ | |||||
url: '/system/phones/get/' + id, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 新增通讯录 | |||||
export function addPhones(data) { | |||||
return request({ | |||||
url: '/system/phones/add', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 修改通讯录 | |||||
export function updatePhones(data) { | |||||
return request({ | |||||
url: '/system/phones/edit', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 删除通讯录 | |||||
export function delPhones(id) { | |||||
return request({ | |||||
url: '/system/phones/remove/' + id, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 导出通讯录 | |||||
export function exportPhones(query) { | |||||
return request({ | |||||
url: '/system/phones/export', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} |
@@ -0,0 +1,53 @@ | |||||
import request from '@/utils/request' | |||||
// 查询岗位列表 | |||||
export function listPost(query) { | |||||
return request({ | |||||
url: '/system/post/list', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 查询岗位详细 | |||||
export function getPost(postId) { | |||||
return request({ | |||||
url: '/system/post/get/' + postId, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 新增岗位 | |||||
export function addPost(data) { | |||||
return request({ | |||||
url: '/system/post/add', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 修改岗位 | |||||
export function updatePost(data) { | |||||
return request({ | |||||
url: '/system/post/edit', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 删除岗位 | |||||
export function delPost(postId) { | |||||
return request({ | |||||
url: '/system/post/remove/' + postId, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 导出岗位 | |||||
export function exportPost(query) { | |||||
return request({ | |||||
url: '/system/post/export', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} |
@@ -0,0 +1,92 @@ | |||||
import request from '@/utils/request' | |||||
// 查询角色列表 | |||||
export function listRole(query) { | |||||
return request({ | |||||
url: '/system/role/list', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 查询角色详细 | |||||
export function getRole(roleId) { | |||||
return request({ | |||||
url: '/system/role/get/' + roleId, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 新增角色 | |||||
export function addRole(data) { | |||||
return request({ | |||||
url: '/system/role/add', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 修改角色 | |||||
export function updateRole(data) { | |||||
return request({ | |||||
url: '/system/role/edit', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 角色数据权限 | |||||
export function dataScope(data) { | |||||
return request({ | |||||
url: '/system/role/dataScope', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 角色状态修改 | |||||
export function changeRoleStatus(roleId, status) { | |||||
const data = { | |||||
roleId, | |||||
status | |||||
} | |||||
return request({ | |||||
url: '/system/role/changeStatus', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 删除角色 | |||||
export function delRole(roleId) { | |||||
return request({ | |||||
url: '/system/role/remove/' + roleId, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 导出角色 | |||||
export function exportRole(query) { | |||||
return request({ | |||||
url: '/system/role/export', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 获取手机菜单 | |||||
export function getRoleMobiles(roleId) { | |||||
return request({ | |||||
url: '/system/role/getMobiles/' + roleId, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 编辑手机菜单 | |||||
export function setupRoleMobiles(id, data) { | |||||
return request({ | |||||
url: '/system/role/setupMobiles/' + id, | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} |
@@ -0,0 +1,70 @@ | |||||
import request from '@/utils/request' | |||||
// 查询用章申请列表 | |||||
export function listSeal(query) { | |||||
return request({ | |||||
url: '/service/seal/list', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 查询用章申请详细 | |||||
export function getSeal(id) { | |||||
return request({ | |||||
url: '/service/seal/get/' + id, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 新增用章申请 | |||||
export function addSeal(data) { | |||||
return request({ | |||||
url: '/service/seal/add', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 修改用章申请 | |||||
export function updateSeal(data) { | |||||
return request({ | |||||
url: '/service/seal/edit', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 删除用章申请 | |||||
export function delSeal(id) { | |||||
return request({ | |||||
url: '/service/seal/remove/' + id, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 导出用章申请 | |||||
export function exportSeal(query) { | |||||
return request({ | |||||
url: '/service/seal/export', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 模糊查询权利人列表 | |||||
export function checkMemberInformation(query) { | |||||
return request({ | |||||
url: '/service/farmer/queryListByName/', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 查询用章申请列表 | |||||
export function listsSeal(query) { | |||||
return request({ | |||||
url: '/service/seal/lists', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} |
@@ -0,0 +1,159 @@ | |||||
import request from '@/utils/request' | |||||
import { praseStrEmpty } from "@/utils/ruoyi"; | |||||
// 查询用户列表 | |||||
export function listUser(query) { | |||||
return request({ | |||||
url: '/system/user/list', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 查询用户列表 | |||||
export function getUserList(query) { | |||||
return request({ | |||||
url: '/system/user/getUserList', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 查询用户列表 | |||||
export function listNoDataScopeUser(query) { | |||||
return request({ | |||||
url: '/system/user/listNoDataScope', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 查询用户详细 | |||||
export function getUser(userId) { | |||||
return request({ | |||||
url: '/system/user/' + praseStrEmpty(userId), | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 新增用户 | |||||
export function addUser(data) { | |||||
return request({ | |||||
url: '/system/user/add', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 修改用户 | |||||
export function updateUser(data) { | |||||
return request({ | |||||
url: '/system/user/edit', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 删除用户 | |||||
export function delUser(userId) { | |||||
return request({ | |||||
url: '/system/user/remove/' + userId, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 导出用户 | |||||
export function exportUser(query) { | |||||
return request({ | |||||
url: '/system/user/export', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 用户密码重置 | |||||
export function resetUserPwd(userId, password) { | |||||
const data = { | |||||
userId, | |||||
password | |||||
} | |||||
return request({ | |||||
url: '/system/user/resetPwd', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 用户状态修改 | |||||
export function changeUserStatus(userId, status) { | |||||
const data = { | |||||
userId, | |||||
status | |||||
} | |||||
return request({ | |||||
url: '/system/user/changeStatus', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 查询用户个人信息 | |||||
export function getUserProfile() { | |||||
return request({ | |||||
url: '/system/user/profile/get', | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 修改用户个人信息 | |||||
export function updateUserProfile(data) { | |||||
return request({ | |||||
url: '/system/user/profile/edit', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 用户密码重置 | |||||
export function updateUserPwd(oldPassword, newPassword) { | |||||
const data = { | |||||
oldPassword, | |||||
newPassword | |||||
} | |||||
return request({ | |||||
url: '/system/user/profile/updatePwd', | |||||
method: 'post', | |||||
params: data | |||||
}) | |||||
} | |||||
// 用户头像上传 | |||||
export function uploadAvatar(data) { | |||||
return request({ | |||||
url: '/system/user/profile/avatar', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 下载用户导入模板 | |||||
export function importTemplate() { | |||||
return request({ | |||||
url: '/system/user/importTemplate', | |||||
method: 'get' | |||||
}) | |||||
} | |||||
//用户上传签字 | |||||
export function electronicSignature(data) { | |||||
return request({ | |||||
url: '/system/user/profile/electronicSignature', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 上报春耕app | |||||
export function chungengSyncUser(userId) { | |||||
return request({ | |||||
url: '/system/user/chungeng/syncUser/' + userId, | |||||
method: 'post', | |||||
}) | |||||
} |
@@ -1,15 +1,15 @@ | |||||
const TokenKey = 'Admin-Token'; | const TokenKey = 'Admin-Token'; | ||||
// 获取token | // 获取token | ||||
export function getToken() { | |||||
return localStorage.getItem(TokenKey); // 将token保存在本地 | |||||
export function getToken () { | |||||
return 'eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6ImM0MDZkM2Q0LTM5N2UtNGRjMi1hMDIyLTEzY2UwZGZkMDA3OCJ9.X2CyaATOQ8S811oh5uMWpD5WHeJ3Meya5E7TRoEmOukzoZy-U5AwmzRn7UJs_OY8IU3a-DGFZNZc---Vh336UQ'; // 将token保存在本地 | |||||
} | } | ||||
// 保存token | // 保存token | ||||
export function setToken(token) { | |||||
export function setToken (token) { | |||||
return localStorage.setItem(TokenKey, token); // 将token保存在本地 | return localStorage.setItem(TokenKey, token); // 将token保存在本地 | ||||
} | } | ||||
// 删除token | // 删除token | ||||
export function removeToken() { | |||||
return localStorage.removeItem(TokenKey); | |||||
export function removeToken () { | |||||
return localStorage.removeItem(TokenKey); | |||||
} | } |
@@ -0,0 +1,6 @@ | |||||
export default { | |||||
'401': '认证失败,无法访问系统资源', | |||||
'403': '当前操作没有权限', | |||||
'404': '访问资源不存在', | |||||
'default': '系统未知错误,请反馈给管理员' | |||||
} |
@@ -44,16 +44,11 @@ class GisUtils { | |||||
map = null; | map = null; | ||||
overLayer = null; | overLayer = null; | ||||
instance = null; | instance = null; | ||||
textName = { | |||||
}; | |||||
// 构造一个广为人知的接口,供用户对该类进行实例化 | |||||
static getInstance () { | |||||
if (!this.instance) { | |||||
this.instance = new GisUtils(name); | |||||
} | |||||
return this.instance; | |||||
constructor(domId) { | |||||
this.getMap(domId) | |||||
return this | |||||
} | } | ||||
/** | /** | ||||
* 获取一个地图容器 | * 获取一个地图容器 | ||||
@@ -1,74 +1,114 @@ | |||||
import axios from 'axios'; | |||||
import { Message } from 'element-ui'; | |||||
import store from '../store'; | |||||
import { getToken } from '@/utils/auth'; | |||||
import router from '@/router/index'; | |||||
import axios from 'axios' | |||||
import { Notification, MessageBox, Message } from 'element-ui' | |||||
import store from '@/store' | |||||
import { getToken } from '@/utils/auth' | |||||
import errorCode from '@/utils/errorCode' | |||||
axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8' | |||||
// 创建axios实例 | // 创建axios实例 | ||||
const service = axios.create({ | const service = axios.create({ | ||||
baseURL: process.env.BASE_API, // api 的 base_url | |||||
timeout: 1000 * 5 * 60 // 请求超时时间 | |||||
}); | |||||
// axios中请求配置有baseURL选项,表示请求URL公共部分 | |||||
baseURL: process.env.VUE_APP_BASE_API, | |||||
// 超时 60秒 | |||||
timeout: 120000 | |||||
}) | |||||
// request拦截器 | // request拦截器 | ||||
service.interceptors.request.use( | |||||
config => { | |||||
if (getToken()) { | |||||
config.headers['authorization'] = getToken(); // 让每个请求携带自定义token 请根据实际情况自行修改 | |||||
service.interceptors.request.use(config => { | |||||
// 是否需要设置 token | |||||
const isToken = (config.headers || {}).isToken === false | |||||
if (getToken() && !isToken) { | |||||
config.headers['Authorization'] = 'Bearer ' + getToken() // 让每个请求携带自定义token 请根据实际情况自行修改 | |||||
} | |||||
// get请求映射params参数 | |||||
if (config.method === 'get' && config.params) { | |||||
let url = config.url + '?'; | |||||
for (const propName of Object.keys(config.params)) { | |||||
const value = config.params[propName]; | |||||
var part = encodeURIComponent(propName) + "="; | |||||
if (value !== null && typeof (value) !== "undefined") { | |||||
if (typeof value === 'object') { | |||||
for (const key of Object.keys(value)) { | |||||
let params = propName + '[' + key + ']'; | |||||
var subPart = encodeURIComponent(params) + "="; | |||||
url += subPart + encodeURIComponent(value[key]) + "&"; | |||||
} | |||||
} else { | |||||
url += part + encodeURIComponent(value) + "&"; | |||||
} | |||||
} | |||||
} | } | ||||
// config.headers['Authorization'] = 'Basic ' + btoa('admin:/UhQ28VFomqWr3qL9') // 使用你的用户名和密码进行Base64编码 | |||||
return config; | |||||
}, | |||||
error => { | |||||
// Do something with request error | |||||
console.log(error); // for debug | |||||
Promise.reject(error); | |||||
url = url.slice(0, -1); | |||||
config.params = {}; | |||||
config.url = url; | |||||
} | } | ||||
); | |||||
// response 拦截器 | |||||
service.interceptors.response.use( | |||||
response => { | |||||
/** | |||||
* code为非20000是抛错 可结合自己业务进行修改 | |||||
*/ | |||||
const res = response.data; | |||||
if (response.status === 200) { | |||||
let data = response.data; | |||||
if (data.hasOwnProperty('code') && data.code === 401) { | |||||
return config | |||||
}, error => { | |||||
//console.log(error) | |||||
Promise.reject(error) | |||||
}) | |||||
Message({ | |||||
message: '请重新登录', | |||||
type: 'error', | |||||
duration: 5 * 1000 | |||||
}); | |||||
store.commit('RESET_LOGIN_INFO'); | |||||
router.replace('/login'); | |||||
} else { | |||||
return response.data; | |||||
// 响应拦截器 | |||||
service.interceptors.response.use(res => { | |||||
// 未设置状态码则默认成功状态 | |||||
try { | |||||
const code = res.data.code || 200; | |||||
// 获取错误信息 | |||||
const msg = errorCode[code] || res.data.msg || errorCode['default'] | |||||
if (code === 401) { | |||||
MessageBox.confirm('登录状态已过期,请重新登录', '系统提示', { | |||||
confirmButtonText: '重新登录', | |||||
cancelButtonText: '取消', | |||||
type: 'warning' | |||||
} | } | ||||
).then(() => { | |||||
store.dispatch('LogOut').then(() => { | |||||
location.href = '/index'; | |||||
}) | |||||
}) | |||||
} else if (code === 500) { | |||||
Message({ | |||||
message: msg, | |||||
type: 'error' | |||||
}) | |||||
return Promise.reject(new Error(msg)) | |||||
} else if (code === 601) { | |||||
Message({ | |||||
message: msg, | |||||
type: 'warning' | |||||
}) | |||||
return Promise.reject('error') | |||||
} else if (code !== 200) { | |||||
Notification.error({ | |||||
title: msg | |||||
}) | |||||
return Promise.reject('error') | |||||
} else { | } else { | ||||
if (response.data.code === 401) { | |||||
Message({ | |||||
message: '请重新登录', | |||||
type: 'error', | |||||
duration: 5 * 1000 | |||||
}); | |||||
store.commit('RESET_LOGIN_INFO'); | |||||
router.replace('/login'); | |||||
} | |||||
return res.data | |||||
} | } | ||||
}, | |||||
} catch (e) { | |||||
console.log(e) | |||||
} | |||||
}, | |||||
error => { | error => { | ||||
console.log('err' + error); // for debug | |||||
//console.log('err' + error) | |||||
let { message } = error; | |||||
if (message == "Network Error") { | |||||
message = "后端接口连接异常"; | |||||
} | |||||
else if (message.includes("timeout")) { | |||||
message = "系统接口请求超时"; | |||||
} | |||||
else if (message.includes("Request failed with status code")) { | |||||
message = "系统接口" + message.substr(message.length - 3) + "异常"; | |||||
} | |||||
Message({ | Message({ | ||||
message: error.message, | |||||
message: message, | |||||
type: 'error', | type: 'error', | ||||
duration: 5 * 1000 | duration: 5 * 1000 | ||||
}); | |||||
return Promise.reject(error); | |||||
}) | |||||
return Promise.reject(error) | |||||
} | } | ||||
); | |||||
) | |||||
export default service; | |||||
export default service |
@@ -1,4 +1,4 @@ | |||||
<Pannel> | |||||
<Pannel title="资金支出大额预警排名" height="340"> | |||||
<ScrollTable :headers="headers"></ScrollTable> | |||||
</Pannel> | </Pannel> |
@@ -1,11 +1,13 @@ | |||||
import Pannel from '@/components/pannel/index.vue'; | import Pannel from '@/components/pannel/index.vue'; | ||||
import ScrollTable from '@/components/scroll-table/index.vue'; | |||||
export default { | export default { | ||||
components: { | components: { | ||||
ScrollTable, | |||||
Pannel | Pannel | ||||
}, | }, | ||||
data () { | data () { | ||||
return { | return { | ||||
headers: ['部门名称', '支出金额', '排名'] | |||||
}; | }; | ||||
}, | }, | ||||
created () { | created () { | ||||
@@ -18,7 +18,7 @@ export const comps = { | |||||
'' | '' | ||||
], | ], | ||||
'right': [ | 'right': [ | ||||
'', | |||||
'Right12', | |||||
'', | '', | ||||
'' | '' | ||||
] | ] | ||||
@@ -1,7 +1,7 @@ | |||||
<div class="page"> | |||||
<div class="page" id="map"> | |||||
<Header> | <Header> | ||||
<div slot="left"> | <div slot="left"> | ||||
<Tabs></Tabs> | |||||
<Tabs @change="tabChange"></Tabs> | |||||
</div> | </div> | ||||
</Header> | </Header> | ||||
<!-- 项目初始化 --> | <!-- 项目初始化 --> | ||||
@@ -8,6 +8,13 @@ import Right11 from './comps/right/top/1/index.vue'; | |||||
import Right21 from './comps/right/middle/1/index.vue'; | import Right21 from './comps/right/middle/1/index.vue'; | ||||
import Right31 from './comps/right/bottom/1/index.vue'; | import Right31 from './comps/right/bottom/1/index.vue'; | ||||
import Right12 from './comps/right/top/2/index.vue'; | |||||
import { getConfigKey } from "@/api/system/config"; | |||||
import { getInfo } from "@/api/login"; | |||||
import { treeselect, treeselectByDeptId } from "@/api/system/dept"; | |||||
import GisUnitls from '@/utils/gis.js'; | |||||
import { comps } from './data.js' | import { comps } from './data.js' | ||||
export default { | export default { | ||||
@@ -19,12 +26,22 @@ export default { | |||||
Left31, | Left31, | ||||
Right11, | Right11, | ||||
Right21, | Right21, | ||||
Right31 | |||||
Right31, | |||||
Right12 | |||||
}, | }, | ||||
data () { | data () { | ||||
return { | return { | ||||
tab: '1', | tab: '1', | ||||
comps | |||||
comps, | |||||
map: "", // 地图 | |||||
mapGeoServerUrl: "", // geoserver地址 | |||||
mapBorder: "", // 地图边界 | |||||
deptLayer: "", // 坐标点图层 | |||||
countyBorderLayerName: "", // 区县边界图层名称 | |||||
townBorderLayerName: "", // 乡镇边界图层名称 | |||||
villageBorderLayerName: "", // 村边界图层名称 | |||||
groupBorderLayerName: "", // 组边界图层名称 | |||||
addrOptions: [], | |||||
}; | }; | ||||
}, | }, | ||||
computed: { | computed: { | ||||
@@ -35,7 +52,56 @@ export default { | |||||
created () { | created () { | ||||
}, | }, | ||||
mounted () { | mounted () { | ||||
// 获取geoserver的地址 | |||||
this.getGeoServerUrl(); | |||||
getInfo().then(res => { | |||||
// this.getData(); | |||||
treeselectByDeptId({ deptId: res.user.deptId }).then((resp) => { | |||||
this.addrOptions = resp.data; | |||||
// 初始化地图 | |||||
this.initMap(); | |||||
}); | |||||
}); | |||||
}, | }, | ||||
methods: { | methods: { | ||||
tabChange (info) { | |||||
this.tab = info.id; | |||||
}, | |||||
// 初始化地图 | |||||
initMap () { | |||||
let dept = this.addrOptions[0]; | |||||
let mapCenterLocation; | |||||
if (dept.lng && dept.lat) { | |||||
mapCenterLocation = [dept.lng, dept.lat]; | |||||
} else { | |||||
mapCenterLocation = [116.391461, 39.902359]; | |||||
} | |||||
let gis = new GisUnitls('map') | |||||
}, | |||||
// 获取geoserver的地址 | |||||
getGeoServerUrl () { | |||||
// 获取geoserver的地址 | |||||
getConfigKey("system.geoServer.url").then(response => { | |||||
this.mapGeoServerUrl = response.msg; | |||||
}); | |||||
// 获取区县边界图层名称 | |||||
getConfigKey("geoserver.layer.countyBorder").then(response => { | |||||
this.countyBorderLayerName = response.msg; | |||||
}); | |||||
// 获取乡镇边界的图层名称 | |||||
getConfigKey("geoserver.layer.townBorder").then(response => { | |||||
this.townBorderLayerName = response.msg; | |||||
}); | |||||
// 获取村边界的图层名称 | |||||
getConfigKey("geoserver.layer.villageBorder").then(response => { | |||||
this.villageBorderLayerName = response.msg; | |||||
}); | |||||
// 获取组边界的图层名称 | |||||
getConfigKey("geoserver.layer.groupBorder").then(response => { | |||||
this.groupBorderLayerName = response.msg; | |||||
}); | |||||
} | |||||
} | } | ||||
}; | }; |
@@ -15,10 +15,9 @@ module.exports = { | |||||
disableHostCheck: true, | disableHostCheck: true, | ||||
proxy: { | proxy: { | ||||
'/api': { | '/api': { | ||||
// target: 'http://test.credit.country.jilin.expo.loan.cacfintech.com', | |||||
target: 'http://localhost:37300', | |||||
// target: 'http://192.168.124.142:8090', | |||||
logLevel: 'debug', | |||||
// target: `http://localhost:8080/`, // 本地开发环境 | |||||
target: `http://218.59.175.43:92`, // 内网测试环境 | |||||
// target: `http://116.255.223.226:8082/nsgk_test/`, // 公网测试环境 | |||||
changeOrigin: true, | changeOrigin: true, | ||||
onProxyReq: function (proxyReq, req) { | onProxyReq: function (proxyReq, req) { | ||||
console.log( | console.log( | ||||