杜函宇 2 years ago
commit c2a2a8d761

@ -40,4 +40,19 @@ export function zhuanxiangInfo(id) {
url: "/zongzhi/zhuanxiang/" + id, url: "/zongzhi/zhuanxiang/" + id,
method: "get", method: "get",
}); });
}
// 举报事件列表 可传 pageNum pageSize
export function reportList() {
return request({
url: "/zongzhi/managescreen/map",
method: "get",
});
}
// 举报事件详情
export function reportInfo(id) {
return request({
url: "/zongzhi/report/" + id,
method: "get",
});
} }

@ -3,7 +3,7 @@
* @Author: kery.chen * @Author: kery.chen
* @Description: 总体概览左侧 * @Description: 总体概览左侧
* @Date: 2021-11-30 11:08:50 * @Date: 2021-11-30 11:08:50
* @LastEditTime: 2023-08-22 17:20:02 * @LastEditTime: 2023-08-23 17:15:27
* @FilePath : \\tcingiocpro\\src\\views\\privateOrder\\ecosphere\\components\\componentLeft.vue * @FilePath : \\tcingiocpro\\src\\views\\privateOrder\\ecosphere\\components\\componentLeft.vue
--> -->
<template> <template>
@ -330,7 +330,7 @@
> >
<div <div
v-if="fileExtension === 'docx' || fileExtension === 'doc'" v-if="fileExtension === 'docx' || fileExtension === 'doc'"
ref="file" ref="fileDoc"
class="file-content" class="file-content"
></div> ></div>
<div v-if="fileExtension === 'pdf'" class="file-content"> <div v-if="fileExtension === 'pdf'" class="file-content">
@ -644,13 +644,13 @@ export default {
this.inventoryChange() // this.inventoryChange() //
this.getDynamicData() // this.getDynamicData() //
this.time2 = setInterval(() => { // // this.time2 = setInterval(() => { //
if (this.dynamicList.length >= this.dongtaiTotal) { // if (this.dynamicList.length >= this.dongtaiTotal) {
clearInterval(this.time2) // clearInterval(this.time2)
} else { // } else {
this.getDynamicData() // this.getDynamicData()
} // }
}, 500) // }, 500)
}, },
methods: { methods: {
// //
@ -1034,16 +1034,16 @@ export default {
this.currentPage = 1 this.currentPage = 1
this.pageSize = 10 this.pageSize = 10
let data = await dongtaiInfo(item.id) let data = await dongtaiInfo(item.id)
console.log(data) // console.log(data)
this.tableHeader= ['材料名称'] this.tableHeader= ['材料名称']
this.dialogTitle = data.data.materialsName this.dialogTitle = data.data.materialsName
const fileName = data.data.materialsFileName.split(',') const fileName = data.data.materialsFileName.split(',')
const fileUrl = data.data.materialsFileUrl.split(',') const fileUrl = data.data.materialsFileUrl.split(',')
console.log(fileName) if (fileUrl.length < 1 || fileName.length < 1) return
// console.log(fileName)
if (fileName.length > 0) { if (fileName.length > 0) {
// TODO:
fileName.forEach((item, index) => { fileName.forEach((item, index) => {
this.tableData.push({ '材料名称': item,'材料路径':fileUrl[index] }) this.tableData.push({ '材料名称': item.split('.')[0],'材料路径':fileUrl[index] })
}) })
this.networkPlatformDataTwo() this.networkPlatformDataTwo()
} else { } else {
@ -1074,36 +1074,55 @@ export default {
}, },
rowClick(row) { rowClick(row) {
console.log(row) console.log(row)
this.dialogDetails = true // this.dialogDetails = true
// console.log(row) console.log(process.env.VUE_APP_BASE_API2 + row['材料路径'])
this.fileExtension = row['材料路径'].substring( this.fileExtension = row['材料路径'].substring(
row['材料路径'].lastIndexOf('.') + 1 row['材料路径'].lastIndexOf('.') + 1
) )
console.log('fileExtension', this.fileExtension) if (this.fileExtension == "pdf") {
if (['png', 'jpg', 'jpeg'].includes(row.材料路径.substring(row.材料路径.lastIndexOf('.') + 1))) { this.getNumPages(`${process.env.NODE_ENV === 'production' ? window._CONFIG['fileNginxUrl'] : process.env.VUE_APP_BASE_API2}${row['材料路径']}`)
this.imgSrc = `${process.env.NODE_ENV === 'production' ? window._CONFIG['fileNginxUrl'] : '/fileApi'}${row['材料路径']}` } else if (
this.dialogImg = true this.fileExtension === "docx" ||
} else if (this.fileExtension === 'docx' || this.fileExtension === 'doc') { this.fileExtension === "doc"
) {
axios({ axios({
method: 'get', method: "get",
responseType: 'blob', // responseType: "blob", //
url: `${ url: process.env.VUE_APP_BASE_API2 + row['材料路径'],
process.env.NODE_ENV === 'production'
? window._CONFIG['fileNginxUrl']
: '/fileApi'
}${row['材料路径']}`
}).then(({ data }) => { }).then(({ data }) => {
console.log(data,'docx,doc')
if (data) { if (data) {
this.dialogDetails = true this.dialogDetails = true;
this.$nextTick(() => { this.$nextTick(() => {
docx.renderAsync(data, this.$refs.file) // docx.renderAsync(data, this.$refs.fileDoc); //
}) });
} }
}) });
} else if (this.fileExtension === 'pdf') {
console.log('window._CONFIG[fileNginxUrl]',window._CONFIG['fileNginxUrl'])
this.getNumPages(`${process.env.NODE_ENV === 'production' ? window._CONFIG['fileNginxUrl'] : '/fileApi'}${row['材料路径']}`)
} }
// if (['png', 'jpg', 'jpeg'].includes(row..substring(row..lastIndexOf('.') + 1))) {
// this.imgSrc = `${process.env.NODE_ENV === 'production' ? window._CONFIG['fileNginxUrl'] : '/fileApi'}${row['']}`
// this.dialogImg = true
// } else if (this.fileExtension === 'docx' || this.fileExtension === 'doc') {
// axios({
// method: 'get',
// responseType: 'blob', //
// url: `${
// process.env.NODE_ENV === 'production'
// ? window._CONFIG['fileNginxUrl']
// : process.env.VUE_APP_BASE_API3
// }${row['']}`
// }).then(({ data }) => {
// if (data) {
// this.dialogDetails = true
// this.$nextTick(() => {
// docx.renderAsync(data, this.$refs.file) //
// })
// }
// })
// } else if (this.fileExtension === 'pdf') {
// console.log('window._CONFIG[fileNginxUrl]',window._CONFIG['fileNginxUrl'])
// this.getNumPages(`${process.env.NODE_ENV === 'production' ? window._CONFIG['fileNginxUrl'] : '/fileApi'}${row['']}`)
// }
}, },
getNumPages(url) { getNumPages(url) {
// console.log(url) // console.log(url)

@ -3,7 +3,7 @@
* @Author: kery.chen * @Author: kery.chen
* @Description: 总体概览右侧 * @Description: 总体概览右侧
* @Date: 2021-11-30 11:08:50 * @Date: 2021-11-30 11:08:50
* @LastEditTime: 2023-08-22 14:16:17 * @LastEditTime: 2023-08-23 17:24:37
* @FilePath : \\tcingiocpro\\src\\views\\privateOrder\\ecosphere\\components\\componentRight.vue * @FilePath : \\tcingiocpro\\src\\views\\privateOrder\\ecosphere\\components\\componentRight.vue
--> -->
<template> <template>
@ -106,6 +106,7 @@
v-for="(item, index) in qlzxdtList" v-for="(item, index) in qlzxdtList"
:key="index" :key="index"
style="width: 458px" style="width: 458px"
class="zxxd-item"
> >
<div class="img-item" :data-curData="index"> <div class="img-item" :data-curData="index">
<div <div
@ -369,7 +370,7 @@ export default {
// //
async managescreenData(){ async managescreenData(){
let res = await managescreen() let res = await managescreen()
let data = res.data let data = res.data || []
let arr1 = [],arr2 = [] let arr1 = [],arr2 = []
data.map((item)=>{ data.map((item)=>{
item.zhuanxiangTime = this.getDate(item.zhuanxiangTime) item.zhuanxiangTime = this.getDate(item.zhuanxiangTime)
@ -855,9 +856,12 @@ export default {
.zxxd { .zxxd {
margin-left: 20px; margin-left: 20px;
margin-top: 35px; margin-top: 35px;
width: 3350px; // width: 3350px;
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
.zxxd-item {
margin-right: 20px;
}
.img-item { .img-item {
margin-right: 20px; margin-right: 20px;
width: 457px; width: 457px;

@ -70,10 +70,12 @@
<script> <script>
import mapboxgl from 'mapbox-gl' import mapboxgl from 'mapbox-gl'
import 'mapbox-gl/dist/mapbox-gl.css' import 'mapbox-gl/dist/mapbox-gl.css'
import { reportList, reportInfo } from '@/api/zongzhi/manage'
export default { export default {
data() { data() {
return { return {
isShowDialog: false, isShowDialog: false,
//
currentMsg: { currentMsg: {
jbdx: '电子科技有限公司', jbdx: '电子科技有限公司',
szbh: 'SZ2023', szbh: 'SZ2023',
@ -91,7 +93,18 @@ export default {
] ]
} }
}, },
mounted() { async mounted() {
let data = await reportList()
let arr = []
data.data.map((item)=>{
let obj = {}
obj.id = item.id
obj.lng = item.longitude
obj.lat = item.latitude
obj.title = item.jbdx
arr.push(obj)
})
this.pointList = arr
const _this = this const _this = this
mapboxgl.accessToken = 'pk.eyJ1Ijoic2hhcmVhbGV4IiwiYSI6ImNsaXNhZmRjbTFhbnczZmxib3h1OW05YXYifQ.PhlKv60ar3K359d8x2yBPw' mapboxgl.accessToken = 'pk.eyJ1Ijoic2hhcmVhbGV4IiwiYSI6ImNsaXNhZmRjbTFhbnczZmxib3h1OW05YXYifQ.PhlKv60ar3K359d8x2yBPw'
const map = new mapboxgl.Map({ const map = new mapboxgl.Map({
@ -116,7 +129,16 @@ export default {
.setLngLat([item.lng, item.lat]) .setLngLat([item.lng, item.lat])
.addTo(map) .addTo(map)
el.addEventListener('click', () => { el.addEventListener('click', () => {
_this.isShowDialog = true //
reportInfo(item.id).then(res=>{
let { jbdx, jbbh, jbTime, address, content } = res.data
_this.currentMsg.jbdx = jbdx
_this.currentMsg.szbh = jbbh
_this.currentMsg.jbsj = jbTime
_this.currentMsg.dz = address
_this.currentMsg.jbnr = content
_this.isShowDialog = true
})
}) })
}) })
map.addLayer({ map.addLayer({

Loading…
Cancel
Save