|
@@ -29,6 +29,9 @@
|
|
<template v-if="item.prop === 'eliminate'">
|
|
<template v-if="item.prop === 'eliminate'">
|
|
{{parseItemValue(scope.row[item.prop])}}
|
|
{{parseItemValue(scope.row[item.prop])}}
|
|
</template>
|
|
</template>
|
|
|
|
+ <template v-if="item.prop === 'alarmManner'">
|
|
|
|
+ {{getAlarmMannerItemValue(scope.row[item.prop])}}
|
|
|
|
+ </template>
|
|
<template v-if="item.prop === 'operation'">
|
|
<template v-if="item.prop === 'operation'">
|
|
<el-tooltip
|
|
<el-tooltip
|
|
class="box-item"
|
|
class="box-item"
|
|
@@ -36,7 +39,7 @@
|
|
content="编辑"
|
|
content="编辑"
|
|
placement="top"
|
|
placement="top"
|
|
>
|
|
>
|
|
- <el-button type="primary" link @click="handleUpdate">
|
|
|
|
|
|
+ <el-button type="primary" link @click="handleUpdate(scope.row)">
|
|
<el-icon >
|
|
<el-icon >
|
|
<Edit />
|
|
<Edit />
|
|
</el-icon>
|
|
</el-icon>
|
|
@@ -114,20 +117,20 @@
|
|
<el-form ref="formRef" :model="dailyForm" :rules="rules" >
|
|
<el-form ref="formRef" :model="dailyForm" :rules="rules" >
|
|
<div class="disposition-title">警告设置</div>
|
|
<div class="disposition-title">警告设置</div>
|
|
<el-form-item label="触发条件:" prop="relationship" style="display: flex;align-items: center">
|
|
<el-form-item label="触发条件:" prop="relationship" style="display: flex;align-items: center">
|
|
- <el-radio-group v-model="dailyForm.relationship">
|
|
|
|
- <el-radio value="1" size="large">条件并且</el-radio>
|
|
|
|
- <el-radio value="2" size="large">条件或者</el-radio>
|
|
|
|
|
|
+ <el-radio-group v-model="itemData.alarmCondition" disabled>
|
|
|
|
+ <el-radio value="0" size="large">条件并且</el-radio>
|
|
|
|
+ <el-radio value="1" size="large">条件或者</el-radio>
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="触发周期:" prop="cycle" style="display: flex;align-items: center">
|
|
<el-form-item label="触发周期:" prop="cycle" style="display: flex;align-items: center">
|
|
<div class="flex-center">
|
|
<div class="flex-center">
|
|
- <el-input v-model="dailyForm.cycle" style="width: 150px" />
|
|
|
|
|
|
+ <el-input v-model="itemData.alarmTime" style="width: 150px" disabled/>
|
|
<div style="margin-left: 10px">分钟</div>
|
|
<div style="margin-left: 10px">分钟</div>
|
|
</div>
|
|
</div>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-button type="primary" plain style="margin-top: 10px">新增</el-button>
|
|
|
|
|
|
+ <!-- <el-button type="primary" plain style="margin-top: 10px">新增</el-button>-->
|
|
<div class="table-box" style="margin-top: 10px;height: 160px">
|
|
<div class="table-box" style="margin-top: 10px;height: 160px">
|
|
- <el-table stripe ref="tableRef" :border="true" :data="processTableData3" size="small" >
|
|
|
|
|
|
+ <el-table stripe ref="tableRef" :border="true" :data="itemData.alarmList" size="small" >
|
|
<template v-for="item in columns3" :key="item">
|
|
<template v-for="item in columns3" :key="item">
|
|
<el-table-column v-bind="item" :align="item.align ?? 'left'" :reserve-selection="item.type == 'selection'" :show-overflow-tooltip="true">
|
|
<el-table-column v-bind="item" :align="item.align ?? 'left'" :reserve-selection="item.type == 'selection'" :show-overflow-tooltip="true">
|
|
<template v-if="item.prop === 'operation'">
|
|
<template v-if="item.prop === 'operation'">
|
|
@@ -161,20 +164,20 @@
|
|
|
|
|
|
<div class="disposition-title">消警设置</div>
|
|
<div class="disposition-title">消警设置</div>
|
|
<el-form-item label="解除条件:" prop="relationship" style="display: flex;align-items: center">
|
|
<el-form-item label="解除条件:" prop="relationship" style="display: flex;align-items: center">
|
|
- <el-radio-group v-model="dailyForm.relationship">
|
|
|
|
- <el-radio value="1" size="large">条件并且</el-radio>
|
|
|
|
- <el-radio value="2" size="large">条件或者</el-radio>
|
|
|
|
|
|
+ <el-radio-group v-model="itemData.eliminateCondition" disabled>
|
|
|
|
+ <el-radio value="0" size="large">条件并且</el-radio>
|
|
|
|
+ <el-radio value="1" size="large">条件或者</el-radio>
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="解除周期:" prop="cycle" style="display: flex;align-items: center">
|
|
<el-form-item label="解除周期:" prop="cycle" style="display: flex;align-items: center">
|
|
<div class="flex-center">
|
|
<div class="flex-center">
|
|
- <el-input v-model="dailyForm.cycle" style="width: 150px" />
|
|
|
|
|
|
+ <el-input v-model="itemData.eliminateTime" disabled style="width: 150px" />
|
|
<div style="margin-left: 10px">分钟</div>
|
|
<div style="margin-left: 10px">分钟</div>
|
|
</div>
|
|
</div>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-button type="primary" plain style="margin-top: 10px">新增</el-button>
|
|
|
|
|
|
+<!-- <el-button type="primary" plain style="margin-top: 10px">新增</el-button>-->
|
|
<div class="table-box" style="margin-top: 10px;height: 160px">
|
|
<div class="table-box" style="margin-top: 10px;height: 160px">
|
|
- <el-table stripe ref="tableRef" :border="true" :data="processTableData4" size="small" >
|
|
|
|
|
|
+ <el-table stripe ref="tableRef" :border="true" :data="itemData.eliminateList" size="small" >
|
|
<template v-for="item in columns4" :key="item">
|
|
<template v-for="item in columns4" :key="item">
|
|
<el-table-column v-bind="item" :align="item.align ?? 'left'" :reserve-selection="item.type == 'selection'" :show-overflow-tooltip="true">
|
|
<el-table-column v-bind="item" :align="item.align ?? 'left'" :reserve-selection="item.type == 'selection'" :show-overflow-tooltip="true">
|
|
<template v-if="item.prop === 'operation'">
|
|
<template v-if="item.prop === 'operation'">
|
|
@@ -209,7 +212,7 @@
|
|
<template #footer>
|
|
<template #footer>
|
|
<div class="dialog-footer">
|
|
<div class="dialog-footer">
|
|
<el-button @click="cancel">取 消</el-button>
|
|
<el-button @click="cancel">取 消</el-button>
|
|
- <el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
|
|
|
+<!-- <el-button type="primary" @click="submitForm">确 定</el-button>-->
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
@@ -375,13 +378,16 @@ const getList= async ()=>{
|
|
dataList.forEach(item => {
|
|
dataList.forEach(item => {
|
|
if (item.tact_index === 1) {
|
|
if (item.tact_index === 1) {
|
|
dailyData.value.push(item);
|
|
dailyData.value.push(item);
|
|
|
|
+ getDailyData()
|
|
} else {
|
|
} else {
|
|
taskData.value.push(item);
|
|
taskData.value.push(item);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
- getDailyData()
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+
|
|
const getDailyData=()=>{
|
|
const getDailyData=()=>{
|
|
if(dailyData.value!=undefined&&dailyData.value.length>0){
|
|
if(dailyData.value!=undefined&&dailyData.value.length>0){
|
|
const data = dailyData.value[0]
|
|
const data = dailyData.value[0]
|
|
@@ -391,41 +397,82 @@ const getDailyData=()=>{
|
|
item.eliminate = data.tact_njd_off;
|
|
item.eliminate = data.tact_njd_off;
|
|
item.alarmTime = getAlarmTime(data.tact_njd_on)
|
|
item.alarmTime = getAlarmTime(data.tact_njd_on)
|
|
item.eliminateTime = getEliminateTime(data.tact_njd_off)
|
|
item.eliminateTime = getEliminateTime(data.tact_njd_off)
|
|
|
|
+ item.alarmManner = getAlarmManner(data.tact_njd_on)
|
|
|
|
+ item.alarmCondition =getAlarmCondition(data.tact_njd_on)
|
|
|
|
+ item.eliminateCondition =getEliminateCondition(data.tact_njd_off)
|
|
|
|
+ item.alarmList = parseItemList(data.tact_njd_on)
|
|
|
|
+ item.eliminateList = parseItemList(data.tact_njd_off)
|
|
|
|
+
|
|
} else if (item.name === '风速') {
|
|
} else if (item.name === '风速') {
|
|
item.alarm = data.tact_fs_on;
|
|
item.alarm = data.tact_fs_on;
|
|
item.eliminate = data.tact_fs_off;
|
|
item.eliminate = data.tact_fs_off;
|
|
item.alarmTime = getAlarmTime(data.tact_fs_on)
|
|
item.alarmTime = getAlarmTime(data.tact_fs_on)
|
|
item.eliminateTime = getEliminateTime(data.tact_fs_off)
|
|
item.eliminateTime = getEliminateTime(data.tact_fs_off)
|
|
|
|
+ item.alarmManner = getAlarmManner(data.tact_fs_on)
|
|
|
|
+ item.alarmCondition =getAlarmCondition(data.tact_fs_on)
|
|
|
|
+ item.eliminateCondition =getEliminateCondition(data.tact_fs_off)
|
|
|
|
+ item.alarmList = parseItemList(data.tact_fs_on)
|
|
|
|
+ item.eliminateList = parseItemList(data.tact_fs_off)
|
|
} else if (item.name === '大气电场') {
|
|
} else if (item.name === '大气电场') {
|
|
item.alarm = data.tact_dqdc_on;
|
|
item.alarm = data.tact_dqdc_on;
|
|
item.eliminate = data.tact_dqdc_off;
|
|
item.eliminate = data.tact_dqdc_off;
|
|
item.alarmTime = getAlarmTime(data.tact_dqdc_on)
|
|
item.alarmTime = getAlarmTime(data.tact_dqdc_on)
|
|
item.eliminateTime = getEliminateTime(data.tact_dqdc_off)
|
|
item.eliminateTime = getEliminateTime(data.tact_dqdc_off)
|
|
|
|
+ item.alarmManner = getAlarmManner(data.tact_dqdc_on)
|
|
|
|
+ item.alarmCondition =getAlarmCondition(data.tact_dqdc_on)
|
|
|
|
+ item.eliminateCondition =getEliminateCondition(data.tact_dqdc_off)
|
|
|
|
+ item.alarmList = parseItemList(data.tact_dqdc_on)
|
|
|
|
+ item.eliminateList = parseItemList(data.tact_dqdc_off)
|
|
} else if (item.name === '云量') {
|
|
} else if (item.name === '云量') {
|
|
item.alarm = data.tact_yl_on;
|
|
item.alarm = data.tact_yl_on;
|
|
item.eliminate = data.tact_yl_off;
|
|
item.eliminate = data.tact_yl_off;
|
|
item.alarmTime = getAlarmTime(data.tact_yl_on)
|
|
item.alarmTime = getAlarmTime(data.tact_yl_on)
|
|
item.eliminateTime = getEliminateTime(data.tact_yl_off)
|
|
item.eliminateTime = getEliminateTime(data.tact_yl_off)
|
|
|
|
+ item.alarmManner = getAlarmManner(data.tact_yl_on)
|
|
|
|
+ item.alarmCondition =getAlarmCondition(data.tact_yl_on)
|
|
|
|
+ item.eliminateCondition =getEliminateCondition(data.tact_yl_off)
|
|
|
|
+ item.alarmList = parseItemList(data.tact_yl_on)
|
|
|
|
+ item.eliminateList = parseItemList(data.tact_yl_off)
|
|
} else if (item.name === '云高') {
|
|
} else if (item.name === '云高') {
|
|
item.alarm = data.tact_yg_on;
|
|
item.alarm = data.tact_yg_on;
|
|
item.eliminate = data.tact_yg_off;
|
|
item.eliminate = data.tact_yg_off;
|
|
item.alarmTime = getAlarmTime(data.tact_yg_on)
|
|
item.alarmTime = getAlarmTime(data.tact_yg_on)
|
|
item.eliminateTime = getEliminateTime(data.tact_yg_off)
|
|
item.eliminateTime = getEliminateTime(data.tact_yg_off)
|
|
|
|
+ item.alarmManner = getAlarmManner(data.tact_yg_on)
|
|
|
|
+ item.alarmCondition =getAlarmCondition(data.tact_yg_on)
|
|
|
|
+ item.eliminateCondition =getEliminateCondition(data.tact_yg_off)
|
|
|
|
+ item.alarmList = parseItemList(data.tact_yg_on)
|
|
|
|
+ item.eliminateList = parseItemList(data.tact_yg_off)
|
|
} else if (item.name === '气温') {
|
|
} else if (item.name === '气温') {
|
|
item.alarm = data.tact_wd_on;
|
|
item.alarm = data.tact_wd_on;
|
|
item.eliminate = data.tact_wd_off;
|
|
item.eliminate = data.tact_wd_off;
|
|
item.alarmTime = getAlarmTime(data.tact_wd_on)
|
|
item.alarmTime = getAlarmTime(data.tact_wd_on)
|
|
item.eliminateTime = getEliminateTime(data.tact_wd_off)
|
|
item.eliminateTime = getEliminateTime(data.tact_wd_off)
|
|
|
|
+ item.alarmManner = getAlarmManner(data.tact_wd_on)
|
|
|
|
+ item.alarmCondition =getAlarmCondition(data.tact_wd_on)
|
|
|
|
+ item.eliminateCondition =getEliminateCondition(data.tact_wd_off)
|
|
|
|
+ item.alarmList = parseItemList(data.tact_wd_on)
|
|
|
|
+ item.eliminateList = parseItemList(data.tact_wd_off)
|
|
} else if (item.name === '湿度') {
|
|
} else if (item.name === '湿度') {
|
|
item.alarm = data.tact_sd_on;
|
|
item.alarm = data.tact_sd_on;
|
|
item.eliminate = data.tact_sd_off;
|
|
item.eliminate = data.tact_sd_off;
|
|
item.alarmTime = getAlarmTime(data.tact_sd_on)
|
|
item.alarmTime = getAlarmTime(data.tact_sd_on)
|
|
item.eliminateTime = getEliminateTime(data.tact_sd_off)
|
|
item.eliminateTime = getEliminateTime(data.tact_sd_off)
|
|
|
|
+ item.alarmManner = getAlarmManner(data.tact_sd_on)
|
|
|
|
+ item.alarmCondition =getAlarmCondition(data.tact_sd_on)
|
|
|
|
+ item.eliminateCondition =getEliminateCondition(data.tact_sd_off)
|
|
|
|
+ item.alarmList = parseItemList(data.tact_sd_on)
|
|
|
|
+ item.eliminateList = parseItemList(data.tact_sd_off)
|
|
} else if (item.name === '小时雨量') {
|
|
} else if (item.name === '小时雨量') {
|
|
item.alarm = data.tact_xsyl_on;
|
|
item.alarm = data.tact_xsyl_on;
|
|
item.eliminate = data.tact_xsyl_off;
|
|
item.eliminate = data.tact_xsyl_off;
|
|
item.alarmTime = getAlarmTime(data.tact_xsyl_on)
|
|
item.alarmTime = getAlarmTime(data.tact_xsyl_on)
|
|
item.eliminateTime = getEliminateTime(data.tact_xsyl_off)
|
|
item.eliminateTime = getEliminateTime(data.tact_xsyl_off)
|
|
|
|
+ item.alarmManner = getAlarmManner(data.tact_xsyl_on)
|
|
|
|
+ item.alarmCondition =getAlarmCondition(data.tact_xsyl_on)
|
|
|
|
+ item.eliminateCondition =getEliminateCondition(data.tact_xsyl_off)
|
|
|
|
+ item.alarmList = parseItemList(data.tact_xsyl_on)
|
|
|
|
+ item.eliminateList = parseItemList(data.tact_xsyl_off)
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
|
|
@@ -441,7 +488,11 @@ const tableDailyData =ref(
|
|
eliminate:'',
|
|
eliminate:'',
|
|
alarmTime:'',
|
|
alarmTime:'',
|
|
eliminateTime:'',
|
|
eliminateTime:'',
|
|
- alarmManner:''
|
|
|
|
|
|
+ alarmManner:'',
|
|
|
|
+ alarmCondition:'',
|
|
|
|
+ eliminateCondition:'',
|
|
|
|
+ alarmList:[],
|
|
|
|
+ eliminateList:[]
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name:'风速',
|
|
name:'风速',
|
|
@@ -449,7 +500,11 @@ const tableDailyData =ref(
|
|
eliminate:'',
|
|
eliminate:'',
|
|
alarmTime:'',
|
|
alarmTime:'',
|
|
eliminateTime:'',
|
|
eliminateTime:'',
|
|
- alarmManner:''
|
|
|
|
|
|
+ alarmManner:'',
|
|
|
|
+ alarmCondition:'',
|
|
|
|
+ eliminateCondition:'',
|
|
|
|
+ alarmList:[],
|
|
|
|
+ eliminateList:[]
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name:'大气电场',
|
|
name:'大气电场',
|
|
@@ -457,7 +512,11 @@ const tableDailyData =ref(
|
|
eliminate:'',
|
|
eliminate:'',
|
|
alarmTime:'',
|
|
alarmTime:'',
|
|
eliminateTime:'',
|
|
eliminateTime:'',
|
|
- alarmManner:''
|
|
|
|
|
|
+ alarmManner:'',
|
|
|
|
+ alarmCondition:'',
|
|
|
|
+ eliminateCondition:'',
|
|
|
|
+ alarmList:[],
|
|
|
|
+ eliminateList:[]
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name:'云量',
|
|
name:'云量',
|
|
@@ -465,7 +524,11 @@ const tableDailyData =ref(
|
|
eliminate:'',
|
|
eliminate:'',
|
|
alarmTime:'',
|
|
alarmTime:'',
|
|
eliminateTime:'',
|
|
eliminateTime:'',
|
|
- alarmManner:''
|
|
|
|
|
|
+ alarmManner:'',
|
|
|
|
+ alarmCondition:'',
|
|
|
|
+ eliminateCondition:'',
|
|
|
|
+ alarmList:[],
|
|
|
|
+ eliminateList:[]
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name:'云高',
|
|
name:'云高',
|
|
@@ -473,7 +536,11 @@ const tableDailyData =ref(
|
|
eliminate:'',
|
|
eliminate:'',
|
|
alarmTime:'',
|
|
alarmTime:'',
|
|
eliminateTime:'',
|
|
eliminateTime:'',
|
|
- alarmManner:''
|
|
|
|
|
|
+ alarmManner:'',
|
|
|
|
+ alarmCondition:'',
|
|
|
|
+ eliminateCondition:'',
|
|
|
|
+ alarmList:[],
|
|
|
|
+ eliminateList:[]
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name:'气温',
|
|
name:'气温',
|
|
@@ -481,7 +548,11 @@ const tableDailyData =ref(
|
|
eliminate:'',
|
|
eliminate:'',
|
|
alarmTime:'',
|
|
alarmTime:'',
|
|
eliminateTime:'',
|
|
eliminateTime:'',
|
|
- alarmManner:''
|
|
|
|
|
|
+ alarmManner:'',
|
|
|
|
+ alarmCondition:'',
|
|
|
|
+ eliminateCondition:'',
|
|
|
|
+ alarmList:[],
|
|
|
|
+ eliminateList:[]
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name:'湿度',
|
|
name:'湿度',
|
|
@@ -489,7 +560,11 @@ const tableDailyData =ref(
|
|
eliminate:'',
|
|
eliminate:'',
|
|
alarmTime:'',
|
|
alarmTime:'',
|
|
eliminateTime:'',
|
|
eliminateTime:'',
|
|
- alarmManner:''
|
|
|
|
|
|
+ alarmManner:'',
|
|
|
|
+ alarmCondition:'',
|
|
|
|
+ eliminateCondition:'',
|
|
|
|
+ alarmList:[],
|
|
|
|
+ eliminateList:[]
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name:'小时雨量',
|
|
name:'小时雨量',
|
|
@@ -497,7 +572,11 @@ const tableDailyData =ref(
|
|
eliminate:'',
|
|
eliminate:'',
|
|
alarmTime:'',
|
|
alarmTime:'',
|
|
eliminateTime:'',
|
|
eliminateTime:'',
|
|
- alarmManner:''
|
|
|
|
|
|
+ alarmManner:'',
|
|
|
|
+ alarmCondition:'',
|
|
|
|
+ eliminateCondition:'',
|
|
|
|
+ alarmList:[],
|
|
|
|
+ eliminateList:[]
|
|
}
|
|
}
|
|
]
|
|
]
|
|
)
|
|
)
|
|
@@ -506,7 +585,10 @@ const tableDailyData =ref(
|
|
|
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
getAllRgDataList()
|
|
getAllRgDataList()
|
|
- getList()
|
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ getList()
|
|
|
|
+ }, 1000);
|
|
|
|
+
|
|
})
|
|
})
|
|
|
|
|
|
const dailyData = ref([])
|
|
const dailyData = ref([])
|
|
@@ -565,6 +647,44 @@ const handleUpdateTask = async (row?: any) => {
|
|
dialogTask.title = "策略管理";
|
|
dialogTask.title = "策略管理";
|
|
dialogTask.isMode = false;
|
|
dialogTask.isMode = false;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+const getAlarmCondition = (itemValue) => {
|
|
|
|
+ if (itemValue === '1|1|0') {
|
|
|
|
+ const time = itemValue.split('|');
|
|
|
|
+ return time[0]
|
|
|
|
+ }else if (typeof itemValue === 'string') {
|
|
|
|
+ const alarm = itemValue.split(';');
|
|
|
|
+ const time = alarm[0].split('|');
|
|
|
|
+ return time[0]
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return '0';
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+const getEliminateCondition = (itemValue) => {
|
|
|
|
+ if (itemValue === '0|15') {
|
|
|
|
+ const time = itemValue.split('|');
|
|
|
|
+ return time[0]
|
|
|
|
+ }else if (typeof itemValue === 'string') {
|
|
|
|
+ const alarm = itemValue.split(';');
|
|
|
|
+ const time = alarm[0].split('|');
|
|
|
|
+ return time[0]
|
|
|
|
+ }
|
|
|
|
+ return '0';
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+const getAlarmManner = (itemValue)=>{
|
|
|
|
+ if (itemValue === '1|1|0') {
|
|
|
|
+ const time = itemValue.split('|');
|
|
|
|
+ return time[2]
|
|
|
|
+ }else if (typeof itemValue === 'string') {
|
|
|
|
+ const alarm = itemValue.split(';');
|
|
|
|
+ const time = alarm[0].split('|');
|
|
|
|
+ return time[2]
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return '';
|
|
|
|
+}
|
|
const getAlarmTime = (itemValue)=>{
|
|
const getAlarmTime = (itemValue)=>{
|
|
if (itemValue === '1|1|0') {
|
|
if (itemValue === '1|1|0') {
|
|
const time = itemValue.split('|');
|
|
const time = itemValue.split('|');
|
|
@@ -589,6 +709,30 @@ const getEliminateTime = (itemValue)=>{
|
|
return '';
|
|
return '';
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+const getAlarmMannerItemValue = (itemValue) => {
|
|
|
|
+ if(itemValue==='0'){
|
|
|
|
+ return '字幕提示'
|
|
|
|
+ }else if(itemValue==='1'){
|
|
|
|
+ return '声音提示'
|
|
|
|
+ }
|
|
|
|
+ return ''
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+const parseItemList = (itemValue) => {
|
|
|
|
+ if (itemValue === '1|1|0'||itemValue === '0|15') {
|
|
|
|
+ return [];
|
|
|
|
+ }
|
|
|
|
+ if (typeof itemValue === 'string') {
|
|
|
|
+ const alarm = itemValue.split(';');
|
|
|
|
+ const data = []
|
|
|
|
+ for (var i = 1; i < alarm.length; i++) {
|
|
|
|
+ data.push(getItemList(alarm[i]))
|
|
|
|
+ }
|
|
|
|
+ return data;
|
|
|
|
+ }
|
|
|
|
+ return [];
|
|
|
|
+
|
|
|
|
+}
|
|
|
|
|
|
const parseItemValue = (itemValue) => {
|
|
const parseItemValue = (itemValue) => {
|
|
if (itemValue === '1|1|0'||itemValue === '0|15') {
|
|
if (itemValue === '1|1|0'||itemValue === '0|15') {
|
|
@@ -606,6 +750,12 @@ const parseItemValue = (itemValue) => {
|
|
return '';
|
|
return '';
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+const getItemList=(itemValue)=>{
|
|
|
|
+ const [element, operator, value] = itemValue.split('|');
|
|
|
|
+ console.log("findDataName",findDataName(element))
|
|
|
|
+ return {element:findDataName(element),operator:operatorDataName(operator),valueName:value}
|
|
|
|
+}
|
|
|
|
+
|
|
const getItemValue=(itemValue)=>{
|
|
const getItemValue=(itemValue)=>{
|
|
const [element, operator, value] = itemValue.split('|');
|
|
const [element, operator, value] = itemValue.split('|');
|
|
return `${findDataName(element)} ${operatorDataName(operator)} ${value}`;
|
|
return `${findDataName(element)} ${operatorDataName(operator)} ${value}`;
|
|
@@ -654,10 +804,10 @@ const findDataName = (id) => {
|
|
}
|
|
}
|
|
};
|
|
};
|
|
|
|
|
|
-
|
|
|
|
|
|
+const itemData = ref({})
|
|
/** 修改按钮操作 */
|
|
/** 修改按钮操作 */
|
|
const handleUpdate = async (row?: any) => {
|
|
const handleUpdate = async (row?: any) => {
|
|
- reset();
|
|
|
|
|
|
+ itemData.value = row
|
|
dialog.visible = true;
|
|
dialog.visible = true;
|
|
dialog.title = "策略管理";
|
|
dialog.title = "策略管理";
|
|
dialog.isMode = false;
|
|
dialog.isMode = false;
|
|
@@ -704,7 +854,7 @@ const columns = reactive<ColumnProps[]>([
|
|
{ prop: "eliminate", label: "消警条件" },
|
|
{ prop: "eliminate", label: "消警条件" },
|
|
{ prop: "alarmTime", label: "告警时间" },
|
|
{ prop: "alarmTime", label: "告警时间" },
|
|
{ prop: "eliminateTime", label: "消警时间" },
|
|
{ prop: "eliminateTime", label: "消警时间" },
|
|
- { prop: "f", label: "告警方式" },
|
|
|
|
|
|
+ { prop: "alarmManner", label: "告警方式" },
|
|
{ prop: "operation", label: "操作", width:150,align: 'center' }
|
|
{ prop: "operation", label: "操作", width:150,align: 'center' }
|
|
]);
|
|
]);
|
|
|
|
|
|
@@ -735,10 +885,10 @@ const processTableData3 = ref([
|
|
|
|
|
|
// 表格配置项
|
|
// 表格配置项
|
|
const columns3 = reactive<ColumnProps[]>([
|
|
const columns3 = reactive<ColumnProps[]>([
|
|
- { prop: "a", label: "告警要素"},
|
|
|
|
- { prop: "b", label: "告警条件"},
|
|
|
|
- { prop: "c", label: "告警阈值" },
|
|
|
|
- { prop: "operation", label: "操作", width:100,align: 'center' }
|
|
|
|
|
|
+ { prop: "element", label: "消警要素"},
|
|
|
|
+ { prop: "operator", label: "消警条件"},
|
|
|
|
+ { prop: "valueName", label: "消警阈值" },
|
|
|
|
+ // { prop: "operation", label: "操作", width:100,align: 'center' }
|
|
]);
|
|
]);
|
|
|
|
|
|
const processTableData4 = ref([
|
|
const processTableData4 = ref([
|
|
@@ -747,10 +897,10 @@ const processTableData4 = ref([
|
|
|
|
|
|
// 表格配置项
|
|
// 表格配置项
|
|
const columns4 = reactive<ColumnProps[]>([
|
|
const columns4 = reactive<ColumnProps[]>([
|
|
- { prop: "a", label: "消警要素"},
|
|
|
|
- { prop: "b", label: "消警条件"},
|
|
|
|
- { prop: "c", label: "消警阈值" },
|
|
|
|
- { prop: "operation", label: "操作", width:100,align: 'center' }
|
|
|
|
|
|
+ { prop: "element", label: "消警要素"},
|
|
|
|
+ { prop: "operator", label: "消警条件"},
|
|
|
|
+ { prop: "valueName", label: "消警阈值" },
|
|
|
|
+ // { prop: "operation", label: "操作", width:100,align: 'center' }
|
|
]);
|
|
]);
|
|
</script>
|
|
</script>
|
|
|
|
|