Merge branch 'projects/mes-test' of git.picaiba.com:mt-fe-group/yudao-dev into projects/mes-test

This commit is contained in:
gtz 2023-11-22 14:15:39 +08:00
commit dcbb2c719b
55 changed files with 886 additions and 1428 deletions

View File

@ -1,3 +1,10 @@
/*
* @Author: zhp
* @Date: 2023-10-17 09:26:38
* @LastEditTime: 2023-11-20 15:50:08
* @LastEditors: zhp
* @Description:
*/
import request from '@/utils/request' import request from '@/utils/request'
// 创建质量检测信息基础 // 创建质量检测信息基础
@ -52,3 +59,11 @@ export function exportQualityInspectionDetExcel(query) {
responseType: 'blob' responseType: 'blob'
}) })
} }
export function getQualityInspectionDetList(query) {
return request({
url: '/base/quality-inspection-det/listAll',
method: 'get',
params: query
})
}

View File

@ -65,6 +65,7 @@
v-if="col.subcomponent" v-if="col.subcomponent"
:key="col.key" :key="col.key"
:disabled="disabled" :disabled="disabled"
:read-only="disabled"
:is="col.subcomponent" :is="col.subcomponent"
v-model="form[col.prop]" v-model="form[col.prop]"
:inlineStyle="col.style" :inlineStyle="col.style"

View File

