Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
client
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
3bef40bb
authored
Jun 20, 2024
by
孙美琪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
相关修改
parent
cd11e8ef
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
89 additions
and
64 deletions
+89
-64
src/layout/components/Navbar.vue
+15
-15
src/layout/components/Sidebar-custom/Logo.vue
+1
-1
src/layout/manage-layout.vue
+2
-2
src/views/computingResource/resourceList.vue
+21
-21
src/views/console/myOrder.vue
+2
-2
src/views/console/naturalResources.vue
+37
-16
src/views/console/overview.vue
+11
-7
No files found.
src/layout/components/Navbar.vue
View file @
3bef40bb
...
...
@@ -19,9 +19,9 @@
<screenfull
id=
"screenfull"
class=
"right-menu-item hover-effect"
/>
<
el-tooltip
content=
"布局大小"
effect=
"dark"
placement=
"bottom"
>
<size-select
id=
"size-select"
class=
"right-menu-item hover-effect"
/
>
<
/el-tooltip
>
<
!--
<el-tooltip
content=
"布局大小"
effect=
"dark"
placement=
"bottom"
>
--
>
<!--
<size-select
id=
"size-select"
class=
"right-menu-item hover-effect"
/>
--
>
<
!--
</el-tooltip>
--
>
</
template
>
<div
class=
"avatar-container"
>
<el-dropdown
@
command=
"handleCommand"
class=
"right-menu-item hover-effect"
>
...
...
@@ -33,13 +33,13 @@
</div>
<
template
#
dropdown
>
<el-dropdown-menu>
<!--
<router-link
to=
"/user/profile"
>
-->
<!--
<el-dropdown-item>
个人中心
</el-dropdown-item>
-->
<!--
</router-link>
-->
<
el-dropdown-item
command=
"setLayout"
v-if=
"settingsStore.showSettings"
>
<span>
布局设置
</span
>
<
/el-dropdown-item
>
<el-dropdown-item
divided
command=
"logout"
>
<!--
<router-link
to=
"/user/profile"
>
-->
<!--
<el-dropdown-item>
个人中心
</el-dropdown-item>
-->
<!--
</router-link>
-->
<
!--
<el-dropdown-item
command=
"setLayout"
v-if=
"settingsStore.showSettings"
>
--
>
<!--
<span>
布局设置
</span>
--
>
<
!--
</el-dropdown-item>
--
>
<el-dropdown-item
command=
"logout"
>
<span>
退出登录
</span>
</el-dropdown-item>
</el-dropdown-menu>
...
...
@@ -51,7 +51,7 @@
</template>
<
script
setup
>
import
{
ElMessageBox
}
from
'element-plus'
import
{
ElMessageBox
}
from
'element-plus'
import
Breadcrumb
from
'@/components/Breadcrumb'
import
TopNav
from
'@/components/TopNav'
import
Hamburger
from
'@/components/Hamburger'
...
...
@@ -75,11 +75,11 @@ defineProps({
}
})
function
toggleSideBar
()
{
function
toggleSideBar
()
{
appStore
.
toggleSideBar
()
}
function
handleCommand
(
command
)
{
function
handleCommand
(
command
)
{
switch
(
command
)
{
case
'setLayout'
:
setLayout
()
...
...
@@ -92,7 +92,7 @@ function handleCommand (command) {
}
}
function
logout
()
{
function
logout
()
{
ElMessageBox
.
confirm
(
'确定注销并退出系统吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
...
...
@@ -107,7 +107,7 @@ function logout () {
const
emits
=
defineEmits
([
'setLayout'
])
function
setLayout
()
{
function
setLayout
()
{
emits
(
'setLayout'
)
}
</
script
>
...
...
src/layout/components/Sidebar-custom/Logo.vue
View file @
3bef40bb
...
...
@@ -19,7 +19,7 @@
import
variables
from
'@/assets/styles/variables.module.scss'
// import logo from '@/assets/logo/logo.png'
import
xjjtLogo
from
'@/assets/logo/xjjt-logo.png'
import
nsccLogo
from
'@/assets/logo/nscc-logo
.jp
g'
import
nsccLogo
from
'@/assets/logo/nscc-logo
-copy.pn
g'
import
useSettingsStore
from
'@/store/modules/settings'
defineProps
({
...
...
src/layout/manage-layout.vue
View file @
3bef40bb
...
...
@@ -81,7 +81,7 @@ function setLayout () {
}
.sidebar-container
{
box-shadow
:
none
!important
;
//
box-shadow
:
none
!important
;
:deep(.el-menu)
{
--el-menu-item-font-size
:
16px
;
...
...
@@ -112,7 +112,7 @@ function setLayout () {
}
.app-main
{
background-color
:
#F0F2F5
;
//
background-color
:
#F2F2F2
;
}
.drawer-bg
{
...
...
src/views/computingResource/resourceList.vue
View file @
3bef40bb
...
...
@@ -90,34 +90,34 @@
<!--<div class="value">{{ item.model }}</div>-->
<!--<el-divider></el-divider>-->
<el-row>
<el-col
:span=
"12"
>
<div>
<el-col
:span=
"24"
>
<div
class=
"parameter-item"
>
<div
class=
"label"
>
CPU
</div>
<div
class=
"value"
>
{{ item.cpu }}
</div>
</div>
</el-col>
<el-col
:span=
"24"
>
<div
class=
"parameter-item"
>
<div
class=
"label"
>
GPU
</div>
<div
class=
"value"
>
{{ item.gpu }}
</div>
</div>
</div>
</el-col>
<el-col
:span=
"12"
>
<div>
<el-col
:span=
"24"
>
<div
class=
"parameter-item"
>
<div
class=
"label"
>
内存
</div>
<div
class=
"value"
>
{{ item.memory }}
</div>
</div>
</el-col>
<el-col
:span=
"24"
>
<div
class=
"parameter-item"
>
<div
class=
"label"
>
存储
</div>
<div
class=
"value"
>
{{ item.storage }}
</div>
</div>
</div>
</el-col>
</el-row>
<el-divider></el-divider>
<div
class=
"flex-justify-end price"
>
¥{{ item.publicPrice }}
</div>
<div
class=
"flex-justify-end price"
>
¥{{ item.publicPrice }}
{{item.unitTypeName}}
</div>
<!--<div class="flex-justify-end month-expenses">约¥15/月</div>-->
<el-divider></el-divider>
<div
class=
"footer-action flex"
>
...
...
@@ -183,7 +183,8 @@
<div
class=
"label"
>
{{
item
.
label
}}
</div>
<div
class=
"value"
>
<el-input-number
v-if=
"item.type === 2"
v-model=
"item.value"
:min=
"0"
@
change=
"orderComputerPrice"
style=
"width: 110px"
/>
<el-input-number
v-if=
"item.type === 2"
v-model=
"item.value"
:min=
"0"
@
change=
"orderComputerPrice"
style=
"width: 110px"
/>
<el-radio-group
v-if=
"[0,1].includes(item.type)"
v-model=
"item.value"
@
change=
"orderComputerPrice"
>
<el-radio-button
v-for=
"option in item.options"
:label=
"option.id"
>
...
...
@@ -232,8 +233,8 @@
</template>
<
script
name=
"ResourceList"
setup
>
import
{
ref
,
watch
}
from
'vue'
import
{
ElMessageBox
}
from
'element-plus'
import
{
ref
,
watch
}
from
'vue'
import
{
ElMessageBox
}
from
'element-plus'
import
SvgIcon
from
'@/components/SvgIcon/index.vue'
import
{
computilityMenu
,
...
...
@@ -243,7 +244,7 @@ import {
shoppingAdd
,
orderComputer
}
from
'@/api/computingResource.js'
import
{
useRoute
,
useRouter
}
from
'vue-router'
import
{
useRoute
,
useRouter
}
from
'vue-router'
const
route
=
useRoute
()
const
router
=
useRouter
()
...
...
@@ -257,7 +258,7 @@ const pageSize = ref(10)
const
productTypes
=
ref
([])
const
tableData
=
ref
([])
function
getTypeData
()
{
function
getTypeData
()
{
computilityMenu
().
then
(
res
=>
{
productTypes
.
value
=
res
.
data
if
(
route
.
query
.
type
)
{
...
...
@@ -277,13 +278,13 @@ watch(() => route.query.type, (value, oldValue) => {
}
})
function
tabChange
()
{
function
tabChange
()
{
pageNum
.
value
=
1
getList
()
}
function
getList
()
{
getRListByCategory
({
nav
:
tabActive
.
value
,
pageNum
:
''
,
pageSize
:
''
}).
then
(
res
=>
{
function
getList
()
{
getRListByCategory
({
nav
:
tabActive
.
value
,
pageNum
:
pageNum
.
value
,
pageSize
:
pageSize
.
value
}).
then
(
res
=>
{
total
.
value
=
res
.
total
tableData
.
value
=
res
.
rows
})
...
...
@@ -298,7 +299,7 @@ const selectedType = ref()
const
selectedId
=
ref
()
const
productDetail
=
ref
({})
function
selectedProduct
(
type
,
id
)
{
function
selectedProduct
(
type
,
id
)
{
selectedType
.
value
=
type
selectedId
.
value
=
id
getRDetail
({
id
}).
then
(
res
=>
{
...
...
@@ -316,7 +317,7 @@ function selectedProduct (type, id) {
})
}
function
initSubmitData
()
{
function
initSubmitData
()
{
return
{
id
:
selectedId
.
value
,
num
:
form
.
value
.
num
,
...
...
@@ -340,13 +341,13 @@ function initSubmitData () {
const
orderPrice
=
ref
(
0
)
function
orderComputerPrice
()
{
function
orderComputerPrice
()
{
orderComputer
(
initSubmitData
()).
then
(
res
=>
{
orderPrice
.
value
=
res
.
data
.
totalPulicPrice
})
}
function
submit
()
{
function
submit
()
{
const
data
=
initSubmitData
()
if
(
selectedType
.
value
===
1
)
{
shoppingAdd
(
data
).
then
(
res
=>
{
...
...
@@ -551,8 +552,7 @@ function submit () {
.el-col
{
&:nth-child(even)
{
display
:
flex
;
flex-direction
:
column
;
align-items
:
flex-end
;
justify-content
:
space-between
;
}
}
...
...
src/views/console/myOrder.vue
View file @
3bef40bb
...
...
@@ -227,7 +227,7 @@
:max-height=
"620"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"
5
5"
align=
"center"
/>
<el-table-column
type=
"selection"
width=
"
4
5"
align=
"center"
/>
<el-table-column
label=
"序号"
align=
"center"
prop=
"id"
/>
<el-table-column
label=
"订单编号"
align=
"center"
prop=
"orderNo"
/>
<el-table-column
label=
"商品类别"
align=
"center"
prop=
"category"
>
...
...
@@ -263,7 +263,7 @@
<dict-tag
:options=
"storage_type"
:value=
"scope.row.storage"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"购买方"
align=
"center"
prop=
""
/
>
<!-- <el-table-column label="购买方" align="center" prop=""/>--
>
<el-table-column
label=
"算力金额"
align=
"center"
prop=
"price"
/>
<el-table-column
label=
"订单状态"
align=
"center"
prop=
"orderStatus"
>
<
template
#
default=
"scope"
>
...
...
src/views/console/naturalResources.vue
View file @
3bef40bb
...
...
@@ -232,14 +232,19 @@
<dict-tag
:options=
"source_status"
:value=
"scope.row.sourceStatus"
/>
</
template
>
</el-table-column>
<
el-table-column
label=
"网络带宽"
align=
"center"
prop=
"networkId"
/
>
<
el-table-column
label=
"额外IP数量"
align=
"center"
prop=
"ipNum"
/
>
<
el-table-column
label=
"虚拟机存储"
align=
"center"
prop=
"vmStorage"
/
>
<
!-- <el-table-column label="网络带宽" align="center" prop="networkId"/>--
>
<
!-- <el-table-column label="额外IP数量" align="center" prop="ipNum"/>--
>
<
!-- <el-table-column label="虚拟机存储" align="center" prop="vmStorage"/>--
>
<el-table-column
label=
"申请时间"
align=
"center"
prop=
"submitTime"
width=
"180"
>
<
template
#
default=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
submitTime
,
'
{
y
}
-
{
m
}
-
{
d
}'
)
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
v
-
for
=
"(i, index) in headers"
:
key
=
"index"
:
label
=
"i.name"
:
prop
=
"i.name"
>
<
template
v
-
slot
=
"scope"
>
{{
getCellValue
(
scope
.
row
.
param
,
i
.
name
)
}}
<
/template
>
<
/el-table-column
>
<!--
<
el
-
table
-
column
label
=
"使用人"
align
=
"center"
prop
=
"applyUser"
/>-->
<!--
<
el
-
table
-
column
label
=
"承接人"
align
=
"center"
prop
=
"receiveUser"
/>-->
<!--
<
el
-
table
-
column
label
=
"使用期限"
align
=
"center"
prop
=
"useTime"
/>-->
...
...
@@ -393,8 +398,8 @@
<
/template
>
<
script
setup
name
=
"NaturalResources"
>
import
{
listResources
,
getResources
,
delResources
,
addResources
,
updateResources
}
from
'@/api/computility/resources'
import
{
getAllUser
}
from
'@/api/system/user'
import
{
listResources
,
getResources
,
delResources
,
addResources
,
updateResources
}
from
'@/api/computility/resources'
import
{
getAllUser
}
from
'@/api/system/user'
const
{
proxy
}
=
getCurrentInstance
()
const
{
...
...
@@ -486,7 +491,7 @@ const data = reactive({
const
{
queryParams
,
form
,
rules
}
=
toRefs
(
data
)
/** 查询订单管理-用户资源管理列表 */
function
getList
()
{
function
getList
()
{
loading
.
value
=
true
listResources
(
queryParams
.
value
).
then
(
response
=>
{
resourcesList
.
value
=
response
.
rows
...
...
@@ -495,14 +500,30 @@ function getList () {
}
)
}
const
headers
=
computed
(()
=>
{
if
(
resourcesList
.
value
.
length
>
0
&&
resourcesList
.
value
[
0
].
param
)
{
const
param
=
JSON
.
parse
(
resourcesList
.
value
[
0
].
param
)
return
param
.
map
(
item
=>
({
name
:
item
.
name
}
));
}
return
[];
}
);
const
getCellValue
=
(
params
,
headerName
)
=>
{
const
paramsCopy
=
JSON
.
parse
(
params
)
const
param
=
paramsCopy
.
find
(
item
=>
item
.
name
===
headerName
);
return
param
?
param
.
valueName
:
''
;
}
;
// 取消按钮
function
cancel
()
{
function
cancel
()
{
open
.
value
=
false
reset
()
}
// 表单重置
function
reset
()
{
function
reset
()
{
form
.
value
=
{
id
:
null
,
orderNo
:
null
,
...
...
@@ -532,26 +553,26 @@ function reset () {
}
/** 搜索按钮操作 */
function
handleQuery
()
{
function
handleQuery
()
{
queryParams
.
value
.
pageNum
=
1
getList
()
}
/** 重置按钮操作 */
function
resetQuery
()
{
function
resetQuery
()
{
proxy
.
resetForm
(
'queryRef'
)
handleQuery
()
}
// 多选框选中数据
function
handleSelectionChange
(
selection
)
{
function
handleSelectionChange
(
selection
)
{
ids
.
value
=
selection
.
map
(
item
=>
item
.
id
)
single
.
value
=
selection
.
length
!=
1
multiple
.
value
=
!
selection
.
length
}
/** 新增按钮操作 */
function
handleAdd
()
{
function
handleAdd
()
{
reset
()
open
.
value
=
true
title
.
value
=
'添加订单管理-用户资源管理'
...
...
@@ -562,7 +583,7 @@ function handleAdd () {
}
/** 修改按钮操作 */
function
handleUpdate
(
row
)
{
function
handleUpdate
(
row
)
{
reset
()
const
_id
=
row
.
id
||
ids
.
value
getResources
(
_id
).
then
(
response
=>
{
...
...
@@ -573,7 +594,7 @@ function handleUpdate (row) {
}
/** 提交按钮 */
function
submitForm
()
{
function
submitForm
()
{
proxy
.
$refs
[
'resourcesRef'
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
form
.
value
.
id
!=
null
)
{
...
...
@@ -594,7 +615,7 @@ function submitForm () {
}
/** 删除按钮操作 */
function
handleDelete
(
row
)
{
function
handleDelete
(
row
)
{
const
_ids
=
row
.
id
||
ids
.
value
proxy
.
$modal
.
confirm
(
'是否确认删除订单管理-用户资源管理编号为"'
+
_ids
+
'"的数据项?'
).
then
(
function
()
{
return
delResources
(
_ids
)
...
...
@@ -606,7 +627,7 @@ function handleDelete (row) {
}
/** 导出按钮操作 */
function
handleExport
()
{
function
handleExport
()
{
proxy
.
download
(
'computility/resources/export'
,
{
...
queryParams
.
value
}
,
`resources_${new Date().getTime()
}
.xlsx`
)
...
...
src/views/console/overview.vue
View file @
3bef40bb
...
...
@@ -80,7 +80,9 @@
<el-tag
v-if=
"infoData.status === '审核通过'"
type=
"success"
>
已认证
</el-tag>
<el-tag
v-else
class=
"mr5"
type=
"warning"
>
未认证
</el-tag>
<el-button
v-if=
"!infoData.status || infoData.status === '驳回'"
@
click=
"$router.push('/console/authentication')"
type=
"primary"
link
>
去申请
</el-button>
<el-button
v-if=
"!infoData.status || infoData.status === '驳回'"
@
click=
"$router.push('/console/authentication')"
type=
"primary"
link
>
去申请
</el-button>
</el-form-item>
<el-form-item
label=
"最后提交时间:"
>
{{ infoData.submitTime }}
...
...
@@ -122,15 +124,15 @@
</template>
<
script
setup
name=
"Overview"
>
import
{
auditInfo
}
from
'@/api/console.js'
import
{
ref
}
from
'vue'
import
{
ElMessageBox
}
from
'element-plus'
import
{
auditInfo
}
from
'@/api/console.js'
import
{
ref
}
from
'vue'
import
{
ElMessageBox
}
from
'element-plus'
const
baseUrl
=
import
.
meta
.
env
.
VITE_APP_BASE_API
const
infoData
=
ref
({})
function
getAuditInfo
()
{
function
getAuditInfo
()
{
auditInfo
().
then
(
res
=>
{
console
.
log
(
res
)
infoData
.
value
=
res
.
data
...
...
@@ -138,7 +140,7 @@ function getAuditInfo () {
}
/** 查看驳回理由按钮操作 */
function
handleViewReason
()
{
function
handleViewReason
()
{
ElMessageBox
.
alert
(
infoData
.
value
.
remark
,
'驳回理由'
,
{
confirmButtonText
:
'关闭'
,
callback
:
(
action
)
=>
{
...
...
@@ -164,8 +166,10 @@ getAuditInfo()
}
.el-card
{
border
:
none
;
//
border
:
none
;
border-radius
:
15px
;
margin-bottom
:
20px
;
box-shadow
:
1px
1px
1px
0
#b9b9b9
;
:deep(.el-card__header)
{
padding-top
:
10px
!important
;
...
...
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