Commit ea295712cca64b9a3f2011610dbe687e0d34c5f0
Merge remote-tracking branch 'origin/dev' into dev
Showing
6 changed files
with
1564 additions
and
5 deletions
trash-ui/src/router/index.js
| ... | ... | @@ -126,7 +126,7 @@ export const constantRoutes = [ |
| 126 | 126 | }, |
| 127 | 127 | { |
| 128 | 128 | path: '/disposalSite/infoEdit', |
| 129 | - component: (resolve) => require(['@/views/unit/disposalSite/info'], resolve), | |
| 129 | + component: (resolve) => require(['@/views/unit/disposalSite/infoEdit'], resolve), | |
| 130 | 130 | name: '修改处理场所', |
| 131 | 131 | hidden: true, |
| 132 | 132 | meta: { title: '修改处理场所' } | ... | ... |
trash-ui/src/views/unit/carInfo/index.vue
| ... | ... | @@ -231,7 +231,7 @@ export default { |
| 231 | 231 | /** 修改按钮操作 */ |
| 232 | 232 | handleUpdate(row) { |
| 233 | 233 | const id = row.id || this.ids |
| 234 | - this.$tab.openPage("修改运输企业","/carInfo/infoEdit",{carInfoId: id,carInfoRefresh:0}); | |
| 234 | + this.$tab.openPage("修改车辆信息","/carInfo/infoEdit",{carInfoId: id,carInfoRefresh:0}); | |
| 235 | 235 | }, |
| 236 | 236 | /** 提交按钮 */ |
| 237 | 237 | submitForm() { | ... | ... |
trash-ui/src/views/unit/disposalSite/index.vue
| ... | ... | @@ -255,7 +255,7 @@ export default { |
| 255 | 255 | }, |
| 256 | 256 | /** 新增按钮操作 */ |
| 257 | 257 | handleAdd() { |
| 258 | - this.$tab.openPage("新增处理场所管理","/disposalSite/info",{disposalSiteRefresh:0}); | |
| 258 | + this.$tab.openPage("新增处理场所","/disposalSite/info",{disposalSiteRefresh:0}); | |
| 259 | 259 | }, |
| 260 | 260 | /** 修改按钮操作 */ |
| 261 | 261 | handleUpdate(row) { | ... | ... |
trash-ui/src/views/unit/disposalSite/info.vue
| ... | ... | @@ -981,6 +981,7 @@ export default { |
| 981 | 981 | this.$alert('左键单击地图添加点,左键双击编辑,右键双击地图结束绘制', '温馨提示', { |
| 982 | 982 | confirmButtonText: '确定', |
| 983 | 983 | callback: action => { |
| 984 | + console.log(this.map) | |
| 984 | 985 | let path = this.form.electronicFence.split(";"); |
| 985 | 986 | path.map(item=>{ |
| 986 | 987 | let arr = item.split(","); | ... | ... |
trash-ui/src/views/unit/disposalSite/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="6"> | |
| 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="6"> | |
| 16 | + <el-form-item label="证书编号" prop="certificateNumber"> | |
| 17 | + <el-input v-model="form.certificateNumber" placeholder="请输入证书编号" /> | |
| 18 | + </el-form-item> | |
| 19 | + </el-col> | |
| 20 | + <el-col :span="6"> | |
| 21 | + <el-form-item label="所在地址" prop="address"> | |
| 22 | + <el-input v-model="form.address" placeholder="请输入所在地址" /> | |
| 23 | + </el-form-item> | |
| 24 | + </el-col> | |
| 25 | + </el-row> | |
| 26 | + <el-row :gutter="30"> | |
| 27 | + <el-col :span="6"> | |
| 28 | + <el-form-item label="所在区域" prop="localArea"> | |
| 29 | + <el-select v-model="form.localArea" placeholder="请选择所在区域" style="width: 100%"> | |
| 30 | + <el-option v-for="(area,index) in areas" :label="area.name" :value="area.name" :key="index"/> | |
| 31 | + </el-select> | |
| 32 | + </el-form-item> | |
| 33 | + </el-col> | |
| 34 | + <el-col :span="6"> | |
| 35 | + <el-form-item label="建筑垃圾处理场所类型" prop="siteType"> | |
| 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="盾构土环保处置场" /> | |
| 40 | + </el-select> | |
| 41 | + </el-form-item> | |
| 42 | + </el-col> | |
| 43 | + <el-col :span="6"> | |
| 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="覆绿造景工程" /> | |
| 54 | + </el-select> | |
| 55 | + </el-form-item> | |
| 56 | + </el-col> | |
| 57 | + </el-row> | |
| 58 | + <el-row :gutter="30"> | |
| 59 | + <el-col :span="6"> | |
| 60 | + <el-form-item label="作业区域" prop="operatingArea"> | |
| 61 | + <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="外环区域" /> | |
| 65 | + </el-select> | |
| 66 | + </el-form-item> | |
| 67 | + </el-col> | |
| 68 | + <el-col :span="6"> | |
| 69 | + <el-form-item label="可受纳建筑垃圾类型" prop="trashType"> | |
| 70 | + <treeselect v-model="form.trashType" :multiple="true" :options="options" placeholder="请选择"/> | |
| 71 | + </el-form-item> | |
| 72 | + </el-col> | |
| 73 | + <el-col :span="6"> | |
| 74 | + <el-form-item label="建设(施工)单位名称" prop="constructionUnit"> | |
| 75 | + <el-input v-model="form.constructionUnit" placeholder="请输入建设(施工)单位名称" /> | |
| 76 | + </el-form-item> | |
| 77 | + </el-col> | |
| 78 | + </el-row> | |
| 79 | + <el-row :gutter="30"> | |
| 80 | + <el-col :span="6"> | |
| 81 | + <el-form-item label="建设(施工)单位责任人" prop="constructionUnitPerson"> | |
| 82 | + <el-input v-model="form.constructionUnitPerson" placeholder="请输入建设(施工)单位责任人" /> | |
| 83 | + </el-form-item> | |
| 84 | + </el-col> | |
| 85 | + <el-col :span="6"> | |
| 86 | + <el-form-item label="责任人联系电话" prop="constructionUnitPersonPhone"> | |
| 87 | + <el-input v-model="form.constructionUnitPersonPhone" placeholder="请输入责任人联系电话" :maxlength="11" show-word-limit/> | |
| 88 | + </el-form-item> | |
| 89 | + </el-col> | |
| 90 | + <el-col :span="6"> | |
| 91 | + </el-col> | |
| 92 | + </el-row> | |
| 93 | + | |
| 94 | + <el-row :gutter="30"> | |
| 95 | + <el-col :span="6"> | |
| 96 | + <el-form-item label="有限期开始时间" prop="validityBeginDate"> | |
| 97 | + <el-date-picker clearable size="small" style="width: 100%" | |
| 98 | + v-model="form.validityBeginDate" | |
| 99 | + type="date" | |
| 100 | + value-format="yyyy-MM-dd" | |
| 101 | + placeholder="选择有限期开始时间"> | |
| 102 | + </el-date-picker> | |
| 103 | + </el-form-item> | |
| 104 | + | |
| 105 | + </el-col> | |
| 106 | + <el-col :span="6"> | |
| 107 | + <el-form-item label="有限期结束时间" prop="validityEndDate"> | |
| 108 | + <el-date-picker clearable size="small" style="width: 100%" | |
| 109 | + v-model="form.validityEndDate" | |
| 110 | + type="date" | |
| 111 | + value-format="yyyy-MM-dd" | |
| 112 | + placeholder="选择有限期结束时间"> | |
| 113 | + </el-date-picker> | |
| 114 | + </el-form-item> | |
| 115 | + </el-col> | |
| 116 | + <el-col :span="6"> | |
| 117 | + <el-form-item label="审批方量(m³)" prop="squareMeasure"> | |
| 118 | + <el-input v-model="form.squareMeasure" placeholder="请输入审批方量(m³)" /> | |
| 119 | + </el-form-item> | |
| 120 | + </el-col> | |
| 121 | + </el-row> | |
| 122 | + <!-- <el-form-item label="剩余方量" prop="surplusSquareMeasure">--> | |
| 123 | + <!-- <el-input v-model="form.surplusSquareMeasure" placeholder="请输入剩余方量" />--> | |
| 124 | + <!-- </el-form-item>--> | |
| 125 | + <el-row :gutter="30"> | |
| 126 | + <el-col :span="6"> | |
| 127 | + <el-form-item label="洗车作业设施" prop="carWashingFacilities"> | |
| 128 | + <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="特殊事项" /> | |
| 133 | + </el-select> | |
| 134 | + </el-form-item> | |
| 135 | + </el-col> | |
| 136 | + <el-col :span="6"> | |
| 137 | + <el-form-item label="出口道路状况" prop="exitRoadCondition"> | |
| 138 | + <el-select v-model="form.exitRoadCondition" placeholder="请选择出口道路状况" style="width: 100%"> | |
| 139 | + <el-option label="硬化" value="硬化" /> | |
| 140 | + <el-option label="未硬化" value="未硬化" /> | |
| 141 | + </el-select> | |
| 142 | + </el-form-item> | |
| 143 | + </el-col> | |
| 144 | + </el-row> | |
| 145 | + <el-row :gutter="30"> | |
| 146 | + <el-col :span="6"> | |
| 147 | + <el-form-item label="照明设施" prop="lightingFacility"> | |
| 148 | + <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="不适用" /> | |
| 152 | + </el-select> | |
| 153 | + </el-form-item> | |
| 154 | + </el-col> | |
| 155 | + <el-col :span="6"> | |
| 156 | + <el-form-item label="视频监控设施" prop="videoSurveillanceFacility"> | |
| 157 | + <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="不适用" /> | |
| 161 | + </el-select> | |
| 162 | + </el-form-item> | |
| 163 | + </el-col> | |
| 164 | + </el-row> | |
| 165 | + <el-row :gutter="30"> | |
| 166 | + <el-col :span="6"> | |
| 167 | + <el-form-item label="填表人" prop="preparer"> | |
| 168 | + <el-input v-model="form.preparer" placeholder="请输入填表人" /> | |
| 169 | + </el-form-item> | |
| 170 | + </el-col> | |
| 171 | + <el-col :span="6"> | |
| 172 | + <el-form-item label="办理意见" prop="handlingAdvice"> | |
| 173 | + <el-input v-model="form.handlingAdvice" placeholder="请输入内容" /> | |
| 174 | + </el-form-item> | |
| 175 | + </el-col> | |
| 176 | + </el-row> | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + <!-- <el-form-item label="消纳来源" prop="absorbSource">--> | |
| 182 | + <!-- <el-input v-model="form.absorbSource" placeholder="请输入消纳来源" />--> | |
| 183 | + <!-- </el-form-item>--> | |
| 184 | + <el-form-item label="电子围栏" prop="electronicFence"> | |
| 185 | + <template v-slot:label> | |
| 186 | + <el-tooltip class="item" placement="right" style="float:left;"> | |
| 187 | + <div slot="content"> | |
| 188 | + 请保证经度在前,维度在后,中间用,隔开。多个坐标点之间用“;”隔开,示例:118.121,110.112;118.111,110.112 | |
| 189 | + </div> | |
| 190 | + <div class="tips"> | |
| 191 | + <span class="tipsSpan"> | |
| 192 | + 电子围栏 | |
| 193 | + </span> | |
| 194 | + <i class="el-icon-question"></i> | |
| 195 | + </div> | |
| 196 | + </el-tooltip> | |
| 197 | + <el-button @click="draw" type="text" style="float: left;margin-left: 10px">绘制围栏</el-button> | |
| 198 | + </template> | |
| 199 | + | |
| 200 | + <el-input v-model="form.electronicFence" type="textarea" placeholder="请输入内容" style="width: 49%"/> | |
| 201 | + </el-form-item> | |
| 202 | + <!-- <el-form-item label="信用状态">--> | |
| 203 | + <!-- <el-radio-group v-model="form.creditStatus">--> | |
| 204 | + <!-- <el-radio label="1">请选择字典生成</el-radio>--> | |
| 205 | + <!-- </el-radio-group>--> | |
| 206 | + <!-- </el-form-item>--> | |
| 207 | + <el-row style="border: 1px solid #dcdfe6;border-radius: 2px;"> | |
| 208 | + <el-col :span="3"> | |
| 209 | + <div class="upload_lable"> | |
| 210 | + 批准文件 | |
| 211 | + <el-upload | |
| 212 | + ref="upload" | |
| 213 | + action="" | |
| 214 | + accept=".jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx" | |
| 215 | + :on-change="fileChange" | |
| 216 | + :auto-upload="false" | |
| 217 | + :show-file-list="false" | |
| 218 | + multiple | |
| 219 | + :file-list="approvalDocument"> | |
| 220 | + | |
| 221 | + <el-button size="small" type="primary" icon="el-icon-upload">上传附件</el-button> | |
| 222 | + </el-upload> | |
| 223 | + </div> | |
| 224 | + </el-col> | |
| 225 | + <el-col :span="21"> | |
| 226 | + <div class="upload_btn"> | |
| 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"> | |
| 229 | + <div class="upload_close" @click="approvalDocument.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div> | |
| 230 | + <el-image | |
| 231 | + style="width: 110px; height: 95px; margin: 5px;float:left;" | |
| 232 | + :src="createUrl(item)" | |
| 233 | + :preview-src-list="[createUrl(item)]" | |
| 234 | + :z-index="999"> | |
| 235 | + </el-image> | |
| 236 | + </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> | |
| 241 | + </div> | |
| 242 | + </div> | |
| 243 | + </div> | |
| 244 | + </el-col> | |
| 245 | + </el-row> | |
| 246 | + <el-row style="border: 1px solid #dcdfe6;border-radius: 2px;"> | |
| 247 | + <el-col :span="3"> | |
| 248 | + <div class="upload_lable"> | |
| 249 | + 审批资料 | |
| 250 | + <el-upload | |
| 251 | + ref="upload" | |
| 252 | + action="" | |
| 253 | + accept=".jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx" | |
| 254 | + :on-change="fileChange1" | |
| 255 | + :auto-upload="false" | |
| 256 | + :show-file-list="false" | |
| 257 | + multiple | |
| 258 | + :file-list="approvalData"> | |
| 259 | + <el-button size="small" type="primary" icon="el-icon-upload">上传附件</el-button> | |
| 260 | + </el-upload> | |
| 261 | + </div> | |
| 262 | + </el-col> | |
| 263 | + <el-col :span="21"> | |
| 264 | + <div class="upload_btn"> | |
| 265 | + <div v-for="(item,index) in approvalData"> | |
| 266 | + <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> | |
| 268 | + <el-image | |
| 269 | + style="width: 110px; height: 95px; margin: 5px;float:left;" | |
| 270 | + :src="createUrl(item)" | |
| 271 | + :preview-src-list="[createUrl(item)]" | |
| 272 | + :z-index="999"> | |
| 273 | + </el-image> | |
| 274 | + </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> | |
| 279 | + </div> | |
| 280 | + </div> | |
| 281 | + </div> | |
| 282 | + </el-col> | |
| 283 | + </el-row> | |
| 284 | + <el-row style="border: 1px solid #dcdfe6;border-radius: 2px;"> | |
| 285 | + <el-col :span="3"> | |
| 286 | + <div class="upload_lable"> | |
| 287 | + 现场照片 | |
| 288 | + <el-upload | |
| 289 | + ref="upload" | |
| 290 | + action="" | |
| 291 | + accept=".jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx" | |
| 292 | + :on-change="fileChange2" | |
| 293 | + :auto-upload="false" | |
| 294 | + :show-file-list="false" | |
| 295 | + multiple | |
| 296 | + :file-list="scenePhoto"> | |
| 297 | + <el-button size="small" type="primary" icon="el-icon-upload">上传附件</el-button> | |
| 298 | + </el-upload> | |
| 299 | + </div> | |
| 300 | + </el-col> | |
| 301 | + <el-col :span="21"> | |
| 302 | + <div class="upload_btn"> | |
| 303 | + <div v-for="(item,index) in scenePhoto"> | |
| 304 | + <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> | |
| 306 | + <el-image | |
| 307 | + style="width: 110px; height: 95px; margin: 5px;float:left;" | |
| 308 | + :src="createUrl(item)" | |
| 309 | + :preview-src-list="[createUrl(item)]" | |
| 310 | + :z-index="999"> | |
| 311 | + </el-image> | |
| 312 | + </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> | |
| 317 | + </div> | |
| 318 | + </div> | |
| 319 | + </div> | |
| 320 | + </el-col> | |
| 321 | + </el-row> | |
| 322 | + <el-row style="border: 1px solid #dcdfe6;border-radius: 2px;"> | |
| 323 | + <el-col :span="3"> | |
| 324 | + <div class="upload_lable"> | |
| 325 | + 洗车设施照片 | |
| 326 | + <el-upload | |
| 327 | + ref="upload" | |
| 328 | + action="" | |
| 329 | + accept=".jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx" | |
| 330 | + :on-change="fileChange3" | |
| 331 | + :auto-upload="false" | |
| 332 | + :show-file-list="false" | |
| 333 | + multiple | |
| 334 | + :file-list="carWashingFacilitiesImage"> | |
| 335 | + <el-button size="small" type="primary" icon="el-icon-upload">上传附件</el-button> | |
| 336 | + </el-upload> | |
| 337 | + </div> | |
| 338 | + </el-col> | |
| 339 | + <el-col :span="21"> | |
| 340 | + <div class="upload_btn"> | |
| 341 | + <div v-for="(item,index) in carWashingFacilitiesImage"> | |
| 342 | + <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> | |
| 344 | + <el-image | |
| 345 | + style="width: 110px; height: 95px; margin: 5px;float:left;" | |
| 346 | + :src="createUrl(item)" | |
| 347 | + :preview-src-list="[createUrl(item)]" | |
| 348 | + :z-index="999"> | |
| 349 | + </el-image> | |
| 350 | + </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> | |
| 355 | + </div> | |
| 356 | + </div> | |
| 357 | + </div> | |
| 358 | + </el-col> | |
| 359 | + </el-row> | |
| 360 | + <el-row style="border: 1px solid #dcdfe6;border-radius: 2px;"> | |
| 361 | + <el-col :span="3"> | |
| 362 | + <div class="upload_lable"> | |
| 363 | + 安全评估报告 | |
| 364 | + <el-upload | |
| 365 | + ref="upload" | |
| 366 | + action="" | |
| 367 | + accept=".jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx" | |
| 368 | + :on-change="fileChange4" | |
| 369 | + :auto-upload="false" | |
| 370 | + :show-file-list="false" | |
| 371 | + multiple | |
| 372 | + :file-list="safetyAssessmentReport"> | |
| 373 | + <el-button size="small" type="primary" icon="el-icon-upload">上传附件</el-button> | |
| 374 | + </el-upload> | |
| 375 | + </div> | |
| 376 | + </el-col> | |
| 377 | + <el-col :span="21"> | |
| 378 | + <div class="upload_btn"> | |
| 379 | + <div v-for="(item,index) in safetyAssessmentReport"> | |
| 380 | + <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> | |
| 382 | + <el-image | |
| 383 | + style="width: 110px; height: 95px; margin: 5px;float:left;" | |
| 384 | + :src="createUrl(item)" | |
| 385 | + :preview-src-list="[createUrl(item)]" | |
| 386 | + :z-index="999"> | |
| 387 | + </el-image> | |
| 388 | + </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> | |
| 393 | + </div> | |
| 394 | + </div> | |
| 395 | + </div> | |
| 396 | + </el-col> | |
| 397 | + </el-row> | |
| 398 | + <el-row style="border: 1px solid #dcdfe6;border-radius: 2px;"> | |
| 399 | + <el-col :span="3"> | |
| 400 | + <div class="upload_lable"> | |
| 401 | + 环评报告及环保部门批复 | |
| 402 | + <el-upload | |
| 403 | + ref="upload" | |
| 404 | + action="" | |
| 405 | + accept=".jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx" | |
| 406 | + :on-change="fileChange5" | |
| 407 | + :auto-upload="false" | |
| 408 | + :show-file-list="false" | |
| 409 | + multiple | |
| 410 | + :file-list="environmentalApproval"> | |
| 411 | + <el-button size="small" type="primary" icon="el-icon-upload">上传附件</el-button> | |
| 412 | + </el-upload> | |
| 413 | + </div> | |
| 414 | + </el-col> | |
| 415 | + <el-col :span="21"> | |
| 416 | + <div class="upload_btn"> | |
| 417 | + <div v-for="(item,index) in environmentalApproval"> | |
| 418 | + <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> | |
| 420 | + <el-image | |
| 421 | + style="width: 110px; height: 95px; margin: 5px;float:left;" | |
| 422 | + :src="createUrl(item)" | |
| 423 | + :preview-src-list="[createUrl(item)]" | |
| 424 | + :z-index="999"> | |
| 425 | + </el-image> | |
| 426 | + </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> | |
| 431 | + </div> | |
| 432 | + </div> | |
| 433 | + </div> | |
| 434 | + </el-col> | |
| 435 | + </el-row> | |
| 436 | + <el-row style="border: 1px solid #dcdfe6;border-radius: 2px;"> | |
| 437 | + <el-col :span="3"> | |
| 438 | + <div class="upload_lable"> | |
| 439 | + 签署消纳合同授权委托书 | |
| 440 | + <el-upload | |
| 441 | + ref="upload" | |
| 442 | + action="" | |
| 443 | + accept=".jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx" | |
| 444 | + :on-change="fileChange6" | |
| 445 | + :auto-upload="false" | |
| 446 | + :show-file-list="false" | |
| 447 | + multiple | |
| 448 | + :file-list="authorization"> | |
| 449 | + <el-button size="small" type="primary" icon="el-icon-upload">上传附件</el-button> | |
| 450 | + </el-upload> | |
| 451 | + </div> | |
| 452 | + </el-col> | |
| 453 | + <el-col :span="21"> | |
| 454 | + <div class="upload_btn"> | |
| 455 | + <div v-for="(item,index) in authorization"> | |
| 456 | + <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> | |
| 458 | + <el-image | |
| 459 | + style="width: 110px; height: 95px; margin: 5px;float:left;" | |
| 460 | + :src="createUrl(item)" | |
| 461 | + :preview-src-list="[createUrl(item)]" | |
| 462 | + :z-index="999"> | |
| 463 | + </el-image> | |
| 464 | + </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> | |
| 469 | + </div> | |
| 470 | + </div> | |
| 471 | + </div> | |
| 472 | + </el-col> | |
| 473 | + </el-row> | |
| 474 | + <el-row style="border: 1px solid #dcdfe6;border-radius: 2px;"> | |
| 475 | + <el-col :span="3"> | |
| 476 | + <div class="upload_lable"> | |
| 477 | + 其他资料 | |
| 478 | + <el-upload | |
| 479 | + ref="upload" | |
| 480 | + action="" | |
| 481 | + accept=".jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx" | |
| 482 | + :on-change="fileChange7" | |
| 483 | + :auto-upload="false" | |
| 484 | + :show-file-list="false" | |
| 485 | + multiple | |
| 486 | + :file-list="otherInformation"> | |
| 487 | + <el-button size="small" type="primary" icon="el-icon-upload">上传附件</el-button> | |
| 488 | + </el-upload> | |
| 489 | + </div> | |
| 490 | + </el-col> | |
| 491 | + <el-col :span="21"> | |
| 492 | + <div class="upload_btn"> | |
| 493 | + <div v-for="(item,index) in otherInformation"> | |
| 494 | + <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> | |
| 496 | + <el-image | |
| 497 | + style="width: 110px; height: 95px; margin: 5px;float:left;" | |
| 498 | + :src="createUrl(item)" | |
| 499 | + :preview-src-list="[createUrl(item)]" | |
| 500 | + :z-index="999"> | |
| 501 | + </el-image> | |
| 502 | + </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> | |
| 507 | + </div> | |
| 508 | + </div> | |
| 509 | + </div> | |
| 510 | + </el-col> | |
| 511 | + </el-row> | |
| 512 | + <!-- <el-form-item label="" prop="environmentalApproval">--> | |
| 513 | + <!-- <el-input v-model="form." type="textarea" placeholder="请输入内容" />--> | |
| 514 | + <!-- </el-form-item>--> | |
| 515 | + <!-- <el-form-item label="" prop="authorization">--> | |
| 516 | + <!-- <el-input v-model="form." type="textarea" placeholder="请输入内容" />--> | |
| 517 | + <!-- </el-form-item>--> | |
| 518 | + <!-- <el-form-item label="" prop="otherInformation">--> | |
| 519 | + <!-- <el-input v-model="form." type="textarea" placeholder="请输入内容" />--> | |
| 520 | + <!-- </el-form-item>--> | |
| 521 | + <!-- <el-form-item label="运输企业" prop="companyIds">--> | |
| 522 | + <!-- <el-input v-model="form.companyIds" placeholder="请输入运输企业" />--> | |
| 523 | + <!-- </el-form-item>--> | |
| 524 | + <!-- <el-form-item label="审批状态,0=审批中,1=审批通过,2=被驳回">--> | |
| 525 | + <!-- <el-radio-group v-model="form.status">--> | |
| 526 | + <!-- <el-radio label="1">请选择字典生成</el-radio>--> | |
| 527 | + <!-- </el-radio-group>--> | |
| 528 | + <!-- </el-form-item>--> | |
| 529 | + <!-- <el-form-item label="二维码" prop="qrCode">--> | |
| 530 | + <!-- <el-input v-model="form.qrCode" placeholder="请输入二维码" />--> | |
| 531 | + <!-- </el-form-item>--> | |
| 532 | + </el-form> | |
| 533 | + <div slot="footer" class="dialog-footer" style="margin-top: 20px"> | |
| 534 | + <el-button type="primary" @click="submitForm">确 定</el-button> | |
| 535 | + <el-button @click="cancel">取 消</el-button> | |
| 536 | + </div> | |
| 537 | + <el-dialog title="高德地图" :visible.sync="openMap" width="1600px" height="750px" append-to-body> | |
| 538 | + <div class="serach_map"> | |
| 539 | + 搜索: | |
| 540 | + <el-select | |
| 541 | + v-model="keywords" | |
| 542 | + filterable | |
| 543 | + remote | |
| 544 | + placeholder="请输入关键词" | |
| 545 | + :remote-method="remoteMethod" | |
| 546 | + :loading="loading" | |
| 547 | + :clearable="true" | |
| 548 | + size="mini" | |
| 549 | + @change="currentSelect" | |
| 550 | + style="width: 250px" | |
| 551 | + > | |
| 552 | + <el-option | |
| 553 | + v-for="item in mapOptions" | |
| 554 | + :key="item.id" | |
| 555 | + :label="item.name" | |
| 556 | + :value="item" | |
| 557 | + class="one-text" | |
| 558 | + > | |
| 559 | + <span style="float: left">{{ item.name }}</span> | |
| 560 | + <span style="float: right; color: #8492a6; font-size: 13px">{{ | |
| 561 | + item.district | |
| 562 | + }}</span> | |
| 563 | + </el-option> | |
| 564 | + </el-select> | |
| 565 | + </div> | |
| 566 | + <div v-loading="loading" id="zcContainer1" class="am-map" style="width:100%;height: 700px;"></div> | |
| 567 | + <div slot="footer" class="dialog-footer"> | |
| 568 | + <el-button @click="clearPolyEditor">清 空</el-button> | |
| 569 | + <el-button @click="closeMap">取 消</el-button> | |
| 570 | + <el-button type="primary" @click="openMap = false">确 定</el-button> | |
| 571 | + </div> | |
| 572 | + </el-dialog> | |
| 573 | + | |
| 574 | + </div> | |
| 575 | +</template> | |
| 576 | + | |
| 577 | +<script> | |
| 578 | +import { listDisposalSite, getDisposalSite, delDisposalSite, addDisposalSite, updateDisposalSite, exportDisposalSite } from "@/api/unit/disposalSite"; | |
| 579 | +import Treeselect from "@riophae/vue-treeselect"; | |
| 580 | +import '@riophae/vue-treeselect/dist/vue-treeselect.css' | |
| 581 | +import {getAreaList} from "@/api/casefile/remoteServer"; | |
| 582 | +import AMapLoader from '@amap/amap-jsapi-loader'; | |
| 583 | + | |
| 584 | +// 设置安全密钥 | |
| 585 | +window._AMapSecurityConfig = { | |
| 586 | + securityJsCode: 'aa1db7d8f534f3da3f6d8a6a71382802', | |
| 587 | +} | |
| 588 | +export default { | |
| 589 | + name: "DisposalSite", | |
| 590 | + components: {Treeselect,AMapLoader}, | |
| 591 | + data() { | |
| 592 | + return { | |
| 593 | + // 遮罩层 | |
| 594 | + loading: true, | |
| 595 | + // 选中数组 | |
| 596 | + ids: [], | |
| 597 | + // 非单个禁用 | |
| 598 | + single: true, | |
| 599 | + // 非多个禁用 | |
| 600 | + multiple: true, | |
| 601 | + // 显示搜索条件 | |
| 602 | + showSearch: true, | |
| 603 | + // 总条数 | |
| 604 | + total: 0, | |
| 605 | + // 处理场所管理表格数据 | |
| 606 | + disposalSiteList: [], | |
| 607 | + // 弹出层标题 | |
| 608 | + title: "", | |
| 609 | + // 是否显示弹出层 | |
| 610 | + open: false, | |
| 611 | + // 表单参数 | |
| 612 | + form: {}, | |
| 613 | + // 表单校验 | |
| 614 | + rules: { | |
| 615 | + name: [ | |
| 616 | + { required: true, message: "请输入处置场所名称", trigger: "blur" }, | |
| 617 | + ], | |
| 618 | + address: [ | |
| 619 | + { required: true, message: "请输入处置场所地址", trigger: "blur" }, | |
| 620 | + ], | |
| 621 | + localArea: [ | |
| 622 | + { required: true, message: "请选择所属区域", trigger: "blur" }, | |
| 623 | + ], | |
| 624 | + siteType: [ | |
| 625 | + { required: true, message: "请选择处置场所类型", trigger: "blur" }, | |
| 626 | + ], | |
| 627 | + operatingArea: [ | |
| 628 | + { required: true, message: "请选择锁业区域", trigger: "blur" }, | |
| 629 | + ], | |
| 630 | + trashType: [ | |
| 631 | + { required: true, message: "请选择可受纳建筑垃圾类型", trigger: "blur" }, | |
| 632 | + ], | |
| 633 | + constructionUnit: [ | |
| 634 | + { required: true, message: "请输入建设(施工)单位", trigger: "blur" }, | |
| 635 | + ], | |
| 636 | + constructionUnitPerson: [ | |
| 637 | + { required: true, message: "请输入建设(施工)单位责任人", trigger: "blur" }, | |
| 638 | + ], | |
| 639 | + constructionUnitPersonPhone: [ | |
| 640 | + { required: true, message: "请输入责任人联系电话", trigger: "blur" }, | |
| 641 | + { | |
| 642 | + pattern: /^1(3|4|5|7|8|9)\d{9}$/, | |
| 643 | + message: '手机号格式错误', | |
| 644 | + trigger: 'change' | |
| 645 | + } | |
| 646 | + ], | |
| 647 | + validityBeginDate: [ | |
| 648 | + { required: true, message: "请选择有限期开始时间", trigger: "blur" }, | |
| 649 | + ], | |
| 650 | + validityEndDate: [ | |
| 651 | + { required: true, message: "请选择有限期结束时间", trigger: "blur" }, | |
| 652 | + ], | |
| 653 | + electronicFence: [ | |
| 654 | + { required: true, message: "请输入电子围栏", trigger: "blur" }, | |
| 655 | + ], | |
| 656 | + squareMeasure: [ | |
| 657 | + { required: true, message: "请输入审批方量", trigger: "blur" }, | |
| 658 | + ], | |
| 659 | + carWashingFacilities: [ | |
| 660 | + { required: true, message: "请选择洗车作业设施", trigger: "blur" }, | |
| 661 | + ], | |
| 662 | + exitRoadCondition: [ | |
| 663 | + { required: true, message: "请选择出口道路状况", trigger: "blur" }, | |
| 664 | + ], | |
| 665 | + lightingFacility: [ | |
| 666 | + { required: true, message: "请选择照明设施", trigger: "blur" }, | |
| 667 | + ], | |
| 668 | + videoSurveillanceFacility: [ | |
| 669 | + { required: true, message: "请选择视频监控设施", trigger: "blur" }, | |
| 670 | + ], | |
| 671 | + preparer: [ | |
| 672 | + { required: true, message: "请输入填表人", trigger: "blur" }, | |
| 673 | + ], | |
| 674 | + handlingAdvice: [ | |
| 675 | + { required: true, message: "请输入办理意见", trigger: "blur" }, | |
| 676 | + ], | |
| 677 | + | |
| 678 | + }, | |
| 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, | |
| 698 | + // 地图 | |
| 699 | + map: null, | |
| 700 | + // 编辑工具 | |
| 701 | + polyEditor: null, | |
| 702 | + // 电子围栏数据集 | |
| 703 | + polygonArr: [], | |
| 704 | + // 当前电子围栏 | |
| 705 | + nowPolygon: null, | |
| 706 | + keywords: "", | |
| 707 | + mapOptions: [], | |
| 708 | + AutoComplete: null, | |
| 709 | + searchMarker: null, | |
| 710 | + }; | |
| 711 | + }, | |
| 712 | + created() { | |
| 713 | + getAreaList().then(res => { | |
| 714 | + this.areas = res.data; | |
| 715 | + }); | |
| 716 | + this.initData(); | |
| 717 | + }, | |
| 718 | + watch: { | |
| 719 | + '$route.query.disposalSiteId': 'initData' | |
| 720 | + }, | |
| 721 | + methods: { | |
| 722 | + reset(){ | |
| 723 | + this.form = {}; | |
| 724 | + this.approvalDocument = []; | |
| 725 | + this.approvalData = []; | |
| 726 | + this.scenePhoto = []; | |
| 727 | + this.carWashingFacilitiesImage = []; | |
| 728 | + this.safetyAssessmentReport = []; | |
| 729 | + this.environmentalApproval = []; | |
| 730 | + this.authorization = []; | |
| 731 | + this.otherInformation = []; | |
| 732 | + }, | |
| 733 | + initData(){ | |
| 734 | + this.reset(); | |
| 735 | + let id = this.$route.query.disposalSiteId; | |
| 736 | + if(id!=null){ | |
| 737 | + getDisposalSite(id).then(response => { | |
| 738 | + this.form = response.data; | |
| 739 | + //将字符串转换为int数组 | |
| 740 | + let trashTypeArr = this.form.trashType.split(",").map(str => parseInt(str, 10)); | |
| 741 | + this.form.trashType = trashTypeArr; | |
| 742 | + //将附件转换为前端可视化数组 | |
| 743 | + if(this.form.approvalDocument!=null&&this.form.approvalDocument!==""){ | |
| 744 | + 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}) | |
| 748 | + }) | |
| 749 | + } | |
| 750 | + if(this.form.approvalData!=null&&this.form.approvalData!==""){ | |
| 751 | + 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}) | |
| 755 | + }) | |
| 756 | + } | |
| 757 | + if(this.form.scenePhoto!=null&&this.form.scenePhoto!==""){ | |
| 758 | + 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}) | |
| 762 | + }) | |
| 763 | + } | |
| 764 | + if(this.form.carWashingFacilitiesImage!=null&&this.form.carWashingFacilitiesImage!==""){ | |
| 765 | + 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}) | |
| 769 | + }) | |
| 770 | + } | |
| 771 | + if(this.form.safetyAssessmentReport!=null&&this.form.safetyAssessmentReport!==""){ | |
| 772 | + 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}) | |
| 776 | + }) | |
| 777 | + } | |
| 778 | + if(this.form.environmentalApproval!=null&&this.form.environmentalApproval!==""){ | |
| 779 | + 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}) | |
| 783 | + }) | |
| 784 | + } | |
| 785 | + if(this.form.authorization!=null&&this.form.authorization!==""){ | |
| 786 | + 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}) | |
| 790 | + }) | |
| 791 | + } | |
| 792 | + if(this.form.otherInformation!=null&&this.form.otherInformation!==""){ | |
| 793 | + 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}) | |
| 797 | + }) | |
| 798 | + } | |
| 799 | + }); | |
| 800 | + } | |
| 801 | + }, | |
| 802 | + closeMap(){ | |
| 803 | + this.openMap = false; | |
| 804 | + this.form.electronicFence = null; | |
| 805 | + //清空地图图层 | |
| 806 | + this.map.remove(this.nowPolygon); | |
| 807 | + }, | |
| 808 | + // 选中提示 | |
| 809 | + currentSelect(val) { | |
| 810 | + // 清空时不执行后面代码 | |
| 811 | + if (!val) { | |
| 812 | + return ; | |
| 813 | + } | |
| 814 | + // 自动适应显示想显示的范围区域 | |
| 815 | + this.map.setFitView(); | |
| 816 | + //清除marker | |
| 817 | + if (this.searchMarker){ | |
| 818 | + this.map.remove(this.searchMarker) | |
| 819 | + } | |
| 820 | + //设置marker | |
| 821 | + this.searchMarker = new AMap.Marker({ | |
| 822 | + map: this.map, | |
| 823 | + position: [val.location.lng, val.location.lat], | |
| 824 | + }); | |
| 825 | + | |
| 826 | + this.keywords = val.name | |
| 827 | + //定位 | |
| 828 | + this.map.setCenter([val.location.lng, val.location.lat]) | |
| 829 | + }, | |
| 830 | + // 搜索地址 | |
| 831 | + remoteMethod(query) { | |
| 832 | + if (query !== "") { | |
| 833 | + this.loading = true; | |
| 834 | + setTimeout(() => { | |
| 835 | + this.loading = false; | |
| 836 | + this.AutoComplete.search(query, (status, result) => { | |
| 837 | + this.mapOptions = result.tips; | |
| 838 | + }); | |
| 839 | + }, 200); | |
| 840 | + } else { | |
| 841 | + this.mapOptions = []; | |
| 842 | + } | |
| 843 | + }, | |
| 844 | + initAMap() { | |
| 845 | + const _this = this | |
| 846 | + // 加载高德地图 | |
| 847 | + AMapLoader.load({ | |
| 848 | + key: _this.$aMapKey, //设置高德地图申请的key | |
| 849 | + version: "2.0", // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15 | |
| 850 | + plugins: ['AMap.ToolBar', 'AMap.PolygonEditor','AMap.AutoComplete', 'AMap.PlaceSearch', 'AMap.Marker'], // 需要使用的的插件列表,如比例尺'AMap.Scale'等 | |
| 851 | + AMapUI: { | |
| 852 | + version: "1.1", | |
| 853 | + plugins: [] | |
| 854 | + }, | |
| 855 | + Loca: { | |
| 856 | + version: "2.0" | |
| 857 | + }, | |
| 858 | + }).then(async (AMap) => { | |
| 859 | + _this.map = await new AMap.Map("zcContainer1", { //设置地图容器id | |
| 860 | + viewMode: "2D", // 默认使用 2D 模式 | |
| 861 | + center: [113.01814545605467, 28.201039299894283], // 初始化地图中心点位置 | |
| 862 | + zoom: 11, //初始化地图层级 | |
| 863 | + resizeEnable: true, | |
| 864 | + willreadoften: true | |
| 865 | + }); | |
| 866 | + | |
| 867 | + _this.AutoComplete = await new AMap.AutoComplete({city:'全国'}); | |
| 868 | + | |
| 869 | + // 图层样式切换控件(卫星图) | |
| 870 | + AMapUI.loadUI(['control/BasicControl'], function(BasicControl) { | |
| 871 | + | |
| 872 | + //图层切换控件 | |
| 873 | + _this.map.addControl(new BasicControl.LayerSwitcher({ | |
| 874 | + position: 'rb' // 右下角 | |
| 875 | + })); | |
| 876 | + | |
| 877 | + }); | |
| 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 | + }) | |
| 905 | + | |
| 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 | + } | |
| 916 | + | |
| 917 | + var maxDistance = 0; // 最大距离 | |
| 918 | + var maxPointIndex = []; // 记录最大距离对应的点索引 | |
| 919 | + | |
| 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 | + } | |
| 929 | + } | |
| 930 | + | |
| 931 | + if(_this.nowPolygon!=null){ | |
| 932 | + // 通过最大距离的点索引获取对应的点坐标 | |
| 933 | + let mybounds = new AMap.Bounds(pathArr[maxPointIndex[0]],pathArr[maxPointIndex[1]]); | |
| 934 | + // 设置地图显示范围 | |
| 935 | + _this.map.setBounds(mybounds); | |
| 936 | + } | |
| 937 | + //将经纬度存到form中 | |
| 938 | + _this.form.electronicFence = pathArr.join(";"); | |
| 939 | + _this.polyEditor.close(); | |
| 940 | + } | |
| 941 | + }); | |
| 942 | + }) | |
| 943 | + | |
| 944 | + if(_this.nowPolygon===null){ | |
| 945 | + _this.polyEditor.close(); | |
| 946 | + _this.polyEditor.setTarget(); | |
| 947 | + _this.polyEditor.open(); | |
| 948 | + } | |
| 949 | + | |
| 950 | + | |
| 951 | + }).catch(e => { | |
| 952 | + console.log(e); | |
| 953 | + }); | |
| 954 | + this.loading = false; | |
| 955 | + // this.openMap = false; | |
| 956 | + }, | |
| 957 | + clearPolyEditor(){ | |
| 958 | + this.form.electronicFence = null; | |
| 959 | + this.map.remove(this.nowPolygon); | |
| 960 | + // 关闭一下编辑器,防止出bug | |
| 961 | + this.polyEditor.close(); | |
| 962 | + // 置空编辑区即为新增 | |
| 963 | + this.polyEditor.setTarget(); | |
| 964 | + // 打开编辑器即可开始绘制 | |
| 965 | + this.polyEditor.open(); | |
| 966 | + }, | |
| 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 | + } | |
| 980 | + this.openMap = true; | |
| 981 | + this.$alert('左键单击地图添加点,左键双击编辑,右键双击地图结束绘制', '温馨提示', { | |
| 982 | + confirmButtonText: '确定', | |
| 983 | + callback: action => { | |
| 984 | + console.log(this.map) | |
| 985 | + let path = this.form.electronicFence.split(";"); | |
| 986 | + path.map(item=>{ | |
| 987 | + let arr = item.split(","); | |
| 988 | + this.polygonArr.push([arr[0],arr[1]]); | |
| 989 | + }); | |
| 990 | + } | |
| 991 | + }); | |
| 992 | + }, | |
| 993 | + createUrl(file){ | |
| 994 | + if(file.raw!=null){ | |
| 995 | + return URL.createObjectURL(file.raw); | |
| 996 | + }else{ | |
| 997 | + return process.env.VUE_APP_BASE_API + file.url; | |
| 998 | + } | |
| 999 | + | |
| 1000 | + }, | |
| 1001 | + tempDownload(row){ | |
| 1002 | + let name = row.name; | |
| 1003 | + let url = ""; | |
| 1004 | + if(row.raw!=null){ | |
| 1005 | + url = URL.createObjectURL(row.raw); | |
| 1006 | + }else{ | |
| 1007 | + url = process.env.VUE_APP_BASE_API + row.url; | |
| 1008 | + } | |
| 1009 | + console.log(url) | |
| 1010 | + const a = document.createElement('a') | |
| 1011 | + a.setAttribute('download', name) | |
| 1012 | + a.setAttribute('target', '_blank') | |
| 1013 | + a.setAttribute('href', url); | |
| 1014 | + a.click() | |
| 1015 | + }, | |
| 1016 | + // 取消按钮 | |
| 1017 | + cancel() { | |
| 1018 | + this.$tab.closePage({path:"/disposalSite/info"}).then(() => { | |
| 1019 | + this.$tab.openPage("处理场所管理", "/tool/disposalSite",{disposalSiteRefresh:1}) | |
| 1020 | + }) | |
| 1021 | + }, | |
| 1022 | + /** 提交按钮 */ | |
| 1023 | + submitForm() { | |
| 1024 | + this.$refs["form"].validate(valid => { | |
| 1025 | + if (valid) { | |
| 1026 | + let formData = new FormData(); | |
| 1027 | + let form = this.form; | |
| 1028 | + //去掉params属性 | |
| 1029 | + delete form.params; | |
| 1030 | + // formData.append('approvalDocument', null); | |
| 1031 | + // formData.append('approvalData', null); | |
| 1032 | + // formData.append('scenePhoto', null); | |
| 1033 | + // formData.append('carWashingFacilitiesImage', null); | |
| 1034 | + // formData.append('authorization', null); | |
| 1035 | + // formData.append('safetyAssessmentReport', null); | |
| 1036 | + // formData.append('environmentalApproval', null); | |
| 1037 | + // formData.append('otherInformation', null); | |
| 1038 | + //将新增的文件放入formData | |
| 1039 | + | |
| 1040 | + //先清空原有的附件 | |
| 1041 | + form.approvalDocument = null; | |
| 1042 | + form.approvalData = null; | |
| 1043 | + form.scenePhoto = null; | |
| 1044 | + form.carWashingFacilitiesImage = null; | |
| 1045 | + form.authorization = null; | |
| 1046 | + form.safetyAssessmentReport = null; | |
| 1047 | + form.environmentalApproval = null; | |
| 1048 | + form.otherInformation = null; | |
| 1049 | + form.trashType = this.form.trashType.join(","); | |
| 1050 | + | |
| 1051 | + this.approvalDocument.forEach(item => { | |
| 1052 | + if (item.raw != null) { | |
| 1053 | + formData.append('approvalDocumentFiles', item.raw) | |
| 1054 | + }else{ | |
| 1055 | + //将原有的附件拼接到form中 | |
| 1056 | + form.approvalDocument = form.approvalDocument!==null?form.approvalDocument+";"+item.url:item.url; | |
| 1057 | + } | |
| 1058 | + }) | |
| 1059 | + | |
| 1060 | + this.approvalData.forEach(item => { | |
| 1061 | + if (item.raw != null) { | |
| 1062 | + formData.append('approvalDataFiles', item.raw) | |
| 1063 | + }else{ | |
| 1064 | + //将原有的附件拼接到form中 | |
| 1065 | + form.approvalData = form.approvalData!==null?form.approvalData+";"+item.url:item.url; | |
| 1066 | + } | |
| 1067 | + }) | |
| 1068 | + this.scenePhoto.forEach(item => { | |
| 1069 | + if (item.raw != null) { | |
| 1070 | + formData.append('scenePhotoFiles', item.raw) | |
| 1071 | + }else{ | |
| 1072 | + //将原有的附件拼接到form中 | |
| 1073 | + form.scenePhoto = form.scenePhoto!==null?form.scenePhoto+";"+item.url:item.url; | |
| 1074 | + } | |
| 1075 | + }) | |
| 1076 | + this.carWashingFacilitiesImage.forEach(item => { | |
| 1077 | + if (item.raw != null) { | |
| 1078 | + formData.append('carWashingFacilitiesImageFiles', item.raw) | |
| 1079 | + }else{ | |
| 1080 | + //将原有的附件拼接到form中 | |
| 1081 | + form.carWashingFacilitiesImage = form.carWashingFacilitiesImage!==null?form.carWashingFacilitiesImage+";"+item.url:item.url; | |
| 1082 | + } | |
| 1083 | + }) | |
| 1084 | + this.safetyAssessmentReport.forEach(item => { | |
| 1085 | + if (item.raw != null) { | |
| 1086 | + formData.append('safetyAssessmentReportFiles', item.raw) | |
| 1087 | + }else{ | |
| 1088 | + //将原有的附件拼接到form中 | |
| 1089 | + form.safetyAssessmentReport = form.safetyAssessmentReport!==null?form.safetyAssessmentReport+";"+item.url:item.url; | |
| 1090 | + } | |
| 1091 | + }) | |
| 1092 | + this.environmentalApproval.forEach(item => { | |
| 1093 | + if (item.raw != null) { | |
| 1094 | + formData.append('environmentalApprovalFiles', item.raw) | |
| 1095 | + }else{ | |
| 1096 | + //将原有的附件拼接到form中 | |
| 1097 | + form.environmentalApproval = form.environmentalApproval!==null?form.environmentalApproval+";"+item.url:item.url; | |
| 1098 | + } | |
| 1099 | + }) | |
| 1100 | + this.authorization.forEach(item => { | |
| 1101 | + if (item.raw != null) { | |
| 1102 | + formData.append('authorizationFiles', item.raw) | |
| 1103 | + }else{ | |
| 1104 | + //将原有的附件拼接到form中 | |
| 1105 | + form.authorization = form.authorization!==null?form.authorization+";"+item.url:item.url; | |
| 1106 | + } | |
| 1107 | + }) | |
| 1108 | + this.otherInformation.forEach(item => { | |
| 1109 | + if (item.raw != null) { | |
| 1110 | + formData.append('otherInformationFiles', item.raw) | |
| 1111 | + }else{ | |
| 1112 | + //将原有的附件拼接到form中 | |
| 1113 | + form.otherInformation = form.otherInformation!==null?form.otherInformation+";"+item.url:item.url; | |
| 1114 | + } | |
| 1115 | + }) | |
| 1116 | + for (let key in form) { | |
| 1117 | + formData.append(key, form[key] == null ? "" : form[key]) | |
| 1118 | + } | |
| 1119 | + if (this.form.id != null) { | |
| 1120 | + updateDisposalSite(formData).then(response => { | |
| 1121 | + this.msgSuccess("修改成功"); | |
| 1122 | + this.$tab.closePage({path:"/disposalSite/infoEdit"}).then(() => { | |
| 1123 | + this.$tab.openPage("处理场所管理", "/tool/disposalSite",{disposalSiteRefresh:1}) | |
| 1124 | + }) | |
| 1125 | + }); | |
| 1126 | + } else { | |
| 1127 | + addDisposalSite(formData).then(response => { | |
| 1128 | + this.msgSuccess("新增成功"); | |
| 1129 | + this.$tab.closePage({path:"/disposalSite/info"}).then(() => { | |
| 1130 | + this.$tab.openPage("处理场所管理", "/tool/disposalSite",{disposalSiteRefresh:1}) | |
| 1131 | + }) | |
| 1132 | + }); | |
| 1133 | + } | |
| 1134 | + } | |
| 1135 | + }); | |
| 1136 | + }, | |
| 1137 | + /** | |
| 1138 | + * 文件改变时,限制文件上传格式和大小 | |
| 1139 | + * 文件格式只能为docx/doc/pdf/png/jpeg/png/jpg | |
| 1140 | + * 大小不超过20M | |
| 1141 | + * */ | |
| 1142 | + fileChange(file, fileList) { | |
| 1143 | + let count = 0; | |
| 1144 | + for (let i = 0; i < fileList.length; i++) { | |
| 1145 | + // console.log(fileList.length) | |
| 1146 | + // console.log(this.fileEntityList[i].name+"111"+file.name) | |
| 1147 | + if (fileList[i].name == file.name) { | |
| 1148 | + count++; | |
| 1149 | + if (count == 2) { | |
| 1150 | + this.$message({ | |
| 1151 | + message: '已存在此文件!', | |
| 1152 | + type: 'warning' | |
| 1153 | + }); | |
| 1154 | + for (let j = fileList.length; j > 0; j--) { | |
| 1155 | + //如果存在此文件,去除新选择的重复文件 | |
| 1156 | + if (fileList[j - 1].name == file.name) { | |
| 1157 | + fileList.splice(j - 1, 1); | |
| 1158 | + i--; | |
| 1159 | + return false; | |
| 1160 | + } | |
| 1161 | + } | |
| 1162 | + } | |
| 1163 | + } | |
| 1164 | + } | |
| 1165 | + let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase(); | |
| 1166 | + //格式符合后判断大小 | |
| 1167 | + if ("jpg,jpeg,png,gif,jfif,pjpeg,pjp,pdf,doc,docx,xls,xlsx".indexOf(fileType) != -1) { | |
| 1168 | + let max5M = file.size / 1024 / 1024 < 100; | |
| 1169 | + if (!max5M) { | |
| 1170 | + this.$message({ | |
| 1171 | + message: '上传文件大小不得超过100M!', | |
| 1172 | + type: 'warning' | |
| 1173 | + }); | |
| 1174 | + fileList = fileList.splice(fileList.length - 1, 1); | |
| 1175 | + } else { | |
| 1176 | + //符合条件后进行添加 | |
| 1177 | + this.approvalDocument = fileList | |
| 1178 | + } | |
| 1179 | + } else { | |
| 1180 | + this.$message({ | |
| 1181 | + message: '上传文件只能是.jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx格式!', | |
| 1182 | + type: 'warning' | |
| 1183 | + }); | |
| 1184 | + fileList = fileList.splice(fileList.length - 1, 1); | |
| 1185 | + } | |
| 1186 | + }, | |
| 1187 | + fileChange1(file, fileList) { | |
| 1188 | + let count = 0; | |
| 1189 | + for (let i = 0; i < fileList.length; i++) { | |
| 1190 | + // console.log(fileList.length) | |
| 1191 | + // console.log(this.fileEntityList[i].name+"111"+file.name) | |
| 1192 | + if (fileList[i].name == file.name) { | |
| 1193 | + count++; | |
| 1194 | + if (count == 2) { | |
| 1195 | + this.$message({ | |
| 1196 | + message: '已存在此文件!', | |
| 1197 | + type: 'warning' | |
| 1198 | + }); | |
| 1199 | + for (let j = fileList.length; j > 0; j--) { | |
| 1200 | + //如果存在此文件,去除新选择的重复文件 | |
| 1201 | + if (fileList[j - 1].name == file.name) { | |
| 1202 | + fileList.splice(j - 1, 1); | |
| 1203 | + i--; | |
| 1204 | + return false; | |
| 1205 | + } | |
| 1206 | + } | |
| 1207 | + } | |
| 1208 | + } | |
| 1209 | + } | |
| 1210 | + let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase(); | |
| 1211 | + //格式符合后判断大小 | |
| 1212 | + if ("jpg,jpeg,png,gif,jfif,pjpeg,pjp,pdf,doc,docx,xls,xlsx".indexOf(fileType) != -1) { | |
| 1213 | + let max5M = file.size / 1024 / 1024 < 100; | |
| 1214 | + if (!max5M) { | |
| 1215 | + this.$message({ | |
| 1216 | + message: '上传文件大小不得超过100M!', | |
| 1217 | + type: 'warning' | |
| 1218 | + }); | |
| 1219 | + fileList = fileList.splice(fileList.length - 1, 1); | |
| 1220 | + } else { | |
| 1221 | + //符合条件后进行添加 | |
| 1222 | + this.approvalData = fileList | |
| 1223 | + } | |
| 1224 | + } else { | |
| 1225 | + this.$message({ | |
| 1226 | + message: '上传文件只能是.jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx格式!', | |
| 1227 | + type: 'warning' | |
| 1228 | + }); | |
| 1229 | + fileList = fileList.splice(fileList.length - 1, 1); | |
| 1230 | + } | |
| 1231 | + }, | |
| 1232 | + fileChange2(file, fileList) { | |
| 1233 | + let count = 0; | |
| 1234 | + for (let i = 0; i < fileList.length; i++) { | |
| 1235 | + // console.log(fileList.length) | |
| 1236 | + // console.log(this.fileEntityList[i].name+"111"+file.name) | |
| 1237 | + if (fileList[i].name == file.name) { | |
| 1238 | + count++; | |
| 1239 | + if (count == 2) { | |
| 1240 | + this.$message({ | |
| 1241 | + message: '已存在此文件!', | |
| 1242 | + type: 'warning' | |
| 1243 | + }); | |
| 1244 | + for (let j = fileList.length; j > 0; j--) { | |
| 1245 | + //如果存在此文件,去除新选择的重复文件 | |
| 1246 | + if (fileList[j - 1].name == file.name) { | |
| 1247 | + fileList.splice(j - 1, 1); | |
| 1248 | + i--; | |
| 1249 | + return false; | |
| 1250 | + } | |
| 1251 | + } | |
| 1252 | + } | |
| 1253 | + } | |
| 1254 | + } | |
| 1255 | + let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase(); | |
| 1256 | + //格式符合后判断大小 | |
| 1257 | + if ("jpg,jpeg,png,gif,jfif,pjpeg,pjp,pdf,doc,docx,xls,xlsx".indexOf(fileType) != -1) { | |
| 1258 | + let max5M = file.size / 1024 / 1024 < 100; | |
| 1259 | + if (!max5M) { | |
| 1260 | + this.$message({ | |
| 1261 | + message: '上传文件大小不得超过100M!', | |
| 1262 | + type: 'warning' | |
| 1263 | + }); | |
| 1264 | + fileList = fileList.splice(fileList.length - 1, 1); | |
| 1265 | + } else { | |
| 1266 | + //符合条件后进行添加 | |
| 1267 | + this.scenePhoto = fileList | |
| 1268 | + } | |
| 1269 | + } else { | |
| 1270 | + this.$message({ | |
| 1271 | + message: '上传文件只能是.jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx格式!', | |
| 1272 | + type: 'warning' | |
| 1273 | + }); | |
| 1274 | + fileList = fileList.splice(fileList.length - 1, 1); | |
| 1275 | + } | |
| 1276 | + }, | |
| 1277 | + fileChange3(file, fileList) { | |
| 1278 | + let count = 0; | |
| 1279 | + for (let i = 0; i < fileList.length; i++) { | |
| 1280 | + // console.log(fileList.length) | |
| 1281 | + // console.log(this.fileEntityList[i].name+"111"+file.name) | |
| 1282 | + if (fileList[i].name == file.name) { | |
| 1283 | + count++; | |
| 1284 | + if (count == 2) { | |
| 1285 | + this.$message({ | |
| 1286 | + message: '已存在此文件!', | |
| 1287 | + type: 'warning' | |
| 1288 | + }); | |
| 1289 | + for (let j = fileList.length; j > 0; j--) { | |
| 1290 | + //如果存在此文件,去除新选择的重复文件 | |
| 1291 | + if (fileList[j - 1].name == file.name) { | |
| 1292 | + fileList.splice(j - 1, 1); | |
| 1293 | + i--; | |
| 1294 | + return false; | |
| 1295 | + } | |
| 1296 | + } | |
| 1297 | + } | |
| 1298 | + } | |
| 1299 | + } | |
| 1300 | + let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase(); | |
| 1301 | + //格式符合后判断大小 | |
| 1302 | + if ("jpg,jpeg,png,gif,jfif,pjpeg,pjp,pdf,doc,docx,xls,xlsx".indexOf(fileType) != -1) { | |
| 1303 | + let max5M = file.size / 1024 / 1024 < 100; | |
| 1304 | + if (!max5M) { | |
| 1305 | + this.$message({ | |
| 1306 | + message: '上传文件大小不得超过100M!', | |
| 1307 | + type: 'warning' | |
| 1308 | + }); | |
| 1309 | + fileList = fileList.splice(fileList.length - 1, 1); | |
| 1310 | + } else { | |
| 1311 | + //符合条件后进行添加 | |
| 1312 | + this.carWashingFacilitiesImage = fileList | |
| 1313 | + } | |
| 1314 | + } else { | |
| 1315 | + this.$message({ | |
| 1316 | + message: '上传文件只能是.jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx格式!', | |
| 1317 | + type: 'warning' | |
| 1318 | + }); | |
| 1319 | + fileList = fileList.splice(fileList.length - 1, 1); | |
| 1320 | + } | |
| 1321 | + }, | |
| 1322 | + fileChange4(file, fileList) { | |
| 1323 | + let count = 0; | |
| 1324 | + for (let i = 0; i < fileList.length; i++) { | |
| 1325 | + // console.log(fileList.length) | |
| 1326 | + // console.log(this.fileEntityList[i].name+"111"+file.name) | |
| 1327 | + if (fileList[i].name == file.name) { | |
| 1328 | + count++; | |
| 1329 | + if (count == 2) { | |
| 1330 | + this.$message({ | |
| 1331 | + message: '已存在此文件!', | |
| 1332 | + type: 'warning' | |
| 1333 | + }); | |
| 1334 | + for (let j = fileList.length; j > 0; j--) { | |
| 1335 | + //如果存在此文件,去除新选择的重复文件 | |
| 1336 | + if (fileList[j - 1].name == file.name) { | |
| 1337 | + fileList.splice(j - 1, 1); | |
| 1338 | + i--; | |
| 1339 | + return false; | |
| 1340 | + } | |
| 1341 | + } | |
| 1342 | + } | |
| 1343 | + } | |
| 1344 | + } | |
| 1345 | + let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase(); | |
| 1346 | + //格式符合后判断大小 | |
| 1347 | + if ("jpg,jpeg,png,gif,jfif,pjpeg,pjp,pdf,doc,docx,xls,xlsx".indexOf(fileType) != -1) { | |
| 1348 | + let max5M = file.size / 1024 / 1024 < 100; | |
| 1349 | + if (!max5M) { | |
| 1350 | + this.$message({ | |
| 1351 | + message: '上传文件大小不得超过100M!', | |
| 1352 | + type: 'warning' | |
| 1353 | + }); | |
| 1354 | + fileList = fileList.splice(fileList.length - 1, 1); | |
| 1355 | + } else { | |
| 1356 | + //符合条件后进行添加 | |
| 1357 | + this.safetyAssessmentReport = fileList | |
| 1358 | + } | |
| 1359 | + } else { | |
| 1360 | + this.$message({ | |
| 1361 | + message: '上传文件只能是.jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx格式!', | |
| 1362 | + type: 'warning' | |
| 1363 | + }); | |
| 1364 | + fileList = fileList.splice(fileList.length - 1, 1); | |
| 1365 | + } | |
| 1366 | + }, | |
| 1367 | + fileChange5(file, fileList) { | |
| 1368 | + let count = 0; | |
| 1369 | + for (let i = 0; i < fileList.length; i++) { | |
| 1370 | + // console.log(fileList.length) | |
| 1371 | + // console.log(this.fileEntityList[i].name+"111"+file.name) | |
| 1372 | + if (fileList[i].name == file.name) { | |
| 1373 | + count++; | |
| 1374 | + if (count == 2) { | |
| 1375 | + this.$message({ | |
| 1376 | + message: '已存在此文件!', | |
| 1377 | + type: 'warning' | |
| 1378 | + }); | |
| 1379 | + for (let j = fileList.length; j > 0; j--) { | |
| 1380 | + //如果存在此文件,去除新选择的重复文件 | |
| 1381 | + if (fileList[j - 1].name == file.name) { | |
| 1382 | + fileList.splice(j - 1, 1); | |
| 1383 | + i--; | |
| 1384 | + return false; | |
| 1385 | + } | |
| 1386 | + } | |
| 1387 | + } | |
| 1388 | + } | |
| 1389 | + } | |
| 1390 | + let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase(); | |
| 1391 | + //格式符合后判断大小 | |
| 1392 | + if ("jpg,jpeg,png,gif,jfif,pjpeg,pjp,pdf,doc,docx,xls,xlsx".indexOf(fileType) != -1) { | |
| 1393 | + let max5M = file.size / 1024 / 1024 < 100; | |
| 1394 | + if (!max5M) { | |
| 1395 | + this.$message({ | |
| 1396 | + message: '上传文件大小不得超过100M!', | |
| 1397 | + type: 'warning' | |
| 1398 | + }); | |
| 1399 | + fileList = fileList.splice(fileList.length - 1, 1); | |
| 1400 | + } else { | |
| 1401 | + //符合条件后进行添加 | |
| 1402 | + this.environmentalApproval = fileList | |
| 1403 | + } | |
| 1404 | + } else { | |
| 1405 | + this.$message({ | |
| 1406 | + message: '上传文件只能是.jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx格式!', | |
| 1407 | + type: 'warning' | |
| 1408 | + }); | |
| 1409 | + fileList = fileList.splice(fileList.length - 1, 1); | |
| 1410 | + } | |
| 1411 | + }, | |
| 1412 | + fileChange6(file, fileList) { | |
| 1413 | + let count = 0; | |
| 1414 | + for (let i = 0; i < fileList.length; i++) { | |
| 1415 | + // console.log(fileList.length) | |
| 1416 | + // console.log(this.fileEntityList[i].name+"111"+file.name) | |
| 1417 | + if (fileList[i].name == file.name) { | |
| 1418 | + count++; | |
| 1419 | + if (count == 2) { | |
| 1420 | + this.$message({ | |
| 1421 | + message: '已存在此文件!', | |
| 1422 | + type: 'warning' | |
| 1423 | + }); | |
| 1424 | + for (let j = fileList.length; j > 0; j--) { | |
| 1425 | + //如果存在此文件,去除新选择的重复文件 | |
| 1426 | + if (fileList[j - 1].name == file.name) { | |
| 1427 | + fileList.splice(j - 1, 1); | |
| 1428 | + i--; | |
| 1429 | + return false; | |
| 1430 | + } | |
| 1431 | + } | |
| 1432 | + } | |
| 1433 | + } | |
| 1434 | + } | |
| 1435 | + let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase(); | |
| 1436 | + //格式符合后判断大小 | |
| 1437 | + if ("jpg,jpeg,png,gif,jfif,pjpeg,pjp,pdf,doc,docx,xls,xlsx".indexOf(fileType) != -1) { | |
| 1438 | + let max5M = file.size / 1024 / 1024 < 100; | |
| 1439 | + if (!max5M) { | |
| 1440 | + this.$message({ | |
| 1441 | + message: '上传文件大小不得超过100M!', | |
| 1442 | + type: 'warning' | |
| 1443 | + }); | |
| 1444 | + fileList = fileList.splice(fileList.length - 1, 1); | |
| 1445 | + } else { | |
| 1446 | + //符合条件后进行添加 | |
| 1447 | + this.authorization = fileList | |
| 1448 | + } | |
| 1449 | + } else { | |
| 1450 | + this.$message({ | |
| 1451 | + message: '上传文件只能是.jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx格式!', | |
| 1452 | + type: 'warning' | |
| 1453 | + }); | |
| 1454 | + fileList = fileList.splice(fileList.length - 1, 1); | |
| 1455 | + } | |
| 1456 | + }, | |
| 1457 | + fileChange7(file, fileList) { | |
| 1458 | + let count = 0; | |
| 1459 | + for (let i = 0; i < fileList.length; i++) { | |
| 1460 | + // console.log(fileList.length) | |
| 1461 | + // console.log(this.fileEntityList[i].name+"111"+file.name) | |
| 1462 | + if (fileList[i].name == file.name) { | |
| 1463 | + count++; | |
| 1464 | + if (count == 2) { | |
| 1465 | + this.$message({ | |
| 1466 | + message: '已存在此文件!', | |
| 1467 | + type: 'warning' | |
| 1468 | + }); | |
| 1469 | + for (let j = fileList.length; j > 0; j--) { | |
| 1470 | + //如果存在此文件,去除新选择的重复文件 | |
| 1471 | + if (fileList[j - 1].name == file.name) { | |
| 1472 | + fileList.splice(j - 1, 1); | |
| 1473 | + i--; | |
| 1474 | + return false; | |
| 1475 | + } | |
| 1476 | + } | |
| 1477 | + } | |
| 1478 | + } | |
| 1479 | + } | |
| 1480 | + let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase(); | |
| 1481 | + //格式符合后判断大小 | |
| 1482 | + if ("jpg,jpeg,png,gif,jfif,pjpeg,pjp,pdf,doc,docx,xls,xlsx".indexOf(fileType) != -1) { | |
| 1483 | + let max5M = file.size / 1024 / 1024 < 100; | |
| 1484 | + if (!max5M) { | |
| 1485 | + this.$message({ | |
| 1486 | + message: '上传文件大小不得超过100M!', | |
| 1487 | + type: 'warning' | |
| 1488 | + }); | |
| 1489 | + fileList = fileList.splice(fileList.length - 1, 1); | |
| 1490 | + } else { | |
| 1491 | + //符合条件后进行添加 | |
| 1492 | + this.otherInformation = fileList | |
| 1493 | + } | |
| 1494 | + } else { | |
| 1495 | + this.$message({ | |
| 1496 | + message: '上传文件只能是.jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx格式!', | |
| 1497 | + type: 'warning' | |
| 1498 | + }); | |
| 1499 | + fileList = fileList.splice(fileList.length - 1, 1); | |
| 1500 | + } | |
| 1501 | + }, | |
| 1502 | + } | |
| 1503 | +}; | |
| 1504 | +</script> | |
| 1505 | +<style lang="scss" scoped> | |
| 1506 | +.upload_lable{ | |
| 1507 | + border-right: 1px solid #dcdfe6; | |
| 1508 | + padding: 27px 30px; | |
| 1509 | + background: #fafafa; | |
| 1510 | + text-align: center; | |
| 1511 | +} | |
| 1512 | +.upload_btn{ | |
| 1513 | + max-height: 106px; | |
| 1514 | +} | |
| 1515 | +.upload_close{ | |
| 1516 | + position: absolute; | |
| 1517 | + left: 105px; | |
| 1518 | + z-index:99; | |
| 1519 | + top:-1px; | |
| 1520 | + font-size:18px; | |
| 1521 | + color:red; | |
| 1522 | +} | |
| 1523 | +.upload_close_file{ | |
| 1524 | + position: absolute; | |
| 1525 | + left: 80px; | |
| 1526 | + z-index:99; | |
| 1527 | + top:-1px; | |
| 1528 | + font-size:18px; | |
| 1529 | + color:red; | |
| 1530 | +} | |
| 1531 | +.upload_div_image{ | |
| 1532 | + display: inline-block; | |
| 1533 | + width: 110px; | |
| 1534 | + height: 95px; | |
| 1535 | + position: relative; | |
| 1536 | + float: left; | |
| 1537 | + margin-left: 5px; | |
| 1538 | +} | |
| 1539 | +.upload_div_file{ | |
| 1540 | + display: inline-block; | |
| 1541 | + width: 110px; | |
| 1542 | + height: 95px; | |
| 1543 | + text-align: center; | |
| 1544 | + float:left; | |
| 1545 | + margin: 5px; | |
| 1546 | + position: relative; | |
| 1547 | +} | |
| 1548 | +.serach_map{ | |
| 1549 | + position: absolute; | |
| 1550 | + top: 100px; | |
| 1551 | + left: 25px; | |
| 1552 | + z-index: 999; | |
| 1553 | + background: #fff; | |
| 1554 | + padding: 10px; | |
| 1555 | + border-radius: 5px; | |
| 1556 | + box-shadow: 0 0 10px rgba(0,0,0,.2); | |
| 1557 | +} | |
| 1558 | +</style> | ... | ... |
trash-ui/src/views/unit/driver/info.vue
| ... | ... | @@ -14,7 +14,7 @@ |
| 14 | 14 | </el-col> |
| 15 | 15 | <el-col :span="7"> |
| 16 | 16 | <el-form-item label="身份证号码" prop="identityCard"> |
| 17 | - <el-input v-model="form.identityCard" placeholder="请输入身份证" /> | |
| 17 | + <el-input v-model="form.identityCard" placeholder="请输入身份证" :maxlength="18" show-word-limit/> | |
| 18 | 18 | </el-form-item> |
| 19 | 19 | </el-col> |
| 20 | 20 | <el-col :span="7"> |
| ... | ... | @@ -344,7 +344,7 @@ export default { |
| 344 | 344 | {required: true, message: "请输入姓名", trigger: "blur"} |
| 345 | 345 | ], |
| 346 | 346 | identityCard: [ |
| 347 | - {required: true, message: "请输入身份证号码", trigger: "blur"} | |
| 347 | + {required: true, message: "请输入身份证号码", trigger: "blur"}, | |
| 348 | 348 | ], |
| 349 | 349 | companyId: [ |
| 350 | 350 | {required: true, message: "请选择所属公司", trigger: "blur"} | ... | ... |