fix:修改多次点击数据丢失问题
This commit is contained in:
@@ -215,7 +215,7 @@
|
||||
pageNum: 1,
|
||||
pageSize: 99,
|
||||
},
|
||||
placeholder: '请选择设备点位',
|
||||
placeholder: '请选择设备名称',
|
||||
resultField: 'data.records',
|
||||
labelField: 'deviceName',
|
||||
valueField: 'id',
|
||||
|
@@ -196,8 +196,8 @@
|
||||
});
|
||||
};
|
||||
//选择设备方法
|
||||
const selectDevice = (value: string) => {
|
||||
console.log(`selected ${value}`);
|
||||
const selectDevice = () => {
|
||||
getDevicePoint({ id: infoObject.value.deviceName });
|
||||
};
|
||||
//获取设备列表
|
||||
const getDevicePage = (value: any) => {
|
||||
|
@@ -296,7 +296,6 @@
|
||||
const expanded = dataList
|
||||
.map((item: TreeProps['treeData'][number]) => {
|
||||
if (item.title.indexOf(value) > -1) {
|
||||
console.log(item.title.indexOf(value));
|
||||
return getParentKey(item.key, deptTreeData.value);
|
||||
}
|
||||
return null;
|
||||
|
@@ -98,10 +98,11 @@ export const energyAlarmConfigs = (
|
||||
name: 'energyAlarmEdit',
|
||||
dynamicParams: ['uuid', 'appealType'],
|
||||
handle: (data: any) => {
|
||||
data.monitorFrequency = data.monitorFrequency.value;
|
||||
data.priority = data.priority.value;
|
||||
data.repetitions = data.repetitions.value;
|
||||
editeEnergyAlarm.value.toggle(data);
|
||||
const obj = { ...data };
|
||||
obj.monitorFrequency = data.monitorFrequency.value;
|
||||
obj.priority = data.priority.value;
|
||||
obj.repetitions = data.repetitions.value;
|
||||
editeEnergyAlarm.value.toggle(obj);
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@@ -99,10 +99,11 @@ export const equipmentAlarmTableConfig = (
|
||||
name: 'equipmentAlarmEdit',
|
||||
dynamicParams: ['uuid', 'appealType'],
|
||||
handle: (data: any) => {
|
||||
data.priority = data.priority.value;
|
||||
data.repetitions = data.repetitions.value;
|
||||
data.monitorTimeUnit = data.monitorTimeUnit.value;
|
||||
editEquipmentAlarm.value.toggle(data);
|
||||
const obj = { ...data };
|
||||
obj.priority = data.priority.value;
|
||||
obj.repetitions = data.repetitions.value;
|
||||
obj.monitorTimeUnit = data.monitorTimeUnit.value;
|
||||
editEquipmentAlarm.value.toggle(obj);
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@@ -17,14 +17,14 @@
|
||||
display: flex;
|
||||
position: relative;
|
||||
font-size: 16px;
|
||||
border-bottom: 1px solid rgb(255, 118, 2); /* 设置底部边框为1像素实线,并指定颜色 */
|
||||
border-bottom: 1px solid #2778ff; /* 设置底部边框为1像素实线,并指定颜色 */
|
||||
">
|
||||
<div class="card"></div>
|
||||
<div style="left: 25px; position: absolute; height: 35px; line-height: 35px">
|
||||
告警编号:20230310001
|
||||
</div>
|
||||
<div style="right: 20px; position: absolute; height: 35px; line-height: 35px">
|
||||
15点08分
|
||||
2024-03-10 15:08:10
|
||||
</div>
|
||||
</div>
|
||||
<!-- center -->
|
||||
@@ -38,7 +38,7 @@
|
||||
<a-descriptions-item label="状态">新告警</a-descriptions-item>
|
||||
<a-descriptions-item label="错误码">C003</a-descriptions-item>
|
||||
<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="重复次数"> 0 </a-descriptions-item>
|
||||
@@ -233,7 +233,7 @@
|
||||
top: 0px;
|
||||
width: 5px;
|
||||
height: 35px;
|
||||
background-color: rgb(254, 118, 2);
|
||||
background-color: #2778ff;
|
||||
}
|
||||
:deep(.ant-descriptions-item-label) {
|
||||
width: 25%;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<ns-drawer
|
||||
v-model:visible="visible"
|
||||
width="520"
|
||||
width="550"
|
||||
:title="' '"
|
||||
:footer-style="{ textAlign: 'right' }"
|
||||
:ok="btnClick"
|
||||
@@ -9,53 +9,34 @@
|
||||
placement="right"
|
||||
@close="handleClose">
|
||||
<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-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" />
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
<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>
|
||||
</template>
|
||||
</ns-drawer>
|
||||
@@ -72,6 +53,14 @@
|
||||
|
||||
setup() {
|
||||
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([
|
||||
{ name: '李四', status: '2' },
|
||||
{ name: '王五', status: '4' },
|
||||
@@ -91,6 +80,8 @@
|
||||
};
|
||||
const toggle = (data) => {
|
||||
console.log(data, 'data');
|
||||
infoObject.value = logList.value[0];
|
||||
console.log(infoObject.value, 'infoObject.value');
|
||||
visible.value = true;
|
||||
};
|
||||
const createOrder = () => {
|
||||
@@ -120,6 +111,8 @@
|
||||
});
|
||||
};
|
||||
return {
|
||||
infoObject,
|
||||
statusOptions,
|
||||
btnClick,
|
||||
createOrder,
|
||||
visible,
|
||||
@@ -131,4 +124,10 @@
|
||||
},
|
||||
});
|
||||
</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'],
|
||||
componentProps: {
|
||||
valueFormat: 'YYYY-MM-DD',
|
||||
placeholder: ['设备生产开始日期', '设备生产结束日期'],
|
||||
placeholder: ['开始日期', '结束日期'],
|
||||
},
|
||||
},
|
||||
],
|
||||
|
Reference in New Issue
Block a user