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_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' # VUE_APP_BASE_API = 'http://line.kszny.picaiba.com'

Binary file not shown.

View File

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

View File

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

View File

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

View File

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

View File

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