Commit 28de91f0272126e7c119bdd102e476719e77b435

Authored by 2c
1 parent 6679a92c

建筑垃圾-基础数据

Too many changes to show.

To preserve performance only 15 of 49 files are displayed.

trash-ui/src/api/unit/businessUnit.js 0 → 100644
  1 +import request from '@/utils/request'
  2 +
  3 +// 查询运输企业管理列表
  4 +export function listEnterprise(query) {
  5 + return request({
  6 + url: '/unit/enterprise/list',
  7 + method: 'get',
  8 + params: query
  9 + })
  10 +}
  11 +
  12 +// 查询运输企业管理详细
  13 +export function getEnterprise(id) {
  14 + return request({
  15 + url: '/unit/enterprise/' + id,
  16 + method: 'get'
  17 + })
  18 +}
  19 +
  20 +// 新增运输企业管理
  21 +export function addEnterprise(data) {
  22 + return request({
  23 + url: '/unit/enterprise',
  24 + method: 'post',
  25 + data: data
  26 + })
  27 +}
  28 +
  29 +// 修改运输企业管理
  30 +export function updateEnterprise(data) {
  31 + return request({
  32 + url: '/unit/enterprise',
  33 + method: 'put',
  34 + data: data
  35 + })
  36 +}
  37 +
  38 +// 删除运输企业管理
  39 +export function delEnterprise(id) {
  40 + return request({
  41 + url: '/unit/enterprise/' + id,
  42 + method: 'delete'
  43 + })
  44 +}
  45 +
  46 +// 导出运输企业管理
  47 +export function exportEnterprise(query) {
  48 + return request({
  49 + url: '/unit/enterprise/export',
  50 + method: 'get',
  51 + params: query
  52 + })
  53 +}
... ...
trash-ui/src/api/unit/carInfo.js 0 → 100644
  1 +import request from '@/utils/request'
  2 +
  3 +// 查询运输车辆管理列表
  4 +export function listCarInfo(query) {
  5 + return request({
  6 + url: '/unit/carInfo/list',
  7 + method: 'get',
  8 + params: query
  9 + })
  10 +}
  11 +
  12 +// 查询运输车辆管理详细
  13 +export function getCarInfo(id) {
  14 + return request({
  15 + url: '/unit/carInfo/' + id,
  16 + method: 'get'
  17 + })
  18 +}
  19 +
  20 +// 新增运输车辆管理
  21 +export function addCarInfo(data) {
  22 + return request({
  23 + url: '/unit/carInfo',
  24 + method: 'post',
  25 + data: data
  26 + })
  27 +}
  28 +
  29 +// 修改运输车辆管理
  30 +export function updateCarInfo(data) {
  31 + return request({
  32 + url: '/unit/carInfo',
  33 + method: 'put',
  34 + data: data
  35 + })
  36 +}
  37 +
  38 +// 删除运输车辆管理
  39 +export function delCarInfo(id) {
  40 + return request({
  41 + url: '/unit/carInfo/' + id,
  42 + method: 'delete'
  43 + })
  44 +}
  45 +
  46 +// 导出运输车辆管理
  47 +export function exportCarInfo(query) {
  48 + return request({
  49 + url: '/unit/carInfo/export',
  50 + method: 'get',
  51 + params: query
  52 + })
  53 +}
... ...
trash-ui/src/api/unit/disposalSite.js 0 → 100644
  1 +import request from '@/utils/request'
  2 +
  3 +// 查询处理场所管理列表
  4 +export function listDisposalSite(query) {
  5 + return request({
  6 + url: '/unit/disposalSite/list',
  7 + method: 'get',
  8 + params: query
  9 + })
  10 +}
  11 +
  12 +// 查询处理场所管理详细
  13 +export function getDisposalSite(id) {
  14 + return request({
  15 + url: '/unit/disposalSite/' + id,
  16 + method: 'get'
  17 + })
  18 +}
  19 +
  20 +// 新增处理场所管理
  21 +export function addDisposalSite(data) {
  22 + return request({
  23 + url: '/unit/disposalSite',
  24 + method: 'post',
  25 + data: data
  26 + })
  27 +}
  28 +
  29 +// 修改处理场所管理
  30 +export function updateDisposalSite(data) {
  31 + return request({
  32 + url: '/unit/disposalSite',
  33 + method: 'put',
  34 + data: data
  35 + })
  36 +}
  37 +
  38 +// 删除处理场所管理
  39 +export function delDisposalSite(id) {
  40 + return request({
  41 + url: '/unit/disposalSite/' + id,
  42 + method: 'delete'
  43 + })
  44 +}
  45 +
  46 +// 导出处理场所管理
  47 +export function exportDisposalSite(query) {
  48 + return request({
  49 + url: '/unit/disposalSite/export',
  50 + method: 'get',
  51 + params: query
  52 + })
  53 +}
... ...
trash-ui/src/api/unit/driver.js 0 → 100644
  1 +import request from '@/utils/request'
  2 +
  3 +// 查询驾驶员管理列表
  4 +export function listDriver(query) {
  5 + return request({
  6 + url: '/unit/driver/list',
  7 + method: 'get',
  8 + params: query
  9 + })
  10 +}
  11 +
  12 +
  13 +// 查询驾驶员管理详细
  14 +export function listDriverByCompanyId(companyId) {
  15 + return request({
  16 + url: '/unit/driver/listDriverByCompany/' + companyId,
  17 + method: 'get'
  18 + })
  19 +}
  20 +
  21 +// 查询驾驶员管理详细
  22 +export function getDriver(id) {
  23 + return request({
  24 + url: '/unit/driver/' + id,
  25 + method: 'get'
  26 + })
  27 +}
  28 +
  29 +// 新增驾驶员管理
  30 +export function addDriver(data) {
  31 + return request({
  32 + url: '/unit/driver',
  33 + method: 'post',
  34 + data: data
  35 + })
  36 +}
  37 +
  38 +// 修改驾驶员管理
  39 +export function updateDriver(data) {
  40 + return request({
  41 + url: '/unit/driver',
  42 + method: 'put',
  43 + data: data
  44 + })
  45 +}
  46 +
  47 +// 删除驾驶员管理
  48 +export function delDriver(id) {
  49 + return request({
  50 + url: '/unit/driver/' + id,
  51 + method: 'delete'
  52 + })
  53 +}
  54 +
  55 +// 导出驾驶员管理
  56 +export function exportDriver(query) {
  57 + return request({
  58 + url: '/unit/driver/export',
  59 + method: 'get',
  60 + params: query
  61 + })
  62 +}
... ...
trash-ui/src/api/unit/enterprise.js 0 → 100644
  1 +import request from '@/utils/request'
  2 +
  3 +// 查询运输企业管理列表
  4 +export function listEnterprise(query) {
  5 + return request({
  6 + url: '/unit/enterprise/list',
  7 + method: 'get',
  8 + params: query
  9 + })
  10 +}
  11 +
  12 +// 查询运输企业管理详细
  13 +export function getEnterprise(id) {
  14 + return request({
  15 + url: '/unit/enterprise/' + id,
  16 + method: 'get'
  17 + })
  18 +}
  19 +
  20 +// 新增运输企业管理
  21 +export function addEnterprise(data) {
  22 + return request({
  23 + url: '/unit/enterprise',
  24 + method: 'post',
  25 + data: data
  26 + })
  27 +}
  28 +
  29 +// 修改运输企业管理
  30 +export function updateEnterprise(data) {
  31 + return request({
  32 + url: '/unit/enterprise',
  33 + method: 'put',
  34 + data: data
  35 + })
  36 +}
  37 +
  38 +// 删除运输企业管理
  39 +export function delEnterprise(id) {
  40 + return request({
  41 + url: '/unit/enterprise/' + id,
  42 + method: 'delete'
  43 + })
  44 +}
  45 +
  46 +// 导出运输企业管理
  47 +export function exportEnterprise(query) {
  48 + return request({
  49 + url: '/unit/enterprise/export',
  50 + method: 'get',
  51 + params: query
  52 + })
  53 +}
... ...
trash-ui/src/main.js
... ... @@ -12,6 +12,7 @@ import '@/assets/styles/trash.scss' // trash css
12 12 import App from './App'
13 13 import store from './store'
14 14 import router from './router'
  15 +import plugins from './plugins' // plugins
15 16 import permission from './directive/permission'
16 17  
17 18 import './assets/icons' // icon
... ... @@ -35,7 +36,11 @@ Vue.prototype.selectDictLabels = selectDictLabels
35 36 Vue.prototype.download = download
36 37 Vue.prototype.handleTree = handleTree
37 38 Vue.prototype.parseStatus = parseStatus
38   -Vue.prototype.checkPer = checkPermi
  39 +Vue.prototype.checkPer = checkPermi
  40 +
  41 +Vue.use(plugins)
  42 +Vue.prototype.$aMapKey = "902732b0ff4758e4b39f0f34f0cb1cb0";// 高德地图key
  43 +
39 44  
40 45 Vue.prototype.remoteFrame = "http://183.66.242.6:14601"
41 46 // Vue.prototype.remoteFrame = "http://175.6.47.84:8008"
... ... @@ -67,8 +72,8 @@ Vue.use(permission)
67 72 *
68 73 * Currently MockJs will be used in the production environment,
69 74 * please remove it before going online! ! !
70   - */
71   -Element.Dialog.props.closeOnClickModal.default = false;
  75 + */
  76 +Element.Dialog.props.closeOnClickModal.default = false;
72 77  
73 78 Vue.use(Element, {
74 79 size: Cookies.get('size') || 'medium' // set element-ui default size
... ...
trash-ui/src/plugins/index.js 0 → 100644
  1 +import tab from './tab'
  2 +
  3 +export default {
  4 + install(Vue) {
  5 + // 页签操作
  6 + Vue.prototype.$tab = tab
  7 + }
  8 +}
... ...
trash-ui/src/plugins/tab.js 0 → 100644
  1 +import store from '@/store'
  2 +import router from '@/router';
  3 +
  4 +export default {
  5 + // 刷新当前tab页签
  6 + refreshPage(obj) {
  7 + const { path, query, matched } = router.currentRoute;
  8 + if (obj === undefined) {
  9 + matched.forEach((m) => {
  10 + if (m.components && m.components.default && m.components.default.name) {
  11 + if (!['Layout', 'ParentView'].includes(m.components.default.name)) {
  12 + obj = { name: m.components.default.name, path: path, query: query };
  13 + }
  14 + }
  15 + });
  16 + }
  17 + return store.dispatch('tagsView/delCachedView', obj).then(() => {
  18 + const { path, query } = obj
  19 + router.replace({
  20 + path: '/redirect' + path,
  21 + query: query
  22 + })
  23 + })
  24 + },
  25 + // 关闭当前tab页签,打开新页签
  26 + closeOpenPage(obj) {
  27 + store.dispatch("tagsView/delView", router.currentRoute);
  28 + if (obj !== undefined) {
  29 + return router.push(obj);
  30 + }
  31 + },
  32 + // 关闭指定tab页签
  33 + closePage(obj) {
  34 + if (obj === undefined) {
  35 + return store.dispatch('tagsView/delView', router.currentRoute).then(({ visitedViews }) => {
  36 + const latestView = visitedViews.slice(-1)[0]
  37 + if (latestView) {
  38 + return router.push(latestView.fullPath)
  39 + }
  40 + return router.push('/');
  41 + });
  42 + }
  43 + return store.dispatch('tagsView/delView', obj);
  44 + },
  45 + // 关闭所有tab页签
  46 + closeAllPage() {
  47 + return store.dispatch('tagsView/delAllViews');
  48 + },
  49 + // 关闭左侧tab页签
  50 + closeLeftPage(obj) {
  51 + return store.dispatch('tagsView/delLeftTags', obj || router.currentRoute);
  52 + },
  53 + // 关闭右侧tab页签
  54 + closeRightPage(obj) {
  55 + return store.dispatch('tagsView/delRightTags', obj || router.currentRoute);
  56 + },
  57 + // 关闭其他tab页签
  58 + closeOtherPage(obj) {
  59 + return store.dispatch('tagsView/delOthersViews', obj || router.currentRoute);
  60 + },
  61 + // 添加tab页签
  62 + openPage(title, url, params) {
  63 + var obj = { path: url, meta: { title: title } }
  64 + store.dispatch('tagsView/addView', obj);
  65 + return router.push({ path: url, query: params });
  66 + },
  67 + // 修改tab页签
  68 + updatePage(obj) {
  69 + return store.dispatch('tagsView/updateVisitedView', obj);
  70 + }
  71 +}
... ...
trash-ui/src/router/index.js
... ... @@ -65,6 +65,7 @@ export const constantRoutes = [
65 65 }
66 66 ]
67 67 },
  68 +
68 69 {
69 70 path: '/user',
70 71 component: Layout,
... ... @@ -115,9 +116,79 @@ export const constantRoutes = [
115 116 component: (resolve) => require(['@/views/tool/gen/editTable'], resolve),
116 117 name: 'GenEdit',
117 118 meta: { title: '修改生成配置' }
118   - }
  119 + },
  120 + {
  121 + path: '/disposalSite/info',
  122 + component: (resolve) => require(['@/views/unit/disposalSite/info'], resolve),
  123 + name: '新增处理场所',
  124 + hidden: true,
  125 + meta: { title: '新增处理场所' }
  126 + },
  127 + {
  128 + path: '/disposalSite/infoEdit',
  129 + component: (resolve) => require(['@/views/unit/disposalSite/info'], resolve),
  130 + name: '修改处理场所',
  131 + hidden: true,
  132 + meta: { title: '修改处理场所' }
  133 + },
  134 + {
  135 + path: '/enterprise/info',
  136 + component: (resolve) => require(['@/views/unit/enterprise/info'], resolve),
  137 + name: '新增运输企业',
  138 + hidden: true,
  139 + meta: { title: '新增运输企业' }
  140 + },
  141 + {
  142 + path: '/enterprise/infoEdit',
  143 + component: (resolve) => require(['@/views/unit/enterprise/info'], resolve),
  144 + name: '修改运输企业',
  145 + hidden: true,
  146 + meta: { title: '修改运输企业' }
  147 + },
  148 + {
  149 + path: '/unit/info',
  150 + component: (resolve) => require(['@/views/unit/businessUnit/info'], resolve),
  151 + name: '新增经营单位',
  152 + hidden: true,
  153 + meta: { title: '新增经营单位' }
  154 + },
  155 + {
  156 + path: '/unit/infoEdit',
  157 + component: (resolve) => require(['@/views/unit/businessUnit/info'], resolve),
  158 + name: '修改经营单位',
  159 + hidden: true,
  160 + meta: { title: '修改经营单位' }
  161 + },
  162 + {
  163 + path: '/carInfo/info',
  164 + component: (resolve) => require(['@/views/unit/carInfo/info'], resolve),
  165 + name: '新增车辆信息',
  166 + hidden: true,
  167 + meta: { title: '新增车辆信息' }
  168 + },
  169 + {
  170 + path: '/carInfo/infoEdit',
  171 + component: (resolve) => require(['@/views/unit/carInfo/info'], resolve),
  172 + name: '修改车辆信息',
  173 + hidden: true,
  174 + meta: { title: '修改车辆信息' }
  175 + },
  176 + {
  177 + path: '/driverInfo/info',
  178 + component: (resolve) => require(['@/views/unit/driver/info'], resolve),
  179 + name: '新增驾驶员',
  180 + hidden: true,
  181 + meta: { title: '新增驾驶员' }
  182 + },
  183 + {
  184 + path: '/driverInfo/infoEdit',
  185 + component: (resolve) => require(['@/views/unit/driver/info'], resolve),
  186 + name: '修改驾驶员',
  187 + hidden: true,
  188 + meta: { title: '修改驾驶员' }
  189 + },
119 190 ]
120   - },
  191 + },
121 192 {
122 193 path: '/business',
123 194 component: Layout,
... ... @@ -128,12 +199,12 @@ export const constantRoutes = [
128 199 component: (resolve) => require(['@/views/business/ConstructionCredit'], resolve),
129 200 name: '工地失信管理',
130 201 meta: { title: '工地失信管理' }
131   - },
132   - {
133   - path: 'track',
134   - component: (resolve) => require(['@/views/business/track'], resolve),
135   - name: '跟踪监督',
136   - meta: { title: '跟踪监督' }
  202 + },
  203 + {
  204 + path: 'track',
  205 + component: (resolve) => require(['@/views/business/track'], resolve),
  206 + name: '跟踪监督',
  207 + meta: { title: '跟踪监督' }
137 208 },
138 209 {
139 210 path: 'supervision/threestep',
... ... @@ -371,6 +442,7 @@ export const constantRoutes = [
371 442 },
372 443 ]
373 444 },
  445 +
