Compare commits

..

No commits in common. "2e8852f6670392ec4f4efa6e7c7444ef7c262499" and "b7ab59d5cdb67930343d67d204713689d441584f" have entirely different histories.

3 changed files with 19 additions and 19 deletions

View File

@ -1,8 +1,8 @@
### ###
# @Author: Do not edit # @Author: Do not edit
# @Date: 2023-08-29 09:40:39 # @Date: 2023-08-29 09:40:39
# @LastEditTime: 2024-01-08 16:23:54 # @LastEditTime: 2024-01-04 15:50:26
# @LastEditors: DY # @LastEditors: zhp
# @Description: # @Description:
### ###
# 开发环境配置 # 开发环境配置
@ -15,7 +15,9 @@ VUE_APP_TITLE = MES系统
# VUE_APP_BASE_API = 'http://100.64.0.26:48082' # VUE_APP_BASE_API = 'http://100.64.0.26:48082'
VUE_APP_BASE_API = 'http://192.168.0.33:48082' VUE_APP_BASE_API = 'http://192.168.0.33:48082'
# VUE_APP_BASE_API = 'http://192.168.1.101:8080'
# VUE_APP_BASE_API = 'http://10.70.2.2:8080'
# VUE_APP_BASE_API = 'http://192.168.4.173:48080' # VUE_APP_BASE_API = 'http://192.168.4.173:48080'
# VUE_APP_BASE_API = 'http://192.168.2.173:48080' # VUE_APP_BASE_API = 'http://192.168.2.173:48080'
# VUE_APP_BASE_API = 'http://192.168.1.49:48082' # VUE_APP_BASE_API = 'http://192.168.1.49:48082'
@ -23,7 +25,7 @@ VUE_APP_BASE_API = 'http://192.168.0.33:48082'
# VUE_APP_BASE_API = 'http://192.168.4.159:48080' # VUE_APP_BASE_API = 'http://192.168.4.159:48080'
# VUE_APP_BASE_API = 'http://192.168.1.104:48082' # VUE_APP_BASE_API = 'http://192.168.1.104:48082'
# VUE_APP_BASE_API = 'http://192.168.1.62:48082' # VUE_APP_BASE_API = 'http://192.168.1.62:48082'
# VUE_APP_BASE_API = 'http://192.168.1.78:48082' VUE_APP_BASE_API = 'http://192.168.1.78:48082'
# socket地址 # socket地址
VUE_APP_Socket_API = 'ws://192.168.0.33:48082' VUE_APP_Socket_API = 'ws://192.168.0.33:48082'

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-11-18 14:16:25 * @Date: 2021-11-18 14:16:25
* @LastEditors: DY * @LastEditors: DY
* @LastEditTime: 2024-01-08 16:11:03 * @LastEditTime: 2023-12-06 10:36:56
* @Description: * @Description:
--> -->
<template> <template>
@ -253,7 +253,6 @@ export default {
dataRule: { dataRule: {
code: [{ required: true, message: "产品编码不能为空", trigger: "blur" }], code: [{ required: true, message: "产品编码不能为空", trigger: "blur" }],
name: [{ required: true, message: "产品名称不能为空", trigger: "blur" }], name: [{ required: true, message: "产品名称不能为空", trigger: "blur" }],
specifications: [{ required: true, message: "规格不能为空", trigger: "blur" }],
materialType: [{ required: true, message: "物料类型不能为空", trigger: "change" }], materialType: [{ required: true, message: "物料类型不能为空", trigger: "change" }],
productType: [{ required: true, message: "产品类型不能为空", trigger: "change" }], productType: [{ required: true, message: "产品类型不能为空", trigger: "change" }],
processTime: [{ required: true, message: "产线生产单位用时不能为空", trigger: "blur" }] processTime: [{ required: true, message: "产线生产单位用时不能为空", trigger: "blur" }]

View File

@ -51,10 +51,10 @@ export default {
components: {}, components: {},
props: {}, props: {},
data() { data() {
// const now = new Date().getTime(); const now = new Date();
// const [y, m, d] = [now.getFullYear(), now.getMonth(), now.getDate()]; // const [y, m, d] = [now.getFullYear(), now.getMonth(), now.getDate()];
const today = new Date().getTime(); const today = new Date().getTime();
const tenminAgo = new Date(today - (10 * 60 * 1000)).getTime(); const tenminAgo = today - (10 * 60 * 1000);
return { return {
searchBarFormConfig: [ searchBarFormConfig: [
{ {
@ -77,7 +77,7 @@ export default {
dateType: 'datetimerange', // datetimerange dateType: 'datetimerange', // datetimerange
format: 'yyyy-MM-dd HH:mm:ss', format: 'yyyy-MM-dd HH:mm:ss',
// valueFormat: 'yyyy-MM-dd HH:mm:ss', // valueFormat: 'yyyy-MM-dd HH:mm:ss',
valueFormat: 'yyyy-MM-dd HH:mm:ss', valueFormat: 'timestamp',
rangeSeparator: '-', rangeSeparator: '-',
startPlaceholder: '开始时间', startPlaceholder: '开始时间',
endPlaceholder: '结束时间', endPlaceholder: '结束时间',
@ -94,8 +94,8 @@ export default {
}, },
], ],
queryParams: { queryParams: {
equipmentId: null, id: null,
recordTime: [parseTime(tenminAgo), parseTime(today)], time: [tenminAgo, today],
}, },
tableList: [ tableList: [
// { // {
@ -118,7 +118,7 @@ export default {
beforeRouteEnter(to, from, next) { beforeRouteEnter(to, from, next) {
if (Object.keys(to.params).length > 0) { if (Object.keys(to.params).length > 0) {
next((vm) => { next((vm) => {
vm.$set(vm.queryParams, 'equipmentId', to.params.equipmentId); vm.$set(vm.queryParams, 'id', to.params.equipmentId);
vm.$set( vm.$set(
vm.searchBarFormConfig[0], vm.searchBarFormConfig[0],
'defaultSelect', 'defaultSelect',
@ -132,7 +132,7 @@ export default {
vm.$set( vm.$set(
vm.searchBarFormConfig[2], vm.searchBarFormConfig[2],
'defaultSelect', 'defaultSelect',
vm.queryParams.recordTime vm.queryParams.time
); );
vm.handleQuery(); vm.handleQuery();
}); });
@ -167,7 +167,7 @@ export default {
}, },
beforeRouteLeave(to, from, next) { beforeRouteLeave(to, from, next) {
// clean job // clean job
this.$set(this.queryParams, 'equipmentId', null); this.$set(this.queryParams, 'id', null);
this.$set(this.searchBarFormConfig[0], 'defaultSelect', null); this.$set(this.searchBarFormConfig[0], 'defaultSelect', null);
this.$set(this.searchBarFormConfig[1], 'defaultSelect', null); this.$set(this.searchBarFormConfig[1], 'defaultSelect', null);
this.tableList = []; this.tableList = [];
@ -204,7 +204,7 @@ export default {
props.push({ props.push({
label: item.name, label: item.name,
prop: item.name, prop: item.name,
// width: 128, width: 128,
}); });
firstLineData[item.name] = `${item.minValue ?? ''}-${ firstLineData[item.name] = `${item.minValue ?? ''}-${
item.maxValue ?? '' item.maxValue ?? ''
@ -280,15 +280,14 @@ export default {
async handleSearchBarBtnClick({ btnName, timeVal }) { async handleSearchBarBtnClick({ btnName, timeVal }) {
if (timeVal && timeVal.length > 0) { if (timeVal && timeVal.length > 0) {
console.log('nihc ', timeVal) if (timeVal[1] - timeVal[0] <= 10 * 60 * 1000) {
if (new Date(timeVal[1]).getTime() - new Date(timeVal[0]).getTime() <= 10 * 60 * 1000) { this.queryParams.time = timeVal;
this.queryParams.recordTime = timeVal;
await this.handleQuery(); await this.handleQuery();
} else { } else {
this.$message.warning('时间范围最大一小时限制!') this.$message.warning('时间范围最大一小时限制!')
} }
} else { } else {
this.queryParams.recordTime = []; this.queryParams.time = [];
this.$message.warning('时间段必选!') this.$message.warning('时间段必选!')
} }