bug
This commit is contained in:
@@ -1,28 +1,56 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2024-04-15 10:49:13
|
||||
* @LastEditTime: 2024-06-07 10:35:48
|
||||
* @LastEditTime: 2024-06-14 11:04:04
|
||||
* @LastEditors: DY
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div style="display: flex; flex-direction: column; min-height: calc(100vh - 96px - 35px)">
|
||||
<div class="app-container" style="margin-top: 8px; padding: 0 16px; height: auto; font-size: 20px; text-align: center;">
|
||||
<p style="margin-bottom: 0">数据概览</p>
|
||||
<div class="view">
|
||||
<div v-for="(item, index) in data" :key="index">
|
||||
<p style="color: rgb(194,128,255)">{{ item }}</p>
|
||||
<p>{{ index }}</p>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="4">
|
||||
<div class="app-container" style="padding: 16px; height: auto; text-align: left; border-radius: 8px;">
|
||||
<!-- <p style="margin-bottom: 0">数据概览</p> -->
|
||||
<div class="view">
|
||||
<div style="padding: 10px 0; width: 100%">
|
||||
<div class="topDiv">
|
||||
<div style="width: 4px; height: 52px; background: #71CC8C; border-radius: 2px;"></div>
|
||||
<div class="centerDiv">
|
||||
<span style="font-size: 30px; line-height: 30px; color: rgba(0,0,0,0.85);">{{ inputNum }}</span>
|
||||
<span style="font-size: 14px; color: rgba(0,0,0,0.85);">在制工单数量</span>
|
||||
</div>
|
||||
<svg-icon icon-class="workProcess" style="width: 26px; height: 26px" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="app-container" style="margin-top: 8px; height: auto;">
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
<div class="app-container" style="padding: 16px; height: auto; text-align: left; border-radius: 8px;">
|
||||
<!-- <p style="margin-bottom: 0">数据概览</p> -->
|
||||
<div class="view">
|
||||
<div style="padding: 10px 0; width: 100%" v-for="(item, index) in factorys" :key="index">
|
||||
<div class="topDiv">
|
||||
<div style="width: 4px; height: 52px; background: #3A79FF; border-radius: 2px;"></div>
|
||||
<div class="centerDiv">
|
||||
<span style="font-size: 30px; line-height: 30px; color: rgba(0,0,0,0.85);">{{ factoryNum[index] }}</span>
|
||||
<span style="font-size: 14px; color: rgba(0,0,0,0.85);">{{item}}</span>
|
||||
</div>
|
||||
<svg-icon icon-class="factoryWorkOrder" style="width: 26px; height: 26px" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- <div class="app-container" style="margin-top: 8px; height: auto;">
|
||||
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
|
||||
</div> -->
|
||||
<div class="app-container" style="margin-top: 8px;flex-grow: 1;">
|
||||
<!-- <search-bar :formConfigs="formConfig2" ref="searchBarForm" style="margin-bottom: 0" /> -->
|
||||
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
|
||||
</div>
|
||||
<div class="app-container" style="margin-top: 8px;flex-grow: 1; height: auto;">
|
||||
<search-bar :formConfigs="formConfig2" ref="searchBarForm" style="margin-bottom: 0" />
|
||||
<base-table :table-props="tableProps" :page="listQuery.pageNo" :limit="listQuery.pageSize"
|
||||
:table-data="tableData">
|
||||
:table-data="tableData" :max-height="tableH">
|
||||
<method-btn v-if="tableBtn.length" slot="handleBtn" label="操作" :width="120" fixed="right"
|
||||
:method-list="tableBtn" @clickBtn="handleClick" />
|
||||
</base-table>
|
||||
@@ -43,6 +71,7 @@ import { getWorkOrderPage, exportExcel, getOverView } from '@/api/produceData/or
|
||||
// import inputTable from './inputTable.vue';
|
||||
import lineChart from './lineChart';
|
||||
import moment from 'moment'
|
||||
import tableHeightMixin from "@/mixins/tableHeightMixin";
|
||||
// import ButtonNav from '@/components/ButtonNav'
|
||||
import basicPage from '@/mixins/basic-page'
|
||||
import AddOrUpdate from './add-or-updata';
|
||||
@@ -53,9 +82,13 @@ import { publicFormatter } from "@/utils/dict";
|
||||
// import * as XLSX from 'xlsx'
|
||||
export default {
|
||||
components: { lineChart, AddOrUpdate },
|
||||
mixins: [basicPage],
|
||||
mixins: [basicPage, tableHeightMixin],
|
||||
data() {
|
||||
return {
|
||||
factorys: ['瑞昌中建材', '邯郸中建材', '株洲中建材', '佳木斯中建材', '成都中建材', '凯盛光伏', '蚌埠兴科'],
|
||||
factoryNum: [0, 0, 0, 0, 0, 0, 0],
|
||||
inputNum: 0,
|
||||
heightNum: 210,
|
||||
factoryList,
|
||||
factoryArray,
|
||||
listQuery: {
|
||||
@@ -179,6 +212,8 @@ export default {
|
||||
{
|
||||
prop: 'workOrderNumber',
|
||||
label: '工单号',
|
||||
minWidth: 120,
|
||||
showOverflowtooltip: true
|
||||
// filter: (val) => ['玻璃芯片', '标准组件', 'BIPV', '定制组件'][val]
|
||||
},
|
||||
{
|
||||
@@ -211,8 +246,8 @@ export default {
|
||||
{
|
||||
prop: 'orderStatus',
|
||||
label: '工单状态',
|
||||
filter: publicFormatter('workorder_status')
|
||||
// filter: (val) => ['未开始', '生产中', '已完成'][val],
|
||||
// filter: publicFormatter('workorder_status')
|
||||
filter: (val) => ['未开始', '生产中', '已完成'][val],
|
||||
},
|
||||
{
|
||||
prop: 'startTime',
|
||||
@@ -229,15 +264,15 @@ export default {
|
||||
],
|
||||
tableData: [],
|
||||
xAxis: [],
|
||||
lineData: {},
|
||||
data: {}
|
||||
lineData: {}
|
||||
// data: {}
|
||||
// proLineList: [],
|
||||
// all: {}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
const today = new Date()
|
||||
const sevenDaysAgo = new Date(today.getTime() - (7 * 24 * 60 * 60 * 1000))
|
||||
const sevenDaysAgo = new Date(today.getTime() - (6 * 24 * 60 * 60 * 1000))
|
||||
this.listQuery.time = [moment(sevenDaysAgo).format('yyyy-MM-DD'), moment(today).format('yyyy-MM-DD')]
|
||||
this.formConfig[2].defaultSelect = this.listQuery.time
|
||||
},
|
||||
@@ -247,8 +282,19 @@ export default {
|
||||
methods: {
|
||||
getOverView() {
|
||||
getOverView().then(res => {
|
||||
this.data = res.data
|
||||
console.log('aa', res.data)
|
||||
// this.data = res.data
|
||||
if (res.code === 0) {
|
||||
for(const i in res.data) {
|
||||
if (i === '在制工单数量') {
|
||||
this.inputNum = res.data[i]
|
||||
} else {
|
||||
const index = this.factorys.indexOf(i)
|
||||
if (index > -1) {
|
||||
this.factoryNum[index] = res.data[i]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
otherMethods(val) {
|
||||
@@ -317,10 +363,18 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* .blueTip { */
|
||||
/* padding-bottom: 10px; */
|
||||
/* } */
|
||||
/* .blueTi */
|
||||
.centerDiv {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.topDiv {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-around;
|
||||
align-items: flex-start;
|
||||
flex: 1;
|
||||
}
|
||||
.view {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
@@ -342,7 +396,7 @@ export default {
|
||||
background-color: #fff;
|
||||
border-radius: 4px;
|
||||
padding: 16px 16px 0;
|
||||
height: calc(100vh - 134px);
|
||||
height: calc(100vh - 80px);
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user