|
|
|
|
@@ -332,33 +332,51 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
if (this.$route.params.startTime && this.$route.params.endTime) {
|
|
|
|
|
this.searchBarFormConfig[0].defaultSelect = [this.$route.params.startTime, this.$route.params.endTime]
|
|
|
|
|
this.searchBarFormConfig[0].defaultSelect = [
|
|
|
|
|
this.$route.params.startTime,
|
|
|
|
|
this.$route.params.endTime,
|
|
|
|
|
];
|
|
|
|
|
this.queryParams.param = {};
|
|
|
|
|
this.$set(this.queryParams.param, 'startTime', this.$route.params.startTime);
|
|
|
|
|
this.$set(
|
|
|
|
|
this.queryParams.param,
|
|
|
|
|
'startTime',
|
|
|
|
|
this.$route.params.startTime
|
|
|
|
|
);
|
|
|
|
|
this.$set(this.queryParams.param, 'endTime', this.$route.params.endTime);
|
|
|
|
|
} else {
|
|
|
|
|
this.searchBarFormConfig[0].defaultSelect = []
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
this.searchBarFormConfig[0].defaultSelect = [];
|
|
|
|
|
}
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
watch: {
|
|
|
|
|
$route: 'initData'
|
|
|
|
|
},
|
|
|
|
|
$route: 'initData',
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
initData(to) {
|
|
|
|
|
// console.log(to)
|
|
|
|
|
if (to.name === 'QualityStatistics') {
|
|
|
|
|
if (this.$route.params.startTime && this.$route.params.endTime) {
|
|
|
|
|
this.searchBarFormConfig[0].defaultSelect = [this.$route.params.startTime, this.$route.params.endTime]
|
|
|
|
|
if (to.name === 'QualityStatistics') {
|
|
|
|
|
if (this.$route.params.startTime && this.$route.params.endTime) {
|
|
|
|
|
this.searchBarFormConfig[0].defaultSelect = [
|
|
|
|
|
this.$route.params.startTime,
|
|
|
|
|
this.$route.params.endTime,
|
|
|
|
|
];
|
|
|
|
|
this.queryParams.param = {};
|
|
|
|
|
this.$set(this.queryParams.param, 'startTime', this.$route.params.startTime);
|
|
|
|
|
this.$set(this.queryParams.param, 'endTime', this.$route.params.endTime);
|
|
|
|
|
this.$set(
|
|
|
|
|
this.queryParams.param,
|
|
|
|
|
'startTime',
|
|
|
|
|
this.$route.params.startTime
|
|
|
|
|
);
|
|
|
|
|
this.$set(
|
|
|
|
|
this.queryParams.param,
|
|
|
|
|
'endTime',
|
|
|
|
|
this.$route.params.endTime
|
|
|
|
|
);
|
|
|
|
|
} else {
|
|
|
|
|
this.searchBarFormConfig[0].defaultSelect = []
|
|
|
|
|
this.searchBarFormConfig[0].defaultSelect = [];
|
|
|
|
|
}
|
|
|
|
|
this.getList();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
getList() {
|
|
|
|
|
this.getSummaryList();
|
|
|
|
|
this.getDetailedList();
|
|
|
|
|
@@ -367,20 +385,17 @@ export default {
|
|
|
|
|
async getSummaryList() {
|
|
|
|
|
const response = await this.$axios({
|
|
|
|
|
url: '/monitoring/statistical-data/getUpPart',
|
|
|
|
|
method: 'get',
|
|
|
|
|
params: this.queryParams.param
|
|
|
|
|
method: 'post',
|
|
|
|
|
data: this.queryParams.param
|
|
|
|
|
? {
|
|
|
|
|
param: {
|
|
|
|
|
// startTime: new Date(2022, 6, 1, 0, 0, 0).getTime(), // '2023-07-01 00:00:00',
|
|
|
|
|
// endTime: new Date(2023, 7, 10, 0, 0, 0).getTime(), // '2023-08-10 00:00:00',
|
|
|
|
|
startTime: this.queryParams.param.startTime,
|
|
|
|
|
endTime: this.queryParams.param.endTime,
|
|
|
|
|
},
|
|
|
|
|
// startTime: new Date(2022, 6, 1, 0, 0, 0).getTime(), // '2023-07-01 00:00:00',
|
|
|
|
|
// endTime: new Date(2023, 7, 10, 0, 0, 0).getTime(), // '2023-08-10 00:00:00',
|
|
|
|
|
startTime: this.queryParams.param.startTime,
|
|
|
|
|
endTime: this.queryParams.param.endTime,
|
|
|
|
|
}
|
|
|
|
|
: null,
|
|
|
|
|
: {},
|
|
|
|
|
});
|
|
|
|
|
this.summaryList = response.data;
|
|
|
|
|
console.log('summaryList', this.summaryList);
|
|
|
|
|
},
|
|
|
|
|
/** 获取 检测内容和产线关联 列表 */
|
|
|
|
|
async getDetailedList() {
|
|
|
|
|
@@ -388,22 +403,21 @@ export default {
|
|
|
|
|
data: { data, otherList, otherMap, nameData },
|
|
|
|
|
} = await this.$axios({
|
|
|
|
|
url: '/monitoring/statistical-data/getDownPart',
|
|
|
|
|
params: this.queryParams.param
|
|
|
|
|
method: 'post',
|
|
|
|
|
data: this.queryParams.param
|
|
|
|
|
? {
|
|
|
|
|
param: {
|
|
|
|
|
// startTime: new Date(2023, 6, 1).getTime(), // '2023-07-01 00:00:00',
|
|
|
|
|
// endTime: new Date(2023, 7, 22).getTime(), // '2023-08-10 00:00:00',
|
|
|
|
|
startTime: this.queryParams.param.startTime,
|
|
|
|
|
endTime: this.queryParams.param.endTime,
|
|
|
|
|
},
|
|
|
|
|
// startTime: new Date(2023, 6, 1).getTime(), // '2023-07-01 00:00:00',
|
|
|
|
|
// endTime: new Date(2023, 7, 22).getTime(), // '2023-08-10 00:00:00',
|
|
|
|
|
startTime: this.queryParams.param.startTime,
|
|
|
|
|
endTime: this.queryParams.param.endTime,
|
|
|
|
|
}
|
|
|
|
|
: null,
|
|
|
|
|
: {},
|
|
|
|
|
});
|
|
|
|
|
// this.list = response.data;
|
|
|
|
|
console.log('data', data);
|
|
|
|
|
console.log('otherList', otherList);
|
|
|
|
|
console.log('otherMap', otherMap);
|
|
|
|
|
console.log('nameData', nameData);
|
|
|
|
|
// console.log('data', data);
|
|
|
|
|
// console.log('otherList', otherList);
|
|
|
|
|
// console.log('otherMap', otherMap);
|
|
|
|
|
// console.log('nameData', nameData);
|
|
|
|
|
|
|
|
|
|
this.dynamicProps = this.filterNameData(nameData);
|
|
|
|
|
this.list = this.filterData(data);
|
|
|
|
|
|