6 changed files with 1824 additions and 1635 deletions
@ -1,66 +1,74 @@ |
|||||
import request from '@/utils/request' |
import request from '@/utils/request' |
||||
|
|
||||
export default { |
export default { |
||||
|
|
||||
// 左侧数据总览
|
// 左侧数据总览
|
||||
getProjectDaily: function(data) { |
getProjectDaily: function(data) { |
||||
return request({ |
return request({ |
||||
url: '/datacenter/getProjectDailyNew', |
url: '/datacenter/getProjectDailyNew', |
||||
method: 'post', |
method: 'post', |
||||
data: data |
data: data |
||||
}); |
}); |
||||
}, |
}, |
||||
|
|
||||
// 库存分析图 ,
|
// 库存分析图 ,
|
||||
getReportInventory: function(data) { |
getReportInventory: function(data) { |
||||
return request({ |
return request({ |
||||
url: '/datacenter/getReportInventoryNew', |
url: '/datacenter/getReportInventoryNew', |
||||
method: 'post', |
method: 'post', |
||||
data: data |
data: data |
||||
}); |
}); |
||||
}, |
}, |
||||
|
|
||||
// 获取基础信息 ,
|
// 获取基础信息 ,
|
||||
getProjectBySid: function(data) { |
getProjectBySid: function(data) { |
||||
return request({ |
return request({ |
||||
url: '/datacenter/getProjectBySid?projectSid='+data, |
url: '/datacenter/getProjectBySid?projectSid=' + data, |
||||
method: 'get', |
method: 'get', |
||||
data: data |
data: data |
||||
}); |
}); |
||||
}, |
}, |
||||
|
|
||||
// 获取仓库sid,
|
// 获取仓库sid,
|
||||
getProjectIsJk: function(data) { |
getProjectIsJk: function(data) { |
||||
return request({ |
return request({ |
||||
url: '/datacenter/getProjectIsJk?projectSid='+data, |
url: '/datacenter/getProjectIsJk?projectSid=' + data, |
||||
method: 'get' |
method: 'get' |
||||
}); |
}); |
||||
}, |
}, |
||||
|
|
||||
// 获取摄像头 设备列表,
|
// 获取摄像头 设备列表,
|
||||
getOtherList: function(data) { |
getOtherList: function(data) { |
||||
return request({ |
return request({ |
||||
url: '/datacenter/getOtherList?type=1&ckId='+data, |
url: '/datacenter/getOtherList?type=1&ckId=' + data, |
||||
method: 'get' |
method: 'get' |
||||
}); |
}); |
||||
}, |
}, |
||||
|
|
||||
|
|
||||
// 实时监控 ,
|
// 实时监控 ,
|
||||
getVedioPcLiveById: function(data) { |
getVedioPcLiveById: function(data) { |
||||
return request({ |
return request({ |
||||
url: '/datacenter/getVedioPcLiveByIdNew?id=' + data, |
url: '/datacenter/getVedioPcLiveByIdNew?id=' + data, |
||||
method: 'get' |
method: 'get' |
||||
}); |
}); |
||||
}, |
}, |
||||
|
|
||||
|
|
||||
// 回放监控 ,
|
// 回放监控 ,
|
||||
getVedioPcRecById: function(data) { |
getVedioPcRecById: function(data) { |
||||
return request({ |
return request({ |
||||
url: '/datacenter/getVedioPcRecByIdNew?id=' + data, |
url: '/datacenter/getVedioPcRecByIdNew?id=' + data, |
||||
method: 'get' |
method: 'get' |
||||
}); |
}); |
||||
}, |
}, |
||||
|
// 仓库分布
|
||||
|
getPos: function(data) { |
||||
|
return request({ |
||||
|
url: '/datacenter/getWarehouseAddress', |
||||
|
method: 'post', |
||||
|
data: data |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
} |
} |
@ -1,365 +1,359 @@ |
|||||
<template> |
<template> |
||||
<div class="app-container"> |
<div class="app-container"> |
||||
<el-amap ref="map" :center="center" :zoom="zoom"> |
<el-amap ref="map" :center="center" :zoom="zoom"> |
||||
<el-amap-control-map-type :visible="controlVisible" /> |
<el-amap-control-map-type :visible="controlVisible" /> |
||||
<el-amap-marker |
<el-amap-marker v-for="(marker, index) in markers" :key="index" :icon="marker.icon" :title="marker.title" |
||||
v-for="(marker, index) in markers" |
:position="marker.position" @click="(e) => {clickArrayMarker(marker, e)}" /> |
||||
:key="index" |
</el-amap> |
||||
:icon="marker.icon" |
<div class="toolbar"> |
||||
:title="marker.title" |
<el-collapse v-model="activeNames"> |
||||
:position="marker.position" |
<el-collapse-item name="info"> |
||||
@click="(e) => {clickArrayMarker(marker, e)}" |
<template slot="title"> |
||||
/> |
<i class="el-icon-s-shop" /> 当前选中门店信息 |
||||
</el-amap> |
</template> |
||||
<div class="toolbar"> |
<el-descriptions :column="1" size="mini" border> |
||||
<el-collapse v-model="activeNames"> |
<el-descriptions-item :label-style="{'width': '70px'}" |
||||
<el-collapse-item name="info"> |
label="序号">{{ currentStore.serNumber }}</el-descriptions-item> |
||||
<template slot="title"> |
<el-descriptions-item label="门店名称">{{ currentStore.name }}</el-descriptions-item> |
||||
<i class="el-icon-s-shop" /> 当前选中门店信息 |
<el-descriptions-item label="门店地址">{{ currentStore.address }}</el-descriptions-item> |
||||
</template> |
<el-descriptions-item label="门店面积">{{ currentStore.area }}</el-descriptions-item> |
||||
<el-descriptions :column="1" size="mini" border> |
<el-descriptions-item label="是否尽调">{{ currentStore.dueDiligence }}</el-descriptions-item> |
||||
<el-descriptions-item :label-style="{'width': '70px'}" label="序号">{{ currentStore.serNumber }}</el-descriptions-item> |
</el-descriptions> |
||||
<el-descriptions-item label="门店名称">{{ currentStore.name }}</el-descriptions-item> |
</el-collapse-item> |
||||
<el-descriptions-item label="门店地址">{{ currentStore.address }}</el-descriptions-item> |
<el-collapse-item title="" name="list"> |
||||
<el-descriptions-item label="门店面积">{{ currentStore.area }}</el-descriptions-item> |
<template slot="title"> |
||||
<el-descriptions-item label="是否尽调">{{ currentStore.dueDiligence }}</el-descriptions-item> |
<i class="el-icon-s-grid" /> 门店列表<el-button style="margin-left: 20px;padding: 3px 0" type="text" |
||||
</el-descriptions> |
@click.stop="showUploadXlsx">更新门店数据</el-button> |
||||
</el-collapse-item> |
</template> |
||||
<el-collapse-item title="" name="list"> |
<el-form ref="form" :model="queryParams" label-width="70px" size="mini"> |
||||
<template slot="title"> |
<el-form-item label="门店名称"> |
||||
<i class="el-icon-s-grid" /> 门店列表<el-button style="margin-left: 20px;padding: 3px 0" type="text" @click.stop="showUploadXlsx">更新门店数据</el-button> |
<el-input v-model="queryParams.name" clearable @clear="dosearch"> |
||||
</template> |
<el-button slot="append" icon="el-icon-search" @click="dosearch" /> |
||||
<el-form ref="form" :model="queryParams" label-width="70px" size="mini"> |
</el-input> |
||||
<el-form-item label="门店名称"> |
</el-form-item> |
||||
<el-input v-model="queryParams.name" clearable @clear="dosearch"> |
<el-form-item label="是否尽调"> |
||||
<el-button slot="append" icon="el-icon-search" @click="dosearch" /> |
<el-radio-group v-model="queryParams.jindiao" @input="dosearch"> |
||||
</el-input> |
<el-radio label="全部" /> |
||||
</el-form-item> |
<el-radio label="是" /> |
||||
<el-form-item label="是否尽调"> |
<el-radio label="否" /> |
||||
<el-radio-group v-model="queryParams.jindiao" @input="dosearch"> |
</el-radio-group> |
||||
<el-radio label="全部" /> |
</el-form-item> |
||||
<el-radio label="是" /> |
<el-form-item label="营业面积"> |
||||
<el-radio label="否" /> |
<el-input v-model="queryParams.areaStar" clearable @clear="dosearch"> |
||||
</el-radio-group> |
<template slot="prepend">大于等于</template> |
||||
</el-form-item> |
</el-input> |
||||
<el-form-item label="营业面积"> |
<el-input v-model="queryParams.areaEnd" clearable @clear="dosearch"> |
||||
<el-input v-model="queryParams.areaStar" clearable @clear="dosearch"> |
<template slot="prepend">小于等于</template> |
||||
<template slot="prepend">大于等于</template> |
<el-button slot="append" icon="el-icon-search" @click="dosearch" /> |
||||
</el-input> |
</el-input> |
||||
<el-input v-model="queryParams.areaEnd" clearable @clear="dosearch"> |
</el-form-item> |
||||
<template slot="prepend">小于等于</template> |
</el-form> |
||||
<el-button slot="append" icon="el-icon-search" @click="dosearch" /> |
|
||||
</el-input> |
|
||||
</el-form-item> |
|
||||
</el-form> |
|
||||
|
|
||||
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%;margin-top: 10px;" max-height="400"> |
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%;margin-top: 10px;" |
||||
<el-table-column prop="name" label="门店名称" align="center" /> |
max-height="400"> |
||||
<el-table-column prop="dueDiligence" label="是否尽调" align="center" width="90" /> |
<el-table-column prop="name" label="门店名称" align="center" /> |
||||
</el-table> |
<el-table-column prop="dueDiligence" label="是否尽调" align="center" width="90" /> |
||||
</el-collapse-item> |
</el-table> |
||||
</el-collapse> |
</el-collapse-item> |
||||
</div> |
</el-collapse> |
||||
|
</div> |
||||
|
|
||||
<div class="chartsa"> |
<div class="chartsa"> |
||||
<el-collapse v-model="activeNamesChart"> |
<el-collapse v-model="activeNamesChart"> |
||||
<el-collapse-item name="pie"> |
<el-collapse-item name="pie"> |
||||
<template slot="title"> |
<template slot="title"> |
||||
<i class="el-icon-pie-chart" /> 尽调比例 |
<i class="el-icon-pie-chart" /> 尽调比例 |
||||
</template> |
</template> |
||||
<div ref="charta" style="height:240px;width: 100%;" /> |
<div ref="charta" style="height:240px;width: 100%;" /> |
||||
</el-collapse-item> |
</el-collapse-item> |
||||
</el-collapse> |
</el-collapse> |
||||
</div> |
|
||||
<el-dialog title="上传《门店信息.xlsx》" :visible.sync="uploadDialogVisible" width="40%" :before-close="dialogClose"> |
|
||||
<el-card class="box-card"> |
|
||||
<div> |
|
||||
<el-upload |
|
||||
ref="upload" |
|
||||
class="upload-demo" |
|
||||
:action="updateAction" |
|
||||
:on-progress="handleProgress" |
|
||||
:on-success="handleSuccess" |
|
||||
:file-list="fileList" |
|
||||
:auto-upload="false" |
|
||||
:multiple="false" |
|
||||
:limit="1" |
|
||||
> |
|
||||
<el-button slot="trigger" size="small" type="primary">选取文件</el-button> |
|
||||
<el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传到服务器</el-button> |
|
||||
<div slot="tip" class="el-upload__tip">上传 《门店信息.xlsx》文件,文件中数据格式需要按照 <el-button type="text" @click="downtemplate">模板Excel文件</el-button> 中填写,可以点击<el-button |
|
||||
size="mini" |
|
||||
type="warning" |
|
||||
>下载模板Excel文件</el-button> 做为参照。 </div> |
|
||||
</el-upload> |
|
||||
</div> |
</div> |
||||
<el-card class="box-card" shadow="never"> |
<el-dialog title="上传《门店信息.xlsx》" :visible.sync="uploadDialogVisible" width="40%" :before-close="dialogClose"> |
||||
<el-descriptions title="文件上传结果" :column="1"> |
<el-card class="box-card"> |
||||
<el-descriptions-item label="上传文件名">{{ uploadVo.fileName }}</el-descriptions-item> |
<div> |
||||
<el-descriptions-item label="上传开始时间">{{ uploadVo.starTime }}</el-descriptions-item> |
<el-upload ref="upload" class="upload-demo" :action="updateAction" :on-progress="handleProgress" |
||||
<el-descriptions-item label="上传用时">{{ uploadVo.useTime }}</el-descriptions-item> |
:on-success="handleSuccess" :file-list="fileList" :auto-upload="false" :multiple="false" |
||||
<el-descriptions-item label="总记录数">{{ uploadVo.numberAll }}</el-descriptions-item> |
:limit="1"> |
||||
<el-descriptions-item label="已尽调数">{{ uploadVo.numberTure }}</el-descriptions-item> |
<el-button slot="trigger" size="small" type="primary">选取文件</el-button> |
||||
<el-descriptions-item label="未尽调数">{{ uploadVo.numberFalse }}</el-descriptions-item> |
<el-button style="margin-left: 10px;" size="small" type="success" |
||||
<el-descriptions-item label="未知状态数">{{ uploadVo.numberOther }}</el-descriptions-item> |
@click="submitUpload">上传到服务器</el-button> |
||||
<el-descriptions-item v-show="uploadVo.errInfo" label="异常信息">{{ uploadVo.errInfo }}</el-descriptions-item> |
<div slot="tip" class="el-upload__tip">上传 《门店信息.xlsx》文件,文件中数据格式需要按照 <el-button type="text" |
||||
</el-descriptions> |
@click="downtemplate">模板Excel文件</el-button> 中填写,可以点击<el-button size="mini" |
||||
</el-card> |
type="warning">下载模板Excel文件</el-button> 做为参照。 </div> |
||||
</el-card> |
</el-upload> |
||||
<div slot="footer"> |
</div> |
||||
<el-button type="primary" plain style="margin-right: 50px;" @click="dialogClose">关闭</el-button> |
<el-card class="box-card" shadow="never"> |
||||
</div> |
<el-descriptions title="文件上传结果" :column="1"> |
||||
</el-dialog> |
<el-descriptions-item label="上传文件名">{{ uploadVo.fileName }}</el-descriptions-item> |
||||
</div> |
<el-descriptions-item label="上传开始时间">{{ uploadVo.starTime }}</el-descriptions-item> |
||||
|
<el-descriptions-item label="上传用时">{{ uploadVo.useTime }}</el-descriptions-item> |
||||
|
<el-descriptions-item label="总记录数">{{ uploadVo.numberAll }}</el-descriptions-item> |
||||
|
<el-descriptions-item label="已尽调数">{{ uploadVo.numberTure }}</el-descriptions-item> |
||||
|
<el-descriptions-item label="未尽调数">{{ uploadVo.numberFalse }}</el-descriptions-item> |
||||
|
<el-descriptions-item label="未知状态数">{{ uploadVo.numberOther }}</el-descriptions-item> |
||||
|
<el-descriptions-item v-show="uploadVo.errInfo" |
||||
|
label="异常信息">{{ uploadVo.errInfo }}</el-descriptions-item> |
||||
|
</el-descriptions> |
||||
|
</el-card> |
||||
|
</el-card> |
||||
|
<div slot="footer"> |
||||
|
<el-button type="primary" plain style="margin-right: 50px;" @click="dialogClose">关闭</el-button> |
||||
|
</div> |
||||
|
</el-dialog> |
||||
|
</div> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script> |
||||
import * as echarts from 'echarts' |
import * as echarts from 'echarts' |
||||
import req from '@/api/gd36524/store' |
import req from '@/api/gd36524/store' |
||||
export default { |
export default { |
||||
name: 'MapVueAMap', |
name: 'MapVueAMap', |
||||
data() { |
data() { |
||||
return { |
return { |
||||
charta: null, |
charta: null, |
||||
notChartData: true, |
notChartData: true, |
||||
activeNames: ['info', 'list'], |
activeNames: ['info', 'list'], |
||||
activeNamesChart: ['pie'], |
activeNamesChart: ['pie'], |
||||
mapicon: { |
mapicon: { |
||||
red: process.env.VUE_APP_PUBLIC_PATH + 'image/icon_local_red.png', |
red: process.env.VUE_APP_PUBLIC_PATH + 'image/icon_local_red.png', |
||||
blue: process.env.VUE_APP_PUBLIC_PATH + 'image/icon_local_blue.png' |
blue: process.env.VUE_APP_PUBLIC_PATH + 'image/icon_local_blue.png' |
||||
|
}, |
||||
|
tplpath: process.env.VUE_APP_PUBLIC_PATH + 'datatemplate.xlsx', |
||||
|
uploadDialogVisible: false, |
||||
|
uploadVo: { |
||||
|
fileName: '', |
||||
|
starTime: '', |
||||
|
useTime: '', |
||||
|
numberAll: '', |
||||
|
numberTure: '', |
||||
|
numberFalse: '', |
||||
|
numberOther: '', |
||||
|
errInfo: '' |
||||
|
}, |
||||
|
updateAction: process.env.VUE_APP_BASE_API + '/store/uploadData', |
||||
|
fullscreenloading: null, |
||||
|
fileList: [], |
||||
|
|
||||
|
queryParams: { |
||||
|
name: '', |
||||
|
areaStar: '', |
||||
|
areaEnd: '', |
||||
|
jindiao: '全部' |
||||
|
}, |
||||
|
dataList: [], |
||||
|
tableLoading: false, |
||||
|
|
||||
|
controlVisible: false, |
||||
|
zoom: 13, |
||||
|
center: [114.490788, 38.033577], |
||||
|
markers: [], |
||||
|
currentStore: { |
||||
|
serNumber: '', |
||||
|
name: '', |
||||
|
address: '', |
||||
|
area: '', |
||||
|
dueDiligence: '' |
||||
|
} |
||||
|
} |
||||
}, |
}, |
||||
tplpath: process.env.VUE_APP_PUBLIC_PATH + 'datatemplate.xlsx', |
created() { |
||||
uploadDialogVisible: false, |
this.loadList() |
||||
uploadVo: { |
|
||||
fileName: '', |
|
||||
starTime: '', |
|
||||
useTime: '', |
|
||||
numberAll: '', |
|
||||
numberTure: '', |
|
||||
numberFalse: '', |
|
||||
numberOther: '', |
|
||||
errInfo: '' |
|
||||
}, |
}, |
||||
updateAction: process.env.VUE_APP_BASE_API + '/store/uploadData', |
mounted() { |
||||
fullscreenloading: null, |
// this.$nextTick(() => { |
||||
fileList: [], |
// this.initCharta() |
||||
|
// }) |
||||
queryParams: { |
|
||||
name: '', |
|
||||
areaStar: '', |
|
||||
areaEnd: '', |
|
||||
jindiao: '全部' |
|
||||
}, |
}, |
||||
dataList: [], |
beforeDestroy() { |
||||
tableLoading: false, |
if (this.charta) { |
||||
|
this.charta.dispose() |
||||
controlVisible: false, |
this.charta = null |
||||
zoom: 13, |
} |
||||
center: [114.490788, 38.033577], |
}, |
||||
markers: [], |
methods: { |
||||
currentStore: { |
initCharta(listdata) { |
||||
serNumber: '', |
this.notChartData = false |
||||
name: '', |
var x = 0 |
||||
address: '', |
var y = 0 |
||||
area: '', |
for (var i in listdata) { |
||||
dueDiligence: '' |
if (listdata[i].dueDiligence === '是') { |
||||
} |
x++ |
||||
} |
} else { |
||||
}, |
y++ |
||||
created() { |
} |
||||
this.loadList() |
} |
||||
}, |
const _dataX = [] |
||||
mounted() { |
_dataX.push({ |
||||
// this.$nextTick(() => { |
value: x, |
||||
// this.initCharta() |
name: '已尽调' |
||||
// }) |
}) |
||||
}, |
_dataX.push({ |
||||
beforeDestroy() { |
value: y, |
||||
if (this.charta) { |
name: '未尽调' |
||||
this.charta.dispose() |
}) |
||||
this.charta = null |
|
||||
} |
|
||||
}, |
|
||||
methods: { |
|
||||
initCharta(listdata) { |
|
||||
this.notChartData = false |
|
||||
var x = 0 |
|
||||
var y = 0 |
|
||||
for (var i in listdata) { |
|
||||
if (listdata[i].dueDiligence === '是') { x++ } else { y++ } |
|
||||
} |
|
||||
const _dataX = [] |
|
||||
_dataX.push({ |
|
||||
value: x, |
|
||||
name: '已尽调' |
|
||||
}) |
|
||||
_dataX.push({ |
|
||||
value: y, |
|
||||
name: '未尽调' |
|
||||
}) |
|
||||
|
|
||||
this.charta = echarts.init(this.$refs.charta) |
this.charta = echarts.init(this.$refs.charta) |
||||
this.charta.setOption({ |
this.charta.setOption({ |
||||
tooltip: { |
tooltip: { |
||||
trigger: 'item' |
trigger: 'item' |
||||
}, |
}, |
||||
legend: { |
legend: { |
||||
orient: 'vertical', |
orient: 'vertical', |
||||
left: 'left' |
left: 'left' |
||||
}, |
}, |
||||
series: [{ |
series: [{ |
||||
name: '门店数量', |
name: '门店数量', |
||||
type: 'pie', |
type: 'pie', |
||||
radius: '50%', |
radius: '50%', |
||||
data: _dataX |
data: _dataX |
||||
}] |
}] |
||||
}) |
}) |
||||
}, |
}, |
||||
loadList() { |
loadList() { |
||||
req.list(this.queryParams).then(res => { |
req.list(this.queryParams).then(res => { |
||||
this.dataList = res.data |
this.dataList = res.data |
||||
this.resetMarkers() |
this.resetMarkers() |
||||
if (this.notChartData) { |
if (this.notChartData) { |
||||
this.initCharta(res.data) |
this.initCharta(res.data) |
||||
} |
} |
||||
}).catch(e => { |
}).catch(e => { |
||||
console.log('GdinventoryLog-loadList-ee:', e) |
console.log('GdinventoryLog-loadList-ee:', e) |
||||
}) |
}) |
||||
}, |
}, |
||||
dosearch() { |
dosearch() { |
||||
this.loadList() |
this.loadList() |
||||
}, |
}, |
||||
resetQuery() { |
resetQuery() { |
||||
this.queryParams = { |
this.queryParams = { |
||||
name: '', |
name: '', |
||||
areaStar: '', |
areaStar: '', |
||||
areaEnd: '', |
areaEnd: '', |
||||
jindiao: '全部' |
jindiao: '全部' |
||||
} |
} |
||||
this.loadList() |
this.loadList() |
||||
}, |
}, |
||||
resetMarkers() { |
resetMarkers() { |
||||
this.markers = [] |
this.markers = [] |
||||
for (var i in this.dataList) { |
for (var i in this.dataList) { |
||||
const d = this.dataList[i] |
const d = this.dataList[i] |
||||
let nicon = this.mapicon.blue |
let nicon = this.mapicon.blue |
||||
if (d.dueDiligence === '是') { |
if (d.dueDiligence === '是') { |
||||
nicon = this.mapicon.red |
nicon = this.mapicon.red |
||||
} |
} |
||||
const newMarker = { |
const newMarker = { |
||||
id: d.sid, |
id: d.sid, |
||||
position: [d.lng, d.lat], |
position: [d.lng, d.lat], |
||||
title: d.name, |
title: d.name, |
||||
icon: nicon, |
icon: nicon, |
||||
label: { |
label: { |
||||
direction: 'bottom', |
direction: 'bottom', |
||||
offset: [0, 5], // 设置文本标注偏移量 |
offset: [0, 5], // 设置文本标注偏移量 |
||||
content: "<div class='info'>" + d.name + '</div>' // 设置文本标注内容 |
content: "<div class='info'>" + d.name + '</div>' // 设置文本标注内容 |
||||
|
} |
||||
|
} |
||||
|
this.markers.push(newMarker) |
||||
|
} |
||||
|
}, |
||||
|
showUploadXlsx() { |
||||
|
this.uploadDialogVisible = true |
||||
|
}, |
||||
|
downtemplate() { |
||||
|
window.open(this.tplpath, '_blank') |
||||
|
}, |
||||
|
submitUpload() { |
||||
|
this.$refs.upload.submit() |
||||
|
}, |
||||
|
handleProgress(event, file, fileList) { |
||||
|
const _this = this |
||||
|
this.fullscreenloading = this.$loading({ |
||||
|
lock: true, |
||||
|
text: '文件正在上传', |
||||
|
spinner: 'el-icon-loading', |
||||
|
background: 'rgba(0, 0, 0, 0.7)' |
||||
|
}) |
||||
|
console.log('111', event.percent) |
||||
|
if (event.percent >= 100) { |
||||
|
_this.fullscreenloading.text = '上传完成,正在导入数据库' |
||||
|
} |
||||
|
}, |
||||
|
handleSuccess(resp, file, fileList) { |
||||
|
console.log('222', resp) |
||||
|
const _this = this |
||||
|
if (this.fullscreenloading) this.fullscreenloading.close() |
||||
|
this.fullscreenloading = null |
||||
|
_this.uploadVo = resp.data |
||||
|
_this.notChartData = true |
||||
|
_this.loadList() |
||||
|
setTimeout(function() { |
||||
|
_this.dialogClose() |
||||
|
}, 3000) |
||||
|
}, |
||||
|
dialogClose() { |
||||
|
this.uploadVo = { |
||||
|
fileName: '', |
||||
|
starTime: '', |
||||
|
useTime: '', |
||||
|
numberAll: '', |
||||
|
numberTure: '', |
||||
|
numberFalse: '', |
||||
|
numberOther: '', |
||||
|
errInfo: '' |
||||
|
} |
||||
|
if (this.fullscreenloading) this.fullscreenloading.close() |
||||
|
this.fullscreenloading = null |
||||
|
this.fileList = [] |
||||
|
this.uploadDialogVisible = false |
||||
|
}, |
||||
|
clickArrayMarker(marker) { |
||||
|
for (var i in this.dataList) { |
||||
|
if (marker.id === this.dataList[i].sid) { |
||||
|
this.currentStore = this.dataList[i] |
||||
|
break |
||||
|
} |
||||
|
} |
||||
} |
} |
||||
} |
|
||||
this.markers.push(newMarker) |
|
||||
} |
|
||||
}, |
|
||||
showUploadXlsx() { |
|
||||
this.uploadDialogVisible = true |
|
||||
}, |
|
||||
downtemplate() { |
|
||||
window.open(this.tplpath, '_blank') |
|
||||
}, |
|
||||
submitUpload() { |
|
||||
this.$refs.upload.submit() |
|
||||
}, |
|
||||
handleProgress(event, file, fileList) { |
|
||||
const _this = this |
|
||||
this.fullscreenloading = this.$loading({ |
|
||||
lock: true, |
|
||||
text: '文件正在上传', |
|
||||
spinner: 'el-icon-loading', |
|
||||
background: 'rgba(0, 0, 0, 0.7)' |
|
||||
}) |
|
||||
console.log('111', event.percent) |
|
||||
if (event.percent >= 100) { |
|
||||
_this.fullscreenloading.text = '上传完成,正在导入数据库' |
|
||||
} |
} |
||||
}, |
|
||||
handleSuccess(resp, file, fileList) { |
|
||||
console.log('222', resp) |
|
||||
const _this = this |
|
||||
if (this.fullscreenloading) this.fullscreenloading.close() |
|
||||
this.fullscreenloading = null |
|
||||
_this.uploadVo = resp.data |
|
||||
_this.notChartData = true |
|
||||
_this.loadList() |
|
||||
setTimeout(function() { |
|
||||
_this.dialogClose() |
|
||||
}, 3000) |
|
||||
}, |
|
||||
dialogClose() { |
|
||||
this.uploadVo = { |
|
||||
fileName: '', |
|
||||
starTime: '', |
|
||||
useTime: '', |
|
||||
numberAll: '', |
|
||||
numberTure: '', |
|
||||
numberFalse: '', |
|
||||
numberOther: '', |
|
||||
errInfo: '' |
|
||||
} |
|
||||
if (this.fullscreenloading) this.fullscreenloading.close() |
|
||||
this.fullscreenloading = null |
|
||||
this.fileList = [] |
|
||||
this.uploadDialogVisible = false |
|
||||
}, |
|
||||
clickArrayMarker(marker) { |
|
||||
for (var i in this.dataList) { |
|
||||
if (marker.id === this.dataList[i].sid) { |
|
||||
this.currentStore = this.dataList[i] |
|
||||
break |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
} |
||||
} |
|
||||
</script> |
</script> |
||||
|
|
||||
<style lang="scss" scoped> |
<style lang="scss" scoped> |
||||
.app-container { |
.app-container { |
||||
width: 100%; |
width: 100%; |
||||
height: 100%; |
height: 100%; |
||||
top: 0px; |
top: 0px; |
||||
left: 0px; |
left: 0px; |
||||
margin: 0; |
margin: 0; |
||||
padding: 0; |
padding: 0; |
||||
} |
} |
||||
|
|
||||
.toolbar { |
.toolbar { |
||||
position: absolute; |
position: absolute; |
||||
top: 20px; |
top: 20px; |
||||
left: 20px; |
left: 20px; |
||||
width: 300px; |
width: 300px; |
||||
} |
} |
||||
|
|
||||
.info { |
.info { |
||||
position: relative; |
position: relative; |
||||
margin: 0; |
margin: 0; |
||||
top: 0; |
top: 0; |
||||
right: 0; |
right: 0; |
||||
min-width: 0; |
min-width: 0; |
||||
} |
} |
||||
|
|
||||
.storelabel { |
.storelabel { |
||||
width: 80px |
width: 80px |
||||
} |
} |
||||
|
|
||||
.amap-icon img { |
.amap-icon img { |
||||
width: 25px; |
width: 25px; |
||||
height: 34px; |
height: 34px; |
||||
} |
} |
||||
|
|
||||
.chartsa { |
.chartsa { |
||||
position: absolute; |
position: absolute; |
||||
top: 20px; |
top: 20px; |
||||
right: 15px; |
right: 15px; |
||||
width: 300px; |
width: 300px; |
||||
} |
} |
||||
</style> |
</style> |
File diff suppressed because it is too large
Loading…
Reference in new issue