|
@@ -88,6 +88,7 @@
|
|
|
:row-style="rowStyle"
|
|
|
:cell-style="cellStyle"
|
|
|
class="elTable table-fixed"
|
|
|
+ max-height="300"
|
|
|
>
|
|
|
<el-table-column label="操作编号" min-width="50px" align="center" prop="sort" />
|
|
|
<el-table-column label="栏舍名称" min-width="50px" align="center" prop="fname" />
|
|
@@ -122,12 +123,14 @@ import * as echarts from 'echarts';
|
|
|
require('echarts/theme/macarons')
|
|
|
import Cookies from 'js-cookie'
|
|
|
import { GetDataByName,postJson, GetReportform, formatNum } from '@/api/common'
|
|
|
+import { parseTime } from '@/utils/index.js'
|
|
|
export default {
|
|
|
name: 'See',
|
|
|
props: {
|
|
|
show: { type: Boolean, default: false }, // 弹框可见标志
|
|
|
titleFname: { type: String, defalut: '准确性详情' },
|
|
|
methodName:{ type: String, defalut: '' },
|
|
|
+ methodPastureid:{ type: String, defalut: '' },
|
|
|
rowPid: { type: String, defalut: '0' },
|
|
|
optdevice: { type: String, defalut: '' },
|
|
|
startTime:{ type: String, defalut: '' },
|
|
@@ -141,6 +144,7 @@ export default {
|
|
|
title: '',
|
|
|
pid: '',
|
|
|
methodname:'',
|
|
|
+ methodpastureid:'',
|
|
|
optdevice1:'',
|
|
|
startTime1:'',
|
|
|
stopTime1:'',
|
|
@@ -216,6 +220,14 @@ export default {
|
|
|
this.methodname = newVal
|
|
|
}
|
|
|
},
|
|
|
+ methodPastureid: {
|
|
|
+ immediate: true,
|
|
|
+ handler(newVal, oldVal) {
|
|
|
+ console.log(newVal, 'methodPastureid')
|
|
|
+ this.methodpastureid = newVal
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
optdevice: {
|
|
|
immediate: true,
|
|
|
handler(newVal, oldVal) {
|
|
@@ -258,6 +270,7 @@ export default {
|
|
|
},
|
|
|
// TMR设备列表
|
|
|
getList1() {
|
|
|
+ console.log(this.seepastureid,'this.seepastureid')
|
|
|
this.table1.listLoading = true
|
|
|
this.table1.getdataListParm.name = this.methodname
|
|
|
this.table1.getdataListParm.parammaps.optdevice = this.optdevice1
|
|
@@ -265,11 +278,11 @@ export default {
|
|
|
this.table1.getdataListParm.parammaps.stopTime = this.stopTime1
|
|
|
this.table1.getdataListParm.parammaps.pid = this.pid
|
|
|
this.table1.getdataListParm.parammaps.error = this.error1
|
|
|
- this.table1.getdataListParm.parammaps.pastureid = Cookies.get('pastureid')
|
|
|
+ this.table1.getdataListParm.parammaps.pastureid = this.methodpastureid
|
|
|
let url = 'api/v1/ops/accuracy/data_by_name'
|
|
|
let data = {}
|
|
|
data.api_name = this.table1.getdataListParm.name
|
|
|
- data.optdevice = this.table1.getdataListParm.parammaps.optdevice
|
|
|
+ data.optdevice = this.table1.getdataListParm.parammaps.optdevice
|
|
|
data.start_time = this.table1.getdataListParm.parammaps.startTime
|
|
|
data.end_time = this.table1.getdataListParm.parammaps.stopTime
|
|
|
data.pid = this.table1.getdataListParm.parammaps.pid
|
|
@@ -285,6 +298,9 @@ export default {
|
|
|
this.table3.getdataListParm.parammaps.pastureid = response.data.list[0].pastureid
|
|
|
this.chart1.getdataListParm.parammaps.pid = response.data.list[0].pid
|
|
|
this.chart1.getdataListParm.parammaps.pastureid = response.data.list[0].pastureid
|
|
|
+ this.getList2()
|
|
|
+ this.getList3()
|
|
|
+ this.getChart1()
|
|
|
} else {
|
|
|
this.table1.list = []
|
|
|
this.table2.getdataListParm.parammaps.pid = ''
|
|
@@ -294,9 +310,6 @@ export default {
|
|
|
this.chart1.getdataListParm.parammaps.pid = ''
|
|
|
this.chart1.getdataListParm.parammaps.pastureid = ''
|
|
|
}
|
|
|
- this.getList2()
|
|
|
- this.getList3()
|
|
|
- this.getChart1()
|
|
|
setTimeout(() => {
|
|
|
this.table1.listLoading = false
|
|
|
}, 100)
|
|
@@ -305,7 +318,16 @@ export default {
|
|
|
getList2() {
|
|
|
this.table2.listLoading = true
|
|
|
this.table2.getdataListParm.parammaps.error = this.error
|
|
|
- GetDataByName(this.table2.getdataListParm).then(response => {
|
|
|
+ let url = 'api/v1/ops/accuracy/data_by_name'
|
|
|
+ let data = {}
|
|
|
+ data.api_name = this.table2.getdataListParm.name
|
|
|
+ data.error = this.table2.getdataListParm.parammaps.error
|
|
|
+ data.pasture_id = this.methodpastureid
|
|
|
+ data.pid = this.table2.getdataListParm.parammaps.pid
|
|
|
+ data.start_time = parseTime(new Date(), '{y}-{m}-{d}')
|
|
|
+ data.end_time = parseTime(new Date(), '{y}-{m}-{d}')
|
|
|
+ postJson(url,data).then(response => {
|
|
|
+ // GetDataByName(this.table2.getdataListParm).then(response => {
|
|
|
console.log('混料信息数据', response.data.list)
|
|
|
if (response.data !== null && response.data.list !== null) {
|
|
|
this.table2.list = response.data.list
|
|
@@ -337,7 +359,17 @@ export default {
|
|
|
getList3() {
|
|
|
this.table3.listLoading = true
|
|
|
this.table3.getdataListParm.parammaps.error = this.error
|
|
|
- GetDataByName(this.table3.getdataListParm).then(response => {
|
|
|
+ console.log(this.table3.getdataListParm,'table2')
|
|
|
+ let url = 'api/v1/ops/accuracy/data_by_name'
|
|
|
+ let data = {}
|
|
|
+ data.api_name = this.table3.getdataListParm.name
|
|
|
+ data.error = this.table3.getdataListParm.parammaps.error
|
|
|
+ data.pasture_id = this.methodpastureid
|
|
|
+ data.pid = this.table3.getdataListParm.parammaps.pid
|
|
|
+ data.start_time = parseTime(new Date(), '{y}-{m}-{d}')
|
|
|
+ data.end_time = parseTime(new Date(), '{y}-{m}-{d}')
|
|
|
+ postJson(url,data).then(response => {
|
|
|
+ // GetDataByName(this.table3.getdataListParm).then(response => {
|
|
|
if (response.data !== null && response.data.list !== null) {
|
|
|
console.log('撒料信息数据', response.data.list)
|
|
|
this.table3.list = response.data.list
|
|
@@ -369,7 +401,19 @@ export default {
|
|
|
getChart1() {
|
|
|
this.chart1.listLoading = true
|
|
|
this.chart1.getdataListParm.parammaps.error = this.error
|
|
|
- GetReportform(this.chart1.getdataListParm).then(response => {
|
|
|
+ let page = 0
|
|
|
+ let page_size = 0
|
|
|
+ let url = '/api/v1/ops/process/analysis/mixed_sprinkle_detail' + '?page=' + page + '&page_size=' + page_size
|
|
|
+ let data = {
|
|
|
+ 'pasture_id':this.methodpastureid,
|
|
|
+ 'api_name':this.chart1.getdataListParm.name,
|
|
|
+ 'start_time':this.chart1.getdataListParm.parammaps.startTime,
|
|
|
+ 'end_time':this.chart1.getdataListParm.parammaps.stopTime
|
|
|
+ }
|
|
|
+ if(this.chart1.getdataListParm.parammaps.pid){
|
|
|
+ data.pid = this.chart1.getdataListParm.parammaps.pid
|
|
|
+ }
|
|
|
+ postJson(url, data).then(response => {
|
|
|
if (response.data !== null && response.data.list !== null) {
|
|
|
this.chart1.list = response.data.data
|
|
|
console.log('监控图', response.data.list)
|