update company info
This commit is contained in:
parent
d94b5fa9c3
commit
11626c5142
@ -12,7 +12,7 @@
|
|||||||
<h2>{{ info.companyName }}</h2>
|
<h2>{{ info.companyName }}</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li v-for="item in info.items" :key="item.label">
|
<li v-for="item in info.items" :key="item.label">
|
||||||
{{ item.label }} {{ item.value }}
|
{{ item.label }} {{ item.value | currency }}
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@ -34,6 +34,11 @@ export default {
|
|||||||
default: () => ({ x: 0, y: 0 }),
|
default: () => ({ x: 0, y: 0 }),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
filters: {
|
||||||
|
currency(value) {
|
||||||
|
return value.toLocaleString();
|
||||||
|
},
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
|
@ -49,6 +49,21 @@ import FtoChart from "./dashboard/charts/Fto.vue";
|
|||||||
import ChipInvestChart from "./dashboard/charts/ChipInvest.vue";
|
import ChipInvestChart from "./dashboard/charts/ChipInvest.vue";
|
||||||
import BipvChart from "./dashboard/charts/Bipv.vue";
|
import BipvChart from "./dashboard/charts/Bipv.vue";
|
||||||
|
|
||||||
|
const LOCATIONS = [
|
||||||
|
// 佳木斯
|
||||||
|
{ x: 67, y: 20 },
|
||||||
|
// 成都
|
||||||
|
{ x: 46, y: 56 },
|
||||||
|
// 蚌埠1
|
||||||
|
{ x: 60, y: 52 },
|
||||||
|
// 蚌埠2
|
||||||
|
{ x: 61, y: 53 },
|
||||||
|
// 江西 瑞昌
|
||||||
|
{ x: 60, y: 58 },
|
||||||
|
// 湖南 株洲
|
||||||
|
{ x: 56, y: 60 },
|
||||||
|
];
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Index",
|
name: "Index",
|
||||||
components: {
|
components: {
|
||||||
@ -81,26 +96,13 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initPins() {
|
initPins() {
|
||||||
[
|
LOCATIONS.map((loc) => {
|
||||||
// 佳木斯
|
|
||||||
{ x: 67, y: 20 },
|
|
||||||
// 成都
|
|
||||||
{ x: 46, y: 56 },
|
|
||||||
// 蚌埠1
|
|
||||||
{ x: 60, y: 52 },
|
|
||||||
// 蚌埠2
|
|
||||||
{ x: 61, y: 53 },
|
|
||||||
// 江西 瑞昌
|
|
||||||
{ x: 60, y: 58 },
|
|
||||||
// 湖南 株洲
|
|
||||||
{ x: 56, y: 60 },
|
|
||||||
].map((loc) => {
|
|
||||||
const pin = document.createElement("div");
|
const pin = document.createElement("div");
|
||||||
pin.className = "pin";
|
pin.className = "pin";
|
||||||
pin.style.left = `${loc.x}%`;
|
pin.style.left = `${loc.x}%`;
|
||||||
pin.style.top = `${loc.y}%`;
|
pin.style.top = `${loc.y}%`;
|
||||||
pin.addEventListener("mouseenter", () => {
|
pin.addEventListener("mouseenter", () => {
|
||||||
this.showHint({ x: loc.x, y: loc.y });
|
this.showHint(loc);
|
||||||
});
|
});
|
||||||
pin.addEventListener("mouseleave", () => {
|
pin.addEventListener("mouseleave", () => {
|
||||||
this.closeHint();
|
this.closeHint();
|
||||||
@ -114,21 +116,32 @@ export default {
|
|||||||
},
|
},
|
||||||
showHint(position) {
|
showHint(position) {
|
||||||
this.hintPosition = position;
|
this.hintPosition = position;
|
||||||
this.info = {
|
const templateInfo = {
|
||||||
// companyName: "凯盛光伏材料有限公司(本部)",
|
companyName: "",
|
||||||
companyName: "蚌埠兴科玻璃有限公司",
|
|
||||||
// companyName: "成都中建材光电材料有限公司",
|
|
||||||
// companyName: "瑞昌中建材光电材料有限公司",
|
|
||||||
// companyName: "邯郸中建材光电材料有限公司",
|
|
||||||
// companyName: "中建材(株洲)光电材料有限公司",
|
|
||||||
// companyName: "佳木斯中建材光电材料有限公司",
|
|
||||||
items: [
|
items: [
|
||||||
{ label: "FTO投入", value: "1,200" },
|
{ label: "FTO投入", value: Math.floor(Math.random() * 1000000) },
|
||||||
{ label: "芯片产出", value: "2,200" },
|
{ label: "芯片产出", value: Math.floor(Math.random() * 10000000) },
|
||||||
{ label: "芯片投入", value: "1,300" },
|
{ label: "芯片投入", value: Math.floor(Math.random() * 1000000) },
|
||||||
{ label: "标准组件产出", value: "1,100" },
|
{ label: "标准组件产出", value: Math.floor(Math.random() * 1000000) },
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (position === LOCATIONS[0]) {
|
||||||
|
templateInfo.companyName = "佳木斯中建材光电材料有限公司";
|
||||||
|
} else if (position === LOCATIONS[1]) {
|
||||||
|
templateInfo.companyName = "成都中建材光电材料有限公司";
|
||||||
|
} else if (position === LOCATIONS[2]) {
|
||||||
|
templateInfo.companyName = "蚌埠兴科玻璃有限公司";
|
||||||
|
} else if (position === LOCATIONS[3]) {
|
||||||
|
templateInfo.companyName = "凯盛光伏材料有限公司(本部)";
|
||||||
|
} else if (position === LOCATIONS[4]) {
|
||||||
|
templateInfo.companyName = "瑞昌中建材光电材料有限公司";
|
||||||
|
} else if (position === LOCATIONS[5]) {
|
||||||
|
templateInfo.companyName = "中建材(株洲)光电材料有限公司";
|
||||||
|
}
|
||||||
|
|
||||||
|
this.info = templateInfo;
|
||||||
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user