Commit cf09ebad760e809edb13df025f63816446580846

Authored by youxiw2000
1 parent fdd3fe73

m

Showing 36 changed files with 380 additions and 176 deletions
trash-admin/bin/src/main/java/com/trash/Application.class 0 → 100644
No preview for this file type
trash-admin/bin/src/main/java/com/trash/ServletInitializer.class 0 → 100644
No preview for this file type
trash-admin/bin/src/main/java/com/trash/web/controller/common/CaptchaController.class 0 → 100644
No preview for this file type
trash-admin/bin/src/main/java/com/trash/web/controller/common/CommonController.class 0 → 100644
No preview for this file type
trash-admin/bin/src/main/java/com/trash/web/controller/monitor/ServerController.class 0 → 100644
No preview for this file type
trash-admin/bin/src/main/java/com/trash/web/controller/monitor/SysLogininforController.class 0 → 100644
No preview for this file type
trash-admin/bin/src/main/java/com/trash/web/controller/monitor/SysOperlogController.class 0 → 100644
No preview for this file type
trash-admin/bin/src/main/java/com/trash/web/controller/monitor/SysUserOnlineController.class 0 → 100644
No preview for this file type
trash-admin/bin/src/main/java/com/trash/web/controller/system/SysConfigController.class 0 → 100644
No preview for this file type
trash-admin/bin/src/main/java/com/trash/web/controller/system/SysDeptController.class 0 → 100644
No preview for this file type
trash-admin/bin/src/main/java/com/trash/web/controller/system/SysDictDataController.class 0 → 100644
No preview for this file type
trash-admin/bin/src/main/java/com/trash/web/controller/system/SysDictTypeController.class 0 → 100644
No preview for this file type
trash-admin/bin/src/main/java/com/trash/web/controller/system/SysMenuController.class 0 → 100644
No preview for this file type
trash-admin/bin/src/main/java/com/trash/web/controller/system/SysNoticeController.class 0 → 100644
No preview for this file type
trash-admin/bin/src/main/java/com/trash/web/controller/system/SysPostController.class 0 → 100644
No preview for this file type
trash-admin/bin/src/main/java/com/trash/web/controller/system/SysProfileController.class 0 → 100644
No preview for this file type
trash-admin/bin/src/main/java/com/trash/web/controller/system/SysRoleController.class 0 → 100644
No preview for this file type
trash-admin/bin/src/main/java/com/trash/web/controller/system/SysUserController.class 0 → 100644
No preview for this file type
trash-admin/bin/src/main/java/com/trash/web/controller/tool/SwaggerController.class 0 → 100644
No preview for this file type
trash-admin/bin/src/main/java/com/trash/web/controller/tool/TestController.class 0 → 100644
No preview for this file type
trash-admin/bin/src/main/java/com/trash/web/controller/tool/UserEntity.class 0 → 100644
No preview for this file type
trash-admin/bin/src/main/java/com/trash/web/core/config/SwaggerConfig.class 0 → 100644
No preview for this file type
trash-admin/bin/src/main/resources/META-INF/spring-devtools.properties 0 → 100644
  1 +restart.include.json=/com.alibaba.fastjson.*.jar
0 2 \ No newline at end of file
... ...
trash-admin/bin/src/main/resources/i18n/messages.properties 0 → 100644
  1 +#错误消息
  2 +not.null=* 必须填写
  3 +user.jcaptcha.error=验证码错误
  4 +user.jcaptcha.expire=验证码已失效
  5 +user.not.exists=用户不存在/密码错误
  6 +user.password.not.match=用户不存在/密码错误
  7 +user.password.retry.limit.count=密码输入错误{0}次
  8 +user.password.retry.limit.exceed=密码输入错误{0}次,帐户锁定10分钟
  9 +user.password.delete=对不起,您的账号已被删除
  10 +user.blocked=用户已封禁,请联系管理员
  11 +role.blocked=角色已封禁,请联系管理员
  12 +user.logout.success=退出成功
  13 +
  14 +length.not.valid=长度必须在{min}到{max}个字符之间
  15 +
  16 +user.username.not.valid=* 2到20个汉字、字母、数字或下划线组成,且必须以非数字开头
  17 +user.password.not.valid=* 5-50个字符
  18 +
  19 +user.email.not.valid=邮箱格式错误
  20 +user.mobile.phone.number.not.valid=手机号格式错误
  21 +user.login.success=登录成功
  22 +user.notfound=请重新登录
  23 +user.forcelogout=管理员强制退出,请重新登录
  24 +user.unknown.error=未知错误,请重新登录
  25 +
  26 +##文件上传消息
  27 +upload.exceed.maxSize=上传的文件大小超出限制的文件大小!<br/>允许的文件最大大小是:{0}MB!
  28 +upload.filename.exceed.length=上传的文件名最长{0}个字符
  29 +
  30 +##权限
  31 +no.permission=您没有数据的权限,请联系管理员添加权限 [{0}]
  32 +no.create.permission=您没有创建数据的权限,请联系管理员添加权限 [{0}]
  33 +no.update.permission=您没有修改数据的权限,请联系管理员添加权限 [{0}]
  34 +no.delete.permission=您没有删除数据的权限,请联系管理员添加权限 [{0}]
  35 +no.export.permission=您没有导出数据的权限,请联系管理员添加权限 [{0}]
  36 +no.view.permission=您没有查看数据的权限,请联系管理员添加权限 [{0}]
