projects/qhd-line-zhp #464

Merged
zhp merged 2 commits from projects/qhd-line-zhp into projects/qhd-line-test 2025-12-12 16:57:02 +08:00
7 changed files with 98 additions and 75 deletions

View File

@@ -12,7 +12,7 @@ ENV = 'development'
VUE_APP_TITLE = 智能监控分析系统
# 芋道管理系统/开发环境
VUE_APP_BASE_API = 'http://172.16.32.79:48080'
VUE_APP_BASE_API = 'http://172.16.32.79:48082'
# VUE_APP_BASE_API = 'http://line.kszny.picaiba.com'

Binary file not shown.

View File

@@ -401,6 +401,7 @@ export default {
activeLabel: 'table', // 当班数据tab
activeLabelDay: 'table', // 当天数据tab
fileName: '',
headFormValue: {},
dataListLoading: false,
tableProps,
factoryColumns: [],
@@ -571,6 +572,7 @@ export default {
prop: 'processType',
label: '产品类型',
filter: (val) => (val != 1 ? '面板' : '背板'),
sortable: true,
fixed: true
},
{
@@ -967,33 +969,34 @@ export default {
},
// 搜索/导出按钮点击
buttonClick(val) {
this.headFormValue = val
if (this.activeName === 'productLine') {
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.factoryId = val.factoryId || undefined;
this.listQuery.process = val.process ? val.process : [];
this.listQuery.lineId = val.lineId ? val.lineId : [];
this.listQuery.processType = val.processType ? val.processType : [];
this.listQuery.reportType = val.reportType || undefined;
this.listQuery.timeType = val.timeType || undefined;
this.listQuery.searchType = val.searchType || undefined;
this.listQuery.factoryId = this.headFormValue.factoryId || undefined;
this.listQuery.process = this.headFormValue.process ? this.headFormValue.process : [];
this.listQuery.lineId = this.headFormValue.lineId ? this.headFormValue.lineId : [];
this.listQuery.processType = this.headFormValue.processType ? this.headFormValue.processType : [];
this.listQuery.reportType = this.headFormValue.reportType || undefined;
this.listQuery.timeType = this.headFormValue.timeType || undefined;
this.listQuery.searchType = this.headFormValue.searchType || undefined;
// 处理不同时间选择类型
if (val.timeVal) {
this.listQuery.startTime = val.timeVal[0];
this.listQuery.endTime = val.timeVal[1];
} else if (val.timeValWeek) {
if (this.headFormValue.timeVal) {
this.listQuery.startTime = this.headFormValue.timeVal[0];
this.listQuery.endTime = this.headFormValue.timeVal[1];
} else if (this.headFormValue.timeValWeek) {
// 周选择器
const { startTime, endTime } = this.getWeekTimeRange(val.timeValWeek);
const { startTime, endTime } = this.getWeekTimeRange(this.headFormValue.timeValWeek);
this.listQuery.startTime = startTime;
this.listQuery.endTime = endTime;
} else if (val.timeValMonth) {
} else if (this.headFormValue.timeValMonth) {
// 月选择器
this.listQuery.startTime = val.timeValMonth[0];
this.listQuery.endTime = val.timeValMonth[1];
} else if (val.timeValYear) {
this.listQuery.startTime = this.headFormValue.timeValMonth[0];
this.listQuery.endTime = this.headFormValue.timeValMonth[1];
} else if (this.headFormValue.timeValYear) {
// 年选择器
const { startTime, endTime } = this.getYearTimeRange(val.timeValYear);
const { startTime, endTime } = this.getYearTimeRange(this.headFormValue.timeValYear);
this.listQuery.startTime = startTime;
this.listQuery.endTime = endTime;
} else {
@@ -1003,30 +1006,30 @@ export default {
} else {
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.factoryId = val.factoryId || []
this.listQuery.process = val.process ? val.process : [];
this.listQuery.factoryId = this.headFormValue.factoryId || []
this.listQuery.process = this.headFormValue.process ? this.headFormValue.process : [];
this.listQuery.lineId = undefined;
this.listQuery.processType = val.processType ? val.processType : [];
this.listQuery.reportType = val.reportType || undefined;
this.listQuery.timeType = val.timeType || undefined;
this.listQuery.searchType = val.searchType || undefined;
this.listQuery.processType = this.headFormValue.processType ? this.headFormValue.processType : [];
this.listQuery.reportType = this.headFormValue.reportType || undefined;
this.listQuery.timeType = this.headFormValue.timeType || undefined;
this.listQuery.searchType = this.headFormValue.searchType || undefined;
// 处理不同时间选择类型
if (val.timeVal) {
this.listQuery.startTime = val.timeVal[0];
this.listQuery.endTime = val.timeVal[1];
} else if (val.timeValWeek) {
if (this.headFormValue.timeVal) {
this.listQuery.startTime = this.headFormValue.timeVal[0];
this.listQuery.endTime = this.headFormValue.timeVal[1];
} else if (this.headFormValue.timeValWeek) {
// 周选择器
const { startTime, endTime } = this.getWeekTimeRange(val.timeValWeek);
const { startTime, endTime } = this.getWeekTimeRange(this.headFormValue.timeValWeek);
this.listQuery.startTime = startTime;
this.listQuery.endTime = endTime;
} else if (val.timeValMonth) {
} else if (this.headFormValue.timeValMonth) {
// 月选择器
this.listQuery.startTime = val.timeValMonth[0];
this.listQuery.endTime = val.timeValMonth[1];
} else if (val.timeValYear) {
this.listQuery.startTime = this.headFormValue.timeValMonth[0];
this.listQuery.endTime = this.headFormValue.timeValMonth[1];
} else if (this.headFormValue.timeValYear) {
// 年选择器
const { startTime, endTime } = this.getYearTimeRange(val.timeValYear);
const { startTime, endTime } = this.getYearTimeRange(this.headFormValue.timeValYear);
this.listQuery.startTime = startTime;
this.listQuery.endTime = endTime;
} else {
@@ -1140,7 +1143,15 @@ export default {
},
async getProductList() {
console.log('resGroup');
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.factoryId = this.headFormValue.factoryId || []
this.listQuery.process = this.headFormValue.process ? this.headFormValue.process : [];
this.listQuery.lineId = undefined;
this.listQuery.processType = this.headFormValue.processType ? this.headFormValue.processType : [];
this.listQuery.reportType = this.headFormValue.reportType || undefined;
this.listQuery.timeType = this.headFormValue.timeType || undefined;
this.listQuery.searchType = this.headFormValue.searchType || undefined
if (this.listQuery.timeType === 2) {
const resGroup = await getProcessAutoReportNew(this.listQuery);
console.log('resGroup', resGroup);

View File

@@ -406,6 +406,7 @@ export default {
factoryColumns: [],
factoryColumnsDay: [],
activeName: 'product',
headFormValue: {},
tableBtn: [],
showData: [],
tableData: [],
@@ -535,6 +536,7 @@ export default {
prop: 'processType',
label: '产品类型',
filter: (val) => (val != 1 ? '面板' : '背板'),
sortable: true,
fixed: true
},
{
@@ -557,6 +559,7 @@ export default {
prop: 'processType',
label: '产品类型',
filter: (val) => (val != 1 ? '面板' : '背板'),
sortable: true,
fixed: true
},
{
@@ -625,7 +628,6 @@ export default {
// 1. 确定当前激活的类型(产线/产品)
const isProductLine = val === '按产线监控';
this.activeName = isProductLine ? 'productLine' : 'product';
// console.log('isProductLine', isProductLine);
console.log('isProductLine', isProductLine);
// 2. 提取公共重置逻辑(无论切换到哪个标签,都需要执行的操作)
@@ -939,33 +941,34 @@ export default {
// 搜索/导出按钮点击
buttonClick(val) {
this.headFormValue = val
if (this.activeName === 'productLine') {
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.factoryId = val.factoryId || undefined;
this.listQuery.process = val.process ? val.process : [];
this.listQuery.lineId = val.lineId ? val.lineId : [];
this.listQuery.processType = val.processType ? val.processType : [];
this.listQuery.reportType = val.reportType || undefined;
this.listQuery.timeType = val.timeType || undefined;
this.listQuery.searchType = val.searchType || undefined;
this.listQuery.factoryId = this.headFormValue.factoryId || undefined;
this.listQuery.process = this.headFormValue.process ? this.headFormValue.process : [];
this.listQuery.lineId = this.headFormValue.lineId ? this.headFormValue.lineId : [];
this.listQuery.processType = this.headFormValue.processType ? this.headFormValue.processType : [];
this.listQuery.reportType = this.headFormValue.reportType || undefined;
this.listQuery.timeType = this.headFormValue.timeType || undefined;
this.listQuery.searchType = this.headFormValue.searchType || undefined;
// 处理不同时间选择类型
if (val.timeVal) {
this.listQuery.startTime = val.timeVal[0];
this.listQuery.endTime = val.timeVal[1];
} else if (val.timeValWeek) {
if (this.headFormValue.timeVal) {
this.listQuery.startTime = this.headFormValue.timeVal[0];
this.listQuery.endTime = this.headFormValue.timeVal[1];
} else if (this.headFormValue.timeValWeek) {
// 周选择器
const { startTime, endTime } = this.getWeekTimeRange(val.timeValWeek);
const { startTime, endTime } = this.getWeekTimeRange(this.headFormValue.timeValWeek);
this.listQuery.startTime = startTime;
this.listQuery.endTime = endTime;
} else if (val.timeValMonth) {
} else if (this.headFormValue.timeValMonth) {
// 月选择器
this.listQuery.startTime = val.timeValMonth[0];
this.listQuery.endTime = val.timeValMonth[1];
} else if (val.timeValYear) {
this.listQuery.startTime = this.headFormValue.timeValMonth[0];
this.listQuery.endTime = this.headFormValue.timeValMonth[1];
} else if (this.headFormValue.timeValYear) {
// 年选择器
const { startTime, endTime } = this.getYearTimeRange(val.timeValYear);
const { startTime, endTime } = this.getYearTimeRange(this.headFormValue.timeValYear);
this.listQuery.startTime = startTime;
this.listQuery.endTime = endTime;
} else {
@@ -975,30 +978,30 @@ export default {
} else {
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.factoryId = val.factoryId || []
this.listQuery.process = val.process ? val.process : [];
this.listQuery.factoryId = this.headFormValue.factoryId || []
this.listQuery.process = this.headFormValue.process ? this.headFormValue.process : [];
this.listQuery.lineId = undefined;
this.listQuery.processType = val.processType ? val.processType : [];
this.listQuery.reportType = val.reportType || undefined;
this.listQuery.timeType = val.timeType || undefined;
this.listQuery.searchType = val.searchType || undefined;
this.listQuery.processType = this.headFormValue.processType ? this.headFormValue.processType : [];
this.listQuery.reportType = this.headFormValue.reportType || undefined;
this.listQuery.timeType = this.headFormValue.timeType || undefined;
this.listQuery.searchType = this.headFormValue.searchType || undefined;
// 处理不同时间选择类型
if (val.timeVal) {
this.listQuery.startTime = val.timeVal[0];
this.listQuery.endTime = val.timeVal[1];
} else if (val.timeValWeek) {
if (this.headFormValue.timeVal) {
this.listQuery.startTime = this.headFormValue.timeVal[0];
this.listQuery.endTime = this.headFormValue.timeVal[1];
} else if (this.headFormValue.timeValWeek) {
// 周选择器
const { startTime, endTime } = this.getWeekTimeRange(val.timeValWeek);
const { startTime, endTime } = this.getWeekTimeRange(this.headFormValue.timeValWeek);
this.listQuery.startTime = startTime;
this.listQuery.endTime = endTime;
} else if (val.timeValMonth) {
} else if (this.headFormValue.timeValMonth) {
// 月选择器
this.listQuery.startTime = val.timeValMonth[0];
this.listQuery.endTime = val.timeValMonth[1];
} else if (val.timeValYear) {
this.listQuery.startTime = this.headFormValue.timeValMonth[0];
this.listQuery.endTime = this.headFormValue.timeValMonth[1];
} else if (this.headFormValue.timeValYear) {
// 年选择器
const { startTime, endTime } = this.getYearTimeRange(val.timeValYear);
const { startTime, endTime } = this.getYearTimeRange(this.headFormValue.timeValYear);
this.listQuery.startTime = startTime;
this.listQuery.endTime = endTime;
} else {
@@ -1110,7 +1113,15 @@ export default {
},
async getProductList() {
console.log('resGroup');
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.factoryId = this.headFormValue.factoryId || []
this.listQuery.process = this.headFormValue.process ? this.headFormValue.process : [];
this.listQuery.lineId = undefined;
this.listQuery.processType = this.headFormValue.processType ? this.headFormValue.processType : [];
this.listQuery.reportType = this.headFormValue.reportType || undefined;
this.listQuery.timeType = this.headFormValue.timeType || undefined;
this.listQuery.searchType = this.headFormValue.searchType || undefined
if (this.listQuery.timeType === 2) {
const resGroup = await getProcessAutoReportNew(this.listQuery);
console.log('resGroup', resGroup);

View File

@@ -278,8 +278,8 @@ export default {
mobileCodeTimer: 0,
loginForm: {
loginType: 'uname',
username: 'admin',
password: 'admin123',
username: '',
password: '',
captchaVerification: '',
mobile: '',
mobileCode: '',

View File

@@ -121,6 +121,7 @@ export default {
type: 'select',
label: '产线',
selectOptions: [],
multiple: true,
param: 'lineId',
},
{

View File

@@ -98,8 +98,8 @@ export default {
init(data) {
this.visible = true;
this.factoryName = data.factoryName || '未知工厂';
this.lineName = data.lineName || '未知产线';
this.factoryName = data.factoryName || '';
this.lineName = data.lineName || '';
if (data.startTime && data.endTime) {
const start = moment(data.startTime).format('yyyy-MM-DD HH:mm:ss');