From f4d01d65d0fca3b8aacdd89f3efe6d027e445a3f Mon Sep 17 00:00:00 2001
From: zhaohy <1695786511@qq.com>
Date: Mon, 22 Jul 2024 15:25:47 +0800
Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E6=94=B9=E8=AE=BE=E5=A4=87?=
=?UTF-8?q?=E5=91=8A=E8=AD=A6=20=E9=85=8D=E7=BD=AE=E5=AD=97=E6=AE=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/api/alarmManagement/equipmentAlarm.ts | 1 +
hx-ai-intelligent/src/components/ns-steps.vue | 8 +--
hx-ai-intelligent/src/icon/state-1.svg | 6 +++
hx-ai-intelligent/src/icon/state-2.svg | 6 +++
hx-ai-intelligent/src/icon/state-3.svg | 6 +++
hx-ai-intelligent/src/icon/state-4.svg | 6 +++
hx-ai-intelligent/src/icon/state-5.svg | 6 +++
hx-ai-intelligent/src/icon/status-1.svg | 6 ---
hx-ai-intelligent/src/icon/status-2.svg | 6 ---
hx-ai-intelligent/src/icon/status-3.svg | 6 ---
hx-ai-intelligent/src/icon/status-4.svg | 6 ---
hx-ai-intelligent/src/icon/status-5.svg | 6 ---
.../view/alarmManagement/equipmentAlarm/status.vue | 60 ++++++++++++++--------
.../alarmManagement/equipmentAlarm/ts/config.ts | 1 +
14 files changed, 74 insertions(+), 56 deletions(-)
create mode 100644 hx-ai-intelligent/src/icon/state-1.svg
create mode 100644 hx-ai-intelligent/src/icon/state-2.svg
create mode 100644 hx-ai-intelligent/src/icon/state-3.svg
create mode 100644 hx-ai-intelligent/src/icon/state-4.svg
create mode 100644 hx-ai-intelligent/src/icon/state-5.svg
delete mode 100644 hx-ai-intelligent/src/icon/status-1.svg
delete mode 100644 hx-ai-intelligent/src/icon/status-2.svg
delete mode 100644 hx-ai-intelligent/src/icon/status-3.svg
delete mode 100644 hx-ai-intelligent/src/icon/status-4.svg
delete mode 100644 hx-ai-intelligent/src/icon/status-5.svg
diff --git a/hx-ai-intelligent/src/api/alarmManagement/equipmentAlarm.ts b/hx-ai-intelligent/src/api/alarmManagement/equipmentAlarm.ts
index b3f80fd..3be9a50 100644
--- a/hx-ai-intelligent/src/api/alarmManagement/equipmentAlarm.ts
+++ b/hx-ai-intelligent/src/api/alarmManagement/equipmentAlarm.ts
@@ -1,4 +1,5 @@
export enum equipmentAlarmApi {
getTableList = '/carbon-smart/api/AlarmEquipmentLog/selectAlarmEquipmentLog', //设备告警 列表
getCodeList = '/carbon-smart/api/AlarmEquipmentLog/selectErrorCodeList', //设备告警 列表
+ getSelectAlarmEquipmentLogStatusProcess = '/carbon-smart/api/AlarmEquipmentLogStatusProcess/selectAlarmEquipmentLogStatusProcess', //设备告警 状态 没有创建工单log接口
}
diff --git a/hx-ai-intelligent/src/components/ns-steps.vue b/hx-ai-intelligent/src/components/ns-steps.vue
index 9903135..d164d0c 100644
--- a/hx-ai-intelligent/src/components/ns-steps.vue
+++ b/hx-ai-intelligent/src/components/ns-steps.vue
@@ -8,12 +8,12 @@
-
{{ item.statusName }}
-
{{ item.name }}
-
{{ item.time }}
+
{{ item.stateName }}
+
{{ item.createName }}
+
{{ item.createTime }}
- {{ item.desc }}
diff --git a/hx-ai-intelligent/src/icon/state-1.svg b/hx-ai-intelligent/src/icon/state-1.svg
new file mode 100644
index 0000000..d05487a
--- /dev/null
+++ b/hx-ai-intelligent/src/icon/state-1.svg
@@ -0,0 +1,6 @@
+
+
\ No newline at end of file
diff --git a/hx-ai-intelligent/src/icon/state-2.svg b/hx-ai-intelligent/src/icon/state-2.svg
new file mode 100644
index 0000000..7ded55c
--- /dev/null
+++ b/hx-ai-intelligent/src/icon/state-2.svg
@@ -0,0 +1,6 @@
+
+
\ No newline at end of file
diff --git a/hx-ai-intelligent/src/icon/state-3.svg b/hx-ai-intelligent/src/icon/state-3.svg
new file mode 100644
index 0000000..5e24ea9
--- /dev/null
+++ b/hx-ai-intelligent/src/icon/state-3.svg
@@ -0,0 +1,6 @@
+
+
\ No newline at end of file
diff --git a/hx-ai-intelligent/src/icon/state-4.svg b/hx-ai-intelligent/src/icon/state-4.svg
new file mode 100644
index 0000000..3dcdc39
--- /dev/null
+++ b/hx-ai-intelligent/src/icon/state-4.svg
@@ -0,0 +1,6 @@
+
+
\ No newline at end of file
diff --git a/hx-ai-intelligent/src/icon/state-5.svg b/hx-ai-intelligent/src/icon/state-5.svg
new file mode 100644
index 0000000..08e2ae4
--- /dev/null
+++ b/hx-ai-intelligent/src/icon/state-5.svg
@@ -0,0 +1,6 @@
+
+
\ No newline at end of file
diff --git a/hx-ai-intelligent/src/icon/status-1.svg b/hx-ai-intelligent/src/icon/status-1.svg
deleted file mode 100644
index d05487a..0000000
--- a/hx-ai-intelligent/src/icon/status-1.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
\ No newline at end of file
diff --git a/hx-ai-intelligent/src/icon/status-2.svg b/hx-ai-intelligent/src/icon/status-2.svg
deleted file mode 100644
index 7ded55c..0000000
--- a/hx-ai-intelligent/src/icon/status-2.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
\ No newline at end of file
diff --git a/hx-ai-intelligent/src/icon/status-3.svg b/hx-ai-intelligent/src/icon/status-3.svg
deleted file mode 100644
index 5e24ea9..0000000
--- a/hx-ai-intelligent/src/icon/status-3.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
\ No newline at end of file
diff --git a/hx-ai-intelligent/src/icon/status-4.svg b/hx-ai-intelligent/src/icon/status-4.svg
deleted file mode 100644
index 3dcdc39..0000000
--- a/hx-ai-intelligent/src/icon/status-4.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
\ No newline at end of file
diff --git a/hx-ai-intelligent/src/icon/status-5.svg b/hx-ai-intelligent/src/icon/status-5.svg
deleted file mode 100644
index 08e2ae4..0000000
--- a/hx-ai-intelligent/src/icon/status-5.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
\ No newline at end of file
diff --git a/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/status.vue b/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/status.vue
index 5c4755a..53c6a15 100644
--- a/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/status.vue
+++ b/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/status.vue
@@ -12,22 +12,22 @@
-
+
(showEdit = !showEdit)"
+ @click="changeShowEdit"
style="margin-left: 20px"
- :name="showEdit ? 'bianji' : 'baocun'" />
+ :createName="showEdit ? 'bianji' : 'baocun'" />
-
+
{
+ equipmentAlarm.value = P;
visible.value = false;
};
const btnClick = () => {
NsMessage.success('操作成功');
- delete infoObject.value.time;
+ delete infoObject.value.createTime;
console.log(infoObject.value, equipmentAlarm.value, '操作');
console.log('btnClick');
};
- const toggle = (data) => {
- console.log(data, '数据');
- equipmentAlarm.value = data;
+ //修改状态
+ const changeShowEdit = () => {
+ if (equipmentAlarm.value.createWorkOrder === 1) {
+ showEdit.value = !showEdit.value;
+ }
+ };
+ const toggle = async (data) => {
+ equipmentAlarm.value = { ...data };
infoObject.value = { ...logList.value[0] };
+ await http
+ .post(equipmentAlarmApi.getSelectAlarmEquipmentLogStatusProcess, {
+ id: data.id,
+ })
+ .then((res) => {
+ console.log(res);
+ });
if (equipmentAlarm.value.createWorkOrder === 1) {
- statusOptions.value = [
+ stateOptions.value = [
{ value: 1, label: '待处理' },
{ value: 2, label: '处理中' },
{ value: 3, label: '已完成' },
@@ -98,7 +113,7 @@
{ value: 5, label: '已关闭' },
];
} else {
- statusOptions.value = [
+ stateOptions.value = [
{ value: 1, label: '待处理' },
{ value: 2, label: '处理中' },
{ value: 3, label: '已完成' },
@@ -120,17 +135,18 @@
5: '#a6a6a6',
};
logList.value.forEach((item) => {
- item.statusName = statusMap[item.status];
- item.color = colorMap[item.status];
- item.src = 'status-' + item.status;
+ item.stateName = statusMap[item.state];
+ item.color = colorMap[item.state];
+ item.src = 'state-' + item.state;
});
visible.value = true;
};
return {
infoObject,
+ changeShowEdit,
showEdit,
equipmentAlarm,
- statusOptions,
+ stateOptions,
btnClick,
visible,
logList,
diff --git a/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/ts/config.ts b/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/ts/config.ts
index 35cfd8a..27ced80 100644
--- a/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/ts/config.ts
+++ b/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/ts/config.ts
@@ -8,6 +8,7 @@ const tableKeyMap = [
{
title: '序号',
dataIndex: 'address',
+ width: 80,
customRender: (text: any) => {
return text.index + 1;
},