From 5945fb80bacf0abe5bc84e231524e57280d928de Mon Sep 17 00:00:00 2001 From: icssoa <2570063477@qq.com> Date: Tue, 17 May 2022 01:11:33 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=9B=BE=E7=89=87=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/cool/service/eps.ts | 2 +- src/cool/service/request.ts | 2 +- .../base/views/components/dept-tree.vue | 11 +++--- src/modules/upload/components/index.vue | 39 +++++++++++++------ 5 files changed, 37 insertions(+), 19 deletions(-) diff --git a/package.json b/package.json index 52d8b78..6ceea2d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "front-next", - "version": "5.1.5", + "version": "5.1.6", "scripts": { "dev": "vite --host", "build": "vite build", diff --git a/src/cool/service/eps.ts b/src/cool/service/eps.ts index c2b9c95..7017dad 100644 --- a/src/cool/service/eps.ts +++ b/src/cool/service/eps.ts @@ -5,7 +5,7 @@ import { isArray, isEmpty } from "lodash"; // 获取标签名 function getNames(v: any) { - return Object.getOwnPropertyNames(v.constructor.prototype).filter( + return [...Object.getOwnPropertyNames(v.constructor.prototype), ...Object.keys(v)].filter( (e) => !["namespace", "constructor", "request", "permission"].includes(e) ); } diff --git a/src/cool/service/request.ts b/src/cool/service/request.ts index 9c52786..6fdc974 100644 --- a/src/cool/service/request.ts +++ b/src/cool/service/request.ts @@ -7,7 +7,7 @@ import { href, storage } from "/@/cool/utils"; import { useBaseStore } from "/$/base"; axios.defaults.timeout = 30000; -axios.defaults.withCredentials = true; +axios.defaults.withCredentials = false; NProgress.configure({ showSpinner: false diff --git a/src/modules/base/views/components/dept-tree.vue b/src/modules/base/views/components/dept-tree.vue index 75ff38a..0ea1a0e 100644 --- a/src/modules/base/views/components/dept-tree.vue +++ b/src/modules/base/views/components/dept-tree.vue @@ -294,13 +294,14 @@ export default defineComponent({ d = list.value[0] || {}; } + // 权限 + const prem = service.base.sys.department._permission; + ContextMenu.open(e, { list: [ { label: "新增", - hidden: - (n && n.level >= props.level) || - !service.base.sys.department.permission.add, + hidden: (n && n.level >= props.level) || !prem.add, callback(done) { rowEdit({ name: "", @@ -312,7 +313,7 @@ export default defineComponent({ }, { label: "编辑", - hidden: !service.base.sys.department.permission.update, + hidden: !prem.update, callback(done) { rowEdit(d); done(); @@ -320,7 +321,7 @@ export default defineComponent({ }, { label: "删除", - hidden: !d.parentId || !service.base.sys.department.permission.delete, + hidden: !d.parentId || !prem.delete, callback(done) { rowDel(d); done(); diff --git a/src/modules/upload/components/index.vue b/src/modules/upload/components/index.vue index ec154ba..34d6974 100644 --- a/src/modules/upload/components/index.vue +++ b/src/modules/upload/components/index.vue @@ -89,8 +89,8 @@