From be8ee644a75d3bff49c7bdbcc2a0afe426d2f42b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9C=E7=8E=89=E7=90=A6?= <7507756+jiang_yuqi@user.noreply.gitee.com> Date: Sat, 28 Jun 2025 16:51:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SmzSspProblemmodifyDraftMapper.xml | 29 +- .../trouble/SmzSspProblemmodifyMapper.xml | 58 +- .../controller/GreenCarbonDataController.java | 4 +- .../controller/GreenCarbonItemController.java | 8 +- .../controller/ProCostOutputController.java | 2 +- .../SmzSspProblemmodifyController.java | 5 +- .../SmzSspProblemmodifyDraftController.java | 9 + yanzhu-ui-app/miniprogram/config.js | 2 +- .../project_problemmodify/list/index.js | 2 +- .../trouble/problemmodify/detailDrawer.vue | 28 +- .../src/views/trouble/problemmodify/index.vue | 40 +- .../trouble/problemmodifyDraft/index.vue | 110 ++-- .../problemmodifyDraftQuality/index.vue | 606 ++++++++++++++++++ .../problemmodifyQuality/detailDrawer.vue | 453 +++++++++++++ .../trouble/problemmodifyQuality/index.vue | 270 ++++++++ yanzhu-ui-vue3/vite.config.js | 4 +- 16 files changed, 1488 insertions(+), 142 deletions(-) create mode 100644 yanzhu-ui-vue3/src/views/trouble/problemmodifyDraftQuality/index.vue create mode 100644 yanzhu-ui-vue3/src/views/trouble/problemmodifyQuality/detailDrawer.vue create mode 100644 yanzhu-ui-vue3/src/views/trouble/problemmodifyQuality/index.vue diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/trouble/SmzSspProblemmodifyDraftMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/trouble/SmzSspProblemmodifyDraftMapper.xml index a8a8ef82..68f2207c 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/trouble/SmzSspProblemmodifyDraftMapper.xml +++ b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/trouble/SmzSspProblemmodifyDraftMapper.xml @@ -50,35 +50,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and comId = #{comId} and projectId = #{projectId} and infoType = #{infoType} - and marks_picture = #{marksPicture} - and marks_video = #{marksVideo} - and problemArea = #{problemArea} - and workParts = #{workParts} - and changeInfo = #{changeInfo} - and lordSent = #{lordSent} - and lordSentUser = #{lordSentUser} - and copySend = #{copySend} - and copySendUser = #{copySendUser} - and checkState = #{checkState} - and nickedArea = #{nickedArea} - and nickedTime = #{nickedTime} - and projectType = #{projectType} - and processName like concat('%', #{processName}, '%') - and projectName like concat('%', #{projectName}, '%') - and nickedInfo = #{nickedInfo} - and checkUser = #{checkUser} - and checkUserPhone = #{checkUserPhone} - and smark_url = #{smarkUrl} - and isDel = #{isDel} - and createUser = #{createUser} - and createTime = #{createTime} - and updateUser = #{updateUser} - and updateTime = #{updateTime} - and danger_type = #{dangerType} - and recheckSend = #{recheckSend} - and recheckSendUser = #{recheckSendUser} - and roleType = #{roleType} and problemType = #{problemType} + and date(createTime) between #{params.beginTime} and #{params.endTime} diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/trouble/SmzSspProblemmodifyMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/trouble/SmzSspProblemmodifyMapper.xml index fd86c73c..e98ec73b 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/trouble/SmzSspProblemmodifyMapper.xml +++ b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/trouble/SmzSspProblemmodifyMapper.xml @@ -111,9 +111,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and ssp.recheckSendUser = #{recheckSendUser} and ssp.problemType = #{problemType} - and - ( - ssp.createUser=#{currentUserId} or ssp.lordSent=#{currentUserId} or find_in_set(#{currentUserId},ssp.copySend) or ssp.recheckSend=#{currentUserId} + and ( + ssp.createUser=#{currentUserId} or ssp.lordSent=#{currentUserId} or find_in_set(#{currentUserId},ssp.copySend) or ssp.recheckSend=#{currentUserId} ) and ssp.checkState in (0,3) @@ -300,6 +299,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + and a.projectName like concat('%', #{projectName}, '%') and a.problemType = #{problemType} and a.danger_type = #{dangerType} and date(a.createTime) >= date(#{createTime}) @@ -307,49 +307,50 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and a.createUser = #{createUser} and a.lordSent = #{lordSent} - AND - ( + and ( a.createUser=#{currentUserId} or a.lordSent=#{currentUserId} or find_in_set(#{currentUserId},a.copySend) or a.recheckSend=#{currentUserId} ) + and a.isDel=0 - select 'a' projectName, count(1) id ,'全部' remark from smz_ssp_problemmodify a where a.projectId=#{projectId} and a.comId=#{comId} and a.infoType=#{infoType} and a.isDel=0 + select 'a' projectName, count(1) id ,'全部' remark from smz_ssp_problemmodify a where a.projectId=#{projectId} and a.infoType=#{infoType} union - select 'b' projectName, count(1) id,'待整改' remark from smz_ssp_problemmodify a where a.projectId=#{projectId} and a.comId=#{comId} and a.infoType=#{infoType} and a.isDel=0 and a.checkState in (0,3) + select 'b' projectName, count(1) id,'待整改' remark from smz_ssp_problemmodify a where a.projectId=#{projectId} and a.infoType=#{infoType} union - select 'c' projectName, count(1) id,'待复检' remark from smz_ssp_problemmodify a where a.projectId=#{projectId} and a.comId=#{comId} and a.infoType=#{infoType} and a.isDel=0 and a.checkState in (1) + select 'c' projectName, count(1) id,'待复检' remark from smz_ssp_problemmodify a where a.projectId=#{projectId} and a.infoType=#{infoType} and a.checkState in (1) union - select 'd' projectName, count(1) id,'整改完成' remark from smz_ssp_problemmodify a where a.projectId=#{projectId} and a.comId=#{comId} and a.infoType=#{infoType} and a.isDel=0 and a.checkState in (4) + select 'd' projectName, count(1) id,'整改完成' remark from smz_ssp_problemmodify a where a.projectId=#{projectId} and a.infoType=#{infoType} and a.checkState in (4) union - select 'e' projectName, count(1) id,'整改超时' remark from smz_ssp_problemmodify a where a.projectId=#{projectId} and a.comId=#{comId} and a.infoType=#{infoType} and a.isDel=0 and a.checkState not in (4) and date(a.nickedTime) <= curdate() + select 'e' projectName, count(1) id,'整改超时' remark from smz_ssp_problemmodify a where a.projectId=#{projectId} and a.infoType=#{infoType} and a.checkState not in (4) and date(a.nickedTime) <= curdate() - select 'a' projectName, count(1) id ,'全部' remark from smz_ssp_problemmodify a where a.projectId=#{projectId} and a.comId=#{comId} and a.infoType=#{infoType} and a.isDel=0 + select 'a' projectName, count(1) id ,'全部' remark from smz_ssp_problemmodify a where a.projectId=#{projectId} and a.infoType=#{infoType} union - select 'b' projectName, count(1) id,'待整改' remark from smz_ssp_problemmodify a where a.projectId=#{projectId} and a.comId=#{comId} and a.infoType=#{infoType} and a.isDel=0 and a.checkState in (0) + select 'b' projectName, count(1) id,'待整改' remark from smz_ssp_problemmodify a where a.projectId=#{projectId} and a.infoType=#{infoType} and a.checkState in (0) union - select 'c' projectName, count(1) id,'待复检' remark from smz_ssp_problemmodify a where a.projectId=#{projectId} and a.comId=#{comId} and a.infoType=#{infoType} and a.isDel=0 and a.checkState in (1) + select 'c' projectName, count(1) id,'待复检' remark from smz_ssp_problemmodify a where a.projectId=#{projectId} and a.infoType=#{infoType} and a.checkState in (1) union - select 'd' projectName, count(1) id,'驳回' remark from smz_ssp_problemmodify a where a.projectId=#{projectId} and a.comId=#{comId} and a.infoType=#{infoType} and a.isDel=0 and a.checkState in (3) + select 'd' projectName, count(1) id,'驳回' remark from smz_ssp_problemmodify a where a.projectId=#{projectId} and a.infoType=#{infoType} and a.checkState in (3) union - select 'e' projectName, count(1) id,'完成' remark from smz_ssp_problemmodify a where a.projectId=#{projectId} and a.comId=#{comId} and a.infoType=#{infoType} and a.isDel=0 and a.checkState in (4) + select 'e' projectName, count(1) id,'完成' remark from smz_ssp_problemmodify a where a.projectId=#{projectId} and a.infoType=#{infoType} and a.checkState in (4) union - select 'f' projectName, count(1) id,'整改超时' remark from smz_ssp_problemmodify a where a.projectId=#{projectId} and a.comId=#{comId} and a.infoType=#{infoType} and a.isDel=0 and a.checkState not in (4) and date(a.nickedTime) <= curdate() + select 'f' projectName, count(1) id,'整改超时' remark from smz_ssp_problemmodify a where a.projectId=#{projectId} and a.infoType=#{infoType} and a.checkState not in (4) and date(a.nickedTime) <= curdate() + select ssp.checkState, count(1) as total from smz_ssp_problemmodify ssp @@ -357,8 +358,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and ssp.projectId = #{projectId} and ssp.infoType = #{infoType} - and - ( + and ( ssp.createUser=#{currentUserId} or ssp.lordSent=#{currentUserId} or find_in_set(#{currentUserId},ssp.copySend) or ssp.recheckSend=#{currentUserId} ) @@ -436,30 +436,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" a.problemType FROM smz_ssp_problemmodify a - LEFT JOIN pro_project_info_subdepts_users b ON a.lordSent = b.user_id AND a.projectId = b.project_id AND a.comId = b.com_id - LEFT JOIN pro_project_info_subdepts_users d ON a.recheckSend = d.user_id AND a.projectId = d.project_id AND a.comId = d.com_id + LEFT JOIN pro_project_info_subdepts_users b ON a.lordSent = b.user_id and a.projectId = b.project_id + LEFT JOIN pro_project_info_subdepts_users d ON a.recheckSend = d.user_id and a.projectId = d.project_id LEFT JOIN sys_user c ON a.createUser = c.user_id - - where a.isDel=0 and a.projectId=#{projectId} and a.comId=#{comId} and a.infoType=#{infoType} - + where a.projectId = #{projectId} and a.infoType = #{infoType} + - + and a.checkState in (0,3) - + and a.checkState in (1) - + and a.checkState in (4) - + and a.checkState not in (4) and date(nickedTime) <= curdate() - + and a.checkState in (0) - + and a.checkState in (3) @@ -467,6 +466,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" order by a.id desc + select a.dict_value nickedInfo,a.dict_label problemType,b.cnt id from (SELECT * from sys_dict_data dic WHERE dict_type='ssp_proble_type') a diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/GreenCarbonDataController.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/GreenCarbonDataController.java index 5246c507..447b4d77 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/GreenCarbonDataController.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/GreenCarbonDataController.java @@ -119,7 +119,7 @@ public class GreenCarbonDataController extends BaseController public AjaxResult add(@RequestBody GreenCarbonData greenCarbonData) { GreenCarbonData where =new GreenCarbonData(); - where.setComId(greenCarbonData.getComId()); + //where.setComId(greenCarbonData.getComId()); where.setProjectId(greenCarbonData.getProjectId()); where.setDataDate(greenCarbonData.getDataDate()); where.setItemId(greenCarbonData.getItemId()); @@ -139,7 +139,7 @@ public class GreenCarbonDataController extends BaseController public AjaxResult edit(@RequestBody GreenCarbonData greenCarbonData) { GreenCarbonData where =new GreenCarbonData(); - where.setComId(greenCarbonData.getComId()); + //where.setComId(greenCarbonData.getComId()); where.setProjectId(greenCarbonData.getProjectId()); where.setDataDate(greenCarbonData.getDataDate()); where.setItemId(greenCarbonData.getItemId()); diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/GreenCarbonItemController.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/GreenCarbonItemController.java index 817acfc4..0aa6c504 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/GreenCarbonItemController.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/GreenCarbonItemController.java @@ -98,7 +98,7 @@ public class GreenCarbonItemController extends BaseController item.setProjectId(prjId); item.setComId(comId); if(item.getId()==null|| item.getId().equals(0l)){ - where.setComId(item.getComId()); + //where.setComId(item.getComId()); where.setProjectId(item.getProjectId()); where.setCarbonName(item.getCarbonName()); where.setCarbonFactorType(item.getCarbonFactorType()); @@ -119,7 +119,7 @@ public class GreenCarbonItemController extends BaseController if(old==null){ item.setRemark("无效ID"); }else{ - where.setComId(old.getComId()); + //where.setComId(old.getComId()); where.setProjectId(old.getProjectId()); where.setCarbonName(item.getCarbonName()); where.setCarbonFactorType(item.getCarbonFactorType()); @@ -162,7 +162,7 @@ public class GreenCarbonItemController extends BaseController public AjaxResult add(@RequestBody GreenCarbonItem greenCarbonItem) { GreenCarbonItem where=new GreenCarbonItem(); - where.setComId(greenCarbonItem.getComId()); + //where.setComId(greenCarbonItem.getComId()); where.setProjectId(greenCarbonItem.getProjectId()); where.setCarbonName(greenCarbonItem.getCarbonName()); where.setCarbonFactorType(greenCarbonItem.getCarbonFactorType()); @@ -182,7 +182,7 @@ public class GreenCarbonItemController extends BaseController public AjaxResult edit(@RequestBody GreenCarbonItem greenCarbonItem) { GreenCarbonItem where=new GreenCarbonItem(); - where.setComId(greenCarbonItem.getComId()); + //where.setComId(greenCarbonItem.getComId()); where.setProjectId(greenCarbonItem.getProjectId()); where.setCarbonName(greenCarbonItem.getCarbonName()); where.setCarbonFactorType(greenCarbonItem.getCarbonFactorType()); diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/ProCostOutputController.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/ProCostOutputController.java index 67c1b8c2..2f73fb5a 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/ProCostOutputController.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/ProCostOutputController.java @@ -152,7 +152,7 @@ public class ProCostOutputController extends BaseController public AjaxResult listByProjectId(long projectId,long comId){ ProCostOutput where =new ProCostOutput(); where.setProjectId(projectId); - where.setComId(comId); + //where.setComId(comId); List list=proCostOutputService.selectProCostOutputList(where); if(list.size()==0){ proCostOutputService.initProject(projectId,comId); diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/SmzSspProblemmodifyController.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/SmzSspProblemmodifyController.java index aa571958..6ed51ff2 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/SmzSspProblemmodifyController.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/SmzSspProblemmodifyController.java @@ -57,7 +57,7 @@ public class SmzSspProblemmodifyController extends BaseController { SysUser user = SecurityUtils.getLoginUser().getSysUser(); where.setProjectId(user.getActiveProjectId()); - where.setComId(user.getActiveComId()); + //where.setComId(user.getActiveComId()); if(SecurityUtils.isAdmin(SecurityUtils.getUserId()) || SecurityUtils.isGSAdmin()) { where.setCurrentUserId(null); }else{ @@ -76,6 +76,7 @@ public class SmzSspProblemmodifyController extends BaseController public TableDataInfo wxList(SmzSspProblemmodify where) { SysUser user = SecurityUtils.getLoginUser().getSysUser(); + where.setProjectId(user.getActiveProjectId()); if(SecurityUtils.isAdmin(SecurityUtils.getUserId()) || SecurityUtils.isGSAdmin()) { where.setCurrentUserId(null); }else{ @@ -96,7 +97,7 @@ public class SmzSspProblemmodifyController extends BaseController public AjaxResult getListCount(SmzSspProblemmodify where){ SysUser user=SecurityUtils.getLoginUser().getSysUser(); where.setProjectId(user.getActiveProjectId()); - where.setComId(user.getActiveComId()); + //where.setComId(user.getActiveComId()); if(SecurityUtils.isAdmin(SecurityUtils.getUserId()) || SecurityUtils.isGSAdmin()) { where.setCurrentUserId(null); }else{ diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/SmzSspProblemmodifyDraftController.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/SmzSspProblemmodifyDraftController.java index 8d6686c0..330362dc 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/SmzSspProblemmodifyDraftController.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/SmzSspProblemmodifyDraftController.java @@ -3,8 +3,10 @@ package com.yanzhu.manage.controller; import java.util.List; import javax.servlet.http.HttpServletResponse; +import com.yanzhu.common.security.utils.SecurityUtils; import com.yanzhu.manage.domain.SmzSspProblemmodifyDraft; import com.yanzhu.manage.service.ISmzSspProblemmodifyDraftService; +import com.yanzhu.system.api.domain.SysUser; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; @@ -42,6 +44,13 @@ public class SmzSspProblemmodifyDraftController extends BaseController @GetMapping("/list") public TableDataInfo list(SmzSspProblemmodifyDraft smzSspProblemmodifyDraft) { + SysUser user = SecurityUtils.getLoginUser().getSysUser(); + smzSspProblemmodifyDraft.setProjectId(user.getActiveProjectId()); + if(SecurityUtils.isAdmin(SecurityUtils.getUserId()) || SecurityUtils.isGSAdmin()) { + smzSspProblemmodifyDraft.setCreateUser(null); + }else{ + smzSspProblemmodifyDraft.setCreateUser(user.getUserId().toString()); + } startPage(); List list = smzSspProblemmodifyDraftService.selectSmzSspProblemmodifyDraftList(smzSspProblemmodifyDraft); return getDataTable(list); diff --git a/yanzhu-ui-app/miniprogram/config.js b/yanzhu-ui-app/miniprogram/config.js index 9e5b4bf2..cf292ad0 100644 --- a/yanzhu-ui-app/miniprogram/config.js +++ b/yanzhu-ui-app/miniprogram/config.js @@ -4,7 +4,7 @@ module.exports = { appId: "wx46466c7828eede2b", baseUrl: 'https://xiangguan.sxyanzhu.com/wechat', //baseUrl: 'http://127.0.0.1:8080', - baseImgUrl: 'https://xiangguan.sxyanzhu.com/wechat', + baseImgUrl: 'https://xiangguan.sxyanzhu.com', //baseImgUrl: 'http://127.0.0.1:9300', noSecuritys:['/code','/auth/wxLogin','/auth/getMaOpenId','/auth/getMaPhoneNumber','/auth/maLogin'] }; \ No newline at end of file diff --git a/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/list/index.js b/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/list/index.js index cae544f6..f7ad41b7 100644 --- a/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/list/index.js +++ b/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/list/index.js @@ -123,7 +123,7 @@ Page({ * 查询项目质量隐患排查数据 */ getListData(userInfo, activeState, type) { - let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&comId=" + userInfo.comId + "&projectId=" + app.globalData.useProjectId + "&infoType=" + type + "&activeTags=" + activeState; + let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&projectId=" + app.globalData.useProjectId + "&infoType=" + type + "&activeTags=" + activeState; list(params).then(res => { if (res.code == 200) { res.rows.forEach(item => { diff --git a/yanzhu-ui-vue3/src/views/trouble/problemmodify/detailDrawer.vue b/yanzhu-ui-vue3/src/views/trouble/problemmodify/detailDrawer.vue index 5292b224..58b4c5c3 100644 --- a/yanzhu-ui-vue3/src/views/trouble/problemmodify/detailDrawer.vue +++ b/yanzhu-ui-vue3/src/views/trouble/problemmodify/detailDrawer.vue @@ -92,15 +92,6 @@ {{ data.row.workParts }} {{ data.row.changeInfo }} - - - {{ data.row.createUser }} - - - {{ data.row.createTime }} - - - {{ data.row.lordSentUser }} @@ -117,10 +108,23 @@ {{ data.row.nickedTime }} + + + + + + + + + + {{ data.row.createUser }} + + + {{ data.row.createTime }} + + - {{ data.row.createUser }} - {{ data.row.createTime }} {{ data.row.lordSentUser }} {{ data.row.copySendUser }} {{ data.row.recheckSendUser }} @@ -128,6 +132,8 @@ + {{ data.row.createUser }} + {{ data.row.createTime }} diff --git a/yanzhu-ui-vue3/src/views/trouble/problemmodify/index.vue b/yanzhu-ui-vue3/src/views/trouble/problemmodify/index.vue index a65f70db..22f44c1d 100644 --- a/yanzhu-ui-vue3/src/views/trouble/problemmodify/index.vue +++ b/yanzhu-ui-vue3/src/views/trouble/problemmodify/index.vue @@ -1,27 +1,26 @@ - - + - + - + - + - @@ -37,9 +36,8 @@ - - {{ scope.$index + 1 + (queryParams.pageNum - 1) * queryParams.pageSize }} - + + - - - + + + - - + {{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }} @@ -111,16 +108,14 @@ const detailDrawerRef = ref(); const data = reactive({ form: {}, queryParams: { - dateRange: [], pageNum: 1, pageSize: 10, - comId: null, - projectId: null, - infoType: null, problemType: null, dangerType: null, lordSent: null, createUser: null, + checkState: null, + dateRange: [], }, rules: { comId: [ @@ -138,6 +133,10 @@ const { queryParams, form, rules } = toRefs(data); /** 查询安全隐患整改列表 */ function getList() { + if (!userStore.currentPrjId) { + proxy.$modal.msgWarning("请切换到项目数据!!!"); + return false; + } loading.value = true; let postData = { infoType: 0, @@ -145,7 +144,7 @@ function getList() { dangerType: queryParams.value.dangerType, lordSent: queryParams.value.lordSent, createUser: queryParams.value.createUser, - projectName: " abcde".indexOf(data.activeName) + checkState: " abcde".indexOf(data.activeName) }; if (queryParams.value.dataRange && queryParams.value.dataRange.length > 0) { postData.createTime = queryParams.value.dataRange[0]; @@ -222,6 +221,9 @@ function handleDelete(row) { } function getCount() { + if (!userStore.currentPrjId) { + return false; + } let postData = { infoType: 0, problemType: queryParams.value.problemType, diff --git a/yanzhu-ui-vue3/src/views/trouble/problemmodifyDraft/index.vue b/yanzhu-ui-vue3/src/views/trouble/problemmodifyDraft/index.vue index f5d2cb08..dd51695d 100644 --- a/yanzhu-ui-vue3/src/views/trouble/problemmodifyDraft/index.vue +++ b/yanzhu-ui-vue3/src/views/trouble/problemmodifyDraft/index.vue @@ -6,8 +6,9 @@ - - + + @@ -72,7 +73,7 @@ - + @@ -204,8 +205,11 @@ const data = reactive({ showList: [], form: {}, queryParams: { + pageNum: 1, + pageSize: 10, + infoType: 0, problemType: null, - userName: null, + dateRange: [], }, rules: {}, selData: [], @@ -219,13 +223,55 @@ const { queryParams, form, rules } = toRefs(data) /** 搜索按钮操作 */ function handleQuery() { - data.showList = data.dataList.filter((d) => { - let ck1 = true - if (data.queryParams.problemType) { - ck1 = d.problemType == data.queryParams.problemType + proxy.$modal + .confirm('是否确认查询数据,继续查询未保存数据将会丢失?') + .then(function () { + getList(); + }) + .catch(() => {}) + +} + +/** 获取数据列表 */ +function getList(){ + if (!userStore.currentPrjId) { + proxy.$modal.msgWarning("请切换到项目数据!!!"); + return false; + } + data.showList = []; + if (data.queryParams.dataRange && data.queryParams.dataRange.length > 0) { + let params = {}; + params.beginTime = queryParams.value.dataRange[0]; + params.endTime = queryParams.value.dataRange[1]; + data.queryParams.params = params; + } + listProblemmodifyDraft(data.queryParams).then(res =>{ + if(res.total>0){ + res.rows.forEach((item,idx) => { + item.key = idx; + data.showList.push(item); + }); + }else{ + let row = { + key: +new Date(), + id: null, + projectId: userStore.currentPrjId, + comId: userStore.currentComId, + problemType: null, + dangerType: null, + smarkUrl: null, + workParts: null, + changeInfo: null, + lordSent: null, + copySend: null, + recheckSend: null, + nickedTime: null, + isDel: 0, + infoType: 0, + } + data.showList.push(row); } - return ck1 - }) + }); } /** 重置按钮操作 */ @@ -244,6 +290,10 @@ function handleSelectionChange(selection) { /** 新增按钮操作 */ function handleAdd() { + if (!userStore.currentPrjId) { + proxy.$modal.msgWarning("请切换到项目数据!!!"); + return false; + } let row = { key: +new Date(), id: null, @@ -259,10 +309,9 @@ function handleAdd() { recheckSend: null, nickedTime: null, isDel: 0, - infoType: 1, + infoType: 0, } - data.dataList.push(row) - data.showList.push(row) + data.showList.push(row); } /** 数据同步 */ function dataSynchronization() { @@ -291,8 +340,6 @@ function batchSubmitForm() { data.selData.forEach((it) => { if (!checkRow(it)) { cnt++ - //data.showList.splice(it, 1); - //data.dataList.splice(it, 1); } }) if (cnt > 0) { @@ -319,8 +366,7 @@ function doBatchAdd(datas) { if (res.code == 200) { proxy.$modal.msgSuccess('提交成功!') datas.forEach((it) => { - data.showList.splice(it, 1) - data.dataList.splice(it, 1) + data.showList.splice(it, 1); }) if (data.showList.length == 0) { let row = { @@ -338,10 +384,9 @@ function doBatchAdd(datas) { recheckSend: null, nickedTime: null, isDel: 0, - infoType: 1, + infoType: 0, } - data.dataList.push(row) - data.showList.push(row) + data.dataList.push(row); } } }) @@ -419,7 +464,7 @@ function submitForm() { /** 删除按钮操作 */ function handleDelete(row) { - if (data.dataList.length == 1) { + if (data.showList.length == 1) { proxy.$modal.msgError('至少保留一条数据') return } @@ -427,7 +472,6 @@ function handleDelete(row) { .confirm('是否确认删除数据项?') .then(function () { data.showList.splice(row, 1) - data.dataList.splice(row, 1) proxy.$modal.msgSuccess('删除成功') }) .catch(() => {}) @@ -470,25 +514,6 @@ function makeSelectData(users, type) { return arr } function getUserTree() { - let row = { - key: +new Date(), - id: null, - projectId: userStore.currentPrjId, - comId: userStore.currentComId, - problemType: null, - dangerType: null, - smarkUrl: null, - workParts: null, - changeInfo: null, - lordSent: null, - copySend: null, - recheckSend: null, - nickedTime: null, - isDel: 0, - infoType: 1, - } - data.dataList.push(row) - data.showList.push(row) listProProjectInfoSubdeptsUsers({ projectId: userStore.currentPrjId, pageNum: 1, pageSize: 1000 }).then((d) => { let users = d.rows || [] data.users = users @@ -502,7 +527,8 @@ function getUserTree() { data.recheckUserList = makeSelectData(users.filter((it) => it.subDeptType == 1)) }) } -getUserTree() +getList(); +getUserTree(); \ No newline at end of file diff --git a/yanzhu-ui-vue3/src/views/trouble/problemmodifyQuality/detailDrawer.vue b/yanzhu-ui-vue3/src/views/trouble/problemmodifyQuality/detailDrawer.vue new file mode 100644 index 00000000..10c59811 --- /dev/null +++ b/yanzhu-ui-vue3/src/views/trouble/problemmodifyQuality/detailDrawer.vue @@ -0,0 +1,453 @@ + + + + + + + + + + + + + + + + + {{ it.index }}. + 整改处理 + 复检通过 + 复检驳回 + + + + + + + 整改说明 + 复检意见 + 驳回意见 + + {{ it.opinion }} + + + + 整改图片 + + + + + + + + + + + + + + + 01.待整改 + + + + + + 办理用户 + + {{ data.row.createUser }} + + + + + + 办理时间 + + {{ data.row.createTime }} + + + + 隐患图片 + + + + + + + + + + + + {{ data.row.projectName }} + + + + + + + + + + {{ data.row.workParts }} + {{ data.row.changeInfo }} + + + + + + {{ data.row.lordSentUser }} + + + {{ data.row.copySendUser }} + + + + + {{ data.row.recheckSendUser }} + + + {{ data.row.nickedTime }} + + + + + + + + + + + + {{ data.row.createUser }} + + + {{ data.row.createTime }} + + + + + {{ data.row.lordSentUser }} + {{ data.row.copySendUser }} + {{ data.row.recheckSendUser }} + {{ data.row.nickedTime }} + + + + {{ data.row.createUser }} + {{ data.row.createTime }} + + + + + + 整改情况 + + + + + + + + + + + 取消 + 提交 + + + + + 复检 + + + + + + + + 取消 + 复检驳回 + 复检通过 + + + + + + + + + + + \ No newline at end of file diff --git a/yanzhu-ui-vue3/src/views/trouble/problemmodifyQuality/index.vue b/yanzhu-ui-vue3/src/views/trouble/problemmodifyQuality/index.vue new file mode 100644 index 00000000..71cd836f --- /dev/null +++ b/yanzhu-ui-vue3/src/views/trouble/problemmodifyQuality/index.vue @@ -0,0 +1,270 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + 搜索 + 重置 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }} + + + + + + 处理 + 详情 + 删除 + + + + + + + + + + + \ No newline at end of file diff --git a/yanzhu-ui-vue3/vite.config.js b/yanzhu-ui-vue3/vite.config.js index 43d9d263..590989de 100644 --- a/yanzhu-ui-vue3/vite.config.js +++ b/yanzhu-ui-vue3/vite.config.js @@ -39,8 +39,8 @@ export default defineConfig(({ mode, command }) => { }, // https://cn.vitejs.dev/config/#server-proxy "/dev-api": { - target: "http://localhost:8080", - //target: "http://62.234.3.186/prod-api/", + //target: "http://localhost:8080", + target: "http://62.234.3.186/prod-api/", changeOrigin: true, rewrite: (p) => p.replace(/^\/dev-api/, ""), },