Commit 01d717cc62276435f978465dd17dadf5263595cd
1 parent
d2942a2e
修复bug
Showing
5 changed files
with
107 additions
and
113 deletions
trash-ui/src/api/vio_casefile.js
| 1 | - | |
| 2 | -import { listViolationCaseFile, getViolationCaseFile, | |
| 3 | - delViolationCaseFile, addViolationCaseFile, | |
| 4 | - updateViolationCaseFile, exportViolationCaseFile } from "@/api/casefile/violationCaseFile"; | |
| 1 | +import { | |
| 2 | + addViolationCaseFile, | |
| 3 | + delViolationCaseFile, | |
| 4 | + exportViolationCaseFile, | |
| 5 | + getViolationCaseFile, | |
| 6 | + listViolationCaseFile, | |
| 7 | + updateViolationCaseFile | |
| 8 | +} from "@/api/casefile/violationCaseFile"; | |
| 5 | 9 | import violationCaseFileInfo from "@/views/casefile/violationCaseFile/violationCaseFileInfo"; |
| 6 | 10 | |
| 7 | 11 | import h5Info from "@/views/h5/task/violationCaseFileInfo"; |
| 8 | 12 | import h5Page from "@/views/h5/Pagination"; |
| 9 | 13 | |
| 10 | - import { | |
| 11 | - earthsitesList, | |
| 12 | - constructionsitesList, | |
| 13 | - getDict, | |
| 14 | - getArea, | |
| 15 | - companyList, | |
| 16 | - truckList, | |
| 17 | - } from "@/api/dict"; | |
| 14 | +import {companyList, constructionsitesList, earthsitesList, getArea,} from "@/api/dict"; | |
| 18 | 15 | |
| 19 | 16 | |
| 20 | 17 | export default { |
| 21 | 18 | name: "ViolationCaseFile", |
| 22 | - components: { violationCaseFileInfo, | |
| 23 | - h5Page, | |
| 24 | - h5Info}, | |
| 19 | + components: { | |
| 20 | + violationCaseFileInfo, | |
| 21 | + h5Page, | |
| 22 | + h5Info | |
| 23 | + }, | |
| 25 | 24 | data() { |
| 26 | 25 | return { |
| 27 | 26 | // 遮罩层 |
| ... | ... | @@ -62,72 +61,68 @@ export default { |
| 62 | 61 | readTime: null |
| 63 | 62 | }, |
| 64 | 63 | // 表单参数 |
| 65 | - form: { | |
| 66 | - | |
| 67 | - }, | |
| 68 | - place:null, | |
| 64 | + form: {}, | |
| 65 | + place: null, | |
| 69 | 66 | // 表单校验 |
| 70 | 67 | rules: { |
| 71 | - number :[ | |
| 72 | - { required: true, message: "必填", trigger: "blur" } | |
| 68 | + number: [ | |
| 69 | + {required: true, message: "必填", trigger: "blur"} | |
| 73 | 70 | ], |
| 74 | - violationObjectType :[ | |
| 75 | - { required: true, message: "必填", trigger: "blur" } | |
| 71 | + violationObjectType: [ | |
| 72 | + {required: true, message: "必填", trigger: "blur"} | |
| 76 | 73 | ], |
| 77 | - owningRegion :[ | |
| 78 | - { required: true, message: "必填", trigger: "blur" } | |
| 74 | + owningRegion: [ | |
| 75 | + {required: true, message: "必填", trigger: "blur"} | |
| 79 | 76 | ], |
| 80 | - violationType :[ | |
| 81 | - { required: true, message: "必填", trigger: "blur" } | |
| 77 | + violationType: [ | |
| 78 | + {required: true, message: "必填", trigger: "blur"} | |
| 82 | 79 | ], |
| 83 | 80 | }, |
| 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:23,name:"闯禁行驶"}, | |
| 107 | - {code:24,name:"失信车辆作业"}, | |
| 108 | - {code:25,name:"其他1"}, | |
| 109 | - {code:26,name:"其他2"}, | |
| 110 | - {code:27,name:"其他3"}, | |
| 111 | - {code:28,name:"其他4"}, | |
| 112 | - {code:29,name:"其他5"}], | |
| 81 | + caseType: [{code: 0, name: "进入非专用车辆"}, | |
| 82 | + {code: 1, name: "三无车辆运输"}, | |
| 83 | + {code: 3, name: "黄土覆盖情况"}, | |
| 84 | + {code: 4, name: "出入口路面污染"}, | |
| 85 | + {code: 5, name: "出入口道路硬化"}, | |
| 86 | + {code: 6, name: "车辆冲洗是否到位"}, | |
| 87 | + {code: 7, name: "雾炮机是否正常开启"}, | |
| 88 | + {code: 8, name: "使用费专用车运输"}, | |
| 89 | + {code: 9, name: "监控点位未对准"}, | |
| 90 | + {code: 10, name: "未报开工作业"}, | |
| 91 | + {code: 11, name: "视频设备离线超时报警"}, | |
| 92 | + {code: 12, name: "三无车辆进入工地"}, | |
| 93 | + {code: 13, name: "未按时间作业"}, | |
| 94 | + {code: 14, name: "未报开工作业"}, | |
| 95 | + {code: 15, name: "视频设备离线超时报警"}, | |
| 96 | + {code: 16, name: "三无车辆进入处理场所"}, | |
| 97 | + {code: 17, name: "未到指定的处理场所作业"}, | |
| 98 | + {code: 18, name: "离线运输报警(工)"}, | |
| 99 | + {code: 19, name: "离线运输报警(消)"}, | |
| 100 | + {code: 20, name: "未激活车辆作业"}, | |
| 101 | + {code: 21, name: "未核准作业车辆作业"}, | |
| 102 | + {code: 22, name: "未按线路行驶"}, | |
| 103 | + {code: 23, name: "闯禁行驶"}, | |
| 104 | + {code: 24, name: "失信车辆作业"}, | |
| 105 | + {code: 25, name: "其他1"}, | |
| 106 | + {code: 26, name: "其他2"}, | |
| 107 | + {code: 27, name: "其他3"}, | |
| 108 | + {code: 28, name: "其他4"}, | |
| 109 | + {code: 29, name: "其他5"}], | |
| 113 | 110 | |
| 114 | - projectNameList:[ | |
| 115 | - ], | |
| 111 | + projectNameList: [], | |
| 116 | 112 | isLoading: false, |
| 117 | - fileEntityList:[], | |
| 118 | - companyList:[ | |
| 119 | - ], | |
| 113 | + fileEntityList: [], | |
| 114 | + companyList: [], | |
| 120 | 115 | remoteQueryData: { |
| 121 | 116 | "page": 1, |
| 122 | 117 | "size": 9999 |
| 123 | 118 | }, |
| 124 | - areas:[], | |
| 125 | - data:{}, | |
| 119 | + areas: [], | |
| 120 | + data: {}, | |
| 126 | 121 | isLoadingCompany: false, |
| 127 | - idInfo:null, | |
| 128 | - openInfo:false, | |
| 122 | + idInfo: null, | |
| 123 | + openInfo: false, | |
| 129 | 124 | slide1: [], |
| 130 | - videoSrc:[] | |
| 125 | + videoSrc: [] | |
| 131 | 126 | }; |
| 132 | 127 | }, |
| 133 | 128 | watch: { |
| ... | ... | @@ -143,7 +138,7 @@ export default { |
| 143 | 138 | this.slide1.push(process.env.VUE_APP_BASE_API + item.url); |
| 144 | 139 | } |
| 145 | 140 | } |
| 146 | - if(item.name.indexOf(".mp4") > -1 || item.name.indexOf(".avi") > -1){ | |
| 141 | + if (item.name.indexOf(".mp4") > -1 || item.name.indexOf(".avi") > -1) { | |
| 147 | 142 | if (item.raw != null) { |
| 148 | 143 | this.videoSrc.push(URL.createObjectURL(item.raw)); |
| 149 | 144 | } else { |
| ... | ... | @@ -156,7 +151,7 @@ export default { |
| 156 | 151 | } |
| 157 | 152 | }, |
| 158 | 153 | created() { |
| 159 | - getArea().then(res=>{ | |
| 154 | + getArea().then(res => { | |
| 160 | 155 | |
| 161 | 156 | this.areas = res.result; |
| 162 | 157 | }); |
| ... | ... | @@ -165,23 +160,22 @@ export default { |
| 165 | 160 | constructionsitesList(this.remoteQueryData).then(res => { |
| 166 | 161 | this.projectNameList = res.result.list; |
| 167 | 162 | earthsitesList(this.remoteQueryData).then(res => { |
| 168 | - for(var i in res.result.list){ | |
| 169 | - this.projectNameList.push(res.result.list[i]); | |
| 170 | - } | |
| 163 | + for (var i in res.result.list) { | |
| 164 | + this.projectNameList.push(res.result.list[i]); | |
| 165 | + } | |
| 171 | 166 | }); |
| 172 | 167 | }); |
| 173 | 168 | |
| 174 | 169 | |
| 175 | 170 | companyList(this.remoteQueryData).then(res => { |
| 176 | - this.companyList = res.result.list; | |
| 171 | + this.companyList = res.result.list; | |
| 177 | 172 | }); |
| 178 | 173 | |
| 179 | 174 | |
| 180 | - | |
| 181 | 175 | this.getList(); |
| 182 | 176 | }, |
| 183 | 177 | methods: { |
| 184 | - selectArea(item){ | |
| 178 | + selectArea(item) { | |
| 185 | 179 | |
| 186 | 180 | this.form.owningRegion = item.name; |
| 187 | 181 | this.form.projectName = null; |
| ... | ... | @@ -241,10 +235,10 @@ export default { |
| 241 | 235 | // 多选框选中数据 |
| 242 | 236 | handleSelectionChange(selection) { |
| 243 | 237 | this.ids = selection.map(item => item.id) |
| 244 | - this.single = selection.length!==1 | |
| 238 | + this.single = selection.length !== 1 | |
| 245 | 239 | this.multiple = !selection.length |
| 246 | 240 | }, |
| 247 | - handleInfo(row){ | |
| 241 | + handleInfo(row) { | |
| 248 | 242 | this.idInfo = row.id + ""; |
| 249 | 243 | this.openInfo = true; |
| 250 | 244 | this.title = "平台违规案卷详情"; |
| ... | ... | @@ -275,7 +269,7 @@ export default { |
| 275 | 269 | this.$refs["form"].validate(valid => { |
| 276 | 270 | if (valid) { |
| 277 | 271 | |
| 278 | - if(this.form.sendObject == "运输企业" && this.form.companyName == null){ | |
| 272 | + if (this.form.sendObject == "运输企业" && this.form.companyName == null) { | |
| 279 | 273 | |
| 280 | 274 | this.$message("请选择相关企业"); |
| 281 | 275 | |
| ... | ... | @@ -290,7 +284,7 @@ export default { |
| 290 | 284 | formData.append('fileList', null); |
| 291 | 285 | //将新增的文件放入formData |
| 292 | 286 | this.fileEntityList.forEach(item => { |
| 293 | - if(item.id==null){ | |
| 287 | + if (item.id == null) { | |
| 294 | 288 | formData.append('fileList', item.raw) |
| 295 | 289 | } |
| 296 | 290 | }) |
| ... | ... | @@ -299,7 +293,7 @@ export default { |
| 299 | 293 | formData.append("uploadFilesList", null); |
| 300 | 294 | this.fileEntityList.forEach(item => { |
| 301 | 295 | delete item.params; |
| 302 | - if(item != "null" && item != null){ | |
| 296 | + if (item != "null" && item != null) { | |
| 303 | 297 | formData.append('uploadFilesList', JSON.stringify(item).replaceAll("url", "filePath").replaceAll("name", "fileName")); |
| 304 | 298 | } |
| 305 | 299 | }) |
| ... | ... | @@ -325,31 +319,31 @@ export default { |
| 325 | 319 | handleDelete(row) { |
| 326 | 320 | const ids = row.id || this.ids; |
| 327 | 321 | this.$confirm('是否确认删除平台违规案卷编号为"' + ids + '"的数据项?', "警告", { |
| 328 | - confirmButtonText: "确定", | |
| 329 | - cancelButtonText: "取消", | |
| 330 | - type: "warning" | |
| 331 | - }).then(function() { | |
| 332 | - return delViolationCaseFile(ids); | |
| 333 | - }).then(() => { | |
| 334 | - this.getList(); | |
| 335 | - this.msgSuccess("删除成功"); | |
| 336 | - }) | |
| 322 | + confirmButtonText: "确定", | |
| 323 | + cancelButtonText: "取消", | |
| 324 | + type: "warning" | |
| 325 | + }).then(function () { | |
| 326 | + return delViolationCaseFile(ids); | |
| 327 | + }).then(() => { | |
| 328 | + this.getList(); | |
| 329 | + this.msgSuccess("删除成功"); | |
| 330 | + }) | |
| 337 | 331 | }, |
| 338 | 332 | /** 导出按钮操作 */ |
| 339 | 333 | handleExport() { |
| 340 | 334 | const queryParams = this.queryParams; |
| 341 | 335 | this.$confirm('是否确认导出所有平台违规案卷数据项?', "警告", { |
| 342 | - confirmButtonText: "确定", | |
| 343 | - cancelButtonText: "取消", | |
| 344 | - type: "warning" | |
| 345 | - }).then(function() { | |
| 346 | - return exportViolationCaseFile(queryParams); | |
| 347 | - }).then(response => { | |
| 348 | - this.download(response.message); | |
| 349 | - }) | |
| 336 | + confirmButtonText: "确定", | |
| 337 | + cancelButtonText: "取消", | |
| 338 | + type: "warning" | |
| 339 | + }).then(function () { | |
| 340 | + return exportViolationCaseFile(queryParams); | |
| 341 | + }).then(response => { | |
| 342 | + this.download(response.message); | |
| 343 | + }) | |
| 350 | 344 | }, |
| 351 | 345 | /** 生成案卷编号 */ |
| 352 | - getNumber(){ | |
| 346 | + getNumber() { | |
| 353 | 347 | const now = new Date(); |
| 354 | 348 | const year = now.getFullYear().toString().slice(-2); // 提取后两位数 |
| 355 | 349 | const month = now.getMonth() + 1 < 10 ? `0${now.getMonth() + 1}` : now.getMonth() + 1; |
| ... | ... | @@ -367,9 +361,9 @@ export default { |
| 367 | 361 | setTimeout(() => { |
| 368 | 362 | // 模拟异步加载数据 |
| 369 | 363 | const data = [ |
| 370 | - { name:'项目1' }, | |
| 371 | - { name:'项目2' }, | |
| 372 | - { name:'项目3' } | |
| 364 | + {name: '项目1'}, | |
| 365 | + {name: '项目2'}, | |
| 366 | + {name: '项目3'} | |
| 373 | 367 | ].filter(item => item.name.includes(query)) |
| 374 | 368 | this.projectNameList = data |
| 375 | 369 | this.isLoading = false |
| ... | ... | @@ -381,9 +375,9 @@ export default { |
| 381 | 375 | setTimeout(() => { |
| 382 | 376 | // 模拟异步加载数据 |
| 383 | 377 | const data = [ |
| 384 | - { name:'公司1' }, | |
| 385 | - { name:'公司2' }, | |
| 386 | - { name:'公司3' } | |
| 378 | + {name: '公司1'}, | |
| 379 | + {name: '公司2'}, | |
| 380 | + {name: '公司3'} | |
| 387 | 381 | ].filter(item => item.name.includes(query)) |
| 388 | 382 | this.companyList = data |
| 389 | 383 | this.isLoadingCompany = false |
| ... | ... | @@ -456,9 +450,9 @@ export default { |
| 456 | 450 | a.click() |
| 457 | 451 | }, |
| 458 | 452 | /** 生成违规描述 */ |
| 459 | - createDescribe(){ | |
| 460 | - this.rules.companyName = [{ required: true, message: "必填", trigger: "blur" }] | |
| 461 | - this.rules.projectName = [{ required: true, message: "必填", trigger: "blur" }] | |
| 453 | + createDescribe() { | |
| 454 | + this.rules.companyName = [{required: true, message: "必填", trigger: "blur"}] | |
| 455 | + this.rules.projectName = [{required: true, message: "必填", trigger: "blur"}] | |
| 462 | 456 | this.$refs["form"].validate(valid => { |
| 463 | 457 | if (valid) { |
| 464 | 458 | let formData = this.form; |
| ... | ... | @@ -470,7 +464,7 @@ export default { |
| 470 | 464 | const minute = now.getMinutes() < 10 ? `0${now.getMinutes()}` : now.getMinutes(); |
| 471 | 465 | const second = now.getSeconds() < 10 ? `0${now.getSeconds()}` : now.getSeconds(); |
| 472 | 466 | const code = `${year}/${month}/${day} ${hour}:${minute}:${second}`; |
| 473 | - this.form.describe =code + formData.companyName + "在" + formData.projectName + "出现" + formData.violationType; | |
| 467 | + this.form.describe = code + formData.companyName + "在" + formData.projectName + "出现" + formData.violationType; | |
| 474 | 468 | this.rules.companyName = null; |
| 475 | 469 | this.rules.projectName = null; |
| 476 | 470 | } | ... | ... |
trash-ui/src/views/activiti/task/index.vue
trash-ui/src/views/casefile/violationCaseFile/violationCaseFileInfo.vue
| ... | ... | @@ -113,11 +113,11 @@ |
| 113 | 113 | type="text" |
| 114 | 114 | icon="el-icon-view" |
| 115 | 115 | @click="openImage(scope.row.replyImg)" |
| 116 | - v-if="scope.row.replyImg!=null" | |
| 116 | + v-if="scope.row.replyImg!=null && scope.row.replyImg!='undefined'" | |
| 117 | 117 | v-hasPermi="['casefile:violationWarningInformation:view']" |
| 118 | 118 | >查看 |
| 119 | 119 | </el-button> |
| 120 | - <span v-if="scope.row.replyImg==null">暂无</span> | |
| 120 | + <span v-if="scope.row.replyImg==null || scope.row.replyImg=='undefined'">暂无</span> | |
| 121 | 121 | </template> |
| 122 | 122 | </el-table-column> |
| 123 | 123 | </el-table> | ... | ... |
trash-ui/src/views/casefile/violationWarningInformation/violationWarningInformationInfo.vue
| ... | ... | @@ -111,11 +111,11 @@ |
| 111 | 111 | type="text" |
| 112 | 112 | icon="el-icon-view" |
| 113 | 113 | @click="openImage(scope.row.replyImg)" |
| 114 | - v-if="scope.row.replyImg!=null" | |
| 114 | + v-if="scope.row.replyImg!=null && scope.row.replyImg!='undefined'" | |
| 115 | 115 | v-hasPermi="['casefile:violationWarningInformation:edit']" |
| 116 | 116 | >查看 |
| 117 | 117 | </el-button> |
| 118 | - <span v-if="scope.row.replyImg==null">暂无</span> | |
| 118 | + <span v-if="scope.row.replyImg==null || scope.row.replyImg=='undefined'">暂无</span> | |
| 119 | 119 | </template> |
| 120 | 120 | </el-table-column> |
| 121 | 121 | </el-table> | ... | ... |
trash-workFlow/src/main/java/com/trash/casefile/service/impl/ViolationCaseFileServiceImpl.java
| ... | ... | @@ -128,7 +128,7 @@ public class ViolationCaseFileServiceImpl implements IViolationCaseFileService |
| 128 | 128 | i = 2; |
| 129 | 129 | } |
| 130 | 130 | } |
| 131 | - if(violationCaseFile.getViolationType().equals("三无车辆进入工地")||violationCaseFile.getViolationType().equals("三无车辆进入消纳场")){ | |
| 131 | + if(violationCaseFile.getViolationType().equals("三无车辆进入工地")||violationCaseFile.getViolationType().equals("三无车辆进入消纳场")||violationCaseFile.getViolationType().equals("三无车辆运输")){ | |
| 132 | 132 | i = 2; |
| 133 | 133 | } |
| 134 | 134 | ... | ... |