修改地图
This commit is contained in:
@@ -35,10 +35,10 @@ const setupAll = async () => {
|
|||||||
const app = createApp(App)
|
const app = createApp(App)
|
||||||
|
|
||||||
//开启离线地图
|
//开启离线地图
|
||||||
app.use(BaiduMapOffline, {
|
// app.use(BaiduMapOffline, {
|
||||||
offline: true,
|
// offline: true,
|
||||||
offlineUrl:'http://sjzx:8088/map/' //window.location.origin + '/map/'
|
// offlineUrl:'http://sjzx:8088/map/' //window.location.origin + '/map/'
|
||||||
})
|
// })
|
||||||
app.use(BaiduMap, {
|
app.use(BaiduMap, {
|
||||||
ak: 'Yp57V71dkOPiXjiN8VdcFRsVELzlVNKK',
|
ak: 'Yp57V71dkOPiXjiN8VdcFRsVELzlVNKK',
|
||||||
v: '3.0'
|
v: '3.0'
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-Search" @click="onSubmit">查询</el-button>
|
<el-button type="primary" icon="el-icon-Search" @click="onSubmit">查询</el-button>
|
||||||
<el-button type="primary" icon="el-icon-Download" @click="exportTemplate">导出模板</el-button>
|
<el-button type="primary" icon="el-icon-Download" @click="exportTemplate">导出模板</el-button>
|
||||||
<el-upload action="" :show-file-list="false" :auto-upload="false" :on-change="choose">
|
<el-upload action="" accept=".xlsx" :show-file-list="false" :auto-upload="false" :on-change="choose">
|
||||||
<el-button type="primary" class="ml10" icon="el-icon-Upload">离线导入</el-button>
|
<el-button type="primary" class="ml10" icon="el-icon-Upload">离线导入</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
<!-- <el-button type="primary" class="ml10" icon="el-icon-Ticket" @click="modelTrain">
|
<!-- <el-button type="primary" class="ml10" icon="el-icon-Ticket" @click="modelTrain">
|
||||||
@@ -491,6 +491,9 @@ const choose = (e: any) => {
|
|||||||
lineId: dotList.value.id,
|
lineId: dotList.value.id,
|
||||||
startTime: datePickerRef.value.timeValue[0]
|
startTime: datePickerRef.value.timeValue[0]
|
||||||
}
|
}
|
||||||
|
if (e.raw.type != 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet') {
|
||||||
|
return ElMessage.warning('请选择Excel文件!')
|
||||||
|
}
|
||||||
|
|
||||||
uploadExcel(e.raw, form).then(res => {
|
uploadExcel(e.raw, form).then(res => {
|
||||||
ElMessage.success('导入成功')
|
ElMessage.success('导入成功')
|
||||||
|
|||||||
@@ -2,31 +2,22 @@
|
|||||||
<div class="default-main" :style="height">
|
<div class="default-main" :style="height">
|
||||||
<splitpanes style="height: 100%" class="default-theme" id="navigation-splitpanes">
|
<splitpanes style="height: 100%" class="default-theme" id="navigation-splitpanes">
|
||||||
<pane :size="size">
|
<pane :size="size">
|
||||||
<PointTree
|
<PointTree :default-expand-all="false" @node-click="handleNodeClick" @init="handleNodeClick">
|
||||||
:default-expand-all="false"
|
</PointTree>
|
||||||
@node-click="handleNodeClick"
|
|
||||||
@init="handleNodeClick"
|
|
||||||
></PointTree>
|
|
||||||
</pane>
|
</pane>
|
||||||
<pane style="background: #fff" :style="height">
|
<pane style="background: #fff" :style="height">
|
||||||
<TableHeader ref="TableHeaderRef" datePicker :show-search="false">
|
<TableHeader ref="TableHeaderRef" datePicker :show-search="false">
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="模板策略">
|
<el-form-item label="模板策略">
|
||||||
<el-input v-model="tableStore.table.params.crmName" placeholder="请输入客户名称" />
|
<el-input v-model="tableStore.table.params.crmName" placeholder="请输入模板策略" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="报表类型:">
|
<el-form-item label="报表类型:">
|
||||||
<el-input v-model="tableStore.table.params.reportNumber" placeholder="请输入报告编号" />
|
<el-input v-model="tableStore.table.params.reportNumber" placeholder="请输入报表类型" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-upload
|
<el-upload :show-file-list="false" ref="uploadRef" action="" accept=".png,.jpg"
|
||||||
:show-file-list="false"
|
:on-change="choose" :auto-upload="false">
|
||||||
ref="uploadRef"
|
|
||||||
action=""
|
|
||||||
accept=".png,.jpg"
|
|
||||||
:on-change="choose"
|
|
||||||
:auto-upload="false"
|
|
||||||
>
|
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<el-button icon="el-icon-Upload" type="primary" class="mr10 ml10">上传接线图</el-button>
|
<el-button icon="el-icon-Upload" type="primary" class="mr10 ml10">上传接线图</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -36,11 +27,8 @@
|
|||||||
</TableHeader>
|
</TableHeader>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<div id="luckysheet">
|
<div id="luckysheet">
|
||||||
<img
|
<img width="100%" :style="`height: calc(${tableStore.table.height} + 40px)`"
|
||||||
width="100%"
|
src="@/assets/img/jss.png" />
|
||||||
:style="`height: calc(${tableStore.table.height} + 40px)`"
|
|
||||||
src="@/assets/img/jss.png"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</pane>
|
</pane>
|
||||||
@@ -59,8 +47,9 @@ import { useDictData } from '@/stores/dictData'
|
|||||||
import { mainHeight } from '@/utils/layout'
|
import { mainHeight } from '@/utils/layout'
|
||||||
import { exportModel } from '@/api/process-boot/reportForms'
|
import { exportModel } from '@/api/process-boot/reportForms'
|
||||||
import { genFileId, ElMessage } from 'element-plus'
|
import { genFileId, ElMessage } from 'element-plus'
|
||||||
|
import type { UploadProps, UploadUserFile } from 'element-plus'
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'harmonic-boot/report/word'
|
// name: 'harmonic-boot/report/word'
|
||||||
})
|
})
|
||||||
const height = mainHeight(20)
|
const height = mainHeight(20)
|
||||||
const size = ref(0)
|
const size = ref(0)
|
||||||
@@ -74,8 +63,8 @@ const tableStore = new TableStore({
|
|||||||
url: '',
|
url: '',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [],
|
column: [],
|
||||||
beforeSearchFun: () => {},
|
beforeSearchFun: () => { },
|
||||||
loadCallback: () => {}
|
loadCallback: () => { }
|
||||||
})
|
})
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
|
|
||||||
@@ -84,16 +73,24 @@ onMounted(() => {
|
|||||||
|
|
||||||
|
|
||||||
if (dom) {
|
if (dom) {
|
||||||
console.log("🚀 ~ onMounted ~ dom.offsetHeight:", dom.offsetHeight)
|
|
||||||
size.value = Math.round((180 / dom.offsetHeight) * 100)
|
size.value = Math.round((180 / dom.offsetHeight) * 100)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
const handleNodeClick = (data: any, node: any) => {
|
const handleNodeClick = (data: any, node: any) => {
|
||||||
dotList.value = data
|
dotList.value = data
|
||||||
}
|
}
|
||||||
// 上传
|
// 上传
|
||||||
const choose = (files: any) => {
|
const choose = (files: any) => {
|
||||||
|
const isJPG = files.raw.type === 'image/jpg';
|
||||||
|
const isPNG = files.raw.type === 'image/png';
|
||||||
|
if (!isJPG && !isPNG) {
|
||||||
|
ElMessage.warning('上传文件只能是 JPG/PNG 格式!')
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
uploadList.value = files
|
uploadList.value = files
|
||||||
ElMessage.success('上传成功')
|
ElMessage.success('上传成功')
|
||||||
}
|
}
|
||||||
@@ -106,15 +103,15 @@ const exportEvent = () => {
|
|||||||
let form = new FormData()
|
let form = new FormData()
|
||||||
form.append('lineIndex', dotList.value.id)
|
form.append('lineIndex', dotList.value.id)
|
||||||
form.append('name', dotList.value.name)
|
form.append('name', dotList.value.name)
|
||||||
form.append('crmName', tableStore.table.params.crmName||'')
|
form.append('crmName', tableStore.table.params.crmName || '')
|
||||||
form.append('reportNumber', tableStore.table.params.reportNumber||'')
|
form.append('reportNumber', tableStore.table.params.reportNumber || '')
|
||||||
form.append('type', '0')
|
form.append('type', '0')
|
||||||
form.append('startTime', tableStore.table.params.startTime)
|
form.append('startTime', TableHeaderRef.value.datePickerRef.timeValue[0])
|
||||||
form.append('endTime', tableStore.table.params.endTime)
|
form.append('endTime', TableHeaderRef.value.datePickerRef.timeValue[1])
|
||||||
|
console.log("🚀 ~ exportEvent ~ uploadList.value:", uploadList.value?.raw)
|
||||||
|
|
||||||
// uploadList.value.forEach(item => {
|
|
||||||
// form.append('file', uploadList.value?.raw)
|
form.append('file', uploadList.value?.raw ||'')
|
||||||
// })
|
|
||||||
|
|
||||||
exportModel(form).then((res: any) => {
|
exportModel(form).then((res: any) => {
|
||||||
let blob = new Blob([res], {
|
let blob = new Blob([res], {
|
||||||
|
|||||||
@@ -241,10 +241,21 @@ defineExpose({ open })
|
|||||||
|
|
||||||
let uploadName = ref('')
|
let uploadName = ref('')
|
||||||
const choose = (e: any) => {
|
const choose = (e: any) => {
|
||||||
uploadFile(e.raw, '/supervision/').then(res => {
|
const fileExtension = e.name.split('.')[1];
|
||||||
reportFilePath.value = res.data.name
|
if (fileExtension === 'doc' || fileExtension === 'docx' || fileExtension === 'pdf') {
|
||||||
// form.value.reportPath = res.data.name
|
// 文件类型不符合要求,提示用户
|
||||||
})
|
uploadFile(e.raw, '/supervision/').then(res => {
|
||||||
|
reportFilePath.value = res.data.name
|
||||||
|
ElMessage.success('上传成功!');
|
||||||
|
// form.value.reportPath = res.data.name
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
uploadRef.value!.clearFiles()
|
||||||
|
ElMessage.error('请选择 .doc 或 .docx 或 .pdf 格式的文件!');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleExceed: UploadProps['onExceed'] = files => {
|
const handleExceed: UploadProps['onExceed'] = files => {
|
||||||
|
|||||||
@@ -221,8 +221,10 @@ const handler = async ({ BMap, map }: any) => {
|
|||||||
() => monitoringPoint.state.lineId,
|
() => monitoringPoint.state.lineId,
|
||||||
(newLineId, oldLineId) => {
|
(newLineId, oldLineId) => {
|
||||||
let value = areaLineInfo.value.find((item: any) => item.lineId == newLineId)
|
let value = areaLineInfo.value.find((item: any) => item.lineId == newLineId)
|
||||||
center.value.lng = value.lng
|
if(value==undefined) return
|
||||||
center.value.lat = value.lat
|
|
||||||
|
center.value.lng = value.lng || 0
|
||||||
|
center.value.lat = value.lat || 0
|
||||||
infoWindowPoint.value = value
|
infoWindowPoint.value = value
|
||||||
infoWindowPoint.value.show = true
|
infoWindowPoint.value.show = true
|
||||||
monitoringPoint.setValue('lineName', value.manufacturer + '>' + value.gdName + '>' + value.subName + '>' + value.lineName)
|
monitoringPoint.setValue('lineName', value.manufacturer + '>' + value.gdName + '>' + value.subName + '>' + value.lineName)
|
||||||
|
|||||||
Reference in New Issue
Block a user