@ -1,5 +1,5 @@
<template> <template>
<div> <div :class="[readOnly ? 'editor-wrapper' : '']">
<el-upload <el-upload
:action="uploadFileUrl" :action="uploadFileUrl"
:before-upload="handleBeforeUpload" :before-upload="handleBeforeUpload"
@ -10,27 +10,25 @@
:headers="headers" :headers="headers"
style="display: none" style="display: none"
ref="upload" ref="upload"
v-if="this.type === 'url'" v-if="this.type === 'url'"></el-upload>
>
</el-upload>
<div class="editor" ref="editor" :style="styles"></div> <div class="editor" ref="editor" :style="styles"></div>
</div> </div>
</template> </template>
<script> <script>
import Quill from "quill"; import Quill from 'quill';
import "quill/dist/quill.core.css"; import 'quill/dist/quill.core.css';
import "quill/dist/quill.snow.css"; import 'quill/dist/quill.snow.css';
import "quill/dist/quill.bubble.css"; import 'quill/dist/quill.bubble.css';
import { getAccessToken } from "@/utils/auth"; import { getAccessToken } from '@/utils/auth';
export default { export default {
name: "Editor", name: 'Editor',
props: { props: {
/* 编辑器的内容 */ /* 编辑器的内容 */
value: { value: {
type: String, type: String,
default: "", default: '',
}, },
/* 高度 */ /* 高度 */
height: { height: {
@ -55,35 +53,36 @@ export default {
/* 类型base64格式、url格式 */ /* 类型base64格式、url格式 */
type: { type: {
type: String, type: String,
default: "url", default: 'url',
} },
}, },
data() { data() {
return { return {
uploadFileUrl: process.env.VUE_APP_BASE_API + "/admin-api/infra/file/upload", // uploadFileUrl:
headers: { Authorization: "Bearer " + getAccessToken() }, // process.env.VUE_APP_BASE_API + '/admin-api/infra/file/upload', //
headers: { Authorization: 'Bearer ' + getAccessToken() }, //
Quill: null, Quill: null,
currentValue: "", currentValue: '',
options: { options: {
theme: "snow", theme: 'snow',
bounds: document.body, bounds: document.body,
debug: "warn", debug: 'warn',
modules: { modules: {
// //
toolbar: [ toolbar: [
["bold", "italic", "underline", "strike"], // 线 线 ['bold', 'italic', 'underline', 'strike'], // 线 线
["blockquote", "code-block"], // ['blockquote', 'code-block'], //
[{ list: "ordered" }, { list: "bullet" }], // [{ list: 'ordered' }, { list: 'bullet' }], //
[{ indent: "-1" }, { indent: "+1" }], // [{ indent: '-1' }, { indent: '+1' }], //
[{ size: ["small", false, "large", "huge"] }], // [{ size: ['small', false, 'large', 'huge'] }], //
[{ header: [1, 2, 3, 4, 5, 6, false] }], // [{ header: [1, 2, 3, 4, 5, 6, false] }], //
[{ color: [] }, { background: [] }], // [{ color: [] }, { background: [] }], //
[{ align: [] }], // [{ align: [] }], //
["clean"], // ['clean'], //
["link", "image", "video"] // ['link', 'image', 'video'], //
], ],
}, },
placeholder: "请输入内容", placeholder: '请输入内容',
readOnly: true, readOnly: true,
}, },
}; };
@ -104,7 +103,7 @@ export default {
value: { value: {
handler(val) { handler(val) {
if (val !== this.currentValue) { if (val !== this.currentValue) {
this.currentValue = val === null ? "" : val; this.currentValue = val === null ? '' : val;
if (this.Quill) { if (this.Quill) {
this.Quill.pasteHTML(this.currentValue); this.Quill.pasteHTML(this.currentValue);
} }
@ -124,41 +123,41 @@ export default {
const editor = this.$refs.editor; const editor = this.$refs.editor;
this.Quill = new Quill(editor, this.options); this.Quill = new Quill(editor, this.options);
// start // start
this.$nextTick(()=>{ this.$nextTick(() => {
this.Quill.blur(); this.Quill.blur();
if(!this.readOnly){ if (!this.readOnly) {
this.Quill.enable(); this.Quill.enable();
} }
}); });
// //
if (this.type === 'url') { if (this.type === 'url') {
let toolbar = this.Quill.getModule("toolbar"); let toolbar = this.Quill.getModule('toolbar');
toolbar.addHandler("image", (value) => { toolbar.addHandler('image', (value) => {
this.uploadType = "image"; this.uploadType = 'image';
if (value) { if (value) {
this.$refs.upload.$children[0].$refs.input.click(); this.$refs.upload.$children[0].$refs.input.click();
} else { } else {
this.quill.format("image", false); this.quill.format('image', false);
} }
}); });
} }
this.Quill.pasteHTML(this.currentValue); this.Quill.pasteHTML(this.currentValue);
this.Quill.on("text-change", (delta, oldDelta, source) => { this.Quill.on('text-change', (delta, oldDelta, source) => {
const html = this.$refs.editor.children[0].innerHTML; const html = this.$refs.editor.children[0].innerHTML;
const text = this.Quill.getText(); const text = this.Quill.getText();
const quill = this.Quill; const quill = this.Quill;
this.currentValue = html; this.currentValue = html;
this.$emit("input", html); this.$emit('input', html);
this.$emit("on-change", { html, text, quill }); this.$emit('on-change', { html, text, quill });
}); });
this.Quill.on("text-change", (delta, oldDelta, source) => { this.Quill.on('text-change', (delta, oldDelta, source) => {
this.$emit("on-text-change", delta, oldDelta, source); this.$emit('on-text-change', delta, oldDelta, source);
}); });
this.Quill.on("selection-change", (range, oldRange, source) => { this.Quill.on('selection-change', (range, oldRange, source) => {
this.$emit("on-selection-change", range, oldRange, source); this.$emit('on-selection-change', range, oldRange, source);
}); });
this.Quill.on("editor-change", (eventName, ...args) => { this.Quill.on('editor-change', (eventName, ...args) => {
this.$emit("on-editor-change", eventName, ...args); this.$emit('on-editor-change', eventName, ...args);
}); });
}, },
// //
@ -183,97 +182,112 @@ export default {
let length = quill.getSelection().index; let length = quill.getSelection().index;
// res.url // res.url
// edit by // edit by
quill.insertEmbed(length, "image", res.data); quill.insertEmbed(length, 'image', res.data);
// //
quill.setSelection(length + 1); quill.setSelection(length + 1);
} else { } else {
this.$message.error("图片插入失败"); this.$message.error('图片插入失败');
} }
}, },
handleUploadError() { handleUploadError() {
this.$message.error("图片插入失败"); this.$message.error('图片插入失败');
}, },
}, },
}; };
</script> </script>
<style> <style>
.editor, .ql-toolbar { .editor-wrapper {
position: relative;
cursor: not-allowed;
&::after {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: #f5f7fa77;
}
}
.editor,
.ql-toolbar {
white-space: pre-wrap !important; white-space: pre-wrap !important;
line-height: normal !important; line-height: normal !important;
} }
.quill-img { .quill-img {
display: none; display: none;
} }
.ql-snow .ql-tooltip[data-mode="link"]::before { .ql-snow .ql-tooltip[data-mode='link']::before {
content: "请输入链接地址:"; content: '请输入链接地址:';
} }
.ql-snow .ql-tooltip.ql-editing a.ql-action::after { .ql-snow .ql-tooltip.ql-editing a.ql-action::after {
border-right: 0px; border-right: 0px;
content: "保存"; content: '保存';
padding-right: 0px; padding-right: 0px;
} }
.ql-snow .ql-tooltip[data-mode="video"]::before { .ql-snow .ql-tooltip[data-mode='video']::before {
content: "请输入视频地址:"; content: '请输入视频地址:';
} }
.ql-snow .ql-picker.ql-size .ql-picker-label::before, .ql-snow .ql-picker.ql-size .ql-picker-label::before,
.ql-snow .ql-picker.ql-size .ql-picker-item::before { .ql-snow .ql-picker.ql-size .ql-picker-item::before {
content: "14px"; content: '14px';
} }
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="small"]::before, .ql-snow .ql-picker.ql-size .ql-picker-label[data-value='small']::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="small"]::before { .ql-snow .ql-picker.ql-size .ql-picker-item[data-value='small']::before {
content: "10px"; content: '10px';
} }
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="large"]::before, .ql-snow .ql-picker.ql-size .ql-picker-label[data-value='large']::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="large"]::before { .ql-snow .ql-picker.ql-size .ql-picker-item[data-value='large']::before {
content: "18px"; content: '18px';
} }
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="huge"]::before, .ql-snow .ql-picker.ql-size .ql-picker-label[data-value='huge']::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="huge"]::before { .ql-snow .ql-picker.ql-size .ql-picker-item[data-value='huge']::before {
content: "32px"; content: '32px';
} }
.ql-snow .ql-picker.ql-header .ql-picker-label::before, .ql-snow .ql-picker.ql-header .ql-picker-label::before,
.ql-snow .ql-picker.ql-header .ql-picker-item::before { .ql-snow .ql-picker.ql-header .ql-picker-item::before {
content: "文本"; content: '文本';
} }
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]::before, .ql-snow .ql-picker.ql-header .ql-picker-label[data-value='1']::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before { .ql-snow .ql-picker.ql-header .ql-picker-item[data-value='1']::before {
content: "标题1"; content: '标题1';
} }
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before, .ql-snow .ql-picker.ql-header .ql-picker-label[data-value='2']::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before { .ql-snow .ql-picker.ql-header .ql-picker-item[data-value='2']::before {
content: "标题2"; content: '标题2';
} }
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before, .ql-snow .ql-picker.ql-header .ql-picker-label[data-value='3']::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before { .ql-snow .ql-picker.ql-header .ql-picker-item[data-value='3']::before {
content: "标题3"; content: '标题3';
} }
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]::before, .ql-snow .ql-picker.ql-header .ql-picker-label[data-value='4']::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before { .ql-snow .ql-picker.ql-header .ql-picker-item[data-value='4']::before {
content: "标题4"; content: '标题4';
} }
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]::before, .ql-snow .ql-picker.ql-header .ql-picker-label[data-value='5']::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before { .ql-snow .ql-picker.ql-header .ql-picker-item[data-value='5']::before {
content: "标题5"; content: '标题5';
} }
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]::before, .ql-snow .ql-picker.ql-header .ql-picker-label[data-value='6']::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before { .ql-snow .ql-picker.ql-header .ql-picker-item[data-value='6']::before {
content: "标题6"; content: '标题6';
} }
.ql-snow .ql-picker.ql-font .ql-picker-label::before, .ql-snow .ql-picker.ql-font .ql-picker-label::before,
.ql-snow .ql-picker.ql-font .ql-picker-item::before { .ql-snow .ql-picker.ql-font .ql-picker-item::before {
content: "标准字体"; content: '标准字体';
} }
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="serif"]::before, .ql-snow .ql-picker.ql-font .ql-picker-label[data-value='serif']::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="serif"]::before { .ql-snow .ql-picker.ql-font .ql-picker-item[data-value='serif']::before {
content: "衬线字体"; content: '衬线字体';
} }
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="monospace"]::before, .ql-snow .ql-picker.ql-font .ql-picker-label[data-value='monospace']::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="monospace"]::before { .ql-snow .ql-picker.ql-font .ql-picker-item[data-value='monospace']::before {
content: "等宽字体"; content: '等宽字体';
} }
</style> </style>

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-07-19 15:18:30 * @Date: 2021-07-19 15:18:30
* @LastEditors: zhp * @LastEditors: zhp
* @LastEditTime: 2023-11-15 16:04:06 * @LastEditTime: 2023-11-22 13:58:30
* @Description: * @Description:
--> -->
<template> <template>
@ -14,6 +14,8 @@
}"> }">
<img src="../../assets/img/logo.png" style="width:1.1em;position:relative;top:.4em" alt=""> <img src="../../assets/img/logo.png" style="width:1.1em;position:relative;top:.4em" alt="">
许昌安彩AGV原片周转看板 许昌安彩AGV原片周转看板
<h3 class="unit">单位河南汇融科技服务有限公司</h3>
<h3 class="time">{{ times }}</h3>
<!-- <el-button <!-- <el-button
type="text" type="text"
class="title-button" class="title-button"
@ -87,11 +89,11 @@
<!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;"> <!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;">
<top-radio-group /> <top-radio-group />
</div> --> </div> -->
<el-row :gutter="9 * beilv"> <!-- <el-row :gutter="9 * beilv"> -->
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="24"> <!-- <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="24"> -->
<base-table :page="1" :limit="9" :show-index="false" :beilv="1" :table-config="inventoryTableProps" <base-table :page="1" :limit="9" :show-index="false" :beilv="1" :table-config="inventoryTableProps"
:table-data="inventoryList" /> :table-data="inventoryList" />
</el-col> <!-- </el-col> -->
<!-- <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12"> <!-- <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
<base-table3 <base-table3
:page="2" :page="2"
@ -101,7 +103,7 @@
:table-data="qualityList2" :table-data="qualityList2"
/> />
</el-col> --> </el-col> -->
</el-row> <!-- </el-row> -->
</base-container> </base-container>
</el-col> </el-col>
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12"> <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
@ -666,7 +668,8 @@ export default {
return { return {
beilv: 1, beilv: 1,
beilv2: 1, beilv2: 1,
clientWidth:0, clientWidth: 0,
times:undefined,
value: 100, value: 100,
qualityYearTableProps, qualityYearTableProps,
cxNameList, cxNameList,
@ -748,6 +751,7 @@ export default {
// this.fetchList('order-process') // this.fetchList('order-process')
// this.fetchList('line-chart-data') // this.fetchList('line-chart-data')
this.init() this.init()
this.getTimes()
this.windowWidth(document.documentElement.clientWidth) this.windowWidth(document.documentElement.clientWidth)
}, },
mounted() { mounted() {
@ -776,6 +780,30 @@ export default {
// removeEventListener('resize', resizeFun) // removeEventListener('resize', resizeFun)
// }, // },
methods: { methods: {
getTimes() {
setInterval(this.getTimesInterval, 1000);
},
getTimesInterval: function () {
let _this = this;
let year = new Date().getFullYear(); //
let month = new Date().getMonth() + 1; //
let day = new Date().getDate(); //
let hours = new Date().getHours(); //
let minutes = new Date().getMinutes(); //
let seconds = new Date().getSeconds(); //
// 10 0
if (hours < 10) {
hours = "0" + hours;
}
if (minutes < 10) {
minutes = "0" + minutes;
}
if (seconds < 10) {
seconds = "0" + seconds;
}
//
this.times = year + "-" + month + "-" + day + " " + hours + ":" + minutes + ":" + seconds;
},
windowWidth(value) { windowWidth(value) {
this.clientWidth = value this.clientWidth = value
}, },
@ -846,7 +874,19 @@ export default {
background-size: 100% 100%; background-size: 100% 100%;
color: #00fff0; color: #00fff0;
text-align: center; text-align: center;
position: relative;
.unit{
position: absolute;
left: 260px;
top:25px;
font-size: 20px;
}
.time{
position: absolute;
left: 1360px;
top:25px;
font-size: 20px;
}
.title-button { .title-button {
color: #00fff0; color: #00fff0;
font-size: 20px; font-size: 20px;

View File

@ -162,7 +162,7 @@ export default {
input: true, input: true,
label: '属性名称', label: '属性名称',
prop: 'name', prop: 'name',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '属性名称不能为空', trigger: 'blur' }],
}, },
], ],
[ [

View File

@ -10,7 +10,7 @@
v-loading="formLoading"> v-loading="formLoading">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="设备名称" prop="name" :rules="[{ required: true, message: '不能为空', trigger: 'blur' }]"> <el-form-item label="设备名称" prop="name" :rules="[{ required: true, message: '设备名称不能为空', trigger: 'blur' }]">
<el-input v-model="form.name" :disabled="disabled" placeholder="请输入设备名称"></el-input> <el-input v-model="form.name" :disabled="disabled" placeholder="请输入设备名称"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -33,7 +33,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="设备类型" prop="equipmentTypeId" <el-form-item label="设备类型" prop="equipmentTypeId"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]"> :rules="[{ required: true, message: '设备类型不能为空', trigger: 'blur' }]">
<el-select v-model="form.equipmentTypeId" :disabled="disabled" filterable placeholder="请选择设备类型"> <el-select v-model="form.equipmentTypeId" :disabled="disabled" filterable placeholder="请选择设备类型">
<el-option v-for="eqType in eqTypeList" :key="eqType.id" :label="eqType.name" <el-option v-for="eqType in eqTypeList" :key="eqType.id" :label="eqType.name"
:value="eqType.id"></el-option> :value="eqType.id"></el-option>
@ -43,7 +43,7 @@
<el-col :span="8"> <el-col :span="8">
<el-form-item label="预计生产时间(min/天)" prop="workTime" :rules="[ <el-form-item label="预计生产时间(min/天)" prop="workTime" :rules="[
{ required: true, message: '不能为空', trigger: 'blur' }, { required: true, message: '预计生产时间不能为空', trigger: 'blur' },
{ {
type: 'number', type: 'number',
message: '请输入正确的数字值', message: '请输入正确的数字值',
@ -71,7 +71,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="设备TT值" prop="tvalue" :rules="[ <el-form-item label="设备TT值" prop="tvalue" :rules="[
{ required: true, message: '不能为空', trigger: 'blur' }, { required: true, message: '设备TT值不能为空', trigger: 'blur' },
{ {
type: 'number', type: 'number',
message: '请输入正确的数字值', message: '请输入正确的数字值',
@ -86,7 +86,7 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="产品加工时间(s)" prop="processingTime" :rules="[ <el-form-item label="产品加工时间(s)" prop="processingTime" :rules="[
{ required: true, message: '不能为空', trigger: 'blur' }, { required: true, message: '产品加工时间不能为空', trigger: 'blur' },
{ {
type: 'number', type: 'number',
message: '请输入正确的数字值', message: '请输入正确的数字值',

View File

@ -196,7 +196,7 @@ export default {
input: true, input: true,
label: '设备名称', label: '设备名称',
prop: 'name', prop: 'name',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '设备名称不能为空', trigger: 'blur' }],
// bind: { // bind: {
// disabled: this.editMode == 'detail', // some condition, like detail mode... // disabled: this.editMode == 'detail', // some condition, like detail mode...
// } // }
@ -211,10 +211,6 @@ export default {
input: true, input: true,
label: '英文名称', label: '英文名称',
prop: 'enName', prop: 'enName',
// rules: [{ required: true, message: '', trigger: 'blur' }],
// bind: {
// disabled: true, // some condition, like detail mode...
// }
}, },
], ],
[ [
@ -222,10 +218,6 @@ export default {
input: true, input: true,
label: '缩写', label: '缩写',
prop: 'abbr', prop: 'abbr',
// rules: [{ required: true, message: '', trigger: 'blur' }],
// bind: {
// disabled: true, // some condition, like detail mode...
// }
}, },
{ {
@ -233,7 +225,7 @@ export default {
label: '设备类型', label: '设备类型',
prop: 'equipmentTypeId', prop: 'equipmentTypeId',
url: '/base/core-equipment-type/page?pageNo=1&pageSize=100', url: '/base/core-equipment-type/page?pageNo=1&pageSize=100',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '设备类型不能为空', trigger: 'blur' }],
bind: { bind: {
filterable: true, filterable: true,
}, },
@ -243,7 +235,7 @@ export default {
label: '预计生产时间(min/天)', label: '预计生产时间(min/天)',
prop: 'workTime', prop: 'workTime',
rules: [ rules: [
{ required: true, message: '不能为空', trigger: 'blur' }, { required: true, message: '预计生产时间不能为空', trigger: 'blur' },
{ {
type: 'number', type: 'number',
message: '请输入正确的数字值', message: '请输入正确的数字值',
@ -275,7 +267,7 @@ export default {
prop: 'tvalue', prop: 'tvalue',
label: '设备TT值', label: '设备TT值',
rules: [ rules: [
{ required: true, message: '不能为空', trigger: 'blur' }, { required: true, message: '设备TT值不能为空', trigger: 'blur' },
{ {
type: 'number', type: 'number',
message: '请输入正确的数字值', message: '请输入正确的数字值',
@ -291,7 +283,7 @@ export default {
label: '产品加工时间(s)', label: '产品加工时间(s)',
prop: 'processingTime', prop: 'processingTime',
rules: [ rules: [
{ required: true, message: '不能为空', trigger: 'blur' }, { required: true, message: '产品加工时间不能为空', trigger: 'blur' },
{ {
type: 'number', type: 'number',
message: '请输入正确的数字值', message: '请输入正确的数字值',
@ -304,7 +296,6 @@ export default {
{ {
input: true, input: true,
label: '制造商', label: '制造商',
// rules: [{ required: true, message: '', trigger: 'blur' }],
prop: 'manufacturer', prop: 'manufacturer',
}, },
{ {
@ -317,7 +308,6 @@ export default {
{ {
textarea: true, textarea: true,
label: '功能描述', label: '功能描述',
// rules: [{ required: true, message: '', trigger: 'blur' }],
prop: 'description', prop: 'description',
}, },
], ],

View File

@ -149,7 +149,7 @@ export default {
select: true, select: true,
label: '产线', label: '产线',
prop: 'productionLineId', prop: 'productionLineId',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '产线名不能为空', trigger: 'blur' }],
url: '/base/core-production-line/listAll', url: '/base/core-production-line/listAll',
bind: { clearable: true, filterable: true }, bind: { clearable: true, filterable: true },
// watch: 'workshopSectionId' // watch: 'workshopSectionId'
@ -159,7 +159,7 @@ export default {
label: '工段', label: '工段',
prop: 'workshopSectionId', prop: 'workshopSectionId',
depends: 'productionLineId', depends: 'productionLineId',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '工段不能为空', trigger: 'blur' }],
bind: { clearable: true, filterable: true }, bind: { clearable: true, filterable: true },
url: '/base/core-workshop-section/listByParentId', url: '/base/core-workshop-section/listByParentId',
}, },
@ -169,7 +169,7 @@ export default {
select: true, select: true,
label: '设备', label: '设备',
prop: 'equipmentId', prop: 'equipmentId',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '设备名不能为空', trigger: 'blur' }],
bind: { clearable: true, filterable: true }, bind: { clearable: true, filterable: true },
url: '/base/core-equipment/listAll', url: '/base/core-equipment/listAll',
}, },

View File

@ -135,7 +135,7 @@ export default {
input: true, input: true,
label: '设备类型名称', label: '设备类型名称',
prop: 'name', prop: 'name',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '设备类型名不能为空', trigger: 'blur' }],
// bind: { // bind: {
// disabled: true, // some condition, like detail mode... // disabled: true, // some condition, like detail mode...
// } // }

View File

@ -16,7 +16,7 @@
<el-form-item <el-form-item
label="产线" label="产线"
prop="productionLineId" prop="productionLineId"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]"> :rules="[{ required: true, message: '产线不能为空', trigger: 'blur' }]">
<el-select <el-select
v-model="dataForm.productionLineId" v-model="dataForm.productionLineId"
placeholder="请选择产线" placeholder="请选择产线"
@ -35,7 +35,7 @@
<el-form-item <el-form-item
label="工段" label="工段"
prop="workshopSectionId" prop="workshopSectionId"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]"> :rules="[{ required: true, message: '工段不能为空', trigger: 'blur' }]">
<el-select <el-select
v-model="dataForm.workshopSectionId" v-model="dataForm.workshopSectionId"
filterable filterable
@ -55,7 +55,7 @@
<el-form-item <el-form-item
label="设备" label="设备"
prop="equipmentId" prop="equipmentId"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]"> :rules="[{ required: true, message: '设备不能为空', trigger: 'blur' }]">
<el-select <el-select
v-model="dataForm.equipmentId" v-model="dataForm.equipmentId"
filterable filterable

View File

@ -176,7 +176,7 @@ export default {
url: '/base/production-line/listAll', url: '/base/production-line/listAll',
// prop: '__product_line', // __ // prop: '__product_line', // __
prop: 'productionLineId', // 线id使 prop: 'productionLineId', // 线id使
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '产线不能为空', trigger: 'blur' }],
}, },
{ {
select: true, select: true,
@ -185,7 +185,7 @@ export default {
// depends: '__product_line', // 线 // depends: '__product_line', // 线
depends: 'productionLineId', depends: 'productionLineId',
prop: 'workshopSectionId', prop: 'workshopSectionId',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '工段不能为空', trigger: 'blur' }],
}, },
], ],
[ [
@ -194,7 +194,7 @@ export default {
label: '设备', label: '设备',
url: '/base/core-equipment/page?pageNo=1&pageSize=100', url: '/base/core-equipment/page?pageNo=1&pageSize=100',
prop: 'equipmentId', prop: 'equipmentId',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '设备不能为空', trigger: 'blur' }],
}, },
{ {
input: true, input: true,

View File

@ -16,36 +16,20 @@
<el-form-item <el-form-item
label="报警编码" label="报警编码"
prop="code" prop="code"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]"> :rules="[{ required: true, message: '报警编码不能为空', trigger: 'blur' }]">
<el-input <el-input
:disabled="disabled" :disabled="disabled"
v-model="dataForm.code" v-model="dataForm.code"
@change="$emit('update', dataForm)" @change="$emit('update', dataForm)"
placeholder="请输入工段排序" /> placeholder="请输入工段排序" />
</el-form-item> </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>
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item
label="报警类型" label="报警类型"
prop="type" prop="type"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]"> :rules="[{ required: true, message: '报警类型不能为空', trigger: 'blur' }]">
<el-select <el-select
v-model="dataForm.type" v-model="dataForm.type"
:disabled="disabled" :disabled="disabled"
@ -68,7 +52,7 @@
<el-form-item <el-form-item
label="报警级别" label="报警级别"
prop="grade" prop="grade"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]"> :rules="[{ required: true, message: '报警级别不能为空', trigger: 'blur' }]">
<el-select <el-select
:disabled="disabled" :disabled="disabled"
v-model="dataForm.grade" v-model="dataForm.grade"
@ -101,7 +85,7 @@
<el-form-item <el-form-item
label="参数列名" label="参数列名"
prop="plcParamName" prop="plcParamName"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]"> :rules="[{ required: true, message: '参数列名不能为空', trigger: 'blur' }]">
<el-input <el-input
:disabled="disabled" :disabled="disabled"
v-model="dataForm.plcParamName" v-model="dataForm.plcParamName"
@ -113,7 +97,7 @@
<el-form-item <el-form-item
label="报警内容" label="报警内容"
prop="alarmContent" prop="alarmContent"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]"> :rules="[{ required: true, message: '报警内容不能为空', trigger: 'blur' }]">
<el-input <el-input
:disabled="disabled" :disabled="disabled"
v-model="dataForm.alarmContent" v-model="dataForm.alarmContent"

View File

@ -137,7 +137,7 @@ export default {
label: '报警编码', // label: '报警编码', //
prop: 'code', prop: 'code',
url: '/base/equipment-group-alarm/getCode', url: '/base/equipment-group-alarm/getCode',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '报警编码不能为空', trigger: 'blur' }],
}, },
{ {
select: true, select: true,
@ -147,7 +147,7 @@ export default {
{ label: '布尔型', value: 2 }, { label: '布尔型', value: 2 },
{ label: '字符型', value: 1 }, { label: '字符型', value: 1 },
], ],
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '报警类型不能为空', trigger: 'blur' }],
}, },
], ],
[ [
@ -168,13 +168,13 @@ export default {
input: true, input: true,
label: '参数列名', // label: '参数列名', //
prop: 'plcParamName', prop: 'plcParamName',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '参数列名不能为空', trigger: 'blur' }],
}, },
{ {
input: true, input: true,
label: '报警内容', label: '报警内容',
prop: 'alarmContent', prop: 'alarmContent',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '报警内容不能为空', trigger: 'blur' }],
}, },
], ],
], ],

