|
@@ -1,209 +1,221 @@
|
|
<template>
|
|
<template>
|
|
- <div id="front">
|
|
|
|
- <dv-loading v-if="loading">Loading...</dv-loading>
|
|
|
|
- <div v-else class="host-body bg">
|
|
|
|
- <div class="d-flex jc-center">
|
|
|
|
- <dv-decoration-10 style="width:33.3%;height:.0625rem;" />
|
|
|
|
- <div class="d-flex jc-center">
|
|
|
|
- <dv-decoration-8 :color="['#568aea', '#000000']" style="width:2.5rem;height:.625rem;" />
|
|
|
|
- <div class="title">
|
|
|
|
- <span class="title-text">BCC 生产运行总览</span>
|
|
|
|
- <dv-decoration-6
|
|
|
|
- class="title-bototm"
|
|
|
|
- :reverse="true"
|
|
|
|
- :color="['#50e3c2', '#67a1e5']"
|
|
|
|
- style="width:3.125rem;height:.1rem;"
|
|
|
|
- />
|
|
|
|
- </div>
|
|
|
|
- <dv-decoration-8
|
|
|
|
- :reverse="true"
|
|
|
|
- :color="['#568aea', '#000000']"
|
|
|
|
- style="width:2.5rem;height:.625rem;"
|
|
|
|
- />
|
|
|
|
|
|
+ <div class="app-main" style="background: #11285a">
|
|
|
|
+ <div class="dashboard-editor-container" style="width:100%;height:100%">
|
|
|
|
+ <el-row :gutter="10">
|
|
|
|
+ <el-col :xs="24" :sm="24" :lg="24">
|
|
|
|
+ <div style="text-align: center">
|
|
|
|
+ <div style="color: white;font-size: 25px;cursor:default">开票系统</div>
|
|
|
|
+ </div>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row :gutter="10">
|
|
|
|
+ <el-col :xs="24" :sm="24" :lg="8">
|
|
|
|
+ <div >
|
|
|
|
+ <div class="card-head">
|
|
|
|
+ <span class="card-name">{{ $t('开票分类比例') }}</span>
|
|
</div>
|
|
</div>
|
|
- <dv-decoration-10 style="width:33.3%;height:.0625rem; transform: rotateY(180deg);" />
|
|
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
- <!-- 第二行 -->
|
|
|
|
- <div class="d-flex jc-between px-2">
|
|
|
|
- <div class="d-flex" style="width: 40%">
|
|
|
|
- <div
|
|
|
|
- class="react-right ml-4"
|
|
|
|
- style="width: 3.25rem; text-align: left;background-color: #0f1325;"
|
|
|
|
- @click="changeDashboard(1)"
|
|
|
|
- >
|
|
|
|
- <span class="react-before"></span>
|
|
|
|
- <span class="text"></span>
|
|
|
|
- </div>
|
|
|
|
- <div class="react-right ml-3" style="background-color: #0f1325;" @click="changeDashboard(2)">
|
|
|
|
- <span class="text colorBlue"></span>
|
|
|
|
- </div>
|
|
|
|
- <div class="react-right ml-3" style="background-color: #0f1325;" @click="changeDashboard(3)">
|
|
|
|
- <span class="text colorBlue"></span>
|
|
|
|
- </div>
|
|
|
|
|
|
+ <div class="chart-wrapper">
|
|
|
|
+ <sort-num-chart :year=this.nyxhChooseYear />
|
|
|
|
+ </div>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :xs="24" :sm="24" :lg="8">
|
|
|
|
+ <div>
|
|
|
|
+ <div class="card-head">
|
|
|
|
+ <span class="card-name">{{ $t('开票数量比例') }}</span>
|
|
</div>
|
|
</div>
|
|
- <div style="width: 40%" class="d-flex">
|
|
|
|
- <div class="react-left bg-color-blue mr-3">
|
|
|
|
- <span class="text fw-b">北京时间:</span>
|
|
|
|
- </div>
|
|
|
|
- <div
|
|
|
|
- class="react-left mr-4"
|
|
|
|
- style="width: 6.25rem; background-color: #0f1325; text-align: right;"
|
|
|
|
- >
|
|
|
|
- <span class="react-after"></span>
|
|
|
|
- <span class="text">{{dateYear}} {{dateWeek}} {{dateDay}}</span>
|
|
|
|
- </div>
|
|
|
|
|
|
+ </div>
|
|
|
|
+ <div class="chart-wrapper">
|
|
|
|
+ <overdue-close-chart :year=this.cnlylChooseYear />
|
|
|
|
+ </div>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :xs="24" :sm="24" :lg="8">
|
|
|
|
+ <div >
|
|
|
|
+ <div class="card-head">
|
|
|
|
+ <span class="card-name">{{ $t('开票关闭率') }}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ <div class="chart-wrapper">
|
|
|
|
+ <danger-close-chart />
|
|
|
|
+ </div>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
|
|
- <div class="body-box" v-if="dashboard === 1">
|
|
|
|
- <div class="three-content-box">
|
|
|
|
- <div>
|
|
|
|
- <material-balance />
|
|
|
|
- </div>
|
|
|
|
- <div>
|
|
|
|
- <chart-right />
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <div class="three-bototm-box">
|
|
|
|
- <dv-border-box-12>
|
|
|
|
- <nap-tank />
|
|
|
|
- </dv-border-box-12>
|
|
|
|
- <dv-border-box-12>
|
|
|
|
- <ethylene-tank />
|
|
|
|
- </dv-border-box-12>
|
|
|
|
- <dv-border-box-12>
|
|
|
|
- <acrylic-tank />
|
|
|
|
- </dv-border-box-12>
|
|
|
|
- <dv-border-box-12>
|
|
|
|
- <product-tank />
|
|
|
|
- </dv-border-box-12>
|
|
|
|
|
|
+ <el-row :gutter="10">
|
|
|
|
+ <el-col :xs="24" :sm="24" :lg="12">
|
|
|
|
+ <div>
|
|
|
|
+ <div class="card-head">
|
|
|
|
+ <span class="card-name">{{ $t('开票数量对比') }}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ <div class="chart-wrapper">
|
|
|
|
+ <danger-status-chart />
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
- <div class="body-box" v-if="dashboard === 2">
|
|
|
|
- <!-- 第三行数据 -->
|
|
|
|
- <div>
|
|
|
|
- <front-two />
|
|
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :xs="24" :sm="24" :lg="12">
|
|
|
|
+ <div>
|
|
|
|
+ <div class="card-head">
|
|
|
|
+ <span class="card-name">{{ $t('开票关闭数') }}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ <div class="chart-wrapper">
|
|
|
|
+ <danger-num-chart />
|
|
|
|
+ </div>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
|
|
- <div class="body-box" v-if="dashboard === 3">
|
|
|
|
- <!-- 第三行数据 -->
|
|
|
|
- <div class="frist-content-box">
|
|
|
|
- <div>
|
|
|
|
- <dv-border-box-12>
|
|
|
|
- <center-right2 />
|
|
|
|
- </dv-border-box-12>
|
|
|
|
- </div>
|
|
|
|
- <div>
|
|
|
|
- <dv-border-box-12>
|
|
|
|
- <center-left2 />
|
|
|
|
- </dv-border-box-12>
|
|
|
|
- </div>
|
|
|
|
- <!-- 中间 -->
|
|
|
|
- <div>
|
|
|
|
- <center-left1 />
|
|
|
|
- </div>
|
|
|
|
- <div>
|
|
|
|
- <dv-border-box-13>
|
|
|
|
- <center-right1 />
|
|
|
|
- </dv-border-box-13>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <!-- 第四行数据 -->
|
|
|
|
- <div class="bototm-box">
|
|
|
|
- <dv-border-box-13>
|
|
|
|
- <bottom-left />
|
|
|
|
- </dv-border-box-13>
|
|
|
|
- <dv-border-box-12>
|
|
|
|
- <bottom-right />
|
|
|
|
- </dv-border-box-12>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
- import centerLeft1 from "./front/centerLeft1";
|
|
|
|
- import centerLeft2 from "./front/centerLeft2";
|
|
|
|
- import centerRight1 from "./front/centerRight1";
|
|
|
|
- import centerRight2 from "./front/centerRight2";
|
|
|
|
- import center from "./front/center";
|
|
|
|
- import bottomLeft from "./front/bottomLeft";
|
|
|
|
- import bottomRight from "./front/bottomRight";
|
|
|
|
- import frontTwo from "./front/frontTwo";
|
|
|
|
- import materialBalance from "./front/materialBalance";
|
|
|
|
- import chartRight from "./front/ChartRight";
|
|
|
|
- import napTank from "./front/napTank";
|
|
|
|
- import ethyleneTank from "./front/ethyleneTank";
|
|
|
|
- import acrylicTank from "./front/acrylicTank";
|
|
|
|
- import productTank from "./front/productTank";
|
|
|
|
- import dayjs from "dayjs";
|
|
|
|
- import '@/common/flexible.js';
|
|
|
|
|
|
+import SortNumChart from "./SortNumChart";
|
|
|
|
+import DangerStatusChart from "./DangerStatusChart";
|
|
|
|
+import DangerNumChart from "./DangerNumChart";
|
|
|
|
+import DangerCloseChart from "./DangerCloseChart";
|
|
|
|
+import OverdueCloseChart from "./OverdueCloseChart";
|
|
|
|
|
|
- export default {
|
|
|
|
- data() {
|
|
|
|
- return {
|
|
|
|
- loading: true,
|
|
|
|
- dashboard: 1,
|
|
|
|
- dateDay: null,
|
|
|
|
- dateYear: null,
|
|
|
|
- dateWeek: null,
|
|
|
|
- weekday: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
|
|
|
|
- timer:null
|
|
|
|
- };
|
|
|
|
|
|
+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]
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+export default {
|
|
|
|
+ name: 'Dangerstatistics',
|
|
|
|
+ components: {
|
|
|
|
+ SortNumChart,
|
|
|
|
+ DangerStatusChart,
|
|
|
|
+ DangerNumChart,
|
|
|
|
+ DangerCloseChart,
|
|
|
|
+ OverdueCloseChart
|
|
|
|
+ },
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ lineChartData: lineChartData.newVisitis,
|
|
|
|
+ heightObj: {
|
|
|
|
+ height: document.body.clientHeight -50 + "px"
|
|
|
|
+ },
|
|
|
|
+ // 获取当前年份
|
|
|
|
+ searchFormField: {
|
|
|
|
+ year: this.getNowTime(),
|
|
|
|
+ },
|
|
|
|
+ yxChooseYear: 0,
|
|
|
|
+ qzftChooseYear: 0,
|
|
|
|
+ nyxhChooseYear: 0,
|
|
|
|
+ cnlylChooseYear: 0,
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ created() {
|
|
|
|
+ this.$i18n.locale = 'zh'
|
|
|
|
+ this.$store.dispatch('app/setLanguage', 'zh')
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ /** 获取当前年份 */
|
|
|
|
+ getNowTime() {
|
|
|
|
+ var now = new Date();
|
|
|
|
+ var year = now.getFullYear(); //得到年份
|
|
|
|
+ var defaultDate = `${year}`;
|
|
|
|
+ defaultDate = `${year}`
|
|
|
|
+ return defaultDate;
|
|
|
|
+ this.$set(this.searchFormField, "year", defaultDate);
|
|
},
|
|
},
|
|
- components: {
|
|
|
|
- centerLeft1,
|
|
|
|
- centerLeft2,
|
|
|
|
- centerRight1,
|
|
|
|
- centerRight2,
|
|
|
|
- center,
|
|
|
|
- bottomLeft,
|
|
|
|
- bottomRight,
|
|
|
|
- frontTwo,
|
|
|
|
- materialBalance,
|
|
|
|
- chartRight,
|
|
|
|
- napTank,
|
|
|
|
- ethyleneTank,
|
|
|
|
- acrylicTank,
|
|
|
|
- productTank
|
|
|
|
|
|
+ handleSetLineChartData(type) {
|
|
|
|
+ this.lineChartData = lineChartData[type]
|
|
},
|
|
},
|
|
- mounted() {
|
|
|
|
- this.cancelLoading();
|
|
|
|
- this.timer = setInterval(()=>{
|
|
|
|
- const date= dayjs(new Date());
|
|
|
|
- this.dateDay = date.format('HH:mm:ss');
|
|
|
|
- this.dateYear = date.format('YYYY年MM月DD日');
|
|
|
|
- this.dateWeek = date.format(this.weekday[date.day()]);
|
|
|
|
- },1000);
|
|
|
|
|
|
+ handleRouter(type){
|
|
|
|
+ this.$router.push({ path: '/production/monthplan', query: { type: type }});
|
|
},
|
|
},
|
|
- beforeDestroy(){
|
|
|
|
- if(this.timer){
|
|
|
|
- clearInterval(this.timer);
|
|
|
|
|
|
+ //变换年份
|
|
|
|
+ chooseOne (index) {
|
|
|
|
+ if (index === 1) {
|
|
|
|
+ this.yxChooseYear = this.searchFormField.year - 2;
|
|
|
|
+ }else if (index === 2) {
|
|
|
|
+ this.qzftChooseYear = this.searchFormField.year - 2;
|
|
|
|
+ }else if (index === 3) {
|
|
|
|
+ this.nyxhChooseYear = this.searchFormField.year - 2;
|
|
|
|
+ }else if (index === 4) {
|
|
|
|
+ this.cnlylChooseYear = this.searchFormField.year - 2;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- methods: {
|
|
|
|
- cancelLoading() {
|
|
|
|
- setTimeout(() => {
|
|
|
|
- this.loading = false;
|
|
|
|
- }, 500);
|
|
|
|
- },
|
|
|
|
- changeDashboard(val) {
|
|
|
|
- if (val === 1) {
|
|
|
|
- this.dashboard = 1
|
|
|
|
- }else if (val === 2) {
|
|
|
|
- this.dashboard = 2
|
|
|
|
- }else if (val === 3) {
|
|
|
|
- this.dashboard = 3
|
|
|
|
- }
|
|
|
|
|
|
+ chooseTwo (index) {
|
|
|
|
+ if (index === 1) {
|
|
|
|
+ this.yxChooseYear = this.searchFormField.year - 1;
|
|
|
|
+ }else if (index === 2) {
|
|
|
|
+ this.qzftChooseYear = this.searchFormField.year - 1;
|
|
|
|
+ }else if (index === 3) {
|
|
|
|
+ this.nyxhChooseYear = this.searchFormField.year - 1;
|
|
|
|
+ }else if (index === 4) {
|
|
|
|
+ this.cnlylChooseYear = this.searchFormField.year - 1;
|
|
}
|
|
}
|
|
- }
|
|
|
|
- };
|
|
|
|
|
|
+ },
|
|
|
|
+ chooseThree (index) {
|
|
|
|
+ if (index === 1) {
|
|
|
|
+ this.yxChooseYear = this.searchFormField.year - 0;
|
|
|
|
+ }else if (index === 2) {
|
|
|
|
+ this.qzftChooseYear = this.searchFormField.year - 0;
|
|
|
|
+ }else if (index === 3) {
|
|
|
|
+ this.nyxhChooseYear = this.searchFormField.year - 0;
|
|
|
|
+ }else if (index === 4) {
|
|
|
|
+ this.cnlylChooseYear = this.searchFormField.year - 0;
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ }
|
|
|
|
+}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
|
+ .dashboard-editor-container {
|
|
|
|
+ padding: 10px;
|
|
|
|
+ background-color: #182e62;
|
|
|
|
+ position: relative;
|
|
|
|
+
|
|
|
|
+ .chart-wrapper {
|
|
|
|
+ background: rgba(253, 245, 245, 0) linear-gradient(to right, #11285a, #1d2d4a) repeat scroll 0% 0%;
|
|
|
|
+ padding: 10px 0 0;
|
|
|
|
+ margin-bottom: 10px;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /deep/.el-dropdown {
|
|
|
|
+ color: #ffffff;
|
|
|
|
+ margin-right: 10px;
|
|
|
|
+ margin-top: 2px;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .card-time {
|
|
|
|
+ float: right;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .card-name {
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ font-size: 12px;
|
|
|
|
+ font-weight:bold;
|
|
|
|
+ color: #ffffff;
|
|
|
|
+ padding: 2px 0 2px 5px;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .card-head {
|
|
|
|
+ background: rgba(253, 245, 245, 0) linear-gradient(to right, #4a7cf9, #628fff) repeat scroll 0% 0%;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @media (max-width:1024px) {
|
|
|
|
+ .chart-wrapper {
|
|
|
|
+ padding: 8px;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
</style>
|
|
</style>
|