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 @@