View File

@ -177,7 +177,7 @@ export default {
input: true, input: true,
label: '关联表名', label: '关联表名',
prop: 'plcTableName', prop: 'plcTableName',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '关联表名不能为空', trigger: 'blur' }],
// bind: { // bind: {
// disabled: true, // some condition, like detail mode... // disabled: true, // some condition, like detail mode...
// } // }
@ -187,7 +187,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' }], rules: [{ required: true, message: '编码不能为空', trigger: 'blur' }],
}, },
], ],
[ [
@ -195,7 +195,7 @@ export default {
input: true, input: true,
label: '标识', label: '标识',
prop: 'name', prop: 'name',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '标识不能为空', trigger: 'blur' }],
// bind: { // bind: {
// disabled: true, // some condition, like detail mode... // disabled: true, // some condition, like detail mode...
// } // }

View File

@ -166,13 +166,13 @@ export default {
input: true, input: true,
label: '参数列名', label: '参数列名',
prop: 'plcParamName', prop: 'plcParamName',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '参数列名不能为空', trigger: 'blur' }],
}, },
{ {
input: true, input: true,
label: '参数名称', label: '参数名称',
prop: 'name', prop: 'name',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '参数名称不能为空', trigger: 'blur' }],
}, },
], ],
[ [
@ -181,7 +181,6 @@ export default {
label: '单位', label: '单位',
prop: 'unit', prop: 'unit',
options: this.getDictDatas(this.DICT_TYPE.UNIT_DICT), options: this.getDictDatas(this.DICT_TYPE.UNIT_DICT),
// rules: [{ required: true, message: '', trigger: 'blur' }],
}, },
{ {
switch: true, switch: true,
@ -222,7 +221,6 @@ export default {
transform: (val) => Number(val), transform: (val) => Number(val),
}, },
], ],
// rules: [{ required: true, message: '', trigger: 'blur' }],
}, },
], ],
[ [
@ -230,13 +228,11 @@ export default {
input: true, input: true,
label: '标准值', label: '标准值',
prop: 'defaultValue', prop: 'defaultValue',
// rules: [{ required: true, message: '', trigger: 'blur' }],
}, },
{ {
input: true, input: true,
label: '描述', label: '描述',
prop: 'description', prop: 'description',
// rules: [{ required: true, message: '', trigger: 'blur' }],
}, },
], ],
[ [
@ -244,7 +240,6 @@ export default {
input: true, input: true,
label: '备注', label: '备注',
prop: 'remark', prop: 'remark',
// rules: [{ required: true, message: '', trigger: 'blur' }],
}, },
], ],
], ],

View File

@ -236,7 +236,7 @@ export default {
prop: 'plcId', prop: 'plcId',
labelKey: `plcTableName`, labelKey: `plcTableName`,
url: '/base/equipment-plc/listAll', url: '/base/equipment-plc/listAll',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '关联表名不能为空', trigger: 'blur' }],
bind: { bind: {
filterable: true, filterable: true,
}, },
@ -248,7 +248,7 @@ export default {
label: '设备', label: '设备',
prop: 'equipmentId', prop: 'equipmentId',
url: '/base/core-equipment/page?pageNo=1&pageSize=99', url: '/base/core-equipment/page?pageNo=1&pageSize=99',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '设备不能为空', trigger: 'blur' }],
bind: { bind: {
filterable: true, filterable: true,
}, },
@ -274,7 +274,7 @@ export default {
input: true, input: true,
label: '设备名', label: '设备名',
prop: 'equipmentName', prop: 'equipmentName',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '设备名不能为空', trigger: 'blur' }],
// bind: { // bind: {
// disabled: this.editMode == 'detail', // some condition, like detail mode... // disabled: this.editMode == 'detail', // some condition, like detail mode...
// } // }

View File

@ -120,13 +120,13 @@ export default {
input: true, input: true,
label: '参数列名', label: '参数列名',
prop: 'plcParamName', prop: 'plcParamName',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '参数列名不能为空', trigger: 'blur' }],
}, },
{ {
input: true, input: true,
label: '参数名称', label: '参数名称',
prop: 'name', prop: 'name',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '参数名称不能为空', trigger: 'blur' }],
}, },
], ],
[ [
@ -135,7 +135,6 @@ export default {
label: '单位', label: '单位',
prop: 'unit', prop: 'unit',
options: this.getDictDatas(this.DICT_TYPE.UNIT_DICT), options: this.getDictDatas(this.DICT_TYPE.UNIT_DICT),
// rules: [{ required: true, message: '', trigger: 'blur' }],
}, },
{ {
switch: true, switch: true,
@ -176,7 +175,6 @@ export default {
transform: (val) => Number(val), transform: (val) => Number(val),
}, },
], ],
// rules: [{ required: true, message: '', trigger: 'blur' }],
}, },
], ],
[ [
@ -184,13 +182,11 @@ export default {
input: true, input: true,
label: '标准值', label: '标准值',
prop: 'defaultValue', prop: 'defaultValue',
// rules: [{ required: true, message: '', trigger: 'blur' }],
}, },
{ {
input: true, input: true,
label: '描述', label: '描述',
prop: 'description', prop: 'description',
// rules: [{ required: true, message: '', trigger: 'blur' }],
}, },
], ],
[ [
@ -198,7 +194,6 @@ export default {
input: true, input: true,
label: '备注', label: '备注',
prop: 'remark', prop: 'remark',
// rules: [{ required: true, message: '', trigger: 'blur' }],
}, },
], ],
], ],

View File

@ -29,7 +29,10 @@
<section v-for="(section, index) in sections" :key="section.key"> <section v-for="(section, index) in sections" :key="section.key">
<SmallTitle v-if="index != 0">{{ section.name }}</SmallTitle> <SmallTitle v-if="index != 0">{{ section.name }}</SmallTitle>
<div class="form-part" v-if="section.key == 'base'"> <div
class="form-part"
v-if="section.key == 'base'"
style="border-bottom: 1px solid #dfdfdf; margin-bottom: 24px">
<el-skeleton v-if="!showForm" animated /> <el-skeleton v-if="!showForm" animated />
<!-- <BaseInfoForm <!-- <BaseInfoForm
key="drawer-dialog-form" key="drawer-dialog-form"
@ -64,9 +67,8 @@
<div <div
v-if="section.key == 'attrs'" v-if="section.key == 'attrs'"
style="position: relative; margin-top: 12px"> style="position: relative; margin-top: 12px">
<div <!-- v-if="!mode.includes('detail')" -->
v-if="!mode.includes('detail')" <div style="position: absolute; top: -40px; right: 0">
style="position: absolute; top: -40px; right: 0">
<el-button @click="handleAddAttr" type="text"> <el-button @click="handleAddAttr" type="text">
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
添加报警 添加报警
@ -102,9 +104,9 @@
<div class="drawer-body__footer"> <div class="drawer-body__footer">
<el-button style="" @click="handleCancel">取消</el-button> <el-button style="" @click="handleCancel">取消</el-button>
<el-button v-if="mode == 'detail'" type="primary" @click="toggleEdit"> <!-- <el-button v-if="mode == 'detail'" type="primary" @click="toggleEdit">
编辑 编辑
</el-button> </el-button> -->
<!-- <el-button v-else type="primary" @click="handleCancel">确定</el-button> --> <!-- <el-button v-else type="primary" @click="handleCancel">确定</el-button> -->
</div> </div>
</div> </div>
@ -123,9 +125,9 @@
<DialogForm <DialogForm
v-if="attrFormVisible" v-if="attrFormVisible"
ref="attrForm" ref="attrForm"
:disabled="mode.includes('detail')"
v-model="attrForm" v-model="attrForm"
:rows="attrRows" /> :rows="attrRows" />
<!-- :disabled="mode.includes('detail')" -->
</base-dialog> </base-dialog>
</el-drawer> </el-drawer>
</template> </template>
@ -189,8 +191,30 @@ export default {
label: '报警编码', // label: '报警编码', //
prop: 'code', prop: 'code',
url: '/base/equipment-group-alarm/getCode', url: '/base/equipment-group-alarm/getCode',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '报警编码不能为空', trigger: 'blur' }],
}, },
{
select: true,
label: '报警级别', //
prop: 'grade',
options: this.getDictDatas(this.DICT_TYPE.EQU_ALARM_LEVEL),
},
],
[
{
input: true,
label: '参数列名', //
prop: 'plcParamName',
rules: [{ required: true, message: '参数列名不能为空', trigger: 'blur' }],
},
{
input: true,
label: '报警内容',
prop: 'alarmContent',
rules: [{ required: true, message: '报警内容不能为空', trigger: 'blur' }],
},
],
[
{ {
select: true, select: true,
label: '报警类型', // label: '报警类型', //
@ -199,15 +223,7 @@ export default {
{ label: '布尔型', value: 2 }, { label: '布尔型', value: 2 },
{ label: '字符型', value: 1 }, { label: '字符型', value: 1 },
], ],
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '报警类型不能为空', trigger: 'blur' }],
},
],
[
{
select: true,
label: '报警级别', //
prop: 'grade',
options: this.getDictDatas(this.DICT_TYPE.EQU_ALARM_LEVEL),
}, },
{ {
input: true, input: true,
@ -215,20 +231,6 @@ export default {
prop: 'alarmCode', prop: 'alarmCode',
}, },
], ],
[
{
input: true,
label: '参数列名', //
prop: 'plcParamName',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
},
{
input: true,
label: '报警内容',
prop: 'alarmContent',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
},
],
], ],
attrQuery: { attrQuery: {
params: { params: {

View File

@ -16,46 +16,26 @@
<el-form-item <el-form-item
label="报警编码" label="报警编码"
prop="code" prop="code"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]"> :rules="[{ required: true, message: '报警编码不能为空', trigger: 'blur' }]">
<el-input <el-input
:disabled="disabled" :disabled="disabled"
v-model="dataForm.code" v-model="dataForm.code"
@change="$emit('update', dataForm)" @change="$emit('update', dataForm)"
placeholder="请输入报警编码" /> placeholder="请输入报警编码" />
</el-form-item> </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>
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item
label="报警类型" label="报警级别"
prop="type" prop="grade"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]"> :rules="[{ required: true, message: '报警级别不能为空', trigger: 'blur' }]">
<el-select <el-select
:disabled="disabled" :disabled="disabled"
v-model="dataForm.type" v-model="dataForm.grade"
placeholder="请选择报警类型" placeholder="请选择报警级别"
@change="handleTypeChange"> @change="$emit('update', dataForm)">
<el-option <el-option
v-for="opt in [ v-for="opt in getDictDatas(DICT_TYPE.EQU_ALARM_LEVEL)"
{ label: '布尔型', value: 2 },
{ label: '字符型', value: 1 },
]"
:key="opt.value" :key="opt.value"
:label="opt.label" :label="opt.label"
:value="opt.value" /> :value="opt.value" />
@ -66,16 +46,45 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item
label="报警级别" label="参数列名"
prop="grade" prop="plcParamName"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]"> :rules="[{ required: true, message: '参数列名不能为空', trigger: 'blur' }]">
<el-input
:disabled="disabled"
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
:disabled="disabled"
v-model="dataForm.alarmContent"
placeholder="请输入报警内容"
@change="$emit('update', dataForm)"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item
label="报警类型"
prop="type"
:rules="[{ required: true, message: '报警类型不能为空', trigger: 'blur' }]">
<el-select <el-select
:disabled="disabled" :disabled="disabled"
v-model="dataForm.grade" v-model="dataForm.type"
placeholder="请选择报警级别" placeholder="请选择报警类型"
@change="$emit('update', dataForm)"> @change="handleTypeChange">
<el-option <el-option
v-for="opt in getDictDatas(DICT_TYPE.EQU_ALARM_LEVEL)" v-for="opt in [
{ label: '布尔型', value: 2 },
{ label: '字符型', value: 1 },
]"
:key="opt.value" :key="opt.value"
:label="opt.label" :label="opt.label"
:value="opt.value" /> :value="opt.value" />
@ -96,32 +105,6 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item
label="参数列名"
prop="plcParamName"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-input
:disabled="disabled"
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
:disabled="disabled"
v-model="dataForm.alarmContent"
placeholder="请输入报警内容"
@change="$emit('update', dataForm)"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form> </el-form>
</template> </template>

