Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
N
nse-ui
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Members
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
吴超
nse-ui
Commits
8f9ac928
Commit
8f9ac928
authored
Aug 28, 2025
by
ningjihai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
项目管理规则
parent
6966e17a
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
14 行增加
和
12 行删除
+14
-12
src/views/project/Project/ProjectEditDialog.vue
+14
-12
没有找到文件。
src/views/project/Project/ProjectEditDialog.vue
View file @
8f9ac928
...
@@ -628,13 +628,8 @@ const fetchAllSchemas = async (databases) => {
...
@@ -628,13 +628,8 @@ const fetchAllSchemas = async (databases) => {
const
processAreaAndRuleListForEdit
=
()
=>
{
const
processAreaAndRuleListForEdit
=
()
=>
{
// 这里需要根据实际情况获取项目详情中的 areaAndRuleList
// 这里需要根据实际情况获取项目详情中的 areaAndRuleList
// 假设我们已经有了 areaAndRuleList 数据
// 假设我们已经有了 areaAndRuleList 数据
const
areaAndRuleList
=
[
const
areaAndRuleList
=
areaAndRuleListRead
.
value
{
console
.
log
(
'======'
,)
"id"
:
"2c9381a198cab6e40198e05cba5803bc"
,
"dataarea_id"
:
"40287481777f245501777f27e6fe0000"
,
"rule_id"
:
"402874817780b607017780b823be0004"
}
]
if
(
!
areaAndRuleList
||
!
Array
.
isArray
(
areaAndRuleList
))
{
if
(
!
areaAndRuleList
||
!
Array
.
isArray
(
areaAndRuleList
))
{
console
.
warn
(
'areaAndRuleList为空或不是数组'
)
console
.
warn
(
'areaAndRuleList为空或不是数组'
)
...
@@ -648,11 +643,14 @@ const processAreaAndRuleListForEdit = () => {
...
@@ -648,11 +643,14 @@ const processAreaAndRuleListForEdit = () => {
const
selectedRuleIds
=
[]
const
selectedRuleIds
=
[]
// 遍历所有数据域分组和规则,找到匹配的规则
// 遍历所有数据域分组和规则,找到匹配的规则
console
.
log
(
'domainGroups'
,
domainGroups
.
value
)
domainGroups
.
value
.
forEach
(
group
=>
{
domainGroups
.
value
.
forEach
(
group
=>
{
group
.
list
.
forEach
(
rule
=>
{
group
.
list
.
forEach
(
rule
=>
{
// 检查这个规则是否在已选择的列表中
// 检查这个规则是否在已选择的列表中
const
isSelected
=
areaAndRuleList
.
some
(
item
=>
const
isSelected
=
areaAndRuleList
.
some
(
item
=>
item
&&
item
.
dataarea_id
===
group
.
dataarea_
id
&&
item
.
rule_id
===
rule
.
id
item
&&
item
.
dataarea_id
===
group
.
id
&&
item
.
rule_id
===
rule
.
id
)
)
if
(
isSelected
&&
rule
.
id
)
{
if
(
isSelected
&&
rule
.
id
)
{
...
@@ -692,6 +690,9 @@ const processSchemaList = (schemaList) => {
...
@@ -692,6 +690,9 @@ const processSchemaList = (schemaList) => {
const
handlechangeSelectDomains
=
(
val
)
=>
{
const
handlechangeSelectDomains
=
(
val
)
=>
{
console
.
log
(
'selectedDomains.value'
,
selectedDomains
.
value
)
console
.
log
(
'selectedDomains.value'
,
selectedDomains
.
value
)
}
}
const
areaAndRuleListRead
=
ref
([])
// 监听传入的项目数据变化
// 监听传入的项目数据变化
watch
(()
=>
props
.
projectData
,
(
newVal
)
=>
{
watch
(()
=>
props
.
projectData
,
(
newVal
)
=>
{
if
(
props
.
mode
===
'edit'
)
{
if
(
props
.
mode
===
'edit'
)
{
...
@@ -714,17 +715,18 @@ watch(() => props.projectData, (newVal) => {
...
@@ -714,17 +715,18 @@ watch(() => props.projectData, (newVal) => {
if
(
data
.
areaAndRuleList
&&
data
.
areaAndRuleList
.
length
>
0
)
{
if
(
data
.
areaAndRuleList
&&
data
.
areaAndRuleList
.
length
>
0
)
{
// 保存areaAndRuleList供后续使用
// 保存areaAndRuleList供后续使用
areaAndRuleListRead
.
value
=
data
.
areaAndRuleList
// 在第四步加载时处理规则选择
// 在第四步加载时处理规则选择
if
(
activeStep
.
value
===
4
)
{
//
if (activeStep.value === 4) {
// processAreaAndRuleListForEdit()
// processAreaAndRuleListForEdit()
formData
.
value
.
areaAndRuleList
=
data
.
areaAndRuleList
//
formData.value.areaAndRuleList = data.areaAndRuleList
}
//
}
}
}
}
else
{
}
else
{
ElMessage
.
error
(
res
.
msg
)
ElMessage
.
error
(
res
.
msg
)
}
}
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
console
.
log
(
err
)
ElMessage
.
error
(
err
.
msg
)
ElMessage
.
error
(
err
.
msg
)
})
})
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论