Browse Source

perf(views): 打开"网关模块"对站号的注释

wangshun 3 weeks ago
parent
commit
bee6ee13b2

+ 8 - 8
src/views/gateway-list/GatewayList.vue

@@ -61,12 +61,12 @@ const gatewayColumns = [
 ];
 ];
 
 
 const agreementColumns = [
 const agreementColumns = [
-  // {
-  //   title: t('registerGateway.stationNumber'),
-  //   dataIndex: 'station',
-  //   key: 'station',
-  //   ellipsis: true,
-  // },
+  {
+    title: t('registerGateway.stationNumber'),
+    dataIndex: 'station',
+    key: 'station',
+    ellipsis: true,
+  },
   {
   {
     title: t('registerGateway.agreement'),
     title: t('registerGateway.agreement'),
     dataIndex: 'protocolName',
     dataIndex: 'protocolName',
@@ -428,11 +428,11 @@ onMounted(() => {
               </AFlex>
               </AFlex>
 
 
               <ATable :columns="agreementColumns" :data-source="item.protocols" :pagination="false">
               <ATable :columns="agreementColumns" :data-source="item.protocols" :pagination="false">
-                <!-- <template #bodyCell="{ column, record }">
+                <template #bodyCell="{ column, record }">
                   <template v-if="column.key === 'station'">
                   <template v-if="column.key === 'station'">
                     <AInputNumber v-if="gatewayEditor" v-model:value="record.station" :min="0" />
                     <AInputNumber v-if="gatewayEditor" v-model:value="record.station" :min="0" />
                   </template>
                   </template>
-                </template> -->
+                </template>
               </ATable>
               </ATable>
             </ACollapsePanel>
             </ACollapsePanel>
           </ACollapse>
           </ACollapse>

+ 14 - 14
src/views/register-gateway/BindProtocol.vue

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

+ 1 - 1
src/views/register-gateway/VerifyProtocol.vue

@@ -208,7 +208,7 @@ onMounted(() => {
     >
     >
       <ACollapsePanel v-for="item in verificationAgreement" :key="item.id">
       <ACollapsePanel v-for="item in verificationAgreement" :key="item.id">
         <template #header>
         <template #header>
-          <!-- <span class="header-text">{{ $t('registerGateway.station') }}{{ item.station }}</span> -->
+          <span class="header-text">{{ $t('registerGateway.station') }}{{ item.station }}</span>
           <span class="header-text1">{{ $t('registerGateway.communicationProtocol') }}:{{ item.protocolName }}</span>
           <span class="header-text1">{{ $t('registerGateway.communicationProtocol') }}:{{ item.protocolName }}</span>
         </template>
         </template>
         <template #extra>
         <template #extra>