diff --git a/src/views/device/faultType/index.vue b/src/views/device/faultType/index.vue
index 2b74690..47e7e0f 100644
--- a/src/views/device/faultType/index.vue
+++ b/src/views/device/faultType/index.vue
@@ -146,16 +146,16 @@
v-hasPermi="['device:faultType:remove']"
>删除
-
- 导出
-
+
+
+
+
+
+
+
+
+
+
@@ -163,23 +163,23 @@
-
-
-
-
+
+
+
+
-
-
+
+
{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}
-
-
+
+
{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}
@@ -385,15 +385,19 @@ export default {
if (valid) {
if (this.form.faultId != null) {
updateFaultType(this.form).then(response => {
- this.$modal.msgSuccess("修改成功");
- this.open = false;
- this.getList();
+ if (response.code != 500) {
+ this.$modal.msgSuccess("修改成功");
+ this.open = false;
+ this.getList();
+ }
});
} else {
addFaultType(this.form).then(response => {
- this.$modal.msgSuccess("新增成功");
- this.open = false;
- this.getList();
+ if (response.code != 500) {
+ this.$modal.msgSuccess("新增成功");
+ this.open = false;
+ this.getList();
+ }
});
}
}
@@ -402,7 +406,26 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const faultIds = row.faultId || this.ids;
- this.$modal.confirm('是否确认删除故障类型维护编号为"' + faultIds + '"的数据项?').then(function() {
+ var faultCodes = '';
+
+ // 处理信息
+ for (let i = 0; i < this.faultTypeList.length; i++) {
+ for (let j = 0; j < faultIds.length; j++) {
+ if (faultIds[j] == this.faultTypeList[i].faultId) {
+ faultCodes = faultCodes + this.faultTypeList[i].faultCode + ',';
+ }
+ }
+ }
+
+ if (faultCodes == '') {
+ for (let i = 0; i < this.faultTypeList.length; i++) {
+ if (faultIds == this.faultTypeList[i].faultId) {
+ faultCodes = this.faultTypeList[i].faultCode;
+ }
+ }
+ }
+
+ this.$modal.confirm('是否确认删除故障类型维护编号为"' + faultCodes + '"的数据项?').then(function() {
return delFaultType(faultIds);
}).then(() => {
this.getList();
diff --git a/src/views/device/item/index.vue b/src/views/device/item/index.vue
index f35ad54..b6be791 100644
--- a/src/views/device/item/index.vue
+++ b/src/views/device/item/index.vue
@@ -681,17 +681,21 @@ export default {
this.form.formStandard = this.formStandard;
this.form.equipmentCodeList = this.selectEquipmentList;
updateItem(this.form).then(response => {
- this.$modal.msgSuccess("修改成功");
- this.open = false;
- this.getList();
+ if (response.code != 500) {
+ this.$modal.msgSuccess("修改成功");
+ this.open = false;
+ this.getList();
+ }
});
} else {
this.form.formStandard = this.formStandard;
this.form.equipmentCodeList = this.selectEquipmentList;
addItem(this.form).then(response => {
- this.$modal.msgSuccess("新增成功");
- this.open = false;
- this.getList();
+ if (response.code != 500){
+ this.$modal.msgSuccess("新增成功");
+ this.open = false;
+ this.getList();
+ }
});
}
}