Commit a6040b5b by 胡悦

Merge branch 'v1.0.0' of http://192.168.3.233:8090/h5/glsk-data-view-pd into v1.0.0

2 parents 25c27df5 d7e52feb
...@@ -6,11 +6,11 @@ ...@@ -6,11 +6,11 @@
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2023-07-04 11:41:39 * @LastEditTime: 2023-07-04 11:41:39
*/ */
const modulesFiles = require.context('./modules', true, /\.js$/) // const modulesFiles = require.context('./modules', true, /\.js$/)
const modules = modulesFiles.keys().reduce((modules, modulePath) => { // const modules = modulesFiles.keys().reduce((modules, modulePath) => {
const moduleName = modulePath.replace(/^\.\/(.*)\.\w+$/, '$1') // const moduleName = modulePath.replace(/^\.\/(.*)\.\w+$/, '$1')
const value = modulesFiles(modulePath) // const value = modulesFiles(modulePath)
modules[moduleName] = value.default // modules[moduleName] = value.default
return modules // return modules
}, {}) // }, {})
export default modules // export default modules
<template>
<div class="main-box">
<div class="trapezoid"><div class="point">....</div></div>
<div class="right-box">
<div class="trangle"></div>
<div class="text-box">{{title}}</div>
</div>
</div>
</template>
<script>
export default {
name: 'BoxTitle',
props: {
title: {
type: String,
default: '标题'
}
},
data() {
return {}
},
mounted() {},
methods: {}
}
</script>
<style lang="scss" scoped>
.main-box {
position: relative;
}
.trapezoid {
width: 0;
height: 0;
border-top: 30px solid #0085CD;
border-right: 8px solid transparent;
border-left: 10px solid #0085CD;
.point {
position: absolute;
top: 1px;
left: 1px;
font-size: 19px;
color: #fff;
transform: rotate(90deg);
}
}
.right-box {
position: absolute;
top: 0;
left: 15px;
display: flex;
.trangle {
width: 0;
height: 0;
border: #0085CD;
border-style: solid;
border-width: 20px 8px 0 0;
border-top: 30px solid transparent;
}
.text-box {
width: 126px;
height: 30px;
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 14px;
color: #FFFFFF;
line-height: 30px;
padding-left: 2px;
background-image: linear-gradient(270deg, #6578ff00 0%, #5542ff87 53%, #0085CD 100%);
}
}
</style>
...@@ -6,19 +6,194 @@ ...@@ -6,19 +6,194 @@
* @LastEditTime: 2023-07-05 10:50:16 * @LastEditTime: 2023-07-05 10:50:16
--> -->
<template> <template>
<div class="right">右侧内容</div> <div class="right">
<!-- 右侧第一个盒子 -->
<div class="right-box1">
<box-title title="采购额排名"></box-title>
<div class="content-box">
<!-- 采购选项下拉 -->
<div class="purchase-plugin">
<div class="purchase" @click="switchPurchase">
{{ purchase }}
<img class="arrow-down" src="@/assets/images/arrow-down.png" alt="" />
</div>
<div v-show="isShow" class="select-purchase">
<div class="purchase-item" :class="purchase == item ? 'active' : ''" v-for="(item, index) in purchaseList" :key="index" @click.s="selectPurchase(item)">{{ item }}</div>
</div>
</div>
<!-- 门店排行 -->
<div v-for="(item, index) in merchantsList" :key="index" class="merchant-box">
<div class="merchant-box-item">
<div class="merchant-box-item-left">
<div class="circle" :style="{ 'background-image': index < 3 ? perchaseColorList[index] : '' }">{{ index }}</div>
<div class="text">{{ item.name }}</div>
</div>
<div class="merchant-box-item-right">{{ item.value }}</div>
</div>
</div>
</div>
</div>
<!-- 右侧第一个盒子 -->
<div class="right-box2">
<box-title title="商城采购进度分析"></box-title>
</div>
<!-- 右侧第一个盒子 -->
<div class="right-box3">
<box-title title="商城采购额商品占比"></box-title>
</div>
</div>
</template> </template>
<script type='text/ecmascript-6'>
<script type="text/ecmascript-6">
export default { export default {
name: 'ContentLeft' name: 'ContentRight',
data() {
return {
isShow: false,
purchaseList: ['商城采购', '商城采购商城采购商城采购商城采购商城采购城采购商', '自采', '商城采购商城采购商城采购商城'],
purchase: '商城采购',
perchaseColorList: ['linear-gradient(180deg, #FFDA0B 0%, #FFBC24 100%)', 'linear-gradient(180deg, #EBE5D6 0%, #BDB4A6 100%)', 'linear-gradient(180deg, #EEC08E 0%, #B86E3A 100%)'],
merchantsList: [
{
name: '公转一号店',
value: '345489'
},
{
name: '公转一号店',
value: '345489'
},
{
name: '公转一号店',
value: '345489'
},
{
name: '公转一号店',
value: '345489'
},
{
name: '公转一号店',
value: '345489'
}
]
}
},
methods: {
switchPurchase() {
this.isShow = !this.isShow
},
selectPurchase(item) {
console.log(item)
this.purchase = item
this.switchPurchase()
}
}
} }
</script> </script>
<style scoped lang='scss'> <style scoped lang="scss">
.right { .right {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
width: 31.39vw; width: 31.39vw;
overflow: hidden; overflow: hidden;
background: #091C40; background: #091c40;
// background: #061422;
&-box1,
&-box2,
&-box3 {
width: 100%;
background: #061422;
box-shadow: inset 0 0 20px 0 #3d57ff69;
}
&-box1 {
height: 27.33vh;
.content-box {
padding: 1.11vh 1.39vw 0 1.39vw;
}
.purchase-plugin {
position: relative;
}
.select-purchase {
position: absolute;
top: 2.86vh;
width: 28.61vw;
background-color: #051526;
padding: 16px 20px;
box-sizing: border-box;
border: 2px solid;
border-image: linear-gradient(90deg, #074989, #30dcff, #074989) 1;
.purchase-item {
margin-bottom: 8px;
color: #c9c9c9;
max-width: 25.83vw;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
cursor: pointer;
&:hover {
color: #ffffff;
}
&:last-child {
margin-bottom: 0;
}
&.active {
color: #ffffff;
}
}
}
.purchase {
display: flex;
align-items: center;
justify-content: space-between;
width: 28.61vw;
// height: 5.7vh;
padding: 0 0.56vw;
box-sizing: border-box;
background-image: linear-gradient(270deg, #6578ff 0%, #079ff1 100%);
font-weight: 400;
font-size: 14px;
margin-right: 0.56vw;
color: #ffffff;
.arrow-down {
width: 0.69vw;
height: 0.67vh;
}
}
.merchant-box {
&-item {
display: flex;
justify-content: space-between;
align-items: center;
&-left {
display: flex;
.circle {
width: 1.39vw;
height: 1.39vh;
background: #1E3372;
}
}
&-right {
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 14px;
color: #95acd9;
text-align: right;
}
}
}
}
&-box2,
&-box3 {
height: 25vh;
}
&-box1,
&-box2 {
margin-bottom: 1.78vh;
}
} }
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!