View File

@ -183,10 +183,7 @@ export default {
input: true, input: true,
label: '设备分组名称', label: '设备分组名称',
prop: 'name', prop: 'name',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '设备分组名称不能为空', trigger: 'blur' }],
// bind: {
// disabled: this.editMode == 'detail', // some condition, like detail mode...
// }
}, },
{ {
input: true, input: true,
@ -271,7 +268,7 @@ export default {
input: true, input: true,
label: '分组名称', label: '分组名称',
prop: 'name', prop: 'name',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '分组名称不能为空', trigger: 'blur' }],
// bind: { // bind: {
// disabled: true, // some condition, like detail mode... // disabled: true, // some condition, like detail mode...
// } // }
@ -283,7 +280,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' }], rules: [{ required: true, message: '分组编码不能为空', trigger: 'blur' }],
}, },
], ],
[ [
@ -291,7 +288,6 @@ export default {
input: true, input: true,
label: '备注', label: '备注',
prop: 'remark', prop: 'remark',
// rules: [{ required: true, message: '', trigger: 'blur' }],
bind: { bind: {
placeholder: '请输入备注', placeholder: '请输入备注',
}, },

View File

@ -29,7 +29,10 @@
<section v-for="(section, index) in sections" :key="section.key"> <section v-for="(section, index) in sections" :key="section.key">
<SmallTitle v-if="index != 0">{{ section.name }}</SmallTitle> <SmallTitle v-if="index != 0">{{ section.name }}</SmallTitle>
<div class="form-part" v-if="section.key == 'base'"> <div
class="form-part"
v-if="section.key == 'base'"
style="border-bottom: 1px solid #dfdfdf; margin-bottom: 24px">
<el-skeleton v-if="!showForm" animated /> <el-skeleton v-if="!showForm" animated />
<!-- <BaseInfoForm <!-- <BaseInfoForm
key="drawer-dialog-form" key="drawer-dialog-form"
@ -64,9 +67,8 @@
<div <div
v-if="section.key == 'attrs'" v-if="section.key == 'attrs'"
style="position: relative; margin-top: 12px"> style="position: relative; margin-top: 12px">
<div <!-- v-if="!mode.includes('detail')" -->
v-if="!mode.includes('detail')" <div style="position: absolute; top: -40px; right: 0">
style="position: absolute; top: -40px; right: 0">
<el-button @click="handleAddAttr" type="text"> <el-button @click="handleAddAttr" type="text">
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
添加属性 添加属性
@ -102,9 +104,9 @@
<div class="drawer-body__footer"> <div class="drawer-body__footer">
<el-button style="" @click="handleCancel">取消</el-button> <el-button style="" @click="handleCancel">取消</el-button>
<el-button v-if="mode == 'detail'" type="primary" @click="toggleEdit"> <!-- <el-button v-if="mode == 'detail'" type="primary" @click="toggleEdit">
编辑 编辑
</el-button> </el-button> -->
<!-- <el-button v-else type="primary" @click="handleCancel">确定</el-button> --> <!-- <el-button v-else type="primary" @click="handleCancel">确定</el-button> -->
</div> </div>
</div> </div>
@ -120,10 +122,10 @@
@close="closeAttrForm" @close="closeAttrForm"
@cancel="closeAttrForm" @cancel="closeAttrForm"
@confirm="submitAttrForm"> @confirm="submitAttrForm">
<!-- :disabled="mode.includes('detail')" -->
<DialogForm <DialogForm
v-if="attrFormVisible" v-if="attrFormVisible"
ref="attrForm" ref="attrForm"
:disabled="mode.includes('detail')"
v-model="attrForm" v-model="attrForm"
:rows="attrRows" /> :rows="attrRows" />
</base-dialog> </base-dialog>
@ -189,7 +191,7 @@ export default {
label: '报警编码', // label: '报警编码', //
prop: 'code', prop: 'code',
url: '/base/equipment-group-alarm/getCode', url: '/base/equipment-group-alarm/getCode',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '报警编码不能为空', trigger: 'blur' }],
}, },
{ {
select: true, select: true,
@ -199,7 +201,7 @@ export default {
{ label: '布尔型', value: 2 }, { label: '布尔型', value: 2 },
{ label: '字符型', value: 1 }, { label: '字符型', value: 1 },
], ],
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '报警类型不能为空', trigger: 'blur' }],
}, },
], ],
[ [
@ -220,13 +222,13 @@ export default {
input: true, input: true,
label: '参数列名', // label: '参数列名', //
prop: 'plcParamName', prop: 'plcParamName',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '参数列名不能为空', trigger: 'blur' }],
}, },
{ {
input: true, input: true,
label: '报警内容', label: '报警内容',
prop: 'alarmContent', prop: 'alarmContent',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '报警内容不能为空', trigger: 'blur' }],
}, },
], ],
], ],

View File

@ -16,46 +16,27 @@
<el-form-item <el-form-item
label="报警编码" label="报警编码"
prop="code" prop="code"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]"> :rules="[{ required: true, message: '报警编码不能为空', trigger: 'blur' }]">
<el-input <el-input
:disabled="disabled" :disabled="disabled"
v-model="dataForm.code" v-model="dataForm.code"
@change="$emit('update', dataForm)" @change="$emit('update', dataForm)"
placeholder="请输入工段排序" /> placeholder="请输入工段排序" />
</el-form-item> </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>
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item
label="报警类型" label="报警级别"
prop="type" prop="grade"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]"> :rules="[{ required: true, message: '报警级别不能为空', trigger: 'blur' }]">
<el-select <el-select
:disabled="disabled" :disabled="disabled"
v-model="dataForm.type" v-model="dataForm.grade"
placeholder="请选择报警类型" placeholder="请选择报警级别"
@change="handleTypeChange"> @change="$emit('update', dataForm)">
<el-option <el-option
v-for="opt in [ v-for="opt in getDictDatas(DICT_TYPE.EQU_ALARM_LEVEL)"
{ label: '布尔型', value: 2 },
{ label: '字符型', value: 1 },
]"
:key="opt.value" :key="opt.value"
:label="opt.label" :label="opt.label"
:value="opt.value" /> :value="opt.value" />
@ -66,16 +47,45 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item
label="报警级别" label="参数列名"
prop="grade" prop="plcParamName"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]"> :rules="[{ required: true, message: '参数列名不能为空', trigger: 'blur' }]">
<el-input
:disabled="disabled"
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
:disabled="disabled"
v-model="dataForm.alarmContent"
placeholder="请输入报警内容"
@change="$emit('update', dataForm)"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item
label="报警类型"
prop="type"
:rules="[{ required: true, message: '报警类型不能为空', trigger: 'blur' }]">
<el-select <el-select
:disabled="disabled" :disabled="disabled"
v-model="dataForm.grade" v-model="dataForm.type"
placeholder="请选择报警级别" placeholder="请选择报警类型"
@change="$emit('update', dataForm)"> @change="handleTypeChange">
<el-option <el-option
v-for="opt in getDictDatas(DICT_TYPE.EQU_ALARM_LEVEL)" v-for="opt in [
{ label: '布尔型', value: 2 },
{ label: '字符型', value: 1 },
]"
:key="opt.value" :key="opt.value"
:label="opt.label" :label="opt.label"
:value="opt.value" /> :value="opt.value" />
@ -96,32 +106,6 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item
label="参数列名"
prop="plcParamName"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-input
:disabled="disabled"
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
:disabled="disabled"
v-model="dataForm.alarmContent"
placeholder="请输入报警内容"
@change="$emit('update', dataForm)"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form> </el-form>
</template> </template>

View File

@ -224,7 +224,7 @@ export default {
bind: { bind: {
filterable: true, filterable: true,
}, },
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '设备不能为空', trigger: 'blur' }],
}, },
], ],
[ [
@ -238,7 +238,7 @@ export default {
bind: { bind: {
filterable: true, filterable: true,
}, },
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '报警分组不能为空', trigger: 'blur' }],
}, },
], ],
], ],
@ -269,7 +269,7 @@ export default {
input: true, input: true,
label: '设备分组名称', label: '设备分组名称',
prop: 'name', prop: 'name',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '设备分组名称不能为空', trigger: 'blur' }],
// bind: { // bind: {
// disabled: this.editMode == 'detail', // some condition, like detail mode... // disabled: this.editMode == 'detail', // some condition, like detail mode...
// } // }

View File

@ -224,7 +224,7 @@ export default {
prop: 'plcId', prop: 'plcId',
labelKey: `plcTableName`, labelKey: `plcTableName`,
url: '/base/equipment-plc/listAll', url: '/base/equipment-plc/listAll',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '关联表名不能为空', trigger: 'blur' }],
bind: { bind: {
filterable: true, filterable: true,
}, },
@ -236,7 +236,7 @@ export default {
label: '设备', label: '设备',
prop: 'equipmentId', prop: 'equipmentId',
url: '/base/core-equipment/page?pageNo=1&pageSize=99', url: '/base/core-equipment/page?pageNo=1&pageSize=99',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '设备不能为空', trigger: 'blur' }],
bind: { bind: {
filterable: true, filterable: true,
}, },
@ -262,7 +262,7 @@ export default {
input: true, input: true,
label: '设备名', label: '设备名',
prop: 'equipmentName', prop: 'equipmentName',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '设备名不能为空', trigger: 'blur' }],
// bind: { // bind: {
// disabled: this.editMode == 'detail', // some condition, like detail mode... // disabled: this.editMode == 'detail', // some condition, like detail mode...
// } // }

View File

