projects/mes-test #133
6
.env.dev
6
.env.dev
@ -17,10 +17,14 @@ VUE_APP_BASE_API = 'http://192.168.0.33:48082'
|
|||||||
# VUE_APP_BASE_API = 'http://192.168.4.173:48080'
|
# VUE_APP_BASE_API = 'http://192.168.4.173:48080'
|
||||||
# VUE_APP_BASE_API = 'http://192.168.2.173:48080'
|
# VUE_APP_BASE_API = 'http://192.168.2.173:48080'
|
||||||
# VUE_APP_BASE_API = 'http://192.168.1.49:48080'
|
# VUE_APP_BASE_API = 'http://192.168.1.49:48080'
|
||||||
# VUE_APP_BASE_API = 'http://192.168.1.8:48080'
|
# VUE_APP_BASE_API = 'http://192.168.1.8:48082'
|
||||||
# VUE_APP_BASE_API = 'http://192.168.4.159:48080'
|
# VUE_APP_BASE_API = 'http://192.168.4.159:48080'
|
||||||
# VUE_APP_BASE_API = 'http://192.168.1.56:48080'
|
# VUE_APP_BASE_API = 'http://192.168.1.56:48080'
|
||||||
# VUE_APP_BASE_API = 'http://192.168.4.159:48080'
|
# VUE_APP_BASE_API = 'http://192.168.4.159:48080'
|
||||||
|
|
||||||
|
# 积木报表指向地址
|
||||||
|
VUE_APP_JIMU_API = 'http://192.168.0.33:48082'
|
||||||
|
|
||||||
# 路由懒加载
|
# 路由懒加载
|
||||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||||
|
|
||||||
|
@ -12,7 +12,10 @@ ENV = 'production'
|
|||||||
VUE_APP_TITLE = MES系统
|
VUE_APP_TITLE = MES系统
|
||||||
|
|
||||||
# 芋道管理系统/生产环境
|
# 芋道管理系统/生产环境
|
||||||
VUE_APP_BASE_API = 'http://192.168.0.33:48082'
|
VUE_APP_BASE_API = '/prod-api'
|
||||||
|
|
||||||
|
# 积木报表指向地址
|
||||||
|
VUE_APP_JIMU_API = 'http://192.168.0.33:48082'
|
||||||
|
|
||||||
|
|
||||||
# 根据服务器或域名修改
|
# 根据服务器或域名修改
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: Do not edit
|
* @Author: Do not edit
|
||||||
* @Date: 2023-11-08 15:56:52
|
* @Date: 2023-11-08 15:56:52
|
||||||
* @LastEditTime: 2023-11-13 09:15:17
|
* @LastEditTime: 2023-11-16 20:15:02
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
@ -60,3 +60,11 @@ export function getcheckConfigByEqList(query) {
|
|||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 删除设备巡检记录
|
||||||
|
export function deleteEqCheckLog(id) {
|
||||||
|
return request({
|
||||||
|
url: '/base/equipment-check-log/delete?id=' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
16
src/api/equipment/base/maintain/record.js
Normal file
16
src/api/equipment/base/maintain/record.js
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
/*
|
||||||
|
* @Author: Do not edit
|
||||||
|
* @Date: 2023-11-08 15:56:52
|
||||||
|
* @LastEditTime: 2023-11-16 20:22:12
|
||||||
|
* @LastEditors: DY
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 删除设备保养记录
|
||||||
|
export function deleteEqMaintainLog(id) {
|
||||||
|
return request({
|
||||||
|
url: '/base/equipment-maintain-log/delete?id=' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: Do not edit
|
* @Author: Do not edit
|
||||||
* @Date: 2023-11-10 16:09:33
|
* @Date: 2023-11-10 16:09:33
|
||||||
* @LastEditTime: 2023-11-10 16:50:08
|
* @LastEditTime: 2023-11-16 18:57:08
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
@ -23,3 +23,11 @@ export function updateEqRepair(data) {
|
|||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 删除维修记录
|
||||||
|
export function deleteRepair(id) {
|
||||||
|
return request({
|
||||||
|
url: '/base/equipment-repair-log/delete?id=' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: Do not edit
|
* @Author: Do not edit
|
||||||
* @Date: 2023-11-11 16:18:57
|
* @Date: 2023-11-11 16:18:57
|
||||||
* @LastEditTime: 2023-11-11 17:28:54
|
* @LastEditTime: 2023-11-16 20:52:06
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
@ -49,3 +49,20 @@ export function getSparePartList(query) {
|
|||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 删除设备备品备件配置
|
||||||
|
export function deleteConfig(id) {
|
||||||
|
return request({
|
||||||
|
url: '/base/equipment-spare-part-config/delete?id=' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获得备品备件分页
|
||||||
|
export function getSparePartPage(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/equipment-spare-part/page',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
12
src/assets/icons/svg/home.svg
Normal file
12
src/assets/icons/svg/home.svg
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<title>编组</title>
|
||||||
|
<g id="组件" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||||
|
<g id="icon/banner/home" fill="#000" fill-rule="nonzero">
|
||||||
|
<g id="编组">
|
||||||
|
<rect id="矩形" opacity="0" x="0" y="0" width="24" height="24"></rect>
|
||||||
|
<path d="M11.1710783,2.42919989 C11.7298936,2.09409047 12.4328291,2.12455473 12.9654367,2.52059014 L20.3218013,7.99000647 L20.4665209,8.10559268 C21.0744501,8.62656431 21.4302636,9.40344805 21.4302636,10.227099 L21.4302636,19.0470569 L21.4250327,19.2212289 C21.3382831,20.6611171 20.1833875,21.8011882 18.7715031,21.8011882 L5.2284969,21.8011882 L5.06035624,21.7957697 C3.67032883,21.7059084 2.56973638,20.5095861 2.56973638,19.0470569 L2.56973638,10.2273587 L2.57600507,10.0381789 C2.63012926,9.22282649 3.03207443,8.47038558 3.67819781,7.99000711 L11.034559,2.52059336 Z M12.0713092,3.55793652 C11.9772762,3.53774358 11.8769764,3.55793433 11.7954857,3.6185066 L4.43911542,9.0879271 L4.32641124,9.18150853 C4.04059293,9.44596068 3.87451485,9.82573182 3.87451485,10.2273587 L3.87451485,19.0470569 L3.880713,19.1821318 C3.94632222,19.8933667 4.52470053,20.4496068 5.2284969,20.4496068 L11.2507497,20.4487759 L11.3507364,20.3451977 L11.3512202,14.4627186 L11.3582338,14.3683764 C11.4044406,14.0603828 11.6734228,13.8227675 12,13.8227675 C12.3345637,13.8227675 12.6123182,14.0734451 12.6454705,14.3976012 L12.6489183,14.4681588 L12.6487364,20.3451881 L12.7487231,20.4487759 L18.7714898,20.4496068 L18.9018895,20.4431864 C19.5885066,20.3752237 20.1254851,19.7760987 20.1254851,19.0470569 L20.1254851,10.2273587 L20.1177907,10.0779557 C20.0769951,9.68325297 19.8759128,9.32208831 19.5608746,9.08791971 L12.2045243,3.61851399 L12.1402672,3.58065321 Z" id="形状结合" stroke="#000" stroke-width="0.1"></path>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 2.0 KiB |
@ -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"
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
@ -132,33 +131,33 @@ export default {
|
|||||||
});
|
});
|
||||||
// 如果设置了上传地址则自定义图片上传事件
|
// 如果设置了上传地址则自定义图片上传事件
|
||||||
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>
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="right-msg" :style="blackTitle ? 'color: #000' : 'color: #fff'">
|
<div class="right-msg" :style="blackTitle ? 'color: #000' : 'color: #fff'">
|
||||||
|
<div class="home-icon" v-if='blackTitle'>
|
||||||
|
<svg-icon icon-class="home" style="font-size: 24px; cursor: pointer;" @click="toHome"/>
|
||||||
|
</div>
|
||||||
<div class="time-msg">
|
<div class="time-msg">
|
||||||
<div class="line1">{{timeZone}} {{topTime}}</div>
|
<div class="line1">{{timeZone}} {{topTime}}</div>
|
||||||
<div class="line2">{{topDate}}</div>
|
<div class="line2">{{topDate}}</div>
|
||||||
@ -45,7 +48,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
created() {
|
||||||
this.getUserMsg()
|
this.getUserMsg()
|
||||||
this.getTime()
|
this.getTime()
|
||||||
},
|
},
|
||||||
@ -73,7 +76,10 @@ export default {
|
|||||||
this.$store.dispatch('LogOut').then(() => {
|
this.$store.dispatch('LogOut').then(() => {
|
||||||
location.href = getPath('/');
|
location.href = getPath('/');
|
||||||
})
|
})
|
||||||
}).catch(() => {});
|
}).catch(() => {})
|
||||||
|
},
|
||||||
|
toHome() {
|
||||||
|
this.$router.push({ path: "/" })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -83,13 +89,16 @@ export default {
|
|||||||
float: right;
|
float: right;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
// color: #fff;
|
|
||||||
// padding-top: 15px;
|
|
||||||
// padding-right: 38px;
|
|
||||||
.time-msg {
|
.time-msg {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-right: 30px;
|
margin-right: 30px;
|
||||||
}
|
}
|
||||||
|
.home-icon {
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: 30px;
|
||||||
|
vertical-align: top;
|
||||||
|
padding-top: 7px;
|
||||||
|
}
|
||||||
.base-msg {
|
.base-msg {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
.avatar {
|
.avatar {
|
||||||
|
@ -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' }],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
|
@ -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: '请输入正确的数字值',
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
<!-- 对话框(添加) -->
|
<!-- 对话框(添加) -->
|
||||||
<base-dialog :dialogTitle="title" :dialogVisible="open" @close="cancel" @cancel="cancel" width="60%"
|
<base-dialog :dialogTitle="title" :dialogVisible="open" @close="cancel" @cancel="cancel" width="60%"
|
||||||
@confirm="submitForm">
|
@confirm="submitForm">
|
||||||
<DialogForm v-if="open" key="index-dialog-form" ref="form" label-position="top" size="small" :dataForm="form"
|
<DialogForm v-if="open" key="index-dialog-form" ref="form" label-position="top" size="small" v-model="form"
|
||||||
:rows="computedRows" />
|
:rows="computedRows" />
|
||||||
</base-dialog>
|
</base-dialog>
|
||||||
|
|
||||||
@ -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',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@ -424,6 +414,7 @@ export default {
|
|||||||
// 表单参数
|
// 表单参数
|
||||||
form: {
|
form: {
|
||||||
id: null,
|
id: null,
|
||||||
|
files: []
|
||||||
},
|
},
|
||||||
showUploadComponents: false, // 是否显示上传组件
|
showUploadComponents: false, // 是否显示上传组件
|
||||||
};
|
};
|
||||||
@ -506,6 +497,7 @@ export default {
|
|||||||
spec: undefined,
|
spec: undefined,
|
||||||
description: undefined,
|
description: undefined,
|
||||||
remark: undefined,
|
remark: undefined,
|
||||||
|
files: []
|
||||||
};
|
};
|
||||||
this.resetForm('form');
|
this.resetForm('form');
|
||||||
},
|
},
|
||||||
|
@ -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',
|
||||||
},
|
},
|
||||||
|
@ -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...
|
||||||
// }
|
// }
|
||||||
|
@ -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
|
||||||
|
@ -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,
|
||||||
|
@ -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"
|
||||||
|
@ -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' }],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
@ -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...
|
||||||
// }
|
// }
|
||||||
|
@ -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' }],
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
@ -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...
|
||||||
// }
|
// }
|
||||||
|
@ -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' }],
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<div class="choicepart-container">
|
<div class="choicepart-container">
|
||||||
<navbar />
|
<navbar />
|
||||||
<div class="choicepart-wrapper">
|
<div class="choicepart-wrapper">
|
||||||
<div class="choicepart-box" id="choicepartBox" :style="'transform:scale('+scale+');width:1574px;height:538px;'">
|
<div class="choicepart-box" id="choicepartBox" :style="'transform:scale('+scale+');width:1574px;height:538px;'" v-show="showItem">
|
||||||
<div class="choicepart-line1">
|
<div class="choicepart-line1">
|
||||||
<div
|
<div
|
||||||
v-for="(item, index) in menuArr1"
|
v-for="(item, index) in menuArr1"
|
||||||
@ -37,7 +37,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import Navbar from './components/Navbar.vue'
|
import Navbar from './components/Navbar'
|
||||||
import { debounce } from '@/utils/debounce'
|
import { debounce } from '@/utils/debounce'
|
||||||
export default {
|
export default {
|
||||||
components: { Navbar },
|
components: { Navbar },
|
||||||
@ -154,6 +154,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
showItem: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// computed:{
|
// computed:{
|
||||||
@ -217,6 +218,9 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
resetSize() {
|
resetSize() {
|
||||||
|
let _this = this
|
||||||
|
_this.showItem = false
|
||||||
|
_this.loading = true
|
||||||
let choicepartBox = document.querySelector('#choicepartBox')
|
let choicepartBox = document.querySelector('#choicepartBox')
|
||||||
let rw = parseFloat(window.innerWidth)
|
let rw = parseFloat(window.innerWidth)
|
||||||
let rh = parseFloat(window.innerHeight)
|
let rh = parseFloat(window.innerHeight)
|
||||||
@ -224,8 +228,16 @@ export default {
|
|||||||
let bh = parseFloat(choicepartBox.style.height)
|
let bh = parseFloat(choicepartBox.style.height)
|
||||||
let wx = 0.82/(bw / rw)
|
let wx = 0.82/(bw / rw)
|
||||||
let hx = 0.56/(bh / rh)
|
let hx = 0.56/(bh / rh)
|
||||||
this.scale = wx > hx ? hx : wx
|
_this.scale = wx > hx ? hx : wx
|
||||||
|
setTimeout(_this.showItemFun, 700)
|
||||||
|
},
|
||||||
|
showItemFun() {
|
||||||
|
this.loading = false
|
||||||
|
this.showItem = true
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
this.showItem = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@ -244,7 +256,7 @@ export default {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
.choicepart-box {
|
.choicepart-box {
|
||||||
// border: 1px solid red;
|
// transition: all 0.3s linear;
|
||||||
.choicepart-line1 {
|
.choicepart-line1 {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-bottom: 80px;
|
margin-bottom: 80px;
|
||||||
|
@ -127,8 +127,8 @@ export default {
|
|||||||
lineData[it.recordTime + '_area'] = it.area
|
lineData[it.recordTime + '_area'] = it.area
|
||||||
})
|
})
|
||||||
console.log('你好', this.monitorList)
|
console.log('你好', this.monitorList)
|
||||||
|
if (this.monitorList.length > 0) {
|
||||||
this.monitorList.forEach(m => {
|
this.monitorList.forEach(m => {
|
||||||
console.log('455', m)
|
|
||||||
if (m.lineName === lineData.proLineName) {
|
if (m.lineName === lineData.proLineName) {
|
||||||
m.data.forEach(bad => {
|
m.data.forEach(bad => {
|
||||||
// 转成时间戳
|
// 转成时间戳
|
||||||
@ -139,6 +139,7 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}
|
||||||
lineData['workOrderName'] = works.join(',')
|
lineData['workOrderName'] = works.join(',')
|
||||||
lineData['spec'] = specs.join(',')
|
lineData['spec'] = specs.join(',')
|
||||||
this.tableData.push(lineData)
|
this.tableData.push(lineData)
|
||||||
|
@ -29,27 +29,60 @@
|
|||||||
<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"
|
||||||
v-if="showForm"
|
v-if="showForm"
|
||||||
ref="form"
|
ref="form"
|
||||||
:disabled="mode.includes('detail')"
|
:disabled="mode.includes('detail')"
|
||||||
:dataForm="form"
|
:dataForm="form"
|
||||||
:rows="formRows" />
|
:rows="formRows" /> -->
|
||||||
|
|
||||||
|
<el-row style="margin-bottom: 24px">
|
||||||
|
<el-col :span="8">
|
||||||
|
<div
|
||||||
|
class="title"
|
||||||
|
style="font-weight: 700; font-size: 16px; margin: 8px 0">
|
||||||
|
设备分组名称
|
||||||
|
</div>
|
||||||
|
<div class="value" style="font-size: 14px">{{ form.name }}</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<div
|
||||||
|
class="title"
|
||||||
|
style="font-weight: 700; font-size: 16px; margin: 8px 0">
|
||||||
|
设备分组编码
|
||||||
|
</div>
|
||||||
|
<div class="value" style="font-size: 14px">
|
||||||
|
{{ form.code }}
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="section.key == 'attrs'" style="margin-top: 12px">
|
<div
|
||||||
|
v-if="section.key == 'attrs'"
|
||||||
|
style="position: relative; margin-top: 12px">
|
||||||
|
<!-- v-if="!mode.includes('detail')" -->
|
||||||
|
<div style="position: absolute; top: -40px; right: 0">
|
||||||
|
<el-button @click="handleAddAttr" type="text">
|
||||||
|
<i class="el-icon-plus"></i>
|
||||||
|
添加报警
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
<base-table
|
<base-table
|
||||||
v-loading="attrListLoading"
|
v-loading="attrListLoading"
|
||||||
:table-props="section.props"
|
:table-props="section.props"
|
||||||
:page="attrQuery?.params.pageNo || 1"
|
:page="attrQuery?.params.pageNo || 1"
|
||||||
:limit="attrQuery?.params.pageSize || 10"
|
:limit="attrQuery?.params.pageSize || 10"
|
||||||
:table-data="list"
|
:table-data="list"
|
||||||
:add-button-show="mode.includes('detail') ? null : '添加属性'"
|
|
||||||
@emitButtonClick="handleAddAttr"
|
|
||||||
@emitFun="handleEmitFun">
|
@emitFun="handleEmitFun">
|
||||||
|
<!-- :add-button-show="mode.includes('detail') ? null : '添加属性'"
|
||||||
|
@emitButtonClick="handleAddAttr" -->
|
||||||
<method-btn
|
<method-btn
|
||||||
v-if="section.tableBtn"
|
v-if="section.tableBtn"
|
||||||
slot="handleBtn"
|
slot="handleBtn"
|
||||||
@ -71,17 +104,10 @@
|
|||||||
|
|
||||||
<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 v-else type="primary" @click="handleCancel">确定</el-button>
|
|
||||||
<!-- sections的第二项必须是 属性列表 -->
|
|
||||||
<!-- <el-button
|
|
||||||
v-if="sections[1].allowAdd"
|
|
||||||
type="primary"
|
|
||||||
@click="handleAddAttr">
|
|
||||||
添加属性
|
|
||||||
</el-button> -->
|
</el-button> -->
|
||||||
|
<!-- <el-button v-else type="primary" @click="handleCancel">确定</el-button> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -99,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>
|
||||||
@ -165,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: '报警类型', // 固定选项
|
||||||
@ -175,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,
|
||||||
@ -191,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: {
|
||||||
@ -226,7 +252,7 @@ export default {
|
|||||||
bind: {
|
bind: {
|
||||||
// 详情 模式下,禁用各种输入
|
// 详情 模式下,禁用各种输入
|
||||||
// disabled: this.mode == 'detail',
|
// disabled: this.mode == 'detail',
|
||||||
disabled: true
|
disabled: true,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
@ -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>
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
@close="cancel"
|
@close="cancel"
|
||||||
@cancel="cancel"
|
@cancel="cancel"
|
||||||
@confirm="submitForm">
|
@confirm="submitForm">
|
||||||
<DialogForm v-if="open" ref="form" :dataForm="form" :rows="rows" />
|
<DialogForm v-if="open" ref="form" v-model="form" :rows="rows" />
|
||||||
</base-dialog>
|
</base-dialog>
|
||||||
|
|
||||||
<!-- 抽屉 详情 -->
|
<!-- 抽屉 详情 -->
|
||||||
@ -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: '请输入备注',
|
||||||
},
|
},
|
||||||
|
@ -29,27 +29,60 @@
|
|||||||
<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"
|
||||||
v-if="showForm"
|
v-if="showForm"
|
||||||
ref="form"
|
ref="form"
|
||||||
:disabled="true"
|
:disabled="true"
|
||||||
:dataForm="form"
|
:dataForm="form"
|
||||||
:rows="formRows" />
|
:rows="formRows" /> -->
|
||||||
|
|
||||||
|
<el-row style="margin-bottom: 24px">
|
||||||
|
<el-col :span="8">
|
||||||
|
<div
|
||||||
|
class="title"
|
||||||
|
style="font-weight: 700; font-size: 16px; margin: 8px 0">
|
||||||
|
设备分组名称
|
||||||
|
</div>
|
||||||
|
<div class="value" style="font-size: 14px">{{ form.name }}</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<div
|
||||||
|
class="title"
|
||||||
|
style="font-weight: 700; font-size: 16px; margin: 8px 0">
|
||||||
|
设备分组编码
|
||||||
|
</div>
|
||||||
|
<div class="value" style="font-size: 14px">
|
||||||
|
{{ form.code }}
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="section.key == 'attrs'" style="margin-top: 12px">
|
<div
|
||||||
|
v-if="section.key == 'attrs'"
|
||||||
|
style="position: relative; margin-top: 12px">
|
||||||
|
<!-- v-if="!mode.includes('detail')" -->
|
||||||
|
<div style="position: absolute; top: -40px; right: 0">
|
||||||
|
<el-button @click="handleAddAttr" type="text">
|
||||||
|
<i class="el-icon-plus"></i>
|
||||||
|
添加属性
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
<base-table
|
<base-table
|
||||||
v-loading="attrListLoading"
|
v-loading="attrListLoading"
|
||||||
:table-props="section.props"
|
:table-props="section.props"
|
||||||
:page="attrQuery?.params.pageNo || 1"
|
:page="attrQuery?.params.pageNo || 1"
|
||||||
:limit="attrQuery?.params.pageSize || 10"
|
:limit="attrQuery?.params.pageSize || 10"
|
||||||
:table-data="list"
|
:table-data="list"
|
||||||
:add-button-show="mode.includes('detail') ? null : '添加属性'"
|
|
||||||
@emitButtonClick="handleAddAttr"
|
|
||||||
@emitFun="handleEmitFun">
|
@emitFun="handleEmitFun">
|
||||||
|
<!-- :add-button-show="mode.includes('detail') ? null : '添加属性'"
|
||||||
|
@emitButtonClick="handleAddAttr" -->
|
||||||
<method-btn
|
<method-btn
|
||||||
v-if="section.tableBtn"
|
v-if="section.tableBtn"
|
||||||
slot="handleBtn"
|
slot="handleBtn"
|
||||||
@ -71,17 +104,10 @@
|
|||||||
|
|
||||||
<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 v-else type="primary" @click="handleCancel">确定</el-button>
|
|
||||||
<!-- sections的第二项必须是 属性列表 -->
|
|
||||||
<!-- <el-button
|
|
||||||
v-if="sections[1].allowAdd"
|
|
||||||
type="primary"
|
|
||||||
@click="handleAddAttr">
|
|
||||||
添加属性
|
|
||||||
</el-button> -->
|
</el-button> -->
|
||||||
|
<!-- <el-button v-else type="primary" @click="handleCancel">确定</el-button> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -96,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>
|
||||||
@ -165,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,
|
||||||
@ -175,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' }],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
@ -196,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' }],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
@ -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>
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
@close="cancel"
|
@close="cancel"
|
||||||
@cancel="cancel"
|
@cancel="cancel"
|
||||||
@confirm="submitForm">
|
@confirm="submitForm">
|
||||||
<DialogForm v-if="open" ref="form" :dataForm="form" :rows="rows" />
|
<DialogForm v-if="open" ref="form" v-model="form" :rows="rows" />
|
||||||
</base-dialog>
|
</base-dialog>
|
||||||
|
|
||||||
<!-- 抽屉 详情 -->
|
<!-- 抽屉 详情 -->
|
||||||
@ -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...
|
||||||
// }
|
// }
|
||||||
|
@ -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...
|
||||||
// }
|
// }
|
||||||
|
@ -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...
|
||||||
// }
|
// }
|
||||||
|
@ -29,27 +29,62 @@
|
|||||||
<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"
|
||||||
v-if="showForm"
|
v-if="showForm"
|
||||||
ref="form"
|
ref="form"
|
||||||
:disabled="mode.includes('detail')"
|
:disabled="mode.includes('detail')"
|
||||||
v-model="form"
|
v-model="form"
|
||||||
:rows="formRows" />
|
:rows="formRows" /> -->
|
||||||
|
|
||||||
|
<el-row style="margin-bottom: 24px">
|
||||||
|
<el-col :span="8">
|
||||||
|
<div
|
||||||
|
class="title"
|
||||||
|
style="font-weight: 700; font-size: 16px; margin: 8px 0">
|
||||||
|
设备名
|
||||||
|
</div>
|
||||||
|
<div class="value" style="font-size: 14px">
|
||||||
|
{{ form.equipmentName }}
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<div
|
||||||
|
class="title"
|
||||||
|
style="font-weight: 700; font-size: 16px; margin: 8px 0">
|
||||||
|
关联表名
|
||||||
|
</div>
|
||||||
|
<div class="value" style="font-size: 14px">
|
||||||
|
{{ form.plcTableName }}
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="section.key == 'attrs'" style="margin-top: 12px">
|
<div
|
||||||
|
v-if="section.key == 'attrs'"
|
||||||
|
style="position: relative; margin-top: 12px">
|
||||||
|
<!-- v-if="!mode.includes('detail')" -->
|
||||||
|
<div style="position: absolute; top: -40px; right: 0">
|
||||||
|
<el-button @click="handleAddAttr" type="text">
|
||||||
|
<i class="el-icon-plus"></i>
|
||||||
|
添加属性
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
<base-table
|
<base-table
|
||||||
v-loading="attrListLoading"
|
v-loading="attrListLoading"
|
||||||
:table-props="section.props"
|
:table-props="section.props"
|
||||||
:page="attrQuery?.params.pageNo || 1"
|
:page="attrQuery?.params.pageNo || 1"
|
||||||
:limit="attrQuery?.params.pageSize || 10"
|
:limit="attrQuery?.params.pageSize || 10"
|
||||||
:table-data="list"
|
:table-data="list"
|
||||||
:add-button-show="mode.includes('detail') ? null : '添加属性'"
|
|
||||||
@emitButtonClick="handleAddAttr"
|
|
||||||
@emitFun="handleEmitFun">
|
@emitFun="handleEmitFun">
|
||||||
|
<!-- :add-button-show="mode.includes('detail') ? null : '添加属性'"
|
||||||
|
@emitButtonClick="handleAddAttr" -->
|
||||||
<method-btn
|
<method-btn
|
||||||
v-if="section.tableBtn"
|
v-if="section.tableBtn"
|
||||||
slot="handleBtn"
|
slot="handleBtn"
|
||||||
@ -71,17 +106,10 @@
|
|||||||
|
|
||||||
<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 v-else type="primary" @click="handleCancel">确定</el-button>
|
|
||||||
<!-- sections的第二项必须是 属性列表 -->
|
|
||||||
<!-- <el-button
|
|
||||||
v-if="sections[1].allowAdd"
|
|
||||||
type="primary"
|
|
||||||
@click="handleAddAttr">
|
|
||||||
添加属性
|
|
||||||
</el-button> -->
|
</el-button> -->
|
||||||
|
<!-- <el-button v-else type="primary" @click="handleCancel">确定</el-button> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -96,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>
|
||||||
@ -166,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' }],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
@ -181,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,
|
||||||
@ -203,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,
|
||||||
@ -214,9 +241,8 @@ export default {
|
|||||||
{ label: '出片数量', value: 2 },
|
{ label: '出片数量', value: 2 },
|
||||||
{ label: '破损数量', value: 3 },
|
{ label: '破损数量', value: 3 },
|
||||||
{ label: '无类型', value: 4 },
|
{ label: '无类型', value: 4 },
|
||||||
|
|
||||||
],
|
],
|
||||||
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
|
rules: [{ required: true, message: '生产参数类型不能为空', trigger: 'blur' }],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
@ -248,7 +274,6 @@ export default {
|
|||||||
transform: (val) => Number(val),
|
transform: (val) => Number(val),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
// rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
@ -256,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' }],
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
@ -270,7 +293,6 @@ export default {
|
|||||||
input: true,
|
input: true,
|
||||||
label: '备注',
|
label: '备注',
|
||||||
prop: 'remark',
|
prop: 'remark',
|
||||||
// rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
@ -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>
|
|
@ -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: "设备分组ID,关联base_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>
|
|
@ -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' }],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
|
@ -49,7 +49,8 @@
|
|||||||
filterable
|
filterable
|
||||||
:disabled="isdetail"
|
:disabled="isdetail"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
placeholder="请选择巡检配置">
|
placeholder="请选择巡检配置"
|
||||||
|
@change="setInspectionContet">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in configList"
|
v-for="dict in configList"
|
||||||
:key="dict.id"
|
:key="dict.id"
|
||||||
@ -107,20 +108,15 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-else type="primary" @click="dataFormSubmit()">确定</el-button>
|
<el-button v-else type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <attr-add
|
|
||||||
v-if="addOrUpdateVisible"
|
|
||||||
ref="addOrUpdate"
|
|
||||||
:config-id="dataForm.id"
|
|
||||||
@refreshDataList="getList" /> -->
|
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import SmallTitle from '../../../base/alarm/Record/SmallTitle.vue';
|
import SmallTitle from '../../../base/alarm/Record/SmallTitle.vue';
|
||||||
import { createCheckLog, updateCheckLog, getcheckAllList, getcheckConfigByEqList, getEqCheckLog } from '@/api/equipment/base/inspection/record'
|
import { createCheckLog, updateCheckLog, getcheckConfigByEqList, getEqCheckLog } from '@/api/equipment/base/inspection/record'
|
||||||
import { getEquipmentAll } from '@/api/base/equipment'
|
import { getEquipmentAll } from '@/api/base/equipment'
|
||||||
import Editor from "@/components/Editor";
|
import Editor from "@/components/Editor";
|
||||||
|
import { getCheckDetPage } from "@/api/equipment/base/inspection/settings";
|
||||||
// import FileUpload from "@/components/FileUpload";
|
// import FileUpload from "@/components/FileUpload";
|
||||||
// import { parseTime } from '../../../../core/mixins/code-filter';
|
// import { parseTime } from '../../../../core/mixins/code-filter';
|
||||||
// import attrAdd from './attr-add';
|
// import attrAdd from './attr-add';
|
||||||
@ -176,7 +172,8 @@ export default {
|
|||||||
equipmentId: undefined,
|
equipmentId: undefined,
|
||||||
actualTime: undefined,
|
actualTime: undefined,
|
||||||
responsible: undefined,
|
responsible: undefined,
|
||||||
description: undefined
|
description: undefined,
|
||||||
|
files: []
|
||||||
},
|
},
|
||||||
list: [],
|
list: [],
|
||||||
eqList: [],
|
eqList: [],
|
||||||
@ -224,8 +221,20 @@ export default {
|
|||||||
resetFields(args) {
|
resetFields(args) {
|
||||||
return this.$refs.dataForm.resetFields(args);
|
return this.$refs.dataForm.resetFields(args);
|
||||||
},
|
},
|
||||||
|
initData() {
|
||||||
|
this.dataForm = {
|
||||||
|
id: undefined,
|
||||||
|
configId: undefined,
|
||||||
|
equipmentId: undefined,
|
||||||
|
actualTime: undefined,
|
||||||
|
responsible: undefined,
|
||||||
|
description: undefined,
|
||||||
|
files: []
|
||||||
|
}
|
||||||
|
this.list = []
|
||||||
|
},
|
||||||
init(id, isdetail) {
|
init(id, isdetail) {
|
||||||
// this.initData();
|
this.initData();
|
||||||
this.isdetail = isdetail || false;
|
this.isdetail = isdetail || false;
|
||||||
this.dataForm.id = id || undefined;
|
this.dataForm.id = id || undefined;
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
@ -247,39 +256,12 @@ export default {
|
|||||||
});
|
});
|
||||||
this.formLoading = false
|
this.formLoading = false
|
||||||
},
|
},
|
||||||
handleClick(raw) {
|
setInspectionContet() {
|
||||||
if (raw.type === 'delete') {
|
// 根据巡检配置名称获得巡检配置详细对应巡检内容
|
||||||
this.$confirm(
|
getCheckDetPage({
|
||||||
`确定要删除名称为${raw.data.sparePartName}的数据?`,
|
pageNo: 1,
|
||||||
'提示',
|
pageSize: 99,
|
||||||
{
|
configId: this.dataForm.configId,
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
type: 'warning',
|
|
||||||
}
|
|
||||||
)
|
|
||||||
.then(() => {
|
|
||||||
deleteConfigDet(raw.data.id).then(({ data }) => {
|
|
||||||
this.$message({
|
|
||||||
message: '操作成功',
|
|
||||||
type: 'success',
|
|
||||||
duration: 1500,
|
|
||||||
onClose: () => {
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
});
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.catch(() => {});
|
|
||||||
} else {
|
|
||||||
this.addNew(raw.data.id);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
getList() {
|
|
||||||
// 获取巡检内容分页
|
|
||||||
getcheckAllList({
|
|
||||||
...this.listQuery,
|
|
||||||
configId: this.dataForm.id,
|
|
||||||
}).then((response) => {
|
}).then((response) => {
|
||||||
this.list = response.data.list;
|
this.list = response.data.list;
|
||||||
this.listQuery.total = response.data.total;
|
this.listQuery.total = response.data.total;
|
||||||
@ -308,6 +290,8 @@ export default {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
this.dataForm.files = arry
|
this.dataForm.files = arry
|
||||||
|
} else {
|
||||||
|
this.dataForm.files = []
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改的提交
|
// 修改的提交
|
||||||
|
@ -57,7 +57,7 @@
|
|||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||||
import addRecord from './addRecord.vue';
|
import addRecord from './addRecord.vue';
|
||||||
import { exportCheckLogExcel } from '@/api/equipment/base/inspection/record'
|
import { exportCheckLogExcel, deleteEqCheckLog } from '@/api/equipment/base/inspection/record'
|
||||||
import { parseTime } from '../../../../core/mixins/code-filter';
|
import { parseTime } from '../../../../core/mixins/code-filter';
|
||||||
|
|
||||||
const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
|
const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
|
||||||
@ -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',
|
||||||
@ -349,9 +348,9 @@ export default {
|
|||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const id = row.id;
|
const id = row.id;
|
||||||
this.$modal
|
this.$modal
|
||||||
.confirm('是否确认删除记录"' + row.name + '"?')
|
.confirm('是否删除设备巡检记录配置名称为"' + row.configName + '"的数据项?')
|
||||||
.then(function () {
|
.then(function () {
|
||||||
return this.delete({ id });
|
return deleteEqCheckLog(id);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
@ -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,
|
||||||
|
@ -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,
|
||||||
|
@ -53,6 +53,7 @@
|
|||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||||
import Editor from '@/components/Editor';
|
import Editor from '@/components/Editor';
|
||||||
|
import { deleteEqMaintainLog } from '@/api/equipment/base/maintain/record';
|
||||||
|
|
||||||
const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
|
const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
|
||||||
|
|
||||||
@ -63,7 +64,6 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
searchBarKeys: [
|
searchBarKeys: [
|
||||||
'maintainPlanId',
|
|
||||||
'maintainPlanId',
|
'maintainPlanId',
|
||||||
'startTime',
|
'startTime',
|
||||||
'relatePlan',
|
'relatePlan',
|
||||||
@ -131,7 +131,7 @@ export default {
|
|||||||
label: '时间段',
|
label: '时间段',
|
||||||
dateType: 'daterange', // datetimerange
|
dateType: 'daterange', // datetimerange
|
||||||
format: 'yyyy-MM-dd',
|
format: 'yyyy-MM-dd',
|
||||||
valueFormat: 'timestamp',
|
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||||
rangeSeparator: '-',
|
rangeSeparator: '-',
|
||||||
startPlaceholder: '开始日期',
|
startPlaceholder: '开始日期',
|
||||||
endPlaceholder: '结束日期',
|
endPlaceholder: '结束日期',
|
||||||
@ -186,10 +186,9 @@ export default {
|
|||||||
filterable: true,
|
filterable: true,
|
||||||
clearable: true,
|
clearable: true,
|
||||||
},
|
},
|
||||||
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
|
rules: [{ required: true, message: '保养设备不能为空', trigger: 'blur' }],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// TODO: 和班组联动
|
|
||||||
select: true,
|
select: true,
|
||||||
label: '保养人员',
|
label: '保养人员',
|
||||||
prop: 'maintainWorker',
|
prop: 'maintainWorker',
|
||||||
@ -200,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,
|
||||||
@ -217,15 +216,14 @@ 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' }],
|
||||||
},
|
},
|
||||||
{},
|
{},
|
||||||
{
|
{
|
||||||
// TODO: 和计划联动
|
|
||||||
select: true,
|
select: true,
|
||||||
label: '所属计划',
|
label: '所属计划',
|
||||||
prop: 'maintainPlanId',
|
prop: 'maintainPlanId',
|
||||||
url: '',
|
url: '/base/equipment-maintain-plan/page',
|
||||||
bind: {
|
bind: {
|
||||||
filterable: true,
|
filterable: true,
|
||||||
clearable: true,
|
clearable: true,
|
||||||
@ -237,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',
|
||||||
@ -249,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',
|
||||||
@ -271,10 +269,16 @@ export default {
|
|||||||
prop: 'files',
|
prop: 'files',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
// TODO: 富文本
|
[
|
||||||
[{ label: '保养描述', prop: 'maintenanceDes', subcomponent: Editor, bind: {
|
{
|
||||||
'min-height': 192
|
label: '保养描述',
|
||||||
} }],
|
prop: 'maintenanceDes',
|
||||||
|
subcomponent: Editor,
|
||||||
|
bind: {
|
||||||
|
'min-height': 192,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
[{ input: true, label: '备注', prop: 'remark' }],
|
[{ input: true, label: '备注', prop: 'remark' }],
|
||||||
],
|
],
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
@ -292,20 +296,26 @@ export default {
|
|||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
basePath: '/base/equipment-maintain-log',
|
basePath: '/base/equipment-maintain-log',
|
||||||
mode: null
|
mode: null,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.initSearchBar();
|
this.initSearchBar();
|
||||||
if (this.$route.query) {
|
if (this.$route.query) {
|
||||||
this.queryParams.equipmentId = this.$route.query?.equipmentId ?? undefined
|
this.queryParams.equipmentId =
|
||||||
this.queryParams.maintainPlanId = this.$route.query?.maintainPlanId ?? undefined
|
this.$route.query?.equipmentId ?? undefined;
|
||||||
this.queryParams.relatePlan = this.$route.query?.relatePlan ?? undefined
|
this.queryParams.maintainPlanId =
|
||||||
this.queryParams.startTime = this.$route.query?.createTime ?? undefined
|
this.$route.query?.maintainPlanId ?? undefined;
|
||||||
this.searchBarFormConfig[0].defaultSelect = this.$route.query.equipmentId ?? undefined
|
this.queryParams.relatePlan = this.$route.query?.relatePlan ?? undefined;
|
||||||
this.searchBarFormConfig[1].defaultSelect = Number(this.$route.query.maintainPlanId) ?? undefined
|
this.queryParams.startTime = this.$route.query?.createTime ?? undefined;
|
||||||
this.searchBarFormConfig[2].defaultSelect = this.$route.query?.createTime ?? undefined
|
this.searchBarFormConfig[0].defaultSelect =
|
||||||
this.searchBarFormConfig[3].defaultSelect = Number(this.$route.query.relatePlan) ?? undefined
|
this.$route.query.equipmentId ?? undefined;
|
||||||
|
this.searchBarFormConfig[1].defaultSelect =
|
||||||
|
Number(this.$route.query.maintainPlanId) ?? undefined;
|
||||||
|
this.searchBarFormConfig[2].defaultSelect =
|
||||||
|
this.$route.query?.createTime ?? undefined;
|
||||||
|
this.searchBarFormConfig[3].defaultSelect =
|
||||||
|
Number(this.$route.query.relatePlan) ?? undefined;
|
||||||
}
|
}
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
@ -398,7 +408,7 @@ export default {
|
|||||||
this.info({ id }).then((response) => {
|
this.info({ id }).then((response) => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.form.maintainWorker = this.form.maintainWorker.split(',')
|
this.form.maintainWorker = this.form.maintainWorker.split(',');
|
||||||
this.title = '修改保养记录';
|
this.title = '修改保养记录';
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -408,7 +418,7 @@ export default {
|
|||||||
if (!valid) {
|
if (!valid) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.form.maintainWorker = this.form.maintainWorker.join(',')
|
this.form.maintainWorker = this.form.maintainWorker.join(',');
|
||||||
// 修改的提交
|
// 修改的提交
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
this.put(this.form).then((response) => {
|
this.put(this.form).then((response) => {
|
||||||
@ -430,9 +440,11 @@ export default {
|
|||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const id = row.id;
|
const id = row.id;
|
||||||
this.$modal
|
this.$modal
|
||||||
.confirm('是否确认删除记录"' + row.name + '"?')
|
.confirm(
|
||||||
|
'是否删除设备保养单号为"' + row.maintainOrderNumber + '"的数据项?'
|
||||||
|
)
|
||||||
.then(function () {
|
.then(function () {
|
||||||
return this.delete({ id });
|
return deleteEqMaintainLog(id);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
@ -442,7 +454,7 @@ export default {
|
|||||||
},
|
},
|
||||||
handleDetail({ id }) {
|
handleDetail({ id }) {
|
||||||
this.reset();
|
this.reset();
|
||||||
this.mode = 'detail'
|
this.mode = 'detail';
|
||||||
this.info({ id }).then((response) => {
|
this.info({ id }).then((response) => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
ref="form"
|
ref="form"
|
||||||
:model="dataForm"
|
:model="dataForm"
|
||||||
label-width="100px"
|
label-width="100px"
|
||||||
|
label-position="top"
|
||||||
v-loading="formLoading">
|
v-loading="formLoading">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
@ -62,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"
|
||||||
@ -76,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"
|
||||||
@ -90,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"
|
||||||
@ -126,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>
|
||||||
@ -213,7 +214,7 @@ export default {
|
|||||||
this.visible = false;
|
this.visible = false;
|
||||||
},
|
},
|
||||||
goEdit() {
|
goEdit() {
|
||||||
this.isdetail = false;
|
this.disabled = false;
|
||||||
},
|
},
|
||||||
/** 模拟透传 ref */
|
/** 模拟透传 ref */
|
||||||
validate(cb) {
|
validate(cb) {
|
||||||
|
@ -56,6 +56,7 @@
|
|||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||||
import CustomDialogForm from './CustomDialogForm.vue';
|
import CustomDialogForm from './CustomDialogForm.vue';
|
||||||
|
import { deleteRepair } from '@/api/equipment/base/repair'
|
||||||
|
|
||||||
const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
|
const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
|
||||||
|
|
||||||
@ -168,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,
|
||||||
@ -179,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' }],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
@ -197,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,
|
||||||
@ -210,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',
|
||||||
@ -239,7 +240,7 @@ export default {
|
|||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
basePath: '/base/equipment-repair-log',
|
basePath: '/base/equipment-repair-log',
|
||||||
mode: null,
|
mode: null
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@ -375,9 +376,9 @@ export default {
|
|||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const id = row.id;
|
const id = row.id;
|
||||||
this.$modal
|
this.$modal
|
||||||
.confirm('是否确认删除记录"' + row.name + '"?')
|
.confirm('是否确认删除维修单号为"' + row.repairOrderNumber + '"的数据?')
|
||||||
.then(function () {
|
.then(() => {
|
||||||
return this.delete({ id });
|
return deleteRepair(id);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
@ -411,6 +412,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 处理表格按钮
|
// 处理表格按钮
|
||||||
handleTableBtnClick({ data, type }) {
|
handleTableBtnClick({ data, type }) {
|
||||||
|
console.log('nihc', data, type)
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'edit':
|
case 'edit':
|
||||||
this.handleUpdate(data);
|
this.handleUpdate(data);
|
||||||
|
@ -188,6 +188,7 @@ export default {
|
|||||||
getSparePartConfig(this.dataForm.id).then(response => {
|
getSparePartConfig(this.dataForm.id).then(response => {
|
||||||
this.formLoading = false
|
this.formLoading = false
|
||||||
this.dataForm = response.data;
|
this.dataForm = response.data;
|
||||||
|
this.getList()
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// if (this.urlOptions.isGetCode) {
|
// if (this.urlOptions.isGetCode) {
|
||||||
@ -257,7 +258,9 @@ export default {
|
|||||||
padding: 18px;
|
padding: 18px;
|
||||||
}
|
}
|
||||||
.action_btn {
|
.action_btn {
|
||||||
float: right;
|
/* float: right; */
|
||||||
|
display: flex;
|
||||||
|
justify-content: right;
|
||||||
margin: 5px 15px;
|
margin: 5px 15px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
createConfigDet,
|
createConfigDet,
|
||||||
getSparePartList
|
getSparePartPage
|
||||||
} from '@/api/equipment/base/spare-parts/config';
|
} from '@/api/equipment/base/spare-parts/config';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -72,8 +72,12 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async getDict() {
|
async getDict() {
|
||||||
const res = await getSparePartList()
|
await getSparePartPage({
|
||||||
this.partList = res.data
|
pageNo: 1,
|
||||||
|
pageSize: 99
|
||||||
|
}).then(res => {
|
||||||
|
this.partList = res.data.list;
|
||||||
|
})
|
||||||
},
|
},
|
||||||
init(id) {
|
init(id) {
|
||||||
this.dataForm.id = id || '';
|
this.dataForm.id = id || '';
|
||||||
|
@ -59,6 +59,7 @@ import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
|||||||
import { publicFormatter } from '@/utils/dict';
|
import { publicFormatter } from '@/utils/dict';
|
||||||
import Editor from '@/components/Editor';
|
import Editor from '@/components/Editor';
|
||||||
import addSparts from './addSparts.vue';
|
import addSparts from './addSparts.vue';
|
||||||
|
import { deleteConfig } from '@/api/equipment/base/spare-parts/config'
|
||||||
|
|
||||||
const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
|
const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
|
||||||
|
|
||||||
@ -160,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' }],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
@ -173,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' }],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
@ -282,7 +283,7 @@ export default {
|
|||||||
const id = row.id;
|
const id = row.id;
|
||||||
this.info({ id }).then((response) => {
|
this.info({ id }).then((response) => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
this.form.responsible = this.form.responsible.split(',')
|
this.form.responsible = this.form.responsible ? this.form.responsible.split(',') : undefined
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = '修改备品备件配置';
|
this.title = '修改备品备件配置';
|
||||||
});
|
});
|
||||||
@ -315,9 +316,9 @@ export default {
|
|||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const id = row.id;
|
const id = row.id;
|
||||||
this.$modal
|
this.$modal
|
||||||
.confirm('是否确认删除记录"' + row.name + '"?')
|
.confirm('是否确认删除配置名为"' + row.name + '"的数据?')
|
||||||
.then(function () {
|
.then(function () {
|
||||||
return this.delete({ id });
|
return deleteConfig(id);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
@ -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,
|
||||||
|
@ -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' }],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
|
@ -328,7 +328,7 @@ export default {
|
|||||||
this.initState();
|
this.initState();
|
||||||
|
|
||||||
const { code, data } = await this.$axios({
|
const { code, data } = await this.$axios({
|
||||||
url: '/analysis/equipment-analysis/quantity',
|
url: '/monitoring/equipment-monitor/quantity-series',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: this.queryParams,
|
params: this.queryParams,
|
||||||
});
|
});
|
||||||
|
@ -210,7 +210,7 @@ export default {
|
|||||||
|
|
||||||
async getList() {
|
async getList() {
|
||||||
const { code, data } = await this.$axios({
|
const { code, data } = await this.$axios({
|
||||||
url: '/analysis/equipment-analysis/status',
|
url: '/monitoring/equipment-monitor/status-series',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: this.queryParams,
|
params: this.queryParams,
|
||||||
});
|
});
|
||||||
|
@ -22,7 +22,9 @@
|
|||||||
:line="item.lineName"
|
:line="item.lineName"
|
||||||
:desc="item.remark"
|
:desc="item.remark"
|
||||||
:isActive="item.enabled"
|
:isActive="item.enabled"
|
||||||
@edit="handleUpdate" />
|
@edit="handleUpdate"
|
||||||
|
@copy="handleCopy"
|
||||||
|
@delete="handleDelete" />
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<base-dialog
|
<base-dialog
|
||||||
@ -58,6 +60,12 @@ const ProcessItem = {
|
|||||||
handleEdit() {
|
handleEdit() {
|
||||||
this.$emit('edit', this.id);
|
this.$emit('edit', this.id);
|
||||||
},
|
},
|
||||||
|
handleCopy() {
|
||||||
|
this.$emit('copy', this.id);
|
||||||
|
},
|
||||||
|
handleDelete() {
|
||||||
|
this.$emit('delete', this.id);
|
||||||
|
},
|
||||||
handleViewDetail(e) {
|
handleViewDetail(e) {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: 'ProcessFlowView',
|
name: 'ProcessFlowView',
|
||||||
@ -117,12 +125,18 @@ const ProcessItem = {
|
|||||||
<el-col
|
<el-col
|
||||||
span={8}
|
span={8}
|
||||||
style="text-align: center; border-right: 1px solid #0001">
|
style="text-align: center; border-right: 1px solid #0001">
|
||||||
<el-button type="text" style="color: #0007; line-height: 1.75">
|
<el-button
|
||||||
|
type="text"
|
||||||
|
style="color: #0007; line-height: 1.75"
|
||||||
|
onClick={this.handleCopy}>
|
||||||
复制
|
复制
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col span={8} style="text-align: center;">
|
<el-col span={8} style="text-align: center;">
|
||||||
<el-button type="text" style="color: #0007; line-height: 1.75">
|
<el-button
|
||||||
|
type="text"
|
||||||
|
style="color: #0007; line-height: 1.75"
|
||||||
|
onClick={this.handleDelete}>
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -166,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...
|
||||||
// }
|
// }
|
||||||
@ -183,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: {
|
||||||
@ -203,8 +218,9 @@ export default {
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
textarea: true,
|
textarea: true,
|
||||||
label: '功能描述',
|
label: '工艺描述',
|
||||||
prop: 'remark',
|
prop: 'remark',
|
||||||
|
rules: [{ required: true, message: '工艺描述不能为空', trigger: 'blur' }],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
@ -255,6 +271,43 @@ export default {
|
|||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = '修改工艺';
|
this.title = '修改工艺';
|
||||||
},
|
},
|
||||||
|
async handleCopy(id) {
|
||||||
|
this.$confirm('确认拷贝操作?', '提示', {
|
||||||
|
confirmButtonText: '确 认',
|
||||||
|
cancelButtonText: '取 消',
|
||||||
|
})
|
||||||
|
.then(async () => {
|
||||||
|
const { code } = await this.http(
|
||||||
|
'/extend/process-flow/copy',
|
||||||
|
'post',
|
||||||
|
{
|
||||||
|
id,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (code == 0) {
|
||||||
|
this.$modal.msgSuccess('复制成功');
|
||||||
|
this.getList();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => console.info('操作取消'));
|
||||||
|
},
|
||||||
|
async handleDelete(id) {
|
||||||
|
this.$confirm('确认删除这个工艺吗?', '提示', {
|
||||||
|
confirmButtonText: '确 认',
|
||||||
|
cancelButtonText: '取 消',
|
||||||
|
})
|
||||||
|
.then(async () => {
|
||||||
|
const { code } = await this.http(
|
||||||
|
'/extend/process-flow/delete?id=' + id,
|
||||||
|
'delete'
|
||||||
|
);
|
||||||
|
if (code == 0) {
|
||||||
|
this.$modal.msgSuccess('删除成功');
|
||||||
|
this.getList();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => console.info('操作取消'));
|
||||||
|
},
|
||||||
submitForm() {
|
submitForm() {
|
||||||
this.$refs['form'].validate((valid) => {
|
this.$refs['form'].validate((valid) => {
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
|
114
src/views/extend/processFlowView/components/BomSelection.vue
Normal file
114
src/views/extend/processFlowView/components/BomSelection.vue
Normal file
@ -0,0 +1,114 @@
|
|||||||
|
<!--
|
||||||
|
filename: BomSelection.vue
|
||||||
|
author: liubin
|
||||||
|
date: 2023-11-20 13:23:36
|
||||||
|
description:
|
||||||
|
-->
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="bom-selection">
|
||||||
|
<el-checkbox
|
||||||
|
v-for="item in list__inner"
|
||||||
|
:key="item.id + randomKey"
|
||||||
|
:label="item.name"
|
||||||
|
:disabled="item.disabled"
|
||||||
|
:checked="item.id === selected"
|
||||||
|
@change="(e) => handleChange(item, e)"
|
||||||
|
class="sl__body-item"></el-checkbox>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'BomSelection',
|
||||||
|
components: {},
|
||||||
|
// model: {
|
||||||
|
// prop: 'selected',
|
||||||
|
// event: 'update',
|
||||||
|
// },
|
||||||
|
props: {
|
||||||
|
currentSelect: {
|
||||||
|
type: String,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
|
list: {
|
||||||
|
type: Array,
|
||||||
|
default: () => [],
|
||||||
|
},
|
||||||
|
equipmentId: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
list__inner: [],
|
||||||
|
selected: null,
|
||||||
|
randomKey: Math.random(),
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
list: {
|
||||||
|
handler(val) {
|
||||||
|
if (val) {
|
||||||
|
this.list__inner = val.map((item) => ({ ...item, disabled: false }));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
deep: true,
|
||||||
|
immediate: true,
|
||||||
|
},
|
||||||
|
currentSelect: {
|
||||||
|
handler(val) {
|
||||||
|
this.selected = val;
|
||||||
|
this.randomKey = Math.random();
|
||||||
|
},
|
||||||
|
immediate: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleChange(bomItem, selected) {
|
||||||
|
this.list__inner = this.list__inner.map((item) => ({
|
||||||
|
...item,
|
||||||
|
disabled: selected ? item.id !== bomItem.id : false,
|
||||||
|
}));
|
||||||
|
|
||||||
|
if (selected) this.selected = null;
|
||||||
|
else this.clearSelected();
|
||||||
|
|
||||||
|
this.$emit('change', this.equipmentId, bomItem.id, selected);
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$forceUpdate();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
clearSelected() {
|
||||||
|
console.log('clearSelected');
|
||||||
|
this.selected = null;
|
||||||
|
this.randomKey = Math.random();
|
||||||
|
// this.$emit('update', null);
|
||||||
|
// this.$nextTick(() => {
|
||||||
|
// this.$forceUpdate();
|
||||||
|
// });
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.bom-selection {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 6px;
|
||||||
|
padding: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sl__body-item {
|
||||||
|
margin: 0;
|
||||||
|
padding: 3px 6px;
|
||||||
|
border-radius: 4px;
|
||||||
|
transition: background 0.3s ease-in-out;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background: #0001;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
264
src/views/extend/processFlowView/components/BomSelector.vue
Normal file
264
src/views/extend/processFlowView/components/BomSelector.vue
Normal file
@ -0,0 +1,264 @@
|
|||||||
|
<!--
|
||||||
|
filename: BomSelector.vue
|
||||||
|
author: liubin
|
||||||
|
date: 2023-11-17 16:23:28
|
||||||
|
description:
|
||||||
|
-->
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="bom-selector">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-input
|
||||||
|
v-model="searchText"
|
||||||
|
placeholder="搜索"
|
||||||
|
clearable
|
||||||
|
style="margin-bottom: 12px; user-select: none">
|
||||||
|
<i slot="prefix" class="el-input__icon el-icon-search"></i>
|
||||||
|
</el-input>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row style="border: 1px solid #ccc; display: flex">
|
||||||
|
<el-col :span="8">
|
||||||
|
<div class="select-list">
|
||||||
|
<div class="sl__header" style="background: #f3f4fb; padding: 12px">
|
||||||
|
<span style="">可分配设备</span>
|
||||||
|
<span>
|
||||||
|
{{ selectedEquipments.length }}/{{ filteredBomList.length }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="sl__body">
|
||||||
|
<div
|
||||||
|
class="sl__body-item"
|
||||||
|
v-for="eq in filteredBomList"
|
||||||
|
:key="eq.id + refreshKey">
|
||||||
|
<el-checkbox
|
||||||
|
:key="refreshKey"
|
||||||
|
:checked="selectedEquipments.includes(eq.id)"
|
||||||
|
@change="(e) => handleEquipmentChange(eq, e)"
|
||||||
|
class=""></el-checkbox>
|
||||||
|
<span
|
||||||
|
:key="'label' + refreshKey"
|
||||||
|
@click.stop="() => handleLoadDom(eq)">
|
||||||
|
{{ eq.name }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" style="border-left: 1px solid #ccc">
|
||||||
|
<div class="select-list">
|
||||||
|
<div class="sl__header" style="background: #f3f4fb; padding: 12px">
|
||||||
|
<span style="">物料BOM</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<BomSelection
|
||||||
|
ref="materialsBomList"
|
||||||
|
:key="materialsBomList.equipmentId + 'materialsBomList'"
|
||||||
|
:list="materialsBomList"
|
||||||
|
:equipment-id="materialsBomList.equipmentId"
|
||||||
|
:current-select="currentSelectedMaterialBomId"
|
||||||
|
@change="handleMaterialBomChange" />
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" style="border-left: 1px solid #ccc">
|
||||||
|
<div class="select-list">
|
||||||
|
<div class="sl__header" style="background: #f3f4fb; padding: 12px">
|
||||||
|
<span style="">参数BOM</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<BomSelection
|
||||||
|
ref="valuesBomList"
|
||||||
|
:key="valuesBomList.equipmentId + 'valuesBomList'"
|
||||||
|
:list="valuesBomList"
|
||||||
|
:equipment-id="valuesBomList.equipmentId"
|
||||||
|
:current-select="currentSelectedValueBomId"
|
||||||
|
@change="handleValueBomChange" />
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
;
|
||||||
|
<script>
|
||||||
|
import BomSelection from './BomSelection.vue';
|
||||||
|
export default {
|
||||||
|
name: 'BomSelector',
|
||||||
|
components: { BomSelection },
|
||||||
|
model: {
|
||||||
|
prop: 'value',
|
||||||
|
event: 'update',
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
bomList: {
|
||||||
|
type: Array,
|
||||||
|
default: () => [],
|
||||||
|
},
|
||||||
|
value: {
|
||||||
|
type: Array,
|
||||||
|
default: () => [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
searchText: '',
|
||||||
|
selectedEquipments: [],
|
||||||
|
selected: [],
|
||||||
|
materialsBomList: [],
|
||||||
|
valuesBomList: [],
|
||||||
|
refreshKey: Math.random(),
|
||||||
|
currentSelectedMaterialBomId: null,
|
||||||
|
currentSelectedValueBomId: null,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
value: {
|
||||||
|
handler(val) {
|
||||||
|
console.log('value', val);
|
||||||
|
if (val) {
|
||||||
|
this.selectedEquipments = val.map((item) => item.equipmentId);
|
||||||
|
this.selected = val;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
deep: true,
|
||||||
|
immediate: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
filteredBomList() {
|
||||||
|
return this.bomList.filter((item) => {
|
||||||
|
return item.name.includes(this.searchText);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
commit() {
|
||||||
|
this.$emit('update', this.selected);
|
||||||
|
},
|
||||||
|
|
||||||
|
handleLoadDom(eq) {
|
||||||
|
// 只显示 dom 列表
|
||||||
|
this.currentEquipment = eq.id;
|
||||||
|
this.materialsBomList = eq.materialsBom;
|
||||||
|
this.valuesBomList = eq.valuesBom;
|
||||||
|
// 回复选中的bom信息
|
||||||
|
if (this.selectedEquipments.includes(eq.id)) {
|
||||||
|
const selectedItem = this.selected.find(
|
||||||
|
(item) => item.equipmentId == eq.id
|
||||||
|
);
|
||||||
|
this.currentSelectedMaterialBomId =
|
||||||
|
selectedItem.equMaterialBomId ?? null;
|
||||||
|
this.currentSelectedValueBomId = selectedItem.equValueBomId ?? null;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
handleEquipmentChange(eq, selected) {
|
||||||
|
this.currentEquipment = eq.id;
|
||||||
|
this.materialsBomList = eq.materialsBom;
|
||||||
|
this.valuesBomList = eq.valuesBom;
|
||||||
|
|
||||||
|
if (selected) {
|
||||||
|
this.selectedEquipments.push(eq.id);
|
||||||
|
this.selected.push({
|
||||||
|
equipmentId: eq.id,
|
||||||
|
equValueBomId: null,
|
||||||
|
equMaterialBomId: null,
|
||||||
|
});
|
||||||
|
// this.$emit('update', this.selected);
|
||||||
|
} else {
|
||||||
|
// 清空选择状态
|
||||||
|
this.selectedEquipments = this.selectedEquipments.filter(
|
||||||
|
(id) => id !== eq.id
|
||||||
|
);
|
||||||
|
// this.$refs.materialsBomList.clearSelected();
|
||||||
|
// this.$refs.valuesBomList.clearSelected();
|
||||||
|
this.currentSelectedMaterialBomId = null;
|
||||||
|
this.currentSelectedValueBomId = null;
|
||||||
|
this.selected = this.selected.filter(
|
||||||
|
(item) => item.equipmentId !== eq.id
|
||||||
|
);
|
||||||
|
// this.$emit('update', this.selected);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
handleMaterialBomChange(equipmentId, bomId, selected) {
|
||||||
|
const selectedItem = this.selected.find(
|
||||||
|
(item) => item.equipmentId == equipmentId
|
||||||
|
);
|
||||||
|
if (selected && !selectedItem) {
|
||||||
|
// 如果没找到这个
|
||||||
|
this.selectedEquipments.push(equipmentId);
|
||||||
|
this.selected.push({
|
||||||
|
equipmentId,
|
||||||
|
equValueBomId: null,
|
||||||
|
equMaterialBomId: bomId,
|
||||||
|
});
|
||||||
|
// 强制更新'设备'一栏
|
||||||
|
this.refreshKey = Math.random();
|
||||||
|
// this.$emit('update', this.selected);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
selectedItem && (selectedItem.equMaterialBomId = selected ? bomId : null);
|
||||||
|
this.currentSelectedMaterialBomId = selected ? bomId : null;
|
||||||
|
// this.$emit('update', this.selected);
|
||||||
|
},
|
||||||
|
|
||||||
|
handleValueBomChange(equipmentId, bomId, selected) {
|
||||||
|
const selectedItem = this.selected.find(
|
||||||
|
(item) => item.equipmentId == equipmentId
|
||||||
|
);
|
||||||
|
if (selected && !selectedItem) {
|
||||||
|
// 如果没找到这个
|
||||||
|
this.selectedEquipments.push(equipmentId);
|
||||||
|
this.selected.push({
|
||||||
|
equipmentId,
|
||||||
|
equValueBomId: bomId,
|
||||||
|
equMaterialBomId: null,
|
||||||
|
});
|
||||||
|
this.refreshKey = Math.random();
|
||||||
|
// this.$emit('update', this.selected);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
selectedItem && (selectedItem.equValueBomId = selected ? bomId : null);
|
||||||
|
this.currentSelectedValueBomId = selected ? bomId : null;
|
||||||
|
// this.$emit('update', this.selected);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.bom-selector {
|
||||||
|
min-height: 200px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sl__body {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 6px;
|
||||||
|
padding: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sl__body-item {
|
||||||
|
margin: 0;
|
||||||
|
padding: 3px 6px;
|
||||||
|
border-radius: 4px;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: background 0.3s ease-in-out;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
|
||||||
|
> span {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background: #0001;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.sl__header {
|
||||||
|
border-bottom: 1px solid #ccc;
|
||||||
|
}
|
||||||
|
</style>
|
@ -9,58 +9,102 @@
|
|||||||
<section class="process-bom">
|
<section class="process-bom">
|
||||||
<SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" />
|
<SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" />
|
||||||
|
|
||||||
<div class="btns" style="
|
<div
|
||||||
|
class="btns"
|
||||||
|
style="
|
||||||
text-align: right;
|
text-align: right;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 20px;
|
top: 20px;
|
||||||
right: 20px;
|
right: 20px;
|
||||||
display: flex;
|
display: flex;
|
||||||
">
|
">
|
||||||
<el-button type="primary" plain :disabled="currentDet == null" class="btn-create" icon="el-icon-plus">
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
:disabled="currentDet == null"
|
||||||
|
class="btn-create"
|
||||||
|
@click="handleAddEquipment"
|
||||||
|
icon="el-icon-plus">
|
||||||
分配设备
|
分配设备
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-input icon="el-icon-search" placeholder="搜索" v-model="searchText" style="margin-left: 20px">
|
<el-input
|
||||||
|
icon="el-icon-search"
|
||||||
|
placeholder="搜索"
|
||||||
|
v-model="searchText"
|
||||||
|
:disabled="currentDet == null"
|
||||||
|
@change="handleSearchTextChange"
|
||||||
|
clearable
|
||||||
|
style="margin-left: 20px">
|
||||||
<i slot="prefix" class="el-input__icon el-icon-search"></i>
|
<i slot="prefix" class="el-input__icon el-icon-search"></i>
|
||||||
</el-input>
|
</el-input>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<base-table :table-props="tableProps" :page="queryParams.pageNo" :limit="queryParams.pageSize" :table-data="list"
|
<base-table
|
||||||
|
:table-props="tableProps"
|
||||||
|
:page="queryParams.pageNo"
|
||||||
|
:limit="queryParams.pageSize"
|
||||||
|
:table-data="list"
|
||||||
@emitFun="handleEmitFun">
|
@emitFun="handleEmitFun">
|
||||||
<method-btn v-if="tableBtn.length" slot="handleBtn" label="操作" :width="120" :method-list="tableBtn"
|
<method-btn
|
||||||
|
v-if="tableBtn.length"
|
||||||
|
slot="handleBtn"
|
||||||
|
label="操作"
|
||||||
|
:width="120"
|
||||||
|
:method-list="tableBtn"
|
||||||
@clickBtn="handleTableBtnClick" />
|
@clickBtn="handleTableBtnClick" />
|
||||||
</base-table>
|
</base-table>
|
||||||
|
|
||||||
<!-- 分页组件 -->
|
<!-- 分页组件 -->
|
||||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
<pagination
|
||||||
|
v-show="total > 0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNo"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
@pagination="getList" />
|
@pagination="getList" />
|
||||||
|
|
||||||
|
<base-dialog
|
||||||
|
dialogTitle="选择设备"
|
||||||
|
:dialogVisible="open"
|
||||||
|
width="45%"
|
||||||
|
@close="cancel"
|
||||||
|
@cancel="cancel"
|
||||||
|
@confirm="submitForm">
|
||||||
|
<!-- <CustomTransfer /> -->
|
||||||
|
<BomSelector
|
||||||
|
ref="bomSelector"
|
||||||
|
v-if="open"
|
||||||
|
:bom-list="bomList"
|
||||||
|
:value="selectedBoms"
|
||||||
|
@update="selectedBoms = $event" />
|
||||||
|
</base-dialog>
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import BomSelector from './BomSelector.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ProcessBom',
|
name: 'ProcessBom',
|
||||||
components: {},
|
components: { BomSelector },
|
||||||
props: {
|
props: {
|
||||||
currentDet: {
|
currentDet: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: null
|
default: null,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
open: false,
|
||||||
|
eqList: [],
|
||||||
|
bomList: [],
|
||||||
|
finalList: [],
|
||||||
|
choosedEquipments: [],
|
||||||
searchBarFormConfig: [{ label: '工序下设备' }],
|
searchBarFormConfig: [{ label: '工序下设备' }],
|
||||||
tableProps: [
|
tableProps: [
|
||||||
// {
|
{ prop: 'equName', label: '设备名称' },
|
||||||
// prop: 'createTime',
|
{ prop: 'materialName', label: '物料BOM' },
|
||||||
// label: '添加时间',
|
{ prop: 'valueName', label: '参数BOM' },
|
||||||
// fixed: true,
|
|
||||||
// width: 180,
|
|
||||||
// filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
|
|
||||||
// },
|
|
||||||
{ prop: 'name', label: '设备名称' },
|
|
||||||
{ prop: 'code', label: '物料BOM' },
|
|
||||||
{ prop: 'remark', label: '参数BOM' },
|
|
||||||
],
|
],
|
||||||
list: [],
|
list: [],
|
||||||
total: 0,
|
total: 0,
|
||||||
@ -68,13 +112,17 @@ export default {
|
|||||||
queryParams: {
|
queryParams: {
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
|
equipmentName: '',
|
||||||
},
|
},
|
||||||
searchText: ''
|
searchText: '',
|
||||||
|
selectedBoms: [],
|
||||||
|
timer: null,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
currentDet: {
|
currentDet: {
|
||||||
handler(val) {
|
handler(val) {
|
||||||
|
console.log('currentDet', val);
|
||||||
if (val != null) {
|
if (val != null) {
|
||||||
this.getList(val);
|
this.getList(val);
|
||||||
} else {
|
} else {
|
||||||
@ -82,12 +130,25 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
immediate: true,
|
immediate: true,
|
||||||
deep: true
|
deep: true,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleEmitFun() {},
|
handleEmitFun() {},
|
||||||
|
|
||||||
handleTableBtnClick() {},
|
handleTableBtnClick() {},
|
||||||
|
|
||||||
|
handleSearchTextChange(val) {
|
||||||
|
if (this.timer) clearTimeout(this.timer);
|
||||||
|
this.timer = setTimeout(() => {
|
||||||
|
console.log('geting list.......');
|
||||||
|
this.queryParams.equipmentName = val;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.getList(this.currentDet);
|
||||||
|
});
|
||||||
|
}, 300);
|
||||||
|
},
|
||||||
|
|
||||||
put(payload) {
|
put(payload) {
|
||||||
return this.http(this.updateUrl, 'put', payload);
|
return this.http(this.updateUrl, 'put', payload);
|
||||||
},
|
},
|
||||||
@ -106,23 +167,95 @@ export default {
|
|||||||
method,
|
method,
|
||||||
params: method === 'get' ? payload : null,
|
params: method === 'get' ? payload : null,
|
||||||
data: method !== 'get' ? payload : null,
|
data: method !== 'get' ? payload : null,
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
|
submitForm() {
|
||||||
getList({ detId, detName, detDesc, flowId, sectionName } = {}) {
|
// 现将子组件的修改提交更新至本组件
|
||||||
console.log('get list')
|
this.$refs.bomSelector.commit();
|
||||||
|
// 再提交至后端
|
||||||
|
this.$nextTick(async () => {
|
||||||
|
console.log('selectedBoms', this.selectedBoms);
|
||||||
|
if (this.selectedBoms.length) {
|
||||||
|
const { code, data } = await this.http(
|
||||||
|
'/extend/process-flow-det-equipment/createList',
|
||||||
|
'post',
|
||||||
|
this.selectedBoms.map((item) => ({
|
||||||
|
...item,
|
||||||
|
flowDetId: this.currentDet.detId,
|
||||||
|
}))
|
||||||
|
);
|
||||||
|
if (code == 0) {
|
||||||
|
this.$message.success('操作成功');
|
||||||
|
this.getList(this.currentDet);
|
||||||
|
this.cancel();
|
||||||
|
} else {
|
||||||
|
this.$message.error('操作失败');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.$message.info('请选择设备');
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
getList() {
|
async getList({
|
||||||
this.list = [
|
detId,
|
||||||
{ name: '1', code: 'bomg-1', remark: 'Tochter' },
|
detName,
|
||||||
{ name: '2', code: 'bomg-2', remark: 'Bruder' },
|
detDesc,
|
||||||
{ name: '3', code: 'bomg-3', remark: 'Kalt' },
|
flowId,
|
||||||
]
|
sectionName,
|
||||||
|
sectionId,
|
||||||
|
} = {}) {
|
||||||
|
console.log('get list', detId, detName, flowId);
|
||||||
|
const { data, code } = await this.http(
|
||||||
|
'/extend/process-flow-det-equipment/page',
|
||||||
|
'get',
|
||||||
|
{ flowDetId: detId, ...this.queryParams }
|
||||||
|
);
|
||||||
|
if (code == 0) {
|
||||||
|
this.list = data.list;
|
||||||
|
this.total = data.total;
|
||||||
|
} else {
|
||||||
|
this.list.splice(0);
|
||||||
|
this.total = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取设备及bom列表
|
||||||
|
this.http('/extend/process-flow-det/getEquipmentDetBySectionId', 'post', {
|
||||||
|
sectionId,
|
||||||
|
flowDetId: detId,
|
||||||
|
}).then(({ code, data }) => {
|
||||||
|
if (code == 0) {
|
||||||
|
this.bomList = data.map((eq) => {
|
||||||
|
eq.materialsBom = eq.materialsBom || [];
|
||||||
|
eq.valuesBom = eq.valuesBom || [];
|
||||||
|
// 设置选中状态
|
||||||
|
eq.materialsBom.chosen = eq.materialsBomChoseId ?? null;
|
||||||
|
eq.valuesBom.chosen = eq.valuesBomChoseId ?? null;
|
||||||
|
if (eq.equChose || eq.materialsBom.chosen || eq.valuesBom.chosen) {
|
||||||
|
this.selectedBoms.push({
|
||||||
|
equipmentId: eq.id,
|
||||||
|
equMaterialBomId: eq.materialsBom.chosen,
|
||||||
|
equValueBomId: eq.valuesBom.chosen,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 设置设备id
|
||||||
|
eq.materialsBom.equipmentId = eq.id;
|
||||||
|
eq.valuesBom.equipmentId = eq.id;
|
||||||
|
return eq;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.bomList.splice(0);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
async handleAddEquipment() {
|
||||||
|
this.open = true;
|
||||||
|
},
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
},
|
},
|
||||||
clearList() {
|
clearList() {
|
||||||
this.list = [];
|
this.list = [];
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -9,25 +9,57 @@
|
|||||||
<section class="process-graph">
|
<section class="process-graph">
|
||||||
<SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" />
|
<SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" />
|
||||||
|
|
||||||
<div class="btns" style="text-align: right; position: absolute; top: 20px; right: 20px">
|
<div
|
||||||
<el-button type="warning" @click="undo" plain v-if="allowUndo" :disabled="!allowUndo" icon="el-icon-back">
|
class="btns"
|
||||||
|
style="text-align: right; position: absolute; top: 20px; right: 20px">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
@click="undo"
|
||||||
|
plain
|
||||||
|
v-if="allowUndo"
|
||||||
|
:disabled="!allowUndo"
|
||||||
|
icon="el-icon-back">
|
||||||
撤销
|
撤销
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="warning" @click="redo" plain v-if="allowRedo" :disabled="!allowRedo">
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
@click="redo"
|
||||||
|
plain
|
||||||
|
v-if="allowRedo"
|
||||||
|
:disabled="!allowRedo">
|
||||||
下一步
|
下一步
|
||||||
<i class="el-icon-right el-icon--right"></i>
|
<i class="el-icon-right el-icon--right"></i>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button class="btn-refresh" @click="handleUpdateLayout" icon="el-icon-refresh">
|
<el-button
|
||||||
刷新布局</el-button>
|
class="btn-refresh"
|
||||||
<el-button type="primary" plain class="btn-create" icon="el-icon-plus" @click="handleAdd">
|
@click="handleUpdateLayout"
|
||||||
|
icon="el-icon-refresh">
|
||||||
|
刷新布局
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
class="btn-create"
|
||||||
|
icon="el-icon-plus"
|
||||||
|
@click="handleAdd">
|
||||||
新建工序
|
新建工序
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button class="btn-edit" :disabled="currentDet == null" @click="handleEdit">编辑</el-button>
|
<el-button
|
||||||
|
class="btn-edit"
|
||||||
|
:disabled="currentDet == null"
|
||||||
|
@click="handleEdit">
|
||||||
|
编辑
|
||||||
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="process-graph__panel" ref="panel"></div>
|
<div class="process-graph__panel" ref="panel"></div>
|
||||||
|
|
||||||
<base-dialog :dialogTitle="title" :dialogVisible="open" width="35%" @close="cancel" @cancel="cancel"
|
<base-dialog
|
||||||
|
:dialogTitle="title"
|
||||||
|
:dialogVisible="open"
|
||||||
|
width="35%"
|
||||||
|
@close="cancel"
|
||||||
|
@cancel="cancel"
|
||||||
@confirm="submitForm">
|
@confirm="submitForm">
|
||||||
<DialogForm v-if="open" ref="form" v-model="form" :rows="rows" />
|
<DialogForm v-if="open" ref="form" v-model="form" :rows="rows" />
|
||||||
</base-dialog>
|
</base-dialog>
|
||||||
@ -36,7 +68,11 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { Graph } from '@antv/x6';
|
import { Graph } from '@antv/x6';
|
||||||
import ProcessNode, { createProcessNode, CACHE_NAME, getSectionFrom } from './ProcessNode';
|
import ProcessNode, {
|
||||||
|
createProcessNode,
|
||||||
|
CACHE_NAME,
|
||||||
|
getSectionFrom,
|
||||||
|
} from './ProcessNode';
|
||||||
import DialogForm from '@/components/DialogForm';
|
import DialogForm from '@/components/DialogForm';
|
||||||
// import { IdToName } from '@/utils'
|
// import { IdToName } from '@/utils'
|
||||||
|
|
||||||
@ -66,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' }],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
@ -75,11 +111,11 @@ 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,
|
||||||
},
|
},
|
||||||
cache: CACHE_NAME
|
cache: CACHE_NAME,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
@ -99,42 +135,39 @@ export default {
|
|||||||
id: null,
|
id: null,
|
||||||
flowId: null,
|
flowId: null,
|
||||||
content: '',
|
content: '',
|
||||||
createTime: null
|
createTime: null,
|
||||||
},
|
},
|
||||||
currentDet: null,
|
currentDet: null,
|
||||||
currentNode: null
|
currentNode: null,
|
||||||
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'form.sectionId': {
|
'form.sectionId': {
|
||||||
handler(id) {
|
handler(id) {},
|
||||||
},
|
|
||||||
immediate: false,
|
immediate: false,
|
||||||
},
|
},
|
||||||
currentDet: {
|
currentDet: {
|
||||||
handler(val) {
|
handler(val) {
|
||||||
this.$emit('det-selected', val)
|
this.$emit('det-selected', val);
|
||||||
},
|
},
|
||||||
deep: true,
|
deep: true,
|
||||||
immediate: true
|
immediate: true,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
activated() {
|
activated() {
|
||||||
this.loadLayout().then(json => {
|
this.loadLayout().then((json) => {
|
||||||
this.initGraph(json)
|
this.initGraph(json);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
deactivated() {
|
deactivated() {
|
||||||
this.graph.dispose();
|
this.graph.dispose();
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.resetLayout();
|
this.resetLayout();
|
||||||
this.graph = null;
|
this.graph = null;
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
initGraph(json) {
|
initGraph(json) {
|
||||||
const graph = new Graph({
|
const graph = new Graph({
|
||||||
container: this.$refs.panel,
|
container: this.$refs.panel,
|
||||||
@ -144,7 +177,7 @@ export default {
|
|||||||
},
|
},
|
||||||
history: true,
|
history: true,
|
||||||
selecting: {
|
selecting: {
|
||||||
className: 'my-select'
|
className: 'my-select',
|
||||||
},
|
},
|
||||||
connecting: {
|
connecting: {
|
||||||
snap: true,
|
snap: true,
|
||||||
@ -155,24 +188,17 @@ export default {
|
|||||||
allowEdge: false,
|
allowEdge: false,
|
||||||
},
|
},
|
||||||
panning: true,
|
panning: true,
|
||||||
// scroller: {
|
|
||||||
// enabled: true,
|
|
||||||
// pannable: true,
|
|
||||||
// cursor: '',
|
|
||||||
// width: 800,
|
|
||||||
// height: 200
|
|
||||||
// },
|
|
||||||
mousewheel: {
|
mousewheel: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
modifiers: ['ctrl', 'meta']
|
modifiers: ['ctrl', 'meta'],
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
graph.fromJSON(json)
|
graph.fromJSON(json);
|
||||||
this.graph = graph;
|
this.graph = graph;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.registerGraphEvents();
|
this.registerGraphEvents();
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
registerGraphEvents() {
|
registerGraphEvents() {
|
||||||
@ -182,31 +208,33 @@ export default {
|
|||||||
this.currentDet = null;
|
this.currentDet = null;
|
||||||
this.currentNode = null;
|
this.currentNode = null;
|
||||||
|
|
||||||
nodes.forEach(node => {
|
nodes.forEach((node) => {
|
||||||
node.attr('container/stroke', '#ccc');
|
node.attr('container/stroke', '#ccc');
|
||||||
});
|
});
|
||||||
edges.forEach(edge => {
|
edges.forEach((edge) => {
|
||||||
edge.attr('line/stroke', '#ccc')
|
edge.attr('line/stroke', '#ccc');
|
||||||
})
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
this.graph.on('node:click', ({ e, x, y, node, view }) => {
|
this.graph.on('node:click', ({ e, x, y, node, view }) => {
|
||||||
reset();
|
reset();
|
||||||
node.attr('container/stroke', '#0b58ff');
|
node.attr('container/stroke', '#0b58ff');
|
||||||
const { detId, detName, detDesc, processId, sectionId, sectionName } = node.attrs;
|
const { detId, detName, detDesc, processId, sectionId, sectionName } =
|
||||||
this.currentDet = {}
|
node.attrs;
|
||||||
this.$set(this.currentDet, 'detId', detId.text)
|
console.log('node clicked!', node)
|
||||||
this.$set(this.currentDet, 'sectionId', sectionId.text)
|
this.currentDet = {};
|
||||||
this.$set(this.currentDet, 'detName', detName.text)
|
this.$set(this.currentDet, 'detId', detId?.text);
|
||||||
this.$set(this.currentDet, 'detDesc', detDesc.text)
|
this.$set(this.currentDet, 'sectionId', sectionId?.text);
|
||||||
this.$set(this.currentDet, 'flowId', processId.text)
|
this.$set(this.currentDet, 'detName', detName?.text);
|
||||||
this.$set(this.currentDet, 'sectionName', sectionName.text)
|
this.$set(this.currentDet, 'detDesc', detDesc?.text);
|
||||||
this.currentNode = node
|
this.$set(this.currentDet, 'flowId', processId?.text);
|
||||||
|
this.$set(this.currentDet, 'sectionName', sectionName?.text);
|
||||||
|
this.currentNode = node;
|
||||||
});
|
});
|
||||||
this.graph.on('edge:click', ({ e, x, y, edge, view }) => {
|
this.graph.on('edge:click', ({ e, x, y, edge, view }) => {
|
||||||
// console.log('edge clicked!', edge)
|
// console.log('edge clicked!', edge)
|
||||||
reset();
|
reset();
|
||||||
edge.attr('line/stroke', '#0b58ff')
|
edge.attr('line/stroke', '#0b58ff');
|
||||||
});
|
});
|
||||||
this.graph.on('blank:click', ({ e, x, y }) => {
|
this.graph.on('blank:click', ({ e, x, y }) => {
|
||||||
reset();
|
reset();
|
||||||
@ -219,30 +247,30 @@ export default {
|
|||||||
y: 0,
|
y: 0,
|
||||||
offset: { x: 0, y: 0 },
|
offset: { x: 0, y: 0 },
|
||||||
onClick: ({ e, cell, view }) => {
|
onClick: ({ e, cell, view }) => {
|
||||||
this.$confirm(
|
this.$confirm('确定删除这个工序吗?', '提示', {
|
||||||
'确定删除这个工序吗?',
|
|
||||||
'提示',
|
|
||||||
{
|
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning',
|
||||||
}
|
})
|
||||||
).then(async () => {
|
.then(async () => {
|
||||||
const id = node.attrs.detId.text;
|
const id = node.attrs.detId.text;
|
||||||
const status = await this.handleDelete(id);
|
const status = await this.handleDelete(id);
|
||||||
if (status) {
|
if (status) {
|
||||||
view.cell.remove();
|
view.cell.remove();
|
||||||
|
// 更新布局,不然下次打开删除的节点还在
|
||||||
|
this.handleUpdateLayout();
|
||||||
}
|
}
|
||||||
}).catch(err => {
|
})
|
||||||
|
.catch((err) => {
|
||||||
return;
|
return;
|
||||||
})
|
});
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
});
|
});
|
||||||
this.graph.on('node:mouseleave', ({ node }) => {
|
this.graph.on('node:mouseleave', ({ node }) => {
|
||||||
node.removeTools();
|
node.removeTools();
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
resetLayout() {
|
resetLayout() {
|
||||||
@ -250,13 +278,13 @@ export default {
|
|||||||
id: null,
|
id: null,
|
||||||
flowId: null,
|
flowId: null,
|
||||||
content: '',
|
content: '',
|
||||||
createTime: null
|
createTime: null,
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
async loadLayout() {
|
async loadLayout() {
|
||||||
const flowId = this.$route.params.id;
|
const flowId = this.$route.params.id;
|
||||||
if (!flowId) return { cells: [] }
|
if (!flowId) return { cells: [] };
|
||||||
const { code, data } = await this.info({ id: flowId });
|
const { code, data } = await this.info({ id: flowId });
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
if (data) {
|
if (data) {
|
||||||
@ -282,17 +310,25 @@ export default {
|
|||||||
async handleUpdateLayout() {
|
async handleUpdateLayout() {
|
||||||
this.layout.content = JSON.stringify(this.graph.toJSON());
|
this.layout.content = JSON.stringify(this.graph.toJSON());
|
||||||
let code, data;
|
let code, data;
|
||||||
console.table([this.layout, this.$route.params.id])
|
console.table([this.layout, this.$route.params.id]);
|
||||||
// 手动刷新布局
|
// 手动刷新布局
|
||||||
if (this.layout.id) {
|
if (this.layout.id) {
|
||||||
({ code, data } = await this.http('/extend/process-flow-view/update', 'put', this.layout));
|
({ code, data } = await this.http(
|
||||||
|
'/extend/process-flow-view/update',
|
||||||
|
'put',
|
||||||
|
this.layout
|
||||||
|
));
|
||||||
} else {
|
} else {
|
||||||
this.layout.flowId = this.$route.params.id;
|
this.layout.flowId = this.$route.params.id;
|
||||||
({ code, data } = await this.http('/extend/process-flow-view/create', 'post', this.layout));
|
({ code, data } = await this.http(
|
||||||
|
'/extend/process-flow-view/create',
|
||||||
|
'post',
|
||||||
|
this.layout
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
this.$modal.msgSuccess('布局已刷新!')
|
this.$modal.msgSuccess('布局已刷新!');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -325,12 +361,11 @@ export default {
|
|||||||
this.title = '编辑工序';
|
this.title = '编辑工序';
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.open = true;
|
this.open = true;
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
async handleDelete(id) {
|
async handleDelete(id) {
|
||||||
const { code, data } = await this.delete({ id });
|
const { code, data } = await this.delete({ id });
|
||||||
debugger;
|
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
this.$modal.msgSuccess('成功删除一个工序!');
|
this.$modal.msgSuccess('成功删除一个工序!');
|
||||||
return true;
|
return true;
|
||||||
@ -349,17 +384,17 @@ export default {
|
|||||||
this.updateProcess()
|
this.updateProcess()
|
||||||
.then((form) => {
|
.then((form) => {
|
||||||
const { name, sectionId, remark } = form;
|
const { name, sectionId, remark } = form;
|
||||||
getSectionFrom(sectionId).then(sectionName => {
|
getSectionFrom(sectionId).then((sectionName) => {
|
||||||
// 修改当前node的信息
|
// 修改当前node的信息
|
||||||
this.currentNode.setAttrs({
|
this.currentNode.setAttrs({
|
||||||
detName: { text: name },
|
detName: { text: name },
|
||||||
sectionId: { text: sectionId },
|
sectionId: { text: sectionId },
|
||||||
sectionName: { text: sectionName },
|
sectionName: { text: sectionName },
|
||||||
detDesc: { text: remark }
|
detDesc: { text: remark },
|
||||||
|
});
|
||||||
|
});
|
||||||
})
|
})
|
||||||
})
|
.catch((err) => {});
|
||||||
})
|
|
||||||
.catch(err => { });
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -368,19 +403,22 @@ export default {
|
|||||||
if (!id) return null;
|
if (!id) return null;
|
||||||
return createProcessNode({
|
return createProcessNode({
|
||||||
flowId: flowId,
|
flowId: flowId,
|
||||||
name, sectionId, remark,
|
name,
|
||||||
|
sectionId,
|
||||||
|
remark,
|
||||||
id,
|
id,
|
||||||
|
});
|
||||||
})
|
})
|
||||||
}).then(node => {
|
.then((node) => {
|
||||||
if (!node) {
|
if (!node) {
|
||||||
this.$modal.msgError('创建节点失败');
|
this.$modal.msgError('创建节点失败');
|
||||||
return;
|
return;
|
||||||
};
|
}
|
||||||
this.graph.addNode(node);
|
this.graph.addNode(node);
|
||||||
}).catch(err => {
|
})
|
||||||
|
.catch((err) => {
|
||||||
return;
|
return;
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -390,14 +428,13 @@ export default {
|
|||||||
this.$modal.msgError('工艺ID不能为空');
|
this.$modal.msgError('工艺ID不能为空');
|
||||||
return Promise.reject('工艺ID不能为空');
|
return Promise.reject('工艺ID不能为空');
|
||||||
}
|
}
|
||||||
return this.put({ flowId, ...this.form })
|
return this.put({ flowId, ...this.form }).then(({ code, data }) => {
|
||||||
.then(({ code, data }) => {
|
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
this.$modal.msgSuccess('修改成功');
|
this.$modal.msgSuccess('修改成功');
|
||||||
} else {
|
} else {
|
||||||
this.$modal.msgError('修改失败');
|
this.$modal.msgError('修改失败');
|
||||||
}
|
}
|
||||||
const formCopy = { ...this.form }
|
const formCopy = { ...this.form };
|
||||||
this.open = false;
|
this.open = false;
|
||||||
return formCopy;
|
return formCopy;
|
||||||
});
|
});
|
||||||
@ -410,21 +447,21 @@ export default {
|
|||||||
this.$modal.msgError('工艺ID不能为空');
|
this.$modal.msgError('工艺ID不能为空');
|
||||||
return Promise.reject('工艺ID不能为空');
|
return Promise.reject('工艺ID不能为空');
|
||||||
}
|
}
|
||||||
console.log('create process', this.form)
|
console.log('create process', this.form);
|
||||||
// 添加的提交
|
// 添加的提交
|
||||||
return this.post({ flowId, ...this.form }).then(
|
return this.post({ flowId, ...this.form })
|
||||||
({ code, data }) => {
|
.then(({ code, data }) => {
|
||||||
this.$modal.msgSuccess('新增成功');
|
this.$modal.msgSuccess('新增成功');
|
||||||
this.open = false;
|
this.open = false;
|
||||||
// this.getList();
|
// this.getList();
|
||||||
return {
|
return {
|
||||||
id: data, // 服务器返回的新建的工段id
|
id: data, // 服务器返回的新建的工段id
|
||||||
...this.form, // 保存一份 this.form 副本,当 open->false 时 this.form 里的信息就清空了
|
...this.form, // 保存一份 this.form 副本,当 open->false 时 this.form 里的信息就清空了
|
||||||
flowId
|
flowId,
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
).catch(err => {
|
.catch((err) => {
|
||||||
this.$modal.msgError(err)
|
this.$modal.msgError(err);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -452,7 +489,7 @@ export default {
|
|||||||
method,
|
method,
|
||||||
params: method === 'get' ? payload : null,
|
params: method === 'get' ? payload : null,
|
||||||
data: method !== 'get' ? payload : null,
|
data: method !== 'get' ? payload : null,
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
51
src/views/extend/processFlowView/components/candidate.js
Normal file
51
src/views/extend/processFlowView/components/candidate.js
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
export class Candidate {
|
||||||
|
constructor(id, name, paramBomList, materialBomList) {
|
||||||
|
this.equipmentId = id;
|
||||||
|
this.equipmentName = name;
|
||||||
|
this.children = [];
|
||||||
|
this.totalBom = paramBomList.length + materialBomList.length;
|
||||||
|
this.selected = false;
|
||||||
|
paramBomList.forEach((pb) => {
|
||||||
|
this.children.push({
|
||||||
|
id: pb.id,
|
||||||
|
name: pb.name,
|
||||||
|
type: 'param',
|
||||||
|
selected: false,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
materialBomList.forEach((mb) => {
|
||||||
|
this.children.push({
|
||||||
|
id: mb.id,
|
||||||
|
name: mb.name,
|
||||||
|
type: 'material',
|
||||||
|
selected: false,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
get selected() {
|
||||||
|
return this.children.filter((child) => child.selected).length;
|
||||||
|
}
|
||||||
|
|
||||||
|
get paramBom() {
|
||||||
|
return this.children.filter((child) => child.type === 'param');
|
||||||
|
}
|
||||||
|
|
||||||
|
get materialBom() {
|
||||||
|
return this.children.filter((child) => child.type === 'material');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class CandidateList {
|
||||||
|
constructor() {
|
||||||
|
this.value = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
addCandidate(candidate) {
|
||||||
|
this.value.push(candidate);
|
||||||
|
}
|
||||||
|
|
||||||
|
get selected() {
|
||||||
|
return this.list.filter((candidate) => candidate.selected).length;
|
||||||
|
}
|
||||||
|
}
|
@ -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>
|
||||||
|
@ -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,
|
||||||
},
|
},
|
||||||
|
@ -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>
|
||||||
|
|
||||||
|
@ -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,
|
||||||
},
|
},
|
||||||
|
@ -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' }],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
|
@ -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,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@ -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"
|
||||||
|
@ -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,
|
||||||
},
|
},
|
||||||
|
@ -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,
|
||||||
@ -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,15 +135,6 @@ 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' }],
|
||||||
],
|
],
|
||||||
|
@ -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"
|
||||||
|
@ -20,7 +20,7 @@ export default {
|
|||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
url: process.env.VUE_APP_BASE_API + "/jmreport/list?token=" + getAccessToken(),
|
url: process.env.VUE_APP_JIMU_API + "/jmreport/list?token=" + getAccessToken(),
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2023-08-01 13:52:10
|
* @Date: 2023-08-01 13:52:10
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2023-11-03 14:56:25
|
* @LastEditTime: 2023-11-20 15:54:28
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -15,31 +15,31 @@
|
|||||||
label-width="100px">
|
label-width="100px">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="名称" prop="name">
|
<el-form-item label="物品名称" prop="name">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="dataForm.name"
|
v-model="dataForm.name"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请输入名称" />
|
placeholder="请输入物品名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="编码" prop="code">
|
<el-form-item label="物品编码" prop="code">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="dataForm.code"
|
v-model="dataForm.code"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请输入编码" />
|
placeholder="请输入物品编码" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="规格" prop="spec">
|
<el-form-item label="物品规格" prop="spec">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="dataForm.spec"
|
v-model="dataForm.spec"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请输入规格" />
|
placeholder="请输入物品规格" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="单位" prop="unit">
|
<el-form-item label="物品单位" prop="unit">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="dataForm.unit"
|
v-model="dataForm.unit"
|
||||||
filterable
|
filterable
|
||||||
@ -57,6 +57,7 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="单日消耗量" prop="dailyUse">
|
<el-form-item label="单日消耗量" prop="dailyUse">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
|
:min="0"
|
||||||
v-model="dataForm.dailyUse"
|
v-model="dataForm.dailyUse"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请输入单日消耗量" />
|
placeholder="请输入单日消耗量" />
|
||||||
@ -65,9 +66,10 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="允许留存时间" prop="allowTime">
|
<el-form-item label="允许留存时间" prop="allowTime">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
|
:min="0"
|
||||||
v-model="dataForm.allowTime"
|
v-model="dataForm.allowTime"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请输入允许留存时间" />
|
placeholder="请输入允许留存时间" /> (天)
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@ -130,13 +132,14 @@ export default {
|
|||||||
allowTime: 0,
|
allowTime: 0,
|
||||||
enabled: 1,
|
enabled: 1,
|
||||||
remark: '',
|
remark: '',
|
||||||
|
storageType:2
|
||||||
},
|
},
|
||||||
dataRule: {
|
dataRule: {
|
||||||
code: [
|
code: [
|
||||||
{ required: true, message: '库位编码不能为空', trigger: 'blur' },
|
{ required: true, message: '物品编码不能为空', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
name: [
|
name: [
|
||||||
{ required: true, message: '库位名称不能为空', trigger: 'blur' },
|
{ required: true, message: '物品名称不能为空', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
isorno: [
|
isorno: [
|
||||||
|
@ -57,19 +57,19 @@ import { publicFormatter } from '@/utils/dict';
|
|||||||
const tableProps = [
|
const tableProps = [
|
||||||
{
|
{
|
||||||
prop: 'name',
|
prop: 'name',
|
||||||
label: '名称',
|
label: '物品名称',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'code',
|
prop: 'code',
|
||||||
label: '编码',
|
label: '物品编码',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'spec',
|
prop: 'spec',
|
||||||
label: '规格',
|
label: '物品规格',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'unit',
|
prop: 'unit',
|
||||||
label: '单位',
|
label: '物品单位',
|
||||||
filter: publicFormatter('unit_dict')
|
filter: publicFormatter('unit_dict')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -121,8 +121,8 @@ export default {
|
|||||||
formConfig: [
|
formConfig: [
|
||||||
{
|
{
|
||||||
type: 'input',
|
type: 'input',
|
||||||
label: '名称',
|
label: '物品名称',
|
||||||
placeholder: '名称',
|
placeholder: '物品名称',
|
||||||
param: 'name',
|
param: 'name',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
<search-bar
|
<search-bar
|
||||||
:isFold="true"
|
|
||||||
:formConfigs="formConfig"
|
:formConfigs="formConfig"
|
||||||
ref="searchBarForm"
|
ref="searchBarForm"
|
||||||
@headBtnClick="buttonClick" />
|
@headBtnClick="buttonClick" />
|
||||||
@ -114,7 +113,7 @@ export default {
|
|||||||
tableData: [],
|
tableData: [],
|
||||||
tableProps,
|
tableProps,
|
||||||
tableBtn: [
|
tableBtn: [
|
||||||
this.$auth.hasPermi(`end-material:warehouse-realtime-location-his:query`)
|
this.$auth.hasPermi(`end-material:warehouse-location-his:query`)
|
||||||
? {
|
? {
|
||||||
type: 'info',
|
type: 'info',
|
||||||
btnName: '详情',
|
btnName: '详情',
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2023-08-01 13:52:10
|
* @Date: 2023-08-01 13:52:10
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2023-11-04 16:32:54
|
* @LastEditTime: 2023-11-20 15:14:18
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -68,7 +68,6 @@
|
|||||||
v-model="dataForm.goodsBatch"
|
v-model="dataForm.goodsBatch"
|
||||||
filterable
|
filterable
|
||||||
clearable
|
clearable
|
||||||
@change="setBatchInfo"
|
|
||||||
placeholder="请选择物品名称">
|
placeholder="请选择物品名称">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(item, index) in Batch"
|
v-for="(item, index) in Batch"
|
||||||
@ -79,13 +78,12 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="入库数量" prop="numDet">
|
<el-form-item :label="dataForm.id?'出库数量':'入库数量'" prop="numDet">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="dataForm.numDet"
|
v-model="dataForm.numDet"
|
||||||
clearable
|
clearable
|
||||||
:min="0"
|
:min="0"
|
||||||
:max="max?max:9999999"
|
placeholder="请输入数量" />
|
||||||
placeholder="请输入入库数量" />
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -130,7 +128,6 @@ export default {
|
|||||||
},
|
},
|
||||||
goodsArr: [],
|
goodsArr: [],
|
||||||
Batch: [],
|
Batch: [],
|
||||||
max: 0,
|
|
||||||
dataRule: {
|
dataRule: {
|
||||||
goodsId: [
|
goodsId: [
|
||||||
{ required: true, message: '物品名称不能为空', trigger: 'change' },
|
{ required: true, message: '物品名称不能为空', trigger: 'change' },
|
||||||
@ -143,7 +140,7 @@ export default {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
numDet: [
|
numDet: [
|
||||||
{ required: true, message: '入库数量不能为空', trigger: 'blur' },
|
{ required: true, message: '数量不能为空', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@ -172,13 +169,6 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
setBatchInfo(){
|
|
||||||
this.Batch.forEach((item) => {
|
|
||||||
if (item.goodsBatch === this.dataForm.goodsBatch) {
|
|
||||||
this.max = item.numDet
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
outWare(data) {
|
outWare(data) {
|
||||||
this.getArr();
|
this.getArr();
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
<el-option
|
<el-option
|
||||||
v-for="item in productArr"
|
v-for="item in productArr"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
|
:disabled="!item.enabled"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item" />
|
:value="item" />
|
||||||
</el-select>
|
</el-select>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2023-08-01 13:52:10
|
* @Date: 2023-08-01 13:52:10
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2023-11-03 14:56:25
|
* @LastEditTime: 2023-11-20 15:54:39
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -15,31 +15,31 @@
|
|||||||
label-width="100px">
|
label-width="100px">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="名称" prop="name">
|
<el-form-item label="物品名称" prop="name">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="dataForm.name"
|
v-model="dataForm.name"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请输入名称" />
|
placeholder="请输入物品名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="编码" prop="code">
|
<el-form-item label="物品编码" prop="code">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="dataForm.code"
|
v-model="dataForm.code"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请输入编码" />
|
placeholder="请输入物品编码" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="规格" prop="spec">
|
<el-form-item label="物品规格" prop="spec">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="dataForm.spec"
|
v-model="dataForm.spec"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请输入规格" />
|
placeholder="请输入物品规格" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="单位" prop="unit">
|
<el-form-item label="物品单位" prop="unit">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="dataForm.unit"
|
v-model="dataForm.unit"
|
||||||
filterable
|
filterable
|
||||||
@ -57,6 +57,7 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="单日消耗量" prop="dailyUse">
|
<el-form-item label="单日消耗量" prop="dailyUse">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
|
:min="0"
|
||||||
v-model="dataForm.dailyUse"
|
v-model="dataForm.dailyUse"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请输入单日消耗量" />
|
placeholder="请输入单日消耗量" />
|
||||||
@ -65,9 +66,10 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="允许留存时间" prop="allowTime">
|
<el-form-item label="允许留存时间" prop="allowTime">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
|
:min="0"
|
||||||
v-model="dataForm.allowTime"
|
v-model="dataForm.allowTime"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请输入允许留存时间" />
|
placeholder="请输入允许留存时间" /> (天)
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@ -130,13 +132,14 @@ export default {
|
|||||||
allowTime: 0,
|
allowTime: 0,
|
||||||
enabled: 1,
|
enabled: 1,
|
||||||
remark: '',
|
remark: '',
|
||||||
|
storageType:5
|
||||||
},
|
},
|
||||||
dataRule: {
|
dataRule: {
|
||||||
code: [
|
code: [
|
||||||
{ required: true, message: '库位编码不能为空', trigger: 'blur' },
|
{ required: true, message: '物品编码不能为空', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
name: [
|
name: [
|
||||||
{ required: true, message: '库位名称不能为空', trigger: 'blur' },
|
{ required: true, message: '物品名称不能为空', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
isorno: [
|
isorno: [
|
||||||
|
@ -57,19 +57,19 @@ import { publicFormatter } from '@/utils/dict';
|
|||||||
const tableProps = [
|
const tableProps = [
|
||||||
{
|
{
|
||||||
prop: 'name',
|
prop: 'name',
|
||||||
label: '名称',
|
label: '物品名称',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'code',
|
prop: 'code',
|
||||||
label: '编码',
|
label: '物品编码',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'spec',
|
prop: 'spec',
|
||||||
label: '规格',
|
label: '物品规格',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'unit',
|
prop: 'unit',
|
||||||
label: '单位',
|
label: '物品单位',
|
||||||
filter: publicFormatter('unit_dict')
|
filter: publicFormatter('unit_dict')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -121,8 +121,8 @@ export default {
|
|||||||
formConfig: [
|
formConfig: [
|
||||||
{
|
{
|
||||||
type: 'input',
|
type: 'input',
|
||||||
label: '名称',
|
label: '物品名称',
|
||||||
placeholder: '名称',
|
placeholder: '物品名称',
|
||||||
param: 'name',
|
param: 'name',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
<search-bar
|
<search-bar
|
||||||
:isFold="true"
|
|
||||||
:formConfigs="formConfig"
|
:formConfigs="formConfig"
|
||||||
ref="searchBarForm"
|
ref="searchBarForm"
|
||||||
@headBtnClick="buttonClick" />
|
@headBtnClick="buttonClick" />
|
||||||
@ -114,7 +113,7 @@ export default {
|
|||||||
tableData: [],
|
tableData: [],
|
||||||
tableProps,
|
tableProps,
|
||||||
tableBtn: [
|
tableBtn: [
|
||||||
this.$auth.hasPermi(`out-material:warehouse-realtime-location-his:query`)
|
this.$auth.hasPermi(`out-material:warehouse-location-his:query`)
|
||||||
? {
|
? {
|
||||||
type: 'info',
|
type: 'info',
|
||||||
btnName: '详情',
|
btnName: '详情',
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2023-08-01 13:52:10
|
* @Date: 2023-08-01 13:52:10
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2023-11-04 16:24:41
|
* @LastEditTime: 2023-11-20 15:14:00
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -68,7 +68,6 @@
|
|||||||
v-model="dataForm.goodsBatch"
|
v-model="dataForm.goodsBatch"
|
||||||
filterable
|
filterable
|
||||||
clearable
|
clearable
|
||||||
@change="setBatchInfo"
|
|
||||||
placeholder="请选择物品名称">
|
placeholder="请选择物品名称">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(item, index) in Batch"
|
v-for="(item, index) in Batch"
|
||||||
@ -79,13 +78,12 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="入库数量" prop="numDet">
|
<el-form-item :label="dataForm.id?'出库数量':'入库数量'" prop="numDet">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="dataForm.numDet"
|
v-model="dataForm.numDet"
|
||||||
clearable
|
clearable
|
||||||
:min="0"
|
:min="0"
|
||||||
:max="max?max:9999999"
|
placeholder="请输入数量" />
|
||||||
placeholder="请输入入库数量" />
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -130,7 +128,6 @@ export default {
|
|||||||
},
|
},
|
||||||
goodsArr: [],
|
goodsArr: [],
|
||||||
Batch: [],
|
Batch: [],
|
||||||
max: 0,
|
|
||||||
dataRule: {
|
dataRule: {
|
||||||
goodsId: [
|
goodsId: [
|
||||||
{ required: true, message: '物品名称不能为空', trigger: 'change' },
|
{ required: true, message: '物品名称不能为空', trigger: 'change' },
|
||||||
@ -143,7 +140,7 @@ export default {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
numDet: [
|
numDet: [
|
||||||
{ required: true, message: '入库数量不能为空', trigger: 'blur' },
|
{ required: true, message: '数量不能为空', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@ -172,13 +169,6 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
setBatchInfo(){
|
|
||||||
this.Batch.forEach((item) => {
|
|
||||||
if (item.goodsBatch === this.dataForm.goodsBatch) {
|
|
||||||
this.max = item.numDet
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
outWare(data) {
|
outWare(data) {
|
||||||
this.getArr();
|
this.getArr();
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
<el-option
|
<el-option
|
||||||
v-for="item in productArr"
|
v-for="item in productArr"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
|
:disabled="!item.enabled"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item" />
|
:value="item" />
|
||||||
</el-select>
|
</el-select>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2023-08-01 13:52:10
|
* @Date: 2023-08-01 13:52:10
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2023-11-03 14:56:25
|
* @LastEditTime: 2023-11-20 15:54:49
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -15,31 +15,31 @@
|
|||||||
label-width="100px">
|
label-width="100px">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="名称" prop="name">
|
<el-form-item label="物品名称" prop="name">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="dataForm.name"
|
v-model="dataForm.name"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请输入名称" />
|
placeholder="请输入物品名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="编码" prop="code">
|
<el-form-item label="物品编码" prop="code">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="dataForm.code"
|
v-model="dataForm.code"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请输入编码" />
|
placeholder="请输入物品编码" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="规格" prop="spec">
|
<el-form-item label="物品规格" prop="spec">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="dataForm.spec"
|
v-model="dataForm.spec"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请输入规格" />
|
placeholder="请输入物品规格" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="单位" prop="unit">
|
<el-form-item label="物品单位" prop="unit">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="dataForm.unit"
|
v-model="dataForm.unit"
|
||||||
filterable
|
filterable
|
||||||
@ -57,6 +57,7 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="单日消耗量" prop="dailyUse">
|
<el-form-item label="单日消耗量" prop="dailyUse">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
|
:min="0"
|
||||||
v-model="dataForm.dailyUse"
|
v-model="dataForm.dailyUse"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请输入单日消耗量" />
|
placeholder="请输入单日消耗量" />
|
||||||
@ -65,9 +66,10 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="允许留存时间" prop="allowTime">
|
<el-form-item label="允许留存时间" prop="allowTime">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
|
:min="0"
|
||||||
v-model="dataForm.allowTime"
|
v-model="dataForm.allowTime"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请输入允许留存时间" />
|
placeholder="请输入允许留存时间" /> (天)
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@ -130,13 +132,14 @@ export default {
|
|||||||
allowTime: 0,
|
allowTime: 0,
|
||||||
enabled: 1,
|
enabled: 1,
|
||||||
remark: '',
|
remark: '',
|
||||||
|
storageType:3
|
||||||
},
|
},
|
||||||
dataRule: {
|
dataRule: {
|
||||||
code: [
|
code: [
|
||||||
{ required: true, message: '库位编码不能为空', trigger: 'blur' },
|
{ required: true, message: '物品编码不能为空', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
name: [
|
name: [
|
||||||
{ required: true, message: '库位名称不能为空', trigger: 'blur' },
|
{ required: true, message: '物品名称不能为空', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
isorno: [
|
isorno: [
|
||||||
|
@ -57,19 +57,19 @@ import { publicFormatter } from '@/utils/dict';
|
|||||||
const tableProps = [
|
const tableProps = [
|
||||||
{
|
{
|
||||||
prop: 'name',
|
prop: 'name',
|
||||||
label: '名称',
|
label: '物品名称',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'code',
|
prop: 'code',
|
||||||
label: '编码',
|
label: '物品编码',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'spec',
|
prop: 'spec',
|
||||||
label: '规格',
|
label: '物品规格',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'unit',
|
prop: 'unit',
|
||||||
label: '单位',
|
label: '物品单位',
|
||||||
filter: publicFormatter('unit_dict')
|
filter: publicFormatter('unit_dict')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -121,8 +121,8 @@ export default {
|
|||||||
formConfig: [
|
formConfig: [
|
||||||
{
|
{
|
||||||
type: 'input',
|
type: 'input',
|
||||||
label: '名称',
|
label: '物品名称',
|
||||||
placeholder: '名称',
|
placeholder: '物品名称',
|
||||||
param: 'name',
|
param: 'name',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
<search-bar
|
<search-bar
|
||||||
:isFold="true"
|
|
||||||
:formConfigs="formConfig"
|
:formConfigs="formConfig"
|
||||||
ref="searchBarForm"
|
ref="searchBarForm"
|
||||||
@headBtnClick="buttonClick" />
|
@headBtnClick="buttonClick" />
|
||||||
@ -114,7 +113,7 @@ export default {
|
|||||||
tableData: [],
|
tableData: [],
|
||||||
tableProps,
|
tableProps,
|
||||||
tableBtn: [
|
tableBtn: [
|
||||||
this.$auth.hasPermi(`pack-material:warehouse-realtime-location-his:query`)
|
this.$auth.hasPermi(`pack-material:warehouse-location-his:query`)
|
||||||
? {
|
? {
|
||||||
type: 'info',
|
type: 'info',
|
||||||
btnName: '详情',
|
btnName: '详情',
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2023-08-01 13:52:10
|
* @Date: 2023-08-01 13:52:10
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2023-11-04 14:17:39
|
* @LastEditTime: 2023-11-20 15:13:37
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -68,7 +68,6 @@
|
|||||||
v-model="dataForm.goodsBatch"
|
v-model="dataForm.goodsBatch"
|
||||||
filterable
|
filterable
|
||||||
clearable
|
clearable
|
||||||
@change="setBatchInfo"
|
|
||||||
placeholder="请选择物品名称">
|
placeholder="请选择物品名称">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(item, index) in Batch"
|
v-for="(item, index) in Batch"
|
||||||
@ -79,13 +78,12 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="入库数量" prop="numDet">
|
<el-form-item :label="dataForm.id?'出库数量':'入库数量'" prop="numDet">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="dataForm.numDet"
|
v-model="dataForm.numDet"
|
||||||
clearable
|
clearable
|
||||||
:min="0"
|
:min="0"
|
||||||
:max="max?max:9999999"
|
placeholder="请输入数量" />
|
||||||
placeholder="请输入入库数量" />
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -130,7 +128,6 @@ export default {
|
|||||||
},
|
},
|
||||||
goodsArr: [],
|
goodsArr: [],
|
||||||
Batch: [],
|
Batch: [],
|
||||||
max: 0,
|
|
||||||
dataRule: {
|
dataRule: {
|
||||||
goodsId: [
|
goodsId: [
|
||||||
{ required: true, message: '物品名称不能为空', trigger: 'change' },
|
{ required: true, message: '物品名称不能为空', trigger: 'change' },
|
||||||
@ -143,7 +140,7 @@ export default {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
numDet: [
|
numDet: [
|
||||||
{ required: true, message: '入库数量不能为空', trigger: 'blur' },
|
{ required: true, message: '数量不能为空', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@ -172,13 +169,6 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
setBatchInfo(){
|
|
||||||
this.Batch.forEach((item) => {
|
|
||||||
if (item.goodsBatch === this.dataForm.goodsBatch) {
|
|
||||||
this.max = item.numDet
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
outWare(data) {
|
outWare(data) {
|
||||||
this.getArr();
|
this.getArr();
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
<el-option
|
<el-option
|
||||||
v-for="item in productArr"
|
v-for="item in productArr"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
|
:disabled="!item.enabled"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item" />
|
:value="item" />
|
||||||
</el-select>
|
</el-select>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2023-08-01 13:52:10
|
* @Date: 2023-08-01 13:52:10
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2023-11-03 14:56:25
|
* @LastEditTime: 2023-11-20 15:54:59
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -15,31 +15,31 @@
|
|||||||
label-width="100px">
|
label-width="100px">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="名称" prop="name">
|
<el-form-item label="物品名称" prop="name">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="dataForm.name"
|
v-model="dataForm.name"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请输入名称" />
|
placeholder="请输入物品名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="编码" prop="code">
|
<el-form-item label="物品编码" prop="code">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="dataForm.code"
|
v-model="dataForm.code"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请输入编码" />
|
placeholder="请输入物品编码" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="规格" prop="spec">
|
<el-form-item label="物品规格" prop="spec">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="dataForm.spec"
|
v-model="dataForm.spec"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请输入规格" />
|
placeholder="请输入物品规格" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="单位" prop="unit">
|
<el-form-item label="物品单位" prop="unit">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="dataForm.unit"
|
v-model="dataForm.unit"
|
||||||
filterable
|
filterable
|
||||||
@ -57,6 +57,7 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="单日消耗量" prop="dailyUse">
|
<el-form-item label="单日消耗量" prop="dailyUse">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
|
:min="0"
|
||||||
v-model="dataForm.dailyUse"
|
v-model="dataForm.dailyUse"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请输入单日消耗量" />
|
placeholder="请输入单日消耗量" />
|
||||||
@ -65,9 +66,10 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="允许留存时间" prop="allowTime">
|
<el-form-item label="允许留存时间" prop="allowTime">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
|
:min="0"
|
||||||
v-model="dataForm.allowTime"
|
v-model="dataForm.allowTime"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请输入允许留存时间" />
|
placeholder="请输入允许留存时间" /> (天)
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@ -130,13 +132,14 @@ export default {
|
|||||||
allowTime: 0,
|
allowTime: 0,
|
||||||
enabled: 1,
|
enabled: 1,
|
||||||
remark: '',
|
remark: '',
|
||||||
|
storageType:4
|
||||||
},
|
},
|
||||||
dataRule: {
|
dataRule: {
|
||||||
code: [
|
code: [
|
||||||
{ required: true, message: '库位编码不能为空', trigger: 'blur' },
|
{ required: true, message: '物品编码不能为空', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
name: [
|
name: [
|
||||||
{ required: true, message: '库位名称不能为空', trigger: 'blur' },
|
{ required: true, message: '物品名称不能为空', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
isorno: [
|
isorno: [
|
||||||
|
@ -57,19 +57,19 @@ import { publicFormatter } from '@/utils/dict';
|
|||||||
const tableProps = [
|
const tableProps = [
|
||||||
{
|
{
|
||||||
prop: 'name',
|
prop: 'name',
|
||||||
label: '名称',
|
label: '物品名称',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'code',
|
prop: 'code',
|
||||||
label: '编码',
|
label: '物品编码',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'spec',
|
prop: 'spec',
|
||||||
label: '规格',
|
label: '物品规格',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'unit',
|
prop: 'unit',
|
||||||
label: '单位',
|
label: '物品单位',
|
||||||
filter: publicFormatter('unit_dict')
|
filter: publicFormatter('unit_dict')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -121,8 +121,8 @@ export default {
|
|||||||
formConfig: [
|
formConfig: [
|
||||||
{
|
{
|
||||||
type: 'input',
|
type: 'input',
|
||||||
label: '名称',
|
label: '物品名称',
|
||||||
placeholder: '名称',
|
placeholder: '物品名称',
|
||||||
param: 'name',
|
param: 'name',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
<search-bar
|
<search-bar
|
||||||
:isFold="true"
|
|
||||||
:formConfigs="formConfig"
|
:formConfigs="formConfig"
|
||||||
ref="searchBarForm"
|
ref="searchBarForm"
|
||||||
@headBtnClick="buttonClick" />
|
@headBtnClick="buttonClick" />
|
||||||
@ -114,7 +113,7 @@ export default {
|
|||||||
tableData: [],
|
tableData: [],
|
||||||
tableProps,
|
tableProps,
|
||||||
tableBtn: [
|
tableBtn: [
|
||||||
this.$auth.hasPermi(`part-material:warehouse-realtime-location-his:query`)
|
this.$auth.hasPermi(`part-material:warehouse-location-his:query`)
|
||||||
? {
|
? {
|
||||||
type: 'info',
|
type: 'info',
|
||||||
btnName: '详情',
|
btnName: '详情',
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2023-08-01 13:52:10
|
* @Date: 2023-08-01 13:52:10
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2023-11-04 16:24:26
|
* @LastEditTime: 2023-11-20 15:12:43
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -68,7 +68,6 @@
|
|||||||
v-model="dataForm.goodsBatch"
|
v-model="dataForm.goodsBatch"
|
||||||
filterable
|
filterable
|
||||||
clearable
|
clearable
|
||||||
@change="setBatchInfo"
|
|
||||||
placeholder="请选择物品名称">
|
placeholder="请选择物品名称">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(item, index) in Batch"
|
v-for="(item, index) in Batch"
|
||||||
@ -79,13 +78,12 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="入库数量" prop="numDet">
|
<el-form-item :label="dataForm.id?'出库数量':'入库数量'" prop="numDet">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="dataForm.numDet"
|
v-model="dataForm.numDet"
|
||||||
clearable
|
clearable
|
||||||
:min="0"
|
:min="0"
|
||||||
:max="max?max:9999999"
|
placeholder="请输入数量" />
|
||||||
placeholder="请输入入库数量" />
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -130,7 +128,6 @@ export default {
|
|||||||
},
|
},
|
||||||
goodsArr: [],
|
goodsArr: [],
|
||||||
Batch: [],
|
Batch: [],
|
||||||
max: 0,
|
|
||||||
dataRule: {
|
dataRule: {
|
||||||
goodsId: [
|
goodsId: [
|
||||||
{ required: true, message: '物品名称不能为空', trigger: 'change' },
|
{ required: true, message: '物品名称不能为空', trigger: 'change' },
|
||||||
@ -143,7 +140,7 @@ export default {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
numDet: [
|
numDet: [
|
||||||
{ required: true, message: '入库数量不能为空', trigger: 'blur' },
|
{ required: true, message: '数量不能为空', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@ -172,13 +169,6 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
setBatchInfo(){
|
|
||||||
this.Batch.forEach((item) => {
|
|
||||||
if (item.goodsBatch === this.dataForm.goodsBatch) {
|
|
||||||
this.max = item.numDet
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
outWare(data) {
|
outWare(data) {
|
||||||
this.getArr();
|
this.getArr();
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
<el-option
|
<el-option
|
||||||
v-for="item in productArr"
|
v-for="item in productArr"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
|
:disabled="!item.enabled"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item" />
|
:value="item" />
|
||||||
</el-select>
|
</el-select>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2023-08-01 13:52:10
|
* @Date: 2023-08-01 13:52:10
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2023-11-03 14:56:25
|
* @LastEditTime: 2023-11-20 15:54:15
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -15,31 +15,31 @@
|
|||||||
label-width="100px">
|
label-width="100px">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="名称" prop="name">
|
<el-form-item label="物品名称" prop="name">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="dataForm.name"
|
v-model="dataForm.name"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请输入名称" />
|
placeholder="请输入物品名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="编码" prop="code">
|
<el-form-item label="物品编码" prop="code">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="dataForm.code"
|
v-model="dataForm.code"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请输入编码" />
|
placeholder="请输入物品编码" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="规格" prop="spec">
|
<el-form-item label="物品规格" prop="spec">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="dataForm.spec"
|
v-model="dataForm.spec"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请输入规格" />
|
placeholder="请输入物品规格" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="单位" prop="unit">
|
<el-form-item label="物品单位" prop="unit">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="dataForm.unit"
|
v-model="dataForm.unit"
|
||||||
filterable
|
filterable
|
||||||
@ -57,6 +57,7 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="单日消耗量" prop="dailyUse">
|
<el-form-item label="单日消耗量" prop="dailyUse">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
|
:min="0"
|
||||||
v-model="dataForm.dailyUse"
|
v-model="dataForm.dailyUse"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请输入单日消耗量" />
|
placeholder="请输入单日消耗量" />
|
||||||
@ -65,9 +66,10 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="允许留存时间" prop="allowTime">
|
<el-form-item label="允许留存时间" prop="allowTime">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
|
:min="0"
|
||||||
v-model="dataForm.allowTime"
|
v-model="dataForm.allowTime"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请输入允许留存时间" />
|
placeholder="请输入允许留存时间" /> (天)
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@ -130,13 +132,14 @@ export default {
|
|||||||
allowTime: 0,
|
allowTime: 0,
|
||||||
enabled: 1,
|
enabled: 1,
|
||||||
remark: '',
|
remark: '',
|
||||||
|
storageType:1
|
||||||
},
|
},
|
||||||
dataRule: {
|
dataRule: {
|
||||||
code: [
|
code: [
|
||||||
{ required: true, message: '库位编码不能为空', trigger: 'blur' },
|
{ required: true, message: '物品编码不能为空', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
name: [
|
name: [
|
||||||
{ required: true, message: '库位名称不能为空', trigger: 'blur' },
|
{ required: true, message: '物品名称不能为空', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
isorno: [
|
isorno: [
|
||||||
|
@ -57,19 +57,19 @@ import { publicFormatter } from '@/utils/dict';
|
|||||||
const tableProps = [
|
const tableProps = [
|
||||||
{
|
{
|
||||||
prop: 'name',
|
prop: 'name',
|
||||||
label: '名称',
|
label: '物品名称',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'code',
|
prop: 'code',
|
||||||
label: '编码',
|
label: '物品编码',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'spec',
|
prop: 'spec',
|
||||||
label: '规格',
|
label: '物品规格',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'unit',
|
prop: 'unit',
|
||||||
label: '单位',
|
label: '物品单位',
|
||||||
filter: publicFormatter('unit_dict')
|
filter: publicFormatter('unit_dict')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -121,8 +121,8 @@ export default {
|
|||||||
formConfig: [
|
formConfig: [
|
||||||
{
|
{
|
||||||
type: 'input',
|
type: 'input',
|
||||||
label: '名称',
|
label: '物品名称',
|
||||||
placeholder: '名称',
|
placeholder: '物品名称',
|
||||||
param: 'name',
|
param: 'name',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
<search-bar
|
<search-bar
|
||||||
:isFold="true"
|
|
||||||
:formConfigs="formConfig"
|
:formConfigs="formConfig"
|
||||||
ref="searchBarForm"
|
ref="searchBarForm"
|
||||||
@headBtnClick="buttonClick" />
|
@headBtnClick="buttonClick" />
|
||||||
@ -114,7 +113,7 @@ export default {
|
|||||||
tableData: [],
|
tableData: [],
|
||||||
tableProps,
|
tableProps,
|
||||||
tableBtn: [
|
tableBtn: [
|
||||||
this.$auth.hasPermi(`raw-material:warehouse-realtime-location-his:query`)
|
this.$auth.hasPermi(`raw-material:warehouse-location-his:query`)
|
||||||
? {
|
? {
|
||||||
type: 'info',
|
type: 'info',
|
||||||
btnName: '详情',
|
btnName: '详情',
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2023-08-01 13:52:10
|
* @Date: 2023-08-01 13:52:10
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2023-11-04 14:17:39
|
* @LastEditTime: 2023-11-20 15:12:13
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -68,7 +68,6 @@
|
|||||||
v-model="dataForm.goodsBatch"
|
v-model="dataForm.goodsBatch"
|
||||||
filterable
|
filterable
|
||||||
clearable
|
clearable
|
||||||
@change="setBatchInfo"
|
|
||||||
placeholder="请选择物品名称">
|
placeholder="请选择物品名称">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(item, index) in Batch"
|
v-for="(item, index) in Batch"
|
||||||
@ -79,13 +78,13 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="入库数量" prop="numDet">
|
<el-form-item :label="dataForm.id?'出库数量':'入库数量'" prop="numDet">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="dataForm.numDet"
|
v-model="dataForm.numDet"
|
||||||
clearable
|
clearable
|
||||||
:min="0"
|
:min="0"
|
||||||
:max="max?max:9999999"
|
placeholder="请输入数量" />
|
||||||
placeholder="请输入入库数量" />
|
<!-- :max="max?max:9999999" -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -130,7 +129,7 @@ export default {
|
|||||||
},
|
},
|
||||||
goodsArr: [],
|
goodsArr: [],
|
||||||
Batch: [],
|
Batch: [],
|
||||||
max: 0,
|
//max: 0,
|
||||||
dataRule: {
|
dataRule: {
|
||||||
goodsId: [
|
goodsId: [
|
||||||
{ required: true, message: '物品名称不能为空', trigger: 'change' },
|
{ required: true, message: '物品名称不能为空', trigger: 'change' },
|
||||||
@ -143,7 +142,7 @@ export default {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
numDet: [
|
numDet: [
|
||||||
{ required: true, message: '入库数量不能为空', trigger: 'blur' },
|
{ required: true, message: '数量不能为空', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@ -172,13 +171,13 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
setBatchInfo(){
|
// setBatchInfo(){
|
||||||
this.Batch.forEach((item) => {
|
// this.Batch.forEach((item) => {
|
||||||
if (item.goodsBatch === this.dataForm.goodsBatch) {
|
// if (item.goodsBatch === this.dataForm.goodsBatch) {
|
||||||
this.max = item.numDet
|
// this.max = item.numDet
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
},
|
// },
|
||||||
outWare(data) {
|
outWare(data) {
|
||||||
this.getArr();
|
this.getArr();
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
<el-option
|
<el-option
|
||||||
v-for="item in productArr"
|
v-for="item in productArr"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
|
:disabled="!item.enabled"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item" />
|
:value="item" />
|
||||||
</el-select>
|
</el-select>
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
@click.native="setWareInfo(item)"
|
@click.native="setWareInfo(item)"
|
||||||
:style="{
|
:style="{
|
||||||
background: item.id === wareInfo.warehouseId ? '#37D97F' : '',
|
background: item.id === wareInfo.warehouseId ? '#37D97F' : '',
|
||||||
color: item.id === wareInfo.warehouseId ? 'white' : ''
|
color: item.id === wareInfo.warehouseId ? 'white' : '',
|
||||||
}"
|
}"
|
||||||
class="ware-card">
|
class="ware-card">
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
@ -263,7 +263,7 @@ export default {
|
|||||||
this.dataListLoading = true;
|
this.dataListLoading = true;
|
||||||
this.urlOptions.getDataListURL(this.listQuery).then((response) => {
|
this.urlOptions.getDataListURL(this.listQuery).then((response) => {
|
||||||
this.tableData = response.data.list;
|
this.tableData = response.data.list;
|
||||||
this.total = response.data.total;
|
this.listQuery.total = response.data.total;
|
||||||
this.dataListLoading = false;
|
this.dataListLoading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user