fix:修改多次点击数据丢失问题
This commit is contained in:
@@ -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',
|
||||||
|
@@ -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) => {
|
||||||
|
@@ -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;
|
||||||
|
@@ -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);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@@ -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);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@@ -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%;
|
||||||
|
@@ -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="更新状态">
|
||||||
|
<div style="width: 100%; padding: 24px">
|
||||||
|
<a-form ref="formRef" :model="infoObject" :rules="rules">
|
||||||
|
<a-form-item ref="status" label="当前状态" name="status">
|
||||||
|
<a-select
|
||||||
|
v-model:value="infoObject.status"
|
||||||
|
show-search
|
||||||
|
placeholder="请选择设备点位"
|
||||||
|
style="width: 85%"
|
||||||
|
:options="statusOptions"
|
||||||
|
:filter-option="filterDevicePoint" />
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item label="备注" name="desc">
|
||||||
|
<a-textarea
|
||||||
|
v-model:value="infoObject.desc"
|
||||||
|
placeholder="请输入异常描述"
|
||||||
|
style="width: 85%"
|
||||||
|
:autoSize="{ minRows: 4, maxRows: 4 }" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-form>
|
||||||
|
</div>
|
||||||
|
</a-tab-pane>
|
||||||
<a-tab-pane key="2" tab="状态流程">
|
<a-tab-pane key="2" tab="状态流程">
|
||||||
<!-- <a-steps direction="vertical" :current="4">
|
|
||||||
<template v-for="index in 4">
|
|
||||||
<a-step>
|
|
||||||
<template #icon>
|
|
||||||
<img src="../../../../src/icon/status-off.svg" />
|
|
||||||
</template>
|
|
||||||
<template #description>
|
|
||||||
<div
|
|
||||||
style="
|
|
||||||
width: 400px;
|
|
||||||
min-height: 40px;
|
|
||||||
background-color: #f8fafc;
|
|
||||||
margin-left: 20px;
|
|
||||||
border-radius: 4px; /* 设置圆角半径 */
|
|
||||||
padding: 12px;
|
|
||||||
">
|
|
||||||
<div style="width: 100%; height: 40px; display: flex; position: relative">
|
|
||||||
<a-tag style="width: 60px; height: 20px; text-align: center" color="#04d919"
|
|
||||||
>已完成</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 style="width: 100%; color: #3a3a3a"> 工单已完成并通过验收 </div>
|
|
||||||
</div>
|
|
||||||
</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>
|
||||||
|
@@ -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: ['开始日期', '结束日期'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
Reference in New Issue
Block a user