Commit 23ea46a4 authored by 王晓倩's avatar 王晓倩

设备信息管理新增修改添加所属管道校验

parent 30f5947b
...@@ -156,8 +156,6 @@ export default { ...@@ -156,8 +156,6 @@ export default {
type: DEVICE_TYPE.FLOWMETER, type: DEVICE_TYPE.FLOWMETER,
dialogVisible: false, dialogVisible: false,
fileList: [], fileList: [],
// 表单校验
rules: {},
map: null, map: null,
obj: null, obj: null,
gaoMap: null, gaoMap: null,
......
...@@ -353,6 +353,9 @@ ...@@ -353,6 +353,9 @@
form: {}, form: {},
// 表单校验 // 表单校验
rules: { rules: {
pipeId: [
{ required: true, message: "请选择所属管道", trigger: "blur" },
],
deviceType: [ deviceType: [
{ required: true, message: "请选择设备类型", trigger: "blur" }, { required: true, message: "请选择设备类型", trigger: "blur" },
], ],
......
...@@ -251,6 +251,9 @@ ...@@ -251,6 +251,9 @@
editForm: {}, editForm: {},
// 表单校验 // 表单校验
rules: { rules: {
pipeId: [
{ required: true, message: "请选择所属管道", trigger: "blur" },
],
deviceType: [ deviceType: [
{ required: true, message: "请选择设备类型", trigger: "blur" }, { required: true, message: "请选择设备类型", trigger: "blur" },
], ],
...@@ -291,7 +294,7 @@ ...@@ -291,7 +294,7 @@
created() { created() {
// 如果是跳转来的,则接受初始化参数 // 如果是跳转来的,则接受初始化参数
this.deviceId = this.$route.query.deviceId; this.deviceId = this.$route.query.deviceId;
this.getDicts("t_device_type").then(response => { this.getDicts("t_device_type").then(response => {
this.typeOptions = response.data; this.typeOptions = response.data;
}); });
...@@ -459,4 +462,4 @@ ...@@ -459,4 +462,4 @@
font-size: 15px; font-size: 15px;
font-weight: 900; font-weight: 900;
} }
</style> </style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment