bugfix zentao 1

This commit is contained in:
lb 2023-09-15 14:30:19 +08:00
parent 27ebe39a96
commit 772a4b0633
29 changed files with 594 additions and 385 deletions

View File

@ -12,9 +12,9 @@ ENV = 'development'
VUE_APP_TITLE = 芋道管理系统 VUE_APP_TITLE = 芋道管理系统
# 芋道管理系统/开发环境 # 芋道管理系统/开发环境
VUE_APP_BASE_API = 'http://192.168.1.49:48080' # VUE_APP_BASE_API = 'http://192.168.1.49:48080'
# VUE_APP_BASE_API = 'http://192.168.1.8:48080' # VUE_APP_BASE_API = 'http://192.168.1.8:48080'
# VUE_APP_BASE_API = 'http://192.168.0.33:48080' VUE_APP_BASE_API = 'http://192.168.0.33:48080'
# VUE_APP_BASE_API = 'http://192.168.1.188:48080' # VUE_APP_BASE_API = 'http://192.168.1.188:48080'
# 路由懒加载 # 路由懒加载

View File

@ -53,7 +53,18 @@
margin-left: 20px; margin-left: 20px;
} }
.h1, .h2, .h3, .h4, .h5, .h6, h1, h2, h3, h4, h5, h6 { .h1,
.h2,
.h3,
.h4,
.h5,
.h6,
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: inherit; font-family: inherit;
font-weight: 500; font-weight: 500;
line-height: 1.1; line-height: 1.1;
@ -65,7 +76,8 @@
} }
.el-dialog:not(.is-fullscreen) { .el-dialog:not(.is-fullscreen) {
margin-top: 6vh !important; // margin-top: 6vh !important;
margin-top: 12vh !important;
} }
.el-dialog__wrapper.scrollbar .el-dialog .el-dialog__body { .el-dialog__wrapper.scrollbar .el-dialog .el-dialog__body {
@ -86,7 +98,8 @@
} }
.el-table { .el-table {
.el-table__header-wrapper, .el-table__fixed-header-wrapper { .el-table__header-wrapper,
.el-table__fixed-header-wrapper {
th { th {
word-break: break-word; word-break: break-word;
background-color: #f8f8f9; background-color: #f8f8f9;
@ -96,7 +109,7 @@
} }
} }
.el-table__body-wrapper { .el-table__body-wrapper {
.el-button [class*="el-icon-"] + span { .el-button [class*='el-icon-'] + span {
margin-left: 1px; margin-left: 1px;
} }
} }
@ -108,7 +121,7 @@
color: #6379bb; color: #6379bb;
border-bottom: 1px solid #ddd; border-bottom: 1px solid #ddd;
margin: 8px 10px 25px 10px; margin: 8px 10px 25px 10px;
padding-bottom:5px padding-bottom: 5px;
} }
/** 表格布局 **/ /** 表格布局 **/
@ -124,7 +137,7 @@
.tree-border { .tree-border {
margin-top: 5px; margin-top: 5px;
border: 1px solid #e5e6e7; border: 1px solid #e5e6e7;
background: #FFFFFF none; background: #ffffff none;
border-radius: 4px; border-radius: 4px;
} }
@ -149,12 +162,14 @@
} }
/** 表格更多操作下拉样式 */ /** 表格更多操作下拉样式 */
.el-table .el-dropdown-link,.el-table .el-dropdown-selfdefine { .el-table .el-dropdown-link,
.el-table .el-dropdown-selfdefine {
cursor: pointer; cursor: pointer;
margin-left: 5px; margin-left: 5px;
} }
.el-table .el-dropdown, .el-icon-arrow-down { .el-table .el-dropdown,
.el-icon-arrow-down {
font-size: 12px; font-size: 12px;
} }
@ -209,22 +224,22 @@
/* button color */ /* button color */
.el-button--cyan.is-active, .el-button--cyan.is-active,
.el-button--cyan:active { .el-button--cyan:active {
background: #20B2AA; background: #20b2aa;
border-color: #20B2AA; border-color: #20b2aa;
color: #FFFFFF; color: #ffffff;
} }
.el-button--cyan:focus, .el-button--cyan:focus,
.el-button--cyan:hover { .el-button--cyan:hover {
background: #48D1CC; background: #48d1cc;
border-color: #48D1CC; border-color: #48d1cc;
color: #FFFFFF; color: #ffffff;
} }
.el-button--cyan { .el-button--cyan {
background-color: #20B2AA; background-color: #20b2aa;
border-color: #20B2AA; border-color: #20b2aa;
color: #FFFFFF; color: #ffffff;
} }
/* text color */ /* text color */
@ -279,7 +294,7 @@
/* 拖拽列样式 */ /* 拖拽列样式 */
.sortable-ghost { .sortable-ghost {
opacity: .8; opacity: 0.8;
color: #fff !important; color: #fff !important;
background: #42b983 !important; background: #42b983 !important;
} }

View File

@ -19,7 +19,6 @@ function step1(tree1) {
.map((item) => ({ .map((item) => ({
prop: item, prop: item,
label: item, label: item,
align: 'center',
children: [], children: [],
})); }));
} }
@ -33,7 +32,6 @@ function step2(firstTierProps, tree2) {
parent.children.push({ parent.children.push({
label: nd.name, label: nd.name,
prop: `${parent.prop}-${nd.name}`, prop: `${parent.prop}-${nd.name}`,
align: 'center',
}); });
} }
}); });

View File

