12
0

add 设备加工数量

Este cometimento está contido em:
lb 2023-08-30 14:11:24 +08:00
ascendente bf52db3b6a
cometimento 100d28fd68
2 ficheiros modificados com 184 adições e 4 eliminações

Ver ficheiro

@ -0,0 +1,182 @@
<!--
filename: index.vue
author: liubin
date: 2023-08-30 14:02:49
description: 设备加工数量
-->
<template>
<div class="equipment-process-amount">
<!-- side bar -->
<div class="side-bar__left"></div>
<!-- main area -->
<div class="main-content">
<SearchBar
:formConfigs="searchBarFormConfig"
ref="search-bar"
@headBtnClick="handleSearchBarBtnClick" />
<!-- tabs -->
<div class="table" v-if="mode == 'table'">
<base-table
:table-props="tableProps"
:page="queryParams.pageNo"
:limit="queryParams.pageSize"
:table-data="list"
@emitFun="handleEmitFun">
<!-- <method-btn
v-if="tableBtn.length"
slot="handleBtn"
label="操作"
:method-list="tableBtn"
@clickBtn="handleTableBtnClick" /> -->
</base-table>
</div>
<div class="graph" v-else>
<!-- graph -->
</div>
</div>
</div>
</template>
<script>
export default {
name: 'EquipmentProcessAmount',
components: {},
props: {},
data() {
return {
sidebarContent: [
{
factory: '工厂',
children: [
{
pl: '产线1',
children: [
{
ws: '工段1',
},
{
ws: '工段2',
},
{
ws: '工段3',
},
],
},
{
pl: '产线2',
children: [
{
ws: '工段1',
},
{
ws: '工段2',
},
{
ws: '工段3',
},
],
},
],
},
],
searchBarFormConfig: [
{
type: 'input',
label: '分组名称',
placeholder: '请输入设备分组名称',
param: 'name',
},
{
type: 'input',
label: '分组编码',
placeholder: '请输入设备分组编码',
param: 'codes',
},
{
type: 'button',
btnName: '查询',
name: 'search',
color: 'primary',
},
{
type: 'separate',
},
{
type: this.$auth.hasPermi('base:equipment-group:create')
? 'button'
: '',
btnName: '新增',
name: 'add',
plain: true,
color: 'success',
},
// {
// type: this.$auth.hasPermi('base:equipment-group:export') ? 'button' : '',
// btnName: '',
// name: 'export',
// color: 'warning',
// },
],
tableProps: [
// {
// prop: 'createTime',
// label: '',
// fixed: true,
// width: 180,
// filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
// },
{ prop: 'name', label: '产线', align: 'center' },
{ prop: 'code', label: '工段', align: 'center' },
{ prop: 'remark', label: '设备编码', align: 'center' },
{ prop: 'remark', label: '设备名称', align: 'center' },
{ prop: 'remark', label: '加工数量', align: 'center' },
// {
// _action: 'equipment-group-show-alert',
// label: '',
// align: 'center',
// subcomponent: {
// props: ['injectData'],
// render: function (h) {
// const _this = this;
// return h(
// 'el-button',
// {
// props: { type: 'text', size: 'mini' },
// on: {
// click: function () {
// console.log('inejctdata', _this.injectData);
// _this.$emit('emitData', {
// action: _this.injectData._action,
// // value: _this.injectData.id,
// value: _this.injectData,
// });
// },
// },
// },
// ''
// );
// },
// },
// },
],
mode: 'table', // table | graph
queryParams: {
pageNo: 1,
pageSize: 999,
},
list: [],
};
},
computed: {},
methods: {
handleEmitFun() {},
handleSearchBarBtnClick() {},
},
};
</script>
<style scoped lang="scss"></style>

Ver ficheiro

@ -503,7 +503,7 @@ export default {
// span
this.spanInfo[rowIndex] = data.length;
for (const equipment of data) {
rowIndex+=1
rowIndex += 1;
for (const [key, hourData] of Object.entries(equipment.hourData)) {
const { equipmentName, totalQuantity } = equipment;
const { inQuantity, outQuantity, nokQuantity, scrapRatio } =
@ -518,12 +518,10 @@ export default {
row[key + '__out'] = outQuantity;
row[key + '__nok'] = nokQuantity;
row[key + '__ratio'] = scrapRatio;
console.log('row', row);
return;
this.list.push(row);
}
return;
}
console.log('list:', this.list, 'spanInfo:', this.spanInfo);
}
},