Browse Source

过程分析改图表显示样式,修正剩料计划转投栏舍加不了问题

Epans 2 years ago
parent
commit
01d5d8a112

+ 1 - 6
.env.development

@@ -8,12 +8,7 @@ ENV = 'development'
 VUE_APP_BASE_API = 'http://kpttest.kptyun.com/'
 
 
- 
-<<<<<<< HEAD
-VUE_APP_BASE_API = 'http://kpttest.kptyun.com/'
-
-=======
->>>>>>> 95dccffa55e81b58dce6eb060e74e2f663d43a4a
+  
 # VUE_APP_BASE_API = 'http://lhpc81.kptyun.com/'
  
 

+ 16 - 2
src/views/formulationPlan/surplusMaterialPlan/index.vue

@@ -200,7 +200,7 @@
           <el-row>
               <el-col :span="6">
                 <el-form-item label="转投栏舍:" prop="useinbarid">
-                  <el-select v-model="create.temp.useinbarid" filterable placeholder="转投栏舍" class="filter-item" style="width: 100%;" @change="changeTransferbars">
+                  <el-select v-model="create.temp.useinbarid" filterable placeholder="转投栏舍" class="filter-item" style="width: 100%;" @change="changeTransferbars" :disabled = 'isDis' >
                     <el-option v-for="item in transferbarsList" :key="item.id" :label="item.bname" :value="item.id" />
                   </el-select>
                 </el-form-item>
