Commit d2baeb0241cd2eec448e4594c0da23ea4c4164af

Authored by youxiw2000
1 parent 3441161d

m

Too many changes to show.

To preserve performance only 22 of 51 files are displayed.

trash-activiti/src/main/java/com/trash/activiti/service/impl/ActTaskServiceImpl.java
@@ -291,8 +291,8 @@ public class ActTaskServiceImpl implements IActTaskService { @@ -291,8 +291,8 @@ public class ActTaskServiceImpl implements IActTaskService {
291 taskRuntime.complete(TaskPayloadBuilder.complete().withTaskId(taskID).build()); 291 taskRuntime.complete(TaskPayloadBuilder.complete().withTaskId(taskID).build());
292 } 292 }
293 293
294 -  
295 - updateThreesetpTask(processInstance, desc); 294 + if(desc != null)
  295 + updateThreesetpTask(processInstance, desc);
296 296
297 297
298 // 写入数据库 298 // 写入数据库
@@ -309,7 +309,8 @@ public class ActTaskServiceImpl implements IActTaskService { @@ -309,7 +309,8 @@ public class ActTaskServiceImpl implements IActTaskService {
309 309
310 task.setDescription(placeCode); 310 task.setDescription(placeCode);
311 311
312 - if(processInstance.getProcessDefinitionKey().equals("workflow_leave") || processInstance.getProcessDefinitionKey().equals("workflow_caseoffline") || 312 + if(processInstance.getProcessDefinitionKey().equals("workflow_conract") ||
  313 + processInstance.getProcessDefinitionKey().equals("workflow_leave") || processInstance.getProcessDefinitionKey().equals("workflow_caseoffline") ||
313 processInstance.getProcessDefinitionKey().equals("logistics") || processInstance.getProcessDefinitionKey().equals("conference") 314 processInstance.getProcessDefinitionKey().equals("logistics") || processInstance.getProcessDefinitionKey().equals("conference")
314 || processInstance.getProcessDefinitionKey().equals("workflow_threestep") || processInstance.getProcessDefinitionKey().equals("workflow_casefile") 315 || processInstance.getProcessDefinitionKey().equals("workflow_threestep") || processInstance.getProcessDefinitionKey().equals("workflow_casefile")
315 || processInstance.getProcessDefinitionKey().equals("handleAffairs") || processInstance.getProcessDefinitionKey().equals("gongwenchuli")){ 316 || processInstance.getProcessDefinitionKey().equals("handleAffairs") || processInstance.getProcessDefinitionKey().equals("gongwenchuli")){
trash-admin/src/main/resources/application-dev.yml
@@ -29,7 +29,7 @@ spring: @@ -29,7 +29,7 @@ spring:
29 druid: 29 druid:
30 # 主库数据源 30 # 主库数据源
31 master: 31 master:
32 - url: jdbc:mysql://localhost:3306/trash1?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true 32 + url: jdbc:mysql://192.168.168.141:3306/trash?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true
33 username: root 33 username: root
34 password: root 34 password: root
35 # 从库数据源 35 # 从库数据源
trash-common/src/main/java/com/trash/common/utils/RemoteServerUtils.java
1 package com.trash.common.utils; 1 package com.trash.common.utils;
2 2
  3 +import java.util.HashMap;
3 import java.util.List; 4 import java.util.List;
4 import java.util.Map; 5 import java.util.Map;
5 import java.util.concurrent.TimeUnit; 6 import java.util.concurrent.TimeUnit;
@@ -57,6 +58,10 @@ public class RemoteServerUtils { @@ -57,6 +58,10 @@ public class RemoteServerUtils {
57 public static String UpdateEarthSiteRequestPath = "/api/siteservice/cs/earthsites/status"; 58 public static String UpdateEarthSiteRequestPath = "/api/siteservice/cs/earthsites/status";
58 59
59 public static String UpdateConractRequestPath = "/api/siteservice/cs/sitecontract/audit/status"; 60 public static String UpdateConractRequestPath = "/api/siteservice/cs/sitecontract/audit/status";
  61 +
  62 + public static String DriverListPath = "/api/gpsservice/v1/drivers/search";
  63 +
  64 +
60 65
61 public static String BasevehicleInfo = "/api/gpsservice/cs/basevehicle/"; 66 public static String BasevehicleInfo = "/api/gpsservice/cs/basevehicle/";
62 67
@@ -594,5 +599,41 @@ public class RemoteServerUtils { @@ -594,5 +599,41 @@ public class RemoteServerUtils {
594 599
595 } 600 }
596 601
  602 + public static JSONArray getDriverList(String token) {
  603 +
  604 + if(okHttpClient == null){
  605 + okHttpClient = new OkHttpClient.Builder()
  606 + .connectTimeout(20, TimeUnit.SECONDS)
  607 + .writeTimeout(20, TimeUnit.SECONDS)
  608 + .readTimeout(30, TimeUnit.SECONDS)
  609 + .build();
  610 + }
  611 +
  612 + token = "Bearer "+ token;
  613 +
  614 + String param = JSON.toJSON(new HashMap<>()).toString();
  615 +
  616 + RequestBody body = RequestBody.create(MediaType.parse("application/json"), param );
  617 +
  618 + Request request = new Request.Builder().url(remote+DriverListPath).addHeader("Authorization",token ).post(body).build();
  619 +
  620 + try {
  621 + okhttp3.Response response = okHttpClient.newCall(request).execute();
  622 + String result = response.body().string();
  623 +
  624 + if(result != null){
  625 + JSONObject json = JSON.parseObject(result);
  626 + return json.getJSONArray("list");
  627 +
  628 + }else{
  629 + return null;
  630 + }
  631 +
  632 + }catch (Exception e) {
  633 + e.printStackTrace();
  634 + return null;
  635 + }
  636 + }
  637 +
597 638
598 } 639 }
trash-quartz/src/main/java/com/trash/quartz/task/DriverTask.java
@@ -26,10 +26,12 @@ import com.alibaba.fastjson.JSONArray; @@ -26,10 +26,12 @@ import com.alibaba.fastjson.JSONArray;
26 import com.alibaba.fastjson.JSONObject; 26 import com.alibaba.fastjson.JSONObject;
27 import com.trash.activiti.service.IActTaskService; 27 import com.trash.activiti.service.IActTaskService;
28 import com.trash.business.domain.CompanyCredit; 28 import com.trash.business.domain.CompanyCredit;
  29 +import com.trash.business.domain.DriverCredit;
29 import com.trash.business.domain.SupervisionThreestep; 30 import com.trash.business.domain.SupervisionThreestep;
30 import com.trash.business.domain.TruckCredit; 31 import com.trash.business.domain.TruckCredit;
31 import com.trash.business.mapper.SupervisionThreestepMapper; 32 import com.trash.business.mapper.SupervisionThreestepMapper;
32 import com.trash.business.service.ICompanyCreditService; 33 import com.trash.business.service.ICompanyCreditService;
  34 +import com.trash.business.service.IDriverCreditService;
33 import com.trash.business.service.ISupervisionThreestepService; 35 import com.trash.business.service.ISupervisionThreestepService;
34 import com.trash.business.service.ITruckActivateService; 36 import com.trash.business.service.ITruckActivateService;
35 import com.trash.business.service.ITruckCreditService; 37 import com.trash.business.service.ITruckCreditService;
@@ -130,8 +132,44 @@ public class DriverTask @@ -130,8 +132,44 @@ public class DriverTask
130 } 132 }
131 133
132 134
  135 +
133 private void checkDriverCredit() { 136 private void checkDriverCredit() {
134 137
  138 + if(RemoteServerUtils.remote == null){
  139 + RemoteServerUtils.remote = trashConfig.getRemotePath();
  140 + }
  141 + if(TOKEN == null){
  142 + TOKEN = trashConfig.getToken();
  143 + }
  144 +
  145 + JSONArray drivers = RemoteServerUtils.getDriverList(TOKEN);
  146 +
  147 +
  148 + for(Object object :drivers){
  149 +
  150 + JSONObject json = (JSONObject)object;
  151 +
  152 + try {
  153 + if(sdf.parse(json.getString("endAt")).getTime() < sdf.parse(sdf.format(new Date())).getTime() ||
  154 + sdf.parse(json.getString("qualificationCertValidEndAt")).getTime() < sdf.parse(sdf.format(new Date())).getTime()){
  155 + DriverCredit driver = new DriverCredit();
  156 +
  157 + driver.setIdNumber(json.getString("identityNo"));
  158 + driver.setName(json.getString("name"));
  159 + driver.setCreateBy("定时器");
  160 + driver.setReason("证件过期");
  161 + driver.setTime(new Date());
  162 + driver.setStatus(0L);
  163 +
  164 +
  165 + SpringUtils.getBean(IDriverCreditService.class).insertDriverCredit(driver);
  166 + }
  167 + } catch (ParseException e) {
  168 + // TODO Auto-generated catch block
  169 + e.printStackTrace();
  170 + }
  171 +
  172 + }
135 173
136 } 174 }
137 175
trash-ui/src/api/caseOfflineInfo.js 0 → 100644
  1 +import { listCaseOffline, getCaseOffline,getAdviceList } from "@/api/caseOffline/caseOffline";
  2 + import {
  3 + getArea,
  4 + earthsitesList,
  5 + constructionsitesList,
  6 + getDict,
  7 +
  8 + } from "@/api/dict";
  9 + import {
  10 + getThreestep,
  11 + } from "@/api/business/threestep";
  12 +
  13 +
  14 +
  15 + import {
  16 + getToken
  17 + } from "@/utils/auth";
  18 +export default {
  19 + name: "CaseOffline",
  20 + props: {
  21 + businessKey: {
  22 + type: String
  23 + }
  24 + },
  25 + data() {
  26 + return {
  27 + // 遮罩层
  28 + loading: true,
  29 + // 选中数组
  30 + ids: [],
  31 + // 非单个禁用
  32 + single: true,
  33 + // 非多个禁用
  34 + multiple: true,
  35 + // 显示搜索条件
  36 + showSearch: true,
  37 + // 总条数
  38 + total: 0,
  39 + // 线下交办案卷表格数据
  40 + caseOfflineList: [],
  41 + // 弹出层标题
  42 + title: "",
  43 + // 是否显示弹出层
  44 + open: false,
  45 + open2:false,
  46 + // 查询参数
  47 + queryParams: {
  48 + pageNum: 1,
  49 + pageSize: 10,
  50 + type: null,
  51 + place: null,
  52 + createTime: null,
  53 + },
  54 + uploadImageDialog:false,
  55 + // 表单参数
  56 + form: {},
  57 + // 表单校验
  58 + rules: {
  59 + },
  60 + caseType:[
  61 + {code:0,name:"渣土处置工地(含消纳场)的渣土运输车辆出场车身不洁,车轮带泥"},
  62 + {code:1,name:"未洗车出场或者出场清洁不彻底"},
  63 + {code:2,name:"渣土运输车辆货箱顶盖未按规定关闭到位或未按规定和标准装载渣土出场"},
  64 + {code:3,name:"非核准车辆进入渣土处置工地运输渣土"},
  65 + {code:4,name:"渣土处置工地未按规定时间开停工"},
  66 + {code:5,name:"渣土处置工地洗车设施等破损、未正常使用及措施不到位的"},
  67 + {code:6,name:"渣土处置工地、消纳场(含回填场)出入口两侧50米范围内出现渣土污染、污水外排等现象"},
  68 + {code:7,name:"其他1"},
  69 + {code:8,name:"其他2"},
  70 + {code:9,name:"其他3"}
  71 + ],
  72 + areas:null,
  73 + fileList:[],
  74 + areas: [],
  75 + upload: {
  76 + // 是否显示弹出层(用户导入)
  77 + open: false,
  78 + // 弹出层标题(用户导入)
  79 + title: "",
  80 + // 是否禁用上传
  81 + isUploading: false,
  82 + // 设置上传的请求头部
  83 + headers: {
  84 + Authorization: "Bearer " + getToken()
  85 + },
  86 + // 上传的地址
  87 + url: process.env.VUE_APP_BASE_API + "/business/threestep/upload",
  88 +
  89 + },
  90 + workflow:"workflow_caseoffline",
  91 + data:{},
  92 + adviceList:[],
  93 + };
  94 + },
  95 + created() {
  96 + getArea().then(res=>{
  97 + this.areas = res.result;
  98 + this.handleUpdate();
  99 + });
  100 + },
  101 + methods: {
  102 + getSite(item){
  103 + this.form.objectId = item.id;
  104 + },
  105 +
  106 + getAreaName(code){
  107 + for(let i =0;i<this.areas.length;i++){
  108 + if(Number(code) == this.areas[i].code){
  109 + return this.areas[i].name;
  110 + break;
  111 + }
  112 + }
  113 + return code;
  114 + },
  115 + getCaseType(type){
  116 + for(let i in this.caseType){
  117 + if(this.caseType[i].code==Number(type))
  118 + return this.caseType[i].name
  119 + }
  120 + },
  121 +
  122 + downloadFile(path) {
  123 + window.location.href = process.env.VUE_APP_BASE_API + "/business/threestep/download?path=" + encodeURI(path);
  124 + },
  125 + /** 修改按钮操作 */
  126 + handleUpdate() {
  127 + let id;
  128 + if(this.businessKey.split(":").length == 2){
  129 + id = this.businessKey.split(":")[1];
  130 + }else{
  131 + id = this.businessKey;
  132 + }
  133 +
  134 + getCaseOffline(id).then(response => {
  135 + this.form = response.data;
  136 + if(this.form.attach && this.form.attach != "")
  137 + this.form.attach = this.form.attach.split(",");
  138 +
  139 + this.form.siteType = this.form.siteType + "";
  140 + this.form.type = this.getCaseType(this.form.type);
  141 + this.form.place = this.getAreaName(this.form.place);
  142 +
  143 + getAdviceList(this.workflow+":"+id).then(res=>{
  144 + if(res.data){
  145 + if(res.data.advice1){
  146 + this.adviceList.push({name: res.data.advice1.create_by ,time:res.data.advice1.create_time,text:this.form.advice1})
  147 + }
  148 + if(res.data.advice2){
  149 + this.adviceList.push({name: res.data.advice2.create_by ,time:res.data.advice2.create_time,text:this.form.advice2})
  150 + }
  151 + if(res.data.advice3){
  152 + this.adviceList.push({name: res.data.advice3.create_by ,time:res.data.advice3.create_time,text:this.form.advice3})
  153 + }
  154 + if(res.data.advice4){
  155 + this.adviceList.push({name: res.data.advice4.create_by ,time:res.data.advice4.create_time,text:this.form.advice4})
  156 + }
  157 +
  158 + }
  159 + });
  160 +
  161 +
  162 + this.open2 = true;
  163 + });
  164 +
  165 +
  166 + },
  167 + }
  168 +};
trash-ui/src/api/caseoffline.js 0 → 100644
  1 +import { listCaseOffline, getCaseOffline, delCaseOffline, addCaseOffline, updateCaseOffline, exportCaseOffline } from "@/api/caseOffline/caseOffline";
  2 +
  3 +
  4 +import h5Info from "@/views/h5/caseOffline/caseOfflineInfo";
  5 +
  6 +import h5page from '@/views/h5/Pagination';
  7 +
  8 +
  9 +
  10 + import caseOfflineInfo from "@/views/caseOffline/caseOffline/caseOfflineInfo";
  11 + import {
  12 + getArea,
  13 + earthsitesList,
  14 + constructionsitesList,
  15 + getDict,
  16 + } from "@/api/dict";
  17 + import {
  18 + getThreestep,
  19 + } from "@/api/business/threestep";
  20 +
  21 + import {
  22 + getToken
  23 + } from "@/utils/auth";
  24 +export default {
  25 + name: "CaseOffline",
  26 +
  27 + components: {
  28 + caseOfflineInfo,
  29 + h5Info,
  30 + h5page
  31 + },
  32 + data() {
  33 + return {
  34 + // 遮罩层
  35 + loading: true,
  36 + // 选中数组
  37 + ids: [],
  38 + // 非单个禁用
  39 + single: true,
  40 + // 非多个禁用
  41 + multiple: true,
  42 + // 显示搜索条件
  43 + showSearch: true,
  44 + // 总条数
  45 + total: 0,
  46 + // 线下交办案卷表格数据
  47 + caseOfflineList: [],
  48 + // 弹出层标题
  49 + title: "",
  50 + // 是否显示弹出层
  51 + open: false,
  52 + open2:false,
  53 + // 查询参数
  54 + queryParams: {
  55 + pageNum: 1,
  56 + pageSize: 10,
  57 + type: null,
  58 + place: null,
  59 + createTime: null,
  60 + isAsc:"DESC",
  61 + orderByColumn:"createTime"
  62 + },
  63 + uploadImageDialog:false,
  64 + // 表单参数
  65 + form: {},
  66 + // 表单校验
  67 + rules: {
  68 + },
  69 + caseType:[
  70 + {code:0,name:"渣土处置工地(含消纳场)的渣土运输车辆出场车身不洁,车轮带泥"},
  71 + {code:1,name:"未洗车出场或者出场清洁不彻底"},
  72 + {code:2,name:"渣土运输车辆货箱顶盖未按规定关闭到位或未按规定和标准装载渣土出场"},
  73 + {code:3,name:"非核准车辆进入渣土处置工地运输渣土"},
  74 + {code:4,name:"渣土处置工地未按规定时间开停工"},
  75 + {code:5,name:"渣土处置工地洗车设施等破损、未正常使用及措施不到位的"},
  76 + {code:6,name:"渣土处置工地、消纳场(含回填场)出入口两侧50米范围内出现渣土污染、污水外排等现象"},
  77 + {code:7,name:"其他1"},
  78 + {code:8,name:"其他2"},
  79 + {code:9,name:"其他3"}
  80 + ],
  81 + areas:null,
  82 + fileList:[],
  83 + areas: [],
  84 + upload: {
  85 + // 是否显示弹出层(用户导入)
  86 + open: false,
  87 + // 弹出层标题(用户导入)
  88 + title: "",
  89 + // 是否禁用上传
  90 + isUploading: false,
  91 + // 设置上传的请求头部
  92 + headers: {
  93 + Authorization: "Bearer " + getToken()
  94 + },
  95 + // 上传的地址
  96 + url: process.env.VUE_APP_BASE_API + "/business/threestep/upload",
  97 + },
  98 + data:{},
  99 + objId:null
  100 + };
  101 + },
  102 + created() {
  103 +
  104 +
  105 +
  106 + this.getList();
  107 +
  108 + if(window.location.search){
  109 + let businessKey = window.location.search.split("=")[1];
  110 + debugger;
  111 + if(window.location.search.split("=")[0] == "?businessKey"){
  112 + let id;
  113 + if(businessKey.split(":").length == 2){
  114 + id = businessKey.split(":")[1];
  115 + }else{
  116 + id = businessKey;
  117 + }
  118 +
  119 + getThreestep(id).then(response => {
  120 + let data = response.data;
  121 +
  122 + this.handleAdd();
  123 +
  124 + this.form.siteType = data.type + "";
  125 + this.form.siteName = data.name;
  126 + this.form.place = Number(data.place);
  127 + });
  128 + }
  129 +
  130 + }
  131 +
  132 +
  133 +
  134 + let remoteQueryData = {
  135 + "page": 1,
  136 + "size": 9999
  137 + }
  138 +
  139 + constructionsitesList(remoteQueryData).then(res => {
  140 + this.data[0]= res.result.list;
  141 + });
  142 +
  143 + earthsitesList(remoteQueryData).then(res => {
  144 + this.data[1]= res.result.list;
  145 + });
  146 + },
  147 + methods: {
  148 + getSite(item){
  149 + this.form.objectId = item.id;
  150 + },
  151 + /** 查询线下交办案卷列表 */
  152 + getList() {
  153 + this.loading = true;
  154 + listCaseOffline(this.queryParams).then(response => {
  155 + this.caseOfflineList = response.rows;
  156 +
  157 + for(let i in this.caseOfflineList){
  158 + this.caseOfflineList[i].type = this.getCaseType(Number(this.caseOfflineList[i].type));
  159 +
  160 + }
  161 +
  162 + getArea().then(res => {
  163 + this.areas = res.result;
  164 + for(let i =0;i< this.caseOfflineList.length;i++){
  165 + this.caseOfflineList[i].place = this.getAreaName(this.caseOfflineList[i].place);
  166 + }
  167 + });
  168 +
  169 + this.total = response.total;
  170 + this.loading = false;
  171 + });
  172 + },
  173 + // 取消按钮
  174 + cancel() {
  175 + this.open = false;
  176 + this.open2 = false;
  177 + this.reset();
  178 + },
  179 + // 表单重置
  180 + reset() {
  181 + this.form = {
  182 + id: null,
  183 + type: null,
  184 + siteName: null,
  185 + locationDec: null,
  186 + caseDec: null,
  187 + status: 0,
  188 + place: null,
  189 + number: null,
  190 + siteType: null,
  191 + objectId: null,
  192 + createTime: null,
  193 + createBy: null,
  194 + advice1: null,
  195 + advice2: null,
  196 + advice3: null,
  197 + advice4: null,
  198 + attach:[]
  199 + };
  200 + this.resetForm("form");
  201 + },
  202 + /** 搜索按钮操作 */
  203 + handleQuery() {
  204 + this.queryParams.pageNum = 1;
  205 + this.getList();
  206 + },
  207 + /** 重置按钮操作 */
  208 + resetQuery() {
  209 + this.resetForm("queryForm");
  210 + this.handleQuery();
  211 + },
  212 + // 多选框选中数据
  213 + handleSelectionChange(selection) {
  214 + this.ids = selection.map(item => item.id)
  215 + this.single = selection.length!==1
  216 + this.multiple = !selection.length
  217 + },
  218 + getAreaName(code){
  219 + for(let i =0;i<this.areas.length;i++){
  220 + if(Number(code) == this.areas[i].code){
  221 + return this.areas[i].name;
  222 + break;
  223 + }
  224 + }
  225 + return code;
  226 + },
  227 + getCaseType(type){
  228 + for(let i in this.caseType){
  229 +
  230 +
  231 + if(this.caseType[i].code==type)
  232 + return this.caseType[i].name
  233 + }
  234 + },
  235 + /** 新增按钮操作 */
  236 + handleAdd() {
  237 + this.reset();
  238 + this.open = true;
  239 + this.title = "添加线下交办案卷";
  240 +
  241 + let date = new Date();
  242 +
  243 +
  244 + this.form.number = date.getFullYear()
  245 + +""+((date.getMonth()+1) < 10 ? "0" + (date.getMonth()+1) : (date.getMonth()+1))
  246 + +""+ ((date.getDate()) < 10 ? "0" + (date.getDate()) : (date.getDate()))
  247 + +""+ ((date.getHours()) < 10 ? "0" + (date.getHours()) : (date.getHours()))
  248 + +""+ ((date.getMinutes()) < 10 ? "0" + (date.getMinutes()) : (date.getMinutes()))
  249 + +""+ ((date.getSeconds()) < 10 ? "0" + (date.getSeconds()*1000) : (date.getSeconds()*1000))
  250 + },
  251 + /** 修改按钮操作 */
  252 + handleUpdate(row) {
  253 + this.reset();
  254 + this.businessKey =row.id + "";
  255 + this.open2 = true;
  256 + },
  257 + /** 提交按钮 */
  258 + submitForm() {
  259 + this.$refs["form"].validate(valid => {
  260 + if (valid) {
  261 + this.form.attach = this.form.attach +"";
  262 + if (this.form.id != null) {
  263 + updateCaseOffline(this.form).then(response => {
  264 + this.msgSuccess("修改成功");
  265 + this.open = false;
  266 + this.getList();
  267 + });
  268 + } else {
  269 + addCaseOffline(this.form).then(response => {
  270 + this.msgSuccess("新增成功");
  271 + this.open = false;
  272 + this.getList();
  273 + });
  274 + }
  275 + }
  276 + });
  277 + },
  278 + /** 删除按钮操作 */
  279 + handleDelete(row) {
  280 + const ids = row.id || this.ids;
  281 + this.$confirm('是否确认删除线下交办案卷编号为"' + ids + '"的数据项?', "警告", {
  282 + confirmButtonText: "确定",
  283 + cancelButtonText: "取消",
  284 + type: "warning"
  285 + }).then(function() {
  286 + return delCaseOffline(ids);
  287 + }).then(() => {
  288 + this.getList();
  289 + this.msgSuccess("删除成功");
  290 + })
  291 + },
  292 + /** 导出按钮操作 */
  293 + handleExport() {
  294 + const queryParams = this.queryParams;
  295 + this.$confirm('是否确认导出所有线下交办案卷数据项?', "警告", {
  296 + confirmButtonText: "确定",
  297 + cancelButtonText: "取消",
  298 + type: "warning"
  299 + }).then(function() {
  300 + return exportCaseOffline(queryParams);
  301 + }).then(response => {
  302 + this.download(response.message);
  303 + })
  304 + },
  305 + removeAttchItem(index, img) {
  306 + this.form.attach.splice(this.form.attach.indexOf(img), 1);
  307 + this.$forceUpdate();
  308 + },
  309 + uploadSuccess(res, file, fileList) {
  310 + if(res.code){
  311 + this.$message(res.message);
  312 + return;
  313 + }
  314 + if(!this.form.attach){
  315 + this.form.attach = [];
  316 + }
  317 + this.form.attach.push(res);
  318 + },
  319 + showFileUpload(i) {
  320 + this.uploadImageDialog = true;
  321 + this.picIndex = i;
  322 + },
  323 + beforeUpload(file) {
  324 + let isRightSize = file.size / 1024 / 1024 < 20
  325 + if (!isRightSize) {
  326 + this.$message.error('文件大小超过 20MB')
  327 + return isRightSize;
  328 + }
  329 + let isAccept = false;
  330 + if (file.name.indexOf('.docx') > -1 || file.name.indexOf(".jpg") > -1 || file.name.indexOf('.doc') > -1 || file
  331 + .name.indexOf('.pdf') > -1) {
  332 + isAccept = true;
  333 + }
  334 + if (!isAccept) {
  335 + this.$message.error('应该选择PDF、JPG、WORD类型的文件')
  336 + return isAccept;
  337 + }
  338 + },
  339 + downloadFile(path) {
  340 + window.location.href = process.env.VUE_APP_BASE_API + "/business/threestep/download?path=" + encodeURI(path);
  341 + },
  342 + handleClose() {
  343 + this.uploadImageDialog = false;
  344 + this.fileList = [];
  345 + },
  346 + }
  347 +};
trash-ui/src/api/company_credit.js 0 → 100644
  1 + import {
  2 + listCredit,
  3 + getCredit,
  4 + delCredit,
  5 + addCredit,
  6 + updateCredit,
  7 + exportCredit,
  8 + getNames,
  9 + getPlaces,
  10 + historyCredit
  11 + } from "@/api/business/company";
  12 +
  13 + import {
  14 + companyList,
  15 + updateCompany,
  16 + } from "@/api/dict";
  17 +
  18 +
  19 + export default {
  20 + name: "Credit",
  21 + data() {
  22 + return {
  23 + // 遮罩层
  24 + loading: true,
  25 + // 选中数组
  26 + ids: [],
  27 + // 非单个禁用
  28 + single: true,
  29 + // 非多个禁用
  30 + multiple: true,
  31 + // 显示搜索条件
  32 + showSearch: true,
  33 + infoDialog :false,
  34 + // 总条数
  35 + total: 0,
  36 + // 工地表格数据
  37 + creditList: [],
  38 + creditListInfo: [],
  39 + companyList:[],
  40 + dictNames:[],
  41 + dictPlaces:[],
  42 + // 弹出层标题
  43 + title: "",
  44 + // 是否显示弹出层
  45 + open: false,
  46 + isEdit:false,
  47 + // 查询参数
  48 + queryParams: {
  49 + pageNum: 1,
  50 + pageSize: 10,
  51 + name: null,
  52 + time: null,
  53 + place: null,
  54 + reason: null,
  55 + status: 0,
  56 + lostCredit: 1
  57 + },
  58 + // 表单参数
  59 + form: {},
  60 + updateForm:{},
  61 + // 表单校验
  62 + rules: {
  63 + name: [
  64 + { required: true, message: '请选择运输企业', trigger: 'change' },
  65 + ],
  66 + reason: [
  67 + { required: true, message: '请填写原因', trigger: 'change' },
  68 + ],
  69 + },
  70 + rules2: {
  71 + reason: [
  72 + { required: true, message: '请填写原因', trigger: 'change' },
  73 + ],
  74 + },
  75 + };
  76 + },
  77 + created() {
  78 + this.init();
  79 + },
  80 + methods: {
  81 + init(){
  82 + this.resetQuery();
  83 + this.getList();
  84 + getNames(this.queryParams).then(response => {
  85 + this.dictNames = response;
  86 + });
  87 + getPlaces(this.queryParams).then(response => {
  88 + this.dictPlaces = response;
  89 + });
  90 +
  91 + let query = {
  92 + 'page':1,
  93 + 'size':9999,
  94 + 'creditStatus':0
  95 + }
  96 + companyList(query).then(response => {
  97 +
  98 + this.companyList = response.result.list;
  99 + });
  100 + },
  101 + getDataInfo(row){
  102 + let param ={"objectId":row.objectId}
  103 +
  104 + listCredit(param).then(response => {
  105 + this.creditListInfo = response.rows;
  106 + this.infoDialog = true;
  107 + });
  108 +
  109 + },
  110 + getData(stauts){
  111 + this.queryParams.status=0;
  112 + this.queryParams.lostCredit=stauts;
  113 + this.getList();
  114 + },
  115 + getHistoryData(){
  116 + this.queryParams.status=1;
  117 + this.getList();
  118 + },
  119 + colStyle(obj){
  120 + if(obj.column.property == "id"){
  121 + return {background:"#f8f8f9"}
  122 + }
  123 + },
  124 + getObjId(a){
  125 + this.form.objectId = a.id;
  126 + this.form.place = a.areaName;
  127 + },
  128 + getList() {
  129 + this.loading = true;
  130 + if(this.queryParams.status==0){
  131 + listCredit(this.queryParams).then(response => {
  132 + this.creditList = response.rows;
  133 + this.total = response.total;
  134 + this.loading = false;
  135 + });
  136 + }
  137 + if(this.queryParams.status==1){
  138 + historyCredit(this.queryParams).then(response => {
  139 + this.creditList = response.rows;
  140 + this.total = response.total;
  141 + this.loading = false;
  142 + });
  143 + }
  144 +
  145 + },
  146 + // 取消按钮
  147 + cancel() {
  148 + this.open = false;
  149 + this.isEdit = false;
  150 + this.reset();
  151 + },
  152 + // 表单重置
  153 + reset() {
  154 + this.form = {
  155 + id: null,
  156 + name: null,
  157 + time: null,
  158 + place: null,
  159 + reason: null,
  160 + lostCredit: null,
  161 + objectId: null,
  162 + };
  163 + this.resetForm("form");
  164 + },
  165 + /** 搜索按钮操作 */
  166 + handleQuery() {
  167 + this.queryParams.pageNum = 1;
  168 + this.getList();
  169 + },
  170 + /** 重置按钮操作 */
  171 + resetQuery() {
  172 + this.resetForm("queryForm");
  173 + console.log(this.queryParams);
  174 + this.handleQuery();
  175 + },
  176 + // 多选框选中数据
  177 + handleSelectionChange(selection) {
  178 + this.ids = selection.map(item => item.id)
  179 + this.single = selection.length !== 1
  180 + this.multiple = !selection.length
  181 + },
  182 + /** 新增按钮操作 */
  183 + handleAdd() {
  184 + this.reset();
  185 + this.open = true;
  186 + this.title = "企业信息录入";
  187 + },
  188 + /** 修改按钮操作 */
  189 + handleUpdate(row) {
  190 + this.reset();
  191 + const id = row.id || this.ids
  192 + getCredit(id).then(response => {
  193 + this.form = response.data;
  194 + this.isEdit = true;
  195 + });
  196 + },
  197 + /** 提交按钮 */
  198 + submitForm() {
  199 + if(this.isEdit){
  200 + this.$refs["updateForm"].validate(valid => {
  201 + if (valid) {
  202 + this.loading = true;
  203 + this.form.lostCredit = 0;
  204 + this.updateForm.id = this.form.id;
  205 + let data = [{id:this.form.objectId,dishonestState:this.form.lostCredit}];
  206 + updateCompany(data).then(res=>{
  207 + updateCredit(this.updateForm).then(response => {
  208 + this.msgSuccess("撤销成功");
  209 + this.isEdit = false;
  210 + this.updateForm = {};
  211 + this.init();
  212 + });
  213 + });
  214 + }
  215 + });
  216 + }else{
  217 + this.$refs["form"].validate(valid => {
  218 + if (valid) {
  219 + this.loading = true;
  220 + this.form.lostCredit = 1;
  221 + let data = [{id:this.form.objectId,dishonestState:this.form.lostCredit}];
  222 + updateCompany(data).then(res=>{
  223 + addCredit(this.form).then(response => {
  224 + this.msgSuccess("新增成功");
  225 + this.open = false;
  226 + this.init();
  227 + });
  228 + });
  229 + }
  230 + });
  231 + }
  232 + },
  233 + handleExport() {
  234 + const queryParams = this.queryParams;
  235 + this.$confirm('是否确认导出所有企业数据项?', "警告", {
  236 + confirmButtonText: "确定",
  237 + cancelButtonText: "取消",
  238 + type: "warning"
  239 + }).then(function() {
  240 + return exportCredit(queryParams);
  241 + }).then(response => {
  242 + this.download(response.message);
  243 + })
  244 + }
  245 + }
  246 + };
0 \ No newline at end of file 247 \ No newline at end of file
trash-ui/src/api/construction_credit.js 0 → 100644
  1 +import {
  2 + listCredit,
  3 + getCredit,
  4 + delCredit,
  5 + addCredit,
  6 + updateCredit,
  7 + exportCredit,
  8 + getNames,
  9 + getTypes,
  10 + getPlaces,
  11 + historyCredit
  12 + } from "@/api/business/constructionsites";
  13 +
  14 + import {
  15 + constructionsitesList,
  16 + getDict,
  17 + getArea,
  18 + updateConstructionsites
  19 + } from "@/api/dict";
  20 +
  21 + export default {
  22 + name: "ConstructionCredit",
  23 + data() {
  24 + return {
  25 + // 遮罩层
  26 + loading: true,
  27 + // 选中数组
  28 + ids: [],
  29 + // 非单个禁用
  30 + single: true,
  31 + // 非多个禁用
  32 + multiple: true,
  33 + // 显示搜索条件
  34 + showSearch: true,
  35 + infoDialog: false,
  36 + // 总条数
  37 + total: 0,
  38 + // 工地表格数据
  39 + creditList: [],
  40 + creditListInfo: [],
  41 + dictNames: [],
  42 + dictTypes: [],
  43 + dictPlaces: [],
  44 + // 弹出层标题
  45 + title: "",
  46 + // 是否显示弹出层
  47 + open: false,
  48 + isEdit: false,
  49 + // 查询参数
  50 + queryParams: {
  51 + pageNum: 1,
  52 + pageSize: 10,
  53 + name: null,
  54 + type: null,
  55 + time: null,
  56 + place: null,
  57 + reason: null,
  58 + status: 0,
  59 + lostCredit: 1,
  60 + },
  61 + // 表单参数
  62 + form: {
  63 + },
  64 + updateForm: {},
  65 + //建筑垃圾类型集合
  66 + trashTypes: [],
  67 + constructionList: [],
  68 + // 表单校验
  69 + rules: {
  70 + name: [{
  71 + required: true,
  72 + message: '请选择工地',
  73 + trigger: 'change'
  74 + }, ],
  75 + reason: [{
  76 + required: true,
  77 + message: '请填写原因',
  78 + trigger: 'change'
  79 + }, ]
  80 + },
  81 + areas:[],
  82 + };
  83 +
  84 +
  85 + },
  86 + created() {
  87 +
  88 + getArea().then(res => {
  89 + this.areas = res.result;
  90 + });
  91 +
  92 + getDict({'type': 'CSDisSiteDisposalType'}).then(response => {
  93 + this.trashTypes = response.result;
  94 + });
  95 +
  96 + this.init();
  97 +
  98 + },
  99 + methods: {
  100 + init(){
  101 + this.reset();
  102 + this.resetQuery();
  103 + this.getList();
  104 + this.getNamesData();
  105 + this.getTypesData();
  106 + this.getPlacesData();
  107 +
  108 + let query = {
  109 + 'page': 1,
  110 + 'size': 9999,
  111 + 'creditStatus': 0
  112 + };
  113 + constructionsitesList(query).then(response => {
  114 + this.constructionList = response.result.list
  115 + });
  116 + },
  117 + getList() {
  118 + this.loading = true;
  119 + if (this.queryParams.status == 0) {
  120 + listCredit(this.queryParams).then(response => {
  121 + this.creditList = response.rows;
  122 + this.total = response.total;
  123 + this.loading = false;
  124 + });
  125 + }
  126 + if (this.queryParams.status == 1) {
  127 + historyCredit(this.queryParams).then(response => {
  128 + this.creditList = response.rows;
  129 + this.total = response.total;
  130 + this.loading = false;
  131 + });
  132 + }
  133 + },
  134 + getDataInfo(row) {
  135 + let param = {
  136 + "objectId": row.objectId
  137 + }
  138 + listCredit(param).then(response => {
  139 + this.creditListInfo = response.rows;
  140 + this.infoDialog = true;
  141 + });
  142 + },
  143 + getNamesData() {
  144 + getNames(this.queryParams).then(response => {
  145 + this.dictNames = response;
  146 + });
  147 + },
  148 + getTypesData() {
  149 + getTypes(this.queryParams).then(response => {
  150 + this.dictTypes = response;
  151 + });
  152 + },
  153 + getPlacesData() {
  154 + getPlaces(this.queryParams).then(response => {
  155 + this.dictPlaces = response;
  156 + });
  157 + },
  158 + getData(stauts) {
  159 + this.queryParams.status = 0;
  160 + this.queryParams.lostCredit = stauts;
  161 + this.init();
  162 + },
  163 + getHistoryData() {
  164 + this.queryParams.status = 1;
  165 + this.init();
  166 + },
  167 + colStyle(obj) {
  168 + if (obj.column.property == "id") {
  169 + return {
  170 + background: "#f8f8f9"
  171 + }
  172 + }
  173 + },
  174 + getObjId(object) {
  175 +
  176 + this.form.objectId = object.id;
  177 +
  178 + for(let i in this.areas){
  179 + if(this.areas[i].code == Number(object.areaCode)){
  180 + this.form.place = this.areas[i].name;
  181 + break;
  182 + }
  183 + }
  184 + for(let i in this.trashTypes){
  185 + if(this.trashTypes[i].code == Number(object.cargoId)){
  186 + this.form.type = this.trashTypes[i].name;
  187 + break;
  188 + }
  189 + }
  190 + },
  191 + // 取消按钮
  192 + cancel() {
  193 + this.open = false;
  194 + this.isEdit = false;
  195 + this.reset();
  196 + },
  197 + // 表单重置
  198 + reset() {
  199 + this.form = {
  200 + id: null,
  201 + name: null,
  202 + type: null,
  203 + time: null,
  204 + place: null,
  205 + reason: null,
  206 + lostCredit: null,
  207 + objectId: null,
  208 + };
  209 + this.updateForm = {
  210 + reason:null,
  211 + };
  212 + this.resetForm("updateForm");
  213 + this.resetForm("form");
  214 + },
  215 + /** 搜索按钮操作 */
  216 + handleQuery() {
  217 + this.queryParams.pageNum = 1;
  218 + this.getList();
  219 + },
  220 + /** 重置按钮操作 */
  221 + resetQuery() {
  222 + this.resetForm("queryForm");
  223 + console.log(this.queryParams);
  224 + this.handleQuery();
  225 + },
  226 + // 多选框选中数据
  227 + handleSelectionChange(selection) {
  228 + this.ids = selection.map(item => item.id)
  229 + this.single = selection.length !== 1
  230 + this.multiple = !selection.length
  231 + },
  232 + /** 新增按钮操作 */
  233 + handleAdd() {
  234 + this.reset();
  235 + this.open = true;
  236 + this.title = "添加工地";
  237 + },
  238 + /** 修改按钮操作 */
  239 + handleUpdate(row) {
  240 + this.reset();
  241 + const id = row.id || this.ids
  242 + getCredit(id).then(response => {
  243 + this.form = response.data;
  244 + this.isEdit = true;
  245 + });
  246 + },
  247 + /** 提交按钮 */
  248 + submitForm() {
  249 + this.$refs["form"].validate(valid => {
  250 + if (valid) {
  251 + this.loading = true;
  252 + if (this.form.id != null) {
  253 + this.form.lostCredit = 0;
  254 + let data = [{creditStatus:this.form.lostCredit,objectId:this.form.objectId}];
  255 +
  256 + updateConstructionsites(data).then(response=>{
  257 + this.updateForm.id = this.form.id;
  258 + updateCredit(this.updateForm).then(response => {
  259 + this.msgSuccess("撤销成功");
  260 + this.isEdit = false;
  261 + this.init();
  262 + });
  263 + });
  264 + } else {
  265 + this.form.lostCredit = 1;
  266 + let data = [{creditStatus:this.form.lostCredit,objectId:this.form.objectId}];
  267 + updateConstructionsites(data).then(response=>{
  268 + addCredit(this.form).then(response => {
  269 + this.msgSuccess("新增成功");
  270 + this.open = false;
  271 + this.init();
  272 + });
  273 + });
  274 + }
  275 + }
  276 + });
  277 + },
  278 + handleExport() {
  279 + const queryParams = this.queryParams;
  280 + this.$confirm('是否确认导出所有工地数据项?', "警告", {
  281 + confirmButtonText: "确定",
  282 + cancelButtonText: "取消",
  283 + type: "warning"
  284 + }).then(function() {
  285 + return exportCredit(queryParams);
  286 + }).then(response => {
  287 + this.download(response.message);
  288 + })
  289 + }
  290 + }
  291 + };
0 \ No newline at end of file 292 \ No newline at end of file
trash-ui/src/api/dayWorkReport.js 0 → 100644
  1 +import {
  2 + dayWorkList,
  3 + exportDayWorkList,
  4 + exportDayWorkHistoryList
  5 +} from "@/api/business/daywork";
  6 +
  7 +
  8 +import {
  9 + Upload
  10 +} from "element-ui";
  11 +import {
  12 + getToken
  13 +} from "@/utils/auth";
  14 +
  15 +import {
  16 + earthsitesList,
  17 + constructionsitesList,
  18 + getDict,
  19 + getArea
  20 +} from "@/api/dict";
  21 +
  22 +export default {
  23 + name: "dayWorkReport",
  24 + data() {
  25 + return {
  26 + // 遮罩层
  27 + loading: true,
  28 +
  29 + reUpdate: false,
  30 +
  31 + info: false,
  32 +
  33 + infoData: null,
  34 + businessKey: null,
  35 + picSample: false,
  36 + uploadImageDialog: false,
  37 + // 选中数组
  38 + ids: [],
  39 + // 非单个禁用
  40 + single: true,
  41 + // 非多个禁用
  42 + multiple: true,
  43 + // 显示搜索条件
  44 + showSearch: true,
  45 + // 总条数
  46 + total: 0,
  47 + // 开工报表表格数据
  48 + threestepList: [],
  49 + fileList: [],
  50 + // 弹出层标题
  51 + title: "",
  52 + // 是否显示弹出层
  53 + open: false,
  54 + // 查询参数
  55 + queryParams: {
  56 + pageNum: 1,
  57 + pageSize: 10,
  58 + workStartTime: null,
  59 + workEndTime: null,
  60 + name: null,
  61 + earthsitesName: null,
  62 + place: null,
  63 + subReason: null,
  64 + },
  65 + // 表单参数
  66 + form: {},
  67 + picIndex: null,
  68 + // 表单校验
  69 + rules: {},
  70 + SiteWorkAreaCodeType: [],
  71 + remoteData: [{
  72 + name: "a",
  73 + id: "id"
  74 + }],
  75 + remoteQueryData: {
  76 + "page": 1,
  77 + "size": 9999
  78 + },
  79 + areas: [{
  80 + code: "a",
  81 + name: "A"
  82 + }],
  83 + constructionsitesList: [],
  84 + earthsitesList: [],
  85 + areaCode: null,
  86 + bindData: [{
  87 + name: "a",
  88 + id: "id"
  89 + }],
  90 + bindname: null,
  91 + projectTypes: null,
  92 + earthsitesTypes: null,
  93 + dayWorkCount: null,
  94 + outside: ["长沙县", "望城区", "浏阳市", "宁乡市", "株洲市", "湘潭市", "汩罗市", "湘阴县"],
  95 + };
  96 + },
  97 + created() {
  98 + this.getList(0);
  99 +
  100 + getArea().then(res=>{
  101 + this.areas = res.result;
  102 + });
  103 +
  104 + },
  105 + methods: {
  106 + areaClear() {
  107 + this.areaCode = null;
  108 + },
  109 + selectArea(a) {
  110 + this.areaCode = a;
  111 + },
  112 + getObjId(item) {
  113 + if (this.form.type == 0) {
  114 + this.form.objectId = item.id;
  115 + this.form.place = Number(item.areaCode);
  116 + } else {
  117 + this.form.earthsitesId = item.id;
  118 + this.form.place = Number(item.areaCode);
  119 + }
  120 + },
  121 + getEarthsiteId(item) {
  122 + if (this.form.type == 0) {
  123 + this.form.objectId = item.id;
  124 + } else {
  125 + this.form.earthsitesId = item.id;
  126 + }
  127 + },
  128 + handleClose() {
  129 + this.uploadImageDialog = false;
  130 + this.fileList = [];
  131 + },
  132 +
  133 + getListAndExport() {
  134 + var page = this.queryParams.page;
  135 + var size = this.queryParams.pageSize;
  136 +
  137 +
  138 + this.queryParams.page = 1;
  139 + this.queryParams.pageSize = 9999;
  140 +
  141 +
  142 + dayWorkList(this.queryParams).then(response => {
  143 +
  144 + let list = response.rows;
  145 +
  146 + for (let i = 0; i < list.length; i++) {
  147 + list[i].place = this.getAreaName(list[i].place);
  148 + if (this.outside.indexOf(list[i].place) > -1) {
  149 + if (list[i].status == "开工") {
  150 + list[i].estatus = "开工";
  151 + list[i].eselfCheckTime = list[i].selfCheckTime;
  152 + list[i].descript = "开工";
  153 + }
  154 + }
  155 + }
  156 + let data = [];
  157 + let index = 1;
  158 + for (let i in list) {
  159 +
  160 + let obj = {
  161 + id: index,
  162 + name: list[i].name,
  163 + createTime: list[i].createTime,
  164 + selfCheckTime: list[i].selfCheckTime,
  165 + place: list[i].place,
  166 + status: list[i].status,
  167 + ename: list[i].ename,
  168 + eplace: list[i].eplace,
  169 + estatus: list[i].estatus,
  170 + eselfCheckTime: list[i].eselfCheckTime,
  171 + descript: list[i].descript,
  172 + }
  173 +
  174 + data.push(obj);
  175 + index += 1;
  176 +
  177 + }
  178 +
  179 +
  180 + if (this.queryParams.his == 1) {
  181 + exportDayWorkHistoryList(data).then(res => {
  182 +
  183 + this.loading = false;
  184 +
  185 + this.queryParams.page = page;
  186 + this.queryParams.pageSize = size;
  187 +
  188 + this.download(res.message);
  189 +
  190 + });
  191 + } else {
  192 + exportDayWorkList(data).then(res => {
  193 +
  194 + this.loading = false;
  195 + debugger;
  196 + console.log(page);
  197 + this.queryParams.page = page;
  198 + console.log(size);
  199 + this.queryParams.pageSize = size;
  200 +
  201 + this.download(res.message);
  202 +
  203 + });
  204 + }
  205 +
  206 +
  207 +
  208 + });
  209 +
  210 + },
  211 + /** 查询开工报表列表 */
  212 + getList(tabIdx) {
  213 +
  214 + this.loading = true;
  215 +
  216 + // let query = this.queryParams;
  217 +
  218 + if (tabIdx == 1) {
  219 + this.resetQuery();
  220 + this.queryParams.his = tabIdx;
  221 + } else if (tabIdx == 0) {
  222 + this.resetQuery();
  223 + this.queryParams.his = tabIdx;
  224 + }
  225 +
  226 + dayWorkList(this.queryParams).then(response => {
  227 +
  228 + this.threestepList = response.rows;
  229 +
  230 +
  231 + for (let i = 0; i < this.threestepList.length; i++) {
  232 + if (this.outside.indexOf(this.threestepList[i].place) > -1) {
  233 + if (this.threestepList[i].status == "开工") {
  234 + this.threestepList[i].estatus = "开工";
  235 + this.threestepList[i].eselfCheckTime = this.threestepList[i].selfCheckTime;
  236 + this.threestepList[i].descript = "开工";
  237 + }
  238 + }
  239 +
  240 + }
  241 +
  242 + this.loading = false;
  243 + this.dayWorkCount = response.msg;
  244 + this.total = response.total;
  245 + });
  246 +
  247 +
  248 + },
  249 + // 取消按钮
  250 + cancel() {
  251 + this.open = false;
  252 + this.reset();
  253 + },
  254 + // 表单重置
  255 + reset() {
  256 + this.form = {
  257 + id: null,
  258 + name: null,
  259 + type: null,
  260 + place: null,
  261 + selfCheckTime: null,
  262 + objectId: null,
  263 + earthsitesId: null,
  264 + createTime: null,
  265 + checkTime: null,
  266 + earthsitesName: null,
  267 + contract: null,
  268 + companys: null,
  269 + companyTrucks: null,
  270 + img0: null,
  271 + img1: null,
  272 + img2: null,
  273 + img3: null,
  274 + img4: null,
  275 + img5: null,
  276 + img6: null,
  277 + img7: null,
  278 + img8: null,
  279 + img9: null,
  280 + img10: null,
  281 + img11: null,
  282 + img12: null,
  283 + person: null,
  284 + phone: null
  285 + };
  286 + this.resetForm("form");
  287 + },
  288 + /** 搜索按钮操作 */
  289 + handleQuery() {
  290 + this.queryParams.pageNum = 1;
  291 + this.getList();
  292 + },
  293 + /** 重置按钮操作 */
  294 + resetQuery() {
  295 + this.queryParams.workEndTime = null;
  296 + this.queryParams.workStartTime = null;
  297 + this.queryParams.subReason = null;
  298 + this.queryParams.place = null;
  299 + this.queryParams.earthsitesName = null;
  300 + this.queryParams.name = null;
  301 +
  302 +
  303 + this.resetForm("queryForm");
  304 + this.handleQuery();
  305 + },
  306 + // 多选框选中数据
  307 + handleSelectionChange(selection) {
  308 + this.ids = selection.map(item => item.id)
  309 + this.single = selection.length !== 1
  310 + this.multiple = !selection.length
  311 + },
  312 + /** 新增按钮操作 */
  313 + handleAdd() {
  314 + this.reset();
  315 + this.open = true;
  316 + this.title = "报工自查";
  317 + },
  318 + /** 修改按钮操作 */
  319 + handleUpdate(row) {
  320 + this.reset();
  321 + this.businessKey = row.id + "";
  322 + this.info = true;
  323 + },
  324 + getAreaName(code) {
  325 + for (let i = 0; i < this.areas.length; i++) {
  326 + if (Number(code) == this.areas[i].code) {
  327 + return this.areas[i].name;
  328 + break;
  329 + }
  330 + }
  331 + return code;
  332 + },
  333 +
  334 + reSub(row) {
  335 + this.reset();
  336 +
  337 + this.open = true;
  338 + this.title = "再次提交";
  339 + getThreestep(row.id).then(res => {
  340 + this.form = res.data;
  341 + this.form.type = this.form.type + "";
  342 +
  343 + for (let i = 0; i < 13; i++) {
  344 + if (this.form["img" + i]) {
  345 + this.form["img" + i] = this.form["img" + i].split(",");
  346 + }
  347 + }
  348 +
  349 +
  350 + this.form.status = 0;
  351 + this.form.id = null;
  352 + });
  353 +
  354 +
  355 +
  356 + },
  357 +
  358 + checkEndSuccess() {
  359 + this.form.checkEndTime = new Date();
  360 + this.form.id = this.businessKey;
  361 + for (let i = 1; i < 4; i++) {
  362 + if (this.form["attchItem" + i]) {
  363 + this.form["attchItem" + i] = this.form["attchItem" + i] + "";
  364 + }
  365 + }
  366 + this.submitForm();
  367 + },
  368 + checkEndError() {
  369 + console.log(this.form, this.businessKey);
  370 + //发起案卷
  371 + },
  372 +
  373 + /** 提交按钮 */
  374 + submitForm() {
  375 + this.$refs["form"].validate(valid => {
  376 + if (valid) {
  377 + if (this.form.id != null) {
  378 + updateThreestep(this.form).then(response => {
  379 + this.msgSuccess("修改成功");
  380 + this.open = false;
  381 + this.open2 = false;
  382 + this.getList();
  383 + });
  384 + } else {
  385 + this.form.companys = this.form.companys + "";
  386 + this.form.companyTrucks = this.form.companyTrucks + "";
  387 +
  388 + for (let i = 0; i < 13; i++) {
  389 + if (this.form["img" + i]) {
  390 +
  391 + this.form["img" + i] = this.form["img" + i] + "";
  392 + }
  393 + }
  394 + addThreestep(this.form).then(response => {
  395 + this.msgSuccess("新增成功");
  396 + this.open = false;
  397 + this.open2 = false;
  398 + this.getList();
  399 + });
  400 + }
  401 + }
  402 + });
  403 + },
  404 + /** 删除按钮操作 */
  405 + handleDelete(row) {
  406 + const ids = row.id || this.ids;
  407 + this.$confirm('是否确认删除开工报表编号为"' + ids + '"的数据项?', "警告", {
  408 + confirmButtonText: "确定",
  409 + cancelButtonText: "取消",
  410 + type: "warning"
  411 + }).then(function() {
  412 + return delThreestep(ids);
  413 + }).then(() => {
  414 + this.getList();
  415 + this.msgSuccess("删除成功");
  416 + })
  417 + },
  418 + /** 导出按钮操作 */
  419 + handleExport() {
  420 + let curPage = this.queryParams.page;
  421 + let curSize = this.queryParams.pageSize;
  422 + let that = this;
  423 +
  424 + this.$confirm('是否确认导出所有开工报表数据项?', "警告", {
  425 + confirmButtonText: "确定",
  426 + cancelButtonText: "取消",
  427 + type: "warning"
  428 + }).then(function() {
  429 + that.loading = true;
  430 + that.getListAndExport();
  431 + });
  432 +
  433 + }
  434 + }
  435 +};
trash-ui/src/api/dict.js
@@ -94,8 +94,8 @@ export function updateTruck(data) { @@ -94,8 +94,8 @@ export function updateTruck(data) {
94 export function driverList(data) { 94 export function driverList(data) {
95 return requestRemote({ 95 return requestRemote({
96 url: '/api/gpsservice/v1/drivers/search', 96 url: '/api/gpsservice/v1/drivers/search',
97 - method: 'get',  
98 - params: data 97 + method: 'post',
  98 + data: data
99 }); 99 });
100 } 100 }
101 export function updateDriver(data) { 101 export function updateDriver(data) {
trash-ui/src/api/driver_credit.js 0 → 100644
  1 +import {
  2 + listCredit,
  3 + getCredit,
  4 + delCredit,
  5 + addCredit,
  6 + updateCredit,
  7 + exportCredit,
  8 + getNames,
  9 + historyCredit
  10 +} from "@/api/business/driver";
  11 +
  12 +import {
  13 + companyList,
  14 + driverList
  15 +} from "@/api/dict";
  16 +
  17 +export default {
  18 + name: "ConstructionCredit",
  19 + data() {
  20 + return {
  21 + // 遮罩层
  22 + loading: true,
  23 + // 选中数组
  24 + ids: [],
  25 + // 非单个禁用
  26 + single: true,
  27 + // 非多个禁用
  28 + multiple: true,
  29 + // 显示搜索条件
  30 + showSearch: true,
  31 + infoDialog :false,
  32 + // 总条数
  33 + total: 0,
  34 + // 工地表格数据
  35 + creditList: [],
  36 + creditListInfo: [],
  37 + dictNames:[],
  38 + dictTypes:[],
  39 + dictPlaces:[],
  40 + driverList:[],
  41 + names:[],
  42 + idNumbers:[],
  43 + places:[],
  44 + // 弹出层标题
  45 + title: "",
  46 + // 是否显示弹出层
  47 + open: false,
  48 + isEdit:false,
  49 + // 查询参数
  50 + queryParams: {
  51 + pageNum: 1,
  52 + pageSize: 10,
  53 + name: null,
  54 + idNumber: null,
  55 + time: null,
  56 + reason: null,
  57 + status: 0,
  58 + lostCredit: 1
  59 + },
  60 + // 表单参数
  61 + form: {},
  62 + updateForm:{},
  63 + // 表单校验
  64 + rules: {name: [
  65 + { required: true, message: '请选择驾驶员', trigger: 'change' },
  66 + ],reason: [
  67 + { required: true, message: '请填写原因', trigger: 'change' },
  68 + ]}
  69 + };
  70 + },
  71 + created() {
  72 + this.init();
  73 + },
  74 + methods: {
  75 + init(){
  76 + this.reset();
  77 +
  78 + this.resetQuery();
  79 + this.getList();
  80 + this.getNamesData();
  81 +
  82 +
  83 + let data = {};
  84 + driverList(data).then(res=>{
  85 +
  86 + this.driverList = res.list;
  87 +
  88 + });
  89 +
  90 + },
  91 + getDataInfo(row){
  92 + let param ={"objectId":row.objectId}
  93 + listCredit(param).then(response => {
  94 + this.creditListInfo = response.rows;
  95 + this.infoDialog = true;
  96 + });
  97 +
  98 + },
  99 + getNamesData(){
  100 + getNames(this.queryParams).then(response => {
  101 + this.dictNames = response;
  102 + });
  103 + },
  104 + getData(stauts){
  105 + this.queryParams.status=0;
  106 + this.queryParams.lostCredit=stauts;
  107 + this.getList();
  108 + },
  109 + getHistoryData(){
  110 + this.queryParams.status=1;
  111 + this.init();
  112 + },
  113 + colStyle(obj){
  114 + if(obj.column.property == "id"){
  115 + return {background:"#f8f8f9"}
  116 + }
  117 + },
  118 + getObjId(value){
  119 + for(let i in this.driverList){
  120 + if(this.driverList[i].name == value){
  121 + this.form.objectId = this.driverList[i].id;
  122 + this.form.idNumber = this.driverList[i].identityNo;
  123 + }
  124 + }
  125 + },
  126 + getList() {
  127 + this.loading = true;
  128 + if(this.queryParams.status==0){
  129 + listCredit(this.queryParams).then(response => {
  130 + this.creditList = response.rows;
  131 + this.total = response.total;
  132 + this.loading = false;
  133 + });
  134 + }
  135 + if(this.queryParams.status==1){
  136 + historyCredit(this.queryParams).then(response => {
  137 + this.creditList = response.rows;
  138 + this.total = response.total;
  139 + this.loading = false;
  140 + });
  141 + }
  142 +
  143 + },
  144 + // 取消按钮
  145 + cancel() {
  146 + this.open = false;
  147 + this.isEdit = false;
  148 + this.reset();
  149 + },
  150 + // 表单重置
  151 + reset() {
  152 + this.form = {
  153 + id: null,
  154 + name: null,
  155 + idNumber: null,
  156 + time: null,
  157 + reason: null,
  158 + lostCredit: null,
  159 + objectId: null,
  160 + };
  161 + this.updateForm = {};
  162 + this.resetForm("form");
  163 + },
  164 + /** 搜索按钮操作 */
  165 + handleQuery() {
  166 + this.queryParams.pageNum = 1;
  167 + this.getList();
  168 + },
  169 + /** 重置按钮操作 */
  170 + resetQuery() {
  171 + this.resetForm("queryForm");
  172 + console.log(this.queryParams);
  173 + this.handleQuery();
  174 + },
  175 + // 多选框选中数据
  176 + handleSelectionChange(selection) {
  177 + this.ids = selection.map(item => item.id)
  178 + this.single = selection.length !== 1
  179 + this.multiple = !selection.length
  180 + },
  181 + /** 新增按钮操作 */
  182 + handleAdd() {
  183 + this.reset();
  184 + this.open = true;
  185 + this.title = "添加驾驶员";
  186 + },
  187 + /** 修改按钮操作 */
  188 + handleUpdate(row) {
  189 + this.reset();
  190 + const id = row.id || this.ids
  191 + getCredit(id).then(response => {
  192 + this.form = response.data;
  193 + this.isEdit = true;
  194 + });
  195 + },
  196 + /** 提交按钮 */
  197 + submitForm() {
  198 + if(this.open){
  199 + this.updateForm.reason = "1";
  200 + }
  201 + this.$refs["form"].validate(valid => {
  202 + if (valid) {
  203 +
  204 + this.loading = true;
  205 + if (this.form.id != null) {
  206 + this.updateForm.id = this.form.id;
  207 + updateCredit(this.updateForm).then(response => {
  208 + this.msgSuccess("撤销成功");
  209 + this.isEdit = false;
  210 + this.init();
  211 + });
  212 + } else {
  213 + this.form.lostCredit = 1;
  214 + addCredit(this.form).then(response => {
  215 + this.msgSuccess("新增成功");
  216 + this.open = false;
  217 + this.init();
  218 + });
  219 + }
  220 + }
  221 + });
  222 + },
  223 + handleExport() {
  224 + const queryParams = this.queryParams;
  225 + this.$confirm('是否确认导出所有驾驶员数据项?', "警告", {
  226 + confirmButtonText: "确定",
  227 + cancelButtonText: "取消",
  228 + type: "warning"
  229 + }).then(function() {
  230 + return exportCredit(queryParams);
  231 + }).then(response => {
  232 + this.download(response.message);
  233 + })
  234 + }
  235 + }
  236 +};
0 \ No newline at end of file 237 \ No newline at end of file
trash-ui/src/api/earthsites_credit.js 0 → 100644
  1 +
  2 +import {
  3 + listCredit,
  4 + getCredit,
  5 + delCredit,
  6 + addCredit,
  7 + updateCredit,
  8 + exportCredit,
  9 + getNames,
  10 + getTypes,
  11 + getPlaces,
  12 + historyCredit
  13 +} from "@/api/business/earthsites";
  14 +
  15 +import {
  16 + earthsitesList,
  17 + updateEarthsites
  18 +} from "@/api/dict";
  19 +
  20 +import requestRemote from '@/utils/requestRemote'
  21 +
  22 +export default {
  23 + name: "EarthSitesCredit",
  24 + data() {
  25 + return {
  26 + // 遮罩层
  27 + loading: true,
  28 + // 选中数组
  29 + ids: [],
  30 + // 非单个禁用
  31 + single: true,
  32 + // 非多个禁用
  33 + multiple: true,
  34 + // 显示搜索条件
  35 + showSearch: true,
  36 + infoDialog :false,
  37 + // 总条数
  38 + total: 0,
  39 + // 工地表格数据
  40 + creditList: [],
  41 + creditListInfo: [],
  42 + earthsitesList:[],
  43 + dictNames:[],
  44 + dictTypes:[],
  45 + dictPlaces:[],
  46 + names:[],
  47 + // 弹出层标题
  48 + title: "",
  49 + // 是否显示弹出层
  50 + open: false,
  51 + isEdit:false,
  52 + // 查询参数
  53 + queryParams: {
  54 + pageNum: 1,
  55 + pageSize: 10,
  56 + name: null,
  57 + type: null,
  58 + time: null,
  59 + place: null,
  60 + reason: null,
  61 + status: 0,
  62 + lostCredit: 1
  63 + },
  64 + // 表单参数
  65 + form: {},
  66 + updateForm:{},
  67 + // 表单校验
  68 + rules: {name: [
  69 + { required: true, message: '请选择消纳场', trigger: 'change' },
  70 + ],reason: [
  71 + { required: true, message: '请填写原因', trigger: 'change' },
  72 + ]}
  73 + };
  74 + },
  75 + created() {
  76 + this.init();
  77 + },
  78 + methods: {
  79 + init(){
  80 + this.resetQuery();
  81 + this.reset();
  82 + this.getList();
  83 + this.getNamesData();
  84 + this.getTypesData();
  85 + this.getPlacesData();
  86 +
  87 + let query = {
  88 + 'page': 1,
  89 + 'size': 9999,
  90 + 'creditStatus': 0
  91 + };
  92 + earthsitesList(query).then(response => {
  93 + this.earthsitesList = response.result.list
  94 + });
  95 + },
  96 + getDataInfo(row){
  97 + let param ={"objectId":row.objectId}
  98 + listCredit(param).then(response => {
  99 + this.creditListInfo = response.rows;
  100 + this.infoDialog = true;
  101 + });
  102 +
  103 + },
  104 + getNamesData(){
  105 + getNames(this.queryParams).then(response => {
  106 + this.dictNames = response;
  107 + });
  108 + },
  109 + getTypesData() {
  110 + getTypes(this.queryParams).then(response => {
  111 + this.dictTypes = response;
  112 + });
  113 + },
  114 + getPlacesData() {
  115 + getPlaces(this.queryParams).then(response => {
  116 + this.dictPlaces = response;
  117 + });
  118 + },
  119 + getData(stauts){
  120 + this.queryParams.status=0;
  121 + this.queryParams.lostCredit=stauts;
  122 + this.init();
  123 + },
  124 + getHistoryData(){
  125 + this.queryParams.status=1;
  126 + this.init();
  127 + },
  128 + colStyle(obj){
  129 + if(obj.column.property == "id"){
  130 + return {background:"#f8f8f9"}
  131 + }
  132 + },
  133 + getObjId(a){
  134 + this.form.objectId = a.id;
  135 + this.form.place = a.areaName;
  136 + this.form.type = a.typeName;
  137 + },
  138 + getList() {
  139 + this.loading = true;
  140 + if(this.queryParams.status==0){
  141 + listCredit(this.queryParams).then(response => {
  142 + this.creditList = response.rows;
  143 + this.total = response.total;
  144 + this.loading = false;
  145 + });
  146 + }
  147 + if(this.queryParams.status==1){
  148 + historyCredit(this.queryParams).then(response => {
  149 + this.creditList = response.rows;
  150 + this.total = response.total;
  151 + this.loading = false;
  152 + });
  153 + }
  154 +
  155 + },
  156 + // 取消按钮
  157 + cancel() {
  158 + this.open = false;
  159 + this.isEdit = false;
  160 + this.reset();
  161 + },
  162 + // 表单重置
  163 + reset() {
  164 + this.form = {
  165 + id: null,
  166 + name: null,
  167 + type: null,
  168 + time: null,
  169 + place: null,
  170 + reason: null,
  171 + lostCredit: null,
  172 + objectId: null,
  173 + };
  174 + this.updateForm = {};
  175 + this.resetForm("form");
  176 + },
  177 + /** 搜索按钮操作 */
  178 + handleQuery() {
  179 + this.queryParams.pageNum = 1;
  180 + this.getList();
  181 + },
  182 + /** 重置按钮操作 */
  183 + resetQuery() {
  184 + this.resetForm("queryForm");
  185 + console.log(this.queryParams);
  186 + this.handleQuery();
  187 + },
  188 + // 多选框选中数据
  189 + handleSelectionChange(selection) {
  190 + this.ids = selection.map(item => item.id)
  191 + this.single = selection.length !== 1
  192 + this.multiple = !selection.length
  193 + },
  194 + /** 新增按钮操作 */
  195 + handleAdd() {
  196 + this.reset();
  197 + this.open = true;
  198 + this.title = "添加消纳场";
  199 + },
  200 + /** 修改按钮操作 */
  201 + handleUpdate(row) {
  202 + this.reset();
  203 + const id = row.id || this.ids
  204 + getCredit(id).then(response => {
  205 + this.form = response.data;
  206 + this.isEdit = true;
  207 + });
  208 + },
  209 + /** 提交按钮 */
  210 + submitForm() {
  211 + if(this.open){
  212 + this.updateForm.reason = "1";
  213 + }
  214 +
  215 + this.$refs["form"].validate(valid => {
  216 + if (valid) {
  217 + this.loading = true;
  218 + if (this.form.id != null) {
  219 + this.form.lostCredit = 0;
  220 + let data = [{creditStatus:this.form.lostCredit,objectId:this.form.objectId}];
  221 + updateEarthsites(data).then(res=>{
  222 + this.updateForm.id = this.form.id;
  223 + updateCredit(this.updateForm).then(response => {
  224 + this.msgSuccess("撤销成功");
  225 + this.isEdit = false;
  226 +
  227 + this.init();
  228 + });
  229 + });
  230 + } else {
  231 + this.form.lostCredit = 1;
  232 + let data = [{creditStatus:this.form.lostCredit,objectId:this.form.objectId}];
  233 + updateEarthsites(data).then(res=>{
  234 + addCredit(this.form).then(response => {
  235 + this.msgSuccess("新增成功");
  236 + this.open = false;
  237 +
  238 + this.init();
  239 + });
  240 + });
  241 +
  242 + }
  243 + }
  244 + });
  245 + },
  246 + handleExport() {
  247 + const queryParams = this.queryParams;
  248 + this.$confirm('是否确认导出所有消纳场数据项?', "警告", {
  249 + confirmButtonText: "确定",
  250 + cancelButtonText: "取消",
  251 + type: "warning"
  252 + }).then(function() {
  253 + return exportCredit(queryParams);
  254 + }).then(response => {
  255 + this.download(response.message);
  256 + })
  257 + }
  258 + }
  259 +};
0 \ No newline at end of file 260 \ No newline at end of file
trash-ui/src/api/leave.js 0 → 100644
  1 +import {
  2 + listLeaveApplication,
  3 + getLeaveApplication,
  4 + delLeaveApplication,
  5 + addLeaveApplication,
  6 + updateLeaveApplication,
  7 + exportLeaveApplication
  8 +} from "@/api/office/leaveApplication";
  9 +import Editor from '@/components/ZcEditor';
  10 +import leaveApplicationInfo from '@/views/office/leaveApplication/leaveApplicationInfo';
  11 +import {getDict} from "@/api/dict";
  12 +
  13 +import h5Page from '@/views/h5/Pagination';
  14 +import h5Info from "@/views/h5/leaveApplication/leaveApplicationInfo";
  15 +
  16 +export default {
  17 + name: "LeaveApplication",
  18 + components: {Editor, leaveApplicationInfo,h5Page,h5Info},
  19 + data() {
  20 + return {
  21 + // 遮罩层
  22 + loading: true,
  23 + // 选中数组
  24 + ids: [],
  25 + // 非单个禁用
  26 + single: true,
  27 + // 非多个禁用
  28 + multiple: true,
  29 + // 显示搜索条件
  30 + showSearch: true,
  31 + // 总条数
  32 + total: 0,
  33 + // 请假申请表格数据
  34 + leaveApplicationList: [],
  35 + // 弹出层标题
  36 + title: "",
  37 + // 是否显示弹出层
  38 + open: false,
  39 + // 查询参数
  40 + queryParams: {
  41 + pageNum: 1,
  42 + pageSize: 10,
  43 + applicant: null,
  44 + deptName: null,
  45 + positionId: null,
  46 + birthdate: null,
  47 + phone: null,
  48 + type: null,
  49 + status: null,
  50 + },
  51 + // 表单参数
  52 + form: {},
  53 + // 表单校验
  54 + rules: {
  55 + type: [
  56 + {required: true, message: '必填', trigger: 'change'},
  57 + ],
  58 + beginDate: [
  59 + {required: true, message: '必填', trigger: 'change'},
  60 + ],
  61 + endDate: [
  62 + {required: true, message: '必填', trigger: 'change'},
  63 + ],
  64 + phone: [
  65 + {required: true, message: '必填', trigger: 'change'},
  66 + {
  67 + pattern: /^1(3|4|5|7|8|9)\d{9}$/,
  68 + message: '手机号格式错误',
  69 + trigger: 'change'
  70 + }
  71 + ],
  72 + numberDays: [
  73 + {required: true, message: '必填', trigger: 'change'},
  74 + {
  75 + pattern: /^(0|[1-9]\d*)(\.5)?$/,
  76 + message: '只能为整数或者0.5',
  77 + trigger: 'change'
  78 + },
  79 + {
  80 + pattern: /^(?!0+(\.0+)?$)\d+(\.\d+)?$/,
  81 + message: '不能为0',
  82 + trigger: 'change'
  83 + }
  84 + ]
  85 + },
  86 + openInfo: false,
  87 + idInfo: null,
  88 + fileEntityList:[],
  89 + depts:[]
  90 + };
  91 + },
  92 + created() {
  93 + let dep = {type:"CSUserDepartmentType"};
  94 + getDict(dep).then(res=>{
  95 + this.depts = res.result;
  96 + });
  97 + this.getList();
  98 + },
  99 + methods: {
  100 + /** 查询请假申请列表 */
  101 + getList() {
  102 + this.loading = true;
  103 + listLeaveApplication(this.queryParams).then(response => {
  104 + this.leaveApplicationList = response.rows;
  105 + this.total = response.total;
  106 + this.loading = false;
  107 + });
  108 + },
  109 + // 取消按钮
  110 + cancel() {
  111 + this.open = false;
  112 + this.openInfo = false;
  113 + this.reset();
  114 + },
  115 + // 表单重置
  116 + reset() {
  117 + this.fileEntityList = [];
  118 + this.form = {
  119 + id: null,
  120 + applicant: null,
  121 + deptName: null,
  122 + positionId: null,
  123 + workDate: null,
  124 + birthdate: null,
  125 + phone: null,
  126 + type: null,
  127 + beginDate: null,
  128 + endDate: null,
  129 + numberDays: null,
  130 + content: null,
  131 + status: 0,
  132 + createTime: null,
  133 + createBy: null,
  134 + updateTime: null,
  135 + updateBy: null
  136 + };
  137 + this.resetForm("form");
  138 + },
  139 + /** 搜索按钮操作 */
  140 + handleQuery() {
  141 + this.queryParams.pageNum = 1;
  142 + this.getList();
  143 + },
  144 + /** 重置按钮操作 */
  145 + resetQuery() {
  146 + this.resetForm("queryForm");
  147 + this.handleQuery();
  148 + },
  149 + // 多选框选中数据
  150 + handleSelectionChange(selection) {
  151 + this.ids = selection.map(item => item.id)
  152 + this.single = selection.length !== 1
  153 + this.multiple = !selection.length
  154 + },
  155 + /** 查看按钮操作 */
  156 + handleInfo(row) {
  157 + this.reset();
  158 + this.idInfo = row.id+"";
  159 + this.title = "请假申请详情";
  160 + this.openInfo = true;
  161 + },
  162 + /** 新增按钮操作 */
  163 + handleAdd() {
  164 + this.reset();
  165 + this.open = true;
  166 + this.title = "添加请假申请";
  167 + },
  168 + /** 修改按钮操作 */
  169 + handleUpdate(row) {
  170 + this.reset();
  171 + const id = row.id || this.ids
  172 + getLeaveApplication(id).then(response => {
  173 + this.form = response.data.leaveApplication;
  174 + let files = JSON.stringify(response.data.uploadFiles);
  175 + this.fileEntityList = JSON.parse(files.replaceAll("filePath", "url").replaceAll("fileName", "name"))
  176 + this.open = true;
  177 + this.title = "修改请假申请";
  178 + });
  179 + },
  180 + /** 提交按钮 */
  181 + submitForm() {
  182 + this.$refs["form"].validate(valid => {
  183 + if (valid) {
  184 + let formData = new FormData();
  185 + let form = this.form;
  186 + //去掉params属性
  187 + delete form.params;
  188 + formData.append('fileList', null);
  189 + //将新增的文件放入formData
  190 + this.fileEntityList.forEach(item => {
  191 + if(item.id==null){
  192 + formData.append('fileList', item.raw)
  193 + }
  194 + })
  195 + if (this.form.id != null) {
  196 + formData.append("leaveApplication", JSON.stringify(form));
  197 + formData.append("uploadFilesList", null);
  198 + this.fileEntityList.forEach(item => {
  199 + delete item.params;
  200 + if(item != "null" && item != null){
  201 + formData.append('uploadFilesList', JSON.stringify(item).replaceAll("url", "filePath").replaceAll("name", "fileName"));
  202 + }
  203 + })
  204 + updateLeaveApplication(formData).then(response => {
  205 + this.msgSuccess("修改成功");
  206 + this.open = false;
  207 + this.getList();
  208 + });
  209 + } else {
  210 + for (let key in form) {
  211 + formData.append(key, form[key] == null ? "" : form[key])
  212 + }
  213 + addLeaveApplication(formData).then(response => {
  214 + this.msgSuccess("新增成功");
  215 + this.open = false;
  216 + this.getList();
  217 + });
  218 + }
  219 + }
  220 + });
  221 + },
  222 + /** 删除按钮操作 */
  223 + handleDelete(row) {
  224 + const ids = row.id || this.ids;
  225 + this.$confirm('是否确认删除请假申请编号为"' + ids + '"的数据项?', "警告", {
  226 + confirmButtonText: "确定",
  227 + cancelButtonText: "取消",
  228 + type: "warning"
  229 + }).then(function () {
  230 + return delLeaveApplication(ids);
  231 + }).then(() => {
  232 + this.getList();
  233 + this.msgSuccess("删除成功");
  234 + })
  235 + },
  236 + /** 导出按钮操作 */
  237 + handleExport() {
  238 + const queryParams = this.queryParams;
  239 + this.$confirm('是否确认导出所有请假申请数据项?', "警告", {
  240 + confirmButtonText: "确定",
  241 + cancelButtonText: "取消",
  242 + type: "warning"
  243 + }).then(function () {
  244 + return exportLeaveApplication(queryParams);
  245 + }).then(response => {
  246 + this.download(response.message);
  247 + })
  248 + },
  249 + /**
  250 + * 文件改变时,限制文件上传格式和大小
  251 + * 文件格式只能为docx/xlsx/xls/ppt/doc/pdf/png/jpeg/png/jpg
  252 + * 大小不超过5M
  253 + * */
  254 + fileChange(file, fileList) {
  255 + let count = 0;
  256 + for (let i = 0; i < fileList.length; i++) {
  257 + // console.log(fileList.length)
  258 + // console.log(this.fileEntityList[i].name+"111"+file.name)
  259 + if (fileList[i].name == file.name) {
  260 + count++;
  261 + if (count == 2) {
  262 + this.$message({
  263 + message: '已存在此文件!',
  264 + type: 'warning'
  265 + });
  266 + for (let j = fileList.length; j > 0; j--) {
  267 + //如果存在此文件,去除新选择的重复文件
  268 + if (fileList[j - 1].name == file.name) {
  269 + fileList.splice(j - 1, 1);
  270 + i--;
  271 + return false;
  272 + }
  273 + }
  274 + }
  275 + }
  276 + }
  277 + let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase();
  278 + //格式符合后判断大小
  279 + if ("docx,xlsx,xls,ppt,doc,pdf,png,jpeg,png,jpg".indexOf(fileType) != -1) {
  280 + let max5M = file.size / 1024 / 1024 < 5;
  281 + if (!max5M) {
  282 + this.$message({
  283 + message: '上传文件大小不得超过5M!',
  284 + type: 'warning'
  285 + });
  286 + fileList = fileList.splice(fileList.length - 1, 1);
  287 + } else {
  288 + //符合条件后进行添加
  289 + this.fileEntityList = fileList
  290 + }
  291 + } else {
  292 + this.$message({
  293 + message: '上传文件只能是 docx、xlsx、xls、ppt、doc、pdf、png、jpeg、png、jpg格式!',
  294 + type: 'warning'
  295 + });
  296 + fileList = fileList.splice(fileList.length - 1, 1);
  297 + }
  298 + },
  299 + // 删除文件
  300 + handleDeleteFile(index) {
  301 + this.fileEntityList.splice(index, 1);
  302 + },
  303 + /** 文件下载 */
  304 + downloadFA(row) {
  305 + let name = row.name;
  306 + let url = row.url;
  307 + const a = document.createElement('a')
  308 + a.setAttribute('download', name)
  309 + a.setAttribute('target', '_blank')
  310 + a.setAttribute('href', process.env.VUE_APP_BASE_API + url);
  311 + a.click()
  312 + },
  313 + }
  314 +};
trash-ui/src/api/three_step.js
@@ -295,8 +295,6 @@ @@ -295,8 +295,6 @@
295 let name = this.form.earthsitesName; 295 let name = this.form.earthsitesName;
296 let objId = this.form.earthsitesId; 296 let objId = this.form.earthsitesId;
297 297
298 -  
299 -  
300 this.form.objectId = item.id; 298 this.form.objectId = item.id;
301 this.form.place = Number(item.areaCode); 299 this.form.place = Number(item.areaCode);
302 this.filterConract(); 300 this.filterConract();
@@ -310,8 +308,6 @@ @@ -310,8 +308,6 @@
310 } 308 }
311 } 309 }
312 310
313 -  
314 -  
315 if(this.form.type == 0){ 311 if(this.form.type == 0){
316 let query = { 312 let query = {
317 'page':1, 313 'page':1,
@@ -343,13 +339,18 @@ @@ -343,13 +339,18 @@
343 339
344 getConstructionTruck(item.id).then(res=>{ 340 getConstructionTruck(item.id).then(res=>{
345 for(let i in res.result){ 341 for(let i in res.result){
  342 + debugger;
346 this.companyList.push({id:res.result[i].companyId , name: res.result[i].companyName}); 343 this.companyList.push({id:res.result[i].companyId , name: res.result[i].companyName});
347 - query.companyID += "," + res.result[i].companyId; 344 + for(let j in res.result[i].vehicleList){
  345 + this.truckList.push({id:res.result[i].vehicleList[j].id,licenseplateNo:res.result[i].vehicleList[j].licenseplateNo,companyName:res.result[i].companyName});
  346 + }
348 } 347 }
349 -  
350 truckList(query).then(res=>{ 348 truckList(query).then(res=>{
351 - this.truckList = res.result.list; 349 + for(let i in res.result.list){
  350 + this.truckList.push(res.result.list[i]);
  351 + }
352 }); 352 });
  353 +
353 }); 354 });
354 }); 355 });
355 } 356 }
trash-ui/src/api/truck_active.js
1 -import { listTruckActivate, getTruckActivate, delTruckActivate, addTruckActivate, updateTruckActivate, exportTruckActivate } from "@/api/business/truckActivate"; 1 +import {
  2 + listTruckActivate,
  3 + getTruckActivate,
  4 + delTruckActivate,
  5 + addTruckActivate,
  6 + updateTruckActivate,
  7 + exportTruckActivate
  8 +} from "@/api/business/truckActivate";
  9 +
