Commit 8be9fc37 authored by danfuman's avatar danfuman

Merge branch 'dev20230707' of http://192.168.60.201/root/dsk-operate-sys into dev20230707

parents 4dc61074 23581658
......@@ -7,11 +7,10 @@ const steerScroll = function(iframeId, navigation, state, parentId) { // state:
let dom = window
if (parentId) { // 默认页面可以滚动
dom = document.getElementById(parentId)
if(!dom){
if (!dom) {
return
}
dom.style.overflow = 'auto'
navigation.totalHeight = 0
} else {
document.body.style.overflow = 'visible'
}
......@@ -22,12 +21,12 @@ const steerScroll = function(iframeId, navigation, state, parentId) { // state:
if (data && typeof data === 'object') {
// 动态设置iFrame高度
if (data.height) {
document.getElementById(iframeId).style.height = data.height+'px'
document.getElementById(iframeId).style.height = data.height + 'px'
scrolling(iframeId, navigation, parentId) // 初始加载获取滚动条距离顶部高度
}
// 点击企业详情页 栏目名动态设置滚动高度
if (data.scrollHeight) {
let navHeight = navigation.isFixed ? navigation.totalHeight - navigation.fixedHeight : navigation.totalHeight
const navHeight = navigation.isFixed && !parentId ? navigation.totalHeight - navigation.fixedHeight : !parentId ? navigation.totalHeight : 0
dom.scrollTo(sct, parseInt(data.scrollHeight) + navHeight)
}
// 点击企业详情页 栏目下拉子标签动态设置滚动高度
......@@ -63,11 +62,9 @@ const scrolling = function(iframeId, navigation, parentId) {
let scrollTop = parentId ? document.getElementById(parentId).scrollTop : window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop
// 将滚动距离传入子组件
const ifa = document.getElementById(iframeId)
if ((scrollTop < navigation.totalHeight && !navigation.isFixed) || navigation.isFixed) {
scrollTop = scrollTop + navigation.totalHeight
}
scrollTop = scrollTop + navigation.totalHeight
const bodyHeight = document.body.clientHeight - navigation.totalHeight
ifa.contentWindow.postMessage({ 'scrollTop': scrollTop, 'bodyHeight': bodyHeight }, '*')
ifa.contentWindow.postMessage({ 'scrollTop': scrollTop, 'navHeight': navigation.totalHeight, 'bodyHeight': bodyHeight }, '*')
}
export {
......
......@@ -105,7 +105,7 @@ export default {
data() {
return {
encodeStr,
datatype:'3',//切换类型
datatype:'1',//切换类型
dataAll: {},
dtdata:[],//数据
dttime:[],//坐标
......
......@@ -84,12 +84,6 @@ export default {
let res = await financialData({cid: this.companyId})
if(res.code==200 && res.data){
this.viewData = res.data
// totalVal = data.map(item => item.value).reduce((prev, cur) => prev + cur)
// this.viewData = data.map(item => {
// let it = {name:item.year, value:item.value, percent:parseFloat(Number(Number(item.value)/Number(totalVal)*100).toFixed(2))}
// return it
// })
// console.log(this.viewData)
if(this.viewData.length>0){
this.$nextTick(() => {
this.getDT(val)
......@@ -101,10 +95,12 @@ export default {
let myChart = echarts.init(document.getElementById("echartsFinance"))
let barData = [],years = [],compareData = [];
this.viewData.map(item=>{
barData.push(item[val]);
barData.push(item[val+'Size'].toFixed(2));
compareData.push(item[val+'Compare']||'');
years.push(item.year)
})
// let compareDataMax = Math.max(...compareData)
// let compareDataMin = Math.min(...compareData)
let option = {
legend: {
show:true,
......@@ -145,7 +141,7 @@ export default {
yAxis: [
{
type: 'value',
min:0,
// min:0,
splitLine : { //网格线
lineStyle: {
type: 'dashed' //设置网格线类型 dotted:虚线 solid:实线
......@@ -156,7 +152,7 @@ export default {
type: 'value',
// min:'dataMin',
// max:'dataMax',
// interval:compareData.length,
// interval:((compareDataMax-compareDataMin)/5).toFixed(2),
splitLine : { //网格线
show:false
},
......@@ -193,7 +189,7 @@ export default {
color: "#0081FF"
},
type: 'line',
// yAxisIndex: 1,
yAxisIndex: 1,
data: compareData
},
],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment