提交暂存

This commit is contained in:
lingling 2025-02-12 22:14:56 +08:00
parent a860553891
commit 6ec9e32009
13 changed files with 409 additions and 406 deletions

View File

@ -60,3 +60,17 @@ export function carouselDel(id:number,type:Number) {
export function carouselChang(id:number,type:Number,img_url:string) {
return axios.post<res_carousel>('/admin/api/v1/carousel/chang',{id,type,img_url});
}
/**
*
* @returns
*/
export function getAll() {
return axios.post<res_carousel>('/api/v1/ExchangeRate/lists');
}
/**
*
* @returns
*/
export function setAll(item:any) {
return axios.post<res_carousel>('/admin/api/v1/carousel/chang',item);
}

View File

@ -52,7 +52,7 @@ export default {
'navbar.action.locale': '切换为中文',
'menu.project': '项目',
'menu.hotinformation': '文章',
'menu.carousel':'轮播图',
'menu.carousel':'汇率',
'menu.volunteerservicecorps':'志愿队',
'menu.jobuser':'用户',
...localeSettings,

View File

@ -1,37 +1,37 @@
import { DEFAULT_LAYOUT } from '../base';
import { AppRouteRecordRaw } from '../types';
// import { DEFAULT_LAYOUT } from '../base';
// import { AppRouteRecordRaw } from '../types';
const LIST: AppRouteRecordRaw = {
path: '/carousel',
name: 'carousel',
component: DEFAULT_LAYOUT,
meta: {
locale: 'menu.carousel',
requiresAuth: true,
icon: 'icon-image',
order: 3,
},
children: [
{
path: 'carouseldetailed', // The midline path complies with SEO specifications
name: 'carouseldetailed',
component: () => import('@/views/carousel/carousel.vue'),
meta: {
locale: 'menu.carousel.Table',
requiresAuth: true,
roles: ['*'],
},
},{
path: 'carouseladdetailed', // The midline path complies with SEO specifications
name: 'carouseladdetailed',
component: () => import('@/views/carousel/carouselad.vue'),
meta: {
locale: 'menu.carouselad.Table',
requiresAuth: true,
roles: ['*'],
},
},
],
};
// const LIST: AppRouteRecordRaw = {
// path: '/carousel',
// name: 'carousel',
// component: DEFAULT_LAYOUT,
// meta: {
// locale: 'menu.carousel',
// requiresAuth: true,
// icon: 'icon-image',
// order: 3,
// },
// children: [
// {
// path: 'carouseldetailed', // The midline path complies with SEO specifications
// name: 'carouseldetailed',
// component: () => import('@/views/carousel/carousel.vue'),
// meta: {
// locale: 'menu.carousel.Table',
// requiresAuth: true,
// roles: ['*'],
// },
// },{
// path: 'carouseladdetailed', // The midline path complies with SEO specifications
// name: 'carouseladdetailed',
// component: () => import('@/views/carousel/carouselad.vue'),
// meta: {
// locale: 'menu.carouselad.Table',
// requiresAuth: true,
// roles: ['*'],
// },
// },
// ],
// };
export default LIST;
// export default LIST;

View File

@ -0,0 +1,28 @@
import { DEFAULT_LAYOUT } from '../base';
import { AppRouteRecordRaw } from '../types';
const LIST: AppRouteRecordRaw = {
path: '/exchangerate',
name: 'exchangerate',
component: DEFAULT_LAYOUT,
meta: {
locale: 'menu.carousel',
requiresAuth: true,
icon: 'icon-menu-unfold',
order: 3,
},
children: [
{
path: 'carouseldetailed', // The midline path complies with SEO specifications
name: 'carouseldetailed',
component: () => import('@/views/carousel/carousel.vue'),
meta: {
locale: 'menu.carousel.Table',
requiresAuth: true,
roles: ['*'],
},
}
],
};
export default LIST;

View File

@ -1,47 +1,47 @@
import { DEFAULT_LAYOUT } from '../base';
import { AppRouteRecordRaw } from '../types';
// import { DEFAULT_LAYOUT } from '../base';
// import { AppRouteRecordRaw } from '../types';
const LIST: AppRouteRecordRaw = {
path: '/hotinformation',
name: 'hotinformation',
component: DEFAULT_LAYOUT,
meta: {
locale: 'menu.hotinformation',
requiresAuth: true,
icon: 'icon-layers',
order: 9,
},
children: [
{
path: 'index', // The midline path complies with SEO specifications
name: 'index',
component: () => import('@/views/hotinformation/index.vue'),
meta: {
locale: 'menu.hotinformation.Table',
requiresAuth: true,
roles: ['*'],
},
},{
path: 'volunteerdynamics', // The midline path complies with SEO specifications
name: 'volunteerdynamics',
component: () => import('@/views/hotinformation/volunteerdynamics.vue'),
meta: {
locale: 'menu.hotinformation.volunteerdynamics',
requiresAuth: true,
roles: ['*'],
},
},{
path: 'edi/:type/:id', // The midline path complies with SEO specifications
name: 'edi',
component: () => import('@/views/hotinformation/edi.vue'),
meta: {
locale: 'menu.hotinformation.edi',
requiresAuth: true,
hideInMenu:true,
roles: ['*'],
},
}
],
};
// const LIST: AppRouteRecordRaw = {
// path: '/hotinformation',
// name: 'hotinformation',
// component: DEFAULT_LAYOUT,
// meta: {
// locale: 'menu.hotinformation',
// requiresAuth: true,
// icon: 'icon-layers',
// order: 9,
// },
// children: [
// {
// path: 'index', // The midline path complies with SEO specifications
// name: 'index',
// component: () => import('@/views/hotinformation/index.vue'),
// meta: {
// locale: 'menu.hotinformation.Table',
// requiresAuth: true,
// roles: ['*'],
// },
// },{
// path: 'volunteerdynamics', // The midline path complies with SEO specifications
// name: 'volunteerdynamics',
// component: () => import('@/views/hotinformation/volunteerdynamics.vue'),
// meta: {
// locale: 'menu.hotinformation.volunteerdynamics',
// requiresAuth: true,
// roles: ['*'],
// },
// },{
// path: 'edi/:type/:id', // The midline path complies with SEO specifications
// name: 'edi',
// component: () => import('@/views/hotinformation/edi.vue'),
// meta: {
// locale: 'menu.hotinformation.edi',
// requiresAuth: true,
// hideInMenu:true,
// roles: ['*'],
// },
// }
// ],
// };
export default LIST;
// export default LIST;

View File

@ -8,7 +8,7 @@ const JOBUSER: AppRouteRecordRaw = {
meta: {
locale: 'menu.jobuser',
requiresAuth: true,
icon: 'Person fill gear',
icon: 'icon-user',
order: 0,
},
children: [

View File

@ -1,38 +1,38 @@
import { DEFAULT_LAYOUT } from '../base';
import { AppRouteRecordRaw } from '../types';
// import { DEFAULT_LAYOUT } from '../base';
// import { AppRouteRecordRaw } from '../types';
const LIST: AppRouteRecordRaw = {
path: '/project',
name: 'project',
component: DEFAULT_LAYOUT,
meta: {
locale: 'menu.project',
requiresAuth: true,
icon: 'icon-list',
order: 0,
},
children: [
{
path: 'projectdetailed', // The midline path complies with SEO specifications
name: 'projectdetailed',
component: () => import('@/views/project/index.vue'),
meta: {
locale: 'menu.project.Table',
requiresAuth: true,
roles: ['*'],
},
},
// {
// path: 'card',
// name: 'Card',
// component: () => import('@/views/list/card/index.vue'),
// meta: {
// locale: 'menu.project.cardList',
// requiresAuth: true,
// roles: ['*'],
// },
// },
],
};
// const LIST: AppRouteRecordRaw = {
// path: '/project',
// name: 'project',
// component: DEFAULT_LAYOUT,
// meta: {
// locale: 'menu.project',
// requiresAuth: true,
// icon: 'icon-list',
// order: 0,
// },
// children: [
// {
// path: 'projectdetailed', // The midline path complies with SEO specifications
// name: 'projectdetailed',
// component: () => import('@/views/project/index.vue'),
// meta: {
// locale: 'menu.project.Table',
// requiresAuth: true,
// roles: ['*'],
// },
// },
// // {
// // path: 'card',
// // name: 'Card',
// // component: () => import('@/views/list/card/index.vue'),
// // meta: {
// // locale: 'menu.project.cardList',
// // requiresAuth: true,
// // roles: ['*'],
// // },
// // },
// ],
// };
export default LIST;
// export default LIST;

View File

@ -1,38 +1,38 @@
import { DEFAULT_LAYOUT } from '../base';
import { AppRouteRecordRaw } from '../types';
// import { DEFAULT_LAYOUT } from '../base';
// import { AppRouteRecordRaw } from '../types';
const LIST: AppRouteRecordRaw = {
path: '/volunteerservicecorps',
name: 'volunteerservicecorps',
component: DEFAULT_LAYOUT,
meta: {
locale: 'menu.volunteerservicecorps',
requiresAuth: true,
icon: 'icon-user-group',
order: 3,
},
children: [
{
path: 'volunteerservicecorpsdetailed', // The midline path complies with SEO specifications
name: 'volunteerservicecorpsdetailed',
component: () => import('@/views/volunteerservicecorps/index.vue'),
meta: {
locale: 'menu.volunteerservicecorps.Table',
requiresAuth: true,
roles: ['*'],
},
},{
path: 'edivolunteerservicecorps', // The midline path complies with SEO specifications
name: 'edivolunteerservicecorps',
component: () => import('@/views/volunteerservicecorps/edi.vue'),
meta: {
locale: 'menu.volunteerservicecorps.Table',
requiresAuth: true,
hideInMenu:true,
roles: ['*'],
},
},
],
};
// const LIST: AppRouteRecordRaw = {
// path: '/volunteerservicecorps',
// name: 'volunteerservicecorps',
// component: DEFAULT_LAYOUT,
// meta: {
// locale: 'menu.volunteerservicecorps',
// requiresAuth: true,
// icon: 'icon-user-group',
// order: 3,
// },
// children: [
// {
// path: 'volunteerservicecorpsdetailed', // The midline path complies with SEO specifications
// name: 'volunteerservicecorpsdetailed',
// component: () => import('@/views/volunteerservicecorps/index.vue'),
// meta: {
// locale: 'menu.volunteerservicecorps.Table',
// requiresAuth: true,
// roles: ['*'],
// },
// },{
// path: 'edivolunteerservicecorps', // The midline path complies with SEO specifications
// name: 'edivolunteerservicecorps',
// component: () => import('@/views/volunteerservicecorps/edi.vue'),
// meta: {
// locale: 'menu.volunteerservicecorps.Table',
// requiresAuth: true,
// hideInMenu:true,
// roles: ['*'],
// },
// },
// ],
// };
export default LIST;
// export default LIST;

View File

@ -2,81 +2,66 @@
<div class="container">
<Breadcrumb :items="['menu.carousel', 'menu.carousel.Table']" />
<a-card class="general-card" :title="$t('menu.carousel.Table')">
<a-button @click="handleClick" type="primary">
<template #icon>
<icon-folder-add />
</template>
<template #default>新增</template>
</a-button>
<carouselitem :id="index.id" :del="del" :type="0" :update="update" :img_url="index.img_url" v-for="index in carousel">
</carouselitem>
<!-- 100 积分 = 0.00 USDT
100 积分 = 30 NGN
100 积分 = 1TRX
100 积分 = 1.62 INR
100 积分 = 0.080 BRL
100 积分 = 5 PKR -->
<h2 style="text-align: center;">100积分</h2>
<a-form :model="form" auto-label-width @submit="handleSubmit">
<a-form-item field="USDT" label="USDT">
<a-input v-model="form.USDT" type="number" placeholder="请输入对应的USDT汇率" />
</a-form-item>
<a-form-item field="NGN" label="NGN">
<a-input v-model="form.NGN" type="number" placeholder="请输入对应的NGN汇率" />
</a-form-item>
<a-form-item field="TRX" label="TRX">
<a-input v-model="form.TRX" type="number" placeholder="请输入对应的TRX汇率" />
</a-form-item>
<a-form-item field="INR" label="INR">
<a-input v-model="form.INR" type="number" placeholder="请输入对应的INR汇率" />
</a-form-item>
<a-form-item field="BRL" label="BRL">
<a-input v-model="form.BRL" type="number" placeholder="请输入对应的BRL汇率" />
</a-form-item>
<a-form-item field="PKR" label="PKR">
<a-input v-model="form.PKR" type="number" placeholder="请输入对应的PKR汇率" />
</a-form-item>
<a-form-item>
<a-button html-type="submit">保存</a-button>
</a-form-item>
</a-form>
</a-card>
<a-modal v-model:visible="visible" @ok="handleOk" @cancel="handleCancel">
<template #title>
新增轮播图
</template>
<div>
<a-upload :custom-request="upload" list-type="picture-card" v-model:file-list="fileList" image-preview />
</div>
</a-modal>
</div>
</template>
<script setup>
import { getCarousel,carouselAdd} from '@/api/carousel';
import { ref, onMounted } from 'vue';
import { getCarousel, getAll } from '@/api/carousel';
import { ref, onMounted,reactive } from 'vue';
import { IconFolderAdd } from '@arco-design/web-vue/es/icon';
import carouselitem from './components/carouselitem.vue';
import { updateimage } from '@/api/project';
const carousel = ref([])
//
const visible = ref(false);
const handleClick = () => {
visible.value = true;
};
const handleOk = () => {
visible.value = false;
for (let index = 0; index < upload_array.length; index++) {
const element = upload_array[index];
carouselAdd(element,0)
}
update()
};
const handleCancel = () => {
visible.value = false;
}
const fileList = ref([]);
const form = reactive({
USDT:0,
NGN:0,
TRX:0,
INR:0,
BRL:0,
PKR:0,
});
const handleSubmit=()=>{
onMounted(async () => {
update()
})
const update = async () => {
carousel.value = []
const res = await getCarousel();
for (let i of res.data) {
carousel.value.push(i)
}
}
/**删除函数不刷新 */
const del = (idToDelete) => {
carousel.value = carousel.value.filter(item => item.id !== idToDelete);
}
const upload_array=[]
const upload = async (option) => {
const { onProgress, onError, onSuccess, fileItem, name } = option
const res = await updateimage(fileItem.file)
if (res.code === 200) {
onSuccess(res.data.data)
onMounted(async ()=>{
const res=await getAll()
console.log(res.data)
let url = `${res.data.url}`
upload_array.push(url)
}
}
for (let index = 0; index < res.data; index++) {
form[res.data[index].type]=res.data[index].points
}
})
</script>

View File

@ -1,88 +0,0 @@
<template>
<div class="container">
<Breadcrumb :items="['menu.carousel', 'menu.carousel.Table']" />
<a-card class="general-card" :title="$t('menu.carousel.Table')">
<a-button @click="handleClick" type="primary">
<template #icon>
<icon-folder-add />
</template>
<template #default>新增</template>
</a-button>
<carouselitem :id="index.id" :del="del" :type="1" :update="update" :img_url="index.img_url" v-for="index in carousel">
</carouselitem>
</a-card>
<a-modal v-model:visible="visible" @ok="handleOk" @cancel="handleCancel">
<template #title>
替换轮播图
</template>
<div>
<a-upload :custom-request="upload" list-type="picture-card" v-model:file-list="fileList" image-preview />
</div>
</a-modal>
</div>
</template>
<script setup>
import { getCarousel,carouselAdd, getCarouselAd} from '@/api/carousel';
import { ref, onMounted } from 'vue';
import { IconFolderAdd } from '@arco-design/web-vue/es/icon';
import carouselitem from './components/carouselitem.vue';
import { updateimage } from '@/api/project';
const carousel = ref([])
//
const visible = ref(false);
const handleClick = () => {
visible.value = true;
};
const handleOk = () => {
visible.value = false;
for (let index = 0; index < upload_array.length; index++) {
const element = upload_array[index];
carouselAdd(element,1)
}
update()
};
const handleCancel = () => {
visible.value = false;
}
const fileList = ref([]);
onMounted(async () => {
update()
})
const update = async () => {
carousel.value = []
const res = await getCarouselAd();
for (let i of res.data) {
carousel.value.push(i)
}
}
/**删除函数不刷新 */
const del = (idToDelete) => {
carousel.value = carousel.value.filter(item => item.id !== idToDelete);
}
const upload_array=[]
const upload = async (option) => {
const { onProgress, onError, onSuccess, fileItem, name } = option
const res = await updateimage(fileItem.file)
if (res.code === 200) {
onSuccess(res.data.data)
console.log(res.data)
let url = `${res.data.url}`
upload_array.push(url)
}
}
</script>
<style scoped>
.container {
padding: 0 20px 20px 20px;
}
</style>

View File

@ -1,6 +1,5 @@
export default {
'menu.carousel.basic': '轮播图详情页',
'menu.carousel.Table': '轮播图详情',
'menu.carouselad.Table': '轮播图广告详情',
'menu.carousel.basic': '汇率',
'menu.carousel.Table': '汇率设置',
};

View File

@ -0,0 +1,39 @@
<template>
<div class="group">
<a-card>
父亲
</a-card>
</div>
<div class="group">
<a-card>
</a-card>
</div>
<div class="group">
<a-card>
</a-card>
<a-card>
</a-card>
</div>
<div class="group">
<a-card>
</a-card>
</div>
</template>
<script lang="ts" setup>
import { computed } from 'vue';
const props = defineProps({
id: Number,
});
</script>
<style scoped lang="less">
.group {
display: flex;
justify-content: space-between;
}
</style>

View File

@ -3,42 +3,60 @@
<Breadcrumb :items="['menu.jobuser', 'menu.jobuser.userlist']" />
<a-card class="general-card" :title="$t('menu.jobuser.userlist')">
<a-divider style="margin-top: 0" />
<a-table :columns="columns" :data="data" :scroll="{ x: 1500, y: 1200 }">
<template #action="{ record }">
<a-button type="text" @click="showConfirm(record.id)">拉黑</a-button>
<a-table :data="data">
<template #columns>
<a-table-column title="用户id" data-index="user_id"></a-table-column>
<a-table-column title="用户名称" data-index="username"></a-table-column>
<a-table-column title="用户积分" data-index="money"></a-table-column>
<a-table-column title="累计在线时长/分" data-index="time"></a-table-column>
<a-table-column title="注册时间" data-index="time"></a-table-column>
<a-table-column title="是否封禁" data-index="black"><template #cell="{ record }">
{{ record.black == 1 ? '是' : '否' }}
</template></a-table-column>
<a-table-column title="操作">
<template #cell="{ record }">
<!-- <a-button @click="create(record.id)">编辑</a-button> -->
<a-button v-show="record.black != 1" status="danger" @click="showConfirm(record.id)">封禁</a-button>
<a-button v-show="record.black == 1" status="danger" @click="showConfirm(record.id)">解禁</a-button>
<a-button @click="show_group(record.id)">查看团队</a-button>
</template>
</a-table>
</a-table-column>
</template>
</a-table>
</a-card>
<!-- 团队关系展示 -->
<a-modal v-model:visible="modal_visible" width="auto">
<template #title>
团队关系展示
</template>
<showgroup :id="show_group_id"></showgroup>
</a-modal>
</div>
</template>
<script lang="ts" setup>
import { computed, ref, reactive, watch, nextTick, onMounted } from 'vue';
import { lists,getBlack,ListParams } from '@/api/jobuser';
import { lists, getBlack, ListParams } from '@/api/jobuser';
import { Modal } from '@arco-design/web-vue';
import { Message } from '@arco-design/web-vue';
const columns = [
{ title: '账号', width: 100, dataIndex: 'username', fixed: 'left' },
{ title: '密码', width: 100, dataIndex: 'password', fixed: 'left' },
{ title: '注册时间', dataIndex: 'time', width: 150 },
{ title: '累计在线时间', dataIndex: 'money', width: 150 },
{ title: '积分', dataIndex: 'money', width: 150 },
{
title: '操作',
fixed: 'right',
width: 100,
slotName: 'action'
},
];
import showgroup from './components/showgroup.vue';
interface DataItem {
username: string;
password: string;
time: Date;
money: string;
username: string;
password: string;
time: Date;
money: string;
}
let data = ref<DataItem[]>([])
//
const modal_visible=ref(false)
//id
const show_group_id=ref(0)
const show_group=(id:number)=>{
show_group_id.value=id
modal_visible.value=true
}
const showConfirm = (id: string) => {
Modal.confirm({
@ -49,28 +67,30 @@ const showConfirm = (id: string) => {
});
};
const handleBlock = (id: string) => {
getBlack(id).then(res=>{
getBlack(id).then(res => {
console.log(res.status)
if(res.status == 'success'){
getAll();
if (res.status == 'success') {
getAll();
Message.success('拉黑成功')
}else{
} else {
Message.error('拉黑失败')
}
})
};
const queryParams=ref({
const queryParams = ref({
black: null,
username: null
});
const getAll = () => {
lists(queryParams.value).then(res=>{
data.value = res.data;
})
lists(queryParams.value).then(res => {
data.value = res.data;
})
};
onMounted(async () => {
getAll()
getAll()
})
</script>
@ -80,81 +100,87 @@ onMounted(async () => {
padding: 0 20px 20px 20px;
}
.left-side {
flex: 1;
overflow: auto;
.left-side {
flex: 1;
overflow: auto;
}
.right-side {
width: 280px;
margin-left: 16px;
}
.panel {
background-color: var(--color-bg-2);
border-radius: 4px;
overflow: auto;
}
:deep(.panel-border) {
margin-bottom: 0;
border-bottom: 1px solid rgb(var(--gray-2));
}
.moduler-wrap {
border-radius: 4px;
background-color: var(--color-bg-2);
:deep(.text) {
font-size: 12px;
text-align: center;
color: rgb(var(--gray-8));
}
.right-side {
width: 280px;
margin-left: 16px;
}
:deep(.wrapper) {
margin-bottom: 8px;
text-align: center;
cursor: pointer;
.panel {
background-color: var(--color-bg-2);
border-radius: 4px;
overflow: auto;
}
:deep(.panel-border) {
margin-bottom: 0;
border-bottom: 1px solid rgb(var(--gray-2));
}
.moduler-wrap {
border-radius: 4px;
background-color: var(--color-bg-2);
:deep(.text) {
font-size: 12px;
text-align: center;
color: rgb(var(--gray-8));
}
:deep(.wrapper) {
margin-bottom: 8px;
text-align: center;
cursor: pointer;
&:last-child {
.text {
margin-bottom: 0;
}
}
&:hover {
.icon {
color: rgb(var(--arcoblue-6));
background-color: #e8f3ff;
}
.text {
color: rgb(var(--arcoblue-6));
}
&:last-child {
.text {
margin-bottom: 0;
}
}
:deep(.icon) {
display: inline-block;
width: 32px;
height: 32px;
margin-bottom: 4px;
color: rgb(var(--dark-gray-1));
line-height: 32px;
font-size: 16px;
text-align: center;
background-color: rgb(var(--gray-1));
border-radius: 4px;
&:hover {
.icon {
color: rgb(var(--arcoblue-6));
background-color: #e8f3ff;
}
.text {
color: rgb(var(--arcoblue-6));
}
}
}
:deep(.icon) {
display: inline-block;
width: 32px;
height: 32px;
margin-bottom: 4px;
color: rgb(var(--dark-gray-1));
line-height: 32px;
font-size: 16px;
text-align: center;
background-color: rgb(var(--gray-1));
border-radius: 4px;
}
}
</style>
<style lang="less" scoped>
// responsive
.mobile {
.container {
display: block;
}
.right-side {
// display: none;
width: 100%;
margin-left: 0;
margin-top: 16px;
}
// responsive
.mobile {
.container {
display: block;
}
.right-side {
// display: none;
width: 100%;
margin-left: 0;
margin-top: 16px;
}
}
</style>