Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b2977701
authored
Oct 01, 2025
by
Jony.L
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
算力资源重构-算力资源SPU管理修改1.1
parent
e924edf5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
324 additions
and
18 deletions
+324
-18
src/router/modules/remaining.ts
+36
-0
src/views/compute/resourcespu/form/index.vue
+268
-0
src/views/compute/resourcespu/index.vue
+20
-18
No files found.
src/router/modules/remaining.ts
View file @
b2977701
...
...
@@ -696,6 +696,42 @@ const remainingRouter: AppRouteRecordRaw[] = [
]
},
{
path
:
'/compute'
,
component
:
Layout
,
name
:
'Compute'
,
meta
:
{
hidden
:
true
},
children
:
[
{
path
:
'resource-spu/add'
,
component
:
()
=>
import
(
'@/views/compute/resourcespu/form/index.vue'
),
name
:
'ResourceSpuAdd'
,
meta
:
{
noCache
:
false
,
hidden
:
true
,
canTo
:
true
,
icon
:
'ep:edit'
,
title
:
'算力资源添加'
,
activeMenu
:
'/compute/resource-spu'
}
},
{
path
:
'resource-spu/edit/:id(\\d+)'
,
component
:
()
=>
import
(
'@/views/compute/resourcespu/form/index.vue'
),
name
:
'ResourceSpuEdit'
,
meta
:
{
noCache
:
true
,
hidden
:
true
,
canTo
:
true
,
icon
:
'ep:edit'
,
title
:
'算力资源编辑'
,
activeMenu
:
'/compute/resource-spu'
}
}
]
},
{
path
:
'/:pathMatch(.*)*'
,
component
:
()
=>
import
(
'@/views/Error/404.vue'
),
name
:
''
,
...
...
src/views/compute/resourcespu/form/index.vue
0 → 100644
View file @
b2977701
This diff is collapsed.
Click to expand it.
src/views/compute/resourcespu/index.vue
View file @
b2977701
...
...
@@ -166,7 +166,7 @@
<el-button
type=
"primary"
plain
@
click=
"openForm(
'create'
)"
@
click=
"openForm(
undefined
)"
v-hasPermi=
"['compute:resource-spu:create']"
>
<Icon
icon=
"ep:plus"
class=
"mr-5px"
/>
新增
...
...
@@ -222,16 +222,15 @@
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"CPU配置"
align=
"center"
prop=
"cpu"
/>
<el-table-column
label=
"GPU配置"
align=
"center"
prop=
"gpu"
/>
<el-table-column
label=
"内存"
align=
"center"
prop=
"ram"
/>
<el-table-column
label=
"存储"
align=
"center"
prop=
"storage"
/>
<el-table-column
label=
"商品简介"
align=
"center"
prop=
"intro"
/>
<el-table-column
label=
"算力资源分类编号"
align=
"center"
prop=
"categoryId"
/>
<el-table-column
label=
"商品轮播图地址"
align=
"center"
prop=
"sliderPicUrls"
/>
<!-- 硬件配置字段已隐藏 -->
<el-table-column
label=
"商品简介"
align=
"center"
prop=
"intro"
min-width=
"200"
/>
<!-- <el-table-column label="算力资源分类编号" align="center" prop="categoryId" />-->
<el-table-column
label=
"算力资源分类"
align=
"center"
prop=
"categoryName"
min-width=
"150"
/>
<!-- 轮播图地址已隐藏 -->
<el-table-column
label=
"总库存数量"
align=
"center"
prop=
"stock"
/>
<el-table-column
label=
"商品销量"
align=
"center"
prop=
"sales"
/>
<el-table-column
label=
"状态"
align=
"center"
min-width=
"15
0"
prop=
"status"
>
<el-table-column
label=
"状态"
align=
"center"
width=
"8
0"
prop=
"status"
>
<
template
#
default=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.COMPUTE_RESOURCE_SPU_STATUS"
:value=
"scope.row.status"
/>
</
template
>
...
...
@@ -248,7 +247,7 @@
<el-button
link
type=
"primary"
@
click=
"openForm(
'update',
scope.row.id)"
@
click=
"openForm(scope.row.id)"
v-hasPermi=
"['compute:resource-spu:update']"
>
编辑
...
...
@@ -272,9 +271,6 @@
@
pagination=
"getList"
/>
</ContentWrap>
<!-- 表单弹窗:添加/修改 -->
<ResourceSpuForm
ref=
"formRef"
@
success=
"getList"
/>
</template>
<
script
setup
lang=
"ts"
>
...
...
@@ -283,9 +279,10 @@ import { dateFormatter } from '@/utils/formatTime'
import
download
from
'@/utils/download'
import
{
createImageViewer
}
from
'@/components/ImageViewer'
import
{
ResourceSpuApi
,
ResourceSpu
}
from
'@/api/compute/resourcespu'
import
ResourceSpuForm
from
'./ResourceSpuForm.vue'
import
{
DICT_TYPE
,
getIntDictOptions
}
from
"@/utils/dict"
;
const
{
push
}
=
useRouter
()
/** 算力资源SPU表(基础配置信息) 列表 */
defineOptions
({
name
:
'ResourceSpu'
})
...
...
@@ -344,10 +341,15 @@ const resetQuery = () => {
handleQuery
()
}
/** 添加/修改操作 */
const
formRef
=
ref
()
const
openForm
=
(
type
:
string
,
id
?:
number
)
=>
{
formRef
.
value
.
open
(
type
,
id
)
/** 新增或修改 */
const
openForm
=
(
id
?:
number
)
=>
{
// 修改
if
(
typeof
id
===
'number'
)
{
push
({
name
:
'ResourceSpuEdit'
,
params
:
{
id
}
})
return
}
// 新增
push
({
name
:
'ResourceSpuAdd'
})
}
/** 删除按钮操作 */
...
...
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