diff --git a/src/views/modules/shequzhili/tuceng/anquan/anquanxuncha/addForm.vue b/src/views/modules/shequzhili/tuceng/anquan/anquanxuncha/addForm.vue index 017b881eb..25638f0c0 100644 --- a/src/views/modules/shequzhili/tuceng/anquan/anquanxuncha/addForm.vue +++ b/src/views/modules/shequzhili/tuceng/anquan/anquanxuncha/addForm.vue @@ -10,36 +10,31 @@ - - - - - - - - - - - - - - - - + > + + + + + + + + + + @@ -79,18 +74,16 @@ {{ formData.placeOrgName }} {{ formData.areaCovered }} - {{ formData.placeCategoryName }} - {{ formData.placeTypeName }} - {{ formData.latestResultName }} {{ formData.scaleTotal }} {{ formData.gridName }} + {{ formData.placeCategoryName }} + {{ formData.placeTypeName }} {{ formData.personInCharge }} {{ formData.areaCovered }} {{ formData.address }} -
@@ -99,7 +92,7 @@
关闭 - 重置 + 确 定
@@ -179,6 +172,7 @@ export default { placeOrgName: '', scaleTotal: '', gridId: '', + latestResult: '', placeCategory: '', placeType: '', personInCharge: '', @@ -210,7 +204,7 @@ export default { components: { record }, created() {}, async mounted() { - console.log('detailId', this.detailId); + this.user = this.$store.state.user; this.agencyId = this.user.agencyId; this.startLoading(); @@ -257,23 +251,14 @@ export default { const url = `/actual/base/enterprise/detail/${this.detailId}`; const { data, code, msg } = await requestPost(url); if (code === 0) { - console.log('详情数据', data); + this.formData = { ...data }; this.initMap(); } else { this.$message.error(msg); } }, - async getList() { - const url = `/actual/base/enterprise/patrollist/${this.detailId}`; - let params = {}; - const { data, code, msg } = await requestPost(url, params); - if (code === 0) { - this.list = data; - } else { - this.$message.error(msg); - } - }, + handleComfirm() { this.save(); }, @@ -304,8 +289,8 @@ export default { }, async save() { - console.log('this.formData', this.formData); - this.formData.agencyId=this.agencyId; + + this.formData.agencyId = this.agencyId; var url = ''; var params = {}; url = '/actual/base/enterprise/addOrUpdate'; @@ -313,7 +298,7 @@ export default { const { data, code, msg } = await requestPost(url, params); if (code === 0) { this.$message.success('操作成功'); - this.resetData(); + this.handleCancle(); // // this.resetData(); // this.$emit('handleComfirm'); @@ -322,7 +307,7 @@ export default { } }, handleCancle() { - this.resetData(); + // this.resetData(); this.$emit('handleClose'); }, resetData() { @@ -356,22 +341,22 @@ export default { } this.$nextTick(() => { - if (!map) { - map = new daiMap( - document.getElementById('app_event'), - { latitude, longitude }, - { - zoom: 16.2, // 设置地图缩放级别 - pitch: 43.5, // 设置俯仰角 - rotation: 45 // 设置地图旋转角度 - } - ); - // 监听地图平移结束 - map.on('dragend', e => { - this.handleMoveCenter(e); - }); - } else { - map.setCenter(latitude, longitude); + map = new daiMap( + document.getElementById('app_event'), + { latitude, longitude }, + { + zoom: 16.2, // 设置地图缩放级别 + pitch: 43.5, // 设置俯仰角 + rotation: 45 // 设置地图旋转角度 + } + ); + // 监听地图平移结束 + map.on('dragend', e => { + this.handleMoveCenter(e); + }); + + map.setCenter(latitude, longitude); + if (this.formData.latitude) { map.setMarker(latitude, longitude); } }); @@ -401,7 +386,7 @@ export default { if (data.resultList && data.resultList.length > 0) { this.resultList = data.resultList; this.searchOptions = this.resultList.map(item => { - return { value: `${item.hotPointID}`, label: `${item.address + item.name}` }; + return { value: `${item.id}`, label: `${item.address + item.name}` }; }); } } else { diff --git a/src/views/modules/shequzhili/tuceng/anquan/anquanxuncha/index.vue b/src/views/modules/shequzhili/tuceng/anquan/anquanxuncha/index.vue index 52bb91b7d..b546f7603 100644 --- a/src/views/modules/shequzhili/tuceng/anquan/anquanxuncha/index.vue +++ b/src/views/modules/shequzhili/tuceng/anquan/anquanxuncha/index.vue @@ -91,11 +91,13 @@ -- - + diff --git a/src/views/modules/shequzhili/tuceng/anquan/anquanxuncha/record.vue b/src/views/modules/shequzhili/tuceng/anquan/anquanxuncha/record.vue index f9bc6dca6..a8c81b530 100644 --- a/src/views/modules/shequzhili/tuceng/anquan/anquanxuncha/record.vue +++ b/src/views/modules/shequzhili/tuceng/anquan/anquanxuncha/record.vue @@ -8,25 +8,25 @@
- + - + - + - + @@ -84,7 +76,7 @@ --> - + @@ -185,16 +196,14 @@ export default { equipmentCategoryCodeArray: [{ value: '0', label: '九小场所' }, { value: '1', label: '企事业单位' }], list: {}, formData: { - equipmentName: '', - scaleTotal: '', + reportTime: '', + dangerPlaceName: '', gridId: '', - equipmentCategoryCode: '', - placeType: '', - principalName: '', - location: '', - contactNum: '', - // result: '', - remark: '' + dangerContent: '', + imgList: [], + reportPerson: '', + mobile: '', + location: '' }, dataRule: { reportTime: [{ required: true, message: '上报时间不能为空', trigger: 'bulr' }], @@ -209,7 +218,9 @@ export default { //地图 loading: false, searchValue: '', - searchOptions: [] + searchOptions: [], + resultList: [], + uploadUrl: window.SITE_CONFIG['apiURL'] + '/oss/file/uploadqrcodeV2' }; }, watch: {}, @@ -300,7 +311,7 @@ export default { const { data, code, msg } = await requestPost(url, params); if (code === 0) { this.$message.success('操作成功'); - + this.handleCancle(); // // this.resetData(); } else if (code >= 8000) { @@ -328,7 +339,8 @@ export default { if (loading) { loading.close(); } - }, // 地图初始化函数,本例取名为init,开发者可根据实际情况定义 + }, + // 地图初始化函数,本例取名为init,开发者可根据实际情况定义 initMap() { let { latitude, longitude } = this.$store.state.user; @@ -342,22 +354,22 @@ export default { } this.$nextTick(() => { - if (!map) { - map = new daiMap( - document.getElementById('app_event'), - { latitude, longitude }, - { - zoom: 16.2, // 设置地图缩放级别 - pitch: 43.5, // 设置俯仰角 - rotation: 45 // 设置地图旋转角度 - } - ); - // 监听地图平移结束 - map.on('dragend', e => { - this.handleMoveCenter(e); - }); - } else { - map.setCenter(latitude, longitude); + map = new daiMap( + document.getElementById('app_event'), + { latitude, longitude }, + { + zoom: 16.2, // 设置地图缩放级别 + pitch: 43.5, // 设置俯仰角 + rotation: 45 // 设置地图旋转角度 + } + ); + // 监听地图平移结束 + map.on('dragend', e => { + this.handleMoveCenter(e); + }); + + map.setCenter(latitude, longitude); + if (this.formData.latitude) { map.setMarker(latitude, longitude); } }); @@ -387,7 +399,7 @@ export default { if (data.resultList && data.resultList.length > 0) { this.resultList = data.resultList; this.searchOptions = this.resultList.map(item => { - return { value: `${item.hotPointID}`, label: `${item.address + item.name}` }; + return { value: `${item.id}`, label: `${item.address + item.name}` }; }); } } else { @@ -412,7 +424,6 @@ export default { this.formData.location = selPosition.address + selPosition.name; }, handleImgSuccess(res, row) { - console.log('handleImgSuccess', res); if (res.code === 0 && res.msg === 'success') { row.imgList.push(res.data.url); this.computeImgShowList(row); @@ -421,7 +432,6 @@ export default { } }, handleImgRemove(file, row) { - console.log('handleImgRemove', file); let url = file.url || file.response.data.url; if (url) { row.imgList = row.imgList.filter(item => item !== url); @@ -430,7 +440,6 @@ export default { }, beforeImgUpload(file) { - console.log(file); const isLt1M = file.size / 1024 / 1024 < 10; const srcType = file.type; const format = file.name.split('.').pop(); @@ -457,7 +466,7 @@ export default { // border:none;background-color: transparent; } .div_map { - width: 100%; + width: 500px; } .form-item::v-deep .el-form-item__label { color: #fff; diff --git a/src/views/modules/shequzhili/tuceng/anquan/yinhuan/index.vue b/src/views/modules/shequzhili/tuceng/anquan/yinhuan/index.vue index 1551ada59..b0d2c2f5b 100644 --- a/src/views/modules/shequzhili/tuceng/anquan/yinhuan/index.vue +++ b/src/views/modules/shequzhili/tuceng/anquan/yinhuan/index.vue @@ -77,11 +77,13 @@ - + @@ -148,7 +150,8 @@ export default { detailId: '', detailData: {}, multipleSelection: [], - rowObj: {} + rowObj: {}, + }; }, components: { addForm }, diff --git a/src/views/modules/shequzhili/tuceng/chengshiguanli/addForm.vue b/src/views/modules/shequzhili/tuceng/chengshiguanli/addForm.vue index be045cb9b..dc2d74214 100644 --- a/src/views/modules/shequzhili/tuceng/chengshiguanli/addForm.vue +++ b/src/views/modules/shequzhili/tuceng/chengshiguanli/addForm.vue @@ -65,7 +65,7 @@
关闭 - 重置 + 确 定
@@ -313,7 +313,7 @@ export default { }, // 地图初始化函数,本例取名为init,开发者可根据实际情况定义 initMap() { let { latitude, longitude } = this.$store.state.user; - + if (this.formData.latitude && this.formData.longitude) { latitude = this.formData.latitude; longitude = this.formData.longitude; @@ -322,24 +322,24 @@ export default { latitude = 39.9088810666821; longitude = 116.39743841556731; } - + this.$nextTick(() => { - if (!map) { - map = new daiMap( - document.getElementById('app_event'), - { latitude, longitude }, - { - zoom: 16.2, // 设置地图缩放级别 - pitch: 43.5, // 设置俯仰角 - rotation: 45 // 设置地图旋转角度 - } - ); - // 监听地图平移结束 - map.on('dragend', e => { - this.handleMoveCenter(e); - }); - } else { - map.setCenter(latitude, longitude); + map = new daiMap( + document.getElementById('app_event'), + { latitude, longitude }, + { + zoom: 16.2, // 设置地图缩放级别 + pitch: 43.5, // 设置俯仰角 + rotation: 45 // 设置地图旋转角度 + } + ); + // 监听地图平移结束 + map.on('dragend', e => { + this.handleMoveCenter(e); + }); + + map.setCenter(latitude, longitude); + if (this.formData.latitude) { map.setMarker(latitude, longitude); } }); diff --git a/src/views/modules/shequzhili/tuceng/chengshiguanli/index.vue b/src/views/modules/shequzhili/tuceng/chengshiguanli/index.vue index e1b23fff3..8d4537de6 100644 --- a/src/views/modules/shequzhili/tuceng/chengshiguanli/index.vue +++ b/src/views/modules/shequzhili/tuceng/chengshiguanli/index.vue @@ -79,11 +79,13 @@ --
- + diff --git a/src/views/modules/shequzhili/tuceng/gonggong/addForm.vue b/src/views/modules/shequzhili/tuceng/gonggong/addForm.vue index eb9e93ee6..5627ecd67 100644 --- a/src/views/modules/shequzhili/tuceng/gonggong/addForm.vue +++ b/src/views/modules/shequzhili/tuceng/gonggong/addForm.vue @@ -69,7 +69,7 @@
关闭 - 重置 + 确 定
@@ -296,7 +296,7 @@ export default { }, // 地图初始化函数,本例取名为init,开发者可根据实际情况定义 initMap() { let { latitude, longitude } = this.$store.state.user; - + if (this.formData.latitude && this.formData.longitude) { latitude = this.formData.latitude; longitude = this.formData.longitude; @@ -305,24 +305,24 @@ export default { latitude = 39.9088810666821; longitude = 116.39743841556731; } - + this.$nextTick(() => { - if (!map) { - map = new daiMap( - document.getElementById('app_event'), - { latitude, longitude }, - { - zoom: 16.2, // 设置地图缩放级别 - pitch: 43.5, // 设置俯仰角 - rotation: 45 // 设置地图旋转角度 - } - ); - // 监听地图平移结束 - map.on('dragend', e => { - this.handleMoveCenter(e); - }); - } else { - map.setCenter(latitude, longitude); + map = new daiMap( + document.getElementById('app_event'), + { latitude, longitude }, + { + zoom: 16.2, // 设置地图缩放级别 + pitch: 43.5, // 设置俯仰角 + rotation: 45 // 设置地图旋转角度 + } + ); + // 监听地图平移结束 + map.on('dragend', e => { + this.handleMoveCenter(e); + }); + + map.setCenter(latitude, longitude); + if (this.formData.latitude) { map.setMarker(latitude, longitude); } }); diff --git a/src/views/modules/shequzhili/tuceng/gonggong/index.vue b/src/views/modules/shequzhili/tuceng/gonggong/index.vue index 3f91146db..912b57455 100644 --- a/src/views/modules/shequzhili/tuceng/gonggong/index.vue +++ b/src/views/modules/shequzhili/tuceng/gonggong/index.vue @@ -68,11 +68,13 @@ --
- + diff --git a/src/views/modules/shequzhili/tuceng/gonggongfuwu/addForm.vue b/src/views/modules/shequzhili/tuceng/gonggongfuwu/addForm.vue index 56901ff7c..b93076cf0 100644 --- a/src/views/modules/shequzhili/tuceng/gonggongfuwu/addForm.vue +++ b/src/views/modules/shequzhili/tuceng/gonggongfuwu/addForm.vue @@ -70,7 +70,7 @@
关闭 - 重置 + 确 定
@@ -292,7 +292,7 @@ export default { }, // 地图初始化函数,本例取名为init,开发者可根据实际情况定义 initMap() { let { latitude, longitude } = this.$store.state.user; - + if (this.formData.latitude && this.formData.longitude) { latitude = this.formData.latitude; longitude = this.formData.longitude; @@ -301,24 +301,24 @@ export default { latitude = 39.9088810666821; longitude = 116.39743841556731; } - + this.$nextTick(() => { - if (!map) { - map = new daiMap( - document.getElementById('app_event'), - { latitude, longitude }, - { - zoom: 16.2, // 设置地图缩放级别 - pitch: 43.5, // 设置俯仰角 - rotation: 45 // 设置地图旋转角度 - } - ); - // 监听地图平移结束 - map.on('dragend', e => { - this.handleMoveCenter(e); - }); - } else { - map.setCenter(latitude, longitude); + map = new daiMap( + document.getElementById('app_event'), + { latitude, longitude }, + { + zoom: 16.2, // 设置地图缩放级别 + pitch: 43.5, // 设置俯仰角 + rotation: 45 // 设置地图旋转角度 + } + ); + // 监听地图平移结束 + map.on('dragend', e => { + this.handleMoveCenter(e); + }); + + map.setCenter(latitude, longitude); + if (this.formData.latitude) { map.setMarker(latitude, longitude); } }); @@ -349,7 +349,7 @@ export default { if (data.resultList && data.resultList.length > 0) { this.resultList = data.resultList; this.searchOptions = this.resultList.map(item => { - return { value: `${item.hotPointID}`, label: `${item.address + item.name}` }; + return { value: `${item.id}`, label: `${item.address + item.name}` }; }); } } else { diff --git a/src/views/modules/shequzhili/tuceng/gonggongfuwu/index.vue b/src/views/modules/shequzhili/tuceng/gonggongfuwu/index.vue index 179f7575a..f1f582155 100644 --- a/src/views/modules/shequzhili/tuceng/gonggongfuwu/index.vue +++ b/src/views/modules/shequzhili/tuceng/gonggongfuwu/index.vue @@ -68,13 +68,13 @@ --
- + diff --git a/src/views/modules/shequzhili/tuceng/yingji/changsuo/addForm.vue b/src/views/modules/shequzhili/tuceng/yingji/changsuo/addForm.vue index e54ad5e01..9c49cd07e 100644 --- a/src/views/modules/shequzhili/tuceng/yingji/changsuo/addForm.vue +++ b/src/views/modules/shequzhili/tuceng/yingji/changsuo/addForm.vue @@ -65,7 +65,7 @@
关闭 - 重置 + 确 定
@@ -286,7 +286,7 @@ export default { }, // 地图初始化函数,本例取名为init,开发者可根据实际情况定义 initMap() { let { latitude, longitude } = this.$store.state.user; - + if (this.formData.latitude && this.formData.longitude) { latitude = this.formData.latitude; longitude = this.formData.longitude; @@ -295,24 +295,24 @@ export default { latitude = 39.9088810666821; longitude = 116.39743841556731; } - + this.$nextTick(() => { - if (!map) { - map = new daiMap( - document.getElementById('app_event'), - { latitude, longitude }, - { - zoom: 16.2, // 设置地图缩放级别 - pitch: 43.5, // 设置俯仰角 - rotation: 45 // 设置地图旋转角度 - } - ); - // 监听地图平移结束 - map.on('dragend', e => { - this.handleMoveCenter(e); - }); - } else { - map.setCenter(latitude, longitude); + map = new daiMap( + document.getElementById('app_event'), + { latitude, longitude }, + { + zoom: 16.2, // 设置地图缩放级别 + pitch: 43.5, // 设置俯仰角 + rotation: 45 // 设置地图旋转角度 + } + ); + // 监听地图平移结束 + map.on('dragend', e => { + this.handleMoveCenter(e); + }); + + map.setCenter(latitude, longitude); + if (this.formData.latitude) { map.setMarker(latitude, longitude); } }); @@ -342,7 +342,7 @@ export default { if (data.resultList && data.resultList.length > 0) { this.resultList = data.resultList; this.searchOptions = this.resultList.map(item => { - return { value: `${item.hotPointID}`, label: `${item.address + item.name}` }; + return { value: `${item.id}`, label: `${item.address + item.name}` }; }); } } else { diff --git a/src/views/modules/shequzhili/tuceng/yingji/changsuo/index.vue b/src/views/modules/shequzhili/tuceng/yingji/changsuo/index.vue index daf7c0c15..c928ee11c 100644 --- a/src/views/modules/shequzhili/tuceng/yingji/changsuo/index.vue +++ b/src/views/modules/shequzhili/tuceng/yingji/changsuo/index.vue @@ -59,11 +59,13 @@ - + diff --git a/src/views/modules/shequzhili/tuceng/yingji/wuzi/addForm.vue b/src/views/modules/shequzhili/tuceng/yingji/wuzi/addForm.vue index 4ef05e105..2623056da 100644 --- a/src/views/modules/shequzhili/tuceng/yingji/wuzi/addForm.vue +++ b/src/views/modules/shequzhili/tuceng/yingji/wuzi/addForm.vue @@ -69,7 +69,7 @@
关闭 - 重置 + 确 定
@@ -310,7 +310,7 @@ export default { }, // 地图初始化函数,本例取名为init,开发者可根据实际情况定义 initMap() { let { latitude, longitude } = this.$store.state.user; - + if (this.formData.latitude && this.formData.longitude) { latitude = this.formData.latitude; longitude = this.formData.longitude; @@ -319,24 +319,24 @@ export default { latitude = 39.9088810666821; longitude = 116.39743841556731; } - + this.$nextTick(() => { - if (!map) { - map = new daiMap( - document.getElementById('app_event'), - { latitude, longitude }, - { - zoom: 16.2, // 设置地图缩放级别 - pitch: 43.5, // 设置俯仰角 - rotation: 45 // 设置地图旋转角度 - } - ); - // 监听地图平移结束 - map.on('dragend', e => { - this.handleMoveCenter(e); - }); - } else { - map.setCenter(latitude, longitude); + map = new daiMap( + document.getElementById('app_event'), + { latitude, longitude }, + { + zoom: 16.2, // 设置地图缩放级别 + pitch: 43.5, // 设置俯仰角 + rotation: 45 // 设置地图旋转角度 + } + ); + // 监听地图平移结束 + map.on('dragend', e => { + this.handleMoveCenter(e); + }); + + map.setCenter(latitude, longitude); + if (this.formData.latitude) { map.setMarker(latitude, longitude); } }); @@ -366,7 +366,7 @@ export default { if (data.resultList && data.resultList.length > 0) { this.resultList = data.resultList; this.searchOptions = this.resultList.map(item => { - return { value: `${item.hotPointID}`, label: `${item.address + item.name}` }; + return { value: `${item.id}`, label: `${item.address + item.name}` }; }); } } else { diff --git a/src/views/modules/shequzhili/tuceng/yingji/wuzi/index.vue b/src/views/modules/shequzhili/tuceng/yingji/wuzi/index.vue index 3ce92e052..70b8a5aaa 100644 --- a/src/views/modules/shequzhili/tuceng/yingji/wuzi/index.vue +++ b/src/views/modules/shequzhili/tuceng/yingji/wuzi/index.vue @@ -76,11 +76,13 @@ --
- + diff --git a/src/views/modules/shequzhili/tuceng/yingji/zizuzhi/addForm.vue b/src/views/modules/shequzhili/tuceng/yingji/zizuzhi/addForm.vue index e83eed2f2..45299ae6c 100644 --- a/src/views/modules/shequzhili/tuceng/yingji/zizuzhi/addForm.vue +++ b/src/views/modules/shequzhili/tuceng/yingji/zizuzhi/addForm.vue @@ -66,7 +66,7 @@
关闭 - 重置 + 确 定
@@ -293,7 +293,7 @@ export default { }, // 地图初始化函数,本例取名为init,开发者可根据实际情况定义 initMap() { let { latitude, longitude } = this.$store.state.user; - + if (this.formData.latitude && this.formData.longitude) { latitude = this.formData.latitude; longitude = this.formData.longitude; @@ -302,24 +302,24 @@ export default { latitude = 39.9088810666821; longitude = 116.39743841556731; } - + this.$nextTick(() => { - if (!map) { - map = new daiMap( - document.getElementById('app_event'), - { latitude, longitude }, - { - zoom: 16.2, // 设置地图缩放级别 - pitch: 43.5, // 设置俯仰角 - rotation: 45 // 设置地图旋转角度 - } - ); - // 监听地图平移结束 - map.on('dragend', e => { - this.handleMoveCenter(e); - }); - } else { - map.setCenter(latitude, longitude); + map = new daiMap( + document.getElementById('app_event'), + { latitude, longitude }, + { + zoom: 16.2, // 设置地图缩放级别 + pitch: 43.5, // 设置俯仰角 + rotation: 45 // 设置地图旋转角度 + } + ); + // 监听地图平移结束 + map.on('dragend', e => { + this.handleMoveCenter(e); + }); + + map.setCenter(latitude, longitude); + if (this.formData.latitude) { map.setMarker(latitude, longitude); } }); @@ -349,7 +349,7 @@ export default { if (data.resultList && data.resultList.length > 0) { this.resultList = data.resultList; this.searchOptions = this.resultList.map(item => { - return { value: `${item.hotPointID}`, label: `${item.address + item.name}` }; + return { value: `${item.id}`, label: `${item.address + item.name}` }; }); } } else { diff --git a/src/views/modules/shequzhili/tuceng/yingji/zizuzhi/index.vue b/src/views/modules/shequzhili/tuceng/yingji/zizuzhi/index.vue index 1acff51b7..5676cdec1 100644 --- a/src/views/modules/shequzhili/tuceng/yingji/zizuzhi/index.vue +++ b/src/views/modules/shequzhili/tuceng/yingji/zizuzhi/index.vue @@ -69,11 +69,29 @@ --
- +