374 446 // {
375 447 // path: '/task/handle',
376 448 // component: Layout,
... ...
trash-ui/src/views/unit/businessUnit/index.vue 0 → 100644
  1 +<template>
  2 + <div class="app-container">
  3 + <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="88px">
  4 + <el-form-item label="企业名称" prop="name">
  5 + <el-input
  6 + v-model="queryParams.name"
  7 + placeholder="请输入企业名称"
  8 + clearable
  9 + size="small"
  10 + @keyup.enter.native="handleQuery"
  11 + />
  12 + </el-form-item>
  13 + <el-form-item label="所属区域" prop="registrationArea">
  14 + <el-select v-model="queryParams.registrationArea" placeholder="请输入注册地所在区域" style="width: 100%" clearable>
  15 + <el-option v-for="(area,index) in areas" :label="area.name" :value="area.name" :key="index"/>
  16 + </el-select>
  17 + </el-form-item>
  18 +
  19 + <el-form-item label="法人代表" prop="legalRepresentative">
  20 + <el-input
  21 + v-model="queryParams.legalRepresentative"
  22 + placeholder="请输入法人代表"
  23 + clearable
  24 + size="small"
  25 + @keyup.enter.native="handleQuery"
  26 + />
  27 + </el-form-item>
  28 + <el-form-item label="审批状态" prop="status">
  29 + <el-select v-model="queryParams.status" placeholder="请选择审批状态" clearable size="small">
  30 + <el-option label="审批中" value="0" />
  31 + <el-option label="审批通过" value="1" />
  32 + <el-option label="被驳回" value="2" />
  33 + </el-select>
  34 + </el-form-item>
  35 + <el-form-item>
  36 + <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  37 + <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  38 + </el-form-item>
  39 + </el-form>
  40 +
  41 + <el-row :gutter="10" class="mb8">
  42 + <el-col :span="1.5">
  43 + <el-button
  44 + type="primary"
  45 + icon="el-icon-plus"
  46 + size="mini"
  47 + @click="handleAdd"
  48 + v-hasPermi="['unit:enterprise:add']"
  49 + >新增</el-button>
  50 + </el-col>
  51 + <el-col :span="1.5">
  52 + <el-button
  53 + type="success"
  54 + icon="el-icon-edit"
  55 + size="mini"
  56 + :disabled="single"
  57 + @click="handleUpdate"
  58 + v-hasPermi="['unit:enterprise:edit']"
  59 + >修改</el-button>
  60 + </el-col>
  61 + <el-col :span="1.5">
  62 + <el-button
  63 + type="danger"
  64 + icon="el-icon-delete"
  65 + size="mini"
  66 + :disabled="multiple"
  67 + @click="handleDelete"
  68 + v-hasPermi="['unit:enterprise:remove']"
  69 + >删除</el-button>
  70 + </el-col>
  71 + <el-col :span="1.5">
  72 + <el-button
  73 + type="warning"
  74 + icon="el-icon-download"
  75 + size="mini"
  76 + @click="handleExport"
  77 + v-hasPermi="['unit:enterprise:export']"
  78 + >导出</el-button>
  79 + </el-col>
  80 + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  81 + </el-row>
  82 +
  83 + <el-table v-loading="loading" :data="enterpriseList" @selection-change="handleSelectionChange">
  84 + <el-table-column type="selection" width="55" align="center" />
  85 + <el-table-column type="index" width="55" align="center" label="序号"/>
  86 + <el-table-column label="企业名称" align="center" prop="name" />
  87 + <el-table-column label="简称" align="center" prop="abbreviation" />
  88 + <el-table-column label="所属区域" align="center" prop="registrationArea" />
  89 + <el-table-column label="车辆数" align="center" prop="carNumber" />
  90 + <el-table-column label="法人代表" align="center" prop="legalRepresentative" />
  91 + <el-table-column label="联系方式" align="center" prop="legalRepresentativePhone" />
  92 + <el-table-column label="审批状态" align="center" prop="status">
  93 + <template slot-scope="scope">
  94 + <span>{{ parseStatus(scope.row.status) }}</span>
  95 + </template>
  96 + </el-table-column>
  97 + <el-table-column label="信用状态" align="center" prop="creditStatus" />
  98 + <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
  99 + <template slot-scope="scope">
  100 + <el-button
  101 + size="mini"
  102 + type="text"
  103 + icon="el-icon-edit"
  104 + @click="handleUpdate(scope.row)"
  105 + v-hasPermi="['unit:enterprise:edit']"
  106 + >修改</el-button>
  107 + <el-button
  108 + size="mini"
  109 + type="text"
  110 + icon="el-icon-delete"
  111 + @click="handleDelete(scope.row)"
  112 + v-hasPermi="['unit:enterprise:remove']"
  113 + >删除</el-button>
  114 + </template>
  115 + </el-table-column>
  116 + </el-table>
  117 +
  118 + <pagination
  119 + v-show="total>0"
  120 + :total="total"
  121 + :page.sync="queryParams.pageNum"
  122 + :limit.sync="queryParams.pageSize"
  123 + @pagination="getList"
  124 + />
  125 +
  126 + </div>
  127 +</template>
  128 +
  129 +<script>
  130 +import { listEnterprise, getEnterprise, delEnterprise, addEnterprise, updateEnterprise, exportEnterprise } from "@/api/unit/enterprise";
  131 +import {getAreaList} from "@/api/casefile/remoteServer";
  132 +
  133 +export default {
  134 + name: "Enterprise",
  135 + data() {
  136 + return {
  137 + // 遮罩层
  138 + loading: true,
  139 + // 选中数组
  140 + ids: [],
  141 + // 非单个禁用
  142 + single: true,
  143 + // 非多个禁用
  144 + multiple: true,
  145 + // 显示搜索条件
  146 + showSearch: true,
  147 + // 总条数
  148 + total: 0,
  149 + // 运输企业管理表格数据
  150 + enterpriseList: [],
  151 + // 弹出层标题
  152 + title: "",
  153 + // 是否显示弹出层
  154 + open: false,
  155 + // 查询参数
  156 + queryParams: {
  157 + pageNum: 1,
  158 + pageSize: 10,
  159 + name: null,
  160 + abbreviation: null,
  161 + registrationArea: null,
  162 + transportPermissionDate: null,
  163 + enterDate: null,
  164 + businessLicenseDate: null,
  165 + officeAddress: null,
  166 + parkingLotLocation: null,
  167 + parkingArea: null,
  168 + carNumber: null,
  169 + safetyManagerName: null,
  170 + safetyManagerPhone: null,
  171 + socialUniformCreditCodeNumber: null,
  172 + legalRepresentative: null,
  173 + legalRepresentativePhone: null,
  174 + safetyPeopleName: null,
  175 + transportPermission: null,
  176 + enterpriseBusinessLicense: null,
  177 + safetyOfficerQualificationCertificate: null,
  178 + safetyCertificate: null,
  179 + carParkPanorama: null,
  180 + businessUnit: null,
  181 + status: null,
  182 + parentId: null,
  183 + companyType: null,
  184 + creditStatus: null,
  185 + qrCode: null
  186 + },
  187 + // 表单参数
  188 + form: {},
  189 + // 表单校验
  190 + rules: {
  191 + },
  192 + areas: []
  193 + };
  194 + },
  195 + created() {
  196 + getAreaList().then(res => {
  197 + this.areas = res.data;
  198 + });
  199 + this.getList();
  200 + },
  201 + watch:{
  202 + '$route.query.unitRefresh':'getList'
  203 + },
  204 + methods: {
  205 + /** 查询运输企业管理列表 */
  206 + getList() {
  207 + this.loading = true;
  208 + this.queryParams.companyType = "0";
  209 + listEnterprise(this.queryParams).then(response => {
  210 + this.enterpriseList = response.rows;
  211 + this.total = response.total;
  212 + this.loading = false;
  213 + });
  214 + },
  215 + /** 搜索按钮操作 */
  216 + handleQuery() {
  217 + this.queryParams.pageNum = 1;
  218 + this.getList();
  219 + },
  220 + /** 重置按钮操作 */
  221 + resetQuery() {
  222 + this.resetForm("queryForm");
  223 + this.handleQuery();
  224 + },
  225 + // 多选框选中数据
  226 + handleSelectionChange(selection) {
  227 + this.ids = selection.map(item => item.id)
  228 + this.single = selection.length!==1
  229 + this.multiple = !selection.length
  230 + },
  231 + /** 新增按钮操作 */
  232 + handleAdd() {
  233 + this.$tab.openPage("新增经营单位","/unit/info",{unitRefresh:0});
  234 + },
  235 + /** 修改按钮操作 */
  236 + handleUpdate(row) {
  237 + const id = row.id || this.ids
  238 + this.$tab.openPage("修改经营单位","/unit/infoEdit",{unitId: id,unitRefresh:0});
  239 + },
  240 + /** 删除按钮操作 */
  241 + handleDelete(row) {
  242 + const ids = row.id || this.ids;
  243 + this.$confirm('是否确认删除运输企业管理编号为"' + ids + '"的数据项?', "警告", {
  244 + confirmButtonText: "确定",
  245 + cancelButtonText: "取消",
  246 + type: "warning"
  247 + }).then(function() {
  248 + return delEnterprise(ids);
  249 + }).then(() => {
  250 + this.getList();
  251 + this.msgSuccess("删除成功");
  252 + })
  253 + },
  254 + /** 导出按钮操作 */
  255 + handleExport() {
  256 + const queryParams = this.queryParams;
  257 + this.$confirm('是否确认导出所有运输企业管理数据项?', "警告", {
  258 + confirmButtonText: "确定",
  259 + cancelButtonText: "取消",
  260 + type: "warning"
  261 + }).then(function() {
  262 + return exportEnterprise(queryParams);
  263 + }).then(response => {
  264 + this.download(response.msg);
  265 + })
  266 + }
  267 + }
  268 +};
  269 +</script>