... ...
trash-admin/bin/src/main/resources/mybatis/mybatis-config.xml 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8" ?>
  2 +<!DOCTYPE configuration
  3 +PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
  4 +"http://mybatis.org/dtd/mybatis-3-config.dtd">
  5 +<configuration>
  6 +
  7 + <settings>
  8 + <setting name="cacheEnabled" value="true" /> <!-- 全局映射器启用缓存 -->
  9 + <setting name="useGeneratedKeys" value="true" /> <!-- 允许 JDBC 支持自动生成主键 -->
  10 + <setting name="defaultExecutorType" value="REUSE" /> <!-- 配置默认的执行器 -->
  11 + <setting name="logImpl" value="SLF4J" /> <!-- 指定 MyBatis 所用日志的具体实现 -->
  12 + <!-- <setting name="mapUnderscoreToCamelCase" value="true"/> 驼峰式命名 -->
  13 + </settings>
  14 +
  15 +</configuration>
... ...
trash-admin/src/main/java/com/trash/web/controller/system/SysLoginController.java
... ... @@ -2,6 +2,7 @@ package com.trash.web.controller.system;
2 2  
3 3 import java.util.HashSet;
4 4 import java.util.List;
  5 +import java.util.Map;
5 6 import java.util.Set;
6 7  
7 8 import javax.servlet.http.HttpServletRequest;
... ... @@ -9,9 +10,13 @@ import javax.servlet.http.HttpServletRequest;
9 10 import org.springframework.beans.factory.annotation.Autowired;
10 11 import org.springframework.web.bind.annotation.GetMapping;
11 12 import org.springframework.web.bind.annotation.PostMapping;
  13 +import org.springframework.web.bind.annotation.RequestAttribute;
12 14 import org.springframework.web.bind.annotation.RequestBody;
  15 +import org.springframework.web.bind.annotation.RequestMapping;
  16 +import org.springframework.web.bind.annotation.RequestParam;
13 17 import org.springframework.web.bind.annotation.RestController;
14 18  
  19 +import com.alibaba.fastjson.JSONObject;
15 20 import com.trash.common.constant.Constants;
16 21 import com.trash.common.core.domain.AjaxResult;
17 22 import com.trash.common.core.domain.entity.SysMenu;
... ... @@ -62,6 +67,43 @@ public class SysLoginController
62 67 return ajax;
63 68 }
64 69  
  70 +
  71 + @RequestMapping("loginByToken")
  72 + public AjaxResult loginByToken(@RequestBody String token){
  73 +
  74 + JSONObject jsonObject = JSONObject.parseObject(token);
  75 +
  76 + LoginUser loginUser = loginService.loginByRemote(jsonObject.getString("token"));
  77 +
  78 + if(loginUser == null){
  79 + return AjaxResult.error();
  80 + }
  81 +
  82 + SysUser user = loginUser.getUser();
  83 +
  84 +// Set<String> roles = new HashSet<String>();
  85 +// roles.add("admin");
  86 +
  87 + Set<String> permissions = loginUser.getPermissions();
  88 +
  89 + Set<String> roles = new HashSet<String>();
  90 +
  91 + if(user.getRoles() != null){
  92 + for(SysRole role : user.getRoles()){
  93 + roles.add(role.getRoleKey());
  94 + }
  95 + }
  96 +
  97 +// // 权限集合
  98 +// Set<String> permissions = permissionService.getMenuPermission(user);
  99 + AjaxResult ajax = AjaxResult.success();
  100 + ajax.put("user", user);
  101 + ajax.put("roles", roles);
  102 + ajax.put("permissions", permissions);
  103 + ajax.put("token", loginUser.getToken());
  104 + return ajax;
  105 + }
  106 +
