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
2373db28
Commit
2373db28
authored
Sep 08, 2025
by
ningjihai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
发现梳理
parent
6bc00674
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
752 行增加
和
212 行删除
+752
-212
src/api/discover/index.js
+93
-35
src/views/discover/Discover/discoverProcess.vue
+138
-67
src/views/discover/Discover/discoverResult.vue
+0
-0
src/views/discover/Discover/list.vue
+156
-24
src/views/discover/Discover/modules/DomainRuleDialog.vue
+0
-0
src/views/discover/Discover/modules/MatchPreviewDialog.vue
+134
-66
src/views/discover/Discover/modules/SaveVersionDialog.vue
+214
-0
src/views/project/Project/list.vue
+17
-20
没有找到文件。
src/api/discover/index.js
View file @
2373db28
...
@@ -69,44 +69,102 @@ export function initEdit(taskid) {
...
@@ -69,44 +69,102 @@ export function initEdit(taskid) {
})
})
}
}
// export function getdatascopeprojectlist(data) {
export
function
delDiscoverTask
(
data
)
{
// return request({
return
request
({
// url: '/core/datascopeproject/getdatascopeprojectlist',
url
:
'/core/tdatadiscovery/del'
,
// method: 'post',
method
:
'post'
,
// data: data
data
:
data
// })
})
// }
}
// export function checkDatasystemName(data) {
export
function
executetask
(
data
)
{
// return request({
return
request
({
// url: '/core/tdataproject/checkDatasystemName',
url
:
'/core/discoverytask/executetask'
,
// method: 'post',
method
:
'post'
,
// data: data
data
:
data
// })
})
// }
}
export
function
tdataMonitorQuery
(
query
)
{
return
request
({
url
:
'/core/tdataMonitor/query'
,
method
:
'get'
,
params
:
query
})
}
export
function
getdiscoverresultreport
(
query
)
{
return
request
({
url
:
'/core/tdiscoverresult/getdiscoverresultreport'
,
method
:
'get'
,
params
:
query
})
}
export
function
getarearule
(
query
)
{
return
request
({
url
:
'/core/tdiscoverresult/getarearule'
,
method
:
'get'
,
params
:
query
})
}
export
function
initExecute
(
query
)
{
return
request
({
url
:
'/core/tdatadiscovery/initExecute'
,
method
:
'get'
,
params
:
query
})
}
export
function
tdiscoverresultQuery
(
data
)
{
return
request
({
url
:
'/core/tdiscoverresult/query'
,
method
:
'post'
,
data
:
data
})
}
export
function
discoverresultsure
(
data
)
{
return
request
({
url
:
'/core/tdiscoverresult/discoverresultsure'
,
method
:
'post'
,
data
:
data
})
}
export
function
discoverchangerule
(
data
)
{
return
request
({
url
:
'/core/tdiscoverresult/discoverchangerule'
,
method
:
'post'
,
data
:
data
})
}
export
function
showmatchrate
(
data
)
{
return
request
({
url
:
'/core/tdiscoverresult/showmatchrate'
,
method
:
'post'
,
data
:
data
})
}
export
function
saveedition
(
data
)
{
return
request
({
url
:
'/core/tdiscoverresult/saveedition'
,
method
:
'post'
,
data
:
data
})
}
export
function
download
(
query
)
{
return
request
({
url
:
'/core/tdiscoverresult/download'
,
method
:
'get'
,
params
:
query
,
responseType
:
'blob'
//
})
}
// export function checkDatasystem(data) {
// return request({
// url: '/core/tdataproject/checkDatasystem',
// method: 'post',
// data: data
// })
// }
// export function queryByEditSort(data) {
// return request({
// url: '/core/tdatasource/queryByEditSort',
// method: 'post',
// data: data
// })
// }
// export function selectProDataSource(data) {
// return request({
// url: '/core/tdatasource/selectProDataSource',
// method: 'post',
// data: data
// })
// }
// export function queryShemas(data) {
// export function queryShemas(data) {
// return request({
// return request({
...
...
src/views/discover/Discover/discoverProcess.vue
View file @
2373db28
差异被折叠。
点击展开。
src/views/discover/Discover/discoverResult.vue
View file @
2373db28
差异被折叠。
点击展开。
src/views/discover/Discover/list.vue
View file @
2373db28
...
@@ -13,8 +13,10 @@ import SmartDiscoveryDialog from './modules/SmartDiscoveryDialog.vue'
...
@@ -13,8 +13,10 @@ import SmartDiscoveryDialog from './modules/SmartDiscoveryDialog.vue'
import
{
import
{
queryDiscoverList
queryDiscoverList
,
delDiscoverTask
,
executetask
,
initExecute
}
from
'@/api/discover/index'
}
from
'@/api/discover/index'
const
route
=
useRoute
()
const
route
=
useRoute
()
...
@@ -166,25 +168,71 @@ const handleEdit = (row) => {
...
@@ -166,25 +168,71 @@ const handleEdit = (row) => {
const
handleDiscover
=
(
row
)
=>
{
const
handleDiscover
=
(
row
)
=>
{
console
.
log
(
'发现:'
,
row
)
console
.
log
(
'发现:'
,
row
)
ElMessage
.
success
(
`开始发现任务:
${
row
.
taskName
}
`
)
emit
(
'page'
,
'discoverProcess'
,
{
listItem
:
row
})
// router.push({
// path: '/user/discoverProcess',
// query: {
// taskid: row.id,
// resultid: row.resultid,
// datasystemid: row.datasystemid,
// discoverTaskName: row.tname,
// btnStatus: '1'
// }
// })
}
ElMessageBox
.
confirm
(
'确认执行发现任务吗?'
+
`[
${
row
.
taskName
}
]`
,
'确认'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(
async
()
=>
{
executetask
({
taskid
:
row
.
id
,
version
:
''
,
datasystemid
:
row
.
datasystemid
,
taskname
:
row
.
tname
,
projectid
:
sessionStorage
.
getItem
(
'projectId'
),
project
:
sessionStorage
.
getItem
(
'projectName'
)
}).
then
(
res
=>
{
if
(
res
.
flag
){
appStore
.
setQueryData
({
taskid
:
row
.
id
,
btnStatus
:
'1'
,
resultid
:
row
.
resultid
,
datasystemid
:
row
.
datasystemid
,
discoverTaskName
:
row
.
tname
,
icon
:
route
.
meta
.
icon
,
breadPathData
:
[
{
path
:
route
.
path
,
label
:
route
.
meta
.
title
},
{
label
:
"发现进度"
}
]
});
emit
(
'page'
,
'discoverProcess'
,
{
listItem
:
row
})
}
else
{
ElMessage
.
error
(
res
.
msg
)
}
})
})
}
/**
* 监控
* @param row
*/
const
handleMonitor
=
(
row
)
=>
{
const
handleMonitor
=
(
row
)
=>
{
console
.
log
(
'监控:'
,
row
)
appStore
.
setQueryData
({
ElMessage
.
warning
(
`监控任务:
${
row
.
taskName
}
`
)
taskid
:
row
.
id
,
emit
(
'page'
,
'discoverProcess'
,
{
listItem
:
row
})
btnStatus
:
row
.
taskstatus
,
resultid
:
row
.
resultid
,
datasystemid
:
row
.
datasystemid
,
discoverTaskName
:
row
.
tname
,
icon
:
route
.
meta
.
icon
,
breadPathData
:
[
{
path
:
route
.
path
,
label
:
route
.
meta
.
title
},
{
label
:
"发现进度"
}
]
});
emit
(
'page'
,
'discoverProcess'
,
{
listItem
:
row
})
}
}
const
smartDiscoveryDialogRef
=
ref
()
const
smartDiscoveryDialogRef
=
ref
()
const
smartData
=
ref
(
null
)
const
smartData
=
ref
(
null
)
...
@@ -193,7 +241,6 @@ const handleMoreCommand = (command, row) => {
...
@@ -193,7 +241,6 @@ const handleMoreCommand = (command, row) => {
case
'smartDiscover'
:
case
'smartDiscover'
:
smartData
.
value
=
row
smartData
.
value
=
row
handleSmartDiscover
(
row
)
handleSmartDiscover
(
row
)
ElMessage
.
info
(
`智能发现:
${
row
.
taskName
}
`
)
break
break
case
'viewHistory'
:
case
'viewHistory'
:
ElMessage
.
info
(
`查看历史:
${
row
.
taskName
}
`
)
ElMessage
.
info
(
`查看历史:
${
row
.
taskName
}
`
)
...
@@ -206,18 +253,103 @@ const handleMoreCommand = (command, row) => {
...
@@ -206,18 +253,103 @@ const handleMoreCommand = (command, row) => {
emit
(
'page'
,
'discoverResult'
)
emit
(
'page'
,
'discoverResult'
)
break
break
case
'delete'
:
case
'delete'
:
ElMessage
.
error
(
`删除任务:
${
row
.
taskName
}
`
)
ElMessageBox
.
confirm
(
'删除后无法恢复,是否确认删除?'
,
'确认'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(
async
()
=>
{
delDiscoverTask
({
dataSystemName
:
'orcl202'
,
taskid
:
row
.
id
}).
then
(
res
=>
{
if
(
res
.
flag
){
ElMessage
.
success
(
res
.
msg
)
handleQuery
()
}
else
{
ElMessage
.
error
(
res
.
msg
)
}
})
})
break
break
}
}
}
}
const
smartDiscoveryDialogVisible
=
ref
(
false
)
const
smartDiscoveryDialogVisible
=
ref
(
false
)
const
AIDIscoverVersionListDialog
=
ref
({
status
:
false
,
cacheData
:
{},
columnsData
:
[
{
title
:
'发现版本'
,
key
:
'name'
,
align
:
'left'
},
{
title
:
"操作"
,
slot
:
"action"
,
key
:
"action"
,
align
:
"center"
,
width
:
150
}
],
tableData
:
[]
})
// 打开智能发现弹窗
// 打开智能发现弹窗
const
handleSmartDiscover
=
(
row
)
=>
{
const
handleSmartDiscover
=
(
row
)
=>
{
// 可以传入特定的发现版本数据
initExecute
({
const
discoveryData
=
[
taskid
:
row
.
id
,
{
version
:
row
.
resultid
||
'12123'
}
// 使用任务的结果ID或默认值
projectid
:
sessionStorage
.
getItem
(
'projectId'
)
]
}).
then
(
res
=>
{
const
{
task_version
,
project_version
,
all_version
}
=
res
.
data
const
allVersionList
=
[];
AIDIscoverVersionListDialog
.
value
.
status
=
true
AIDIscoverVersionListDialog
.
value
.
cacheData
=
row
if
(
JSON
.
stringify
(
all_version
)
!==
'{}'
)
{
allVersionList
.
push
({
...
project_version
,
version
:
all_version
.
versionname
,
type
:
'all_version'
,
versionname
:
`全局版本:
${
all_version
.
versionname
}
`
})
}
if
(
JSON
.
stringify
(
project_version
)
!==
'{}'
)
{
allVersionList
.
push
({
...
project_version
,
version
:
project_version
.
versionname
,
type
:
'project_version'
,
versionname
:
`项目版本:
${
project_version
.
versionname
}
`
})
}
task_version
.
map
(
item
=>
{
item
.
version
=
item
.
versionname
;
item
.
type
=
item
.
filename
;
item
.
versionname
=
`任务版本:
${
item
.
versionname
}
`
;
allVersionList
.
push
(
item
);
})
AIDIscoverVersionListDialog
.
value
.
tableData
=
allVersionList
.
map
(
item
=>
{
return
{
...
item
,
name
:
item
.
versionname
,
icon
:
[
{
...
appStore
.
tableButtonIcons
.
discover
,
key
:
'action'
,
name
:
'handleDiscover'
,
label
:
'智能发现'
,
}
]
}
})
})
// 优先使用ref方式
// 优先使用ref方式
if
(
smartDiscoveryDialogRef
.
value
?.
openDialog
)
{
if
(
smartDiscoveryDialogRef
.
value
?.
openDialog
)
{
...
...
src/views/discover/Discover/modules/DomainRuleDialog.vue
View file @
2373db28
差异被折叠。
点击展开。
src/views/discover/Discover/modules/MatchPreviewDialog.vue
View file @
2373db28
...
@@ -6,45 +6,74 @@
...
@@ -6,45 +6,74 @@
:before-close=
"handleClose"
:before-close=
"handleClose"
>
>
<div
class=
"match-preview-dialog"
>
<div
class=
"match-preview-dialog"
>
<div
class=
"
match-content
"
>
<div
class=
"
content-container
"
>
<!-- 左侧:匹配的数据 -->
<!-- 左侧:匹配的数据 -->
<div
class=
"match-section"
>
<div
class=
"left-panel"
>
<div
class=
"section-header"
>
<div
class=
"panel-header"
>
<span
class=
"section-title"
>
匹配的数据
</span>
<h4>
匹配的数据
</h4>
<span
class=
"count-badge"
>
{{
matchedData
.
length
}}
</span>
</div>
<div
class=
"table-container"
>
<el-table
:data=
"matchedData"
height=
"400"
empty-text=
"暂无匹配数据"
:header-cell-style=
"
{ background: '#f0f7ff', color: '#606266' }"
>
<el-table-column
type=
"index"
label=
"序号"
width=
"60"
align=
"center"
/>
<el-table-column
prop=
"label"
label=
"数据值"
min-width=
"150"
show-overflow-tooltip
>
<template
#
default=
"
{ row }">
<span
class=
"data-value"
>
{{
row
.
label
}}
</span>
</
template
>
</el-table-column>
</el-table>
</div>
</div>
<el-table
:data=
"matchedData"
style=
"width: 100%"
height=
"400"
:header-cell-style=
"
{ background: '#f0f7ff', color: '#606266', fontWeight: 'bold' }"
empty-text="暂无匹配数据"
>
<el-table-column
prop=
"value"
label=
"匹配的数据"
align=
"center"
>
<template
#
default=
"
{ row }">
<span
class=
"match-value"
>
{{
row
.
value
}}
</span>
</
template
>
</el-table-column>
</el-table>
</div>
</div>
<!-- 分隔线 -->
<div
class=
"divider"
></div>
<!-- 右侧:不匹配的数据 -->
<!-- 右侧:不匹配的数据 -->
<div
class=
"match-section"
>
<div
class=
"right-panel"
>
<div
class=
"section-header"
>
<div
class=
"panel-header"
>
<span
class=
"section-title"
>
不匹配的数据
</span>
<h4>
不匹配的数据
</h4>
<span
class=
"count-badge"
>
{{ unmatchedData.length }}
</span>
</div>
<div
class=
"table-container"
>
<el-table
:data=
"unmatchedData"
height=
"400"
empty-text=
"暂无数据"
:header-cell-style=
"{ background: '#f0f7ff', color: '#606266' }"
>
<el-table-column
type=
"index"
label=
"序号"
width=
"60"
align=
"center"
/>
<el-table-column
prop=
"label"
label=
"数据值"
min-width=
"150"
show-overflow-tooltip
>
<
template
#
default=
"{ row }"
>
<span
class=
"data-value"
>
{{
row
.
label
}}
</span>
</
template
>
</el-table-column>
</el-table>
</div>
</div>
<el-table
:data=
"unmatchedData"
style=
"width: 100%"
height=
"400"
:header-cell-style=
"{ background: '#f0f7ff', color: '#606266', fontWeight: 'bold' }"
empty-text=
"暂无数据"
>
<el-table-column
prop=
"value"
label=
"不匹配的数据"
align=
"center"
>
<
template
#
default=
"{ row }"
>
<span
class=
"unmatch-value"
>
{{
row
.
value
}}
</span>
</
template
>
</el-table-column>
</el-table>
</div>
</div>
</div>
</div>
...
@@ -57,78 +86,117 @@
...
@@ -57,78 +86,117 @@
</template>
</template>
<
script
setup
>
<
script
setup
>
import
{
ref
,
computed
}
from
'vue'
import
{
ref
,
watch
}
from
'vue'
import
{
ElMessage
}
from
'element-plus'
const
props
=
defineProps
({
const
props
=
defineProps
({
modelValue
:
{
modelValue
:
{
type
:
Boolean
,
type
:
Boolean
,
default
:
false
default
:
false
},
},
// 匹配的数据
matchedData
:
{
matchedData
:
{
type
:
Array
,
type
:
Array
,
default
:
()
=>
[]
default
:
()
=>
[]
},
},
// 不匹配的数据
unmatchedData
:
{
unmatchedData
:
{
type
:
Array
,
type
:
Array
,
default
:
()
=>
[]
default
:
()
=>
[]
}
}
})
})
const
emit
=
defineEmits
([
'update:modelValue'
])
const
emit
=
defineEmits
([
'update:modelValue'
,
'close'
])
const
dialogVisible
=
computed
({
const
dialogVisible
=
computed
({
get
:
()
=>
props
.
modelValue
,
get
:
()
=>
props
.
modelValue
,
set
:
(
value
)
=>
emit
(
'update:modelValue'
,
value
)
set
:
(
value
)
=>
emit
(
'update:modelValue'
,
value
)
})
})
//
关闭弹窗
//
处理关闭
const
handleClose
=
()
=>
{
const
handleClose
=
()
=>
{
dialogVisible
.
value
=
false
dialogVisible
.
value
=
false
emit
(
'close'
)
}
}
// 暴露方法
// 监听对话框关闭,清空数据
defineExpose
({
watch
(
dialogVisible
,
(
newVal
)
=>
{
openDialog
:
()
=>
{
if
(
!
newVal
)
{
dialogVisible
.
value
=
true
// 对话框关闭时,可以通过父组件清空数据
emit
(
'close'
)
}
}
})
})
</
script
>
</
script
>
<
style
scoped
lang=
"scss"
>
<
style
scoped
lang=
"scss"
>
.match-preview-dialog
{
.match-preview-dialog
{
.
match-content
{
.
content-container
{
display
:
flex
;
display
:
flex
;
gap
:
20px
;
gap
:
0
;
margin-bottom
:
2
0px
;
height
:
45
0px
;
}
}
.match-section
{
.left-panel
,
.right-panel
{
flex
:
1
;
flex
:
1
;
background
:
#fafafa
;
display
:
flex
;
border-radius
:
6px
;
flex-direction
:
column
;
overflow
:
hidden
;
min-width
:
0
;
}
}
.section-header
{
.panel-header
{
background
:
#f0f7ff
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
padding
:
12px
16px
;
padding
:
12px
16px
;
background
:
#f0f7ff
;
border-bottom
:
1px
solid
#dcdfe6
;
border-bottom
:
1px
solid
#dcdfe6
;
.section-title
{
h4
{
margin
:
0
;
font-size
:
14px
;
font-size
:
14px
;
font-weight
:
600
;
font-weight
:
600
;
color
:
#303133
;
color
:
#303133
;
}
}
.count-badge
{
background
:
#1890ff
;
color
:
white
;
padding
:
2px
8px
;
border-radius
:
10px
;
font-size
:
12px
;
font-weight
:
500
;
}
}
.table-container
{
flex
:
1
;
border
:
1px
solid
#dcdfe6
;
border-top
:
none
;
border-radius
:
0
0
4px
4px
;
overflow
:
hidden
;
}
.divider
{
width
:
1px
;
background
:
#dcdfe6
;
margin
:
0
10px
;
}
.data-value
{
font-family
:
'Monaco'
,
'Consolas'
,
monospace
;
font-size
:
13px
;
color
:
#303133
;
}
}
:deep
(
.el-table
)
{
:deep
(
.el-table
)
{
border
-radius
:
0
;
border
:
none
;
.el-table__header-wrapper
{
.el-table__header-wrapper
{
th
{
th
{
background
:
#f0f7ff
!important
;
background
:
#f0f7ff
!important
;
.cell
{
font-weight
:
600
;
}
}
}
}
}
...
@@ -145,19 +213,10 @@ defineExpose({
...
@@ -145,19 +213,10 @@ defineExpose({
}
}
}
}
.match-value
{
color
:
#52c41a
;
font-weight
:
500
;
}
.unmatch-value
{
color
:
#ff4d4f
;
font-weight
:
500
;
}
.dialog-footer
{
.dialog-footer
{
display
:
flex
;
display
:
flex
;
justify-content
:
center
;
justify-content
:
center
;
margin-top
:
20px
;
padding-top
:
16px
;
padding-top
:
16px
;
border-top
:
1px
solid
#e0e0e0
;
border-top
:
1px
solid
#e0e0e0
;
}
}
...
@@ -166,12 +225,21 @@ defineExpose({
...
@@ -166,12 +225,21 @@ defineExpose({
//
响应式设计
//
响应式设计
@media
(
max-width
:
768px
)
{
@media
(
max-width
:
768px
)
{
.match-preview-dialog
{
.match-preview-dialog
{
.
match-content
{
.
content-container
{
flex-direction
:
column
;
flex-direction
:
column
;
height
:
600px
;
}
.left-panel
,
.right-panel
{
flex
:
none
;
height
:
250px
;
}
}
.match-section
{
.divider
{
min-height
:
200px
;
width
:
100%
;
height
:
1px
;
margin
:
10px
0
;
}
}
}
}
}
}
...
...
src/views/discover/Discover/modules/SaveVersionDialog.vue
0 → 100644
View file @
2373db28
<
template
>
<el-dialog
v-model=
"dialogVisible"
:title=
"title"
width=
"600px"
:before-close=
"handleClose"
>
<div
class=
"save-version-dialog"
>
<!-- 历史版本表格 -->
<div
class=
"history-section"
>
<h4
class=
"section-title"
>
历史版本
</h4>
<el-table
:data=
"historyList"
height=
"200"
empty-text=
"暂无历史版本"
:header-cell-style=
"
{ background: '#f0f7ff', color: '#606266' }"
>
<el-table-column
prop=
"versionname"
label=
"版本名称"
min-width=
"120"
show-overflow-tooltip
/>
<el-table-column
prop=
"operator"
label=
"操作人"
width=
"100"
align=
"center"
/>
<el-table-column
prop=
"savetime"
label=
"保存时间"
width=
"160"
align=
"center"
/>
</el-table>
</div>
<!-- 保存版本区域 -->
<div
class=
"save-section"
>
<h4
class=
"section-title"
>
保存版本
</h4>
<div
class=
"save-input-container"
>
<el-input
v-model=
"versionName"
placeholder=
"请输入版本名称"
clearable
class=
"version-input"
@
keyup
.
enter=
"handleSave"
/>
<el-button
type=
"primary"
@
click=
"handleSave"
:loading=
"saving"
class=
"save-btn"
>
保存
</el-button>
</div>
</div>
</div>
</el-dialog>
</
template
>
<
script
setup
>
import
{
ref
,
computed
,
watch
}
from
'vue'
import
{
ElMessage
}
from
'element-plus'
const
props
=
defineProps
({
modelValue
:
{
type
:
Boolean
,
default
:
false
},
title
:
{
type
:
String
,
default
:
'保存发现模板'
},
historyList
:
{
type
:
Array
,
default
:
()
=>
[]
},
versionName
:
{
type
:
String
,
default
:
''
}
})
const
emit
=
defineEmits
([
'update:modelValue'
,
'update:versionName'
,
'save'
,
'close'
])
const
dialogVisible
=
computed
({
get
:
()
=>
props
.
modelValue
,
set
:
(
value
)
=>
emit
(
'update:modelValue'
,
value
)
})
const
versionName
=
computed
({
get
:
()
=>
props
.
versionName
,
set
:
(
value
)
=>
emit
(
'update:versionName'
,
value
)
})
const
saving
=
ref
(
false
)
// 处理保存
const
handleSave
=
async
()
=>
{
if
(
!
versionName
.
value
.
trim
())
{
ElMessage
.
warning
(
'请输入版本名称'
)
return
}
saving
.
value
=
true
try
{
emit
(
'save'
,
versionName
.
value
.
trim
())
}
catch
(
error
)
{
console
.
error
(
'Save error:'
,
error
)
}
finally
{
saving
.
value
=
false
}
}
// 关闭弹窗
const
handleClose
=
()
=>
{
dialogVisible
.
value
=
false
emit
(
'close'
)
}
// 监听对话框显示状态,重置状态
watch
(
dialogVisible
,
(
newVal
)
=>
{
if
(
!
newVal
)
{
saving
.
value
=
false
}
})
</
script
>
<
style
scoped
lang=
"scss"
>
.save-version-dialog
{
.section-title
{
margin
:
0
0
12px
0
;
font-size
:
14px
;
font-weight
:
600
;
color
:
#303133
;
}
.history-section
{
margin-bottom
:
20px
;
:deep(.el-table)
{
border
:
1px
solid
#dcdfe6
;
border-radius
:
4px
;
.el-table__header-wrapper
{
th
{
background
:
#f0f7ff
;
font-weight
:
600
;
.cell
{
font-weight
:
600
;
}
}
}
.el-table__body-wrapper
{
.el-table__row
{
&:nth-child(even)
{
background-color
:
#fafafa
;
}
&
:hover
{
background-color
:
#f5f7fa
;
}
}
}
}
}
.save-section
{
.save-input-container
{
display
:
flex
;
gap
:
12px
;
align-items
:
center
;
.version-input
{
flex
:
1
;
:deep(.el-input__inner)
{
height
:
36px
;
}
}
.save-btn
{
height
:
36px
;
min-width
:
80px
;
}
}
}
}
//
响应式设计
@media
(
max-width
:
640px
)
{
.save-version-dialog
{
.save-input-container
{
flex-direction
:
column
;
align-items
:
stretch
;
.save-btn
{
width
:
100%
;
}
}
}
}
</
style
>
\ No newline at end of file
src/views/project/Project/list.vue
View file @
2373db28
...
@@ -150,28 +150,25 @@ const addLoading = ref(false)
...
@@ -150,28 +150,25 @@ const addLoading = ref(false)
const
showAddDialog
=
()
=>
{
const
showAddDialog
=
()
=>
{
addLoading
.
value
=
true
// addLoading.value = true
checkProjectNum
().
then
(
res
=>
{
// checkProjectNum().then(res=>{
console
.
log
(
'checkProjectNum'
,
res
)
// console.log('checkProjectNum',res)
if
(
res
.
flag
){
// if(res.flag){
currentProject
.
value
=
null
// currentProject.value = null
// dialogVisible.value = true
// addLoading.value = false
// }else{
// addLoading.value = false
// }
// }).catch(err=>{
// addLoading.value = false
// })
currentProject
.
value
=
null
dialogVisible
.
value
=
true
dialogVisible
.
value
=
true
// getdatascopeprojectlist().then(res=>{
// currentProject.value = null
// dialogVisible.value = true
// })
addLoading
.
value
=
false
}
else
{
addLoading
.
value
=
false
}
}).
catch
(
err
=>
{
addLoading
.
value
=
false
})
//
addLoading
.
value
=
false
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论