... ...
trash-ui/src/views/unit/businessUnit/info.vue 0 → 100644
  1 +<template>
  2 + <div class="app-container">
  3 +
  4 + <!-- 添加或修改处理场所管理对话框 -->
  5 + <h3>
  6 + 基础信息
  7 + </h3>
  8 + <el-form ref="form" :model="form" :rules="rules" label-width="80px" label-position="top">
  9 + <el-row :gutter="30">
  10 + <el-col :span="7">
  11 + <el-form-item label="企业名称" prop="name">
  12 + <el-input v-model="form.name" placeholder="请输入企业名称" />
  13 + </el-form-item>
  14 + </el-col>
  15 + <el-col :span="7">
  16 + <el-form-item label="简称" prop="abbreviation">
  17 + <el-input v-model="form.abbreviation" placeholder="请输入简称" />
  18 + </el-form-item>
  19 + </el-col>
  20 + <el-col :span="7">
  21 + <el-form-item label="注册地所在区域" prop="registrationArea">
  22 + <el-select v-model="form.registrationArea" placeholder="请输入注册地所在区域" style="width: 100%">
  23 + <el-option v-for="(area,index) in areas" :label="area.name" :value="area.name" :key="index"/>
  24 + </el-select>
  25 + </el-form-item>
  26 + </el-col>
  27 + </el-row>
  28 + <el-row :gutter="30">
  29 + <el-col :span="7">
  30 + <el-form-item label="企业道路运输经营许可证有效期" prop="transportPermissionDate">
  31 + <el-date-picker clearable size="small" style="width: 100%;"
  32 + v-model="form.transportPermissionDate"
  33 + type="date"
  34 + value-format="yyyy-MM-dd"
  35 + placeholder="选择企业道路运输经营许可证有效期">
  36 + </el-date-picker>
  37 + </el-form-item>
  38 + </el-col>
  39 + <el-col :span="7">
  40 + <el-form-item label="企业入市时间" prop="enterDate">
  41 + <el-date-picker clearable size="small" style="width: 100%;"
  42 + v-model="form.enterDate"
  43 + type="date"
  44 + value-format="yyyy-MM-dd"
  45 + placeholder="选择企业入市时间">
  46 + </el-date-picker>
  47 + </el-form-item>
  48 + </el-col>
  49 + <el-col :span="7">
  50 + <el-form-item label="企业营业执照有效期" prop="businessLicenseDate">
  51 + <el-date-picker clearable size="small" style="width: 100%;"
  52 + v-model="form.businessLicenseDate"
  53 + type="date"
  54 + value-format="yyyy-MM-dd"
  55 + placeholder="选择企业营业执照有效期">
  56 + </el-date-picker>
  57 + </el-form-item>
  58 + </el-col>
  59 + </el-row>
  60 + <el-row :gutter="30">
  61 + <el-col :span="7">
  62 + <el-form-item label="办公地址" prop="officeAddress">
  63 + <el-input v-model="form.officeAddress" placeholder="请输入内容" />
  64 + </el-form-item>
  65 + </el-col>
  66 + <el-col :span="7">
  67 + <el-form-item label="停车场位置" prop="parkingLotLocation">
  68 + <el-input v-model="form.parkingLotLocation" placeholder="请输入内容" />
  69 + </el-form-item>
  70 + </el-col>
  71 + <el-col :span="7">
  72 + <el-form-item label="停车场面积(m²)" prop="parkingArea">
  73 + <el-input v-model="form.parkingArea" placeholder="请输入停车场面积" />
  74 + </el-form-item>
  75 + </el-col>
  76 + </el-row>
  77 + <el-row :gutter="30">
  78 + <el-col :span="7">
  79 + <el-form-item label="企业安全负责人姓名及联系方式" prop="safetyManagerName">
  80 + <el-row>
  81 + <el-col :span="6">
  82 + <el-input v-model="form.safetyManagerName" placeholder="姓名" />
  83 + </el-col>
  84 + <el-col :span="18">
  85 + <el-input v-model="form.safetyManagerPhone" placeholder="联系方式" :maxlength="11" show-word-limit/>
  86 + </el-col>
  87 + </el-row>
  88 + </el-form-item>
  89 + </el-col>
  90 + <el-col :span="7">
  91 + <el-form-item label="社会统一信用代码编号" prop="socialUniformCreditCodeNumber">
  92 + <el-input v-model="form.socialUniformCreditCodeNumber" placeholder="请输入社会统一信用代码编号" />
  93 + </el-form-item>
  94 + </el-col>
  95 + <el-col :span="7">
  96 + <el-form-item label="法人代表及联系方式" prop="legalRepresentative">
  97 + <el-row>
  98 + <el-col :span="6">
  99 + <el-input v-model="form.legalRepresentative" placeholder="姓名" />
  100 + </el-col>
  101 + <el-col :span="18">
  102 + <el-input v-model="form.legalRepresentativePhone" placeholder="联系方式" :maxlength="11" show-word-limit/>
  103 + </el-col>
  104 + </el-row>
  105 + </el-form-item>
  106 + </el-col>
  107 + </el-row>
  108 +
  109 + <el-row :gutter="30">
  110 + <el-col :span="7">
  111 + <el-form-item label="安全管理人员" prop="safetyPeopleName">
  112 + <el-input v-model="form.safetyPeopleName" placeholder="请输入安全管理人员" />
  113 + </el-form-item>
  114 + </el-col>
  115 + <el-col :span="14">
  116 + <el-form-item label="备注" prop="remark">
  117 + <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
  118 + </el-form-item>
  119 + </el-col>
  120 + </el-row>
  121 + <el-row style="border: 1px solid #dcdfe6;border-radius: 2px;">
  122 + <el-col :span="3">
  123 + <div class="upload_lable">
  124 + 企业道路运输经营许可证
  125 + <el-upload
  126 + ref="upload"
  127 + action=""
  128 + accept=".jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx"
  129 + :on-change="fileChange"
  130 + :auto-upload="false"
  131 + :show-file-list="false"
  132 + multiple
  133 + :file-list="transportPermission">
  134 +
  135 + <el-button size="small" type="primary" icon="el-icon-upload">上传附件</el-button>
  136 + </el-upload>
  137 + </div>
  138 + </el-col>
  139 + <el-col :span="21">
  140 + <div class="upload_btn">
  141 + <div v-for="(item,index) in transportPermission">
  142 + <div v-if="!/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_image">
  143 + <div class="upload_close" @click="transportPermission.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div>
  144 + <el-image
  145 + style="width: 110px; height: 95px; margin: 5px;float:left;"
  146 + :src="createUrl(item)"
  147 + :preview-src-list="[createUrl(item)]"
  148 + :z-index="999">
  149 + </el-image>
  150 + </div>
  151 + <div v-if="/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_file">
  152 + <div class="upload_close_file" @click="transportPermission.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div>
  153 + <span @click="tempDownload(item)"><el-icon class="el-icon-document-add" style="font-size:70px;"></el-icon></span>
  154 + <div style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" @click="tempDownload(item)">{{ item.name }}</div>
  155 + </div>
  156 + </div>
  157 + </div>
  158 + </el-col>
  159 + </el-row>
  160 + <el-row style="border: 1px solid #dcdfe6;border-radius: 2px;">
  161 + <el-col :span="3">
  162 + <div class="upload_lable">
  163 + 企业营业执照
  164 + <el-upload
  165 + ref="upload"
  166 + action=""
  167 + accept=".jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx"
  168 + :on-change="fileChange1"
  169 + :auto-upload="false"
  170 + :show-file-list="false"
  171 + multiple
  172 + :file-list="enterpriseBusinessLicense">
  173 + <el-button size="small" type="primary" icon="el-icon-upload">上传附件</el-button>
  174 + </el-upload>
  175 + </div>
  176 + </el-col>
  177 + <el-col :span="21">
  178 + <div class="upload_btn">
  179 + <div v-for="(item,index) in enterpriseBusinessLicense">
  180 + <div v-if="!/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_image">
  181 + <div class="upload_close" @click="enterpriseBusinessLicense.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div>
  182 + <el-image
  183 + style="width: 110px; height: 95px; margin: 5px;float:left;"
  184 + :src="createUrl(item)"
  185 + :preview-src-list="[createUrl(item)]"
  186 + :z-index="999">
  187 + </el-image>
  188 + </div>
  189 + <div v-if="/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_file">
  190 + <div class="upload_close_file" @click="enterpriseBusinessLicense.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div>
  191 + <span @click="tempDownload(item)"><el-icon class="el-icon-document-add" style="font-size:70px;"></el-icon></span>
  192 + <div style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" @click="tempDownload(item)">{{ item.name }}</div>
  193 + </div>
  194 + </div>
  195 + </div>
  196 + </el-col>
  197 + </el-row>
  198 + <el-row style="border: 1px solid #dcdfe6;border-radius: 2px;">
  199 + <el-col :span="3">
  200 + <div class="upload_lable">
  201 + 安全员考核合格证明
  202 + <el-upload
  203 + ref="upload"
  204 + action=""
  205 + accept=".jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx"
  206 + :on-change="fileChange2"
  207 + :auto-upload="false"
  208 + :show-file-list="false"
  209 + multiple
  210 + :file-list="safetyOfficerQualificationCertificate">
  211 + <el-button size="small" type="primary" icon="el-icon-upload">上传附件</el-button>
  212 + </el-upload>
  213 + </div>
  214 + </el-col>
  215 + <el-col :span="21">
  216 + <div class="upload_btn">
  217 + <div v-for="(item,index) in safetyOfficerQualificationCertificate">
  218 + <div v-if="!/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_image">
  219 + <div class="upload_close" @click="safetyOfficerQualificationCertificate.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div>
  220 + <el-image
  221 + style="width: 110px; height: 95px; margin: 5px;float:left;"
  222 + :src="createUrl(item)"
  223 + :preview-src-list="[createUrl(item)]"
  224 + :z-index="999">
  225 + </el-image>
  226 + </div>
  227 + <div v-if="/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_file">
  228 + <div class="upload_close_file" @click="safetyOfficerQualificationCertificate.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div>
  229 + <span @click="tempDownload(item)"><el-icon class="el-icon-document-add" style="font-size:70px;"></el-icon></span>
  230 + <div style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" @click="tempDownload(item)">{{ item.name }}</div>
  231 + </div>
  232 + </div>
  233 + </div>
  234 + </el-col>
  235 + </el-row>
  236 + <el-row style="border: 1px solid #dcdfe6;border-radius: 2px;">
  237 + <el-col :span="3">
  238 + <div class="upload_lable">
  239 + 企业负责人安全考核证
  240 + <el-upload
  241 + ref="upload"
  242 + action=""
  243 + accept=".jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx"
  244 + :on-change="fileChange3"
  245 + :auto-upload="false"
  246 + :show-file-list="false"
  247 + multiple
  248 + :file-list="safetyCertificate">
  249 + <el-button size="small" type="primary" icon="el-icon-upload">上传附件</el-button>
  250 + </el-upload>
  251 + </div>
  252 + </el-col>
  253 + <el-col :span="21">
  254 + <div class="upload_btn">
  255 + <div v-for="(item,index) in safetyCertificate">
  256 + <div v-if="!/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_image">
  257 + <div class="upload_close" @click="safetyCertificate.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div>
  258 + <el-image
  259 + style="width: 110px; height: 95px; margin: 5px;float:left;"
  260 + :src="createUrl(item)"
  261 + :preview-src-list="[createUrl(item)]"
  262 + :z-index="999">
  263 + </el-image>
  264 + </div>
  265 + <div v-if="/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_file">
  266 + <div class="upload_close_file" @click="safetyCertificate.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div>
  267 + <span @click="tempDownload(item)"><el-icon class="el-icon-document-add" style="font-size:70px;"></el-icon></span>
  268 + <div style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" @click="tempDownload(item)">{{ item.name }}</div>
  269 + </div>
  270 + </div>
  271 + </div>
  272 + </el-col>
  273 + </el-row>
  274 + <el-row style="border: 1px solid #dcdfe6;border-radius: 2px;">
  275 + <el-col :span="3">
  276 + <div class="upload_lable">
  277 + 停车场全景图
  278 + <el-upload
  279 + ref="upload"
  280 + action=""
  281 + accept=".jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx"
  282 + :on-change="fileChange4"
  283 + :auto-upload="false"
  284 + :show-file-list="false"
  285 + multiple
  286 + :file-list="carParkPanorama">
  287 + <el-button size="small" type="primary" icon="el-icon-upload">上传附件</el-button>
  288 + </el-upload>
  289 + </div>
  290 + </el-col>
  291 + <el-col :span="21">
  292 + <div class="upload_btn">
  293 + <div v-for="(item,index) in carParkPanorama">
  294 + <div v-if="!/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_image">
  295 + <div class="upload_close" @click="carParkPanorama.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div>
  296 + <el-image
  297 + style="width: 110px; height: 95px; margin: 5px;float:left;"
  298 + :src="createUrl(item)"
  299 + :preview-src-list="[createUrl(item)]"
  300 + :z-index="999">
  301 + </el-image>
  302 + </div>
  303 + <div v-if="/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_file">
  304 + <div class="upload_close_file" @click="carParkPanorama.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div>
  305 + <span @click="tempDownload(item)"><el-icon class="el-icon-document-add" style="font-size:70px;"></el-icon></span>
  306 + <div style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" @click="tempDownload(item)">{{ item.name }}</div>
  307 + </div>
  308 + </div>
  309 + </div>
  310 + </el-col>
  311 + </el-row>
  312 + <!-- <el-form-item label="" prop="environmentalApproval">-->
  313 + <!-- <el-input v-model="form." type="textarea" placeholder="请输入内容" />-->
  314 + <!-- </el-form-item>-->
  315 + <!-- <el-form-item label="" prop="authorization">-->
  316 + <!-- <el-input v-model="form." type="textarea" placeholder="请输入内容" />-->
  317 + <!-- </el-form-item>-->
  318 + <!-- <el-form-item label="" prop="otherInformation">-->
  319 + <!-- <el-input v-model="form." type="textarea" placeholder="请输入内容" />-->
  320 + <!-- </el-form-item>-->
  321 + <!-- <el-form-item label="运输企业" prop="companyIds">-->
  322 + <!-- <el-input v-model="form.companyIds" placeholder="请输入运输企业" />-->
  323 + <!-- </el-form-item>-->
  324 + <!-- <el-form-item label="审批状态,0=审批中,1=审批通过,2=被驳回">-->
  325 + <!-- <el-radio-group v-model="form.status">-->
  326 + <!-- <el-radio label="1">请选择字典生成</el-radio>-->
  327 + <!-- </el-radio-group>-->
  328 + <!-- </el-form-item>-->
  329 + <!-- <el-form-item label="二维码" prop="qrCode">-->
  330 + <!-- <el-input v-model="form.qrCode" placeholder="请输入二维码" />-->
  331 + <!-- </el-form-item>-->
  332 + </el-form>
  333 + <div slot="footer" class="dialog-footer" style="margin-top: 20px">
  334 + <el-button type="primary" @click="submitForm">确 定</el-button>
  335 + <el-button @click="cancel">取 消</el-button>
  336 + </div>
  337 + </div>
  338 +</template>
  339 +
  340 +<script>
  341 +import { listEnterprise, getEnterprise, delEnterprise, addEnterprise, updateEnterprise, exportEnterprise } from "@/api/unit/enterprise";
  342 +import Treeselect from "@riophae/vue-treeselect";
  343 +import '@riophae/vue-treeselect/dist/vue-treeselect.css'
  344 +import {getAreaList} from "@/api/casefile/remoteServer";
  345 +
  346 +export default {
  347 + name: "DisposalSite",
  348 + components: {Treeselect},
  349 + data() {
  350 + return {
  351 + // 遮罩层
  352 + loading: true,
  353 + // 选中数组
  354 + ids: [],
  355 + // 非单个禁用
  356 + single: true,
  357 + // 非多个禁用
  358 + multiple: true,
  359 + // 显示搜索条件
  360 + showSearch: true,
  361 + // 总条数
  362 + total: 0,
  363 + // 处理场所管理表格数据
  364 + disposalSiteList: [],
  365 + // 弹出层标题
  366 + title: "",
  367 + // 是否显示弹出层
  368 + open: false,
  369 + // 表单参数
  370 + form: {},
  371 + // 表单校验
  372 + rules: {
  373 + name: [
  374 + {required: true, message: "请输入企业名称", trigger: "blur"}
  375 + ],
  376 + abbreviation: [
  377 + {required: true, message: "请输入简称", trigger: "blur"}
  378 + ],
  379 + registrationArea: [
  380 + {required: true, message: "请输入注册地所在区域", trigger: "blur"}
  381 + ],
  382 + transportPermissionDate: [
  383 + {required: true, message: "请选择企业道路运输经营许可证有效期", trigger: "blur"}
  384 + ],
  385 + enterDate: [
  386 + {required: true, message: "请选择企业入市时间", trigger: "blur"}
  387 + ],
  388 + businessLicenseDate: [
  389 + {required: true, message: "请选择企业营业执照有效期", trigger: "blur"}
  390 + ],
  391 + officeAddress: [
  392 + {required: true, message: "请输入办公地址", trigger: "blur"}
  393 + ],
  394 + parkingLotLocation: [
  395 + {required: true, message: "请输入停车场位置", trigger: "blur"}
  396 + ],
  397 + parkingArea: [
  398 + {required: true, message: "请输入停车场面积", trigger: "blur"},
  399 + {pattern: /^\d+(\.\d+)?$/, message: "只能输入正数和小数", trigger: "blur"}
  400 + ],
  401 + safetyManagerName: [
  402 + {required: true, message: "请输入企业安全负责人姓名", trigger: "blur"}
  403 + ],
  404 + socialUniformCreditCodeNumber: [
  405 + {required: true, message: "请输入社会统一信用代码编号", trigger: "blur"}
  406 + ],
  407 + legalRepresentative: [
  408 + {required: true, message: "请输入法人代表", trigger: "blur"}
  409 + ],
  410 + safetyPeopleName: [
  411 + {required: true, message: "请输入安全管理人员", trigger: "blur"}
  412 + ],
  413 + },
  414 + areas:[],
  415 + // 企业道路运输经营许可证
  416 + transportPermission:[],
  417 + // 企业营业执照
  418 + enterpriseBusinessLicense:[],
  419 + // 安全员考核合格证明
  420 + safetyOfficerQualificationCertificate:[],
  421 + // 企业负责人安全考核证
  422 + safetyCertificate:[],
  423 + // 停车场全景图
  424 + carParkPanorama:[],
  425 + };
  426 + },
  427 + created() {
  428 + getAreaList().then(res => {
  429 + this.areas = res.data;
  430 + });
  431 + this.initData();
  432 + },
  433 + watch: {
  434 + '$route.query.unitId': 'initData'
  435 + },
  436 + methods: {
  437 + reset(){
  438 + this.form = {};
  439 + this.transportPermission = [];
  440 + this.enterpriseBusinessLicense = [];
  441 + this.safetyOfficerQualificationCertificate = [];
  442 + this.safetyCertificate = [];
  443 + this.carParkPanorama = [];
  444 + },
  445 + initData(){
  446 + this.reset();
  447 + let id = this.$route.query.unitId;
  448 + if(id!=null){
  449 + getEnterprise(id).then(response => {
  450 + this.form = response.data;
  451 + //将附件转换为前端可视化数组
  452 + if(this.form.transportPermission!=null&&this.form.transportPermission!==""){
  453 + let approvalDocument = this.form.transportPermission.split(";");
  454 + approvalDocument.map(item=>{
  455 + let name = item.substring(item.lastIndexOf("/")+1);
  456 + this.transportPermission.push({name:name,url:item})
  457 + })
  458 + }
  459 + if(this.form.enterpriseBusinessLicense!=null&&this.form.enterpriseBusinessLicense!==""){
  460 + let approvalData = this.form.enterpriseBusinessLicense.split(";");
  461 + approvalData.map(item=>{
  462 + let name = item.substring(item.lastIndexOf("/")+1);
  463 + this.enterpriseBusinessLicense.push({name:name,url:item})
  464 + })
  465 + }
  466 + if(this.form.safetyOfficerQualificationCertificate!=null&&this.form.safetyOfficerQualificationCertificate!==""){
  467 + let scenePhoto = this.form.safetyOfficerQualificationCertificate.split(";");
  468 + scenePhoto.map(item=>{
  469 + let name = item.substring(item.lastIndexOf("/")+1);
  470 + this.safetyOfficerQualificationCertificate.push({name:name,url:item})
  471 + })
  472 + }
  473 + if(this.form.safetyCertificate!=null&&this.form.safetyCertificate!==""){
  474 + let carWashingFacilitiesImage = this.form.safetyCertificate.split(";");
  475 + carWashingFacilitiesImage.map(item=>{
  476 + let name = item.substring(item.lastIndexOf("/")+1);
  477 + this.safetyCertificate.push({name:name,url:item})
  478 + })
  479 + }
  480 + if(this.form.carParkPanorama!=null&&this.form.carParkPanorama!==""){
  481 + let safetyAssessmentReport = this.form.carParkPanorama.split(";");
  482 + safetyAssessmentReport.map(item=>{
  483 + let name = item.substring(item.lastIndexOf("/")+1);
  484 + this.carParkPanorama.push({name:name,url:item})
  485 + })
  486 + }
  487 + });
  488 + }
  489 + },
  490 + createUrl(file){
  491 + if(file.raw!=null){
  492 + return URL.createObjectURL(file.raw);
  493 + }else{
  494 + return process.env.VUE_APP_BASE_API + file.url;
  495 + }
  496 +
  497 + },
  498 + tempDownload(row){
  499 + let name = row.name;
  500 + let url = "";
  501 + if(row.raw!=null){
  502 + url = URL.createObjectURL(row.raw);
  503 + }else{
  504 + url = process.env.VUE_APP_BASE_API + row.url;
  505 + }
  506 + const a = document.createElement('a')
  507 + a.setAttribute('download', name)
  508 + a.setAttribute('target', '_blank')
  509 + a.setAttribute('href', url);
  510 + a.click()
  511 + },
  512 + // 取消按钮
  513 + cancel() {
  514 + this.$tab.closePage({path:"/unit/info"}).then(() => {
  515 + this.$tab.openPage("经营单位管理", "/tool/unit",{unitRefresh:1})
  516 + })
  517 + },
  518 + /** 提交按钮 */
  519 + submitForm() {
  520 + this.$refs["form"].validate(valid => {
  521 + if (valid) {
  522 + let phoneTest = /^1[3456789]\d{9}$/;
  523 + if(phoneTest.test(this.form.safetyManagerPhone)===false){
  524 + this.msgError("请输入正确的企业安全负责人联系方式");
  525 + return false;
  526 + }
  527 + if(phoneTest.test(this.form.legalRepresentativePhone)===false){
  528 + this.msgError("请输入正确的法人代表联系方式");
  529 + return false;
  530 + }
  531 + let formData = new FormData();
  532 + let form = this.form;
  533 + //去掉params属性
  534 + delete form.params;
  535 +
  536 + //先清空原有的附件
  537 + form.transportPermission = null;
  538 + form.enterpriseBusinessLicense = null;
  539 + form.safetyOfficerQualificationCertificate = null;
  540 + form.safetyCertificate = null;
  541 + form.carParkPanorama = null;
  542 + form.companyType = "0";
  543 +
  544 + this.transportPermission.forEach(item => {
  545 + if (item.raw != null) {
  546 + formData.append('transportPermissionFiles', item.raw)
  547 + }else{
  548 + //将原有的附件拼接到form中
  549 + form.transportPermission = form.transportPermission!==null?form.transportPermission+";"+item.url:item.url;
  550 + }
  551 + })
  552 +
  553 + this.enterpriseBusinessLicense.forEach(item => {
  554 + if (item.raw != null) {
  555 + formData.append('enterpriseBusinessLicenseFiles', item.raw)
  556 + }else{
  557 + //将原有的附件拼接到form中
  558 + form.enterpriseBusinessLicense = form.enterpriseBusinessLicense!==null?form.enterpriseBusinessLicense+";"+item.url:item.url;
  559 + }
  560 + })
  561 + this.safetyOfficerQualificationCertificate.forEach(item => {
  562 + if (item.raw != null) {
  563 + formData.append('safetyOfficerQualificationCertificateFiles', item.raw)
  564 + }else{
  565 + //将原有的附件拼接到form中
  566 + form.safetyOfficerQualificationCertificate = form.safetyOfficerQualificationCertificate!==null?form.safetyOfficerQualificationCertificate+";"+item.url:item.url;
  567 + }
  568 + })
  569 + this.safetyCertificate.forEach(item => {
  570 + if (item.raw != null) {
  571 + formData.append('safetyCertificateFiles', item.raw)
  572 + }else{
  573 + //将原有的附件拼接到form中
  574 + form.safetyCertificate = form.safetyCertificate!==null?form.safetyCertificate+";"+item.url:item.url;
  575 + }
  576 + })
  577 + this.carParkPanorama.forEach(item => {
  578 + if (item.raw != null) {
  579 + formData.append('carParkPanoramaFiles', item.raw)
  580 + }else{
  581 + //将原有的附件拼接到form中
  582 + form.carParkPanorama = form.carParkPanorama!==null?form.carParkPanorama+";"+item.url:item.url;
  583 + }
  584 + })
  585 + for (let key in form) {
  586 + formData.append(key, form[key] == null ? "" : form[key])
  587 + }
  588 + if (this.form.id != null) {
  589 + updateEnterprise(formData).then(response => {
  590 + this.msgSuccess("修改成功");
  591 + this.$tab.closePage({path:"/unit/infoEdit"}).then(() => {
  592 + this.$tab.openPage("经营单位管理", "/tool/unit",{unitRefresh:1})
  593 + })
  594 + });
  595 + } else {
  596 + addEnterprise(formData).then(response => {
  597 + this.msgSuccess("新增成功");
  598 + this.$tab.closePage({path:"/unit/info"}).then(() => {
  599 + this.$tab.openPage("经营单位管理", "/tool/unit",{unitRefresh:1})
  600 + })
  601 + });
  602 + }
  603 + }
  604 + });
  605 + },
  606 + /**
  607 + * 文件改变时,限制文件上传格式和大小
  608 + * 文件格式只能为docx/doc/pdf/png/jpeg/png/jpg
  609 + * 大小不超过20M
  610 + * */
  611 + fileChange(file, fileList) {
  612 + let count = 0;
  613 + for (let i = 0; i < fileList.length; i++) {
  614 + // console.log(fileList.length)
  615 + // console.log(this.fileEntityList[i].name+"111"+file.name)
  616 + if (fileList[i].name == file.name) {
  617 + count++;
  618 + if (count == 2) {
  619 + this.$message({
  620 + message: '已存在此文件!',
  621 + type: 'warning'
  622 + });
  623 + for (let j = fileList.length; j > 0; j--) {
  624 + //如果存在此文件,去除新选择的重复文件
  625 + if (fileList[j - 1].name == file.name) {
  626 + fileList.splice(j - 1, 1);
  627 + i--;
  628 + return false;
  629 + }
  630 + }
  631 + }
  632 + }
  633 + }
  634 + let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase();
  635 + //格式符合后判断大小
  636 + if ("jpg,jpeg,png,gif,jfif,pjpeg,pjp,pdf,doc,docx,xls,xlsx".indexOf(fileType) != -1) {
  637 + let max5M = file.size / 1024 / 1024 < 100;
  638 + if (!max5M) {
  639 + this.$message({
  640 + message: '上传文件大小不得超过100M!',
  641 + type: 'warning'
  642 + });
  643 + fileList = fileList.splice(fileList.length - 1, 1);
  644 + } else {
  645 + //符合条件后进行添加
  646 + this.transportPermission = fileList
  647 + }
  648 + } else {
  649 + this.$message({
  650 + message: '上传文件只能是.jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx格式!',
  651 + type: 'warning'
  652 + });
  653 + fileList = fileList.splice(fileList.length - 1, 1);
  654 + }
  655 + },
  656 + fileChange1(file, fileList) {
  657 + let count = 0;
  658 + for (let i = 0; i < fileList.length; i++) {
  659 + // console.log(fileList.length)
  660 + // console.log(this.fileEntityList[i].name+"111"+file.name)
  661 + if (fileList[i].name == file.name) {
  662 + count++;
  663 + if (count == 2) {
  664 + this.$message({
  665 + message: '已存在此文件!',
  666 + type: 'warning'
  667 + });
  668 + for (let j = fileList.length; j > 0; j--) {
  669 + //如果存在此文件,去除新选择的重复文件
  670 + if (fileList[j - 1].name == file.name) {
  671 + fileList.splice(j - 1, 1);
  672 + i--;
  673 + return false;
  674 + }
  675 + }
  676 + }
  677 + }
  678 + }
  679 + let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase();
  680 + //格式符合后判断大小
  681 + if ("jpg,jpeg,png,gif,jfif,pjpeg,pjp,pdf,doc,docx,xls,xlsx".indexOf(fileType) != -1) {
  682 + let max5M = file.size / 1024 / 1024 < 100;
  683 + if (!max5M) {
  684 + this.$message({
  685 + message: '上传文件大小不得超过100M!',
  686 + type: 'warning'
  687 + });
  688 + fileList = fileList.splice(fileList.length - 1, 1);
  689 + } else {
  690 + //符合条件后进行添加
  691 + this.enterpriseBusinessLicense = fileList
  692 + }
  693 + } else {
  694 + this.$message({
  695 + message: '上传文件只能是.jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx格式!',
  696 + type: 'warning'
  697 + });
  698 + fileList = fileList.splice(fileList.length - 1, 1);
  699 + }
  700 + },
  701 + fileChange2(file, fileList) {
  702 + let count = 0;
  703 + for (let i = 0; i < fileList.length; i++) {
  704 + // console.log(fileList.length)
  705 + // console.log(this.fileEntityList[i].name+"111"+file.name)
  706 + if (fileList[i].name == file.name) {
  707 + count++;
  708 + if (count == 2) {
  709 + this.$message({
  710 + message: '已存在此文件!',
  711 + type: 'warning'
  712 + });
  713 + for (let j = fileList.length; j > 0; j--) {
  714 + //如果存在此文件,去除新选择的重复文件
  715 + if (fileList[j - 1].name == file.name) {
  716 + fileList.splice(j - 1, 1);
  717 + i--;
  718 + return false;
  719 + }
  720 + }
  721 + }
  722 + }
  723 + }
  724 + let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase();
  725 + //格式符合后判断大小
  726 + if ("jpg,jpeg,png,gif,jfif,pjpeg,pjp,pdf,doc,docx,xls,xlsx".indexOf(fileType) != -1) {
  727 + let max5M = file.size / 1024 / 1024 < 100;
  728 + if (!max5M) {
  729 + this.$message({
  730 + message: '上传文件大小不得超过100M!',
  731 + type: 'warning'
  732 + });
  733 + fileList = fileList.splice(fileList.length - 1, 1);
  734 + } else {
  735 + //符合条件后进行添加
  736 + this.safetyOfficerQualificationCertificate = fileList
  737 + }
  738 + } else {
  739 + this.$message({
  740 + message: '上传文件只能是.jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx格式!',
  741 + type: 'warning'
  742 + });
  743 + fileList = fileList.splice(fileList.length - 1, 1);
  744 + }
  745 + },
  746 + fileChange3(file, fileList) {
  747 + let count = 0;
  748 + for (let i = 0; i < fileList.length; i++) {
  749 + // console.log(fileList.length)
  750 + // console.log(this.fileEntityList[i].name+"111"+file.name)
  751 + if (fileList[i].name == file.name) {
  752 + count++;
  753 + if (count == 2) {
  754 + this.$message({
  755 + message: '已存在此文件!',
  756 + type: 'warning'
  757 + });
  758 + for (let j = fileList.length; j > 0; j--) {
  759 + //如果存在此文件,去除新选择的重复文件
  760 + if (fileList[j - 1].name == file.name) {
  761 + fileList.splice(j - 1, 1);
  762 + i--;
  763 + return false;
  764 + }
  765 + }
  766 + }
  767 + }
  768 + }
  769 + let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase();
  770 + //格式符合后判断大小
  771 + if ("jpg,jpeg,png,gif,jfif,pjpeg,pjp,pdf,doc,docx,xls,xlsx".indexOf(fileType) != -1) {
  772 + let max5M = file.size / 1024 / 1024 < 100;
  773 + if (!max5M) {
  774 + this.$message({
  775 + message: '上传文件大小不得超过100M!',
  776 + type: 'warning'
  777 + });
  778 + fileList = fileList.splice(fileList.length - 1, 1);
  779 + } else {
  780 + //符合条件后进行添加
  781 + this.safetyCertificate = fileList
  782 + }
  783 + } else {
  784 + this.$message({
  785 + message: '上传文件只能是.jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx格式!',
  786 + type: 'warning'
  787 + });
  788 + fileList = fileList.splice(fileList.length - 1, 1);
  789 + }
  790 + },
  791 + fileChange4(file, fileList) {
  792 + let count = 0;
  793 + for (let i = 0; i < fileList.length; i++) {
  794 + // console.log(fileList.length)
  795 + // console.log(this.fileEntityList[i].name+"111"+file.name)
  796 + if (fileList[i].name == file.name) {
  797 + count++;
  798 + if (count == 2) {
  799 + this.$message({
  800 + message: '已存在此文件!',
  801 + type: 'warning'
  802 + });
  803 + for (let j = fileList.length; j > 0; j--) {
  804 + //如果存在此文件,去除新选择的重复文件
  805 + if (fileList[j - 1].name == file.name) {
  806 + fileList.splice(j - 1, 1);
  807 + i--;
  808 + return false;
  809 + }
  810 + }
  811 + }
  812 + }
  813 + }
  814 + let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase();
  815 + //格式符合后判断大小
  816 + if ("jpg,jpeg,png,gif,jfif,pjpeg,pjp,pdf,doc,docx,xls,xlsx".indexOf(fileType) != -1) {
  817 + let max5M = file.size / 1024 / 1024 < 100;
  818 + if (!max5M) {
  819 + this.$message({
  820 + message: '上传文件大小不得超过100M!',
  821 + type: 'warning'
  822 + });
  823 + fileList = fileList.splice(fileList.length - 1, 1);
  824 + } else {
  825 + //符合条件后进行添加
  826 + this.carParkPanorama = fileList
  827 + }
  828 + } else {
  829 + this.$message({
  830 + message: '上传文件只能是.jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx格式!',
  831 + type: 'warning'
  832 + });
  833 + fileList = fileList.splice(fileList.length - 1, 1);
  834 + }
  835 + },
  836 + }
  837 +};
  838 +</script>
  839 +<style lang="scss" scoped>
  840 +.upload_lable{
  841 + border-right: 1px solid #dcdfe6;
  842 + padding: 27px 30px;
  843 + background: #fafafa;
  844 + text-align: center;
  845 +}
  846 +.upload_btn{
  847 + max-height: 106px;
  848 +}
  849 +.upload_close{
  850 + position: absolute;
  851 + left: 105px;
  852 + z-index:99;
  853 + top:-1px;
  854 + font-size:18px;
  855 + color:red;
  856 +}
  857 +.upload_close_file{
  858 + position: absolute;
  859 + left: 80px;
  860 + z-index:99;
  861 + top:-1px;
  862 + font-size:18px;
  863 + color:red;
  864 +}
  865 +.upload_div_image{
  866 + display: inline-block;
  867 + width: 110px;
  868 + height: 95px;
  869 + position: relative;
  870 + float: left;
  871 + margin-left: 5px;
  872 +}
  873 +.upload_div_file{
  874 + display: inline-block;
  875 + width: 110px;
  876 + height: 95px;
  877 + text-align: center;
  878 + float:left;
  879 + margin: 5px;
  880 + position: relative;
  881 +}
  882 +.serach_map{
  883 + position: absolute;
  884 + top: 100px;
  885 + left: 25px;
  886 + z-index: 999;
  887 + background: #fff;
  888 + padding: 10px;
  889 + border-radius: 5px;
  890 + box-shadow: 0 0 10px rgba(0,0,0,.2);
  891 +}
  892 +</style>
