From 04356796fad5923849ab6fb5e68e96a76486edff Mon Sep 17 00:00:00 2001 From: xuli Date: Wed, 21 Jan 2026 17:50:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=97=AE=E9=A2=98=E4=B8=BB?= =?UTF-8?q?=E5=8A=A8=E4=B8=8A=E6=8A=A5=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/polling.js | 46 ++++++ src/components/customSearch.vue | 2 +- .../business/polling/problemInitiative.vue | 131 ++++-------------- .../polling/problemInitiativeDetail.vue | 26 ++-- .../polling/problemInitiativeList.vue | 45 +++--- .../business/polling/problemInitiativeLog.vue | 18 +-- src/pages/business/polling/problemList.vue | 5 +- 7 files changed, 117 insertions(+), 156 deletions(-) diff --git a/src/api/polling.js b/src/api/polling.js index 611be2a..accc77c 100644 --- a/src/api/polling.js +++ b/src/api/polling.js @@ -125,4 +125,50 @@ export function querytodaytasknum(data) { } +/**主动上报 begin */ +// 详情 +export function patrolBugDetail(data) { + return request.post({ + url: '/patrol/patrolBug/detail', + data + }) +} +// 查询异常上报表列表 +export function patrolBugList(data) { + return request.post({ + url: '/patrol/patrolBug/list', + data + }) +} + +// 添加问题上报 +export function patrolBugAdd(data) { + return request.post({ + url: '/patrol/patrolBug/addBug', + data + }) +} +// 编辑问题 +export function patrolBugEdit(data) { + return request.post({ + url: '/patrol/patrolBug/editBug', + data + }) +} +// 删除问题 +export function patrolBugDel(data) { + return request.post({ + url: '/patrol/patrolBug/delBug', + data + }) +} +// 添加追踪记录 +export function patrolBugAddLog(data) { + return request.post({ + url: '/patrol/patrolBug/addBuglog', + data + }) +} +// +/**主动上报 end */ \ No newline at end of file diff --git a/src/components/customSearch.vue b/src/components/customSearch.vue index 4061dfb..9e9c7c1 100644 --- a/src/components/customSearch.vue +++ b/src/components/customSearch.vue @@ -68,7 +68,7 @@ const props = defineProps({ searchKeywords:{//搜索文本 type:String }, - searchType:{//哪种类型显示对象 typeId:1-首页,2-业务首页,3-消息 之后可以自动添加 + searchType:{//哪种类型显示对象 typeId:1-首页,2-业务首页,3-消息, 4-问题,5-上报问题 之后可以自动添加 type:Object }, searchTypeList:{//类型列表 diff --git a/src/pages/business/polling/problemInitiative.vue b/src/pages/business/polling/problemInitiative.vue index eb6a3a0..64ccdf8 100644 --- a/src/pages/business/polling/problemInitiative.vue +++ b/src/pages/business/polling/problemInitiative.vue @@ -17,7 +17,7 @@ 问题名称 - + @@ -28,7 +28,7 @@ 问题描述 - @@ -97,29 +97,25 @@ import chooseMediaVue from '@/components/chooseMedia.vue' import mediaPreview from "@/components/mediaPreview.vue" import DomVideoPlayer from 'uniapp-video-player' import { getUserInfo } from '@/api/auth.js' -import { problemDetail,problemAdd,problemEdit,minioUpload } from '@/api/polling.js' +import { patrolBugDetail,patrolBugAdd,patrolBugEdit,minioUpload } from '@/api/polling.js' import {compressImageUni,getFileType} from '@/utils/common.js' import {showAlert,showLoading,hideLoading} from '@/utils/message.js' import { MINIO_KEY } from '@/enums/cacheEnums'; const { proxy } = getCurrentInstance(); -let taskId = ref('');//任务id -let groupId = ref('');//组id -let problemId = ref('');//问题id +let bugId = ref('');//问题id let realname = ref(''); let desc = ref('');//描述 let minioObj = {}; onLoad(async option => { // console.log(option) - taskId.value = option.taskId; - groupId.value = option.groupId; - problemId.value = option.problemId; - + bugId.value = option.bugId; minioObj = JSON.parse(uni.getStorageSync(MINIO_KEY) || "\{\}") - let userinfo = await getUserInfo({}); realname.value = userinfo.realname; - getList(); + + if(bugId.value) + getList(); }) onShow(()=>{ @@ -156,29 +152,16 @@ const downCallback = async (mescroll) => { // 获取数据列表 const getList = async () => { let param = { - taskId:problemId.value?undefined:taskId.value, - groupId:problemId.value?undefined:groupId.value, - problemId:problemId.value + bugId:bugId.value } - let res = await problemDetail(param); + let res = await patrolBugDetail(param); let data = res||{}; - let pointIds = data.pointId?.split(",") || []; - data.pointList.forEach(item2=>{ - item2.active=false; - for (let i = 0; i < pointIds.length; i++) { - if(item2.pointId == pointIds[i]){ - item2.active=true; - break; - } - } - }) - // 视频回显 imgArr.value = []; mediaArr.value=[]; videoArr.value=[]; - let fileList =data.problemVedio?.split(",") || []; + let fileList =data.bugVedio?.split(",") || []; fileList.forEach(item=>{ mediaArr.value.push(item) if(getFileType(item)=='image'){ @@ -204,60 +187,8 @@ let imgArr=ref([]);//图片 后台返回的 let videoArr = ref([]);//视频 后台返回的 let imgLoading = ref(false) const chooseMedia = () => { - // console.log("chooseMedia=>") proxy.$refs["chooseMediaRef"].openPicker(); imgLoading.value=true; - // uni.chooseMedia({ - // count: 9, - // mediaType: ['image', 'video'], // 指定可选择图片和视频 - // sourceType: ['album', 'camera'], - // maxDuration: 60, // 拍摄视频最长拍摄时间 - // camera: 'back', - // success: (res) => { - // // console.log("chooseMedia=>",res) - // res.tempFiles.forEach(async file => { - // // console.log(`文件类型: ${file.fileType}, 文件路径: ${file.tempFilePath}`); - // let compressImg = file.tempFilePath; - // // 图片进行压缩 - // if (file.fileType === 'image') { - // // #ifdef APP-PLUS - // // 压缩图片 - // compressImg = await compressImageUni(file.tempFilePath); - // // #endif - // } - - // // 执行上传 - // let param = { - // filePath: compressImg, - // name: 'file', - // formData: { - // directory:'polling' - // }, - // } - // imgLoading.value=true; - // minioUpload(param).then(res=>{ - // let data = res.data;//console.log("上传成功后=>",res) - // mediaArr.value.push(data.fileName); - // if (file.fileType === 'image') {// 图片 - // imgArr.value.push({ - // shortUrl:minioObj.minioThumbUrl +"/"+data.fileName, - // url:minioObj.minioUrl +"/"+data.fileName, - // name:data.fileName - // }) - // } else if (file.fileType === 'video') {// 视频 - // videoArr.value.push({ - // shortUrl:minioObj.minioThumbUrl +"/"+data.fileName, - // url:minioObj.minioUrl +"/"+data.fileName, - // name:data.fileName - // }) - // } - // }).finally(()=>{ - // imgLoading.value=false; - // }) - - // }); - // } - // }); } const closeMedia = ()=>{ imgLoading.value=false; @@ -315,31 +246,19 @@ const handlePreviewClose=()=>{ videoShow.value = true; } - -// 红点点击 -const handleRound=(item)=>{ - item.active=!item.active -} - // 提交 const handleSubmit=()=>{ - let pointIds = []; - optionObj.value.pointList.forEach(item => { - if(item.active){ - pointIds.push(item.pointId) - } - }); showLoading("加载中...") - if(problemId.value){ + if(bugId.value){ let param = { - problemId:problemId.value, - pointId:pointIds.join(","), - problemVedio:mediaArr.value.join(","), - problemDesc:optionObj.value.problemDesc + bugId:bugId.value, + bugName:optionObj.value.bugName, + bugVedio:mediaArr.value.join(","), + bugDesc:optionObj.value.bugDesc } - // console.log("problemEdit=>",param) - problemEdit(param).then(res=>{ + // console.log("patrolBugEdit=>",param) + patrolBugEdit(param).then(res=>{ // showAlert = (content, title = '提示',showCancel=false,succFun) showAlert("修改问题上报成功!","提示",false,()=>{ uni.navigateBack() @@ -349,16 +268,14 @@ const handleSubmit=()=>{ }) }else{ let param = { - taskId:taskId.value, - groupId:groupId.value, - pointId:pointIds.join(","), - problemVedio:mediaArr.value.join(","), - problemDesc:optionObj.value.problemDesc + bugName:optionObj.value.bugName, + bugVedio:mediaArr.value.join(","), + bugDesc:optionObj.value.bugDesc } - // console.log("problemAdd=>",param) - problemAdd(param).then(res=>{ + // console.log("patrolBugAdd=>",param) + patrolBugAdd(param).then(res=>{ showAlert("新建问题上报成功!","提示",false,()=>{ - problemId.value = res; + bugId.value = res; uni.navigateBack() }) }).finally(()=>{ diff --git a/src/pages/business/polling/problemInitiativeDetail.vue b/src/pages/business/polling/problemInitiativeDetail.vue index 630db0b..2a0a3a8 100644 --- a/src/pages/business/polling/problemInitiativeDetail.vue +++ b/src/pages/business/polling/problemInitiativeDetail.vue @@ -6,7 +6,7 @@ :leftFlag="true" :rightFlag="true" >