Epans 3 лет назад
Родитель
Сommit
8805a28a0f

+ 152 - 219
src/views/formulationPlan/pushMaterialPlan/index.vue

@@ -38,35 +38,47 @@
         <el-table-column label="栏舍名称" min-width="100px" align="center" class-name="small-padding fixed-width" fixed="left">
         <el-table-column label="栏舍名称" min-width="100px" align="center" class-name="small-padding fixed-width" fixed="left">
           <template slot-scope="scope">
           <template slot-scope="scope">
         
         
-            <span v-if="scope.row.NoEdit">{{ scope.row.barname }}</span>
-            <el-input v-if="scope.row.Edit" v-model="scope.row.barname" style="width:95%;padding:10px 0;"   />
+            <span  >{{ scope.row.bname }}</span>
+ 
           </template>
           </template>
         </el-table-column>
         </el-table-column>
         <el-table-column :key="2" label="推料车名称" min-width="70px" align="center">
         <el-table-column :key="2" label="推料车名称" min-width="70px" align="center">
           <template slot-scope="scope">
           <template slot-scope="scope">
-            <span v-if="scope.row.NoEdit">{{ scope.row.barname }}</span>
-            <el-input v-if="scope.row.Edit" v-model="scope.row.barname" style="width:95%;padding:10px 0;"   />
+            <span v-if="scope.row.NoEdit">{{ scope.row.tmrname }}</span>
+            <el-select v-if="scope.row.Edit" v-model="scope.row.tmrid" filterable placeholder="推料车名称" class="filter-item" style="width:95%;padding:10px 0;" @change="changeTmrCode(scope.$index, scope.row)">
+                  <el-option v-for="item in tmrCodeList" :key="item.id" :label="item.name" :value="item.id" />
+            </el-select>  
           </template>
           </template>
         </el-table-column>
         </el-table-column>
         <el-table-column :key="3" label="推料车编号" min-width="90px" align="center">
         <el-table-column :key="3" label="推料车编号" min-width="90px" align="center">
           <template slot-scope="scope">
           <template slot-scope="scope">
-            <span v-if="scope.row.NoEdit">{{ scope.row.ccount }}</span>
-            <el-input v-if="scope.row.Edit" v-model="scope.row.ccount" style="width:95%;padding:10px 0;"   />
+            <span  >{{ scope.row.tmrcode }}</span>
+      
           </template>
           </template>
         </el-table-column>
         </el-table-column>
         <el-table-column :key="4" label="推料时间(每天)" min-width="85px" align="center">
         <el-table-column :key="4" label="推料时间(每天)" min-width="85px" align="center">
           <template slot-scope="scope">
           <template slot-scope="scope">
-            <span v-if="scope.row.NoEdit">{{ scope.row.ratio }}</span>
-            <el-input v-if="scope.row.Edit" v-model="scope.row.ratio" step="0.01" type="number" style="width:95%;padding:10px 0;"   />
+            <span v-if="scope.row.NoEdit">{{ scope.row.times }}</span>
+            
+            <!-- <el-tag v-for="tag in row.timesArr" :key="tag.name" closable @close="tag_close1(tag)" type="success">{{tag}}</el-tag>
+             -->
+          
           </template>
           </template>
         </el-table-column>
         </el-table-column>
         <el-table-column :key="5" label="允许误差时间(分钟)" min-width="85px" align="center">
         <el-table-column :key="5" label="允许误差时间(分钟)" min-width="85px" align="center">
           <template slot-scope="scope">
           <template slot-scope="scope">
-            <span v-if="scope.row.NoEdit">{{ scope.row.ccountratio }}</span>
-            <el-input v-if="scope.row.Edit" v-model="scope.row.ccountratio" type="number" style="width:95%;padding:10px 0;"   />
+            <span v-if="scope.row.NoEdit">{{ scope.row.allowableerror }}</span>
+            <el-input v-if="scope.row.Edit" v-model="scope.row.allowableerror" type="number" style="width:95%;padding:10px 0;"   />
           </template>
           </template>
         </el-table-column>
         </el-table-column>
 
 
