From 35de952fddf5bb370e134e9111ba146bb8be78ee Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期三, 13 三月 2024 15:56:57 +0800
Subject: [PATCH] 首页
---
src/api/plan/productionschedul.js | 7
src/views/accounting/jmreport/index.vue | 5
public/img/group-464.png | 0
src/page/wel.vue | 491 +++++++++++++++++++++++++++--------------------------
4 files changed, 257 insertions(+), 246 deletions(-)
diff --git a/public/img/group-464.png b/public/img/group-464.png
new file mode 100644
index 0000000..a08110b
--- /dev/null
+++ b/public/img/group-464.png
Binary files differ
diff --git a/src/api/plan/productionschedul.js b/src/api/plan/productionschedul.js
index 5784b65..4fad468 100644
--- a/src/api/plan/productionschedul.js
+++ b/src/api/plan/productionschedul.js
@@ -60,3 +60,10 @@
data: data
})
}
+
+export function getProductionSchedulReport() {
+ return request({
+ url: '/mes/productionSchedul/getReport',
+ method: 'get',
+ })
+}
diff --git a/src/page/wel.vue b/src/page/wel.vue
index 1e4f91c..d40e4db 100644
--- a/src/page/wel.vue
+++ b/src/page/wel.vue
@@ -1,109 +1,244 @@
<template>
<div class="dashboard-main">
- <!-- <iframe
- src="https://console.huaweicloud.com/dlv/vision/share/?id=0b3b4dd2d19249c89991b8989b76e185&locale=zh-cn®ion=cn-north-1"
- width="100%"
- height="100%"
- style="border: none;"
- id="myiframe"
- >浣犵殑娴忚鍣ㄤ笉鏀寔璇frame鏍囩</iframe
- > -->
- <!-- <el-image :src="url" style="width:100%;height:100%;"></el-image> -->
- <!-- <el-row style="width: 100%; height: 100%;background-color: white;">
- <span>鏆傛湭寮�鍙戙�傘�傘�傘�傘�傘��</span>
- </el-row> -->
+ <div class="body">
+ <el-row>
+ <el-col :span="12">
+ <p class="todo-title"><i class="el-icon-bell"></i><span> 鐢熶骇璋冨害 路 寰呭姙</span></p>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="6">
+ <el-card class="box-card todo-card">
+ <el-collapse v-model="activeName" accordion class="todo-collapse" style="display:none">
+ <el-collapse-item name="1">
+ <template slot="title">
+ <span class="title">浠婃棩寰呭姙</span>
+ <el-badge v-if="todoByDayList.length>0" :value="todoByDayList.length" class="item"></el-badge>
+ </template>
+ <el-table :data="todoByDayList">
+ <el-table-column label="搴忓彿" align="center" type="index" width="50"></el-table-column>
+ <el-table-column prop="product_type" label="浜у搧绫诲瀷" align="center" min-width="50"></el-table-column>
+ <el-table-column prop="total" label="寰呭姙鏁伴噺" align="center" min-width="50"></el-table-column>
+ </el-table>
+ </el-collapse-item>
+ <el-collapse-item name="2">
+ <template slot="title">
+ <span class="title">鏈懆寰呭姙</span>
+ <el-badge v-if="todoByWeekList.length>0" :value="todoByWeekList.length" class="item"></el-badge>
+ </template>
+ <el-table :data="todoByWeekList">
+ <el-table-column label="搴忓彿" align="center" type="index" width="50"></el-table-column>
+ <el-table-column prop="product_type" label="浜у搧绫诲瀷" align="center" min-width="50"></el-table-column>
+ <el-table-column prop="total" label="寰呭姙鏁伴噺" align="center" min-width="50"></el-table-column>
+ </el-table>
+ </el-collapse-item>
+ <el-collapse-item name="3">
+ <template slot="title">
+ <span class="title">鏈湀寰呭姙</span>
+ <el-badge v-if="todoByMonthList.length>0" :value="todoByMonthList.length" class="item"></el-badge>
+ </template>
+ <el-table :data="todoByMonthList">
+ <el-table-column label="搴忓彿" align="center" type="index" width="50"></el-table-column>
+ <el-table-column prop="product_type" label="浜у搧绫诲瀷" align="center" min-width="50"></el-table-column>
+ <el-table-column prop="total" label="寰呭姙鏁伴噺" align="center" min-width="50"></el-table-column>
+ </el-table>
+ </el-collapse-item>
+ <el-collapse-item name="4">
+ <template slot="title">
+ <span class="title" style="color:red;">瓒呮湡</span>
+ <el-badge :value="100" :max="99" class="item"></el-badge>
+ </template>
+
+ </el-collapse-item>
+ </el-collapse>
+ <el-calendar v-model="calendarValue">
+ <template
+ slot="dateCell"
+ slot-scope="{date, data}">
+ <span>
+ {{ data.day.split('-').slice(2)+'' }}
+ </span>
+ <el-badge v-if="data.isSelected" is-dot class="item">
+ </el-badge>
+ </template>
+ </el-calendar>
+ <div class="todo-span"><span>寰呭姙</span></div>
+ <!-- <el-table :data="todoByDayList">
+ <el-table-column label="搴忓彿" align="center" type="index" width="50"></el-table-column>
+ <el-table-column prop="product_type" label="浜у搧绫诲瀷" align="center" min-width="50"></el-table-column>
+ <el-table-column prop="total" label="寰呭姙鏁伴噺" align="center" min-width="50"></el-table-column>
+ </el-table> -->
+ <div class="todo-info" v-for="(item,index) in 10" :key="index">
+ <div class="todo-info-state"></div>
+ </div>
+ </el-card>
+ </el-col>
+ <el-col :span="6">
+ <el-card class="box-card todo-total-card">
+ <div class="todo-total-text">
+ <span>浠婃棩寰呭姙</span>
+ <span v-text="todoByDayList.length"></span>
+ </div>
+ <div class="todo-total-text">
+ <span>鏈懆寰呭姙</span>
+ <span v-text="todoByWeekList.length"></span>
+ </div>
+ <div class="todo-total-text">
+ <span>鏈湀寰呭姙</span>
+ <span v-text="todoByMonthList.length"></span>
+ </div>
+ <div class="todo-total-text">
+ <span>瓒呮湡</span>
+ <span v-text="0"></span>
+ </div>
+ </el-card>
+ </el-col>
+ </el-row>
+ </div>
</div>
</template>
<style scoped="scoped" lang="scss">
.dashboard-main {
width: 100%;
height: 100%;
- padding: 0 0;
+ padding: 10px;
+ margin: 0;
+}
+.body{
+ margin: 5px;
+ padding: 0px 15px;
+ border-radius: 8px;
+ background: linear-gradient( 180deg, #E3E1FD 0%, #F0EFF9 100%);
+}
+.todo-title{
+ width: 487px;
+ height: 20px;
+ font-family: PingFang SC, PingFang SC;
+ font-weight: 700;
+ font-size: 18px;
+ color: #875A7B;
+ line-height: 20px;
+ text-align: left;
+ font-style: normal;
+ text-transform: none;
+}
+.todo-info{
+ width: 90%;
+ margin-left:5%;
+ height: 64px;
+ margin-top: 10px;
+ background: #FFFFFF;
+ border-radius: 8px 8px 8px 8px;
+ border: 1px solid #E8E8E8;
+ .todo-info-state{
+ width:12px;
+ height:64px;
+ background-color: #6ACE00;
+ border-radius: 8px 0px 0px 8px;
+ position: relative;
+ top:0px;
+ }
+}
+.todo-total-card{
+ margin-left: 15px;
+ .todo-total-text{
+ width: 90%;
+ margin-left:5%;
+ margin-bottom:10px;
+ height: 40px;
+ background: linear-gradient( 90deg, #C8C2FF 0%, rgba(200,194,255,0) 100%);
+ span:nth-child(1){
+ width:50%;
+ height:40px;
+ display: inline-block;
+ text-align: center;
+ font-family: PingFang SC, PingFang SC;
+ font-weight: 400;
+ font-size: 14px;
+ color: #0166E2;
+ line-height: 40px;
+ }
+ span:nth-child(2){
+ width:50%;
+ height:40px;
+ display: inline-block;
+ text-align: center;
+ font-family: PingFang SC, PingFang SC;
+ font-weight: 400;
+ font-size: 24px;
+ color: #0166E2;
+ line-height: 40px;
+ }
+ }
+ .todo-total-text:last-child span:nth-child(2){
+ color:red
+ }
+}
+.todo-card{
+ height: 80vh;
+ overflow-y: auto;
+ >>>.el-card__body{
+ padding: 0px 0px 5px
+ }
+ .todo-span{
+ height:17px;
+ padding:0px 20px;
+ }
+ .todo-span::before{
+ content: "";
+ display: inline-block;
+ width:21px;
+ height:17px;
+ background: url("/img/group-464.png") no-repeat;
+ }
+ .todo-span span{
+ height:20px;
+ display: inline-block;
+ position: relative;
+ top: -2px;
+ color: #6D5EEE;
+ }
+}
+.todo-collapse{
+ padding: 0px 20px;
+ .title{
+ font-weight: 700;
+ }
+}
+>>>.el-calendar-table .el-calendar-day {
+ -webkit-box-sizing: border-box;
+ box-sizing: border-box;
+ padding: 8px;
+ height: 32px;
+ line-height: 100%;
+ text-align: center;
+ font-size: 12px;
+ font-family: PingFang SC, PingFang SC;
+ font-weight: 400;
+}
+>>>.el-calendar-table tr td:first-child {
+ border-left: none;
+}
+>>>.el-calendar-table tr:first-child td {
+ border-top: none;
+}
+>>>.el-calendar-table td {
+ border-bottom: none;
+ border-right: none;
+ vertical-align: top;
+ -webkit-transition: background-color 0.2s ease;
+ transition: background-color 0.2s ease;
+}
+>>>.el-calendar-table td.is-selected {
+ background-color: #e3effc;
}
-.col-info-box {
- padding-left: 15px;
- padding-right: 15px;
-}
-
-.info-box {
- display: block;
- min-height: 90px;
- background: #fff;
- width: 100%;
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
- border-radius: 2px;
- margin-bottom: 15px;
-}
-
-.info-box-icon {
- border-top-left-radius: 2px;
- border-top-right-radius: 0;
- border-bottom-right-radius: 0;
- border-bottom-left-radius: 2px;
- display: block;
- float: left;
- height: 90px;
- width: 90px;
- text-align: center;
- font-size: 45px;
- line-height: 90px;
- background: rgba(0, 0, 0, 0.2);
-}
-
-.info-box-content {
- padding: 5px 10px;
- margin-left: 90px;
- line-height: 1.42857143;
- color: #333;
-}
-
-.info-box-text {
- text-transform: uppercase;
- display: block;
- font-size: 14px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
-}
-
-.info-box-number {
- display: block;
- font-weight: bold;
- font-size: 18px;
-}
-
-.bg-aqua {
- background-color: #00c0ef !important;
- color: #fff !important;
-}
-
-.bg-red {
- background-color: #dd4b39 !important;
- color: #fff !important;
-}
-
-.bg-green {
- background-color: #00a65a !important;
- color: #fff !important;
-}
-
-.bg-yellow {
- background-color: #f39c12 !important;
- color: #fff !important;
-}
-
-.line-charts {
- width: 100%;
- background: #fff;
-}
</style>
<script>
import { mapGetters } from 'vuex'
import ECharts from 'vue-echarts'
-import { sysParam } from '@/config/sysParam'
-import { getObj as getSysParam } from '@/api/admin/sys-public-param'
-
+import {dateFormat} from '@/util/date'
+import {getProductionSchedulReport} from '@/api/plan/productionschedul'
export default {
name: 'Wel',
components: {
@@ -111,163 +246,37 @@
},
data() {
return {
- line: {
- title: {
- text: '璁″垝涓庡疄闄呬骇閲忚蛋鍔�',
- left: 'center'
- },
- tooltip: {
- trigger: 'axis'
- },
- grid: {
- left: '3%',
- right: '4%',
- bottom: '3%',
- containLabel: true
- },
- xAxis: {
- type: 'category',
- boundaryGap: false,
- data: ['鍛ㄤ竴', '鍛ㄤ簩', '鍛ㄤ笁', '鍛ㄥ洓', '鍛ㄤ簲', '鍛ㄥ叚', '鍛ㄦ棩']
- },
- yAxis: {
- type: 'value',
- splitLine: { show: false }
- },
- series: [
- {
- name: '璁″垝',
- type: 'line',
- stack: '鎬婚噺',
- data: [120, 132, 101, 134, 90, 230, 210],
- smooth: true,
- symbol: 'none',
- itemStyle: {
- normal: { areaStyle: { type: 'default' }, color: '#85C1E9' }
- }
- },
- {
- name: '瀹為檯',
- type: 'line',
- stack: '鎬婚噺',
- data: [220, 182, 191, 234, 290, 330, 310],
- smooth: true,
- symbol: 'none',
- itemStyle: {
- normal: { areaStyle: { type: 'default' }, color: '#BB8FCE' }
- }
- }
- ]
- },
-
- pie: {
- color: ['#dd4b39', '#13315b', '#36aadb', '#f96e02', '#d2d6de'],
- title: {
- text: '24灏忔椂浜у搧鐢熶骇姣斾緥',
- left: 'center'
- },
- series: [
- {
- type: 'pie',
- radius: ['40%', '55%'],
- avoidLabelOverlap: false,
- label: {
- show: false,
- position: 'center'
- },
- emphasis: {
- label: {
- show: true,
- fontSize: '30',
- fontWeight: 'bold'
- }
- },
- labelLine: {
- show: false
- },
- data: [
- { value: 335, name: '閾滄帓鎶ゅ' },
- { value: 310, name: '鎸℃澘' },
- { value: 234, name: '鍦板垁姊�' },
- { value: 135, name: '搴曟澘瑁呴厤' },
- { value: 1548, name: '鐢电紗鏀灦' }
- ]
- }
- ]
- },
-
- bar: {
- title: {
- text: '24灏忔椂宸ュ簭浜ц兘鎯呭喌',
- left: 'center'
- },
- color: ['#3398DB'],
- grid: {
- left: '3%',
- right: '4%',
- bottom: '30%',
- containLabel: true
- },
- xAxis: [
- {
- type: 'category',
- data: [
- '鍠锋秱',
- '鍐叉姌鐒�-鍠锋秱',
- '鍐叉姌鐒�',
- '澹充綋缁勮',
- '閾滄帓瀹夎',
- '妫�楠�',
- '鎵撳寘'
- ],
- axisTick: {
- alignWithLabel: true
- }
- }
- ],
- yAxis: [
- {
- type: 'value',
- nameTextStyle: {
- fontSize: 6
- },
- splitLine: { show: false }
- }
- ],
- series: [
- {
- name: '鐩存帴璁块棶',
- type: 'bar',
- barWidth: '10%',
- data: [10, 52, 200, 334, 390, 330, 220]
- }
- ]
- },
- fit: 'fill',
- url: ''
+ calendarValue: new Date(),
+ activeName: '1',
+ todoByDayList: [],
+ todoByWeekList: [],
+ todoByMonthList: [],
}
},
computed: {
...mapGetters(['website'])
},
created() {
- this.getSysParam(sysParam.SYSTEM_WEL_CONFIG)
+ this.getProSchedulReport()
+ },
+ watch:{
+ calendarValue(newVal){
+ if(newVal){
+ console.log(dateFormat(newVal,'yyyy-MM-dd'));
+ }
+ }
},
methods: {
- getSysParam(paramKey) {
- this.url = ''
- getSysParam(paramKey).then((response) => {
- var paramVal = response.data.data
- if (response.data.code === 0) {
- if (paramVal != null) {
- this.url = paramVal
- } else {
- this.url = ''
- }
- } else {
- this.url = ''
- }
- })
+ getProSchedulReport(){
+ getProductionSchedulReport().then(res=>{
+ if(res.status===200){
+ this.todoByDayList = res.data.data.todoByDay
+ this.todoByWeekList = res.data.data.todoByWeek
+ this.todoByMonthList = res.data.data.todoByMonth
+ }
+ }).catch(error=>{
+ console.error(error)
+ })
}
}
}
diff --git a/src/views/accounting/jmreport/index.vue b/src/views/accounting/jmreport/index.vue
index 5837437..ec36143 100644
--- a/src/views/accounting/jmreport/index.vue
+++ b/src/views/accounting/jmreport/index.vue
@@ -64,7 +64,6 @@
minWidth: '100',
prop: 'workShop',
label: '杞﹂棿',
- sort: true,
isTrue: true,
isSearch: true,
searchInfoType: 'text',
@@ -73,7 +72,6 @@
minWidth: '100',
prop: 'partName',
label: '鐢熶骇闆朵欢',
- sort: true,
isTrue: true,
isSearch: true,
searchInfoType: 'text',
@@ -82,7 +80,6 @@
minWidth: '100',
prop: 'partNo',
label: '鐢熶骇闆朵欢鍙�',
- sort: true,
isTrue: true,
isSearch: true,
searchInfoType: 'text',
@@ -91,7 +88,6 @@
minWidth: '100',
prop: 'staffName',
label: '鐢熶骇浜哄憳',
- sort: true,
isTrue: true,
isSearch: true,
searchInfoType: 'text',
@@ -109,7 +105,6 @@
minWidth: '100',
prop: 'unit',
label: '鍗曚綅',
- sort: true,
isTrue: true,
isSearch: true,
searchInfoType: 'text',
--
Gitblit v1.9.3