提交暂存

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) { export function carouselChang(id:number,type:Number,img_url:string) {
return axios.post<res_carousel>('/admin/api/v1/carousel/chang',{id,type,img_url}); 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': '切换为中文', 'navbar.action.locale': '切换为中文',
'menu.project': '项目', 'menu.project': '项目',
'menu.hotinformation': '文章', 'menu.hotinformation': '文章',
'menu.carousel':'轮播图', 'menu.carousel':'汇率',
'menu.volunteerservicecorps':'志愿队', 'menu.volunteerservicecorps':'志愿队',
'menu.jobuser':'用户', 'menu.jobuser':'用户',
...localeSettings, ...localeSettings,

View File

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

View File

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

View File

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

View File

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

View File

@ -2,81 +2,66 @@
<div class="container"> <div class="container">
<Breadcrumb :items="['menu.carousel', 'menu.carousel.Table']" /> <Breadcrumb :items="['menu.carousel', 'menu.carousel.Table']" />
<a-card class="general-card" :title="$t('menu.carousel.Table')"> <a-card class="general-card" :title="$t('menu.carousel.Table')">
<a-button @click="handleClick" type="primary"> <!-- 100 积分 = 0.00 USDT
<template #icon> 100 积分 = 30 NGN
<icon-folder-add /> 100 积分 = 1TRX
</template> 100 积分 = 1.62 INR
<template #default>新增</template> 100 积分 = 0.080 BRL
</a-button> 100 积分 = 5 PKR -->
<carouselitem :id="index.id" :del="del" :type="0" :update="update" :img_url="index.img_url" v-for="index in carousel"> <h2 style="text-align: center;">100积分</h2>
</carouselitem> <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-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> </div>
</template> </template>
<script setup> <script setup>
import { getCarousel,carouselAdd} from '@/api/carousel'; import { getCarousel, getAll } from '@/api/carousel';
import { ref, onMounted } from 'vue'; import { ref, onMounted,reactive } from 'vue';
import { IconFolderAdd } from '@arco-design/web-vue/es/icon'; import { IconFolderAdd } from '@arco-design/web-vue/es/icon';
import carouselitem from './components/carouselitem.vue'; import carouselitem from './components/carouselitem.vue';
import { updateimage } from '@/api/project'; const form = reactive({
const carousel = ref([]) USDT:0,
// NGN:0,
const visible = ref(false); TRX:0,
const handleClick = () => { INR:0,
visible.value = true; BRL:0,
}; PKR:0,
const handleOk = () => { });
visible.value = false; const handleSubmit=()=>{
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([]);
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=[] onMounted(async ()=>{
const res=await getAll()
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) console.log(res.data)
let url = `${res.data.url}` for (let index = 0; index < res.data; index++) {
upload_array.push(url) form[res.data[index].type]=res.data[index].points
} }
} })
</script> </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 { export default {
'menu.carousel.basic': '轮播图详情页', 'menu.carousel.basic': '汇率',
'menu.carousel.Table': '轮播图详情', 'menu.carousel.Table': '汇率设置',
'menu.carouselad.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,35 +3,45 @@
<Breadcrumb :items="['menu.jobuser', 'menu.jobuser.userlist']" /> <Breadcrumb :items="['menu.jobuser', 'menu.jobuser.userlist']" />
<a-card class="general-card" :title="$t('menu.jobuser.userlist')"> <a-card class="general-card" :title="$t('menu.jobuser.userlist')">
<a-divider style="margin-top: 0" /> <a-table :data="data">
<a-table :columns="columns" :data="data" :scroll="{ x: 1500, y: 1200 }"> <template #columns>
<template #action="{ record }"> <a-table-column title="用户id" data-index="user_id"></a-table-column>
<a-button type="text" @click="showConfirm(record.id)">拉黑</a-button> <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-column>
</template> </template>
</a-table> </a-table>
</a-card> </a-card>
<!-- 团队关系展示 -->
<a-modal v-model:visible="modal_visible" width="auto">
<template #title>
团队关系展示
</template>
<showgroup :id="show_group_id"></showgroup>
</a-modal>
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { computed, ref, reactive, watch, nextTick, onMounted } from 'vue'; 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 { Modal } from '@arco-design/web-vue';
import { Message } from '@arco-design/web-vue'; import { Message } from '@arco-design/web-vue';
const columns = [ import showgroup from './components/showgroup.vue';
{ 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'
},
];
interface DataItem { interface DataItem {
username: string; username: string;
password: string; password: string;
@ -39,6 +49,14 @@ interface DataItem {
money: string; money: string;
} }
let data = ref<DataItem[]>([]) 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) => { const showConfirm = (id: string) => {
Modal.confirm({ Modal.confirm({
@ -49,23 +67,25 @@ const showConfirm = (id: string) => {
}); });
}; };
const handleBlock = (id: string) => { const handleBlock = (id: string) => {
getBlack(id).then(res=>{ getBlack(id).then(res => {
console.log(res.status) console.log(res.status)
if(res.status == 'success'){ if (res.status == 'success') {
getAll(); getAll();
Message.success('拉黑成功') Message.success('拉黑成功')
}else{ } else {
Message.error('拉黑失败') Message.error('拉黑失败')
} }
}) })
}; };
const queryParams=ref({ const queryParams = ref({
black: null, black: null,
username: null username: null
}); });
const getAll = () => { const getAll = () => {
lists(queryParams.value).then(res=>{ lists(queryParams.value).then(res => {
data.value = res.data; data.value = res.data;
}) })
}; };
@ -80,28 +100,31 @@ onMounted(async () => {
padding: 0 20px 20px 20px; padding: 0 20px 20px 20px;
} }
.left-side { .left-side {
flex: 1; flex: 1;
overflow: auto; overflow: auto;
} }
.right-side { .right-side {
width: 280px; width: 280px;
margin-left: 16px; margin-left: 16px;
} }
.panel { .panel {
background-color: var(--color-bg-2); background-color: var(--color-bg-2);
border-radius: 4px; border-radius: 4px;
overflow: auto; overflow: auto;
} }
:deep(.panel-border) {
:deep(.panel-border) {
margin-bottom: 0; margin-bottom: 0;
border-bottom: 1px solid rgb(var(--gray-2)); border-bottom: 1px solid rgb(var(--gray-2));
} }
.moduler-wrap {
.moduler-wrap {
border-radius: 4px; border-radius: 4px;
background-color: var(--color-bg-2); background-color: var(--color-bg-2);
:deep(.text) { :deep(.text) {
font-size: 12px; font-size: 12px;
text-align: center; text-align: center;
@ -118,11 +141,13 @@ onMounted(async () => {
margin-bottom: 0; margin-bottom: 0;
} }
} }
&:hover { &:hover {
.icon { .icon {
color: rgb(var(--arcoblue-6)); color: rgb(var(--arcoblue-6));
background-color: #e8f3ff; background-color: #e8f3ff;
} }
.text { .text {
color: rgb(var(--arcoblue-6)); color: rgb(var(--arcoblue-6));
} }
@ -141,20 +166,21 @@ onMounted(async () => {
background-color: rgb(var(--gray-1)); background-color: rgb(var(--gray-1));
border-radius: 4px; border-radius: 4px;
} }
} }
</style> </style>
<style lang="less" scoped> <style lang="less" scoped>
// responsive // responsive
.mobile { .mobile {
.container { .container {
display: block; display: block;
} }
.right-side { .right-side {
// display: none; // display: none;
width: 100%; width: 100%;
margin-left: 0; margin-left: 0;
margin-top: 16px; margin-top: 16px;
} }
} }
</style> </style>