|  | @@ -40,11 +40,11 @@
 | 
	
		
			
				|  |  |        <!-- <el-button class="success" icon="el-icon-plus" @click="handleGetSapCode">获取SAP编码</el-button> -->
 | 
	
		
			
				|  |  |        <el-button v-if="isDelete" class="danger" icon="el-icon-delete" @click="handleDelete">删除</el-button>
 | 
	
		
			
				|  |  |        <!-- <el-button class="success" icon="el-icon-receiving" @click="handleFeedBank">饲料库</el-button> -->
 | 
	
		
			
				|  |  | -     <!-- <el-button v-if="isOrder" icon="el-icon-sort" class="success" @click="handleChangeOrder">更改顺序</el-button>
 | 
	
		
			
				|  |  | +     <el-button v-if="isOrder && isSort" icon="el-icon-sort" class="success" @click="handleChangeOrder">更改顺序</el-button>
 | 
	
		
			
				|  |  |         <div v-else style="display: inline-block;">
 | 
	
		
			
				|  |  | -        <el-button icon="el-icon-folder-checked" class="success" @click="saveChangeOrder">保存</el-button>
 | 
	
		
			
				|  |  | -        <el-button icon="el-icon-close" class="sortCancel" @click="cancelChangeOrder">取消</el-button>
 | 
	
		
			
				|  |  | -      </div> -->
 | 
	
		
			
				|  |  | +        <el-button v-if="isSort" icon="el-icon-folder-checked" class="success" @click="saveChangeOrder">保存</el-button>
 | 
	
		
			
				|  |  | +        <el-button v-if="isSort" icon="el-icon-close" class="sortCancel" @click="cancelChangeOrder">取消</el-button>
 | 
	
		
			
				|  |  | +      </div>
 | 
	
		
			
				|  |  |        <el-upload style="float: right;" action="#" :http-request="httpRequest" :show-file-list="false" :on-change="handleChange" :before-upload="beforeAvatarUpload" multiple accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet">
 | 
	
		
			
				|  |  |          <el-button v-if="isImport" class="import" icon="el-icon-download" style="float: right;">导入</el-button>
 | 
	
		
			
				|  |  |        </el-upload>
 | 
	
	
		
			
				|  | @@ -102,7 +102,7 @@
 | 
	
		
			
				|  |  |              <span v-if="scope.row.confirm_start == 1">启用</span>
 | 
	
		
			
				|  |  |              <span v-else>禁用</span>
 | 
	
		
			
				|  |  |            </template>
 | 
	
		
			
				|  |  | -        </u-table-column> 
 | 
	
		
			
				|  |  | +        </u-table-column>
 | 
	
		
			
				|  |  |          <u-table-column label="继电器位置" min-width="80px" align="center" prop="relay_locations" />
 | 
	
		
			
				|  |  |          <u-table-column label="无上域" min-width="60px" align="center">
 | 
	
		
			
				|  |  |            <template slot-scope="scope">
 | 
	
	
		
			
				|  | @@ -921,7 +921,7 @@ export default {
 | 
	
		
			
				|  |  |          name: "",
 | 
	
		
			
				|  |  |          file: null,
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  | -      isAdd:'',isEdit:'',isResetpassword:'',isDelete:'',isEnable:'',isImport:'',isExport:''
 | 
	
		
			
				|  |  | +      isAdd:'',isEdit:'',isResetpassword:'',isDelete:'',isEnable:'',isImport:'',isExport:'',isSort:''
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -941,7 +941,8 @@ export default {
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    created() {
 | 
	
		
			
				|  |  |      this.getButton()
 | 
	
		
			
				|  |  | -    this.getList()
 | 
	
		
			
				|  |  | +    this.getList()
 | 
	
		
			
				|  |  | +    // this.getInforvalueList()
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |    methods: {
 | 
	
	
		
			
				|  | @@ -958,6 +959,8 @@ export default {
 | 
	
		
			
				|  |  |        this.isImport = checkButtons(_import)
 | 
	
		
			
				|  |  |        const _export = 'rangeManagement:feedTable:export'
 | 
	
		
			
				|  |  |        this.isExport = checkButtons(_export)
 | 
	
		
			
				|  |  | +      const _sort = 'rangeManagement:feedTable:sort'
 | 
	
		
			
				|  |  | +      this.isSort = checkButtons(_sort)
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      getList() {
 | 
	
		
			
				|  |  |        this.table.listLoading = true
 | 
	
	
		
			
				|  | @@ -998,7 +1001,32 @@ export default {
 | 
	
		
			
				|  |  |          }, 1000)
 | 
	
		
			
				|  |  |        })
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | +    getInforvalueList() {
 | 
	
		
			
				|  |  | +      let url = 'api/v1/ops/forage/small_material'
 | 
	
		
			
				|  |  | +      console.log(JSON.parse(sessionStorage.pastureList))
 | 
	
		
			
				|  |  | +      let pastureList = JSON.parse(sessionStorage.pastureList)
 | 
	
		
			
				|  |  | +      let idList = []
 | 
	
		
			
				|  |  | +      pastureList.forEach(item=>{
 | 
	
		
			
				|  |  | +        idList.push(item.id)
 | 
	
		
			
				|  |  | +      })
 | 
	
		
			
				|  |  | +      console.log(idList,'idList')
 | 
	
		
			
				|  |  | +      let data = {
 | 
	
		
			
				|  |  | +        "api_name": "getSysoptEnable",
 | 
	
		
			
				|  |  | +        "pasture_id": idList,
 | 
	
		
			
				|  |  | +        "info_name": "isSmallMaterial"
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +      postJson(url,data).then(response => {
 | 
	
		
			
				|  |  | +        if (response.data !== null) {
 | 
	
		
			
				|  |  | +          if (response.data.list[0].inforvalue == 0) {
 | 
	
		
			
				|  |  | +            this.isInforvalue = false
 | 
	
		
			
				|  |  | +          } else {
 | 
	
		
			
				|  |  | +            this.isInforvalue = true
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  | +        } else {
 | 
	
		
			
				|  |  | +          this.isInforvalue = false
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      })
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  |      handleExport(item) {
 | 
	
		
			
				|  |  |        if (item == 1) {
 | 
	
		
			
				|  |  |          console.log('导出模板')
 | 
	
	
		
			
				|  | @@ -1674,28 +1702,17 @@ export default {
 | 
	
		
			
				|  |  |          var obj = {}
 | 
	
		
			
				|  |  |          obj.sort = i + 1
 | 
	
		
			
				|  |  |          obj.id = this.table.list[i].id
 | 
	
		
			
				|  |  | -        obj.pastureid = this.table.list[i].pastureid
 | 
	
		
			
				|  |  |          sortArr.push(obj)
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  | -      this.requestParam = {}
 | 
	
		
			
				|  |  | -      this.requestParam.common = { 'returnmap': '0' }
 | 
	
		
			
				|  |  | -      this.requestParam.data = []
 | 
	
		
			
				|  |  | -      this.requestParam.data[0] = { 'name': 'insertSpotList', 'resultmaps': { 'list': sortArr }}
 | 
	
		
			
				|  |  | -      this.requestParam.data[0].children = []
 | 
	
		
			
				|  |  | -      this.requestParam.data[0].children[0] = { 'name': 'updateFeedSort', 'type': 'e', 'parammaps': {
 | 
	
		
			
				|  |  | -        id: '@insertSpotList.id',
 | 
	
		
			
				|  |  | -        pastureid: '@insertSpotList.pastureid',
 | 
	
		
			
				|  |  | -        sort: '@insertSpotList.sort'
 | 
	
		
			
				|  |  | -      }}
 | 
	
		
			
				|  |  | -      ExecDataByConfig(this.requestParam).then(response => {
 | 
	
		
			
				|  |  | -        console.log('顺序切换保存发送参数', this.requestParam)
 | 
	
		
			
				|  |  | -        if (response.msg === 'fail') {
 | 
	
		
			
				|  |  | -          this.$notify({ title: '顺序切换失败', message: response.data, type: 'warning', duration: 2000 })
 | 
	
		
			
				|  |  | -        } else {
 | 
	
		
			
				|  |  | -          this.$notify({ title: '', message: '顺序切换成功', type: 'success', duration: 2000 })
 | 
	
		
			
				|  |  | -          this.getList()
 | 
	
		
			
				|  |  | -          this.isOrder = true
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | +      let url = 'api/v1/ops/forage/sort'
 | 
	
		
			
				|  |  | +      let data = {
 | 
	
		
			
				|  |  | +        list:sortArr
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +      postJson(url,data).then(response => {
 | 
	
		
			
				|  |  | +        if(response.code == 200){
 | 
	
		
			
				|  |  | +          this.$notify({ title: '成功', message: '成功', type: 'success', duration: 2000 })
 | 
	
		
			
				|  |  | +          this.getList()
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |        })
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      cancelChangeOrder() {
 |