duanxiaoduan 2 gadi atpakaļ
vecāks
revīzija
7c4011cb09

BIN
dist.zip


+ 18 - 27
src/views/formulationPlan/recipeTemplate/index.vue

@@ -3070,22 +3070,17 @@ export default {
         MessageBox.confirm('当前选中' + this.selectList.length + '条信息,是否生效?', {
           confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
         }).then(() => {
+          let ids = []
           for (let i = 0; i < this.selectList.length; i++) {
-            // this.$set(this.selectList[i], 'enable', '1')
-            this.selectList[i].enable = 1
+            ids.push(this.selectList[i].id)
           }
-          console.log('生效', this.selectList)
-          this.requestParam.common = { 'returnmap': '0' }
-          this.requestParam.data = []
-          this.requestParam.data[0] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.selectList }}
-          this.requestParam.data[0].children = []
-          this.requestParam.data[0].children[0] = { 'name': 'updateRemainplanEnable', 'type': 'e', 'parammaps': {
-            enable: '@insertSpotList.enable',
-            id: '@insertSpotList.id',
-            pastureid: '@insertSpotList.pastureid'
-          }}
-          ExecDataByConfig(this.requestParam).then(response => {
-            console.log('生效保存发送参数', this.requestParam)
+          var data = {}
+          data.parammaps = {}
+          data.parammaps.enable = 1
+          data.parammaps.id = ids.toString()
+          var url = 'authdata/feedtemplet/enable'
+          postJson(url,data).then(response => {
+            console.log('生效保存发送参数', data)
             if (response.msg === 'fail') {
               this.$notify({ title: '生效失败', message: response.data, type: 'warning', duration: 2000 })
             } else {
@@ -3103,21 +3098,17 @@ export default {
         MessageBox.confirm('当前选中' + this.selectList.length + '条信息,是否禁用?', {
           confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
         }).then(() => {
+          let ids = []
           for (let i = 0; i < this.selectList.length; i++) {
-            // this.$set(this.selectList[i], 'enable', '1')
-            this.selectList[i].enable = 0
+            ids.push(this.selectList[i].id)
           }
-          console.log('禁用', this.selectList)
-          this.requestParam.common = { 'returnmap': '0' }
-          this.requestParam.data = []
-          this.requestParam.data[0] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.selectList }}
-          this.requestParam.data[0].children = []
-          this.requestParam.data[0].children[0] = { 'name': 'updateRemainplanEnable', 'type': 'e', 'parammaps': {
-            enable: '@insertSpotList.enable',
-            id: '@insertSpotList.id',
-            pastureid: '@insertSpotList.pastureid'
-          }}
-          ExecDataByConfig(this.requestParam).then(response => {
+          var data = {}
+          data.parammaps = {}
+          data.parammaps.enable = 0
+          data.parammaps.id = ids.toString()
+          console.log('禁用', data)
+          var url = 'authdata/feedtemplet/enable'
+          postJson(url,data).then(response => {
             console.log('禁用保存发送参数', this.requestParam)
             if (response.msg === 'fail') {
               this.$notify({ title: '禁用失败', message: response.data, type: 'warning', duration: 2000 })

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

@@ -199,11 +199,7 @@
                 <el-option v-for="item in parentList" :key="item.value" :label="item.label" :value="item.value" />
               </el-select> -->
 <!-- 注释内容后续版本更 -->
-                <el-input v-else ref="cowclass" v-model="create.temp.cowclass" disabled class="filter-item" placeholder="牲畜类别" />
-
-               
-
-              
+                <!-- <el-input v-else ref="cowclass" v-model="create.temp.cowclass" disabled class="filter-item" placeholder="牲畜类别" /> -->
               </el-form-item>
             </el-col>
             <el-col :span="6">

+ 21 - 1
src/views/statisticalAnalysis/errorAnalysis/pasture/index.vue

@@ -19,7 +19,7 @@
           <el-input v-if="tab.isTrainNumber" v-model="tab.table.getdataListParm.parammaps.times" class="filter-item" style="width: 100px;" placeholder="班次" />
           <el-input v-if="tab.isTrainNumber" v-model="tab.table.getdataListParm.parammaps.fname" class="filter-item" style="width: 100px;" placeholder="TMR名称" />
           <el-select v-if="tab.isTMRName" v-model="tab.table.getdataListParm.parammaps.fname" placeholder="请选择TMR设备" class="filter-item" style="width: 150px;">
-            <el-option v-for="item in statisticalTypeList" :key="item.id" :label="item.name" :value="item.id" />
+            <el-option v-for="(item,index) in tab.TMRNameList" :key="index" :label="item.tmrloadname" :value="item.tmrloadname" />
           </el-select>
           <el-button class="successBorder" @click="handleSearch">查询</el-button>
           <el-button class="export" icon="el-icon-upload2" @click="handleDownload">导出</el-button>
@@ -829,6 +829,7 @@ export default {
       },
       activeName: 'first',
       tab: {
+        TMRNameList:[],
         radio: '0',
         isDriver: true,
         isFormulaName: false, // 配方名称
@@ -2185,6 +2186,7 @@ export default {
         this.getTabList()
         this.tab.table2.getdataListParm.offset = 1
         this.getTabList2()
+        this.getTMRNameList()
       }
     },
     // 按日期统计
@@ -2328,6 +2330,7 @@ export default {
         this.getTabList()
         this.tab.table2.getdataListParm.offset = 1
         this.getTabList2()
+        this.getTMRNameList()
       }
       this.tab.table2.getdataListParm.parammaps.fname = this.tab.table.getdataListParm.parammaps.fname
     },
@@ -2353,6 +2356,7 @@ export default {
       this.tab.table2.getdataListParm.parammaps.startTime = this.tab.table.getdataListParm.parammaps.startTime
       this.tab.table2.getdataListParm.parammaps.stopTime = this.tab.table.getdataListParm.parammaps.stopTime
       this.getTabList2()
+      this.getTMRNameList()
     },
     handleNext() {
       this.$forceUpdate()
@@ -2376,6 +2380,7 @@ export default {
       this.tab.table2.getdataListParm.parammaps.startTime = this.tab.table.getdataListParm.parammaps.startTime
       this.tab.table2.getdataListParm.parammaps.stopTime = this.tab.table.getdataListParm.parammaps.stopTime
       this.getTabList2()
+      this.getTMRNameList()
     },
     handleBefore2() {
       this.$forceUpdate()
@@ -3675,6 +3680,21 @@ export default {
       console.log(row, 'row')
       this.rowPid = row.pid
       this.isShowDialog = true
+    },
+    getTMRNameList(){
+      var data = {}
+      data.name = 'getAccuracyMCTmrName'
+      data.parammaps = {}
+      data.parammaps.pastureid = Cookies.get('pastureid')
+      data.parammaps.startTime =  this.tab.table.getdataListParm.parammaps.startTime
+      data.parammaps.stopTime = this.tab.table.getdataListParm.parammaps.stopTime
+      GetDataByName(data).then(response => {
+        if(response.data.list !== null){
+          this.tab.TMRNameList = response.data.list
+        }else{
+          this.tab.TMRNameList =  []
+        }
+      })
     }
   }
 }