Merge branch 'master' of http://10.153.19.25:10105/r/YiWuProject
| | |
| | | height:'Height', |
| | | }, |
| | | productStock:{ |
| | | configName:'配置名', |
| | | configCode:'配置代码', |
| | | configValue:'配置值', |
| | | addusers:'Add user', |
| | | username:'User name', |
| | | usernamea:'User name:', |
| | |
| | | height: 'Высота', |
| | | }, |
| | | productStock: { |
| | | configName:'配置名', |
| | | configCode:'配置代码', |
| | | configValue:'配置值', |
| | | addusers: 'Добавьте пользователей.', |
| | | username: 'Имя пользователя.', |
| | | usernamea: 'Имя пользователя.:', |
| | |
| | | height:'高度', |
| | | }, |
| | | productStock:{ |
| | | addconfigName:'添加配置', |
| | | editconfigName:'修改配置', |
| | | configName:'配置名', |
| | | configCode:'配置代码', |
| | | configValue:'配置值', |
| | | configValuea:'配置值:', |
| | | addusers:'添加用户', |
| | | username:'用户名', |
| | | usernamea:'用户名:', |
| | |
| | | import { useRouter } from 'vue-router'; |
| | | import { useI18n } from 'vue-i18n' |
| | | import { provide } from 'vue'; |
| | | import {host, WebSocketHost} from '@/utils/constants' |
| | | import {closeWebSocket, initializeWebSocket} from '@/utils/WebSocketService'; |
| | | // import {host, WebSocketHost} from '@/utils/constants' |
| | | // import {closeWebSocket, initializeWebSocket} from '@/utils/WebSocketService'; |
| | | const globalDate = ref(''); |
| | | const { t } = useI18n() |
| | | let language = ref(localStorage.getItem('lang') || 'zh') |
| | |
| | | }) |
| | | router.push('/login') |
| | | } |
| | | let socket = null; |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/loadGlass/api/talk/mainMes`; |
| | | const handleMessage = (data) => { |
| | | if(data.globalDate!=null){ |
| | | window.localStorage.setItem('getglobalDate', data.globalDate[0]) |
| | | }else{ |
| | | globalDate.value = '' |
| | | } |
| | | } |
| | | let getglobalDate = window.localStorage.getItem('getglobalDate') |
| | | provide('globalDate', getglobalDate); |
| | | // let socket = null; |
| | | // const socketUrl = `ws://${WebSocketHost}:${host}/api/loadGlass/api/talk/mainMes`; |
| | | // const handleMessage = (data) => { |
| | | // if(data.globalDate!=null){ |
| | | // window.localStorage.setItem('getglobalDate', data.globalDate[0]) |
| | | // }else{ |
| | | // globalDate.value = '' |
| | | // } |
| | | // } |
| | | function replaceChineseWithEnglish(menuData) { |
| | | // 定义中俄文对照关系对象 |
| | | const translation = { |
| | |
| | | router.push('/login') |
| | | } |
| | | }) |
| | | request.post('/loadGlass/sys/menu/getNowDate').then((res) => { |
| | | if (res.code == 200) { |
| | | window.localStorage.setItem('getglobalDate', res.data) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | const menu = ref(null) |
| | | let indexKey = ref(null) |
| | | function handleOpen(key) { |
| | |
| | | isCollapse.value = !isCollapse.value; |
| | | } |
| | | onMounted(() => { |
| | | socket = initializeWebSocket(socketUrl, handleMessage); |
| | | // fetchlack() |
| | | // socket = initializeWebSocket(socketUrl, handleMessage); |
| | | }); |
| | | onUnmounted(() => { |
| | | if (socket) { |
| | | closeWebSocket(socket); |
| | | } |
| | | }); |
| | | // const fetchlack = async () => { |
| | | // try { |
| | | // console.log(33333); |
| | | // const response = await request.post('/loadGlass/sys/menu/getNowDate') |
| | | // console.log(response.code); |
| | | // if (response.code == 200) { |
| | | // console.log(11111); |
| | | // console.log(response.data); |
| | | // console.log(2222); |
| | | // // window.localStorage.setItem('getglobalDate', response.data) |
| | | // } else { |
| | | // ElMessage.error(response.message); |
| | | // } |
| | | // } |
| | | // catch (error) { |
| | | // // 处理错误 |
| | | // } |
| | | // } |
| | | let getglobalDate = window.localStorage.getItem('getglobalDate') |
| | | provide('globalDate', getglobalDate); |
| | | // onUnmounted(() => { |
| | | // if (socket) { |
| | | // closeWebSocket(socket); |
| | | // } |
| | | // }); |
| | | </script> |
| | | <template> |
| | | <div id="all"> |
| | |
| | | path: '/User/permissions', |
| | | name: 'permissions', |
| | | component: () => import('../views/User/permissions.vue') |
| | | }, |
| | | { |
| | | path: '/User/userpageNo', |
| | | name: 'userpageNo', |
| | | component: () => import('../views/User/userpageNo.vue') |
| | | } |
| | | ] |
| | | }, |
| | |
| | | } |
| | | tableDataa.value = data.EdgStorageCageinfos[0] |
| | | tableDatab.value = data.taskMessage |
| | | // adjustedRects.value = data.EdgStorageCageinfos[0].map(rect => ({ |
| | | // ...rect, |
| | | // width: rect.width * 0.5 , |
| | | // id: rect.id * 10, |
| | | // })); |
| | | adjustedRects.value = data.EdgStorageCageinfos[0].map((rect, index) => ({ |
| | | ...rect, |
| | | id: rect.id * 9, |
| | | showRect: !!data.EdgStorageCageinfos[0][index]?.details[0] |
| | | })); |
| | | }; |
| | | // 格式化后端时间并计算一周前的时间 |
| | | const defaultTime = ref<[Date, Date]>([new Date(), new Date()]); |
| | |
| | | </el-card> |
| | | <div class="awatch"> |
| | | <img src="../../assets/woshihuancun.png" alt="" style="width: 50%;height: 70%;margin-left: 30%;margin-top: 20px;position: relative;"> |
| | | <div style="position: relative; width: 500px;height: 95px;margin-top: -165px;margin-left: 450px;"> |
| | | <div style="position: relative; width: 500px;height: 95px;margin-top: -142px;margin-left: 600px;"> |
| | | <div |
| | | v-for="(rect, index) in adjustedRects" |
| | | v-show="rect.showRect" |
| | | :key="rect" |
| | | :style="{ position: 'absolute', |
| | | top: `${rect.id}px`, left: `10px`, width: `${rect.width}px`, height: `5px`, |
| | | top: `${rect.id}px`, left: `10px`, width: `422px`, height: `3px`, |
| | | backgroundColor: '#409EFF' |
| | | }" |
| | | > |
| | |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | <el-date-picker v-model="timeRange" type="datetimerange" range-separator="至" :start-placeholder="$t('reportmanage.starttime')" |
| | | style="margin-left: 15px;" value-format = "YYYY-MM-DD hh:mm:ss" |
| | | :end-placeholder="$t('reportmanage.endtime')"> |
| | | </el-date-picker> |
| | | <el-date-picker |
| | | style="margin-left: 15px;" |
| | | v-model="timeRange" |
| | | type="datetimerange" |
| | | :shortcuts="shortcuts" |
| | | range-separator="至" |
| | | :start-placeholder="$t('reportmanage.starttime')" |
| | | :end-placeholder="$t('reportmanage.endtime')" |
| | | /> |
| | | <el-button type="primary" style="margin-left: 10px;margin-bottom: 10px;" @click="handleClick()">{{$t('reportmanage.inquire')}}</el-button> |
| | | </div> |
| | | <div style="margin-bottom: 10px;margin-top: 20px;margin-left: 20px;"> |
| | |
| | | glassId: glassId.value, |
| | | taskState: taskState.value, |
| | | taskType: taskType.value, |
| | | startTime: (timeRange.value && timeRange.value[0]) || '', |
| | | endTime: (timeRange.value && timeRange.value[1]) || '', |
| | | beginDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[0])) || '', |
| | | endDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[1])) || '', |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | |
| | | glassId: glassId.value, |
| | | taskState: taskState.value, |
| | | taskType: taskType.value, |
| | | startTime: (timeRange.value && timeRange.value[0]) || '', |
| | | endTime: (timeRange.value && timeRange.value[1]) || '', |
| | | beginDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[0])) || '', |
| | | endDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[1])) || '', |
| | | }) |
| | | if (response.code == 200) { |
| | | countOutOne.value = response.data.countOutOne |
| | |
| | | glassId: glassId.value, |
| | | taskState: taskState.value, |
| | | taskType: taskType.value, |
| | | startTime: (timeRange.value && timeRange.value[0]) || '', |
| | | endTime: (timeRange.value && timeRange.value[1]) || '', |
| | | beginDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[0])) || '', |
| | | endDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[1])) || '', |
| | | }) |
| | | if (response.code == 200) { |
| | | currentPage2.value = 1; |
| | |
| | | glassId: glassId.value, |
| | | taskState: taskState.value, |
| | | taskType: taskType.value, |
| | | startTime: (timeRange.value && timeRange.value[0]) || '', |
| | | endTime: (timeRange.value && timeRange.value[1]) || '', |
| | | beginDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[0])) || '', |
| | | endDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[1])) || '', |
| | | }) |
| | | if (response.code == 200) { |
| | | countOutOne.value = response.data.countOutOne |
| | |
| | | const seconds = String(date.getSeconds()).padStart(2, '0'); // 补零(如果需要显示时间) |
| | | return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; |
| | | } |
| | | const shortcuts = [ |
| | | { |
| | | text: '最近一周', |
| | | value: () => { |
| | | const backendTime = new Date(getglobalDate) |
| | | const oneWeekAgo = new Date(getglobalDate) |
| | | oneWeekAgo.setHours(0, 0, 0, 0); |
| | | oneWeekAgo.setDate(oneWeekAgo.getDate() - 7) |
| | | timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)] |
| | | window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo)) |
| | | }, |
| | | }, |
| | | { |
| | | text: '最近一个月', |
| | | value: () => { |
| | | const backendTime = new Date(getglobalDate) |
| | | const oneWeekAgo = new Date(getglobalDate) |
| | | oneWeekAgo.setHours(0, 0, 0, 0); |
| | | oneWeekAgo.setMonth(oneWeekAgo.getMonth() - 1) |
| | | timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)] |
| | | window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo)) |
| | | }, |
| | | }, |
| | | { |
| | | text: '最近三个月', |
| | | value: () => { |
| | | const backendTime = new Date(getglobalDate) |
| | | const oneWeekAgo = new Date(getglobalDate) |
| | | oneWeekAgo.setHours(0, 0, 0, 0); |
| | | oneWeekAgo.setMonth(oneWeekAgo.getMonth() - 3) |
| | | timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)] |
| | | window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo)) |
| | | }, |
| | | }, |
| | | ] |
| | | // 格式化后端时间并计算一周前的时间 |
| | | const defaultTime = ref<[Date, Date]>([new Date(), new Date()]); |
| | | function parseAndSetTime() { |
| | |
| | | } |
| | | tableDataa.value = data.EdgStorageCageinfos[0] |
| | | tableDatab.value = data.taskMessage |
| | | adjustedRects.value = data.EdgStorageCageinfos[0].map((rect, index) => ({ |
| | | ...rect, |
| | | id: rect.id * 9, |
| | | showRect: !!data.EdgStorageCageinfos[0][index]?.details[0] |
| | | })); |
| | | }; |
| | | // 格式化后端时间并计算一周前的时间 |
| | | const defaultTime = ref<[Date, Date]>([new Date(), new Date()]); |
| | |
| | | </el-card> |
| | | <div class="awatch"> |
| | | <img src="../../assets/woshihuancun.png" alt="" style="width: 50%;height: 70%;margin-left: 30%;margin-top: 20px;position: relative;"> |
| | | <div style="position: relative; width: 500px;height: 95px;margin-top: -165px;margin-left: 450px;"> |
| | | <div style="position: relative; width: 500px;height: 95px;margin-top: -222px;margin-left: 600px;"> |
| | | <div |
| | | v-for="(rect, index) in adjustedRects" |
| | | v-show="rect.showRect" |
| | | :key="rect" |
| | | :style="{ position: 'absolute', |
| | | top: `${rect.id}px`, left: `10px`, width: `${rect.width}px`, height: `5px`, |
| | | top: `${rect.id}px`, left: `10px`, width: `422px`, height: `3px`, |
| | | backgroundColor: '#409EFF' |
| | | }" |
| | | > |
| | |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | <el-date-picker v-model="timeRange" type="datetimerange" range-separator="至" :start-placeholder="$t('reportmanage.starttime')" |
| | | style="margin-left: 15px;" value-format = "YYYY-MM-DD hh:mm:ss" |
| | | :end-placeholder="$t('reportmanage.endtime')"> |
| | | </el-date-picker> |
| | | <el-date-picker |
| | | style="margin-left: 15px;" |
| | | v-model="timeRange" |
| | | type="datetimerange" |
| | | :shortcuts="shortcuts" |
| | | range-separator="至" |
| | | :start-placeholder="$t('reportmanage.starttime')" |
| | | :end-placeholder="$t('reportmanage.endtime')" |
| | | /> |
| | | <el-button type="primary" style="margin-left: 10px;margin-bottom: 10px;" @click="handleClick()">{{$t('reportmanage.inquire')}}</el-button> |
| | | </div> |
| | | <div style="margin-bottom: 10px;margin-top: 20px;margin-left: 20px;"> |
| | |
| | | glassId: glassId.value, |
| | | taskState: taskState.value, |
| | | taskType: taskType.value, |
| | | startTime: (timeRange.value && timeRange.value[0]) || '', |
| | | endTime: (timeRange.value && timeRange.value[1]) || '', |
| | | beginDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[0])) || '', |
| | | endDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[1])) || '', |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | |
| | | glassId: glassId.value, |
| | | taskState: taskState.value, |
| | | taskType: taskType.value, |
| | | startTime: (timeRange.value && timeRange.value[0]) || '', |
| | | endTime: (timeRange.value && timeRange.value[1]) || '', |
| | | beginDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[0])) || '', |
| | | endDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[1])) || '', |
| | | }) |
| | | if (response.code == 200) { |
| | | countOutTwo.value = response.data.countOutTwo |
| | |
| | | glassId: glassId.value, |
| | | taskState: taskState.value, |
| | | taskType: taskType.value, |
| | | startTime: (timeRange.value && timeRange.value[0]) || '', |
| | | endTime: (timeRange.value && timeRange.value[1]) || '', |
| | | beginDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[0])) || '', |
| | | endDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[1])) || '', |
| | | }) |
| | | if (response.code == 200) { |
| | | currentPage2.value = 1; |
| | |
| | | glassId: glassId.value, |
| | | taskState: taskState.value, |
| | | taskType: taskType.value, |
| | | startTime: (timeRange.value && timeRange.value[0]) || '', |
| | | endTime: (timeRange.value && timeRange.value[1]) || '', |
| | | beginDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[0])) || '', |
| | | endDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[1])) || '', |
| | | }) |
| | | if (response.code == 200) { |
| | | countOutTwo.value = response.data.countOutTwo |
| | |
| | | const seconds = String(date.getSeconds()).padStart(2, '0'); // 补零(如果需要显示时间) |
| | | return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; |
| | | } |
| | | const shortcuts = [ |
| | | { |
| | | text: '最近一周', |
| | | value: () => { |
| | | const backendTime = new Date(getglobalDate) |
| | | const oneWeekAgo = new Date(getglobalDate) |
| | | oneWeekAgo.setHours(0, 0, 0, 0); |
| | | oneWeekAgo.setDate(oneWeekAgo.getDate() - 7) |
| | | timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)] |
| | | window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo)) |
| | | }, |
| | | }, |
| | | { |
| | | text: '最近一个月', |
| | | value: () => { |
| | | const backendTime = new Date(getglobalDate) |
| | | const oneWeekAgo = new Date(getglobalDate) |
| | | oneWeekAgo.setHours(0, 0, 0, 0); |
| | | oneWeekAgo.setMonth(oneWeekAgo.getMonth() - 1) |
| | | timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)] |
| | | window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo)) |
| | | }, |
| | | }, |
| | | { |
| | | text: '最近三个月', |
| | | value: () => { |
| | | const backendTime = new Date(getglobalDate) |
| | | const oneWeekAgo = new Date(getglobalDate) |
| | | oneWeekAgo.setHours(0, 0, 0, 0); |
| | | oneWeekAgo.setMonth(oneWeekAgo.getMonth() - 3) |
| | | timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)] |
| | | window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo)) |
| | | }, |
| | | }, |
| | | ] |
| | | // 格式化后端时间并计算一周前的时间 |
| | | const defaultTime = ref<[Date, Date]>([new Date(), new Date()]); |
| | | function parseAndSetTime() { |
| | |
| | | <el-option :label="$t('sorter.advancerequests')" value="4"></el-option> |
| | | <el-option :label="$t('sorter.releaserequest')" value="5"></el-option> |
| | | </el-select> |
| | | <el-date-picker v-model="timeRange" type="datetimerange" range-separator="至" :start-placeholder="$t('reportmanage.starttime')" |
| | | style="margin-left: 15px;" value-format = "YYYY-MM-DD hh:mm:ss" |
| | | :end-placeholder="$t('reportmanage.endtime')"> |
| | | </el-date-picker> |
| | | <el-date-picker |
| | | style="margin-left: 15px;" |
| | | v-model="timeRange" |
| | | type="datetimerange" |
| | | :shortcuts="shortcuts" |
| | | range-separator="至" |
| | | :start-placeholder="$t('reportmanage.starttime')" |
| | | :end-placeholder="$t('reportmanage.endtime')" |
| | | /> |
| | | <el-button type="primary" style="margin-left: 10px;margin-bottom: 10px;" @click="sethistorical()">{{$t('reportmanage.inquire')}}</el-button> |
| | | </div> |
| | | <el-table ref="table" style="margin-top: 20px;height: 580px;width: 1770px;" :data="tableDatax" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | |
| | | pageSize: 20, |
| | | taskState: celllist, |
| | | taskType: stateList, |
| | | beginDate: (timeRange.value && timeRange.value[0]) || '', |
| | | endDate: (timeRange.value && timeRange.value[1]) || '', |
| | | beginDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[0])) || '', |
| | | endDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[1])) || '', |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | |
| | | pageSize: 20, |
| | | taskState: celllist, |
| | | taskType: stateList, |
| | | beginDate: (timeRange.value && timeRange.value[0]) || '', |
| | | endDate: (timeRange.value && timeRange.value[1]) || '', |
| | | beginDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[0])) || '', |
| | | endDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[1])) || '', |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | |
| | | const seconds = String(date.getSeconds()).padStart(2, '0'); // 补零(如果需要显示时间) |
| | | return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; |
| | | } |
| | | const shortcuts = [ |
| | | { |
| | | text: '最近一周', |
| | | value: () => { |
| | | const backendTime = new Date(getglobalDate) |
| | | const oneWeekAgo = new Date(getglobalDate) |
| | | oneWeekAgo.setHours(0, 0, 0, 0); |
| | | oneWeekAgo.setDate(oneWeekAgo.getDate() - 7) |
| | | timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)] |
| | | window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo)) |
| | | }, |
| | | }, |
| | | { |
| | | text: '最近一个月', |
| | | value: () => { |
| | | const backendTime = new Date(getglobalDate) |
| | | const oneWeekAgo = new Date(getglobalDate) |
| | | oneWeekAgo.setHours(0, 0, 0, 0); |
| | | oneWeekAgo.setMonth(oneWeekAgo.getMonth() - 1) |
| | | timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)] |
| | | window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo)) |
| | | }, |
| | | }, |
| | | { |
| | | text: '最近三个月', |
| | | value: () => { |
| | | const backendTime = new Date(getglobalDate) |
| | | const oneWeekAgo = new Date(getglobalDate) |
| | | oneWeekAgo.setHours(0, 0, 0, 0); |
| | | oneWeekAgo.setMonth(oneWeekAgo.getMonth() - 3) |
| | | timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)] |
| | | window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo)) |
| | | }, |
| | | }, |
| | | ] |
| | | // 格式化后端时间并计算一周前的时间 |
| | | const defaultTime = ref<[Date, Date]>([new Date(), new Date()]); |
| | | function parseAndSetTime() { |
| | |
| | | const adjustedRects = ref([]); |
| | | const ava = ref(''); |
| | | const avanum = ref(''); |
| | | const realwidth = ref(''); |
| | | const realheight = ref(''); |
| | | let socket = null; |
| | | const currentGlassRect = computed(() => { |
| | | return adjustedRects.value.find(rect => rect.glassId === currentGlassId.value); |
| | |
| | | }else{ |
| | | avanum.value = '' |
| | | } |
| | | const scaleFactor = 1621.78 / 6000; |
| | | const scaleFactory = 750 / 3300; |
| | | console.log(data.upPattenUsage); |
| | | console.log(data.currentCutTerritory); |
| | | if (data.upPattenUsage && data.upPattenUsage.length > 0) { |
| | | realwidth.value = data.upPattenUsage[0].width; |
| | | realheight.value = data.upPattenUsage[0].height; |
| | | const realx = realwidth.value; |
| | | const realy = realheight.value; |
| | | window.localStorage.setItem('widthreturna', realy) |
| | | const scaleFactora = 1621.78 / realx; |
| | | const scaleFactorya = 750 / realy; |
| | | window.localStorage.setItem('scaleFactorb', scaleFactora) |
| | | window.localStorage.setItem('scaleFactoryb', scaleFactorya) |
| | | } |
| | | if (data.currentCutTerritory && data.currentCutTerritory.length > 0) { |
| | | let scaleFactor = window.localStorage.getItem('scaleFactorb') |
| | | let scaleFactory = window.localStorage.getItem('scaleFactoryb') |
| | | let widthreturn = window.localStorage.getItem('widthreturna') |
| | | const newRects = data.currentCutTerritory[0].map(rect => { |
| | | const existingRect = adjustedRects.value.find(r => r.glassId === rect.glassId); |
| | | if (existingRect) { |
| | | return { |
| | | ...existingRect, |
| | | xAxisa: rect.xAxis * scaleFactor * 1.1, |
| | | yAxisa: (3300 - (rect.yAxis + rect.edgHeight + 300)) * scaleFactory * 1.1, |
| | | width: rect.edgWidth * scaleFactor * 1.1, |
| | | height: rect.edgHeight * scaleFactory * 1.1, |
| | | xAxisa: rect.xAxis * scaleFactor, |
| | | yAxisa: (widthreturn - (rect.yAxis + rect.edgHeight)) * scaleFactory, |
| | | width: rect.edgWidth * scaleFactor, |
| | | height: rect.edgHeight * scaleFactory, |
| | | widtha: rect.edgWidth, |
| | | heighta: rect.edgHeight, |
| | | state: rect.state, |
| | |
| | | // 如果不存在,则添加新矩形,默认 isActive 为 false |
| | | return { |
| | | ...rect, |
| | | xAxisa: rect.xAxis * scaleFactor * 1.1, |
| | | yAxisa: (3300 - (rect.yAxis + rect.edgHeight + 300)) * scaleFactory * 1.1, |
| | | width: rect.edgWidth * scaleFactor * 1.1, |
| | | height: rect.edgHeight * scaleFactory * 1.1, |
| | | xAxisa: rect.xAxis * scaleFactor, |
| | | yAxisa: (widthreturn - (rect.yAxis + rect.edgHeight)) * scaleFactory, |
| | | width: rect.edgWidth * scaleFactor, |
| | | height: rect.edgHeight * scaleFactory, |
| | | widtha: rect.edgWidth, |
| | | heighta: rect.edgHeight, |
| | | state: rect.state, |
| | |
| | | const adjustedRects = ref([]); |
| | | const ava = ref(''); |
| | | const avanum = ref(''); |
| | | const realwidth = ref(''); |
| | | const realheight = ref(''); |
| | | let socket = null; |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/currentCutDrawingTwo`; |
| | | const handleMessage = (data: any) => { |
| | |
| | | }else{ |
| | | avanum.value = '' |
| | | } |
| | | const scaleFactor = 1621.78 / 6000; |
| | | const scaleFactory = 750 / 3300; |
| | | if (data.upPattenUsage && data.upPattenUsage.length > 0) { |
| | | realwidth.value = data.upPattenUsage[0].width; |
| | | realheight.value = data.upPattenUsage[0].height; |
| | | const realx = realwidth.value; |
| | | const realy = realheight.value; |
| | | const scaleFactora = 1621.78 / realx; |
| | | const scaleFactorya = 750 / realy; |
| | | window.localStorage.setItem('widthreturna', realy) |
| | | window.localStorage.setItem('scaleFactorb', scaleFactora) |
| | | window.localStorage.setItem('scaleFactoryb', scaleFactorya) |
| | | } |
| | | if (data.currentCutTerritory && data.currentCutTerritory.length > 0) { |
| | | let scaleFactor = window.localStorage.getItem('scaleFactorb') |
| | | let scaleFactory = window.localStorage.getItem('scaleFactoryb') |
| | | let widthreturn = window.localStorage.getItem('widthreturna') |
| | | const newRects = data.currentCutTerritory[0].map(rect => { |
| | | const existingRect = adjustedRects.value.find(r => r.glassId === rect.glassId); |
| | | if (existingRect) { |
| | | return { |
| | | ...existingRect, |
| | | xAxisa: rect.xAxis * scaleFactor * 1.1, |
| | | yAxisa: (3300 - (rect.yAxis + rect.edgHeight + 300)) * scaleFactory * 1.1, |
| | | width: rect.edgWidth * scaleFactor * 1.1, |
| | | height: rect.edgHeight * scaleFactory * 1.1, |
| | | xAxisa: rect.xAxis * scaleFactor, |
| | | yAxisa: (widthreturn - (rect.yAxis + rect.edgHeight )) * scaleFactory, |
| | | width: rect.edgWidth * scaleFactor, |
| | | height: rect.edgHeight * scaleFactory, |
| | | widtha: rect.edgWidth, |
| | | heighta: rect.edgHeight, |
| | | state: rect.state, |
| | |
| | | // 如果不存在,则添加新矩形,默认 isActive 为 false |
| | | return { |
| | | ...rect, |
| | | xAxisa: rect.xAxis * scaleFactor * 1.1, |
| | | yAxisa: (3300 - (rect.yAxis + rect.edgHeight + 300)) * scaleFactory * 1.1, |
| | | width: rect.edgWidth * scaleFactor * 1.1, |
| | | height: rect.edgHeight * scaleFactory * 1.1, |
| | | xAxisa: rect.xAxis * scaleFactor, |
| | | yAxisa: (widthreturn - (rect.yAxis + rect.edgHeight)) * scaleFactory, |
| | | width: rect.edgWidth * scaleFactor, |
| | | height: rect.edgHeight * scaleFactory, |
| | | widtha: rect.edgWidth, |
| | | heighta: rect.edgHeight, |
| | | state: rect.state, |
| | |
| | | const totalPages = ref(0); |
| | | const pageSize = ref(1); |
| | | const currentPage = ref(''); |
| | | const realwidth = ref(''); |
| | | const realheight = ref(''); |
| | | const disabled = false; |
| | | const size = 'small'; |
| | | const rawData = ref([]); |
| | |
| | | var url="/cacheGlass/taskCache/queryCutDrawingByEngineerId?engineerId="+engineerId.value+ "&patternSequence=" + 1; |
| | | const response = await request.post(url) |
| | | if (response.code === 200) { |
| | | |
| | | const rawRects = response.data.currentCutDrawing; |
| | | rawData.value = response.data; |
| | | totalPages.value = response.data.totalPatternSequence; |
| | | const scaleFactor = 1621.78/6000; |
| | | const scaleFactory = 750/3300; |
| | | realwidth.value = response.data.upPattenUsage.width; |
| | | realheight.value = response.data.upPattenUsage.height; |
| | | const realx = realwidth.value; |
| | | const realy = realheight.value; |
| | | const scaleFactor = 1621.78/realx; |
| | | const scaleFactory = 750/realy; |
| | | adjustedRects.value = rawRects.map(rect => ({ |
| | | ...rect, |
| | | xaxisa: rect.xaxis * scaleFactor * 1.1, |
| | | yaxisa: (3300 - (rect.yaxis + rect.edgHeight + 300)) * scaleFactory * 1.1, |
| | | // xaxisa: (6000 -(rect.xaxis + rect.edgWidth)) * scaleFactor * 1.1, |
| | | // yaxisa: rect.yaxis * scaleFactory * 1.1, |
| | | width: rect.edgWidth * scaleFactor * 1.1, |
| | | xaxisa: rect.xaxis * scaleFactor, |
| | | yaxisa: (realy - (rect.yaxis + rect.edgHeight )) * scaleFactory, |
| | | width: rect.edgWidth * scaleFactor, |
| | | widtha: rect.edgWidth , |
| | | heighta: rect.edgHeight , |
| | | height: rect.edgHeight * scaleFactory * 1.1, |
| | | height: rect.edgHeight * scaleFactory, |
| | | state: rect.state |
| | | })); |
| | | currentPage.value = 1; |
| | |
| | | if (response.code === 200) { |
| | | const rawRects = response.data.currentCutDrawing; |
| | | rawData.value = response.data; |
| | | const scaleFactor = 1621.78/6000; |
| | | const scaleFactory = 750/3300; |
| | | realwidth.value = response.data.upPattenUsage.width; |
| | | realheight.value = response.data.upPattenUsage.height; |
| | | const realx = realwidth.value; |
| | | const realy = realheight.value; |
| | | const scaleFactor = 1621.78/realx; |
| | | const scaleFactory = 750/realy; |
| | | adjustedRects.value = rawRects.map(rect => ({ |
| | | ...rect, |
| | | xaxisa: rect.xaxis * scaleFactor * 1.1, |
| | | yaxisa: (3300 - (rect.yaxis + rect.edgHeight + 300)) * scaleFactory * 1.1, |
| | | width: rect.edgWidth * scaleFactor * 1.1, |
| | | xaxisa: rect.xaxis * scaleFactor, |
| | | yaxisa: (realy - (rect.yaxis + rect.edgHeight )) * scaleFactory, |
| | | width: rect.edgWidth * scaleFactor, |
| | | widtha: rect.edgWidth , |
| | | heighta: rect.edgHeight , |
| | | height: rect.edgHeight * scaleFactory * 1.1, |
| | | height: rect.edgHeight * scaleFactory, |
| | | state: rect.state |
| | | })); |
| | | } |
| | |
| | | <el-option :label="$t('film.execution')" value="1"></el-option> |
| | | <el-option :label="$t('searchOrder.endtask')" value="2"></el-option> |
| | | </el-select> |
| | | <el-date-picker v-model="timeRange" type="datetimerange" range-separator="至" :start-placeholder="$t('reportmanage.starttime')" |
| | | style="margin-left: 15px;" value-format = "YYYY-MM-DD hh:mm:ss" |
| | | :end-placeholder="$t('reportmanage.endtime')"> |
| | | </el-date-picker> |
| | | <el-date-picker |
| | | style="margin-left: 15px;" |
| | | v-model="timeRange" |
| | | type="datetimerange" |
| | | :shortcuts="shortcuts" |
| | | range-separator="至" |
| | | :start-placeholder="$t('reportmanage.starttime')" |
| | | :end-placeholder="$t('reportmanage.endtime')" |
| | | /> |
| | | <el-button type="primary" style="margin-left: 10px;margin-bottom: 10px;" @click="sethistorical()">{{$t('reportmanage.inquire')}}</el-button> |
| | | </div> |
| | | <el-table ref="table" style="margin-top: 20px;height: 580px;width: 1770px;" :data="tableDatax" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | |
| | | slot: pslot, |
| | | station: 1, |
| | | taskStateList: celllist, |
| | | beginDate: (timeRange.value && timeRange.value[0]) || '', |
| | | endDate: (timeRange.value && timeRange.value[1]) || '', |
| | | beginDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[0])) || '', |
| | | endDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[1])) || '', |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | |
| | | slot: pslot, |
| | | station: 1, |
| | | taskStateList: celllist, |
| | | beginDate: (timeRange.value && timeRange.value[0]) || '', |
| | | endDate: (timeRange.value && timeRange.value[1]) || '', |
| | | beginDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[0])) || '', |
| | | endDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[1])) || '', |
| | | }) |
| | | if (response.code == 200) { |
| | | currentPage2.value = 1 |
| | |
| | | const seconds = String(date.getSeconds()).padStart(2, '0'); // 补零(如果需要显示时间) |
| | | return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; |
| | | } |
| | | // 格式化后端时间并计算一周前的时间 |
| | | const defaultTime = ref<[Date, Date]>([new Date(), new Date()]); |
| | | const shortcuts = [ |
| | | { |
| | | text: '最近一周', |
| | | value: () => { |
| | | const backendTime = new Date(getglobalDate) |
| | | const oneWeekAgo = new Date(getglobalDate) |
| | | oneWeekAgo.setHours(0, 0, 0, 0); |
| | | oneWeekAgo.setDate(oneWeekAgo.getDate() - 7) |
| | | timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)] |
| | | window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo)) |
| | | }, |
| | | }, |
| | | { |
| | | text: '最近一个月', |
| | | value: () => { |
| | | const backendTime = new Date(getglobalDate) |
| | | const oneWeekAgo = new Date(getglobalDate) |
| | | oneWeekAgo.setHours(0, 0, 0, 0); |
| | | oneWeekAgo.setMonth(oneWeekAgo.getMonth() - 1) |
| | | timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)] |
| | | window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo)) |
| | | }, |
| | | }, |
| | | { |
| | | text: '最近三个月', |
| | | value: () => { |
| | | const backendTime = new Date(getglobalDate) |
| | | const oneWeekAgo = new Date(getglobalDate) |
| | | oneWeekAgo.setHours(0, 0, 0, 0); |
| | | oneWeekAgo.setMonth(oneWeekAgo.getMonth() - 3) |
| | | timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)] |
| | | window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo)) |
| | | }, |
| | | }, |
| | | ] |
| | | function parseAndSetTime() { |
| | | const backendTime = new Date(getglobalDate); |
| | | const oneWeekAgo = new Date(backendTime.getTime() - 7 * 24 * 60 * 60 * 1000); // 减去7天 |
| | |
| | | <el-option :label="$t('film.execution')" value="1"></el-option> |
| | | <el-option :label="$t('searchOrder.endtask')" value="2"></el-option> |
| | | </el-select> |
| | | <el-date-picker v-model="timeRange" type="datetimerange" range-separator="至" :start-placeholder="$t('reportmanage.starttime')" |
| | | style="margin-left: 15px;" value-format = "YYYY-MM-DD hh:mm:ss" |
| | | :end-placeholder="$t('reportmanage.endtime')"> |
| | | </el-date-picker> |
| | | <el-date-picker |
| | | style="margin-left: 15px;" |
| | | v-model="timeRange" |
| | | type="datetimerange" |
| | | :shortcuts="shortcuts" |
| | | range-separator="至" |
| | | :start-placeholder="$t('reportmanage.starttime')" |
| | | :end-placeholder="$t('reportmanage.endtime')" |
| | | /> |
| | | <el-button type="primary" style="margin-left: 10px;margin-bottom: 10px;" @click="sethistorical()">{{$t('reportmanage.inquire')}}</el-button> |
| | | </div> |
| | | <el-table ref="table" style="margin-top: 20px;height: 580px;width: 1770px;" :data="tableDatax" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | |
| | | slot: pslot, |
| | | station: 2, |
| | | taskStateList: celllist, |
| | | beginDate: (timeRange.value && timeRange.value[0]) || '', |
| | | endDate: (timeRange.value && timeRange.value[1]) || '', |
| | | beginDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[0])) || '', |
| | | endDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[1])) || '', |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | |
| | | slot: pslot, |
| | | station: 2, |
| | | taskStateList: celllist, |
| | | beginDate: (timeRange.value && timeRange.value[0]) || '', |
| | | endDate: (timeRange.value && timeRange.value[1]) || '', |
| | | beginDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[0])) || '', |
| | | endDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[1])) || '', |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | |
| | | const seconds = String(date.getSeconds()).padStart(2, '0'); // 补零(如果需要显示时间) |
| | | return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; |
| | | } |
| | | const shortcuts = [ |
| | | { |
| | | text: '最近一周', |
| | | value: () => { |
| | | const backendTime = new Date(getglobalDate) |
| | | const oneWeekAgo = new Date(getglobalDate) |
| | | oneWeekAgo.setHours(0, 0, 0, 0); |
| | | oneWeekAgo.setDate(oneWeekAgo.getDate() - 7) |
| | | timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)] |
| | | window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo)) |
| | | }, |
| | | }, |
| | | { |
| | | text: '最近一个月', |
| | | value: () => { |
| | | const backendTime = new Date(getglobalDate) |
| | | const oneWeekAgo = new Date(getglobalDate) |
| | | oneWeekAgo.setHours(0, 0, 0, 0); |
| | | oneWeekAgo.setMonth(oneWeekAgo.getMonth() - 1) |
| | | timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)] |
| | | window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo)) |
| | | }, |
| | | }, |
| | | { |
| | | text: '最近三个月', |
| | | value: () => { |
| | | const backendTime = new Date(getglobalDate) |
| | | const oneWeekAgo = new Date(getglobalDate) |
| | | oneWeekAgo.setHours(0, 0, 0, 0); |
| | | oneWeekAgo.setMonth(oneWeekAgo.getMonth() - 3) |
| | | timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)] |
| | | window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo)) |
| | | }, |
| | | }, |
| | | ] |
| | | // 格式化后端时间并计算一周前的时间 |
| | | const defaultTime = ref<[Date, Date]>([new Date(), new Date()]); |
| | | function parseAndSetTime() { |
| | |
| | | <el-option :label="$t('searchOrder.outfilm')" value="2"></el-option> |
| | | <el-option :label="$t('film.dispatch')" value="3"></el-option> |
| | | </el-select> |
| | | <el-date-picker v-model="timeRange" type="datetimerange" range-separator="至" :start-placeholder="$t('reportmanage.starttime')" |
| | | style="margin-left: 15px;" value-format = "YYYY-MM-DD hh:mm:ss" |
| | | :end-placeholder="$t('reportmanage.endtime')"> |
| | | </el-date-picker> |
| | | <el-date-picker |
| | | style="margin-left: 15px;" |
| | | v-model="timeRange" |
| | | type="datetimerange" |
| | | :shortcuts="shortcuts" |
| | | range-separator="至" |
| | | :start-placeholder="$t('reportmanage.starttime')" |
| | | :end-placeholder="$t('reportmanage.endtime')" |
| | | /> |
| | | <el-button type="primary" style="margin-left: 10px;margin-bottom: 10px;" @click="handleClick()">{{$t('reportmanage.inquire')}}</el-button> |
| | | </div> |
| | | <div style="margin-bottom: 10px;margin-top: 20px;margin-left: 20px;"> |
| | |
| | | targetSlot: ptargetSlot, |
| | | taskStateList: celllist, |
| | | taskTypeList: stateList, |
| | | beginDate: (timeRange.value && timeRange.value[0]) || '', |
| | | endDate: (timeRange.value && timeRange.value[1]) || '', |
| | | beginDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[0])) || '', |
| | | endDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[1])) || '', |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | |
| | | targetSlot: ptargetSlot, |
| | | taskStateList: celllist, |
| | | taskTypeList: stateList, |
| | | beginDate: (timeRange.value && timeRange.value[0]) || '', |
| | | endDate: (timeRange.value && timeRange.value[1]) || '', |
| | | beginDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[0])) || '', |
| | | endDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[1])) || '', |
| | | }) |
| | | if (response.code == 200) { |
| | | countIn.value = response.data.countIn |
| | |
| | | targetSlot: ptargetSlot, |
| | | taskStateList: celllist, |
| | | taskTypeList: stateList, |
| | | beginDate: (timeRange.value && timeRange.value[0]) || '', |
| | | endDate: (timeRange.value && timeRange.value[1]) || '', |
| | | beginDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[0])) || '', |
| | | endDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[1])) || '', |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | |
| | | targetSlot: ptargetSlot, |
| | | taskStateList: celllist, |
| | | taskTypeList: stateList, |
| | | beginDate: (timeRange.value && timeRange.value[0]) || '', |
| | | endDate: (timeRange.value && timeRange.value[1]) || '', |
| | | beginDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[0])) || '', |
| | | endDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[1])) || '', |
| | | }) |
| | | if (response.code == 200) { |
| | | countIn.value = response.data.countIn |
| | |
| | | const seconds = String(date.getSeconds()).padStart(2, '0'); // 补零(如果需要显示时间) |
| | | return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; |
| | | } |
| | | const shortcuts = [ |
| | | { |
| | | text: '最近一周', |
| | | value: () => { |
| | | const backendTime = new Date(getglobalDate) |
| | | const oneWeekAgo = new Date(getglobalDate) |
| | | oneWeekAgo.setHours(0, 0, 0, 0); |
| | | oneWeekAgo.setDate(oneWeekAgo.getDate() - 7) |
| | | timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)] |
| | | window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo)) |
| | | }, |
| | | }, |
| | | { |
| | | text: '最近一个月', |
| | | value: () => { |
| | | const backendTime = new Date(getglobalDate) |
| | | const oneWeekAgo = new Date(getglobalDate) |
| | | oneWeekAgo.setHours(0, 0, 0, 0); |
| | | oneWeekAgo.setMonth(oneWeekAgo.getMonth() - 1) |
| | | timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)] |
| | | window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo)) |
| | | }, |
| | | }, |
| | | { |
| | | text: '最近三个月', |
| | | value: () => { |
| | | const backendTime = new Date(getglobalDate) |
| | | const oneWeekAgo = new Date(getglobalDate) |
| | | oneWeekAgo.setHours(0, 0, 0, 0); |
| | | oneWeekAgo.setMonth(oneWeekAgo.getMonth() - 3) |
| | | timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)] |
| | | window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo)) |
| | | }, |
| | | }, |
| | | ] |
| | | // 格式化后端时间并计算一周前的时间 |
| | | const defaultTime = ref<[Date, Date]>([new Date(), new Date()]); |
| | | function parseAndSetTime() { |
| New file |
| | |
| | | <script setup> |
| | | import {Search} from "@element-plus/icons-vue"; |
| | | import {reactive} from "vue"; |
| | | import {useRouter} from "vue-router" |
| | | const router = useRouter() |
| | | const adda = ref(false) |
| | | import request from "@/utils/request" |
| | | import { ref, onMounted } from "vue"; |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | import { useI18n } from 'vue-i18n' |
| | | const { t } = useI18n() |
| | | let language = ref(localStorage.getItem('lang') || 'zh') |
| | | const selectedProjectNoa = ref(null); |
| | | const configName = ref(''); |
| | | const configCode = ref(''); |
| | | const tableData = ref([]) |
| | | const currentPage2 = ref(1) |
| | | const totalRecords = ref(0) |
| | | const configValue = ref('') |
| | | const isEnable = ref('') |
| | | const listByUserName = async () => { |
| | | try { |
| | | const response = await request.post('/loadGlass/sys/sysConfig/queryConfigPage',{ |
| | | pageNo: 1, |
| | | pageSize: 10, |
| | | configName: "", |
| | | configCode: "", |
| | | configValue: "", |
| | | isEnable: -1 |
| | | }); |
| | | if (response.code === 200) { |
| | | const formattedData = response.data.records.map(record => ({ |
| | | ...record, |
| | | formattedCreateTime: formatTimestamp(record.createTime), |
| | | formattedUpdateTime: formatTimestamp(record.updateTime), |
| | | })); |
| | | tableData.value = formattedData; |
| | | totalRecords.value = response.data.total/2 || 0 |
| | | } else { |
| | | ElMessage.warning(response.data); |
| | | } |
| | | } catch (error) { |
| | | } |
| | | }; |
| | | onMounted(() => { |
| | | listByUserName(''); |
| | | }); |
| | | const handleClick = async () => { |
| | | try { |
| | | const response = await request.post('/loadGlass/sys/sysConfig/queryConfigPage',{ |
| | | pageNo: 1, |
| | | pageSize: 10, |
| | | configName: configName.value, |
| | | configCode: configCode.value, |
| | | configValue: configValue.value, |
| | | // isEnable: isEnable.value |
| | | isEnable: isEnable.value !== '' ? isEnable.value : -1, |
| | | |
| | | }); |
| | | if (response.code === 200) { |
| | | const formattedData = response.data.records.map(record => ({ |
| | | ...record, |
| | | formattedCreateTime: formatTimestamp(record.createTime), |
| | | formattedUpdateTime: formatTimestamp(record.updateTime), |
| | | })); |
| | | tableData.value = formattedData; |
| | | totalRecords.value = response.data.total/2 || 0 |
| | | } else { |
| | | ElMessage.warning(response.data); |
| | | } |
| | | } catch (error) { |
| | | } |
| | | }; |
| | | const handlePageChange2 = (newPage) => { |
| | | currentPage2.value = newPage; |
| | | window.localStorage.setItem('pagenumber', currentPage2.value) |
| | | historicala(currentPage2.value); |
| | | }; |
| | | const historicala = async (page) => { |
| | | try { |
| | | let page = window.localStorage.getItem('pagenumber') |
| | | const response = await request.post('/loadGlass/sys/sysConfig/queryConfigPage',{ |
| | | pageNo: page, |
| | | pageSize: 10, |
| | | configName: "", |
| | | configCode: "", |
| | | configValue: "", |
| | | isEnable: -1 |
| | | }); |
| | | if (response.code === 200) { |
| | | const formattedData = response.data.records.map(record => ({ |
| | | ...record, |
| | | formattedCreateTime: formatTimestamp(record.createTime), |
| | | formattedUpdateTime: formatTimestamp(record.updateTime), |
| | | })); |
| | | tableData.value = formattedData; |
| | | totalRecords.value = response.data.total/2 || 0 |
| | | } else { |
| | | ElMessage.warning(response.data); |
| | | } |
| | | } catch (error) { |
| | | } |
| | | }; |
| | | // 处理编辑按钮点击 |
| | | function handleEdit(row) { |
| | | adda.value = true; |
| | | configValue.value = row.configValue |
| | | isEnable.value = row.isEnable |
| | | window.localStorage.setItem('id', row.id) |
| | | window.localStorage.setItem('configName', row.configName) |
| | | window.localStorage.setItem('configCode', row.configCode) |
| | | } |
| | | const optionsa = [ |
| | | { |
| | | value: 0, |
| | | label: t('sorter.disable'), |
| | | }, |
| | | { |
| | | value: 1, |
| | | label: t('sorter.start'), |
| | | } |
| | | ] |
| | | // 编辑 |
| | | const getTableRowa = async () => { |
| | | let configName = window.localStorage.getItem('configName') |
| | | let configCode = window.localStorage.getItem('configCode') |
| | | let id = window.localStorage.getItem('id') |
| | | let page = window.localStorage.getItem('pagenumber') |
| | | try { |
| | | const response = await request.post('/loadGlass/sys/sysConfig/updateConfig',{ |
| | | id: id, |
| | | configName: configName, |
| | | configCode: configCode, |
| | | configValue: configValue.value, |
| | | isEnable: isEnable.value |
| | | } |
| | | ); |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | | adda.value = false; |
| | | historicala(page) |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | } catch (error) { |
| | | } |
| | | }; |
| | | // 格式化时间戳为年月日时间字符串的函数 |
| | | function formatTimestamp(timestamp) { |
| | | const date = new Date(timestamp); |
| | | const year = date.getFullYear(); |
| | | const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始,需要加1,并补零 |
| | | const day = String(date.getDate()).padStart(2, '0'); // 补零 |
| | | const hours = String(date.getHours()).padStart(2, '0'); // 补零(如果需要显示时间) |
| | | const minutes = String(date.getMinutes()).padStart(2, '0'); // 补零(如果需要显示时间) |
| | | const seconds = String(date.getSeconds()).padStart(2, '0'); // 补零(如果需要显示时间) |
| | | return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; |
| | | } |
| | | </script> |
| | | <template> |
| | | <div> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" > |
| | | <div style="display: flex;width: 1770px;"> |
| | | <el-input v-model="configName" clearable style="margin-left: 10px;margin-bottom: 10px;width: 200px;" :placeholder="$t('productStock.configName')" /> |
| | | <el-input v-model="configCode" clearable style="margin-left: 10px;margin-bottom: 10px;width: 200px;" @input="handleInputa" :placeholder="$t('productStock.configCode')" /> |
| | | <el-input v-model="configValue" clearable style="margin-left: 10px;margin-bottom: 10px;width: 200px;" @input="handleInputb" :placeholder="$t('productStock.configValue')" /> |
| | | <el-select v-model="isEnable" clearable style="margin-left: 10px;margin-bottom: 10px;width: 200px;" :placeholder="$t('sorter.startstatus')"> |
| | | <el-option :label="$t('sorter.start')" value="1"></el-option> |
| | | <el-option :label="$t('sorter.disable')" value="0"></el-option> |
| | | </el-select> |
| | | <el-button type="primary" style="margin-left: 10px;margin-bottom: 10px;" @click="handleClick()">{{$t('reportmanage.inquire')}}</el-button> |
| | | </div> |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;"> |
| | | <el-table height="700" ref="table" :header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129' }" |
| | | :data="tableData"> |
| | | <el-table-column prop="configName" align="center" :label="$t('productStock.configName')"/> |
| | | <el-table-column prop="configCode" align="center" :label="$t('productStock.configCode')"/> |
| | | <el-table-column prop="configValue" align="center" :label="$t('productStock.configValue')"/> |
| | | <el-table-column |
| | | align="center" |
| | | :label="$t('sorter.startstatus')" |
| | | prop="isEnable" |
| | | > |
| | | <template #default="scope"> |
| | | <el-tag |
| | | :type="scope.row.isEnable === 1 ? 'success' : 'warning'" |
| | | > |
| | | {{ scope.row.isEnable === 1 ? $t('sorter.start') : $t('sorter.disable') }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="formattedCreateTime" align="center" :label="$t('film.createtime')"/> |
| | | <el-table-column prop="formattedUpdateTime" align="center" :label="$t('sorter.updateTime')" /> |
| | | <el-table-column fixed="right" :label="$t('productStock.operate')" align="center" width="270"> |
| | | <template #default="scope"> |
| | | <el-button type="text" plain @click="handleEdit(scope.row)">{{ $t('productStock.exit') }}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <div style="margin-top: 20px;margin-left: 40%;"> |
| | | <el-pagination |
| | | v-model:current-page="currentPage2" |
| | | :page-size="pageSize" |
| | | :size="large" |
| | | :disabled="disabled" |
| | | layout="prev, pager, next, jumper" |
| | | :total="totalRecords" |
| | | @current-change="handlePageChange2" |
| | | style="margin-top: 10px;" |
| | | /> |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | | <el-dialog v-model="adda" top="23vh" width="37%" :title="$t('productStock.reusername')" > |
| | | <div style="margin-left: -50px;margin-top: 10px;margin-bottom: 10px;"> |
| | | <el-form ref="formRef" label-width="150px"> |
| | | <el-form label-width="100px" label-position="right"> |
| | | <el-row style="margin-top: -15px;margin-bottom: -2px;"> |
| | | <el-col :span="6"> |
| | | <div id="dt" style="font-size: 15px;"> |
| | | <div> |
| | | <el-form-item :label="$t('productStock.configValuea')" :required="true" style="width: 25vw"> |
| | | <el-input :placeholder="$t('productStock.configValue')" v-model="configValue" autocomplete="off" style="width: 350px;"/> |
| | | </el-form-item></div></div> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="margin-top: 10px;"> |
| | | <el-col :span="6"> |
| | | <div id="dt" style="font-size: 15px;"> |
| | | <div> |
| | | <el-form-item :label="$t('searchOrder.startstatusa')" :required="true" style="width: 25vw;"> |
| | | <el-select |
| | | :placeholder="$t('searchOrder.startstatus')" |
| | | clearable |
| | | style="width: 350px;" |
| | | v-model="isEnable"> |
| | | <el-option |
| | | v-for="item in optionsa" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item></div></div> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </el-form> |
| | | </div> |
| | | <template #footer> |
| | | <div id="dialog-footer"> |
| | | <el-button type="primary" @click="getTableRowa"> |
| | | {{ $t('productStock.sure') }} |
| | | </el-button> |
| | | <el-button @click="adda = false">{{ $t('productStock.cancel') }}</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | </template> |
| | | <style scoped> |
| | | #dt { display:block; float:left;line-height: 20px;margin-left: 100px;} |
| | | #dta { display:block; float:left;line-height: 20px;margin-left: 80%;} |
| | | #dialog-footer{ |
| | | text-align: center; |
| | | margin-top: -15px; |
| | | } |
| | | #message{ |
| | | text-align: center; |
| | | align-items: center; |
| | | color: black; |
| | | width: 200px; |
| | | height: 100px; |
| | | background-color: #337ecc; |
| | | margin-left: 28%; |
| | | } |
| | | #awatch{ |
| | | height: 460px; |
| | | /* margin-top: -60px; */ |
| | | } |
| | | </style> |
| | |
| | | <el-option :label="$t('basicData.stop')" value="2"></el-option> |
| | | <el-option :label="$t('sorter.endingtask')" value="3"></el-option> |
| | | </el-select> |
| | | <el-date-picker v-model="timeRange" type="datetimerange" range-separator="至" :start-placeholder="$t('reportmanage.starttime')" |
| | | style="margin-left: 15px;" value-format = "YYYY-MM-DD hh:mm:ss" |
| | | :end-placeholder="$t('reportmanage.endtime')"> |
| | | </el-date-picker> |
| | | <el-date-picker |
| | | style="margin-left: 15px;" |
| | | v-model="timeRange" |
| | | type="datetimerange" |
| | | :shortcuts="shortcuts" |
| | | range-separator="至" |
| | | :start-placeholder="$t('reportmanage.starttime')" |
| | | :end-placeholder="$t('reportmanage.endtime')" |
| | | /> |
| | | <el-button type="primary" style="margin-left: 10px;margin-bottom: 10px;" @click="sethistorical()">{{$t('reportmanage.inquire')}}</el-button> |
| | | </div> |
| | | <el-table ref="table" style="margin-top: 20px;height: 580px;width: 99%;" :data="tableDatax" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | |
| | | flowCardId: flowCardId.value, |
| | | isForceList: celllist, |
| | | stateList: stateList, |
| | | beginDate: (timeRange.value && timeRange.value[0]) || '', |
| | | endDate: (timeRange.value && timeRange.value[1]) || '', |
| | | beginDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[0])) || '', |
| | | endDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[1])) || '', |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | |
| | | flowCardId: flowCardId.value, |
| | | isForceList: celllist, |
| | | stateList: stateList, |
| | | beginDate: (timeRange.value && timeRange.value[0]) || '', |
| | | endDate: (timeRange.value && timeRange.value[1]) || '', |
| | | beginDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[0])) || '', |
| | | endDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[1])) || '', |
| | | }) |
| | | if (response.code == 200) { |
| | | currentPage2.value = 1 |
| | |
| | | const seconds = String(date.getSeconds()).padStart(2, '0'); // 补零(如果需要显示时间) |
| | | return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; |
| | | } |
| | | const shortcuts = [ |
| | | { |
| | | text: '最近一周', |
| | | value: () => { |
| | | const backendTime = new Date(getglobalDate) |
| | | const oneWeekAgo = new Date(getglobalDate) |
| | | oneWeekAgo.setHours(0, 0, 0, 0); |
| | | oneWeekAgo.setDate(oneWeekAgo.getDate() - 7) |
| | | timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)] |
| | | window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo)) |
| | | }, |
| | | }, |
| | | { |
| | | text: '最近一个月', |
| | | value: () => { |
| | | const backendTime = new Date(getglobalDate) |
| | | const oneWeekAgo = new Date(getglobalDate) |
| | | oneWeekAgo.setHours(0, 0, 0, 0); |
| | | oneWeekAgo.setMonth(oneWeekAgo.getMonth() - 1) |
| | | timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)] |
| | | window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo)) |
| | | }, |
| | | }, |
| | | { |
| | | text: '最近三个月', |
| | | value: () => { |
| | | const backendTime = new Date(getglobalDate) |
| | | const oneWeekAgo = new Date(getglobalDate) |
| | | oneWeekAgo.setHours(0, 0, 0, 0); |
| | | oneWeekAgo.setMonth(oneWeekAgo.getMonth() - 3) |
| | | timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)] |
| | | window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo)) |
| | | }, |
| | | }, |
| | | ] |
| | | // 格式化后端时间并计算一周前的时间 |
| | | const defaultTime = ref<[Date, Date]>([new Date(), new Date()]); |
| | | function parseAndSetTime() { |
| | |
| | | <el-option :label="$t('basicData.stop')" value="2"></el-option> |
| | | <el-option :label="$t('sorter.endingtask')" value="3"></el-option> |
| | | </el-select> |
| | | <el-date-picker v-model="timeRange" type="datetimerange" range-separator="至" :start-placeholder="$t('reportmanage.starttime')" |
| | | style="margin-left: 15px;" value-format = "YYYY-MM-DD hh:mm:ss" |
| | | :end-placeholder="$t('reportmanage.endtime')"> |
| | | </el-date-picker> |
| | | <el-date-picker |
| | | style="margin-left: 15px;" |
| | | v-model="timeRange" |
| | | type="datetimerange" |
| | | :shortcuts="shortcuts" |
| | | range-separator="至" |
| | | :start-placeholder="$t('reportmanage.starttime')" |
| | | :end-placeholder="$t('reportmanage.endtime')" |
| | | /> |
| | | <el-button type="primary" style="margin-left: 10px;margin-bottom: 10px;" @click="sethistorical()">{{$t('reportmanage.inquire')}}</el-button> |
| | | </div> |
| | | <el-table ref="table" style="margin-top: 20px;height: 580px;width: 1770px;" :data="tableDatax" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | |
| | | flowCardId: flowCardId.value, |
| | | isForceList: celllist, |
| | | stateList: stateList, |
| | | beginDate: (timeRange.value && timeRange.value[0]) || '', |
| | | endDate: (timeRange.value && timeRange.value[1]) || '', |
| | | beginDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[0])) || '', |
| | | endDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[1])) || '', |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | |
| | | flowCardId: flowCardId.value, |
| | | isForceList: celllist, |
| | | stateList: stateList, |
| | | beginDate: (timeRange.value && timeRange.value[0]) || '', |
| | | endDate: (timeRange.value && timeRange.value[1]) || '', |
| | | beginDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[0])) || '', |
| | | endDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[1])) || '', |
| | | }) |
| | | if (response.code == 200) { |
| | | currentPage2.value = 1 |
| | |
| | | const seconds = String(date.getSeconds()).padStart(2, '0'); // 补零(如果需要显示时间) |
| | | return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; |
| | | } |
| | | const shortcuts = [ |
| | | { |
| | | text: '最近一周', |
| | | value: () => { |
| | | const backendTime = new Date(getglobalDate) |
| | | const oneWeekAgo = new Date(getglobalDate) |
| | | oneWeekAgo.setHours(0, 0, 0, 0); |
| | | oneWeekAgo.setDate(oneWeekAgo.getDate() - 7) |
| | | timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)] |
| | | window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo)) |
| | | }, |
| | | }, |
| | | { |
| | | text: '最近一个月', |
| | | value: () => { |
| | | const backendTime = new Date(getglobalDate) |
| | | const oneWeekAgo = new Date(getglobalDate) |
| | | oneWeekAgo.setHours(0, 0, 0, 0); |
| | | oneWeekAgo.setMonth(oneWeekAgo.getMonth() - 1) |
| | | timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)] |
| | | window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo)) |
| | | }, |
| | | }, |
| | | { |
| | | text: '最近三个月', |
| | | value: () => { |
| | | const backendTime = new Date(getglobalDate) |
| | | const oneWeekAgo = new Date(getglobalDate) |
| | | oneWeekAgo.setHours(0, 0, 0, 0); |
| | | oneWeekAgo.setMonth(oneWeekAgo.getMonth() - 3) |
| | | timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)] |
| | | window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo)) |
| | | }, |
| | | }, |
| | | ] |
| | | // 格式化后端时间并计算一周前的时间 |
| | | const defaultTime = ref<[Date, Date]>([new Date(), new Date()]); |
| | | function parseAndSetTime() { |
| | |
| | | <el-option :label="$t('basicData.stop')" value="2"></el-option> |
| | | <el-option :label="$t('sorter.endingtask')" value="3"></el-option> |
| | | </el-select> |
| | | <el-date-picker v-model="timeRange" type="datetimerange" range-separator="至" :start-placeholder="$t('reportmanage.starttime')" |
| | | style="margin-left: 15px;" value-format = "YYYY-MM-DD hh:mm:ss" |
| | | :end-placeholder="$t('reportmanage.endtime')"> |
| | | </el-date-picker> |
| | | <el-date-picker |
| | | style="margin-left: 15px;" |
| | | v-model="timeRange" |
| | | type="datetimerange" |
| | | :shortcuts="shortcuts" |
| | | range-separator="至" |
| | | :start-placeholder="$t('reportmanage.starttime')" |
| | | :end-placeholder="$t('reportmanage.endtime')" |
| | | /> |
| | | <el-button type="primary" style="margin-left: 10px;margin-bottom: 10px;" @click="sethistorical()">{{$t('reportmanage.inquire')}}</el-button> |
| | | </div> |
| | | <el-table ref="table" style="margin-top: 20px;height: 580px;width: 1770px;" :data="tableDatax" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | |
| | | flowCardId: flowCardId.value, |
| | | isForceList: celllist, |
| | | stateList: stateList, |
| | | beginDate: (timeRange.value && timeRange.value[0]) || '', |
| | | endDate: (timeRange.value && timeRange.value[1]) || '', |
| | | beginDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[0])) || '', |
| | | endDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[1])) || '', |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | |
| | | flowCardId: flowCardId.value, |
| | | isForceList: celllist, |
| | | stateList: stateList, |
| | | beginDate: (timeRange.value && timeRange.value[0]) || '', |
| | | endDate: (timeRange.value && timeRange.value[1]) || '', |
| | | beginDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[0])) || '', |
| | | endDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[1])) || '', |
| | | }) |
| | | if (response.code == 200) { |
| | | currentPage2.value = 1 |
| | |
| | | const seconds = String(date.getSeconds()).padStart(2, '0'); // 补零(如果需要显示时间) |
| | | return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; |
| | | } |
| | | const shortcuts = [ |
| | | { |
| | | text: '最近一周', |
| | | value: () => { |
| | | const backendTime = new Date(getglobalDate) |
| | | const oneWeekAgo = new Date(getglobalDate) |
| | | oneWeekAgo.setHours(0, 0, 0, 0); |
| | | oneWeekAgo.setDate(oneWeekAgo.getDate() - 7) |
| | | timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)] |
| | | window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo)) |
| | | }, |
| | | }, |
| | | { |
| | | text: '最近一个月', |
| | | value: () => { |
| | | const backendTime = new Date(getglobalDate) |
| | | const oneWeekAgo = new Date(getglobalDate) |
| | | oneWeekAgo.setHours(0, 0, 0, 0); |
| | | oneWeekAgo.setMonth(oneWeekAgo.getMonth() - 1) |
| | | timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)] |
| | | window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo)) |
| | | }, |
| | | }, |
| | | { |
| | | text: '最近三个月', |
| | | value: () => { |
| | | const backendTime = new Date(getglobalDate) |
| | | const oneWeekAgo = new Date(getglobalDate) |
| | | oneWeekAgo.setHours(0, 0, 0, 0); |
| | | oneWeekAgo.setMonth(oneWeekAgo.getMonth() - 3) |
| | | timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)] |
| | | window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo)) |
| | | }, |
| | | }, |
| | | ] |
| | | // 格式化后端时间并计算一周前的时间 |
| | | const defaultTime = ref<[Date, Date]>([new Date(), new Date()]); |
| | | function parseAndSetTime() { |
| | |
| | | <el-option :label="$t('searchOrder.outfilm')" value="5"></el-option> |
| | | <el-option :label="$t('film.dispatch')" value="6"></el-option> |
| | | </el-select> |
| | | <el-date-picker v-model="timeRange" type="datetimerange" range-separator="至" :start-placeholder="$t('reportmanage.starttime')" |
| | | style="margin-left: 15px;" value-format = "YYYY-MM-DD hh:mm:ss" |
| | | :end-placeholder="$t('reportmanage.endtime')"> |
| | | </el-date-picker> |
| | | <el-date-picker |
| | | style="margin-left: 15px;" |
| | | v-model="timeRange" |
| | | type="datetimerange" |
| | | :shortcuts="shortcuts" |
| | | range-separator="至" |
| | | :start-placeholder="$t('reportmanage.starttime')" |
| | | :end-placeholder="$t('reportmanage.endtime')" |
| | | /> |
| | | <el-button type="primary" style="margin-left: 10px;margin-bottom: 10px;" @click="handleClick()">{{$t('reportmanage.inquire')}}</el-button> |
| | | </div> |
| | | <div style="margin-bottom: 10px;margin-top: 20px;margin-left: 20px;"> |
| | |
| | | targetSlot: ptargetSlot, |
| | | taskStateList: celllist, |
| | | taskTypeList: stateList, |
| | | beginDate: (timeRange.value && timeRange.value[0]) || '', |
| | | endDate: (timeRange.value && timeRange.value[1]) || '', |
| | | beginDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[0])) || '', |
| | | endDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[1])) || '', |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | |
| | | targetSlot: ptargetSlot, |
| | | taskStateList: celllist, |
| | | taskTypeList: stateList, |
| | | beginDate: (timeRange.value && timeRange.value[0]) || '', |
| | | endDate: (timeRange.value && timeRange.value[1]) || '', |
| | | beginDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[0])) || '', |
| | | endDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[1])) || '', |
| | | }) |
| | | if (response.code == 200) { |
| | | hollowCountOutOne.value = response.data.hollowCountOutOne |
| | |
| | | targetSlot: ptargetSlot, |
| | | taskStateList: celllist, |
| | | taskTypeList: stateList, |
| | | beginDate: (timeRange.value && timeRange.value[0]) || '', |
| | | endDate: (timeRange.value && timeRange.value[1]) || '', |
| | | beginDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[0])) || '', |
| | | endDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[1])) || '', |
| | | }) |
| | | if (response.code == 200) { |
| | | currentPage2.value = 1 |
| | |
| | | targetSlot: ptargetSlot, |
| | | taskStateList: celllist, |
| | | taskTypeList: stateList, |
| | | beginDate: (timeRange.value && timeRange.value[0]) || '', |
| | | endDate: (timeRange.value && timeRange.value[1]) || '', |
| | | beginDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[0])) || '', |
| | | endDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[1])) || '', |
| | | }) |
| | | if (response.code == 200) { |
| | | hollowCountOutOne.value = response.data.hollowCountOutOne |
| | |
| | | const seconds = String(date.getSeconds()).padStart(2, '0'); // 补零(如果需要显示时间) |
| | | return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; |
| | | } |
| | | const shortcuts = [ |
| | | { |
| | | text: '最近一周', |
| | | value: () => { |
| | | const backendTime = new Date(getglobalDate) |
| | | const oneWeekAgo = new Date(getglobalDate) |
| | | oneWeekAgo.setHours(0, 0, 0, 0); |
| | | oneWeekAgo.setDate(oneWeekAgo.getDate() - 7) |
| | | timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)] |
| | | window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo)) |
| | | }, |
| | | }, |
| | | { |
| | | text: '最近一个月', |
| | | value: () => { |
| | | const backendTime = new Date(getglobalDate) |
| | | const oneWeekAgo = new Date(getglobalDate) |
| | | oneWeekAgo.setHours(0, 0, 0, 0); |
| | | oneWeekAgo.setMonth(oneWeekAgo.getMonth() - 1) |
| | | timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)] |
| | | window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo)) |
| | | }, |
| | | }, |
| | | { |
| | | text: '最近三个月', |
| | | value: () => { |
| | | const backendTime = new Date(getglobalDate) |
| | | const oneWeekAgo = new Date(getglobalDate) |
| | | oneWeekAgo.setHours(0, 0, 0, 0); |
| | | oneWeekAgo.setMonth(oneWeekAgo.getMonth() - 3) |
| | | timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)] |
| | | window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo)) |
| | | }, |
| | | }, |
| | | ] |
| | | // 格式化后端时间并计算一周前的时间 |
| | | const defaultTime = ref<[Date, Date]>([new Date(), new Date()]); |
| | | function parseAndSetTime() { |
| New file |
| | |
| | | package com.mes.sysconfig.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.mes.sysconfig.entity.SysConfig; |
| | | import com.mes.sysconfig.entity.request.SysConfigRequest; |
| | | import com.mes.sysconfig.service.SysConfigService; |
| | | import com.mes.utils.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * (SysConfig)表控制层 |
| | | * |
| | | * @author makejava |
| | | * @since 2025-04-01 15:01:15 |
| | | */ |
| | | @Api(tags = "系统配置") |
| | | @RestController |
| | | @RequestMapping("/sys/sysConfig") |
| | | public class SysConfigController { |
| | | /** |
| | | * 服务对象 |
| | | */ |
| | | @Resource |
| | | private SysConfigService sysConfigService; |
| | | |
| | | @ApiOperation("分页查询所有数据") |
| | | @PostMapping("/queryConfigPage") |
| | | public Result<Page<SysConfig>> queryConfigPage(@RequestBody SysConfigRequest request) { |
| | | return Result.success(sysConfigService.queryConfigPage(request)); |
| | | } |
| | | |
| | | @ApiOperation("系统配置查询通过id") |
| | | @GetMapping("/queryConfigById") |
| | | public Result<SysConfig> queryConfigById(Long id) { |
| | | return Result.success(sysConfigService.queryConfigById(id)); |
| | | } |
| | | |
| | | @ApiOperation("保存系统配置") |
| | | @PostMapping("/saveConfig") |
| | | public Result<SysConfig> saveConfig(@RequestBody SysConfig request) { |
| | | return Result.success(sysConfigService.saveConfig(request)); |
| | | } |
| | | |
| | | @ApiOperation("修改系统配置") |
| | | @PostMapping("/updateConfig") |
| | | public Result<SysConfig> updateConfig(@RequestBody SysConfig request) { |
| | | return Result.success(sysConfigService.updateConfig(request)); |
| | | } |
| | | |
| | | @ApiOperation("删除系统配置") |
| | | @GetMapping("/deleteConfig") |
| | | public Result<Boolean> deleteConfig(Long id) { |
| | | return Result.success(sysConfigService.deleteConfig(id)); |
| | | } |
| | | } |
| | | |
| New file |
| | |
| | | package com.mes.sysconfig.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * (SysConfig)表实体类 |
| | | * |
| | | * @author makejava |
| | | * @since 2025-04-01 15:01:22 |
| | | */ |
| | | @ApiModel(description = "(SysConfig)表实体类") |
| | | @Data |
| | | public class SysConfig { |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | /** |
| | | * 父配置id(弃用) |
| | | */ |
| | | @ApiModelProperty(value = "父配置id(弃用)", position = 2) |
| | | private Long parentId; |
| | | /** |
| | | * 配置名 |
| | | */ |
| | | @ApiModelProperty(value = "配置名", position = 3) |
| | | private String configName; |
| | | /** |
| | | * 配置代码 |
| | | */ |
| | | @ApiModelProperty(value = "配置代码", position = 4) |
| | | private String configCode; |
| | | /** |
| | | * 配置值 |
| | | */ |
| | | @ApiModelProperty(value = "配置值", position = 5) |
| | | private String configValue; |
| | | /** |
| | | * 是否启用 |
| | | */ |
| | | @ApiModelProperty(value = "是否启用", position = 6) |
| | | private Integer isEnable; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty(value = "创建时间", position = 7) |
| | | private Date createTime; |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | @ApiModelProperty(value = "更新时间", position = 8) |
| | | private Date updateTime; |
| | | |
| | | |
| | | } |
| | | |
| New file |
| | |
| | | package com.mes.sysconfig.entity.request; |
| | | |
| | | import com.mes.base.entity.PageRequest; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | | * @Date: 2025/4/1 15:09 |
| | | * @Description: |
| | | */ |
| | | @ApiModel(description = ":") |
| | | @Data |
| | | public class SysConfigRequest extends PageRequest { |
| | | |
| | | private Integer id; |
| | | /** |
| | | * 父配置id(弃用) |
| | | */ |
| | | private Integer parentId; |
| | | /** |
| | | * 配置名 |
| | | */ |
| | | @ApiModelProperty(value = "配置名", position = 3) |
| | | private String configName; |
| | | /** |
| | | * 配置代码 |
| | | */ |
| | | @ApiModelProperty(value = "配置代码", position = 4) |
| | | private String configCode; |
| | | /** |
| | | * 配置值 |
| | | */ |
| | | @ApiModelProperty(value = "配置值", position = 5) |
| | | private String configValue; |
| | | /** |
| | | * 是否启用 |
| | | */ |
| | | @ApiModelProperty(value = "是否启用", position = 6) |
| | | private Integer isEnable; |
| | | } |
| New file |
| | |
| | | package com.mes.sysconfig.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.sysconfig.entity.SysConfig; |
| | | |
| | | /** |
| | | * (SysConfig)表数据库访问层 |
| | | * |
| | | * @author makejava |
| | | * @since 2025-04-01 15:01:18 |
| | | */ |
| | | public interface SysConfigMapper extends BaseMapper<SysConfig> { |
| | | |
| | | } |
| | | |
| New file |
| | |
| | | package com.mes.sysconfig.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.sysconfig.entity.SysConfig; |
| | | import com.mes.sysconfig.entity.request.SysConfigRequest; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * (SysConfig)表服务接口 |
| | | * |
| | | * @author makejava |
| | | * @since 2025-04-01 15:01:26 |
| | | */ |
| | | public interface SysConfigService extends IService<SysConfig> { |
| | | |
| | | Page<SysConfig> queryConfigPage(SysConfigRequest request); |
| | | |
| | | SysConfig queryConfigById(Serializable id); |
| | | |
| | | SysConfig saveConfig(SysConfig request); |
| | | |
| | | SysConfig updateConfig(SysConfig request); |
| | | |
| | | Boolean deleteConfig(Serializable id); |
| | | |
| | | String queryConfigValue(Serializable id); |
| | | |
| | | } |
| | | |
| New file |
| | |
| | | package com.mes.sysconfig.service.impl; |
| | | |
| | | import cn.smallbun.screw.core.util.StringUtils; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.sysconfig.entity.SysConfig; |
| | | import com.mes.sysconfig.entity.request.SysConfigRequest; |
| | | import com.mes.sysconfig.mapper.SysConfigMapper; |
| | | import com.mes.sysconfig.service.SysConfigService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.cache.annotation.CacheEvict; |
| | | import org.springframework.cache.annotation.CachePut; |
| | | import org.springframework.cache.annotation.Cacheable; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * (SysConfig)表服务实现类 |
| | | * |
| | | * @author makejava |
| | | * @since 2025-04-01 15:01:27 |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | public class SysConfigServiceImpl extends ServiceImpl<SysConfigMapper, SysConfig> implements SysConfigService { |
| | | |
| | | @Override |
| | | public Page<SysConfig> queryConfigPage(SysConfigRequest request) { |
| | | Page<SysConfig> page = new Page<>(request.getPageNo(), request.getPageSize()); |
| | | LambdaQueryWrapper<SysConfig> wrapper = new LambdaQueryWrapper<SysConfig>() |
| | | .like(StringUtils.isNotBlank(request.getConfigName()), SysConfig::getConfigName, request.getConfigName()) |
| | | .like(StringUtils.isNotBlank(request.getConfigCode()), SysConfig::getConfigCode, request.getConfigCode()) |
| | | .like(StringUtils.isNotBlank(request.getConfigValue()), SysConfig::getConfigValue, request.getConfigValue()) |
| | | .eq(request.getIsEnable() != -1, SysConfig::getIsEnable, request.getIsEnable()) |
| | | .orderByAsc(SysConfig::getId); |
| | | return this.page(page, wrapper); |
| | | } |
| | | |
| | | @Override |
| | | @Cacheable(value = "sysConfig", key = "#id") |
| | | public SysConfig queryConfigById(Serializable id) { |
| | | return this.getById(id); |
| | | } |
| | | |
| | | @Override |
| | | @CachePut(value = "sysConfig", key = "#request.id") |
| | | public SysConfig saveConfig(SysConfig request) { |
| | | this.save(request); |
| | | return request; |
| | | } |
| | | |
| | | @Override |
| | | @CachePut(value = "sysConfig", key = "#request.id") |
| | | public SysConfig updateConfig(SysConfig request) { |
| | | this.updateById(request); |
| | | return request; |
| | | } |
| | | |
| | | @Override |
| | | @CacheEvict(value = "sysConfig", key = "#id") |
| | | public Boolean deleteConfig(Serializable id) { |
| | | return this.removeById(id); |
| | | } |
| | | |
| | | @Override |
| | | public String queryConfigValue(Serializable id) { |
| | | SysConfig sysConfig = this.queryConfigById(id); |
| | | if (sysConfig == null) { |
| | | log.info("系统配置查询为空,请检查该配置是否存在:{}", id); |
| | | return null; |
| | | } |
| | | return sysConfig.getConfigValue(); |
| | | } |
| | | } |
| | | |
| | |
| | | package com.mes.common.config; |
| | | |
| | | |
| | | import com.mes.common.utils.FastJsonRedisSerializer; |
| | | import org.springframework.cache.CacheManager; |
| | | import org.springframework.cache.annotation.EnableCaching; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.data.redis.cache.RedisCacheConfiguration; |
| | | import org.springframework.data.redis.cache.RedisCacheManager; |
| | | import org.springframework.data.redis.connection.RedisConnectionFactory; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer; |
| | | import org.springframework.data.redis.serializer.RedisSerializationContext; |
| | | import org.springframework.data.redis.serializer.StringRedisSerializer; |
| | | |
| | | /** |
| | |
| | | * @Description: |
| | | */ |
| | | @Configuration |
| | | @EnableCaching |
| | | public class RedisConfig { |
| | | |
| | | @Bean |
| | |
| | | template.afterPropertiesSet(); |
| | | return template; |
| | | } |
| | | |
| | | |
| | | @Bean |
| | | public CacheManager cacheManager(RedisConnectionFactory factory) { |
| | | RedisCacheConfiguration redisCacheConfiguration = RedisCacheConfiguration.defaultCacheConfig() |
| | | .disableCachingNullValues() |
| | | .serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(new GenericJackson2JsonRedisSerializer())); |
| | | |
| | | RedisCacheManager redisCacheManager = RedisCacheManager.builder(factory) |
| | | .cacheDefaults(redisCacheConfiguration) |
| | | .build(); |
| | | |
| | | return redisCacheManager; |
| | | } |
| | | } |
| | |
| | | import com.github.yulichang.toolkit.JoinWrappers; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import com.mes.damage.entity.Damage; |
| | | import com.mes.damage.mapper.DamageMapper; |
| | | import com.mes.damage.entity.request.DamageRequest; |
| | | import com.mes.damage.service.DamageService; |
| | | import com.mes.edgglasstask.entity.EdgGlassTaskInfo; |
| | | import com.mes.damage.entity.request.DamageRequest; |
| | | import com.mes.edgglasstask.service.EdgGlassTaskInfoService; |
| | | import com.mes.edgstoragecage.entity.EdgStorageCage; |
| | | import com.mes.edgstoragecage.entity.EdgStorageCageDetails; |
| | |
| | | import com.mes.pp.mapper.OptimizeHeatDetailMapper; |
| | | import com.mes.taskcache.entity.TaskCache; |
| | | import com.mes.taskcache.service.TaskCacheService; |
| | | import com.mes.uppattenusage.entity.UpPattenUsage; |
| | | import com.mes.uppattenusage.mapper.UpPattenUsageMapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | @Autowired |
| | | DamageService damageService; |
| | | |
| | | @Resource |
| | | UpPattenUsageMapper upPattenUsageMapper; |
| | | |
| | | @Autowired |
| | | EdgGlassTaskInfoService edgGlassTaskInfoService; |
| | | |
| | |
| | | JSONObject jsonObject = new JSONObject(); |
| | | List<CutDrawingVO> currentCutDrawings = baseMapper.queryCutDrawingByEngineerId(engineering.getEngineerId(), patternSequence, 0); |
| | | jsonObject.append("currentCutTerritory", currentCutDrawings); |
| | | if (CollectionUtil.isNotEmpty(currentCutDrawings)) { |
| | | jsonObject.append("engineer", engineering.getEngineerId()); |
| | | jsonObject.append("sequence", patternSequence); |
| | | UpPattenUsage upPattenUsage = upPattenUsageMapper.selectOne(new LambdaQueryWrapper<UpPattenUsage>() |
| | | .eq(UpPattenUsage::getEngineeringId, engineering.getEngineerId()) |
| | | .eq(UpPattenUsage::getLayoutSequence, patternSequence)); |
| | | jsonObject.append("upPattenUsage", upPattenUsage); |
| | | } |
| | | return jsonObject; |
| | | } |
| | | |
| | |
| | | List<GlassInfo> glassInfoList = glassInfoService.list(new LambdaQueryWrapper<GlassInfo>().eq(GlassInfo::getEngineerId, engineerId)); |
| | | long totalPatternSequence = glassInfoList.stream().map(GlassInfo::getPatternSequence).distinct().count(); |
| | | map.put("totalPatternSequence", totalPatternSequence); |
| | | UpPattenUsage upPattenUsage = upPattenUsageMapper.selectOne(new LambdaQueryWrapper<UpPattenUsage>().eq(UpPattenUsage::getEngineeringId, engineerId) |
| | | .eq(UpPattenUsage::getLayoutSequence, patternSequence)); |
| | | map.put("upPattenUsage", upPattenUsage); |
| | | return map; |
| | | |
| | | } |
| | |
| | | public Result<Boolean> cancelTemperingTask() { |
| | | boolean result = bigStorageCageDetailsService.cancelTemperingTask(); |
| | | if (result == true) { |
| | | return Result.build(200, "指定钢化成功", result); |
| | | return Result.build(200, "取消当前钢化成功", result); |
| | | } else { |
| | | return Result.build(200, "已存在钢化任务,请等待钢化完成再指定钢化", result); |
| | | return Result.build(200, "取消当前钢化失败", result); |
| | | } |
| | | } |
| | | |
| | |
| | | import com.mes.bigstorage.mapper.BigStorageCageDetailsMapper; |
| | | import com.mes.bigstorage.service.BigStorageCageDetailsService; |
| | | import com.mes.bigstorage.service.BigStorageCageService; |
| | | import com.mes.bigstoragecagetask.entity.BigStorageCageHistoryTask; |
| | | import com.mes.bigstoragecagetask.service.BigStorageCageHistoryTaskService; |
| | | import com.mes.bigstoragetask.entity.BigStorageCageFeedTask; |
| | | import com.mes.bigstoragetask.entity.BigStorageCageOutTask; |
| | | import com.mes.bigstoragetask.entity.UpdateBigStorageCageDTO; |
| | |
| | | private DamageService damageService; |
| | | @Resource |
| | | private RedisUtil redisUtil; |
| | | |
| | | @Resource |
| | | BigStorageCageHistoryTaskService bigStorageCageHistoryTaskService; |
| | | |
| | | @Value("${mes.minCount}") |
| | | private int minCount; |
| | |
| | | |
| | | @Override |
| | | public boolean cancelTemperingTask() { |
| | | return false; |
| | | //当前正在执行的出片任务 |
| | | List<BigStorageCageHistoryTask> historyTaskList = bigStorageCageHistoryTaskService.list(new LambdaQueryWrapper<BigStorageCageHistoryTask>() |
| | | .eq(BigStorageCageHistoryTask::getTaskState, Const.GLASS_STATE_NEW) |
| | | .eq(BigStorageCageHistoryTask::getTargetSlot, Const.TEMPERING_OUT_TARGET_POSITION)); |
| | | //不存在出片任务,直接删除钢化小片表未出片的任务 |
| | | if (CollectionUtils.isEmpty(historyTaskList)) { |
| | | temperingGlassInfoMapper.delete(new LambdaQueryWrapper<TemperingGlassInfo>().eq(TemperingGlassInfo::getState, Const.TEMPERING_NEW)); |
| | | return Boolean.TRUE; |
| | | } |
| | | //存在出片任务,删除钢化小片表 |
| | | List<String> glassIdList = historyTaskList.stream().map(BigStorageCageHistoryTask::getGlassId).collect(Collectors.toList()); |
| | | GlassInfo glassInfo = glassInfoService.getOne(new LambdaQueryWrapper<GlassInfo>().in(GlassInfo::getGlassId, glassIdList) |
| | | .orderByDesc(GlassInfo::getTemperingFeedSequence).last("limit 1")); |
| | | temperingGlassInfoMapper.delete(new LambdaQueryWrapper<TemperingGlassInfo>() |
| | | .eq(TemperingGlassInfo::getEngineerId, glassInfo.getEngineerId()) |
| | | .eq(TemperingGlassInfo::getState, Const.TEMPERING_NEW) |
| | | .ge(TemperingGlassInfo::getTemperingLayoutId, glassInfo.getTemperingLayoutId()) |
| | | .gt(TemperingGlassInfo::getTemperingFeedSequence, glassInfo.getTemperingFeedSequence()) |
| | | ); |
| | | return Boolean.TRUE; |
| | | } |
| | | |
| | | @Override |
| | |
| | | import com.mes.pp.service.OptimizeProjectService; |
| | | import com.mes.rawglassdetails.entity.RawGlassStorageDetails; |
| | | import com.mes.rawglassstation.service.RawGlassStorageStationService; |
| | | import com.mes.tools.DateUtil; |
| | | import com.mes.tools.WebSocketServer; |
| | | import com.mes.uppattenusage.entity.UpPattenUsage; |
| | | import com.mes.uppattenusage.service.UpPattenUsageService; |
| | |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | |
| | | loadGlassChild("loadGlassRequestOne", 5, LOAD_GLASS_DEVICE_ONE_TASK, "loadGlassOne"); |
| | | } |
| | | |
| | | @Scheduled(fixedDelay = 10) |
| | | @Scheduled(fixedDelay = 10000) |
| | | public void loadTwoGlass() { |
| | | loadGlassChild("loadGlassRequestTwo", 6, LOAD_GLASS_DEVICE_TWO_TASK, "loadGlassTwo"); |
| | | } |
| | |
| | | package com.mes.hollow.controller; |
| | | |
| | | |
| | | import com.mes.hollow.entity.dto.FlowCardGlassInfoDTO; |
| | | import com.mes.hollow.entity.dto.LackDetailsDTO; |
| | | import com.mes.hollow.entity.vo.HollowAllFlowCardVO; |
| | | import com.mes.hollow.entity.vo.HollowBigStorageDetailsQueryVO; |
| | | import com.mes.hollow.service.HollowGlassRelationInfoService; |
| | | import com.mes.utils.Result; |
| | |
| | | |
| | | @ApiOperation("界面点击创建任务:查询中空所有流程卡对应的玻璃信息") |
| | | @PostMapping("/queryHollowAllFlowCard") |
| | | public Result<Map<String, List<FlowCardGlassInfoDTO>>> queryHollowAllFlowCard(@RequestBody HollowBigStorageDetailsQueryVO query) { |
| | | Map<String, List<FlowCardGlassInfoDTO>> bigStorageCageDetails = hollowGlassRelationInfoService.queryHollowAllFlowCard(query); |
| | | return Result.success(bigStorageCageDetails); |
| | | public Result<List<HollowAllFlowCardVO>> queryHollowAllFlowCard(@RequestBody HollowBigStorageDetailsQueryVO query) { |
| | | List<HollowAllFlowCardVO> hollowAllFlowCardVOList = hollowGlassRelationInfoService.queryHollowAllFlowCard(query); |
| | | return Result.success(hollowAllFlowCardVOList); |
| | | } |
| | | |
| | | @ApiOperation("查询指定流程卡及层数的缺片详情") |
| New file |
| | |
| | | package com.mes.hollow.entity.vo; |
| | | |
| | | import com.mes.hollow.entity.dto.FlowCardGlassInfoDTO; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | | * @Date: 2025/4/9 16:26 |
| | | * @Description: |
| | | */ |
| | | @Data |
| | | public class HollowAllFlowCardVO { |
| | | /** |
| | | * 流程卡号 |
| | | */ |
| | | private String FlowCardId; |
| | | /** |
| | | * 产品名称 |
| | | */ |
| | | private String ProductName; |
| | | /** |
| | | * 是否直通 |
| | | */ |
| | | private Boolean isThroughSlot; |
| | | |
| | | /** |
| | | * 流程卡数据 |
| | | */ |
| | | private List<FlowCardGlassInfoDTO> flowCardGlassInfoDTOList; |
| | | } |
| | |
| | | import com.mes.hollow.entity.dto.FlowCardGlassInfoDTO; |
| | | import com.mes.hollow.entity.dto.HollowBigStorageDTO; |
| | | import com.mes.hollow.entity.dto.LackDetailsDTO; |
| | | import com.mes.hollow.entity.vo.HollowAllFlowCardVO; |
| | | import com.mes.hollow.entity.vo.HollowBigStorageDetailsQueryVO; |
| | | |
| | | import java.util.List; |
| | |
| | | */ |
| | | void generateHollowGlassInfo(String flowCardId, int totalLayer, int layer); |
| | | |
| | | Map<String, List<FlowCardGlassInfoDTO>> queryHollowAllFlowCard(HollowBigStorageDetailsQueryVO query); |
| | | List<HollowAllFlowCardVO> queryHollowAllFlowCard(HollowBigStorageDetailsQueryVO query); |
| | | |
| | | List<FlowCardGlassInfoDTO> queryHollowAllFlowCardSummary(HollowBigStorageDetailsQueryVO query); |
| | | |
| | |
| | | |
| | | //设置文件第一层列表数据 |
| | | //暂时生成笼内所有的玻璃信息(已配对和未配对的) |
| | | // List<HollowGlassRelationInfo> hollowGlassRelationInfos = hollowGlassRelationInfoService.list(new LambdaQueryWrapper<HollowGlassRelationInfo>() |
| | | // .eq(HollowGlassRelationInfo::getFlowCardId, flowCardId).orderByAsc(HollowGlassRelationInfo::getHollowSequence)); |
| | | List<HollowBigStorageCageDetails> hollowGlassRelationInfos = hollowBigStorageCageDetailsService.queryPairGlassList(flowCardId, relationInfo.getTotalLayer(), relationInfo.getTotalPairQuantity(), isOut); |
| | | Map<Integer, List<HollowBigStorageCageDetails>> listMap = hollowGlassRelationInfos.stream().collect(Collectors.groupingBy(HollowBigStorageCageDetails::getHollowSequence)); |
| | | Map<Integer, List<HollowBigStorageCageDetails>> listMap = hollowGlassRelationInfos.stream() |
| | | .collect(Collectors.groupingBy(HollowBigStorageCageDetails::getHollowSequence, |
| | | Collectors.collectingAndThen(Collectors.toList(), |
| | | list -> list.stream().sorted(Comparator.comparing(HollowBigStorageCageDetails::getLayer)).collect(Collectors.toList())))); |
| | | Map<Integer, List<HollowBigStorageCageDetails>> sortListMap = new TreeMap<>(); |
| | | sortListMap.putAll(listMap); |
| | | //设置间隔板数据共所有配对玻璃使用 |
| | |
| | | import com.mes.hollow.entity.dto.HollowBigStorageDTO; |
| | | import com.mes.hollow.entity.dto.HollowGlassDetailsDTO; |
| | | import com.mes.hollow.entity.dto.LackDetailsDTO; |
| | | import com.mes.hollow.entity.vo.HollowAllFlowCardVO; |
| | | import com.mes.hollow.entity.vo.HollowBigStorageDetailsQueryVO; |
| | | import com.mes.hollow.mapper.HollowGlassRelationInfoMapper; |
| | | import com.mes.hollow.service.HollowBigStorageCageDetailsService; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.*; |
| | | import java.util.ArrayList; |
| | | import java.util.Comparator; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, List<FlowCardGlassInfoDTO>> queryHollowAllFlowCard(HollowBigStorageDetailsQueryVO query) { |
| | | public List<HollowAllFlowCardVO> queryHollowAllFlowCard(HollowBigStorageDetailsQueryVO query) { |
| | | List<HollowBigStorageCageDetails> detailsList = hollowBigStorageCageDetailsService.list(new LambdaQueryWrapper<HollowBigStorageCageDetails>() |
| | | .eq(HollowBigStorageCageDetails::getState, Const.GLASS_STATE_IN) |
| | | .like(StringUtils.isNotBlank(query.getFilmsId()), HollowBigStorageCageDetails::getFilmsId, query.getFilmsId()) |
| | |
| | | ); |
| | | if (CollectionUtil.isEmpty(detailsList)) { |
| | | log.info("笼内无玻璃"); |
| | | return new HashMap<>(); |
| | | return new ArrayList<>(); |
| | | } |
| | | Map<String, List<HollowBigStorageCageDetails>> listMap = detailsList.stream().collect(Collectors.groupingBy(HollowBigStorageCageDetails::getFlowCardId)); |
| | | List<FlowCardGlassInfoDTO> dtos = new ArrayList<>(); |
| | | List<HollowAllFlowCardVO> resultList = new ArrayList<>(); |
| | | listMap.forEach((e, v) -> { |
| | | HollowAllFlowCardVO hollowAllFlowCardVO = new HollowAllFlowCardVO(); |
| | | HollowBigStorageCageDetails cageDetails = v.get(0); |
| | | hollowAllFlowCardVO.setFlowCardId(e); |
| | | if (cageDetails.getHollowSequence() == 0) { |
| | | hollowAllFlowCardVO.setIsThroughSlot(Boolean.TRUE); |
| | | } else { |
| | | hollowAllFlowCardVO.setIsThroughSlot(Boolean.FALSE); |
| | | } |
| | | //按照流程卡获取对应的产品名称 |
| | | String productName = baseMapper.queryProductNameByFlowCardId(cageDetails.getFlowCardId()); |
| | | hollowAllFlowCardVO.setProductName(productName); |
| | | List<FlowCardGlassInfoDTO> flowCardInfoList = hollowBigStorageCageDetailsService.hollowIsAll(e, cageDetails.getTotalLayer(), Boolean.FALSE); |
| | | for (FlowCardGlassInfoDTO item : flowCardInfoList) { |
| | | item.setProductName(productName); |
| | | dtos.add(item); |
| | | } |
| | | hollowAllFlowCardVO.setFlowCardGlassInfoDTOList(flowCardInfoList); |
| | | resultList.add(hollowAllFlowCardVO); |
| | | }); |
| | | Map<String, FlowCardGlassInfoDTO> result = dtos.stream() |
| | | .collect(Collectors.toMap( |
| | | FlowCardGlassInfoDTO::getFlowCardId, |
| | | dto -> { |
| | | FlowCardGlassInfoDTO newDto = new FlowCardGlassInfoDTO(); |
| | | newDto.setFlowCardId(dto.getFlowCardId()); |
| | | newDto.setSumCount(dto.getSumCount()); |
| | | newDto.setPairCount(dto.getPairCount()); |
| | | newDto.setRealCount(dto.getRealCount()); |
| | | newDto.setLayer(dto.getLayer()); |
| | | return newDto; |
| | | }, |
| | | (dto1, dto2) -> { |
| | | dto1.setRealCount(dto1.getRealCount() + dto2.getRealCount()); // 累加 realCount |
| | | dto1.setLayer(Math.max(dto1.getLayer(), dto2.getLayer())); // 累加 最大层数 |
| | | return dto1; // 返回合并后的对象 |
| | | } |
| | | )); |
| | | return dtos.stream().collect(Collectors.groupingBy(e -> e.getFlowCardId() + ":" + e.getProductName())); |
| | | return resultList; |
| | | // return dtos.stream().collect(Collectors.groupingBy(e -> e.getFlowCardId() + ":" + e.getProductName())); |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | } |
| | | //超大尺寸 |
| | | if (slotMaxHeight < Math.min(glassInfoList.get(0).getWidth(), glassInfoList.get(0).getHeight()) || glassInfoList.get(0).getThickness() > slotMaxthickness) { |
| | | if (slotMaxHeight < Math.min(glassInfoList.get(0).getWidth(), glassInfoList.get(0).getHeight()) || glassInfoList.get(0).getThickness() >= slotMaxthickness) { |
| | | int count = hollowBigStorageCageDetailsService.count(new LambdaQueryWrapper<HollowBigStorageCageDetails>() |
| | | .eq(HollowBigStorageCageDetails::getSlot, THROUGH_SLOT) |
| | | .in(HollowBigStorageCageDetails::getState, Const.GLASS_STATE_IN_ALL)); |
| | |
| | | //计算目标格子 |
| | | List<HollowBigStorageCageHistoryTask> historyTasks = new ArrayList<>(); |
| | | try { |
| | | if (slotMaxHeight > Math.min(glassInfoList.get(0).getWidth(), glassInfoList.get(0).getHeight()) && glassInfoList.get(0).getThickness() < slotMaxthickness) { |
| | | for (BigStorageCageTask task : inTaskList) { |
| | | GlassInfo info = glassListMap.get(task.getGlassId()).get(0); |
| | | HollowBigStorageDTO bigStorageDTO = hollowGlassRelationInfoService.queryHollowTargetSlot(info.getFlowCardId(), |
| | |
| | | .eq(HollowGlassRelationInfo::getHollowSequence, bigStorageDTO.getHollowSequence()) |
| | | ); |
| | | } |
| | | } else { |
| | | BigStorageCageTask task = inTaskList.get(0); |
| | | task.setTargetSlot(THROUGH_SLOT); |
| | | bigStorageCageTaskService.updateTaskMessage("big_storage_cage_in_two_task", task); |
| | | //存放历史任务 |
| | | HollowBigStorageCageHistoryTask historyTask = new HollowBigStorageCageHistoryTask(); |
| | | BeanUtils.copyProperties(task, historyTask); |
| | | historyTask.setTaskType(Const.BIG_STORAGE_AFTER_IN); |
| | | historyTask.setGlassCount(glassInfoList.size()); |
| | | historyTask.setTaskState(Const.ENGINEERING_NEW); |
| | | historyTasks.add(historyTask); |
| | | GlassInfo info = glassInfoList.get(0); |
| | | HollowBigStorageCageDetails cageDetails = new HollowBigStorageCageDetails(); |
| | | BeanUtils.copyProperties(info, cageDetails); |
| | | cageDetails.setSlot(THROUGH_SLOT); |
| | | cageDetails.setState(Const.GLASS_STATE_NEW); |
| | | cageDetails.setDeviceId(0); |
| | | cageDetails.setSequence(0); |
| | | cageDetails.setHollowSequence(0); |
| | | cageDetails.setGap(glassGap); |
| | | cageDetails.setFilmsId(info.getFilmsid()); |
| | | cageDetails.setId(null); |
| | | hollowBigStorageCageDetailsService.save(cageDetails); |
| | | } |
| | | } catch (Exception exception) { |
| | | log.info("进片任务执行中发生异常:{}", exception); |
| | | hollowGlassRelationInfoService.update(new LambdaUpdateWrapper<HollowGlassRelationInfo>() |
| | |
| | | <if test="flag == true"> |
| | | and sum_count = pair_count |
| | | </if> |
| | | order by layer |
| | | </select> |
| | | |
| | | <select id="queryIsAllNeedDispatchVirtualSlot" resultMap="virtualSlotSequenceDTO"> |