... ...
trash-ui/src/views/unit/carInfo/index.vue 0 → 100644
  1 +<template>
  2 + <div class="app-container">
  3 + <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
  4 + <el-form-item label="所属公司" prop="companyName">
  5 + <el-input
  6 + v-model="queryParams.companyName"
  7 + placeholder="请输入所属公司"
  8 + clearable
  9 + size="small"
  10 + @keyup.enter.native="handleQuery"
  11 + />
  12 + </el-form-item>
  13 + <el-form-item label="车辆类型" prop="carType">
  14 + <el-select v-model="queryParams.carType" placeholder="请选择车辆类型" clearable style="width: 100%;" size="small">
  15 + <el-option label="燃油渣土车" value="燃油渣土车" />
  16 + <el-option label="电动渣土车" value="电动渣土车" />
  17 + <el-option label="其它" value="其它" />
  18 + </el-select>
  19 + </el-form-item>
  20 + <el-form-item label="车牌号" prop="carCode">
  21 + <el-input
  22 + v-model="queryParams.carCode"
  23 + placeholder="请输入车牌号"
  24 + clearable
  25 + size="small"
  26 + @keyup.enter.native="handleQuery"
  27 + />
  28 + </el-form-item>
  29 + <el-form-item label="车辆品牌" prop="carBrank">
  30 + <el-input
  31 + v-model="queryParams.carBrank"
  32 + placeholder="请输入车辆品牌"
  33 + clearable
  34 + size="small"
  35 + @keyup.enter.native="handleQuery"
  36 + />
  37 + </el-form-item>
  38 + <el-form-item>
  39 + <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  40 + <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  41 + </el-form-item>
  42 + </el-form>
  43 +
  44 + <el-row :gutter="10" class="mb8">
  45 + <el-col :span="1.5">
  46 + <el-button
  47 + type="primary"
  48 + icon="el-icon-plus"
  49 + size="mini"
  50 + @click="handleAdd"
  51 + v-hasPermi="['unit:carInfo:add']"
  52 + >新增</el-button>
  53 + </el-col>
  54 + <el-col :span="1.5">
  55 + <el-button
  56 + type="success"
  57 + icon="el-icon-edit"
  58 + size="mini"
  59 + :disabled="single"
  60 + @click="handleUpdate"
  61 + v-hasPermi="['unit:carInfo:edit']"
  62 + >修改</el-button>
  63 + </el-col>
  64 + <el-col :span="1.5">
  65 + <el-button
  66 + type="danger"
  67 + icon="el-icon-delete"
  68 + size="mini"
  69 + :disabled="multiple"
  70 + @click="handleDelete"
  71 + v-hasPermi="['unit:carInfo:remove']"
  72 + >删除</el-button>
  73 + </el-col>
  74 + <el-col :span="1.5">
  75 + <el-button
  76 + type="warning"
  77 + icon="el-icon-download"
  78 + size="mini"
  79 + @click="handleExport"
  80 + v-hasPermi="['unit:carInfo:export']"
  81 + >导出</el-button>
  82 + </el-col>
  83 + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  84 + </el-row>
  85 +
  86 + <el-table v-loading="loading" :data="carInfoList" @selection-change="handleSelectionChange">
  87 + <el-table-column type="selection" width="55" align="center" />
  88 + <el-table-column type="index" width="55" align="center" label="序号"/>
  89 + <el-table-column label="车牌号" align="center" prop="carCode" />
  90 + <el-table-column label="车辆标识牌" align="center" prop="carIdentification" />
  91 + <el-table-column label="所属公司" align="center" prop="companyName" />
  92 + <el-table-column label="驾驶员" align="center" prop="driversName" />
  93 + <el-table-column label="车辆品牌" align="center" prop="carBrank" />
  94 + <el-table-column label="所属区域" align="center" prop="emissionStandard" />
  95 + <el-table-column label="车辆类型" align="center" prop="carType" />
  96 + <el-table-column label="SIM卡号" align="center" prop="farmeNumber" />
  97 + <el-table-column label="审批状态" align="center" prop="status" >
  98 + <template slot-scope="scope">
  99 + {{ parseStatus(scope.row.status)}}
  100 + </template>
  101 + </el-table-column>
  102 + <el-table-column label="信用状态" align="center" prop="creditStatus" />
  103 + <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
  104 + <template slot-scope="scope">
  105 + <el-button
  106 + size="mini"
  107 + type="text"
  108 + icon="el-icon-edit"
  109 + @click="handleUpdate(scope.row)"
  110 + v-hasPermi="['unit:carInfo:edit']"
  111 + >修改</el-button>
  112 + <el-button
  113 + size="mini"
  114 + type="text"
  115 + icon="el-icon-delete"
  116 + @click="handleDelete(scope.row)"
  117 + v-hasPermi="['unit:carInfo:remove']"
  118 + >删除</el-button>
  119 + </template>
  120 + </el-table-column>
  121 + </el-table>
  122 +
  123 + <pagination
  124 + v-show="total>0"
  125 + :total="total"
  126 + :page.sync="queryParams.pageNum"
  127 + :limit.sync="queryParams.pageSize"
  128 + @pagination="getList"
  129 + />
  130 +
  131 + </div>
  132 +</template>
  133 +
  134 +<script>
  135 +import { listCarInfo, getCarInfo, delCarInfo, addCarInfo, updateCarInfo, exportCarInfo } from "@/api/unit/carInfo";
  136 +import {parseStatus} from "../../../utils/trash";
  137 +
  138 +export default {
  139 + name: "CarInfo",
  140 + data() {
  141 + return {
  142 + // 遮罩层
  143 + loading: true,
  144 + // 选中数组
  145 + ids: [],
  146 + // 非单个禁用
  147 + single: true,
  148 + // 非多个禁用
  149 + multiple: true,
  150 + // 显示搜索条件
  151 + showSearch: true,
  152 + // 总条数
  153 + total: 0,
  154 + // 运输车辆管理表格数据
  155 + carInfoList: [],
  156 + // 弹出层标题
  157 + title: "",
  158 + // 是否显示弹出层
  159 + open: false,
  160 + // 查询参数
  161 + queryParams: {
  162 + pageNum: 1,
  163 + pageSize: 10,
  164 + companyId: null,
  165 + carType: null,
  166 + carCode: null,
  167 + carBrank: null,
  168 + emissionStandard: null,
  169 + roadTransportDate: null,
  170 + drivingLicenseDate: null,
  171 + enterDate: null,
  172 + farmeNumber: null,
  173 + carIdentification: null,
  174 + containerVolume: null,
  175 + carColor: null,
  176 + carEquipment: null,
  177 + roadTransport: null,
  178 + drivingLicense: null,
  179 + carFront: null,
  180 + carLeft: null,
  181 + carBehind: null,
  182 + carRight: null,
  183 + drivers: null,
  184 + status: null,
  185 + creditStatus: null,
  186 + qrCode: null
  187 + },
  188 + // 表单参数
  189 + form: {},
  190 + // 表单校验
  191 + rules: {
  192 + }
  193 + };
  194 + },
  195 + created() {
  196 + this.getList();
  197 + },
  198 + watch:{
  199 + '$route.query.carInfoRefresh':'getList'
  200 + },
  201 + methods: {
  202 + /** 查询运输车辆管理列表 */
  203 + getList() {
  204 + this.loading = true;
  205 + listCarInfo(this.queryParams).then(response => {
  206 + this.carInfoList = response.rows;
  207 + this.total = response.total;
  208 + this.loading = false;
  209 + });
  210 + },
  211 + /** 搜索按钮操作 */
  212 + handleQuery() {
  213 + this.queryParams.pageNum = 1;
  214 + this.getList();
  215 + },
  216 + /** 重置按钮操作 */
  217 + resetQuery() {
  218 + this.resetForm("queryForm");
  219 + this.handleQuery();
  220 + },
  221 + // 多选框选中数据
  222 + handleSelectionChange(selection) {
  223 + this.ids = selection.map(item => item.id)
  224 + this.single = selection.length!==1
  225 + this.multiple = !selection.length
  226 + },
  227 + /** 新增按钮操作 */
  228 + handleAdd() {
  229 + this.$tab.openPage("新增车辆信息","/carInfo/info",{carInfoRefresh:0});
  230 + },
  231 + /** 修改按钮操作 */
  232 + handleUpdate(row) {
  233 + const id = row.id || this.ids
  234 + this.$tab.openPage("修改运输企业","/carInfo/infoEdit",{carInfoId: id,carInfoRefresh:0});
  235 + },
  236 + /** 提交按钮 */
  237 + submitForm() {
  238 + this.$refs["form"].validate(valid => {
  239 + if (valid) {
  240 + if (this.form.id != null) {
  241 + updateCarInfo(this.form).then(response => {
  242 + this.msgSuccess("修改成功");
  243 + this.open = false;
  244 + this.getList();
  245 + });
  246 + } else {
  247 + addCarInfo(this.form).then(response => {
  248 + this.msgSuccess("新增成功");
  249 + this.open = false;
  250 + this.getList();
  251 + });
  252 + }
  253 + }
  254 + });
  255 + },
  256 + /** 删除按钮操作 */
  257 + handleDelete(row) {
  258 + const ids = row.id || this.ids;
  259 + this.$confirm('是否确认删除运输车辆管理编号为"' + ids + '"的数据项?', "警告", {
  260 + confirmButtonText: "确定",
  261 + cancelButtonText: "取消",
  262 + type: "warning"
  263 + }).then(function() {
  264 + return delCarInfo(ids);
  265 + }).then(() => {
  266 + this.getList();
  267 + this.msgSuccess("删除成功");
  268 + })
  269 + },
  270 + /** 导出按钮操作 */
  271 + handleExport() {
  272 + const queryParams = this.queryParams;
  273 + this.$confirm('是否确认导出所有运输车辆管理数据项?', "警告", {
  274 + confirmButtonText: "确定",
  275 + cancelButtonText: "取消",
  276 + type: "warning"
  277 + }).then(function() {
  278 + return exportCarInfo(queryParams);
  279 + }).then(response => {
  280 + this.download(response.msg);
  281 + })
  282 + }
  283 + }
  284 +};
  285 +</script>