@@ -346,6 +346,7 @@ export default {
     return {
      barSortList: [ ],
       dialogFull: false,
+      isDis: false,
       isRoleEdit: [],
       requestParams: [
         { name: 'getBarListEnable', offset: 0, pagecount: 0, parammaps: { pastureid: Cookies.get('pastureid') }},
@@ -766,6 +767,16 @@ console.log('点击了栏舍1', barSortList)
       console.log(item)
       this.getCarFollowParm.parammaps.times = item
       this.getTransferbarsList()
+
+
+
+      // 已改未更,先注释
+      
+      // if(item == "继续饲喂"){
+      //   this.isDis = true
+      // } else {
+      //    this.isDis = false
+      // }
     },
     getTransferbarsList() {
       GetDataByName(this.getTransferbarsParm).then(response => {
@@ -1445,7 +1456,10 @@ console.log('点击了栏舍1', barSortList)
           bar: '@insertSpotList2.bname',
           type: 0
         }}
-        this.requestParam.data[3] = { 'name': 'insertSpotList3', 'resultmaps': { 'list': this.useinbarNamesIdTempArr }}
+        // this.requestParam.data[3] = { 'name': 'insertSpotList3', 'resultmaps': { 'list': this.useinbarNamesIdTempArr }}
+
+        this.requestParam.data[3] = { 'name': 'insertSpotList3', 'resultmaps': { 'list': this.barsNamesIdTempArr }}
+
         this.requestParam.data[3].children = []
         this.requestParam.data[3].children[0] = { 'name': 'insertRpdetail', 'type': 'e', 'parammaps': {
           pastureid: this.create.temp.pastureid,

+ 6 - 11
src/views/statisticalAnalysis/processAnalysis/pasture/index.vue

@@ -1143,14 +1143,9 @@ export default {
         color: ['#ff0000', '#5199e5', '#fdb06a', '#fb8b73'], // 关键加上这句话,legend的颜色和折线的自定义颜色就一致了
         legend: [{
           itemWidth: 15, itemHeight: 7, right: '25%', textStyle: { fontSize: 12 },
-          data: [{ name: '设计重量' }, { name: '实际重量' , itemStyle: {
-                        normal: {
-                            color: '#ff0000'
-                        }
-                    } 
-          }]
+          data: [{ name: '设计重量' }, { name: '实际重量'  }]
         }, {
-          itemWidth: 15, itemHeight: 15, right: '0', textStyle: { fontSize: 12 },
+          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' },
@@ -1198,12 +1193,12 @@ export default {
           {type:'slider' },  //用于添加滑动条缩放,
         ],
         series: [
-          { symbol: 'none', name: '实际重量', type: 'line', data: chartLine_data.data3, itemStyle: { normal: { lineStyle: { color: '#ff0000' }}}},
-          { symbol: 'none', name: '设计重量', type: 'line', step: 'middle', data: chartLine_data.data2 },
+          { 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: 10, type: 'scatter', data: chartLine_data.data4 },
-          { name: '结束重量', 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 }
         ]
       }
       this.chartLine.setOption(option)

+ 141 - 0
src/views/systemManagement/customboard2/Addboard2/chartTable.vue

@@ -0,0 +1,141 @@
+<template>
+  <div class="app-table">
+   
+    <div class="table">
+      <el-table
+        :key="table.tableKey"
+        v-loading="table.listLoading"
+        element-loading-text="给我一点时间"
+        :data="table.list"
+        border
+        fit
+        highlight-current-row
+        style="width: 100%;"
+        :row-style="rowStyle"
+        :cell-style="cellStyle"
+        class="elTable table-fixed"
+      >
+        <el-table-column :key="1" label="序号" prop="sort" align="center" width="50px" />
+        <el-table-column :key="2" label="栏舍名称" prop="barname" min-width="90px" align="center" />
+        <el-table-column :key="3" label="第一层" min-width="90px" align="center">
+          <el-table-column label="比例 (%)" prop="onerate" min-width="90px" align="center" />
+          <el-table-column label="重量 (g)" prop="oneweight" min-width="90px" align="center" />
+        </el-table-column>
+        <el-table-column :key="4" label="第二层" min-width="90px" align="center">
+          <el-table-column label="比例 (%)" prop="tworate" min-width="90px" align="center" />
+          <el-table-column label="重量 (g)" prop="twoweight" min-width="90px" align="center" />
+        </el-table-column>
+        <el-table-column :key="5" label="第三层" min-width="90px" align="center">
+          <el-table-column label="比例 (%)" prop="threerate" min-width="90px" align="center" />
+          <el-table-column label="重量 (g)" prop="threeweight" min-width="90px" align="center" />
+        </el-table-column>
+    
+      </el-table>
+      <Pagination v-show="table.total>0" :total="table.total" :page.sync="table.getdataListParm.offset" :limit.sync="table.getdataListParm.pagecount" @pagination="getList" />
+    </div>
+   
+  </div>
+</template>
+
+<script>
+import { GetDataByName } from '@/api/common'
+import draggable from 'vuedraggable'
+import Cookies from 'js-cookie'
+import { parseTime } from '@/utils/index.js'
+import Pagination from '@/components/Pagination'
+export default {
+  name: 'MaterialIssuancePlan',
+  display: 'Two list header slot',
+  order: 14,
+  components: { Pagination },
+  data() {
+    return {
+      table: {
+        getdataListParm: {
+          name: 'getDungHistory',
+          page: 1,
+          offset: 1,
+          pagecount: 12,
+          returntype: 'Map',
+          parammaps: {
+            pastureid: Cookies.get('pastureid'),
+            operatetime: ''
+          }
+        },
+        list: [],
+        total: 0,
+        tableKey: 0,
+        listLoading: false,
+        temp: {},
+        changeList: [],
+        startObj: {}
+      },
+
+      textMap: {
+        seeHistory: '粪便筛修改记录'
+      },
+      seeHistory: {
+        dialogFormVisible: false, dialogStatus: '',
+        total: 0, tableKey: 0, listLoading: false,
+        getdataListParm: {
+          name: 'getDungHistoryBar', page: 1, offset: 1, pagecount: 10, returntype: 'Map',
+          parammaps: {
+            pastureid: Cookies.get('pastureid'),
+            barid: '',
+            inputDatetime: '',
+            time1: '',
+            time2: ''
+          }
+        }
+      },
+
+      rowStyle: { maxHeight: 30 + 'px', height: 30 + 'px' },
+      cellStyle: { padding: 0 + 'px' }
+    }
+  },
+  created() {
+    this.getList()
+  },
+  methods: {
+    changeDate() {
+      this.getList()
+    },
+    getList() {
+      this.table.listLoading = true
+      GetDataByName(this.table.getdataListParm).then(response => {
+        console.log('table数据', response.data.list)
+        if (response.data.list !== null) {
+          this.table.list = response.data.list
+          this.table.pageNum = response.data.pageNum
+          this.table.pageSize = response.data.pageSize
+          this.table.total = response.data.total
+        } else {
+          this.table.list = []
+        }
+        setTimeout(() => {
+          this.table.listLoading = false
+        }, 100)
+      })
+    },
+
+    handleSearch() {
+      if (this.table.getdataListParm.parammaps.operatetime == '' || this.table.getdataListParm.parammaps.operatetime == null ) {
+        this.table.getdataListParm.parammaps.operatetime = ''
+      } else {
+        this.table.getdataListParm.parammaps.operatetime = parseTime(this.table.getdataListParm.parammaps.operatetime, '{y}-{m}-{d}')
+      }
+      this.getList()
+    },
+    handleRefresh() {
+      this.table.getdataListParm.parammaps.operatetime = ''
+      this.getList()
+    },
+   
+    
+  }
+}
+</script>
+
+<style  lang="scss" scoped>
+ .search{margin-bottom: 10px;}
+</style>

+ 50 - 12
src/views/systemManagement/customboard2/Addboard2/index.vue

@@ -5,9 +5,8 @@
       <div class="tool-bar">
         <div>
           <span class="title-name">仪表盘标题</span>
-          <span>解释信息</span>
         </div>
-        <div>
+        <div style = "position:absolute:top:0px;right:0px">
           <el-button class="miniSuccess" @click="control_edit()">编辑</el-button>
           <el-button class="successBorder" @click="handleLinkChart">
             添加图表
@@ -34,8 +33,21 @@
               </div>
 
             </div>
-            <div  class="text item"> 
-              图表内容
+
+            <div  class="board-item" v-if="item.boardtype == 'table'"> 
+                表格
+
+                <!-- <keep-alive>
+                  <component :is="chartTable.myComponent" ref="chartTable" />
+                </keep-alive> -->
+
+
+                <keep-alive>
+                  <component :is="chartTable.myComponent" ref="chartTable" />
+                </keep-alive>
+            </div>
+            <div  class="board-item" v-if="item.boardtype == 'line'"> 
+                 线图
             </div>
           </el-card>
                     
@@ -95,13 +107,18 @@ export default {
   data() {
     return {
       isRoleEdit: [],
-
+chartTable: {
+        dialogFormVisible: false,
+        dialogStatus: '',
+        myComponent: null
+      },
       boardList: [
         {
-          title:'图表1',boardId:1,boardtype:'line',
+          title:'图表1',boardId:1,boardtype:'table',
           boardtext:[]
         },
-        {title:'图表2'},
+        {title:'图表2',boardId:1,boardtype:'line',
+          boardtext:[]},
         {title:'图表3'},
         {title:'图表3'},
         {title:'图表3'},
@@ -110,6 +127,15 @@ export default {
         {title:'图表3'},
        ],
 
+
+       chartTable: {
+        dialogFormVisible: false,
+        dialogStatus: '',
+        myComponent: null
+      },
+
+
+
        myChartList: [],
       showChartList: false,
       chartLoading: {},
@@ -141,6 +167,11 @@ export default {
     // this.isEdit = isEdit
  
     this.getList()
+
+    this.chartTable.dialogFormVisible = true
+      const vue = this
+      var myComponent = () => import('./chartTable.vue')
+     vue.chartTable.myComponent = myComponent
   },
 
   methods: {
@@ -159,6 +190,13 @@ export default {
      
 
     getList() {
+
+
+  const vue = this
+      var myComponent = () => import('./chartTable.vue')
+      return vue.chartTable.myComponent = myComponent
+      
+
       this.loading = true
 
       // if (this.$route.params.id) {
@@ -205,17 +243,17 @@ export default {
 
 .tool-bar {
   display: block; border-top: none;
-  height: 45px;
-  line-height: 45px;
+  height: 80px;
+  line-height: 4;
   color: #303133;
   padding: 0 10px;
   position: relative;
  
 }
  .title-name {
-    font-size: 12px;
+    font-size: 20px;
     font-weight: 600;
-    color: #909399;
+    color: #333;
     margin-left: 0;
   }
   /* span {
@@ -242,7 +280,7 @@ export default {
   }
 
   .board-card {
-    width: 250px;min-height: 100%;
+    width: 400px;min-height: 360px;
     padding: 20px 10px;
     display: inline-block;
     margin: 0px 0px 20px 20px;