| | |
| | | const requestData = { |
| | | line: 2001 |
| | | }; |
| | | request.post("/cacheGlass/taskCache/selectEdgTask",{ |
| | | ...requestData, |
| | | const timeRange = ref([]) |
| | | const selectValuesa = reactive([]); |
| | | // request.post("/cacheGlass/taskCache/selectEdgTask",{ |
| | | // ...requestData, |
| | | |
| | | }).then((res) => { |
| | | if (res.code == 200) { |
| | | // }).then((res) => { |
| | | // if (res.code == 200) { |
| | | |
| | | console.log(res.data); |
| | | tableData.value = res.data |
| | | console.log(res.data[0].slot); |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | // console.log(res.data); |
| | | // tableData.value = res.data |
| | | // console.log(res.data[0].slot); |
| | | // } else { |
| | | // ElMessage.warning(res.msg) |
| | | |
| | | } |
| | | }); |
| | | // } |
| | | // }); |
| | | |
| | | // 磨边任务查询 |
| | | const setEdgGlassInfoRequest = async () => { |
| | | let celllist=[] |
| | | let stateList=[] |
| | | if(selectValuesa[0]!=null&&selectValuesa[0]!='undefined'){ |
| | | if(selectValuesa[0]!=""){ |
| | | celllist=[selectValuesa[0]]; |
| | | } |
| | | } |
| | | if(selectValuesa[1]!=null&&selectValuesa[1]!='undefined'){ |
| | | if(selectValuesa[1]!=""){ |
| | | stateList=[selectValuesa[1]]; |
| | | } |
| | | } |
| | | console.log(timeRange.value[0],timeRange.value[1]); |
| | | const response = await request.post("/cacheGlass/edgGlassTaskInfo/setEdgGlassInfoRequest", { |
| | | cellList: celllist, |
| | | stateList: stateList, |
| | | beginDate: timeRange.value[0], |
| | | endDate: timeRange.value[1], |
| | | }) |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | |
| | | } |
| | | |
| | | // 破损 |
| | | const open = async(row) => { |
| | | try { |
| | |
| | | if (confirmResult === 'confirm') { |
| | | // 用户点击了“是”,现在调用删除接口 |
| | | const response = await request.post("/cacheGlass/edgStorageCage/edgReportStatus", { |
| | | glassId: row.GlassId, |
| | | controlsId: 300, |
| | | line: 2001, |
| | | machine: '冷加工', |
| | | glassId: row.glassId, |
| | | state: 8, |
| | | line: row.line, |
| | | workingProcedure: '冷加工', |
| | | }) |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | |
| | | // alert('删除失败:' + deleteResponse.message); |
| | | } |
| | | } |
| | | } catch (error) { |
| | | // 处理可能出现的错误,比如 ElMessageBox 抛出的异常等 |
| | | console.error('发生错误:', error); |
| | | } catch (error) { |
| | | // 处理可能出现的错误,比如 ElMessageBox 抛出的异常等 |
| | | console.error('发生错误:', error); |
| | | } |
| | | }; |
| | | // 拿走 |
| | |
| | | if (confirmResult === 'confirm') { |
| | | // 用户点击了“是”,现在调用删除接口 |
| | | const response = await request.post("/cacheGlass/edgStorageCage/edgReportStatus", { |
| | | glassId: row.GlassId, |
| | | controlsId: 301, |
| | | line: 2001, |
| | | machine: '冷加工', |
| | | glassId: row.glassId, |
| | | state: 9, |
| | | line: row.line, |
| | | workingProcedure: '冷加工', |
| | | }) |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | |
| | | // 定义消息处理函数,更新 receivedData 变量 |
| | | const handleMessage = (data) => { |
| | | // 更新 tableData 的数据 |
| | | tableData.value = data.EdgTasks1[0] |
| | | tableData.value = data.edgTasks[0] |
| | | }; |
| | | onMounted(() => { |
| | | socket = initializeWebSocket(socketUrl, handleMessage); |
| | |
| | | <template> |
| | | <div> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" v-loading="loading"> |
| | | <el-select v-model="selectValuesa[0]" filterable :placeholder="$t('请选择线路')" clearable style="margin-left: 20px;margin-bottom: 10px;"> |
| | | <el-option label="磨边一线" value="2001"></el-option> |
| | | <el-option label="磨边二线" value="2002"></el-option> |
| | | </el-select> |
| | | |
| | | <el-select v-model="selectValuesa[1]" filterable :placeholder="$t('请选择状态')" clearable style="margin-left: 20px;margin-bottom: 10px;" > |
| | | <el-option label="未磨边" value="0"></el-option> |
| | | <el-option label="磨边中" value="1"></el-option> |
| | | <el-option label="已磨边" value="2"></el-option> |
| | | </el-select> |
| | | <span class="demonstration" style="margin-left: 20px;margin-bottom: 10px;">时间段</span> |
| | | <el-date-picker v-model="timeRange" type="datetimerange" range-separator="至" start-placeholder="开始日期" style="margin-left: 20px;margin-bottom: 10px;" value-format = "YYYY-MM-DD hh:mm:ss" |
| | | |
| | | end-placeholder="结束日期"> |
| | | </el-date-picker> |
| | | <el-button type="primary" style="margin-left: 10px;margin-bottom: 10px;" @click="setEdgGlassInfoRequest()">{{ |
| | | $t('reportmanage.inquire') |
| | | }}</el-button> |
| | | |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;"> |
| | | <el-table height="240" ref="table" |
| | | <el-table height="750" ref="table" |
| | | @selection-change="handleSelectionChange" |
| | | :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="GlassId" align="center" :label="$t('workOrder.glassID')" min-width="180" /> |
| | | <el-table-column prop="Height" align="center" :label="$t('workOrder.height')" min-width="80" /> |
| | | <el-table-column prop="Width" align="center" :label="$t('workOrder.width')" min-width="120" /> |
| | | <el-table-column prop="Thickness" align="center" :label="$t('workOrder.thickness')" min-width="120" /> |
| | | <el-table-column prop="FilmsId" align="center" :label="$t('workOrder.coatingtypes')" min-width="120" /> |
| | | <el-table-column prop="SerialNumber" align="center" :label="$t('workOrder.productionsequence')" min-width="120" /> |
| | | <el-table-column prop="FlowCardId" align="center" :label="$t('workOrder.cardnumber')" min-width="120" /> |
| | | <el-table-column prop="glassId" align="center" :label="$t('workOrder.glassID')" min-width="180" /> |
| | | <el-table-column prop="width" align="center" :label="$t('workOrder.width')" min-width="120" /> |
| | | <el-table-column prop="height" align="center" :label="$t('workOrder.height')" min-width="80" /> |
| | | <el-table-column prop="thickness" align="center" :label="$t('workOrder.thickness')" min-width="120" /> |
| | | <el-table-column prop="glassType" align="center" :label="$t('workOrder.glasstype')" min-width="120" /> |
| | | <el-table-column prop="line" align="center" :label="$t('workOrder.line')" min-width="120" /> |
| | | <el-table-column prop="status" :label="$t('workOrder.status')" align="center" width="200"> |
| | | <template #default="scope"> |
| | | {{ scope.row.status==0?"未磨边":scope.row.status==1?"磨边中":"已磨边" }} |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | |
| | | <el-table-column fixed="right" :label="$t('workOrder.operate')" align="center" width="200"> |
| | | <template #default="scope"> |
| | | <el-button size="mini" type="text" plain @click="open(scope.row)">{{ $t('workOrder.breakage') }}</el-button> |