@ -184,7 +184,7 @@ export default {
input: true, input: true,
label: '关联表名', label: '关联表名',
prop: 'plcTableName', prop: 'plcTableName',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '关联表名不能为空', trigger: 'blur' }],
// bind: { // bind: {
// disabled: true, // some condition, like detail mode... // disabled: true, // some condition, like detail mode...
// } // }
@ -194,7 +194,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' }], rules: [{ required: true, message: '编码不能为空', trigger: 'blur' }],
}, },
], ],
[ [
@ -202,7 +202,7 @@ export default {
input: true, input: true,
label: '标识', label: '标识',
prop: 'name', prop: 'name',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '标识不能为空', trigger: 'blur' }],
// bind: { // bind: {
// disabled: true, // some condition, like detail mode... // disabled: true, // some condition, like detail mode...
// } // }

View File

@ -29,7 +29,10 @@
<section v-for="(section, index) in sections" :key="section.key"> <section v-for="(section, index) in sections" :key="section.key">
<SmallTitle v-if="index != 0">{{ section.name }}</SmallTitle> <SmallTitle v-if="index != 0">{{ section.name }}</SmallTitle>
<div class="form-part" v-if="section.key == 'base'"> <div
class="form-part"
v-if="section.key == 'base'"
style="border-bottom: 1px solid #dfdfdf; margin-bottom: 24px">
<el-skeleton v-if="!showForm" animated /> <el-skeleton v-if="!showForm" animated />
<!-- <BaseInfoForm <!-- <BaseInfoForm
key="drawer-dialog-form" key="drawer-dialog-form"
@ -66,9 +69,8 @@
<div <div
v-if="section.key == 'attrs'" v-if="section.key == 'attrs'"
style="position: relative; margin-top: 12px"> style="position: relative; margin-top: 12px">
<div <!-- v-if="!mode.includes('detail')" -->
v-if="!mode.includes('detail')" <div style="position: absolute; top: -40px; right: 0">
style="position: absolute; top: -40px; right: 0">
<el-button @click="handleAddAttr" type="text"> <el-button @click="handleAddAttr" type="text">
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
添加属性 添加属性
@ -104,9 +106,9 @@
<div class="drawer-body__footer"> <div class="drawer-body__footer">
<el-button style="" @click="handleCancel">取消</el-button> <el-button style="" @click="handleCancel">取消</el-button>
<el-button v-if="mode == 'detail'" type="primary" @click="toggleEdit"> <!-- <el-button v-if="mode == 'detail'" type="primary" @click="toggleEdit">
编辑 编辑
</el-button> </el-button> -->
<!-- <el-button v-else type="primary" @click="handleCancel">确定</el-button> --> <!-- <el-button v-else type="primary" @click="handleCancel">确定</el-button> -->
</div> </div>
</div> </div>
@ -122,10 +124,10 @@
@close="closeAttrForm" @close="closeAttrForm"
@cancel="closeAttrForm" @cancel="closeAttrForm"
@confirm="submitAttrForm"> @confirm="submitAttrForm">
<!-- :disabled="mode.includes('detail')" -->
<DialogForm <DialogForm
v-if="attrFormVisible" v-if="attrFormVisible"
ref="attrForm" ref="attrForm"
:disabled="mode.includes('detail')"
v-model="attrForm" v-model="attrForm"
:rows="attrRows" /> :rows="attrRows" />
</base-dialog> </base-dialog>
@ -192,13 +194,13 @@ export default {
input: true, input: true,
label: '参数列名', label: '参数列名',
prop: 'plcParamName', prop: 'plcParamName',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '参数列名不能为空', trigger: 'blur' }],
}, },
{ {
input: true, input: true,
label: '参数名称', label: '参数名称',
prop: 'name', prop: 'name',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '参数名称不能为空', trigger: 'blur' }],
}, },
], ],
[ [
@ -207,7 +209,6 @@ export default {
label: '单位', label: '单位',
prop: 'unit', prop: 'unit',
options: this.getDictDatas(this.DICT_TYPE.UNIT_DICT), options: this.getDictDatas(this.DICT_TYPE.UNIT_DICT),
// rules: [{ required: true, message: '', trigger: 'blur' }],
}, },
{ {
switch: true, switch: true,
@ -229,7 +230,7 @@ export default {
{ label: '工艺参数', value: 2 }, { label: '工艺参数', value: 2 },
{ label: '报警参数', value: 3 }, { label: '报警参数', value: 3 },
], ],
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '设备参数类型不能为空', trigger: 'blur' }],
}, },
{ {
select: true, select: true,
@ -241,7 +242,7 @@ export default {
{ label: '破损数量', value: 3 }, { label: '破损数量', value: 3 },
{ label: '无类型', value: 4 }, { label: '无类型', value: 4 },
], ],
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '生产参数类型不能为空', trigger: 'blur' }],
}, },
], ],
[ [
@ -273,7 +274,6 @@ export default {
transform: (val) => Number(val), transform: (val) => Number(val),
}, },
], ],
// rules: [{ required: true, message: '', trigger: 'blur' }],
}, },
], ],
[ [
@ -281,13 +281,11 @@ export default {
input: true, input: true,
label: '标准值', label: '标准值',
prop: 'defaultValue', prop: 'defaultValue',
// rules: [{ required: true, message: '', trigger: 'blur' }],
}, },
{ {
input: true, input: true,
label: '描述', label: '描述',
prop: 'description', prop: 'description',
// rules: [{ required: true, message: '', trigger: 'blur' }],
}, },
], ],
[ [
@ -295,7 +293,6 @@ export default {
input: true, input: true,
label: '备注', label: '备注',
prop: 'remark', prop: 'remark',
// rules: [{ required: true, message: '', trigger: 'blur' }],
}, },
], ],
], ],

View File

@ -1,187 +0,0 @@
<!--
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
:disabled="disabled"
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"
:disabled="disabled"
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
:disabled="disabled"
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
:disabled="disabled"
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
:disabled="disabled"
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
:disabled="disabled"
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: () => ({}),
},
disabled: {
type: Boolean,
default: false,
},
},
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

@ -1,361 +0,0 @@
<template>
<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"
@emitFun="handleEmitFun">
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
label="操作"
:width="120"
:method-list="tableBtn"
@clickBtn="handleTableBtnClick" />
</base-table>
<!-- 分页组件 -->
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNo"
:limit.sync="queryParams.pageSize"
@pagination="getList" />
<!-- 对话框(添加 / 修改) -->
<base-dialog
:dialogTitle="title"
:dialogVisible="open"
width="736px"
@close="cancel"
@cancel="cancel"
@confirm="submitForm">
<DialogForm v-if="open" ref="form" v-model="form" :rows="rows" />
</base-dialog>
</div>
</template>
<script>
import {
createEquipmentGroupAlarm,
updateEquipmentGroupAlarm,
deleteEquipmentGroupAlarm,
getEquipmentGroupAlarm,
getEquipmentGroupAlarmPage,
exportEquipmentGroupAlarmExcel,
} from '@/api/base/equipmentGroupAlarm';
import basicPageMixin from '@/mixins/lb/basicPageMixin';
import moment from 'moment';
import { publicFormatter } from '@/utils/dict';
import DialogForm from './dialogForm.vue';
export default {
name: 'EquipmentGroupAlarm',
components: { DialogForm },
mixins: [basicPageMixin],
data() {
return {
searchBarKeys: [''],
tableBtn: [
this.$auth.hasPermi('base:equipment-group-alarm:update')
? {
type: 'edit',
btnName: '修改',
}
: undefined,
this.$auth.hasPermi('base:equipment-group-alarm:delete')
? {
type: 'delete',
btnName: '删除',
}
: undefined,
].filter((v) => v),
tableProps: [
{
prop: 'createTime',
label: '添加时间',
fixed: true,
width: 180,
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
},
{ width: 240, prop: 'code', label: '报警编码' },
{
prop: 'type',
label: '报警类型',
filter: (val) =>
val != null ? ['-', '字符型', '布尔型', '-'][val] : '-',
},
{
prop: 'grade',
label: '报警级别',
filter: publicFormatter(this.DICT_TYPE.EQU_ALARM_LEVEL),
},
{ prop: 'alarmCode', label: '设备报警编码' },
{ prop: 'plcParamName', label: '参数列名' },
{ prop: 'alarmContent', label: '报警内容' },
],
searchBarFormConfig: [
{
type: 'input',
label: '设备分组编码',
width: '220',
placeholder: '/',
param: 'equipmentGroupCode',
defaultSelect: null,
disabled: true,
},
{
type: 'input',
label: '设备分组名称',
placeholder: '/',
param: 'equipmentGroupName',
defaultSelect: null,
disabled: true,
},
{
type: this.$auth.hasPermi('base:equipment-group-alarm:create')
? 'button'
: '',
btnName: '新增',
name: 'add',
plain: true,
color: 'success',
},
],
rows: [
[
{
input: true,
label: '报警编码', //
prop: 'code',
url: '/base/equipment-group-alarm/getCode',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
},
{
select: true,
label: '报警类型', //
prop: 'type',
options: [
{ label: '布尔型', value: 2 },
{ label: '字符型', value: 1 },
],
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
},
],
[
{
select: true,
label: '报警级别', //
prop: 'grade',
options: this.getDictDatas(this.DICT_TYPE.EQU_ALARM_LEVEL),
},
{
input: true,
label: '设备报警编码', //
prop: 'alarmCode',
},
],
[
{
input: true,
label: '参数列名', //
prop: 'plcParamName',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
},
{
input: true,
label: '报警内容',
prop: 'alarmContent',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
},
],
],
//
open: false,
//
queryParams: {
pageNo: 1,
pageSize: 10,
equipmentGroupId: null,
},
//
form: {
id: null,
equipmentGroupId: null,
code: null,
type: null,
grade: null,
alarmCode: null,
alarmContent: null,
plcParamName: null,
},
// //
// rules: {
// equipmentGroupId: [{ required: true, message: "IDbase_equipment_group", trigger: "blur" }],
// type: [{ required: true, message: ":1.2.", trigger: "change" }],
// alarmContent: [{ required: true, message: " ", trigger: "blur" }],
// plcParamName: [{ required: true, message: "plc_param_name", trigger: "blur" }],
// }
};
},
// watch: {
// $route(value) {
// console.log('new route info', value)
// }
// },
// created() {
// this.getList();
// },
activated() {
//
const { equipmentGroupName, equipmentGroupCode, equipmentGroupId } =
this.$route.params;
this.setSearchBarFormValue('equipmentGroupName', equipmentGroupName);
this.setSearchBarFormValue('equipmentGroupCode', equipmentGroupCode);
this.queryParams.equipmentGroupId = equipmentGroupId;
// if (!equipmentGroupId) this.getList(); //
this.getList();
},
deactivated() {
this.setSearchBarFormValue('equipmentGroupName', null);
this.setSearchBarFormValue('equipmentGroupCode', null);
this.queryParams.equipmentGroupId = null;
},
methods: {
/** 设置 searchBarForm 的默认值 - 用得比较少 */
setSearchBarFormValue(param, value) {
this.searchBarFormConfig.forEach((config) => {
if (config.param == param) {
config.defaultSelect = value;
}
});
},
/** 查询列表 */
getList() {
this.loading = true;
//
getEquipmentGroupAlarmPage(this.queryParams).then((response) => {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
});
},
/** 取消按钮 */
cancel() {
this.open = false;
this.reset();
},
/** 表单重置 */
reset() {
this.form = {
id: null,
equipmentGroupId: null,
code: null,
type: null,
grade: null,
alarmCode: null,
alarmContent: null,
plcParamName: null,
};
this.resetForm('form');
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm('queryForm');
this.handleQuery();
},
/** 新增按钮操作 */
handleAdd() {
if (this.queryParams.equipmentGroupId == null)
return this.$message.error('没有检测到设备分组信息');
this.reset();
this.open = true;
this.title = '添加设备分组报警明细';
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id;
getEquipmentGroupAlarm(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = '修改设备分组报警明细';
});
},
/** 提交按钮 */
submitForm() {
this.$refs['form'].validate((valid) => {
if (!valid) {
return;
}
//
if (this.form.id != null) {
updateEquipmentGroupAlarm({
...this.form,
equipmentGroupId: this.queryParams.equipmentGroupId,
}).then((response) => {
this.$modal.msgSuccess('修改成功');
this.open = false;
this.getList();
});
return;
}
//
createEquipmentGroupAlarm({
...this.form,
equipmentGroupId: this.queryParams.equipmentGroupId,
}).then((response) => {
this.$modal.msgSuccess('新增成功');
this.open = false;
this.getList();
});
});
},
/** 删除按钮操作 */
handleDelete(row) {
const id = row.id;
this.$modal
.confirm('是否确认删除该报警?')
.then(function () {
return deleteEquipmentGroupAlarm(id);
})
.then(() => {
this.getList();
this.$modal.msgSuccess('删除成功');
})
.catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
//
let params = { ...this.queryParams };
params.pageNo = undefined;
params.pageSize = undefined;
this.$modal
.confirm('是否确认导出所有设备分组报警明细数据项?')
.then(() => {
this.exportLoading = true;
return exportEquipmentGroupAlarmExcel(params);
})
.then((response) => {
this.$download.excel(response, '设备分组报警明细.xls');
this.exportLoading = false;
})
.catch(() => {});
},
},
};
</script>

View File

