SpringBoot调用PageHelper.startPage(Object params)报错:分页查询缺少必要的参数:XXX

在SpringBoot项目中使用PageHelper进行分页查询时,调用PageHelper.startPage(Object params)方法报错,提示缺少必要参数。问题根源在于`pagehelper.params`配置与传入参数不匹配。解决方案是确保Map的key或JavaBean属性与默认配置的`pageNum`, `pageSize`, `count`等一致,或者不使用`pagehelper.params`配置,直接按照默认值设置。" 116998024,8045387,Pandas 数据操作详解,"['Python', '数据分析', 'Pandas', '数据处理']

问题描述:

项目中使用了MyBatis分页插件,调用以下方法实现分页,无论传入JavaBean还是Map都报错:分页查询缺少必要的参数:XXX

Map<String, Object> params = new HashMap<String, Object>();
params.put("pageNum", 1);
params.put("pageSize", 10);

PageHelper.startPage(Object params);

 

pom依赖如下:

    <dependency>
        <groupId>com.github.pagehelper</groupId>
        <artifactId>pagehelper-spring-boot-starter</artifactId>
        <version>1.2.10</version>
    </dependency>

    <dependency>
         <groupId>com.github.pagehelper</groupId>
         <artifactId>pagehelper-spring-boot-autoconfigure</artifactId

