dedsudiyu 3 mesiacov pred
rodič
commit
a87e347012

+ 4 - 4
.env.production

@@ -24,10 +24,10 @@ VUE_APP_VERSION_DIFFERENCE_FIELD = 'kuangYeDaXue_nanHu'
 # ####################外网接口配置####################
 
 # 现场
-VUE_APP_BASE_API = 'labcontrol.nwafu.edu.cn/api'
+# VUE_APP_BASE_API = 'labcontrol.nwafu.edu.cn/api'
 
 # 1.8外网地址
-# VUE_APP_BASE_API = 'lab.zjznai.com/labTest'
+VUE_APP_BASE_API = 'lab.zjznai.com/labTest'
 
 # 43外网地址
 # VUE_APP_BASE_API = 'lab.zjznai.com/labapp'
@@ -38,10 +38,10 @@ VUE_APP_BASE_API = 'labcontrol.nwafu.edu.cn/api'
 # ####################内网接口配置####################
 
 # 现场
-VUE_APP_BASE_LOCAL_API = '172.16.0.65/api'
+# VUE_APP_BASE_LOCAL_API = '172.16.0.65/api'
 
 # 1.8内网地址
-# VUE_APP_BASE_LOCAL_API = '192.168.1.8/api'
+VUE_APP_BASE_LOCAL_API = '192.168.1.8/api'
 
 # 43内网地址
 # VUE_APP_BASE_LOCAL_API = '192.168.1.43/api'

+ 33 - 4
src/views/resourceDevice/pageComponent/instrumentRankingComponent.vue

@@ -57,10 +57,10 @@ import {
             tclData.push(response.data[i].appointFee)
             tbData.push(response.data[i].testSample)
           }
-          this.eChartsMethod(Data,xzData,tclData,tbData);
+          this.eChartsMethod(Data,xzData,tclData,tbData,response.data);
         })
       },
-      eChartsMethod(Data,xzData,tclData,tbData) {
+      eChartsMethod(Data,xzData,tclData,tbData,response) {
         let option = {
           //你的代码
           tooltip: {//提示框组件
@@ -69,6 +69,35 @@ import {
             textStyle: {
               fontSize: 18
             },
+            formatter: function (params) {
+              let result = params[0].name;
+              params.forEach(function (item) {
+                let colorData = item.seriesName == '使用机时'?'#35C1C2':(item.seriesName == '预约费用'?'#DF7805':(item.seriesName == '测试样品'?'#CE3A2A':''))
+                result += "<br/>";
+                // item 是每一个系列的数据
+                const seriesName = item.seriesName; // 系列名称
+                let value = '';
+                if(item.seriesName == '使用机时'){
+                  for(let i=0;i<response.length;i++){
+                    if(item.value == response[i].useTime){
+                      value = response[i].useTimeStr;
+                    }
+                  }
+                }else {
+                  value = item.value;
+                }
+                // const value = item.value; // 数据值
+                let a = '<span style="border-radius:50%;background:'
+                let b = ';display:inline-block;width:10px;height:10px;">'
+                let c = '</span><span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;" ></span>'
+                result += a+colorData+b+c;
+                // result += '<span style="border-radius:50%;background:+colorData+;display:inline-block;width:10px;height:10px;"></span><span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;" ></span>';
+                // result += `${seriesName}: ${value}<br/>`;
+                result += `${seriesName}: ${value}`;
+              });
+              return result;
+              // return `${params.name}:${chartData[params.dataIndex]}`;
+            }
           },
           legend: {
             itemWidth: 20,
@@ -79,7 +108,7 @@ import {
             textStyle: {
               fontSize: 18,
               color: '#fff',
-            }
+            },
           },
           grid: {
             top: '20%',
@@ -161,7 +190,7 @@ import {
           ],
           series: [
             {
-              name: '使用时',
+              name: '使用时',
               type: 'bar',
               barWidth: 14,
               data: xzData,

+ 1 - 1
src/views/resourceDevice/pageList/instrumentRankingComponentTable.vue

@@ -31,7 +31,7 @@
                   :data="dataList" @sort-change="sortChange">
           <el-table-column align="center" label="序号"  width="150"  type="index"/>
           <el-table-column align="center" label="设备名称" prop="deviceName" show-overflow-tooltip/>
-          <el-table-column align="center" sortable="custom" label="使用时" prop="useTime" width="400" show-overflow-tooltip/>
+          <el-table-column align="center" sortable="custom" label="使用时" prop="useTime" width="400" show-overflow-tooltip/>
           <el-table-column align="center" sortable="custom" label="预约费用" prop="appointFee" width="400" show-overflow-tooltip/>
           <el-table-column align="center" sortable="custom" label="测试样品" prop="testSample" width="400" show-overflow-tooltip/>
         </el-table>

+ 43 - 43
src/views/safetyOverview/pageComponent/subComponents.vue

@@ -115,9 +115,9 @@
               if(response.data.labStateSubs[i].useTotal > num){
                 num = response.data.labStateSubs[i].useTotal;
               }
-              if(response.data.labStateSubs[i].availableTotal > num){
-                num = response.data.labStateSubs[i].availableTotal;
-              }
+              // if(response.data.labStateSubs[i].availableTotal > num){
+              //   num = response.data.labStateSubs[i].availableTotal;
+              // }
               if(response.data.labStateSubs[i].exceptionalTotal > num){
                 num = response.data.labStateSubs[i].exceptionalTotal;
               }
@@ -258,46 +258,46 @@
               },
               data: useTotal,
             },
-            {
-              name: "空闲数量",
-              type: "line",
-              smooth: true,
-              symbol: "circle",
-              symbolSize: 8,
-              lineStyle: {
-                normal: {
-                  width: 2,
-                },
-              },
-              areaStyle: {
-                normal: {
-                  color: {//渐变色
-                    x: 1,
-                    y: 0,
-                    x2: 0,
-                    y2: 0,
-                    colorStops: [
-                      {
-                        offset: 0,
-                        color: "rgba(21,130,124, 1)",
-                      },
-                      {
-                        offset: 1,
-                        color: "rgba(21,130,124, 0)",
-                      },
-                    ],
-                  },
-                  shadowColor: "rgba(0, 0, 0, 0.1)",
-                  shadowBlur: 10,
-                },
-              },
-              itemStyle: {
-                normal: {
-                  color: "rgb(21,130,124)",
-                },
-              },
-              data: availableTotal,
-            },
+            // {
+            //   name: "空闲数量",
+            //   type: "line",
+            //   smooth: true,
+            //   symbol: "circle",
+            //   symbolSize: 8,
+            //   lineStyle: {
+            //     normal: {
+            //       width: 2,
+            //     },
+            //   },
+            //   areaStyle: {
+            //     normal: {
+            //       color: {//渐变色
+            //         x: 1,
+            //         y: 0,
+            //         x2: 0,
+            //         y2: 0,
+            //         colorStops: [
+            //           {
+            //             offset: 0,
+            //             color: "rgba(21,130,124, 1)",
+            //           },
+            //           {
+            //             offset: 1,
+            //             color: "rgba(21,130,124, 0)",
+            //           },
+            //         ],
+            //       },
+            //       shadowColor: "rgba(0, 0, 0, 0.1)",
+            //       shadowBlur: 10,
+            //     },
+            //   },
+            //   itemStyle: {
+            //     normal: {
+            //       color: "rgb(21,130,124)",
+            //     },
+            //   },
+            //   data: availableTotal,
+            // },
             {
               name: "异常数量",
               type: "line",