Commit 1c2292a898483023b40b181d94564dc075d2e847
1 parent
5ec81c07
处理场所新增所在地址gps坐标
gps数据,新增当前速度 新增kafka生产者
Showing
11 changed files
with
1770 additions
and
396 deletions
trash-quartz/src/main/java/com/trash/quartz/task/GpsTask.java
| @@ -39,7 +39,14 @@ public class GpsTask { | @@ -39,7 +39,14 @@ public class GpsTask { | ||
| 39 | gps.setCreateTime(DateUtils.parseDate(jsonObject.getString("time").replaceAll("T"," "))); | 39 | gps.setCreateTime(DateUtils.parseDate(jsonObject.getString("time").replaceAll("T"," "))); |
| 40 | gps.setYearMonth(jsonObject.getString("time").substring(0,7).replace("-","")); | 40 | gps.setYearMonth(jsonObject.getString("time").substring(0,7).replace("-","")); |
| 41 | gps.setCarCode(jsonObject.getString("carCode")); | 41 | gps.setCarCode(jsonObject.getString("carCode")); |
| 42 | + gps.setSpeed(jsonObject.getString("speed")); | ||
| 42 | gpsOrientationMapper.insertGpsOrientation(gps); | 43 | gpsOrientationMapper.insertGpsOrientation(gps); |
| 44 | + float speed = Float.parseFloat(jsonObject.getString("speed")); | ||
| 45 | + //判断车速是否大于100km/h | ||
| 46 | + if(speed>100){ | ||
| 47 | + //将超速的车辆推送到kafka超速预警 | ||
| 48 | + | ||
| 49 | + } | ||
| 43 | } | 50 | } |
| 44 | 51 | ||
| 45 | } | 52 | } |
trash-ui/src/router/index.js
| @@ -140,7 +140,7 @@ export const constantRoutes = [ | @@ -140,7 +140,7 @@ export const constantRoutes = [ | ||
| 140 | }, | 140 | }, |
| 141 | { | 141 | { |
| 142 | path: '/enterprise/infoEdit', | 142 | path: '/enterprise/infoEdit', |
| 143 | - component: (resolve) => require(['@/views/unit/enterprise/info'], resolve), | 143 | + component: (resolve) => require(['@/views/unit/enterprise/infoEdit'], resolve), |
| 144 | name: '修改运输企业', | 144 | name: '修改运输企业', |
| 145 | hidden: true, | 145 | hidden: true, |
| 146 | meta: { title: '修改运输企业' } | 146 | meta: { title: '修改运输企业' } |
trash-ui/src/views/unit/disposalSite/info.vue
| @@ -18,8 +18,8 @@ | @@ -18,8 +18,8 @@ | ||
| 18 | </el-form-item> | 18 | </el-form-item> |
| 19 | </el-col> | 19 | </el-col> |
| 20 | <el-col :span="6"> | 20 | <el-col :span="6"> |
| 21 | - <el-form-item label="所在地址" prop="address"> | ||
| 22 | - <el-input v-model="form.address" placeholder="请输入所在地址" /> | 21 | + <el-form-item label="所在地址" prop="address" class="is-required"> |
| 22 | + <el-input v-model="form.address" placeholder="请输入所在地址" @focus="openMapDialog"/> | ||
| 23 | </el-form-item> | 23 | </el-form-item> |
| 24 | </el-col> | 24 | </el-col> |
| 25 | </el-row> | 25 | </el-row> |
| @@ -615,9 +615,6 @@ export default { | @@ -615,9 +615,6 @@ export default { | ||
| 615 | name: [ | 615 | name: [ |
| 616 | { required: true, message: "请输入处置场所名称", trigger: "blur" }, | 616 | { required: true, message: "请输入处置场所名称", trigger: "blur" }, |
| 617 | ], | 617 | ], |
| 618 | - address: [ | ||
| 619 | - { required: true, message: "请输入处置场所地址", trigger: "blur" }, | ||
| 620 | - ], | ||
| 621 | localArea: [ | 618 | localArea: [ |
| 622 | { required: true, message: "请选择所属区域", trigger: "blur" }, | 619 | { required: true, message: "请选择所属区域", trigger: "blur" }, |
| 623 | ], | 620 | ], |
| @@ -719,6 +716,12 @@ export default { | @@ -719,6 +716,12 @@ export default { | ||
| 719 | '$route.query.disposalSiteId': 'initData' | 716 | '$route.query.disposalSiteId': 'initData' |
| 720 | }, | 717 | }, |
| 721 | methods: { | 718 | methods: { |
| 719 | + openMapDialog(){ | ||
| 720 | + this.openMap = true; | ||
| 721 | + this.initAMap("address"); | ||
| 722 | + this.keywords = this.form.address; | ||
| 723 | + | ||
| 724 | + }, | ||
| 722 | reset(){ | 725 | reset(){ |
| 723 | this.form = {}; | 726 | this.form = {}; |
| 724 | this.approvalDocument = []; | 727 | this.approvalDocument = []; |
| @@ -811,8 +814,7 @@ export default { | @@ -811,8 +814,7 @@ export default { | ||
| 811 | if (!val) { | 814 | if (!val) { |
| 812 | return ; | 815 | return ; |
| 813 | } | 816 | } |
| 814 | - // 自动适应显示想显示的范围区域 | ||
| 815 | - this.map.setFitView(); | 817 | + |
| 816 | //清除marker | 818 | //清除marker |
| 817 | if (this.searchMarker){ | 819 | if (this.searchMarker){ |
| 818 | this.map.remove(this.searchMarker) | 820 | this.map.remove(this.searchMarker) |
| @@ -826,6 +828,10 @@ export default { | @@ -826,6 +828,10 @@ export default { | ||
| 826 | this.keywords = val.name | 828 | this.keywords = val.name |
| 827 | //定位 | 829 | //定位 |
| 828 | this.map.setCenter([val.location.lng, val.location.lat]) | 830 | this.map.setCenter([val.location.lng, val.location.lat]) |
| 831 | + // 自动适应显示想显示的范围区域 | ||
| 832 | + this.map.setFitView(); | ||
| 833 | + this.form.addressGps = val.location.lng+","+val.location.lat; | ||
| 834 | + this.form.address = val.district + val.name; | ||
| 829 | }, | 835 | }, |
| 830 | // 搜索地址 | 836 | // 搜索地址 |
| 831 | remoteMethod(query) { | 837 | remoteMethod(query) { |
| @@ -841,7 +847,7 @@ export default { | @@ -841,7 +847,7 @@ export default { | ||
| 841 | this.mapOptions = []; | 847 | this.mapOptions = []; |
| 842 | } | 848 | } |
| 843 | }, | 849 | }, |
| 844 | - initAMap() { | 850 | + initAMap(type) { |
| 845 | const _this = this | 851 | const _this = this |
| 846 | // 加载高德地图 | 852 | // 加载高德地图 |
| 847 | AMapLoader.load({ | 853 | AMapLoader.load({ |
| @@ -864,7 +870,7 @@ export default { | @@ -864,7 +870,7 @@ export default { | ||
| 864 | willreadoften: true | 870 | willreadoften: true |
| 865 | }); | 871 | }); |
| 866 | 872 | ||
| 867 | - _this.AutoComplete = await new AMap.AutoComplete({city:'全国'}); | 873 | + _this.AutoComplete = await new AMap.AutoComplete({city:'长沙'}); |
| 868 | 874 | ||
| 869 | // 图层样式切换控件(卫星图) | 875 | // 图层样式切换控件(卫星图) |
| 870 | AMapUI.loadUI(['control/BasicControl'], function(BasicControl) { | 876 | AMapUI.loadUI(['control/BasicControl'], function(BasicControl) { |
| @@ -875,78 +881,97 @@ export default { | @@ -875,78 +881,97 @@ export default { | ||
| 875 | })); | 881 | })); |
| 876 | 882 | ||
| 877 | }); | 883 | }); |
| 878 | - _this.polyEditor = new AMap.PolygonEditor(_this.map); | ||
| 879 | - if(_this.form.electronicFence!=null){ | ||
| 880 | - // 电子围栏经纬度 | ||
| 881 | - let path = _this.form.electronicFence.split(";"); | ||
| 882 | - path.map(item=>{ | ||
| 883 | - let arr = item.split(","); | ||
| 884 | - //将电子围栏经纬度转换为double类型数组 | ||
| 885 | - _this.polygonArr.push([parseFloat(arr[0]),parseFloat(arr[1])]); | ||
| 886 | - }); | ||
| 887 | - _this.nowPolygon = new AMap.Polygon({ | ||
| 888 | - path: _this.polygonArr | ||
| 889 | - }) | ||
| 890 | - _this.map.add([_this.nowPolygon]); | ||
| 891 | - _this.map.setFitView(); | ||
| 892 | - _this.polyEditor.addAdsorbPolygons([_this.nowPolygon]); | ||
| 893 | - _this.nowPolygon.on('dblclick', () => { | ||
| 894 | - _this.polyEditor.setTarget(_this.nowPolygon); | ||
| 895 | - _this.polyEditor.open(); | ||
| 896 | - }) | ||
| 897 | - } | ||
| 898 | - _this.polyEditor.on('add', function (data) { | ||
| 899 | - _this.nowPolygon = data.target; | ||
| 900 | - _this.polyEditor.addAdsorbPolygons(_this.nowPolygon); | ||
| 901 | - _this.nowPolygon.on('dblclick', () => { | ||
| 902 | - _this.polyEditor.setTarget(_this.nowPolygon); | ||
| 903 | - _this.polyEditor.open(); | ||
| 904 | - }) | 884 | + if(type==="draw"){ |
| 885 | + _this.polyEditor = new AMap.PolygonEditor(_this.map); | ||
| 886 | + if(_this.form.electronicFence!=null){ | ||
| 887 | + // 电子围栏经纬度 | ||
| 888 | + let path = _this.form.electronicFence.split(";"); | ||
| 889 | + path.map(item=>{ | ||
| 890 | + let arr = item.split(","); | ||
| 891 | + //将电子围栏经纬度转换为double类型数组 | ||
| 892 | + _this.polygonArr.push([parseFloat(arr[0]),parseFloat(arr[1])]); | ||
| 893 | + }); | ||
| 894 | + _this.nowPolygon = new AMap.Polygon({ | ||
| 895 | + path: _this.polygonArr | ||
| 896 | + }) | ||
| 897 | + _this.map.add([_this.nowPolygon]); | ||
| 898 | + _this.map.setFitView(); | ||
| 899 | + _this.polyEditor.addAdsorbPolygons([_this.nowPolygon]); | ||
| 900 | + _this.nowPolygon.on('dblclick', () => { | ||
| 901 | + _this.polyEditor.setTarget(_this.nowPolygon); | ||
| 902 | + _this.polyEditor.open(); | ||
| 903 | + }) | ||
| 904 | + } | ||
| 905 | + _this.polyEditor.on('add', function (data) { | ||
| 906 | + _this.nowPolygon = data.target; | ||
| 907 | + _this.polyEditor.addAdsorbPolygons(_this.nowPolygon); | ||
| 908 | + _this.nowPolygon.on('dblclick', () => { | ||
| 909 | + _this.polyEditor.setTarget(_this.nowPolygon); | ||
| 910 | + _this.polyEditor.open(); | ||
| 911 | + }) | ||
| 905 | 912 | ||
| 906 | - // 加个右击监听 双击图层进行编辑 | ||
| 907 | - _this.map.on("rightclick",function (e){ | ||
| 908 | - if (_this.polyEditor) { | ||
| 909 | - const arr = _this.nowPolygon.getPath() | ||
| 910 | - let pathArr = [] | ||
| 911 | - // 将获取的停车场坐标点转换格式后存入数组 | ||
| 912 | - for (let item of arr) { | ||
| 913 | - const list = [item.lng, item.lat] | ||
| 914 | - pathArr.push(list) | ||
| 915 | - } | 913 | + // 加个右击监听 双击图层进行编辑 |
| 914 | + _this.map.on("rightclick",function (e){ | ||
| 915 | + if (_this.polyEditor) { | ||
| 916 | + const arr = _this.nowPolygon.getPath() | ||
| 917 | + let pathArr = [] | ||
| 918 | + // 将获取的停车场坐标点转换格式后存入数组 | ||
| 919 | + for (let item of arr) { | ||
| 920 | + const list = [item.lng, item.lat] | ||
| 921 | + pathArr.push(list) | ||
| 922 | + } | ||
| 916 | 923 | ||
| 917 | - var maxDistance = 0; // 最大距离 | ||
| 918 | - var maxPointIndex = []; // 记录最大距离对应的点索引 | 924 | + var maxDistance = 0; // 最大距离 |
| 925 | + var maxPointIndex = []; // 记录最大距离对应的点索引 | ||
| 919 | 926 | ||
| 920 | - // 计算所有点对之间的距离 | ||
| 921 | - for (var i = 0; i < pathArr.length; i++) { | ||
| 922 | - for (var j = i + 1; j < pathArr.length; j++) { | ||
| 923 | - var distance = AMap.GeometryUtil.distance(pathArr[i], pathArr[j]); | ||
| 924 | - if (distance > maxDistance) { | ||
| 925 | - maxDistance = distance; | ||
| 926 | - maxPointIndex = [i, j]; | 927 | + // 计算所有点对之间的距离 |
| 928 | + for (var i = 0; i < pathArr.length; i++) { | ||
| 929 | + for (var j = i + 1; j < pathArr.length; j++) { | ||
| 930 | + var distance = AMap.GeometryUtil.distance(pathArr[i], pathArr[j]); | ||
| 931 | + if (distance > maxDistance) { | ||
| 932 | + maxDistance = distance; | ||
| 933 | + maxPointIndex = [i, j]; | ||
| 934 | + } | ||
| 927 | } | 935 | } |
| 928 | } | 936 | } |
| 929 | - } | ||
| 930 | 937 | ||
| 931 | - if(_this.nowPolygon!=null){ | ||
| 932 | - // 通过最大距离的点索引获取对应的点坐标 | ||
| 933 | - let mybounds = new AMap.Bounds(pathArr[maxPointIndex[0]],pathArr[maxPointIndex[1]]); | ||
| 934 | - // 设置地图显示范围 | ||
| 935 | - _this.map.setBounds(mybounds); | 938 | + if(_this.nowPolygon!=null){ |
| 939 | + // 通过最大距离的点索引获取对应的点坐标 | ||
| 940 | + let mybounds = new AMap.Bounds(pathArr[maxPointIndex[0]],pathArr[maxPointIndex[1]]); | ||
| 941 | + // 设置地图显示范围 | ||
| 942 | + _this.map.setBounds(mybounds); | ||
| 943 | + } | ||
| 944 | + //将经纬度存到form中 | ||
| 945 | + _this.form.electronicFence = pathArr.join(";"); | ||
| 946 | + _this.polyEditor.close(); | ||
| 936 | } | 947 | } |
| 937 | - //将经纬度存到form中 | ||
| 938 | - _this.form.electronicFence = pathArr.join(";"); | ||
| 939 | - _this.polyEditor.close(); | ||
| 940 | - } | ||
| 941 | - }); | ||
| 942 | - }) | 948 | + }); |
| 949 | + }) | ||
| 943 | 950 | ||
| 944 | - if(_this.nowPolygon===null){ | ||
| 945 | - _this.polyEditor.close(); | ||
| 946 | - _this.polyEditor.setTarget(); | ||
| 947 | - _this.polyEditor.open(); | 951 | + if(_this.nowPolygon===null){ |
| 952 | + _this.polyEditor.close(); | ||
| 953 | + _this.polyEditor.setTarget(); | ||
| 954 | + _this.polyEditor.open(); | ||
| 955 | + } | ||
| 948 | } | 956 | } |
| 949 | 957 | ||
| 958 | + if(type==="address" && _this.form.addressGps.indexOf(",")>=0){ | ||
| 959 | + let lng = _this.form.addressGps.split(",")[0]; | ||
| 960 | + let lat = _this.form.addressGps.split(",")[1]; | ||
| 961 | + //清除marker | ||
| 962 | + if (_this.searchMarker){ | ||
| 963 | + _this.map.remove(_this.searchMarker) | ||
| 964 | + } | ||
| 965 | + //设置marker | ||
| 966 | + _this.searchMarker = new AMap.Marker({ | ||
| 967 | + map: this.map, | ||
| 968 | + position: [lng, lat], | ||
| 969 | + }); | ||
| 970 | + //定位 | ||
| 971 | + _this.map.setCenter([lng, lat]) | ||
| 972 | + // 自动适应显示想显示的范围区域 | ||
| 973 | + _this.map.setFitView(); | ||
| 974 | + } | ||
| 950 | 975 | ||
| 951 | }).catch(e => { | 976 | }).catch(e => { |
| 952 | console.log(e); | 977 | console.log(e); |
| @@ -965,19 +990,20 @@ export default { | @@ -965,19 +990,20 @@ export default { | ||
| 965 | this.polyEditor.open(); | 990 | this.polyEditor.open(); |
| 966 | }, | 991 | }, |
| 967 | draw(){ | 992 | draw(){ |
| 968 | - if(this.polyEditor!=null){ | ||
| 969 | - if(this.form.electronicFence==null){ | ||
| 970 | - // 关闭一下编辑器,防止出bug | ||
| 971 | - this.polyEditor.close(); | ||
| 972 | - // 置空编辑区即为新增 | ||
| 973 | - this.polyEditor.setTarget(); | ||
| 974 | - // 打开编辑器即可开始绘制 | ||
| 975 | - this.polyEditor.open(); | ||
| 976 | - } | ||
| 977 | - }else{ | ||
| 978 | - this.initAMap(); | ||
| 979 | - } | 993 | + // if(this.polyEditor!=null){ |
| 994 | + // if(this.form.electronicFence==null){ | ||
| 995 | + // // 关闭一下编辑器,防止出bug | ||
| 996 | + // this.polyEditor.close(); | ||
| 997 | + // // 置空编辑区即为新增 | ||
| 998 | + // this.polyEditor.setTarget(); | ||
| 999 | + // // 打开编辑器即可开始绘制 | ||
| 1000 | + // this.polyEditor.open(); | ||
| 1001 | + // } | ||
| 1002 | + // }else{ | ||
| 1003 | + | ||
| 1004 | + // } | ||
| 980 | this.openMap = true; | 1005 | this.openMap = true; |
| 1006 | + this.initAMap("draw"); | ||
| 981 | this.$alert('左键单击地图添加点,左键双击编辑,右键双击地图结束绘制', '温馨提示', { | 1007 | this.$alert('左键单击地图添加点,左键双击编辑,右键双击地图结束绘制', '温馨提示', { |
| 982 | confirmButtonText: '确定', | 1008 | confirmButtonText: '确定', |
| 983 | callback: action => { | 1009 | callback: action => { |
trash-ui/src/views/unit/disposalSite/infoEdit.vue
| @@ -5,21 +5,21 @@ | @@ -5,21 +5,21 @@ | ||
| 5 | <h3> | 5 | <h3> |
| 6 | 基础信息 | 6 | 基础信息 |
| 7 | </h3> | 7 | </h3> |
| 8 | - <el-form ref="form" :model="form" :rules="rules" label-width="80px" label-position="top"> | 8 | + <el-form ref="form" :model="form" :rules="rules" label-width="80px" label-position="top"> |
| 9 | <el-row :gutter="30"> | 9 | <el-row :gutter="30"> |
| 10 | <el-col :span="6"> | 10 | <el-col :span="6"> |
| 11 | <el-form-item label="建筑垃圾处理场所名称" prop="name"> | 11 | <el-form-item label="建筑垃圾处理场所名称" prop="name"> |
| 12 | - <el-input v-model="form.name" placeholder="请输入建筑垃圾处理场所名称" /> | 12 | + <el-input v-model="form.name" placeholder="请输入建筑垃圾处理场所名称"/> |
| 13 | </el-form-item> | 13 | </el-form-item> |
| 14 | </el-col> | 14 | </el-col> |
| 15 | <el-col :span="6"> | 15 | <el-col :span="6"> |
| 16 | <el-form-item label="证书编号" prop="certificateNumber"> | 16 | <el-form-item label="证书编号" prop="certificateNumber"> |
| 17 | - <el-input v-model="form.certificateNumber" placeholder="请输入证书编号" /> | 17 | + <el-input v-model="form.certificateNumber" placeholder="请输入证书编号"/> |
| 18 | </el-form-item> | 18 | </el-form-item> |
| 19 | </el-col> | 19 | </el-col> |
| 20 | <el-col :span="6"> | 20 | <el-col :span="6"> |
| 21 | - <el-form-item label="所在地址" prop="address"> | ||
| 22 | - <el-input v-model="form.address" placeholder="请输入所在地址" /> | 21 | + <el-form-item label="所在地址" prop="address" class="is-required"> |
| 22 | + <el-input v-model="form.address" placeholder="请输入所在地址" @focus="openMapDialog"/> | ||
| 23 | </el-form-item> | 23 | </el-form-item> |
| 24 | </el-col> | 24 | </el-col> |
| 25 | </el-row> | 25 | </el-row> |
| @@ -34,23 +34,24 @@ | @@ -34,23 +34,24 @@ | ||
| 34 | <el-col :span="6"> | 34 | <el-col :span="6"> |
| 35 | <el-form-item label="建筑垃圾处理场所类型" prop="siteType"> | 35 | <el-form-item label="建筑垃圾处理场所类型" prop="siteType"> |
| 36 | <el-select v-model="form.siteType" placeholder="请选择建筑垃圾处理场所类型" style="width: 100%"> | 36 | <el-select v-model="form.siteType" placeholder="请选择建筑垃圾处理场所类型" style="width: 100%"> |
| 37 | - <el-option label="消纳(回填)场所" value="消纳(回填)场所" /> | ||
| 38 | - <el-option label="建筑垃圾资源化处置场" value="建筑垃圾资源化处置场" /> | ||
| 39 | - <el-option label="盾构土环保处置场" value="盾构土环保处置场" /> | 37 | + <el-option label="消纳(回填)场所" value="消纳(回填)场所"/> |
| 38 | + <el-option label="建筑垃圾资源化处置场" value="建筑垃圾资源化处置场"/> | ||
| 39 | + <el-option label="盾构土环保处置场" value="盾构土环保处置场"/> | ||
| 40 | </el-select> | 40 | </el-select> |
| 41 | </el-form-item> | 41 | </el-form-item> |
| 42 | </el-col> | 42 | </el-col> |
| 43 | <el-col :span="6"> | 43 | <el-col :span="6"> |
| 44 | <el-form-item label="消纳(回填)场所工程性质" prop="engineeringProperty"> | 44 | <el-form-item label="消纳(回填)场所工程性质" prop="engineeringProperty"> |
| 45 | - <el-select v-model="form.engineeringProperty" placeholder="请选择消纳(回填)场所工程性质" style="width: 100%"> | ||
| 46 | - <el-option label="消纳(回填)场" value="消纳(回填)场" /> | ||
| 47 | - <el-option label="房建市政工程" value="房建市政工程" /> | ||
| 48 | - <el-option label="交通工程" value="交通工程" /> | ||
| 49 | - <el-option label="水利工程" value="水利工程" /> | ||
| 50 | - <el-option label="国有土地整理" value="国有土地整理" /> | ||
| 51 | - <el-option label="平场工程" value="平场工程" /> | ||
| 52 | - <el-option label="生态修复" value="生态修复" /> | ||
| 53 | - <el-option label="覆绿造景工程" value="覆绿造景工程" /> | 45 | + <el-select v-model="form.engineeringProperty" placeholder="请选择消纳(回填)场所工程性质" |
| 46 | + style="width: 100%"> | ||
| 47 | + <el-option label="消纳(回填)场" value="消纳(回填)场"/> | ||
| 48 | + <el-option label="房建市政工程" value="房建市政工程"/> | ||
| 49 | + <el-option label="交通工程" value="交通工程"/> | ||
| 50 | + <el-option label="水利工程" value="水利工程"/> | ||
| 51 | + <el-option label="国有土地整理" value="国有土地整理"/> | ||
| 52 | + <el-option label="平场工程" value="平场工程"/> | ||
| 53 | + <el-option label="生态修复" value="生态修复"/> | ||
| 54 | + <el-option label="覆绿造景工程" value="覆绿造景工程"/> | ||
| 54 | </el-select> | 55 | </el-select> |
| 55 | </el-form-item> | 56 | </el-form-item> |
| 56 | </el-col> | 57 | </el-col> |
| @@ -59,9 +60,9 @@ | @@ -59,9 +60,9 @@ | ||
| 59 | <el-col :span="6"> | 60 | <el-col :span="6"> |
| 60 | <el-form-item label="作业区域" prop="operatingArea"> | 61 | <el-form-item label="作业区域" prop="operatingArea"> |
| 61 | <el-select v-model="form.operatingArea" placeholder="请选择作业区域" style="width: 100%"> | 62 | <el-select v-model="form.operatingArea" placeholder="请选择作业区域" style="width: 100%"> |
| 62 | - <el-option label="核心区域" value="核心区域" /> | ||
| 63 | - <el-option label="中心区域" value="中心区域" /> | ||
| 64 | - <el-option label="外环区域" value="外环区域" /> | 63 | + <el-option label="核心区域" value="核心区域"/> |
| 64 | + <el-option label="中心区域" value="中心区域"/> | ||
| 65 | + <el-option label="外环区域" value="外环区域"/> | ||
| 65 | </el-select> | 66 | </el-select> |
| 66 | </el-form-item> | 67 | </el-form-item> |
| 67 | </el-col> | 68 | </el-col> |
| @@ -72,19 +73,20 @@ | @@ -72,19 +73,20 @@ | ||
| 72 | </el-col> | 73 | </el-col> |
| 73 | <el-col :span="6"> | 74 | <el-col :span="6"> |
| 74 | <el-form-item label="建设(施工)单位名称" prop="constructionUnit"> | 75 | <el-form-item label="建设(施工)单位名称" prop="constructionUnit"> |
| 75 | - <el-input v-model="form.constructionUnit" placeholder="请输入建设(施工)单位名称" /> | 76 | + <el-input v-model="form.constructionUnit" placeholder="请输入建设(施工)单位名称"/> |
| 76 | </el-form-item> | 77 | </el-form-item> |
| 77 | </el-col> | 78 | </el-col> |
| 78 | </el-row> | 79 | </el-row> |
| 79 | <el-row :gutter="30"> | 80 | <el-row :gutter="30"> |
| 80 | <el-col :span="6"> | 81 | <el-col :span="6"> |
| 81 | <el-form-item label="建设(施工)单位责任人" prop="constructionUnitPerson"> | 82 | <el-form-item label="建设(施工)单位责任人" prop="constructionUnitPerson"> |
| 82 | - <el-input v-model="form.constructionUnitPerson" placeholder="请输入建设(施工)单位责任人" /> | 83 | + <el-input v-model="form.constructionUnitPerson" placeholder="请输入建设(施工)单位责任人"/> |
| 83 | </el-form-item> | 84 | </el-form-item> |
| 84 | </el-col> | 85 | </el-col> |
| 85 | <el-col :span="6"> | 86 | <el-col :span="6"> |
| 86 | <el-form-item label="责任人联系电话" prop="constructionUnitPersonPhone"> | 87 | <el-form-item label="责任人联系电话" prop="constructionUnitPersonPhone"> |
| 87 | - <el-input v-model="form.constructionUnitPersonPhone" placeholder="请输入责任人联系电话" :maxlength="11" show-word-limit/> | 88 | + <el-input v-model="form.constructionUnitPersonPhone" placeholder="请输入责任人联系电话" :maxlength="11" |
| 89 | + show-word-limit/> | ||
| 88 | </el-form-item> | 90 | </el-form-item> |
| 89 | </el-col> | 91 | </el-col> |
| 90 | <el-col :span="6"> | 92 | <el-col :span="6"> |
| @@ -115,7 +117,7 @@ | @@ -115,7 +117,7 @@ | ||
| 115 | </el-col> | 117 | </el-col> |
| 116 | <el-col :span="6"> | 118 | <el-col :span="6"> |
| 117 | <el-form-item label="审批方量(m³)" prop="squareMeasure"> | 119 | <el-form-item label="审批方量(m³)" prop="squareMeasure"> |
| 118 | - <el-input v-model="form.squareMeasure" placeholder="请输入审批方量(m³)" /> | 120 | + <el-input v-model="form.squareMeasure" placeholder="请输入审批方量(m³)"/> |
| 119 | </el-form-item> | 121 | </el-form-item> |
| 120 | </el-col> | 122 | </el-col> |
| 121 | </el-row> | 123 | </el-row> |
| @@ -126,18 +128,18 @@ | @@ -126,18 +128,18 @@ | ||
| 126 | <el-col :span="6"> | 128 | <el-col :span="6"> |
| 127 | <el-form-item label="洗车作业设施" prop="carWashingFacilities"> | 129 | <el-form-item label="洗车作业设施" prop="carWashingFacilities"> |
| 128 | <el-select v-model="form.carWashingFacilities" placeholder="请选择洗车作业设施" style="width: 100%"> | 130 | <el-select v-model="form.carWashingFacilities" placeholder="请选择洗车作业设施" style="width: 100%"> |
| 129 | - <el-option label="钢架洗车平台" value="钢架洗车平台" /> | ||
| 130 | - <el-option label="钢架洗车平台、过水槽" value="钢架洗车平台、过水槽" /> | ||
| 131 | - <el-option label="全自动洗车平台、过水槽" value="全自动洗车平台、过水槽" /> | ||
| 132 | - <el-option label="特殊事项" value="特殊事项" /> | 131 | + <el-option label="钢架洗车平台" value="钢架洗车平台"/> |
| 132 | + <el-option label="钢架洗车平台、过水槽" value="钢架洗车平台、过水槽"/> | ||
| 133 | + <el-option label="全自动洗车平台、过水槽" value="全自动洗车平台、过水槽"/> | ||
| 134 | + <el-option label="特殊事项" value="特殊事项"/> | ||
| 133 | </el-select> | 135 | </el-select> |
| 134 | </el-form-item> | 136 | </el-form-item> |
| 135 | </el-col> | 137 | </el-col> |
| 136 | <el-col :span="6"> | 138 | <el-col :span="6"> |
| 137 | <el-form-item label="出口道路状况" prop="exitRoadCondition"> | 139 | <el-form-item label="出口道路状况" prop="exitRoadCondition"> |
| 138 | <el-select v-model="form.exitRoadCondition" placeholder="请选择出口道路状况" style="width: 100%"> | 140 | <el-select v-model="form.exitRoadCondition" placeholder="请选择出口道路状况" style="width: 100%"> |
| 139 | - <el-option label="硬化" value="硬化" /> | ||
| 140 | - <el-option label="未硬化" value="未硬化" /> | 141 | + <el-option label="硬化" value="硬化"/> |
| 142 | + <el-option label="未硬化" value="未硬化"/> | ||
| 141 | </el-select> | 143 | </el-select> |
| 142 | </el-form-item> | 144 | </el-form-item> |
| 143 | </el-col> | 145 | </el-col> |
| @@ -146,18 +148,18 @@ | @@ -146,18 +148,18 @@ | ||
| 146 | <el-col :span="6"> | 148 | <el-col :span="6"> |
| 147 | <el-form-item label="照明设施" prop="lightingFacility"> | 149 | <el-form-item label="照明设施" prop="lightingFacility"> |
| 148 | <el-select v-model="form.lightingFacility" placeholder="请选择照明设施" style="width: 100%"> | 150 | <el-select v-model="form.lightingFacility" placeholder="请选择照明设施" style="width: 100%"> |
| 149 | - <el-option label="有" value="有" /> | ||
| 150 | - <el-option label="无" value="无" /> | ||
| 151 | - <el-option label="不适用" value="不适用" /> | 151 | + <el-option label="有" value="有"/> |
| 152 | + <el-option label="无" value="无"/> | ||
| 153 | + <el-option label="不适用" value="不适用"/> | ||
| 152 | </el-select> | 154 | </el-select> |
| 153 | </el-form-item> | 155 | </el-form-item> |
| 154 | </el-col> | 156 | </el-col> |
| 155 | <el-col :span="6"> | 157 | <el-col :span="6"> |
| 156 | <el-form-item label="视频监控设施" prop="videoSurveillanceFacility"> | 158 | <el-form-item label="视频监控设施" prop="videoSurveillanceFacility"> |
| 157 | <el-select v-model="form.videoSurveillanceFacility" placeholder="请选择视频监控设施" style="width: 100%"> | 159 | <el-select v-model="form.videoSurveillanceFacility" placeholder="请选择视频监控设施" style="width: 100%"> |
| 158 | - <el-option label="有" value="有" /> | ||
| 159 | - <el-option label="无" value="无" /> | ||
| 160 | - <el-option label="不适用" value="不适用" /> | 160 | + <el-option label="有" value="有"/> |
| 161 | + <el-option label="无" value="无"/> | ||
| 162 | + <el-option label="不适用" value="不适用"/> | ||
| 161 | </el-select> | 163 | </el-select> |
| 162 | </el-form-item> | 164 | </el-form-item> |
| 163 | </el-col> | 165 | </el-col> |
| @@ -165,19 +167,17 @@ | @@ -165,19 +167,17 @@ | ||
| 165 | <el-row :gutter="30"> | 167 | <el-row :gutter="30"> |
| 166 | <el-col :span="6"> | 168 | <el-col :span="6"> |
| 167 | <el-form-item label="填表人" prop="preparer"> | 169 | <el-form-item label="填表人" prop="preparer"> |
| 168 | - <el-input v-model="form.preparer" placeholder="请输入填表人" /> | 170 | + <el-input v-model="form.preparer" placeholder="请输入填表人"/> |
| 169 | </el-form-item> | 171 | </el-form-item> |
| 170 | </el-col> | 172 | </el-col> |
| 171 | <el-col :span="6"> | 173 | <el-col :span="6"> |
| 172 | <el-form-item label="办理意见" prop="handlingAdvice"> | 174 | <el-form-item label="办理意见" prop="handlingAdvice"> |
| 173 | - <el-input v-model="form.handlingAdvice" placeholder="请输入内容" /> | 175 | + <el-input v-model="form.handlingAdvice" placeholder="请输入内容"/> |
| 174 | </el-form-item> | 176 | </el-form-item> |
| 175 | </el-col> | 177 | </el-col> |
| 176 | </el-row> | 178 | </el-row> |
| 177 | 179 | ||
| 178 | 180 | ||
| 179 | - | ||
| 180 | - | ||
| 181 | <!-- <el-form-item label="消纳来源" prop="absorbSource">--> | 181 | <!-- <el-form-item label="消纳来源" prop="absorbSource">--> |
| 182 | <!-- <el-input v-model="form.absorbSource" placeholder="请输入消纳来源" />--> | 182 | <!-- <el-input v-model="form.absorbSource" placeholder="请输入消纳来源" />--> |
| 183 | <!-- </el-form-item>--> | 183 | <!-- </el-form-item>--> |
| @@ -226,7 +226,9 @@ | @@ -226,7 +226,9 @@ | ||
| 226 | <div class="upload_btn"> | 226 | <div class="upload_btn"> |
| 227 | <div v-for="(item,index) in approvalDocument"> | 227 | <div v-for="(item,index) in approvalDocument"> |
| 228 | <div v-if="!/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_image"> | 228 | <div v-if="!/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_image"> |
| 229 | - <div class="upload_close" @click="approvalDocument.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div> | 229 | + <div class="upload_close" @click="approvalDocument.splice(index,1);"> |
| 230 | + <el-icon class="el-icon-error"></el-icon> | ||
| 231 | + </div> | ||
| 230 | <el-image | 232 | <el-image |
| 231 | style="width: 110px; height: 95px; margin: 5px;float:left;" | 233 | style="width: 110px; height: 95px; margin: 5px;float:left;" |
| 232 | :src="createUrl(item)" | 234 | :src="createUrl(item)" |
| @@ -234,10 +236,15 @@ | @@ -234,10 +236,15 @@ | ||
| 234 | :z-index="999"> | 236 | :z-index="999"> |
| 235 | </el-image> | 237 | </el-image> |
| 236 | </div> | 238 | </div> |
| 237 | - <div v-if="/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_file"> | ||
| 238 | - <div class="upload_close_file" @click="approvalDocument.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div> | ||
| 239 | - <span @click="tempDownload(item)"><el-icon class="el-icon-document-add" style="font-size:70px;"></el-icon></span> | ||
| 240 | - <div style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" @click="tempDownload(item)">{{ item.name }}</div> | 239 | + <div v-if="/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_file"> |
| 240 | + <div class="upload_close_file" @click="approvalDocument.splice(index,1);"> | ||
| 241 | + <el-icon class="el-icon-error"></el-icon> | ||
| 242 | + </div> | ||
| 243 | + <span @click="tempDownload(item)"><el-icon class="el-icon-document-add" | ||
| 244 | + style="font-size:70px;"></el-icon></span> | ||
| 245 | + <div style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" @click="tempDownload(item)"> | ||
| 246 | + {{ item.name }} | ||
| 247 | + </div> | ||
| 241 | </div> | 248 | </div> |
| 242 | </div> | 249 | </div> |
| 243 | </div> | 250 | </div> |
| @@ -264,7 +271,9 @@ | @@ -264,7 +271,9 @@ | ||
| 264 | <div class="upload_btn"> | 271 | <div class="upload_btn"> |
| 265 | <div v-for="(item,index) in approvalData"> | 272 | <div v-for="(item,index) in approvalData"> |
| 266 | <div v-if="!/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_image"> | 273 | <div v-if="!/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_image"> |
| 267 | - <div class="upload_close" @click="approvalData.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div> | 274 | + <div class="upload_close" @click="approvalData.splice(index,1);"> |
| 275 | + <el-icon class="el-icon-error"></el-icon> | ||
| 276 | + </div> | ||
| 268 | <el-image | 277 | <el-image |
| 269 | style="width: 110px; height: 95px; margin: 5px;float:left;" | 278 | style="width: 110px; height: 95px; margin: 5px;float:left;" |
| 270 | :src="createUrl(item)" | 279 | :src="createUrl(item)" |
| @@ -272,10 +281,15 @@ | @@ -272,10 +281,15 @@ | ||
| 272 | :z-index="999"> | 281 | :z-index="999"> |
| 273 | </el-image> | 282 | </el-image> |
| 274 | </div> | 283 | </div> |
| 275 | - <div v-if="/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_file"> | ||
| 276 | - <div class="upload_close_file" @click="approvalData.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div> | ||
| 277 | - <span @click="tempDownload(item)"><el-icon class="el-icon-document-add" style="font-size:70px;"></el-icon></span> | ||
| 278 | - <div style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" @click="tempDownload(item)">{{ item.name }}</div> | 284 | + <div v-if="/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_file"> |
| 285 | + <div class="upload_close_file" @click="approvalData.splice(index,1);"> | ||
| 286 | + <el-icon class="el-icon-error"></el-icon> | ||
| 287 | + </div> | ||
| 288 | + <span @click="tempDownload(item)"><el-icon class="el-icon-document-add" | ||
| 289 | + style="font-size:70px;"></el-icon></span> | ||
| 290 | + <div style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" @click="tempDownload(item)"> | ||
| 291 | + {{ item.name }} | ||
| 292 | + </div> | ||
| 279 | </div> | 293 | </div> |
| 280 | </div> | 294 | </div> |
| 281 | </div> | 295 | </div> |
| @@ -302,7 +316,9 @@ | @@ -302,7 +316,9 @@ | ||
| 302 | <div class="upload_btn"> | 316 | <div class="upload_btn"> |
| 303 | <div v-for="(item,index) in scenePhoto"> | 317 | <div v-for="(item,index) in scenePhoto"> |
| 304 | <div v-if="!/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_image"> | 318 | <div v-if="!/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_image"> |
| 305 | - <div class="upload_close" @click="scenePhoto.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div> | 319 | + <div class="upload_close" @click="scenePhoto.splice(index,1);"> |
| 320 | + <el-icon class="el-icon-error"></el-icon> | ||
| 321 | + </div> | ||
| 306 | <el-image | 322 | <el-image |
| 307 | style="width: 110px; height: 95px; margin: 5px;float:left;" | 323 | style="width: 110px; height: 95px; margin: 5px;float:left;" |
| 308 | :src="createUrl(item)" | 324 | :src="createUrl(item)" |
| @@ -310,10 +326,15 @@ | @@ -310,10 +326,15 @@ | ||
| 310 | :z-index="999"> | 326 | :z-index="999"> |
| 311 | </el-image> | 327 | </el-image> |
| 312 | </div> | 328 | </div> |
| 313 | - <div v-if="/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_file"> | ||
| 314 | - <div class="upload_close_file" @click="scenePhoto.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div> | ||
| 315 | - <span @click="tempDownload(item)"><el-icon class="el-icon-document-add" style="font-size:70px;"></el-icon></span> | ||
| 316 | - <div style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" @click="tempDownload(item)">{{ item.name }}</div> | 329 | + <div v-if="/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_file"> |
| 330 | + <div class="upload_close_file" @click="scenePhoto.splice(index,1);"> | ||
| 331 | + <el-icon class="el-icon-error"></el-icon> | ||
| 332 | + </div> | ||
| 333 | + <span @click="tempDownload(item)"><el-icon class="el-icon-document-add" | ||
| 334 | + style="font-size:70px;"></el-icon></span> | ||
| 335 | + <div style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" @click="tempDownload(item)"> | ||
| 336 | + {{ item.name }} | ||
| 337 | + </div> | ||
| 317 | </div> | 338 | </div> |
| 318 | </div> | 339 | </div> |
| 319 | </div> | 340 | </div> |
| @@ -340,7 +361,9 @@ | @@ -340,7 +361,9 @@ | ||
| 340 | <div class="upload_btn"> | 361 | <div class="upload_btn"> |
| 341 | <div v-for="(item,index) in carWashingFacilitiesImage"> | 362 | <div v-for="(item,index) in carWashingFacilitiesImage"> |
| 342 | <div v-if="!/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_image"> | 363 | <div v-if="!/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_image"> |
| 343 | - <div class="upload_close" @click="carWashingFacilitiesImage.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div> | 364 | + <div class="upload_close" @click="carWashingFacilitiesImage.splice(index,1);"> |
| 365 | + <el-icon class="el-icon-error"></el-icon> | ||
| 366 | + </div> | ||
| 344 | <el-image | 367 | <el-image |
| 345 | style="width: 110px; height: 95px; margin: 5px;float:left;" | 368 | style="width: 110px; height: 95px; margin: 5px;float:left;" |
| 346 | :src="createUrl(item)" | 369 | :src="createUrl(item)" |
| @@ -348,10 +371,15 @@ | @@ -348,10 +371,15 @@ | ||
| 348 | :z-index="999"> | 371 | :z-index="999"> |
| 349 | </el-image> | 372 | </el-image> |
| 350 | </div> | 373 | </div> |
| 351 | - <div v-if="/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_file"> | ||
| 352 | - <div class="upload_close_file" @click="carWashingFacilitiesImage.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div> | ||
| 353 | - <span @click="tempDownload(item)"><el-icon class="el-icon-document-add" style="font-size:70px;"></el-icon></span> | ||
| 354 | - <div style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" @click="tempDownload(item)">{{ item.name }}</div> | 374 | + <div v-if="/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_file"> |
| 375 | + <div class="upload_close_file" @click="carWashingFacilitiesImage.splice(index,1);"> | ||
| 376 | + <el-icon class="el-icon-error"></el-icon> | ||
| 377 | + </div> | ||
| 378 | + <span @click="tempDownload(item)"><el-icon class="el-icon-document-add" | ||
| 379 | + style="font-size:70px;"></el-icon></span> | ||
| 380 | + <div style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" @click="tempDownload(item)"> | ||
| 381 | + {{ item.name }} | ||
| 382 | + </div> | ||
| 355 | </div> | 383 | </div> |
| 356 | </div> | 384 | </div> |
| 357 | </div> | 385 | </div> |
| @@ -378,7 +406,9 @@ | @@ -378,7 +406,9 @@ | ||
| 378 | <div class="upload_btn"> | 406 | <div class="upload_btn"> |
| 379 | <div v-for="(item,index) in safetyAssessmentReport"> | 407 | <div v-for="(item,index) in safetyAssessmentReport"> |
| 380 | <div v-if="!/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_image"> | 408 | <div v-if="!/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_image"> |
| 381 | - <div class="upload_close" @click="safetyAssessmentReport.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div> | 409 | + <div class="upload_close" @click="safetyAssessmentReport.splice(index,1);"> |
| 410 | + <el-icon class="el-icon-error"></el-icon> | ||
| 411 | + </div> | ||
| 382 | <el-image | 412 | <el-image |
| 383 | style="width: 110px; height: 95px; margin: 5px;float:left;" | 413 | style="width: 110px; height: 95px; margin: 5px;float:left;" |
| 384 | :src="createUrl(item)" | 414 | :src="createUrl(item)" |
| @@ -386,10 +416,15 @@ | @@ -386,10 +416,15 @@ | ||
| 386 | :z-index="999"> | 416 | :z-index="999"> |
| 387 | </el-image> | 417 | </el-image> |
| 388 | </div> | 418 | </div> |
| 389 | - <div v-if="/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_file"> | ||
| 390 | - <div class="upload_close_file" @click="safetyAssessmentReport.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div> | ||
| 391 | - <span @click="tempDownload(item)"><el-icon class="el-icon-document-add" style="font-size:70px;"></el-icon></span> | ||
| 392 | - <div style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" @click="tempDownload(item)">{{ item.name }}</div> | 419 | + <div v-if="/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_file"> |
| 420 | + <div class="upload_close_file" @click="safetyAssessmentReport.splice(index,1);"> | ||
| 421 | + <el-icon class="el-icon-error"></el-icon> | ||
| 422 | + </div> | ||
| 423 | + <span @click="tempDownload(item)"><el-icon class="el-icon-document-add" | ||
| 424 | + style="font-size:70px;"></el-icon></span> | ||
| 425 | + <div style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" @click="tempDownload(item)"> | ||
| 426 | + {{ item.name }} | ||
| 427 | + </div> | ||
| 393 | </div> | 428 | </div> |
| 394 | </div> | 429 | </div> |
| 395 | </div> | 430 | </div> |
| @@ -416,7 +451,9 @@ | @@ -416,7 +451,9 @@ | ||
| 416 | <div class="upload_btn"> | 451 | <div class="upload_btn"> |
| 417 | <div v-for="(item,index) in environmentalApproval"> | 452 | <div v-for="(item,index) in environmentalApproval"> |
| 418 | <div v-if="!/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_image"> | 453 | <div v-if="!/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_image"> |
| 419 | - <div class="upload_close" @click="environmentalApproval.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div> | 454 | + <div class="upload_close" @click="environmentalApproval.splice(index,1);"> |
| 455 | + <el-icon class="el-icon-error"></el-icon> | ||
| 456 | + </div> | ||
| 420 | <el-image | 457 | <el-image |
| 421 | style="width: 110px; height: 95px; margin: 5px;float:left;" | 458 | style="width: 110px; height: 95px; margin: 5px;float:left;" |
| 422 | :src="createUrl(item)" | 459 | :src="createUrl(item)" |
| @@ -424,10 +461,15 @@ | @@ -424,10 +461,15 @@ | ||
| 424 | :z-index="999"> | 461 | :z-index="999"> |
| 425 | </el-image> | 462 | </el-image> |
| 426 | </div> | 463 | </div> |
| 427 | - <div v-if="/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_file"> | ||
| 428 | - <div class="upload_close_file" @click="environmentalApproval.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div> | ||
| 429 | - <span @click="tempDownload(item)"><el-icon class="el-icon-document-add" style="font-size:70px;"></el-icon></span> | ||
| 430 | - <div style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" @click="tempDownload(item)">{{ item.name }}</div> | 464 | + <div v-if="/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_file"> |
| 465 | + <div class="upload_close_file" @click="environmentalApproval.splice(index,1);"> | ||
| 466 | + <el-icon class="el-icon-error"></el-icon> | ||
| 467 | + </div> | ||
| 468 | + <span @click="tempDownload(item)"><el-icon class="el-icon-document-add" | ||
| 469 | + style="font-size:70px;"></el-icon></span> | ||
| 470 | + <div style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" @click="tempDownload(item)"> | ||
| 471 | + {{ item.name }} | ||
| 472 | + </div> | ||
| 431 | </div> | 473 | </div> |
| 432 | </div> | 474 | </div> |
| 433 | </div> | 475 | </div> |
| @@ -454,7 +496,9 @@ | @@ -454,7 +496,9 @@ | ||
| 454 | <div class="upload_btn"> | 496 | <div class="upload_btn"> |
| 455 | <div v-for="(item,index) in authorization"> | 497 | <div v-for="(item,index) in authorization"> |
| 456 | <div v-if="!/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_image"> | 498 | <div v-if="!/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_image"> |
| 457 | - <div class="upload_close" @click="authorization.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div> | 499 | + <div class="upload_close" @click="authorization.splice(index,1);"> |
| 500 | + <el-icon class="el-icon-error"></el-icon> | ||
| 501 | + </div> | ||
| 458 | <el-image | 502 | <el-image |
| 459 | style="width: 110px; height: 95px; margin: 5px;float:left;" | 503 | style="width: 110px; height: 95px; margin: 5px;float:left;" |
| 460 | :src="createUrl(item)" | 504 | :src="createUrl(item)" |
| @@ -462,10 +506,15 @@ | @@ -462,10 +506,15 @@ | ||
| 462 | :z-index="999"> | 506 | :z-index="999"> |
| 463 | </el-image> | 507 | </el-image> |
| 464 | </div> | 508 | </div> |
| 465 | - <div v-if="/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_file"> | ||
| 466 | - <div class="upload_close_file" @click="authorization.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div> | ||
| 467 | - <span @click="tempDownload(item)"><el-icon class="el-icon-document-add" style="font-size:70px;"></el-icon></span> | ||
| 468 | - <div style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" @click="tempDownload(item)">{{ item.name }}</div> | 509 | + <div v-if="/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_file"> |
| 510 | + <div class="upload_close_file" @click="authorization.splice(index,1);"> | ||
| 511 | + <el-icon class="el-icon-error"></el-icon> | ||
| 512 | + </div> | ||
| 513 | + <span @click="tempDownload(item)"><el-icon class="el-icon-document-add" | ||
| 514 | + style="font-size:70px;"></el-icon></span> | ||
| 515 | + <div style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" @click="tempDownload(item)"> | ||
| 516 | + {{ item.name }} | ||
| 517 | + </div> | ||
| 469 | </div> | 518 | </div> |
| 470 | </div> | 519 | </div> |
| 471 | </div> | 520 | </div> |
| @@ -492,7 +541,9 @@ | @@ -492,7 +541,9 @@ | ||
| 492 | <div class="upload_btn"> | 541 | <div class="upload_btn"> |
| 493 | <div v-for="(item,index) in otherInformation"> | 542 | <div v-for="(item,index) in otherInformation"> |
| 494 | <div v-if="!/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_image"> | 543 | <div v-if="!/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_image"> |
| 495 | - <div class="upload_close" @click="otherInformation.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div> | 544 | + <div class="upload_close" @click="otherInformation.splice(index,1);"> |
| 545 | + <el-icon class="el-icon-error"></el-icon> | ||
| 546 | + </div> | ||
| 496 | <el-image | 547 | <el-image |
| 497 | style="width: 110px; height: 95px; margin: 5px;float:left;" | 548 | style="width: 110px; height: 95px; margin: 5px;float:left;" |
| 498 | :src="createUrl(item)" | 549 | :src="createUrl(item)" |
| @@ -500,10 +551,15 @@ | @@ -500,10 +551,15 @@ | ||
| 500 | :z-index="999"> | 551 | :z-index="999"> |
| 501 | </el-image> | 552 | </el-image> |
| 502 | </div> | 553 | </div> |
| 503 | - <div v-if="/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_file"> | ||
| 504 | - <div class="upload_close_file" @click="otherInformation.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div> | ||
| 505 | - <span @click="tempDownload(item)"><el-icon class="el-icon-document-add" style="font-size:70px;"></el-icon></span> | ||
| 506 | - <div style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" @click="tempDownload(item)">{{ item.name }}</div> | 554 | + <div v-if="/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_file"> |
| 555 | + <div class="upload_close_file" @click="otherInformation.splice(index,1);"> | ||
| 556 | + <el-icon class="el-icon-error"></el-icon> | ||
| 557 | + </div> | ||
| 558 | + <span @click="tempDownload(item)"><el-icon class="el-icon-document-add" | ||
| 559 | + style="font-size:70px;"></el-icon></span> | ||
| 560 | + <div style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" @click="tempDownload(item)"> | ||
| 561 | + {{ item.name }} | ||
| 562 | + </div> | ||
| 507 | </div> | 563 | </div> |
| 508 | </div> | 564 | </div> |
| 509 | </div> | 565 | </div> |
| @@ -575,7 +631,7 @@ | @@ -575,7 +631,7 @@ | ||
| 575 | </template> | 631 | </template> |
| 576 | 632 | ||
| 577 | <script> | 633 | <script> |
| 578 | -import { listDisposalSite, getDisposalSite, delDisposalSite, addDisposalSite, updateDisposalSite, exportDisposalSite } from "@/api/unit/disposalSite"; | 634 | +import {addDisposalSite, getDisposalSite, updateDisposalSite} from "@/api/unit/disposalSite"; |
| 579 | import Treeselect from "@riophae/vue-treeselect"; | 635 | import Treeselect from "@riophae/vue-treeselect"; |
| 580 | import '@riophae/vue-treeselect/dist/vue-treeselect.css' | 636 | import '@riophae/vue-treeselect/dist/vue-treeselect.css' |
| 581 | import {getAreaList} from "@/api/casefile/remoteServer"; | 637 | import {getAreaList} from "@/api/casefile/remoteServer"; |
| @@ -587,7 +643,7 @@ window._AMapSecurityConfig = { | @@ -587,7 +643,7 @@ window._AMapSecurityConfig = { | ||
| 587 | } | 643 | } |
| 588 | export default { | 644 | export default { |
| 589 | name: "DisposalSite", | 645 | name: "DisposalSite", |
| 590 | - components: {Treeselect,AMapLoader}, | 646 | + components: {Treeselect, AMapLoader}, |
| 591 | data() { | 647 | data() { |
| 592 | return { | 648 | return { |
| 593 | // 遮罩层 | 649 | // 遮罩层 |
| @@ -613,31 +669,28 @@ export default { | @@ -613,31 +669,28 @@ export default { | ||
| 613 | // 表单校验 | 669 | // 表单校验 |
| 614 | rules: { | 670 | rules: { |
| 615 | name: [ | 671 | name: [ |
| 616 | - { required: true, message: "请输入处置场所名称", trigger: "blur" }, | ||
| 617 | - ], | ||
| 618 | - address: [ | ||
| 619 | - { required: true, message: "请输入处置场所地址", trigger: "blur" }, | 672 | + {required: true, message: "请输入处置场所名称", trigger: "blur"}, |
| 620 | ], | 673 | ], |
| 621 | localArea: [ | 674 | localArea: [ |
| 622 | - { required: true, message: "请选择所属区域", trigger: "blur" }, | 675 | + {required: true, message: "请选择所属区域", trigger: "blur"}, |
| 623 | ], | 676 | ], |
| 624 | siteType: [ | 677 | siteType: [ |
| 625 | - { required: true, message: "请选择处置场所类型", trigger: "blur" }, | 678 | + {required: true, message: "请选择处置场所类型", trigger: "blur"}, |
| 626 | ], | 679 | ], |
| 627 | operatingArea: [ | 680 | operatingArea: [ |
| 628 | - { required: true, message: "请选择锁业区域", trigger: "blur" }, | 681 | + {required: true, message: "请选择锁业区域", trigger: "blur"}, |
| 629 | ], | 682 | ], |
| 630 | trashType: [ | 683 | trashType: [ |
| 631 | - { required: true, message: "请选择可受纳建筑垃圾类型", trigger: "blur" }, | 684 | + {required: true, message: "请选择可受纳建筑垃圾类型", trigger: "blur"}, |
| 632 | ], | 685 | ], |
| 633 | constructionUnit: [ | 686 | constructionUnit: [ |
| 634 | - { required: true, message: "请输入建设(施工)单位", trigger: "blur" }, | 687 | + {required: true, message: "请输入建设(施工)单位", trigger: "blur"}, |
| 635 | ], | 688 | ], |
| 636 | constructionUnitPerson: [ | 689 | constructionUnitPerson: [ |
| 637 | - { required: true, message: "请输入建设(施工)单位责任人", trigger: "blur" }, | 690 | + {required: true, message: "请输入建设(施工)单位责任人", trigger: "blur"}, |
| 638 | ], | 691 | ], |
| 639 | constructionUnitPersonPhone: [ | 692 | constructionUnitPersonPhone: [ |
| 640 | - { required: true, message: "请输入责任人联系电话", trigger: "blur" }, | 693 | + {required: true, message: "请输入责任人联系电话", trigger: "blur"}, |
| 641 | { | 694 | { |
| 642 | pattern: /^1(3|4|5|7|8|9)\d{9}$/, | 695 | pattern: /^1(3|4|5|7|8|9)\d{9}$/, |
| 643 | message: '手机号格式错误', | 696 | message: '手机号格式错误', |
| @@ -645,56 +698,59 @@ export default { | @@ -645,56 +698,59 @@ export default { | ||
| 645 | } | 698 | } |
| 646 | ], | 699 | ], |
| 647 | validityBeginDate: [ | 700 | validityBeginDate: [ |
| 648 | - { required: true, message: "请选择有限期开始时间", trigger: "blur" }, | 701 | + {required: true, message: "请选择有限期开始时间", trigger: "blur"}, |
| 649 | ], | 702 | ], |
| 650 | validityEndDate: [ | 703 | validityEndDate: [ |
| 651 | - { required: true, message: "请选择有限期结束时间", trigger: "blur" }, | 704 | + {required: true, message: "请选择有限期结束时间", trigger: "blur"}, |
| 652 | ], | 705 | ], |
| 653 | electronicFence: [ | 706 | electronicFence: [ |
| 654 | - { required: true, message: "请输入电子围栏", trigger: "blur" }, | 707 | + {required: true, message: "请输入电子围栏", trigger: "blur"}, |
| 655 | ], | 708 | ], |
| 656 | squareMeasure: [ | 709 | squareMeasure: [ |
| 657 | - { required: true, message: "请输入审批方量", trigger: "blur" }, | 710 | + {required: true, message: "请输入审批方量", trigger: "blur"}, |
| 658 | ], | 711 | ], |
| 659 | carWashingFacilities: [ | 712 | carWashingFacilities: [ |
| 660 | - { required: true, message: "请选择洗车作业设施", trigger: "blur" }, | 713 | + {required: true, message: "请选择洗车作业设施", trigger: "blur"}, |
| 661 | ], | 714 | ], |
| 662 | exitRoadCondition: [ | 715 | exitRoadCondition: [ |
| 663 | - { required: true, message: "请选择出口道路状况", trigger: "blur" }, | 716 | + {required: true, message: "请选择出口道路状况", trigger: "blur"}, |
| 664 | ], | 717 | ], |
| 665 | lightingFacility: [ | 718 | lightingFacility: [ |
| 666 | - { required: true, message: "请选择照明设施", trigger: "blur" }, | 719 | + {required: true, message: "请选择照明设施", trigger: "blur"}, |
| 667 | ], | 720 | ], |
| 668 | videoSurveillanceFacility: [ | 721 | videoSurveillanceFacility: [ |
| 669 | - { required: true, message: "请选择视频监控设施", trigger: "blur" }, | 722 | + {required: true, message: "请选择视频监控设施", trigger: "blur"}, |
| 670 | ], | 723 | ], |
| 671 | preparer: [ | 724 | preparer: [ |
| 672 | - { required: true, message: "请输入填表人", trigger: "blur" }, | 725 | + {required: true, message: "请输入填表人", trigger: "blur"}, |
| 673 | ], | 726 | ], |
| 674 | handlingAdvice: [ | 727 | handlingAdvice: [ |
| 675 | - { required: true, message: "请输入办理意见", trigger: "blur" }, | 728 | + {required: true, message: "请输入办理意见", trigger: "blur"}, |
| 676 | ], | 729 | ], |
| 677 | 730 | ||
| 678 | }, | 731 | }, |
| 679 | - areas:[], | ||
| 680 | - options:[{id:1,label:"工程渣土"},{id:2,label:"工程淤泥"},{id:3,label:"盾构渣土"},{id:4,label:"拆除垃圾"},{id:5,label:"其他建筑垃圾"}], | ||
| 681 | - approvalDocument:[], | ||
| 682 | - approvalDocumentSlide:[], | ||
| 683 | - approvalData:[], | ||
| 684 | - approvalDataSlide:[], | ||
| 685 | - scenePhoto:[], | ||
| 686 | - scenePhotoSlide:[], | ||
| 687 | - carWashingFacilitiesImage:[], | ||
| 688 | - carWashingFacilitiesImageSlide:[], | ||
| 689 | - safetyAssessmentReport:[], | ||
| 690 | - safetyAssessmentReportSlide:[], | ||
| 691 | - environmentalApproval:[], | ||
| 692 | - environmentalApprovalSlide:[], | ||
| 693 | - authorization:[], | ||
| 694 | - authorizationSlide:[], | ||
| 695 | - otherInformation:[], | ||
| 696 | - otherInformationSlide:[], | ||
| 697 | - openMap:false, | 732 | + areas: [], |
| 733 | + options: [{id: 1, label: "工程渣土"}, {id: 2, label: "工程淤泥"}, {id: 3, label: "盾构渣土"}, { | ||
| 734 | + id: 4, | ||
| 735 | + label: "拆除垃圾" | ||
| 736 | + }, {id: 5, label: "其他建筑垃圾"}], | ||
| 737 | + approvalDocument: [], | ||
| 738 | + approvalDocumentSlide: [], | ||
| 739 | + approvalData: [], | ||
| 740 | + approvalDataSlide: [], | ||
| 741 | + scenePhoto: [], | ||
| 742 | + scenePhotoSlide: [], | ||
| 743 | + carWashingFacilitiesImage: [], | ||
| 744 | + carWashingFacilitiesImageSlide: [], | ||
| 745 | + safetyAssessmentReport: [], | ||
| 746 | + safetyAssessmentReportSlide: [], | ||
| 747 | + environmentalApproval: [], | ||
| 748 | + environmentalApprovalSlide: [], | ||
| 749 | + authorization: [], | ||
| 750 | + authorizationSlide: [], | ||
| 751 | + otherInformation: [], | ||
| 752 | + otherInformationSlide: [], | ||
| 753 | + openMap: false, | ||
| 698 | // 地图 | 754 | // 地图 |
| 699 | map: null, | 755 | map: null, |
| 700 | // 编辑工具 | 756 | // 编辑工具 |
| @@ -719,7 +775,12 @@ export default { | @@ -719,7 +775,12 @@ export default { | ||
| 719 | '$route.query.disposalSiteId': 'initData' | 775 | '$route.query.disposalSiteId': 'initData' |
| 720 | }, | 776 | }, |
| 721 | methods: { | 777 | methods: { |
| 722 | - reset(){ | 778 | + openMapDialog(){ |
| 779 | + this.openMap = true; | ||
| 780 | + this.initAMap("address"); | ||
| 781 | + this.keywords = this.form.address; | ||
| 782 | + }, | ||
| 783 | + reset() { | ||
| 723 | this.form = {}; | 784 | this.form = {}; |
| 724 | this.approvalDocument = []; | 785 | this.approvalDocument = []; |
| 725 | this.approvalData = []; | 786 | this.approvalData = []; |
| @@ -730,76 +791,76 @@ export default { | @@ -730,76 +791,76 @@ export default { | ||
| 730 | this.authorization = []; | 791 | this.authorization = []; |
| 731 | this.otherInformation = []; | 792 | this.otherInformation = []; |
| 732 | }, | 793 | }, |
| 733 | - initData(){ | 794 | + initData() { |
| 734 | this.reset(); | 795 | this.reset(); |
| 735 | let id = this.$route.query.disposalSiteId; | 796 | let id = this.$route.query.disposalSiteId; |
| 736 | - if(id!=null){ | 797 | + if (id != null) { |
| 737 | getDisposalSite(id).then(response => { | 798 | getDisposalSite(id).then(response => { |
| 738 | this.form = response.data; | 799 | this.form = response.data; |
| 739 | //将字符串转换为int数组 | 800 | //将字符串转换为int数组 |
| 740 | let trashTypeArr = this.form.trashType.split(",").map(str => parseInt(str, 10)); | 801 | let trashTypeArr = this.form.trashType.split(",").map(str => parseInt(str, 10)); |
| 741 | this.form.trashType = trashTypeArr; | 802 | this.form.trashType = trashTypeArr; |
| 742 | //将附件转换为前端可视化数组 | 803 | //将附件转换为前端可视化数组 |
| 743 | - if(this.form.approvalDocument!=null&&this.form.approvalDocument!==""){ | 804 | + if (this.form.approvalDocument != null && this.form.approvalDocument !== "") { |
| 744 | let approvalDocument = this.form.approvalDocument.split(";"); | 805 | let approvalDocument = this.form.approvalDocument.split(";"); |
| 745 | - approvalDocument.map(item=>{ | ||
| 746 | - let name = item.substring(item.lastIndexOf("/")+1); | ||
| 747 | - this.approvalDocument.push({name:name,url:item}) | 806 | + approvalDocument.map(item => { |
| 807 | + let name = item.substring(item.lastIndexOf("/") + 1); | ||
| 808 | + this.approvalDocument.push({name: name, url: item}) | ||
| 748 | }) | 809 | }) |
| 749 | } | 810 | } |
| 750 | - if(this.form.approvalData!=null&&this.form.approvalData!==""){ | 811 | + if (this.form.approvalData != null && this.form.approvalData !== "") { |
| 751 | let approvalData = this.form.approvalData.split(";"); | 812 | let approvalData = this.form.approvalData.split(";"); |
| 752 | - approvalData.map(item=>{ | ||
| 753 | - let name = item.substring(item.lastIndexOf("/")+1); | ||
| 754 | - this.approvalData.push({name:name,url:item}) | 813 | + approvalData.map(item => { |
| 814 | + let name = item.substring(item.lastIndexOf("/") + 1); | ||
| 815 | + this.approvalData.push({name: name, url: item}) | ||
| 755 | }) | 816 | }) |
| 756 | } | 817 | } |
| 757 | - if(this.form.scenePhoto!=null&&this.form.scenePhoto!==""){ | 818 | + if (this.form.scenePhoto != null && this.form.scenePhoto !== "") { |
| 758 | let scenePhoto = this.form.scenePhoto.split(";"); | 819 | let scenePhoto = this.form.scenePhoto.split(";"); |
| 759 | - scenePhoto.map(item=>{ | ||
| 760 | - let name = item.substring(item.lastIndexOf("/")+1); | ||
| 761 | - this.scenePhoto.push({name:name,url:item}) | 820 | + scenePhoto.map(item => { |
| 821 | + let name = item.substring(item.lastIndexOf("/") + 1); | ||
| 822 | + this.scenePhoto.push({name: name, url: item}) | ||
| 762 | }) | 823 | }) |
| 763 | } | 824 | } |
| 764 | - if(this.form.carWashingFacilitiesImage!=null&&this.form.carWashingFacilitiesImage!==""){ | 825 | + if (this.form.carWashingFacilitiesImage != null && this.form.carWashingFacilitiesImage !== "") { |
| 765 | let carWashingFacilitiesImage = this.form.carWashingFacilitiesImage.split(";"); | 826 | let carWashingFacilitiesImage = this.form.carWashingFacilitiesImage.split(";"); |
| 766 | - carWashingFacilitiesImage.map(item=>{ | ||
| 767 | - let name = item.substring(item.lastIndexOf("/")+1); | ||
| 768 | - this.carWashingFacilitiesImage.push({name:name,url:item}) | 827 | + carWashingFacilitiesImage.map(item => { |
| 828 | + let name = item.substring(item.lastIndexOf("/") + 1); | ||
| 829 | + this.carWashingFacilitiesImage.push({name: name, url: item}) | ||
| 769 | }) | 830 | }) |
| 770 | } | 831 | } |
| 771 | - if(this.form.safetyAssessmentReport!=null&&this.form.safetyAssessmentReport!==""){ | 832 | + if (this.form.safetyAssessmentReport != null && this.form.safetyAssessmentReport !== "") { |
| 772 | let safetyAssessmentReport = this.form.safetyAssessmentReport.split(";"); | 833 | let safetyAssessmentReport = this.form.safetyAssessmentReport.split(";"); |
| 773 | - safetyAssessmentReport.map(item=>{ | ||
| 774 | - let name = item.substring(item.lastIndexOf("/")+1); | ||
| 775 | - this.safetyAssessmentReport.push({name:name,url:item}) | 834 | + safetyAssessmentReport.map(item => { |
| 835 | + let name = item.substring(item.lastIndexOf("/") + 1); | ||
| 836 | + this.safetyAssessmentReport.push({name: name, url: item}) | ||
| 776 | }) | 837 | }) |
| 777 | } | 838 | } |
| 778 | - if(this.form.environmentalApproval!=null&&this.form.environmentalApproval!==""){ | 839 | + if (this.form.environmentalApproval != null && this.form.environmentalApproval !== "") { |
| 779 | let environmentalApproval = this.form.environmentalApproval.split(";"); | 840 | let environmentalApproval = this.form.environmentalApproval.split(";"); |
| 780 | - environmentalApproval.map(item=>{ | ||
| 781 | - let name = item.substring(item.lastIndexOf("/")+1); | ||
| 782 | - this.environmentalApproval.push({name:name,url:item}) | 841 | + environmentalApproval.map(item => { |
| 842 | + let name = item.substring(item.lastIndexOf("/") + 1); | ||
| 843 | + this.environmentalApproval.push({name: name, url: item}) | ||
| 783 | }) | 844 | }) |
| 784 | } | 845 | } |
| 785 | - if(this.form.authorization!=null&&this.form.authorization!==""){ | 846 | + if (this.form.authorization != null && this.form.authorization !== "") { |
| 786 | let authorization = this.form.authorization.split(";"); | 847 | let authorization = this.form.authorization.split(";"); |
| 787 | - authorization.map(item=>{ | ||
| 788 | - let name = item.substring(item.lastIndexOf("/")+1); | ||
| 789 | - this.authorization.push({name:name,url:item}) | 848 | + authorization.map(item => { |
| 849 | + let name = item.substring(item.lastIndexOf("/") + 1); | ||
| 850 | + this.authorization.push({name: name, url: item}) | ||
| 790 | }) | 851 | }) |
| 791 | } | 852 | } |
| 792 | - if(this.form.otherInformation!=null&&this.form.otherInformation!==""){ | 853 | + if (this.form.otherInformation != null && this.form.otherInformation !== "") { |
| 793 | let otherInformation = this.form.otherInformation.split(";"); | 854 | let otherInformation = this.form.otherInformation.split(";"); |
| 794 | - otherInformation.map(item=>{ | ||
| 795 | - let name = item.substring(item.lastIndexOf("/")+1); | ||
| 796 | - this.otherInformation.push({name:name,url:item}) | 855 | + otherInformation.map(item => { |
| 856 | + let name = item.substring(item.lastIndexOf("/") + 1); | ||
| 857 | + this.otherInformation.push({name: name, url: item}) | ||
| 797 | }) | 858 | }) |
| 798 | } | 859 | } |
| 799 | }); | 860 | }); |
| 800 | } | 861 | } |
| 801 | }, | 862 | }, |
| 802 | - closeMap(){ | 863 | + closeMap() { |
| 803 | this.openMap = false; | 864 | this.openMap = false; |
| 804 | this.form.electronicFence = null; | 865 | this.form.electronicFence = null; |
| 805 | //清空地图图层 | 866 | //清空地图图层 |
| @@ -809,12 +870,11 @@ export default { | @@ -809,12 +870,11 @@ export default { | ||
| 809 | currentSelect(val) { | 870 | currentSelect(val) { |
| 810 | // 清空时不执行后面代码 | 871 | // 清空时不执行后面代码 |
| 811 | if (!val) { | 872 | if (!val) { |
| 812 | - return ; | 873 | + return; |
| 813 | } | 874 | } |
| 814 | - // 自动适应显示想显示的范围区域 | ||
| 815 | - this.map.setFitView(); | 875 | + |
| 816 | //清除marker | 876 | //清除marker |
| 817 | - if (this.searchMarker){ | 877 | + if (this.searchMarker) { |
| 818 | this.map.remove(this.searchMarker) | 878 | this.map.remove(this.searchMarker) |
| 819 | } | 879 | } |
| 820 | //设置marker | 880 | //设置marker |
| @@ -826,6 +886,11 @@ export default { | @@ -826,6 +886,11 @@ export default { | ||
| 826 | this.keywords = val.name | 886 | this.keywords = val.name |
| 827 | //定位 | 887 | //定位 |
| 828 | this.map.setCenter([val.location.lng, val.location.lat]) | 888 | this.map.setCenter([val.location.lng, val.location.lat]) |
| 889 | + // 自动适应显示想显示的范围区域 | ||
| 890 | + this.map.setFitView(); | ||
| 891 | + this.form.addressGps = val.location.lng+","+val.location.lat; | ||
| 892 | + this.form.address = val.district + val.name; | ||
| 893 | + | ||
| 829 | }, | 894 | }, |
| 830 | // 搜索地址 | 895 | // 搜索地址 |
| 831 | remoteMethod(query) { | 896 | remoteMethod(query) { |
| @@ -841,13 +906,13 @@ export default { | @@ -841,13 +906,13 @@ export default { | ||
| 841 | this.mapOptions = []; | 906 | this.mapOptions = []; |
| 842 | } | 907 | } |
| 843 | }, | 908 | }, |
| 844 | - initAMap() { | 909 | + initAMap(type) { |
| 845 | const _this = this | 910 | const _this = this |
| 846 | // 加载高德地图 | 911 | // 加载高德地图 |
| 847 | AMapLoader.load({ | 912 | AMapLoader.load({ |
| 848 | key: _this.$aMapKey, //设置高德地图申请的key | 913 | key: _this.$aMapKey, //设置高德地图申请的key |
| 849 | version: "2.0", // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15 | 914 | version: "2.0", // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15 |
| 850 | - plugins: ['AMap.ToolBar', 'AMap.PolygonEditor','AMap.AutoComplete', 'AMap.PlaceSearch', 'AMap.Marker'], // 需要使用的的插件列表,如比例尺'AMap.Scale'等 | 915 | + plugins: ['AMap.ToolBar', 'AMap.PolygonEditor', 'AMap.AutoComplete', 'AMap.PlaceSearch', 'AMap.Marker'], // 需要使用的的插件列表,如比例尺'AMap.Scale'等 |
| 851 | AMapUI: { | 916 | AMapUI: { |
| 852 | version: "1.1", | 917 | version: "1.1", |
| 853 | plugins: [] | 918 | plugins: [] |
| @@ -864,10 +929,10 @@ export default { | @@ -864,10 +929,10 @@ export default { | ||
| 864 | willreadoften: true | 929 | willreadoften: true |
| 865 | }); | 930 | }); |
| 866 | 931 | ||
| 867 | - _this.AutoComplete = await new AMap.AutoComplete({city:'全国'}); | 932 | + _this.AutoComplete = await new AMap.AutoComplete({city: '全国'}); |
| 868 | 933 | ||
| 869 | // 图层样式切换控件(卫星图) | 934 | // 图层样式切换控件(卫星图) |
| 870 | - AMapUI.loadUI(['control/BasicControl'], function(BasicControl) { | 935 | + AMapUI.loadUI(['control/BasicControl'], function (BasicControl) { |
| 871 | 936 | ||
| 872 | //图层切换控件 | 937 | //图层切换控件 |
| 873 | _this.map.addControl(new BasicControl.LayerSwitcher({ | 938 | _this.map.addControl(new BasicControl.LayerSwitcher({ |
| @@ -875,78 +940,97 @@ export default { | @@ -875,78 +940,97 @@ export default { | ||
| 875 | })); | 940 | })); |
| 876 | 941 | ||
| 877 | }); | 942 | }); |
| 878 | - _this.polyEditor = new AMap.PolygonEditor(_this.map); | ||
| 879 | - if(_this.form.electronicFence!=null){ | ||
| 880 | - // 电子围栏经纬度 | ||
| 881 | - let path = _this.form.electronicFence.split(";"); | ||
| 882 | - path.map(item=>{ | ||
| 883 | - let arr = item.split(","); | ||
| 884 | - //将电子围栏经纬度转换为double类型数组 | ||
| 885 | - _this.polygonArr.push([parseFloat(arr[0]),parseFloat(arr[1])]); | ||
| 886 | - }); | ||
| 887 | - _this.nowPolygon = new AMap.Polygon({ | ||
| 888 | - path: _this.polygonArr | ||
| 889 | - }) | ||
| 890 | - _this.map.add([_this.nowPolygon]); | ||
| 891 | - _this.map.setFitView(); | ||
| 892 | - _this.polyEditor.addAdsorbPolygons([_this.nowPolygon]); | ||
| 893 | - _this.nowPolygon.on('dblclick', () => { | ||
| 894 | - _this.polyEditor.setTarget(_this.nowPolygon); | ||
| 895 | - _this.polyEditor.open(); | ||
| 896 | - }) | ||
| 897 | - } | ||
| 898 | - _this.polyEditor.on('add', function (data) { | ||
| 899 | - _this.nowPolygon = data.target; | ||
| 900 | - _this.polyEditor.addAdsorbPolygons(_this.nowPolygon); | ||
| 901 | - _this.nowPolygon.on('dblclick', () => { | ||
| 902 | - _this.polyEditor.setTarget(_this.nowPolygon); | ||
| 903 | - _this.polyEditor.open(); | ||
| 904 | - }) | 943 | + if (type === "draw") { |
| 944 | + _this.polyEditor = new AMap.PolygonEditor(_this.map); | ||
| 945 | + if (_this.form.electronicFence != null) { | ||
| 946 | + // 电子围栏经纬度 | ||
| 947 | + let path = _this.form.electronicFence.split(";"); | ||
| 948 | + path.map(item => { | ||
| 949 | + let arr = item.split(","); | ||
| 950 | + //将电子围栏经纬度转换为double类型数组 | ||
| 951 | + _this.polygonArr.push([parseFloat(arr[0]), parseFloat(arr[1])]); | ||
| 952 | + }); | ||
| 953 | + _this.nowPolygon = new AMap.Polygon({ | ||
| 954 | + path: _this.polygonArr | ||
| 955 | + }) | ||
| 956 | + _this.map.add([_this.nowPolygon]); | ||
| 957 | + _this.map.setFitView(); | ||
| 958 | + _this.polyEditor.addAdsorbPolygons([_this.nowPolygon]); | ||
| 959 | + _this.nowPolygon.on('dblclick', () => { | ||
| 960 | + _this.polyEditor.setTarget(_this.nowPolygon); | ||
| 961 | + _this.polyEditor.open(); | ||
| 962 | + }) | ||
| 963 | + } | ||
| 964 | + _this.polyEditor.on('add', function (data) { | ||
| 965 | + _this.nowPolygon = data.target; | ||
| 966 | + _this.polyEditor.addAdsorbPolygons(_this.nowPolygon); | ||
| 967 | + _this.nowPolygon.on('dblclick', () => { | ||
| 968 | + _this.polyEditor.setTarget(_this.nowPolygon); | ||
| 969 | + _this.polyEditor.open(); | ||
| 970 | + }) | ||
| 905 | 971 | ||
| 906 | - // 加个右击监听 双击图层进行编辑 | ||
| 907 | - _this.map.on("rightclick",function (e){ | ||
| 908 | - if (_this.polyEditor) { | ||
| 909 | - const arr = _this.nowPolygon.getPath() | ||
| 910 | - let pathArr = [] | ||
| 911 | - // 将获取的停车场坐标点转换格式后存入数组 | ||
| 912 | - for (let item of arr) { | ||
| 913 | - const list = [item.lng, item.lat] | ||
| 914 | - pathArr.push(list) | ||
| 915 | - } | 972 | + // 加个右击监听 双击图层进行编辑 |
| 973 | + _this.map.on("rightclick", function (e) { | ||
| 974 | + if (_this.polyEditor) { | ||
| 975 | + const arr = _this.nowPolygon.getPath() | ||
| 976 | + let pathArr = [] | ||
| 977 | + // 将获取的停车场坐标点转换格式后存入数组 | ||
| 978 | + for (let item of arr) { | ||
| 979 | + const list = [item.lng, item.lat] | ||
| 980 | + pathArr.push(list) | ||
| 981 | + } | ||
| 916 | 982 | ||
| 917 | - var maxDistance = 0; // 最大距离 | ||
| 918 | - var maxPointIndex = []; // 记录最大距离对应的点索引 | 983 | + var maxDistance = 0; // 最大距离 |
| 984 | + var maxPointIndex = []; // 记录最大距离对应的点索引 | ||
| 919 | 985 | ||
| 920 | - // 计算所有点对之间的距离 | ||
| 921 | - for (var i = 0; i < pathArr.length; i++) { | ||
| 922 | - for (var j = i + 1; j < pathArr.length; j++) { | ||
| 923 | - var distance = AMap.GeometryUtil.distance(pathArr[i], pathArr[j]); | ||
| 924 | - if (distance > maxDistance) { | ||
| 925 | - maxDistance = distance; | ||
| 926 | - maxPointIndex = [i, j]; | 986 | + // 计算所有点对之间的距离 |
| 987 | + for (var i = 0; i < pathArr.length; i++) { | ||
| 988 | + for (var j = i + 1; j < pathArr.length; j++) { | ||
| 989 | + var distance = AMap.GeometryUtil.distance(pathArr[i], pathArr[j]); | ||
| 990 | + if (distance > maxDistance) { | ||
| 991 | + maxDistance = distance; | ||
| 992 | + maxPointIndex = [i, j]; | ||
| 993 | + } | ||
| 927 | } | 994 | } |
| 928 | } | 995 | } |
| 929 | - } | ||
| 930 | 996 | ||
| 931 | - if(_this.nowPolygon!=null){ | ||
| 932 | - // 通过最大距离的点索引获取对应的点坐标 | ||
| 933 | - let mybounds = new AMap.Bounds(pathArr[maxPointIndex[0]],pathArr[maxPointIndex[1]]); | ||
| 934 | - // 设置地图显示范围 | ||
| 935 | - _this.map.setBounds(mybounds); | 997 | + if (_this.nowPolygon != null) { |
| 998 | + // 通过最大距离的点索引获取对应的点坐标 | ||
| 999 | + let mybounds = new AMap.Bounds(pathArr[maxPointIndex[0]], pathArr[maxPointIndex[1]]); | ||
| 1000 | + // 设置地图显示范围 | ||
| 1001 | + _this.map.setBounds(mybounds); | ||
| 1002 | + } | ||
| 1003 | + //将经纬度存到form中 | ||
| 1004 | + _this.form.electronicFence = pathArr.join(";"); | ||
| 1005 | + _this.polyEditor.close(); | ||
| 936 | } | 1006 | } |
| 937 | - //将经纬度存到form中 | ||
| 938 | - _this.form.electronicFence = pathArr.join(";"); | ||
| 939 | - _this.polyEditor.close(); | ||
| 940 | - } | ||
| 941 | - }); | ||
| 942 | - }) | 1007 | + }); |
| 1008 | + }) | ||
| 943 | 1009 | ||
| 944 | - if(_this.nowPolygon===null){ | ||
| 945 | - _this.polyEditor.close(); | ||
| 946 | - _this.polyEditor.setTarget(); | ||
| 947 | - _this.polyEditor.open(); | 1010 | + if (_this.nowPolygon === null) { |
| 1011 | + _this.polyEditor.close(); | ||
| 1012 | + _this.polyEditor.setTarget(); | ||
| 1013 | + _this.polyEditor.open(); | ||
| 1014 | + } | ||
| 948 | } | 1015 | } |
| 949 | 1016 | ||
| 1017 | + if(type==="address" && _this.form.addressGps.indexOf(",")>=0){ | ||
| 1018 | + let lng = _this.form.addressGps.split(",")[0]; | ||
| 1019 | + let lat = _this.form.addressGps.split(",")[1]; | ||
| 1020 | + //清除marker | ||
| 1021 | + if (_this.searchMarker){ | ||
| 1022 | + _this.map.remove(_this.searchMarker) | ||
| 1023 | + } | ||
| 1024 | + //设置marker | ||
| 1025 | + _this.searchMarker = new AMap.Marker({ | ||
| 1026 | + map: this.map, | ||
| 1027 | + position: [lng, lat], | ||
| 1028 | + }); | ||
| 1029 | + //定位 | ||
| 1030 | + _this.map.setCenter([lng, lat]) | ||
| 1031 | + // 自动适应显示想显示的范围区域 | ||
| 1032 | + _this.map.setFitView(); | ||
| 1033 | + } | ||
| 950 | 1034 | ||
| 951 | }).catch(e => { | 1035 | }).catch(e => { |
| 952 | console.log(e); | 1036 | console.log(e); |
| @@ -954,7 +1038,7 @@ export default { | @@ -954,7 +1038,7 @@ export default { | ||
| 954 | this.loading = false; | 1038 | this.loading = false; |
| 955 | // this.openMap = false; | 1039 | // this.openMap = false; |
| 956 | }, | 1040 | }, |
| 957 | - clearPolyEditor(){ | 1041 | + clearPolyEditor() { |
| 958 | this.form.electronicFence = null; | 1042 | this.form.electronicFence = null; |
| 959 | this.map.remove(this.nowPolygon); | 1043 | this.map.remove(this.nowPolygon); |
| 960 | // 关闭一下编辑器,防止出bug | 1044 | // 关闭一下编辑器,防止出bug |
| @@ -964,47 +1048,48 @@ export default { | @@ -964,47 +1048,48 @@ export default { | ||
| 964 | // 打开编辑器即可开始绘制 | 1048 | // 打开编辑器即可开始绘制 |
| 965 | this.polyEditor.open(); | 1049 | this.polyEditor.open(); |
| 966 | }, | 1050 | }, |
| 967 | - draw(){ | ||
| 968 | - if(this.polyEditor!=null){ | ||
| 969 | - if(this.form.electronicFence==null){ | ||
| 970 | - // 关闭一下编辑器,防止出bug | ||
| 971 | - this.polyEditor.close(); | ||
| 972 | - // 置空编辑区即为新增 | ||
| 973 | - this.polyEditor.setTarget(); | ||
| 974 | - // 打开编辑器即可开始绘制 | ||
| 975 | - this.polyEditor.open(); | ||
| 976 | - } | ||
| 977 | - }else{ | ||
| 978 | - this.initAMap(); | ||
| 979 | - } | 1051 | + draw() { |
| 1052 | + // if(this.polyEditor!=null){ | ||
| 1053 | + // if(this.form.electronicFence==null){ | ||
| 1054 | + // // 关闭一下编辑器,防止出bug | ||
| 1055 | + // this.polyEditor.close(); | ||
| 1056 | + // // 置空编辑区即为新增 | ||
| 1057 | + // this.polyEditor.setTarget(); | ||
| 1058 | + // // 打开编辑器即可开始绘制 | ||
| 1059 | + // this.polyEditor.open(); | ||
| 1060 | + // } | ||
| 1061 | + // }else{ | ||
| 1062 | + // | ||
| 1063 | + // } | ||
| 980 | this.openMap = true; | 1064 | this.openMap = true; |
| 1065 | + this.initAMap("draw"); | ||
| 981 | this.$alert('左键单击地图添加点,左键双击编辑,右键双击地图结束绘制', '温馨提示', { | 1066 | this.$alert('左键单击地图添加点,左键双击编辑,右键双击地图结束绘制', '温馨提示', { |
| 982 | confirmButtonText: '确定', | 1067 | confirmButtonText: '确定', |
| 983 | callback: action => { | 1068 | callback: action => { |
| 984 | - if(this.form.electronicFence!=null){ | 1069 | + if (this.form.electronicFence != null) { |
| 985 | let path = this.form.electronicFence.split(";"); | 1070 | let path = this.form.electronicFence.split(";"); |
| 986 | - path.map(item=>{ | 1071 | + path.map(item => { |
| 987 | let arr = item.split(","); | 1072 | let arr = item.split(","); |
| 988 | - this.polygonArr.push([arr[0],arr[1]]); | 1073 | + this.polygonArr.push([arr[0], arr[1]]); |
| 989 | }); | 1074 | }); |
| 990 | } | 1075 | } |
| 991 | } | 1076 | } |
| 992 | }); | 1077 | }); |
| 993 | }, | 1078 | }, |
| 994 | - createUrl(file){ | ||
| 995 | - if(file.raw!=null){ | 1079 | + createUrl(file) { |
| 1080 | + if (file.raw != null) { | ||
| 996 | return URL.createObjectURL(file.raw); | 1081 | return URL.createObjectURL(file.raw); |
| 997 | - }else{ | 1082 | + } else { |
| 998 | return process.env.VUE_APP_BASE_API + file.url; | 1083 | return process.env.VUE_APP_BASE_API + file.url; |
| 999 | } | 1084 | } |
| 1000 | 1085 | ||
| 1001 | }, | 1086 | }, |
| 1002 | - tempDownload(row){ | 1087 | + tempDownload(row) { |
| 1003 | let name = row.name; | 1088 | let name = row.name; |
| 1004 | let url = ""; | 1089 | let url = ""; |
| 1005 | - if(row.raw!=null){ | 1090 | + if (row.raw != null) { |
| 1006 | url = URL.createObjectURL(row.raw); | 1091 | url = URL.createObjectURL(row.raw); |
| 1007 | - }else{ | 1092 | + } else { |
| 1008 | url = process.env.VUE_APP_BASE_API + row.url; | 1093 | url = process.env.VUE_APP_BASE_API + row.url; |
| 1009 | } | 1094 | } |
| 1010 | console.log(url) | 1095 | console.log(url) |
| @@ -1016,14 +1101,14 @@ export default { | @@ -1016,14 +1101,14 @@ export default { | ||
| 1016 | }, | 1101 | }, |
| 1017 | // 取消按钮 | 1102 | // 取消按钮 |
| 1018 | cancel() { | 1103 | cancel() { |
| 1019 | - this.$tab.closePage({path:"/disposalSite/info"}).then(() => { | ||
| 1020 | - this.$tab.openPage("处理场所管理", "/tool/disposalSite",{disposalSiteRefresh:1}) | 1104 | + this.$tab.closePage({path: "/disposalSite/info"}).then(() => { |
| 1105 | + this.$tab.openPage("处理场所管理", "/tool/disposalSite", {disposalSiteRefresh: 1}) | ||
| 1021 | }) | 1106 | }) |
| 1022 | }, | 1107 | }, |
| 1023 | /** 提交按钮 */ | 1108 | /** 提交按钮 */ |
| 1024 | submitForm() { | 1109 | submitForm() { |
| 1025 | this.$refs["form"].validate(valid => { | 1110 | this.$refs["form"].validate(valid => { |
| 1026 | - if(this.form.validityBeginDate>this.form.validityEndDate){ | 1111 | + if (this.form.validityBeginDate > this.form.validityEndDate) { |
| 1027 | this.$message({ | 1112 | this.$message({ |
| 1028 | message: '有限期开始时间不能大于有限期结束时间!', | 1113 | message: '有限期开始时间不能大于有限期结束时间!', |
| 1029 | type: 'warning' | 1114 | type: 'warning' |
| @@ -1059,66 +1144,66 @@ export default { | @@ -1059,66 +1144,66 @@ export default { | ||
| 1059 | this.approvalDocument.forEach(item => { | 1144 | this.approvalDocument.forEach(item => { |
| 1060 | if (item.raw != null) { | 1145 | if (item.raw != null) { |
| 1061 | formData.append('approvalDocumentFiles', item.raw) | 1146 | formData.append('approvalDocumentFiles', item.raw) |
| 1062 | - }else{ | 1147 | + } else { |
| 1063 | //将原有的附件拼接到form中 | 1148 | //将原有的附件拼接到form中 |
| 1064 | - form.approvalDocument = form.approvalDocument!==null?form.approvalDocument+";"+item.url:item.url; | 1149 | + form.approvalDocument = form.approvalDocument !== null ? form.approvalDocument + ";" + item.url : item.url; |
| 1065 | } | 1150 | } |
| 1066 | }) | 1151 | }) |
| 1067 | 1152 | ||
| 1068 | this.approvalData.forEach(item => { | 1153 | this.approvalData.forEach(item => { |
| 1069 | if (item.raw != null) { | 1154 | if (item.raw != null) { |
| 1070 | formData.append('approvalDataFiles', item.raw) | 1155 | formData.append('approvalDataFiles', item.raw) |
| 1071 | - }else{ | 1156 | + } else { |
| 1072 | //将原有的附件拼接到form中 | 1157 | //将原有的附件拼接到form中 |
| 1073 | - form.approvalData = form.approvalData!==null?form.approvalData+";"+item.url:item.url; | 1158 | + form.approvalData = form.approvalData !== null ? form.approvalData + ";" + item.url : item.url; |
| 1074 | } | 1159 | } |
| 1075 | }) | 1160 | }) |
| 1076 | this.scenePhoto.forEach(item => { | 1161 | this.scenePhoto.forEach(item => { |
| 1077 | if (item.raw != null) { | 1162 | if (item.raw != null) { |
| 1078 | formData.append('scenePhotoFiles', item.raw) | 1163 | formData.append('scenePhotoFiles', item.raw) |
| 1079 | - }else{ | 1164 | + } else { |
| 1080 | //将原有的附件拼接到form中 | 1165 | //将原有的附件拼接到form中 |
| 1081 | - form.scenePhoto = form.scenePhoto!==null?form.scenePhoto+";"+item.url:item.url; | 1166 | + form.scenePhoto = form.scenePhoto !== null ? form.scenePhoto + ";" + item.url : item.url; |
| 1082 | } | 1167 | } |
| 1083 | }) | 1168 | }) |
| 1084 | this.carWashingFacilitiesImage.forEach(item => { | 1169 | this.carWashingFacilitiesImage.forEach(item => { |
| 1085 | if (item.raw != null) { | 1170 | if (item.raw != null) { |
| 1086 | formData.append('carWashingFacilitiesImageFiles', item.raw) | 1171 | formData.append('carWashingFacilitiesImageFiles', item.raw) |
| 1087 | - }else{ | 1172 | + } else { |
| 1088 | //将原有的附件拼接到form中 | 1173 | //将原有的附件拼接到form中 |
| 1089 | - form.carWashingFacilitiesImage = form.carWashingFacilitiesImage!==null?form.carWashingFacilitiesImage+";"+item.url:item.url; | 1174 | + form.carWashingFacilitiesImage = form.carWashingFacilitiesImage !== null ? form.carWashingFacilitiesImage + ";" + item.url : item.url; |
| 1090 | } | 1175 | } |
| 1091 | }) | 1176 | }) |
| 1092 | this.safetyAssessmentReport.forEach(item => { | 1177 | this.safetyAssessmentReport.forEach(item => { |
| 1093 | if (item.raw != null) { | 1178 | if (item.raw != null) { |
| 1094 | formData.append('safetyAssessmentReportFiles', item.raw) | 1179 | formData.append('safetyAssessmentReportFiles', item.raw) |
| 1095 | - }else{ | 1180 | + } else { |
| 1096 | //将原有的附件拼接到form中 | 1181 | //将原有的附件拼接到form中 |
| 1097 | - form.safetyAssessmentReport = form.safetyAssessmentReport!==null?form.safetyAssessmentReport+";"+item.url:item.url; | 1182 | + form.safetyAssessmentReport = form.safetyAssessmentReport !== null ? form.safetyAssessmentReport + ";" + item.url : item.url; |
| 1098 | } | 1183 | } |
| 1099 | }) | 1184 | }) |
| 1100 | this.environmentalApproval.forEach(item => { | 1185 | this.environmentalApproval.forEach(item => { |
| 1101 | if (item.raw != null) { | 1186 | if (item.raw != null) { |
| 1102 | formData.append('environmentalApprovalFiles', item.raw) | 1187 | formData.append('environmentalApprovalFiles', item.raw) |
| 1103 | - }else{ | 1188 | + } else { |
| 1104 | //将原有的附件拼接到form中 | 1189 | //将原有的附件拼接到form中 |
| 1105 | - form.environmentalApproval = form.environmentalApproval!==null?form.environmentalApproval+";"+item.url:item.url; | 1190 | + form.environmentalApproval = form.environmentalApproval !== null ? form.environmentalApproval + ";" + item.url : item.url; |
| 1106 | } | 1191 | } |
| 1107 | }) | 1192 | }) |
| 1108 | this.authorization.forEach(item => { | 1193 | this.authorization.forEach(item => { |
| 1109 | if (item.raw != null) { | 1194 | if (item.raw != null) { |
| 1110 | formData.append('authorizationFiles', item.raw) | 1195 | formData.append('authorizationFiles', item.raw) |
| 1111 | - }else{ | 1196 | + } else { |
| 1112 | //将原有的附件拼接到form中 | 1197 | //将原有的附件拼接到form中 |
| 1113 | - form.authorization = form.authorization!==null?form.authorization+";"+item.url:item.url; | 1198 | + form.authorization = form.authorization !== null ? form.authorization + ";" + item.url : item.url; |
| 1114 | } | 1199 | } |
| 1115 | }) | 1200 | }) |
| 1116 | this.otherInformation.forEach(item => { | 1201 | this.otherInformation.forEach(item => { |
| 1117 | if (item.raw != null) { | 1202 | if (item.raw != null) { |
| 1118 | formData.append('otherInformationFiles', item.raw) | 1203 | formData.append('otherInformationFiles', item.raw) |
| 1119 | - }else{ | 1204 | + } else { |
| 1120 | //将原有的附件拼接到form中 | 1205 | //将原有的附件拼接到form中 |
| 1121 | - form.otherInformation = form.otherInformation!==null?form.otherInformation+";"+item.url:item.url; | 1206 | + form.otherInformation = form.otherInformation !== null ? form.otherInformation + ";" + item.url : item.url; |
| 1122 | } | 1207 | } |
| 1123 | }) | 1208 | }) |
| 1124 | for (let key in form) { | 1209 | for (let key in form) { |
| @@ -1127,15 +1212,15 @@ export default { | @@ -1127,15 +1212,15 @@ export default { | ||
| 1127 | if (this.form.id != null) { | 1212 | if (this.form.id != null) { |
| 1128 | updateDisposalSite(formData).then(response => { | 1213 | updateDisposalSite(formData).then(response => { |
| 1129 | this.msgSuccess("修改成功"); | 1214 | this.msgSuccess("修改成功"); |
| 1130 | - this.$tab.closePage({path:"/disposalSite/infoEdit"}).then(() => { | ||
| 1131 | - this.$tab.openPage("处理场所管理", "/tool/disposalSite",{disposalSiteRefresh:1}) | 1215 | + this.$tab.closePage({path: "/disposalSite/infoEdit"}).then(() => { |
| 1216 | + this.$tab.openPage("处理场所管理", "/tool/disposalSite", {disposalSiteRefresh: 1}) | ||
| 1132 | }) | 1217 | }) |
| 1133 | }); | 1218 | }); |
| 1134 | } else { | 1219 | } else { |
| 1135 | addDisposalSite(formData).then(response => { | 1220 | addDisposalSite(formData).then(response => { |
| 1136 | this.msgSuccess("新增成功"); | 1221 | this.msgSuccess("新增成功"); |
| 1137 | - this.$tab.closePage({path:"/disposalSite/info"}).then(() => { | ||
| 1138 | - this.$tab.openPage("处理场所管理", "/tool/disposalSite",{disposalSiteRefresh:1}) | 1222 | + this.$tab.closePage({path: "/disposalSite/info"}).then(() => { |
| 1223 | + this.$tab.openPage("处理场所管理", "/tool/disposalSite", {disposalSiteRefresh: 1}) | ||
| 1139 | }) | 1224 | }) |
| 1140 | }); | 1225 | }); |
| 1141 | } | 1226 | } |
| @@ -1510,33 +1595,37 @@ export default { | @@ -1510,33 +1595,37 @@ export default { | ||
| 1510 | } | 1595 | } |
| 1511 | }; | 1596 | }; |
| 1512 | </script> | 1597 | </script> |
| 1513 | -<style lang="scss" scoped> | ||
| 1514 | -.upload_lable{ | 1598 | +<style lang="scss" scoped> |
| 1599 | +.upload_lable { | ||
| 1515 | border-right: 1px solid #dcdfe6; | 1600 | border-right: 1px solid #dcdfe6; |
| 1516 | padding: 27px 30px; | 1601 | padding: 27px 30px; |
| 1517 | background: #fafafa; | 1602 | background: #fafafa; |
| 1518 | text-align: center; | 1603 | text-align: center; |
| 1519 | } | 1604 | } |
| 1520 | -.upload_btn{ | 1605 | + |
| 1606 | +.upload_btn { | ||
| 1521 | max-height: 106px; | 1607 | max-height: 106px; |
| 1522 | } | 1608 | } |
| 1523 | -.upload_close{ | 1609 | + |
| 1610 | +.upload_close { | ||
| 1524 | position: absolute; | 1611 | position: absolute; |
| 1525 | left: 105px; | 1612 | left: 105px; |
| 1526 | - z-index:99; | ||
| 1527 | - top:-1px; | ||
| 1528 | - font-size:18px; | ||
| 1529 | - color:red; | 1613 | + z-index: 99; |
| 1614 | + top: -1px; | ||
| 1615 | + font-size: 18px; | ||
| 1616 | + color: red; | ||
| 1530 | } | 1617 | } |
| 1531 | -.upload_close_file{ | 1618 | + |
| 1619 | +.upload_close_file { | ||
| 1532 | position: absolute; | 1620 | position: absolute; |
| 1533 | left: 80px; | 1621 | left: 80px; |
| 1534 | - z-index:99; | ||
| 1535 | - top:-1px; | ||
| 1536 | - font-size:18px; | ||
| 1537 | - color:red; | 1622 | + z-index: 99; |
| 1623 | + top: -1px; | ||
| 1624 | + font-size: 18px; | ||
| 1625 | + color: red; | ||
| 1538 | } | 1626 | } |
| 1539 | -.upload_div_image{ | 1627 | + |
| 1628 | +.upload_div_image { | ||
| 1540 | display: inline-block; | 1629 | display: inline-block; |
| 1541 | width: 110px; | 1630 | width: 110px; |
| 1542 | height: 95px; | 1631 | height: 95px; |
| @@ -1544,16 +1633,18 @@ export default { | @@ -1544,16 +1633,18 @@ export default { | ||
| 1544 | float: left; | 1633 | float: left; |
| 1545 | margin-left: 5px; | 1634 | margin-left: 5px; |
| 1546 | } | 1635 | } |
| 1547 | -.upload_div_file{ | 1636 | + |
| 1637 | +.upload_div_file { | ||
| 1548 | display: inline-block; | 1638 | display: inline-block; |
| 1549 | width: 110px; | 1639 | width: 110px; |
| 1550 | height: 95px; | 1640 | height: 95px; |
| 1551 | text-align: center; | 1641 | text-align: center; |
| 1552 | - float:left; | 1642 | + float: left; |
| 1553 | margin: 5px; | 1643 | margin: 5px; |
| 1554 | position: relative; | 1644 | position: relative; |
| 1555 | } | 1645 | } |
| 1556 | -.serach_map{ | 1646 | + |
| 1647 | +.serach_map { | ||
| 1557 | position: absolute; | 1648 | position: absolute; |
| 1558 | top: 100px; | 1649 | top: 100px; |
| 1559 | left: 25px; | 1650 | left: 25px; |
| @@ -1561,6 +1652,6 @@ export default { | @@ -1561,6 +1652,6 @@ export default { | ||
| 1561 | background: #fff; | 1652 | background: #fff; |
| 1562 | padding: 10px; | 1653 | padding: 10px; |
| 1563 | border-radius: 5px; | 1654 | border-radius: 5px; |
| 1564 | - box-shadow: 0 0 10px rgba(0,0,0,.2); | 1655 | + box-shadow: 0 0 10px rgba(0, 0, 0, .2); |
| 1565 | } | 1656 | } |
| 1566 | </style> | 1657 | </style> |
trash-ui/src/views/unit/enterprise/info.vue
| @@ -59,7 +59,7 @@ | @@ -59,7 +59,7 @@ | ||
| 59 | </el-row> | 59 | </el-row> |
| 60 | <el-row :gutter="30"> | 60 | <el-row :gutter="30"> |
| 61 | <el-col :span="7"> | 61 | <el-col :span="7"> |
| 62 | - <el-form-item label="办公地址" prop="officeAddress"> | 62 | + <el-form-item label="办公地址" prop="officeAddress" class="is-required"> |
| 63 | <el-input v-model="form.officeAddress" placeholder="请输入内容" @focus="openMapDialog"/> | 63 | <el-input v-model="form.officeAddress" placeholder="请输入内容" @focus="openMapDialog"/> |
| 64 | </el-form-item> | 64 | </el-form-item> |
| 65 | </el-col> | 65 | </el-col> |
| @@ -452,7 +452,9 @@ export default { | @@ -452,7 +452,9 @@ export default { | ||
| 452 | open: false, | 452 | open: false, |
| 453 | openMap: false, | 453 | openMap: false, |
| 454 | // 表单参数 | 454 | // 表单参数 |
| 455 | - form: {}, | 455 | + form: { |
| 456 | + officeAddress: "", | ||
| 457 | + }, | ||
| 456 | // 表单校验 | 458 | // 表单校验 |
| 457 | rules: { | 459 | rules: { |
| 458 | name: [ | 460 | name: [ |
| @@ -473,9 +475,6 @@ export default { | @@ -473,9 +475,6 @@ export default { | ||
| 473 | businessLicenseDate: [ | 475 | businessLicenseDate: [ |
| 474 | {required: true, message: "请选择企业营业执照有效期", trigger: "blur"} | 476 | {required: true, message: "请选择企业营业执照有效期", trigger: "blur"} |
| 475 | ], | 477 | ], |
| 476 | - officeAddress: [ | ||
| 477 | - {required: true, message: "请输入办公地址", trigger: "blur"} | ||
| 478 | - ], | ||
| 479 | parkingLotLocation: [ | 478 | parkingLotLocation: [ |
| 480 | {required: true, message: "请输入停车场位置", trigger: "blur"} | 479 | {required: true, message: "请输入停车场位置", trigger: "blur"} |
| 481 | ], | 480 | ], |
| @@ -553,9 +552,8 @@ export default { | @@ -553,9 +552,8 @@ export default { | ||
| 553 | methods: { | 552 | methods: { |
| 554 | openMapDialog(){ | 553 | openMapDialog(){ |
| 555 | this.openMap = true; | 554 | this.openMap = true; |
| 556 | - if(this.map==null){ | ||
| 557 | - this.initAMap(); | ||
| 558 | - } | 555 | + this.initAMap(); |
| 556 | + this.keywords = this.form.officeAddress; | ||
| 559 | }, | 557 | }, |
| 560 | // 选中提示 | 558 | // 选中提示 |
| 561 | currentSelect(val) { | 559 | currentSelect(val) { |
| @@ -564,8 +562,7 @@ export default { | @@ -564,8 +562,7 @@ export default { | ||
| 564 | if (!val) { | 562 | if (!val) { |
| 565 | return ; | 563 | return ; |
| 566 | } | 564 | } |
| 567 | - // 自动适应显示想显示的范围区域 | ||
| 568 | - this.map.setFitView(); | 565 | + |
| 569 | //清除marker | 566 | //清除marker |
| 570 | if (this.searchMarker){ | 567 | if (this.searchMarker){ |
| 571 | this.map.remove(this.searchMarker) | 568 | this.map.remove(this.searchMarker) |
| @@ -575,7 +572,8 @@ export default { | @@ -575,7 +572,8 @@ export default { | ||
| 575 | map: this.map, | 572 | map: this.map, |
| 576 | position: [val.location.lng, val.location.lat], | 573 | position: [val.location.lng, val.location.lat], |
| 577 | }); | 574 | }); |
| 578 | - | 575 | + // 自动适应显示想显示的范围区域 |
| 576 | + this.map.setFitView(); | ||
| 579 | this.keywords = val.name | 577 | this.keywords = val.name |
| 580 | //定位 | 578 | //定位 |
| 581 | this.map.setCenter([val.location.lng, val.location.lat]) | 579 | this.map.setCenter([val.location.lng, val.location.lat]) |
| @@ -627,8 +625,26 @@ export default { | @@ -627,8 +625,26 @@ export default { | ||
| 627 | _this.map.addControl(new BasicControl.LayerSwitcher({ | 625 | _this.map.addControl(new BasicControl.LayerSwitcher({ |
| 628 | position: 'rb' // 右下角 | 626 | position: 'rb' // 右下角 |
| 629 | })); | 627 | })); |
| 630 | - | ||
| 631 | }); | 628 | }); |
| 629 | + | ||
| 630 | + if(_this.form.officeAddressGps.indexOf(",")>=0){ | ||
| 631 | + let lng = _this.form.officeAddressGps.split(",")[0]; | ||
| 632 | + let lat = _this.form.officeAddressGps.split(",")[1]; | ||
| 633 | + //清除marker | ||
| 634 | + if (_this.searchMarker){ | ||
| 635 | + _this.map.remove(_this.searchMarker) | ||
| 636 | + } | ||
| 637 | + //设置marker | ||
| 638 | + _this.searchMarker = new AMap.Marker({ | ||
| 639 | + map: this.map, | ||
| 640 | + position: [lng, lat], | ||
| 641 | + }); | ||
| 642 | + //定位 | ||
| 643 | + _this.map.setCenter([lng, lat]) | ||
| 644 | + // 自动适应显示想显示的范围区域 | ||
| 645 | + _this.map.setFitView(); | ||
| 646 | + } | ||
| 647 | + | ||
| 632 | }).catch(e => { | 648 | }).catch(e => { |
| 633 | console.log(e); | 649 | console.log(e); |
| 634 | }); | 650 | }); |
trash-ui/src/views/unit/enterprise/infoEdit.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <div class="app-container"> | ||
| 3 | + | ||
| 4 | + <!-- 添加或修改处理场所管理对话框 --> | ||
| 5 | + <h3> | ||
| 6 | + 基础信息 | ||
| 7 | + </h3> | ||
| 8 | + <el-form ref="form" :model="form" :rules="rules" label-width="80px" label-position="top"> | ||
| 9 | + <el-row :gutter="30"> | ||
| 10 | + <el-col :span="7"> | ||
| 11 | + <el-form-item label="企业名称" prop="name"> | ||
| 12 | + <el-input v-model="form.name" placeholder="请输入企业名称" /> | ||
| 13 | + </el-form-item> | ||
| 14 | + </el-col> | ||
| 15 | + <el-col :span="7"> | ||
| 16 | + <el-form-item label="简称" prop="abbreviation"> | ||
| 17 | + <el-input v-model="form.abbreviation" placeholder="请输入简称" /> | ||
| 18 | + </el-form-item> | ||
| 19 | + </el-col> | ||
| 20 | + <el-col :span="7"> | ||
| 21 | + <el-form-item label="注册地所在区域" prop="registrationArea"> | ||
| 22 | + <el-select v-model="form.registrationArea" placeholder="请输入注册地所在区域" style="width: 100%"> | ||
| 23 | + <el-option v-for="(area,index) in areas" :label="area.name" :value="area.name" :key="index"/> | ||
| 24 | + </el-select> | ||
| 25 | + </el-form-item> | ||
| 26 | + </el-col> | ||
| 27 | + </el-row> | ||
| 28 | + <el-row :gutter="30"> | ||
| 29 | + <el-col :span="7"> | ||
| 30 | + <el-form-item label="企业道路运输经营许可证有效期" prop="transportPermissionDate"> | ||
| 31 | + <el-date-picker clearable size="small" style="width: 100%;" | ||
| 32 | + v-model="form.transportPermissionDate" | ||
| 33 | + type="date" | ||
| 34 | + value-format="yyyy-MM-dd" | ||
| 35 | + placeholder="选择企业道路运输经营许可证有效期"> | ||
| 36 | + </el-date-picker> | ||
| 37 | + </el-form-item> | ||
| 38 | + </el-col> | ||
| 39 | + <el-col :span="7"> | ||
| 40 | + <el-form-item label="企业入市时间" prop="enterDate"> | ||
| 41 | + <el-date-picker clearable size="small" style="width: 100%;" | ||
| 42 | + v-model="form.enterDate" | ||
| 43 | + type="date" | ||
| 44 | + value-format="yyyy-MM-dd" | ||
| 45 | + placeholder="选择企业入市时间"> | ||
| 46 | + </el-date-picker> | ||
| 47 | + </el-form-item> | ||
| 48 | + </el-col> | ||
| 49 | + <el-col :span="7"> | ||
| 50 | + <el-form-item label="企业营业执照有效期" prop="businessLicenseDate"> | ||
| 51 | + <el-date-picker clearable size="small" style="width: 100%;" | ||
| 52 | + v-model="form.businessLicenseDate" | ||
| 53 | + type="date" | ||
| 54 | + value-format="yyyy-MM-dd" | ||
| 55 | + placeholder="选择企业营业执照有效期"> | ||
| 56 | + </el-date-picker> | ||
| 57 | + </el-form-item> | ||
| 58 | + </el-col> | ||
| 59 | + </el-row> | ||
| 60 | + <el-row :gutter="30"> | ||
| 61 | + <el-col :span="7"> | ||
| 62 | + <el-form-item label="办公地址" prop="officeAddress" class="is-required"> | ||
| 63 | + <el-input v-model="form.officeAddress" placeholder="请输入内容" @focus="openMapDialog"/> | ||
| 64 | + </el-form-item> | ||
| 65 | + </el-col> | ||
| 66 | + <el-col :span="7"> | ||
| 67 | + <el-form-item label="停车场位置" prop="parkingLotLocation"> | ||
| 68 | + <el-input v-model="form.parkingLotLocation" placeholder="请输入内容" /> | ||
| 69 | + </el-form-item> | ||
| 70 | + </el-col> | ||
| 71 | + <el-col :span="7"> | ||
| 72 | + <el-form-item label="停车场面积(m²)" prop="parkingArea"> | ||
| 73 | + <el-input v-model="form.parkingArea" placeholder="请输入停车场面积" /> | ||
| 74 | + </el-form-item> | ||
| 75 | + </el-col> | ||
| 76 | + </el-row> | ||
| 77 | + <el-row :gutter="30"> | ||
| 78 | + <el-col :span="7"> | ||
| 79 | + <el-form-item label="企业安全负责人姓名及联系方式" prop="safetyManagerName"> | ||
| 80 | + <el-row> | ||
| 81 | + <el-col :span="6"> | ||
| 82 | + <el-input v-model="form.safetyManagerName" placeholder="姓名" /> | ||
| 83 | + </el-col> | ||
| 84 | + <el-col :span="18"> | ||
| 85 | + <el-input v-model="form.safetyManagerPhone" placeholder="联系方式" :maxlength="11" show-word-limit/> | ||
| 86 | + </el-col> | ||
| 87 | + </el-row> | ||
| 88 | + </el-form-item> | ||
| 89 | + </el-col> | ||
| 90 | + <el-col :span="7"> | ||
| 91 | + <el-form-item label="社会统一信用代码编号" prop="socialUniformCreditCodeNumber"> | ||
| 92 | + <el-input v-model="form.socialUniformCreditCodeNumber" placeholder="请输入社会统一信用代码编号" /> | ||
| 93 | + </el-form-item> | ||
| 94 | + </el-col> | ||
| 95 | + <el-col :span="7"> | ||
| 96 | + <el-form-item label="法人代表及联系方式" prop="legalRepresentative"> | ||
| 97 | + <el-row> | ||
| 98 | + <el-col :span="6"> | ||
| 99 | + <el-input v-model="form.legalRepresentative" placeholder="姓名" /> | ||
| 100 | + </el-col> | ||
| 101 | + <el-col :span="18"> | ||
| 102 | + <el-input v-model="form.legalRepresentativePhone" placeholder="联系方式" :maxlength="11" show-word-limit/> | ||
| 103 | + </el-col> | ||
| 104 | + </el-row> | ||
| 105 | + </el-form-item> | ||
| 106 | + </el-col> | ||
| 107 | + </el-row> | ||
| 108 | + | ||
| 109 | + <el-row :gutter="30"> | ||
| 110 | + <el-col :span="7"> | ||
| 111 | + <el-form-item label="安全管理人员" prop="safetyPeopleName"> | ||
| 112 | + <el-input v-model="form.safetyPeopleName" placeholder="请输入安全管理人员" /> | ||
| 113 | + </el-form-item> | ||
| 114 | + </el-col> | ||
| 115 | + <el-col :span="7"> | ||
| 116 | + <el-form-item label="服务电话" prop="servicePhone"> | ||
| 117 | + <el-input v-model="form.servicePhone" placeholder="请输入企业服务电话" :maxlength="11" show-word-limit/> | ||
| 118 | + </el-form-item> | ||
| 119 | + </el-col> | ||
| 120 | + <el-col :span="7"> | ||
| 121 | + <el-form-item label="报价" prop="offer"> | ||
| 122 | + <el-input v-model="form.offer" placeholder="请输入起始报价" /> | ||
| 123 | + </el-form-item> | ||
| 124 | + </el-col> | ||
| 125 | + </el-row> | ||
| 126 | + <el-row :gutter="30"> | ||
| 127 | + <el-col> | ||
| 128 | + <el-form-item label="备注" prop="remark"> | ||
| 129 | + <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" /> | ||
| 130 | + </el-form-item> | ||
| 131 | + </el-col> | ||
| 132 | + </el-row> | ||
| 133 | + <el-row style="border: 1px solid #dcdfe6;border-radius: 2px;"> | ||
| 134 | + <el-col :span="3"> | ||
| 135 | + <div class="upload_lable"> | ||
| 136 | + 企业道路运输经营许可证 | ||
| 137 | + <el-upload | ||
| 138 | + ref="upload" | ||
| 139 | + action="" | ||
| 140 | + accept=".jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx" | ||
| 141 | + :on-change="fileChange" | ||
| 142 | + :auto-upload="false" | ||
| 143 | + :show-file-list="false" | ||
| 144 | + multiple | ||
| 145 | + :file-list="transportPermission"> | ||
| 146 | + | ||
| 147 | + <el-button size="small" type="primary" icon="el-icon-upload">上传附件</el-button> | ||
| 148 | + </el-upload> | ||
| 149 | + </div> | ||
| 150 | + </el-col> | ||
| 151 | + <el-col :span="21"> | ||
| 152 | + <div class="upload_btn"> | ||
| 153 | + <div v-for="(item,index) in transportPermission"> | ||
| 154 | + <div v-if="!/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_image"> | ||
| 155 | + <div class="upload_close" @click="transportPermission.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div> | ||
| 156 | + <el-image | ||
| 157 | + style="width: 110px; height: 95px; margin: 5px;float:left;" | ||
| 158 | + :src="createUrl(item)" | ||
| 159 | + :preview-src-list="[createUrl(item)]" | ||
| 160 | + :z-index="999"> | ||
| 161 | + </el-image> | ||
| 162 | + </div> | ||
| 163 | + <div v-if="/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_file"> | ||
| 164 | + <div class="upload_close_file" @click="transportPermission.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div> | ||
| 165 | + <span @click="tempDownload(item)"><el-icon class="el-icon-document-add" style="font-size:70px;"></el-icon></span> | ||
| 166 | + <div style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" @click="tempDownload(item)">{{ item.name }}</div> | ||
| 167 | + </div> | ||
| 168 | + </div> | ||
| 169 | + </div> | ||
| 170 | + </el-col> | ||
| 171 | + </el-row> | ||
| 172 | + <el-row style="border: 1px solid #dcdfe6;border-radius: 2px;"> | ||
| 173 | + <el-col :span="3"> | ||
| 174 | + <div class="upload_lable"> | ||
| 175 | + 企业营业执照 | ||
| 176 | + <el-upload | ||
| 177 | + ref="upload" | ||
| 178 | + action="" | ||
| 179 | + accept=".jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx" | ||
| 180 | + :on-change="fileChange1" | ||
| 181 | + :auto-upload="false" | ||
| 182 | + :show-file-list="false" | ||
| 183 | + multiple | ||
| 184 | + :file-list="enterpriseBusinessLicense"> | ||
| 185 | + <el-button size="small" type="primary" icon="el-icon-upload">上传附件</el-button> | ||
| 186 | + </el-upload> | ||
| 187 | + </div> | ||
| 188 | + </el-col> | ||
| 189 | + <el-col :span="21"> | ||
| 190 | + <div class="upload_btn"> | ||
| 191 | + <div v-for="(item,index) in enterpriseBusinessLicense"> | ||
| 192 | + <div v-if="!/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_image"> | ||
| 193 | + <div class="upload_close" @click="enterpriseBusinessLicense.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div> | ||
| 194 | + <el-image | ||
| 195 | + style="width: 110px; height: 95px; margin: 5px;float:left;" | ||
| 196 | + :src="createUrl(item)" | ||
| 197 | + :preview-src-list="[createUrl(item)]" | ||
| 198 | + :z-index="999"> | ||
| 199 | + </el-image> | ||
| 200 | + </div> | ||
| 201 | + <div v-if="/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_file"> | ||
| 202 | + <div class="upload_close_file" @click="enterpriseBusinessLicense.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div> | ||
| 203 | + <span @click="tempDownload(item)"><el-icon class="el-icon-document-add" style="font-size:70px;"></el-icon></span> | ||
| 204 | + <div style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" @click="tempDownload(item)">{{ item.name }}</div> | ||
| 205 | + </div> | ||
| 206 | + </div> | ||
| 207 | + </div> | ||
| 208 | + </el-col> | ||
| 209 | + </el-row> | ||
| 210 | + <el-row style="border: 1px solid #dcdfe6;border-radius: 2px;"> | ||
| 211 | + <el-col :span="3"> | ||
| 212 | + <div class="upload_lable"> | ||
| 213 | + 安全员考核合格证明 | ||
| 214 | + <el-upload | ||
| 215 | + ref="upload" | ||
| 216 | + action="" | ||
| 217 | + accept=".jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx" | ||
| 218 | + :on-change="fileChange2" | ||
| 219 | + :auto-upload="false" | ||
| 220 | + :show-file-list="false" | ||
| 221 | + multiple | ||
| 222 | + :file-list="safetyOfficerQualificationCertificate"> | ||
| 223 | + <el-button size="small" type="primary" icon="el-icon-upload">上传附件</el-button> | ||
| 224 | + </el-upload> | ||
| 225 | + </div> | ||
| 226 | + </el-col> | ||
| 227 | + <el-col :span="21"> | ||
| 228 | + <div class="upload_btn"> | ||
| 229 | + <div v-for="(item,index) in safetyOfficerQualificationCertificate"> | ||
| 230 | + <div v-if="!/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_image"> | ||
| 231 | + <div class="upload_close" @click="safetyOfficerQualificationCertificate.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div> | ||
| 232 | + <el-image | ||
| 233 | + style="width: 110px; height: 95px; margin: 5px;float:left;" | ||
| 234 | + :src="createUrl(item)" | ||
| 235 | + :preview-src-list="[createUrl(item)]" | ||
| 236 | + :z-index="999"> | ||
| 237 | + </el-image> | ||
| 238 | + </div> | ||
| 239 | + <div v-if="/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_file"> | ||
| 240 | + <div class="upload_close_file" @click="safetyOfficerQualificationCertificate.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div> | ||
| 241 | + <span @click="tempDownload(item)"><el-icon class="el-icon-document-add" style="font-size:70px;"></el-icon></span> | ||
| 242 | + <div style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" @click="tempDownload(item)">{{ item.name }}</div> | ||
| 243 | + </div> | ||
| 244 | + </div> | ||
| 245 | + </div> | ||
| 246 | + </el-col> | ||
| 247 | + </el-row> | ||
| 248 | + <el-row style="border: 1px solid #dcdfe6;border-radius: 2px;"> | ||
| 249 | + <el-col :span="3"> | ||
| 250 | + <div class="upload_lable"> | ||
| 251 | + 企业负责人安全考核证 | ||
| 252 | + <el-upload | ||
| 253 | + ref="upload" | ||
| 254 | + action="" | ||
| 255 | + accept=".jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx" | ||
| 256 | + :on-change="fileChange3" | ||
| 257 | + :auto-upload="false" | ||
| 258 | + :show-file-list="false" | ||
| 259 | + multiple | ||
| 260 | + :file-list="safetyCertificate"> | ||
| 261 | + <el-button size="small" type="primary" icon="el-icon-upload">上传附件</el-button> | ||
| 262 | + </el-upload> | ||
| 263 | + </div> | ||
| 264 | + </el-col> | ||
| 265 | + <el-col :span="21"> | ||
| 266 | + <div class="upload_btn"> | ||
| 267 | + <div v-for="(item,index) in safetyCertificate"> | ||
| 268 | + <div v-if="!/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_image"> | ||
| 269 | + <div class="upload_close" @click="safetyCertificate.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div> | ||
| 270 | + <el-image | ||
| 271 | + style="width: 110px; height: 95px; margin: 5px;float:left;" | ||
| 272 | + :src="createUrl(item)" | ||
| 273 | + :preview-src-list="[createUrl(item)]" | ||
| 274 | + :z-index="999"> | ||
| 275 | + </el-image> | ||
| 276 | + </div> | ||
| 277 | + <div v-if="/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_file"> | ||
| 278 | + <div class="upload_close_file" @click="safetyCertificate.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div> | ||
| 279 | + <span @click="tempDownload(item)"><el-icon class="el-icon-document-add" style="font-size:70px;"></el-icon></span> | ||
| 280 | + <div style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" @click="tempDownload(item)">{{ item.name }}</div> | ||
| 281 | + </div> | ||
| 282 | + </div> | ||
| 283 | + </div> | ||
| 284 | + </el-col> | ||
| 285 | + </el-row> | ||
| 286 | + <el-row style="border: 1px solid #dcdfe6;border-radius: 2px;"> | ||
| 287 | + <el-col :span="3"> | ||
| 288 | + <div class="upload_lable"> | ||
| 289 | + 停车场全景图 | ||
| 290 | + <el-upload | ||
| 291 | + ref="upload" | ||
| 292 | + action="" | ||
| 293 | + accept=".jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx" | ||
| 294 | + :on-change="fileChange4" | ||
| 295 | + :auto-upload="false" | ||
| 296 | + :show-file-list="false" | ||
| 297 | + multiple | ||
| 298 | + :file-list="carParkPanorama"> | ||
| 299 | + <el-button size="small" type="primary" icon="el-icon-upload">上传附件</el-button> | ||
| 300 | + </el-upload> | ||
| 301 | + </div> | ||
| 302 | + </el-col> | ||
| 303 | + <el-col :span="21"> | ||
| 304 | + <div class="upload_btn"> | ||
| 305 | + <div v-for="(item,index) in carParkPanorama"> | ||
| 306 | + <div v-if="!/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_image"> | ||
| 307 | + <div class="upload_close" @click="carParkPanorama.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div> | ||
| 308 | + <el-image | ||
| 309 | + style="width: 110px; height: 95px; margin: 5px;float:left;" | ||
| 310 | + :src="createUrl(item)" | ||
| 311 | + :preview-src-list="[createUrl(item)]" | ||
| 312 | + :z-index="999"> | ||
| 313 | + </el-image> | ||
| 314 | + </div> | ||
| 315 | + <div v-if="/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_file"> | ||
| 316 | + <div class="upload_close_file" @click="carParkPanorama.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div> | ||
| 317 | + <span @click="tempDownload(item)"><el-icon class="el-icon-document-add" style="font-size:70px;"></el-icon></span> | ||
| 318 | + <div style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" @click="tempDownload(item)">{{ item.name }}</div> | ||
| 319 | + </div> | ||
| 320 | + </div> | ||
| 321 | + </div> | ||
| 322 | + </el-col> | ||
| 323 | + </el-row> | ||
| 324 | + <el-row style="border: 1px solid #dcdfe6;border-radius: 2px;"> | ||
| 325 | + <el-col :span="3"> | ||
| 326 | + <div class="upload_lable"> | ||
| 327 | + 公司头像或LOGO | ||
| 328 | + <el-upload | ||
| 329 | + ref="upload" | ||
| 330 | + action="" | ||
| 331 | + accept=".jpg,.jpeg,.png,.gif,.jfif,.pjpeg" | ||
| 332 | + :on-change="fileChange5" | ||
| 333 | + :auto-upload="false" | ||
| 334 | + :show-file-list="false" | ||
| 335 | + multiple | ||
| 336 | + :file-list="companyLogo"> | ||
| 337 | + <el-button size="small" type="primary" icon="el-icon-upload">上传附件</el-button> | ||
| 338 | + </el-upload> | ||
| 339 | + </div> | ||
| 340 | + </el-col> | ||
| 341 | + <el-col :span="21"> | ||
| 342 | + <div class="upload_btn"> | ||
| 343 | + <div v-for="(item,index) in companyLogo"> | ||
| 344 | + <div v-if="!/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_image"> | ||
| 345 | + <div class="upload_close" @click="companyLogo.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div> | ||
| 346 | + <el-image | ||
| 347 | + style="width: 110px; height: 95px; margin: 5px;float:left;" | ||
| 348 | + :src="createUrl(item)" | ||
| 349 | + :preview-src-list="[createUrl(item)]" | ||
| 350 | + :z-index="999"> | ||
| 351 | + </el-image> | ||
| 352 | + </div> | ||
| 353 | + </div> | ||
| 354 | + </div> | ||
| 355 | + </el-col> | ||
| 356 | + </el-row> | ||
| 357 | + <!-- <el-form-item label="" prop="environmentalApproval">--> | ||
| 358 | + <!-- <el-input v-model="form." type="textarea" placeholder="请输入内容" />--> | ||
| 359 | + <!-- </el-form-item>--> | ||
| 360 | + <!-- <el-form-item label="" prop="authorization">--> | ||
| 361 | + <!-- <el-input v-model="form." type="textarea" placeholder="请输入内容" />--> | ||
| 362 | + <!-- </el-form-item>--> | ||
| 363 | + <!-- <el-form-item label="" prop="otherInformation">--> | ||
| 364 | + <!-- <el-input v-model="form." type="textarea" placeholder="请输入内容" />--> | ||
| 365 | + <!-- </el-form-item>--> | ||
| 366 | + <!-- <el-form-item label="运输企业" prop="companyIds">--> | ||
| 367 | + <!-- <el-input v-model="form.companyIds" placeholder="请输入运输企业" />--> | ||
| 368 | + <!-- </el-form-item>--> | ||
| 369 | + <!-- <el-form-item label="审批状态,0=审批中,1=审批通过,2=被驳回">--> | ||
| 370 | + <!-- <el-radio-group v-model="form.status">--> | ||
| 371 | + <!-- <el-radio label="1">请选择字典生成</el-radio>--> | ||
| 372 | + <!-- </el-radio-group>--> | ||
| 373 | + <!-- </el-form-item>--> | ||
| 374 | + <!-- <el-form-item label="二维码" prop="qrCode">--> | ||
| 375 | + <!-- <el-input v-model="form.qrCode" placeholder="请输入二维码" />--> | ||
| 376 | + <!-- </el-form-item>--> | ||
| 377 | + </el-form> | ||
| 378 | + <div slot="footer" class="dialog-footer" style="margin-top: 20px"> | ||
| 379 | + <el-button type="primary" @click="submitForm">确 定</el-button> | ||
| 380 | + <el-button @click="cancel">取 消</el-button> | ||
| 381 | + </div> | ||
| 382 | + <el-dialog title="高德地图" :visible.sync="openMap" width="1600px" height="750px" append-to-body> | ||
| 383 | + <div class="serach_map"> | ||
| 384 | + 搜索: | ||
| 385 | + <el-select | ||
| 386 | + v-model="keywords" | ||
| 387 | + filterable | ||
| 388 | + remote | ||
| 389 | + placeholder="请输入关键词" | ||
| 390 | + :remote-method="remoteMethod" | ||
| 391 | + :loading="loading" | ||
| 392 | + :clearable="true" | ||
| 393 | + size="mini" | ||
| 394 | + @change="currentSelect" | ||
| 395 | + style="width: 250px" | ||
| 396 | + > | ||
| 397 | + <el-option | ||
| 398 | + v-for="item in mapOptions" | ||
| 399 | + :key="item.id" | ||
| 400 | + :label="item.name" | ||
| 401 | + :value="item" | ||
| 402 | + class="one-text" | ||
| 403 | + > | ||
| 404 | + <span style="float: left">{{ item.name }}</span> | ||
| 405 | + <span style="float: right; color: #8492a6; font-size: 13px">{{ | ||
| 406 | + item.district | ||
| 407 | + }}</span> | ||
| 408 | + </el-option> | ||
| 409 | + </el-select> | ||
| 410 | + </div> | ||
| 411 | + <div v-loading="loading" id="enterpriseContainer" class="am-map" style="width:100%;height: 700px;"></div> | ||
| 412 | + <div slot="footer" class="dialog-footer"> | ||
| 413 | + <el-button type="primary" @click="openMap = false">确 定</el-button> | ||
| 414 | + </div> | ||
| 415 | + </el-dialog> | ||
| 416 | + </div> | ||
| 417 | +</template> | ||
| 418 | + | ||
| 419 | +<script> | ||
| 420 | +import { listEnterprise, getEnterprise, delEnterprise, addEnterprise, updateEnterprise, exportEnterprise } from "@/api/unit/enterprise"; | ||
| 421 | +import Treeselect from "@riophae/vue-treeselect"; | ||
| 422 | +import '@riophae/vue-treeselect/dist/vue-treeselect.css' | ||
| 423 | +import {getAreaList} from "@/api/casefile/remoteServer"; | ||
| 424 | +import AMapLoader from '@amap/amap-jsapi-loader'; | ||
| 425 | + | ||
| 426 | +// 设置安全密钥 | ||
| 427 | +window._AMapSecurityConfig = { | ||
| 428 | + securityJsCode: 'aa1db7d8f534f3da3f6d8a6a71382802', | ||
| 429 | +} | ||
| 430 | +export default { | ||
| 431 | + name: "DisposalSite", | ||
| 432 | + components: {Treeselect,AMapLoader}, | ||
| 433 | + data() { | ||
| 434 | + return { | ||
| 435 | + // 遮罩层 | ||
| 436 | + loading: true, | ||
| 437 | + // 选中数组 | ||
| 438 | + ids: [], | ||
| 439 | + // 非单个禁用 | ||
| 440 | + single: true, | ||
| 441 | + // 非多个禁用 | ||
| 442 | + multiple: true, | ||
| 443 | + // 显示搜索条件 | ||
| 444 | + showSearch: true, | ||
| 445 | + // 总条数 | ||
| 446 | + total: 0, | ||
| 447 | + // 处理场所管理表格数据 | ||
| 448 | + disposalSiteList: [], | ||
| 449 | + // 弹出层标题 | ||
| 450 | + title: "", | ||
| 451 | + // 是否显示弹出层 | ||
| 452 | + open: false, | ||
| 453 | + openMap: false, | ||
| 454 | + // 表单参数 | ||
| 455 | + form: { | ||
| 456 | + officeAddress: "", | ||
| 457 | + }, | ||
| 458 | + // 表单校验 | ||
| 459 | + rules: { | ||
| 460 | + name: [ | ||
| 461 | + {required: true, message: "请输入企业名称", trigger: "blur"} | ||
| 462 | + ], | ||
| 463 | + abbreviation: [ | ||
| 464 | + {required: true, message: "请输入简称", trigger: "blur"} | ||
| 465 | + ], | ||
| 466 | + registrationArea: [ | ||
| 467 | + {required: true, message: "请输入注册地所在区域", trigger: "blur"} | ||
| 468 | + ], | ||
| 469 | + transportPermissionDate: [ | ||
| 470 | + {required: true, message: "请选择企业道路运输经营许可证有效期", trigger: "blur"} | ||
| 471 | + ], | ||
| 472 | + enterDate: [ | ||
| 473 | + {required: true, message: "请选择企业入市时间", trigger: "blur"} | ||
| 474 | + ], | ||
| 475 | + businessLicenseDate: [ | ||
| 476 | + {required: true, message: "请选择企业营业执照有效期", trigger: "blur"} | ||
| 477 | + ], | ||
| 478 | + parkingLotLocation: [ | ||
| 479 | + {required: true, message: "请输入停车场位置", trigger: "blur"} | ||
| 480 | + ], | ||
| 481 | + parkingArea: [ | ||
| 482 | + {required: true, message: "请输入停车场面积", trigger: "blur"}, | ||
| 483 | + {pattern: /^\d+(\.\d+)?$/, message: "只能输入正数和小数", trigger: "blur"} | ||
| 484 | + ], | ||
| 485 | + safetyManagerName: [ | ||
| 486 | + {required: true, message: "请输入企业安全负责人姓名", trigger: "blur"} | ||
| 487 | + ], | ||
| 488 | + socialUniformCreditCodeNumber: [ | ||
| 489 | + {required: true, message: "请输入社会统一信用代码编号", trigger: "blur"} | ||
| 490 | + ], | ||
| 491 | + legalRepresentative: [ | ||
| 492 | + {required: true, message: "请输入法人代表", trigger: "blur"} | ||
| 493 | + ], | ||
| 494 | + safetyPeopleName: [ | ||
| 495 | + {required: true, message: "请输入安全管理人员", trigger: "blur"} | ||
| 496 | + ], | ||
| 497 | + servicePhone: [ | ||
| 498 | + {required: true, message: "请输入企业服务手机号码", trigger: "blur"}, | ||
| 499 | + { | ||
| 500 | + pattern: /^1(3|4|5|7|8|9)\d{9}$/, | ||
| 501 | + message: '手机号格式错误', | ||
| 502 | + trigger: 'change' | ||
| 503 | + } | ||
| 504 | + ], | ||
| 505 | + offer: [ | ||
| 506 | + {required: true, message: "必填", trigger: "blur"}, | ||
| 507 | + { | ||
| 508 | + pattern: /^\d+(?:\.\d{1,2})?$/, | ||
| 509 | + message: "请输入正确的金额", | ||
| 510 | + trigger: "blur" | ||
| 511 | + } | ||
| 512 | + ], | ||
| 513 | + }, | ||
| 514 | + areas:[], | ||
| 515 | + // 企业道路运输经营许可证 | ||
| 516 | + transportPermission:[], | ||
| 517 | + // 企业营业执照 | ||
| 518 | + enterpriseBusinessLicense:[], | ||
| 519 | + // 安全员考核合格证明 | ||
| 520 | + safetyOfficerQualificationCertificate:[], | ||
| 521 | + // 企业负责人安全考核证 | ||
| 522 | + safetyCertificate:[], | ||
| 523 | + // 停车场全景图 | ||
| 524 | + carParkPanorama:[], | ||
| 525 | + //公司logo,公司头像 | ||
| 526 | + companyLogo:[], | ||
| 527 | + enterpriseList:[], | ||
| 528 | + // 地图 | ||
| 529 | + map: null, | ||
| 530 | + keywords: "", | ||
| 531 | + mapOptions: [], | ||
| 532 | + AutoComplete: null, | ||
| 533 | + searchMarker: null, | ||
| 534 | + }; | ||
| 535 | + }, | ||
| 536 | + | ||
| 537 | + created() { | ||
| 538 | + getAreaList().then(res => { | ||
| 539 | + this.areas = res.data; | ||
| 540 | + }); | ||
| 541 | + this.queryParams = { | ||
| 542 | + companyType:"0" | ||
| 543 | + } | ||
| 544 | + listEnterprise(this.queryParams).then(response => { | ||
| 545 | + this.enterpriseList = response.rows; | ||
| 546 | + }); | ||
| 547 | + this.initData(); | ||
| 548 | + }, | ||
| 549 | + watch: { | ||
| 550 | + '$route.query.enterpriseId': 'initData' | ||
| 551 | + }, | ||
| 552 | + methods: { | ||
| 553 | + openMapDialog(){ | ||
| 554 | + this.openMap = true; | ||
| 555 | + this.initAMap(); | ||
| 556 | + this.keywords = this.form.officeAddress; | ||
| 557 | + }, | ||
| 558 | + // 选中提示 | ||
| 559 | + currentSelect(val) { | ||
| 560 | + console.log(val); | ||
| 561 | + // 清空时不执行后面代码 | ||
| 562 | + if (!val) { | ||
| 563 | + return ; | ||
| 564 | + } | ||
| 565 | + | ||
| 566 | + //清除marker | ||
| 567 | + if (this.searchMarker){ | ||
| 568 | + this.map.remove(this.searchMarker) | ||
| 569 | + } | ||
| 570 | + //设置marker | ||
| 571 | + this.searchMarker = new AMap.Marker({ | ||
| 572 | + map: this.map, | ||
| 573 | + position: [val.location.lng, val.location.lat], | ||
| 574 | + }); | ||
| 575 | + // 自动适应显示想显示的范围区域 | ||
| 576 | + this.map.setFitView(); | ||
| 577 | + this.keywords = val.name | ||
| 578 | + //定位 | ||
| 579 | + this.map.setCenter([val.location.lng, val.location.lat]) | ||
| 580 | + this.form.officeAddressGps = val.location.lng+","+val.location.lat; | ||
| 581 | + this.form.officeAddress = val.district + val.name; | ||
| 582 | + }, | ||
| 583 | + // 搜索地址 | ||
| 584 | + remoteMethod(query) { | ||
| 585 | + if (query !== "") { | ||
| 586 | + this.loading = true; | ||
| 587 | + setTimeout(() => { | ||
| 588 | + this.loading = false; | ||
| 589 | + this.AutoComplete.search(query, (status, result) => { | ||
| 590 | + this.mapOptions = result.tips; | ||
| 591 | + }); | ||
| 592 | + }, 200); | ||
| 593 | + } else { | ||
| 594 | + this.mapOptions = []; | ||
| 595 | + } | ||
| 596 | + }, | ||
| 597 | + initAMap() { | ||
| 598 | + const _this = this | ||
| 599 | + // 加载高德地图 | ||
| 600 | + AMapLoader.load({ | ||
| 601 | + key: _this.$aMapKey, //设置高德地图申请的key | ||
| 602 | + version: "2.0", // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15 | ||
| 603 | + plugins: ['AMap.ToolBar', 'AMap.PolygonEditor','AMap.AutoComplete', 'AMap.PlaceSearch', 'AMap.Marker'], // 需要使用的的插件列表,如比例尺'AMap.Scale'等 | ||
| 604 | + AMapUI: { | ||
| 605 | + version: "1.1", | ||
| 606 | + plugins: [] | ||
| 607 | + }, | ||
| 608 | + Loca: { | ||
| 609 | + version: "2.0" | ||
| 610 | + }, | ||
| 611 | + }).then(async (AMap) => { | ||
| 612 | + _this.map = await new AMap.Map("enterpriseContainer", { //设置地图容器id | ||
| 613 | + viewMode: "2D", // 默认使用 2D 模式 | ||
| 614 | + center: [113.01814545605467, 28.201039299894283], // 初始化地图中心点位置 | ||
| 615 | + zoom: 11, //初始化地图层级 | ||
| 616 | + resizeEnable: true, | ||
| 617 | + willreadoften: true | ||
| 618 | + }); | ||
| 619 | + | ||
| 620 | + _this.AutoComplete = await new AMap.AutoComplete({city:'长沙'}); | ||
| 621 | + | ||
| 622 | + // 图层样式切换控件(卫星图) | ||
| 623 | + AMapUI.loadUI(['control/BasicControl'], function(BasicControl) { | ||
| 624 | + //图层切换控件 | ||
| 625 | + _this.map.addControl(new BasicControl.LayerSwitcher({ | ||
| 626 | + position: 'rb' // 右下角 | ||
| 627 | + })); | ||
| 628 | + }); | ||
| 629 | + | ||
| 630 | + if(_this.form.officeAddressGps.indexOf(",")>=0){ | ||
| 631 | + let lng = _this.form.officeAddressGps.split(",")[0]; | ||
| 632 | + let lat = _this.form.officeAddressGps.split(",")[1]; | ||
| 633 | + //清除marker | ||
| 634 | + if (_this.searchMarker){ | ||
| 635 | + _this.map.remove(_this.searchMarker) | ||
| 636 | + } | ||
| 637 | + //设置marker | ||
| 638 | + _this.searchMarker = new AMap.Marker({ | ||
| 639 | + map: this.map, | ||
| 640 | + position: [lng, lat], | ||
| 641 | + }); | ||
| 642 | + //定位 | ||
| 643 | + _this.map.setCenter([lng, lat]) | ||
| 644 | + // 自动适应显示想显示的范围区域 | ||
| 645 | + _this.map.setFitView(); | ||
| 646 | + } | ||
| 647 | + | ||
| 648 | + }).catch(e => { | ||
| 649 | + console.log(e); | ||
| 650 | + }); | ||
| 651 | + this.loading = false; | ||
| 652 | + // this.openMap = false; | ||
| 653 | + }, | ||
| 654 | + reset(){ | ||
| 655 | + this.form = {}; | ||
| 656 | + this.transportPermission = []; | ||
| 657 | + this.enterpriseBusinessLicense = []; | ||
| 658 | + this.safetyOfficerQualificationCertificate = []; | ||
| 659 | + this.safetyCertificate = []; | ||
| 660 | + this.carParkPanorama = []; | ||
| 661 | + this.companyLogo = []; | ||
| 662 | + }, | ||
| 663 | + initData(){ | ||
| 664 | + this.reset(); | ||
| 665 | + let id = this.$route.query.enterpriseId; | ||
| 666 | + if(id!=null){ | ||
| 667 | + getEnterprise(id).then(response => { | ||
| 668 | + this.form = response.data; | ||
| 669 | + //将附件转换为前端可视化数组 | ||
| 670 | + if(this.form.transportPermission!=null&&this.form.transportPermission!==""){ | ||
| 671 | + let approvalDocument = this.form.transportPermission.split(";"); | ||
| 672 | + approvalDocument.map(item=>{ | ||
| 673 | + let name = item.substring(item.lastIndexOf("/")+1); | ||
| 674 | + this.transportPermission.push({name:name,url:item}) | ||
| 675 | + }) | ||
| 676 | + } | ||
| 677 | + if(this.form.enterpriseBusinessLicense!=null&&this.form.enterpriseBusinessLicense!==""){ | ||
| 678 | + let approvalData = this.form.enterpriseBusinessLicense.split(";"); | ||
| 679 | + approvalData.map(item=>{ | ||
| 680 | + let name = item.substring(item.lastIndexOf("/")+1); | ||
| 681 | + this.enterpriseBusinessLicense.push({name:name,url:item}) | ||
| 682 | + }) | ||
| 683 | + } | ||
| 684 | + if(this.form.safetyOfficerQualificationCertificate!=null&&this.form.safetyOfficerQualificationCertificate!==""){ | ||
| 685 | + let scenePhoto = this.form.safetyOfficerQualificationCertificate.split(";"); | ||
| 686 | + scenePhoto.map(item=>{ | ||
| 687 | + let name = item.substring(item.lastIndexOf("/")+1); | ||
| 688 | + this.safetyOfficerQualificationCertificate.push({name:name,url:item}) | ||
| 689 | + }) | ||
| 690 | + } | ||
| 691 | + if(this.form.safetyCertificate!=null&&this.form.safetyCertificate!==""){ | ||
| 692 | + let carWashingFacilitiesImage = this.form.safetyCertificate.split(";"); | ||
| 693 | + carWashingFacilitiesImage.map(item=>{ | ||
| 694 | + let name = item.substring(item.lastIndexOf("/")+1); | ||
| 695 | + this.safetyCertificate.push({name:name,url:item}) | ||
| 696 | + }) | ||
| 697 | + } | ||
| 698 | + if(this.form.carParkPanorama!=null&&this.form.carParkPanorama!==""){ | ||
| 699 | + let safetyAssessmentReport = this.form.carParkPanorama.split(";"); | ||
| 700 | + safetyAssessmentReport.map(item=>{ | ||
| 701 | + let name = item.substring(item.lastIndexOf("/")+1); | ||
| 702 | + this.carParkPanorama.push({name:name,url:item}) | ||
| 703 | + }) | ||
| 704 | + } | ||
| 705 | + if(this.form.companyLogo!=null&&this.form.companyLogo!==""){ | ||
| 706 | + let safetyAssessmentReport = this.form.companyLogo.split(";"); | ||
| 707 | + safetyAssessmentReport.map(item=>{ | ||
| 708 | + let name = item.substring(item.lastIndexOf("/")+1); | ||
| 709 | + this.companyLogo.push({name:name,url:item}) | ||
| 710 | + }) | ||
| 711 | + } | ||
| 712 | + }); | ||
| 713 | + } | ||
| 714 | + }, | ||
| 715 | + createUrl(file){ | ||
| 716 | + if(file.raw!=null){ | ||
| 717 | + return URL.createObjectURL(file.raw); | ||
| 718 | + }else{ | ||
| 719 | + return process.env.VUE_APP_BASE_API + file.url; | ||
| 720 | + } | ||
| 721 | + | ||
| 722 | + }, | ||
| 723 | + tempDownload(row){ | ||
| 724 | + let name = row.name; | ||
| 725 | + let url = ""; | ||
| 726 | + if(row.raw!=null){ | ||
| 727 | + url = URL.createObjectURL(row.raw); | ||
| 728 | + }else{ | ||
| 729 | + url = process.env.VUE_APP_BASE_API + row.url; | ||
| 730 | + } | ||
| 731 | + const a = document.createElement('a') | ||
| 732 | + a.setAttribute('download', name) | ||
| 733 | + a.setAttribute('target', '_blank') | ||
| 734 | + a.setAttribute('href', url); | ||
| 735 | + a.click() | ||
| 736 | + }, | ||
| 737 | + // 取消按钮 | ||
| 738 | + cancel() { | ||
| 739 | + this.$tab.closePage({path:"/enterprise/info"}).then(() => { | ||
| 740 | + this.$tab.openPage("处理场所管理", "/tool/enterprise",{enterpriseRefresh:1}) | ||
| 741 | + }) | ||
| 742 | + }, | ||
| 743 | + /** 提交按钮 */ | ||
| 744 | + submitForm() { | ||
| 745 | + this.$refs["form"].validate(valid => { | ||
| 746 | + if (valid) { | ||
| 747 | + let phoneTest = /^1[3456789]\d{9}$/; | ||
| 748 | + if(phoneTest.test(this.form.safetyManagerPhone)===false){ | ||
| 749 | + this.msgError("请输入正确的企业安全负责人联系方式"); | ||
| 750 | + return false; | ||
| 751 | + } | ||
| 752 | + if(phoneTest.test(this.form.legalRepresentativePhone)===false){ | ||
| 753 | + this.msgError("请输入正确的法人代表联系方式"); | ||
| 754 | + return false; | ||
| 755 | + } | ||
| 756 | + let formData = new FormData(); | ||
| 757 | + let form = this.form; | ||
| 758 | + //去掉params属性 | ||
| 759 | + delete form.params; | ||
| 760 | + | ||
| 761 | + //先清空原有的附件 | ||
| 762 | + form.transportPermission = null; | ||
| 763 | + form.enterpriseBusinessLicense = null; | ||
| 764 | + form.safetyOfficerQualificationCertificate = null; | ||
| 765 | + form.safetyCertificate = null; | ||
| 766 | + form.carParkPanorama = null; | ||
| 767 | + form.companyLogo = null; | ||
| 768 | + form.companyType = "1"; | ||
| 769 | + | ||
| 770 | + this.transportPermission.forEach(item => { | ||
| 771 | + if (item.raw != null) { | ||
| 772 | + formData.append('transportPermissionFiles', item.raw) | ||
| 773 | + }else{ | ||
| 774 | + //将原有的附件拼接到form中 | ||
| 775 | + form.transportPermission = form.transportPermission!==null?form.transportPermission+";"+item.url:item.url; | ||
| 776 | + } | ||
| 777 | + }) | ||
| 778 | + | ||
| 779 | + this.enterpriseBusinessLicense.forEach(item => { | ||
| 780 | + if (item.raw != null) { | ||
| 781 | + formData.append('enterpriseBusinessLicenseFiles', item.raw) | ||
| 782 | + }else{ | ||
| 783 | + //将原有的附件拼接到form中 | ||
| 784 | + form.enterpriseBusinessLicense = form.enterpriseBusinessLicense!==null?form.enterpriseBusinessLicense+";"+item.url:item.url; | ||
| 785 | + } | ||
| 786 | + }) | ||
| 787 | + this.safetyOfficerQualificationCertificate.forEach(item => { | ||
| 788 | + if (item.raw != null) { | ||
| 789 | + formData.append('safetyOfficerQualificationCertificateFiles', item.raw) | ||
| 790 | + }else{ | ||
| 791 | + //将原有的附件拼接到form中 | ||
| 792 | + form.safetyOfficerQualificationCertificate = form.safetyOfficerQualificationCertificate!==null?form.safetyOfficerQualificationCertificate+";"+item.url:item.url; | ||
| 793 | + } | ||
| 794 | + }) | ||
| 795 | + this.safetyCertificate.forEach(item => { | ||
| 796 | + if (item.raw != null) { | ||
| 797 | + formData.append('safetyCertificateFiles', item.raw) | ||
| 798 | + }else{ | ||
| 799 | + //将原有的附件拼接到form中 | ||
| 800 | + form.safetyCertificate = form.safetyCertificate!==null?form.safetyCertificate+";"+item.url:item.url; | ||
| 801 | + } | ||
| 802 | + }) | ||
| 803 | + this.carParkPanorama.forEach(item => { | ||
| 804 | + if (item.raw != null) { | ||
| 805 | + formData.append('carParkPanoramaFiles', item.raw) | ||
| 806 | + }else{ | ||
| 807 | + //将原有的附件拼接到form中 | ||
| 808 | + form.carParkPanorama = form.carParkPanorama!==null?form.carParkPanorama+";"+item.url:item.url; | ||
| 809 | + } | ||
| 810 | + }) | ||
| 811 | + this.companyLogo.forEach(item => { | ||
| 812 | + if (item.raw != null) { | ||
| 813 | + formData.append('companyLogoFiles', item.raw) | ||
| 814 | + }else{ | ||
| 815 | + //将原有的附件拼接到form中 | ||
| 816 | + form.companyLogo = form.companyLogo!==null?form.companyLogo+";"+item.url:item.url; | ||
| 817 | + } | ||
| 818 | + }) | ||
| 819 | + for (let key in form) { | ||
| 820 | + formData.append(key, form[key] == null ? "" : form[key]) | ||
| 821 | + } | ||
| 822 | + if (this.form.id != null) { | ||
| 823 | + updateEnterprise(formData).then(response => { | ||
| 824 | + this.msgSuccess("修改成功"); | ||
| 825 | + this.$tab.closePage({path:"/enterprise/infoEdit"}).then(() => { | ||
| 826 | + this.$tab.openPage("运输企业管理", "/tool/enterprise",{enterpriseRefresh:1}) | ||
| 827 | + }) | ||
| 828 | + }); | ||
| 829 | + } else { | ||
| 830 | + addEnterprise(formData).then(response => { | ||
| 831 | + this.msgSuccess("新增成功"); | ||
| 832 | + this.$tab.closePage({path:"/enterprise/info"}).then(() => { | ||
| 833 | + this.$tab.openPage("运输企业管理", "/tool/enterprise",{enterpriseRefresh:1}) | ||
| 834 | + }) | ||
| 835 | + }); | ||
| 836 | + } | ||
| 837 | + } | ||
| 838 | + }); | ||
| 839 | + }, | ||
| 840 | + /** | ||
| 841 | + * 文件改变时,限制文件上传格式和大小 | ||
| 842 | + * 文件格式只能为docx/doc/pdf/png/jpeg/png/jpg | ||
| 843 | + * 大小不超过20M | ||
| 844 | + * */ | ||
| 845 | + fileChange(file, fileList) { | ||
| 846 | + let count = 0; | ||
| 847 | + for (let i = 0; i < fileList.length; i++) { | ||
| 848 | + // console.log(fileList.length) | ||
| 849 | + // console.log(this.fileEntityList[i].name+"111"+file.name) | ||
| 850 | + if (fileList[i].name == file.name) { | ||
| 851 | + count++; | ||
| 852 | + if (count == 2) { | ||
| 853 | + this.$message({ | ||
| 854 | + message: '已存在此文件!', | ||
| 855 | + type: 'warning' | ||
| 856 | + }); | ||
| 857 | + for (let j = fileList.length; j > 0; j--) { | ||
| 858 | + //如果存在此文件,去除新选择的重复文件 | ||
| 859 | + if (fileList[j - 1].name == file.name) { | ||
| 860 | + fileList.splice(j - 1, 1); | ||
| 861 | + i--; | ||
| 862 | + return false; | ||
| 863 | + } | ||
| 864 | + } | ||
| 865 | + } | ||
| 866 | + } | ||
| 867 | + } | ||
| 868 | + let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase(); | ||
| 869 | + //格式符合后判断大小 | ||
| 870 | + if ("jpg,jpeg,png,gif,jfif,pjpeg,pjp,pdf,doc,docx,xls,xlsx".indexOf(fileType) != -1) { | ||
| 871 | + let max5M = file.size / 1024 / 1024 < 100; | ||
| 872 | + if (!max5M) { | ||
| 873 | + this.$message({ | ||
| 874 | + message: '上传文件大小不得超过100M!', | ||
| 875 | + type: 'warning' | ||
| 876 | + }); | ||
| 877 | + fileList = fileList.splice(fileList.length - 1, 1); | ||
| 878 | + } else { | ||
| 879 | + //符合条件后进行添加 | ||
| 880 | + this.transportPermission = fileList | ||
| 881 | + } | ||
| 882 | + } else { | ||
| 883 | + this.$message({ | ||
| 884 | + message: '上传文件只能是.jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx格式!', | ||
| 885 | + type: 'warning' | ||
| 886 | + }); | ||
| 887 | + fileList = fileList.splice(fileList.length - 1, 1); | ||
| 888 | + } | ||
| 889 | + }, | ||
| 890 | + fileChange1(file, fileList) { | ||
| 891 | + let count = 0; | ||
| 892 | + for (let i = 0; i < fileList.length; i++) { | ||
| 893 | + // console.log(fileList.length) | ||
| 894 | + // console.log(this.fileEntityList[i].name+"111"+file.name) | ||
| 895 | + if (fileList[i].name == file.name) { | ||
| 896 | + count++; | ||
| 897 | + if (count == 2) { | ||
| 898 | + this.$message({ | ||
| 899 | + message: '已存在此文件!', | ||
| 900 | + type: 'warning' | ||
| 901 | + }); | ||
| 902 | + for (let j = fileList.length; j > 0; j--) { | ||
| 903 | + //如果存在此文件,去除新选择的重复文件 | ||
| 904 | + if (fileList[j - 1].name == file.name) { | ||
| 905 | + fileList.splice(j - 1, 1); | ||
| 906 | + i--; | ||
| 907 | + return false; | ||
| 908 | + } | ||
| 909 | + } | ||
| 910 | + } | ||
| 911 | + } | ||
| 912 | + } | ||
| 913 | + let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase(); | ||
| 914 | + //格式符合后判断大小 | ||
| 915 | + if ("jpg,jpeg,png,gif,jfif,pjpeg,pjp,pdf,doc,docx,xls,xlsx".indexOf(fileType) != -1) { | ||
| 916 | + let max5M = file.size / 1024 / 1024 < 100; | ||
| 917 | + if (!max5M) { | ||
| 918 | + this.$message({ | ||
| 919 | + message: '上传文件大小不得超过100M!', | ||
| 920 | + type: 'warning' | ||
| 921 | + }); | ||
| 922 | + fileList = fileList.splice(fileList.length - 1, 1); | ||
| 923 | + } else { | ||
| 924 | + //符合条件后进行添加 | ||
| 925 | + this.enterpriseBusinessLicense = fileList | ||
| 926 | + } | ||
| 927 | + } else { | ||
| 928 | + this.$message({ | ||
| 929 | + message: '上传文件只能是.jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx格式!', | ||
| 930 | + type: 'warning' | ||
| 931 | + }); | ||
| 932 | + fileList = fileList.splice(fileList.length - 1, 1); | ||
| 933 | + } | ||
| 934 | + }, | ||
| 935 | + fileChange2(file, fileList) { | ||
| 936 | + let count = 0; | ||
| 937 | + for (let i = 0; i < fileList.length; i++) { | ||
| 938 | + // console.log(fileList.length) | ||
| 939 | + // console.log(this.fileEntityList[i].name+"111"+file.name) | ||
| 940 | + if (fileList[i].name == file.name) { | ||
| 941 | + count++; | ||
| 942 | + if (count == 2) { | ||
| 943 | + this.$message({ | ||
| 944 | + message: '已存在此文件!', | ||
| 945 | + type: 'warning' | ||
| 946 | + }); | ||
| 947 | + for (let j = fileList.length; j > 0; j--) { | ||
| 948 | + //如果存在此文件,去除新选择的重复文件 | ||
| 949 | + if (fileList[j - 1].name == file.name) { | ||
| 950 | + fileList.splice(j - 1, 1); | ||
| 951 | + i--; | ||
| 952 | + return false; | ||
| 953 | + } | ||
| 954 | + } | ||
| 955 | + } | ||
| 956 | + } | ||
| 957 | + } | ||
| 958 | + let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase(); | ||
| 959 | + //格式符合后判断大小 | ||
| 960 | + if ("jpg,jpeg,png,gif,jfif,pjpeg,pjp,pdf,doc,docx,xls,xlsx".indexOf(fileType) != -1) { | ||
| 961 | + let max5M = file.size / 1024 / 1024 < 100; | ||
| 962 | + if (!max5M) { | ||
| 963 | + this.$message({ | ||
| 964 | + message: '上传文件大小不得超过100M!', | ||
| 965 | + type: 'warning' | ||
| 966 | + }); | ||
| 967 | + fileList = fileList.splice(fileList.length - 1, 1); | ||
| 968 | + } else { | ||
| 969 | + //符合条件后进行添加 | ||
| 970 | + this.safetyOfficerQualificationCertificate = fileList | ||
| 971 | + } | ||
| 972 | + } else { | ||
| 973 | + this.$message({ | ||
| 974 | + message: '上传文件只能是.jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx格式!', | ||
| 975 | + type: 'warning' | ||
| 976 | + }); | ||
| 977 | + fileList = fileList.splice(fileList.length - 1, 1); | ||
| 978 | + } | ||
| 979 | + }, | ||
| 980 | + fileChange3(file, fileList) { | ||
| 981 | + let count = 0; | ||
| 982 | + for (let i = 0; i < fileList.length; i++) { | ||
| 983 | + // console.log(fileList.length) | ||
| 984 | + // console.log(this.fileEntityList[i].name+"111"+file.name) | ||
| 985 | + if (fileList[i].name == file.name) { | ||
| 986 | + count++; | ||
| 987 | + if (count == 2) { | ||
| 988 | + this.$message({ | ||
| 989 | + message: '已存在此文件!', | ||
| 990 | + type: 'warning' | ||
| 991 | + }); | ||
| 992 | + for (let j = fileList.length; j > 0; j--) { | ||
| 993 | + //如果存在此文件,去除新选择的重复文件 | ||
| 994 | + if (fileList[j - 1].name == file.name) { | ||
| 995 | + fileList.splice(j - 1, 1); | ||
| 996 | + i--; | ||
| 997 | + return false; | ||
| 998 | + } | ||
| 999 | + } | ||
| 1000 | + } | ||
| 1001 | + } | ||
| 1002 | + } | ||
| 1003 | + let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase(); | ||
| 1004 | + //格式符合后判断大小 | ||
| 1005 | + if ("jpg,jpeg,png,gif,jfif,pjpeg,pjp,pdf,doc,docx,xls,xlsx".indexOf(fileType) != -1) { | ||
| 1006 | + let max5M = file.size / 1024 / 1024 < 100; | ||
| 1007 | + if (!max5M) { | ||
| 1008 | + this.$message({ | ||
| 1009 | + message: '上传文件大小不得超过100M!', | ||
| 1010 | + type: 'warning' | ||
| 1011 | + }); | ||
| 1012 | + fileList = fileList.splice(fileList.length - 1, 1); | ||
| 1013 | + } else { | ||
| 1014 | + //符合条件后进行添加 | ||
| 1015 | + this.safetyCertificate = fileList | ||
| 1016 | + } | ||
| 1017 | + } else { | ||
| 1018 | + this.$message({ | ||
| 1019 | + message: '上传文件只能是.jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx格式!', | ||
| 1020 | + type: 'warning' | ||
| 1021 | + }); | ||
| 1022 | + fileList = fileList.splice(fileList.length - 1, 1); | ||
| 1023 | + } | ||
| 1024 | + }, | ||
| 1025 | + fileChange4(file, fileList) { | ||
| 1026 | + let count = 0; | ||
| 1027 | + for (let i = 0; i < fileList.length; i++) { | ||
| 1028 | + // console.log(fileList.length) | ||
| 1029 | + // console.log(this.fileEntityList[i].name+"111"+file.name) | ||
| 1030 | + if (fileList[i].name == file.name) { | ||
| 1031 | + count++; | ||
| 1032 | + if (count == 2) { | ||
| 1033 | + this.$message({ | ||
| 1034 | + message: '已存在此文件!', | ||
| 1035 | + type: 'warning' | ||
| 1036 | + }); | ||
| 1037 | + for (let j = fileList.length; j > 0; j--) { | ||
| 1038 | + //如果存在此文件,去除新选择的重复文件 | ||
| 1039 | + if (fileList[j - 1].name == file.name) { | ||
| 1040 | + fileList.splice(j - 1, 1); | ||
| 1041 | + i--; | ||
| 1042 | + return false; | ||
| 1043 | + } | ||
| 1044 | + } | ||
| 1045 | + } | ||
| 1046 | + } | ||
| 1047 | + } | ||
| 1048 | + let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase(); | ||
| 1049 | + //格式符合后判断大小 | ||
| 1050 | + if ("jpg,jpeg,png,gif,jfif,pjpeg,pjp,pdf,doc,docx,xls,xlsx".indexOf(fileType) != -1) { | ||
| 1051 | + let max5M = file.size / 1024 / 1024 < 100; | ||
| 1052 | + if (!max5M) { | ||
| 1053 | + this.$message({ | ||
| 1054 | + message: '上传文件大小不得超过100M!', | ||
| 1055 | + type: 'warning' | ||
| 1056 | + }); | ||
| 1057 | + fileList = fileList.splice(fileList.length - 1, 1); | ||
| 1058 | + } else { | ||
| 1059 | + //符合条件后进行添加 | ||
| 1060 | + this.carParkPanorama = fileList | ||
| 1061 | + } | ||
| 1062 | + } else { | ||
| 1063 | + this.$message({ | ||
| 1064 | + message: '上传文件只能是.jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx格式!', | ||
| 1065 | + type: 'warning' | ||
| 1066 | + }); | ||
| 1067 | + fileList = fileList.splice(fileList.length - 1, 1); | ||
| 1068 | + } | ||
| 1069 | + }, | ||
| 1070 | + fileChange5(file, fileList) { | ||
| 1071 | + if(fileList.length>1){ | ||
| 1072 | + this.$message({ | ||
| 1073 | + message: '只能上传一张图片!', | ||
| 1074 | + type: 'warning' | ||
| 1075 | + }); | ||
| 1076 | + return false; | ||
| 1077 | + } | ||
| 1078 | + let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase(); | ||
| 1079 | + //格式符合后判断大小 | ||
| 1080 | + if ("jpg,jpeg,png,gif,jfif,pjpeg".indexOf(fileType) != -1) { | ||
| 1081 | + let max5M = file.size / 1024 / 1024 < 100; | ||
| 1082 | + if (!max5M) { | ||
| 1083 | + this.$message({ | ||
| 1084 | + message: '上传文件大小不得超过100M!', | ||
| 1085 | + type: 'warning' | ||
| 1086 | + }); | ||
| 1087 | + fileList = fileList.splice(fileList.length - 1, 1); | ||
| 1088 | + } else { | ||
| 1089 | + //符合条件后进行添加 | ||
| 1090 | + this.companyLogo = fileList | ||
| 1091 | + } | ||
| 1092 | + } else { | ||
| 1093 | + this.$message({ | ||
| 1094 | + message: '上传文件只能是.jpg,.jpeg,.png,.gif,.jfif,.pjpeg格式!', | ||
| 1095 | + type: 'warning' | ||
| 1096 | + }); | ||
| 1097 | + fileList = fileList.splice(fileList.length - 1, 1); | ||
| 1098 | + } | ||
| 1099 | + }, | ||
| 1100 | + } | ||
| 1101 | +}; | ||
| 1102 | +</script> | ||
| 1103 | +<style lang="scss" scoped> | ||
| 1104 | +.upload_lable{ | ||
| 1105 | + border-right: 1px solid #dcdfe6; | ||
| 1106 | + padding: 27px 30px; | ||
| 1107 | + background: #fafafa; | ||
| 1108 | + text-align: center; | ||
| 1109 | +} | ||
| 1110 | +.upload_btn{ | ||
| 1111 | + max-height: 106px; | ||
| 1112 | +} | ||
| 1113 | +.upload_close{ | ||
| 1114 | + position: absolute; | ||
| 1115 | + left: 105px; | ||
| 1116 | + z-index:99; | ||
| 1117 | + top:-1px; | ||
| 1118 | + font-size:18px; | ||
| 1119 | + color:red; | ||
| 1120 | +} | ||
| 1121 | +.upload_close_file{ | ||
| 1122 | + position: absolute; | ||
| 1123 | + left: 80px; | ||
| 1124 | + z-index:99; | ||
| 1125 | + top:-1px; | ||
| 1126 | + font-size:18px; | ||
| 1127 | + color:red; | ||
| 1128 | +} | ||
| 1129 | +.upload_div_image{ | ||
| 1130 | + display: inline-block; | ||
| 1131 | + width: 110px; | ||
| 1132 | + height: 95px; | ||
| 1133 | + position: relative; | ||
| 1134 | + float: left; | ||
| 1135 | + margin-left: 5px; | ||
| 1136 | +} | ||
| 1137 | +.upload_div_file{ | ||
| 1138 | + display: inline-block; | ||
| 1139 | + width: 110px; | ||
| 1140 | + height: 95px; | ||
| 1141 | + text-align: center; | ||
| 1142 | + float:left; | ||
| 1143 | + margin: 5px; | ||
| 1144 | + position: relative; | ||
| 1145 | +} | ||
| 1146 | +.serach_map{ | ||
| 1147 | + position: absolute; | ||
| 1148 | + top: 100px; | ||
| 1149 | + left: 25px; | ||
| 1150 | + z-index: 999; | ||
| 1151 | + background: #fff; | ||
| 1152 | + padding: 10px; | ||
| 1153 | + border-radius: 5px; | ||
| 1154 | + box-shadow: 0 0 10px rgba(0,0,0,.2); | ||
| 1155 | +} | ||
| 1156 | +</style> |
trash-unit/src/main/java/com/trash/disposalSite/domain/DisposalSite.java
| @@ -32,8 +32,12 @@ public class DisposalSite extends BaseEntity | @@ -32,8 +32,12 @@ public class DisposalSite extends BaseEntity | ||
| 32 | @Excel(name = "所在地址") | 32 | @Excel(name = "所在地址") |
| 33 | private String address; | 33 | private String address; |
| 34 | 34 | ||
| 35 | + /** 所在地址GPS */ | ||
| 36 | + @Excel(name = "所在地址Gps") | ||
| 37 | + private String addressGps; | ||
| 38 | + | ||
| 35 | /** 消纳(回填)场所工程性质 */ | 39 | /** 消纳(回填)场所工程性质 */ |
| 36 | - @Excel(name = "消纳", readConverterExp = "回=填") | 40 | + @Excel(name = "消纳(回填)场所工程性质") |
| 37 | private String engineeringProperty; | 41 | private String engineeringProperty; |
| 38 | 42 | ||
| 39 | /** 建筑垃圾处理场所类型 */ | 43 | /** 建筑垃圾处理场所类型 */ |
| @@ -53,11 +57,11 @@ public class DisposalSite extends BaseEntity | @@ -53,11 +57,11 @@ public class DisposalSite extends BaseEntity | ||
| 53 | private String trashType; | 57 | private String trashType; |
| 54 | 58 | ||
| 55 | /** 建设(施工)单位名称 */ | 59 | /** 建设(施工)单位名称 */ |
| 56 | - @Excel(name = "建设", readConverterExp = "施=工") | 60 | + @Excel(name = "建设(施工)单位名称") |
| 57 | private String constructionUnit; | 61 | private String constructionUnit; |
| 58 | 62 | ||
| 59 | /** 建设(施工)单位责任人 */ | 63 | /** 建设(施工)单位责任人 */ |
| 60 | - @Excel(name = "建设", readConverterExp = "施=工") | 64 | + @Excel(name = "建设(施工)单位责任人") |
| 61 | private String constructionUnitPerson; | 65 | private String constructionUnitPerson; |
| 62 | 66 | ||
| 63 | /** 责任人联系电话 */ | 67 | /** 责任人联系电话 */ |
| @@ -174,6 +178,14 @@ public class DisposalSite extends BaseEntity | @@ -174,6 +178,14 @@ public class DisposalSite extends BaseEntity | ||
| 174 | @Excel(name = "审核情况") | 178 | @Excel(name = "审核情况") |
| 175 | private String auditStatus; | 179 | private String auditStatus; |
| 176 | 180 | ||
| 181 | + public String getAddressGps() { | ||
| 182 | + return addressGps; | ||
| 183 | + } | ||
| 184 | + | ||
| 185 | + public void setAddressGps(String addressGps) { | ||
| 186 | + this.addressGps = addressGps; | ||
| 187 | + } | ||
| 188 | + | ||
| 177 | public String getAuditStatus() { | 189 | public String getAuditStatus() { |
| 178 | return auditStatus; | 190 | return auditStatus; |
| 179 | } | 191 | } |
| @@ -560,6 +572,7 @@ public class DisposalSite extends BaseEntity | @@ -560,6 +572,7 @@ public class DisposalSite extends BaseEntity | ||
| 560 | .append("updateTime", getUpdateTime()) | 572 | .append("updateTime", getUpdateTime()) |
| 561 | .append("updateBy", getUpdateBy()) | 573 | .append("updateBy", getUpdateBy()) |
| 562 | .append("qrCode", getQrCode()) | 574 | .append("qrCode", getQrCode()) |
| 575 | + .append("addressGps", getAddressGps()) | ||
| 563 | .toString(); | 576 | .toString(); |
| 564 | } | 577 | } |
| 565 | } | 578 | } |
trash-unit/src/main/java/com/trash/gps/domain/GpsOrientation.java
| @@ -55,6 +55,19 @@ public class GpsOrientation extends BaseEntity | @@ -55,6 +55,19 @@ public class GpsOrientation extends BaseEntity | ||
| 55 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | 55 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| 56 | private String createTimeEnd; | 56 | private String createTimeEnd; |
| 57 | 57 | ||
| 58 | + /** | ||
| 59 | + * 速度 km/h | ||
| 60 | + */ | ||
| 61 | + private String speed; | ||
| 62 | + | ||
| 63 | + public String getSpeed() { | ||
| 64 | + return speed; | ||
| 65 | + } | ||
| 66 | + | ||
| 67 | + public void setSpeed(String speed) { | ||
| 68 | + this.speed = speed; | ||
| 69 | + } | ||
| 70 | + | ||
| 58 | public String getCreateTimeStart() { | 71 | public String getCreateTimeStart() { |
| 59 | return createTimeStart; | 72 | return createTimeStart; |
| 60 | } | 73 | } |
trash-unit/src/main/resources/mapper/unit/DisposalSiteMapper.xml
| @@ -47,10 +47,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -47,10 +47,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 47 | <result property="updateBy" column="update_by" /> | 47 | <result property="updateBy" column="update_by" /> |
| 48 | <result property="qrCode" column="qr_code" /> | 48 | <result property="qrCode" column="qr_code" /> |
| 49 | <result property="auditStatus" column="audit_status" /> | 49 | <result property="auditStatus" column="audit_status" /> |
| 50 | + <result property="addressGps" column="address_gps" /> | ||
| 50 | </resultMap> | 51 | </resultMap> |
| 51 | 52 | ||
| 52 | <sql id="selectDisposalSiteVo"> | 53 | <sql id="selectDisposalSiteVo"> |
| 53 | - select id, name, certificate_number, address, engineering_property, site_type, local_area, operating_area, trash_type, construction_unit, construction_unit_person, construction_unit_person_phone, validity_begin_date, validity_end_date, square_measure, surplus_square_measure, car_washing_facilities, exit_road_condition, lighting_facility, video_surveillance_facility, preparer, handling_advice, absorb_source, electronic_fence, credit_status, approval_document, approval_data, scene_photo, car_washing_facilities_image, term_range, safety_assessment_report, environmental_approval, `authorization`, other_information, company_ids, status, create_time, create_by, update_time, update_by, qr_code,audit_status from disposal_site | 54 | + select id, name, certificate_number, address, engineering_property, site_type, local_area, operating_area, trash_type, construction_unit, construction_unit_person, construction_unit_person_phone, validity_begin_date, validity_end_date, square_measure, surplus_square_measure, car_washing_facilities, exit_road_condition, lighting_facility, video_surveillance_facility, preparer, handling_advice, absorb_source, electronic_fence, credit_status, approval_document, approval_data, scene_photo, car_washing_facilities_image, term_range, safety_assessment_report, environmental_approval, `authorization`, other_information, company_ids, status, create_time, create_by, update_time, update_by, qr_code,audit_status,address_gps from disposal_site |
| 54 | </sql> | 55 | </sql> |
| 55 | 56 | ||
| 56 | <select id="selectDisposalSiteList" parameterType="DisposalSite" resultMap="DisposalSiteResult"> | 57 | <select id="selectDisposalSiteList" parameterType="DisposalSite" resultMap="DisposalSiteResult"> |
| @@ -87,7 +88,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -87,7 +88,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 87 | <if test="termRange != null and termRange != ''"> and term_range = #{termRange}</if> | 88 | <if test="termRange != null and termRange != ''"> and term_range = #{termRange}</if> |
| 88 | <if test="safetyAssessmentReport != null and safetyAssessmentReport != ''"> and safety_assessment_report = #{safetyAssessmentReport}</if> | 89 | <if test="safetyAssessmentReport != null and safetyAssessmentReport != ''"> and safety_assessment_report = #{safetyAssessmentReport}</if> |
| 89 | <if test="environmentalApproval != null and environmentalApproval != ''"> and environmental_approval = #{environmentalApproval}</if> | 90 | <if test="environmentalApproval != null and environmentalApproval != ''"> and environmental_approval = #{environmentalApproval}</if> |
| 90 | - <if test="authorization != null and authorization != ''"> and authorization = #{authorization}</if> | 91 | + <if test="authorization != null and authorization != ''"> and `authorization` = #{authorization}</if> |
| 91 | <if test="otherInformation != null and otherInformation != ''"> and other_information = #{otherInformation}</if> | 92 | <if test="otherInformation != null and otherInformation != ''"> and other_information = #{otherInformation}</if> |
| 92 | <if test="companyIds != null and companyIds != ''"> and company_ids = #{companyIds}</if> | 93 | <if test="companyIds != null and companyIds != ''"> and company_ids = #{companyIds}</if> |
| 93 | <if test="status != null "> and status = #{status}</if> | 94 | <if test="status != null "> and status = #{status}</if> |
| @@ -135,7 +136,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -135,7 +136,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 135 | <if test="termRange != null">term_range,</if> | 136 | <if test="termRange != null">term_range,</if> |
| 136 | <if test="safetyAssessmentReport != null">safety_assessment_report,</if> | 137 | <if test="safetyAssessmentReport != null">safety_assessment_report,</if> |
| 137 | <if test="environmentalApproval != null">environmental_approval,</if> | 138 | <if test="environmentalApproval != null">environmental_approval,</if> |
| 138 | - <if test="authorization != null">authorization,</if> | 139 | + <if test="authorization != null">`authorization`,</if> |
| 139 | <if test="otherInformation != null">other_information,</if> | 140 | <if test="otherInformation != null">other_information,</if> |
| 140 | <if test="companyIds != null">company_ids,</if> | 141 | <if test="companyIds != null">company_ids,</if> |
| 141 | <if test="status != null">status,</if> | 142 | <if test="status != null">status,</if> |
| @@ -145,6 +146,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -145,6 +146,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 145 | <if test="updateBy != null">update_by,</if> | 146 | <if test="updateBy != null">update_by,</if> |
| 146 | <if test="qrCode != null">qr_code,</if> | 147 | <if test="qrCode != null">qr_code,</if> |
| 147 | <if test="auditStatus != null">audit_status,</if> | 148 | <if test="auditStatus != null">audit_status,</if> |
| 149 | + <if test="addressGps != null">address_gps,</if> | ||
| 148 | </trim> | 150 | </trim> |
| 149 | <trim prefix="values (" suffix=")" suffixOverrides=","> | 151 | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| 150 | <if test="name != null">#{name},</if> | 152 | <if test="name != null">#{name},</if> |
| @@ -188,6 +190,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -188,6 +190,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 188 | <if test="updateBy != null">#{updateBy},</if> | 190 | <if test="updateBy != null">#{updateBy},</if> |
| 189 | <if test="qrCode != null">#{qrCode},</if> | 191 | <if test="qrCode != null">#{qrCode},</if> |
| 190 | <if test="auditStatus != null">#{auditStatus},</if> | 192 | <if test="auditStatus != null">#{auditStatus},</if> |
| 193 | + <if test="addressGps != null">#{addressGps},</if> | ||
| 191 | </trim> | 194 | </trim> |
| 192 | </insert> | 195 | </insert> |
| 193 | 196 | ||
| @@ -225,7 +228,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -225,7 +228,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 225 | <if test="termRange != null">term_range = #{termRange},</if> | 228 | <if test="termRange != null">term_range = #{termRange},</if> |
| 226 | <if test="safetyAssessmentReport != null">safety_assessment_report = #{safetyAssessmentReport},</if> | 229 | <if test="safetyAssessmentReport != null">safety_assessment_report = #{safetyAssessmentReport},</if> |
| 227 | <if test="environmentalApproval != null">environmental_approval = #{environmentalApproval},</if> | 230 | <if test="environmentalApproval != null">environmental_approval = #{environmentalApproval},</if> |
| 228 | - <if test="authorization != null">authorization = #{authorization},</if> | 231 | + <if test="authorization != null">`authorization` = #{authorization},</if> |
| 229 | <if test="otherInformation != null">other_information = #{otherInformation},</if> | 232 | <if test="otherInformation != null">other_information = #{otherInformation},</if> |
| 230 | <if test="companyIds != null">company_ids = #{companyIds},</if> | 233 | <if test="companyIds != null">company_ids = #{companyIds},</if> |
| 231 | <if test="status != null">`status` = #{status},</if> | 234 | <if test="status != null">`status` = #{status},</if> |
| @@ -233,6 +236,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -233,6 +236,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 233 | <if test="updateBy != null">update_by = #{updateBy},</if> | 236 | <if test="updateBy != null">update_by = #{updateBy},</if> |
| 234 | <if test="qrCode != null">qr_code = #{qrCode},</if> | 237 | <if test="qrCode != null">qr_code = #{qrCode},</if> |
| 235 | <if test="auditStatus != null">audit_status = #{auditStatus},</if> | 238 | <if test="auditStatus != null">audit_status = #{auditStatus},</if> |
| 239 | + <if test="addressGps != null">address_gps = #{addressGps},</if> | ||
| 236 | </trim> | 240 | </trim> |
| 237 | where id = #{id} | 241 | where id = #{id} |
| 238 | </update> | 242 | </update> |
trash-unit/src/main/resources/mapper/unit/GpsOrientationMapper.xml
| @@ -11,10 +11,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -11,10 +11,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 11 | <result property="latitude" column="latitude" /> | 11 | <result property="latitude" column="latitude" /> |
| 12 | <result property="createTime" column="create_time" /> | 12 | <result property="createTime" column="create_time" /> |
| 13 | <result property="carCode" column="car_code" /> | 13 | <result property="carCode" column="car_code" /> |
| 14 | + <result property="speed" column="speed" /> | ||
| 14 | </resultMap> | 15 | </resultMap> |
| 15 | 16 | ||
| 16 | <sql id="selectGpsOrientationVo"> | 17 | <sql id="selectGpsOrientationVo"> |
| 17 | - select id, terminal_number, longitude, latitude, create_time,car_code from gps_orientation_${yearMonth} | 18 | + select id, terminal_number, longitude, latitude, create_time,car_code,speed from gps_orientation_${yearMonth} |
| 18 | </sql> | 19 | </sql> |
| 19 | 20 | ||
| 20 | <select id="selectGpsOrientationList" parameterType="GpsOrientation" resultMap="GpsOrientationResult"> | 21 | <select id="selectGpsOrientationList" parameterType="GpsOrientation" resultMap="GpsOrientationResult"> |
| @@ -39,6 +40,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -39,6 +40,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 39 | <if test="latitude != null">latitude,</if> | 40 | <if test="latitude != null">latitude,</if> |
| 40 | <if test="createTime != null">create_time,</if> | 41 | <if test="createTime != null">create_time,</if> |
| 41 | <if test="carCode != null">car_code,</if> | 42 | <if test="carCode != null">car_code,</if> |
| 43 | + <if test="speed != null">speed,</if> | ||
| 42 | </trim> | 44 | </trim> |
| 43 | <trim prefix="values (" suffix=")" suffixOverrides=","> | 45 | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| 44 | <if test="terminalNumber != null">#{terminalNumber},</if> | 46 | <if test="terminalNumber != null">#{terminalNumber},</if> |
| @@ -46,6 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -46,6 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 46 | <if test="latitude != null">#{latitude},</if> | 48 | <if test="latitude != null">#{latitude},</if> |
| 47 | <if test="createTime != null">#{createTime},</if> | 49 | <if test="createTime != null">#{createTime},</if> |
| 48 | <if test="carCode != null">#{carCode},</if> | 50 | <if test="carCode != null">#{carCode},</if> |
| 51 | + <if test="speed != null">#{speed},</if> | ||
| 49 | </trim> | 52 | </trim> |
| 50 | </insert> | 53 | </insert> |
| 51 | 54 | ||
| @@ -57,6 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -57,6 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 57 | <if test="latitude != null">latitude = #{latitude},</if> | 60 | <if test="latitude != null">latitude = #{latitude},</if> |
| 58 | <if test="createTime != null">create_time = #{createTime},</if> | 61 | <if test="createTime != null">create_time = #{createTime},</if> |
| 59 | <if test="carCode != null">car_code = #{carCode},</if> | 62 | <if test="carCode != null">car_code = #{carCode},</if> |
| 63 | + <if test="speed != null">speed = #{speed},</if> | ||
| 60 | </trim> | 64 | </trim> |
| 61 | where id = #{id} | 65 | where id = #{id} |
| 62 | </update> | 66 | </update> |
| @@ -85,6 +89,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -85,6 +89,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 85 | latitude varchar(20) DEFAULT NULL COMMENT '纬度', | 89 | latitude varchar(20) DEFAULT NULL COMMENT '纬度', |
| 86 | create_time datetime DEFAULT NULL COMMENT '创建时间', | 90 | create_time datetime DEFAULT NULL COMMENT '创建时间', |
| 87 | car_code varchar(20) DEFAULT NULL COMMENT '车牌号', | 91 | car_code varchar(20) DEFAULT NULL COMMENT '车牌号', |
| 92 | + speed varchar(20) DEFAULT NULL COMMENT '速度km/h', | ||
| 88 | PRIMARY KEY (id) | 93 | PRIMARY KEY (id) |
| 89 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='gps定位表'; | 94 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='gps定位表'; |
| 90 | </update> | 95 | </update> |
trash-workFlow/src/main/java/com/trash/casefile/kafka/Producer.java
0 → 100644
| 1 | +package com.trash.casefile.kafka; | ||
| 2 | + | ||
| 3 | +import org.slf4j.Logger; | ||
| 4 | +import org.slf4j.LoggerFactory; | ||
| 5 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 6 | +import org.springframework.kafka.core.KafkaTemplate; | ||
| 7 | +import org.springframework.kafka.support.SendResult; | ||
| 8 | +import org.springframework.stereotype.Component; | ||
| 9 | +import org.springframework.util.concurrent.ListenableFuture; | ||
| 10 | +import org.springframework.util.concurrent.ListenableFutureCallback; | ||
| 11 | + | ||
| 12 | +/** | ||
| 13 | + * kafka数据对接-生产者 | ||
| 14 | + */ | ||
| 15 | +@Component("producer") | ||
| 16 | +public class Producer { | ||
| 17 | + @Autowired | ||
| 18 | + private KafkaTemplate kafkaTemplate; | ||
| 19 | + | ||
| 20 | + private static final Logger log = LoggerFactory.getLogger(Producer.class); | ||
| 21 | + | ||
| 22 | + /** | ||
| 23 | + * 发送数据 | ||
| 24 | + * @param json | ||
| 25 | + */ | ||
| 26 | + public void sendLog(String json,String key){ | ||
| 27 | + ListenableFuture<SendResult<String, String>> future = kafkaTemplate.send("TEST",key,json); | ||
| 28 | + future.addCallback(new ListenableFutureCallback<SendResult<String, String>>() { | ||
| 29 | + | ||
| 30 | + @Override | ||
| 31 | + public void onSuccess(SendResult<String, String> result) { | ||
| 32 | + log.info("kafka发送数据成功"+json, result); | ||
| 33 | + } | ||
| 34 | + | ||
| 35 | + @Override | ||
| 36 | + public void onFailure(Throwable ex) { | ||
| 37 | + log.error("kafka发送数据异常", ex); | ||
| 38 | + } | ||
| 39 | + }); | ||
| 40 | + } | ||
| 41 | + | ||
| 42 | + | ||
| 43 | +} |