feat:禅道148减薄车间看板变动

This commit is contained in:
shijing 2025-11-04 11:19:01 +08:00
parent 9b73e7eb32
commit de715b4ae3
1 changed files with 86 additions and 102 deletions

View File

@ -6,100 +6,53 @@
</el-header> </el-header>
<el-main> <el-main>
<!-- 减薄 --> <!-- 减薄 -->
<el-row style="height: 30%" :gutter="10"> <el-row style="height: 60%" :gutter="10">
<!-- 设备状态 --> <el-col :span="12" style="height: 100%">
<el-col :span="10" style="height: 100%"> <!-- 设备状态 -->
<div class="box"> <el-col style="height: 50%">
<div class="boxtitle"> <div class="box">
<div class="boxlabel"> <div class="boxtitle">
设备状态 <div class="boxlabel">
设备状态
</div>
<div class="boxlabel">
<span class="stateIcon yxicon"></span>
<span>运行中</span>
<span class="eqNum">{{hh.yx}}</span>
</div>
<div class="boxlabel">
<span class="stateIcon wyxIcon"></span>
<span>未运行</span>
<span class="eqNum">{{hh.wyx}}</span>
</div>
<div class="boxlabel">
<span class="stateIcon gzIcon"></span>
<span>故障</span>
<span class="eqNum">{{hh.gz}}</span>
</div>
</div> </div>
<div class="boxlabel"> <div style="height: 2px"></div>
<span class="stateIcon yxicon"></span> <div class="boxmain" id="scrollContainer">
<span>运行中</span> <dv-scroll-board :config="configDataEq" style="width:98%;margin:auto" />
<span class="eqNum">{{hh.yx}}</span>
</div>
<div class="boxlabel">
<span class="stateIcon wyxIcon"></span>
<span>未运行</span>
<span class="eqNum">{{hh.wyx}}</span>
</div>
<div class="boxlabel">
<span class="stateIcon gzIcon"></span>
<span>故障</span>
<span class="eqNum">{{hh.gz}}</span>
</div> </div>
</div> </div>
<div style="height: 2px"></div> </el-col>
<div class="boxmain" id="scrollContainer"> <!-- 库存 -->
<dv-scroll-board :config="configDataEq" style="width:98%;margin:auto" /> <el-col style="height: 50%">
</div> <div class="box">
</div> <div class="boxtitle">
</el-col> <div class="boxlabel">
<!-- 任务列表 --> 减薄车间库存
<el-col :span="14" style="height: 100%"> </div>
<div class="box"> </div>
<div class="boxtitle"> <div style="height: 2px"></div>
<div class="boxlabel">减薄任务列表</div> <div class="boxmain" id="scrollContainer">
</div> <dv-scroll-board :config="configDataInm" style="width:98%;margin:auto" />
<div style="height: 2px"></div>
<div class="boxmain" id="scrollContainer">
<dv-scroll-board :config="configDataTask" style="width:98%;margin:auto" />
</div>
</div>
</el-col>
</el-row>
<div style="height: 0.3%"></div>
<el-row style="height: 30%" :gutter="10">
<!-- 库存 -->
<el-col :span="10" style="height: 100%">
<div class="box">
<div class="boxtitle">
<div class="boxlabel">
减薄车间库存
</div> </div>
</div> </div>
<div style="height: 2px"></div> </el-col>
<div class="boxmain" id="scrollContainer">
<dv-scroll-board :config="configDataInm" style="width:98%;margin:auto" />
</div>
</div>
</el-col> </el-col>
<!-- 交接 --> <el-col :span="12" style="height: 100%">
<el-col :span="14" style="height: 100%">
<div class="box">
<div class="boxtitle">
<div class="boxlabel">减薄交接</div>
</div>
<div style="height: 2px"></div>
<div class="boxmain" id="scrollContainer">
<dv-scroll-board :config="configDataHandover" style="width:98%;margin:auto" />
</div>
</div>
</el-col>
</el-row>
<!-- 生产统计 分析 -->
<div style="height: 0.3%"></div>
<el-row style="height: 39%" :gutter="10">
<!-- 折线图 日加工数日合格数日合格率近七天数据 -->
<el-col :xs="8" :md="8" style="height: 100%;">
<div class="box">
<div class="boxtitle">
<div class="boxlabel">合格数统计</div>
</div>
<div class="boxmain boxmainbottom" id="chart1"></div>
</div>
</el-col>
<!-- 饼状图 各不合格品 原因占比 -->
<el-col :xs="8" :md="8" style="height: 100%;">
<div class="box">
<div class="boxtitle">
<div class="boxlabel">不合格占比统计</div>
</div>
<div class="boxmain boxmainbottom" id="chart2"></div>
</div>
</el-col>
<el-col :xs="8" :md="8" style="height: 100%;">
<div class="box"> <div class="box">
<div class="boxtitle"> <div class="boxtitle">
<div class="boxlabel">生产数统计</div> <div class="boxlabel">生产数统计</div>
@ -118,7 +71,30 @@
<span class="totalStaticItem totalStaticItemNum">{{ sctj.rhgs }}</span> <span class="totalStaticItem totalStaticItemNum">{{ sctj.rhgs }}</span>
<span class="totalStaticItem totalStaticItemNum">{{ sctj.rbhgs }}</span> <span class="totalStaticItem totalStaticItemNum">{{ sctj.rbhgs }}</span>
</div> </div>
<dv-scroll-board :config="configDatas" class="boxmain boxmainbottom" style="width:98%;margin:auto" /> <dv-scroll-board :config="configDatas" class="boxmain boxmainTopRight" style="width:98%;margin:auto" />
</div>
</el-col>
</el-row>
<div style="height: 0.3%"></div>
<!-- 生产统计 分析 -->
<div style="height: 0.3%"></div>
<el-row style="height: 39%" :gutter="10">
<!-- 折线图 日加工数日合格数日合格率近七天数据 -->
<el-col :span="12" style="height: 100%;">
<div class="box">
<div class="boxtitle">
<div class="boxlabel">合格数统计</div>
</div>
<div class="boxmain boxmainbottom" id="chart1"></div>
</div>
</el-col>
<!-- 饼状图 各不合格品 原因占比 -->
<el-col :span="12" style="height: 100%;">
<div class="box">
<div class="boxtitle">
<div class="boxlabel">不合格占比统计</div>
</div>
<div class="boxmain boxmainbottom" id="chart2"></div>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
@ -264,7 +240,6 @@ export default {
wyx:0, wyx:0,
gz:0, gz:0,
}, },
sctj:{ sctj:{
rtcs:0, rtcs:0,
rjgs:0, rjgs:0,
@ -277,7 +252,7 @@ export default {
chartInterval2: null, chartInterval2: null,
// //
configDataInm:{ configDataInm:{
header:['物料名称','批次号','数量','生产中数量'], header:['物料名称','批次号','数量','生产中'],
headerBGC:'#0a3f44', headerBGC:'#0a3f44',
headerHeight:40, headerHeight:40,
align:'center', align:'center',
@ -312,6 +287,7 @@ export default {
headerHeight:40, headerHeight:40,
data:[] data:[]
}, },
page:1,
currentTime: "", currentTime: "",
currentDay: "", currentDay: "",
today: "", today: "",
@ -323,6 +299,8 @@ export default {
}, },
mounted() { mounted() {
let that = this; let that = this;
that.page = 1;
that.configDataInm.data = [];
//table //table
this.tableHeight = document.getElementById("scrollContainer").clientHeight; this.tableHeight = document.getElementById("scrollContainer").clientHeight;
this.showTime(); this.showTime();
@ -340,7 +318,6 @@ export default {
let dayitem = Number(dates[2]); let dayitem = Number(dates[2]);
that.daysList.push(dayitem); that.daysList.push(dayitem);
}) })
console.log('that.daysList',that.daysList);
that.today = new Date().toISOString().split('T')[0] that.today = new Date().toISOString().split('T')[0]
// console.log('new Date', new Date().toISOString().split('T')) // console.log('new Date', new Date().toISOString().split('T'))
this.xAxisData = xAxisData; this.xAxisData = xAxisData;
@ -359,13 +336,14 @@ export default {
// //
that.getEqState(item.id); that.getEqState(item.id);
// //
this.getMaterials(item.id); // this.getMaterials(item.id);
// //
this.getHandover(item.id); // this.getHandover(item.id);
}) })
}) })
this.getMaterials(that.page);
// //
this.getMtask(); // this.getMtask();
/// ///
this.getProductLine(); this.getProductLine();
this.getCountnotok(); this.getCountnotok();
@ -618,19 +596,22 @@ export default {
}); });
}, },
// //
getMaterials() { getMaterials(page) {
let that = this; let that = this;
that.$API.wpm.wmaterial.list.req({ page: 0,mgroup__name__in:'减薄A,减薄B' }).then((res) => { that.$API.wpm.wmaterial.list.req({ page: page,page_size:500,mgroup__name__in:'减薄A,减薄B' }).then((res) => {
that.configDataInm.data = []; if(res.results.length>0){
if(res.length>0){ res.results.forEach((item) => {
res.forEach((item) => {
let arr = []; let arr = [];
arr[0] = item.material_name; arr[0] = item.material_name;
arr[1] = item.batch; arr[1] = item.batch;
arr[2] = item.count; arr[2] = item.count;
arr[2] = item.count_working; arr[3] = item.count_working;
that.configDataInm.data .push(arr); that.configDataInm.data.push(arr);
}) })
if(res.count>that.configDataInm.data.length){
that.page++;
that.getMaterials(that.page);
}
} }
}) })
}, },
@ -730,6 +711,9 @@ export default {
.boxmain.boxmainbottom{ .boxmain.boxmainbottom{
height: calc(100% - 38px); height: calc(100% - 38px);
} }
.boxmain.boxmainTopRight{
height: calc(100% - 120px);
}
.lineDiv { .lineDiv {
height: 40px; height: 40px;
line-height: 40px; line-height: 40px;