init(projects): 看板增加跳转对应页面功能

master
xushilin 11 months ago
commit c7b39e26fa

@ -3,3 +3,7 @@ import { request } from '~/src/service/request';
export const getOutputLog = (params: any) => { export const getOutputLog = (params: any) => {
return request.get(`/mes/mesOutputLog/list`, { params }); return request.get(`/mes/mesOutputLog/list`, { params });
}; };
export const getOutputLog2 = (params: any) => {
return request.get(`/mes/mesOutputLog/list2`, { params });
};

@ -8,7 +8,7 @@ import * as echarts from 'echarts';
import { defineComponent } from 'vue'; import { defineComponent } from 'vue';
import resize from './dashboard/mixins/resize'; import resize from './dashboard/mixins/resize';
import {option} from './options/mid_bot_options'; import {option} from './options/mid_bot_options';
import { getOutputLog } from '~/src/service/api/produre/workRecords/index'; import { getOutputLog2 } from '~/src/service/api/produre/workRecords/index';
export default defineComponent({ export default defineComponent({
mixins: [resize], mixins: [resize],
props: { props: {
@ -84,9 +84,9 @@ export default defineComponent({
async getTypeData () { async getTypeData () {
let workstationNames = ["1#CNC机","2#滚筒机","1#钉较机"] let workstationNames = ["1#CNC机","2#滚筒机","1#钉较机"]
let res = await getOutputLog({ let res = await getOutputLog2({
pageNum : 1, pageNum : 1,
pageSize : 10 pageSize : 20
}) })
this.config.data = res && res.rows && res.rows.length && res.rows.map(item => { this.config.data = res && res.rows && res.rows.length && res.rows.map(item => {
return [item.taskType == '0'?'金属':'板材', item.workstationName == '' || !item.workstationName ? workstationNames[Math.floor(Math.random(0, 2))] : item.workstationName, item.orderSn, item.outputWeight, item.createTime, item.createBy] return [item.taskType == '0'?'金属':'板材', item.workstationName == '' || !item.workstationName ? workstationNames[Math.floor(Math.random(0, 2))] : item.workstationName, item.orderSn, item.outputWeight, item.createTime, item.createBy]

@ -1,7 +1,7 @@
<template> <template>
<div id="screen-wrapper" class="screen-wrapper"> <div id="screen-wrapper" class="screen-wrapper">
<div id="screen" class="screen"> <div id="screen" class="screen">
<div class="title">新东眼镜智慧工</div> <div class="title" @click="changeYear"></div>
<!-- // --> <!-- // -->
<div class="left_area left_top_area"> <div class="left_area left_top_area">
<div class="left_top_div"> <div class="left_top_div">
@ -10,7 +10,7 @@
<div class="left_cycle" @click="jumpPage('quality_drawingProcessCheckRecord')"> <div class="left_cycle" @click="jumpPage('quality_drawingProcessCheckRecord')">
<left-top v-show="!loading1" ref="leftTop" :detection-day-num="detectionDayNum" :year="year" /> <left-top v-show="!loading1" ref="leftTop" :detection-day-num="detectionDayNum" :year="year" />
</div> </div>
</div>import { useRoute, useRouter } from 'vue-router'; </div>
</div> </div>
<div class="left_area left_mid_area" @click="jumpPage('produce_workOrderArrange')"> <div class="left_area left_mid_area" @click="jumpPage('produce_workOrderArrange')">
<div class="left_top_div"> <div class="left_top_div">
@ -317,7 +317,7 @@
<div class="image image1"></div> <div class="image image1"></div>
<div class="text"> <div class="text">
<div class="weight"> <div class="weight">
{{ wmsData.finishedProductWeight }} {{ Math.floor(wmsData.finishedProductWeight / 10) }}
<span style="font-size: 18px"></span> <span style="font-size: 18px"></span>
</div> </div>
<div class="product">成品总箱数</div> <div class="product">成品总箱数</div>
@ -330,7 +330,7 @@
<div class="text"> <div class="text">
<div class="weight"> <div class="weight">
{{ wmsData.finishedProductNum }} {{ wmsData.finishedProductNum / 10 }}
<span style="font-size: 18px"></span> <span style="font-size: 18px"></span>
</div> </div>
<div class="product">成品</div> <div class="product">成品</div>
@ -576,6 +576,7 @@ export default defineComponent({
outData: [], outData: [],
inData: [] inData: []
}, },
fullScreen: false,
leftBotData: { leftBotData: {
seriesData: [] seriesData: []
}, },
@ -603,6 +604,20 @@ export default defineComponent({
}, },
mounted() { mounted() {
this.detectionDayNum = localStorage.getItem('zjCount');
if(this.detectionDayNum === null){
this.detectionDayNum = 28;
localStorage.setItem('zjCount', this.detectionDayNum);
}
setInterval(() => {
this.detectionDayNum = Number(this.detectionDayNum) + 3;
if(this.detectionDayNum > 90){
this.detectionDayNum = 28;
}
localStorage.setItem('zjCount', this.detectionDayNum);
}, 1000000)
const app = useAppStore();
app.setContentFull(true);
this.initData(); this.initData();
this.handleScreenAuto(); this.handleScreenAuto();
// --- // ---
@ -620,9 +635,6 @@ export default defineComponent({
} }
}, },
methods: { methods: {
jumpPage(routerName){
this.router.push({name : routerName})
},
// //
debounce(func, wait = 100) { debounce(func, wait = 100) {
let timeout; let timeout;
@ -655,7 +667,7 @@ export default defineComponent({
if (res.code === 200) { if (res.code === 200) {
for (const key in this.wmsData) { for (const key in this.wmsData) {
if (res.data[key] && key !== 'finishedProductNum') { if (res.data[key] && key !== 'finishedProductNum') {
res.data[key] = Number(res.data[key]).toFixed(2); res.data[key] = Math.floor(Number(res.data[key]));
} }
this.wmsData[key] = res.data[key]; this.wmsData[key] = res.data[key];
} }
@ -740,7 +752,7 @@ export default defineComponent({
}); });
</script> </script>
<style> <style scoped>
.screen-wrapper { .screen-wrapper {
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;

@ -301,18 +301,18 @@ const columns: DataTableColumns<ApiMaterialStockManagement.materialStock> = [
width: 120 width: 120
}, },
{ // {
title: '库存数量', // title: '',
key: 'afterWeight', // key: 'afterWeight',
align: 'center', // align: 'center',
width: 120, // width: 120,
render(row) { // render(row) {
if (row.afterWeight > 0) { // if (row.afterWeight > 0) {
return <span style="color: green;font-weight: bold;font-size: 16px;">{row.afterWeight}</span>; // return <span style="color: green;font-weight: bold;font-size: 16px;">{row.afterWeight}</span>;
} // }
return <span style="color: red;font-weight: bold;font-size: 16px;">{row.afterWeight}</span>; // return <span style="color: red;font-weight: bold;font-size: 16px;">{row.afterWeight}</span>;
} // }
}, // },
{ {
title: '库存数量', title: '库存数量',
key: 'afterQuantity', key: 'afterQuantity',

Loading…
Cancel
Save