65 107 /**
66 108 * 获取用户信息
67 109 *
... ...
trash-framework/src/main/java/com/trash/framework/config/SecurityConfig.java
... ... @@ -98,7 +98,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
98 98 // 过滤请求
99 99 .authorizeRequests()
100 100 // 对于登录login 验证码captchaImage 允许匿名访问
101   - .antMatchers("/login", "/captchaImage").anonymous()
  101 + .antMatchers("/login", "/captchaImage","/loginByToken").anonymous()
102 102 .antMatchers(
103 103 HttpMethod.GET,
104 104 "/*.html",
... ...
trash-framework/src/main/java/com/trash/framework/security/filter/JwtAuthenticationTokenFilter.java
... ... @@ -45,7 +45,7 @@ public class JwtAuthenticationTokenFilter extends OncePerRequestFilter
45 45 String token = request.getHeader("Authorization");
46 46  
47 47 if(token == null){
48   - token = tokenService.getTokenFromCookies(request);
  48 + token = tokenService.getTokenFromCookies(request);
49 49 }
50 50  
51 51 if(token!= null && !token.equals("undefined")){
... ...
trash-framework/src/main/java/com/trash/framework/web/service/TokenService.java
... ... @@ -94,7 +94,7 @@ public class TokenService
94 94  
95 95 public String getTokenFromCookies(HttpServletRequest request) {
96 96 try {
97   - for(Cookie cookie : request.getCookies()){
  97 + for(Cookie cookie : request.getCookies()){
98 98 if(("token").equals(cookie.getName())){
99 99 return cookie.getValue();
100 100 }
... ... @@ -102,6 +102,9 @@ public class TokenService
102 102 } catch (Exception e) {
103 103 // e.printStackTrace();
104 104 }
  105 +
  106 + String token = request.getParameter("token");
  107 +
105 108 return null;
106 109 }
107 110  
... ...
trash-system/src/main/java/com/trash/system/service/impl/SysUserOnlineServiceImpl.java
... ... @@ -7,6 +7,7 @@ import com.trash.common.utils.StringUtils;
7 7 import com.trash.system.domain.SysUserOnline;
8 8 import com.trash.system.service.ISysUserOnlineService;
9 9  
  10 +
10 11 /**
11 12 * 在线用户 服务层处理
12 13 *
... ...
trash-ui/src/api/dict.js
1 1 import requestRemote from '@/utils/requestRemote'
2 2  
3 3 export function constructionsitesList(data) {
4   - const req = requestRemote({
  4 + return requestRemote({
5 5 url: '/api/siteservice/cs/constructionsites/search',
6 6 method: 'post',
7 7 data: data
8 8 });
  9 +}
9 10  
10   - return req;
  11 +export function earthsitesList(data) {
  12 + return requestRemote({
  13 + url: '/api/siteservice/cs/earthsites/list',
  14 + method: 'post',
  15 + data: data
  16 + });
11 17 }
12 18  
  19 +export function getArea(data) {
  20 + return requestRemote({
  21 + url: '/api/gpsservice/cs/area',
  22 + method: 'get',
  23 + param: data
  24 + });
  25 +}
  26 +
  27 +
13 28 export function getDict(param) {
14   - const req = requestRemote({
  29 + return requestRemote({
15 30 url: '/api/gpsservice/cs/dataDict',
16 31 method: 'get',
17   - param: param
  32 + params: param
18 33 });
19   -
20   - return req;
21 34 }
22   -
... ...
trash-ui/src/api/login.js
... ... @@ -19,8 +19,18 @@ export function login(username, password, code, uuid) {
19 19 export function getInfo() {
20 20 return request({
21 21 url: '/getInfo',
22   - method: 'get'
23   - })
  22 + method: 'get',
  23 + param:{'token':"123"}
  24 + });
  25 +}
  26 +
  27 +// 获取用户详细信息
  28 +export function loginByToken(token) {
  29 + return request({
  30 + url: '/loginByToken',
  31 + method: 'post',
  32 + data:{'token':token}
  33 + });
24 34 }
25 35  
26 36 // 退出方法
... ... @@ -37,4 +47,4 @@ export function getCodeImg() {
37 47 url: '/captchaImage',
38 48 method: 'get'
39 49 })
40   -}
41 50 \ No newline at end of file
  51 +}
... ...
trash-ui/src/permission.js
... ... @@ -5,6 +5,7 @@ import NProgress from &#39;nprogress&#39;
5 5 import 'nprogress/nprogress.css'
6 6 import { getToken,setToken } from '@/utils/auth'
7 7 import Cookies from "js-cookie";
  8 +import { loginByToken } from '@/api/login'
8 9  
9 10 NProgress.configure({ showSpinner: false })
10 11  
... ... @@ -13,18 +14,50 @@ const whiteList = [&#39;/login&#39;, &#39;/auth-redirect&#39;, &#39;/bind&#39;, &#39;/register&#39;]
13 14 // const whiteList = ['/*']
14 15  
15 16 router.beforeEach((to, from, next) => {
  17 + debugger;
16 18 NProgress.start()
17 19 var token = getToken();
18 20 if(!token){
19 21 if( to.query.token ){
20   - token = to.query.token;
21   - Cookies.set("token", token, { expires: 30 });
  22 + loginByToken(to.query.token).then(res=>{
  23 + setToken(res.token);
  24 + if (store.getters.roles.length === 0) {
  25 +
  26 + const user = res.user;
  27 + const roles = res.roles;
  28 + const avatar = require("@/assets/image/profile.jpg");
  29 + if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组
  30 + store.commit('SET_ROLES', res.roles);
  31 + store.commit('SET_PERMISSIONS', res.permissions);
  32 + } else {
  33 + store.commit('SET_ROLES', ['ROLE_DEFAULT']);
  34 + }
  35 + store.commit('SET_NAME', user.userName);
  36 + store.commit('SET_NICK_NAME', user.nickName);
  37 + store.commit('SET_AVATAR', avatar);
  38 +
  39 + store.dispatch('GenerateRoutes', { roles }).then(accessRoutes => {
  40 + // 测试 默认静态页面
  41 + // store.dispatch('permission/generateRoutes', { roles }).then(accessRoutes => {
  42 + // 根据roles权限生成可访问的路由表
  43 + router.addRoutes(accessRoutes) // 动态添加可访问路由表
  44 + next({ ...to, replace: true }) // hack方法 确保addRoutes已完成
  45 + })
  46 + } else {
  47 + next()
  48 + }
  49 + });
22 50 }else{
23 51 Cookies.remove("token");
  52 + if (whiteList.indexOf(to.path) !== -1) {
  53 + // 在免登录白名单,直接进入
  54 + next()
  55 + } else {
  56 + next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
  57 + NProgress.done()
  58 + }
24 59 }
25   - }
26   -
27   - if (token) {
  60 + }else{
28 61 /* has token*/
29 62 if (to.path === '/login') {
30 63 next({ path: '/' })
... ... @@ -34,9 +67,9 @@ router.beforeEach((to, from, next) =&gt; {
34 67 store.dispatch('GetInfo').then(res => {
35 68 // 拉取user_info
36 69 const roles = res.roles
37   -
  70 +
38 71 setToken(res.token)
39   -
  72 +
40 73 store.dispatch('GenerateRoutes', { roles }).then(accessRoutes => {
41 74 // 测试 默认静态页面
42 75 // store.dispatch('permission/generateRoutes', { roles }).then(accessRoutes => {
... ... @@ -61,16 +94,7 @@ router.beforeEach((to, from, next) =&gt; {
61 94 // }
62 95 // 可删 ↑
63 96 }
64   - }
65   - } else {
66   - // 没有token
67   - if (whiteList.indexOf(to.path) !== -1) {
68   - // 在免登录白名单,直接进入
69   - next()
70   - } else {
71   - next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
72   - NProgress.done()
73   - }
  97 + }
74 98 }
75 99 })
76 100  
... ...
trash-ui/src/store/modules/user.js
1 1 import { login, logout, getInfo } from '@/api/login'
2 2 import { getToken, setToken, removeToken } from '@/utils/auth'
  3 +import Cookies from "js-cookie";
3 4  
4 5 const user = {
5 6 state: {
... ... @@ -53,22 +54,22 @@ const user = {
53 54 // 获取用户信息
54 55 GetInfo({ commit, state }) {
55 56 return new Promise((resolve, reject) => {
56   - getInfo(state.token).then(res => {
57   - const user = res.user
58   - const avatar = require("@/assets/image/profile.jpg");
59   - if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组
60   - commit('SET_ROLES', res.roles)
61   - commit('SET_PERMISSIONS', res.permissions)
62   - } else {
63   - commit('SET_ROLES', ['ROLE_DEFAULT'])
64   - }
65   - commit('SET_NAME', user.userName)
66   - commit('SET_NICK_NAME', user.nickName)
67   - commit('SET_AVATAR', avatar)
68   - resolve(res)
69   - }).catch(error => {
70   - reject(error)
71   - })
  57 + getInfo(state.token).then(res => {
  58 + const user = res.user
  59 + const avatar = require("@/assets/image/profile.jpg");
  60 + if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组
  61 + commit('SET_ROLES', res.roles)
  62 + commit('SET_PERMISSIONS', res.permissions)
  63 + } else {
  64 + commit('SET_ROLES', ['ROLE_DEFAULT'])
  65 + }
  66 + commit('SET_NAME', user.userName)
  67 + commit('SET_NICK_NAME', user.nickName)
  68 + commit('SET_AVATAR', avatar)
  69 + resolve(res)
  70 + }).catch(error => {
  71 + reject(error)
  72 + })
72 73 })
73 74 },
74 75  
... ...
trash-ui/src/utils/auth.js
... ... @@ -3,13 +3,19 @@ import Cookies from &#39;js-cookie&#39;
3 3 const TokenKey = 'Admin-Token'
4 4  
5 5 export function getToken() {
6   - return Cookies.get(TokenKey)
  6 + let token = Cookies.get('Admin-Token');
  7 + if(!token){
  8 + token = sessionStorage.getItem('Admin-Token');
  9 + }
  10 + return token
7 11 }
8 12  
9 13 export function setToken(token) {
  14 +
  15 + sessionStorage.setItem(TokenKey, token)
10 16 return Cookies.set(TokenKey, token)
11 17 }
12 18  
13 19 export function removeToken() {
14 20 return Cookies.remove(TokenKey)
15   -}
16 21 \ No newline at end of file
  22 +}
... ...
trash-ui/src/views/business/threestep/index.vue
... ... @@ -77,9 +77,11 @@
77 77 </el-col>
78 78 <el-col :span="12">
79 79 <el-form-item label="所属区域" prop="place">
80   - <el-select v-model="form.place" placeholder="请选择所属区域">
81   - <el-option label="A区" value="A区" />
82   - <el-option label="B区" value="B区" />
  80 + <el-select v-model="form.place" placeholder="请选择所属区域" filterable clearable reserve-keyword
  81 + @clear="areaClear">
  82 + <el-option @click.native="selectArea(item.code)" v-for="item in areas" :label="item.name"
  83 + :value="item.code" :key="item.code">
  84 + </el-option>
83 85 </el-select>
84 86 </el-form-item>
85 87 </el-col>
... ... @@ -88,16 +90,18 @@
88 90 <el-col :span="12">
89 91 <el-form-item :label="labelName" prop="name">
90 92 <el-select v-model="form.name" filterable clearable reserve-keyword>
91   - <el-option label="A区" value="A区" />
92   - <el-option label="B区" value="B区" />
  93 + <el-option @click.native="getObjId(item)" v-for="item in remoteData" :label="item.name"
  94 + :value="item.name" :key="item.id" v-if="areaCode == null || item.areaCode == areaCode">
  95 + </el-option>
93 96 </el-select>
94 97 </el-form-item>
95 98 </el-col>
96 99 <el-col :span="12">
97 100 <el-form-item :label="labelName2" prop="place">
98   - <el-select v-model="form.objectId">
99   - <el-option label="A区" value="A区" />
100   - <el-option label="B区" value="A区" />
  101 + <el-select v-model="bindname">
  102 + <el-option @click.native="getEarthsiteId(item)" v-for="item in bindData" :label="item.name"
  103 + :value="item.name" :key="item.id">
  104 + </el-option>
101 105 </el-select>
102 106 </el-form-item>
103 107 </el-col>
... ... @@ -222,6 +226,9 @@
222 226 </p>
223 227 </el-col>
224 228 </el-row>
  229 +
  230 + <el-input v-model="form.earthsitesId" type="hidden" />
  231 + <el-input v-model="form.objectId" type="hidden" />
225 232 </el-form>
226 233  
227 234 <div slot="footer" class="dialog-footer">
... ... @@ -243,7 +250,7 @@
243 250 </el-form-item>
244 251 </el-col>
245 252 <el-col :span="12">
246   - <el-form-item label="所属区域" >
  253 + <el-form-item label="所属区域">
247 254 <el-select v-model="infoData.place" disabled>
248 255 <el-option label="A区" value="A区" />
249 256 <el-option label="B区" value="B区" />
... ... @@ -314,7 +321,7 @@
314 321 </el-col>
315 322 </el-row>
316 323  
317   - <el-row v-if="infoData.img0" >
  324 + <el-row v-if="infoData.img0">
318 325 <el-col :span="4">
319 326 过水槽照片
320 327 </el-col>
... ... @@ -324,7 +331,7 @@
324 331 </el-row>
325 332 </el-col>
326 333 </el-row>
327   - <el-row v-if="infoData.img1" >
  334 + <el-row v-if="infoData.img1">
328 335 <el-col :span="4">
329 336 洗车平台照片
330 337 </el-col>
... ... @@ -334,7 +341,7 @@
334 341 </el-row>
335 342 </el-col>
336 343 </el-row>
337   - <el-row v-if="infoData.img2" >
  344 + <el-row v-if="infoData.img2">
338 345 <el-col :span="4">
339 346 出入口照片
340 347 </el-col>
... ... @@ -344,106 +351,106 @@
344 351 </el-row>
345 352 </el-col>
346 353 </el-row>
347   - <el-row v-if="infoData.img3" >
348   - <el-col :span="4">
349   - 沉淀池照片
350   - </el-col>
351   - <el-col :span="20">
352   - <el-row v-for="img in infoData.img3.split(',')" style="margin-bottom:10px;">
353   - <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a>
354   - </el-row>
355   - </el-col>
356   - </el-row>
357   - <el-row v-if="infoData.img4" >
358   - <el-col :span="4">
359   - 硬质路面照片
360   - </el-col>
361   - <el-col :span="20">
362   - <el-row v-for="img in infoData.img4.split(',')" style="margin-bottom:10px;">
363   - <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a>
364   - </el-row>
365   - </el-col>
  354 + <el-row v-if="infoData.img3">
  355 + <el-col :span="4">
  356 + 沉淀池照片
  357 + </el-col>
  358 + <el-col :span="20">
  359 + <el-row v-for="img in infoData.img3.split(',')" style="margin-bottom:10px;">
  360 + <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a>
  361 + </el-row>
  362 + </el-col>
  363 + </el-row>
  364 + <el-row v-if="infoData.img4">
  365 + <el-col :span="4">
  366 + 硬质路面照片
  367 + </el-col>
  368 + <el-col :span="20">
  369 + <el-row v-for="img in infoData.img4.split(',')" style="margin-bottom:10px;">
  370 + <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a>
  371 + </el-row>
  372 + </el-col>
  373 + </el-row>
  374 + <el-row v-if="infoData.img5">
  375 + <el-col :span="4">
  376 + 摄像头视频截图1
  377 + </el-col>
  378 + <el-col :span="20">
  379 + <el-row v-for="img in infoData.img5.split(',')" style="margin-bottom:10px;">
  380 + <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a>
  381 + </el-row>
  382 + </el-col>
  383 + </el-row>
  384 + <el-row v-if="infoData.img6">
  385 + <el-col :span="4">
  386 + 摄像头视频截图2
  387 + </el-col>
  388 + <el-col :span="20">
  389 + <el-row v-for="img in infoData.img6.split(',')" style="margin-bottom:10px;">
  390 + <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a>
  391 + </el-row>
  392 + </el-col>
  393 + </el-row>
  394 + <el-row v-if="infoData.img7">
  395 + <el-col :span="4">
  396 + 摄像头视频截图3
  397 + </el-col>
  398 + <el-col :span="20">
  399 + <el-row v-for="img in infoData.img7.split(',')" style="margin-bottom:10px;">
  400 + <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a>
  401 + </el-row>
  402 + </el-col>
  403 + </el-row>
  404 + <el-row v-if="infoData.img8">
  405 + <el-col :span="4">
  406 + 其他1
  407 + </el-col>
  408 + <el-col :span="20">
  409 + <el-row v-for="img in infoData.img8.split(',')" style="margin-bottom:10px;">
  410 + <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a>
  411 + </el-row>
  412 + </el-col>
  413 + </el-row>
  414 + <el-row v-if="infoData.img9">
  415 + <el-col :span="4">
  416 + 其他2
  417 + </el-col>
  418 + <el-col :span="20">
  419 + <el-row v-for="img in infoData.img9.split(',')" style="margin-bottom:10px;">
  420 + <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a>
  421 + </el-row>
  422 + </el-col>
  423 + </el-row>
  424 + <el-row v-if="infoData.img10">
  425 + <el-col :span="4">
  426 + 其他3
  427 + </el-col>
  428 + <el-col :span="20">
  429 + <el-row v-for="img in infoData.img10.split(',')" style="margin-bottom:10px;">
  430 + <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a>
  431 + </el-row>
  432 + </el-col>
  433 + </el-row>
  434 + <el-row v-if="infoData.img11">
  435 + <el-col :span="4">
  436 + 其他4
  437 + </el-col>
  438 + <el-col :span="20">
  439 + <el-row v-for="img in infoData.img11.split(',')" style="margin-bottom:10px;">
  440 + <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a>
  441 + </el-row>
  442 + </el-col>
  443 + </el-row>
  444 + <el-row v-if="infoData.img12">
  445 + <el-col :span="4">
  446 + 其他5
  447 + </el-col>
  448 + <el-col :span="20">
  449 + <el-row v-for="img in infoData.img12.split(',')" style="margin-bottom:10px;">
  450 + <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a>
366 451 </el-row>
367   - <el-row v-if="infoData.img5" >
368   - <el-col :span="4">
369   - 摄像头视频截图1
370   - </el-col>
371   - <el-col :span="20">
372   - <el-row v-for="img in infoData.img5.split(',')" style="margin-bottom:10px;">
373   - <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a>
374   - </el-row>
375   - </el-col>
376   - </el-row>
377   - <el-row v-if="infoData.img6" >
378   - <el-col :span="4">
379   - 摄像头视频截图2
380   - </el-col>
381   - <el-col :span="20">
382   - <el-row v-for="img in infoData.img6.split(',')" style="margin-bottom:10px;">
383   - <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a>
384   - </el-row>
385   - </el-col>
386   - </el-row>
387   - <el-row v-if="infoData.img7" >
388   - <el-col :span="4">
389   - 摄像头视频截图3
390   - </el-col>
391   - <el-col :span="20">
392   - <el-row v-for="img in infoData.img7.split(',')" style="margin-bottom:10px;">
393   - <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a>
394   - </el-row>
395   - </el-col>
396   - </el-row>
397   - <el-row v-if="infoData.img8" >
398   - <el-col :span="4">
399   - 其他1
400   - </el-col>
401   - <el-col :span="20">
402   - <el-row v-for="img in infoData.img8.split(',')" style="margin-bottom:10px;">
403   - <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a>
404   - </el-row>
405   - </el-col>
406   - </el-row>
407   - <el-row v-if="infoData.img9" >
408   - <el-col :span="4">
409   - 其他2
410   - </el-col>
411   - <el-col :span="20">
412   - <el-row v-for="img in infoData.img9.split(',')" style="margin-bottom:10px;">
413   - <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a>
414   - </el-row>
415   - </el-col>
416   - </el-row>
417   - <el-row v-if="infoData.img10" >
418   - <el-col :span="4">
419   - 其他3
420   - </el-col>
421   - <el-col :span="20">
422   - <el-row v-for="img in infoData.img10.split(',')" style="margin-bottom:10px;">
423   - <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a>
424   - </el-row>
425   - </el-col>
426   - </el-row>
427   - <el-row v-if="infoData.img11" >
428   - <el-col :span="4">
429   - 其他4
430   - </el-col>
431   - <el-col :span="20">
432   - <el-row v-for="img in infoData.img11.split(',')" style="margin-bottom:10px;">
433   - <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a>
434   - </el-row>
435   - </el-col>
436   - </el-row>
437   - <el-row v-if="infoData.img12" >
438   - <el-col :span="4">
439   - 其他5
440   - </el-col>
441   - <el-col :span="20">
442   - <el-row v-for="img in infoData.img12.split(',')" style="margin-bottom:10px;">
443   - <a @click="downloadFile(img);" style="color: blue;">{{img.split("/")[img.split("/").length -1]}}</a>
444   - </el-row>
445   - </el-col>
446   - </el-row>
  452 + </el-col>
  453 + </el-row>
447 454 </el-form>
448 455  
449 456 <div slot="footer" class="dialog-footer">
... ... @@ -486,8 +493,10 @@
486 493 } from "@/utils/auth";
487 494  
488 495 import {
  496 + earthsitesList,
489 497 constructionsitesList,
490   - getDict
  498 + getDict,
  499 + getArea
491 500 } from "@/api/dict";
492 501  
493 502 export default {
... ... @@ -518,8 +527,8 @@
518 527 fileList: [],
519 528 // 弹出层标题
520 529 title: "",
521   - labelName: "",
522   - labelName2: "",
  530 + labelName: "工地名称",
  531 + labelName2: "绑定消纳场",
523 532 upload: {
524 533 // 是否显示弹出层(用户导入)
525 534 open: false,
... ... @@ -553,7 +562,8 @@
553 562 companyTrucks: null
554 563 },
555 564 // 表单参数
556   - form: {},
  565 + form: {
  566 + },
557 567 picIndex: null,
558 568 // 表单校验
559 569 rules: {
... ... @@ -592,7 +602,6 @@
592 602 message: '请填写完整',
593 603 trigger: 'blur'
594 604 }, ],
595   -
596 605 phone: [{
597 606 required: true,
598 607 message: '请填写完整',
... ... @@ -603,25 +612,49 @@
603 612 message: '手机号格式错误',
604 613 trigger: 'blur'
605 614 },
606   - ],
607   -
608   - }
  615 + ]
  616 + },
  617 + SiteWorkAreaCodeType: [],
  618 + remoteData: [],
  619 + remoteQueryData: {
  620 + "page": 1,
  621 + "size": 9999
  622 + },
  623 + areas: [],
  624 + areaCode: null,
  625 + bindData: [],
  626 + bindname:null,
