update
parent
b839cba70a
commit
520b119525
|
|
@ -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">
|
||||||
|
|
|
||||||
|
|
@ -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('为了您的帐号安全,首次登录必须更改初始密码', '重要提醒',
|
||||||
{
|
{
|
||||||
|
|
@ -330,7 +365,7 @@ const thisSelect = (e) => {
|
||||||
<tr>
|
<tr>
|
||||||
<th rowspan="2">C/D</th>
|
<th rowspan="2">C/D</th>
|
||||||
<th>交涉</th>
|
<th>交涉</th>
|
||||||
<td :rowspan="disList[0].budget ==disList[1].budget?'2':''">{{disList[0].budget}}%</td>
|
<td :rowspan="disList[0].budget ==disList[1].budget?'2':''">{{disList[0].budget}}%</td>
|
||||||
<td :rowspan="disList[0].monthOne ==disList[1].monthOne?'2':''">{{disList[0].monthOne}}%</td>
|
<td :rowspan="disList[0].monthOne ==disList[1].monthOne?'2':''">{{disList[0].monthOne}}%</td>
|
||||||
<td :rowspan="disList[0].budget ==disList[1].budget?'2':''">{{disList[0].monthTwo}}%</td>
|
<td :rowspan="disList[0].budget ==disList[1].budget?'2':''">{{disList[0].monthTwo}}%</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
||||||
|
|
@ -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>
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
}
|
}
|
||||||
getId(activeMenuKey.value);
|
setTimeout(() => {
|
||||||
|
menuHandler(data[index], id)
|
||||||
|
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>
|
||||||
|
|
|
||||||
|
|
@ -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> -->
|
||||||
|
|
|
||||||
|
|
@ -1,258 +1,266 @@
|
||||||
<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}}
|
||||||
</div> -->
|
</div> -->
|
||||||
<!-- lujinli -->
|
<!-- lujinli -->
|
||||||
<!-- <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
|
||||||
<p >{{ item.title }}</p>
|
v-if="ind == 3? index < 1 : index < 2"
|
||||||
</div>
|
class="file-icon"
|
||||||
</div>
|
@click="clickFileHandler(it.fileLists[0])"
|
||||||
</div>
|
>
|
||||||
</div>
|
<p>{{ item.title }}</p>
|
||||||
<!-- 供方健康诊断 -->
|
</div>
|
||||||
<div v-for="(item, index) in it.childList.slice(0, 3)" >
|
</div>
|
||||||
<div v-for="(ite, inde) in item.fileList">
|
</div>
|
||||||
<div class="file-icon" v-if="index < 2" @click="clickFileHandler(item.fileList[0])" >
|
</div>
|
||||||
<p >{{ ite.title }}</p>
|
<!-- 供方健康诊断 先禁掉 -->
|
||||||
</div>
|
<!-- <div v-for="(item, inde) in it.childList">
|
||||||
|
<div v-for="(ite) in item.fileLists">
|
||||||
</div>
|
<div
|
||||||
</div>
|
class="file-icon"
|
||||||
<!-- <div v-if="it.isShow">
|
v-if="ind == 3 ? inde < 0 : inde < 2"
|
||||||
|
@click="clickFileHandler(item.fileLists[0])"
|
||||||
|
>
|
||||||
|
<p>{{ ite.title }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div> -->
|
||||||
|
<!-- <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>
|
||||||
</div> -->
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
</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;
|
||||||
padding-left: 28px;
|
padding-left: 28px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
display: block;
|
display: block;
|
||||||
line-height: 24px;
|
line-height: 24px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.second-tree {
|
.second-tree {
|
||||||
margin-left: 28px;
|
margin-left: 28px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tree-item {
|
.tree-item {
|
||||||
margin-bottom: 4px;
|
margin-bottom: 4px;
|
||||||
|
|
||||||
.file-content {
|
.file-content {
|
||||||
margin-bottom: 2px;
|
margin-bottom: 2px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.tree-item.expand {
|
.tree-item.expand {
|
||||||
.icon-arrow {
|
.icon-arrow {
|
||||||
// background-image: url("./images/san22.png");
|
// background-image: url("./images/san22.png");
|
||||||
}
|
}
|
||||||
|
|
||||||
.file-content {
|
.file-content {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.file-content {
|
.file-content {
|
||||||
padding-left: 14px;
|
padding-left: 14px;
|
||||||
margin-right: 16px;
|
margin-right: 16px;
|
||||||
line-height: 24px;
|
line-height: 24px;
|
||||||
display: none;
|
display: none;
|
||||||
|
|
||||||
.file-title {
|
.file-title {
|
||||||
display: block;
|
display: block;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
padding-left: 28px;
|
padding-left: 28px;
|
||||||
position: relative;
|
position: relative;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
|
||||||
span {
|
span {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
display: block;
|
display: block;
|
||||||
width: 24px;
|
width: 24px;
|
||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
>div:not(:last-child) {
|
> div:not(:last-child) {
|
||||||
margin-bottom: 2px;
|
margin-bottom: 2px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.tree-item .tree-item .sub-title::before {
|
.tree-item .tree-item .sub-title::before {
|
||||||
content: unset;
|
content: unset;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sub-title {
|
.sub-title {
|
||||||
display: flex;
|
display: flex;
|
||||||
line-height: 28px;
|
line-height: 28px;
|
||||||
font-size: 1.1em;
|
font-size: 1.1em;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
&::before {
|
&::before {
|
||||||
content: "";
|
content: '';
|
||||||
display: block;
|
display: block;
|
||||||
width: 6px;
|
width: 6px;
|
||||||
height: 6px;
|
height: 6px;
|
||||||
background: white;
|
background: white;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
margin-right: 6px;
|
margin-right: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.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;
|
||||||
padding-left: 28px;
|
padding-left: 28px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
display: block;
|
display: block;
|
||||||
line-height: 24px;
|
line-height: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.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;
|
||||||
background-position: right center;
|
background-position: right center;
|
||||||
// width: 12px;
|
// width: 12px;
|
||||||
// height: 9px;
|
// height: 9px;
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
line-height: 24px;
|
line-height: 24px;
|
||||||
padding-right: 12px;
|
padding-right: 12px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #00e4ff;
|
color: #00e4ff;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
box-sizing: content-box;
|
box-sizing: content-box;
|
||||||
// background-origin: content-box;
|
// background-origin: content-box;
|
||||||
// background-repeat: no-repeat;
|
// background-repeat: no-repeat;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.tree-node {}
|
.tree-node {
|
||||||
|
}
|
||||||
|
|
||||||
.file-icon:hover {
|
.file-icon:hover {
|
||||||
color: #00e4ff;
|
color: #00e4ff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tree-item {
|
.tree-item {
|
||||||
padding-bottom: 8px;
|
padding-bottom: 8px;
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tree-item .tree-item {
|
.tree-item .tree-item {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.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;
|
||||||
height: 0.5px;
|
height: 0.5px;
|
||||||
background: white;
|
background: white;
|
||||||
bottom: -2px;
|
bottom: -2px;
|
||||||
background: rgba(12, 25, 180, 0.8);
|
background: rgba(12, 25, 180, 0.8);
|
||||||
}
|
}
|
||||||
|
|
||||||
.second-tree .tree-item::after {
|
.second-tree .tree-item::after {
|
||||||
content: unset;
|
content: unset;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sub-title {
|
.sub-title {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sub-title .index-content {
|
.sub-title .index-content {
|
||||||
// position: absolute;
|
// position: absolute;
|
||||||
// left: -24px;
|
// left: -24px;
|
||||||
// top: 0;
|
// top: 0;
|
||||||
display: block;
|
display: block;
|
||||||
width: 24px;
|
width: 24px;
|
||||||
margin-left: -16px;
|
margin-left: -16px;
|
||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}</style>
|
}
|
||||||
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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"
|
||||||
/>
|
/>
|
||||||
|
|
@ -98,7 +97,7 @@ const cardsClick = (it) => {
|
||||||
<div class="w-full h-340px">
|
<div class="w-full h-340px">
|
||||||
<VChart ref="chartRef1" :option="option1" />
|
<VChart ref="chartRef1" :option="option1" />
|
||||||
</div>
|
</div>
|
||||||
<div class="absolute top-16px left-2 flex items-center">
|
<div class="absolute top-16px left-2 flex items-center">
|
||||||
<el-config-provider :locale="locale">
|
<el-config-provider :locale="locale">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="YearTime1"
|
v-model="YearTime1"
|
||||||
|
|
@ -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>
|
||||||
|
|
|
||||||
|
|
@ -325,126 +325,144 @@ export function charData2() {
|
||||||
export function pieData1() {
|
export function pieData1() {
|
||||||
const chartRef = ref()
|
const chartRef = ref()
|
||||||
const option = ref<EChartsOption>({
|
const option = ref<EChartsOption>({
|
||||||
title: {
|
title: {
|
||||||
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: {
|
||||||
// legend: {
|
left: '20',
|
||||||
// orient: 'vertical',
|
top: '30',
|
||||||
// left: 'left'
|
right: '70',
|
||||||
// },
|
bottom: '10',
|
||||||
series: [
|
containLabel: true
|
||||||
{
|
},
|
||||||
name: 'Access From',
|
// legend: {
|
||||||
type: 'pie',
|
// orient: 'vertical',
|
||||||
selectedMode: 'single',
|
// left: 'left'
|
||||||
radius: [0, '30%'],
|
// },
|
||||||
label: {
|
series: [
|
||||||
position: 'inner',
|
{
|
||||||
fontSize: 14
|
name: 'Access From',
|
||||||
},
|
type: 'pie',
|
||||||
labelLine: {
|
selectedMode: 'single',
|
||||||
show: false
|
radius: [0, '30%'],
|
||||||
},
|
label: {
|
||||||
data: [
|
position: 'inner',
|
||||||
{ value: 1548, name: '铝',label:{color:'#fff',fontSize:'16px',fontWeight:'bold'} },
|
fontSize: 14
|
||||||
{ value: 775, name: '铁',label:{color:'#fff',fontSize:'16px',fontWeight:'bold'} },
|
},
|
||||||
{ value: 679, name: '铜', selected: true ,label:{color:'#fff',fontSize:'16px',fontWeight:'bold'}}
|
labelLine: {
|
||||||
],
|
show: false
|
||||||
// 自定义颜色
|
},
|
||||||
itemStyle: {
|
data: [
|
||||||
emphasis: {
|
{
|
||||||
shadowBlur: 10,
|
value: 1548,
|
||||||
shadowOffsetX: 0,
|
name: '铝',
|
||||||
shadowColor: 'rgba(0, 0, 0, 0.5)',
|
label: { color: '#fff', fontSize: '16px', fontWeight: 'bold' }
|
||||||
},
|
},
|
||||||
normal: {
|
{
|
||||||
// 自定义每个扇形的颜色
|
value: 775,
|
||||||
color: function (params) {
|
name: '铁',
|
||||||
const colorList = ['#3EC22B', '#3EC22B', '#3EC22B',];
|
label: { color: '#fff', fontSize: '16px', fontWeight: 'bold' }
|
||||||
return colorList[params.dataIndex];
|
},
|
||||||
},
|
{
|
||||||
},
|
value: 679,
|
||||||
},
|
name: '铜',
|
||||||
},
|
selected: true,
|
||||||
{
|
label: { color: '#fff', fontSize: '16px', fontWeight: 'bold' }
|
||||||
name: 'Access From',
|
}
|
||||||
type: 'pie',
|
],
|
||||||
radius: ['45%', '60%'],
|
// 自定义颜色
|
||||||
avoidLabelOverlap: false,
|
itemStyle: {
|
||||||
itemStyle: {
|
emphasis: {
|
||||||
// borderRadius: 10,
|
shadowBlur: 10,
|
||||||
borderColor: '#fff',
|
shadowOffsetX: 0,
|
||||||
borderWidth: 4
|
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
||||||
},
|
},
|
||||||
labelLine: {
|
normal: {
|
||||||
length: 30
|
// 自定义每个扇形的颜色
|
||||||
},
|
color: function (params) {
|
||||||
label: {
|
const colorList = ['#3EC22B', '#3EC22B', '#3EC22B']
|
||||||
formatter: ' {b|{b}:}{c}吨 ',
|
return colorList[params.dataIndex]
|
||||||
backgroundColor: '#F6F8FC',
|
}
|
||||||
borderColor: '#8C8D8E',
|
}
|
||||||
borderWidth: 1,
|
}
|
||||||
borderRadius: 4,
|
},
|
||||||
|
{
|
||||||
|
name: 'Access From',
|
||||||
|
type: 'pie',
|
||||||
|
radius: ['45%', '60%'],
|
||||||
|
avoidLabelOverlap: false,
|
||||||
|
itemStyle: {
|
||||||
|
// borderRadius: 10,
|
||||||
|
borderColor: '#fff',
|
||||||
|
borderWidth: 4
|
||||||
|
},
|
||||||
|
labelLine: {
|
||||||
|
length: 30
|
||||||
|
},
|
||||||
|
label: {
|
||||||
|
formatter: ' {b|{b}:}{c}吨 ',
|
||||||
|
backgroundColor: '#F6F8FC',
|
||||||
|
borderColor: '#8C8D8E',
|
||||||
|
borderWidth: 1,
|
||||||
|
borderRadius: 4,
|
||||||
|
|
||||||
rich: {
|
rich: {
|
||||||
a: {
|
a: {
|
||||||
color: '#6E7079',
|
color: '#6E7079',
|
||||||
lineHeight: 22,
|
lineHeight: 22,
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
hr: {
|
hr: {
|
||||||
borderColor: '#8C8D8E',
|
borderColor: '#8C8D8E',
|
||||||
width: '100%',
|
width: '100%',
|
||||||
borderWidth: 1,
|
borderWidth: 1,
|
||||||
height: 0
|
height: 0
|
||||||
},
|
},
|
||||||
b: {
|
b: {
|
||||||
color: '#4C5058',
|
color: '#4C5058',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
fontWeight: 'bold',
|
fontWeight: 'bold',
|
||||||
lineHeight: 33
|
lineHeight: 33
|
||||||
},
|
},
|
||||||
per: {
|
per: {
|
||||||
color: '#fff',
|
color: '#fff',
|
||||||
backgroundColor: '#4C5058',
|
backgroundColor: '#4C5058',
|
||||||
padding: [3, 4],
|
padding: [3, 4],
|
||||||
borderRadius: 4
|
borderRadius: 4
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
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',
|
||||||
// borderWidth: 2,
|
// borderWidth: 2,
|
||||||
// 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 = ['#337EE6', '#337EE6', '#337EE6',];
|
// const colorList = ['#337EE6', '#337EE6', '#337EE6',];
|
||||||
// return colorList[params.dataIndex];
|
// return colorList[params.dataIndex];
|
||||||
// },
|
// },
|
||||||
// },
|
// },
|
||||||
// },
|
// },
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
})
|
||||||
})
|
|
||||||
return { chartRef, option }
|
return { chartRef, option }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue