Commit 28de91f0272126e7c119bdd102e476719e77b435
1 parent
6679a92c
建筑垃圾-基础数据
Showing
49 changed files
with
8679 additions
and
583 deletions
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
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> | ... | ... |
trash-ui/src/views/unit/driver/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="108px"> | |
| 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="companyName"> | |
| 14 | + <el-input | |
| 15 | + v-model="queryParams.companyName" | |
| 16 | + placeholder="请输入所属公司" | |
| 17 | + clearable | |
| 18 | + size="small" | |
| 19 | + @keyup.enter.native="handleQuery" | |
| 20 | + /> | |
| 21 | + </el-form-item> | |
| 22 | + | |
| 23 | + <el-form-item label="审批状态" prop="status"> | |
| 24 | + <el-select v-model="queryParams.status" placeholder="请选择审批状态" clearable size="small"> | |
| 25 | + <el-option label="审批中" value="0" /> | |
| 26 | + <el-option label="审批通过" value="1" /> | |
| 27 | + <el-option label="被驳回" value="2" /> | |
| 28 | + </el-select> | |
| 29 | + </el-form-item> | |
| 30 | + <el-form-item> | |
| 31 | + <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | |
| 32 | + <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | |
| 33 | + </el-form-item> | |
| 34 | + </el-form> | |
| 35 | + | |
| 36 | + <el-row :gutter="10" class="mb8"> | |
| 37 | + <el-col :span="1.5"> | |
| 38 | + <el-button | |
| 39 | + type="primary" | |
| 40 | + icon="el-icon-plus" | |
| 41 | + size="mini" | |
| 42 | + @click="handleAdd" | |
| 43 | + v-hasPermi="['unit:driver:add']" | |
| 44 | + >新增</el-button> | |
| 45 | + </el-col> | |
| 46 | + <el-col :span="1.5"> | |
| 47 | + <el-button | |
| 48 | + type="success" | |
| 49 | + icon="el-icon-edit" | |
| 50 | + size="mini" | |
| 51 | + :disabled="single" | |
| 52 | + @click="handleUpdate" | |
| 53 | + v-hasPermi="['unit:driver:edit']" | |
| 54 | + >修改</el-button> | |
| 55 | + </el-col> | |
| 56 | + <el-col :span="1.5"> | |
| 57 | + <el-button | |
| 58 | + type="danger" | |
| 59 | + icon="el-icon-delete" | |
| 60 | + size="mini" | |
| 61 | + :disabled="multiple" | |
| 62 | + @click="handleDelete" | |
| 63 | + v-hasPermi="['unit:driver:remove']" | |
| 64 | + >删除</el-button> | |
| 65 | + </el-col> | |
| 66 | + <el-col :span="1.5"> | |
| 67 | + <el-button | |
| 68 | + type="warning" | |
| 69 | + icon="el-icon-download" | |
| 70 | + size="mini" | |
| 71 | + @click="handleExport" | |
| 72 | + v-hasPermi="['unit:driver:export']" | |
| 73 | + >导出</el-button> | |
| 74 | + </el-col> | |
| 75 | + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> | |
| 76 | + </el-row> | |
| 77 | + | |
| 78 | + <el-table v-loading="loading" :data="driverList" @selection-change="handleSelectionChange"> | |
| 79 | + <el-table-column type="selection" width="55" align="center" /> | |
| 80 | + <el-table-column type="index" width="55" align="center" label="序号"/> | |
| 81 | + <el-table-column label="姓名" align="center" prop="name" /> | |
| 82 | + <el-table-column label="身份证" align="center" prop="identityCard" /> | |
| 83 | + <el-table-column label="所属公司" align="center" prop="companyName" /> | |
| 84 | + <el-table-column label="从业资格证有效期" align="center" prop="professionalQualificationBeginDate" width="200"> | |
| 85 | + <template slot-scope="scope"> | |
| 86 | + <span>{{ parseTime(scope.row.professionalQualificationBeginDate, '{y}-{m}-{d}') +' ~ '+ parseTime(scope.row.professionalQualificationEndDate, '{y}-{m}-{d}') }}</span> | |
| 87 | + </template> | |
| 88 | + </el-table-column> | |
| 89 | +<!-- <el-table-column label="从业资格证有效期终" align="center" prop="professionalQualificationEndDate" width="180">--> | |
| 90 | +<!-- <template slot-scope="scope">--> | |
| 91 | +<!-- <span>{{ parseTime(scope.row.professionalQualificationEndDate, '{y}-{m}-{d}') }}</span>--> | |
| 92 | +<!-- </template>--> | |
| 93 | +<!-- </el-table-column>--> | |
| 94 | + <el-table-column label="驾驶证有效期" align="center" prop="drivingLicenceBeginDate" width="200"> | |
| 95 | + <template slot-scope="scope"> | |
| 96 | + <span>{{ parseTime(scope.row.drivingLicenceBeginDate, '{y}-{m}-{d}')+' ~ '+parseTime(scope.row.drivingLicenceEndDate, '{y}-{m}-{d}') }}</span> | |
| 97 | + </template> | |
| 98 | + </el-table-column> | |
| 99 | +<!-- <el-table-column label="驾驶证有效期终" align="center" prop="drivingLicenceEndDate" width="180">--> | |
| 100 | +<!-- <template slot-scope="scope">--> | |
| 101 | +<!-- <span>{{ parseTime(scope.row.drivingLicenceEndDate, '{y}-{m}-{d}') }}</span>--> | |
| 102 | +<!-- </template>--> | |
| 103 | +<!-- </el-table-column>--> | |
| 104 | + <el-table-column label="审批状态" align="center" prop="status" > | |
| 105 | + <template slot-scope="scope"> | |
| 106 | + {{ parseStatus(scope.row.status)}} | |
| 107 | + </template> | |
| 108 | + </el-table-column> | |
| 109 | + <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | |
| 110 | + <template slot-scope="scope"> | |
| 111 | + <el-button | |
| 112 | + size="mini" | |
| 113 | + type="text" | |
| 114 | + icon="el-icon-edit" | |
| 115 | + @click="handleUpdate(scope.row)" | |
| 116 | + v-hasPermi="['unit:driver:edit']" | |
| 117 | + >修改</el-button> | |
| 118 | + <el-button | |
| 119 | + size="mini" | |
| 120 | + type="text" | |
| 121 | + icon="el-icon-delete" | |
| 122 | + @click="handleDelete(scope.row)" | |
| 123 | + v-hasPermi="['unit:driver:remove']" | |
| 124 | + >删除</el-button> | |
| 125 | + </template> | |
| 126 | + </el-table-column> | |
| 127 | + </el-table> | |
| 128 | + | |
| 129 | + <pagination | |
| 130 | + v-show="total>0" | |
| 131 | + :total="total" | |
| 132 | + :page.sync="queryParams.pageNum" | |
| 133 | + :limit.sync="queryParams.pageSize" | |
| 134 | + @pagination="getList" | |
| 135 | + /> | |
| 136 | + </div> | |
| 137 | +</template> | |
| 138 | + | |
| 139 | +<script> | |
| 140 | +import { listDriver, getDriver, delDriver, addDriver, updateDriver, exportDriver } from "@/api/unit/driver"; | |
| 141 | +import Editor from '@/components/Editor'; | |
| 142 | + | |
| 143 | +export default { | |
| 144 | + name: "Driver", | |
| 145 | + components: { Editor }, | |
| 146 | + data() { | |
| 147 | + return { | |
| 148 | + // 遮罩层 | |
| 149 | + loading: true, | |
| 150 | + // 选中数组 | |
| 151 | + ids: [], | |
| 152 | + // 非单个禁用 | |
| 153 | + single: true, | |
| 154 | + // 非多个禁用 | |
| 155 | + multiple: true, | |
| 156 | + // 显示搜索条件 | |
| 157 | + showSearch: true, | |
| 158 | + // 总条数 | |
| 159 | + total: 0, | |
| 160 | + // 驾驶员管理表格数据 | |
| 161 | + driverList: [], | |
| 162 | + // 弹出层标题 | |
| 163 | + title: "", | |
| 164 | + // 是否显示弹出层 | |
| 165 | + open: false, | |
| 166 | + // 查询参数 | |
| 167 | + queryParams: { | |
| 168 | + pageNum: 1, | |
| 169 | + pageSize: 10, | |
| 170 | + name: null, | |
| 171 | + identityCard: null, | |
| 172 | + companyId: null, | |
| 173 | + professionalQualificationBeginDate: null, | |
| 174 | + professionalQualificationEndDate: null, | |
| 175 | + drivingLicenceBeginDate: null, | |
| 176 | + drivingLicenceEndDate: null, | |
| 177 | + safetyTrainingDate: null, | |
| 178 | + safetyTrainingContent: null, | |
| 179 | + drivingLicence: null, | |
| 180 | + professionalQualification: null, | |
| 181 | + safetyTraining: null, | |
| 182 | + status: null, | |
| 183 | + photographOne: null, | |
| 184 | + photographTwo: null | |
| 185 | + }, | |
| 186 | + // 表单参数 | |
| 187 | + form: {}, | |
| 188 | + // 表单校验 | |
| 189 | + rules: { | |
| 190 | + } | |
| 191 | + }; | |
| 192 | + }, | |
| 193 | + created() { | |
| 194 | + this.getList(); | |
| 195 | + }, | |
| 196 | + methods: { | |
| 197 | + /** 查询驾驶员管理列表 */ | |
| 198 | + getList() { | |
| 199 | + this.loading = true; | |
| 200 | + listDriver(this.queryParams).then(response => { | |
| 201 | + this.driverList = response.rows; | |
| 202 | + this.total = response.total; | |
| 203 | + this.loading = false; | |
| 204 | + }); | |
| 205 | + }, | |
| 206 | + | |
| 207 | + /** 搜索按钮操作 */ | |
| 208 | + handleQuery() { | |
| 209 | + this.queryParams.pageNum = 1; | |
| 210 | + this.getList(); | |
| 211 | + }, | |
| 212 | + /** 重置按钮操作 */ | |
| 213 | + resetQuery() { | |
| 214 | + this.resetForm("queryForm"); | |
| 215 | + this.handleQuery(); | |
| 216 | + }, | |
| 217 | + // 多选框选中数据 | |
| 218 | + handleSelectionChange(selection) { | |
| 219 | + this.ids = selection.map(item => item.id) | |
| 220 | + this.single = selection.length!==1 | |
| 221 | + this.multiple = !selection.length | |
| 222 | + }, | |
| 223 | + /** 新增按钮操作 */ | |
| 224 | + handleAdd() { | |
| 225 | + this.$tab.openPage("新增驾驶员","/driverInfo/info",{driverInfoRefresh:0}); | |
| 226 | + }, | |
| 227 | + /** 修改按钮操作 */ | |
| 228 | + handleUpdate(row) { | |
| 229 | + const id = row.id || this.ids | |
| 230 | + this.$tab.openPage("修改驾驶员","/driverInfo/infoEdit",{driverInfoId: id,driverInfoRefresh:0}); | |
| 231 | + }, | |
| 232 | + /** 删除按钮操作 */ | |
| 233 | + handleDelete(row) { | |
| 234 | + const ids = row.id || this.ids; | |
| 235 | + this.$confirm('是否确认删除驾驶员管理编号为"' + ids + '"的数据项?', "警告", { | |
| 236 | + confirmButtonText: "确定", | |
| 237 | + cancelButtonText: "取消", | |
| 238 | + type: "warning" | |
| 239 | + }).then(function() { | |
| 240 | + return delDriver(ids); | |
| 241 | + }).then(() => { | |
| 242 | + this.getList(); | |
| 243 | + this.msgSuccess("删除成功"); | |
| 244 | + }) | |
| 245 | + }, | |
| 246 | + /** 导出按钮操作 */ | |
| 247 | + handleExport() { | |
| 248 | + const queryParams = this.queryParams; | |
| 249 | + this.$confirm('是否确认导出所有驾驶员管理数据项?', "警告", { | |
| 250 | + confirmButtonText: "确定", | |
| 251 | + cancelButtonText: "取消", | |
| 252 | + type: "warning" | |
| 253 | + }).then(function() { | |
| 254 | + return exportDriver(queryParams); | |
| 255 | + }).then(response => { | |
| 256 | + this.download(response.msg); | |
| 257 | + }) | |
| 258 | + } | |
| 259 | + } | |
| 260 | +}; | |
| 261 | +</script> | ... | ... |
trash-ui/src/views/unit/driver/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="identityCard"> | |
| 17 | + <el-input v-model="form.identityCard" placeholder="请输入身份证" /> | |
| 18 | + </el-form-item> | |
| 19 | + </el-col> | |
| 20 | + <el-col :span="7"> | |
| 21 | + <el-row> | |
| 22 | + <el-col :span="8"> | |
| 23 | + <el-form-item label="安全教育培训日期" prop="safetyTrainingDate"> | |
| 24 | + <el-date-picker clearable size="small" style="width: 100%" | |
| 25 | + v-model="form.safetyTrainingDate" | |
| 26 | + type="date" | |
| 27 | + value-format="yyyy-MM-dd" | |
| 28 | + placeholder="选择日期"> | |
| 29 | + </el-date-picker> | |
| 30 | + </el-form-item> | |
| 31 | + </el-col> | |
| 32 | + <el-col :span="16"> | |
| 33 | + <el-form-item label="安全教育培训内容"> | |
| 34 | + <el-input v-model="form.safetyTrainingContent" placeholder="请输入内容"/> | |
| 35 | + </el-form-item> | |
| 36 | + </el-col> | |
| 37 | + </el-row> | |
| 38 | + </el-col> | |
| 39 | + </el-row> | |
| 40 | + <el-row :gutter="30"> | |
| 41 | + | |
| 42 | + | |
| 43 | + <el-col :span="7"> | |
| 44 | + <el-form-item label="从业资格证有效期起" prop="professionalQualificationBeginDate"> | |
| 45 | + <el-date-picker clearable size="small" style="width: 100%" | |
| 46 | + v-model="form.professionalQualificationBeginDate" | |
| 47 | + type="date" | |
| 48 | + value-format="yyyy-MM-dd" | |
| 49 | + placeholder="选择从业资格证有效期起"> | |
| 50 | + </el-date-picker> | |
| 51 | + </el-form-item> | |
| 52 | + </el-col> | |
| 53 | + <el-col :span="7"> | |
| 54 | + <el-form-item label="从业资格证有效期终" prop="professionalQualificationEndDate"> | |
| 55 | + <el-date-picker clearable size="small" style="width: 100%" | |
| 56 | + v-model="form.professionalQualificationEndDate" | |
| 57 | + type="date" | |
| 58 | + value-format="yyyy-MM-dd" | |
| 59 | + placeholder="选择从业资格证有效期终"> | |
| 60 | + </el-date-picker> | |
| 61 | + </el-form-item> | |
| 62 | + </el-col> | |
| 63 | + <el-col :span="7"> | |
| 64 | + <el-form-item label="所属公司" prop="companyId"> | |
| 65 | + <el-select v-model="form.companyId" placeholder="请选择所属公司" clearable style="width: 100%;"> | |
| 66 | + <el-option v-for="(item,index) in enterpriseList" :label="item.name" :value="item.id" :key="index"/> | |
| 67 | + </el-select> | |
| 68 | + </el-form-item> | |
| 69 | + </el-col> | |
| 70 | + </el-row> | |
| 71 | + <el-row :gutter="30"> | |
| 72 | + <el-col :span="7"> | |
| 73 | + <el-form-item label="驾驶证有效期起" prop="drivingLicenceBeginDate"> | |
| 74 | + <el-date-picker clearable size="small" style="width: 100%" | |
| 75 | + v-model="form.drivingLicenceBeginDate" | |
| 76 | + type="date" | |
| 77 | + value-format="yyyy-MM-dd" | |
| 78 | + placeholder="选择驾驶证有效期起"> | |
| 79 | + </el-date-picker> | |
| 80 | + </el-form-item> | |
| 81 | + | |
| 82 | + | |
| 83 | + </el-col> | |
| 84 | + <el-col :span="7"> | |
| 85 | + <el-form-item label="驾驶证有效期终" prop="drivingLicenceEndDate"> | |
| 86 | + <el-date-picker clearable size="small" style="width: 100%" | |
| 87 | + v-model="form.drivingLicenceEndDate" | |
| 88 | + type="date" | |
| 89 | + value-format="yyyy-MM-dd" | |
| 90 | + placeholder="选择驾驶证有效期终"> | |
| 91 | + </el-date-picker> | |
| 92 | + </el-form-item> | |
| 93 | + | |
| 94 | + </el-col> | |
| 95 | + <el-col :span="7"> | |
| 96 | + </el-col> | |
| 97 | + </el-row> | |
| 98 | + | |
| 99 | + <el-row :gutter="30"> | |
| 100 | + <el-col :span="14"> | |
| 101 | + <el-form-item label="备注" prop="remark"> | |
| 102 | + <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" /> | |
| 103 | + </el-form-item> | |
| 104 | + </el-col> | |
| 105 | + </el-row> | |
| 106 | + <el-row style="border: 1px solid #dcdfe6;border-radius: 2px;"> | |
| 107 | + <el-col :span="3"> | |
| 108 | + <div class="upload_lable"> | |
| 109 | + <span style="color:red;">*</span>驾驶证 | |
| 110 | + <el-upload | |
| 111 | + ref="upload" | |
| 112 | + action="" | |
| 113 | + accept=".jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx" | |
| 114 | + :on-change="fileChange" | |
| 115 | + :auto-upload="false" | |
| 116 | + :show-file-list="false" | |
| 117 | + multiple | |
| 118 | + :file-list="drivingLicence"> | |
| 119 | + | |
| 120 | + <el-button size="small" type="primary" icon="el-icon-upload">上传附件</el-button> | |
| 121 | + </el-upload> | |
| 122 | + </div> | |
| 123 | + </el-col> | |
| 124 | + <el-col :span="21"> | |
| 125 | + <div class="upload_btn"> | |
| 126 | + <div v-for="(item,index) in drivingLicence"> | |
| 127 | + <div v-if="!/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_image"> | |
| 128 | + <div class="upload_close" @click="drivingLicence.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div> | |
| 129 | + <el-image | |
| 130 | + style="width: 110px; height: 95px; margin: 5px;float:left;" | |
| 131 | + :src="createUrl(item)" | |
| 132 | + :preview-src-list="[createUrl(item)]" | |
| 133 | + :z-index="999"> | |
| 134 | + </el-image> | |
| 135 | + </div> | |
| 136 | + <div v-if="/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_file"> | |
| 137 | + <div class="upload_close_file" @click="drivingLicence.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div> | |
| 138 | + <span @click="tempDownload(item)"><el-icon class="el-icon-document-add" style="font-size:70px;"></el-icon></span> | |
| 139 | + <div style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" @click="tempDownload(item)">{{ item.name }}</div> | |
| 140 | + </div> | |
| 141 | + </div> | |
| 142 | + </div> | |
| 143 | + </el-col> | |
| 144 | + </el-row> | |
| 145 | + <el-row style="border: 1px solid #dcdfe6;border-radius: 2px;"> | |
| 146 | + <el-col :span="3"> | |
| 147 | + <div class="upload_lable"> | |
| 148 | + <span style="color:red;">*</span>从业资格证 | |
| 149 | + <el-upload | |
| 150 | + ref="upload" | |
| 151 | + action="" | |
| 152 | + accept=".jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx" | |
| 153 | + :on-change="fileChange1" | |
| 154 | + :auto-upload="false" | |
| 155 | + :show-file-list="false" | |
| 156 | + multiple | |
| 157 | + :file-list="professionalQualification"> | |
| 158 | + <el-button size="small" type="primary" icon="el-icon-upload">上传附件</el-button> | |
| 159 | + </el-upload> | |
| 160 | + </div> | |
| 161 | + </el-col> | |
| 162 | + <el-col :span="21"> | |
| 163 | + <div class="upload_btn"> | |
| 164 | + <div v-for="(item,index) in professionalQualification"> | |
| 165 | + <div v-if="!/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_image"> | |
| 166 | + <div class="upload_close" @click="professionalQualification.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div> | |
| 167 | + <el-image | |
| 168 | + style="width: 110px; height: 95px; margin: 5px;float:left;" | |
| 169 | + :src="createUrl(item)" | |
| 170 | + :preview-src-list="[createUrl(item)]" | |
| 171 | + :z-index="999"> | |
| 172 | + </el-image> | |
| 173 | + </div> | |
| 174 | + <div v-if="/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_file"> | |
| 175 | + <div class="upload_close_file" @click="professionalQualification.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div> | |
| 176 | + <span @click="tempDownload(item)"><el-icon class="el-icon-document-add" style="font-size:70px;"></el-icon></span> | |
| 177 | + <div style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" @click="tempDownload(item)">{{ item.name }}</div> | |
| 178 | + </div> | |
| 179 | + </div> | |
| 180 | + </div> | |
| 181 | + </el-col> | |
| 182 | + </el-row> | |
| 183 | + <el-row style="border: 1px solid #dcdfe6;border-radius: 2px;"> | |
| 184 | + <el-col :span="3"> | |
| 185 | + <div class="upload_lable"> | |
| 186 | + <span style="color:red;">*</span>安全教育培训结业证明 | |
| 187 | + <el-upload | |
| 188 | + ref="upload" | |
| 189 | + action="" | |
| 190 | + accept=".jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx" | |
| 191 | + :on-change="fileChange2" | |
| 192 | + :auto-upload="false" | |
| 193 | + :show-file-list="false" | |
| 194 | + multiple | |
| 195 | + :file-list="safetyTraining"> | |
| 196 | + <el-button size="small" type="primary" icon="el-icon-upload">上传附件</el-button> | |
| 197 | + </el-upload> | |
| 198 | + </div> | |
| 199 | + </el-col> | |
| 200 | + <el-col :span="21"> | |
| 201 | + <div class="upload_btn"> | |
| 202 | + <div v-for="(item,index) in safetyTraining"> | |
| 203 | + <div v-if="!/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_image"> | |
| 204 | + <div class="upload_close" @click="safetyTraining.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div> | |
| 205 | + <el-image | |
| 206 | + style="width: 110px; height: 95px; margin: 5px;float:left;" | |
| 207 | + :src="createUrl(item)" | |
| 208 | + :preview-src-list="[createUrl(item)]" | |
| 209 | + :z-index="999"> | |
| 210 | + </el-image> | |
| 211 | + </div> | |
| 212 | + <div v-if="/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_file"> | |
| 213 | + <div class="upload_close_file" @click="safetyTraining.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div> | |
| 214 | + <span @click="tempDownload(item)"><el-icon class="el-icon-document-add" style="font-size:70px;"></el-icon></span> | |
| 215 | + <div style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" @click="tempDownload(item)">{{ item.name }}</div> | |
| 216 | + </div> | |
| 217 | + </div> | |
| 218 | + </div> | |
| 219 | + </el-col> | |
| 220 | + </el-row> | |
| 221 | + <el-row style="border: 1px solid #dcdfe6;border-radius: 2px;"> | |
| 222 | + <el-col :span="3"> | |
| 223 | + <div class="upload_lable"> | |
| 224 | + <span style="color:red;">*</span>一寸免冠照片1 | |
| 225 | + <el-upload | |
| 226 | + ref="upload" | |
| 227 | + action="" | |
| 228 | + accept=".jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx" | |
| 229 | + :on-change="fileChange3" | |
| 230 | + :auto-upload="false" | |
| 231 | + :show-file-list="false" | |
| 232 | + multiple | |
| 233 | + :file-list="photographOne"> | |
| 234 | + <el-button size="small" type="primary" icon="el-icon-upload">上传附件</el-button> | |
| 235 | + </el-upload> | |
| 236 | + </div> | |
| 237 | + </el-col> | |
| 238 | + <el-col :span="21"> | |
| 239 | + <div class="upload_btn"> | |
| 240 | + <div v-for="(item,index) in photographOne"> | |
| 241 | + <div v-if="!/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_image"> | |
| 242 | + <div class="upload_close" @click="photographOne.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div> | |
| 243 | + <el-image | |
| 244 | + style="width: 110px; height: 95px; margin: 5px;float:left;" | |
| 245 | + :src="createUrl(item)" | |
| 246 | + :preview-src-list="[createUrl(item)]" | |
| 247 | + :z-index="999"> | |
| 248 | + </el-image> | |
| 249 | + </div> | |
| 250 | + <div v-if="/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_file"> | |
| 251 | + <div class="upload_close_file" @click="photographOne.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div> | |
| 252 | + <span @click="tempDownload(item)"><el-icon class="el-icon-document-add" style="font-size:70px;"></el-icon></span> | |
| 253 | + <div style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" @click="tempDownload(item)">{{ item.name }}</div> | |
| 254 | + </div> | |
| 255 | + </div> | |
| 256 | + </div> | |
| 257 | + </el-col> | |
| 258 | + </el-row> | |
| 259 | + <el-row style="border: 1px solid #dcdfe6;border-radius: 2px;"> | |
| 260 | + <el-col :span="3"> | |
| 261 | + <div class="upload_lable"> | |
| 262 | + <span style="color:red;">*</span>一寸免冠照片2 | |
| 263 | + <el-upload | |
| 264 | + ref="upload" | |
| 265 | + action="" | |
| 266 | + accept=".jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx" | |
| 267 | + :on-change="fileChange4" | |
| 268 | + :auto-upload="false" | |
| 269 | + :show-file-list="false" | |
| 270 | + multiple | |
| 271 | + :file-list="photographTwo"> | |
| 272 | + <el-button size="small" type="primary" icon="el-icon-upload">上传附件</el-button> | |
| 273 | + </el-upload> | |
| 274 | + </div> | |
| 275 | + </el-col> | |
| 276 | + <el-col :span="21"> | |
| 277 | + <div class="upload_btn"> | |
| 278 | + <div v-for="(item,index) in photographTwo"> | |
| 279 | + <div v-if="!/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_image"> | |
| 280 | + <div class="upload_close" @click="photographTwo.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div> | |
| 281 | + <el-image | |
| 282 | + style="width: 110px; height: 95px; margin: 5px;float:left;" | |
| 283 | + :src="createUrl(item)" | |
| 284 | + :preview-src-list="[createUrl(item)]" | |
| 285 | + :z-index="999"> | |
| 286 | + </el-image> | |
| 287 | + </div> | |
| 288 | + <div v-if="/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_file"> | |
| 289 | + <div class="upload_close_file" @click="photographTwo.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div> | |
| 290 | + <span @click="tempDownload(item)"><el-icon class="el-icon-document-add" style="font-size:70px;"></el-icon></span> | |
| 291 | + <div style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" @click="tempDownload(item)">{{ item.name }}</div> | |
| 292 | + </div> | |
| 293 | + </div> | |
| 294 | + </div> | |
| 295 | + </el-col> | |
| 296 | + </el-row> | |
| 297 | + </el-form> | |
| 298 | + <div slot="footer" class="dialog-footer" style="margin-top: 20px"> | |
| 299 | + <el-button type="primary" @click="submitForm">确 定</el-button> | |
| 300 | + <el-button @click="cancel">取 消</el-button> | |
| 301 | + </div> | |
| 302 | + </div> | |
| 303 | +</template> | |
| 304 | + | |
| 305 | +<script> | |
| 306 | +import { listDriver, getDriver, delDriver, addDriver, updateDriver, exportDriver } from "@/api/unit/driver"; | |
| 307 | +import { listEnterprise} from "@/api/unit/enterprise"; | |
| 308 | +import Treeselect from "@riophae/vue-treeselect"; | |
| 309 | +import '@riophae/vue-treeselect/dist/vue-treeselect.css' | |
| 310 | +import {getAreaList} from "@/api/casefile/remoteServer"; | |
| 311 | +import Editor from "@/components/Editor/index.vue"; | |
| 312 | + | |
| 313 | +export default { | |
| 314 | + name: "DisposalSite", | |
| 315 | + components: {Editor, Treeselect}, | |
| 316 | + data() { | |
| 317 | + return { | |
| 318 | + // 遮罩层 | |
| 319 | + loading: true, | |
| 320 | + // 选中数组 | |
| 321 | + ids: [], | |
| 322 | + // 非单个禁用 | |
| 323 | + single: true, | |
| 324 | + // 非多个禁用 | |
| 325 | + multiple: true, | |
| 326 | + // 显示搜索条件 | |
| 327 | + showSearch: true, | |
| 328 | + // 总条数 | |
| 329 | + total: 0, | |
| 330 | + // 处理场所管理表格数据 | |
| 331 | + disposalSiteList: [], | |
| 332 | + // 弹出层标题 | |
| 333 | + title: "", | |
| 334 | + // 是否显示弹出层 | |
| 335 | + open: false, | |
| 336 | + // 表单参数 | |
| 337 | + form: {}, | |
| 338 | + // 表单校验 | |
| 339 | + rules: { | |
| 340 | + name: [ | |
| 341 | + {required: true, message: "请输入姓名", trigger: "blur"} | |
| 342 | + ], | |
| 343 | + identityCard: [ | |
| 344 | + {required: true, message: "请输入身份证号码", trigger: "blur"} | |
| 345 | + ], | |
| 346 | + companyId: [ | |
| 347 | + {required: true, message: "请选择所属公司", trigger: "blur"} | |
| 348 | + ], | |
| 349 | + drivingLicenceBeginDate: [ | |
| 350 | + {required: true, message: "请选择驾驶证有效期起", trigger: "blur"} | |
| 351 | + ], | |
| 352 | + drivingLicenceEndDate: [ | |
| 353 | + {required: true, message: "请选择驾驶证有效期终", trigger: "blur"} | |
| 354 | + ], | |
| 355 | + professionalQualificationBeginDate: [ | |
| 356 | + {required: true, message: "请选择从业资格证有效期起", trigger: "blur"} | |
| 357 | + ], | |
| 358 | + professionalQualificationEndDate: [ | |
| 359 | + {required: true, message: "请选择从业资格证有效期终", trigger: "blur"} | |
| 360 | + ], | |
| 361 | + safetyTrainingDate: [ | |
| 362 | + {required: true, message: "请选择安全教育培训日期", trigger: "blur"} | |
| 363 | + ], | |
| 364 | + safetyTrainingContent: [ | |
| 365 | + {required: true, message: "请输入安全教育培训内容", trigger: "blur"} | |
| 366 | + ], | |
| 367 | + }, | |
| 368 | + areas:[], | |
| 369 | + drivingLicence:[], | |
| 370 | + professionalQualification:[], | |
| 371 | + safetyTraining:[], | |
| 372 | + photographOne:[], | |
| 373 | + photographTwo:[], | |
| 374 | + enterpriseList:[] | |
| 375 | + }; | |
| 376 | + }, | |
| 377 | + created() { | |
| 378 | + getAreaList().then(res => { | |
| 379 | + this.areas = res.data; | |
| 380 | + }); | |
| 381 | + this.queryParams = { | |
| 382 | + companyType:"1" | |
| 383 | + } | |
| 384 | + listEnterprise(this.queryParams).then(response => { | |
| 385 | + this.enterpriseList = response.rows; | |
| 386 | + }); | |
| 387 | + this.initData(); | |
| 388 | + }, | |
| 389 | + watch: { | |
| 390 | + '$route.query.driverInfoId': 'initData' | |
| 391 | + }, | |
| 392 | + methods: { | |
| 393 | + reset(){ | |
| 394 | + this.form = {}; | |
| 395 | + this.drivingLicence = []; | |
| 396 | + this.professionalQualification = []; | |
| 397 | + this.safetyTraining = []; | |
| 398 | + this.photographOne = []; | |
| 399 | + this.photographTwo = []; | |
| 400 | + }, | |
| 401 | + initData(){ | |
| 402 | + this.reset(); | |
| 403 | + let id = this.$route.query.driverInfoId; | |
| 404 | + console.log(id) | |
| 405 | + if(id!=null){ | |
| 406 | + getDriver(id).then(response => { | |
| 407 | + this.form = response.data; | |
| 408 | + //将附件转换为前端可视化数组 | |
| 409 | + if(this.form.drivingLicence!=null&&this.form.drivingLicence!==""){ | |
| 410 | + let roadTransport = this.form.drivingLicence.split(";"); | |
| 411 | + roadTransport.map(item=>{ | |
| 412 | + let name = item.substring(item.lastIndexOf("/")+1); | |
| 413 | + this.drivingLicence.push({name:name,url:item}) | |
| 414 | + }) | |
| 415 | + } | |
| 416 | + if(this.form.professionalQualification!=null&&this.form.professionalQualification!==""){ | |
| 417 | + let drivingLicense = this.form.professionalQualification.split(";"); | |
| 418 | + drivingLicense.map(item=>{ | |
| 419 | + let name = item.substring(item.lastIndexOf("/")+1); | |
| 420 | + this.professionalQualification.push({name:name,url:item}) | |
| 421 | + }) | |
| 422 | + } | |
| 423 | + if(this.form.safetyTraining!=null&&this.form.safetyTraining!==""){ | |
| 424 | + let carFront = this.form.safetyTraining.split(";"); | |
| 425 | + carFront.map(item=>{ | |
| 426 | + let name = item.substring(item.lastIndexOf("/")+1); | |
| 427 | + this.safetyTraining.push({name:name,url:item}) | |
| 428 | + }) | |
| 429 | + } | |
| 430 | + if(this.form.photographOne!=null&&this.form.photographOne!==""){ | |
| 431 | + let carLeft = this.form.photographOne.split(";"); | |
| 432 | + carLeft.map(item=>{ | |
| 433 | + let name = item.substring(item.lastIndexOf("/")+1); | |
| 434 | + this.photographOne.push({name:name,url:item}) | |
| 435 | + }) | |
| 436 | + } | |
| 437 | + if(this.form.photographTwo!=null&&this.form.photographTwo!==""){ | |
| 438 | + let carBehind = this.form.photographTwo.split(";"); | |
| 439 | + carBehind.map(item=>{ | |
| 440 | + let name = item.substring(item.lastIndexOf("/")+1); | |
| 441 | + this.photographTwo.push({name:name,url:item}) | |
| 442 | + }) | |
| 443 | + } | |
| 444 | + }); | |
| 445 | + } | |
| 446 | + }, | |
| 447 | + createUrl(file){ | |
| 448 | + if(file.raw!=null){ | |
| 449 | + return URL.createObjectURL(file.raw); | |
| 450 | + }else{ | |
| 451 | + return process.env.VUE_APP_BASE_API + file.url; | |
| 452 | + } | |
| 453 | + | |
| 454 | + }, | |
| 455 | + tempDownload(row){ | |
| 456 | + let name = row.name; | |
| 457 | + let url = ""; | |
| 458 | + if(row.raw!=null){ | |
| 459 | + url = URL.createObjectURL(row.raw); | |
| 460 | + }else{ | |
| 461 | + url = process.env.VUE_APP_BASE_API + row.url; | |
| 462 | + } | |
| 463 | + const a = document.createElement('a') | |
| 464 | + a.setAttribute('download', name) | |
| 465 | + a.setAttribute('target', '_blank') | |
| 466 | + a.setAttribute('href', url); | |
| 467 | + a.click() | |
| 468 | + }, | |
| 469 | + // 取消按钮 | |
| 470 | + cancel() { | |
| 471 | + this.$tab.closePage({path:"/driverInfo/info"}).then(() => { | |
| 472 | + this.$tab.openPage("驾驶员管理", "/tool/driver",{driverInfoRefresh:1}) | |
| 473 | + }) | |
| 474 | + }, | |
| 475 | + /** 提交按钮 */ | |
| 476 | + submitForm() { | |
| 477 | + this.$refs["form"].validate(valid => { | |
| 478 | + if(this.drivingLicence.length===0){ | |
| 479 | + this.$message({ | |
| 480 | + message: '请上传驾驶证!', | |
| 481 | + type: 'warning' | |
| 482 | + }); | |
| 483 | + return false; | |
| 484 | + } | |
| 485 | + if(this.professionalQualification.length===0){ | |
| 486 | + this.$message({ | |
| 487 | + message: '请上传从业资格证!', | |
| 488 | + type: 'warning' | |
| 489 | + }); | |
| 490 | + return false; | |
| 491 | + } | |
| 492 | + if(this.safetyTraining.length===0){ | |
| 493 | + this.$message({ | |
| 494 | + message: '请上传安全教育培训结业证明!', | |
| 495 | + type: 'warning' | |
| 496 | + }); | |
| 497 | + return false; | |
| 498 | + } | |
| 499 | + if(this.photographOne.length===0){ | |
| 500 | + this.$message({ | |
| 501 | + message: '请上传一寸免冠照片1!', | |
| 502 | + type: 'warning' | |
| 503 | + }); | |
| 504 | + return false; | |
| 505 | + } | |
| 506 | + if(this.photographTwo.length===0){ | |
| 507 | + this.$message({ | |
| 508 | + message: '请上传一寸免冠照片2!', | |
| 509 | + type: 'warning' | |
| 510 | + }); | |
| 511 | + return false; | |
| 512 | + } | |
| 513 | + if (valid) { | |
| 514 | + let formData = new FormData(); | |
| 515 | + let form = this.form; | |
| 516 | + //去掉params属性 | |
| 517 | + delete form.params; | |
| 518 | + | |
| 519 | + //先清空原有的附件 | |
| 520 | + form.drivingLicence = null; | |
| 521 | + form.professionalQualification = null; | |
| 522 | + form.safetyTraining = null; | |
| 523 | + form.photographOne = null; | |
| 524 | + form.photographTwo = null; | |
| 525 | + //将附件拼接到form中 | |
| 526 | + this.drivingLicence.forEach(item => { | |
| 527 | + if (item.raw != null) { | |
| 528 | + formData.append('drivingLicenceFiles', item.raw) | |
| 529 | + }else{ | |
| 530 | + //将原有的附件拼接到form中 | |
| 531 | + form.drivingLicence = form.drivingLicence!==null?form.drivingLicence+";"+item.url:item.url; | |
| 532 | + } | |
| 533 | + }) | |
| 534 | + this.professionalQualification.forEach(item => { | |
| 535 | + if (item.raw != null) { | |
| 536 | + formData.append('professionalQualificationFiles', item.raw) | |
| 537 | + }else{ | |
| 538 | + //将原有的附件拼接到form中 | |
| 539 | + form.professionalQualification = form.professionalQualification!==null?form.professionalQualification+";"+item.url:item.url; | |
| 540 | + } | |
| 541 | + }) | |
| 542 | + this.safetyTraining.forEach(item => { | |
| 543 | + if (item.raw != null) { | |
| 544 | + formData.append('safetyTrainingFiles', item.raw) | |
| 545 | + }else{ | |
| 546 | + //将原有的附件拼接到form中 | |
| 547 | + form.safetyTraining = form.safetyTraining!==null?form.safetyTraining+";"+item.url:item.url; | |
| 548 | + } | |
| 549 | + }) | |
| 550 | + this.photographOne.forEach(item => { | |
| 551 | + if (item.raw != null) { | |
| 552 | + formData.append('photographOneFiles', item.raw) | |
| 553 | + }else{ | |
| 554 | + //将原有的附件拼接到form中 | |
| 555 | + form.photographOne = form.photographOne!==null?form.photographOne+";"+item.url:item.url; | |
| 556 | + } | |
| 557 | + }) | |
| 558 | + this.photographTwo.forEach(item => { | |
| 559 | + if (item.raw != null) { | |
| 560 | + formData.append('photographTwoFiles', item.raw) | |
| 561 | + }else{ | |
| 562 | + //将原有的附件拼接到form中 | |
| 563 | + form.photographTwo = form.photographTwo!==null?form.photographTwo+";"+item.url:item.url; | |
| 564 | + } | |
| 565 | + }) | |
| 566 | + | |
| 567 | + for (let key in form) { | |
| 568 | + formData.append(key, form[key] == null ? "" : form[key]) | |
| 569 | + } | |
| 570 | + if (this.form.id != null) { | |
| 571 | + updateDriver(formData).then(response => { | |
| 572 | + this.msgSuccess("修改成功"); | |
| 573 | + this.$tab.closePage({path:"/driverInfo/infoEdit"}).then(() => { | |
| 574 | + this.$tab.openPage("驾驶员管理", "/tool/driver",{driverInfoRefresh:1}) | |
| 575 | + }) | |
| 576 | + }); | |
| 577 | + } else { | |
| 578 | + addDriver(formData).then(response => { | |
| 579 | + this.msgSuccess("新增成功"); | |
| 580 | + this.$tab.closePage({path:"/driverInfo/info"}).then(() => { | |
| 581 | + this.$tab.openPage("驾驶员管理", "/tool/driver",{driverInfoRefresh:1}) | |
| 582 | + }) | |
| 583 | + }); | |
| 584 | + } | |
| 585 | + } | |
| 586 | + }); | |
| 587 | + }, | |
| 588 | + /** | |
| 589 | + * 文件改变时,限制文件上传格式和大小 | |
| 590 | + * 文件格式只能为docx/doc/pdf/png/jpeg/png/jpg | |
| 591 | + * 大小不超过20M | |
| 592 | + * */ | |
| 593 | + fileChange(file, fileList) { | |
| 594 | + let count = 0; | |
| 595 | + for (let i = 0; i < fileList.length; i++) { | |
| 596 | + // console.log(fileList.length) | |
| 597 | + // console.log(this.fileEntityList[i].name+"111"+file.name) | |
| 598 | + if (fileList[i].name == file.name) { | |
| 599 | + count++; | |
| 600 | + if (count == 2) { | |
| 601 | + this.$message({ | |
| 602 | + message: '已存在此文件!', | |
| 603 | + type: 'warning' | |
| 604 | + }); | |
| 605 | + for (let j = fileList.length; j > 0; j--) { | |
| 606 | + //如果存在此文件,去除新选择的重复文件 | |
| 607 | + if (fileList[j - 1].name == file.name) { | |
| 608 | + fileList.splice(j - 1, 1); | |
| 609 | + i--; | |
| 610 | + return false; | |
| 611 | + } | |
| 612 | + } | |
| 613 | + } | |
| 614 | + } | |
| 615 | + } | |
| 616 | + let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase(); | |
| 617 | + //格式符合后判断大小 | |
| 618 | + if ("jpg,jpeg,png,gif,jfif,pjpeg,pjp,pdf,doc,docx,xls,xlsx".indexOf(fileType) != -1) { | |
| 619 | + let max5M = file.size / 1024 / 1024 < 100; | |
| 620 | + if (!max5M) { | |
| 621 | + this.$message({ | |
| 622 | + message: '上传文件大小不得超过100M!', | |
| 623 | + type: 'warning' | |
| 624 | + }); | |
| 625 | + fileList = fileList.splice(fileList.length - 1, 1); | |
| 626 | + } else { | |
| 627 | + //符合条件后进行添加 | |
| 628 | + this.drivingLicence = fileList | |
| 629 | + } | |
| 630 | + } else { | |
| 631 | + this.$message({ | |
| 632 | + message: '上传文件只能是.jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx格式!', | |
| 633 | + type: 'warning' | |
| 634 | + }); | |
| 635 | + fileList = fileList.splice(fileList.length - 1, 1); | |
| 636 | + } | |
| 637 | + }, | |
| 638 | + fileChange1(file, fileList) { | |
| 639 | + let count = 0; | |
| 640 | + for (let i = 0; i < fileList.length; i++) { | |
| 641 | + // console.log(fileList.length) | |
| 642 | + // console.log(this.fileEntityList[i].name+"111"+file.name) | |
| 643 | + if (fileList[i].name == file.name) { | |
| 644 | + count++; | |
| 645 | + if (count == 2) { | |
| 646 | + this.$message({ | |
| 647 | + message: '已存在此文件!', | |
| 648 | + type: 'warning' | |
| 649 | + }); | |
| 650 | + for (let j = fileList.length; j > 0; j--) { | |
| 651 | + //如果存在此文件,去除新选择的重复文件 | |
| 652 | + if (fileList[j - 1].name == file.name) { | |
| 653 | + fileList.splice(j - 1, 1); | |
| 654 | + i--; | |
| 655 | + return false; | |
| 656 | + } | |
| 657 | + } | |
| 658 | + } | |
| 659 | + } | |
| 660 | + } | |
| 661 | + let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase(); | |
| 662 | + //格式符合后判断大小 | |
| 663 | + if ("jpg,jpeg,png,gif,jfif,pjpeg,pjp,pdf,doc,docx,xls,xlsx".indexOf(fileType) != -1) { | |
| 664 | + let max5M = file.size / 1024 / 1024 < 100; | |
| 665 | + if (!max5M) { | |
| 666 | + this.$message({ | |
| 667 | + message: '上传文件大小不得超过100M!', | |
| 668 | + type: 'warning' | |
| 669 | + }); | |
| 670 | + fileList = fileList.splice(fileList.length - 1, 1); | |
| 671 | + } else { | |
| 672 | + //符合条件后进行添加 | |
| 673 | + this.professionalQualification = fileList | |
| 674 | + } | |
| 675 | + } else { | |
| 676 | + this.$message({ | |
| 677 | + message: '上传文件只能是.jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx格式!', | |
| 678 | + type: 'warning' | |
| 679 | + }); | |
| 680 | + fileList = fileList.splice(fileList.length - 1, 1); | |
| 681 | + } | |
| 682 | + }, | |
| 683 | + fileChange2(file, fileList) { | |
| 684 | + let count = 0; | |
| 685 | + for (let i = 0; i < fileList.length; i++) { | |
| 686 | + // console.log(fileList.length) | |
| 687 | + // console.log(this.fileEntityList[i].name+"111"+file.name) | |
| 688 | + if (fileList[i].name == file.name) { | |
| 689 | + count++; | |
| 690 | + if (count == 2) { | |
| 691 | + this.$message({ | |
| 692 | + message: '已存在此文件!', | |
| 693 | + type: 'warning' | |
| 694 | + }); | |
| 695 | + for (let j = fileList.length; j > 0; j--) { | |
| 696 | + //如果存在此文件,去除新选择的重复文件 | |
| 697 | + if (fileList[j - 1].name == file.name) { | |
| 698 | + fileList.splice(j - 1, 1); | |
| 699 | + i--; | |
| 700 | + return false; | |
| 701 | + } | |
| 702 | + } | |
| 703 | + } | |
| 704 | + } | |
| 705 | + } | |
| 706 | + let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase(); | |
| 707 | + //格式符合后判断大小 | |
| 708 | + if ("jpg,jpeg,png,gif,jfif,pjpeg,pjp,pdf,doc,docx,xls,xlsx".indexOf(fileType) != -1) { | |
| 709 | + let max5M = file.size / 1024 / 1024 < 100; | |
| 710 | + if (!max5M) { | |
| 711 | + this.$message({ | |
| 712 | + message: '上传文件大小不得超过100M!', | |
| 713 | + type: 'warning' | |
| 714 | + }); | |
| 715 | + fileList = fileList.splice(fileList.length - 1, 1); | |
| 716 | + } else { | |
| 717 | + //符合条件后进行添加 | |
| 718 | + this.safetyTraining = fileList | |
| 719 | + } | |
| 720 | + } else { | |
| 721 | + this.$message({ | |
| 722 | + message: '上传文件只能是.jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx格式!', | |
| 723 | + type: 'warning' | |
| 724 | + }); | |
| 725 | + fileList = fileList.splice(fileList.length - 1, 1); | |
| 726 | + } | |
| 727 | + }, | |
| 728 | + fileChange3(file, fileList) { | |
| 729 | + let count = 0; | |
| 730 | + for (let i = 0; i < fileList.length; i++) { | |
| 731 | + // console.log(fileList.length) | |
| 732 | + // console.log(this.fileEntityList[i].name+"111"+file.name) | |
| 733 | + if (fileList[i].name == file.name) { | |
| 734 | + count++; | |
| 735 | + if (count == 2) { | |
| 736 | + this.$message({ | |
| 737 | + message: '已存在此文件!', | |
| 738 | + type: 'warning' | |
| 739 | + }); | |
| 740 | + for (let j = fileList.length; j > 0; j--) { | |
| 741 | + //如果存在此文件,去除新选择的重复文件 | |
| 742 | + if (fileList[j - 1].name == file.name) { | |
| 743 | + fileList.splice(j - 1, 1); | |
| 744 | + i--; | |
| 745 | + return false; | |
| 746 | + } | |
| 747 | + } | |
| 748 | + } | |
| 749 | + } | |
| 750 | + } | |
| 751 | + let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase(); | |
| 752 | + //格式符合后判断大小 | |
| 753 | + if ("jpg,jpeg,png,gif,jfif,pjpeg,pjp,pdf,doc,docx,xls,xlsx".indexOf(fileType) != -1) { | |
| 754 | + let max5M = file.size / 1024 / 1024 < 100; | |
| 755 | + if (!max5M) { | |
| 756 | + this.$message({ | |
| 757 | + message: '上传文件大小不得超过100M!', | |
| 758 | + type: 'warning' | |
| 759 | + }); | |
| 760 | + fileList = fileList.splice(fileList.length - 1, 1); | |
| 761 | + } else { | |
| 762 | + //符合条件后进行添加 | |
| 763 | + this.photographOne = fileList | |
| 764 | + } | |
| 765 | + } else { | |
| 766 | + this.$message({ | |
| 767 | + message: '上传文件只能是.jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx格式!', | |
| 768 | + type: 'warning' | |
| 769 | + }); | |
| 770 | + fileList = fileList.splice(fileList.length - 1, 1); | |
| 771 | + } | |
| 772 | + }, | |
| 773 | + fileChange4(file, fileList) { | |
| 774 | + let count = 0; | |
| 775 | + for (let i = 0; i < fileList.length; i++) { | |
| 776 | + // console.log(fileList.length) | |
| 777 | + // console.log(this.fileEntityList[i].name+"111"+file.name) | |
| 778 | + if (fileList[i].name == file.name) { | |
| 779 | + count++; | |
| 780 | + if (count == 2) { | |
| 781 | + this.$message({ | |
| 782 | + message: '已存在此文件!', | |
| 783 | + type: 'warning' | |
| 784 | + }); | |
| 785 | + for (let j = fileList.length; j > 0; j--) { | |
| 786 | + //如果存在此文件,去除新选择的重复文件 | |
| 787 | + if (fileList[j - 1].name == file.name) { | |
| 788 | + fileList.splice(j - 1, 1); | |
| 789 | + i--; | |
| 790 | + return false; | |
| 791 | + } | |
| 792 | + } | |
| 793 | + } | |
| 794 | + } | |
| 795 | + } | |
| 796 | + let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase(); | |
| 797 | + //格式符合后判断大小 | |
| 798 | + if ("jpg,jpeg,png,gif,jfif,pjpeg,pjp,pdf,doc,docx,xls,xlsx".indexOf(fileType) != -1) { | |
| 799 | + let max5M = file.size / 1024 / 1024 < 100; | |
| 800 | + if (!max5M) { | |
| 801 | + this.$message({ | |
| 802 | + message: '上传文件大小不得超过100M!', | |
| 803 | + type: 'warning' | |
| 804 | + }); | |
| 805 | + fileList = fileList.splice(fileList.length - 1, 1); | |
| 806 | + } else { | |
| 807 | + //符合条件后进行添加 | |
| 808 | + this.photographTwo = fileList | |
| 809 | + } | |
| 810 | + } else { | |
| 811 | + this.$message({ | |
| 812 | + message: '上传文件只能是.jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx格式!', | |
| 813 | + type: 'warning' | |
| 814 | + }); | |
| 815 | + fileList = fileList.splice(fileList.length - 1, 1); | |
| 816 | + } | |
| 817 | + }, | |
| 818 | + } | |
| 819 | +}; | |
| 820 | +</script> | |
| 821 | +<style lang="scss" scoped> | |
| 822 | +.upload_lable{ | |
| 823 | + border-right: 1px solid #dcdfe6; | |
| 824 | + padding: 27px 30px; | |
| 825 | + background: #fafafa; | |
| 826 | + text-align: center; | |
| 827 | +} | |
| 828 | +.upload_btn{ | |
| 829 | + max-height: 106px; | |
| 830 | +} | |
| 831 | +.upload_close{ | |
| 832 | + position: absolute; | |
| 833 | + left: 105px; | |
| 834 | + z-index:99; | |
| 835 | + top:-1px; | |
| 836 | + font-size:18px; | |
| 837 | + color:red; | |
| 838 | +} | |
| 839 | +.upload_close_file{ | |
| 840 | + position: absolute; | |
| 841 | + left: 80px; | |
| 842 | + z-index:99; | |
| 843 | + top:-1px; | |
| 844 | + font-size:18px; | |
| 845 | + color:red; | |
| 846 | +} | |
| 847 | +.upload_div_image{ | |
| 848 | + display: inline-block; | |
| 849 | + width: 110px; | |
| 850 | + height: 95px; | |
| 851 | + position: relative; | |
| 852 | + float: left; | |
| 853 | + margin-left: 5px; | |
| 854 | +} | |
| 855 | +.upload_div_file{ | |
| 856 | + display: inline-block; | |
| 857 | + width: 110px; | |
| 858 | + height: 95px; | |
| 859 | + text-align: center; | |
| 860 | + float:left; | |
| 861 | + margin: 5px; | |
| 862 | + position: relative; | |
| 863 | +} | |
| 864 | +.serach_map{ | |
| 865 | + position: absolute; | |
| 866 | + top: 100px; | |
| 867 | + left: 25px; | |
| 868 | + z-index: 999; | |
| 869 | + background: #fff; | |
| 870 | + padding: 10px; | |
| 871 | + border-radius: 5px; | |
| 872 | + box-shadow: 0 0 10px rgba(0,0,0,.2); | |
| 873 | +} | |
| 874 | +</style> | ... | ... |
trash-ui/src/views/unit/enterprise/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.enterpriseRefresh':'getList' | |
| 203 | + }, | |
| 204 | + methods: { | |
| 205 | + /** 查询运输企业管理列表 */ | |
| 206 | + getList() { | |
| 207 | + this.loading = true; | |
| 208 | + this.queryParams.companyType = "1"; | |
| 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("新增运输企业","/enterprise/info",{enterpriseRefresh:0}); | |
| 234 | + }, | |
| 235 | + /** 修改按钮操作 */ | |
| 236 | + handleUpdate(row) { | |
| 237 | + const id = row.id || this.ids | |
| 238 | + this.$tab.openPage("修改运输企业","/enterprise/infoEdit",{enterpriseId: id,enterpriseRefresh: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/enterprise/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="7"> | |
| 116 | + <el-form-item label="经营单位" prop="parentId"> | |
| 117 | + <el-select v-model="form.parentId" placeholder="请选择经营单位" clearable style="width: 100%;"> | |
| 118 | + <el-option v-for="(item,index) in enterpriseList" :label="item.name" :value="item.id" :key="index"/> | |
| 119 | + </el-select> | |
| 120 | + </el-form-item> | |
| 121 | + </el-col> | |
| 122 | + <el-col :span="7"> | |
| 123 | + <el-form-item label="备注" prop="remark"> | |
| 124 | + <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" /> | |
| 125 | + </el-form-item> | |
| 126 | + </el-col> | |
| 127 | + </el-row> | |
| 128 | + <el-row style="border: 1px solid #dcdfe6;border-radius: 2px;"> | |
| 129 | + <el-col :span="3"> | |
| 130 | + <div class="upload_lable"> | |
| 131 | + 企业道路运输经营许可证 | |
| 132 | + <el-upload | |
| 133 | + ref="upload" | |
| 134 | + action="" | |
| 135 | + accept=".jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx" | |
| 136 | + :on-change="fileChange" | |
| 137 | + :auto-upload="false" | |
| 138 | + :show-file-list="false" | |
| 139 | + multiple | |
| 140 | + :file-list="transportPermission"> | |
| 141 | + | |
| 142 | + <el-button size="small" type="primary" icon="el-icon-upload">上传附件</el-button> | |
| 143 | + </el-upload> | |
| 144 | + </div> | |
| 145 | + </el-col> | |
| 146 | + <el-col :span="21"> | |
| 147 | + <div class="upload_btn"> | |
| 148 | + <div v-for="(item,index) in transportPermission"> | |
| 149 | + <div v-if="!/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_image"> | |
| 150 | + <div class="upload_close" @click="transportPermission.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div> | |
| 151 | + <el-image | |
| 152 | + style="width: 110px; height: 95px; margin: 5px;float:left;" | |
| 153 | + :src="createUrl(item)" | |
| 154 | + :preview-src-list="[createUrl(item)]" | |
| 155 | + :z-index="999"> | |
| 156 | + </el-image> | |
| 157 | + </div> | |
| 158 | + <div v-if="/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_file"> | |
| 159 | + <div class="upload_close_file" @click="transportPermission.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div> | |
| 160 | + <span @click="tempDownload(item)"><el-icon class="el-icon-document-add" style="font-size:70px;"></el-icon></span> | |
| 161 | + <div style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" @click="tempDownload(item)">{{ item.name }}</div> | |
| 162 | + </div> | |
| 163 | + </div> | |
| 164 | + </div> | |
| 165 | + </el-col> | |
| 166 | + </el-row> | |
| 167 | + <el-row style="border: 1px solid #dcdfe6;border-radius: 2px;"> | |
| 168 | + <el-col :span="3"> | |
| 169 | + <div class="upload_lable"> | |
| 170 | + 企业营业执照 | |
| 171 | + <el-upload | |
| 172 | + ref="upload" | |
| 173 | + action="" | |
| 174 | + accept=".jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx" | |
| 175 | + :on-change="fileChange1" | |
| 176 | + :auto-upload="false" | |
| 177 | + :show-file-list="false" | |
| 178 | + multiple | |
| 179 | + :file-list="enterpriseBusinessLicense"> | |
| 180 | + <el-button size="small" type="primary" icon="el-icon-upload">上传附件</el-button> | |
| 181 | + </el-upload> | |
| 182 | + </div> | |
| 183 | + </el-col> | |
| 184 | + <el-col :span="21"> | |
| 185 | + <div class="upload_btn"> | |
| 186 | + <div v-for="(item,index) in enterpriseBusinessLicense"> | |
| 187 | + <div v-if="!/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_image"> | |
| 188 | + <div class="upload_close" @click="enterpriseBusinessLicense.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div> | |
| 189 | + <el-image | |
| 190 | + style="width: 110px; height: 95px; margin: 5px;float:left;" | |
| 191 | + :src="createUrl(item)" | |
| 192 | + :preview-src-list="[createUrl(item)]" | |
| 193 | + :z-index="999"> | |
| 194 | + </el-image> | |
| 195 | + </div> | |
| 196 | + <div v-if="/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_file"> | |
| 197 | + <div class="upload_close_file" @click="enterpriseBusinessLicense.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div> | |
| 198 | + <span @click="tempDownload(item)"><el-icon class="el-icon-document-add" style="font-size:70px;"></el-icon></span> | |
| 199 | + <div style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" @click="tempDownload(item)">{{ item.name }}</div> | |
| 200 | + </div> | |
| 201 | + </div> | |
| 202 | + </div> | |
| 203 | + </el-col> | |
| 204 | + </el-row> | |
| 205 | + <el-row style="border: 1px solid #dcdfe6;border-radius: 2px;"> | |
| 206 | + <el-col :span="3"> | |
| 207 | + <div class="upload_lable"> | |
| 208 | + 安全员考核合格证明 | |
| 209 | + <el-upload | |
| 210 | + ref="upload" | |
| 211 | + action="" | |
| 212 | + accept=".jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx" | |
| 213 | + :on-change="fileChange2" | |
| 214 | + :auto-upload="false" | |
| 215 | + :show-file-list="false" | |
| 216 | + multiple | |
| 217 | + :file-list="safetyOfficerQualificationCertificate"> | |
| 218 | + <el-button size="small" type="primary" icon="el-icon-upload">上传附件</el-button> | |
| 219 | + </el-upload> | |
| 220 | + </div> | |
| 221 | + </el-col> | |
| 222 | + <el-col :span="21"> | |
| 223 | + <div class="upload_btn"> | |
| 224 | + <div v-for="(item,index) in safetyOfficerQualificationCertificate"> | |
| 225 | + <div v-if="!/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_image"> | |
| 226 | + <div class="upload_close" @click="safetyOfficerQualificationCertificate.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div> | |
| 227 | + <el-image | |
| 228 | + style="width: 110px; height: 95px; margin: 5px;float:left;" | |
| 229 | + :src="createUrl(item)" | |
| 230 | + :preview-src-list="[createUrl(item)]" | |
| 231 | + :z-index="999"> | |
| 232 | + </el-image> | |
| 233 | + </div> | |
| 234 | + <div v-if="/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_file"> | |
| 235 | + <div class="upload_close_file" @click="safetyOfficerQualificationCertificate.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div> | |
| 236 | + <span @click="tempDownload(item)"><el-icon class="el-icon-document-add" style="font-size:70px;"></el-icon></span> | |
| 237 | + <div style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" @click="tempDownload(item)">{{ item.name }}</div> | |
| 238 | + </div> | |
| 239 | + </div> | |
| 240 | + </div> | |
| 241 | + </el-col> | |
| 242 | + </el-row> | |
| 243 | + <el-row style="border: 1px solid #dcdfe6;border-radius: 2px;"> | |
| 244 | + <el-col :span="3"> | |
| 245 | + <div class="upload_lable"> | |
| 246 | + 企业负责人安全考核证 | |
| 247 | + <el-upload | |
| 248 | + ref="upload" | |
| 249 | + action="" | |
| 250 | + accept=".jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx" | |
| 251 | + :on-change="fileChange3" | |
| 252 | + :auto-upload="false" | |
| 253 | + :show-file-list="false" | |
| 254 | + multiple | |
| 255 | + :file-list="safetyCertificate"> | |
| 256 | + <el-button size="small" type="primary" icon="el-icon-upload">上传附件</el-button> | |
| 257 | + </el-upload> | |
| 258 | + </div> | |
| 259 | + </el-col> | |
| 260 | + <el-col :span="21"> | |
| 261 | + <div class="upload_btn"> | |
| 262 | + <div v-for="(item,index) in safetyCertificate"> | |
| 263 | + <div v-if="!/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_image"> | |
| 264 | + <div class="upload_close" @click="safetyCertificate.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div> | |
| 265 | + <el-image | |
| 266 | + style="width: 110px; height: 95px; margin: 5px;float:left;" | |
| 267 | + :src="createUrl(item)" | |
| 268 | + :preview-src-list="[createUrl(item)]" | |
| 269 | + :z-index="999"> | |
| 270 | + </el-image> | |
| 271 | + </div> | |
| 272 | + <div v-if="/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_file"> | |
| 273 | + <div class="upload_close_file" @click="safetyCertificate.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div> | |
| 274 | + <span @click="tempDownload(item)"><el-icon class="el-icon-document-add" style="font-size:70px;"></el-icon></span> | |
| 275 | + <div style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" @click="tempDownload(item)">{{ item.name }}</div> | |
| 276 | + </div> | |
| 277 | + </div> | |
| 278 | + </div> | |
| 279 | + </el-col> | |
| 280 | + </el-row> | |
| 281 | + <el-row style="border: 1px solid #dcdfe6;border-radius: 2px;"> | |
| 282 | + <el-col :span="3"> | |
| 283 | + <div class="upload_lable"> | |
| 284 | + 停车场全景图 | |
| 285 | + <el-upload | |
| 286 | + ref="upload" | |
| 287 | + action="" | |
| 288 | + accept=".jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx" | |
| 289 | + :on-change="fileChange4" | |
| 290 | + :auto-upload="false" | |
| 291 | + :show-file-list="false" | |
| 292 | + multiple | |
| 293 | + :file-list="carParkPanorama"> | |
| 294 | + <el-button size="small" type="primary" icon="el-icon-upload">上传附件</el-button> | |
| 295 | + </el-upload> | |
| 296 | + </div> | |
| 297 | + </el-col> | |
| 298 | + <el-col :span="21"> | |
| 299 | + <div class="upload_btn"> | |
| 300 | + <div v-for="(item,index) in carParkPanorama"> | |
| 301 | + <div v-if="!/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_image"> | |
| 302 | + <div class="upload_close" @click="carParkPanorama.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div> | |
| 303 | + <el-image | |
| 304 | + style="width: 110px; height: 95px; margin: 5px;float:left;" | |
| 305 | + :src="createUrl(item)" | |
| 306 | + :preview-src-list="[createUrl(item)]" | |
| 307 | + :z-index="999"> | |
| 308 | + </el-image> | |
| 309 | + </div> | |
| 310 | + <div v-if="/\.(pjp|pdf|doc|docx|xls|xlsx)$/.test(item.name)" class="upload_div_file"> | |
| 311 | + <div class="upload_close_file" @click="carParkPanorama.splice(index,1);"><el-icon class="el-icon-error"></el-icon></div> | |
| 312 | + <span @click="tempDownload(item)"><el-icon class="el-icon-document-add" style="font-size:70px;"></el-icon></span> | |
| 313 | + <div style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" @click="tempDownload(item)">{{ item.name }}</div> | |
| 314 | + </div> | |
| 315 | + </div> | |
| 316 | + </div> | |
| 317 | + </el-col> | |
| 318 | + </el-row> | |
| 319 | + <!-- <el-form-item label="" prop="environmentalApproval">--> | |
| 320 | + <!-- <el-input v-model="form." type="textarea" placeholder="请输入内容" />--> | |
| 321 | + <!-- </el-form-item>--> | |
| 322 | + <!-- <el-form-item label="" prop="authorization">--> | |
| 323 | + <!-- <el-input v-model="form." type="textarea" placeholder="请输入内容" />--> | |
| 324 | + <!-- </el-form-item>--> | |
| 325 | + <!-- <el-form-item label="" prop="otherInformation">--> | |
| 326 | + <!-- <el-input v-model="form." type="textarea" placeholder="请输入内容" />--> | |
| 327 | + <!-- </el-form-item>--> | |
| 328 | + <!-- <el-form-item label="运输企业" prop="companyIds">--> | |
| 329 | + <!-- <el-input v-model="form.companyIds" placeholder="请输入运输企业" />--> | |
| 330 | + <!-- </el-form-item>--> | |
| 331 | + <!-- <el-form-item label="审批状态,0=审批中,1=审批通过,2=被驳回">--> | |
| 332 | + <!-- <el-radio-group v-model="form.status">--> | |
| 333 | + <!-- <el-radio label="1">请选择字典生成</el-radio>--> | |
| 334 | + <!-- </el-radio-group>--> | |
| 335 | + <!-- </el-form-item>--> | |
| 336 | + <!-- <el-form-item label="二维码" prop="qrCode">--> | |
| 337 | + <!-- <el-input v-model="form.qrCode" placeholder="请输入二维码" />--> | |
| 338 | + <!-- </el-form-item>--> | |
| 339 | + </el-form> | |
| 340 | + <div slot="footer" class="dialog-footer" style="margin-top: 20px"> | |
| 341 | + <el-button type="primary" @click="submitForm">确 定</el-button> | |
| 342 | + <el-button @click="cancel">取 消</el-button> | |
| 343 | + </div> | |
| 344 | + </div> | |
| 345 | +</template> | |
| 346 | + | |
| 347 | +<script> | |
| 348 | +import { listEnterprise, getEnterprise, delEnterprise, addEnterprise, updateEnterprise, exportEnterprise } from "@/api/unit/enterprise"; | |
| 349 | +import Treeselect from "@riophae/vue-treeselect"; | |
| 350 | +import '@riophae/vue-treeselect/dist/vue-treeselect.css' | |
| 351 | +import {getAreaList} from "@/api/casefile/remoteServer"; | |
| 352 | + | |
| 353 | +export default { | |
| 354 | + name: "DisposalSite", | |
| 355 | + components: {Treeselect}, | |
| 356 | + data() { | |
| 357 | + return { | |
| 358 | + // 遮罩层 | |
| 359 | + loading: true, | |
| 360 | + // 选中数组 | |
| 361 | + ids: [], | |
| 362 | + // 非单个禁用 | |
| 363 | + single: true, | |
| 364 | + // 非多个禁用 | |
| 365 | + multiple: true, | |
| 366 | + // 显示搜索条件 | |
| 367 | + showSearch: true, | |
| 368 | + // 总条数 | |
| 369 | + total: 0, | |
| 370 | + // 处理场所管理表格数据 | |
| 371 | + disposalSiteList: [], | |
| 372 | + // 弹出层标题 | |
| 373 | + title: "", | |
| 374 | + // 是否显示弹出层 | |
| 375 | + open: false, | |
| 376 | + // 表单参数 | |
| 377 | + form: {}, | |
| 378 | + // 表单校验 | |
| 379 | + rules: { | |
| 380 | + name: [ | |
| 381 | + {required: true, message: "请输入企业名称", trigger: "blur"} | |
| 382 | + ], | |
| 383 | + abbreviation: [ | |
| 384 | + {required: true, message: "请输入简称", trigger: "blur"} | |
| 385 | + ], | |
| 386 | + registrationArea: [ | |
| 387 | + {required: true, message: "请输入注册地所在区域", trigger: "blur"} | |
| 388 | + ], | |
| 389 | + transportPermissionDate: [ | |
| 390 | + {required: true, message: "请选择企业道路运输经营许可证有效期", trigger: "blur"} | |
| 391 | + ], | |
| 392 | + enterDate: [ | |
| 393 | + {required: true, message: "请选择企业入市时间", trigger: "blur"} | |
| 394 | + ], | |
| 395 | + businessLicenseDate: [ | |
| 396 | + {required: true, message: "请选择企业营业执照有效期", trigger: "blur"} | |
| 397 | + ], | |
| 398 | + officeAddress: [ | |
| 399 | + {required: true, message: "请输入办公地址", trigger: "blur"} | |
| 400 | + ], | |
| 401 | + parkingLotLocation: [ | |
| 402 | + {required: true, message: "请输入停车场位置", trigger: "blur"} | |
| 403 | + ], | |
| 404 | + parkingArea: [ | |
| 405 | + {required: true, message: "请输入停车场面积", trigger: "blur"}, | |
| 406 | + {pattern: /^\d+(\.\d+)?$/, message: "只能输入正数和小数", trigger: "blur"} | |
| 407 | + ], | |
| 408 | + safetyManagerName: [ | |
| 409 | + {required: true, message: "请输入企业安全负责人姓名", trigger: "blur"} | |
| 410 | + ], | |
| 411 | + socialUniformCreditCodeNumber: [ | |
| 412 | + {required: true, message: "请输入社会统一信用代码编号", trigger: "blur"} | |
| 413 | + ], | |
| 414 | + legalRepresentative: [ | |
| 415 | + {required: true, message: "请输入法人代表", trigger: "blur"} | |
| 416 | + ], | |
| 417 | + safetyPeopleName: [ | |
| 418 | + {required: true, message: "请输入安全管理人员", trigger: "blur"} | |
| 419 | + ], | |
| 420 | + }, | |
| 421 | + areas:[], | |
| 422 | + // 企业道路运输经营许可证 | |
| 423 | + transportPermission:[], | |
| 424 | + // 企业营业执照 | |
| 425 | + enterpriseBusinessLicense:[], | |
| 426 | + // 安全员考核合格证明 | |
| 427 | + safetyOfficerQualificationCertificate:[], | |
| 428 | + // 企业负责人安全考核证 | |
| 429 | + safetyCertificate:[], | |
| 430 | + // 停车场全景图 | |
| 431 | + carParkPanorama:[], | |
| 432 | + enterpriseList:[] | |
| 433 | + }; | |
| 434 | + }, | |
| 435 | + created() { | |
| 436 | + getAreaList().then(res => { | |
| 437 | + this.areas = res.data; | |
| 438 | + }); | |
| 439 | + this.queryParams = { | |
| 440 | + companyType:"0" | |
| 441 | + } | |
| 442 | + listEnterprise(this.queryParams).then(response => { | |
| 443 | + this.enterpriseList = response.rows; | |
| 444 | + }); | |
| 445 | + this.initData(); | |
| 446 | + }, | |
| 447 | + watch: { | |
| 448 | + '$route.query.enterpriseId': 'initData' | |
| 449 | + }, | |
| 450 | + methods: { | |
| 451 | + reset(){ | |
| 452 | + this.form = {}; | |
| 453 | + this.transportPermission = []; | |
| 454 | + this.enterpriseBusinessLicense = []; | |
| 455 | + this.safetyOfficerQualificationCertificate = []; | |
| 456 | + this.safetyCertificate = []; | |
| 457 | + this.carParkPanorama = []; | |
| 458 | + }, | |
| 459 | + initData(){ | |
| 460 | + this.reset(); | |
| 461 | + let id = this.$route.query.enterpriseId; | |
| 462 | + if(id!=null){ | |
| 463 | + getEnterprise(id).then(response => { | |
| 464 | + this.form = response.data; | |
| 465 | + //将附件转换为前端可视化数组 | |
| 466 | + if(this.form.transportPermission!=null&&this.form.transportPermission!==""){ | |
| 467 | + let approvalDocument = this.form.transportPermission.split(";"); | |
| 468 | + approvalDocument.map(item=>{ | |
| 469 | + let name = item.substring(item.lastIndexOf("/")+1); | |
| 470 | + this.transportPermission.push({name:name,url:item}) | |
| 471 | + }) | |
| 472 | + } | |
| 473 | + if(this.form.enterpriseBusinessLicense!=null&&this.form.enterpriseBusinessLicense!==""){ | |
| 474 | + let approvalData = this.form.enterpriseBusinessLicense.split(";"); | |
| 475 | + approvalData.map(item=>{ | |
| 476 | + let name = item.substring(item.lastIndexOf("/")+1); | |
| 477 | + this.enterpriseBusinessLicense.push({name:name,url:item}) | |
| 478 | + }) | |
| 479 | + } | |
| 480 | + if(this.form.safetyOfficerQualificationCertificate!=null&&this.form.safetyOfficerQualificationCertificate!==""){ | |
| 481 | + let scenePhoto = this.form.safetyOfficerQualificationCertificate.split(";"); | |
| 482 | + scenePhoto.map(item=>{ | |
| 483 | + let name = item.substring(item.lastIndexOf("/")+1); | |
| 484 | + this.safetyOfficerQualificationCertificate.push({name:name,url:item}) | |
| 485 | + }) | |
| 486 | + } | |
| 487 | + if(this.form.safetyCertificate!=null&&this.form.safetyCertificate!==""){ | |
| 488 | + let carWashingFacilitiesImage = this.form.safetyCertificate.split(";"); | |
| 489 | + carWashingFacilitiesImage.map(item=>{ | |
| 490 | + let name = item.substring(item.lastIndexOf("/")+1); | |
| 491 | + this.safetyCertificate.push({name:name,url:item}) | |
| 492 | + }) | |
| 493 | + } | |
| 494 | + if(this.form.carParkPanorama!=null&&this.form.carParkPanorama!==""){ | |
| 495 | + let safetyAssessmentReport = this.form.carParkPanorama.split(";"); | |
| 496 | + safetyAssessmentReport.map(item=>{ | |
| 497 | + let name = item.substring(item.lastIndexOf("/")+1); | |
| 498 | + this.carParkPanorama.push({name:name,url:item}) | |
| 499 | + }) | |
| 500 | + } | |
| 501 | + }); | |
| 502 | + } | |
| 503 | + }, | |
| 504 | + createUrl(file){ | |
| 505 | + if(file.raw!=null){ | |
| 506 | + return URL.createObjectURL(file.raw); | |
| 507 | + }else{ | |
| 508 | + return process.env.VUE_APP_BASE_API + file.url; | |
| 509 | + } | |
| 510 | + | |
| 511 | + }, | |
| 512 | + tempDownload(row){ | |
| 513 | + let name = row.name; | |
| 514 | + let url = ""; | |
| 515 | + if(row.raw!=null){ | |
| 516 | + url = URL.createObjectURL(row.raw); | |
| 517 | + }else{ | |
| 518 | + url = process.env.VUE_APP_BASE_API + row.url; | |
| 519 | + } | |
| 520 | + const a = document.createElement('a') | |
| 521 | + a.setAttribute('download', name) | |
| 522 | + a.setAttribute('target', '_blank') | |
| 523 | + a.setAttribute('href', url); | |
| 524 | + a.click() | |
| 525 | + }, | |
| 526 | + // 取消按钮 | |
| 527 | + cancel() { | |
| 528 | + this.$tab.closePage({path:"/enterprise/info"}).then(() => { | |
| 529 | + this.$tab.openPage("处理场所管理", "/tool/enterprise",{enterpriseRefresh:1}) | |
| 530 | + }) | |
| 531 | + }, | |
| 532 | + /** 提交按钮 */ | |
| 533 | + submitForm() { | |
| 534 | + this.$refs["form"].validate(valid => { | |
| 535 | + if (valid) { | |
| 536 | + let phoneTest = /^1[3456789]\d{9}$/; | |
| 537 | + if(phoneTest.test(this.form.safetyManagerPhone)===false){ | |
| 538 | + this.msgError("请输入正确的企业安全负责人联系方式"); | |
| 539 | + return false; | |
| 540 | + } | |
| 541 | + if(phoneTest.test(this.form.legalRepresentativePhone)===false){ | |
| 542 | + this.msgError("请输入正确的法人代表联系方式"); | |
| 543 | + return false; | |
| 544 | + } | |
| 545 | + let formData = new FormData(); | |
| 546 | + let form = this.form; | |
| 547 | + //去掉params属性 | |
| 548 | + delete form.params; | |
| 549 | + | |
| 550 | + //先清空原有的附件 | |
| 551 | + form.transportPermission = null; | |
| 552 | + form.enterpriseBusinessLicense = null; | |
| 553 | + form.safetyOfficerQualificationCertificate = null; | |
| 554 | + form.safetyCertificate = null; | |
| 555 | + form.carParkPanorama = null; | |
| 556 | + form.companyType = "1"; | |
| 557 | + | |
| 558 | + this.transportPermission.forEach(item => { | |
| 559 | + if (item.raw != null) { | |
| 560 | + formData.append('transportPermissionFiles', item.raw) | |
| 561 | + }else{ | |
| 562 | + //将原有的附件拼接到form中 | |
| 563 | + form.transportPermission = form.transportPermission!==null?form.transportPermission+";"+item.url:item.url; | |
| 564 | + } | |
| 565 | + }) | |
| 566 | + | |
| 567 | + this.enterpriseBusinessLicense.forEach(item => { | |
| 568 | + if (item.raw != null) { | |
| 569 | + formData.append('enterpriseBusinessLicenseFiles', item.raw) | |
| 570 | + }else{ | |
| 571 | + //将原有的附件拼接到form中 | |
| 572 | + form.enterpriseBusinessLicense = form.enterpriseBusinessLicense!==null?form.enterpriseBusinessLicense+";"+item.url:item.url; | |
| 573 | + } | |
| 574 | + }) | |
| 575 | + this.safetyOfficerQualificationCertificate.forEach(item => { | |
| 576 | + if (item.raw != null) { | |
| 577 | + formData.append('safetyOfficerQualificationCertificateFiles', item.raw) | |
| 578 | + }else{ | |
| 579 | + //将原有的附件拼接到form中 | |
| 580 | + form.safetyOfficerQualificationCertificate = form.safetyOfficerQualificationCertificate!==null?form.safetyOfficerQualificationCertificate+";"+item.url:item.url; | |
| 581 | + } | |
| 582 | + }) | |
| 583 | + this.safetyCertificate.forEach(item => { | |
| 584 | + if (item.raw != null) { | |
| 585 | + formData.append('safetyCertificateFiles', item.raw) | |
| 586 | + }else{ | |
| 587 | + //将原有的附件拼接到form中 | |
| 588 | + form.safetyCertificate = form.safetyCertificate!==null?form.safetyCertificate+";"+item.url:item.url; | |
| 589 | + } | |
| 590 | + }) | |
| 591 | + this.carParkPanorama.forEach(item => { | |
| 592 | + if (item.raw != null) { | |
| 593 | + formData.append('carParkPanoramaFiles', item.raw) | |
| 594 | + }else{ | |
| 595 | + //将原有的附件拼接到form中 | |
| 596 | + form.carParkPanorama = form.carParkPanorama!==null?form.carParkPanorama+";"+item.url:item.url; | |
| 597 | + } | |
| 598 | + }) | |
| 599 | + for (let key in form) { | |
| 600 | + formData.append(key, form[key] == null ? "" : form[key]) | |
| 601 | + } | |
| 602 | + if (this.form.id != null) { | |
| 603 | + updateEnterprise(formData).then(response => { | |
| 604 | + this.msgSuccess("修改成功"); | |
| 605 | + this.$tab.closePage({path:"/enterprise/infoEdit"}).then(() => { | |
| 606 | + this.$tab.openPage("运输企业管理", "/tool/enterprise",{enterpriseRefresh:1}) | |
| 607 | + }) | |
| 608 | + }); | |
| 609 | + } else { | |
| 610 | + addEnterprise(formData).then(response => { | |
| 611 | + this.msgSuccess("新增成功"); | |
| 612 | + this.$tab.closePage({path:"/enterprise/info"}).then(() => { | |
| 613 | + this.$tab.openPage("运输企业管理", "/tool/enterprise",{enterpriseRefresh:1}) | |
| 614 | + }) | |
| 615 | + }); | |
| 616 | + } | |
| 617 | + } | |
| 618 | + }); | |
| 619 | + }, | |
| 620 | + /** | |
| 621 | + * 文件改变时,限制文件上传格式和大小 | |
| 622 | + * 文件格式只能为docx/doc/pdf/png/jpeg/png/jpg | |
| 623 | + * 大小不超过20M | |
| 624 | + * */ | |
| 625 | + fileChange(file, fileList) { | |
| 626 | + let count = 0; | |
| 627 | + for (let i = 0; i < fileList.length; i++) { | |
| 628 | + // console.log(fileList.length) | |
| 629 | + // console.log(this.fileEntityList[i].name+"111"+file.name) | |
| 630 | + if (fileList[i].name == file.name) { | |
| 631 | + count++; | |
| 632 | + if (count == 2) { | |
| 633 | + this.$message({ | |
| 634 | + message: '已存在此文件!', | |
| 635 | + type: 'warning' | |
| 636 | + }); | |
| 637 | + for (let j = fileList.length; j > 0; j--) { | |
| 638 | + //如果存在此文件,去除新选择的重复文件 | |
| 639 | + if (fileList[j - 1].name == file.name) { | |
| 640 | + fileList.splice(j - 1, 1); | |
| 641 | + i--; | |
| 642 | + return false; | |
| 643 | + } | |
| 644 | + } | |
| 645 | + } | |
| 646 | + } | |
| 647 | + } | |
| 648 | + let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase(); | |
| 649 | + //格式符合后判断大小 | |
| 650 | + if ("jpg,jpeg,png,gif,jfif,pjpeg,pjp,pdf,doc,docx,xls,xlsx".indexOf(fileType) != -1) { | |
| 651 | + let max5M = file.size / 1024 / 1024 < 100; | |
| 652 | + if (!max5M) { | |
| 653 | + this.$message({ | |
| 654 | + message: '上传文件大小不得超过100M!', | |
| 655 | + type: 'warning' | |
| 656 | + }); | |
| 657 | + fileList = fileList.splice(fileList.length - 1, 1); | |
| 658 | + } else { | |
| 659 | + //符合条件后进行添加 | |
| 660 | + this.transportPermission = fileList | |
| 661 | + } | |
| 662 | + } else { | |
| 663 | + this.$message({ | |
| 664 | + message: '上传文件只能是.jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx格式!', | |
| 665 | + type: 'warning' | |
| 666 | + }); | |
| 667 | + fileList = fileList.splice(fileList.length - 1, 1); | |
| 668 | + } | |
| 669 | + }, | |
| 670 | + fileChange1(file, fileList) { | |
| 671 | + let count = 0; | |
| 672 | + for (let i = 0; i < fileList.length; i++) { | |
| 673 | + // console.log(fileList.length) | |
| 674 | + // console.log(this.fileEntityList[i].name+"111"+file.name) | |
| 675 | + if (fileList[i].name == file.name) { | |
| 676 | + count++; | |
| 677 | + if (count == 2) { | |
| 678 | + this.$message({ | |
| 679 | + message: '已存在此文件!', | |
| 680 | + type: 'warning' | |
| 681 | + }); | |
| 682 | + for (let j = fileList.length; j > 0; j--) { | |
| 683 | + //如果存在此文件,去除新选择的重复文件 | |
| 684 | + if (fileList[j - 1].name == file.name) { | |
| 685 | + fileList.splice(j - 1, 1); | |
| 686 | + i--; | |
| 687 | + return false; | |
| 688 | + } | |
| 689 | + } | |
| 690 | + } | |
| 691 | + } | |
| 692 | + } | |
| 693 | + let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase(); | |
| 694 | + //格式符合后判断大小 | |
| 695 | + if ("jpg,jpeg,png,gif,jfif,pjpeg,pjp,pdf,doc,docx,xls,xlsx".indexOf(fileType) != -1) { | |
| 696 | + let max5M = file.size / 1024 / 1024 < 100; | |
| 697 | + if (!max5M) { | |
| 698 | + this.$message({ | |
| 699 | + message: '上传文件大小不得超过100M!', | |
| 700 | + type: 'warning' | |
| 701 | + }); | |
| 702 | + fileList = fileList.splice(fileList.length - 1, 1); | |
| 703 | + } else { | |
| 704 | + //符合条件后进行添加 | |
| 705 | + this.enterpriseBusinessLicense = fileList | |
| 706 | + } | |
| 707 | + } else { | |
| 708 | + this.$message({ | |
| 709 | + message: '上传文件只能是.jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx格式!', | |
| 710 | + type: 'warning' | |
| 711 | + }); | |
| 712 | + fileList = fileList.splice(fileList.length - 1, 1); | |
| 713 | + } | |
| 714 | + }, | |
| 715 | + fileChange2(file, fileList) { | |
| 716 | + let count = 0; | |
| 717 | + for (let i = 0; i < fileList.length; i++) { | |
| 718 | + // console.log(fileList.length) | |
| 719 | + // console.log(this.fileEntityList[i].name+"111"+file.name) | |
| 720 | + if (fileList[i].name == file.name) { | |
| 721 | + count++; | |
| 722 | + if (count == 2) { | |
| 723 | + this.$message({ | |
| 724 | + message: '已存在此文件!', | |
| 725 | + type: 'warning' | |
| 726 | + }); | |
| 727 | + for (let j = fileList.length; j > 0; j--) { | |
| 728 | + //如果存在此文件,去除新选择的重复文件 | |
| 729 | + if (fileList[j - 1].name == file.name) { | |
| 730 | + fileList.splice(j - 1, 1); | |
| 731 | + i--; | |
| 732 | + return false; | |
| 733 | + } | |
| 734 | + } | |
| 735 | + } | |
| 736 | + } | |
| 737 | + } | |
| 738 | + let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase(); | |
| 739 | + //格式符合后判断大小 | |
| 740 | + if ("jpg,jpeg,png,gif,jfif,pjpeg,pjp,pdf,doc,docx,xls,xlsx".indexOf(fileType) != -1) { | |
| 741 | + let max5M = file.size / 1024 / 1024 < 100; | |
| 742 | + if (!max5M) { | |
| 743 | + this.$message({ | |
| 744 | + message: '上传文件大小不得超过100M!', | |
| 745 | + type: 'warning' | |
| 746 | + }); | |
| 747 | + fileList = fileList.splice(fileList.length - 1, 1); | |
| 748 | + } else { | |
| 749 | + //符合条件后进行添加 | |
| 750 | + this.safetyOfficerQualificationCertificate = fileList | |
| 751 | + } | |
| 752 | + } else { | |
| 753 | + this.$message({ | |
| 754 | + message: '上传文件只能是.jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx格式!', | |
| 755 | + type: 'warning' | |
| 756 | + }); | |
| 757 | + fileList = fileList.splice(fileList.length - 1, 1); | |
| 758 | + } | |
| 759 | + }, | |
| 760 | + fileChange3(file, fileList) { | |
| 761 | + let count = 0; | |
| 762 | + for (let i = 0; i < fileList.length; i++) { | |
| 763 | + // console.log(fileList.length) | |
| 764 | + // console.log(this.fileEntityList[i].name+"111"+file.name) | |
| 765 | + if (fileList[i].name == file.name) { | |
| 766 | + count++; | |
| 767 | + if (count == 2) { | |
| 768 | + this.$message({ | |
| 769 | + message: '已存在此文件!', | |
| 770 | + type: 'warning' | |
| 771 | + }); | |
| 772 | + for (let j = fileList.length; j > 0; j--) { | |
| 773 | + //如果存在此文件,去除新选择的重复文件 | |
| 774 | + if (fileList[j - 1].name == file.name) { | |
| 775 | + fileList.splice(j - 1, 1); | |
| 776 | + i--; | |
| 777 | + return false; | |
| 778 | + } | |
| 779 | + } | |
| 780 | + } | |
| 781 | + } | |
| 782 | + } | |
| 783 | + let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase(); | |
| 784 | + //格式符合后判断大小 | |
| 785 | + if ("jpg,jpeg,png,gif,jfif,pjpeg,pjp,pdf,doc,docx,xls,xlsx".indexOf(fileType) != -1) { | |
| 786 | + let max5M = file.size / 1024 / 1024 < 100; | |
| 787 | + if (!max5M) { | |
| 788 | + this.$message({ | |
| 789 | + message: '上传文件大小不得超过100M!', | |
| 790 | + type: 'warning' | |
| 791 | + }); | |
| 792 | + fileList = fileList.splice(fileList.length - 1, 1); | |
| 793 | + } else { | |
| 794 | + //符合条件后进行添加 | |
| 795 | + this.safetyCertificate = fileList | |
| 796 | + } | |
| 797 | + } else { | |
| 798 | + this.$message({ | |
| 799 | + message: '上传文件只能是.jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx格式!', | |
| 800 | + type: 'warning' | |
| 801 | + }); | |
| 802 | + fileList = fileList.splice(fileList.length - 1, 1); | |
| 803 | + } | |
| 804 | + }, | |
| 805 | + fileChange4(file, fileList) { | |
| 806 | + let count = 0; | |
| 807 | + for (let i = 0; i < fileList.length; i++) { | |
| 808 | + // console.log(fileList.length) | |
| 809 | + // console.log(this.fileEntityList[i].name+"111"+file.name) | |
| 810 | + if (fileList[i].name == file.name) { | |
| 811 | + count++; | |
| 812 | + if (count == 2) { | |
| 813 | + this.$message({ | |
| 814 | + message: '已存在此文件!', | |
| 815 | + type: 'warning' | |
| 816 | + }); | |
| 817 | + for (let j = fileList.length; j > 0; j--) { | |
| 818 | + //如果存在此文件,去除新选择的重复文件 | |
| 819 | + if (fileList[j - 1].name == file.name) { | |
| 820 | + fileList.splice(j - 1, 1); | |
| 821 | + i--; | |
| 822 | + return false; | |
| 823 | + } | |
| 824 | + } | |
| 825 | + } | |
| 826 | + } | |
| 827 | + } | |
| 828 | + let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase(); | |
| 829 | + //格式符合后判断大小 | |
| 830 | + if ("jpg,jpeg,png,gif,jfif,pjpeg,pjp,pdf,doc,docx,xls,xlsx".indexOf(fileType) != -1) { | |
| 831 | + let max5M = file.size / 1024 / 1024 < 100; | |
| 832 | + if (!max5M) { | |
| 833 | + this.$message({ | |
| 834 | + message: '上传文件大小不得超过100M!', | |
| 835 | + type: 'warning' | |
| 836 | + }); | |
| 837 | + fileList = fileList.splice(fileList.length - 1, 1); | |
| 838 | + } else { | |
| 839 | + //符合条件后进行添加 | |
| 840 | + this.carParkPanorama = fileList | |
| 841 | + } | |
| 842 | + } else { | |
| 843 | + this.$message({ | |
| 844 | + message: '上传文件只能是.jpg,.jpeg,.png,.gif,.jfif,.pjpeg,.pjp,.pdf,.doc,.docx,.xls,.xlsx格式!', | |
| 845 | + type: 'warning' | |
| 846 | + }); | |
| 847 | + fileList = fileList.splice(fileList.length - 1, 1); | |
| 848 | + } | |
| 849 | + }, | |
| 850 | + } | |
| 851 | +}; | |
| 852 | +</script> | |
| 853 | +<style lang="scss" scoped> | |
| 854 | +.upload_lable{ | |
| 855 | + border-right: 1px solid #dcdfe6; | |
| 856 | + padding: 27px 30px; | |
| 857 | + background: #fafafa; | |
| 858 | + text-align: center; | |
| 859 | +} | |
| 860 | +.upload_btn{ | |
| 861 | + max-height: 106px; | |
| 862 | +} | |
| 863 | +.upload_close{ | |
| 864 | + position: absolute; | |
| 865 | + left: 105px; | |
| 866 | + z-index:99; | |
| 867 | + top:-1px; | |
| 868 | + font-size:18px; | |
| 869 | + color:red; | |
| 870 | +} | |
| 871 | +.upload_close_file{ | |
| 872 | + position: absolute; | |
| 873 | + left: 80px; | |
| 874 | + z-index:99; | |
| 875 | + top:-1px; | |
| 876 | + font-size:18px; | |
| 877 | + color:red; | |
| 878 | +} | |
| 879 | +.upload_div_image{ | |
| 880 | + display: inline-block; | |
| 881 | + width: 110px; | |
| 882 | + height: 95px; | |
| 883 | + position: relative; | |
| 884 | + float: left; | |
| 885 | + margin-left: 5px; | |
| 886 | +} | |
| 887 | +.upload_div_file{ | |
| 888 | + display: inline-block; | |
| 889 | + width: 110px; | |
| 890 | + height: 95px; | |
| 891 | + text-align: center; | |
| 892 | + float:left; | |
| 893 | + margin: 5px; | |
| 894 | + position: relative; | |
| 895 | +} | |
| 896 | +.serach_map{ | |
| 897 | + position: absolute; | |
| 898 | + top: 100px; | |
| 899 | + left: 25px; | |
| 900 | + z-index: 999; | |
| 901 | + background: #fff; | |
| 902 | + padding: 10px; | |
| 903 | + border-radius: 5px; | |
| 904 | + box-shadow: 0 0 10px rgba(0,0,0,.2); | |
| 905 | +} | |
| 906 | +</style> | ... | ... |
trash-unit/src/main/java/com/trash/carInfo/controller/CarInfoController.java
| 1 | 1 | package com.trash.carInfo.controller; |
| 2 | 2 | |
| 3 | +import java.io.IOException; | |
| 3 | 4 | import java.util.List; |
| 5 | + | |
| 6 | +import com.trash.carInfo.domain.vo.CarInfoVo; | |
| 4 | 7 | import org.springframework.security.access.prepost.PreAuthorize; |
| 5 | 8 | import org.springframework.beans.factory.annotation.Autowired; |
| 6 | -import org.springframework.web.bind.annotation.GetMapping; | |
| 7 | -import org.springframework.web.bind.annotation.PostMapping; | |
| 8 | -import org.springframework.web.bind.annotation.PutMapping; | |
| 9 | -import org.springframework.web.bind.annotation.DeleteMapping; | |
| 10 | -import org.springframework.web.bind.annotation.PathVariable; | |
| 11 | -import org.springframework.web.bind.annotation.RequestBody; | |
| 12 | -import org.springframework.web.bind.annotation.RequestMapping; | |
| 13 | -import org.springframework.web.bind.annotation.RestController; | |
| 9 | +import org.springframework.web.bind.annotation.*; | |
| 14 | 10 | import com.trash.common.annotation.Log; |
| 15 | 11 | import com.trash.common.core.controller.BaseController; |
| 16 | 12 | import com.trash.common.core.domain.AjaxResult; |
| ... | ... | @@ -19,15 +15,16 @@ import com.trash.carInfo.domain.CarInfo; |
| 19 | 15 | import com.trash.carInfo.service.ICarInfoService; |
| 20 | 16 | import com.trash.common.utils.poi.ExcelUtil; |
| 21 | 17 | import com.trash.common.core.page.TableDataInfo; |
| 18 | +import org.springframework.web.multipart.MultipartFile; | |
| 22 | 19 | |
| 23 | 20 | /** |
| 24 | 21 | * 运输车辆管理Controller |
| 25 | 22 | * |
| 26 | 23 | * @author trash |
| 27 | - * @date 2023-11-15 | |
| 24 | + * @date 2023-11-21 | |
| 28 | 25 | */ |
| 29 | 26 | @RestController |
| 30 | -@RequestMapping("/carInfo") | |
| 27 | +@RequestMapping("/unit/carInfo") | |
| 31 | 28 | public class CarInfoController extends BaseController |
| 32 | 29 | { |
| 33 | 30 | @Autowired |
| ... | ... | @@ -36,32 +33,32 @@ public class CarInfoController extends BaseController |
| 36 | 33 | /** |
| 37 | 34 | * 查询运输车辆管理列表 |
| 38 | 35 | */ |
| 39 | -// @PreAuthorize("@ss.hasPermi('carInfo:carInfo:list')") | |
| 36 | + @PreAuthorize("@ss.hasPermi('unit:carInfo:list')") | |
| 40 | 37 | @GetMapping("/list") |
| 41 | - public TableDataInfo list(CarInfo carInfo) | |
| 38 | + public TableDataInfo list(CarInfoVo carInfo) | |
| 42 | 39 | { |
| 43 | 40 | startPage(); |
| 44 | - List<CarInfo> list = carInfoService.selectCarInfoList(carInfo); | |
| 41 | + List<CarInfoVo> list = carInfoService.selectCarInfoList(carInfo); | |
| 45 | 42 | return getDataTable(list); |
| 46 | 43 | } |
| 47 | 44 | |
| 48 | 45 | /** |
| 49 | 46 | * 导出运输车辆管理列表 |
| 50 | 47 | */ |
| 51 | - @PreAuthorize("@ss.hasPermi('carInfo:carInfo:export')") | |
| 48 | + @PreAuthorize("@ss.hasPermi('unit:carInfo:export')") | |
| 52 | 49 | @Log(title = "运输车辆管理", businessType = BusinessType.EXPORT) |
| 53 | 50 | @GetMapping("/export") |
| 54 | - public AjaxResult export(CarInfo carInfo) | |
| 51 | + public AjaxResult export(CarInfoVo carInfo) | |
| 55 | 52 | { |
| 56 | - List<CarInfo> list = carInfoService.selectCarInfoList(carInfo); | |
| 57 | - ExcelUtil<CarInfo> util = new ExcelUtil<CarInfo>(CarInfo.class); | |
| 53 | + List<CarInfoVo> list = carInfoService.selectCarInfoList(carInfo); | |
| 54 | + ExcelUtil<CarInfoVo> util = new ExcelUtil<CarInfoVo>(CarInfoVo.class); | |
| 58 | 55 | return util.exportExcel(list, "carInfo"); |
| 59 | 56 | } |
| 60 | 57 | |
| 61 | 58 | /** |
| 62 | 59 | * 获取运输车辆管理详细信息 |
| 63 | 60 | */ |
| 64 | - @PreAuthorize("@ss.hasPermi('carInfo:carInfo:query')") | |
| 61 | + @PreAuthorize("@ss.hasPermi('unit:carInfo:query')") | |
| 65 | 62 | @GetMapping(value = "/{id}") |
| 66 | 63 | public AjaxResult getInfo(@PathVariable("id") Long id) |
| 67 | 64 | { |
| ... | ... | @@ -71,29 +68,39 @@ public class CarInfoController extends BaseController |
| 71 | 68 | /** |
| 72 | 69 | * 新增运输车辆管理 |
| 73 | 70 | */ |
| 74 | - @PreAuthorize("@ss.hasPermi('carInfo:carInfo:add')") | |
| 71 | + @PreAuthorize("@ss.hasPermi('unit:carInfo:add')") | |
| 75 | 72 | @Log(title = "运输车辆管理", businessType = BusinessType.INSERT) |
| 76 | 73 | @PostMapping |
| 77 | - public AjaxResult add(@RequestBody CarInfo carInfo) | |
| 78 | - { | |
| 79 | - return toAjax(carInfoService.insertCarInfo(carInfo)); | |
| 74 | + public AjaxResult add(@RequestParam(value = "roadTransportFiles") MultipartFile[] roadTransportFiles, | |
| 75 | + @RequestParam(value = "drivingLicenseFiles") MultipartFile[] drivingLicenseFiles, | |
| 76 | + @RequestParam(value = "carFrontFiles") MultipartFile[] carFrontFiles, | |
| 77 | + @RequestParam(value = "carLeftFiles") MultipartFile[] carLeftFiles, | |
| 78 | + @RequestParam(value = "carBehindFiles") MultipartFile[] carBehindFiles, | |
| 79 | + @RequestParam(value = "carRightFiles") MultipartFile[] carRightFiles, | |
| 80 | + CarInfo carInfo) throws IOException { | |
| 81 | + return toAjax(carInfoService.insertCarInfo(roadTransportFiles, drivingLicenseFiles, carFrontFiles, carLeftFiles, carBehindFiles, carRightFiles, carInfo)); | |
| 80 | 82 | } |
| 81 | 83 | |
| 82 | 84 | /** |
| 83 | 85 | * 修改运输车辆管理 |
| 84 | 86 | */ |
| 85 | - @PreAuthorize("@ss.hasPermi('carInfo:carInfo:edit')") | |
| 87 | + @PreAuthorize("@ss.hasPermi('unit:carInfo:edit')") | |
| 86 | 88 | @Log(title = "运输车辆管理", businessType = BusinessType.UPDATE) |
| 87 | 89 | @PutMapping |
| 88 | - public AjaxResult edit(@RequestBody CarInfo carInfo) | |
| 89 | - { | |
| 90 | - return toAjax(carInfoService.updateCarInfo(carInfo)); | |
| 90 | + public AjaxResult edit(@RequestParam(value = "roadTransportFiles") MultipartFile[] roadTransportFiles, | |
| 91 | + @RequestParam(value = "drivingLicenseFiles") MultipartFile[] drivingLicenseFiles, | |
| 92 | + @RequestParam(value = "carFrontFiles") MultipartFile[] carFrontFiles, | |
| 93 | + @RequestParam(value = "carLeftFiles") MultipartFile[] carLeftFiles, | |
| 94 | + @RequestParam(value = "carBehindFiles") MultipartFile[] carBehindFiles, | |
| 95 | + @RequestParam(value = "carRightFiles") MultipartFile[] carRightFiles, | |
| 96 | + CarInfo carInfo) throws IOException { | |
| 97 | + return toAjax(carInfoService.updateCarInfo(roadTransportFiles, drivingLicenseFiles, carFrontFiles, carLeftFiles, carBehindFiles, carRightFiles, carInfo)); | |
| 91 | 98 | } |
| 92 | 99 | |
| 93 | 100 | /** |
| 94 | 101 | * 删除运输车辆管理 |
| 95 | 102 | */ |
| 96 | - @PreAuthorize("@ss.hasPermi('carInfo:carInfo:remove')") | |
| 103 | + @PreAuthorize("@ss.hasPermi('unit:carInfo:remove')") | |
| 97 | 104 | @Log(title = "运输车辆管理", businessType = BusinessType.DELETE) |
| 98 | 105 | @DeleteMapping("/{ids}") |
| 99 | 106 | public AjaxResult remove(@PathVariable Long[] ids) | ... | ... |
trash-unit/src/main/java/com/trash/carInfo/domain/CarDriverRelation.java
0 → 100644
| 1 | +package com.trash.carInfo.domain; | |
| 2 | + | |
| 3 | +public class CarDriverRelation { | |
| 4 | + | |
| 5 | + private Long id; | |
| 6 | + | |
| 7 | + private Long carId; | |
| 8 | + | |
| 9 | + | |
| 10 | + private Long driverId; | |
| 11 | + | |
| 12 | + public Long getId() { | |
| 13 | + return id; | |
| 14 | + } | |
| 15 | + | |
| 16 | + public void setId(Long id) { | |
| 17 | + this.id = id; | |
| 18 | + } | |
| 19 | + | |
| 20 | + public Long getCarId() { | |
| 21 | + return carId; | |
| 22 | + } | |
| 23 | + | |
| 24 | + public void setCarId(Long carId) { | |
| 25 | + this.carId = carId; | |
| 26 | + } | |
| 27 | + | |
| 28 | + public Long getDriverId() { | |
| 29 | + return driverId; | |
| 30 | + } | |
| 31 | + | |
| 32 | + public void setDriverId(Long driverId) { | |
| 33 | + this.driverId = driverId; | |
| 34 | + } | |
| 35 | +} | ... | ... |
trash-unit/src/main/java/com/trash/carInfo/domain/CarInfo.java
| ... | ... | @@ -11,7 +11,7 @@ import com.trash.common.core.domain.BaseEntity; |
| 11 | 11 | * 运输车辆管理对象 car_info |
| 12 | 12 | * |
| 13 | 13 | * @author trash |
| 14 | - * @date 2023-11-15 | |
| 14 | + * @date 2023-11-21 | |
| 15 | 15 | */ |
| 16 | 16 | public class CarInfo extends BaseEntity |
| 17 | 17 | { |
| ... | ... | @@ -63,10 +63,14 @@ public class CarInfo extends BaseEntity |
| 63 | 63 | @Excel(name = "车辆标识牌") |
| 64 | 64 | private String carIdentification; |
| 65 | 65 | |
| 66 | - /** 车辆体积 */ | |
| 67 | - @Excel(name = "车辆体积") | |
| 66 | + /** 货箱体积 */ | |
| 67 | + @Excel(name = "货箱体积") | |
| 68 | 68 | private String containerVolume; |
| 69 | 69 | |
| 70 | + /** 货箱长宽高 */ | |
| 71 | + @Excel(name = "货箱长宽高") | |
| 72 | + private String lengthWidthHeight; | |
| 73 | + | |
| 70 | 74 | /** 车辆颜色 */ |
| 71 | 75 | @Excel(name = "车辆颜色") |
| 72 | 76 | private String carColor; |
| ... | ... | @@ -104,10 +108,26 @@ public class CarInfo extends BaseEntity |
| 104 | 108 | private String drivers; |
| 105 | 109 | |
| 106 | 110 | /** 审批状态,0=审批中,1=审批通过,2=被驳回 */ |
| 107 | - @Excel(name = "审批状态,0=审批中,1=审批通过,2=被驳回") | |
| 111 | + @Excel(name = "审批状态",readConverterExp = "0=审批中,1=审批通过,2=被驳回") | |
| 108 | 112 | private Integer status; |
| 109 | 113 | |
| 110 | - public void setId(Long id) | |
| 114 | + /** 信用状态 */ | |
| 115 | + @Excel(name = "信用状态") | |
| 116 | + private String creditStatus; | |
| 117 | + | |
| 118 | + /** 二维码 */ | |
| 119 | + @Excel(name = "二维码") | |
| 120 | + private String qrCode; | |
| 121 | + | |
| 122 | + public String getLengthWidthHeight() { | |
| 123 | + return lengthWidthHeight; | |
| 124 | + } | |
| 125 | + | |
| 126 | + public void setLengthWidthHeight(String lengthWidthHeight) { | |
| 127 | + this.lengthWidthHeight = lengthWidthHeight; | |
| 128 | + } | |
| 129 | + | |
| 130 | + public void setId(Long id) | |
| 111 | 131 | { |
| 112 | 132 | this.id = id; |
| 113 | 133 | } |
| ... | ... | @@ -305,6 +325,24 @@ public class CarInfo extends BaseEntity |
| 305 | 325 | { |
| 306 | 326 | return status; |
| 307 | 327 | } |
| 328 | + public void setCreditStatus(String creditStatus) | |
| 329 | + { | |
| 330 | + this.creditStatus = creditStatus; | |
| 331 | + } | |
| 332 | + | |
| 333 | + public String getCreditStatus() | |
| 334 | + { | |
| 335 | + return creditStatus; | |
| 336 | + } | |
| 337 | + public void setQrCode(String qrCode) | |
| 338 | + { | |
| 339 | + this.qrCode = qrCode; | |
| 340 | + } | |
| 341 | + | |
| 342 | + public String getQrCode() | |
| 343 | + { | |
| 344 | + return qrCode; | |
| 345 | + } | |
| 308 | 346 | |
| 309 | 347 | @Override |
| 310 | 348 | public String toString() { |
| ... | ... | @@ -336,6 +374,8 @@ public class CarInfo extends BaseEntity |
| 336 | 374 | .append("createBy", getCreateBy()) |
| 337 | 375 | .append("updateTime", getUpdateTime()) |
| 338 | 376 | .append("updateBy", getUpdateBy()) |
| 377 | + .append("creditStatus", getCreditStatus()) | |
| 378 | + .append("qrCode", getQrCode()) | |
| 339 | 379 | .toString(); |
| 340 | 380 | } |
| 341 | 381 | } | ... | ... |
trash-unit/src/main/java/com/trash/carInfo/domain/vo/CarInfoVo.java
0 → 100644
| 1 | +package com.trash.carInfo.domain.vo; | |
| 2 | + | |
| 3 | +import com.trash.carInfo.domain.CarInfo; | |
| 4 | + | |
| 5 | +public class CarInfoVo extends CarInfo { | |
| 6 | + private String companyName; | |
| 7 | + | |
| 8 | + private String driversName; | |
| 9 | + | |
| 10 | + public String getCompanyName() { | |
| 11 | + return companyName; | |
| 12 | + } | |
| 13 | + | |
| 14 | + public void setCompanyName(String companyName) { | |
| 15 | + this.companyName = companyName; | |
| 16 | + } | |
| 17 | + | |
| 18 | + public String getDriversName() { | |
| 19 | + return driversName; | |
| 20 | + } | |
| 21 | + | |
| 22 | + public void setDriversName(String driversName) { | |
| 23 | + this.driversName = driversName; | |
| 24 | + } | |
| 25 | +} | ... | ... |
trash-unit/src/main/java/com/trash/carInfo/mapper/CarInfoMapper.java
| 1 | 1 | package com.trash.carInfo.mapper; |
| 2 | 2 | |
| 3 | 3 | import java.util.List; |
| 4 | + | |
| 5 | +import com.trash.carInfo.domain.CarDriverRelation; | |
| 4 | 6 | import com.trash.carInfo.domain.CarInfo; |
| 7 | +import com.trash.carInfo.domain.vo.CarInfoVo; | |
| 5 | 8 | |
| 6 | 9 | /** |
| 7 | 10 | * 运输车辆管理Mapper接口 |
| 8 | 11 | * |
| 9 | 12 | * @author trash |
| 10 | - * @date 2023-11-15 | |
| 13 | + * @date 2023-11-21 | |
| 11 | 14 | */ |
| 12 | 15 | public interface CarInfoMapper |
| 13 | 16 | { |
| ... | ... | @@ -25,7 +28,7 @@ public interface CarInfoMapper |
| 25 | 28 | * @param carInfo 运输车辆管理 |
| 26 | 29 | * @return 运输车辆管理集合 |
| 27 | 30 | */ |
| 28 | - List<CarInfo> selectCarInfoList(CarInfo carInfo); | |
| 31 | + List<CarInfoVo> selectCarInfoList(CarInfoVo carInfo); | |
| 29 | 32 | |
| 30 | 33 | /** |
| 31 | 34 | * 新增运输车辆管理 |
| ... | ... | @@ -58,4 +61,19 @@ public interface CarInfoMapper |
| 58 | 61 | * @return 结果 |
| 59 | 62 | */ |
| 60 | 63 | int deleteCarInfoByIds(Long[] ids); |
| 64 | + | |
| 65 | + /** | |
| 66 | + * 新增车辆驾驶员关系 | |
| 67 | + * @return 结果 | |
| 68 | + */ | |
| 69 | + int addCarDriverRelation(CarDriverRelation carDriverRelation); | |
| 70 | + | |
| 71 | + /** | |
| 72 | + * 删除车辆驾驶员关系 | |
| 73 | + * @param carId 车辆id | |
| 74 | + * @return 结果 | |
| 75 | + */ | |
| 76 | + int deleteCarDriverRelationByCarId(Long carId); | |
| 77 | + | |
| 78 | + | |
| 61 | 79 | } | ... | ... |
trash-unit/src/main/java/com/trash/carInfo/service/ICarInfoService.java
| 1 | 1 | package com.trash.carInfo.service; |
| 2 | 2 | |
| 3 | +import java.io.IOException; | |
| 3 | 4 | import java.util.List; |
| 4 | 5 | import com.trash.carInfo.domain.CarInfo; |
| 6 | +import com.trash.carInfo.domain.vo.CarInfoVo; | |
| 7 | +import org.springframework.web.multipart.MultipartFile; | |
| 5 | 8 | |
| 6 | 9 | /** |
| 7 | 10 | * 运输车辆管理Service接口 |
| 8 | 11 | * |
| 9 | 12 | * @author trash |
| 10 | - * @date 2023-11-15 | |
| 13 | + * @date 2023-11-21 | |
| 11 | 14 | */ |
| 12 | 15 | public interface ICarInfoService |
| 13 | 16 | { |
| ... | ... | @@ -21,27 +24,51 @@ public interface ICarInfoService |
| 21 | 24 | |
| 22 | 25 | /** |
| 23 | 26 | * 查询运输车辆管理列表 |
| 24 | - * | |
| 27 | + * | |
| 25 | 28 | * @param carInfo 运输车辆管理 |
| 26 | 29 | * @return 运输车辆管理集合 |
| 27 | 30 | */ |
| 28 | - List<CarInfo> selectCarInfoList(CarInfo carInfo); | |
| 31 | + List<CarInfoVo> selectCarInfoList(CarInfoVo carInfo); | |
| 29 | 32 | |
| 30 | 33 | /** |
| 31 | 34 | * 新增运输车辆管理 |
| 32 | - * | |
| 33 | - * @param carInfo 运输车辆管理 | |
| 35 | + * | |
| 36 | + * @param roadTransportFiles | |
| 37 | + * @param drivingLicenseFiles | |
| 38 | + * @param carFrontFiles | |
| 39 | + * @param carLeftFiles | |
| 40 | + * @param carBehindFiles | |
| 41 | + * @param carRightFiles | |
| 42 | + * @param carInfo 运输车辆管理 | |
| 34 | 43 | * @return 结果 |
| 35 | 44 | */ |
| 36 | - int insertCarInfo(CarInfo carInfo); | |
| 45 | + int insertCarInfo(MultipartFile[] roadTransportFiles, | |
| 46 | + MultipartFile[] drivingLicenseFiles, | |
| 47 | + MultipartFile[] carFrontFiles, | |
| 48 | + MultipartFile[] carLeftFiles, | |
| 49 | + MultipartFile[] carBehindFiles, | |
| 50 | + MultipartFile[] carRightFiles, | |
| 51 | + CarInfo carInfo) throws IOException; | |
| 37 | 52 | |
| 38 | 53 | /** |
| 39 | 54 | * 修改运输车辆管理 |
| 40 | - * | |
| 41 | - * @param carInfo 运输车辆管理 | |
| 55 | + * | |
| 56 | + * @param roadTransportFiles | |
| 57 | + * @param drivingLicenseFiles | |
| 58 | + * @param carFrontFiles | |
| 59 | + * @param carLeftFiles | |
| 60 | + * @param carBehindFiles | |
| 61 | + * @param carRightFiles | |
| 62 | + * @param carInfo 运输车辆管理 | |
| 42 | 63 | * @return 结果 |
| 43 | 64 | */ |
| 44 | - int updateCarInfo(CarInfo carInfo); | |
| 65 | + int updateCarInfo(MultipartFile[] roadTransportFiles, | |
| 66 | + MultipartFile[] drivingLicenseFiles, | |
| 67 | + MultipartFile[] carFrontFiles, | |
| 68 | + MultipartFile[] carLeftFiles, | |
| 69 | + MultipartFile[] carBehindFiles, | |
| 70 | + MultipartFile[] carRightFiles, | |
| 71 | + CarInfo carInfo) throws IOException; | |
| 45 | 72 | |
| 46 | 73 | /** |
| 47 | 74 | * 批量删除运输车辆管理 | ... | ... |
trash-unit/src/main/java/com/trash/carInfo/service/impl/CarInfoServiceImpl.java
| 1 | 1 | package com.trash.carInfo.service.impl; |
| 2 | 2 | |
| 3 | +import java.io.IOException; | |
| 3 | 4 | import java.util.List; |
| 5 | + | |
| 6 | +import com.trash.carInfo.domain.CarDriverRelation; | |
| 7 | +import com.trash.carInfo.domain.vo.CarInfoVo; | |
| 8 | +import com.trash.common.config.trashConfig; | |
| 4 | 9 | import com.trash.common.utils.DateUtils; |
| 10 | +import com.trash.common.utils.SecurityUtils; | |
| 11 | +import com.trash.enterprise.domain.TransportationEnterprise; | |
| 12 | +import com.trash.enterprise.mapper.TransportationEnterpriseMapper; | |
| 5 | 13 | import org.springframework.beans.factory.annotation.Autowired; |
| 6 | 14 | import org.springframework.stereotype.Service; |
| 7 | 15 | import com.trash.carInfo.mapper.CarInfoMapper; |
| 8 | 16 | import com.trash.carInfo.domain.CarInfo; |
| 9 | 17 | import com.trash.carInfo.service.ICarInfoService; |
| 18 | +import org.springframework.transaction.annotation.Transactional; | |
| 19 | +import org.springframework.web.multipart.MultipartFile; | |
| 20 | + | |
| 21 | +import static com.trash.common.utils.file.FileUploadUtils.upload; | |
| 10 | 22 | |
| 11 | 23 | /** |
| 12 | 24 | * 运输车辆管理Service业务层处理 |
| 13 | 25 | * |
| 14 | 26 | * @author trash |
| 15 | - * @date 2023-11-15 | |
| 27 | + * @date 2023-11-21 | |
| 16 | 28 | */ |
| 17 | 29 | @Service |
| 18 | 30 | public class CarInfoServiceImpl implements ICarInfoService |
| ... | ... | @@ -20,6 +32,9 @@ public class CarInfoServiceImpl implements ICarInfoService |
| 20 | 32 | @Autowired |
| 21 | 33 | private CarInfoMapper carInfoMapper; |
| 22 | 34 | |
| 35 | + @Autowired | |
| 36 | + private TransportationEnterpriseMapper transportationEnterpriseMapper; | |
| 37 | + | |
| 23 | 38 | /** |
| 24 | 39 | * 查询运输车辆管理 |
| 25 | 40 | * |
| ... | ... | @@ -34,39 +49,124 @@ public class CarInfoServiceImpl implements ICarInfoService |
| 34 | 49 | |
| 35 | 50 | /** |
| 36 | 51 | * 查询运输车辆管理列表 |
| 37 | - * | |
| 52 | + * | |
| 38 | 53 | * @param carInfo 运输车辆管理 |
| 39 | 54 | * @return 运输车辆管理 |
| 40 | 55 | */ |
| 41 | 56 | @Override |
| 42 | - public List<CarInfo> selectCarInfoList(CarInfo carInfo) | |
| 57 | + public List<CarInfoVo> selectCarInfoList(CarInfoVo carInfo) | |
| 43 | 58 | { |
| 44 | 59 | return carInfoMapper.selectCarInfoList(carInfo); |
| 45 | 60 | } |
| 46 | 61 | |
| 47 | 62 | /** |
| 48 | 63 | * 新增运输车辆管理 |
| 49 | - * | |
| 50 | - * @param carInfo 运输车辆管理 | |
| 64 | + * | |
| 65 | + * @param roadTransportFiles | |
| 66 | + * @param drivingLicenseFiles | |
| 67 | + * @param carFrontFiles | |
| 68 | + * @param carLeftFiles | |
| 69 | + * @param carBehindFiles | |
| 70 | + * @param carRightFiles | |
| 71 | + * @param carInfo 运输车辆管理 | |
| 51 | 72 | * @return 结果 |
| 52 | 73 | */ |
| 53 | 74 | @Override |
| 54 | - public int insertCarInfo(CarInfo carInfo) | |
| 55 | - { | |
| 75 | + @Transactional | |
| 76 | + public int insertCarInfo(MultipartFile[] roadTransportFiles, MultipartFile[] drivingLicenseFiles, MultipartFile[] carFrontFiles, MultipartFile[] carLeftFiles, MultipartFile[] carBehindFiles, MultipartFile[] carRightFiles, CarInfo carInfo) throws IOException { | |
| 56 | 77 | carInfo.setCreateTime(DateUtils.getNowDate()); |
| 57 | - return carInfoMapper.insertCarInfo(carInfo); | |
| 78 | + carInfo.setCreateBy(SecurityUtils.getUsername()); | |
| 79 | + carInfo.setCreditStatus("正常"); | |
| 80 | + carInfo.setStatus(0); | |
| 81 | + for (MultipartFile file : roadTransportFiles) { | |
| 82 | + carInfo.setRoadTransport(carInfo.getRoadTransport()!=null?carInfo.getRoadTransport()+";"+uploadFile(file):uploadFile(file)); | |
| 83 | + } | |
| 84 | + for (MultipartFile file : drivingLicenseFiles) { | |
| 85 | + carInfo.setDrivingLicense(carInfo.getDrivingLicense()!=null?carInfo.getDrivingLicense()+";"+uploadFile(file):uploadFile(file)); | |
| 86 | + } | |
| 87 | + for (MultipartFile file : carFrontFiles) { | |
| 88 | + carInfo.setCarFront(carInfo.getCarFront()!=null?carInfo.getCarFront()+";"+uploadFile(file):uploadFile(file)); | |
| 89 | + } | |
| 90 | + for (MultipartFile file : carLeftFiles) { | |
| 91 | + carInfo.setCarLeft(carInfo.getCarLeft()!=null?carInfo.getCarLeft()+";"+uploadFile(file):uploadFile(file)); | |
| 92 | + } | |
| 93 | + for (MultipartFile file : carBehindFiles) { | |
| 94 | + carInfo.setCarBehind(carInfo.getCarBehind()!=null?carInfo.getCarBehind()+";"+uploadFile(file):uploadFile(file)); | |
| 95 | + } | |
| 96 | + for (MultipartFile file : carRightFiles) { | |
| 97 | + carInfo.setCarRight(carInfo.getCarRight()!=null?carInfo.getCarRight()+";"+uploadFile(file):uploadFile(file)); | |
| 98 | + } | |
| 99 | + carInfo.setRoadTransport(removeSemicolon(carInfo.getRoadTransport())); | |
| 100 | + carInfo.setDrivingLicense(removeSemicolon(carInfo.getDrivingLicense())); | |
| 101 | + carInfo.setCarFront(removeSemicolon(carInfo.getCarFront())); | |
| 102 | + carInfo.setCarLeft(removeSemicolon(carInfo.getCarLeft())); | |
| 103 | + carInfo.setCarBehind(removeSemicolon(carInfo.getCarBehind())); | |
| 104 | + carInfo.setCarRight(removeSemicolon(carInfo.getCarRight())); | |
| 105 | + int result = carInfoMapper.insertCarInfo(carInfo); | |
| 106 | + | |
| 107 | + String[] Drivers = carInfo.getDrivers().split(","); | |
| 108 | + int carCount = 0; | |
| 109 | + for (String driver : Drivers) { | |
| 110 | + CarDriverRelation carDriverRelation = new CarDriverRelation(); | |
| 111 | + carDriverRelation.setCarId(carInfo.getId()); | |
| 112 | + carDriverRelation.setDriverId(Long.parseLong(driver)); | |
| 113 | + carCount = carCount+carInfoMapper.addCarDriverRelation(carDriverRelation); | |
| 114 | + } | |
| 115 | + | |
| 116 | + return result; | |
| 58 | 117 | } |
| 59 | 118 | |
| 60 | 119 | /** |
| 61 | 120 | * 修改运输车辆管理 |
| 62 | - * | |
| 63 | - * @param carInfo 运输车辆管理 | |
| 121 | + * | |
| 122 | + * @param roadTransportFiles | |
| 123 | + * @param drivingLicenseFiles | |
| 124 | + * @param carFrontFiles | |
| 125 | + * @param carLeftFiles | |
| 126 | + * @param carBehindFiles | |
| 127 | + * @param carRightFiles | |
| 128 | + * @param carInfo 运输车辆管理 | |
| 64 | 129 | * @return 结果 |
| 65 | 130 | */ |
| 66 | 131 | @Override |
| 67 | - public int updateCarInfo(CarInfo carInfo) | |
| 68 | - { | |
| 132 | + public int updateCarInfo(MultipartFile[] roadTransportFiles, MultipartFile[] drivingLicenseFiles, MultipartFile[] carFrontFiles, MultipartFile[] carLeftFiles, MultipartFile[] carBehindFiles, MultipartFile[] carRightFiles, CarInfo carInfo) throws IOException { | |
| 69 | 133 | carInfo.setUpdateTime(DateUtils.getNowDate()); |
| 134 | + carInfo.setUpdateBy(SecurityUtils.getUsername()); | |
| 135 | + for (MultipartFile file : roadTransportFiles) { | |
| 136 | + carInfo.setRoadTransport(carInfo.getRoadTransport()!=null?carInfo.getRoadTransport()+";"+uploadFile(file):uploadFile(file)); | |
| 137 | + } | |
| 138 | + for (MultipartFile file : drivingLicenseFiles) { | |
| 139 | + carInfo.setDrivingLicense(carInfo.getDrivingLicense()!=null?carInfo.getDrivingLicense()+";"+uploadFile(file):uploadFile(file)); | |
| 140 | + } | |
| 141 | + for (MultipartFile file : carFrontFiles) { | |
| 142 | + carInfo.setCarFront(carInfo.getCarFront()!=null?carInfo.getCarFront()+";"+uploadFile(file):uploadFile(file)); | |
| 143 | + } | |
| 144 | + for (MultipartFile file : carLeftFiles) { | |
| 145 | + carInfo.setCarLeft(carInfo.getCarLeft()!=null?carInfo.getCarLeft()+";"+uploadFile(file):uploadFile(file)); | |
| 146 | + } | |
| 147 | + for (MultipartFile file : carBehindFiles) { | |
| 148 | + carInfo.setCarBehind(carInfo.getCarBehind()!=null?carInfo.getCarBehind()+";"+uploadFile(file):uploadFile(file)); | |
| 149 | + } | |
| 150 | + for (MultipartFile file : carRightFiles) { | |
| 151 | + carInfo.setCarRight(carInfo.getCarRight()!=null?carInfo.getCarRight()+";"+uploadFile(file):uploadFile(file)); | |
| 152 | + } | |
| 153 | + carInfo.setRoadTransport(removeSemicolon(carInfo.getRoadTransport())); | |
| 154 | + carInfo.setDrivingLicense(removeSemicolon(carInfo.getDrivingLicense())); | |
| 155 | + carInfo.setCarFront(removeSemicolon(carInfo.getCarFront())); | |
| 156 | + carInfo.setCarLeft(removeSemicolon(carInfo.getCarLeft())); | |
| 157 | + carInfo.setCarBehind(removeSemicolon(carInfo.getCarBehind())); | |
| 158 | + carInfo.setCarRight(removeSemicolon(carInfo.getCarRight())); | |
| 159 | + | |
| 160 | + String[] Drivers = carInfo.getDrivers().split(","); | |
| 161 | + //删除原有关系 | |
| 162 | + carInfoMapper.deleteCarDriverRelationByCarId(carInfo.getId()); | |
| 163 | + //添加新关系 | |
| 164 | + for (String driver : Drivers) { | |
| 165 | + CarDriverRelation carDriverRelation = new CarDriverRelation(); | |
| 166 | + carDriverRelation.setCarId(carInfo.getId()); | |
| 167 | + carDriverRelation.setDriverId(Long.parseLong(driver)); | |
| 168 | + carInfoMapper.addCarDriverRelation(carDriverRelation); | |
| 169 | + } | |
| 70 | 170 | return carInfoMapper.updateCarInfo(carInfo); |
| 71 | 171 | } |
| 72 | 172 | |
| ... | ... | @@ -93,4 +193,25 @@ public class CarInfoServiceImpl implements ICarInfoService |
| 93 | 193 | { |
| 94 | 194 | return carInfoMapper.deleteCarInfoById(id); |
| 95 | 195 | } |
| 196 | + | |
| 197 | + /** | |
| 198 | + * 文件上传 | |
| 199 | + * | |
| 200 | + * @param file | |
| 201 | + * @author 2c | |
| 202 | + */ | |
| 203 | + public static String uploadFile(MultipartFile file) throws IOException { | |
| 204 | + // 上传文件路径 | |
| 205 | + String filePath = trashConfig.getUploadPath(); | |
| 206 | + // 上传并返回新文件名称 | |
| 207 | + String newFileName = upload(filePath, file); | |
| 208 | + return newFileName; | |
| 209 | + } | |
| 210 | + | |
| 211 | + //去掉第一个分号,如果有的话 | |
| 212 | + public String removeSemicolon(String str){ | |
| 213 | + if (str.startsWith(";")) | |
| 214 | + str = str.substring(1); | |
| 215 | + return str; | |
| 216 | + } | |
| 96 | 217 | } | ... | ... |
trash-unit/src/main/java/com/trash/disposalSite/controller/DisposalSiteController.java
| 1 | 1 | package com.trash.disposalSite.controller; |
| 2 | 2 | |
| 3 | +import java.io.IOException; | |
| 3 | 4 | import java.util.List; |
| 5 | + | |
| 6 | +import com.trash.common.annotation.RepeatSubmit; | |
| 4 | 7 | import org.springframework.security.access.prepost.PreAuthorize; |
| 5 | 8 | import org.springframework.beans.factory.annotation.Autowired; |
| 6 | -import org.springframework.web.bind.annotation.GetMapping; | |
| 7 | -import org.springframework.web.bind.annotation.PostMapping; | |
| 8 | -import org.springframework.web.bind.annotation.PutMapping; | |
| 9 | -import org.springframework.web.bind.annotation.DeleteMapping; | |
| 10 | -import org.springframework.web.bind.annotation.PathVariable; | |
| 11 | -import org.springframework.web.bind.annotation.RequestBody; | |
| 12 | -import org.springframework.web.bind.annotation.RequestMapping; | |
| 13 | -import org.springframework.web.bind.annotation.RestController; | |
| 9 | +import org.springframework.web.bind.annotation.*; | |
| 14 | 10 | import com.trash.common.annotation.Log; |
| 15 | 11 | import com.trash.common.core.controller.BaseController; |
| 16 | 12 | import com.trash.common.core.domain.AjaxResult; |
| ... | ... | @@ -19,15 +15,16 @@ import com.trash.disposalSite.domain.DisposalSite; |
| 19 | 15 | import com.trash.disposalSite.service.IDisposalSiteService; |
| 20 | 16 | import com.trash.common.utils.poi.ExcelUtil; |
| 21 | 17 | import com.trash.common.core.page.TableDataInfo; |
| 18 | +import org.springframework.web.multipart.MultipartFile; | |
| 22 | 19 | |
| 23 | 20 | /** |
| 24 | 21 | * 处理场所管理Controller |
| 25 | 22 | * |
| 26 | 23 | * @author trash |
| 27 | - * @date 2023-11-15 | |
| 24 | + * @date 2023-11-21 | |
| 28 | 25 | */ |
| 29 | 26 | @RestController |
| 30 | -@RequestMapping("/disposalSite") | |
| 27 | +@RequestMapping("/unit/disposalSite") | |
| 31 | 28 | public class DisposalSiteController extends BaseController |
| 32 | 29 | { |
| 33 | 30 | @Autowired |
| ... | ... | @@ -36,7 +33,7 @@ public class DisposalSiteController extends BaseController |
| 36 | 33 | /** |
| 37 | 34 | * 查询处理场所管理列表 |
| 38 | 35 | */ |
| 39 | -// @PreAuthorize("@ss.hasPermi('disposalSite:disposalSite:list')") | |
| 36 | + @PreAuthorize("@ss.hasPermi('unit:disposalSite:list')") | |
| 40 | 37 | @GetMapping("/list") |
| 41 | 38 | public TableDataInfo list(DisposalSite disposalSite) |
| 42 | 39 | { |
| ... | ... | @@ -48,7 +45,7 @@ public class DisposalSiteController extends BaseController |
| 48 | 45 | /** |
| 49 | 46 | * 导出处理场所管理列表 |
| 50 | 47 | */ |
| 51 | - @PreAuthorize("@ss.hasPermi('disposalSite:disposalSite:export')") | |
| 48 | + @PreAuthorize("@ss.hasPermi('unit:disposalSite:export')") | |
| 52 | 49 | @Log(title = "处理场所管理", businessType = BusinessType.EXPORT) |
| 53 | 50 | @GetMapping("/export") |
| 54 | 51 | public AjaxResult export(DisposalSite disposalSite) |
| ... | ... | @@ -61,7 +58,7 @@ public class DisposalSiteController extends BaseController |
| 61 | 58 | /** |
| 62 | 59 | * 获取处理场所管理详细信息 |
| 63 | 60 | */ |
| 64 | - @PreAuthorize("@ss.hasPermi('disposalSite:disposalSite:query')") | |
| 61 | + @PreAuthorize("@ss.hasPermi('unit:disposalSite:query')") | |
| 65 | 62 | @GetMapping(value = "/{id}") |
| 66 | 63 | public AjaxResult getInfo(@PathVariable("id") Long id) |
| 67 | 64 | { |
| ... | ... | @@ -71,29 +68,42 @@ public class DisposalSiteController extends BaseController |
| 71 | 68 | /** |
| 72 | 69 | * 新增处理场所管理 |
| 73 | 70 | */ |
| 74 | - @PreAuthorize("@ss.hasPermi('disposalSite:disposalSite:add')") | |
| 71 | + @PreAuthorize("@ss.hasPermi('unit:disposalSite:add')") | |
| 75 | 72 | @Log(title = "处理场所管理", businessType = BusinessType.INSERT) |
| 76 | 73 | @PostMapping |
| 77 | - public AjaxResult add(@RequestBody DisposalSite disposalSite) | |
| 78 | - { | |
| 79 | - return toAjax(disposalSiteService.insertDisposalSite(disposalSite)); | |
| 74 | + @RepeatSubmit | |
| 75 | + public AjaxResult add(@RequestParam(value = "approvalDocumentFiles") MultipartFile[] approvalDocument, | |
| 76 | + @RequestParam(value = "approvalDataFiles") MultipartFile[] approvalData, | |
| 77 | + @RequestParam(value = "scenePhotoFiles") MultipartFile[] scenePhoto, | |
| 78 | + @RequestParam(value = "carWashingFacilitiesImageFiles") MultipartFile[] carWashingFacilitiesImage, | |
| 79 | + @RequestParam(value = "safetyAssessmentReportFiles") MultipartFile[] safetyAssessmentReport, | |
| 80 | + @RequestParam(value = "environmentalApprovalFiles") MultipartFile[] environmentalApproval, | |
| 81 | + @RequestParam(value = "authorizationFiles") MultipartFile[] authorization, | |
| 82 | + @RequestParam(value = "otherInformationFiles") MultipartFile[] otherInformation, DisposalSite disposalSite) throws IOException { | |
| 83 | + return toAjax(disposalSiteService.insertDisposalSite(approvalDocument,approvalData,scenePhoto,carWashingFacilitiesImage,safetyAssessmentReport,environmentalApproval,authorization,otherInformation,disposalSite)); | |
| 80 | 84 | } |
| 81 | 85 | |
| 82 | 86 | /** |
| 83 | 87 | * 修改处理场所管理 |
| 84 | 88 | */ |
| 85 | - @PreAuthorize("@ss.hasPermi('disposalSite:disposalSite:edit')") | |
| 89 | + @PreAuthorize("@ss.hasPermi('unit:disposalSite:edit')") | |
| 86 | 90 | @Log(title = "处理场所管理", businessType = BusinessType.UPDATE) |
| 87 | 91 | @PutMapping |
| 88 | - public AjaxResult edit(@RequestBody DisposalSite disposalSite) | |
| 89 | - { | |
| 90 | - return toAjax(disposalSiteService.updateDisposalSite(disposalSite)); | |
| 92 | + public AjaxResult edit(@RequestParam(value = "approvalDocumentFiles") MultipartFile[] approvalDocument, | |
| 93 | + @RequestParam(value = "approvalDataFiles") MultipartFile[] approvalData, | |
| 94 | + @RequestParam(value = "scenePhotoFiles") MultipartFile[] scenePhoto, | |
| 95 | + @RequestParam(value = "carWashingFacilitiesImageFiles") MultipartFile[] carWashingFacilitiesImage, | |
| 96 | + @RequestParam(value = "safetyAssessmentReportFiles") MultipartFile[] safetyAssessmentReport, | |
| 97 | + @RequestParam(value = "environmentalApprovalFiles") MultipartFile[] environmentalApproval, | |
| 98 | + @RequestParam(value = "authorizationFiles") MultipartFile[] authorization, | |
| 99 | + @RequestParam(value = "otherInformationFiles") MultipartFile[] otherInformation, DisposalSite disposalSite) throws IOException { | |
| 100 | + return toAjax(disposalSiteService.updateDisposalSite(approvalDocument,approvalData,scenePhoto,carWashingFacilitiesImage,safetyAssessmentReport,environmentalApproval,authorization,otherInformation,disposalSite)); | |
| 91 | 101 | } |
| 92 | 102 | |
| 93 | 103 | /** |
| 94 | 104 | * 删除处理场所管理 |
| 95 | 105 | */ |
| 96 | - @PreAuthorize("@ss.hasPermi('disposalSite:disposalSite:remove')") | |
| 106 | + @PreAuthorize("@ss.hasPermi('unit:disposalSite:remove')") | |
| 97 | 107 | @Log(title = "处理场所管理", businessType = BusinessType.DELETE) |
| 98 | 108 | @DeleteMapping("/{ids}") |
| 99 | 109 | public AjaxResult remove(@PathVariable Long[] ids) | ... | ... |
trash-unit/src/main/java/com/trash/disposalSite/domain/DisposalSite.java
| ... | ... | @@ -11,7 +11,7 @@ import com.trash.common.core.domain.BaseEntity; |
| 11 | 11 | * 处理场所管理对象 disposal_site |
| 12 | 12 | * |
| 13 | 13 | * @author trash |
| 14 | - * @date 2023-11-15 | |
| 14 | + * @date 2023-11-21 | |
| 15 | 15 | */ |
| 16 | 16 | public class DisposalSite extends BaseEntity |
| 17 | 17 | { |
| ... | ... | @@ -78,6 +78,10 @@ public class DisposalSite extends BaseEntity |
| 78 | 78 | @Excel(name = "审批方量(m³)") |
| 79 | 79 | private String squareMeasure; |
| 80 | 80 | |
| 81 | + /** 剩余方量 */ | |
| 82 | + @Excel(name = "剩余方量") | |
| 83 | + private String surplusSquareMeasure; | |
| 84 | + | |
| 81 | 85 | /** 洗车作业设施 */ |
| 82 | 86 | @Excel(name = "洗车作业设施") |
| 83 | 87 | private String carWashingFacilities; |
| ... | ... | @@ -104,11 +108,19 @@ public class DisposalSite extends BaseEntity |
| 104 | 108 | @Excel(name = "办理意见") |
| 105 | 109 | private String handlingAdvice; |
| 106 | 110 | |
| 111 | + /** 消纳来源 */ | |
| 112 | + @Excel(name = "消纳来源") | |
| 113 | + private String absorbSource; | |
| 114 | + | |
| 107 | 115 | /** 电子围栏 |
| 108 | 116 | */ |
| 109 | 117 | @Excel(name = "电子围栏") |
| 110 | 118 | private String electronicFence; |
| 111 | 119 | |
| 120 | + /** 信用状态 */ | |
| 121 | + @Excel(name = "信用状态") | |
| 122 | + private String creditStatus; | |
| 123 | + | |
| 112 | 124 | /** 批准文件 */ |
| 113 | 125 | @Excel(name = "批准文件") |
| 114 | 126 | private String approvalDocument; |
| ... | ... | @@ -126,13 +138,17 @@ public class DisposalSite extends BaseEntity |
| 126 | 138 | @Excel(name = "洗车设施照片") |
| 127 | 139 | private String carWashingFacilitiesImage; |
| 128 | 140 | |
| 141 | + /** 期限范围 */ | |
| 142 | + @Excel(name = "期限范围") | |
| 143 | + private String termRange; | |
| 144 | + | |
| 129 | 145 | /** 安全评估报告 */ |
| 130 | 146 | @Excel(name = "安全评估报告") |
| 131 | 147 | private String safetyAssessmentReport; |
| 132 | 148 | |
| 133 | 149 | /** 环评报告及环保部门批复 |
| 134 | 150 | */ |
| 135 | - @Excel(name = "环评报告及环保部门批复") | |
| 151 | + @Excel(name = "环评报告及环保部门批复 ") | |
| 136 | 152 | private String environmentalApproval; |
| 137 | 153 | |
| 138 | 154 | /** 签署消纳合同授权委托书 */ |
| ... | ... | @@ -148,10 +164,25 @@ public class DisposalSite extends BaseEntity |
| 148 | 164 | private String companyIds; |
| 149 | 165 | |
| 150 | 166 | /** 审批状态,0=审批中,1=审批通过,2=被驳回 */ |
| 151 | - @Excel(name = "审批状态,0=审批中,1=审批通过,2=被驳回") | |
| 167 | + @Excel(name = "审批状态",readConverterExp = "0=审批中,1=审批通过,2=被驳回") | |
| 152 | 168 | private Integer status; |
| 153 | 169 | |
| 154 | - public void setId(Long id) | |
| 170 | + /** 二维码 */ | |
| 171 | + private String qrCode; | |
| 172 | + | |
| 173 | + /** 审核情况 */ | |
| 174 | + @Excel(name = "审核情况") | |
| 175 | + private String auditStatus; | |
| 176 | + | |
| 177 | + public String getAuditStatus() { | |
| 178 | + return auditStatus; | |
| 179 | + } | |
| 180 | + | |
| 181 | + public void setAuditStatus(String auditStatus) { | |
| 182 | + this.auditStatus = auditStatus; | |
| 183 | + } | |
| 184 | + | |
| 185 | + public void setId(Long id) | |
| 155 | 186 | { |
| 156 | 187 | this.id = id; |
| 157 | 188 | } |
| ... | ... | @@ -286,6 +317,15 @@ public class DisposalSite extends BaseEntity |
| 286 | 317 | { |
| 287 | 318 | return squareMeasure; |
| 288 | 319 | } |
| 320 | + public void setSurplusSquareMeasure(String surplusSquareMeasure) | |
| 321 | + { | |
| 322 | + this.surplusSquareMeasure = surplusSquareMeasure; | |
| 323 | + } | |
| 324 | + | |
| 325 | + public String getSurplusSquareMeasure() | |
| 326 | + { | |
| 327 | + return surplusSquareMeasure; | |
| 328 | + } | |
| 289 | 329 | public void setCarWashingFacilities(String carWashingFacilities) |
| 290 | 330 | { |
| 291 | 331 | this.carWashingFacilities = carWashingFacilities; |
| ... | ... | @@ -340,6 +380,15 @@ public class DisposalSite extends BaseEntity |
| 340 | 380 | { |
| 341 | 381 | return handlingAdvice; |
| 342 | 382 | } |
| 383 | + public void setAbsorbSource(String absorbSource) | |
| 384 | + { | |
| 385 | + this.absorbSource = absorbSource; | |
| 386 | + } | |
| 387 | + | |
| 388 | + public String getAbsorbSource() | |
| 389 | + { | |
| 390 | + return absorbSource; | |
| 391 | + } | |
| 343 | 392 | public void setElectronicFence(String electronicFence) |
| 344 | 393 | { |
| 345 | 394 | this.electronicFence = electronicFence; |
| ... | ... | @@ -349,6 +398,15 @@ public class DisposalSite extends BaseEntity |
| 349 | 398 | { |
| 350 | 399 | return electronicFence; |
| 351 | 400 | } |
| 401 | + public void setCreditStatus(String creditStatus) | |
| 402 | + { | |
| 403 | + this.creditStatus = creditStatus; | |
| 404 | + } | |
| 405 | + | |
| 406 | + public String getCreditStatus() | |
| 407 | + { | |
| 408 | + return creditStatus; | |
| 409 | + } | |
| 352 | 410 | public void setApprovalDocument(String approvalDocument) |
| 353 | 411 | { |
| 354 | 412 | this.approvalDocument = approvalDocument; |
| ... | ... | @@ -385,6 +443,15 @@ public class DisposalSite extends BaseEntity |
| 385 | 443 | { |
| 386 | 444 | return carWashingFacilitiesImage; |
| 387 | 445 | } |
| 446 | + public void setTermRange(String termRange) | |
| 447 | + { | |
| 448 | + this.termRange = termRange; | |
| 449 | + } | |
| 450 | + | |
| 451 | + public String getTermRange() | |
| 452 | + { | |
| 453 | + return termRange; | |
| 454 | + } | |
| 388 | 455 | public void setSafetyAssessmentReport(String safetyAssessmentReport) |
| 389 | 456 | { |
| 390 | 457 | this.safetyAssessmentReport = safetyAssessmentReport; |
| ... | ... | @@ -439,6 +506,15 @@ public class DisposalSite extends BaseEntity |
| 439 | 506 | { |
| 440 | 507 | return status; |
| 441 | 508 | } |
| 509 | + public void setQrCode(String qrCode) | |
| 510 | + { | |
| 511 | + this.qrCode = qrCode; | |
| 512 | + } | |
| 513 | + | |
| 514 | + public String getQrCode() | |
| 515 | + { | |
| 516 | + return qrCode; | |
| 517 | + } | |
| 442 | 518 | |
| 443 | 519 | @Override |
| 444 | 520 | public String toString() { |
| ... | ... | @@ -458,17 +534,21 @@ public class DisposalSite extends BaseEntity |
| 458 | 534 | .append("validityBeginDate", getValidityBeginDate()) |
| 459 | 535 | .append("validityEndDate", getValidityEndDate()) |
| 460 | 536 | .append("squareMeasure", getSquareMeasure()) |
| 537 | + .append("surplusSquareMeasure", getSurplusSquareMeasure()) | |
| 461 | 538 | .append("carWashingFacilities", getCarWashingFacilities()) |
| 462 | 539 | .append("exitRoadCondition", getExitRoadCondition()) |
| 463 | 540 | .append("lightingFacility", getLightingFacility()) |
| 464 | 541 | .append("videoSurveillanceFacility", getVideoSurveillanceFacility()) |
| 465 | 542 | .append("preparer", getPreparer()) |
| 466 | 543 | .append("handlingAdvice", getHandlingAdvice()) |
| 544 | + .append("absorbSource", getAbsorbSource()) | |
| 467 | 545 | .append("electronicFence", getElectronicFence()) |
| 546 | + .append("creditStatus", getCreditStatus()) | |
| 468 | 547 | .append("approvalDocument", getApprovalDocument()) |
| 469 | 548 | .append("approvalData", getApprovalData()) |
| 470 | 549 | .append("scenePhoto", getScenePhoto()) |
| 471 | 550 | .append("carWashingFacilitiesImage", getCarWashingFacilitiesImage()) |
| 551 | + .append("termRange", getTermRange()) | |
| 472 | 552 | .append("safetyAssessmentReport", getSafetyAssessmentReport()) |
| 473 | 553 | .append("environmentalApproval", getEnvironmentalApproval()) |
| 474 | 554 | .append("authorization", getAuthorization()) |
| ... | ... | @@ -479,6 +559,7 @@ public class DisposalSite extends BaseEntity |
| 479 | 559 | .append("createBy", getCreateBy()) |
| 480 | 560 | .append("updateTime", getUpdateTime()) |
| 481 | 561 | .append("updateBy", getUpdateBy()) |
| 562 | + .append("qrCode", getQrCode()) | |
| 482 | 563 | .toString(); |
| 483 | 564 | } |
| 484 | 565 | } | ... | ... |
trash-unit/src/main/java/com/trash/disposalSite/mapper/DisposalSiteMapper.java
trash-unit/src/main/java/com/trash/disposalSite/service/IDisposalSiteService.java
| 1 | 1 | package com.trash.disposalSite.service; |
| 2 | 2 | |
| 3 | +import java.io.IOException; | |
| 3 | 4 | import java.util.List; |
| 4 | 5 | import com.trash.disposalSite.domain.DisposalSite; |
| 6 | +import org.springframework.web.multipart.MultipartFile; | |
| 5 | 7 | |
| 6 | 8 | /** |
| 7 | 9 | * 处理场所管理Service接口 |
| 8 | 10 | * |
| 9 | 11 | * @author trash |
| 10 | - * @date 2023-11-15 | |
| 12 | + * @date 2023-11-21 | |
| 11 | 13 | */ |
| 12 | 14 | public interface IDisposalSiteService |
| 13 | 15 | { |
| ... | ... | @@ -29,19 +31,35 @@ public interface IDisposalSiteService |
| 29 | 31 | |
| 30 | 32 | /** |
| 31 | 33 | * 新增处理场所管理 |
| 32 | - * | |
| 33 | - * @param disposalSite 处理场所管理 | |
| 34 | + * | |
| 35 | + * @param approvalDocument | |
| 36 | + * @param approvalData | |
| 37 | + * @param scenePhoto | |
| 38 | + * @param carWashingFacilitiesImage | |
| 39 | + * @param safetyAssessmentReport | |
| 40 | + * @param environmentalApproval | |
| 41 | + * @param authorization | |
| 42 | + * @param otherInformation | |
| 43 | + * @param disposalSite 处理场所管理 | |
| 34 | 44 | * @return 结果 |
| 35 | 45 | */ |
| 36 | - int insertDisposalSite(DisposalSite disposalSite); | |
| 46 | + int insertDisposalSite(MultipartFile[] approvalDocument,MultipartFile[] approvalData,MultipartFile[] scenePhoto,MultipartFile[] carWashingFacilitiesImage,MultipartFile[] safetyAssessmentReport,MultipartFile[] environmentalApproval,MultipartFile[] authorization,MultipartFile[] otherInformation, DisposalSite disposalSite) throws IOException; | |
| 37 | 47 | |
| 38 | 48 | /** |
| 39 | 49 | * 修改处理场所管理 |
| 40 | - * | |
| 41 | - * @param disposalSite 处理场所管理 | |
| 50 | + * | |
| 51 | + * @param approvalDocument | |
| 52 | + * @param approvalData | |
| 53 | + * @param scenePhoto | |
| 54 | + * @param carWashingFacilitiesImage | |
| 55 | + * @param safetyAssessmentReport | |
| 56 | + * @param environmentalApproval | |
| 57 | + * @param authorization | |
| 58 | + * @param otherInformation | |
| 59 | + * @param disposalSite 处理场所管理 | |
| 42 | 60 | * @return 结果 |
| 43 | 61 | */ |
| 44 | - int updateDisposalSite(DisposalSite disposalSite); | |
| 62 | + int updateDisposalSite(MultipartFile[] approvalDocument,MultipartFile[] approvalData,MultipartFile[] scenePhoto,MultipartFile[] carWashingFacilitiesImage,MultipartFile[] safetyAssessmentReport,MultipartFile[] environmentalApproval,MultipartFile[] authorization,MultipartFile[] otherInformation, DisposalSite disposalSite) throws IOException; | |
| 45 | 63 | |
| 46 | 64 | /** |
| 47 | 65 | * 批量删除处理场所管理 | ... | ... |
trash-unit/src/main/java/com/trash/disposalSite/service/impl/DisposalSiteServiceImpl.java
| 1 | 1 | package com.trash.disposalSite.service.impl; |
| 2 | 2 | |
| 3 | -import java.util.List; | |
| 3 | +import com.trash.common.config.trashConfig; | |
| 4 | 4 | import com.trash.common.utils.DateUtils; |
| 5 | -import org.springframework.beans.factory.annotation.Autowired; | |
| 6 | -import org.springframework.stereotype.Service; | |
| 7 | -import com.trash.disposalSite.mapper.DisposalSiteMapper; | |
| 5 | +import com.trash.common.utils.SecurityUtils; | |
| 8 | 6 | import com.trash.disposalSite.domain.DisposalSite; |
| 7 | +import com.trash.disposalSite.mapper.DisposalSiteMapper; | |
| 9 | 8 | import com.trash.disposalSite.service.IDisposalSiteService; |
| 9 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 10 | +import org.springframework.stereotype.Service; | |
| 11 | +import org.springframework.web.multipart.MultipartFile; | |
| 12 | + | |
| 13 | +import java.io.IOException; | |
| 14 | +import java.util.List; | |
| 15 | + | |
| 16 | +import static com.trash.common.utils.file.FileUploadUtils.upload; | |
| 10 | 17 | |
| 11 | 18 | /** |
| 12 | 19 | * 处理场所管理Service业务层处理 |
| 13 | - * | |
| 20 | + * | |
| 14 | 21 | * @author trash |
| 15 | - * @date 2023-11-15 | |
| 22 | + * @date 2023-11-21 | |
| 16 | 23 | */ |
| 17 | 24 | @Service |
| 18 | -public class DisposalSiteServiceImpl implements IDisposalSiteService | |
| 19 | -{ | |
| 25 | +public class DisposalSiteServiceImpl implements IDisposalSiteService { | |
| 20 | 26 | @Autowired |
| 21 | 27 | private DisposalSiteMapper disposalSiteMapper; |
| 22 | 28 | |
| 23 | 29 | /** |
| 24 | 30 | * 查询处理场所管理 |
| 25 | - * | |
| 31 | + * | |
| 26 | 32 | * @param id 处理场所管理ID |
| 27 | 33 | * @return 处理场所管理 |
| 28 | 34 | */ |
| 29 | 35 | @Override |
| 30 | - public DisposalSite selectDisposalSiteById(Long id) | |
| 31 | - { | |
| 36 | + public DisposalSite selectDisposalSiteById(Long id) { | |
| 32 | 37 | return disposalSiteMapper.selectDisposalSiteById(id); |
| 33 | 38 | } |
| 34 | 39 | |
| 35 | 40 | /** |
| 36 | 41 | * 查询处理场所管理列表 |
| 37 | - * | |
| 42 | + * | |
| 38 | 43 | * @param disposalSite 处理场所管理 |
| 39 | 44 | * @return 处理场所管理 |
| 40 | 45 | */ |
| 41 | 46 | @Override |
| 42 | - public List<DisposalSite> selectDisposalSiteList(DisposalSite disposalSite) | |
| 43 | - { | |
| 47 | + public List<DisposalSite> selectDisposalSiteList(DisposalSite disposalSite) { | |
| 44 | 48 | return disposalSiteMapper.selectDisposalSiteList(disposalSite); |
| 45 | 49 | } |
| 46 | 50 | |
| 47 | 51 | /** |
| 48 | 52 | * 新增处理场所管理 |
| 49 | - * | |
| 50 | - * @param disposalSite 处理场所管理 | |
| 53 | + * | |
| 54 | + * @param approvalDocument | |
| 55 | + * @param approvalData | |
| 56 | + * @param scenePhoto | |
| 57 | + * @param carWashingFacilitiesImage | |
| 58 | + * @param safetyAssessmentReport | |
| 59 | + * @param environmentalApproval | |
| 60 | + * @param authorization | |
| 61 | + * @param otherInformation | |
| 62 | + * @param disposalSite 处理场所管理 | |
| 51 | 63 | * @return 结果 |
| 52 | 64 | */ |
| 53 | 65 | @Override |
| 54 | - public int insertDisposalSite(DisposalSite disposalSite) | |
| 55 | - { | |
| 66 | + public int insertDisposalSite(MultipartFile[] approvalDocument, MultipartFile[] approvalData, MultipartFile[] scenePhoto, MultipartFile[] carWashingFacilitiesImage, MultipartFile[] safetyAssessmentReport, MultipartFile[] environmentalApproval, MultipartFile[] authorization, MultipartFile[] otherInformation, DisposalSite disposalSite) throws IOException { | |
| 56 | 67 | disposalSite.setCreateTime(DateUtils.getNowDate()); |
| 68 | + disposalSite.setCreateBy(SecurityUtils.getUsername()); | |
| 69 | + disposalSite.setStatus(0); | |
| 70 | + disposalSite.setCreditStatus("正常"); | |
| 71 | + disposalSite.setTermRange("未超期"); | |
| 72 | + disposalSite.setAuditStatus("新增审核中"); | |
| 73 | + for (MultipartFile multipartFile : approvalDocument) { | |
| 74 | + disposalSite.setApprovalDocument(disposalSite.getApprovalDocument() != null ? disposalSite.getApprovalDocument() + ";" + uploadFile(multipartFile) : uploadFile(multipartFile)); | |
| 75 | + } | |
| 76 | + for (MultipartFile multipartFile : approvalData) { | |
| 77 | + disposalSite.setApprovalData(disposalSite.getApprovalData() != null ? disposalSite.getApprovalData() + ";" + uploadFile(multipartFile) : uploadFile(multipartFile)); | |
| 78 | + } | |
| 79 | + for (MultipartFile multipartFile : scenePhoto) { | |
| 80 | + disposalSite.setScenePhoto(disposalSite.getScenePhoto() != null ? disposalSite.getScenePhoto() + ";" + uploadFile(multipartFile) : uploadFile(multipartFile)); | |
| 81 | + } | |
| 82 | + for (MultipartFile multipartFile : carWashingFacilitiesImage) { | |
| 83 | + disposalSite.setCarWashingFacilitiesImage(disposalSite.getCarWashingFacilitiesImage() != null ? disposalSite.getCarWashingFacilitiesImage() + ";" + uploadFile(multipartFile) : uploadFile(multipartFile)); | |
| 84 | + } | |
| 85 | + for (MultipartFile multipartFile : safetyAssessmentReport) { | |
| 86 | + disposalSite.setSafetyAssessmentReport(disposalSite.getSafetyAssessmentReport() != null ? disposalSite.getSafetyAssessmentReport() + ";" + uploadFile(multipartFile) : uploadFile(multipartFile)); | |
| 87 | + } | |
| 88 | + for (MultipartFile multipartFile : environmentalApproval) { | |
| 89 | + disposalSite.setEnvironmentalApproval(disposalSite.getEnvironmentalApproval() != null ? disposalSite.getEnvironmentalApproval() + ";" + uploadFile(multipartFile) : uploadFile(multipartFile)); | |
| 90 | + } | |
| 91 | + for (MultipartFile multipartFile : authorization) { | |
| 92 | + disposalSite.setAuthorization(disposalSite.getAuthorization() != null ? disposalSite.getAuthorization() + ";" + uploadFile(multipartFile) : uploadFile(multipartFile)); | |
| 93 | + } | |
| 94 | + for (MultipartFile multipartFile : otherInformation) { | |
| 95 | + disposalSite.setOtherInformation(disposalSite.getOtherInformation() != null ? disposalSite.getOtherInformation() + ";" + uploadFile(multipartFile) : uploadFile(multipartFile)); | |
| 96 | + } | |
| 97 | + //去掉第一个分号,如果有的话 | |
| 98 | + disposalSite.setApprovalDocument(removeSemicolon(disposalSite.getApprovalDocument())); | |
| 99 | + disposalSite.setApprovalData(removeSemicolon(disposalSite.getApprovalData())); | |
| 100 | + disposalSite.setScenePhoto(removeSemicolon(disposalSite.getScenePhoto())); | |
| 101 | + disposalSite.setCarWashingFacilitiesImage(removeSemicolon(disposalSite.getCarWashingFacilitiesImage())); | |
| 102 | + disposalSite.setSafetyAssessmentReport(removeSemicolon(disposalSite.getSafetyAssessmentReport())); | |
| 103 | + disposalSite.setEnvironmentalApproval(removeSemicolon(disposalSite.getEnvironmentalApproval())); | |
| 104 | + disposalSite.setAuthorization(removeSemicolon(disposalSite.getAuthorization())); | |
| 105 | + disposalSite.setOtherInformation(removeSemicolon(disposalSite.getOtherInformation())); | |
| 57 | 106 | return disposalSiteMapper.insertDisposalSite(disposalSite); |
| 58 | 107 | } |
| 59 | 108 | |
| 60 | 109 | /** |
| 61 | 110 | * 修改处理场所管理 |
| 62 | - * | |
| 63 | - * @param disposalSite 处理场所管理 | |
| 111 | + * | |
| 112 | + * @param approvalDocument | |
| 113 | + * @param approvalData | |
| 114 | + * @param scenePhoto | |
| 115 | + * @param carWashingFacilitiesImage | |
| 116 | + * @param safetyAssessmentReport | |
| 117 | + * @param environmentalApproval | |
| 118 | + * @param authorization | |
| 119 | + * @param otherInformation | |
| 120 | + * @param disposalSite 处理场所管理 | |
| 64 | 121 | * @return 结果 |
| 65 | 122 | */ |
| 66 | 123 | @Override |
| 67 | - public int updateDisposalSite(DisposalSite disposalSite) | |
| 68 | - { | |
| 124 | + public int updateDisposalSite(MultipartFile[] approvalDocument, MultipartFile[] approvalData, MultipartFile[] scenePhoto, MultipartFile[] carWashingFacilitiesImage, MultipartFile[] safetyAssessmentReport, MultipartFile[] environmentalApproval, MultipartFile[] authorization, MultipartFile[] otherInformation, DisposalSite disposalSite) throws IOException { | |
| 69 | 125 | disposalSite.setUpdateTime(DateUtils.getNowDate()); |
| 126 | + disposalSite.setUpdateBy(SecurityUtils.getUsername()); | |
| 127 | + for (MultipartFile multipartFile : approvalDocument) { | |
| 128 | + disposalSite.setApprovalDocument(disposalSite.getApprovalDocument() != null ? disposalSite.getApprovalDocument() + ";" + uploadFile(multipartFile) : uploadFile(multipartFile)); | |
| 129 | + } | |
| 130 | + for (MultipartFile multipartFile : approvalData) { | |
| 131 | + disposalSite.setApprovalData(disposalSite.getApprovalData() != null ? disposalSite.getApprovalData() + ";" + uploadFile(multipartFile) : uploadFile(multipartFile)); | |
| 132 | + } | |
| 133 | + for (MultipartFile multipartFile : scenePhoto) { | |
| 134 | + disposalSite.setScenePhoto(disposalSite.getScenePhoto() != null ? disposalSite.getScenePhoto() + ";" + uploadFile(multipartFile) : uploadFile(multipartFile)); | |
| 135 | + } | |
| 136 | + for (MultipartFile multipartFile : carWashingFacilitiesImage) { | |
| 137 | + disposalSite.setCarWashingFacilitiesImage(disposalSite.getCarWashingFacilitiesImage() != null ? disposalSite.getCarWashingFacilitiesImage() + ";" + uploadFile(multipartFile) : uploadFile(multipartFile)); | |
| 138 | + } | |
| 139 | + for (MultipartFile multipartFile : safetyAssessmentReport) { | |
| 140 | + disposalSite.setSafetyAssessmentReport(disposalSite.getSafetyAssessmentReport() != null ? disposalSite.getSafetyAssessmentReport() + ";" + uploadFile(multipartFile) : uploadFile(multipartFile)); | |
| 141 | + } | |
| 142 | + for (MultipartFile multipartFile : environmentalApproval) { | |
| 143 | + disposalSite.setEnvironmentalApproval(disposalSite.getEnvironmentalApproval() != null ? disposalSite.getEnvironmentalApproval() + ";" + uploadFile(multipartFile) : uploadFile(multipartFile)); | |
| 144 | + } | |
| 145 | + for (MultipartFile multipartFile : authorization) { | |
| 146 | + disposalSite.setAuthorization(disposalSite.getAuthorization() != null ? disposalSite.getAuthorization() + ";" + uploadFile(multipartFile) : uploadFile(multipartFile)); | |
| 147 | + } | |
| 148 | + for (MultipartFile multipartFile : otherInformation) { | |
| 149 | + disposalSite.setOtherInformation(disposalSite.getOtherInformation() != null ? disposalSite.getOtherInformation() + ";" + uploadFile(multipartFile) : uploadFile(multipartFile)); | |
| 150 | + } | |
| 151 | + disposalSite.setApprovalDocument(removeSemicolon(disposalSite.getApprovalDocument())); | |
| 152 | + disposalSite.setApprovalData(removeSemicolon(disposalSite.getApprovalData())); | |
| 153 | + disposalSite.setScenePhoto(removeSemicolon(disposalSite.getScenePhoto())); | |
| 154 | + disposalSite.setCarWashingFacilitiesImage(removeSemicolon(disposalSite.getCarWashingFacilitiesImage())); | |
| 155 | + disposalSite.setSafetyAssessmentReport(removeSemicolon(disposalSite.getSafetyAssessmentReport())); | |
| 156 | + disposalSite.setEnvironmentalApproval(removeSemicolon(disposalSite.getEnvironmentalApproval())); | |
| 157 | + disposalSite.setAuthorization(removeSemicolon(disposalSite.getAuthorization())); | |
| 158 | + disposalSite.setOtherInformation(removeSemicolon(disposalSite.getOtherInformation())); | |
| 70 | 159 | return disposalSiteMapper.updateDisposalSite(disposalSite); |
| 71 | 160 | } |
| 72 | 161 | |
| 73 | 162 | /** |
| 74 | 163 | * 批量删除处理场所管理 |
| 75 | - * | |
| 164 | + * | |
| 76 | 165 | * @param ids 需要删除的处理场所管理ID |
| 77 | 166 | * @return 结果 |
| 78 | 167 | */ |
| 79 | 168 | @Override |
| 80 | - public int deleteDisposalSiteByIds(Long[] ids) | |
| 81 | - { | |
| 169 | + public int deleteDisposalSiteByIds(Long[] ids) { | |
| 82 | 170 | return disposalSiteMapper.deleteDisposalSiteByIds(ids); |
| 83 | 171 | } |
| 84 | 172 | |
| 85 | 173 | /** |
| 86 | 174 | * 删除处理场所管理信息 |
| 87 | - * | |
| 175 | + * | |
| 88 | 176 | * @param id 处理场所管理ID |
| 89 | 177 | * @return 结果 |
| 90 | 178 | */ |
| 91 | 179 | @Override |
| 92 | - public int deleteDisposalSiteById(Long id) | |
| 93 | - { | |
| 180 | + public int deleteDisposalSiteById(Long id) { | |
| 94 | 181 | return disposalSiteMapper.deleteDisposalSiteById(id); |
| 95 | 182 | } |
| 183 | + | |
| 184 | + /** | |
| 185 | + * 文件上传 | |
| 186 | + * | |
| 187 | + * @param file | |
| 188 | + * @author 2c | |
| 189 | + */ | |
| 190 | + public static String uploadFile(MultipartFile file) throws IOException { | |
| 191 | + // 上传文件路径 | |
| 192 | + String filePath = trashConfig.getUploadPath(); | |
| 193 | + // 上传并返回新文件名称 | |
| 194 | + String newFileName = upload(filePath, file); | |
| 195 | + return newFileName; | |
| 196 | + } | |
| 197 | + | |
| 198 | + //去掉第一个分号,如果有的话 | |
| 199 | + public String removeSemicolon(String str){ | |
| 200 | + if (str.startsWith(";")) | |
| 201 | + str = str.substring(1); | |
| 202 | + return str; | |
| 203 | + } | |
| 96 | 204 | } | ... | ... |
trash-unit/src/main/java/com/trash/driver/controller/DriverController.java
| 1 | 1 | package com.trash.driver.controller; |
| 2 | 2 | |
| 3 | +import java.io.IOException; | |
| 3 | 4 | import java.util.List; |
| 5 | +import java.util.Map; | |
| 6 | + | |
| 7 | +import com.trash.driver.domain.vo.DriverVo; | |
| 4 | 8 | import org.springframework.security.access.prepost.PreAuthorize; |
| 5 | 9 | import org.springframework.beans.factory.annotation.Autowired; |
| 6 | -import org.springframework.web.bind.annotation.GetMapping; | |
| 7 | -import org.springframework.web.bind.annotation.PostMapping; | |
| 8 | -import org.springframework.web.bind.annotation.PutMapping; | |
| 9 | -import org.springframework.web.bind.annotation.DeleteMapping; | |
| 10 | -import org.springframework.web.bind.annotation.PathVariable; | |
| 11 | -import org.springframework.web.bind.annotation.RequestBody; | |
| 12 | -import org.springframework.web.bind.annotation.RequestMapping; | |
| 13 | -import org.springframework.web.bind.annotation.RestController; | |
| 10 | +import org.springframework.web.bind.annotation.*; | |
| 14 | 11 | import com.trash.common.annotation.Log; |
| 15 | 12 | import com.trash.common.core.controller.BaseController; |
| 16 | 13 | import com.trash.common.core.domain.AjaxResult; |
| ... | ... | @@ -19,15 +16,16 @@ import com.trash.driver.domain.Driver; |
| 19 | 16 | import com.trash.driver.service.IDriverService; |
| 20 | 17 | import com.trash.common.utils.poi.ExcelUtil; |
| 21 | 18 | import com.trash.common.core.page.TableDataInfo; |
| 19 | +import org.springframework.web.multipart.MultipartFile; | |
| 22 | 20 | |
| 23 | 21 | /** |
| 24 | 22 | * 驾驶员管理Controller |
| 25 | 23 | * |
| 26 | 24 | * @author trash |
| 27 | - * @date 2023-11-15 | |
| 25 | + * @date 2023-11-21 | |
| 28 | 26 | */ |
| 29 | 27 | @RestController |
| 30 | -@RequestMapping("/driver") | |
| 28 | +@RequestMapping("/unit/driver") | |
| 31 | 29 | public class DriverController extends BaseController |
| 32 | 30 | { |
| 33 | 31 | @Autowired |
| ... | ... | @@ -36,32 +34,39 @@ public class DriverController extends BaseController |
| 36 | 34 | /** |
| 37 | 35 | * 查询驾驶员管理列表 |
| 38 | 36 | */ |
| 39 | -// @PreAuthorize("@ss.hasPermi('driver:driver:list')") | |
| 37 | + @PreAuthorize("@ss.hasPermi('unit:driver:list')") | |
| 40 | 38 | @GetMapping("/list") |
| 41 | - public TableDataInfo list(Driver driver) | |
| 39 | + public TableDataInfo list(DriverVo driver) | |
| 42 | 40 | { |
| 43 | 41 | startPage(); |
| 44 | - List<Driver> list = driverService.selectDriverList(driver); | |
| 42 | + List<DriverVo> list = driverService.selectDriverList(driver); | |
| 45 | 43 | return getDataTable(list); |
| 46 | 44 | } |
| 47 | 45 | |
| 46 | + @PreAuthorize("@ss.hasPermi('unit:driver:list')") | |
| 47 | + @GetMapping("/listDriverByCompany/{companyId}") | |
| 48 | + public List<Map<Object,Object>> listDriverByCompany(@PathVariable("companyId") String companyId) | |
| 49 | + { | |
| 50 | + return driverService.selectDriverListByCompanyId(companyId); | |
| 51 | + } | |
| 52 | + | |
| 48 | 53 | /** |
| 49 | 54 | * 导出驾驶员管理列表 |
| 50 | 55 | */ |
| 51 | - @PreAuthorize("@ss.hasPermi('driver:driver:export')") | |
| 56 | + @PreAuthorize("@ss.hasPermi('unit:driver:export')") | |
| 52 | 57 | @Log(title = "驾驶员管理", businessType = BusinessType.EXPORT) |
| 53 | 58 | @GetMapping("/export") |
| 54 | - public AjaxResult export(Driver driver) | |
| 59 | + public AjaxResult export(DriverVo driver) | |
| 55 | 60 | { |
| 56 | - List<Driver> list = driverService.selectDriverList(driver); | |
| 57 | - ExcelUtil<Driver> util = new ExcelUtil<Driver>(Driver.class); | |
| 61 | + List<DriverVo> list = driverService.selectDriverList(driver); | |
| 62 | + ExcelUtil<DriverVo> util = new ExcelUtil<DriverVo>(DriverVo.class); | |
| 58 | 63 | return util.exportExcel(list, "driver"); |
| 59 | 64 | } |
| 60 | 65 | |
| 61 | 66 | /** |
| 62 | 67 | * 获取驾驶员管理详细信息 |
| 63 | 68 | */ |
| 64 | - @PreAuthorize("@ss.hasPermi('driver:driver:query')") | |
| 69 | + @PreAuthorize("@ss.hasPermi('unit:driver:query')") | |
| 65 | 70 | @GetMapping(value = "/{id}") |
| 66 | 71 | public AjaxResult getInfo(@PathVariable("id") Long id) |
| 67 | 72 | { |
| ... | ... | @@ -71,33 +76,42 @@ public class DriverController extends BaseController |
| 71 | 76 | /** |
| 72 | 77 | * 新增驾驶员管理 |
| 73 | 78 | */ |
| 74 | - @PreAuthorize("@ss.hasPermi('driver:driver:add')") | |
| 79 | + @PreAuthorize("@ss.hasPermi('unit:driver:add')") | |
| 75 | 80 | @Log(title = "驾驶员管理", businessType = BusinessType.INSERT) |
| 76 | 81 | @PostMapping |
| 77 | - public AjaxResult add(@RequestBody Driver driver) | |
| 78 | - { | |
| 79 | - return toAjax(driverService.insertDriver(driver)); | |
| 82 | + public AjaxResult add(@RequestParam(value = "drivingLicenceFiles") MultipartFile[] drivingLicenceFiles, | |
| 83 | + @RequestParam(value = "professionalQualificationFiles") MultipartFile[] professionalQualificationFiles, | |
| 84 | + @RequestParam(value = "safetyTrainingFiles") MultipartFile[] safetyTrainingFiles, | |
| 85 | + @RequestParam(value = "photographOneFiles") MultipartFile[] photographOneFiles, | |
| 86 | + @RequestParam(value = "photographTwoFiles") MultipartFile[] photographTwoFiles, | |
| 87 | + Driver driver) throws IOException { | |
| 88 | + return toAjax(driverService.insertDriver(drivingLicenceFiles,professionalQualificationFiles,safetyTrainingFiles,photographOneFiles,photographTwoFiles,driver)); | |
| 80 | 89 | } |
| 81 | 90 | |
| 82 | 91 | /** |
| 83 | 92 | * 修改驾驶员管理 |
| 84 | 93 | */ |
| 85 | - @PreAuthorize("@ss.hasPermi('driver:driver:edit')") | |
| 94 | + @PreAuthorize("@ss.hasPermi('unit:driver:edit')") | |
| 86 | 95 | @Log(title = "驾驶员管理", businessType = BusinessType.UPDATE) |
| 87 | 96 | @PutMapping |
| 88 | - public AjaxResult edit(@RequestBody Driver driver) | |
| 89 | - { | |
| 90 | - return toAjax(driverService.updateDriver(driver)); | |
| 97 | + public AjaxResult edit(@RequestParam(value = "drivingLicenceFiles") MultipartFile[] drivingLicenceFiles, | |
| 98 | + @RequestParam(value = "professionalQualificationFiles") MultipartFile[] professionalQualificationFiles, | |
| 99 | + @RequestParam(value = "safetyTrainingFiles") MultipartFile[] safetyTrainingFiles, | |
| 100 | + @RequestParam(value = "photographOneFiles") MultipartFile[] photographOneFiles, | |
| 101 | + @RequestParam(value = "photographTwoFiles") MultipartFile[] photographTwoFiles, | |
| 102 | + Driver driver) throws IOException { | |
| 103 | + return toAjax(driverService.updateDriver(drivingLicenceFiles,professionalQualificationFiles,safetyTrainingFiles,photographOneFiles,photographTwoFiles,driver)); | |
| 91 | 104 | } |
| 92 | 105 | |
| 93 | 106 | /** |
| 94 | 107 | * 删除驾驶员管理 |
| 95 | 108 | */ |
| 96 | - @PreAuthorize("@ss.hasPermi('driver:driver:remove')") | |
| 109 | + @PreAuthorize("@ss.hasPermi('unit:driver:remove')") | |
| 97 | 110 | @Log(title = "驾驶员管理", businessType = BusinessType.DELETE) |
| 98 | 111 | @DeleteMapping("/{ids}") |
| 99 | 112 | public AjaxResult remove(@PathVariable Long[] ids) |
| 100 | 113 | { |
| 101 | 114 | return toAjax(driverService.deleteDriverByIds(ids)); |
| 102 | 115 | } |
| 116 | + | |
| 103 | 117 | } | ... | ... |
trash-unit/src/main/java/com/trash/driver/domain/Driver.java
| ... | ... | @@ -9,9 +9,9 @@ import com.trash.common.core.domain.BaseEntity; |
| 9 | 9 | |
| 10 | 10 | /** |
| 11 | 11 | * 驾驶员管理对象 driver |
| 12 | - * | |
| 12 | + * | |
| 13 | 13 | * @author trash |
| 14 | - * @date 2023-11-15 | |
| 14 | + * @date 2023-11-27 | |
| 15 | 15 | */ |
| 16 | 16 | public class Driver extends BaseEntity |
| 17 | 17 | { |
| ... | ... | @@ -77,155 +77,183 @@ public class Driver extends BaseEntity |
| 77 | 77 | @Excel(name = "审批状态,0=审批中,1=审批通过,2=被驳回") |
| 78 | 78 | private Integer status; |
| 79 | 79 | |
| 80 | - public void setId(Long id) | |
| 80 | + /** 一寸免冠照片1 */ | |
| 81 | + @Excel(name = "一寸免冠照片1") | |
| 82 | + private String photographOne; | |
| 83 | + | |
| 84 | + /** 一寸免冠照片2 */ | |
| 85 | + @Excel(name = "一寸免冠照片2") | |
| 86 | + private String photographTwo; | |
| 87 | + | |
| 88 | + public void setId(Long id) | |
| 81 | 89 | { |
| 82 | 90 | this.id = id; |
| 83 | 91 | } |
| 84 | 92 | |
| 85 | - public Long getId() | |
| 93 | + public Long getId() | |
| 86 | 94 | { |
| 87 | 95 | return id; |
| 88 | 96 | } |
| 89 | - public void setName(String name) | |
| 97 | + public void setName(String name) | |
| 90 | 98 | { |
| 91 | 99 | this.name = name; |
| 92 | 100 | } |
| 93 | 101 | |
| 94 | - public String getName() | |
| 102 | + public String getName() | |
| 95 | 103 | { |
| 96 | 104 | return name; |
| 97 | 105 | } |
| 98 | - public void setIdentityCard(String identityCard) | |
| 106 | + public void setIdentityCard(String identityCard) | |
| 99 | 107 | { |
| 100 | 108 | this.identityCard = identityCard; |
| 101 | 109 | } |
| 102 | 110 | |
| 103 | - public String getIdentityCard() | |
| 111 | + public String getIdentityCard() | |
| 104 | 112 | { |
| 105 | 113 | return identityCard; |
| 106 | 114 | } |
| 107 | - public void setCompanyId(Long companyId) | |
| 115 | + public void setCompanyId(Long companyId) | |
| 108 | 116 | { |
| 109 | 117 | this.companyId = companyId; |
| 110 | 118 | } |
| 111 | 119 | |
| 112 | - public Long getCompanyId() | |
| 120 | + public Long getCompanyId() | |
| 113 | 121 | { |
| 114 | 122 | return companyId; |
| 115 | 123 | } |
| 116 | - public void setProfessionalQualificationBeginDate(Date professionalQualificationBeginDate) | |
| 124 | + public void setProfessionalQualificationBeginDate(Date professionalQualificationBeginDate) | |
| 117 | 125 | { |
| 118 | 126 | this.professionalQualificationBeginDate = professionalQualificationBeginDate; |
| 119 | 127 | } |
| 120 | 128 | |
| 121 | - public Date getProfessionalQualificationBeginDate() | |
| 129 | + public Date getProfessionalQualificationBeginDate() | |
| 122 | 130 | { |
| 123 | 131 | return professionalQualificationBeginDate; |
| 124 | 132 | } |
| 125 | - public void setProfessionalQualificationEndDate(Date professionalQualificationEndDate) | |
| 133 | + public void setProfessionalQualificationEndDate(Date professionalQualificationEndDate) | |
| 126 | 134 | { |
| 127 | 135 | this.professionalQualificationEndDate = professionalQualificationEndDate; |
| 128 | 136 | } |
| 129 | 137 | |
| 130 | - public Date getProfessionalQualificationEndDate() | |
| 138 | + public Date getProfessionalQualificationEndDate() | |
| 131 | 139 | { |
| 132 | 140 | return professionalQualificationEndDate; |
| 133 | 141 | } |
| 134 | - public void setDrivingLicenceBeginDate(Date drivingLicenceBeginDate) | |
| 142 | + public void setDrivingLicenceBeginDate(Date drivingLicenceBeginDate) | |
| 135 | 143 | { |
| 136 | 144 | this.drivingLicenceBeginDate = drivingLicenceBeginDate; |
| 137 | 145 | } |
| 138 | 146 | |
| 139 | - public Date getDrivingLicenceBeginDate() | |
| 147 | + public Date getDrivingLicenceBeginDate() | |
| 140 | 148 | { |
| 141 | 149 | return drivingLicenceBeginDate; |
| 142 | 150 | } |
| 143 | - public void setDrivingLicenceEndDate(Date drivingLicenceEndDate) | |
| 151 | + public void setDrivingLicenceEndDate(Date drivingLicenceEndDate) | |
| 144 | 152 | { |
| 145 | 153 | this.drivingLicenceEndDate = drivingLicenceEndDate; |
| 146 | 154 | } |
| 147 | 155 | |
| 148 | - public Date getDrivingLicenceEndDate() | |
| 156 | + public Date getDrivingLicenceEndDate() | |
| 149 | 157 | { |
| 150 | 158 | return drivingLicenceEndDate; |
| 151 | 159 | } |
| 152 | - public void setSafetyTrainingDate(Date safetyTrainingDate) | |
| 160 | + public void setSafetyTrainingDate(Date safetyTrainingDate) | |
| 153 | 161 | { |
| 154 | 162 | this.safetyTrainingDate = safetyTrainingDate; |
| 155 | 163 | } |
| 156 | 164 | |
| 157 | - public Date getSafetyTrainingDate() | |
| 165 | + public Date getSafetyTrainingDate() | |
| 158 | 166 | { |
| 159 | 167 | return safetyTrainingDate; |
| 160 | 168 | } |
| 161 | - public void setSafetyTrainingContent(String safetyTrainingContent) | |
| 169 | + public void setSafetyTrainingContent(String safetyTrainingContent) | |
| 162 | 170 | { |
| 163 | 171 | this.safetyTrainingContent = safetyTrainingContent; |
| 164 | 172 | } |
| 165 | 173 | |
| 166 | - public String getSafetyTrainingContent() | |
| 174 | + public String getSafetyTrainingContent() | |
| 167 | 175 | { |
| 168 | 176 | return safetyTrainingContent; |
| 169 | 177 | } |
| 170 | - public void setDrivingLicence(String drivingLicence) | |
| 178 | + public void setDrivingLicence(String drivingLicence) | |
| 171 | 179 | { |
| 172 | 180 | this.drivingLicence = drivingLicence; |
| 173 | 181 | } |
| 174 | 182 | |
| 175 | - public String getDrivingLicence() | |
| 183 | + public String getDrivingLicence() | |
| 176 | 184 | { |
| 177 | 185 | return drivingLicence; |
| 178 | 186 | } |
| 179 | - public void setProfessionalQualification(String professionalQualification) | |
| 187 | + public void setProfessionalQualification(String professionalQualification) | |
| 180 | 188 | { |
| 181 | 189 | this.professionalQualification = professionalQualification; |
| 182 | 190 | } |
| 183 | 191 | |
| 184 | - public String getProfessionalQualification() | |
| 192 | + public String getProfessionalQualification() | |
| 185 | 193 | { |
| 186 | 194 | return professionalQualification; |
| 187 | 195 | } |
| 188 | - public void setSafetyTraining(String safetyTraining) | |
| 196 | + public void setSafetyTraining(String safetyTraining) | |
| 189 | 197 | { |
| 190 | 198 | this.safetyTraining = safetyTraining; |
| 191 | 199 | } |
| 192 | 200 | |
| 193 | - public String getSafetyTraining() | |
| 201 | + public String getSafetyTraining() | |
| 194 | 202 | { |
| 195 | 203 | return safetyTraining; |
| 196 | 204 | } |
| 197 | - public void setStatus(Integer status) | |
| 205 | + public void setStatus(Integer status) | |
| 198 | 206 | { |
| 199 | 207 | this.status = status; |
| 200 | 208 | } |
| 201 | 209 | |
| 202 | - public Integer getStatus() | |
| 210 | + public Integer getStatus() | |
| 203 | 211 | { |
| 204 | 212 | return status; |
| 205 | 213 | } |
| 214 | + public void setPhotographOne(String photographOne) | |
| 215 | + { | |
| 216 | + this.photographOne = photographOne; | |
| 217 | + } | |
| 218 | + | |
| 219 | + public String getPhotographOne() | |
| 220 | + { | |
| 221 | + return photographOne; | |
| 222 | + } | |
| 223 | + public void setPhotographTwo(String photographTwo) | |
| 224 | + { | |
| 225 | + this.photographTwo = photographTwo; | |
| 226 | + } | |
| 227 | + | |
| 228 | + public String getPhotographTwo() | |
| 229 | + { | |
| 230 | + return photographTwo; | |
| 231 | + } | |
| 206 | 232 | |
| 207 | 233 | @Override |
| 208 | 234 | public String toString() { |
| 209 | 235 | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
| 210 | - .append("id", getId()) | |
| 211 | - .append("name", getName()) | |
| 212 | - .append("identityCard", getIdentityCard()) | |
| 213 | - .append("companyId", getCompanyId()) | |
| 214 | - .append("professionalQualificationBeginDate", getProfessionalQualificationBeginDate()) | |
| 215 | - .append("professionalQualificationEndDate", getProfessionalQualificationEndDate()) | |
| 216 | - .append("drivingLicenceBeginDate", getDrivingLicenceBeginDate()) | |
| 217 | - .append("drivingLicenceEndDate", getDrivingLicenceEndDate()) | |
| 218 | - .append("safetyTrainingDate", getSafetyTrainingDate()) | |
| 219 | - .append("safetyTrainingContent", getSafetyTrainingContent()) | |
| 220 | - .append("remark", getRemark()) | |
| 221 | - .append("drivingLicence", getDrivingLicence()) | |
| 222 | - .append("professionalQualification", getProfessionalQualification()) | |
| 223 | - .append("safetyTraining", getSafetyTraining()) | |
| 224 | - .append("status", getStatus()) | |
| 225 | - .append("createTime", getCreateTime()) | |
| 226 | - .append("createBy", getCreateBy()) | |
| 227 | - .append("updateTime", getUpdateTime()) | |
| 228 | - .append("updateBy", getUpdateBy()) | |
| 229 | - .toString(); | |
| 236 | + .append("id", getId()) | |
| 237 | + .append("name", getName()) | |
| 238 | + .append("identityCard", getIdentityCard()) | |
| 239 | + .append("companyId", getCompanyId()) | |
| 240 | + .append("professionalQualificationBeginDate", getProfessionalQualificationBeginDate()) | |
| 241 | + .append("professionalQualificationEndDate", getProfessionalQualificationEndDate()) | |
| 242 | + .append("drivingLicenceBeginDate", getDrivingLicenceBeginDate()) | |
| 243 | + .append("drivingLicenceEndDate", getDrivingLicenceEndDate()) | |
| 244 | + .append("safetyTrainingDate", getSafetyTrainingDate()) | |
| 245 | + .append("safetyTrainingContent", getSafetyTrainingContent()) | |
| 246 | + .append("remark", getRemark()) | |
| 247 | + .append("drivingLicence", getDrivingLicence()) | |
| 248 | + .append("professionalQualification", getProfessionalQualification()) | |
| 249 | + .append("safetyTraining", getSafetyTraining()) | |
| 250 | + .append("status", getStatus()) | |
| 251 | + .append("createTime", getCreateTime()) | |
| 252 | + .append("createBy", getCreateBy()) | |
| 253 | + .append("updateTime", getUpdateTime()) | |
| 254 | + .append("updateBy", getUpdateBy()) | |
| 255 | + .append("photographOne", getPhotographOne()) | |
| 256 | + .append("photographTwo", getPhotographTwo()) | |
| 257 | + .toString(); | |
| 230 | 258 | } |
| 231 | 259 | } | ... | ... |
trash-unit/src/main/java/com/trash/driver/domain/vo/DriverVo.java
0 → 100644
| 1 | +package com.trash.driver.domain.vo; | |
| 2 | + | |
| 3 | +import com.trash.driver.domain.Driver; | |
| 4 | + | |
| 5 | +public class DriverVo extends Driver { | |
| 6 | + | |
| 7 | + private String companyName; | |
| 8 | + | |
| 9 | + public String getCompanyName() { | |
| 10 | + return companyName; | |
| 11 | + } | |
| 12 | + | |
| 13 | + public void setCompanyName(String companyName) { | |
| 14 | + this.companyName = companyName; | |
| 15 | + } | |
| 16 | +} | ... | ... |
trash-unit/src/main/java/com/trash/driver/mapper/DriverMapper.java
| 1 | 1 | package com.trash.driver.mapper; |
| 2 | 2 | |
| 3 | 3 | import java.util.List; |
| 4 | +import java.util.Map; | |
| 5 | + | |
| 4 | 6 | import com.trash.driver.domain.Driver; |
| 7 | +import com.trash.driver.domain.vo.DriverVo; | |
| 5 | 8 | |
| 6 | 9 | /** |
| 7 | 10 | * 驾驶员管理Mapper接口 |
| 8 | 11 | * |
| 9 | 12 | * @author trash |
| 10 | - * @date 2023-11-15 | |
| 13 | + * @date 2023-11-21 | |
| 11 | 14 | */ |
| 12 | 15 | public interface DriverMapper |
| 13 | 16 | { |
| ... | ... | @@ -25,7 +28,14 @@ public interface DriverMapper |
| 25 | 28 | * @param driver 驾驶员管理 |
| 26 | 29 | * @return 驾驶员管理集合 |
| 27 | 30 | */ |
| 28 | - List<Driver> selectDriverList(Driver driver); | |
| 31 | + List<DriverVo> selectDriverList(DriverVo driver); | |
| 32 | + | |
| 33 | + /** | |
| 34 | + * 根据公司id驾驶员管理列表 | |
| 35 | + * | |
| 36 | + * @return 驾驶员管理集合 | |
| 37 | + */ | |
| 38 | + List<Map<Object,Object>> selectDriverListByCompanyId(String companyId); | |
| 29 | 39 | |
| 30 | 40 | /** |
| 31 | 41 | * 新增驾驶员管理 | ... | ... |
trash-unit/src/main/java/com/trash/driver/service/IDriverService.java
| 1 | 1 | package com.trash.driver.service; |
| 2 | 2 | |
| 3 | +import java.io.IOException; | |
| 3 | 4 | import java.util.List; |
| 5 | +import java.util.Map; | |
| 6 | + | |
| 4 | 7 | import com.trash.driver.domain.Driver; |
| 8 | +import com.trash.driver.domain.vo.DriverVo; | |
| 9 | +import org.springframework.web.multipart.MultipartFile; | |
| 5 | 10 | |
| 6 | 11 | /** |
| 7 | 12 | * 驾驶员管理Service接口 |
| 8 | 13 | * |
| 9 | 14 | * @author trash |
| 10 | - * @date 2023-11-15 | |
| 15 | + * @date 2023-11-21 | |
| 11 | 16 | */ |
| 12 | 17 | public interface IDriverService |
| 13 | 18 | { |
| ... | ... | @@ -25,23 +30,50 @@ public interface IDriverService |
| 25 | 30 | * @param driver 驾驶员管理 |
| 26 | 31 | * @return 驾驶员管理集合 |
| 27 | 32 | */ |
| 28 | - List<Driver> selectDriverList(Driver driver); | |
| 33 | + List<DriverVo> selectDriverList(DriverVo driver); | |
| 34 | + | |
| 35 | + /** | |
| 36 | + * 根据公司id驾驶员管理列表 | |
| 37 | + * | |
| 38 | + * @return 驾驶员管理集合 | |
| 39 | + */ | |
| 40 | + List<Map<Object,Object>> selectDriverListByCompanyId(String companyId); | |
| 29 | 41 | |
| 30 | 42 | /** |
| 31 | 43 | * 新增驾驶员管理 |
| 32 | - * | |
| 33 | - * @param driver 驾驶员管理 | |
| 44 | + * | |
| 45 | + * @param drivingLicenceFiles | |
| 46 | + * @param professionalQualificationFiles | |
| 47 | + * @param safetyTrainingFiles | |
| 48 | + * @param photographOneFiles | |
| 49 | + * @param photographTwoFiles | |
| 50 | + * @param driver 驾驶员管理 | |
| 34 | 51 | * @return 结果 |
| 35 | 52 | */ |
| 36 | - int insertDriver(Driver driver); | |
| 53 | + int insertDriver(MultipartFile[] drivingLicenceFiles, | |
| 54 | + MultipartFile[] professionalQualificationFiles, | |
| 55 | + MultipartFile[] safetyTrainingFiles, | |
| 56 | + MultipartFile[] photographOneFiles, | |
| 57 | + MultipartFile[] photographTwoFiles, | |
| 58 | + Driver driver) throws IOException; | |
| 37 | 59 | |
| 38 | 60 | /** |
| 39 | 61 | * 修改驾驶员管理 |
| 40 | - * | |
| 41 | - * @param driver 驾驶员管理 | |
| 62 | + * | |
| 63 | + * @param drivingLicenceFiles | |
| 64 | + * @param professionalQualificationFiles | |
| 65 | + * @param safetyTrainingFiles | |
| 66 | + * @param photographOneFiles | |
| 67 | + * @param photographTwoFiles | |
| 68 | + * @param driver 驾驶员管理 | |
| 42 | 69 | * @return 结果 |
| 43 | 70 | */ |
| 44 | - int updateDriver(Driver driver); | |
| 71 | + int updateDriver(MultipartFile[] drivingLicenceFiles, | |
| 72 | + MultipartFile[] professionalQualificationFiles, | |
| 73 | + MultipartFile[] safetyTrainingFiles, | |
| 74 | + MultipartFile[] photographOneFiles, | |
| 75 | + MultipartFile[] photographTwoFiles, | |
| 76 | + Driver driver) throws IOException; | |
| 45 | 77 | |
| 46 | 78 | /** |
| 47 | 79 | * 批量删除驾驶员管理 | ... | ... |
trash-unit/src/main/java/com/trash/driver/service/impl/DriverServiceImpl.java
| 1 | 1 | package com.trash.driver.service.impl; |
| 2 | 2 | |
| 3 | +import java.io.IOException; | |
| 3 | 4 | import java.util.List; |
| 5 | +import java.util.Map; | |
| 6 | + | |
| 7 | +import com.trash.common.config.trashConfig; | |
| 4 | 8 | import com.trash.common.utils.DateUtils; |
| 9 | +import com.trash.common.utils.SecurityUtils; | |
| 10 | +import com.trash.driver.domain.vo.DriverVo; | |
| 5 | 11 | import org.springframework.beans.factory.annotation.Autowired; |
| 6 | 12 | import org.springframework.stereotype.Service; |
| 7 | 13 | import com.trash.driver.mapper.DriverMapper; |
| 8 | 14 | import com.trash.driver.domain.Driver; |
| 9 | 15 | import com.trash.driver.service.IDriverService; |
| 16 | +import org.springframework.web.multipart.MultipartFile; | |
| 17 | + | |
| 18 | +import static com.trash.common.utils.file.FileUploadUtils.upload; | |
| 10 | 19 | |
| 11 | 20 | /** |
| 12 | 21 | * 驾驶员管理Service业务层处理 |
| 13 | 22 | * |
| 14 | 23 | * @author trash |
| 15 | - * @date 2023-11-15 | |
| 24 | + * @date 2023-11-21 | |
| 16 | 25 | */ |
| 17 | 26 | @Service |
| 18 | 27 | public class DriverServiceImpl implements IDriverService |
| ... | ... | @@ -39,34 +48,90 @@ public class DriverServiceImpl implements IDriverService |
| 39 | 48 | * @return 驾驶员管理 |
| 40 | 49 | */ |
| 41 | 50 | @Override |
| 42 | - public List<Driver> selectDriverList(Driver driver) | |
| 51 | + public List<DriverVo> selectDriverList(DriverVo driver) | |
| 43 | 52 | { |
| 44 | 53 | return driverMapper.selectDriverList(driver); |
| 45 | 54 | } |
| 46 | 55 | |
| 56 | + @Override | |
| 57 | + public List<Map<Object, Object>> selectDriverListByCompanyId(String companyId) { | |
| 58 | + return driverMapper.selectDriverListByCompanyId(companyId); | |
| 59 | + } | |
| 60 | + | |
| 47 | 61 | /** |
| 48 | 62 | * 新增驾驶员管理 |
| 49 | - * | |
| 50 | - * @param driver 驾驶员管理 | |
| 63 | + * | |
| 64 | + * @param drivingLicenceFiles | |
| 65 | + * @param professionalQualificationFiles | |
| 66 | + * @param safetyTrainingFiles | |
| 67 | + * @param photographOneFiles | |
| 68 | + * @param photographTwoFiles | |
| 69 | + * @param driver 驾驶员管理 | |
| 51 | 70 | * @return 结果 |
| 52 | 71 | */ |
| 53 | 72 | @Override |
| 54 | - public int insertDriver(Driver driver) | |
| 55 | - { | |
| 73 | + public int insertDriver(MultipartFile[] drivingLicenceFiles, MultipartFile[] professionalQualificationFiles, MultipartFile[] safetyTrainingFiles, MultipartFile[] photographOneFiles, MultipartFile[] photographTwoFiles, Driver driver) throws IOException { | |
| 56 | 74 | driver.setCreateTime(DateUtils.getNowDate()); |
| 75 | + driver.setCreateBy(SecurityUtils.getUsername()); | |
| 76 | + driver.setStatus(0); | |
| 77 | + for (MultipartFile file : drivingLicenceFiles) { | |
| 78 | + driver.setDrivingLicence(driver.getDrivingLicence()!=null?driver.getDrivingLicence()+";"+uploadFile(file):uploadFile(file)); | |
| 79 | + } | |
| 80 | + for (MultipartFile file : professionalQualificationFiles) { | |
| 81 | + driver.setProfessionalQualification(driver.getProfessionalQualification()!=null?driver.getProfessionalQualification()+";"+uploadFile(file):uploadFile(file)); | |
| 82 | + } | |
| 83 | + for (MultipartFile file : safetyTrainingFiles) { | |
| 84 | + driver.setSafetyTraining(driver.getSafetyTraining()!=null?driver.getSafetyTraining()+";"+uploadFile(file):uploadFile(file)); | |
| 85 | + } | |
| 86 | + for (MultipartFile file : photographOneFiles) { | |
| 87 | + driver.setPhotographOne(driver.getPhotographOne()!=null?driver.getPhotographOne()+";"+uploadFile(file):uploadFile(file)); | |
| 88 | + } | |
| 89 | + for (MultipartFile file : photographTwoFiles) { | |
| 90 | + driver.setPhotographTwo(driver.getPhotographTwo()!=null?driver.getPhotographTwo()+";"+uploadFile(file):uploadFile(file)); | |
| 91 | + } | |
| 92 | + driver.setDrivingLicence(removeSemicolon(driver.getDrivingLicence())); | |
| 93 | + driver.setProfessionalQualification(removeSemicolon(driver.getProfessionalQualification())); | |
| 94 | + driver.setSafetyTraining(removeSemicolon(driver.getSafetyTraining())); | |
| 95 | + driver.setPhotographOne(removeSemicolon(driver.getPhotographOne())); | |
| 96 | + driver.setPhotographTwo(removeSemicolon(driver.getPhotographTwo())); | |
| 57 | 97 | return driverMapper.insertDriver(driver); |
| 58 | 98 | } |
| 59 | 99 | |
| 60 | 100 | /** |
| 61 | 101 | * 修改驾驶员管理 |
| 62 | - * | |
| 63 | - * @param driver 驾驶员管理 | |
| 102 | + * | |
| 103 | + * @param drivingLicenceFiles | |
| 104 | + * @param professionalQualificationFiles | |
| 105 | + * @param safetyTrainingFiles | |
| 106 | + * @param photographOneFiles | |
| 107 | + * @param photographTwoFiles | |
| 108 | + * @param driver 驾驶员管理 | |
| 64 | 109 | * @return 结果 |
| 65 | 110 | */ |
| 66 | 111 | @Override |
| 67 | - public int updateDriver(Driver driver) | |
| 68 | - { | |
| 112 | + public int updateDriver(MultipartFile[] drivingLicenceFiles, MultipartFile[] professionalQualificationFiles, MultipartFile[] safetyTrainingFiles, MultipartFile[] photographOneFiles, MultipartFile[] photographTwoFiles, Driver driver) throws IOException { | |
| 69 | 113 | driver.setUpdateTime(DateUtils.getNowDate()); |
| 114 | + driver.setUpdateBy(SecurityUtils.getUsername()); | |
| 115 | + for (MultipartFile file : drivingLicenceFiles) { | |
| 116 | + driver.setDrivingLicence(driver.getDrivingLicence()!=null?driver.getDrivingLicence()+";"+uploadFile(file):uploadFile(file)); | |
| 117 | + } | |
| 118 | + for (MultipartFile file : professionalQualificationFiles) { | |
| 119 | + driver.setProfessionalQualification(driver.getProfessionalQualification()!=null?driver.getProfessionalQualification()+";"+uploadFile(file):uploadFile(file)); | |
| 120 | + } | |
| 121 | + for (MultipartFile file : safetyTrainingFiles) { | |
| 122 | + driver.setSafetyTraining(driver.getSafetyTraining()!=null?driver.getSafetyTraining()+";"+uploadFile(file):uploadFile(file)); | |
| 123 | + } | |
| 124 | + for (MultipartFile file : photographOneFiles) { | |
| 125 | + driver.setPhotographOne(driver.getPhotographOne()!=null?driver.getPhotographOne()+";"+uploadFile(file):uploadFile(file)); | |
| 126 | + } | |
| 127 | + for (MultipartFile file : photographTwoFiles) { | |
| 128 | + driver.setPhotographTwo(driver.getPhotographTwo()!=null?driver.getPhotographTwo()+";"+uploadFile(file):uploadFile(file)); | |
| 129 | + } | |
| 130 | + driver.setDrivingLicence(removeSemicolon(driver.getDrivingLicence())); | |
| 131 | + driver.setProfessionalQualification(removeSemicolon(driver.getProfessionalQualification())); | |
| 132 | + driver.setSafetyTraining(removeSemicolon(driver.getSafetyTraining())); | |
| 133 | + driver.setPhotographOne(removeSemicolon(driver.getPhotographOne())); | |
| 134 | + driver.setPhotographTwo(removeSemicolon(driver.getPhotographTwo())); | |
| 70 | 135 | return driverMapper.updateDriver(driver); |
| 71 | 136 | } |
| 72 | 137 | |
| ... | ... | @@ -93,4 +158,25 @@ public class DriverServiceImpl implements IDriverService |
| 93 | 158 | { |
| 94 | 159 | return driverMapper.deleteDriverById(id); |
| 95 | 160 | } |
| 161 | + | |
| 162 | + /** | |
| 163 | + * 文件上传 | |
| 164 | + * | |
| 165 | + * @param file | |
| 166 | + * @author 2c | |
| 167 | + */ | |
| 168 | + public static String uploadFile(MultipartFile file) throws IOException { | |
| 169 | + // 上传文件路径 | |
| 170 | + String filePath = trashConfig.getUploadPath(); | |
| 171 | + // 上传并返回新文件名称 | |
| 172 | + String newFileName = upload(filePath, file); | |
| 173 | + return newFileName; | |
| 174 | + } | |
| 175 | + | |
| 176 | + //去掉第一个分号,如果有的话 | |
| 177 | + public String removeSemicolon(String str){ | |
| 178 | + if (str.startsWith(";")) | |
| 179 | + str = str.substring(1); | |
| 180 | + return str; | |
| 181 | + } | |
| 96 | 182 | } | ... | ... |
trash-unit/src/main/java/com/trash/enterprise/controller/TransportationEnterpriseController.java
| 1 | 1 | package com.trash.enterprise.controller; |
| 2 | 2 | |
| 3 | +import java.io.IOException; | |
| 3 | 4 | import java.util.List; |
| 4 | 5 | import org.springframework.security.access.prepost.PreAuthorize; |
| 5 | 6 | import org.springframework.beans.factory.annotation.Autowired; |
| 6 | -import org.springframework.web.bind.annotation.GetMapping; | |
| 7 | -import org.springframework.web.bind.annotation.PostMapping; | |
| 8 | -import org.springframework.web.bind.annotation.PutMapping; | |
| 9 | -import org.springframework.web.bind.annotation.DeleteMapping; | |
| 10 | -import org.springframework.web.bind.annotation.PathVariable; | |
| 11 | -import org.springframework.web.bind.annotation.RequestBody; | |
| 12 | -import org.springframework.web.bind.annotation.RequestMapping; | |
| 13 | -import org.springframework.web.bind.annotation.RestController; | |
| 7 | +import org.springframework.web.bind.annotation.*; | |
| 14 | 8 | import com.trash.common.annotation.Log; |
| 15 | 9 | import com.trash.common.core.controller.BaseController; |
| 16 | 10 | import com.trash.common.core.domain.AjaxResult; |
| ... | ... | @@ -19,15 +13,16 @@ import com.trash.enterprise.domain.TransportationEnterprise; |
| 19 | 13 | import com.trash.enterprise.service.ITransportationEnterpriseService; |
| 20 | 14 | import com.trash.common.utils.poi.ExcelUtil; |
| 21 | 15 | import com.trash.common.core.page.TableDataInfo; |
| 16 | +import org.springframework.web.multipart.MultipartFile; | |
| 22 | 17 | |
| 23 | 18 | /** |
| 24 | 19 | * 运输企业管理Controller |
| 25 | 20 | * |
| 26 | 21 | * @author trash |
| 27 | - * @date 2023-11-15 | |
| 22 | + * @date 2023-11-21 | |
| 28 | 23 | */ |
| 29 | 24 | @RestController |
| 30 | -@RequestMapping("/enterprise") | |
| 25 | +@RequestMapping("/unit/enterprise") | |
| 31 | 26 | public class TransportationEnterpriseController extends BaseController |
| 32 | 27 | { |
| 33 | 28 | @Autowired |
| ... | ... | @@ -36,7 +31,7 @@ public class TransportationEnterpriseController extends BaseController |
| 36 | 31 | /** |
| 37 | 32 | * 查询运输企业管理列表 |
| 38 | 33 | */ |
| 39 | - //@PreAuthorize("@ss.hasPermi('enterprise:enterprise:list')") | |
| 34 | + @PreAuthorize("@ss.hasPermi('unit:enterprise:list')") | |
| 40 | 35 | @GetMapping("/list") |
| 41 | 36 | public TableDataInfo list(TransportationEnterprise transportationEnterprise) |
| 42 | 37 | { |
| ... | ... | @@ -48,7 +43,7 @@ public class TransportationEnterpriseController extends BaseController |
| 48 | 43 | /** |
| 49 | 44 | * 导出运输企业管理列表 |
| 50 | 45 | */ |
| 51 | - @PreAuthorize("@ss.hasPermi('enterprise:enterprise:export')") | |
| 46 | + @PreAuthorize("@ss.hasPermi('unit:enterprise:export')") | |
| 52 | 47 | @Log(title = "运输企业管理", businessType = BusinessType.EXPORT) |
| 53 | 48 | @GetMapping("/export") |
| 54 | 49 | public AjaxResult export(TransportationEnterprise transportationEnterprise) |
| ... | ... | @@ -61,7 +56,7 @@ public class TransportationEnterpriseController extends BaseController |
| 61 | 56 | /** |
| 62 | 57 | * 获取运输企业管理详细信息 |
| 63 | 58 | */ |
| 64 | - @PreAuthorize("@ss.hasPermi('enterprise:enterprise:query')") | |
| 59 | + @PreAuthorize("@ss.hasPermi('unit:enterprise:query')") | |
| 65 | 60 | @GetMapping(value = "/{id}") |
| 66 | 61 | public AjaxResult getInfo(@PathVariable("id") Long id) |
| 67 | 62 | { |
| ... | ... | @@ -71,29 +66,37 @@ public class TransportationEnterpriseController extends BaseController |
| 71 | 66 | /** |
| 72 | 67 | * 新增运输企业管理 |
| 73 | 68 | */ |
| 74 | - @PreAuthorize("@ss.hasPermi('enterprise:enterprise:add')") | |
| 69 | + @PreAuthorize("@ss.hasPermi('unit:enterprise:add')") | |
| 75 | 70 | @Log(title = "运输企业管理", businessType = BusinessType.INSERT) |
| 76 | 71 | @PostMapping |
| 77 | - public AjaxResult add(@RequestBody TransportationEnterprise transportationEnterprise) | |
| 78 | - { | |
| 79 | - return toAjax(transportationEnterpriseService.insertTransportationEnterprise(transportationEnterprise)); | |
| 72 | + public AjaxResult add(@RequestParam(value = "transportPermissionFiles") MultipartFile[] transportPermissionFiles, | |
| 73 | + @RequestParam(value = "enterpriseBusinessLicenseFiles") MultipartFile[] enterpriseBusinessLicenseFiles, | |
| 74 | + @RequestParam(value = "safetyOfficerQualificationCertificateFiles") MultipartFile[] safetyOfficerQualificationCertificateFiles, | |
| 75 | + @RequestParam(value = "safetyCertificateFiles") MultipartFile[] safetyCertificateFiles, | |
| 76 | + @RequestParam(value = "carParkPanoramaFiles") MultipartFile[] carParkPanoramaFiles, | |
| 77 | + TransportationEnterprise transportationEnterprise) throws IOException { | |
| 78 | + return toAjax(transportationEnterpriseService.insertTransportationEnterprise(transportPermissionFiles, enterpriseBusinessLicenseFiles, safetyOfficerQualificationCertificateFiles, safetyCertificateFiles, carParkPanoramaFiles, transportationEnterprise)); | |
| 80 | 79 | } |
| 81 | 80 | |
| 82 | 81 | /** |
| 83 | 82 | * 修改运输企业管理 |
| 84 | 83 | */ |
| 85 | - @PreAuthorize("@ss.hasPermi('enterprise:enterprise:edit')") | |
| 84 | + @PreAuthorize("@ss.hasPermi('unit:enterprise:edit')") | |
| 86 | 85 | @Log(title = "运输企业管理", businessType = BusinessType.UPDATE) |
| 87 | 86 | @PutMapping |
| 88 | - public AjaxResult edit(@RequestBody TransportationEnterprise transportationEnterprise) | |
| 89 | - { | |
| 90 | - return toAjax(transportationEnterpriseService.updateTransportationEnterprise(transportationEnterprise)); | |
| 87 | + public AjaxResult edit(@RequestParam(value = "transportPermissionFiles") MultipartFile[] transportPermissionFiles, | |
| 88 | + @RequestParam(value = "enterpriseBusinessLicenseFiles") MultipartFile[] enterpriseBusinessLicenseFiles, | |
| 89 | + @RequestParam(value = "safetyOfficerQualificationCertificateFiles") MultipartFile[] safetyOfficerQualificationCertificateFiles, | |
| 90 | + @RequestParam(value = "safetyCertificateFiles") MultipartFile[] safetyCertificateFiles, | |
| 91 | + @RequestParam(value = "carParkPanoramaFiles") MultipartFile[] carParkPanoramaFiles, | |
| 92 | + TransportationEnterprise transportationEnterprise) throws IOException { | |
| 93 | + return toAjax(transportationEnterpriseService.updateTransportationEnterprise(transportPermissionFiles, enterpriseBusinessLicenseFiles, safetyOfficerQualificationCertificateFiles, safetyCertificateFiles, carParkPanoramaFiles, transportationEnterprise)); | |
| 91 | 94 | } |
| 92 | 95 | |
| 93 | 96 | /** |
| 94 | 97 | * 删除运输企业管理 |
| 95 | 98 | */ |
| 96 | - @PreAuthorize("@ss.hasPermi('enterprise:enterprise:remove')") | |
| 99 | + @PreAuthorize("@ss.hasPermi('unit:enterprise:remove')") | |
| 97 | 100 | @Log(title = "运输企业管理", businessType = BusinessType.DELETE) |
| 98 | 101 | @DeleteMapping("/{ids}") |
| 99 | 102 | public AjaxResult remove(@PathVariable Long[] ids) | ... | ... |
trash-unit/src/main/java/com/trash/enterprise/domain/TransportationEnterprise.java
| ... | ... | @@ -12,7 +12,7 @@ import com.trash.common.core.domain.BaseEntity; |
| 12 | 12 | * 运输企业管理对象 transportation_enterprise |
| 13 | 13 | * |
| 14 | 14 | * @author trash |
| 15 | - * @date 2023-11-15 | |
| 15 | + * @date 2023-11-21 | |
| 16 | 16 | */ |
| 17 | 17 | public class TransportationEnterprise extends BaseEntity |
| 18 | 18 | { |
| ... | ... | @@ -113,7 +113,7 @@ public class TransportationEnterprise extends BaseEntity |
| 113 | 113 | private String businessUnit; |
| 114 | 114 | |
| 115 | 115 | /** 审批状态,0=审批中,1=审批通过,2=被驳回 */ |
| 116 | - @Excel(name = "审批状态,0=审批中,1=审批通过,2=被驳回") | |
| 116 | + @Excel(name = "审批状态",readConverterExp = "0=审批中,1=审批通过,2=被驳回") | |
| 117 | 117 | private Integer status; |
| 118 | 118 | |
| 119 | 119 | /** 父公司id */ |
| ... | ... | @@ -124,6 +124,14 @@ public class TransportationEnterprise extends BaseEntity |
| 124 | 124 | @Excel(name = "公司类型", readConverterExp = "0=经营单位,1运输公司") |
| 125 | 125 | private Integer companyType; |
| 126 | 126 | |
| 127 | + /** 信用状态 */ | |
| 128 | + @Excel(name = "信用状态") | |
| 129 | + private String creditStatus; | |
| 130 | + | |
| 131 | + /** 二维码 */ | |
| 132 | + @Excel(name = "二维码") | |
| 133 | + private String qrCode; | |
| 134 | + | |
| 127 | 135 | public void setId(Long id) |
| 128 | 136 | { |
| 129 | 137 | this.id = id; |
| ... | ... | @@ -358,6 +366,24 @@ public class TransportationEnterprise extends BaseEntity |
| 358 | 366 | { |
| 359 | 367 | return companyType; |
| 360 | 368 | } |
| 369 | + public void setCreditStatus(String creditStatus) | |
| 370 | + { | |
| 371 | + this.creditStatus = creditStatus; | |
| 372 | + } | |
| 373 | + | |
| 374 | + public String getCreditStatus() | |
| 375 | + { | |
| 376 | + return creditStatus; | |
| 377 | + } | |
| 378 | + public void setQrCode(String qrCode) | |
| 379 | + { | |
| 380 | + this.qrCode = qrCode; | |
| 381 | + } | |
| 382 | + | |
| 383 | + public String getQrCode() | |
| 384 | + { | |
| 385 | + return qrCode; | |
| 386 | + } | |
| 361 | 387 | |
| 362 | 388 | @Override |
| 363 | 389 | public String toString() { |
| ... | ... | @@ -393,6 +419,8 @@ public class TransportationEnterprise extends BaseEntity |
| 393 | 419 | .append("updateBy", getUpdateBy()) |
| 394 | 420 | .append("parentId", getParentId()) |
| 395 | 421 | .append("companyType", getCompanyType()) |
| 422 | + .append("creditStatus", getCreditStatus()) | |
| 423 | + .append("qrCode", getQrCode()) | |
| 396 | 424 | .toString(); |
| 397 | 425 | } |
| 398 | 426 | } | ... | ... |
trash-unit/src/main/java/com/trash/enterprise/mapper/TransportationEnterpriseMapper.java
trash-unit/src/main/java/com/trash/enterprise/service/ITransportationEnterpriseService.java
| 1 | 1 | package com.trash.enterprise.service; |
| 2 | 2 | |
| 3 | +import java.io.IOException; | |
| 3 | 4 | import java.util.List; |
| 4 | 5 | import com.trash.enterprise.domain.TransportationEnterprise; |
| 6 | +import org.springframework.web.multipart.MultipartFile; | |
| 5 | 7 | |
| 6 | 8 | /** |
| 7 | 9 | * 运输企业管理Service接口 |
| 8 | 10 | * |
| 9 | 11 | * @author trash |
| 10 | - * @date 2023-11-15 | |
| 12 | + * @date 2023-11-21 | |
| 11 | 13 | */ |
| 12 | 14 | public interface ITransportationEnterpriseService |
| 13 | 15 | { |
| ... | ... | @@ -29,19 +31,39 @@ public interface ITransportationEnterpriseService |
| 29 | 31 | |
| 30 | 32 | /** |
| 31 | 33 | * 新增运输企业管理 |
| 32 | - * | |
| 33 | - * @param transportationEnterprise 运输企业管理 | |
| 34 | + * | |
| 35 | + * @param transportPermissionFiles | |
| 36 | + * @param enterpriseBusinessLicenseFiles | |
| 37 | + * @param safetyOfficerQualificationCertificateFiles | |
| 38 | + * @param safetyCertificateFiles | |
| 39 | + * @param carParkPanoramaFiles | |
| 40 | + * @param transportationEnterprise 运输企业管理 | |
| 34 | 41 | * @return 结果 |
| 35 | 42 | */ |
| 36 | - int insertTransportationEnterprise(TransportationEnterprise transportationEnterprise); | |
| 43 | + int insertTransportationEnterprise(MultipartFile[] transportPermissionFiles, | |
| 44 | + MultipartFile[] enterpriseBusinessLicenseFiles, | |
| 45 | + MultipartFile[] safetyOfficerQualificationCertificateFiles, | |
| 46 | + MultipartFile[] safetyCertificateFiles, | |
| 47 | + MultipartFile[] carParkPanoramaFiles, | |
| 48 | + TransportationEnterprise transportationEnterprise) throws IOException; | |
| 37 | 49 | |
| 38 | 50 | /** |
| 39 | 51 | * 修改运输企业管理 |
| 40 | - * | |
| 41 | - * @param transportationEnterprise 运输企业管理 | |
| 52 | + * | |
| 53 | + * @param transportPermissionFiles | |
| 54 | + * @param enterpriseBusinessLicenseFiles | |
| 55 | + * @param safetyOfficerQualificationCertificateFiles | |
| 56 | + * @param safetyCertificateFiles | |
| 57 | + * @param carParkPanoramaFiles | |
| 58 | + * @param transportationEnterprise 运输企业管理 | |
| 42 | 59 | * @return 结果 |
| 43 | 60 | */ |
| 44 | - int updateTransportationEnterprise(TransportationEnterprise transportationEnterprise); | |
| 61 | + int updateTransportationEnterprise(MultipartFile[] transportPermissionFiles, | |
| 62 | + MultipartFile[] enterpriseBusinessLicenseFiles, | |
| 63 | + MultipartFile[] safetyOfficerQualificationCertificateFiles, | |
| 64 | + MultipartFile[] safetyCertificateFiles, | |
| 65 | + MultipartFile[] carParkPanoramaFiles, | |
| 66 | + TransportationEnterprise transportationEnterprise) throws IOException; | |
| 45 | 67 | |
| 46 | 68 | /** |
| 47 | 69 | * 批量删除运输企业管理 | ... | ... |
trash-unit/src/main/java/com/trash/enterprise/service/impl/TransportationEnterpriseServiceImpl.java
| 1 | 1 | package com.trash.enterprise.service.impl; |
| 2 | 2 | |
| 3 | +import java.io.IOException; | |
| 3 | 4 | import java.util.List; |
| 5 | + | |
| 6 | +import com.trash.common.config.trashConfig; | |
| 4 | 7 | import com.trash.common.utils.DateUtils; |
| 8 | +import com.trash.common.utils.SecurityUtils; | |
| 5 | 9 | import org.springframework.beans.factory.annotation.Autowired; |
| 6 | 10 | import org.springframework.stereotype.Service; |
| 7 | 11 | import com.trash.enterprise.mapper.TransportationEnterpriseMapper; |
| 8 | 12 | import com.trash.enterprise.domain.TransportationEnterprise; |
| 9 | 13 | import com.trash.enterprise.service.ITransportationEnterpriseService; |
| 14 | +import org.springframework.web.multipart.MultipartFile; | |
| 15 | + | |
| 16 | +import static com.trash.common.utils.file.FileUploadUtils.upload; | |
| 10 | 17 | |
| 11 | 18 | /** |
| 12 | 19 | * 运输企业管理Service业务层处理 |
| 13 | 20 | * |
| 14 | 21 | * @author trash |
| 15 | - * @date 2023-11-15 | |
| 22 | + * @date 2023-11-21 | |
| 16 | 23 | */ |
| 17 | 24 | @Service |
| 18 | 25 | public class TransportationEnterpriseServiceImpl implements ITransportationEnterpriseService |
| ... | ... | @@ -46,27 +53,80 @@ public class TransportationEnterpriseServiceImpl implements ITransportationEnter |
| 46 | 53 | |
| 47 | 54 | /** |
| 48 | 55 | * 新增运输企业管理 |
| 49 | - * | |
| 50 | - * @param transportationEnterprise 运输企业管理 | |
| 56 | + * | |
| 57 | + * @param transportPermissionFiles | |
| 58 | + * @param enterpriseBusinessLicenseFiles | |
| 59 | + * @param safetyOfficerQualificationCertificateFiles | |
| 60 | + * @param safetyCertificateFiles | |
| 61 | + * @param carParkPanoramaFiles | |
| 62 | + * @param transportationEnterprise 运输企业管理 | |
| 51 | 63 | * @return 结果 |
| 52 | 64 | */ |
| 53 | 65 | @Override |
| 54 | - public int insertTransportationEnterprise(TransportationEnterprise transportationEnterprise) | |
| 55 | - { | |
| 66 | + public int insertTransportationEnterprise(MultipartFile[] transportPermissionFiles, MultipartFile[] enterpriseBusinessLicenseFiles, MultipartFile[] safetyOfficerQualificationCertificateFiles, MultipartFile[] safetyCertificateFiles, MultipartFile[] carParkPanoramaFiles, TransportationEnterprise transportationEnterprise) throws IOException { | |
| 56 | 67 | transportationEnterprise.setCreateTime(DateUtils.getNowDate()); |
| 68 | + transportationEnterprise.setCreateBy(SecurityUtils.getUsername()); | |
| 69 | + transportationEnterprise.setStatus(0); | |
| 70 | + transportationEnterprise.setCreditStatus("正常"); | |
| 71 | + for (MultipartFile file : transportPermissionFiles) { | |
| 72 | + transportationEnterprise.setTransportPermission(transportationEnterprise.getTransportPermission()!=null?transportationEnterprise.getTransportPermission()+";"+upload(file):upload(file)); | |
| 73 | + } | |
| 74 | + for (MultipartFile file : enterpriseBusinessLicenseFiles) { | |
| 75 | + transportationEnterprise.setEnterpriseBusinessLicense(transportationEnterprise.getEnterpriseBusinessLicense()!=null?transportationEnterprise.getEnterpriseBusinessLicense()+";"+upload(file):upload(file)); | |
| 76 | + } | |
| 77 | + for (MultipartFile file : safetyOfficerQualificationCertificateFiles) { | |
| 78 | + transportationEnterprise.setSafetyOfficerQualificationCertificate(transportationEnterprise.getSafetyOfficerQualificationCertificate()!=null?transportationEnterprise.getSafetyOfficerQualificationCertificate()+";"+upload(file):upload(file)); | |
| 79 | + } | |
| 80 | + for (MultipartFile file : safetyCertificateFiles) { | |
| 81 | + transportationEnterprise.setSafetyCertificate(transportationEnterprise.getSafetyCertificate()!=null?transportationEnterprise.getSafetyCertificate()+";"+upload(file):upload(file)); | |
| 82 | + } | |
| 83 | + for (MultipartFile file : carParkPanoramaFiles) { | |
| 84 | + transportationEnterprise.setCarParkPanorama(transportationEnterprise.getCarParkPanorama()!=null?transportationEnterprise.getCarParkPanorama()+";"+upload(file):upload(file)); | |
| 85 | + } | |
| 86 | + //去掉第一个分号,如果有的话 | |
| 87 | + transportationEnterprise.setTransportPermission(removeSemicolon(transportationEnterprise.getTransportPermission())); | |
| 88 | + transportationEnterprise.setEnterpriseBusinessLicense(removeSemicolon(transportationEnterprise.getEnterpriseBusinessLicense())); | |
| 89 | + transportationEnterprise.setSafetyOfficerQualificationCertificate(removeSemicolon(transportationEnterprise.getSafetyOfficerQualificationCertificate())); | |
| 90 | + transportationEnterprise.setSafetyCertificate(removeSemicolon(transportationEnterprise.getSafetyCertificate())); | |
| 91 | + transportationEnterprise.setCarParkPanorama(removeSemicolon(transportationEnterprise.getCarParkPanorama())); | |
| 57 | 92 | return transportationEnterpriseMapper.insertTransportationEnterprise(transportationEnterprise); |
| 58 | 93 | } |
| 59 | 94 | |
| 60 | 95 | /** |
| 61 | 96 | * 修改运输企业管理 |
| 62 | - * | |
| 63 | - * @param transportationEnterprise 运输企业管理 | |
| 97 | + * | |
| 98 | + * @param transportPermissionFiles | |
| 99 | + * @param enterpriseBusinessLicenseFiles | |
| 100 | + * @param safetyOfficerQualificationCertificateFiles | |
| 101 | + * @param safetyCertificateFiles | |
| 102 | + * @param carParkPanoramaFiles | |
| 103 | + * @param transportationEnterprise 运输企业管理 | |
| 64 | 104 | * @return 结果 |
| 65 | 105 | */ |
| 66 | 106 | @Override |
| 67 | - public int updateTransportationEnterprise(TransportationEnterprise transportationEnterprise) | |
| 68 | - { | |
| 107 | + public int updateTransportationEnterprise(MultipartFile[] transportPermissionFiles, MultipartFile[] enterpriseBusinessLicenseFiles, MultipartFile[] safetyOfficerQualificationCertificateFiles, MultipartFile[] safetyCertificateFiles, MultipartFile[] carParkPanoramaFiles, TransportationEnterprise transportationEnterprise) throws IOException { | |
| 69 | 108 | transportationEnterprise.setUpdateTime(DateUtils.getNowDate()); |
| 109 | + transportationEnterprise.setUpdateBy(SecurityUtils.getUsername()); | |
| 110 | + for (MultipartFile file : transportPermissionFiles) { | |
| 111 | + transportationEnterprise.setTransportPermission(transportationEnterprise.getTransportPermission()!=null?transportationEnterprise.getTransportPermission()+";"+upload(file):upload(file)); | |
| 112 | + } | |
| 113 | + for (MultipartFile file : enterpriseBusinessLicenseFiles) { | |
| 114 | + transportationEnterprise.setEnterpriseBusinessLicense(transportationEnterprise.getEnterpriseBusinessLicense()!=null?transportationEnterprise.getEnterpriseBusinessLicense()+";"+upload(file):upload(file)); | |
| 115 | + } | |
| 116 | + for (MultipartFile file : safetyOfficerQualificationCertificateFiles) { | |
| 117 | + transportationEnterprise.setSafetyOfficerQualificationCertificate(transportationEnterprise.getSafetyOfficerQualificationCertificate()!=null?transportationEnterprise.getSafetyOfficerQualificationCertificate()+";"+upload(file):upload(file)); | |
| 118 | + } | |
| 119 | + for (MultipartFile file : safetyCertificateFiles) { | |
| 120 | + transportationEnterprise.setSafetyCertificate(transportationEnterprise.getSafetyCertificate()!=null?transportationEnterprise.getSafetyCertificate()+";"+upload(file):upload(file)); | |
| 121 | + } | |
| 122 | + for (MultipartFile file : carParkPanoramaFiles) { | |
| 123 | + transportationEnterprise.setCarParkPanorama(transportationEnterprise.getCarParkPanorama()!=null?transportationEnterprise.getCarParkPanorama()+";"+upload(file):upload(file)); | |
| 124 | + } | |
| 125 | + transportationEnterprise.setTransportPermission(removeSemicolon(transportationEnterprise.getTransportPermission())); | |
| 126 | + transportationEnterprise.setEnterpriseBusinessLicense(removeSemicolon(transportationEnterprise.getEnterpriseBusinessLicense())); | |
| 127 | + transportationEnterprise.setSafetyOfficerQualificationCertificate(removeSemicolon(transportationEnterprise.getSafetyOfficerQualificationCertificate())); | |
| 128 | + transportationEnterprise.setSafetyCertificate(removeSemicolon(transportationEnterprise.getSafetyCertificate())); | |
| 129 | + transportationEnterprise.setCarParkPanorama(removeSemicolon(transportationEnterprise.getCarParkPanorama())); | |
| 70 | 130 | return transportationEnterpriseMapper.updateTransportationEnterprise(transportationEnterprise); |
| 71 | 131 | } |
| 72 | 132 | |
| ... | ... | @@ -93,4 +153,25 @@ public class TransportationEnterpriseServiceImpl implements ITransportationEnter |
| 93 | 153 | { |
| 94 | 154 | return transportationEnterpriseMapper.deleteTransportationEnterpriseById(id); |
| 95 | 155 | } |
| 156 | + | |
| 157 | + /** | |
| 158 | + * 文件上传 | |
| 159 | + * | |
| 160 | + * @param file | |
| 161 | + * @author 2c | |
| 162 | + */ | |
| 163 | + public static String uploadFile(MultipartFile file) throws IOException { | |
| 164 | + // 上传文件路径 | |
| 165 | + String filePath = trashConfig.getUploadPath(); | |
| 166 | + // 上传并返回新文件名称 | |
| 167 | + String newFileName = upload(filePath, file); | |
| 168 | + return newFileName; | |
| 169 | + } | |
| 170 | + | |
| 171 | + //去掉第一个分号,如果有的话 | |
| 172 | + public String removeSemicolon(String str){ | |
| 173 | + if (str.startsWith(";")) | |
| 174 | + str = str.substring(1); | |
| 175 | + return str; | |
| 176 | + } | |
| 96 | 177 | } | ... | ... |
trash-unit/src/main/resources/mapper/carInfo/CarInfoMapper.xml deleted
100644 → 0
| 1 | -<?xml version="1.0" encoding="UTF-8" ?> | |
| 2 | -<!DOCTYPE mapper | |
| 3 | -PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |
| 4 | -"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
| 5 | -<mapper namespace="com.trash.carInfo.mapper.CarInfoMapper"> | |
| 6 | - | |
| 7 | - <resultMap type="CarInfo" id="CarInfoResult"> | |
| 8 | - <result property="id" column="id" /> | |
| 9 | - <result property="companyId" column="company_id" /> | |
| 10 | - <result property="carType" column="car_type" /> | |
| 11 | - <result property="carCode" column="car_code" /> | |
| 12 | - <result property="carBrank" column="car_brank" /> | |
| 13 | - <result property="emissionStandard" column="emission_standard" /> | |
| 14 | - <result property="roadTransportDate" column="road_transport_date" /> | |
| 15 | - <result property="drivingLicenseDate" column="driving_license_date" /> | |
| 16 | - <result property="enterDate" column="enter_date" /> | |
| 17 | - <result property="farmeNumber" column="farme_number" /> | |
| 18 | - <result property="carIdentification" column="car_identification" /> | |
| 19 | - <result property="containerVolume" column="container_volume" /> | |
| 20 | - <result property="carColor" column="car_color" /> | |
| 21 | - <result property="carEquipment" column="car_equipment" /> | |
| 22 | - <result property="remark" column="remark" /> | |
| 23 | - <result property="roadTransport" column="road_transport" /> | |
| 24 | - <result property="drivingLicense" column="driving_license" /> | |
| 25 | - <result property="carFront" column="car_front" /> | |
| 26 | - <result property="carLeft" column="car_left" /> | |
| 27 | - <result property="carBehind" column="car_behind" /> | |
| 28 | - <result property="carRight" column="car_right" /> | |
| 29 | - <result property="drivers" column="drivers" /> | |
| 30 | - <result property="status" column="status" /> | |
| 31 | - <result property="createTime" column="create_time" /> | |
| 32 | - <result property="createBy" column="create_by" /> | |
| 33 | - <result property="updateTime" column="update_time" /> | |
| 34 | - <result property="updateBy" column="update_by" /> | |
| 35 | - </resultMap> | |
| 36 | - | |
| 37 | - <sql id="selectCarInfoVo"> | |
| 38 | - select id, company_id, car_type, car_code, car_brank, emission_standard, road_transport_date, driving_license_date, enter_date, farme_number, car_identification, container_volume, car_color, car_equipment, remark, road_transport, driving_license, car_front, car_left, car_behind, car_right, drivers, status, create_time, create_by, update_time, update_by from car_info | |
| 39 | - </sql> | |
| 40 | - | |
| 41 | - <select id="selectCarInfoList" parameterType="CarInfo" resultMap="CarInfoResult"> | |
| 42 | - <include refid="selectCarInfoVo"/> | |
| 43 | - <where> | |
| 44 | - <if test="companyId != null "> and company_id = #{companyId}</if> | |
| 45 | - <if test="carType != null and carType != ''"> and car_type = #{carType}</if> | |
| 46 | - <if test="carCode != null and carCode != ''"> and car_code = #{carCode}</if> | |
| 47 | - <if test="carBrank != null and carBrank != ''"> and car_brank = #{carBrank}</if> | |
| 48 | - <if test="emissionStandard != null and emissionStandard != ''"> and emission_standard = #{emissionStandard}</if> | |
| 49 | - <if test="roadTransportDate != null "> and road_transport_date = #{roadTransportDate}</if> | |
| 50 | - <if test="drivingLicenseDate != null "> and driving_license_date = #{drivingLicenseDate}</if> | |
| 51 | - <if test="enterDate != null "> and enter_date = #{enterDate}</if> | |
| 52 | - <if test="farmeNumber != null and farmeNumber != ''"> and farme_number = #{farmeNumber}</if> | |
| 53 | - <if test="carIdentification != null and carIdentification != ''"> and car_identification = #{carIdentification}</if> | |
| 54 | - <if test="containerVolume != null and containerVolume != ''"> and container_volume = #{containerVolume}</if> | |
| 55 | - <if test="carColor != null and carColor != ''"> and car_color = #{carColor}</if> | |
| 56 | - <if test="carEquipment != null and carEquipment != ''"> and car_equipment = #{carEquipment}</if> | |
| 57 | - <if test="roadTransport != null and roadTransport != ''"> and road_transport = #{roadTransport}</if> | |
| 58 | - <if test="drivingLicense != null and drivingLicense != ''"> and driving_license = #{drivingLicense}</if> | |
| 59 | - <if test="carFront != null and carFront != ''"> and car_front = #{carFront}</if> | |
| 60 | - <if test="carLeft != null and carLeft != ''"> and car_left = #{carLeft}</if> | |
| 61 | - <if test="carBehind != null and carBehind != ''"> and car_behind = #{carBehind}</if> | |
| 62 | - <if test="carRight != null and carRight != ''"> and car_right = #{carRight}</if> | |
| 63 | - <if test="drivers != null and drivers != ''"> and drivers = #{drivers}</if> | |
| 64 | - <if test="status != null "> and status = #{status}</if> | |
| 65 | - </where> | |
| 66 | - </select> | |
| 67 | - | |
| 68 | - <select id="selectCarInfoById" parameterType="Long" resultMap="CarInfoResult"> | |
| 69 | - <include refid="selectCarInfoVo"/> | |
| 70 | - where id = #{id} | |
| 71 | - </select> | |
| 72 | - | |
| 73 | - <insert id="insertCarInfo" parameterType="CarInfo" useGeneratedKeys="true" keyProperty="id"> | |
| 74 | - insert into car_info | |
| 75 | - <trim prefix="(" suffix=")" suffixOverrides=","> | |
| 76 | - <if test="companyId != null">company_id,</if> | |
| 77 | - <if test="carType != null">car_type,</if> | |
| 78 | - <if test="carCode != null">car_code,</if> | |
| 79 | - <if test="carBrank != null">car_brank,</if> | |
| 80 | - <if test="emissionStandard != null">emission_standard,</if> | |
| 81 | - <if test="roadTransportDate != null">road_transport_date,</if> | |
| 82 | - <if test="drivingLicenseDate != null">driving_license_date,</if> | |
| 83 | - <if test="enterDate != null">enter_date,</if> | |
| 84 | - <if test="farmeNumber != null">farme_number,</if> | |
| 85 | - <if test="carIdentification != null">car_identification,</if> | |
| 86 | - <if test="containerVolume != null">container_volume,</if> | |
| 87 | - <if test="carColor != null">car_color,</if> | |
| 88 | - <if test="carEquipment != null">car_equipment,</if> | |
| 89 | - <if test="remark != null">remark,</if> | |
| 90 | - <if test="roadTransport != null">road_transport,</if> | |
| 91 | - <if test="drivingLicense != null">driving_license,</if> | |
| 92 | - <if test="carFront != null">car_front,</if> | |
| 93 | - <if test="carLeft != null">car_left,</if> | |
| 94 | - <if test="carBehind != null">car_behind,</if> | |
| 95 | - <if test="carRight != null">car_right,</if> | |
| 96 | - <if test="drivers != null">drivers,</if> | |
| 97 | - <if test="status != null">status,</if> | |
| 98 | - <if test="createTime != null">create_time,</if> | |
| 99 | - <if test="createBy != null">create_by,</if> | |
| 100 | - <if test="updateTime != null">update_time,</if> | |
| 101 | - <if test="updateBy != null">update_by,</if> | |
| 102 | - </trim> | |
| 103 | - <trim prefix="values (" suffix=")" suffixOverrides=","> | |
| 104 | - <if test="companyId != null">#{companyId},</if> | |
| 105 | - <if test="carType != null">#{carType},</if> | |
| 106 | - <if test="carCode != null">#{carCode},</if> | |
| 107 | - <if test="carBrank != null">#{carBrank},</if> | |
| 108 | - <if test="emissionStandard != null">#{emissionStandard},</if> | |
| 109 | - <if test="roadTransportDate != null">#{roadTransportDate},</if> | |
| 110 | - <if test="drivingLicenseDate != null">#{drivingLicenseDate},</if> | |
| 111 | - <if test="enterDate != null">#{enterDate},</if> | |
| 112 | - <if test="farmeNumber != null">#{farmeNumber},</if> | |
| 113 | - <if test="carIdentification != null">#{carIdentification},</if> | |
| 114 | - <if test="containerVolume != null">#{containerVolume},</if> | |
| 115 | - <if test="carColor != null">#{carColor},</if> | |
| 116 | - <if test="carEquipment != null">#{carEquipment},</if> | |
| 117 | - <if test="remark != null">#{remark},</if> | |
| 118 | - <if test="roadTransport != null">#{roadTransport},</if> | |
| 119 | - <if test="drivingLicense != null">#{drivingLicense},</if> | |
| 120 | - <if test="carFront != null">#{carFront},</if> | |
| 121 | - <if test="carLeft != null">#{carLeft},</if> | |
| 122 | - <if test="carBehind != null">#{carBehind},</if> | |
| 123 | - <if test="carRight != null">#{carRight},</if> | |
| 124 | - <if test="drivers != null">#{drivers},</if> | |
| 125 | - <if test="status != null">#{status},</if> | |
| 126 | - <if test="createTime != null">#{createTime},</if> | |
| 127 | - <if test="createBy != null">#{createBy},</if> | |
| 128 | - <if test="updateTime != null">#{updateTime},</if> | |
| 129 | - <if test="updateBy != null">#{updateBy},</if> | |
| 130 | - </trim> | |
| 131 | - </insert> | |
| 132 | - | |
| 133 | - <update id="updateCarInfo" parameterType="CarInfo"> | |
| 134 | - update car_info | |
| 135 | - <trim prefix="SET" suffixOverrides=","> | |
| 136 | - <if test="companyId != null">company_id = #{companyId},</if> | |
| 137 | - <if test="carType != null">car_type = #{carType},</if> | |
| 138 | - <if test="carCode != null">car_code = #{carCode},</if> | |
| 139 | - <if test="carBrank != null">car_brank = #{carBrank},</if> | |
| 140 | - <if test="emissionStandard != null">emission_standard = #{emissionStandard},</if> | |
| 141 | - <if test="roadTransportDate != null">road_transport_date = #{roadTransportDate},</if> | |
| 142 | - <if test="drivingLicenseDate != null">driving_license_date = #{drivingLicenseDate},</if> | |
| 143 | - <if test="enterDate != null">enter_date = #{enterDate},</if> | |
| 144 | - <if test="farmeNumber != null">farme_number = #{farmeNumber},</if> | |
| 145 | - <if test="carIdentification != null">car_identification = #{carIdentification},</if> | |
| 146 | - <if test="containerVolume != null">container_volume = #{containerVolume},</if> | |
| 147 | - <if test="carColor != null">car_color = #{carColor},</if> | |
| 148 | - <if test="carEquipment != null">car_equipment = #{carEquipment},</if> | |
| 149 | - <if test="remark != null">remark = #{remark},</if> | |
| 150 | - <if test="roadTransport != null">road_transport = #{roadTransport},</if> | |
| 151 | - <if test="drivingLicense != null">driving_license = #{drivingLicense},</if> | |
| 152 | - <if test="carFront != null">car_front = #{carFront},</if> | |
| 153 | - <if test="carLeft != null">car_left = #{carLeft},</if> | |
| 154 | - <if test="carBehind != null">car_behind = #{carBehind},</if> | |
| 155 | - <if test="carRight != null">car_right = #{carRight},</if> | |
| 156 | - <if test="drivers != null">drivers = #{drivers},</if> | |
| 157 | - <if test="status != null">status = #{status},</if> | |
| 158 | - <if test="createTime != null">create_time = #{createTime},</if> | |
| 159 | - <if test="createBy != null">create_by = #{createBy},</if> | |
| 160 | - <if test="updateTime != null">update_time = #{updateTime},</if> | |
| 161 | - <if test="updateBy != null">update_by = #{updateBy},</if> | |
| 162 | - </trim> | |
| 163 | - where id = #{id} | |
| 164 | - </update> | |
| 165 | - | |
| 166 | - <delete id="deleteCarInfoById" parameterType="Long"> | |
| 167 | - delete from car_info where id = #{id} | |
| 168 | - </delete> | |
| 169 | - | |
| 170 | - <delete id="deleteCarInfoByIds" parameterType="String"> | |
| 171 | - delete from car_info where id in | |
| 172 | - <foreach item="id" collection="array" open="(" separator="," close=")"> | |
| 173 | - #{id} | |
| 174 | - </foreach> | |
| 175 | - </delete> | |
| 176 | - | |
| 177 | -</mapper> | |
| 178 | 0 | \ No newline at end of file |
trash-unit/src/main/resources/mapper/driver/DriverMapper.xml deleted
100644 → 0
| 1 | -<?xml version="1.0" encoding="UTF-8" ?> | |
| 2 | -<!DOCTYPE mapper | |
| 3 | -PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |
| 4 | -"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
| 5 | -<mapper namespace="com.trash.driver.mapper.DriverMapper"> | |
| 6 | - | |
| 7 | - <resultMap type="Driver" id="DriverResult"> | |
| 8 | - <result property="id" column="id" /> | |
| 9 | - <result property="name" column="name" /> | |
| 10 | - <result property="identityCard" column="identity_card" /> | |
| 11 | - <result property="companyId" column="company_id" /> | |
| 12 | - <result property="professionalQualificationBeginDate" column="professional_qualification_begin_date" /> | |
| 13 | - <result property="professionalQualificationEndDate" column="professional_qualification_end_date" /> | |
| 14 | - <result property="drivingLicenceBeginDate" column="driving_licence_begin_date" /> | |
| 15 | - <result property="drivingLicenceEndDate" column="driving_licence_end_date" /> | |
| 16 | - <result property="safetyTrainingDate" column="safety_training_date" /> | |
| 17 | - <result property="safetyTrainingContent" column="safety_training_content" /> | |
| 18 | - <result property="remark" column="remark" /> | |
| 19 | - <result property="drivingLicence" column="driving_licence" /> | |
| 20 | - <result property="professionalQualification" column="professional_qualification" /> | |
| 21 | - <result property="safetyTraining" column="safety_training" /> | |
| 22 | - <result property="status" column="status" /> | |
| 23 | - <result property="createTime" column="create_time" /> | |
| 24 | - <result property="createBy" column="create_by" /> | |
| 25 | - <result property="updateTime" column="update_time" /> | |
| 26 | - <result property="updateBy" column="update_by" /> | |
| 27 | - </resultMap> | |
| 28 | - | |
| 29 | - <sql id="selectDriverVo"> | |
| 30 | - select id, name, identity_card, company_id, professional_qualification_begin_date, professional_qualification_end_date, driving_licence_begin_date, driving_licence_end_date, safety_training_date, safety_training_content, remark, driving_licence, professional_qualification, safety_training, status, create_time, create_by, update_time, update_by from driver | |
| 31 | - </sql> | |
| 32 | - | |
| 33 | - <select id="selectDriverList" parameterType="Driver" resultMap="DriverResult"> | |
| 34 | - <include refid="selectDriverVo"/> | |
| 35 | - <where> | |
| 36 | - <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if> | |
| 37 | - <if test="identityCard != null and identityCard != ''"> and identity_card = #{identityCard}</if> | |
| 38 | - <if test="companyId != null "> and company_id = #{companyId}</if> | |
| 39 | - <if test="professionalQualificationBeginDate != null "> and professional_qualification_begin_date = #{professionalQualificationBeginDate}</if> | |
| 40 | - <if test="professionalQualificationEndDate != null "> and professional_qualification_end_date = #{professionalQualificationEndDate}</if> | |
| 41 | - <if test="drivingLicenceBeginDate != null "> and driving_licence_begin_date = #{drivingLicenceBeginDate}</if> | |
| 42 | - <if test="drivingLicenceEndDate != null "> and driving_licence_end_date = #{drivingLicenceEndDate}</if> | |
| 43 | - <if test="safetyTrainingDate != null "> and safety_training_date = #{safetyTrainingDate}</if> | |
| 44 | - <if test="safetyTrainingContent != null and safetyTrainingContent != ''"> and safety_training_content = #{safetyTrainingContent}</if> | |
| 45 | - <if test="drivingLicence != null and drivingLicence != ''"> and driving_licence = #{drivingLicence}</if> | |
| 46 | - <if test="professionalQualification != null and professionalQualification != ''"> and professional_qualification = #{professionalQualification}</if> | |
| 47 | - <if test="safetyTraining != null and safetyTraining != ''"> and safety_training = #{safetyTraining}</if> | |
| 48 | - <if test="status != null "> and status = #{status}</if> | |
| 49 | - </where> | |
| 50 | - </select> | |
| 51 | - | |
| 52 | - <select id="selectDriverById" parameterType="Long" resultMap="DriverResult"> | |
| 53 | - <include refid="selectDriverVo"/> | |
| 54 | - where id = #{id} | |
| 55 | - </select> | |
| 56 | - | |
| 57 | - <insert id="insertDriver" parameterType="Driver" useGeneratedKeys="true" keyProperty="id"> | |
| 58 | - insert into driver | |
| 59 | - <trim prefix="(" suffix=")" suffixOverrides=","> | |
| 60 | - <if test="name != null">name,</if> | |
| 61 | - <if test="identityCard != null">identity_card,</if> | |
| 62 | - <if test="companyId != null">company_id,</if> | |
| 63 | - <if test="professionalQualificationBeginDate != null">professional_qualification_begin_date,</if> | |
| 64 | - <if test="professionalQualificationEndDate != null">professional_qualification_end_date,</if> | |
| 65 | - <if test="drivingLicenceBeginDate != null">driving_licence_begin_date,</if> | |
| 66 | - <if test="drivingLicenceEndDate != null">driving_licence_end_date,</if> | |
| 67 | - <if test="safetyTrainingDate != null">safety_training_date,</if> | |
| 68 | - <if test="safetyTrainingContent != null">safety_training_content,</if> | |
| 69 | - <if test="remark != null">remark,</if> | |
| 70 | - <if test="drivingLicence != null">driving_licence,</if> | |
| 71 | - <if test="professionalQualification != null">professional_qualification,</if> | |
| 72 | - <if test="safetyTraining != null">safety_training,</if> | |
| 73 | - <if test="status != null">status,</if> | |
| 74 | - <if test="createTime != null">create_time,</if> | |
| 75 | - <if test="createBy != null">create_by,</if> | |
| 76 | - <if test="updateTime != null">update_time,</if> | |
| 77 | - <if test="updateBy != null">update_by,</if> | |
| 78 | - </trim> | |
| 79 | - <trim prefix="values (" suffix=")" suffixOverrides=","> | |
| 80 | - <if test="name != null">#{name},</if> | |
| 81 | - <if test="identityCard != null">#{identityCard},</if> | |
| 82 | - <if test="companyId != null">#{companyId},</if> | |
| 83 | - <if test="professionalQualificationBeginDate != null">#{professionalQualificationBeginDate},</if> | |
| 84 | - <if test="professionalQualificationEndDate != null">#{professionalQualificationEndDate},</if> | |
| 85 | - <if test="drivingLicenceBeginDate != null">#{drivingLicenceBeginDate},</if> | |
| 86 | - <if test="drivingLicenceEndDate != null">#{drivingLicenceEndDate},</if> | |
| 87 | - <if test="safetyTrainingDate != null">#{safetyTrainingDate},</if> | |
| 88 | - <if test="safetyTrainingContent != null">#{safetyTrainingContent},</if> | |
| 89 | - <if test="remark != null">#{remark},</if> | |
| 90 | - <if test="drivingLicence != null">#{drivingLicence},</if> | |
| 91 | - <if test="professionalQualification != null">#{professionalQualification},</if> | |
| 92 | - <if test="safetyTraining != null">#{safetyTraining},</if> | |
| 93 | - <if test="status != null">#{status},</if> | |
| 94 | - <if test="createTime != null">#{createTime},</if> | |
| 95 | - <if test="createBy != null">#{createBy},</if> | |
| 96 | - <if test="updateTime != null">#{updateTime},</if> | |
| 97 | - <if test="updateBy != null">#{updateBy},</if> | |
| 98 | - </trim> | |
| 99 | - </insert> | |
| 100 | - | |
| 101 | - <update id="updateDriver" parameterType="Driver"> | |
| 102 | - update driver | |
| 103 | - <trim prefix="SET" suffixOverrides=","> | |
| 104 | - <if test="name != null">name = #{name},</if> | |
| 105 | - <if test="identityCard != null">identity_card = #{identityCard},</if> | |
| 106 | - <if test="companyId != null">company_id = #{companyId},</if> | |
| 107 | - <if test="professionalQualificationBeginDate != null">professional_qualification_begin_date = #{professionalQualificationBeginDate},</if> | |
| 108 | - <if test="professionalQualificationEndDate != null">professional_qualification_end_date = #{professionalQualificationEndDate},</if> | |
| 109 | - <if test="drivingLicenceBeginDate != null">driving_licence_begin_date = #{drivingLicenceBeginDate},</if> | |
| 110 | - <if test="drivingLicenceEndDate != null">driving_licence_end_date = #{drivingLicenceEndDate},</if> | |
| 111 | - <if test="safetyTrainingDate != null">safety_training_date = #{safetyTrainingDate},</if> | |
| 112 | - <if test="safetyTrainingContent != null">safety_training_content = #{safetyTrainingContent},</if> | |
| 113 | - <if test="remark != null">remark = #{remark},</if> | |
| 114 | - <if test="drivingLicence != null">driving_licence = #{drivingLicence},</if> | |
| 115 | - <if test="professionalQualification != null">professional_qualification = #{professionalQualification},</if> | |
| 116 | - <if test="safetyTraining != null">safety_training = #{safetyTraining},</if> | |
| 117 | - <if test="status != null">status = #{status},</if> | |
| 118 | - <if test="createTime != null">create_time = #{createTime},</if> | |
| 119 | - <if test="createBy != null">create_by = #{createBy},</if> | |
| 120 | - <if test="updateTime != null">update_time = #{updateTime},</if> | |
| 121 | - <if test="updateBy != null">update_by = #{updateBy},</if> | |
| 122 | - </trim> | |
| 123 | - where id = #{id} | |
| 124 | - </update> | |
| 125 | - | |
| 126 | - <delete id="deleteDriverById" parameterType="Long"> | |
| 127 | - delete from driver where id = #{id} | |
| 128 | - </delete> | |
| 129 | - | |
| 130 | - <delete id="deleteDriverByIds" parameterType="String"> | |
| 131 | - delete from driver where id in | |
| 132 | - <foreach item="id" collection="array" open="(" separator="," close=")"> | |
| 133 | - #{id} | |
| 134 | - </foreach> | |
| 135 | - </delete> | |
| 136 | - | |
| 137 | -</mapper> | |
| 138 | 0 | \ No newline at end of file |
trash-unit/src/main/resources/mapper/unit/CarInfoMapper.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8" ?> | |
| 2 | +<!DOCTYPE mapper | |
| 3 | +PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |
| 4 | +"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
| 5 | +<mapper namespace="com.trash.carInfo.mapper.CarInfoMapper"> | |
| 6 | + | |
| 7 | + <resultMap type="CarInfo" id="CarInfoResult"> | |
| 8 | + <result property="id" column="id" /> | |
| 9 | + <result property="companyId" column="company_id" /> | |
| 10 | + <result property="carType" column="car_type" /> | |
| 11 | + <result property="carCode" column="car_code" /> | |
| 12 | + <result property="carBrank" column="car_brank" /> | |
| 13 | + <result property="emissionStandard" column="emission_standard" /> | |
| 14 | + <result property="roadTransportDate" column="road_transport_date" /> | |
| 15 | + <result property="drivingLicenseDate" column="driving_license_date" /> | |
| 16 | + <result property="enterDate" column="enter_date" /> | |
| 17 | + <result property="farmeNumber" column="farme_number" /> | |
| 18 | + <result property="carIdentification" column="car_identification" /> | |
| 19 | + <result property="containerVolume" column="container_volume" /> | |
| 20 | + <result property="lengthWidthHeight" column="length_width_height" /> | |
| 21 | + <result property="carColor" column="car_color" /> | |
| 22 | + <result property="carEquipment" column="car_equipment" /> | |
| 23 | + <result property="remark" column="remark" /> | |
| 24 | + <result property="roadTransport" column="road_transport" /> | |
| 25 | + <result property="drivingLicense" column="driving_license" /> | |
| 26 | + <result property="carFront" column="car_front" /> | |
| 27 | + <result property="carLeft" column="car_left" /> | |
| 28 | + <result property="carBehind" column="car_behind" /> | |
| 29 | + <result property="carRight" column="car_right" /> | |
| 30 | + <result property="drivers" column="drivers" /> | |
| 31 | + <result property="status" column="status" /> | |
| 32 | + <result property="createTime" column="create_time" /> | |
| 33 | + <result property="createBy" column="create_by" /> | |
| 34 | + <result property="updateTime" column="update_time" /> | |
| 35 | + <result property="updateBy" column="update_by" /> | |
| 36 | + <result property="creditStatus" column="credit_status" /> | |
| 37 | + <result property="qrCode" column="qr_code" /> | |
| 38 | + </resultMap> | |
| 39 | + | |
| 40 | + <resultMap type="CarInfoVo" id="CarInfoVoResult"> | |
| 41 | + <result property="id" column="id" /> | |
| 42 | + <result property="companyId" column="company_id" /> | |
| 43 | + <result property="carType" column="car_type" /> | |
| 44 | + <result property="carCode" column="car_code" /> | |
| 45 | + <result property="carBrank" column="car_brank" /> | |
| 46 | + <result property="emissionStandard" column="emission_standard" /> | |
| 47 | + <result property="roadTransportDate" column="road_transport_date" /> | |
| 48 | + <result property="drivingLicenseDate" column="driving_license_date" /> | |
| 49 | + <result property="enterDate" column="enter_date" /> | |
| 50 | + <result property="farmeNumber" column="farme_number" /> | |
| 51 | + <result property="carIdentification" column="car_identification" /> | |
| 52 | + <result property="containerVolume" column="container_volume" /> | |
| 53 | + <result property="lengthWidthHeight" column="length_width_height" /> | |
| 54 | + <result property="carColor" column="car_color" /> | |
| 55 | + <result property="carEquipment" column="car_equipment" /> | |
| 56 | + <result property="remark" column="remark" /> | |
| 57 | + <result property="roadTransport" column="road_transport" /> | |
| 58 | + <result property="drivingLicense" column="driving_license" /> | |
| 59 | + <result property="carFront" column="car_front" /> | |
| 60 | + <result property="carLeft" column="car_left" /> | |
| 61 | + <result property="carBehind" column="car_behind" /> | |
| 62 | + <result property="carRight" column="car_right" /> | |
| 63 | + <result property="drivers" column="drivers" /> | |
| 64 | + <result property="status" column="status" /> | |
| 65 | + <result property="createTime" column="create_time" /> | |
| 66 | + <result property="createBy" column="create_by" /> | |
| 67 | + <result property="updateTime" column="update_time" /> | |
| 68 | + <result property="updateBy" column="update_by" /> | |
| 69 | + <result property="creditStatus" column="credit_status" /> | |
| 70 | + <result property="qrCode" column="qr_code" /> | |
| 71 | + <result property="companyName" column="companyName" /> | |
| 72 | + <result property="driversName" column="driversName" /> | |
| 73 | + </resultMap> | |
| 74 | + | |
| 75 | + <sql id="selectCarInfoVo"> | |
| 76 | + select id, company_id, car_type, car_code, car_brank, emission_standard, road_transport_date, driving_license_date, enter_date, farme_number, car_identification, container_volume, car_color, car_equipment, remark, road_transport, driving_license, car_front, car_left, car_behind, car_right, drivers, status, create_time, create_by, update_time, update_by, credit_status, qr_code from car_info | |
| 77 | + </sql> | |
| 78 | + | |
| 79 | + <sql id="selectCarInfoForCompanyVo"> | |
| 80 | + select car.id, | |
| 81 | + company_id, | |
| 82 | + car_type, | |
| 83 | + car_code, | |
| 84 | + car_brank, | |
| 85 | + emission_standard, | |
| 86 | + road_transport_date, | |
| 87 | + driving_license_date, | |
| 88 | + car.enter_date, | |
| 89 | + farme_number, | |
| 90 | + car_identification, | |
| 91 | + container_volume, | |
| 92 | + length_width_height, | |
| 93 | + car_color, | |
| 94 | + car_equipment, | |
| 95 | + car.remark, | |
| 96 | + road_transport, | |
| 97 | + driving_license, | |
| 98 | + car_front, | |
| 99 | + car_left, | |
| 100 | + car_behind, | |
| 101 | + car_right, | |
| 102 | + drivers, | |
| 103 | + car.status, | |
| 104 | + car.create_time, | |
| 105 | + car.create_by, | |
| 106 | + car.update_time, | |
| 107 | + car.update_by, | |
| 108 | + car.credit_status, | |
| 109 | + car.qr_code, | |
| 110 | + c.name companyName, | |
| 111 | + d.driversName | |
| 112 | + from car_info car | |
| 113 | + left join transportation_enterprise c on car.company_id = c.id | |
| 114 | + left join (select cdr.car_id, GROUP_CONCAT(name) driversName | |
| 115 | + from car_driver_relation cdr | |
| 116 | + left join driver d on d.id = cdr.driver_id | |
| 117 | + group by cdr.car_id) d on d.car_id = car.id | |
| 118 | + </sql> | |
| 119 | + | |
| 120 | + <select id="selectCarInfoList" parameterType="CarInfoVo" resultMap="CarInfoVoResult"> | |
| 121 | + <include refid="selectCarInfoForCompanyVo"/> | |
| 122 | + <where> | |
| 123 | + <if test="companyName != null and companyName != ''"> and c.name like concat('%',#{companyName},'%')</if> | |
| 124 | + <if test="carType != null and carType != ''"> and car_type = #{carType}</if> | |
| 125 | + <if test="carCode != null and carCode != ''"> and car_code like concat('%',#{carCode},'%')</if> | |
| 126 | + <if test="carBrank != null and carBrank != ''"> and car_brank like concat('%',#{carBrank},'%')</if> | |
| 127 | + <if test="emissionStandard != null and emissionStandard != ''"> and emission_standard = #{emissionStandard}</if> | |
| 128 | + <if test="roadTransportDate != null "> and road_transport_date = #{roadTransportDate}</if> | |
| 129 | + <if test="drivingLicenseDate != null "> and driving_license_date = #{drivingLicenseDate}</if> | |
| 130 | + <if test="enterDate != null "> and enter_date = #{enterDate}</if> | |
| 131 | + <if test="farmeNumber != null and farmeNumber != ''"> and farme_number = #{farmeNumber}</if> | |
| 132 | + <if test="carIdentification != null and carIdentification != ''"> and car_identification = #{carIdentification}</if> | |
| 133 | + <if test="containerVolume != null and containerVolume != ''"> and container_volume = #{containerVolume}</if> | |
| 134 | + <if test="carColor != null and carColor != ''"> and car_color = #{carColor}</if> | |
| 135 | + <if test="carEquipment != null and carEquipment != ''"> and car_equipment = #{carEquipment}</if> | |
| 136 | + <if test="roadTransport != null and roadTransport != ''"> and road_transport = #{roadTransport}</if> | |
| 137 | + <if test="drivingLicense != null and drivingLicense != ''"> and driving_license = #{drivingLicense}</if> | |
| 138 | + <if test="carFront != null and carFront != ''"> and car_front = #{carFront}</if> | |
| 139 | + <if test="carLeft != null and carLeft != ''"> and car_left = #{carLeft}</if> | |
| 140 | + <if test="carBehind != null and carBehind != ''"> and car_behind = #{carBehind}</if> | |
| 141 | + <if test="carRight != null and carRight != ''"> and car_right = #{carRight}</if> | |
| 142 | + <if test="drivers != null and drivers != ''"> and drivers = #{drivers}</if> | |
| 143 | + <if test="status != null "> and car.status = #{status}</if> | |
| 144 | + <if test="creditStatus != null and creditStatus != ''"> and car.credit_status = #{creditStatus}</if> | |
| 145 | + </where> | |
| 146 | + </select> | |
| 147 | + | |
| 148 | + <select id="selectCarInfoById" parameterType="Long" resultMap="CarInfoResult"> | |
| 149 | + <include refid="selectCarInfoVo"/> | |
| 150 | + where id = #{id} | |
| 151 | + </select> | |
| 152 | + | |
| 153 | + <insert id="insertCarInfo" parameterType="CarInfo" useGeneratedKeys="true" keyProperty="id"> | |
| 154 | + insert into car_info | |
| 155 | + <trim prefix="(" suffix=")" suffixOverrides=","> | |
| 156 | + <if test="companyId != null">company_id,</if> | |
| 157 | + <if test="carType != null">car_type,</if> | |
| 158 | + <if test="carCode != null">car_code,</if> | |
| 159 | + <if test="carBrank != null">car_brank,</if> | |
| 160 | + <if test="emissionStandard != null">emission_standard,</if> | |
| 161 | + <if test="roadTransportDate != null">road_transport_date,</if> | |
| 162 | + <if test="drivingLicenseDate != null">driving_license_date,</if> | |
| 163 | + <if test="enterDate != null">enter_date,</if> | |
| 164 | + <if test="farmeNumber != null">farme_number,</if> | |
| 165 | + <if test="carIdentification != null">car_identification,</if> | |
| 166 | + <if test="containerVolume != null">container_volume,</if> | |
| 167 | + <if test="carColor != null">car_color,</if> | |
| 168 | + <if test="carEquipment != null">car_equipment,</if> | |
| 169 | + <if test="remark != null">remark,</if> | |
| 170 | + <if test="roadTransport != null">road_transport,</if> | |
| 171 | + <if test="drivingLicense != null">driving_license,</if> | |
| 172 | + <if test="carFront != null">car_front,</if> | |
| 173 | + <if test="carLeft != null">car_left,</if> | |
| 174 | + <if test="carBehind != null">car_behind,</if> | |
| 175 | + <if test="carRight != null">car_right,</if> | |
| 176 | + <if test="drivers != null">drivers,</if> | |
| 177 | + <if test="status != null">status,</if> | |
| 178 | + <if test="createTime != null">create_time,</if> | |
| 179 | + <if test="createBy != null">create_by,</if> | |
| 180 | + <if test="updateTime != null">update_time,</if> | |
| 181 | + <if test="updateBy != null">update_by,</if> | |
| 182 | + <if test="creditStatus != null">credit_status,</if> | |
| 183 | + <if test="qrCode != null">qr_code,</if> | |
| 184 | + <if test="lengthWidthHeight != null">length_width_height,</if> | |
| 185 | + </trim> | |
| 186 | + <trim prefix="values (" suffix=")" suffixOverrides=","> | |
| 187 | + <if test="companyId != null">#{companyId},</if> | |
| 188 | + <if test="carType != null">#{carType},</if> | |
| 189 | + <if test="carCode != null">#{carCode},</if> | |
| 190 | + <if test="carBrank != null">#{carBrank},</if> | |
| 191 | + <if test="emissionStandard != null">#{emissionStandard},</if> | |
| 192 | + <if test="roadTransportDate != null">#{roadTransportDate},</if> | |
| 193 | + <if test="drivingLicenseDate != null">#{drivingLicenseDate},</if> | |
| 194 | + <if test="enterDate != null">#{enterDate},</if> | |
| 195 | + <if test="farmeNumber != null">#{farmeNumber},</if> | |
| 196 | + <if test="carIdentification != null">#{carIdentification},</if> | |
| 197 | + <if test="containerVolume != null">#{containerVolume},</if> | |
| 198 | + <if test="carColor != null">#{carColor},</if> | |
| 199 | + <if test="carEquipment != null">#{carEquipment},</if> | |
| 200 | + <if test="remark != null">#{remark},</if> | |
| 201 | + <if test="roadTransport != null">#{roadTransport},</if> | |
| 202 | + <if test="drivingLicense != null">#{drivingLicense},</if> | |
| 203 | + <if test="carFront != null">#{carFront},</if> | |
| 204 | + <if test="carLeft != null">#{carLeft},</if> | |
| 205 | + <if test="carBehind != null">#{carBehind},</if> | |
| 206 | + <if test="carRight != null">#{carRight},</if> | |
| 207 | + <if test="drivers != null">#{drivers},</if> | |
| 208 | + <if test="status != null">#{status},</if> | |
| 209 | + <if test="createTime != null">#{createTime},</if> | |
| 210 | + <if test="createBy != null">#{createBy},</if> | |
| 211 | + <if test="updateTime != null">#{updateTime},</if> | |
| 212 | + <if test="updateBy != null">#{updateBy},</if> | |
| 213 | + <if test="creditStatus != null">#{creditStatus},</if> | |
| 214 | + <if test="qrCode != null">#{qrCode},</if> | |
| 215 | + <if test="lengthWidthHeight != null">#{lengthWidthHeight},</if> | |
| 216 | + </trim> | |
| 217 | + </insert> | |
| 218 | + | |
| 219 | + <update id="updateCarInfo" parameterType="CarInfo"> | |
| 220 | + update car_info | |
| 221 | + <trim prefix="SET" suffixOverrides=","> | |
| 222 | + <if test="companyId != null">company_id = #{companyId},</if> | |
| 223 | + <if test="carType != null">car_type = #{carType},</if> | |
| 224 | + <if test="carCode != null">car_code = #{carCode},</if> | |
| 225 | + <if test="carBrank != null">car_brank = #{carBrank},</if> | |
| 226 | + <if test="emissionStandard != null">emission_standard = #{emissionStandard},</if> | |
| 227 | + <if test="roadTransportDate != null">road_transport_date = #{roadTransportDate},</if> | |
| 228 | + <if test="drivingLicenseDate != null">driving_license_date = #{drivingLicenseDate},</if> | |
| 229 | + <if test="enterDate != null">enter_date = #{enterDate},</if> | |
| 230 | + <if test="farmeNumber != null">farme_number = #{farmeNumber},</if> | |
| 231 | + <if test="carIdentification != null">car_identification = #{carIdentification},</if> | |
| 232 | + <if test="containerVolume != null">container_volume = #{containerVolume},</if> | |
| 233 | + <if test="carColor != null">car_color = #{carColor},</if> | |
| 234 | + <if test="carEquipment != null">car_equipment = #{carEquipment},</if> | |
| 235 | + <if test="remark != null">remark = #{remark},</if> | |
| 236 | + <if test="roadTransport != null">road_transport = #{roadTransport},</if> | |
| 237 | + <if test="drivingLicense != null">driving_license = #{drivingLicense},</if> | |
| 238 | + <if test="carFront != null">car_front = #{carFront},</if> | |
| 239 | + <if test="carLeft != null">car_left = #{carLeft},</if> | |
| 240 | + <if test="carBehind != null">car_behind = #{carBehind},</if> | |
| 241 | + <if test="carRight != null">car_right = #{carRight},</if> | |
| 242 | + <if test="drivers != null">drivers = #{drivers},</if> | |
| 243 | + <if test="status != null">status = #{status},</if> | |
| 244 | + <if test="createTime != null">create_time = #{createTime},</if> | |
| 245 | + <if test="createBy != null">create_by = #{createBy},</if> | |
| 246 | + <if test="updateTime != null">update_time = #{updateTime},</if> | |
| 247 | + <if test="updateBy != null">update_by = #{updateBy},</if> | |
| 248 | + <if test="creditStatus != null">credit_status = #{creditStatus},</if> | |
| 249 | + <if test="qrCode != null">qr_code = #{qrCode},</if> | |
| 250 | + <if test="lengthWidthHeight != null">length_width_height = #{lengthWidthHeight},</if> | |
| 251 | + </trim> | |
| 252 | + where id = #{id} | |
| 253 | + </update> | |
| 254 | + | |
| 255 | + <delete id="deleteCarInfoById" parameterType="Long"> | |
| 256 | + delete from car_info where id = #{id} | |
| 257 | + </delete> | |
| 258 | + | |
| 259 | + <delete id="deleteCarInfoByIds" parameterType="String"> | |
| 260 | + delete from car_info where id in | |
| 261 | + <foreach item="id" collection="array" open="(" separator="," close=")"> | |
| 262 | + #{id} | |
| 263 | + </foreach> | |
| 264 | + </delete> | |
| 265 | + | |
| 266 | + | |
| 267 | + <insert id="addCarDriverRelation" parameterType="CarDriverRelation"> | |
| 268 | + insert into car_driver_relation(car_id,driver_id) | |
| 269 | + values(#{carId},#{driverId}) | |
| 270 | + </insert> | |
| 271 | + | |
| 272 | + <delete id="deleteCarDriverRelationByCarId" parameterType="Long"> | |
| 273 | + delete from car_driver_relation where car_id = #{carId} | |
| 274 | + </delete> | |
| 275 | +</mapper> | |
| 0 | 276 | \ No newline at end of file | ... | ... |
trash-unit/src/main/resources/mapper/disposalSite/DisposalSiteMapper.xml renamed to trash-unit/src/main/resources/mapper/unit/DisposalSiteMapper.xml
| ... | ... | @@ -20,17 +20,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 20 | 20 | <result property="validityBeginDate" column="validity_begin_date" /> |
| 21 | 21 | <result property="validityEndDate" column="validity_end_date" /> |
| 22 | 22 | <result property="squareMeasure" column="square_measure" /> |
| 23 | + <result property="surplusSquareMeasure" column="surplus_square_measure" /> | |
| 23 | 24 | <result property="carWashingFacilities" column="car_washing_facilities" /> |
| 24 | 25 | <result property="exitRoadCondition" column="exit_road_condition" /> |
| 25 | 26 | <result property="lightingFacility" column="lighting_facility" /> |
| 26 | 27 | <result property="videoSurveillanceFacility" column="video_surveillance_facility" /> |
| 27 | 28 | <result property="preparer" column="preparer" /> |
| 28 | 29 | <result property="handlingAdvice" column="handling_advice" /> |
| 30 | + <result property="absorbSource" column="absorb_source" /> | |
| 29 | 31 | <result property="electronicFence" column="electronic_fence" /> |
| 32 | + <result property="creditStatus" column="credit_status" /> | |
| 30 | 33 | <result property="approvalDocument" column="approval_document" /> |
| 31 | 34 | <result property="approvalData" column="approval_data" /> |
| 32 | 35 | <result property="scenePhoto" column="scene_photo" /> |
| 33 | 36 | <result property="carWashingFacilitiesImage" column="car_washing_facilities_image" /> |
| 37 | + <result property="termRange" column="term_range" /> | |
| 34 | 38 | <result property="safetyAssessmentReport" column="safety_assessment_report" /> |
| 35 | 39 | <result property="environmentalApproval" column="environmental_approval" /> |
| 36 | 40 | <result property="authorization" column="authorization" /> |
| ... | ... | @@ -41,10 +45,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 41 | 45 | <result property="createBy" column="create_by" /> |
| 42 | 46 | <result property="updateTime" column="update_time" /> |
| 43 | 47 | <result property="updateBy" column="update_by" /> |
| 48 | + <result property="qrCode" column="qr_code" /> | |
| 49 | + <result property="auditStatus" column="audit_status" /> | |
| 44 | 50 | </resultMap> |
| 45 | 51 | |
| 46 | 52 | <sql id="selectDisposalSiteVo"> |
| 47 | - select id, name, certificate_number, address, engineering_property, site_type, local_area, operating_area, trash_type, construction_unit, construction_unit_person, construction_unit_person_phone, validity_begin_date, validity_end_date, square_measure, car_washing_facilities, exit_road_condition, lighting_facility, video_surveillance_facility, preparer, handling_advice, electronic_fence, approval_document, approval_data, scene_photo, car_washing_facilities_image, safety_assessment_report, environmental_approval, authorization, other_information, company_ids, status, create_time, create_by, update_time, update_by from disposal_site | |
| 53 | + select id, name, certificate_number, address, engineering_property, site_type, local_area, operating_area, trash_type, construction_unit, construction_unit_person, construction_unit_person_phone, validity_begin_date, validity_end_date, square_measure, surplus_square_measure, car_washing_facilities, exit_road_condition, lighting_facility, video_surveillance_facility, preparer, handling_advice, absorb_source, electronic_fence, credit_status, approval_document, approval_data, scene_photo, car_washing_facilities_image, term_range, safety_assessment_report, environmental_approval, `authorization`, other_information, company_ids, status, create_time, create_by, update_time, update_by, qr_code,audit_status from disposal_site | |
| 48 | 54 | </sql> |
| 49 | 55 | |
| 50 | 56 | <select id="selectDisposalSiteList" parameterType="DisposalSite" resultMap="DisposalSiteResult"> |
| ... | ... | @@ -64,23 +70,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 64 | 70 | <if test="validityBeginDate != null "> and validity_begin_date = #{validityBeginDate}</if> |
| 65 | 71 | <if test="validityEndDate != null "> and validity_end_date = #{validityEndDate}</if> |
| 66 | 72 | <if test="squareMeasure != null and squareMeasure != ''"> and square_measure = #{squareMeasure}</if> |
| 73 | + <if test="surplusSquareMeasure != null and surplusSquareMeasure != ''"> and surplus_square_measure = #{surplusSquareMeasure}</if> | |
| 67 | 74 | <if test="carWashingFacilities != null and carWashingFacilities != ''"> and car_washing_facilities = #{carWashingFacilities}</if> |
| 68 | 75 | <if test="exitRoadCondition != null and exitRoadCondition != ''"> and exit_road_condition = #{exitRoadCondition}</if> |
| 69 | 76 | <if test="lightingFacility != null and lightingFacility != ''"> and lighting_facility = #{lightingFacility}</if> |
| 70 | 77 | <if test="videoSurveillanceFacility != null and videoSurveillanceFacility != ''"> and video_surveillance_facility = #{videoSurveillanceFacility}</if> |
| 71 | 78 | <if test="preparer != null and preparer != ''"> and preparer = #{preparer}</if> |
| 72 | 79 | <if test="handlingAdvice != null and handlingAdvice != ''"> and handling_advice = #{handlingAdvice}</if> |
| 80 | + <if test="absorbSource != null and absorbSource != ''"> and absorb_source = #{absorbSource}</if> | |
| 73 | 81 | <if test="electronicFence != null and electronicFence != ''"> and electronic_fence = #{electronicFence}</if> |
| 82 | + <if test="creditStatus != null and creditStatus != ''"> and credit_status = #{creditStatus}</if> | |
| 74 | 83 | <if test="approvalDocument != null and approvalDocument != ''"> and approval_document = #{approvalDocument}</if> |
| 75 | 84 | <if test="approvalData != null and approvalData != ''"> and approval_data = #{approvalData}</if> |
| 76 | 85 | <if test="scenePhoto != null and scenePhoto != ''"> and scene_photo = #{scenePhoto}</if> |
| 77 | 86 | <if test="carWashingFacilitiesImage != null and carWashingFacilitiesImage != ''"> and car_washing_facilities_image = #{carWashingFacilitiesImage}</if> |
| 87 | + <if test="termRange != null and termRange != ''"> and term_range = #{termRange}</if> | |
| 78 | 88 | <if test="safetyAssessmentReport != null and safetyAssessmentReport != ''"> and safety_assessment_report = #{safetyAssessmentReport}</if> |
| 79 | 89 | <if test="environmentalApproval != null and environmentalApproval != ''"> and environmental_approval = #{environmentalApproval}</if> |
| 80 | 90 | <if test="authorization != null and authorization != ''"> and authorization = #{authorization}</if> |
| 81 | 91 | <if test="otherInformation != null and otherInformation != ''"> and other_information = #{otherInformation}</if> |
| 82 | 92 | <if test="companyIds != null and companyIds != ''"> and company_ids = #{companyIds}</if> |
| 83 | 93 | <if test="status != null "> and status = #{status}</if> |
| 94 | + <if test="qrCode != null and qrCode != ''"> and qr_code = #{qrCode}</if> | |
| 95 | + <if test="auditStatus != null "> and audit_status = #{auditStatus}</if> | |
| 84 | 96 | </where> |
| 85 | 97 | </select> |
| 86 | 98 | |
| ... | ... | @@ -106,17 +118,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 106 | 118 | <if test="validityBeginDate != null">validity_begin_date,</if> |
| 107 | 119 | <if test="validityEndDate != null">validity_end_date,</if> |
| 108 | 120 | <if test="squareMeasure != null">square_measure,</if> |
| 121 | + <if test="surplusSquareMeasure != null">surplus_square_measure,</if> | |
| 109 | 122 | <if test="carWashingFacilities != null">car_washing_facilities,</if> |
| 110 | 123 | <if test="exitRoadCondition != null">exit_road_condition,</if> |
| 111 | 124 | <if test="lightingFacility != null">lighting_facility,</if> |
| 112 | 125 | <if test="videoSurveillanceFacility != null">video_surveillance_facility,</if> |
| 113 | 126 | <if test="preparer != null">preparer,</if> |
| 114 | 127 | <if test="handlingAdvice != null">handling_advice,</if> |
| 128 | + <if test="absorbSource != null">absorb_source,</if> | |
| 115 | 129 | <if test="electronicFence != null">electronic_fence,</if> |
| 130 | + <if test="creditStatus != null">credit_status,</if> | |
| 116 | 131 | <if test="approvalDocument != null">approval_document,</if> |
| 117 | 132 | <if test="approvalData != null">approval_data,</if> |
| 118 | 133 | <if test="scenePhoto != null">scene_photo,</if> |
| 119 | 134 | <if test="carWashingFacilitiesImage != null">car_washing_facilities_image,</if> |
| 135 | + <if test="termRange != null">term_range,</if> | |
| 120 | 136 | <if test="safetyAssessmentReport != null">safety_assessment_report,</if> |
| 121 | 137 | <if test="environmentalApproval != null">environmental_approval,</if> |
| 122 | 138 | <if test="authorization != null">authorization,</if> |
| ... | ... | @@ -127,6 +143,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 127 | 143 | <if test="createBy != null">create_by,</if> |
| 128 | 144 | <if test="updateTime != null">update_time,</if> |
| 129 | 145 | <if test="updateBy != null">update_by,</if> |
| 146 | + <if test="qrCode != null">qr_code,</if> | |
| 147 | + <if test="auditStatus != null">audit_status,</if> | |
| 130 | 148 | </trim> |
| 131 | 149 | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| 132 | 150 | <if test="name != null">#{name},</if> |
| ... | ... | @@ -143,17 +161,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 143 | 161 | <if test="validityBeginDate != null">#{validityBeginDate},</if> |
| 144 | 162 | <if test="validityEndDate != null">#{validityEndDate},</if> |
| 145 | 163 | <if test="squareMeasure != null">#{squareMeasure},</if> |
| 164 | + <if test="surplusSquareMeasure != null">#{surplusSquareMeasure},</if> | |
| 146 | 165 | <if test="carWashingFacilities != null">#{carWashingFacilities},</if> |
| 147 | 166 | <if test="exitRoadCondition != null">#{exitRoadCondition},</if> |
| 148 | 167 | <if test="lightingFacility != null">#{lightingFacility},</if> |
| 149 | 168 | <if test="videoSurveillanceFacility != null">#{videoSurveillanceFacility},</if> |
| 150 | 169 | <if test="preparer != null">#{preparer},</if> |
| 151 | 170 | <if test="handlingAdvice != null">#{handlingAdvice},</if> |
| 171 | + <if test="absorbSource != null">#{absorbSource},</if> | |
| 152 | 172 | <if test="electronicFence != null">#{electronicFence},</if> |
| 173 | + <if test="creditStatus != null">#{creditStatus},</if> | |
| 153 | 174 | <if test="approvalDocument != null">#{approvalDocument},</if> |
| 154 | 175 | <if test="approvalData != null">#{approvalData},</if> |
| 155 | 176 | <if test="scenePhoto != null">#{scenePhoto},</if> |
| 156 | 177 | <if test="carWashingFacilitiesImage != null">#{carWashingFacilitiesImage},</if> |
| 178 | + <if test="termRange != null">#{termRange},</if> | |
| 157 | 179 | <if test="safetyAssessmentReport != null">#{safetyAssessmentReport},</if> |
| 158 | 180 | <if test="environmentalApproval != null">#{environmentalApproval},</if> |
| 159 | 181 | <if test="authorization != null">#{authorization},</if> |
| ... | ... | @@ -164,6 +186,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 164 | 186 | <if test="createBy != null">#{createBy},</if> |
| 165 | 187 | <if test="updateTime != null">#{updateTime},</if> |
| 166 | 188 | <if test="updateBy != null">#{updateBy},</if> |
| 189 | + <if test="qrCode != null">#{qrCode},</if> | |
| 190 | + <if test="auditStatus != null">#{auditStatus},</if> | |
| 167 | 191 | </trim> |
| 168 | 192 | </insert> |
| 169 | 193 | |
| ... | ... | @@ -184,17 +208,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 184 | 208 | <if test="validityBeginDate != null">validity_begin_date = #{validityBeginDate},</if> |
| 185 | 209 | <if test="validityEndDate != null">validity_end_date = #{validityEndDate},</if> |
| 186 | 210 | <if test="squareMeasure != null">square_measure = #{squareMeasure},</if> |
| 211 | + <if test="surplusSquareMeasure != null">surplus_square_measure = #{surplusSquareMeasure},</if> | |
| 187 | 212 | <if test="carWashingFacilities != null">car_washing_facilities = #{carWashingFacilities},</if> |
| 188 | 213 | <if test="exitRoadCondition != null">exit_road_condition = #{exitRoadCondition},</if> |
| 189 | 214 | <if test="lightingFacility != null">lighting_facility = #{lightingFacility},</if> |
| 190 | 215 | <if test="videoSurveillanceFacility != null">video_surveillance_facility = #{videoSurveillanceFacility},</if> |
| 191 | 216 | <if test="preparer != null">preparer = #{preparer},</if> |
| 192 | 217 | <if test="handlingAdvice != null">handling_advice = #{handlingAdvice},</if> |
| 218 | + <if test="absorbSource != null">absorb_source = #{absorbSource},</if> | |
| 193 | 219 | <if test="electronicFence != null">electronic_fence = #{electronicFence},</if> |
| 220 | + <if test="creditStatus != null">credit_status = #{creditStatus},</if> | |
| 194 | 221 | <if test="approvalDocument != null">approval_document = #{approvalDocument},</if> |
| 195 | 222 | <if test="approvalData != null">approval_data = #{approvalData},</if> |
| 196 | 223 | <if test="scenePhoto != null">scene_photo = #{scenePhoto},</if> |
| 197 | 224 | <if test="carWashingFacilitiesImage != null">car_washing_facilities_image = #{carWashingFacilitiesImage},</if> |
| 225 | + <if test="termRange != null">term_range = #{termRange},</if> | |
| 198 | 226 | <if test="safetyAssessmentReport != null">safety_assessment_report = #{safetyAssessmentReport},</if> |
| 199 | 227 | <if test="environmentalApproval != null">environmental_approval = #{environmentalApproval},</if> |
| 200 | 228 | <if test="authorization != null">authorization = #{authorization},</if> |
| ... | ... | @@ -205,6 +233,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 205 | 233 | <if test="createBy != null">create_by = #{createBy},</if> |
| 206 | 234 | <if test="updateTime != null">update_time = #{updateTime},</if> |
| 207 | 235 | <if test="updateBy != null">update_by = #{updateBy},</if> |
| 236 | + <if test="qrCode != null">qr_code = #{qrCode},</if> | |
| 237 | + <if test="auditStatus != null">audit_status = #{auditStatus},</if> | |
| 208 | 238 | </trim> |
| 209 | 239 | where id = #{id} |
| 210 | 240 | </update> | ... | ... |
trash-unit/src/main/resources/mapper/unit/DriverMapper.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8" ?> | |
| 2 | +<!DOCTYPE mapper | |
| 3 | +PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |
| 4 | +"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
| 5 | +<mapper namespace="com.trash.driver.mapper.DriverMapper"> | |
| 6 | + | |
| 7 | + <resultMap type="Driver" id="DriverResult"> | |
| 8 | + <result property="id" column="id"/> | |
| 9 | + <result property="name" column="name"/> | |
| 10 | + <result property="identityCard" column="identity_card"/> | |
| 11 | + <result property="companyId" column="company_id"/> | |
| 12 | + <result property="professionalQualificationBeginDate" column="professional_qualification_begin_date"/> | |
| 13 | + <result property="professionalQualificationEndDate" column="professional_qualification_end_date"/> | |
| 14 | + <result property="drivingLicenceBeginDate" column="driving_licence_begin_date"/> | |
| 15 | + <result property="drivingLicenceEndDate" column="driving_licence_end_date"/> | |
| 16 | + <result property="safetyTrainingDate" column="safety_training_date"/> | |
| 17 | + <result property="safetyTrainingContent" column="safety_training_content"/> | |
| 18 | + <result property="remark" column="remark"/> | |
| 19 | + <result property="drivingLicence" column="driving_licence"/> | |
| 20 | + <result property="professionalQualification" column="professional_qualification"/> | |
| 21 | + <result property="safetyTraining" column="safety_training"/> | |
| 22 | + <result property="status" column="status"/> | |
| 23 | + <result property="createTime" column="create_time"/> | |
| 24 | + <result property="createBy" column="create_by"/> | |
| 25 | + <result property="updateTime" column="update_time"/> | |
| 26 | + <result property="updateBy" column="update_by"/> | |
| 27 | + <result property="photographOne" column="photograph_one"/> | |
| 28 | + <result property="photographTwo" column="photograph_two"/> | |
| 29 | + </resultMap> | |
| 30 | + <resultMap type="DriverVo" id="DriverVoResult"> | |
| 31 | + <result property="id" column="id"/> | |
| 32 | + <result property="name" column="name"/> | |
| 33 | + <result property="identityCard" column="identity_card"/> | |
| 34 | + <result property="companyId" column="company_id"/> | |
| 35 | + <result property="professionalQualificationBeginDate" column="professional_qualification_begin_date"/> | |
| 36 | + <result property="professionalQualificationEndDate" column="professional_qualification_end_date"/> | |
| 37 | + <result property="drivingLicenceBeginDate" column="driving_licence_begin_date"/> | |
| 38 | + <result property="drivingLicenceEndDate" column="driving_licence_end_date"/> | |
| 39 | + <result property="safetyTrainingDate" column="safety_training_date"/> | |
| 40 | + <result property="safetyTrainingContent" column="safety_training_content"/> | |
| 41 | + <result property="remark" column="remark"/> | |
| 42 | + <result property="drivingLicence" column="driving_licence"/> | |
| 43 | + <result property="professionalQualification" column="professional_qualification"/> | |
| 44 | + <result property="safetyTraining" column="safety_training"/> | |
| 45 | + <result property="status" column="status"/> | |
| 46 | + <result property="createTime" column="create_time"/> | |
| 47 | + <result property="createBy" column="create_by"/> | |
| 48 | + <result property="updateTime" column="update_time"/> | |
| 49 | + <result property="updateBy" column="update_by"/> | |
| 50 | + <result property="photographOne" column="photograph_one"/> | |
| 51 | + <result property="photographTwo" column="photograph_two"/> | |
| 52 | + <result property="companyName" column="companyName"/> | |
| 53 | + </resultMap> | |
| 54 | + | |
| 55 | + <sql id="selectDriverVo"> | |
| 56 | + select id, name, identity_card, company_id, professional_qualification_begin_date, professional_qualification_end_date, driving_licence_begin_date, driving_licence_end_date, safety_training_date, safety_training_content, remark, driving_licence, professional_qualification, safety_training, status, create_time, create_by, update_time, update_by, photograph_one, photograph_two from driver | |
| 57 | + </sql> | |
| 58 | + | |
| 59 | + <sql id="selectDriverCompanyVo"> | |
| 60 | + select d.id, d.name,c.name companyName, identity_card, company_id, professional_qualification_begin_date, professional_qualification_end_date, driving_licence_begin_date, driving_licence_end_date, safety_training_date, safety_training_content, d.remark, driving_licence, professional_qualification, safety_training, d.status, d.create_time, d.create_by, d.update_time, d.update_by, photograph_one, photograph_two from driver d | |
| 61 | + left join transportation_enterprise c on d.company_id = c.id | |
| 62 | + </sql> | |
| 63 | + | |
| 64 | + <select id="selectDriverList" parameterType="DriverVo" resultMap="DriverVoResult"> | |
| 65 | + <include refid="selectDriverCompanyVo"/> | |
| 66 | + <where> | |
| 67 | + <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if> | |
| 68 | + <if test="companyName != null and companyName != ''"> and c.name like concat('%', #{companyName}, '%')</if> | |
| 69 | + <if test="identityCard != null and identityCard != ''"> and identity_card = #{identityCard}</if> | |
| 70 | + <if test="companyId != null "> and company_id = #{companyId}</if> | |
| 71 | + <if test="professionalQualificationBeginDate != null "> and professional_qualification_begin_date = #{professionalQualificationBeginDate}</if> | |
| 72 | + <if test="professionalQualificationEndDate != null "> and professional_qualification_end_date = #{professionalQualificationEndDate}</if> | |
| 73 | + <if test="drivingLicenceBeginDate != null "> and driving_licence_begin_date = #{drivingLicenceBeginDate}</if> | |
| 74 | + <if test="drivingLicenceEndDate != null "> and driving_licence_end_date = #{drivingLicenceEndDate}</if> | |
| 75 | + <if test="safetyTrainingDate != null "> and safety_training_date = #{safetyTrainingDate}</if> | |
| 76 | + <if test="safetyTrainingContent != null and safetyTrainingContent != ''"> and safety_training_content = #{safetyTrainingContent}</if> | |
| 77 | + <if test="drivingLicence != null and drivingLicence != ''"> and driving_licence = #{drivingLicence}</if> | |
| 78 | + <if test="professionalQualification != null and professionalQualification != ''"> and professional_qualification = #{professionalQualification}</if> | |
| 79 | + <if test="safetyTraining != null and safetyTraining != ''"> and safety_training = #{safetyTraining}</if> | |
| 80 | + <if test="status != null "> and status = #{status}</if> | |
| 81 | + <if test="photographOne != null and photographOne != ''"> and photograph_one = #{photographOne}</if> | |
| 82 | + <if test="photographTwo != null and photographTwo != ''"> and photograph_two = #{photographTwo}</if> | |
| 83 | + </where> | |
| 84 | + </select> | |
| 85 | + | |
| 86 | + <select id="selectDriverListByCompanyId" parameterType="String" resultType="map"> | |
| 87 | + select id,name as label from driver where company_id = #{companyId} | |
| 88 | + </select> | |
| 89 | + | |
| 90 | + <select id="selectDriverById" parameterType="Long" resultMap="DriverResult"> | |
| 91 | + <include refid="selectDriverVo"/> | |
| 92 | + where id = #{id} | |
| 93 | + </select> | |
| 94 | + | |
| 95 | + <insert id="insertDriver" parameterType="Driver" useGeneratedKeys="true" keyProperty="id"> | |
| 96 | + insert into driver | |
| 97 | + <trim prefix="(" suffix=")" suffixOverrides=","> | |
| 98 | + <if test="name != null">name,</if> | |
| 99 | + <if test="identityCard != null">identity_card,</if> | |
| 100 | + <if test="companyId != null">company_id,</if> | |
| 101 | + <if test="professionalQualificationBeginDate != null">professional_qualification_begin_date,</if> | |
| 102 | + <if test="professionalQualificationEndDate != null">professional_qualification_end_date,</if> | |
| 103 | + <if test="drivingLicenceBeginDate != null">driving_licence_begin_date,</if> | |
| 104 | + <if test="drivingLicenceEndDate != null">driving_licence_end_date,</if> | |
| 105 | + <if test="safetyTrainingDate != null">safety_training_date,</if> | |
| 106 | + <if test="safetyTrainingContent != null">safety_training_content,</if> | |
| 107 | + <if test="remark != null">remark,</if> | |
| 108 | + <if test="drivingLicence != null">driving_licence,</if> | |
| 109 | + <if test="professionalQualification != null">professional_qualification,</if> | |
| 110 | + <if test="safetyTraining != null">safety_training,</if> | |
| 111 | + <if test="status != null">status,</if> | |
| 112 | + <if test="createTime != null">create_time,</if> | |
| 113 | + <if test="createBy != null">create_by,</if> | |
| 114 | + <if test="updateTime != null">update_time,</if> | |
| 115 | + <if test="updateBy != null">update_by,</if> | |
| 116 | + <if test="photographOne != null">photograph_one,</if> | |
| 117 | + <if test="photographTwo != null">photograph_two,</if> | |
| 118 | + </trim> | |
| 119 | + <trim prefix="values (" suffix=")" suffixOverrides=","> | |
| 120 | + <if test="name != null">#{name},</if> | |
| 121 | + <if test="identityCard != null">#{identityCard},</if> | |
| 122 | + <if test="companyId != null">#{companyId},</if> | |
| 123 | + <if test="professionalQualificationBeginDate != null">#{professionalQualificationBeginDate},</if> | |
| 124 | + <if test="professionalQualificationEndDate != null">#{professionalQualificationEndDate},</if> | |
| 125 | + <if test="drivingLicenceBeginDate != null">#{drivingLicenceBeginDate},</if> | |
| 126 | + <if test="drivingLicenceEndDate != null">#{drivingLicenceEndDate},</if> | |
| 127 | + <if test="safetyTrainingDate != null">#{safetyTrainingDate},</if> | |
| 128 | + <if test="safetyTrainingContent != null">#{safetyTrainingContent},</if> | |
| 129 | + <if test="remark != null">#{remark},</if> | |
| 130 | + <if test="drivingLicence != null">#{drivingLicence},</if> | |
| 131 | + <if test="professionalQualification != null">#{professionalQualification},</if> | |
| 132 | + <if test="safetyTraining != null">#{safetyTraining},</if> | |
| 133 | + <if test="status != null">#{status},</if> | |
| 134 | + <if test="createTime != null">#{createTime},</if> | |
| 135 | + <if test="createBy != null">#{createBy},</if> | |
| 136 | + <if test="updateTime != null">#{updateTime},</if> | |
| 137 | + <if test="updateBy != null">#{updateBy},</if> | |
| 138 | + <if test="photographOne != null">#{photographOne},</if> | |
| 139 | + <if test="photographTwo != null">#{photographTwo},</if> | |
| 140 | + </trim> | |
| 141 | + </insert> | |
| 142 | + | |
| 143 | + <update id="updateDriver" parameterType="Driver"> | |
| 144 | + update driver | |
| 145 | + <trim prefix="SET" suffixOverrides=","> | |
| 146 | + <if test="name != null">name = #{name},</if> | |
| 147 | + <if test="identityCard != null">identity_card = #{identityCard},</if> | |
| 148 | + <if test="companyId != null">company_id = #{companyId},</if> | |
| 149 | + <if test="professionalQualificationBeginDate != null">professional_qualification_begin_date = #{professionalQualificationBeginDate},</if> | |
| 150 | + <if test="professionalQualificationEndDate != null">professional_qualification_end_date = #{professionalQualificationEndDate},</if> | |
| 151 | + <if test="drivingLicenceBeginDate != null">driving_licence_begin_date = #{drivingLicenceBeginDate},</if> | |
| 152 | + <if test="drivingLicenceEndDate != null">driving_licence_end_date = #{drivingLicenceEndDate},</if> | |
| 153 | + <if test="safetyTrainingDate != null">safety_training_date = #{safetyTrainingDate},</if> | |
| 154 | + <if test="safetyTrainingContent != null">safety_training_content = #{safetyTrainingContent},</if> | |
| 155 | + <if test="remark != null">remark = #{remark},</if> | |
| 156 | + <if test="drivingLicence != null">driving_licence = #{drivingLicence},</if> | |
| 157 | + <if test="professionalQualification != null">professional_qualification = #{professionalQualification},</if> | |
| 158 | + <if test="safetyTraining != null">safety_training = #{safetyTraining},</if> | |
| 159 | + <if test="status != null">status = #{status},</if> | |
| 160 | + <if test="createTime != null">create_time = #{createTime},</if> | |
| 161 | + <if test="createBy != null">create_by = #{createBy},</if> | |
| 162 | + <if test="updateTime != null">update_time = #{updateTime},</if> | |
| 163 | + <if test="updateBy != null">update_by = #{updateBy},</if> | |
| 164 | + <if test="photographOne != null">photograph_one = #{photographOne},</if> | |
| 165 | + <if test="photographTwo != null">photograph_two = #{photographTwo},</if> | |
| 166 | + </trim> | |
| 167 | + where id = #{id} | |
| 168 | + </update> | |
| 169 | + | |
| 170 | + <delete id="deleteDriverById" parameterType="Long"> | |
| 171 | + delete | |
| 172 | + from driver | |
| 173 | + where id = #{id} | |
| 174 | + </delete> | |
| 175 | + | |
| 176 | + <delete id="deleteDriverByIds" parameterType="String"> | |
| 177 | + delete from driver where id in | |
| 178 | + <foreach item="id" collection="array" open="(" separator="," close=")"> #{id} </foreach> | |
| 179 | + </delete> | |
| 180 | +</mapper> | |
| 0 | 181 | \ No newline at end of file | ... | ... |
trash-unit/src/main/resources/mapper/enterprise/TransportationEnterpriseMapper.xml renamed to trash-unit/src/main/resources/mapper/unit/TransportationEnterpriseMapper.xml
| ... | ... | @@ -36,10 +36,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 36 | 36 | <result property="updateBy" column="update_by" /> |
| 37 | 37 | <result property="parentId" column="parent_id" /> |
| 38 | 38 | <result property="companyType" column="company_type" /> |
| 39 | + <result property="creditStatus" column="credit_status" /> | |
| 40 | + <result property="qrCode" column="qr_code" /> | |
| 39 | 41 | </resultMap> |
| 40 | 42 | |
| 41 | 43 | <sql id="selectTransportationEnterpriseVo"> |
| 42 | - select id, name, abbreviation, registration_area, transport_permission_date, enter_date, business_license_date, office_address, parking_lot_location, parking_area, car_number, safety_manager_name, safety_manager_phone, social_uniform_credit_code_number, legal_representative, legal_representative_phone, safety_people_name, remark, transport_permission, enterprise_business_license, safety_officer_qualification_certificate, safety_certificate, car_park_panorama, business_unit, status, create_time, create_by, update_time, update_by, parent_id, company_type from transportation_enterprise | |
| 44 | + select id, name, abbreviation, registration_area, transport_permission_date, enter_date, business_license_date, office_address, parking_lot_location, parking_area, (select count(id) from car_info where company_id = te.id) car_number, safety_manager_name, safety_manager_phone, social_uniform_credit_code_number, legal_representative, legal_representative_phone, safety_people_name, remark, transport_permission, enterprise_business_license, safety_officer_qualification_certificate, safety_certificate, car_park_panorama, business_unit, status, create_time, create_by, update_time, update_by, parent_id, company_type, credit_status, qr_code from transportation_enterprise te | |
| 43 | 45 | </sql> |
| 44 | 46 | |
| 45 | 47 | <select id="selectTransportationEnterpriseList" parameterType="TransportationEnterprise" resultMap="TransportationEnterpriseResult"> |
| ... | ... | @@ -70,6 +72,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 70 | 72 | <if test="status != null "> and status = #{status}</if> |
| 71 | 73 | <if test="parentId != null "> and parent_id = #{parentId}</if> |
| 72 | 74 | <if test="companyType != null "> and company_type = #{companyType}</if> |
| 75 | + <if test="creditStatus != null and creditStatus != ''"> and credit_status = #{creditStatus}</if> | |
| 76 | + <if test="qrCode != null and qrCode != ''"> and qr_code = #{qrCode}</if> | |
| 73 | 77 | </where> |
| 74 | 78 | </select> |
| 75 | 79 | |
| ... | ... | @@ -111,6 +115,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 111 | 115 | <if test="updateBy != null">update_by,</if> |
| 112 | 116 | <if test="parentId != null">parent_id,</if> |
| 113 | 117 | <if test="companyType != null">company_type,</if> |
| 118 | + <if test="creditStatus != null">credit_status,</if> | |
| 119 | + <if test="qrCode != null">qr_code,</if> | |
| 114 | 120 | </trim> |
| 115 | 121 | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| 116 | 122 | <if test="name != null">#{name},</if> |
| ... | ... | @@ -143,6 +149,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 143 | 149 | <if test="updateBy != null">#{updateBy},</if> |
| 144 | 150 | <if test="parentId != null">#{parentId},</if> |
| 145 | 151 | <if test="companyType != null">#{companyType},</if> |
| 152 | + <if test="creditStatus != null">#{creditStatus},</if> | |
| 153 | + <if test="qrCode != null">#{qrCode},</if> | |
| 146 | 154 | </trim> |
| 147 | 155 | </insert> |
| 148 | 156 | |
| ... | ... | @@ -179,6 +187,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 179 | 187 | <if test="updateBy != null">update_by = #{updateBy},</if> |
| 180 | 188 | <if test="parentId != null">parent_id = #{parentId},</if> |
| 181 | 189 | <if test="companyType != null">company_type = #{companyType},</if> |
| 190 | + <if test="creditStatus != null">credit_status = #{creditStatus},</if> | |
| 191 | + <if test="qrCode != null">qr_code = #{qrCode},</if> | |
| 182 | 192 | </trim> |
| 183 | 193 | where id = #{id} |
| 184 | 194 | </update> | ... | ... |
trash-workFlow/src/main/java/com/trash/casefile/kafka/Consumer.java
| ... | ... | @@ -40,7 +40,7 @@ public class Consumer { |
| 40 | 40 | @Autowired |
| 41 | 41 | private IViolationWarningInformationService violationWarningInformationService; |
| 42 | 42 | |
| 43 | - @KafkaListener(topics = "record_process_alarm") | |
| 43 | +// @KafkaListener(topics = "record_process_alarm") | |
| 44 | 44 | public void consume(ConsumerRecord<?, ?> record, Acknowledgment ack) throws InterruptedException, IOException { |
| 45 | 45 | log.info("kafka消费数据成功,offset:"+ record.offset() +",data:" + record.value()); |
| 46 | 46 | String id = insertKafkaCompensation(record.value().toString()); | ... | ... |