@ -127,7 +127,7 @@ export default {
label: '巡检内容编号', label: '巡检内容编号',
prop: 'code', prop: 'code',
url: '/base/equipment-check/getCode', url: '/base/equipment-check/getCode',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '巡检内容编号不能为空', trigger: 'blur' }],
}, },
], ],
[ [
@ -135,7 +135,7 @@ export default {
input: true, input: true,
label: '巡检项目', label: '巡检项目',
prop: 'program', prop: 'program',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '巡检项目不能为空', trigger: 'blur' }],
}, },
], ],
[ [
@ -143,7 +143,7 @@ export default {
input: true, input: true,
label: '巡检内容', label: '巡检内容',
prop: 'content', prop: 'content',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '巡检内容不能为空', trigger: 'blur' }],
}, },
], ],
[ [

View File

@ -166,7 +166,7 @@ export default {
filterable: true, filterable: true,
clearable: true, clearable: true,
}, },
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '设备名称不能为空', trigger: 'blur' }],
}, },
], ],
[ [
@ -181,8 +181,7 @@ export default {
clearable: true, clearable: true,
multiple: true, multiple: true,
}, },
options: [{ label: 'test', value: 'test' }], rules: [{ required: true, message: '维修工不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
}, },
{ {
input: true, input: true,
@ -195,7 +194,7 @@ export default {
datetime: true, datetime: true,
label: '故障发生时间', label: '故障发生时间',
prop: 'faultTime', prop: 'faultTime',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '故障发生时间不能为空', trigger: 'blur' }],
bind: { bind: {
format: 'yyyy-MM-dd HH:mm:ss', format: 'yyyy-MM-dd HH:mm:ss',
'value-format': 'timestamp', 'value-format': 'timestamp',

View File

@ -152,14 +152,14 @@ export default {
input: true, input: true,
label: '配置名称', label: '配置名称',
prop: 'name', prop: 'name',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '配置名称不能为空', trigger: 'blur' }],
}, },
{ {
input: true, input: true,
label: '配置编码', label: '配置编码',
prop: 'code', prop: 'code',
url: '/base/equipment-check-config/getCode', url: '/base/equipment-check-config/getCode',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '配置编码不能为空', trigger: 'blur' }],
}, },
], ],
[ [
@ -168,7 +168,7 @@ export default {
label: '设备名称', label: '设备名称',
prop: 'equipmentId', prop: 'equipmentId',
url: '/base/core-equipment/listAll', url: '/base/core-equipment/listAll',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '设备名称不能为空', trigger: 'blur' }],
}, },
{ {
input: true, input: true,

View File

@ -169,14 +169,14 @@ export default {
input: true, input: true,
label: '计划名称', label: '计划名称',
prop: 'name', prop: 'name',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '计划名称不能为空', trigger: 'blur' }],
}, },
{ {
input: true, input: true,
label: '计划编号', label: '计划编号',
prop: 'code', prop: 'code',
url: '/base/equipment-maintain-plan/getCode', url: '/base/equipment-maintain-plan/getCode',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '计划编号不能为空', trigger: 'blur' }],
}, },
], ],
[ [
@ -185,7 +185,7 @@ export default {
label: '设备名称', label: '设备名称',
prop: 'equipmentId', prop: 'equipmentId',
url: '/base/core-equipment/listAll', url: '/base/core-equipment/listAll',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '设备名称不能为空', trigger: 'blur' }],
}, },
{ {
select: true, select: true,

View File

@ -186,7 +186,7 @@ export default {
filterable: true, filterable: true,
clearable: true, clearable: true,
}, },
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '保养设备不能为空', trigger: 'blur' }],
}, },
{ {
select: true, select: true,
@ -199,7 +199,7 @@ export default {
clearable: true, clearable: true,
multiple: true, multiple: true,
}, },
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '保养人员不能为空', trigger: 'blur' }],
}, },
{ {
input: true, input: true,
@ -216,7 +216,7 @@ export default {
'active-value': 1, 'active-value': 1,
'inactive-value': 2, 'inactive-value': 2,
}, },
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '是否计划保养不能为空', trigger: 'blur' }],
}, },
{}, {},
{ {
@ -235,7 +235,7 @@ export default {
datetime: true, datetime: true,
label: '开始时间', label: '开始时间',
prop: 'startTime', prop: 'startTime',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '开始时间不能为空', trigger: 'blur' }],
bind: { bind: {
format: 'yyyy-MM-dd HH:mm:ss', format: 'yyyy-MM-dd HH:mm:ss',
'value-format': 'timestamp', 'value-format': 'timestamp',
@ -247,7 +247,7 @@ export default {
datetime: true, datetime: true,
label: '结束时间', label: '结束时间',
prop: 'endTime', prop: 'endTime',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '结束时间不能为空', trigger: 'blur' }],
bind: { bind: {
format: 'yyyy-MM-dd HH:mm:ss', format: 'yyyy-MM-dd HH:mm:ss',
'value-format': 'timestamp', 'value-format': 'timestamp',
@ -269,7 +269,6 @@ export default {
prop: 'files', prop: 'files',
}, },
], ],
// TODO:
[ [
{ {
label: '保养描述', label: '保养描述',

View File

@ -63,7 +63,7 @@
<el-form-item <el-form-item
label="维修开始时间" label="维修开始时间"
prop="maintenanceStartTime" prop="maintenanceStartTime"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]"> :rules="[{ required: true, message: '维修开始时间不能为空', trigger: 'blur' }]">
<el-date-picker <el-date-picker
v-model="dataForm.maintenanceStartTime" v-model="dataForm.maintenanceStartTime"
type="datetime" type="datetime"
@ -77,7 +77,7 @@
<el-form-item <el-form-item
label="维修结束时间" label="维修结束时间"
prop="maintenanceFinishTime" prop="maintenanceFinishTime"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]"> :rules="[{ required: true, message: '维修结束时间不能为空', trigger: 'blur' }]">
<el-date-picker <el-date-picker
v-model="dataForm.maintenanceFinishTime" v-model="dataForm.maintenanceFinishTime"
type="datetime" type="datetime"
@ -91,7 +91,7 @@
<el-form-item <el-form-item
label="维修方式" label="维修方式"
prop="repairMode" prop="repairMode"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]"> :rules="[{ required: true, message: '维修方式不能为空', trigger: 'blur' }]">
<el-select <el-select
:disabled="disabled" :disabled="disabled"
v-model="dataForm.repairMode" v-model="dataForm.repairMode"
@ -127,7 +127,7 @@
<el-form-item <el-form-item
label="故障明细" label="故障明细"
prop="faultDetail" prop="faultDetail"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]"> :rules="[{ required: true, message: '故障明细不能为空', trigger: 'blur' }]">
<!-- // --> <!-- // -->
<editor v-model="dataForm.faultDetail" :read-only="disabled" :min-height="380"/> <editor v-model="dataForm.faultDetail" :read-only="disabled" :min-height="380"/>
</el-form-item> </el-form-item>

View File

@ -169,7 +169,7 @@ export default {
input: true, input: true,
label: '维修单号', label: '维修单号',
prop: 'repairOrderNumber', prop: 'repairOrderNumber',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '维修单号不能为空', trigger: 'blur' }],
}, },
{ {
select: true, select: true,
@ -180,7 +180,7 @@ export default {
filterable: true, filterable: true,
clearable: true, clearable: true,
}, },
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '设备名称不能为空', trigger: 'blur' }],
}, },
], ],
[ [
@ -198,7 +198,7 @@ export default {
// multiple: true, // multiple: true,
}, },
// options: [{ label: 'test', value: 'test' }], // options: [{ label: 'test', value: 'test' }],
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '维修工不能为空', trigger: 'blur' }],
}, },
{ {
input: true, input: true,
@ -211,7 +211,7 @@ export default {
datetime: true, datetime: true,
label: '故障发生时间', label: '故障发生时间',
prop: 'faultTime', prop: 'faultTime',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '故障发生时间不能为空', trigger: 'blur' }],
bind: { bind: {
format: 'yyyy-MM-dd HH:mm:ss', format: 'yyyy-MM-dd HH:mm:ss',
'value-format': 'timestamp', 'value-format': 'timestamp',

View File

@ -161,7 +161,7 @@ export default {
input: true, input: true,
label: '配置名称', label: '配置名称',
prop: 'name', prop: 'name',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '配置名称不能为空', trigger: 'blur' }],
}, },
], ],
[ [
@ -174,7 +174,7 @@ export default {
filterable: true, filterable: true,
clearable: true, clearable: true,
}, },
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '设备名称不能为空', trigger: 'blur' }],
}, },
], ],
[ [

View File

@ -153,7 +153,7 @@ export default {
filterable: true, filterable: true,
clearable: true, clearable: true,
}, },
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '供应商不能为空', trigger: 'blur' }],
}, },
], ],
[ [
@ -196,21 +196,6 @@ export default {
prop: 'remark', prop: 'remark',
}, },
], ],
// [
// {
// datetime: true,
// label: '',
// prop: 'faultTime',
// rules: [{ required: true, message: '', trigger: 'blur' }],
// bind: {
// format: 'yyyy-MM-dd HH:mm:ss',
// 'value-format': 'timestamp',
// // 'value-format': 'yyyy-MM-dd HH:mm:ss',
// clearable: true,
// },
// },
// ],
], ],
// //
open: false, open: false,

View File

