| | |
| | | const requestData = { |
| | | line: 2001 |
| | | }; |
| | | const timeRange = ref(["2022-01-01", "2025-01-01"]) |
| | | const selectValuesa = reactive({}); |
| | | // request.post("/cacheGlass/taskCache/selectEdgTask",{ |
| | | // ...requestData, |
| | | |
| | |
| | | |
| | | // } |
| | | // }); |
| | | |
| | | // 磨边任务查询 |
| | | const setEdgGlassInfoRequest = async () => { |
| | | |
| | | const response = await request.post("/cacheGlass/edgGlassTaskInfo/setEdgGlassInfoRequest", { |
| | | cellList: [selectValuesa[0]], |
| | | stateList: [selectValuesa[1]], |
| | | 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 { |
| | |
| | | // 定义消息处理函数,更新 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> |
| | | <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 > |
| | | <el-option label="未磨边" value="0"></el-option> |
| | | <el-option label="磨边中" value="1"></el-option> |
| | | <el-option label="已磨边" value="2"></el-option> |
| | | </el-select> |
| | | <el-date-picker style="margin-left: 10px;" v-model="timeRange" type="daterange" format="YYYY/MM/DD" |
| | | value-format="YYYY-MM-DD" :start-placeholder="$t('reportmanage.starttime')" |
| | | :end-placeholder="$t('reportmanage.endtime')" :default-time="defaultTime" /> |
| | | <el-button type="primary" style="margin-left: 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" |
| | | @selection-change="handleSelectionChange" |
| | | :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="glass_id" align="center" :label="$t('workOrder.glassID')" min-width="180" /> |
| | | <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="glass_type" align="center" :label="$t('workOrder.glasstype')" 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 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> |