@ -85,12 +85,11 @@ export default {
width: 180, width: 180,
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'), filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
}, },
{ prop: 'equipmentName', label: '设备', align: 'center' }, { prop: 'equipmentName', label: '设备' },
{ prop: 'groupName', label: '分组', align: 'center' }, { prop: 'groupName', label: '分组' },
{ {
_action: 'equipment-bind-group-show-alert', _action: 'equipment-bind-group-show-alert',
label: '分组报警', label: '分组报警',
align: 'center',
subcomponent: { subcomponent: {
props: ['injectData'], props: ['injectData'],
render: function (h) { render: function (h) {
@ -162,6 +161,9 @@ export default {
label: '设备', label: '设备',
url: '/base/equipment/page?pageNo=1&pageSize=100', url: '/base/equipment/page?pageNo=1&pageSize=100',
prop: 'equipmentId', prop: 'equipmentId',
bind: {
filterable: true,
},
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
}, },
], ],
@ -173,6 +175,9 @@ export default {
// depends: '__product_line', // 线 // depends: '__product_line', // 线
// depends: 'productionLineId', // depends: 'productionLineId',
prop: 'groupId', prop: 'groupId',
bind: {
filterable: true,
},
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
}, },
], ],
@ -223,7 +228,7 @@ export default {
/** 查询列表 */ /** 查询列表 */
getList() { getList() {
this.loading = true; this.loading = true;
_// _; //
getEquipmentBindGroupPage(this.queryParams).then((response) => { getEquipmentBindGroupPage(this.queryParams).then((response) => {
this.list = response.data.list; this.list = response.data.list;
this.total = response.data.total; this.total = response.data.total;

View File

@ -83,28 +83,26 @@ export default {
width: 180, width: 180,
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'), filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
}, },
{ prop: 'productionLine', label: '产线名称', align: 'center' }, { prop: 'productionLine', label: '产线名称' },
{ prop: 'workshopSection', label: '工段名称', align: 'center' }, { prop: 'workshopSection', label: '工段名称' },
{ prop: 'equipment', label: '设备名称', align: 'center' }, { prop: 'equipment', label: '设备名称' },
{ prop: 'sort', label: '工段中排序', align: 'center' }, { prop: 'sort', label: '工段中排序' },
{ {
prop: 'lineDataType', prop: 'lineDataType',
label: '产线数据类型', label: '产线数据类型',
align: 'center',
filter: (val) => filter: (val) =>
val != null ? ['无类型', '进口计数', '出口计数'][val] : '-', val != null ? ['无类型', '进口计数', '出口计数'][val] : '-',
}, },
{ {
prop: 'sectionDataType', prop: 'sectionDataType',
label: '工段数据类型', label: '工段数据类型',
align: 'center',
filter: (val) => filter: (val) =>
val != null ? ['无类型', '进口计数', '出口计数'][val] : '-', val != null ? ['无类型', '进口计数', '出口计数'][val] : '-',
}, },
// { // {
// action: 'show-alert', // action: 'show-alert',
// label: '', // label: '',
// align: 'center', // ,
// subcomponent: { // subcomponent: {
// props: ['injectData'], // props: ['injectData'],
// render: function (h) { // render: function (h) {

View File

@ -84,13 +84,12 @@ export default {
width: 180, width: 180,
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'), filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
}, },
{ prop: 'name', label: '设备分组名称', align: 'center' }, { prop: 'name', label: '设备分组名称' },
{ prop: 'code', label: '检测分组编码', align: 'center' }, { prop: 'code', label: '设备分组编码' },
{ prop: 'remark', label: '备注', align: 'center' }, { prop: 'remark', label: '备注' },
{ {
_action: 'equipment-group-show-alert', _action: 'equipment-group-show-alert',
label: '报警', label: '报警',
align: 'center',
subcomponent: { subcomponent: {
props: ['injectData'], props: ['injectData'],
render: function (h) { render: function (h) {
@ -127,7 +126,7 @@ export default {
type: 'input', type: 'input',
label: '分组编码', label: '分组编码',
placeholder: '请输入设备分组编码', placeholder: '请输入设备分组编码',
param: 'codes', param: 'code',
}, },
{ {
type: 'button', type: 'button',
@ -172,6 +171,7 @@ export default {
label: '分组编码', label: '分组编码',
prop: 'code', prop: 'code',
url: '/base/equipment-group/getCode', url: '/base/equipment-group/getCode',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
}, },
], ],
[ [
@ -302,11 +302,7 @@ export default {
handleDelete(row) { handleDelete(row) {
const id = row.id; const id = row.id;
this.$modal this.$modal
.confirm( .confirm('是否确认删除设备分组 "' + row.name + '"?')
'是否确认删除设备分组(用于同类型不同厂家的设备区分)编号为"' +
id +
'"的数据项?'
)
.then(function () { .then(function () {
return deleteEquipmentGroup(id); return deleteEquipmentGroup(id);
}) })

View File

@ -0,0 +1,177 @@
<!--
filename: dialogForm.vue
author: liubin
date: 2023-09-11 15:55:13
description: DialogForm for equipmentBindSection only
-->
<template>
<el-form
ref="form"
:model="dataForm"
label-width="100px"
v-loading="formLoading">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item
label="报警编码"
prop="code"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-input
v-model="dataForm.code"
@change="$emit('update', dataForm)"
placeholder="请输入工段排序" />
</el-form-item>
<!--
<el-form-item
label="报警编码"
prop="code"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-select
v-model="dataForm.code"
placeholder="请选择产线"
@change="handleProductlineChange">
<el-option
v-for="opt in productionLineList"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item> -->
</el-col>
<el-col :span="12">
<el-form-item
label="报警类型"
prop="type"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-select
v-model="dataForm.type"
placeholder="请选择报警类型"
@change="$emit('update', dataForm)">
<el-option
v-for="opt in [
{ label: '布尔型', value: 2 },
{ label: '字符型', value: 1 },
]"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item
label="报警级别"
prop="grade"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-select
v-model="dataForm.grade"
placeholder="请选择报警级别"
@change="$emit('update', dataForm)">
<el-option
v-for="opt in getDictDatas(DICT_TYPE.EQU_ALARM_LEVEL)"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
v-if="+dataForm.type == 1"
label="设备报警编码"
prop="alarmCode">
<el-input
v-model="dataForm.alarmCode"
@change="$emit('update', dataForm)"
placeholder="请输入设备报警编码" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item
label="参数列名"
prop="plcParamName"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-input
v-model="dataForm.plcParamName"
placeholder="请输入参数列名"
@change="$emit('update', dataForm)"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="报警内容"
prop="alarmContent"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-input
v-model="dataForm.alarmContent"
placeholder="请输入报警内容"
@change="$emit('update', dataForm)"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
<script>
export default {
name: 'DialogForm',
model: {
prop: 'dataForm',
event: 'update',
},
emits: ['update'],
components: {},
props: {
dataForm: {
type: Object,
default: () => ({}),
},
},
data() {
return {
formLoading: true,
};
},
mounted() {
this.getCode('/base/equipment-group-alarm/getCode').then((code) => {
this.formLoading = false;
this.$emit('update', {
...this.dataForm,
code,
});
});
},
methods: {
/** 模拟透传 ref */
validate(cb) {
return this.$refs.form.validate(cb);
},
resetFields(args) {
return this.$refs.form.resetFields(args);
},
async handleProductlineChange(id) {
await this.getWorksectionList(id);
this.dataForm.workshopSectionId = null;
this.$emit('update', this.dataForm);
},
async getCode(url) {
const response = await this.$axios(url);
return response.data;
},
},
};
</script>
<style scoped lang="scss">
.el-date-editor,
.el-select {
width: 100%;
}
</style>

View File

@ -37,7 +37,7 @@
@close="cancel" @close="cancel"
@cancel="cancel" @cancel="cancel"
@confirm="submitForm"> @confirm="submitForm">
<DialogForm v-if="open" ref="form" :dataForm="form" :rows="rows" /> <DialogForm v-if="open" ref="form" v-model="form" :rows="rows" />
</base-dialog> </base-dialog>
</div> </div>
</template> </template>
@ -54,10 +54,11 @@ import {
import basicPageMixin from '@/mixins/lb/basicPageMixin'; import basicPageMixin from '@/mixins/lb/basicPageMixin';
import moment from 'moment'; import moment from 'moment';
import { publicFormatter } from '@/utils/dict'; import { publicFormatter } from '@/utils/dict';
import DialogForm from './dialogForm.vue';
export default { export default {
name: 'EquipmentGroupAlarm', name: 'EquipmentGroupAlarm',
components: {}, components: { DialogForm },
mixins: [basicPageMixin], mixins: [basicPageMixin],
data() { data() {
return { return {
@ -84,22 +85,27 @@ export default {
width: 180, width: 180,
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'), filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
}, },
{ prop: 'code', label: '报警编码', align: 'center' }, { width: 240, prop: 'code', label: '报警编码' },
{ prop: 'type', label: '报警类型', align: 'center' }, {
prop: 'type',
label: '报警类型',
filter: (val) =>
val != null ? ['-', '字符型', '布尔型', '-'][val] : '-',
},
{ {
prop: 'grade', prop: 'grade',
label: '报警级别', label: '报警级别',
align: 'center',
filter: publicFormatter(this.DICT_TYPE.EQU_ALARM_LEVEL), filter: publicFormatter(this.DICT_TYPE.EQU_ALARM_LEVEL),
}, },
{ prop: 'alarmCode', label: '设备报警编码', align: 'center' }, { prop: 'alarmCode', label: '设备报警编码' },
{ prop: 'plcParamName', label: '参数列名', align: 'center' }, { prop: 'plcParamName', label: '参数列名' },
{ prop: 'alarmContent', label: '报警内容', align: 'center' }, { prop: 'alarmContent', label: '报警内容' },
], ],
searchBarFormConfig: [ searchBarFormConfig: [
{ {
type: 'input', type: 'input',
label: '设备分组编码', label: '设备分组编码',
width: '220',
placeholder: '/', placeholder: '/',
param: 'equipmentGroupCode', param: 'equipmentGroupCode',
defaultSelect: null, defaultSelect: null,
@ -181,14 +187,14 @@ export default {
}, },
// //
form: { form: {
id: undefined, id: null,
equipmentGroupId: undefined, equipmentGroupId: null,
code: undefined, code: null,
type: undefined, type: null,
grade: undefined, grade: null,
alarmCode: undefined, alarmCode: null,
alarmContent: undefined, alarmContent: null,
plcParamName: undefined, plcParamName: null,
}, },
// // // //
// rules: { // rules: {
@ -249,14 +255,14 @@ export default {
/** 表单重置 */ /** 表单重置 */
reset() { reset() {
this.form = { this.form = {
id: undefined, id: null,
equipmentGroupId: undefined, equipmentGroupId: null,
code: undefined, code: null,
type: undefined, type: null,
grade: undefined, grade: null,
alarmCode: undefined, alarmCode: null,
alarmContent: undefined, alarmContent: null,
plcParamName: undefined, plcParamName: null,
}; };
this.resetForm('form'); this.resetForm('form');
}, },
@ -321,7 +327,7 @@ export default {
handleDelete(row) { handleDelete(row) {
const id = row.id; const id = row.id;
this.$modal this.$modal
.confirm('是否确认删除设备分组报警明细编号为"' + id + '"的数据项?') .confirm('是否确认删除该报警?')
.then(function () { .then(function () {
return deleteEquipmentGroupAlarm(id); return deleteEquipmentGroupAlarm(id);
}) })

View File

@ -12,6 +12,7 @@
:page="queryParams.pageNo" :page="queryParams.pageNo"
:limit="queryParams.pageSize" :limit="queryParams.pageSize"
:table-data="list" :table-data="list"
ref="pageTable"
@emitFun="handleEmitFun"> @emitFun="handleEmitFun">
<method-btn <method-btn
v-if="tableBtn.length" v-if="tableBtn.length"
@ -64,6 +65,7 @@ const switchBtn = {
}, },
methods: {}, methods: {},
render: function (h) { render: function (h) {
console.log("render....")
return h( return h(
'el-switch', 'el-switch',
{ {
@ -95,6 +97,7 @@ export default {
components: {}, components: {},
data() { data() {
return { return {
tableKey: Math.random(),
searchBarKeys: ['name', 'plcTableName'], searchBarKeys: ['name', 'plcTableName'],
tableBtn: [ tableBtn: [
this.$auth.hasPermi('base:equipment-plc:update') this.$auth.hasPermi('base:equipment-plc:update')
@ -118,17 +121,16 @@ export default {
// width: 180, // width: 180,
// filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'), // filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
// }, // },
{ prop: 'code', label: '编码', align: 'center' }, { prop: 'code', label: '编码' },
{ prop: 'plcTableName', label: '关联表名', align: 'center' }, { prop: 'plcTableName', label: '关联表名' },
{ prop: 'name', label: '标识名称', align: 'center' }, { prop: 'name', label: '标识名称' },
{ prop: 'enName', label: '英文名称', align: 'center' }, { prop: 'enName', label: '英文名称' },
{ {
prop: 'collection', prop: 'collection',
label: '是否采集', label: '是否采集',
align: 'center',
subcomponent: switchBtn, subcomponent: switchBtn,
}, },
{ prop: 'description', label: '描述', align: 'center' }, { prop: 'description', label: '描述' },
], ],
searchBarFormConfig: [ searchBarFormConfig: [
{ {
@ -267,6 +269,7 @@ export default {
this.list = response.data.list; this.list = response.data.list;
this.total = response.data.total; this.total = response.data.total;
this.loading = false; this.loading = false;
// this.tableKey = Math.random(); // method 1
}); });
}, },
/** 取消按钮 */ /** 取消按钮 */

View File

@ -61,7 +61,7 @@ export default {
components: {}, components: {},
data() { data() {
return { return {
searchBarKeys: ['name', 'plcTableName'], searchBarKeys: ['equipmentId', 'plcId'],
// tableBtn: [ // tableBtn: [
// this.$auth.hasPermi('base:equipment-plc:update') // this.$auth.hasPermi('base:equipment-plc:update')
// ? { // ? {
@ -98,18 +98,17 @@ export default {
// width: 180, // width: 180,
// filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'), // filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
// }, // },
{ prop: 'productionLine', label: '产线', align: 'center' }, { prop: 'productionLine', label: '产线' },
{ prop: 'workshopSection', label: '工段', align: 'center' }, { prop: 'workshopSection', label: '工段' },
{ prop: 'equipmentName', label: '设备名', align: 'center' }, { prop: 'equipmentName', label: '设备名' },
{ prop: 'equipmentCode', label: '设备编码', align: 'center' }, { prop: 'equipmentCode', label: '设备编码' },
{ prop: 'plcCode', label: '关联表编码', align: 'center' }, { prop: 'plcCode', label: '关联表编码' },
{ prop: 'plcTableName', label: '关联表名', align: 'center' }, { prop: 'plcTableName', label: '关联表名' },
{ prop: 'plcName', label: '标识名称', align: 'center' }, { prop: 'plcName', label: '标识名称' },
{ prop: 'bindingParameters', label: '绑定参数数量', align: 'center' }, { prop: 'bindingParameters', label: '绑定参数数量' },
{ {
_action: 'params-bind', _action: 'params-bind',
label: '查看绑定', label: '查看绑定',
align: 'center',
subcomponent: { subcomponent: {
props: ['injectData'], props: ['injectData'],
render: function (h) { render: function (h) {
@ -136,16 +135,18 @@ export default {
], ],
searchBarFormConfig: [ searchBarFormConfig: [
{ {
type: 'input', type: 'select',
label: '设备名', label: '设备名',
placeholder: '请输入设备名', placeholder: '请选择设备',
param: 'equipmentId', param: 'equipmentId',
selectOptions: [],
}, },
{ {
type: 'input', type: 'select',
label: '编码', label: 'PLC编码',
placeholder: '请输入编码', placeholder: '请选择编码',
param: 'plcId', param: 'plcId',
selectOptions: [],
}, },
{ {
type: 'button', type: 'button',
@ -207,8 +208,44 @@ export default {
}, },
created() { created() {
this.getList(); this.getList();
this.initSearchOptions();
}, },
methods: { methods: {
async getEquipmentOptions() {
const res = await this.$axios({
url: '/base/equipment/listAll',
method: 'get',
});
return res.data;
},
async getPlcOptions() {
const res = await this.$axios({
url: '/base/equipment-plc/listAll',
method: 'get',
});
return res.data;
},
/** 初始化查询条件 */
async initSearchOptions() {
Promise.all([this.getEquipmentOptions(), this.getPlcOptions()]).then(
([eqList, plcList]) => {
this.searchBarFormConfig[0].selectOptions = eqList.map((item) => {
return {
name: item.name,
id: item.id,
};
});
this.searchBarFormConfig[1].selectOptions = plcList.map((item) => {
return {
name: item.name,
id: item.id,
};
});
}
);
},
/** 覆盖 handleEmitFun 的默认实现 */ /** 覆盖 handleEmitFun 的默认实现 */
handleEmitFun({ action, payload }) { handleEmitFun({ action, payload }) {
switch (action) { switch (action) {

View File

@ -68,29 +68,27 @@ export default {
// width: 180, // width: 180,
// filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'), // filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
// }, // },
{ prop: 'plcParamName', label: '参数列名', align: 'center' }, { prop: 'plcParamName', label: '参数列名' },
{ prop: 'name', label: '参数名称', align: 'center' }, { prop: 'name', label: '参数名称' },
{ {
prop: 'unit', prop: 'unit',
label: '单位', label: '单位',
align: 'center',
filter: publicFormatter('unit_dict'), filter: publicFormatter('unit_dict'),
}, },
{ {
prop: 'collection', prop: 'collection',
label: '是否采集', label: '是否采集',
align: 'center',
filter: (val) => (val != null ? ['否', '是'][val] : '-'), filter: (val) => (val != null ? ['否', '是'][val] : '-'),
}, },
{ prop: 'minValue', label: '最小值', align: 'center' }, { prop: 'minValue', label: '最小值' },
{ prop: 'maxValue', label: '最大值', align: 'center' }, { prop: 'maxValue', label: '最大值' },
{ prop: 'defaultValue', label: '标准值', align: 'center' }, { prop: 'defaultValue', label: '标准值' },
{ prop: 'description', label: '描述', align: 'center' }, { prop: 'description', label: '描述' },
{ prop: 'remark', label: '备注', align: 'center' }, { prop: 'remark', label: '备注' },
// { // {
// _action: 'params-bind', // _action: 'params-bind',
// label: '', // label: '',
// align: 'center', // ,
// subcomponent: { // subcomponent: {
// props: ['injectData'], // props: ['injectData'],
// render: function (h) { // render: function (h) {
@ -157,7 +155,7 @@ export default {
{ {
type: 'number', type: 'number',
message: '请输入正确的数字', message: '请输入正确的数字',
trigger: 'blur', trigger: 'change',
transform: (val) => Number(val), transform: (val) => Number(val),
}, },
], ],
@ -167,10 +165,13 @@ export default {
label: '最大值', label: '最大值',
prop: 'maxValue', prop: 'maxValue',
rules: [ rules: [
{
required: false,
},
{ {
type: 'number', type: 'number',
message: '请输入正确的数字', message: '请输入正确的数字',
trigger: 'blur', trigger: 'change',
transform: (val) => Number(val), transform: (val) => Number(val),
}, },
], ],
@ -349,8 +350,8 @@ export default {
plcParamName: undefined, plcParamName: undefined,
name: undefined, name: undefined,
unit: undefined, unit: undefined,
minValue: undefined, minValue: null,
maxValue: undefined, maxValue: null,
defaultValue: undefined, defaultValue: undefined,
collection: undefined, collection: undefined,
description: undefined, description: undefined,

View File

@ -147,15 +147,14 @@ export default {
width: 180, width: 180,
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'), filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
}, },
{ prop: 'name', label: '设备名称', align: 'center' }, { prop: 'name', label: '设备名称' },
{ prop: 'code', label: '检测编码', align: 'center' }, { prop: 'code', label: '检测编码' },
{ prop: 'equipmentType', label: '设备类型', align: 'center' }, { prop: 'equipmentType', label: '设备类型' },
{ prop: 'enName', label: '英文名称', align: 'center' }, { prop: 'enName', label: '英文名称' },
{ prop: 'abbr', label: '缩写', align: 'center' }, { prop: 'abbr', label: '缩写' },
{ {
action: 'show-detail', action: 'show-detail',
label: '详情', label: '详情',
align: 'center',
subcomponent: { subcomponent: {
props: ['injectData'], props: ['injectData'],
render: function (h) { render: function (h) {
@ -377,8 +376,8 @@ export default {
width: 180, width: 180,
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'), filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
}, },
{ prop: 'name', label: '属性名称', align: 'center' }, { prop: 'name', label: '属性名称' },
{ prop: 'value', label: '属性值', align: 'center' }, { prop: 'value', label: '属性值' },
], ],
// //
open: false, open: false,

View File

@ -85,9 +85,9 @@ export default {
width: 180, width: 180,
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'), filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
}, },
{ prop: 'name', label: '设备类型名称', align: 'center' }, { prop: 'name', label: '设备类型名称', },
{ prop: 'code', label: '检测类型编码', align: 'center' }, { prop: 'code', label: '检测类型编码', },
{ prop: 'remark', label: '备注', align: 'center' }, { prop: 'remark', label: '备注', },
], ],
searchBarFormConfig: [ searchBarFormConfig: [
{ {

View File

@ -86,84 +86,72 @@ export default {
// : undefined, // : undefined,
// ].filter((v) => v), // ].filter((v) => v),
tableProps: [ tableProps: [
{ prop: 'factoryName', label: '工厂', align: 'center' }, { prop: 'factoryName', label: '工厂' },
{ prop: 'lineName', label: '产线', align: 'center' }, { prop: 'lineName', label: '产线' },
{ prop: 'sectionName', label: '工段', align: 'center' }, { prop: 'sectionName', label: '工段' },
{ prop: 'equipmentName', label: '设备', align: 'center' }, { prop: 'equipmentName', label: '设备' },
{ {
label: '有效时间', label: '有效时间',
align: 'center',
children: [ children: [
{ {
width: 128, width: 128,
prop: 'workTime', prop: 'workTime',
label: '工作时长', label: '工作时长',
align: 'center',
}, },
{ {
width: 128, width: 128,
prop: 'workRate', prop: 'workRate',
label: '百分比', label: '百分比',
align: 'center',
filter: (val) => (val != null ? +val.toFixed(3) : '-'), filter: (val) => (val != null ? +val.toFixed(3) : '-'),
}, },
], ],
}, },
{ {
label: '关机时间', label: '关机时间',
align: 'center',
children: [ children: [
{ {
width: 128, width: 128,
prop: 'stopTime', prop: 'stopTime',
label: '停机时长', label: '停机时长',
align: 'center',
}, },
{ width: 128, prop: 'stopRate', label: '百分比', align: 'center' }, { width: 128, prop: 'stopRate', label: '百分比' },
], ],
}, },
{ {
label: '中断损失', label: '中断损失',
align: 'center',
children: [ children: [
{ {
width: 128, width: 128,
prop: 'downTime', prop: 'downTime',
label: '故障时长', label: '故障时长',
align: 'center',
filter: (val) => (val != null ? +val.toFixed(3) : '-'), filter: (val) => (val != null ? +val.toFixed(3) : '-'),
}, },
{ width: 128, prop: 'downRate', label: '百分比', align: 'center' }, { width: 128, prop: 'downRate', label: '百分比' },
{ {
width: 128, width: 128,
prop: 'timeEfficiency', prop: 'timeEfficiency',
label: '时间开动率', label: '时间开动率',
align: 'center',
filter: (val) => (val != null ? +val.toFixed(3) : '-'), filter: (val) => (val != null ? +val.toFixed(3) : '-'),
}, },
], ],
}, },
{ {
label: '速度损失', label: '速度损失',
align: 'center',
children: [ children: [
{ {
width: 128, width: 128,
prop: 'realProcSpeed', prop: 'realProcSpeed',
label: '实际加工速度', label: '实际加工速度',
align: 'center',
}, },
{ {
width: 128, width: 128,
prop: 'designProcSpeed', prop: 'designProcSpeed',
label: '理论加工速度', label: '理论加工速度',
align: 'center',
}, },
{ {
width: 128, width: 128,
prop: 'peEfficiency', prop: 'peEfficiency',
label: '速度开动率', label: '速度开动率',
align: 'center',
filter: (val) => (val != null ? +val.toFixed(3) : '-'), filter: (val) => (val != null ? +val.toFixed(3) : '-'),
}, },
], ],
@ -171,19 +159,17 @@ export default {
{ {
prop: 'oee', prop: 'oee',
label: 'OEE', label: 'OEE',
align: 'center',
filter: (val) => (val != null ? +val.toFixed(3) : '-'), filter: (val) => (val != null ? +val.toFixed(3) : '-'),
}, },
{ {
prop: 'teep', prop: 'teep',
label: 'TEEP', label: 'TEEP',
align: 'center',
filter: (val) => (val != null ? +val.toFixed(3) : '-'), filter: (val) => (val != null ? +val.toFixed(3) : '-'),
}, },
// { // {
// _action: 'view-trend', // _action: 'view-trend',
// label: '', // label: '',
// align: 'center', // ,
// subcomponent: { // subcomponent: {
// props: ['injectData'], // props: ['injectData'],
// render: function (h) { // render: function (h) {

View File

@ -65,24 +65,22 @@ export default {
: undefined, : undefined,
].filter((v) => v), ].filter((v) => v),
tableProps: [ tableProps: [
{ prop: 'lineName', label: '产线', align: 'center' }, { prop: 'lineName', label: '产线' },
{ prop: 'sectionName', label: '工段', align: 'center' }, { prop: 'sectionName', label: '工段' },
{ prop: 'equipmentName', label: '设备', align: 'center' }, { prop: 'equipmentName', label: '设备' },
{ {
width: 188, width: 188,
prop: 'mtbf', prop: 'mtbf',
label: '平均故障间隔时间[MTBF](h)', label: '平均故障间隔时间[MTBF](h)',
align: 'center',
}, },
{ {
width: 180, width: 180,
prop: 'mttr', prop: 'mttr',
label: '平均维修时间[MTTR](h)', label: '平均维修时间[MTTR](h)',
align: 'center',
}, },
{ prop: 'workTime', label: '工作时长(h)', align: 'center' }, { prop: 'workTime', label: '工作时长(h)' },
{ prop: 'downTime', label: '故障时长(h)', align: 'center' }, { prop: 'downTime', label: '故障时长(h)' },
{ prop: 'downCount', label: '故障次数', align: 'center' }, { prop: 'downCount', label: '故障次数' },
], ],
searchBarFormConfig: [ searchBarFormConfig: [
{ {
@ -163,9 +161,7 @@ export default {
moment() moment()
.month(btn.month - 1) .month(btn.month - 1)
.format('YYYY-MM') + '-01 00:00:00', .format('YYYY-MM') + '-01 00:00:00',
moment() moment().month(btn.month).format('YYYY-MM') + '-01 00:00:00',
.month(btn.month)
.format('YYYY-MM')+'-01 00:00:00',
]; ];
} else { } else {
this.queryParams.recordTime = null; this.queryParams.recordTime = null;

View File

@ -35,6 +35,7 @@
</template> </template>
<script> <script>
import moment from 'moment';
import LineChart from './components/lineChart.vue'; import LineChart from './components/lineChart.vue';
export default { export default {
@ -42,6 +43,8 @@ export default {
components: { LineChart }, components: { LineChart },
props: {}, props: {},
data() { data() {
const now = new Date();
const [y, m, d] = [now.getFullYear(), now.getMonth(), now.getDate()];
return { return {
dialogVisible: false, dialogVisible: false,
urls: { urls: {
@ -72,13 +75,30 @@ export default {
dateType: 'daterange', // datetimerange dateType: 'daterange', // datetimerange
// format: 'yyyy-MM-dd HH:mm:ss', // format: 'yyyy-MM-dd HH:mm:ss',
format: 'yyyy-MM-dd', format: 'yyyy-MM-dd',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
// valueFormat: 'timestamp', // valueFormat: 'timestamp',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
rangeSeparator: '-', rangeSeparator: '-',
startPlaceholder: '开始日期', startPlaceholder: '开始日期',
endPlaceholder: '结束日期', endPlaceholder: '结束日期',
defaultTime: ['00:00:00', '23:59:59'],
param: 'recordTime', param: 'recordTime',
defaultSelect: [
new Date(y, m, d)
.toLocaleString()
.split('/')
.map((item, index) => {
if (index == 1 || index == 2) return item.padStart(2, '0');
return item;
})
.join('-'),
new Date(y, m, d, 23, 59, 59)
.toLocaleString()
.split('/')
.map((item, index) => {
if (index == 1 || index == 2) return item.padStart(2, '0');
return item;
})
.join('-'),
],
}, },
{ {
type: 'button', type: 'button',
@ -86,9 +106,9 @@ export default {
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },
{ // {
type: 'separate', // type: 'separate',
}, // },
// { // {
// type: 'button', // type: 'button',
// btnName: '', // btnName: '',
@ -111,43 +131,36 @@ export default {
// width: 160, // width: 160,
prop: 'sectionName', prop: 'sectionName',
label: '工段', label: '工段',
align: 'center',
}, },
{ {
// width: 160, // width: 160,
prop: 'equipmentName', prop: 'equipmentName',
label: '设备名称', label: '设备名称',
align: 'center',
}, },
{ {
// width: 160, // width: 160,
prop: 'products', prop: 'products',
label: '产品名称', label: '产品名称',
align: 'center',
}, },
{ {
// width: 160, // width: 160,
prop: 'inQuantity', prop: 'inQuantity',
label: '进片数量', label: '进片数量',
align: 'center',
}, },
{ {
// width: 160, // width: 160,
prop: 'outQuantity', prop: 'outQuantity',
label: '出片数量', label: '出片数量',
align: 'center',
}, },
{ {
// width: 160, // width: 160,
prop: 'nokQuantity', prop: 'nokQuantity',
label: '破损/不合格数', label: '破损/不合格数',
align: 'center',
}, },
{ {
// width: 160, // width: 160,
prop: 'passRate', prop: 'passRate',
label: '合格率', label: '合格率',
align: 'center',
}, },
], ],
lineChartConfig: { lineChartConfig: {
@ -167,7 +180,7 @@ export default {
itemGap: 20, itemGap: 20,
textStyle: { textStyle: {
fontSize: 14, fontSize: 14,
lineHeight: 14 lineHeight: 14,
}, },
}, },
xAxis: { xAxis: {
@ -180,9 +193,9 @@ export default {
nameLocation: 'end', nameLocation: 'end',
nameTextStyle: { nameTextStyle: {
fontSize: 14, fontSize: 14,
align: 'right' align: 'right',
}, },
nameGap: 26 nameGap: 26,
}, },
series: [ series: [
{ {

View File

@ -81,13 +81,12 @@ export default {
: undefined, : undefined,
].filter((v) => v), ].filter((v) => v),
tableProps: [ tableProps: [
{ width: 128, prop: 'productionLine', label: '产线', align: 'center' }, { width: 128, prop: 'productionLine', label: '产线' },
{ width: 128, prop: 'workshopSection', label: '工段', align: 'center' }, { width: 128, prop: 'workshopSection', label: '工段' },
{ width: 128, prop: 'equipment', label: '设备名称', align: 'center' }, { width: 128, prop: 'equipment', label: '设备名称' },
{ {
prop: 'alarmGrade', prop: 'alarmGrade',
label: '报警级别', label: '报警级别',
align: 'center',
filter: publicFormatter(this.DICT_TYPE.EQU_ALARM_LEVEL), filter: publicFormatter(this.DICT_TYPE.EQU_ALARM_LEVEL),
}, },
{ {
@ -96,11 +95,11 @@ export default {
width: 180, width: 180,
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'), filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
}, },
{ prop: 'alarmContent', label: '报警内容', align: 'center' }, { prop: 'alarmContent', label: '报警内容' },
// { // {
// _action: 'equipment-group-show-alert', // _action: 'equipment-group-show-alert',
// label: '', // label: '',
// align: 'center', // ,
// subcomponent: { // subcomponent: {
// props: ['injectData'], // props: ['injectData'],
// render: function (h) { // render: function (h) {

View File

@ -35,7 +35,9 @@
" /> " />
</div> </div>
</div> </div>
<div v-else style="margin-top: 20px; color: #c7c7c7; text-align: center;">暂无数据</div> <div v-else style="margin-top: 20px; color: #c7c7c7; text-align: center">
暂无数据
</div>
</div> </div>
</template> </template>
@ -139,19 +141,16 @@ export default {
width: 48, width: 48,
prop: 'index', prop: 'index',
label: '序号', label: '序号',
align: 'center',
}, },
{ {
width: 160, width: 160,
prop: 'time', prop: 'time',
label: '时间', label: '时间',
align: 'center',
}, },
{ {
width: 200, width: 200,
prop: 'plcCode', prop: 'plcCode',
label: 'PLC编码', label: 'PLC编码',
align: 'center',
}, },
]; ];
const firstLineData = { const firstLineData = {
@ -162,7 +161,6 @@ export default {
otherList.forEach((item) => { otherList.forEach((item) => {
props.push({ props.push({
label: item.name, label: item.name,
align: 'center',
prop: item.name, prop: item.name,
width: 128, width: 128,
}); });

View File

@ -25,7 +25,7 @@ export default {
grid: { grid: {
top: 64, top: 64,
left: 56, left: 56,
right: 24, right: 64,
bottom: 56, bottom: 56,
}, },
title: { title: {
@ -64,6 +64,10 @@ export default {
color: '#ccc', color: '#ccc',
}, },
}, },
name: '数量',
nameTextStyle: {
fontSize: 14,
},
}, },
series: [ series: [
{ {

View File

@ -197,11 +197,11 @@ export default {
// }, // },
], ],
tableProps: [ tableProps: [
{ prop: 'lineName', label: '产线', align: 'center' }, { prop: 'lineName', label: '产线', },
{ prop: 'sectionName', label: '工段', align: 'center' }, { prop: 'sectionName', label: '工段', },
{ prop: 'externalCode', label: '设备编码', align: 'center' }, { prop: 'externalCode', label: '设备编码', },
{ prop: 'equipmentName', label: '设备名称', align: 'center' }, { prop: 'equipmentName', label: '设备名称', },
{ prop: 'totalQuantity', label: '加工数量', align: 'center' }, { prop: 'totalQuantity', label: '加工数量', },
], ],
mode: 'table', // table | graph mode: 'table', // table | graph
queryParams: { queryParams: {

View File

@ -12,15 +12,7 @@
ref="search-bar" /> ref="search-bar" />
<el-skeleton v-if="initing" :rows="6" animated /> <el-skeleton v-if="initing" :rows="6" animated />
<div v-else> <div v-else>
<div <div v-if="noData" class="no-data">没有数据</div>
v-if="noData"
style="
height: 240px;
background: url(../../../assets/images/no-data-bg.png) 100% / contain
no-repeat;
">
没有数据
</div>
<base-table <base-table
v-else v-else
:span-method="mergeColumnHandler" :span-method="mergeColumnHandler"
@ -63,24 +55,22 @@ export default {
} = item; } = item;
const props = [ const props = [
{ prop: 'productLine', label: '产线', align: 'center' }, { prop: 'productLine', label: '产线' },
{ prop: 'specification', label: '规格', align: 'center' }, { prop: 'specification', label: '规格' },
{ prop: 'equipmentName', label: '设备', align: 'center' }, { prop: 'equipmentName', label: '设备' },
{ prop: 'totalQuantity', label: '生产总数', align: 'center' }, { prop: 'totalQuantity', label: '生产总数' },
]; ];
for (const key of Object.keys(hourData).sort()) { for (const key of Object.keys(hourData).sort()) {
const subprop = { const subprop = {
label: key, label: key,
align: 'center',
children: [ children: [
{ prop: key + '__in', label: '进数据', align: 'center' }, { prop: key + '__in', label: '进数据' },
{ prop: key + '__out', label: '出数据', align: 'center' }, { prop: key + '__out', label: '出数据' },
{ prop: key + '__nok', label: '报废数据', align: 'center' }, { prop: key + '__nok', label: '报废数据' },
{ {
prop: key + '__ratio', prop: key + '__ratio',
label: '报废率', label: '报废率',
align: 'center',
filter: (val) => (val != null ? val + ' %' : '-'), filter: (val) => (val != null ? val + ' %' : '-'),
}, },
], ],
@ -197,4 +187,16 @@ pre {
code { code {
font-family: 'IntelOne Mono', 'Ubuntu', 'Courier New', Courier, monospace; font-family: 'IntelOne Mono', 'Ubuntu', 'Courier New', Courier, monospace;
} }
.no-data {
display: grid;
place-content: center;
padding-top: 180px;
color: #ccc;
font-size: 14px;
letter-spacing: 2px;
height: 30vh;
background: url(../../../assets/images/no-data-bg.png) 50% 50% / contain
no-repeat;
}
</style> </style>

View File

@ -74,28 +74,24 @@ export default {
width: 128, width: 128,
prop: 'equipmentName', prop: 'equipmentName',
label: '设备名称', label: '设备名称',
align: 'center',
}, },
{ {
width: 128, width: 128,
prop: 'equipmentCode', prop: 'equipmentCode',
label: '设备编码', label: '设备编码',
align: 'center',
}, },
{ width: 128, prop: 'inQuantity', label: '投入数', align: 'center' }, { width: 128, prop: 'inQuantity', label: '投入数' },
{ width: 128, prop: 'outQuantity', label: '产出数', align: 'center' }, { width: 128, prop: 'outQuantity', label: '产出数' },
{ {
width: 128, width: 128,
prop: 'run', prop: 'run',
label: '是否运行', label: '是否运行',
align: 'center',
filter: (val) => (val != null ? (val ? '是' : '否') : '-'), filter: (val) => (val != null ? (val ? '是' : '否') : '-'),
}, },
{ {
width: 128, width: 128,
prop: 'status', prop: 'status',
label: '状态', label: '状态',
align: 'center',
filter: (val) => filter: (val) =>
val != null ? ['正常', '计划停机', '故障'][val] : '-', val != null ? ['正常', '计划停机', '故障'][val] : '-',
}, },
@ -103,7 +99,6 @@ export default {
width: 128, width: 128,
prop: 'error', prop: 'error',
label: '是否故障', label: '是否故障',
align: 'center',
filter: (val) => (val != null ? (val ? '是' : '否') : '-'), filter: (val) => (val != null ? (val ? '是' : '否') : '-'),
}, },
{ {
@ -121,7 +116,6 @@ export default {
{ {
_action: 'params-monitor', _action: 'params-monitor',
label: '参数监控', label: '参数监控',
align: 'center',
subcomponent: { subcomponent: {
props: ['injectData'], props: ['injectData'],
render: function (h) { render: function (h) {

View File

@ -176,40 +176,36 @@ export default {
width: 128, width: 128,
prop: 'productionName', prop: 'productionName',
label: '产线', label: '产线',
align: 'center',
}, },
{ {
width: 128, width: 128,
prop: 'sectionName', prop: 'sectionName',
label: '工段', label: '工段',
align: 'center',
}, },
{ {
width: 128, width: 128,
prop: 'inspectionDetContent', prop: 'inspectionDetContent',
label: '检测内容', label: '检测内容',
align: 'center',
}, },
{ {
width: 160, width: 160,
prop: 'buttonId', prop: 'buttonId',
label: '按钮盒识别码', label: '按钮盒识别码',
align: 'center',
}, },
// { // {
// width: 256, // width: 256,
// prop: 'productionId', // prop: 'productionId',
// label: '线ID', // label: '线ID',
// align: 'center', // ,
// }, // },
// { // {
// width: 256, // width: 256,
// prop: 'sectionId', // prop: 'sectionId',
// label: 'ID', // label: 'ID',
// align: 'center', // ,
// }, // },
{ width: 90, prop: 'keyValue', label: '按钮值', align: 'center' }, { width: 90, prop: 'keyValue', label: '按钮值' },
{ width: 128, prop: 'model', label: '按钮盒模式', align: 'center' }, { width: 128, prop: 'model', label: '按钮盒模式' },
], ],
// //
queryParams: { queryParams: {
@ -220,13 +216,13 @@ export default {
// keys, queryParams pageNo, pageSize key // keys, queryParams pageNo, pageSize key
searchBarKeys: ['inspectionDetContent'], searchBarKeys: ['inspectionDetContent'],
form: { form: {
id: undefined, id: null,
inspectionDetId: undefined, inspectionDetId: null,
inspectionDetContent: undefined, inspectionDetContent: null,
productionId: undefined, productionId: null,
sectionId: undefined, sectionId: null,
model: undefined, model: null,
keyValue: undefined, keyValue: null,
}, },
}; };
}, },
@ -247,13 +243,13 @@ export default {
/** 表单重置 */ /** 表单重置 */
reset() { reset() {
this.form = { this.form = {
id: undefined, id: null,
inspectionDetId: undefined, inspectionDetId: null,
inspectionDetContent: undefined, inspectionDetContent: null,
productionId: undefined, productionId: null,
sectionId: undefined, sectionId: null,
model: undefined, model: null,
keyValue: undefined, keyValue: null,
}; };
this.resetForm('form'); this.resetForm('form');
}, },

View File

@ -172,10 +172,10 @@ export default {
width: 180, width: 180,
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'), filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
}, },
{ prop: 'typeName', label: '类型名称', align: 'center' }, { prop: 'typeName', label: '类型名称', },
{ prop: 'content', label: '检测内容', align: 'center' }, { prop: 'content', label: '检测内容', },
{ prop: 'code', label: '检测编码', align: 'center' }, { prop: 'code', label: '检测编码', },
{ prop: 'remark', label: '备注', align: 'center' }, { prop: 'remark', label: '备注', },
], ],
// //
queryParams: { queryParams: {

View File

@ -106,9 +106,9 @@ export default {
width: 180, width: 180,
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'), filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
}, },
{ prop: 'name', label: '检测类型名称', align: 'center' }, { prop: 'name', label: '检测类型名称' },
{ prop: 'code', label: '检测类型编码', align: 'center' }, { prop: 'code', label: '检测类型编码' },
{ prop: 'remark', label: '备注', align: 'center' }, { prop: 'remark', label: '备注' },
// { // {
// label: '', // label: '',
// alignt: 'center', // alignt: 'center',
@ -321,7 +321,7 @@ export default {
handleDelete(row) { handleDelete(row) {
const id = row.id; const id = row.id;
this.$modal this.$modal
.confirm('是否确认删除质量检测类型基础编号为"' + id + '"的数据项?') .confirm('是否确认删除质量检测类型?')
.then(function () { .then(function () {
return deleteQualityInspectionType(id); return deleteQualityInspectionType(id);
}) })

View File

@ -213,32 +213,27 @@ export default {
width: 128, width: 128,
prop: 'inspectionDetContent', prop: 'inspectionDetContent',
label: '检测内容', label: '检测内容',
align: 'center',
}, },
{ {
// width: 128, // width: 128,
prop: 'lineName', prop: 'lineName',
label: '产线', label: '产线',
align: 'center',
}, },
{ {
// width: 128, // width: 128,
prop: 'checkPerson', prop: 'checkPerson',
label: '检测人员', label: '检测人员',
align: 'center',
}, },
{ {
// width: 160, // width: 160,
prop: 'checkTime', prop: 'checkTime',
label: '检测时间', label: '检测时间',
align: 'center',
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'), filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
}, },
{ {
width: 90, width: 90,
prop: 'source', prop: 'source',
label: '来源', label: '来源',
align: 'center',
filter: (val) => ['未知', '手动', '自动'][val], filter: (val) => ['未知', '手动', '自动'][val],
}, },
], ],

View File

@ -56,7 +56,6 @@ export default {
{ {
prop: 'inspectionContent', prop: 'inspectionContent',
label: '检测内容', label: '检测内容',
align: 'center',
}, },
], ],
}; };

View File

@ -35,27 +35,22 @@ export default {
{ {
prop: 'lineName', prop: 'lineName',
label: '产线', label: '产线',
align: 'center',
}, },
{ {
prop: 'sumUp', prop: 'sumUp',
label: '上片总数', label: '上片总数',
align: 'center',
}, },
{ {
prop: 'sumDown', prop: 'sumDown',
label: '下片总数', label: '下片总数',
align: 'center',
}, },
{ {
prop: 'sumCheck', prop: 'sumCheck',
label: '检测总数', label: '检测总数',
align: 'center',
}, },
{ {
prop: 'scrapRatio', prop: 'scrapRatio',
label: '比例(%)', label: '比例(%)',
align: 'center',
}, },
], ],
}; };

View File

@ -171,20 +171,17 @@ export default {
// width: 160, // width: 160,
prop: 'inspectionContent', prop: 'inspectionContent',
label: '检测内容', label: '检测内容',
align: 'center',
}, },
...this.dynamicProps, ...this.dynamicProps,
{ {
// width: 128, // width: 128,
prop: 'sumInput', prop: 'sumInput',
label: '检测类型总数', label: '检测类型总数',
align: 'center',
}, },
{ {
// width: 128, // width: 128,
prop: 'ratio', prop: 'ratio',
label: '比例', label: '比例',
align: 'center',
// subcomponent: { // subcomponent: {
// name: 'TextOnly', // name: 'TextOnly',
// props: { // props: {
@ -381,47 +378,47 @@ export default {
// width: 128, // width: 128,
// prop: 'line1', // prop: 'line1',
// label: '线1', // label: '线1',
// align: 'center', // ,
// }, // },
// { // {
// width: 128, // width: 128,
// prop: 'line2', // prop: 'line2',
// label: '线2', // label: '线2',
// align: 'center', // ,
// }, // },
// { // {
// width: 128, // width: 128,
// prop: 'line3', // prop: 'line3',
// label: '线3', // label: '线3',
// align: 'center', // ,
// }, // },
// { // {
// width: 128, // width: 128,
// prop: 'line4', // prop: 'line4',
// label: '线4', // label: '线4',
// align: 'center', // ,
// }, // },
// { // {
// width: 128, // width: 128,
// prop: 'line5', // prop: 'line5',
// label: '线5', // label: '线5',
// align: 'center', // ,
// }, // },
// { // {
// width: 128, // width: 128,
// prop: 'line6', // prop: 'line6',
// label: '线6', // label: '线6',
// align: 'center', // ,
// }, // },
// { // {
// width: 128, // width: 128,
// prop: 'line7', // prop: 'line7',
// label: '线7', // label: '线7',
// align: 'center', // ,
// }, // },
// { // {
// width: 128, // width: 128,
// prop: 'line8', // prop: 'line8',
// label: '线8', // label: '线8',
// align: 'center', // ,
// }, --> // }, -->