质量管理

This commit is contained in:
‘937886381’
2023-11-10 17:02:52 +08:00
243 changed files with 44420 additions and 9567 deletions

View File

@@ -1,37 +1,34 @@
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<SearchBar
:formConfigs="searchBarFormConfig"
ref="search-bar"
@headBtnClick="handleSearchBarBtnClick" />
<div class="app-container">
<!-- 搜索工作栏 -->
<SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" @headBtnClick="handleSearchBarBtnClick" />
<!-- 列表 -->
<base-table
:table-props="tableProps"
:page="queryParams.pageNo"
:limit="queryParams.pageSize"
:table-data="list">
<!-- <method-btn
v-if="tableBtn.length"
slot="handleBtn"
label="操作"
:width="120"
fixed="right"
:method-list="tableBtn"
@clickBtn="handleTableBtnClick" /> -->
</base-table>
<!-- 分页组件 -->
<!-- <pagination
<!-- 列表 -->
<el-row>
<el-col class="custom-tabs">
<el-tabs v-model="activeName" :stretch="true" @tab-click="handleTabClick">
<el-tab-pane :label="'\u2002表格数据\u2002'" name="table">
<!-- 列表 -->
<base-table class="base-table__margin" :table-props="productProps" :page="1" :limit="10" :table-data="list">
</base-table>
</el-tab-pane>
<el-tab-pane :label="'\u3000图形数据\u3000'" name="chart" style="overflow: inherit">
<!-- <base-table class="base-table__margin" :table-props="valueTableProps" :page="1" :limit="10"
:table-data="valueList" @emitFun="handleEmitFun"></base-table> -->
</el-tab-pane>
</el-tabs>
</el-col>
</el-row>
<!-- 分页组件 -->
<!-- <pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNo"
:limit.sync="queryParams.pageSize"
@pagination="getList" /> -->
<!-- 对话框(添加 / 修改) -->
<!-- <base-dialog
<!-- 对话框(添加 / 修改) -->
<!-- <base-dialog
:dialogTitle="title"
:dialogVisible="open"
width="50%"
@@ -40,7 +37,7 @@
@confirm="submitForm">
<DialogForm v-if="open" ref="form" v-model="form" />
</base-dialog> -->
</div>
</div>
</template>
<script>
@@ -63,22 +60,23 @@ export default {
data() {
return {
list: [],
dynamicProps:[],
dynamicProps: [],
activeName: 'table',
searchBarFormConfig: [
{
type: 'select',
label: '工单号',
placeholder: '请选择工单号',
param: 'workOrderId',
selectOptions: [],
},
{
type: 'select',
label: '产品',
placeholder: '请选择产品',
param: 'productionId',
selectOptions: [],
},
// {
// type: 'select',
// label: '工单号',
// placeholder: '请选择工单号',
// param: 'workOrderId',
// selectOptions: [],
// },
// {
// type: 'select',
// label: '产品',
// placeholder: '请选择产品',
// param: 'productionId',
// selectOptions: [],
// },
// {
// type: 'input',
// label: '检测内容',
@@ -200,7 +198,7 @@ export default {
// this.getProductLineList();
},
computed: {
tableProps() {
productProps() {
return [
{
// width: 160,
@@ -263,23 +261,23 @@ export default {
},
methods: {
/** 获取搜索栏的产线列表 */
async getDict() {
const res = await getProductList()
const result = await getWorkOrderList()
console.log(res);
this.searchBarFormConfig[1].selectOptions = res.data.map((item) => {
return {
name: item.name,
id:item.id
}
})
this.searchBarFormConfig[0].selectOptions = result.data.map((item) => {
return {
name: item.name,
id: item.id
}
})
},
// async getDict() {
// const res = await getProductList()
// const result = await getWorkOrderList()
// console.log(res);
// this.searchBarFormConfig[1].selectOptions = res.data.map((item) => {
// return {
// name: item.name,
// id:item.id
// }
// })
// this.searchBarFormConfig[0].selectOptions = result.data.map((item) => {
// return {
// name: item.name,
// id: item.id
// }
// })
// },
// getProductLineList() {
// this.$axios('/base/production-line/listAll').then((response) => {
// this.searchBarFormConfig[0].selectOptions = response.data.map(
@@ -294,29 +292,34 @@ export default {
// },
getList() {
this.getDataList()
this.getDict()
// this.getDict()
},
/** 查询列表 */
async getDataList() {
this.loading = true;
// 执行查询
const {
data: { data, otherList, otherMap, nameData },
} = await getInspectionData(this.queryParams)
this.dynamicProps = this.filterNameData(nameData)
this.list = this.filterData(data);
const res = await getInspectionData(this.queryParams)
console.log(res);
this.dynamicProps = this.filterNameData(res.data[0].upPart)
console.log(this.dynamicProps)
this.list = this.filterData(res.data[0].upPart.data)
console.log(this.list);
},
filterNameData(nameData) {
const ndSet = new Set();
nameData.forEach((nd) => {
ndSet.add(nd.name);
});
return Array.from(ndSet.values())
.sort()
.map((name) => ({
prop: name,
label: name,
}));
filterNameData(upData) {
console.log(upData);
// upData.forEach((ele) => {
const ndSet = new Set();
upData.nameData.forEach((nd) => {
ndSet.add(nd.name);
});
return Array.from(ndSet.values())
.sort()
.map((name) => ({
prop: name,
label: name,
}));
// })
},
filterData(data) {
return data.map((item) => {
@@ -434,3 +437,24 @@ export default {
},
};
</script>
<style scoped lang="scss">
:deep(.custom-tabs) {
.el-tabs__header {
margin-bottom: 8px;
display: inline-block;
transform: translateY(-12px);
}
.el-tabs__content {
overflow: visible;
}
.el-tabs__item {
padding-left: 0 !important;
padding-right: 0 !important;
line-height: 36px !important;
height: 36px;
}
}
</style>

View File

@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2023-08-01 14:55:51
* @LastEditors: zhp
* @LastEditTime: 2023-10-31 10:36:08
* @LastEditTime: 2023-11-10 16:25:02
* @Description:
-->
<template>
@@ -61,7 +61,8 @@ const tableProps = [
},
{
prop: 'source',
label: '数据来源'
label: '数据来源',
filter: (val) => val == 1 ? '内部' : '外部'
},
{
prop: 'remark',

View File

@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2023-08-01 14:55:51
* @LastEditors: zhp
* @LastEditTime: 2023-11-07 14:42:52
* @LastEditTime: 2023-11-10 16:32:28
* @Description:
-->
<template>
@@ -28,6 +28,7 @@ import {
getWorkOrderList,
// exportEnergyPlcExcel
} from '@/api/quality/processTraceability';
import { publicFormatter } from '@/utils/dict';
const tableProps = [
{
@@ -44,7 +45,8 @@ const tableProps = [
},
{
prop: 'status',
label: '状态'
label: '状态',
filter:publicFormatter('work_order_status')
},
{
prop: 'startProduceTime',
@@ -62,7 +64,8 @@ const tableProps = [
},
{
prop: 'unit',
label: '单位'
label: '单位',
filter: publicFormatter('unit_dict')
},
{
prop: 'processFlowName',

View File

@@ -8,7 +8,9 @@
<template>
<section class="process-bom">
<SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" @headBtnClick="handleSearchBarBtnClick" />
<!-- <small-title :no-padding="true">
设备名称: {{ name }}
</small-title> -->
<div class="btns" style="
text-align: right;
position: absolute;
@@ -25,11 +27,22 @@
</div>
<!-- 列表 -->
<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="操作" :width="120" :method-list="tableBtn"
@clickBtn="handleTableBtnClick" />
</base-table>
<el-row>
<div style="margin-bottom: 10px;font-size: 16px;">设备名称{{ name }}</div>
<el-col class="custom-tabs">
<el-tabs v-model="activeName" :stretch="true" @tab-click="handleTabClick">
<el-tab-pane :label="'\u2002物料追溯\u2002'" name="material">
<!-- 列表 -->
<base-table class="base-table__margin" :table-props="materialTableProps" :page="1" :limit="10"
:table-data="materialList" @emitFun="handleEmitFun"></base-table>
</el-tab-pane>
<el-tab-pane :label="'\u3000参数追溯\u3000'" name="value" style="overflow: inherit">
<base-table class="base-table__margin" :table-props="valueTableProps" :page="1" :limit="10"
:table-data="valueList" @emitFun="handleEmitFun"></base-table>
</el-tab-pane>
</el-tabs>
</el-col>
</el-row>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
@@ -38,12 +51,17 @@
</template>
<script>
// import SmallTitle from './SmallTitle';
import {
getDetMaterial
getDetMaterial,
getDetValue
} from '@/api/quality/processTraceabilityDetail';
import StatusBtn from './statusBtn.vue'
export default {
name: 'ProcessBom',
components: {},
components: {
// SmallTitle
},
props: {
currentDet: {
type: Object,
@@ -51,8 +69,10 @@ export default {
}
},
data() {
return {
searchBarFormConfig: [{ label: '工序下设备' },
return {
detId:undefined,
activeName: 'material',
searchBarFormConfig: [{ label: '设备参数及物料追溯' },
{
type: 'datePicker',
label: '时间段',
@@ -73,7 +93,7 @@ export default {
name: 'search',
color: 'primary',
},],
tableProps: [
materialTableProps: [
// {
// prop: 'createTime',
// label: '添加时间',
@@ -81,11 +101,56 @@ export default {
// width: 180,
// filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
// },
{ prop: 'name', label: '设备名称' },
{ prop: 'code', label: '物料BOM' },
{ prop: 'remark', label: '参数BOM' },
],
list: [],
{ prop: 'name', label: '物料名称' },
{ prop: 'planNum', label: '预计使用数量' },
{ prop: 'actualNum', label: '实际使用数量' },
],
name:null,
materialList: [],
valueTableProps: [
// {
// prop: 'createTime',
// label: '添加时间',
// fixed: true,
// width: 180,
// filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
// },
{ prop: 'name', label: '参数名' },
{
prop: 'name', label: '设定范围最小- 最大 / 标准',
subcomponent: StatusBtn
},
{
prop: 'code', label: '最小值',
children: [
{
prop: 'minValueSet',
label: '值'
},
{
prop: 'minValueAppearTime',
label: '出现时间'
}
]
},
{
prop: 'code', label: '最大值',
children: [
{
prop: 'maxValueSet',
label: '值'
},
{
prop: 'maxValueAppearTime',
label: '出现时间'
}
]
},
{
prop: 'averageValueAppear', label: '平均值',
},
],
valueList: [],
total: 0,
tableBtn: [],
queryParams: {
@@ -94,12 +159,17 @@ export default {
},
searchText: ''
};
},
},
// components: {
// SmallTitle,
// },
watch: {
currentDet: {
handler(val) {
if (val != null) {
this.getList(val);
this.getList(val);
this.detId = val.detId
console.log(val);
} else {
this.clearList();
}
@@ -115,7 +185,7 @@ export default {
pageNo: 1,
pageSize: 10,
orderId: this.$route.params.orderId,
flowDetId: '1715180991838887938',
flowDetId: [this.detId],
// orderId: this.$route.params.orderId,
},).then((res) => {
@@ -151,16 +221,50 @@ export default {
})
},
getList({ detId, detName, detDesc, flowId, sectionName } = {}) {
console.log('get list')
// getList({ detId, detName, detDesc, flowId, sectionName } = {}) {
// console.log('get list')
},
getList() {
this.list = [
{ name: '1', code: 'bomg-1', remark: 'Tochter' },
{ name: '2', code: 'bomg-2', remark: 'Bruder' },
{ name: '3', code: 'bomg-3', remark: 'Kalt' },
]
// },
handleTabClick(val) {
// console.log(this.activeName);
if (this.activeName === 'material') {
getDetMaterial({
pageNo: 1,
pageSize: 10,
orderId: this.$route.params.orderId,
flowDetId: [this.detId],
// orderId: this.$route.params.orderId,
},).then((res) => {
this.materialList = res.data[0].data
this.name = res.data[0].name
})
} else {
getDetValue({
pageNo: 1,
pageSize: 10,
orderId: this.$route.params.orderId,
flowDetId: [this.detId],
// orderId: this.$route.params.orderId,
}).then((res) => {
this.valueList = res.data[0].data
this.name = res.data[0].name
})
}
},
getList(val) {
console.log(val);
getDetMaterial({
pageNo: 1,
pageSize: 10,
orderId: this.$route.params.orderId,
flowDetId: [this.detId],
}).then((res) => {
console.log(res);
this.materialList = res.data[0].data
this.name = res.data[0].name
})
},
clearList() {
this.list = [];
@@ -177,4 +281,22 @@ export default {
background: #fff;
border-radius: 8px;
}
:deep(.custom-tabs) {
.el-tabs__header {
margin-bottom: 8px;
display: inline-block;
transform: translateY(-12px);
}
.el-tabs__content {
overflow: visible;
}
.el-tabs__item {
padding-left: 0 !important;
padding-right: 0 !important;
line-height: 36px !important;
height: 36px;
}
}
</style>

View File

@@ -39,8 +39,10 @@ import { Graph } from '@antv/x6';
import ProcessNode, { createProcessNode, CACHE_NAME, getSectionFrom } from './ProcessNode';
import DialogForm from '@/components/DialogForm';
// import { IdToName } from '@/utils'
// if (process - node){
Graph.registerNode('process-node', ProcessNode);
// }
Graph.registerNode('process-node', ProcessNode, true);
export default {
name: 'ProcessGraph',
@@ -211,7 +213,7 @@ export default {
reset();
edge.attr('line/stroke', '#0b58ff')
});
this.graph.on('blank:click', ({ e, x, y }) => {
this.graph.on('blank:click', ({ e, x, y }) => {x
reset();
});
this.graph.on('node:mouseenter', ({ node }) => {

View File

@@ -0,0 +1,72 @@
<!--
* @Author: zhp
* @Date: 2023-11-09 16:32:21
* @LastEditTime: 2023-11-09 16:32:21
* @LastEditors: zhp
* @Description:
-->
<!--
* @Author: zhp
* @Date: 2023-11-07 19:28:13
* @LastEditTime: 2023-11-08 14:11:43
* @LastEditors: zhp
* @Description:
-->
<template>
<div :class="[className, { 'p-0': noPadding }]">
<slot />
</div>
</template>
<script>
export default {
props: {
size: {
// 取值范围: xl lg md sm
type: String,
default: 'de',
validator: function (val) {
return ['xl', 'lg', 'de', 'md', 'sm'].indexOf(val) !== -1;
},
},
noPadding: {
type: Boolean,
default: false,
},
},
computed: {
className: function () {
return `${this.size}-title`;
},
},
};
</script>
<style lang="scss" scoped>
$pxls: (xl, 28px) (lg, 24px) (de, 20px) (md, 18px) (sm, 16px);
$mgr: 8px;
@each $size, $height in $pxls {
.#{$size}-title {
font-size: 18px;
line-height: $height;
color: #000;
font-weight: 500;
font-family: '微软雅黑', 'Microsoft YaHei', Arial, Helvetica, sans-serif;
&::before {
content: '';
display: inline-block;
vertical-align: top;
width: 4px;
height: $height + 2px;
border-radius: 1px;
margin-right: $mgr;
background-color: #0b58ff;
}
}
}
.p-0 {
padding: 0;
}
</style>

View File

@@ -0,0 +1,63 @@
<!--
* @Author: zhp
* @Date: 2023-11-10 09:18:48
* @LastEditTime: 2023-11-10 09:23:24
* @LastEditors: zhp
* @Description:
-->
<template>
<span>
{{ injectData.minValueSet + '-' + injectData.maxValueSet + "/" + injectData / defaultValueSet }}
</span>
</template>
<script>
export default {
props: {
injectData: {
type: Object,
default: () => ({})
}
},
data() {
return {
// state: false
}
},
// computed: {
// readonly() {
// return !!this.injectData.readonly
// }
// },
// mounted() {
// this.mapToState()
// },
methods: {
// mapToState() {
// if (this.injectData.prop === 'enabled') {
// this.state = this.injectData.enabled === 1 ? true : false
// }
// },
// changeHandler() {
// // let params = {}
// let payload = {}
// // params.name = 'state'
// payload.id = this.injectData.id
// payload.enabled = this.state ? '1' : '0'
// payload.code = this.injectData.code
// payload.name = this.injectData.name
// payload.equipmentId = this.injectData.equipmentId
// payload.remark = this.injectData.remark
// // params.payload = payload
// updateProcessEquMaterialBom(payload).then((res) => {
// if (res.code === 0) {
// this.$modal.msgSuccess("操作成功");
// }
// })
// // this.$emit('emitData', params)
// }
}
}
</script>

View File

@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2023-08-01 14:55:51
* @LastEditors: zhp
* @LastEditTime: 2023-10-31 11:01:02
* @LastEditTime: 2023-11-10 16:26:45
* @Description:
-->
<template>
@@ -22,6 +22,7 @@
// import AddOrUpdate from './add-or-updata';
// import unitDict from './unitDict';
// import basicPage from '../mixins/basic-page';
import { publicFormatter } from '@/utils/dict';
import { parseTime } from '../mixins/code-filter';
import {
getRawMaterialPage,
@@ -37,11 +38,13 @@ const tableProps = [
},
{
prop: 'material',
label: '原料名称'
label: '原料名称',
filter: publicFormatter('material')
},
{
prop: 'origin',
label: '来源'
label: '来源',
filter: (val)=>val == 1 ? '内部' : '外部'
},
{
prop: 'supplierId',
@@ -57,7 +60,8 @@ const tableProps = [
},
{
prop: 'unit',
label: '单位'
label: '单位',
filter: publicFormatter('unit_dict')
}
];