... ...
trash-ui/src/views/unit/carInfo/info.vue 0 → 100644
  1 +<template>
  2 + <div class="app-container">
  3 +
  4 + <!-- 添加或修改处理场所管理对话框 -->
  5 + <h3>
  6 + 基础信息
  7 + </h3>
  8 + <el-form ref="form" :model="form" :rules="rules" label-width="80px" label-position="top">
  9 + <el-row :gutter="30">
  10 + <el-col :span="7">
  11 + <el-form-item label="所属公司" prop="companyId">
  12 + <el-select v-model="form.companyId" placeholder="请选择所属公司" clearable style="width: 100%;" @change="listDriverByCompany">
  13 + <el-option v-for="(item,index) in enterpriseList" :label="item.name" :value="item.id" :key="index"/>
  14 + </el-select>
  15 + </el-form-item>
  16 + </el-col>
  17 + <el-col :span="7">
  18 + <el-form-item label="车辆类型" prop="carType">
  19 + <el-select v-model="form.carType" placeholder="请选择车辆类型" clearable style="width: 100%;">
  20 + <el-option label="燃油渣土车" value="燃油渣土车" />
  21 + <el-option label="电动渣土车" value="电动渣土车" />
  22 + <el-option label="其它" value="其它" />
  23 + </el-select>
  24 + </el-form-item>
  25 + </el-col>
  26 + <el-col :span="7">
  27 + <el-form-item label="车牌号" prop="carCode">
  28 + <el-input v-model="form.carCode" placeholder="请输入车牌号" />
  29 + </el-form-item>
  30 + </el-col>
  31 + </el-row>
  32 + <el-row :gutter="30">
  33 + <el-col :span="7">
  34 + <el-form-item label="车辆品牌" prop="carBrank">
  35 + <el-input v-model="form.carBrank" placeholder="请输入车辆品牌" />
  36 + </el-form-item>
  37 + </el-col>
  38 + <el-col :span="7">
  39 + <el-form-item label="排放标准" prop="emissionStandard">
  40 + <el-select v-model="form.emissionStandard" placeholder="请选择排放标准" clearable style="width: 100%;">
  41 + <el-option label="国四" value="国四" />
  42 + <el-option label="国五" value="国五" />
  43 + <el-option label="国六" value="国六" />
  44 + <el-option label="纯电动" value="纯电动" />
  45 + </el-select>
  46 + </el-form-item>
  47 + </el-col>
  48 + <el-col :span="7">
  49 + <el-form-item label="驾驶员" prop="drivers">
  50 + <treeselect v-model="drivers" :multiple="true" :options="options" placeholder="请选择"/>
  51 + </el-form-item>
  52 + </el-col>
  53 + </el-row>
  54 + <el-row :gutter="30">
  55 + <el-col :span="7">
  56 + <el-form-item label="道路运输证有效期" prop="roadTransportDate">
  57 + <el-date-picker clearable size="small" style="width: 100%"
  58 + v-model="form.roadTransportDate"
  59 + type="date"
  60 + value-format="yyyy-MM-dd"
  61 + placeholder="选择道路运输证有效期">
  62 + </el-date-picker>
  63 + </el-form-item>
  64 +
  65 + </el-col>
  66 + <el-col :span="7">
  67 + <el-form-item label="行驶证有效期" prop="drivingLicenseDate">
  68 + <el-date-picker clearable size="small" style="width: 100%"
  69 + v-model="form.drivingLicenseDate"
  70 + type="date"
  71 + value-format="yyyy-MM-dd"
  72 + placeholder="选择行驶证有效期">
  73 + </el-date-picker>
  74 + </el-form-item>
  75 +
  76 + </el-col>
  77 + <el-col :span="7">
  78 + <el-form-item label="录入日期" prop="enterDate">
  79 + <el-date-picker clearable size="small" style="width: 100%"
  80 + v-model="form.enterDate"
  81 + type="date"
  82 + value-format="yyyy-MM-dd"
  83 + placeholder="选择录入日期">
  84 + </el-date-picker>
  85 + </el-form-item>
  86 +
  87 + </el-col>
  88 + </el-row>
  89 + <el-row :gutter="30">
  90 + <el-col :span="7">
  91 + <el-form-item label="车架号" prop="farmeNumber">
  92 + <el-input v-model="form.farmeNumber" placeholder="请输入车架号" />
  93 + </el-form-item>
  94 +
  95 + </el-col>
  96 + <el-col :span="7">
  97 + <el-form-item label="车辆标识牌" prop="carIdentification">
  98 + <el-input v-model="form.carIdentification" placeholder="请输入车辆标识牌" />
  99 + </el-form-item>
  100 +
  101 + </el-col>
  102 + <el-col :span="7">
  103 + <el-form-item label="箱货体积" prop="containerVolume">
  104 + <el-row>
  105 + <el-col :span="5">
  106 + <el-select v-model="volumeOrLWH" placeholder="请选择排放标准" style="width: 100%;">
  107 + <el-option label="体积" value="体积"/>
  108 + <el-option label="长宽高" value="长宽高" />
  109 + </el-select>
  110 + </el-col>
  111 + <el-col :span="19" v-if="volumeOrLWH==='体积'">
  112 + <el-input v-model="form.containerVolume" placeholder="请输入车辆体积" />
  113 + </el-col>
  114 + <el-col :span="19" v-if="volumeOrLWH==='长宽高'">
  115 + <el-row>
  116 + <el-col :span="8">
  117 + <el-input v-model="form.length" placeholder="长" />
  118 + </el-col>
  119 + <el-col :span="8">
  120 + <el-input v-model="form.width" placeholder="宽" />
  121 + </el-col>
  122 + <el-col :span="8">
  123 + <el-input v-model="form.height" placeholder="高" />
  124 + </el-col>
  125 + </el-row>
  126 + </el-col>
  127 + </el-row>
  128 +
  129 + </el-form-item>
  130 +
  131 + </el-col>
  132 + </el-row>
  133 +
  134 + <el-row :gutter="30">
  135 + <el-col :span="7">
  136 + <el-form-item label="车辆颜色" prop="carColor">
  137 + <el-select v-model="form.carColor" placeholder="请选择车辆颜色" clearable style="width: 100%;">
  138 + <el-option label="黄色" value="黄色"/>
  139 + <el-option label="蓝色" value="蓝色" />
  140 + <el-option label="黄绿色" value="黄绿色" />
  141 + <el-option label="黑色" value="黑色" />
  142 + <el-option label="白色" value="白色" />
  143 + <el-option label="未上牌" value="未上牌" />
  144 + <el-option label="其它" value="其它" />
  145 + </el-select>
  146 + </el-form-item>
  147 +
  148 + </el-col>
  149 + <el-col :span="7">
  150 + <el-form-item label="车辆设备" prop="carEquipment">
  151 + <el-input v-model="form.carEquipment" placeholder="请输入车辆设备" />
  152 + </el-form-item>
  153 + </el-col>
  154 + <el-col :span="7">
  155 + <el-form-item label="备注" prop="remark">
  156 + <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
  157 + </el-form-item>
  158 + </el-col>
  159 + </el-row>
  160 + <el-row style="border: 1px solid #dcdfe6;border-radius: 2px;">
  161 + <el-col :span="3">
  162 + <div class="upload_lable">
  163 + 道路运输证
  164 + <el-upload
  165 + ref="upload"
  166 + action=""
  167 + accept=".jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx"
  168 + :on-change="fileChange"
  169 + :auto-upload="false"
  170 + :show-file-list="false"
  171 + multiple
  172 + :file-list="roadTransport">
  173 +
  174 + <el-button size="small" type="primary" icon="el-icon-upload">上传附件</el-button>
  175 + </el-upload>
  176 + </div>
  177 + </el-col>
  178 + <el-col :span="21">
  179 + <div class="upload_btn">
  180 + <div v-for="(item,index) in roadTransport">
  181 + <div v-if="!/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_image">
  182 + <div class="upload_close" @click="roadTransport.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div>
  183 + <el-image
  184 + style="width: 110px; height: 95px; margin: 5px;float:left;"
  185 + :src="createUrl(item)"
  186 + :preview-src-list="[createUrl(item)]"
  187 + :z-index="999">
  188 + </el-image>
  189 + </div>
  190 + <div v-if="/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_file">
  191 + <div class="upload_close_file" @click="roadTransport.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div>
  192 + <span @click="tempDownload(item)"><el-icon class="el-icon-document-add" style="font-size:70px;"></el-icon></span>
  193 + <div style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" @click="tempDownload(item)">{{ item.name }}</div>
  194 + </div>
  195 + </div>
  196 + </div>
  197 + </el-col>
  198 + </el-row>
  199 + <el-row style="border: 1px solid #dcdfe6;border-radius: 2px;">
  200 + <el-col :span="3">
  201 + <div class="upload_lable">
  202 + 行驶证
  203 + <el-upload
  204 + ref="upload"
  205 + action=""
  206 + accept=".jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx"
  207 + :on-change="fileChange1"
  208 + :auto-upload="false"
  209 + :show-file-list="false"
  210 + multiple
  211 + :file-list="drivingLicense">
  212 + <el-button size="small" type="primary" icon="el-icon-upload">上传附件</el-button>
  213 + </el-upload>
  214 + </div>
  215 + </el-col>
  216 + <el-col :span="21">
  217 + <div class="upload_btn">
  218 + <div v-for="(item,index) in drivingLicense">
  219 + <div v-if="!/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_image">
  220 + <div class="upload_close" @click="drivingLicense.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div>
  221 + <el-image
  222 + style="width: 110px; height: 95px; margin: 5px;float:left;"
  223 + :src="createUrl(item)"
  224 + :preview-src-list="[createUrl(item)]"
  225 + :z-index="999">
  226 + </el-image>
  227 + </div>
  228 + <div v-if="/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_file">
  229 + <div class="upload_close_file" @click="drivingLicense.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div>
  230 + <span @click="tempDownload(item)"><el-icon class="el-icon-document-add" style="font-size:70px;"></el-icon></span>
  231 + <div style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" @click="tempDownload(item)">{{ item.name }}</div>
  232 + </div>
  233 + </div>
  234 + </div>
  235 + </el-col>
  236 + </el-row>
  237 + <el-row style="border: 1px solid #dcdfe6;border-radius: 2px;">
  238 + <el-col :span="3">
  239 + <div class="upload_lable">
  240 + 车辆正面照片
  241 + <el-upload
  242 + ref="upload"
  243 + action=""
  244 + accept=".jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp"
  245 + :on-change="fileChange2"
  246 + :auto-upload="false"
  247 + :show-file-list="false"
  248 + multiple
  249 + :file-list="carFront">
  250 + <el-button size="small" type="primary" icon="el-icon-upload">上传附件</el-button>
  251 + </el-upload>
  252 + </div>
  253 + </el-col>
  254 + <el-col :span="21">
  255 + <div class="upload_btn">
  256 + <div v-for="(item,index) in carFront">
  257 + <div v-if="!/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_image">
  258 + <div class="upload_close" @click="carFront.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div>
  259 + <el-image
  260 + style="width: 110px; height: 95px; margin: 5px;float:left;"
  261 + :src="createUrl(item)"
  262 + :preview-src-list="[createUrl(item)]"
  263 + :z-index="999">
  264 + </el-image>
  265 + </div>
  266 + <div v-if="/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_file">
  267 + <div class="upload_close_file" @click="carFront.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div>
  268 + <span @click="tempDownload(item)"><el-icon class="el-icon-document-add" style="font-size:70px;"></el-icon></span>
  269 + <div style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" @click="tempDownload(item)">{{ item.name }}</div>
  270 + </div>
  271 + </div>
  272 + </div>
  273 + </el-col>
  274 + </el-row>
  275 + <el-row style="border: 1px solid #dcdfe6;border-radius: 2px;">
  276 + <el-col :span="3">
  277 + <div class="upload_lable">
  278 + 车辆左侧照片
  279 + <el-upload
  280 + ref="upload"
  281 + action=""
  282 + accept=".jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp"
  283 + :on-change="fileChange3"
  284 + :auto-upload="false"
  285 + :show-file-list="false"
  286 + multiple
  287 + :file-list="carLeft">
  288 + <el-button size="small" type="primary" icon="el-icon-upload">上传附件</el-button>
  289 + </el-upload>
  290 + </div>
  291 + </el-col>
  292 + <el-col :span="21">
  293 + <div class="upload_btn">
  294 + <div v-for="(item,index) in carLeft">
  295 + <div v-if="!/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_image">
  296 + <div class="upload_close" @click="carLeft.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div>
  297 + <el-image
  298 + style="width: 110px; height: 95px; margin: 5px;float:left;"
  299 + :src="createUrl(item)"
  300 + :preview-src-list="[createUrl(item)]"
  301 + :z-index="999">
  302 + </el-image>
  303 + </div>
  304 + <div v-if="/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_file">
  305 + <div class="upload_close_file" @click="carLeft.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div>
  306 + <span @click="tempDownload(item)"><el-icon class="el-icon-document-add" style="font-size:70px;"></el-icon></span>
  307 + <div style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" @click="tempDownload(item)">{{ item.name }}</div>
  308 + </div>
  309 + </div>
  310 + </div>
  311 + </el-col>
  312 + </el-row>
  313 + <el-row style="border: 1px solid #dcdfe6;border-radius: 2px;">
  314 + <el-col :span="3">
  315 + <div class="upload_lable">
  316 + 车辆尾部照片
  317 + <el-upload
  318 + ref="upload"
  319 + action=""
  320 + accept=".jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp"
  321 + :on-change="fileChange4"
  322 + :auto-upload="false"
  323 + :show-file-list="false"
  324 + multiple
  325 + :file-list="carBehind">
  326 + <el-button size="small" type="primary" icon="el-icon-upload">上传附件</el-button>
  327 + </el-upload>
  328 + </div>
  329 + </el-col>
  330 + <el-col :span="21">
  331 + <div class="upload_btn">
  332 + <div v-for="(item,index) in carBehind">
  333 + <div v-if="!/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_image">
  334 + <div class="upload_close" @click="carBehind.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div>
  335 + <el-image
  336 + style="width: 110px; height: 95px; margin: 5px;float:left;"
  337 + :src="createUrl(item)"
  338 + :preview-src-list="[createUrl(item)]"
  339 + :z-index="999">
  340 + </el-image>
  341 + </div>
  342 + <div v-if="/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_file">
  343 + <div class="upload_close_file" @click="carBehind.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div>
  344 + <span @click="tempDownload(item)"><el-icon class="el-icon-document-add" style="font-size:70px;"></el-icon></span>
  345 + <div style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" @click="tempDownload(item)">{{ item.name }}</div>
  346 + </div>
  347 + </div>
  348 + </div>
  349 + </el-col>
  350 + </el-row>
  351 + <el-row style="border: 1px solid #dcdfe6;border-radius: 2px;">
  352 + <el-col :span="3">
  353 + <div class="upload_lable">
  354 + 车辆右侧照片
  355 + <el-upload
  356 + ref="upload"
  357 + action=""
  358 + accept=".jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp"
  359 + :on-change="fileChange5"
  360 + :auto-upload="false"
  361 + :show-file-list="false"
  362 + multiple
  363 + :file-list="carRight">
  364 + <el-button size="small" type="primary" icon="el-icon-upload">上传附件</el-button>
  365 + </el-upload>
  366 + </div>
  367 + </el-col>
  368 + <el-col :span="21">
  369 + <div class="upload_btn">
  370 + <div v-for="(item,index) in carRight">
  371 + <div v-if="!/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_image">
  372 + <div class="upload_close" @click="carRight.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div>
  373 + <el-image
  374 + style="width: 110px; height: 95px; margin: 5px;float:left;"
  375 + :src="createUrl(item)"
  376 + :preview-src-list="[createUrl(item)]"
  377 + :z-index="999">
  378 + </el-image>
  379 + </div>
  380 + <div v-if="/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_file">
  381 + <div class="upload_close_file" @click="carRight.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div>
  382 + <span @click="tempDownload(item)"><el-icon class="el-icon-document-add" style="font-size:70px;"></el-icon></span>
  383 + <div style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" @click="tempDownload(item)">{{ item.name }}</div>
  384 + </div>
  385 + </div>
  386 + </div>
  387 + </el-col>
  388 + </el-row>
  389 + <!-- <el-form-item label="" prop="environmentalApproval">-->
  390 + <!-- <el-input v-model="form." type="textarea" placeholder="请输入内容" />-->
  391 + <!-- </el-form-item>-->
  392 + <!-- <el-form-item label="" prop="authorization">-->
  393 + <!-- <el-input v-model="form." type="textarea" placeholder="请输入内容" />-->
  394 + <!-- </el-form-item>-->
  395 + <!-- <el-form-item label="" prop="otherInformation">-->
  396 + <!-- <el-input v-model="form." type="textarea" placeholder="请输入内容" />-->
  397 + <!-- </el-form-item>-->
  398 + <!-- <el-form-item label="运输企业" prop="companyIds">-->
  399 + <!-- <el-input v-model="form.companyIds" placeholder="请输入运输企业" />-->
  400 + <!-- </el-form-item>-->
  401 + <!-- <el-form-item label="审批状态,0=审批中,1=审批通过,2=被驳回">-->
  402 + <!-- <el-radio-group v-model="form.status">-->
  403 + <!-- <el-radio label="1">请选择字典生成</el-radio>-->
  404 + <!-- </el-radio-group>-->
  405 + <!-- </el-form-item>-->
  406 + <!-- <el-form-item label="二维码" prop="qrCode">-->
  407 + <!-- <el-input v-model="form.qrCode" placeholder="请输入二维码" />-->
  408 + <!-- </el-form-item>-->
  409 + </el-form>
  410 + <div slot="footer" class="dialog-footer" style="margin-top: 20px">
  411 + <el-button type="primary" @click="submitForm">确 定</el-button>
  412 + <el-button @click="cancel">取 消</el-button>
  413 + </div>
  414 + </div>
  415 +</template>
  416 +
  417 +<script>
  418 +import {getCarInfo, addCarInfo, updateCarInfo } from "@/api/unit/carInfo";
  419 +import { listEnterprise} from "@/api/unit/enterprise";
  420 +import Treeselect from "@riophae/vue-treeselect";
  421 +import '@riophae/vue-treeselect/dist/vue-treeselect.css'
  422 +import {getAreaList} from "@/api/casefile/remoteServer";
  423 +import { listDriverByCompanyId } from "@/api/unit/driver";
  424 +
  425 +export default {
  426 + name: "DisposalSite",
  427 + components: {Treeselect},
  428 + data() {
  429 + return {
  430 + // 遮罩层
  431 + loading: true,
  432 + // 选中数组
  433 + ids: [],
  434 + // 非单个禁用
  435 + single: true,
  436 + // 非多个禁用
  437 + multiple: true,
  438 + // 显示搜索条件
  439 + showSearch: true,
  440 + // 总条数
  441 + total: 0,
  442 + // 处理场所管理表格数据
  443 + disposalSiteList: [],
  444 + // 弹出层标题
  445 + title: "",
  446 + // 是否显示弹出层
  447 + open: false,
  448 + // 表单参数
  449 + form: {},
  450 + // 表单校验
  451 + rules: {
  452 + companyId: [
  453 + {required: true, message: "请选择所属公司", trigger: "blur"}
  454 + ],
  455 + carType: [
  456 + {required: true, message: "请选择车辆类型", trigger: "blur"}
  457 + ],
  458 + carCode: [
  459 + {required: true, message: "请输入车牌号", trigger: "blur"}
  460 + ],
  461 + carBrank: [
  462 + {required: true, message: "请输入车辆品牌", trigger: "blur"}
  463 + ],
  464 + emissionStandard: [
  465 + {required: true, message: "请选择排放标准", trigger: "blur"}
  466 + ],
  467 + roadTransportDate: [
  468 + {required: true, message: "请选择道路运输证有效期", trigger: "blur"}
  469 + ],
  470 + drivingLicenseDate: [
  471 + {required: true, message: "请选择行驶证有效期", trigger: "blur"}
  472 + ],
  473 + enterDate: [
  474 + {required: true, message: "请选择录入日期", trigger: "blur"}
  475 + ],
  476 + farmeNumber: [
  477 + {required: true, message: "请输入车架号", trigger: "blur"}
  478 + ],
  479 + carIdentification: [
  480 + {required: true, message: "请输入车辆标识牌", trigger: "blur"}
  481 + ],
  482 +
  483 + },
  484 + areas:[],
  485 + // 附件
  486 + roadTransport: [],
  487 + drivingLicense: [],
  488 + carFront: [],
  489 + carLeft: [],
  490 + carBehind: [],
  491 + carRight: [],
  492 + enterpriseList:[],
  493 + driverList:[],
  494 + options:[],
  495 + volumeOrLWH:"体积",
  496 + drivers:[]
  497 + };
  498 + },
  499 + created() {
  500 + getAreaList().then(res => {
  501 + this.areas = res.data;
  502 + });
  503 + this.queryParams = {
  504 + companyType:"1"
  505 + }
  506 + listEnterprise(this.queryParams).then(response => {
  507 + this.enterpriseList = response.rows;
  508 + });
  509 + this.initData();
  510 + },
  511 + watch: {
  512 + '$route.query.carInfoId': 'initData'
  513 + },
  514 + methods: {
  515 + listDriverByCompany(value){
  516 + listDriverByCompanyId(value).then(response => {
  517 + this.drivers = [];
  518 + this.options = response;
  519 + });
  520 + },
  521 + reset(){
  522 + this.form = {
  523 + id: null,
  524 + companyId: null,
  525 + carType: null,
  526 + carCode: null,
  527 + carBrank: null,
  528 + emissionStandard: null,
  529 + roadTransportDate: null,
  530 + drivingLicenseDate: null,
  531 + enterDate: null,
  532 + farmeNumber: null,
  533 + carIdentification: null,
  534 + containerVolume: null,
  535 + carColor: null,
  536 + carEquipment: null,
  537 + remark: null,
  538 + roadTransport: null,
  539 + drivingLicense: null,
  540 + carFront: null,
  541 + carLeft: null,
  542 + carBehind: null,
  543 + carRight: null,
  544 + drivers: null,
  545 + status: 0,
  546 + createTime: null,
  547 + createBy: null,
  548 + updateTime: null,
  549 + updateBy: null,
  550 + creditStatus: "0",
  551 + qrCode: null
  552 + };
  553 + this.roadTransport = [];
  554 + this.drivingLicense = [];
  555 + this.carFront = [];
  556 + this.carLeft = [];
  557 + this.carBehind = [];
  558 + this.carRight = [];
  559 + this.drivers = [];
  560 + },
  561 + initData(){
  562 + this.reset();
  563 + let id = this.$route.query.carInfoId;
  564 + if(id!=null){
  565 + getCarInfo(id).then(response => {
  566 + this.form = response.data;
  567 +
  568 + listDriverByCompanyId(this.form.companyId).then(response => {
  569 + this.drivers = this.form.drivers.split(",").map(value => parseInt(value));
  570 + this.options = response;
  571 + });
  572 +
  573 + //将附件转换为前端可视化数组
  574 + if(this.form.roadTransport!=null&&this.form.roadTransport!==""){
  575 + let roadTransport = this.form.roadTransport.split(";");
  576 + roadTransport.map(item=>{
  577 + let name = item.substring(item.lastIndexOf("/")+1);
  578 + this.roadTransport.push({name:name,url:item})
  579 + })
  580 + }
  581 + if(this.form.drivingLicense!=null&&this.form.drivingLicense!==""){
  582 + let drivingLicense = this.form.drivingLicense.split(";");
  583 + drivingLicense.map(item=>{
  584 + let name = item.substring(item.lastIndexOf("/")+1);
  585 + this.drivingLicense.push({name:name,url:item})
  586 + })
  587 + }
  588 + if(this.form.carFront!=null&&this.form.carFront!==""){
  589 + let carFront = this.form.carFront.split(";");
  590 + carFront.map(item=>{
  591 + let name = item.substring(item.lastIndexOf("/")+1);
  592 + this.carFront.push({name:name,url:item})
  593 + })
  594 + }
  595 + if(this.form.carLeft!=null&&this.form.carLeft!==""){
  596 + let carLeft = this.form.carLeft.split(";");
  597 + carLeft.map(item=>{
  598 + let name = item.substring(item.lastIndexOf("/")+1);
  599 + this.carLeft.push({name:name,url:item})
  600 + })
  601 + }
  602 + if(this.form.carBehind!=null&&this.form.carBehind!==""){
  603 + let carBehind = this.form.carBehind.split(";");
  604 + carBehind.map(item=>{
  605 + let name = item.substring(item.lastIndexOf("/")+1);
  606 + this.carBehind.push({name:name,url:item})
  607 + })
  608 + }
  609 + if(this.form.carRight!=null&&this.form.carRight!==""){
  610 + let carRight = this.form.carRight.split(";");
  611 + carRight.map(item=>{
  612 + let name = item.substring(item.lastIndexOf("/")+1);
  613 + this.carRight.push({name:name,url:item})
  614 + })
  615 + }
  616 + });
  617 + }
  618 + },
  619 + createUrl(file){
  620 + if(file.raw!=null){
  621 + return URL.createObjectURL(file.raw);
  622 + }else{
  623 + return process.env.VUE_APP_BASE_API + file.url;
  624 + }
  625 +
  626 + },
  627 + tempDownload(row){
  628 + let name = row.name;
  629 + let url = "";
  630 + if(row.raw!=null){
  631 + url = URL.createObjectURL(row.raw);
  632 + }else{
  633 + url = process.env.VUE_APP_BASE_API + row.url;
  634 + }
  635 + const a = document.createElement('a')
  636 + a.setAttribute('download', name)
  637 + a.setAttribute('target', '_blank')
  638 + a.setAttribute('href', url);
  639 + a.click()
  640 + },
  641 + // 取消按钮
  642 + cancel() {
  643 + this.$tab.closePage({path:"/carInfo/info"}).then(() => {
  644 + this.$tab.openPage("车辆信息", "/tool/carInfo",{carInfoRefresh:1})
  645 + })
  646 + },
  647 + /** 提交按钮 */
  648 + submitForm() {
  649 + this.$refs["form"].validate(valid => {
  650 + if (valid) {
  651 + let formData = new FormData();
  652 + let form = this.form;
  653 + //去掉params属性
  654 + delete form.params;
  655 +
  656 + //先清空原有的附件
  657 + form.roadTransport = null;
  658 + form.drivingLicense = null;
  659 + form.carFront = null;
  660 + form.carLeft = null;
  661 + form.carBehind = null;
  662 + form.carRight = null;
  663 +
  664 + if(this.volumeOrLWH==="长宽高"){
  665 + form.lengthWidthHeight = form.length+";"+form.width+";"+form.height;
  666 + }
  667 + this.form.drivers = this.drivers.join(",");
  668 + this.roadTransport.forEach(item => {
  669 + if (item.raw != null) {
  670 + formData.append('roadTransportFiles', item.raw)
  671 + }else{
  672 + //将原有的附件拼接到form中
  673 + form.roadTransport = form.roadTransport!==null?form.roadTransport+";"+item.url:item.url;
  674 + }
  675 + })
  676 + this.drivingLicense.forEach(item => {
  677 + if (item.raw != null) {
  678 + formData.append('drivingLicenseFiles', item.raw)
  679 + }else{
  680 + //将原有的附件拼接到form中
  681 + form.drivingLicense = form.drivingLicense!==null?form.drivingLicense+";"+item.url:item.url;
  682 + }
  683 + })
  684 + this.carFront.forEach(item => {
  685 + if (item.raw != null) {
  686 + formData.append('carFrontFiles', item.raw)
  687 + }else{
  688 + //将原有的附件拼接到form中
  689 + form.carFront = form.carFront!==null?form.carFront+";"+item.url:item.url;
  690 + }
  691 + })
  692 + this.carLeft.forEach(item => {
  693 + if (item.raw != null) {
  694 + formData.append('carLeftFiles', item.raw)
  695 + }else{
  696 + //将原有的附件拼接到form中
  697 + form.carLeft = form.carLeft!==null?form.carLeft+";"+item.url:item.url;
  698 + }
  699 + })
  700 + this.carBehind.forEach(item => {
  701 + if (item.raw != null) {
  702 + formData.append('carBehindFiles', item.raw)
  703 + }else{
  704 + //将原有的附件拼接到form中
  705 + form.carBehind = form.carBehind!==null?form.carBehind+";"+item.url:item.url;
  706 + }
  707 + })
  708 + this.carRight.forEach(item => {
  709 + if (item.raw != null) {
  710 + formData.append('carRightFiles', item.raw)
  711 + }else{
  712 + //将原有的附件拼接到form中
  713 + form.carRight = form.carRight!==null?form.carRight+";"+item.url:item.url;
  714 + }
  715 + })
  716 + for (let key in form) {
  717 + formData.append(key, form[key] == null ? "" : form[key])
  718 + }
  719 + if (this.form.id != null) {
  720 + updateCarInfo(formData).then(response => {
  721 + this.msgSuccess("修改成功");
  722 + this.$tab.closePage({path:"/carInfo/infoEdit"}).then(() => {
  723 + this.$tab.openPage("车辆信息管理", "/tool/carInfo",{carInfoRefresh:1})
  724 + })
  725 + });
  726 + } else {
  727 + addCarInfo(formData).then(response => {
  728 + this.msgSuccess("新增成功");
  729 + this.$tab.closePage({path:"/carInfo/info"}).then(() => {
  730 + this.$tab.openPage("车辆信息管理", "/tool/carInfo",{carInfoRefresh:1})
  731 + })
  732 + });
  733 + }
  734 + }
  735 + });
  736 + },
  737 + /**
  738 + * 文件改变时,限制文件上传格式和大小
  739 + * 文件格式只能为docx/doc/pdf/png/jpeg/png/jpg
  740 + * 大小不超过20M
  741 + * */
  742 + fileChange(file, fileList) {
  743 + let count = 0;
  744 + for (let i = 0; i < fileList.length; i++) {
  745 + // console.log(fileList.length)
  746 + // console.log(this.fileEntityList[i].name+"111"+file.name)
  747 + if (fileList[i].name == file.name) {
  748 + count++;
  749 + if (count == 2) {
  750 + this.$message({
  751 + message: '已存在此文件!',
  752 + type: 'warning'
  753 + });
  754 + for (let j = fileList.length; j > 0; j--) {
  755 + //如果存在此文件,去除新选择的重复文件
  756 + if (fileList[j - 1].name == file.name) {
  757 + fileList.splice(j - 1, 1);
  758 + i--;
  759 + return false;
  760 + }
  761 + }
  762 + }
  763 + }
  764 + }
  765 + let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase();
  766 + //格式符合后判断大小
  767 + if ("jpg,jpeg,png,gif,jfif,pjpeg,pjp,pdf,doc,docx,xls,xlsx".indexOf(fileType) != -1) {
  768 + let max5M = file.size / 1024 / 1024 < 100;
  769 + if (!max5M) {
  770 + this.$message({
  771 + message: '上传文件大小不得超过100M!',
  772 + type: 'warning'
  773 + });
  774 + fileList = fileList.splice(fileList.length - 1, 1);
  775 + } else {
  776 + //符合条件后进行添加
  777 + this.roadTransport = fileList
  778 + }
  779 + } else {
  780 + this.$message({
  781 + message: '上传文件只能是.jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx格式!',
  782 + type: 'warning'
  783 + });
  784 + fileList = fileList.splice(fileList.length - 1, 1);
  785 + }
  786 + },
  787 + fileChange1(file, fileList) {
  788 + let count = 0;
  789 + for (let i = 0; i < fileList.length; i++) {
  790 + // console.log(fileList.length)
  791 + // console.log(this.fileEntityList[i].name+"111"+file.name)
  792 + if (fileList[i].name == file.name) {
  793 + count++;
  794 + if (count == 2) {
  795 + this.$message({
  796 + message: '已存在此文件!',
  797 + type: 'warning'
  798 + });
  799 + for (let j = fileList.length; j > 0; j--) {
  800 + //如果存在此文件,去除新选择的重复文件
  801 + if (fileList[j - 1].name == file.name) {
  802 + fileList.splice(j - 1, 1);
  803 + i--;
  804 + return false;
  805 + }
  806 + }
  807 + }
  808 + }
  809 + }
  810 + let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase();
  811 + //格式符合后判断大小
  812 + if ("jpg,jpeg,png,gif,jfif,pjpeg,pjp,pdf,doc,docx,xls,xlsx".indexOf(fileType) != -1) {
  813 + let max5M = file.size / 1024 / 1024 < 100;
  814 + if (!max5M) {
  815 + this.$message({
  816 + message: '上传文件大小不得超过100M!',
  817 + type: 'warning'
  818 + });
  819 + fileList = fileList.splice(fileList.length - 1, 1);
  820 + } else {
  821 + //符合条件后进行添加
  822 + this.drivingLicense = fileList
  823 + }
  824 + } else {
  825 + this.$message({
  826 + message: '上传文件只能是.jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx格式!',
  827 + type: 'warning'
  828 + });
  829 + fileList = fileList.splice(fileList.length - 1, 1);
  830 + }
  831 + },
  832 + fileChange2(file, fileList) {
  833 + let count = 0;
  834 + for (let i = 0; i < fileList.length; i++) {
  835 + // console.log(fileList.length)
  836 + // console.log(this.fileEntityList[i].name+"111"+file.name)
  837 + if (fileList[i].name == file.name) {
  838 + count++;
  839 + if (count == 2) {
  840 + this.$message({
  841 + message: '已存在此文件!',
  842 + type: 'warning'
  843 + });
  844 + for (let j = fileList.length; j > 0; j--) {
  845 + //如果存在此文件,去除新选择的重复文件
  846 + if (fileList[j - 1].name == file.name) {
  847 + fileList.splice(j - 1, 1);
  848 + i--;
  849 + return false;
  850 + }
  851 + }
  852 + }
  853 + }
  854 + }
  855 + let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase();
  856 + //格式符合后判断大小
  857 + if ("jpg,jpeg,png,gif,jfif,pjpeg,pjp".indexOf(fileType) != -1) {
  858 + let max5M = file.size / 1024 / 1024 < 100;
  859 + if (!max5M) {
  860 + this.$message({
  861 + message: '上传文件大小不得超过100M!',
  862 + type: 'warning'
  863 + });
  864 + fileList = fileList.splice(fileList.length - 1, 1);
  865 + } else {
  866 + //符合条件后进行添加
  867 + this.carFront = fileList
  868 + }
  869 + } else {
  870 + this.$message({
  871 + message: '上传文件只能是.jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp格式!',
  872 + type: 'warning'
  873 + });
  874 + fileList = fileList.splice(fileList.length - 1, 1);
  875 + }
  876 + },
  877 + fileChange3(file, fileList) {
  878 + let count = 0;
  879 + for (let i = 0; i < fileList.length; i++) {
  880 + // console.log(fileList.length)
  881 + // console.log(this.fileEntityList[i].name+"111"+file.name)
  882 + if (fileList[i].name == file.name) {
  883 + count++;
  884 + if (count == 2) {
  885 + this.$message({
  886 + message: '已存在此文件!',
  887 + type: 'warning'
  888 + });
  889 + for (let j = fileList.length; j > 0; j--) {
  890 + //如果存在此文件,去除新选择的重复文件
  891 + if (fileList[j - 1].name == file.name) {
  892 + fileList.splice(j - 1, 1);
  893 + i--;
  894 + return false;
  895 + }
  896 + }
  897 + }
  898 + }
  899 + }
  900 + let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase();
  901 + //格式符合后判断大小
  902 + if ("jpg,jpeg,png,gif,jfif,pjpeg,pjp,pdf".indexOf(fileType) != -1) {
  903 + let max5M = file.size / 1024 / 1024 < 100;
  904 + if (!max5M) {
  905 + this.$message({
  906 + message: '上传文件大小不得超过100M!',
  907 + type: 'warning'
  908 + });
  909 + fileList = fileList.splice(fileList.length - 1, 1);
  910 + } else {
  911 + //符合条件后进行添加
  912 + this.carLeft = fileList
  913 + }
  914 + } else {
  915 + this.$message({
  916 + message: '上传文件只能是.jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp格式!',
  917 + type: 'warning'
  918 + });
  919 + fileList = fileList.splice(fileList.length - 1, 1);
  920 + }
  921 + },
  922 + fileChange4(file, fileList) {
  923 + let count = 0;
  924 + for (let i = 0; i < fileList.length; i++) {
  925 + // console.log(fileList.length)
  926 + // console.log(this.fileEntityList[i].name+"111"+file.name)
  927 + if (fileList[i].name == file.name) {
  928 + count++;
  929 + if (count == 2) {
  930 + this.$message({
  931 + message: '已存在此文件!',
  932 + type: 'warning'
  933 + });
  934 + for (let j = fileList.length; j > 0; j--) {
  935 + //如果存在此文件,去除新选择的重复文件
  936 + if (fileList[j - 1].name == file.name) {
  937 + fileList.splice(j - 1, 1);
  938 + i--;
  939 + return false;
  940 + }
  941 + }
  942 + }
  943 + }
  944 + }
  945 + let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase();
  946 + //格式符合后判断大小
  947 + if ("jpg,jpeg,png,gif,jfif,pjpeg,pjp".indexOf(fileType) != -1) {
  948 + let max5M = file.size / 1024 / 1024 < 100;
  949 + if (!max5M) {
  950 + this.$message({
  951 + message: '上传文件大小不得超过100M!',
  952 + type: 'warning'
  953 + });
  954 + fileList = fileList.splice(fileList.length - 1, 1);
  955 + } else {
  956 + //符合条件后进行添加
  957 + this.carBehind = fileList
  958 + }
  959 + } else {
  960 + this.$message({
  961 + message: '上传文件只能是.jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp格式!',
  962 + type: 'warning'
  963 + });
  964 + fileList = fileList.splice(fileList.length - 1, 1);
  965 + }
  966 + },
  967 + fileChange5(file, fileList) {
  968 + let count = 0;
  969 + for (let i = 0; i < fileList.length; i++) {
  970 + // console.log(fileList.length)
  971 + // console.log(this.fileEntityList[i].name+"111"+file.name)
  972 + if (fileList[i].name == file.name) {
  973 + count++;
  974 + if (count == 2) {
  975 + this.$message({
  976 + message: '已存在此文件!',
  977 + type: 'warning'
  978 + });
  979 + for (let j = fileList.length; j > 0; j--) {
  980 + //如果存在此文件,去除新选择的重复文件
  981 + if (fileList[j - 1].name == file.name) {
  982 + fileList.splice(j - 1, 1);
  983 + i--;
  984 + return false;
  985 + }
  986 + }
  987 + }
  988 + }
  989 + }
  990 + let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase();
  991 + //格式符合后判断大小
  992 + if ("jpg,jpeg,png,gif,jfif,pjpeg,pjp".indexOf(fileType) != -1) {
  993 + let max5M = file.size / 1024 / 1024 < 100;
  994 + if (!max5M) {
  995 + this.$message({
  996 + message: '上传文件大小不得超过100M!',
  997 + type: 'warning'
  998 + });
  999 + fileList = fileList.splice(fileList.length - 1, 1);
  1000 + } else {
  1001 + //符合条件后进行添加
  1002 + this.carRight = fileList
  1003 + }
  1004 + } else {
  1005 + this.$message({
  1006 + message: '上传文件只能是.jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp格式!',
  1007 + type: 'warning'
  1008 + });
  1009 + fileList = fileList.splice(fileList.length - 1, 1);
  1010 + }
  1011 + },
  1012 + }
  1013 +};
  1014 +</script>
  1015 +<style lang="scss" scoped>
  1016 +.upload_lable{
  1017 + border-right: 1px solid #dcdfe6;
  1018 + padding: 27px 30px;
  1019 + background: #fafafa;
  1020 + text-align: center;
  1021 +}
  1022 +.upload_btn{
  1023 + max-height: 106px;
  1024 +}
  1025 +.upload_close{
  1026 + position: absolute;
  1027 + left: 105px;
  1028 + z-index:99;
  1029 + top:-1px;
  1030 + font-size:18px;
  1031 + color:red;
  1032 +}
  1033 +.upload_close_file{
  1034 + position: absolute;
  1035 + left: 80px;
  1036 + z-index:99;
  1037 + top:-1px;
  1038 + font-size:18px;
  1039 + color:red;
  1040 +}
  1041 +.upload_div_image{
  1042 + display: inline-block;
  1043 + width: 110px;
  1044 + height: 95px;
  1045 + position: relative;
  1046 + float: left;
  1047 + margin-left: 5px;
  1048 +}
  1049 +.upload_div_file{
  1050 + display: inline-block;
  1051 + width: 110px;
  1052 + height: 95px;
  1053 + text-align: center;
  1054 + float:left;
  1055 + margin: 5px;
  1056 + position: relative;
  1057 +}
  1058 +.serach_map{
  1059 + position: absolute;
  1060 + top: 100px;
  1061 + left: 25px;
  1062 + z-index: 999;
  1063 + background: #fff;
  1064 + padding: 10px;
  1065 + border-radius: 5px;
  1066 + box-shadow: 0 0 10px rgba(0,0,0,.2);
  1067 +}
  1068 +</style>
