|
|
|
@ -227,6 +227,21 @@
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
<el-form-item label="触发时间间隔" prop="triggerTimeFrame">
|
|
|
|
|
<el-input v-model="form.triggerTimeFrame" placeholder="请输入时间(分)"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
<el-form-item label="告警联系人" prop="phoneNumbers">
|
|
|
|
|
<el-select v-model="form.phoneNumbers" placeholder="请选择告警联系人">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="(i, index) in phoneList"
|
|
|
|
|
:key="index"
|
|
|
|
|
:label="i.nickName +'('+ i.phonenumber+')'"
|
|
|
|
|
:value="i.phonenumber"
|
|
|
|
|
></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="设备" prop="ruleDeviceId">
|
|
|
|
@ -451,12 +466,14 @@ import {
|
|
|
|
|
getScenes, getEditedScenes, getSelectListBySceneId, getDeviceModeByDeviceId, getModeFunctionParametersByModeFunctionId
|
|
|
|
|
} from "@/api/business/alarmRule";
|
|
|
|
|
import {addDeviceModeFunction} from "@/api/business/deviceModeFunction";
|
|
|
|
|
import {listUser} from "../../../api/system/user";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: "AlarmRule",
|
|
|
|
|
dicts: ['hw_alarm_rule_type', 'hw_alarm_rule_link_flag', 'hw_alarm_rule_status', 'hw_alarm_rule_push_flag', 'hw_alarm_rule_trigger_condition', 'hw_alarm_rule_link_type'],
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
phoneList: [],
|
|
|
|
|
FUNCTION_MODE_ATTRIBUTE: "1", //设备模型属性
|
|
|
|
|
FUNCTION_MODE_SERVICE: "2",//设备模型服务
|
|
|
|
|
DATA_MORE_THAN_A_AND_LESS_THAN_B: 3,//大于A且小于B
|
|
|
|
@ -614,8 +631,18 @@ export default {
|
|
|
|
|
created() {
|
|
|
|
|
this.getList();
|
|
|
|
|
this.getScenes();
|
|
|
|
|
this.getPhoneList()
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
getPhoneList() {
|
|
|
|
|
listUser({
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 10000000
|
|
|
|
|
}).then(response => {
|
|
|
|
|
this.phoneList = response.rows.filter(v => !!v.phonenumber);
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
/** 查询报警规则列表 */
|
|
|
|
|
getList() {
|
|
|
|
|
this.loading = true;
|
|
|
|
@ -716,7 +743,6 @@ export default {
|
|
|
|
|
submitForm() {
|
|
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
|
|
|
|
|
if (this.form.linkFlag == this.LINK_FLAG_YES &&
|
|
|
|
|
(this.alarmRuleLinkData == null || this.alarmRuleLinkData.length <= 0)) {
|
|
|
|
|
this.$modal.msgWarning("请添加联动设备");
|
|
|
|
@ -927,7 +953,7 @@ export default {
|
|
|
|
|
// 报警规则联动设备表单重置
|
|
|
|
|
resetAlarmRuleLink() {
|
|
|
|
|
this.alarmRuleLinkForm = {
|
|
|
|
|
alarmRuleType:'1',
|
|
|
|
|
alarmRuleType: '1',
|
|
|
|
|
linkType: null,
|
|
|
|
|
linkDeviceId: null,
|
|
|
|
|
linkDeviceFunctionId: null,
|
|
|
|
|