+
+
+
+
+
+
+
+
+
+ {{ factoryNum[index] }}
+ {{item}}
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+ :table-data="tableData" :max-height="tableH">
@@ -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 {