Commit 04ba5133 authored by xinzhedeai's avatar xinzhedeai

head button

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