|
@@ -20,15 +20,14 @@
|
|
|
<div class="font20">场景定义</div>
|
|
|
<SceneItem v-if="showstatus && sourceData.length > 0" :sceneList="sceneList" :sourceData="sourceData" :sceneType="detail.sceneType" @addScenesDetail="addScenesDetail" @delScenesDetail="delScenesDetail" @editScenesDetail="editScenesDetail"></SceneItem>
|
|
|
</el-card>
|
|
|
- <el-card style=" margin-top: 15px;" v-if="detail.sceneType === 'timer'">
|
|
|
- <el-form-item label="定时触发">
|
|
|
+ <el-card shadow="nover" style=" margin-top: 15px;" v-if="detail.sceneType === 'timer'">
|
|
|
+ <el-form-item label="定时触发" style="margin-bottom: 0;">
|
|
|
<div style="display:flex">
|
|
|
<el-input v-model="timerData.timer" placeholder="请输入cron表达式" />
|
|
|
<el-dialog v-model="dialogVisible" title="选择Cron规则" width="60%">
|
|
|
<vue3cron @handlelisten="handlelisten" @close="cronclose"></vue3cron>
|
|
|
</el-dialog>
|
|
|
<el-button type="success" @click="showCron()" style="margin-left: 5px;">设置</el-button>
|
|
|
-
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
</el-card>
|
|
@@ -63,8 +62,12 @@ const sceneList = {
|
|
|
'parameter': '',
|
|
|
'operator': '',
|
|
|
'value': ''
|
|
|
-
|
|
|
- }]]
|
|
|
+ }]],
|
|
|
+ "enableStabilization": false,
|
|
|
+ "stabilization": {
|
|
|
+ "timeWindow": 1,
|
|
|
+ "threshold": 1
|
|
|
+ }
|
|
|
};
|
|
|
const originalSceneList = ref([{
|
|
|
id: 0
|
|
@@ -116,10 +119,13 @@ export default defineComponent({
|
|
|
'parameter': '',
|
|
|
'operator': '',
|
|
|
'value': ''
|
|
|
-
|
|
|
- }]]
|
|
|
+ }]],
|
|
|
+ "enableStabilization": false,
|
|
|
+ "stabilization": {
|
|
|
+ "timeWindow": 1,
|
|
|
+ "threshold": 1
|
|
|
+ }
|
|
|
}],
|
|
|
-
|
|
|
});
|
|
|
|
|
|
const handlelisten = (e: any) => {
|
|
@@ -163,6 +169,11 @@ export default defineComponent({
|
|
|
const scenes = res.map((scene: any) => {
|
|
|
const parsedBodyJson = JSON.parse(scene.bodyjson);
|
|
|
return {
|
|
|
+ "enableStabilization": false,
|
|
|
+ "stabilization": {
|
|
|
+ "timeWindow": 1,
|
|
|
+ "threshold": 1
|
|
|
+ },
|
|
|
...parsedBodyJson
|
|
|
};
|
|
|
});
|