接入系统公司、部门、角色接口

This commit is contained in:
龙运模 2024-07-06 17:00:41 +08:00
parent 0bb1d10f4b
commit 6e01d7c891
37 changed files with 1336 additions and 258 deletions

View File

@ -2,7 +2,7 @@
NODE_ENV = development
# 标题
VUE_APP_TITLE = 德木测试
VUE_APP_TITLE = 隆姿集团
# 象纬云科
# 接口地址

View File

@ -9,4 +9,67 @@ export default {
return await http.post(this.url, data);
},
},
phoneLogin: {
url: `${config.API_URL}/mobile.login`,
name: "手机验证码登录获取TOKEN",
post: async function (data = {}) {
return await http.post(this.url, data);
},
},
wechatLogin:{
url: `${config.API_URL}/open.platform.oauth.login`,
name: "微信扫码登录",
post: async function (params) {
return await http.post(this.url, params);
},
},
wechatCode:{
url: `${config.API_URL}/open.platform.scan.code`,
name: "获取微信扫码二维码",
post: async function (params) {
return await http.post(this.url, params);
},
},
bindWechat:{
url: `${config.API_URL}/official.qrcode`,
name: "微信绑定获取二维码地址",
post: async function (params) {
return await http.post(this.url, params);
},
},
dingTalkLogin:{
url: `${config.API_URL}/ding.app.login.scan.code`,
name: "钉钉扫码登录",
post: async function (params) {
return await http.post(this.url, params);
},
},
dingTalkCode:{
url: `${config.API_URL}/ding.app.login.scan.url`,
name: "钉钉登录二维码地址",
post: async function (params) {
return await http.post(this.url, params);
},
},
bindDingTalk:{
url: `${config.API_URL}/ding.app.login.scan.url.bind`,
name: "获取钉钉绑定二维码地址",
post: async function (params) {
return await http.post(this.url, params);
},
},
bindDingTalkUser:{
url: `${config.API_URL}/ding.app.bind.user`,
name: "钉钉绑定用户",
post: async function (params) {
return await http.post(this.url, params);
},
},
unbindUser:{
url: `${config.API_URL}/unbind.user`,
name: "解除绑定",
post: async function (params) {
return await http.post(this.url, params);
},
},
};

View File

@ -8,5 +8,12 @@ export default {
post: async function (params) {
return await http.oss(this.url, params);
},
},
status: {
url: `${config.API_URL}/common.active.status.list`,
name: "获取系统禁用启用下拉列表",
post: async function (params) {
return await http.post(this.url, params);
},
}
};

View File

