Commit 3bef40bb by 孙美琪

相关修改

parent cd11e8ef
...@@ -19,9 +19,9 @@ ...@@ -19,9 +19,9 @@
<screenfull id="screenfull" class="right-menu-item hover-effect"/> <screenfull id="screenfull" class="right-menu-item hover-effect"/>
<el-tooltip content="布局大小" effect="dark" placement="bottom"> <!-- <el-tooltip content="布局大小" effect="dark" placement="bottom">-->
<size-select id="size-select" class="right-menu-item hover-effect"/> <!-- <size-select id="size-select" class="right-menu-item hover-effect"/>-->
</el-tooltip> <!-- </el-tooltip>-->
</template> </template>
<div class="avatar-container"> <div class="avatar-container">
<el-dropdown @command="handleCommand" class="right-menu-item hover-effect"> <el-dropdown @command="handleCommand" class="right-menu-item hover-effect">
...@@ -33,13 +33,13 @@ ...@@ -33,13 +33,13 @@
</div> </div>
<template #dropdown> <template #dropdown>
<el-dropdown-menu> <el-dropdown-menu>
<!-- <router-link to="/user/profile">--> <!-- <router-link to="/user/profile">-->
<!-- <el-dropdown-item>个人中心</el-dropdown-item>--> <!-- <el-dropdown-item>个人中心</el-dropdown-item>-->
<!-- </router-link>--> <!-- </router-link>-->
<el-dropdown-item command="setLayout" v-if="settingsStore.showSettings"> <!-- <el-dropdown-item command="setLayout" v-if="settingsStore.showSettings">-->
<span>布局设置</span> <!-- <span>布局设置</span>-->
</el-dropdown-item> <!-- </el-dropdown-item>-->
<el-dropdown-item divided command="logout"> <el-dropdown-item command="logout">
<span>退出登录</span> <span>退出登录</span>
</el-dropdown-item> </el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
</template> </template>
<script setup> <script setup>
import { ElMessageBox } from 'element-plus' import {ElMessageBox} from 'element-plus'
import Breadcrumb from '@/components/Breadcrumb' import Breadcrumb from '@/components/Breadcrumb'
import TopNav from '@/components/TopNav' import TopNav from '@/components/TopNav'
import Hamburger from '@/components/Hamburger' import Hamburger from '@/components/Hamburger'
...@@ -75,11 +75,11 @@ defineProps({ ...@@ -75,11 +75,11 @@ defineProps({
} }
}) })
function toggleSideBar () { function toggleSideBar() {
appStore.toggleSideBar() appStore.toggleSideBar()
} }
function handleCommand (command) { function handleCommand(command) {
switch (command) { switch (command) {
case 'setLayout': case 'setLayout':
setLayout() setLayout()
...@@ -92,7 +92,7 @@ function handleCommand (command) { ...@@ -92,7 +92,7 @@ function handleCommand (command) {
} }
} }
function logout () { function logout() {
ElMessageBox.confirm('确定注销并退出系统吗?', '提示', { ElMessageBox.confirm('确定注销并退出系统吗?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
...@@ -107,7 +107,7 @@ function logout () { ...@@ -107,7 +107,7 @@ function logout () {
const emits = defineEmits(['setLayout']) const emits = defineEmits(['setLayout'])
function setLayout () { function setLayout() {
emits('setLayout') emits('setLayout')
} }
</script> </script>
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
import variables from '@/assets/styles/variables.module.scss' import variables from '@/assets/styles/variables.module.scss'
// import logo from '@/assets/logo/logo.png' // import logo from '@/assets/logo/logo.png'
import xjjtLogo from '@/assets/logo/xjjt-logo.png' import xjjtLogo from '@/assets/logo/xjjt-logo.png'
import nsccLogo from '@/assets/logo/nscc-logo.jpg' import nsccLogo from '@/assets/logo/nscc-logo-copy.png'
import useSettingsStore from '@/store/modules/settings' import useSettingsStore from '@/store/modules/settings'
defineProps({ defineProps({
......
...@@ -81,7 +81,7 @@ function setLayout () { ...@@ -81,7 +81,7 @@ function setLayout () {
} }
.sidebar-container { .sidebar-container {
box-shadow: none !important; //box-shadow: none !important;
:deep(.el-menu) { :deep(.el-menu) {
--el-menu-item-font-size: 16px; --el-menu-item-font-size: 16px;
...@@ -112,7 +112,7 @@ function setLayout () { ...@@ -112,7 +112,7 @@ function setLayout () {
} }
.app-main { .app-main {
background-color: #F0F2F5; //background-color: #F2F2F2;
} }
.drawer-bg { .drawer-bg {
......
...@@ -90,34 +90,34 @@ ...@@ -90,34 +90,34 @@
<!--<div class="value">{{ item.model }}</div>--> <!--<div class="value">{{ item.model }}</div>-->
<!--<el-divider></el-divider>--> <!--<el-divider></el-divider>-->
<el-row> <el-row>
<el-col :span="12"> <el-col :span="24">
<div>
<div class="parameter-item"> <div class="parameter-item">
<div class="label">CPU</div> <div class="label">CPU</div>
<div class="value">{{ item.cpu }}</div> <div class="value">{{ item.cpu }}</div>
</div> </div>
</el-col>
<el-col :span="24">
<div class="parameter-item"> <div class="parameter-item">
<div class="label">GPU</div> <div class="label">GPU</div>
<div class="value">{{ item.gpu }}</div> <div class="value">{{ item.gpu }}</div>
</div> </div>
</div>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="24">
<div>
<div class="parameter-item"> <div class="parameter-item">
<div class="label">内存</div> <div class="label">内存</div>
<div class="value">{{ item.memory }}</div> <div class="value">{{ item.memory }}</div>
</div> </div>
</el-col>
<el-col :span="24">
<div class="parameter-item"> <div class="parameter-item">
<div class="label">存储</div> <div class="label">存储</div>
<div class="value">{{ item.storage }}</div> <div class="value">{{ item.storage }}</div>
</div> </div>
</div>
</el-col> </el-col>
</el-row> </el-row>
<el-divider></el-divider> <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>--> <!--<div class="flex-justify-end month-expenses">约¥15/月</div>-->
<el-divider></el-divider> <el-divider></el-divider>
<div class="footer-action flex"> <div class="footer-action flex">
...@@ -183,7 +183,8 @@ ...@@ -183,7 +183,8 @@
<div class="label">{{ item.label }}</div> <div class="label">{{ item.label }}</div>
<div class="value"> <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-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"> <el-radio-button v-for="option in item.options" :label="option.id">
...@@ -232,8 +233,8 @@ ...@@ -232,8 +233,8 @@
</template> </template>
<script name="ResourceList" setup> <script name="ResourceList" setup>
import { ref, watch } from 'vue' import {ref, watch} from 'vue'
import { ElMessageBox } from 'element-plus' import {ElMessageBox} from 'element-plus'
import SvgIcon from '@/components/SvgIcon/index.vue' import SvgIcon from '@/components/SvgIcon/index.vue'
import { import {
computilityMenu, computilityMenu,
...@@ -243,7 +244,7 @@ import { ...@@ -243,7 +244,7 @@ import {
shoppingAdd, shoppingAdd,
orderComputer orderComputer
} from '@/api/computingResource.js' } from '@/api/computingResource.js'
import { useRoute, useRouter } from 'vue-router' import {useRoute, useRouter} from 'vue-router'
const route = useRoute() const route = useRoute()
const router = useRouter() const router = useRouter()
...@@ -257,7 +258,7 @@ const pageSize = ref(10) ...@@ -257,7 +258,7 @@ const pageSize = ref(10)
const productTypes = ref([]) const productTypes = ref([])
const tableData = ref([]) const tableData = ref([])
function getTypeData () { function getTypeData() {
computilityMenu().then(res => { computilityMenu().then(res => {
productTypes.value = res.data productTypes.value = res.data
if (route.query.type) { if (route.query.type) {
...@@ -277,13 +278,13 @@ watch(() => route.query.type, (value, oldValue) => { ...@@ -277,13 +278,13 @@ watch(() => route.query.type, (value, oldValue) => {
} }
}) })
function tabChange () { function tabChange() {
pageNum.value = 1 pageNum.value = 1
getList() getList()
} }
function getList () { function getList() {
getRListByCategory({nav: tabActive.value, pageNum: '', pageSize: ''}).then(res => { getRListByCategory({nav: tabActive.value, pageNum: pageNum.value, pageSize: pageSize.value}).then(res => {
total.value = res.total total.value = res.total
tableData.value = res.rows tableData.value = res.rows
}) })
...@@ -298,7 +299,7 @@ const selectedType = ref() ...@@ -298,7 +299,7 @@ const selectedType = ref()
const selectedId = ref() const selectedId = ref()
const productDetail = ref({}) const productDetail = ref({})
function selectedProduct (type, id) { function selectedProduct(type, id) {
selectedType.value = type selectedType.value = type
selectedId.value = id selectedId.value = id
getRDetail({id}).then(res => { getRDetail({id}).then(res => {
...@@ -316,7 +317,7 @@ function selectedProduct (type, id) { ...@@ -316,7 +317,7 @@ function selectedProduct (type, id) {
}) })
} }
function initSubmitData () { function initSubmitData() {
return { return {
id: selectedId.value, id: selectedId.value,
num: form.value.num, num: form.value.num,
...@@ -340,13 +341,13 @@ function initSubmitData () { ...@@ -340,13 +341,13 @@ function initSubmitData () {
const orderPrice = ref(0) const orderPrice = ref(0)
function orderComputerPrice () { function orderComputerPrice() {
orderComputer(initSubmitData()).then(res => { orderComputer(initSubmitData()).then(res => {
orderPrice.value = res.data.totalPulicPrice orderPrice.value = res.data.totalPulicPrice
}) })
} }
function submit () { function submit() {
const data = initSubmitData() const data = initSubmitData()
if (selectedType.value === 1) { if (selectedType.value === 1) {
shoppingAdd(data).then(res => { shoppingAdd(data).then(res => {
...@@ -551,8 +552,7 @@ function submit () { ...@@ -551,8 +552,7 @@ function submit () {
.el-col { .el-col {
&:nth-child(even) { &:nth-child(even) {
display: flex; display: flex;
flex-direction: column; justify-content: space-between;
align-items: flex-end;
} }
} }
......
...@@ -227,7 +227,7 @@ ...@@ -227,7 +227,7 @@
:max-height="620" :max-height="620"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column type="selection" width="55" align="center"/> <el-table-column type="selection" width="45" align="center"/>
<el-table-column label="序号" align="center" prop="id"/> <el-table-column label="序号" align="center" prop="id"/>
<el-table-column label="订单编号" align="center" prop="orderNo"/> <el-table-column label="订单编号" align="center" prop="orderNo"/>
<el-table-column label="商品类别" align="center" prop="category"> <el-table-column label="商品类别" align="center" prop="category">
...@@ -263,7 +263,7 @@ ...@@ -263,7 +263,7 @@
<dict-tag :options="storage_type" :value="scope.row.storage"/> <dict-tag :options="storage_type" :value="scope.row.storage"/>
</template> </template>
</el-table-column> </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="price"/>
<el-table-column label="订单状态" align="center" prop="orderStatus"> <el-table-column label="订单状态" align="center" prop="orderStatus">
<template #default="scope"> <template #default="scope">
......
...@@ -232,14 +232,19 @@ ...@@ -232,14 +232,19 @@
<dict-tag :options="source_status" :value="scope.row.sourceStatus"/> <dict-tag :options="source_status" :value="scope.row.sourceStatus"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="网络带宽" align="center" prop="networkId"/> <!-- <el-table-column label="网络带宽" align="center" prop="networkId"/>-->
<el-table-column label="额外IP数量" align="center" prop="ipNum"/> <!-- <el-table-column label="额外IP数量" align="center" prop="ipNum"/>-->
<el-table-column label="虚拟机存储" align="center" prop="vmStorage"/> <!-- <el-table-column label="虚拟机存储" align="center" prop="vmStorage"/>-->
<el-table-column label="申请时间" align="center" prop="submitTime" width="180"> <el-table-column label="申请时间" align="center" prop="submitTime" width="180">
<template #default="scope"> <template #default="scope">
<span>{{ parseTime(scope.row.submitTime, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.submitTime, '{y}-{m}-{d}') }}</span>
</template> </template>
</el-table-column> </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="applyUser"/>-->
<!-- <el-table-column label="承接人" align="center" prop="receiveUser"/>--> <!-- <el-table-column label="承接人" align="center" prop="receiveUser"/>-->
<!-- <el-table-column label="使用期限" align="center" prop="useTime"/>--> <!-- <el-table-column label="使用期限" align="center" prop="useTime"/>-->
...@@ -393,8 +398,8 @@ ...@@ -393,8 +398,8 @@
</template> </template>
<script setup name="NaturalResources"> <script setup name="NaturalResources">
import { listResources, getResources, delResources, addResources, updateResources } from '@/api/computility/resources' import {listResources, getResources, delResources, addResources, updateResources} from '@/api/computility/resources'
import { getAllUser } from '@/api/system/user' import {getAllUser} from '@/api/system/user'
const {proxy} = getCurrentInstance() const {proxy} = getCurrentInstance()
const { const {
...@@ -486,7 +491,7 @@ const data = reactive({ ...@@ -486,7 +491,7 @@ const data = reactive({
const {queryParams, form, rules} = toRefs(data) const {queryParams, form, rules} = toRefs(data)
/** 查询订单管理-用户资源管理列表 */ /** 查询订单管理-用户资源管理列表 */
function getList () { function getList() {
loading.value = true loading.value = true
listResources(queryParams.value).then(response => { listResources(queryParams.value).then(response => {
resourcesList.value = response.rows resourcesList.value = response.rows
...@@ -495,14 +500,30 @@ function getList () { ...@@ -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 open.value = false
reset() reset()
} }
// 表单重置 // 表单重置
function reset () { function reset() {
form.value = { form.value = {
id: null, id: null,
orderNo: null, orderNo: null,
...@@ -532,26 +553,26 @@ function reset () { ...@@ -532,26 +553,26 @@ function reset () {
} }
/** 搜索按钮操作 */ /** 搜索按钮操作 */
function handleQuery () { function handleQuery() {
queryParams.value.pageNum = 1 queryParams.value.pageNum = 1
getList() getList()
} }
/** 重置按钮操作 */ /** 重置按钮操作 */
function resetQuery () { function resetQuery() {
proxy.resetForm('queryRef') proxy.resetForm('queryRef')
handleQuery() handleQuery()
} }
// 多选框选中数据 // 多选框选中数据
function handleSelectionChange (selection) { function handleSelectionChange(selection) {
ids.value = selection.map(item => item.id) ids.value = selection.map(item => item.id)
single.value = selection.length != 1 single.value = selection.length != 1
multiple.value = !selection.length multiple.value = !selection.length
} }
/** 新增按钮操作 */ /** 新增按钮操作 */
function handleAdd () { function handleAdd() {
reset() reset()
open.value = true open.value = true
title.value = '添加订单管理-用户资源管理' title.value = '添加订单管理-用户资源管理'
...@@ -562,7 +583,7 @@ function handleAdd () { ...@@ -562,7 +583,7 @@ function handleAdd () {
} }
/** 修改按钮操作 */ /** 修改按钮操作 */
function handleUpdate (row) { function handleUpdate(row) {
reset() reset()
const _id = row.id || ids.value const _id = row.id || ids.value
getResources(_id).then(response => { getResources(_id).then(response => {
...@@ -573,7 +594,7 @@ function handleUpdate (row) { ...@@ -573,7 +594,7 @@ function handleUpdate (row) {
} }
/** 提交按钮 */ /** 提交按钮 */
function submitForm () { function submitForm() {
proxy.$refs['resourcesRef'].validate(valid => { proxy.$refs['resourcesRef'].validate(valid => {
if (valid) { if (valid) {
if (form.value.id != null) { if (form.value.id != null) {
...@@ -594,7 +615,7 @@ function submitForm () { ...@@ -594,7 +615,7 @@ function submitForm () {
} }
/** 删除按钮操作 */ /** 删除按钮操作 */
function handleDelete (row) { function handleDelete(row) {
const _ids = row.id || ids.value const _ids = row.id || ids.value
proxy.$modal.confirm('是否确认删除订单管理-用户资源管理编号为"' + _ids + '"的数据项?').then(function () { proxy.$modal.confirm('是否确认删除订单管理-用户资源管理编号为"' + _ids + '"的数据项?').then(function () {
return delResources(_ids) return delResources(_ids)
...@@ -606,7 +627,7 @@ function handleDelete (row) { ...@@ -606,7 +627,7 @@ function handleDelete (row) {
} }
/** 导出按钮操作 */ /** 导出按钮操作 */
function handleExport () { function handleExport() {
proxy.download('computility/resources/export', { proxy.download('computility/resources/export', {
...queryParams.value ...queryParams.value
}, `resources_${new Date().getTime()}.xlsx`) }, `resources_${new Date().getTime()}.xlsx`)
......
...@@ -80,7 +80,9 @@ ...@@ -80,7 +80,9 @@
<el-tag v-if="infoData.status === '审核通过'" type="success">已认证</el-tag> <el-tag v-if="infoData.status === '审核通过'" type="success">已认证</el-tag>
<el-tag v-else class="mr5" type="warning">未认证</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>
<el-form-item label="最后提交时间:"> <el-form-item label="最后提交时间:">
{{ infoData.submitTime }} {{ infoData.submitTime }}
...@@ -122,15 +124,15 @@ ...@@ -122,15 +124,15 @@
</template> </template>
<script setup name="Overview"> <script setup name="Overview">
import { auditInfo } from '@/api/console.js' import {auditInfo} from '@/api/console.js'
import { ref } from 'vue' import {ref} from 'vue'
import { ElMessageBox } from 'element-plus' import {ElMessageBox} from 'element-plus'
const baseUrl = import.meta.env.VITE_APP_BASE_API const baseUrl = import.meta.env.VITE_APP_BASE_API
const infoData = ref({}) const infoData = ref({})
function getAuditInfo () { function getAuditInfo() {
auditInfo().then(res => { auditInfo().then(res => {
console.log(res) console.log(res)
infoData.value = res.data infoData.value = res.data
...@@ -138,7 +140,7 @@ function getAuditInfo () { ...@@ -138,7 +140,7 @@ function getAuditInfo () {
} }
/** 查看驳回理由按钮操作 */ /** 查看驳回理由按钮操作 */
function handleViewReason () { function handleViewReason() {
ElMessageBox.alert(infoData.value.remark, '驳回理由', { ElMessageBox.alert(infoData.value.remark, '驳回理由', {
confirmButtonText: '关闭', confirmButtonText: '关闭',
callback: (action) => { callback: (action) => {
...@@ -164,8 +166,10 @@ getAuditInfo() ...@@ -164,8 +166,10 @@ getAuditInfo()
} }
.el-card { .el-card {
border: none; //border: none;
border-radius: 15px;
margin-bottom: 20px; margin-bottom: 20px;
box-shadow: 1px 1px 1px 0 #b9b9b9;
:deep(.el-card__header) { :deep(.el-card__header) {
padding-top: 10px !important; padding-top: 10px !important;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment