test #47
@ -9,6 +9,7 @@
|
||||
<!-- 列表 -->
|
||||
<base-table
|
||||
:table-props="tableProps"
|
||||
height="35vh"
|
||||
:page="queryParams.pageNo"
|
||||
:limit="queryParams.pageSize"
|
||||
:table-data="list"></base-table>
|
||||
@ -40,27 +41,27 @@ export default {
|
||||
},
|
||||
tableProps: [
|
||||
{
|
||||
prop: 'pl',
|
||||
prop: 'lineName',
|
||||
label: '产线',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
prop: 'upTotal',
|
||||
prop: 'sumUp',
|
||||
label: '上片总数',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
prop: 'downTotal',
|
||||
prop: 'sumDown',
|
||||
label: '下片总数',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
prop: 'total',
|
||||
prop: 'sumCheck',
|
||||
label: '检测总数',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
prop: 'ratio',
|
||||
prop: 'scrapRatio',
|
||||
label: '比例(%)',
|
||||
align: 'center',
|
||||
},
|
||||
|
@ -62,12 +62,13 @@ export default {
|
||||
dateType: 'daterange', // datetimerange
|
||||
// format: 'yyyy-MM-dd HH:mm:ss',
|
||||
format: 'yyyy-MM-dd',
|
||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||
// valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||
valueFormat: 'timestamp',
|
||||
rangeSeparator: '-',
|
||||
startPlaceholder: '开始日期',
|
||||
endPlaceholder: '结束日期',
|
||||
defaultTime: ['00:00:00', '23:59:59'],
|
||||
param: 'checkTime',
|
||||
param: 'timerange',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
@ -219,6 +220,7 @@ export default {
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
param: null,
|
||||
},
|
||||
summaryList: [],
|
||||
summaryOpen: false,
|
||||
@ -283,32 +285,41 @@ export default {
|
||||
},
|
||||
/** 获取 检测总数 列表 */
|
||||
async getSummaryList() {
|
||||
const response = await this.$axios(
|
||||
'/monitoring/statistical-data/getUpPart',
|
||||
{
|
||||
params: {
|
||||
startTime: '2023-07-01 00:00:00',
|
||||
endTime: '2023-08-10 00:00:00',
|
||||
const response = await this.$axios({
|
||||
url: '/monitoring/statistical-data/getUpPart',
|
||||
method: 'get',
|
||||
params: 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
|
||||
},
|
||||
}
|
||||
);
|
||||
} : null
|
||||
});
|
||||
this.summaryList = response.data;
|
||||
console.log('summaryList', this.summaryList);
|
||||
},
|
||||
/** 获取 检测内容和产线关联 列表 */
|
||||
async getDetailedList() {
|
||||
const {
|
||||
data: { data, otherList, otherMap, nameData },
|
||||
} = await this.$axios('/monitoring/statistical-data/getDownPart', {
|
||||
params: {
|
||||
startTime: '2023-07-01 00:00:00',
|
||||
endTime: '2023-08-10 00:00:00',
|
||||
} = await this.$axios({
|
||||
url: '/monitoring/statistical-data/getDownPart',
|
||||
params: 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
|
||||
},
|
||||
} : 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);
|
||||
},
|
||||
/** 总览关闭 */
|
||||
handleSummaryClose() {
|
||||
@ -316,10 +327,15 @@ export default {
|
||||
},
|
||||
/** 搜索按钮 */
|
||||
handleSearchBarBtnClick(btn) {
|
||||
console.log('bnt, ', btn);
|
||||
switch (btn.btnName) {
|
||||
case 'search':
|
||||
this.queryParams[key] = btn[key] || null;
|
||||
// this.handleQuery();
|
||||
if (btn.timerange && typeof btn.timerange === 'object') {
|
||||
this.queryParams.param = {}
|
||||
this.$set(this.queryParams.param, 'startTime', btn.timerange[0]);
|
||||
this.$set(this.queryParams.param, 'endTime', btn.timerange[1]);
|
||||
}
|
||||
this.handleQuery();
|
||||
break;
|
||||
case 'summary':
|
||||
this.summaryOpen = true;
|
||||
@ -336,6 +352,10 @@ export default {
|
||||
break;
|
||||
}
|
||||
},
|
||||
handleQuery() {
|
||||
this.getSummaryList();
|
||||
this.getDetailedList();
|
||||
},
|
||||
/** 处理表格事件 */
|
||||
handleEmitFun() {},
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user