Commit 5e56f7cd authored by 黄奎's avatar 黄奎

1

parent 5d6d05c4
...@@ -16,7 +16,8 @@ ...@@ -16,7 +16,8 @@
<div class="head-title"> <div class="head-title">
{{isCarrier?'载体管理':'楼宇管理'}} {{isCarrier?'载体管理':'楼宇管理'}}
<div> <div>
<el-button @click="checkAll=false,dialogVisible = true" style="float: right; margin-top: -25px" size="small" type="primary"> <el-button @click="checkAll=false,dialogVisible = true" style="float: right; margin-top: -25px" size="small"
type="primary">
批量导出 批量导出
</el-button> </el-button>
</div> </div>
...@@ -153,8 +154,8 @@ ...@@ -153,8 +154,8 @@
<el-table-column label="操作" width="100" fixed="right"> <el-table-column label="操作" width="100" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tooltip class="item" effect="dark" content="修改" placement="top"> <el-tooltip class="item" effect="dark" content="修改" placement="top">
<img @click="CommonJump('editVehicle', { ID: scope.row.ID,isCarrier:isCarrier?1:0 })" src="../../assets/img/userman/edit.png" <img @click="CommonJump('editVehicle', { ID: scope.row.ID,isCarrier:isCarrier?1:0 })"
alt="" /> src="../../assets/img/userman/edit.png" alt="" />
</el-tooltip> </el-tooltip>
<el-tooltip v-if="scope.row.IsChengDu==0" class="item" effect="dark" content="删除" placement="top"> <el-tooltip v-if="scope.row.IsChengDu==0" class="item" effect="dark" content="删除" placement="top">
<img @click="delManage(scope.row)" src="../../assets/img/userman/del.png" alt="" /> <img @click="delManage(scope.row)" src="../../assets/img/userman/del.png" alt="" />
...@@ -217,11 +218,11 @@ ...@@ -217,11 +218,11 @@
QEndDate: "", // 开业截止时间 QEndDate: "", // 开业截止时间
ExcelEnumIds: [], ExcelEnumIds: [],
UserId: 0, UserId: 0,
RandomNum:0,//随机数 RandomNum: 0, //随机数
CategoryId: 0,//分类Id CategoryId: 0, //分类Id
BuildingCarrierType: null,//(1-载体,2-楼宇) BuildingCarrierType: null, //(1-载体,2-楼宇)
OpeningStatus: -1,// 0-即将开业,1-已开业 OpeningStatus: -1, // 0-即将开业,1-已开业
QShopType: 0,//1-成都首店,2-宜宾商载通 QShopType: 0, //1-成都首店,2-宜宾商载通
}, },
usermsg: { usermsg: {
pageIndex: 1, pageIndex: 1,
...@@ -249,21 +250,34 @@ ...@@ -249,21 +250,34 @@
download_timer: null, //下载文件timer download_timer: null, //下载文件timer
loadingText: "", //下载文件提示名称 loadingText: "", //下载文件提示名称
isCarrier: true, isCarrier: true,
CategoryList:[], CategoryList: [],
ShopTypeList:[ ShopTypeList: [{
{Name: '成都首店',Id:1}, Name: '成都首店',
{Name: '宜宾商载通',Id:2}, Id: 1
},
{
Name: '宜宾商载通',
Id: 2
},
], ],
OpeningList: [ OpeningList: [{
{Name: '不限',Id:-1}, Name: '不限',
{Name: '即将开业',Id:0}, Id: -1
{Name: '已开业',Id:1}, },
{
Name: '即将开业',
Id: 0
},
{
Name: '已开业',
Id: 1
},
] ]
}; };
}, },
created() { created() {
this.isCarrier = this.$route.name=='BuildingServiceManager' this.isCarrier = this.$route.name == 'BuildingServiceManager'
this.msg.BuildingCarrierType = this.isCarrier?1:2 this.msg.BuildingCarrierType = this.isCarrier ? 1 : 2
this.getList(); this.getList();
this.getTypeEnumList(); this.getTypeEnumList();
this.getDown(); this.getDown();
...@@ -272,7 +286,7 @@ ...@@ -272,7 +286,7 @@
watch: { watch: {
$route: { $route: {
handler(val, oldVal) { handler(val, oldVal) {
this.isCarrier = val.name=='BuildingServiceManager' this.isCarrier = val.name == 'BuildingServiceManager'
this.msg = { this.msg = {
MetroName: "", //地铁站名称 MetroName: "", //地铁站名称
pageIndex: 1, pageIndex: 1,
...@@ -284,11 +298,11 @@ ...@@ -284,11 +298,11 @@
QEndDate: "", // 开业截止时间 QEndDate: "", // 开业截止时间
ExcelEnumIds: [], ExcelEnumIds: [],
UserId: 0, UserId: 0,
RandomNum:0,//随机数 RandomNum: 0, //随机数
CategoryId: 0,//分类Id CategoryId: 0, //分类Id
BuildingCarrierType: this.isCarrier?1:2,//(1-载体,2-楼宇) BuildingCarrierType: this.isCarrier ? 1 : 2, //(1-载体,2-楼宇)
OpeningStatus: -1,// 0-即将开业,1-已开业 OpeningStatus: -1, // 0-即将开业,1-已开业
QShopType: 0,//1-成都首店,2-宜宾商载通 QShopType: 0, //1-成都首店,2-宜宾商载通
} }
this.getList(); this.getList();
this.getTypeEnumList(); this.getTypeEnumList();
...@@ -345,12 +359,16 @@ ...@@ -345,12 +359,16 @@
downLoadCarrier() { downLoadCarrier() {
this.msg.ExcelEnumIds = this.checkedCities; this.msg.ExcelEnumIds = this.checkedCities;
let msg = JSON.parse(JSON.stringify(this.msg)); let msg = JSON.parse(JSON.stringify(this.msg));
msg.RandomNum=Math.random(); msg.RandomNum = Math.random();
if (!msg.Id || msg.Id == "") { if (!msg.Id || msg.Id == "") {
msg.Id = 0; msg.Id = 0;
} }
this.downLoadLoading = true; this.downLoadLoading = true;
this.loadingText = "正在生成楼宇文件,请勿关闭或刷新页面..."; if (this.isCarrier) {
this.loadingText = "正在生成商业载体文件,请勿关闭或刷新页面...";
} else {
this.loadingText = "正在生成楼宇文件,请勿关闭或刷新页面...";
}
var that = this; var that = this;
this.download_timer = setInterval(function () { this.download_timer = setInterval(function () {
that.checkCarrierFile(msg) that.checkCarrierFile(msg)
...@@ -358,15 +376,22 @@ ...@@ -358,15 +376,22 @@
}, },
checkCarrierFile(msg) { checkCarrierFile(msg) {
var fileName = "楼宇信息.xls"; var fileName = "楼宇信息.xls";
if (this.isCarrier) {
fileName = "商业载体信息.xls";
}
var that = this; var that = this;
this.apipost( this.apipost(
"/api/Trade/CheckCarrierFile", "/api/Trade/CheckBuildingCarrierFile",
msg, msg,
(res) => { (res) => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
clearInterval(this.download_timer); clearInterval(this.download_timer);
this.checkedCities = []; this.checkedCities = [];
this.loadingText = "正在下载楼宇文件,请勿关闭或刷新页面..."; if (this.isCarrier) {
this.loadingText = "正在下载商业载体文件,请勿关闭或刷新页面...";
} else {
this.loadingText = "正在下载楼宇文件,请勿关闭或刷新页面...";
}
var fileUrl = res.data.data.fileUrl; var fileUrl = res.data.data.fileUrl;
var filepath = res.data.data.filePath; var filepath = res.data.data.filePath;
var key = res.data.message; var key = res.data.message;
...@@ -385,7 +410,8 @@ ...@@ -385,7 +410,8 @@
responseType: 'arraybuffer', responseType: 'arraybuffer',
onDownloadProgress: (progressEvent) => { onDownloadProgress: (progressEvent) => {
const progress = Math.round((progressEvent.loaded / progressEvent.total) * 100); const progress = Math.round((progressEvent.loaded / progressEvent.total) * 100);
that.loadingText = `正在下载楼宇文件` + progress + `%,请勿关闭或刷新页面...`; that.loadingText = `正在下载【` + (that.isCarrier ? '商业载体' : "楼宇") + `】文件` + progress +
`%,请勿关闭或刷新页面...`;
// 在这里处理下载进度, 如更新界面上的进度条 // 在这里处理下载进度, 如更新界面上的进度条
} }
}).then((res) => { }).then((res) => {
...@@ -412,7 +438,7 @@ ...@@ -412,7 +438,7 @@
getDown() { getDown() {
this.cityOptions = []; this.cityOptions = [];
this.apipost("/api/Trade/GetCarrierExportEnumList", {}, (res) => { this.apipost("/api/Trade/GetBuildingCarrierExportEnumList", {}, (res) => {
this.cities = res.data.data; this.cities = res.data.data;
let data = res.data.data; let data = res.data.data;
data.forEach((item) => { data.forEach((item) => {
...@@ -453,7 +479,7 @@ ...@@ -453,7 +479,7 @@
} }
}); });
this.apipost("/api/Trade/GetBrandClassList", { this.apipost("/api/Trade/GetBrandClassList", {
BrandCategory: this.isCarrier?1:2 BrandCategory: this.isCarrier ? 1 : 2
}, (res) => { }, (res) => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.CategoryList = res.data.data; this.CategoryList = res.data.data;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment