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"
>
-
+
新增跟踪信息
@@ -22,7 +22,7 @@
:fixed="false" class="scroll-h"
>
- 问题:{{problemObj.groupName}}
+ 问题:{{problemObj.bugName}}
@@ -36,7 +36,7 @@
问题描述
- {{problemObj.problemDesc}}
+ {{problemObj.bugDesc}}
问题点位照片或视频
@@ -57,7 +57,7 @@
-
+
@@ -111,17 +111,17 @@ import mediaPreview from "@/components/mediaPreview.vue"
import DomVideoPlayer from 'uniapp-video-player'
import { parseTime } from '@/utils/datetime.js';
import {getFileType} from '@/utils/common.js';
-import { problemDetail,problemDel } from '@/api/polling.js'
+import { patrolBugDetail,patrolBugDel } from '@/api/polling.js'
import { MINIO_KEY } from '@/enums/cacheEnums';
import {showAlert,showLoading,hideLoading} from '@/utils/message.js'
-let problemId=ref('');
+let bugId=ref('');
let problemObj = ref({});
let isToday = ref(false);
let minioObj = {};
onLoad(option => {
// console.log(option)
- problemId.value = option.problemId;
+ bugId.value = option.bugId;
minioObj = JSON.parse(uni.getStorageSync(MINIO_KEY) || "\{\}")
})
@@ -155,9 +155,9 @@ const downCallback = async (mescroll) => {
// 获取数据列表
const getList = async() => {
isToday.value = false;
- let data = await problemDetail({problemId:problemId.value});
- data.list = data.pointName?.split(",") || [];
- data.listFile=data.problemVedio?.split(",") || [];
+ let data = await patrolBugDetail({bugId:bugId.value});
+ // data.list = data.pointName?.split(",") || [];
+ data.listFile=data.bugVedio?.split(",") || [];
data.logList.forEach(item => {
item.listFile = item.logVedio?.split(",")||[]
});
@@ -188,21 +188,21 @@ const handlePreviewClose=()=>{
// 跳转问题上报页面
const handleQuestion=()=>{
uni.navigateTo({
- url: '/pages/business/polling/problemInitiativeLog?problemId='+problemId.value
+ url: '/pages/business/polling/problemInitiativeLog?bugId='+bugId.value
});
}
// 修改
const handleUpdate=()=>{
uni.navigateTo({
- url: '/pages/business/polling/problemInitiative?problemId='+problemId.value
+ url: '/pages/business/polling/problemInitiative?bugId='+bugId.value
});
}
// 删除
const handleDelete=()=>{
showLoading("加载中...")
- problemDel({problemId:problemId.value}).then(res=>{
+ patrolBugDel({bugId:bugId.value}).then(res=>{
// content, title = '提示',showCancel=false,succFun
showAlert("删除成功!",'提示',false,()=>{
uni.navigateBack()
diff --git a/src/pages/business/polling/problemInitiativeList.vue b/src/pages/business/polling/problemInitiativeList.vue
index 712c491..54a796e 100644
--- a/src/pages/business/polling/problemInitiativeList.vue
+++ b/src/pages/business/polling/problemInitiativeList.vue
@@ -19,22 +19,20 @@
-
+
-
-
- {{ notictTypeCheck.name?notictTypeCheck.name:'全部' }}
-
-
-
-
-
+
+
@@ -44,11 +42,11 @@
- {{ item.groupName }}
+ {{ item.bugName }}
- 进行中
- 已解决
+ 进行中
+ 已解决
@@ -77,7 +75,7 @@ import customSearch from '@/components/customSearch.vue'
import MescrollUni from 'mescroll-uni/mescroll-uni.vue';
import { getNavBarPaddingTop } from '@/utils/system.js'
import { parseTime } from '@/utils/datetime.js'
-import { problemList } from '@/api/polling.js'
+import { patrolBugList } from '@/api/polling.js'
onLoad(async(opt) => {
uni.setStorageSync('page_cache',true);
@@ -92,12 +90,7 @@ onMounted(() => {
// 搜索处理
let searchShow = ref(false);
let searchText = ref(undefined);
-let searchTypeObj = ref({typeId:3,typeName:'巡检类型'});
-let noticeTypeList=ref([
- {id:1,name:'日常巡检'},
- {id:2,name:'临时巡检'},
-]);
-let notictTypeCheck = ref({});//选中类型
+let searchTypeObj = ref({typeId:5});
onHide(()=>{
searchShow.value=false;
@@ -115,7 +108,6 @@ const handleSearchFocus=()=>{
// 搜索完返回处理
const handleSearchConfirm = (param1,param2)=>{
// console.log(param1,param2)
- notictTypeCheck.value=param1.value;
searchText.value=param2.value;;
searchShow.value=false;
}
@@ -192,9 +184,8 @@ const getList = (pageIndex, pageSize) => {
pageIndex,
pageSize,
key:searchText.value?searchText.value:undefined,
- taskType:notictTypeCheck.value.id
}
- let res = await problemList(param);
+ let res = await patrolBugList(param);
let list = res.list || [];
resolve({
list,
@@ -213,7 +204,7 @@ const handleQuestion=()=>{
// 查看详情
const handleDetail = (item) =>{
- let url= '/pages/business/polling/problemInitiativeDetail?problemId='+item.problemId;
+ let url= '/pages/business/polling/problemInitiativeDetail?bugId='+item.bugId;
uni.navigateTo({
url
});
@@ -325,4 +316,8 @@ const handleDetail = (item) =>{
:deep(.mescroll-upwarp){
display: none !important;
}
+
+:deep(.mescroll-empty){
+ display: none !important;
+}
\ No newline at end of file
diff --git a/src/pages/business/polling/problemInitiativeLog.vue b/src/pages/business/polling/problemInitiativeLog.vue
index bb4be5d..f46ed11 100644
--- a/src/pages/business/polling/problemInitiativeLog.vue
+++ b/src/pages/business/polling/problemInitiativeLog.vue
@@ -14,7 +14,7 @@
:fixed="false" class="scroll-h"
>
- 问题:{{optionObj.groupName}}
+ 问题:{{optionObj.bugName}}
提交人
@@ -92,19 +92,19 @@ import mediaPreview from "@/components/mediaPreview.vue"
import chooseMediaVue from '@/components/chooseMedia.vue'
import DomVideoPlayer from 'uniapp-video-player'
import { getUserInfo } from '@/api/auth.js'
-import { problemDetail,problemAddLog,minioUpload } from '@/api/polling.js'
+import { patrolBugDetail,patrolBugAddLog,minioUpload } from '@/api/polling.js'
import { MINIO_KEY } from '@/enums/cacheEnums';
import {showAlert,showLoading,hideLoading} from '@/utils/message.js'
import {compressImageUni} from '@/utils/common.js'
const { proxy } = getCurrentInstance();
-let problemId = ref('');
+let bugId = ref('');
let realname = ref('');
let desc = ref('');//描述
let minioObj = {};
onLoad(async option => {
// console.log(option)
- problemId.value = option.problemId;
+ bugId.value = option.bugId;
minioObj = JSON.parse(uni.getStorageSync(MINIO_KEY) || "\{\}")
let userinfo = await getUserInfo({});
@@ -145,9 +145,9 @@ const downCallback = async (mescroll) => {
// 获取数据列表
const getList = async () => {
- let res = await problemDetail({problemId:problemId.value});
+ let res = await patrolBugDetail({bugId:bugId.value});
let data = res || {};
- data.list = data.pointName.split(",") || [];
+ // data.list = data.pointName.split(",") || [];
optionObj.value = data;
}
@@ -269,12 +269,12 @@ const handlePreviewClose=()=>{
// 提交
const handleSubmit=()=>{
let param = {
- problemId:problemId.value,
+ bugId:bugId.value,
logVedio:mediaArr.value.join(","),
logDesc:desc.value
}
- // console.log("problemAddLog=>",param)
- problemAddLog(param).then(res=>{
+ // console.log("patrolBugAddLog=>",param)
+ patrolBugAddLog(param).then(res=>{
showAlert("新建问题跟踪成功!");
uni.navigateBack();
}).finally(()=>{
diff --git a/src/pages/business/polling/problemList.vue b/src/pages/business/polling/problemList.vue
index 808ce54..22dd1b2 100644
--- a/src/pages/business/polling/problemList.vue
+++ b/src/pages/business/polling/problemList.vue
@@ -84,7 +84,7 @@ onMounted(() => {
// 搜索处理
let searchShow = ref(false);
let searchText = ref(undefined);
-let searchTypeObj = ref({typeId:3,typeName:'巡检类型'});
+let searchTypeObj = ref({typeId:4,typeName:'巡检类型'});
let noticeTypeList=ref([
{id:1,name:'日常巡检'},
{id:2,name:'临时巡检'},
@@ -295,4 +295,7 @@ const handleDetail = (item) =>{
:deep(.mescroll-upwarp){
display: none !important;
}
+:deep(.mescroll-empty){
+ display: none !important;
+}
\ No newline at end of file