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
fb919b51
Commit
fb919b51
authored
Aug 23, 2025
by
ningjihai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
项目列表
parent
8169093e
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
124 行增加
和
55 行删除
+124
-55
src/api/project/index.js
+14
-0
src/views/project/Project/QueryForm.vue
+6
-6
src/views/project/Project/list.vue
+104
-49
没有找到文件。
src/api/project/index.js
0 → 100644
View file @
fb919b51
import
request
from
'@/utils/request'
/**
* 项目列表
* @param {*} query
* @returns
*/
export
function
selectDataProject
(
data
)
{
return
request
({
url
:
'/core/tdataproject/selectDataProject'
,
method
:
'post'
,
data
:
data
})
}
src/views/project/Project/QueryForm.vue
View file @
fb919b51
...
...
@@ -34,8 +34,8 @@ function onSearch() {
// 重置
function
onReset
(
formRef
:
FormInstance
)
{
queryForm
.
value
.
pro
ject
Name
=
''
queryForm
.
value
.
remark
=
''
queryForm
.
value
.
proName
=
''
queryForm
.
value
.
note
=
''
emit
(
'reset'
,
formRef
)
}
...
...
@@ -49,16 +49,16 @@ function onReset(formRef: FormInstance) {
:model=
"queryForm"
@
search=
"onSearch"
@
reset=
"onReset"
>
<el-form-item
label=
"项目名称"
prop=
"pro
ject
Name"
>
<el-form-item
label=
"项目名称"
prop=
"proName"
>
<el-input
v-model=
"queryForm.pro
ject
Name"
v-model=
"queryForm.proName"
placeholder=
"请输入项目名称"
clearable
/>
</el-form-item>
<el-form-item
label=
"备注"
prop=
"
remark
"
>
<el-form-item
label=
"备注"
prop=
"
note
"
>
<el-input
v-model=
"queryForm.
remark
"
v-model=
"queryForm.
note
"
placeholder=
"请输入备注"
clearable
/>
...
...
src/views/project/Project/list.vue
View file @
fb919b51
<
script
setup
name=
"ProjectManageList"
>
import
{
getCurrentInstance
,
reactive
,
ref
,
toRefs
}
from
'vue'
import
{
getCurrentInstance
,
reactive
,
ref
,
toRefs
,
onMounted
}
from
'vue'
import
{
ElMessage
}
from
'element-plus'
import
QueryForm
from
'./QueryForm.vue'
import
ProjectEditDialog
from
'./ProjectEditDialog.vue'
...
...
@@ -7,10 +7,29 @@ import DownloadPluginDialog from './DownloadPluginDialog.vue'
import
ExportDialog
from
'./ExportDialog.vue'
import
{
useRouter
}
from
'vue-router'
import
{
changeRoute
}
from
'@/utils/switchRoute'
import
{
selectDataProject
}
from
'@/api/project'
import
useAppStore
from
'@/store/modules/app'
const
appStore
=
useAppStore
()
const
projectAttr
=
[
'数据源'
,
'数据域'
,
'发现规则'
];
const
router
=
useRouter
()
const
emit
=
defineEmits
([
'page'
])
const
{
proxy
}
=
getCurrentInstance
()
const
loginUser
=
{
tsysUser
:
{
id
:
appStore
.
userInfo
.
user
.
id
,
username
:
appStore
.
userInfo
.
user
.
username
}
}
function
onReset
(
formQuery
)
{
console
.
log
(
'onReset'
)
formQuery
.
resetFields
()
...
...
@@ -21,44 +40,49 @@ function onQuery() {
}
// 搜索按钮操作
function
handleQuery
()
{
queryParams
.
value
.
page
Num
=
1
queryParams
.
value
.
page
=
1
getList
()
}
const
data
=
reactive
({
queryParams
:
{
page
Num
:
1
,
pageSiz
e
:
8
,
pro
ject
Name
:
''
,
remark
:
''
page
:
1
,
everypag
e
:
8
,
proName
:
''
,
note
:
''
}
})
// 表格数据
const
{
queryParams
}
=
toRefs
(
data
)
const
tableList
=
ref
([
{
id
:
'1'
,
project
Name
:
'若依配测系统1'
,
datasource
:
'MySQL'
,
domain
:
'电商'
,
findRule
:
'自动发现'
},
{
id
:
'2'
,
project
Name
:
'若依配测系统2'
,
datasource
:
'Oracle'
,
domain
:
'金融'
,
findRule
:
'手动配置'
},
{
id
:
'3'
,
project
Name
:
'若依配测系统3'
,
datasource
:
'SQL Server'
,
domain
:
'医疗'
,
findRule
:
'规则匹配'
}
//
{
//
id: '1',
// pro
Name: '若依配测系统1',
//
datasource: 'MySQL',
//
domain: '电商',
//
findRule: '自动发现'
//
},
//
{
//
id: '2',
// pro
Name: '若依配测系统2',
//
datasource: 'Oracle',
//
domain: '金融',
//
findRule: '手动配置'
//
},
//
{
//
id: '3',
// pro
Name: '若依配测系统3',
//
datasource: 'SQL Server',
//
domain: '医疗',
//
findRule: '规则匹配'
//
}
])
const
total
=
ref
(
3
)
...
...
@@ -68,9 +92,45 @@ function getList() {
loading
.
value
=
true
setTimeout
(()
=>
{
loading
.
value
=
false
},
3000
);
selectDataProject
({
loginUser
:
loginUser
,
everypage
:
queryParams
.
value
.
everypage
,
note
:
queryParams
.
value
.
note
,
page
:
queryParams
.
value
.
page
,
proName
:
queryParams
.
value
.
proName
,
}).
then
(
res
=>
{
tableList
.
value
=
res
.
data
.
map
(
item
=>
{
let
arrs
=
[]
projectAttr
.
forEach
((
name
,
index
)
=>
{
if
(
index
===
0
)
{
arrs
.
push
({
label
:
name
,
value
:
item
.
list
[
0
].
s
})
}
else
if
(
index
===
1
){
arrs
.
push
({
label
:
name
,
value
:
item
.
list
[
3
].
s
})
}
else
if
(
index
===
2
)
{
arrs
.
push
({
label
:
name
,
value
:
item
.
list
[
6
]
&&
item
.
list
[
6
].
s
?
item
.
list
[
6
].
s
:
0
})
}
})
item
.
list
=
arrs
return
item
;
});
total
.
value
=
res
.
totalCount
;
loading
.
value
=
false
console
.
log
(
'tableList.value'
,
tableList
.
value
)
})
// setTimeout(() => {
// loading.value = false
// }, 3000);
}
...
...
@@ -140,12 +200,12 @@ const handleImportProject = (project) => {
}
// 导出项目
const
handleExportProject
=
(
project
)
=>
{
// ElMessage.success(`开始导出项目 "${project.pro
ject
Name}"`)
// ElMessage.success(`开始导出项目 "${project.proName}"`)
openExportDialog
(
project
)
}
// 下载插件
const
handleDownloadPlugin
=
(
project
)
=>
{
// ElMessage.success(`开始下载 "${project.pro
ject
Name}" 的插件`)
// ElMessage.success(`开始下载 "${project.proName}" 的插件`)
currentProjectId
.
value
=
project
.
id
// 假设项目对象中有id字段
downloadDialogVisible
.
value
=
true
console
.
log
(
123
)
...
...
@@ -161,7 +221,7 @@ const handleSubmit = (formData) => {
// 模拟新增
const
newProject
=
{
id
:
tableList
.
value
.
length
+
1
,
pro
jectName
:
formData
.
project
Name
,
pro
Name
:
formData
.
pro
Name
,
datasource
:
'待配置'
,
domain
:
'待配置'
,
findRule
:
'待配置'
...
...
@@ -173,7 +233,7 @@ const handleSubmit = (formData) => {
// 模拟编辑
const
index
=
tableList
.
value
.
findIndex
(
p
=>
p
.
id
===
currentProject
.
value
.
id
)
if
(
index
!==
-
1
)
{
tableList
.
value
[
index
].
pro
jectName
=
formData
.
project
Name
tableList
.
value
[
index
].
pro
Name
=
formData
.
pro
Name
ElMessage
.
success
(
'编辑项目成功'
)
}
}
...
...
@@ -207,7 +267,9 @@ const handleBackup = (projectId) => {
console
.
log
(
'备份项目:'
,
projectId
)
}
onMounted
(()
=>
{
handleQuery
()
})
</
script
>
<
template
>
...
...
@@ -239,7 +301,7 @@ const handleBackup = (projectId) => {
<el-card
shadow=
"always"
>
<
template
#
header
>
<div
class=
"flex-container justify-between align-center"
>
{{
item
.
project
Name
}}
{{
item
.
project
}}
<el-dropdown
placement=
"bottom-end"
@
command=
"(command) => handleCommandProject(command, item)"
>
<el-button
type=
"primary"
icon=
"Operation"
>
操作
...
...
@@ -258,18 +320,11 @@ const handleBackup = (projectId) => {
</div>
</template>
<div
class=
"item-content flex-container align-center"
>
<div
class=
"label"
>
数据源:
</div>
<div
class=
"value flex1"
>
{{ item.datasource }}
</div>
</div>
<div
class=
"item-content flex-container align-center"
>
<div
class=
"label"
>
数据域:
</div>
<div
class=
"value flex1"
>
{{ item.domain }}
</div>
</div>
<div
class=
"item-content flex-container align-center"
>
<div
class=
"label"
>
发现规则:
</div>
<div
class=
"value flex1"
>
{{ item.findRule }}
</div>
<div
class=
"item-content flex-container align-center"
v-for=
"(x,y) in item.list"
>
<div
class=
"label"
>
{{x.label}}:
</div>
<div
class=
"value flex1"
>
{{x.value}}
</div>
</div>
</el-card>
</el-col>
</el-row>
...
...
@@ -277,8 +332,8 @@ const handleBackup = (projectId) => {
<pagination
v-show=
"total > 0"
:total=
"total"
v-model:page=
"queryParams.page
Num
"
v-model:limit=
"queryParams.
pageSiz
e"
v-model:page=
"queryParams.page"
v-model:limit=
"queryParams.
everypag
e"
@
pagination=
"getList"
/>
</div>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论