diff --git a/src/components/base-dialog/addOrUpdate/index.vue b/src/components/base-dialog/addOrUpdate/index.vue index 3f94ccd..44d8ef4 100644 --- a/src/components/base-dialog/addOrUpdate/index.vue +++ b/src/components/base-dialog/addOrUpdate/index.vue @@ -122,6 +122,7 @@ export default { name: '名称', code: '编码', remark: '备注', + description: '描述', specifications: '规格' // add more... } @@ -140,6 +141,7 @@ export default { name: '名称', code: '编码', remark: '备注', + description: '描述', specifications: '规格' // add more... }, @@ -317,6 +319,12 @@ export default { } }) } + }).catch(err => { + this.$message({ + message: err, + type: 'error', + duration: 2000 + }) }) } }) diff --git a/src/utils/request.js b/src/utils/request.js index c8256a7..0bc40da 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -55,6 +55,8 @@ http.interceptors.response.use(response => { clearLoginInfo() router.replace({ name: 'login' }) return Promise.reject(response.data.msg) + } else if (response.data.code === 500) { + return Promise.reject(response.data.msg) } return response }, error => { diff --git a/src/views/modules/monitoring/equipment.vue b/src/views/modules/monitoring/equipment.vue index bf98291..17eef26 100644 --- a/src/views/modules/monitoring/equipment.vue +++ b/src/views/modules/monitoring/equipment.vue @@ -137,7 +137,7 @@ export default { this.$http({ url: this.$http.adornUrl('/monitoring/equipment'), method: 'delete', - data: this.$http.adornData(ids, false) + data: this.$http.adornData(ids, false, 'raw') }).then(({ data }) => { if (data && data.code === 0) { this.$message({ diff --git a/src/views/modules/monitoring/equipmentAlarmLog.vue b/src/views/modules/monitoring/equipmentAlarmLog.vue index fb35be8..7974da4 100644 --- a/src/views/modules/monitoring/equipmentAlarmLog.vue +++ b/src/views/modules/monitoring/equipmentAlarmLog.vue @@ -153,7 +153,7 @@ export default { this.$http({ url: this.$http.adornUrl('/monitoring/equipmentAlarmLog'), method: 'delete', - data: this.$http.adornData(ids, false) + data: this.$http.adornData(ids, false, 'raw') }).then(({ data }) => { if (data && data.code === 0) { this.$message({ diff --git a/src/views/modules/monitoring/equipmentFile.vue b/src/views/modules/monitoring/equipmentFile.vue index ece69f6..d1225b4 100644 --- a/src/views/modules/monitoring/equipmentFile.vue +++ b/src/views/modules/monitoring/equipmentFile.vue @@ -162,7 +162,7 @@ export default { this.$http({ url: this.$http.adornUrl('/monitoring/equipmentFile'), method: 'delete', - data: this.$http.adornData(ids, false) + data: this.$http.adornData(ids, false, 'raw') }).then(({ data }) => { if (data && data.code === 0) { this.$message({ diff --git a/src/views/modules/monitoring/equipmentGroup.vue b/src/views/modules/monitoring/equipmentGroup.vue index 8b167c5..b9d63ac 100644 --- a/src/views/modules/monitoring/equipmentGroup.vue +++ b/src/views/modules/monitoring/equipmentGroup.vue @@ -157,7 +157,7 @@ export default { this.$http({ url: this.$http.adornUrl('/monitoring/equipmentGroup'), method: 'delete', - data: this.$http.adornData(ids, false) + data: this.$http.adornData(ids, false, 'raw') }).then(({ data }) => { if (data && data.code === 0) { this.$message({ diff --git a/src/views/modules/monitoring/equipmentGroupAlarm.vue b/src/views/modules/monitoring/equipmentGroupAlarm.vue index a7d935b..694942a 100644 --- a/src/views/modules/monitoring/equipmentGroupAlarm.vue +++ b/src/views/modules/monitoring/equipmentGroupAlarm.vue @@ -175,7 +175,7 @@ export default { this.$http({ url: this.$http.adornUrl('/monitoring/equipmentGroupAlarm'), method: 'delete', - data: this.$http.adornData(ids, false) + data: this.$http.adornData(ids, false, 'raw') }).then(({ data }) => { if (data && data.code === 0) { this.$message({ diff --git a/src/views/modules/monitoring/equipmentPlc.vue b/src/views/modules/monitoring/equipmentPlc.vue index 7c278de..3890853 100644 --- a/src/views/modules/monitoring/equipmentPlc.vue +++ b/src/views/modules/monitoring/equipmentPlc.vue @@ -171,7 +171,7 @@ export default { this.$http({ url: this.$http.adornUrl('/monitoring/equipmentPlc'), method: 'delete', - data: this.$http.adornData(ids, false) + data: this.$http.adornData(ids, false, 'raw') }).then(({ data }) => { if (data && data.code === 0) { this.$message({ diff --git a/src/views/modules/monitoring/equipmentPlcConnect.vue b/src/views/modules/monitoring/equipmentPlcConnect.vue index ddb0e61..c3e0f8f 100644 --- a/src/views/modules/monitoring/equipmentPlcConnect.vue +++ b/src/views/modules/monitoring/equipmentPlcConnect.vue @@ -151,7 +151,7 @@ export default { this.$http({ url: this.$http.adornUrl('/monitoring/equipmentPlcConnect'), method: 'delete', - data: this.$http.adornData(ids, false) + data: this.$http.adornData(ids, false, 'raw') }).then(({ data }) => { if (data && data.code === 0) { this.$message({ diff --git a/src/views/modules/monitoring/equipmentPlcParam.vue b/src/views/modules/monitoring/equipmentPlcParam.vue index db87fca..2a17067 100644 --- a/src/views/modules/monitoring/equipmentPlcParam.vue +++ b/src/views/modules/monitoring/equipmentPlcParam.vue @@ -183,7 +183,7 @@ export default { this.$http({ url: this.$http.adornUrl('/monitoring/equipmentPlcParam'), method: 'delete', - data: this.$http.adornData(ids, false) + data: this.$http.adornData(ids, false, 'raw') }).then(({ data }) => { if (data && data.code === 0) { this.$message({ diff --git a/src/views/modules/monitoring/equipmentQuantity.vue b/src/views/modules/monitoring/equipmentQuantity.vue index 2bf77e6..4227eb1 100644 --- a/src/views/modules/monitoring/equipmentQuantity.vue +++ b/src/views/modules/monitoring/equipmentQuantity.vue @@ -165,7 +165,7 @@ export default { this.$http({ url: this.$http.adornUrl('/monitoring/equipmentQuantity'), method: 'delete', - data: this.$http.adornData(ids, false) + data: this.$http.adornData(ids, false, 'raw') }).then(({ data }) => { if (data && data.code === 0) { this.$message({ diff --git a/src/views/modules/monitoring/equipmentStatusLog.vue b/src/views/modules/monitoring/equipmentStatusLog.vue index e8ad7dd..3fd123b 100644 --- a/src/views/modules/monitoring/equipmentStatusLog.vue +++ b/src/views/modules/monitoring/equipmentStatusLog.vue @@ -159,7 +159,7 @@ export default { this.$http({ url: this.$http.adornUrl('/monitoring/equipmentStatusLog'), method: 'delete', - data: this.$http.adornData(ids, false) + data: this.$http.adornData(ids, false, 'raw') }).then(({ data }) => { if (data && data.code === 0) { this.$message({ diff --git a/src/views/modules/monitoring/equipmentType.vue b/src/views/modules/monitoring/equipmentType.vue index e44cd20..feb0af3 100644 --- a/src/views/modules/monitoring/equipmentType.vue +++ b/src/views/modules/monitoring/equipmentType.vue @@ -6,7 +6,7 @@ 查询 - 新增 + 新增 @@ -160,7 +160,7 @@ export default { this.$http({ url: this.$http.adornUrl('/monitoring/equipmentType'), method: 'delete', - data: this.$http.adornData(ids, false) + data: this.$http.adornData(ids, false, 'raw') }).then(({ data }) => { if (data && data.code === 0) { this.$message({ diff --git a/src/views/modules/monitoring/equipmentTypeFile.vue b/src/views/modules/monitoring/equipmentTypeFile.vue index 22ed94c..0ec1d81 100644 --- a/src/views/modules/monitoring/equipmentTypeFile.vue +++ b/src/views/modules/monitoring/equipmentTypeFile.vue @@ -160,7 +160,7 @@ export default { this.$http({ url: this.$http.adornUrl('/monitoring/equipmentTypeFile'), method: 'delete', - data: this.$http.adornData(ids, false) + data: this.$http.adornData(ids, false, 'raw') }).then(({ data }) => { if (data && data.code === 0) { this.$message({ diff --git a/src/views/modules/monitoring/equipmentattr.vue b/src/views/modules/monitoring/equipmentattr.vue index da029a5..dc913e9 100644 --- a/src/views/modules/monitoring/equipmentattr.vue +++ b/src/views/modules/monitoring/equipmentattr.vue @@ -154,7 +154,7 @@ export default { this.$http({ url: this.$http.adornUrl('/monitoring/equipmentAttr'), method: 'delete', - data: this.$http.adornData(ids, false) + data: this.$http.adornData(ids, false, 'raw') }).then(({ data }) => { if (data && data.code === 0) { this.$message({ diff --git a/src/views/modules/monitoring/factory.vue b/src/views/modules/monitoring/factory.vue index 5dd2446..2dc597d 100644 --- a/src/views/modules/monitoring/factory.vue +++ b/src/views/modules/monitoring/factory.vue @@ -160,7 +160,7 @@ export default { this.$http({ url: this.$http.adornUrl('/monitoring/factory'), method: 'delete', - data: this.$http.adornData(ids, false) + data: this.$http.adornData(ids, false, 'raw') }).then(({ data }) => { if (data && data.code === 0) { this.$message({ diff --git a/src/views/modules/monitoring/product.vue b/src/views/modules/monitoring/product.vue index ddcdd51..6e4213a 100644 --- a/src/views/modules/monitoring/product.vue +++ b/src/views/modules/monitoring/product.vue @@ -6,8 +6,9 @@ 查询 - 测试 - 新增 + + + 新增 - +