@ -43,30 +43,236 @@ export default {
},
role: {
list: {
url: `${config.API_URL}/system/role/list2`,
url: `${config.API_URL}/roles.list`,
name: "获取角色列表",
get: async function (params) {
return await http.get(this.url, params);
return await http.post(this.url, params);
},
},
add:{
url: `${config.API_URL}/roles.add`,
name: "角色增加",
post: async function (params) {
return await http.post(this.url, params);
},
},
delete:{
url: `${config.API_URL}/roles.delete`,
name: "角色删除",
post: async function (params) {
return await http.post(this.url, params);
},
},
status:{
url: `${config.API_URL}/roles.status`,
name: "角色状态",
post: async function (params) {
return await http.post(this.url, params);
},
},
users:{
url: `${config.API_URL}/roles.users`,
name: "角色成员",
post: async function (params) {
return await http.post(this.url, params);
},
},
removeUser:{
url: `${config.API_URL}/roles.removed.users`,
name: "移除角色成员",
post: async function (params) {
return await http.post(this.url, params);
},
},
addUser:{
url: `${config.API_URL}/roles.add.users`,
name: "添加角色成员",
post: async function (params) {
return await http.post(this.url, params);
},
},
tree:{
url: `${config.API_URL}/roles.dept.tree`,
name: "部门树",
post: async function (params) {
return await http.post(this.url, params);
},
}
},
company:{
list: {
url: `${config.API_URL}/organization.list`,
name: "公司列表",
get: async function (params) {
return await http.post(this.url, params);
},
},
add: {
url: `${config.API_URL}/organization.add`,
name: "公司增加",
post: async function (params) {
return await http.post(this.url, params);
},
},
info: {
url: `${config.API_URL}/organization.info`,
name: "公司详情",
post: async function (params) {
return await http.post(this.url, params);
},
},
status: {
url: `${config.API_URL}/organization.update.status`,
name: "公司状态",
post: async function (params) {
return await http.post(this.url, params);
},
},
delete: {
url: `${config.API_URL}/organization.delete`,
name: "公司删除",
post: async function (params) {
return await http.post(this.url, params);
},
},
select:{
url: `${config.API_URL}/organization.name.list`,
name: "公司下拉选择",
post: async function (params) {
return await http.post(this.url, params);
},
},
typeSelect:{
url: `${config.API_URL}/common.company.type.list`,
name: "公司类型下拉选择",
post: async function (params) {
return await http.post(this.url, params);
},
},
},
dept: {
list: {
url: `${config.API_URL}/system/dept/list`,
url: `${config.API_URL}/dept.list`,
name: "获取部门列表",
get: async function (params) {
return await http.get(this.url, params);
return await http.post(this.url, params);
},
},
add: {
url: `${config.API_URL}/dept.add`,
name: "部门增加",
post: async function (params) {
return await http.post(this.url, params);
},
},
active:{
url: `${config.API_URL}/dept.list.active`,
name: "部门列表启用",
post: async function (params) {
return await http.post(this.url, params);
},
},
delete: {
url: `${config.API_URL}/dept.delete`,
name: "部门删除",
post: async function (params) {
return await http.post(this.url, params);
},
},
info: {
url: `${config.API_URL}/dept.info`,
name: "部门详情",
post: async function (params) {
return await http.post(this.url, params);
},
},
update:{
url: `${config.API_URL}/dept.update`,
name: "部门更新",
post: async function (params) {
return await http.post(this.url, params);
},
},
status:{
url: `${config.API_URL}/dept.update.status`,
name: "部门状态",
post: async function (params) {
return await http.post(this.url, params);
},
}
},
user: {
list: {
url: `${config.API_URL}/system/user/list`,
url: `${config.API_URL}/user.list`,
name: "获取用户列表",
get: async function (params) {
return await http.get(this.url, params);
return await http.post(this.url, params);
},
},
add:{
url: `${config.API_URL}/user.add`,
name: "用户新增",
post: async function (params) {
return await http.post(this.url, params);
},
},
delete:{
url: `${config.API_URL}/user.delete`,
name: "用户删除",
post: async function (params) {
return await http.post(this.url, params);
},
},
status:{
url: `${config.API_URL}/user.status.update`,
name: "用户状态",
post: async function (params) {
return await http.post(this.url, params);
},
},
generateRegistration:{
url: `${config.API_URL}/generate.registration.challenge`,
name: "passKey 创建",
post: async function (params) {
return await http.post(this.url, params);
}
},
verifyResponse:{
url: `${config.API_URL}/verify.registration.response`,
name: "passKey 创建认证",
post: async function (params) {
return await http.post(this.url, params);
}
},
generateAuthentication:{
url: `${config.API_URL}/generate.authentication.challenge`,
name: "passKey登录生成",
post: async function (params) {
return await http.post(this.url, params);
}
},
verifyAuthentication:{
url: `${config.API_URL}/verify.authentication.response`,
name: "passKey 登录认证",
post: async function (params) {
return await http.post(this.url, params);
}
},
publishList:{
url: `${config.API_URL}/publish.key.list`,
name: "passKey 指纹列表",
post: async function (params) {
return await http.post(this.url, params);
}
},
renameAlias:{
url: `${config.API_URL}/rename.alias`,
name: "passKey 指纹重命名",
post: async function (params) {
return await http.post(this.url, params);
}
},
},
app: {
list: {

View File

@ -2,6 +2,13 @@ import config from "@/config";
import http from "@/utils/request";
export default {
verifyCode: {
url: `${config.API_URL}/sms.code.send`,
name: "获取短信验证码",
post: async function (params) {
return await http.post(this.url, params);
}
},
getInfo: {
url: `${config.API_URL}/user.bind.info`,
name: "获取绑定(微信、钉钉)个人中心",
@ -23,6 +30,27 @@ export default {
return await http.post(this.url, params);
},
},
editUser:{
url: `${config.API_URL}/user.update.me`,
name: "修改个人信息",
post: async function (params) {
return await http.post(this.url, params);
},
},
bindMobile:{
url: `${config.API_URL}/user.bind.mobile`,
name: "绑定手机号",
post: async function (params) {
return await http.post(this.url, params);
},
},
editPass:{
url: `${config.API_URL}/user.re.pwd`,
name: "修改个人密码",
post: async function (params) {
return await http.post(this.url, params);
},
},
timeoutConfig:{
url: `${config.API_URL}/system.login.timeout.config`,
name: "登录超时退出配置",

View File

@ -0,0 +1,13 @@
<template>
<svg t="1720159214657" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3703" width="200" height="200"><path d="M512 51.2L102.4 282.168889v452.835555L512 961.422222l409.6-226.417778V282.168889L512 51.2z m351.118222 653.255111l-351.061333 196.437333-351.118222-196.437333V312.718222l351.118222-196.380444 351.061333 196.380444v391.736889z" p-id="3704"></path><path d="M512.113778 480.256h-5.859556l-197.802666-109.226667a30.094222 30.094222 0 0 0-40.96 6.200889 27.648 27.648 0 0 0 6.428444 39.594667h5.290667l202.467555 113.208889v204.913778a27.875556 27.875556 0 0 0 8.533334 20.024888 29.752889 29.752889 0 0 0 41.415111 0 27.875556 27.875556 0 0 0 8.533333-20.024888V533.447111l202.524444-113.208889a28.615111 28.615111 0 0 0 13.994667-15.815111 27.420444 27.420444 0 0 0-1.024-20.821333 28.842667 28.842667 0 0 0-15.416889-14.563556 30.151111 30.151111 0 0 0-21.617778-0.284444h-5.233777l-195.413334 112.64-5.859555-1.137778z" p-id="3705"></path></svg>
</template>
<script>
export default {
name: "AbilityAuthorization"
}
</script>
<style scoped>
</style>

View File

@ -0,0 +1,13 @@
<template>
<svg t="1720159109105" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3561" width="200" height="200"><path d="M920.917333 209.066667v323.811555a415.573333 415.573333 0 0 1-10.865777 119.125334c-40.391111 128.512-142.563556 202.922667-258.616889 259.242666-29.696 13.880889-60.131556 26.282667-91.136 37.205334-13.880889 5.688889-28.330667 10.012444-43.121778 12.970666-18.488889-1.137778-36.636444-5.688889-53.304889-13.368889a879.672889 879.672889 0 0 1-124.529778-53.646222C231.537778 833.991111 143.36 764.814222 109.226667 633.628444a415.345778 415.345778 0 0 1-6.087111-97.564444V164.864a77.198222 77.198222 0 0 1 2.275555-27.420444 35.726222 35.726222 0 0 1 14.392889-15.872c9.272889-3.584 19.057778-5.802667 29.013333-6.656l60.700445-10.695112L510.976 51.2c12.913778 0.568889 25.770667 2.616889 38.286222 6.087111l68.949334 12.231111 198.314666 35.043556 58.709334 10.353778 24.291555 4.551111c6.826667 2.730667 12.629333 7.395556 16.554667 13.425777 8.305778 13.084444 4.835556 54.727111 4.835555 76.174223z m-68.323555 264.135111V176.924444L514.446222 117.191111l-342.926222 59.733333v296.163556c0 59.335111-3.697778 125.326222 11.150222 170.268444 29.013333 87.722667 100.238222 141.937778 175.616 185.856 36.465778 20.48 74.695111 37.831111 114.346667 51.996445 13.255111 5.688889 27.022222 10.24 41.187555 13.425778l38.684445-13.425778c26.510222-9.102222 52.224-20.138667 76.970667-32.881778 14.563556-8.135111 29.411556-14.506667 43.406222-22.869333 76.288-45.340444 142.848-101.034667 171.463111-191.886222 13.141333-41.870222 8.248889-106.951111 8.248889-160.426667z m-137.272889 185.116444a29.752889 29.752889 0 0 1-8.135111 13.255111 31.971556 31.971556 0 0 1-30.549334 7.452445 32.768 32.768 0 0 1-14.336-8.021334L477.013333 494.592a134.144 134.144 0 0 1-89.315555 13.482667 129.422222 129.422222 0 0 1-76.515556-45.795556 115.882667 115.882667 0 0 1-27.875555-81.692444c1.706667-29.582222 14.791111-57.457778 36.807111-78.392889a128.682667 128.682667 0 0 1 82.488889-34.702222 129.877333 129.877333 0 0 1 85.731555 26.794666c24.632889 17.976889 41.528889 43.804444 47.786667 72.817778 6.144 28.956444 1.137778 59.050667-14.108445 84.764444l25.6 24.348445 66.673778-63.146667a32.995556 32.995556 0 0 1 44.430222 0.967111 29.752889 29.752889 0 0 1 0.682667 42.325334l-66.673778 63.146666 46.648889 44.430223 21.902222-20.764445a32.824889 32.824889 0 0 1 22.471112-8.533333 32.768 32.768 0 0 1 22.300444 8.874666c5.973333 5.688889 9.329778 13.312 9.386667 21.276445a29.582222 29.582222 0 0 1-9.045334 21.390222l-22.243555 21.162667 22.528 21.447111a28.615111 28.615111 0 0 1 8.590222 29.468444zM456.192 348.046222a64.170667 64.170667 0 0 0-32.426667-15.701333 65.877333 65.877333 0 0 0-36.181333 3.982222c-11.377778 4.721778-21.048889 12.515556-27.761778 22.414222a57.856 57.856 0 0 0 0.739556 66.275556c6.997333 9.784889 16.839111 17.351111 28.330666 21.788444 11.434667 4.437333 24.064 5.575111 36.181334 3.242667 12.174222-2.275556 23.324444-7.964444 32.085333-16.327111a59.164444 59.164444 0 0 0 18.090667-43.064889 59.335111 59.335111 0 0 0-19.057778-42.666667z" p-id="3562"></path></svg>
</template>
<script>
export default {
name: "DataAuthorization"
}
</script>
<style scoped>
</style>

View File

@ -0,0 +1,13 @@
<template>
<svg t="1720158991173" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3275" width="200" height="200"><path d="M694.101333 963.299556H329.728a163.214222 163.214222 0 0 1-117.077333-50.062223 173.340444 173.340444 0 0 1-48.526223-120.604444V222.549333a35.043556 35.043556 0 0 1 9.671112-24.177777 33.109333 33.109333 0 0 1 23.438222-9.955556H826.595556a32.312889 32.312889 0 0 1 23.438222 9.955556 34.190222 34.190222 0 0 1 9.671111 24.177777v570.026667c0 45.226667-17.408 88.632889-48.469333 120.604444a163.214222 163.214222 0 0 1-117.134223 50.062223zM230.4 256.739556v535.893333c0 27.136 10.467556 53.191111 29.127111 72.362667 18.659556 19.228444 43.918222 29.980444 70.257778 29.980444h364.373333c26.396444 0 51.655111-10.808889 70.314667-29.980444 18.602667-19.171556 29.070222-45.226667 29.070222-72.419556v-535.893333H230.4z" p-id="3276"></path><path d="M888.490667 256.739556H135.566222a32.654222 32.654222 0 0 1-23.438222-10.012445 34.702222 34.702222 0 0 1 0-48.298667 32.654222 32.654222 0 0 1 23.438222-9.955555h752.924445c8.817778 0 17.237333 3.584 23.438222 9.955555a34.702222 34.702222 0 0 1 0 48.298667 32.654222 32.654222 0 0 1-23.438222 10.012445z" p-id="3277"></path><path d="M640.739556 244.736a32.654222 32.654222 0 0 1-23.438223-10.012444 34.702222 34.702222 0 0 1-9.671111-24.120889 99.896889 99.896889 0 0 0-29.923555-65.991111 94.208 94.208 0 0 0-65.649778-26.851556c-24.462222 0-47.900444 9.614222-65.706667 26.851556-17.749333 17.237333-28.444444 40.846222-29.866666 65.991111a34.702222 34.702222 0 0 1-9.671112 24.120889 32.654222 32.654222 0 0 1-46.876444 0 34.702222 34.702222 0 0 1-9.671111-24.120889 169.187556 169.187556 0 0 1 49.834667-113.152A159.459556 159.459556 0 0 1 512.056889 51.2c41.699556 0 81.749333 16.611556 111.900444 46.250667 30.151111 29.696 48.014222 70.200889 49.891556 113.152a34.702222 34.702222 0 0 1-9.671111 24.120889 32.654222 32.654222 0 0 1-23.438222 10.012444z m-257.365334 548.522667a32.654222 32.654222 0 0 1-23.438222-10.012445 34.702222 34.702222 0 0 1-9.671111-24.120889V379.904a34.702222 34.702222 0 0 1 9.671111-24.177778 32.654222 32.654222 0 0 1 46.819556 0 34.702222 34.702222 0 0 1 9.671111 24.177778v379.221333a34.702222 34.702222 0 0 1-9.671111 24.120889 32.654222 32.654222 0 0 1-23.381334 10.012445z m257.365334 0a32.654222 32.654222 0 0 1-23.438223-10.012445 34.702222 34.702222 0 0 1-9.671111-24.120889V379.904a34.702222 34.702222 0 0 1 9.671111-24.177778 32.654222 32.654222 0 0 1 46.876445 0 34.702222 34.702222 0 0 1 9.671111 24.177778v379.221333a34.702222 34.702222 0 0 1-9.671111 24.120889 32.654222 32.654222 0 0 1-23.438222 10.012445z" p-id="3278"></path></svg>
</template>
<script>
export default {
name: "Delete"
}
</script>
<style scoped>
</style>

13
src/assets/icons/Edit.vue Normal file
View File

@ -0,0 +1,13 @@
<template>
<svg t="1720158977043" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3133" width="200" height="200"><path d="M759.466667 921.6H263.964444a161.848889 161.848889 0 0 1-161.564444-161.678222V264.078222A161.848889 161.848889 0 0 1 263.964444 102.4h247.808a32.312889 32.312889 0 0 1 0 64.682667H263.964444a97.166222 97.166222 0 0 0-96.938666 96.995555v495.843556a97.166222 97.166222 0 0 0 96.938666 96.995555h495.502223a97.166222 97.166222 0 0 0 96.938666-96.995555V512a32.312889 32.312889 0 1 1 64.625778 0v247.921778a161.848889 161.848889 0 0 1-161.564444 161.678222z m27.192889-745.699556l30.378666 30.606223 30.606222 30.435555-148.707555 148.707556-177.720889 177.664-66.958222 6.257778 6.257778-67.072 177.493333-177.834667 148.650667-148.764445z m0-73.500444a43.064889 43.064889 0 0 0-30.606223 12.686222l-163.726222 163.84-188.302222 189.952a21.617778 21.617778 0 0 0-6.257778 13.141334l-12.060444 134.257777a21.617778 21.617778 0 0 0 21.617777 23.552h1.877334l134.257778-12.060444a21.560889 21.560889 0 0 0 13.084444-6.257778l188.757333-188.871111 163.726223-163.84a43.235556 43.235556 0 0 0 0-60.984889l-46.364445-46.990222-45.624889-45.681778a43.064889 43.064889 0 0 0-30.378666-12.743111z" p-id="3134"></path></svg>
</template>
<script>
export default {
name: "Edit"
}
</script>
<style scoped>
</style>

View File

@ -0,0 +1,13 @@
<template>
<svg t="1699594111078" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3598" width="200" height="200"><path d="M831.23313778 854.03550493H201.42177507a71.07015111 71.07015111 0 0 1-71.0701511-70.98693064v-46.18727651c0-39.11354937 31.87338126-71.07015111 71.0701511-71.07015111h68.49032192c6.24152349-0.41610126 71.07015111-6.57440541 109.85081856-52.51202048 28.79423033-34.12032967 43.35778589-63.41388174 43.35778589-87.04845142 0-2.82949063 0.33288078-5.49254144 0.66576157-8.57169351 1.49796523-13.73135189 4.66033778-42.44236174-27.87880619-74.89828523a28.54456889 28.54456889 0 0 1 40.19541333-40.44507477c51.84625778 51.7630373 46.10405603 104.1918373 44.27320889 121.50166415a29.12711111 29.12711111 0 0 0-0.2496603 2.74627014c0 14.48033507-0.58254222 56.75625699-56.756257 123.33251016-56.92269682 67.40845682-147.29996174 72.56811634-151.12809585 72.7345573h-70.73727034a14.31389411 14.31389411 0 0 0-14.14745429 14.14745429v46.10405603c0 7.65626937 6.49118493 14.14745429 14.14745429 14.1474543h629.89458319c7.57304889 0 14.14745429-6.49118493 14.14745315-14.1474543V736.69485682a14.31389411 14.31389411 0 0 0-14.14745315-14.14745316h-77.81099748c-8.32203207 0.16644096-91.95845063-1.16508445-159.86622919-82.63777621-45.35507285-54.42608811-47.01947904-99.44827904-46.18727652-113.67895268a187.24571477 187.24571477 0 0 1 2.41338938-43.0249051c5.74220174-34.45321159 20.63863922-63.82998301 43.02490396-84.88472348a28.54456889 28.54456889 0 0 1 40.19541333 1.24830492 28.54456889 28.54456889 0 0 1-1.24830492 40.19541334c-32.45592349 30.37541603-27.62914589 82.72099555-27.46270493 83.22031729a26.38084096 26.38084096 0 0 0-0.16643982 6.57440541c-0.24966144 2.16372793-1.91406763 31.79016078 33.12168619 73.81642126 50.93083477 61.16693333 111.01590301 62.41523826 115.34336 62.41523826h78.6432c39.11354937 0 70.98693063 31.79016078 70.98693063 70.90371015v46.18727651a71.15337159 71.15337159 0 0 1-71.15337159 71.1533716z" p-id="3599"></path><path d="M615.19319381 445.09086493a28.46134841 28.46134841 0 0 1-16.3944027-51.7630373c40.44507477-28.29490745 64.49574571-74.56540445 64.49574571-123.66539208a151.04487651 151.04487651 0 1 0-237.42756523 123.66539208 28.29490745 28.29490745 0 0 1 6.90728619 39.61287111 28.29490745 28.29490745 0 0 1-39.52965063 6.90728619 208.30045411 208.30045411 0 0 1-88.79607922-170.35199034A208.05079381 208.05079381 0 0 1 512.33288078 61.7780827a208.05079381 208.05079381 0 1 1 119.08827477 378.31956253 28.37812793 28.37812793 0 0 1-16.22796174 5.07644018z m188.0779173 515.1337654H222.39329507a42.19270144 42.19270144 0 0 1-42.02626048-42.02626048v-78.97608192c0-23.21846841 18.89101255-42.10948096 42.10948096-42.10947982H803.27111111c23.21846841 0 42.10948096 18.89101255 42.10948096 42.10947982v78.97608192a42.19270144 42.19270144 0 0 1-42.10948096 42.10947982z m-566.06459904-56.83947748h551.25138204v-49.34964792H237.20651207v49.34964792z" p-id="3600"></path></svg>
</template>
<script>
export default {
name: "Review"
}
</script>
<style scoped>
</style>

View File

@ -0,0 +1,15 @@
<template>
<svg t="1713245535226" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6046" width="200" height="200">
<path d="M237.303 377.216l113.152 106.027c16.585 16.763 33.652 43.934 17.067 60.693-16.597 16.76-39.228 16.76-55.816 0l-173.338-175.54c-13.163-13.26-14.123-34.49-0.96-47.752L311.71 142.366c16.589-16.76 39.223-16.76 55.812 0s-0.478 43.934-17.067 60.689l-111.68 110.161h380.882C772.868 313.216 896 446.097 896 598.955 896 751.808 772.864 897.8 619.657 897.8h-406.2c-23.317 0-42.88-10.825-42.88-34.134 0-23.313 19.563-29.87 42.88-29.87h402.816c102.763 0 215.714-132.323 215.714-234.847S719.036 377.225 616.273 377.225h-378.97z" p-id="6047"></path>
</svg>
</template>
<script>
export default {
name: "Revoke"
}
</script>
<style scoped>
</style>

13
src/assets/icons/See.vue Normal file
View File

@ -0,0 +1,13 @@
<template>
<svg t="1720159040779" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3419" width="200" height="200"><path d="M787.000889 737.905778l124.700444 125.496889a34.133333 34.133333 0 1 1-48.469333 48.128l-124.586667-125.383111A306.460444 306.460444 0 0 1 546.702222 853.333333a307.370667 307.370667 0 0 1-307.541333-307.2c0-169.585778 137.671111-307.2 307.541333-307.2a307.370667 307.370667 0 0 1 307.598222 307.2 305.720889 305.720889 0 0 1-67.299555 191.829334zM307.484444 853.333333a34.190222 34.190222 0 0 1 0 68.266667h-34.133333a170.837333 170.837333 0 0 1-170.894222-170.666667V273.066667a170.780444 170.780444 0 0 1 170.894222-170.666667h477.411556a170.780444 170.780444 0 0 1 170.894222 170.666667v34.133333a34.133333 34.133333 0 1 1-68.380445 0v-34.133333c0-56.547556-45.909333-102.4-102.513777-102.4H273.351111a102.456889 102.456889 0 0 0-102.570667 102.4v477.866666c0 56.547556 45.909333 102.4 102.570667 102.4h34.133333z m239.217778-68.266666a239.104 239.104 0 0 0 239.217778-238.933334c0-131.982222-107.121778-238.933333-239.217778-238.933333a239.104 239.104 0 0 0-239.217778 238.933333c0 131.982222 107.121778 238.933333 239.217778 238.933334zM504.718222 380.586667a34.133333 34.133333 0 0 1 16.725334 66.161777 102.684444 102.684444 0 0 0-74.126223 74.069334 34.190222 34.190222 0 0 1-66.275555-16.782222 171.008 171.008 0 0 1 123.676444-123.448889zM546.702222 716.8a34.190222 34.190222 0 0 1 0-68.266667 102.513778 102.513778 0 0 0 102.513778-102.4 34.133333 34.133333 0 1 1 68.380444 0 170.780444 170.780444 0 0 1-170.894222 170.666667z" p-id="3420"></path></svg>
</template>
<script>
export default {
name: "See"
}
</script>
<style scoped>
</style>

View File

@ -0,0 +1,13 @@
<template>
<svg t="1720159240760" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3846" width="200" height="200"><path d="M836.949333 308.451556C836.949333 169.756444 717.596444 56.888889 570.823111 56.888889S304.696889 169.756444 304.696889 308.451556c0 43.349333 11.832889 85.902222 34.360889 123.676444a37.717333 37.717333 0 0 0 22.869333 16.896c9.671111 2.56 20.081778 1.365333 28.842667-3.299556a36.295111 36.295111 0 0 0 17.92-21.617777 34.133333 34.133333 0 0 0-3.527111-27.306667 172.487111 172.487111 0 0 1-24.462223-88.348444c0-99.214222 85.333333-179.882667 190.293334-179.882667 104.903111 0 190.293333 80.668444 190.293333 179.882667s-85.390222 179.939556-190.350222 179.939555c-258.332444 0-468.48 198.656-468.48 442.823111 0 9.500444 3.982222 18.659556 11.093333 25.372445a39.082667 39.082667 0 0 0 26.851556 10.524444 39.082667 39.082667 0 0 0 26.851555-10.524444 34.929778 34.929778 0 0 0 11.093334-25.372445c0-204.686222 176.128-371.143111 392.647111-371.143111 146.602667 0 265.955556-112.867556 265.955555-251.619555z" p-id="3847"></path><path d="M499.484444 696.376889c0 9.500444 3.982222 18.659556 11.150223 25.372444a39.139556 39.139556 0 0 0 26.794666 10.524445h346.282667a39.139556 39.139556 0 0 0 26.851556-10.524445 34.929778 34.929778 0 0 0 11.093333-25.372444 34.929778 34.929778 0 0 0-11.093333-25.372445 39.082667 39.082667 0 0 0-26.851556-10.524444H537.429333a39.139556 39.139556 0 0 0-26.794666 10.524444 34.929778 34.929778 0 0 0-11.150223 25.372445z m384.170667 81.521778H537.372444a39.082667 39.082667 0 0 0-26.794666 10.524444 34.929778 34.929778 0 0 0-11.150222 25.372445c0 9.500444 3.982222 18.659556 11.150222 25.372444a39.139556 39.139556 0 0 0 26.794666 10.524444h346.282667a39.139556 39.139556 0 0 0 26.851556-10.524444 34.929778 34.929778 0 0 0 11.150222-25.372444 34.929778 34.929778 0 0 0-11.150222-25.372445 39.082667 39.082667 0 0 0-26.851556-10.524444z m0 117.475555H537.372444a39.082667 39.082667 0 0 0-26.794666 10.467556 34.872889 34.872889 0 0 0-11.150222 25.372444c0 9.500444 3.982222 18.659556 11.150222 25.372445a39.082667 39.082667 0 0 0 26.794666 10.524444h346.282667a39.082667 39.082667 0 0 0 26.851556-10.524444 34.929778 34.929778 0 0 0 11.150222-25.372445 34.872889 34.872889 0 0 0-11.150222-25.372444 39.082667 39.082667 0 0 0-26.851556-10.467556z" p-id="3848"></path></svg>
</template>
<script>
export default {
name: "UserList"
}
</script>
<style scoped>
</style>

View File

@ -21,6 +21,17 @@ export { default as Secure } from './Secure.vue'
export { default as UserLog } from './Log.vue'
export { default as WechartRound } from './WechartRound.vue'
// 列表按钮
export { default as Delete } from './Delete.vue'
export { default as Edit } from './Edit.vue'
export { default as Review } from './Review.vue'
export { default as Revoke } from './Revoke.vue'
export { default as See } from './See.vue'
export { default as AbilityAuthorization } from './AbilityAuthorization.vue'
export { default as DataAuthorization } from './DataAuthorization.vue'
export { default as UserList } from './UserList.vue'
export { default as Home } from './menu/Home.vue'
export { default as Setup } from './menu/Setup.vue'
export { default as Other } from './menu/Other.vue'

View File

@ -1,5 +1,5 @@
<template>
<svg t="1717640177370" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1734" width="200" height="200"><path d="M835.62 524.616l29.375 66.547 66.547 29.374c13.492 5.955 19.916 21.465 14.587 35.216l-26.285 67.826 26.285 67.826c5.33 13.751-1.095 29.261-14.587 35.216l-66.547 29.375-29.375 66.546c-5.955 13.492-21.465 19.916-35.216 14.587l-67.827-26.285-67.827 26.285c-13.75 5.33-29.261-1.095-35.216-14.587l-29.375-66.546-66.547-29.375c-13.492-5.955-19.916-21.465-14.587-35.216l26.285-67.826-26.285-67.826c-5.33-13.75 1.095-29.261 14.587-35.216l66.547-29.374 29.375-66.547c5.955-13.491 21.465-19.916 35.216-14.587l67.827 26.285 67.827-26.285c13.75-5.329 29.261 1.096 35.216 14.587zM447.43 877.649c16.51 0 29.894 13.384 29.894 29.894 0 16.51-13.384 29.894-29.894 29.894H185.278c-16.51 0-29.894-13.384-29.894-29.894 0-16.51 13.384-29.894 29.894-29.894H447.43zM800.637 559.26l-68.06 26.378-68.063-26.378-29.477 66.78-66.78 29.477 26.377 68.062-26.378 68.06 66.78 29.48 29.478 66.777 68.063-26.376 68.06 26.376 29.48-66.778 66.778-29.48-26.375-68.059 26.375-68.062-66.778-29.477-29.48-66.78z m-68.06 81.535c45.72 0 82.785 37.064 82.785 82.784 0 45.72-37.064 82.784-82.785 82.784-45.72 0-82.785-37.064-82.785-82.784 0-45.72 37.064-82.784 82.785-82.784z m0 41.392c-22.86 0-41.392 18.532-41.392 41.392 0 22.86 18.532 41.392 41.392 41.392 22.86 0 41.392-18.532 41.392-41.392 0-22.86-18.532-41.392-41.392-41.392zM477.324 105v9.198h316.662c79.572 0 144.248 63.776 145.533 142.96l0.02 2.404v201.844c0 16.51-13.385 29.894-29.895 29.894-16.274 0-29.511-13.004-29.886-29.189l-0.008-0.705V259.562c0-46.779-37.623-84.808-84.346-85.564l-1.418-0.011H213.553c-46.903 0-84.995 37.561-85.753 84.16l-0.011 1.415v348.547c0 46.78 37.623 84.809 84.345 85.564l1.419 0.012h217.04c16.51 0 29.894 13.384 29.894 29.894 0 16.274-13.005 29.511-29.189 29.886l-0.705 0.008h-217.04c-79.572 0-144.248-63.776-145.533-142.96L68 608.11V259.562c0-79.49 63.88-144.06 143.146-145.344l2.407-0.02h203.982V105h59.79z" fill="" p-id="1735"></path></svg>
<svg t="1720057110104" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2923" width="200" height="200"><path d="M921.9072 431.104a83.0976 83.0976 0 0 0-63.1296-58.624c-62.3104-12.9024-84.3776-51.3024-64.3584-111.872a83.5584 83.5584 0 0 0-19.0464-84.1728c-35.584-37.0688-89.5488-68.4032-139.4176-80.896a82.944 82.944 0 0 0-82.2272 25.6c-42.1888 47.7184-86.4256 47.7184-128.6144 0a82.7904 82.7904 0 0 0-82.2272-25.6c-49.8176 12.4928-103.7312 43.8272-139.4176 80.896a83.6096 83.6096 0 0 0-19.0464 84.1728c20.0704 60.672-1.9456 99.072-64.3584 111.872A83.2512 83.2512 0 0 0 56.9856 431.104c-14.1312 49.5616-14.1312 112.128 0 161.792a83.2512 83.2512 0 0 0 63.0784 58.624c62.3104 12.9024 84.3776 51.3024 64.3584 111.872a83.6096 83.6096 0 0 0 19.0464 84.1728c35.6864 37.0688 89.7024 68.3008 139.52 80.896a82.944 82.944 0 0 0 82.176-25.6c42.24-47.7184 86.4256-47.7184 128.6656 0 20.48 23.2448 52.1216 33.0752 82.176 25.6 49.8176-12.4928 103.8336-43.8272 139.52-80.896 21.504-22.3232 28.7744-54.784 19.0464-84.1728-20.0704-60.672 1.9968-99.072 64.3584-111.872a83.0976 83.0976 0 0 0 63.1808-58.624c14.0288-49.5616 14.0288-112.2304-0.2048-161.792zM489.472 705.7408A193.3824 193.3824 0 0 1 296.448 512a193.3824 193.3824 0 0 1 193.024-193.7408A193.3824 193.3824 0 0 1 682.496 512a193.3824 193.3824 0 0 1-193.024 193.7408z" p-id="2924"></path><path d="M627.3536 512c0 36.9152-14.336 71.68-40.448 97.792a136.3968 136.3968 0 0 1-97.4336 40.6016c-36.8128 0-71.424-14.336-97.4848-40.5504-26.112-26.112-40.3968-60.928-40.3968-97.8432 0-36.9152 14.336-71.68 40.448-97.792a136.3968 136.3968 0 0 1 97.4336-40.6016c36.7616 0 71.424 14.336 97.4336 40.5504 26.112 26.112 40.448 60.928 40.448 97.8432z" p-id="2925"></path></svg>
</template>
<script>

View File

@ -13,7 +13,8 @@
<el-table v-bind="$attrs" :header-cell-style="{'background': '#F5F7FA','color':'#606266'}" :data="tableData" :row-key="rowKey" :key="toggleIndex" ref="scTable" :height="height=='auto'?null:'100%'" :size="config.size" :border="config.border" :stripe="config.stripe" :summary-method="remoteSummary?remoteSummaryMethod:summaryMethod" @sort-change="sortChange" @filter-change="filterChange">
<slot></slot>
<template v-for="(item, index) in userColumn" :key="index">
<el-table-column v-if="!item.hide" :column-key="item.prop" :label="item.label" :prop="item.prop" :width="item.width" :sortable="item.sortable" :fixed="item.fixed" :filters="item.filters" :filter-method="remoteFilter||!item.filters?null:filterHandler" :show-overflow-tooltip="item.showOverflowTooltip">
<!-- item.showOverflowTooltip-->
<el-table-column v-if="!item.hide" :column-key="item.prop" :label="item.label" :prop="item.prop" :width="item.width" :sortable="item.sortable" :fixed="item.fixed" :filters="item.filters" :filter-method="remoteFilter||!item.filters?null:filterHandler" :show-overflow-tooltip="true">
<template #default="scope">
<slot :name="item.prop" v-bind="scope">
{{scope.row[item.prop]}}
@ -29,7 +30,7 @@
</div>
<div class="scTable-page" v-if="!hidePagination || !hideDo">
<div class="scTable-pagination">
<el-pagination v-if="!hidePagination" background :small="true" :layout="paginationLayout" :total="total" :page-size="scPageSize" :page-sizes="pageSizes" v-model:currentPage="currentPage" @current-change="paginationChange" @update:page-size="pageSizeChange"></el-pagination>
<el-pagination v-if="!hidePagination && showPagination" background :small="true" :layout="paginationLayout" :total="total" :page-size="scPageSize" :page-sizes="pageSizes" v-model:currentPage="currentPage" @current-change="paginationChange" @update:page-size="pageSizeChange"></el-pagination>
</div>
<div class="scTable-do" v-if="!hideDo">
<el-button v-if="!hideRefresh" @click="refresh" icon="el-icon-refresh" circle style="margin-left:15px"></el-button>
@ -89,6 +90,7 @@
remoteFilter: { type: Boolean, default: false },
remoteSummary: { type: Boolean, default: false },
hidePagination: { type: Boolean, default: false },
showPagination: { type: Boolean, default: true },
hideDo: { type: Boolean, default: false },
hideRefresh: { type: Boolean, default: false },
hideSetting: { type: Boolean, default: false },
@ -143,7 +145,7 @@
mounted() {
//
if(this.column){
this.getCustomColumn()
// this.getCustomColumn()
}else{
this.userColumn = this.column
}
@ -172,12 +174,12 @@
//
async getData(){
this.loading = true;
var reqData = {
const reqData = {
[config.request.page]: this.currentPage,
[config.request.pageSize]: this.scPageSize,
[config.request.prop]: this.prop,
[config.request.order]: this.order
}
};
if(this.hidePagination){
delete reqData[config.request.page]
delete reqData[config.request.pageSize]
@ -208,11 +210,17 @@
}else{
this.tableData = response.rows || [];
}
if(response.data.columnConfig){
this.userColumn = response.data.columnConfig; //
}
this.total = response.total || 0;
this.summary = response.summary || {};
this.loading = false;
}
if(this.$refs.scTable){
this.$refs.scTable.setScrollTop(0)
}
this.$emit('dataChange', res, this.tableData)
},
//
@ -254,7 +262,7 @@
async columnSettingSave(userColumn){
this.$refs.columnSetting.isSave = true
try {
await config.columnSettingSave(this.tableName, userColumn)
await config.columnSettingSave(this.tableName, userColumn,this.apiObj)
}catch(error){
this.$message.error('保存失败')
this.$refs.columnSetting.isSave = false

View File

@ -1,6 +1,6 @@
//数据表格配置
import tool from '@/utils/tool'
import http from "@/utils/request";
export default {
successCode: 200, //请求完成代码
@ -28,13 +28,26 @@ export default {
* @tableName scTable组件的props->tableName
* @column 用户配置好的列
*/
columnSettingSave: function (tableName, column) {
columnSettingSave: function (tableName, column,params) {
column.forEach((item,index)=>{
item.sort = index+1;
})
return new Promise((resolve) => {
setTimeout(()=>{
//这里为了演示使用了session和setTimeout演示开发时应用数据请求
tool.session.set(tableName, column)
if(!params.url || params.url==''){
resolve(false)
return
}
let data = {
column_config:column,
save_column:true
}
http.post(params.url, data).then(res=>{
if(res.code == 200 && res.data.column){
resolve(true)
},1000)
}else{
resolve(false)
}
});
})
},
/**

View File

@ -55,8 +55,8 @@
<header class="adminui-header">
<div class="adminui-header-left">
<div class="logo-bar">
<img class="logo" src="https://dm-auto.oss-cn-shanghai.aliyuncs.com/xw_cloud/image/login_logo.png">
<!-- <span>{{ $CONFIG.APP_NAME }}</span>-->
<!-- <img class="logo" src="https://dm-auto.oss-cn-shanghai.aliyuncs.com/xw_cloud/image/login_logo.png">-->
<span>{{ $CONFIG.APP_NAME }}</span>
</div>
<Topbar v-if="!ismobile"></Topbar>
</div>

View File

@ -24,10 +24,27 @@
--el-color-primary-dark-8: #031426;
--el-color-primary-dark-9: #010a13;
--el-menu-base-level-padding:24px;
--el-menu-level-padding:30px;
--el-menu-icon-width:30px;
--el-menu-item-height:50px;
--el-component-size-small:28px;
}
.el-table{
.el-button--small{
height: 24px;
}
.noBorderBtn{
border: 0;
}
.userImg{
height: 100%;
display: flex;
align-items: center;
}
}
.el-button--small{
height: 28px;
}
@ -43,19 +60,20 @@
.el-aside {border-right: 1px solid var(--el-border-color-light);}
.el-container + .el-aside {border-right: 0;border-left: 1px solid var(--el-border-color-light);}
.el-header {background: #fff;border-bottom: 1px solid #F6F6F6;padding:13px 15px;display: flex;justify-content: space-between;align-items: center;}
//.mainBox .el-header{margin-bottom: 10px;}
.mainBoxHeaderNoBorder .el-header{border-bottom: 0;padding: 0;}
.mainBoxHeaderNoBorder .el-header{border-bottom: 1px solid var(--el-border-color-light);padding: 0;}
.mainHeaderNoPadding .el-header{padding-left: 0;padding-right: 0;}
.mainHeaderNoBorderPadding .el-header{padding: 0;border-bottom: 0;}
.el-header .left-panel {display: flex;align-items: center;}
.el-header .right-panel {display: flex;align-items: center;}
.el-header .right-panel > * + * {margin-left:10px;}
.el-footer {background: #fff;border-top: 1px solid var(--el-border-color-light);padding:13px 15px;}
.el-main {padding:10px;width: 100%;height: 100%;box-sizing: border-box;background: var(--el-color-white);border-radius: 4px;}
.noBorderRadius{border-radius: 0 !important;}
.el-main.nopadding {padding:0;background: #fff;display: flex;flex-direction: column;}
.el-main.nopadding .scTable{flex: 1;overflow: hidden;}
/** 列表上面的检索 */
.el-main.nopadding .searchMain{display: flex;flex-wrap: wrap;align-items: self-end;padding-bottom: 10px;margin: 20px 0 0 0; border-bottom: 1px solid var(--el-border-color-light);}
.el-main.nopadding .searchMain{display: flex;flex-wrap: wrap;align-items: self-end;padding-bottom: 10px;margin: 15px 0 0 0; border-bottom: 1px solid var(--el-border-color-light);}
.el-main.nopadding .searchMainNoTop{margin-top: 0;}
.el-main.nopadding .searchMain .searchItem{display: flex;flex-direction: column;align-items: flex-start;margin-right: 20px;margin-bottom: 10px;}
.el-main.nopadding .searchMain .searchItem .name{white-space: nowrap;overflow: hidden;text-overflow: ellipsis;color: #303133;padding-bottom: 5px;text-align: right;}
@ -94,7 +112,7 @@
.el-table {font-size: 12px;}
.el-radio-button__inner {font-size: 12px;}
.el-checkbox-button__inner {font-size: 12px;}
.el-sub-menu .el-icon {font-size: 15px;color: #aaa;}
.el-sub-menu .el-icon {font-size: 16px;color: #aaa;display: flex;align-items: center;justify-content: flex-start;margin-right: 0;}
.el-sub-menu.is-active .el-sub-menu__title{color: var(--el-color-primary)}
.el-sub-menu.is-active .el-sub-menu__title .el-icon{color: var(--el-color-primary)}
.el-sub-menu .el-sub-menu__icon-arrow {font-size: 12px;}
@ -110,6 +128,9 @@
/* 全部禁用el-tag动画 */
.el-tag {transition: all 0s !important;}
/** 弹款的头部配置 */
.el-dialog .el-dialog__header{margin-right: 0;padding-bottom: 20px;box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.06);}
/* 覆盖tinymce样式 */
.sceditor .tox-tinymce {border: 1px solid #DCDFE6;border-radius: 0;}
body .tox-tinymce-aux {z-index: 5700;}

View File

@ -1,5 +1,5 @@
import axios from 'axios';
import { ElNotification, ElMessageBox } from 'element-plus';
import { ElNotification, ElMessageBox, ElMessage } from 'element-plus';
import sysConfig from "@/config";
import tool from '@/utils/tool';
import router from '@/router';
@ -33,54 +33,93 @@ let MessageBox_401_show = false
// HTTP response 拦截器
axios.interceptors.response.use(
(response) => {
return response;
},
(error) => {
if (error.response) {
if (error.response.status == 404) {
ElNotification.error({
title: '请求错误',
message: "Status:404正在请求不存在的服务器记录"
});
} else if (error.response.status == 500) {
ElNotification.error({
title: '请求错误',
message: error.response.data.message || "Status:500服务器发生错误"
});
} else if (error.response.status == 401) {
const token = response.headers.authorization;
if (token) {
let reToken = token.replace(/Bearer /g, "");
tool.cookie.set("TOKEN", reToken);
}
const api_code = response.data.code;
if (api_code === 401) {
if (!MessageBox_401_show) {
MessageBox_401_show = true
ElMessageBox.confirm('当前用户已被登出或无权限访问当前资源,请尝试重新登录后再操作。', '无权限访问', {
type: 'error',
MessageBox_401_show = true;
ElMessageBox.confirm("当前用户已被登出或无权限访问当前资源,请尝试重新登录后再操作。","无权限访问",{
type: "error",
closeOnClickModal: false,
center: true,
confirmButtonText: '重新登录',
confirmButtonText: "重新登录",
beforeClose: (action, instance, done) => {
MessageBox_401_show = false
done()
}
MessageBox_401_show = false;
done();
},
}).then(() => {
router.replace({path: '/login'});
}).catch(() => {})
// closeSock(true);
tool.cookie.remove("TOKEN");
router.replace({ path: "/login" });
})
.catch(() => {});
}
} else {
} else if (api_code === 404) {
ElNotification.error({
title: '请求错误',
message: error.message || `Status:${error.response.status},未知错误!`
title: "请求错误",
message: "Status:404正在请求不存在的接口",
});
} else if (api_code === 500) {
ElNotification.error({
title: "请求错误",
message: response.data.msg || "Status:500服务器发生错误",
});
} else if (api_code === 0 || api_code !== 200) {
ElMessage.warning(response.data.message);
}
} else {
return response;
},
(error) => {
// if (error.response) {
// if (error.response.status == 404) {
// ElNotification.error({
// title: '请求错误',
// message: "Status:404正在请求不存在的服务器记录"
// });
// } else if (error.response.status == 500) {
// ElNotification.error({
// title: '请求错误',
// message: error.response.data.message || "Status:500服务器发生错误"
// });
// } else if (error.response.status == 401) {
// if(!MessageBox_401_show){
// MessageBox_401_show = true
// ElMessageBox.confirm('当前用户已被登出或无权限访问当前资源,请尝试重新登录后再操作。', '无权限访问', {
// type: 'error',
// closeOnClickModal: false,
// center: true,
// confirmButtonText: '重新登录',
// beforeClose: (action, instance, done) => {
// MessageBox_401_show = false
// done()
// }
// }).then(() => {
// router.replace({path: '/login'});
// }).catch(() => {})
// }
// } else {
// ElNotification.error({
// title: '请求错误',
// message: error.message || `Status:${error.response.status},未知错误!`
// });
// }
// }
ElNotification.error({
title: '请求错误',
message: "请求服务器无响应!"
});
}
return Promise.reject(error.response);
}
);
var http = {
const http = {
/** get
* @param {string} url 接口地址
@ -227,6 +266,6 @@ var http = {
document.getElementsByTagName('head')[0].appendChild(script)
})
}
}
};
export default http;

View File

@ -218,4 +218,87 @@ tool.crypto = {
}
}
/**
* @description 监听本地存储值的变化
* @param {number} type 1 表示 localStorage2 表示 sessionStorage
* @param {string} key 键名
* @param {string} data 要存储的数据
* @returns {void}
*/
tool.addStorageEvent = function (type,key,data){
if (type === 1) {
// 创建一个 StorageEvent 事件
let newStorageEvent = document.createEvent('StorageEvent');
// 定义一个模拟的 localStorage 对象
const storage = {
setItem: function (k, val) {
// 设置 localStorage 的值
localStorage.setItem(k, val);
// 初始化创建的事件
newStorageEvent.initStorageEvent('setItem', false, false, k, null, val, null, null);
// 派发对象
window.dispatchEvent(newStorageEvent);
}
};
// 调用模拟的 setItem 方法
return storage.setItem(key, data);
} else {
// 如果是 sessionStorage
let newStorageEvent = document.createEvent('StorageEvent');
// 定义一个模拟的 sessionStorage 对象
const storage = {
setItem: function (k, val) {
// 设置 sessionStorage 的值
sessionStorage.setItem(k, val);
// 初始化创建的事件
newStorageEvent.initStorageEvent('setItem', false, false, k, null, val, null, null);
// 派发对象
window.dispatchEvent(newStorageEvent);
}
};
// 调用模拟的 setItem 方法
return storage.setItem(key, data);
}
}
tool.resetSetItem = function(key, newVal) {
if (key === "watchStorage") {
let newStorageEvent = document.createEvent("StorageEvent");
const storage = {
setItem: function(k, val) {
sessionStorage.setItem(k, val);
// 初始化创建的事件
newStorageEvent.initStorageEvent(
"setItem",
false,
false,
k,
null,
val,
null,
null
);
// 派发对象
window.dispatchEvent(newStorageEvent);
},
};
return storage.setItem(key, newVal);
}
}
/* 获取地址栏参数 */
tool.getParameterByName = function(name, url) {
if (!url) url = window.location.href;
// eslint-disable-next-line
let nameText = name.replace(/[\[\]]/g, '$&');
let regex = new RegExp('[?&]' + nameText + '(=([^&#]*)|&|#|$)');
let results = regex.exec(url);
if (!results) return null;
if (!results[2]) return '';
// 解析为 JavaScript 对象以去除双引号
let decodedValue = decodeURIComponent(results[2].replace(/\+/g, ' '));
// 处理非 JSON 字符串,例如去除双引号
decodedValue = decodedValue.replace(/^"(.*)"$/, '$1');
return decodedValue;
}
export default tool

View File

@ -72,7 +72,6 @@
this.$store.commit("SET_LOGIN_NAME", user.data.user.name);
} else {
this.islogin = false
this.$message.warning(user.message)
return false
}
//

View File

@ -1,16 +1,16 @@
<template>
<el-form ref="loginForm" :model="form" :rules="rules" label-width="0" size="large" @keyup.enter="login">
<el-form-item prop="phone">
<el-input v-model="form.phone" prefix-icon="el-icon-iphone" clearable :placeholder="$t('login.mobilePlaceholder')"></el-input>
<el-form-item prop="mobile">
<el-input v-model="form.mobile" prefix-icon="el-icon-iphone" clearable :placeholder="$t('login.mobilePlaceholder')"></el-input>
</el-form-item>
<el-form-item prop="yzm" style="margin-bottom: 35px;">
<el-form-item prop="verify_code" style="margin-bottom: 35px;">
<div class="login-msg-yzm">
<el-input v-model="form.yzm" prefix-icon="el-icon-unlock" clearable :placeholder="$t('login.smsPlaceholder')"></el-input>
<el-input v-model="form.verify_code" prefix-icon="el-icon-unlock" clearable :placeholder="$t('login.smsPlaceholder')"></el-input>
<el-button @click="getYzm" :disabled="disabled">{{this.$t('login.smsGet')}}<span v-if="disabled"> ({{time}})</span></el-button>
</div>
</el-form-item>
<el-form-item>
<el-button type="primary" style="width: 100%;" :loading="islogin" @click="login">{{ $t('login.signIn') }}</el-button>
<el-button type="primary" style="width: 100%;" :loading="isLogin" @click="login">{{ $t('login.signIn') }}</el-button>
</el-form-item>
<div class="login-reg">
{{$t('login.noAccount')}} <router-link to="/user_register">{{$t('login.createAccount')}}</router-link>
@ -23,20 +23,20 @@
data() {
return {
form: {
phone: "",
yzm: "",
mobile: "",
verify_code: "",
},
rules: {
phone: [
mobile: [
{required: true, message: this.$t('login.mobileError')}
],
yzm: [
verify_code: [
{required: true, message: this.$t('login.smsError')}
]
},
disabled: false,
time: 0,
islogin: false,
isLogin: false,
}
},
mounted() {
@ -44,24 +44,67 @@
},
methods: {
async getYzm(){
var validate = await this.$refs.loginForm.validateField("phone").catch(()=>{})
const validate = await this.$refs.loginForm.validateField("mobile").catch(() => {});
if(!validate){ return false }
const res = await this.$API.user.verifyCode.post({mobile: this.form.mobile});
if(res.code == 200){
this.$message.success(this.$t('login.smsSent'))
this.disabled = true
this.time = 60
var t = setInterval(() => {
const t = setInterval(() => {
this.time -= 1
if (this.time < 1) {
clearInterval(t)
this.disabled = false
this.time = 0
}
},1000)
}, 1000);
}
},
async login(){
var validate = await this.$refs.loginForm.validate().catch(()=>{})
const validate = await this.$refs.loginForm.validate().catch(() => {});
if(!validate){ return false }
//token
const user = await this.$API.auth.phoneLogin.post(this.form);
if (user.code == 200) {
this.$TOOL.cookie.set("TOKEN", user.data.token, {
expires: this.form.autologin ? 24 * 60 * 60 : 0
})
this.$TOOL.data.set("USER_INFO", user.data.user)
if(user.data.user.avatar!=''){
this.$store.commit("SET_LOGIN_AVATAR", user.data.user.avatar);
}
this.$store.commit("SET_LOGIN_NAME", user.data.user.name);
} else {
this.islogin = false
return false
}
//
const menu = await this.$API.system.menu.myMenus.get();
if (menu.code == 200) {
if (menu.data.menu.length == 0) {
this.islogin = false
await this.$alert("当前用户无任何菜单权限,请联系系统管理员", "无权限访问", {
type: 'error',
center: true
})
return false
}
this.$TOOL.data.set("MENU", menu.data.menu)
this.$TOOL.data.set("PERMISSIONS", menu.data.permissions)
this.$TOOL.data.set("DASHBOARDGRID", menu.data.dashboardGrid)
} else {
this.islogin = false
this.$message.warning(menu.message)
return false
}
this.$router.replace({
path: '/'
})
this.islogin = false
}
}
}

View File

@ -1,24 +1,200 @@
<template>
<view>2112</view>
<el-container class="mainBox mainHeaderNoBorderPadding">
<el-header>
<div class="left-panel">
<el-button type="primary" :size="size" icon="el-icon-plus" @click="add">新增公司</el-button>
<el-button type="primary" :size="size" plain>批量导入</el-button>
</div>
<div class="right-panel">
</div>
</el-header>
<el-main class="nopadding">
<div class="searchMain searchMainNoTop">
<div class="searchItem">
<label class="name">开通日期</label>
<el-date-picker class="input" type="daterange" :size="size" v-model="params.activation_date" start-placeholder="开始日期" end-placeholder="结束日期" clearable></el-date-picker>
</div>
<div class="searchItem">
<label class="name">公司名称</label>
<el-select class="input" :size="size" v-model="params.full_name" @visible-change="getCompanyList" placeholder="请选择公司名称" filterable clearable>
<el-option v-for="item in setMap.full_name" :key="item" :label="item.full_name" :value="item.id"></el-option>
</el-select>
</div>
<div class="searchItem">
<label class="name">状态</label>
<el-select class="input" :size="size" v-model="params.active_status" @visible-change="getStatusList" placeholder="请选择状态" filterable clearable>
<el-option v-for="item in setMap.active_status" :key="item" :label="item.label" :value="item.active_status"></el-option>
</el-select>
</div>
<div class="searchItem searchBtn">
<el-button :size="size" type="primary" icon="el-icon-search" @click="upSearch">查询</el-button>
<el-button :size="size" type="info" icon="el-icon-RefreshRight" @click="reset">重置</el-button>
</div>
</div>
<scTable ref="table" :apiObj="list.apiObj" :column="list.column" row-key="id" stripe :size="size" @selection-change="selectionChange">
<el-table-column type="selection" align="center" width="40"></el-table-column>
<el-table-column type="index" align="center" label="序号" width="50"></el-table-column>
<template #logo="scope">
<el-image class="logoCell" :src="scope.row.logo"></el-image>
</template>
<template #active_status="scope">
<el-switch :size="size" v-model="scope.row.active_status" @change="changeSwitch($event, scope.row)" :loading="scope.row.$switch_status" :active-value="true" :inactive-value="false"></el-switch>
</template>
<el-table-column label="操作" fixed="right" align="center" width="150">
<template #default="scope">
<el-dropdown>
<el-button class="noBorderBtn" icon="el-icon-more" :size="size"></el-button>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item @click="table_show(scope.row, 'see')" icon="sc-icon-See">查看详情</el-dropdown-item>
<el-dropdown-item @click="table_edit(scope.row, 'edit')" icon="sc-icon-Edit">编辑公司</el-dropdown-item>
<el-dropdown-item @click="table_del(scope.row, 'delete')" icon="sc-icon-AbilityAuthorization" divided>功能授权</el-dropdown-item>
<el-dropdown-item @click="table_del(scope.row, 'delete')" icon="sc-icon-DataAuthorization">数据授权</el-dropdown-item>
<el-dropdown-item @click="table_del(scope.row, 'delete')" icon="sc-icon-UserList" divided>用户列表</el-dropdown-item>
<el-dropdown-item @click="table_del(scope.row, 'delete')" icon="sc-icon-Delete">删除公司</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
</template>
</el-table-column>
</scTable>
</el-main>
</el-container>
<save-dialog v-if="dialog.save" ref="saveDialog" @success="handleSaveSuccess" @closed="dialog.save=false"></save-dialog>
<see-dialog v-if="dialog.show" ref="showDialog" @closed="dialog.show=false"></see-dialog>
</template>
<script>
import saveDialog from './save'
import seeDialog from './see'
export default {
name: "index",
name: 'company',
components: {
saveDialog,
seeDialog
},
data() {
return {
size:'small',
setMap:{
full_name:[],
active_status:[],
},
dialog: {
save: false,
show: false
},
list: {
apiObj: this.$API.system.company.list,
column: [],
},
selection: [],
params: {
activation_date: '',
full_name:'',
active_status:'',
}
}
},
mounted() {
},
methods: {
async getCompanyList(e) {
if(!e) return
const res = await this.$API.system.company.select.post(this.params);
if(res.code == 200){
this.setMap['full_name'] = res.data;
}
},
async getStatusList(e) {
if(!e) return
const res = await this.$API.oss.status.post(this.params);
if(res.code == 200){
this.setMap['active_status'] = res.data;
}
},
//
add(){
this.dialog.save = true
this.$nextTick(() => {
this.$refs.saveDialog.open()
})
},
//
table_edit(row){
this.dialog.save = true
this.$nextTick(() => {
this.$refs.saveDialog.open('edit').setData(row)
})
},
//
table_show(row){
this.dialog.show = true
this.$nextTick(() => {
this.$refs.showDialog.open('show').setData(row);
})
},
//
async table_del(row){
const reqData = {id: row.id};
const res = await this.$API.demo.post.post(reqData);
if(res.code == 200){
this.$refs.table.refresh()
this.$message.success("删除成功")
}else{
await this.$alert(res.message, "提示", {type: 'error'})
}
},
//
async batch_del(){
this.$confirm(`确定删除选中的 ${this.selection.length} 项吗?如果删除项中含有子集将会被一并删除`, '提示', {
type: 'warning'
}).then(() => {
const loading = this.$loading();
this.$refs.table.refresh()
loading.close();
this.$message.success("操作成功")
}).catch(() => {
})
},
//
selectionChange(selection){
this.selection = selection;
},
//
changeSwitch(val, row) {
row.$switch_yx = true;
setTimeout(async () => {
let params = {
id: row.id,
status: row.active_status,
};
const res = await this.$API.system.company.status.post(params);
if(res.code !=200){
row.active_status = !row.active_status;
}
delete row.$switch_yx;
}, 500);
},
upSearch(){
this.$refs.table.upData(this.params);
},
reset(){
this.$refs.table.reload();
}
}
}
</script>
<style scoped lang="scss">
<style lang="scss" scoped>
.logoCell{
display: flex;
align-items: center;
height: 100%;
}
</style>

View File

@ -0,0 +1,177 @@
<template>
<el-dialog :title="titleMap[mode]" v-model="visible" :width="580" destroy-on-close draggable @closed="$emit('closed')">
<el-scrollbar height="460px" style="padding: 0 20px;">
<el-form :model="form" :rules="rules" ref="dialogForm" label-width="140px">
<div class="dialogBoxTitle"><span class="make"></span><span class="name">企业信息</span></div>
<el-form-item label="公司名称" prop="full_name">
<el-input v-model="form.full_name" placeholder="请填写认证企业名称" clearable></el-input>
</el-form-item>
<el-form-item label="公司简称" prop="name">
<el-input v-model="form.name" placeholder="请输入公司简称" clearable></el-input>
</el-form-item>
<el-form-item label="公司系统入口地址" prop="domain">
<el-input v-model="form.domain" placeholder="公司系统入口地址" clearable></el-input>
</el-form-item>
<el-form-item label="公司类型" prop="company_type">
<el-select v-model="form.company_type" @visible-change="getCompanyTypeSelect" placeholder="请输入部门名称" clearable style="width: 100%;">
<el-option v-for="item in setMap.companyType" :key="item" :label="item.label" :value="item.company_type"></el-option>
</el-select>
</el-form-item>
<el-form-item label="公司地址" prop="address">
<el-input v-model="form.address" placeholder="请输入部门名称" clearable></el-input>
</el-form-item>
<el-form-item label="证件照" prop="doc_url">
<ossImgListUpload :list="form.doc_url" :length="3" @parentParams="faultParentParams" />
</el-form-item>
<el-form-item label="公司LOGO" prop="logo">
<ossImgUpload @parentParams="parentParams" :url="form.logo" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input type="textarea" placeholder="请输入备注"></el-input>
</el-form-item>
<div class="dialogBoxTitle"><span class="make"></span><span class="name">企业管理员信息</span></div>
<el-form-item label="负责人/联系方式" prop="status">
<el-row justify="space-between">
<el-col :span="7">
<el-input v-model="form.owner" placeholder="公司负责人"></el-input>
</el-col>
<el-col :span="7">
<el-input v-model="form.mobile" placeholder="联系方式"></el-input>
</el-col>
<el-col :span="8">
<el-input v-model="form.email" placeholder="邮箱地址"></el-input>
</el-col>
</el-row>
</el-form-item>
<el-form-item label="账号" prop="admin_access">
<el-input v-model="form.admin_access" placeholder="请填写管理员账号"></el-input>
</el-form-item>
<el-form-item label="登录密码" prop="password">
<el-input v-model="form.password" type="password" placeholder="请填写密码"></el-input>
</el-form-item>
<el-form-item label="生成系统使用协议" prop="accord">
<el-switch v-model="form.accord" :active-value="1" :inactive-value="0"></el-switch>
</el-form-item>
</el-form>
</el-scrollbar>
<template #footer>
<el-button @click="visible=false" > </el-button>
<el-button v-if="mode!='show'" type="primary" :loading="isSave" @click="submit()"> </el-button>
</template>
</el-dialog>
</template>
<script>
export default {
emits: ['success', 'closed'],
data() {
return {
mode: "add",
titleMap: {
add: '新增公司资料',
edit: '编辑公司资料',
},
setMap:{
companyType:[]
},
visible: false,
isSave: false,
//
form: {
id:"",
domain: "",
company_type: "",
name: "",
full_name:"",
address:"",
email:"",
logo:"",
doc_url:[],
owner:"",
mobile:"",
admin_access:"",
password:"",
remark: "",
accord:1
},
//
rules: {
full_name: [
{required: true, message: '公司名称不能为空', trigger: 'blur'}
],
admin_access: [
{required: true, message: '账号不能为空', trigger: 'blur'}
],
password: [
{required: true, message: '密码不能为空', trigger: 'blur'}
]
},
}
},
mounted() {
},
methods: {
//
open(mode='add'){
this.mode = mode;
this.visible = true;
return this
},
//
async getCompanyTypeSelect(e){
if(!e) return
const res = await this.$API.system.company.typeSelect.post();
if(res.code == 200){
this.setMap['companyType'] = res.data;
}
},
faultParentParams(item){
this.form.doc_url = item;
},
parentParams(item){
this.form.logo = item;
},
//
submit(){
this.$refs.dialogForm.validate(async (valid) => {
if (valid) {
this.isSave = true;
const res = await this.$API.system.company.add.post(this.form);
this.isSave = false;
if(res.code == 200){
this.$emit('success', this.form, this.mode);
this.visible = false;
this.$message.success("操作成功")
}
}
})
},
//
setData(data){
this.form.id = data.id
this.form.label = data.label
this.form.status = data.status
this.form.sort = data.sort
this.form.parentId = data.parentId
this.form.remark = data.remark
}
}
}
</script>
<style lang="scss" scoped>
.dialogBoxTitle{
margin-bottom: 20px;
display: flex;
align-items: center;
.make{
height: 14px;
width: 4px;
border-radius: 10px;
margin-right: 8px;
background: var(--el-color-primary);
}
}
</style>

View File

@ -0,0 +1,71 @@
<template>
<el-dialog :title="titleMap[mode]" v-model="visible" :width="500" destroy-on-close draggable @closed="$emit('closed')">
<el-form :model="form" ref="dialogForm" label-width="140px">
<el-form-item label="公司名称" prop="full_name">
<span>{{form.full_name}}</span>
</el-form-item>
<el-form-item label="公司系统入口地址" prop="label">
<span>{{form.domain}}</span>
</el-form-item>
<el-form-item label="系统开通日期" prop="label">
<span>{{form.activation_date}}</span>
</el-form-item>
<el-form-item label="公司类型" prop="label">
<span></span>
</el-form-item>
<el-form-item label="公司地址" prop="label">
<span>{{form.address}}</span>
</el-form-item>
<el-form-item label="负责人/联系方式" prop="status">
<span>{{form.owner}} {{form.mobile}}</span>
</el-form-item>
<el-form-item label="证件照" prop="remark">
<el-image style="height: 40px" :src="form.logo"></el-image>
</el-form-item>
</el-form>
<template #footer>
<el-button @click="visible=false"> </el-button>
</template>
</el-dialog>
</template>
<script>
export default {
emits: ['success', 'closed'],
data() {
return {
mode: "show",
titleMap: {
show: '查看公司详情'
},
visible: false,
//
form: {},
}
},
mounted() {
},
methods: {
//
open(mode='show'){
this.mode = mode;
this.visible = true;
return this
},
//
async setData(data) {
let params = {
id:data.id
}
const res = await this.$API.system.company.info.post(params);
if(res.code == 200){
this.form = res.data;
}
}
}
}
</script>
<style>
</style>

View File

@ -1,44 +1,39 @@
<template>
<el-container>
<el-container class="mainBox mainBoxHeaderNoBorder">
<el-header>
<div class="left-panel">
<el-button type="primary" icon="el-icon-plus" @click="add"></el-button>
<el-button type="danger" plain icon="el-icon-delete" :disabled="selection.length==0" @click="batch_del"></el-button>
<el-button type="primary" :size="size" icon="el-icon-plus" @click="add"></el-button>
<el-button type="danger" :size="size" plain icon="el-icon-delete" :disabled="selection.length==0" @click="batch_del"></el-button>
</div>
<div class="right-panel">
<div class="right-panel-search">
<el-input v-model="search.keyword" placeholder="部门名称" clearable></el-input>
<el-button type="primary" icon="el-icon-search" @click="upsearch"></el-button>
</div>
</div>
</el-header>
<el-main class="nopadding">
<scTable ref="table" :apiObj="apiObj" row-key="id" @selection-change="selectionChange" hidePagination>
<el-table-column type="selection" width="50"></el-table-column>
<el-table-column label="部门名称" prop="label" width="250"></el-table-column>
<el-table-column label="排序" prop="sort" width="150"></el-table-column>
<el-table-column label="状态" prop="status" width="150">
<scTable ref="table" :apiObj="list.apiObj" :column="list.column" row-key="id" stripe :size="size" :showPagination="false" @selection-change="selectionChange">
<el-table-column type="selection" width="40"></el-table-column>
<el-table-column type="index" label="序号" align="center" width="50"></el-table-column>
<el-table-column label="状态" fixed="right" align="center" width="80" prop="active_status">
<template #default="scope">
<el-tag v-if="scope.row.status==1" type="success">启用</el-tag>
<el-tag v-if="scope.row.status==0" type="danger">停用</el-tag>
<el-switch :size="size" v-model="scope.row.active_status" @change="changeSwitch($event, scope.row)" :loading="scope.row.$switch_status" :active-value="true" :inactive-value="false"></el-switch>
</template>
</el-table-column>
<el-table-column label="创建时间" prop="date" width="180"></el-table-column>
<el-table-column label="备注" prop="remark" min-width="300"></el-table-column>
<el-table-column label="操作" fixed="right" align="right" width="170">
<el-table-column label="操作" fixed="right" align="center" width="150">
<template #default="scope">
<el-button-group>
<el-button text type="primary" size="small" @click="table_show(scope.row, scope.$index)">查看</el-button>
<el-button text type="primary" size="small" @click="table_edit(scope.row, scope.$index)">编辑</el-button>
<el-popconfirm title="确定删除吗?" @confirm="table_del(scope.row, scope.$index)">
<template #reference>
<el-button text type="primary" size="small">删除</el-button>
<el-dropdown>
<el-button class="noBorderBtn" icon="el-icon-more" :size="size"></el-button>
<template #dropdown>
<el-dropdown-menu>
<!-- <el-dropdown-item @click="handlerCommand(scope.row, 'see')" icon="sc-icon-See">查看 </el-dropdown-item>-->
<!-- <el-dropdown-item @click="handlerCommand(scope.row, 'review')" icon="sc-icon-Review" v-if="scope.row.review_status == 0">审核</el-dropdown-item>-->
<!-- <el-dropdown-item @click="handlerCommand(scope.row, 'cancel')" icon="sc-icon-Revoke">撤回</el-dropdown-item>-->
<el-dropdown-item @click="table_edit(scope.row, 'edit')" icon="sc-icon-Edit">修改</el-dropdown-item>
<el-dropdown-item @click="table_del(scope.row, 'delete')" icon="sc-icon-Delete" divided>删除</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-popconfirm>
</el-button-group>
</el-dropdown>
</template>
</el-table-column>
</scTable>
</el-main>
</el-container>
@ -57,10 +52,14 @@
},
data() {
return {
size:'small',
dialog: {
save: false
},
list: {
apiObj: this.$API.system.dept.list,
column: [],
},
selection: [],
search: {
keyword: null
@ -89,15 +88,32 @@
this.$refs.saveDialog.open('show').setData(row)
})
},
//
changeSwitch(val, row) {
row.$switch_yx = true;
setTimeout(async () => {
let params = {
id: row.id,
status: row.active_status,
};
const res = await this.$API.system.dept.status.post(params);
if(res.code ==200){
console.log(res.data)
}else{
row.active_status = !row.active_status;
}
delete row.$switch_yx;
}, 500);
},
//
async table_del(row){
var reqData = {id: row.id}
var res = await this.$API.demo.post.post(reqData);
const reqData = {id: row.id};
const res = await this.$API.demo.post.post(reqData);
if(res.code == 200){
this.$refs.table.refresh()
this.$message.success("删除成功")
}else{
this.$alert(res.message, "提示", {type: 'error'})
await this.$alert(res.message, "提示", {type: 'error'})
}
},
//
@ -116,14 +132,10 @@
//
selectionChange(selection){
this.selection = selection;
},
//
upsearch(){
},
//ID
filterTree(id){
var target = null;
let target = null;
function filter(tree){
tree.forEach(item => {
if(item.id == id){
@ -149,5 +161,6 @@
}
</script>
<style>
<style lang="scss" scoped>
</style>

View File

@ -7,9 +7,6 @@
<el-form-item label="部门名称" prop="label">
<el-input v-model="form.label" placeholder="请输入部门名称" clearable></el-input>
</el-form-item>
<el-form-item label="排序" prop="sort">
<el-input-number v-model="form.sort" controls-position="right" :min="1" style="width: 100%;"></el-input-number>
</el-form-item>
<el-form-item label="是否有效" prop="status">
<el-switch v-model="form.status" :active-value="1" :inactive-value="0"></el-switch>
</el-form-item>

View File

@ -1,43 +1,41 @@
<template>
<el-container>
<el-container class="mainBox mainBoxHeaderNoBorder">
<el-header>
<div class="left-panel">
<el-button type="primary" icon="el-icon-plus" @click="add"></el-button>
<el-button type="danger" plain icon="el-icon-delete" :disabled="selection.length==0" @click="batch_del"></el-button>
<el-button type="primary" plain :disabled="selection.length!=1" @click="permission">权限设置</el-button>
<el-button type="primary" :size="size" icon="el-icon-plus" @click="add"></el-button>
<el-button type="danger" :size="size" plain icon="el-icon-delete" :disabled="selection.length==0" @click="batch_del"></el-button>
<el-button type="primary" :size="size" plain :disabled="selection.length!=1" @click="permission">权限设置</el-button>
</div>
<div class="right-panel">
<div class="right-panel-search">
<el-input v-model="search.keyword" placeholder="角色名称" clearable></el-input>
<el-button type="primary" icon="el-icon-search" @click="upsearch"></el-button>
<el-input :size="size" v-model="search.keyword" placeholder="角色名称" clearable></el-input>
<el-button :size="size" type="primary" icon="el-icon-search" @click="upsearch"></el-button>
</div>
</div>
</el-header>
<el-main class="nopadding">
<scTable ref="table" :apiObj="apiObj" row-key="id" @selection-change="selectionChange" stripe>
<el-table-column type="selection" width="50"></el-table-column>
<el-table-column label="#" type="index" width="50"></el-table-column>
<scTable ref="table" :apiObj="list.apiObj" row-key="id" @selection-change="selectionChange" stripe :size="size">
<el-table-column type="selection" align="center" width="50"></el-table-column>
<el-table-column label="序号" type="index" align="center" width="50"></el-table-column>
<el-table-column label="角色名称" prop="label" width="150"></el-table-column>
<el-table-column label="别名" prop="alias" width="200"></el-table-column>
<el-table-column label="排序" prop="sort" width="80"></el-table-column>
<el-table-column label="状态" prop="status" width="80">
<template #default="scope">
<el-switch v-model="scope.row.status" @change="changeSwitch($event, scope.row)" :loading="scope.row.$switch_status" active-value="1" inactive-value="0"></el-switch>
<el-switch v-model="scope.row.status" @change="changeSwitch($event, scope.row)" :loading="scope.row.$switch_status" :active-value="true" :inactive-value="false"></el-switch>
</template>
</el-table-column>
<el-table-column label="创建时间" prop="date" width="180"></el-table-column>
<el-table-column label="备注" prop="remark" min-width="150"></el-table-column>
<el-table-column label="操作" fixed="right" align="right" width="170">
<el-table-column label="操作" fixed="right" align="center" width="170">
<template #default="scope">
<el-button-group>
<el-button text type="primary" size="small" @click="table_show(scope.row, scope.$index)">查看</el-button>
<el-button text type="primary" size="small" @click="table_edit(scope.row, scope.$index)">编辑</el-button>
<el-popconfirm title="确定删除吗?" @confirm="table_del(scope.row, scope.$index)">
<template #reference>
<el-button text type="primary" size="small">删除</el-button>
<el-dropdown>
<el-button class="noBorderBtn" icon="el-icon-more" :size="size"></el-button>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item @click="table_edit(scope.row, 'edit')" icon="sc-icon-Edit">修改</el-dropdown-item>
<el-dropdown-item @click="table_del(scope.row, 'delete')" icon="sc-icon-Delete" divided>删除</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-popconfirm>
</el-button-group>
</el-dropdown>
</template>
</el-table-column>
@ -63,11 +61,16 @@
},
data() {
return {
size:'small',
dialog: {
save: false,
permission: false
},
list:{
apiObj: this.$API.system.role.list,
column:[]
},
selection: [],
search: {
keyword: null

View File

@ -1,15 +1,12 @@
<template>
<el-dialog :title="titleMap[mode]" v-model="visible" :width="500" destroy-on-close @closed="$emit('closed')">
<el-form :model="form" :rules="rules" :disabled="mode=='show'" ref="dialogForm" label-width="100px" label-position="left">
<el-form :model="form" :rules="rules" :disabled="mode=='show'" ref="dialogForm" label-width="120px" label-position="right">
<el-form-item label="角色名称" prop="label">
<el-input v-model="form.label" clearable></el-input>
</el-form-item>
<el-form-item label="角色别名" prop="alias">
<el-input v-model="form.alias" clearable></el-input>
</el-form-item>
<el-form-item label="排序" prop="sort">
<el-input-number v-model="form.sort" controls-position="right" :min="1" style="width: 100%;"></el-input-number>
</el-form-item>
<el-form-item label="是否有效" prop="status">
<el-switch v-model="form.status" active-value="1" inactive-value="0"></el-switch>
</el-form-item>

View File

@ -1,9 +1,9 @@
<template>
<el-container>
<el-container class="mainBox ">
<el-aside width="200px" v-loading="showGrouploading">
<el-container>
<el-header>
<el-input placeholder="输入关键字进行过滤" v-model="groupFilterText" clearable></el-input>
<el-input placeholder="输入关键字进行过滤" :size="size" v-model="groupFilterText" clearable></el-input>
</el-header>
<el-main class="nopadding">
<el-tree ref="group" class="menu" node-key="id" :data="group" :current-node-key="''" :highlight-current="true" :expand-on-click-node="false" :filter-node-method="groupFilterNode" @node-click="groupClick"></el-tree>
@ -13,42 +13,42 @@
<el-container>
<el-header>
<div class="left-panel">
<el-button type="primary" icon="el-icon-plus" @click="add"></el-button>
<el-button type="danger" plain icon="el-icon-delete" :disabled="selection.length==0" @click="batch_del"></el-button>
<el-button type="primary" plain :disabled="selection.length==0">分配角色</el-button>
<el-button type="primary" plain :disabled="selection.length==0">密码重置</el-button>
<el-button type="primary" :size="size" icon="el-icon-plus" @click="add"></el-button>
<el-button type="danger" plain :size="size" icon="el-icon-delete" :disabled="selection.length==0" @click="batch_del"></el-button>
<el-button type="primary" plain :size="size" :disabled="selection.length==0">分配角色</el-button>
<el-button type="primary" plain :size="size" :disabled="selection.length==0">密码重置</el-button>
</div>
<div class="right-panel">
<div class="right-panel-search">
<el-input v-model="search.name" placeholder="登录账号 / 姓名" clearable></el-input>
<el-button type="primary" icon="el-icon-search" @click="upsearch"></el-button>
<el-input v-model="search.name" :size="size" placeholder="关键字" clearable></el-input>
<el-button type="primary" :size="size" icon="el-icon-search" @click="upSearch"></el-button>
</div>
</div>
</el-header>
<el-main class="nopadding">
<scTable ref="table" :apiObj="apiObj" @selection-change="selectionChange" stripe remoteSort remoteFilter>
<el-table-column type="selection" width="50"></el-table-column>
<el-table-column label="ID" prop="id" width="80" sortable='custom'></el-table-column>
<el-table-column label="头像" width="80" column-key="filterAvatar" :filters="[{text: '已上传', value: '1'}, {text: '未上传', value: '0'}]">
<template #default="scope">
<scTable ref="table" :apiObj="apiObj" @selection-change="selectionChange" stripe :size="size" remoteSort remoteFilter>
<el-table-column type="selection" align="center" width="45"></el-table-column>
<el-table-column label="序号" type="index" align="center" width="50"></el-table-column>
<template #avatar="scope">
<div class="userImg">
<el-avatar :src="scope.row.avatar" size="small"></el-avatar>
</div>
</template>
</el-table-column>
<el-table-column label="登录账号" prop="userName" width="150" sortable='custom' column-key="filterUserName" :filters="[{text: '系统账号', value: '1'}, {text: '普通账号', value: '0'}]"></el-table-column>
<el-table-column label="姓名" prop="name" width="150" sortable='custom'></el-table-column>
<el-table-column label="所属角色" prop="groupName" width="200" sortable='custom'></el-table-column>
<el-table-column label="加入时间" prop="date" width="170" sortable='custom'></el-table-column>
<el-table-column label="操作" fixed="right" align="right" width="160">
<template #active_status="scope">
<el-switch :size="size" v-model="scope.row.active_status" @change="changeSwitch($event, scope.row)" :loading="scope.row.$switch_status" :active-value="true" :inactive-value="false"></el-switch>
</template>
<el-table-column label="操作" fixed="right" align="center" width="160">
<template #default="scope">
<el-button-group>
<el-button text type="primary" size="small" @click="table_show(scope.row, scope.$index)">查看</el-button>
<el-button text type="primary" size="small" @click="table_edit(scope.row, scope.$index)">编辑</el-button>
<el-popconfirm title="确定删除吗?" @confirm="table_del(scope.row, scope.$index)">
<template #reference>
<el-button text type="primary" size="small">删除</el-button>
<el-dropdown>
<el-button class="noBorderBtn" icon="el-icon-more" :size="size"></el-button>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item @click="table_show(scope.row, 'show')" icon="sc-icon-See">用户详情</el-dropdown-item>
<el-dropdown-item @click="table_edit(scope.row, 'edit')" icon="sc-icon-Edit">编辑用户</el-dropdown-item>
<el-dropdown-item @click="table_del(scope.row, 'delete')" icon="sc-icon-Delete">删除用户</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-popconfirm>
</el-button-group>
</el-dropdown>
</template>
</el-table-column>
@ -71,6 +71,7 @@
},
data() {
return {
size:'small',
dialog: {
save: false
},
@ -152,9 +153,9 @@
//
async getGroup(){
this.showGrouploading = true;
var res = await this.$API.system.dept.list.get();
const res = await this.$API.system.dept.active.post();
this.showGrouploading = false;
var allNode ={id: '', label: '所有'}
const allNode = {id: '', label: '所有'};
res.data.unshift(allNode);
this.group = res.data;
},
@ -165,13 +166,28 @@
},
//
groupClick(data){
var params = {
const params = {
groupId: data.id
}
};
this.$refs.table.reload(params)
},
//
changeSwitch(val, row) {
row.$switch_yx = true;
setTimeout(async () => {
let params = {
id: row.id,
status: row.active_status,
};
const res = await this.$API.system.user.status.post(params);
if(res.code !=200){
row.active_status = !row.active_status;
}
delete row.$switch_yx;
}, 500);
},
//
upsearch(){
upSearch(){
this.$refs.table.upData(this.search)
},
//

View File

@ -1,6 +1,6 @@
<template>
<el-dialog :title="titleMap[mode]" v-model="visible" :width="500" destroy-on-close @closed="$emit('closed')">
<el-form :model="form" :rules="rules" :disabled="mode=='show'" ref="dialogForm" label-width="100px" label-position="left">
<el-form :model="form" :rules="rules" :disabled="mode=='show'" ref="dialogForm" label-width="100px" label-position="right">
<el-form-item label="头像" prop="avatar">
<sc-upload v-model="form.avatar" title="上传头像"></sc-upload>
</el-form-item>

View File

@ -11,7 +11,7 @@
</div>
</div>
</el-header>
<el-main class="nopadding">
<el-main class="nopadding noBorderRadius">
<el-menu class="menu mainMenu" :default-active="page">
<el-menu-item-group v-for="group in menu" :key="group.groupName" :title="group.groupName">
<el-menu-item v-for="item in group.list" :key="item.component" :index="item.component" @click="openPage">

View File

@ -27,7 +27,7 @@
<el-input v-model="form.about" type="textarea"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary">保存</el-button>
<el-button type="primary" @click="save">保存</el-button>
</el-form-item>
</el-form>
</el-card>
@ -101,7 +101,7 @@ export default {
if (!validate) {
return false
}
const res = await this.$API.system.user.verifyCode.post({mobile: this.form.mobile});
const res = await this.$API.user.verifyCode.post({mobile: this.form.mobile});
if (res.code === 200) {
this.$message.success('短信已发送至手机号码');
this.disabled = true
@ -119,9 +119,8 @@ export default {
save() {
this.$refs.form.validate(async (valid) => {
if (valid) {
const res = await this.$API.system.user.updateProfile.post(this.form)
const res = await this.$API.user.editUser.post(this.form)
if (res.code === 200) {
// this.$TOOL.data.set("USER_INFO", res.data)
this.$message.success("操作成功");
await this.getInfo();
}

View File

@ -15,8 +15,8 @@
</div>
</div>
<div class="rightBtn">
<el-button type="primary" :size="size" round v-if="wechat.open_id==''" @click="bindWechat"></el-button>
<el-button type="primary" :size="size" round v-else plain @click="secureDingTalk(1)"></el-button>
<el-button type="primary" :size="size" v-if="wechat.open_id==''" @click="bindWechat"> </el-button>
<el-button type="primary" :size="size" v-else plain @click="secureDingTalk(1)"> </el-button>
</div>
</div>
<div class="boxView">
@ -32,8 +32,8 @@
</div>
</div>
<div class="rightBtn">
<el-button type="primary" :size="size" round v-if="dingTalk.open_id==''" @click="bindDingTalk"></el-button>
<el-button type="primary" :size="size" round v-else plain @click="secureDingTalk(2)"></el-button>
<el-button type="primary" :size="size" v-if="dingTalk.open_id==''" @click="bindDingTalk"> </el-button>
<el-button type="primary" :size="size" v-else plain @click="secureDingTalk(2)"> </el-button>
</div>
</div>
<div class="title">安全登录</div>
@ -59,7 +59,7 @@
<div class="title">使用Passkey</div>
<div class="boxView boxViewCenter">
<div class="nameBox passkeyView">
<el-button type="primary" round :size="size" @click="createPasskey">添加指纹</el-button>
<el-button type="primary" :size="size" @click="createPasskey">添加指纹</el-button>
<div class="msg">借助 Passkey你可以使用自己的指纹面孔屏锁设置或实体安全密钥登录你的账号请仅在你自有的设备上设置 Passkey</div>
</div>
</div>
@ -123,7 +123,7 @@ export default {
const userInfo = this.$TOOL.data.get("USER_INFO");
this.userInfo = userInfo;
// this.getUserInfo();
this.getUserInfo();
// this.getSso();
//
// this.$socketApi.getSock(this.getWsResult);
@ -245,7 +245,6 @@ export default {
async createPasskey() {
try {
const res = await this.$API.system.user.generateRegistration.post();
const publicKey= {
challenge:Uint8Array.from(res.data.challenge),
rp:{

View File

@ -2,10 +2,10 @@
<el-card shadow="never" header="修改密码">
<el-alert title="密码更新成功后,您将被重定向到登录页面,您可以使用新密码重新登录。" type="error" show-icon style="margin-bottom: 15px;"/>
<el-form ref="form" :model="form" :rules="rules" label-width="120px" style="margin-top:20px;width: 518px;">
<el-form-item label="当前密码" prop="userPassword">
<el-input v-model="form.userPassword" type="password" show-password placeholder="请输入当前密码"></el-input>
<el-form-item label="当前密码" prop="old_pwd">
<el-input v-model="form.old_pwd" type="password" show-password placeholder="请输入当前密码"></el-input>
</el-form-item>
<el-form-item label="新密码" prop="newPassword">
<el-form-item label="新密码" prop="new_pwd">
<el-popover
class="popoverPassword"
placement="right"
@ -15,13 +15,13 @@
content=""
>
<template #reference>
<el-input v-model="form.newPassword" type="password" show-password placeholder="请输入新密码"></el-input>
<el-input v-model="form.new_pwd" type="password" show-password placeholder="请输入新密码"></el-input>
</template>
<template #default>
<div class="passwordView">
<div class="title">
<div class="name">安全程度等级:</div>
<div class="strength"><sc-password-strength v-model="form.newPassword"></sc-password-strength></div>
<div class="strength"><sc-password-strength v-model="form.new_pwd"></sc-password-strength></div>
</div>
<div class="text"><div class="icon"></div>6-20位字符</div>
<div class="text"><div class="icon"></div>只能包含大小写字母数字和标点符号除空格</div>
@ -29,8 +29,8 @@
</template>
</el-popover>
</el-form-item>
<el-form-item label="确认新密码" prop="confirmNewPassword">
<el-input v-model="form.confirmNewPassword" type="password" show-password placeholder="请再次输入新密码"></el-input>
<el-form-item label="确认新密码" prop="conf_pwd">
<el-input v-model="form.conf_pwd" type="password" show-password placeholder="请再次输入新密码"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="save">保存密码</el-button>
@ -49,21 +49,21 @@
data() {
return {
form: {
userPassword: "",
newPassword: "",
confirmNewPassword: ""
old_pwd: "",
new_pwd: "",
conf_pwd: ""
},
rules: {
userPassword: [
old_pwd: [
{ required: true, message: '请输入当前密码'}
],
newPassword: [
new_pwd: [
{ required: true, message: '请输入新密码'}
],
confirmNewPassword: [
conf_pwd: [
{ required: true, message: '请再次输入新密码'},
{validator: (rule, value, callback) => {
if (value !== this.form.newPassword) {
if (value !== this.form.new_pwd) {
callback(new Error('两次输入密码不一致'));
}else{
callback();
@ -75,8 +75,10 @@
},
methods: {
save(){
this.$refs.form.validate(valid => {
this.$refs.form.validate(async valid => {
if (valid) {
const res = await this.$API.user.editPass.post(this.form);
if(res.code == 200){
this.$alert("密码修改成功,是否跳转至登录页使用新密码登录", "修改成功", {
type: 'success',
center: true
@ -85,6 +87,7 @@
path: '/login'
})
}).catch(() => {})
}
} else {
return false
}