... ...
trash-ui/src/views/unit/disposalSite/index.vue 0 → 100644
  1 +<template>
  2 + <div class="app-container">
  3 + <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="158px">
  4 + <el-form-item label="处理场所名称" prop="name">
  5 + <el-input
  6 + v-model="queryParams.name"
  7 + placeholder="请输入处理场所名称"
  8 + clearable
  9 + size="small"
  10 + @keyup.enter.native="handleQuery"
  11 + />
  12 + </el-form-item>
  13 + <el-form-item label="建筑垃圾处理场所类型" prop="siteType">
  14 + <el-select v-model="queryParams.siteType" placeholder="请选择建筑垃圾处理场所类型" clearable size="small">
  15 + <el-option label="消纳(回填)场所" value="消纳(回填)场所" />
  16 + <el-option label="建筑垃圾资源化处置场" value="建筑垃圾资源化处置场" />
  17 + <el-option label="盾构土环保处置场" value="盾构土环保处置场" />
  18 + </el-select>
  19 + </el-form-item>
  20 + <el-form-item label="所在区域" prop="localArea">
  21 + <el-select v-model="queryParams.localArea" placeholder="请选择所在区域" style="width: 100%" clearable>
  22 + <el-option v-for="(area,index) in areas" :label="area.name" :value="area.name" :key="index"/>
  23 + </el-select>
  24 + </el-form-item>
  25 + <el-form-item label="审核情况" prop="auditStatus">
  26 + <el-select v-model="queryParams.auditStatus" placeholder="审核情况" clearable size="small">
  27 + <el-option label="新增审核中" value="新增审核中" />
  28 + <el-option label="审核通过" value="审核通过" />
  29 + <el-option label="新增审核驳回" value="新增审核驳回" />
  30 + <el-option label="变更审核中" value="变更审核中" />
  31 + <el-option label="变更审核驳回" value="变更审核驳回" />
  32 + </el-select>
  33 + </el-form-item>
  34 + <el-form-item label="信用状态" prop="creditStatus">
  35 + <el-select v-model="queryParams.creditStatus" placeholder="请选择信用状态" clearable size="small">
  36 + <el-option label="正常" value="正常" />
  37 + <el-option label="失信" value="失信" />
  38 + </el-select>
  39 + </el-form-item>
  40 + <el-form-item label="期限范围" prop="termRange">
  41 + <el-select v-model="queryParams.termRange" placeholder="请选择期限范围" clearable size="small">
  42 + <el-option label="已超期" value="已超期" />
  43 + <el-option label="未超期" value="未超期" />
  44 + </el-select>
  45 + </el-form-item>
  46 + <el-form-item>
  47 + <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  48 + <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  49 + </el-form-item>
  50 + </el-form>
  51 +
  52 + <el-row :gutter="10" class="mb8">
  53 + <el-col :span="1.5">
  54 + <el-button
  55 + type="primary"
  56 + icon="el-icon-plus"
  57 + size="mini"
  58 + @click="handleAdd"
  59 + v-hasPermi="['unit:disposalSite:add']"
  60 + >新增</el-button>
  61 + </el-col>
  62 + <el-col :span="1.5">
  63 + <el-button
  64 + type="success"
  65 + icon="el-icon-edit"
  66 + size="mini"
  67 + :disabled="single"
  68 + @click="handleUpdate"
  69 + v-hasPermi="['unit:disposalSite:edit']"
  70 + >修改</el-button>
  71 + </el-col>
  72 + <el-col :span="1.5">
  73 + <el-button
  74 + type="danger"
  75 + icon="el-icon-delete"
  76 + size="mini"
  77 + :disabled="multiple"
  78 + @click="handleDelete"
  79 + v-hasPermi="['unit:disposalSite:remove']"
  80 + >删除</el-button>
  81 + </el-col>
  82 + <el-col :span="1.5">
  83 + <el-button
  84 + type="warning"
  85 + icon="el-icon-download"
  86 + size="mini"
  87 + @click="handleExport"
  88 + v-hasPermi="['unit:disposalSite:export']"
  89 + >导出</el-button>
  90 + </el-col>
  91 + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  92 + </el-row>
  93 +
  94 + <el-table v-loading="loading" :data="disposalSiteList" @selection-change="handleSelectionChange">
  95 + <el-table-column type="selection" width="55" align="center" />
  96 + <el-table-column type="index" width="55" align="center" label="序号"/>
  97 + <el-table-column label="处理场所名称" align="center" prop="name" />
  98 + <el-table-column label="建筑垃圾处理场所类型" align="center" prop="siteType" />
  99 + <el-table-column label="所在区域" align="center" prop="localArea" />
  100 + <el-table-column label="审批方量(m³)" align="center" prop="squareMeasure" />
  101 + <el-table-column label="剩余方量(m³)" align="center" prop="surplusSquareMeasure" />
  102 + <el-table-column label="有限期开始时间" align="center" prop="validityBeginDate" width="180">
  103 + <template slot-scope="scope">
  104 + <span>{{ parseTime(scope.row.validityBeginDate, '{y}-{m}-{d}') }}</span>
  105 + </template>
  106 + </el-table-column>
  107 + <el-table-column label="有限期结束时间" align="center" prop="validityEndDate" width="180">
  108 + <template slot-scope="scope">
  109 + <span>{{ parseTime(scope.row.validityEndDate, '{y}-{m}-{d}') }}</span>
  110 + </template>
  111 + </el-table-column>
  112 + <el-table-column label="消纳来源" align="center" prop="absorbSource" />
  113 + <el-table-column label="审核情况" align="center" prop="auditStatus" />
  114 + <el-table-column label="信用状态" align="center" prop="creditStatus" />
  115 + <el-table-column label="期限范围" align="center" prop="termRange" />
  116 + <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
  117 + <template slot-scope="scope">
  118 + <el-button
  119 + size="mini"
  120 + type="text"
  121 + icon="el-icon-edit"
  122 + @click="handleUpdate(scope.row)"
  123 + v-hasPermi="['unit:disposalSite:edit']"
  124 + >修改</el-button>
  125 + <el-button
  126 + size="mini"
  127 + type="text"
  128 + icon="el-icon-delete"
  129 + @click="handleDelete(scope.row)"
  130 + v-hasPermi="['unit:disposalSite:remove']"
  131 + >删除</el-button>
  132 + </template>
  133 + </el-table-column>
  134 + </el-table>
  135 +
  136 + <pagination
  137 + v-show="total>0"
  138 + :total="total"
  139 + :page.sync="queryParams.pageNum"
  140 + :limit.sync="queryParams.pageSize"
  141 + @pagination="getList"
  142 + />
  143 + </div>
  144 +</template>
  145 +
  146 +<script>
  147 +import { listDisposalSite, getDisposalSite, delDisposalSite, addDisposalSite, updateDisposalSite, exportDisposalSite } from "@/api/unit/disposalSite";
  148 +import {getAreaList} from "@/api/casefile/remoteServer";
  149 +
  150 +export default {
  151 + name: "DisposalSite",
  152 + data() {
  153 + return {
  154 + // 遮罩层
  155 + loading: true,
  156 + // 选中数组
  157 + ids: [],
  158 + // 非单个禁用
  159 + single: true,
  160 + // 非多个禁用
  161 + multiple: true,
  162 + // 显示搜索条件
  163 + showSearch: true,
  164 + // 总条数
  165 + total: 0,
  166 + // 处理场所管理表格数据
  167 + disposalSiteList: [],
  168 + // 弹出层标题
  169 + title: "",
  170 + // 是否显示弹出层
  171 + open: false,
  172 + // 查询参数
  173 + queryParams: {
  174 + pageNum: 1,
  175 + pageSize: 10,
  176 + name: null,
  177 + certificateNumber: null,
  178 + address: null,
  179 + engineeringProperty: null,
  180 + siteType: null,
  181 + localArea: null,
  182 + operatingArea: null,
  183 + trashType: null,
  184 + constructionUnit: null,
  185 + constructionUnitPerson: null,
  186 + constructionUnitPersonPhone: null,
  187 + validityBeginDate: null,
  188 + validityEndDate: null,
  189 + squareMeasure: null,
  190 + surplusSquareMeasure: null,
  191 + carWashingFacilities: null,
  192 + exitRoadCondition: null,
  193 + lightingFacility: null,
  194 + videoSurveillanceFacility: null,
  195 + preparer: null,
  196 + handlingAdvice: null,
  197 + absorbSource: null,
  198 + electronicFence: null,
  199 + creditStatus: null,
  200 + approvalDocument: null,
  201 + approvalData: null,
  202 + scenePhoto: null,
  203 + carWashingFacilitiesImage: null,
  204 + termRange: null,
  205 + safetyAssessmentReport: null,
  206 + environmentalApproval: null,
  207 + authorization: null,
  208 + otherInformation: null,
  209 + companyIds: null,
  210 + status: null,
  211 + qrCode: null
  212 + },
  213 + // 表单参数
  214 + form: {},
  215 + // 表单校验
  216 + rules: {
  217 + },
  218 + areas: []
  219 + };
  220 + },
  221 + created() {
  222 + getAreaList().then(res => {
  223 + this.areas = res.data;
  224 + });
  225 +
  226 + this.getList();
  227 + },
  228 + watch:{
  229 + '$route.query.disposalSiteRefresh':'getList'
  230 + },
  231 + methods: {
  232 + /** 查询处理场所管理列表 */
  233 + getList() {
  234 + this.loading = true;
  235 + listDisposalSite(this.queryParams).then(response => {
  236 + this.disposalSiteList = response.rows;
  237 + this.total = response.total;
  238 + this.loading = false;
  239 + });
  240 + },
  241 + /** 搜索按钮操作 */
  242 + handleQuery() {
  243 + this.queryParams.pageNum = 1;
  244 + this.getList();
  245 + },
  246 + /** 重置按钮操作 */
  247 + resetQuery() {
  248 + this.handleQuery();
  249 + },
  250 + // 多选框选中数据
  251 + handleSelectionChange(selection) {
  252 + this.ids = selection.map(item => item.id)
  253 + this.single = selection.length!==1
  254 + this.multiple = !selection.length
  255 + },
  256 + /** 新增按钮操作 */
  257 + handleAdd() {
  258 + this.$tab.openPage("新增处理场所管理","/disposalSite/info",{disposalSiteRefresh:0});
  259 + },
  260 + /** 修改按钮操作 */
  261 + handleUpdate(row) {
  262 + const id = row.id || this.ids
  263 + this.$tab.openPage("修改处理场所","/disposalSite/infoEdit",{disposalSiteId: id,disposalSiteRefresh:0});
  264 + },
  265 + /** 删除按钮操作 */
  266 + handleDelete(row) {
  267 + const ids = row.id || this.ids;
  268 + this.$confirm('是否确认删除处理场所管理编号为"' + ids + '"的数据项?', "警告", {
  269 + confirmButtonText: "确定",
  270 + cancelButtonText: "取消",
  271 + type: "warning"
  272 + }).then(function() {
  273 + return delDisposalSite(ids);
  274 + }).then(() => {
  275 + this.getList();
  276 + this.msgSuccess("删除成功");
  277 + })
  278 + },
  279 + /** 导出按钮操作 */
  280 + handleExport() {
  281 + const queryParams = this.queryParams;
  282 + this.$confirm('是否确认导出所有处理场所管理数据项?', "警告", {
  283 + confirmButtonText: "确定",
  284 + cancelButtonText: "取消",
  285 + type: "warning"
  286 + }).then(function() {
  287 + return exportDisposalSite(queryParams);
  288 + }).then(response => {
  289 + this.download(response.msg);
  290 + })
  291 + }
  292 + }
  293 +};
  294 +</script>
