| | |
| | | const slot = ref(''); |
| | | const leftingStation = ref(''); |
| | | const loadingline = ref(''); |
| | | const rawTableData = ref([]); |
| | | |
| | | let webSocket: WebSocket | null = null; |
| | | const globalDate = inject('globalDate'); |
| | | const value = ref('') |
| | | const options = [ |
| | | { |
| | | value: 101, |
| | | value: 99, |
| | | label: t('film.warehousing1'), |
| | | }, |
| | | ] |
| | |
| | | window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo)) |
| | | } |
| | | onMounted(() => { |
| | | console.log("onMounted 钩子已触发"); |
| | | socket = initializeWebSocket(socketUrl, handleMessage); |
| | | parseAndSetTime(); |
| | | getListRawGlassTask(); |
| | | }); |
| | | let socket = null; |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/glassStorage/api/talk/rawGlass`; |
| | |
| | | } |
| | | return task; |
| | | }); |
| | | rawTableData.value = formattedTasks; |
| | | tableDataa.value = formattedTasks; |
| | | if (data.rawStationDetailsList != null) { |
| | | tableDatab.value = data.rawStationDetailsList[0] |
| | |
| | | const handleBinde = (row) => { |
| | | dialogFormVisiblee.value = true; |
| | | }; |
| | | |
| | | // 查询原片仓储任务详情 |
| | | const getListRawGlassTask = async (row) => { |
| | | try { |
| | | console.log("[getListRawGlassTask] 函数已被调用,开始执行"); |
| | | var url = "/glassStorage/rawGlassStorageTask/listRawGlassTask"; |
| | | const response = await request.post(url) |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | | // 更新tableDataa数据 |
| | | if (response.data && response.data.tasks && response.data.tasks[0]) { |
| | | const formattedTasks = response.data.tasks[0].map(task => { |
| | | if (task && task.createTime) { |
| | | return { ...task, createTime: formatTimestamp(task.createTime) }; |
| | | } |
| | | return task; |
| | | }); |
| | | rawTableData.value = formattedTasks; |
| | | tableDataa.value = formattedTasks; |
| | | } |
| | | // 更新tableDatab数据,确保页面能及时显示任务 |
| | | if (response.data && response.data.rawStationDetailsList && response.data.rawStationDetailsList[0]) { |
| | | tableDatab.value = response.data.rawStationDetailsList[0]; |
| | | } |
| | | } else { |
| | | ElMessage.error(response.msg); |
| | | } |
| | | } catch (error) { |
| | | console.error('查询原片仓储任务详情失败:', error); |
| | | } |
| | | }; |
| | | |
| | | |
| | | // 删除 |
| | | const deleteWarehousing = async (row) => { |
| | | try { |
| | |
| | | } catch (error) { |
| | | } |
| | | }; |
| | | // 入库请求 |
| | | // 吊装位请求 |
| | | const handleupc = async () => { |
| | | try { |
| | | var url = "/glassStorage/rawGlassStorageDetails/warehousingRequest?leftingStation=" + leftingStation.value; |
| | | const response = await request.post(url) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | dialogFormVisiblec.value = false; |
| | | leftingStation.value = ''; |
| | | // 调用获取任务详情的接口,确保数据及时更新 |
| | | await getListRawGlassTask(); |
| | | dialogFormVisiblec.value = false; |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.msg); |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | catch (error) { |
| | | dialogFormVisiblec.value = false; |
| | | console.error('入库请求失败:', error); |
| | | } |
| | | } |
| | | // 出库请求 |
| | |
| | | } |
| | | }; |
| | | // 查询数据 |
| | | const selectReportData = async () => { |
| | | let celllist = [] |
| | | let stateList = [] |
| | | if (selectValuesa[0] != null && selectValuesa[0] != 'undefined') { |
| | | if (selectValuesa[0] != "") { |
| | | celllist = [selectValuesa[0]]; |
| | | } |
| | | const selectReportData = () => { |
| | | // 处理查询条件 |
| | | const [taskStateVal, taskTypeVal] = selectValuesa; |
| | | const beginDate = timeRange.value?.[0] || ''; |
| | | const endDate = timeRange.value?.[1] || ''; |
| | | |
| | | let filteredData = [...rawTableData.value]; |
| | | |
| | | if (beginDate) { |
| | | const beginTime = new Date(beginDate).getTime(); |
| | | filteredData = filteredData.filter(item => new Date(item.createTime).getTime() >= beginTime); |
| | | } |
| | | if (selectValuesa[1] != null && selectValuesa[1] != 'undefined') { |
| | | if (selectValuesa[1] != "") { |
| | | stateList = [selectValuesa[1]]; |
| | | } |
| | | if (endDate) { |
| | | const endTime = new Date(endDate).getTime(); |
| | | filteredData = filteredData.filter(item => new Date(item.createTime).getTime() <= endTime); |
| | | } |
| | | const response = await request.post("/glassStorage/rawGlassStorageTask/setRawGlassTaskRequest", { |
| | | beginDate: (timeRange.value && timeRange.value[0]) || '', |
| | | endDate: (timeRange.value && timeRange.value[1]) || '', |
| | | taskState: celllist, |
| | | taskType: stateList |
| | | }) |
| | | if (response.code === 200) { |
| | | // tableDataa.value = response.data; |
| | | ElMessage.success(response.message); |
| | | |
| | | if (taskStateVal != null && taskStateVal !== 'undefined' && taskStateVal !== '') { |
| | | filteredData = filteredData.filter(item => item.taskState.toString() === taskStateVal); |
| | | } |
| | | else { |
| | | ElMessage.error(response.message); |
| | | |
| | | if (taskTypeVal != null && taskTypeVal !== 'undefined' && taskTypeVal !== '') { |
| | | filteredData = filteredData.filter(item => item.taskType.toString() === taskTypeVal); |
| | | } |
| | | |
| | | tableDataa.value = filteredData; |
| | | |
| | | ElMessage.success(`查询成功,共 ${filteredData.length} 条数据`); |
| | | }; |
| | | |
| | | // 是否禁用 |
| | | const toggleEnableState = async (row: any) => { |
| | | if (!row.deviceId) { |
| | |
| | | function getStatusText1(taskType) { |
| | | switch (taskType) { |
| | | case 1: |
| | | return t('sorter.advancetask');//进片任务 |
| | | return t('sorter.warehouseReturntasks');//回库任务 |
| | | case 2: |
| | | return t('sorter.outputtasks');//出片任务 |
| | | case 3: |
| | |
| | | case 4: |
| | | return t('sorter.advancerequests');//进片请求 |
| | | case 5: |
| | | return t('sorter.releaserequest');//出片请求 |
| | | return t('sorter.warehouseReturntasks');//回库请求 |
| | | } |
| | | } |
| | | function getStatusType2(taskState) { |
| | | switch (taskState) { |
| | | case 0: |
| | | return 'info'; |
| | | case 2: |
| | | return 'warning'; |
| | | case 1: |
| | | return 'warning'; |
| | | case 2: |
| | | return 'success'; |
| | | case 3: |
| | | return 'danger'; |
| | | } |
| | | } |
| | | function getStatusText2(taskState) { |
| | | switch (taskState) { |
| | | case 0: |
| | | return t('film.built');//新建 |
| | | case 2: |
| | | return t('film.fail');//失败 |
| | | case 1: |
| | | return t('film.execution');//执行中 |
| | | case 2: |
| | | return t('film.finish');//完成 |
| | | case 3: |
| | | return t('film.fail');//失败 |
| | | } |
| | | } |
| | | onBeforeUnmount(() => { |
| | |
| | | {{ $t('film.warehousing') }} |
| | | </el-button> |
| | | <el-button style="margin-left: 20px;" id="searchButton" type="success" @click="handleBindc"> |
| | | {{ $t('film.pwarehousing') }} |
| | | {{ $t('film.emptyShelfPosition') }} |
| | | </el-button> |
| | | <el-button style="margin-left: 20px;" id="searchButton" type="success" @click="handleBinde">{{ |
| | | $t('film.pwareout') |
| | | $t('film.warehouseReturn') |
| | | }} |
| | | </el-button> |
| | | <el-button style="margin-left: 20px;" id="searchButton" type="success" @click="handlehistorical">{{ |
| | |
| | | <el-date-picker style="margin-left: 10px;" v-model="timeRange" type="datetimerange" format="YYYY/MM/DD HH:mm:ss" |
| | | value-format="YYYY-MM-DD HH:mm:ss" :start-placeholder="$t('film.starttime')" |
| | | :end-placeholder="$t('film.endtime')" :default-time="defaultTime" /> |
| | | <el-select v-model="selectValuesa[0]" clearable :placeholder="$t('film.taskstatus')" style="margin-left: 10px;"> |
| | | <el-select v-model="selectValuesa[0]" clearable :placeholder="$t('film.taskstatus')" style="margin-left: 10px; width: 200px;"> |
| | | <el-option :label="$t('film.built')" value="0"></el-option> |
| | | <el-option :label="$t('film.finish')" value="1"></el-option> |
| | | <el-option :label="$t('film.fail')" value="2"></el-option> |
| | | <el-option :label="$t('film.execution')" value="1"></el-option> |
| | | <el-option :label="$t('film.finish')" value="2"></el-option> |
| | | <el-option :label="$t('film.fail')" value="3"></el-option> |
| | | </el-select> |
| | | <el-select v-model="selectValuesa[1]" clearable :placeholder="$t('film.tasktype')" style="margin-left: 10px;"> |
| | | <el-option :label="$t('sorter.advancetask')" value="1"></el-option> |
| | | <el-select v-model="selectValuesa[1]" clearable :placeholder="$t('film.tasktype')" style="margin-left: 10px; width: 200px;"> |
| | | <el-option :label="$t('sorter.warehouseReturntasks')" value="1"></el-option> |
| | | <el-option :label="$t('sorter.outputtasks')" value="2"></el-option> |
| | | <el-option :label="$t('sorter.schedulingtasks')" value="3"></el-option> |
| | | <el-option :label="$t('sorter.advancerequests')" value="4"></el-option> |
| | | <el-option :label="$t('sorter.releaserequest')" value="5"></el-option> |
| | | <el-option :label="$t('sorter.warehouseReturntasks')" value="5"></el-option> |
| | | </el-select> |
| | | <el-button type="primary" style="margin-left: 10px;" @click="selectReportData()">{{ $t('film.inquire') |
| | | }}</el-button> |
| | |
| | | <el-table-column prop="createTime" align="center" :label="$t('film.createtime')" /> |
| | | <el-table-column fixed="right" :label="$t('film.operate')" align="center"> |
| | | <template #default="scope"> |
| | | <el-button :disabled="(scope.row.taskState !== 0)" type="text" plain @click="successfull(scope.row)">{{ |
| | | <el-button :disabled="(scope.row.taskState >=2)" type="text" plain @click="successfull(scope.row)">{{ |
| | | $t('searchOrder.successfullyprocessed') }}</el-button> |
| | | <el-button :disabled="(scope.row.taskState !== 0)" type="text" plain @click="handleptask(scope.row)">{{ |
| | | <el-button :disabled="(scope.row.taskState >=2)" type="text" plain @click="handleptask(scope.row)">{{ |
| | | $t('searchOrder.taskfailure') }}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <el-dialog v-model="dialogFormVisiblea" top="5vh" width="85%"> |
| | | <el-table ref="table" style="margin-top: 20px;height: 700px;" :data="tableDatab" |
| | | :header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129' }"> |
| | | <el-table-column prop="deviceId" fixed align="center" :label="$t('film.station')" min-width="80" /> |
| | | <!-- <el-table-column prop="deviceId" fixed align="center" :label="$t('film.station')" min-width="80" /> --> |
| | | <el-table-column prop="slot" fixed align="center" :label="$t('film.slot')" min-width="80" /> |
| | | <el-table-column prop="patternWidth" align="center" :label="$t('film.width')" min-width="80" /> |
| | | <el-table-column prop="patternHeight" align="center" :label="$t('film.height')" min-width="80" /> |
| | |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | <el-dialog v-model="dialogFormVisiblec" top="24vh" width="30%" :title="$t('film.pwarehousing')"> |
| | | <el-dialog v-model="dialogFormVisiblec" top="24vh" width="30%" :title="$t('film.emptyShelfPosition')"> |
| | | <div style="margin-left: 50px;margin-bottom: 10px;"> |
| | | <el-form-item :label="$t('film.position')" :required="true"> |
| | | <el-select v-model="leftingStation" clearable :placeholder="$t('film.cposition')" style="margin-left: 20px;"> |
| | | <el-option :label="$t('film.position1')" value="101"></el-option> |
| | | <el-option :label="$t('film.position1')" value="99"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </div> |
| | |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | <el-dialog v-model="dialogFormVisiblee" top="24vh" width="30%" :title="$t('film.pwareout')"> |
| | | <el-dialog v-model="dialogFormVisiblee" top="24vh" width="30%" :title="$t('film.warehouseReturn')"> |
| | | <div style="margin-left: 50px;margin-bottom: 10px;"> |
| | | <el-form-item :label="$t('film.position')" :required="true"> |
| | | <el-select v-model="leftingStation" clearable :placeholder="$t('film.cposition')" style="margin-left: 20px;"> |
| | | <el-option :label="$t('film.position1')" value="101"></el-option> |
| | | <el-option :label="$t('film.position1')" value="99"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </div> |
| | |
| | | } |
| | | |
| | | .img-dlpl { |
| | | margin-left: 38px; |
| | | margin-left: 345px; |
| | | margin-top: 15px; |
| | | background-image: url('../../assets/cangchu2.png'); |
| | | background-image: url('../../assets/aj.png'); |
| | | background-repeat: no-repeat; |
| | | background-attachment: local; |
| | | min-height: 800px; |
| | | width: 1070px; |
| | | max-width: 100%; |
| | | background-size: 1500px 810px; |
| | | background-size: 980px 700px; |
| | | overflow: hidden; |
| | | position: relative; |
| | | } |
| | | |
| | | .img-car1 { |
| | | display: flex; |
| | | background-image: url('../../assets/cangchu1.png'); |
| | | background-image: url(''); |
| | | position: absolute; |
| | | background-repeat: no-repeat; |
| | | background-attachment: local; |