Browse Source

fix:修改多次点击数据丢失问题

temp
zhaohy 4 months ago
parent
commit
4955c235cc
  1. 2
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/configureDeviceAlarms.vue
  2. 4
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editConfigureDeviceAlarm.vue
  3. 1
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/notificationManagement/linkPeople/index.vue
  4. 9
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/energyAlarmConfig.ts
  5. 9
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/equipmentAlarmConfig.ts
  6. 8
      hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/look.vue
  7. 87
      hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/status.vue
  8. 2
      hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/ts/config.ts

2
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/configureDeviceAlarms.vue

@ -215,7 +215,7 @@
pageNum: 1, pageNum: 1,
pageSize: 99, pageSize: 99,
}, },
placeholder: '请选择设备点位', placeholder: '请选择设备名称',
resultField: 'data.records', resultField: 'data.records',
labelField: 'deviceName', labelField: 'deviceName',
valueField: 'id', valueField: 'id',

4
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editConfigureDeviceAlarm.vue

@ -196,8 +196,8 @@
}); });
}; };
// //
const selectDevice = (value: string) => { const selectDevice = () => {
console.log(`selected ${value}`); getDevicePoint({ id: infoObject.value.deviceName });
}; };
// //
const getDevicePage = (value: any) => { const getDevicePage = (value: any) => {

1
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/notificationManagement/linkPeople/index.vue

@ -296,7 +296,6 @@
const expanded = dataList const expanded = dataList
.map((item: TreeProps['treeData'][number]) => { .map((item: TreeProps['treeData'][number]) => {
if (item.title.indexOf(value) > -1) { if (item.title.indexOf(value) > -1) {
console.log(item.title.indexOf(value));
return getParentKey(item.key, deptTreeData.value); return getParentKey(item.key, deptTreeData.value);
} }
return null; return null;

9
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/energyAlarmConfig.ts

@ -98,10 +98,11 @@ export const energyAlarmConfigs = (
name: 'energyAlarmEdit', name: 'energyAlarmEdit',
dynamicParams: ['uuid', 'appealType'], dynamicParams: ['uuid', 'appealType'],
handle: (data: any) => { handle: (data: any) => {
data.monitorFrequency = data.monitorFrequency.value; const obj = { ...data };
data.priority = data.priority.value; obj.monitorFrequency = data.monitorFrequency.value;
data.repetitions = data.repetitions.value; obj.priority = data.priority.value;
editeEnergyAlarm.value.toggle(data); obj.repetitions = data.repetitions.value;
editeEnergyAlarm.value.toggle(obj);
}, },
}, },
{ {

9
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/equipmentAlarmConfig.ts

@ -99,10 +99,11 @@ export const equipmentAlarmTableConfig = (
name: 'equipmentAlarmEdit', name: 'equipmentAlarmEdit',
dynamicParams: ['uuid', 'appealType'], dynamicParams: ['uuid', 'appealType'],
handle: (data: any) => { handle: (data: any) => {
data.priority = data.priority.value; const obj = { ...data };
data.repetitions = data.repetitions.value; obj.priority = data.priority.value;
data.monitorTimeUnit = data.monitorTimeUnit.value; obj.repetitions = data.repetitions.value;
editEquipmentAlarm.value.toggle(data); obj.monitorTimeUnit = data.monitorTimeUnit.value;
editEquipmentAlarm.value.toggle(obj);
}, },
}, },
{ {

8
hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/look.vue

@ -17,14 +17,14 @@
display: flex; display: flex;
position: relative; position: relative;
font-size: 16px; font-size: 16px;
border-bottom: 1px solid rgb(255, 118, 2); /* 设置底部边框为1像素实线,并指定颜色 */ border-bottom: 1px solid #2778ff; /* 设置底部边框为1像素实线,并指定颜色 */
"> ">
<div class="card"></div> <div class="card"></div>
<div style="left: 25px; position: absolute; height: 35px; line-height: 35px"> <div style="left: 25px; position: absolute; height: 35px; line-height: 35px">
告警编号20230310001 告警编号20230310001
</div> </div>
<div style="right: 20px; position: absolute; height: 35px; line-height: 35px"> <div style="right: 20px; position: absolute; height: 35px; line-height: 35px">
15点08分 2024-03-10 15:08:10
</div> </div>
</div> </div>
<!-- center --> <!-- center -->
@ -38,7 +38,7 @@
<a-descriptions-item label="状态">新告警</a-descriptions-item> <a-descriptions-item label="状态">新告警</a-descriptions-item>
<a-descriptions-item label="错误码">C003</a-descriptions-item> <a-descriptions-item label="错误码">C003</a-descriptions-item>
<a-descriptions-item label="告警描述" <a-descriptions-item label="告警描述"
><div style="color: #ff7602">用电量超标</div> 当日用电量超出预设值</a-descriptions-item ><div style="color: #2778ff">用电量超标</div> 当日用电量超出预设值</a-descriptions-item
> >
<a-descriptions-item label="设备信息"> 1栋10层低压柜 </a-descriptions-item> <a-descriptions-item label="设备信息"> 1栋10层低压柜 </a-descriptions-item>
<a-descriptions-item label="重复次数"> 0 </a-descriptions-item> <a-descriptions-item label="重复次数"> 0 </a-descriptions-item>
@ -233,7 +233,7 @@
top: 0px; top: 0px;
width: 5px; width: 5px;
height: 35px; height: 35px;
background-color: rgb(254, 118, 2); background-color: #2778ff;
} }
:deep(.ant-descriptions-item-label) { :deep(.ant-descriptions-item-label) {
width: 25%; width: 25%;

87
hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/status.vue

@ -1,7 +1,7 @@
<template> <template>
<ns-drawer <ns-drawer
v-model:visible="visible" v-model:visible="visible"
width="520" width="550"
:title="' '" :title="' '"
:footer-style="{ textAlign: 'right' }" :footer-style="{ textAlign: 'right' }"
:ok="btnClick" :ok="btnClick"
@ -9,53 +9,34 @@
placement="right" placement="right"
@close="handleClose"> @close="handleClose">
<a-tabs> <a-tabs>
<a-tab-pane key="1" tab="更新状态">Content of Tab Pane 1</a-tab-pane> <a-tab-pane key="1" tab="更新状态">
<a-tab-pane key="2" tab="状态流程"> <div style="width: 100%; padding: 24px">
<!-- <a-steps direction="vertical" :current="4"> <a-form ref="formRef" :model="infoObject" :rules="rules">
<template v-for="index in 4"> <a-form-item ref="status" label="当前状态" name="status">
<a-step> <a-select
<template #icon> v-model:value="infoObject.status"
<img src="../../../../src/icon/status-off.svg" /> show-search
</template> placeholder="请选择设备点位"
<template #description> style="width: 85%"
<div :options="statusOptions"
style=" :filter-option="filterDevicePoint" />
width: 400px; </a-form-item>
min-height: 40px; <a-form-item label="备注" name="desc">
background-color: #f8fafc; <a-textarea
margin-left: 20px; v-model:value="infoObject.desc"
border-radius: 4px; /* 设置圆角半径 */ placeholder="请输入异常描述"
padding: 12px; style="width: 85%"
"> :autoSize="{ minRows: 4, maxRows: 4 }" />
<div style="width: 100%; height: 40px; display: flex; position: relative"> </a-form-item>
<a-tag style="width: 60px; height: 20px; text-align: center" color="#04d919" </a-form>
>已完成</a-tag
>
<div
style="
position: absolute;
left: 30%;
top: -2px;
transform: translateX(-50%);
color: #3a3a3a;
"
>李四</div
>
<div style="position: absolute; right: 10px; top: -2px; color: #ff7602"
>2024-03-11 11:30:06</div
>
</div> </div>
<div style="width: 100%; color: #3a3a3a"> 工单已完成并通过验收 </div> </a-tab-pane>
</div> <a-tab-pane key="2" tab="状态流程">
</template>
</a-step>
</template>
</a-steps> -->
<NsSteps v-bind="config" /> <NsSteps v-bind="config" />
</a-tab-pane> </a-tab-pane>
</a-tabs> </a-tabs>
<template #footer> <template #footer>
<a-button style="margin-right: 8px" type="primary" @click="createOrder">创建工单</a-button> <!-- <a-button style="margin-right: 8px" type="primary" @click="createOrder">创建工单</a-button> -->
<a-button type="primary" @click="btnClick">确定</a-button> <a-button type="primary" @click="btnClick">确定</a-button>
</template> </template>
</ns-drawer> </ns-drawer>
@ -72,6 +53,14 @@
setup() { setup() {
const visible = ref(false); const visible = ref(false);
const infoObject = ref({});
const statusOptions = ref([
{ value: '0', label: '待处理' },
{ value: '1', label: '处理中' },
{ value: '2', label: '已完成' },
{ value: '3', label: '超时' },
{ value: '4', label: '已关闭' },
]);
const logList = ref([ const logList = ref([
{ name: '李四', status: '2' }, { name: '李四', status: '2' },
{ name: '王五', status: '4' }, { name: '王五', status: '4' },
@ -91,6 +80,8 @@
}; };
const toggle = (data) => { const toggle = (data) => {
console.log(data, 'data'); console.log(data, 'data');
infoObject.value = logList.value[0];
console.log(infoObject.value, 'infoObject.value');
visible.value = true; visible.value = true;
}; };
const createOrder = () => { const createOrder = () => {
@ -120,6 +111,8 @@
}); });
}; };
return { return {
infoObject,
statusOptions,
btnClick, btnClick,
createOrder, createOrder,
visible, visible,
@ -131,4 +124,10 @@
}, },
}); });
</script> </script>
<style scoped lang="less"></style> <style scoped lang="less">
:deep(.ant-form-item-label) {
z-index: 20;
text-align: right;
width: 17%;
}
</style>

2
hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/ts/config.ts

@ -145,7 +145,7 @@ export const notificationtableConfig = (look: any, status: any) => {
fieldMap: ['manufactureBeginDate', 'manufactureEndDate'], fieldMap: ['manufactureBeginDate', 'manufactureEndDate'],
componentProps: { componentProps: {
valueFormat: 'YYYY-MM-DD', valueFormat: 'YYYY-MM-DD',
placeholder: ['设备生产开始日期', '设备生产结束日期'], placeholder: ['开始日期', '结束日期'],
}, },
}, },
], ],

Loading…
Cancel
Save