oyq28 před 2 roky
rodič
revize
da49ad1fe1

+ 12 - 2
imcs-bt-fe/imcs-bt-fe/imcs-ui/src/api/Productionresource.js

@@ -25,8 +25,10 @@ const apiList = {
     method: 'POST',
     url: `/authority/productionResource/saveEquGoods`
   },
-
-
+  equStatistics: {
+    method: 'POST',
+    url: `/authority/productionResource/equStatistics`
+  },
   delete: {
     method: 'DELETE',
     url: `/authority/productionresource`
@@ -97,6 +99,14 @@ export default {
     })
   },
 
+  equStatistics(data, custom = {}) {
+    return axiosApi({
+      ...apiList.equStatistics,
+      data,
+      custom
+    })
+  },
+
   update(data, custom = {}) {
     return axiosApi({
       ...apiList.update,

+ 1 - 9
imcs-bt-fe/imcs-bt-fe/imcs-ui/src/views/zuihou/company/Index.vue

@@ -7,15 +7,7 @@
               class="filter-item search-item"
               v-model="queryParams.model.comName"
             />
-          </span>
-
-      <span>
-              {{ $t("bt.searchForm.companyId") }}:
-            <el-input
-              class="filter-item search-item"
-              v-model="queryParams.model.id"
-            />
-          </span>
+        </span>
       <span>
           {{ $t("bt.searchForm.companyType") }}:
           <el-select v-model="queryParams.model.comType" placeholder="请选择">

+ 19 - 13
imcs-bt-fe/imcs-bt-fe/imcs-ui/src/views/zuihou/productionresource/Index.vue

@@ -82,11 +82,11 @@
         </el-col>
         <el-col :span="4" class="tongjiBg">
           <p><span class="statusSpan lixianStatus"></span>离线</p>
-          <p>{{ this.deviceCount.offLineCount }}</p>
+          <p>{{ this.deviceCount.offlineCount }}</p>
         </el-col>
         <el-col :span="4" class="tongjiBg">
-          <p><span class="statusSpan weijihuoStatus"></span>未激活</p>
-          <p>{{ this.deviceCount.unActiveCount }}</p>
+          <p><span class="statusSpan weijihuoStatus"></span>异常</p>
+          <p>{{ this.deviceCount.exceptCount }}</p>
         </el-col>
         <el-col :span="8" class="tongjiBg">
           <p style="text-align: left;"><a class="shuaxinBtn" href="javascript:;" @click="fetch">刷新</a></p>
@@ -163,7 +163,7 @@
                        prop="onlineStatus"
                        width="">
         <template slot-scope="scope">
-          <span>{{ scope.row.onlineStatus == "1" ? "在线" : (scope.row.onlineStatus == "0" ? "离线" : "未激活") }}</span>
+          <span>{{ scope.row.onlineStatus == "1" ? "在线" : (scope.row.onlineStatus == "0" ? "离线" : "异常") }}</span>
         </template>
       </el-table-column>
       <el-table-column :label="$t('productionResource.incomeToday')" :show-overflow-tooltip="true" align="center"
@@ -282,8 +282,8 @@ export default {
       deviceCount: {
         totalCount: 0,
         onLineCount: 0,
-        offLineCount: 0,
-        unActiveCount: 0,
+        offlineCount: 0,
+        exceptCount: 0,
       },
       options: regionData,
       placeList: [],
@@ -385,10 +385,6 @@ export default {
       this.mtrDialog.isVisible = true
       this.$refs.materialMgr.getBarrelList(row['id']);
 
-      console.log("测试转换")
-      console.log(parseFloat("999.99"))
-      console.log(parseFloat("999.00"))
-      console.log(parseFloat("999.90"))
 
     },
     //广告管理
@@ -549,17 +545,27 @@ export default {
 
       this.queryParams.current = params.current ? params.current : this.queryParams.current;
       this.queryParams.size = params.size ? params.size : this.queryParams.size;
-      if (this.queryParams.model.areaId) {
+      if (this.queryParams.model.areaId) {        
         this.queryParams.model.areaId = this.queryParams.model.areaId[2]
       }
       productionResourceApi.page(this.queryParams).then(response => {
         const res = response.data;
         if (res.isSuccess) {
           this.tableData = res.data;
-          this.deviceCount.totalCount = this.tableData.total
-          this.deviceCount.unActiveCount = this.tableData.total
+          this.deviceCount.totalCount = this.tableData.total          
         }
       }).finally(() => this.loading = false);
+
+      productionResourceApi.equStatistics({}).then(response => {
+        const res = response.data;
+        let that = this
+        if (res.isSuccess) {          
+          that.deviceCount.onLineCount = res.data.onLineCount
+          that.deviceCount.offlineCount = res.data.offlineCount   
+          that.deviceCount.exceptCount = res.data.exceptCount    
+        }
+      }).finally(() => this.loading = false);
+
     },
     sortChange(val) {
       this.queryParams.sort = val.prop;