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[] = [
...
@@ -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(.*)*'
,
path
:
'/:pathMatch(.*)*'
,
component
:
()
=>
import
(
'@/views/Error/404.vue'
),
component
:
()
=>
import
(
'@/views/Error/404.vue'
),
name
:
''
,
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 @@
...
@@ -166,7 +166,7 @@
<el-button
<el-button
type=
"primary"
type=
"primary"
plain
plain
@
click=
"openForm(
'create'
)"
@
click=
"openForm(
undefined
)"
v-hasPermi=
"['compute:resource-spu:create']"
v-hasPermi=
"['compute:resource-spu:create']"
>
>
<Icon
icon=
"ep:plus"
class=
"mr-5px"
/>
新增
<Icon
icon=
"ep:plus"
class=
"mr-5px"
/>
新增
...
@@ -222,16 +222,15 @@
...
@@ -222,16 +222,15 @@
</div>
</div>
</
template
>
</
template
>
</el-table-column>
</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=
"intro"
min-width=
"200"
/>
<el-table-column
label=
"内存"
align=
"center"
prop=
"ram"
/>
<!-- <el-table-column label="算力资源分类编号" align="center" prop="categoryId" />-->
<el-table-column
label=
"存储"
align=
"center"
prop=
"storage"
/>
<el-table-column
label=
"算力资源分类"
align=
"center"
prop=
"categoryName"
min-width=
"150"
/>
<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=
"stock"
/>
<el-table-column
label=
"总库存数量"
align=
"center"
prop=
"stock"
/>
<el-table-column
label=
"商品销量"
align=
"center"
prop=
"sales"
/>
<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"
>
<
template
#
default=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.COMPUTE_RESOURCE_SPU_STATUS"
:value=
"scope.row.status"
/>
<dict-tag
:type=
"DICT_TYPE.COMPUTE_RESOURCE_SPU_STATUS"
:value=
"scope.row.status"
/>
</
template
>
</
template
>
...
@@ -248,7 +247,7 @@
...
@@ -248,7 +247,7 @@
<el-button
<el-button
link
link
type=
"primary"
type=
"primary"
@
click=
"openForm(
'update',
scope.row.id)"
@
click=
"openForm(scope.row.id)"
v-hasPermi=
"['compute:resource-spu:update']"
v-hasPermi=
"['compute:resource-spu:update']"
>
>
编辑
编辑
...
@@ -272,9 +271,6 @@
...
@@ -272,9 +271,6 @@
@
pagination=
"getList"
@
pagination=
"getList"
/>
/>
</ContentWrap>
</ContentWrap>
<!-- 表单弹窗:添加/修改 -->
<ResourceSpuForm
ref=
"formRef"
@
success=
"getList"
/>
</template>
</template>
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
...
@@ -283,9 +279,10 @@ import { dateFormatter } from '@/utils/formatTime'
...
@@ -283,9 +279,10 @@ import { dateFormatter } from '@/utils/formatTime'
import
download
from
'@/utils/download'
import
download
from
'@/utils/download'
import
{
createImageViewer
}
from
'@/components/ImageViewer'
import
{
createImageViewer
}
from
'@/components/ImageViewer'
import
{
ResourceSpuApi
,
ResourceSpu
}
from
'@/api/compute/resourcespu'
import
{
ResourceSpuApi
,
ResourceSpu
}
from
'@/api/compute/resourcespu'
import
ResourceSpuForm
from
'./ResourceSpuForm.vue'
import
{
DICT_TYPE
,
getIntDictOptions
}
from
"@/utils/dict"
;
import
{
DICT_TYPE
,
getIntDictOptions
}
from
"@/utils/dict"
;
const
{
push
}
=
useRouter
()
/** 算力资源SPU表(基础配置信息) 列表 */
/** 算力资源SPU表(基础配置信息) 列表 */
defineOptions
({
name
:
'ResourceSpu'
})
defineOptions
({
name
:
'ResourceSpu'
})
...
@@ -344,10 +341,15 @@ const resetQuery = () => {
...
@@ -344,10 +341,15 @@ const resetQuery = () => {
handleQuery
()
handleQuery
()
}
}
/** 添加/修改操作 */
/** 新增或修改 */
const
formRef
=
ref
()
const
openForm
=
(
id
?:
number
)
=>
{
const
openForm
=
(
type
:
string
,
id
?:
number
)
=>
{
// 修改
formRef
.
value
.
open
(
type
,
id
)
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