Commit ed624bfa by 胡悦

提交

1 parent da10b658
Showing 62 changed files with 571 additions and 67 deletions
<template>
<router-view />
</template>
<script lang="ts" setup>
</script>
<script lang="ts" setup></script>
<style>
.flex-grow {
flex-grow: 1;
......
#app {
position: relative;
width: 100%;
height: 100vh;
// background-color: #F8F6F5;
z-index: 1;
overflow-y: auto;
}
.gray-code {
font-size: 14px;
color: #bcbcbc;
font-weight: 400;
line-height: 20px;
.bg {
position: absolute;
left: 0;
// right: 0;
top: 0;
// bottom: 0;
width: 100%;
z-index: -1;
// height: 100%;
}
.code {
color: #FB7034;
.x-center {
position: absolute;
left: 50%;
transform: translateX(-50%);
}
\ No newline at end of file
$good-color: #ffd2b2;
.product-box {
top: 395px;
display: inline-block;
// box-shadow: 0px 4px 12px 0px rgba(50, 0, 0, 0.5);
padding: 0 43px;
font-size: 30px;
color: $good-color;
line-height: 30px;
}
.product-name {
position: relative;
padding: 10px 0;
border-top: 3px solid $good-color;
border-bottom: 3px solid $good-color;
background: linear-gradient(0deg, #850005 0%, #9a1316 100%);
height: 100%;
box-sizing: border-box;
}
.product-icon {
position: absolute;
}
.icon-left {
left: -50px;
top: -2px;
}
.icon-right {
right: -50px;
top: -2px;
}
.store-name {
top: 466px;
color: $good-color;
font-size: 26px;
font-weight: 500;
}
.employee-avatar {
top: 700px;
width: 124px;
height: 124px;
border-radius: 50%;
}
.ribbon {
top: 748px;
img {
width: 610px;
height: 112px;
}
&-content {
position: relative;
}
&-text {
bottom: 7px;
color: $good-color;
font-size: 22px;
height: 40px;
span:first-child {
display: inline-block;
transform: rotate(10deg);
margin-right: 20px;
}
span:last-child {
display: inline-block;
transform: rotate(-10deg);
margin-left: 20px;
}
}
&-name {
vertical-align: -webkit-baseline-middle;
}
}
.ranking {
top: 1123px;
color: $good-color;
width: 405px;
}
.sales {
top: 870px;
color: $good-color;
font-size: 30px;
font-weight: 600;
// text-shadow: 0px 2px 5px rgba(50, 0, 0, 0.3);
span {
background-image: linear-gradient(-18deg, #ffb376 0%, #ffe6af 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.number {
font-size: 100px;
margin: 0 6px;
font-style: italic;
}
}
.table {
&-box {
padding-top: 4px;
font-size: 20px;
}
&-header {
display: flex;
align-items: center;
height: 45px;
opacity: 0.7;
}
&-th,
&-td {
width: 20%;
text-align: center;
}
&-body {
width: 100%;
}
&-item {
display: flex;
align-items: center;
height: 40px;
margin-bottom: 16px;
}
&-item:nth-child(odd) {
background-color: #830e13;
border-radius: 20px;
}
&-avatar {
width: 30px;
height: 30px;
border-radius: 50%;
}
&-td {
display: flex;
align-items: center;
justify-content: center;
position: relative;
}
}
.sales-number {
font-size: 32px;
font-weight: 600;
}
.first-ranking {
position: relative;
img {
width: 40px;
height: 33px;
}
.ranking-number {
color: #ffffff;
}
}
.ranking-bg {
width: 26px;
height: 26px;
background-color: #bf1c20;
border-radius: 50%;
}
.ranking-number {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
\ No newline at end of file
<!--
* @Description: 表格页面
* @Author: huyue
* @Date: 2022-10-10 16:21:55
* @LastEditors: huyue
* @LastEditTime: 2022-10-13 14:24:42
-->
<template>
<div class="table-box ranking">
<div class="table-header">
<div class="table-th">排名</div>
<div class="table-th">头像</div>
<div class="table-th">头像</div>
<div class="table-th">部门</div>
<div class="table-th">姓名</div>
<div class="table-th">单量</div>
</div>
<div class="table-body">
<div
class="table-item"
v-for="(item, index) in data.tableData"
:key="index"
>
<template v-if="index < 3">
<div class="table-td first-ranking">
<img
:src="`src/assets/images/goodNews/${data.medals[index]}.png`"
alt=""
/>
<span class="ranking-number" style="top: 44%">{{ index + 1 }}</span>
</div>
</template>
<template v-else>
<div class="table-td">
<span class="ranking-bg"></span>
<span class="ranking-number">{{ index + 1 }}</span>
</div>
</template>
<div class="table-td">{{ item.departement }}</div>
<div class="table-td">{{ item.departement }}</div>
<div class="table-td">{{ item.departement }}</div>
<div class="table-td">{{ item.name }}</div>
<div class="table-td sales-number">{{ item.salesNumber }}</div>
</div>
</div>
</div>
</template>
<script lang="ts">
import { defineComponent, computed, reactive } from "vue";
interface Props {
iconClass: string;
className: string;
}
export default defineComponent({
name: "ReportTable",
props: {
iconClass: {
type: String,
required: true,
},
className: {
type: String,
default: () => "",
},
},
setup(props: Props) {
console.log(props);
const data = reactive({
tableData: [
{
avatar:
"https://tse3-mm.cn.bing.net/th/id/OIP-C.B6pZ8N_dG3MNAYppM-zX0AHaEo?pid=ImgDet&rs=1",
departement: "销售部",
name: "曾详集",
salesNumber: 19,
},
{
avatar: "",
departement: "销售部",
name: "曾详集",
salesNumber: 19,
},
{
avatar: "",
departement: "销售部",
name: "曾详集",
salesNumber: 19,
},
{
avatar: "",
departement: "销售部",
name: "曾详集",
salesNumber: 19,
},
{
avatar: "",
departement: "销售部",
name: "曾详集",
salesNumber: 19,
},
{
avatar: "",
departement: "销售部",
name: "曾详集",
salesNumber: 19,
},
{
avatar: "",
departement: "销售部",
name: "曾详集",
salesNumber: 19,
},
{
avatar: "",
departement: "销售部",
name: "曾详集",
salesNumber: 19,
},
{
avatar: "",
departement: "销售部",
name: "曾详集",
salesNumber: 19,
},
{
avatar: "",
departement: "销售部",
name: "曾详集",
salesNumber: 19,
},
],
medals: ["first", "second", "third"],
});
return {
data,
};
},
});
</script>
<style lang="scss" scoped>
.table {
&-box {
width: 100%;
padding: 20px 0;
font-size: 20px;
}
&-header {
display: flex;
align-items: center;
height: 56px;
background: linear-gradient(0deg, #ffe1c8 0%, #fff2e0 100%);
border-radius: 8px;
font-size: 22px;
font-weight: 500;
color: #333333;
}
&-th,
&-td {
width: 20%;
text-align: center;
}
&-body {
width: 100%;
}
&-item {
display: flex;
align-items: center;
height: 60px;
border-bottom: 1px solid rgba(255, 142, 67, 0.15);
}
&-td {
display: flex;
align-items: center;
justify-content: center;
position: relative;
font-size: 20px;
font-weight: 500;
color: #333333;
line-height: 18px;
}
}
.first-ranking {
position: relative;
img {
width: 40px;
height: 33px;
}
.ranking-number {
color: #ffffff;
}
}
.ranking-bg {
width: 26px;
height: 26px;
background: linear-gradient(0deg, #ff2f37 0%, #ff9a77 100%);
opacity: 0.3;
border-radius: 50%;
}
.ranking-number {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
</style>
/*
import { components } from './../libs/vant';
* @Description:
* @Author: huyue
* @Date: 2022-10-10 10:54:14
* @LastEditors: huyue
* @LastEditTime: 2022-10-13 10:19:17
*/
// const components = require.context('./',false, /\.vue$/)
\ No newline at end of file
<!--
* @Description: 表格页面
* @Author: huyue
* @Date: 2022-10-10 16:21:55
* @LastEditors: huyue
* @LastEditTime: 2022-10-10 16:22:18
-->
<template>表格</template>
<script lang="ts">
import { defineComponent, computed } from "vue";
interface Props {
iconClass: string;
className: string;
}
export default defineComponent({
name: "SvgIcon",
props: {
iconClass: {
type: String,
required: true,
},
className: {
type: String,
default: () => "",
},
},
setup(props: Props) {
const iconName = computed((): string => `#icon-${props.iconClass}`);
const svgClass = computed((): string => {
if (props.className) {
return "svg-icon " + props.className;
} else {
return "svg-icon";
}
});
console.log(props);
return {
iconName,
svgClass,
};
},
});
</script>
<style scoped></style>
/*
* @Description:
* @Author: huyue
* @Date: 2022-10-10 10:54:14
* @LastEditors: huyue
* @LastEditTime: 2022-10-13 10:13:46
*/
import { createApp } from 'vue'
import store from './store'
import axios from 'axios'
......@@ -5,6 +12,7 @@ import axios from 'axios'
import router, { setupRouter } from './router'
import App from './App.vue'
import SvgIcon from 'comps/SvgIcon/index.vue'
import ReportTable from 'comps/ReportTable/index.vue'
import 'lib-flexible/flexible'
import 'utils/rem'
import fetchConfig from './utils/config'
......@@ -15,7 +23,7 @@ let vConsole: object = {}
import { components } from './libs/vant'
components.forEach(component => app.use(component));
app.component('svg-icon', SvgIcon)
app.component('report-table', ReportTable)
fetchConfig().then(res => {
// axios.defaults.baseURL = res.request.baseURL
localStorage.setItem('config', JSON.stringify(res))
......
......@@ -8,6 +8,22 @@ const staticRoutes = Object.freeze([
title: '喜报',
backgroundColor: '#F8F6F5'
}
},
{
path: '/activiting',
component: () => import('views/crowdfunding/activiting.vue'),
meta: {
title: '战报',
backgroundColor: '#FE3C41'
}
},
{
path: '/activited',
component: () => import('views/crowdfunding/activited.vue'),
meta: {
title: '战报',
backgroundColor: '#FE3C41'
}
}
])
......
let baseSize = 37.5
function setRem() {
const scale = document.documentElement.clientWidth / 375
document.documentElement.style.fontSize = baseSize * Math.min(scale, 2) + 'px'
const scale = document.documentElement.clientWidth / 750
document.documentElement.style.fontSize = baseSize * Math.min(scale, 3) + 'px'
}
setRem()
window.onresize = () => {
......
......@@ -3,8 +3,155 @@
* @Author: huyue
* @Date: 2022-10-10 15:26:23
* @LastEditors: huyue
* @LastEditTime: 2022-10-10 15:36:14
* @LastEditTime: 2022-10-13 15:54:59
-->
<template>
<div>喜报</div>
<img class="bg" src="@/assets/images/goodNews/bg.png" alt="" />
<div class="product-box x-center">
<div class="product-name">
<img
class="icon-left product-icon"
src="@/assets/images/goodNews/icon-left.png"
alt=""
/>
360全景影像系统
<img
class="icon-right product-icon"
src="@/assets/images/goodNews/icon-right.png"
alt=""
/>
</div>
</div>
<div class="store-name x-center">深圳鹏峰本田</div>
<img
class="employee-avatar x-center"
src="https://tse3-mm.cn.bing.net/th/id/OIP-C.B6pZ8N_dG3MNAYppM-zX0AHaEo?pid=ImgDet&rs=1"
alt=""
/>
<div class="ribbon x-center">
<div class="ribbon-content">
<img src="@/assets/images/goodNews/ribbon.png" alt="" />
<div class="ribbon-text x-center">
<span>销售部</span>
<span class="ribbon-name">增香积</span>
<span>为团队助力</span>
</div>
</div>
</div>
<div class="sales x-center">
<span>第</span>
<span class="number">61</span>
<span>单</span>
</div>
<div class="table-box ranking x-center">
<div class="table-header">
<div class="table-th">排名</div>
<div class="table-th">头像</div>
<div class="table-th">部门</div>
<div class="table-th">姓名</div>
<div class="table-th">单量</div>
</div>
<div class="table-body">
<div
class="table-item"
v-for="(item, index) in data.tableData"
:key="index"
>
<template v-if="index < 3">
<div class="table-td first-ranking">
<img
:src="`src/assets/images/goodNews/${data.medals[index]}.png`"
alt=""
/>
<span class="ranking-number" style="top: 44%">{{ index + 1 }}</span>
</div>
</template>
<template v-else>
<div class="table-td">
<span class="ranking-bg"></span>
<span class="ranking-number">{{ index + 1 }}</span>
</div>
</template>
<div class="table-td">
<img class="table-avatar" :src="item.avatar" alt="" />
</div>
<div class="table-td">{{ item.departement }}</div>
<div class="table-td">{{ item.name }}</div>
<div class="table-td sales-number">{{ item.salesNumber }}</div>
</div>
</div>
</div>
</template>
<script lang="ts" setup>
import { reactive } from "vue";
const data = reactive({
tableData: [
{
avatar:
"https://tse3-mm.cn.bing.net/th/id/OIP-C.B6pZ8N_dG3MNAYppM-zX0AHaEo?pid=ImgDet&rs=1",
departement: "销售部",
name: "曾详集",
salesNumber: 19,
},
{
avatar: "",
departement: "销售部",
name: "曾详集",
salesNumber: 19,
},
{
avatar: "",
departement: "销售部",
name: "曾详集",
salesNumber: 19,
},
{
avatar: "",
departement: "销售部",
name: "曾详集",
salesNumber: 19,
},
{
avatar: "",
departement: "销售部",
name: "曾详集",
salesNumber: 19,
},
{
avatar: "",
departement: "销售部",
name: "曾详集",
salesNumber: 19,
},
{
avatar: "",
departement: "销售部",
name: "曾详集",
salesNumber: 19,
},
{
avatar: "",
departement: "销售部",
name: "曾详集",
salesNumber: 19,
},
{
avatar: "",
departement: "销售部",
name: "曾详集",
salesNumber: 19,
},
{
avatar: "",
departement: "销售部",
name: "曾详集",
salesNumber: 19,
},
],
medals: ["first", "second", "third"],
});
</script>
<style lang="scss" scoped>
@import "src/assets/styles/goodNews.scss";
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!