Commit 04ba5133 authored by xinzhedeai's avatar xinzhedeai

head button

parent fd3b0557
......@@ -7,8 +7,11 @@
<div class="b1_bg">
<h2>威海高新区科技企业孵化信息平台</h2>
</div>
<div class="go-back">
<a @click="goBackendHome">进入后台</a>
<div v-if="isTechUser" class="go-back" @click="goOverview">
<a>总览</a>
</div>
<div v-if="isTechUser" class="go-back" style="right: .1rem;left: auto;" @click="goBackendHome">
<a>进入后台</a>
</div>
</header>
</div>
......@@ -73,7 +76,7 @@
<h4>毕业企业今年总收入排行榜</h4>
</div>
<div class="ct-box">
<div class="wrap fhqfhqysjfxWrapper"></div>
<div class="wrap byqyjnzsrphbWrapper"></div>
</div>
</div>
</div>
......@@ -83,7 +86,7 @@
<h4>毕业企业年度上缴税费变化趋势</h4>
</div>
<div class="ct-box">
<div class="wrap fhqyndsjsfbhqsWrapper"></div>
<div class="wrap byqyndsjsfbhqsWrapper"></div>
</div>
</div>
</div>
......@@ -95,23 +98,17 @@
</template>
<script>
import { reqApi } from "@/assets/js/httpApi.js";
import { Highchart } from "@/assets/js/chartTemplates.js";
import cuAmap from "@/components/AMap";
import request from "@/utils/request";
import Highcharts from 'highcharts';
//关闭信息窗体
function closeInfoWindow(mapEle) {
mapEle.clearInfoWindow();
}
function isTechUser(){
return localStorage.getItem('groupIdByloginType')*1===2 // 是否为科技局用户
}
// function isTechUser(){
// return localStorage.getItem('groupIdByloginType')*1===2 // 是否为科技局用户
// }
export default {
data() {
return {
// isTechUser: localStorage.getItem('groupIdByloginType')*1===2,
map: null,
infoWindow: null,
navActive: null,
......@@ -124,6 +121,11 @@ export default {
};
},
components: { cuAmap },
computed:{
isTechUser(){
return localStorage.getItem('groupIdByloginType')*1===2
}
},
mounted() {
var that = this;
this.$nextTick(() => {
......@@ -174,6 +176,9 @@ export default {
}
});
},
goOverview(){
location.href = '/home/overview'
},
goBackendHome(){
location.href = '/home/enterprise'
},
......@@ -189,7 +194,6 @@ export default {
// addMarker();
this.getIncubatorMarkers()
const item = {};
//实例化信息窗体
VUE.infoWindow = new AMap.InfoWindow({
isCustom: true, //使用自定义窗体
......@@ -197,15 +201,15 @@ export default {
offset: new AMap.Pixel(30, 70),
});
VUE.infoWindow.on("open", function () {
VUE.infoWindow.on("open", () => {
// 关闭信息框
document.getElementById("closeInfoWindowBtn").onclick = () => {
document.getElementById("closeInfoWindowBtn").onclick = function() {
VUE.infoWindow.close();
};
document.getElementById("goMoreBtn").onclick = function () {
document.getElementById("goMoreBtn").onclick = function() {
// alert(this.getAttribute('data-id'))
// VUE.$route.push('/home/enterprise')
if(isTechUser()){
if(VUE.isTechUser){
location.href = "/home/overview?id=" + this.getAttribute("data-id");
}else{
location.href = "/home/enterprise?id=" + this.getAttribute("data-id");
......@@ -226,7 +230,7 @@ export default {
</dl>
<button type="button" id="goMoreBtn" data-id="${
item.id
}">${isTechUser()?'更多':'进入后台'}</button>
}">${this.isTechUser?'更多':'进入后台'}</button>
</div>`;
this.infoWindow.setContent(content);
this.infoWindow.open(this.map, marker.getPosition());
......@@ -242,7 +246,7 @@ export default {
});
},
srph() {
// 孵化总收入排行榜
// 在孵企业今年总收入排行榜
request({
url: "api/homePage/incubatorLeaderboard",
method: "get",
......@@ -257,9 +261,11 @@ export default {
chartConfig: {
chart: {
type: "bar",
marginTop:20,
// marginBottom: 10,
bottom:10,
left:40,
// bottom:10,
// left:40,
marginRight:30,
},
xAxis: {
type: "category",
......@@ -281,17 +287,29 @@ export default {
lineWidth: 1, // 设置 Y 轴坐标轴线宽度
lineColor: '#f7f7f7', // 设置 Y 轴坐标轴线颜色
gridLineWidth: 0, // 也可以设置不显示网格线
title: {
style: {
color: "#eee",
fontSize: "0.18rem",
},
},
// title: {
// style: {
// color: "#eee",
// fontSize: "0.18rem",
// },
// },
// title: {
// text: "(万元)",
// // margin: 0,
// style: {
// color: "#00F0FF",
// fontSize: "0.17rem",
// },
// // rotation: 0,
// // align: "high",
// // y: -45,
// // x: 85,
// },
labels: {
overflow: 'justify',
// style: {
// fontSize: '20px' // 设置 Y 轴标签的字体大小
// }
style: {
fontSize: '0.18rem' // 设置 Y 轴标签的字体大小
}
}
},
plotOptions: {
......@@ -300,14 +318,21 @@ export default {
enabled: true,
allowOverlap: true, // 允许数据标签重叠
style: {
fontSize: '0.19rem', // 设置数据标签的字体大小
fontSize: '0.18rem', // 设置数据标签的字体大小
fontWeight: 'bold' // 设置数据标签的字体粗细
}
}
}
},
tooltip: {
pointFormat: "<b style='fontSize:24rem;'>{series.name}:</b> <b style='fontSize:24rem;'>{point.y:.1f}%</b>",
shared: true,
useHTML: true,
headerFormat: '<table><tr><th colspan="2">{point.key}</th></tr>',
pointFormat: '<tr><td class="toolTipHeader" style="color: {series.color};font-size:20px;">{series.name} ' +
'</td>' +
'<td style="text-align: left"><b>{point.y:.1f}万元</b></td></tr>',
footerFormat: '</table>',
valueDecimals: 2
},
series: [
{
......@@ -418,9 +443,11 @@ export default {
chartConfig: {
chart: {
type: "bar",
marginTop:20,
// marginBottom: 10,
bottom:10,
left:40,
// bottom:10,
// left:40,
marginRight:30,
},
xAxis: {
type: "category",
......@@ -442,17 +469,29 @@ export default {
lineWidth: 1, // 设置 Y 轴坐标轴线宽度
lineColor: '#f7f7f7', // 设置 Y 轴坐标轴线颜色
gridLineWidth: 0, // 也可以设置不显示网格线
title: {
style: {
color: "#eee",
fontSize: "0.18rem",
},
},
// title: {
// style: {
// color: "#eee",
// fontSize: "0.18rem",
// },
// },
// title: {
// text: "(万元)",
// // margin: 0,
// style: {
// color: "#00F0FF",
// fontSize: "0.17rem",
// },
// // rotation: 0,
// // align: "high",
// // y: -45,
// // x: 85,
// },
labels: {
overflow: 'justify',
// style: {
// fontSize: '20px' // 设置 Y 轴标签的字体大小
// }
style: {
fontSize: '0.18rem' // 设置 Y 轴标签的字体大小
}
}
},
plotOptions: {
......@@ -461,14 +500,21 @@ export default {
enabled: true,
allowOverlap: true, // 允许数据标签重叠
style: {
fontSize: '0.19rem', // 设置数据标签的字体大小
fontSize: '0.18rem', // 设置数据标签的字体大小
fontWeight: 'bold' // 设置数据标签的字体粗细
}
}
}
},
tooltip: {
pointFormat: "<b style='fontSize:24rem;'>{series.name}:</b> <b style='fontSize:24rem;'>{point.y:.1f}%</b>",
shared: true,
useHTML: true,
headerFormat: '<table><tr><th colspan="2">{point.key}</th></tr>',
pointFormat: '<tr><td class="toolTipHeader" style="color: {series.color};font-size:20px;">{series.name} ' +
'</td>' +
'<td style="text-align: left"><b>{point.y:.1f}万元</b></td></tr>',
footerFormat: '</table>',
valueDecimals: 2
},
series: [
{
......@@ -486,7 +532,7 @@ export default {
isSeriesData: true,
};
Highchart.template.rich(
document.querySelector(".fhqfhqysjfxWrapper"),
document.querySelector(".byqyjnzsrphbWrapper"),
list,
opts
);
......@@ -646,7 +692,7 @@ export default {
};
// Highchart.template.rich(wrap35, list, opts);
Highchart.template.rich(
document.querySelector(".fhqyndsjsfbhqsWrapper"),
document.querySelector(".byqyndsjsfbhqsWrapper"),
list,
opts
);
......@@ -1030,6 +1076,7 @@ export default {
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
a {
color: #fff;
text-decoration: none;
......@@ -1245,6 +1292,18 @@ export default {
.a-md31 {
height: 3.2rem;
position: relative;
&::after{
position: absolute;
top: 62%;
left: 50%;
transform: translateX(-50%);
content: "";
width: 499px;
height: 1px;
background: linear-gradient(to right, #cfb8b8 50%, transparent 50%) repeat;
background-size: 10px 2px;
}
ul {
position: absolute;
top: 0;
......@@ -1262,6 +1321,7 @@ export default {
align-items: center;
position: relative;
padding-left: 0.5rem;
&:before {
content: "";
height: 0.44rem;
......
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