|
@@ -17,6 +17,7 @@ import {
|
|
|
import type { DefaultOptionType, SelectValue } from 'ant-design-vue/es/select';
|
|
|
import type { Key } from 'ant-design-vue/es/table/interface';
|
|
|
import type {
|
|
|
+ AutomaticMatchingItem,
|
|
|
CustomizationData,
|
|
|
CustomParameters,
|
|
|
DeviceGateways,
|
|
@@ -25,7 +26,6 @@ import type {
|
|
|
EquipmentInformationForm,
|
|
|
GroupingList,
|
|
|
ListEquipmentParametersItem,
|
|
|
- ParamValueListAutomaticData,
|
|
|
PhysicalInterfaceList,
|
|
|
SerialNumberItem,
|
|
|
UseGuideStepItemExpose,
|
|
@@ -175,6 +175,7 @@ const protocolEquipmentColumns = [
|
|
|
dataIndex: 'index',
|
|
|
key: 'index',
|
|
|
ellipsis: true,
|
|
|
+ width: 60,
|
|
|
},
|
|
|
{
|
|
|
title: t('createDevice.gatewayParameterEncoding'),
|
|
@@ -224,7 +225,7 @@ const props = defineProps<UseGuideStepItemProps<EquipmentInformationForm>>();
|
|
|
const gatewayList = ref<GatewayList[]>([]);
|
|
|
const monitorAssociationGatewayList = ref<ListEquipmentParametersItem[]>([]);
|
|
|
const controlAssociationGatewayList = ref<ListEquipmentParametersItem[]>([]);
|
|
|
-const paramValueListAutomaticData = ref<ParamValueListAutomaticData[]>([]);
|
|
|
+const paramValueListAutomaticData = ref<AutomaticMatchingItem[]>([]);
|
|
|
|
|
|
const groupingList = ref<GroupingList[]>([
|
|
|
{
|
|
@@ -529,10 +530,13 @@ const serialNumberAdd = (value: SelectValue, option: DefaultOptionType, index: n
|
|
|
|
|
|
const obtainParamValueListAutomatic = (linkId: number) => {
|
|
|
handleRequest(async () => {
|
|
|
- paramValueListAutomaticData.value = await getParamValueListAutomatic({
|
|
|
+ const { autoVos } = await getParamValueListAutomatic({
|
|
|
linkId,
|
|
|
deviceTypeId: Number(props.form.deviceType),
|
|
|
+ deviceId,
|
|
|
});
|
|
|
+
|
|
|
+ paramValueListAutomaticData.value = autoVos;
|
|
|
if (paramValueListAutomaticData.value.length) {
|
|
|
open2.value = true;
|
|
|
}
|
|
@@ -737,6 +741,7 @@ const finish = async () => {
|
|
|
deviceParamName,
|
|
|
isProcessData,
|
|
|
unit,
|
|
|
+ gatewayId,
|
|
|
});
|
|
|
});
|
|
|
|
|
@@ -783,13 +788,13 @@ const addAutomaticMatching = () => {
|
|
|
monitorChooselistEquipment.value = [];
|
|
|
controlChooselistEquipment.value = [];
|
|
|
paramValueListAutomaticData.value.forEach((item) => {
|
|
|
- const { gatewayParamCode, gatewayParamName, id, unit } = item;
|
|
|
+ const { gatewayParamCode, gatewayParamName, platformParamCode, platformParamName, id, unit } = item;
|
|
|
if (item.readWriteTypeCode === 'read_only') {
|
|
|
monitorChooselistEquipment.value.push({
|
|
|
gatewayParamCode,
|
|
|
gatewayParamName,
|
|
|
- deviceParamCode: gatewayParamCode,
|
|
|
- deviceParamName: gatewayParamName,
|
|
|
+ deviceParamCode: platformParamCode,
|
|
|
+ deviceParamName: platformParamName,
|
|
|
id,
|
|
|
groupId: undefined,
|
|
|
groupSerialNum: 1,
|