diff --git a/config/useServer.js b/config/useServer.js
index b3ac7c0..6418cf9 100644
--- a/config/useServer.js
+++ b/config/useServer.js
@@ -3,7 +3,7 @@ export default () => ({
port: 8080,
proxy: {
'/api': {
- target: 'http://10.10.1.31:8040/api',
+ target: 'http://10.10.1.36:8040/api',
// target: 'http://127.0.0.1:8045/api',
changeOrigin: true,
rewrite: (path) => path.replace('/api', ''),
diff --git a/src/apis/modules/host.js b/src/apis/modules/host.js
new file mode 100644
index 0000000..55caa82
--- /dev/null
+++ b/src/apis/modules/host.js
@@ -0,0 +1,22 @@
+/**
+ * 权限接口
+ */
+import request from '@/utils/request'
+// 获取role列表
+export const getPageList = (params) => request.basic.get('/api/v1/power-hosts', params)
+// 获取role条数据
+export const getPage = (id) => request.basic.get(`/api/v1/power-hosts/${id}`)
+// 添加role
+export const createPage = (params) => request.basic.post('/api/v1/power-hosts', params)
+// 更新role
+export const updatePage = (id, params) => request.basic.put(`/api/v1/power-hosts/${id}`, params)
+// 删除role
+export const delPage = (id) => request.basic.delete(`/api/v1/power-hosts/${id}`)
+//获取区域列表
+export const getRegionList = (params) => request.basic.get('/api/v1/computing-power-centers/label', params)
+//添加算力卡
+export const createComputeCard = (params) => request.basic.post('/api/v1/computing-cards', params)
+//获取算力卡列表
+export const getComputeCardList = (params) => request.basic.get('/api/v1/computing-cards', params)
+//删除算力卡
+export const delComputeCard = (id) => request.basic.delete(`/api/v1/computing-cards/${id}`)
\ No newline at end of file
diff --git a/src/views/img/imgList/index.vue b/src/views/img/imgList/index.vue
index 0687a05..f561e7d 100644
--- a/src/views/img/imgList/index.vue
+++ b/src/views/img/imgList/index.vue
@@ -171,13 +171,30 @@ defineOptions({
})
const columns = [
- { title: '区域ID', dataIndex: 'hostId' },
- { title: '区域名称', dataIndex: 'hostName' },
- { title: '区域编码', dataIndex: 'regionId' },
- { title: '数据中心地址', dataIndex: 'cpu' },
- { title: '状态', dataIndex: 'memory' },
- { title: '部署主机数量(主机数量)', dataIndex: 'storage' },
- { title: '可用计算卡总数', dataIndex: 'ip' },
+ { title: '订单ID', dataIndex: 'hostId' },
+ { title: '订单编号', dataIndex: 'hostName' },
+ { title: '所属用户ID', dataIndex: 'regionId' },
+ { title: '用户名', dataIndex: 'cpu' },
+ { title: '手机号', dataIndex: 'memory' },
+ { title: '实例ID', dataIndex: 'ip' },
+ { title: '实例名称', dataIndex: 'hostId' },
+ { title: '租赁配置', dataIndex: 'hostName' },
+ { title: '计费方式', dataIndex: 'regionId' },
+ { title: '订单金额', dataIndex: 'cpu' },
+ { title: '实付金额', dataIndex: 'hostId' },
+ { title: '创建时间', dataIndex: 'hostName' },
+ { title: '支付时间', dataIndex: 'regionId' },
+ { title: '订单状态', dataIndex: 'cpu' },
+ { title: '到期时间', dataIndex: 'hostName' },
+ { title: '续费状态', dataIndex: 'regionId' },
+ { title: '支付方式', dataIndex: 'cpu' },
+ { title: '支付订单ID', dataIndex: 'hostId' },
+ { title: '发票状态', dataIndex: 'hostName' },
+ { title: '合同ID', dataIndex: 'regionId' },
+ { title: '是否开票', dataIndex: 'cpu' },
+ { title: '备注', dataIndex: 'hostId' },
+ { title: '当前运行状态', dataIndex: 'cpu' },
+ { title: '剩余时长', dataIndex: 'hostId' },
{ title: '操作', key: 'action', width: 160 },
]
// const { listData, paginationState, loading, showLoading, hideLoading, resetPagination, searchFormData } =
diff --git a/src/views/rechargeRecord/rechargeList/components/EditDialog.vue b/src/views/rechargeRecord/rechargeList/components/EditDialog.vue
index 51f7a3a..5de5740 100644
--- a/src/views/rechargeRecord/rechargeList/components/EditDialog.vue
+++ b/src/views/rechargeRecord/rechargeList/components/EditDialog.vue
@@ -1,23 +1,186 @@
-
-
-
-
-
-
+
+
+
+ 基础信息
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 启用
+ 停用
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 硬件配置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ GPU 与驱动
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 网络带宽
+
+
+
+
+
+
+ Mbps
+ Gbps
+
+
+
+
+
+
+
+
+
+
+ Mbps
+ Gbps
+
+
+
+
+
+
+
+
+ 计费信息
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -25,20 +188,22 @@
import { cloneDeep } from 'lodash-es'
import apis from '@/apis'
import { useForm, useModal } from '@/hooks'
-
+import { ref } from 'vue'
+import dayjs from 'dayjs'
const emit = defineEmits(['ok'])
-
+const areaList=ref([])
const { modal, showModal, hideModal, showLoading, hideLoading } = useModal()
const { formRef, formRules, formRecord, formData, resetForm } = useForm()
-
+formData.value.computingCards = []
formRules.value = {
- title: { required: true, message: '请输入标题' },
+ name: { required: true, message: '请输入标题' },
}
/**
* 新建
*/
function handleCreate() {
+ getAreatList()
showModal({
type: 'create',
title: '新建',
@@ -53,10 +218,16 @@ function handleEdit(record = {}) {
type: 'edit',
title: '编辑',
})
+ getAreatList()
formRecord.value = record
formData.value = cloneDeep(record)
}
+function getAreatList() {
+ apis.host.getRegionList().then((res) => {
+ areaList.value=res.data
+ })
+}
/**
* 确定
*/
@@ -72,18 +243,18 @@ function handleOk() {
let result = null
switch (modal.value.type) {
case 'create':
- result = await apis.common.create(params).catch(() => {
+ result = await apis.host.createPage(params).catch(() => {
throw new Error()
})
break
case 'edit':
- result = await apis.common.update(formRecord.value.id, params).catch(() => {
+ result = await apis.host.updatePage(formRecord.value.id, params).catch(() => {
throw new Error()
})
break
}
hideLoading()
- if (200 === result?.code) {
+ if (true === result?.success) {
hideModal()
emit('ok')
}
diff --git a/src/views/rechargeRecord/rechargeList/components/computeDialog.vue b/src/views/rechargeRecord/rechargeList/components/computeDialog.vue
new file mode 100644
index 0000000..a9a0e2c
--- /dev/null
+++ b/src/views/rechargeRecord/rechargeList/components/computeDialog.vue
@@ -0,0 +1,158 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 启用
+ 停用
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/rechargeRecord/rechargeList/components/computeList.vue b/src/views/rechargeRecord/rechargeList/components/computeList.vue
new file mode 100644
index 0000000..631d90c
--- /dev/null
+++ b/src/views/rechargeRecord/rechargeList/components/computeList.vue
@@ -0,0 +1,234 @@
+
+
+
+
+
+
+
+ 编辑
+ 删除
+
+
+
+
+
+
+
+
+
+
+