提交暂存
This commit is contained in:
parent
a860553891
commit
6ec9e32009
|
@ -59,4 +59,18 @@ 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);
|
||||||
}
|
}
|
|
@ -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,
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
|
@ -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;
|
||||||
|
|
|
@ -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: [
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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>
|
||||||
|
|
||||||
|
|
|
@ -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>
|
|
|
@ -1,6 +1,5 @@
|
||||||
export default {
|
export default {
|
||||||
'menu.carousel.basic': '轮播图详情页',
|
'menu.carousel.basic': '汇率',
|
||||||
'menu.carousel.Table': '轮播图详情',
|
'menu.carousel.Table': '汇率设置',
|
||||||
'menu.carouselad.Table': '轮播图广告详情',
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -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>
|
|
@ -1,44 +1,62 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<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>
|
</template>
|
||||||
</a-table>
|
</a-table-column>
|
||||||
|
</template>
|
||||||
|
</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;
|
||||||
time: Date;
|
time: Date;
|
||||||
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,28 +67,30 @@ 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;
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
getAll()
|
getAll()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -80,81 +100,87 @@ 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 {
|
||||||
|
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 {
|
:deep(.wrapper) {
|
||||||
width: 280px;
|
margin-bottom: 8px;
|
||||||
margin-left: 16px;
|
text-align: center;
|
||||||
}
|
cursor: pointer;
|
||||||
|
|
||||||
.panel {
|
&:last-child {
|
||||||
background-color: var(--color-bg-2);
|
.text {
|
||||||
border-radius: 4px;
|
margin-bottom: 0;
|
||||||
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));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.icon) {
|
&:hover {
|
||||||
display: inline-block;
|
.icon {
|
||||||
width: 32px;
|
color: rgb(var(--arcoblue-6));
|
||||||
height: 32px;
|
background-color: #e8f3ff;
|
||||||
margin-bottom: 4px;
|
}
|
||||||
color: rgb(var(--dark-gray-1));
|
|
||||||
line-height: 32px;
|
.text {
|
||||||
font-size: 16px;
|
color: rgb(var(--arcoblue-6));
|
||||||
text-align: center;
|
}
|
||||||
background-color: rgb(var(--gray-1));
|
|
||||||
border-radius: 4px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
: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>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
// responsive
|
// responsive
|
||||||
.mobile {
|
.mobile {
|
||||||
.container {
|
.container {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
|
||||||
.right-side {
|
|
||||||
// display: none;
|
|
||||||
width: 100%;
|
|
||||||
margin-left: 0;
|
|
||||||
margin-top: 16px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.right-side {
|
||||||
|
// display: none;
|
||||||
|
width: 100%;
|
||||||
|
margin-left: 0;
|
||||||
|
margin-top: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue