Commit 45d5af0a5fccfa62df7bf081898030d72b6dd382

Authored by youxiw2000
1 parent ddf73a78

a

Showing 60 changed files with 1352 additions and 1795 deletions

Too many changes to show.

To preserve performance only 60 of 127 files are displayed.

trash-activiti/src/main/java/com/trash/activiti/mapper/ActReDeploymentMapper.java
@@ -20,7 +20,11 @@ public interface ActReDeploymentMapper { @@ -20,7 +20,11 @@ public interface ActReDeploymentMapper {
20 public List<ActReDeploymentVO> selectActReDeploymentByIds(@Param("ids") Set<String> ids); 20 public List<ActReDeploymentVO> selectActReDeploymentByIds(@Param("ids") Set<String> ids);
21 21
22 22
23 - public Map<String,String> selectWorkLeaveById(@Param("id") String id); 23 + public Map<String,String> selectWorkById(@Param("id") String id);
  24 +
  25 + public Map<String,String> selectHistoryWorkById(@Param("id") String id);
  26 +
  27 +
24 28
25 public Set<String> selectUnCompleteWorkByUsername(@Param("username") String username); 29 public Set<String> selectUnCompleteWorkByUsername(@Param("username") String username);
26 30
trash-activiti/src/main/java/com/trash/activiti/service/IActTaskService.java
@@ -16,4 +16,8 @@ public interface IActTaskService { @@ -16,4 +16,8 @@ public interface IActTaskService {
16 Page<ActTaskDTO> selectRuntimeTaskHistoryDefinitionList(PageDomain pageDomain); 16 Page<ActTaskDTO> selectRuntimeTaskHistoryDefinitionList(PageDomain pageDomain);
17 17
18 Page<ActTaskDTO> selectTaskEndHistoryDefinitionList(PageDomain pageDomain); 18 Page<ActTaskDTO> selectTaskEndHistoryDefinitionList(PageDomain pageDomain);
  19 +
  20 + public void endAllThreesteptask(String type);
  21 +
  22 + public void deleteProcessById(String type);
19 } 23 }
trash-activiti/src/main/java/com/trash/activiti/service/impl/ActTaskServiceImpl.java
@@ -35,6 +35,7 @@ import org.activiti.engine.runtime.ProcessInstance; @@ -35,6 +35,7 @@ import org.activiti.engine.runtime.ProcessInstance;
35 import org.activiti.engine.runtime.ProcessInstanceQuery; 35 import org.activiti.engine.runtime.ProcessInstanceQuery;
36 import org.activiti.engine.task.TaskQuery; 36 import org.activiti.engine.task.TaskQuery;
37 import org.activiti.runtime.api.query.impl.PageImpl; 37 import org.activiti.runtime.api.query.impl.PageImpl;
  38 +import org.apache.ibatis.reflection.wrapper.BaseWrapper;
38 import org.springframework.beans.factory.annotation.Autowired; 39 import org.springframework.beans.factory.annotation.Autowired;
39 import org.springframework.stereotype.Service; 40 import org.springframework.stereotype.Service;
40 41
@@ -78,24 +79,18 @@ public class ActTaskServiceImpl implements IActTaskService { @@ -78,24 +79,18 @@ public class ActTaskServiceImpl implements IActTaskService {
78 @Override 79 @Override
79 public Page<ActTaskDTO> selectProcessDefinitionList(PageDomain pageDomain) { 80 public Page<ActTaskDTO> selectProcessDefinitionList(PageDomain pageDomain) {
80 Page<ActTaskDTO> list = new Page<ActTaskDTO>(); 81 Page<ActTaskDTO> list = new Page<ActTaskDTO>();
81 - org.activiti.api.runtime.shared.query.Page<Task> pageTasks = taskRuntime  
82 - .tasks(Pageable.of((pageDomain.getPageNum() - 1) * pageDomain.getPageSize(), pageDomain.getPageSize())); 82 +
  83 + org.activiti.api.runtime.shared.query.Page<Task> pageTasks = taskRuntime.tasks(Pageable.of((pageDomain.getPageNum() - 1) * pageDomain.getPageSize(), pageDomain.getPageSize()));
83 List<Task> tasks = pageTasks.getContent(); 84 List<Task> tasks = pageTasks.getContent();
84 int totalItems = pageTasks.getTotalItems(); 85 int totalItems = pageTasks.getTotalItems();
85 list.setTotal(totalItems); 86 list.setTotal(totalItems);
86 if (totalItems != 0) { 87 if (totalItems != 0) {
87 - Set<String> processInstanceIdIds = tasks.parallelStream().map(t -> t.getProcessInstanceId())  
88 - .collect(Collectors.toSet());  
89 - List<ProcessInstance> processInstanceList = runtimeService.createProcessInstanceQuery()  
90 - .processInstanceIds(processInstanceIdIds).list();  
91 -  
92 - List<ActTaskDTO> actTaskDTOS = tasks.stream()  
93 - .map(t -> new ActTaskDTO(t,  
94 - processInstanceList.parallelStream()  
95 - .filter(pi -> t.getProcessInstanceId().equals(pi.getId())).findAny().get(),  
96 - getData(processInstanceList.parallelStream()  
97 - .filter(pi -> t.getProcessInstanceId().equals(pi.getId())).findAny().get())))  
98 - .collect(Collectors.toList()); 88 + Set<String> processInstanceIdIds = tasks.parallelStream().map(t -> t.getProcessInstanceId()).collect(Collectors.toSet());
  89 +
  90 + List<ProcessInstance> processInstanceList = runtimeService.createProcessInstanceQuery().processInstanceIds(processInstanceIdIds).list();
  91 +
  92 + List<ActTaskDTO> actTaskDTOS = tasks.stream().map(t -> new ActTaskDTO(t,processInstanceList.parallelStream().filter(pi -> t.getProcessInstanceId().equals(pi.getId())).findAny().get(),
  93 + getData(processInstanceList.parallelStream().filter(pi -> t.getProcessInstanceId().equals(pi.getId())).findAny().get()))).collect(Collectors.toList());
99 94
100 list.addAll(actTaskDTOS); 95 list.addAll(actTaskDTOS);
101 } 96 }
@@ -109,19 +104,20 @@ public class ActTaskServiceImpl implements IActTaskService { @@ -109,19 +104,20 @@ public class ActTaskServiceImpl implements IActTaskService {
109 ProcessEngine pes = ProcessEngines.getDefaultProcessEngine(); 104 ProcessEngine pes = ProcessEngines.getDefaultProcessEngine();
110 HistoryService historyService = pes.getHistoryService(); 105 HistoryService historyService = pes.getHistoryService();
111 106
  107 + String username = securityManager.getAuthenticatedUserId();
112 108
113 - List<String> collect = actMapper.selectCompleteWorkByUsername(securityManager.getAuthenticatedUserId()); 109 + List<String> collect = actMapper.selectCompleteWorkByUsername(username);
114 110
115 if(collect.size() > 0){ 111 if(collect.size() > 0){
116 Set<String> set = new HashSet(collect); 112 Set<String> set = new HashSet(collect);
117 113
118 - List<HistoricProcessInstance> processInstanceList = historyService.createHistoricProcessInstanceQuery().processInstanceIds(set).list(); 114 + List<HistoricProcessInstance> processInstanceList = historyService.createHistoricProcessInstanceQuery().involvedUser(username).processInstanceIds(set).list();
119 115
120 list.setTotal(processInstanceList.size()); 116 list.setTotal(processInstanceList.size());
121 117
122 if(processInstanceList.size() > 0){ 118 if(processInstanceList.size() > 0){
123 for(HistoricProcessInstance p : processInstanceList){ 119 for(HistoricProcessInstance p : processInstanceList){
124 - ActTaskDTO actTaskDTOS = new ActTaskDTO(p,getData(p)); 120 + ActTaskDTO actTaskDTOS = new ActTaskDTO(p,getHistoryData(p));
125 121
126 getCheckData(actTaskDTOS); 122 getCheckData(actTaskDTOS);
127 123
@@ -175,13 +171,18 @@ public class ActTaskServiceImpl implements IActTaskService { @@ -175,13 +171,18 @@ public class ActTaskServiceImpl implements IActTaskService {
175 SimpleDateFormat sdFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:SS"); 171 SimpleDateFormat sdFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:SS");
176 172
177 public Map<String, String> getData(HistoricProcessInstance processInstance) { 173 public Map<String, String> getData(HistoricProcessInstance processInstance) {
178 - Map<String, String> map = actMapper.selectWorkLeaveById(processInstance.getBusinessKey()); 174 + Map<String, String> map = actMapper.selectWorkById(processInstance.getBusinessKey());
  175 + return map;
  176 + }
  177 +
  178 + public Map<String, String> getHistoryData(HistoricProcessInstance processInstance) {
  179 + Map<String, String> map = actMapper.selectHistoryWorkById(processInstance.getBusinessKey());
179 return map; 180 return map;
180 181
181 } 182 }
182 183
183 public Map<String, String> getData(ProcessInstance processInstance) { 184 public Map<String, String> getData(ProcessInstance processInstance) {
184 - Map<String, String> map = actMapper.selectWorkLeaveById(processInstance.getBusinessKey()); 185 + Map<String, String> map = actMapper.selectWorkById(processInstance.getBusinessKey());
185 return map; 186 return map;
186 } 187 }
187 188
@@ -245,4 +246,21 @@ public class ActTaskServiceImpl implements IActTaskService { @@ -245,4 +246,21 @@ public class ActTaskServiceImpl implements IActTaskService {
245 // 写入数据库 246 // 写入数据库
246 return actWorkflowFormDataService.insertActWorkflowFormDatas(acwfds); 247 return actWorkflowFormDataService.insertActWorkflowFormDatas(acwfds);
247 } 248 }
  249 +
  250 + @Override
  251 + public void deleteProcessById(String type) {
  252 + runtimeService.deleteProcessInstance(type, "删除");
  253 + }
  254 +
  255 + @Override
  256 + public void endAllThreesteptask(String type) {
  257 + List<ProcessInstance> processes = runtimeService.createProcessInstanceQuery().list();
  258 +
  259 + for(ProcessInstance proc:processes){
  260 + if(type.equals(proc.getProcessDefinitionKey())){
  261 + runtimeService.deleteProcessInstance(proc.getId(), "超时");
  262 + }
  263 + }
  264 +
  265 + }
248 } 266 }
trash-activiti/src/main/resources/mapper/activiti/ActReDeploymentMapper.xml
@@ -23,10 +23,15 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot; @@ -23,10 +23,15 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
23 </foreach> 23 </foreach>
24 </select> 24 </select>
25 25
26 - <select id="selectWorkLeaveById" parameterType="String" resultType="java.util.Map"> 26 + <select id="selectWorkById" parameterType="String" resultType="java.util.Map">
27 select start_time as startTime,end_time as endTime, reason,type from workflow where id = #{id} 27 select start_time as startTime,end_time as endTime, reason,type from workflow where id = #{id}
28 </select> 28 </select>
29 29
  30 + <select id="selectHistoryWorkById" parameterType="String" resultType="java.util.Map">
  31 + select start_time as startTime,end_time as endTime, reason,type from workflow_hi where id = #{id}
  32 + </select>
  33 +
  34 +
30 <select id="selectUnCompleteWorkByUsername" parameterType="String" resultType="java.lang.String"> 35 <select id="selectUnCompleteWorkByUsername" parameterType="String" resultType="java.lang.String">
31 select instance_id from workflow where id in (select business_key from act_workflow_formdata where create_by = #{username} GROUP BY business_key) 36 select instance_id from workflow where id in (select business_key from act_workflow_formdata where create_by = #{username} GROUP BY business_key)
32 </select> 37 </select>
trash-admin/src/main/resources/application-dev.yml
@@ -99,7 +99,7 @@ server: @@ -99,7 +99,7 @@ server:
99 port: 8080 99 port: 8080
100 servlet: 100 servlet:
101 # 应用的访问路径 101 # 应用的访问路径
102 - context-path: / 102 + context-path: /workflow
103 tomcat: 103 tomcat:
104 # tomcat的URI编码 104 # tomcat的URI编码
105 uri-encoding: UTF-8 105 uri-encoding: UTF-8
trash-admin/src/main/resources/application.yml
@@ -40,7 +40,7 @@ token: @@ -40,7 +40,7 @@ token:
40 secret: abcdefghijklmnopqrstuvwxyz 40 secret: abcdefghijklmnopqrstuvwxyz
41 # 令牌有效期(默认30分钟) 41 # 令牌有效期(默认30分钟)
42 expireTime: 30 42 expireTime: 30
43 - 43 +
44 # MyBatis配置 44 # MyBatis配置
45 mybatis: 45 mybatis:
46 # 搜索指定包别名 46 # 搜索指定包别名
@@ -64,6 +64,8 @@ swagger: @@ -64,6 +64,8 @@ swagger:
64 # 请求前缀 64 # 请求前缀
65 pathMapping: /dev-api 65 pathMapping: /dev-api
66 66
  67 +
  68 +
67 # 防止XSS攻击 69 # 防止XSS攻击
68 xss: 70 xss:
69 # 过滤开关 71 # 过滤开关
@@ -72,3 +74,5 @@ xss: @@ -72,3 +74,5 @@ xss:
72 excludes: /system/notice/* 74 excludes: /system/notice/*
73 # 匹配链接 75 # 匹配链接
74 urlPatterns: /system/*,/monitor/*,/tool/* 76 urlPatterns: /system/*,/monitor/*,/tool/*
  77 +
  78 +
75 \ No newline at end of file 79 \ No newline at end of file
trash-common/src/main/java/com/trash/common/core/controller/BaseController.java
@@ -14,6 +14,7 @@ import com.trash.common.core.page.PageDomain; @@ -14,6 +14,7 @@ import com.trash.common.core.page.PageDomain;
14 import com.trash.common.core.page.TableDataInfo; 14 import com.trash.common.core.page.TableDataInfo;
15 import com.trash.common.core.page.TableSupport; 15 import com.trash.common.core.page.TableSupport;
16 import com.trash.common.utils.DateUtils; 16 import com.trash.common.utils.DateUtils;
  17 +import com.trash.common.utils.SecurityUtils;
17 import com.trash.common.utils.StringUtils; 18 import com.trash.common.utils.StringUtils;
18 import com.trash.common.utils.sql.SqlUtil; 19 import com.trash.common.utils.sql.SqlUtil;
19 import com.github.pagehelper.PageHelper; 20 import com.github.pagehelper.PageHelper;
@@ -27,6 +28,7 @@ import com.github.pagehelper.PageInfo; @@ -27,6 +28,7 @@ import com.github.pagehelper.PageInfo;
27 public class BaseController 28 public class BaseController
28 { 29 {
29 protected final Logger logger = LoggerFactory.getLogger(BaseController.class); 30 protected final Logger logger = LoggerFactory.getLogger(BaseController.class);
  31 +
30 32
31 /** 33 /**
32 * 将前台传递过来的日期格式的字符串,自动转化为Date类型 34 * 将前台传递过来的日期格式的字符串,自动转化为Date类型
trash-daily/src/main/java/com/trash/daily/domain/PeriodicReport.java deleted 100644 → 0
1 -package com.trash.daily.domain;  
2 -  
3 -import com.fasterxml.jackson.annotation.JsonFormat;  
4 -import com.trash.common.annotation.Excel;  
5 -import com.trash.common.core.domain.BaseEntity;  
6 -import org.apache.commons.lang3.builder.ToStringBuilder;  
7 -import org.apache.commons.lang3.builder.ToStringStyle;  
8 -  
9 -import java.util.Date;  
10 -  
11 -/**  
12 - * 周期报告 PeriodicReport  
13 - *  
14 - * @author trash  
15 - * @date 2023-04-21  
16 - */  
17 -public class PeriodicReport extends BaseEntity  
18 -{  
19 - private static final long serialVersionUID = 1L;  
20 -  
21 - /** 主键id */  
22 - private Long id;  
23 -  
24 - /** 标题 */  
25 - @Excel(name = "标题")  
26 - private String headline;  
27 -  
28 - /** 填写人 */  
29 - @Excel(name = "填写人")  
30 - private String writer;  
31 -  
32 - /** 填写时间 */  
33 - @JsonFormat(pattern = "yyyy-MM-dd")  
34 - @Excel(name = "填写时间", width = 30, dateFormat = "yyyy-MM-dd")  
35 - private Date writeTime;  
36 -  
37 - /** 内容 */  
38 - private String content;  
39 -  
40 - /** 开始时间 */  
41 - private Date begintime;  
42 -  
43 - /** 结束时间 */  
44 - private Date endtime;  
45 -  
46 - /** 周报类型(1、日报2、周报3、月报) */  
47 - private Long contentType;  
48 -  
49 - public void setId(Long id)  
50 - {  
51 - this.id = id;  
52 - }  
53 -  
54 - public Long getId()  
55 - {  
56 - return id;  
57 - }  
58 - public void setHeadline(String headline)  
59 - {  
60 - this.headline = headline;  
61 - }  
62 -  
63 - public String getHeadline()  
64 - {  
65 - return headline;  
66 - }  
67 - public void setWriter(String writer)  
68 - {  
69 - this.writer = writer;  
70 - }  
71 -  
72 - public String getWriter()  
73 - {  
74 - return writer;  
75 - }  
76 - public void setWriteTime(Date writeTime)  
77 - {  
78 - this.writeTime = writeTime;  
79 - }  
80 -  
81 - public Date getWriteTime()  
82 - {  
83 - return writeTime;  
84 - }  
85 - public void setContent(String content)  
86 - {  
87 - this.content = content;  
88 - }  
89 -  
90 - public String getContent()  
91 - {  
92 - return content;  
93 - }  
94 - public void setBegintime(Date begintime)  
95 - {  
96 - this.begintime = begintime;  
97 - }  
98 -  
99 - public Date getBegintime()  
100 - {  
101 - return begintime;  
102 - }  
103 - public void setEndtime(Date endtime)  
104 - {  
105 - this.endtime = endtime;  
106 - }  
107 -  
108 - public Date getEndtime()  
109 - {  
110 - return endtime;  
111 - }  
112 - public void setContentType(Long contentType)  
113 - {  
114 - this.contentType = contentType;  
115 - }  
116 -  
117 - public Long getContentType()  
118 - {  
119 - return contentType;  
120 - }  
121 -  
122 - @Override  
123 - public String toString() {  
124 - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)  
125 - .append("id", getId())  
126 - .append("headline", getHeadline())  
127 - .append("writer", getWriter())  
128 - .append("writeTime", getWriteTime())  
129 - .append("content", getContent())  
130 - .append("begintime", getBegintime())  
131 - .append("endtime", getEndtime())  
132 - .append("contentType", getContentType())  
133 - .toString();  
134 - }  
135 -}  
136 \ No newline at end of file 0 \ No newline at end of file
trash-daily/src/main/java/com/trash/daily/mapper/DailyMapper.java deleted 100644 → 0
1 -package com.trash.daily.mapper;  
2 -  
3 -import com.trash.daily.domain.PeriodicReport;  
4 -  
5 -import java.util.List;  
6 -  
7 -/**  
8 - * 日报Mapper接口  
9 - *  
10 - * @author trash  
11 - * @date 2023-04-21  
12 - */  
13 -public interface DailyMapper  
14 -{  
15 - /**  
16 - * 查询日报  
17 - *  
18 - * @param id 日报ID  
19 - * @return 日报  
20 - */  
21 - public PeriodicReport selectDailyById(Long id);  
22 -  
23 - /**  
24 - * 查询日报列表  
25 - *  
26 - * @param periodicReport 日报  
27 - * @return 日报集合  
28 - */  
29 - public List<PeriodicReport> selectDailyList(PeriodicReport periodicReport);  
30 -  
31 - /**  
32 - * 新增日报  
33 - *  
34 - * @param periodicReport 日报  
35 - * @return 结果  
36 - */  
37 - public int insertDaily(PeriodicReport periodicReport);  
38 -  
39 - /**  
40 - * 修改日报  
41 - *  
42 - * @param periodicReport 日报  
43 - * @return 结果  
44 - */  
45 - public int updateDaily(PeriodicReport periodicReport);  
46 -  
47 - /**  
48 - * 删除日报  
49 - *  
50 - * @param id 日报ID  
51 - * @return 结果  
52 - */  
53 - public int deleteDailyById(Long id);  
54 -  
55 - /**  
56 - * 批量删除日报  
57 - *  
58 - * @param ids 需要删除的数据ID  
59 - * @return 结果  
60 - */  
61 - public int deleteDailyByIds(Long[] ids);  
62 -}  
trash-daily/src/main/java/com/trash/daily/service/IDailyService.java deleted 100644 → 0
1 -package com.trash.daily.service;  
2 -  
3 -import com.trash.daily.domain.PeriodicReport;  
4 -  
5 -import java.util.List;  
6 -  
7 -/**  
8 - * 日报Service接口  
9 - *  
10 - * @author trash  
11 - * @date 2023-04-21  
12 - */  
13 -public interface IDailyService  
14 -{  
15 - /**  
16 - * 查询日报  
17 - *  
18 - * @param id 日报ID  
19 - * @return 日报  
20 - */  
21 - public PeriodicReport selectDailyById(Long id);  
22 -  
23 - /**  
24 - * 查询日报列表  
25 - *  
26 - * @param periodicReport 日报  
27 - * @return 日报集合  
28 - */  
29 - public List<PeriodicReport> selectDailyList(PeriodicReport periodicReport);  
30 -  
31 - /**  
32 - * 新增日报  
33 - *  
34 - * @param periodicReport 日报  
35 - * @return 结果  
36 - */  
37 - public int insertDaily(PeriodicReport periodicReport);  
38 -  
39 - /**  
40 - * 修改日报  
41 - *  
42 - * @param periodicReport 日报  
43 - * @return 结果  
44 - */  
45 - public int updateDaily(PeriodicReport periodicReport);  
46 -  
47 - /**  
48 - * 删除日报  
49 - *  
50 - * @param id 日报ID  
51 - * @return 结果  
52 - */  
53 - public int deleteDailyById(Long id);  
54 -  
55 - /**  
56 - * 批量删除日报  
57 - *  
58 - * @param ids 需要删除的数据ID  
59 - * @return 结果  
60 - */  
61 - public int deleteDailyByIds(Long[] ids);  
62 -}  
trash-daily/src/main/java/com/trash/information_sharing/controller/InformationSharingController.java
@@ -5,6 +5,7 @@ import com.trash.common.core.controller.BaseController; @@ -5,6 +5,7 @@ import com.trash.common.core.controller.BaseController;
5 import com.trash.common.core.domain.AjaxResult; 5 import com.trash.common.core.domain.AjaxResult;
6 import com.trash.common.core.page.TableDataInfo; 6 import com.trash.common.core.page.TableDataInfo;
7 import com.trash.common.enums.BusinessType; 7 import com.trash.common.enums.BusinessType;
  8 +import com.trash.common.utils.SecurityUtils;
8 import com.trash.common.utils.poi.ExcelUtil; 9 import com.trash.common.utils.poi.ExcelUtil;
9 import com.trash.information_sharing.domain.InformationSharing; 10 import com.trash.information_sharing.domain.InformationSharing;
10 import com.trash.information_sharing.service.IInformationSharingService; 11 import com.trash.information_sharing.service.IInformationSharingService;
@@ -35,6 +36,7 @@ public class InformationSharingController extends BaseController @@ -35,6 +36,7 @@ public class InformationSharingController extends BaseController
35 public TableDataInfo list(InformationSharing informationSharing) 36 public TableDataInfo list(InformationSharing informationSharing)
36 { 37 {
37 startPage(); 38 startPage();
  39 + informationSharing.setCreateBy(SecurityUtils.getUsername());
38 List<InformationSharing> list = informationSharingService.selectInformationSharingList(informationSharing); 40 List<InformationSharing> list = informationSharingService.selectInformationSharingList(informationSharing);
39 return getDataTable(list); 41 return getDataTable(list);
40 } 42 }
trash-daily/src/main/java/com/trash/information_sharing/domain/InformationSharing.java
@@ -42,6 +42,8 @@ public class InformationSharing extends BaseEntity @@ -42,6 +42,8 @@ public class InformationSharing extends BaseEntity
42 42
43 /** 资料 */ 43 /** 资料 */
44 private String informationLink; 44 private String informationLink;
  45 +
  46 + private String createBy;
45 47
46 public void setId(Long id) 48 public void setId(Long id)
47 { 49 {
@@ -106,8 +108,18 @@ public class InformationSharing extends BaseEntity @@ -106,8 +108,18 @@ public class InformationSharing extends BaseEntity
106 { 108 {
107 return informationLink; 109 return informationLink;
108 } 110 }
  111 +
  112 +
109 113
110 - @Override 114 + public String getCreateBy() {
  115 + return createBy;
  116 + }
  117 +
  118 + public void setCreateBy(String createBy) {
  119 + this.createBy = createBy;
  120 + }
  121 +
  122 + @Override
111 public String toString() { 123 public String toString() {
112 return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) 124 return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
113 .append("id", getId()) 125 .append("id", getId())
trash-daily/src/main/java/com/trash/information_sharing/service/impl/InformationSharingServiceImpl.java
1 package com.trash.information_sharing.service.impl; 1 package com.trash.information_sharing.service.impl;
2 2
  3 +import com.trash.common.utils.SecurityUtils;
3 import com.trash.information_sharing.domain.InformationSharing; 4 import com.trash.information_sharing.domain.InformationSharing;
4 import com.trash.information_sharing.mapper.InformationSharingMapper; 5 import com.trash.information_sharing.mapper.InformationSharingMapper;
5 import com.trash.information_sharing.service.IInformationSharingService; 6 import com.trash.information_sharing.service.IInformationSharingService;
@@ -41,6 +42,7 @@ public class InformationSharingServiceImpl implements IInformationSharingService @@ -41,6 +42,7 @@ public class InformationSharingServiceImpl implements IInformationSharingService
41 @Override 42 @Override
42 public List<InformationSharing> selectInformationSharingList(InformationSharing informationSharing) 43 public List<InformationSharing> selectInformationSharingList(InformationSharing informationSharing)
43 { 44 {
  45 + informationSharing.setCreateBy(SecurityUtils.getUsername());
44 return informationSharingMapper.selectInformationSharingList(informationSharing); 46 return informationSharingMapper.selectInformationSharingList(informationSharing);
45 } 47 }
46 48
@@ -52,7 +54,8 @@ public class InformationSharingServiceImpl implements IInformationSharingService @@ -52,7 +54,8 @@ public class InformationSharingServiceImpl implements IInformationSharingService
52 */ 54 */
53 @Override 55 @Override
54 public int insertInformationSharing(InformationSharing informationSharing) 56 public int insertInformationSharing(InformationSharing informationSharing)
55 - { 57 + {
  58 + informationSharing.setCreateBy(SecurityUtils.getUsername());
56 return informationSharingMapper.insertInformationSharing(informationSharing); 59 return informationSharingMapper.insertInformationSharing(informationSharing);
57 } 60 }
58 61
trash-daily/src/main/java/com/trash/monthly/mapper/MonthlyReportMapper.java deleted 100644 → 0
1 -package com.trash.monthly.mapper;  
2 -  
3 -import com.trash.daily.domain.PeriodicReport;  
4 -  
5 -import java.util.List;  
6 -  
7 -/**  
8 - * 月报Mapper接口  
9 - *  
10 - * @author trash  
11 - * @date 2023-04-21  
12 - */  
13 -public interface MonthlyReportMapper  
14 -{  
15 - /**  
16 - * 查询月报  
17 - *  
18 - * @param id 月报ID  
19 - * @return 月报  
20 - */  
21 - public PeriodicReport selectMonthlyReportById(Long id);  
22 -  
23 - /**  
24 - * 查询月报列表  
25 - *  
26 - * @param monthlyReport 月报  
27 - * @return 月报集合  
28 - */  
29 - public List<PeriodicReport> selectMonthlyReportList(PeriodicReport monthlyReport);  
30 -  
31 - /**  
32 - * 新增月报  
33 - *  
34 - * @param monthlyReport 月报  
35 - * @return 结果  
36 - */  
37 - public int insertMonthlyReport(PeriodicReport monthlyReport);  
38 -  
39 - /**  
40 - * 修改月报  
41 - *  
42 - * @param monthlyReport 月报  
43 - * @return 结果  
44 - */  
45 - public int updateMonthlyReport(PeriodicReport monthlyReport);  
46 -  
47 - /**  
48 - * 删除月报  
49 - *  
50 - * @param id 月报ID  
51 - * @return 结果  
52 - */  
53 - public int deleteMonthlyReportById(Long id);  
54 -  
55 - /**  
56 - * 批量删除月报  
57 - *  
58 - * @param ids 需要删除的数据ID  
59 - * @return 结果  
60 - */  
61 - public int deleteMonthlyReportByIds(Long[] ids);  
62 -}  
trash-daily/src/main/java/com/trash/monthly/service/IMonthlyReportService.java deleted 100644 → 0
1 -package com.trash.monthly.service;  
2 -  
3 -import com.trash.daily.domain.PeriodicReport;  
4 -  
5 -import java.util.List;  
6 -  
7 -/**  
8 - * 月报Service接口  
9 - *  
10 - * @author trash  
11 - * @date 2023-04-21  
12 - */  
13 -public interface IMonthlyReportService  
14 -{  
15 - /**  
16 - * 查询月报  
17 - *  
18 - * @param id 月报ID  
19 - * @return 月报  
20 - */  
21 - public PeriodicReport selectMonthlyReportById(Long id);  
22 -  
23 - /**  
24 - * 查询月报列表  
25 - *  
26 - * @param monthlyReport 月报  
27 - * @return 月报集合  
28 - */  
29 - public List<PeriodicReport> selectMonthlyReportList(PeriodicReport monthlyReport);  
30 -  
31 - /**  
32 - * 新增月报  
33 - *  
34 - * @param monthlyReport 月报  
35 - * @return 结果  
36 - */  
37 - public int insertMonthlyReport(PeriodicReport monthlyReport);  
38 -  
39 - /**  
40 - * 修改月报  
41 - *  
42 - * @param monthlyReport 月报  
43 - * @return 结果  
44 - */  
45 - public int updateMonthlyReport(PeriodicReport monthlyReport);  
46 -  
47 - /**  
48 - * 删除月报  
49 - *  
50 - * @param id 月报ID  
51 - * @return 结果  
52 - */  
53 - public int deleteMonthlyReportById(Long id);  
54 -  
55 - /**  
56 - * 批量删除月报  
57 - *  
58 - * @param ids 需要删除的数据ID  
59 - * @return 结果  
60 - */  
61 - public int deleteMonthlyReportByIds(Long[] ids);  
62 -}  
trash-daily/src/main/java/com/trash/report/controller/WorkReportController.java
@@ -5,6 +5,7 @@ import com.trash.common.core.controller.BaseController; @@ -5,6 +5,7 @@ import com.trash.common.core.controller.BaseController;
5 import com.trash.common.core.domain.AjaxResult; 5 import com.trash.common.core.domain.AjaxResult;
6 import com.trash.common.core.page.TableDataInfo; 6 import com.trash.common.core.page.TableDataInfo;
7 import com.trash.common.enums.BusinessType; 7 import com.trash.common.enums.BusinessType;
  8 +import com.trash.common.utils.SecurityUtils;
8 import com.trash.common.utils.poi.ExcelUtil; 9 import com.trash.common.utils.poi.ExcelUtil;
9 import com.trash.report.domain.WorkReport; 10 import com.trash.report.domain.WorkReport;
10 import com.trash.report.service.IWorkReportService; 11 import com.trash.report.service.IWorkReportService;
@@ -12,6 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired; @@ -12,6 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired;
12 import org.springframework.security.access.prepost.PreAuthorize; 13 import org.springframework.security.access.prepost.PreAuthorize;
13 import org.springframework.web.bind.annotation.*; 14 import org.springframework.web.bind.annotation.*;
14 15
  16 +import java.util.Date;
15 import java.util.List; 17 import java.util.List;
16 18
17 /** 19 /**
@@ -35,6 +37,7 @@ public class WorkReportController extends BaseController @@ -35,6 +37,7 @@ public class WorkReportController extends BaseController
35 public TableDataInfo list(WorkReport workReport) 37 public TableDataInfo list(WorkReport workReport)
36 { 38 {
37 startPage(); 39 startPage();
  40 + workReport.setCreateBy(SecurityUtils.getUsername());
38 List<WorkReport> list = workReportService.selectWorkReportList(workReport); 41 List<WorkReport> list = workReportService.selectWorkReportList(workReport);
39 return getDataTable(list); 42 return getDataTable(list);
40 } 43 }
@@ -69,7 +72,9 @@ public class WorkReportController extends BaseController @@ -69,7 +72,9 @@ public class WorkReportController extends BaseController
69 @Log(title = "工作日报", businessType = BusinessType.INSERT) 72 @Log(title = "工作日报", businessType = BusinessType.INSERT)
70 @PostMapping 73 @PostMapping
71 public AjaxResult add(@RequestBody WorkReport workReport) 74 public AjaxResult add(@RequestBody WorkReport workReport)
72 - { 75 + {
  76 + workReport.setCreateBy(SecurityUtils.getUsername());
  77 + workReport.setCreateTime(new Date());
73 return toAjax(workReportService.insertWorkReport(workReport)); 78 return toAjax(workReportService.insertWorkReport(workReport));
74 } 79 }
75 80
trash-daily/src/main/java/com/trash/report/domain/WorkReport.java
@@ -23,7 +23,7 @@ public class WorkReport extends BaseEntity @@ -23,7 +23,7 @@ public class WorkReport extends BaseEntity
23 23
24 /** 标题 */ 24 /** 标题 */
25 @Excel(name = "标题") 25 @Excel(name = "标题")
26 - private String weeklyTitle; 26 + private String title;
27 27
28 /** 填写人 */ 28 /** 填写人 */
29 @Excel(name = "填写人") 29 @Excel(name = "填写人")
@@ -33,8 +33,59 @@ public class WorkReport extends BaseEntity @@ -33,8 +33,59 @@ public class WorkReport extends BaseEntity
33 @JsonFormat(pattern = "yyyy-MM-dd") 33 @JsonFormat(pattern = "yyyy-MM-dd")
34 @Excel(name = "填写时间", width = 30, dateFormat = "yyyy-MM-dd") 34 @Excel(name = "填写时间", width = 30, dateFormat = "yyyy-MM-dd")
35 private Date writeTime; 35 private Date writeTime;
  36 +
  37 + int type;
  38 +
  39 + private String startTime;
  40 + private String endTime;
36 41
37 - /** 报表内容 */ 42 + private Date createTime;
  43 +
  44 + private String attachmentLink;
  45 +
  46 +
  47 +
  48 + public String getAttachmentLink() {
  49 + return attachmentLink;
  50 + }
  51 +
  52 + public void setAttachmentLink(String attachmentLink) {
  53 + this.attachmentLink = attachmentLink;
  54 + }
  55 +
  56 + public Date getCreateTime() {
  57 + return createTime;
  58 + }
  59 +
  60 + public void setCreateTime(Date createTime) {
  61 + this.createTime = createTime;
  62 + }
  63 +
  64 + public int getType() {
  65 + return type;
  66 + }
  67 +
  68 + public void setType(int type) {
  69 + this.type = type;
  70 + }
  71 +
  72 + public String getStartTime() {
  73 + return startTime;
  74 + }
  75 +
  76 + public void setStartTime(String startTime) {
  77 + this.startTime = startTime;
  78 + }
  79 +
  80 + public String getEndTime() {
  81 + return endTime;
  82 + }
  83 +
  84 + public void setEndTime(String endTime) {
  85 + this.endTime = endTime;
  86 + }
  87 +
  88 + /** 报表内容 */
38 private String reportContent; 89 private String reportContent;
39 90
40 public void setId(Long id) 91 public void setId(Long id)
@@ -46,14 +97,14 @@ public class WorkReport extends BaseEntity @@ -46,14 +97,14 @@ public class WorkReport extends BaseEntity
46 { 97 {
47 return id; 98 return id;
48 } 99 }
49 - public void setWeeklyTitle(String weeklyTitle) 100 + public void setTitle(String title)
50 { 101 {
51 - this.weeklyTitle = weeklyTitle; 102 + this.title = title;
52 } 103 }
53 104
54 - public String getWeeklyTitle() 105 + public String getTitle()
55 { 106 {
56 - return weeklyTitle; 107 + return title;
57 } 108 }
58 public void setWriter(String writer) 109 public void setWriter(String writer)
59 { 110 {
@@ -87,7 +138,7 @@ public class WorkReport extends BaseEntity @@ -87,7 +138,7 @@ public class WorkReport extends BaseEntity
87 public String toString() { 138 public String toString() {
88 return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) 139 return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
89 .append("id", getId()) 140 .append("id", getId())
90 - .append("weeklyTitle", getWeeklyTitle()) 141 + .append("weeklyTitle", getTitle())
91 .append("writer", getWriter()) 142 .append("writer", getWriter())
92 .append("writeTime", getWriteTime()) 143 .append("writeTime", getWriteTime())
93 .append("reportContent", getReportContent()) 144 .append("reportContent", getReportContent())
trash-daily/src/main/java/com/trash/situation/controller/DailySituationController.java
@@ -5,6 +5,7 @@ import com.trash.common.core.controller.BaseController; @@ -5,6 +5,7 @@ import com.trash.common.core.controller.BaseController;
5 import com.trash.common.core.domain.AjaxResult; 5 import com.trash.common.core.domain.AjaxResult;
6 import com.trash.common.core.page.TableDataInfo; 6 import com.trash.common.core.page.TableDataInfo;
7 import com.trash.common.enums.BusinessType; 7 import com.trash.common.enums.BusinessType;
  8 +import com.trash.common.utils.SecurityUtils;
8 import com.trash.common.utils.poi.ExcelUtil; 9 import com.trash.common.utils.poi.ExcelUtil;
9 import com.trash.situation.domain.DailySituation; 10 import com.trash.situation.domain.DailySituation;
10 import com.trash.situation.service.IDailySituationService; 11 import com.trash.situation.service.IDailySituationService;
@@ -12,6 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired; @@ -12,6 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired;
12 import org.springframework.security.access.prepost.PreAuthorize; 13 import org.springframework.security.access.prepost.PreAuthorize;
13 import org.springframework.web.bind.annotation.*; 14 import org.springframework.web.bind.annotation.*;
14 15
  16 +import java.util.Date;
15 import java.util.List; 17 import java.util.List;
16 18
17 /** 19 /**
@@ -35,6 +37,7 @@ public class DailySituationController extends BaseController @@ -35,6 +37,7 @@ public class DailySituationController extends BaseController
35 public TableDataInfo list(DailySituation dailySituation) 37 public TableDataInfo list(DailySituation dailySituation)
36 { 38 {
37 startPage(); 39 startPage();
  40 + dailySituation.setCreateBy(SecurityUtils.getUsername());
38 List<DailySituation> list = dailySituationService.selectDailySituationList(dailySituation); 41 List<DailySituation> list = dailySituationService.selectDailySituationList(dailySituation);
39 return getDataTable(list); 42 return getDataTable(list);
40 } 43 }
@@ -70,6 +73,8 @@ public class DailySituationController extends BaseController @@ -70,6 +73,8 @@ public class DailySituationController extends BaseController
70 @PostMapping 73 @PostMapping
71 public AjaxResult add(@RequestBody DailySituation dailySituation) 74 public AjaxResult add(@RequestBody DailySituation dailySituation)
72 { 75 {
  76 + dailySituation.setCreateBy(SecurityUtils.getUsername());
  77 + dailySituation.setCreateTime(new Date());
73 return toAjax(dailySituationService.insertDailySituation(dailySituation)); 78 return toAjax(dailySituationService.insertDailySituation(dailySituation));
74 } 79 }
75 80
trash-daily/src/main/java/com/trash/toollist/controller/DailyToolListController.java
@@ -5,6 +5,7 @@ import com.trash.common.core.controller.BaseController; @@ -5,6 +5,7 @@ import com.trash.common.core.controller.BaseController;
5 import com.trash.common.core.domain.AjaxResult; 5 import com.trash.common.core.domain.AjaxResult;
6 import com.trash.common.core.page.TableDataInfo; 6 import com.trash.common.core.page.TableDataInfo;
7 import com.trash.common.enums.BusinessType; 7 import com.trash.common.enums.BusinessType;
  8 +import com.trash.common.utils.SecurityUtils;
8 import com.trash.common.utils.poi.ExcelUtil; 9 import com.trash.common.utils.poi.ExcelUtil;
9 import com.trash.toollist.domain.DailyToolList; 10 import com.trash.toollist.domain.DailyToolList;
10 import com.trash.toollist.service.IDailyToolListService; 11 import com.trash.toollist.service.IDailyToolListService;
@@ -12,6 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired; @@ -12,6 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired;
12 import org.springframework.security.access.prepost.PreAuthorize; 13 import org.springframework.security.access.prepost.PreAuthorize;
13 import org.springframework.web.bind.annotation.*; 14 import org.springframework.web.bind.annotation.*;
14 15
  16 +import java.util.Date;
15 import java.util.List; 17 import java.util.List;
16 18
17 /** 19 /**
@@ -35,6 +37,7 @@ public class DailyToolListController extends BaseController @@ -35,6 +37,7 @@ public class DailyToolListController extends BaseController
35 public TableDataInfo list(DailyToolList dailyToolList) 37 public TableDataInfo list(DailyToolList dailyToolList)
36 { 38 {
37 startPage(); 39 startPage();
  40 + dailyToolList.setCreateBy(SecurityUtils.getUsername());
38 List<DailyToolList> list = dailyToolListService.selectDailyToolListList(dailyToolList); 41 List<DailyToolList> list = dailyToolListService.selectDailyToolListList(dailyToolList);
39 return getDataTable(list); 42 return getDataTable(list);
40 } 43 }
@@ -69,7 +72,10 @@ public class DailyToolListController extends BaseController @@ -69,7 +72,10 @@ public class DailyToolListController extends BaseController
69 @Log(title = "每日工作清单", businessType = BusinessType.INSERT) 72 @Log(title = "每日工作清单", businessType = BusinessType.INSERT)
70 @PostMapping 73 @PostMapping
71 public AjaxResult add(@RequestBody DailyToolList dailyToolList) 74 public AjaxResult add(@RequestBody DailyToolList dailyToolList)
72 - { 75 + {
  76 +
  77 + dailyToolList.setCreateBy(SecurityUtils.getUsername());
  78 + dailyToolList.setCreateTime(new Date());
73 return toAjax(dailyToolListService.insertDailyToolList(dailyToolList)); 79 return toAjax(dailyToolListService.insertDailyToolList(dailyToolList));
74 } 80 }
75 81
trash-daily/src/main/java/com/trash/weekly/controller/WeeklyController.java deleted 100644 → 0
1 -package com.trash.weekly.controller;  
2 -  
3 -import com.trash.common.annotation.Log;  
4 -import com.trash.common.core.controller.BaseController;  
5 -import com.trash.common.core.domain.AjaxResult;  
6 -import com.trash.common.core.page.TableDataInfo;  
7 -import com.trash.common.enums.BusinessType;  
8 -import com.trash.common.utils.poi.ExcelUtil;  
9 -import com.trash.daily.domain.PeriodicReport;  
10 -import com.trash.weekly.service.IWeeklyService;  
11 -import org.springframework.beans.factory.annotation.Autowired;  
12 -import org.springframework.security.access.prepost.PreAuthorize;  
13 -import org.springframework.web.bind.annotation.*;  
14 -  
15 -import java.util.List;  
16 -  
17 -/**  
18 - * 周报Controller  
19 - *  
20 - * @author trash  
21 - * @date 2023-04-23  
22 - */  
23 -@RestController  
24 -@RequestMapping("/report/weekly")  
25 -public class WeeklyController extends BaseController  
26 -{  
27 - @Autowired  
28 - private IWeeklyService weeklyService;  
29 -  
30 - /**  
31 - * 查询周报列表  
32 - */  
33 - @PreAuthorize("@ss.hasPermi('report:weekly:list')")  
34 - @GetMapping("/list")  
35 - public TableDataInfo list(PeriodicReport periodicReport)  
36 - {  
37 - startPage();  
38 - List<PeriodicReport> list = weeklyService.selectWeeklyList(periodicReport);  
39 - return getDataTable(list);  
40 - }  
41 -  
42 - /**  
43 - * 导出周报列表  
44 - */  
45 - @PreAuthorize("@ss.hasPermi('report:weekly:export')")  
46 - @Log(title = "周报", businessType = BusinessType.EXPORT)  
47 - @GetMapping("/export")  
48 - public AjaxResult export(PeriodicReport periodicReport)  
49 - {  
50 - List<PeriodicReport> list = weeklyService.selectWeeklyList(periodicReport);  
51 - ExcelUtil<PeriodicReport> util = new ExcelUtil<PeriodicReport>(PeriodicReport.class);  
52 - return util.exportExcel(list, "weekly");  
53 - }  
54 -  
55 - /**  
56 - * 获取周报详细信息  
57 - */  
58 - @PreAuthorize("@ss.hasPermi('report:weekly:query')")  
59 - @GetMapping(value = "/{id}")  
60 - public AjaxResult getInfo(@PathVariable("id") Long id)  
61 - {  
62 - return AjaxResult.success(weeklyService.selectWeeklyById(id));  
63 - }  
64 -  
65 - /**  
66 - * 新增周报  
67 - */  
68 - @PreAuthorize("@ss.hasPermi('report:weekly:add')")  
69 - @Log(title = "周报", businessType = BusinessType.INSERT)  
70 - @PostMapping  
71 - public AjaxResult add(@RequestBody PeriodicReport periodicReport)  
72 - {  
73 - return toAjax(weeklyService.insertWeekly(periodicReport));  
74 - }  
75 -  
76 - /**  
77 - * 修改周报  
78 - */  
79 - @PreAuthorize("@ss.hasPermi('report:weekly:edit')")  
80 - @Log(title = "周报", businessType = BusinessType.UPDATE)  
81 - @PutMapping  
82 - public AjaxResult edit(@RequestBody PeriodicReport periodicReport)  
83 - {  
84 - return toAjax(weeklyService.updateWeekly(periodicReport));  
85 - }  
86 -  
87 - /**  
88 - * 删除周报  
89 - */  
90 - @PreAuthorize("@ss.hasPermi('report:weekly:remove')")  
91 - @Log(title = "周报", businessType = BusinessType.DELETE)  
92 - @DeleteMapping("/{ids}")  
93 - public AjaxResult remove(@PathVariable Long[] ids)  
94 - {  
95 - return toAjax(weeklyService.deleteWeeklyByIds(ids));  
96 - }  
97 -}  
98 \ No newline at end of file 0 \ No newline at end of file
trash-daily/src/main/java/com/trash/weekly/service/impl/WeeklyServiceImpl.java deleted 100644 → 0
1 -package com.trash.weekly.service.impl;  
2 -  
3 -import com.trash.daily.domain.PeriodicReport;  
4 -import com.trash.weekly.mapper.WeeklyMapper;  
5 -import com.trash.weekly.service.IWeeklyService;  
6 -import org.springframework.beans.factory.annotation.Autowired;  
7 -import org.springframework.stereotype.Service;  
8 -  
9 -import java.util.List;  
10 -  
11 -/**  
12 - * 周报Service业务层处理  
13 - *  
14 - * @author trash  
15 - * @date 2023-04-21  
16 - */  
17 -@Service  
18 -public class WeeklyServiceImpl implements IWeeklyService  
19 -{  
20 - @Autowired  
21 - private WeeklyMapper weeklyMapper;  
22 -  
23 - /**  
24 - * 查询周报  
25 - *  
26 - * @param id 周报ID  
27 - * @return 周报  
28 - */  
29 - @Override  
30 - public PeriodicReport selectWeeklyById(Long id)  
31 - {  
32 - return weeklyMapper.selectWeeklyById(id);  
33 - }  
34 -  
35 - /**  
36 - * 查询周报列表  
37 - *  
38 - * @param weekly 周报  
39 - * @return 周报  
40 - */  
41 - @Override  
42 - public List<PeriodicReport> selectWeeklyList(PeriodicReport weekly)  
43 - {  
44 - return weeklyMapper.selectWeeklyList(weekly);  
45 - }  
46 -  
47 - /**  
48 - * 新增周报  
49 - *  
50 - * @param weekly 周报  
51 - * @return 结果  
52 - */  
53 - @Override  
54 - public int insertWeekly(PeriodicReport weekly)  
55 - {  
56 - return weeklyMapper.insertWeekly(weekly);  
57 - }  
58 -  
59 - /**  
60 - * 修改周报  
61 - *  
62 - * @param weekly 周报  
63 - * @return 结果  
64 - */  
65 - @Override  
66 - public int updateWeekly(PeriodicReport weekly)  
67 - {  
68 - return weeklyMapper.updateWeekly(weekly);  
69 - }  
70 -  
71 - /**  
72 - * 批量删除周报  
73 - *  
74 - * @param ids 需要删除的周报ID  
75 - * @return 结果  
76 - */  
77 - @Override  
78 - public int deleteWeeklyByIds(Long[] ids)  
79 - {  
80 - return weeklyMapper.deleteWeeklyByIds(ids);  
81 - }  
82 -  
83 - /**  
84 - * 删除周报信息  
85 - *  
86 - * @param id 周报ID  
87 - * @return 结果  
88 - */  
89 - @Override  
90 - public int deleteWeeklyById(Long id)  
91 - {  
92 - return weeklyMapper.deleteWeeklyById(id);  
93 - }  
94 -}  
trash-daily/src/main/resources/mapper/daily/DailyMapper.xml deleted 100644 → 0
1 -<?xml version="1.0" encoding="UTF-8" ?>  
2 -<!DOCTYPE mapper  
3 - PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"  
4 - "http://mybatis.org/dtd/mybatis-3-mapper.dtd">  
5 -<mapper namespace="com.trash.daily.mapper.DailyMapper">  
6 -  
7 - <resultMap type="PeriodicReport" id="PeriodicReportResult">  
8 - <result property="id" column="id" />  
9 - <result property="headline" column="headline" />  
10 - <result property="writer" column="writer" />  
11 - <result property="writeTime" column="write_time" />  
12 - <result property="content" column="content" />  
13 - <result property="begintime" column="beginTime" />  
14 - <result property="endtime" column="endTime" />  
15 - <result property="contentType" column="content_type" />  
16 - </resultMap>  
17 -  
18 - <sql id="selectDailyVo">  
19 - select id, headline, writer, write_time, content, beginTime, endTime, content_type from periodic_report  
20 - </sql>  
21 -  
22 - <select id="selectDailyList" parameterType="PeriodicReport" resultMap="PeriodicReportResult">  
23 - <include refid="selectDailyVo"/>  
24 - <where>  
25 - <if test="headline != null and headline != ''"> and headline = #{headline}</if>  
26 - and content_type = 1  
27 - </where>  
28 - </select>  
29 -  
30 - <select id="selectDailyById" parameterType="Long" resultMap="PeriodicReportResult">  
31 - <include refid="selectDailyVo"/>  
32 - where id = #{id}  
33 - </select>  
34 -  
35 - <insert id="insertDaily" parameterType="PeriodicReport" useGeneratedKeys="true" keyProperty="id">  
36 - insert into periodic_report  
37 - <trim prefix="(" suffix=")" suffixOverrides=",">  
38 - <if test="headline != null">headline,</if>  
39 - <if test="writer != null">writer,</if>  
40 - <if test="writeTime != null">write_time,</if>  
41 - <if test="content != null">content,</if>  
42 - <if test="begintime != null">beginTime,</if>  
43 - <if test="endtime != null">endTime,</if>  
44 - content_type  
45 - </trim>  
46 - <trim prefix="values (" suffix=")" suffixOverrides=",">  
47 - <if test="headline != null">#{headline},</if>  
48 - <if test="writer != null">#{writer},</if>  
49 - <if test="writeTime != null">#{writeTime},</if>  
50 - <if test="content != null">#{content},</if>  
51 - <if test="begintime != null">#{begintime},</if>  
52 - <if test="endtime != null">#{endtime},</if>  
53 - 1  
54 - </trim>  
55 - </insert>  
56 -  
57 - <update id="updateDaily" parameterType="PeriodicReport">  
58 - update periodic_report  
59 - <trim prefix="SET" suffixOverrides=",">  
60 - <if test="headline != null">headline = #{headline},</if>  
61 - <if test="writer != null">writer = #{writer},</if>  
62 - <if test="writeTime != null">write_time = #{writeTime},</if>  
63 - <if test="content != null">content = #{content},</if>  
64 - <if test="begintime != null">beginTime = #{begintime},</if>  
65 - <if test="endtime != null">endTime = #{endtime},</if>  
66 - <if test="contentType != null">content_type = #{contentType},</if>  
67 - </trim>  
68 - where id = #{id}  
69 - </update>  
70 -  
71 - <delete id="deleteDailyById" parameterType="Long">  
72 - delete from periodic_report where id = #{id}  
73 - </delete>  
74 -  
75 - <delete id="deleteDailyByIds" parameterType="String">  
76 - delete from periodic_report where id in  
77 - <foreach item="id" collection="array" open="(" separator="," close=")">  
78 - #{id}  
79 - </foreach>  
80 - </delete>  
81 -</mapper>  
82 \ No newline at end of file 0 \ No newline at end of file
trash-daily/src/main/resources/mapper/information_sharing/InformationSharingMapper.xml
@@ -12,10 +12,11 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot; @@ -12,10 +12,11 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
12 <result property="retrieveContent" column="retrieve_content" /> 12 <result property="retrieveContent" column="retrieve_content" />
13 <result property="attachmentLink" column="attachment_link" /> 13 <result property="attachmentLink" column="attachment_link" />
14 <result property="informationLink" column="information_link" /> 14 <result property="informationLink" column="information_link" />
  15 + <result property="createBy" column="create_by" />
15 </resultMap> 16 </resultMap>
16 17
17 <sql id="selectInformationSharingVo"> 18 <sql id="selectInformationSharingVo">
18 - select id, data_header, retrieve_department, retrieve_time, retrieve_content, attachment_link, information_link from information_sharing 19 + select id, data_header, retrieve_department, retrieve_time, retrieve_content, attachment_link, information_link,create_by from information_sharing
19 </sql> 20 </sql>
20 21
21 <select id="selectInformationSharingList" parameterType="InformationSharing" resultMap="InformationSharingResult"> 22 <select id="selectInformationSharingList" parameterType="InformationSharing" resultMap="InformationSharingResult">
@@ -23,8 +24,11 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot; @@ -23,8 +24,11 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
23 <where> 24 <where>
24 <if test="dataHeader != null and dataHeader != ''"> and data_header like concat('%', #{dataHeader}, '%')</if> 25 <if test="dataHeader != null and dataHeader != ''"> and data_header like concat('%', #{dataHeader}, '%')</if>
25 <if test="retrieveDepartment != null and retrieveDepartment != ''"> and retrieve_department like concat('%', #{retrieveDepartment}, '%')</if> 26 <if test="retrieveDepartment != null and retrieveDepartment != ''"> and retrieve_department like concat('%', #{retrieveDepartment}, '%')</if>
  27 + <if test="createBy != null and createBy != ''"> and create_by = #{createBy}</if>
26 </where> 28 </where>
27 - </select> 29 +
  30 + ORDER BY retrieve_time DESC
  31 + </select>
28 32
29 <select id="selectInformationSharingById" parameterType="Long" resultMap="InformationSharingResult"> 33 <select id="selectInformationSharingById" parameterType="Long" resultMap="InformationSharingResult">
30 <include refid="selectInformationSharingVo"/> 34 <include refid="selectInformationSharingVo"/>
@@ -40,6 +44,7 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot; @@ -40,6 +44,7 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
40 <if test="retrieveContent != null">retrieve_content,</if> 44 <if test="retrieveContent != null">retrieve_content,</if>
41 <if test="attachmentLink != null">attachment_link,</if> 45 <if test="attachmentLink != null">attachment_link,</if>
42 <if test="informationLink != null">information_link,</if> 46 <if test="informationLink != null">information_link,</if>
  47 + <if test="createBy != null">create_by,</if>
43 </trim> 48 </trim>
44 <trim prefix="values (" suffix=")" suffixOverrides=","> 49 <trim prefix="values (" suffix=")" suffixOverrides=",">
45 <if test="dataHeader != null">#{dataHeader},</if> 50 <if test="dataHeader != null">#{dataHeader},</if>
@@ -48,6 +53,7 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot; @@ -48,6 +53,7 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
48 <if test="retrieveContent != null">#{retrieveContent},</if> 53 <if test="retrieveContent != null">#{retrieveContent},</if>
49 <if test="attachmentLink != null">#{attachmentLink},</if> 54 <if test="attachmentLink != null">#{attachmentLink},</if>
50 <if test="informationLink != null">#{informationLink},</if> 55 <if test="informationLink != null">#{informationLink},</if>
  56 + <if test="createBy != null">#{createBy},</if>
51 </trim> 57 </trim>
52 </insert> 58 </insert>
53 59
@@ -60,6 +66,7 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot; @@ -60,6 +66,7 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
60 <if test="retrieveContent != null">retrieve_content = #{retrieveContent},</if> 66 <if test="retrieveContent != null">retrieve_content = #{retrieveContent},</if>
61 <if test="attachmentLink != null">attachment_link = #{attachmentLink},</if> 67 <if test="attachmentLink != null">attachment_link = #{attachmentLink},</if>
62 <if test="informationLink != null">information_link = #{informationLink},</if> 68 <if test="informationLink != null">information_link = #{informationLink},</if>
  69 + <if test="createBy != null">create_by = #{createBy},</if>
63 </trim> 70 </trim>
64 where id = #{id} 71 where id = #{id}
65 </update> 72 </update>
trash-daily/src/main/resources/mapper/monthly/MonthlyReportMapper.xml deleted 100644 → 0
1 -<?xml version="1.0" encoding="UTF-8" ?>  
2 -<!DOCTYPE mapper  
3 - PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"  
4 - "http://mybatis.org/dtd/mybatis-3-mapper.dtd">  
5 -<mapper namespace="com.trash.monthly.mapper.MonthlyReportMapper">  
6 -  
7 - <resultMap type="PeriodicReport" id="PeriodicReportResult">  
8 - <result property="id" column="id" />  
9 - <result property="headline" column="headline" />  
10 - <result property="writer" column="writer" />  
11 - <result property="writeTime" column="write_time" />  
12 - <result property="content" column="content" />  
13 - <result property="begintime" column="beginTime" />  
14 - <result property="endtime" column="endTime" />  
15 - <result property="contentType" column="content_type" />  
16 - </resultMap>  
17 -  
18 - <sql id="selectMonthlyReportVo">  
19 - select id, headline, writer, write_time, content, beginTime, endTime, content_type from periodic_report  
20 - </sql>  
21 -  
22 - <select id="selectMonthlyReportList" parameterType="PeriodicReport" resultMap="PeriodicReportResult">  
23 - <include refid="selectMonthlyReportVo"/>  
24 - <where>  
25 - <if test="headline != null and headline != ''"> and headline = #{headline}</if>  
26 - and content_type = 3  
27 - </where>  
28 - </select>  
29 -  
30 - <select id="selectMonthlyReportById" parameterType="Long" resultMap="PeriodicReportResult">  
31 - <include refid="selectMonthlyReportVo"/>  
32 - where id = #{id}  
33 - </select>  
34 -  
35 - <insert id="insertMonthlyReport" parameterType="PeriodicReport" useGeneratedKeys="true" keyProperty="id">  
36 - insert into periodic_report  
37 - <trim prefix="(" suffix=")" suffixOverrides=",">  
38 - <if test="headline != null">headline,</if>  
39 - <if test="writer != null">writer,</if>  
40 - <if test="writeTime != null">write_time,</if>  
41 - <if test="content != null">content,</if>  
42 - <if test="begintime != null">beginTime,</if>  
43 - <if test="endtime != null">endTime,</if>  
44 - content_type  
45 - </trim>  
46 - <trim prefix="values (" suffix=")" suffixOverrides=",">  
47 - <if test="headline != null">#{headline},</if>  
48 - <if test="writer != null">#{writer},</if>  
49 - <if test="writeTime != null">#{writeTime},</if>  
50 - <if test="content != null">#{content},</if>  
51 - <if test="begintime != null">#{begintime},</if>  
52 - <if test="endtime != null">#{endtime},</if>  
53 - 3  
54 - </trim>  
55 - </insert>  
56 -  
57 - <update id="updateMonthlyReport" parameterType="PeriodicReport">  
58 - update periodic_report  
59 - <trim prefix="SET" suffixOverrides=",">  
60 - <if test="headline != null">headline = #{headline},</if>  
61 - <if test="writer != null">writer = #{writer},</if>  
62 - <if test="writeTime != null">write_time = #{writeTime},</if>  
63 - <if test="content != null">content = #{content},</if>  
64 - <if test="begintime != null">beginTime = #{begintime},</if>  
65 - <if test="endtime != null">endTime = #{endtime},</if>  
66 - <if test="contentType != null">content_type = #{contentType},</if>  
67 - </trim>  
68 - where id = #{id}  
69 - </update>  
70 -  
71 - <delete id="deleteMonthlyReportById" parameterType="Long">  
72 - delete from periodic_report where id = #{id}  
73 - </delete>  
74 -  
75 - <delete id="deleteMonthlyReportByIds" parameterType="String">  
76 - delete from periodic_report where id in  
77 - <foreach item="id" collection="array" open="(" separator="," close=")">  
78 - #{id}  
79 - </foreach>  
80 - </delete>  
81 -  
82 -</mapper>  
83 \ No newline at end of file 0 \ No newline at end of file
trash-daily/src/main/resources/mapper/report/WorkReportMapper.xml
@@ -6,20 +6,29 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot; @@ -6,20 +6,29 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
6 6
7 <resultMap type="WorkReport" id="WorkReportResult"> 7 <resultMap type="WorkReport" id="WorkReportResult">
8 <result property="id" column="id" /> 8 <result property="id" column="id" />
9 - <result property="weeklyTitle" column="weekly_title" /> 9 + <result property="title" column="title" />
10 <result property="writer" column="writer" /> 10 <result property="writer" column="writer" />
11 <result property="writeTime" column="write_time" /> 11 <result property="writeTime" column="write_time" />
12 <result property="reportContent" column="report_content" /> 12 <result property="reportContent" column="report_content" />
  13 + <result property="type" column="type" />
  14 + <result property="startTime" column="start_time" />
  15 + <result property="endTime" column="end_time" />
  16 + <result property="createBy" column="create_by" />
  17 + <result property="createTime" column="create_time" />
  18 + <result property="attachmentLink" column="attachment_link" />
  19 +
13 </resultMap> 20 </resultMap>
14 21
15 <sql id="selectWorkReportVo"> 22 <sql id="selectWorkReportVo">
16 - select id, weekly_title, writer, write_time, report_content from work_report 23 + select id, title, writer, write_time, report_content,type,start_time,end_time,create_by,create_time,attachment_link from work_report
17 </sql> 24 </sql>
18 25
19 <select id="selectWorkReportList" parameterType="WorkReport" resultMap="WorkReportResult"> 26 <select id="selectWorkReportList" parameterType="WorkReport" resultMap="WorkReportResult">
20 <include refid="selectWorkReportVo"/> 27 <include refid="selectWorkReportVo"/>
21 <where> 28 <where>
22 - <if test="weeklyTitle != null and weeklyTitle != ''"> and weekly_title = #{weeklyTitle}</if> 29 + <if test="title != null and title != ''"> and title = #{title}</if>
  30 + <if test="type != null and type != ''"> and type = #{type}</if>
  31 + <if test="createBy != null and createBy != ''"> and create_by = #{createBy}</if>
23 </where> 32 </where>
24 </select> 33 </select>
25 34
@@ -31,26 +40,41 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot; @@ -31,26 +40,41 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
31 <insert id="insertWorkReport" parameterType="WorkReport" useGeneratedKeys="true" keyProperty="id"> 40 <insert id="insertWorkReport" parameterType="WorkReport" useGeneratedKeys="true" keyProperty="id">
32 insert into work_report 41 insert into work_report
33 <trim prefix="(" suffix=")" suffixOverrides=","> 42 <trim prefix="(" suffix=")" suffixOverrides=",">
34 - <if test="weeklyTitle != null and weeklyTitle != ''">weekly_title,</if> 43 + <if test="title != null and title != ''">title,</if>
35 <if test="writer != null and writer != ''">writer,</if> 44 <if test="writer != null and writer != ''">writer,</if>
36 <if test="writeTime != null">write_time,</if> 45 <if test="writeTime != null">write_time,</if>
  46 + <if test="startTime != null">start_time,</if>
  47 + <if test="endTime != null">end_time,</if>
37 <if test="reportContent != null and reportContent != ''">report_content,</if> 48 <if test="reportContent != null and reportContent != ''">report_content,</if>
  49 + <if test="createBy != ''">create_by,</if>
  50 + <if test="attachmentLink!= null and attachmentLink != ''">attachment_link,</if>
  51 + create_time,
  52 + type,
38 </trim> 53 </trim>
39 <trim prefix="values (" suffix=")" suffixOverrides=","> 54 <trim prefix="values (" suffix=")" suffixOverrides=",">
40 - <if test="weeklyTitle != null and weeklyTitle != ''">#{weeklyTitle},</if> 55 + <if test="title != null and title != ''">#{title},</if>
41 <if test="writer != null and writer != ''">#{writer},</if> 56 <if test="writer != null and writer != ''">#{writer},</if>
42 <if test="writeTime != null">#{writeTime},</if> 57 <if test="writeTime != null">#{writeTime},</if>
  58 + <if test="startTime != null">#{startTime},</if>
  59 + <if test="endTime != null">#{endTime},</if>
43 <if test="reportContent != null and reportContent != ''">#{reportContent},</if> 60 <if test="reportContent != null and reportContent != ''">#{reportContent},</if>
  61 + <if test="createBy != ''">#{createBy},</if>
  62 + <if test="attachmentLink!= null and attachmentLink != ''">#{attachmentLink},</if>
  63 + NOW(),
  64 + #{type}
44 </trim> 65 </trim>
45 </insert> 66 </insert>
46 67
47 <update id="updateWorkReport" parameterType="WorkReport"> 68 <update id="updateWorkReport" parameterType="WorkReport">
48 update work_report 69 update work_report
49 <trim prefix="SET" suffixOverrides=","> 70 <trim prefix="SET" suffixOverrides=",">
50 - <if test="weeklyTitle != null and weeklyTitle != ''">weekly_title = #{weeklyTitle},</if> 71 + <if test="title != null and title != ''">title = #{title},</if>
51 <if test="writer != null and writer != ''">writer = #{writer},</if> 72 <if test="writer != null and writer != ''">writer = #{writer},</if>
52 <if test="writeTime != null">write_time = #{writeTime},</if> 73 <if test="writeTime != null">write_time = #{writeTime},</if>
  74 + <if test="startTime != null">start_time = #{startTime},</if>
  75 + <if test="endTime != null">end_time = #{endTime},</if>
53 <if test="reportContent != null and reportContent != ''">report_content = #{reportContent},</if> 76 <if test="reportContent != null and reportContent != ''">report_content = #{reportContent},</if>
  77 + <if test="attachmentLink!= null and attachmentLink != ''">attachment_link = #{attachment_link},</if>
54 </trim> 78 </trim>
55 where id = #{id} 79 where id = #{id}
56 </update> 80 </update>
trash-daily/src/main/resources/mapper/situation/DailySituationMapper.xml
@@ -12,12 +12,14 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot; @@ -12,12 +12,14 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
12 <result property="weather" column="weather" /> 12 <result property="weather" column="weather" />
13 <result property="consumptionSiteSituation" column="Consumption_site_situation" /> 13 <result property="consumptionSiteSituation" column="Consumption_site_situation" />
14 <result property="numberOfVehicles" column="Number_of_vehicles" /> 14 <result property="numberOfVehicles" column="Number_of_vehicles" />
  15 + <result property="createBy" column="create_by" />
15 <result property="createTime" column="create_time" /> 16 <result property="createTime" column="create_time" />
16 <result property="updateTime" column="update_time" /> 17 <result property="updateTime" column="update_time" />
  18 +
17 </resultMap> 19 </resultMap>
18 20
19 <sql id="selectDailySituationVo"> 21 <sql id="selectDailySituationVo">
20 - select id, title, operator, date, weather, Consumption_site_situation, Number_of_vehicles, create_time, update_time from daily_situation 22 + select id, title, operator, date, weather, Consumption_site_situation, Number_of_vehicles, create_time, update_time,create_by from daily_situation
21 </sql> 23 </sql>
22 24
23 <select id="selectDailySituationList" parameterType="DailySituation" resultMap="DailySituationResult"> 25 <select id="selectDailySituationList" parameterType="DailySituation" resultMap="DailySituationResult">
@@ -25,7 +27,7 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot; @@ -25,7 +27,7 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
25 <where> 27 <where>
26 <if test="title != null and title != ''"> and title like concat('%', #{title}, '%')</if> 28 <if test="title != null and title != ''"> and title like concat('%', #{title}, '%')</if>
27 <if test="operator != null and operator != ''"> and operator like concat('%', #{operator}, '%')</if> 29 <if test="operator != null and operator != ''"> and operator like concat('%', #{operator}, '%')</if>
28 - <if test="updateTime != null "> and update_time = #{updateTime}</if> 30 + <if test="createBy != null "> and create_by = #{createBy}</if>
29 </where> 31 </where>
30 </select> 32 </select>
31 33
@@ -46,6 +48,7 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot; @@ -46,6 +48,7 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
46 <if test="numberOfVehicles != null">Number_of_vehicles,</if> 48 <if test="numberOfVehicles != null">Number_of_vehicles,</if>
47 <if test="createTime != null">create_time,</if> 49 <if test="createTime != null">create_time,</if>
48 <if test="updateTime != null">update_time,</if> 50 <if test="updateTime != null">update_time,</if>
  51 + <if test="createBy != null">create_by,</if>
49 </trim> 52 </trim>
50 <trim prefix="values (" suffix=")" suffixOverrides=","> 53 <trim prefix="values (" suffix=")" suffixOverrides=",">
51 <if test="id != null and id != ''">#{id},</if> 54 <if test="id != null and id != ''">#{id},</if>
@@ -57,6 +60,7 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot; @@ -57,6 +60,7 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
57 <if test="numberOfVehicles != null">#{numberOfVehicles},</if> 60 <if test="numberOfVehicles != null">#{numberOfVehicles},</if>
58 <if test="createTime != null">#{createTime},</if> 61 <if test="createTime != null">#{createTime},</if>
59 <if test="updateTime != null">#{updateTime},</if> 62 <if test="updateTime != null">#{updateTime},</if>
  63 + <if test="createBy != null">#{createBy}</if>
60 </trim> 64 </trim>
61 </insert> 65 </insert>
62 66
trash-daily/src/main/resources/mapper/toollist/DailyToolListMapper.xml
@@ -15,10 +15,14 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot; @@ -15,10 +15,14 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
15 <result property="managementLeader" column="Management_leader" /> 15 <result property="managementLeader" column="Management_leader" />
16 <result property="lawEnforcementOfficer" column="Law_enforcement_officer" /> 16 <result property="lawEnforcementOfficer" column="Law_enforcement_officer" />
17 <result property="specificSituationOfTheCensus" column="Specific_situation_of_the_census" /> 17 <result property="specificSituationOfTheCensus" column="Specific_situation_of_the_census" />
  18 + <result property="createTime" column="create_time" />
  19 + <result property="updateTime" column="update_time" />
  20 + <result property="createBy" column="create_by" />
  21 +
18 </resultMap> 22 </resultMap>
19 23
20 <sql id="selectDailyToolListVo"> 24 <sql id="selectDailyToolListVo">
21 - select id, title, region, operator, date, Number_of_construction_sites, Census_structure, Management_leader, Law_enforcement_officer, Specific_situation_of_the_census from daily_tool_list 25 + select id, title, region, operator, date, Number_of_construction_sites, Census_structure, Management_leader, Law_enforcement_officer, Specific_situation_of_the_census,create_by,create_time,update_time from daily_tool_list
22 </sql> 26 </sql>
23 27
24 <select id="selectDailyToolListList" parameterType="DailyToolList" resultMap="DailyToolListResult"> 28 <select id="selectDailyToolListList" parameterType="DailyToolList" resultMap="DailyToolListResult">
@@ -26,7 +30,9 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot; @@ -26,7 +30,9 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
26 <where> 30 <where>
27 <if test="title != null and title != ''"> and title like concat('%', #{title}, '%')</if> 31 <if test="title != null and title != ''"> and title like concat('%', #{title}, '%')</if>
28 <if test="operator != null and operator != ''"> and operator like concat('%', #{operator}, '%')</if> 32 <if test="operator != null and operator != ''"> and operator like concat('%', #{operator}, '%')</if>
  33 + <if test="createBy != null and createBy != ''"> and create_by = #{createBy}</if>
29 </where> 34 </where>
  35 + ORDER BY create_time desc
30 </select> 36 </select>
31 37
32 <select id="selectDailyToolListById" parameterType="Long" resultMap="DailyToolListResult"> 38 <select id="selectDailyToolListById" parameterType="Long" resultMap="DailyToolListResult">
@@ -46,6 +52,7 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot; @@ -46,6 +52,7 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
46 <if test="managementLeader != null">Management_leader,</if> 52 <if test="managementLeader != null">Management_leader,</if>
47 <if test="lawEnforcementOfficer != null">Law_enforcement_officer,</if> 53 <if test="lawEnforcementOfficer != null">Law_enforcement_officer,</if>
48 <if test="specificSituationOfTheCensus != null">Specific_situation_of_the_census,</if> 54 <if test="specificSituationOfTheCensus != null">Specific_situation_of_the_census,</if>
  55 + <if test="createBy != null">create_by,</if>
49 </trim> 56 </trim>
50 <trim prefix="values (" suffix=")" suffixOverrides=","> 57 <trim prefix="values (" suffix=")" suffixOverrides=",">
51 <if test="title != null">#{title},</if> 58 <if test="title != null">#{title},</if>
@@ -57,6 +64,7 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot; @@ -57,6 +64,7 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
57 <if test="managementLeader != null">#{managementLeader},</if> 64 <if test="managementLeader != null">#{managementLeader},</if>
58 <if test="lawEnforcementOfficer != null">#{lawEnforcementOfficer},</if> 65 <if test="lawEnforcementOfficer != null">#{lawEnforcementOfficer},</if>
59 <if test="specificSituationOfTheCensus != null">#{specificSituationOfTheCensus},</if> 66 <if test="specificSituationOfTheCensus != null">#{specificSituationOfTheCensus},</if>
  67 + <if test="createBy != null">#{createBy},</if>
60 </trim> 68 </trim>
61 </insert> 69 </insert>
62 70
trash-daily/src/main/resources/mapper/weekly/WeeklyMapper.xml deleted 100644 → 0
1 -<?xml version="1.0" encoding="UTF-8" ?>  
2 -<!DOCTYPE mapper  
3 - PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"  
4 - "http://mybatis.org/dtd/mybatis-3-mapper.dtd">  
5 -<mapper namespace="com.trash.weekly.mapper.WeeklyMapper">  
6 -  
7 - <resultMap type="PeriodicReport" id="PeriodicReportResult">  
8 - <result property="id" column="id" />  
9 - <result property="headline" column="headline" />  
10 - <result property="writer" column="writer" />  
11 - <result property="writeTime" column="write_time" />  
12 - <result property="content" column="content" />  
13 - <result property="begintime" column="beginTime" />  
14 - <result property="endtime" column="endTime" />  
15 - <result property="contentType" column="content_type" />  
16 - </resultMap>  
17 -  
18 - <sql id="selectWeeklyVo">  
19 - select id, headline, writer, write_time, content, beginTime, endTime, content_type from periodic_report  
20 - </sql>  
21 -  
22 - <select id="selectWeeklyList" parameterType="PeriodicReport" resultMap="PeriodicReportResult">  
23 - <include refid="selectWeeklyVo"/>  
24 - <where>  
25 - <if test="headline != null and headline != ''"> and headline = #{headline}</if>  
26 - and content_type = 2  
27 - </where>  
28 - </select>  
29 -  
30 - <select id="selectWeeklyById" parameterType="Long" resultMap="PeriodicReportResult">  
31 - <include refid="selectWeeklyVo"/>  
32 - where id = #{id}  
33 - </select>  
34 -  
35 - <insert id="insertWeekly" parameterType="PeriodicReport" useGeneratedKeys="true" keyProperty="id">  
36 - insert into periodic_report  
37 - <trim prefix="(" suffix=")" suffixOverrides=",">  
38 - <if test="headline != null">headline,</if>  
39 - <if test="writer != null">writer,</if>  
40 - <if test="writeTime != null">write_time,</if>  
41 - <if test="content != null">content,</if>  
42 - <if test="begintime != null">beginTime,</if>  
43 - <if test="endtime != null">endTime,</if>  
44 - content_type  
45 - </trim>  
46 - <trim prefix="values (" suffix=")" suffixOverrides=",">  
47 - <if test="headline != null">#{headline},</if>  
48 - <if test="writer != null">#{writer},</if>  
49 - <if test="writeTime != null">#{writeTime},</if>  
50 - <if test="content != null">#{content},</if>  
51 - <if test="begintime != null">#{begintime},</if>  
52 - <if test="endtime != null">#{endtime},</if>  
53 - 2  
54 - </trim>  
55 - </insert>  
56 -  
57 - <update id="updateWeekly" parameterType="PeriodicReport">  
58 - update periodic_report  
59 - <trim prefix="SET" suffixOverrides=",">  
60 - <if test="headline != null">headline = #{headline},</if>  
61 - <if test="writer != null">writer = #{writer},</if>  
62 - <if test="writeTime != null">write_time = #{writeTime},</if>  
63 - <if test="content != null">content = #{content},</if>  
64 - <if test="begintime != null">beginTime = #{begintime},</if>  
65 - <if test="endtime != null">endTime = #{endtime},</if>  
66 - <if test="contentType != null">content_type = #{contentType},</if>  
67 - </trim>  
68 - where id = #{id}  
69 - </update>  
70 -  
71 - <delete id="deleteWeeklyById" parameterType="Long">  
72 - delete from periodic_report where id = #{id}  
73 - </delete>  
74 -  
75 - <delete id="deleteWeeklyByIds" parameterType="String">  
76 - delete from periodic_report where id in  
77 - <foreach item="id" collection="array" open="(" separator="," close=")">  
78 - #{id}  
79 - </foreach>  
80 - </delete>  
81 -  
82 -</mapper>  
83 \ No newline at end of file 0 \ No newline at end of file
trash-framework/src/main/java/com/trash/framework/utils/OkRestClient.java deleted 100644 → 0
1 -package com.trash.framework.utils;  
2 -  
3 -import java.io.InputStream;  
4 -import java.util.Iterator;  
5 -import java.util.Map;  
6 -import java.util.Objects;  
7 -  
8 -import org.mybatis.logging.LoggerFactory;  
9 -  
10 -import ch.qos.logback.classic.Logger;  
11 -import okhttp3.MediaType;  
12 -import okhttp3.OkHttpClient;  
13 -import okhttp3.Request;  
14 -import okhttp3.Request.Builder;  
15 -import okhttp3.RequestBody;  
16 -import okhttp3.Response;  
17 -import okhttp3.ResponseBody;  
18 -  
19 -public class OkRestClient {  
20 - private static final MediaType JSON = MediaType.parse("application/json; charset=utf-8");  
21 - private static final MediaType XML = MediaType.parse("application/xml; charset=utf-8");  
22 - private OkHttpClient okHttpClient;  
23 -  
24 - public OkRestClient(OkHttpClient okHttpClient) {  
25 - this.okHttpClient = okHttpClient;  
26 - }  
27 -  
28 - public String doGet(String url) {  
29 - return this.doGet(url, (Map)null, (Map)null);  
30 - }  
31 -  
32 - public String doGetParams(String url, Map<String, String> params) {  
33 - return this.doGet(url, params, (Map)null);  
34 - }  
35 -  
36 - public String doGetHeaders(String url, Map<String, String> headers) {  
37 - return this.doGet(url, (Map)null, headers);  
38 - }  
39 -  
40 - public String doGet(String url, Map<String, String> params, Map<String, String> headers) {  
41 - StringBuilder sb = new StringBuilder(url);  
42 - if(params != null && params.keySet().size() > 0) {  
43 - boolean firstFlag = true;  
44 - Iterator _params = params.keySet().iterator();  
45 - while(_params.hasNext()) {  
46 - String key = (String)_params.next();  
47 - if(firstFlag) {  
48 - sb.append("?").append(key).append("=").append((String)params.get(key));  
49 - firstFlag = false;  
50 - } else {  
51 - sb.append("&").append(key).append("=").append((String)params.get(key));  
52 - }  
53 - }  
54 - }  
55 -  
56 - Builder builder = new Builder();  
57 - if(headers != null) {  
58 - headers.forEach((k, v) -> {  
59 - builder.addHeader(k, v);  
60 - });  
61 - }  
62 -  
63 - Request request = builder.url(sb.toString()).build();  
64 - return this.execute(request);  
65 - }  
66 -  
67 - public String doPost(String url, Map<String, String> params, Map<String, String> headers) {  
68 - okhttp3.FormBody.Builder formBodyBuilder = new okhttp3.FormBody.Builder();  
69 - if(params != null && params.keySet().size() > 0) {  
70 - Iterator _params = params.keySet().iterator();  
71 - while(_params.hasNext()) {  
72 - String key = (String)_params.next();  
73 - formBodyBuilder.add(key, (String)params.get(key));  
74 - }  
75 - }  
76 -  
77 - Builder builder = new Builder();  
78 - if(headers != null) {  
79 - headers.forEach((k, v) -> {  
80 - builder.addHeader(k, v);  
81 - });  
82 - }  
83 -  
84 - Request request = builder.url(url).post(formBodyBuilder.build()).build();  
85 - return this.execute(request);  
86 - }  
87 -  
88 - public String doPostJson(String url, String json, Map<String, String> headers) {  
89 -  
90 - return this.executePost(url, json, JSON, headers);  
91 - }  
92 -  
93 - public String doPostXml(String url, String xml, Map<String, String> headers) {  
94 -  
95 - return this.executePost(url, xml, XML, headers);  
96 - }  
97 -  
98 - public String executePost(String url, String data, MediaType contentType, Map<String, String> headers) {  
99 - RequestBody requestBody = RequestBody.create(contentType, data);  
100 - Builder builder = new Builder();  
101 - if(headers != null) {  
102 - Objects.requireNonNull(builder);  
103 - headers.forEach(builder::addHeader);  
104 - }  
105 - Request request = builder.url(url).post(requestBody).build();  
106 - return this.execute(request);  
107 - }  
108 -  
109 - private String execute(Request request) {  
110 - Response response = null;  
111 -  
112 - String result;  
113 - try {  
114 - response = this.okHttpClient.newCall(request).execute();  
115 - if(!response.isSuccessful()) {  
116 - return "";  
117 - }  
118 - result = ((ResponseBody)Objects.requireNonNull(response.body())).toString();  
119 - } catch(Exception e) {  
120 - return "";  
121 - } finally {  
122 - if(response != null) {  
123 - response.close();  
124 - }  
125 - }  
126 - return result;  
127 - }  
128 -  
129 - public InputStream getFile(String url, Map<String, String> params, Map<String, String> headers) {  
130 - StringBuilder sb = new StringBuilder(url);  
131 - if(params != null && params.keySet().size() > 0) {  
132 - boolean firstFlag = true;  
133 - Iterator _params = params.keySet().iterator();  
134 - while(_params.hasNext()) {  
135 - String key = (String)_params.next();  
136 - if(firstFlag) {  
137 - sb.append("?").append(key).append("=").append((String)params.get(key));  
138 - firstFlag = false;  
139 - } else {  
140 - sb.append("&").append(key).append("=").append((String)params.get(key));  
141 - }  
142 - }  
143 - }  
144 -  
145 - Builder builder = new Builder();  
146 - if(headers != null) {  
147 - headers.forEach((k, v) -> {  
148 - builder.addHeader(k, v);  
149 - });  
150 - }  
151 -  
152 - Request request = builder.url(sb.toString()).build();  
153 -  
154 - return this.executeFile(request);  
155 - }  
156 -  
157 - private InputStream executeFile(Request request) {  
158 - Response response = null;  
159 -  
160 - InputStream result;  
161 - try {  
162 - response = this.okHttpClient.newCall(request).execute();  
163 - if(!response.isSuccessful()) {  
164 - return null;  
165 - }  
166 - result = (InputStream)Objects.requireNonNull(response.body().byteStream());  
167 - } catch(Exception e) {  
168 - return null;  
169 - } finally {  
170 - if(response != null) {  
171 - response.close();  
172 - }  
173 - }  
174 - return result;  
175 - }  
176 -  
177 -}  
178 \ No newline at end of file 0 \ No newline at end of file
trash-framework/src/main/java/com/trash/framework/web/service/SysLoginService.java
1 package com.trash.framework.web.service; 1 package com.trash.framework.web.service;
2 2
3 -import java.awt.List;  
4 -import java.io.IOException;  
5 import java.util.ArrayList; 3 import java.util.ArrayList;
6 -import java.util.Date;  
7 -import java.util.HashMap;  
8 import java.util.HashSet; 4 import java.util.HashSet;
9 -import java.util.Map;  
10 import java.util.Set; 5 import java.util.Set;
11 import java.util.concurrent.TimeUnit; 6 import java.util.concurrent.TimeUnit;
12 7
13 import javax.annotation.Resource; 8 import javax.annotation.Resource;
14 -import javax.xml.ws.Response;  
15 9
16 import org.springframework.beans.factory.annotation.Autowired; 10 import org.springframework.beans.factory.annotation.Autowired;
17 import org.springframework.security.authentication.AuthenticationManager; 11 import org.springframework.security.authentication.AuthenticationManager;
@@ -19,8 +13,8 @@ import org.springframework.security.authentication.BadCredentialsException; @@ -19,8 +13,8 @@ import org.springframework.security.authentication.BadCredentialsException;
19 import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; 13 import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
20 import org.springframework.security.core.Authentication; 14 import org.springframework.security.core.Authentication;
21 import org.springframework.security.core.authority.SimpleGrantedAuthority; 15 import org.springframework.security.core.authority.SimpleGrantedAuthority;
22 -import org.springframework.stereotype.Component;  
23 import org.springframework.security.core.userdetails.UserDetailsService; 16 import org.springframework.security.core.userdetails.UserDetailsService;
  17 +import org.springframework.stereotype.Component;
24 18
25 import com.alibaba.fastjson.JSON; 19 import com.alibaba.fastjson.JSON;
26 import com.alibaba.fastjson.JSONObject; 20 import com.alibaba.fastjson.JSONObject;
@@ -35,13 +29,9 @@ import com.trash.common.exception.user.CaptchaException; @@ -35,13 +29,9 @@ import com.trash.common.exception.user.CaptchaException;
35 import com.trash.common.exception.user.CaptchaExpireException; 29 import com.trash.common.exception.user.CaptchaExpireException;
36 import com.trash.common.exception.user.UserPasswordNotMatchException; 30 import com.trash.common.exception.user.UserPasswordNotMatchException;
37 import com.trash.common.utils.MessageUtils; 31 import com.trash.common.utils.MessageUtils;
38 -import com.trash.common.utils.uuid.UUID;  
39 import com.trash.framework.manager.AsyncManager; 32 import com.trash.framework.manager.AsyncManager;
40 import com.trash.framework.manager.factory.AsyncFactory; 33 import com.trash.framework.manager.factory.AsyncFactory;
41 -import com.trash.framework.utils.OkRestClient;  
42 -import com.trash.system.mapper.SysRoleMapper;  
43 34
44 -import okhttp3.Call;  
45 import okhttp3.OkHttpClient; 35 import okhttp3.OkHttpClient;
46 import okhttp3.Request; 36 import okhttp3.Request;
47 37
@@ -115,9 +105,8 @@ public class SysLoginService @@ -115,9 +105,8 @@ public class SysLoginService
115 return tokenService.createToken(loginUser); 105 return tokenService.createToken(loginUser);
116 } 106 }
117 107
118 - OkRestClient okCline;  
119 -  
120 - public final String LOGIN_URL = "http://183.66.242.6:6001/api/authservice/cs/thirdpart/user"; //登录地址 待配置 108 +
  109 + public final String LOGIN_URL = tokenService.REMOTEPATH + "api/authservice/cs/thirdpart/user"; //登录地址 待配置
121 110
122 public LoginUser loginByRemote(String token) 111 public LoginUser loginByRemote(String token)
123 { 112 {
trash-framework/src/main/java/com/trash/framework/web/service/TokenService.java
@@ -32,6 +32,7 @@ import io.jsonwebtoken.SignatureAlgorithm; @@ -32,6 +32,7 @@ import io.jsonwebtoken.SignatureAlgorithm;
32 @Component 32 @Component
33 public class TokenService 33 public class TokenService
34 { 34 {
  35 + public static String REMOTEPATH = "http://183.66.242.6:6001/";
35 // 令牌自定义标识 36 // 令牌自定义标识
36 @Value("${token.header}") 37 @Value("${token.header}")
37 private String header; 38 private String header;
trash-framework/src/main/java/com/trash/framework/web/service/UserDetailsServiceImpl.java
@@ -4,6 +4,7 @@ import com.trash.common.core.domain.entity.SysUser; @@ -4,6 +4,7 @@ import com.trash.common.core.domain.entity.SysUser;
4 import com.trash.common.core.domain.model.LoginUser; 4 import com.trash.common.core.domain.model.LoginUser;
5 import com.trash.common.enums.UserStatus; 5 import com.trash.common.enums.UserStatus;
6 import com.trash.common.exception.BaseException; 6 import com.trash.common.exception.BaseException;
  7 +import com.trash.common.utils.SecurityUtils;
7 import com.trash.common.utils.StringUtils; 8 import com.trash.common.utils.StringUtils;
8 import com.trash.system.service.ISysPostService; 9 import com.trash.system.service.ISysPostService;
9 import com.trash.system.service.ISysUserService; 10 import com.trash.system.service.ISysUserService;
@@ -40,19 +41,33 @@ public class UserDetailsServiceImpl implements UserDetailsService { @@ -40,19 +41,33 @@ public class UserDetailsServiceImpl implements UserDetailsService {
40 41
41 @Override 42 @Override
42 public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException { 43 public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
43 - SysUser user = userService.selectUserByUserName(username);  
44 - if (StringUtils.isNull(user)) {  
45 - log.info("登录用户:{} 不存在.", username);  
46 - throw new UsernameNotFoundException("登录用户:" + username + " 不存在");  
47 - } else if (UserStatus.DELETED.getCode().equals(user.getDelFlag())) {  
48 - log.info("登录用户:{} 已被删除.", username);  
49 - throw new BaseException("对不起,您的账号:" + username + " 已被删除");  
50 - } else if (UserStatus.DISABLE.getCode().equals(user.getStatus())) {  
51 - log.info("登录用户:{} 已被停用.", username);  
52 - throw new BaseException("对不起,您的账号:" + username + " 已停用");  
53 - } 44 + LoginUser loginUser =null;
  45 + try {
54 46
55 - return createLoginUser(user); 47 + loginUser = SecurityUtils.getLoginUser();
  48 + } catch (Exception e) {
  49 + e.printStackTrace();
  50 + }
  51 +
  52 + if(loginUser == null){
  53 + SysUser user = userService.selectUserByUserName(username);
  54 + if (StringUtils.isNull(user)) {
  55 + log.info("登录用户:{} 不存在.", username);
  56 + throw new UsernameNotFoundException("登录用户:" + username + " 不存在");
  57 + } else if (UserStatus.DELETED.getCode().equals(user.getDelFlag())) {
  58 + log.info("登录用户:{} 已被删除.", username);
  59 + throw new BaseException("对不起,您的账号:" + username + " 已被删除");
  60 + } else if (UserStatus.DISABLE.getCode().equals(user.getStatus())) {
  61 + log.info("登录用户:{} 已被停用.", username);
  62 + throw new BaseException("对不起,您的账号:" + username + " 已停用");
  63 + }
  64 +
  65 + return createLoginUser(user);
  66 + }
  67 +
  68 +
  69 +
  70 + return loginUser;
56 } 71 }
57 72
58 public UserDetails createLoginUser(SysUser user) { 73 public UserDetails createLoginUser(SysUser user) {
trash-quartz/pom.xml
@@ -35,6 +35,16 @@ @@ -35,6 +35,16 @@
35 <artifactId>trash-common</artifactId> 35 <artifactId>trash-common</artifactId>
36 </dependency> 36 </dependency>
37 37
  38 + <dependency>
  39 + <groupId>com.trash</groupId>
  40 + <artifactId>trash-activiti</artifactId>
  41 + </dependency>
  42 +
  43 +
  44 + <dependency>
  45 + <groupId>com.trash</groupId>
  46 + <artifactId>trash-workflow</artifactId>
  47 + </dependency>
38 </dependencies> 48 </dependencies>
39 49
40 </project> 50 </project>
41 \ No newline at end of file 51 \ No newline at end of file
trash-quartz/src/main/java/com/trash/quartz/task/DriverTask.java 0 → 100644
  1 +package com.trash.quartz.task;
  2 +
  3 +import java.text.SimpleDateFormat;
  4 +import java.util.Date;
  5 +
  6 +import org.springframework.beans.BeanUtils;
  7 +import org.springframework.stereotype.Component;
  8 +
  9 +import com.trash.activiti.service.IActTaskService;
  10 +import com.trash.common.utils.spring.SpringUtils;
  11 +import com.trash.workflow.service.IWorkflowService;
  12 +
  13 +/**
  14 + * 定时任务调度测试
  15 + *
  16 + * @author trash
  17 + */
  18 +@Component("DriverTask")
  19 +public class DriverTask
  20 +{
  21 +
  22 + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
  23 +
  24 + public void checkDriverCredit()
  25 + {
  26 + System.out.println("=================== 定时器执行 当前时间: " + simpleDateFormat.format(new Date()));
  27 + }
  28 +
  29 + public void checkAllTask()
  30 + {
  31 +
  32 + System.out.println("=================== 删除超时报工数据 定时器执行 当前时间: " + simpleDateFormat.format(new Date()));
  33 +
  34 + SpringUtils.getBean(IActTaskService.class).endAllThreesteptask("workflow_threestep");
  35 +
  36 + SpringUtils.getBean(IWorkflowService.class).deleteWorkflowByName("workflow_threestep");
  37 +
  38 + }
  39 +
  40 +}
trash-ui/.env.development
1 # 开发环境配置 1 # 开发环境配置
2 ENV = 'development' 2 ENV = 'development'
3 3
4 -VUE_APP_BASE_API = '/dev-api' 4 +VUE_APP_BASE_API = '/workflow'
5 VUE_REMOTE_API = '/remote' 5 VUE_REMOTE_API = '/remote'
6 6
7 # 路由懒加载 7 # 路由懒加载
trash-ui/.env.production
1 # 生产环境配置 1 # 生产环境配置
2 ENV = 'production' 2 ENV = 'production'
3 3
4 -VUE_APP_BASE_API = '/prod-api' 4 +VUE_APP_BASE_API = '/workflow'
trash-ui/.env.staging
@@ -3,4 +3,4 @@ NODE_ENV = production @@ -3,4 +3,4 @@ NODE_ENV = production
3 # 测试环境配置 3 # 测试环境配置
4 ENV = 'staging' 4 ENV = 'staging'
5 5
6 -VUE_APP_BASE_API = '/stage-api' 6 +VUE_APP_BASE_API = '/workflow'
trash-ui/src/api/business/credit2.js renamed to trash-ui/src/api/business/company.js
@@ -3,7 +3,7 @@ import request from &#39;@/utils/request&#39; @@ -3,7 +3,7 @@ import request from &#39;@/utils/request&#39;
3 // 查询企业失信列表 3 // 查询企业失信列表
4 export function listCredit(query) { 4 export function listCredit(query) {
5 return request({ 5 return request({
6 - url: '/Company/credit/list', 6 + url: '/business/companyCredit/list',
7 method: 'get', 7 method: 'get',
8 params: query 8 params: query
9 }) 9 })
@@ -12,14 +12,22 @@ export function listCredit(query) { @@ -12,14 +12,22 @@ export function listCredit(query) {
12 // 查询企业失信详细 12 // 查询企业失信详细
13 export function getCredit(id) { 13 export function getCredit(id) {
14 return request({ 14 return request({
15 - url: '/Company/credit/' + id, 15 + url: '/business/companyCredit/' + id,
16 method: 'get' 16 method: 'get'
17 }) 17 })
18 } 18 }
19 19
20 export function getNames(query) { 20 export function getNames(query) {
21 return request({ 21 return request({
22 - url: '/Company/credit/names', 22 + url: '/business/companyCredit/names',
  23 + method: 'get',
  24 + params: query
  25 + })
  26 +}
  27 +
  28 +export function getPlaces(query) {
  29 + return request({
  30 + url: '/business/companyCredit/places',
23 method: 'get', 31 method: 'get',
24 params: query 32 params: query
25 }) 33 })
@@ -27,7 +35,7 @@ export function getNames(query) { @@ -27,7 +35,7 @@ export function getNames(query) {
27 35
28 export function historyCredit(query) { 36 export function historyCredit(query) {
29 return request({ 37 return request({
30 - url: '/Company/credit/historyCredit', 38 + url: '/business/companyCredit/historyCredit',
31 method: 'get', 39 method: 'get',
32 params: query 40 params: query
33 }) 41 })
@@ -37,7 +45,7 @@ export function historyCredit(query) { @@ -37,7 +45,7 @@ export function historyCredit(query) {
37 // 新增企业失信 45 // 新增企业失信
38 export function addCredit(data) { 46 export function addCredit(data) {
39 return request({ 47 return request({
40 - url: '/Company/credit', 48 + url: '/business/companyCredit',
41 method: 'post', 49 method: 'post',
42 data: data 50 data: data
43 }) 51 })
@@ -46,7 +54,7 @@ export function addCredit(data) { @@ -46,7 +54,7 @@ export function addCredit(data) {
46 // 修改企业失信 54 // 修改企业失信
47 export function updateCredit(data) { 55 export function updateCredit(data) {
48 return request({ 56 return request({
49 - url: '/Company/credit', 57 + url: '/business/companyCredit',
50 method: 'put', 58 method: 'put',
51 data: data 59 data: data
52 }) 60 })
@@ -55,7 +63,7 @@ export function updateCredit(data) { @@ -55,7 +63,7 @@ export function updateCredit(data) {
55 // 删除企业失信 63 // 删除企业失信
56 export function delCredit(id) { 64 export function delCredit(id) {
57 return request({ 65 return request({
58 - url: '/Company/credit/' + id, 66 + url: '/business/companyCredit/' + id,
59 method: 'delete' 67 method: 'delete'
60 }) 68 })
61 } 69 }
@@ -63,7 +71,7 @@ export function delCredit(id) { @@ -63,7 +71,7 @@ export function delCredit(id) {
63 // 导出企业失信 71 // 导出企业失信
64 export function exportCredit(query) { 72 export function exportCredit(query) {
65 return request({ 73 return request({
66 - url: '/Company/credit/export', 74 + url: '/business/companyCredit/export',
67 method: 'get', 75 method: 'get',
68 params: query 76 params: query
69 }) 77 })
trash-ui/src/api/business/credit.js renamed to trash-ui/src/api/business/constructionsites.js
@@ -3,7 +3,7 @@ import request from &#39;@/utils/request&#39; @@ -3,7 +3,7 @@ import request from &#39;@/utils/request&#39;
3 // 查询【请填写功能名称】列表 3 // 查询【请填写功能名称】列表
4 export function listCredit(query) { 4 export function listCredit(query) {
5 return request({ 5 return request({
6 - url: '/business/ConstructionCredit/list', 6 + url: '/business/constructionCredit/list',
7 method: 'get', 7 method: 'get',
8 params: query 8 params: query
9 }) 9 })
@@ -11,7 +11,7 @@ export function listCredit(query) { @@ -11,7 +11,7 @@ export function listCredit(query) {
11 11
12 export function getNames(query) { 12 export function getNames(query) {
13 return request({ 13 return request({
14 - url: '/business/ConstructionCredit/names', 14 + url: '/business/constructionCredit/names',
15 method: 'get', 15 method: 'get',
16 params: query 16 params: query
17 }) 17 })
@@ -19,14 +19,14 @@ export function getNames(query) { @@ -19,14 +19,14 @@ export function getNames(query) {
19 19
20 export function getTypes(query) { 20 export function getTypes(query) {
21 return request({ 21 return request({
22 - url: '/business/ConstructionCredit/types', 22 + url: '/business/constructionCredit/types',
23 method: 'get', 23 method: 'get',
24 params: query 24 params: query
25 }) 25 })
26 } 26 }
27 export function getPlaces(query) { 27 export function getPlaces(query) {
28 return request({ 28 return request({
29 - url: '/business/ConstructionCredit/places', 29 + url: '/business/constructionCredit/places',
30 method: 'get', 30 method: 'get',
31 params: query 31 params: query
32 }) 32 })
@@ -34,7 +34,7 @@ export function getPlaces(query) { @@ -34,7 +34,7 @@ export function getPlaces(query) {
34 34
35 export function historyCredit(query) { 35 export function historyCredit(query) {
36 return request({ 36 return request({
37 - url: '/business/ConstructionCredit/historyCredit', 37 + url: '/business/constructionCredit/historyCredit',
38 method: 'get', 38 method: 'get',
39 params: query 39 params: query
40 }) 40 })
@@ -44,7 +44,7 @@ export function historyCredit(query) { @@ -44,7 +44,7 @@ export function historyCredit(query) {
44 // 查询【请填写功能名称】详细 44 // 查询【请填写功能名称】详细
45 export function getCredit(id) { 45 export function getCredit(id) {
46 return request({ 46 return request({
47 - url: '/business/ConstructionCredit/' + id, 47 + url: '/business/constructionCredit/' + id,
48 method: 'get' 48 method: 'get'
49 }) 49 })
50 } 50 }
@@ -52,7 +52,7 @@ export function getCredit(id) { @@ -52,7 +52,7 @@ export function getCredit(id) {
52 // 新增【请填写功能名称】 52 // 新增【请填写功能名称】
53 export function addCredit(data) { 53 export function addCredit(data) {
54 return request({ 54 return request({
55 - url: '/business/ConstructionCredit', 55 + url: '/business/constructionCredit',
56 method: 'post', 56 method: 'post',
57 data: data 57 data: data
58 }) 58 })
@@ -61,7 +61,7 @@ export function addCredit(data) { @@ -61,7 +61,7 @@ export function addCredit(data) {
61 // 修改【请填写功能名称】 61 // 修改【请填写功能名称】
62 export function updateCredit(data) { 62 export function updateCredit(data) {
63 return request({ 63 return request({
64 - url: '/business/ConstructionCredit', 64 + url: '/business/constructionCredit',
65 method: 'put', 65 method: 'put',
66 data: data 66 data: data
67 }) 67 })
@@ -70,7 +70,7 @@ export function updateCredit(data) { @@ -70,7 +70,7 @@ export function updateCredit(data) {
70 // 删除【请填写功能名称】 70 // 删除【请填写功能名称】
71 export function delCredit(id) { 71 export function delCredit(id) {
72 return request({ 72 return request({
73 - url: '/business/ConstructionCredit/' + id, 73 + url: '/business/constructionCredit/' + id,
74 method: 'delete' 74 method: 'delete'
75 }) 75 })
76 } 76 }
@@ -78,7 +78,7 @@ export function delCredit(id) { @@ -78,7 +78,7 @@ export function delCredit(id) {
78 // 导出【请填写功能名称】 78 // 导出【请填写功能名称】
79 export function exportCredit(query) { 79 export function exportCredit(query) {
80 return request({ 80 return request({
81 - url: '/business/ConstructionCredit/export', 81 + url: '/business/constructionCredit/export',
82 method: 'get', 82 method: 'get',
83 params: query 83 params: query
84 }) 84 })
trash-ui/src/api/business/daywork.js 0 → 100644
  1 +import request from '@/utils/request'
  2 +
  3 +// 查询【请填写功能名称】列表
  4 +export function dayWorkList(query) {
  5 + return request({
  6 + url: '/business/threestep/dayWorkList',
  7 + method: 'get',
  8 + params: query
  9 + })
  10 +}
0 \ No newline at end of file 11 \ No newline at end of file
trash-ui/src/api/business/credit4.js renamed to trash-ui/src/api/business/driver.js
@@ -3,7 +3,7 @@ import request from &#39;@/utils/request&#39; @@ -3,7 +3,7 @@ import request from &#39;@/utils/request&#39;
3 // 查询驾驶员失信列表 3 // 查询驾驶员失信列表
4 export function listCredit(query) { 4 export function listCredit(query) {
5 return request({ 5 return request({
6 - url: '/driver/credit/list', 6 + url: '/business/driverCredit/list',
7 method: 'get', 7 method: 'get',
8 params: query 8 params: query
9 }) 9 })
@@ -12,14 +12,14 @@ export function listCredit(query) { @@ -12,14 +12,14 @@ export function listCredit(query) {
12 // 查询驾驶员失信详细 12 // 查询驾驶员失信详细
13 export function getCredit(id) { 13 export function getCredit(id) {
14 return request({ 14 return request({
15 - url: '/driver/credit/' + id, 15 + url: '/business/driverCredit/' + id,
16 method: 'get' 16 method: 'get'
17 }) 17 })
18 } 18 }
19 19
20 export function getNames(query) { 20 export function getNames(query) {
21 return request({ 21 return request({
22 - url: '/driver/credit/names', 22 + url: '/business/driverCredit/names',
23 method: 'get', 23 method: 'get',
24 params: query 24 params: query
25 }) 25 })
@@ -27,7 +27,7 @@ export function getNames(query) { @@ -27,7 +27,7 @@ export function getNames(query) {
27 27
28 export function historyCredit(query) { 28 export function historyCredit(query) {
29 return request({ 29 return request({
30 - url: '/driver/credit/historyCredit', 30 + url: '/business/driverCredit/historyCredit',
31 method: 'get', 31 method: 'get',
32 params: query 32 params: query
33 }) 33 })
@@ -37,7 +37,7 @@ export function historyCredit(query) { @@ -37,7 +37,7 @@ export function historyCredit(query) {
37 // 新增驾驶员失信 37 // 新增驾驶员失信
38 export function addCredit(data) { 38 export function addCredit(data) {
39 return request({ 39 return request({
40 - url: '/driver/credit', 40 + url: '/business/driverCredit',
41 method: 'post', 41 method: 'post',
42 data: data 42 data: data
43 }) 43 })
@@ -46,7 +46,7 @@ export function addCredit(data) { @@ -46,7 +46,7 @@ export function addCredit(data) {
46 // 修改驾驶员失信 46 // 修改驾驶员失信
47 export function updateCredit(data) { 47 export function updateCredit(data) {
48 return request({ 48 return request({
49 - url: '/driver/credit', 49 + url: '/business/driverCredit',
50 method: 'put', 50 method: 'put',
51 data: data 51 data: data
52 }) 52 })
@@ -55,7 +55,7 @@ export function updateCredit(data) { @@ -55,7 +55,7 @@ export function updateCredit(data) {
55 // 删除驾驶员失信 55 // 删除驾驶员失信
56 export function delCredit(id) { 56 export function delCredit(id) {
57 return request({ 57 return request({
58 - url: '/driver/credit/' + id, 58 + url: '/business/driverCredit/' + id,
59 method: 'delete' 59 method: 'delete'
60 }) 60 })
61 } 61 }
@@ -63,7 +63,7 @@ export function delCredit(id) { @@ -63,7 +63,7 @@ export function delCredit(id) {
63 // 导出驾驶员失信 63 // 导出驾驶员失信
64 export function exportCredit(query) { 64 export function exportCredit(query) {
65 return request({ 65 return request({
66 - url: '/driver/credit/export', 66 + url: '/business/driverCredit/export',
67 method: 'get', 67 method: 'get',
68 params: query 68 params: query
69 }) 69 })
trash-ui/src/api/business/credit1.js renamed to trash-ui/src/api/business/earthsites.js
@@ -3,7 +3,7 @@ import request from &#39;@/utils/request&#39; @@ -3,7 +3,7 @@ import request from &#39;@/utils/request&#39;
3 // 查询消纳场失信列表 3 // 查询消纳场失信列表
4 export function listCredit(query) { 4 export function listCredit(query) {
5 return request({ 5 return request({
6 - url: '/EarthSites/credit/list', 6 + url: '/business/earthSitesCredit/list',
7 method: 'get', 7 method: 'get',
8 params: query 8 params: query
9 }) 9 })
@@ -12,7 +12,7 @@ export function listCredit(query) { @@ -12,7 +12,7 @@ export function listCredit(query) {
12 // 查询消纳场失信详细 12 // 查询消纳场失信详细
13 export function getCredit(id) { 13 export function getCredit(id) {
14 return request({ 14 return request({
15 - url: '/EarthSites/credit/' + id, 15 + url: '/business/earthSitesCredit/' + id,
16 method: 'get' 16 method: 'get'
17 }) 17 })
18 } 18 }
@@ -20,7 +20,7 @@ export function getCredit(id) { @@ -20,7 +20,7 @@ export function getCredit(id) {
20 // 新增消纳场失信 20 // 新增消纳场失信
21 export function addCredit(data) { 21 export function addCredit(data) {
22 return request({ 22 return request({
23 - url: '/EarthSites/credit', 23 + url: '/business/earthSitesCredit',
24 method: 'post', 24 method: 'post',
25 data: data 25 data: data
26 }) 26 })
@@ -29,7 +29,7 @@ export function addCredit(data) { @@ -29,7 +29,7 @@ export function addCredit(data) {
29 // 修改消纳场失信 29 // 修改消纳场失信
30 export function updateCredit(data) { 30 export function updateCredit(data) {
31 return request({ 31 return request({
32 - url: '/EarthSites/credit', 32 + url: '/business/earthSitesCredit',
33 method: 'put', 33 method: 'put',
34 data: data 34 data: data
35 }) 35 })
@@ -38,7 +38,7 @@ export function updateCredit(data) { @@ -38,7 +38,7 @@ export function updateCredit(data) {
38 // 删除消纳场失信 38 // 删除消纳场失信
39 export function delCredit(id) { 39 export function delCredit(id) {
40 return request({ 40 return request({
41 - url: '/EarthSites/credit/' + id, 41 + url: '/business/earthSitesCredit/' + id,
42 method: 'delete' 42 method: 'delete'
43 }) 43 })
44 } 44 }
@@ -46,7 +46,7 @@ export function delCredit(id) { @@ -46,7 +46,7 @@ export function delCredit(id) {
46 // 导出消纳场失信 46 // 导出消纳场失信
47 export function exportCredit(query) { 47 export function exportCredit(query) {
48 return request({ 48 return request({
49 - url: '/EarthSites/credit/export', 49 + url: '/business/earthSitesCredit//export',
50 method: 'get', 50 method: 'get',
51 params: query 51 params: query
52 }) 52 })
@@ -54,7 +54,22 @@ export function exportCredit(query) { @@ -54,7 +54,22 @@ export function exportCredit(query) {
54 54
55 export function getNames(query) { 55 export function getNames(query) {
56 return request({ 56 return request({
57 - url: '/EarthSites/credit/names', 57 + url: '/business/earthSitesCredit/names',
  58 + method: 'get',
  59 + params: query
  60 + })
  61 +}
  62 +
  63 +export function getTypes(query) {
  64 + return request({
  65 + url: '/business/earthSitesCredit//types',
  66 + method: 'get',
  67 + params: query
  68 + })
  69 +}
  70 +export function getPlaces(query) {
  71 + return request({
  72 + url: '/business/earthSitesCredit//places',
58 method: 'get', 73 method: 'get',
59 params: query 74 params: query
60 }) 75 })
@@ -62,7 +77,7 @@ export function getNames(query) { @@ -62,7 +77,7 @@ export function getNames(query) {
62 77
63 export function historyCredit(query) { 78 export function historyCredit(query) {
64 return request({ 79 return request({
65 - url: '/EarthSites/credit/historyCredit', 80 + url: '/business/earthSitesCredit/historyCredit',
66 method: 'get', 81 method: 'get',
67 params: query 82 params: query
68 }) 83 })
trash-ui/src/api/business/supervisionSpecial.js 0 → 100644
  1 +import request from '@/utils/request'
  2 +
  3 +// 查询专项督查列表
  4 +export function listSupervisionSpecial(query) {
  5 + return request({
  6 + url: '/business/supervisionSpecial/list',
  7 + method: 'get',
  8 + params: query
  9 + })
  10 +}
  11 +
  12 +// 查询专项督查详细
  13 +export function getSupervisionSpecial(id) {
  14 + return request({
  15 + url: '/business/supervisionSpecial/' + id,
  16 + method: 'get'
  17 + })
  18 +}
  19 +
  20 +// 新增专项督查
  21 +export function addSupervisionSpecial(data) {
  22 + return request({
  23 + url: '/business/supervisionSpecial',
  24 + method: 'post',
  25 + data: data
  26 + })
  27 +}
  28 +
  29 +// 修改专项督查
  30 +export function updateSupervisionSpecial(data) {
  31 + return request({
  32 + url: '/business/supervisionSpecial',
  33 + method: 'put',
  34 + data: data
  35 + })
  36 +}
  37 +
  38 +// 删除专项督查
  39 +export function delSupervisionSpecial(id) {
  40 + return request({
  41 + url: '/business/supervisionSpecial/' + id,
  42 + method: 'delete'
  43 + })
  44 +}
  45 +
  46 +// 导出专项督查
  47 +export function exportSupervisionSpecial(query) {
  48 + return request({
  49 + url: '/business/supervisionSpecial/export',
  50 + method: 'get',
  51 + params: query
  52 + })
  53 +}
0 \ No newline at end of file 54 \ No newline at end of file
trash-ui/src/api/business/threestep.js
@@ -35,6 +35,15 @@ export function updateThreestep(data) { @@ -35,6 +35,15 @@ export function updateThreestep(data) {
35 }) 35 })
36 } 36 }
37 37
  38 +export function activeThreestep(data) {
  39 + return request({
  40 + url: '/business/threestep/active',
  41 + method: 'post',
  42 + data: data
  43 + })
  44 +}
  45 +
  46 +
38 // 删除【请填写功能名称】 47 // 删除【请填写功能名称】
39 export function delThreestep(id) { 48 export function delThreestep(id) {
40 return request({ 49 return request({
@@ -51,4 +60,3 @@ export function exportThreestep(query) { @@ -51,4 +60,3 @@ export function exportThreestep(query) {
51 params: query 60 params: query
52 }) 61 })
53 } 62 }
54 -  
trash-ui/src/api/business/credit3.js renamed to trash-ui/src/api/business/truck.js
@@ -3,7 +3,7 @@ import request from &#39;@/utils/request&#39; @@ -3,7 +3,7 @@ import request from &#39;@/utils/request&#39;
3 // 查询车辆失信列表 3 // 查询车辆失信列表
4 export function listCredit(query) { 4 export function listCredit(query) {
5 return request({ 5 return request({
6 - url: '/truck/credit/list', 6 + url: '/business/truckCredit/list',
7 method: 'get', 7 method: 'get',
8 params: query 8 params: query
9 }) 9 })
@@ -12,14 +12,21 @@ export function listCredit(query) { @@ -12,14 +12,21 @@ export function listCredit(query) {
12 // 查询车辆失信详细 12 // 查询车辆失信详细
13 export function getCredit(id) { 13 export function getCredit(id) {
14 return request({ 14 return request({
15 - url: '/truck/credit/' + id, 15 + url: '/business/truckCredit/' + id,
16 method: 'get' 16 method: 'get'
17 }) 17 })
18 } 18 }
19 19
20 export function getNames(query) { 20 export function getNames(query) {
21 return request({ 21 return request({
22 - url: '/truck/credit/names', 22 + url: '/business/truckCredit/names',
  23 + method: 'get',
  24 + params: query
  25 + })
  26 +}
  27 +export function getCompanys(query) {
  28 + return request({
  29 + url: '/business/truckCredit/companys',
23 method: 'get', 30 method: 'get',
24 params: query 31 params: query
25 }) 32 })
@@ -27,7 +34,7 @@ export function getNames(query) { @@ -27,7 +34,7 @@ export function getNames(query) {
27 34
28 export function historyCredit(query) { 35 export function historyCredit(query) {
29 return request({ 36 return request({
30 - url: '/truck/credit/historyCredit', 37 + url: '/business/truckCredit/historyCredit',
31 method: 'get', 38 method: 'get',
32 params: query 39 params: query
33 }) 40 })
@@ -37,7 +44,7 @@ export function historyCredit(query) { @@ -37,7 +44,7 @@ export function historyCredit(query) {
37 // 新增车辆失信 44 // 新增车辆失信
38 export function addCredit(data) { 45 export function addCredit(data) {
39 return request({ 46 return request({
40 - url: '/truck/credit', 47 + url: '/business/truckCredit',
41 method: 'post', 48 method: 'post',
42 data: data 49 data: data
43 }) 50 })
@@ -46,7 +53,7 @@ export function addCredit(data) { @@ -46,7 +53,7 @@ export function addCredit(data) {
46 // 修改车辆失信 53 // 修改车辆失信
47 export function updateCredit(data) { 54 export function updateCredit(data) {
48 return request({ 55 return request({
49 - url: '/truck/credit', 56 + url: '/business/truckCredit',
50 method: 'put', 57 method: 'put',
51 data: data 58 data: data
52 }) 59 })
@@ -55,7 +62,7 @@ export function updateCredit(data) { @@ -55,7 +62,7 @@ export function updateCredit(data) {
55 // 删除车辆失信 62 // 删除车辆失信
56 export function delCredit(id) { 63 export function delCredit(id) {
57 return request({ 64 return request({
58 - url: '/truck/credit/' + id, 65 + url: '/business/truckCredit/' + id,
59 method: 'delete' 66 method: 'delete'
60 }) 67 })
61 } 68 }
@@ -63,7 +70,7 @@ export function delCredit(id) { @@ -63,7 +70,7 @@ export function delCredit(id) {
63 // 导出车辆失信 70 // 导出车辆失信
64 export function exportCredit(query) { 71 export function exportCredit(query) {
65 return request({ 72 return request({
66 - url: '/truck/credit/export', 73 + url: '/business/truckCredit/export',
67 method: 'get', 74 method: 'get',
68 params: query 75 params: query
69 }) 76 })
trash-ui/src/api/business/truckActivate.js 0 → 100644
  1 +import request from '@/utils/request'
  2 +
  3 +// 查询车辆激活列表
  4 +export function listTruckActivate(query) {
  5 + return request({
  6 + url: '/business/truckActivate/list',
  7 + method: 'get',
  8 + params: query
  9 + })
  10 +}
  11 +
  12 +// 查询车辆激活详细
  13 +export function getTruckActivate(id) {
  14 + return request({
  15 + url: '/business/truckActivate/' + id,
  16 + method: 'get'
  17 + })
  18 +}
  19 +
  20 +// 新增车辆激活
  21 +export function addTruckActivate(data) {
  22 + return request({
  23 + url: '/business/truckActivate',
  24 + method: 'post',
  25 + data: data
  26 + })
  27 +}
  28 +
  29 +// 修改车辆激活
  30 +export function updateTruckActivate(data) {
  31 + return request({
  32 + url: '/business/truckActivate',
  33 + method: 'put',
  34 + data: data
  35 + })
  36 +}
  37 +
  38 +// 删除车辆激活
  39 +export function delTruckActivate(id) {
  40 + return request({
  41 + url: '/business/truckActivate/' + id,
  42 + method: 'delete'
  43 + })
  44 +}
  45 +
  46 +// 导出车辆激活
  47 +export function exportTruckActivate(query) {
  48 + return request({
  49 + url: '/business/truckActivate/export',
  50 + method: 'get',
  51 + params: query
  52 + })
  53 +}
0 \ No newline at end of file 54 \ No newline at end of file
trash-ui/src/api/dict.js
@@ -23,20 +23,72 @@ export function earthsitesList(data) { @@ -23,20 +23,72 @@ export function earthsitesList(data) {
23 data: data 23 data: data
24 }); 24 });
25 } 25 }
  26 +export function updateEarthsites(data) {
  27 + return requestRemote({
  28 + url: '/api/siteservice/cs/earthsites/status',
  29 + method: 'post',
  30 + data: data
  31 + });
  32 +}
  33 +
  34 +export function companyList(data) {
  35 + return requestRemote({
  36 + url: '/api/gpsservice/cs/companies/ledger/list',
  37 + method: 'post',
  38 + data: data
  39 + });
  40 +}
  41 +export function updateCompany(data) {
  42 + return requestRemote({
  43 + url: '/api/gpsservice/cs/companies/credit/status',
  44 + method: 'post',
  45 + data: data
  46 + });
  47 +}
  48 +
  49 +export function truckList(data) {
  50 + return requestRemote({
  51 + url: '/api/gpsservice/cs/basevehicle/ledger/list',
  52 + method: 'get',
  53 + params: data
  54 + });
  55 +}
  56 +export function updateTruck(data) {
  57 + return requestRemote({
  58 + url: '/api/gpsservice/cs/basevehicle/credit/status',
  59 + method: 'post',
  60 + data: data
  61 + });
  62 +}
  63 +
  64 +export function driverList(data) {
  65 + return requestRemote({
  66 + url: '/api/gpsservice/v1/drivers/search',
  67 + method: 'get',
  68 + params: data
  69 + });
  70 +}
  71 +export function updateDriver(data) {
  72 + // return requestRemote({
  73 + // url: '/api/gpsservice/cs/basevehicle/credit/status',
  74 + // method: 'post',
  75 + // data: data
  76 + // });
  77 +}
26 78
27 -export function getArea(data) { 79 +export function getArea(params) {
28 return requestRemote({ 80 return requestRemote({
29 url: '/api/gpsservice/cs/area', 81 url: '/api/gpsservice/cs/area',
30 method: 'get', 82 method: 'get',
31 - param: data 83 + params: params
32 }); 84 });
33 } 85 }
34 86
35 87
36 -export function getDict(param) { 88 +export function getDict(params) {
37 return requestRemote({ 89 return requestRemote({
38 url: '/api/gpsservice/cs/dataDict', 90 url: '/api/gpsservice/cs/dataDict',
39 method: 'get', 91 method: 'get',
40 - params: param 92 + params: params
41 }); 93 });
42 } 94 }
trash-ui/src/layout/index.vue
1 <template> 1 <template>
2 <div :class="classObj" class="app-wrapper"> 2 <div :class="classObj" class="app-wrapper">
3 - <div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside" />  
4 <sidebar class="sidebar-container" /> 3 <sidebar class="sidebar-container" />
5 <div :class="{hasTagsView:needTagsView}" class="main-container"> 4 <div :class="{hasTagsView:needTagsView}" class="main-container">
6 - <div :class="{'fixed-header':fixedHeader}">  
7 - <navbar />  
8 <tags-view v-if="needTagsView" /> 5 <tags-view v-if="needTagsView" />
9 - </div>  
10 <app-main /> 6 <app-main />
11 - <right-panel v-if="showSettings">  
12 - <settings />  
13 - </right-panel>  
14 - </div> 7 +
  8 + </div>
15 </div> 9 </div>
16 </template> 10 </template>
17 11
trash-ui/src/main.js
@@ -46,6 +46,8 @@ Vue.prototype.msgInfo = function (msg) { @@ -46,6 +46,8 @@ Vue.prototype.msgInfo = function (msg) {
46 this.$message.info(msg); 46 this.$message.info(msg);
47 } 47 }
48 48
  49 +
  50 +
49 // 全局组件挂载 51 // 全局组件挂载
50 Vue.component('Pagination', Pagination) 52 Vue.component('Pagination', Pagination)
51 Vue.component('RightToolbar', RightToolbar) 53 Vue.component('RightToolbar', RightToolbar)
trash-ui/src/permission.js
@@ -15,7 +15,6 @@ const whiteList = [&#39;/login&#39;, &#39;/auth-redirect&#39;, &#39;/bind&#39;, &#39;/register&#39;] @@ -15,7 +15,6 @@ const whiteList = [&#39;/login&#39;, &#39;/auth-redirect&#39;, &#39;/bind&#39;, &#39;/register&#39;]
15 15
16 router.beforeEach((to, from, next) => { 16 router.beforeEach((to, from, next) => {
17 NProgress.start() 17 NProgress.start()
18 - debugger;  
19 var token = getToken(); 18 var token = getToken();
20 if(!token){ 19 if(!token){
21 if( to.query.token ){ 20 if( to.query.token ){
@@ -82,8 +81,8 @@ router.beforeEach((to, from, next) =&gt; { @@ -82,8 +81,8 @@ router.beforeEach((to, from, next) =&gt; {
82 removeToken(); 81 removeToken();
83 next({path:to }) 82 next({path:to })
84 }else{ 83 }else{
85 -  
86 - 84 +
  85 +
87 store.dispatch('FedLogOut').then(() => { 86 store.dispatch('FedLogOut').then(() => {
88 Message.error(err) 87 Message.error(err)
89 removeToken(); 88 removeToken();
trash-ui/src/router/index.js
@@ -136,6 +136,19 @@ export const constantRoutes = [ @@ -136,6 +136,19 @@ export const constantRoutes = [
136 meta: { title: '三查机制' } 136 meta: { title: '三查机制' }
137 }, 137 },
138 { 138 {
  139 + path: 'supervision/dayWorkReport',
  140 + component: (resolve) => require(['@/views/business/dayWorkReport'], resolve),
  141 + name: '日开工报表',
  142 + meta: { title: '日开工报表' }
  143 + },
  144 +
  145 + {
  146 + path: 'supervision/truckActivate',
  147 + component: (resolve) => require(['@/views/business/truckActivate'], resolve),
  148 + name: '车辆激活',
  149 + meta: { title: '车辆激活' }
  150 + },
  151 + {
139 path: 'credit/EarthSitesCredit', 152 path: 'credit/EarthSitesCredit',
140 component: (resolve) => require(['@/views/business/EarthSitesCredit'], resolve), 153 component: (resolve) => require(['@/views/business/EarthSitesCredit'], resolve),
141 name: '消纳场失信管理', 154 name: '消纳场失信管理',
@@ -160,6 +173,35 @@ export const constantRoutes = [ @@ -160,6 +173,35 @@ export const constantRoutes = [
160 meta: { title: '驾驶员失信管理' } 173 meta: { title: '驾驶员失信管理' }
161 } 174 }
162 ] 175 ]
  176 + }, {
  177 + path: '/daily',
  178 + component: Layout,
  179 + hidden: true,
  180 + children: [
  181 + {
  182 + path: 'report/index',
  183 + component: (resolve) => require(['@/views/daily/report/index'], resolve),
  184 + name: '工作报表',
  185 + meta: { title: '工作报表' }
  186 + }, {
  187 + path: 'Weeklys/day',
  188 + component: (resolve) => require(['@/views/daily/report/day'], resolve),
  189 + name: '工作日报',
  190 + meta: { title: '工作日报' }
  191 + },
  192 + {
  193 + path: 'Weeklys/week',
  194 + component: (resolve) => require(['@/views/daily/report/week'], resolve),
  195 + name: '工作周报',
  196 + meta: { title: '工作周报' }
  197 + },
  198 + {
  199 + path: 'Weeklys/month',
  200 + component: (resolve) => require(['@/views/daily/report/month'], resolve),
  201 + name: '工作月报',
  202 + meta: { title: '工作月报' }
  203 + },
  204 + ]
163 } 205 }
164 ] 206 ]
165 207
trash-ui/src/views/activiti/task/index.vue
1 <template> 1 <template>
2 <div class="app-container"> 2 <div class="app-container">
3 3
4 - <el-card class="box-card" v-for="task in tastList">  
5 - <div class="card_status notcheck">待审批</div>  
6 - <div class="card_btn">  
7 - <a @click="agreeAndDismiss(task,0)" class="agree">同意</a>  
8 - <a @click="agreeAndDismiss(task,1)" class="dismiss">拒绝</a>  
9 - <a @click="examineAndApprove(task,-1)" >详情>></a>  
10 - </div>  
11 - <el-row class="card_row">  
12 - <el-col :span="2" class="card_grid"></el-col>  
13 - <div class="card_title">{{task.instanceName}}</div>  
14 - </el-row>  
15 -  
16 - <el-row class="card_row">  
17 - <el-col :span="3" class="card_grid"></el-col>  
18 - <el-col :span="6" class="card_grid">  
19 - <div>开始时间: {{task.startTime}}</div>  
20 - </el-col>  
21 - <el-col :span="6" class="card_grid center">  
22 - <div>结束时间: {{task.endTime}}</div>  
23 - </el-col>  
24 - <el-col :span="6" class="card_grid right">  
25 - <div>申请类型: {{task.type}}</div>  
26 - </el-col>  
27 - <el-col :span="3" class="card_grid"></el-col>  
28 - </el-row>  
29 - <el-row class="card_row">  
30 - <el-col :span="3" class="card_grid">  
31 - <div></div>  
32 - </el-col>  
33 - <el-col :span="18">  
34 - <div>申请理由: {{task.reason}}</div>  
35 - </el-col>  
36 - <el-col :span="3" class="card_grid"></el-col>  
37 - </el-row>  
38 - </el-card>  
39 - 4 + <taskCard :task="task" v-for="task in taskList" @sendToParent="showTask" />
40 5
41 - <!--<el-table v-loading="loading" :data="tastList">  
42 - <el-table-column label="流程ID" align="center" prop="id"/>  
43 - <el-table-column label="流程名称" align="center" prop="instanceName" />  
44 - <el-table-column label="任务节点名称" align="center" prop="name" />  
45 - <el-table-column label="任务状态" align="center" prop="status" />  
46 - <el-table-column label="办理人" align="center" prop="assignee" />  
47 - <el-table-column label="创建时间" align="center" prop="createdDate" />  
48 -  
49 - <el-table-column label="操作" align="center" class-name="small-padding fixed-width">  
50 - <template slot-scope="scope">  
51 - <el-button size="mini" type="text" icon="el-icon-edit" @click="examineAndApprove (scope.row)"  
52 - v-hasPermi="['workflow:leave:edit']">审批  
53 - </el-button>  
54 - </template>  
55 - </el-table-column>  
56 - </el-table>-->  
57 -  
58 - <pagination :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" /> 6 + <pagination :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
  7 + @pagination="getList" />
59 8
60 <!-- 审批对话框 --> 9 <!-- 审批对话框 -->
61 <el-dialog :title="title" :visible.sync="open" v-if="open" width="500px" append-to-body> 10 <el-dialog :title="title" :visible.sync="open" v-if="open" width="500px" append-to-body>
@@ -78,26 +27,143 @@ @@ -78,26 +27,143 @@
78 </div> 27 </div>
79 </el-dialog> 28 </el-dialog>
80 29
81 - <el-dialog :title="title" :visible.sync="open2" width="500px" append-to-body>  
82 - <threestepInfo :businessKey="businessKey" v-if="open2"/>  
83 -  
84 - <el-form :model="form" ref="form" label-width="100px" class="demo-dynamic">  
85 - <el-form-item v-for="(domain, index) in form.formData" :label="domain.controlLable" :key="index">  
86 - <el-radio-group v-model="domain.controlValue" v-if="'radio'==domain.controlType">  
87 - <el-radio v-for="(defaults,indexd) in domain.controlDefault.split('--__--')" :label=indexd :key="indexd">  
88 - {{defaults}}  
89 - </el-radio>  
90 - </el-radio-group>  
91 - <el-input type="textarea" v-model="domain.controlValue" v-if="'textarea'==domain.controlType"></el-input>  
92 - </el-form-item> 30 + <el-dialog :title="title" :visible.sync="open2" width="800px" append-to-body>
  31 + <threestepInfo :businessKey="businessKey" v-if="open2" />
  32 + <el-form v-if="taskName == '巡查'" :rules="rules" label-width="120px">
  33 + <el-row type="flex" justify="center">
  34 + <el-col>
  35 + <el-form-item label="补充说明">
  36 + <el-input type="textarea" v-model="form.subReason" />
  37 + </el-form-item>
  38 + </el-col>
  39 + </el-row>
  40 + <el-row type="flex" justify="center">
  41 + <el-col :span="12">
  42 + <el-form-item label="渣管负责人">
  43 + <el-input v-model="form.earthPipPerson" />
  44 + </el-form-item>
  45 + </el-col>
  46 + <el-col :span="12">
  47 + <el-form-item label="执法负责人">
  48 + <el-input v-model="form.enforcePerson" />
  49 + </el-form-item>
  50 + </el-col>
  51 + </el-row>
  52 + <el-row type="flex" justify="center">
  53 + <el-col>
  54 + 上传补充材料:<a style="color:blue;font-size: 12px;" @click="picSample=true">示意图</a>
  55 + </el-col>
  56 + </el-row>
  57 + <el-row type="flex" justify="center" style="margin-top: 20px;">
  58 + <el-col :span="6">
  59 + <a style="color:blue;font-size: 12px;" @click="showFileUpload(0)">履职情况照片</a>
  60 + <el-input v-model="form.sub_img0" type="hidden"></el-input>
  61 + <p v-for="img in form.sub_img0">{{img.split(":")[0]}}<a @click="removeImage(0,img)" style="color:red"> x</a>
  62 + </p>
  63 + </el-col>
  64 + <el-col :span="6">
  65 + <a style="color:blue;font-size: 12px;" @click="showFileUpload(1)">水枪水嘴照片</a>
  66 + <el-input v-model="form.sub_img1" type="hidden"></el-input>
  67 + <p v-for="img in form.sub_img1">{{img.split(":")[0]}}<a @click="removeImage(1,img)" style="color:red"> x</a>
  68 + </p>
  69 + </el-col>
  70 + <el-col :span="6">
  71 + <a style="color:blue;font-size: 12px;" @click="showFileUpload(2)">照明照片</a>
  72 + <el-input v-model="form.sub_img2" type="hidden"></el-input>
  73 + <p v-for="img in form.sub_img2">{{img.split(":")[0]}}<a @click="removeImage(2,img)" style="color:red"> x</a>
  74 + </p>
  75 + </el-col>
  76 + <el-col :span="6">
  77 + <a style="color:blue;font-size: 12px;" @click="showFileUpload(3)">视频监控照片</a>
  78 + <el-input v-model="form.sub_img3" type="hidden"></el-input>
  79 + <p v-for="img in form.sub_img3">{{img.split(":")[0]}}<a @click="removeImage(3,img)" style="color:red"> x</a>
  80 + </p>
  81 + </el-col>
  82 + </el-row>
  83 + <el-row type="flex" justify="center">
  84 + <el-col :span="6">
  85 + <a style="color:blue;font-size: 12px;" @click="showFileUpload(4)">洗车机照片</a>
  86 + <el-input v-model="form.sub_img4" type="hidden"></el-input>
  87 + <p v-for="img in form.sub_img4">{{img.split(":")[0]}}<a @click="removeImage(4,img)" style="color:red"> x</a>
  88 + </p>
  89 + </el-col>
  90 + <el-col :span="6">
  91 + <a style="color:blue;font-size: 12px;" @click="showFileUpload(5)">摄像头视频截图1</a>
  92 + <el-input v-model="form.sub_img5" type="hidden"></el-input>
  93 + <p v-for="img in form.sub_img5">{{img.split(":")[0]}}<a @click="removeImage(5,img)" style="color:red"> x</a>
  94 + </p>
  95 + </el-col>
  96 + <el-col :span="6">
  97 + <a style="color:blue;font-size: 12px;" @click="showFileUpload(6)">摄像头视频截图2</a>
  98 + <el-input v-model="form.sub_img6" type="hidden"></el-input>
  99 + <p v-for="img in form.sub_img6">{{img.split(":")[0]}}<a @click="removeImage(6,img)" style="color:red"> x</a>
  100 + </p>
  101 + </el-col>
  102 + <el-col :span="6">
  103 + <a style="color:blue;font-size: 12px;" @click="showFileUpload(7)">摄像头视频截图3</a>
  104 + <el-input v-model="form.sub_img7" type="hidden"></el-input>
  105 + <p v-for="img in form.sub_img7">{{img.split(":")[0]}}<a @click="removeImage(7,img)" style="color:red"> x</a>
  106 + </p>
  107 + </el-col>
  108 + </el-row>
  109 + <el-row type="flex" justify="center">
  110 + <el-col :span="5">
  111 + <a style="color:blue;font-size: 12px;" @click="showFileUpload(8)">其他1</a>
  112 + <el-input v-model="form.sub_img8" type="hidden"></el-input>
  113 + <p v-for="img in form.sub_img8">{{img.split(":")[0]}}<a @click="removeImage(8,img)" style="color:red"> x</a>
  114 + </p>
  115 + </el-col>
  116 + <el-col :span="5">
  117 + <a style="color:blue;font-size: 12px;" @click="showFileUpload(9)">其他2</a>
  118 + <el-input v-model="form.sub_img9" type="hidden"></el-input>
  119 + <p v-for="img in form.sub_img9">{{img.split(":")[0]}}<a @click="removeImage(9,img)" style="color:red"> x</a>
  120 + </p>
  121 + </el-col>
  122 + <el-col :span="5">
  123 + <a style="color:blue;font-size: 12px;" @click="showFileUpload(10)">其他3</a>
  124 + <el-input v-model="form.sub_img10" type="hidden"></el-input>
  125 + <p v-for="img in form.sub_img10">{{img.split(":")[0]}}<a @click="removeImage(10,img)" style="color:red">
  126 + x</a>
  127 + </p>
  128 + </el-col>
  129 + <el-col :span="5">
  130 + <a style="color:blue;font-size: 12px;" @click="showFileUpload(11)">其他4</a>
  131 + <el-input v-model="form.sub_img11" type="hidden"></el-input>
  132 + <p v-for="img in form.sub_img11">{{img.split(":")[0]}}<a @click="removeImage(11,img)" style="color:red">
  133 + x</a>
  134 + </p>
  135 + </el-col>
  136 + <el-col :span="4">
  137 + <a style="color:blue;font-size: 12px;" @click="showFileUpload(12)">其他5</a>
  138 + <el-input v-model="form.sub_img12" type="hidden"></el-input>
  139 + <p v-for="img in form.sub_img12">{{img.split(":")[0]}}<a @click="removeImage(12,img)" style="color:red">
  140 + x</a>
  141 + </p>
  142 + </el-col>
  143 + </el-row>
93 </el-form> 144 </el-form>
94 145
  146 +
95 <div slot="footer" class="dialog-footer"> 147 <div slot="footer" class="dialog-footer">
96 - <el-button type="primary" @click="submitForm">确 定</el-button>  
97 - <el-button @click="cancel">取 消</el-button> 148 + <el-button type="danger" @click="submitForm(form.formData[0].controlId ,1)">驳回</el-button>
  149 + <el-button type="primary" @click="submitForm(form.formData[0].controlId ,0)">通过</el-button>
  150 + </div>
  151 + </el-dialog>
  152 +
  153 + <el-dialog title="附件" :visible.sync="uploadImageDialog" append-to-body :beforeClose="handleClose">
  154 + <el-upload multiple :headers="upload.headers" :action="upload.url" :file-list="fileList"
  155 + :on-success="uploadSuccess" :before-upload="beforeUpload">
  156 + <el-button size="small" type="primary">选择附件</el-button>
  157 + <div slot="tip" class="el-upload__tip">只能上传不超过 20MB 的jpg pdf word文件</div>
  158 + </el-upload>
  159 + <div style="height: 40px;width:100%;">
  160 + <el-button type="primary" style="margin-top: 20px;float:right;" @click="handleClose">关闭</el-button>
98 </div> 161 </div>
99 </el-dialog> 162 </el-dialog>
100 163
  164 + <el-dialog title="示意图" :visible.sync="picSample" append-to-body>
  165 + <img src="../../../assets/logo/logo.jpg" width="100%" height="800px" />
  166 + </el-dialog>
101 </div> 167 </div>
102 </template> 168 </template>
103 169
@@ -111,12 +177,24 @@ @@ -111,12 +177,24 @@
111 formDataShow, 177 formDataShow,
112 formDataSave 178 formDataSave
113 } from "@/api/activiti/task"; 179 } from "@/api/activiti/task";
  180 +
  181 + import {
  182 + updateThreestep,
  183 + activeThreestep
  184 + } from "@/api/business/threestep";
  185 +
114 import leaveHistoryForm from "@/views/workflow/leaveHistoryForm"; 186 import leaveHistoryForm from "@/views/workflow/leaveHistoryForm";
115 import threestepInfo from "@/views/business/threestep/threestepInfo"; 187 import threestepInfo from "@/views/business/threestep/threestepInfo";
  188 + import taskCard from "@/views/activiti/task/taskCard";
  189 + import {
  190 + getToken
  191 + } from "@/utils/auth";
  192 +
116 193
117 export default { 194 export default {
118 name: "task", 195 name: "task",
119 components: { 196 components: {
  197 + taskCard,
120 leaveHistoryForm, 198 leaveHistoryForm,
121 threestepInfo 199 threestepInfo
122 }, 200 },
@@ -138,11 +216,14 @@ @@ -138,11 +216,14 @@
138 // 总条数 216 // 总条数
139 total: 0, 217 total: 0,
140 // 请假表格数据 218 // 请假表格数据
141 - tastList: [], 219 + taskList: [],
142 // 弹出层标题 220 // 弹出层标题
143 title: "", 221 title: "",
144 // 是否显示弹出层 222 // 是否显示弹出层
145 open: false, 223 open: false,
  224 + open2: false,
  225 + picSample: false,
  226 + taskName: null,
146 // 查询参数 227 // 查询参数
147 queryParams: { 228 queryParams: {
148 pageNum: 1, 229 pageNum: 1,
@@ -152,32 +233,79 @@ @@ -152,32 +233,79 @@
152 form: { 233 form: {
153 formData: [] 234 formData: []
154 }, 235 },
155 - needShow:false, 236 + needShow: false,
156 // 表单校验 237 // 表单校验
157 - rules: {},  
158 - threestep_type:{  
159 - "0":"工地",  
160 - "1":"工地", 238 + rules: {
  239 + subReason: [{
  240 + required: true,
  241 + message: '请填写补充说明',
  242 + trigger: 'blur'
  243 + }, ],
  244 +
  245 + },
  246 + picIndex: 0,
  247 + fileList: [],
  248 + upload: {
  249 + // 是否显示弹出层(用户导入)
  250 + open: false,
  251 + // 弹出层标题(用户导入)
  252 + title: "",
  253 + // 是否禁用上传
  254 + isUploading: false,
  255 + // 设置上传的请求头部
  256 + headers: {
  257 + Authorization: "Bearer " + getToken()
  258 + },
  259 + // 上传的地址
  260 + url: process.env.VUE_APP_BASE_API + "/business/threestep/upload",
161 }, 261 },
  262 + uploadImageDialog: false,
162 }; 263 };
163 }, 264 },
164 created() { 265 created() {
165 this.getList(); 266 this.getList();
166 }, 267 },
167 methods: { 268 methods: {
168 - /** 查询请假列表 */ 269 + handleClose() {
  270 + this.uploadImageDialog = false;
  271 + this.fileList = [];
  272 + },
  273 + removeImage(index, img) {
  274 + let target = "sub_img" + this.picIndex;
  275 + this.form[target].splice(this.form[target].indexOf(img), 1);
  276 + },
  277 + uploadSuccess(res, file, fileList) {
  278 + let target = "sub_img" + this.picIndex;
  279 + if (!this.form[target]) {
  280 + this.form[target] = [];
  281 + }
  282 + this.form[target].push(file.name + ':' + res);
  283 +
  284 + },
  285 + showFileUpload(i) {
  286 + this.uploadImageDialog = true;
  287 + this.picIndex = i;
  288 + },
  289 + beforeUpload(file) {
  290 + let isRightSize = file.size / 1024 / 1024 < 20
  291 + if (!isRightSize) {
  292 + this.$message.error('文件大小超过 20MB')
  293 + return isRightSize;
  294 + }
  295 + let isAccept = false;
  296 + if (file.name.indexOf('.docx') > -1 || file.name.indexOf(".jpg") > -1 || file.name.indexOf('.doc') > -1 || file
  297 + .name.indexOf('.pdf') > -1) {
  298 + isAccept = true;
  299 + }
  300 + if (!isAccept) {
  301 + this.$message.error('应该选择PDF、JPG、WORD类型的文件')
  302 + return isAccept;
  303 + }
  304 + },
169 getList() { 305 getList() {
170 this.loading = true; 306 this.loading = true;
171 listTask(this.queryParams).then(response => { 307 listTask(this.queryParams).then(response => {
172 -  
173 - for(let i = 0 ; i < response.rows.length;i++){  
174 - if(response.rows[i].definitionKey == "workflow_threestep"){  
175 - response.rows[i].type = this.threestep_type[response.rows[i].type];  
176 - }  
177 - }  
178 -  
179 - this.tastList = response.rows;  
180 - 308 + this.taskList = response.rows;
181 this.total = response.total; 309 this.total = response.total;
182 this.loading = false; 310 this.loading = false;
183 }); 311 });
@@ -198,44 +326,12 @@ @@ -198,44 +326,12 @@
198 }; 326 };
199 this.resetForm("form"); 327 this.resetForm("form");
200 }, 328 },
201 - agreeAndDismiss(row,idx){  
202 - this.definitionKey = row.definitionKey;  
203 - this.businessKey = row.businessKey;  
204 - this.id = row.id;  
205 - formDataShow(row.id).then(response => {  
206 - let datas = response.data;  
207 - let formData = []  
208 - for (let i = 0; i < datas.length; i++) {  
209 - let strings = datas[i].split('--__!!')  
210 - let controlValue = null  
211 - let controlDefault = null  
212 - switch (strings[1]) {  
213 - case 'radio':  
214 - controlValue = idx;  
215 - controlDefault = strings[4]  
216 - break;  
217 - }  
218 - formData.push({  
219 - controlId: strings[0],  
220 - controlType: strings[1],  
221 - controlLable: strings[2],  
222 - controlIsParam: strings[3],  
223 - controlValue: controlValue,  
224 - controlDefault: controlDefault  
225 - })  
226 - }  
227 - debugger;  
228 - this.form.formData = formData;  
229 - this.submitForm();  
230 - });  
231 -  
232 - },  
233 - /** 审批按钮操作 */  
234 - examineAndApprove(row,idx) { 329 + showTask(row, idx) {
235 this.reset(); 330 this.reset();
236 this.definitionKey = row.definitionKey; 331 this.definitionKey = row.definitionKey;
237 this.businessKey = row.businessKey; 332 this.businessKey = row.businessKey;
238 this.id = row.id; 333 this.id = row.id;
  334 + this.taskName = row.name;
239 formDataShow(row.id).then(response => { 335 formDataShow(row.id).then(response => {
240 let datas = response.data; 336 let datas = response.data;
241 let formData = [] 337 let formData = []
@@ -261,24 +357,67 @@ @@ -261,24 +357,67 @@
261 } 357 }
262 this.form.formData = formData; 358 this.form.formData = formData;
263 359
264 - if(this.definitionKey == "workflow_threestep"){ 360 + if (this.definitionKey == "workflow_threestep") {
265 this.open2 = true; 361 this.open2 = true;
266 return; 362 return;
267 } 363 }
268 -  
269 -  
270 this.open = true; 364 this.open = true;
271 this.title = "审批"; 365 this.title = "审批";
272 -  
273 }); 366 });
274 }, 367 },
275 /** 提交按钮 */ 368 /** 提交按钮 */
276 - submitForm() {  
277 - formDataSave(this.id, this.form.formData).then(response => { 369 + submitForm(formid, value) {
  370 +
  371 + this.form.formData[0].controlValue = value;
  372 + this.form.formData[0].controlId = formid;
  373 +
  374 + if (this.definitionKey == "workflow_threestep") {
  375 + this.form.id = this.businessKey.split(":")[1];
  376 + if (this.form.formData[0].controlValue == 0) {
  377 + this.form.status = 1;
  378 + } else {
  379 + this.form.status = 2;
  380 + }
  381 +
  382 + for (let i = 0; i < 13; i++) {
  383 + if (this.form["sub_img" + i]) {
  384 + let paths = "";
  385 + for (var j = 0; j < this.form["sub_img" + i].length; j++) {
  386 + paths += this.form["sub_img" + i][j].split(":")[1] + ",";
  387 + }
  388 + this.form["sub_img" + i] = paths.substring(0, paths.length - 1);
  389 + }
  390 + }
  391 +
  392 + this.form.checkTime = new Date();
  393 + if (this.form.status == 1) {
  394 + activeThreestep(this.form).then(res => {
  395 + formDataSave(this.id, this.form.formData).then(response => {
  396 + this.msgSuccess("审批成功");
  397 + this.open2 = false;
  398 + this.taskList = [];
  399 + this.getList();
  400 + });
  401 + });
  402 + } else {
  403 + updateThreestep(this.form).then(res => {
  404 + formDataSave(this.id, this.form.formData).then(response => {
  405 + this.msgSuccess("审批成功");
  406 + this.open2 = false;
  407 + this.taskList = [];
  408 + this.getList();
  409 + });
  410 + });
  411 + }
  412 + }
  413 +
  414 +
  415 +
  416 + /* formDataSave(this.id, this.form.formData).then(response => {
278 this.msgSuccess("审批成功"); 417 this.msgSuccess("审批成功");
279 this.open = false; 418 this.open = false;
280 this.getList(); 419 this.getList();
281 - }); 420 + }); */
282 }, 421 },
283 } 422 }
284 }; 423 };
trash-ui/src/views/activiti/task/taskCard.vue 0 → 100644
  1 +<template>
  2 + <el-card class="box-card">
  3 + <div
  4 + :class="{card_status:true,notcheck:!task.checkStatus,dismiss:task.checkStatus=='1',agree:task.checkStatus=='0'}">
  5 + {{task.checkStatus? task.checkStatus=="0"?"已同意":"已拒绝" : "待审批"}}</div>
  6 + <div class="card_btn">
  7 + <a @click="sendToParent(task)">详情>></a>
  8 + </div>
  9 + <el-row class="card_row">
  10 + <el-col :span="2" class="card_grid"></el-col>
  11 + <div class="card_title">{{task.instanceName}}</div>
  12 + </el-row>
  13 +
  14 + <el-row class="card_row">
  15 + <el-col :span="3" class="card_grid"></el-col>
  16 + <el-col :span="6" class="card_grid">
  17 + <div>开始时间: {{task.startTime}}</div>
  18 + </el-col>
  19 + <el-col :span="6" class="card_grid center">
  20 + <div>结束时间: {{task.endTime}}</div>
  21 + </el-col>
  22 + <el-col :span="6" class="card_grid right">
  23 + <div>申请类型: {{task.type}}</div>
  24 + </el-col>
  25 + <el-col :span="3" class="card_grid"></el-col>
  26 + </el-row>
  27 + <el-row class="card_row">
  28 + <el-col :span="3" class="card_grid">
  29 + <div></div>
  30 + </el-col>
  31 + <el-col :span="18">
  32 + <div>申请理由: {{task.reason}}</div>
  33 + </el-col>
  34 + <el-col :span="3" class="card_grid"></el-col>
  35 + </el-row>
  36 + </el-card>
  37 +</template>
  38 +
  39 +<script>
  40 + export default {
  41 + name: "taskCard",
  42 + props: {
  43 + task: {
  44 + type: Object
  45 + },
  46 + },
  47 +
  48 + data() {
  49 + return {
  50 +
  51 + threestep_type:{
  52 + "0":"工地",
  53 + "1":"消纳场",
  54 + },
  55 + }
  56 + },
  57 + created() {
  58 +
  59 + if (this.task.definitionKey == "workflow_threestep") {
  60 + this.task.type = this.threestep_type[this.task.type];
  61 + }
  62 + },
  63 + methods: {
  64 + sendToParent(task) {
  65 + this.$emit("sendToParent", task);
  66 + },
  67 +
  68 + }
  69 + }
  70 +</script>
  71 +
  72 +<style>
  73 +</style>
trash-ui/src/views/activiti/taskhistory/end.vue
1 <template> 1 <template>
2 <div class="app-container"> 2 <div class="app-container">
3 3
4 - <el-card class="box-card" v-for="task in tastList">  
5 - <div :class="{card_status:true,dismiss:task.checkStatus=='1',agree:task.checkStatus=='0'}">{{task.checkStatus=="0"?"已同意":"已拒绝"}}</div>  
6 - <div class="card_btn">  
7 - <a @click="examineAndApprove(task,-1)" >详情>></a>  
8 - </div>  
9 - <el-row class="card_row">  
10 - <el-col :span="2" class="card_grid"></el-col>  
11 - <div class="card_title">{{task.instanceName}}</div>  
12 - </el-row>  
13 -  
14 - <el-row class="card_row">  
15 - <el-col :span="3" class="card_grid"></el-col>  
16 - <el-col :span="6" class="card_grid">  
17 - <div>开始时间: {{task.startTime}}</div>  
18 - </el-col>  
19 - <el-col :span="6" class="card_grid center">  
20 - <div>结束时间: {{task.endTime}}</div>  
21 - </el-col>  
22 - <el-col :span="6" class="card_grid right">  
23 - <div>申请类型: {{task.type}}</div>  
24 - </el-col>  
25 - <el-col :span="3" class="card_grid"></el-col>  
26 - </el-row>  
27 - <el-row class="card_row">  
28 - <el-col :span="3" class="card_grid">  
29 - <div></div>  
30 - </el-col>  
31 - <el-col :span="18">  
32 - <div>申请理由: {{task.reason}}</div>  
33 - </el-col>  
34 - <el-col :span="3" class="card_grid"></el-col>  
35 - </el-row>  
36 - </el-card>  
37 -  
38 -  
39 - <!--<el-table v-loading="loading" :data="tastList">  
40 - <el-table-column label="流程ID" align="center" prop="id"/>  
41 - <el-table-column label="流程名称" align="center" prop="instanceName" />  
42 - <el-table-column label="任务节点名称" align="center" prop="name" />  
43 - <el-table-column label="任务状态" align="center" prop="status" />  
44 - <el-table-column label="办理人" align="center" prop="assignee" />  
45 - <el-table-column label="创建时间" align="center" prop="createdDate" />  
46 -  
47 - <el-table-column label="操作" align="center" class-name="small-padding fixed-width">  
48 - <template slot-scope="scope">  
49 - <el-button size="mini" type="text" icon="el-icon-edit" @click="examineAndApprove (scope.row)"  
50 - v-hasPermi="['workflow:leave:edit']">审批  
51 - </el-button>  
52 - </template>  
53 - </el-table-column>  
54 - </el-table>--> 4 + <taskCard :task="task" v-for="task in taskList" @sendToParent="showTask"/>
55 5
56 <pagination :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" /> 6 <pagination :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
57 7
58 - <!-- 查看详细信息话框 -->  
59 - <el-dialog :title="title" :visible.sync="open" append-to-body>  
60 - <earthSitesForm :businessKey="businessKey" v-if="open"/>  
61 - <div slot="footer" class="dialog-footer">  
62 - <el-button @click="open=!open">关闭</el-button>  
63 - </div>  
64 - </el-dialog> 8 + <el-dialog :title="title" :visible.sync="open2" width="800px" append-to-body>
  9 + <threestepInfo :businessKey="businessKey" v-if="open2"/>
  10 +
  11 + </el-dialog>
65 12
66 </div> 13 </div>
67 </template> 14 </template>
68 15
  16 +
69 <style> 17 <style>
70 @import '../../../assets/css/task.css' 18 @import '../../../assets/css/task.css'
71 </style> 19 </style>
@@ -75,13 +23,16 @@ @@ -75,13 +23,16 @@
75 listEndTask, 23 listEndTask,
76 formDataShow 24 formDataShow
77 } from "@/api/activiti/taskhistory"; 25 } from "@/api/activiti/taskhistory";
78 - import leaveHistoryForm from "@/views/workflow/leaveHistoryForm"; 26 +
  27 + import taskCard from "@/views/activiti/task/taskCard";
79 import earthSitesForm from "@/views/workflow/earthSitesForm"; 28 import earthSitesForm from "@/views/workflow/earthSitesForm";
  29 + import threestepInfo from "@/views/business/threestep/threestepInfo";
80 30
81 export default { 31 export default {
82 name: "taskHistory", 32 name: "taskHistory",
83 components: { 33 components: {
84 - leaveHistoryForm, 34 + taskCard,
  35 + threestepInfo,
85 earthSitesForm 36 earthSitesForm
86 }, 37 },
87 data() { 38 data() {
@@ -102,7 +53,7 @@ @@ -102,7 +53,7 @@
102 // 总条数 53 // 总条数
103 total: 0, 54 total: 0,
104 // 请假表格数据 55 // 请假表格数据
105 - tastList: [], 56 + taskList: [],
106 // 弹出层标题 57 // 弹出层标题
107 title: "", 58 title: "",
108 // 是否显示弹出层 59 // 是否显示弹出层
@@ -112,6 +63,8 @@ @@ -112,6 +63,8 @@
112 pageNum: 1, 63 pageNum: 1,
113 pageSize: 10, 64 pageSize: 10,
114 }, 65 },
  66 +
  67 + open2:false,
115 // 表单参数 68 // 表单参数
116 form: { 69 form: {
117 formData: [] 70 formData: []
@@ -129,7 +82,7 @@ @@ -129,7 +82,7 @@
129 getList() { 82 getList() {
130 this.loading = true; 83 this.loading = true;
131 listEndTask(this.queryParams).then(response => { 84 listEndTask(this.queryParams).then(response => {
132 - this.tastList = response.rows; 85 + this.taskList = response.rows;
133 this.total = response.total; 86 this.total = response.total;
134 this.loading = false; 87 this.loading = false;
135 }); 88 });
@@ -149,46 +102,21 @@ @@ -149,46 +102,21 @@
149 }; 102 };
150 this.resetForm("form"); 103 this.resetForm("form");
151 }, 104 },
152 - examineAndApprove(row,idx) { 105 + showTask(row) {
153 this.needShow = false; 106 this.needShow = false;
154 this.reset(); 107 this.reset();
155 this.definitionKey = row.definitionKey; 108 this.definitionKey = row.definitionKey;
156 this.businessKey = row.businessKey; 109 this.businessKey = row.businessKey;
157 this.id = row.id; 110 this.id = row.id;
158 - this.open = true; 111 +
159 this.title = "详情"; 112 this.title = "详情";
160 - /* formDataShow(this.id).then(response => {  
161 - // FormProperty_3qipis2--__!!radio--__!!审批意见--__!!i--__!!同意--__--不同意  
162 - // FormProperty_0lffpcm--__!!textarea--__!!批注--__!!f--__!!null  
163 - let datas = response.data;  
164 - let formData = []  
165 - for (let i = 0; i < datas.length; i++) {  
166 - let strings = datas[i].split('--__!!')  
167 - let controlValue = null  
168 - let controlDefault = null  
169 - switch (strings[1]) {  
170 - case 'radio':  
171 - controlValue = idx;  
172 - controlDefault = strings[4]  
173 - break;  
174 - // default:  
175 - }  
176 113
177 - if(idx == -1){  
178 - this.needShow = true;  
179 - } 114 + if(this.definitionKey == "workflow_threestep"){
  115 + this.open2 = true;
  116 + return;
  117 + }
180 118
181 - formData.push({  
182 - controlId: strings[0],  
183 - controlType: strings[1],  
184 - controlLable: strings[2],  
185 - controlIsParam: strings[3],  
186 - controlValue: controlValue,  
187 - controlDefault: controlDefault  
188 - })  
189 - }  
190 - this.form.formData = formData;  
191 - }); */ 119 + this.open = true;
192 }, 120 },
193 } 121 }
194 }; 122 };
trash-ui/src/views/activiti/taskhistory/index.vue
1 <template> 1 <template>
2 <div class="app-container"> 2 <div class="app-container">
3 3
4 - <el-card class="box-card" v-for="task in tastList">  
5 - <div :class="{card_status:true,dismiss:task.checkStatus=='1',agree:task.checkStatus=='0'}">{{task.checkStatus=="0"?"已同意":"已拒绝"}}</div>  
6 - <div class="card_btn">  
7 - <a @click="examineAndApprove(task,-1)" >详情>></a>  
8 - </div>  
9 - <el-row class="card_row">  
10 - <el-col :span="2" class="card_grid"></el-col>  
11 - <div class="card_title">{{task.instanceName}}</div>  
12 - </el-row>  
13 -  
14 - <el-row class="card_row">  
15 - <el-col :span="3" class="card_grid"></el-col>  
16 - <el-col :span="6" class="card_grid">  
17 - <div>开始时间: {{task.startTime}}</div>  
18 - </el-col>  
19 - <el-col :span="6" class="card_grid center">  
20 - <div>结束时间: {{task.endTime}}</div>  
21 - </el-col>  
22 - <el-col :span="6" class="card_grid right">  
23 - <div>申请类型: {{task.type}}</div>  
24 - </el-col>  
25 - <el-col :span="3" class="card_grid"></el-col>  
26 - </el-row>  
27 - <el-row class="card_row">  
28 - <el-col :span="3" class="card_grid">  
29 - <div></div>  
30 - </el-col>  
31 - <el-col :span="18">  
32 - <div>申请理由: {{task.reason}}</div>  
33 - </el-col>  
34 - <el-col :span="3" class="card_grid"></el-col>  
35 - </el-row>  
36 - </el-card>  
37 -  
38 -  
39 - <!--<el-table v-loading="loading" :data="tastList">  
40 - <el-table-column label="流程ID" align="center" prop="id"/>  
41 - <el-table-column label="流程名称" align="center" prop="instanceName" />  
42 - <el-table-column label="任务节点名称" align="center" prop="name" />  
43 - <el-table-column label="任务状态" align="center" prop="status" />  
44 - <el-table-column label="办理人" align="center" prop="assignee" />  
45 - <el-table-column label="创建时间" align="center" prop="createdDate" />  
46 -  
47 - <el-table-column label="操作" align="center" class-name="small-padding fixed-width">  
48 - <template slot-scope="scope">  
49 - <el-button size="mini" type="text" icon="el-icon-edit" @click="examineAndApprove (scope.row)"  
50 - v-hasPermi="['workflow:leave:edit']">审批  
51 - </el-button>  
52 - </template>  
53 - </el-table-column>  
54 - </el-table>--> 4 + <taskCard :task="task" v-for="task in taskList" @sendToParent="showTask"/>
55 5
56 <pagination :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" /> 6 <pagination :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
57 7
58 - <!-- 查看详细信息话框 -->  
59 - <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>  
60 - <leaveHistoryForm :businessKey="businessKey" v-if="open"/>  
61 - <div slot="footer" class="dialog-footer">  
62 - <el-button @click="open=!open">关闭</el-button>  
63 - </div>  
64 - </el-dialog> 8 + <el-dialog :title="title" :visible.sync="open2" width="800px" append-to-body>
  9 + <threestepInfo :businessKey="businessKey" v-if="open2"/>
  10 +
  11 + </el-dialog>
65 12
66 </div> 13 </div>
67 </template> 14 </template>
@@ -75,12 +22,17 @@ @@ -75,12 +22,17 @@
75 listTask, 22 listTask,
76 formDataShow 23 formDataShow
77 } from "@/api/activiti/taskhistory"; 24 } from "@/api/activiti/taskhistory";
  25 +
  26 + import taskCard from "@/views/activiti/task/taskCard";
78 import leaveHistoryForm from "@/views/workflow/leaveHistoryForm"; 27 import leaveHistoryForm from "@/views/workflow/leaveHistoryForm";
  28 + import threestepInfo from "@/views/business/threestep/threestepInfo";
79 29
80 export default { 30 export default {
81 name: "taskHistory", 31 name: "taskHistory",
82 components: { 32 components: {
83 - leaveHistoryForm 33 + taskCard,
  34 + leaveHistoryForm,
  35 + threestepInfo
84 }, 36 },
85 data() { 37 data() {
86 return { 38 return {
@@ -100,11 +52,12 @@ @@ -100,11 +52,12 @@
100 // 总条数 52 // 总条数
101 total: 0, 53 total: 0,
102 // 请假表格数据 54 // 请假表格数据
103 - tastList: [], 55 + taskList: [],
104 // 弹出层标题 56 // 弹出层标题
105 title: "", 57 title: "",
106 // 是否显示弹出层 58 // 是否显示弹出层
107 open: false, 59 open: false,
  60 + open2:false,
108 // 查询参数 61 // 查询参数
109 queryParams: { 62 queryParams: {
110 pageNum: 1, 63 pageNum: 1,
@@ -127,7 +80,7 @@ @@ -127,7 +80,7 @@
127 getList() { 80 getList() {
128 this.loading = true; 81 this.loading = true;
129 listTask(this.queryParams).then(response => { 82 listTask(this.queryParams).then(response => {
130 - this.tastList = response.rows; 83 + this.taskList = response.rows;
131 this.total = response.total; 84 this.total = response.total;
132 this.loading = false; 85 this.loading = false;
133 }); 86 });
@@ -147,46 +100,13 @@ @@ -147,46 +100,13 @@
147 }; 100 };
148 this.resetForm("form"); 101 this.resetForm("form");
149 }, 102 },
150 - examineAndApprove(row,idx) { 103 + showTask(row,idx) {
151 this.needShow = false; 104 this.needShow = false;
152 this.reset(); 105 this.reset();
153 this.definitionKey = row.definitionKey; 106 this.definitionKey = row.definitionKey;
154 this.businessKey = row.businessKey; 107 this.businessKey = row.businessKey;
155 this.id = row.id; 108 this.id = row.id;
156 - formDataShow(row.id).then(response => {  
157 - // FormProperty_3qipis2--__!!radio--__!!审批意见--__!!i--__!!同意--__--不同意  
158 - // FormProperty_0lffpcm--__!!textarea--__!!批注--__!!f--__!!null  
159 - let datas = response.data;  
160 - let formData = []  
161 - for (let i = 0; i < datas.length; i++) {  
162 - let strings = datas[i].split('--__!!')  
163 - let controlValue = null  
164 - let controlDefault = null  
165 - switch (strings[1]) {  
166 - case 'radio':  
167 - controlValue = idx;  
168 - controlDefault = strings[4]  
169 - break;  
170 - // default:  
171 - }  
172 -  
173 - if(idx == -1){  
174 - this.needShow = true;  
175 - }  
176 -  
177 - formData.push({  
178 - controlId: strings[0],  
179 - controlType: strings[1],  
180 - controlLable: strings[2],  
181 - controlIsParam: strings[3],  
182 - controlValue: controlValue,  
183 - controlDefault: controlDefault  
184 - })  
185 - }  
186 - this.form.formData = formData;  
187 - this.open = true;  
188 - this.title = "审批";  
189 - }); 109 + this.open2 = true;
190 }, 110 },
191 /** 提交按钮 */ 111 /** 提交按钮 */
192 submitForm() { 112 submitForm() {
trash-ui/src/views/business/CompanyCredit/index.vue
@@ -31,9 +31,18 @@ @@ -31,9 +31,18 @@
31 </el-col> 31 </el-col>
32 <el-col> 32 <el-col>
33 <el-form-item label="所属区域" prop="place"> 33 <el-form-item label="所属区域" prop="place">
34 - <el-select v-model="queryParams.place" placeholder="所属区域" clearable size="small">  
35 - <el-option label="请选择字典生成" value="" />  
36 - </el-select> 34 + <el-select v-model="queryParams.place" placeholder="所属区域"
  35 + filterable
  36 + reserve-keyword
  37 + clearable
  38 + size="small"
  39 + :loading="loading">
  40 + <el-option
  41 + v-for="item in dictPlaces"
  42 + :label="item"
  43 + :value="item">
  44 + </el-option>
  45 + </el-select>
37 </el-form-item> 46 </el-form-item>
38 </el-col> 47 </el-col>
39 </el-row> 48 </el-row>
@@ -98,31 +107,22 @@ @@ -98,31 +107,22 @@
98 reserve-keyword 107 reserve-keyword
99 placeholder="运输企业"> 108 placeholder="运输企业">
100 <el-option 109 <el-option
101 - @click.native="getObjId(item.id)"  
102 - v-for="item in names"  
103 - :key="item.value"  
104 - :label="item.label"  
105 - :value="item.label"> 110 + @click.native="getObjId(item)"
  111 + v-for="item in companyList"
  112 + :key="item.id"
  113 + :label="item.name"
  114 + :value="item.name">
106 </el-option> 115 </el-option>
107 </el-select> 116 </el-select>
108 </el-form-item> 117 </el-form-item>
109 118
110 <el-form-item label="所属区域" prop="place"> 119 <el-form-item label="所属区域" prop="place">
111 - <el-select 120 + <el-input
112 v-model="form.place" 121 v-model="form.place"
113 - filterable  
114 - reserve-keyword  
115 - placeholder="所属区域">  
116 - <el-option  
117 - v-for="item in places"  
118 - :key="item.id"  
119 - :label="item.label"  
120 - :value="item.value">  
121 - </el-option>  
122 - </el-select> 122 + placeholder="所属区域" disabled />
123 </el-form-item> 123 </el-form-item>
124 <el-form-item label="失信原因" prop="reason"> 124 <el-form-item label="失信原因" prop="reason">
125 - <el-input v-model="form.reason" placeholder="失信原因" /> 125 + <el-input v-model="form.reason" placeholder="失信原因" />
126 </el-form-item> 126 </el-form-item>
127 <el-input v-model="form.lostCredit" value="1" type="hidden" /> 127 <el-input v-model="form.lostCredit" value="1" type="hidden" />
128 <el-input v-model="form.objectId" type="hidden" /> 128 <el-input v-model="form.objectId" type="hidden" />
@@ -174,8 +174,14 @@ @@ -174,8 +174,14 @@
174 updateCredit, 174 updateCredit,
175 exportCredit, 175 exportCredit,
176 getNames, 176 getNames,
  177 + getPlaces,
177 historyCredit 178 historyCredit
178 - } from "@/api/business/credit2"; 179 + } from "@/api/business/company";
  180 +
  181 + import {
  182 + companyList
  183 + } from "@/api/dict";
  184 +
179 185
180 export default { 186 export default {
181 name: "Credit", 187 name: "Credit",
@@ -197,24 +203,9 @@ @@ -197,24 +203,9 @@
197 // 工地表格数据 203 // 工地表格数据
198 creditList: [], 204 creditList: [],
199 creditListInfo: [], 205 creditListInfo: [],
  206 + companyList:[],
200 dictNames:[], 207 dictNames:[],
201 - dictTypes:[],  
202 dictPlaces:[], 208 dictPlaces:[],
203 - names:[{label:"运输企业A",value:"运输企业A",id:"A"},  
204 - {label:"运输企业B",value:"运输企业B",id:"B"},  
205 - {label:"运输企业C",value:"运输企业C",id:"C"},  
206 - {label:"运输企业D",value:"运输企业D",id:"D"},  
207 - {label:"运输企业E",value:"运输企业E",id:"E"}],  
208 - types:[{label:"运输企业A",value:"运输企业A",id:"A"},  
209 - {label:"运输企业B",value:"运输企业B",id:"B"},  
210 - {label:"运输企业C",value:"运输企业C",id:"C"},  
211 - {label:"运输企业D",value:"运输企业D",id:"D"},  
212 - {label:"运输企业E",value:"运输企业E",id:"E"}],  
213 - places:[{label:"运输企业A",value:"运输企业A",id:"A"},  
214 - {label:"运输企业B",value:"运输企业B",id:"B"},  
215 - {label:"运输企业C",value:"运输企业C",id:"C"},  
216 - {label:"运输企业D",value:"运输企业D",id:"D"},  
217 - {label:"运输企业E",value:"运输企业E",id:"E"}],  
218 // 弹出层标题 209 // 弹出层标题
219 title: "", 210 title: "",
220 // 是否显示弹出层 211 // 是否显示弹出层
@@ -247,10 +238,28 @@ @@ -247,10 +238,28 @@
247 }; 238 };
248 }, 239 },
249 created() { 240 created() {
250 - this.getList();  
251 - this.getNamesData(); 241 + this.init();
252 }, 242 },
253 methods: { 243 methods: {
  244 + init(){
  245 + this.getList();
  246 + getNames(this.queryParams).then(response => {
  247 + this.dictNames = response;
  248 + });
  249 + getPlaces(this.queryParams).then(response => {
  250 + this.dictPlaces = response;
  251 + });
  252 +
  253 + let query = {
  254 + 'page':1,
  255 + 'size':9999,
  256 + 'creditStatus':0
  257 + }
  258 + companyList(query).then(response => {
  259 +
  260 + this.companyList = response.result.list;
  261 + });
  262 + },
254 getDataInfo(row){ 263 getDataInfo(row){
255 console.log(row); 264 console.log(row);
256 265
@@ -262,11 +271,6 @@ @@ -262,11 +271,6 @@
262 }); 271 });
263 272
264 }, 273 },
265 - getNamesData(){  
266 - getNames(this.queryParams).then(response => {  
267 - this.dictNames = response;  
268 - });  
269 - },  
270 getData(stauts){ 274 getData(stauts){
271 this.queryParams.status=0; 275 this.queryParams.status=0;
272 this.queryParams.lostCredit=stauts; 276 this.queryParams.lostCredit=stauts;
@@ -282,7 +286,8 @@ @@ -282,7 +286,8 @@
282 } 286 }
283 }, 287 },
284 getObjId(a){ 288 getObjId(a){
285 - this.form.objectId = a; 289 + this.form.objectId = a.id;
  290 + this.form.place = a.areaName;
286 }, 291 },
287 getList() { 292 getList() {
288 this.loading = true; 293 this.loading = true;
trash-ui/src/views/business/ConstructionCredit/index.vue
@@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
17 <el-form-item label="工地名称" prop="name" style="float:right;"> 17 <el-form-item label="工地名称" prop="name" style="float:right;">
18 <el-select v-model="queryParams.name" filterable clearable reserve-keyword placeholder="工地名称" size="small" 18 <el-select v-model="queryParams.name" filterable clearable reserve-keyword placeholder="工地名称" size="small"
19 :loading="loading"> 19 :loading="loading">
20 - <el-option v-for="item in dictNames" :label="item" :value="item"> 20 + <el-option v-for="item in dictNames" :label="item" :value="item" :key="item">
21 </el-option> 21 </el-option>
22 </el-select> 22 </el-select>
23 </el-form-item> 23 </el-form-item>
@@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
27 <el-form-item label="所属场地" prop="place"> 27 <el-form-item label="所属场地" prop="place">
28 <el-select v-model="queryParams.place" filterable clearable reserve-keyword placeholder="所属场地" size="small" 28 <el-select v-model="queryParams.place" filterable clearable reserve-keyword placeholder="所属场地" size="small"
29 :loading="loading"> 29 :loading="loading">
30 - <el-option v-for="item in dictPlaces" :label="item" :value="item"> 30 + <el-option v-for="item in dictPlaces" :label="item" :value="item" :key="item">
31 </el-option> 31 </el-option>
32 </el-select> 32 </el-select>
33 </el-form-item> 33 </el-form-item>
@@ -38,7 +38,7 @@ @@ -38,7 +38,7 @@
38 <el-form-item label="垃圾类型" prop="type" style="float:right;"> 38 <el-form-item label="垃圾类型" prop="type" style="float:right;">
39 <el-select v-model="queryParams.type" filterable clearable reserve-keyword placeholder="建筑垃圾类型" size="small" 39 <el-select v-model="queryParams.type" filterable clearable reserve-keyword placeholder="建筑垃圾类型" size="small"
40 :loading="loading"> 40 :loading="loading">
41 - <el-option v-for="item in dictTypes" :label="item" :value="item"> 41 + <el-option v-for="item in dictTypes" :label="item" :value="item" :key="item">
42 </el-option> 42 </el-option>
43 </el-select> 43 </el-select>
44 </el-form-item> 44 </el-form-item>
@@ -51,7 +51,6 @@ @@ -51,7 +51,6 @@
51 </el-form-item> 51 </el-form-item>
52 </el-col> 52 </el-col>
53 </el-row> 53 </el-row>
54 -  
55 </el-form> 54 </el-form>
56 55
57 <el-row :gutter="10" class="mb8"> 56 <el-row :gutter="10" class="mb8">
@@ -144,15 +143,11 @@ @@ -144,15 +143,11 @@
144 <el-dialog title="历史失信" :visible.sync="infoDialog" width="800px" append-to-body> 143 <el-dialog title="历史失信" :visible.sync="infoDialog" width="800px" append-to-body>
145 <el-table v-loading="loading" :data="creditListInfo" :cell-style="colStyle" border> 144 <el-table v-loading="loading" :data="creditListInfo" :cell-style="colStyle" border>
146 <el-table-column label="序号" align="center" prop="id" /> 145 <el-table-column label="序号" align="center" prop="id" />
147 - <el-table-column label="失信时间" align="center" prop="time" width="180" v-if="queryParams.status==0">  
148 - <template slot-scope="scope">  
149 - <span>{{ parseTime(scope.row.time, '{y}-{m}-{d}') }}</span>  
150 - </template>  
151 - </el-table-column> 146 + <el-table-column label="失信时间" align="center" prop="time" width="180" />
152 <el-table-column label="情况说明" align="center" prop="reason" /> 147 <el-table-column label="情况说明" align="center" prop="reason" />
153 <el-table-column label="操作历史" align="center" prop="lostCredit"> 148 <el-table-column label="操作历史" align="center" prop="lostCredit">
154 <template slot-scope="scope"> 149 <template slot-scope="scope">
155 - <span>{{ scope.row.lostCredit== 0 ? "撤销失信" : scope.row.lostCredit == 1 ? "失信" : "保密" }}</span> 150 + <span>{{ scope.row.lostCredit== 0 ? "撤销失信" : "失信" }}</span>
156 </template> 151 </template>
157 </el-table-column> 152 </el-table-column>
158 </el-table> 153 </el-table>
@@ -172,7 +167,7 @@ @@ -172,7 +167,7 @@
172 getTypes, 167 getTypes,
173 getPlaces, 168 getPlaces,
174 historyCredit 169 historyCredit
175 - } from "@/api/business/credit"; 170 + } from "@/api/business/constructionsites";
176 171
177 import { 172 import {
178 constructionsitesList, 173 constructionsitesList,
@@ -272,6 +267,7 @@ @@ -272,6 +267,7 @@
272 'creditStatus': 0 267 'creditStatus': 0
273 }; 268 };
274 269
  270 +
275 constructionsitesList(query).then(response => { 271 constructionsitesList(query).then(response => {
276 this.constructionList = response.result.list 272 this.constructionList = response.result.list
277 }); 273 });
@@ -324,7 +320,7 @@ @@ -324,7 +320,7 @@
324 }, 320 },
325 getHistoryData() { 321 getHistoryData() {
326 this.queryParams.status = 1; 322 this.queryParams.status = 1;
327 - this.getList(); 323 + this.init();
328 }, 324 },
329 colStyle(obj) { 325 colStyle(obj) {
330 if (obj.column.property == "id") { 326 if (obj.column.property == "id") {
trash-ui/src/views/business/DriverCredit/index.vue
@@ -2,10 +2,10 @@ @@ -2,10 +2,10 @@
2 <div class="app-container"> 2 <div class="app-container">
3 <el-row :gutter="10" class="mb8"> 3 <el-row :gutter="10" class="mb8">
4 <el-col :span="1.5"> 4 <el-col :span="1.5">
5 - <el-button :class="{'el-button':true, 'el-button--primary':this.queryParams.status==0}" size="mini" @click="getData(1);" >失信工地</el-button> 5 + <el-button :class="{'el-button':true, 'el-button--primary':this.queryParams.status==0}" size="mini" @click="getData(1);" >失信驾驶员</el-button>
6 </el-col> 6 </el-col>
7 <el-col :span="1.5"> 7 <el-col :span="1.5">
8 - <el-button :class="{'el-button':true,'el-button--primary':this.queryParams.status==1}" size="mini" @click="getHistoryData(1);">历史失信工地</el-button> 8 + <el-button :class="{'el-button':true,'el-button--primary':this.queryParams.status==1}" size="mini" @click="getHistoryData(1);">历史驾驶员</el-button>
9 </el-col> 9 </el-col>
10 </el-row> 10 </el-row>
11 11
@@ -89,28 +89,17 @@ @@ -89,28 +89,17 @@
89 reserve-keyword 89 reserve-keyword
90 placeholder="驾驶员姓名"> 90 placeholder="驾驶员姓名">
91 <el-option 91 <el-option
92 - @click.native="getObjId(item.id)"  
93 - v-for="item in names"  
94 - :key="item.value"  
95 - :label="item.label"  
96 - :value="item.label"> 92 + @click.native="getObjId(item)"
  93 + v-for="item in driverList"
  94 + :key="item.id"
  95 + :label="item.name"
  96 + :value="item.name">
97 </el-option> 97 </el-option>
98 </el-select> 98 </el-select>
99 </el-form-item> 99 </el-form-item>
100 100
101 <el-form-item label="证件号码" prop="idNumber"> 101 <el-form-item label="证件号码" prop="idNumber">
102 - <el-select  
103 - v-model="form.idNumber"  
104 - filterable  
105 - reserve-keyword  
106 - placeholder="证件号码">  
107 - <el-option  
108 - v-for="item in idNumbers"  
109 - :key="item.id"  
110 - :label="item.label"  
111 - :value="item.value">  
112 - </el-option>  
113 - </el-select> 102 + <el-input v-model="form.idNumber" placeholder="证件号码" disabled/>
114 </el-form-item> 103 </el-form-item>
115 <el-form-item label="失信原因" prop="reason"> 104 <el-form-item label="失信原因" prop="reason">
116 <el-input v-model="form.reason" placeholder="失信原因" /> 105 <el-input v-model="form.reason" placeholder="失信原因" />
@@ -140,7 +129,7 @@ @@ -140,7 +129,7 @@
140 <el-dialog title="历史失信" :visible.sync="infoDialog" width="800px" append-to-body> 129 <el-dialog title="历史失信" :visible.sync="infoDialog" width="800px" append-to-body>
141 <el-table v-loading="loading" :data="creditListInfo" :cell-style="colStyle" border> 130 <el-table v-loading="loading" :data="creditListInfo" :cell-style="colStyle" border>
142 <el-table-column label="序号" align="center" prop="id" /> 131 <el-table-column label="序号" align="center" prop="id" />
143 - <el-table-column label="失信时间" align="center" prop="time" width="180" v-if="queryParams.status==0"> 132 + <el-table-column label="失信时间" align="center" prop="time" width="180">
144 <template slot-scope="scope"> 133 <template slot-scope="scope">
145 <span>{{ parseTime(scope.row.time, '{y}-{m}-{d}') }}</span> 134 <span>{{ parseTime(scope.row.time, '{y}-{m}-{d}') }}</span>
146 </template> 135 </template>
@@ -148,7 +137,7 @@ @@ -148,7 +137,7 @@
148 <el-table-column label="情况说明" align="center" prop="reason" /> 137 <el-table-column label="情况说明" align="center" prop="reason" />
149 <el-table-column label="操作历史" align="center" prop="lostCredit"> 138 <el-table-column label="操作历史" align="center" prop="lostCredit">
150 <template slot-scope="scope"> 139 <template slot-scope="scope">
151 - <span>{{ scope.row.lostCredit== 0 ? "撤销失信" : scope.row.lostCredit == 1 ? "失信" : "保密" }}</span> 140 + <span>{{ scope.row.lostCredit== 0 ? "撤销失信" : "失信" }}</span>
152 </template> 141 </template>
153 </el-table-column> 142 </el-table-column>
154 </el-table> 143 </el-table>
@@ -166,10 +155,11 @@ import { @@ -166,10 +155,11 @@ import {
166 exportCredit, 155 exportCredit,
167 getNames, 156 getNames,
168 historyCredit 157 historyCredit
169 -} from "@/api/business/credit4"; 158 +} from "@/api/business/driver";
170 159
171 import { 160 import {
172 - constructionsitesList 161 + companyList,
  162 + driverList
173 } from "@/api/dict"; 163 } from "@/api/dict";
174 164
175 export default { 165 export default {
@@ -195,21 +185,10 @@ export default { @@ -195,21 +185,10 @@ export default {
195 dictNames:[], 185 dictNames:[],
196 dictTypes:[], 186 dictTypes:[],
197 dictPlaces:[], 187 dictPlaces:[],
198 - names:[{label:"张三",value:"张三",id:"a"},  
199 - {label:"李四",value:"李四",id:"B"},  
200 - {label:"王五",value:"王五",id:"C"},  
201 - {label:"赵六",value:"赵六",id:"D"},  
202 - {label:"狗七",value:"狗七",id:"E"}],  
203 - idNumbers:[{label:"124547845124545698",value:"124547845124545698",id:"a"},  
204 - {label:"124547845124545698",value:"124547845124545698",id:"B"},  
205 - {label:"124547845124545698",value:"124547845124545698",id:"C"},  
206 - {label:"124547845124545698",value:"124547845124545698",id:"D"},  
207 - {label:"124547845124545698",value:"124547845124545698",id:"E"}],  
208 - places:[{label:"工地A",value:"工地A",id:"a"},  
209 - {label:"工地B",value:"工地B",id:"B"},  
210 - {label:"工地C",value:"工地C",id:"C"},  
211 - {label:"工地D",value:"工地D",id:"D"},  
212 - {label:"工地E",value:"工地E",id:"E"}], 188 + driverList:[],
  189 + names:[],
  190 + idNumbers:[],
  191 + places:[],
213 // 弹出层标题 192 // 弹出层标题
214 title: "", 193 title: "",
215 // 是否显示弹出层 194 // 是否显示弹出层
@@ -242,20 +221,39 @@ export default { @@ -242,20 +221,39 @@ export default {
242 }; 221 };
243 }, 222 },
244 created() { 223 created() {
245 - this.getList();  
246 - this.getNamesData();  
247 -  
248 - let query = {  
249 - 'page':1,  
250 - 'size':9999,  
251 - 'creditStatus':0  
252 - }  
253 -  
254 - constructionsitesList(query).then(response => {  
255 - console.log(response);  
256 - }); 224 + this.init();
257 }, 225 },
258 methods: { 226 methods: {
  227 + init(){
  228 + this.getList();
  229 + this.getNamesData();
  230 +
  231 + let query = {
  232 + 'page':1,
  233 + 'size':9999,
  234 + 'creditStatus':0
  235 + }
  236 +
  237 + companyList(query).then(response => {
  238 +
  239 + let companys = response.result.list;
  240 +
  241 + let ids = [];
  242 +
  243 + for(let i = 0 ;i<companys.length;i++){
  244 + ids.push(companys[i].id);
  245 + }
  246 + query.companyIds = ids + "";
  247 + query.status = 3;
  248 +
  249 + driverList(query).then(res=>{
  250 +
  251 + this.driverList = res.result;
  252 +
  253 + });
  254 +
  255 + });
  256 + },
259 getDataInfo(row){ 257 getDataInfo(row){
260 let param ={"objectId":row.objectId} 258 let param ={"objectId":row.objectId}
261 listCredit(param).then(response => { 259 listCredit(param).then(response => {
@@ -276,7 +274,7 @@ export default { @@ -276,7 +274,7 @@ export default {
276 }, 274 },
277 getHistoryData(){ 275 getHistoryData(){
278 this.queryParams.status=1; 276 this.queryParams.status=1;
279 - this.getList(); 277 + this.init();
280 }, 278 },
281 colStyle(obj){ 279 colStyle(obj){
282 if(obj.column.property == "id"){ 280 if(obj.column.property == "id"){
@@ -284,7 +282,11 @@ export default { @@ -284,7 +282,11 @@ export default {
284 } 282 }
285 }, 283 },
286 getObjId(a){ 284 getObjId(a){
287 - this.form.objectId = a; 285 + this.form.objectId = a.id;
  286 + if(a.identityNo)
  287 + this.form.idNumber = a.identityNo;
  288 + else
  289 + this.form.idNumber = a.phoneNo ;
288 }, 290 },
289 getList() { 291 getList() {
290 this.loading = true; 292 this.loading = true;
trash-ui/src/views/business/EarthSitesCredit/index.vue
@@ -2,29 +2,22 @@ @@ -2,29 +2,22 @@
2 <div class="app-container"> 2 <div class="app-container">
3 <el-row :gutter="10" class="mb8"> 3 <el-row :gutter="10" class="mb8">
4 <el-col :span="1.5"> 4 <el-col :span="1.5">
5 - <el-button :class="{'el-button':true, 'el-button--primary':this.queryParams.status==0}" size="mini" @click="getData(1);" >失信消纳场</el-button> 5 + <el-button :class="{'el-button':true, 'el-button--primary':this.queryParams.status==0}" size="mini"
  6 + @click="getData(1);">失信消纳场</el-button>
6 </el-col> 7 </el-col>
7 <el-col :span="1.5"> 8 <el-col :span="1.5">
8 - <el-button :class="{'el-button':true,'el-button--primary':this.queryParams.status==1}" size="mini" @click="getHistoryData(1);">历史失信消纳场</el-button> 9 + <el-button :class="{'el-button':true,'el-button--primary':this.queryParams.status==1}" size="mini"
  10 + @click="getHistoryData(1);">历史失信消纳场</el-button>
9 </el-col> 11 </el-col>
10 </el-row> 12 </el-row>
11 13
12 <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch"> 14 <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch">
13 <el-row type="flex" justify="center"> 15 <el-row type="flex" justify="center">
14 <el-col> 16 <el-col>
15 - <el-form-item label="消纳场名称" prop="name"  
16 - style="float:right;">  
17 - <el-select v-model="queryParams.name"  
18 - filterable  
19 - clearable  
20 - reserve-keyword  
21 - placeholder="消纳场名称"  
22 - size="small"  
23 - :loading="loading">  
24 - <el-option  
25 - v-for="item in dictNames"  
26 - :label="item"  
27 - :value="item"> 17 + <el-form-item label="消纳场名称" prop="name" style="float:right;">
  18 + <el-select v-model="queryParams.name" filterable clearable reserve-keyword placeholder="消纳场名称" size="small"
  19 + :loading="loading">
  20 + <el-option v-for="item in dictNames" :label="item" :value="item" :key="item">
28 </el-option> 21 </el-option>
29 </el-select> 22 </el-select>
30 </el-form-item> 23 </el-form-item>
@@ -32,30 +25,32 @@ @@ -32,30 +25,32 @@
32 25
33 <el-col> 26 <el-col>
34 <el-form-item label="所属场地" prop="place"> 27 <el-form-item label="所属场地" prop="place">
35 - <el-select v-model="queryParams.place" placeholder="所属场地" clearable size="small">  
36 - <el-option label="请选择字典生成" value="" /> 28 + <el-select v-model="queryParams.place" filterable clearable reserve-keyword placeholder="所属场地" size="small"
  29 + :loading="loading">
  30 + <el-option v-for="item in dictPlaces" :label="item" :value="item" :key="item">
  31 + </el-option>
37 </el-select> 32 </el-select>
38 </el-form-item> 33 </el-form-item>
39 </el-col> 34 </el-col>
40 </el-row> 35 </el-row>
41 <el-row type="flex" justify="center"> 36 <el-row type="flex" justify="center">
42 <el-col> 37 <el-col>
43 - <el-form-item label="消纳场类型" prop="type"  
44 - style="float:right;">  
45 - <el-select v-model="queryParams.type" placeholder="建筑垃圾类型" clearable size="small">  
46 - <el-option label="请选择字典生成" value="" /> 38 + <el-form-item label="垃圾类型" prop="type" style="float:right;">
  39 + <el-select v-model="queryParams.type" filterable clearable reserve-keyword placeholder="建筑垃圾类型" size="small"
  40 + :loading="loading">
  41 + <el-option v-for="item in dictTypes" :label="item" :value="item" :key="item">
  42 + </el-option>
47 </el-select> 43 </el-select>
48 </el-form-item> 44 </el-form-item>
49 -  
50 - </el-col><el-col>  
51 - <el-form-item label="失信日期" prop="time" v-show="queryParams.status==0">  
52 - <el-date-picker clearable size="small" style="width: 200px" v-model="queryParams.time" type="date"  
53 - value-format="yyyy-MM-dd" placeholder="失信日期">  
54 - </el-date-picker>  
55 - </el-form-item>  
56 - </el-col> 45 + </el-col>
  46 + <el-col>
  47 + <el-form-item label="失信日期" prop="time" v-show="queryParams.status==0">
  48 + <el-date-picker clearable size="small" style="width: 200px" v-model="queryParams.time" type="date"
  49 + value-format="yyyy-MM-dd" placeholder="失信日期">
  50 + </el-date-picker>
  51 + </el-form-item>
  52 + </el-col>
57 </el-row> 53 </el-row>
58 -  
59 </el-form> 54 </el-form>
60 55
61 <el-row :gutter="10" class="mb8"> 56 <el-row :gutter="10" class="mb8">
@@ -107,42 +102,22 @@ @@ -107,42 +102,22 @@
107 reserve-keyword 102 reserve-keyword
108 placeholder="消纳场名称"> 103 placeholder="消纳场名称">
109 <el-option 104 <el-option
110 - @click.native="getObjId(item.id)"  
111 - v-for="item in names"  
112 - :key="item.value"  
113 - :label="item.label"  
114 - :value="item.label"> 105 + @click.native="getObjId(item)"
  106 + v-for="item in earthsitesList"
  107 + :key="item.id"
  108 + :label="item.name"
  109 + :value="item.name"
  110 + v-if="item.creditStatus==0">
115 </el-option> 111 </el-option>
116 </el-select> 112 </el-select>
117 </el-form-item> 113 </el-form-item>
118 114
119 <el-form-item label="消纳场类型" prop="type"> 115 <el-form-item label="消纳场类型" prop="type">
120 - <el-select  
121 - v-model="form.type"  
122 - filterable  
123 - reserve-keyword  
124 - placeholder="消纳场类型">  
125 - <el-option  
126 - v-for="item in types"  
127 - :key="item.id"  
128 - :label="item.label"  
129 - :value="item.value">  
130 - </el-option>  
131 - </el-select> 116 +
  117 + <el-input v-model="form.type" disabled/>
132 </el-form-item> 118 </el-form-item>
133 <el-form-item label="所属区域" prop="place"> 119 <el-form-item label="所属区域" prop="place">
134 - <el-select  
135 - v-model="form.place"  
136 - filterable  
137 - reserve-keyword  
138 - placeholder="所属区域">  
139 - <el-option  
140 - v-for="item in places"  
141 - :key="item.id"  
142 - :label="item.label"  
143 - :value="item.value">  
144 - </el-option>  
145 - </el-select> 120 + <el-input v-model="form.place" disabled/>
146 </el-form-item> 121 </el-form-item>
147 <el-form-item label="失信原因" prop="reason"> 122 <el-form-item label="失信原因" prop="reason">
148 <el-input v-model="form.reason" placeholder="失信原因" /> 123 <el-input v-model="form.reason" placeholder="失信原因" />
@@ -172,15 +147,11 @@ @@ -172,15 +147,11 @@
172 <el-dialog title="历史失信" :visible.sync="infoDialog" width="800px" append-to-body> 147 <el-dialog title="历史失信" :visible.sync="infoDialog" width="800px" append-to-body>
173 <el-table v-loading="loading" :data="creditListInfo" :cell-style="colStyle" border> 148 <el-table v-loading="loading" :data="creditListInfo" :cell-style="colStyle" border>
174 <el-table-column label="序号" align="center" prop="id" /> 149 <el-table-column label="序号" align="center" prop="id" />
175 - <el-table-column label="失信时间" align="center" prop="time" width="180" v-if="queryParams.status==0">  
176 - <template slot-scope="scope">  
177 - <span>{{ parseTime(scope.row.time, '{y}-{m}-{d}') }}</span>  
178 - </template>  
179 - </el-table-column> 150 + <el-table-column label="失信时间" align="center" prop="time" width="180" />
180 <el-table-column label="情况说明" align="center" prop="reason" /> 151 <el-table-column label="情况说明" align="center" prop="reason" />
181 <el-table-column label="操作历史" align="center" prop="lostCredit"> 152 <el-table-column label="操作历史" align="center" prop="lostCredit">
182 <template slot-scope="scope"> 153 <template slot-scope="scope">
183 - <span>{{ scope.row.lostCredit== 0 ? "撤销失信" : scope.row.lostCredit == 1 ? "失信" : "保密" }}</span> 154 + <span>{{ scope.row.lostCredit== 0 ? "撤销失信" : "失信" }}</span>
184 </template> 155 </template>
185 </el-table-column> 156 </el-table-column>
186 </el-table> 157 </el-table>
@@ -197,15 +168,20 @@ import { @@ -197,15 +168,20 @@ import {
197 updateCredit, 168 updateCredit,
198 exportCredit, 169 exportCredit,
199 getNames, 170 getNames,
  171 + getTypes,
  172 + getPlaces,
200 historyCredit 173 historyCredit
201 -} from "@/api/business/credit1"; 174 +} from "@/api/business/earthsites";
202 175
203 import { 176 import {
204 - constructionsitesList 177 + earthsitesList,
  178 + updateEarthsites
205 } from "@/api/dict"; 179 } from "@/api/dict";
206 180
  181 +import requestRemote from '@/utils/requestRemote'
  182 +
207 export default { 183 export default {
208 - name: "ConstructionCredit", 184 + name: "EarthSitesCredit",
209 data() { 185 data() {
210 return { 186 return {
211 // 遮罩层 187 // 遮罩层
@@ -224,24 +200,11 @@ export default { @@ -224,24 +200,11 @@ export default {
224 // 工地表格数据 200 // 工地表格数据
225 creditList: [], 201 creditList: [],
226 creditListInfo: [], 202 creditListInfo: [],
  203 + earthsitesList:[],
227 dictNames:[], 204 dictNames:[],
228 dictTypes:[], 205 dictTypes:[],
229 dictPlaces:[], 206 dictPlaces:[],
230 - names:[{label:"消纳场A",value:"消纳场A",id:"a"},  
231 - {label:"消纳场B",value:"消纳场B",id:"B"},  
232 - {label:"消纳场C",value:"消纳场C",id:"C"},  
233 - {label:"消纳场D",value:"消纳场D",id:"D"},  
234 - {label:"消纳场E",value:"消纳场E",id:"E"}],  
235 - types:[{label:"消纳场A",value:"消纳场A",id:"a"},  
236 - {label:"消纳场B",value:"消纳场B",id:"B"},  
237 - {label:"消纳场C",value:"消纳场C",id:"C"},  
238 - {label:"消纳场D",value:"消纳场D",id:"D"},  
239 - {label:"消纳场E",value:"消纳场E",id:"E"}],  
240 - places:[{label:"消纳场A",value:"消纳场A",id:"a"},  
241 - {label:"消纳场B",value:"消纳场B",id:"B"},  
242 - {label:"消纳场C",value:"消纳场C",id:"C"},  
243 - {label:"消纳场D",value:"消纳场D",id:"D"},  
244 - {label:"消纳场E",value:"消纳场E",id:"E"}], 207 + names:[],
245 // 弹出层标题 208 // 弹出层标题
246 title: "", 209 title: "",
247 // 是否显示弹出层 210 // 是否显示弹出层
@@ -277,20 +240,33 @@ export default { @@ -277,20 +240,33 @@ export default {
277 }; 240 };
278 }, 241 },
279 created() { 242 created() {
280 - this.getList();  
281 - this.getNamesData();  
282 -  
283 - let query = {  
284 - 'page':1,  
285 - 'size':9999,  
286 - 'creditStatus':0  
287 - }  
288 -  
289 - constructionsitesList(query).then(response => {  
290 - console.log(response);  
291 - }); 243 + this.init();
292 }, 244 },
293 methods: { 245 methods: {
  246 + init(){
  247 + this.getList();
  248 + this.getNamesData();
  249 + this.getTypesData();
  250 + this.getPlacesData();
  251 +
  252 + let query = {
  253 + 'page': 1,
  254 + 'size': 9999,
  255 + 'creditStatus': 0
  256 + };
  257 +
  258 + // requestRemote({
  259 + // url: '/api/siteservice/cs/earthsites/list',
  260 + // method: 'post',
  261 + // data: query
  262 + // }).then(response => {
  263 + // this.creditList = response.result.list
  264 + // });
  265 +
  266 + earthsitesList(query).then(response => {
  267 + this.earthsitesList = response.result.list
  268 + });
  269 + },
294 getDataInfo(row){ 270 getDataInfo(row){
295 let param ={"objectId":row.objectId} 271 let param ={"objectId":row.objectId}
296 listCredit(param).then(response => { 272 listCredit(param).then(response => {
@@ -304,6 +280,16 @@ export default { @@ -304,6 +280,16 @@ export default {
304 this.dictNames = response; 280 this.dictNames = response;
305 }); 281 });
306 }, 282 },
  283 + getTypesData() {
  284 + getTypes(this.queryParams).then(response => {
  285 + this.dictTypes = response;
  286 + });
  287 + },
  288 + getPlacesData() {
  289 + getPlaces(this.queryParams).then(response => {
  290 + this.dictPlaces = response;
  291 + });
  292 + },
307 getData(stauts){ 293 getData(stauts){
308 this.queryParams.status=0; 294 this.queryParams.status=0;
309 this.queryParams.lostCredit=stauts; 295 this.queryParams.lostCredit=stauts;
@@ -311,7 +297,7 @@ export default { @@ -311,7 +297,7 @@ export default {
311 }, 297 },
312 getHistoryData(){ 298 getHistoryData(){
313 this.queryParams.status=1; 299 this.queryParams.status=1;
314 - this.getList(); 300 + this.init();
315 }, 301 },
316 colStyle(obj){ 302 colStyle(obj){
317 if(obj.column.property == "id"){ 303 if(obj.column.property == "id"){
@@ -319,7 +305,9 @@ export default { @@ -319,7 +305,9 @@ export default {
319 } 305 }
320 }, 306 },
321 getObjId(a){ 307 getObjId(a){
322 - this.form.objectId = a; 308 + this.form.objectId = a.id;
  309 + this.form.place = a.areaName;
  310 + this.form.type = a.typeName;
323 }, 311 },
324 getList() { 312 getList() {
325 this.loading = true; 313 this.loading = true;
@@ -396,20 +384,29 @@ export default { @@ -396,20 +384,29 @@ export default {
396 this.$refs["form"].validate(valid => { 384 this.$refs["form"].validate(valid => {
397 if (valid) { 385 if (valid) {
398 if (this.form.id != null) { 386 if (this.form.id != null) {
399 - this.updateForm.id = this.form.id;  
400 - updateCredit(this.updateForm).then(response => {  
401 - this.msgSuccess("撤销成功");  
402 - this.isEdit = false;  
403 - this.getList(); 387 + this.form.lostCredit = 0;
  388 + let data = [{creditStatus:this.form.lostCredit,objectId:this.form.objectId}];
  389 + updateEarthsites(data).then(res=>{
  390 + this.updateForm.id = this.form.id;
  391 + updateCredit(this.updateForm).then(response => {
  392 + this.msgSuccess("撤销成功");
  393 + this.isEdit = false;
  394 +
  395 + this.init();
  396 + });
404 }); 397 });
405 } else { 398 } else {
406 this.form.lostCredit = 1; 399 this.form.lostCredit = 1;
407 - addCredit(this.form).then(response => {  
408 - this.msgSuccess("新增成功");  
409 - this.open = false;  
410 - this.getList();  
411 - this.getNamesData(); 400 + let data = [{creditStatus:this.form.lostCredit,objectId:this.form.objectId}];
  401 + updateEarthsites(data).then(res=>{
  402 + addCredit(this.form).then(response => {
  403 + this.msgSuccess("新增成功");
  404 + this.open = false;
  405 +
  406 + this.init();
  407 + });
412 }); 408 });
  409 +
413 } 410 }
414 } 411 }
415 }); 412 });
trash-ui/src/views/business/TruckCredit/index.vue
@@ -2,73 +2,71 @@ @@ -2,73 +2,71 @@
2 <div class="app-container"> 2 <div class="app-container">
3 <el-row :gutter="10" class="mb8"> 3 <el-row :gutter="10" class="mb8">
4 <el-col :span="1.5"> 4 <el-col :span="1.5">
5 - <el-button :class="{'el-button':true, 'el-button--primary':this.queryParams.status==0}" size="mini" @click="getData(1);" >失信车辆</el-button> 5 + <el-button :class="{'el-button':true, 'el-button--primary':this.queryParams.status==0}" size="mini"
  6 + @click="getData(1);">失信车辆</el-button>
6 </el-col> 7 </el-col>
7 <el-col :span="1.5"> 8 <el-col :span="1.5">
8 - <el-button :class="{'el-button':true,'el-button--primary':this.queryParams.status==1}" size="mini" @click="getHistoryData(1);">历史失信车辆</el-button> 9 + <el-button :class="{'el-button':true,'el-button--primary':this.queryParams.status==1}" size="mini"
  10 + @click="getHistoryData(1);">历史失信车辆</el-button>
9 </el-col> 11 </el-col>
10 </el-row> 12 </el-row>
11 13
12 <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch"> 14 <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch">
13 - <el-row type="flex" justify="center">  
14 - <el-col>  
15 - <el-form-item label="车牌号码" prop="licensePlate"  
16 - style="float:right;">  
17 - <el-select v-model="queryParams.licensePlate"  
18 - filterable  
19 - reserve-keyword  
20 - placeholder="车牌号码"  
21 - clearable  
22 - size="small"  
23 - :loading="loading">  
24 - <el-option  
25 - v-for="item in dictNames"  
26 - :label="item"  
27 - :value="item">  
28 - </el-option>  
29 - </el-select>  
30 - </el-form-item>  
31 - </el-col> 15 + <el-row type="flex" justify="center">
  16 + <el-col>
  17 + <el-form-item label="车牌号码" prop="licensePlate" style="float:right;">
  18 + <el-select v-model="queryParams.licensePlate" filterable reserve-keyword placeholder="车牌号码" clearable
  19 + size="small" :loading="loading">
  20 + <el-option v-for="item in dictNames" :label="item" :value="item">
  21 + </el-option>
  22 + </el-select>
  23 + </el-form-item>
  24 + </el-col>
32 25
33 - <el-col>  
34 - <el-form-item label="企业运输" prop="companyId">  
35 - <el-select v-model="queryParams.companyId" placeholder="企业运输" clearable size="small">  
36 - <el-option label="请选择字典生成" value="" /> 26 + <el-col>
  27 + <el-form-item label="运输企业" prop="companyId">
  28 + <el-select v-model="queryParams.companyId" filterable reserve-keyword placeholder="运输企业" clearable
  29 + size="small" :loading="loading">
  30 + <el-option v-for="item in dictCompanys" :label="item" :value="item">
  31 + </el-option>
37 </el-select> 32 </el-select>
38 - </el-form-item>  
39 - </el-col>  
40 - </el-row>  
41 - <el-row type="flex" justify="center">  
42 - <el-col>  
43 - </el-col><el-col> 33 + </el-form-item>
  34 + </el-col>
  35 + </el-row>
  36 + <el-row type="flex" justify="center">
  37 + <el-col>
  38 + </el-col>
  39 + <el-col>
44 <el-form-item label="失信日期" prop="time" v-show="queryParams.status==0"> 40 <el-form-item label="失信日期" prop="time" v-show="queryParams.status==0">
45 <el-date-picker clearable size="small" style="width: 200px" v-model="queryParams.time" type="date" 41 <el-date-picker clearable size="small" style="width: 200px" v-model="queryParams.time" type="date"
46 value-format="yyyy-MM-dd" placeholder="失信日期"> 42 value-format="yyyy-MM-dd" placeholder="失信日期">
47 </el-date-picker> 43 </el-date-picker>
48 </el-form-item> 44 </el-form-item>
49 - </el-col> 45 + </el-col>
50 </el-row> 46 </el-row>
51 47
52 </el-form> 48 </el-form>
53 49
54 <el-row :gutter="10" class="mb8"> 50 <el-row :gutter="10" class="mb8">
55 <el-col :span="1.5"> 51 <el-col :span="1.5">
56 - <el-button type="primary" size="mini" @click="handleAdd" v-hasPermi="['truck:credit:add']" v-if="queryParams.status==0">新增</el-button> 52 + <el-button type="primary" size="mini" @click="handleAdd" v-hasPermi="['truck:credit:add']"
  53 + v-if="queryParams.status==0">新增</el-button>
57 </el-col> 54 </el-col>
58 <el-col :span="1.5"> 55 <el-col :span="1.5">
59 - <el-button size="mini" @click="handleExport" v-hasPermi="['truck:credit:export']">导出</el-button> 56 + <el-button size="mini" @click="handleExport" v-hasPermi="['truck:credit:export']">导出</el-button>
60 </el-col> 57 </el-col>
61 58
62 <el-col :span="20" style="height: 1px;"></el-col> 59 <el-col :span="20" style="height: 1px;"></el-col>
63 <el-col :span="1.5"> 60 <el-col :span="1.5">
64 - <el-button type="primary" size="mini" @click="handleQuery">查询</el-button> 61 + <el-button type="primary" size="mini" @click="handleQuery">查询</el-button>
65 </el-col> 62 </el-col>
66 <el-col :span="1.5"> 63 <el-col :span="1.5">
67 - <el-button size="mini" @click="resetQuery">重置</el-button> 64 + <el-button size="mini" @click="resetQuery">重置</el-button>
68 </el-col> 65 </el-col>
69 </el-row> 66 </el-row>
70 67
71 - <el-table v-loading="loading" :data="creditList" @selection-change="handleSelectionChange" :cell-style="colStyle" border> 68 + <el-table v-loading="loading" :data="creditList" @selection-change="handleSelectionChange" :cell-style="colStyle"
  69 + border>
72 <el-table-column label="序号" align="center" prop="id" /> 70 <el-table-column label="序号" align="center" prop="id" />
73 <el-table-column label="企业运输" align="center" prop="companyId" /> 71 <el-table-column label="企业运输" align="center" prop="companyId" />
74 <el-table-column label="车牌号码" align="center" prop="licensePlate" /> 72 <el-table-column label="车牌号码" align="center" prop="licensePlate" />
@@ -80,8 +78,10 @@ @@ -80,8 +78,10 @@
80 <el-table-column label="失信原因" align="center" prop="reason" /> 78 <el-table-column label="失信原因" align="center" prop="reason" />
81 <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> 79 <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
82 <template slot-scope="scope"> 80 <template slot-scope="scope">
83 - <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['truck:credit:edit']" v-if="queryParams.status==0">撤销失信</el-button>  
84 - <el-button size="mini" type="text" icon="el-icon-edit" @click="getDataInfo(scope.row)" v-if="queryParams.status==1">查看</el-button> 81 + <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
  82 + v-hasPermi="['truck:credit:edit']" v-if="queryParams.status==0">撤销失信</el-button>
  83 + <el-button size="mini" type="text" icon="el-icon-edit" @click="getDataInfo(scope.row)"
  84 + v-if="queryParams.status==1">查看</el-button>
85 </template> 85 </template>
86 </el-table-column> 86 </el-table-column>
87 </el-table> 87 </el-table>
@@ -90,36 +90,20 @@ @@ -90,36 +90,20 @@
90 @pagination="getList" /> 90 @pagination="getList" />
91 91
92 <!-- 添加或修改工地对话框 --> 92 <!-- 添加或修改工地对话框 -->
93 - <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> 93 + <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
94 <el-form ref="form" :model="form" :rules="rules" label-width="120px"> 94 <el-form ref="form" :model="form" :rules="rules" label-width="120px">
95 <el-form-item label="运输企业" prop="companyId"> 95 <el-form-item label="运输企业" prop="companyId">
96 - <el-select  
97 - v-model="form.companyId"  
98 - filterable  
99 - reserve-keyword  
100 - placeholder="运输企业">  
101 - <el-option  
102 - @click.native="getObjId(item.id)"  
103 - v-for="item in companyIds"  
104 - :key="item.value"  
105 - :label="item.label"  
106 - :value="item.label">  
107 - </el-option>  
108 - </el-select>  
109 - </el-form-item> 96 + <el-select v-model="form.companyId" filterable reserve-keyword placeholder="运输企业">
  97 + <el-option v-for="item in companyList" :key="item.name"
  98 + :label="item.name" :value="item.name">
  99 + </el-option>
  100 + </el-select>
  101 + </el-form-item>
110 <el-form-item label="车牌号码" prop="licensePlate"> 102 <el-form-item label="车牌号码" prop="licensePlate">
111 - <el-select  
112 - v-model="form.licensePlate"  
113 - filterable  
114 - reserve-keyword  
115 - placeholder="车牌号码">  
116 - <el-option  
117 - v-for="item in licensePlates"  
118 - :key="item.id"  
119 - :label="item.label"  
120 - :value="item.value">  
121 - </el-option>  
122 - </el-select> 103 + <el-select v-model="form.licensePlate" filterable reserve-keyword placeholder="车牌号码">
  104 + <el-option @click.native="getObjId(item)" v-for="item in companyList" :key="item.id" :label="item.name" :value="item.name">
  105 + </el-option>
  106 + </el-select>
123 </el-form-item> 107 </el-form-item>
124 <el-form-item label="失信原因" prop="reason"> 108 <el-form-item label="失信原因" prop="reason">
125 <el-input v-model="form.reason" placeholder="失信原因" /> 109 <el-input v-model="form.reason" placeholder="失信原因" />
@@ -134,10 +118,10 @@ @@ -134,10 +118,10 @@
134 </el-dialog> 118 </el-dialog>
135 119
136 120
137 - <el-dialog title="撤销失信" :visible.sync="isEdit" width="500px" append-to-body> 121 + <el-dialog title="撤销失信" :visible.sync="isEdit" width="500px" append-to-body>
138 <el-form ref="form" :model="updateForm" :rules="rules" label-width="120px"> 122 <el-form ref="form" :model="updateForm" :rules="rules" label-width="120px">
139 <el-form-item label="情况说明" prop="reason"> 123 <el-form-item label="情况说明" prop="reason">
140 - <el-input v-model="updateForm.reason" type="textarea" maxlength="200" show-word-limit/> 124 + <el-input v-model="updateForm.reason" type="textarea" maxlength="200" show-word-limit />
141 </el-form-item> 125 </el-form-item>
142 </el-form> 126 </el-form>
143 <div slot="footer" class="dialog-footer"> 127 <div slot="footer" class="dialog-footer">
@@ -146,21 +130,21 @@ @@ -146,21 +130,21 @@
146 </div> 130 </div>
147 </el-dialog> 131 </el-dialog>
148 132
149 - <el-dialog title="历史失信" :visible.sync="infoDialog" width="800px" append-to-body center="true">  
150 - <el-table v-loading="loading" :data="creditListInfo" :cell-style="colStyle" border>  
151 - <el-table-column label="序号" align="center" prop="id" />  
152 - <el-table-column label="失信时间" align="center" prop="time" width="180" v-if="queryParams.status==0">  
153 - <template slot-scope="scope">  
154 - <span>{{ parseTime(scope.row.time, '{y}-{m}-{d}') }}</span>  
155 - </template>  
156 - </el-table-column>  
157 - <el-table-column label="情况说明" align="center" prop="reason" />  
158 - <el-table-column label="操作历史" align="center" prop="lostCredit">  
159 - <template slot-scope="scope">  
160 - <span>{{ scope.row.lostCredit== 0 ? "撤销失信" : scope.row.lostCredit == 1 ? "失信" : "保密" }}</span>  
161 - </template>  
162 - </el-table-column>  
163 - </el-table> 133 + <el-dialog title="历史失信" :visible.sync="infoDialog" width="800px" append-to-body center="true">
  134 + <el-table v-loading="loading" :data="creditListInfo" :cell-style="colStyle" border>
  135 + <el-table-column label="序号" align="center" prop="id" />
  136 + <el-table-column label="失信时间" align="center" prop="time" width="180" v-if="queryParams.status==0">
  137 + <template slot-scope="scope">
  138 + <span>{{ parseTime(scope.row.time, '{y}-{m}-{d}') }}</span>
  139 + </template>
  140 + </el-table-column>
  141 + <el-table-column label="情况说明" align="center" prop="reason" />
  142 + <el-table-column label="操作历史" align="center" prop="lostCredit">
  143 + <template slot-scope="scope">
  144 + <span>{{ scope.row.lostCredit== 0 ? "撤销失信" : scope.row.lostCredit == 1 ? "失信" : "保密" }}</span>
  145 + </template>
  146 + </el-table-column>
  147 + </el-table>
164 </el-dialog> 148 </el-dialog>
165 </div> 149 </div>
166 </template> 150 </template>
@@ -174,8 +158,15 @@ @@ -174,8 +158,15 @@
174 updateCredit, 158 updateCredit,
175 exportCredit, 159 exportCredit,
176 getNames, 160 getNames,
  161 + getCompanys,
177 historyCredit 162 historyCredit
178 - } from "@/api/business/credit3"; 163 + } from "@/api/business/truck";
  164 +
  165 +
  166 + import {
  167 + companyList,
  168 + truckList
  169 + } from "@/api/dict";
179 170
180 export default { 171 export default {
181 name: "Credit", 172 name: "Credit",
@@ -191,37 +182,27 @@ @@ -191,37 +182,27 @@
191 multiple: true, 182 multiple: true,
192 // 显示搜索条件 183 // 显示搜索条件
193 showSearch: true, 184 showSearch: true,
194 - infoDialog :false, 185 + infoDialog: false,
195 // 总条数 186 // 总条数
196 total: 0, 187 total: 0,
197 // 工地表格数据 188 // 工地表格数据
198 creditList: [], 189 creditList: [],
199 creditListInfo: [], 190 creditListInfo: [],
200 - dictNames:[],  
201 - dictTypes:[],  
202 - dictPlaces:[],  
203 - companyIds:[{label:"运输公司A",value:"1",id:"a"},  
204 - {label:"运输公司B",value:"2",id:"B"},  
205 - {label:"运输公司C",value:"3",id:"C"},  
206 - {label:"运输公司D",value:"4",id:"D"},  
207 - {label:"运输公司E",value:"5",id:"E"}],  
208 - licensePlates:  
209 - [{label:"XL:010101",value:"XL:010101",id:"a"},  
210 - {label:"XL:010102",value:"XL:010102",id:"B"},  
211 - {label:"XL:010103",value:"XL:010103",id:"C"},  
212 - {label:"XL:010104",value:"XL:010104",id:"D"},  
213 - {label:"XL:010105",value:"XL:010105",id:"E"}], 191 + dictNames: [],
  192 + dictCompanys: [],
  193 + companyList:[],
  194 + truckList: [],
214 // 弹出层标题 195 // 弹出层标题
215 title: "", 196 title: "",
216 // 是否显示弹出层 197 // 是否显示弹出层
217 open: false, 198 open: false,
218 - isEdit:false, 199 + isEdit: false,
219 // 查询参数 200 // 查询参数
220 queryParams: { 201 queryParams: {
221 pageNum: 1, 202 pageNum: 1,
222 pageSize: 10, 203 pageSize: 10,
223 companyId: null, 204 companyId: null,
224 - licensePlate:null, 205 + licensePlate: null,
225 time: null, 206 time: null,
226 reason: null, 207 reason: null,
227 status: 0, 208 status: 0,
@@ -229,28 +210,81 @@ @@ -229,28 +210,81 @@
229 }, 210 },
230 // 表单参数 211 // 表单参数
231 form: {}, 212 form: {},
232 - updateForm:{}, 213 + updateForm: {},
233 // 表单校验 214 // 表单校验
234 - rules: {companyId: [  
235 - { required: true, message: '请选择运输公司', trigger: 'change' },  
236 - ],reason: [  
237 - { required: true, message: '请填写原因', trigger: 'blur' },  
238 - ],licensePlate :[  
239 - { required: true, message: '请选择车辆', trigger: 'change'}  
240 - ],time: [  
241 - { required: true, message: '请选择失信时间', trigger: 'change' },  
242 - ],} 215 + rules: {
  216 + companyId: [{
  217 + required: true,
  218 + message: '请选择运输公司',
  219 + trigger: 'change'
  220 + }, ],
  221 + reason: [{
  222 + required: true,
  223 + message: '请填写原因',
  224 + trigger: 'blur'
  225 + }, ],
  226 + licensePlate: [{
  227 + required: true,
  228 + message: '请选择车辆',
  229 + trigger: 'change'
  230 + }],
  231 + time: [{
  232 + required: true,
  233 + message: '请选择失信时间',
  234 + trigger: 'change'
  235 + }, ],
  236 + }
243 }; 237 };
244 }, 238 },
245 created() { 239 created() {
246 - this.getList();  
247 - this.getNamesData(); 240 + this.init();
248 }, 241 },
249 methods: { 242 methods: {
250 - getDataInfo(row){ 243 +
  244 + init() {
  245 +
  246 + this.getList();
  247 + getNames(this.queryParams).then(response => {
  248 + this.dictNames = response;
  249 + });
  250 +
  251 + getCompanys(this.queryParams).then(response => {
  252 + this.dictCompanys = response;
  253 + });
  254 +
  255 + let query = {
  256 + 'page':1,
  257 + 'size':9999,
  258 + 'creditStatus':0
  259 + }
  260 + companyList(query).then(response => {
  261 +
  262 + let companys = response.result.list;
  263 + this.companyList = companys;
  264 + let ids = [];
  265 +
  266 + for(let i = 0 ;i<companys.length;i++){
  267 + ids.push(companys[i].id);
  268 + }
  269 + // query.companyID = ids + "";
  270 + query.valid = 0;
  271 +
  272 + truckList(query).then(res=>{
  273 +
  274 + this.truckList = res.result;
  275 +
  276 + });
  277 +
  278 + });
  279 +
  280 +
  281 + },
  282 + getDataInfo(row) {
251 console.log(row); 283 console.log(row);
252 284
253 - let param ={"objectId":row.objectId} 285 + let param = {
  286 + "objectId": row.objectId
  287 + }
254 288
255 listCredit(param).then(response => { 289 listCredit(param).then(response => {
256 this.creditListInfo = response.rows; 290 this.creditListInfo = response.rows;
@@ -258,38 +292,35 @@ @@ -258,38 +292,35 @@
258 }); 292 });
259 293
260 }, 294 },
261 - getNamesData(){  
262 - getNames(this.queryParams).then(response => {  
263 - this.dictNames = response;  
264 - });  
265 - },  
266 - getData(stauts){  
267 - this.queryParams.status=0;  
268 - this.queryParams.lostCredit=stauts; 295 + getData(stauts) {
  296 + this.queryParams.status = 0;
  297 + this.queryParams.lostCredit = stauts;
269 this.getList(); 298 this.getList();
270 }, 299 },
271 - getHistoryData(){  
272 - this.queryParams.status=1; 300 + getHistoryData() {
  301 + this.queryParams.status = 1;
273 this.getList(); 302 this.getList();
274 }, 303 },
275 - colStyle(obj){  
276 - if(obj.column.property == "id"){  
277 - return {background:"#f8f8f9"} 304 + colStyle(obj) {
  305 + if (obj.column.property == "id") {
  306 + return {
  307 + background: "#f8f8f9"
  308 + }
278 } 309 }
279 }, 310 },
280 - getObjId(a){  
281 - this.form.objectId = a; 311 + getObjId(a) {
  312 + this.form.objectId = a.id;
282 }, 313 },
283 getList() { 314 getList() {
284 this.loading = true; 315 this.loading = true;
285 - if(this.queryParams.status==0){ 316 + if (this.queryParams.status == 0) {
286 listCredit(this.queryParams).then(response => { 317 listCredit(this.queryParams).then(response => {
287 this.creditList = response.rows; 318 this.creditList = response.rows;
288 this.total = response.total; 319 this.total = response.total;
289 this.loading = false; 320 this.loading = false;
290 }); 321 });
291 } 322 }
292 - if(this.queryParams.status==1){ 323 + if (this.queryParams.status == 1) {
293 historyCredit(this.queryParams).then(response => { 324 historyCredit(this.queryParams).then(response => {
294 this.creditList = response.rows; 325 this.creditList = response.rows;
295 this.total = response.total; 326 this.total = response.total;
@@ -309,7 +340,7 @@ @@ -309,7 +340,7 @@
309 this.form = { 340 this.form = {
310 id: null, 341 id: null,
311 companyId: null, 342 companyId: null,
312 - licensePlate:null, 343 + licensePlate: null,
313 time: null, 344 time: null,
314 reason: null, 345 reason: null,
315 status: null, 346 status: null,
@@ -358,15 +389,15 @@ @@ -358,15 +389,15 @@
358 updateCredit(this.updateForm).then(response => { 389 updateCredit(this.updateForm).then(response => {
359 this.msgSuccess("撤销成功"); 390 this.msgSuccess("撤销成功");
360 this.isEdit = false; 391 this.isEdit = false;
361 - this.getList(); 392 + this.init();
362 }); 393 });
363 } else { 394 } else {
364 this.form.lostCredit = 1; 395 this.form.lostCredit = 1;
  396 + this.form.createType = 0;
365 addCredit(this.form).then(response => { 397 addCredit(this.form).then(response => {
366 this.msgSuccess("新增成功"); 398 this.msgSuccess("新增成功");
367 this.open = false; 399 this.open = false;
368 - this.getList();  
369 - this.getNamesData(); 400 + this.init();
370 }); 401 });
371 } 402 }
372 } 403 }