... ...
trash-ui/src/views/unit/disposalSite/info.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="zcContainer" 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("zcContainer", { //设置地图容器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 + let path = this.form.electronicFence.split(";");
  985 + path.map(item=>{
  986 + let arr = item.split(",");
  987 + this.polygonArr.push([arr[0],arr[1]]);
  988 + });
  989 + }
  990 + });
  991 + },
  992 + createUrl(file){
  993 + if(file.raw!=null){
  994 + return URL.createObjectURL(file.raw);
  995 + }else{
  996 + return process.env.VUE_APP_BASE_API + file.url;
  997 + }
  998 +
  999 + },
  1000 + tempDownload(row){
  1001 + let name = row.name;
  1002 + let url = "";
  1003 + if(row.raw!=null){
  1004 + url = URL.createObjectURL(row.raw);
  1005 + }else{
  1006 + url = process.env.VUE_APP_BASE_API + row.url;
  1007 + }
  1008 + console.log(url)
  1009 + const a = document.createElement('a')
  1010 + a.setAttribute('download', name)
  1011 + a.setAttribute('target', '_blank')
  1012 + a.setAttribute('href', url);
  1013 + a.click()
  1014 + },
  1015 + // 取消按钮
  1016 + cancel() {
  1017 + this.$tab.closePage({path:"/disposalSite/info"}).then(() => {
  1018 + this.$tab.openPage("处理场所管理", "/tool/disposalSite",{disposalSiteRefresh:1})
  1019 + })
  1020 + },
  1021 + /** 提交按钮 */
  1022 + submitForm() {
  1023 + this.$refs["form"].validate(valid => {
  1024 + if (valid) {
  1025 + let formData = new FormData();
  1026 + let form = this.form;
  1027 + //去掉params属性
  1028 + delete form.params;
  1029 + // formData.append('approvalDocument', null);
  1030 + // formData.append('approvalData', null);
  1031 + // formData.append('scenePhoto', null);
  1032 + // formData.append('carWashingFacilitiesImage', null);
  1033 + // formData.append('authorization', null);
  1034 + // formData.append('safetyAssessmentReport', null);
  1035 + // formData.append('environmentalApproval', null);
  1036 + // formData.append('otherInformation', null);
  1037 + //将新增的文件放入formData
  1038 +
  1039 + //先清空原有的附件
  1040 + form.approvalDocument = null;
  1041 + form.approvalData = null;
  1042 + form.scenePhoto = null;
  1043 + form.carWashingFacilitiesImage = null;
  1044 + form.authorization = null;
  1045 + form.safetyAssessmentReport = null;
  1046 + form.environmentalApproval = null;
  1047 + form.otherInformation = null;
  1048 + form.trashType = this.form.trashType.join(",");
  1049 +
  1050 + this.approvalDocument.forEach(item => {
  1051 + if (item.raw != null) {
  1052 + formData.append('approvalDocumentFiles', item.raw)
  1053 + }else{
  1054 + //将原有的附件拼接到form中
  1055 + form.approvalDocument = form.approvalDocument!==null?form.approvalDocument+";"+item.url:item.url;
  1056 + }
  1057 + })
  1058 +
  1059 + this.approvalData.forEach(item => {
  1060 + if (item.raw != null) {
  1061 + formData.append('approvalDataFiles', item.raw)
  1062 + }else{
  1063 + //将原有的附件拼接到form中
  1064 + form.approvalData = form.approvalData!==null?form.approvalData+";"+item.url:item.url;
  1065 + }
  1066 + })
  1067 + this.scenePhoto.forEach(item => {
  1068 + if (item.raw != null) {
  1069 + formData.append('scenePhotoFiles', item.raw)
  1070 + }else{
  1071 + //将原有的附件拼接到form中
  1072 + form.scenePhoto = form.scenePhoto!==null?form.scenePhoto+";"+item.url:item.url;
  1073 + }
  1074 + })
  1075 + this.carWashingFacilitiesImage.forEach(item => {
  1076 + if (item.raw != null) {
  1077 + formData.append('carWashingFacilitiesImageFiles', item.raw)
  1078 + }else{
  1079 + //将原有的附件拼接到form中
  1080 + form.carWashingFacilitiesImage = form.carWashingFacilitiesImage!==null?form.carWashingFacilitiesImage+";"+item.url:item.url;
  1081 + }
  1082 + })
  1083 + this.safetyAssessmentReport.forEach(item => {
  1084 + if (item.raw != null) {
  1085 + formData.append('safetyAssessmentReportFiles', item.raw)
  1086 + }else{
  1087 + //将原有的附件拼接到form中
  1088 + form.safetyAssessmentReport = form.safetyAssessmentReport!==null?form.safetyAssessmentReport+";"+item.url:item.url;
  1089 + }
  1090 + })
  1091 + this.environmentalApproval.forEach(item => {
  1092 + if (item.raw != null) {
  1093 + formData.append('environmentalApprovalFiles', item.raw)
  1094 + }else{
  1095 + //将原有的附件拼接到form中
  1096 + form.environmentalApproval = form.environmentalApproval!==null?form.environmentalApproval+";"+item.url:item.url;
  1097 + }
  1098 + })
  1099 + this.authorization.forEach(item => {
  1100 + if (item.raw != null) {
  1101 + formData.append('authorizationFiles', item.raw)
  1102 + }else{
  1103 + //将原有的附件拼接到form中
  1104 + form.authorization = form.authorization!==null?form.authorization+";"+item.url:item.url;
  1105 + }
  1106 + })
  1107 + this.otherInformation.forEach(item => {
  1108 + if (item.raw != null) {
  1109 + formData.append('otherInformationFiles', item.raw)
  1110 + }else{
  1111 + //将原有的附件拼接到form中
  1112 + form.otherInformation = form.otherInformation!==null?form.otherInformation+";"+item.url:item.url;
  1113 + }
  1114 + })
  1115 + for (let key in form) {
  1116 + formData.append(key, form[key] == null ? "" : form[key])
  1117 + }
  1118 + if (this.form.id != null) {
  1119 + updateDisposalSite(formData).then(response => {
  1120 + this.msgSuccess("修改成功");
  1121 + this.$tab.closePage({path:"/disposalSite/infoEdit"}).then(() => {
  1122 + this.$tab.openPage("处理场所管理", "/tool/disposalSite",{disposalSiteRefresh:1})
  1123 + })
  1124 + });
  1125 + } else {
  1126 + addDisposalSite(formData).then(response => {
  1127 + this.msgSuccess("新增成功");
  1128 + this.$tab.closePage({path:"/disposalSite/info"}).then(() => {
  1129 + this.$tab.openPage("处理场所管理", "/tool/disposalSite",{disposalSiteRefresh:1})
  1130 + })
  1131 + });
  1132 + }
  1133 + }
  1134 + });
  1135 + },
  1136 + /**
  1137 + * 文件改变时,限制文件上传格式和大小
  1138 + * 文件格式只能为docx/doc/pdf/png/jpeg/png/jpg
  1139 + * 大小不超过20M
  1140 + * */
  1141 + fileChange(file, fileList) {
  1142 + let count = 0;
  1143 + for (let i = 0; i < fileList.length; i++) {
  1144 + // console.log(fileList.length)
  1145 + // console.log(this.fileEntityList[i].name+"111"+file.name)
  1146 + if (fileList[i].name == file.name) {
  1147 + count++;
  1148 + if (count == 2) {
  1149 + this.$message({
  1150 + message: '已存在此文件!',
  1151 + type: 'warning'
  1152 + });
  1153 + for (let j = fileList.length; j > 0; j--) {
  1154 + //如果存在此文件,去除新选择的重复文件
  1155 + if (fileList[j - 1].name == file.name) {
  1156 + fileList.splice(j - 1, 1);
  1157 + i--;
  1158 + return false;
  1159 + }
  1160 + }
  1161 + }
  1162 + }
  1163 + }
  1164 + let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase();
  1165 + //格式符合后判断大小
  1166 + if ("jpg,jpeg,png,gif,jfif,pjpeg,pjp,pdf,doc,docx,xls,xlsx".indexOf(fileType) != -1) {
  1167 + let max5M = file.size / 1024 / 1024 < 100;
  1168 + if (!max5M) {
  1169 + this.$message({
  1170 + message: '上传文件大小不得超过100M!',
  1171 + type: 'warning'
  1172 + });
  1173 + fileList = fileList.splice(fileList.length - 1, 1);
  1174 + } else {
  1175 + //符合条件后进行添加
  1176 + this.approvalDocument = fileList
  1177 + }
  1178 + } else {
  1179 + this.$message({
  1180 + message: '上传文件只能是.jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx格式!',
  1181 + type: 'warning'
  1182 + });
  1183 + fileList = fileList.splice(fileList.length - 1, 1);
  1184 + }
  1185 + },
  1186 + fileChange1(file, fileList) {
  1187 + let count = 0;
  1188 + for (let i = 0; i < fileList.length; i++) {
  1189 + // console.log(fileList.length)
  1190 + // console.log(this.fileEntityList[i].name+"111"+file.name)
  1191 + if (fileList[i].name == file.name) {
  1192 + count++;
  1193 + if (count == 2) {
  1194 + this.$message({
  1195 + message: '已存在此文件!',
  1196 + type: 'warning'
  1197 + });
  1198 + for (let j = fileList.length; j > 0; j--) {
  1199 + //如果存在此文件,去除新选择的重复文件
  1200 + if (fileList[j - 1].name == file.name) {
  1201 + fileList.splice(j - 1, 1);
  1202 + i--;
  1203 + return false;
  1204 + }
  1205 + }
  1206 + }
  1207 + }
  1208 + }
  1209 + let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase();
  1210 + //格式符合后判断大小
  1211 + if ("jpg,jpeg,png,gif,jfif,pjpeg,pjp,pdf,doc,docx,xls,xlsx".indexOf(fileType) != -1) {
  1212 + let max5M = file.size / 1024 / 1024 < 100;
  1213 + if (!max5M) {
  1214 + this.$message({
  1215 + message: '上传文件大小不得超过100M!',
  1216 + type: 'warning'
  1217 + });
  1218 + fileList = fileList.splice(fileList.length - 1, 1);
  1219 + } else {
  1220 + //符合条件后进行添加
  1221 + this.approvalData = fileList
  1222 + }
  1223 + } else {
  1224 + this.$message({
  1225 + message: '上传文件只能是.jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx格式!',
  1226 + type: 'warning'
  1227 + });
  1228 + fileList = fileList.splice(fileList.length - 1, 1);
  1229 + }
  1230 + },
  1231 + fileChange2(file, fileList) {
  1232 + let count = 0;
  1233 + for (let i = 0; i < fileList.length; i++) {
  1234 + // console.log(fileList.length)
  1235 + // console.log(this.fileEntityList[i].name+"111"+file.name)
  1236 + if (fileList[i].name == file.name) {
  1237 + count++;
  1238 + if (count == 2) {
  1239 + this.$message({
  1240 + message: '已存在此文件!',
  1241 + type: 'warning'
  1242 + });
  1243 + for (let j = fileList.length; j > 0; j--) {
  1244 + //如果存在此文件,去除新选择的重复文件
  1245 + if (fileList[j - 1].name == file.name) {
  1246 + fileList.splice(j - 1, 1);
  1247 + i--;
  1248 + return false;
  1249 + }
  1250 + }
  1251 + }
  1252 + }
  1253 + }
  1254 + let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase();
  1255 + //格式符合后判断大小
  1256 + if ("jpg,jpeg,png,gif,jfif,pjpeg,pjp,pdf,doc,docx,xls,xlsx".indexOf(fileType) != -1) {
  1257 + let max5M = file.size / 1024 / 1024 < 100;
  1258 + if (!max5M) {
  1259 + this.$message({
  1260 + message: '上传文件大小不得超过100M!',
  1261 + type: 'warning'
  1262 + });
  1263 + fileList = fileList.splice(fileList.length - 1, 1);
  1264 + } else {
  1265 + //符合条件后进行添加
  1266 + this.scenePhoto = fileList
  1267 + }
  1268 + } else {
  1269 + this.$message({
  1270 + message: '上传文件只能是.jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx格式!',
  1271 + type: 'warning'
  1272 + });
  1273 + fileList = fileList.splice(fileList.length - 1, 1);
  1274 + }
  1275 + },
  1276 + fileChange3(file, fileList) {
  1277 + let count = 0;
  1278 + for (let i = 0; i < fileList.length; i++) {
  1279 + // console.log(fileList.length)
  1280 + // console.log(this.fileEntityList[i].name+"111"+file.name)
  1281 + if (fileList[i].name == file.name) {
  1282 + count++;
  1283 + if (count == 2) {
  1284 + this.$message({
  1285 + message: '已存在此文件!',
  1286 + type: 'warning'
  1287 + });
  1288 + for (let j = fileList.length; j > 0; j--) {
  1289 + //如果存在此文件,去除新选择的重复文件
  1290 + if (fileList[j - 1].name == file.name) {
  1291 + fileList.splice(j - 1, 1);
  1292 + i--;
  1293 + return false;
  1294 + }
  1295 + }
  1296 + }
  1297 + }
  1298 + }
  1299 + let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase();
  1300 + //格式符合后判断大小
  1301 + if ("jpg,jpeg,png,gif,jfif,pjpeg,pjp,pdf,doc,docx,xls,xlsx".indexOf(fileType) != -1) {
  1302 + let max5M = file.size / 1024 / 1024 < 100;
  1303 + if (!max5M) {
  1304 + this.$message({
  1305 + message: '上传文件大小不得超过100M!',
  1306 + type: 'warning'
  1307 + });
  1308 + fileList = fileList.splice(fileList.length - 1, 1);
  1309 + } else {
  1310 + //符合条件后进行添加
  1311 + this.carWashingFacilitiesImage = fileList
  1312 + }
  1313 + } else {
  1314 + this.$message({
  1315 + message: '上传文件只能是.jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx格式!',
  1316 + type: 'warning'
  1317 + });
  1318 + fileList = fileList.splice(fileList.length - 1, 1);
  1319 + }
  1320 + },
  1321 + fileChange4(file, fileList) {
  1322 + let count = 0;
  1323 + for (let i = 0; i < fileList.length; i++) {
  1324 + // console.log(fileList.length)
  1325 + // console.log(this.fileEntityList[i].name+"111"+file.name)
  1326 + if (fileList[i].name == file.name) {
  1327 + count++;
  1328 + if (count == 2) {
  1329 + this.$message({
  1330 + message: '已存在此文件!',
  1331 + type: 'warning'
  1332 + });
  1333 + for (let j = fileList.length; j > 0; j--) {
  1334 + //如果存在此文件,去除新选择的重复文件
  1335 + if (fileList[j - 1].name == file.name) {
  1336 + fileList.splice(j - 1, 1);
  1337 + i--;
  1338 + return false;
  1339 + }
  1340 + }
  1341 + }
  1342 + }
  1343 + }
  1344 + let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase();
  1345 + //格式符合后判断大小
  1346 + if ("jpg,jpeg,png,gif,jfif,pjpeg,pjp,pdf,doc,docx,xls,xlsx".indexOf(fileType) != -1) {
  1347 + let max5M = file.size / 1024 / 1024 < 100;
  1348 + if (!max5M) {
  1349 + this.$message({
  1350 + message: '上传文件大小不得超过100M!',
  1351 + type: 'warning'
  1352 + });
  1353 + fileList = fileList.splice(fileList.length - 1, 1);
  1354 + } else {
  1355 + //符合条件后进行添加
  1356 + this.safetyAssessmentReport = fileList
  1357 + }
  1358 + } else {
  1359 + this.$message({
  1360 + message: '上传文件只能是.jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx格式!',
  1361 + type: 'warning'
  1362 + });
  1363 + fileList = fileList.splice(fileList.length - 1, 1);
  1364 + }
  1365 + },
  1366 + fileChange5(file, fileList) {
  1367 + let count = 0;
  1368 + for (let i = 0; i < fileList.length; i++) {
  1369 + // console.log(fileList.length)
  1370 + // console.log(this.fileEntityList[i].name+"111"+file.name)
  1371 + if (fileList[i].name == file.name) {
  1372 + count++;
  1373 + if (count == 2) {
  1374 + this.$message({
  1375 + message: '已存在此文件!',
  1376 + type: 'warning'
  1377 + });
  1378 + for (let j = fileList.length; j > 0; j--) {
  1379 + //如果存在此文件,去除新选择的重复文件
  1380 + if (fileList[j - 1].name == file.name) {
  1381 + fileList.splice(j - 1, 1);
  1382 + i--;
  1383 + return false;
  1384 + }
  1385 + }
  1386 + }
  1387 + }
  1388 + }
  1389 + let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase();
  1390 + //格式符合后判断大小
  1391 + if ("jpg,jpeg,png,gif,jfif,pjpeg,pjp,pdf,doc,docx,xls,xlsx".indexOf(fileType) != -1) {
  1392 + let max5M = file.size / 1024 / 1024 < 100;
  1393 + if (!max5M) {
  1394 + this.$message({
  1395 + message: '上传文件大小不得超过100M!',
  1396 + type: 'warning'
  1397 + });
  1398 + fileList = fileList.splice(fileList.length - 1, 1);
  1399 + } else {
  1400 + //符合条件后进行添加
  1401 + this.environmentalApproval = fileList
  1402 + }
  1403 + } else {
  1404 + this.$message({
  1405 + message: '上传文件只能是.jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx格式!',
  1406 + type: 'warning'
  1407 + });
  1408 + fileList = fileList.splice(fileList.length - 1, 1);
  1409 + }
  1410 + },
  1411 + fileChange6(file, fileList) {
  1412 + let count = 0;
  1413 + for (let i = 0; i < fileList.length; i++) {
  1414 + // console.log(fileList.length)
  1415 + // console.log(this.fileEntityList[i].name+"111"+file.name)
  1416 + if (fileList[i].name == file.name) {
  1417 + count++;
  1418 + if (count == 2) {
  1419 + this.$message({
  1420 + message: '已存在此文件!',
  1421 + type: 'warning'
  1422 + });
  1423 + for (let j = fileList.length; j > 0; j--) {
  1424 + //如果存在此文件,去除新选择的重复文件
  1425 + if (fileList[j - 1].name == file.name) {
  1426 + fileList.splice(j - 1, 1);
  1427 + i--;
  1428 + return false;
  1429 + }
  1430 + }
  1431 + }
  1432 + }
  1433 + }
  1434 + let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase();
  1435 + //格式符合后判断大小
  1436 + if ("jpg,jpeg,png,gif,jfif,pjpeg,pjp,pdf,doc,docx,xls,xlsx".indexOf(fileType) != -1) {
  1437 + let max5M = file.size / 1024 / 1024 < 100;
  1438 + if (!max5M) {
  1439 + this.$message({
  1440 + message: '上传文件大小不得超过100M!',
  1441 + type: 'warning'
  1442 + });
  1443 + fileList = fileList.splice(fileList.length - 1, 1);
  1444 + } else {
  1445 + //符合条件后进行添加
  1446 + this.authorization = fileList
  1447 + }
  1448 + } else {
  1449 + this.$message({
  1450 + message: '上传文件只能是.jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx格式!',
  1451 + type: 'warning'
  1452 + });
  1453 + fileList = fileList.splice(fileList.length - 1, 1);
  1454 + }
  1455 + },
  1456 + fileChange7(file, fileList) {
  1457 + let count = 0;
  1458 + for (let i = 0; i < fileList.length; i++) {
  1459 + // console.log(fileList.length)
  1460 + // console.log(this.fileEntityList[i].name+"111"+file.name)
  1461 + if (fileList[i].name == file.name) {
  1462 + count++;
  1463 + if (count == 2) {
  1464 + this.$message({
  1465 + message: '已存在此文件!',
  1466 + type: 'warning'
  1467 + });
  1468 + for (let j = fileList.length; j > 0; j--) {
  1469 + //如果存在此文件,去除新选择的重复文件
  1470 + if (fileList[j - 1].name == file.name) {
  1471 + fileList.splice(j - 1, 1);
  1472 + i--;
  1473 + return false;
  1474 + }
  1475 + }
  1476 + }
  1477 + }
  1478 + }
  1479 + let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase();
  1480 + //格式符合后判断大小
  1481 + if ("jpg,jpeg,png,gif,jfif,pjpeg,pjp,pdf,doc,docx,xls,xlsx".indexOf(fileType) != -1) {
  1482 + let max5M = file.size / 1024 / 1024 < 100;
  1483 + if (!max5M) {
  1484 + this.$message({
  1485 + message: '上传文件大小不得超过100M!',
  1486 + type: 'warning'
  1487 + });
  1488 + fileList = fileList.splice(fileList.length - 1, 1);
  1489 + } else {
  1490 + //符合条件后进行添加
  1491 + this.otherInformation = fileList
  1492 + }
  1493 + } else {
  1494 + this.$message({
  1495 + message: '上传文件只能是.jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx格式!',
  1496 + type: 'warning'
  1497 + });
  1498 + fileList = fileList.splice(fileList.length - 1, 1);
  1499 + }
  1500 + },
  1501 + }
  1502 +};
  1503 +</script>
  1504 +<style lang="scss" scoped>
  1505 +.upload_lable{
  1506 + border-right: 1px solid #dcdfe6;
  1507 + padding: 27px 30px;
  1508 + background: #fafafa;
  1509 + text-align: center;
  1510 +}
  1511 +.upload_btn{
  1512 + max-height: 106px;
  1513 +}
  1514 +.upload_close{
  1515 + position: absolute;
  1516 + left: 105px;
  1517 + z-index:99;
  1518 + top:-1px;
  1519 + font-size:18px;
  1520 + color:red;
  1521 +}
  1522 +.upload_close_file{
  1523 + position: absolute;
  1524 + left: 80px;
  1525 + z-index:99;
  1526 + top:-1px;
  1527 + font-size:18px;
  1528 + color:red;
  1529 +}
  1530 +.upload_div_image{
  1531 + display: inline-block;
  1532 + width: 110px;
  1533 + height: 95px;
  1534 + position: relative;
  1535 + float: left;
  1536 + margin-left: 5px;
  1537 +}
  1538 +.upload_div_file{
  1539 + display: inline-block;
  1540 + width: 110px;
  1541 + height: 95px;
  1542 + text-align: center;
  1543 + float:left;
  1544 + margin: 5px;
  1545 + position: relative;
  1546 +}
  1547 +.serach_map{
  1548 + position: absolute;
  1549 + top: 100px;
  1550 + left: 25px;
  1551 + z-index: 999;
  1552 + background: #fff;
  1553 + padding: 10px;
  1554 + border-radius: 5px;
  1555 + box-shadow: 0 0 10px rgba(0,0,0,.2);
  1556 +}
  1557 +</style>
... ...