Commit 08c0c630 authored by zhangsan's avatar zhangsan

1

parent df6535b5
...@@ -7,15 +7,15 @@ VITE_PUBLIC_PATH = / ...@@ -7,15 +7,15 @@ VITE_PUBLIC_PATH = /
# 跨域代理,您可以配置多个 ,请注意,没有换行符 # 跨域代理,您可以配置多个 ,请注意,没有换行符
# VITE_PROXY = [["/jeecgboot","http://localhost:8080/jeecg-boot"],["/upload","http://localhost:3300/upload"]] # VITE_PROXY = [["/jeecgboot","http://localhost:8080/jeecg-boot"],["/upload","http://localhost:3300/upload"]]
# VITE_PROXY = [["/jeecgboot","http://27.124.5.14:8080/jeecg-boot"],["/upload","http://27.124.5.14:8080/upload"]] VITE_PROXY = [["/jeecgboot","http://27.124.5.14:8080/jeecg-boot"],["/upload","http://27.124.5.14:8080/upload"]]
VITE_PROXY = [["/jeecgboot","https://www.cngjqb.com/jeecg-boot"],["/upload","https://admin.yzcxyh18.com/upload"]] # VITE_PROXY = [["/jeecgboot","https://www.cngjqb.com/jeecg-boot"],["/upload","https://admin.yzcxyh18.com/upload"]]
# VITE_PROXY = [["/jeecgboot","http://118.107.9.143:8080/jeecg-boot"],["/upload","http://118.107.9.143:8080/upload"]] # VITE_PROXY = [["/jeecgboot","http://118.107.9.143:8080/jeecg-boot"],["/upload","http://118.107.9.143:8080/upload"]]
#后台接口全路径地址(必填) #后台接口全路径地址(必填)
# VITE_GLOB_DOMAIN_URL=http://localhost:8080/jeecg-boot # VITE_GLOB_DOMAIN_URL=http://localhost:8080/jeecg-boot
# VITE_GLOB_DOMAIN_URL=http://27.124.5.14:8080/jeecg-boot VITE_GLOB_DOMAIN_URL=http://27.124.5.14:8080/jeecg-boot
VITE_GLOB_DOMAIN_URL=https://www.cngjqb.com/jeecg-boot # VITE_GLOB_DOMAIN_URL=https://www.cngjqb.com/jeecg-boot
# VITE_GLOB_DOMAIN_URL=http://118.107.9.143:8080/jeecg-boot # VITE_GLOB_DOMAIN_URL=http://118.107.9.143:8080/jeecg-boot
#后台接口父地址(必填) #后台接口父地址(必填)
VITE_GLOB_API_URL=/jeecgboot VITE_GLOB_API_URL=/jeecgboot
......
This source diff could not be displayed because it is too large. You can view the blob instead.
<!doctype html><html lang="zh_CN" id="htmlRoot"><head><script src="/dsfhuksfhkAQu_33/_app.config.js?v=3.7.2-1741555592173"></script><meta charset="UTF-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/><meta name="renderer" content="webkit"/><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=0"/><title>三国志 (软件开发)企业级应用管理系统平台 三国志与您一路同行!</title><link rel="icon" href="/dsfhuksfhkAQu_33/logo.png"/><script>window._CONFIG = {};</script><script type="module" crossorigin src="/dsfhuksfhkAQu_33/js/index-Czs9LsFM.js"></script><link rel="modulepreload" crossorigin href="/dsfhuksfhkAQu_33/js/vue-vendor-nTH2ZXdz.js"><link rel="modulepreload" crossorigin href="/dsfhuksfhkAQu_33/js/antd-vue-vendor-OBGqGQKi.js"><link rel="modulepreload" crossorigin href="/dsfhuksfhkAQu_33/js/vxe-table-vendor-BlSEhNtk.js"><link rel="stylesheet" crossorigin href="/dsfhuksfhkAQu_33/assets/index-CPWBa1_C.css"><link disabled="disabled" id="__VITE_PLUGIN_THEME-ANTD_DARK_THEME_LINK__" rel="alternate stylesheet" href="/dsfhuksfhkAQu_33/assets/app-antd-dark-theme-style.e3b0c442.css"></head><body><script>(() => { <!doctype html><html lang="zh_CN" id="htmlRoot"><head><script src="/dsfhuksfhkAQu_33/_app.config.js?v=3.7.2-1741707509922"></script><meta charset="UTF-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/><meta name="renderer" content="webkit"/><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=0"/><title>三国志 (软件开发)企业级应用管理系统平台 三国志与您一路同行!</title><link rel="icon" href="/dsfhuksfhkAQu_33/logo.png"/><script>window._CONFIG = {};</script><script type="module" crossorigin src="/dsfhuksfhkAQu_33/js/index-BhqZsUgI.js"></script><link rel="modulepreload" crossorigin href="/dsfhuksfhkAQu_33/js/vue-vendor-nTH2ZXdz.js"><link rel="modulepreload" crossorigin href="/dsfhuksfhkAQu_33/js/antd-vue-vendor-BDXgbzgh.js"><link rel="modulepreload" crossorigin href="/dsfhuksfhkAQu_33/js/vxe-table-vendor-Df8Kx25g.js"><link rel="stylesheet" crossorigin href="/dsfhuksfhkAQu_33/assets/index-CPWBa1_C.css"><link disabled="disabled" id="__VITE_PLUGIN_THEME-ANTD_DARK_THEME_LINK__" rel="alternate stylesheet" href="/dsfhuksfhkAQu_33/assets/app-antd-dark-theme-style.e3b0c442.css"></head><body><script>(() => {
var htmlRoot = document.getElementById('htmlRoot'); var htmlRoot = document.getElementById('htmlRoot');
var theme = window.localStorage.getItem('__APP__DARK__MODE__'); var theme = window.localStorage.getItem('__APP__DARK__MODE__');
if (htmlRoot && theme) { if (htmlRoot && theme) {
......
...@@ -2,24 +2,31 @@ ...@@ -2,24 +2,31 @@
<div class="status-change"> <div class="status-change">
<!-- 列表弹窗 --> <!-- 列表弹窗 -->
<a-modal v-model:visible="modalVisible" title="国币价格设置" @cancel="handleCancel" width="1000px" :footer="null" <a-modal v-model:visible="modalVisible" title="国币价格设置" @cancel="handleCancel" width="1000px" :footer="null"
class="status-modal"> class="status-modal" :destroyOnClose="true">
<div class="modal-content"> <div class="modal-content">
<div class="table-operations"> <div class="table-operations">
<a-button type="primary" @click="handleAdd"> <a-button type="primary" @click="handleAdd">
<template #icon><plus-outlined /></template> <template #icon><plus-outlined /></template>
新增记录 新增记录
</a-button> </a-button>
<a-space>
<a-input-search placeholder="搜索记录" style="width: 250px" @search="onSearch" />
<a-button @click="getList">
<template #icon><reload-outlined /></template>
刷新
</a-button>
</a-space>
</div> </div>
<a-table :dataSource="tableData" :columns="columns" bordered :pagination="{ <a-table :dataSource="tableData" :columns="columns" bordered :pagination="{
showSizeChanger: true, showSizeChanger: true,
showQuickJumper: true, showQuickJumper: true,
showTotal: total => `共 ${total} 条`, showTotal: total => `共 ${total} 条`,
pageSize: 10, pageSize: pagination.pageSize,
current: pagination.pageNo, current: pagination.pageNo,
total: pagination.total, total: pagination.total,
onChange: handleTableChange onChange: handleTableChange
}" class="data-table"> }" class="data-table" :loading="loading" :scroll="{ x: 800 }">
<template #bodyCell="{ column, record }"> <template #bodyCell="{ column, record }">
<template v-if="column.key === 'a2'"> <template v-if="column.key === 'a2'">
<a-tag :color="record.a2 === '2' ? 'success' : 'warning'"> <a-tag :color="record.a2 === '2' ? 'success' : 'warning'">
...@@ -32,6 +39,17 @@ ...@@ -32,6 +39,17 @@
<template #icon><edit-outlined /></template> <template #icon><edit-outlined /></template>
编辑 编辑
</a-button> </a-button>
<a-popconfirm
title="确定要删除此记录吗?"
@confirm="handleDelete(record)"
okText="确定"
cancelText="取消"
>
<a-button type="link" danger>
<template #icon><delete-outlined /></template>
删除
</a-button>
</a-popconfirm>
</a-space> </a-space>
</template> </template>
</template> </template>
...@@ -41,7 +59,7 @@ ...@@ -41,7 +59,7 @@
<!-- 编辑/新增弹窗 --> <!-- 编辑/新增弹窗 -->
<a-modal v-model:visible="formModalVisible" :title="currentId ? '编辑记录' : '新增记录'" @ok="handleSubmit" <a-modal v-model:visible="formModalVisible" :title="currentId ? '编辑记录' : '新增记录'" @ok="handleSubmit"
@cancel="handleFormCancel" class="form-modal"> @cancel="handleFormCancel" class="form-modal" :confirmLoading="submitLoading">
<a-form :model="formData" :label-col="{ span: 6 }" :wrapper-col="{ span: 16 }" class="price-form"> <a-form :model="formData" :label-col="{ span: 6 }" :wrapper-col="{ span: 16 }" class="price-form">
<a-form-item label="开盘价格" required> <a-form-item label="开盘价格" required>
<a-input-number v-model:value="formData.a3" style="width: 100%" :min="0" :precision="2" :step="0.01" <a-input-number v-model:value="formData.a3" style="width: 100%" :min="0" :precision="2" :step="0.01"
...@@ -75,7 +93,7 @@ ...@@ -75,7 +93,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, reactive } from 'vue' import { ref, reactive, onMounted } from 'vue'
import { defHttp } from '/@/utils/http/axios' import { defHttp } from '/@/utils/http/axios'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
import type { Dayjs } from 'dayjs' import type { Dayjs } from 'dayjs'
...@@ -83,6 +101,8 @@ import dayjs from 'dayjs' ...@@ -83,6 +101,8 @@ import dayjs from 'dayjs'
import { import {
PlusOutlined, PlusOutlined,
EditOutlined, EditOutlined,
DeleteOutlined,
ReloadOutlined
} from '@ant-design/icons-vue' } from '@ant-design/icons-vue'
interface FormData { interface FormData {
...@@ -99,6 +119,9 @@ const tableData = ref([]) ...@@ -99,6 +119,9 @@ const tableData = ref([])
const modalVisible = ref(false) const modalVisible = ref(false)
const formModalVisible = ref(false) const formModalVisible = ref(false)
const currentId = ref('') const currentId = ref('')
const loading = ref(false)
const submitLoading = ref(false)
const searchKeyword = ref('')
const pagination = reactive({ const pagination = reactive({
pageNo: 1, pageNo: 1,
...@@ -162,7 +185,7 @@ const columns = [ ...@@ -162,7 +185,7 @@ const columns = [
{ {
title: '操作', title: '操作',
key: 'action', key: 'action',
width: 120, width: 150,
align: 'center', align: 'center',
fixed: 'right' fixed: 'right'
} }
...@@ -170,20 +193,30 @@ const columns = [ ...@@ -170,20 +193,30 @@ const columns = [
const getList = async () => { const getList = async () => {
try { try {
loading.value = true
const response = await defHttp.get({ const response = await defHttp.get({
url: '/business/businessGbkxt/list', url: '/business/businessGbkxt/list',
params: { params: {
pageNo: pagination.pageNo, pageNo: pagination.pageNo,
pageSize: pagination.pageSize pageSize: pagination.pageSize,
keyword: searchKeyword.value
} }
}) })
tableData.value = response.records tableData.value = response.records
pagination.total = response.total pagination.total = response.total
} catch (error) { } catch (error) {
message.error('获取列表失败') message.error('获取列表失败')
} finally {
loading.value = false
} }
} }
const onSearch = (value: string) => {
searchKeyword.value = value
pagination.pageNo = 1
getList()
}
const handleTableChange = (page: number, pageSize: number) => { const handleTableChange = (page: number, pageSize: number) => {
pagination.pageNo = page pagination.pageNo = page
pagination.pageSize = pageSize pagination.pageSize = pageSize
...@@ -191,7 +224,7 @@ const handleTableChange = (page: number, pageSize: number) => { ...@@ -191,7 +224,7 @@ const handleTableChange = (page: number, pageSize: number) => {
} }
const resetForm = () => { const resetForm = () => {
formData.a1 = '' formData.a1 = dayjs()
formData.a2 = '1' formData.a2 = '1'
formData.a3 = '' formData.a3 = ''
formData.a4 = '' formData.a4 = ''
...@@ -213,8 +246,25 @@ const handleEdit = (row: any) => { ...@@ -213,8 +246,25 @@ const handleEdit = (row: any) => {
formModalVisible.value = true formModalVisible.value = true
} }
const handleDelete = async (row: any) => {
try {
loading.value = true
await defHttp.delete({
url: '/business/businessGbkxt/delete',
params: { id: row.id }
})
message.success('删除成功')
getList()
} catch (error) {
message.error('删除失败')
} finally {
loading.value = false
}
}
const handleSubmit = async () => { const handleSubmit = async () => {
try { try {
submitLoading.value = true
const url = currentId.value const url = currentId.value
? '/business/businessGbkxt/edit' ? '/business/businessGbkxt/edit'
: '/business/businessGbkxt/add' : '/business/businessGbkxt/add'
...@@ -231,6 +281,8 @@ const handleSubmit = async () => { ...@@ -231,6 +281,8 @@ const handleSubmit = async () => {
resetForm() resetForm()
} catch (error) { } catch (error) {
message.error('操作失败') message.error('操作失败')
} finally {
submitLoading.value = false
} }
} }
...@@ -259,6 +311,11 @@ defineExpose({ ...@@ -259,6 +311,11 @@ defineExpose({
:deep(.ant-modal-body) { :deep(.ant-modal-body) {
padding: 24px; padding: 24px;
} }
:deep(.ant-modal-content) {
border-radius: 8px;
overflow: hidden;
}
} }
.modal-content { .modal-content {
...@@ -271,8 +328,17 @@ defineExpose({ ...@@ -271,8 +328,17 @@ defineExpose({
.data-table { .data-table {
:deep(.ant-table-thead > tr > th) { :deep(.ant-table-thead > tr > th) {
background-color: #fafafa; background-color: #f5f7fa;
font-weight: 600; font-weight: 600;
color: #1f2329;
}
:deep(.ant-table-tbody > tr:hover > td) {
background-color: #f0f7ff;
}
:deep(.ant-table-row) {
transition: all 0.3s;
} }
} }
} }
...@@ -292,6 +358,14 @@ defineExpose({ ...@@ -292,6 +358,14 @@ defineExpose({
margin-left: 4px; margin-left: 4px;
} }
} }
:deep(.ant-form-item) {
margin-bottom: 20px;
}
:deep(.ant-input-number-focused) {
box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}
} }
} }
...@@ -302,6 +376,7 @@ defineExpose({ ...@@ -302,6 +376,7 @@ defineExpose({
.ant-modal-title { .ant-modal-title {
font-weight: 600; font-weight: 600;
font-size: 16px; font-size: 16px;
color: #1f2329;
} }
} }
...@@ -313,4 +388,16 @@ defineExpose({ ...@@ -313,4 +388,16 @@ defineExpose({
:deep(.ant-table-pagination.ant-pagination) { :deep(.ant-table-pagination.ant-pagination) {
margin: 16px 0 0; margin: 16px 0 0;
} }
:deep(.ant-tag) {
border-radius: 4px;
padding: 0 8px;
font-size: 12px;
}
:deep(.ant-btn-link) {
padding: 0 8px;
height: 24px;
line-height: 24px;
}
</style> </style>
\ No newline at end of file
<template> <template>
<div class="page-container"> <div class="page-container">
<a-row :gutter="[16, 16]"> <a-row :gutter="[16, 16]">
<!-- 状态修改卡片 --> <!-- 国币价格设置卡片 -->
<a-col :xs="24" :sm="12" :md="8" :lg="6"> <a-col :xs="24" :sm="12" :md="8" :lg="6">
<a-card hoverable @click="showStatusModal"> <a-card hoverable @click="showStatusModal" class="feature-card">
<template #cover> <template #cover>
<div class="card-icon-wrapper"> <div class="card-icon-wrapper">
<swap-outlined class="card-icon" /> <swap-outlined class="card-icon" />
</div> </div>
</template> </template>
<a-card-meta title="状态修改" description="修改用户状态" /> <a-card-meta title="国币价格设置" description="设置国币交易价格" />
</a-card> </a-card>
</a-col> </a-col>
</a-row> </a-row>
<!-- 状态修改弹窗 --> <!-- 引入StatusChange组件 -->
<a-modal v-model:visible="statusModalVisible" title="状态修改" :footer="null" :width="isMobile ? '100%' : '520px'" <status-change ref="statusChangeRef" />
:style="isMobile ? { top: 0 } : {}" :wrap-class-name="isMobile ? 'full-modal' : ''">
<status-change v-if="statusModalVisible" @cancel="statusModalVisible = false" />
</a-modal>
</div> </div>
</template> </template>
...@@ -26,7 +23,6 @@ ...@@ -26,7 +23,6 @@
import { defineComponent, ref, computed } from 'vue'; import { defineComponent, ref, computed } from 'vue';
import { SwapOutlined } from '@ant-design/icons-vue'; import { SwapOutlined } from '@ant-design/icons-vue';
import StatusChange from './components/StatusChange.vue'; import StatusChange from './components/StatusChange.vue';
// import { useWindowSize } from '/@/hooks/web/useWindowSize';
export default defineComponent({ export default defineComponent({
name: 'ZhczIndex', name: 'ZhczIndex',
...@@ -35,17 +31,16 @@ export default defineComponent({ ...@@ -35,17 +31,16 @@ export default defineComponent({
StatusChange StatusChange
}, },
setup() { setup() {
const statusModalVisible = ref(false); const statusChangeRef = ref<InstanceType<typeof StatusChange> | null>(null);
// const { width } = useWindowSize(); const isMobile = ref(false);
// const isMobile = computed(() => width.value < 576);
const isMobile = ref(false)
const showStatusModal = () => { const showStatusModal = () => {
statusModalVisible.value = true; // 调用子组件的openModal方法
statusChangeRef.value?.openModal();
}; };
return { return {
statusModalVisible, statusChangeRef,
isMobile, isMobile,
showStatusModal showStatusModal
}; };
...@@ -55,55 +50,63 @@ export default defineComponent({ ...@@ -55,55 +50,63 @@ export default defineComponent({
<style lang="less" scoped> <style lang="less" scoped>
.page-container { .page-container {
padding: 16px; padding: 24px;
background: #f0f2f5; background: #f0f2f5;
min-height: 100vh; min-height: calc(100vh - 64px);
}
.feature-card {
transition: all 0.3s;
cursor: pointer;
&:hover {
transform: translateY(-5px);
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.09);
}
} }
.card-icon-wrapper { .card-icon-wrapper {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
height: 120px; height: 140px;
background: #fafafa; background: linear-gradient(135deg, #e6f7ff 0%, #f0f5ff 100%);
transition: all 0.3s;
} }
.card-icon { .card-icon {
font-size: 48px; font-size: 56px;
color: #1890ff; color: #1890ff;
transition: all 0.3s;
} }
:deep(.ant-card-body) { :deep(.ant-card-body) {
padding: 16px; padding: 20px;
} }
:deep(.ant-card-meta-title) { :deep(.ant-card-meta-title) {
text-align: center; text-align: center;
margin-bottom: 8px; margin-bottom: 8px;
font-size: 16px;
font-weight: 600;
} }
:deep(.ant-card-meta-description) { :deep(.ant-card-meta-description) {
text-align: center; text-align: center;
color: rgba(0, 0, 0, 0.45);
} }
// 移动端样式 @media (max-width: 576px) {
:global(.full-modal) { .page-container {
:deep(.ant-modal) { padding: 12px;
max-width: 100%;
top: 0;
padding-bottom: 0;
margin: 0;
} }
:deep(.ant-modal-content) { .card-icon-wrapper {
border-radius: 0; height: 120px;
min-height: 100vh;
} }
}
@media (max-width: 576px) { .card-icon {
.page-container { font-size: 48px;
padding: 8px;
} }
} }
</style> </style>
...@@ -88,12 +88,14 @@ import { useDataCards } from './composables/useDataCards'; ...@@ -88,12 +88,14 @@ import { useDataCards } from './composables/useDataCards';
import { useDetailData } from './composables/useDetailData'; import { useDetailData } from './composables/useDetailData';
import { LineChartOutlined, ReloadOutlined, RiseOutlined } from '@ant-design/icons-vue'; import { LineChartOutlined, ReloadOutlined, RiseOutlined } from '@ant-design/icons-vue';
import { Statistic, message } from 'ant-design-vue'; import { Statistic, message } from 'ant-design-vue';
// const mockData = ref({})
import mockData from './mock/data.json'; import mockData from './mock/data.json';
import dayjs from 'dayjs'; import dayjs from 'dayjs';
import { defHttp } from '/@/utils/http/axios'; import { defHttp } from '/@/utils/http/axios';
const getHomeData = () => { const getHomeData = () => {
defHttp.get({ url: '/business/businessWallet/getHome3', params: { startTime: "2025-02-22 00:00:00", endTime: "2025-02-26 23:59:59" } }).then(res => { defHttp.get({ url: '/business/businessWallet/getHome3', params: { startTime: "2025-02-22 00:00:00", endTime: "2025-02-26 23:59:59" } }).then(res => {
console.log(res) // console.log(res)
// mockData.value = res
}) })
} }
getHomeData() getHomeData()
......
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 to comment