From 96d0f2aa7dcd15863431de787a39c4b67613f81a Mon Sep 17 00:00:00 2001 From: "zhonghua.li" Date: Mon, 6 Apr 2026 13:54:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A3=80=E6=9F=A5=E9=A1=B9=E7=9B=AE=E6=95=85?= =?UTF-8?q?=E4=BA=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/xixi-inspection-story.js | 76 ++++ src/views/xixi-love/inspection-story.vue | 460 ++++++++++++++++++++++- src/views/xixi-love/inspection.vue | 19 +- 3 files changed, 547 insertions(+), 8 deletions(-) create mode 100644 src/api/xixi-inspection-story.js diff --git a/src/api/xixi-inspection-story.js b/src/api/xixi-inspection-story.js new file mode 100644 index 0000000..e95a09a --- /dev/null +++ b/src/api/xixi-inspection-story.js @@ -0,0 +1,76 @@ +import request from '@/utils/request' + +/** + * 恋爱检查项子表 love_check_item_child + * LoveCheckItemChildController:@RequestMapping("/api/loveCheckItemChild") + * 本项目的 axios baseURL 为 /api,故此处 url 使用 /loveCheckItemChild/...(最终请求 /api/loveCheckItemChild/...) + * + * 若 Spring 已配置 server.servlet.context-path=/api,且类上仍为 @RequestMapping("/api/loveCheckItemChild"), + * 实际路径可能为 /api/api/loveCheckItemChild/...,可设环境变量:VUE_APP_LOVE_CHECK_ITEM_CHILD_SEGMENT=api/loveCheckItemChild(无首尾斜杠) + */ +function lcChildUrl(action) { + const seg = (process.env.VUE_APP_LOVE_CHECK_ITEM_CHILD_SEGMENT || 'loveCheckItemChild').replace(/^\/+|\/+$/g, '') + return seg.startsWith('api/') ? `${seg}/${action}` : `/${seg}/${action}` +} + +/** GET /list:current、size、parentId、projectName、scenario、createStartTime、createEndTime、updateStartTime、updateEndTime */ +export function fetchInspectionStoryList(params) { + return request({ + url: lcChildUrl('list'), + method: 'get', + params: { + current: params.page || 1, + size: params.limit || 10, + parentId: params.parentId, + projectName: params.projectName, + scenario: params.scenario, + createStartTime: params.createStartTime, + createEndTime: params.createEndTime, + updateStartTime: params.updateStartTime, + updateEndTime: params.updateEndTime + } + }) +} + +/** GET /get/{id} */ +export function getInspectionStoryById(id) { + return request({ + url: lcChildUrl(`get/${id}`), + method: 'get' + }) +} + +/** POST /add */ +export function addInspectionStory(data) { + return request({ + url: lcChildUrl('add'), + method: 'post', + data + }) +} + +/** PUT /update */ +export function updateInspectionStory(data) { + return request({ + url: lcChildUrl('update'), + method: 'put', + data + }) +} + +/** DELETE /delete/{id} */ +export function deleteInspectionStory(id) { + return request({ + url: lcChildUrl(`delete/${id}`), + method: 'delete' + }) +} + +/** DELETE /batchDelete,请求体为 id 字符串列表 */ +export function batchDeleteInspectionStory(ids) { + return request({ + url: lcChildUrl('batchDelete'), + method: 'delete', + data: ids + }) +} diff --git a/src/views/xixi-love/inspection-story.vue b/src/views/xixi-love/inspection-story.vue index 44fc3b5..28b723d 100644 --- a/src/views/xixi-love/inspection-story.vue +++ b/src/views/xixi-love/inspection-story.vue @@ -1,20 +1,466 @@ diff --git a/src/views/xixi-love/inspection.vue b/src/views/xixi-love/inspection.vue index b7652e2..7eeb841 100644 --- a/src/views/xixi-love/inspection.vue +++ b/src/views/xixi-love/inspection.vue @@ -105,8 +105,11 @@ {{ formatDateTime(row.updateTime) }} - +