Commit aaac800bc268d193fecd79ac4a5fc7398d1a0269
1 parent
fb390ddb
与客户沟通对接,装修垃圾投放点新增页面需要修改:
1、社区录入改成字典下拉格式(客户回去统计字典数据) 2、增加小区字段,放在社区下面,小区隶属社区为必填项(非下拉) 3、投放点编号规则修改:原有基础上拼接社区代码 4、“投放点形式”改为“是否为实行物业管理的区域(小区)”为下拉格式 5、把管理单位一栏改为非必填 6、“管理人”改为“管理员” 7、投放时间格式更改:改为时间段格式(HH:mm~HH:mm)
Showing
4 changed files
with
126 additions
and
52 deletions
trash-ui/src/api/dict.js
trash-ui/src/views/unit/dropPointInfo/index.vue
| ... | ... | @@ -19,11 +19,11 @@ |
| 19 | 19 | @keyup.enter.native="handleQuery" |
| 20 | 20 | /> |
| 21 | 21 | </el-form-item> |
| 22 | - <el-form-item label="投放点形式" prop="type"> | |
| 23 | - <el-select v-model="queryParams.type" placeholder="请选择投放点形式" clearable size="small"> | |
| 22 | + <el-form-item label="是否为实行物业管理的区域(小区)" prop="type"> | |
| 23 | + <el-select v-model="queryParams.type" placeholder="请选择是否为实行物业管理的区域(小区)" clearable size="small"> | |
| 24 | 24 | <el-option label="全部" value=""/> |
| 25 | - <el-option label="固定" value="固定"/> | |
| 26 | - <el-option label="临时" value="临时"/> | |
| 25 | + <el-option label="是" value="是"/> | |
| 26 | + <el-option label="否" value="否"/> | |
| 27 | 27 | </el-select> |
| 28 | 28 | </el-form-item> |
| 29 | 29 | <el-form-item> |
| ... | ... | @@ -94,12 +94,13 @@ |
| 94 | 94 | </template> |
| 95 | 95 | </el-table-column> |
| 96 | 96 | <el-table-column label="社区" align="center" prop="community"/> |
| 97 | + <el-table-column label="小区" align="center" prop="plot"/> | |
| 97 | 98 | <el-table-column label="详细地址" align="center" prop="address"/> |
| 98 | 99 | <el-table-column label="投放点形式" align="center" prop="type"/> |
| 99 | 100 | <el-table-column label="投放点面积(m²)" align="center" prop="area"/> |
| 100 | 101 | <el-table-column label="投放点容量(m³)" align="center" prop="capacity"/> |
| 101 | 102 | <el-table-column label="管理单位" align="center" prop="managementUnit"/> |
| 102 | - <el-table-column label="管理人" align="center" prop="custodian"/> | |
| 103 | + <el-table-column label="管理员" align="center" prop="custodian"/> | |
| 103 | 104 | <el-table-column label="管理员电话" align="center" prop="custodianPhone"/> |
| 104 | 105 | <el-table-column label="投放时间" align="center" prop="dropTime" width="180"/> |
| 105 | 106 | <el-table-column label="投放点编号" align="center" prop="dropPointNo"/> |
| ... | ... | @@ -112,7 +113,7 @@ |
| 112 | 113 | </el-table-column> |
| 113 | 114 | <el-table-column label="创建时间" align="center" prop="createTime" width="180"> |
| 114 | 115 | <template slot-scope="scope"> |
| 115 | - <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}-{i}-{s}') }}</span> | |
| 116 | + <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span> | |
| 116 | 117 | </template> |
| 117 | 118 | </el-table-column> |
| 118 | 119 | <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
| ... | ... | @@ -164,24 +165,29 @@ |
| 164 | 165 | </el-form-item> |
| 165 | 166 | |
| 166 | 167 | <el-form-item label="所属街道" prop="street"> |
| 167 | - <el-select v-model="form.street" placeholder="请输入所属街道" style="width: 100%" clearable> | |
| 168 | - <el-option v-for="(area,index) in streets" :label="area.name" :value="area.code" :key="area.code" @click.native="createDropPointNo(area)"/> | |
| 168 | + <el-select v-model="form.street" placeholder="请输入所属街道" style="width: 100%" clearable @change="getCommunitys"> | |
| 169 | + <el-option v-for="(area,index) in streets" :label="area.name" :value="area.code" :key="area.code"/> | |
| 169 | 170 | </el-select> |
| 170 | 171 | </el-form-item> |
| 171 | 172 | |
| 172 | - <el-form-item label="社区" prop="community"> | |
| 173 | - <el-input v-model="form.community" placeholder="请输入社区"/> | |
| 174 | - </el-form-item> | |
| 173 | + <el-form-item label="社区" prop="community"> | |
| 174 | + <el-select v-model="form.community" placeholder="请输入所属社区" style="width: 100%" clearable> | |
| 175 | + <el-option v-for="(area,index) in communitys" :label="area.name" :value="area.code" :key="area.code" @click.native="createDropPointNo(area,'community')"/> | |
| 176 | + </el-select> | |
| 177 | + </el-form-item> | |
| 175 | 178 | |
| 179 | + <el-form-item label="小区" prop="plot"> | |
| 180 | + <el-input v-model="form.plot" placeholder="请输入小区"/> | |
| 181 | + </el-form-item> | |
| 176 | 182 | |
| 177 | 183 | <el-form-item label="详细地址" prop="address"> |
| 178 | 184 | <el-input v-model="form.address" placeholder="请输入详细地址"/> |
| 179 | 185 | </el-form-item> |
| 180 | 186 | |
| 181 | - <el-form-item label="投放点形式" prop="type"> | |
| 182 | - <el-select v-model="form.type" placeholder="请选择投放点形式" style="width: 100%"> | |
| 183 | - <el-option label="固定" value="固定"/> | |
| 184 | - <el-option label="临时" value="临时"/> | |
| 187 | + <el-form-item label="是否为实行物业管理的区域(小区)" prop="type"> | |
| 188 | + <el-select v-model="form.type" placeholder="请选择是否为实行物业管理的区域(小区)" style="width: 100%"> | |
| 189 | + <el-option label="是" value="是"/> | |
| 190 | + <el-option label="否" value="否"/> | |
| 185 | 191 | </el-select> |
| 186 | 192 | </el-form-item> |
| 187 | 193 | |
| ... | ... | @@ -197,24 +203,35 @@ |
| 197 | 203 | <el-input v-model="form.managementUnit" placeholder="请输入管理单位"/> |
| 198 | 204 | </el-form-item> |
| 199 | 205 | |
| 200 | - <el-form-item label="管理人" prop="custodian"> | |
| 201 | - <el-input v-model="form.custodian" placeholder="请输入管理人"/> | |
| 206 | + <el-form-item label="管理员" prop="custodian"> | |
| 207 | + <el-input v-model="form.custodian" placeholder="请输入管理员"/> | |
| 202 | 208 | </el-form-item> |
| 203 | 209 | |
| 204 | 210 | <el-form-item label="管理员电话" prop="custodianPhone"> |
| 205 | 211 | <el-input v-model="form.custodianPhone" placeholder="请输入管理员联系电话" :maxlength="11" show-word-limit/> |
| 206 | 212 | </el-form-item> |
| 207 | 213 | |
| 208 | - <el-form-item label="投放时间" prop="dropTime"> | |
| 214 | + <el-form-item label="投放时间" prop="dropTime" v-if="dropTime"> | |
| 209 | 215 | <el-time-select |
| 216 | + placeholder="起始时间" | |
| 210 | 217 | v-model="form.dropTime" |
| 211 | - style="width: 100%" | |
| 218 | + style="width: 50%" | |
| 212 | 219 | :picker-options="{ |
| 213 | - start: '00:00', | |
| 214 | - step: '00:30', | |
| 215 | - end: '23:30' | |
| 216 | - }" | |
| 217 | - placeholder="选择时间"> | |
| 220 | + start: '00:00', | |
| 221 | + step: '00:15', | |
| 222 | + end: '23:45' | |
| 223 | + }"> | |
| 224 | + </el-time-select> | |
| 225 | + <el-time-select | |
| 226 | + placeholder="结束时间" | |
| 227 | + v-model="endTime" | |
| 228 | + style="width: 50%" | |
| 229 | + :picker-options="{ | |
| 230 | + start: '00:15', | |
| 231 | + step: '00:15', | |
| 232 | + end: '24:00', | |
| 233 | + minTime: form.dropTime | |
| 234 | + }"> | |
| 218 | 235 | </el-time-select> |
| 219 | 236 | </el-form-item> |
| 220 | 237 | |
| ... | ... | @@ -284,7 +301,7 @@ import { |
| 284 | 301 | updateDropPointInfo, |
| 285 | 302 | exportDropPointInfo |
| 286 | 303 | } from "@/api/unit/dropPointInfo"; |
| 287 | -import {getAreaList} from "@/api/dict" | |
| 304 | +import {getAreaList,getAreasList} from "@/api/dict" | |
| 288 | 305 | import AMapLoader from "@amap/amap-jsapi-loader"; |
| 289 | 306 | import Treeselect from "@riophae/vue-treeselect"; |
| 290 | 307 | |
| ... | ... | @@ -338,7 +355,10 @@ export default { |
| 338 | 355 | {required: true, message: "请输入所属街道", trigger: "blur"} |
| 339 | 356 | ], |
| 340 | 357 | community: [ |
| 341 | - {required: true, message: "请输入社区", trigger: "blur"} | |
| 358 | + {required: true, message: "请选择社区", trigger: "blur"} | |
| 359 | + ], | |
| 360 | + plot: [ | |
| 361 | + {required: true, message: "请输入小区", trigger: "blur"} | |
| 342 | 362 | ], |
| 343 | 363 | address: [ |
| 344 | 364 | {required: true, message: "请输入详细地址", trigger: "blur"} |
| ... | ... | @@ -360,7 +380,7 @@ export default { |
| 360 | 380 | {required: true, message: "请输入管理单位", trigger: "blur"} |
| 361 | 381 | ], |
| 362 | 382 | custodian: [ |
| 363 | - {required: true, message: "请输入管理人", trigger: "blur"} | |
| 383 | + {required: true, message: "请输入管理员", trigger: "blur"} | |
| 364 | 384 | ], |
| 365 | 385 | custodianPhone: [ |
| 366 | 386 | {required: true, message: "请输入管理员电话", trigger: "blur"}, |
| ... | ... | @@ -373,9 +393,6 @@ export default { |
| 373 | 393 | dropTime: [ |
| 374 | 394 | {required: true, message: "请选择投放时间", trigger: "change"} |
| 375 | 395 | ], |
| 376 | - operatingUnit: [ | |
| 377 | - {required: true, message: "请输入运营单位", trigger: "blur"} | |
| 378 | - ], | |
| 379 | 396 | transportUnit: [ |
| 380 | 397 | {required: true, message: "请输入运输单位", trigger: "blur"} |
| 381 | 398 | ], |
| ... | ... | @@ -383,8 +400,12 @@ export default { |
| 383 | 400 | {required: true, message: "请点击坐标点按钮选择坐标点", trigger: "blur"} |
| 384 | 401 | ] |
| 385 | 402 | }, |
| 403 | + //区域 | |
| 386 | 404 | areas: [], |
| 405 | + //街道 | |
| 387 | 406 | streets:[], |
| 407 | + //社区 | |
| 408 | + communitys:[], | |
| 388 | 409 | // 地图 |
| 389 | 410 | map: null, |
| 390 | 411 | keywords: "", |
| ... | ... | @@ -392,27 +413,31 @@ export default { |
| 392 | 413 | openMap:false, |
| 393 | 414 | center: null, |
| 394 | 415 | circleMarker: null, |
| 416 | + endTime: null, | |
| 417 | + dropTime: true | |
| 395 | 418 | }; |
| 396 | 419 | }, |
| 397 | 420 | created() { |
| 398 | - getAreaList().then(response => { | |
| 421 | + getAreasList().then(response => { | |
| 399 | 422 | if(response==null || response.length===0){ |
| 400 | 423 | this.$message.error("获取区域列表失败"); |
| 401 | 424 | return; |
| 402 | 425 | } |
| 403 | - const data = response; | |
| 404 | - for (let dataKey in data) { | |
| 405 | - if(data[dataKey].level === '3'){ | |
| 406 | - this.areas.push({name:data[dataKey].name,code:data[dataKey].id, streets:[]}) | |
| 407 | - } | |
| 408 | - } | |
| 409 | - for(let dataKey in data){ | |
| 410 | - for(let areas1Key in this.areas){ | |
| 411 | - if(data[dataKey].pid === this.areas[areas1Key].code){ | |
| 412 | - this.areas[areas1Key].streets.push({code:data[dataKey].id, name:data[dataKey].name}) | |
| 413 | - } | |
| 414 | - } | |
| 415 | - } | |
| 426 | + let data = response.filter(data => data.code === "430100"); | |
| 427 | + this.areas = data[0].items; | |
| 428 | + console.log(this.areas) | |
| 429 | + // for (let dataKey in data) { | |
| 430 | + // if(data[dataKey].parentCode === '430100'){ | |
| 431 | + // this.areas.push({name:data[dataKey].name,code:data[dataKey].code, streets:[]}) | |
| 432 | + // } | |
| 433 | + // } | |
| 434 | + // for(let dataKey in data){ | |
| 435 | + // for(let areas1Key in this.areas){ | |
| 436 | + // if(data[dataKey].parentCode === this.areas[areas1Key].code){ | |
| 437 | + // this.areas[areas1Key].streets.push({code:data[dataKey].code, name:data[dataKey].name,item:data[dataKey].items}) | |
| 438 | + // } | |
| 439 | + // } | |
| 440 | + // } | |
| 416 | 441 | }); |
| 417 | 442 | |
| 418 | 443 | this.getList(); |
| ... | ... | @@ -573,17 +598,25 @@ export default { |
| 573 | 598 | } |
| 574 | 599 | }, |
| 575 | 600 | createDropPointNo(area){ |
| 576 | - listDropPointInfo({dropPointNo: area.code}).then(response => { | |
| 577 | - const total = response.total+1; | |
| 578 | - this.form.dropPointNo = area.code+total.toString().padStart(3, '0'); | |
| 579 | - }); | |
| 601 | + listDropPointInfo({dropPointNo: area.code}).then(response => { | |
| 602 | + const total = response.total+1; | |
| 603 | + this.form.dropPointNo = area.code+total.toString().padStart(3, '0'); | |
| 604 | + }); | |
| 605 | + | |
| 580 | 606 | }, |
| 581 | 607 | getStreets(regionName) { |
| 582 | 608 | this.streets = []; |
| 583 | 609 | this.form.dropPointNo = null; |
| 584 | 610 | this.form.street = null; |
| 585 | 611 | const region = this.areas.find(region => region.code === regionName); |
| 586 | - this.streets = region.streets; | |
| 612 | + this.streets = region.items; | |
| 613 | + }, | |
| 614 | + getCommunitys(regionName){ | |
| 615 | + this.communitys = []; | |
| 616 | + this.form.dropPointNo = null; | |
| 617 | + this.form.community = null; | |
| 618 | + const region = this.streets.find(region => region.code === regionName); | |
| 619 | + this.communitys = region.items; | |
| 587 | 620 | }, |
| 588 | 621 | /** 下载文件 */ |
| 589 | 622 | /** 查询投放点信息管理列表 */ |
| ... | ... | @@ -624,6 +657,9 @@ export default { |
| 624 | 657 | updateTime: null, |
| 625 | 658 | updateBy: null |
| 626 | 659 | }; |
| 660 | + this.endTime = null; | |
| 661 | + this.streets = []; | |
| 662 | + this.communitys = []; | |
| 627 | 663 | this.map = null; |
| 628 | 664 | this.center = null; |
| 629 | 665 | this.resetForm("form"); |
| ... | ... | @@ -654,26 +690,42 @@ export default { |
| 654 | 690 | handleUpdate(row) { |
| 655 | 691 | this.reset(); |
| 656 | 692 | const id = row.id || this.ids |
| 693 | + this.dropTime = false; | |
| 657 | 694 | getDropPointInfo(id).then(response => { |
| 695 | + let dropTime = response.data.dropTime.split("~"); | |
| 696 | + console.log(dropTime) | |
| 658 | 697 | this.form = response.data; |
| 698 | + this.form.dropTime = dropTime[0]; | |
| 699 | + this.endTime = dropTime[1]; | |
| 659 | 700 | this.open = true; |
| 660 | 701 | this.title = "修改投放点信息管理"; |
| 702 | + this.dropTime = true; | |
| 661 | 703 | }); |
| 662 | 704 | }, |
| 663 | 705 | /** 提交按钮 */ |
| 664 | 706 | submitForm() { |
| 707 | + | |
| 665 | 708 | this.$refs["form"].validate(valid => { |
| 666 | 709 | if (valid) { |
| 710 | + let dropTime = this.form.dropTime; | |
| 711 | + if(this.endTime!=null){ | |
| 712 | + this.form.dropTime = this.form.dropTime + "~" + this.endTime; | |
| 713 | + }else{ | |
| 714 | + this.$message.error("请选择投放结束时间"); | |
| 715 | + return; | |
| 716 | + } | |
| 667 | 717 | if (this.form.id != null) { |
| 668 | 718 | updateDropPointInfo(this.form).then(response => { |
| 669 | 719 | this.msgSuccess("修改成功"); |
| 670 | 720 | this.open = false; |
| 721 | + this.form.dropTime = dropTime; | |
| 671 | 722 | this.getList(); |
| 672 | 723 | }); |
| 673 | 724 | } else { |
| 674 | 725 | addDropPointInfo(this.form).then(response => { |
| 675 | 726 | this.msgSuccess("新增成功"); |
| 676 | 727 | this.open = false; |
| 728 | + this.form.dropTime = dropTime; | |
| 677 | 729 | this.getList(); |
| 678 | 730 | }); |
| 679 | 731 | } | ... | ... |
trash-unit/src/main/java/com/trash/dropPointInfo/domain/DropPointInfo.java
| ... | ... | @@ -39,6 +39,10 @@ public class DropPointInfo extends BaseEntity |
| 39 | 39 | @Excel(name = "社区") |
| 40 | 40 | private String community; |
| 41 | 41 | |
| 42 | + /** 小区 */ | |
| 43 | + @Excel(name = "小区") | |
| 44 | + private String plot; | |
| 45 | + | |
| 42 | 46 | /** 详细地址 */ |
| 43 | 47 | @Excel(name = "详细地址") |
| 44 | 48 | private String address; |
| ... | ... | @@ -59,8 +63,8 @@ public class DropPointInfo extends BaseEntity |
| 59 | 63 | @Excel(name = "管理单位") |
| 60 | 64 | private String managementUnit; |
| 61 | 65 | |
| 62 | - /** 管理人 */ | |
| 63 | - @Excel(name = "管理人") | |
| 66 | + /** 管理员 */ | |
| 67 | + @Excel(name = "管理员") | |
| 64 | 68 | private String custodian; |
| 65 | 69 | |
| 66 | 70 | /** 管理员电话 */ |
| ... | ... | @@ -101,6 +105,13 @@ public class DropPointInfo extends BaseEntity |
| 101 | 105 | @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") |
| 102 | 106 | private Date createTime; |
| 103 | 107 | |
| 108 | + public String getPlot() { | |
| 109 | + return plot; | |
| 110 | + } | |
| 111 | + | |
| 112 | + public void setPlot(String plot) { | |
| 113 | + this.plot = plot; | |
| 114 | + } | |
| 104 | 115 | |
| 105 | 116 | public String getCoordinatePoint() { |
| 106 | 117 | return coordinatePoint; | ... | ... |
trash-unit/src/main/resources/mapper/unit/DropPointInfoMapper.xml
| ... | ... | @@ -26,6 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 26 | 26 | <result property="createBy" column="create_by" /> |
| 27 | 27 | <result property="updateTime" column="update_time" /> |
| 28 | 28 | <result property="updateBy" column="update_by" /> |
| 29 | + <result property="plot" column="plot" /> | |
| 29 | 30 | </resultMap> |
| 30 | 31 | |
| 31 | 32 | <sql id="selectDropPointInfoVo"> |
| ... | ... | @@ -33,7 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 33 | 34 | area, capacity, management_unit, custodian, custodian_phone, |
| 34 | 35 | drop_time, drop_point_no, operating_unit, |
| 35 | 36 | transport_unit,coordinate_point, create_time, create_by, update_time, |
| 36 | - update_by from drop_point_info | |
| 37 | + update_by,plot from drop_point_info | |
| 37 | 38 | </sql> |
| 38 | 39 | |
| 39 | 40 | <select id="selectDropPointInfoList" parameterType="DropPointInfo" |
| ... | ... | @@ -85,6 +86,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 85 | 86 | <if test="createBy != null">create_by,</if> |
| 86 | 87 | <if test="updateTime != null">update_time,</if> |
| 87 | 88 | <if test="updateBy != null">update_by,</if> |
| 89 | + <if test="plot != null">plot,</if> | |
| 88 | 90 | </trim> |
| 89 | 91 | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| 90 | 92 | <if test="dropPointName != null">#{dropPointName},</if> |
| ... | ... | @@ -107,6 +109,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 107 | 109 | <if test="createBy != null">#{createBy},</if> |
| 108 | 110 | <if test="updateTime != null">#{updateTime},</if> |
| 109 | 111 | <if test="updateBy != null">#{updateBy},</if> |
| 112 | + <if test="plot != null">#{plot},</if> | |
| 110 | 113 | </trim> |
| 111 | 114 | </insert> |
| 112 | 115 | |
| ... | ... | @@ -133,6 +136,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 133 | 136 | <if test="createBy != null">create_by = #{createBy},</if> |
| 134 | 137 | <if test="updateTime != null">update_time = #{updateTime},</if> |
| 135 | 138 | <if test="updateBy != null">update_by = #{updateBy},</if> |
| 139 | + <if test="plot != null">plot = #{plot},</if> | |
| 136 | 140 | </trim> |
| 137 | 141 | where id = #{id} |
| 138 | 142 | </update> | ... | ... |