fix(项目管理): 场景联动调整防抖默认事件和开启,设备触发类型筛选事件
This commit is contained in:
parent
f9efeb4859
commit
835ee2af5a
|
@ -1,12 +1,12 @@
|
|||
<template>
|
||||
<div>
|
||||
<condition-temp
|
||||
@EventDel="eventDel"
|
||||
:tempIndex="index"
|
||||
:info="item"
|
||||
v-for="(item, index) in conditionList"
|
||||
:key="index"
|
||||
:info="item"
|
||||
:propertyList="propertyList"
|
||||
:tempIndex="index"
|
||||
@EventDel="eventDel"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -49,7 +49,8 @@ export default {
|
|||
getProductCmdList(id) {
|
||||
this.propertyList = [];
|
||||
getDeviceFunList({
|
||||
deviceId: id
|
||||
deviceId: id,
|
||||
cmdKey:'event'
|
||||
}).then(res => {
|
||||
this.propertyList = this.uniqueFunc([...res.data], 'funKey');
|
||||
// this.propertyList= res.data;
|
||||
|
|
|
@ -87,7 +87,7 @@ export default {
|
|||
watch: {
|
||||
isAntiShake() {
|
||||
if(this.isAntiShake === false) {
|
||||
this.dataItem['intervalVal'] = 0;
|
||||
this.dataItem['intervalVal'] = 60;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -4,15 +4,15 @@
|
|||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['project:scene:add']"
|
||||
icon="el-icon-plus"
|
||||
plain
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click="handleAdd"
|
||||
>新增</el-button
|
||||
>
|
||||
<el-button @click="handleQuery" size="mini">刷新</el-button>
|
||||
<el-button size="mini" @click="handleQuery">刷新</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
@ -23,51 +23,51 @@
|
|||
:height="total > 0 ? '470px' : '510px'"
|
||||
>
|
||||
<el-table-column
|
||||
type="index"
|
||||
label="序号"
|
||||
align="center"
|
||||
:index="indexFormatter"
|
||||
align="center"
|
||||
label="序号"
|
||||
type="index"
|
||||
width="80px"
|
||||
></el-table-column>
|
||||
|
||||
<el-table-column
|
||||
label="场景名称"
|
||||
width="200px"
|
||||
align="left"
|
||||
label="场景名称"
|
||||
prop="sceneName"
|
||||
width="200px"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span class="lay-table-textarea" :title="scope.row.sceneName">
|
||||
<span :title="scope.row.sceneName" class="lay-table-textarea">
|
||||
{{ scope.row.sceneName }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="场景编码"
|
||||
align="left"
|
||||
width="200"
|
||||
label="场景编码"
|
||||
prop="sceneCode"
|
||||
width="200"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span class="lay-table-textarea" :title="scope.row.sceneCode">
|
||||
<span :title="scope.row.sceneCode" class="lay-table-textarea">
|
||||
{{ scope.row.sceneCode }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="场景模式"
|
||||
align="left"
|
||||
width="120"
|
||||
label="场景模式"
|
||||
prop="relation"
|
||||
width="120"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span class="lay-table-textarea" :title="scope.row.relation">
|
||||
<span :title="scope.row.relation" class="lay-table-textarea">
|
||||
{{ scope.row.relation }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="状态" align="center" prop="runStatus">
|
||||
<el-table-column align="center" label="状态" prop="runStatus">
|
||||
<template slot-scope="scope">
|
||||
<span class="lay-table-textarea">
|
||||
{{ scope.row.runStatus == "0" ? "启用" : "停止" }}
|
||||
|
@ -76,70 +76,70 @@
|
|||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
align="center"
|
||||
width="160px"
|
||||
label="创建时间"
|
||||
prop="createTime"
|
||||
width="160px"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span class="lay-table-textarea" :title="scope.row.createTime">
|
||||
<span :title="scope.row.createTime" class="lay-table-textarea">
|
||||
{{ scope.row.createTime }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="300"
|
||||
label="操作"
|
||||
prop="alarmTime"
|
||||
width="300"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
v-hasPermi="['project:scene:edit']"
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
v-hasPermi="['project:scene:edit']"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>编辑</el-button
|
||||
>
|
||||
|
||||
<el-button
|
||||
v-hasPermi="['project:scene:remove']"
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
v-hasPermi="['project:scene:remove']"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除</el-button
|
||||
>
|
||||
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
v-hasPermi="['project:scene:status']"
|
||||
:icon="
|
||||
scope.row.runStatus == '0'
|
||||
? 'el-icon-open'
|
||||
: 'el-icon-turn-off'
|
||||
"
|
||||
v-hasPermi="['project:scene:status']"
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleChangeStatus(scope.row)"
|
||||
>{{ scope.row.runStatus == "0" ? "停止" : "启用" }}</el-button
|
||||
>
|
||||
|
||||
<el-button
|
||||
v-hasPermi="['project:scene:run']"
|
||||
icon="el-icon-video-play"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-video-play"
|
||||
v-hasPermi="['project:scene:run']"
|
||||
@click="handleSingleRun(scope.row)"
|
||||
>执行</el-button
|
||||
>
|
||||
|
||||
<el-button
|
||||
icon="el-icon-takeaway-box"
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleLoggingView(scope.row)"
|
||||
icon="el-icon-takeaway-box"
|
||||
>指令历史</el-button
|
||||
>
|
||||
</template>
|
||||
|
@ -148,9 +148,9 @@
|
|||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="page.pageNum"
|
||||
:limit.sync="page.pageSize"
|
||||
:page.sync="page.pageNum"
|
||||
:total="total"
|
||||
@pagination="getTableList"
|
||||
/>
|
||||
</div>
|
||||
|
@ -163,12 +163,12 @@
|
|||
@close="open = false"
|
||||
>
|
||||
<el-form
|
||||
slot="dialog-center"
|
||||
ref="form"
|
||||
slot="dialog-center"
|
||||
:model="form"
|
||||
style="padding-right: 20px"
|
||||
:rules="rules"
|
||||
label-width="100px"
|
||||
style="padding-right: 20px"
|
||||
>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="12">
|
||||
|
@ -212,9 +212,9 @@
|
|||
</span>
|
||||
<div>
|
||||
<e-tag-card
|
||||
style="margin-top: 5px"
|
||||
v-for="(item, idx) in form.triggers"
|
||||
:key="item.guid || getGuid()"
|
||||
style="margin-top: 5px"
|
||||
type="info"
|
||||
>
|
||||
<e-scene-triggers
|
||||
|
@ -259,9 +259,9 @@
|
|||
</div>
|
||||
<div>
|
||||
<e-tag-card
|
||||
style="margin-top: 5px"
|
||||
v-for="(item, idx) in form.actions"
|
||||
:key="item.guid || getGuid()"
|
||||
style="margin-top: 5px"
|
||||
type="info"
|
||||
>
|
||||
<e-scene-action
|
||||
|
@ -282,8 +282,8 @@
|
|||
</e-tag-card>
|
||||
</div>
|
||||
<el-button
|
||||
type="text"
|
||||
icon="el-icon-plus"
|
||||
type="text"
|
||||
@click="handleAddAction"
|
||||
>新增动作</el-button
|
||||
>
|
||||
|
@ -291,18 +291,18 @@
|
|||
</el-row>
|
||||
</el-form>
|
||||
<div slot="dialog-footer" class="dialog-footer">
|
||||
<el-button type="primary" size="mini" @click="submitForm"
|
||||
<el-button size="mini" type="primary" @click="submitForm"
|
||||
>确 定</el-button
|
||||
>
|
||||
<el-button @click="cancel" size="mini">取 消</el-button>
|
||||
<el-button size="mini" @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</dialog-template>
|
||||
</div>
|
||||
</div>
|
||||
<e-logging
|
||||
v-if="isLoggingViewShow"
|
||||
:sourceId="loggingSourceId"
|
||||
:sceneInfo="loggingSourceObject"
|
||||
:sourceId="loggingSourceId"
|
||||
@handleLinkToHome="
|
||||
() => {
|
||||
isLoggingViewShow = false;
|
||||
|
@ -449,7 +449,7 @@ export default {
|
|||
orderBy: triggersPop ? triggersPop.orderBy + 1 : 1,
|
||||
method: "",
|
||||
conditions: [],
|
||||
intervalVal: "",
|
||||
intervalVal: "60",
|
||||
intervalUnit: "SECONDS",
|
||||
sceneTriggerDevices: [],
|
||||
execScript: "",
|
||||
|
|
Loading…
Reference in New Issue