@ -211,7 +211,7 @@ export default {
input: true, input: true,
label: '配置名称', label: '配置名称',
prop: 'name', prop: 'name',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '配置名称不能为空', trigger: 'blur' }],
}, },
], ],
[ [
@ -224,7 +224,7 @@ export default {
filterable: true, filterable: true,
clearable: true, clearable: true,
}, },
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '设备名称不能为空', trigger: 'blur' }],
}, },
], ],
[ [

View File

@ -180,7 +180,7 @@ export default {
input: true, input: true,
label: '工艺名称', label: '工艺名称',
prop: 'name', prop: 'name',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '工艺名称不能为空', trigger: 'blur' }],
// bind: { // bind: {
// disabled: this.editMode == 'detail', // some condition, like detail mode... // disabled: this.editMode == 'detail', // some condition, like detail mode...
// } // }
@ -197,6 +197,7 @@ export default {
select: true, select: true,
label: '产线', label: '产线',
prop: 'lineId', prop: 'lineId',
rules: [{ required: true, message: '产线不能为空', trigger: 'blur' }],
// cache: 'processFlow::lineList', // cache: 'processFlow::lineList',
url: '/base/core-production-line/listAll', url: '/base/core-production-line/listAll',
bind: { bind: {
@ -217,8 +218,9 @@ export default {
[ [
{ {
textarea: true, textarea: true,
label: '功能描述', label: '工艺描述',
prop: 'remark', prop: 'remark',
rules: [{ required: true, message: '工艺描述不能为空', trigger: 'blur' }],
}, },
], ],
], ],

View File

@ -102,7 +102,7 @@ export default {
input: true, input: true,
label: '工序名称', label: '工序名称',
prop: 'name', prop: 'name',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '工序名称不能为空', trigger: 'blur' }],
}, },
], ],
[ [
@ -111,7 +111,7 @@ export default {
label: '工段', label: '工段',
prop: 'sectionId', prop: 'sectionId',
url: '/base/core-workshop-section/listAll', url: '/base/core-workshop-section/listAll',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '工段不能为空', trigger: 'blur' }],
bind: { bind: {
filterable: true, filterable: true,
}, },

View File

@ -25,7 +25,7 @@ export default {
data() { data() {
return { return {
flowId: null, flowId: null,
currentDet: null currentDet: null,
}; };
}, },
provide() { provide() {
@ -36,6 +36,14 @@ export default {
}, },
}; };
}, },
beforeRouteEnter(to, from, next) {
console.log('tot', to, from);
if (to.params.id) {
next();
} else {
next({ path: '/extend/process-flow' });
}
},
activated() { activated() {
console.log('activated...', this.$route.params); console.log('activated...', this.$route.params);
this.flowId = this.$route.params.id; this.flowId = this.$route.params.id;
@ -44,10 +52,9 @@ export default {
methods: { methods: {
handleDetSelected(det) { handleDetSelected(det) {
if (det != null) { if (det != null) {
this.currentDet = { ...det } this.currentDet = { ...det };
} } else this.currentDet = null;
else this.currentDet = null; },
}
}, },
}; };
</script> </script>

View File

@ -68,7 +68,7 @@ export default {
input: true, input: true,
label: '工序名称', label: '工序名称',
prop: 'name', prop: 'name',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '工序名称不能为空', trigger: 'blur' }],
}, },
], ],
[ [
@ -77,7 +77,7 @@ export default {
label: '工段', label: '工段',
prop: 'sectionId', prop: 'sectionId',
url: '/base/core-workshop-section/listAll', url: '/base/core-workshop-section/listAll',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '工段不能为空', trigger: 'blur' }],
bind: { bind: {
filterable: true, filterable: true,
}, },

View File

@ -37,14 +37,16 @@
]"> ]">
<el-input v-model="dataForm.buttonId" @change="$emit('update', dataForm)" placeholder="请输入整数" /> <el-input v-model="dataForm.buttonId" @change="$emit('update', dataForm)" placeholder="请输入整数" />
</el-form-item> </el-form-item>
<!--
<el-form-item <el-form-item
label="报警编码" label="产线"
prop="code" prop="productionLineId"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]"> :rules="[
{ required: true, message: '产线不能为空', trigger: 'blur' },
]">
<el-select <el-select
v-model="dataForm.code" v-model="dataForm.productionLineId"
placeholder="请选择产线" placeholder="请选择产线"
filterable
@change="handleProductlineChange"> @change="handleProductlineChange">
<el-option <el-option
v-for="opt in productionLineList" v-for="opt in productionLineList"
@ -52,12 +54,50 @@
:label="opt.label" :label="opt.label"
:value="opt.value" /> :value="opt.value" />
</el-select> </el-select>
</el-form-item> --> </el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="工段"
prop="sectionId"
:rules="[
{ required: true, message: '工段不能为空', trigger: 'blur' },
]">
<el-select
v-model="dataForm.sectionId"
placeholder="请选择工段"
filterable
@change="$emit('update', dataForm)">
<el-option
v-for="opt in workshopSectionList"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="按钮盒模式" prop="model"> <el-form-item
<el-input v-model="dataForm.model" @change="$emit('update', dataForm)" placeholder="请输入按钮盒模式" /> label="按钮盒识别码"
prop="buttonId"
:rules="[
{
required: true,
message: '按钮盒识别码不能为空',
trigger: 'blur',
},
{
type: 'number',
message: '请输入整数',
trigger: 'blur',
transform: (val) => Number.isInteger(Number(val)) && Number(val),
},
]">
<el-input
v-model="dataForm.buttonId"
@change="$emit('update', dataForm)"
placeholder="请输入整数" />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -81,9 +121,11 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="检测内容" prop="inspectionDetContent"> <el-form-item label="检测内容" prop="inspectionDetId">
<el-input type="textarea" v-model="dataForm.inspectionDetContent" placeholder="请输入检测内容" <el-select v-model="dataForm.inspectionDetId" placeholder="请选择检测内容" filterable
@change="$emit('update', dataForm)"></el-input> @change="$emit('update', dataForm)">
<el-option v-for="opt in inspectionDetList" :key="opt.value" :label="opt.label" :value="opt.value" />
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -109,11 +151,13 @@ export default {
return { return {
formLoading: true, formLoading: true,
productionLineList: [], productionLineList: [],
inspectionDetList:[],
workshopSectionList: [], workshopSectionList: [],
}; };
}, },
mounted() { mounted() {
this.getProductionLineList(); this.getProductionLineList()
this.getQualityInspectionDetList()
// this.getWorksectionList(); // this.getWorksectionList();
// this.getCode('/base/equipment-group-alarm/getCode').then((code) => { // this.getCode('/base/equipment-group-alarm/getCode').then((code) => {
// this.formLoading = false; // this.formLoading = false;
@ -153,7 +197,20 @@ export default {
} }
this.formLoading = false; this.formLoading = false;
}, },
async getQualityInspectionDetList() {
this.formLoading = true;
const res = await this.$axios({
url: '/base/quality-inspection-det/listAll',
method: 'get',
});
if (res.code == 0) {
this.inspectionDetList = res.data.map((item) => ({
label: item.content,
value: item.id,
}));
}
this.formLoading = false;
},
async getWorksectionList(id) { async getWorksectionList(id) {
this.formLoading = true; this.formLoading = true;
const res = await this.$axios({ const res = await this.$axios({

View File

@ -70,7 +70,7 @@ export default {
label: '产线', label: '产线',
url: '/base/production-line/listAll', url: '/base/production-line/listAll',
prop: 'productionId', prop: 'productionId',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '产线不能为空', trigger: 'blur' }],
bind: { bind: {
filterable: true, filterable: true,
}, },
@ -80,7 +80,7 @@ export default {
label: '工段', label: '工段',
url: '/base/workshop-section/listAll', url: '/base/workshop-section/listAll',
prop: 'sectionId', prop: 'sectionId',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '工段不能为空', trigger: 'blur' }],
bind: { bind: {
filterable: true, filterable: true,
}, },
@ -120,10 +120,14 @@ export default {
bind: { type: 'number', min: 0, max: 100 }, bind: { type: 'number', min: 0, max: 100 },
}, },
{ {
textarea: true, select: true,
label: '检测内容', label: '检测内容',
prop: 'inspectionDetContent', url: '/base/quality-inspection-det/listAll',
// rules: [{ required: true, message: '', trigger: 'blur' }], prop: 'inspectionDetId',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
bind: {
filterable: true,
},
}, },
], ],
], ],
@ -218,7 +222,7 @@ export default {
form: { form: {
id: null, id: null,
buttonId: null, buttonId: null,
inspectionDetContent: null, inspectionDetId: null,
productionLineId: null, productionLineId: null,
sectionId: null, sectionId: null,
model: null, model: null,

View File

@ -50,7 +50,7 @@
label: '检测类型', label: '检测类型',
prop: 'typeId', prop: 'typeId',
url: '/base/quality-inspection-type/listAll', url: '/base/quality-inspection-type/listAll',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '检测类型不能为空', trigger: 'blur' }],
bind: { bind: {
filterable: true, filterable: true,
}, },
@ -61,7 +61,7 @@
input: true, input: true,
label: '检测内容', label: '检测内容',
prop: 'content', prop: 'content',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '检测内容不能为空', trigger: 'blur' }],
}, },
], ],
[ [

View File

@ -47,7 +47,13 @@
input: true, input: true,
label: '检测类型名称', label: '检测类型名称',
prop: 'name', prop: 'name',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [
{
required: true,
message: '检测类型名称不能为空',
trigger: 'blur',
},
],
// bind: { // bind: {
// disabled: true, // some condition, like detail mode... // disabled: true, // some condition, like detail mode...
// } // }
@ -174,31 +180,7 @@ export default {
plain: true, plain: true,
color: 'success', color: 'success',
}, },
// {
// type: this.$auth.hasPermi('base:quality-inspection-type:export')
// ? 'button'
// : '',
// btnName: '',
// name: 'export',
// color: 'warning',
// },
], ],
//
// formRows: [
// [
// {
// input: true,
// label: '',
// prop: 'name',
// rules: [{ required: true, message: '', trigger: 'blur' }],
// // bind: {
// // disabled: true, // some condition, like detail mode...
// // }
// },
// ],
// [{ input: true, label: '', prop: 'code' }],
// [{ input: true, label: '', prop: 'remark' }],
// ],
// //
open: false, open: false,
// //
@ -211,7 +193,7 @@ export default {
form: { form: {
name: null, name: null,
code: undefined, code: undefined,
remark:undefined remark: undefined,
}, },
}; };
}, },

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-11-06 15:15:30 * @Date: 2023-11-06 15:15:30
* @LastEditTime: 2023-11-06 16:00:24 * @LastEditTime: 2023-11-20 15:23:59
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -10,18 +10,18 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="报废原因编码" prop="code"> <el-form-item label="报废原因编码" prop="code">
<el-input v-model="dataForm.code" placeholder="请输入报废类型编码" /> <el-input v-model="dataForm.code" placeholder="请输入报废原因编码" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="报废原因" prop="content"> <el-form-item label="报废原因" prop="content">
<el-input v-model="dataForm.content" placeholder="请输入报废类型" /> <el-input v-model="dataForm.content" placeholder="请输入报废原因" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="报废类型" prop="description"> <el-form-item label="报废类型" prop="typeId">
<el-select v-model="dataForm.typeId" placeholder="请选择报废类型"> <el-select v-model="dataForm.typeId" placeholder="请选择报废类型">
<el-option v-for="dict in typeList" :key="dict.id" :label="dict.name" :value="dict.id" /> <el-option v-for="dict in typeList" :key="dict.id" :label="dict.name" :value="dict.id" />
</el-select> </el-select>
@ -68,6 +68,7 @@ export default {
// materialId: [{ required: true, message: "", trigger: "blur" }], // materialId: [{ required: true, message: "", trigger: "blur" }],
code: [{ required: true, message: "报废原因编码不能为空", trigger: "blur" }], code: [{ required: true, message: "报废原因编码不能为空", trigger: "blur" }],
content: [{ required: true, message: "报废原因不能为空", trigger: "blur" }], content: [{ required: true, message: "报废原因不能为空", trigger: "blur" }],
typeId: [{ required: true, message: "报废类型不能为空", trigger: "change" }],
} }
}; };
}, },

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-11-06 15:15:30 * @Date: 2023-11-06 15:15:30
* @LastEditTime: 2023-11-07 18:56:20 * @LastEditTime: 2023-11-21 14:11:18
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -23,8 +23,8 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="数量" prop="sum"> <el-form-item label="数量" prop="num">
<el-input v-model="dataForm.sum" placeholder="请输入数量" /> <el-input v-model="dataForm.num" placeholder="请输入数量" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -176,9 +176,9 @@ export default {
getDetList().then((res) => { getDetList().then((res) => {
console.log(res); console.log(res);
// console.log(response); // console.log(response);
this.workOrderList = res.data.map((item) => { this.detList = res.data.map((item) => {
return { return {
name: item.name, name: item.content,
id: item.id id: item.id
} }
}) })

View File

@ -16,7 +16,7 @@
<el-form-item <el-form-item
label="检测内容" label="检测内容"
prop="inspectionDetId" prop="inspectionDetId"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]"> :rules="[{ required: true, message: '检测内容不能为空', trigger: 'blur' }]">
<el-select <el-select
v-model="innerDataForm.inspectionDetId" v-model="innerDataForm.inspectionDetId"
placeholder="请选择检测内容" placeholder="请选择检测内容"
@ -36,7 +36,7 @@
<el-form-item <el-form-item
label="来源" label="来源"
prop="source" prop="source"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]"> :rules="[{ required: true, message: '来源不能为空', trigger: 'blur' }]">
<el-select <el-select
v-model="innerDataForm.source" v-model="innerDataForm.source"
placeholder="请选择来源" placeholder="请选择来源"
@ -60,7 +60,7 @@
<el-form-item <el-form-item
label="产线" label="产线"
prop="productionLineId" prop="productionLineId"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]"> :rules="[{ required: true, message: '产线不能为空', trigger: 'blur' }]">
<el-select <el-select
v-model="innerDataForm.productionLineId" v-model="innerDataForm.productionLineId"
placeholder="请选择产线" placeholder="请选择产线"
@ -79,7 +79,7 @@
<el-form-item <el-form-item
label="工段" label="工段"
prop="sectionId" prop="sectionId"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]"> :rules="[{ required: true, message: '工段不能为空', trigger: 'blur' }]">
<el-select <el-select
v-model="innerDataForm.sectionId" v-model="innerDataForm.sectionId"
placeholder="请选择工段" placeholder="请选择工段"
@ -110,7 +110,7 @@
<el-form-item <el-form-item
label="检测时间" label="检测时间"
prop="checkTime" prop="checkTime"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]"> :rules="[{ required: true, message: '检测时间不能为空', trigger: 'blur' }]">
<el-date-picker <el-date-picker
v-model="innerDataForm.checkTime" v-model="innerDataForm.checkTime"
type="datetime" type="datetime"

View File

