update 检测信息记录

这个提交包含在:
lb 2023-09-27 10:14:24 +08:00
父节点 20808c0975
当前提交 90695acefd
共有 4 个文件被更改,包括 63 次插入20 次删除

查看文件

@ -118,12 +118,12 @@ export default {
{
width: 128,
prop: 'workTime',
label: '工作时长',
label: '工作时长[h]',
},
{
width: 128,
prop: 'workRate',
label: '百分比',
label: '百分比[%]',
filter: (val) => (val != null ? +val.toFixed(3) : '-'),
},
],
@ -134,9 +134,9 @@ export default {
{
width: 128,
prop: 'stopTime',
label: '停机时长',
label: '停机时长[h]',
},
{ width: 128, prop: 'stopRate', label: '百分比' },
{ width: 128, prop: 'stopRate', label: '百分比[%]' },
],
},
{
@ -145,10 +145,10 @@ export default {
{
width: 128,
prop: 'downTime',
label: '故障时长',
label: '故障时长[h]',
filter: (val) => (val != null ? +val.toFixed(3) : '-'),
},
{ width: 128, prop: 'downRate', label: '百分比' },
{ width: 128, prop: 'downRate', label: '百分比[%]' },
{
width: 128,
prop: 'timeEfficiency',

查看文件

@ -24,6 +24,7 @@
:formConfigs="searchBarFormConfig"
ref="search-bar"
:remove-blue="true"
@select-changed="handleSearchBarSelectChange"
@headBtnClick="handleSearchBarBtnClick" />
</el-row>
@ -195,6 +196,7 @@ export default {
placeholder: '请选择产线',
selectOptions: [],
param: 'lineId',
onchange: true,
},
{
type: 'select',
@ -592,6 +594,28 @@ export default {
}
},
handleSearchBarSelectChange({ param, value }) {
switch (param) {
case 'lineId':
this.$axios({
url: '/base/workshop-section/listByParentId',
method: 'get',
params: {
id: value,
},
}).then(({ code, data }) => {
if (code == 0) {
this.searchBarFormConfig[1].selectOptions = data.map((item) => {
return {
name: item.name,
id: item.id,
};
});
}
});
}
},
handleSearchBarBtnClick({ btnName, ...payload }) {
switch (btnName) {
case 'search':

查看文件

@ -8,7 +8,7 @@
<template>
<el-form
ref="form"
:model="dataForm"
:model="innerDataForm"
label-width="100px"
v-loading="formLoading">
<el-row :gutter="20">
@ -18,11 +18,11 @@
prop="inspectionDetId"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-select
v-model="dataForm.inspectionDetId"
v-model="innerDataForm.inspectionDetId"
placeholder="请选择检测内容"
filterable
clearable
@change="$emit('update', dataForm)">
@change="handleInspectionDetChange">
<el-option
v-for="opt in inspectionDetList"
:key="opt.value"
@ -38,11 +38,11 @@
prop="source"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-select
v-model="dataForm.source"
v-model="innerDataForm.source"
placeholder="请选择来源"
filterable
clearable
@change="$emit('update', dataForm)">
@change="$emit('update', innerDataForm)">
<el-option
v-for="opt in [
{ label: '手动', value: 1 },
@ -165,6 +165,7 @@ export default {
productionLineList: [],
sectionList: [],
innerDataForm: {},
cacheInspectionDetList: null,
};
},
mounted() {
@ -175,15 +176,18 @@ export default {
);
},
watch: {
'innerDataForm.productionLineId': {
handler: async function (plId) {
if (plId) await this.getWorksectionList(plId);
},
immediate: true,
},
// 'innerDataForm.productionLineId': {
// handler: async function (plId) {
// if (plId) await this.getWorksectionList(plId);
// },
// immediate: true,
// },
dataForm: {
handler: function (dataForm) {
this.innerDataForm = JSON.parse(JSON.stringify(dataForm));
this.innerDataForm = Object.assign({}, dataForm);
if (dataForm.productionLineId)
this.getWorksectionList(dataForm.productionLineId);
},
immediate: true,
},
@ -196,16 +200,28 @@ export default {
resetFields(args) {
return this.$refs.form.resetFields(args);
},
handleInspectionDetChange(value) {
const { id, content } = this.cacheInspectionDetList.find(
(item) => item.id == value
);
this.innerDataForm.inspectionDetId = id;
this.innerDataForm.inspectionDetContent = content;
this.$emit('update', this.innerDataForm);
},
async handleProductlineChange(id) {
await this.getWorksectionList(id);
// await this.getWorksectionList(id);
this.innerDataForm.sectionId = null;
this.$emit('update', this.innerDataForm);
},
// getCode
async getCode(url) {
const response = await this.$axios(url);
return response.data;
},
// 线
async getProductLineList() {
const response = await this.$axios('/base/production-line/listAll');
@ -214,16 +230,19 @@ export default {
value: item.id,
}));
},
//
async getInspectionDetList() {
const response = await this.$axios(
'/base/quality-inspection-det/listAll'
);
this.cacheInspectionDetList = response.data;
this.inspectionDetList = response.data.map((item) => ({
label: item.content,
value: item.id,
}));
},
//
async getWorksectionList(plId) {
const response = await this.$axios(

查看文件

@ -147,7 +147,7 @@ export default {
},
yAxis: {
type: 'value',
name: '单位/片',
name: '检测数量',
nameTextStyle: {
color: '#999',
fontSize: 14,