| | |
| | | layout="prev, pager, next" |
| | | :total="30" |
| | | :current-page.sync="currentPage" |
| | | @current-change="handlePageChange" |
| | | @current-change="handlePageChange1" |
| | | /> |
| | | </div> |
| | | </div> |
| | |
| | | <el-pagination layout="prev, pager, next" :total="50"/> |
| | | </div> |
| | | </el-table> |
| | | <div style="display: flex;margin-left: 40%;margin-top: 10px;"> |
| | | <el-pagination |
| | | background |
| | | size="large" |
| | | layout="prev, pager, next" |
| | | :total="30" |
| | | :current-page.sync="currentPage2" |
| | | @current-change="handlePageChange2" |
| | | /> |
| | | </div> |
| | | </el-dialog> |
| | | <!-- 开始任务 --> |
| | | <el-dialog v-model="blinda" top="30vh" width="25%" :title="$t('hellow.pstarttask')"> |
| | |
| | | const dialogFormVisibleb = ref(false) |
| | | const dialogFormVisiblec = ref(false) |
| | | const dialogFormVisibled = ref(false) |
| | | const currentPage2 = ref(1) |
| | | const currentRow = reactive({}); |
| | | const options = [ |
| | | { |
| | |
| | | let socket = null; |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/hollowGlass/api/talk/HollowGlass`; |
| | | const currentPage = ref(parseInt(window.localStorage.getItem('currentPage')) || 1); |
| | | console.log(currentPage.value); |
| | | |
| | | watch(() => currentPage.value, (newVal) => { |
| | | window.localStorage.setItem('currentPage', newVal); |
| | | }); |
| | | const currentPageKey = computed(() => `93${currentPage.value - 1}`); |
| | | const handlePageChange = (newPage) => { |
| | | const handlePageChange1 = (newPage) => { |
| | | currentPage.value = newPage; |
| | | console.log(currentPage.value); |
| | | }; |
| | | const handlePageChange2 = (newPage) => { |
| | | currentPage2.value = newPage; |
| | | console.log(currentPage2.value); |
| | | // window.localStorage.setItem('page', currentPage2.value) |
| | | fetchFlowBind(currentRow.projectNumber, currentRow.layer, currentPage2.value); |
| | | |
| | | }; |
| | | const handleMessage = (data) => { |
| | | try { |
| | |
| | | }; |
| | | // 缺片详情 |
| | | const handleBindRack = (row) => { |
| | | currentPage2.value = 1; |
| | | const { projectNumber, layer } = row; |
| | | currentRow.projectNumber = row.projectNumber; |
| | | dialogFormVisibleb.value = true; |
| | | fetchFlowBind(projectNumber, layer); |
| | | fetchFlowBind(projectNumber, layer,currentPage2.value); |
| | | }; |
| | | // 领取任务 |
| | | const handletake = (row) => { |
| | |
| | | // } |
| | | // } |
| | | // 缺片详情 |
| | | const fetchFlowBind = async (flowCardId, layer) => { |
| | | // const fetchData = async (page) => { |
| | | // try { |
| | | // var url="/hollowGlass/hollowGlassRelationInfo/queryLackByFlowCard?flowCardId="+flowCardId + "&layer=" + layer; |
| | | // // const url = `/hollowGlass/hollowGlassRelationInfo/queryLackByFlowCard?flowCardId=${flowCardId.value}&layer=${layer.value}&page=${page}&size=1`; // 假设你的接口支持分页参数page和size |
| | | // const response = await request.post(url); |
| | | // if (response.code == 200) { |
| | | // tableDatac.value = response.data[newPage]; // 假设返回的数据直接赋值给tableDatac |
| | | // ElMessage.success(response.message); |
| | | // } else { |
| | | // ElMessage.error('数据加载失败'); |
| | | // } |
| | | // } catch (error) { |
| | | // ElMessage.error('请求出错'); |
| | | // } |
| | | // }; |
| | | |
| | | |
| | | // // 初始化加载第一页数据 |
| | | // fetchData(currentPage2.value); |
| | | const fetchFlowBind = async (flowCardId, layer, page) => { |
| | | try { |
| | | // let page = window.localStorage.getItem('page') |
| | | var url="/hollowGlass/hollowGlassRelationInfo/queryLackByFlowCard?flowCardId="+flowCardId + "&layer=" + layer; |
| | | const response = await request.post(url) |
| | | if (response.code == 200) { |
| | | tableDatac.value = response.data[1]; |
| | | console.log(page); |
| | | tableDatac.value = response.data[page]; |
| | | // window.localStorage.setItem('response.data',response.data) |
| | | ElMessage.success(response.message); |
| | | } else { |
| | | ElMessage.error(response.message); |