@ -1,8 +1,6 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" @headBtnClick="handleSearchBarBtnClick" />
<!-- 列表 --> <!-- 列表 -->
<el-row> <el-row>
<el-col class="custom-tabs"> <el-col class="custom-tabs">
@ -20,6 +18,7 @@
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane :label="'\u3000图形数据\u3000'" name="chart" style="overflow: inherit"> <el-tab-pane :label="'\u3000图形数据\u3000'" name="chart" style="overflow: inherit">
<SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" @headBtnClick="handleSearchBarBtnClick" />
<div id="main" style="height: 500px;width: 1000px;"></div> <div id="main" style="height: 500px;width: 1000px;"></div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
@ -75,13 +74,13 @@ export default {
}, },
activeName: 'table', activeName: 'table',
searchBarFormConfig: [ searchBarFormConfig: [
// { {
// type: 'select', type: 'label',
// label: '', label: '当前检测数据柱状图',
// placeholder: '', // placeholder: '',
// param: 'workOrderId', // param: 'workOrderId',
// selectOptions: [], // selectOptions: [],
// }, },
// { // {
// type: 'select', // type: 'select',
// label: '', // label: '',
@ -95,40 +94,40 @@ export default {
// placeholder: '', // placeholder: '',
// param: 'inspectionDetContent', // param: 'inspectionDetContent',
// }, // },
{
type: 'datePicker',
label: '时间段',
dateType: 'daterange', // datetimerange
// format: 'yyyy-MM-dd HH:mm:ss',
format: 'yyyy-MM-dd',
valueFormat: 'timestamp',
rangeSeparator: '-',
startPlaceholder: '开始日期',
endPlaceholder: '结束日期',
defaultTime: ['00:00:00', '23:59:59'],
param: 'checkTime',
// width: 350,
},
{
type: 'button',
btnName: '查询',
name: 'search',
color: 'primary',
},
{
type: 'separate',
},
// { // {
// type: this.$auth.hasPermi( // type: 'datePicker',
// 'base:quality-inspection-record:create' // label: '',
// ) // dateType: 'daterange', // datetimerange
// ? 'button' // // format: 'yyyy-MM-dd HH:mm:ss',
// : '', // format: 'yyyy-MM-dd',
// btnName: '', // valueFormat: 'timestamp',
// name: 'add', // rangeSeparator: '-',
// plain: true, // startPlaceholder: '',
// color: 'success', // endPlaceholder: '',
// defaultTime: ['00:00:00', '23:59:59'],
// param: 'checkTime',
// // width: 350,
// }, // },
// {
// type: 'button',
// btnName: '',
// name: 'search',
// color: 'primary',
// },
// {
// type: 'separate',
// },
// // {
// // type: this.$auth.hasPermi(
// // 'base:quality-inspection-record:create'
// // )
// // ? 'button'
// // : '',
// // btnName: '',
// // name: 'add',
// // plain: true,
// // color: 'success',
// // },
], ],
// tableBtn: [ // tableBtn: [
// this.$auth.hasPermi('base:quality-inspection-record:update') // this.$auth.hasPermi('base:quality-inspection-record:update')
@ -316,6 +315,7 @@ export default {
data: arrYAxis, data: arrYAxis,
type: 'bar', type: 'bar',
showBackground: true, showBackground: true,
barWidth:'20',
backgroundStyle: { backgroundStyle: {
color: 'rgba(180, 180, 180, 0.2)' color: 'rgba(180, 180, 180, 0.2)'
} }

View File

@ -68,7 +68,7 @@ export default {
input: true, input: true,
label: '工序名称', label: '工序名称',
prop: 'name', prop: 'name',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '工序名称不能为空', trigger: 'blur' }],
}, },
], ],
[ [
@ -77,7 +77,7 @@ export default {
label: '工段', label: '工段',
prop: 'sectionId', prop: 'sectionId',
url: '/base/core-workshop-section/listAll', url: '/base/core-workshop-section/listAll',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '工段不能为空', trigger: 'blur' }],
bind: { bind: {
filterable: true, filterable: true,
}, },

View File

@ -6,91 +6,40 @@
--> -->
<template> <template>
<el-form <el-form ref="form" :model="innerDataForm" label-width="100px" v-loading="formLoading">
ref="form"
:model="innerDataForm"
label-width="100px"
v-loading="formLoading">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item label="工单号" prop="workOrderId" :rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
label="检测内容" <el-select v-model="innerDataForm.workOrderId" placeholder="请选择工单号" filterable clearable>
prop="inspectionDetId" <el-option v-for="opt in workOrderList" :key="opt.value" :label="opt.label" :value="opt.value" />
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-select
v-model="innerDataForm.inspectionDetId"
placeholder="请选择检测内容"
filterable
clearable
@change="handleInspectionDetChange">
<el-option
v-for="opt in inspectionDetList"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item label="检测内容" prop="inspectionDetId"
label="来源"
prop="source"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]"> :rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-select <el-select v-model="innerDataForm.inspectionDetId" placeholder="请选择检测内容" filterable clearable
v-model="innerDataForm.source" @change="handleInspectionDetChange">
placeholder="请选择来源" <el-option v-for="opt in inspectionDetList" :key="opt.value" :label="opt.label" :value="opt.value" />
filterable
clearable
@change="$emit('update', innerDataForm)">
<el-option
v-for="opt in [
{ label: '手动', value: 1 },
{ label: '自动', value: 2 },
]"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item label="产线" prop="productionLineId"
label="产线"
prop="productionLineId"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]"> :rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-select <el-select v-model="innerDataForm.productionLineId" placeholder="请选择产线" filterable clearable
v-model="innerDataForm.productionLineId"
placeholder="请选择产线"
filterable
clearable
@change="handleProductlineChange"> @change="handleProductlineChange">
<el-option <el-option v-for="opt in productionLineList" :key="opt.value" :label="opt.label" :value="opt.value" />
v-for="opt in productionLineList"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item label="工段" prop="sectionId" :rules="[{ required: false, message: '不能为空', trigger: 'blur' }]">
label="工段" <el-select v-model="innerDataForm.sectionId" placeholder="请选择工段" clearable filterable
prop="sectionId"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-select
v-model="innerDataForm.sectionId"
placeholder="请选择工段"
clearable
filterable
@change="$emit('update', innerDataForm)"> @change="$emit('update', innerDataForm)">
<el-option <el-option v-for="opt in sectionList" :key="opt.value" :label="opt.label" :value="opt.value" />
v-for="opt in sectionList"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -98,45 +47,36 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="检测人员" prop="checkPerson"> <el-form-item label="检测人员" prop="checkPerson">
<el-input <el-input v-model="innerDataForm.checkPerson" clearable @change="$emit('update', innerDataForm)"
v-model="innerDataForm.checkPerson"
clearable
@change="$emit('update', innerDataForm)"
placeholder="请输入检测人员" /> placeholder="请输入检测人员" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item label="检测时间" prop="checkTime" :rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
label="检测时间" <el-date-picker v-model="innerDataForm.checkTime" type="datetime" placeholder="请选择检测时间"
prop="checkTime" value-format="timestamp" @change="$emit('update', innerDataForm)"></el-date-picker>
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-date-picker
v-model="innerDataForm.checkTime"
type="datetime"
placeholder="请选择检测时间"
value-format="timestamp"
@change="$emit('update', innerDataForm)"></el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col> <el-col :span="12">
<el-form-item label="描述" prop="explainText"> <el-form-item label="来源" prop="source" :rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-input <el-select v-model="innerDataForm.source" placeholder="请选择来源" filterable clearable
v-model="innerDataForm.explainText" @change="$emit('update', innerDataForm)">
placeholder="请输入描述信息" <el-option v-for="opt in [
@change="$emit('update', innerDataForm)" { label: '手动', value: 1 },
type="textarea"></el-input> { label: '自动', value: 2 },
]" :key="opt.value" :label="opt.label" :value="opt.value" />
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row :gutter="20">
<el-col> <el-col>
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input <el-input v-model="innerDataForm.remark" @change="$emit('update', innerDataForm)" placeholder="请输入备注">
v-model="innerDataForm.remark" </el-input>
@change="$emit('update', innerDataForm)"
placeholder="请输入备注"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -164,12 +104,13 @@ export default {
inspectionDetList: [], inspectionDetList: [],
productionLineList: [], productionLineList: [],
sectionList: [], sectionList: [],
workOrderList:[],
innerDataForm: {}, innerDataForm: {},
cacheInspectionDetList: null, cacheInspectionDetList: null,
}; };
}, },
mounted() { mounted() {
Promise.all([this.getProductLineList(), this.getInspectionDetList()]).then( Promise.all([this.getProductLineList(), this.getInspectionDetList(), this.getWorkOrderList()]).then(
() => { () => {
this.formLoading = false; this.formLoading = false;
} }
@ -231,6 +172,14 @@ export default {
})); }));
}, },
async getWorkOrderList() {
const response = await this.$axios('base/core-work-order/listbyfilter');
this.workOrderList = response.data.map((item) => ({
label: item.name,
value: item.id,
}));
},
// //
async getInspectionDetList() { async getInspectionDetList() {
const response = await this.$axios( const response = await this.$axios(

View File

@ -74,7 +74,7 @@ export default {
url: '/base/quality-inspection-det/listAll', url: '/base/quality-inspection-det/listAll',
prop: 'inspectionDetId', prop: 'inspectionDetId',
labelKey: 'content', labelKey: 'content',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '检测内容不能为空', trigger: 'blur' }],
bind: { bind: {
filterable: true, filterable: true,
}, },
@ -102,7 +102,7 @@ export default {
bind: { bind: {
filterable: true, filterable: true,
}, },
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '产线不能为空', trigger: 'blur' }],
}, },
{ {
select: true, select: true,
@ -113,7 +113,7 @@ export default {
bind: { bind: {
filterable: true, filterable: true,
}, },
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: false, message: '不能为空', trigger: 'blur' }],
}, },
], ],
[ [
@ -126,7 +126,7 @@ export default {
datetime: true, datetime: true,
label: '检测时间', label: '检测时间',
prop: 'checkTime', prop: 'checkTime',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }], rules: [{ required: true, message: '检测时间不能为空', trigger: 'blur' }],
bind: { bind: {
format: 'yyyy-MM-dd HH:mm:ss', format: 'yyyy-MM-dd HH:mm:ss',
'value-format': 'timestamp', 'value-format': 'timestamp',
@ -135,31 +135,25 @@ export default {
}, },
}, },
], ],
// [
// {
// textarea: true,
// label: '',
// prop: 'inspectionDetContent',
// value: '',
// rules: [{ required: true, message: '', trigger: 'blur' }],
// },
// ],
[{ textarea: true, label: '描述', prop: 'explainText' }], [{ textarea: true, label: '描述', prop: 'explainText' }],
[{ input: true, label: '备注', prop: 'remark' }], [{ input: true, label: '备注', prop: 'remark' }],
], ],
searchBarFormConfig: [ searchBarFormConfig: [
{ {
type: 'select', type: 'select',
label: '产线', label: '工单号',
placeholder: '请选择产线', placeholder: '请选择工单号',
param: 'productionLineId', param: 'workOrderId',
selectOptions: [], selectOptions: [],
filterable:true
}, },
{ {
type: 'input', type: 'select',
label: '检测内容', label: '检测内容',
placeholder: '请输入检测内容', placeholder: '请输入检测内容',
selectOptions: [],
param: 'inspectionDetContent', param: 'inspectionDetContent',
filterable: true
}, },
{ {
type: 'datePicker', type: 'datePicker',
@ -217,6 +211,11 @@ export default {
fixed: true, fixed: true,
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'),
},
{
// width: 128,
prop: 'workOrderName',
label: '工单Id',
}, },
{ {
// width: 128, // width: 128,
@ -256,6 +255,7 @@ export default {
productionLineId: undefined, productionLineId: undefined,
sectionId: undefined, sectionId: undefined,
checkPerson: undefined, checkPerson: undefined,
workOrderId:undefined,
checkTime: undefined, checkTime: undefined,
source: undefined, source: undefined,
explainText: undefined, explainText: undefined,
@ -265,15 +265,16 @@ export default {
queryParams: { queryParams: {
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
workOrderId:null,
inspectionDetContent: null, inspectionDetContent: null,
checkTime: [], checkTime: [],
productionLineId: null, // productionLineId: null,
}, },
}; };
}, },
created() { created() {
this.getList(); this.getList();
// this.getProductLineList(); this.getProductLineList()
}, },
watch: { watch: {
form: { form: {
@ -309,7 +310,7 @@ export default {
methods: { methods: {
/** 获取搜索栏的产线列表 */ /** 获取搜索栏的产线列表 */
getProductLineList() { getProductLineList() {
this.$axios('/base/production-line/listAll').then((response) => { this.$axios('/base/core-work-order/listbyfilter').then((response) => {
this.searchBarFormConfig[0].selectOptions = response.data.map( this.searchBarFormConfig[0].selectOptions = response.data.map(
(item) => { (item) => {
return { return {
@ -318,6 +319,16 @@ export default {
}; };
} }
); );
})
this.$axios('/base/quality-inspection-det/listAll').then((response) => {
this.searchBarFormConfig[1].selectOptions = response.data.map(
(item) => {
return {
name: item.content,
id: item.content,
};
}
);
}); });
}, },
/** 查询列表 */ /** 查询列表 */

View File

@ -16,7 +16,7 @@
<el-form-item <el-form-item
label="检测内容" label="检测内容"
prop="inspectionDetId" prop="inspectionDetId"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]"> :rules="[{ required: true, message: '检测内容不能为空', trigger: 'blur' }]">
<el-select <el-select
v-model="innerDataForm.inspectionDetId" v-model="innerDataForm.inspectionDetId"
placeholder="请选择检测内容" placeholder="请选择检测内容"
@ -36,7 +36,7 @@
<el-form-item <el-form-item
label="来源" label="来源"
prop="source" prop="source"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]"> :rules="[{ required: true, message: '来源不能为空', trigger: 'blur' }]">
<el-select <el-select
v-model="innerDataForm.source" v-model="innerDataForm.source"
placeholder="请选择来源" placeholder="请选择来源"
@ -60,7 +60,7 @@
<el-form-item <el-form-item
label="产线" label="产线"
prop="productionLineId" prop="productionLineId"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]"> :rules="[{ required: true, message: '产线不能为空', trigger: 'blur' }]">
<el-select <el-select
v-model="innerDataForm.productionLineId" v-model="innerDataForm.productionLineId"
placeholder="请选择产线" placeholder="请选择产线"
@ -79,7 +79,7 @@
<el-form-item <el-form-item
label="工段" label="工段"
prop="sectionId" prop="sectionId"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]"> :rules="[{ required: true, message: '工段不能为空', trigger: 'blur' }]">
<el-select <el-select
v-model="innerDataForm.sectionId" v-model="innerDataForm.sectionId"
placeholder="请选择工段" placeholder="请选择工段"
@ -110,7 +110,7 @@
<el-form-item <el-form-item
label="检测时间" label="检测时间"
prop="checkTime" prop="checkTime"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]"> :rules="[{ required: true, message: '检测时间不能为空', trigger: 'blur' }]">
<el-date-picker <el-date-picker
v-model="innerDataForm.checkTime" v-model="innerDataForm.checkTime"
type="datetime" type="datetime"

View File

@ -206,6 +206,16 @@ export default {
computed: { computed: {
tableProps() { tableProps() {
return [ return [
{
// width: 128,
prop: 'workOrderId',
label: '工单号',
},
{
// width: 128,
prop: 'productionName',
label: '产品',
},
{ {
// width: 160, // width: 160,
prop: 'inspectionContent', prop: 'inspectionContent',
@ -214,8 +224,8 @@ export default {
...this.dynamicProps, ...this.dynamicProps,
{ {
// width: 128, // width: 128,
prop: 'sumInput', prop: 'sumScrap',
label: '检测类型总数', label: '检测总数',
}, },
{ {
// width: 128, // width: 128,
@ -342,6 +352,8 @@ export default {
inspectionContent: item.inspectionContent, inspectionContent: item.inspectionContent,
...keyValuePairs, ...keyValuePairs,
sumInput: item.sumInput, sumInput: item.sumInput,
productionName: item.productionName,
workOrderId: item.workOrderId,
scrapRatio: item.scrapRatio, scrapRatio: item.scrapRatio,
}; };
}); });