Browse Source

修改了图片地址

duanxiaoduan 1 year ago
parent
commit
1c1bdfc530

+ 3 - 3
.env.development

@@ -4,10 +4,10 @@ ENV = 'development'
 # base api
 # 测试线
 
-# VUE_APP_BASE_API = 'http://192.168.1.70:8082/'
+VUE_APP_BASE_API = 'http://192.168.1.70:8082/'
 
 #许义平本地
-VUE_APP_BASE_API = 'http://192.168.1.96:8082/'
+# VUE_APP_BASE_API = 'http://192.168.1.96:8082/'
 
 
 # VUE_APP_BASE_API = 'http://kpttest.kptyun.com/'
@@ -30,7 +30,7 @@ VUE_APP_BASE_API = 'http://192.168.1.96:8082/'
 
 
 # 白少杰
-VUE_APP_BASE_API = 'http://192.168.1.77:8081/'
+# VUE_APP_BASE_API = 'http://192.168.1.77:8081/'
 
 # vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
 # to control whether the babel-plugin-dynamic-import-node plugin is enabled.

+ 1 - 1
src/main.js

@@ -45,7 +45,7 @@ var pageCount = 50
 if (process.env.NODE_ENV !== 'development') {
   Sentry.init({
     release: 'vislib@' + process.env.npm_package_version,
-    dsn: 'https://9d8ee0ea1a2749949dd1e641b0f7c071@o286322.ingest.sentry.io/5217806',
+    // dsn: 'https://9d8ee0ea1a2749949dd1e641b0f7c071@o286322.ingest.sentry.io/5217806',
     integrations: [new VueIntegration({
       Vue,
       attachProps: true

+ 68 - 42
src/views/dashboard/pasture/index.vue

@@ -633,7 +633,7 @@ export default {
       cellStyle: { padding: 0 + 'px' },
       timer: null,
       clickKey: 0,
-      isClick: false
+      isClick: false,
     }
   },
   watch: {
@@ -878,17 +878,39 @@ export default {
         color: ['#ff0000', '#5199e5', '#fdb06a', '#fb8b73'], // 关键加上这句话,legend的颜色和折线的自定义颜色就一致了
         grid: {
           bottom: '10%'
-        },
-        legend: [{
-          itemWidth: 15, itemHeight: 7, right: '25%', textStyle: { fontSize: 12 },
-          data: [{ name: '设计重量' }, { name: '实际重量' }]
-        }, {
-          itemWidth: 15, itemHeight: 15, right: '0', textStyle: { fontSize: 12 },
-          data: [{ name: '开始重量', icon: 'image://https://kptyun.cn:8081/file/pic/3.png' }, { name: '结束重量', icon: 'image://https://kptyun.cn:8081/file/pic/4.png' }]
+        },
+        legend: [{
+          itemWidth: 15, itemHeight: 7, right: '25%', textStyle: { fontSize: 12 },
+          data: [{ name: '设计重量' }, { name: '实际重量'  }]
+        }, {
+          itemWidth: 5, itemHeight: 5, right: '0', textStyle: { fontSize: 12 },
+          data: [
+            { name: '开始重量' },
+            { name: '结束重量' }
+          ]
         }],
-        tooltip: {
-          trigger: 'axis'
-        },
+        tooltip: {
+          trigger: 'axis',
+          formatter: function(params) {
+            // console.log(params, 'params')
+            var tip = params[0].name
+            for (let i = 0; i < params.length; i++) {
+              if (params[i].seriesName == '设计重量') {
+                tip += '<br>' + params[i].seriesName + ':' + params[i].value[1]
+              }
+              if (params[i].seriesName == '实际重量') {
+                tip += '<br>' + params[i].seriesName + ':' + params[i].value[1]
+              }
+              if (params[i].seriesName == '开始重量') {
+                tip += '<br>' + params[i].seriesName + ':' + params[i].value[1]
+              }
+              if (params[i].seriesName == '结束重量') {
+                tip += '<br>' + params[i].seriesName + ':' + params[i].value[1] + '<br>' + params[i].value[2] + params[i].value[3]
+              }
+            }
+            return tip
+          }
+        },
         calculable: true,
         yAxis: [
           { type: 'value', name: '重量(kg)', splitLine: { show: false }, axisLabel: { show: true, textStyle: { color: '#666' }}}
@@ -910,8 +932,8 @@ export default {
         series: [
           { symbol: 'none', name: '实际重量', type: 'line', data: chartLine_data.data3, itemStyle: { normal: { lineStyle: { color: '#ff0000' ,width:2}}}},
           { symbol: 'none', name: '设计重量', type: 'line',  data: chartLine_data.data2, itemStyle: { normal: { lineStyle: {  width:2}}}},
-          { name: '开始重量', symbol: 'image://https://kptyun.cn:8081/file/pic/3.png', symbolSize: 6, type: 'scatter', data: chartLine_data.data4 },
-          { name: '结束重量', symbol: 'image://https://kptyun.cn:8081/file/pic/4.png', symbolSize: 6, type: 'scatter', data: chartLine_data.data5 }
+          { name: '开始重量', symbolSize: 6, type: 'scatter', data: chartLine_data.data4 },
+          { name: '结束重量', symbolSize: 6, type: 'scatter', data: chartLine_data.data5 }
         ]
       }
       this.row2.chart3.chartLine.setOption(option)
@@ -1083,31 +1105,33 @@ export default {
       this.row3.chart1.listLoading = true
       GetReportform(this.row3.chart1.getdataListParm).then(response => {
         if (response.data !== null && response.data.list !== null) {
-          console.log('计划统计数据', response.data.list)
-          for (let i = 0; i < response.data.data.length; i++) {
-            if (response.data.data[i].实际量 !== '' && response.data.data[i].实际量 !== undefined) {
-              response.data.data[i].实际量 = parseFloat(response.data.data[i].实际量)
-            }
-            if (response.data.data[i].理论量 !== '' && response.data.data[i].理论量 !== undefined) {
-              response.data.data[i].理论量 = parseFloat(response.data.data[i].理论量)
-            }
-            if (response.data.data[i].field1 !== '' && response.data.data[i].field1 !== undefined) {
-              response.data.data[i].field1 = parseFloat(response.data.data[i].field1)
-            }
-            if (response.data.data[i].计划取消重量 !== '' && response.data.data[i].计划取消重量 !== undefined) {
-              response.data.data[i].计划取消重量 = parseFloat(response.data.data[i].计划取消重量)
-            }
-            if (response.data.data[i].field3 !== '' && response.data.data[i].field3 !== undefined) {
-              response.data.data[i].field3 = parseFloat(response.data.data[i].field3)
-            }
-            if (response.data.data[i].正确数 !== '' && response.data.data[i].正确数 !== undefined) {
-              response.data.data[i].正确数 = parseFloat(response.data.data[i].正确数)
-            }
-            if (response.data.data[i].计划数 !== '' && response.data.data[i].计划数 !== undefined) {
-              response.data.data[i].计划数 = parseFloat(response.data.data[i].计划数)
-            }
-            if (response.data.data[i].field2 !== '' && response.data.data[i].field2 !== undefined) {
-              response.data.data[i].field2 = parseFloat(response.data.data[i].field2)
+          console.log('计划统计数据', response.data.list)
+          if(response.data.data){
+            for (let i = 0; i < response.data.data.length; i++) {
+              if (response.data.data[i].实际量 !== '' && response.data.data[i].实际量 !== undefined) {
+                response.data.data[i].实际量 = parseFloat(response.data.data[i].实际量)
+              }
+              if (response.data.data[i].理论量 !== '' && response.data.data[i].理论量 !== undefined) {
+                response.data.data[i].理论量 = parseFloat(response.data.data[i].理论量)
+              }
+              if (response.data.data[i].field1 !== '' && response.data.data[i].field1 !== undefined) {
+                response.data.data[i].field1 = parseFloat(response.data.data[i].field1)
+              }
+              if (response.data.data[i].计划取消重量 !== '' && response.data.data[i].计划取消重量 !== undefined) {
+                response.data.data[i].计划取消重量 = parseFloat(response.data.data[i].计划取消重量)
+              }
+              if (response.data.data[i].field3 !== '' && response.data.data[i].field3 !== undefined) {
+                response.data.data[i].field3 = parseFloat(response.data.data[i].field3)
+              }
+              if (response.data.data[i].正确数 !== '' && response.data.data[i].正确数 !== undefined) {
+                response.data.data[i].正确数 = parseFloat(response.data.data[i].正确数)
+              }
+              if (response.data.data[i].计划数 !== '' && response.data.data[i].计划数 !== undefined) {
+                response.data.data[i].计划数 = parseFloat(response.data.data[i].计划数)
+              }
+              if (response.data.data[i].field2 !== '' && response.data.data[i].field2 !== undefined) {
+                response.data.data[i].field2 = parseFloat(response.data.data[i].field2)
+              }
             }
           }
           this.row3.chart1.table.list = response.data.data
@@ -1309,10 +1333,12 @@ export default {
       this.row4.chart2.listLoading = true
       GetReportform(this.row4.chart2.getdataListParm).then(response => {
         if (response.data !== null && response.data.list !== null) {
-          console.log('混料实际重量统计数据', response.data.list)
-          for (let i = 0; i < response.data.data.length; i++) {
-            if (response.data.data[i].field1 !== '' && response.data.data[i].field1 !== undefined) {
-              response.data.data[i].field1 = parseFloat(response.data.data[i].field1)
+          console.log('混料实际重量统计数据', response.data.data)
+          if(response.data.data){
+            for (let i = 0; i < response.data.data.length; i++) {
+              if (response.data.data[i].field1 !== '' && response.data.data[i].field1 !== undefined) {
+                response.data.data[i].field1 = parseFloat(response.data.data[i].field1)
+              }
             }
           }
           this.row4.chart2.table.list = response.data.data

+ 1 - 1
src/views/shedProduction/performance/index.vue

@@ -1075,7 +1075,7 @@ export default {
     handleExport(item) {
       if (item == 1) {
         console.log('点击了导出模板')
-        // https://kptyun.cn:8081/file/导入导出模板/栏舍生产/栏舍生产性能导入模板.xlsx
+        // 导入导出模板/栏舍生产/栏舍生产性能导入模板.xlsx
         const requestParam = this.requestParam
         const url = process.env.VUE_APP_BASE_API + 'file/导入导出模板/栏舍生产/栏舍生产性能导入模板.xlsx' // 请求下载文件的地址
         console.log(url)

+ 8 - 4
src/views/statisticalAnalysis/processAnalysis/group/index.vue

@@ -1151,6 +1151,7 @@ export default {
         this.chartLine.dispose()
       }
       this.chartLine = echarts.init(document.getElementById('chartLine'))
+
       var option = {
         title: { text: '', subtext: '' },
         color: ['#38c193', '#5199e5', '#fdb06a', '#fb8b73'], // 关键加上这句话,legend的颜色和折线的自定义颜色就一致了
@@ -1159,7 +1160,10 @@ export default {
           data: [{ name: '设计重量' }, { name: '实际重量' }]
         }, {
           itemWidth: 15, itemHeight: 15, right: '0', textStyle: { fontSize: 12 },
-          data: [{ name: '开始重量', icon: 'image://https://kptyun.cn:8081/file/pic/3.png' }, { name: '结束重量', icon: 'image://https://kptyun.cn:8081/file/pic/4.png' }]
+          data: [
+            { name: '开始重量' }, 
+            { name: '结束重量' },
+          ]
         }],
         tooltip: {
           trigger: 'axis',
@@ -1187,8 +1191,8 @@ export default {
         series: [
           { symbol: 'none', name: '实际重量', type: 'line', data: chartLine_data.data3, smooth: true, barWidth: '37', itemStyle: { normal: { lineStyle: { color: '#38c193' }}}},
           { symbol: 'none', name: '设计重量', type: 'line', step: 'middle', data: chartLine_data.data2 },
-          { name: '开始重量', symbol: 'image://https://kptyun.cn:8081/file/pic/3.png', symbolSize: 10, type: 'scatter', data: chartLine_data.data4 },
-          { name: '结束重量', symbol: 'image://https://kptyun.cn:8081/file/pic/4.png', symbolSize: 10, type: 'scatter', data: chartLine_data.data5 }
+          { name: '开始重量', symbolSize: 10, type: 'scatter', data: chartLine_data.data4 },
+          { name: '结束重量', symbolSize: 10, type: 'scatter', data: chartLine_data.data5 }
         ]
       }
       this.chartLine.setOption(option)
@@ -1203,7 +1207,7 @@ export default {
 </script>
 <style lang="scss" scoped>
   .search{padding-top:10px;clear: both;}
-  
+
   .detail{
     height:84px;padding:0 10px;font:16px/32px '';color:#333;background: #F9F9F9;display: flex; align-items: center;text-align: center;
     div{

+ 1 - 32
src/views/statisticalAnalysis/processAnalysis/pasture/index.vue

@@ -868,7 +868,7 @@ export default {
         this.table.getdataListParm.parammaps.startTime = ''
         this.table.getdataListParm.parammaps.stopTime = ''
       }
-    
+
       this.table.getdataListParm.parammaps.hlwc1 = this.hlwc1
       this.table.getdataListParm.parammaps.hlwc2 = this.hlwc2
       this.table.getdataListParm.parammaps.hlzq1 = this.hlzq1
@@ -1225,33 +1225,6 @@ export default {
       this.chart1.listLoading = true
       GetReportform(this.chart1.getdataListParm).then(response => {
         if (response.data.list !== null) {
-          // response.data.list = {
-          //   // 'data1': ['09:34:32', '09:34:46', '09:34:46', '09:34:50'],
-          //   'data2': [
-          //     ['09:34:32', '1724.11'],
-          //     ['09:34:46', '1724.12'],
-          //     ['09:34:46', '-50.13'],
-          //     ['09:34:50', '-51.14']
-          //   ],
-          //   'data3': [
-          //     ['09:34:32', '0'],
-          //     ['09:34:46', '1725.15'],
-          //     ['09:34:46', '1726.16'],
-          //     ['09:34:50', '1.17']
-          //   ],
-          //   'data4': [
-          //     ['09:34:32', '0.18'],
-          //     ['09:34:46', '1725.19'],
-          //     ['09:34:46', '1335.20'],
-          //     ['09:34:50', '1.21']
-          //   ],
-          //   'data5': [
-          //     ['09:34:32', '0.22', '栏舍', '303东1'],
-          //     ['09:34:46', '1726.23',  '饲料', '国产燕麦2'],
-          //     ['09:34:46', '1335.24', '栏舍', '303东3'],
-          //     ['09:34:50', '1.25', '饲料', '国产燕麦4']
-          //   ]
-          // }
           this.chart1.list = response.data.data
           console.log('实时监控', response.data.list)
           this.chart1.chartLine_data = response.data.list
@@ -1280,8 +1253,6 @@ export default {
         }, {
           itemWidth: 5, itemHeight: 5, right: '0', textStyle: { fontSize: 12 },
           data: [
-            // { name: '开始重量', icon: 'image://https://kptyun.cn:8081/file/pic/3.png' },            // { name: '结束重量', icon: 'image://https://kptyun.cn:8081/file/pic/4.png' },
-            // { name: '结束重量', icon: 'image://https://kptyun.cn:8081/file/pic/4.png' },            // { name: '结束重量', icon: 'image://https://kptyun.cn:8081/file/pic/4.png' },
             { name: '开始重量' },
             { name: '结束重量' }
           ]
@@ -1328,8 +1299,6 @@ export default {
         series: [
           { symbol: 'none', name: '实际重量', type: 'line', data: chartLine_data.data3, itemStyle: { normal: { lineStyle: { color: '#ff0000' ,width:2}}}},
           { symbol: 'none', name: '设计重量', type: 'line', step: 'middle', data: chartLine_data.data2 , itemStyle: { normal: { lineStyle: {  width:2}}}},
-          // { name: '开始重量', symbol: 'image://https://kptyun.cn:8081/file/pic/3.png', symbolSize: 10, type: 'scatter', data: chartLine_data.data4 },
-          // { name: '结束重量', symbol: 'image://https://kptyun.cn:8081/file/pic/4.png', symbolSize: 10, type: 'scatter', data: chartLine_data.data5 }
           { name: '开始重量', symbolSize: 6, type: 'scatter', data: chartLine_data.data4 },
           { name: '结束重量', symbolSize: 6, type: 'scatter', data: chartLine_data.data5 }
         ]