Преглед на файлове

Merge branch 'feature/newdemand' of duanxiaoduan/tmr-admin into release/v1.0.2

duanxiaoduan преди 1 година
родител
ревизия
c4d70f3c52
променени са 3 файла, в които са добавени 80 реда и са изтрити 11 реда
  1. 4 1
      src/utils/request.js
  2. 3 3
      src/views/formulationPlan/dailyExecutionPlan/index.vue
  3. 73 7
      src/views/statisticalAnalysis/errorAnalysis/pasture/index.vue

+ 4 - 1
src/utils/request.js

@@ -117,7 +117,10 @@ service.interceptors.response.use(
     console.log('config==>', config) // for debug
     console.log('config.__retryCount==>', config.__retryCount) // for debug
     // 设置请求超时次数
-    config.__retryCount = config.__retryCount || 0
+    config.__retryCount = config.__retryCount || 0
+    // 君盛牧场不需要多次请求
+    // if (config.__retryCount >= 0) {
+    // 其他牧场失败后需要多次尝试
     if (config.__retryCount >= 3) {
       // Message({ message:error.message, type: 'error', duration: 5 * 1000 })
       Message({ message:'请求超时', type: 'error', duration: 5 * 1000 })

+ 3 - 3
src/views/formulationPlan/dailyExecutionPlan/index.vue

@@ -100,8 +100,8 @@
           </el-table-column>
           <el-table-column label="已执行" min-width="70px" align="center">
             <template slot-scope="scope">
-              <span v-if="scope.row.havebutton == 0">否</span>
-              <span v-else>是</span>
+              <div v-if="scope.row.havebutton == 0" style="background: #009A69;color:#fff;line-height:30px;">否</div>
+              <div v-else style="background: #c7c7ca ;line-height:30px;">是</div>
             </template>
           </el-table-column>
           <el-table-column label="班次" min-width="80px" align="center">
@@ -127,7 +127,7 @@
           </el-table-column>
           <el-table-column label="配方名称" min-width="100px" align="center">
             <template slot-scope="scope">
-              <span>{{ scope.row.ftname }}</span>
+              <b style="font-size: 28px;line-height: 30px;">{{ scope.row.ftname }}</b>
             </template>
           </el-table-column>
           <el-table-column label="牛头数" min-width="80px" align="center">

+ 73 - 7
src/views/statisticalAnalysis/errorAnalysis/pasture/index.vue

@@ -2,6 +2,10 @@
   <div class="app-container1">
     <el-tabs v-model="activeName" @tab-click="handleTabClick">
       <el-tab-pane label="汇总统计" name="first">
+        <!-- 君盛 -->
+      <!-- <div ref="scrollContainer" @scroll="handleScroll" :style="{ height: myHeight1+'px', overflowY: 'auto', overflowX: 'hidden' }"> -->
+      <!-- 其他牧场 -->
+      <div ref="scrollContainer">
         <div class="search">
           <el-date-picker v-model="tab.table.getdataListParm.parammaps.inputDatetime" :clearable="false" class="inputDatetime filter-item" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" style="width: 250px;" :picker-options="pickerOptions" />
           <el-button class="el-icon-arrow-left elIconArrowLeft" :disabled="Beforedisabled" @click="handleBefore" />
@@ -580,6 +584,11 @@
                 <h4>栏舍撒料时间统计</h4>
                 <div v-if="tab.chart7.isChart" class="button">
                   <div class="chartButton">
+                    <!-- 君盛-->
+                  <!-- <el-select v-model="tab.chart7.getdataListParm.parammaps.statisticsList" multiple  placeholder="请选择" collapse-tags @change="changeStatisticChart7">
+                      <el-option v-for="item in tab.chart7.statisticsList" :key="item.name" :label="item.name" :value="item.name" />
+                    </el-select> -->
+                    <!-- 其他牧场  -->
                     <my-select ref="tenantselect" :model="tab.chart7.getdataListParm.parammaps.statisticsList" :option="tab.chart7.statisticsList"  :value="'name'" :label="'name'" style="width: 150px;margin-right: 5px;float: left;" placeholder="请选择统计参数" @searchSelect="changeStatisticChart7" />
                     <el-radio-group v-model="tab.chart7.getdataListParm.parammaps.specificDate" class="specificDate" size="mini" style="display: inline-block;" @change="changeChartSpecificDate('chart7')">
                       <el-radio-button label="1" border>日</el-radio-button>
@@ -635,6 +644,7 @@
             </el-col>
           </el-row>
         </div>
+      </div>
       </el-tab-pane>
       <el-tab-pane label="混料统计" name="second">
         <div class="search" ref="myHeightSecond">
@@ -1781,6 +1791,7 @@ export default {
       },
       isokDisable:false,
       // search
+      myHeight1: document.documentElement.clientHeight - 85 - 80,
       myHeight2: document.documentElement.clientHeight - 85 - 150,
       myHeightSecond: '',
       myHeightThird:'',
@@ -1857,7 +1868,6 @@ export default {
     this.getChart4()
     this.getChart5()
     this.getChart6()
-    this.getChart7()
   },
   mounted() {},
   methods: {
@@ -2815,7 +2825,6 @@ export default {
         this.getChart4()
         this.getChart5()
         this.getChart6()
-        this.getChart7()
         this.$nextTick(() => {
           this.$refs.plTable3.doLayout()
           this.$refs.plTable3.doLayout()
@@ -3463,6 +3472,16 @@ export default {
         },
         xAxis: { type: 'category', boundaryGap: false, data: chartLine_data.data2, name: '日期' },
         yAxis: {
+          min:0,  //取0为最小刻度
+          max: 100, //取100为最大刻度
+          min:'min', //取最小值为最小刻度
+          max: 'max', //取最大值为最大刻度
+          min: function(value) {//取最小值向下取整为最小刻度
+            return Math.floor(value.min)
+          },
+          max: function(value) {//取最大值向上取整为最大刻度
+            return  Math.ceil(value.max)
+          },
           type: 'value', name: '百分比', axisLabel: { formatter: '{value} %' }
         },
         series: (function() {
@@ -3574,6 +3593,16 @@ export default {
         },
         xAxis: { type: 'category', boundaryGap: false, data: chartLine_data.data1, name: '日期' },
         yAxis: {
+          min:0,  //取0为最小刻度
+          max: 100, //取100为最大刻度
+          min:'min', //取最小值为最小刻度
+          max: 'max', //取最大值为最大刻度
+          min: function(value) {//取最小值向下取整为最小刻度
+            return Math.floor(value.min)
+          },
+          max: function(value) {//取最大值向上取整为最大刻度
+            return  Math.ceil(value.max)
+          },
           type: 'value', name: '百分比', axisLabel: { formatter: '{value} %' }
         },
         series: [
@@ -3707,6 +3736,16 @@ export default {
         },
         xAxis: { type: 'category', boundaryGap: false, data: chartLine_data.data2, name: '日期' },
         yAxis: {
+          min:0,  //取0为最小刻度
+          max: 100, //取100为最大刻度
+          min:'min', //取最小值为最小刻度
+          max: 'max', //取最大值为最大刻度
+          min: function(value) {//取最小值向下取整为最小刻度
+            return Math.floor(value.min)
+          },
+          max: function(value) {//取最大值向上取整为最大刻度
+            return  Math.ceil(value.max)
+          },
           type: 'value', name: '百分比', axisLabel: { formatter: '{value} %' }
         },
         series: (function() {
@@ -3847,6 +3886,16 @@ export default {
         },
         xAxis: { type: 'category', boundaryGap: false, data: chartLine_data.data2, name: '日期' },
         yAxis: {
+          min:0,  //取0为最小刻度
+          max: 100, //取100为最大刻度
+          min:'min', //取最小值为最小刻度
+          max: 'max', //取最大值为最大刻度
+          min: function(value) {//取最小值向下取整为最小刻度
+            return Math.floor(value.min)
+          },
+          max: function(value) {//取最大值向上取整为最大刻度
+            return  Math.ceil(value.max)
+          },
           type: 'value', name: '百分比', axisLabel: { formatter: '{value} %' }
         },
         series: (function() {
@@ -4132,6 +4181,19 @@ export default {
       // console.log(JSON.parse(this.tab.chart7.statisticsList),'我要看的下拉数据')
       // console.log(JSON.stringify(this.tab.chart7.statisticsList),'我要看的下拉数据')
       this.roadChartLine7(this.tab.chart7.chartLine_data)
+    },
+     handleScroll() {
+      // 获取滚动容器的DOM元素
+      const scrollContainer = this.$refs.scrollContainer;
+      // 计算滚动条距离底部的距离
+      const distanceToBottom = scrollContainer.scrollHeight - (scrollContainer.scrollTop + scrollContainer.clientHeight);
+
+      // 如果滚动条已经滚到最下方
+      if (distanceToBottom === 0) {
+        console.log('滚动条已经滚到最下方');
+        this.getChart7()
+        // 在这里可以执行相应的操作
+      }
     },
     getChart7() {
       this.tab.chart7.listLoading = true
@@ -4168,13 +4230,16 @@ export default {
           this.tab.chart7.statisticsList = []
           this.tab.chart7.getdataListParm.parammaps.statisticsList = []
           for (let i = 0; i < response.data.list.data1.length; i++) {
+            // 君盛
             // if (i < 10) {
-              this.tab.chart7.getdataListParm.parammaps.statisticsList.push(response.data.list.data1[i])
-              var obj = {}
-              obj.id = i
-              obj.name = response.data.list.data1[i]
-              this.tab.chart7.statisticsList.push(obj)
+            //   this.tab.chart7.getdataListParm.parammaps.statisticsList.push(response.data.list.data1[i])
             // }
+            // 其他牧场
+            this.tab.chart7.getdataListParm.parammaps.statisticsList.push(response.data.list.data1[i])
+            var obj = {}
+            obj.id = i
+            obj.name = response.data.list.data1[i]
+            this.tab.chart7.statisticsList.push(obj)
           }
 
           console.log("------->",this.tab.chart7)
@@ -4211,6 +4276,7 @@ export default {
       }
       this.tab.chart7.chartLine = echarts.init(document.getElementById('chartLine7'))
       var option = {
+        useWorker: true,
         title: {
           text: ''
         },