609 627 };
610 628 },
611 629 created() {
612   -
613   - let data = {
614   - page:1,
615   - size:9999
616   - }
617   -
618   - constructionsitesList(data).then(response=>{
619   - console.log(response);
  630 + getArea().then(res => {
  631 + this.areas = res.result;
620 632 });
621   -
622 633 this.getList();
623 634 },
624 635 methods: {
  636 + areaClear() {
  637 + this.areaCode = null;
  638 + },
  639 + selectArea(a) {
  640 + this.areaCode = a;
  641 + },
  642 + getObjId(item) {
  643 + if (this.form.type == 0) {
  644 + this.form.objectId = item.id;
  645 + this.form.place = Number(item.areaCode);
  646 + } else {
  647 + this.form.earthsitesId = item.id;
  648 + this.form.place = Number(item.areaCode);
  649 + }
  650 + },
  651 + getEarthsiteId(item) {
  652 + if (this.form.type == 0) {
  653 + this.form.objectId = item.id;
  654 + } else {
  655 + this.form.earthsitesId = item.id;
  656 + }
  657 + },
625 658 downloadFile(path) {
626 659 window.location.href = process.env.VUE_APP_BASE_API + "/business/threestep/download?path=" + encodeURI(path);
627 660 },
... ... @@ -669,10 +702,30 @@
669 702 if (value == "0") {
670 703 this.labelName = "工地名称";
671 704 this.labelName2 = "绑定消纳场";
  705 +
672 706 } else {
673 707 this.labelName = "消纳场名称";
674 708 this.labelName2 = "绑定工地";
675 709 }
  710 +
  711 + this.form.name = null;
  712 + this.bindname = null;
  713 + constructionsitesList(this.remoteQueryData).then(res => {
  714 + if (value == 0) {
  715 + this.remoteData = res.result.list;
  716 + } else {
  717 + this.bindData = res.result.list;
  718 + }
  719 + });
  720 +
  721 + earthsitesList(this.remoteQueryData).then(res => {
  722 + if (value == 0) {
  723 + this.bindData = res.result.list;
  724 + } else {
  725 + this.remoteData = res.result.list;
  726 + }
  727 + });
  728 +
676 729 },
677 730 /** 查询【请填写功能名称】列表 */
678 731 getList() {
... ...