Compare commits
3 Commits
master
...
3857489cbf
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3857489cbf | ||
|
|
1e734579df | ||
|
|
15b6281347 |
BIN
src/assets/YouSheBiaoTiHei-2.ttf
Normal file
BIN
src/assets/bgearth.png
Normal file
|
After Width: | Height: | Size: 7.6 MiB |
BIN
src/assets/images/homeindex/bipv-icon.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
src/assets/images/homeindex/chip-icon-2.png
Normal file
|
After Width: | Height: | Size: 723 B |
BIN
src/assets/images/homeindex/chip-icon.png
Normal file
|
After Width: | Height: | Size: 609 B |
BIN
src/assets/images/homeindex/exit-fullscreen.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
src/assets/images/homeindex/fto-icon.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
src/assets/images/homeindex/fullscreen.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
src/assets/images/homeindex/header-bg.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
src/assets/images/homeindex/std-icon.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
src/assets/pinicon.png
Normal file
|
After Width: | Height: | Size: 4.6 KiB |
105
src/main.js
@@ -1,68 +1,79 @@
|
||||
import Vue from 'vue'
|
||||
import Element from 'element-ui'
|
||||
import Vue from "vue";
|
||||
import Element from "element-ui";
|
||||
|
||||
// 修改如下样式文件,覆盖样式,或者新增样式文件
|
||||
import './assets/styles/element-variables.scss'
|
||||
import '@/assets/styles/index.scss' // global css
|
||||
import '@/assets/styles/ruoyi.scss' // ruoyi css
|
||||
import "./assets/styles/element-variables.scss";
|
||||
import "@/assets/styles/index.scss"; // global css
|
||||
import "@/assets/styles/ruoyi.scss"; // ruoyi css
|
||||
|
||||
import App from './App'
|
||||
import store from './store'
|
||||
import router from './router'
|
||||
import directive from './directive' // directive
|
||||
import plugins from './plugins' // plugins
|
||||
import App from "./App";
|
||||
import store from "./store";
|
||||
import router from "./router";
|
||||
import directive from "./directive"; // directive
|
||||
import plugins from "./plugins"; // plugins
|
||||
|
||||
import './assets/icons' // icon
|
||||
import './permission' // permission control
|
||||
import "./assets/icons"; // icon
|
||||
import "./permission"; // permission control
|
||||
import { getDicts } from "@/api/system/dict/data";
|
||||
import { parseTime, resetForm, handleTree, addBeginAndEndTime, divide } from "@/utils/ruoyi";
|
||||
import {
|
||||
parseTime,
|
||||
resetForm,
|
||||
handleTree,
|
||||
addBeginAndEndTime,
|
||||
divide,
|
||||
} from "@/utils/ruoyi";
|
||||
import Pagination from "@/components/Pagination";
|
||||
// 自定义表格工具扩展
|
||||
import RightToolbar from "@/components/RightToolbar"
|
||||
import RightToolbar from "@/components/RightToolbar";
|
||||
// 代码高亮插件
|
||||
// import hljs from 'highlight.js'
|
||||
// import 'highlight.js/styles/github-gist.css'
|
||||
import { DICT_TYPE, getDictDataLabel, getDictDatas, getDictDatas2 } from "@/utils/dict";
|
||||
import {
|
||||
DICT_TYPE,
|
||||
getDictDataLabel,
|
||||
getDictDatas,
|
||||
getDictDatas2,
|
||||
} from "@/utils/dict";
|
||||
|
||||
import './theme/index.css'; // 自定义主题包 - code-brick-zj
|
||||
import "./theme/index.css"; // 自定义主题包 - code-brick-zj
|
||||
|
||||
// 全局方法挂载
|
||||
Vue.prototype.getDicts = getDicts
|
||||
Vue.prototype.parseTime = parseTime
|
||||
Vue.prototype.resetForm = resetForm
|
||||
Vue.prototype.getDictDatas = getDictDatas
|
||||
Vue.prototype.getDictDatas2 = getDictDatas2
|
||||
Vue.prototype.getDictDataLabel = getDictDataLabel
|
||||
Vue.prototype.DICT_TYPE = DICT_TYPE
|
||||
Vue.prototype.handleTree = handleTree
|
||||
Vue.prototype.addBeginAndEndTime = addBeginAndEndTime
|
||||
Vue.prototype.divide = divide
|
||||
Vue.prototype.getDicts = getDicts;
|
||||
Vue.prototype.parseTime = parseTime;
|
||||
Vue.prototype.resetForm = resetForm;
|
||||
Vue.prototype.getDictDatas = getDictDatas;
|
||||
Vue.prototype.getDictDatas2 = getDictDatas2;
|
||||
Vue.prototype.getDictDataLabel = getDictDataLabel;
|
||||
Vue.prototype.DICT_TYPE = DICT_TYPE;
|
||||
Vue.prototype.handleTree = handleTree;
|
||||
Vue.prototype.addBeginAndEndTime = addBeginAndEndTime;
|
||||
Vue.prototype.divide = divide;
|
||||
|
||||
// 全局组件挂载
|
||||
Vue.component('DictTag', DictTag)
|
||||
Vue.component('Pagination', Pagination)
|
||||
Vue.component('RightToolbar', RightToolbar)
|
||||
Vue.component("DictTag", DictTag);
|
||||
Vue.component("Pagination", Pagination);
|
||||
Vue.component("RightToolbar", RightToolbar);
|
||||
// 字典标签组件
|
||||
import DictTag from '@/components/DictTag'
|
||||
import DictTag from "@/components/DictTag";
|
||||
// 头部标签插件
|
||||
import VueMeta from 'vue-meta'
|
||||
import VueMeta from "vue-meta";
|
||||
|
||||
Vue.use(directive)
|
||||
Vue.use(plugins)
|
||||
Vue.use(VueMeta)
|
||||
Vue.use(directive);
|
||||
Vue.use(plugins);
|
||||
Vue.use(VueMeta);
|
||||
|
||||
// Form Generator 组件需要使用到 tinymce
|
||||
import Tinymce from '@/components/tinymce/index.vue'
|
||||
Vue.component('tinymce', Tinymce)
|
||||
import '@/assets/icons'
|
||||
import request from "@/utils/request"
|
||||
console.log(request)
|
||||
Vue.prototype.$axios = request
|
||||
import '@/styles/index.scss'
|
||||
import Tinymce from "@/components/tinymce/index.vue";
|
||||
Vue.component("tinymce", Tinymce);
|
||||
import "@/assets/icons";
|
||||
import request from "@/utils/request";
|
||||
console.log(request);
|
||||
Vue.prototype.$axios = request;
|
||||
import "@/styles/index.scss";
|
||||
|
||||
// 默认点击背景不关闭弹窗
|
||||
import ElementUI from 'element-ui'
|
||||
ElementUI.Dialog.props.closeOnClickModal.default = false
|
||||
import ElementUI from "element-ui";
|
||||
ElementUI.Dialog.props.closeOnClickModal.default = false;
|
||||
|
||||
/**
|
||||
* If you don't want to use mock-server
|
||||
@@ -77,11 +88,11 @@ Vue.use(Element, {
|
||||
size: localStorage.getItem("size") || "medium", // set element-ui default size
|
||||
});
|
||||
|
||||
Vue.config.productionTip = false
|
||||
Vue.config.productionTip = false;
|
||||
|
||||
new Vue({
|
||||
el: '#app',
|
||||
el: "#app",
|
||||
router,
|
||||
store,
|
||||
render: h => h(App)
|
||||
})
|
||||
render: (h) => h(App),
|
||||
});
|
||||
|
||||
124
src/views/dashboard/components/CompanyInfo.vue
Normal file
@@ -0,0 +1,124 @@
|
||||
<!--
|
||||
filename: CompanyInfo.vue
|
||||
author: liubin
|
||||
date: 2024-04-08 15:27:04
|
||||
description:
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div class="company-info" :style="styles">
|
||||
<div class="corner bl"></div>
|
||||
<div class="corner br"></div>
|
||||
<h2>{{ info.companyName }}</h2>
|
||||
<ul>
|
||||
<li v-for="item in info.items" :key="item.label">
|
||||
{{ item.label }} {{ item.value }}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "CompanyInfo",
|
||||
components: {},
|
||||
props: {
|
||||
info: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: () => ({}),
|
||||
},
|
||||
position: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: () => ({ x: 0, y: 0 }),
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
computed: {
|
||||
styles() {
|
||||
return {
|
||||
left: `${this.position.x}%`,
|
||||
top: `${this.position.y}%`,
|
||||
};
|
||||
},
|
||||
},
|
||||
methods: {},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@font-face {
|
||||
font-family: 优设标题黑;
|
||||
src: url(../../../assets/YouSheBiaoTiHei-2.ttf);
|
||||
}
|
||||
|
||||
.company-info {
|
||||
color: #fff;
|
||||
background: #4443;
|
||||
position: absolute;
|
||||
z-index: 9999;
|
||||
// padding: 14px;
|
||||
padding: 0.745vw;
|
||||
backdrop-filter: blur(2px);
|
||||
border-radius: 4px;
|
||||
transform: translate(-50%, -100%);
|
||||
box-shadow: inset 0 0 12px 2px #fff3;
|
||||
// 在这里设置一个总的字体大小 不失为一个好的选择
|
||||
font-size: 1vw;
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin: 6px 0;
|
||||
font-family: 优设标题黑;
|
||||
color: #fff;
|
||||
// font-size: 24px;
|
||||
font-size: 1.276em;
|
||||
}
|
||||
|
||||
ul,
|
||||
li {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
ul {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
li {
|
||||
font-size: 0.851em;
|
||||
}
|
||||
|
||||
.corner {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
// width: 12px;
|
||||
// height: 12px;
|
||||
width: 0.639vw;
|
||||
height: 0.639vw;
|
||||
border-style: solid;
|
||||
border-color: transparent;
|
||||
}
|
||||
|
||||
.bl {
|
||||
left: 0;
|
||||
border-left: 0.1596vw solid #ffa600;
|
||||
border-bottom: 0.1596vw solid #ffa600;
|
||||
// border-left: 3px solid #ffa600;
|
||||
// border-bottom: 3px solid #ffa600;
|
||||
}
|
||||
|
||||
.br {
|
||||
right: 0;
|
||||
// border-right: 3px solid #ffa600;
|
||||
// border-bottom: 3px solid #ffa600;
|
||||
border-right: 0.1596vw solid #ffa600;
|
||||
border-bottom: 0.1596vw solid #ffa600;
|
||||
}
|
||||
</style>
|
||||
163
src/views/dashboard/components/Container.vue
Normal file
@@ -0,0 +1,163 @@
|
||||
<!--
|
||||
filename: Container.vue
|
||||
author: liubin
|
||||
date: 2024-04-09 10:44:09
|
||||
description:
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div class="dashboard-container">
|
||||
<!-- decoration -->
|
||||
<div class="corner tl"></div>
|
||||
<div class="corner tr"></div>
|
||||
<div v-if="side == 'left'" class="corner bl"></div>
|
||||
<div v-if="side == 'right'" class="corner br"></div>
|
||||
<!-- content -->
|
||||
<div
|
||||
class="container-head"
|
||||
:class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']"
|
||||
>
|
||||
<Icon :icon="icon"></Icon>
|
||||
<h2 class="container-title">{{ title }}</h2>
|
||||
</div>
|
||||
<div
|
||||
class="container-body"
|
||||
:class="[
|
||||
side == 'left' ? 'body-gradient-to-right' : 'body-gradient-to-left',
|
||||
]"
|
||||
></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ContainerIconVue from "./ContainerIcon.vue";
|
||||
export default {
|
||||
name: "DashboardContainer",
|
||||
components: {
|
||||
Icon: ContainerIconVue,
|
||||
},
|
||||
props: {
|
||||
side: {
|
||||
type: String,
|
||||
default: "left",
|
||||
},
|
||||
icon: {
|
||||
type: String,
|
||||
default: "cube",
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: "Default Title",
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
computed: {},
|
||||
methods: {},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.dashboard-container {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
|
||||
.container-head {
|
||||
// height: 40px;
|
||||
height: 3.8vh;
|
||||
padding: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
|
||||
.container-title {
|
||||
font-size: 1.18vw;
|
||||
line-height: 1.39vw;
|
||||
font-weight: normal;
|
||||
letter-spacing: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
.container-body {
|
||||
padding: 8px;
|
||||
display: flex;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.corner {
|
||||
z-index: 1;
|
||||
position: absolute;
|
||||
// width: 16px;
|
||||
// height: 16px;
|
||||
width: 0.95vw;
|
||||
height: 0.95vw;
|
||||
}
|
||||
|
||||
.corner.tl {
|
||||
border-top: 2px solid #0175dc;
|
||||
border-left: 2px solid #0175dc;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.corner.tr {
|
||||
top: 0;
|
||||
right: 0;
|
||||
border-top: 2px solid #0175dc;
|
||||
border-right: 2px solid #0175dc;
|
||||
}
|
||||
|
||||
.corner.bl {
|
||||
// width: 20px;
|
||||
// height: 20px;
|
||||
width: 1.064vw;
|
||||
height: 1.064vw;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
// border-left: 10px solid #0175dc;
|
||||
// border-bottom: 10px solid #0175dc;
|
||||
// border-top: 10px solid transparent;
|
||||
// border-right: 10px solid transparent;
|
||||
border-left: 0.532vw solid #0175dc;
|
||||
border-bottom: 0.532vw solid #0175dc;
|
||||
border-top: 0.532vw solid transparent;
|
||||
border-right: 0.532vw solid transparent;
|
||||
}
|
||||
|
||||
.corner.br {
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
// width: 20px;
|
||||
// height: 20px;
|
||||
width: 1.064vw;
|
||||
height: 1.064vw;
|
||||
// border-left: 10px solid transparent;
|
||||
// border-bottom: 10px solid #0175dc;
|
||||
// border-top: 10px solid transparent;
|
||||
// border-right: 10px solid #0175dc;
|
||||
border-left: 0.532vw solid transparent;
|
||||
border-bottom: 0.532vw solid #0175dc;
|
||||
border-top: 0.532vw solid transparent;
|
||||
border-right: 0.532vw solid #0175dc;
|
||||
}
|
||||
|
||||
.gradient-to-right {
|
||||
background: linear-gradient(to right, #0c3f68cc, transparent);
|
||||
}
|
||||
|
||||
.gradient-to-left {
|
||||
background: linear-gradient(to left, #0c3f68cc, transparent);
|
||||
}
|
||||
|
||||
.body-gradient-to-right {
|
||||
background: linear-gradient(to right, #0003, transparent);
|
||||
}
|
||||
|
||||
.body-gradient-to-left {
|
||||
background: linear-gradient(to left, #0003, transparent);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
33
src/views/dashboard/components/ContainerIcon.vue
Normal file
@@ -0,0 +1,33 @@
|
||||
<!--
|
||||
filename: ContainerIcon.vue
|
||||
author: liubin
|
||||
date: 2024-04-09 16:41:36
|
||||
description:
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div class="container-icon"></div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "ContainerIcon",
|
||||
components: {},
|
||||
props: {},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
computed: {},
|
||||
methods: {},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.container-icon {
|
||||
// width: 32px;
|
||||
// height: 32px;
|
||||
width: 1.701vw;
|
||||
height: 1.701vw;
|
||||
background: #ccc2;
|
||||
}
|
||||
</style>
|
||||
66
src/views/dashboard/components/Header.vue
Normal file
@@ -0,0 +1,66 @@
|
||||
<!--
|
||||
filename: Header.vue
|
||||
author: liubin
|
||||
date: 2024-04-09 09:04:12
|
||||
description:
|
||||
-->
|
||||
|
||||
<template>
|
||||
<header class="dashboard-header">
|
||||
<h1>发电玻璃智能管控平台地图总览</h1>
|
||||
<span class="side left">晴转多云 14℃</span>
|
||||
<span class="side right">23:12|星期一|2023.12.13</span>
|
||||
</header>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "DashboardHeader",
|
||||
components: {},
|
||||
props: {},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
computed: {},
|
||||
methods: {},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.dashboard-header {
|
||||
height: 8vh;
|
||||
background: url(../../../assets/images/homeindex/header-bg.png) no-repeat 0 0 /
|
||||
100% 100%;
|
||||
position: relative;
|
||||
display: grid;
|
||||
place-content: center;
|
||||
}
|
||||
|
||||
h1 {
|
||||
// font-size: 32px;
|
||||
font-size: 1.65vw;
|
||||
// line-height: 45px;
|
||||
line-height: 1.25;
|
||||
letter-spacing: 0.32vw;
|
||||
user-select: none;
|
||||
text-shadow: 0 4px 0 rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.side {
|
||||
position: absolute;
|
||||
font-size: 1.18vw;
|
||||
line-height: 24px;
|
||||
letter-spacing: 2px;
|
||||
color: #69b4ff;
|
||||
}
|
||||
|
||||
.left {
|
||||
left: 22vw;
|
||||
top: 4.65vh;
|
||||
}
|
||||
|
||||
.right {
|
||||
right: 15vw;
|
||||
top: 4.65vh;
|
||||
}
|
||||
</style>
|
||||
@@ -1,98 +1,184 @@
|
||||
<template>
|
||||
<div class="dashboard-editor-container">
|
||||
<!-- 首页http://localhost:81/index 数据展示 -->
|
||||
<panel-group @handleSetLineChartData="handleSetLineChartData" />
|
||||
|
||||
<el-row style="background:#fff;padding:16px 16px 0;margin-bottom:32px;">
|
||||
<line-chart :chart-data="lineChartData" />
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="32">
|
||||
<el-col :xs="24" :sm="24" :lg="8">
|
||||
<div class="chart-wrapper">
|
||||
<raddar-chart />
|
||||
<div class="dashboard-factory-all">
|
||||
<div id="map-container">
|
||||
<div class="databoard">
|
||||
<db-header class="db-header"></db-header>
|
||||
<div class="db-body">
|
||||
<div class="db-left">
|
||||
<db-container icon="cube" title="FTO投入"></db-container>
|
||||
<db-container icon="chip" title="芯片投入"></db-container>
|
||||
</div>
|
||||
<div class="db-right">
|
||||
<db-container side="right" icon="chip2" title="芯片产出"></db-container>
|
||||
<db-container side="right" icon="std" title="标准组件产出"></db-container>
|
||||
<db-container side="right" icon="stack" title="BIPV产出"></db-container>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="24" :lg="8">
|
||||
<div class="chart-wrapper">
|
||||
<pie-chart />
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="24" :lg="8">
|
||||
<div class="chart-wrapper">
|
||||
<bar-chart />
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<company-info
|
||||
v-if="visible"
|
||||
:info="info"
|
||||
:position="hintPosition"
|
||||
@close="closeHint"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PanelGroup from './dashboard/PanelGroup'
|
||||
import LineChart from './dashboard/LineChart'
|
||||
import RaddarChart from './dashboard/RaddarChart'
|
||||
import PieChart from './dashboard/PieChart'
|
||||
import BarChart from './dashboard/BarChart'
|
||||
|
||||
const lineChartData = {
|
||||
newVisitis: {
|
||||
expectedData: [100, 120, 161, 134, 105, 160, 165],
|
||||
actualData: [120, 82, 91, 154, 162, 140, 145]
|
||||
},
|
||||
messages: {
|
||||
expectedData: [200, 192, 120, 144, 160, 130, 140],
|
||||
actualData: [180, 160, 151, 106, 145, 150, 130]
|
||||
},
|
||||
purchases: {
|
||||
expectedData: [80, 100, 121, 104, 105, 90, 100],
|
||||
actualData: [120, 90, 100, 138, 142, 130, 130]
|
||||
},
|
||||
shoppings: {
|
||||
expectedData: [130, 140, 141, 142, 145, 150, 160],
|
||||
actualData: [120, 82, 91, 154, 162, 140, 130]
|
||||
}
|
||||
}
|
||||
import store from "@/store";
|
||||
import DashboardHeader from "./dashboard/components/Header.vue";
|
||||
import CompanyInfo from "./dashboard/components/CompanyInfo.vue";
|
||||
import Container from "./dashboard/components/Container.vue";
|
||||
|
||||
export default {
|
||||
name: 'Index',
|
||||
name: "Index",
|
||||
components: {
|
||||
PanelGroup,
|
||||
LineChart,
|
||||
RaddarChart,
|
||||
PieChart,
|
||||
BarChart
|
||||
CompanyInfo,
|
||||
DbHeader: DashboardHeader,
|
||||
DbContainer: Container,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
lineChartData: lineChartData.newVisitis
|
||||
}
|
||||
visible: false,
|
||||
hintPosition: null,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.initPins();
|
||||
|
||||
// 调整 echarts 大小
|
||||
window.onresize = () => {};
|
||||
});
|
||||
},
|
||||
beforeRouteEnter(to, from, next) {
|
||||
next((vm) => {
|
||||
store.dispatch("app/closeSideBar", { withoutAnimation: true });
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
handleSetLineChartData(type) {
|
||||
this.lineChartData = lineChartData[type]
|
||||
}
|
||||
}
|
||||
}
|
||||
initPins() {
|
||||
[
|
||||
// 佳木斯
|
||||
{ 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");
|
||||
pin.className = "pin";
|
||||
pin.style.left = `${loc.x}%`;
|
||||
pin.style.top = `${loc.y}%`;
|
||||
pin.addEventListener("mouseenter", () => {
|
||||
this.showHint({ x: loc.x, y: loc.y });
|
||||
});
|
||||
pin.addEventListener("mouseleave", () => {
|
||||
this.closeHint();
|
||||
});
|
||||
document.getElementById("map-container").appendChild(pin);
|
||||
});
|
||||
},
|
||||
closeHint() {
|
||||
this.visible = false;
|
||||
this.hintPosition = null;
|
||||
},
|
||||
showHint(position) {
|
||||
this.hintPosition = position;
|
||||
this.info = {
|
||||
// companyName: "凯盛光伏材料有限公司(本部)",
|
||||
companyName: "蚌埠兴科玻璃有限公司",
|
||||
// companyName: "成都中建材光电材料有限公司",
|
||||
// companyName: "瑞昌中建材光电材料有限公司",
|
||||
// companyName: "邯郸中建材光电材料有限公司",
|
||||
// companyName: "中建材(株洲)光电材料有限公司",
|
||||
// companyName: "佳木斯中建材光电材料有限公司",
|
||||
items: [
|
||||
{ label: "FTO投入", value: "1,200" },
|
||||
{ label: "芯片产出", value: "2,200" },
|
||||
{ label: "芯片投入", value: "1,300" },
|
||||
{ label: "标准组件产出", value: "1,100" },
|
||||
],
|
||||
};
|
||||
this.$nextTick(() => {
|
||||
this.visible = true;
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.dashboard-editor-container {
|
||||
padding: 32px;
|
||||
background-color: rgb(240, 242, 245);
|
||||
position: relative;
|
||||
|
||||
.chart-wrapper {
|
||||
background: #fff;
|
||||
padding: 16px 16px 0;
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
.dashboard-factory-all {
|
||||
background: #151516;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 54px;
|
||||
height: 100vh;
|
||||
width: calc(100vw - 54px);
|
||||
z-index: 1000;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
@media (max-width:1024px) {
|
||||
.chart-wrapper {
|
||||
padding: 8px;
|
||||
#map-container {
|
||||
height: 100%;
|
||||
background: url(../assets/bgearth.png) no-repeat 0 0 / 100% 100%;
|
||||
position: relative;
|
||||
|
||||
.databoard {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #15151633;
|
||||
z-index: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.db-body {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.db-left,
|
||||
.db-right {
|
||||
// width: 420px;
|
||||
width: 24vw;
|
||||
padding: 20px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 20px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<style>
|
||||
.pin {
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
z-index: 9998;
|
||||
width: 1.702vw;
|
||||
height: 1.702vw;
|
||||
/*
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
*/
|
||||
background: url(../assets/pinicon.png) no-repeat 0 0 / 100% 100%;
|
||||
transition: transform 0.1s linear;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.pin:hover {
|
||||
transform: scale(1.2);
|
||||
}
|
||||
</style>
|
||||
|
||||