Commit d2baeb0241cd2eec448e4594c0da23ea4c4164af
1 parent
3441161d
m
Showing
51 changed files
with
3930 additions
and
6989 deletions
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" /> |
trash-ui/src/views/business/DriverCredit/index.vue
| @@ -16,7 +16,7 @@ | @@ -16,7 +16,7 @@ | ||
| 16 | style="float:right;"> | 16 | style="float:right;"> |
| 17 | <el-select v-model="queryParams.name" | 17 | <el-select v-model="queryParams.name" |
| 18 | filterable | 18 | filterable |
| 19 | - | 19 | + |
| 20 | reserve-keyword | 20 | reserve-keyword |
| 21 | placeholder="驾驶员姓名" | 21 | placeholder="驾驶员姓名" |
| 22 | size="small" | 22 | size="small" |
| @@ -87,9 +87,9 @@ | @@ -87,9 +87,9 @@ | ||
| 87 | v-model="form.name" | 87 | v-model="form.name" |
| 88 | filterable | 88 | filterable |
| 89 | reserve-keyword | 89 | reserve-keyword |
| 90 | - placeholder="驾驶员姓名"> | 90 | + placeholder="驾驶员姓名" |
| 91 | + @change="getObjId"> | ||
| 91 | <el-option | 92 | <el-option |
| 92 | - @click.native="getObjId(item)" | ||
| 93 | v-for="item in driverList" | 93 | v-for="item in driverList" |
| 94 | :key="item.id" | 94 | :key="item.id" |
| 95 | :label="item.name" | 95 | :label="item.name" |
| @@ -142,254 +142,4 @@ | @@ -142,254 +142,4 @@ | ||
| 142 | </div> | 142 | </div> |
| 143 | </template> | 143 | </template> |
| 144 | 144 | ||
| 145 | -<script> | ||
| 146 | -import { | ||
| 147 | - listCredit, | ||
| 148 | - getCredit, | ||
| 149 | - delCredit, | ||
| 150 | - addCredit, | ||
| 151 | - updateCredit, | ||
| 152 | - exportCredit, | ||
| 153 | - getNames, | ||
| 154 | - historyCredit | ||
| 155 | -} from "@/api/business/driver"; | ||
| 156 | - | ||
| 157 | -import { | ||
| 158 | - companyList, | ||
| 159 | - driverList | ||
| 160 | -} from "@/api/dict"; | ||
| 161 | - | ||
| 162 | -export default { | ||
| 163 | - name: "ConstructionCredit", | ||
| 164 | - data() { | ||
| 165 | - return { | ||
| 166 | - // 遮罩层 | ||
| 167 | - loading: true, | ||
| 168 | - // 选中数组 | ||
| 169 | - ids: [], | ||
| 170 | - // 非单个禁用 | ||
| 171 | - single: true, | ||
| 172 | - // 非多个禁用 | ||
| 173 | - multiple: true, | ||
| 174 | - // 显示搜索条件 | ||
| 175 | - showSearch: true, | ||
| 176 | - infoDialog :false, | ||
| 177 | - // 总条数 | ||
| 178 | - total: 0, | ||
| 179 | - // 工地表格数据 | ||
| 180 | - creditList: [], | ||
| 181 | - creditListInfo: [], | ||
| 182 | - dictNames:[], | ||
| 183 | - dictTypes:[], | ||
| 184 | - dictPlaces:[], | ||
| 185 | - driverList:[], | ||
| 186 | - names:[], | ||
| 187 | - idNumbers:[], | ||
| 188 | - places:[], | ||
| 189 | - // 弹出层标题 | ||
| 190 | - title: "", | ||
| 191 | - // 是否显示弹出层 | ||
| 192 | - open: false, | ||
| 193 | - isEdit:false, | ||
| 194 | - // 查询参数 | ||
| 195 | - queryParams: { | ||
| 196 | - pageNum: 1, | ||
| 197 | - pageSize: 10, | ||
| 198 | - name: null, | ||
| 199 | - idNumber: null, | ||
| 200 | - time: null, | ||
| 201 | - reason: null, | ||
| 202 | - status: 0, | ||
| 203 | - lostCredit: 1 | ||
| 204 | - }, | ||
| 205 | - // 表单参数 | ||
| 206 | - form: {}, | ||
| 207 | - updateForm:{}, | ||
| 208 | - // 表单校验 | ||
| 209 | - rules: {name: [ | ||
| 210 | - { required: true, message: '请选择驾驶员', trigger: 'change' }, | ||
| 211 | - ],reason: [ | ||
| 212 | - { required: true, message: '请填写原因', trigger: 'change' }, | ||
| 213 | - ]} | ||
| 214 | - }; | ||
| 215 | - }, | ||
| 216 | - created() { | ||
| 217 | - this.init(); | ||
| 218 | - }, | ||
| 219 | - methods: { | ||
| 220 | - init(){ | ||
| 221 | - this.reset(); | ||
| 222 | - | ||
| 223 | - this.resetQuery(); | ||
| 224 | - this.getList(); | ||
| 225 | - this.getNamesData(); | ||
| 226 | - | ||
| 227 | - let query = { | ||
| 228 | - 'page':1, | ||
| 229 | - 'size':9999, | ||
| 230 | - 'creditStatus':0 | ||
| 231 | - } | ||
| 232 | - | ||
| 233 | - companyList(query).then(response => { | ||
| 234 | - | ||
| 235 | - let companys = response.result.list; | ||
| 236 | - | ||
| 237 | - let ids = []; | ||
| 238 | - | ||
| 239 | - for(let i = 0 ;i<companys.length;i++){ | ||
| 240 | - ids.push(companys[i].id); | ||
| 241 | - } | ||
| 242 | - query.companyIds = ids + ""; | ||
| 243 | - query.status = 3; | ||
| 244 | - | ||
| 245 | - driverList(query).then(res=>{ | ||
| 246 | - | ||
| 247 | - this.driverList = res.result; | ||
| 248 | - | ||
| 249 | - }); | ||
| 250 | - | ||
| 251 | - }); | ||
| 252 | - }, | ||
| 253 | - getDataInfo(row){ | ||
| 254 | - let param ={"objectId":row.objectId} | ||
| 255 | - listCredit(param).then(response => { | ||
| 256 | - this.creditListInfo = response.rows; | ||
| 257 | - this.infoDialog = true; | ||
| 258 | - }); | ||
| 259 | - | ||
| 260 | - }, | ||
| 261 | - getNamesData(){ | ||
| 262 | - getNames(this.queryParams).then(response => { | ||
| 263 | - this.dictNames = response; | ||
| 264 | - }); | ||
| 265 | - }, | ||
| 266 | - getData(stauts){ | ||
| 267 | - this.queryParams.status=0; | ||
| 268 | - this.queryParams.lostCredit=stauts; | ||
| 269 | - this.getList(); | ||
| 270 | - }, | ||
| 271 | - getHistoryData(){ | ||
| 272 | - this.queryParams.status=1; | ||
| 273 | - this.init(); | ||
| 274 | - }, | ||
| 275 | - colStyle(obj){ | ||
| 276 | - if(obj.column.property == "id"){ | ||
| 277 | - return {background:"#f8f8f9"} | ||
| 278 | - } | ||
| 279 | - }, | ||
| 280 | - getObjId(a){ | ||
| 281 | - this.form.objectId = a.id; | ||
| 282 | - this.form.idNumber = a.identityNo; | ||
| 283 | - }, | ||
| 284 | - getList() { | ||
| 285 | - this.loading = true; | ||
| 286 | - if(this.queryParams.status==0){ | ||
| 287 | - listCredit(this.queryParams).then(response => { | ||
| 288 | - this.creditList = response.rows; | ||
| 289 | - this.total = response.total; | ||
| 290 | - this.loading = false; | ||
| 291 | - }); | ||
| 292 | - } | ||
| 293 | - if(this.queryParams.status==1){ | ||
| 294 | - historyCredit(this.queryParams).then(response => { | ||
| 295 | - this.creditList = response.rows; | ||
| 296 | - this.total = response.total; | ||
| 297 | - this.loading = false; | ||
| 298 | - }); | ||
| 299 | - } | ||
| 300 | - | ||
| 301 | - }, | ||
| 302 | - // 取消按钮 | ||
| 303 | - cancel() { | ||
| 304 | - this.open = false; | ||
| 305 | - this.isEdit = false; | ||
| 306 | - this.reset(); | ||
| 307 | - }, | ||
| 308 | - // 表单重置 | ||
| 309 | - reset() { | ||
| 310 | - this.form = { | ||
| 311 | - id: null, | ||
| 312 | - name: null, | ||
| 313 | - idNumber: null, | ||
| 314 | - time: null, | ||
| 315 | - reason: null, | ||
| 316 | - lostCredit: null, | ||
| 317 | - objectId: null, | ||
| 318 | - }; | ||
| 319 | - this.updateForm = {}; | ||
| 320 | - this.resetForm("form"); | ||
| 321 | - }, | ||
| 322 | - /** 搜索按钮操作 */ | ||
| 323 | - handleQuery() { | ||
| 324 | - this.queryParams.pageNum = 1; | ||
| 325 | - this.getList(); | ||
| 326 | - }, | ||
| 327 | - /** 重置按钮操作 */ | ||
| 328 | - resetQuery() { | ||
| 329 | - this.resetForm("queryForm"); | ||
| 330 | - console.log(this.queryParams); | ||
| 331 | - this.handleQuery(); | ||
| 332 | - }, | ||
| 333 | - // 多选框选中数据 | ||
| 334 | - handleSelectionChange(selection) { | ||
| 335 | - this.ids = selection.map(item => item.id) | ||
| 336 | - this.single = selection.length !== 1 | ||
| 337 | - this.multiple = !selection.length | ||
| 338 | - }, | ||
| 339 | - /** 新增按钮操作 */ | ||
| 340 | - handleAdd() { | ||
| 341 | - this.reset(); | ||
| 342 | - this.open = true; | ||
| 343 | - this.title = "添加驾驶员"; | ||
| 344 | - }, | ||
| 345 | - /** 修改按钮操作 */ | ||
| 346 | - handleUpdate(row) { | ||
| 347 | - this.reset(); | ||
| 348 | - const id = row.id || this.ids | ||
| 349 | - getCredit(id).then(response => { | ||
| 350 | - this.form = response.data; | ||
| 351 | - this.isEdit = true; | ||
| 352 | - }); | ||
| 353 | - }, | ||
| 354 | - /** 提交按钮 */ | ||
| 355 | - submitForm() { | ||
| 356 | - if(this.open){ | ||
| 357 | - this.updateForm.reason = "1"; | ||
| 358 | - } | ||
| 359 | - this.$refs["form"].validate(valid => { | ||
| 360 | - if (valid) { | ||
| 361 | - | ||
| 362 | - this.loading = true; | ||
| 363 | - if (this.form.id != null) { | ||
| 364 | - this.updateForm.id = this.form.id; | ||
| 365 | - updateCredit(this.updateForm).then(response => { | ||
| 366 | - this.msgSuccess("撤销成功"); | ||
| 367 | - this.isEdit = false; | ||
| 368 | - this.init(); | ||
| 369 | - }); | ||
| 370 | - } else { | ||
| 371 | - this.form.lostCredit = 1; | ||
| 372 | - addCredit(this.form).then(response => { | ||
| 373 | - this.msgSuccess("新增成功"); | ||
| 374 | - this.open = false; | ||
| 375 | - this.init(); | ||
| 376 | - }); | ||
| 377 | - } | ||
| 378 | - } | ||
| 379 | - }); | ||
| 380 | - }, | ||
| 381 | - handleExport() { | ||
| 382 | - const queryParams = this.queryParams; | ||
| 383 | - this.$confirm('是否确认导出所有驾驶员数据项?', "警告", { | ||
| 384 | - confirmButtonText: "确定", | ||
| 385 | - cancelButtonText: "取消", | ||
| 386 | - type: "warning" | ||
| 387 | - }).then(function() { | ||
| 388 | - return exportCredit(queryParams); | ||
| 389 | - }).then(response => { | ||
| 390 | - this.download(response.message); | ||
| 391 | - }) | ||
| 392 | - } | ||
| 393 | - } | ||
| 394 | -}; | ||
| 395 | -</script> | 145 | +<script src="../../../api/driver_credit.js" /> |
trash-ui/src/views/business/EarthSitesCredit/index.vue
| @@ -158,263 +158,4 @@ | @@ -158,263 +158,4 @@ | ||
| 158 | </div> | 158 | </div> |
| 159 | </template> | 159 | </template> |
| 160 | 160 | ||
| 161 | -<script> | ||
| 162 | -import { | ||
| 163 | - listCredit, | ||
| 164 | - getCredit, | ||
| 165 | - delCredit, | ||
| 166 | - addCredit, | ||
| 167 | - updateCredit, | ||
| 168 | - exportCredit, | ||
| 169 | - getNames, | ||
| 170 | - getTypes, | ||
| 171 | - getPlaces, | ||
| 172 | - historyCredit | ||
| 173 | -} from "@/api/business/earthsites"; | ||
| 174 | - | ||
| 175 | -import { | ||
| 176 | - earthsitesList, | ||
| 177 | - updateEarthsites | ||
| 178 | -} from "@/api/dict"; | ||
| 179 | - | ||
| 180 | -import requestRemote from '@/utils/requestRemote' | ||
| 181 | - | ||
| 182 | -export default { | ||
| 183 | - name: "EarthSitesCredit", | ||
| 184 | - data() { | ||
| 185 | - return { | ||
| 186 | - // 遮罩层 | ||
| 187 | - loading: true, | ||
| 188 | - // 选中数组 | ||
| 189 | - ids: [], | ||
| 190 | - // 非单个禁用 | ||
| 191 | - single: true, | ||
| 192 | - // 非多个禁用 | ||
| 193 | - multiple: true, | ||
| 194 | - // 显示搜索条件 | ||
| 195 | - showSearch: true, | ||
| 196 | - infoDialog :false, | ||
| 197 | - // 总条数 | ||
| 198 | - total: 0, | ||
| 199 | - // 工地表格数据 | ||
| 200 | - creditList: [], | ||
| 201 | - creditListInfo: [], | ||
| 202 | - earthsitesList:[], | ||
| 203 | - dictNames:[], | ||
| 204 | - dictTypes:[], | ||
| 205 | - dictPlaces:[], | ||
| 206 | - names:[], | ||
| 207 | - // 弹出层标题 | ||
| 208 | - title: "", | ||
| 209 | - // 是否显示弹出层 | ||
| 210 | - open: false, | ||
| 211 | - isEdit:false, | ||
| 212 | - // 查询参数 | ||
| 213 | - queryParams: { | ||
| 214 | - pageNum: 1, | ||
| 215 | - pageSize: 10, | ||
| 216 | - name: null, | ||
| 217 | - type: null, | ||
| 218 | - time: null, | ||
| 219 | - place: null, | ||
| 220 | - reason: null, | ||
| 221 | - status: 0, | ||
| 222 | - lostCredit: 1 | ||
| 223 | - }, | ||
| 224 | - // 表单参数 | ||
| 225 | - form: {}, | ||
| 226 | - updateForm:{}, | ||
| 227 | - // 表单校验 | ||
| 228 | - rules: {name: [ | ||
| 229 | - { required: true, message: '请选择消纳场', trigger: 'change' }, | ||
| 230 | - ],reason: [ | ||
| 231 | - { required: true, message: '请填写原因', trigger: 'change' }, | ||
| 232 | - ]} | ||
| 233 | - }; | ||
| 234 | - }, | ||
| 235 | - created() { | ||
| 236 | - this.init(); | ||
| 237 | - }, | ||
| 238 | - methods: { | ||
| 239 | - init(){ | ||
| 240 | - this.resetQuery(); | ||
| 241 | - this.reset(); | ||
| 242 | - this.getList(); | ||
| 243 | - this.getNamesData(); | ||
| 244 | - this.getTypesData(); | ||
| 245 | - this.getPlacesData(); | ||
| 246 | - | ||
| 247 | - let query = { | ||
| 248 | - 'page': 1, | ||
| 249 | - 'size': 9999, | ||
| 250 | - 'creditStatus': 0 | ||
| 251 | - }; | ||
| 252 | - earthsitesList(query).then(response => { | ||
| 253 | - this.earthsitesList = response.result.list | ||
| 254 | - }); | ||
| 255 | - }, | ||
| 256 | - getDataInfo(row){ | ||
| 257 | - let param ={"objectId":row.objectId} | ||
| 258 | - listCredit(param).then(response => { | ||
| 259 | - this.creditListInfo = response.rows; | ||
| 260 | - this.infoDialog = true; | ||
| 261 | - }); | ||
| 262 | - | ||
| 263 | - }, | ||
| 264 | - getNamesData(){ | ||
| 265 | - getNames(this.queryParams).then(response => { | ||
| 266 | - this.dictNames = response; | ||
| 267 | - }); | ||
| 268 | - }, | ||
| 269 | - getTypesData() { | ||
| 270 | - getTypes(this.queryParams).then(response => { | ||
| 271 | - this.dictTypes = response; | ||
| 272 | - }); | ||
| 273 | - }, | ||
| 274 | - getPlacesData() { | ||
| 275 | - getPlaces(this.queryParams).then(response => { | ||
| 276 | - this.dictPlaces = response; | ||
| 277 | - }); | ||
| 278 | - }, | ||
| 279 | - getData(stauts){ | ||
| 280 | - this.queryParams.status=0; | ||
| 281 | - this.queryParams.lostCredit=stauts; | ||
| 282 | - this.init(); | ||
| 283 | - }, | ||
| 284 | - getHistoryData(){ | ||
| 285 | - this.queryParams.status=1; | ||
| 286 | - this.init(); | ||
| 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 | - this.form.type = a.typeName; | ||
| 297 | - }, | ||
| 298 | - getList() { | ||
| 299 | - this.loading = true; | ||
| 300 | - if(this.queryParams.status==0){ | ||
| 301 | - listCredit(this.queryParams).then(response => { | ||
| 302 | - this.creditList = response.rows; | ||
| 303 | - this.total = response.total; | ||
| 304 | - this.loading = false; | ||
| 305 | - }); | ||
| 306 | - } | ||
| 307 | - if(this.queryParams.status==1){ | ||
| 308 | - historyCredit(this.queryParams).then(response => { | ||
| 309 | - this.creditList = response.rows; | ||
| 310 | - this.total = response.total; | ||
| 311 | - this.loading = false; | ||
| 312 | - }); | ||
| 313 | - } | ||
| 314 | - | ||
| 315 | - }, | ||
| 316 | - // 取消按钮 | ||
| 317 | - cancel() { | ||
| 318 | - this.open = false; | ||
| 319 | - this.isEdit = false; | ||
| 320 | - this.reset(); | ||
| 321 | - }, | ||
| 322 | - // 表单重置 | ||
| 323 | - reset() { | ||
| 324 | - this.form = { | ||
| 325 | - id: null, | ||
| 326 | - name: null, | ||
| 327 | - type: null, | ||
| 328 | - time: null, | ||
| 329 | - place: null, | ||
| 330 | - reason: null, | ||
| 331 | - lostCredit: null, | ||
| 332 | - objectId: null, | ||
| 333 | - }; | ||
| 334 | - this.updateForm = {}; | ||
| 335 | - this.resetForm("form"); | ||
| 336 | - }, | ||
| 337 | - /** 搜索按钮操作 */ | ||
| 338 | - handleQuery() { | ||
| 339 | - this.queryParams.pageNum = 1; | ||
| 340 | - this.getList(); | ||
| 341 | - }, | ||
| 342 | - /** 重置按钮操作 */ | ||
| 343 | - resetQuery() { | ||
| 344 | - this.resetForm("queryForm"); | ||
| 345 | - console.log(this.queryParams); | ||
| 346 | - this.handleQuery(); | ||
| 347 | - }, | ||
| 348 | - // 多选框选中数据 | ||
| 349 | - handleSelectionChange(selection) { | ||
| 350 | - this.ids = selection.map(item => item.id) | ||
| 351 | - this.single = selection.length !== 1 | ||
| 352 | - this.multiple = !selection.length | ||
| 353 | - }, | ||
| 354 | - /** 新增按钮操作 */ | ||
| 355 | - handleAdd() { | ||
| 356 | - this.reset(); | ||
| 357 | - this.open = true; | ||
| 358 | - this.title = "添加消纳场"; | ||
| 359 | - }, | ||
| 360 | - /** 修改按钮操作 */ | ||
| 361 | - handleUpdate(row) { | ||
| 362 | - this.reset(); | ||
| 363 | - const id = row.id || this.ids | ||
| 364 | - getCredit(id).then(response => { | ||
| 365 | - this.form = response.data; | ||
| 366 | - this.isEdit = true; | ||
| 367 | - }); | ||
| 368 | - }, | ||
| 369 | - /** 提交按钮 */ | ||
| 370 | - submitForm() { | ||
| 371 | - if(this.open){ | ||
| 372 | - this.updateForm.reason = "1"; | ||
| 373 | - } | ||
| 374 | - | ||
| 375 | - this.$refs["form"].validate(valid => { | ||
| 376 | - if (valid) { | ||
| 377 | - this.loading = true; | ||
| 378 | - if (this.form.id != null) { | ||
| 379 | - this.form.lostCredit = 0; | ||
| 380 | - let data = [{creditStatus:this.form.lostCredit,objectId:this.form.objectId}]; | ||
| 381 | - updateEarthsites(data).then(res=>{ | ||
| 382 | - this.updateForm.id = this.form.id; | ||
| 383 | - updateCredit(this.updateForm).then(response => { | ||
| 384 | - this.msgSuccess("撤销成功"); | ||
| 385 | - this.isEdit = false; | ||
| 386 | - | ||
| 387 | - this.init(); | ||
| 388 | - }); | ||
| 389 | - }); | ||
| 390 | - } else { | ||
| 391 | - this.form.lostCredit = 1; | ||
| 392 | - let data = [{creditStatus:this.form.lostCredit,objectId:this.form.objectId}]; | ||
| 393 | - updateEarthsites(data).then(res=>{ | ||
| 394 | - addCredit(this.form).then(response => { | ||
| 395 | - this.msgSuccess("新增成功"); | ||
| 396 | - this.open = false; | ||
| 397 | - | ||
| 398 | - this.init(); | ||
| 399 | - }); | ||
| 400 | - }); | ||
| 401 | - | ||
| 402 | - } | ||
| 403 | - } | ||
| 404 | - }); | ||
| 405 | - }, | ||
| 406 | - handleExport() { | ||
| 407 | - const queryParams = this.queryParams; | ||
| 408 | - this.$confirm('是否确认导出所有消纳场数据项?', "警告", { | ||
| 409 | - confirmButtonText: "确定", | ||
| 410 | - cancelButtonText: "取消", | ||
| 411 | - type: "warning" | ||
| 412 | - }).then(function() { | ||
| 413 | - return exportCredit(queryParams); | ||
| 414 | - }).then(response => { | ||
| 415 | - this.download(response.message); | ||
| 416 | - }) | ||
| 417 | - } | ||
| 418 | - } | ||
| 419 | -}; | ||
| 420 | -</script> | 161 | +<script src="../../../api/earthsites_credit.js" /> |
trash-ui/src/views/business/TruckCredit/index.vue
| @@ -145,288 +145,4 @@ | @@ -145,288 +145,4 @@ | ||
| 145 | </div> | 145 | </div> |
| 146 | </template> | 146 | </template> |
| 147 | 147 | ||
| 148 | -<script> | ||
| 149 | - import { | ||
| 150 | - listCredit, | ||
| 151 | - getCredit, | ||
| 152 | - delCredit, | ||
| 153 | - addCredit, | ||
| 154 | - updateCredit, | ||
| 155 | - exportCredit, | ||
| 156 | - getNames, | ||
| 157 | - getCompanys, | ||
| 158 | - historyCredit | ||
| 159 | - } from "@/api/business/truck"; | ||
| 160 | - | ||
| 161 | - | ||
| 162 | - import { | ||
| 163 | - companyList, | ||
| 164 | - truckList, | ||
| 165 | - updateTruck | ||
| 166 | - } from "@/api/dict"; | ||
| 167 | - | ||
| 168 | - export default { | ||
| 169 | - name: "Credit", | ||
| 170 | - data() { | ||
| 171 | - return { | ||
| 172 | - // 遮罩层 | ||
| 173 | - loading: true, | ||
| 174 | - // 选中数组 | ||
| 175 | - ids: [], | ||
| 176 | - // 非单个禁用 | ||
| 177 | - single: true, | ||
| 178 | - // 非多个禁用 | ||
| 179 | - multiple: true, | ||
| 180 | - // 显示搜索条件 | ||
| 181 | - showSearch: true, | ||
| 182 | - infoDialog: false, | ||
| 183 | - // 总条数 | ||
| 184 | - total: 0, | ||
| 185 | - // 工地表格数据 | ||
| 186 | - creditList: [], | ||
| 187 | - creditListInfo: [], | ||
| 188 | - dictNames: [], | ||
| 189 | - dictCompanys: [], | ||
| 190 | - companyList:[], | ||
| 191 | - truckList: [], | ||
| 192 | - // 弹出层标题 | ||
| 193 | - title: "", | ||
| 194 | - // 是否显示弹出层 | ||
| 195 | - open: false, | ||
| 196 | - isEdit: false, | ||
| 197 | - // 查询参数 | ||
| 198 | - queryParams: { | ||
| 199 | - pageNum: 1, | ||
| 200 | - pageSize: 10, | ||
| 201 | - companyId: null, | ||
| 202 | - licensePlate: null, | ||
| 203 | - time: null, | ||
| 204 | - reason: null, | ||
| 205 | - status: 0, | ||
| 206 | - lostCredit: 1 | ||
| 207 | - }, | ||
| 208 | - // 表单参数 | ||
| 209 | - form: {}, | ||
| 210 | - updateForm: {}, | ||
| 211 | - // 表单校验 | ||
| 212 | - rules: { | ||
| 213 | - companyId: [{ | ||
| 214 | - required: true, | ||
| 215 | - message: '请选择运输公司', | ||
| 216 | - trigger: 'change' | ||
| 217 | - }, ], | ||
| 218 | - reason: [{ | ||
| 219 | - required: true, | ||
| 220 | - message: '请填写原因', | ||
| 221 | - trigger: 'change' | ||
| 222 | - }, ], | ||
| 223 | - licensePlate: [{ | ||
| 224 | - required: true, | ||
| 225 | - message: '请选择车辆', | ||
| 226 | - trigger: 'change' | ||
| 227 | - }], | ||
| 228 | - }, | ||
| 229 | - rules2: { | ||
| 230 | - reason: [{ | ||
| 231 | - required: true, | ||
| 232 | - message: '请填写原因', | ||
| 233 | - trigger: 'change' | ||
| 234 | - }, ], | ||
| 235 | - } | ||
| 236 | - }; | ||
| 237 | - }, | ||
| 238 | - created() { | ||
| 239 | - this.init(); | ||
| 240 | - }, | ||
| 241 | - methods: { | ||
| 242 | - | ||
| 243 | - init() { | ||
| 244 | - this.resetQuery(); | ||
| 245 | - this.getList(); | ||
| 246 | - getNames(this.queryParams).then(response => { | ||
| 247 | - this.dictNames = response; | ||
| 248 | - }); | ||
| 249 | - | ||
| 250 | - getCompanys(this.queryParams).then(response => { | ||
| 251 | - this.dictCompanys = response; | ||
| 252 | - }); | ||
| 253 | - | ||
| 254 | - let query = { | ||
| 255 | - 'page':1, | ||
| 256 | - 'size':9999, | ||
| 257 | - 'dishonestState':0 | ||
| 258 | - } | ||
| 259 | - companyList(query).then(response => { | ||
| 260 | - | ||
| 261 | - let companys = response.result.list; | ||
| 262 | - this.companyList = companys; | ||
| 263 | - let ids = []; | ||
| 264 | - | ||
| 265 | - for(let i = 0 ;i<companys.length;i++){ | ||
| 266 | - ids.push(companys[i].id); | ||
| 267 | - } | ||
| 268 | - query.companyID = ids + ""; | ||
| 269 | - query.valid = 0; | ||
| 270 | - | ||
| 271 | - truckList(query).then(res=>{ | ||
| 272 | - this.truckList = res.result.list; | ||
| 273 | - }); | ||
| 274 | - | ||
| 275 | - }); | ||
| 276 | - | ||
| 277 | - | ||
| 278 | - }, | ||
| 279 | - getDataInfo(row) { | ||
| 280 | - console.log(row); | ||
| 281 | - | ||
| 282 | - let param = { | ||
| 283 | - "objectId": row.objectId | ||
| 284 | - } | ||
| 285 | - | ||
| 286 | - listCredit(param).then(response => { | ||
| 287 | - this.creditListInfo = response.rows; | ||
| 288 | - this.infoDialog = true; | ||
| 289 | - }); | ||
| 290 | - | ||
| 291 | - }, | ||
| 292 | - getData(stauts) { | ||
| 293 | - this.queryParams.status = 0; | ||
| 294 | - this.queryParams.lostCredit = stauts; | ||
| 295 | - this.init(); | ||
| 296 | - }, | ||
| 297 | - getHistoryData() { | ||
| 298 | - this.queryParams.status = 1; | ||
| 299 | - this.init(); | ||
| 300 | - }, | ||
| 301 | - colStyle(obj) { | ||
| 302 | - if (obj.column.property == "id") { | ||
| 303 | - return { | ||
| 304 | - background: "#f8f8f9" | ||
| 305 | - } | ||
| 306 | - } | ||
| 307 | - }, | ||
| 308 | - getObjId(a) { | ||
| 309 | - this.form.companyId = a.companyName; | ||
| 310 | - this.form.objectId = a.id; | ||
| 311 | - }, | ||
| 312 | - getList() { | ||
| 313 | - this.loading = true; | ||
| 314 | - if (this.queryParams.status == 0) { | ||
| 315 | - listCredit(this.queryParams).then(response => { | ||
| 316 | - this.creditList = response.rows; | ||
| 317 | - this.total = response.total; | ||
| 318 | - this.loading = false; | ||
| 319 | - }); | ||
| 320 | - } | ||
| 321 | - if (this.queryParams.status == 1) { | ||
| 322 | - historyCredit(this.queryParams).then(response => { | ||
| 323 | - this.creditList = response.rows; | ||
| 324 | - this.total = response.total; | ||
| 325 | - this.loading = false; | ||
| 326 | - }); | ||
| 327 | - } | ||
| 328 | - | ||
| 329 | - }, | ||
| 330 | - // 取消按钮 | ||
| 331 | - cancel() { | ||
| 332 | - this.open = false; | ||
| 333 | - this.isEdit = false; | ||
| 334 | - this.reset(); | ||
| 335 | - }, | ||
| 336 | - // 表单重置 | ||
| 337 | - reset() { | ||
| 338 | - this.form = { | ||
| 339 | - id: null, | ||
| 340 | - companyId: null, | ||
| 341 | - licensePlate: null, | ||
| 342 | - time: null, | ||
| 343 | - reason: null, | ||
| 344 | - status: null, | ||
| 345 | - lostCredit: null | ||
| 346 | - }; | ||
| 347 | - this.resetForm("form"); | ||
| 348 | - }, | ||
| 349 | - /** 搜索按钮操作 */ | ||
| 350 | - handleQuery() { | ||
| 351 | - this.queryParams.pageNum = 1; | ||
| 352 | - this.getList(); | ||
| 353 | - }, | ||
| 354 | - /** 重置按钮操作 */ | ||
| 355 | - resetQuery() { | ||
| 356 | - this.resetForm("queryForm"); | ||
| 357 | - console.log(this.queryParams); | ||
| 358 | - this.handleQuery(); | ||
| 359 | - }, | ||
| 360 | - // 多选框选中数据 | ||
| 361 | - handleSelectionChange(selection) { | ||
| 362 | - this.ids = selection.map(item => item.id) | ||
| 363 | - this.single = selection.length !== 1 | ||
| 364 | - this.multiple = !selection.length | ||
| 365 | - }, | ||
| 366 | - /** 新增按钮操作 */ | ||
| 367 | - handleAdd() { | ||
| 368 | - this.reset(); | ||
| 369 | - this.open = true; | ||
| 370 | - this.title = "车辆失信录入"; | ||
| 371 | - }, | ||
| 372 | - /** 修改按钮操作 */ | ||
| 373 | - handleUpdate(row) { | ||
| 374 | - this.reset(); | ||
| 375 | - const id = row.id || this.ids | ||
| 376 | - getCredit(id).then(response => { | ||
| 377 | - this.form = response.data; | ||
| 378 | - this.isEdit = true; | ||
| 379 | - }); | ||
| 380 | - }, | ||
| 381 | - /** 提交按钮 */ | ||
| 382 | - submitForm() { | ||
| 383 | - if(this.isEdit){ | ||
| 384 | - this.$refs["updateForm"].validate(valid => { | ||
| 385 | - if (valid) { | ||
| 386 | - this.loading = true; | ||
| 387 | - this.form.lostCredit = 0; | ||
| 388 | - this.updateForm.id = this.form.id; | ||
| 389 | - let data = [{creditStatus:this.form.lostCredit,id:this.form.objectId}]; | ||
| 390 | - updateTruck(data).then(res=>{ | ||
| 391 | - updateCredit(this.updateForm).then(response => { | ||
| 392 | - this.msgSuccess("撤销成功"); | ||
| 393 | - this.isEdit = false; | ||
| 394 | - this.updateForm = {}; | ||
| 395 | - this.init(); | ||
| 396 | - }); | ||
| 397 | - }); | ||
| 398 | - } | ||
| 399 | - }); | ||
| 400 | - }else{ | ||
| 401 | - this.$refs["form"].validate(valid => { | ||
| 402 | - if (valid) { | ||
| 403 | - this.loading = true; | ||
| 404 | - this.form.lostCredit = 1; | ||
| 405 | - this.form.createType = 0; | ||
| 406 | - let data = [{creditStatus:this.form.lostCredit,id:this.form.objectId}]; | ||
| 407 | - updateTruck(data).then(res=>{ | ||
| 408 | - addCredit(this.form).then(response => { | ||
| 409 | - this.msgSuccess("新增成功"); | ||
| 410 | - this.open = false; | ||
| 411 | - this.init(); | ||
| 412 | - }); | ||
| 413 | - }); | ||
| 414 | - } | ||
| 415 | - }); | ||
| 416 | - } | ||
| 417 | - }, | ||
| 418 | - handleExport() { | ||
| 419 | - const queryParams = this.queryParams; | ||
| 420 | - this.$confirm('是否确认导出所有车辆数据项?', "警告", { | ||
| 421 | - confirmButtonText: "确定", | ||
| 422 | - cancelButtonText: "取消", | ||
| 423 | - type: "warning" | ||
| 424 | - }).then(function() { | ||
| 425 | - return exportCredit(queryParams); | ||
| 426 | - }).then(response => { | ||
| 427 | - this.download(response.message); | ||
| 428 | - }) | ||
| 429 | - } | ||
| 430 | - } | ||
| 431 | - }; | ||
| 432 | -</script> | 148 | +<script src="../../../api/truck_credit.js" /> |
trash-ui/src/views/business/dayWorkReport/index.vue
| @@ -89,453 +89,4 @@ | @@ -89,453 +89,4 @@ | ||
| 89 | 89 | ||
| 90 | </template> | 90 | </template> |
| 91 | 91 | ||
| 92 | -<script> | ||
| 93 | - import { | ||
| 94 | - dayWorkList, | ||
| 95 | - exportDayWorkList, | ||
| 96 | - exportDayWorkHistoryList | ||
| 97 | - } from "@/api/business/daywork"; | ||
| 98 | - | ||
| 99 | - | ||
| 100 | - import { | ||
| 101 | - Upload | ||
| 102 | - } from "element-ui"; | ||
| 103 | - import { | ||
| 104 | - getToken | ||
| 105 | - } from "@/utils/auth"; | ||
| 106 | - | ||
| 107 | - import { | ||
| 108 | - earthsitesList, | ||
| 109 | - constructionsitesList, | ||
| 110 | - getDict, | ||
| 111 | - getArea | ||
| 112 | - } from "@/api/dict"; | ||
| 113 | - | ||
| 114 | - export default { | ||
| 115 | - name: "dayWorkReport", | ||
| 116 | - data() { | ||
| 117 | - return { | ||
| 118 | - // 遮罩层 | ||
| 119 | - loading: true, | ||
| 120 | - | ||
| 121 | - reUpdate : false, | ||
| 122 | - | ||
| 123 | - info: false, | ||
| 124 | - | ||
| 125 | - infoData: null, | ||
| 126 | - businessKey:null, | ||
| 127 | - picSample: false, | ||
| 128 | - uploadImageDialog: false, | ||
| 129 | - // 选中数组 | ||
| 130 | - ids: [], | ||
| 131 | - // 非单个禁用 | ||
| 132 | - single: true, | ||
| 133 | - // 非多个禁用 | ||
| 134 | - multiple: true, | ||
| 135 | - // 显示搜索条件 | ||
| 136 | - showSearch: true, | ||
| 137 | - // 总条数 | ||
| 138 | - total: 0, | ||
| 139 | - // 开工报表表格数据 | ||
| 140 | - threestepList: [], | ||
| 141 | - fileList: [], | ||
| 142 | - // 弹出层标题 | ||
| 143 | - title: "", | ||
| 144 | - // 是否显示弹出层 | ||
| 145 | - open: false, | ||
| 146 | - // 查询参数 | ||
| 147 | - queryParams: { | ||
| 148 | - pageNum: 1, | ||
| 149 | - pageSize: 10, | ||
| 150 | - workStartTime:null, | ||
| 151 | - workEndTime:null, | ||
| 152 | - name:null, | ||
| 153 | - earthsitesName:null, | ||
| 154 | - place:null, | ||
| 155 | - subReason:null, | ||
| 156 | - }, | ||
| 157 | - // 表单参数 | ||
| 158 | - form: { | ||
| 159 | - }, | ||
| 160 | - picIndex: null, | ||
| 161 | - // 表单校验 | ||
| 162 | - rules: { | ||
| 163 | - }, | ||
| 164 | - SiteWorkAreaCodeType: [], | ||
| 165 | - remoteData: [{name:"a",id:"id"}], | ||
| 166 | - remoteQueryData: { | ||
| 167 | - "page": 1, | ||
| 168 | - "size": 9999 | ||
| 169 | - }, | ||
| 170 | - areas: [{ | ||
| 171 | - code:"a", | ||
| 172 | - name:"A"} | ||
| 173 | - ], | ||
| 174 | - constructionsitesList:[], | ||
| 175 | - earthsitesList:[], | ||
| 176 | - areaCode: null, | ||
| 177 | - bindData: [{name:"a",id:"id"}], | ||
| 178 | - bindname:null, | ||
| 179 | - projectTypes:null, | ||
| 180 | - earthsitesTypes:null, | ||
| 181 | - dayWorkCount:null, | ||
| 182 | - outside:["长沙县","望城区","浏阳市","宁乡市","株洲市","湘潭市","汩罗市","湘阴县"], | ||
| 183 | - }; | ||
| 184 | - }, | ||
| 185 | - created() { | ||
| 186 | - this.getList(0); | ||
| 187 | - getDict({type:"CSConsSiteProjectType"}).then(res=>{ | ||
| 188 | - this.projectTypes = res.result; | ||
| 189 | - }); | ||
| 190 | - | ||
| 191 | - getDict({type:"CSDisSiteType"}).then(res=>{ | ||
| 192 | - this.earthsitesTypes = res.result; | ||
| 193 | - }); | ||
| 194 | - }, | ||
| 195 | - methods: { | ||
| 196 | - areaClear() { | ||
| 197 | - this.areaCode = null; | ||
| 198 | - }, | ||
| 199 | - selectArea(a) { | ||
| 200 | - this.areaCode = a; | ||
| 201 | - }, | ||
| 202 | - getObjId(item) { | ||
| 203 | - if (this.form.type == 0) { | ||
| 204 | - this.form.objectId = item.id; | ||
| 205 | - this.form.place = Number(item.areaCode); | ||
| 206 | - } else { | ||
| 207 | - this.form.earthsitesId = item.id; | ||
| 208 | - this.form.place = Number(item.areaCode); | ||
| 209 | - } | ||
| 210 | - }, | ||
| 211 | - getEarthsiteId(item) { | ||
| 212 | - if (this.form.type == 0) { | ||
| 213 | - this.form.objectId = item.id; | ||
| 214 | - } else { | ||
| 215 | - this.form.earthsitesId = item.id; | ||
| 216 | - } | ||
| 217 | - }, | ||
| 218 | - handleClose() { | ||
| 219 | - this.uploadImageDialog = false; | ||
| 220 | - this.fileList = []; | ||
| 221 | - }, | ||
| 222 | - /** 查询开工报表列表 */ | ||
| 223 | - getList(tabIdx) { | ||
| 224 | - | ||
| 225 | - this.loading = true; | ||
| 226 | - | ||
| 227 | - // let query = this.queryParams; | ||
| 228 | - | ||
| 229 | - if(tabIdx == 1){ | ||
| 230 | - this.resetQuery(); | ||
| 231 | - this.queryParams.his = tabIdx; | ||
| 232 | - }else if(tabIdx==0){ | ||
| 233 | - this.resetQuery(); | ||
| 234 | - this.queryParams.his = tabIdx; | ||
| 235 | - } | ||
| 236 | - | ||
| 237 | - dayWorkList(this.queryParams).then(response => { | ||
| 238 | - | ||
| 239 | - this.threestepList = response.rows; | ||
| 240 | - | ||
| 241 | - getArea().then(res => { | ||
| 242 | - this.areas = res.result; | ||
| 243 | - for(let i =0;i< this.threestepList.length;i++){ | ||
| 244 | - this.threestepList[i].place = this.getAreaName(this.threestepList[i].place); | ||
| 245 | - if(this.outside.indexOf(this.threestepList[i].place) > -1){ | ||
| 246 | - if(this.threestepList[i].status == "开工"){ | ||
| 247 | - this.threestepList[i].estatus = "开工"; | ||
| 248 | - this.threestepList[i].eselfCheckTime = this.threestepList[i].selfCheckTime; | ||
| 249 | - this.threestepList[i].descript = "开工"; | ||
| 250 | - } | ||
| 251 | - } | ||
| 252 | - } | ||
| 253 | - }); | ||
| 254 | - | ||
| 255 | - constructionsitesList(this.remoteQueryData).then(res => { | ||
| 256 | - this.constructionsitesList = res.result.list; | ||
| 257 | - | ||
| 258 | - let count = 0; | ||
| 259 | - let count1 = 0; | ||
| 260 | - | ||
| 261 | - for(let i =0;i< this.threestepList.length;i++){ | ||
| 262 | - | ||
| 263 | - if(this.threestepList[i].status == "开工"){ | ||
| 264 | - count += 1; | ||
| 265 | - } | ||
| 266 | - if(this.threestepList[i].estatus == "开工"){ | ||
| 267 | - count1 += 1; | ||
| 268 | - } | ||
| 269 | - for(let j =0;j<this.constructionsitesList.length;j++){ | ||
| 270 | - if(this.threestepList[i].objectId == this.constructionsitesList[j].id){ | ||
| 271 | - for(let x in this.projectTypes){ | ||
| 272 | - if(this.projectTypes[x].code == this.constructionsitesList[j].projectType){ | ||
| 273 | - this.threestepList[i].type = this.projectTypes[x].name; | ||
| 274 | - } | ||
| 275 | - } | ||
| 276 | - } | ||
| 277 | - } | ||
| 278 | - } | ||
| 279 | - | ||
| 280 | - let str = "今日"; | ||
| 281 | - if(this.queryParams.his){ | ||
| 282 | - str = ""; | ||
| 283 | - } | ||
| 284 | - | ||
| 285 | - let area = "长沙市"; | ||
| 286 | - let area1 = "长沙市"; | ||
| 287 | - | ||
| 288 | - if(this.queryParams.place){ | ||
| 289 | - area = this.getAreaName(this.queryParams.place) | ||
| 290 | - } | ||
| 291 | - | ||
| 292 | - | ||
| 293 | - if(this.queryParams.subReason){ | ||
| 294 | - area1 = this.getAreaName(this.queryParams.subReason) | ||
| 295 | - } | ||
| 296 | - | ||
| 297 | - | ||
| 298 | - this.dayWorkCount = str + area +"工地开工数量:" + count + " " + str + area1 +"消纳场开工数量:" + count1; | ||
| 299 | - this.loading = false; | ||
| 300 | - }); | ||
| 301 | - | ||
| 302 | - earthsitesList(this.remoteQueryData).then(res => { | ||
| 303 | - this.earthsitesList = res.result.list; | ||
| 304 | - for(let i =0;i< this.threestepList.length;i++){ | ||
| 305 | - for(let j =0;j<this.earthsitesList.length;j++){ | ||
| 306 | - if(this.threestepList[i].eid == this.earthsitesList[j].id){ | ||
| 307 | - this.threestepList[i].etype = this.earthsitesList[j].typeName; | ||
| 308 | - this.threestepList[i].eplace = this.earthsitesList[j].areaName; | ||
| 309 | - } | ||
| 310 | - } | ||
| 311 | - } | ||
| 312 | - this.loading = false; | ||
| 313 | - }); | ||
| 314 | - | ||
| 315 | - this.total = response.total; | ||
| 316 | - }); | ||
| 317 | - | ||
| 318 | - | ||
| 319 | - }, | ||
| 320 | - // 取消按钮 | ||
| 321 | - cancel() { | ||
| 322 | - this.open = false; | ||
| 323 | - this.reset(); | ||
| 324 | - }, | ||
| 325 | - // 表单重置 | ||
| 326 | - reset() { | ||
| 327 | - this.form = { | ||
| 328 | - id: null, | ||
| 329 | - name: null, | ||
| 330 | - type: null, | ||
| 331 | - place: null, | ||
| 332 | - selfCheckTime: null, | ||
| 333 | - objectId: null, | ||
| 334 | - earthsitesId: null, | ||
| 335 | - createTime: null, | ||
| 336 | - checkTime: null, | ||
| 337 | - earthsitesName: null, | ||
| 338 | - contract: null, | ||
| 339 | - companys: null, | ||
| 340 | - companyTrucks: null, | ||
| 341 | - img0: null, | ||
| 342 | - img1: null, | ||
| 343 | - img2: null, | ||
| 344 | - img3: null, | ||
| 345 | - img4: null, | ||
| 346 | - img5: null, | ||
| 347 | - img6: null, | ||
| 348 | - img7: null, | ||
| 349 | - img8: null, | ||
| 350 | - img9: null, | ||
| 351 | - img10: null, | ||
| 352 | - img11: null, | ||
| 353 | - img12: null, | ||
| 354 | - person: null, | ||
| 355 | - phone: null | ||
| 356 | - }; | ||
| 357 | - this.resetForm("form"); | ||
| 358 | - }, | ||
| 359 | - /** 搜索按钮操作 */ | ||
| 360 | - handleQuery() { | ||
| 361 | - this.queryParams.pageNum = 1; | ||
| 362 | - this.getList(); | ||
| 363 | - }, | ||
| 364 | - /** 重置按钮操作 */ | ||
| 365 | - resetQuery() { | ||
| 366 | - this.queryParams.workEndTime = null; | ||
| 367 | - this.queryParams.workStartTime = null; | ||
| 368 | - this.queryParams.subReason = null; | ||
| 369 | - this.queryParams.place = null; | ||
| 370 | - this.queryParams.earthsitesName = null; | ||
| 371 | - this.queryParams.name = null; | ||
| 372 | - | ||
| 373 | - | ||
| 374 | - this.resetForm("queryForm"); | ||
| 375 | - this.handleQuery(); | ||
| 376 | - }, | ||
| 377 | - // 多选框选中数据 | ||
| 378 | - handleSelectionChange(selection) { | ||
| 379 | - this.ids = selection.map(item => item.id) | ||
| 380 | - this.single = selection.length !== 1 | ||
| 381 | - this.multiple = !selection.length | ||
| 382 | - }, | ||
| 383 | - /** 新增按钮操作 */ | ||
| 384 | - handleAdd() { | ||
| 385 | - this.reset(); | ||
| 386 | - this.open = true; | ||
| 387 | - this.title = "报工自查"; | ||
| 388 | - }, | ||
| 389 | - /** 修改按钮操作 */ | ||
| 390 | - handleUpdate(row) { | ||
| 391 | - this.reset(); | ||
| 392 | - this.businessKey = row.id +""; | ||
| 393 | - this.info = true; | ||
| 394 | - }, | ||
| 395 | - getAreaName(code){ | ||
| 396 | - for(let i =0;i<this.areas.length;i++){ | ||
| 397 | - if(Number(code) == this.areas[i].code){ | ||
| 398 | - return this.areas[i].name; | ||
| 399 | - break; | ||
| 400 | - } | ||
| 401 | - } | ||
| 402 | - return code; | ||
| 403 | - }, | ||
| 404 | - | ||
| 405 | - reSub(row){ | ||
| 406 | - this.reset(); | ||
| 407 | - | ||
| 408 | - this.open = true; | ||
| 409 | - this.title = "再次提交"; | ||
| 410 | - getThreestep(row.id).then(res=>{ | ||
| 411 | - this.form = res.data; | ||
| 412 | - this.form.type = this.form.type + ""; | ||
| 413 | - | ||
| 414 | - for (let i = 0; i < 13; i++) { | ||
| 415 | - if (this.form["img" + i]) { | ||
| 416 | - this.form["img" + i] = this.form["img" + i].split(","); | ||
| 417 | - } | ||
| 418 | - } | ||
| 419 | - | ||
| 420 | - | ||
| 421 | - this.form.status = 0; | ||
| 422 | - this.form.id = null; | ||
| 423 | - }); | ||
| 424 | - | ||
| 425 | - | ||
| 426 | - | ||
| 427 | - }, | ||
| 428 | - | ||
| 429 | - checkEndSuccess(){ | ||
| 430 | - this.form.checkEndTime = new Date(); | ||
| 431 | - this.form.id = this.businessKey; | ||
| 432 | - for (let i = 1; i < 4; i++) { | ||
| 433 | - if (this.form["attchItem" + i]) { | ||
| 434 | - this.form["attchItem" + i] = this.form["attchItem" + i] + ""; | ||
| 435 | - } | ||
| 436 | - } | ||
| 437 | - this.submitForm(); | ||
| 438 | - }, | ||
| 439 | - checkEndError(){ | ||
| 440 | - console.log(this.form, this.businessKey); | ||
| 441 | - //发起案卷 | ||
| 442 | - }, | ||
| 443 | - | ||
| 444 | - /** 提交按钮 */ | ||
| 445 | - submitForm() { | ||
| 446 | - this.$refs["form"].validate(valid => { | ||
| 447 | - if (valid) { | ||
| 448 | - if (this.form.id != null) { | ||
| 449 | - updateThreestep(this.form).then(response => { | ||
| 450 | - this.msgSuccess("修改成功"); | ||
| 451 | - this.open = false; | ||
| 452 | - this.open2 = false; | ||
| 453 | - this.getList(); | ||
| 454 | - }); | ||
| 455 | - } else { | ||
| 456 | - this.form.companys = this.form.companys + ""; | ||
| 457 | - this.form.companyTrucks = this.form.companyTrucks + ""; | ||
| 458 | - | ||
| 459 | - for (let i = 0; i < 13; i++) { | ||
| 460 | - if (this.form["img" + i]) { | ||
| 461 | - | ||
| 462 | - this.form["img" + i] = this.form["img" + i] + ""; | ||
| 463 | - } | ||
| 464 | - } | ||
| 465 | - addThreestep(this.form).then(response => { | ||
| 466 | - this.msgSuccess("新增成功"); | ||
| 467 | - this.open = false; | ||
| 468 | - this.open2 = false; | ||
| 469 | - this.getList(); | ||
| 470 | - }); | ||
| 471 | - } | ||
| 472 | - } | ||
| 473 | - }); | ||
| 474 | - }, | ||
| 475 | - /** 删除按钮操作 */ | ||
| 476 | - handleDelete(row) { | ||
| 477 | - const ids = row.id || this.ids; | ||
| 478 | - this.$confirm('是否确认删除开工报表编号为"' + ids + '"的数据项?', "警告", { | ||
| 479 | - confirmButtonText: "确定", | ||
| 480 | - cancelButtonText: "取消", | ||
| 481 | - type: "warning" | ||
| 482 | - }).then(function() { | ||
| 483 | - return delThreestep(ids); | ||
| 484 | - }).then(() => { | ||
| 485 | - this.getList(); | ||
| 486 | - this.msgSuccess("删除成功"); | ||
| 487 | - }) | ||
| 488 | - }, | ||
| 489 | - /** 导出按钮操作 */ | ||
| 490 | - handleExport() { | ||
| 491 | - | ||
| 492 | - let data = []; | ||
| 493 | - let index = 1; | ||
| 494 | - for(let i in this.threestepList){ | ||
| 495 | - | ||
| 496 | - | ||
| 497 | - let obj = { | ||
| 498 | - id:index, | ||
| 499 | - name:this.threestepList[i].name, | ||
| 500 | - createTime:this.threestepList[i].createTime, | ||
| 501 | - selfCheckTime:this.threestepList[i].selfCheckTime, | ||
| 502 | - place:this.threestepList[i].place, | ||
| 503 | - status:this.threestepList[i].status, | ||
| 504 | - ename:this.threestepList[i].ename, | ||
| 505 | - eplace:this.threestepList[i].eplace, | ||
| 506 | - estatus:this.threestepList[i].estatus, | ||
| 507 | - eselfCheckTime:this.threestepList[i].eselfCheckTime, | ||
| 508 | - descript:this.threestepList[i].descript, | ||
| 509 | - } | ||
| 510 | - | ||
| 511 | - data.push(obj); | ||
| 512 | - index += 1; | ||
| 513 | - | ||
| 514 | - } | ||
| 515 | - if(this.queryParams.his ==1){ | ||
| 516 | - this.$confirm('是否确认导出所有开工报表数据项?', "警告", { | ||
| 517 | - confirmButtonText: "确定", | ||
| 518 | - cancelButtonText: "取消", | ||
| 519 | - type: "warning" | ||
| 520 | - }).then(function() { | ||
| 521 | - return exportDayWorkHistoryList(data); | ||
| 522 | - }).then(response => { | ||
| 523 | - this.download(response.message); | ||
| 524 | - }) | ||
| 525 | - }else{ | ||
| 526 | - this.$confirm('是否确认导出所有开工报表数据项?', "警告", { | ||
| 527 | - confirmButtonText: "确定", | ||
| 528 | - cancelButtonText: "取消", | ||
| 529 | - type: "warning" | ||
| 530 | - }).then(function() { | ||
| 531 | - return exportDayWorkList(data); | ||
| 532 | - }).then(response => { | ||
| 533 | - this.download(response.message); | ||
| 534 | - }) | ||
| 535 | - } | ||
| 536 | - | ||
| 537 | - | ||
| 538 | - } | ||
| 539 | - } | ||
| 540 | - }; | ||
| 541 | -</script> | 92 | +<script src="../../../api/dayWorkReport.js" /> |
trash-ui/src/views/business/truckActivate/index.vue
| @@ -20,9 +20,7 @@ | @@ -20,9 +20,7 @@ | ||
| 20 | size="small" /> | 20 | size="small" /> |
| 21 | </el-form-item> | 21 | </el-form-item> |
| 22 | <el-form-item label="所属企业" prop="company"> | 22 | <el-form-item label="所属企业" prop="company"> |
| 23 | - <el-select v-model="form.projectName" :filterable="true" :remote-method="ConpanyNameLoadOptions" :loading="isLoading" placeholder="请输入项目名称" style="width: 100%;"> | ||
| 24 | - <el-option v-for="item in truckActivateList" :label="item.company" :value="item.company"></el-option> | ||
| 25 | - </el-select> | 23 | + <el-input v-model="queryParams.company" /> |
| 26 | </el-form-item> | 24 | </el-form-item> |
| 27 | <el-form-item label="激活状态" prop="activateStatus"> | 25 | <el-form-item label="激活状态" prop="activateStatus"> |
| 28 | <el-select v-model="queryParams.activateStatus" placeholder="请选择激活状态" size="small"> | 26 | <el-select v-model="queryParams.activateStatus" placeholder="请选择激活状态" size="small"> |
| @@ -100,13 +98,13 @@ | @@ -100,13 +98,13 @@ | ||
| 100 | </el-select> | 98 | </el-select> |
| 101 | </el-form-item> | 99 | </el-form-item> |
| 102 | <el-form-item label="所属企业" prop="company"> | 100 | <el-form-item label="所属企业" prop="company"> |
| 103 | - <el-select v-model="form.company" filterable reserve-keyword> | 101 | + <el-select v-model="form.company" filterable reserve-keyword @change="clearTruck"> |
| 104 | <el-option v-for="item in companyList" :label="item.name" :value="item.name" /> | 102 | <el-option v-for="item in companyList" :label="item.name" :value="item.name" /> |
| 105 | </el-select> | 103 | </el-select> |
| 106 | </el-form-item> | 104 | </el-form-item> |
| 107 | <el-form-item label="车牌号" prop="licensePlate"> | 105 | <el-form-item label="车牌号" prop="licensePlate"> |
| 108 | <el-select v-model="form.licensePlate" placeholder="请选择车辆" multiple filterable> | 106 | <el-select v-model="form.licensePlate" placeholder="请选择车辆" multiple filterable> |
| 109 | - <el-option v-if="!form.company || form.company.indexOf(item.id) == -1" | 107 | + <el-option v-if="!form.company || form.company == item.companyName" |
| 110 | v-for="item in truckList" | 108 | v-for="item in truckList" |
| 111 | :label="item.licenseplateNo" | 109 | :label="item.licenseplateNo" |
| 112 | :value="item.id"/> | 110 | :value="item.id"/> |
trash-ui/src/views/caseOffline/caseOffline/caseOfflineInfo.vue
| @@ -50,164 +50,6 @@ | @@ -50,164 +50,6 @@ | ||
| 50 | </el-form> | 50 | </el-form> |
| 51 | </template> | 51 | </template> |
| 52 | 52 | ||
| 53 | -<script> | ||
| 54 | -import { listCaseOffline, getCaseOffline,getAdviceList } from "@/api/caseOffline/caseOffline"; | ||
| 55 | - import { | ||
| 56 | - getArea, | ||
| 57 | - earthsitesList, | ||
| 58 | - constructionsitesList, | ||
| 59 | - getDict, | 53 | +<script src="../../../api/caseOfflineInfo"> |
| 60 | 54 | ||
| 61 | - } from "@/api/dict"; | ||
| 62 | - import { | ||
| 63 | - getThreestep, | ||
| 64 | - } from "@/api/business/threestep"; | ||
| 65 | - | ||
| 66 | - | ||
| 67 | - | ||
| 68 | - import { | ||
| 69 | - getToken | ||
| 70 | - } from "@/utils/auth"; | ||
| 71 | -export default { | ||
| 72 | - name: "CaseOffline", | ||
| 73 | - props: { | ||
| 74 | - businessKey: { | ||
| 75 | - type: String | ||
| 76 | - } | ||
| 77 | - }, | ||
| 78 | - data() { | ||
| 79 | - return { | ||
| 80 | - // 遮罩层 | ||
| 81 | - loading: true, | ||
| 82 | - // 选中数组 | ||
| 83 | - ids: [], | ||
| 84 | - // 非单个禁用 | ||
| 85 | - single: true, | ||
| 86 | - // 非多个禁用 | ||
| 87 | - multiple: true, | ||
| 88 | - // 显示搜索条件 | ||
| 89 | - showSearch: true, | ||
| 90 | - // 总条数 | ||
| 91 | - total: 0, | ||
| 92 | - // 线下交办案卷表格数据 | ||
| 93 | - caseOfflineList: [], | ||
| 94 | - // 弹出层标题 | ||
| 95 | - title: "", | ||
| 96 | - // 是否显示弹出层 | ||
| 97 | - open: false, | ||
| 98 | - open2:false, | ||
| 99 | - // 查询参数 | ||
| 100 | - queryParams: { | ||
| 101 | - pageNum: 1, | ||
| 102 | - pageSize: 10, | ||
| 103 | - type: null, | ||
| 104 | - place: null, | ||
| 105 | - createTime: null, | ||
| 106 | - }, | ||
| 107 | - uploadImageDialog:false, | ||
| 108 | - // 表单参数 | ||
| 109 | - form: {}, | ||
| 110 | - // 表单校验 | ||
| 111 | - rules: { | ||
| 112 | - }, | ||
| 113 | - caseType:[ | ||
| 114 | - {code:1,name:"渣土处置工地(含消纳场)的渣土运输车辆出场车身不洁,车轮带泥"}, | ||
| 115 | - {code:2,name:"未洗车出场或者出场清洁不彻底"}, | ||
| 116 | - {code:3,name:"渣土运输车辆货箱顶盖未按规定关闭到位或未按规定和标准装载渣土出场"}, | ||
| 117 | - {code:4,name:"非核准车辆进入渣土处置工地运输渣土"}, | ||
| 118 | - {code:5,name:"渣土处置工地未按规定时间开停工"}, | ||
| 119 | - {code:6,name:"渣土处置工地洗车设施等破损、未正常使用及措施不到位的"}, | ||
| 120 | - {code:7,name:"渣土处置工地、消纳场(含回填场)出入口两侧50米范围内出现渣土污染、污水外排等现象"} | ||
| 121 | - ], | ||
| 122 | - areas:null, | ||
| 123 | - fileList:[], | ||
| 124 | - areas: [], | ||
| 125 | - upload: { | ||
| 126 | - // 是否显示弹出层(用户导入) | ||
| 127 | - open: false, | ||
| 128 | - // 弹出层标题(用户导入) | ||
| 129 | - title: "", | ||
| 130 | - // 是否禁用上传 | ||
| 131 | - isUploading: false, | ||
| 132 | - // 设置上传的请求头部 | ||
| 133 | - headers: { | ||
| 134 | - Authorization: "Bearer " + getToken() | ||
| 135 | - }, | ||
| 136 | - // 上传的地址 | ||
| 137 | - url: process.env.VUE_APP_BASE_API + "/business/threestep/upload", | ||
| 138 | - | ||
| 139 | - }, | ||
| 140 | - workflow:"workflow_caseoffline", | ||
| 141 | - data:{}, | ||
| 142 | - adviceList:[], | ||
| 143 | - }; | ||
| 144 | - }, | ||
| 145 | - created() { | ||
| 146 | - this.handleUpdate(); | ||
| 147 | - }, | ||
| 148 | - methods: { | ||
| 149 | - getSite(item){ | ||
| 150 | - this.form.objectId = item.id; | ||
| 151 | - }, | ||
| 152 | - getAreaName(code){ | ||
| 153 | - for(let i =0;i<this.areas.length;i++){ | ||
| 154 | - if(Number(code) == this.areas[i].code){ | ||
| 155 | - return this.areas[i].name; | ||
| 156 | - break; | ||
| 157 | - } | ||
| 158 | - } | ||
| 159 | - return code; | ||
| 160 | - }, | ||
| 161 | - getCaseType(type){ | ||
| 162 | - for(let i in this.caseType){ | ||
| 163 | - | ||
| 164 | - | ||
| 165 | - if(this.caseType[i].code==type) | ||
| 166 | - return this.caseType[i].name | ||
| 167 | - } | ||
| 168 | - }, | ||
| 169 | - /** 修改按钮操作 */ | ||
| 170 | - handleUpdate() { | ||
| 171 | - let id; | ||
| 172 | - if(this.businessKey.split(":").length == 2){ | ||
| 173 | - id = this.businessKey.split(":")[1]; | ||
| 174 | - }else{ | ||
| 175 | - id = this.businessKey; | ||
| 176 | - } | ||
| 177 | - | ||
| 178 | - getCaseOffline(id).then(response => { | ||
| 179 | - this.form = response.data; | ||
| 180 | - if(this.form.attach && this.form.attach != "") | ||
| 181 | - this.form.attach = this.form.attach.split(","); | ||
| 182 | - | ||
| 183 | - this.form.siteType = this.form.siteType + ""; | ||
| 184 | - this.form.type = this.getCaseType(this.form.type); | ||
| 185 | - this.form.place = this.getAreaName(this.form.place); | ||
| 186 | - | ||
| 187 | - getAdviceList(this.workflow+":"+id).then(res=>{ | ||
| 188 | - if(res.data){ | ||
| 189 | - if(res.data.advice1){ | ||
| 190 | - this.adviceList.push({name: res.data.advice1.create_by ,time:res.data.advice1.create_time,text:this.form.advice1}) | ||
| 191 | - } | ||
| 192 | - if(res.data.advice2){ | ||
| 193 | - this.adviceList.push({name: res.data.advice2.create_by ,time:res.data.advice2.create_time,text:this.form.advice2}) | ||
| 194 | - } | ||
| 195 | - if(res.data.advice3){ | ||
| 196 | - this.adviceList.push({name: res.data.advice3.create_by ,time:res.data.advice3.create_time,text:this.form.advice3}) | ||
| 197 | - } | ||
| 198 | - if(res.data.advice4){ | ||
| 199 | - this.adviceList.push({name: res.data.advice4.create_by ,time:res.data.advice4.create_time,text:this.form.advice4}) | ||
| 200 | - } | ||
| 201 | - | ||
| 202 | - } | ||
| 203 | - }); | ||
| 204 | - | ||
| 205 | - | ||
| 206 | - this.open2 = true; | ||
| 207 | - }); | ||
| 208 | - | ||
| 209 | - | ||
| 210 | - }, | ||
| 211 | - } | ||
| 212 | -}; | ||
| 213 | </script> | 55 | </script> |
trash-ui/src/views/caseOffline/caseOffline/index.vue
| @@ -52,9 +52,6 @@ | @@ -52,9 +52,6 @@ | ||
| 52 | <el-table-column label="案卷类型" align="center" prop="type" /> | 52 | <el-table-column label="案卷类型" align="center" prop="type" /> |
| 53 | <el-table-column label="所属区域" align="center" prop="place" /> | 53 | <el-table-column label="所属区域" align="center" prop="place" /> |
| 54 | <el-table-column label="时间" align="center" prop="createTime" width="180"> | 54 | <el-table-column label="时间" align="center" prop="createTime" width="180"> |
| 55 | - <template slot-scope="scope"> | ||
| 56 | - <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span> | ||
| 57 | - </template> | ||
| 58 | </el-table-column> | 55 | </el-table-column> |
| 59 | <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | 56 | <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
| 60 | <template slot-scope="scope"> | 57 | <template slot-scope="scope"> |
| @@ -113,7 +110,7 @@ | @@ -113,7 +110,7 @@ | ||
| 113 | <el-form-item label="附件" prop="attach"> | 110 | <el-form-item label="附件" prop="attach"> |
| 114 | <a style="color:blue;font-size: 12px;" @click="uploadImageDialog=true;">选择附件</a> | 111 | <a style="color:blue;font-size: 12px;" @click="uploadImageDialog=true;">选择附件</a> |
| 115 | <el-input v-model="form.attach" type="hidden"></el-input> | 112 | <el-input v-model="form.attach" type="hidden"></el-input> |
| 116 | - <a @click="downloadFile(img);" style="color: blue;" v-for="img,index in form.attach">附件 - {{index+1}}</a> | 113 | + <div style="color: blue;" v-for="img,index in form.attach">附件 - {{index+1}} <a @click="removeAttchItem()" style="color:red;">X</a></div> |
| 117 | </el-form-item> | 114 | </el-form-item> |
| 118 | 115 | ||
| 119 | </el-form> | 116 | </el-form> |
| @@ -145,343 +142,4 @@ | @@ -145,343 +142,4 @@ | ||
| 145 | </div> | 142 | </div> |
| 146 | </template> | 143 | </template> |
| 147 | 144 | ||
| 148 | -<script> | ||
| 149 | -import { listCaseOffline, getCaseOffline, delCaseOffline, addCaseOffline, updateCaseOffline, exportCaseOffline } from "@/api/caseOffline/caseOffline"; | ||
| 150 | - | ||
| 151 | - | ||
| 152 | - | ||
| 153 | - import caseOfflineInfo from "@/views/caseOffline/caseOffline/caseOfflineInfo"; | ||
| 154 | - import { | ||
| 155 | - getArea, | ||
| 156 | - earthsitesList, | ||
| 157 | - constructionsitesList, | ||
| 158 | - getDict, | ||
| 159 | - } from "@/api/dict"; | ||
| 160 | - import { | ||
| 161 | - getThreestep, | ||
| 162 | - } from "@/api/business/threestep"; | ||
| 163 | - | ||
| 164 | - import { | ||
| 165 | - getToken | ||
| 166 | - } from "@/utils/auth"; | ||
| 167 | -export default { | ||
| 168 | - name: "CaseOffline", | ||
| 169 | - | ||
| 170 | - components: { | ||
| 171 | - caseOfflineInfo | ||
| 172 | - }, | ||
| 173 | - data() { | ||
| 174 | - return { | ||
| 175 | - // 遮罩层 | ||
| 176 | - loading: true, | ||
| 177 | - // 选中数组 | ||
| 178 | - ids: [], | ||
| 179 | - // 非单个禁用 | ||
| 180 | - single: true, | ||
| 181 | - // 非多个禁用 | ||
| 182 | - multiple: true, | ||
| 183 | - // 显示搜索条件 | ||
| 184 | - showSearch: true, | ||
| 185 | - // 总条数 | ||
| 186 | - total: 0, | ||
| 187 | - // 线下交办案卷表格数据 | ||
| 188 | - caseOfflineList: [], | ||
| 189 | - // 弹出层标题 | ||
| 190 | - title: "", | ||
| 191 | - // 是否显示弹出层 | ||
| 192 | - open: false, | ||
| 193 | - open2:false, | ||
| 194 | - // 查询参数 | ||
| 195 | - queryParams: { | ||
| 196 | - pageNum: 1, | ||
| 197 | - pageSize: 10, | ||
| 198 | - type: null, | ||
| 199 | - place: null, | ||
| 200 | - createTime: null, | ||
| 201 | - }, | ||
| 202 | - uploadImageDialog:false, | ||
| 203 | - // 表单参数 | ||
| 204 | - form: {}, | ||
| 205 | - // 表单校验 | ||
| 206 | - rules: { | ||
| 207 | - }, | ||
| 208 | - caseType:[ | ||
| 209 | - {code:0,name:"渣土处置工地(含消纳场)的渣土运输车辆出场车身不洁,车轮带泥"}, | ||
| 210 | - {code:1,name:"未洗车出场或者出场清洁不彻底"}, | ||
| 211 | - {code:2,name:"渣土运输车辆货箱顶盖未按规定关闭到位或未按规定和标准装载渣土出场"}, | ||
| 212 | - {code:3,name:"非核准车辆进入渣土处置工地运输渣土"}, | ||
| 213 | - {code:4,name:"渣土处置工地未按规定时间开停工"}, | ||
| 214 | - {code:5,name:"渣土处置工地洗车设施等破损、未正常使用及措施不到位的"}, | ||
| 215 | - {code:6,name:"渣土处置工地、消纳场(含回填场)出入口两侧50米范围内出现渣土污染、污水外排等现象"}, | ||
| 216 | - {code:7,name:"其他1"}, | ||
| 217 | - {code:8,name:"其他2"}, | ||
| 218 | - {code:9,name:"其他3"} | ||
| 219 | - ], | ||
| 220 | - areas:null, | ||
| 221 | - fileList:[], | ||
| 222 | - areas: [], | ||
| 223 | - upload: { | ||
| 224 | - // 是否显示弹出层(用户导入) | ||
| 225 | - open: false, | ||
| 226 | - // 弹出层标题(用户导入) | ||
| 227 | - title: "", | ||
| 228 | - // 是否禁用上传 | ||
| 229 | - isUploading: false, | ||
| 230 | - // 设置上传的请求头部 | ||
| 231 | - headers: { | ||
| 232 | - Authorization: "Bearer " + getToken() | ||
| 233 | - }, | ||
| 234 | - // 上传的地址 | ||
| 235 | - url: process.env.VUE_APP_BASE_API + "/business/threestep/upload", | ||
| 236 | - }, | ||
| 237 | - data:{}, | ||
| 238 | - objId:null | ||
| 239 | - }; | ||
| 240 | - }, | ||
| 241 | - created() { | ||
| 242 | - | ||
| 243 | - | ||
| 244 | - | ||
| 245 | - this.getList(); | ||
| 246 | - | ||
| 247 | - if(window.location.search){ | ||
| 248 | - let businessKey = window.location.search.split("=")[1]; | ||
| 249 | - debugger; | ||
| 250 | - if(window.location.search.split("=")[0] == "?businessKey"){ | ||
| 251 | - let id; | ||
| 252 | - if(businessKey.split(":").length == 2){ | ||
| 253 | - id = businessKey.split(":")[1]; | ||
| 254 | - }else{ | ||
| 255 | - id = businessKey; | ||
| 256 | - } | ||
| 257 | - | ||
| 258 | - getThreestep(id).then(response => { | ||
| 259 | - let data = response.data; | ||
| 260 | - | ||
| 261 | - this.handleAdd(); | ||
| 262 | - | ||
| 263 | - this.form.siteType = data.type + ""; | ||
| 264 | - this.form.siteName = data.name; | ||
| 265 | - this.form.place = Number(data.place); | ||
| 266 | - }); | ||
| 267 | - } | ||
| 268 | - | ||
| 269 | - } | ||
| 270 | - | ||
| 271 | - | ||
| 272 | - | ||
| 273 | - let remoteQueryData = { | ||
| 274 | - "page": 1, | ||
| 275 | - "size": 9999 | ||
| 276 | - } | ||
| 277 | - | ||
| 278 | - constructionsitesList(remoteQueryData).then(res => { | ||
| 279 | - this.data[0]= res.result.list; | ||
| 280 | - }); | ||
| 281 | - | ||
| 282 | - earthsitesList(remoteQueryData).then(res => { | ||
| 283 | - this.data[1]= res.result.list; | ||
| 284 | - }); | ||
| 285 | - }, | ||
| 286 | - methods: { | ||
| 287 | - getSite(item){ | ||
| 288 | - this.form.objectId = item.id; | ||
| 289 | - }, | ||
| 290 | - /** 查询线下交办案卷列表 */ | ||
| 291 | - getList() { | ||
| 292 | - this.loading = true; | ||
| 293 | - listCaseOffline(this.queryParams).then(response => { | ||
| 294 | - this.caseOfflineList = response.rows; | ||
| 295 | - | ||
| 296 | - for(let i in this.caseOfflineList){ | ||
| 297 | - this.caseOfflineList[i].type = this.getCaseType(this.caseOfflineList[i].type); | ||
| 298 | - | ||
| 299 | - } | ||
| 300 | - | ||
| 301 | - getArea().then(res => { | ||
| 302 | - this.areas = res.result; | ||
| 303 | - for(let i =0;i< this.caseOfflineList.length;i++){ | ||
| 304 | - this.caseOfflineList[i].place = this.getAreaName(this.caseOfflineList[i].place); | ||
| 305 | - } | ||
| 306 | - }); | ||
| 307 | - | ||
| 308 | - this.total = response.total; | ||
| 309 | - this.loading = false; | ||
| 310 | - }); | ||
| 311 | - }, | ||
| 312 | - // 取消按钮 | ||
| 313 | - cancel() { | ||
| 314 | - this.open = false; | ||
| 315 | - this.open2 = false; | ||
| 316 | - this.reset(); | ||
| 317 | - }, | ||
| 318 | - // 表单重置 | ||
| 319 | - reset() { | ||
| 320 | - this.form = { | ||
| 321 | - id: null, | ||
| 322 | - type: null, | ||
| 323 | - siteName: null, | ||
| 324 | - locationDec: null, | ||
| 325 | - caseDec: null, | ||
| 326 | - status: 0, | ||
| 327 | - place: null, | ||
| 328 | - number: null, | ||
| 329 | - siteType: null, | ||
| 330 | - objectId: null, | ||
| 331 | - createTime: null, | ||
| 332 | - createBy: null, | ||
| 333 | - advice1: null, | ||
| 334 | - advice2: null, | ||
| 335 | - advice3: null, | ||
| 336 | - advice4: null, | ||
| 337 | - attach:[] | ||
| 338 | - }; | ||
| 339 | - this.resetForm("form"); | ||
| 340 | - }, | ||
| 341 | - /** 搜索按钮操作 */ | ||
| 342 | - handleQuery() { | ||
| 343 | - this.queryParams.pageNum = 1; | ||
| 344 | - this.getList(); | ||
| 345 | - }, | ||
| 346 | - /** 重置按钮操作 */ | ||
| 347 | - resetQuery() { | ||
| 348 | - this.resetForm("queryForm"); | ||
| 349 | - this.handleQuery(); | ||
| 350 | - }, | ||
| 351 | - // 多选框选中数据 | ||
| 352 | - handleSelectionChange(selection) { | ||
| 353 | - this.ids = selection.map(item => item.id) | ||
| 354 | - this.single = selection.length!==1 | ||
| 355 | - this.multiple = !selection.length | ||
| 356 | - }, | ||
| 357 | - getAreaName(code){ | ||
| 358 | - for(let i =0;i<this.areas.length;i++){ | ||
| 359 | - if(Number(code) == this.areas[i].code){ | ||
| 360 | - return this.areas[i].name; | ||
| 361 | - break; | ||
| 362 | - } | ||
| 363 | - } | ||
| 364 | - return code; | ||
| 365 | - }, | ||
| 366 | - getCaseType(type){ | ||
| 367 | - for(let i in this.caseType){ | ||
| 368 | - | ||
| 369 | - | ||
| 370 | - if(this.caseType[i].code==type) | ||
| 371 | - return this.caseType[i].name | ||
| 372 | - } | ||
| 373 | - }, | ||
| 374 | - /** 新增按钮操作 */ | ||
| 375 | - handleAdd() { | ||
| 376 | - this.reset(); | ||
| 377 | - this.open = true; | ||
| 378 | - this.title = "添加线下交办案卷"; | ||
| 379 | - | ||
| 380 | - let date = new Date(); | ||
| 381 | - | ||
| 382 | - | ||
| 383 | - this.form.number = date.getFullYear() | ||
| 384 | - +""+((date.getMonth()+1) < 10 ? "0" + (date.getMonth()+1) : (date.getMonth()+1)) | ||
| 385 | - +""+ ((date.getDate()) < 10 ? "0" + (date.getDate()) : (date.getDate())) | ||
| 386 | - +""+ ((date.getHours()) < 10 ? "0" + (date.getHours()) : (date.getHours())) | ||
| 387 | - +""+ ((date.getMinutes()) < 10 ? "0" + (date.getMinutes()) : (date.getMinutes())) | ||
| 388 | - +""+ ((date.getSeconds()) < 10 ? "0" + (date.getSeconds()*1000) : (date.getSeconds()*1000)) | ||
| 389 | - }, | ||
| 390 | - /** 修改按钮操作 */ | ||
| 391 | - handleUpdate(row) { | ||
| 392 | - this.reset(); | ||
| 393 | - this.businessKey =row.id + ""; | ||
| 394 | - this.open2 = true; | ||
| 395 | - }, | ||
| 396 | - /** 提交按钮 */ | ||
| 397 | - submitForm() { | ||
| 398 | - this.$refs["form"].validate(valid => { | ||
| 399 | - if (valid) { | ||
| 400 | - this.form.attach = this.form.attach +""; | ||
| 401 | - if (this.form.id != null) { | ||
| 402 | - updateCaseOffline(this.form).then(response => { | ||
| 403 | - this.msgSuccess("修改成功"); | ||
| 404 | - this.open = false; | ||
| 405 | - this.getList(); | ||
| 406 | - }); | ||
| 407 | - } else { | ||
| 408 | - addCaseOffline(this.form).then(response => { | ||
| 409 | - this.msgSuccess("新增成功"); | ||
| 410 | - this.open = false; | ||
| 411 | - this.getList(); | ||
| 412 | - }); | ||
| 413 | - } | ||
| 414 | - } | ||
| 415 | - }); | ||
| 416 | - }, | ||
| 417 | - /** 删除按钮操作 */ | ||
| 418 | - handleDelete(row) { | ||
| 419 | - const ids = row.id || this.ids; | ||
| 420 | - this.$confirm('是否确认删除线下交办案卷编号为"' + ids + '"的数据项?', "警告", { | ||
| 421 | - confirmButtonText: "确定", | ||
| 422 | - cancelButtonText: "取消", | ||
| 423 | - type: "warning" | ||
| 424 | - }).then(function() { | ||
| 425 | - return delCaseOffline(ids); | ||
| 426 | - }).then(() => { | ||
| 427 | - this.getList(); | ||
| 428 | - this.msgSuccess("删除成功"); | ||
| 429 | - }) | ||
| 430 | - }, | ||
| 431 | - /** 导出按钮操作 */ | ||
| 432 | - handleExport() { | ||
| 433 | - const queryParams = this.queryParams; | ||
| 434 | - this.$confirm('是否确认导出所有线下交办案卷数据项?', "警告", { | ||
| 435 | - confirmButtonText: "确定", | ||
| 436 | - cancelButtonText: "取消", | ||
| 437 | - type: "warning" | ||
| 438 | - }).then(function() { | ||
| 439 | - return exportCaseOffline(queryParams); | ||
| 440 | - }).then(response => { | ||
| 441 | - this.download(response.message); | ||
| 442 | - }) | ||
| 443 | - }, | ||
| 444 | - removeAttchItem(index, img) { | ||
| 445 | - this.form.attach.splice(this.form.attach.indexOf(img), 1); | ||
| 446 | - this.$forceUpdate(); | ||
| 447 | - }, | ||
| 448 | - uploadSuccess(res, file, fileList) { | ||
| 449 | - if(res.code){ | ||
| 450 | - this.$message(res.message); | ||
| 451 | - return; | ||
| 452 | - } | ||
| 453 | - if(!this.form.attach){ | ||
| 454 | - this.form.attach = []; | ||
| 455 | - } | ||
| 456 | - this.form.attach.push(res); | ||
| 457 | - }, | ||
| 458 | - showFileUpload(i) { | ||
| 459 | - this.uploadImageDialog = true; | ||
| 460 | - this.picIndex = i; | ||
| 461 | - }, | ||
| 462 | - beforeUpload(file) { | ||
| 463 | - let isRightSize = file.size / 1024 / 1024 < 20 | ||
| 464 | - if (!isRightSize) { | ||
| 465 | - this.$message.error('文件大小超过 20MB') | ||
| 466 | - return isRightSize; | ||
| 467 | - } | ||
| 468 | - let isAccept = false; | ||
| 469 | - if (file.name.indexOf('.docx') > -1 || file.name.indexOf(".jpg") > -1 || file.name.indexOf('.doc') > -1 || file | ||
| 470 | - .name.indexOf('.pdf') > -1) { | ||
| 471 | - isAccept = true; | ||
| 472 | - } | ||
| 473 | - if (!isAccept) { | ||
| 474 | - this.$message.error('应该选择PDF、JPG、WORD类型的文件') | ||
| 475 | - return isAccept; | ||
| 476 | - } | ||
| 477 | - }, | ||
| 478 | - downloadFile(path) { | ||
| 479 | - window.location.href = process.env.VUE_APP_BASE_API + "/business/threestep/download?path=" + encodeURI(path); | ||
| 480 | - }, | ||
| 481 | - handleClose() { | ||
| 482 | - this.uploadImageDialog = false; | ||
| 483 | - this.fileList = []; | ||
| 484 | - }, | ||
| 485 | - } | ||
| 486 | -}; | ||
| 487 | -</script> | 145 | +<script src="../../../api/caseoffline.js" /> |
trash-ui/src/views/casefile/violationCaseFile/index.vue
| @@ -89,10 +89,7 @@ | @@ -89,10 +89,7 @@ | ||
| 89 | </template> | 89 | </template> |
| 90 | </el-table-column> | 90 | </el-table-column> |
| 91 | <el-table-column label="违规类型" align="center" prop="violationType" /> | 91 | <el-table-column label="违规类型" align="center" prop="violationType" /> |
| 92 | - <el-table-column label="审批状态" align="center" prop="status"> | ||
| 93 | - <template slot-scope="scope"> | ||
| 94 | - <span>{{parseStatus(scope.row.status) }}</span> | ||
| 95 | - </template> | 92 | + <el-table-column label="日期" align="center" prop="createTime"> |
| 96 | </el-table-column> | 93 | </el-table-column> |
| 97 | <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | 94 | <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
| 98 | <template slot-scope="scope"> | 95 | <template slot-scope="scope"> |
| @@ -263,452 +260,5 @@ | @@ -263,452 +260,5 @@ | ||
| 263 | </div> | 260 | </div> |
| 264 | </template> | 261 | </template> |
| 265 | 262 | ||
| 266 | -<script> | ||
| 267 | -import { listViolationCaseFile, getViolationCaseFile, | ||
| 268 | - delViolationCaseFile, addViolationCaseFile, | ||
| 269 | - updateViolationCaseFile, exportViolationCaseFile } from "@/api/casefile/violationCaseFile"; | ||
| 270 | -import violationCaseFileInfo from "./violationCaseFileInfo"; | ||
| 271 | - | ||
| 272 | - import { | ||
| 273 | - earthsitesList, | ||
| 274 | - constructionsitesList, | ||
| 275 | - getDict, | ||
| 276 | - getArea, | ||
| 277 | - companyList, | ||
| 278 | - truckList, | ||
| 279 | - } from "@/api/dict"; | ||
| 280 | - | ||
| 281 | - | ||
| 282 | -export default { | ||
| 283 | - name: "ViolationCaseFile", | ||
| 284 | - components: { violationCaseFileInfo }, | ||
| 285 | - data() { | ||
| 286 | - return { | ||
| 287 | - // 遮罩层 | ||
| 288 | - loading: true, | ||
| 289 | - // 选中数组 | ||
| 290 | - ids: [], | ||
| 291 | - // 非单个禁用 | ||
| 292 | - single: true, | ||
| 293 | - // 非多个禁用 | ||
| 294 | - multiple: true, | ||
| 295 | - // 显示搜索条件 | ||
| 296 | - showSearch: true, | ||
| 297 | - // 总条数 | ||
| 298 | - total: 0, | ||
| 299 | - // 平台违规案卷表格数据 | ||
| 300 | - violationCaseFileList: [], | ||
| 301 | - // 弹出层标题 | ||
| 302 | - title: "", | ||
| 303 | - // 是否显示弹出层 | ||
| 304 | - open: false, | ||
| 305 | - // 查询参数 | ||
| 306 | - queryParams: { | ||
| 307 | - pageNum: 1, | ||
| 308 | - pageSize: 10, | ||
| 309 | - number: null, | ||
| 310 | - violationObjectType: null, | ||
| 311 | - owningRegion: null, | ||
| 312 | - violationType: null, | ||
| 313 | - violationGrade: null, | ||
| 314 | - projectName: null, | ||
| 315 | - companyName: null, | ||
| 316 | - describe: null, | ||
| 317 | - sendObject: null, | ||
| 318 | - status: null, | ||
| 319 | - receive: null, | ||
| 320 | - receiveStatus: null, | ||
| 321 | - readBy: null, | ||
| 322 | - readTime: null | ||
| 323 | - }, | ||
| 324 | - // 表单参数 | ||
| 325 | - form: { | ||
| 326 | - | ||
| 327 | - }, | ||
| 328 | - place:null, | ||
| 329 | - // 表单校验 | ||
| 330 | - rules: { | ||
| 331 | - number :[ | ||
| 332 | - { required: true, message: "必填", trigger: "blur" } | ||
| 333 | - ], | ||
| 334 | - violationObjectType :[ | ||
| 335 | - { required: true, message: "必填", trigger: "blur" } | ||
| 336 | - ], | ||
| 337 | - owningRegion :[ | ||
| 338 | - { required: true, message: "必填", trigger: "blur" } | ||
| 339 | - ], | ||
| 340 | - violationType :[ | ||
| 341 | - { required: true, message: "必填", trigger: "blur" } | ||
| 342 | - ], | ||
| 343 | - }, | ||
| 344 | - caseType:[{code:0,name:"进入非专用车辆"}, | ||
| 345 | - {code:1,name:"无许可手续(工)"}, | ||
| 346 | - {code:2,name:"无许可手续(消)"}, | ||
| 347 | - {code:3,name:"黄土覆盖情况"}, | ||
| 348 | - {code:4,name:"出入口路面污染"}, | ||
| 349 | - {code:5,name:"出入口道路硬化"}, | ||
| 350 | - {code:6,name:"车辆冲洗是否到位"}, | ||
| 351 | - {code:7,name:"雾炮机是否正常开启"}, | ||
| 352 | - {code:8,name:"使用费专用车运输"}, | ||
| 353 | - {code:9,name:"监控点位未对准"}, | ||
| 354 | - {code:10,name:"未报开工作业"}, | ||
| 355 | - {code:11,name:"视频设备离线超时报警"}, | ||
| 356 | - {code:12,name:"三无车辆进入工地"}, | ||
| 357 | - {code:13,name:"未按时间作业"}, | ||
| 358 | - {code:14,name:"未报开工作业"}, | ||
| 359 | - {code:15,name:"视频设备离线超时报警"}, | ||
| 360 | - {code:16,name:"三无车辆进入消纳场"}, | ||
| 361 | - {code:17,name:"未到指定的消纳场作业"}, | ||
| 362 | - {code:18,name:"离线运输报警(工)"}, | ||
| 363 | - {code:19,name:"离线运输报警(消)"}, | ||
| 364 | - {code:20,name:"未激活车辆作业"}, | ||
| 365 | - {code:21,name:"未核准作业车辆作业"}, | ||
| 366 | - {code:22,name:"未按线路行驶"}, | ||
| 367 | - {code:23,name:"闯禁行驶"}, | ||
| 368 | - {code:24,name:"失信车辆作业"}, | ||
| 369 | - {code:25,name:"其他1"}, | ||
| 370 | - {code:26,name:"其他2"}, | ||
| 371 | - {code:27,name:"其他3"}, | ||
| 372 | - {code:28,name:"其他4"}, | ||
| 373 | - {code:29,name:"其他5"}], | ||
| 374 | - | ||
| 375 | - projectNameList:[ | ||
| 376 | - ], | ||
| 377 | - isLoading: false, | ||
| 378 | - fileEntityList:[], | ||
| 379 | - companyList:[ | ||
| 380 | - ], | ||
| 381 | - remoteQueryData: { | ||
| 382 | - "page": 1, | ||
| 383 | - "size": 9999 | ||
| 384 | - }, | ||
| 385 | - areas:[], | ||
| 386 | - data:{}, | ||
| 387 | - isLoadingCompany: false, | ||
| 388 | - idInfo:null, | ||
| 389 | - openInfo:false, | ||
| 390 | - }; | ||
| 391 | - }, | ||
| 392 | - created() { | ||
| 393 | - getArea().then(res=>{ | ||
| 394 | - | ||
| 395 | - this.areas = res.result; | ||
| 396 | - }); | ||
| 397 | - | ||
| 398 | - | ||
| 399 | - constructionsitesList(this.remoteQueryData).then(res => { | ||
| 400 | - this.projectNameList = res.result.list; | ||
| 401 | - earthsitesList(this.remoteQueryData).then(res => { | ||
| 402 | - for(var i in res.result.list){ | ||
| 403 | - this.projectNameList.push(res.result.list[i]); | ||
| 404 | - } | ||
| 405 | - }); | ||
| 406 | - }); | ||
| 407 | - | ||
| 408 | - | ||
| 409 | - companyList(this.remoteQueryData).then(res => { | ||
| 410 | - this.companyList = res.result.list; | ||
| 411 | - }); | ||
| 412 | - | ||
| 413 | - | ||
| 414 | - | ||
| 415 | - this.getList(); | ||
| 416 | - }, | ||
| 417 | - methods: { | ||
| 418 | - selectArea(item){ | ||
| 419 | - | ||
| 420 | - this.form.owningRegion = item.name; | ||
| 421 | - this.form.projectName = null; | ||
| 422 | - | ||
| 423 | - }, | ||
| 424 | - /** 查询平台违规案卷列表 */ | ||
| 425 | - getList() { | ||
| 426 | - this.loading = true; | ||
| 427 | - listViolationCaseFile(this.queryParams).then(response => { | ||
| 428 | - this.violationCaseFileList = response.rows; | ||
| 429 | - this.total = response.total; | ||
| 430 | - this.loading = false; | ||
| 431 | - }); | ||
| 432 | - }, | ||
| 433 | - // 取消按钮 | ||
| 434 | - cancel() { | ||
| 435 | - this.open = false; | ||
| 436 | - this.openInfo = false; | ||
| 437 | - this.reset(); | ||
| 438 | - }, | ||
| 439 | - // 表单重置 | ||
| 440 | - reset() { | ||
| 441 | - this.fileEntityList = []; | ||
| 442 | - this.form = { | ||
| 443 | - id: null, | ||
| 444 | - number: null, | ||
| 445 | - violationObjectType: null, | ||
| 446 | - owningRegion: null, | ||
| 447 | - violationType: null, | ||
| 448 | - violationGrade: null, | ||
| 449 | - projectName: null, | ||
| 450 | - companyName: null, | ||
| 451 | - describe: null, | ||
| 452 | - sendObject: null, | ||
| 453 | - createTime: null, | ||
| 454 | - createBy: null, | ||
| 455 | - updateTime: null, | ||
| 456 | - updateBy: null, | ||
| 457 | - status: 0, | ||
| 458 | - receive: null, | ||
| 459 | - receiveStatus: 0, | ||
| 460 | - readBy: null, | ||
| 461 | - readTime: null | ||
| 462 | - }; | ||
| 463 | - this.resetForm("form"); | ||
| 464 | - }, | ||
| 465 | - /** 搜索按钮操作 */ | ||
| 466 | - handleQuery() { | ||
| 467 | - this.queryParams.pageNum = 1; | ||
| 468 | - this.getList(); | ||
| 469 | - }, | ||
| 470 | - /** 重置按钮操作 */ | ||
| 471 | - resetQuery() { | ||
| 472 | - this.resetForm("queryForm"); | ||
| 473 | - this.handleQuery(); | ||
| 474 | - }, | ||
| 475 | - // 多选框选中数据 | ||
| 476 | - handleSelectionChange(selection) { | ||
| 477 | - this.ids = selection.map(item => item.id) | ||
| 478 | - this.single = selection.length!==1 | ||
| 479 | - this.multiple = !selection.length | ||
| 480 | - }, | ||
| 481 | - handleInfo(row){ | ||
| 482 | - this.idInfo = row.id + ""; | ||
| 483 | - this.openInfo = true; | ||
| 484 | - this.title = "平台违规案卷详情"; | ||
| 485 | - }, | ||
| 486 | - /** 新增按钮操作 */ | ||
| 487 | - handleAdd() { | ||
| 488 | - this.reset(); | ||
| 489 | - this.open = true; | ||
| 490 | - this.form.number = this.getNumber(); | ||
| 491 | - this.form.violationGrade = "一般类"; | ||
| 492 | - this.form.sendObject = "区管理部门(治)"; | ||
| 493 | - this.title = "添加平台违规案卷"; | ||
| 494 | - }, | ||
| 495 | - /** 修改按钮操作 */ | ||
| 496 | - handleUpdate(row) { | ||
| 497 | - this.reset(); | ||
| 498 | - const id = row.id || this.ids | ||
| 499 | - getViolationCaseFile(id).then(response => { | ||
| 500 | - this.form = response.data.violationCaseFile; | ||
| 501 | - let files = JSON.stringify(response.data.uploadFiles); | ||
| 502 | - this.fileEntityList = JSON.parse(files.replaceAll("filePath", "url").replaceAll("fileName", "name")) | ||
| 503 | - this.open = true; | ||
| 504 | - this.title = "修改平台违规案卷"; | ||
| 505 | - }); | ||
| 506 | - }, | ||
| 507 | - /** 提交按钮 */ | ||
| 508 | - submitForm() { | ||
| 509 | - this.$refs["form"].validate(valid => { | ||
| 510 | - if (valid) { | ||
| 511 | - | ||
| 512 | - if(this.form.sendObject == "运输企业" && this.form.companyName == null){ | ||
| 513 | - | ||
| 514 | - this.$message("请选择相关企业"); | ||
| 515 | - | ||
| 516 | - return; | ||
| 517 | - } | ||
| 518 | - | ||
| 519 | - | ||
| 520 | - let formData = new FormData(); | ||
| 521 | - let form = this.form; | ||
| 522 | - //去掉params属性 | ||
| 523 | - delete form.params; | ||
| 524 | - formData.append('fileList', null); | ||
| 525 | - //将新增的文件放入formData | ||
| 526 | - this.fileEntityList.forEach(item => { | ||
| 527 | - if(item.id==null){ | ||
| 528 | - formData.append('fileList', item.raw) | ||
| 529 | - } | ||
| 530 | - }) | ||
| 531 | - if (this.form.id != null) { | ||
| 532 | - formData.append("violationCaseFile", JSON.stringify(form)); | ||
| 533 | - formData.append("uploadFilesList", null); | ||
| 534 | - this.fileEntityList.forEach(item => { | ||
| 535 | - delete item.params; | ||
| 536 | - if(item != "null" && item != null){ | ||
| 537 | - formData.append('uploadFilesList', JSON.stringify(item).replaceAll("url", "filePath").replaceAll("name", "fileName")); | ||
| 538 | - } | ||
| 539 | - }) | ||
| 540 | - updateViolationCaseFile(formData).then(response => { | ||
| 541 | - this.msgSuccess("修改成功"); | ||
| 542 | - this.open = false; | ||
| 543 | - this.getList(); | ||
| 544 | - }); | ||
| 545 | - } else { | ||
| 546 | - for (let key in form) { | ||
| 547 | - formData.append(key, form[key] == null ? "" : form[key]) | ||
| 548 | - } | ||
| 549 | - addViolationCaseFile(formData).then(response => { | ||
| 550 | - this.msgSuccess("新增成功"); | ||
| 551 | - this.open = false; | ||
| 552 | - this.getList(); | ||
| 553 | - }); | ||
| 554 | - } | ||
| 555 | - } | ||
| 556 | - }); | ||
| 557 | - }, | ||
| 558 | - /** 删除按钮操作 */ | ||
| 559 | - handleDelete(row) { | ||
| 560 | - const ids = row.id || this.ids; | ||
| 561 | - this.$confirm('是否确认删除平台违规案卷编号为"' + ids + '"的数据项?', "警告", { | ||
| 562 | - confirmButtonText: "确定", | ||
| 563 | - cancelButtonText: "取消", | ||
| 564 | - type: "warning" | ||
| 565 | - }).then(function() { | ||
| 566 | - return delViolationCaseFile(ids); | ||
| 567 | - }).then(() => { | ||
| 568 | - this.getList(); | ||
| 569 | - this.msgSuccess("删除成功"); | ||
| 570 | - }) | ||
| 571 | - }, | ||
| 572 | - /** 导出按钮操作 */ | ||
| 573 | - handleExport() { | ||
| 574 | - const queryParams = this.queryParams; | ||
| 575 | - this.$confirm('是否确认导出所有平台违规案卷数据项?', "警告", { | ||
| 576 | - confirmButtonText: "确定", | ||
| 577 | - cancelButtonText: "取消", | ||
| 578 | - type: "warning" | ||
| 579 | - }).then(function() { | ||
| 580 | - return exportViolationCaseFile(queryParams); | ||
| 581 | - }).then(response => { | ||
| 582 | - this.download(response.message); | ||
| 583 | - }) | ||
| 584 | - }, | ||
| 585 | - /** 生成案卷编号 */ | ||
| 586 | - getNumber(){ | ||
| 587 | - const now = new Date(); | ||
| 588 | - const year = now.getFullYear().toString().slice(-2); // 提取后两位数 | ||
| 589 | - const month = now.getMonth() + 1 < 10 ? `0${now.getMonth() + 1}` : now.getMonth() + 1; | ||
| 590 | - const day = now.getDate() < 10 ? `0${now.getDate()}` : now.getDate(); | ||
| 591 | - const hour = now.getHours() < 10 ? `0${now.getHours()}` : now.getHours(); | ||
| 592 | - const minute = now.getMinutes() < 10 ? `0${now.getMinutes()}` : now.getMinutes(); | ||
| 593 | - const second = now.getSeconds() < 10 ? `0${now.getSeconds()}` : now.getSeconds(); | ||
| 594 | - const millisecond = now.getMilliseconds(); | ||
| 595 | - const code = `${year}${month}${day}${hour}${minute}${second}${millisecond}`; | ||
| 596 | - return code; | ||
| 597 | - }, | ||
| 598 | - projectNameLoadOptions(query) { | ||
| 599 | - // 根据输入的关键字query异步加载选项数据 | ||
| 600 | - this.isLoading = true | ||
| 601 | - setTimeout(() => { | ||
| 602 | - // 模拟异步加载数据 | ||
| 603 | - const data = [ | ||
| 604 | - { name:'项目1' }, | ||
| 605 | - { name:'项目2' }, | ||
| 606 | - { name:'项目3' } | ||
| 607 | - ].filter(item => item.name.includes(query)) | ||
| 608 | - this.projectNameList = data | ||
| 609 | - this.isLoading = false | ||
| 610 | - }, 200) | ||
| 611 | - }, | ||
| 612 | - companyLoadOptions(query) { | ||
| 613 | - // 根据输入的关键字query异步加载选项数据 | ||
| 614 | - this.isLoadingCompany = true | ||
| 615 | - setTimeout(() => { | ||
| 616 | - // 模拟异步加载数据 | ||
| 617 | - const data = [ | ||
| 618 | - { name:'公司1' }, | ||
| 619 | - { name:'公司2' }, | ||
| 620 | - { name:'公司3' } | ||
| 621 | - ].filter(item => item.name.includes(query)) | ||
| 622 | - this.companyList = data | ||
| 623 | - this.isLoadingCompany = false | ||
| 624 | - }, 200) | ||
| 625 | - }, | ||
| 626 | - /** | ||
| 627 | - * 文件改变时,限制文件上传格式和大小 | ||
| 628 | - * 文件格式只能为docx/doc/pdf/png/jpeg/png/jpg | ||
| 629 | - * 大小不超过20M | ||
| 630 | - * */ | ||
| 631 | - fileChange(file, fileList) { | ||
| 632 | - let count = 0; | ||
| 633 | - for (let i = 0; i < fileList.length; i++) { | ||
| 634 | - // console.log(fileList.length) | ||
| 635 | - // console.log(this.fileEntityList[i].name+"111"+file.name) | ||
| 636 | - if (fileList[i].name == file.name) { | ||
| 637 | - count++; | ||
| 638 | - if (count == 2) { | ||
| 639 | - this.$message({ | ||
| 640 | - message: '已存在此文件!', | ||
| 641 | - type: 'warning' | ||
| 642 | - }); | ||
| 643 | - for (let j = fileList.length; j > 0; j--) { | ||
| 644 | - //如果存在此文件,去除新选择的重复文件 | ||
| 645 | - if (fileList[j - 1].name == file.name) { | ||
| 646 | - fileList.splice(j - 1, 1); | ||
| 647 | - i--; | ||
| 648 | - return false; | ||
| 649 | - } | ||
| 650 | - } | ||
| 651 | - } | ||
| 652 | - } | ||
| 653 | - } | ||
| 654 | - let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase(); | ||
| 655 | - //格式符合后判断大小 | ||
| 656 | - if ("docx,doc,pdf,png,jpeg,png,jpg".indexOf(fileType) != -1) { | ||
| 657 | - let max5M = file.size / 1024 / 1024 < 20; | ||
| 658 | - if (!max5M) { | ||
| 659 | - this.$message({ | ||
| 660 | - message: '上传文件大小不得超过20M!', | ||
| 661 | - type: 'warning' | ||
| 662 | - }); | ||
| 663 | - fileList = fileList.splice(fileList.length - 1, 1); | ||
| 664 | - } else { | ||
| 665 | - //符合条件后进行添加 | ||
| 666 | - this.fileEntityList = fileList | ||
| 667 | - } | ||
| 668 | - } else { | ||
| 669 | - this.$message({ | ||
| 670 | - message: '上传文件只能是 docx、doc、pdf、png、jpeg、png、jpg格式!', | ||
| 671 | - type: 'warning' | ||
| 672 | - }); | ||
| 673 | - fileList = fileList.splice(fileList.length - 1, 1); | ||
| 674 | - } | ||
| 675 | - }, | ||
| 676 | - // 删除文件 | ||
| 677 | - handleDeleteFile(index) { | ||
| 678 | - this.fileEntityList.splice(index, 1); | ||
| 679 | - }, | ||
| 680 | - /** 文件下载 */ | ||
| 681 | - downloadFA(row) { | ||
| 682 | - let name = row.name; | ||
| 683 | - let url = row.url; | ||
| 684 | - const a = document.createElement('a') | ||
| 685 | - a.setAttribute('download', name) | ||
| 686 | - a.setAttribute('target', '_blank') | ||
| 687 | - a.setAttribute('href', process.env.VUE_APP_BASE_API + url); | ||
| 688 | - a.click() | ||
| 689 | - }, | ||
| 690 | - /** 生成违规描述 */ | ||
| 691 | - createDescribe(){ | ||
| 692 | - this.rules.companyName = [{ required: true, message: "必填", trigger: "blur" }] | ||
| 693 | - this.rules.projectName = [{ required: true, message: "必填", trigger: "blur" }] | ||
| 694 | - this.$refs["form"].validate(valid => { | ||
| 695 | - if (valid) { | ||
| 696 | - let formData = this.form; | ||
| 697 | - const now = new Date(); | ||
| 698 | - const year = now.getFullYear(); | ||
| 699 | - const month = now.getMonth() + 1 < 10 ? `0${now.getMonth() + 1}` : now.getMonth() + 1; | ||
| 700 | - const day = now.getDate() < 10 ? `0${now.getDate()}` : now.getDate(); | ||
| 701 | - const hour = now.getHours() < 10 ? `0${now.getHours()}` : now.getHours(); | ||
| 702 | - const minute = now.getMinutes() < 10 ? `0${now.getMinutes()}` : now.getMinutes(); | ||
| 703 | - const second = now.getSeconds() < 10 ? `0${now.getSeconds()}` : now.getSeconds(); | ||
| 704 | - const code = `${year}/${month}/${day} ${hour}:${minute}:${second}`; | ||
| 705 | - this.form.describe =code + formData.companyName + "在" + formData.projectName + "出现" + formData.violationType; | ||
| 706 | - this.rules.companyName = null; | ||
| 707 | - this.rules.projectName = null; | ||
| 708 | - } | ||
| 709 | - }); | ||
| 710 | - | ||
| 711 | - } | ||
| 712 | - } | ||
| 713 | -}; | 263 | +<script src="../../../api/vio_casefile"> |
| 714 | </script> | 264 | </script> |
trash-ui/src/views/casefile/violationWarningInformation/index.vue
| @@ -251,428 +251,4 @@ | @@ -251,428 +251,4 @@ | ||
| 251 | </div> | 251 | </div> |
| 252 | </template> | 252 | </template> |
| 253 | 253 | ||
| 254 | -<script> | ||
| 255 | -import { listViolationWarningInformation, getViolationWarningInformation, delViolationWarningInformation, addViolationWarningInformation, updateViolationWarningInformation, exportViolationWarningInformation } from "@/api/casefile/violationWarningInformation"; | ||
| 256 | -import violationWarningInformationInfo from "./violationWarningInformationInfo"; | ||
| 257 | -import { | ||
| 258 | - earthsitesList, | ||
| 259 | - constructionsitesList, | ||
| 260 | - getDict, | ||
| 261 | - getArea, | ||
| 262 | - companyList, | ||
| 263 | - truckList, | ||
| 264 | -} from "@/api/dict"; | ||
| 265 | -import {getEarthSitesList,getConstructionList,getCompanyList,getAreaList} from "@/api/casefile/remoteServer"; | ||
| 266 | -export default { | ||
| 267 | - name: "ViolationWarningInformation", | ||
| 268 | - components: { violationWarningInformationInfo }, | ||
| 269 | - data() { | ||
| 270 | - return { | ||
| 271 | - // 遮罩层 | ||
| 272 | - loading: true, | ||
| 273 | - // 选中数组 | ||
| 274 | - ids: [], | ||
| 275 | - // 非单个禁用 | ||
| 276 | - single: true, | ||
| 277 | - // 非多个禁用 | ||
| 278 | - multiple: true, | ||
| 279 | - // 显示搜索条件 | ||
| 280 | - showSearch: true, | ||
| 281 | - // 总条数 | ||
| 282 | - total: 0, | ||
| 283 | - // 违规预警信息表格数据 | ||
| 284 | - violationWarningInformationList: [], | ||
| 285 | - // 弹出层标题 | ||
| 286 | - title: "", | ||
| 287 | - // 是否显示弹出层 | ||
| 288 | - open: false, | ||
| 289 | - // 查询参数 | ||
| 290 | - queryParams: { | ||
| 291 | - pageNum: 1, | ||
| 292 | - pageSize: 10, | ||
| 293 | - number: null, | ||
| 294 | - violationObjectType: null, | ||
| 295 | - owningRegion: null, | ||
| 296 | - violationType: null, | ||
| 297 | - violationGrade: null, | ||
| 298 | - projectName: null, | ||
| 299 | - companyName: null, | ||
| 300 | - describe: null, | ||
| 301 | - sendObject: null, | ||
| 302 | - receive: null, | ||
| 303 | - receiveStatus: null, | ||
| 304 | - readBy: null, | ||
| 305 | - readTime: null, | ||
| 306 | - replyOne: null, | ||
| 307 | - replyTwo: null, | ||
| 308 | - replyThree: null | ||
| 309 | - }, | ||
| 310 | - // 表单参数 | ||
| 311 | - form: {}, | ||
| 312 | - // 表单校验 | ||
| 313 | - rules: { | ||
| 314 | - number :[ | ||
| 315 | - { required: true, message: "必填", trigger: "blur" } | ||
| 316 | - ], | ||
| 317 | - violationObjectType :[ | ||
| 318 | - { required: true, message: "必填", trigger: "blur" } | ||
| 319 | - ], | ||
| 320 | - owningRegion :[ | ||
| 321 | - { required: true, message: "必填", trigger: "blur" } | ||
| 322 | - ], | ||
| 323 | - violationType :[ | ||
| 324 | - { required: true, message: "必填", trigger: "blur" } | ||
| 325 | - ], | ||
| 326 | - }, | ||
| 327 | - caseType:[{code:0,name:"工地预警-未报开工作业"}, | ||
| 328 | - {code:1,name:"工地预警-视频设备离线超时报警"}, | ||
| 329 | - {code:2,name:"工地预警-三无车辆进入工地"}, | ||
| 330 | - {code:3,name:"工地预警未按时间作业"}, | ||
| 331 | - {code:4,name:"消纳场预警-未报开工作业"}, | ||
| 332 | - {code:5,name:"消纳场预警-视频设备离线超时报警"}, | ||
| 333 | - {code:6,name:"消纳场预警-三无车辆进入消纳场"}, | ||
| 334 | - {code:7,name:"消纳场预警-未到指定的消纳场作业"}, | ||
| 335 | - {code:8,name:"离线运输报警(工)"}, | ||
| 336 | - {code:9,name:"离线运输报警(消)"}, | ||
| 337 | - {code:10,name:"未激活车辆作业"}, | ||
| 338 | - {code:11,name:"未核准作业车辆作业"}, | ||
| 339 | - {code:12,name:"未按线路行驶"}, | ||
| 340 | - {code:13,name:"闯禁行驶"}, | ||
| 341 | - {code:14,name:"失信车辆作业"}], | ||
| 342 | - projectNameList:[ | ||
| 343 | - ], | ||
| 344 | - isLoading: false, | ||
| 345 | - fileEntityList:[], | ||
| 346 | - companyList:[ | ||
| 347 | - ], | ||
| 348 | - remoteQueryData: { | ||
| 349 | - "page": 1, | ||
| 350 | - "size": 9999 | ||
| 351 | - }, | ||
| 352 | - isLoadingCompany: false, | ||
| 353 | - idInfo:null, | ||
| 354 | - openInfo:false, | ||
| 355 | - areas:[], | ||
| 356 | - data:{}, | ||
| 357 | - }; | ||
| 358 | - }, | ||
| 359 | - created() { | ||
| 360 | - getAreaList().then(res=>{ | ||
| 361 | - this.areas = res.data; | ||
| 362 | - }); | ||
| 363 | - | ||
| 364 | - | ||
| 365 | - getEarthSitesList().then(res => { | ||
| 366 | - for(var i in res.data){ | ||
| 367 | - this.projectNameList.push({name:res.data[i].name}); | ||
| 368 | - } | ||
| 369 | - }); | ||
| 370 | - getConstructionList().then(res => { | ||
| 371 | - for(var i in res.data){ | ||
| 372 | - this.projectNameList.push({name:res.data[i].name}); | ||
| 373 | - } | ||
| 374 | - }); | ||
| 375 | - | ||
| 376 | - | ||
| 377 | - getCompanyList(this.remoteQueryData).then(res => { | ||
| 378 | - this.companyList = res.data; | ||
| 379 | - }); | ||
| 380 | - this.getList(); | ||
| 381 | - }, | ||
| 382 | - methods: { | ||
| 383 | - selectArea(item){ | ||
| 384 | - | ||
| 385 | - this.form.owningRegion = item.name; | ||
| 386 | - | ||
| 387 | - }, | ||
| 388 | - /** 查询违规预警信息列表 */ | ||
| 389 | - getList() { | ||
| 390 | - this.loading = true; | ||
| 391 | - listViolationWarningInformation(this.queryParams).then(response => { | ||
| 392 | - this.violationWarningInformationList = response.rows; | ||
| 393 | - this.total = response.total; | ||
| 394 | - this.loading = false; | ||
| 395 | - }); | ||
| 396 | - }, | ||
| 397 | - // 取消按钮 | ||
| 398 | - cancel() { | ||
| 399 | - this.open = false; | ||
| 400 | - this.openInfo = false; | ||
| 401 | - this.reset(); | ||
| 402 | - }, | ||
| 403 | - // 表单重置 | ||
| 404 | - reset() { | ||
| 405 | - this.fileEntityList = []; | ||
| 406 | - this.form = { | ||
| 407 | - id: null, | ||
| 408 | - number: null, | ||
| 409 | - violationObjectType: null, | ||
| 410 | - owningRegion: null, | ||
| 411 | - violationType: null, | ||
| 412 | - violationGrade: null, | ||
| 413 | - projectName: null, | ||
| 414 | - companyName: null, | ||
| 415 | - describe: null, | ||
| 416 | - sendObject: null, | ||
| 417 | - createTime: null, | ||
| 418 | - createBy: null, | ||
| 419 | - updateTime: null, | ||
| 420 | - updateBy: null, | ||
| 421 | - receive: null, | ||
| 422 | - receiveStatus: 0, | ||
| 423 | - readBy: null, | ||
| 424 | - readTime: null, | ||
| 425 | - replyOne: null, | ||
| 426 | - replyTwo: null, | ||
| 427 | - replyThree: null | ||
| 428 | - }; | ||
| 429 | - this.resetForm("form"); | ||
| 430 | - }, | ||
| 431 | - /** 搜索按钮操作 */ | ||
| 432 | - handleQuery() { | ||
| 433 | - this.queryParams.pageNum = 1; | ||
| 434 | - this.getList(); | ||
| 435 | - }, | ||
| 436 | - /** 重置按钮操作 */ | ||
| 437 | - resetQuery() { | ||
| 438 | - this.resetForm("queryForm"); | ||
| 439 | - this.handleQuery(); | ||
| 440 | - }, | ||
| 441 | - // 多选框选中数据 | ||
| 442 | - handleSelectionChange(selection) { | ||
| 443 | - this.ids = selection.map(item => item.id) | ||
| 444 | - this.single = selection.length!==1 | ||
| 445 | - this.multiple = !selection.length | ||
| 446 | - }, | ||
| 447 | - handleInfo(row){ | ||
| 448 | - this.idInfo = row.id+""; | ||
| 449 | - this.openInfo = true; | ||
| 450 | - this.title = "平台违规案卷详情"; | ||
| 451 | - }, | ||
| 452 | - /** 新增按钮操作 */ | ||
| 453 | - handleAdd() { | ||
| 454 | - this.reset(); | ||
| 455 | - this.open = true; | ||
| 456 | - this.form.number = this.getNumber(); | ||
| 457 | - this.form.violationGrade = "一般类"; | ||
| 458 | - this.form.sendObject = "区管理部门(治)"; | ||
| 459 | - this.title = "添加违规预警信息"; | ||
| 460 | - }, | ||
| 461 | - /** 修改按钮操作 */ | ||
| 462 | - handleUpdate(row) { | ||
| 463 | - this.reset(); | ||
| 464 | - const id = row.id || this.ids | ||
| 465 | - getViolationWarningInformation(id).then(response => { | ||
| 466 | - this.form = response.data.violationWarningInformation; | ||
| 467 | - let files = JSON.stringify(response.data.uploadFiles); | ||
| 468 | - this.fileEntityList = JSON.parse(files.replaceAll("filePath", "url").replaceAll("fileName", "name")) | ||
| 469 | - this.open = true; | ||
| 470 | - this.title = "修改违规预警信息"; | ||
| 471 | - }); | ||
| 472 | - | ||
| 473 | - }, | ||
| 474 | - /** 提交按钮 */ | ||
| 475 | - submitForm() { | ||
| 476 | - this.$refs["form"].validate(valid => { | ||
| 477 | - if (valid) { | ||
| 478 | - if(this.form.sendObject == "运输企业" && this.form.companyName == null){ | ||
| 479 | - | ||
| 480 | - this.$message("请选择相关企业"); | ||
| 481 | - | ||
| 482 | - return; | ||
| 483 | - } | ||
| 484 | - let formData = new FormData(); | ||
| 485 | - let form = this.form; | ||
| 486 | - //去掉params属性 | ||
| 487 | - delete form.params; | ||
| 488 | - formData.append('fileList', null); | ||
| 489 | - //将新增的文件放入formData | ||
| 490 | - this.fileEntityList.forEach(item => { | ||
| 491 | - if(item.id==null){ | ||
| 492 | - formData.append('fileList', item.raw) | ||
| 493 | - } | ||
| 494 | - }) | ||
| 495 | - if (this.form.id != null) { | ||
| 496 | - formData.append("violationWarningInformation", JSON.stringify(form)); | ||
| 497 | - formData.append("uploadFilesList", null); | ||
| 498 | - this.fileEntityList.forEach(item => { | ||
| 499 | - delete item.params; | ||
| 500 | - if(item != "null" && item != null){ | ||
| 501 | - formData.append('uploadFilesList', JSON.stringify(item).replaceAll("url", "filePath").replaceAll("name", "fileName")); | ||
| 502 | - } | ||
| 503 | - }) | ||
| 504 | - updateViolationWarningInformation(formData).then(response => { | ||
| 505 | - this.msgSuccess("修改成功"); | ||
| 506 | - this.open = false; | ||
| 507 | - this.getList(); | ||
| 508 | - }); | ||
| 509 | - } else { | ||
| 510 | - for (let key in form) { | ||
| 511 | - formData.append(key, form[key] == null ? "" : form[key]) | ||
| 512 | - } | ||
| 513 | - addViolationWarningInformation(formData).then(response => { | ||
| 514 | - this.msgSuccess("新增成功"); | ||
| 515 | - this.open = false; | ||
| 516 | - this.getList(); | ||
| 517 | - }); | ||
| 518 | - } | ||
| 519 | - } | ||
| 520 | - }); | ||
| 521 | - }, | ||
| 522 | - /** 删除按钮操作 */ | ||
| 523 | - handleDelete(row) { | ||
| 524 | - const ids = row.id || this.ids; | ||
| 525 | - this.$confirm('是否确认删除违规预警信息编号为"' + ids + '"的数据项?', "警告", { | ||
| 526 | - confirmButtonText: "确定", | ||
| 527 | - cancelButtonText: "取消", | ||
| 528 | - type: "warning" | ||
| 529 | - }).then(function() { | ||
| 530 | - return delViolationWarningInformation(ids); | ||
| 531 | - }).then(() => { | ||
| 532 | - this.getList(); | ||
| 533 | - this.msgSuccess("删除成功"); | ||
| 534 | - }) | ||
| 535 | - }, | ||
| 536 | - /** 导出按钮操作 */ | ||
| 537 | - handleExport() { | ||
| 538 | - const queryParams = this.queryParams; | ||
| 539 | - this.$confirm('是否确认导出所有违规预警信息数据项?', "警告", { | ||
| 540 | - confirmButtonText: "确定", | ||
| 541 | - cancelButtonText: "取消", | ||
| 542 | - type: "warning" | ||
| 543 | - }).then(function() { | ||
| 544 | - return exportViolationWarningInformation(queryParams); | ||
| 545 | - }).then(response => { | ||
| 546 | - this.download(response.message); | ||
| 547 | - }) | ||
| 548 | - }, | ||
| 549 | - /** 生成案卷编号 */ | ||
| 550 | - getNumber(){ | ||
| 551 | - const now = new Date(); | ||
| 552 | - const year = now.getFullYear().toString().slice(-2); // 提取后两位数 | ||
| 553 | - const month = now.getMonth() + 1 < 10 ? `0${now.getMonth() + 1}` : now.getMonth() + 1; | ||
| 554 | - const day = now.getDate() < 10 ? `0${now.getDate()}` : now.getDate(); | ||
| 555 | - const hour = now.getHours() < 10 ? `0${now.getHours()}` : now.getHours(); | ||
| 556 | - const minute = now.getMinutes() < 10 ? `0${now.getMinutes()}` : now.getMinutes(); | ||
| 557 | - const second = now.getSeconds() < 10 ? `0${now.getSeconds()}` : now.getSeconds(); | ||
| 558 | - const millisecond = now.getMilliseconds(); | ||
| 559 | - const code = `${year}${month}${day}${hour}${minute}${second}${millisecond}`; | ||
| 560 | - return code; | ||
| 561 | - }, | ||
| 562 | - projectNameLoadOptions(query) { | ||
| 563 | - // 根据输入的关键字query异步加载选项数据 | ||
| 564 | - this.isLoading = true | ||
| 565 | - setTimeout(() => { | ||
| 566 | - // 模拟异步加载数据 | ||
| 567 | - const data = [ | ||
| 568 | - { name:'项目1' }, | ||
| 569 | - { name:'项目2' }, | ||
| 570 | - { name:'项目3' } | ||
| 571 | - ].filter(item => item.name.includes(query)) | ||
| 572 | - this.projectNameList = data | ||
| 573 | - this.isLoading = false | ||
| 574 | - }, 200) | ||
| 575 | - }, | ||
| 576 | - companyLoadOptions(query) { | ||
| 577 | - // 根据输入的关键字query异步加载选项数据 | ||
| 578 | - this.isLoadingCompany = true | ||
| 579 | - setTimeout(() => { | ||
| 580 | - // 模拟异步加载数据 | ||
| 581 | - const data = [ | ||
| 582 | - { name:'公司1' }, | ||
| 583 | - { name:'公司2' }, | ||
| 584 | - { name:'公司3' } | ||
| 585 | - ].filter(item => item.name.includes(query)) | ||
| 586 | - this.companyList = data | ||
| 587 | - this.isLoadingCompany = false | ||
| 588 | - }, 200) | ||
| 589 | - }, | ||
| 590 | - /** | ||
| 591 | - * 文件改变时,限制文件上传格式和大小 | ||
| 592 | - * 文件格式只能为docx/doc/pdf/png/jpeg/png/jpg | ||
| 593 | - * 大小不超过20M | ||
| 594 | - * */ | ||
| 595 | - fileChange(file, fileList) { | ||
| 596 | - let count = 0; | ||
| 597 | - for (let i = 0; i < fileList.length; i++) { | ||
| 598 | - // console.log(fileList.length) | ||
| 599 | - // console.log(this.fileEntityList[i].name+"111"+file.name) | ||
| 600 | - if (fileList[i].name == file.name) { | ||
| 601 | - count++; | ||
| 602 | - if (count == 2) { | ||
| 603 | - this.$message({ | ||
| 604 | - message: '已存在此文件!', | ||
| 605 | - type: 'warning' | ||
| 606 | - }); | ||
| 607 | - for (let j = fileList.length; j > 0; j--) { | ||
| 608 | - //如果存在此文件,去除新选择的重复文件 | ||
| 609 | - if (fileList[j - 1].name == file.name) { | ||
| 610 | - fileList.splice(j - 1, 1); | ||
| 611 | - i--; | ||
| 612 | - return false; | ||
| 613 | - } | ||
| 614 | - } | ||
| 615 | - } | ||
| 616 | - } | ||
| 617 | - } | ||
| 618 | - let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase(); | ||
| 619 | - //格式符合后判断大小 | ||
| 620 | - if ("docx,doc,pdf,png,jpeg,png,jpg".indexOf(fileType) != -1) { | ||
| 621 | - let max5M = file.size / 1024 / 1024 < 20; | ||
| 622 | - if (!max5M) { | ||
| 623 | - this.$message({ | ||
| 624 | - message: '上传文件大小不得超过20M!', | ||
| 625 | - type: 'warning' | ||
| 626 | - }); | ||
| 627 | - fileList = fileList.splice(fileList.length - 1, 1); | ||
| 628 | - } else { | ||
| 629 | - //符合条件后进行添加 | ||
| 630 | - this.fileEntityList = fileList | ||
| 631 | - } | ||
| 632 | - } else { | ||
| 633 | - this.$message({ | ||
| 634 | - message: '上传文件只能是 docx、doc、pdf、png、jpeg、png、jpg格式!', | ||
| 635 | - type: 'warning' | ||
| 636 | - }); | ||
| 637 | - fileList = fileList.splice(fileList.length - 1, 1); | ||
| 638 | - } | ||
| 639 | - }, | ||
| 640 | - // 删除文件 | ||
| 641 | - handleDeleteFile(index) { | ||
| 642 | - this.fileEntityList.splice(index, 1); | ||
| 643 | - }, | ||
| 644 | - /** 文件下载 */ | ||
| 645 | - downloadFA(row) { | ||
| 646 | - let name = row.name; | ||
| 647 | - let url = row.url; | ||
| 648 | - const a = document.createElement('a') | ||
| 649 | - a.setAttribute('download', name) | ||
| 650 | - a.setAttribute('target', '_blank') | ||
| 651 | - a.setAttribute('href', process.env.VUE_APP_BASE_API + url); | ||
| 652 | - a.click() | ||
| 653 | - }, | ||
| 654 | - /** 生成违规描述 */ | ||
| 655 | - createDescribe(){ | ||
| 656 | - this.rules.companyName = [{ required: true, message: "必填", trigger: "blur" }] | ||
| 657 | - this.rules.projectName = [{ required: true, message: "必填", trigger: "blur" }] | ||
| 658 | - this.$refs["form"].validate(valid => { | ||
| 659 | - if (valid) { | ||
| 660 | - let formData = this.form; | ||
| 661 | - const now = new Date(); | ||
| 662 | - const year = now.getFullYear(); | ||
| 663 | - const month = now.getMonth() + 1 < 10 ? `0${now.getMonth() + 1}` : now.getMonth() + 1; | ||
| 664 | - const day = now.getDate() < 10 ? `0${now.getDate()}` : now.getDate(); | ||
| 665 | - const hour = now.getHours() < 10 ? `0${now.getHours()}` : now.getHours(); | ||
| 666 | - const minute = now.getMinutes() < 10 ? `0${now.getMinutes()}` : now.getMinutes(); | ||
| 667 | - const second = now.getSeconds() < 10 ? `0${now.getSeconds()}` : now.getSeconds(); | ||
| 668 | - const code = `${year}/${month}/${day} ${hour}:${minute}:${second}`; | ||
| 669 | - this.form.describe =code + formData.companyName + "在" + formData.projectName + "出现" + formData.violationType; | ||
| 670 | - this.rules.companyName = null; | ||
| 671 | - this.rules.projectName = null; | ||
| 672 | - } | ||
| 673 | - }); | ||
| 674 | - | ||
| 675 | - } | ||
| 676 | - } | ||
| 677 | -}; | ||
| 678 | -</script> | 254 | +<script src="../../../api/warningInfo"></script> |
| 679 | \ No newline at end of file | 255 | \ No newline at end of file |
trash-ui/src/views/h5/CompanyCredit/index.vue
| @@ -161,254 +161,4 @@ | @@ -161,254 +161,4 @@ | ||
| 161 | </div> | 161 | </div> |
| 162 | </template> | 162 | </template> |
| 163 | 163 | ||
| 164 | -<script> | ||
| 165 | - import { | ||
| 166 | - listCredit, | ||
| 167 | - getCredit, | ||
| 168 | - delCredit, | ||
| 169 | - addCredit, | ||
| 170 | - updateCredit, | ||
| 171 | - exportCredit, | ||
| 172 | - getNames, | ||
| 173 | - getPlaces, | ||
| 174 | - historyCredit | ||
| 175 | - } from "@/api/business/company"; | ||
| 176 | - | ||
| 177 | - import { | ||
| 178 | - companyList, | ||
| 179 | - updateCompany, | ||
| 180 | - } from "@/api/dict"; | ||
| 181 | - | ||
| 182 | - import pagination from '../Pagination'; | ||
| 183 | - | ||
| 184 | - | ||
| 185 | - export default { | ||
| 186 | - name: "Credit", | ||
| 187 | - components: {pagination}, | ||
| 188 | - data() { | ||
| 189 | - return { | ||
| 190 | - // 遮罩层 | ||
| 191 | - loading: true, | ||
| 192 | - // 选中数组 | ||
| 193 | - ids: [], | ||
| 194 | - // 非单个禁用 | ||
| 195 | - single: true, | ||
| 196 | - // 非多个禁用 | ||
| 197 | - multiple: true, | ||
| 198 | - // 显示搜索条件 | ||
| 199 | - showSearch: true, | ||
| 200 | - infoDialog :false, | ||
| 201 | - // 总条数 | ||
| 202 | - total: 0, | ||
| 203 | - // 工地表格数据 | ||
| 204 | - creditList: [], | ||
| 205 | - creditListInfo: [], | ||
| 206 | - companyList:[], | ||
| 207 | - dictNames:[], | ||
| 208 | - dictPlaces:[], | ||
| 209 | - // 弹出层标题 | ||
| 210 | - title: "", | ||
| 211 | - // 是否显示弹出层 | ||
| 212 | - open: false, | ||
| 213 | - isEdit:false, | ||
| 214 | - // 查询参数 | ||
| 215 | - queryParams: { | ||
| 216 | - pageNum: 1, | ||
| 217 | - pageSize: 10, | ||
| 218 | - name: null, | ||
| 219 | - time: null, | ||
| 220 | - place: null, | ||
| 221 | - reason: null, | ||
| 222 | - status: 0, | ||
| 223 | - lostCredit: 1 | ||
| 224 | - }, | ||
| 225 | - // 表单参数 | ||
| 226 | - form: {}, | ||
| 227 | - updateForm:{}, | ||
| 228 | - // 表单校验 | ||
| 229 | - rules: { | ||
| 230 | - name: [ | ||
| 231 | - { required: true, message: '请选择运输企业', trigger: 'change' }, | ||
| 232 | - ], | ||
| 233 | - reason: [ | ||
| 234 | - { required: true, message: '请填写原因', trigger: 'change' }, | ||
| 235 | - ], | ||
| 236 | - }, | ||
| 237 | - rules2: { | ||
| 238 | - reason: [ | ||
| 239 | - { required: true, message: '请填写原因', trigger: 'change' }, | ||
| 240 | - ], | ||
| 241 | - }, | ||
| 242 | - }; | ||
| 243 | - }, | ||
| 244 | - created() { | ||
| 245 | - this.init(); | ||
| 246 | - }, | ||
| 247 | - methods: { | ||
| 248 | - init(){ | ||
| 249 | - this.resetQuery(); | ||
| 250 | - this.getList(); | ||
| 251 | - getNames(this.queryParams).then(response => { | ||
| 252 | - this.dictNames = response; | ||
| 253 | - }); | ||
| 254 | - getPlaces(this.queryParams).then(response => { | ||
| 255 | - this.dictPlaces = response; | ||
| 256 | - }); | ||
| 257 | - | ||
| 258 | - let query = { | ||
| 259 | - 'page':1, | ||
| 260 | - 'size':9999, | ||
| 261 | - 'creditStatus':0 | ||
| 262 | - } | ||
| 263 | - companyList(query).then(response => { | ||
| 264 | - | ||
| 265 | - this.companyList = response.result.list; | ||
| 266 | - }); | ||
| 267 | - }, | ||
| 268 | - getDataInfo(row){ | ||
| 269 | - let param ={"objectId":row.objectId} | ||
| 270 | - | ||
| 271 | - listCredit(param).then(response => { | ||
| 272 | - this.creditListInfo = response.rows; | ||
| 273 | - this.infoDialog = true; | ||
| 274 | - }); | ||
| 275 | - | ||
| 276 | - }, | ||
| 277 | - getData(stauts){ | ||
| 278 | - this.queryParams.status=0; | ||
| 279 | - this.queryParams.lostCredit=stauts; | ||
| 280 | - this.getList(); | ||
| 281 | - }, | ||
| 282 | - getHistoryData(){ | ||
| 283 | - this.queryParams.status=1; | ||
| 284 | - this.getList(); | ||
| 285 | - }, | ||
| 286 | - colStyle(obj){ | ||
| 287 | - if(obj.column.property == "id"){ | ||
| 288 | - return {background:"#f8f8f9"} | ||
| 289 | - } | ||
| 290 | - }, | ||
| 291 | - getObjId(a){ | ||
| 292 | - this.form.objectId = a.id; | ||
| 293 | - this.form.place = a.areaName; | ||
| 294 | - }, | ||
| 295 | - getList() { | ||
| 296 | - this.loading = true; | ||
| 297 | - if(this.queryParams.status==0){ | ||
| 298 | - listCredit(this.queryParams).then(response => { | ||
| 299 | - this.creditList = response.rows; | ||
| 300 | - this.total = response.total; | ||
| 301 | - this.loading = false; | ||
| 302 | - }); | ||
| 303 | - } | ||
| 304 | - if(this.queryParams.status==1){ | ||
| 305 | - historyCredit(this.queryParams).then(response => { | ||
| 306 | - this.creditList = response.rows; | ||
| 307 | - this.total = response.total; | ||
| 308 | - this.loading = false; | ||
| 309 | - }); | ||
| 310 | - } | ||
| 311 | - | ||
| 312 | - }, | ||
| 313 | - // 取消按钮 | ||
| 314 | - cancel() { | ||
| 315 | - this.open = false; | ||
| 316 | - this.isEdit = false; | ||
| 317 | - this.reset(); | ||
| 318 | - }, | ||
| 319 | - // 表单重置 | ||
| 320 | - reset() { | ||
| 321 | - this.form = { | ||
| 322 | - id: null, | ||
| 323 | - name: null, | ||
| 324 | - time: null, | ||
| 325 | - place: null, | ||
| 326 | - reason: null, | ||
| 327 | - lostCredit: null, | ||
| 328 | - objectId: null, | ||
| 329 | - }; | ||
| 330 | - this.resetForm("form"); | ||
| 331 | - }, | ||
| 332 | - /** 搜索按钮操作 */ | ||
| 333 | - handleQuery() { | ||
| 334 | - this.queryParams.pageNum = 1; | ||
| 335 | - this.getList(); | ||
| 336 | - }, | ||
| 337 | - /** 重置按钮操作 */ | ||
| 338 | - resetQuery() { | ||
| 339 | - this.resetForm("queryForm"); | ||
| 340 | - console.log(this.queryParams); | ||
| 341 | - this.handleQuery(); | ||
| 342 | - }, | ||
| 343 | - // 多选框选中数据 | ||
| 344 | - handleSelectionChange(selection) { | ||
| 345 | - this.ids = selection.map(item => item.id) | ||
| 346 | - this.single = selection.length !== 1 | ||
| 347 | - this.multiple = !selection.length | ||
| 348 | - }, | ||
| 349 | - /** 新增按钮操作 */ | ||
| 350 | - handleAdd() { | ||
| 351 | - this.reset(); | ||
| 352 | - this.open = true; | ||
| 353 | - this.title = "企业信息录入"; | ||
| 354 | - }, | ||
| 355 | - /** 修改按钮操作 */ | ||
| 356 | - handleUpdate(row) { | ||
| 357 | - this.reset(); | ||
| 358 | - const id = row.id || this.ids | ||
| 359 | - getCredit(id).then(response => { | ||
| 360 | - this.form = response.data; | ||
| 361 | - this.isEdit = true; | ||
| 362 | - }); | ||
| 363 | - }, | ||
| 364 | - /** 提交按钮 */ | ||
| 365 | - submitForm() { | ||
| 366 | - if(this.isEdit){ | ||
| 367 | - this.$refs["updateForm"].validate(valid => { | ||
| 368 | - if (valid) { | ||
| 369 | - this.loading = true; | ||
| 370 | - this.form.lostCredit = 0; | ||
| 371 | - this.updateForm.id = this.form.id; | ||
| 372 | - let data = [{id:this.form.objectId,dishonestState:this.form.lostCredit}]; | ||
| 373 | - updateCompany(data).then(res=>{ | ||
| 374 | - updateCredit(this.updateForm).then(response => { | ||
| 375 | - this.msgSuccess("撤销成功"); | ||
| 376 | - this.isEdit = false; | ||
| 377 | - this.updateForm = {}; | ||
| 378 | - this.init(); | ||
| 379 | - }); | ||
| 380 | - }); | ||
| 381 | - } | ||
| 382 | - }); | ||
| 383 | - }else{ | ||
| 384 | - this.$refs["form"].validate(valid => { | ||
| 385 | - if (valid) { | ||
| 386 | - this.loading = true; | ||
| 387 | - this.form.lostCredit = 1; | ||
| 388 | - let data = [{id:this.form.objectId,dishonestState:this.form.lostCredit}]; | ||
| 389 | - updateCompany(data).then(res=>{ | ||
| 390 | - addCredit(this.form).then(response => { | ||
| 391 | - this.msgSuccess("新增成功"); | ||
| 392 | - this.open = false; | ||
| 393 | - this.init(); | ||
| 394 | - }); | ||
| 395 | - }); | ||
| 396 | - } | ||
| 397 | - }); | ||
| 398 | - } | ||
| 399 | - }, | ||
| 400 | - handleExport() { | ||
| 401 | - const queryParams = this.queryParams; | ||
| 402 | - this.$confirm('是否确认导出所有企业数据项?', "警告", { | ||
| 403 | - confirmButtonText: "确定", | ||
| 404 | - cancelButtonText: "取消", | ||
| 405 | - type: "warning" | ||
| 406 | - }).then(function() { | ||
| 407 | - return exportCredit(queryParams); | ||
| 408 | - }).then(response => { | ||
| 409 | - this.download(response.message); | ||
| 410 | - }) | ||
| 411 | - } | ||
| 412 | - } | ||
| 413 | - }; | ||
| 414 | -</script> | 164 | +<script src="../../../api/company_credit.js" /> |
| 415 | \ No newline at end of file | 165 | \ No newline at end of file |
trash-ui/src/views/h5/ConstructionCredit/index.vue
| @@ -164,299 +164,5 @@ | @@ -164,299 +164,5 @@ | ||
| 164 | </div> | 164 | </div> |
| 165 | </template> | 165 | </template> |
| 166 | 166 | ||
| 167 | -<script> | ||
| 168 | - import { | ||
| 169 | - listCredit, | ||
| 170 | - getCredit, | ||
| 171 | - delCredit, | ||
| 172 | - addCredit, | ||
| 173 | - updateCredit, | ||
| 174 | - exportCredit, | ||
| 175 | - getNames, | ||
| 176 | - getTypes, | ||
| 177 | - getPlaces, | ||
| 178 | - historyCredit | ||
| 179 | - } from "@/api/business/constructionsites"; | ||
| 180 | 167 | ||
| 181 | -import pagination from '../Pagination'; | ||
| 182 | - | ||
| 183 | - import { | ||
| 184 | - constructionsitesList, | ||
| 185 | - getDict, | ||
| 186 | - getArea, | ||
| 187 | - updateConstructionsites | ||
| 188 | - } from "@/api/dict"; | ||
| 189 | - | ||
| 190 | - export default { | ||
| 191 | - name: "ConstructionCredit", | ||
| 192 | - components: {pagination}, | ||
| 193 | - data() { | ||
| 194 | - return { | ||
| 195 | - // 遮罩层 | ||
| 196 | - loading: true, | ||
| 197 | - // 选中数组 | ||
| 198 | - ids: [], | ||
| 199 | - // 非单个禁用 | ||
| 200 | - single: true, | ||
| 201 | - // 非多个禁用 | ||
| 202 | - multiple: true, | ||
| 203 | - // 显示搜索条件 | ||
| 204 | - showSearch: true, | ||
| 205 | - infoDialog: false, | ||
| 206 | - // 总条数 | ||
| 207 | - total: 0, | ||
| 208 | - // 工地表格数据 | ||
| 209 | - creditList: [], | ||
| 210 | - creditListInfo: [], | ||
| 211 | - dictNames: [], | ||
| 212 | - dictTypes: [], | ||
| 213 | - dictPlaces: [], | ||
| 214 | - // 弹出层标题 | ||
| 215 | - title: "", | ||
| 216 | - // 是否显示弹出层 | ||
| 217 | - open: false, | ||
| 218 | - isEdit: false, | ||
| 219 | - // 查询参数 | ||
| 220 | - queryParams: { | ||
| 221 | - pageNum: 1, | ||
| 222 | - pageSize: 10, | ||
| 223 | - name: null, | ||
| 224 | - type: null, | ||
| 225 | - time: null, | ||
| 226 | - place: null, | ||
| 227 | - reason: null, | ||
| 228 | - status: 0, | ||
| 229 | - lostCredit: 1, | ||
| 230 | - }, | ||
| 231 | - // 表单参数 | ||
| 232 | - form: { | ||
| 233 | - }, | ||
| 234 | - updateForm: {}, | ||
| 235 | - //建筑垃圾类型集合 | ||
| 236 | - trashTypes: [], | ||
| 237 | - constructionList: [], | ||
| 238 | - // 表单校验 | ||
| 239 | - rules: { | ||
| 240 | - name: [{ | ||
| 241 | - required: true, | ||
| 242 | - message: '请选择工地', | ||
| 243 | - trigger: 'change' | ||
| 244 | - }, ], | ||
| 245 | - reason: [{ | ||
| 246 | - required: true, | ||
| 247 | - message: '请填写原因', | ||
| 248 | - trigger: 'change' | ||
| 249 | - }, ] | ||
| 250 | - }, | ||
| 251 | - areas:[], | ||
| 252 | - }; | ||
| 253 | - | ||
| 254 | - | ||
| 255 | - }, | ||
| 256 | - created() { | ||
| 257 | - | ||
| 258 | - getArea().then(res => { | ||
| 259 | - this.areas = res.result; | ||
| 260 | - }); | ||
| 261 | - | ||
| 262 | - getDict({'type': 'CSDisSiteDisposalType'}).then(response => { | ||
| 263 | - this.trashTypes = response.result; | ||
| 264 | - }); | ||
| 265 | - | ||
| 266 | - this.init(); | ||
| 267 | - | ||
| 268 | - }, | ||
| 269 | - methods: { | ||
| 270 | - init(){ | ||
| 271 | - this.reset(); | ||
| 272 | - this.resetQuery(); | ||
| 273 | - this.getList(); | ||
| 274 | - this.getNamesData(); | ||
| 275 | - this.getTypesData(); | ||
| 276 | - this.getPlacesData(); | ||
| 277 | - | ||
| 278 | - let query = { | ||
| 279 | - 'page': 1, | ||
| 280 | - 'size': 9999, | ||
| 281 | - 'creditStatus': 0 | ||
| 282 | - }; | ||
| 283 | - constructionsitesList(query).then(response => { | ||
| 284 | - this.constructionList = response.result.list | ||
| 285 | - }); | ||
| 286 | - }, | ||
| 287 | - getList() { | ||
| 288 | - this.loading = true; | ||
| 289 | - if (this.queryParams.status == 0) { | ||
| 290 | - listCredit(this.queryParams).then(response => { | ||
| 291 | - this.creditList = response.rows; | ||
| 292 | - this.total = response.total; | ||
| 293 | - this.loading = false; | ||
| 294 | - }); | ||
| 295 | - } | ||
| 296 | - if (this.queryParams.status == 1) { | ||
| 297 | - historyCredit(this.queryParams).then(response => { | ||
| 298 | - this.creditList = response.rows; | ||
| 299 | - this.total = response.total; | ||
| 300 | - this.loading = false; | ||
| 301 | - }); | ||
| 302 | - } | ||
| 303 | - }, | ||
| 304 | - getDataInfo(row) { | ||
| 305 | - let param = { | ||
| 306 | - "objectId": row.objectId | ||
| 307 | - } | ||
| 308 | - listCredit(param).then(response => { | ||
| 309 | - this.creditListInfo = response.rows; | ||
| 310 | - this.infoDialog = true; | ||
| 311 | - }); | ||
| 312 | - }, | ||
| 313 | - getNamesData() { | ||
| 314 | - getNames(this.queryParams).then(response => { | ||
| 315 | - this.dictNames = response; | ||
| 316 | - }); | ||
| 317 | - }, | ||
| 318 | - getTypesData() { | ||
| 319 | - getTypes(this.queryParams).then(response => { | ||
| 320 | - this.dictTypes = response; | ||
| 321 | - }); | ||
| 322 | - }, | ||
| 323 | - getPlacesData() { | ||
| 324 | - getPlaces(this.queryParams).then(response => { | ||
| 325 | - this.dictPlaces = response; | ||
| 326 | - }); | ||
| 327 | - }, | ||
| 328 | - getData(stauts) { | ||
| 329 | - this.queryParams.status = 0; | ||
| 330 | - this.queryParams.lostCredit = stauts; | ||
| 331 | - this.init(); | ||
| 332 | - }, | ||
| 333 | - getHistoryData() { | ||
| 334 | - this.queryParams.status = 1; | ||
| 335 | - this.init(); | ||
| 336 | - }, | ||
| 337 | - colStyle(obj) { | ||
| 338 | - if (obj.column.property == "id") { | ||
| 339 | - return { | ||
| 340 | - background: "#f8f8f9" | ||
| 341 | - } | ||
| 342 | - } | ||
| 343 | - }, | ||
| 344 | - getObjId(object) { | ||
| 345 | - | ||
| 346 | - this.form.objectId = object.id; | ||
| 347 | - | ||
| 348 | - for(let i in this.areas){ | ||
| 349 | - if(this.areas[i].code == Number(object.areaCode)){ | ||
| 350 | - this.form.place = this.areas[i].name; | ||
| 351 | - break; | ||
| 352 | - } | ||
| 353 | - } | ||
| 354 | - for(let i in this.trashTypes){ | ||
| 355 | - if(this.trashTypes[i].code == Number(object.cargoId)){ | ||
| 356 | - this.form.type = this.trashTypes[i].name; | ||
| 357 | - break; | ||
| 358 | - } | ||
| 359 | - } | ||
| 360 | - }, | ||
| 361 | - // 取消按钮 | ||
| 362 | - cancel() { | ||
| 363 | - this.open = false; | ||
| 364 | - this.isEdit = false; | ||
| 365 | - this.reset(); | ||
| 366 | - }, | ||
| 367 | - // 表单重置 | ||
| 368 | - reset() { | ||
| 369 | - this.form = { | ||
| 370 | - id: null, | ||
| 371 | - name: null, | ||
| 372 | - type: null, | ||
| 373 | - time: null, | ||
| 374 | - place: null, | ||
| 375 | - reason: null, | ||
| 376 | - lostCredit: null, | ||
| 377 | - objectId: null, | ||
| 378 | - }; | ||
| 379 | - this.updateForm = { | ||
| 380 | - reason:null, | ||
| 381 | - }; | ||
| 382 | - this.resetForm("updateForm"); | ||
| 383 | - this.resetForm("form"); | ||
| 384 | - }, | ||
| 385 | - /** 搜索按钮操作 */ | ||
| 386 | - handleQuery() { | ||
| 387 | - this.queryParams.pageNum = 1; | ||
| 388 | - this.getList(); | ||
| 389 | - }, | ||
| 390 | - /** 重置按钮操作 */ | ||
| 391 | - resetQuery() { | ||
| 392 | - this.resetForm("queryForm"); | ||
| 393 | - console.log(this.queryParams); | ||
| 394 | - this.handleQuery(); | ||
| 395 | - }, | ||
| 396 | - // 多选框选中数据 | ||
| 397 | - handleSelectionChange(selection) { | ||
| 398 | - this.ids = selection.map(item => item.id) | ||
| 399 | - this.single = selection.length !== 1 | ||
| 400 | - this.multiple = !selection.length | ||
| 401 | - }, | ||
| 402 | - /** 新增按钮操作 */ | ||
| 403 | - handleAdd() { | ||
| 404 | - this.reset(); | ||
| 405 | - this.open = true; | ||
| 406 | - this.title = "添加工地"; | ||
| 407 | - }, | ||
| 408 | - /** 修改按钮操作 */ | ||
| 409 | - handleUpdate(row) { | ||
| 410 | - this.reset(); | ||
| 411 | - const id = row.id || this.ids | ||
| 412 | - getCredit(id).then(response => { | ||
| 413 | - this.form = response.data; | ||
| 414 | - this.isEdit = true; | ||
| 415 | - }); | ||
| 416 | - }, | ||
| 417 | - /** 提交按钮 */ | ||
| 418 | - submitForm() { | ||
| 419 | - this.$refs["form"].validate(valid => { | ||
| 420 | - if (valid) { | ||
| 421 | - this.loading = true; | ||
| 422 | - if (this.form.id != null) { | ||
| 423 | - this.form.lostCredit = 0; | ||
| 424 | - let data = [{creditStatus:this.form.lostCredit,objectId:this.form.objectId}]; | ||
| 425 | - | ||
| 426 | - updateConstructionsites(data).then(response=>{ | ||
| 427 | - this.updateForm.id = this.form.id; | ||
| 428 | - updateCredit(this.updateForm).then(response => { | ||
| 429 | - this.msgSuccess("撤销成功"); | ||
| 430 | - this.isEdit = false; | ||
| 431 | - this.init(); | ||
| 432 | - }); | ||
| 433 | - }); | ||
| 434 | - } else { | ||
| 435 | - this.form.lostCredit = 1; | ||
| 436 | - let data = [{creditStatus:this.form.lostCredit,objectId:this.form.objectId}]; | ||
| 437 | - updateConstructionsites(data).then(response=>{ | ||
| 438 | - addCredit(this.form).then(response => { | ||
| 439 | - this.msgSuccess("新增成功"); | ||
| 440 | - this.open = false; | ||
| 441 | - this.init(); | ||
| 442 | - }); | ||
| 443 | - }); | ||
| 444 | - } | ||
| 445 | - } | ||
| 446 | - }); | ||
| 447 | - }, | ||
| 448 | - handleExport() { | ||
| 449 | - const queryParams = this.queryParams; | ||
| 450 | - this.$confirm('是否确认导出所有工地数据项?', "警告", { | ||
| 451 | - confirmButtonText: "确定", | ||
| 452 | - cancelButtonText: "取消", | ||
| 453 | - type: "warning" | ||
| 454 | - }).then(function() { | ||
| 455 | - return exportCredit(queryParams); | ||
| 456 | - }).then(response => { | ||
| 457 | - this.download(response.message); | ||
| 458 | - }) | ||
| 459 | - } | ||
| 460 | - } | ||
| 461 | - }; | ||
| 462 | -</script> | 168 | +<script src="../../../api/construction_credit.js" /> |
| 463 | \ No newline at end of file | 169 | \ No newline at end of file |
trash-ui/src/views/h5/DriverCredit/index.vue
| @@ -95,9 +95,9 @@ | @@ -95,9 +95,9 @@ | ||
| 95 | v-model="form.name" | 95 | v-model="form.name" |
| 96 | filterable | 96 | filterable |
| 97 | reserve-keyword | 97 | reserve-keyword |
| 98 | - placeholder="驾驶员姓名"> | 98 | + placeholder="驾驶员姓名" |
| 99 | + @change="getObjId"> | ||
| 99 | <el-option | 100 | <el-option |
| 100 | - @click.native="getObjId(item)" | ||
| 101 | v-for="item in driverList" | 101 | v-for="item in driverList" |
| 102 | :key="item.id" | 102 | :key="item.id" |
| 103 | :label="item.name" | 103 | :label="item.name" |
| @@ -150,256 +150,4 @@ | @@ -150,256 +150,4 @@ | ||
| 150 | </div> | 150 | </div> |
| 151 | </template> | 151 | </template> |
| 152 | 152 | ||
| 153 | -<script> | ||
| 154 | -import { | ||
| 155 | - listCredit, | ||
| 156 | - getCredit, | ||
| 157 | - delCredit, | ||
| 158 | - addCredit, | ||
| 159 | - updateCredit, | ||
| 160 | - exportCredit, | ||
| 161 | - getNames, | ||
| 162 | - historyCredit | ||
| 163 | -} from "@/api/business/driver"; | ||
| 164 | - | ||
| 165 | -import { | ||
| 166 | - companyList, | ||
| 167 | - driverList | ||
| 168 | -} from "@/api/dict"; | ||
| 169 | - | ||
| 170 | -import pagination from '../Pagination'; | ||
| 171 | -export default { | ||
| 172 | - name: "ConstructionCredit", | ||
| 173 | - components: {pagination}, | ||
| 174 | - data() { | ||
| 175 | - return { | ||
| 176 | - // 遮罩层 | ||
| 177 | - loading: true, | ||
| 178 | - // 选中数组 | ||
| 179 | - ids: [], | ||
| 180 | - // 非单个禁用 | ||
| 181 | - single: true, | ||
| 182 | - // 非多个禁用 | ||
| 183 | - multiple: true, | ||
| 184 | - // 显示搜索条件 | ||
| 185 | - showSearch: true, | ||
| 186 | - infoDialog :false, | ||
| 187 | - // 总条数 | ||
| 188 | - total: 0, | ||
| 189 | - // 工地表格数据 | ||
| 190 | - creditList: [], | ||
| 191 | - creditListInfo: [], | ||
| 192 | - dictNames:[], | ||
| 193 | - dictTypes:[], | ||
| 194 | - dictPlaces:[], | ||
| 195 | - driverList:[], | ||
| 196 | - names:[], | ||
| 197 | - idNumbers:[], | ||
| 198 | - places:[], | ||
| 199 | - // 弹出层标题 | ||
| 200 | - title: "", | ||
| 201 | - // 是否显示弹出层 | ||
| 202 | - open: false, | ||
| 203 | - isEdit:false, | ||
| 204 | - // 查询参数 | ||
| 205 | - queryParams: { | ||
| 206 | - pageNum: 1, | ||
| 207 | - pageSize: 10, | ||
| 208 | - name: null, | ||
| 209 | - idNumber: null, | ||
| 210 | - time: null, | ||
| 211 | - reason: null, | ||
| 212 | - status: 0, | ||
| 213 | - lostCredit: 1 | ||
| 214 | - }, | ||
| 215 | - // 表单参数 | ||
| 216 | - form: {}, | ||
| 217 | - updateForm:{}, | ||
| 218 | - // 表单校验 | ||
| 219 | - rules: {name: [ | ||
| 220 | - { required: true, message: '请选择驾驶员', trigger: 'change' }, | ||
| 221 | - ],reason: [ | ||
| 222 | - { required: true, message: '请填写原因', trigger: 'change' }, | ||
| 223 | - ]} | ||
| 224 | - }; | ||
| 225 | - }, | ||
| 226 | - created() { | ||
| 227 | - this.init(); | ||
| 228 | - }, | ||
| 229 | - methods: { | ||
| 230 | - init(){ | ||
| 231 | - this.reset(); | ||
| 232 | - | ||
| 233 | - this.resetQuery(); | ||
| 234 | - this.getList(); | ||
| 235 | - this.getNamesData(); | ||
| 236 | - | ||
| 237 | - let query = { | ||
| 238 | - 'page':1, | ||
| 239 | - 'size':9999, | ||
| 240 | - 'creditStatus':0 | ||
| 241 | - } | ||
| 242 | - | ||
| 243 | - companyList(query).then(response => { | ||
| 244 | - | ||
| 245 | - let companys = response.result.list; | ||
| 246 | - | ||
| 247 | - let ids = []; | ||
| 248 | - | ||
| 249 | - for(let i = 0 ;i<companys.length;i++){ | ||
| 250 | - ids.push(companys[i].id); | ||
| 251 | - } | ||
| 252 | - query.companyIds = ids + ""; | ||
| 253 | - query.status = 3; | ||
| 254 | - | ||
| 255 | - driverList(query).then(res=>{ | ||
| 256 | - | ||
| 257 | - this.driverList = res.result; | ||
| 258 | - | ||
| 259 | - }); | ||
| 260 | - | ||
| 261 | - }); | ||
| 262 | - }, | ||
| 263 | - getDataInfo(row){ | ||
| 264 | - let param ={"objectId":row.objectId} | ||
| 265 | - listCredit(param).then(response => { | ||
| 266 | - this.creditListInfo = response.rows; | ||
| 267 | - this.infoDialog = true; | ||
| 268 | - }); | ||
| 269 | - | ||
| 270 | - }, | ||
| 271 | - getNamesData(){ | ||
| 272 | - getNames(this.queryParams).then(response => { | ||
| 273 | - this.dictNames = response; | ||
| 274 | - }); | ||
| 275 | - }, | ||
| 276 | - getData(stauts){ | ||
| 277 | - this.queryParams.status=0; | ||
| 278 | - this.queryParams.lostCredit=stauts; | ||
| 279 | - this.getList(); | ||
| 280 | - }, | ||
| 281 | - getHistoryData(){ | ||
| 282 | - this.queryParams.status=1; | ||
| 283 | - this.init(); | ||
| 284 | - }, | ||
| 285 | - colStyle(obj){ | ||
| 286 | - if(obj.column.property == "id"){ | ||
| 287 | - return {background:"#f8f8f9"} | ||
| 288 | - } | ||
| 289 | - }, | ||
| 290 | - getObjId(a){ | ||
| 291 | - this.form.objectId = a.id; | ||
| 292 | - this.form.idNumber = a.identityNo; | ||
| 293 | - }, | ||
| 294 | - getList() { | ||
| 295 | - this.loading = true; | ||
| 296 | - if(this.queryParams.status==0){ | ||
| 297 | - listCredit(this.queryParams).then(response => { | ||
| 298 | - this.creditList = response.rows; | ||
| 299 | - this.total = response.total; | ||
| 300 | - this.loading = false; | ||
| 301 | - }); | ||
| 302 | - } | ||
| 303 | - if(this.queryParams.status==1){ | ||
| 304 | - historyCredit(this.queryParams).then(response => { | ||
| 305 | - this.creditList = response.rows; | ||
| 306 | - this.total = response.total; | ||
| 307 | - this.loading = false; | ||
| 308 | - }); | ||
| 309 | - } | ||
| 310 | - | ||
| 311 | - }, | ||
| 312 | - // 取消按钮 | ||
| 313 | - cancel() { | ||
| 314 | - this.open = false; | ||
| 315 | - this.isEdit = false; | ||
| 316 | - this.reset(); | ||
| 317 | - }, | ||
| 318 | - // 表单重置 | ||
| 319 | - reset() { | ||
| 320 | - this.form = { | ||
| 321 | - id: null, | ||
| 322 | - name: null, | ||
| 323 | - idNumber: null, | ||
| 324 | - time: null, | ||
| 325 | - reason: null, | ||
| 326 | - lostCredit: null, | ||
| 327 | - objectId: null, | ||
| 328 | - }; | ||
| 329 | - this.updateForm = {}; | ||
| 330 | - this.resetForm("form"); | ||
| 331 | - }, | ||
| 332 | - /** 搜索按钮操作 */ | ||
| 333 | - handleQuery() { | ||
| 334 | - this.queryParams.pageNum = 1; | ||
| 335 | - this.getList(); | ||
| 336 | - }, | ||
| 337 | - /** 重置按钮操作 */ | ||
| 338 | - resetQuery() { | ||
| 339 | - this.resetForm("queryForm"); | ||
| 340 | - console.log(this.queryParams); | ||
| 341 | - this.handleQuery(); | ||
| 342 | - }, | ||
| 343 | - // 多选框选中数据 | ||
| 344 | - handleSelectionChange(selection) { | ||
| 345 | - this.ids = selection.map(item => item.id) | ||
| 346 | - this.single = selection.length !== 1 | ||
| 347 | - this.multiple = !selection.length | ||
| 348 | - }, | ||
| 349 | - /** 新增按钮操作 */ | ||
| 350 | - handleAdd() { | ||
| 351 | - this.reset(); | ||
| 352 | - this.open = true; | ||
| 353 | - this.title = "添加驾驶员"; | ||
| 354 | - }, | ||
| 355 | - /** 修改按钮操作 */ | ||
| 356 | - handleUpdate(row) { | ||
| 357 | - this.reset(); | ||
| 358 | - const id = row.id || this.ids | ||
| 359 | - getCredit(id).then(response => { | ||
| 360 | - this.form = response.data; | ||
| 361 | - this.isEdit = true; | ||
| 362 | - }); | ||
| 363 | - }, | ||
| 364 | - /** 提交按钮 */ | ||
| 365 | - submitForm() { | ||
| 366 | - if(this.open){ | ||
| 367 | - this.updateForm.reason = "1"; | ||
| 368 | - } | ||
| 369 | - this.$refs["form"].validate(valid => { | ||
| 370 | - if (valid) { | ||
| 371 | - | ||
| 372 | - this.loading = true; | ||
| 373 | - if (this.form.id != null) { | ||
| 374 | - this.updateForm.id = this.form.id; | ||
| 375 | - updateCredit(this.updateForm).then(response => { | ||
| 376 | - this.msgSuccess("撤销成功"); | ||
| 377 | - this.isEdit = false; | ||
| 378 | - this.init(); | ||
| 379 | - }); | ||
| 380 | - } else { | ||
| 381 | - this.form.lostCredit = 1; | ||
| 382 | - addCredit(this.form).then(response => { | ||
| 383 | - this.msgSuccess("新增成功"); | ||
| 384 | - this.open = false; | ||
| 385 | - this.init(); | ||
| 386 | - }); | ||
| 387 | - } | ||
| 388 | - } | ||
| 389 | - }); | ||
| 390 | - }, | ||
| 391 | - handleExport() { | ||
| 392 | - const queryParams = this.queryParams; | ||
| 393 | - this.$confirm('是否确认导出所有驾驶员数据项?', "警告", { | ||
| 394 | - confirmButtonText: "确定", | ||
| 395 | - cancelButtonText: "取消", | ||
| 396 | - type: "warning" | ||
| 397 | - }).then(function() { | ||
| 398 | - return exportCredit(queryParams); | ||
| 399 | - }).then(response => { | ||
| 400 | - this.download(response.message); | ||
| 401 | - }) | ||
| 402 | - } | ||
| 403 | - } | ||
| 404 | -}; | ||
| 405 | -</script> | 153 | +<script src="../../../api/driver_credit.js" /> |
trash-ui/src/views/h5/EarthSitesCredit/index.vue
| @@ -172,265 +172,5 @@ | @@ -172,265 +172,5 @@ | ||
| 172 | </div> | 172 | </div> |
| 173 | </template> | 173 | </template> |
| 174 | 174 | ||
| 175 | -<script> | ||
| 176 | -import { | ||
| 177 | - listCredit, | ||
| 178 | - getCredit, | ||
| 179 | - delCredit, | ||
| 180 | - addCredit, | ||
| 181 | - updateCredit, | ||
| 182 | - exportCredit, | ||
| 183 | - getNames, | ||
| 184 | - getTypes, | ||
| 185 | - getPlaces, | ||
| 186 | - historyCredit | ||
| 187 | -} from "@/api/business/earthsites"; | ||
| 188 | 175 | ||
| 189 | -import { | ||
| 190 | - earthsitesList, | ||
| 191 | - updateEarthsites | ||
| 192 | -} from "@/api/dict"; | ||
| 193 | - | ||
| 194 | -import requestRemote from '@/utils/requestRemote' | ||
| 195 | - | ||
| 196 | -import pagination from '../Pagination'; | ||
| 197 | -export default { | ||
| 198 | - name: "EarthSitesCredit", | ||
| 199 | - components: {pagination}, | ||
| 200 | - data() { | ||
| 201 | - return { | ||
| 202 | - // 遮罩层 | ||
| 203 | - loading: true, | ||
| 204 | - // 选中数组 | ||
| 205 | - ids: [], | ||
| 206 | - // 非单个禁用 | ||
| 207 | - single: true, | ||
| 208 | - // 非多个禁用 | ||
| 209 | - multiple: true, | ||
| 210 | - // 显示搜索条件 | ||
| 211 | - showSearch: true, | ||
| 212 | - infoDialog :false, | ||
| 213 | - // 总条数 | ||
| 214 | - total: 0, | ||
| 215 | - // 工地表格数据 | ||
| 216 | - creditList: [], | ||
| 217 | - creditListInfo: [], | ||
| 218 | - earthsitesList:[], | ||
| 219 | - dictNames:[], | ||
| 220 | - dictTypes:[], | ||
| 221 | - dictPlaces:[], | ||
| 222 | - names:[], | ||
| 223 | - // 弹出层标题 | ||
| 224 | - title: "", | ||
| 225 | - // 是否显示弹出层 | ||
| 226 | - open: false, | ||
| 227 | - isEdit:false, | ||
| 228 | - // 查询参数 | ||
| 229 | - queryParams: { | ||
| 230 | - pageNum: 1, | ||
| 231 | - pageSize: 10, | ||
| 232 | - name: null, | ||
| 233 | - type: null, | ||
| 234 | - time: null, | ||
| 235 | - place: null, | ||
| 236 | - reason: null, | ||
| 237 | - status: 0, | ||
| 238 | - lostCredit: 1 | ||
| 239 | - }, | ||
| 240 | - // 表单参数 | ||
| 241 | - form: {}, | ||
| 242 | - updateForm:{}, | ||
| 243 | - // 表单校验 | ||
| 244 | - rules: {name: [ | ||
| 245 | - { required: true, message: '请选择消纳场', trigger: 'change' }, | ||
| 246 | - ],reason: [ | ||
| 247 | - { required: true, message: '请填写原因', trigger: 'change' }, | ||
| 248 | - ]} | ||
| 249 | - }; | ||
| 250 | - }, | ||
| 251 | - created() { | ||
| 252 | - this.init(); | ||
| 253 | - }, | ||
| 254 | - methods: { | ||
| 255 | - init(){ | ||
| 256 | - this.resetQuery(); | ||
| 257 | - this.reset(); | ||
| 258 | - this.getList(); | ||
| 259 | - this.getNamesData(); | ||
| 260 | - this.getTypesData(); | ||
| 261 | - this.getPlacesData(); | ||
| 262 | - | ||
| 263 | - let query = { | ||
| 264 | - 'page': 1, | ||
| 265 | - 'size': 9999, | ||
| 266 | - 'creditStatus': 0 | ||
| 267 | - }; | ||
| 268 | - earthsitesList(query).then(response => { | ||
| 269 | - this.earthsitesList = response.result.list | ||
| 270 | - }); | ||
| 271 | - }, | ||
| 272 | - getDataInfo(row){ | ||
| 273 | - let param ={"objectId":row.objectId} | ||
| 274 | - listCredit(param).then(response => { | ||
| 275 | - this.creditListInfo = response.rows; | ||
| 276 | - this.infoDialog = true; | ||
| 277 | - }); | ||
| 278 | - | ||
| 279 | - }, | ||
| 280 | - getNamesData(){ | ||
| 281 | - getNames(this.queryParams).then(response => { | ||
| 282 | - this.dictNames = response; | ||
| 283 | - }); | ||
| 284 | - }, | ||
| 285 | - getTypesData() { | ||
| 286 | - getTypes(this.queryParams).then(response => { | ||
| 287 | - this.dictTypes = response; | ||
| 288 | - }); | ||
| 289 | - }, | ||
| 290 | - getPlacesData() { | ||
| 291 | - getPlaces(this.queryParams).then(response => { | ||
| 292 | - this.dictPlaces = response; | ||
| 293 | - }); | ||
| 294 | - }, | ||
| 295 | - getData(stauts){ | ||
| 296 | - this.queryParams.status=0; | ||
| 297 | - this.queryParams.lostCredit=stauts; | ||
| 298 | - this.init(); | ||
| 299 | - }, | ||
| 300 | - getHistoryData(){ | ||
| 301 | - this.queryParams.status=1; | ||
| 302 | - this.init(); | ||
| 303 | - }, | ||
| 304 | - colStyle(obj){ | ||
| 305 | - if(obj.column.property == "id"){ | ||
| 306 | - return {background:"#f8f8f9"} | ||
| 307 | - } | ||
| 308 | - }, | ||
| 309 | - getObjId(a){ | ||
| 310 | - this.form.objectId = a.id; | ||
| 311 | - this.form.place = a.areaName; | ||
| 312 | - this.form.type = a.typeName; | ||
| 313 | - }, | ||
| 314 | - getList() { | ||
| 315 | - this.loading = true; | ||
| 316 | - if(this.queryParams.status==0){ | ||
| 317 | - listCredit(this.queryParams).then(response => { | ||
| 318 | - this.creditList = response.rows; | ||
| 319 | - this.total = response.total; | ||
| 320 | - this.loading = false; | ||
| 321 | - }); | ||
| 322 | - } | ||
| 323 | - if(this.queryParams.status==1){ | ||
| 324 | - historyCredit(this.queryParams).then(response => { | ||
| 325 | - this.creditList = response.rows; | ||
| 326 | - this.total = response.total; | ||
| 327 | - this.loading = false; | ||
| 328 | - }); | ||
| 329 | - } | ||
| 330 | - | ||
| 331 | - }, | ||
| 332 | - // 取消按钮 | ||
| 333 | - cancel() { | ||
| 334 | - this.open = false; | ||
| 335 | - this.isEdit = false; | ||
| 336 | - this.reset(); | ||
| 337 | - }, | ||
| 338 | - // 表单重置 | ||
| 339 | - reset() { | ||
| 340 | - this.form = { | ||
| 341 | - id: null, | ||
| 342 | - name: null, | ||
| 343 | - type: null, | ||
| 344 | - time: null, | ||
| 345 | - place: null, | ||
| 346 | - reason: null, | ||
| 347 | - lostCredit: null, | ||
| 348 | - objectId: null, | ||
| 349 | - }; | ||
| 350 | - this.updateForm = {}; | ||
| 351 | - this.resetForm("form"); | ||
| 352 | - }, | ||
| 353 | - /** 搜索按钮操作 */ | ||
| 354 | - handleQuery() { | ||
| 355 | - this.queryParams.pageNum = 1; | ||
| 356 | - this.getList(); | ||
| 357 | - }, | ||
| 358 | - /** 重置按钮操作 */ | ||
| 359 | - resetQuery() { | ||
| 360 | - this.resetForm("queryForm"); | ||
| 361 | - console.log(this.queryParams); | ||
| 362 | - this.handleQuery(); | ||
| 363 | - }, | ||
| 364 | - // 多选框选中数据 | ||
| 365 | - handleSelectionChange(selection) { | ||
| 366 | - this.ids = selection.map(item => item.id) | ||
| 367 | - this.single = selection.length !== 1 | ||
| 368 | - this.multiple = !selection.length | ||
| 369 | - }, | ||
| 370 | - /** 新增按钮操作 */ | ||
| 371 | - handleAdd() { | ||
| 372 | - this.reset(); | ||
| 373 | - this.open = true; | ||
| 374 | - this.title = "添加消纳场"; | ||
| 375 | - }, | ||
| 376 | - /** 修改按钮操作 */ | ||
| 377 | - handleUpdate(row) { | ||
| 378 | - this.reset(); | ||
| 379 | - const id = row.id || this.ids | ||
| 380 | - getCredit(id).then(response => { | ||
| 381 | - this.form = response.data; | ||
| 382 | - this.isEdit = true; | ||
| 383 | - }); | ||
| 384 | - }, | ||
| 385 | - /** 提交按钮 */ | ||
| 386 | - submitForm() { | ||
| 387 | - if(this.open){ | ||
| 388 | - this.updateForm.reason = "1"; | ||
| 389 | - } | ||
| 390 | - | ||
| 391 | - this.$refs["form"].validate(valid => { | ||
| 392 | - if (valid) { | ||
| 393 | - this.loading = true; | ||
| 394 | - if (this.form.id != null) { | ||
| 395 | - this.form.lostCredit = 0; | ||
| 396 | - let data = [{creditStatus:this.form.lostCredit,objectId:this.form.objectId}]; | ||
| 397 | - updateEarthsites(data).then(res=>{ | ||
| 398 | - this.updateForm.id = this.form.id; | ||
| 399 | - updateCredit(this.updateForm).then(response => { | ||
| 400 | - this.msgSuccess("撤销成功"); | ||
| 401 | - this.isEdit = false; | ||
| 402 | - | ||
| 403 | - this.init(); | ||
| 404 | - }); | ||
| 405 | - }); | ||
| 406 | - } else { | ||
| 407 | - this.form.lostCredit = 1; | ||
| 408 | - let data = [{creditStatus:this.form.lostCredit,objectId:this.form.objectId}]; | ||
| 409 | - updateEarthsites(data).then(res=>{ | ||
| 410 | - addCredit(this.form).then(response => { | ||
| 411 | - this.msgSuccess("新增成功"); | ||
| 412 | - this.open = false; | ||
| 413 | - | ||
| 414 | - this.init(); | ||
| 415 | - }); | ||
| 416 | - }); | ||
| 417 | - | ||
| 418 | - } | ||
| 419 | - } | ||
| 420 | - }); | ||
| 421 | - }, | ||
| 422 | - handleExport() { | ||
| 423 | - const queryParams = this.queryParams; | ||
| 424 | - this.$confirm('是否确认导出所有消纳场数据项?', "警告", { | ||
| 425 | - confirmButtonText: "确定", | ||
| 426 | - cancelButtonText: "取消", | ||
| 427 | - type: "warning" | ||
| 428 | - }).then(function() { | ||
| 429 | - return exportCredit(queryParams); | ||
| 430 | - }).then(response => { | ||
| 431 | - this.download(response.message); | ||
| 432 | - }) | ||
| 433 | - } | ||
| 434 | - } | ||
| 435 | -}; | ||
| 436 | -</script> | 176 | +<script src="../../../api/earthsites_credit.js" /> |
| 437 | \ No newline at end of file | 177 | \ No newline at end of file |
trash-ui/src/views/h5/TruckCredit/index.vue
| @@ -138,288 +138,4 @@ | @@ -138,288 +138,4 @@ | ||
| 138 | </div> | 138 | </div> |
| 139 | </template> | 139 | </template> |
| 140 | 140 | ||
| 141 | -<script> | ||
| 142 | - import { | ||
| 143 | - listCredit, | ||
| 144 | - getCredit, | ||
| 145 | - delCredit, | ||
| 146 | - addCredit, | ||
| 147 | - updateCredit, | ||
| 148 | - exportCredit, | ||
| 149 | - getNames, | ||
| 150 | - getCompanys, | ||
| 151 | - historyCredit | ||
| 152 | - } from "@/api/business/truck"; | ||
| 153 | - | ||
| 154 | - | ||
| 155 | - import { | ||
| 156 | - companyList, | ||
| 157 | - truckList, | ||
| 158 | - updateTruck | ||
| 159 | - } from "@/api/dict"; | ||
| 160 | - | ||
| 161 | - export default { | ||
| 162 | - name: "Credit", | ||
| 163 | - data() { | ||
| 164 | - return { | ||
| 165 | - // 遮罩层 | ||
| 166 | - loading: true, | ||
| 167 | - // 选中数组 | ||
| 168 | - ids: [], | ||
| 169 | - // 非单个禁用 | ||
| 170 | - single: true, | ||
| 171 | - // 非多个禁用 | ||
| 172 | - multiple: true, | ||
| 173 | - // 显示搜索条件 | ||
| 174 | - showSearch: true, | ||
| 175 | - infoDialog: false, | ||
| 176 | - // 总条数 | ||
| 177 | - total: 0, | ||
| 178 | - // 工地表格数据 | ||
| 179 | - creditList: [], | ||
| 180 | - creditListInfo: [], | ||
| 181 | - dictNames: [], | ||
| 182 | - dictCompanys: [], | ||
| 183 | - companyList:[], | ||
| 184 | - truckList: [], | ||
| 185 | - // 弹出层标题 | ||
| 186 | - title: "", | ||
| 187 | - // 是否显示弹出层 | ||
| 188 | - open: false, | ||
| 189 | - isEdit: false, | ||
| 190 | - // 查询参数 | ||
| 191 | - queryParams: { | ||
| 192 | - pageNum: 1, | ||
| 193 | - pageSize: 10, | ||
| 194 | - companyId: null, | ||
| 195 | - licensePlate: null, | ||
| 196 | - time: null, | ||
| 197 | - reason: null, | ||
| 198 | - status: 0, | ||
| 199 | - lostCredit: 1 | ||
| 200 | - }, | ||
| 201 | - // 表单参数 | ||
| 202 | - form: {}, | ||
| 203 | - updateForm: {}, | ||
| 204 | - // 表单校验 | ||
| 205 | - rules: { | ||
| 206 | - companyId: [{ | ||
| 207 | - required: true, | ||
| 208 | - message: '请选择运输公司', | ||
| 209 | - trigger: 'change' | ||
| 210 | - }, ], | ||
| 211 | - reason: [{ | ||
| 212 | - required: true, | ||
| 213 | - message: '请填写原因', | ||
| 214 | - trigger: 'change' | ||
| 215 | - }, ], | ||
| 216 | - licensePlate: [{ | ||
| 217 | - required: true, | ||
| 218 | - message: '请选择车辆', | ||
| 219 | - trigger: 'change' | ||
| 220 | - }], | ||
| 221 | - }, | ||
| 222 | - rules2: { | ||
| 223 | - reason: [{ | ||
| 224 | - required: true, | ||
| 225 | - message: '请填写原因', | ||
| 226 | - trigger: 'change' | ||
| 227 | - }, ], | ||
| 228 | - } | ||
| 229 | - }; | ||
| 230 | - }, | ||
| 231 | - created() { | ||
| 232 | - this.init(); | ||
| 233 | - }, | ||
| 234 | - methods: { | ||
| 235 | - | ||
| 236 | - init() { | ||
| 237 | - this.resetQuery(); | ||
| 238 | - this.getList(); | ||
| 239 | - getNames(this.queryParams).then(response => { | ||
| 240 | - this.dictNames = response; | ||
| 241 | - }); | ||
| 242 | - | ||
| 243 | - getCompanys(this.queryParams).then(response => { | ||
| 244 | - this.dictCompanys = response; | ||
| 245 | - }); | ||
| 246 | - | ||
| 247 | - let query = { | ||
| 248 | - 'page':1, | ||
| 249 | - 'size':9999, | ||
| 250 | - 'dishonestState':0 | ||
| 251 | - } | ||
| 252 | - companyList(query).then(response => { | ||
| 253 | - | ||
| 254 | - let companys = response.result.list; | ||
| 255 | - this.companyList = companys; | ||
| 256 | - let ids = []; | ||
| 257 | - | ||
| 258 | - for(let i = 0 ;i<companys.length;i++){ | ||
| 259 | - ids.push(companys[i].id); | ||
| 260 | - } | ||
| 261 | - query.companyID = ids + ""; | ||
| 262 | - query.valid = 0; | ||
| 263 | - | ||
| 264 | - truckList(query).then(res=>{ | ||
| 265 | - this.truckList = res.result.list; | ||
| 266 | - }); | ||
| 267 | - | ||
| 268 | - }); | ||
| 269 | - | ||
| 270 | - | ||
| 271 | - }, | ||
| 272 | - getDataInfo(row) { | ||
| 273 | - console.log(row); | ||
| 274 | - | ||
| 275 | - let param = { | ||
| 276 | - "objectId": row.objectId | ||
| 277 | - } | ||
| 278 | - | ||
| 279 | - listCredit(param).then(response => { | ||
| 280 | - this.creditListInfo = response.rows; | ||
| 281 | - this.infoDialog = true; | ||
| 282 | - }); | ||
| 283 | - | ||
| 284 | - }, | ||
| 285 | - getData(stauts) { | ||
| 286 | - this.queryParams.status = 0; | ||
| 287 | - this.queryParams.lostCredit = stauts; | ||
| 288 | - this.init(); | ||
| 289 | - }, | ||
| 290 | - getHistoryData() { | ||
| 291 | - this.queryParams.status = 1; | ||
| 292 | - this.init(); | ||
| 293 | - }, | ||
| 294 | - colStyle(obj) { | ||
| 295 | - if (obj.column.property == "id") { | ||
| 296 | - return { | ||
| 297 | - background: "#f8f8f9" | ||
| 298 | - } | ||
| 299 | - } | ||
| 300 | - }, | ||
| 301 | - getObjId(a) { | ||
| 302 | - this.form.companyId = a.companyName; | ||
| 303 | - this.form.objectId = a.id; | ||
| 304 | - }, | ||
| 305 | - getList() { | ||
| 306 | - this.loading = true; | ||
| 307 | - if (this.queryParams.status == 0) { | ||
| 308 | - listCredit(this.queryParams).then(response => { | ||
| 309 | - this.creditList = response.rows; | ||
| 310 | - this.total = response.total; | ||
| 311 | - this.loading = false; | ||
| 312 | - }); | ||
| 313 | - } | ||
| 314 | - if (this.queryParams.status == 1) { | ||
| 315 | - historyCredit(this.queryParams).then(response => { | ||
| 316 | - this.creditList = response.rows; | ||
| 317 | - this.total = response.total; | ||
| 318 | - this.loading = false; | ||
| 319 | - }); | ||
| 320 | - } | ||
| 321 | - | ||
| 322 | - }, | ||
| 323 | - // 取消按钮 | ||
| 324 | - cancel() { | ||
| 325 | - this.open = false; | ||
| 326 | - this.isEdit = false; | ||
| 327 | - this.reset(); | ||
| 328 | - }, | ||
| 329 | - // 表单重置 | ||
| 330 | - reset() { | ||
| 331 | - this.form = { | ||
| 332 | - id: null, | ||
| 333 | - companyId: null, | ||
| 334 | - licensePlate: null, | ||
| 335 | - time: null, | ||
| 336 | - reason: null, | ||
| 337 | - status: null, | ||
| 338 | - lostCredit: null | ||
| 339 | - }; | ||
| 340 | - this.resetForm("form"); | ||
| 341 | - }, | ||
| 342 | - /** 搜索按钮操作 */ | ||
| 343 | - handleQuery() { | ||
| 344 | - this.queryParams.pageNum = 1; | ||
| 345 | - this.getList(); | ||
| 346 | - }, | ||
| 347 | - /** 重置按钮操作 */ | ||
| 348 | - resetQuery() { | ||
| 349 | - this.resetForm("queryForm"); | ||
| 350 | - console.log(this.queryParams); | ||
| 351 | - this.handleQuery(); | ||
| 352 | - }, | ||
| 353 | - // 多选框选中数据 | ||
| 354 | - handleSelectionChange(selection) { | ||
| 355 | - this.ids = selection.map(item => item.id) | ||
| 356 | - this.single = selection.length !== 1 | ||
| 357 | - this.multiple = !selection.length | ||
| 358 | - }, | ||
| 359 | - /** 新增按钮操作 */ | ||
| 360 | - handleAdd() { | ||
| 361 | - this.reset(); | ||
| 362 | - this.open = true; | ||
| 363 | - this.title = "车辆失信录入"; | ||
| 364 | - }, | ||
| 365 | - /** 修改按钮操作 */ | ||
| 366 | - handleUpdate(row) { | ||
| 367 | - this.reset(); | ||
| 368 | - const id = row.id || this.ids | ||
| 369 | - getCredit(id).then(response => { | ||
| 370 | - this.form = response.data; | ||
| 371 | - this.isEdit = true; | ||
| 372 | - }); | ||
| 373 | - }, | ||
| 374 | - /** 提交按钮 */ | ||
| 375 | - submitForm() { | ||
| 376 | - if(this.isEdit){ | ||
| 377 | - this.$refs["updateForm"].validate(valid => { | ||
| 378 | - if (valid) { | ||
| 379 | - this.loading = true; | ||
| 380 | - this.form.lostCredit = 0; | ||
| 381 | - this.updateForm.id = this.form.id; | ||
| 382 | - let data = [{creditStatus:this.form.lostCredit,id:this.form.objectId}]; | ||
| 383 | - updateTruck(data).then(res=>{ | ||
| 384 | - updateCredit(this.updateForm).then(response => { | ||
| 385 | - this.msgSuccess("撤销成功"); | ||
| 386 | - this.isEdit = false; | ||
| 387 | - this.updateForm = {}; | ||
| 388 | - this.init(); | ||
| 389 | - }); | ||
| 390 | - }); | ||
| 391 | - } | ||
| 392 | - }); | ||
| 393 | - }else{ | ||
| 394 | - this.$refs["form"].validate(valid => { | ||
| 395 | - if (valid) { | ||
| 396 | - this.loading = true; | ||
| 397 | - this.form.lostCredit = 1; | ||
| 398 | - this.form.createType = 0; | ||
| 399 | - let data = [{creditStatus:this.form.lostCredit,id:this.form.objectId}]; | ||
| 400 | - updateTruck(data).then(res=>{ | ||
| 401 | - addCredit(this.form).then(response => { | ||
| 402 | - this.msgSuccess("新增成功"); | ||
| 403 | - this.open = false; | ||
| 404 | - this.init(); | ||
| 405 | - }); | ||
| 406 | - }); | ||
| 407 | - } | ||
| 408 | - }); | ||
| 409 | - } | ||
| 410 | - }, | ||
| 411 | - handleExport() { | ||
| 412 | - const queryParams = this.queryParams; | ||
| 413 | - this.$confirm('是否确认导出所有车辆数据项?', "警告", { | ||
| 414 | - confirmButtonText: "确定", | ||
| 415 | - cancelButtonText: "取消", | ||
| 416 | - type: "warning" | ||
| 417 | - }).then(function() { | ||
| 418 | - return exportCredit(queryParams); | ||
| 419 | - }).then(response => { | ||
| 420 | - this.download(response.message); | ||
| 421 | - }) | ||
| 422 | - } | ||
| 423 | - } | ||
| 424 | - }; | ||
| 425 | -</script> | 141 | +<script src="../../../api/truck_credit.js" /> |
| 426 | \ No newline at end of file | 142 | \ No newline at end of file |
trash-ui/src/views/h5/caseOffline/index.vue
| @@ -76,7 +76,7 @@ | @@ -76,7 +76,7 @@ | ||
| 76 | </a> | 76 | </a> |
| 77 | 77 | ||
| 78 | 78 | ||
| 79 | - <pagination | 79 | + <h5page |
| 80 | v-show="total>0" | 80 | v-show="total>0" |
| 81 | :total="total" | 81 | :total="total" |
| 82 | :page.sync="queryParams.pageNum" | 82 | :page.sync="queryParams.pageNum" |
| @@ -133,7 +133,7 @@ | @@ -133,7 +133,7 @@ | ||
| 133 | 133 | ||
| 134 | 134 | ||
| 135 | <el-dialog title="查看详情" :visible.sync="open2" width="300px" append-to-body> | 135 | <el-dialog title="查看详情" :visible.sync="open2" width="300px" append-to-body> |
| 136 | - <caseOfflineInfo :businessKey="businessKey" v-if="open2" /> | 136 | + <h5Ingo :businessKey="businessKey" v-if="open2" /> |
| 137 | <div slot="footer" class="dialog-footer"> | 137 | <div slot="footer" class="dialog-footer"> |
| 138 | <el-button @click="cancel">取 消</el-button> | 138 | <el-button @click="cancel">取 消</el-button> |
| 139 | </div> | 139 | </div> |
| @@ -153,346 +153,10 @@ | @@ -153,346 +153,10 @@ | ||
| 153 | </div> | 153 | </div> |
| 154 | </template> | 154 | </template> |
| 155 | 155 | ||
| 156 | -<script> | ||
| 157 | -import { listCaseOffline, getCaseOffline, delCaseOffline, addCaseOffline, updateCaseOffline, exportCaseOffline } from "@/api/caseOffline/caseOffline"; | ||
| 158 | 156 | ||
| 159 | -import caseOfflineInfo from "@/views/h5/caseOffline/caseOfflineInfo"; | 157 | +<script src="../../../api/caseoffline.js" /> |
| 160 | 158 | ||
| 161 | -import { | ||
| 162 | - getArea, | ||
| 163 | - earthsitesList, | ||
| 164 | - constructionsitesList, | ||
| 165 | - getDict, | ||
| 166 | - } from "@/api/dict"; | ||
| 167 | 159 | ||
| 168 | -import { | ||
| 169 | - getThreestep, | ||
| 170 | - } from "@/api/business/threestep"; | ||
| 171 | - | ||
| 172 | -import { | ||
| 173 | - getToken | ||
| 174 | - } from "@/utils/auth"; | ||
| 175 | - | ||
| 176 | - import pagination from '../Pagination'; | ||
| 177 | - | ||
| 178 | -export default { | ||
| 179 | - name: "CaseOffline", | ||
| 180 | - | ||
| 181 | - components: { | ||
| 182 | - caseOfflineInfo, | ||
| 183 | - pagination | ||
| 184 | - }, | ||
| 185 | - data() { | ||
| 186 | - return { | ||
| 187 | - // 遮罩层 | ||
| 188 | - loading: true, | ||
| 189 | - // 选中数组 | ||
| 190 | - ids: [], | ||
| 191 | - // 非单个禁用 | ||
| 192 | - single: true, | ||
| 193 | - // 非多个禁用 | ||
| 194 | - multiple: true, | ||
| 195 | - // 显示搜索条件 | ||
| 196 | - showSearch: true, | ||
| 197 | - // 总条数 | ||
| 198 | - total: 0, | ||
| 199 | - // 线下交办案卷表格数据 | ||
| 200 | - caseOfflineList: [], | ||
| 201 | - // 弹出层标题 | ||
| 202 | - title: "", | ||
| 203 | - // 是否显示弹出层 | ||
| 204 | - open: false, | ||
| 205 | - open2:false, | ||
| 206 | - // 查询参数 | ||
| 207 | - queryParams: { | ||
| 208 | - pageNum: 1, | ||
| 209 | - pageSize: 10, | ||
| 210 | - type: null, | ||
| 211 | - place: null, | ||
| 212 | - createTime: null, | ||
| 213 | - }, | ||
| 214 | - uploadImageDialog:false, | ||
| 215 | - // 表单参数 | ||
| 216 | - form: {}, | ||
| 217 | - // 表单校验 | ||
| 218 | - rules: { | ||
| 219 | - }, | ||
| 220 | - caseType:[ | ||
| 221 | - {code:0,name:"渣土处置工地(含消纳场)的渣土运输车辆出场车身不洁,车轮带泥"}, | ||
| 222 | - {code:1,name:"未洗车出场或者出场清洁不彻底"}, | ||
| 223 | - {code:2,name:"渣土运输车辆货箱顶盖未按规定关闭到位或未按规定和标准装载渣土出场"}, | ||
| 224 | - {code:3,name:"非核准车辆进入渣土处置工地运输渣土"}, | ||
| 225 | - {code:4,name:"渣土处置工地未按规定时间开停工"}, | ||
| 226 | - {code:5,name:"渣土处置工地洗车设施等破损、未正常使用及措施不到位的"}, | ||
| 227 | - {code:6,name:"渣土处置工地、消纳场(含回填场)出入口两侧50米范围内出现渣土污染、污水外排等现象"}, | ||
| 228 | - {code:7,name:"其他1"}, | ||
| 229 | - {code:8,name:"其他2"}, | ||
| 230 | - {code:9,name:"其他3"} | ||
| 231 | - ], | ||
| 232 | - areas:null, | ||
| 233 | - fileList:[], | ||
| 234 | - areas: [], | ||
| 235 | - upload: { | ||
| 236 | - // 是否显示弹出层(用户导入) | ||
| 237 | - open: false, | ||
| 238 | - // 弹出层标题(用户导入) | ||
| 239 | - title: "", | ||
| 240 | - // 是否禁用上传 | ||
| 241 | - isUploading: false, | ||
| 242 | - // 设置上传的请求头部 | ||
| 243 | - headers: { | ||
| 244 | - Authorization: "Bearer " + getToken() | ||
| 245 | - }, | ||
| 246 | - // 上传的地址 | ||
| 247 | - url: process.env.VUE_APP_BASE_API + "/business/threestep/upload", | ||
| 248 | - }, | ||
| 249 | - data:{}, | ||
| 250 | - objId:null | ||
| 251 | - }; | ||
| 252 | - }, | ||
| 253 | - created() { | ||
| 254 | - | ||
| 255 | - | ||
| 256 | - | ||
| 257 | - this.getList(); | ||
| 258 | - | ||
| 259 | - if(window.location.search){ | ||
| 260 | - let businessKey = window.location.search.split("=")[1]; | ||
| 261 | - let id; | ||
| 262 | - if(businessKey.split(":").length == 2){ | ||
| 263 | - id = businessKey.split(":")[1]; | ||
| 264 | - }else{ | ||
| 265 | - id = businessKey; | ||
| 266 | - } | ||
| 267 | - | ||
| 268 | - getThreestep(id).then(response => { | ||
| 269 | - let data = response.data; | ||
| 270 | - | ||
| 271 | - this.handleAdd(); | ||
| 272 | - | ||
| 273 | - this.form.siteType = data.type + ""; | ||
| 274 | - this.form.siteName = data.name; | ||
| 275 | - this.form.place = Number(data.place); | ||
| 276 | - }); | ||
| 277 | - } | ||
| 278 | - | ||
| 279 | - | ||
| 280 | - | ||
| 281 | - let remoteQueryData = { | ||
| 282 | - "page": 1, | ||
| 283 | - "size": 9999 | ||
| 284 | - } | ||
| 285 | - | ||
| 286 | - constructionsitesList(remoteQueryData).then(res => { | ||
| 287 | - this.data[0]= res.result.list; | ||
| 288 | - }); | ||
| 289 | - | ||
| 290 | - earthsitesList(remoteQueryData).then(res => { | ||
| 291 | - this.data[1]= res.result.list; | ||
| 292 | - }); | ||
| 293 | - }, | ||
| 294 | - methods: { | ||
| 295 | - getSite(item){ | ||
| 296 | - this.form.objectId = item.id; | ||
| 297 | - }, | ||
| 298 | - /** 查询线下交办案卷列表 */ | ||
| 299 | - getList() { | ||
| 300 | - this.loading = true; | ||
| 301 | - listCaseOffline(this.queryParams).then(response => { | ||
| 302 | - this.caseOfflineList = response.rows; | ||
| 303 | - | ||
| 304 | - for(let i in this.caseOfflineList){ | ||
| 305 | - this.caseOfflineList[i].type = this.getCaseType(this.caseOfflineList[i].type); | ||
| 306 | - | ||
| 307 | - } | ||
| 308 | - | ||
| 309 | - getArea().then(res => { | ||
| 310 | - this.areas = res.result; | ||
| 311 | - for(let i =0;i< this.caseOfflineList.length;i++){ | ||
| 312 | - this.caseOfflineList[i].place = this.getAreaName(this.caseOfflineList[i].place); | ||
| 313 | - } | ||
| 314 | - }); | ||
| 315 | - | ||
| 316 | - this.total = response.total; | ||
| 317 | - this.loading = false; | ||
| 318 | - }); | ||
| 319 | - }, | ||
| 320 | - // 取消按钮 | ||
| 321 | - cancel() { | ||
| 322 | - this.open = false; | ||
| 323 | - this.open2 = false; | ||
| 324 | - this.reset(); | ||
| 325 | - }, | ||
| 326 | - // 表单重置 | ||
| 327 | - reset() { | ||
| 328 | - this.form = { | ||
| 329 | - id: null, | ||
| 330 | - type: null, | ||
| 331 | - siteName: null, | ||
| 332 | - locationDec: null, | ||
| 333 | - caseDec: null, | ||
| 334 | - status: 0, | ||
| 335 | - place: null, | ||
| 336 | - number: null, | ||
| 337 | - siteType: null, | ||
| 338 | - objectId: null, | ||
| 339 | - createTime: null, | ||
| 340 | - createBy: null, | ||
| 341 | - advice1: null, | ||
| 342 | - advice2: null, | ||
| 343 | - advice3: null, | ||
| 344 | - advice4: null, | ||
| 345 | - attach:[] | ||
| 346 | - }; | ||
| 347 | - this.resetForm("form"); | ||
| 348 | - }, | ||
| 349 | - /** 搜索按钮操作 */ | ||
| 350 | - handleQuery() { | ||
| 351 | - this.queryParams.pageNum = 1; | ||
| 352 | - this.getList(); | ||
| 353 | - }, | ||
| 354 | - /** 重置按钮操作 */ | ||
| 355 | - resetQuery() { | ||
| 356 | - this.resetForm("queryForm"); | ||
| 357 | - this.handleQuery(); | ||
| 358 | - }, | ||
| 359 | - // 多选框选中数据 | ||
| 360 | - handleSelectionChange(selection) { | ||
| 361 | - this.ids = selection.map(item => item.id) | ||
| 362 | - this.single = selection.length!==1 | ||
| 363 | - this.multiple = !selection.length | ||
| 364 | - }, | ||
| 365 | - getAreaName(code){ | ||
| 366 | - for(let i =0;i<this.areas.length;i++){ | ||
| 367 | - if(Number(code) == this.areas[i].code){ | ||
| 368 | - return this.areas[i].name; | ||
| 369 | - break; | ||
| 370 | - } | ||
| 371 | - } | ||
| 372 | - return code; | ||
| 373 | - }, | ||
| 374 | - getCaseType(type){ | ||
| 375 | - for(let i in this.caseType){ | ||
| 376 | - | ||
| 377 | - | ||
| 378 | - if(this.caseType[i].code==type) | ||
| 379 | - return this.caseType[i].name | ||
| 380 | - } | ||
| 381 | - }, | ||
| 382 | - /** 新增按钮操作 */ | ||
| 383 | - handleAdd() { | ||
| 384 | - this.reset(); | ||
| 385 | - this.open = true; | ||
| 386 | - this.title = "添加线下交办案卷"; | ||
| 387 | - | ||
| 388 | - let date = new Date(); | ||
| 389 | - | ||
| 390 | - | ||
| 391 | - this.form.number = date.getFullYear() | ||
| 392 | - +""+((date.getMonth()+1) < 10 ? "0" + (date.getMonth()+1) : (date.getMonth()+1)) | ||
| 393 | - +""+ ((date.getDate()) < 10 ? "0" + (date.getDate()) : (date.getDate())) | ||
| 394 | - +""+ ((date.getHours()) < 10 ? "0" + (date.getHours()) : (date.getHours())) | ||
| 395 | - +""+ ((date.getMinutes()) < 10 ? "0" + (date.getMinutes()) : (date.getMinutes())) | ||
| 396 | - +""+ ((date.getSeconds()) < 10 ? "0" + (date.getSeconds()*1000) : (date.getSeconds()*1000)) | ||
| 397 | - }, | ||
| 398 | - /** 修改按钮操作 */ | ||
| 399 | - handleUpdate(row) { | ||
| 400 | - this.reset(); | ||
| 401 | - this.businessKey =row.id + ""; | ||
| 402 | - this.open2 = true; | ||
| 403 | - }, | ||
| 404 | - /** 提交按钮 */ | ||
| 405 | - submitForm() { | ||
| 406 | - this.$refs["form"].validate(valid => { | ||
| 407 | - if (valid) { | ||
| 408 | - this.form.attach = this.form.attach +""; | ||
| 409 | - if (this.form.id != null) { | ||
| 410 | - updateCaseOffline(this.form).then(response => { | ||
| 411 | - this.msgSuccess("修改成功"); | ||
| 412 | - this.open = false; | ||
| 413 | - this.getList(); | ||
| 414 | - }); | ||
| 415 | - } else { | ||
| 416 | - addCaseOffline(this.form).then(response => { | ||
| 417 | - this.msgSuccess("新增成功"); | ||
| 418 | - this.open = false; | ||
| 419 | - this.getList(); | ||
| 420 | - }); | ||
| 421 | - } | ||
| 422 | - } | ||
| 423 | - }); | ||
| 424 | - }, | ||
| 425 | - /** 删除按钮操作 */ | ||
| 426 | - handleDelete(row) { | ||
| 427 | - const ids = row.id || this.ids; | ||
| 428 | - this.$confirm('是否确认删除线下交办案卷编号为"' + ids + '"的数据项?', "警告", { | ||
| 429 | - confirmButtonText: "确定", | ||
| 430 | - cancelButtonText: "取消", | ||
| 431 | - type: "warning" | ||
| 432 | - }).then(function() { | ||
| 433 | - return delCaseOffline(ids); | ||
| 434 | - }).then(() => { | ||
| 435 | - this.getList(); | ||
| 436 | - this.msgSuccess("删除成功"); | ||
| 437 | - }) | ||
| 438 | - }, | ||
| 439 | - /** 导出按钮操作 */ | ||
| 440 | - handleExport() { | ||
| 441 | - const queryParams = this.queryParams; | ||
| 442 | - this.$confirm('是否确认导出所有线下交办案卷数据项?', "警告", { | ||
| 443 | - confirmButtonText: "确定", | ||
| 444 | - cancelButtonText: "取消", | ||
| 445 | - type: "warning" | ||
| 446 | - }).then(function() { | ||
| 447 | - return exportCaseOffline(queryParams); | ||
| 448 | - }).then(response => { | ||
| 449 | - this.download(response.message); | ||
| 450 | - }) | ||
| 451 | - }, | ||
| 452 | - removeAttchItem(index, img) { | ||
| 453 | - this.form.attach.splice(this.form.attach.indexOf(img), 1); | ||
| 454 | - this.$forceUpdate(); | ||
| 455 | - }, | ||
| 456 | - uploadSuccess(res, file, fileList) { | ||
| 457 | - if(res.code){ | ||
| 458 | - this.$message(res.message); | ||
| 459 | - return; | ||
| 460 | - } | ||
| 461 | - if(!this.form.attach){ | ||
| 462 | - this.form.attach = []; | ||
| 463 | - } | ||
| 464 | - this.form.attach.push(res); | ||
| 465 | - }, | ||
| 466 | - showFileUpload(i) { | ||
| 467 | - this.uploadImageDialog = true; | ||
| 468 | - this.picIndex = i; | ||
| 469 | - }, | ||
| 470 | - beforeUpload(file) { | ||
| 471 | - let isRightSize = file.size / 1024 / 1024 < 20 | ||
| 472 | - if (!isRightSize) { | ||
| 473 | - this.$message.error('文件大小超过 20MB') | ||
| 474 | - return isRightSize; | ||
| 475 | - } | ||
| 476 | - let isAccept = false; | ||
| 477 | - if (file.name.indexOf('.docx') > -1 || file.name.indexOf(".jpg") > -1 || file.name.indexOf('.doc') > -1 || file | ||
| 478 | - .name.indexOf('.pdf') > -1) { | ||
| 479 | - isAccept = true; | ||
| 480 | - } | ||
| 481 | - if (!isAccept) { | ||
| 482 | - this.$message.error('应该选择PDF、JPG、WORD类型的文件') | ||
| 483 | - return isAccept; | ||
| 484 | - } | ||
| 485 | - }, | ||
| 486 | - downloadFile(path) { | ||
| 487 | - window.location.href = process.env.VUE_APP_BASE_API + "/business/threestep/download?path=" + encodeURI(path); | ||
| 488 | - }, | ||
| 489 | - handleClose() { | ||
| 490 | - this.uploadImageDialog = false; | ||
| 491 | - this.fileList = []; | ||
| 492 | - }, | ||
| 493 | - } | ||
| 494 | -}; | ||
| 495 | -</script> | ||
| 496 | 160 | ||
| 497 | <style scope> | 161 | <style scope> |
| 498 | .el-select-dropdown__item{ | 162 | .el-select-dropdown__item{ |
trash-ui/src/views/h5/dayWorkReport/index.vue
| @@ -108,421 +108,11 @@ | @@ -108,421 +108,11 @@ | ||
| 108 | </template> | 108 | </template> |
| 109 | 109 | ||
| 110 | <script> | 110 | <script> |
| 111 | - import { | ||
| 112 | - dayWorkList, | ||
| 113 | - exportDayWorkList | ||
| 114 | - } from "@/api/business/daywork"; | ||
| 115 | - | ||
| 116 | - | ||
| 117 | - import { | ||
| 118 | - Upload | ||
| 119 | - } from "element-ui"; | ||
| 120 | - import { | ||
| 121 | - getToken | ||
| 122 | - } from "@/utils/auth"; | ||
| 123 | - | ||
| 124 | - import { | ||
| 125 | - earthsitesList, | ||
| 126 | - constructionsitesList, | ||
| 127 | - getDict, | ||
| 128 | - getArea | ||
| 129 | - } from "@/api/dict"; | ||
| 130 | 111 | ||
| 131 | import pagination from '../Pagination'; | 112 | import pagination from '../Pagination'; |
| 132 | 113 | ||
| 133 | - export default { | ||
| 134 | - name: "dayWorkReport", | ||
| 135 | - components: {pagination}, | ||
| 136 | - data() { | ||
| 137 | - return { | ||
| 138 | - // 遮罩层 | ||
| 139 | - loading: true, | ||
| 140 | - | ||
| 141 | - reUpdate : false, | ||
| 142 | - | ||
| 143 | - info: false, | ||
| 144 | - | ||
| 145 | - infoData: null, | ||
| 146 | - businessKey:null, | ||
| 147 | - picSample: false, | ||
| 148 | - uploadImageDialog: false, | ||
| 149 | - // 选中数组 | ||
| 150 | - ids: [], | ||
| 151 | - // 非单个禁用 | ||
| 152 | - single: true, | ||
| 153 | - // 非多个禁用 | ||
| 154 | - multiple: true, | ||
| 155 | - // 显示搜索条件 | ||
| 156 | - showSearch: true, | ||
| 157 | - // 总条数 | ||
| 158 | - total: 0, | ||
| 159 | - // 开工报表表格数据 | ||
| 160 | - threestepList: [], | ||
| 161 | - fileList: [], | ||
| 162 | - // 弹出层标题 | ||
| 163 | - title: "", | ||
| 164 | - // 是否显示弹出层 | ||
| 165 | - open: false, | ||
| 166 | - // 查询参数 | ||
| 167 | - queryParams: { | ||
| 168 | - pageNum: 1, | ||
| 169 | - pageSize: 10 | ||
| 170 | - }, | ||
| 171 | - // 表单参数 | ||
| 172 | - form: { | ||
| 173 | - }, | ||
| 174 | - picIndex: null, | ||
| 175 | - // 表单校验 | ||
| 176 | - rules: { | ||
| 177 | - }, | ||
| 178 | - SiteWorkAreaCodeType: [], | ||
| 179 | - remoteData: [{name:"a",id:"id"}], | ||
| 180 | - remoteQueryData: { | ||
| 181 | - "page": 1, | ||
| 182 | - "size": 9999 | ||
| 183 | - }, | ||
| 184 | - areas: [{ | ||
| 185 | - code:"a", | ||
| 186 | - name:"A"} | ||
| 187 | - ], | ||
| 188 | - constructionsitesList:[], | ||
| 189 | - earthsitesList:[], | ||
| 190 | - areaCode: null, | ||
| 191 | - bindData: [{name:"a",id:"id"}], | ||
| 192 | - bindname:null, | ||
| 193 | - projectTypes:null, | ||
| 194 | - earthsitesTypes:null, | ||
| 195 | - dayWorkCount:null, | ||
| 196 | - outside:["长沙县","望城区","浏阳市","宁乡市","株洲市","湘潭市","汩罗市","湘阴县"], | ||
| 197 | - }; | ||
| 198 | - }, | ||
| 199 | - created() { | ||
| 200 | - this.getList(0); | ||
| 201 | - getDict({type:"CSConsSiteProjectType"}).then(res=>{ | ||
| 202 | - this.projectTypes = res.result; | ||
| 203 | - }); | ||
| 204 | - | ||
| 205 | - getDict({type:"CSDisSiteType"}).then(res=>{ | ||
| 206 | - this.earthsitesTypes = res.result; | ||
| 207 | - }); | ||
| 208 | - }, | ||
| 209 | - methods: { | ||
| 210 | - areaClear() { | ||
| 211 | - this.areaCode = null; | ||
| 212 | - }, | ||
| 213 | - selectArea(a) { | ||
| 214 | - this.areaCode = a; | ||
| 215 | - }, | ||
| 216 | - getObjId(item) { | ||
| 217 | - if (this.form.type == 0) { | ||
| 218 | - this.form.objectId = item.id; | ||
| 219 | - this.form.place = Number(item.areaCode); | ||
| 220 | - } else { | ||
| 221 | - this.form.earthsitesId = item.id; | ||
| 222 | - this.form.place = Number(item.areaCode); | ||
| 223 | - } | ||
| 224 | - }, | ||
| 225 | - getEarthsiteId(item) { | ||
| 226 | - if (this.form.type == 0) { | ||
| 227 | - this.form.objectId = item.id; | ||
| 228 | - } else { | ||
| 229 | - this.form.earthsitesId = item.id; | ||
| 230 | - } | ||
| 231 | - }, | ||
| 232 | - handleClose() { | ||
| 233 | - this.uploadImageDialog = false; | ||
| 234 | - this.fileList = []; | ||
| 235 | - }, | ||
| 236 | - /** 查询开工报表列表 */ | ||
| 237 | - getList(tabIdx) { | ||
| 238 | - | ||
| 239 | - this.loading = true; | ||
| 240 | - | ||
| 241 | - let query = this.queryParams; | ||
| 242 | - | ||
| 243 | - if(this.queryParams.his != tabIdx && tabIdx == 1){ | ||
| 244 | - this.queryParams.his = tabIdx; | ||
| 245 | - query.workStartTime = "2000-01-01 00:00:00"; | ||
| 246 | - query.workEndTime = "2999-01-01 00:00:00"; | ||
| 247 | - }else if(tabIdx==0){ | ||
| 248 | - this.queryParams.his = null; | ||
| 249 | - query.workStartTime = null; | ||
| 250 | - query.workEndTime = null; | ||
| 251 | - } | ||
| 252 | - | ||
| 253 | - dayWorkList(query).then(response => { | ||
| 254 | - | ||
| 255 | - this.threestepList = response.rows; | ||
| 256 | - | ||
| 257 | - getArea().then(res => { | ||
| 258 | - this.areas = res.result; | ||
| 259 | - for(let i =0;i< this.threestepList.length;i++){ | ||
| 260 | - this.threestepList[i].place = this.getAreaName(this.threestepList[i].place); | ||
| 261 | - if(this.outside.indexOf(this.threestepList[i].place) > -1){ | ||
| 262 | - if(this.threestepList[i].status == "开工"){ | ||
| 263 | - this.threestepList[i].descript = "开工"; | ||
| 264 | - } | ||
| 265 | - } | ||
| 266 | - | ||
| 267 | - } | ||
| 268 | - }); | ||
| 269 | - | ||
| 270 | - | ||
| 271 | - | ||
| 272 | - constructionsitesList(this.remoteQueryData).then(res => { | ||
| 273 | - this.constructionsitesList = res.result.list; | ||
| 274 | - | ||
| 275 | - let count = 0; | ||
| 276 | - let count1 = 0; | ||
| 277 | - | ||
| 278 | - for(let i =0;i< this.threestepList.length;i++){ | ||
| 279 | - | ||
| 280 | - if(this.threestepList[i].status == "开工"){ | ||
| 281 | - count += 1; | ||
| 282 | - } | ||
| 283 | - if(this.threestepList[i].estatus == "开工"){ | ||
| 284 | - count1 += 1; | ||
| 285 | - } | ||
| 286 | - for(let j =0;j<this.constructionsitesList.length;j++){ | ||
| 287 | - if(this.threestepList[i].objectId == this.constructionsitesList[j].id){ | ||
| 288 | - for(let x in this.projectTypes){ | ||
| 289 | - if(this.projectTypes[x].code == this.constructionsitesList[j].projectType){ | ||
| 290 | - this.threestepList[i].type = this.projectTypes[x].name; | ||
| 291 | - } | ||
| 292 | - } | ||
| 293 | - } | ||
| 294 | - } | ||
| 295 | - } | ||
| 296 | - | ||
| 297 | - | ||
| 298 | - let str = "今日"; | ||
| 299 | - if(this.queryParams.his){ | ||
| 300 | - str = ""; | ||
| 301 | - } | ||
| 302 | - | ||
| 303 | - this.dayWorkCount = str + "长沙市工地开工数量:" + count + " " + str +"长沙市消纳场开工数量:" + count1; | ||
| 304 | - this.loading = false; | ||
| 305 | - }); | ||
| 306 | 114 | ||
| 307 | - earthsitesList(this.remoteQueryData).then(res => { | ||
| 308 | - this.earthsitesList = res.result.list; | ||
| 309 | - for(let i =0;i< this.threestepList.length;i++){ | ||
| 310 | - for(let j =0;j<this.earthsitesList.length;j++){ | ||
| 311 | - if(this.threestepList[i].eid == this.earthsitesList[j].id){ | ||
| 312 | - this.threestepList[i].etype = this.earthsitesList[j].typeName; | ||
| 313 | - this.threestepList[i].eplace = this.earthsitesList[j].areaName; | ||
| 314 | - } | ||
| 315 | - } | ||
| 316 | - } | ||
| 317 | - this.loading = false; | ||
| 318 | - }); | ||
| 319 | - | ||
| 320 | - this.total = response.total; | ||
| 321 | - }); | ||
| 322 | - | ||
| 323 | - | ||
| 324 | - }, | ||
| 325 | - // 取消按钮 | ||
| 326 | - cancel() { | ||
| 327 | - this.open = false; | ||
| 328 | - this.reset(); | ||
| 329 | - }, | ||
| 330 | - // 表单重置 | ||
| 331 | - reset() { | ||
| 332 | - this.form = { | ||
| 333 | - id: null, | ||
| 334 | - name: null, | ||
| 335 | - type: null, | ||
| 336 | - place: null, | ||
| 337 | - selfCheckTime: null, | ||
| 338 | - objectId: null, | ||
| 339 | - earthsitesId: null, | ||
| 340 | - createTime: null, | ||
| 341 | - checkTime: null, | ||
| 342 | - earthsitesName: null, | ||
| 343 | - contract: null, | ||
| 344 | - companys: null, | ||
| 345 | - companyTrucks: null, | ||
| 346 | - img0: null, | ||
| 347 | - img1: null, | ||
| 348 | - img2: null, | ||
| 349 | - img3: null, | ||
| 350 | - img4: null, | ||
| 351 | - img5: null, | ||
| 352 | - img6: null, | ||
| 353 | - img7: null, | ||
| 354 | - img8: null, | ||
| 355 | - img9: null, | ||
| 356 | - img10: null, | ||
| 357 | - img11: null, | ||
| 358 | - img12: null, | ||
| 359 | - person: null, | ||
| 360 | - phone: null | ||
| 361 | - }; | ||
| 362 | - this.resetForm("form"); | ||
| 363 | - }, | ||
| 364 | - /** 搜索按钮操作 */ | ||
| 365 | - handleQuery() { | ||
| 366 | - this.queryParams.pageNum = 1; | ||
| 367 | - this.getList(); | ||
| 368 | - }, | ||
| 369 | - /** 重置按钮操作 */ | ||
| 370 | - resetQuery() { | ||
| 371 | - this.resetForm("queryForm"); | ||
| 372 | - this.handleQuery(); | ||
| 373 | - }, | ||
| 374 | - // 多选框选中数据 | ||
| 375 | - handleSelectionChange(selection) { | ||
| 376 | - this.ids = selection.map(item => item.id) | ||
| 377 | - this.single = selection.length !== 1 | ||
| 378 | - this.multiple = !selection.length | ||
| 379 | - }, | ||
| 380 | - /** 新增按钮操作 */ | ||
| 381 | - handleAdd() { | ||
| 382 | - this.reset(); | ||
| 383 | - this.open = true; | ||
| 384 | - this.title = "报工自查"; | ||
| 385 | - }, | ||
| 386 | - /** 修改按钮操作 */ | ||
| 387 | - handleUpdate(row) { | ||
| 388 | - this.reset(); | ||
| 389 | - this.businessKey = row.id +""; | ||
| 390 | - this.info = true; | ||
| 391 | - }, | ||
| 392 | - getAreaName(code){ | ||
| 393 | - for(let i =0;i<this.areas.length;i++){ | ||
| 394 | - if(Number(code) == this.areas[i].code){ | ||
| 395 | - return this.areas[i].name; | ||
| 396 | - break; | ||
| 397 | - } | ||
| 398 | - } | ||
| 399 | - return code; | ||
| 400 | - }, | ||
| 401 | - | ||
| 402 | - reSub(row){ | ||
| 403 | - this.reset(); | ||
| 404 | - | ||
| 405 | - this.open = true; | ||
| 406 | - this.title = "再次提交"; | ||
| 407 | - getThreestep(row.id).then(res=>{ | ||
| 408 | - this.form = res.data; | ||
| 409 | - this.form.type = this.form.type + ""; | ||
| 410 | - | ||
| 411 | - for (let i = 0; i < 13; i++) { | ||
| 412 | - if (this.form["img" + i]) { | ||
| 413 | - this.form["img" + i] = this.form["img" + i].split(","); | ||
| 414 | - } | ||
| 415 | - } | ||
| 416 | - | ||
| 417 | - | ||
| 418 | - this.form.status = 0; | ||
| 419 | - this.form.id = null; | ||
| 420 | - }); | ||
| 421 | - | ||
| 422 | - | ||
| 423 | - | ||
| 424 | - }, | ||
| 425 | - | ||
| 426 | - checkEndSuccess(){ | ||
| 427 | - this.form.checkEndTime = new Date(); | ||
| 428 | - this.form.id = this.businessKey; | ||
| 429 | - for (let i = 1; i < 4; i++) { | ||
| 430 | - if (this.form["attchItem" + i]) { | ||
| 431 | - this.form["attchItem" + i] = this.form["attchItem" + i] + ""; | ||
| 432 | - } | ||
| 433 | - } | ||
| 434 | - this.submitForm(); | ||
| 435 | - }, | ||
| 436 | - checkEndError(){ | ||
| 437 | - console.log(this.form, this.businessKey); | ||
| 438 | - //发起案卷 | ||
| 439 | - }, | ||
| 440 | - | ||
| 441 | - /** 提交按钮 */ | ||
| 442 | - submitForm() { | ||
| 443 | - this.$refs["form"].validate(valid => { | ||
| 444 | - if (valid) { | ||
| 445 | - if (this.form.id != null) { | ||
| 446 | - updateThreestep(this.form).then(response => { | ||
| 447 | - this.msgSuccess("修改成功"); | ||
| 448 | - this.open = false; | ||
| 449 | - this.open2 = false; | ||
| 450 | - this.getList(); | ||
| 451 | - }); | ||
| 452 | - } else { | ||
| 453 | - this.form.companys = this.form.companys + ""; | ||
| 454 | - this.form.companyTrucks = this.form.companyTrucks + ""; | ||
| 455 | - | ||
| 456 | - for (let i = 0; i < 13; i++) { | ||
| 457 | - if (this.form["img" + i]) { | ||
| 458 | - | ||
| 459 | - this.form["img" + i] = this.form["img" + i] + ""; | ||
| 460 | - } | ||
| 461 | - } | ||
| 462 | - addThreestep(this.form).then(response => { | ||
| 463 | - this.msgSuccess("新增成功"); | ||
| 464 | - this.open = false; | ||
| 465 | - this.open2 = false; | ||
| 466 | - this.getList(); | ||
| 467 | - }); | ||
| 468 | - } | ||
| 469 | - } | ||
| 470 | - }); | ||
| 471 | - }, | ||
| 472 | - /** 删除按钮操作 */ | ||
| 473 | - handleDelete(row) { | ||
| 474 | - const ids = row.id || this.ids; | ||
| 475 | - this.$confirm('是否确认删除开工报表编号为"' + ids + '"的数据项?', "警告", { | ||
| 476 | - confirmButtonText: "确定", | ||
| 477 | - cancelButtonText: "取消", | ||
| 478 | - type: "warning" | ||
| 479 | - }).then(function() { | ||
| 480 | - return delThreestep(ids); | ||
| 481 | - }).then(() => { | ||
| 482 | - this.getList(); | ||
| 483 | - this.msgSuccess("删除成功"); | ||
| 484 | - }) | ||
| 485 | - }, | ||
| 486 | - /** 导出按钮操作 */ | ||
| 487 | - handleExport() { | ||
| 488 | - | ||
| 489 | - let data = []; | ||
| 490 | - let index = 1; | ||
| 491 | - for(let i in this.threestepList){ | ||
| 492 | - | ||
| 493 | - | ||
| 494 | - let obj = { | ||
| 495 | - id:index, | ||
| 496 | - name:this.threestepList[i].name, | ||
| 497 | - createTime:this.threestepList[i].createTime, | ||
| 498 | - selfCheckTime:this.threestepList[i].selfCheckTime, | ||
| 499 | - type:this.threestepList[i].type, | ||
| 500 | - place:this.threestepList[i].place, | ||
| 501 | - status:this.threestepList[i].status, | ||
| 502 | - ename:this.threestepList[i].ename, | ||
| 503 | - etype:this.threestepList[i].etype, | ||
| 504 | - eplace:this.threestepList[i].eplace, | ||
| 505 | - estatus:this.threestepList[i].estatus, | ||
| 506 | - eselfCheckTime:this.threestepList[i].eselfCheckTime, | ||
| 507 | - descript:this.threestepList[i].descript, | ||
| 508 | - } | ||
| 509 | - | ||
| 510 | - data.push(obj); | ||
| 511 | - | ||
| 512 | - index += 1; | 115 | +</script> |
| 513 | 116 | ||
| 514 | 117 | ||
| 515 | - } | ||
| 516 | - this.$confirm('是否确认导出所有开工报表数据项?', "警告", { | ||
| 517 | - confirmButtonText: "确定", | ||
| 518 | - cancelButtonText: "取消", | ||
| 519 | - type: "warning" | ||
| 520 | - }).then(function() { | ||
| 521 | - return exportDayWorkList(data); | ||
| 522 | - }).then(response => { | ||
| 523 | - this.download(response.message); | ||
| 524 | - }) | ||
| 525 | - } | ||
| 526 | - } | ||
| 527 | - }; | ||
| 528 | -</script> | 118 | +<script src="../../../api/dayWorkReport.js" /> |
| 529 | \ No newline at end of file | 119 | \ No newline at end of file |
trash-ui/src/views/h5/leaveApplication/index.vue
| @@ -120,7 +120,7 @@ | @@ -120,7 +120,7 @@ | ||
| 120 | </a> | 120 | </a> |
| 121 | 121 | ||
| 122 | 122 | ||
| 123 | - <pagination | 123 | + <h5Page |
| 124 | v-show="total>0" | 124 | v-show="total>0" |
| 125 | :total="total" | 125 | :total="total" |
| 126 | :page.sync="queryParams.pageNum" | 126 | :page.sync="queryParams.pageNum" |
| @@ -215,7 +215,7 @@ | @@ -215,7 +215,7 @@ | ||
| 215 | </el-dialog> | 215 | </el-dialog> |
| 216 | 216 | ||
| 217 | <el-dialog :title="title" :visible.sync="openInfo" width="300px" append-to-body :close-on-click-modal="false"> | 217 | <el-dialog :title="title" :visible.sync="openInfo" width="300px" append-to-body :close-on-click-modal="false"> |
| 218 | - <leaveApplicationInfo :idInfo="idInfo" v-if="openInfo"/> | 218 | + <h5Info :idInfo="idInfo" v-if="openInfo"/> |
| 219 | <div slot="footer" class="dialog-footer"> | 219 | <div slot="footer" class="dialog-footer"> |
| 220 | <el-button @click="cancel">取 消</el-button> | 220 | <el-button @click="cancel">取 消</el-button> |
| 221 | </div> | 221 | </div> |
| @@ -223,318 +223,4 @@ | @@ -223,318 +223,4 @@ | ||
| 223 | </div> | 223 | </div> |
| 224 | </template> | 224 | </template> |
| 225 | 225 | ||
| 226 | -<script> | ||
| 227 | -import { | ||
| 228 | - listLeaveApplication, | ||
| 229 | - getLeaveApplication, | ||
| 230 | - delLeaveApplication, | ||
| 231 | - addLeaveApplication, | ||
| 232 | - updateLeaveApplication, | ||
| 233 | - exportLeaveApplication | ||
| 234 | -} from "@/api/office/leaveApplication"; | ||
| 235 | -import Editor from '@/components/ZcEditor'; | ||
| 236 | -import leaveApplicationInfo from './leaveApplicationInfo'; | ||
| 237 | -import {getDict} from "@/api/dict"; | ||
| 238 | - | ||
| 239 | - | ||
| 240 | - import pagination from '../Pagination'; | ||
| 241 | - | ||
| 242 | -export default { | ||
| 243 | - name: "LeaveApplication", | ||
| 244 | - components: {Editor, leaveApplicationInfo,pagination}, | ||
| 245 | - data() { | ||
| 246 | - return { | ||
| 247 | - // 遮罩层 | ||
| 248 | - loading: true, | ||
| 249 | - // 选中数组 | ||
| 250 | - ids: [], | ||
| 251 | - // 非单个禁用 | ||
| 252 | - single: true, | ||
| 253 | - // 非多个禁用 | ||
| 254 | - multiple: true, | ||
| 255 | - // 显示搜索条件 | ||
| 256 | - showSearch: true, | ||
| 257 | - // 总条数 | ||
| 258 | - total: 0, | ||
| 259 | - // 请假申请表格数据 | ||
| 260 | - leaveApplicationList: [], | ||
| 261 | - // 弹出层标题 | ||
| 262 | - title: "", | ||
| 263 | - // 是否显示弹出层 | ||
| 264 | - open: false, | ||
| 265 | - // 查询参数 | ||
| 266 | - queryParams: { | ||
| 267 | - pageNum: 1, | ||
| 268 | - pageSize: 10, | ||
| 269 | - applicant: null, | ||
| 270 | - deptName: null, | ||
| 271 | - positionId: null, | ||
| 272 | - birthdate: null, | ||
| 273 | - phone: null, | ||
| 274 | - type: null, | ||
| 275 | - status: null, | ||
| 276 | - }, | ||
| 277 | - // 表单参数 | ||
| 278 | - form: {}, | ||
| 279 | - // 表单校验 | ||
| 280 | - rules: { | ||
| 281 | - type: [ | ||
| 282 | - {required: true, message: '必填', trigger: 'change'}, | ||
| 283 | - ], | ||
| 284 | - beginDate: [ | ||
| 285 | - {required: true, message: '必填', trigger: 'change'}, | ||
| 286 | - ], | ||
| 287 | - endDate: [ | ||
| 288 | - {required: true, message: '必填', trigger: 'change'}, | ||
| 289 | - ], | ||
| 290 | - phone: [ | ||
| 291 | - {required: true, message: '必填', trigger: 'change'}, | ||
| 292 | - { | ||
| 293 | - pattern: /^1(3|4|5|7|8|9)\d{9}$/, | ||
| 294 | - message: '手机号格式错误', | ||
| 295 | - trigger: 'change' | ||
| 296 | - } | ||
| 297 | - ], | ||
| 298 | - numberDays: [ | ||
| 299 | - {required: true, message: '必填', trigger: 'change'}, | ||
| 300 | - { | ||
| 301 | - pattern: /^(0|[1-9]\d*)(\.5)?$/, | ||
| 302 | - message: '只能为整数或者0.5', | ||
| 303 | - trigger: 'change' | ||
| 304 | - }, | ||
| 305 | - { | ||
| 306 | - pattern: /^(?!0+(\.0+)?$)\d+(\.\d+)?$/, | ||
| 307 | - message: '不能为0', | ||
| 308 | - trigger: 'change' | ||
| 309 | - } | ||
| 310 | - ] | ||
| 311 | - }, | ||
| 312 | - openInfo: false, | ||
| 313 | - idInfo: null, | ||
| 314 | - fileEntityList:[], | ||
| 315 | - depts:[] | ||
| 316 | - }; | ||
| 317 | - }, | ||
| 318 | - created() { | ||
| 319 | - let dep = {type:"CSUserDepartmentType"}; | ||
| 320 | - getDict(dep).then(res=>{ | ||
| 321 | - this.depts = res.result; | ||
| 322 | - }); | ||
| 323 | - this.getList(); | ||
| 324 | - }, | ||
| 325 | - methods: { | ||
| 326 | - /** 查询请假申请列表 */ | ||
| 327 | - getList() { | ||
| 328 | - this.loading = true; | ||
| 329 | - listLeaveApplication(this.queryParams).then(response => { | ||
| 330 | - this.leaveApplicationList = response.rows; | ||
| 331 | - this.total = response.total; | ||
| 332 | - this.loading = false; | ||
| 333 | - }); | ||
| 334 | - }, | ||
| 335 | - // 取消按钮 | ||
| 336 | - cancel() { | ||
| 337 | - this.open = false; | ||
| 338 | - this.openInfo = false; | ||
| 339 | - this.reset(); | ||
| 340 | - }, | ||
| 341 | - // 表单重置 | ||
| 342 | - reset() { | ||
| 343 | - this.fileEntityList = []; | ||
| 344 | - this.form = { | ||
| 345 | - id: null, | ||
| 346 | - applicant: null, | ||
| 347 | - deptName: null, | ||
| 348 | - positionId: null, | ||
| 349 | - workDate: null, | ||
| 350 | - birthdate: null, | ||
| 351 | - phone: null, | ||
| 352 | - type: null, | ||
| 353 | - beginDate: null, | ||
| 354 | - endDate: null, | ||
| 355 | - numberDays: null, | ||
| 356 | - content: null, | ||
| 357 | - status: 0, | ||
| 358 | - createTime: null, | ||
| 359 | - createBy: null, | ||
| 360 | - updateTime: null, | ||
| 361 | - updateBy: null | ||
| 362 | - }; | ||
| 363 | - this.resetForm("form"); | ||
| 364 | - }, | ||
| 365 | - /** 搜索按钮操作 */ | ||
| 366 | - handleQuery() { | ||
| 367 | - this.queryParams.pageNum = 1; | ||
| 368 | - this.getList(); | ||
| 369 | - }, | ||
| 370 | - /** 重置按钮操作 */ | ||
| 371 | - resetQuery() { | ||
| 372 | - this.resetForm("queryForm"); | ||
| 373 | - this.handleQuery(); | ||
| 374 | - }, | ||
| 375 | - // 多选框选中数据 | ||
| 376 | - handleSelectionChange(selection) { | ||
| 377 | - this.ids = selection.map(item => item.id) | ||
| 378 | - this.single = selection.length !== 1 | ||
| 379 | - this.multiple = !selection.length | ||
| 380 | - }, | ||
| 381 | - /** 查看按钮操作 */ | ||
| 382 | - handleInfo(row) { | ||
| 383 | - this.reset(); | ||
| 384 | - this.idInfo = row.id+""; | ||
| 385 | - this.title = "请假申请详情"; | ||
| 386 | - this.openInfo = true; | ||
| 387 | - }, | ||
| 388 | - /** 新增按钮操作 */ | ||
| 389 | - handleAdd() { | ||
| 390 | - this.reset(); | ||
| 391 | - this.open = true; | ||
| 392 | - this.title = "添加请假申请"; | ||
| 393 | - }, | ||
| 394 | - /** 修改按钮操作 */ | ||
| 395 | - handleUpdate(row) { | ||
| 396 | - this.reset(); | ||
| 397 | - const id = row.id || this.ids | ||
| 398 | - getLeaveApplication(id).then(response => { | ||
| 399 | - this.form = response.data.leaveApplication; | ||
| 400 | - let files = JSON.stringify(response.data.uploadFiles); | ||
| 401 | - this.fileEntityList = JSON.parse(files.replaceAll("filePath", "url").replaceAll("fileName", "name")) | ||
| 402 | - this.open = true; | ||
| 403 | - this.title = "修改请假申请"; | ||
| 404 | - }); | ||
| 405 | - }, | ||
| 406 | - /** 提交按钮 */ | ||
| 407 | - submitForm() { | ||
| 408 | - this.$refs["form"].validate(valid => { | ||
| 409 | - if (valid) { | ||
| 410 | - let formData = new FormData(); | ||
| 411 | - let form = this.form; | ||
| 412 | - //去掉params属性 | ||
| 413 | - delete form.params; | ||
| 414 | - formData.append('fileList', null); | ||
| 415 | - //将新增的文件放入formData | ||
| 416 | - this.fileEntityList.forEach(item => { | ||
| 417 | - if(item.id==null){ | ||
| 418 | - formData.append('fileList', item.raw) | ||
| 419 | - } | ||
| 420 | - }) | ||
| 421 | - if (this.form.id != null) { | ||
| 422 | - formData.append("leaveApplication", JSON.stringify(form)); | ||
| 423 | - formData.append("uploadFilesList", null); | ||
| 424 | - this.fileEntityList.forEach(item => { | ||
| 425 | - delete item.params; | ||
| 426 | - if(item != "null" && item != null){ | ||
| 427 | - formData.append('uploadFilesList', JSON.stringify(item).replaceAll("url", "filePath").replaceAll("name", "fileName")); | ||
| 428 | - } | ||
| 429 | - }) | ||
| 430 | - updateLeaveApplication(formData).then(response => { | ||
| 431 | - this.msgSuccess("修改成功"); | ||
| 432 | - this.open = false; | ||
| 433 | - this.getList(); | ||
| 434 | - }); | ||
| 435 | - } else { | ||
| 436 | - for (let key in form) { | ||
| 437 | - formData.append(key, form[key] == null ? "" : form[key]) | ||
| 438 | - } | ||
| 439 | - addLeaveApplication(formData).then(response => { | ||
| 440 | - this.msgSuccess("新增成功"); | ||
| 441 | - this.open = false; | ||
| 442 | - this.getList(); | ||
| 443 | - }); | ||
| 444 | - } | ||
| 445 | - } | ||
| 446 | - }); | ||
| 447 | - }, | ||
| 448 | - /** 删除按钮操作 */ | ||
| 449 | - handleDelete(row) { | ||
| 450 | - const ids = row.id || this.ids; | ||
| 451 | - this.$confirm('是否确认删除请假申请编号为"' + ids + '"的数据项?', "警告", { | ||
| 452 | - confirmButtonText: "确定", | ||
| 453 | - cancelButtonText: "取消", | ||
| 454 | - type: "warning" | ||
| 455 | - }).then(function () { | ||
| 456 | - return delLeaveApplication(ids); | ||
| 457 | - }).then(() => { | ||
| 458 | - this.getList(); | ||
| 459 | - this.msgSuccess("删除成功"); | ||
| 460 | - }) | ||
| 461 | - }, | ||
| 462 | - /** 导出按钮操作 */ | ||
| 463 | - handleExport() { | ||
| 464 | - const queryParams = this.queryParams; | ||
| 465 | - this.$confirm('是否确认导出所有请假申请数据项?', "警告", { | ||
| 466 | - confirmButtonText: "确定", | ||
| 467 | - cancelButtonText: "取消", | ||
| 468 | - type: "warning" | ||
| 469 | - }).then(function () { | ||
| 470 | - return exportLeaveApplication(queryParams); | ||
| 471 | - }).then(response => { | ||
| 472 | - this.download(response.message); | ||
| 473 | - }) | ||
| 474 | - }, | ||
| 475 | - /** | ||
| 476 | - * 文件改变时,限制文件上传格式和大小 | ||
| 477 | - * 文件格式只能为docx/xlsx/xls/ppt/doc/pdf/png/jpeg/png/jpg | ||
| 478 | - * 大小不超过5M | ||
| 479 | - * */ | ||
| 480 | - fileChange(file, fileList) { | ||
| 481 | - let count = 0; | ||
| 482 | - for (let i = 0; i < fileList.length; i++) { | ||
| 483 | - // console.log(fileList.length) | ||
| 484 | - // console.log(this.fileEntityList[i].name+"111"+file.name) | ||
| 485 | - if (fileList[i].name == file.name) { | ||
| 486 | - count++; | ||
| 487 | - if (count == 2) { | ||
| 488 | - this.$message({ | ||
| 489 | - message: '已存在此文件!', | ||
| 490 | - type: 'warning' | ||
| 491 | - }); | ||
| 492 | - for (let j = fileList.length; j > 0; j--) { | ||
| 493 | - //如果存在此文件,去除新选择的重复文件 | ||
| 494 | - if (fileList[j - 1].name == file.name) { | ||
| 495 | - fileList.splice(j - 1, 1); | ||
| 496 | - i--; | ||
| 497 | - return false; | ||
| 498 | - } | ||
| 499 | - } | ||
| 500 | - } | ||
| 501 | - } | ||
| 502 | - } | ||
| 503 | - let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase(); | ||
| 504 | - //格式符合后判断大小 | ||
| 505 | - if ("docx,xlsx,xls,ppt,doc,pdf,png,jpeg,png,jpg".indexOf(fileType) != -1) { | ||
| 506 | - let max5M = file.size / 1024 / 1024 < 5; | ||
| 507 | - if (!max5M) { | ||
| 508 | - this.$message({ | ||
| 509 | - message: '上传文件大小不得超过5M!', | ||
| 510 | - type: 'warning' | ||
| 511 | - }); | ||
| 512 | - fileList = fileList.splice(fileList.length - 1, 1); | ||
| 513 | - } else { | ||
| 514 | - //符合条件后进行添加 | ||
| 515 | - this.fileEntityList = fileList | ||
| 516 | - } | ||
| 517 | - } else { | ||
| 518 | - this.$message({ | ||
| 519 | - message: '上传文件只能是 docx、xlsx、xls、ppt、doc、pdf、png、jpeg、png、jpg格式!', | ||
| 520 | - type: 'warning' | ||
| 521 | - }); | ||
| 522 | - } | ||
| 523 | - }, | ||
| 524 | - // 删除文件 | ||
| 525 | - handleDeleteFile(index) { | ||
| 526 | - this.fileEntityList.splice(index, 1); | ||
| 527 | - }, | ||
| 528 | - /** 文件下载 */ | ||
| 529 | - downloadFA(row) { | ||
| 530 | - let name = row.name; | ||
| 531 | - let url = row.url; | ||
| 532 | - const a = document.createElement('a') | ||
| 533 | - a.setAttribute('download', name) | ||
| 534 | - a.setAttribute('target', '_blank') | ||
| 535 | - a.setAttribute('href', process.env.VUE_APP_BASE_API + url); | ||
| 536 | - a.click() | ||
| 537 | - }, | ||
| 538 | - } | ||
| 539 | -}; | ||
| 540 | -</script> | 226 | +<script src="../../../api/leave.js"> |
trash-ui/src/views/h5/task/index.vue
| @@ -886,7 +886,6 @@ export default { | @@ -886,7 +886,6 @@ export default { | ||
| 886 | }) | 886 | }) |
| 887 | return; | 887 | return; |
| 888 | } else { | 888 | } else { |
| 889 | - if (value == 0) { | ||
| 890 | let postData = {}; | 889 | let postData = {}; |
| 891 | 890 | ||
| 892 | postData.tableName = this.businessKey; | 891 | postData.tableName = this.businessKey; |
| @@ -900,13 +899,6 @@ export default { | @@ -900,13 +899,6 @@ export default { | ||
| 900 | }); | 899 | }); |
| 901 | }); | 900 | }); |
| 902 | 901 | ||
| 903 | - } else { | ||
| 904 | - formDataSave(this.id, this.form.formData).then(response => { | ||
| 905 | - this.msgSuccess("审批成功"); | ||
| 906 | - this.violationCaseFile = false; | ||
| 907 | - this.getList(); | ||
| 908 | - }); | ||
| 909 | - } | ||
| 910 | } | 902 | } |
| 911 | } | 903 | } |
| 912 | if (this.definitionKey == "violation_warning") { | 904 | if (this.definitionKey == "violation_warning") { |
| @@ -922,7 +914,7 @@ export default { | @@ -922,7 +914,7 @@ export default { | ||
| 922 | }) | 914 | }) |
| 923 | return; | 915 | return; |
| 924 | } else { | 916 | } else { |
| 925 | - if (value == 0) { | 917 | + |
| 926 | let postData = {}; | 918 | let postData = {}; |
| 927 | postData.tableName = this.businessKey; | 919 | postData.tableName = this.businessKey; |
| 928 | postData.replyImg = this.form.replyImg; | 920 | postData.replyImg = this.form.replyImg; |
| @@ -935,13 +927,7 @@ export default { | @@ -935,13 +927,7 @@ export default { | ||
| 935 | }); | 927 | }); |
| 936 | }); | 928 | }); |
| 937 | 929 | ||
| 938 | - } else { | ||
| 939 | - formDataSave(this.id, this.form.formData).then(response => { | ||
| 940 | - this.msgSuccess("审批成功"); | ||
| 941 | - this.violationCaseFile1 = false; | ||
| 942 | - this.getList(); | ||
| 943 | - }); | ||
| 944 | - } | 930 | + |
| 945 | } | 931 | } |
| 946 | } | 932 | } |
| 947 | }, | 933 | }, |
trash-ui/src/views/h5/truckActivate/index.vue
| @@ -11,39 +11,35 @@ | @@ -11,39 +11,35 @@ | ||
| 11 | </el-col> | 11 | </el-col> |
| 12 | </el-row> | 12 | </el-row> |
| 13 | 13 | ||
| 14 | - | ||
| 15 | - <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> | ||
| 16 | - <el-form-item label="所属企业" prop="company"> | ||
| 17 | - <el-input | ||
| 18 | - v-model="queryParams.company" | ||
| 19 | - placeholder="请输入所属企业" | ||
| 20 | - | ||
| 21 | - size="small" | ||
| 22 | - | ||
| 23 | - /> | ||
| 24 | - </el-form-item> | ||
| 25 | - <el-form-item label="车牌号" prop="licensePlate"> | ||
| 26 | - <el-input | ||
| 27 | - v-model="queryParams.licensePlate" | ||
| 28 | - placeholder="请输入车牌号" | ||
| 29 | - | ||
| 30 | - size="small" | ||
| 31 | - | ||
| 32 | - /> | ||
| 33 | - </el-form-item> | ||
| 34 | - <el-form-item label="激活时间" prop="activateTime"> | ||
| 35 | - <el-date-picker size="small" style="width: 200px" | ||
| 36 | - v-model="queryParams.activateTime" | ||
| 37 | - type="date" | ||
| 38 | - value-format="yyyy-MM-dd" | ||
| 39 | - placeholder="选择激活时间"> | ||
| 40 | - </el-date-picker> | ||
| 41 | - </el-form-item> | ||
| 42 | - <el-form-item> | ||
| 43 | - <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | ||
| 44 | - <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | ||
| 45 | - </el-form-item> | ||
| 46 | - </el-form> | 14 | + <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px"> |
| 15 | + <el-form-item label="车牌号" prop="licensePlate"> | ||
| 16 | + <el-input | ||
| 17 | + v-model="queryParams.licensePlate" | ||
| 18 | + placeholder="请输入车牌号" | ||
| 19 | + size="small" /> | ||
| 20 | + </el-form-item> | ||
| 21 | + <el-form-item label="所属企业" prop="company"> | ||
| 22 | + <el-input v-model="queryParams.company" /> | ||
| 23 | + </el-form-item> | ||
| 24 | + <el-form-item label="激活状态" prop="activateStatus"> | ||
| 25 | + <el-select v-model="queryParams.activateStatus" placeholder="请选择激活状态" size="small"> | ||
| 26 | + <el-option label="未激活" value="0"/> | ||
| 27 | + <el-option label="已激活" value="1"/> | ||
| 28 | + </el-select> | ||
| 29 | + </el-form-item> | ||
| 30 | + <el-form-item label="激活时间" prop="activateDate" v-if="openActivateTime"> | ||
| 31 | + <el-date-picker size="small" style="width: 200px" | ||
| 32 | + v-model="queryParams.activateDate" | ||
| 33 | + type="date" | ||
| 34 | + value-format="yyyy-MM-dd" | ||
| 35 | + placeholder="选择激活时间"> | ||
| 36 | + </el-date-picker> | ||
| 37 | + </el-form-item> | ||
| 38 | + <el-form-item> | ||
| 39 | + <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | ||
| 40 | + <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | ||
| 41 | + </el-form-item> | ||
| 42 | + </el-form> | ||
| 47 | 43 | ||
| 48 | <el-row :gutter="10" class="mb8"> | 44 | <el-row :gutter="10" class="mb8"> |
| 49 | <el-col :span="1.5"> | 45 | <el-col :span="1.5"> |
| @@ -93,7 +89,7 @@ | @@ -93,7 +89,7 @@ | ||
| 93 | </el-row> | 89 | </el-row> |
| 94 | </el-card> | 90 | </el-card> |
| 95 | 91 | ||
| 96 | - <pagination | 92 | + <h5Page |
| 97 | v-show="total>0" | 93 | v-show="total>0" |
| 98 | :total="total" | 94 | :total="total" |
| 99 | :page.sync="queryParams.pageNum" | 95 | :page.sync="queryParams.pageNum" |
| @@ -105,23 +101,21 @@ | @@ -105,23 +101,21 @@ | ||
| 105 | <el-dialog :title="title" :visible.sync="open" width="400px" append-to-body> | 101 | <el-dialog :title="title" :visible.sync="open" width="400px" append-to-body> |
| 106 | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> | 102 | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| 107 | <el-form-item label="所属工地" prop="construction"> | 103 | <el-form-item label="所属工地" prop="construction"> |
| 108 | - <el-select v-model="form.construction" placeholder="请选择所属工地"> | ||
| 109 | - <el-option v-for="item in constList" @click.native="getCompany(item)" :label="item.name" :value="item.name" :key="item.id"></el-option> | 104 | + <el-select v-model="form.construction" placeholder="请选择所属工地" @change="getCompany"> |
| 105 | + <el-option v-for="item in constList" :label="item.name" :value="item.name" ></el-option> | ||
| 110 | </el-select> | 106 | </el-select> |
| 111 | </el-form-item> | 107 | </el-form-item> |
| 112 | <el-form-item label="所属企业" prop="company"> | 108 | <el-form-item label="所属企业" prop="company"> |
| 113 | - <el-select v-model="form.company" filterable reserve-keyword> | ||
| 114 | - <el-option v-for="item in constCompany" :label="item" :value="item" @click.native="getTruckListByCompanyName(item)"/> | 109 | + <el-select v-model="form.company" filterable reserve-keyword @change="clearTruck"> |
| 110 | + <el-option v-for="item in companyList" :label="item.name" :value="item.name" /> | ||
| 115 | </el-select> | 111 | </el-select> |
| 116 | </el-form-item> | 112 | </el-form-item> |
| 117 | <el-form-item label="车牌号" prop="licensePlate"> | 113 | <el-form-item label="车牌号" prop="licensePlate"> |
| 118 | - <el-select v-model="form.licensePlate" placeholder="请选择车辆"> | ||
| 119 | - <el-option v-if="!construction.companyTrucks || construction.companyTrucks.indexOf(item.id) == -1" | ||
| 120 | - v-for="item in companyTruckList" | 114 | + <el-select v-model="form.licensePlate" placeholder="请选择车辆" multiple filterable> |
| 115 | + <el-option v-if="!form.company || form.company == item.companyName" | ||
| 116 | + v-for="item in truckList" | ||
| 121 | :label="item.licenseplateNo" | 117 | :label="item.licenseplateNo" |
| 122 | - :value="item.licenseplateNo" | ||
| 123 | - :key="item.id" | ||
| 124 | - @click.native="getTruck(item)"/> | 118 | + :value="item.id"/> |
| 125 | </el-select> | 119 | </el-select> |
| 126 | </el-form-item> | 120 | </el-form-item> |
| 127 | </el-form> | 121 | </el-form> |
| @@ -134,10 +128,4 @@ | @@ -134,10 +128,4 @@ | ||
| 134 | </div> | 128 | </div> |
| 135 | </template> | 129 | </template> |
| 136 | 130 | ||
| 137 | -<script> | ||
| 138 | - | ||
| 139 | - import pagination from '../Pagination'; | ||
| 140 | - | ||
| 141 | -</script> | ||
| 142 | - | ||
| 143 | <script src="../../../api/truck_active.js" /> | 131 | <script src="../../../api/truck_active.js" /> |
trash-ui/src/views/h5/violationCaseFile/index.vue
| @@ -85,7 +85,7 @@ | @@ -85,7 +85,7 @@ | ||
| 85 | </a> | 85 | </a> |
| 86 | 86 | ||
| 87 | 87 | ||
| 88 | - <pagination | 88 | + <h5Page |
| 89 | v-show="total>0" | 89 | v-show="total>0" |
| 90 | :total="total" | 90 | :total="total" |
| 91 | :page.sync="queryParams.pageNum" | 91 | :page.sync="queryParams.pageNum" |
| @@ -220,7 +220,7 @@ | @@ -220,7 +220,7 @@ | ||
| 220 | </div> | 220 | </div> |
| 221 | </el-dialog> | 221 | </el-dialog> |
| 222 | <el-dialog :title="title" :visible.sync="openInfo" width="300px" append-to-body :close-on-click-modal="false"> | 222 | <el-dialog :title="title" :visible.sync="openInfo" width="300px" append-to-body :close-on-click-modal="false"> |
| 223 | - <violationCaseFileInfo :idInfo="idInfo" v-if="openInfo" :entryType="0"/> | 223 | + <h5Info :idInfo="idInfo" v-if="openInfo" :entryType="0"/> |
| 224 | <div slot="footer" class="dialog-footer"> | 224 | <div slot="footer" class="dialog-footer"> |
| 225 | <el-button @click="cancel">取 消</el-button> | 225 | <el-button @click="cancel">取 消</el-button> |
| 226 | </div> | 226 | </div> |
| @@ -228,452 +228,4 @@ | @@ -228,452 +228,4 @@ | ||
| 228 | </div> | 228 | </div> |
| 229 | </template> | 229 | </template> |
| 230 | 230 | ||
| 231 | -<script> | ||
| 232 | -import { listViolationCaseFile, getViolationCaseFile, | ||
| 233 | - delViolationCaseFile, addViolationCaseFile, | ||
| 234 | - updateViolationCaseFile, exportViolationCaseFile } from "@/api/casefile/violationCaseFile"; | ||
| 235 | -import violationCaseFileInfo from "../task/violationCaseFileInfo"; | ||
| 236 | - | ||
| 237 | - import { | ||
| 238 | - earthsitesList, | ||
| 239 | - constructionsitesList, | ||
| 240 | - getDict, | ||
| 241 | - getArea, | ||
| 242 | - companyList, | ||
| 243 | - truckList, | ||
| 244 | - } from "@/api/dict"; | ||
| 245 | - | ||
| 246 | - | ||
| 247 | - import pagination from '../Pagination'; | ||
| 248 | -export default { | ||
| 249 | - name: "ViolationCaseFile", | ||
| 250 | - components: { violationCaseFileInfo,pagination }, | ||
| 251 | - data() { | ||
| 252 | - return { | ||
| 253 | - // 遮罩层 | ||
| 254 | - loading: true, | ||
| 255 | - // 选中数组 | ||
| 256 | - ids: [], | ||
| 257 | - // 非单个禁用 | ||
| 258 | - single: true, | ||
| 259 | - // 非多个禁用 | ||
| 260 | - multiple: true, | ||
| 261 | - // 显示搜索条件 | ||
| 262 | - showSearch: true, | ||
| 263 | - // 总条数 | ||
| 264 | - total: 0, | ||
| 265 | - // 平台违规案卷表格数据 | ||
| 266 | - violationCaseFileList: [], | ||
| 267 | - // 弹出层标题 | ||
| 268 | - title: "", | ||
| 269 | - // 是否显示弹出层 | ||
| 270 | - open: false, | ||
| 271 | - // 查询参数 | ||
| 272 | - queryParams: { | ||
| 273 | - pageNum: 1, | ||
| 274 | - pageSize: 10, | ||
| 275 | - number: null, | ||
| 276 | - violationObjectType: null, | ||
| 277 | - owningRegion: null, | ||
| 278 | - violationType: null, | ||
| 279 | - violationGrade: null, | ||
| 280 | - projectName: null, | ||
| 281 | - companyName: null, | ||
| 282 | - describe: null, | ||
| 283 | - sendObject: null, | ||
| 284 | - status: null, | ||
| 285 | - receive: null, | ||
| 286 | - receiveStatus: null, | ||
| 287 | - readBy: null, | ||
| 288 | - readTime: null | ||
| 289 | - }, | ||
| 290 | - // 表单参数 | ||
| 291 | - form: { | ||
| 292 | - | ||
| 293 | - }, | ||
| 294 | - place:null, | ||
| 295 | - // 表单校验 | ||
| 296 | - rules: { | ||
| 297 | - number :[ | ||
| 298 | - { required: true, message: "必填", trigger: "blur" } | ||
| 299 | - ], | ||
| 300 | - violationObjectType :[ | ||
| 301 | - { required: true, message: "必填", trigger: "blur" } | ||
| 302 | - ], | ||
| 303 | - owningRegion :[ | ||
| 304 | - { required: true, message: "必填", trigger: "blur" } | ||
| 305 | - ], | ||
| 306 | - violationType :[ | ||
| 307 | - { required: true, message: "必填", trigger: "blur" } | ||
| 308 | - ], | ||
| 309 | - }, | ||
| 310 | - caseType:[{code:0,name:"进入非专用车辆"}, | ||
| 311 | - {code:1,name:"无许可手续(工)"}, | ||
| 312 | - {code:2,name:"无许可手续(消)"}, | ||
| 313 | - {code:3,name:"黄土覆盖情况"}, | ||
| 314 | - {code:4,name:"出入口路面污染"}, | ||
| 315 | - {code:5,name:"出入口道路硬化"}, | ||
| 316 | - {code:6,name:"车辆冲洗是否到位"}, | ||
| 317 | - {code:7,name:"雾炮机是否正常开启"}, | ||
| 318 | - {code:8,name:"使用费专用车运输"}, | ||
| 319 | - {code:9,name:"监控点位未对准"}, | ||
| 320 | - {code:10,name:"未报开工作业"}, | ||
| 321 | - {code:11,name:"视频设备离线超时报警"}, | ||
| 322 | - {code:12,name:"三无车辆进入工地"}, | ||
| 323 | - {code:13,name:"未按时间作业"}, | ||
| 324 | - {code:14,name:"未报开工作业"}, | ||
| 325 | - {code:15,name:"视频设备离线超时报警"}, | ||
| 326 | - {code:16,name:"三无车辆进入消纳场"}, | ||
| 327 | - {code:17,name:"未到指定的消纳场作业"}, | ||
| 328 | - {code:18,name:"离线运输报警(工)"}, | ||
| 329 | - {code:19,name:"离线运输报警(消)"}, | ||
| 330 | - {code:20,name:"未激活车辆作业"}, | ||
| 331 | - {code:21,name:"未核准作业车辆作业"}, | ||
| 332 | - {code:22,name:"未按线路行驶"}, | ||
| 333 | - {code:23,name:"闯禁行驶"}, | ||
| 334 | - {code:24,name:"失信车辆作业"}, | ||
| 335 | - {code:25,name:"其他1"}, | ||
| 336 | - {code:26,name:"其他2"}, | ||
| 337 | - {code:27,name:"其他3"}, | ||
| 338 | - {code:28,name:"其他4"}, | ||
| 339 | - {code:29,name:"其他5"}], | ||
| 340 | - | ||
| 341 | - projectNameList:[ | ||
| 342 | - ], | ||
| 343 | - isLoading: false, | ||
| 344 | - fileEntityList:[], | ||
| 345 | - companyList:[ | ||
| 346 | - ], | ||
| 347 | - remoteQueryData: { | ||
| 348 | - "page": 1, | ||
| 349 | - "size": 9999 | ||
| 350 | - }, | ||
| 351 | - areas:[], | ||
| 352 | - data:{}, | ||
| 353 | - isLoadingCompany: false, | ||
| 354 | - idInfo:null, | ||
| 355 | - openInfo:false, | ||
| 356 | - }; | ||
| 357 | - }, | ||
| 358 | - created() { | ||
| 359 | - getArea().then(res=>{ | ||
| 360 | - | ||
| 361 | - this.areas = res.result; | ||
| 362 | - }); | ||
| 363 | - | ||
| 364 | - | ||
| 365 | - constructionsitesList(this.remoteQueryData).then(res => { | ||
| 366 | - this.projectNameList = res.result.list; | ||
| 367 | - earthsitesList(this.remoteQueryData).then(res => { | ||
| 368 | - for(var i in res.result.list){ | ||
| 369 | - this.projectNameList.push(res.result.list[i]); | ||
| 370 | - } | ||
| 371 | - }); | ||
| 372 | - }); | ||
| 373 | - | ||
| 374 | - | ||
| 375 | - companyList(this.remoteQueryData).then(res => { | ||
| 376 | - this.companyList = res.result.list; | ||
| 377 | - }); | ||
| 378 | - | ||
| 379 | - | ||
| 380 | - | ||
| 381 | - this.getList(); | ||
| 382 | - }, | ||
| 383 | - methods: { | ||
| 384 | - selectArea(item){ | ||
| 385 | - | ||
| 386 | - this.form.owningRegion = item.name; | ||
| 387 | - this.form.projectName = null; | ||
| 388 | - | ||
| 389 | - }, | ||
| 390 | - /** 查询平台违规案卷列表 */ | ||
| 391 | - getList() { | ||
| 392 | - this.loading = true; | ||
| 393 | - listViolationCaseFile(this.queryParams).then(response => { | ||
| 394 | - this.violationCaseFileList = response.rows; | ||
| 395 | - this.total = response.total; | ||
| 396 | - this.loading = false; | ||
| 397 | - }); | ||
| 398 | - }, | ||
| 399 | - // 取消按钮 | ||
| 400 | - cancel() { | ||
| 401 | - this.open = false; | ||
| 402 | - this.openInfo = false; | ||
| 403 | - this.reset(); | ||
| 404 | - }, | ||
| 405 | - // 表单重置 | ||
| 406 | - reset() { | ||
| 407 | - this.fileEntityList = []; | ||
| 408 | - this.form = { | ||
| 409 | - id: null, | ||
| 410 | - number: null, | ||
| 411 | - violationObjectType: null, | ||
| 412 | - owningRegion: null, | ||
| 413 | - violationType: null, | ||
| 414 | - violationGrade: null, | ||
| 415 | - projectName: null, | ||
| 416 | - companyName: null, | ||
| 417 | - describe: null, | ||
| 418 | - sendObject: null, | ||
| 419 | - createTime: null, | ||
| 420 | - createBy: null, | ||
| 421 | - updateTime: null, | ||
| 422 | - updateBy: null, | ||
| 423 | - status: 0, | ||
| 424 | - receive: null, | ||
| 425 | - receiveStatus: 0, | ||
| 426 | - readBy: null, | ||
| 427 | - readTime: null | ||
| 428 | - }; | ||
| 429 | - this.resetForm("form"); | ||
| 430 | - }, | ||
| 431 | - /** 搜索按钮操作 */ | ||
| 432 | - handleQuery() { | ||
| 433 | - this.queryParams.pageNum = 1; | ||
| 434 | - this.getList(); | ||
| 435 | - }, | ||
| 436 | - /** 重置按钮操作 */ | ||
| 437 | - resetQuery() { | ||
| 438 | - this.resetForm("queryForm"); | ||
| 439 | - this.handleQuery(); | ||
| 440 | - }, | ||
| 441 | - // 多选框选中数据 | ||
| 442 | - handleSelectionChange(selection) { | ||
| 443 | - this.ids = selection.map(item => item.id) | ||
| 444 | - this.single = selection.length!==1 | ||
| 445 | - this.multiple = !selection.length | ||
| 446 | - }, | ||
| 447 | - handleInfo(row){ | ||
| 448 | - this.idInfo = row.id + ""; | ||
| 449 | - this.openInfo = true; | ||
| 450 | - this.title = "平台违规案卷详情"; | ||
| 451 | - }, | ||
| 452 | - /** 新增按钮操作 */ | ||
| 453 | - handleAdd() { | ||
| 454 | - this.reset(); | ||
| 455 | - this.open = true; | ||
| 456 | - this.form.number = this.getNumber(); | ||
| 457 | - this.form.violationGrade = "一般类"; | ||
| 458 | - this.form.sendObject = "区管理部门(治)"; | ||
| 459 | - this.title = "添加平台违规案卷"; | ||
| 460 | - }, | ||
| 461 | - /** 修改按钮操作 */ | ||
| 462 | - handleUpdate(row) { | ||
| 463 | - this.reset(); | ||
| 464 | - const id = row.id || this.ids | ||
| 465 | - getViolationCaseFile(id).then(response => { | ||
| 466 | - this.form = response.data.violationCaseFile; | ||
| 467 | - let files = JSON.stringify(response.data.uploadFiles); | ||
| 468 | - this.fileEntityList = JSON.parse(files.replaceAll("filePath", "url").replaceAll("fileName", "name")) | ||
| 469 | - this.open = true; | ||
| 470 | - this.title = "修改平台违规案卷"; | ||
| 471 | - }); | ||
| 472 | - }, | ||
| 473 | - /** 提交按钮 */ | ||
| 474 | - submitForm() { | ||
| 475 | - this.$refs["form"].validate(valid => { | ||
| 476 | - if (valid) { | ||
| 477 | - | ||
| 478 | - if(this.form.sendObject == "运输企业" && this.form.companyName == null){ | ||
| 479 | - | ||
| 480 | - this.$message("请选择相关企业"); | ||
| 481 | - | ||
| 482 | - return; | ||
| 483 | - } | ||
| 484 | - | ||
| 485 | - | ||
| 486 | - let formData = new FormData(); | ||
| 487 | - let form = this.form; | ||
| 488 | - //去掉params属性 | ||
| 489 | - delete form.params; | ||
| 490 | - formData.append('fileList', null); | ||
| 491 | - //将新增的文件放入formData | ||
| 492 | - this.fileEntityList.forEach(item => { | ||
| 493 | - if(item.id==null){ | ||
| 494 | - formData.append('fileList', item.raw) | ||
| 495 | - } | ||
| 496 | - }) | ||
| 497 | - if (this.form.id != null) { | ||
| 498 | - formData.append("violationCaseFile", JSON.stringify(form)); | ||
| 499 | - formData.append("uploadFilesList", null); | ||
| 500 | - this.fileEntityList.forEach(item => { | ||
| 501 | - delete item.params; | ||
| 502 | - if(item != "null" && item != null){ | ||
| 503 | - formData.append('uploadFilesList', JSON.stringify(item).replaceAll("url", "filePath").replaceAll("name", "fileName")); | ||
| 504 | - } | ||
| 505 | - }) | ||
| 506 | - updateViolationCaseFile(formData).then(response => { | ||
| 507 | - this.msgSuccess("修改成功"); | ||
| 508 | - this.open = false; | ||
| 509 | - this.getList(); | ||
| 510 | - }); | ||
| 511 | - } else { | ||
| 512 | - for (let key in form) { | ||
| 513 | - formData.append(key, form[key] == null ? "" : form[key]) | ||
| 514 | - } | ||
| 515 | - addViolationCaseFile(formData).then(response => { | ||
| 516 | - this.msgSuccess("新增成功"); | ||
| 517 | - this.open = false; | ||
| 518 | - this.getList(); | ||
| 519 | - }); | ||
| 520 | - } | ||
| 521 | - } | ||
| 522 | - }); | ||
| 523 | - }, | ||
| 524 | - /** 删除按钮操作 */ | ||
| 525 | - handleDelete(row) { | ||
| 526 | - const ids = row.id || this.ids; | ||
| 527 | - this.$confirm('是否确认删除平台违规案卷编号为"' + ids + '"的数据项?', "警告", { | ||
| 528 | - confirmButtonText: "确定", | ||
| 529 | - cancelButtonText: "取消", | ||
| 530 | - type: "warning" | ||
| 531 | - }).then(function() { | ||
| 532 | - return delViolationCaseFile(ids); | ||
| 533 | - }).then(() => { | ||
| 534 | - this.getList(); | ||
| 535 | - this.msgSuccess("删除成功"); | ||
| 536 | - }) | ||
| 537 | - }, | ||
| 538 | - /** 导出按钮操作 */ | ||
| 539 | - handleExport() { | ||
| 540 | - const queryParams = this.queryParams; | ||
| 541 | - this.$confirm('是否确认导出所有平台违规案卷数据项?', "警告", { | ||
| 542 | - confirmButtonText: "确定", | ||
| 543 | - cancelButtonText: "取消", | ||
| 544 | - type: "warning" | ||
| 545 | - }).then(function() { | ||
| 546 | - return exportViolationCaseFile(queryParams); | ||
| 547 | - }).then(response => { | ||
| 548 | - this.download(response.message); | ||
| 549 | - }) | ||
| 550 | - }, | ||
| 551 | - /** 生成案卷编号 */ | ||
| 552 | - getNumber(){ | ||
| 553 | - const now = new Date(); | ||
| 554 | - const year = now.getFullYear().toString().slice(-2); // 提取后两位数 | ||
| 555 | - const month = now.getMonth() + 1 < 10 ? `0${now.getMonth() + 1}` : now.getMonth() + 1; | ||
| 556 | - const day = now.getDate() < 10 ? `0${now.getDate()}` : now.getDate(); | ||
| 557 | - const hour = now.getHours() < 10 ? `0${now.getHours()}` : now.getHours(); | ||
| 558 | - const minute = now.getMinutes() < 10 ? `0${now.getMinutes()}` : now.getMinutes(); | ||
| 559 | - const second = now.getSeconds() < 10 ? `0${now.getSeconds()}` : now.getSeconds(); | ||
| 560 | - const millisecond = now.getMilliseconds(); | ||
| 561 | - const code = `${year}${month}${day}${hour}${minute}${second}${millisecond}`; | ||
| 562 | - return code; | ||
| 563 | - }, | ||
| 564 | - projectNameLoadOptions(query) { | ||
| 565 | - // 根据输入的关键字query异步加载选项数据 | ||
| 566 | - this.isLoading = true | ||
| 567 | - setTimeout(() => { | ||
| 568 | - // 模拟异步加载数据 | ||
| 569 | - const data = [ | ||
| 570 | - { name:'项目1' }, | ||
| 571 | - { name:'项目2' }, | ||
| 572 | - { name:'项目3' } | ||
| 573 | - ].filter(item => item.name.includes(query)) | ||
| 574 | - this.projectNameList = data | ||
| 575 | - this.isLoading = false | ||
| 576 | - }, 200) | ||
| 577 | - }, | ||
| 578 | - companyLoadOptions(query) { | ||
| 579 | - // 根据输入的关键字query异步加载选项数据 | ||
| 580 | - this.isLoadingCompany = true | ||
| 581 | - setTimeout(() => { | ||
| 582 | - // 模拟异步加载数据 | ||
| 583 | - const data = [ | ||
| 584 | - { name:'公司1' }, | ||
| 585 | - { name:'公司2' }, | ||
| 586 | - { name:'公司3' } | ||
| 587 | - ].filter(item => item.name.includes(query)) | ||
| 588 | - this.companyList = data | ||
| 589 | - this.isLoadingCompany = false | ||
| 590 | - }, 200) | ||
| 591 | - }, | ||
| 592 | - /** | ||
| 593 | - * 文件改变时,限制文件上传格式和大小 | ||
| 594 | - * 文件格式只能为docx/xlsx/xls/ppt/doc/pdf/png/jpeg/png/jpg | ||
| 595 | - * 大小不超过20M | ||
| 596 | - * */ | ||
| 597 | - fileChange(file, fileList) { | ||
| 598 | - let count = 0; | ||
| 599 | - for (let i = 0; i < fileList.length; i++) { | ||
| 600 | - // console.log(fileList.length) | ||
| 601 | - // console.log(this.fileEntityList[i].name+"111"+file.name) | ||
| 602 | - if (fileList[i].name == file.name) { | ||
| 603 | - count++; | ||
| 604 | - if (count == 2) { | ||
| 605 | - this.$message({ | ||
| 606 | - message: '已存在此文件!', | ||
| 607 | - type: 'warning' | ||
| 608 | - }); | ||
| 609 | - for (let j = fileList.length; j > 0; j--) { | ||
| 610 | - //如果存在此文件,去除新选择的重复文件 | ||
| 611 | - if (fileList[j - 1].name == file.name) { | ||
| 612 | - fileList.splice(j - 1, 1); | ||
| 613 | - i--; | ||
| 614 | - return false; | ||
| 615 | - } | ||
| 616 | - } | ||
| 617 | - } | ||
| 618 | - } | ||
| 619 | - } | ||
| 620 | - let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase(); | ||
| 621 | - //格式符合后判断大小 | ||
| 622 | - if ("docx,xlsx,xls,ppt,doc,pdf,png,jpeg,png,jpg".indexOf(fileType) != -1) { | ||
| 623 | - let max5M = file.size / 1024 / 1024 < 20; | ||
| 624 | - if (!max5M) { | ||
| 625 | - this.$message({ | ||
| 626 | - message: '上传文件大小不得超过20M!', | ||
| 627 | - type: 'warning' | ||
| 628 | - }); | ||
| 629 | - fileList = fileList.splice(fileList.length - 1, 1); | ||
| 630 | - } else { | ||
| 631 | - //符合条件后进行添加 | ||
| 632 | - this.fileEntityList = fileList | ||
| 633 | - } | ||
| 634 | - } else { | ||
| 635 | - this.$message({ | ||
| 636 | - message: '上传文件只能是 docx、xlsx、xls、ppt、doc、pdf、png、jpeg、png、jpg格式!', | ||
| 637 | - type: 'warning' | ||
| 638 | - }); | ||
| 639 | - } | ||
| 640 | - }, | ||
| 641 | - // 删除文件 | ||
| 642 | - handleDeleteFile(index) { | ||
| 643 | - this.fileEntityList.splice(index, 1); | ||
| 644 | - }, | ||
| 645 | - /** 文件下载 */ | ||
| 646 | - downloadFA(row) { | ||
| 647 | - let name = row.name; | ||
| 648 | - let url = row.url; | ||
| 649 | - const a = document.createElement('a') | ||
| 650 | - a.setAttribute('download', name) | ||
| 651 | - a.setAttribute('target', '_blank') | ||
| 652 | - a.setAttribute('href', process.env.VUE_APP_BASE_API + url); | ||
| 653 | - a.click() | ||
| 654 | - }, | ||
| 655 | - /** 生成违规描述 */ | ||
| 656 | - createDescribe(){ | ||
| 657 | - this.rules.companyName = [{ required: true, message: "必填", trigger: "blur" }] | ||
| 658 | - this.rules.projectName = [{ required: true, message: "必填", trigger: "blur" }] | ||
| 659 | - this.$refs["form"].validate(valid => { | ||
| 660 | - if (valid) { | ||
| 661 | - let formData = this.form; | ||
| 662 | - const now = new Date(); | ||
| 663 | - const year = now.getFullYear(); | ||
| 664 | - const month = now.getMonth() + 1 < 10 ? `0${now.getMonth() + 1}` : now.getMonth() + 1; | ||
| 665 | - const day = now.getDate() < 10 ? `0${now.getDate()}` : now.getDate(); | ||
| 666 | - const hour = now.getHours() < 10 ? `0${now.getHours()}` : now.getHours(); | ||
| 667 | - const minute = now.getMinutes() < 10 ? `0${now.getMinutes()}` : now.getMinutes(); | ||
| 668 | - const second = now.getSeconds() < 10 ? `0${now.getSeconds()}` : now.getSeconds(); | ||
| 669 | - const code = `${year}/${month}/${day} ${hour}:${minute}:${second}`; | ||
| 670 | - this.form.describe =code + formData.companyName + "在" + formData.projectName + "出现" + formData.violationType; | ||
| 671 | - this.rules.companyName = null; | ||
| 672 | - this.rules.projectName = null; | ||
| 673 | - } | ||
| 674 | - }); | ||
| 675 | - | ||
| 676 | - } | ||
| 677 | - } | ||
| 678 | -}; | ||
| 679 | -</script> | 231 | +<script src="../../../api/vio_casefile"> |
trash-ui/src/views/h5/violationWarningInformation/index.vue
| @@ -76,7 +76,7 @@ | @@ -76,7 +76,7 @@ | ||
| 76 | </el-card> | 76 | </el-card> |
| 77 | </a> | 77 | </a> |
| 78 | 78 | ||
| 79 | - <pagination | 79 | + <h5Page |
| 80 | v-show="total>0" | 80 | v-show="total>0" |
| 81 | :total="total" | 81 | :total="total" |
| 82 | :page.sync="queryParams.pageNum" | 82 | :page.sync="queryParams.pageNum" |
| @@ -182,7 +182,7 @@ | @@ -182,7 +182,7 @@ | ||
| 182 | </el-dialog> | 182 | </el-dialog> |
| 183 | 183 | ||
| 184 | <el-dialog :title="title" :visible.sync="openInfo" width="300px" append-to-body :close-on-click-modal="false"> | 184 | <el-dialog :title="title" :visible.sync="openInfo" width="300px" append-to-body :close-on-click-modal="false"> |
| 185 | - <violationWarningInformationInfo :idInfo="idInfo" v-if="openInfo" :entryType="0"/> | 185 | + <h5Info :idInfo="idInfo" v-if="openInfo" :entryType="0"/> |
| 186 | <div slot="footer" class="dialog-footer"> | 186 | <div slot="footer" class="dialog-footer"> |
| 187 | <el-button @click="cancel">取 消</el-button> | 187 | <el-button @click="cancel">取 消</el-button> |
| 188 | </div> | 188 | </div> |
| @@ -190,429 +190,4 @@ | @@ -190,429 +190,4 @@ | ||
| 190 | </div> | 190 | </div> |
| 191 | </template> | 191 | </template> |
| 192 | 192 | ||
| 193 | -<script> | ||
| 194 | -import { listViolationWarningInformation, getViolationWarningInformation, delViolationWarningInformation, addViolationWarningInformation, updateViolationWarningInformation, exportViolationWarningInformation } from "@/api/casefile/violationWarningInformation"; | ||
| 195 | -import violationWarningInformationInfo from "../task/violationWarningInformationInfo"; | ||
| 196 | -import { | ||
| 197 | - earthsitesList, | ||
| 198 | - constructionsitesList, | ||
| 199 | - getDict, | ||
| 200 | - getArea, | ||
| 201 | - companyList, | ||
| 202 | - truckList, | ||
| 203 | -} from "@/api/dict"; | ||
| 204 | - | ||
| 205 | - import pagination from '../Pagination'; | ||
| 206 | -export default { | ||
| 207 | - name: "ViolationWarningInformation", | ||
| 208 | - components: { violationWarningInformationInfo ,pagination}, | ||
| 209 | - data() { | ||
| 210 | - return { | ||
| 211 | - // 遮罩层 | ||
| 212 | - loading: true, | ||
| 213 | - // 选中数组 | ||
| 214 | - ids: [], | ||
| 215 | - // 非单个禁用 | ||
| 216 | - single: true, | ||
| 217 | - // 非多个禁用 | ||
| 218 | - multiple: true, | ||
| 219 | - // 显示搜索条件 | ||
| 220 | - showSearch: true, | ||
| 221 | - // 总条数 | ||
| 222 | - total: 0, | ||
| 223 | - // 违规预警信息表格数据 | ||
| 224 | - violationWarningInformationList: [], | ||
| 225 | - // 弹出层标题 | ||
| 226 | - title: "", | ||
| 227 | - // 是否显示弹出层 | ||
| 228 | - open: false, | ||
| 229 | - // 查询参数 | ||
| 230 | - queryParams: { | ||
| 231 | - pageNum: 1, | ||
| 232 | - pageSize: 10, | ||
| 233 | - number: null, | ||
| 234 | - violationObjectType: null, | ||
| 235 | - owningRegion: null, | ||
| 236 | - violationType: null, | ||
| 237 | - violationGrade: null, | ||
| 238 | - projectName: null, | ||
| 239 | - companyName: null, | ||
| 240 | - describe: null, | ||
| 241 | - sendObject: null, | ||
| 242 | - receive: null, | ||
| 243 | - receiveStatus: null, | ||
| 244 | - readBy: null, | ||
| 245 | - readTime: null, | ||
| 246 | - replyOne: null, | ||
| 247 | - replyTwo: null, | ||
| 248 | - replyThree: null | ||
| 249 | - }, | ||
| 250 | - // 表单参数 | ||
| 251 | - form: {}, | ||
| 252 | - // 表单校验 | ||
| 253 | - rules: { | ||
| 254 | - number :[ | ||
| 255 | - { required: true, message: "必填", trigger: "blur" } | ||
| 256 | - ], | ||
| 257 | - violationObjectType :[ | ||
| 258 | - { required: true, message: "必填", trigger: "blur" } | ||
| 259 | - ], | ||
| 260 | - owningRegion :[ | ||
| 261 | - { required: true, message: "必填", trigger: "blur" } | ||
| 262 | - ], | ||
| 263 | - violationType :[ | ||
| 264 | - { required: true, message: "必填", trigger: "blur" } | ||
| 265 | - ], | ||
| 266 | - }, | ||
| 267 | - caseType:[{code:0,name:"工地预警-未报开工作业"}, | ||
| 268 | - {code:1,name:"工地预警-视频设备离线超时报警"}, | ||
| 269 | - {code:2,name:"工地预警-三无车辆进入工地"}, | ||
| 270 | - {code:3,name:"工地预警未按时间作业"}, | ||
| 271 | - {code:4,name:"消纳场预警-未报开工作业"}, | ||
| 272 | - {code:5,name:"消纳场预警-视频设备离线超时报警"}, | ||
| 273 | - {code:6,name:"消纳场预警-三无车辆进入消纳场"}, | ||
| 274 | - {code:7,name:"消纳场预警-未到指定的消纳场作业"}, | ||
| 275 | - {code:8,name:"离线运输报警(工)"}, | ||
| 276 | - {code:9,name:"离线运输报警(消)"}, | ||
| 277 | - {code:10,name:"未激活车辆作业"}, | ||
| 278 | - {code:11,name:"未核准作业车辆作业"}, | ||
| 279 | - {code:12,name:"未按线路行驶"}, | ||
| 280 | - {code:13,name:"闯禁行驶"}, | ||
| 281 | - {code:14,name:"失信车辆作业"}], | ||
| 282 | - projectNameList:[ | ||
| 283 | - ], | ||
| 284 | - isLoading: false, | ||
| 285 | - fileEntityList:[], | ||
| 286 | - companyList:[ | ||
| 287 | - ], | ||
| 288 | - remoteQueryData: { | ||
| 289 | - "page": 1, | ||
| 290 | - "size": 9999 | ||
| 291 | - }, | ||
| 292 | - isLoadingCompany: false, | ||
| 293 | - idInfo:null, | ||
| 294 | - openInfo:false, | ||
| 295 | - areas:[], | ||
| 296 | - data:{}, | ||
| 297 | - }; | ||
| 298 | - }, | ||
| 299 | - created() { | ||
| 300 | - getArea().then(res=>{ | ||
| 301 | - | ||
| 302 | - this.areas = res.result; | ||
| 303 | - }); | ||
| 304 | - | ||
| 305 | - | ||
| 306 | - constructionsitesList(this.remoteQueryData).then(res => { | ||
| 307 | - this.projectNameList = res.result.list; | ||
| 308 | - earthsitesList(this.remoteQueryData).then(res => { | ||
| 309 | - for(var i in res.result.list){ | ||
| 310 | - this.projectNameList.push(res.result.list[i]); | ||
| 311 | - } | ||
| 312 | - }); | ||
| 313 | - }); | ||
| 314 | - | ||
| 315 | - console.log(this.data); | ||
| 316 | - | ||
| 317 | - companyList(this.remoteQueryData).then(res => { | ||
| 318 | - this.companyList = res.result.list; | ||
| 319 | - }); | ||
| 320 | - this.getList(); | ||
| 321 | - }, | ||
| 322 | - methods: { | ||
| 323 | - selectArea(item){ | ||
| 324 | - | ||
| 325 | - this.form.owningRegion = item.name; | ||
| 326 | - this.form.projectName = null; | ||
| 327 | - | ||
| 328 | - }, | ||
| 329 | - /** 查询违规预警信息列表 */ | ||
| 330 | - getList() { | ||
| 331 | - this.loading = true; | ||
| 332 | - listViolationWarningInformation(this.queryParams).then(response => { | ||
| 333 | - this.violationWarningInformationList = response.rows; | ||
| 334 | - this.total = response.total; | ||
| 335 | - this.loading = false; | ||
| 336 | - }); | ||
| 337 | - }, | ||
| 338 | - // 取消按钮 | ||
| 339 | - cancel() { | ||
| 340 | - this.open = false; | ||
| 341 | - this.openInfo = false; | ||
| 342 | - this.reset(); | ||
| 343 | - }, | ||
| 344 | - // 表单重置 | ||
| 345 | - reset() { | ||
| 346 | - this.fileEntityList = []; | ||
| 347 | - this.form = { | ||
| 348 | - id: null, | ||
| 349 | - number: null, | ||
| 350 | - violationObjectType: null, | ||
| 351 | - owningRegion: null, | ||
| 352 | - violationType: null, | ||
| 353 | - violationGrade: null, | ||
| 354 | - projectName: null, | ||
| 355 | - companyName: null, | ||
| 356 | - describe: null, | ||
| 357 | - sendObject: null, | ||
| 358 | - createTime: null, | ||
| 359 | - createBy: null, | ||
| 360 | - updateTime: null, | ||
| 361 | - updateBy: null, | ||
| 362 | - receive: null, | ||
| 363 | - receiveStatus: 0, | ||
| 364 | - readBy: null, | ||
| 365 | - readTime: null, | ||
| 366 | - replyOne: null, | ||
| 367 | - replyTwo: null, | ||
| 368 | - replyThree: null | ||
| 369 | - }; | ||
| 370 | - this.resetForm("form"); | ||
| 371 | - }, | ||
| 372 | - /** 搜索按钮操作 */ | ||
| 373 | - handleQuery() { | ||
| 374 | - this.queryParams.pageNum = 1; | ||
| 375 | - this.getList(); | ||
| 376 | - }, | ||
| 377 | - /** 重置按钮操作 */ | ||
| 378 | - resetQuery() { | ||
| 379 | - this.resetForm("queryForm"); | ||
| 380 | - this.handleQuery(); | ||
| 381 | - }, | ||
| 382 | - // 多选框选中数据 | ||
| 383 | - handleSelectionChange(selection) { | ||
| 384 | - this.ids = selection.map(item => item.id) | ||
| 385 | - this.single = selection.length!==1 | ||
| 386 | - this.multiple = !selection.length | ||
| 387 | - }, | ||
| 388 | - handleInfo(row){ | ||
| 389 | - this.idInfo = row.id+""; | ||
| 390 | - this.openInfo = true; | ||
| 391 | - this.title = "平台违规案卷详情"; | ||
| 392 | - }, | ||
| 393 | - /** 新增按钮操作 */ | ||
| 394 | - handleAdd() { | ||
| 395 | - this.reset(); | ||
| 396 | - this.open = true; | ||
| 397 | - this.form.number = this.getNumber(); | ||
| 398 | - this.form.violationGrade = "一般类"; | ||
| 399 | - this.form.sendObject = "区管理部门(治)"; | ||
| 400 | - this.title = "添加违规预警信息"; | ||
| 401 | - }, | ||
| 402 | - /** 修改按钮操作 */ | ||
| 403 | - handleUpdate(row) { | ||
| 404 | - this.reset(); | ||
| 405 | - const id = row.id || this.ids | ||
| 406 | - getViolationWarningInformation(id).then(response => { | ||
| 407 | - this.form = response.data.violationWarningInformation; | ||
| 408 | - let files = JSON.stringify(response.data.uploadFiles); | ||
| 409 | - this.fileEntityList = JSON.parse(files.replaceAll("filePath", "url").replaceAll("fileName", "name")) | ||
| 410 | - this.open = true; | ||
| 411 | - this.title = "修改违规预警信息"; | ||
| 412 | - }); | ||
| 413 | - | ||
| 414 | - }, | ||
| 415 | - /** 提交按钮 */ | ||
| 416 | - submitForm() { | ||
| 417 | - this.$refs["form"].validate(valid => { | ||
| 418 | - if (valid) { | ||
| 419 | - if(this.form.sendObject == "运输企业" && this.form.companyName == null){ | ||
| 420 | - | ||
| 421 | - this.$message("请选择相关企业"); | ||
| 422 | - | ||
| 423 | - return; | ||
| 424 | - } | ||
| 425 | - let formData = new FormData(); | ||
| 426 | - let form = this.form; | ||
| 427 | - //去掉params属性 | ||
| 428 | - delete form.params; | ||
| 429 | - formData.append('fileList', null); | ||
| 430 | - //将新增的文件放入formData | ||
| 431 | - this.fileEntityList.forEach(item => { | ||
| 432 | - if(item.id==null){ | ||
| 433 | - formData.append('fileList', item.raw) | ||
| 434 | - } | ||
| 435 | - }) | ||
| 436 | - if (this.form.id != null) { | ||
| 437 | - formData.append("violationWarningInformation", JSON.stringify(form)); | ||
| 438 | - formData.append("uploadFilesList", null); | ||
| 439 | - this.fileEntityList.forEach(item => { | ||
| 440 | - delete item.params; | ||
| 441 | - if(item != "null" && item != null){ | ||
| 442 | - formData.append('uploadFilesList', JSON.stringify(item).replaceAll("url", "filePath").replaceAll("name", "fileName")); | ||
| 443 | - } | ||
| 444 | - }) | ||
| 445 | - updateViolationWarningInformation(formData).then(response => { | ||
| 446 | - this.msgSuccess("修改成功"); | ||
| 447 | - this.open = false; | ||
| 448 | - this.getList(); | ||
| 449 | - }); | ||
| 450 | - } else { | ||
| 451 | - for (let key in form) { | ||
| 452 | - formData.append(key, form[key] == null ? "" : form[key]) | ||
| 453 | - } | ||
| 454 | - addViolationWarningInformation(formData).then(response => { | ||
| 455 | - this.msgSuccess("新增成功"); | ||
| 456 | - this.open = false; | ||
| 457 | - this.getList(); | ||
| 458 | - }); | ||
| 459 | - } | ||
| 460 | - } | ||
| 461 | - }); | ||
| 462 | - }, | ||
| 463 | - /** 删除按钮操作 */ | ||
| 464 | - handleDelete(row) { | ||
| 465 | - const ids = row.id || this.ids; | ||
| 466 | - this.$confirm('是否确认删除违规预警信息编号为"' + ids + '"的数据项?', "警告", { | ||
| 467 | - confirmButtonText: "确定", | ||
| 468 | - cancelButtonText: "取消", | ||
| 469 | - type: "warning" | ||
| 470 | - }).then(function() { | ||
| 471 | - return delViolationWarningInformation(ids); | ||
| 472 | - }).then(() => { | ||
| 473 | - this.getList(); | ||
| 474 | - this.msgSuccess("删除成功"); | ||
| 475 | - }) | ||
| 476 | - }, | ||
| 477 | - /** 导出按钮操作 */ | ||
| 478 | - handleExport() { | ||
| 479 | - const queryParams = this.queryParams; | ||
| 480 | - this.$confirm('是否确认导出所有违规预警信息数据项?', "警告", { | ||
| 481 | - confirmButtonText: "确定", | ||
| 482 | - cancelButtonText: "取消", | ||
| 483 | - type: "warning" | ||
| 484 | - }).then(function() { | ||
| 485 | - return exportViolationWarningInformation(queryParams); | ||
| 486 | - }).then(response => { | ||
| 487 | - this.download(response.message); | ||
| 488 | - }) | ||
| 489 | - }, | ||
| 490 | - /** 生成案卷编号 */ | ||
| 491 | - getNumber(){ | ||
| 492 | - const now = new Date(); | ||
| 493 | - const year = now.getFullYear().toString().slice(-2); // 提取后两位数 | ||
| 494 | - const month = now.getMonth() + 1 < 10 ? `0${now.getMonth() + 1}` : now.getMonth() + 1; | ||
| 495 | - const day = now.getDate() < 10 ? `0${now.getDate()}` : now.getDate(); | ||
| 496 | - const hour = now.getHours() < 10 ? `0${now.getHours()}` : now.getHours(); | ||
| 497 | - const minute = now.getMinutes() < 10 ? `0${now.getMinutes()}` : now.getMinutes(); | ||
| 498 | - const second = now.getSeconds() < 10 ? `0${now.getSeconds()}` : now.getSeconds(); | ||
| 499 | - const millisecond = now.getMilliseconds(); | ||
| 500 | - const code = `${year}${month}${day}${hour}${minute}${second}${millisecond}`; | ||
| 501 | - return code; | ||
| 502 | - }, | ||
| 503 | - projectNameLoadOptions(query) { | ||
| 504 | - // 根据输入的关键字query异步加载选项数据 | ||
| 505 | - this.isLoading = true | ||
| 506 | - setTimeout(() => { | ||
| 507 | - // 模拟异步加载数据 | ||
| 508 | - const data = [ | ||
| 509 | - { name:'项目1' }, | ||
| 510 | - { name:'项目2' }, | ||
| 511 | - { name:'项目3' } | ||
| 512 | - ].filter(item => item.name.includes(query)) | ||
| 513 | - this.projectNameList = data | ||
| 514 | - this.isLoading = false | ||
| 515 | - }, 200) | ||
| 516 | - }, | ||
| 517 | - companyLoadOptions(query) { | ||
| 518 | - // 根据输入的关键字query异步加载选项数据 | ||
| 519 | - this.isLoadingCompany = true | ||
| 520 | - setTimeout(() => { | ||
| 521 | - // 模拟异步加载数据 | ||
| 522 | - const data = [ | ||
| 523 | - { name:'公司1' }, | ||
| 524 | - { name:'公司2' }, | ||
| 525 | - { name:'公司3' } | ||
| 526 | - ].filter(item => item.name.includes(query)) | ||
| 527 | - this.companyList = data | ||
| 528 | - this.isLoadingCompany = false | ||
| 529 | - }, 200) | ||
| 530 | - }, | ||
| 531 | - /** | ||
| 532 | - * 文件改变时,限制文件上传格式和大小 | ||
| 533 | - * 文件格式只能为docx/xlsx/xls/ppt/doc/pdf/png/jpeg/png/jpg | ||
| 534 | - * 大小不超过20M | ||
| 535 | - * */ | ||
| 536 | - fileChange(file, fileList) { | ||
| 537 | - let count = 0; | ||
| 538 | - for (let i = 0; i < fileList.length; i++) { | ||
| 539 | - // console.log(fileList.length) | ||
| 540 | - // console.log(this.fileEntityList[i].name+"111"+file.name) | ||
| 541 | - if (fileList[i].name == file.name) { | ||
| 542 | - count++; | ||
| 543 | - if (count == 2) { | ||
| 544 | - this.$message({ | ||
| 545 | - message: '已存在此文件!', | ||
| 546 | - type: 'warning' | ||
| 547 | - }); | ||
| 548 | - for (let j = fileList.length; j > 0; j--) { | ||
| 549 | - //如果存在此文件,去除新选择的重复文件 | ||
| 550 | - if (fileList[j - 1].name == file.name) { | ||
| 551 | - fileList.splice(j - 1, 1); | ||
| 552 | - i--; | ||
| 553 | - return false; | ||
| 554 | - } | ||
| 555 | - } | ||
| 556 | - } | ||
| 557 | - } | ||
| 558 | - } | ||
| 559 | - let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase(); | ||
| 560 | - //格式符合后判断大小 | ||
| 561 | - if ("docx,xlsx,xls,ppt,doc,pdf,png,jpeg,png,jpg".indexOf(fileType) != -1) { | ||
| 562 | - let max5M = file.size / 1024 / 1024 < 20; | ||
| 563 | - if (!max5M) { | ||
| 564 | - this.$message({ | ||
| 565 | - message: '上传文件大小不得超过20M!', | ||
| 566 | - type: 'warning' | ||
| 567 | - }); | ||
| 568 | - fileList = fileList.splice(fileList.length - 1, 1); | ||
| 569 | - } else { | ||
| 570 | - //符合条件后进行添加 | ||
| 571 | - this.fileEntityList = fileList | ||
| 572 | - } | ||
| 573 | - } else { | ||
| 574 | - this.$message({ | ||
| 575 | - message: '上传文件只能是 docx、xlsx、xls、ppt、doc、pdf、png、jpeg、png、jpg格式!', | ||
| 576 | - type: 'warning' | ||
| 577 | - }); | ||
| 578 | - } | ||
| 579 | - }, | ||
| 580 | - // 删除文件 | ||
| 581 | - handleDeleteFile(index) { | ||
| 582 | - this.fileEntityList.splice(index, 1); | ||
| 583 | - }, | ||
| 584 | - /** 文件下载 */ | ||
| 585 | - downloadFA(row) { | ||
| 586 | - let name = row.name; | ||
| 587 | - let url = row.url; | ||
| 588 | - const a = document.createElement('a') | ||
| 589 | - a.setAttribute('download', name) | ||
| 590 | - a.setAttribute('target', '_blank') | ||
| 591 | - a.setAttribute('href', process.env.VUE_APP_BASE_API + url); | ||
| 592 | - a.click() | ||
| 593 | - }, | ||
| 594 | - /** 生成违规描述 */ | ||
| 595 | - createDescribe(){ | ||
| 596 | - this.rules.companyName = [{ required: true, message: "必填", trigger: "blur" }] | ||
| 597 | - this.rules.projectName = [{ required: true, message: "必填", trigger: "blur" }] | ||
| 598 | - this.$refs["form"].validate(valid => { | ||
| 599 | - if (valid) { | ||
| 600 | - let formData = this.form; | ||
| 601 | - const now = new Date(); | ||
| 602 | - const year = now.getFullYear(); | ||
| 603 | - const month = now.getMonth() + 1 < 10 ? `0${now.getMonth() + 1}` : now.getMonth() + 1; | ||
| 604 | - const day = now.getDate() < 10 ? `0${now.getDate()}` : now.getDate(); | ||
| 605 | - const hour = now.getHours() < 10 ? `0${now.getHours()}` : now.getHours(); | ||
| 606 | - const minute = now.getMinutes() < 10 ? `0${now.getMinutes()}` : now.getMinutes(); | ||
| 607 | - const second = now.getSeconds() < 10 ? `0${now.getSeconds()}` : now.getSeconds(); | ||
| 608 | - const code = `${year}/${month}/${day} ${hour}:${minute}:${second}`; | ||
| 609 | - this.form.describe =code + formData.companyName + "在" + formData.projectName + "出现" + formData.violationType; | ||
| 610 | - this.rules.companyName = null; | ||
| 611 | - this.rules.projectName = null; | ||
| 612 | - } | ||
| 613 | - }); | ||
| 614 | - | ||
| 615 | - } | ||
| 616 | - } | ||
| 617 | -}; | ||
| 618 | -</script> | 193 | +<script src="../../../api/warningInfo.js"> |
trash-ui/src/views/office/leaveApplication/index.vue
| @@ -133,7 +133,7 @@ | @@ -133,7 +133,7 @@ | ||
| 133 | </el-table-column> | 133 | </el-table-column> |
| 134 | </el-table> | 134 | </el-table> |
| 135 | 135 | ||
| 136 | - <pagination | 136 | + <h5Page |
| 137 | v-show="total>0" | 137 | v-show="total>0" |
| 138 | :total="total" | 138 | :total="total" |
| 139 | :page.sync="queryParams.pageNum" | 139 | :page.sync="queryParams.pageNum" |
| @@ -228,7 +228,7 @@ | @@ -228,7 +228,7 @@ | ||
| 228 | </el-dialog> | 228 | </el-dialog> |
| 229 | 229 | ||
| 230 | <el-dialog :title="title" :visible.sync="openInfo" width="500px" append-to-body :close-on-click-modal="false"> | 230 | <el-dialog :title="title" :visible.sync="openInfo" width="500px" append-to-body :close-on-click-modal="false"> |
| 231 | - <leaveApplicationInfo :idInfo="idInfo" v-if="openInfo"/> | 231 | + <h5Info :idInfo="idInfo" v-if="openInfo"/> |
| 232 | <div slot="footer" class="dialog-footer"> | 232 | <div slot="footer" class="dialog-footer"> |
| 233 | <el-button @click="cancel">取 消</el-button> | 233 | <el-button @click="cancel">取 消</el-button> |
| 234 | </div> | 234 | </div> |
| @@ -236,316 +236,4 @@ | @@ -236,316 +236,4 @@ | ||
| 236 | </div> | 236 | </div> |
| 237 | </template> | 237 | </template> |
| 238 | 238 | ||
| 239 | -<script> | ||
| 240 | -import { | ||
| 241 | - listLeaveApplication, | ||
| 242 | - getLeaveApplication, | ||
| 243 | - delLeaveApplication, | ||
| 244 | - addLeaveApplication, | ||
| 245 | - updateLeaveApplication, | ||
| 246 | - exportLeaveApplication | ||
| 247 | -} from "@/api/office/leaveApplication"; | ||
| 248 | -import Editor from '@/components/ZcEditor'; | ||
| 249 | -import leaveApplicationInfo from './leaveApplicationInfo'; | ||
| 250 | -import {getDict} from "@/api/dict"; | ||
| 251 | - | ||
| 252 | -export default { | ||
| 253 | - name: "LeaveApplication", | ||
| 254 | - components: {Editor, leaveApplicationInfo}, | ||
| 255 | - data() { | ||
| 256 | - return { | ||
| 257 | - // 遮罩层 | ||
| 258 | - loading: true, | ||
| 259 | - // 选中数组 | ||
| 260 | - ids: [], | ||
| 261 | - // 非单个禁用 | ||
| 262 | - single: true, | ||
| 263 | - // 非多个禁用 | ||
| 264 | - multiple: true, | ||
| 265 | - // 显示搜索条件 | ||
| 266 | - showSearch: true, | ||
| 267 | - // 总条数 | ||
| 268 | - total: 0, | ||
| 269 | - // 请假申请表格数据 | ||
| 270 | - leaveApplicationList: [], | ||
| 271 | - // 弹出层标题 | ||
| 272 | - title: "", | ||
| 273 | - // 是否显示弹出层 | ||
| 274 | - open: false, | ||
| 275 | - // 查询参数 | ||
| 276 | - queryParams: { | ||
| 277 | - pageNum: 1, | ||
| 278 | - pageSize: 10, | ||
| 279 | - applicant: null, | ||
| 280 | - deptName: null, | ||
| 281 | - positionId: null, | ||
| 282 | - birthdate: null, | ||
| 283 | - phone: null, | ||
| 284 | - type: null, | ||
| 285 | - status: null, | ||
| 286 | - }, | ||
| 287 | - // 表单参数 | ||
| 288 | - form: {}, | ||
| 289 | - // 表单校验 | ||
| 290 | - rules: { | ||
| 291 | - type: [ | ||
| 292 | - {required: true, message: '必填', trigger: 'change'}, | ||
| 293 | - ], | ||
| 294 | - beginDate: [ | ||
| 295 | - {required: true, message: '必填', trigger: 'change'}, | ||
| 296 | - ], | ||
| 297 | - endDate: [ | ||
| 298 | - {required: true, message: '必填', trigger: 'change'}, | ||
| 299 | - ], | ||
| 300 | - phone: [ | ||
| 301 | - {required: true, message: '必填', trigger: 'change'}, | ||
| 302 | - { | ||
| 303 | - pattern: /^1(3|4|5|7|8|9)\d{9}$/, | ||
| 304 | - message: '手机号格式错误', | ||
| 305 | - trigger: 'change' | ||
| 306 | - } | ||
| 307 | - ], | ||
| 308 | - numberDays: [ | ||
| 309 | - {required: true, message: '必填', trigger: 'change'}, | ||
| 310 | - { | ||
| 311 | - pattern: /^(0|[1-9]\d*)(\.5)?$/, | ||
| 312 | - message: '只能为整数或者0.5', | ||
| 313 | - trigger: 'change' | ||
| 314 | - }, | ||
| 315 | - { | ||
| 316 | - pattern: /^(?!0+(\.0+)?$)\d+(\.\d+)?$/, | ||
| 317 | - message: '不能为0', | ||
| 318 | - trigger: 'change' | ||
| 319 | - } | ||
| 320 | - ] | ||
| 321 | - }, | ||
| 322 | - openInfo: false, | ||
| 323 | - idInfo: null, | ||
| 324 | - fileEntityList:[], | ||
| 325 | - depts:[] | ||
| 326 | - }; | ||
| 327 | - }, | ||
| 328 | - created() { | ||
| 329 | - let dep = {type:"CSUserDepartmentType"}; | ||
| 330 | - getDict(dep).then(res=>{ | ||
| 331 | - this.depts = res.result; | ||
| 332 | - }); | ||
| 333 | - this.getList(); | ||
| 334 | - }, | ||
| 335 | - methods: { | ||
| 336 | - /** 查询请假申请列表 */ | ||
| 337 | - getList() { | ||
| 338 | - this.loading = true; | ||
| 339 | - listLeaveApplication(this.queryParams).then(response => { | ||
| 340 | - this.leaveApplicationList = response.rows; | ||
| 341 | - this.total = response.total; | ||
| 342 | - this.loading = false; | ||
| 343 | - }); | ||
| 344 | - }, | ||
| 345 | - // 取消按钮 | ||
| 346 | - cancel() { | ||
| 347 | - this.open = false; | ||
| 348 | - this.openInfo = false; | ||
| 349 | - this.reset(); | ||
| 350 | - }, | ||
| 351 | - // 表单重置 | ||
| 352 | - reset() { | ||
| 353 | - this.fileEntityList = []; | ||
| 354 | - this.form = { | ||
| 355 | - id: null, | ||
| 356 | - applicant: null, | ||
| 357 | - deptName: null, | ||
| 358 | - positionId: null, | ||
| 359 | - workDate: null, | ||
| 360 | - birthdate: null, | ||
| 361 | - phone: null, | ||
| 362 | - type: null, | ||
| 363 | - beginDate: null, | ||
| 364 | - endDate: null, | ||
| 365 | - numberDays: null, | ||
| 366 | - content: null, | ||
| 367 | - status: 0, | ||
| 368 | - createTime: null, | ||
| 369 | - createBy: null, | ||
| 370 | - updateTime: null, | ||
| 371 | - updateBy: null | ||
| 372 | - }; | ||
| 373 | - this.resetForm("form"); | ||
| 374 | - }, | ||
| 375 | - /** 搜索按钮操作 */ | ||
| 376 | - handleQuery() { | ||
| 377 | - this.queryParams.pageNum = 1; | ||
| 378 | - this.getList(); | ||
| 379 | - }, | ||
| 380 | - /** 重置按钮操作 */ | ||
| 381 | - resetQuery() { | ||
| 382 | - this.resetForm("queryForm"); | ||
| 383 | - this.handleQuery(); | ||
| 384 | - }, | ||
| 385 | - // 多选框选中数据 | ||
| 386 | - handleSelectionChange(selection) { | ||
| 387 | - this.ids = selection.map(item => item.id) | ||
| 388 | - this.single = selection.length !== 1 | ||
| 389 | - this.multiple = !selection.length | ||
| 390 | - }, | ||
| 391 | - /** 查看按钮操作 */ | ||
| 392 | - handleInfo(row) { | ||
| 393 | - this.reset(); | ||
| 394 | - this.idInfo = row.id+""; | ||
| 395 | - this.title = "请假申请详情"; | ||
| 396 | - this.openInfo = true; | ||
| 397 | - }, | ||
| 398 | - /** 新增按钮操作 */ | ||
| 399 | - handleAdd() { | ||
| 400 | - this.reset(); | ||
| 401 | - this.open = true; | ||
| 402 | - this.title = "添加请假申请"; | ||
| 403 | - }, | ||
| 404 | - /** 修改按钮操作 */ | ||
| 405 | - handleUpdate(row) { | ||
| 406 | - this.reset(); | ||
| 407 | - const id = row.id || this.ids | ||
| 408 | - getLeaveApplication(id).then(response => { | ||
| 409 | - this.form = response.data.leaveApplication; | ||
| 410 | - let files = JSON.stringify(response.data.uploadFiles); | ||
| 411 | - this.fileEntityList = JSON.parse(files.replaceAll("filePath", "url").replaceAll("fileName", "name")) | ||
| 412 | - this.open = true; | ||
| 413 | - this.title = "修改请假申请"; | ||
| 414 | - }); | ||
| 415 | - }, | ||
| 416 | - /** 提交按钮 */ | ||
| 417 | - submitForm() { | ||
| 418 | - this.$refs["form"].validate(valid => { | ||
| 419 | - if (valid) { | ||
| 420 | - let formData = new FormData(); | ||
| 421 | - let form = this.form; | ||
| 422 | - //去掉params属性 | ||
| 423 | - delete form.params; | ||
| 424 | - formData.append('fileList', null); | ||
| 425 | - //将新增的文件放入formData | ||
| 426 | - this.fileEntityList.forEach(item => { | ||
| 427 | - if(item.id==null){ | ||
| 428 | - formData.append('fileList', item.raw) | ||
| 429 | - } | ||
| 430 | - }) | ||
| 431 | - if (this.form.id != null) { | ||
| 432 | - formData.append("leaveApplication", JSON.stringify(form)); | ||
| 433 | - formData.append("uploadFilesList", null); | ||
| 434 | - this.fileEntityList.forEach(item => { | ||
| 435 | - delete item.params; | ||
| 436 | - if(item != "null" && item != null){ | ||
| 437 | - formData.append('uploadFilesList', JSON.stringify(item).replaceAll("url", "filePath").replaceAll("name", "fileName")); | ||
| 438 | - } | ||
| 439 | - }) | ||
| 440 | - updateLeaveApplication(formData).then(response => { | ||
| 441 | - this.msgSuccess("修改成功"); | ||
| 442 | - this.open = false; | ||
| 443 | - this.getList(); | ||
| 444 | - }); | ||
| 445 | - } else { | ||
| 446 | - for (let key in form) { | ||
| 447 | - formData.append(key, form[key] == null ? "" : form[key]) | ||
| 448 | - } | ||
| 449 | - addLeaveApplication(formData).then(response => { | ||
| 450 | - this.msgSuccess("新增成功"); | ||
| 451 | - this.open = false; | ||
| 452 | - this.getList(); | ||
| 453 | - }); | ||
| 454 | - } | ||
| 455 | - } | ||
| 456 | - }); | ||
| 457 | - }, | ||
| 458 | - /** 删除按钮操作 */ | ||
| 459 | - handleDelete(row) { | ||
| 460 | - const ids = row.id || this.ids; | ||
| 461 | - this.$confirm('是否确认删除请假申请编号为"' + ids + '"的数据项?', "警告", { | ||
| 462 | - confirmButtonText: "确定", | ||
| 463 | - cancelButtonText: "取消", | ||
| 464 | - type: "warning" | ||
| 465 | - }).then(function () { | ||
| 466 | - return delLeaveApplication(ids); | ||
| 467 | - }).then(() => { | ||
| 468 | - this.getList(); | ||
| 469 | - this.msgSuccess("删除成功"); | ||
| 470 | - }) | ||
| 471 | - }, | ||
| 472 | - /** 导出按钮操作 */ | ||
| 473 | - handleExport() { | ||
| 474 | - const queryParams = this.queryParams; | ||
| 475 | - this.$confirm('是否确认导出所有请假申请数据项?', "警告", { | ||
| 476 | - confirmButtonText: "确定", | ||
| 477 | - cancelButtonText: "取消", | ||
| 478 | - type: "warning" | ||
| 479 | - }).then(function () { | ||
| 480 | - return exportLeaveApplication(queryParams); | ||
| 481 | - }).then(response => { | ||
| 482 | - this.download(response.message); | ||
| 483 | - }) | ||
| 484 | - }, | ||
| 485 | - /** | ||
| 486 | - * 文件改变时,限制文件上传格式和大小 | ||
| 487 | - * 文件格式只能为docx/xlsx/xls/ppt/doc/pdf/png/jpeg/png/jpg | ||
| 488 | - * 大小不超过5M | ||
| 489 | - * */ | ||
| 490 | - fileChange(file, fileList) { | ||
| 491 | - let count = 0; | ||
| 492 | - for (let i = 0; i < fileList.length; i++) { | ||
| 493 | - // console.log(fileList.length) | ||
| 494 | - // console.log(this.fileEntityList[i].name+"111"+file.name) | ||
| 495 | - if (fileList[i].name == file.name) { | ||
| 496 | - count++; | ||
| 497 | - if (count == 2) { | ||
| 498 | - this.$message({ | ||
| 499 | - message: '已存在此文件!', | ||
| 500 | - type: 'warning' | ||
| 501 | - }); | ||
| 502 | - for (let j = fileList.length; j > 0; j--) { | ||
| 503 | - //如果存在此文件,去除新选择的重复文件 | ||
| 504 | - if (fileList[j - 1].name == file.name) { | ||
| 505 | - fileList.splice(j - 1, 1); | ||
| 506 | - i--; | ||
| 507 | - return false; | ||
| 508 | - } | ||
| 509 | - } | ||
| 510 | - } | ||
| 511 | - } | ||
| 512 | - } | ||
| 513 | - let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase(); | ||
| 514 | - //格式符合后判断大小 | ||
| 515 | - if ("docx,xlsx,xls,ppt,doc,pdf,png,jpeg,png,jpg".indexOf(fileType) != -1) { | ||
| 516 | - let max5M = file.size / 1024 / 1024 < 5; | ||
| 517 | - if (!max5M) { | ||
| 518 | - this.$message({ | ||
| 519 | - message: '上传文件大小不得超过5M!', | ||
| 520 | - type: 'warning' | ||
| 521 | - }); | ||
| 522 | - fileList = fileList.splice(fileList.length - 1, 1); | ||
| 523 | - } else { | ||
| 524 | - //符合条件后进行添加 | ||
| 525 | - this.fileEntityList = fileList | ||
| 526 | - } | ||
| 527 | - } else { | ||
| 528 | - this.$message({ | ||
| 529 | - message: '上传文件只能是 docx、xlsx、xls、ppt、doc、pdf、png、jpeg、png、jpg格式!', | ||
| 530 | - type: 'warning' | ||
| 531 | - }); | ||
| 532 | - fileList = fileList.splice(fileList.length - 1, 1); | ||
| 533 | - } | ||
| 534 | - }, | ||
| 535 | - // 删除文件 | ||
| 536 | - handleDeleteFile(index) { | ||
| 537 | - this.fileEntityList.splice(index, 1); | ||
| 538 | - }, | ||
| 539 | - /** 文件下载 */ | ||
| 540 | - downloadFA(row) { | ||
| 541 | - let name = row.name; | ||
| 542 | - let url = row.url; | ||
| 543 | - const a = document.createElement('a') | ||
| 544 | - a.setAttribute('download', name) | ||
| 545 | - a.setAttribute('target', '_blank') | ||
| 546 | - a.setAttribute('href', process.env.VUE_APP_BASE_API + url); | ||
| 547 | - a.click() | ||
| 548 | - }, | ||
| 549 | - } | ||
| 550 | -}; | ||
| 551 | -</script> | 239 | +<script src="../../../api/leave" > |
trash-workFlow/src/main/java/com/trash/business/controller/SupervisionThreestepController.java
| @@ -68,7 +68,10 @@ public class SupervisionThreestepController extends BaseController | @@ -68,7 +68,10 @@ public class SupervisionThreestepController extends BaseController | ||
| 68 | List<SupervisionThreestep> list = supervisionThreestepService.selectSupervisionThreestepList(supervisionThreestep); | 68 | List<SupervisionThreestep> list = supervisionThreestepService.selectSupervisionThreestepList(supervisionThreestep); |
| 69 | return getDataTable(list); | 69 | return getDataTable(list); |
| 70 | } | 70 | } |
| 71 | - | 71 | + |
| 72 | + | ||
| 73 | + String[] outside = {"长沙县", "望城区", "浏阳市", "宁乡市", "株洲市", "湘潭市", "汩罗市", "湘阴县"}; | ||
| 74 | + | ||
| 72 | /** | 75 | /** |
| 73 | * 查询三查机制列表 | 76 | * 查询三查机制列表 |
| 74 | */ | 77 | */ |
| @@ -90,6 +93,59 @@ public class SupervisionThreestepController extends BaseController | @@ -90,6 +93,59 @@ public class SupervisionThreestepController extends BaseController | ||
| 90 | 93 | ||
| 91 | List<Map<String,String>> list = supervisionThreestepService.selectDayWorkList(supervisionThreestep); | 94 | List<Map<String,String>> list = supervisionThreestepService.selectDayWorkList(supervisionThreestep); |
| 92 | 95 | ||
| 96 | + int count = 0; | ||
| 97 | + int count1 = 0; | ||
| 98 | + String place = "长沙市"; | ||
| 99 | + String place1 = "长沙市"; | ||
| 100 | + String string = "今日"; | ||
| 101 | + | ||
| 102 | + if(supervisionThreestep.getSubReason()!=null){ | ||
| 103 | + | ||
| 104 | + place1 = supervisionThreestep.getSubReason(); | ||
| 105 | + } | ||
| 106 | + | ||
| 107 | + if(supervisionThreestep.getHis().equals("1")){ | ||
| 108 | + string = ""; | ||
| 109 | + } | ||
| 110 | + | ||
| 111 | + JSONArray areas = RemoteServerUtils.getAreas(); | ||
| 112 | + | ||
| 113 | + for(Map<String, String> m:list){ | ||
| 114 | + for(Object object:areas){ | ||
| 115 | + JSONObject area = (JSONObject)object; | ||
| 116 | + | ||
| 117 | + if(supervisionThreestep.getPlace() != null){ | ||
| 118 | + if(supervisionThreestep.getPlace().equals(area.get("code").toString())){ | ||
| 119 | + place = area.get("name").toString(); | ||
| 120 | + } | ||
| 121 | + } | ||
| 122 | + | ||
| 123 | + if( area.get("code").toString().equals( m.get("place"))){ | ||
| 124 | + m.put("place", area.get("name").toString()); | ||
| 125 | + } | ||
| 126 | + if( area.get("code").toString().equals( m.get("eplace"))){ | ||
| 127 | + m.put("eplace", area.get("name").toString()); | ||
| 128 | + } | ||
| 129 | + } | ||
| 130 | + | ||
| 131 | + for(String out:outside){ | ||
| 132 | + if(out.equals(m.get("place"))){ | ||
| 133 | + if(m.get("status").equals("开工")){ | ||
| 134 | + m.put("estatus", "开工"); | ||
| 135 | + m.put("eselfCheckTime", m.get("selfCheckTime")); | ||
| 136 | + } | ||
| 137 | + | ||
| 138 | + } | ||
| 139 | + } | ||
| 140 | + | ||
| 141 | + if(m.get("status").equals("开工")){ | ||
| 142 | + count += 1; | ||
| 143 | + } | ||
| 144 | + if(m.get("estatus").equals("开工")){ | ||
| 145 | + count1 += 1; | ||
| 146 | + } | ||
| 147 | + } | ||
| 148 | + | ||
| 93 | TableDataInfo info = getDataTable(list); | 149 | TableDataInfo info = getDataTable(list); |
| 94 | 150 | ||
| 95 | if(list.size() > (pageNum)*pageSize){ | 151 | if(list.size() > (pageNum)*pageSize){ |
| @@ -100,6 +156,7 @@ public class SupervisionThreestepController extends BaseController | @@ -100,6 +156,7 @@ public class SupervisionThreestepController extends BaseController | ||
| 100 | 156 | ||
| 101 | info.setRows(list); | 157 | info.setRows(list); |
| 102 | 158 | ||
| 159 | + info.setMsg(string + place+"工地开工数量" + count + " " + place1+"消纳场开工数量" + count1); | ||
| 103 | 160 | ||
| 104 | return info; | 161 | return info; |
| 105 | } | 162 | } |
trash-workFlow/src/main/java/com/trash/business/controller/TruckActivateController.java
| @@ -69,9 +69,13 @@ public class TruckActivateController extends BaseController | @@ -69,9 +69,13 @@ public class TruckActivateController extends BaseController | ||
| 69 | t.setIsAct("已激活"); | 69 | t.setIsAct("已激活"); |
| 70 | } | 70 | } |
| 71 | } | 71 | } |
| 72 | + String title ="车辆激活"; | ||
| 73 | + if(truckActivate.getStatus() == 1){ | ||
| 74 | + title = "车辆历史激活"; | ||
| 75 | + } | ||
| 72 | 76 | ||
| 73 | ExcelUtil<TruckActivate> util = new ExcelUtil<TruckActivate>(TruckActivate.class); | 77 | ExcelUtil<TruckActivate> util = new ExcelUtil<TruckActivate>(TruckActivate.class); |
| 74 | - return util.exportExcel(list, "车辆激活"); | 78 | + return util.exportExcel(list, title); |
| 75 | } | 79 | } |
| 76 | 80 | ||
| 77 | /** | 81 | /** |
trash-workFlow/src/main/java/com/trash/business/service/impl/SupervisionThreestepServiceImpl.java
| @@ -261,7 +261,8 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer | @@ -261,7 +261,8 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer | ||
| 261 | continue; | 261 | continue; |
| 262 | } | 262 | } |
| 263 | 263 | ||
| 264 | - if(s.getEarthsitesId().equals(e.getObjectId()) && yearFomat.format(s.getCreateTime()).equals(yearFomat.format(e.getCreateTime()))){ | 264 | + if(s.getEarthsitesId().equals(e.getObjectId()) && yearFomat.format(s.getCreateTime()).equals(yearFomat.format(e.getCreateTime())) |
| 265 | + && e.getEarthsitesId().equals(s.getObjectId())){ | ||
| 265 | 266 | ||
| 266 | if(s.getStatus() != 1 && e.getStatus() != 1){ | 267 | if(s.getStatus() != 1 && e.getStatus() != 1){ |
| 267 | continue; | 268 | continue; |
| @@ -305,8 +306,8 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer | @@ -305,8 +306,8 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer | ||
| 305 | 306 | ||
| 306 | map.put("eid", s.getEarthsitesId()); | 307 | map.put("eid", s.getEarthsitesId()); |
| 307 | map.put("ename", s.getEarthsitesName()); | 308 | map.put("ename", s.getEarthsitesName()); |
| 308 | - map.put("estatus", "消纳场未开工"); | ||
| 309 | - map.put("descript", "未开工"); | 309 | + map.put("estatus", "未开工"); |
| 310 | + map.put("descript", "消纳场未开工"); | ||
| 310 | map.put("etype", ""); | 311 | map.put("etype", ""); |
| 311 | 312 | ||
| 312 | } | 313 | } |
trash-workFlow/src/main/java/com/trash/business/service/impl/TruckActivateServiceImpl.java
| @@ -89,7 +89,6 @@ public class TruckActivateServiceImpl implements ITruckActivateService | @@ -89,7 +89,6 @@ public class TruckActivateServiceImpl implements ITruckActivateService | ||
| 89 | 89 | ||
| 90 | 90 | ||
| 91 | truckActivate.setCreateTime(DateUtils.getNowDate()); | 91 | truckActivate.setCreateTime(DateUtils.getNowDate()); |
| 92 | - truckActivate.setActivateTime(DateUtils.getNowDate()); | ||
| 93 | 92 | ||
| 94 | 93 | ||
| 95 | TruckActivate oldDate = truckActivateMapper.selectTodayTruckByObjId(truckActivate.getObjectId()); | 94 | TruckActivate oldDate = truckActivateMapper.selectTodayTruckByObjId(truckActivate.getObjectId()); |
trash-workFlow/src/main/java/com/trash/caseOffline/controller/CaseOfflineController.java
| @@ -73,7 +73,7 @@ public class CaseOfflineController extends BaseController | @@ -73,7 +73,7 @@ public class CaseOfflineController extends BaseController | ||
| 73 | } | 73 | } |
| 74 | 74 | ||
| 75 | ExcelUtil<CaseOffline> util = new ExcelUtil<CaseOffline>(CaseOffline.class); | 75 | ExcelUtil<CaseOffline> util = new ExcelUtil<CaseOffline>(CaseOffline.class); |
| 76 | - return util.exportExcel(list, "caseOffline"); | 76 | + return util.exportExcel(list, "线下交办案卷"); |
| 77 | } | 77 | } |
| 78 | 78 | ||
| 79 | /** | 79 | /** |
trash-workFlow/src/main/java/com/trash/caseOffline/domain/CaseOffline.java
| @@ -21,6 +21,10 @@ public class CaseOffline extends BaseEntity | @@ -21,6 +21,10 @@ public class CaseOffline extends BaseEntity | ||
| 21 | @Excel(name = "序号") | 21 | @Excel(name = "序号") |
| 22 | private Long id; | 22 | private Long id; |
| 23 | 23 | ||
| 24 | + /** 案卷编号 */ | ||
| 25 | + @Excel(name = "案卷编号") | ||
| 26 | + private String number; | ||
| 27 | + | ||
| 24 | /** 案卷类型 */ | 28 | /** 案卷类型 */ |
| 25 | @Excel(name = "案卷类型",readConverterExp = "0=渣土处置工地(含消纳场)的渣土运输车辆出场车身不洁," | 29 | @Excel(name = "案卷类型",readConverterExp = "0=渣土处置工地(含消纳场)的渣土运输车辆出场车身不洁," |
| 26 | + "车轮带泥,1=未洗车出场或者出场清洁不彻底,2=渣土运输车辆货箱顶盖未按规定关闭到位或未按规定和标准装载渣土出场," | 30 | + "车轮带泥,1=未洗车出场或者出场清洁不彻底,2=渣土运输车辆货箱顶盖未按规定关闭到位或未按规定和标准装载渣土出场," |
| @@ -46,10 +50,6 @@ public class CaseOffline extends BaseEntity | @@ -46,10 +50,6 @@ public class CaseOffline extends BaseEntity | ||
| 46 | @Excel(name = "所属区域") | 50 | @Excel(name = "所属区域") |
| 47 | private String place; | 51 | private String place; |
| 48 | 52 | ||
| 49 | - /** 案卷编号 */ | ||
| 50 | - @Excel(name = "案卷编号") | ||
| 51 | - private String number; | ||
| 52 | - | ||
| 53 | /** 类型 */ | 53 | /** 类型 */ |
| 54 | private Long siteType; | 54 | private Long siteType; |
| 55 | 55 | ||
| @@ -80,10 +80,22 @@ public class CaseOffline extends BaseEntity | @@ -80,10 +80,22 @@ public class CaseOffline extends BaseEntity | ||
| 80 | 80 | ||
| 81 | /** 审批意见 */ | 81 | /** 审批意见 */ |
| 82 | private String attach; | 82 | private String attach; |
| 83 | + | ||
| 84 | + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | ||
| 85 | + @Excel(name = "日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") | ||
| 86 | + private Date createTime; | ||
| 83 | 87 | ||
| 84 | 88 | ||
| 85 | 89 | ||
| 86 | - public Date getAdvice2Time() { | 90 | + public Date getCreateTime() { |
| 91 | + return createTime; | ||
| 92 | + } | ||
| 93 | + | ||
| 94 | + public void setCreateTime(Date createTime) { | ||
| 95 | + this.createTime = createTime; | ||
| 96 | + } | ||
| 97 | + | ||
| 98 | + public Date getAdvice2Time() { | ||
| 87 | return advice2Time; | 99 | return advice2Time; |
| 88 | } | 100 | } |
| 89 | 101 |
trash-workFlow/src/main/java/com/trash/casefile/domain/ViolationCaseFile.java
| @@ -60,7 +60,7 @@ public class ViolationCaseFile extends BaseEntity | @@ -60,7 +60,7 @@ public class ViolationCaseFile extends BaseEntity | ||
| 60 | private Date createTime; | 60 | private Date createTime; |
| 61 | 61 | ||
| 62 | /** 审批状态 */ | 62 | /** 审批状态 */ |
| 63 | - @Excel(name = "审批状态",readConverterExp = "0=审批中,1=审批通过,2=被驳回") | 63 | +// @Excel(name = "审批状态",readConverterExp = "0=审批中,1=审批通过,2=被驳回") |
| 64 | private Integer status; | 64 | private Integer status; |
| 65 | 65 | ||
| 66 | /** 接收人 */ | 66 | /** 接收人 */ |
| @@ -73,6 +73,7 @@ public class ViolationCaseFile extends BaseEntity | @@ -73,6 +73,7 @@ public class ViolationCaseFile extends BaseEntity | ||
| 73 | private String readBy; | 73 | private String readBy; |
| 74 | 74 | ||
| 75 | /** 阅览时间 */ | 75 | /** 阅览时间 */ |
| 76 | + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | ||
| 76 | private Date readTime; | 77 | private Date readTime; |
| 77 | 78 | ||
| 78 | private String abbreviation; | 79 | private String abbreviation; |