From d6d64dffaebd3dd6c4914ffa0597a50a70574bcf Mon Sep 17 00:00:00 2001
From: wws <18630710203@163.com>
Date: Fri, 13 Oct 2023 14:57:34 +0800
Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E7=AE=A1=E7=90=86-=E6=95=85?=
=?UTF-8?q?=E9=9A=9C=E7=B1=BB=E5=9E=8B=E7=BB=B4=E6=8A=A4V1.1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/device/faultType/index.vue | 73 ++++++++++++++++++----------
src/views/device/item/index.vue | 16 +++---
2 files changed, 58 insertions(+), 31 deletions(-)
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();
+ }
});
}
}