|
@@ -18,7 +18,6 @@ const props = defineProps<Props>();
|
|
const emit = defineEmits(['deleteClick']);
|
|
const emit = defineEmits(['deleteClick']);
|
|
const dataSelectionRef = useTemplateRef('dataSelection');
|
|
const dataSelectionRef = useTemplateRef('dataSelection');
|
|
const formRef = ref<FormInstance>();
|
|
const formRef = ref<FormInstance>();
|
|
-const parametersName = ref<string>('');
|
|
|
|
const rules: Record<string, Rule[]> = {
|
|
const rules: Record<string, Rule[]> = {
|
|
subType: [{ required: true, message: t('common.cannotEmpty'), trigger: 'change' }],
|
|
subType: [{ required: true, message: t('common.cannotEmpty'), trigger: 'change' }],
|
|
alarmNotifyMethod: [{ required: true, message: t('common.cannotEmpty'), trigger: 'change' }],
|
|
alarmNotifyMethod: [{ required: true, message: t('common.cannotEmpty'), trigger: 'change' }],
|
|
@@ -39,13 +38,13 @@ const parameterSelection = () => {
|
|
};
|
|
};
|
|
|
|
|
|
const confirmClick = (value: DataSelectionItem) => {
|
|
const confirmClick = (value: DataSelectionItem) => {
|
|
- const { groupId, childGroupId, deviceId, parametersName: name, paramCode } = value;
|
|
|
|
|
|
+ const { groupId, childGroupId, deviceId, parametersName, paramCode } = value;
|
|
props.form.groupId = groupId;
|
|
props.form.groupId = groupId;
|
|
props.form.childGroupId = childGroupId;
|
|
props.form.childGroupId = childGroupId;
|
|
props.form.deviceId = deviceId;
|
|
props.form.deviceId = deviceId;
|
|
|
|
|
|
props.form.paramCode = paramCode;
|
|
props.form.paramCode = paramCode;
|
|
- parametersName.value = name;
|
|
|
|
|
|
+ props.form.paramName = parametersName;
|
|
|
|
|
|
dataSelectionRef.value?.hideView();
|
|
dataSelectionRef.value?.hideView();
|
|
};
|
|
};
|
|
@@ -67,16 +66,20 @@ defineExpose({
|
|
<SvgIcon @click="deleteExecutionConditions" class="icon-delete" name="close-circle" />
|
|
<SvgIcon @click="deleteExecutionConditions" class="icon-delete" name="close-circle" />
|
|
</template>
|
|
</template>
|
|
<AFlex class="conditions-bgc" wrap="wrap">
|
|
<AFlex class="conditions-bgc" wrap="wrap">
|
|
- <AFormItem label="执行动作" name="subType">
|
|
|
|
|
|
+ <AFormItem :label="t('algorithmManage.performAction')" name="subType">
|
|
<ASelect
|
|
<ASelect
|
|
class="select-input select-right"
|
|
class="select-input select-right"
|
|
v-model:value="form.subType"
|
|
v-model:value="form.subType"
|
|
:options="executionAction"
|
|
:options="executionAction"
|
|
:field-names="{ label: 'dictValue', value: 'dictEngValue' }"
|
|
:field-names="{ label: 'dictValue', value: 'dictEngValue' }"
|
|
- :placeholder="$t('common.plzSelect')"
|
|
|
|
|
|
+ :placeholder="t('common.plzSelect')"
|
|
/>
|
|
/>
|
|
</AFormItem>
|
|
</AFormItem>
|
|
- <AFormItem label="通知方式" name="alarmNotifyMethod" v-if="form.subType === '3'">
|
|
|
|
|
|
+ <AFormItem
|
|
|
|
+ :label="t('algorithmManage.notificationMethod')"
|
|
|
|
+ name="alarmNotifyMethod"
|
|
|
|
+ v-if="form.subType === '3'"
|
|
|
|
+ >
|
|
<ASelect
|
|
<ASelect
|
|
class="select-input select-right"
|
|
class="select-input select-right"
|
|
v-model:value="form.alarmNotifyMethod"
|
|
v-model:value="form.alarmNotifyMethod"
|
|
@@ -85,51 +88,60 @@ defineExpose({
|
|
:placeholder="$t('common.plzSelect')"
|
|
:placeholder="$t('common.plzSelect')"
|
|
/>
|
|
/>
|
|
</AFormItem>
|
|
</AFormItem>
|
|
- <AFormItem label="联系人" name="alarmContact" v-if="form.subType === '3'">
|
|
|
|
|
|
+ <AFormItem :label="t('algorithmManage.contactPerson')" name="alarmContact" v-if="form.subType === '3'">
|
|
<ASelect
|
|
<ASelect
|
|
class="select-input select-right"
|
|
class="select-input select-right"
|
|
v-model:value="form.alarmContact"
|
|
v-model:value="form.alarmContact"
|
|
:placeholder="$t('common.plzSelect')"
|
|
:placeholder="$t('common.plzSelect')"
|
|
>
|
|
>
|
|
- <ASelectOption :value="0">王某某</ASelectOption>
|
|
|
|
- <ASelectOption :value="1">汪某某</ASelectOption>
|
|
|
|
- <ASelectOption :value="2">何某某</ASelectOption>
|
|
|
|
- <ASelectOption :value="3">黄某某</ASelectOption>
|
|
|
|
|
|
+ <ASelectOption value="0">王某某</ASelectOption>
|
|
|
|
+ <ASelectOption value="1">汪某某</ASelectOption>
|
|
|
|
+ <ASelectOption value="2">何某某</ASelectOption>
|
|
|
|
+ <ASelectOption value="3">黄某某</ASelectOption>
|
|
</ASelect>
|
|
</ASelect>
|
|
</AFormItem>
|
|
</AFormItem>
|
|
<br />
|
|
<br />
|
|
- <AFormItem label="报警内容" name="alarmAlertContent" v-if="form.subType === '3'">
|
|
|
|
|
|
+ <AFormItem :label="t('algorithmManage.alarmContent')" name="alarmAlertContent" v-if="form.subType === '3'">
|
|
<AInput
|
|
<AInput
|
|
- placeholder="请输入"
|
|
|
|
|
|
+ :placeholder="t('common.pleaseEnter')"
|
|
style="width: 840px"
|
|
style="width: 840px"
|
|
v-model:value="form.alarmAlertContent"
|
|
v-model:value="form.alarmAlertContent"
|
|
show-count
|
|
show-count
|
|
:maxlength="32"
|
|
:maxlength="32"
|
|
/>
|
|
/>
|
|
</AFormItem>
|
|
</AFormItem>
|
|
- <AFormItem label="等待时间" name="alarmWaitTime" v-if="form.subType === '4'">
|
|
|
|
|
|
+ <AFormItem :label="t('algorithmManage.waitingtime')" name="alarmWaitTime" v-if="form.subType === '4'">
|
|
<ATimePicker
|
|
<ATimePicker
|
|
class="select-input select-right"
|
|
class="select-input select-right"
|
|
v-model:value="form.alarmWaitTime"
|
|
v-model:value="form.alarmWaitTime"
|
|
format="mm:ss"
|
|
format="mm:ss"
|
|
|
|
+ value-format="mm:ss"
|
|
:allow-clear="false"
|
|
:allow-clear="false"
|
|
/>
|
|
/>
|
|
</AFormItem>
|
|
</AFormItem>
|
|
- <AFormItem label="设备参数" name="paramCode" v-if="form.subType === '5'">
|
|
|
|
|
|
+ <AFormItem :label="t('algorithmManage.equipmentParameters')" name="paramCode" v-if="form.subType === '5'">
|
|
<div @click="parameterSelection">
|
|
<div @click="parameterSelection">
|
|
<AFlex justify="space-between" align="center" class="div-style">
|
|
<AFlex justify="space-between" align="center" class="div-style">
|
|
<div v-if="form.paramCode">
|
|
<div v-if="form.paramCode">
|
|
- {{ parametersName }}
|
|
|
|
|
|
+ {{ props.form.paramName }}
|
|
</div>
|
|
</div>
|
|
- <div class="div-style-text" v-else>请选择</div>
|
|
|
|
|
|
+ <div class="div-style-text" v-else>{{ $t('common.plzSelect') }}</div>
|
|
<div>
|
|
<div>
|
|
<SvgIcon class="icon-style" name="right" />
|
|
<SvgIcon class="icon-style" name="right" />
|
|
</div>
|
|
</div>
|
|
</AFlex>
|
|
</AFlex>
|
|
</div>
|
|
</div>
|
|
</AFormItem>
|
|
</AFormItem>
|
|
- <AFormItem label="调整值" name="alarmAdjustmentValue" v-if="form.subType === '5'">
|
|
|
|
- <AInput placeholder="请输入" class="select-input select-right" v-model:value="form.alarmAdjustmentValue" />
|
|
|
|
|
|
+ <AFormItem
|
|
|
|
+ :label="t('algorithmManage.adjustmentValue')"
|
|
|
|
+ name="alarmAdjustmentValue"
|
|
|
|
+ v-if="form.subType === '5'"
|
|
|
|
+ >
|
|
|
|
+ <AInput
|
|
|
|
+ :placeholder="t('common.pleaseEnter')"
|
|
|
|
+ class="select-input select-right"
|
|
|
|
+ v-model:value="form.alarmAdjustmentValue"
|
|
|
|
+ />
|
|
</AFormItem>
|
|
</AFormItem>
|
|
</AFlex>
|
|
</AFlex>
|
|
</ABadge>
|
|
</ABadge>
|
|
@@ -143,6 +155,7 @@ defineExpose({
|
|
childGroupId: form.childGroupId,
|
|
childGroupId: form.childGroupId,
|
|
deviceId: form.deviceId,
|
|
deviceId: form.deviceId,
|
|
paramCode: form.paramCode,
|
|
paramCode: form.paramCode,
|
|
|
|
+ paramName: form.paramName,
|
|
}"
|
|
}"
|
|
@confirmClick="confirmClick"
|
|
@confirmClick="confirmClick"
|
|
/>
|
|
/>
|