清理多余代码
This commit is contained in:
@@ -1,102 +1,26 @@
|
||||
import { getAction, deleteAction, putAction, postAction, httpAction } from '@/api/manage'
|
||||
import Vue from 'vue'
|
||||
import {UI_CACHE_DB_DICT_DATA } from "@/store/mutation-types"
|
||||
|
||||
//首页统计
|
||||
const getBuyAndSaleStatistics = (params)=>getAction("/depotHead/getBuyAndSaleStatistics",params);
|
||||
const buyOrSalePrice = (params)=>getAction("/depotItem/buyOrSalePrice",params);
|
||||
|
||||
//租户管理
|
||||
const checkTenant = (params)=>getAction("/tenant/checkIsNameExist",params);
|
||||
const editTenant = (params)=>putAction("/tenant/update",params);
|
||||
|
||||
//角色管理
|
||||
const addRole = (params)=>postAction("/role/add",params);
|
||||
const editRole = (params)=>putAction("/role/update",params);
|
||||
const checkRole = (params)=>getAction("/role/checkIsNameExist",params);
|
||||
const findUserRole = (params)=>getAction("/role/findUserRole",params);
|
||||
const queryall = (params)=>getAction("/sys/role/queryall",params);
|
||||
|
||||
const roleAllList = (params)=>getAction("/role/allList",params);
|
||||
//用户管理
|
||||
const registerUser = (params)=>postAction("/user/registerUser",params);
|
||||
const addUser = (params)=>postAction("/user/addUser",params);
|
||||
const editUser = (params)=>putAction("/user/updateUser",params);
|
||||
const getUserList = (params)=>getAction("/user/getUserList",params);
|
||||
//验证用户是否存在
|
||||
const checkOnlyUser = (params)=>getAction("/sys/user/checkOnlyUser",params);
|
||||
//改变密码
|
||||
const changePassword = (params)=>putAction("/sys/user/changePassword",params);
|
||||
|
||||
//权限管理
|
||||
const addPermission= (params)=>postAction("/sys/permission/add",params);
|
||||
const editPermission= (params)=>putAction("/sys/permission/edit",params);
|
||||
const getPermissionList = (params)=>getAction("/sys/permission/list",params);
|
||||
const getSystemMenuList = (params)=>getAction("/sys/permission/getSystemMenuList",params);
|
||||
const getSystemSubmenu = (params)=>getAction("/sys/permission/getSystemSubmenu",params);
|
||||
const getSystemSubmenuBatch = (params) => getAction('/sys/permission/getSystemSubmenuBatch', params)
|
||||
|
||||
const queryTreeList = (params)=>getAction("/sys/permission/queryTreeList",params);
|
||||
const queryTreeListForRole = (params)=>getAction("/sys/role/queryTreeList",params);
|
||||
const queryListAsync = (params)=>getAction("/sys/permission/queryListAsync",params);
|
||||
const queryRolePermission = (params)=>getAction("/sys/permission/queryRolePermission",params);
|
||||
const saveRolePermission = (params)=>postAction("/sys/permission/saveRolePermission",params);
|
||||
const queryPermissionsByUser = (params)=>postAction("/function/findMenuByPNumber",params);
|
||||
const loadAllRoleIds = (params)=>getAction("/sys/permission/loadAllRoleIds",params);
|
||||
const getPermissionRuleList = (params)=>getAction("/sys/permission/getPermRuleListByPermId",params);
|
||||
const queryPermissionRule = (params)=>getAction("/sys/permission/queryPermissionRule",params);
|
||||
|
||||
//机构管理
|
||||
const queryOrganizationTreeList = (params)=>getAction("/organization/getOrganizationTree",params);
|
||||
const queryOrganizationById = (params)=>getAction("/organization/findById",params);
|
||||
const checkOrganization = (params)=>getAction("/organization/checkIsNameExist",params);
|
||||
const queryParentName = (params)=>getAction("/sys/sysDepart/queryParentName",params);
|
||||
const searchByKeywords = (params)=>getAction("/sys/sysDepart/searchBy",params);
|
||||
const deleteByDepartId = (params)=>deleteAction("/sys/sysDepart/delete",params);
|
||||
|
||||
//二级部门管理
|
||||
const queryDepartPermission = (params)=>getAction("/sys/permission/queryDepartPermission",params);
|
||||
const saveDepartPermission = (params)=>postAction("/sys/permission/saveDepartPermission",params);
|
||||
const queryTreeListForDeptRole = (params)=>getAction("/sys/sysDepartPermission/queryTreeListForDeptRole",params);
|
||||
const queryDeptRolePermission = (params)=>getAction("/sys/sysDepartPermission/queryDeptRolePermission",params);
|
||||
const saveDeptRolePermission = (params)=>postAction("/sys/sysDepartPermission/saveDeptRolePermission",params);
|
||||
const queryMyDepartTreeList = (params)=>getAction("/sys/sysDepart/queryMyDeptTreeList",params);
|
||||
|
||||
//日志管理
|
||||
const deleteLog = (params)=>deleteAction("/sys/log/delete",params);
|
||||
const deleteLogList = (params)=>deleteAction("/sys/log/deleteBatch",params);
|
||||
|
||||
//数据字典
|
||||
const addDict = (params)=>postAction("/sys/dict/add",params);
|
||||
const editDict = (params)=>putAction("/sys/dict/edit",params);
|
||||
const treeList = (params)=>getAction("/sys/dict/treeList",params);
|
||||
const addDictItem = (params)=>postAction("/sys/dictItem/add",params);
|
||||
const editDictItem = (params)=>putAction("/sys/dictItem/edit",params);
|
||||
|
||||
//字典标签专用(通过code获取字典数组)
|
||||
export const ajaxGetDictItems = (code, params)=>getAction(`/systemConfig/getDictItems/${code}`,params);
|
||||
//从缓存中获取字典配置
|
||||
function getDictItemsFromCache(dictCode) {
|
||||
if (Vue.ls.get(UI_CACHE_DB_DICT_DATA) && Vue.ls.get(UI_CACHE_DB_DICT_DATA)[dictCode]) {
|
||||
let dictItems = Vue.ls.get(UI_CACHE_DB_DICT_DATA)[dictCode];
|
||||
console.log("-----------getDictItemsFromCache----------dictCode="+dictCode+"---- dictItems=",dictItems)
|
||||
return dictItems;
|
||||
}
|
||||
}
|
||||
|
||||
//系统通告
|
||||
const doReleaseData = (params)=>getAction("/sys/annountCement/doReleaseData",params);
|
||||
const doReovkeData = (params)=>getAction("/sys/annountCement/doReovkeData",params);
|
||||
|
||||
// 根据部门主键查询用户信息
|
||||
const queryUserByDepId = (params)=>getAction("/sys/user/queryUserByDepId",params);
|
||||
// 重复校验
|
||||
const duplicateCheck = (params)=>getAction("/sys/duplicate/check",params);
|
||||
// 加载分类字典
|
||||
const loadCategoryData = (params)=>getAction("/sys/category/loadAllData",params);
|
||||
const checkRuleByCode = (params) => getAction('/sys/checkRule/checkByCode', params)
|
||||
//我的通告
|
||||
const getUserNoticeInfo= (params)=>getAction("/sys/sysAnnouncementSend/getMyAnnouncementSend",params);
|
||||
|
||||
//经手人管理
|
||||
const addPerson = (params)=>postAction("/person/add",params);
|
||||
const editPerson = (params)=>putAction("/person/update",params);
|
||||
@@ -181,56 +105,15 @@ export {
|
||||
addRole,
|
||||
editRole,
|
||||
checkRole,
|
||||
findUserRole,
|
||||
roleAllList,
|
||||
registerUser,
|
||||
addUser,
|
||||
editUser,
|
||||
getUserList,
|
||||
queryall,
|
||||
checkOnlyUser,
|
||||
changePassword,
|
||||
getPermissionList,
|
||||
addPermission,
|
||||
editPermission,
|
||||
queryTreeList,
|
||||
queryListAsync,
|
||||
queryRolePermission,
|
||||
saveRolePermission,
|
||||
queryPermissionsByUser,
|
||||
loadAllRoleIds,
|
||||
getPermissionRuleList,
|
||||
queryPermissionRule,
|
||||
queryOrganizationTreeList,
|
||||
queryOrganizationById,
|
||||
checkOrganization,
|
||||
queryParentName,
|
||||
searchByKeywords,
|
||||
deleteByDepartId,
|
||||
deleteLog,
|
||||
deleteLogList,
|
||||
addDict,
|
||||
editDict,
|
||||
treeList,
|
||||
addDictItem,
|
||||
editDictItem,
|
||||
doReleaseData,
|
||||
doReovkeData,
|
||||
queryUserByDepId,
|
||||
duplicateCheck,
|
||||
queryTreeListForRole,
|
||||
getSystemMenuList,
|
||||
getSystemSubmenu,
|
||||
getSystemSubmenuBatch,
|
||||
loadCategoryData,
|
||||
checkRuleByCode,
|
||||
queryDepartPermission,
|
||||
saveDepartPermission,
|
||||
queryTreeListForDeptRole,
|
||||
queryDeptRolePermission,
|
||||
saveDeptRolePermission,
|
||||
queryMyDepartTreeList,
|
||||
getUserNoticeInfo,
|
||||
getDictItemsFromCache,
|
||||
addPerson,
|
||||
editPerson,
|
||||
checkPerson,
|
||||
|
||||
@@ -85,14 +85,6 @@ service.interceptors.request.use(config => {
|
||||
if (token) {
|
||||
config.headers[ 'X-Access-Token' ] = token // 让每个请求携带自定义 token 请根据实际情况自行修改
|
||||
}
|
||||
if(config.method=='get'){
|
||||
if(config.url.indexOf("systemConfig/getDictItems")<0){
|
||||
config.params = {
|
||||
_t: Date.parse(new Date())/1000,
|
||||
...config.params
|
||||
}
|
||||
}
|
||||
}
|
||||
return config
|
||||
},(error) => {
|
||||
return Promise.reject(error)
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="角色">
|
||||
<a-select v-if="model.roleName!='租户'" placeholder="选择角色" v-decorator="[ 'roleId' ]" :dropdownMatchSelectWidth="false">
|
||||
<a-select-option v-for="(item,index) in roleList" :key="index" :value="item.id">
|
||||
{{ item.text }}
|
||||
{{ item.name }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
<a-col v-if="model.roleName=='租户'"><a-row>租户</a-row></a-col>
|
||||
@@ -61,7 +61,7 @@
|
||||
import JSelectPosition from '@/components/jeecgbiz/JSelectPosition'
|
||||
import { ACCESS_TOKEN } from "@/store/mutation-types"
|
||||
import { getAction } from '@/api/manage'
|
||||
import {addUser,editUser,queryOrganizationTreeList,findUserRole} from '@/api/api'
|
||||
import {addUser,editUser,queryOrganizationTreeList,roleAllList} from '@/api/api'
|
||||
import { disabledAuthFilter } from "@/utils/authFilter"
|
||||
import {duplicateCheck } from '@/api/api'
|
||||
import JImageUpload from '../../../components/jeecg/JImageUpload'
|
||||
@@ -178,14 +178,9 @@
|
||||
})
|
||||
},
|
||||
loadRoleData(){
|
||||
let that = this;
|
||||
let params = {
|
||||
'UBType': 'UserRole',
|
||||
'UBKeyId': ''
|
||||
};
|
||||
findUserRole(params).then((res)=>{
|
||||
roleAllList({}).then((res)=>{
|
||||
if(res){
|
||||
that.roleList = res
|
||||
this.roleList = res
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user