浏览代码

Merge remote-tracking branch 'origin/master'

chen.cheng 3 周之前
父节点
当前提交
0e672ccab8

+ 39 - 2
ems-ui-cloud/src/views/basecfg/device/index.vue

@@ -182,6 +182,12 @@
               <el-form-item label="设备名称" prop="deviceName">
                 <el-input v-model="form.deviceName" placeholder="请输入设备名称"/>
               </el-form-item>
+              <el-form-item label="设备型号" prop="deviceSpec">
+                <el-input v-model="form.deviceSpec" placeholder="请输入设备型号"/>
+              </el-form-item>
+              <el-form-item label="供应商" prop="deviceBrand">
+                <el-input v-model="form.deviceBrand" placeholder="请输入设备供应商"/>
+              </el-form-item>
               <el-form-item label="功能类型" prop="psCode" v-if="queryParams.deviceCategory === 'W'">
                 <el-select v-model="form.psCode" clearable>
                   <el-option v-for="item in devOptions" :label="item.psName" :value="item.psCode"
@@ -384,11 +390,20 @@
                 <div>
                   <p><span class="bold">设备名称:</span>{{ curRow.deviceName }}</p>
                   <p><span class="bold">设备代码:</span>{{ curRow.deviceCode }}</p>
-                  <p><span class="bold">设备分类:</span>{{ curRow.deviceCategoryName + getPsName(curRow.psName)}}</p>
+                  <p><span class="bold">设备分类:</span>{{ curRow.deviceCategoryName + getPsName(curRow.psName) }}</p>
+                  <p><span class="bold">设备型号:</span>{{ curRow.deviceSpec }}</p>
+                  <p><span class="bold">供应商:</span>{{ curRow.deviceBrand }}</p>
                   <p><span class="bold">归属设施:</span>{{ curRow.refFacsName }}</p>
                   <p><span class="bold">归属区域:</span>{{ buildRefAreaName(curRow) }}</p>
                   <p><span class="bold">安装位置:</span>{{ curRow.location === null ? '无' : curRow.location }}</p>
-                  <p><span class="bold">归属系统:</span>{{ curRow.subsystemName === null ? '无' : curRow.subsystemName}}</p>
+                  <p><span class="bold">归属系统:</span>{{ curRow.subsystemName === null ? '无' : curRow.subsystemName }}</p>
+                  <p>
+                    <span class="bold">设备状态:</span>
+                    <span :class="getDeviceStatusClass(curRow.deviceStatus)">
+                       {{ getDeviceStatus(curRow.deviceStatus) }}
+                    </span>
+                  </p>
+
                 </div>
                 <div class="footer">
                   <div class="footer">
@@ -1235,6 +1250,8 @@ export default {
         deviceCode: null,
         deviceName: null,
         deviceType: null,
+        deviceSpec: null,
+        deviceBrand: null,
         deviceStatus: null,
         deviceModel: null,
         refArea: null,
@@ -1327,6 +1344,12 @@ export default {
       this.activeTab = 'basic'
     },
 
+    getDeviceStatus(status) {
+      return status === 1 ? '在线' : '离线'
+    },
+    getDeviceStatusClass(status) {
+      return status === 1 ? 'status-online' : 'status-offline'
+    },
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset()
@@ -1646,4 +1669,18 @@ export default {
   margin-top: 10px;
 }
 
+.status-online {
+  color: #00FF00; /* 在线状态颜色 */
+  background-color: #DDFFDD;
+  padding: 2px 6px;
+  border-radius: 4px;
+}
+
+.status-offline {
+  color: #FF0000; /* 离线状态颜色 */
+  background-color: #FFDDDD;
+  padding: 2px 6px;
+  border-radius: 4px;
+}
+
 </style>

+ 2 - 0
ems-ui-cloud/src/views/devmgr/attr/index.vue

@@ -168,6 +168,8 @@
                   <p><span class="bold">设备名称:</span>{{ curRow.deviceName }}</p>
                   <p><span class="bold">设备代码:</span>{{ curRow.deviceCode }}</p>
                   <p><span class="bold">设备分类:</span>{{ curRow.deviceCategoryName + getPsName(curRow.psName) }}</p>
+                  <p><span class="bold">设备型号:</span>{{ curRow.deviceSpec }}</p>
+                  <p><span class="bold">供应商:</span>{{ curRow.deviceBrand }}</p>
                   <p><span class="bold">归属设施:</span>{{ curRow.refFacsName }}</p>
                   <p><span class="bold">归属区域:</span>{{ buildRefAreaName(curRow) }}</p>
                   <p><span class="bold">安装位置:</span>{{ curRow.location === null ? '无' : curRow.location }}</p>

+ 2 - 2
ems-ui-cloud/src/views/mgr/powergrid.vue

@@ -9,12 +9,12 @@
         </el-statistic>
         <el-statistic title="光伏总装机">
           <template slot="formatter">
-            {{ pvCfg.total }}kW
+            {{ pvCfg.total }}kWp
           </template>
         </el-statistic>
         <el-statistic :title="`光伏${item.name}装机`" v-for="(item,index) in pvCfg.areas" :key="`pv_${index}`">
           <template slot="formatter">
-            {{ numToStr(item.pv) }}kW
+            {{ numToStr(item.pv) }}kWp
           </template>
         </el-statistic>
       </div>

+ 2 - 2
ems-ui-cloud/src/views/mgr/powerstore.vue

@@ -7,9 +7,9 @@
             {{ pvCfg.total }}kW·h
           </template>
         </el-statistic>
-        <el-statistic :title="`光伏${item.name}装机`" v-for="(item,index) in pvCfg.areas" :key="`pv_${index}`">
+        <el-statistic :title="`储能${item.name}装机`" v-for="(item,index) in pvCfg.areas" :key="`store_${index}`">
           <template slot="formatter">
-            {{ numToStr(item.pv) }}kW·h
+            {{ numToStr(item.store) }}kW·h
           </template>
         </el-statistic>
       </div>