Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-middle-front
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xingmin
yd-middle-front
Commits
a9f60ed6
Commit
a9f60ed6
authored
Sep 05, 2025
by
yuzhenWang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改缓存bug,隐藏删除按钮
parent
3c82c9ed
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
58 additions
and
39 deletions
+58
-39
src/api/common.js
+2
-2
src/layout/components/AppMain.vue
+7
-6
src/views/system/menu/index.vue
+2
-2
src/views/system/project/index.vue
+2
-2
src/views/system/project/permission.vue
+11
-5
src/views/system/role/index.vue
+2
-2
src/views/system/tenant/deptList.vue
+5
-3
src/views/system/tenant/index.vue
+2
-2
src/views/system/tenant/permission.vue
+24
-14
src/views/workbench/components/AppCard.vue
+1
-1
No files found.
src/api/common.js
View file @
a9f60ed6
...
@@ -20,9 +20,9 @@ export function uploadImage(data) {
...
@@ -20,9 +20,9 @@ export function uploadImage(data) {
})
})
}
}
// 查询用户是否有访问项目的权限
// 查询用户是否有访问项目的权限
export
function
getVisitPermission
(
projectBizId
)
{
export
function
getVisitPermission
(
projectBizId
,
tenantBizId
)
{
return
request
({
return
request
({
url
:
'/user/api/sysUser/login/permission/project/visit?projectBizId='
+
projectBizId
,
url
:
`/user/api/sysUser/login/permission/project/visit?projectBizId=
${
projectBizId
}
&tenantBizId=
${
tenantBizId
}
`
,
method
:
'get'
method
:
'get'
})
})
}
}
src/layout/components/AppMain.vue
View file @
a9f60ed6
...
@@ -2,9 +2,11 @@
...
@@ -2,9 +2,11 @@
<section
class=
"app-main"
>
<section
class=
"app-main"
>
<router-view
v-slot=
"
{ Component, route }">
<router-view
v-slot=
"
{ Component, route }">
<transition
name=
"fade-transform"
mode=
"out-in"
>
<transition
name=
"fade-transform"
mode=
"out-in"
>
<keep-alive
:include=
"tagsViewStore.cachedViews"
>
<!-- 慎用keep-alive缓存标签 -->
<component
v-if=
"!route.meta.link"
:is=
"Component"
:key=
"route.path"
/>
<!--
<keep-alive
:include=
"tagsViewStore.cachedViews"
>
</keep-alive>
</keep-alive>
-->
<component
v-if=
"!route.meta.link"
:is=
"Component"
:key=
"route.path"
/>
</transition>
</transition>
</router-view>
</router-view>
<iframe-toggle
/>
<iframe-toggle
/>
...
@@ -13,8 +15,8 @@
...
@@ -13,8 +15,8 @@
</
template
>
</
template
>
<
script
setup
>
<
script
setup
>
import
copyright
from
"./Copyright/index"
import
copyright
from
'./Copyright/index'
import
iframeToggle
from
"./IframeToggle/index"
import
iframeToggle
from
'./IframeToggle/index'
import
useTagsViewStore
from
'@/store/modules/tagsView'
import
useTagsViewStore
from
'@/store/modules/tagsView'
const
route
=
useRoute
()
const
route
=
useRoute
()
...
@@ -86,4 +88,3 @@ function addIframe() {
...
@@ -86,4 +88,3 @@ function addIframe() {
border-radius
:
3px
;
border-radius
:
3px
;
}
}
</
style
>
</
style
>
src/views/system/menu/index.vue
View file @
a9f60ed6
...
@@ -76,8 +76,8 @@
...
@@ -76,8 +76,8 @@
<el-button
link
type=
"primary"
icon=
"Edit"
@
click=
"handleUpdate(scope.row)"
<el-button
link
type=
"primary"
icon=
"Edit"
@
click=
"handleUpdate(scope.row)"
v-if=
"(userStore.isSuperAdmin === 0 && scope.row.scope !== 1) || userStore.isSuperAdmin === 1"
>
修改
</el-button>
v-if=
"(userStore.isSuperAdmin === 0 && scope.row.scope !== 1) || userStore.isSuperAdmin === 1"
>
修改
</el-button>
<!--
<el-button
link
type=
"primary"
icon=
"Plus"
@
click=
"handleAdd(scope.row)"
v-hasPermi=
"['system:menu:add']"
>
新增
</el-button>
-->
<!--
<el-button
link
type=
"primary"
icon=
"Plus"
@
click=
"handleAdd(scope.row)"
v-hasPermi=
"['system:menu:add']"
>
新增
</el-button>
-->
<el-button
link
type=
"primary"
icon=
"Delete"
@
click=
"handleDelete(scope.row)"
<
!--
<
el-button
link
type=
"primary"
icon=
"Delete"
@
click=
"handleDelete(scope.row)"
v-if=
"(userStore.isSuperAdmin === 0 && scope.row.scope !== 1) || userStore.isSuperAdmin === 1"
>
删除
</el-button>
v-if=
"(userStore.isSuperAdmin === 0 && scope.row.scope !== 1) || userStore.isSuperAdmin === 1"
>
删除
</el-button>
-->
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
...
src/views/system/project/index.vue
View file @
a9f60ed6
...
@@ -129,7 +129,7 @@
...
@@ -129,7 +129,7 @@
"
"
>
修改
</el-button
>
修改
</el-button
>
>
<el-button
<
!--
<
el-button
link
link
type=
"primary"
type=
"primary"
icon=
"Delete"
icon=
"Delete"
...
@@ -139,7 +139,7 @@
...
@@ -139,7 +139,7 @@
userStore.isSuperAdmin === 1
userStore.isSuperAdmin === 1
"
"
>
删除
</el-button
>
删除
</el-button
>
>
-->
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
...
src/views/system/project/permission.vue
View file @
a9f60ed6
<
template
>
<
template
>
<div
class=
"app-container"
>
<div
class=
"app-container"
>
<el-button
type=
"primary"
icon=
"Back"
@
click=
"handleBack"
style=
"margin-bottom: 10px"
>
返回
</el-button
>
<!-- 选项卡组件:增加 custom-tabs 类名 -->
<!-- 选项卡组件:增加 custom-tabs 类名 -->
<el-tabs
v-model=
"activeTab"
type=
"card"
@
tab-change=
"handleTabChange"
class=
"custom-tabs"
>
<el-tabs
v-model=
"activeTab"
type=
"card"
@
tab-change=
"handleTabChange"
class=
"custom-tabs"
>
<!-- 用户权限选项卡 -->
<!-- 用户权限选项卡 -->
...
@@ -621,6 +624,7 @@ import {
...
@@ -621,6 +624,7 @@ import {
import
{
ref
}
from
'vue'
import
{
ref
}
from
'vue'
import
useUserStore
from
'@/store/modules/user'
import
useUserStore
from
'@/store/modules/user'
const
router
=
useRouter
()
const
userStore
=
useUserStore
()
const
userStore
=
useUserStore
()
const
{
proxy
}
=
getCurrentInstance
()
const
{
proxy
}
=
getCurrentInstance
()
const
{
const
{
...
@@ -848,7 +852,7 @@ function importProjectUserListSubmitForm() {
...
@@ -848,7 +852,7 @@ function importProjectUserListSubmitForm() {
proxy
.
$modal
proxy
.
$modal
.
confirm
(
'是否确认导入用户账号为"'
+
importProjectUserListNameList
+
'"的数据项?'
)
.
confirm
(
'是否确认导入用户账号为"'
+
importProjectUserListNameList
+
'"的数据项?'
)
.
then
(
function
()
{
.
then
(
function
()
{
return
addImportProjectUserList
(
importProjectUserListIdList
,
projectBizId
,
tenantBizId
)
return
addImportProjectUserList
(
importProjectUserListIdList
,
projectBizId
,
tenantBizId
)
})
})
.
then
(()
=>
{
.
then
(()
=>
{
importProjectUserListOpen
.
value
=
false
importProjectUserListOpen
.
value
=
false
...
@@ -943,7 +947,7 @@ function importProjectRoleListSubmitForm() {
...
@@ -943,7 +947,7 @@ function importProjectRoleListSubmitForm() {
proxy
.
$modal
proxy
.
$modal
.
confirm
(
'是否确认导入角色名称为"'
+
importProjectRoleListNameList
+
'"的数据项?'
)
.
confirm
(
'是否确认导入角色名称为"'
+
importProjectRoleListNameList
+
'"的数据项?'
)
.
then
(
function
()
{
.
then
(
function
()
{
return
addImportProjectRoleList
(
importProjectRoleListIdList
,
projectBizId
,
tenantBizId
)
return
addImportProjectRoleList
(
importProjectRoleListIdList
,
projectBizId
,
tenantBizId
)
})
})
.
then
(()
=>
{
.
then
(()
=>
{
importProjectRoleListOpen
.
value
=
false
importProjectRoleListOpen
.
value
=
false
...
@@ -998,7 +1002,7 @@ function handleImportProjectMenuList() {
...
@@ -998,7 +1002,7 @@ function handleImportProjectMenuList() {
// 加载菜单树
// 加载菜单树
const
loadMenuTree
=
async
()
=>
{
const
loadMenuTree
=
async
()
=>
{
try
{
try
{
const
res
=
await
getMenuTree
(
route
.
query
.
projectBizId
,
route
.
query
.
tenantBizId
)
const
res
=
await
getMenuTree
(
route
.
query
.
projectBizId
,
route
.
query
.
tenantBizId
)
menuTree
.
value
=
res
.
data
// 直接使用后端返回的树形结构
menuTree
.
value
=
res
.
data
// 直接使用后端返回的树形结构
loadImportSelectedMenuList
()
// 加载选中的菜单列表,更新树勾选
loadImportSelectedMenuList
()
// 加载选中的菜单列表,更新树勾选
}
catch
(
error
)
{
}
catch
(
error
)
{
...
@@ -1009,7 +1013,7 @@ const loadMenuTree = async () => {
...
@@ -1009,7 +1013,7 @@ const loadMenuTree = async () => {
// 修改加载选中菜单列表的逻辑
// 修改加载选中菜单列表的逻辑
const
loadImportSelectedMenuList
=
async
()
=>
{
const
loadImportSelectedMenuList
=
async
()
=>
{
try
{
try
{
const
res
=
await
getImportSelectedMenuList
(
route
.
query
.
projectBizId
,
route
.
query
.
tenantBizId
)
const
res
=
await
getImportSelectedMenuList
(
route
.
query
.
projectBizId
,
route
.
query
.
tenantBizId
)
const
targetKeys
=
res
.
data
||
[]
const
targetKeys
=
res
.
data
||
[]
// 开启严格模式(禁用联动)
// 开启严格模式(禁用联动)
...
@@ -1368,7 +1372,9 @@ const handleTabChange = tabName => {
...
@@ -1368,7 +1372,9 @@ const handleTabChange = tabName => {
getMenuList
()
getMenuList
()
}
}
}
}
const
handleBack
=
()
=>
{
router
.
go
(
-
1
)
}
getUserList
()
getUserList
()
</
script
>
</
script
>
...
...
src/views/system/role/index.vue
View file @
a9f60ed6
...
@@ -90,8 +90,8 @@
...
@@ -90,8 +90,8 @@
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<el-button
link
type=
"primary"
icon=
"Edit"
@
click=
"handleUpdate(scope.row)"
<el-button
link
type=
"primary"
icon=
"Edit"
@
click=
"handleUpdate(scope.row)"
v-if=
"(userStore.isSuperAdmin === 0 && scope.row.scope !== 1) || userStore.isSuperAdmin === 1"
>
修改
</el-button>
v-if=
"(userStore.isSuperAdmin === 0 && scope.row.scope !== 1) || userStore.isSuperAdmin === 1"
>
修改
</el-button>
<el-button
link
type=
"primary"
icon=
"Delete"
<
!--
<
el-button
link
type=
"primary"
icon=
"Delete"
v-if=
"(userStore.isSuperAdmin === 0 && scope.row.scope !== 1) || userStore.isSuperAdmin === 1"
>
删除
</el-button>
v-if=
"(userStore.isSuperAdmin === 0 && scope.row.scope !== 1) || userStore.isSuperAdmin === 1"
>
删除
</el-button>
-->
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
...
src/views/system/tenant/deptList.vue
View file @
a9f60ed6
...
@@ -267,7 +267,6 @@ import { Splitpanes, Pane } from 'splitpanes'
...
@@ -267,7 +267,6 @@ import { Splitpanes, Pane } from 'splitpanes'
import
'splitpanes/dist/splitpanes.css'
import
'splitpanes/dist/splitpanes.css'
import
{
ref
}
from
'vue'
import
{
ref
}
from
'vue'
const
props
=
defineProps
({
const
props
=
defineProps
({
tenantBizId
:
{
tenantBizId
:
{
type
:
String
,
type
:
String
,
...
@@ -534,7 +533,7 @@ const getDeptTree = () => {
...
@@ -534,7 +533,7 @@ const getDeptTree = () => {
deptBizIdValue
.
value
=
response
.
data
[
0
].
deptBizId
deptBizIdValue
.
value
=
response
.
data
[
0
].
deptBizId
deptOptions
.
value
=
response
.
data
deptOptions
.
value
=
response
.
data
enabledDeptOptions
.
value
=
filterDisabledDept
(
JSON
.
parse
(
JSON
.
stringify
(
response
.
data
)))
enabledDeptOptions
.
value
=
filterDisabledDept
(
JSON
.
parse
(
JSON
.
stringify
(
response
.
data
)))
getList
()
//
getList()
// 等待 DOM 更新后选中第一个节点
// 等待 DOM 更新后选中第一个节点
nextTick
(()
=>
{
nextTick
(()
=>
{
selectFirstTreeNode
()
selectFirstTreeNode
()
...
@@ -638,7 +637,10 @@ watch(
...
@@ -638,7 +637,10 @@ watch(
newTab
=>
{
newTab
=>
{
if
(
newTab
==
'dept'
)
{
if
(
newTab
==
'dept'
)
{
getDeptTree
()
getDeptTree
()
resetQuery
()
dateRange
.
value
=
[]
proxy
.
resetForm
(
'queryRef'
)
queryParams
.
value
.
deptId
=
undefined
proxy
.
$refs
.
deptTreeRef
.
setCurrentKey
(
null
)
}
}
},
},
{
immediate
:
true
}
{
immediate
:
true
}
...
...
src/views/system/tenant/index.vue
View file @
a9f60ed6
...
@@ -124,9 +124,9 @@
...
@@ -124,9 +124,9 @@
<el-button
link
type=
"primary"
icon=
"Edit"
@
click=
"handleUpdate(scope.row)"
<el-button
link
type=
"primary"
icon=
"Edit"
@
click=
"handleUpdate(scope.row)"
>
修改
</el-button
>
修改
</el-button
>
>
<el-button
link
type=
"primary"
icon=
"Delete"
@
click=
"handleDelete(scope.row)"
<
!--
<
el-button
link
type=
"primary"
icon=
"Delete"
@
click=
"handleDelete(scope.row)"
>
删除
</el-button
>
删除
</el-button
>
>
-->
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
...
src/views/system/tenant/permission.vue
View file @
a9f60ed6
<
template
>
<
template
>
<div
class=
"app-container"
>
<div
class=
"app-container"
>
<el-button
type=
"primary"
icon=
"Back"
@
click=
"handleBack"
style=
"margin-bottom: 10px"
>
返回
</el-button
>
<!-- 选项卡组件:增加 custom-tabs 类名 -->
<!-- 选项卡组件:增加 custom-tabs 类名 -->
<el-tabs
v-model=
"activeTab"
type=
"card"
@
tab-change=
"handleTabChange"
class=
"custom-tabs"
>
<el-tabs
v-model=
"activeTab"
type=
"card"
@
tab-change=
"handleTabChange"
class=
"custom-tabs"
>
<!-- 项目权限选项卡 -->
<!-- 项目权限选项卡 -->
...
@@ -45,19 +48,19 @@
...
@@ -45,19 +48,19 @@
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<el-button
<el-button
link
link
type=
"primary"
type=
"primary"
icon=
"Edit"
icon=
"Edit"
@
click=
"handlePermission(scope.row)"
@
click=
"handlePermission(scope.row)"
v-if=
"
v-if=
"
(userStore.isSuperAdmin === 0 && scope.row.scope !== 1) ||
(userStore.isSuperAdmin === 0 && scope.row.scope !== 1) ||
userStore.isSuperAdmin === 1
userStore.isSuperAdmin === 1
"
"
>
分配权限
</el-button
>
分配权限
</el-button
>
>
<!--
<el-button
link
type=
"primary"
icon=
"Delete"
@
click=
"handleDelete(scope.row)"
--
>
<!--
<el-button
link
type=
"primary"
icon=
"Delete"
@
click=
"handleDelete(scope.row)"
--
>
<!-- >删除
</el-button-->
<!-- >删除
</el-button-->
<!-- >-->
<!-- >-->
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -938,7 +941,12 @@ function handleDelete(row) {
...
@@ -938,7 +941,12 @@ function handleDelete(row) {
/** 项目分配权限 */
/** 项目分配权限 */
function
handlePermission
(
row
)
{
function
handlePermission
(
row
)
{
router
.
push
(
`/system/project/permission?tenantBizId=`
+
route
.
query
.
tenantBizId
+
`&projectBizId=`
+
row
.
projectBizId
)
router
.
push
(
`/system/project/permission?tenantBizId=`
+
route
.
query
.
tenantBizId
+
`&projectBizId=`
+
row
.
projectBizId
)
}
}
//========项目-列表结束=========
//========项目-列表结束=========
...
@@ -1619,7 +1627,9 @@ const handleTabChange = tabName => {
...
@@ -1619,7 +1627,9 @@ const handleTabChange = tabName => {
getMenuList
()
getMenuList
()
}
}
}
}
const
handleBack
=
()
=>
{
router
.
go
(
-
1
)
}
getList
()
getList
()
</
script
>
</
script
>
...
...
src/views/workbench/components/AppCard.vue
View file @
a9f60ed6
...
@@ -26,7 +26,7 @@ const appName = computed(() => props.project.projectName)
...
@@ -26,7 +26,7 @@ const appName = computed(() => props.project.projectName)
const
handleClick
=
()
=>
{
const
handleClick
=
()
=>
{
console
.
log
(
'点击了应用卡片'
,
props
.
project
)
console
.
log
(
'点击了应用卡片'
,
props
.
project
)
getVisitPermission
(
props
.
project
.
projectBizId
).
then
(
response
=>
{
getVisitPermission
(
props
.
project
.
projectBizId
,
props
.
project
.
tenantBizId
).
then
(
response
=>
{
if
(
response
.
code
===
200
)
{
if
(
response
.
code
===
200
)
{
// 有权限访问项目,进行跳转
// 有权限访问项目,进行跳转
// 记录最近使用的应用
// 记录最近使用的应用
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment