|
@@ -105,12 +105,12 @@ const columns = [
|
|
|
ellipsis: true,
|
|
|
width: 160,
|
|
|
},
|
|
|
- // {
|
|
|
- // title: t('registerGateway.fromStationNumber'),
|
|
|
- // dataIndex: 'station',
|
|
|
- // key: 'station',
|
|
|
- // ellipsis: true,
|
|
|
- // },
|
|
|
+ {
|
|
|
+ title: t('registerGateway.fromStationNumber'),
|
|
|
+ dataIndex: 'station',
|
|
|
+ key: 'station',
|
|
|
+ ellipsis: true,
|
|
|
+ },
|
|
|
// {
|
|
|
// title: t('registerGateway.electricMeter'),
|
|
|
// dataIndex: 'name',
|
|
@@ -208,11 +208,11 @@ const bindingAgreement = () => {
|
|
|
return message.warning(t('registerGateway.pleaseCommunicationProtocol'));
|
|
|
}
|
|
|
|
|
|
- // const hasDuplicates =
|
|
|
- // new Set(agreementData.value.map((item) => item.station)).size !== agreementData.value.length;
|
|
|
- // if (hasDuplicates) {
|
|
|
- // return message.warning(t('registerGateway.repeatStation'));
|
|
|
- // }
|
|
|
+ const hasDuplicates =
|
|
|
+ new Set(agreementData.value.map((item) => item.station)).size !== agreementData.value.length;
|
|
|
+ if (hasDuplicates) {
|
|
|
+ return message.warning(t('registerGateway.repeatStation'));
|
|
|
+ }
|
|
|
|
|
|
handleRequest(async () => {
|
|
|
agreementData.value.forEach((item) => {
|
|
@@ -571,9 +571,9 @@ onMounted(() => {
|
|
|
<template v-if="column.key === 'protocolType'">
|
|
|
<AInput disabled v-model:value="record.protocolType" />
|
|
|
</template>
|
|
|
- <!-- <template v-else-if="column.key === 'station'">
|
|
|
+ <template v-else-if="column.key === 'station'">
|
|
|
<AInputNumber v-model:value="record.station" :min="1" />
|
|
|
- </template> -->
|
|
|
+ </template>
|
|
|
<!-- <template v-else-if="column.key === 'name'">
|
|
|
<AInput disabled v-model:value="record.name" />
|
|
|
</template> -->
|
|
@@ -612,7 +612,7 @@ onMounted(() => {
|
|
|
</ATable>
|
|
|
|
|
|
<AFlex justify="space-between">
|
|
|
- <AButton class="but-text icon-button" type="text" @click="addSlave">
|
|
|
+ <AButton class="icon-button but-text" type="text" @click="addSlave">
|
|
|
<SvgIcon name="plus" />
|
|
|
{{ $t('registerGateway.addStation') }}
|
|
|
</AButton>
|