main
王文龙 2023-11-15 18:29:19 +08:00
parent b839cba70a
commit 520b119525
9 changed files with 426 additions and 345 deletions

View File

@ -23,6 +23,7 @@ import {
NRadioGroup, NRadioGroup,
useMessage, useMessage,
treeDark, treeDark,
NTag
} from "naive-ui"; } from "naive-ui";
import { useUserStore } from "@/stores/modules/user"; import { useUserStore } from "@/stores/modules/user";
import HomeHead from "@/views/home/components/HomeHead.vue"; import HomeHead from "@/views/home/components/HomeHead.vue";
@ -194,9 +195,9 @@ const CloseThis = (data: boolean) => {
}; };
const handleChild1 = (data: any) => { const handleChild1 = (data: any) => {
const { showModal: show, multipleSelection } = data; const { showModal: show, multipleSelection } = data;
console.log(show); console.log("🚀 ~ file: index.vue:197 ~ data:", data)
showModal.value = unref(show); // showModal.value = unref(show);
dataList.value = unref(multipleSelection); // dataList.value = unref(multipleSelection);
}; };
</script> </script>
@ -252,13 +253,13 @@ const handleChild1 = (data: any) => {
</span> --> </span> -->
<el-dropdown> <el-dropdown>
<span <span
class="truncate flex-1 w0 text-#142142 hover:underline w400px max-w400px" class="truncate flex-1 text-#142142 hover:underline w400px max-w400px"
:title="i.title" :title="i.title"
@click="clickTo(i)" @click="handleChild1(i)"
> >
{{ i.title }} {{ i.title }}
</span> </span>
<template #dropdown v-if="flg && i.firstReviewName"> <template #dropdown v-if="i.firstReviewName">
<el-dropdown-menu> <el-dropdown-menu>
<el-dropdown-item v-if="i.firstReviewName"> <el-dropdown-item v-if="i.firstReviewName">
<div class="ml20px text-#808696 !text-12px flex"> <div class="ml20px text-#808696 !text-12px flex">

View File

@ -51,7 +51,6 @@ onMounted(async () => {
const { data: { ailist, culist, lastUTime },data } = await homePageMarket() // const { data: { ailist, culist, lastUTime },data } = await homePageMarket() //
const { data: { itemList, lastUTime: _lastUTime } } = await homePageRate() // const { data: { itemList, lastUTime: _lastUTime } } = await homePageRate() //
const { data: _disList } = await getHomeList({number: "DIS"}) // const { data: _disList } = await getHomeList({number: "DIS"}) //
console.log("🚀 ~ file: Home.vue:53 ~ _disList: updateTime", _disList)
const { data: _dszList } = await getHomeList({number: "DSZ"}) // const { data: _dszList } = await getHomeList({number: "DSZ"}) //
const { data: _dishList } = await getHomeList({number: "DISH"}) // const { data: _dishList } = await getHomeList({number: "DISH"}) //
const { data:fazhu} = await amountList() const { data:fazhu} = await amountList()
@ -81,38 +80,74 @@ onMounted(async () => {
const sum =parseFloat (currentValue.budget) +parseFloat(previousValue) const sum =parseFloat (currentValue.budget) +parseFloat(previousValue)
return sum>0 ? sum.toFixed(2):0 return sum>0 ? sum.toFixed(2):0
}, 0) }, 0)
if(_disList[0].budget == _disList[1].budget && addDIS1.value >0){
addDIS1.value -= _disList[0].budget
addDIS1.value >0? addDIS1.value = addDIS1.value.toFixed(2):0
}
addDSZ1.value = _dszList.reduce((previousValue: any, currentValue: { budget: any }) => { addDSZ1.value = _dszList.reduce((previousValue: any, currentValue: { budget: any }) => {
const sum = parseFloat(currentValue.budget) +parseFloat(previousValue) const sum = parseFloat(currentValue.budget) +parseFloat(previousValue)
return sum>0 ? sum.toFixed(2):0 return sum>0 ? sum.toFixed(2):0
}, 0) }, 0)
if(_dszList[0].budget == _dszList[1].budget && addDSZ1.value >0){
addDSZ1.value -= _dszList[0].budget
addDSZ1.value >0? addDSZ1.value = addDSZ1.value.toFixed(2):0
}
addDISH1.value = _dishList.reduce((previousValue: any, currentValue: { budget: any }) => { addDISH1.value = _dishList.reduce((previousValue: any, currentValue: { budget: any }) => {
const sum = parseFloat(currentValue.budget) +parseFloat(previousValue) const sum = parseFloat(currentValue.budget) +parseFloat(previousValue)
return sum>0 ? sum.toFixed(2):0 return sum>0 ? sum.toFixed(2):0
}, 0) }, 0)
if(_dishList[0].budget == _dishList[1].budget && addDISH1.value >0){
addDISH1.value -= _dishList[0].budget
addDISH1.value >0? addDISH1.value = addDISH1.value.toFixed(2):0
}
addDIS2.value = _disList.reduce((previousValue: any, currentValue: { monthOne: any }) => { addDIS2.value = _disList.reduce((previousValue: any, currentValue: { monthOne: any }) => {
const sum = parseFloat(currentValue.monthOne) +parseFloat(previousValue) const sum = parseFloat(currentValue.monthOne) +parseFloat(previousValue)
return sum>0 ? sum.toFixed(2):0 return sum>0 ? sum.toFixed(2):0
}, 0) }, 0)
if(_disList[0].monthOne == _disList[1].monthOne && addDIS2.value >0){
addDIS2.value -= _disList[0].monthOne
addDIS2.value >0 ? addDIS2.value = addDIS2.value.toFixed(2):0
}
addDSZ2.value = _dszList.reduce((previousValue: any, currentValue: { monthOne: any }) => { addDSZ2.value = _dszList.reduce((previousValue: any, currentValue: { monthOne: any }) => {
const sum = parseFloat(currentValue.monthOne) +parseFloat(previousValue) const sum = parseFloat(currentValue.monthOne) +parseFloat(previousValue)
return sum>0 ? sum.toFixed(2):0 return sum>0 ? sum.toFixed(2):0
}, 0) }, 0)
if(_dszList[0].monthOne == _dszList[1].monthOne && addDSZ2.value >0){
addDSZ2.value -= _dszList[0].monthOne
addDSZ2.value >0? addDSZ2.value = addDSZ2.value.toFixed(2):0
}
addDISH2.value = _dishList.reduce((previousValue: any, currentValue: { monthOne: any }) => { addDISH2.value = _dishList.reduce((previousValue: any, currentValue: { monthOne: any }) => {
const sum = parseFloat(currentValue.monthOne) +parseFloat(previousValue) const sum = parseFloat(currentValue.monthOne) +parseFloat(previousValue)
return sum>0 ? sum.toFixed(2):0 return sum>0 ? sum.toFixed(2):0
}, 0) }, 0)
if(_dishList[0].monthOne == _dishList[1].monthOne && addDISH2.value >0){
addDISH2.value -= _dishList[0].monthOne
addDISH2.value >0? addDISH2.value = addDISH2.value.toFixed(2):0
}
addDIS3.value = _disList.reduce((previousValue: any, currentValue: { monthTwo: any }) => { addDIS3.value = _disList.reduce((previousValue: any, currentValue: { monthTwo: any }) => {
const sum = parseFloat(currentValue.monthTwo) +parseFloat(previousValue) const sum = parseFloat(currentValue.monthTwo) +parseFloat(previousValue)
return sum>0 ? sum.toFixed(2):0 return sum>0 ? sum.toFixed(2):0
}, 0) }, 0)
if(_disList[0].monthTwo == _disList[1].monthTwo && addDIS3.value >0){
addDIS3.value -= _disList[0].monthTwo
addDIS3.value >0? addDIS3.value = addDIS3.value.toFixed(2):0
}
addDSZ3.value = _dszList.reduce((previousValue: any, currentValue: { monthTwo: any }) => { addDSZ3.value = _dszList.reduce((previousValue: any, currentValue: { monthTwo: any }) => {
const sum = parseFloat(currentValue.monthTwo) +parseFloat(previousValue) const sum = parseFloat(currentValue.monthTwo) +parseFloat(previousValue)
return sum>0 ? sum.toFixed(2):0 return sum>0 ? sum.toFixed(2):0
}, 0) }, 0)
if(_dszList[0].monthTwo == _dszList[1].monthTwo && addDSZ3.value >0){
addDSZ3.value -= _dszList[0].monthTwo
addDSZ3.value >0? addDSZ3.value = addDSZ3.value.toFixed(2):0
}
addDISH3.value = _dishList.reduce((previousValue: any, currentValue: { monthTwo: any }) => { addDISH3.value = _dishList.reduce((previousValue: any, currentValue: { monthTwo: any }) => {
const sum = parseFloat(currentValue.monthTwo) +parseFloat(previousValue) const sum = parseFloat(currentValue.monthTwo) +parseFloat(previousValue)
return sum>0 ? sum.toFixed(2):0 return sum>0 ? sum.toFixed(2):0
}, 0) }, 0)
if(_dishList[0].monthTwo == _dishList[1].monthTwo && addDISH3.value >0){
addDISH3.value -= _dishList[0].monthTwo
addDISH3.value >0? addDISH3.value = addDISH3.value.toFixed(2):0
}
if(isUpPwds.value){ if(isUpPwds.value){
ElMessageBox.alert('为了您的帐号安全,首次登录必须更改初始密码', '重要提醒', ElMessageBox.alert('为了您的帐号安全,首次登录必须更改初始密码', '重要提醒',
{ {

View File

@ -68,13 +68,15 @@ function computedTreeNode(item: any) {
} }
async function getData() { async function getData() {
// const {data} = await getBPCActList({moduleId: 1}) const {rows:datacArr} = await getBPCActList({moduleId: 2})
const { rows: dataArr } = await getBPCActList({ moduleId: 1 }) const { rows: dataArr } = await getBPCActList({ moduleId: 1 })
const { rows: dataBrr } = await getBPCActList({ moduleId: 4 }) const { rows: dataBrr } = await getBPCActList({ moduleId: 4 })
// const { rows: dataCrr } = await getBPCActList({ moduleId: 3 }); // const { rows: dataCrr } = await getBPCActList({ moduleId: 3 });
const { data: dataDrr } = await getCateTreeList({ moduleId: 4 }) const { data: dataDrr } = await getCateTreeList({ moduleId: 4 })
const { rows: dataErr } = await getBPCActList({ moduleId: 5 }) const { rows: dataErr } = await getBPCActList({ moduleId: 5 })
dataC.value = datacArr
dataA.value = dataArr.map((item) => { dataA.value = dataArr.map((item) => {
return { return {
...item, ...item,
@ -82,7 +84,6 @@ async function getData() {
breifName: getFileName(item.briefingPath) breifName: getFileName(item.briefingPath)
} }
}) })
console.log('🚀 ~ file: BCP.vue:84 ~ dataA:', dataA)
dataB.value = dataBrr dataB.value = dataBrr
// dataC.value = dataCrr; // dataC.value = dataCrr;
@ -111,14 +112,27 @@ async function getData() {
] ]
} }
function getFile(arr:any[]):any[] {
let file:any = []
arr.forEach((item) => {
item.fileList && file.push(...item.fileList)
if (item.childList?.length) {
file.push(...getFile(item.childList))
}
})
return file
}
function addIsShow(obj) { function addIsShow(obj) {
if (obj) { if (obj) {
obj.isShow = true // isShow obj.isShow = true // isShow
obj.fileList ? obj.fileLists = [...obj.fileList ] : obj.fileLists = []
if (obj.childList && obj.childList.length > 0) { if (obj.childList && obj.childList.length > 0) {
obj.fileLists.push(...getFile(obj.childList))
// addIsShow // addIsShow
obj.childList.forEach((child) => { // obj.childList.forEach((child) => {
addIsShow(child) // addIsShow(child)
}) // })
} }
} }
} }
@ -145,26 +159,25 @@ const jumpContentHandler = (title, type) => {
push({ name: 'contentList', query: { title, type } }) push({ name: 'contentList', query: { title, type } })
} }
const download = async (row) => { const download = async (row) => {
// console.log(row)
if (!row) return if (!row) return
if (row.isSelect === 2) { if (row.isSelect === 2) {
message.error('没有访问权限') message.error('没有访问权限')
return return
} }
let { briefingPath } = row let { briefingPath ,filePath } = row
console.log(row, 'xiaolu') console.log("🚀 ~ file: BCP.vue:169 ~ briefingPath ,filePath:", briefingPath ,filePath)
if (!briefingPath) { if (!briefingPath && !filePath) {
message.info('没有可预览文件!') message.info('没有可预览文件!')
return return
} }
srcType.value = getLastSubstring(briefingPath) srcType.value = getLastSubstring(briefingPath || filePath)
if ( if (
['doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx', 'pdf'].includes(srcType.value) ['doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx', 'pdf'].includes(srcType.value)
) { ) {
// src.value = filePath // src.value = filePath
// pdfShow.value = true // pdfShow.value = true
briefingPath = briefingPath briefingPath = briefingPath || filePath
const screenWidth = window.screen.width const screenWidth = window.screen.width
const screenHeight = window.screen.height const screenHeight = window.screen.height
window.open( window.open(
@ -338,7 +351,7 @@ const isChart = (content) => {
<div class="w-[20%] pl-6px"> <div class="w-[20%] pl-6px">
{{ i.createTime.substring(5, 10) }} {{ i.createTime.substring(5, 10) }}
</div> </div>
<div class="truncate w-[50%]"> <div class="truncate w-[50%] pr-6px">
{{ unescapeHTML(i.content) }} {{ unescapeHTML(i.content) }}
</div> </div>
<div class="truncate w-[30%]"> <div class="truncate w-[30%]">
@ -425,7 +438,7 @@ const isChart = (content) => {
<div <div
class="rounded-2xl summary-content overflow-hidden" class="rounded-2xl summary-content overflow-hidden"
id="summaryContent" id="summaryContent"
v-if="dataA.length > 0" v-if="dataC.length > 0"
> >
<swiper <swiper
:autoplay="{ delay: 1000, disableOnInteraction: false }" :autoplay="{ delay: 1000, disableOnInteraction: false }"
@ -460,13 +473,13 @@ const isChart = (content) => {
{{ it.breifName }} {{ it.breifName }}
</div> </div>
</div> --> </div> -->
<swiper-slide v-for="i in dataA" :key="i.id"> <swiper-slide v-for="i in dataC" :key="i.id">
<div class="py22px item-row items-center flex"> <div class="py22px item-row items-center flex">
<div <div
class="inline-flex cur_p file-icon text-16px" class="inline-flex cur_p file-icon text-16px"
@click="download(i, 1)" @click="download(i)"
> >
{{ i.breifName }} {{ i.title }}
</div> </div>
</div> </div>
</swiper-slide> </swiper-slide>

View File

@ -14,6 +14,8 @@ const activeMenuKey = ref();
const route = useRoute() const route = useRoute()
let idx = ref(0); let idx = ref(0);
const onClic = ref(false);
const titles = ref(); const titles = ref();
const rowData = ref(); const rowData = ref();
const srcType = ref() const srcType = ref()
@ -28,15 +30,13 @@ function getLastSubstring(str: string): string {
function menuHandler(menu: any, index: number) { function menuHandler(menu: any, index: number) {
activeMenuKey.value = menu.id; activeMenuKey.value = menu.id;
titles.value = menu.name; titles.value = menu.name;
idx.value = index; idx.value = index;
activeItem.value = menu.id; activeItem.value = menu.id;
console.log(menu,menu.id);
if (menu.childList && menu.childList.length > 0) { if (menu.childList && menu.childList.length > 0) {
activeItem.value = menu.childList[0].id; activeItem.value = menu.childList[0].id;
console.log(activeItem.value );
} }
getId(menu.id); getId(menu.id);
@ -44,7 +44,6 @@ function menuHandler(menu: any, index: number) {
} }
const getId = async (id) => { const getId = async (id) => {
const { rows } = await getActCateFileList({ cateId: id }) const { rows } = await getActCateFileList({ cateId: id })
console.log(rows);
rowData.value = rows rowData.value = rows
} }
const download = async (row)=>{ const download = async (row)=>{
@ -95,7 +94,10 @@ async function getTree(id) {
activeItem.value = data[index].childList[0].id; activeItem.value = data[index].childList[0].id;
activeMenuKey.value = data[index].childList[0].id; activeMenuKey.value = data[index].childList[0].id;
} }
setTimeout(() => {
menuHandler(data[index], id)
getId(activeMenuKey.value); getId(activeMenuKey.value);
}, 200);
} }
} }
function getFileName(url) { function getFileName(url) {
@ -108,7 +110,6 @@ onMounted(() => {
getTree(route.query.id); getTree(route.query.id);
}); });
var activeItem = ref(); var activeItem = ref();
const onClic = ref(false);
</script> </script>
<template> <template>

View File

@ -166,7 +166,7 @@ function unescapeHTML(html: string) {
<td class="wrap h50px text-left !w-1250px"> <td class="wrap h50px text-left !w-1250px">
<div :title="unescapeHTML(it.content )" class="download" @click="download(it, 'filePath')">{{unescapeHTML(it.content )}}</div> <div :title="unescapeHTML(it.content )" class="download" @click="download(it, 'filePath')">{{unescapeHTML(it.content )}}</div>
</td> </td>
<td class="h50px text-left"><span class="download" @click="download(it, 'briefingPath')">{{it.riskEstimation}}</span></td> <td class="h50px text-center"><span class="download" @click="download(it, 'briefingPath')">{{it.riskEstimation}}</span></td>
<td <td
> >
<!-- <span > {{ it.createTime }}</span> --> <!-- <span > {{ it.createTime }}</span> -->

View File

@ -1,16 +1,16 @@
<template> <template>
<div class="tree-node"> <div class="tree-node">
<div v-for="(it, index) in data" :key="index" class="tree-item expand"> <div v-for="(it, ind) in data" :key="ind" class="tree-item expand">
<div class="sub-title" @click="clickSubTitle(it, index)"> <div class="sub-title" @click="clickSubTitle(it, ind)">
<span v-if="isCount" class="index-content">{{ index + 1 }})</span> <span v-if="isCount" class="index-content">{{ ind + 1 }})</span>
{{ it.name }} {{ it.name }}
<span class="icon-arrow" @click="toggleHandler(it)" v-if="!isCount"> <span class="icon-arrow" @click="toggleHandler(it)" v-if="!isCount">
更多 更多
</span> </span>
</div> </div>
<!-- BCP历年速报 --> <!-- BCP历年速报 -->
<div class="file-container" v-if="it.isShow"> <div class="file-container">
<div class="file-content" v-if="it.fileList&&it.fileList.length > 0" > <div class="file-content" v-if="it.fileLists?.length > 0">
<!-- <div class="file-title"> <!-- <div class="file-title">
<span>{{idx + 1}})</span> <span>{{idx + 1}})</span>
{{file.title}} {{file.title}}
@ -19,22 +19,29 @@
<!-- <div class="file-icon" @click="clickFileHandler(it.fileList[0])"> <!-- <div class="file-icon" @click="clickFileHandler(it.fileList[0])">
{{ computedFileName(it.fileList[0].filePath) }} {{ computedFileName(it.fileList[0].filePath) }}
</div> --> </div> -->
<div v-for="(item, index) in it.fileList.slice(0, 3)" > <div v-for="(item, index) in it.fileLists">
<div v-if="index < 2" class="file-icon" @click="clickFileHandler(it.fileList[0])"> <div
v-if="ind == 3? index < 1 : index < 2"
class="file-icon"
@click="clickFileHandler(it.fileLists[0])"
>
<p>{{ item.title }}</p> <p>{{ item.title }}</p>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<!-- 供方健康诊断 --> <!-- 供方健康诊断 先禁掉 -->
<div v-for="(item, index) in it.childList.slice(0, 3)" > <!-- <div v-for="(item, inde) in it.childList">
<div v-for="(ite, inde) in item.fileList"> <div v-for="(ite) in item.fileLists">
<div class="file-icon" v-if="index < 2" @click="clickFileHandler(item.fileList[0])" > <div
class="file-icon"
v-if="ind == 3 ? inde < 0 : inde < 2"
@click="clickFileHandler(item.fileLists[0])"
>
<p>{{ ite.title }}</p> <p>{{ ite.title }}</p>
</div> </div>
</div>
</div> </div>
</div> -->
<!-- <div v-if="it.isShow"> <!-- <div v-if="it.isShow">
<s-tree :isCount="true" class="second-tree" v-if="it.childList.length > 0" @clickFile="receiveClickFileHandler" <s-tree :isCount="true" class="second-tree" v-if="it.childList.length > 0" @clickFile="receiveClickFileHandler"
@clickMore="receiveClickMoreHandler" :data="it.childList"></s-tree> @clickMore="receiveClickMoreHandler" :data="it.childList"></s-tree>
@ -43,50 +50,49 @@
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import sTree from "./sTree.vue"; import sTree from './sTree.vue'
const emit = defineEmits(["clickFile", "clickMore", "changeIsShow"]); const emit = defineEmits(['clickFile', 'clickMore', 'changeIsShow'])
type Props = { type Props = {
data?: []; data?: []
isCount?: false; isCount?: false
}; }
const isShow = ref(false); const isShow = ref(false)
defineProps<Props>(); defineProps<Props>()
const computedFileName = (name) => { const computedFileName = (name) => {
let s = name.lastIndexOf("/"); let s = name.lastIndexOf('/')
let e = name.lastIndexOf("."); let e = name.lastIndexOf('.')
return name.slice(s + 1, e); return name.slice(s + 1, e)
}; }
const toggleHandler = (item) => { const toggleHandler = (item) => {
// ev.target.parentNode.parentNode.classList.toggle("expand"); // ev.target.parentNode.parentNode.classList.toggle("expand");
emit("clickMore", item); emit('clickMore', item)
}; }
function clickFileHandler(obj) { function clickFileHandler(obj) {
console.log(obj) console.log(obj)
emit("clickFile", obj); emit('clickFile', obj)
} }
function receiveClickFileHandler(obj) { function receiveClickFileHandler(obj) {
emit('clickFile', obj)
emit("clickFile", obj);
} }
function receiveClickMoreHandler(item) { function receiveClickMoreHandler(item) {
emit("clickMore", item); emit('clickMore', item)
} }
const clickSubTitle = (item: any, index: number) => { const clickSubTitle = (item: any, index: number) => {
emit("changeIsShow", index); emit('changeIsShow', index)
}; }
</script> </script>
<script lang="ts"> <script lang="ts">
export default { export default {
name: "sTree", name: 'sTree'
}; }
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
.file-icon { .file-icon {
display: flex; display: flex;
align-items: center; align-items: center;
height: 20px; height: 20px;
background-image: url("./images/biq2.png"); background-image: url('./images/biq2.png');
background-size: 24px 20px; background-size: 24px 20px;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: left center; background-size: left center;
@ -163,7 +169,7 @@ export default {
align-items: center; align-items: center;
&::before { &::before {
content: ""; content: '';
display: block; display: block;
width: 6px; width: 6px;
height: 6px; height: 6px;
@ -176,7 +182,7 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
height: 20px; height: 20px;
background-image: url("./images/biq2.png"); background-image: url('./images/biq2.png');
background-size: 24px 20px; background-size: 24px 20px;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: left center; background-size: left center;
@ -190,7 +196,7 @@ export default {
.icon-arrow { .icon-arrow {
display: block; display: block;
background-image: url("./images/gdd2.png"); background-image: url('./images/gdd2.png');
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 12px 11px; background-size: 12px 11px;
@ -210,7 +216,8 @@ export default {
} }
} }
.tree-node {} .tree-node {
}
.file-icon:hover { .file-icon:hover {
color: #00e4ff; color: #00e4ff;
@ -228,7 +235,7 @@ export default {
} }
.tree-item:not(:last-child)::after { .tree-item:not(:last-child)::after {
content: ""; content: '';
position: absolute; position: absolute;
left: 0; left: 0;
right: 0; right: 0;
@ -255,4 +262,5 @@ export default {
margin-left: -16px; margin-left: -16px;
margin-right: 4px; margin-right: 4px;
text-align: center; text-align: center;
}</style> }
</style>

View File

@ -208,7 +208,8 @@ const handleVisitsScoll = () => {
<div class="text-#142142 text-20px font-extrabold flex p20px"> <div class="text-#142142 text-20px font-extrabold flex p20px">
<!-- <div class=""></div> --> <!-- <div class=""></div> -->
<div class="w-70% text-24px font-bold p20px pb-0px"> <div class="w-70% text-24px font-bold p20px pb-0px">
空调节能solution活动 <!-- 空调节能solution活动 -->
PLUS活动
</div> </div>
<div class="w-30%" style="text-align: -webkit-right"> <div class="w-30%" style="text-align: -webkit-right">
@ -344,7 +345,8 @@ const handleVisitsScoll = () => {
</div> </div>
<div class="w-40% h-375px float-left bg-#fff"> <div class="w-40% h-375px float-left bg-#fff">
<div class="text-24px font-bold p20px" @click="push({ name: 'CSRList' })"> <div class="text-24px font-bold p20px" @click="push({ name: 'CSRList' })">
碳足迹报告 <!-- 碳足迹报告 -->
相关活动报告
</div> </div>
<!-- <div title="查看更多" class="absolute right-25px top-5px w80px h50px flex justify-center items-center cursor-pointer" style="background: #0539A3;line-height: 50px;color: #00C2EE;text-align: center;" @click="jumpContentHandler('BCP简报', 2)"> --> <!-- <div title="查看更多" class="absolute right-25px top-5px w80px h50px flex justify-center items-center cursor-pointer" style="background: #0539A3;line-height: 50px;color: #00C2EE;text-align: center;" @click="jumpContentHandler('BCP简报', 2)"> -->
<!-- <div <!-- <div

View File

@ -84,7 +84,6 @@ const cardsClick = (it) => {
<el-date-picker <el-date-picker
v-model="YearTime2" v-model="YearTime2"
:style="{ width: '100px' }" :style="{ width: '100px' }"
type="year" type="year"
/> />
@ -131,15 +130,15 @@ const cardsClick = (it) => {
<div class="m20px h-100px bg-#F5F8FF p10px"> <div class="m20px h-100px bg-#F5F8FF p10px">
<div class="py5px"> <div class="py5px">
<span class="text-18px font-bold text-#3164BF"></span <span class="text-18px font-bold text-#3164BF"></span
><span class="ml5px">使用量10,700碳排放量159,158</span> ><span class="ml5px">使用量0.000碳排放量0.000</span>
</div> </div>
<div class="py5px"> <div class="py5px">
<span class="text-18px font-bold text-#3164BF"></span <span class="text-18px font-bold text-#3164BF"></span
><span class="ml5px">使用量10,700碳排放量159,158</span> ><span class="ml5px">使用量0.000碳排放量0.000</span>
</div> </div>
<div class="py5px"> <div class="py5px">
<span class="text-18px font-bold text-#3164BF"></span <span class="text-18px font-bold text-#3164BF"></span
><span class="ml5px">使用量10,700碳排放量159,158</span> ><span class="ml5px">使用量0.000碳排放量0.000</span>
</div> </div>
</div> </div>
</div> </div>
@ -150,22 +149,26 @@ const cardsClick = (it) => {
<div class="px20px py10px bg-#F5F8FF rd-5px"> <div class="px20px py10px bg-#F5F8FF rd-5px">
<span class="text-#000 text-16px font-extrabold"> 现行铝</span <span class="text-#000 text-16px font-extrabold"> 现行铝</span
><span class="text-22px text-#265DD5 font-extrabold">12,000</span >
><span> /</span> <!-- <span class="text-22px text-#265DD5 font-extrabold">0.000</span
><span> /</span> -->
</div> </div>
<div class="px20px py10px bg-#F5F8FF rd-5px mt5px"> <div class="px20px py10px bg-#F5F8FF rd-5px mt5px">
<span class="text-#000 text-16px font-extrabold"> 现行铝</span <span class="text-#000 text-16px font-extrabold"> 现行铝</span
><span class="text-22px text-#265DD5 font-extrabold">12,000</span >
><span> /</span> <!-- <span class="text-22px text-#265DD5 font-extrabold">0.000</span
><span> /</span> -->
</div> </div>
<div class="px20px py10px bg-#F5F8FF rd-5px mt5px"> <div class="px20px py10px bg-#F5F8FF rd-5px mt5px">
<span class="text-#000 text-16px font-extrabold"> 现行铝</span <span class="text-#000 text-16px font-extrabold"> 现行铝</span
><span class="text-22px text-#265DD5 font-extrabold">12,000</span >
><span> /</span> <!-- <span class="text-22px text-#265DD5 font-extrabold">0.000</span
><span> /</span> -->
</div> </div>
<div class="px20px py10px bg-#F5F8FF rd-5px mt5px"> <div class="px20px py10px bg-#F5F8FF rd-5px mt5px">
<span class="text-#000 text-16px font-extrabold"> 数据来源</span <span class="text-#000 text-16px font-extrabold"> 数据来源</span
><span class="text-#265DD5">行情展示 (cneeex.com)</span> <br /> >
<span class="text-#265DD5">行情展示 (cneeex.com)</span> <br />
SMM网站 SMM网站
</div> </div>
</div> </div>

View File

@ -329,12 +329,18 @@ export function pieData1() {
text: form.value.lable8.name, text: form.value.lable8.name,
// subtext: 'Fake Data', // subtext: 'Fake Data',
left: 'center', left: 'center',
textStyle: { color: '#4075E1', } textStyle: { color: '#4075E1' }
}, },
tooltip: { tooltip: {
trigger: 'item' trigger: 'item'
}, },
grid: { left: '20', top: '30', right: '70', bottom: '10', containLabel: true }, grid: {
left: '20',
top: '30',
right: '70',
bottom: '10',
containLabel: true
},
// legend: { // legend: {
// orient: 'vertical', // orient: 'vertical',
// left: 'left' // left: 'left'
@ -353,25 +359,38 @@ export function pieData1() {
show: false show: false
}, },
data: [ data: [
{ value: 1548, name: '铝',label:{color:'#fff',fontSize:'16px',fontWeight:'bold'} }, {
{ value: 775, name: '铁',label:{color:'#fff',fontSize:'16px',fontWeight:'bold'} }, value: 1548,
{ value: 679, name: '铜', selected: true ,label:{color:'#fff',fontSize:'16px',fontWeight:'bold'}} name: '铝',
label: { color: '#fff', fontSize: '16px', fontWeight: 'bold' }
},
{
value: 775,
name: '铁',
label: { color: '#fff', fontSize: '16px', fontWeight: 'bold' }
},
{
value: 679,
name: '铜',
selected: true,
label: { color: '#fff', fontSize: '16px', fontWeight: 'bold' }
}
], ],
// 自定义颜色 // 自定义颜色
itemStyle: { itemStyle: {
emphasis: { emphasis: {
shadowBlur: 10, shadowBlur: 10,
shadowOffsetX: 0, shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)', shadowColor: 'rgba(0, 0, 0, 0.5)'
}, },
normal: { normal: {
// 自定义每个扇形的颜色 // 自定义每个扇形的颜色
color: function (params) { color: function (params) {
const colorList = ['#3EC22B', '#3EC22B', '#3EC22B',]; const colorList = ['#3EC22B', '#3EC22B', '#3EC22B']
return colorList[params.dataIndex]; return colorList[params.dataIndex]
}, }
}, }
}, }
}, },
{ {
name: 'Access From', name: 'Access From',
@ -420,10 +439,10 @@ export function pieData1() {
} }
}, },
data: [ data: [
{ value: 335, name: '铝' }, { value: 0.0, name: '铝' },
{ value: 310, name: '铁' }, { value: 0.0, name: '铁' },
{ value: 135, name: '铜' }, { value: 0.0, name: '铜' }
], ]
// 自定义颜色 // 自定义颜色
// itemStyle: { // itemStyle: {
// borderColor: '#fff', // borderColor: '#fff',
@ -443,7 +462,6 @@ export function pieData1() {
// }, // },
} }
] ]
}) })
return { chartRef, option } return { chartRef, option }
} }