2 10
3 - import {  
4 - todayDataList,  
5 - } from "@/api/business/threestep";  
6 11
  12 +import h5Page from '@/views/h5/Pagination';
  13 +
  14 +import {
  15 + todayDataList,
  16 +} from "@/api/business/threestep";
7 17
8 import { 18 import {
9 - truckList,  
10 - companyList, 19 + mainworkcompany,
  20 + getConstructionTruck,
  21 + constructionById,
  22 + truckList
11 } from "@/api/dict"; 23 } from "@/api/dict";
12 24
13 export default { 25 export default {
14 name: "TruckActivate", 26 name: "TruckActivate",
  27 + components: {
  28 + h5Page,
  29 + },
15 data() { 30 data() {
16 return { 31 return {
17 // 遮罩层 32 // 遮罩层
@@ -32,7 +47,7 @@ export default { @@ -32,7 +47,7 @@ export default {
32 title: "", 47 title: "",
33 // 是否显示弹出层 48 // 是否显示弹出层
34 open: false, 49 open: false,
35 - companyList:[], 50 + companyList: [],
36 // 查询参数 51 // 查询参数
37 queryParams: { 52 queryParams: {
38 pageNum: 1, 53 pageNum: 1,
@@ -40,13 +55,14 @@ export default { @@ -40,13 +55,14 @@ export default {
40 company: null, 55 company: null,
41 licensePlate: null, 56 licensePlate: null,
42 time: null, 57 time: null,
  58 + activateStatus:null,
43 construction: null, 59 construction: null,
44 status: null, 60 status: null,
45 earthsite: null, 61 earthsite: null,
46 objectId: null, 62 objectId: null,
47 createType: null, 63 createType: null,
48 activateTime: null, 64 activateTime: null,
49 - activateDate:null, 65 + activateDate: null,
50 }, 66 },
51 // 表单参数 67 // 表单参数
52 form: {}, 68 form: {},
@@ -71,14 +87,14 @@ export default { @@ -71,14 +87,14 @@ export default {
71 trigger: 'change' 87 trigger: 'change'
72 }, ], 88 }, ],
73 }, 89 },
74 - constList:[],  
75 - truckList:[],  
76 -  
77 - construction : null,  
78 - truck : null,  
79 - company:null,  
80 - openActivateTime:false,  
81 - isLoading:false, 90 + constList: [],
  91 + truckList: [],
  92 +
  93 + construction: null,
  94 + truck: null,
  95 + company: null,
  96 + openActivateTime: false,
  97 + isLoading: false,
82 }; 98 };
83 }, 99 },
84 created() { 100 created() {
@@ -87,12 +103,12 @@ export default { @@ -87,12 +103,12 @@ export default {
87 methods: { 103 methods: {
88 /** 查询车辆激活列表 */ 104 /** 查询车辆激活列表 */
89 getList(index) { 105 getList(index) {
90 - if(index == 0){ 106 + if (index == 0) {
91 this.queryParams.status = "0"; 107 this.queryParams.status = "0";
92 this.openActivateTime = false; 108 this.openActivateTime = false;
93 this.queryParams.activateDate = null; 109 this.queryParams.activateDate = null;
94 } 110 }
95 - if(index == 1){ 111 + if (index == 1) {
96 this.openActivateTime = true; 112 this.openActivateTime = true;
97 this.queryParams.status = "1"; 113 this.queryParams.status = "1";
98 } 114 }
@@ -104,69 +120,73 @@ export default { @@ -104,69 +120,73 @@ export default {
104 }); 120 });
105 121
106 let data = { 122 let data = {
107 - type : 0,  
108 - status:1, 123 + type: 0,
  124 + status: 1,
109 } 125 }
110 126
111 - todayDataList(data).then(res=>{  
112 - this.constList = res; 127 + todayDataList(data).then(res => {
  128 + this.constList = res;
113 }); 129 });
114 130
115 }, 131 },
116 - getCompany(value){  
117 - let obj; 132 + getCompany(value) {
  133 + let item;
118 134
119 - for(let i in this.constList){  
120 - if(this.constList[i].name == value){ 135 + for (let i in this.constList) {
  136 + if (this.constList[i].name == value) {
121 this.construction = this.constList[i]; 137 this.construction = this.constList[i];
122 - obj = this.construction; 138 + item = this.construction;
123 } 139 }
124 } 140 }
125 141
126 -  
127 this.companyList = []; 142 this.companyList = [];
128 this.truckList = []; 143 this.truckList = [];
129 144
130 - constructionById(obj.objectId).then(res=>{  
131 -  
132 -  
133 - this.companyList.push({id:res.result.transportCompanyId , name: res.result.transportCompany}); 145 + constructionById(item.objectId).then(res => {
  146 + this.companyList.push({
  147 + id: res.result.transportCompanyId,
  148 + name: res.result.transportCompany
  149 + });
134 150
135 - mainworkcompany(obj.objectId).then(response => { 151 + mainworkcompany(item.id).then(response => {
136 152
137 let query = { 153 let query = {
138 - 'page':1,  
139 - 'size':9999,  
140 - 'dishonestState':0 154 + 'page': 1,
  155 + 'size': 9999,
  156 + 'dishonestState': 0,
  157 + 'valid': 0
141 } 158 }
142 159
143 - let ids = [];  
144 -  
145 - ids.push(res.result.transportCompanyId);  
146 -  
147 - query.companyID = ids + ""; 160 + query.companyID = item.transportCompanyId + "";
148 query.valid = 0; 161 query.valid = 0;
149 162
150 - getConstructionTruck(obj.objectId).then(res=>{  
151 - for(let i in res.result){  
152 -  
153 - this.companyList.push({id:res.result[i].companyId , name: res.result[i].companyName});  
154 - query.companyID += "," + res.result[i].companyId; 163 + getConstructionTruck(item.objectId).then(res => {
  164 + for (let i in res.result) {
  165 + this.companyList.push({
  166 + id: res.result[i].companyId,
  167 + name: res.result[i].companyName
  168 + });
  169 + for (let j in res.result[i].vehicleList) {
  170 + this.truckList.push({
  171 + id: res.result[i].vehicleList[j].id,
  172 + licenseplateNo: res.result[i].vehicleList[j].licenseplateNo,
  173 + companyName: res.result[i].companyName
  174 + });
  175 + }
155 } 176 }
156 -  
157 - truckList(query).then(res=>{  
158 - this.truckList = res.result.list; 177 + truckList(query).then(res => {
  178 + for (let i in res.result.list) {
  179 + this.truckList.push(res.result.list[i]);
  180 + }
159 }); 181 });
160 }); 182 });
161 }); 183 });
162 -  
163 -  
164 - }) 184 + });
165 185
166 186
167 }, 187 },
168 - getTruck(truck){  
169 - this.truck = truck; 188 + clearTruck() {
  189 + this.form.licensePlate = [];
170 }, 190 },
171 // 取消按钮 191 // 取消按钮
172 cancel() { 192 cancel() {
@@ -204,7 +224,7 @@ export default { @@ -204,7 +224,7 @@ export default {
204 // 多选框选中数据 224 // 多选框选中数据
205 handleSelectionChange(selection) { 225 handleSelectionChange(selection) {
206 this.ids = selection.map(item => item.id) 226 this.ids = selection.map(item => item.id)
207 - this.single = selection.length!==1 227 + this.single = selection.length !== 1
208 this.multiple = !selection.length 228 this.multiple = !selection.length
209 }, 229 },
210 /** 新增按钮操作 */ 230 /** 新增按钮操作 */
@@ -229,34 +249,26 @@ export default { @@ -229,34 +249,26 @@ export default {
229 this.$refs["form"].validate(valid => { 249 this.$refs["form"].validate(valid => {
230 if (valid) { 250 if (valid) {
231 251
232 - for(var i in this.form.licensePlate){  
233 - for(let j in this.truckList){  
234 - if(this.form.licensePlate[i] == this.truckList[j].id){ 252 + for (var i in this.form.licensePlate) {
  253 + for (let j in this.truckList) {
  254 + if (this.form.licensePlate[i] == this.truckList[j].id) {
235 255
236 let data = { 256 let data = {
237 - objectId:this.form.licensePlate[i],  
238 - licensePlate:this.truckList[j].licenseplateNo,  
239 - construction:this.construction.name,  
240 - earthsite : this.construction.earthsitesName,  
241 - status : 0,  
242 - company:this.form.company, 257 + objectId: this.form.licensePlate[i],
  258 + licensePlate: this.truckList[j].licenseplateNo,
  259 + construction: this.construction.name,
  260 + earthsite: this.construction.earthsitesName,
  261 + status: 0,
  262 + company: this.form.company,
243 } 263 }
244 -  
245 -  
246 addTruckActivate(data).then(response => { 264 addTruckActivate(data).then(response => {
247 this.msgSuccess("新增成功"); 265 this.msgSuccess("新增成功");
248 this.open = false; 266 this.open = false;
249 this.getList(); 267 this.getList();
250 }); 268 });
251 -  
252 -  
253 } 269 }
254 } 270 }
255 } 271 }
256 -  
257 -  
258 -  
259 -  
260 } 272 }
261 }); 273 });
262 }, 274 },
@@ -264,28 +276,28 @@ export default { @@ -264,28 +276,28 @@ export default {
264 handleDelete(row) { 276 handleDelete(row) {
265 const ids = row.id || this.ids; 277 const ids = row.id || this.ids;
266 this.$confirm('是否确认删除车辆激活编号为"' + ids + '"的数据项?', "警告", { 278 this.$confirm('是否确认删除车辆激活编号为"' + ids + '"的数据项?', "警告", {
267 - confirmButtonText: "确定",  
268 - cancelButtonText: "取消",  
269 - type: "warning"  
270 - }).then(function() {  
271 - return delTruckActivate(ids);  
272 - }).then(() => {  
273 - this.getList();  
274 - this.msgSuccess("删除成功");  
275 - }) 279 + confirmButtonText: "确定",
  280 + cancelButtonText: "取消",
  281 + type: "warning"
  282 + }).then(function() {
  283 + return delTruckActivate(ids);
  284 + }).then(() => {
  285 + this.getList();
  286 + this.msgSuccess("删除成功");
  287 + })
276 }, 288 },
277 /** 导出按钮操作 */ 289 /** 导出按钮操作 */
278 handleExport() { 290 handleExport() {
279 const queryParams = this.queryParams; 291 const queryParams = this.queryParams;
280 this.$confirm('是否确认导出所有车辆激活数据项?', "警告", { 292 this.$confirm('是否确认导出所有车辆激活数据项?', "警告", {
281 - confirmButtonText: "确定",  
282 - cancelButtonText: "取消",  
283 - type: "warning"  
284 - }).then(function() {  
285 - return exportTruckActivate(queryParams);  
286 - }).then(response => {  
287 - this.download(response.message);  
288 - }) 293 + confirmButtonText: "确定",
  294 + cancelButtonText: "取消",
  295 + type: "warning"
  296 + }).then(function() {
  297 + return exportTruckActivate(queryParams);
  298 + }).then(response => {
  299 + this.download(response.message);
  300 + })
289 } 301 }
290 } 302 }
291 -};  
292 \ No newline at end of file 303 \ No newline at end of file
  304 +};
trash-ui/src/api/truck_credit.js 0 → 100644
  1 + import {
  2 + listCredit,
  3 + getCredit,
  4 + delCredit,
  5 + addCredit,
  6 + updateCredit,
  7 + exportCredit,
  8 + getNames,
  9 + getCompanys,
  10 + historyCredit
  11 + } from "@/api/business/truck";
  12 +
  13 +
  14 + import {
  15 + companyList,
  16 + truckList,
  17 + updateTruck
  18 + } from "@/api/dict";
  19 +
  20 + export default {
  21 + name: "Credit",
  22 + data() {
  23 + return {
  24 + // 遮罩层
  25 + loading: true,
  26 + // 选中数组
  27 + ids: [],
  28 + // 非单个禁用
  29 + single: true,
  30 + // 非多个禁用
  31 + multiple: true,
  32 + // 显示搜索条件
  33 + showSearch: true,
  34 + infoDialog: false,
  35 + // 总条数
  36 + total: 0,
  37 + // 工地表格数据
  38 + creditList: [],
  39 + creditListInfo: [],
  40 + dictNames: [],
  41 + dictCompanys: [],
  42 + companyList:[],
  43 + truckList: [],
  44 + // 弹出层标题
  45 + title: "",
  46 + // 是否显示弹出层
  47 + open: false,
  48 + isEdit: false,
  49 + // 查询参数
  50 + queryParams: {
  51 + pageNum: 1,
  52 + pageSize: 10,
  53 + companyId: null,
  54 + licensePlate: null,
  55 + time: null,
  56 + reason: null,
  57 + status: 0,
  58 + lostCredit: 1
  59 + },
  60 + // 表单参数
  61 + form: {},
  62 + updateForm: {},
  63 + // 表单校验
  64 + rules: {
  65 + companyId: [{
  66 + required: true,
  67 + message: '请选择运输公司',
  68 + trigger: 'change'
  69 + }, ],
  70 + reason: [{
  71 + required: true,
  72 + message: '请填写原因',
  73 + trigger: 'change'
  74 + }, ],
  75 + licensePlate: [{
  76 + required: true,
  77 + message: '请选择车辆',
  78 + trigger: 'change'
  79 + }],
  80 + },
  81 + rules2: {
  82 + reason: [{
  83 + required: true,
  84 + message: '请填写原因',
  85 + trigger: 'change'
  86 + }, ],
  87 + }
  88 + };
  89 + },
  90 + created() {
  91 + this.init();
  92 + },
  93 + methods: {
  94 +
  95 + init() {
  96 + this.resetQuery();
  97 + this.getList();
  98 + getNames(this.queryParams).then(response => {
  99 + this.dictNames = response;
  100 + });
  101 +
  102 + getCompanys(this.queryParams).then(response => {
  103 + this.dictCompanys = response;
  104 + });
  105 +
  106 + let query = {
  107 + 'page':1,
  108 + 'size':9999,
  109 + 'dishonestState':0
  110 + }
  111 + companyList(query).then(response => {
  112 +
  113 + let companys = response.result.list;
  114 + this.companyList = companys;
  115 + let ids = [];
  116 +
  117 + for(let i = 0 ;i<companys.length;i++){
  118 + ids.push(companys[i].id);
  119 + }
  120 + query.companyID = ids + "";
  121 + query.valid = 0;
  122 +
  123 + truckList(query).then(res=>{
  124 + this.truckList = res.result.list;
  125 + });
  126 +
  127 + });
  128 +
  129 +
  130 + },
  131 + getDataInfo(row) {
  132 + console.log(row);
  133 +
  134 + let param = {
  135 + "objectId": row.objectId
  136 + }
  137 +
  138 + listCredit(param).then(response => {
  139 + this.creditListInfo = response.rows;
  140 + this.infoDialog = true;
  141 + });
  142 +
  143 + },
  144 + getData(stauts) {
  145 + this.queryParams.status = 0;
  146 + this.queryParams.lostCredit = stauts;
  147 + this.init();
  148 + },
  149 + getHistoryData() {
  150 + this.queryParams.status = 1;
  151 + this.init();
  152 + },
  153 + colStyle(obj) {
  154 + if (obj.column.property == "id") {
  155 + return {
  156 + background: "#f8f8f9"
  157 + }
  158 + }
  159 + },
  160 + getObjId(a) {
  161 + this.form.companyId = a.companyName;
  162 + this.form.objectId = a.id;
  163 + },
  164 + getList() {
  165 + this.loading = true;
  166 + if (this.queryParams.status == 0) {
  167 + listCredit(this.queryParams).then(response => {
  168 + this.creditList = response.rows;
  169 + this.total = response.total;
  170 + this.loading = false;
  171 + });
  172 + }
  173 + if (this.queryParams.status == 1) {
  174 + historyCredit(this.queryParams).then(response => {
  175 + this.creditList = response.rows;
  176 + this.total = response.total;
  177 + this.loading = false;
  178 + });
  179 + }
  180 +
  181 + },
  182 + // 取消按钮
  183 + cancel() {
  184 + this.open = false;
  185 + this.isEdit = false;
  186 + this.reset();
  187 + },
  188 + // 表单重置
  189 + reset() {
  190 + this.form = {
  191 + id: null,
  192 + companyId: null,
  193 + licensePlate: null,
  194 + time: null,
  195 + reason: null,
  196 + status: null,
  197 + lostCredit: null
  198 + };
  199 + this.resetForm("form");
  200 + },
  201 + /** 搜索按钮操作 */
  202 + handleQuery() {
  203 + this.queryParams.pageNum = 1;
  204 + this.getList();
  205 + },
  206 + /** 重置按钮操作 */
  207 + resetQuery() {
  208 + this.resetForm("queryForm");
  209 + console.log(this.queryParams);
  210 + this.handleQuery();
  211 + },
  212 + // 多选框选中数据
  213 + handleSelectionChange(selection) {
  214 + this.ids = selection.map(item => item.id)
  215 + this.single = selection.length !== 1
  216 + this.multiple = !selection.length
  217 + },
  218 + /** 新增按钮操作 */
  219 + handleAdd() {
  220 + this.reset();
  221 + this.open = true;
  222 + this.title = "车辆失信录入";
  223 + },
  224 + /** 修改按钮操作 */
  225 + handleUpdate(row) {
  226 + this.reset();
  227 + const id = row.id || this.ids
  228 + getCredit(id).then(response => {
  229 + this.form = response.data;
  230 + this.isEdit = true;
  231 + });
  232 + },
  233 + /** 提交按钮 */
  234 + submitForm() {
  235 + if(this.isEdit){
  236 + this.$refs["updateForm"].validate(valid => {
  237 + if (valid) {
  238 + this.loading = true;
  239 + this.form.lostCredit = 0;
  240 + this.updateForm.id = this.form.id;
  241 + let data = [{creditStatus:this.form.lostCredit,id:this.form.objectId}];
  242 + updateTruck(data).then(res=>{
  243 + updateCredit(this.updateForm).then(response => {
  244 + this.msgSuccess("撤销成功");
  245 + this.isEdit = false;
  246 + this.updateForm = {};
  247 + this.init();
  248 + });
  249 + });
  250 + }
  251 + });
  252 + }else{
  253 + this.$refs["form"].validate(valid => {
  254 + if (valid) {
  255 + this.loading = true;
  256 + this.form.lostCredit = 1;
  257 + this.form.createType = 0;
  258 + let data = [{creditStatus:this.form.lostCredit,id:this.form.objectId}];
  259 + updateTruck(data).then(res=>{
  260 + addCredit(this.form).then(response => {
  261 + this.msgSuccess("新增成功");
  262 + this.open = false;
  263 + this.init();
  264 + });
  265 + });
  266 + }
  267 + });
  268 + }
  269 + },
  270 + handleExport() {
  271 + const queryParams = this.queryParams;
  272 + this.$confirm('是否确认导出所有车辆数据项?', "警告", {
  273 + confirmButtonText: "确定",
  274 + cancelButtonText: "取消",
  275 + type: "warning"
  276 + }).then(function() {
  277 + return exportCredit(queryParams);
  278 + }).then(response => {
  279 + this.download(response.message);
  280 + })
  281 + }
  282 + }
  283 + };
0 \ No newline at end of file 284 \ No newline at end of file
trash-ui/src/api/vio_casefile.js 0 → 100644
  1 +
  2 +import { listViolationCaseFile, getViolationCaseFile,
  3 + delViolationCaseFile, addViolationCaseFile,
  4 + updateViolationCaseFile, exportViolationCaseFile } from "@/api/casefile/violationCaseFile";
  5 +import violationCaseFileInfo from "@/views/casefile/violationCaseFile/violationCaseFileInfo";
  6 +
  7 +import h5Info from "@/views/h5/task/violationCaseFileInfo";
  8 +import h5Page from "@/views/h5/Pagination";
  9 +
  10 + import {
  11 + earthsitesList,
  12 + constructionsitesList,
  13 + getDict,
  14 + getArea,
  15 + companyList,
  16 + truckList,
  17 + } from "@/api/dict";
  18 +
  19 +
  20 +export default {
  21 + name: "ViolationCaseFile",
  22 + components: { violationCaseFileInfo,
  23 + h5Page,
  24 + h5Info},
  25 + data() {
  26 + return {
  27 + // 遮罩层
  28 + loading: true,
  29 + // 选中数组
  30 + ids: [],
  31 + // 非单个禁用
  32 + single: true,
  33 + // 非多个禁用
  34 + multiple: true,
  35 + // 显示搜索条件
  36 + showSearch: true,
  37 + // 总条数
  38 + total: 0,
  39 + // 平台违规案卷表格数据
  40 + violationCaseFileList: [],
  41 + // 弹出层标题
  42 + title: "",
  43 + // 是否显示弹出层
  44 + open: false,
  45 + // 查询参数
  46 + queryParams: {
  47 + pageNum: 1,
  48 + pageSize: 10,
  49 + number: null,
  50 + violationObjectType: null,
  51 + owningRegion: null,
  52 + violationType: null,
  53 + violationGrade: null,
  54 + projectName: null,
  55 + companyName: null,
  56 + describe: null,
  57 + sendObject: null,
  58 + status: null,
  59 + receive: null,
  60 + receiveStatus: null,
  61 + readBy: null,
  62 + readTime: null
  63 + },
  64 + // 表单参数
  65 + form: {
  66 +
  67 + },
  68 + place:null,
  69 + // 表单校验
  70 + rules: {
  71 + number :[
  72 + { required: true, message: "必填", trigger: "blur" }
  73 + ],
  74 + violationObjectType :[
  75 + { required: true, message: "必填", trigger: "blur" }
  76 + ],
  77 + owningRegion :[
  78 + { required: true, message: "必填", trigger: "blur" }
  79 + ],
  80 + violationType :[
  81 + { required: true, message: "必填", trigger: "blur" }
  82 + ],
  83 + },
  84 + caseType:[{code:0,name:"进入非专用车辆"},
  85 + {code:1,name:"无许可手续(工)"},
  86 + {code:2,name:"无许可手续(消)"},
  87 + {code:3,name:"黄土覆盖情况"},
  88 + {code:4,name:"出入口路面污染"},
  89 + {code:5,name:"出入口道路硬化"},
  90 + {code:6,name:"车辆冲洗是否到位"},
  91 + {code:7,name:"雾炮机是否正常开启"},
  92 + {code:8,name:"使用费专用车运输"},
  93 + {code:9,name:"监控点位未对准"},
  94 + {code:10,name:"未报开工作业"},
  95 + {code:11,name:"视频设备离线超时报警"},
  96 + {code:12,name:"三无车辆进入工地"},
  97 + {code:13,name:"未按时间作业"},
  98 + {code:14,name:"未报开工作业"},
  99 + {code:15,name:"视频设备离线超时报警"},
  100 + {code:16,name:"三无车辆进入消纳场"},
  101 + {code:17,name:"未到指定的消纳场作业"},
  102 + {code:18,name:"离线运输报警(工)"},
  103 + {code:19,name:"离线运输报警(消)"},
  104 + {code:20,name:"未激活车辆作业"},
  105 + {code:21,name:"未核准作业车辆作业"},
  106 + {code:22,name:"未按线路行驶"},
  107 + {code:23,name:"闯禁行驶"},
  108 + {code:24,name:"失信车辆作业"},
  109 + {code:25,name:"其他1"},
  110 + {code:26,name:"其他2"},
  111 + {code:27,name:"其他3"},
  112 + {code:28,name:"其他4"},
  113 + {code:29,name:"其他5"}],
  114 +
  115 + projectNameList:[
  116 + ],
  117 + isLoading: false,
  118 + fileEntityList:[],
  119 + companyList:[
  120 + ],
  121 + remoteQueryData: {
  122 + "page": 1,
  123 + "size": 9999
  124 + },
  125 + areas:[],
  126 + data:{},
  127 + isLoadingCompany: false,
  128 + idInfo:null,
  129 + openInfo:false,
  130 + };
  131 + },
  132 + created() {
  133 + getArea().then(res=>{
  134 +
  135 + this.areas = res.result;
  136 + });
  137 +
  138 +
  139 + constructionsitesList(this.remoteQueryData).then(res => {
  140 + this.projectNameList = res.result.list;
  141 + earthsitesList(this.remoteQueryData).then(res => {
  142 + for(var i in res.result.list){
  143 + this.projectNameList.push(res.result.list[i]);
  144 + }
  145 + });
  146 + });
  147 +
  148 +
  149 + companyList(this.remoteQueryData).then(res => {
  150 + this.companyList = res.result.list;
  151 + });
  152 +
  153 +
  154 +
  155 + this.getList();
  156 + },
  157 + methods: {
  158 + selectArea(item){
  159 +
  160 + this.form.owningRegion = item.name;
  161 + this.form.projectName = null;
  162 +
  163 + },
  164 + /** 查询平台违规案卷列表 */
  165 + getList() {
  166 + this.loading = true;
  167 + listViolationCaseFile(this.queryParams).then(response => {
  168 + this.violationCaseFileList = response.rows;
  169 + this.total = response.total;
  170 + this.loading = false;
  171 + });
  172 + },
  173 + // 取消按钮
  174 + cancel() {
  175 + this.open = false;
  176 + this.openInfo = false;
  177 + this.reset();
  178 + },
  179 + // 表单重置
  180 + reset() {
  181 + this.fileEntityList = [];
  182 + this.form = {
  183 + id: null,
  184 + number: null,
  185 + violationObjectType: null,
  186 + owningRegion: null,
  187 + violationType: null,
  188 + violationGrade: null,
  189 + projectName: null,
  190 + companyName: null,
  191 + describe: null,
  192 + sendObject: null,
  193 + createTime: null,
  194 + createBy: null,
  195 + updateTime: null,
  196 + updateBy: null,
  197 + status: 0,
  198 + receive: null,
  199 + receiveStatus: 0,
  200 + readBy: null,
  201 + readTime: null
  202 + };
  203 + this.resetForm("form");
  204 + },
  205 + /** 搜索按钮操作 */
  206 + handleQuery() {
  207 + this.queryParams.pageNum = 1;
  208 + this.getList();
  209 + },
  210 + /** 重置按钮操作 */
  211 + resetQuery() {
  212 + this.resetForm("queryForm");
  213 + this.handleQuery();
  214 + },
  215 + // 多选框选中数据
  216 + handleSelectionChange(selection) {
  217 + this.ids = selection.map(item => item.id)
  218 + this.single = selection.length!==1
  219 + this.multiple = !selection.length
  220 + },
  221 + handleInfo(row){
  222 + this.idInfo = row.id + "";
  223 + this.openInfo = true;
  224 + this.title = "平台违规案卷详情";
  225 + },
  226 + /** 新增按钮操作 */
  227 + handleAdd() {
  228 + this.reset();
  229 + this.open = true;
  230 + this.form.number = this.getNumber();
  231 + this.form.violationGrade = "一般类";
  232 + this.form.sendObject = "区管理部门(治)";
  233 + this.title = "添加平台违规案卷";
  234 + },
  235 + /** 修改按钮操作 */
  236 + handleUpdate(row) {
  237 + this.reset();
  238 + const id = row.id || this.ids
  239 + getViolationCaseFile(id).then(response => {
  240 + this.form = response.data.violationCaseFile;
  241 + let files = JSON.stringify(response.data.uploadFiles);
  242 + this.fileEntityList = JSON.parse(files.replaceAll("filePath", "url").replaceAll("fileName", "name"))
  243 + this.open = true;
  244 + this.title = "修改平台违规案卷";
  245 + });
  246 + },
  247 + /** 提交按钮 */
  248 + submitForm() {
  249 + this.$refs["form"].validate(valid => {
  250 + if (valid) {
  251 +
  252 + if(this.form.sendObject == "运输企业" && this.form.companyName == null){
  253 +
  254 + this.$message("请选择相关企业");
  255 +
  256 + return;
  257 + }
  258 +
  259 +
  260 + let formData = new FormData();
  261 + let form = this.form;
  262 + //去掉params属性
  263 + delete form.params;
  264 + formData.append('fileList', null);
  265 + //将新增的文件放入formData
  266 + this.fileEntityList.forEach(item => {
  267 + if(item.id==null){
  268 + formData.append('fileList', item.raw)
  269 + }
  270 + })
  271 + if (this.form.id != null) {
  272 + formData.append("violationCaseFile", JSON.stringify(form));
  273 + formData.append("uploadFilesList", null);
  274 + this.fileEntityList.forEach(item => {
  275 + delete item.params;
  276 + if(item != "null" && item != null){
  277 + formData.append('uploadFilesList', JSON.stringify(item).replaceAll("url", "filePath").replaceAll("name", "fileName"));
  278 + }
  279 + })
  280 + updateViolationCaseFile(formData).then(response => {
  281 + this.msgSuccess("修改成功");
  282 + this.open = false;
  283 + this.getList();
  284 + });
  285 + } else {
  286 + for (let key in form) {
  287 + formData.append(key, form[key] == null ? "" : form[key])
  288 + }
  289 + addViolationCaseFile(formData).then(response => {
  290 + this.msgSuccess("新增成功");
  291 + this.open = false;
  292 + this.getList();
  293 + });
  294 + }
  295 + }
  296 + });
  297 + },
  298 + /** 删除按钮操作 */
  299 + handleDelete(row) {
  300 + const ids = row.id || this.ids;
  301 + this.$confirm('是否确认删除平台违规案卷编号为"' + ids + '"的数据项?', "警告", {
  302 + confirmButtonText: "确定",
  303 + cancelButtonText: "取消",
  304 + type: "warning"
  305 + }).then(function() {
  306 + return delViolationCaseFile(ids);
  307 + }).then(() => {
  308 + this.getList();
  309 + this.msgSuccess("删除成功");
  310 + })
  311 + },
  312 + /** 导出按钮操作 */
  313 + handleExport() {
  314 + const queryParams = this.queryParams;
  315 + this.$confirm('是否确认导出所有平台违规案卷数据项?', "警告", {
  316 + confirmButtonText: "确定",
  317 + cancelButtonText: "取消",
  318 + type: "warning"
  319 + }).then(function() {
  320 + return exportViolationCaseFile(queryParams);
  321 + }).then(response => {
  322 + this.download(response.message);
  323 + })
  324 + },
  325 + /** 生成案卷编号 */
  326 + getNumber(){
  327 + const now = new Date();
  328 + const year = now.getFullYear().toString().slice(-2); // 提取后两位数
  329 + const month = now.getMonth() + 1 < 10 ? `0${now.getMonth() + 1}` : now.getMonth() + 1;
  330 + const day = now.getDate() < 10 ? `0${now.getDate()}` : now.getDate();
  331 + const hour = now.getHours() < 10 ? `0${now.getHours()}` : now.getHours();
  332 + const minute = now.getMinutes() < 10 ? `0${now.getMinutes()}` : now.getMinutes();
  333 + const second = now.getSeconds() < 10 ? `0${now.getSeconds()}` : now.getSeconds();
  334 + const millisecond = now.getMilliseconds();
  335 + const code = `${year}${month}${day}${hour}${minute}${second}${millisecond}`;
  336 + return code;
  337 + },
  338 + projectNameLoadOptions(query) {
  339 + // 根据输入的关键字query异步加载选项数据
  340 + this.isLoading = true
  341 + setTimeout(() => {
  342 + // 模拟异步加载数据
  343 + const data = [
  344 + { name:'项目1' },
  345 + { name:'项目2' },
  346 + { name:'项目3' }
  347 + ].filter(item => item.name.includes(query))
  348 + this.projectNameList = data
  349 + this.isLoading = false
  350 + }, 200)
  351 + },
  352 + companyLoadOptions(query) {
  353 + // 根据输入的关键字query异步加载选项数据
  354 + this.isLoadingCompany = true
  355 + setTimeout(() => {
  356 + // 模拟异步加载数据
  357 + const data = [
  358 + { name:'公司1' },
  359 + { name:'公司2' },
  360 + { name:'公司3' }
  361 + ].filter(item => item.name.includes(query))
  362 + this.companyList = data
  363 + this.isLoadingCompany = false
  364 + }, 200)
  365 + },
  366 + /**
  367 + * 文件改变时,限制文件上传格式和大小
  368 + * 文件格式只能为docx/doc/pdf/png/jpeg/png/jpg
  369 + * 大小不超过20M
  370 + * */
  371 + fileChange(file, fileList) {
  372 + let count = 0;
  373 + for (let i = 0; i < fileList.length; i++) {
  374 + // console.log(fileList.length)
  375 + // console.log(this.fileEntityList[i].name+"111"+file.name)
  376 + if (fileList[i].name == file.name) {
  377 + count++;
  378 + if (count == 2) {
  379 + this.$message({
  380 + message: '已存在此文件!',
  381 + type: 'warning'
  382 + });
  383 + for (let j = fileList.length; j > 0; j--) {
  384 + //如果存在此文件,去除新选择的重复文件
  385 + if (fileList[j - 1].name == file.name) {
  386 + fileList.splice(j - 1, 1);
  387 + i--;
  388 + return false;
  389 + }
  390 + }
  391 + }
  392 + }
  393 + }
  394 + let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase();
  395 + //格式符合后判断大小
  396 + if ("docx,doc,pdf,png,jpeg,png,jpg".indexOf(fileType) != -1) {
  397 + let max5M = file.size / 1024 / 1024 < 20;
  398 + if (!max5M) {
  399 + this.$message({
  400 + message: '上传文件大小不得超过20M!',
  401 + type: 'warning'
  402 + });
  403 + fileList = fileList.splice(fileList.length - 1, 1);
  404 + } else {
  405 + //符合条件后进行添加
  406 + this.fileEntityList = fileList
  407 + }
  408 + } else {
  409 + this.$message({
  410 + message: '上传文件只能是 docx、doc、pdf、png、jpeg、png、jpg格式!',
  411 + type: 'warning'
  412 + });
  413 + fileList = fileList.splice(fileList.length - 1, 1);
  414 + }
  415 + },
  416 + // 删除文件
  417 + handleDeleteFile(index) {
  418 + this.fileEntityList.splice(index, 1);
  419 + },
  420 + /** 文件下载 */
  421 + downloadFA(row) {
  422 + let name = row.name;
  423 + let url = row.url;
  424 + const a = document.createElement('a')
  425 + a.setAttribute('download', name)
  426 + a.setAttribute('target', '_blank')
  427 + a.setAttribute('href', process.env.VUE_APP_BASE_API + url);
  428 + a.click()
  429 + },
  430 + /** 生成违规描述 */
  431 + createDescribe(){
  432 + this.rules.companyName = [{ required: true, message: "必填", trigger: "blur" }]
  433 + this.rules.projectName = [{ required: true, message: "必填", trigger: "blur" }]
  434 + this.$refs["form"].validate(valid => {
  435 + if (valid) {
  436 + let formData = this.form;
  437 + const now = new Date();
  438 + const year = now.getFullYear();
  439 + const month = now.getMonth() + 1 < 10 ? `0${now.getMonth() + 1}` : now.getMonth() + 1;
  440 + const day = now.getDate() < 10 ? `0${now.getDate()}` : now.getDate();
  441 + const hour = now.getHours() < 10 ? `0${now.getHours()}` : now.getHours();
  442 + const minute = now.getMinutes() < 10 ? `0${now.getMinutes()}` : now.getMinutes();
  443 + const second = now.getSeconds() < 10 ? `0${now.getSeconds()}` : now.getSeconds();
  444 + const code = `${year}/${month}/${day} ${hour}:${minute}:${second}`;
  445 + this.form.describe =code + formData.companyName + "在" + formData.projectName + "出现" + formData.violationType;
  446 + this.rules.companyName = null;
  447 + this.rules.projectName = null;
  448 + }
  449 + });
  450 +
  451 + }
  452 + }
  453 +};
trash-ui/src/api/warningInfo.js 0 → 100644
  1 +import {
  2 + listViolationWarningInformation,
  3 + getViolationWarningInformation,
  4 + delViolationWarningInformation,
  5 + addViolationWarningInformation,
  6 + updateViolationWarningInformation,
  7 + exportViolationWarningInformation
  8 +} from "@/api/casefile/violationWarningInformation";
  9 +
  10 +import violationWarningInformationInfo from "@/views/casefile/violationWarningInformation/violationWarningInformationInfo";
  11 +
  12 +
  13 +import h5Page from '@/views/h5/Pagination';
  14 +import h5Info from "@/views/h5/task/violationWarningInformationInfo";
  15 +
  16 +
  17 +import {
  18 + earthsitesList,
  19 + constructionsitesList,
  20 + getDict,
  21 + getArea,
  22 + companyList,
  23 + truckList,
  24 +} from "@/api/dict";
  25 +import {
  26 + getEarthSitesList,
  27 + getConstructionList,
  28 + getCompanyList,
  29 + getAreaList
  30 +} from "@/api/casefile/remoteServer";
  31 +
  32 +export default {
  33 + name: "ViolationWarningInformation",
  34 + components: {
  35 + violationWarningInformationInfo,
  36 + h5Page,
  37 + h5Info
  38 + },
  39 + data() {
  40 + return {
  41 + // 遮罩层
  42 + loading: true,
  43 + // 选中数组
  44 + ids: [],
  45 + // 非单个禁用
  46 + single: true,
  47 + // 非多个禁用
  48 + multiple: true,
  49 + // 显示搜索条件
  50 + showSearch: true,
  51 + // 总条数
  52 + total: 0,
  53 + // 违规预警信息表格数据
  54 + violationWarningInformationList: [],
  55 + // 弹出层标题
  56 + title: "",
  57 + // 是否显示弹出层
  58 + open: false,
  59 + // 查询参数
  60 + queryParams: {
  61 + pageNum: 1,
  62 + pageSize: 10,
  63 + number: null,
  64 + violationObjectType: null,
  65 + owningRegion: null,
  66 + violationType: null,
  67 + violationGrade: null,
  68 + projectName: null,
  69 + companyName: null,
  70 + describe: null,
  71 + sendObject: null,
  72 + receive: null,
  73 + receiveStatus: null,
  74 + readBy: null,
  75 + readTime: null,
  76 + replyOne: null,
  77 + replyTwo: null,
  78 + replyThree: null
  79 + },
  80 + // 表单参数
  81 + form: {},
  82 + // 表单校验
  83 + rules: {
  84 + number: [{
  85 + required: true,
  86 + message: "必填",
  87 + trigger: "blur"
  88 + }],
  89 + violationObjectType: [{
  90 + required: true,
  91 + message: "必填",
  92 + trigger: "blur"
  93 + }],
  94 + owningRegion: [{
  95 + required: true,
  96 + message: "必填",
  97 + trigger: "blur"
  98 + }],
  99 + violationType: [{
  100 + required: true,
  101 + message: "必填",
  102 + trigger: "blur"
  103 + }],
  104 + },
  105 + caseType: [{
  106 + code: 0,
  107 + name: "工地预警-未报开工作业"
  108 + },
  109 + {
  110 + code: 1,
  111 + name: "工地预警-视频设备离线超时报警"
  112 + },
  113 + {
  114 + code: 2,
  115 + name: "工地预警-三无车辆进入工地"
  116 + },
  117 + {
  118 + code: 3,
  119 + name: "工地预警未按时间作业"
  120 + },
  121 + {
  122 + code: 4,
  123 + name: "消纳场预警-未报开工作业"
  124 + },
  125 + {
  126 + code: 5,
  127 + name: "消纳场预警-视频设备离线超时报警"
  128 + },
  129 + {
  130 + code: 6,
  131 + name: "消纳场预警-三无车辆进入消纳场"
  132 + },
  133 + {
  134 + code: 7,
  135 + name: "消纳场预警-未到指定的消纳场作业"
  136 + },
  137 + {
  138 + code: 8,
  139 + name: "离线运输报警(工)"
  140 + },
  141 + {
  142 + code: 9,
  143 + name: "离线运输报警(消)"
  144 + },
  145 + {
  146 + code: 10,
  147 + name: "未激活车辆作业"
  148 + },
  149 + {
  150 + code: 11,
  151 + name: "未核准作业车辆作业"
  152 + },
  153 + {
  154 + code: 12,
  155 + name: "未按线路行驶"
  156 + },
  157 + {
  158 + code: 13,
  159 + name: "闯禁行驶"
  160 + },
  161 + {
  162 + code: 14,
  163 + name: "失信车辆作业"
  164 + }
  165 + ],
  166 + projectNameList: [],
  167 + isLoading: false,
  168 + fileEntityList: [],
  169 + companyList: [],
  170 + remoteQueryData: {
  171 + "page": 1,
  172 + "size": 9999
  173 + },
  174 + isLoadingCompany: false,
  175 + idInfo: null,
  176 + openInfo: false,
  177 + areas: [],
  178 + data: {},
  179 + };
  180 + },
  181 + created() {
  182 + getAreaList().then(res => {
  183 + this.areas = res.data;
  184 + });
  185 +
  186 +
  187 + getEarthSitesList().then(res => {
  188 + for (var i in res.data) {
  189 + this.projectNameList.push({
  190 + name: res.data[i].name
  191 + });
  192 + }
  193 + });
  194 + getConstructionList().then(res => {
  195 + for (var i in res.data) {
  196 + this.projectNameList.push({
  197 + name: res.data[i].name
  198 + });
  199 + }
  200 + });
  201 +
  202 +
  203 + getCompanyList(this.remoteQueryData).then(res => {
  204 + this.companyList = res.data;
  205 + });
  206 + this.getList();
  207 + },
  208 + methods: {
  209 + selectArea(item) {
  210 +
  211 + this.form.owningRegion = item.name;
  212 +
  213 + },
  214 + /** 查询违规预警信息列表 */
  215 + getList() {
  216 + this.loading = true;
  217 + listViolationWarningInformation(this.queryParams).then(response => {
  218 + this.violationWarningInformationList = response.rows;
  219 + this.total = response.total;
  220 + this.loading = false;
  221 + });
  222 + },
  223 + // 取消按钮
  224 + cancel() {
  225 + this.open = false;
  226 + this.openInfo = false;
  227 + this.reset();
  228 + },
  229 + // 表单重置
  230 + reset() {
  231 + this.fileEntityList = [];
  232 + this.form = {
  233 + id: null,
  234 + number: null,
  235 + violationObjectType: null,
  236 + owningRegion: null,
  237 + violationType: null,
  238 + violationGrade: null,
  239 + projectName: null,
  240 + companyName: null,
  241 + describe: null,
  242 + sendObject: null,
  243 + createTime: null,
  244 + createBy: null,
  245 + updateTime: null,
  246 + updateBy: null,
  247 + receive: null,
  248 + receiveStatus: 0,
  249 + readBy: null,
  250 + readTime: null,
  251 + replyOne: null,
  252 + replyTwo: null,
  253 + replyThree: null
  254 + };
  255 + this.resetForm("form");
  256 + },
  257 + /** 搜索按钮操作 */
  258 + handleQuery() {
  259 + this.queryParams.pageNum = 1;
  260 + this.getList();
  261 + },
  262 + /** 重置按钮操作 */
  263 + resetQuery() {
  264 + this.resetForm("queryForm");
  265 + this.handleQuery();
  266 + },
  267 + // 多选框选中数据
  268 + handleSelectionChange(selection) {
  269 + this.ids = selection.map(item => item.id)
  270 + this.single = selection.length !== 1
  271 + this.multiple = !selection.length
  272 + },
  273 + handleInfo(row) {
  274 + this.idInfo = row.id + "";
  275 + this.openInfo = true;
  276 + this.title = "平台违规案卷详情";
  277 + },
  278 + /** 新增按钮操作 */
  279 + handleAdd() {
  280 + this.reset();
  281 + this.open = true;
  282 + this.form.number = this.getNumber();
  283 + this.form.violationGrade = "一般类";
  284 + this.form.sendObject = "区管理部门(治)";
  285 + this.title = "添加违规预警信息";
  286 + },
  287 + /** 修改按钮操作 */
  288 + handleUpdate(row) {
  289 + this.reset();
  290 + const id = row.id || this.ids
  291 + getViolationWarningInformation(id).then(response => {
  292 + this.form = response.data.violationWarningInformation;
  293 + let files = JSON.stringify(response.data.uploadFiles);
  294 + this.fileEntityList = JSON.parse(files.replaceAll("filePath", "url").replaceAll("fileName", "name"))
  295 + this.open = true;
  296 + this.title = "修改违规预警信息";
  297 + });
  298 +
  299 + },
  300 + /** 提交按钮 */
  301 + submitForm() {
  302 + this.$refs["form"].validate(valid => {
  303 + if (valid) {
  304 + if (this.form.sendObject == "运输企业" && this.form.companyName == null) {
  305 +
  306 + this.$message("请选择相关企业");
  307 +
  308 + return;
  309 + }
  310 + let formData = new FormData();
  311 + let form = this.form;
  312 + //去掉params属性
  313 + delete form.params;
  314 + formData.append('fileList', null);
  315 + //将新增的文件放入formData
  316 + this.fileEntityList.forEach(item => {
  317 + if (item.id == null) {
  318 + formData.append('fileList', item.raw)
  319 + }
  320 + })
  321 + if (this.form.id != null) {
  322 + formData.append("violationWarningInformation", JSON.stringify(form));
  323 + formData.append("uploadFilesList", null);
  324 + this.fileEntityList.forEach(item => {
  325 + delete item.params;
  326 + if (item != "null" && item != null) {
  327 + formData.append('uploadFilesList', JSON.stringify(item).replaceAll("url", "filePath")
  328 + .replaceAll("name", "fileName"));
  329 + }
  330 + })
  331 + updateViolationWarningInformation(formData).then(response => {
  332 + this.msgSuccess("修改成功");
  333 + this.open = false;
  334 + this.getList();
  335 + });
  336 + } else {
  337 + for (let key in form) {
  338 + formData.append(key, form[key] == null ? "" : form[key])
  339 + }
  340 + addViolationWarningInformation(formData).then(response => {
  341 + this.msgSuccess("新增成功");
  342 + this.open = false;
  343 + this.getList();
  344 + });
  345 + }
  346 + }
  347 + });
  348 + },
  349 + /** 删除按钮操作 */
  350 + handleDelete(row) {
  351 + const ids = row.id || this.ids;
  352 + this.$confirm('是否确认删除违规预警信息编号为"' + ids + '"的数据项?', "警告", {
  353 + confirmButtonText: "确定",
  354 + cancelButtonText: "取消",
  355 + type: "warning"
  356 + }).then(function() {
  357 + return delViolationWarningInformation(ids);
  358 + }).then(() => {
  359 + this.getList();
  360 + this.msgSuccess("删除成功");
  361 + })
  362 + },
  363 + /** 导出按钮操作 */
  364 + handleExport() {
  365 + const queryParams = this.queryParams;
  366 + this.$confirm('是否确认导出所有违规预警信息数据项?', "警告", {
  367 + confirmButtonText: "确定",
  368 + cancelButtonText: "取消",
  369 + type: "warning"
  370 + }).then(function() {
  371 + return exportViolationWarningInformation(queryParams);
  372 + }).then(response => {
  373 + this.download(response.message);
  374 + })
  375 + },
  376 + /** 生成案卷编号 */
  377 + getNumber() {
  378 + const now = new Date();
  379 + const year = now.getFullYear().toString().slice(-2); // 提取后两位数
  380 + const month = now.getMonth() + 1 < 10 ? `0${now.getMonth() + 1}` : now.getMonth() + 1;
  381 + const day = now.getDate() < 10 ? `0${now.getDate()}` : now.getDate();
  382 + const hour = now.getHours() < 10 ? `0${now.getHours()}` : now.getHours();
  383 + const minute = now.getMinutes() < 10 ? `0${now.getMinutes()}` : now.getMinutes();
  384 + const second = now.getSeconds() < 10 ? `0${now.getSeconds()}` : now.getSeconds();
  385 + const millisecond = now.getMilliseconds();
  386 + const code = `${year}${month}${day}${hour}${minute}${second}${millisecond}`;
  387 + return code;
  388 + },
  389 + projectNameLoadOptions(query) {
  390 + // 根据输入的关键字query异步加载选项数据
  391 + this.isLoading = true
  392 + setTimeout(() => {
  393 + // 模拟异步加载数据
  394 + const data = [{
  395 + name: '项目1'
  396 + },
  397 + {
  398 + name: '项目2'
  399 + },
  400 + {
  401 + name: '项目3'
  402 + }
  403 + ].filter(item => item.name.includes(query))
  404 + this.projectNameList = data
  405 + this.isLoading = false
  406 + }, 200)
  407 + },
  408 + companyLoadOptions(query) {
  409 + // 根据输入的关键字query异步加载选项数据
  410 + this.isLoadingCompany = true
  411 + setTimeout(() => {
  412 + // 模拟异步加载数据
  413 + const data = [{
  414 + name: '公司1'
  415 + },
  416 + {
  417 + name: '公司2'
  418 + },
  419 + {
  420 + name: '公司3'
  421 + }
  422 + ].filter(item => item.name.includes(query))
  423 + this.companyList = data
  424 + this.isLoadingCompany = false
  425 + }, 200)
  426 + },
  427 + /**
  428 + * 文件改变时,限制文件上传格式和大小
  429 + * 文件格式只能为docx/doc/pdf/png/jpeg/png/jpg
  430 + * 大小不超过20M
  431 + * */
  432 + fileChange(file, fileList) {
  433 + let count = 0;
  434 + for (let i = 0; i < fileList.length; i++) {
  435 + // console.log(fileList.length)
  436 + // console.log(this.fileEntityList[i].name+"111"+file.name)
  437 + if (fileList[i].name == file.name) {
  438 + count++;
  439 + if (count == 2) {
  440 + this.$message({
  441 + message: '已存在此文件!',
  442 + type: 'warning'
  443 + });
  444 + for (let j = fileList.length; j > 0; j--) {
  445 + //如果存在此文件,去除新选择的重复文件
  446 + if (fileList[j - 1].name == file.name) {
  447 + fileList.splice(j - 1, 1);
  448 + i--;
  449 + return false;
  450 + }
  451 + }
  452 + }
  453 + }
  454 + }
  455 + let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase();
  456 + //格式符合后判断大小
  457 + if ("docx,doc,pdf,png,jpeg,png,jpg".indexOf(fileType) != -1) {
  458 + let max5M = file.size / 1024 / 1024 < 20;
  459 + if (!max5M) {
  460 + this.$message({
  461 + message: '上传文件大小不得超过20M!',
  462 + type: 'warning'
  463 + });
  464 + fileList = fileList.splice(fileList.length - 1, 1);
  465 + } else {
  466 + //符合条件后进行添加
  467 + this.fileEntityList = fileList
  468 + }
  469 + } else {
  470 + this.$message({
  471 + message: '上传文件只能是 docx、doc、pdf、png、jpeg、png、jpg格式!',
  472 + type: 'warning'
  473 + });
  474 + fileList = fileList.splice(fileList.length - 1, 1);
  475 + }
  476 + },
  477 + // 删除文件
  478 + handleDeleteFile(index) {
  479 + this.fileEntityList.splice(index, 1);
  480 + },
  481 + /** 文件下载 */
  482 + downloadFA(row) {
  483 + let name = row.name;
  484 + let url = row.url;
  485 + const a = document.createElement('a')
  486 + a.setAttribute('download', name)
  487 + a.setAttribute('target', '_blank')
  488 + a.setAttribute('href', process.env.VUE_APP_BASE_API + url);
  489 + a.click()
  490 + },
  491 + /** 生成违规描述 */
  492 + createDescribe() {
  493 + this.rules.companyName = [{
  494 + required: true,
  495 + message: "必填",
  496 + trigger: "blur"
  497 + }]
  498 + this.rules.projectName = [{
  499 + required: true,
  500 + message: "必填",
  501 + trigger: "blur"
  502 + }]
  503 + this.$refs["form"].validate(valid => {
  504 + if (valid) {
  505 + let formData = this.form;
  506 + const now = new Date();
  507 + const year = now.getFullYear();
  508 + const month = now.getMonth() + 1 < 10 ? `0${now.getMonth() + 1}` : now.getMonth() + 1;
  509 + const day = now.getDate() < 10 ? `0${now.getDate()}` : now.getDate();
  510 + const hour = now.getHours() < 10 ? `0${now.getHours()}` : now.getHours();
  511 + const minute = now.getMinutes() < 10 ? `0${now.getMinutes()}` : now.getMinutes();
  512 + const second = now.getSeconds() < 10 ? `0${now.getSeconds()}` : now.getSeconds();
  513 + const code = `${year}/${month}/${day} ${hour}:${minute}:${second}`;
  514 + this.form.describe = code + formData.companyName + "在" + formData.projectName + "出现" + formData
  515 + .violationType;
  516 + this.rules.companyName = null;
  517 + this.rules.projectName = null;
  518 + }
  519 + });
  520 +
  521 + }
  522 + }
  523 +};
trash-ui/src/views/activiti/task/constructsiteInfo.vue
@@ -137,7 +137,7 @@ @@ -137,7 +137,7 @@
137 </el-row> 137 </el-row>
138 138
139 139
140 - <el-row class="bd_left bd_right bd_bottom" v-if="signData.sign1"> 140 + <el-row class="bd_left bd_right bd_bottom" v-if="signData && signData.sign1">
141 <el-col :span="1" class="bd_padding bd_right" >部门意见</el-col> 141 <el-col :span="1" class="bd_padding bd_right" >部门意见</el-col>
142 <el-col :span="23" > 142 <el-col :span="23" >
143 <el-row class="bd_padding">{{signData.sign1Text}}</el-row> 143 <el-row class="bd_padding">{{signData.sign1Text}}</el-row>
@@ -147,7 +147,7 @@ @@ -147,7 +147,7 @@
147 </el-col> 147 </el-col>
148 </el-row> 148 </el-row>
149 149
150 - <el-row class="bd_left bd_right bd_bottom" v-if="signData.sign2"> 150 + <el-row class="bd_left bd_right bd_bottom" v-if="signData && signData.sign2">
151 <el-col :span="1" class="bd_padding bd_right">主管领导意见</el-col> 151 <el-col :span="1" class="bd_padding bd_right">主管领导意见</el-col>
152 <el-col :span="23" > 152 <el-col :span="23" >
153 <el-row class="bd_padding">{{signData.sign2Text}}</el-row> 153 <el-row class="bd_padding">{{signData.sign2Text}}</el-row>
@@ -157,7 +157,7 @@ @@ -157,7 +157,7 @@
157 </el-col> 157 </el-col>
158 </el-row> 158 </el-row>
159 159
160 - <el-row class="bd_left bd_right" v-if="signData.sign3"> 160 + <el-row class="bd_left bd_right" v-if="signData && signData.sign3">
161 <el-col :span="1" class="bd_padding bd_right">分管领导意见</el-col> 161 <el-col :span="1" class="bd_padding bd_right">分管领导意见</el-col>
162 <el-col :span="23" > 162 <el-col :span="23" >
163 <el-row class="bd_padding">{{signData.sign3Text}}</el-row> 163 <el-row class="bd_padding">{{signData.sign3Text}}</el-row>
@@ -167,7 +167,7 @@ @@ -167,7 +167,7 @@
167 </el-col> 167 </el-col>
168 </el-row> 168 </el-row>
169 169
170 - <el-row class="bd_left bd_right" style="border: 1px solid black;" v-if="signData.sign4"> 170 + <el-row class="bd_left bd_right" style="border: 1px solid black;" v-if="signData && signData.sign4">
171 <el-col :span="1" class="bd_right bd_padding">渣土事务中心负责人意见</el-col> 171 <el-col :span="1" class="bd_right bd_padding">渣土事务中心负责人意见</el-col>
172 <el-col :span="23" > 172 <el-col :span="23" >
173 <el-row class="bd_padding">{{signData.sign4Text}}</el-row> 173 <el-row class="bd_padding">{{signData.sign4Text}}</el-row>
trash-ui/src/views/activiti/task/index.vue
@@ -265,7 +265,7 @@ @@ -265,7 +265,7 @@
265 <caseOfflineInfo :businessKey="businessKey" v-if="caseOffline"/> 265 <caseOfflineInfo :businessKey="businessKey" v-if="caseOffline"/>
266 <el-input v-model="form.advice" placeholder="请填写审批意见" type="textarea" :rows="3"/> 266 <el-input v-model="form.advice" placeholder="请填写审批意见" type="textarea" :rows="3"/>
267 <div slot="footer" class="dialog-footer"> 267 <div slot="footer" class="dialog-footer">
268 - <el-button type="danger" @click="submitForm(form.formData[0].controlId,1)">驳回</el-button> 268 + <el-button type="danger" @click="submitForm(form.formData[0].controlId,1)" v-if="this.taskName != '车辆所属企业' && this.taskName != '渣土办科员'">驳回</el-button>
269 <el-button type="primary" @click="submitForm(form.formData[0].controlId,0)">通过</el-button> 269 <el-button type="primary" @click="submitForm(form.formData[0].controlId,0)">通过</el-button>
270 </div> 270 </div>
271 </el-dialog> 271 </el-dialog>
@@ -887,7 +887,6 @@ export default { @@ -887,7 +887,6 @@ export default {
887 }) 887 })
888 return; 888 return;
889 } else { 889 } else {
890 - if (value == 0) {  
891 let postData = {}; 890 let postData = {};
892 891
893 postData.tableName = this.businessKey; 892 postData.tableName = this.businessKey;
@@ -901,13 +900,7 @@ export default { @@ -901,13 +900,7 @@ export default {
901 }); 900 });
902 }); 901 });
903 902
904 - } else {  
905 - formDataSave(this.id, this.form.formData).then(response => {  
906 - this.msgSuccess("审批成功");  
907 - this.violationCaseFile = false;  
908 - this.getList();  
909 - });  
910 - } 903 +
911 } 904 }
912 } 905 }
913 if (this.definitionKey == "violation_warning") { 906 if (this.definitionKey == "violation_warning") {
@@ -923,9 +916,7 @@ export default { @@ -923,9 +916,7 @@ export default {
923 }) 916 })
924 return; 917 return;
925 } else { 918 } else {
926 - if (value == 0) {  
927 let postData = {}; 919 let postData = {};
928 -  
929 postData.tableName = this.businessKey; 920 postData.tableName = this.businessKey;
930 postData.replyImg = this.form.replyImg; 921 postData.replyImg = this.form.replyImg;
931 postData.reply = this.form.reply; 922 postData.reply = this.form.reply;
@@ -937,13 +928,7 @@ export default { @@ -937,13 +928,7 @@ export default {
937 }); 928 });
938 }); 929 });
939 930
940 - } else {  
941 - formDataSave(this.id, this.form.formData).then(response => {  
942 - this.msgSuccess("审批成功");  
943 - this.violationCaseFile1 = false;  
944 - this.getList();  
945 - });  
946 - } 931 +
947 } 932 }
948 } 933 }
949 934
trash-ui/src/views/business/CompanyCredit/index.vue
@@ -18,7 +18,7 @@ @@ -18,7 +18,7 @@
18 filterable 18 filterable
19 reserve-keyword 19 reserve-keyword
20 placeholder="运输企业" 20 placeholder="运输企业"
21 - 21 +
22 size="small" 22 size="small"
23 :loading="loading"> 23 :loading="loading">
24 <el-option 24 <el-option
@@ -34,7 +34,7 @@ @@ -34,7 +34,7 @@
34 <el-select v-model="queryParams.place" placeholder="所属区域" 34 <el-select v-model="queryParams.place" placeholder="所属区域"
35 filterable 35 filterable
36 reserve-keyword 36 reserve-keyword
37 - 37 +
38 size="small" 38 size="small"
39 :loading="loading"> 39 :loading="loading">
40 <el-option 40 <el-option
@@ -166,251 +166,6 @@ @@ -166,251 +166,6 @@
166 </div> 166 </div>
167 </template> 167 </template>
168 168
169 -<script>  
170 - import {  
171 - listCredit,  
172 - getCredit,  
173 - delCredit,  
174 - addCredit,  
175 - updateCredit,  
176 - exportCredit,  
177 - getNames,  
178 - getPlaces,  
179 - historyCredit  
180 - } from "@/api/business/company";  
181 -  
182 - import {  
183 - companyList,  
184 - updateCompany,  
185 - } from "@/api/dict";  
186 -  
187 -  
188 - export default {  
189 - name: "Credit",  
190 - data() {  
191 - return {  
192 - // 遮罩层  
193 - loading: true,  
194 - // 选中数组  
195 - ids: [],  
196 - // 非单个禁用  
197 - single: true,  
198 - // 非多个禁用  
199 - multiple: true,  
200 - // 显示搜索条件  
201 - showSearch: true,  
202 - infoDialog :false,  
203 - // 总条数  
204 - total: 0,  
205 - // 工地表格数据  
206 - creditList: [],  
207 - creditListInfo: [],  
208 - companyList:[],  
209 - dictNames:[],  
210 - dictPlaces:[],  
211 - // 弹出层标题  
212 - title: "",  
213 - // 是否显示弹出层  
214 - open: false,  
215 - isEdit:false,  
216 - // 查询参数  
217 - queryParams: {  
218 - pageNum: 1,  
219 - pageSize: 10,  
220 - name: null,  
221 - time: null,  
222 - place: null,  
223 - reason: null,  
224 - status: 0,  
225 - lostCredit: 1  
226 - },  
227 - // 表单参数  
228 - form: {},  
229 - updateForm:{},  
230 - // 表单校验  
231 - rules: {  
232 - name: [  
233 - { required: true, message: '请选择运输企业', trigger: 'change' },  
234 - ],  
235 - reason: [  
236 - { required: true, message: '请填写原因', trigger: 'change' },  
237 - ],  
238 - },  
239 - rules2: {  
240 - reason: [  
241 - { required: true, message: '请填写原因', trigger: 'change' },  
242 - ],  
243 - },  
244 - };  
245 - },  
246 - created() {  
247 - this.init();  
248 - },  
249 - methods: {  
250 - init(){  
251 - this.resetQuery();  
252 - this.getList();  
253 - getNames(this.queryParams).then(response => {  
254 - this.dictNames = response;  
255 - });  
256 - getPlaces(this.queryParams).then(response => {  
257 - this.dictPlaces = response;  
258 - });  
259 -  
260 - let query = {  
261 - 'page':1,  
262 - 'size':9999,  
263 - 'creditStatus':0  
264 - }  
265 - companyList(query).then(response => {  
266 -  
267 - this.companyList = response.result.list;  
268 - });  
269 - },  
270 - getDataInfo(row){  
271 - let param ={"objectId":row.objectId}  
272 -  
273 - listCredit(param).then(response => {  
274 - this.creditListInfo = response.rows;  
275 - this.infoDialog = true;  
276 - });  
277 169
278 - },  
279 - getData(stauts){  
280 - this.queryParams.status=0;  
281 - this.queryParams.lostCredit=stauts;  
282 - this.getList();  
283 - },  
284 - getHistoryData(){  
285 - this.queryParams.status=1;  
286 - this.getList();  
287 - },  
288 - colStyle(obj){  
289 - if(obj.column.property == "id"){  
290 - return {background:"#f8f8f9"}  
291 - }  
292 - },  
293 - getObjId(a){  
294 - this.form.objectId = a.id;  
295 - this.form.place = a.areaName;  
296 - },  
297 - getList() {  
298 - this.loading = true;  
299 - if(this.queryParams.status==0){  
300 - listCredit(this.queryParams).then(response => {  
301 - this.creditList = response.rows;  
302 - this.total = response.total;  
303 - this.loading = false;  
304 - });  
305 - }  
306 - if(this.queryParams.status==1){  
307 - historyCredit(this.queryParams).then(response => {  
308 - this.creditList = response.rows;  
309 - this.total = response.total;  
310 - this.loading = false;  
311 - });  
312 - } 170 +<script src="../../../api/company_credit.js" />
313 171
314 - },  
315 - // 取消按钮  
316 - cancel() {  
317 - this.open = false;  
318 - this.isEdit = false;  
319 - this.reset();  
320 - },  
321 - // 表单重置  
322 - reset() {  
323 - this.form = {  
324 - id: null,  
325 - name: null,  
326 - time: null,  
327 - place: null,  
328 - reason: null,  
329 - lostCredit: null,  
330 - objectId: null,  
331 - };  
332 - this.resetForm("form");  
333 - },  
334 - /** 搜索按钮操作 */  
335 - handleQuery() {  
336 - this.queryParams.pageNum = 1;  
337 - this.getList();  
338 - },  
339 - /** 重置按钮操作 */  
340 - resetQuery() {  
341 - this.resetForm("queryForm");  
342 - console.log(this.queryParams);  
343 - this.handleQuery();  
344 - },  
345 - // 多选框选中数据  
346 - handleSelectionChange(selection) {  
347 - this.ids = selection.map(item => item.id)  
348 - this.single = selection.length !== 1  
349 - this.multiple = !selection.length  
350 - },  
351 - /** 新增按钮操作 */  
352 - handleAdd() {  
353 - this.reset();  
354 - this.open = true;  
355 - this.title = "企业信息录入";  
356 - },  
357 - /** 修改按钮操作 */  
358 - handleUpdate(row) {  
359 - this.reset();  
360 - const id = row.id || this.ids  
361 - getCredit(id).then(response => {  
362 - this.form = response.data;  
363 - this.isEdit = true;  
364 - });  
365 - },  
366 - /** 提交按钮 */  
367 - submitForm() {  
368 - if(this.isEdit){  
369 - this.$refs["updateForm"].validate(valid => {  
370 - if (valid) {  
371 - this.loading = true;  
372 - this.form.lostCredit = 0;  
373 - this.updateForm.id = this.form.id;  
374 - let data = [{id:this.form.objectId,dishonestState:this.form.lostCredit}];  
375 - updateCompany(data).then(res=>{  
376 - updateCredit(this.updateForm).then(response => {  
377 - this.msgSuccess("撤销成功");  
378 - this.isEdit = false;  
379 - this.updateForm = {};  
380 - this.init();  
381 - });  
382 - });  
383 - }  
384 - });  
385 - }else{  
386 - this.$refs["form"].validate(valid => {  
387 - if (valid) {  
388 - this.loading = true;  
389 - this.form.lostCredit = 1;  
390 - let data = [{id:this.form.objectId,dishonestState:this.form.lostCredit}];  
391 - updateCompany(data).then(res=>{  
392 - addCredit(this.form).then(response => {  
393 - this.msgSuccess("新增成功");  
394 - this.open = false;  
395 - this.init();  
396 - });  
397 - });  
398 - }  
399 - });  
400 - }  
401 - },  
402 - handleExport() {  
403 - const queryParams = this.queryParams;  
404 - this.$confirm('是否确认导出所有企业数据项?', "警告", {  
405 - confirmButtonText: "确定",  
406 - cancelButtonText: "取消",  
407 - type: "warning"  
408 - }).then(function() {  
409 - return exportCredit(queryParams);  
410 - }).then(response => {  
411 - this.download(response.message);  
412 - })  
413 - }  
414 - }  
415 - };  
416 -</script>  
trash-ui/src/views/business/ConstructionCredit/index.vue
@@ -140,7 +140,7 @@ @@ -140,7 +140,7 @@
140 </div> 140 </div>
141 </el-dialog> 141 </el-dialog>
142 142
143 - <el-dialog title="历史失信" :visible.sync="infoDialog" width="300px" append-to-body> 143 + <el-dialog title="历史失信" :visible.sync="infoDialog" width="800px" append-to-body>
144 <el-table v-loading="loading" :data="creditListInfo" :cell-style="colStyle" border> 144 <el-table v-loading="loading" :data="creditListInfo" :cell-style="colStyle" border>
145 <el-table-column label="序号" align="center" type="index" /> 145 <el-table-column label="序号" align="center" type="index" />
146 <el-table-column label="失信时间" align="center" prop="time" width="180" /> 146 <el-table-column label="失信时间" align="center" prop="time" width="180" />
@@ -155,296 +155,4 @@ @@ -155,296 +155,4 @@
155 </div> 155 </div>
156 </template> 156 </template>
157 157
158 -<script>  
159 - import {  
160 - listCredit,  
161 - getCredit,  
162 - delCredit,  
163 - addCredit,  
164 - updateCredit,  
165 - exportCredit,  
166 - getNames,  
167 - getTypes,  
168 - getPlaces,  
169 - historyCredit  
170 - } from "@/api/business/constructionsites";  
171 -  
172 - import {  
173 - constructionsitesList,  
174 - getDict,  
175 - getArea,  
176 - updateConstructionsites  
177 - } from "@/api/dict";  
178 -  
179 - export default {  
180 - name: "ConstructionCredit",  
181 - data() {  
182 - return {  
183 - // 遮罩层  
184 - loading: true,  
185 - // 选中数组  
186 - ids: [],  
187 - // 非单个禁用  
188 - single: true,  
189 - // 非多个禁用  
190 - multiple: true,  
191 - // 显示搜索条件  
192 - showSearch: true,  
193 - infoDialog: false,  
194 - // 总条数  
195 - total: 0,  
196 - // 工地表格数据  
197 - creditList: [],  
198 - creditListInfo: [],  
199 - dictNames: [],  
200 - dictTypes: [],  
201 - dictPlaces: [],  
202 - // 弹出层标题  
203 - title: "",  
204 - // 是否显示弹出层  
205 - open: false,  
206 - isEdit: false,  
207 - // 查询参数  
208 - queryParams: {  
209 - pageNum: 1,  
210 - pageSize: 10,  
211 - name: null,  
212 - type: null,  
213 - time: null,  
214 - place: null,  
215 - reason: null,  
216 - status: 0,  
217 - lostCredit: 1,  
218 - },  
219 - // 表单参数  
220 - form: {  
221 - },  
222 - updateForm: {},  
223 - //建筑垃圾类型集合  
224 - trashTypes: [],  
225 - constructionList: [],  
226 - // 表单校验  
227 - rules: {  
228 - name: [{  
229 - required: true,  
230 - message: '请选择工地',  
231 - trigger: 'change'  
232 - }, ],  
233 - reason: [{  
234 - required: true,  
235 - message: '请填写原因',  
236 - trigger: 'change'  
237 - }, ]  
238 - },  
239 - areas:[],  
240 - };  
241 -  
242 -  
243 - },  
244 - created() {  
245 -  
246 - getArea().then(res => {  
247 - this.areas = res.result;  
248 - });  
249 -  
250 - getDict({'type': 'CSDisSiteDisposalType'}).then(response => {  
251 - this.trashTypes = response.result;  
252 - });  
253 -  
254 - this.init();  
255 -  
256 - },  
257 - methods: {  
258 - init(){  
259 - this.reset();  
260 - this.resetQuery();  
261 - this.getList();  
262 - this.getNamesData();  
263 - this.getTypesData();  
264 - this.getPlacesData();  
265 -  
266 - let query = {  
267 - 'page': 1,  
268 - 'size': 9999,  
269 - 'creditStatus': 0  
270 - };  
271 - constructionsitesList(query).then(response => {  
272 - this.constructionList = response.result.list  
273 - });  
274 - },  
275 - getList() {  
276 - this.loading = true;  
277 - if (this.queryParams.status == 0) {  
278 - listCredit(this.queryParams).then(response => {  
279 - this.creditList = response.rows;  
280 - this.total = response.total;  
281 - this.loading = false;  
282 - });  
283 - }  
284 - if (this.queryParams.status == 1) {  
285 - historyCredit(this.queryParams).then(response => {  
286 - this.creditList = response.rows;  
287 - this.total = response.total;  
288 - this.loading = false;  
289 - });  
290 - }  
291 - },  
292 - getDataInfo(row) {  
293 - let param = {  
294 - "objectId": row.objectId  
295 - }  
296 - listCredit(param).then(response => {  
297 - this.creditListInfo = response.rows;  
298 - this.infoDialog = true;  
299 - });  
300 - },  
301 - getNamesData() {  
302 - getNames(this.queryParams).then(response => {  
303 - this.dictNames = response;  
304 - });  
305 - },  
306 - getTypesData() {  
307 - getTypes(this.queryParams).then(response => {  
308 - this.dictTypes = response;  
309 - });  
310 - },  
311 - getPlacesData() {  
312 - getPlaces(this.queryParams).then(response => {  
313 - this.dictPlaces = response;  
314 - });  
315 - },  
316 - getData(stauts) {  
317 - this.queryParams.status = 0;  
318 - this.queryParams.lostCredit = stauts;  
319 - this.init();  
320 - },  
321 - getHistoryData() {  
322 - this.queryParams.status = 1;  
323 - this.init();  
324 - },  
325 - colStyle(obj) {  
326 - if (obj.column.property == "id") {  
327 - return {  
328 - background: "#f8f8f9"  
329 - }  
330 - }  
331 - },  
332 - getObjId(object) {  
333 -  
334 - this.form.objectId = object.id;  
335 -  
336 - for(let i in this.areas){  
337 - if(this.areas[i].code == Number(object.areaCode)){  
338 - this.form.place = this.areas[i].name;  
339 - break;  
340 - }  
341 - }  
342 - for(let i in this.trashTypes){  
343 - if(this.trashTypes[i].code == Number(object.cargoId)){  
344 - this.form.type = this.trashTypes[i].name;  
345 - break;  
346 - }  
347 - }  
348 - },  
349 - // 取消按钮  
350 - cancel() {  
351 - this.open = false;  
352 - this.isEdit = false;  
353 - this.reset();  
354 - },  
355 - // 表单重置  
356 - reset() {  
357 - this.form = {  
358 - id: null,  
359 - name: null,  
360 - type: null,  
361 - time: null,  
362 - place: null,  
363 - reason: null,  
364 - lostCredit: null,  
365 - objectId: null,  
366 - };  
367 - this.updateForm = {  
368 - reason:null,  
369 - };  
370 - this.resetForm("updateForm");  
371 - this.resetForm("form");  
372 - },  
373 - /** 搜索按钮操作 */  
374 - handleQuery() {  
375 - this.queryParams.pageNum = 1;  
376 - this.getList();  
377 - },  
378 - /** 重置按钮操作 */  
379 - resetQuery() {  
380 - this.resetForm("queryForm");  
381 - console.log(this.queryParams);  
382 - this.handleQuery();  
383 - },  
384 - // 多选框选中数据  
385 - handleSelectionChange(selection) {  
386 - this.ids = selection.map(item => item.id)  
387 - this.single = selection.length !== 1  
388 - this.multiple = !selection.length  
389 - },  
390 - /** 新增按钮操作 */  
391 - handleAdd() {  
392 - this.reset();  
393 - this.open = true;  
394 - this.title = "添加工地";  
395 - },  
396 - /** 修改按钮操作 */  
397 - handleUpdate(row) {  
398 - this.reset();  
399 - const id = row.id || this.ids  
400 - getCredit(id).then(response => {  
401 - this.form = response.data;  
402 - this.isEdit = true;  
403 - });  
404 - },  
405 - /** 提交按钮 */  
406 - submitForm() {  
407 - this.$refs["form"].validate(valid => {  
408 - if (valid) {  
409 - this.loading = true;  
410 - if (this.form.id != null) {  
411 - this.form.lostCredit = 0;  
412 - let data = [{creditStatus:this.form.lostCredit,objectId:this.form.objectId}];  
413 -  
414 - updateConstructionsites(data).then(response=>{  
415 - this.updateForm.id = this.form.id;  
416 - updateCredit(this.updateForm).then(response => {  
417 - this.msgSuccess("撤销成功");  
418 - this.isEdit = false;  
419 - this.init();  
420 - });  
421 - });  
422 - } else {  
423 - this.form.lostCredit = 1;  
424 - let data = [{creditStatus:this.form.lostCredit,objectId:this.form.objectId}];  
425 - updateConstructionsites(data).then(response=>{  
426 - addCredit(this.form).then(response => {  
427 - this.msgSuccess("新增成功");  
428 - this.open = false;  
429 - this.init();  
430 - });  
431 - });  
432 - }  
433 - }  
434 - });  
435 - },  
436 - handleExport() {  
437 - const queryParams = this.queryParams;  
438 - this.$confirm('是否确认导出所有工地数据项?', "警告", {  
439 - confirmButtonText: "确定",  
440 - cancelButtonText: "取消",  
441 - type: "warning"  
442 - }).then(function() {  
443 - return exportCredit(queryParams);  
444 - }).then(response => {  
445 - this.download(response.message);  
446 - })  
447 - }  
448 - }  
449 - };  
450 -</script> 158 +<script src="../../../api/construction_credit.js" />