版本回退
parent
ec1294ac2f
commit
40b352620e
|
|
@ -123,7 +123,7 @@ const goStatistics = () => {
|
|||
class="bg-#fff/20 b-1px b-solid b-#fff rd-12px flex items-center h-52px px12px cursor-pointer mr10px"
|
||||
>
|
||||
<div size="small" @click="goStatistics">
|
||||
足迹
|
||||
访问足迹
|
||||
<!-- <span class="ml8px pl5px pr5px rounded-20px bg-#002FA7">{{
|
||||
store.user.reviewCount ?? 0
|
||||
}}</span> -->
|
||||
|
|
@ -155,13 +155,8 @@ const goStatistics = () => {
|
|||
</div> -->
|
||||
|
||||
<!-- 跳转到审批页面 -->
|
||||
<div size="small">
|
||||
新着通知
|
||||
<span class="ml8px pl5px pr5px rounded-20px bg-#002FA7">{{
|
||||
store.user.reviewCount ?? 0
|
||||
}}</span>
|
||||
</div>
|
||||
<!-- <n-popover :overlap="false" placement="bottom-start" trigger="click">
|
||||
|
||||
<n-popover :overlap="false" placement="bottom-start" trigger="click">
|
||||
<template #trigger>
|
||||
<div size="small">
|
||||
新着通知
|
||||
|
|
@ -169,8 +164,8 @@ const goStatistics = () => {
|
|||
store.user.reviewCount ?? 0
|
||||
}}</span>
|
||||
</div>
|
||||
</template> -->
|
||||
<!-- <div
|
||||
</template>
|
||||
<div
|
||||
class="inline-flex items-center p10px cursor-pointer"
|
||||
v-if="store.user.isReview === 1"
|
||||
>
|
||||
|
|
@ -201,8 +196,8 @@ const goStatistics = () => {
|
|||
@click="push({ path: '/Home/intelligence' })"
|
||||
>去查看</n-button
|
||||
>
|
||||
</div> -->
|
||||
<!-- </n-popover> -->
|
||||
</div>
|
||||
</n-popover>
|
||||
</div>
|
||||
<!-- 当前登录用户信息 -->
|
||||
<NDropdown show-arrow placement="bottom-end" size="huge" :options="options">
|
||||
|
|
|
|||
|
|
@ -180,6 +180,11 @@ const router = createRouter({
|
|||
name: "messageSelect",
|
||||
component: () => import('@/views/home/intelligence/components/messageSelect.vue')
|
||||
},
|
||||
{
|
||||
path: 'processPublic',
|
||||
name: "processPublic",
|
||||
component: () => import('@/views/home/intelligence/process/ProcessPublic.vue')
|
||||
},
|
||||
{
|
||||
path: "outside",
|
||||
meta: { title: "社外" },
|
||||
|
|
|
|||
|
|
@ -0,0 +1,483 @@
|
|||
import type { EChartsOption } from 'echarts'
|
||||
import * as echarts from 'echarts'
|
||||
import 'echarts-liquidfill';
|
||||
import { getCSRDetail } from '@/api/daikin/base'
|
||||
import { create } from 'naive-ui';
|
||||
const forms = ref({
|
||||
lable1:{
|
||||
name: '大金集团碳减排目标',
|
||||
year: 'F25',
|
||||
date: '14%',
|
||||
title1:'',
|
||||
title2:'',
|
||||
},
|
||||
lable2:{
|
||||
name: 'CN调达本部碳减排目标',
|
||||
year: 'F25',
|
||||
date: '14%',
|
||||
title1:'',
|
||||
title2:'',
|
||||
},
|
||||
lable3:{
|
||||
name: 'CN调达本部碳减排目标',
|
||||
year: 'F23',
|
||||
date: '14%',
|
||||
title1:'',
|
||||
title2:'',
|
||||
},
|
||||
lable4:{
|
||||
name: '2020实绩, 2021, 2022实绩, 2026, 2027, 2028',
|
||||
year: '1, 2, 3, 4, 70, 110',
|
||||
date: '0, 0, 0, 80, 70, 110',
|
||||
title1:'你好',
|
||||
title2:'足迹',
|
||||
},
|
||||
lable5:{
|
||||
name: '30%碳减排课题收集整体情况:',
|
||||
year: '60',
|
||||
date: '14%',
|
||||
title1:'原材料: 15.5%',
|
||||
title2:'能源消耗: 1.7%',
|
||||
},
|
||||
lable6:{
|
||||
name: 'FY23碳减排实施完成情况:',
|
||||
year: '0.6',
|
||||
data:'',
|
||||
title1:'原材料',
|
||||
title2:'整体目标10%',
|
||||
},
|
||||
lable7:{
|
||||
name:'',
|
||||
data:'',
|
||||
year: '0.6',
|
||||
title1:'能源消耗',
|
||||
title2:'整体目标5%',
|
||||
},
|
||||
lable8:{
|
||||
name:'【FY20原材料构成数据】',
|
||||
data:{
|
||||
data1:{
|
||||
name:'Search Engine',
|
||||
value:'1048'
|
||||
},
|
||||
data2:{
|
||||
name:'Direct',
|
||||
value:'735'
|
||||
}
|
||||
,
|
||||
data3:{
|
||||
name:'Email',
|
||||
value:'580'
|
||||
}
|
||||
,
|
||||
data4:{
|
||||
name:'',
|
||||
value:''
|
||||
},
|
||||
data5:{
|
||||
name:'',
|
||||
value:''
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
lable9:{
|
||||
name:'【FY20能源消耗构成数据】',
|
||||
data:{
|
||||
data1:{
|
||||
name:'Search Engine',
|
||||
value:'1048'
|
||||
},
|
||||
data2:{
|
||||
name:'Direct',
|
||||
value:'735'
|
||||
}
|
||||
,
|
||||
data3:{
|
||||
name:'Email',
|
||||
value:'580'
|
||||
}
|
||||
,
|
||||
data4:{
|
||||
name:'Union Ads',
|
||||
value:'484'
|
||||
},
|
||||
data5:{
|
||||
name:'Video Ads',
|
||||
value:'300'
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
})
|
||||
export const Content2 = [
|
||||
{
|
||||
key: '0',
|
||||
label: '活动计划',
|
||||
children: [
|
||||
{ label: '调达本部HP', items: [{ content: 'FY22年度集团新年方针:领先时代的变化开创崭新的未来变化开 创崭新的未来' }] },
|
||||
{ label: 'CSR-碳中和', items: [{ content: 'FY22年度集团新年方针:领先时代的变化开创崭新的未来变化开 创崭新的未来' }] },
|
||||
{ label: '中国地区连携强化 ', items: [{ content: 'FY22年度集团新年方针:领先时代的变化开创崭新的未来变化开 创崭新的未来' }] },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: '1',
|
||||
label: '活动成果',
|
||||
children: [
|
||||
{ label: 'Database推进', items: [{ content: 'FY22年度集团新年方针:领先时代的变化开创崭新的未来变化开 创崭新的未来' }] },
|
||||
{ label: '市况', items: [{ content: 'FY22年度集团新年方针:领先时代的变化开创崭新的未来变化开 创崭新的未来' }] },
|
||||
{ label: '汇率', items: [{ content: 'FY22年度集团新年方针:领先时代的变化开创崭新的未来变化开 创崭新的未来' }] },
|
||||
{ label: 'BCP', items: [{ content: 'FY22年度集团新年方针:领先时代的变化开创崭新的未来变化开 创崭新的未来' }] },
|
||||
],
|
||||
},
|
||||
]
|
||||
export const Content3 = [
|
||||
{
|
||||
key: '0',
|
||||
title: 'xx活动概要',
|
||||
label: '活动计划',
|
||||
children: [
|
||||
{ label: '调达本部HP', items: [{ content: 'FY22年度集团新年方针:领先时代的变化开创崭新的未来变化开 创崭新的未来' }] },
|
||||
{ label: 'CSR-碳中和', items: [{ content: 'FY22年度集团新年方针:领先时代的变化开创崭新的未来变化开 创崭新的未来' }] },
|
||||
{ label: '工作模式变更 ', items: [{ content: 'FY22年度集团新年方针:领先时代的变化开创崭新的未来变化开 创崭新的未来' }] },
|
||||
{ label: '差别化', items: [{ content: 'FY22年度集团新年方针:领先时代的变化开创崭新的未来变化开 创崭新的未来' }] },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: '1',
|
||||
label: '活动成果',
|
||||
children: [
|
||||
{ label: 'Database推进', items: [{ content: 'FY22年度集团新年方针:领先时代的变化开创崭新的未来变化开 创崭新的未来' }] },
|
||||
{ label: '全球连携强化', items: [{ content: 'FY22年度集团新年方针:领先时代的变化开创崭新的未来变化开 创崭新的未来' }] },
|
||||
{ label: '高品质高品位', items: [{ content: 'FY22年度集团新年方针:领先时代的变化开创崭新的未来变化开 创崭新的未来' }] },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: '2',
|
||||
title: 'xx活动概要',
|
||||
label: '活动计划',
|
||||
children: [
|
||||
{ label: 'CSR-碳中和', items: [{ content: 'FY22年度集团新年方针:领先时代的变化开创崭新的未来变化开 创崭新的未来' }] },
|
||||
{ label: '工作模式变更 ', items: [{ content: 'FY22年度集团新年方针:领先时代的变化开创崭新的未来变化开 创崭新的未来' }] },
|
||||
{ label: '差别化', items: [{ content: 'FY22年度集团新年方针:领先时代的变化开创崭新的未来变化开 创崭新的未来' }] },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: '3',
|
||||
label: '活动成果',
|
||||
children: [
|
||||
{ label: 'Database推进', items: [{ content: 'FY22年度集团新年方针:领先时代的变化开创崭新的未来变化开 创崭新的未来' }] },
|
||||
{ label: '市况', items: [{ content: 'FY22年度集团新年方针:领先时代的变化开创崭新的未来变化开 创崭新的未来' }] },
|
||||
{ label: '全球连携强化', items: [{ content: 'FY22年度集团新年方针:领先时代的变化开创崭新的未来变化开 创崭新的未来' }] },
|
||||
{ label: '高品质高品位', items: [{ content: 'FY22年度集团新年方针:领先时代的变化开创崭新的未来变化开 创崭新的未来' }] },
|
||||
],
|
||||
},
|
||||
]
|
||||
const form = ref()
|
||||
|
||||
|
||||
export function charData() {
|
||||
|
||||
const chartRef = ref()
|
||||
const params = '15%'
|
||||
const option = ref<any>({});
|
||||
const allData = ref<any[]>([]);
|
||||
|
||||
async function getCSR() {
|
||||
const { data: { content: { dataList } } } = await getCSRDetail()
|
||||
console.log("-----------------------------")
|
||||
if(!dataList){
|
||||
console.log("-----------------------------")
|
||||
allData.value = forms.value
|
||||
|
||||
}
|
||||
else{
|
||||
allData.value = dataList
|
||||
}
|
||||
// form.value = dataList
|
||||
|
||||
const options = {
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
title: [{ text: '单位:k-t' }],
|
||||
|
||||
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: allData.value.lable4.name.split(",")
|
||||
},
|
||||
yAxis: {},
|
||||
series: [
|
||||
{
|
||||
name: '目标排放',
|
||||
type: 'bar',
|
||||
stack: 'Ad',
|
||||
barWidth: '30%',
|
||||
data: allData.value.lable4.year.split(","),
|
||||
label:
|
||||
{
|
||||
show: false,
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'bar',
|
||||
stack: 'Ad',
|
||||
label:
|
||||
{
|
||||
show: true,
|
||||
position: 'inside',
|
||||
formatter: '{c}%'
|
||||
},
|
||||
barWidth: '30%',
|
||||
data: allData.value.lable4.date.split(","),
|
||||
},
|
||||
]
|
||||
}
|
||||
option.value = options;
|
||||
}
|
||||
|
||||
getCSR()
|
||||
return { chartRef, option }
|
||||
}
|
||||
|
||||
|
||||
export function pieData1() {
|
||||
const chartRef = ref()
|
||||
const option = ref<any>({});
|
||||
const allData = ref<any[]>([]);
|
||||
async function getCSR() {
|
||||
const { data: { content: { dataList } } } = await getCSRDetail()
|
||||
if(!dataList){
|
||||
console.log("-----------------------------")
|
||||
allData.value = forms.value
|
||||
|
||||
}
|
||||
else{
|
||||
allData.value = dataList
|
||||
}
|
||||
|
||||
const options = {
|
||||
title: {
|
||||
text: allData.value.lable8.name,
|
||||
left: 'center',
|
||||
textStyle: { color: '#4075E1', }
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
grid: { left: '20', top: '30', right: '70', bottom: '10', containLabel: true },
|
||||
series: [
|
||||
{
|
||||
name: 'Access From',
|
||||
type: 'pie',
|
||||
radius: '50%',
|
||||
|
||||
data: Object.values(allData.value.lable8.data).filter(item => item.name !== '' || item.value !== ''),
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
shadowBlur: 10,
|
||||
shadowOffsetX: 0,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
option.value = options;
|
||||
}
|
||||
getCSR()
|
||||
|
||||
return { chartRef, option }
|
||||
}
|
||||
|
||||
|
||||
|
||||
export function pieData2() {
|
||||
const chartRef = ref()
|
||||
const option = ref<any>({});
|
||||
const allData = ref<any[]>([]);
|
||||
async function getCSR() {
|
||||
const { data: { content: { dataList } } } = await getCSRDetail()
|
||||
if(!dataList){
|
||||
console.log("-----------------------------")
|
||||
allData.value = forms.value
|
||||
|
||||
}
|
||||
else{
|
||||
allData.value = dataList
|
||||
}
|
||||
|
||||
const options = {
|
||||
title: {
|
||||
text: allData.value.lable9.name,
|
||||
left: 'center',
|
||||
textStyle: { color: '#4075E1' }
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: 'Access From',
|
||||
type: 'pie',
|
||||
radius: ['40%', '70%'],
|
||||
avoidLabelOverlap: false,
|
||||
itemStyle: {
|
||||
borderRadius: 10,
|
||||
borderColor: '#fff',
|
||||
borderWidth: 2
|
||||
},
|
||||
label: {
|
||||
show: true,
|
||||
formatter(param) {
|
||||
// correct the percentage
|
||||
return param.name + ' (' + param.percent * 2 + '%)';
|
||||
}
|
||||
},
|
||||
emphasis: {
|
||||
label: {
|
||||
show: true,
|
||||
fontSize: 20,
|
||||
}
|
||||
},
|
||||
labelLine: {
|
||||
show: true
|
||||
},
|
||||
data: Object.values(allData.value.lable9.data).filter(item => item.name !== '' || item.value !== '')
|
||||
}
|
||||
]
|
||||
|
||||
}
|
||||
option.value = options;
|
||||
}
|
||||
getCSR()
|
||||
return { chartRef, option }
|
||||
}
|
||||
|
||||
|
||||
|
||||
function generateSimilarValues(number) {
|
||||
const offset = 0.05;
|
||||
const similarValues = [number, number - offset, number + offset];
|
||||
return similarValues;
|
||||
}
|
||||
|
||||
export function liQuid() {
|
||||
const chartRef = ref()
|
||||
|
||||
const option = ref<any>({});
|
||||
const allData = ref<any[]>([]);
|
||||
async function getCSR() {
|
||||
const { data: { content: { dataList } } } = await getCSRDetail()
|
||||
if(!dataList){
|
||||
console.log("-----------------------------")
|
||||
allData.value = forms.value
|
||||
|
||||
}
|
||||
else{
|
||||
allData.value = dataList
|
||||
}
|
||||
|
||||
const options = {
|
||||
title: {
|
||||
text: allData.value.lable6.title2,
|
||||
// subtext: 'Fake Data',
|
||||
left: 'center',
|
||||
bottom: '-5px',
|
||||
textStyle: { fontSize: '14px', fontWeight: '100' }
|
||||
},
|
||||
series: [{
|
||||
type: 'liquidFill',
|
||||
silent: true,
|
||||
data: generateSimilarValues(allData.value.lable6.year),
|
||||
color: ['#41E5BA', '#B1D2FF', '#63E8C4'],
|
||||
radius: '150px',
|
||||
backgroundStyle: {
|
||||
// borderWidth: 0,
|
||||
// borderColor: 'red',
|
||||
opacity: '0.4',
|
||||
color: '#00D491'
|
||||
// color:'#63E8C4'
|
||||
},
|
||||
outline: {
|
||||
show: false
|
||||
},
|
||||
label: {
|
||||
fontSize: 19,
|
||||
fontColor: '#fff',
|
||||
formatter: function (param) {
|
||||
return allData.value.lable6.title1 + '\n' + '\n'
|
||||
+ (param.value * 100) + '%';
|
||||
},
|
||||
}
|
||||
}]
|
||||
|
||||
}
|
||||
option.value = options;
|
||||
}
|
||||
getCSR()
|
||||
return { chartRef, option }
|
||||
}
|
||||
|
||||
export function liQuids() {
|
||||
const chartRef = ref()
|
||||
|
||||
const option = ref<any>({});
|
||||
const allData = ref<any[]>([]);
|
||||
async function getCSR() {
|
||||
const { data: { content: { dataList } } } = await getCSRDetail()
|
||||
if(!dataList){
|
||||
console.log("-----------------------------")
|
||||
allData.value = forms.value
|
||||
|
||||
}
|
||||
else{
|
||||
allData.value = dataList
|
||||
}
|
||||
|
||||
const options = {
|
||||
title: {
|
||||
text: allData.value.lable7.title2,
|
||||
// subtext: 'Fake Data',
|
||||
left: 'center',
|
||||
bottom: '-5px',
|
||||
textStyle: { fontSize: '14px', fontWeight: '100' }
|
||||
},
|
||||
series: [{
|
||||
type: 'liquidFill',
|
||||
silent: true,
|
||||
data: generateSimilarValues(allData.value.lable7.year),
|
||||
color: ['#8CBEFF', '#B1D2FF', '#8CBEFF'],
|
||||
radius: '150px',
|
||||
backgroundStyle: {
|
||||
// borderWidth: 0,
|
||||
// borderColor: 'red',
|
||||
opacity: '0.6',
|
||||
color: '#1D88FF'
|
||||
// color:'#63E8C4'
|
||||
},
|
||||
outline: {
|
||||
show: false
|
||||
},
|
||||
label: {
|
||||
fontSize: 19,
|
||||
fontColor: '#fff',
|
||||
formatter: function (param) {
|
||||
return allData.value.lable7.title1 + '\n' + '\n'
|
||||
+ (param.value * 100) + '%';
|
||||
},
|
||||
}
|
||||
}]
|
||||
}
|
||||
option.value = options;
|
||||
}
|
||||
getCSR()
|
||||
return { chartRef, option }
|
||||
}
|
||||
|
|
@ -0,0 +1,585 @@
|
|||
import type { EChartsOption } from 'echarts'
|
||||
import * as echarts from 'echarts'
|
||||
import 'echarts-liquidfill';
|
||||
import {getCSRDetail} from '@/api/daikin/base'
|
||||
|
||||
export const Content2 = [
|
||||
{
|
||||
key: '0',
|
||||
label: '活动计划',
|
||||
children: [
|
||||
{ label: '调达本部HP', items: [{ content: 'FY22年度集团新年方针:领先时代的变化开创崭新的未来变化开 创崭新的未来' }] },
|
||||
{ label: 'CSR-碳中和', items: [{ content: 'FY22年度集团新年方针:领先时代的变化开创崭新的未来变化开 创崭新的未来' }] },
|
||||
{ label: '中国地区连携强化 ', items: [{ content: 'FY22年度集团新年方针:领先时代的变化开创崭新的未来变化开 创崭新的未来' }] },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: '1',
|
||||
label: '活动成果',
|
||||
children: [
|
||||
{ label: 'Database推进', items: [{ content: 'FY22年度集团新年方针:领先时代的变化开创崭新的未来变化开 创崭新的未来' }] },
|
||||
{ label: '市况', items: [{ content: 'FY22年度集团新年方针:领先时代的变化开创崭新的未来变化开 创崭新的未来' }] },
|
||||
{ label: '汇率', items: [{ content: 'FY22年度集团新年方针:领先时代的变化开创崭新的未来变化开 创崭新的未来' }] },
|
||||
{ label: 'BCP', items: [{ content: 'FY22年度集团新年方针:领先时代的变化开创崭新的未来变化开 创崭新的未来' }] },
|
||||
],
|
||||
},
|
||||
]
|
||||
export const Content3 = [
|
||||
{
|
||||
key: '0',
|
||||
title: 'xx活动概要',
|
||||
label: '活动计划',
|
||||
children: [
|
||||
{ label: '调达本部HP', items: [{ content: 'FY22年度集团新年方针:领先时代的变化开创崭新的未来变化开 创崭新的未来' }] },
|
||||
{ label: 'CSR-碳中和', items: [{ content: 'FY22年度集团新年方针:领先时代的变化开创崭新的未来变化开 创崭新的未来' }] },
|
||||
{ label: '工作模式变更 ', items: [{ content: 'FY22年度集团新年方针:领先时代的变化开创崭新的未来变化开 创崭新的未来' }] },
|
||||
{ label: '差别化', items: [{ content: 'FY22年度集团新年方针:领先时代的变化开创崭新的未来变化开 创崭新的未来' }] },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: '1',
|
||||
label: '活动成果',
|
||||
children: [
|
||||
{ label: 'Database推进', items: [{ content: 'FY22年度集团新年方针:领先时代的变化开创崭新的未来变化开 创崭新的未来' }] },
|
||||
{ label: '全球连携强化', items: [{ content: 'FY22年度集团新年方针:领先时代的变化开创崭新的未来变化开 创崭新的未来' }] },
|
||||
{ label: '高品质高品位', items: [{ content: 'FY22年度集团新年方针:领先时代的变化开创崭新的未来变化开 创崭新的未来' }] },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: '2',
|
||||
title: 'xx活动概要',
|
||||
label: '活动计划',
|
||||
children: [
|
||||
{ label: 'CSR-碳中和', items: [{ content: 'FY22年度集团新年方针:领先时代的变化开创崭新的未来变化开 创崭新的未来' }] },
|
||||
{ label: '工作模式变更 ', items: [{ content: 'FY22年度集团新年方针:领先时代的变化开创崭新的未来变化开 创崭新的未来' }] },
|
||||
{ label: '差别化', items: [{ content: 'FY22年度集团新年方针:领先时代的变化开创崭新的未来变化开 创崭新的未来' }] },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: '3',
|
||||
label: '活动成果',
|
||||
children: [
|
||||
{ label: 'Database推进', items: [{ content: 'FY22年度集团新年方针:领先时代的变化开创崭新的未来变化开 创崭新的未来' }] },
|
||||
{ label: '市况', items: [{ content: 'FY22年度集团新年方针:领先时代的变化开创崭新的未来变化开 创崭新的未来' }] },
|
||||
{ label: '全球连携强化', items: [{ content: 'FY22年度集团新年方针:领先时代的变化开创崭新的未来变化开 创崭新的未来' }] },
|
||||
{ label: '高品质高品位', items: [{ content: 'FY22年度集团新年方针:领先时代的变化开创崭新的未来变化开 创崭新的未来' }] },
|
||||
],
|
||||
},
|
||||
]
|
||||
const form = ref({
|
||||
lable1:{
|
||||
name: '大金集团碳减排目标',
|
||||
year: 'F25',
|
||||
date: '14%',
|
||||
title1:'',
|
||||
title2:'',
|
||||
},
|
||||
lable2:{
|
||||
name: 'CN调达本部碳减排目标',
|
||||
year: 'F25',
|
||||
date: '14%',
|
||||
title1:'',
|
||||
title2:'',
|
||||
},
|
||||
lable3:{
|
||||
name: 'CN调达本部碳减排目标',
|
||||
year: 'F23',
|
||||
date: '14%',
|
||||
title1:'',
|
||||
title2:'',
|
||||
},
|
||||
lable4:{
|
||||
name: '2020, 2021, 2022, 2023, 2024, 2025',
|
||||
year: '120, 200, 150, 80, 70, 110',
|
||||
date: '85, 45, 67, 80, 70, 110',
|
||||
title1:'DIS',
|
||||
title2:'DSZ',
|
||||
},
|
||||
lable14:{
|
||||
name: '2020-1-25, 2021-12-12, 2022-11-14, 2023-14-5, 2024, 2025',
|
||||
year: '120, 200, 150, 80, 70, 110',
|
||||
date: '85, 45, 67, 80, 70, 110',
|
||||
title1:'DIS',
|
||||
title2:'DSZ',
|
||||
},
|
||||
lable5:{
|
||||
name: '30%碳减排课题收集整体情况:',
|
||||
year: '0.6',
|
||||
date: '14%',
|
||||
title1:'原材料: 15.5%',
|
||||
title2:'能源消耗: 1.7%',
|
||||
},
|
||||
lable6:{
|
||||
name: '30%碳减排课题收集整体情况:',
|
||||
year: '0.6',
|
||||
data:'',
|
||||
title1:'原材料',
|
||||
title2:'整体目标10%',
|
||||
},
|
||||
lable7:{
|
||||
name:'',
|
||||
data:'',
|
||||
year: '0.6',
|
||||
title1:'能源消耗',
|
||||
title2:'整体目标5%',
|
||||
},
|
||||
lable8:{
|
||||
name:'【FY20原材料构成数据】',
|
||||
data:{
|
||||
data1:{
|
||||
name:'Search Engine',
|
||||
value:'1048'
|
||||
},
|
||||
data2:{
|
||||
name:'Direct',
|
||||
value:'735'
|
||||
}
|
||||
,
|
||||
data3:{
|
||||
name:'Email',
|
||||
value:'580'
|
||||
}
|
||||
,
|
||||
data4:{
|
||||
name:'',
|
||||
value:''
|
||||
},
|
||||
data5:{
|
||||
name:'',
|
||||
value:''
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
lable9:{
|
||||
name:'【FY20能源消耗构成数据】',
|
||||
data:{
|
||||
data1:{
|
||||
name:'Search Engine',
|
||||
value:'1048'
|
||||
},
|
||||
data2:{
|
||||
name:'Direct',
|
||||
value:'735'
|
||||
}
|
||||
,
|
||||
data3:{
|
||||
name:'Email',
|
||||
value:'580'
|
||||
}
|
||||
,
|
||||
data4:{
|
||||
name:'Union Ads',
|
||||
value:'484'
|
||||
},
|
||||
data5:{
|
||||
name:'Video Ads',
|
||||
value:'300'
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
async function getCSR() {
|
||||
const {data,data:{content:{form:ffff}}} = await getCSRDetail()
|
||||
form.value = ffff
|
||||
}
|
||||
|
||||
export function charData() {
|
||||
const chartRef = ref()
|
||||
const params = '28%'
|
||||
const option = ref<EChartsOption>({
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
// data: ['DIS', 'DSZ'],
|
||||
// bottom:'0px',
|
||||
// right:'50px'
|
||||
},
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '10%',
|
||||
containLabel: true
|
||||
},
|
||||
title: [{ text: '111' }],
|
||||
// color:['#58D9FC','red','#fff'],
|
||||
// dataset: {
|
||||
// // 提供一份数据。
|
||||
// source: [
|
||||
// ['2020实绩', 220, 0, 220],
|
||||
// ['2021实绩', 182, 0, 182],
|
||||
// ['2022实绩', 191, 0, 191],
|
||||
// ['2023', 234, 43, 234],
|
||||
// ['2024', 290, 23, 290],
|
||||
// ['2025', 330, 65, 330],
|
||||
// ]
|
||||
// },
|
||||
xAxis: { type: 'category',
|
||||
data: form.value.lable4.name.split(",")
|
||||
},
|
||||
yAxis: {},
|
||||
series: [
|
||||
{
|
||||
name: 'DIS',
|
||||
type: 'bar',
|
||||
barWidth: '30%',
|
||||
data: form.value.lable4.year.split(","),
|
||||
label:
|
||||
{
|
||||
show: false,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'DSZ',
|
||||
type: 'bar',
|
||||
label:
|
||||
{
|
||||
show: false,
|
||||
position: 'inside',
|
||||
formatter: '{c}%'
|
||||
},
|
||||
barWidth: '30%',
|
||||
data: form.value.lable4.date.split(","),
|
||||
},
|
||||
// { name: '预测/实绩用量', type: 'line' }
|
||||
]
|
||||
})
|
||||
return { chartRef, option }
|
||||
}
|
||||
|
||||
export function charData2() {
|
||||
|
||||
const chartRef = ref()
|
||||
const params = '15%'
|
||||
|
||||
|
||||
const option = ref<EChartsOption>({
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
data: ['DIS', 'DSZ'],
|
||||
top:'0px',
|
||||
right:'50px'
|
||||
},
|
||||
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
|
||||
containLabel: true
|
||||
},
|
||||
title: [{ text: '单位:千吨' }],
|
||||
// color:['#58D9FC','red','#fff'],
|
||||
// dataset: {
|
||||
// // 提供一份数据。
|
||||
// source: [
|
||||
// ['2020实绩', 220, 0, 220],
|
||||
// ['2021实绩', 182, 0, 182],
|
||||
// ['2022实绩', 191, 0, 191],
|
||||
// ['2023', 234, 43, 234],
|
||||
// ['2024', 290, 23, 290],
|
||||
// ['2025', 330, 65, 330],
|
||||
// ]
|
||||
// },
|
||||
|
||||
|
||||
|
||||
xAxis: { type: 'category',
|
||||
data:form.value.lable14.name.split(","),
|
||||
axisLabel: {
|
||||
interval: 0, //隔几项显示一个标签
|
||||
rotate: "-90" //标签倾斜的角度,旋转的角度是-90到90度
|
||||
}
|
||||
},
|
||||
yAxis: {},
|
||||
series: [
|
||||
{
|
||||
name: 'DIS',
|
||||
type: 'line',
|
||||
data: form.value.lable14.year.split(","),
|
||||
|
||||
},
|
||||
{
|
||||
name: 'DSZ',
|
||||
type: 'line',
|
||||
data: form.value.lable14.date.split(","),
|
||||
},
|
||||
// { name: '预测/实绩用量', type: 'line' }
|
||||
]
|
||||
})
|
||||
return { chartRef, option }
|
||||
}
|
||||
|
||||
export function pieData1() {
|
||||
const chartRef = ref()
|
||||
const option = ref<EChartsOption>({
|
||||
title: {
|
||||
text: form.value.lable8.name,
|
||||
// subtext: 'Fake Data',
|
||||
left: 'center',
|
||||
textStyle: { color: '#4075E1', }
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
grid: { left: '20', top: '30', right: '70', bottom: '10', containLabel: true },
|
||||
// legend: {
|
||||
// orient: 'vertical',
|
||||
// left: 'left'
|
||||
// },
|
||||
series: [
|
||||
{
|
||||
name: 'Access From',
|
||||
type: 'pie',
|
||||
selectedMode: 'single',
|
||||
radius: [0, '30%'],
|
||||
label: {
|
||||
position: 'inner',
|
||||
fontSize: 14
|
||||
},
|
||||
labelLine: {
|
||||
show: false
|
||||
},
|
||||
data: [
|
||||
{ value: 1548, 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: {
|
||||
emphasis: {
|
||||
shadowBlur: 10,
|
||||
shadowOffsetX: 0,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.5)',
|
||||
},
|
||||
normal: {
|
||||
// 自定义每个扇形的颜色
|
||||
color: function (params) {
|
||||
const colorList = ['#3EC22B', '#3EC22B', '#3EC22B',];
|
||||
return colorList[params.dataIndex];
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
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: {
|
||||
a: {
|
||||
color: '#6E7079',
|
||||
lineHeight: 22,
|
||||
align: 'center'
|
||||
},
|
||||
hr: {
|
||||
borderColor: '#8C8D8E',
|
||||
width: '100%',
|
||||
borderWidth: 1,
|
||||
height: 0
|
||||
},
|
||||
b: {
|
||||
color: '#4C5058',
|
||||
fontSize: 14,
|
||||
fontWeight: 'bold',
|
||||
lineHeight: 33
|
||||
},
|
||||
per: {
|
||||
color: '#fff',
|
||||
backgroundColor: '#4C5058',
|
||||
padding: [3, 4],
|
||||
borderRadius: 4
|
||||
}
|
||||
}
|
||||
},
|
||||
data: [
|
||||
{ value: 335, name: '铝' },
|
||||
{ value: 310, name: '铁' },
|
||||
{ value: 135, name: '铜' },
|
||||
],
|
||||
// 自定义颜色
|
||||
// itemStyle: {
|
||||
// borderColor: '#fff',
|
||||
// borderWidth: 2,
|
||||
// emphasis: {
|
||||
// shadowBlur: 10,
|
||||
// shadowOffsetX: 0,
|
||||
// shadowColor: 'rgba(0, 0, 0, 0.5)',
|
||||
// },
|
||||
// normal: {
|
||||
// // 自定义每个扇形的颜色
|
||||
// color: function (params) {
|
||||
// const colorList = ['#337EE6', '#337EE6', '#337EE6',];
|
||||
// return colorList[params.dataIndex];
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
}
|
||||
]
|
||||
|
||||
})
|
||||
return { chartRef, option }
|
||||
}
|
||||
|
||||
|
||||
|
||||
export function pieData2() {
|
||||
const chartRef = ref()
|
||||
const option = ref<EChartsOption>({
|
||||
// legend: {
|
||||
// top: 'bottom'
|
||||
// },
|
||||
title: {
|
||||
text: form.value.lable9.name,
|
||||
// subtext: 'Fake Data',
|
||||
left: 'center',
|
||||
textStyle: { color: '#4075E1' }
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: 'Access From',
|
||||
type: 'pie',
|
||||
radius: ['40%', '70%'],
|
||||
avoidLabelOverlap: false,
|
||||
itemStyle: {
|
||||
borderRadius: 10,
|
||||
borderColor: '#fff',
|
||||
borderWidth: 2
|
||||
},
|
||||
label: {
|
||||
show: true,
|
||||
formatter(param) {
|
||||
// correct the percentage
|
||||
return param.name + ' (' + param.percent * 2 + '%)';
|
||||
}
|
||||
},
|
||||
emphasis: {
|
||||
label: {
|
||||
show: true,
|
||||
fontSize: 20,
|
||||
// fontWeight: 'bold'
|
||||
}
|
||||
},
|
||||
labelLine: {
|
||||
show: true
|
||||
},
|
||||
// data: [
|
||||
// { value: 1048, name: 'Search Engine' },
|
||||
// { value: 735, name: 'Direct' },
|
||||
// { value: 580, name: 'Email' },
|
||||
// { value: 484, name: 'Union Ads' },
|
||||
// { value: 300, name: 'Video Ads' }
|
||||
// ]
|
||||
data: Object.values(form.value.lable9.data).filter(item => item.name !== '' || item.value !== '')
|
||||
}
|
||||
]
|
||||
|
||||
})
|
||||
return { chartRef, option }
|
||||
}
|
||||
|
||||
const gl = '10%'
|
||||
export function liQuid() {
|
||||
const chartRef = ref()
|
||||
const option = ref({
|
||||
title: {
|
||||
text: '整体目标加' + gl,
|
||||
// subtext: 'Fake Data',
|
||||
left: 'center',
|
||||
bottom: '-5px',
|
||||
textStyle: { fontSize: '14px', fontWeight: '100' }
|
||||
},
|
||||
series: [{
|
||||
type: 'liquidFill',
|
||||
silent: true,
|
||||
data: [0.76, 0.55, 0.62],
|
||||
color: ['#41E5BA', '#B1D2FF', '#63E8C4'],
|
||||
radius: '150px',
|
||||
backgroundStyle: {
|
||||
// borderWidth: 0,
|
||||
// borderColor: 'red',
|
||||
opacity: '0.4',
|
||||
color: '#00D491'
|
||||
// color:'#63E8C4'
|
||||
},
|
||||
outline: {
|
||||
show: false
|
||||
},
|
||||
label: {
|
||||
fontSize: 19,
|
||||
fontColor: '#fff',
|
||||
formatter: function (param) {
|
||||
return '原材料' + '\n'+ '\n'
|
||||
+ (param.value * 100) + '%';
|
||||
},
|
||||
}
|
||||
}]
|
||||
|
||||
})
|
||||
return { chartRef, option }
|
||||
}
|
||||
|
||||
export function liQuids() {
|
||||
const chartRef = ref()
|
||||
const option = ref({
|
||||
title: {
|
||||
text: '整体目标加' + gl,
|
||||
// subtext: 'Fake Data',
|
||||
left: 'center',
|
||||
bottom: '-5px',
|
||||
textStyle: { fontSize: '14px', fontWeight: '100' }
|
||||
},
|
||||
series: [{
|
||||
type: 'liquidFill',
|
||||
silent: true,
|
||||
data: [0.8, 0.65, 0.72],
|
||||
color: ['#8CBEFF', '#B1D2FF', '#8CBEFF'],
|
||||
radius: '150px',
|
||||
backgroundStyle: {
|
||||
// borderWidth: 0,
|
||||
// borderColor: 'red',
|
||||
opacity: '0.6',
|
||||
color: '#1D88FF'
|
||||
// color:'#63E8C4'
|
||||
},
|
||||
outline: {
|
||||
show: false
|
||||
},
|
||||
label: {
|
||||
fontSize: 19,
|
||||
fontColor: '#fff',
|
||||
formatter: function (param) {
|
||||
return '能源消耗' + '\n'+ '\n'
|
||||
+ (param.value * 100) + '%';
|
||||
},
|
||||
}
|
||||
}]
|
||||
|
||||
})
|
||||
return { chartRef, option }
|
||||
}
|
||||
|
|
@ -2,16 +2,87 @@
|
|||
<script setup lang="ts">
|
||||
import { updatePwd } from "@/api/daikin/base";
|
||||
import { NForm, NFormItem, NInput, NButton } from "naive-ui";
|
||||
import * as echarts from "echarts";
|
||||
import { useDate } from "@/views/home/hooks/useDate";
|
||||
import { message } from "@/utils/message";
|
||||
|
||||
import { charData } from "./CSRDatas";
|
||||
const { push } = useRouter();
|
||||
const route = useRoute();
|
||||
const { day, week } = useDate();
|
||||
import zhCn from "element-plus/dist/locale/zh-cn.mjs";
|
||||
|
||||
const { chartRef, option } = charData();
|
||||
const locale = computed(() => zhCn);
|
||||
const YearTime1 = ref("2020");
|
||||
const YearTime2 = ref("2023");
|
||||
const flgs = ref(1);
|
||||
const cardsClick = (it) => {
|
||||
flgs.value = it;
|
||||
console.log(flgs.value, "cardsClick");
|
||||
// dataInfo.treeSource = it
|
||||
};
|
||||
const formValue = ref({
|
||||
newPassword: "",
|
||||
oldPassword: "",
|
||||
});
|
||||
|
||||
const twoVal = reactive([
|
||||
{
|
||||
id: 1,
|
||||
text: "外部情报",
|
||||
info: "863",
|
||||
icon: "",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
text: "市况汇率",
|
||||
info: "863",
|
||||
icon: "",
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
text: "数据平台",
|
||||
info: "863",
|
||||
icon: "",
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
text: "调达BCP",
|
||||
info: "863",
|
||||
icon: "",
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
text: "SCM供应链",
|
||||
info: "863",
|
||||
icon: "",
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
text: "品质",
|
||||
info: "863",
|
||||
icon: "",
|
||||
},
|
||||
{
|
||||
id: 7,
|
||||
text: "AI差别比",
|
||||
info: "863",
|
||||
icon: "",
|
||||
},
|
||||
{
|
||||
id: 8,
|
||||
text: "战略企划",
|
||||
info: "863",
|
||||
icon: "",
|
||||
},
|
||||
{
|
||||
id: 9,
|
||||
text: "调达database",
|
||||
info: "863",
|
||||
icon: "",
|
||||
},
|
||||
]);
|
||||
console.log(route, route.path);
|
||||
async function submitSave() {
|
||||
let formdata = new FormData();
|
||||
|
|
@ -41,7 +112,7 @@ async function submitSave() {
|
|||
push({ name: "Entry" });
|
||||
} else message.error(msg);
|
||||
}
|
||||
|
||||
onMounted(() => {});
|
||||
function isStrongPassword(password) {
|
||||
// 至少包含8个字符
|
||||
if (password.length < 8) {
|
||||
|
|
@ -72,7 +143,11 @@ function isStrongPassword(password) {
|
|||
</div>
|
||||
</div>
|
||||
<div class="page-main">
|
||||
<el-tabs type="border-card" class="demo-tabs h100% color" style="color:black">
|
||||
<el-tabs
|
||||
type="border-card"
|
||||
class="demo-tabs h100% color"
|
||||
style="color: black;overflow-y: scroll;height:800px;"
|
||||
>
|
||||
<el-tab-pane>
|
||||
<template #label>
|
||||
<span class="custom-tabs-label">
|
||||
|
|
@ -80,11 +155,186 @@ function isStrongPassword(password) {
|
|||
<span>首页看板</span>
|
||||
</span>
|
||||
</template>
|
||||
首页看板11111
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="部门查询">
|
||||
画页面
|
||||
<div style="overflow-y: scroll;height:800px;">
|
||||
<n-form
|
||||
:label-width="90"
|
||||
:model="formValue"
|
||||
label-placement="left"
|
||||
size="medium"
|
||||
require-mark-placement="right"
|
||||
class="w-full h-100px p20px"
|
||||
>
|
||||
<div class="flex">
|
||||
<n-form-item
|
||||
label="开始日期:"
|
||||
path="oldPassword"
|
||||
class="w300px"
|
||||
>
|
||||
<n-input
|
||||
v-model:value="formValue.oldPassword"
|
||||
placeholder=""
|
||||
type="password"
|
||||
/>
|
||||
</n-form-item>
|
||||
<n-form-item
|
||||
label="结束日期:"
|
||||
path="oldPassword"
|
||||
class="w300px"
|
||||
>
|
||||
<n-input
|
||||
v-model:value="formValue.oldPassword"
|
||||
placeholder=""
|
||||
type="password"
|
||||
/>
|
||||
</n-form-item>
|
||||
<n-button
|
||||
attr-type="button"
|
||||
@click="submitSave"
|
||||
style="
|
||||
background-color: #3870e5;
|
||||
border-radius: 5px;
|
||||
color: #fff;
|
||||
margin-left: 15px;
|
||||
padding: 0 20px;
|
||||
"
|
||||
>
|
||||
确认修改
|
||||
</n-button>
|
||||
<n-button
|
||||
attr-type="button"
|
||||
@click="submitSave"
|
||||
style="
|
||||
background-color: #3870e5;
|
||||
border-radius: 5px;
|
||||
color: #fff;
|
||||
margin-left: 15px;
|
||||
padding: 0 20px;
|
||||
"
|
||||
>
|
||||
本日
|
||||
</n-button>
|
||||
<n-button
|
||||
attr-type="button"
|
||||
@click="submitSave"
|
||||
style="
|
||||
background-color: #3870e5;
|
||||
border-radius: 5px;
|
||||
color: #fff;
|
||||
margin-left: 15px;
|
||||
padding: 0 20px;
|
||||
"
|
||||
>
|
||||
本周
|
||||
</n-button>
|
||||
<n-button
|
||||
attr-type="button"
|
||||
@click="submitSave"
|
||||
style="
|
||||
background-color: #3870e5;
|
||||
border-radius: 5px;
|
||||
color: #fff;
|
||||
margin-left: 15px;
|
||||
padding: 0 20px;
|
||||
"
|
||||
>
|
||||
本月
|
||||
</n-button>
|
||||
</div>
|
||||
</n-form>
|
||||
<!-- 模块一 -->
|
||||
<div style="height: 350px">
|
||||
<el-row
|
||||
align="middle"
|
||||
type="flex"
|
||||
style="flex-wrap: wrap"
|
||||
:gutter="0"
|
||||
>
|
||||
<el-col
|
||||
:span="4"
|
||||
v-for="item in twoVal"
|
||||
:key="item.id"
|
||||
:offset="0"
|
||||
>
|
||||
<div style="width: 100%; height: 180px; padding: 10px">
|
||||
<div
|
||||
style="
|
||||
height: 100%;
|
||||
border: 1px solid #ccc;
|
||||
padding: 30px;
|
||||
"
|
||||
>
|
||||
<h3>{{ item.text }}</h3>
|
||||
<br />
|
||||
<h3>{{ item.info }}</h3>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<!-- 模块二 -->
|
||||
<div>
|
||||
<div
|
||||
class="flex flex-wrap w-100% h-full rd-25px"
|
||||
style="align-content: space-between"
|
||||
>
|
||||
<div
|
||||
class="w-full h-60% p20px relative bg-#FFF"
|
||||
style="border-radius: 25px 25px 0 0"
|
||||
>
|
||||
<div
|
||||
class="flex text-#1270EE h50px w-250px px30px leading-25px absolute z-1000 right-0 items-center text-center cards_liuyan"
|
||||
>
|
||||
<div
|
||||
class="flex-1"
|
||||
style="border-radius: 15px 0 0 15px"
|
||||
:class="flgs === 1 ? 'onStyle' : ''"
|
||||
@click="cardsClick(1)"
|
||||
>
|
||||
月度
|
||||
</div>
|
||||
<div
|
||||
class="flex-1"
|
||||
:class="flgs === 2 ? 'onStyle' : ''"
|
||||
@click="cardsClick(2)"
|
||||
>
|
||||
季度
|
||||
</div>
|
||||
<div
|
||||
class="flex-1"
|
||||
style="border-radius: 0 15px 15px 0"
|
||||
:class="flgs === 3 ? 'onStyle' : ''"
|
||||
@click="cardsClick(3)"
|
||||
>
|
||||
年度
|
||||
</div>
|
||||
</div>
|
||||
<div class="w-full h-450px">
|
||||
<VChart ref="chartRef" :option="option" autoresize />
|
||||
</div>
|
||||
<div class="absolute top-91%">
|
||||
日期:<el-config-provider :locale="locale">
|
||||
<el-date-picker
|
||||
v-model="YearTime1"
|
||||
:style="{ width: '100px' }"
|
||||
type="year"
|
||||
size="size"
|
||||
class=""
|
||||
/>
|
||||
—
|
||||
<el-date-picker
|
||||
v-model="YearTime2"
|
||||
:style="{ width: '100px' }"
|
||||
type="year"
|
||||
size="size"
|
||||
/>
|
||||
</el-config-provider>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="部门查询"> 画页面 </el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ const { push } = useRouter()
|
|||
<div class="text-18px ml40px mr25px">{{ day }}</div>
|
||||
<div class="text-18px flex-1">{{ week }}</div>
|
||||
<div style="margin-right: 8px" v-if="store.user.isPublish === 1">
|
||||
<div class="add text-18px px13px py11px cursor-pointer" @click="push({ path: '/Home/Process' })">情报流程</div>
|
||||
<div class="add text-18px px13px py11px cursor-pointer" @click="push({ name: 'processPublic' })">情报流程</div>
|
||||
</div>
|
||||
<div style="margin-right: 8px" v-if="store.user.isPublish ===1">
|
||||
<div class="add text-18px px13px py11px cursor-pointer" @click="push({name:'messageSelect'})">留言板</div>
|
||||
|
|
|
|||
|
|
@ -1,406 +1,262 @@
|
|||
<!-- 情报新增待审批 -->
|
||||
<script setup lang="ts">
|
||||
import { useUserStore } from "@/stores/modules/user";
|
||||
import HomeHead from "@/views/home/components/HomeHead.vue";
|
||||
import HomeHeadSearch from "@/views/home/components/HomeHeadSearch.vue";
|
||||
import { useDate } from "@/views/home/hooks/useDate";
|
||||
import {
|
||||
getNoticeList,
|
||||
deleteWithdraw,
|
||||
getManagerList,
|
||||
} from "@/api/daikin/base";
|
||||
import { noticeld } from "@/stores/modules/noticeId";
|
||||
import { getImg } from "../images";
|
||||
import { useUserStore } from '@/stores/modules/user'
|
||||
import HomeHead from '@/views/home/components/HomeHead.vue'
|
||||
import HomeHeadSearch from '@/views/home/components/HomeHeadSearch.vue'
|
||||
import { useDate } from '@/views/home/hooks/useDate'
|
||||
import { getNoticeList } from '@/api/daikin/base'
|
||||
import { noticeld } from '@/stores/modules/noticeId'
|
||||
import { getImg } from '../images'
|
||||
|
||||
const store = noticeld();
|
||||
const store2 = useUserStore();
|
||||
const { day, week } = useDate();
|
||||
const { push } = useRouter();
|
||||
const route = useRoute();
|
||||
const store = noticeld()
|
||||
const store2 = useUserStore()
|
||||
const { day, week } = useDate()
|
||||
const { push } = useRouter()
|
||||
const route = useRoute()
|
||||
// const toDetail2 =()=>{
|
||||
// console.log(route,route.path)
|
||||
// push(`/Home/Process/ProcessInfo`)
|
||||
const cateList = [
|
||||
{ cate: 1, name: "外部环境", color: "#33C2B2" },
|
||||
{ cate: 2, name: "竞争对手", color: "#F57E6C" },
|
||||
{ cate: 3, name: "供方动向 ", color: "#547EE9" },
|
||||
{ cate: 4, name: "大金集团", color: "#5ECBFA" },
|
||||
{ cate: 5, name: "中国据点", color: "#E5A742" },
|
||||
{ cate: 6, name: "调达本部", color: "#946DE1" },
|
||||
{ cate: 7, name: "news", color: "#63BF90" },
|
||||
{ cate: 8, name: "重要通知", color: "#E36461" },
|
||||
{ cate: 9, name: "留言板", color: "#F5BC00" },
|
||||
];
|
||||
const listData = ref<any>({});
|
||||
{ cate: 1, name: '外部环境', color: '#33C2B2' },
|
||||
{ cate: 2, name: '竞争对手', color: '#F57E6C' },
|
||||
{ cate: 3, name: '供方动向 ', color: '#547EE9' },
|
||||
{ cate: 4, name: '大金集团', color: '#5ECBFA' },
|
||||
{ cate: 5, name: '中国据点', color: '#E5A742' },
|
||||
{ cate: 6, name: '调达本部', color: '#946DE1' },
|
||||
{ cate: 7, name: 'news', color: '#63BF90' },
|
||||
{ cate: 8, name: '重要通知', color: '#E36461' },
|
||||
{ cate: 9, name: '留言板', color: '#F5BC00' },
|
||||
]
|
||||
const listData = ref<any>({})
|
||||
const Status = reactive({
|
||||
reviewStatus: 1,
|
||||
reviewSource: 2,
|
||||
});
|
||||
const pageInfo = reactive({
|
||||
pageNum: 1,
|
||||
pageSize: 13,
|
||||
total: 10,
|
||||
});
|
||||
const handleSizeChange = (e) => {
|
||||
console.log(e);
|
||||
};
|
||||
const handleCurrentChange = (e) => {
|
||||
console.log(e);
|
||||
};
|
||||
reviewStatus: 1,
|
||||
reviewSource: 2
|
||||
})
|
||||
async function getPageList() {
|
||||
const { reviewStatus, reviewSource } = Status;
|
||||
// 外部-驳回&撤回
|
||||
if (reviewStatus == 4) {
|
||||
console.log("一级:", reviewSource, "二级:", reviewStatus);
|
||||
const { pageNum, pageSize } = pageInfo;
|
||||
const resp = await getManagerList({ pageNum, pageSize, reviewStatus: "5" });
|
||||
console.log(resp, 7777777777);
|
||||
listData.value = [];
|
||||
listData.value = resp.rows;
|
||||
} else {
|
||||
const { reviewStatus, reviewSource } = Status
|
||||
console.log
|
||||
const { data } = await getNoticeList({ reviewStatus, reviewSource });
|
||||
listData.value = [];
|
||||
listData.value = data;
|
||||
}
|
||||
if (listData.value && reviewStatus === 3) {
|
||||
flg.value = true;
|
||||
} else {
|
||||
flg.value = false;
|
||||
}
|
||||
listData.value = data
|
||||
|
||||
if (data && reviewStatus === 3) {
|
||||
flg.value = true
|
||||
}
|
||||
else {
|
||||
flg.value = false
|
||||
}
|
||||
}
|
||||
// 详情页
|
||||
|
||||
|
||||
const clickTo = (data: any) => {
|
||||
let flag = false;
|
||||
const { id, noticeId, reviewStatus } = data;
|
||||
if (reviewStatus == 4) {
|
||||
flag = true;
|
||||
}
|
||||
// console.log(data, id, noticeId, reviewStatus);
|
||||
store.article.noticeld = noticeId;
|
||||
if (
|
||||
[1, 2].includes(reviewStatus) &&
|
||||
["review_person", "zhuxi", "tech_service"].includes(store2.user.roleCode)
|
||||
) {
|
||||
push(`/Home/Process/ProcessInfo/${id}`);
|
||||
} else {
|
||||
push(`/Home/Process/Detail/${id}/${flag}`); // 详情
|
||||
}
|
||||
// console.log(store.article.noticeld)
|
||||
};
|
||||
// 撤回按钮
|
||||
const clickCancel = (data: any) => {
|
||||
const { id, noticeId, reviewStatus } = data;
|
||||
deleteWithdraw(id).then((res) => {
|
||||
console.log(res, "删除结果");
|
||||
getPageList();
|
||||
});
|
||||
};
|
||||
const activeName = ref("0");
|
||||
const activeNames = ref("2");
|
||||
const flg = ref(false);
|
||||
const handleClicks = (tab: any) => {
|
||||
// 2 内部 3外部
|
||||
Status.reviewSource = tab.paneName;
|
||||
};
|
||||
// 二级
|
||||
const { id, noticeId, reviewStatus } = data
|
||||
|
||||
console.log(data, id, noticeId, reviewStatus)
|
||||
store.article.noticeld = noticeId
|
||||
if ([1, 2].includes(reviewStatus) && ['review_person', 'zhuxi', 'tech_service'].includes(store2.user.roleCode)) {
|
||||
push(`/Home/Process/ProcessInfo/${id}`)
|
||||
}
|
||||
else {
|
||||
push(`/Home/Process/Detail/${id}`)
|
||||
}
|
||||
|
||||
// console.log(store.article.noticeld)
|
||||
}
|
||||
const activeName = ref('0')
|
||||
const activeNames = ref('2')
|
||||
const flg = ref(false)
|
||||
const handleClicks = (tab) => {
|
||||
// console.log(tab.paneName)
|
||||
Status.reviewSource = tab.paneName
|
||||
}
|
||||
const handleClick = (tab: TabsPaneContext, event: Event) => {
|
||||
switch (tab.index) {
|
||||
case "0":
|
||||
// 审核中
|
||||
Status.reviewStatus = 1;
|
||||
break;
|
||||
case "1":
|
||||
// 审核通过
|
||||
Status.reviewStatus = 3;
|
||||
break;
|
||||
case "2":
|
||||
// 撤销驳回
|
||||
Status.reviewStatus = 4;
|
||||
break;
|
||||
default:
|
||||
// 默认展示审核中
|
||||
Status.reviewStatus = 1;
|
||||
break;
|
||||
}
|
||||
// console.log(tab.index,ids)
|
||||
};
|
||||
const showDetail = (row: any) => {
|
||||
console.log(row, "单选一行");
|
||||
// sessionStorage.setItem("title", row.title);
|
||||
// console.log(row.content);
|
||||
// sessionStorage.setItem("content", row.content);
|
||||
// push({ name: "bcpDetail" });
|
||||
};
|
||||
// 监听 一级Tab 点击哪个[二级,一级]
|
||||
const ss = computed(() => [Status.reviewStatus, Status.reviewSource]);
|
||||
watch(
|
||||
() => unref(ss),
|
||||
async (v) => {
|
||||
getPageList();
|
||||
},
|
||||
{ immediate: true, deep: true }
|
||||
);
|
||||
const tabsList = ref([
|
||||
{
|
||||
name: "审核中",
|
||||
icon: getImg("shq2@2x.png"),
|
||||
icons: getImg("shq1@2x.png"),
|
||||
console.log(tab)
|
||||
switch (tab.index) {
|
||||
case '0':
|
||||
Status.reviewStatus = 1
|
||||
break;
|
||||
case '1':
|
||||
console.log(Status.reviewStatus, tab.index)
|
||||
Status.reviewStatus = 3
|
||||
|
||||
break;
|
||||
case '2':
|
||||
console.log(Status.reviewStatus, tab.index)
|
||||
Status.reviewStatus = 4
|
||||
break;
|
||||
|
||||
default:
|
||||
Status.reviewStatus = 1
|
||||
break;
|
||||
}
|
||||
// console.log(tab.index,ids)
|
||||
}
|
||||
const ss = computed(() => [Status.reviewStatus, Status.reviewSource])
|
||||
watch(() => unref(ss),
|
||||
async (v) => {
|
||||
|
||||
getPageList()
|
||||
},
|
||||
{ immediate: true, deep: true },
|
||||
)
|
||||
|
||||
const tabsList = ref([{
|
||||
name: '审核中',
|
||||
icon: getImg('shq2@2x.png'),
|
||||
icons: getImg('shq1@2x.png'),
|
||||
id: 0,
|
||||
},
|
||||
{
|
||||
name: "审核通过",
|
||||
icon: getImg("shetg2@2x.png"),
|
||||
icons: getImg("shetg1@2x.png"),
|
||||
},
|
||||
{
|
||||
name: '审核通过',
|
||||
icon: getImg('shetg2@2x.png'),
|
||||
icons: getImg('shetg1@2x.png'),
|
||||
id: 1,
|
||||
},
|
||||
{
|
||||
name: "驳回/撤回",
|
||||
icon: getImg("boh2@2x.png"),
|
||||
icons: getImg("boh1@2x.png"),
|
||||
},
|
||||
{
|
||||
name: '驳回',
|
||||
icon: getImg('boh2@2x.png'),
|
||||
icons: getImg('boh1@2x.png'),
|
||||
id: 2,
|
||||
},
|
||||
// {
|
||||
// name:'草稿',
|
||||
// icon:getImg('caog2@2x.png'),
|
||||
// icons:getImg('caog1@2x.png'),
|
||||
// id:3,
|
||||
// },
|
||||
]);
|
||||
// tab
|
||||
const tabsList2 = ref([
|
||||
{
|
||||
name: "待审核",
|
||||
icon: getImg("shhz2@2x.png"),
|
||||
icons: getImg("shhz1@2x.png"),
|
||||
},
|
||||
// {
|
||||
// name:'草稿',
|
||||
// icon:getImg('caog2@2x.png'),
|
||||
// icons:getImg('caog1@2x.png'),
|
||||
// id:3,
|
||||
// },
|
||||
])
|
||||
const tabsList2 = ref([{
|
||||
name: '待审核',
|
||||
icon: getImg('shhz2@2x.png'),
|
||||
icons: getImg('shhz1@2x.png'),
|
||||
id: 0,
|
||||
},
|
||||
{
|
||||
name: "已发布",
|
||||
icon: getImg("wanc2@2x.png"),
|
||||
icons: getImg("wanc1@2x.png"),
|
||||
},
|
||||
{
|
||||
name: '已发布',
|
||||
icon: getImg('wanc2@2x.png'),
|
||||
icons: getImg('wanc1@2x.png'),
|
||||
id: 1,
|
||||
},
|
||||
{
|
||||
name: "驳回/撤回",
|
||||
icon: getImg("boh2@2x.png"),
|
||||
icons: getImg("boh1@2x.png"),
|
||||
},
|
||||
{
|
||||
name: '驳回',
|
||||
icon: getImg('boh2@2x.png'),
|
||||
icons: getImg('boh1@2x.png'),
|
||||
id: 2,
|
||||
},
|
||||
// {
|
||||
// name:'归档',
|
||||
// icon:getImg('guid2@2x.png'),
|
||||
// icons:getImg('guid1@2x.png'),
|
||||
// id:3,
|
||||
// },
|
||||
]);
|
||||
let tabs = store2.user.isReview > 0 ? tabsList2.value : tabsList.value;
|
||||
},
|
||||
// {
|
||||
// name:'归档',
|
||||
// icon:getImg('guid2@2x.png'),
|
||||
// icons:getImg('guid1@2x.png'),
|
||||
// id:3,
|
||||
// },
|
||||
])
|
||||
let tabs = store2.user.isReview > 0 ? tabsList2.value : tabsList.value
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<HomeHead class="top">
|
||||
<template #content>
|
||||
<!-- <HomeHeadSearch /> -->
|
||||
</template>
|
||||
</HomeHead>
|
||||
<div class="h-full relative flex flex-col">
|
||||
<div class="font-600 flex items-end mt30px">
|
||||
<div class="text-36px">情报列表</div>
|
||||
<div class="text-18px ml40px mr25px">{{ day }}</div>
|
||||
<div class="text-18px">{{ week }}</div>
|
||||
</div>
|
||||
<div
|
||||
class="q-wrapper flex-1 mt30px text-#142142 flex flex-col bg-#fff p30px"
|
||||
>
|
||||
<!-- <div>
|
||||
<el-tabs type="card" v-model="activeNames" @tab-click="handleClicks">
|
||||
<el-tab-pane name="2">
|
||||
<template #label>
|
||||
<span class="custom-tabs-label text-25px">内部情报</span>
|
||||
</template>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane
|
||||
name="3"
|
||||
v-if="
|
||||
['review_person', 'zhuxi', 'tech_service'].includes(
|
||||
store2.user.roleCode
|
||||
)
|
||||
"
|
||||
>
|
||||
<template #label>
|
||||
<span class="custom-tabs-label text-25px">外部情报</span>
|
||||
</template>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div> -->
|
||||
<div>
|
||||
<!-- tab标题页 -->
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane v-for="item in tabs" :key="item">
|
||||
<template #label>
|
||||
<span class="custom-tabs-label">
|
||||
<img
|
||||
:src="activeName == item.id ? item.icon : item.icons"
|
||||
class="w25px h25px mr-5px mt--5px"
|
||||
/>
|
||||
<span class="text-20px">{{ item.name }}</span>
|
||||
</span>
|
||||
</template>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
|
||||
<!-- 驳回分页 -->
|
||||
<!-- <div
|
||||
class="bg-#fff rd-15px px30px pt30px w-full h100%"
|
||||
>
|
||||
<div
|
||||
class="rd-15px w-full h100%"
|
||||
style="box-shadow: 1px 2px 26px -3px #cdcccc"
|
||||
>
|
||||
<div class="p30px relative h100%">
|
||||
<table
|
||||
class="history w-full text-center text-16px border-spacing-0"
|
||||
>
|
||||
<thead
|
||||
style="
|
||||
background-color: #e7edff;
|
||||
color: #0a0a0a;
|
||||
height: 50px;
|
||||
width: 220px;
|
||||
border: 1px solid #417bef;
|
||||
"
|
||||
>
|
||||
<tr class="text-20px leading-50px">
|
||||
<th>标题</th>
|
||||
<th>文本内容</th>
|
||||
<th>提交时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(it, index) in listData" :key="index">
|
||||
<td>
|
||||
<span >
|
||||
{{ it.title }}</span
|
||||
>
|
||||
</td>
|
||||
|
||||
<td class="h50px">
|
||||
<span> {{ it.reviewStatusTxt }}</span>
|
||||
</td>
|
||||
<td class="h50px">
|
||||
<el-button size="small" @click="clickTo2(it)">详情</el-button>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="float-right absolute bottom-20px right-30px">
|
||||
<el-pagination
|
||||
v-model:current-page="pageInfo.pageNum"
|
||||
v-model:page-size="pageInfo.pageSize"
|
||||
layout="prev, pager, next, jumper"
|
||||
:total="pageInfo.total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<HomeHead class="top">
|
||||
<template #content>
|
||||
<HomeHeadSearch />
|
||||
</template>
|
||||
</HomeHead>
|
||||
<div class="h-full relative flex flex-col">
|
||||
<div class="font-600 flex items-end mt30px">
|
||||
<div class="text-36px">情报新增待审批</div>
|
||||
<div class="text-18px ml40px mr25px">{{ day }}</div>
|
||||
<div class="text-18px">{{ week }}</div>
|
||||
</div>
|
||||
<div class="q-wrapper flex-1 mt30px text-#142142 flex flex-col bg-#fff p30px">
|
||||
<div>
|
||||
<el-tabs type="card" v-model="activeNames" @tab-click="handleClicks">
|
||||
<el-tab-pane name="2">
|
||||
<template #label>
|
||||
<span class="custom-tabs-label text-25px">内部</span>
|
||||
</template>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane name="3" v-if="['review_person', 'zhuxi', 'tech_service'].includes(store2.user.roleCode)">
|
||||
<template #label>
|
||||
<span class="custom-tabs-label text-25px">外部</span>
|
||||
</template>
|
||||
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
<div>
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane v-for="item in tabs" key="item">
|
||||
<template #label>
|
||||
<span class="custom-tabs-label">
|
||||
<img :src="activeName == item.id ? item.icon : item.icons"
|
||||
class="w25px h25px mr-5px mt--5px" />
|
||||
<span class="text-20px">{{ item.name }}</span>
|
||||
</span>
|
||||
</template>
|
||||
</el-tab-pane>
|
||||
|
||||
|
||||
</el-tabs>
|
||||
</div>
|
||||
<div v-if="listData" v-for="i in listData" :key="i"
|
||||
class="mt8px cursor-pointer flex items-center p15px pl20px text-18px ">
|
||||
<span v-for="s in cateList" key="s">
|
||||
<span v-if="s.cate === i.cate"
|
||||
class="shrink-0 w80px inline-flex px8px py5px lh-1.5em text-14px rd-6px text-#fff/80 vertical-middle items-center justify-center bg-gray mr10px"
|
||||
:style="{ backgroundColor: s.color }">
|
||||
{{ s.name }}
|
||||
</span>
|
||||
|
||||
</span>
|
||||
<el-dropdown>
|
||||
<span
|
||||
class="truncate flex-1 w0 text-#142142 hover:underline w400px max-w400px" :title="i.title"
|
||||
@click=" clickTo(i)">
|
||||
{{ i.title }}
|
||||
</span>
|
||||
|
||||
<template #dropdown v-if="flg&&i.firstReviewName">
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item v-if="i.firstReviewName">
|
||||
<div class="ml20px text-#808696 !text-12px flex">
|
||||
<span class="min-w120px">初审人:{{ i.firstReviewName }}</span>
|
||||
<span class="ml20px">初审时间:{{ i.firstReviewTime }}</span>
|
||||
</div>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item v-if="i.ultimateReviewName">
|
||||
<div class="ml20px text-#808696 !text-12px flex">
|
||||
<span class="min-w120px">终审人:{{ i.ultimateReviewName }}</span>
|
||||
<span class="ml20px">终审时间:{{ i.ultimateReviewTime }}</span>
|
||||
</div>
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
|
||||
<span class="shrink-0 ml38px text-#808696 w220px">{{ i.createTime }}</span>
|
||||
<span v-if="store2.user.isReview > 0 && i.publishName" class="ml20px text-#808696 text-16px">来自:
|
||||
{{ i.publishName }}</span>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- 没分页 -->
|
||||
<div
|
||||
v-for="i in listData"
|
||||
:key="i"
|
||||
class="mt8px cursor-pointer flex items-center p15px pl20px text-18px"
|
||||
>
|
||||
<span v-for="s in cateList" :key="s">
|
||||
<span
|
||||
v-if="s.cate === i.cate"
|
||||
class="shrink-0 w80px inline-flex px8px py5px lh-1.5em text-14px rd-6px text-#fff/80 vertical-middle items-center justify-center bg-gray mr10px"
|
||||
:style="{ backgroundColor: s.color }"
|
||||
>
|
||||
{{ s.name }}
|
||||
</span>
|
||||
</span>
|
||||
<NTag
|
||||
type="info"
|
||||
v-if="i.reviewStatus == 5 && Status.reviewSource === 2"
|
||||
class="shrink-0 w80px inline-flex px8px py5px lh-1.5em text-14px rd-6px text-#fff/80 vertical-middle items-center justify-center bg-#547EE9 mr10px"
|
||||
>
|
||||
个人撤回
|
||||
</NTag>
|
||||
<NTag
|
||||
type="info"
|
||||
v-else-if="i.reviewStatus == 4 && Status.reviewSource === 2"
|
||||
class="shrink-0 w80px inline-flex px8px py5px lh-1.5em text-14px rd-6px text-#fff/80 vertical-middle items-center justify-center bg-#002FA7 mr10px"
|
||||
>
|
||||
领导驳回
|
||||
</NTag>
|
||||
<el-dropdown>
|
||||
<span
|
||||
class="truncate flex-1 w0 text-#142142 hover:underline w400px max-w400px"
|
||||
:title="i.title"
|
||||
@click="clickTo(i)"
|
||||
>
|
||||
{{ i.title }}
|
||||
</span>
|
||||
<template #dropdown v-if="flg && i.firstReviewName">
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item v-if="i.firstReviewName">
|
||||
<div class="ml20px text-#808696 !text-12px flex">
|
||||
<span class="min-w120px"
|
||||
>初审人:{{ i.firstReviewName }}</span
|
||||
>
|
||||
<span class="ml20px">初审时间:{{ i.firstReviewTime }}</span>
|
||||
</div>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item v-if="i.ultimateReviewName">
|
||||
<div class="ml20px text-#808696 !text-12px flex">
|
||||
<span class="min-w120px"
|
||||
>终审人:{{ i.ultimateReviewName }}</span
|
||||
>
|
||||
<span class="ml20px"
|
||||
>终审时间:{{ i.ultimateReviewTime }}</span
|
||||
>
|
||||
</div>
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
<span class="shrink-0 ml38px text-#808696 w220px">{{
|
||||
i.createTime
|
||||
}}</span>
|
||||
<span
|
||||
v-if="store2.user.isReview > 0 && i.publishName"
|
||||
class="ml20px text-#808696 text-16px flex-1"
|
||||
>来自: {{ i.publishName }}</span
|
||||
>
|
||||
<span
|
||||
v-if="Status.reviewStatus === 1"
|
||||
class="absolute right-10px top-18px"
|
||||
>
|
||||
<el-button @click="clickCancel(i)">撤回</el-button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped lang="less">
|
||||
.top {
|
||||
position: absolute;
|
||||
right: 30px;
|
||||
top: -92px;
|
||||
position: absolute;
|
||||
right: 30px;
|
||||
top: -92px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 1px;
|
||||
width: 1px;
|
||||
}
|
||||
|
||||
.q-wrapper {
|
||||
border-radius: 18px;
|
||||
border: 1px solid #e7ebf5;
|
||||
box-shadow: inset 1px 2px 12px rgba(14, 86, 221, 0.32);
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
||||
border-radius: 18px;
|
||||
border: 1px solid #E7EBF5;
|
||||
box-shadow: inset 1px 2px 12px rgba(14, 86, 221, 0.32);
|
||||
overflow: auto;
|
||||
}</style>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,406 @@
|
|||
<!-- 情报新增待审批 -->
|
||||
<script setup lang="ts">
|
||||
import { useUserStore } from "@/stores/modules/user";
|
||||
import HomeHead from "@/views/home/components/HomeHead.vue";
|
||||
import HomeHeadSearch from "@/views/home/components/HomeHeadSearch.vue";
|
||||
import { useDate } from "@/views/home/hooks/useDate";
|
||||
import {
|
||||
getNoticeList,
|
||||
deleteWithdraw,
|
||||
getManagerList,
|
||||
} from "@/api/daikin/base";
|
||||
import { noticeld } from "@/stores/modules/noticeId";
|
||||
import { getImg } from "../images";
|
||||
|
||||
const store = noticeld();
|
||||
const store2 = useUserStore();
|
||||
const { day, week } = useDate();
|
||||
const { push } = useRouter();
|
||||
const route = useRoute();
|
||||
// const toDetail2 =()=>{
|
||||
// console.log(route,route.path)
|
||||
// push(`/Home/Process/ProcessInfo`)
|
||||
const cateList = [
|
||||
{ cate: 1, name: "外部环境", color: "#33C2B2" },
|
||||
{ cate: 2, name: "竞争对手", color: "#F57E6C" },
|
||||
{ cate: 3, name: "供方动向 ", color: "#547EE9" },
|
||||
{ cate: 4, name: "大金集团", color: "#5ECBFA" },
|
||||
{ cate: 5, name: "中国据点", color: "#E5A742" },
|
||||
{ cate: 6, name: "调达本部", color: "#946DE1" },
|
||||
{ cate: 7, name: "news", color: "#63BF90" },
|
||||
{ cate: 8, name: "重要通知", color: "#E36461" },
|
||||
{ cate: 9, name: "留言板", color: "#F5BC00" },
|
||||
];
|
||||
const listData = ref<any>({});
|
||||
const Status = reactive({
|
||||
reviewStatus: 1,
|
||||
reviewSource: 2,
|
||||
});
|
||||
const pageInfo = reactive({
|
||||
pageNum: 1,
|
||||
pageSize: 13,
|
||||
total: 10,
|
||||
});
|
||||
const handleSizeChange = (e) => {
|
||||
console.log(e);
|
||||
};
|
||||
const handleCurrentChange = (e) => {
|
||||
console.log(e);
|
||||
};
|
||||
async function getPageList() {
|
||||
const { reviewStatus, reviewSource } = Status;
|
||||
// 外部-驳回&撤回
|
||||
if (reviewStatus == 4) {
|
||||
console.log("一级:", reviewSource, "二级:", reviewStatus);
|
||||
const { pageNum, pageSize } = pageInfo;
|
||||
const resp = await getManagerList({ pageNum, pageSize, reviewStatus: "5" });
|
||||
console.log(resp, 7777777777);
|
||||
listData.value = [];
|
||||
listData.value = resp.rows;
|
||||
} else {
|
||||
const { data } = await getNoticeList({ reviewStatus, reviewSource });
|
||||
listData.value = [];
|
||||
listData.value = data;
|
||||
}
|
||||
if (listData.value && reviewStatus === 3) {
|
||||
flg.value = true;
|
||||
} else {
|
||||
flg.value = false;
|
||||
}
|
||||
}
|
||||
// 详情页
|
||||
const clickTo = (data: any) => {
|
||||
let flag = false;
|
||||
const { id, noticeId, reviewStatus } = data;
|
||||
if (reviewStatus == 4) {
|
||||
flag = true;
|
||||
}
|
||||
// console.log(data, id, noticeId, reviewStatus);
|
||||
store.article.noticeld = noticeId;
|
||||
if (
|
||||
[1, 2].includes(reviewStatus) &&
|
||||
["review_person", "zhuxi", "tech_service"].includes(store2.user.roleCode)
|
||||
) {
|
||||
push(`/Home/Process/ProcessInfo/${id}`);
|
||||
} else {
|
||||
push(`/Home/Process/Detail/${id}/${flag}`); // 详情
|
||||
}
|
||||
// console.log(store.article.noticeld)
|
||||
};
|
||||
// 撤回按钮
|
||||
const clickCancel = (data: any) => {
|
||||
const { id, noticeId, reviewStatus } = data;
|
||||
deleteWithdraw(id).then((res) => {
|
||||
console.log(res, "删除结果");
|
||||
getPageList();
|
||||
});
|
||||
};
|
||||
const activeName = ref("0");
|
||||
const activeNames = ref("2");
|
||||
const flg = ref(false);
|
||||
const handleClicks = (tab: any) => {
|
||||
// 2 内部 3外部
|
||||
Status.reviewSource = tab.paneName;
|
||||
};
|
||||
// 二级
|
||||
const handleClick = (tab: TabsPaneContext, event: Event) => {
|
||||
switch (tab.index) {
|
||||
case "0":
|
||||
// 审核中
|
||||
Status.reviewStatus = 1;
|
||||
break;
|
||||
case "1":
|
||||
// 审核通过
|
||||
Status.reviewStatus = 3;
|
||||
break;
|
||||
case "2":
|
||||
// 撤销驳回
|
||||
Status.reviewStatus = 4;
|
||||
break;
|
||||
default:
|
||||
// 默认展示审核中
|
||||
Status.reviewStatus = 1;
|
||||
break;
|
||||
}
|
||||
// console.log(tab.index,ids)
|
||||
};
|
||||
const showDetail = (row: any) => {
|
||||
console.log(row, "单选一行");
|
||||
// sessionStorage.setItem("title", row.title);
|
||||
// console.log(row.content);
|
||||
// sessionStorage.setItem("content", row.content);
|
||||
// push({ name: "bcpDetail" });
|
||||
};
|
||||
// 监听 一级Tab 点击哪个[二级,一级]
|
||||
const ss = computed(() => [Status.reviewStatus, Status.reviewSource]);
|
||||
watch(
|
||||
() => unref(ss),
|
||||
async (v) => {
|
||||
getPageList();
|
||||
},
|
||||
{ immediate: true, deep: true }
|
||||
);
|
||||
const tabsList = ref([
|
||||
{
|
||||
name: "审核中",
|
||||
icon: getImg("shq2@2x.png"),
|
||||
icons: getImg("shq1@2x.png"),
|
||||
id: 0,
|
||||
},
|
||||
{
|
||||
name: "审核通过",
|
||||
icon: getImg("shetg2@2x.png"),
|
||||
icons: getImg("shetg1@2x.png"),
|
||||
id: 1,
|
||||
},
|
||||
{
|
||||
name: "驳回/撤回",
|
||||
icon: getImg("boh2@2x.png"),
|
||||
icons: getImg("boh1@2x.png"),
|
||||
id: 2,
|
||||
},
|
||||
// {
|
||||
// name:'草稿',
|
||||
// icon:getImg('caog2@2x.png'),
|
||||
// icons:getImg('caog1@2x.png'),
|
||||
// id:3,
|
||||
// },
|
||||
]);
|
||||
// tab
|
||||
const tabsList2 = ref([
|
||||
{
|
||||
name: "待审核",
|
||||
icon: getImg("shhz2@2x.png"),
|
||||
icons: getImg("shhz1@2x.png"),
|
||||
id: 0,
|
||||
},
|
||||
{
|
||||
name: "已发布",
|
||||
icon: getImg("wanc2@2x.png"),
|
||||
icons: getImg("wanc1@2x.png"),
|
||||
id: 1,
|
||||
},
|
||||
{
|
||||
name: "驳回/撤回",
|
||||
icon: getImg("boh2@2x.png"),
|
||||
icons: getImg("boh1@2x.png"),
|
||||
id: 2,
|
||||
},
|
||||
// {
|
||||
// name:'归档',
|
||||
// icon:getImg('guid2@2x.png'),
|
||||
// icons:getImg('guid1@2x.png'),
|
||||
// id:3,
|
||||
// },
|
||||
]);
|
||||
let tabs = store2.user.isReview > 0 ? tabsList2.value : tabsList.value;
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<HomeHead class="top">
|
||||
<template #content>
|
||||
<!-- <HomeHeadSearch /> -->
|
||||
</template>
|
||||
</HomeHead>
|
||||
<div class="h-full relative flex flex-col">
|
||||
<div class="font-600 flex items-end mt30px">
|
||||
<div class="text-36px">情报列表</div>
|
||||
<div class="text-18px ml40px mr25px">{{ day }}</div>
|
||||
<div class="text-18px">{{ week }}</div>
|
||||
</div>
|
||||
<div
|
||||
class="q-wrapper flex-1 mt30px text-#142142 flex flex-col bg-#fff p30px"
|
||||
>
|
||||
<!-- <div>
|
||||
<el-tabs type="card" v-model="activeNames" @tab-click="handleClicks">
|
||||
<el-tab-pane name="2">
|
||||
<template #label>
|
||||
<span class="custom-tabs-label text-25px">内部情报</span>
|
||||
</template>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane
|
||||
name="3"
|
||||
v-if="
|
||||
['review_person', 'zhuxi', 'tech_service'].includes(
|
||||
store2.user.roleCode
|
||||
)
|
||||
"
|
||||
>
|
||||
<template #label>
|
||||
<span class="custom-tabs-label text-25px">外部情报</span>
|
||||
</template>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div> -->
|
||||
<div>
|
||||
<!-- tab标题页 -->
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane v-for="item in tabs" :key="item">
|
||||
<template #label>
|
||||
<span class="custom-tabs-label">
|
||||
<img
|
||||
:src="activeName == item.id ? item.icon : item.icons"
|
||||
class="w25px h25px mr-5px mt--5px"
|
||||
/>
|
||||
<span class="text-20px">{{ item.name }}</span>
|
||||
</span>
|
||||
</template>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
|
||||
<!-- 驳回分页 -->
|
||||
<!-- <div
|
||||
class="bg-#fff rd-15px px30px pt30px w-full h100%"
|
||||
>
|
||||
<div
|
||||
class="rd-15px w-full h100%"
|
||||
style="box-shadow: 1px 2px 26px -3px #cdcccc"
|
||||
>
|
||||
<div class="p30px relative h100%">
|
||||
<table
|
||||
class="history w-full text-center text-16px border-spacing-0"
|
||||
>
|
||||
<thead
|
||||
style="
|
||||
background-color: #e7edff;
|
||||
color: #0a0a0a;
|
||||
height: 50px;
|
||||
width: 220px;
|
||||
border: 1px solid #417bef;
|
||||
"
|
||||
>
|
||||
<tr class="text-20px leading-50px">
|
||||
<th>标题</th>
|
||||
<th>文本内容</th>
|
||||
<th>提交时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(it, index) in listData" :key="index">
|
||||
<td>
|
||||
<span >
|
||||
{{ it.title }}</span
|
||||
>
|
||||
</td>
|
||||
|
||||
<td class="h50px">
|
||||
<span> {{ it.reviewStatusTxt }}</span>
|
||||
</td>
|
||||
<td class="h50px">
|
||||
<el-button size="small" @click="clickTo2(it)">详情</el-button>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="float-right absolute bottom-20px right-30px">
|
||||
<el-pagination
|
||||
v-model:current-page="pageInfo.pageNum"
|
||||
v-model:page-size="pageInfo.pageSize"
|
||||
layout="prev, pager, next, jumper"
|
||||
:total="pageInfo.total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- 没分页 -->
|
||||
<div
|
||||
v-for="i in listData"
|
||||
:key="i"
|
||||
class="mt8px cursor-pointer flex items-center p15px pl20px text-18px"
|
||||
>
|
||||
<span v-for="s in cateList" :key="s">
|
||||
<span
|
||||
v-if="s.cate === i.cate"
|
||||
class="shrink-0 w80px inline-flex px8px py5px lh-1.5em text-14px rd-6px text-#fff/80 vertical-middle items-center justify-center bg-gray mr10px"
|
||||
:style="{ backgroundColor: s.color }"
|
||||
>
|
||||
{{ s.name }}
|
||||
</span>
|
||||
</span>
|
||||
<NTag
|
||||
type="info"
|
||||
v-if="i.reviewStatus == 5 && Status.reviewSource === 2"
|
||||
class="shrink-0 w80px inline-flex px8px py5px lh-1.5em text-14px rd-6px text-#fff/80 vertical-middle items-center justify-center bg-#547EE9 mr10px"
|
||||
>
|
||||
个人撤回
|
||||
</NTag>
|
||||
<NTag
|
||||
type="info"
|
||||
v-else-if="i.reviewStatus == 4 && Status.reviewSource === 2"
|
||||
class="shrink-0 w80px inline-flex px8px py5px lh-1.5em text-14px rd-6px text-#fff/80 vertical-middle items-center justify-center bg-#002FA7 mr10px"
|
||||
>
|
||||
领导驳回
|
||||
</NTag>
|
||||
<el-dropdown>
|
||||
<span
|
||||
class="truncate flex-1 w0 text-#142142 hover:underline w400px max-w400px"
|
||||
:title="i.title"
|
||||
@click="clickTo(i)"
|
||||
>
|
||||
{{ i.title }}
|
||||
</span>
|
||||
<template #dropdown v-if="flg && i.firstReviewName">
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item v-if="i.firstReviewName">
|
||||
<div class="ml20px text-#808696 !text-12px flex">
|
||||
<span class="min-w120px"
|
||||
>初审人:{{ i.firstReviewName }}</span
|
||||
>
|
||||
<span class="ml20px">初审时间:{{ i.firstReviewTime }}</span>
|
||||
</div>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item v-if="i.ultimateReviewName">
|
||||
<div class="ml20px text-#808696 !text-12px flex">
|
||||
<span class="min-w120px"
|
||||
>终审人:{{ i.ultimateReviewName }}</span
|
||||
>
|
||||
<span class="ml20px"
|
||||
>终审时间:{{ i.ultimateReviewTime }}</span
|
||||
>
|
||||
</div>
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
<span class="shrink-0 ml38px text-#808696 w220px">{{
|
||||
i.createTime
|
||||
}}</span>
|
||||
<span
|
||||
v-if="store2.user.isReview > 0 && i.publishName"
|
||||
class="ml20px text-#808696 text-16px flex-1"
|
||||
>来自: {{ i.publishName }}</span
|
||||
>
|
||||
<span
|
||||
v-if="Status.reviewStatus === 1"
|
||||
class="absolute right-10px top-18px"
|
||||
>
|
||||
<el-button @click="clickCancel(i)">撤回</el-button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped lang="less">
|
||||
.top {
|
||||
position: absolute;
|
||||
right: 30px;
|
||||
top: -92px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 1px;
|
||||
}
|
||||
|
||||
.q-wrapper {
|
||||
border-radius: 18px;
|
||||
border: 1px solid #e7ebf5;
|
||||
box-shadow: inset 1px 2px 12px rgba(14, 86, 221, 0.32);
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
import { historyStat,rateHistoryStat,historyMarketSevenDay,historyStatSevenDay} from '@/api/daikin/base'
|
||||
import { historyStat, rateHistoryStat, historyMarketSevenDay, historyStatSevenDay } from '@/api/daikin/base'
|
||||
import type { EChartsOption } from 'echarts'
|
||||
import * as echarts from 'echarts'
|
||||
import {calculateDateIntervals} from '@/utils/format'
|
||||
import { calculateDateIntervals } from '@/utils/format'
|
||||
|
||||
|
||||
|
||||
|
|
@ -9,34 +9,34 @@ const state = reactive<any>({
|
|||
type: 'Cu',
|
||||
})
|
||||
const state1 = reactive<any>({
|
||||
currencyCodeFrom:'CNA',
|
||||
currencyCodeTo:'USD',
|
||||
currencyCodeFrom: 'CNA',
|
||||
currencyCodeTo: 'USD',
|
||||
})
|
||||
const state2 = reactive<any>({
|
||||
currencyCodeFrom:'CNA',
|
||||
currencyCodeTo:'USD',
|
||||
currencyCodeFrom: 'CNA',
|
||||
currencyCodeTo: 'USD',
|
||||
})
|
||||
const state3 = reactive<any>({
|
||||
currencyCodeFrom:'USD',
|
||||
currencyCodeTo:'CNA',
|
||||
currencyCodeFrom: 'USD',
|
||||
currencyCodeTo: 'CNA',
|
||||
})
|
||||
const state4 = reactive<any>({
|
||||
number:'Cu',
|
||||
number: 'Cu',
|
||||
type: '2',
|
||||
dateList:calculateDateIntervals('','').list,
|
||||
startTime:'',
|
||||
endTime:'',
|
||||
dateList: calculateDateIntervals('', '').list,
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
})
|
||||
const state5 = reactive<any>({
|
||||
currencyCodeFrom:'CNA',
|
||||
currencyCodeTo:'JPY',
|
||||
currencyCodeFrom: 'CNA',
|
||||
currencyCodeTo: 'JPY',
|
||||
type: '2',
|
||||
dateList:calculateDateIntervals('','').list,
|
||||
startTime:'',
|
||||
endTime:'',
|
||||
dateList: calculateDateIntervals('', '').list,
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
})
|
||||
|
||||
function getDay(){
|
||||
function getDay() {
|
||||
const today = new Date();
|
||||
const pastSevenDays = [];
|
||||
|
||||
|
|
@ -49,26 +49,24 @@ function getDay(){
|
|||
return pastSevenDays;
|
||||
}
|
||||
|
||||
function reverseArray(inputArray: string | any[],star: number,enc: number) {
|
||||
function reverseArray(inputArray: string | any[], star: number, enc: number) {
|
||||
const reversedArray = [];
|
||||
|
||||
|
||||
for (let i = 0; i <= inputArray.length - 1; i++) {
|
||||
reversedArray.push(inputArray[i].substring(star,enc));
|
||||
reversedArray.push(inputArray[i].substring(star, enc));
|
||||
}
|
||||
|
||||
|
||||
return reversedArray;
|
||||
}
|
||||
export function Chart1() {
|
||||
|
||||
export function Chart1() {
|
||||
const chartRef = ref()
|
||||
const optionRef = ref()
|
||||
async function getDat() {
|
||||
const {data} = await historyMarketSevenDay({number:state.type})
|
||||
if(!data) return
|
||||
let {LME,SMM} = data[state.type]
|
||||
|
||||
async function getDat() {
|
||||
const { data } = await historyMarketSevenDay({ number: state.type })
|
||||
if (!data) return
|
||||
let { LME, SMM } = data[state.type]
|
||||
const option = {
|
||||
|
||||
height: '150px', // 设置图表高度为 400 像素
|
||||
grid: { left: '10', top: 90, right: '10', bottom: '10', containLabel: true },
|
||||
tooltip: {
|
||||
|
|
@ -81,7 +79,7 @@ async function getDat() {
|
|||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: reverseArray(getDay(),5,10)
|
||||
data: reverseArray(getDay(), 5, 10)
|
||||
},
|
||||
yAxis: [
|
||||
{
|
||||
|
|
@ -133,7 +131,6 @@ async function getDat() {
|
|||
const option = chartRef.value;
|
||||
chartRef.value = option;
|
||||
});
|
||||
|
||||
return { chartRef, option: optionRef, state }
|
||||
}
|
||||
|
||||
|
|
@ -142,11 +139,11 @@ export function Chart3() {
|
|||
const chartRef = ref()
|
||||
const optionRef = ref<any>({});
|
||||
|
||||
async function getDat() {
|
||||
const {data} = await historyStatSevenDay({currencyCodeFrom:state2.currencyCodeFrom,currencyCodeTo:state2.currencyCodeTo})
|
||||
if(!data) return
|
||||
const dat = data[state2.currencyCodeFrom+'-'+state2.currencyCodeTo]
|
||||
|
||||
async function getDat() {
|
||||
const { data } = await historyStatSevenDay({ currencyCodeFrom: state2.currencyCodeFrom, currencyCodeTo: state2.currencyCodeTo })
|
||||
if (!data) return
|
||||
const dat = data[state2.currencyCodeFrom + '-' + state2.currencyCodeTo]
|
||||
|
||||
const option = {
|
||||
|
||||
height: '150px', // 设置图表高度为 400 像素
|
||||
|
|
@ -155,20 +152,20 @@ export function Chart3() {
|
|||
trigger: 'axis'
|
||||
},
|
||||
legend: {
|
||||
data:state2.currencyCodeFrom+'-'+state2.currencyCodeTo,
|
||||
data: state2.currencyCodeFrom + '-' + state2.currencyCodeTo,
|
||||
right: 20,
|
||||
top: 10,
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: reverseArray(getDay(),8,10)
|
||||
data: reverseArray(getDay(), 8, 10)
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: state2.currencyCodeFrom+'-'+state2.currencyCodeTo,
|
||||
name: state2.currencyCodeFrom + '-' + state2.currencyCodeTo,
|
||||
data: dat,
|
||||
color: '#8F97F8',
|
||||
type: 'line',
|
||||
|
|
@ -183,7 +180,7 @@ export function Chart3() {
|
|||
|
||||
optionRef.value = option;
|
||||
}
|
||||
const ss = computed(() => [state2.currencyCodeFrom,state2.currencyCodeTo])
|
||||
const ss = computed(() => [state2.currencyCodeFrom, state2.currencyCodeTo])
|
||||
watch(() => unref(ss),
|
||||
async (v) => {
|
||||
console.log(state2.type)
|
||||
|
|
@ -205,11 +202,11 @@ export function Chart4() {
|
|||
const chartRef = ref()
|
||||
const optionRef = ref<any>({});
|
||||
|
||||
async function getDat() {
|
||||
const {data} = await historyStatSevenDay({currencyCodeFrom:state3.currencyCodeFrom,currencyCodeTo:state3.currencyCodeTo})
|
||||
if(!data) return
|
||||
const dat = data[state3.currencyCodeFrom+'-'+state3.currencyCodeTo]
|
||||
|
||||
async function getDat() {
|
||||
const { data } = await historyStatSevenDay({ currencyCodeFrom: state3.currencyCodeFrom, currencyCodeTo: state3.currencyCodeTo })
|
||||
if (!data) return
|
||||
const dat = data[state3.currencyCodeFrom + '-' + state3.currencyCodeTo]
|
||||
|
||||
const option = {
|
||||
grid: { left: '10', top: 90, right: '10', bottom: '10', containLabel: true },
|
||||
|
||||
|
|
@ -219,20 +216,20 @@ export function Chart4() {
|
|||
trigger: 'axis'
|
||||
},
|
||||
legend: {
|
||||
data:state3.currencyCodeFrom+'-'+state3.currencyCodeTo,
|
||||
data: state3.currencyCodeFrom + '-' + state3.currencyCodeTo,
|
||||
right: 20,
|
||||
top: 10,
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: reverseArray(getDay(),8,10)
|
||||
data: reverseArray(getDay(), 8, 10)
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: state3.currencyCodeFrom+'-'+state3.currencyCodeTo,
|
||||
name: state3.currencyCodeFrom + '-' + state3.currencyCodeTo,
|
||||
data: dat,
|
||||
color: '#8F97F8',
|
||||
type: 'line',
|
||||
|
|
@ -240,16 +237,16 @@ export function Chart4() {
|
|||
show: true,
|
||||
position: 'top'
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
|
||||
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
optionRef.value = option;
|
||||
optionRef.value = option;
|
||||
}
|
||||
const ss = computed(() => [state3.currencyCodeFrom,state3.currencyCodeTo])
|
||||
const ss = computed(() => [state3.currencyCodeFrom, state3.currencyCodeTo])
|
||||
watch(() => unref(ss),
|
||||
async (v) => {
|
||||
console.log(state3.type)
|
||||
|
|
@ -269,15 +266,15 @@ export function Chart4() {
|
|||
export function Chart5() {
|
||||
const chartRef = ref()
|
||||
const optionRef = ref<any>({});
|
||||
let nameX: string[]
|
||||
async function dataList() {
|
||||
let SMM,LME
|
||||
const {data} = await historyStat({number:state4.number,type:state4.type,dateList:state4.dateList})
|
||||
if(data&&data[state4.number]){
|
||||
SMM=data[state4.number].SMM
|
||||
let nameX: string[]
|
||||
async function dataList() {
|
||||
let SMM, LME
|
||||
const { data } = await historyStat({ number: state4.number, type: state4.type, dateList: state4.dateList })
|
||||
if (data && data[state4.number]) {
|
||||
SMM = data[state4.number].SMM
|
||||
LME = data[state4.number].LME
|
||||
}
|
||||
|
||||
|
||||
|
||||
const option = {
|
||||
// width: '250px', // 设置图表宽度为 800 像素
|
||||
|
|
@ -293,7 +290,7 @@ async function dataList() {
|
|||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data:nameX
|
||||
data: nameX
|
||||
},
|
||||
yAxis: [
|
||||
{
|
||||
|
|
@ -327,13 +324,13 @@ async function dataList() {
|
|||
}
|
||||
optionRef.value = option;
|
||||
}
|
||||
const ss = computed(() => [state4.number,state4.startTime,state4.endTime])
|
||||
const ss = computed(() => [state4.number, state4.startTime, state4.endTime])
|
||||
watch(() => unref(ss),
|
||||
async (v) => {
|
||||
|
||||
|
||||
// console.log(calculateDateIntervals(state4.startTime,state4.endTime),88888)
|
||||
const {type,list} = calculateDateIntervals(state4.startTime,state4.endTime)
|
||||
nameX =list
|
||||
const { type, list } = calculateDateIntervals(state4.startTime, state4.endTime)
|
||||
nameX = list
|
||||
state4.dateList = list
|
||||
state4.type = type
|
||||
console.log(state4.number)
|
||||
|
|
@ -352,10 +349,10 @@ export function Chart6() {
|
|||
const chartRef = ref()
|
||||
const optionRef = ref<any>({});
|
||||
|
||||
let nameX: string[]
|
||||
async function getDat() {
|
||||
const {data} = await rateHistoryStat({currencyCodeFrom:state5.currencyCodeFrom,currencyCodeTo:state5.currencyCodeTo,type:state5.type,dateList:state5.dateList})
|
||||
const dat = data[state5.currencyCodeFrom+'-'+state5.currencyCodeTo]
|
||||
let nameX: string[]
|
||||
async function getDat() {
|
||||
const { data } = await rateHistoryStat({ currencyCodeFrom: state5.currencyCodeFrom, currencyCodeTo: state5.currencyCodeTo, type: state5.type, dateList: state5.dateList })
|
||||
const dat = data[state5.currencyCodeFrom + '-' + state5.currencyCodeTo]
|
||||
const option = {
|
||||
// width: '250px', // 设置图表宽度为 800 像素
|
||||
// height: '150px', // 设置图表高度为 400 像素
|
||||
|
|
@ -370,14 +367,14 @@ async function getDat() {
|
|||
// },
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data:nameX
|
||||
data: nameX
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: state5.currencyCodeFrom+'-'+state5.currencyCodeTo,
|
||||
name: state5.currencyCodeFrom + '-' + state5.currencyCodeTo,
|
||||
data: dat,
|
||||
color: '#89DF75',
|
||||
type: 'line',
|
||||
|
|
@ -387,12 +384,12 @@ async function getDat() {
|
|||
}
|
||||
optionRef.value = option;
|
||||
}
|
||||
const ss = computed(() => [state5.currencyCodeFrom,state5.currencyCodeTo,state5.startTime,state5.endTime])
|
||||
const ss = computed(() => [state5.currencyCodeFrom, state5.currencyCodeTo, state5.startTime, state5.endTime])
|
||||
watch(() => unref(ss),
|
||||
async (v) => {
|
||||
const {type,list} = calculateDateIntervals(state5.startTime,state5.endTime)
|
||||
const { type, list } = calculateDateIntervals(state5.startTime, state5.endTime)
|
||||
|
||||
nameX =list
|
||||
nameX = list
|
||||
state5.dateList = list
|
||||
state5.type = type
|
||||
getDat()
|
||||
|
|
|
|||
Loading…
Reference in New Issue