+
+        <el-table-column label="是否启用" min-width="90px" align="center">
+              <template slot-scope="scope">
+                <el-switch v-model="scope.row.enable" :disabled="scope.row.NoEdit==true" active-color="#13ce66" inactive-color="#ff4949" :active-value="1" :inactive-value="0"  />
+              </template>
+        </el-table-column>
+
         <el-table-column label="操作" align="center" width="80" class-name="small-padding fixed-width" fixed="right">
         <el-table-column label="操作" align="center" width="80" class-name="small-padding fixed-width" fixed="right">
           <template slot-scope="{row}">
           <template slot-scope="{row}">
             <el-button v-if="row.isUpdate && isRoleEdit" class="miniSuccess" icon="el-icon-edit-outline" @click="handleUpdate(row)" />
             <el-button v-if="row.isUpdate && isRoleEdit" class="miniSuccess" icon="el-icon-edit-outline" @click="handleUpdate(row)" />
@@ -123,7 +135,7 @@
         </el-form>
         </el-form>
         <div slot="footer" class="dialog-footer">
         <div slot="footer" class="dialog-footer">
           <el-button class="cancelClose" @click="create1.dialogFormVisible = false;getList()">关闭</el-button>
           <el-button class="cancelClose" @click="create1.dialogFormVisible = false;getList()">关闭</el-button>
-          <el-button class="save"  @click="handleCreate1">确认</el-button>
+          <el-button class="save"  @click="create_sure1">确认</el-button>
         </div>
         </div>
       </div>
       </div>
     </el-dialog>
     </el-dialog>
