修改部分bug

This commit is contained in:
朱菊兰 2025-01-10 13:52:13 +08:00
parent e202ac542e
commit 235b0a6512
2 changed files with 14 additions and 158 deletions

View File

@ -50,6 +50,11 @@ export default {
label: '工单名称', label: '工单名称',
showOverflowtooltip: true, showOverflowtooltip: true,
}, },
{
prop: 'productionName',
label: '产品名称',
showOverflowtooltip: true,
},
...this.dynamicProps, ...this.dynamicProps,
{ {
prop: 'sumInput', prop: 'sumInput',
@ -70,7 +75,7 @@ export default {
}; };
}, },
mounted() { mounted() {
// this.getList(); this.getList();
}, },
methods: { methods: {
/** 查询列表 */ /** 查询列表 */
@ -105,7 +110,7 @@ export default {
}, },
{ {
prop: 'scrapRatio', prop: 'scrapRatio',
label: '报废比例', label: '报废比例(%)',
}, },
]; ];
this.downList.push(obj); this.downList.push(obj);
@ -142,6 +147,7 @@ export default {
return { return {
inspectionContent: item.inspectionContent, inspectionContent: item.inspectionContent,
workOrderName: item.workOrderName, workOrderName: item.workOrderName,
productionName: item.productionName,
...keyValuePairs, ...keyValuePairs,
sumInput: item.sumInput, sumInput: item.sumInput,
sumOutput: item.sumOutput, sumOutput: item.sumOutput,

View File

@ -1,10 +1,3 @@
<!--
filename: index.vue
author: liubin
date: 2023-08-30 14:02:49
description: 设备加工数量
-->
<template> <template>
<div style="flex: 1; display: flex; background: #f2f4f9"> <div style="flex: 1; display: flex; background: #f2f4f9">
<div <div
@ -21,7 +14,7 @@
title="点击切换工厂" title="点击切换工厂"
@mouseenter="factoryListOpen = true" @mouseenter="factoryListOpen = true"
@mouseleave="factoryListOpen = false"> @mouseleave="factoryListOpen = false">
{{ currentFactory?.label || '点我选择设备' }} {{ currentFactory?.label || '点我选择工厂' }}
<div class="factory-list__wrapper" :class="{ open: factoryListOpen }"> <div class="factory-list__wrapper" :class="{ open: factoryListOpen }">
<ul <ul
class="factory-list" class="factory-list"
@ -33,7 +26,7 @@
:data-value="fc.id" :data-value="fc.id"
class="factory-list__item" class="factory-list__item"
:class="{ 'is-current': fc.id == currentFactory?.id }"> :class="{ 'is-current': fc.id == currentFactory?.id }">
<span> <span :data-value="fc.id">
{{ fc.label }} {{ fc.label }}
</span> </span>
<svg-icon <svg-icon
@ -56,10 +49,6 @@
:empty-text="''" :empty-text="''"
icon-class="custom-icon-class" icon-class="custom-icon-class"
@node-click="handleSidebarItemClick"> @node-click="handleSidebarItemClick">
<!-- <div class="custom-tree-node" slot-scope="{ node, data }">
<span class="icon"></span>
<span>{{ node.label }}</span>
</div> -->
</el-tree> </el-tree>
</div> </div>
</div> </div>
@ -106,20 +95,16 @@
<div v-else class="no-data-bg"></div> <div v-else class="no-data-bg"></div>
</el-col> </el-col>
</el-row> </el-row>
<!-- <transition appear name="vvv" mode="out-in"></transition> -->
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
// import Graph from './graph.vue';
import { getWorkOrderList, getTreeData } from '@/api/quality/deviceParameters'; import { getWorkOrderList, getTreeData } from '@/api/quality/deviceParameters';
import tableHeightMixin from '@/mixins/tableHeightMixin'; import tableHeightMixin from '@/mixins/tableHeightMixin';
export default { export default {
name: 'EquipmentProcessAmount', name: 'EquipmentProcessAmount',
// components: { Graph },
mixins: [tableHeightMixin], mixins: [tableHeightMixin],
props: {}, props: {},
data() { data() {
@ -139,92 +124,7 @@ export default {
{ name: '5', value: 5 }, { name: '5', value: 5 },
{ name: '6', value: 6 }, { name: '6', value: 6 },
], ],
sidebarContent: [ sidebarContent: [],
// {
// id: 'fc1',
// name: '',
// lines: [
// {
// name: '线1',
// id: 'pl1',
// sections: [
// {
// name: '1',
// id: 'pl1ws1',
// equipments: [
// {
// name: '1',
// id: 'pl1ws1--eq1',
// },
// {
// name: '2',
// id: 'pl1ws1--eq2',
// },
// {
// name: '3',
// id: 'pl1ws1--eq3',
// },
// ],
// },
// {
// name: '2',
// id: 'pl1ws2',
// equipments: [
// {
// name: '1',
// id: 'pl2ws1--eq1',
// },
// {
// name: '2',
// id: 'pl2ws1--eq2',
// },
// {
// name: '3',
// id: 'pl2ws1--eq3',
// },
// ],
// },
// {
// name: '3',
// id: 'pl1ws3',
// equipments: [
// {
// name: '1',
// id: 'pl3ws1--eq1',
// },
// {
// name: '2',
// id: 'pl3ws1--eq2',
// },
// {
// name: '3',
// id: 'pl3ws1--eq3',
// },
// ],
// },
// ],
// },
// {
// name: '线2',
// id: 'pl2',
// sections: [
// {
// name: '1',
// id: 'pl2ws1',
// },
// {
// name: '2',
// id: 'pl2ws2',
// },
// {
// name: '3',
// id: 'pl2ws3',
// },
// ],
// },
// ],
// },
],
tableList: [], tableList: [],
queryParams: { queryParams: {
id: null, id: null,
@ -241,6 +141,7 @@ export default {
param: 'workOrderId', param: 'workOrderId',
onchange: true, onchange: true,
filterable: true, filterable: true,
clearable: false
}, },
{ {
type: 'datePicker', type: 'datePicker',
@ -264,20 +165,6 @@ export default {
{ {
type: 'separate', type: 'separate',
}, },
// {
// type: 'button',
// btnName: '',
// name: 'table',
// plain: true,
// color: 'success',
// },
// {
// type: 'button',
// btnName: '',
// name: 'graph',
// plain: true,
// color: 'warning',
// },
{ {
type: this.$auth.hasPermi('base:equipment-group:export') type: this.$auth.hasPermi('base:equipment-group:export')
? 'button' ? 'button'
@ -291,15 +178,12 @@ export default {
tableProps: [ tableProps: [
{ prop: 'lineName', label: '产线' }, { prop: 'lineName', label: '产线' },
{ prop: 'sectionName', label: '工段' }, { prop: 'sectionName', label: '工段' },
// { prop: 'externalCode', label: '' },
{ prop: 'equipmentId', label: '设备编码' }, { prop: 'equipmentId', label: '设备编码' },
{ prop: 'equipmentName', label: '设备名称' }, { prop: 'equipmentName', label: '设备名称' },
{ prop: 'totalQuantity', label: '加工数量' }, { prop: 'totalQuantity', label: '加工数量' },
], ],
mode: 'table', // table | graph mode: 'table', // table | graph
queryParams: { queryParams: {
// pageNo: 1,
// pageSize: 999,
recordTime: [], recordTime: [],
equipmentId: null, equipmentId: null,
lineId: null, lineId: null,
@ -313,28 +197,10 @@ export default {
}, },
}; };
}, },
// mounted() {
// },
computed: { computed: {
// id() {
// return this.$route.params.equipmentId;
// },
// code() {
// return this.$route.params.equipmentCode;
// },
// name() {
// return this.$route.params.equipmentName;
// },
}, },
mounted() { mounted() {
this.getDict(); this.getDict();
// if (this.id) this.$set(this.queryParams, 'id', this.id);
// if (this.code)
// this.$set(this.searchBarFormConfig[0], 'defaultSelect', this.code);
// if (this.name)
// this.$set(this.searchBarFormConfig[1], 'defaultSelect', this.name);
// this.handleResponse();
}, },
methods: { methods: {
handleSearchBarChanged({ param, value }) { handleSearchBarChanged({ param, value }) {
@ -349,28 +215,14 @@ export default {
} }
}, },
getDict() { getDict() {
//
// getCustomerList().then((response) => {
// console.log(response);
// this.customerList = response.data
// // this.listQuery.total = response.data.total;
// })
// getModelList().then((response) => {
// console.log(response);
// this.modelList = response.data
// // this.listQuery.total = response.data.total;
// })
getWorkOrderList().then((res) => { getWorkOrderList().then((res) => {
console.log(res); console.log(res);
// console.log(response);
this.searchBarFormConfig[0].selectOptions = res.data.map((item) => { this.searchBarFormConfig[0].selectOptions = res.data.map((item) => {
return { return {
name: item.name, name: item.name,
id: item.id, id: item.id,
}; };
}); });
// console.log(this.formConfig[0].selectOptions);
// this.listQuery.total = response.data.total;
}); });
}, },
buildProps(table) { buildProps(table) {
@ -532,12 +384,9 @@ export default {
console.log(res.data); console.log(res.data);
this.sidebarContent = res.data; this.sidebarContent = res.data;
this.buildTree(res.data); this.buildTree(res.data);
this.currentFactory = null
console.log('tree', this.sidebarContent); console.log('tree', this.sidebarContent);
// console.log(this.formConfig[0].selectOptions);
// this.listQuery.total = response.data.total;
}); });
// const { data } = await this.$axios('/base/core-factory/getTreeByWorkOrder');
// console.log(data)
}, },
handleTabClick(tab, event) { handleTabClick(tab, event) {
@ -549,6 +398,7 @@ export default {
const fcId = event.target.dataset.value; const fcId = event.target.dataset.value;
this.handleSidebarItemClick({ id: fcId, type: '工厂' }); this.handleSidebarItemClick({ id: fcId, type: '工厂' });
this.currentFactory = this.sidebarContent.find((item) => item.id == fcId); this.currentFactory = this.sidebarContent.find((item) => item.id == fcId);
console.log('factory change', this.currentFactory);
}, },
handleSidebarItemClick({ label, id, type }) { handleSidebarItemClick({ label, id, type }) {