Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
ai-yunshou-vue
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
AI云守
ai-yunshou-vue
Commits
53dd3b78
Commit
53dd3b78
authored
Sep 09, 2024
by
胡占生
🇨🇳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 算法管理 版本切换功能增加
parent
dcff8325
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
19 deletions
+21
-19
src/api/algorithmList/algorithmFile.js
src/api/algorithmList/algorithmFile.js
+8
-0
src/views/algorithmList/components/form.vue
src/views/algorithmList/components/form.vue
+10
-2
src/views/algorithmList/index.vue
src/views/algorithmList/index.vue
+3
-17
No files found.
src/api/algorithmList/algorithmFile.js
View file @
53dd3b78
...
...
@@ -46,6 +46,14 @@ export function addFile(data) {
})
}
// 使用当前版本算法文件
export
function
useCurrentFil
(
algorithmFileId
)
{
return
request
({
url
:
`/yunshou/aiAlgorithmFile/useCurrentFile/
${
algorithmFileId
}
`
,
method
:
'
post
'
,
})
}
// 修改算法文件
export
function
updateFile
(
data
)
{
return
request
({
...
...
src/views/algorithmList/components/form.vue
View file @
53dd3b78
...
...
@@ -59,7 +59,7 @@
<
template
#default
="
scope
"
>
<!--
<el-button
link
type=
"primary"
icon=
"Edit"
@
click=
"handleUpdate(scope.row)"
>
版本内容
</el-button>
-->
<el-button
link
type=
"primary"
icon=
"Delete"
@
click=
"
handleDelete(scope.row
)"
>
版本切换
</el-button>
<el-button
link
type=
"primary"
icon=
"Delete"
@
click=
"
useNewFile(scope.row.id
)"
>
版本切换
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -75,7 +75,7 @@
<
script
setup
>
import
{
addAlg
,
updateMyAlg
,
detailAlg
,
detailMyAlg
}
from
"
@/api/algorithmList/index.js
"
;
import
{
addFile
,
deleteFile
,
updateFile
,
listFile
}
from
"
@/api/algorithmList/algorithmFile.js
"
;
import
{
addFile
,
deleteFile
,
updateFile
,
listFile
,
useCurrentFil
}
from
"
@/api/algorithmList/algorithmFile.js
"
;
import
{
listAlgLevel
}
from
"
@/api/algorithmList/algorithmDown.js
"
;
const
{
proxy
}
=
getCurrentInstance
();
const
emit
=
defineEmits
();
...
...
@@ -135,6 +135,13 @@ function getList(id) {
wrapList
.
value
=
response
.
rows
;
});
}
/** 获取文件列表*/
function
useNewFile
(
id
)
{
useCurrentFil
(
id
).
then
(
response
=>
{
proxy
.
$modal
.
msgSuccess
(
"
变更成功
"
);
getList
(
ids
.
value
)
});
}
/** 新增按钮操作 */
...
...
@@ -148,6 +155,7 @@ function handleAdd() {
function
handleUpdate
(
row
)
{
console
.
log
(
"
🚀 ~ handleUpdate ~ row:
"
,
row
)
const
id
=
row
.
userAlgorithmId
||
ids
.
value
;
ids
.
value
=
row
.
id
getList
(
row
.
id
)
detailMyAlg
(
id
).
then
(
response
=>
{
form
.
value
=
response
.
data
;
...
...
src/views/algorithmList/index.vue
View file @
53dd3b78
...
...
@@ -73,22 +73,6 @@
@
click=
"handState('1')"
>
已停用
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
@
click=
"handState('2')"
v-if=
"!listState"
>
已下载
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
@
click=
"handState('3')"
v-if=
"!listState"
>
已删除
</el-button>
</el-col>
</el-row>
<div
class=
"alg-list"
>
<el-card
v-for=
"item in algList"
:key=
"item.name"
class=
"alg-item"
shadow=
"hover"
@
click=
"handDetails(item)"
>
...
...
@@ -228,7 +212,7 @@ import { el } from "element-plus/es/locales.mjs";
}
function
handState
(
state
)
{
queryParams
.
value
.
algorithmStatus
=
state
getList
()
get
My
List
()
}
function
handleUpdate
(
row
)
{
if
(
row
.
status
==
'
0
'
)
addMyAlg
({
algorithmId
:
row
.
id
}).
then
((
res
)
=>
{
...
...
@@ -246,12 +230,14 @@ import { el } from "element-plus/es/locales.mjs";
}
function
handMenuAllClick
(
row
)
{
queryParams
.
value
.
algorithmStatus
=
''
queryParams
.
value
.
applicationScenarios
=
''
nowTopTitle
.
value
=
'
全部算法
'
getList
()
}
function
handMyMenuClick
(
row
)
{
queryParams
.
value
.
algorithmStatus
=
''
queryParams
.
value
.
applicationScenarios
=
''
nowTopTitle
.
value
=
row
.
index
getMyList
()
...
...
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