diff --git a/ruoyi-ui/src/api/trouble/sspProblemmodify.js b/ruoyi-ui/src/api/trouble/sspProblemmodify.js index 0a65cfa6..6e8ef849 100644 --- a/ruoyi-ui/src/api/trouble/sspProblemmodify.js +++ b/ruoyi-ui/src/api/trouble/sspProblemmodify.js @@ -60,3 +60,12 @@ export function auditinfoList(query) { params: query }) } + +//提交隐患问题处理 +export function modifyProblem(data) { + return request({ + url: '/trouble/sspProblemmodify/modifyProblem', + method: 'post', + data: data + }) +} \ No newline at end of file diff --git a/ruoyi-ui/src/assets/styles/ruoyi.scss b/ruoyi-ui/src/assets/styles/ruoyi.scss index db8c29ba..f7d01880 100644 --- a/ruoyi-ui/src/assets/styles/ruoyi.scss +++ b/ruoyi-ui/src/assets/styles/ruoyi.scss @@ -275,3 +275,23 @@ position: relative; float: right; } + +.timeline_for_state_1 { + padding: 2px 12px; + height: 20px; + width: 100px; + text-align: center; + line-height: 20px; + font-size: 13px; + background: url("https://szgcwx.jhncidg.com/staticFiles/img/menu/WEB_F5E44186F6C44161B99491284E33EEE6.png") no-repeat center/100% 100%; + } + + .timeline_for_state_2 { + padding: 2px 12px; + height: 20px; + width: 100px; + text-align: center; + line-height: 20px; + font-size: 13px; + background: url("https://szgcwx.jhncidg.com/staticFiles/img/WEB_345B9059DAD1492EB37EC4814EB340F0.png") no-repeat center/100% 100%; + } \ No newline at end of file diff --git a/ruoyi-ui/src/layout/components/Sidebar/Item.vue b/ruoyi-ui/src/layout/components/Sidebar/Item.vue index c1445e86..bc1013c8 100644 --- a/ruoyi-ui/src/layout/components/Sidebar/Item.vue +++ b/ruoyi-ui/src/layout/components/Sidebar/Item.vue @@ -27,7 +27,7 @@ export default { vnodes.push({(title)}) } let name=context?.parent?.item?.name; - if(['Todo','Task','Approve','Project','CheckDetection','ProjectMeasure','MaterialSeal','ProjectChecking','Attendance','FlowLabourInfo'].includes(name)){ + if(['Todo','Task','Approve','Project','CheckDetection','ProjectMeasure','MaterialSeal','ProjectChecking','Attendance','FlowLabourInfo','Trouble','PshProblemmodify','SspProblemmodify'].includes(name)){ console.log(name); vnodes.push(h('span',{class:"todo_num_tips tips_"+name},1)) } diff --git a/ruoyi-ui/src/store/modules/flowtask.js b/ruoyi-ui/src/store/modules/flowtask.js index 1903589c..7c170152 100644 --- a/ruoyi-ui/src/store/modules/flowtask.js +++ b/ruoyi-ui/src/store/modules/flowtask.js @@ -1,142 +1,176 @@ import { findMyTask } from "@/api/publics"; const flowtask = { - state: { - awaitTaskNum:0 - }, - - mutations: { - SET_AWAIT_TASK: (state, number) => { - state.awaitTaskNum = number - } - }, - - actions: { - // 设置代办任务 - settingAwaitNum({ commit }) { - return new Promise((resolve, reject) => { - //查询当前登录人的代办任务数量 - findMyTask({}).then(response => { - let todos=document.querySelectorAll(".tips_Todo"); - let approves=document.querySelectorAll(".tips_Approve"); - let tasks=document.querySelectorAll(".tips_Task"); - let checkDetections=document.querySelectorAll(".tips_CheckDetection"); - let projectMeasures=document.querySelectorAll(".tips_ProjectMeasure"); - let projectCheckings=document.querySelectorAll(".tips_ProjectChecking"); - let materialSeals=document.querySelectorAll(".tips_MaterialSeal"); - let surProjects=document.querySelectorAll(".tips_Project"); - //commit('SET_AWAIT_TASK',response.total) - if(todos.length>0){ - todos.forEach(el=>{ - el.innerHTML=response.data.todo; - if(response.data.todo>0){ - el.style.display="inline"; - }else{ - el.style.display="none"; - } - }); - } - if(tasks.length>0){ - //let sum = parseInt(response.data.todo)+parseInt(response.data.approve); - tasks.forEach(el=>{ - el.innerHTML=response.data.todo; - if(response.data.todo>0){ - el.style.display="inline"; - }else{ - el.style.display="none"; - } - }); - } - // if(approves.length>0){ - // approves.forEach(el=>{ - // el.innerHTML=response.data.approve; - // if(response.data.approve>0){ - // el.style.display="inline"; - // }else{ - // el.style.display="none"; - // } - // }); - // } - if(checkDetections.length>0){ - checkDetections.forEach(el=>{ - el.innerHTML=response.data.approveQYFS; - if(response.data.approveQYFS>0){ - el.style.display="inline"; - }else{ - el.style.display="none"; - } - }); - } - if(projectMeasures.length>0){ - projectMeasures.forEach(el=>{ - el.innerHTML=response.data.approveSCSL; - if(response.data.approveSCSL>0){ - el.style.display="inline"; - }else{ - el.style.display="none"; - } - }); - } - if(projectCheckings.length>0){ - projectCheckings.forEach(el=>{ - el.innerHTML=response.data.approveJPYS; - if(response.data.approveJPYS>0){ - el.style.display="inline"; - }else{ - el.style.display="none"; - } - }); - } - if(materialSeals.length>0){ - materialSeals.forEach(el=>{ - el.innerHTML=response.data.approveCLFY; - if(response.data.approveCLFY>0){ - el.style.display="inline"; - }else{ - el.style.display="none"; - } - }); - } - if(surProjects.length>0){ - let sum = parseInt(response.data.approveQYFS)+parseInt(response.data.approveSCSL)+parseInt(response.data.approveJPYS)+parseInt(response.data.approveCLFY); - surProjects.forEach(el=>{ - el.innerHTML=sum; - if(sum>0){ - el.style.display="inline"; - }else{ - el.style.display="none"; - } - }); - } - let Attendance=document.querySelectorAll(".tips_Attendance"); - if(Attendance.length>0){ - Attendance.forEach(el=>{ - el.innerHTML=response.data.approveLZYJ; - if(response.data.approveLZYJ>0){ - el.style.display="inline"; - }else{ - el.style.display="none"; - } - }); - } - let FlowLabourInfo=document.querySelectorAll(".tips_FlowLabourInfo"); - if(FlowLabourInfo.length>0){ - FlowLabourInfo.forEach(el=>{ - el.innerHTML=response.data.approveLZYJ; - if(response.data.approveLZYJ>0){ - el.style.display="inline"; - }else{ - el.style.display="none"; - } - }); - } - resolve() - }).catch(error => { - reject(error) - }); - }) - } + state: { + awaitTaskNum: 0 + }, + + mutations: { + SET_AWAIT_TASK: (state, number) => { + state.awaitTaskNum = number + } + }, + + actions: { + // 设置代办任务 + settingAwaitNum({ commit }) { + return new Promise((resolve, reject) => { + //查询当前登录人的代办任务数量 + findMyTask({}).then(response => { + let todos = document.querySelectorAll(".tips_Todo"); + let approves = document.querySelectorAll(".tips_Approve"); + let tasks = document.querySelectorAll(".tips_Task"); + let checkDetections = document.querySelectorAll(".tips_CheckDetection"); + let projectMeasures = document.querySelectorAll(".tips_ProjectMeasure"); + let projectCheckings = document.querySelectorAll(".tips_ProjectChecking"); + let materialSeals = document.querySelectorAll(".tips_MaterialSeal"); + let surProjects = document.querySelectorAll(".tips_Project"); + //commit('SET_AWAIT_TASK',response.total) + if (todos.length > 0) { + todos.forEach(el => { + el.innerHTML = response.data.todo; + if (response.data.todo > 0) { + el.style.display = "inline"; + } else { + el.style.display = "none"; + } + }); + } + if (tasks.length > 0) { + //let sum = parseInt(response.data.todo)+parseInt(response.data.approve); + tasks.forEach(el => { + el.innerHTML = response.data.todo; + if (response.data.todo > 0) { + el.style.display = "inline"; + } else { + el.style.display = "none"; + } + }); + } + // if(approves.length>0){ + // approves.forEach(el=>{ + // el.innerHTML=response.data.approve; + // if(response.data.approve>0){ + // el.style.display="inline"; + // }else{ + // el.style.display="none"; + // } + // }); + // } + if (checkDetections.length > 0) { + checkDetections.forEach(el => { + el.innerHTML = response.data.approveQYFS; + if (response.data.approveQYFS > 0) { + el.style.display = "inline"; + } else { + el.style.display = "none"; + } + }); + } + if (projectMeasures.length > 0) { + projectMeasures.forEach(el => { + el.innerHTML = response.data.approveSCSL; + if (response.data.approveSCSL > 0) { + el.style.display = "inline"; + } else { + el.style.display = "none"; + } + }); + } + if (projectCheckings.length > 0) { + projectCheckings.forEach(el => { + el.innerHTML = response.data.approveJPYS; + if (response.data.approveJPYS > 0) { + el.style.display = "inline"; + } else { + el.style.display = "none"; + } + }); + } + if (materialSeals.length > 0) { + materialSeals.forEach(el => { + el.innerHTML = response.data.approveCLFY; + if (response.data.approveCLFY > 0) { + el.style.display = "inline"; + } else { + el.style.display = "none"; + } + }); + } + if (surProjects.length > 0) { + let sum = parseInt(response.data.approveQYFS) + parseInt(response.data.approveSCSL) + parseInt(response.data.approveJPYS) + parseInt(response.data.approveCLFY); + surProjects.forEach(el => { + el.innerHTML = sum; + if (sum > 0) { + el.style.display = "inline"; + } else { + el.style.display = "none"; + } + }); + } + let Attendance = document.querySelectorAll(".tips_Attendance"); + if (Attendance.length > 0) { + Attendance.forEach(el => { + el.innerHTML = response.data.approveLZYJ; + if (response.data.approveLZYJ > 0) { + el.style.display = "inline"; + } else { + el.style.display = "none"; + } + }); + } + let FlowLabourInfo = document.querySelectorAll(".tips_FlowLabourInfo"); + if (FlowLabourInfo.length > 0) { + FlowLabourInfo.forEach(el => { + el.innerHTML = response.data.approveLZYJ; + if (response.data.approveLZYJ > 0) { + el.style.display = "inline"; + } else { + el.style.display = "none"; + } + }); + } + let trouble = document.querySelectorAll(".tips_Trouble"); + let pshProblemmodify = document.querySelectorAll(".tips_PshProblemmodify"); + let sspProblemmodify = document.querySelectorAll(".tips_SspProblemmodify"); + if (trouble.length > 0) { + let sum = parseInt(response.data.zlCount) + parseInt(response.data.aqCount); + trouble.forEach(el => { + el.innerHTML = sum; + if (sum > 0) { + el.style.display = "inline"; + } else { + el.style.display = "none"; + } + }); + } + if (pshProblemmodify.length > 0) { + pshProblemmodify.forEach(el => { + el.innerHTML = response.data.aqCount; + if (response.data.aqCount > 0) { + el.style.display = "inline"; + } else { + el.style.display = "none"; + } + }); + } + if (sspProblemmodify.length > 0) { + sspProblemmodify.forEach(el => { + el.innerHTML = response.data.zlCount; + if (response.data.zlCount > 0) { + el.style.display = "inline"; + } else { + el.style.display = "none"; + } + }); + } + resolve() + }).catch(error => { + reject(error) + }); + }) } } - - export default flowtask \ No newline at end of file +} + +export default flowtask \ No newline at end of file diff --git a/ruoyi-ui/src/views/trouble/pshProblemmodify/index.vue b/ruoyi-ui/src/views/trouble/pshProblemmodify/index.vue index 598925d3..8a63e30e 100644 --- a/ruoyi-ui/src/views/trouble/pshProblemmodify/index.vue +++ b/ruoyi-ui/src/views/trouble/pshProblemmodify/index.vue @@ -17,7 +17,13 @@ /> - + - + - + - - - + + + 搜索 重置 - 导出 + 导出 @@ -153,7 +165,8 @@