Browse Source

Merge branch 'dev-calendar' of http://git.elinkit.com.cn:7070/r/epmet-oper-gov into dev-calendar

feature
jiangyy 3 years ago
parent
commit
507cc0351a
  1. 35
      src/views/modules/base/community/buildTable.vue
  2. 72
      src/views/modules/base/community/communityTable.vue
  3. 761
      src/views/modules/base/community/roomTable.vue
  4. 32
      src/views/modules/base/resi.vue
  5. 237
      src/views/modules/communityParty/calendar/cpts/calendar.vue
  6. 329
      src/views/modules/communityParty/calendar/index.vue
  7. 198
      src/views/modules/cpts/baobiao/index.vue
  8. 8
      src/views/modules/visual/cpts/map/index.vue

35
src/views/modules/base/community/buildTable.vue

@ -57,6 +57,9 @@
size="small"
:disabled="yihuyidangDisabled"
@click="handleExportYihuyidang()">导出一户一档</el-button>
<el-button size="small" v-if="displayedBaobiaoBtn"
class="diy-button--add"
@click="reportForm">智能填报</el-button>
</div>
<div class="div_table_item">
@ -194,6 +197,7 @@
@dialogOk="addFormOk"></build-form>
</el-dialog>
<baobiao ref="baobiao" />
</div>
</template>
@ -204,6 +208,7 @@ import BuildForm from './buildForm'
import { requestPost } from "@/js/dai/request";
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
import baobiao from "@/views/modules/cpts/baobiao";
let loading //
export default {
@ -230,13 +235,19 @@ export default {
yihuyidangDisabled: false,
displayedBaobiaoBtn: false,
}
},
components: {
baobiao,
BuildForm
},
async mounted() {
console.log('building11111111111111111111111111')
this.displayedBaobiaoBtn = await this.$refs.baobiao.existsTemplate({
elseParams: {
categoryKeys:['house_info'], categoryKey: 'house_info',
}
});
},
computed: {
tableHeight () {
@ -248,6 +259,28 @@ export default {
...mapGetters(['clientHeight', 'iframeHeight'])
},
methods: {
reportForm(){
let paramMap = {
pageSize: this.pageSize,
pageNo: this.pageNo,
level: this.agencyObj.level,
id: this.agencyObj.id,
ownerName: this.ownerName,
ownerPhone: this.ownerPhone,
rentFlag: this.rentFlag,
purpose: this.purpose,
remark: this.remark,
sortType: this.sortType,
updateStartDate: this.updateStartDate,
updateEndDate: this.updateEndDate,
};
this.$refs.baobiao.init({
elseParams: {
categoryKeys:['house_info'], categoryKey: 'house_info', paramMap
}
})
},
indexMethod (index) {
return index + 1;
},

72
src/views/modules/base/community/communityTable.vue

@ -8,12 +8,6 @@
size="small"
:loading="yhymLoading"
@click="handleYhymInfo">补全一房一码信息</el-button>
<el-button v-if="showYhymInfo"
style=""
class="diy-button--export"
size="small"
:loading="yhymLoading"
@click="createBatchNeiQrUrl">补全小程序小区码</el-button>
<el-button style=""
class="diy-button--add"
size="small"
@ -94,6 +88,9 @@
:disabled="yihuyidangDisabled"
@click="handleExportYihuyidang()">导出一户一档</el-button> -->
<el-button size="small" v-if="displayedBaobiaoBtn"
class="diy-button--add"
@click="reportForm">智能填报</el-button>
</div>
<div class="div_table_item">
@ -220,6 +217,7 @@
</span>
</el-dialog>
<baobiao ref="baobiao" />
</div>
</template>
@ -231,6 +229,7 @@ import { requestPost } from "@/js/dai/request";
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
import axios from 'axios'
import baobiao from "@/views/modules/cpts/baobiao";
let loading //
export default {
@ -267,14 +266,21 @@ export default {
yihuyidangDisabled: false,
yihuyimaDisabled: false,
exportBtn: false,
dialogVisible: false //
dialogVisible: false, //
displayedBaobiaoBtn: false,
}
},
components: {
baobiao,
CommunityForm
},
async mounted() {
this.displayedBaobiaoBtn = await this.$refs.baobiao.existsTemplate({
elseParams: {
categoryKeys:['house_info'], categoryKey: 'house_info',
}
});
},
computed: {
tableHeight () {
@ -285,7 +291,27 @@ export default {
...mapGetters(['clientHeight', 'iframeHeight'])
},
methods: {
reportForm(){
let paramMap = {
pageSize: this.pageSize,
pageNo: this.pageNo,
level: this.agencyObj.level,
id: this.agencyObj.id,
ownerName: this.ownerName,
ownerPhone: this.ownerPhone,
rentFlag: this.rentFlag,
purpose: this.purpose,
remark: this.remark,
sortType: this.sortType,
updateStartDate: this.updateStartDate,
updateEndDate: this.updateEndDate,
};
this.$refs.baobiao.init({
elseParams: {
categoryKeys:['house_info'], categoryKey: 'house_info', paramMap
}
})
},
async loadTable (fromTree, treeObj) {
console.log(111, this.staffAgencyId)
//
@ -418,34 +444,6 @@ export default {
}
},
//
async createBatchNeiQrUrl () {
this.yhymLoading = true
const url = "/gov/org/neighborhood/createBatchNeiQrUrl"
let params = {}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.yhymLoading = false
this.$message({
type: "success",
message: "批量生成成功"
});
} else if (code > 8000) {
this.yhymLoading = false
this.$message({
showClose: true,
message: msg,
duration: 0
})
} else {
this.yhymLoading = false
this.$message.error(msg)
}
},
async handleEdit (row) {
this.formTitle = '修改小区'
this.formShow = true

761
src/views/modules/base/community/roomTable.vue

File diff suppressed because it is too large

32
src/views/modules/base/resi.vue

@ -77,6 +77,9 @@
@click="deleteBatch">批量删除</el-button>
<!-- <el-button type="primary" size="small">下载人口模板</el-button> -->
<el-button size="small" v-if="displayedBaobiaoBtn"
class="diy-button--add"
@click="reportForm">智能填报</el-button>
</div>
<el-table ref="ref_table"
:data="tableData"
@ -315,7 +318,7 @@
:userId="lookInfo.userId"
:gridName="lookInfo.gridName"
@close="handleCancleLook" />
<baobiao ref="baobiao" />
</div>
</template>
@ -329,11 +332,13 @@ import { mapGetters } from 'vuex'
import resiTransfer from '../../components/resiTransfer.vue'
import resiChangeRecord from '../../components/resiChangeRecord.vue'
import peopleMore from "@/views/modules/shequ/cpts/people-more";
import baobiao from "@/views/modules/cpts/baobiao";
import diyInfo from './diyInfo.vue'
import { requestPost } from "@/js/dai/request";
export default {
components: {
baobiao,
resiSearch,
resiForm,
editResi,
@ -394,7 +399,9 @@ export default {
lookInfo: {
userId: '',
gridName: ''
}
},
displayedBaobiaoBtn: false,
}
},
props: {
@ -441,14 +448,33 @@ export default {
console.log('resiSearch', this.$refs.resiSearch.$el.offsetHeight)
},
mounted () {
async mounted () {
// this.$nextTick(() => {
// this.tableHeight = document.documentElement.clientHeight - this.$refs.resiSearch.$el.offsetHeight - 280 + 'px'
// })
console.log('document.documentElement.clientWidth', document.documentElement.clientHeight)
this.displayedBaobiaoBtn = await this.$refs.baobiao.existsTemplate({
elseParams: {
categoryKeys:['resi_info'], categoryKey: 'resi_info'
}
});
},
methods: {
reportForm(){
this.$refs.baobiao.init({
elseParams: {
categoryKeys:['resi_info'], categoryKey: 'resi_info', paramMap:{
searchForm:{
formCode: 'resi_base_info',
pageNo: this.currentPage,
pageSize: this.pageSize,
conditions: this.conditions
}
}
}
})
},
checkSelect (row, index) {
return row.isChecked

237
src/views/modules/communityParty/calendar/cpts/calendar.vue

@ -1,167 +1,232 @@
<template>
<div>
<el-row>
<!-- 左侧提示早班晚班或者上午下午 -->
<el-col :span="1">
<div class="date-con tip-con">
<el-col
v-for="item in 6"
<div class="m-calendar">
<div class="top-list">
<div
class="top"
v-for="(item, index) in top"
:class="{ 'z-weekend': index > 4 }"
:key="item"
class="date thisMonth tip"
:span="1"
>
<div class="morning">早班</div>
<div class="evening">晚班</div>
</el-col>
{{ item }}
</div>
</el-col>
<!-- 右侧周一到周五具体内容 -->
<el-col :span="11">
<!-- 第一行表头周一到周日 -->
<div class="top-con">
<div class="top" v-for="item in top" :key="item">星期{{ item }}</div>
</div>
<!-- 日历号 -->
<div class="date-con">
<div class="date-list">
<div
class="date"
:class="[item.thisMonth, item.isToday, item.afterToday]"
class="date-item"
:class="{
'z-on': item.format == currentDate,
'z-this-month': item.thisMonth,
'z-today': item.isToday,
'z-after-today': item.afterToday,
'z-weekend': item.day == 6 || item.day == 0,
}"
v-for="(item, index) in visibleCalendar"
:key="index"
@click="handleClickDate(item)"
>
<div>{{ item.day }}</div>
<div class="morning">张三李四</div>
<div class="evening">王五赵六</div>
<div class="date">{{ item.date }}</div>
<slot name="date-item" v-bind:info="item"></slot>
</div>
</div>
</el-col>
</el-row>
</div>
</template>
<script>
export default {
props: {
time: {
type: Object,
default: () => {
return {
year: new Date().getFullYear(),
month: new Date().getMonth(),
};
currentYear: {
type: Number,
default: new Date().getFullYear(),
},
currentMonth: {
type: Number,
default: new Date().getMonth(),
},
},
data() {
return {
top: ["一", "二", "三", "四", "五", "六", "日"],
currentDate: "",
};
},
created() {
console.log("123", this.time);
},
methods: {
//
},
computed: {
// ,42
visibleCalendar() {
//
const { currentYear, currentMonth } = this;
const today = new Date();
today.setHours(0);
today.setMinutes(0);
today.setSeconds(0);
today.setMilliseconds(0);
const calendarArr = [];
//
const currentFirstDay = new Date(this.time.year, this.time.month, 1);
const currentFirstDay = new Date(currentYear, currentMonth, 1);
//
const weekDay = currentFirstDay.getDay();
//
const startDay = currentFirstDay - (weekDay - 1) * 24 * 3600 * 1000;
const startDay =
currentFirstDay - ((weekDay == 0 ? 7 : weekDay) - 1) * 24 * 3600 * 1000;
// 42
let calendarArr = [];
for (let i = 0; i < 42; i++) {
const date = new Date(startDay + i * 24 * 3600 * 1000);
const dateObj = new Date(startDay + i * 24 * 3600 * 1000);
const year = dateObj.getFullYear();
const month = dateObj.getMonth();
const date = dateObj.getDate();
const day = dateObj.getDay();
calendarArr.push({
date: new Date(startDay + i * 24 * 3600 * 1000),
year: date.getFullYear(),
month: date.getMonth(),
day: date.getDate(),
date,
year,
month,
day,
format: `${year}-${month + 1}-${date + 1}`,
//
thisMonth:
date.getFullYear() === today.getFullYear() &&
date.getMonth() === today.getMonth()
? "thisMonth"
: "",
thisMonth: year == currentYear && month == currentMonth,
//
isToday:
date.getFullYear() === today.getFullYear() &&
date.getMonth() === today.getMonth() &&
date.getDate() === today.getDate()
? "isToday"
: "",
year === today.getFullYear() &&
month === today.getMonth() &&
date === today.getDate(),
//
afterToday: date.getTime() >= today.getTime() ? "afterToday" : "",
afterToday: dateObj.getTime() >= today.getTime(),
});
}
return calendarArr;
},
},
watch: {
visibleCalendar(val) {
if (!this.currentDate) {
this.handleClickDate(
val.find((item) => item.isToday) ||
val.filter((item) => item.thisMonth)[0]
);
}
},
},
mounted() {
console.log("123", this.time);
},
methods: {
handleClickDate(item) {
console.log("点击日历日期", item);
this.currentDate = item.format;
this.$emit("clickDate", item);
},
},
};
</script>
<style lang="scss" scoped>
.top-con {
.m-calendar {
position: relative;
color: #333333;
&::after {
content: "";
z-index: 1;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
border-left: 1px solid #eee;
border-top: 1px solid #eee;
pointer-events: none;
}
.top-list {
display: flex;
align-items: center;
.top {
position: relative;
width: 14.285%;
background-color: rgb(242, 242, 242);
padding: 10px 0;
margin: 5px;
text-align: center;
background-color: #ffffff;
&::after {
content: "";
z-index: 1;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
border-right: 1px solid #eee;
pointer-events: none;
border-bottom: 1px solid #eee;
}
&.z-weekend {
color: #ff3333;
}
}
.date-con {
}
.date-list {
display: flex;
flex-wrap: wrap;
.date {
align-items: center;
.date-item {
position: relative;
width: 14.285%;
text-align: center;
padding: 5px;
.morning {
padding: 10px 0;
background-color: rgba(220, 245, 253, 0.3);
}
.evening {
padding: 10px 0;
background-color: rgba(220, 244, 209, 0.3);
box-sizing: border-box;
padding: 8px 0;
height: 90px;
background-color: #ffffff;
opacity: 0.5;
&::after {
content: "";
position: absolute;
z-index: 1;
top: 0;
left: 0;
right: 0;
bottom: 0;
border-right: 1px solid #eee;
border-bottom: 1px solid #eee;
pointer-events: none;
}
.date {
margin-bottom: 5px;
line-height: 30px;
font-size: 16px;
}
.thisMonth {
.morning {
background-color: rgb(220, 245, 253);
&.z-on {
z-index: 21;
box-shadow: 0 0 15px 5px #a8cee0;
.date {
font-size: 20px;
font-weight: bold;
}
.evening {
background-color: rgb(220, 244, 209);
}
&.z-this-month {
opacity: 1;
}
.isToday {
&.z-today {
.date {
font-weight: 700;
.morning {
background-color: rgb(169, 225, 243);
}
.evening {
background-color: rgb(193, 233, 175);
}
&.z-weekend {
.date {
color: #ff3333;
}
}
}
.tip-con {
margin-top: 51px;
.tip {
margin-top: 21px;
width: 100%;
}
}
</style>

329
src/views/modules/communityParty/calendar/index.vue

@ -1,6 +1,118 @@
<template>
<div class="g-cnt">
<calendar></calendar>
<el-row :gutter="15">
<el-col :span="6">
<div class="m-sizer">
<div class="item">
<el-cascader
v-model="fmData.party"
:options="partyOptions"
@change="handleChangeParty"
></el-cascader>
</div>
<div class="item">
<el-radio v-model="radio" label="1">备选项</el-radio>
<el-radio v-model="radio" label="2">备选项</el-radio>
</div>
</div>
<div class="m-date">
<div class="date-top">2222年2月22日</div>
<div class="date-big">22</div>
<div class="date-week">星期五</div>
</div>
<div class="m-list">
<div class="list-title">今日活动</div>
<div class="list">
<div class="item">
<div class="item-title">
不忘初心牢记使命巴巴爸爸不不嘻嘻 额阿发文发文额
</div>
<div class="item-prop">
<span>活动类型</span>
<span>发发发发发发付付</span>
</div>
<div class="item-prop">
<span>活动类型</span>
<span>发发发发发发付付</span>
</div>
<div class="item-prop">
<span>活动类型</span>
<span>发发发发发发付付</span>
</div>
<div class="item-prop">
<span>活动类型</span>
<span>发发发发发发付付</span>
</div>
<div class="item-ope">
<el-button type="primary" size="mini">发布</el-button>
<el-button type="success" size="mini">编辑</el-button>
<el-button size="mini">删除</el-button>
</div>
</div>
</div>
</div>
<div class="m-ope">
<el-button type="warning" style="width: 48%">添加活动计划</el-button>
<el-button style="width: 48%">添加日程</el-button>
</div>
</el-col>
<el-col :span="18">
<div class="m-cal">
<div class="hd">
<div class="hd-year">
<el-date-picker
v-model="currentYearStr"
value-format="yyyy"
type="year"
placeholder="选择年"
size="small"
style="width: 150px"
>
</el-date-picker>
</div>
<div class="hd-month">
<div
class="month-item"
:class="{ 'z-on': m - 1 == currentMonth }"
:key="'month' + m"
@click="currentMonth = m - 1"
v-for="m in 12"
>
<el-badge :value="12" :hidden="m != 3" class="item">
<div class="month-text">{{ m }}</div>
</el-badge>
</div>
</div>
<div class="hd-btn">
<el-button type="primary" size="small"
>批量生成年度报表</el-button
>
</div>
</div>
<calendar
:currentYear="currentYear"
:currentMonth="currentMonth"
@clickDate="handleChangeDate"
>
<template v-slot:date-item="{ info }">
<div class="tip">
<div class="tip-text">
<span class="z-on">主题当日</span> (已发布)
</div>
<div class="tip-cnt">巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉</div>
</div>
<div class="corn">
<div class="corn-num">8</div>
<div class="corn-text">日程</div>
</div>
</template>
</calendar>
</div>
</el-col>
</el-row>
</div>
</template>
@ -15,12 +127,36 @@ export default {
calendar,
},
data() {
return {};
let todayObj = new Date();
return {
currentYearStr: todayObj.getFullYear() + "",
currentMonth: todayObj.getMonth(),
partyOptions: [],
fmData: {
party: "",
},
};
},
computed: {
currentYear() {
return parseInt(this.currentYearStr);
},
},
async mounted() {
// await this.getPartyOggList()
},
methods: {
handleChangeParty() {},
handleChangeDate(item) {
console.log("handleChangeDate");
this.currentYearStr = item.year + "";
this.currentMonth = item.month;
},
async getPartyOggList() {
const url = "/resi/partymember/icPartyOrg/getSearchTreelist";
let params = {
@ -38,8 +174,197 @@ export default {
</script>
<style lang="scss" scoped>
@import "@/assets/scss/c/config.scss";
@import "@/assets/scss/c/function.scss";
$blue: #3e8ef7;
$red: #f33;
.g-cnt {
background-color: #ffffff;
padding: 20px;
}
.m-cal {
.hd {
display: flex;
margin-bottom: 20px;
.hd-month {
display: flex;
.month-item {
position: relative;
margin-left: 10px;
/deep/ .el-badge__content {
z-index: 1;
}
&.z-on {
.month-text {
background-color: $blue;
color: #ffffff;
}
}
.month-text {
position: relative;
z-index: 0;
width: 40px;
height: 30px;
text-align: center;
background-color: #eeeeee;
border-radius: 8px;
line-height: 30px;
font-size: 14px;
cursor: pointer;
}
}
}
.hd-btn {
margin-left: auto;
}
}
.tip {
position: relative;
margin: 0 3px;
padding: 3px 2px 3px 12px;
line-height: 16px;
box-shadow: 0 0 5px 1px #eee;
background-color: #ffffff;
font-size: 12px;
border-radius: 4px;
cursor: pointer;
color: #999999;
.z-on {
color: $red;
}
.tip-text {
@include toe;
text-align: left;
}
.tip-cnt {
@include toe;
text-align: left;
font-size: 10px;
}
&::before {
position: absolute;
content: "";
left: 4px;
top: 0;
bottom: 0;
margin: auto;
display: block;
width: 4px;
height: 4px;
border-radius: 100%;
background-color: $red;
}
}
.corn {
position: absolute;
right: 0;
top: 0;
color: #ffffff;
cursor: pointer;
.corn-num {
position: absolute;
z-index: 10;
top: -7px;
right: -7px;
border-radius: 100%;
width: 14px;
height: 14px;
line-height: 14px;
text-align: center;
font-size: 10px;
text-align: center;
color: #ffffff;
background-color: #f1ba06;
}
.corn-text {
position: relative;
z-index: 1;
font-size: 12px;
line-height: 18px;
padding-right: 3px;
}
&::before {
content: "";
display: block;
position: absolute;
z-index: 0;
top: 0;
right: 0;
width: 0px;
height: 0;
border-top: 17px solid #f33;
border-right: 25px solid #f33;
border-bottom: 17px solid transparent;
border-left: 25px solid transparent;
}
}
}
.m-sizer {
.item {
margin-bottom: 10px;
}
}
.m-date {
text-align: center;
color: $blue;
line-height: 1.5;
background-color: #f3f4f5;
padding: 20px;
.date-top {
font-size: 24px;
}
.date-big {
font-size: 100px;
}
.date-week {
font-size: 24px;
}
}
.m-list {
margin-top: 20px;
.list-title {
width: 100px;
text-align: center;
line-height: 24px;
background-color: $red;
color: #ffffff;
}
.list {
.item {
border-top: 1px solid #eee;
padding: 10px 0;
line-height: 1.5;
overflow: hidden;
.item-title {
font-weight: bold;
}
.item-prop {
margin: 4px 0;
}
.item-ope {
margin-top: 10px;
float: right;
}
}
}
}
.m-ope {
margin-top: 40px;
display: flex;
justify-content: space-between;
}
</style>

198
src/views/modules/cpts/baobiao/index.vue

@ -0,0 +1,198 @@
<template>
<el-dialog
:visible.sync="visible"
:title="'智能填表'"
:close-on-click-modal="true"
:close-on-press-escape="true"
width="850px"
:top="diaTop"
>
<el-table
v-loading="loading"
:data="list"
row-key="id"
border
:height="tableHeight"
style="width: 100%"
>
<el-table-column type="index" label="序号" width="50" />
<el-table-column
prop="reportName"
label="模板名称"
header-align="center"
min-width="150"
></el-table-column>
<el-table-column
label="操作"
fixed="right"
header-align="center"
align="center"
width="150"
>
<template slot-scope="scope">
<el-button type="text" size="small" @click="fillIn(scope.row)"
>填写</el-button
>
</template>
</el-table-column>
</el-table>
</el-dialog>
</template>
<script>
import { Loading } from "element-ui"; // Loading
import { requestPost, requestGet } from "@/js/dai/request";
import { mapGetters } from "vuex";
import axios from "axios";
export default {
data() {
return {
loading: false,
visible: false,
list: [], //
elseParams: {},
};
},
computed: {
tableHeight() {
// return this.resolution === 'small' ? this.clientHeight - 210 : this.clientHeight - 220
return this.clientHeight - 300;
},
diaWidth() {
return this.resolution === "small" ? 60 : 50;
},
diaHeight() {
return this.resolution === "small" ? 350 : 600;
},
diaTop() {
return this.resolution === "small" ? "30px" : "100px";
},
...mapGetters(["clientHeight", "resolution"]),
},
mounted() {},
methods: {
async existsTemplate(row) {
console.log("baobiao----------existsTemplate", row);
const { elseParams } = row;
this.list = [];
this.elseParams = { ...elseParams };
await this.getList();
return this.list.length > 0;
},
async init(row) {
console.log("baobiao----------init", row);
const { elseParams } = row;
this.visible = true;
this.elseParams = { ...elseParams };
this.list = [];
await this.getList();
},
//
async getList() {
this.loading = true;
const { elseParams } = this;
const { data, code, msg } = await requestPost(
"/oper/customize/icCustomerReport/report-list",
{
...elseParams,
}
);
this.loading = false;
if (code === 0) {
this.list = data.map((item) => {
return item;
});
} else {
this.$message.error(msg);
}
},
async fillIn(item) {
const { reportId, reportName } = item;
const url = "/oper/customize/icCustomerReport/preview";
const parmas = {
...this.elseParams,
reportId,
};
const { data, code, msg } = await requestPost(url, parmas);
if (code === 0) {
let token = localStorage.getItem("token");
let prefix = window.SITE_CONFIG["apiURL"].slice(0, -4);
if (!item.isList) {
this.exportAll(reportId, data.paramKey, reportName);
} else {
window.open(
`${prefix}/jmreport/view/${reportId}?token=${token}&paramKey=${data.paramKey}`
);
}
// this.visible = false;
this.$emit("afterFillIn");
} else {
this.$message.error(msg);
}
},
async exportAll(reportId, paramKey, reportName) {
const url = "/oper/customize/icCustomerReport/batch-export";
const loading = this.$loading({
lock: true,
text: "批量导出中",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.5)",
});
axios({
url: window.SITE_CONFIG["apiURL"] + url,
method: "post",
data: {
reportId,
paramKey,
},
responseType: "blob",
})
.then((res) => {
loading.close();
console.log("批量导出接口返回", res);
// let fileName = window.decodeURI(
// res.headers["content-disposition"].split(";")[1].split("=")[1]
// );
let fileName = reportName;
console.log("filename", fileName);
let blob = new Blob([res.data], { type: "application/zip" });
var url = window.URL.createObjectURL(blob);
var aLink = document.createElement("a");
aLink.style.display = "none";
aLink.href = url;
aLink.setAttribute("download", fileName);
document.body.appendChild(aLink);
aLink.click();
document.body.removeChild(aLink); //
window.URL.revokeObjectURL(url); //blob
})
.catch((err) => {
console.log("批量导出失败", err);
loading.close();
return this.$message.error("网络错误");
});
},
},
};
</script>
<style lang="scss" scoped></style>

8
src/views/modules/visual/cpts/map/index.vue

@ -560,13 +560,13 @@ export default {
},
updateGrid() {
const { polygonData } = this;
const { polygonData,polygonDotData } = this;
if (polygonLayer) {
polygonLayer.setData(polygonData);
lineLayer.setData(polygonData);
textLayer.setData(polygonData);
posLayer.setData(polygonData);
circleLayer.setData(polygonData);
textLayer.setData(polygonDotData);
posLayer.setData(polygonDotData);
circleLayer.setData(polygonDotData);
}
},

Loading…
Cancel
Save