@@ -199,20 +211,21 @@ export default {
   data() {
   data() {
     return {
     return {
 
 
-
+      tmrCodeList:[
+        // {Code: "001", id: 46, name: "一号推料车"},
+        //  {Code: "002", id: 47, name: "二号推料车"}
+      ],
       table: {
       table: {
         getdataListParm: {
         getdataListParm: {
-          name: 'getFPList',
+          name: 'getPushingList',
           page: 1,
           page: 1,
           offset: 1,
           offset: 1,
-          // pagecount: parseInt(Cookies.get('pageCount')),
+ 
           pagecount: '',
           pagecount: '',
           returntype: 'Map',
           returntype: 'Map',
           parammaps: {
           parammaps: {
             pastureid: Cookies.get('pastureid'),
             pastureid: Cookies.get('pastureid'),
-            enable: '',
-            barid: '',
-            tname: ''
+         
           }
           }
         },
         },
         tableKey: 0,
         tableKey: 0,
@@ -328,6 +341,8 @@ export default {
   },
   },
   created() {
   created() {
     this.getButtons()
     this.getButtons()
+
+    this.getTMRlist()
     this.getList()
     this.getList()
    
    
   },
   },
@@ -339,44 +354,20 @@ export default {
       this.isRoleEdit = isRoleEdit
       this.isRoleEdit = isRoleEdit
     },
     },
 
 
-    getTimeList() {
-      GetDataByName(this.getTimeListParm).then(response => {
+    getTMRlist() {
+
+      var send_data = {"name":"getPushingTmrList","page":1,"offset":1,"pagecount":"","returntype":"Map","parammaps":{"dictname":"推料车"}}
+      GetDataByName(send_data).then(response => {
         if (response.data.list !== null) {
         if (response.data.list !== null) {
-          this.timeList = response.data.list
+          this.tmrCodeList = response.data.list
         } else {
         } else {
-          this.timeList = []
+          this.tmrCodeList = []
         }
         }
+        console.log("tmrCodeList",this.tmrCodeList)
       })
       })
     },
     },
-     
-
-     // 新增
-    handleCreate1() {
-      console.log('点击了新增')
-      this.resetTemp1()
-      this.dialogFull = false
-      this.create1.dialogStatus = 'create'
-      this.create1.dialogFormVisible = true
-    },
-     resetTemp1() {
-      this.create1.temp = { pastureid: Cookies.get('pastureid'), 'myId': (new Date()).valueOf(), 'Edit': true, 'NoEdit': false, 'isCreate': true, 'isUpdate': false, 'isUpdateSave': false, 'enable': 1, 'sort': "", 'ftid': '', 'ftname': '', 'tmrcode': '', 'tmrid': '', 'times': '', 'lppcode': '', 'lppid': '', 'rtime': '', barid: '', 'treatmethod': '', 'useinbar': '', 'useinbarid': '' }
-    },
-
-    handleCreate2() {
-      console.log('点击了新增')
-      this.resetTemp2()
-      this.dialogFull = false
-      this.create2.dialogStatus = 'create'
-      this.create2.dialogFormVisible = true
-    },
-     resetTemp2() {
-      this.create2.temp = { pastureid: Cookies.get('pastureid'), 'myId': (new Date()).valueOf(), 'Edit': true, 'NoEdit': false, 'isCreate': true, 'isUpdate': false, 'isUpdateSave': false, 'enable': 1, 'sort': "", 'ftid': '', 'ftname': '', 'tmrcode': '', 'tmrid': '', 'times': '', 'lppcode': '', 'lppid': '', 'rtime': '', barid: '', 'treatmethod': '', 'useinbar': '', 'useinbarid': '' }
-    },
-
 
 
 
 
- 
-    
     getList() {
     getList() {
       this.table.listLoading = true
       this.table.listLoading = true
       GetDataByName(this.table.getdataListParm).then(response => {
       GetDataByName(this.table.getdataListParm).then(response => {
@@ -387,7 +378,9 @@ export default {
             this.$set(response.data.list[i], 'NoEdit', true) // 不可编辑/输入
             this.$set(response.data.list[i], 'NoEdit', true) // 不可编辑/输入
             this.$set(response.data.list[i], 'isUpdate', true) // 编辑操作
             this.$set(response.data.list[i], 'isUpdate', true) // 编辑操作
             this.$set(response.data.list[i], 'isUpdateSave', false) // 编辑保存
             this.$set(response.data.list[i], 'isUpdateSave', false) // 编辑保存
+           
           }
           }
+
           // console.log(response.data.list, sumr)
           // console.log(response.data.list, sumr)
       
       
           this.table.list = response.data.list
           this.table.list = response.data.list
@@ -403,11 +396,54 @@ export default {
         }, 100)
         }, 100)
       })
       })
     },
     },
-    handleSearch() {
-      this.getList()
+
+
+    // 推料车
+    changeTmrCode(index,row) {
+      console.log("推料车:====",index,row)
+      var Code   = this.tmrCodeList.find(obj => obj.id === row.tmrid).Code
+      console.log( "推料车编号:====",Code)
+      this.table.list[index].tmrcode = Code
+    },
+     
+
+  
+
+     // 新增
+    handleCreate1() {
+      console.log('点击了新增')
+      this.resetTemp1()
+      this.dialogFull = false
+      this.create1.dialogStatus = 'create'
+      this.create1.dialogFormVisible = true
+    },
+     resetTemp1() {
+      this.create1.temp = { pastureid: Cookies.get('pastureid'), 'myId': (new Date()).valueOf(), 'Edit': true, 'NoEdit': false, 'isCreate': true, 'isUpdate': false, 'isUpdateSave': false, 'enable': 1, 'sort': "", 'ftid': '', 'ftname': '', 'tmrcode': '', 'tmrid': '', 'times': '', 'lppcode': '', 'lppid': '', 'rtime': '', barid: '', 'treatmethod': '', 'useinbar': '', 'useinbarid': '' }
+    },
+    
+
+    create_sure1(){
+
+    },
+    
+    handleCreate2() {
+      console.log('点击了新增')
+      this.resetTemp2()
+      this.dialogFull = false
+      this.create2.dialogStatus = 'create'
+      this.create2.dialogFormVisible = true
+    },
+     resetTemp2() {
+      this.create2.temp = { pastureid: Cookies.get('pastureid'), 'myId': (new Date()).valueOf(), 'Edit': true, 'NoEdit': false, 'isCreate': true, 'isUpdate': false, 'isUpdateSave': false, 'enable': 1, 'sort': "", 'ftid': '', 'ftname': '', 'tmrcode': '', 'tmrid': '', 'times': '', 'lppcode': '', 'lppid': '', 'rtime': '', barid: '', 'treatmethod': '', 'useinbar': '', 'useinbarid': '' }
     },
     },
 
 
 
 
+
+ 
+    
+    
+    
+
     change_time1(tag){
     change_time1(tag){
       console.log("tag", tag)
       console.log("tag", tag)
         console.log("timetags1", this.timetags1)
         console.log("timetags1", this.timetags1)
@@ -574,188 +610,85 @@ export default {
       // 编辑false,编辑保存true
       // 编辑false,编辑保存true
       row.isUpdate = false
       row.isUpdate = false
       row.isUpdateSave = true
       row.isUpdateSave = true
-      row.ftid = String(row.ftid)
-      if (row.ptsfid == '-1') {
-        row.ptsfid = ''
-      }
-      row.ptsfid = String(row.ptsfid)
-      // dryweight
-      this.table.temp.ftid = row.ftid
-      this.table.temp.ftname = row.ftname
-      this.table.temp.ptsfid = row.ptsfid
-      this.table.temp.ptsfname = row.ptsfname
+    
     },
     },
     updateData(row) {
     updateData(row) {
       
       
-      var arr = []
-      for (let i = 1; i <= this.table.RWLength; i++) {
-        var obj = {}
-        obj['times'] = i
-        obj['pastureid'] = row.pastureid
-        obj['barid'] = row.barid
-        obj['cowcount'] = row.ccount
-        obj['ccountradio'] = row.ccountradio
-        obj['ptid'] = row.ftid
-        if (row.ptsfid !== '') {
-          obj['ptsid'] = row.ptsfid
-        } else {
-          obj['ptsid'] = '-1'
-        }
-        obj['weight'] = row['w' + i]
-        if(row['bw' + i] == ""){
-          obj['supplement'] = 0
-        }else{
-          obj['supplement'] = row['bw' + i]
-        }
-        obj['tratio'] = Math.round(row['r' + i])
-        obj['todaysupplement'] = row.todaysupplement
-        obj['todayweight'] = row.todayweight
-        arr.push(obj)
-      }
-      if (this.table.isPtsfname == 0) {
-        row.ptsfid = '-1'
-        row.ptsfname = ''
-      } else {
-        if (row.ptsfid == '') {
-          row.ptsfid = '-1'
-          row.ptsfname = ''
-        }
-      }
-      if (row.supplyweight == '') {
-        row.supplyweight = '0'
-      }
-      if (this.table.isPtsfname == false) {
-        row.supplyweight = '0'
-      }
-      console.log(row, '============')
-      this.$set(row, 'ratio', Math.floor(parseFloat(row.ratio) * 100) / 100)
-      this.$set(row, 'ccountratio', Math.floor(parseFloat(row.ccountratio) * 100) / 100)
-      row.ccountratio = String(row.ccountratio)
-      row.sumr = Math.round(row.sumr)
-      // for(let i=0;i<arr.length;i++){
-      //   if(arr[i].tratio == undefined ||arr[i].tratio =='' || arr[i].tratio == null){
-      //     arr[i].tratio = 0
-      //   }
-      // }
-      this.table.rwList = arr
+     
       console.log('点击了编辑保存', row)
       console.log('点击了编辑保存', row)
-      this.table.temp.pastureid = row.pastureid
-      this.table.temp.id = row.id
-      this.table.temp.barname = row.barname
-      this.table.temp.barid = row.barid
-      this.table.temp.ccount = row.ccount
-      this.table.temp.ratio = row.ratio
-      this.table.temp.ccountratio = row.ccountratio
-      this.table.temp.ftid = row.ftid
-      this.table.temp.ftname = row.ftname
-      this.table.temp.ptsfid = row.ptsfid
-      this.table.temp.ptsfname = row.ptsfname
-      this.table.temp.ftweight = row.ftweight
-      this.table.temp.supplyweight = row.supplyweight
-      this.table.temp.feedweight = row.feedweight
-      this.table.temp.owner = row.owner
-      this.table.temp.sumr = row.sumr
-      
-      console.log(row, '===========')
-      this.table.temp.softccount = row.softccount
    
    
-
-      var obj = {}
-      obj.pastureid = row.pastureid
-      obj.id = row.id
-      obj.data = []
-       
+       row.pastureid =  Cookies.get('pastureid')
        
        
  
  
-      if (this.table.temp.ccount === '') {
-        this.$message({ type: 'error', message: '实际牛头数不能为空', duration: 2000 })
-        return false
-      }
+      // if (this.table.temp.ccount === '') {
+      //   this.$message({ type: 'error', message: '实际牛头数不能为空', duration: 2000 })
+      //   return false
+      // }
      
      
-      const positiveInteger = /^[0-9]\d*$/
-      if (!positiveInteger.test(parseFloat(this.table.temp.ccount))) {
-        this.$message({
-          type: 'error',
-          message: '实际牛头数请输入正整数',
-          duration: 2000
-        })
-        return false
-      }
+      // const positiveInteger = /^[0-9]\d*$/
+      // if (!positiveInteger.test(parseFloat(this.table.temp.ccount))) {
+      //   this.$message({
+      //     type: 'error',
+      //     message: '实际牛头数请输入正整数',
+      //     duration: 2000
+      //   })
+      //   return false
+      // }
       this.isokDisable = true
       this.isokDisable = true
       setTimeout(() => {
       setTimeout(() => {
         this.isokDisable = false
         this.isokDisable = false
       }, 1000)
       }, 1000)
-      // this.requestParam.parammaps = this.table.temp
-      this.requestParam.common = {
-        'returnmap': '0'
+
+
+      if(id == 0){
+         var send_data =  {
+           "common":{"returnmap":"0"},
+           "data":[
+              {"name":"insertPushing","type":"e",
+               "parammaps": row
+               },
+							{"name":"insertPushingDetail",
+              "resultmaps":{
+                "list":[
+										 {"time":"10:00"},{"time":"12:00"}
+                     ]
+              },
+							"children":[
+                {
+                  "name":"insertPushingDetail","type":"e","parammaps":
+										 {
+                       "pastureid":Cookies.get('pastureid'),
+                       "barid":row.barid,"time":"@insertPushingDetail.time","type":0}}]}
+										 ]}
+      }else {
+
       }
       }
-      this.requestParam.data = []
-      this.requestParam.data[0] = { 'name': 'updateBigFP', 'type': 'e', 'parammaps': {
-        pastureid: row.pastureid,
-        id: row.id,
-        barname: row.barname,
-        barid: row.barid,
-        softccount: row.softccount,
-        ccount: row.ccount,
-        ratio: row.ratio,
-        ccountratio: row.ccountratio,
-        ftid: row.ftid,
-        ftname: row.ftname,
-        ptsfid: row.ptsfid,
-        ptsfname: row.ptsfname,
-        ftweight: row.ftweight,
-        supplyweight: row.supplyweight,
-        feedweight: row.feedweight,
-        owner: row.owner,
-        sumr: row.sumr
-      }}
-      this.requestParam.data[1] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.table.rwList }}
-      this.requestParam.data[1].children = []
-      this.requestParam.data[1].children[0] = { 'name': 'updateBigFPDetail', 'type': 'e', 'parammaps': {
-        pastureid: '@insertSpotList.pastureid',
-        barname: row.barname,
-        barid: '@insertSpotList.barid',
-        times: '@insertSpotList.times',
-        tratio: '@insertSpotList.tratio',
-        weight: '@insertSpotList.weight',
-        cowcount: '@insertSpotList.cowcount',
-        ccountradio: row.ccountratio,
-        ptid: '@insertSpotList.ptid',
-        ptsid: '@insertSpotList.ptsid',
-        supplement: '@insertSpotList.supplement',
-        feedweight: row.feedweight,
-        supplyweight: row.supplyweight,
-        ratio: row.ratio
-      }}
-      this.requestParam.data[2] = { 'name': 'updateLPPbyFPChange', 'type': 'e', 'parammaps': {
-        pastureid: row.pastureid,
-        fpid: row.id
-      }}
-      ExecDataByConfig(this.requestParam).then(response => {
-        console.log('编辑保存发送参数', this.requestParam)
-        if (response.msg === 'fail') {
-          this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
-        } else {
-          if(obj.data.length>0){
-            const url = 'authdata/fpdetail/edit'
-            const data = obj
-            postJson(url, data).then(response => {
-              if(response.msg !== 'fail'){
-                this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
-              }
-            })
-          }else{
-            this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
-          }
-          this.getList()
-          for (let i = 0; i < this.headerList.length; i++) {
-            if (this.headerList[i].target.className == 'el-icon-lock') {
-              this.headerList[i].target.className = 'el-icon-unlock'
-              this.$set(this.headerList[i].target, 'className', 'el-icon-unlock')
-            }
-          }
-        }
-      })
+       
+      // ExecDataByConfig(this.requestParam).then(response => {
+      //   console.log('编辑保存发送参数', this.requestParam)
+      //   if (response.msg === 'fail') {
+      //     this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+      //   } else {
+      //     if(obj.data.length>0){
+      //       const url = 'authdata/fpdetail/edit'
+      //       const data = obj
+      //       postJson(url, data).then(response => {
+      //         if(response.msg !== 'fail'){
+      //           this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
+      //         }
+      //       })
+      //     }else{
+      //       this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
+      //     }
+      //     this.getList()
+      //     for (let i = 0; i < this.headerList.length; i++) {
+      //       if (this.headerList[i].target.className == 'el-icon-lock') {
+      //         this.headerList[i].target.className = 'el-icon-unlock'
+      //         this.$set(this.headerList[i].target, 'className', 'el-icon-unlock')
+      //       }
+      //     }
+      //   }
+      // })
     },
     },
     updateCancel(row) {
     updateCancel(row) {
       console.log('点击了编辑取消')
       console.log('点击了编辑取消')

+ 182 - 0
src/views/systemManagement/dataSynchronization/index.vue

@@ -0,0 +1,182 @@
+<template>
+  <div class="app-container">
+
+    <el-form ref="form" :model="form" label-width="180px">
+        <el-form-item label="每日自动同步:">
+          <el-switch v-model="form.delivery"></el-switch>
+        </el-form-item>
+
+        <el-form-item label="">
+          <el-select v-model="form.region" placeholder="">
+            <el-option label="定时更新" value="shanghai"></el-option>
+            <el-option label="指定时间" value="beijing"></el-option>
+            <el-option label="间隔时间" value="beijing"></el-option>
+          </el-select>
+        </el-form-item>
+        <!-- <el-form-item label="活动时间">
+          <el-col :span="11">
+            <el-date-picker type="date" placeholder="选择日期" v-model="form.date1" style="width: 100%;"></el-date-picker>
+          </el-col>
+          <el-col class="line" :span="2">-</el-col>
+          <el-col :span="11">
+            <el-time-picker placeholder="选择时间" v-model="form.date2" style="width: 100%;"></el-time-picker>
+          </el-col>
+        </el-form-item> -->
+       
+        <el-form-item label="同步内容:">
+          下载数据
+          <el-checkbox-group v-model="form.type" @change="change_auto1">
+              <el-checkbox v-for="item in autoArr1" :key="item.id" :label="item" :value="item.name">{{ item.name }}</el-checkbox>
+          </el-checkbox-group>
+          上传数据
+          <el-checkbox-group v-model="form.type" @change="change_auto1">
+              <el-checkbox v-for="item in autoArr2" :key="item.id" :label="item" :value="item.name">{{ item.name }}</el-checkbox>
+          </el-checkbox-group>
+        </el-form-item>
+
+
+        <el-divider></el-divider>
+
+        <el-form-item label="手动同步:">
+          <el-button class="successBorder" @click="handleSearch">立刻同步</el-button>
+        </el-form-item>
+
+        <el-form-item label="同步内容:">
+          下载数据
+          <el-checkbox-group v-model="form.type" @change="change_auto1">
+              <el-checkbox v-for="item in autoArr1" :key="item.id" :label="item" :value="item.name">{{ item.name }}</el-checkbox>
+          </el-checkbox-group>
+          上传数据
+          <el-checkbox-group v-model="form.type" @change="change_auto1">
+              <el-checkbox v-for="item in autoArr2" :key="item.id" :label="item" :value="item.name">{{ item.name }}</el-checkbox>
+          </el-checkbox-group>
+        </el-form-item>
+       
+       
+      </el-form>
+ 
+
+   
+  </div>
+
+</template>
+
+<script>
+import { GetDataByName, PostDataByName, failproccess, checkButtons } from '@/api/common'
+import Cookies from 'js-cookie'
+import Pagination from '@/components/Pagination'
+export default {
+  name: 'DataSynchronization',
+  components: { Pagination },
+  data() {
+    return {
+      isRoleEdit: [],
+      enableList: [{ id: 1, name: '是' }, { id: 0, name: '否' }],
+      autoArr1: [
+        { id: '栏舍', name: '栏舍' }, 
+        { id: '配方', name: '配方' },
+        { id: '饲料', name: '饲料' },
+        { id: '饲料分类', name: '饲料分类' },
+        { id: '牲畜类别', name: '牲畜类别' },
+        { id: '驾驶员', name: '驾驶员' }
+      ],
+      autoArr2: [
+        { id: '栏舍', name: '栏舍' }, 
+        { id: '配方', name: '配方' },
+        { id: '搅拌数据', name: '饲料' },
+        { id: '发料数据', name: '饲料分类' },
+        { id: '剩料数据', name: '牲畜类别' },
+        { id: '干物质信息', name: '干物质信息' },
+        { id: '滨州筛', name: '滨州筛' },
+        { id: '粪便筛', name: '粪便筛' },
+        { id: '计划完成车次', name: '计划完成车次' },
+        { id: '实际完成车次', name: '实际完成车次' },
+        { id: '计划重量', name: '计划重量' },
+        { id: '完成重量', name: '完成重量' },
+        { id: '准确率', name: '准确率' },
+      ],
+
+       form: {
+          name: '',
+          region: '',
+          date1: '',
+          date2: '',
+          delivery: false,
+          type: [],
+          resource: '',
+          desc: ''
+        },
+
+
+      table: {
+        getdataListParm: {
+          name: 'getPastureList',
+          page: 1,
+          offset: 1,
+          pagecount: parseInt(Cookies.get('pageCount')),
+          returntype: 'Map',
+          parammaps: {
+            'pastureid': Cookies.get('pastureid'),
+            'phone': '',
+            'contact': '',
+            'address': '',
+            'pastureName': '',
+            enable: ''
+          }
+        },
+        tableKey: 0,
+        list: [],
+        total: 0,
+        listLoading: true,
+        temp: {}
+      },
+      requestParam: {},
+      arrowDown: true,
+      arrowUp: false,
+      rowStyle: { maxHeight: 30 + 'px', height: 30 + 'px' },
+      cellStyle: { padding: 0 + 'px' }
+
+    }
+  },
+
+  created() {
+ 
+    this.getButtons()
+  },
+  mounted() {
+  
+  },
+  methods: {
+    getButtons() {
+      const Edit = 'RanchInformation'
+      const isRoleEdit = checkButtons(JSON.parse(sessionStorage.getItem('buttons')), Edit)
+      this.isRoleEdit = isRoleEdit
+    },
+
+    onSubmit() {
+        console.log('submit!');
+      },
+       change_auto1() {
+        console.log('submit!');
+      },
+    handleEnableChange() {
+      console.log('点击了是否启用')
+    },
+    handleConfirmStartChange() {
+      console.log('点击了确认开始')
+    },
+    handleSearch() {
+      console.log('点击了查询')
+      this.getList()
+      this.table.getdataListParm.offset = 1
+      this.arrowDown = true
+      this.arrowUp = false
+    },
+ 
+  }
+}
+</script>
+<style lang="scss" scoped>
+  .search{margin-top:10px;}
+  .table{margin-top:10px;}
+