<template> <el-dialog :title="dialogMode === 'create' ? '新建' : dialogMode === 'edit' ? '修改' : '查看'" :visible.sync="dialogVisible" :modal-append-to-body="true" append-to-body :close-on-click-modal="false" custom-class="fixed-height-dialog" width="60%" top="5vh"> <el-form label-width="80px" ref="formRef" :model="currentForm" style="height: 100%; display: flex; flex-direction: column;" :rules="rules"> <!-- 项目信息区域 --> <div class="formBorder"> <el-row :gutter="10"> <el-col :span="6"> <el-form-item size="mini" label="项目名称" prop="projectName"> <el-input v-model="currentForm.projectName" clearable style="width:100%" size="mini" :disabled="dialogMode === 'view'"></el-input> </el-form-item> </el-col> <el-col :span="6"> <el-form-item size="mini" label="项目编号" prop="projectCode"> <el-input v-model="currentForm.projectCode" clearable style="width:100%" size="mini" :disabled="dialogMode === 'view'"></el-input> </el-form-item> </el-col> <el-col :span="12"> <el-form-item size="mini" label="项目周期" prop="projectDate"> <el-date-picker v-model="projectDate" range-separator="→" start-placeholder="请选择开始日期" end-placeholder="请选择结束日期" type="daterange" size="mini" style="width: 100%;" unlink-panels :disabled="dialogMode === 'view'"> </el-date-picker> </el-form-item> </el-col> </el-row> <el-row> <el-col :span="6"> <el-form-item label="负责人" size="mini" style="width: fit-content;"> <el-input v-model="currentForm.projectUser" clearable style="width:100%" size="mini" :disabled="dialogMode === 'view'"></el-input> </el-form-item> </el-col> </el-row> <el-row> <el-col :span="24"> <el-form-item label="项目概述"> <el-input v-model="currentForm.remark" :rows="2" :disabled="dialogMode === 'view'"></el-input> </el-form-item> </el-col> </el-row> </div> <!-- 待检边坡区域 --> <div class="formBorder2" style="flex: 1; min-height: 0; display: flex; flex-direction: column;"> <el-container style="height: 100%; display: flex; flex-direction: column;"> <!-- 搜索区域 --> <el-header style="height: auto; flex-shrink: 0; padding-bottom: 10px;"> <el-row :gutter="10" type="flex" class="searchDialog"> <el-col :span="5"> <el-select v-model="filterForm.maintenanceCompanyName" placeholder="请选择管养单位" size="mini" clearable filterable @clear="resetSearch" :disabled="dialogMode === 'view'"> <el-option v-for="item in MaintenanceUnitoptions" :key="item.value" :label="item.label" :value="item.value"></el-option> </el-select> </el-col> <el-col :span="5"> <el-select v-model="filterForm.routeCode" placeholder="请选择路线编号" size="mini" clearable filterable @clear="resetSearch" :disabled="dialogMode === 'view'"> <el-option v-for="item in routeCodeOptions" :key="item.value" :label="item.label" :value="item.value"></el-option> </el-select> </el-col> <el-col :span="5"> <el-input v-model="filterForm.searchKey" placeholder="请输入边坡编号或名称" size="mini" clearable @keyup.enter.native="searchForm" @clear="resetSearch" :disabled="dialogMode === 'view'"> <i slot="suffix" class="el-input__icon el-icon-search"></i> </el-input> </el-col> <el-col :span="5"> <el-select v-model="filterForm.evaluateLevel" placeholder="请选择技术状态等级" size="mini" clearable @clear="resetSearch" :disabled="dialogMode === 'view'"> <el-option v-for="item in evaluateLeveloptions" :key="item.value" :label="item.label" :value="item.value" /> </el-select> </el-col> <el-col :span="2" :offset="4"> <el-button type="primary" size="mini" style="width:100%" icon="el-icon-search" @click="searchForm" :loading="loading" :disabled="dialogMode === 'view'">搜索</el-button> </el-col> </el-row> </el-header> <!-- 边坡表格 --> <el-main style="flex: 1; overflow-y: auto; padding: 0;"> <el-table ref="scrollTable" v-loading="loading" style="width: 100%;" border :data="formTabledata" :height="tableHeight" :header-row-style="{ height: '40px' }" :header-cell-style="{ padding: '0', height: '40px', lineHeight: '40px', textAlign: 'center', }" :cell-style="{ textAlign: 'center' }" @selection-change="handleSelectionChange"> <!-- 选择列(查看模式禁用) --> <el-table-column type="selection" width="55" :selectable="isRowSelectable"> </el-table-column> <!-- 其他数据列 --> <el-table-column label="管养单位" prop="maintenanceCompanyName" width="290" show-overflow-tooltip></el-table-column> <el-table-column label="路线编号" prop="routeCode" width="100"></el-table-column> <el-table-column label="边坡编号" prop="sideSlopeCode" width="240" show-overflow-tooltip></el-table-column> <el-table-column label="边坡名称" prop="sideSlopeName" width="267" show-overflow-tooltip></el-table-column> <el-table-column label="技术状态等级" width="137"> <template slot-scope="scope"> {{ mapEvaluateLevel(scope.row.evaluateLevel) }} </template> </el-table-column> </el-table> </el-main> <!-- 分页区域 --> <el-footer style="flex-shrink: 0; padding-top: 10px;"> <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="pageParams.pageNo" :page-sizes="[10, 20, 50, 100]" :page-size="pageParams.pageSize" layout="total, sizes, prev, pager, next" :total="total" :disabled="dialogMode === 'view'"> </el-pagination> </el-footer> </el-container> </div> </el-form> <!-- 弹窗底部按钮 --> <div slot="footer" class="dialog-footer" v-if="dialogMode === 'create' || dialogMode === 'edit'"> <el-button @click="dialogVisible = false">取消</el-button> <el-button type="primary" @click="submitForm">提交</el-button> </div> </el-dialog> </template> <script> import { mapCfg } from "@/utils"; import { getPeriodicInspectionSideSlopePageList, addPeriodicInspection, modifyPeriodicInspection, getSelectedPeriodicInspectionSideSlopeList // 新增接口 } from "../../api/testProject"; import { getMaintenanceCompanyList, getRouteList } from "../../api/basicInformation"; export default { name: "SideSlopeDialog", props: { visible: Boolean, // 控制弹窗显示 mode: String, // 模式:create/edit/view initialForm: Object, // 初始表单数据 }, data() { return { mulitipleSelection: [], dialogVisible: this.visible, // 弹窗显示状态 dialogMode: this.mode, // 当前模式 currentForm: { ...this.initialForm }, // 当前表单数据 projectDate: [], // 项目日期范围 total: 0, // 总数据量 loading: false, // 加载状态 pageParams: { // 分页参数 pageNo: 1, pageSize: 10, }, filterForm: { // 搜索条件 maintenanceCompanyName: "", routeCode: "", searchKey: "", evaluateLevel: "", }, allSelection: [], // 存储所有选择的边坡 MaintenanceUnitoptions: [], // 管养单位选项 routeCodeOptions: [], // 路线编号选项 formTabledata: [], // 表格数据 evaluateLeveloptions: [], // 技术状态等级选项 tableHeight: 200, // 表格高度 rules: { // 表单验证规则 projectName: [ { required: true, message: "项目名称不能为空", trigger: "blur" }, ], projectCode: [ { required: true, message: "项目编码不能为空", trigger: "blur" }, ], }, selectedSideSlopes: [] // 存储已选择的边坡列表 }; }, watch: { // 监听模式变化 mode(val) { this.dialogMode = val; if (val === "edit" && this.dialogVisible) { this.resetSearch(); } }, // 监听弹窗显示状态变化 visible(val) { this.dialogVisible = val; if (val) { this.resetSearch(); // 编辑/查看模式时获取已选择边坡 if (this.dialogMode !== 'create' && this.currentForm.id) { this.getSelectedSlopes(); } this.$nextTick(() => { this.calculateTableHeight(); }); } else { // 关闭弹窗时重置选择状态 this.resetSelection(); } }, // 同步弹窗显示状态到父组件 dialogVisible(val) { this.$emit("update:visible", val); }, // 监听初始表单数据变化 initialForm: { deep: true, handler(val) { this.currentForm = { ...val }; this.projectDate = val.projectStartDate && val.projectEndDate ? [val.projectStartDate, val.projectEndDate] : []; } }, // 处理日期范围变化 projectDate: { deep: true, handler(value) { if (value && value.length === 2) { this.currentForm.projectStartDate = value[0]; this.currentForm.projectEndDate = value[1]; } }, }, }, async created() { // 初始化数据 this.getRouteList(); await this.getEvaluateLevel(); this.getMaintenanceCompanyList(); this.LoadListData(); }, mounted() { // 计算表格高度并监听窗口变化 this.calculateTableHeight(); window.addEventListener("resize", this.calculateTableHeight); }, beforeDestroy() { // 移除事件监听 window.removeEventListener("resize", this.calculateTableHeight); }, methods: { // 获取已选择的边坡 async getSelectedSlopes() { try { const res = await getSelectedPeriodicInspectionSideSlopeList({ periodicId: this.currentForm.id }); this.selectedSideSlopes = res; this.$nextTick(() => { this.setSelectedRows(); }); } catch (error) { console.error('获取已选择边坡失败', error); } }, //设置选中 setSelectedRows() { if ( this.dialogMode === 'create') return; if (this.selectedSideSlopes.length > 0) { this.formTabledata.forEach(row => { this.selectedSideSlopes.forEach(item => { if (row.sideSlopeCode === item.sideSlopeUniqueCode) { this.$refs.scrollTable.toggleRowSelection(row, true); } }); }); } }, // 判断行是否可选(查看模式禁用选择) isRowSelectable(row, index) { return this.dialogMode !== "view"; }, // 获取管养单位列表 async getMaintenanceCompanyList() { const res = await getMaintenanceCompanyList(); this.MaintenanceUnitoptions = res.map((item) => ({ value: item, label: item, })); }, // 获取路线列表 async getRouteList() { const res = await getRouteList(); this.routeCodeOptions = res.map((item) => ({ value: item.id, label: item.routeCode, })); }, // 搜索方法 searchForm() { this.pageParams.pageNo = 1; this.LoadListData(); }, // 重置搜索条件 resetSearch() { this.filterForm = { maintenanceCompanyName: "", routeCode: "", searchKey: "", evaluateLevel: "", }; this.pageParams.pageNo = 1; this.LoadListData(); }, // 重置选择状态 resetSelection() { this.allSelection = []; this.selectedSideSlopes = []; if (this.$refs.scrollTable) { this.$refs.scrollTable.clearSelection(); } }, // 处理选择变化 handleSelectionChange(val) { // 查看模式不允许修改选择 if (this.dialogMode === 'view') return; this.mulitipleSelection = val; // 创建当前页选择的唯一标识集合 const currentPageSelections = new Set( val.map((item) => item.sideSlopeCode) ); // 更新全量选择:先移除当前页的数据,再添加新选择 this.allSelection = [ ...this.allSelection.filter( (item) => !currentPageSelections.has(item.sideSlopeCode) ), ...val, ]; }, // 映射技术状态等级 mapEvaluateLevel(level) { const option = this.evaluateLeveloptions.find( (item) => item.value === level ); return option ? option.label : ''; }, // 加载表格数据 async LoadListData() { this.loading = true; const params = { orgId: this.filterForm.maintenanceCompanyName, routeId: this.filterForm.routeCode, searchKey: this.filterForm.searchKey, evaluateLevel: this.filterForm.evaluateLevel, pageSize: this.pageParams.pageSize, pageNo: this.pageParams.pageNo, }; try { const res = await getPeriodicInspectionSideSlopePageList(params); this.formTabledata = res.entities; this.total = res.entityCount; // 加载数据后设置选中状态 this.$nextTick(() => { this.setSelectedRows(); }); } catch (error) { console.error("加载边坡列表失败", error); } finally { this.loading = false; } }, // 分页大小变化 handleSizeChange(val) { this.pageParams.pageSize = val; this.pageParams.pageNo = 1; this.LoadListData(); }, // 当前页码变化 handleCurrentChange(val) { this.pageParams.pageNo = val; this.LoadListData(); }, // 获取技术状态等级选项 async getEvaluateLevel() { const levelList = await mapCfg("Inspection.Regular.RegularEvaluateLevel")(); this.evaluateLeveloptions = levelList.map((item) => ({ value: item.key, label: item.value, })); }, // 提交表单 async submitForm() { this.$refs.formRef.validate(async (valid) => { if (valid) { // 验证是否选择了边坡 if (this.allSelection.length === 0) { this.$message.warning("请至少选择一个边坡"); return; } // 构造提交参数 const params = { ...this.currentForm, sideSlopeDetailList: this.allSelection.map((item) => ({ sideSlopeUniqueCode: item.sideSlopeCode, evaluateLevel: item.evaluateLevel, evaluateDate: item.evaluateDate ? item.evaluateDate : undefined, })), }; // 根据模式选择操作 const action = this.dialogMode === "create" ? addPeriodicInspection : modifyPeriodicInspection; // 执行操作 try { const success = await action(params); if (success) { this.$message.success( this.dialogMode === "create" ? "新建成功" : "修改成功" ); this.$emit("success"); this.dialogVisible = false; } else { this.$message.error("操作失败"); } } catch (error) { this.$message.error(error.message || "操作失败"); } } }); }, // 计算表格高度(自适应) calculateTableHeight() { this.$nextTick(() => { try { const dialogBody = document.querySelector( ".fixed-height-dialog .el-dialog__body" ); if (dialogBody) { const bodyHeight = dialogBody.clientHeight; const headerHeight = document.querySelector(".formBorder")?.offsetHeight || 0; const searchHeight = document.querySelector(".formBorder2 .el-header")?.offsetHeight || 0; const footerHeight = document.querySelector(".formBorder2 .el-footer")?.offsetHeight || 0; const padding = 30; // 安全边距 this.tableHeight = bodyHeight - headerHeight - searchHeight - footerHeight - padding; } } catch (e) { console.warn("高度计算错误", e); this.tableHeight = 300; // 默认高度 } }); }, }, }; </script> <style lang="scss" scoped> :deep(.fixed-height-dialog) { .el-dialog { display: flex; flex-direction: column; max-height: 80vh !important; height: 80vh !important; .el-dialog__body { flex: 1; overflow: hidden; padding: 15px 20px; display: flex; flex-direction: column; } } } // 项目信息区域样式 .formBorder { position: relative; border: thin dotted black; padding: 10px; flex-shrink: 0; &::before { content: "项目信息"; position: absolute; top: -10px; left: 40px; background-color: #fff; padding: 0 10px; font-size: 14px; color: #606266; } } // 待检边坡区域样式 .formBorder2 { margin-top: 15px; position: relative; border: thin dotted black; padding: 10px; flex: 1; min-height: 0; display: flex; flex-direction: column; &::before { content: "待检边坡"; position: absolute; top: -10px; left: 40px; background-color: #fff; padding: 0 10px; font-size: 14px; color: #606266; } } // 弹窗底部按钮区域 .dialog-footer { padding: 10px 20px; border-top: 1px solid #ebeef5; text-align: center; } // 搜索区域样式 .searchDialog { margin-top: 5px; } // 空数据样式 :deep(.el-table__empty-block) { min-height: 200px; display: flex; justify-content: center; align-items: center; } // 分页样式 :deep(.el-pagination) { padding: 5px 0; } </style> <template> <div style=" display: flex; justify-content: center; align-items: center; height: 100%; width: 100%; background-color: #fff; "> <!-- 封装后的弹窗组件 --> <side-slope-dialog :visible="dialogVisible" :mode="currentMode" :initial-form="currentForm" @update:visible="dialogVisible = $event" @success="handleDialogSuccess" /> <!-- 页面主体内容 --> <el-container style="height: 100%"> <el-header> <el-row :gutter="10" type="flex" justify="left"> <el-col :span="3"> <el-input v-model="searchParams.projectName" placeholder="项目名称或编号" size="mini" clearable @clear="resetSearch" /> </el-col> <el-col :span="3"> <el-select v-model="searchParams.status" placeholder="项目状态" size="mini" clearable @clear="resetSearch"> <el-option v-for="item in StatusOptions" :key="item.value" :label="item.label" :value="item.value" filterable /> </el-select> </el-col> <el-col :span="6"> <el-date-picker v-model="searchProjectDate" range-separator="→" start-placeholder="请选择开始日期" end-placeholder="请选择结束日期" type="daterange" size="mini" style="width: 100%" value-format="yyyy-MM-dd" @clear="resetSearch" /> </el-col> <el-col :span="1.5"> <el-button type="primary" size="mini" @click="handleSearch">查询</el-button> </el-col> <el-col :span="1.5"> <el-button type="success" size="mini" style="width: 100%" @click="openCreateDialog">新建</el-button> </el-col> </el-row> </el-header> <el-main> <el-table :data="tableData" border style="width: 100%" :main-height="400" :header-row-style="() => { return 'line-height:15px'; }" :cell-style="{ textAlign: 'center' }" :header-cell-style="{ textAlign: 'center' }"> <el-table-column label="序号" type="index" width="120"></el-table-column> <el-table-column label="项目名称" prop="projectName" width="250"></el-table-column> <el-table-column label="项目编号" prop="projectCode" width="150"></el-table-column> <el-table-column label="项目周期" width="250"> <template slot-scope="scope"> {{ formatDateRange(scope.row.projectStartDate, scope.row.projectEndDate) }} </template> </el-table-column> <el-table-column label="项目状态" width="200"> <template slot-scope="scope"> {{ getStatusText(scope.row.status) }} </template> </el-table-column> <el-table-column label="边坡总数" prop="sideSlopeTotalCount" width="150"></el-table-column> <el-table-column label="已完成边坡数" prop="sideSlopeCompleteCount" width="194"></el-table-column> <el-table-column label="完成率" width="150"> <template slot-scope="scope"> {{ calculateCompletionRate( scope.row.sideSlopeCompleteCount, scope.row.sideSlopeTotalCount ) }} </template> </el-table-column> <el-table-column label="操作" width="200"> <template slot-scope="scope"> <el-button @click="openViewDialog(scope.row)" type="text" size="small">查看</el-button> <el-button @click="openEditDialog(scope.row)" type="text" size="small">编辑</el-button> <el-button @click="deleteItem(scope.row)" type="text" size="small">删除</el-button> </template> </el-table-column> </el-table> </el-main> <el-footer> <!-- 分页 --> <div class="pagination" style="margin-top: 20px; text-align: center"> <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" layout="total,prev, sizes, pager, next,jumper" :current-page.sync="pageParams.pageNo" :page-size="pageParams.pageSize" :page-sizes="[10, 40, 60, 100]" :total="pageParams.total"> </el-pagination> </div> </el-footer> </el-container> </div> </template> <script> import sideSlopeDialog from './sideSlopeDialog.vue' import { mapCfg } from '@/utils' import { getPeriodicInspectionPageList, deletePeriodicInspection } from '../../api/testProject' export default { name: 'ProjectManagement', components: { sideSlopeDialog }, data() { return { searchParams: { projectName: '', status: '', projectStartDate: '', projectEndDate: '' }, searchProjectDate: [], StatusOptions: [], tableData: [], pageParams: { pageNo: 1, pageSize: 10, total: 0 }, dialogVisible: false, currentMode: '', currentForm: { projectCode: '', projectName: '', projectStartDate: '', projectEndDate: '', projectUser: '', remark: '', sideSlopeDetailList: [] } } }, watch: { searchProjectDate(newVal) { if (newVal && newVal.length === 2) { this.searchParams.projectStartDate = newVal[0] this.searchParams.projectEndDate = newVal[1] } else { this.searchParams.projectStartDate = '' this.searchParams.projectEndDate = '' } } }, async created() { await this.getStatus() this.loadTableData() }, methods: { getStatusText(statusValue) { const option = this.StatusOptions.find((opt) => opt.value === statusValue) return option ? option.label : '' }, openCreateDialog() { this.currentMode = 'create' this.currentForm = { projectCode: '', projectName: '', projectStartDate: '', projectEndDate: '', projectUser: '', remark: '', sideSlopeDetailList: [] } this.dialogVisible = true }, openEditDialog(row) { this.currentMode = 'edit' this.currentForm = { ...row, projectStartDate: row.projectStartDate, projectEndDate: row.projectEndDate } this.dialogVisible = true }, openViewDialog(row) { this.currentMode = 'view' this.currentForm = { ...row, projectStartDate: row.projectStartDate, projectEndDate: row.projectEndDate } this.dialogVisible = true }, handleDialogSuccess() { this.pageParams.pageNo = 1 this.loadTableData() }, async loadTableData() { const startTime = this.searchParams.projectStartDate ? new Date(this.searchParams.projectStartDate).getTime() : null const endTime = this.searchParams.projectEndDate ? new Date(this.searchParams.projectEndDate).getTime() : null const params = { pageNo: this.pageParams.pageNo, pageSize: this.pageParams.pageSize, searchKey: this.searchParams.projectName, status: this.searchParams.status, startTime, endTime } try { const res = await getPeriodicInspectionPageList(params) this.tableData = res.entities this.pageParams.total = res.entityCount } catch (error) { console.error('加载项目列表失败', error) } }, handleSearch() { this.pageParams.pageNo = 1 this.loadTableData() }, resetSearch() { this.searchParams = { projectName: '', status: '', projectStartDate: '', projectEndDate: '' } this.searchProjectDate = [] this.handleSearch() }, async deleteItem(row) { try { await this.$confirm('确定要删除该项目吗?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }) await deletePeriodicInspection({ periodicId: row.id }) this.$message.success('删除成功') if (this.tableData.length === 1 && this.pageParams.pageNo > 1) { this.pageParams.pageNo -= 1 } this.loadTableData() } catch (error) { if (error !== 'cancel') { this.$message.error('删除失败') } } }, async getStatus() { const dictList = await mapCfg('Inspection.Periodic.PeriodicInspectionStatus')() this.StatusOptions = dictList.map((item) => ({ value: item.key, label: item.value })) }, formatDateRange(start, end) { if (!start || !end) return '' const format = (dateStr) => dateStr.substring(0, 10) return `${format(start)} 至 ${format(end)}` }, calculateCompletionRate(completed, total) { if (!total) return '0%' return `${((completed / total) * 100).toFixed(1)}%` }, handleSizeChange(val) { this.pageParams.pageSize = val this.loadTableData() }, handleCurrentChange(val) { this.pageParams.pageNo = val this.loadTableData() } } } </script> <style lang="scss" scoped> .el-header { color: #333; text-align: center; line-height: 60px; } .el-main { color: #333; text-align: center; line-height: 100%; padding-left: 5px; padding-top: 0px; } .pagination { margin-top: 20px; text-align: center; } </style> /** * 测试项目api */ import request from "@/utils/request"; //取得定期检查边坡列表接口 export function getPeriodicInspectionSideSlopePageList(params){ return request({ url: "periodicInspection/getPeriodicInspectionSideSlopePageList", method: "GET", params, }); } //取得定期检查分页列表接口 export function getPeriodicInspectionPageList(params){ return request({ url: "periodicInspection/getPeriodicInspectionPageList", method: "GET", params }); } //新增定期检查接口 export function addPeriodicInspection(data) { return request({ url: "periodicInspection/addPeriodicInspection", method: "POST", data, }); } //修改定期检查接口 export function modifyPeriodicInspection(data) { return request({ url: "periodicInspection/modifyPeriodicInspection ", method: "POST", data, }); } //删除定期检查接口 export function deletePeriodicInspection(params) { return request({ url: "periodicInspection/deletePeriodicInspection", method: "GET", params, }) } //取得已选择的定期检查边坡列表接口 export function getSelectedPeriodicInspectionSideSlopeList(params) { return request({ url: "periodicInspection/getSelectedPeriodicInspectionSideSlopeList", method: "GET", params }) } //已完成定期检查接口 export function completePeriodicInspection(params){ return request({ url: "periodicInspection/completePeriodicInspection", method: "GET", params, }) }为什么查看和编辑的时候报错 VM83271 testProject.js:62 GET https://10.1.2.3:8080/sshm/rest/periodicInspection/getSelectedPeriodicInspectionSideSlopeList 404 (Not Found) dispatchXhrRequest @ xhr.js:187 xhrAdapter @ xhr.js:13 dispatchRequest @ dispatchRequest.js:53 Promise.then request @ Axios.js:88 wrap @ bind.js:9 getSelectedPeriodicInspectionSideSlopeList @ VM83271 testProject.js:62 getSelectedSlopes @ VM83270 sideSlopeDialog.vue:180 visible @ VM83270 sideSlopeDialog.vue:125 invokeWithErrorHandling @ vue.runtime.esm.js:3072 Watcher.run @ vue.runtime.esm.js:3589 flushSchedulerQueue @ vue.runtime.esm.js:4180 eval @ vue.runtime.esm.js:3198 flushCallbacks @ vue.runtime.esm.js:3120 Promise.then timerFunc @ vue.runtime.esm.js:3145 nextTick @ vue.runtime.esm.js:3210 queueWatcher @ vue.runtime.esm.js:4266 Watcher.update @ vue.runtime.esm.js:3568 Dep.notify @ vue.runtime.esm.js:790 reactiveSetter @ vue.runtime.esm.js:1021 proxySetter @ vue.runtime.esm.js:5413 openViewDialog @ VM83267 _Blank.vue:95 click @ cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"67c25b62-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/pages/building/_Blank.vue?vue&type=template&id=eaaff1c8&scoped=true:236 invokeWithErrorHandling @ vue.runtime.esm.js:3072 invoker @ vue.runtime.esm.js:1874 invokeWithErrorHandling @ vue.runtime.esm.js:3072 Vue.$emit @ vue.runtime.esm.js:3771 handleClick @ element-ui.common.js:9465 invokeWithErrorHandling @ vue.runtime.esm.js:3072 invoker @ vue.runtime.esm.js:1874 original_1._wrapper @ vue.runtime.esm.js:7533 VM83270 sideSlopeDialog.vue:188 获取已选择边坡失败 Error: Request failed with status code 404 at createError (createError.js:16:15) at settle (settle.js:17:12) at XMLHttpRequest.onloadend (xhr.js:54:7
08-20
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值