|
@@ -0,0 +1,241 @@
|
|
|
|
|
+<template>
|
|
|
|
|
+ <div id="index" ref="appRef">
|
|
|
|
|
+ <div class="bg">
|
|
|
|
|
+ <dv-loading v-if="loading">Loading...</dv-loading>
|
|
|
|
|
+ <div v-else class="host-body">
|
|
|
|
|
+ <div class="d-flex jc-center">
|
|
|
|
|
+ <dv-decoration-10 class="dv-dec-10" />
|
|
|
|
|
+ <div class="d-flex jc-center">
|
|
|
|
|
+ <dv-decoration-8 class="dv-dec-8" :color="decorationColor" />
|
|
|
|
|
+ <div class="title">
|
|
|
|
|
+ <span class="title-text">Emdoor可视化平台</span>
|
|
|
|
|
+ <dv-decoration-6
|
|
|
|
|
+ class="dv-dec-6"
|
|
|
|
|
+ :reverse="true"
|
|
|
|
|
+ :color="['#50e3c2', '#67a1e5']"
|
|
|
|
|
+ />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <dv-decoration-8
|
|
|
|
|
+ class="dv-dec-8"
|
|
|
|
|
+ :reverse="true"
|
|
|
|
|
+ :color="decorationColor"
|
|
|
|
|
+ />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <dv-decoration-10 class="dv-dec-10-s" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 第二行 -->
|
|
|
|
|
+ <div class="d-flex jc-between px-2">
|
|
|
|
|
+ <div class="d-flex aside-width">
|
|
|
|
|
+ <div class="react-left ml-4 react-l-s bg-color-blue">
|
|
|
|
|
+ <span class="react-left"></span>
|
|
|
|
|
+ <span class="text fw-b" style="font-size:24px;">次元之造智能工厂</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="react-left ml-3">
|
|
|
|
|
+ <span class="text">生产实况分析</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="d-flex aside-width">
|
|
|
|
|
+ <div class="react-right bg-color-r mr-3">
|
|
|
|
|
+ <span class="text" @click="fullScreen" ref="fullScreen">全屏</span>
|
|
|
|
|
+ <span class="text" @click="exitFullScreen" ref="exitFullScreen" style="display: none">退出全屏</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="react-right mr-4 react-l-s" style="width: 900px">
|
|
|
|
|
+ <span class="react-after"></span>
|
|
|
|
|
+ <el-dropdown class="dropdown">
|
|
|
|
|
+ <span class="el-dropdown-link" ref="echarType">
|
|
|
|
|
+ 仓库看板<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ <el-dropdown-menu slot="dropdown">
|
|
|
|
|
+ <el-dropdown-item class="dropdownitem"><router-link to="prodline">产线看板</router-link></el-dropdown-item>
|
|
|
|
|
+ <el-dropdown-item class="dropdownitem"><router-link to="shop">车间看板</router-link></el-dropdown-item>
|
|
|
|
|
+ <el-dropdown-item class="dropdownitem"><router-link to="quality">品质看板</router-link></el-dropdown-item>
|
|
|
|
|
+<!-- <el-dropdown-item class="dropdownitem"><router-link to="device">设备看板</router-link></el-dropdown-item>-->
|
|
|
|
|
+ </el-dropdown-menu>
|
|
|
|
|
+ </el-dropdown>
|
|
|
|
|
+
|
|
|
|
|
+<!-- <el-select v-model="factory" class="dropdown" @change ="handleBlur" style="width:80px">
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="item in factoryoptions"
|
|
|
|
|
+ :key="item.value"
|
|
|
|
|
+ :label="item.label"
|
|
|
|
|
+ :value="item.value"
|
|
|
|
|
+ ></el-option>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+
|
|
|
|
|
+ <el-select v-model="ulcode" class="dropdown" @change ="handleBlur2" style="width: 150px">
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="item in uldata"
|
|
|
|
|
+ :key="item.UL_CODE"
|
|
|
|
|
+ :label="item.UL_NAME"
|
|
|
|
|
+ :value="item.UL_CODE"
|
|
|
|
|
+ ></el-option>
|
|
|
|
|
+ </el-select>-->
|
|
|
|
|
+
|
|
|
|
|
+ <span class="text"> </span>
|
|
|
|
|
+ <span class="text">{{ dateYear }} {{ dateWeek }} {{ dateDay }}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="body-box">
|
|
|
|
|
+ <!-- 上面 -->
|
|
|
|
|
+ <div class="content-box">
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <dv-border-box-12>
|
|
|
|
|
+ <up1 />
|
|
|
|
|
+ </dv-border-box-12>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+</template>
|
|
|
|
|
+
|
|
|
|
|
+<script>
|
|
|
|
|
+import drawMixin from "../../utils/drawMixin";
|
|
|
|
|
+import common from '../../utils/common';
|
|
|
|
|
+import {formatTime} from '../../utils/index.js'
|
|
|
|
|
+import up1 from './up1'
|
|
|
|
|
+import {mapMutations, mapState} from "vuex"
|
|
|
|
|
+
|
|
|
|
|
+export default {
|
|
|
|
|
+ mixins: [ drawMixin,common ],
|
|
|
|
|
+ computed: {
|
|
|
|
|
+ ...mapState(['user','factoryoptions','factory']),
|
|
|
|
|
+ },
|
|
|
|
|
+ data() {
|
|
|
|
|
+ return {
|
|
|
|
|
+ timing: null,
|
|
|
|
|
+ timing2: null,
|
|
|
|
|
+ timing3: null,
|
|
|
|
|
+ loading: true,
|
|
|
|
|
+ dateDay: null,
|
|
|
|
|
+ dateYear: null,
|
|
|
|
|
+ dateWeek: null,
|
|
|
|
|
+ weekday: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
|
|
|
|
|
+ decorationColor: ['#568aea', '#000000'],
|
|
|
|
|
+ ulcode:'',
|
|
|
|
|
+ uldata:[]
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ components: {
|
|
|
|
|
+ up1
|
|
|
|
|
+ },
|
|
|
|
|
+ created() {
|
|
|
|
|
+ // this.getuldata();
|
|
|
|
|
+ },
|
|
|
|
|
+ mounted() {
|
|
|
|
|
+ this.timeFn()
|
|
|
|
|
+ this.cancelLoading()
|
|
|
|
|
+ },
|
|
|
|
|
+ beforeDestroy () {
|
|
|
|
|
+ clearInterval(this.timing);
|
|
|
|
|
+ clearInterval(this.timing2);
|
|
|
|
|
+ },
|
|
|
|
|
+ methods: {
|
|
|
|
|
+ ...mapMutations(['setFactory']),
|
|
|
|
|
+ timeFn() {
|
|
|
|
|
+ this.timing = setInterval(() => {
|
|
|
|
|
+ this.dateDay = formatTime(new Date(), 'HH: mm: ss')
|
|
|
|
|
+ this.dateYear = formatTime(new Date(), 'yyyy-MM-dd')
|
|
|
|
|
+ this.dateWeek = this.weekday[new Date().getDay()]
|
|
|
|
|
+ }, 1000);
|
|
|
|
|
+ //定时获取厂区,大线
|
|
|
|
|
+ /*this.timing2 = setInterval(() => {
|
|
|
|
|
+ this.getFactory();
|
|
|
|
|
+ this.getuldata();
|
|
|
|
|
+ }, 300000);*/ //5分钟一次
|
|
|
|
|
+ /*this.$store.commit('setFactoryOptions',this.factoryoptions);
|
|
|
|
|
+ this.$store.commit('setFactory',this.loginForm.factory);*/
|
|
|
|
|
+ },
|
|
|
|
|
+ cancelLoading() {
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ this.loading = false
|
|
|
|
|
+ }, 1000)
|
|
|
|
|
+ },
|
|
|
|
|
+ handleBlur (val){
|
|
|
|
|
+ this.setFactory(val);
|
|
|
|
|
+ location.reload();
|
|
|
|
|
+ },
|
|
|
|
|
+ handleBlur2 (val){
|
|
|
|
|
+ sessionStorage.setItem('ul_code',val);
|
|
|
|
|
+ this.$cookie.set("ul_code", val, {
|
|
|
|
|
+ expires: 30,
|
|
|
|
|
+ });
|
|
|
|
|
+ location.reload();
|
|
|
|
|
+ },
|
|
|
|
|
+ getuldata (){
|
|
|
|
|
+ this.$http.get("kanban/getUlDataByFactory.action",{
|
|
|
|
|
+ params: {
|
|
|
|
|
+ fa_name: this.factory
|
|
|
|
|
+ }
|
|
|
|
|
+ }).then( (res)=>{
|
|
|
|
|
+ if(res.data.uldata) {
|
|
|
|
|
+ const data = res.data.uldata;
|
|
|
|
|
+ if(this.$cookie.get("ul_code") && data.some(item => item.UL_CODE === this.$cookie.get("ul_code")) ){
|
|
|
|
|
+ sessionStorage.setItem('ul_code', this.$cookie.get("ul_code"));
|
|
|
|
|
+ }else {
|
|
|
|
|
+ sessionStorage.setItem('ul_code', data[0].UL_CODE);
|
|
|
|
|
+ this.$cookie.set("ul_code", data[0].UL_CODE, {
|
|
|
|
|
+ expires: 30,
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ this.uldata = data;
|
|
|
|
|
+ }else{
|
|
|
|
|
+ sessionStorage.setItem('ul_code','');
|
|
|
|
|
+ this.uldata = [];
|
|
|
|
|
+ }
|
|
|
|
|
+ this.ulcode = sessionStorage.getItem("ul_code");
|
|
|
|
|
+ },(result)=>{
|
|
|
|
|
+ console.error(result)
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+</script>
|
|
|
|
|
+
|
|
|
|
|
+<style lang="scss" scoped>
|
|
|
|
|
+@import '../../assets/scss/indexwarehouse.scss';
|
|
|
|
|
+.dropdown{
|
|
|
|
|
+ font-size: 18px;
|
|
|
|
|
+ color: #568aea;
|
|
|
|
|
+ transform: skewX(45deg);
|
|
|
|
|
+ ::v-deep .el-select-dropdown {
|
|
|
|
|
+ /* // 若不将下拉框的背景颜色设置为:transparent,那么做不出来半透明的效果;
|
|
|
|
|
+ // 因为其最终的显示为:下拉框有一个背景颜色且下拉框的字体有一个背景颜色,重叠后的效果展示; */
|
|
|
|
|
+ border: 1px solid #0f1325;
|
|
|
|
|
+ background: #04308D !important;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ ::v-deep .el-input__inner {
|
|
|
|
|
+ background-color: #0f1325;
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ border: 1px solid #0f1325;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .el-select-dropdown__item {
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ background-color: #0f1325;
|
|
|
|
|
+ }
|
|
|
|
|
+ ::v-deep .el-select-dropdown {
|
|
|
|
|
+ background-color: transparent;
|
|
|
|
|
+ border: 1px solid #0f1325;
|
|
|
|
|
+ }
|
|
|
|
|
+ ::v-deep.el-select-dropdown__list {
|
|
|
|
|
+ padding: 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ ::v-deep.el-popper[x-placement^="bottom"] {
|
|
|
|
|
+ margin-top: 0px;
|
|
|
|
|
+ }
|
|
|
|
|
+ ::v-deep.el-popper .popper__arrow,
|
|
|
|
|
+ ::v-deep.el-popper .popper__arrow::after {
|
|
|
|
|
+ display: none;
|
|
|
|
|
+ }
|
|
|
|
|
+ .el-select-dropdown__item:hover {
|
|
|
|
|
+ background-color: rgba(0, 225, 219, 0.690196078431373);
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+</style>
|