Commit 57bb46b9 authored by zhengke's avatar zhengke

no message

parent 3e0433e5
...@@ -591,7 +591,6 @@ export default { ...@@ -591,7 +591,6 @@ export default {
this.getData(); this.getData();
} }
this.getTypeEnumList(); this.getTypeEnumList();
this.GetAuthenticationCategoryEnumList();
}, },
methods: { methods: {
//获取类型 //获取类型
......
<template>
<div v-loading="pageloading" class="editBrandEnter">
<div class="head-title">
<span @click="CommonJump('firmManager')" class="blue point"
>企业管理</span
>
/ <span>{{ID?'编辑':'新增'}}企业</span>
</div>
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="180px">
<el-card shadow="never" style="margin-top: 10px" class="box-card">
<el-form-item
:label="`企业名称`"
prop="Name"
class="is-required"
size="small"
>
<el-input
v-model="addMsg.Name"
:placeholder="`企业名称`"
maxlength="100"
style="width: 690px;"
/>
</el-form-item>
<!-- <el-form-item label="企业Logo" class="is-required" prop="Logo" size="small">
<el-button @click="type=1,choicImg=true" size="small">选择文件</el-button>
<div
class="app-gallery-item"
style="position: relative; width: 100px; margin-top: 10px"
>
<img
v-if="!addMsg.Logo || addMsg.Logo == ''"
src="../../assets/img/default.png"
style="width: 80px; height: 80px"
alt=""
/>
<el-image
v-else
style="width: 80px; height: 80px"
:src="addMsg.Logo"
:preview-src-list="LogoList"
>
</el-image>
</div>
</el-form-item> -->
<el-form-item :label="`企业图`" prop="BannerList">
<el-tooltip
class="item"
effect="dark"
content="第一张图片为封面图"
placement="top"
style="position: absolute; left: -5px; top: 12px"
>
<i class="el-tooltip el-icon-info"></i>
</el-tooltip>
<p style="color: #c9c9c9; margin: 0 0 12px 20px">
第一张图片为缩略图,其它图片为轮播图,建议像素750*750,最多支持上传9张
</p>
<div class="nav_Main">
<div class="nav_IconContent">
<draggable v-model="addMsg.BannerList">
<div
style="
position: relative;
margin-right: 20px;
display: inline-block;
"
v-for="(item, index) in addMsg.BannerList"
:key="index + '2'"
>
<el-image
style="width: 100px; height: 100px"
:src="item"
:preview-src-list="addMsg.BannerList"
>
</el-image>
<el-button
@click="ClearCarouse(index)"
class="delBtn"
type="danger"
icon="el-icon-close"
circle
>
</el-button>
</div>
</draggable>
</div>
<div
@click="type=2,choicImg=true"
v-if="addMsg.BannerList.length < 9"
class="add-image-btn 2222"
style="cursor: pointer"
>
+ 添加图片
</div>
</div>
</el-form-item>
<el-form-item :label="`企业简介`" class="ue-style" prop="Introduction">
<el-input
type="textarea"
:placeholder="`请输入企业简介`"
v-model="addMsg.Introduction"
maxlength="500"
show-word-limit
rows="8"
style="width: 690px;"
>
</el-input>
</el-form-item>
<el-form-item label="企业发展意向" prop="DevIntention">
<el-input
v-model="addMsg.DevIntention"
style="width: 690px"
size="small"
placeholder="请输入企业发展意向"
>
</el-input>
</el-form-item>
<el-form-item label="楼宇位置" prop="Address">
<el-input
v-model="addMsg.Address"
style="width: 690px"
size="small"
placeholder="请输入楼宇位置"
></el-input>
</el-form-item>
<el-form-item label="经纬度" style="margin-top: 15px" size="small">
<el-input
v-model="addMsg.LatAndLon"
style="width: 690px"
:disabled="true"
>
<el-button @click="isShowMap = true" slot="append"
>展开地图</el-button
>
</el-input>
</el-form-item>
<el-form-item label="投运时间" prop="OperationTime">
<el-date-picker
v-model="addMsg.OperationTime"
clearable
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
size="small"
type="datetime"
placeholder="请选择投运时间"
>
</el-date-picker>
</el-form-item>
<el-form-item label="楼宇等级" prop="CategoryId">
<el-select
v-model="addMsg.CategoryId"
size="small"
placeholder="请选择楼宇等级"
>
<el-option
v-for="item in CategoryList"
:key="item.ID"
:label="item.ClassName"
:value="item.ID"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="楼宇装修" prop="Renovation">
<el-input
v-model="addMsg.Renovation"
style="width: 690px"
size="small"
placeholder="请输入楼宇装修"
>
</el-input>
</el-form-item>
<el-form-item label="支付方式" prop="Payment">
<el-input
v-model="addMsg.Payment"
style="width: 690px"
size="small"
placeholder="请输入支付方式"
>
</el-input>
</el-form-item>
<el-form-item label="交房日期" prop="HandoverDate">
<el-date-picker
v-model="addMsg.HandoverDate"
clearable
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
size="small"
type="datetime"
placeholder="请选择交房日期"
>
</el-date-picker>
</el-form-item>
<el-form-item label="意向楼层" prop="IntentionalFloor">
<el-input
v-model="addMsg.IntentionalFloor"
style="width: 690px"
size="small"
placeholder="请输入意向楼层"
>
</el-input>
</el-form-item>
<el-form-item label="电梯数" prop="ElevatorNum">
<el-input
v-model="addMsg.ElevatorNum"
style="width: 690px"
size="small"
placeholder="请输入电梯数"
>
</el-input>
</el-form-item>
<el-form-item label="物业费(元)" prop="PropertyFee">
<el-input
v-model="addMsg.PropertyFee"
@keyup.native="checkPrice(addMsg, 'PropertyFee')"
style="width: 690px"
size="small"
placeholder="请输入物业费"
>
<template slot="append">㎡/月</template>
</el-input>
</el-form-item>
<el-form-item label="月租金(元)" prop="RentFee">
<el-input
v-model="addMsg.RentFee"
@keyup.native="checkPrice(addMsg, 'RentFee')"
style="width: 690px"
size="small"
placeholder="请输入月租金"
>
<template slot="append">㎡/月</template>
</el-input>
</el-form-item>
<el-form-item label="联系人名字" prop="ContactName">
<el-input
v-model="addMsg.ContactName"
style="width: 690px"
size="small"
placeholder="请输入楼负责人名字"
>
</el-input>
</el-form-item>
<el-form-item label="联系人电话" prop="ContactPhone">
<el-input
v-model="addMsg.ContactPhone"
style="width: 690px"
size="small"
placeholder="请输入楼负责人电话"
>
</el-input>
</el-form-item>
</el-card>
</el-form>
<div style="padding: 20px; background: #fff; margin-top: 10px">
<el-button @click="Save('addMsg')" size="small" type="primary"
>保存</el-button
>
</div>
<!-- 选择图片文件 -->
<el-dialog title="选择文件" :visible.sync="choicImg" width="1240px">
<ChooseImg @SelectId="SelectId"></ChooseImg>
</el-dialog>
<!-- 选择视频 -->
<el-dialog title="选择文件" :visible.sync="changeState1" width="1240px">
<Choosevideo @Selectvideo="Selectvideo"></Choosevideo>
</el-dialog>
<!-- 地图选址 -->
<el-dialog title="地图展示" :visible.sync="isShowMap" width="960px">
<commonMap @map-submit="mapEvent"></commonMap>
</el-dialog>
</div>
</template>
<script>
import ChooseImg from "@/components/global/ChooseImg.vue";
import Choosevideo from "@/components/global/Choosevideo.vue";
import commonMap from "@/components/common/commonMap.vue";
import draggable from "vuedraggable";
export default {
name: "editBrandEnter",
data() {
let validataType = (rule, value, callback) => {
if (this.addMsg.CategoryId == 0) {
return callback(new Error("请选择楼宇等级"));
} else {
callback();
}
};
let validataLogo = (rule, value, callback) => {
if (this.addMsg.BannerList == "") {
return callback(new Error("请上传企业图片"));
} else {
callback();
}
};
return {
pageloading: false,
addMsg: {
ServiceId: 0,
Name: "", //名称
Logo: "", //Logo
BannerList: [], //企业图
Introduction: "",//企业简介
DevIntention: "",//企业发展
Address: "",//楼宇位置
LatAndLon: "",//经纬度
OperationTime: "",//投运时间
CategoryId: 0,//楼宇等级
Renovation: "",//楼宇装修
Payment: "",//支付方式
HandoverDate: "",//交房日期
IntentionalFloor: null,//意向楼层
ElevatorNum: null,//电梯数
PropertyFee: null,//物业费
RentFee: null,//月租金
ContactName: "",//名字
ContactPhone: null,//电话
},
rules: {
BannerList: [
{
required: true,
validator: validataLogo,
trigger: "change",
},
],
Name: [
{
required: true,
message: "请输入企业名称",
trigger: "blur",
},
],
Logo: [
{
required: true,
message: "请选择Logo",
trigger: "blur",
},
],
Introduction: [
{
required: true,
message: "请输入企业简介",
trigger: "blur",
},
],
DevIntention: [
{
required: true,
message: "企业发展意向",
trigger: "blur",
},
],
Address: [
{
required: true,
message: "请输入楼宇位置",
trigger: "blur",
},
],
OperationTime: [
{
required: true,
message: "请选择投运时间",
trigger: "change",
},
],
CategoryId: [
{
required: true,
validator: validataType,
trigger: "change",
},
],
Renovation: [
{
required: true,
message: "请输入楼宇装修",
trigger: "blur",
},
],
Payment: [
{
required: true,
message: "请输入支付方式",
trigger: "blur",
},
],
HandoverDate: [
{
required: true,
message: "请选择交房日期",
trigger: "change",
},
],
IntentionalFloor: [
{
required: true,
message: "请输入意向楼层",
trigger: "blur",
},
],
ElevatorNum: [
{
required: true,
message: "请输入电梯数",
trigger: "blur",
},
],
PropertyFee: [
{
required: true,
message: "请输入物业费",
trigger: "blur",
},
],
RentFee: [
{
required: true,
message: "请输入月租金",
trigger: "blur",
},
],
ContactName: [
{
required: true,
message: "请输入楼负责人名字",
trigger: "blur",
},
],
ContactPhone: [
{
required: true,
message: "请输入楼负责人电话",
trigger: "blur",
},
],
},
ID: 0,
type: -1,
choicImg: false,
changeState1: false,
LogoList: [],
CategoryList: [],
isShowMap: false,
};
},
components: {
ChooseImg,
Choosevideo,
draggable,
commonMap,
},
created() {
this.addMsg.BrandEnterpriseType = 2
if (this.$route.query.ID) {
this.ID = this.$route.query.ID;
this.getData();
}
this.getTypeEnumList();
},
methods: {
//得到地图信息
mapEvent(e) {
this.addMsg.LatAndLon = e.lat + "," + e.long;
// this.addMsg.Address = e.Address;
this.isShowMap = false;
},
//获取类型
getTypeEnumList() {
this.apipost("/api/Trade/GetBrandClassList", {
BrandCategory: 2
}, (res) => {
if (res.data.resultCode == 1) {
this.CategoryList = res.data.data;
let obj = {
ClassName: "请选择",
ID: 0,
};
this.CategoryList.unshift(obj);
}
});
},
Save(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
this.apipost(
"/api/YBTrade/SetEnterpriseServicesInfo",
this.addMsg,
(res) => {
if (res.data.resultCode === 1) {
this.CommonJump('firmManager');
this.Success(res.data.message);
} else {
this.Error(res.data.message);
}
},
null
);
} else {
return false;
}
});
},
getData() {
this.pageloading = true;
this.apipost(
"/api/YBTrade/GetEnterpriseServicesInfo",
{
ServiceId: this.ID,
},
(res) => {
this.pageloading = false;
if (res.data.resultCode == 1) {
let data = res.data.data;
this.addMsg = res.data.data;
this.LogoList = [];
this.LogoList.push(this.addMsg.Logo);
} else {
this.Error(res.data.message);
}
}
);
},
//选择图片
SelectId(msg) {
if (this.type == 1) {
this.addMsg.Logo = this.getIconLink(msg.url);
}
if (this.type == 2) {
this.addMsg.BannerList.push(msg.url);
}
this.choicImg = false;
},
ClearCarouse(index) {
this.addMsg.BannerList.splice(index, 1);
},
Selectvideo(val) {
this.addMsg.VideoUrl = val.Path;
this.changeState1 = false;
},
},
};
</script>
<style>
.editBrandEnter .content {
background: #fff;
margin-top: 10px;
box-sizing: border-box;
}
.editBrandEnter .editIconImg {
width: 80px;
height: 80px;
}
.editBrandEnter .add-image-btn {
width: 100px;
height: 100px;
line-height: 100px;
color: #419efb;
border: 1px solid #e2e2e2;
cursor: pointer;
text-align: center;
}
.editBrandEnter .nav_Main {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
}
.editBrandEnter .nav_IconContent {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
}
/* .editBrandEnter .nav_IconContent div>div {
display: inline-block;
} */
.editBrandEnter .colapp-image {
background-size: cover;
background-position: center center;
width: 100px;
height: 100px;
border-radius: 0%;
}
.editBrandEnter .delBtn {
position: absolute;
right: -8px;
top: -8px;
padding: 4px 4px !important;
}
.delCarrClose {
position: absolute;
right: 53px;
top: 8px;
padding: 4px 4px !important;
}
</style>
<style>
.CarrierList {
border-bottom: 1px dashed #eee;
padding-bottom: 5px;
margin-bottom: 5px;
}
.CarrierList span {
display: inline-block;
margin-right: 10px;
}
</style>
<template>
<div class="VehicleManagement">
<div class="head-title">
企业管理
<div>
<el-button @click="checkAll=false,dialogVisible = true" style="float: right; margin-top: -25px" size="small"
type="primary">
批量导出
</el-button>
</div>
<div>
<el-button type="primary" style="float: right; margin: -25px 10px 0px 0px" class="el-button--small"
@click="CommonJump('firmEdit')">新增企业</el-button>
</div>
</div>
<div class="content">
<div>
<div class="searchInput" style="width: 250px; margin-bottom: 10px">
<el-input @keyup.enter.native="(msg.pageIndex = 1), getList()" @clear="(msg.pageIndex = 1), getList()"
style="display: inline-block; width: 225px; height: 30px" :placeholder="`企业名称`" v-model="msg.Name"
size="small" clearable>
</el-input>
<span @click="(msg.pageIndex = 1), getList()" class="el-icon-search" style="
color: #979dad;
font-size: 14px;
position: relative;
top: 1px;
"></span>
</div>
<div class="searchInput" style="width: 200px; margin-bottom: 10px">
<el-select size="small" v-model="msg.CategoryId" filterable
@change="(msg.pageIndex = 1), getList()" :placeholder="`楼宇等级`">
<el-option v-for="item in CategoryList" :key="item.ID" :label="item.ClassName" :value="item.ID">
</el-option>
</el-select>
</div>
</div>
<el-table :data="tableData" v-loading="loading" border style="width: 100%; margin: 20px 0">
<!-- <el-table-column prop="Id" label="ID" width="100">
<template slot-scope="scope">
<span @click="goRecruit(scope.row.ID)">{{ scope.row.ID }}</span>
</template>
</el-table-column> -->
<el-table-column prop="Name" :label="`企业名称`" fixed="left" width="150"></el-table-column>
<el-table-column prop="" label="封面" width="100">
<template slot-scope="scope">
<el-image v-if="scope.row.CoverImg" :src="scope.row.CoverImg" style="width: 50px"
:preview-src-list="scope.row.LogoList">
</el-image>
</template>
</el-table-column>
<el-table-column prop="Introduction" :label="`企业简介`" width="150"> </el-table-column>
<!-- <el-table-column prop="DevIntention" :label="`企业发展意向`" width="130"> </el-table-column> -->
<el-table-column prop="Address" :label="`楼宇位置`" width="150"> </el-table-column>
<el-table-column prop="OperationTime" :label="`投运时间`" width="120"> </el-table-column>
<el-table-column prop="CategoryName" :label="`楼宇等级`" width="150">
</el-table-column>
<el-table-column prop="Renovation" :label="`楼宇装修`"> </el-table-column>
<el-table-column prop="Payment" :label="`支付方式`" width="150"> </el-table-column>
<el-table-column prop="HandoverDate" :label="`交房日期`" width="120"> </el-table-column>
<el-table-column prop="IntentionalFloor" :label="`意向楼层`"> </el-table-column>
<el-table-column prop="ElevatorNum" :label="`电梯数`"> </el-table-column>
<el-table-column prop="PropertyFee" :label="`物业费(元)㎡/月`" width="150"> </el-table-column>
<el-table-column prop="RentFee" :label="`月租金(元)㎡/月`" width="150"> </el-table-column>
<el-table-column prop="" label="联系人" width="200">
<template slot-scope="scope">
<div>
姓名: {{scope.row.ContactName}}
</div>
<div>
电话: {{scope.row.ContactPhone}}
</div>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="120" v-if="!readonly">
<template slot-scope="scope">
<el-tooltip class="item" effect="dark" content="编辑" placement="top">
<img @click="CommonJump('firmEdit', { ID: scope.row.ServiceId })"
src="../../assets/img/setup/edit.png" alt="" class="imgstyle" />
</el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top">
<img @click="delManage(scope.row)" src="../../assets/img/setup/del.png" alt="" class="imgstyle" />
</el-tooltip>
</template>
</el-table-column>
</el-table>
<el-pagination style="text-align: right" background @current-change="handleCurrentChange"
:page-size="msg.pageSize" :current-page.sync="msg.pageIndex" layout="total,prev, pager, next" :total="total">
</el-pagination>
</div>
<!-- 选择导出信息 -->
<el-dialog title="选择导出信息" :visible.sync="dialogVisible" width="960px">
<div v-loading="downLoadLoading" :element-loading-text="loadingText">
<el-form style="border: 1px solid #f0f2f7" :model="addMsg" ref="addMsg" label-width="100px">
<div style="
box-sizing: border-box;
background-color: #f3f5f6;
width: 100%;
padding-left: 20px;
height: 50px;
line-height: 50px;
">
<el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">全选
</el-checkbox>
</div>
<div style="margin: 15px 0"></div>
<div style="padding: 10px 25px 20px">
<el-checkbox-group v-model="checkedCities" @change="handleCheckedCitiesChange">
<el-checkbox style="margin-bottom: 10px; width: 135px" v-for="city in cities" :label="city.Id"
:key="city.Name">
{{ city.Name }}</el-checkbox>
</el-checkbox-group>
</div>
</el-form>
<div style="text-align: right; margin-top: 20px">
<el-button size="small" type="primary" @click="downLoadCarrier">导出</el-button>
</div>
</div>
</el-dialog>
</div>
</template>
<script>
import {
setInterval,
clearInterval
} from 'timers';
export default {
data() {
return {
msg: {
Name: "", //名称
pageIndex: 1,
pageSize: 15,
CategoryId: 0, //楼宇等级
},
addMsg: {},
dialogVisible: false,
dateStr: [], //日期
total: 0,
tableData: [], //数据列表
isShowAdd: false, //新增修改载体
ProjectTypeList: [], //项目类型
checkAll: false,
checkedCities: [],
cities: [],
cityOptions: [],
isIndeterminate: false,
downLoadLoading: false, //导出Loading
download_timer: null, //下载文件timer
loadingText: "", //下载文件提示名称
CategoryList: [],
readonly: false,
};
},
created() {
if (this.$route.query && this.$route.query.readonly) {
this.readonly = this.$route.query.readonly;
}
this.msg.BrandEnterpriseType = 2
this.getList();
this.getTypeEnumList();
this.getDown();
},
watch: {
$route: {
handler(val, oldVal) {
if (this.$route.query && this.$route.query.readonly) {
this.readonly = this.$route.query.readonly;
}
},
deep: true,
},
},
methods: {
getList() {
this.loading = true;
this.apipost("/api/YBTrade/GetEnterpriseServicesPage", this.msg, (res) => {
this.loading = false;
if (res.data.resultCode == 1) {
this.total = res.data.data.count;
let pageData = res.data.data.pageData;
this.tableData = pageData;
this.tableData.forEach((x) => {
x.LogoList = [];
x.LogoList.push(x.CoverImg);
});
}
});
},
handleCheckAllChange(val) {
this.checkedCities = val ? this.cityOptions : [];
this.isIndeterminate = false;
},
handleCheckedCitiesChange(value) {
let checkedCount = value.length;
this.checkAll = checkedCount === this.cities.length;
this.isIndeterminate =
checkedCount > 0 && checkedCount < this.cities.length;
},
//下载载体文件
downLoadCarrier() {
this.msg.ExcelEnumIds = this.checkedCities;
let msg = JSON.parse(JSON.stringify(this.msg));
msg.RandomNum = Math.random();
if (!msg.Id || msg.Id == "") {
msg.Id = 0;
}
this.downLoadLoading = true;
this.loadingText = "正在生成企业文件,请勿关闭或刷新页面...";
var that = this;
this.download_timer = setInterval(function () {
that.checkCarrierFile(msg)
}, 2000);
},
checkCarrierFile(msg) {
var fileName = "企业信息.xls";
var that = this;
this.apipost(
"/api/Trade/CheckBuildingCarrierFile",
msg,
(res) => {
if (res.data.resultCode == 1) {
clearInterval(this.download_timer);
this.checkedCities = [];
this.loadingText = "正在下载企业文件,请勿关闭或刷新页面...";
var fileUrl = res.data.data.fileUrl;
var filepath = res.data.data.filePath;
var key = res.data.message;
var params = {
fileUrl: fileUrl
}
//删除缓存和Key
var deleteparams = {
key: key,
fileUrl: fileUrl,
filepath: filepath,
};
var apiurl = that.domainManager().DomainUrl + "/api/Trade/GetFile";
var postData = that.GetPostData("", params, "");
that.$http.post(apiurl, postData, {
responseType: 'arraybuffer',
onDownloadProgress: (progressEvent) => {
const progress = Math.round((progressEvent.loaded / progressEvent.total) * 100);
that.loadingText = `正在下载【` + "企业" + `】文件` + progress +
`%,请勿关闭或刷新页面...`;
// 在这里处理下载进度, 如更新界面上的进度条
}
}).then((res) => {
let blob = new Blob([res.data], {
type: "application/vnd.ms-excel"
})
let url = URL.createObjectURL(blob);
let link = document.createElement('a');
link.href = url;
link.setAttribute("download", fileName);
document.body.appendChild(link);
link.click();
that.downLoadLoading = false;
that.loadingText = "";
that.apipost("/api/Trade/DeleteKey", deleteparams, (res) => {})
that.dialogVisible = false;
}).catch(function (res) {
console.log(res);
});
}
}
);
},
getDown() {
this.cityOptions = [];
this.apipost("/api/Trade/GetBuildingCarrierExportEnumList", {}, (res) => {
this.cities = res.data.data;
let data = res.data.data;
data.forEach((item) => {
this.cityOptions.push(item.Id);
});
});
},
//删除
delManage(obj) {
let that = this;
that.Confirm("是否删除?", function () {
that.apipost(
"/api/YBTrade/RemoveEnterpriseServicesInfo", {
ServiceId: obj.ServiceId,
},
(res) => {
if (res.data.resultCode == 1) {
that.Success(res.data.message);
that.getList();
} else {
that.Error(res.data.message);
}
}
);
});
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
//获取项目类型
getTypeEnumList() {
this.apipost("/api/Trade/GetProjectTypeEnumList", {}, (res) => {
if (res.data.resultCode == 1) {
this.ProjectTypeList = res.data.data;
}
});
this.apipost("/api/Trade/GetBrandClassList", {
BrandCategory: 2
}, (res) => {
if (res.data.resultCode == 1) {
this.CategoryList = res.data.data;
let obj = {
ClassName: "不限",
ID: 0,
};
this.CategoryList.unshift(obj);
}
});
},
//获取项目类型
getProject(type) {
let str = "";
this.ProjectTypeList.forEach((x) => {
if (x.Id == type) {
str = x.Name;
}
});
return str;
},
},
mounted() {},
};
</script>
<style>
.VehicleManagement .content .searchInput {
border: 1px solid #dcdfe6;
border-radius: 4px;
}
.VehicleManagement .content .searchInput .el-input__inner {
border: none;
outline: none;
height: 30px;
line-height: 30px;
}
.VehicleManagement .content .searchInput {
line-height: normal;
display: inline-table;
width: 100%;
border-collapse: separate;
border-spacing: 0;
width: 250px;
margin-right: 20px;
}
.VehicleManagement .content {
background: #fff;
margin-top: 10px;
padding: 20px;
box-sizing: border-box;
}
</style>
<style>
.CarrierList {
border-bottom: 1px dashed #eee;
padding-bottom: 5px;
margin-bottom: 5px;
}
.CarrierList span {
display: inline-block;
margin-right: 10px;
}
</style>
<template>
<div class="VehicleManagement">
<div class="head-title">
楼宇管理
<div>
<el-button @click="checkAll=false,dialogVisible = true" style="float: right; margin-top: -25px" size="small"
type="primary">
批量导出
</el-button>
</div>
<div>
<el-button type="primary" style="float: right; margin: -25px 10px 0px 0px" class="el-button--small"
@click="CommonJump('tenementVehicle')">新增楼宇</el-button>
</div>
</div>
<div class="content">
<div>
<div class="searchInput" style="width: 250px; margin-bottom: 10px">
<el-input @keyup.enter.native="(msg.pageIndex = 1), getList()" @clear="(msg.pageIndex = 1), getList()"
style="display: inline-block; width: 225px; height: 30px" placeholder="楼宇名称" v-model="msg.Name"
size="small" clearable>
</el-input>
<span @click="(msg.pageIndex = 1), getList()" class="el-icon-search" style="
color: #979dad;
font-size: 14px;
position: relative;
top: 1px;
"></span>
</div>
<div class="searchInput" style="width: 250px; margin-bottom: 10px">
<el-input @keyup.enter.native="(msg.pageIndex = 1), getList()" @clear="(msg.pageIndex = 1), getList()"
style="display: inline-block; width: 225px; height: 30px" placeholder="地址" v-model="msg.Address"
size="small" clearable>
</el-input>
<span @click="(msg.pageIndex = 1), getList()" class="el-icon-search" style="
color: #979dad;
font-size: 14px;
position: relative;
top: 1px;
"></span>
</div>
<div class="searchInput" style="width: 200px; margin-bottom: 10px">
<el-select size="small" v-model="msg.CategoryId" filterable
@change="(msg.pageIndex = 1), getList()" placeholder="请选择楼宇等级">
<el-option v-for="item in CategoryList" :key="item.ID" :label="item.ClassName" :value="item.ID">
</el-option>
</el-select>
</div>
<!-- <div class="searchInput" style="width: 200px; margin-bottom: 10px">
<el-select size="small" v-model="msg.OpeningStatus" filterable
@change="(msg.pageIndex = 1), getList()" placeholder="请选择状态">
<el-option v-for="item in OpeningList" :key="item.Id" :label="item.Name" :value="item.Id">
</el-option>
</el-select>
</div>
<el-date-picker class="indataPicker" type="daterange" v-model="dateStr" range-separator="至"
start-placeholder="运营日期" end-placeholder="运营日期" size="small" @change="getList" value-format="yyyy-MM-dd">
</el-date-picker> -->
</div>
<el-table :data="tableData" v-loading="loading" border style="width: 100%; margin: 20px 0">
<el-table-column prop="Name" width="200" label="楼宇名称">
</el-table-column>
<el-table-column prop="" width="100" label="封面">
<template slot-scope="scope">
<el-image v-if="scope.row.CoverImg" :src="scope.row.CoverImg" style="width: 50px"
:preview-src-list="scope.row.LogoList">
</el-image>
</template>
</el-table-column>
<el-table-column prop="Address" width="200" label="楼宇位置">
</el-table-column>
<el-table-column prop="ConstructionTime" width="180" label="建设时间">
</el-table-column>
<el-table-column prop="OperationTime" width="180" label="投运时间">
</el-table-column>
<el-table-column prop="" min-width="200" label="楼宇等级">
<template slot-scope="scope">
{{ scope.row.CategoryName }}
</template>
</el-table-column>
<!-- <el-table-column prop="Areas" width="150" label="楼宇建筑面积(㎡)">
</el-table-column> -->
<el-table-column prop="BuildingNum" width="" label="楼栋数量">
</el-table-column>
<el-table-column prop="FloorNum" width="" label="楼层量">
</el-table-column>
<!-- <el-table-column prop="ElevatorNum" width="" label="电梯数">
</el-table-column>
<el-table-column prop="FloorHeight" width="" label="层高">
</el-table-column> -->
<el-table-column prop="Developers" width="200" label="开发商">
</el-table-column>
<!-- <el-table-column prop="PropertyComp" width="200" label="物业公司">
</el-table-column> -->
<el-table-column prop="SaleOrSelf" width="120" label="销售/自持比例">
</el-table-column>
<el-table-column prop="" width="110" label="是否统一运营">
<template slot-scope="scope">
{{scope.row.IsAllOperate?'是':'否'}}
</template>
</el-table-column>
<el-table-column prop="PropertyFee" width="130" label="物业费(元)㎡/月">
</el-table-column>
<el-table-column prop="RentFee" width="140" label="月租金(元)㎡/月">
</el-table-column>
<el-table-column prop="IndustryDirection" width="120" label="拟主导产业方向">
</el-table-column>
<el-table-column prop="BrandDemand" width="140" label="目标企业招引需求">
</el-table-column>
<!-- <el-table-column prop="Other" width="" label="其他需求">
</el-table-column> -->
<el-table-column prop="" width="200" label="楼负责人">
<template slot-scope="scope">
<div>
姓名: {{scope.row.ContactName}}
</div>
<div>
电话: {{scope.row.ContactPhone}}
</div>
</template>
</el-table-column>
<el-table-column label="操作" width="100" fixed="right">
<template slot-scope="scope">
<el-tooltip class="item" effect="dark" content="修改" placement="top">
<img @click="CommonJump('tenementVehicle', { ID: scope.row.BuildId})"
src="../../assets/img/userman/edit.png" alt="" />
</el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top">
<img @click="delManage(scope.row)" src="../../assets/img/userman/del.png" alt="" />
</el-tooltip>
</template>
</el-table-column>
</el-table>
<el-pagination style="text-align: right" background @current-change="handleCurrentChange"
:page-size="msg.pageSize" :current-page.sync="msg.pageIndex" layout="total,prev, pager, next" :total="total">
</el-pagination>
</div>
<!-- 选择导出信息 -->
<el-dialog title="选择导出信息" :visible.sync="dialogVisible" width="960px">
<div v-loading="downLoadLoading" :element-loading-text="loadingText">
<el-form style="border: 1px solid #f0f2f7" :model="addMsg" ref="addMsg" label-width="100px">
<div style="
box-sizing: border-box;
background-color: #f3f5f6;
width: 100%;
padding-left: 20px;
height: 50px;
line-height: 50px;
">
<el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">全选
</el-checkbox>
</div>
<div style="margin: 15px 0"></div>
<div style="padding: 10px 25px 20px">
<el-checkbox-group v-model="checkedCities" @change="handleCheckedCitiesChange">
<el-checkbox style="margin-bottom: 10px; width: 135px" v-for="city in cities" :label="city.Id"
:key="city.Name">
{{ city.Name }}</el-checkbox>
</el-checkbox-group>
</div>
</el-form>
<div style="text-align: right; margin-top: 20px">
<el-button size="small" type="primary" @click="downLoadCarrier">导出</el-button>
</div>
</div>
</el-dialog>
</div>
</template>
<script>
import {
setInterval,
clearInterval
} from 'timers';
export default {
data() {
return {
msg: {
pageIndex: 1,
pageSize: 15,
Name: "", //名称
Address: "", //地址
CategoryId: 0, //分类Id
},
usermsg: {
pageIndex: 1,
pageSize: 20,
Name: '',
Source: 0,
MemberGrade: 0,
Id: 0,
Moblie: ''
},
userList: [],
addMsg: {},
dialogVisible: false,
dateStr: [], //日期
total: 0,
tableData: [], //数据列表
isShowAdd: false, //新增修改载体
ProjectTypeList: [], //项目类型
checkAll: false,
checkedCities: [],
cities: [],
cityOptions: [],
isIndeterminate: false,
downLoadLoading: false, //导出Loading
download_timer: null, //下载文件timer
loadingText: "", //下载文件提示名称
CategoryList: [],
ShopTypeList: [{
Name: '成都首店',
Id: 1
},
{
Name: '宜宾商载通',
Id: 2
},
],
OpeningList: [{
Name: '不限',
Id: -1
},
{
Name: '即将投运',
Id: 0
},
{
Name: '已投运',
Id: 1
},
]
};
},
created() {
this.getList();
this.getTypeEnumList();
this.getDown();
this.getuserList()
},
watch: {
$route: {
handler(val, oldVal) {
},
deep: true,
},
},
methods: {
ChangeListName(val) {
this.usermsg.Name = val;
this.getuserList();
},
getuserList() {
this.apipost("/api/user/GetMemberUserDropDownList", this.usermsg, res => {
if (res.data.resultCode == 1) {
let pageData = res.data.data.pageData;
this.userList = pageData;
}
})
},
getList() {
this.loading = true;
// if (this.dateStr && this.dateStr.length > 0) {
// this.msg.QStartDate = this.dateStr[0];
// this.msg.QEndDate = this.dateStr[1];
// } else {
// this.msg.QStartDate = "";
// this.msg.QEndDate = "";
// }
this.apipost("/api/YBTrade/GetBuildingPage", this.msg, (res) => {
this.loading = false;
if (res.data.resultCode == 1) {
this.total = res.data.data.count;
let pageData = res.data.data.pageData;
this.tableData = pageData;
this.tableData.forEach((x) => {
x.LogoList = [];
x.LogoList.push(x.CoverImg);
});
}
});
},
handleCheckAllChange(val) {
this.checkedCities = val ? this.cityOptions : [];
this.isIndeterminate = false;
},
handleCheckedCitiesChange(value) {
let checkedCount = value.length;
this.checkAll = checkedCount === this.cities.length;
this.isIndeterminate =
checkedCount > 0 && checkedCount < this.cities.length;
},
//下载载体文件
downLoadCarrier() {
this.msg.ExcelEnumIds = this.checkedCities;
let msg = JSON.parse(JSON.stringify(this.msg));
msg.RandomNum = Math.random();
if (!msg.Id || msg.Id == "") {
msg.Id = 0;
}
this.downLoadLoading = true;
this.loadingText = "正在生成楼宇文件,请勿关闭或刷新页面...";
var that = this;
this.download_timer = setInterval(function () {
that.checkCarrierFile(msg)
}, 2000);
},
checkCarrierFile(msg) {
var fileName = "楼宇信息.xls";
var that = this;
this.apipost(
"/api/Trade/CheckBuildingCarrierFile",
msg,
(res) => {
if (res.data.resultCode == 1) {
clearInterval(this.download_timer);
this.checkedCities = [];
this.loadingText = "正在下载楼宇文件,请勿关闭或刷新页面...";
var fileUrl = res.data.data.fileUrl;
var filepath = res.data.data.filePath;
var key = res.data.message;
var params = {
fileUrl: fileUrl
}
//删除缓存和Key
var deleteparams = {
key: key,
fileUrl: fileUrl,
filepath: filepath,
};
var apiurl = that.domainManager().DomainUrl + "/api/Trade/GetFile";
var postData = that.GetPostData("", params, "");
that.$http.post(apiurl, postData, {
responseType: 'arraybuffer',
onDownloadProgress: (progressEvent) => {
const progress = Math.round((progressEvent.loaded / progressEvent.total) * 100);
that.loadingText = `正在下载【` + "楼宇" + `】文件` + progress +
`%,请勿关闭或刷新页面...`;
// 在这里处理下载进度, 如更新界面上的进度条
}
}).then((res) => {
let blob = new Blob([res.data], {
type: "application/vnd.ms-excel"
})
let url = URL.createObjectURL(blob);
let link = document.createElement('a');
link.href = url;
link.setAttribute("download", fileName);
document.body.appendChild(link);
link.click();
that.downLoadLoading = false;
that.loadingText = "";
that.apipost("/api/Trade/DeleteKey", deleteparams, (res) => {})
that.dialogVisible = false;
}).catch(function (res) {
console.log(res);
});
}
}
);
},
getDown() {
this.cityOptions = [];
this.apipost("/api/Trade/GetBuildingCarrierExportEnumList", {}, (res) => {
this.cities = res.data.data;
let data = res.data.data;
data.forEach((item) => {
this.cityOptions.push(item.Id);
});
});
},
//删除
delManage(obj) {
let that = this;
that.Confirm("是否删除?", function () {
that.apipost(
"/api/YBTrade/RemoveBuildingInfo", {
BuildId: obj.BuildId,
},
(res) => {
if (res.data.resultCode == 1) {
that.Success(res.data.message);
that.getList();
} else {
that.Error(res.data.message);
}
}
);
});
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
//获取项目类型
getTypeEnumList() {
this.apipost("/api/Trade/GetProjectTypeEnumList", {}, (res) => {
if (res.data.resultCode == 1) {
this.ProjectTypeList = res.data.data;
}
});
this.apipost("/api/Trade/GetBrandClassList", {
BrandCategory: 2
}, (res) => {
if (res.data.resultCode == 1) {
this.CategoryList = res.data.data;
let obj = {
ClassName: "不限",
ID: 0,
};
this.CategoryList.unshift(obj);
}
});
},
//获取项目类型
getProject(type) {
let str = "";
this.ProjectTypeList.forEach((x) => {
if (x.Id == type) {
str = x.Name;
}
});
return str;
},
},
mounted() {},
};
</script>
<style>
.VehicleManagement .content .searchInput {
border: 1px solid #dcdfe6;
border-radius: 4px;
}
.VehicleManagement .content .searchInput .el-input__inner {
border: none;
outline: none;
height: 30px;
line-height: 30px;
}
.VehicleManagement .content .searchInput {
line-height: normal;
display: inline-table;
width: 100%;
border-collapse: separate;
border-spacing: 0;
width: 250px;
margin-right: 20px;
}
.VehicleManagement .content {
background: #fff;
margin-top: 10px;
padding: 20px;
box-sizing: border-box;
}
</style>
<template>
<div v-loading="pageloading" class="editVehicle">
<div class="head-title">
<span @click="CommonJump('tenementManager')" class="blue point"
>楼宇管理</span
>
/ <span>{{ID?'编辑':'新增'}}楼宇</span>
</div>
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="180px">
<el-card shadow="never" style="margin-top: 10px" class="box-card">
<el-form-item label="楼宇名称" prop="Name">
<el-input
v-model="addMsg.Name"
style="width: 690px"
placeholder="请输入楼宇名称"
size="small"
>
</el-input>
</el-form-item>
<el-form-item label="楼宇图(多张)" class="is-required">
<div class="nav_Main">
<div class="nav_IconContent">
<draggable v-model="introImgList">
<div
v-for="(item, index) in introImgList"
:key="index + '2'"
style="
margin-right: 20px;
position: relative;
display: inline-block;
"
>
<el-image
style="width: 100px; height: 100px"
:src="item"
:preview-src-list="introImgList"
>
</el-image>
<el-button
@click="type=2,ClearCarouse(index)"
class="delBtn"
type="danger"
icon="el-icon-close"
circle
>
</el-button>
</div>
</draggable>
</div>
<div
@click="(choicImg = true), (type = 2)"
class="add-image-btn 2222"
>
+ 添加图片
</div>
</div>
</el-form-item>
<el-form-item label="楼宇位置" prop="Address">
<el-input
v-model="addMsg.Address"
style="width: 690px"
size="small"
placeholder="请输入楼宇位置"
></el-input>
</el-form-item>
<el-form-item label="经纬度" style="margin-top: 15px" size="small">
<el-input
v-model="addMsg.LatAndLon"
style="width: 690px"
:disabled="true"
>
<el-button @click="isShowMap = true" slot="append"
>展开地图</el-button
>
</el-input>
</el-form-item>
<el-form-item label="建设时间" prop="ConstructionTime">
<el-date-picker
v-model="addMsg.ConstructionTime"
clearable
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
size="small"
type="datetime"
placeholder="请选择建设时间"
>
</el-date-picker>
</el-form-item>
<el-form-item label="投运时间" prop="OperationTime">
<el-date-picker
v-model="addMsg.OperationTime"
clearable
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
size="small"
type="datetime"
placeholder="请选择投运时间"
>
</el-date-picker>
</el-form-item>
<el-form-item label="楼宇等级" prop="CategoryId">
<el-select
v-model="addMsg.CategoryId"
size="small"
placeholder="请选择楼宇等级"
>
<el-option
v-for="item in CategoryList"
:key="item.ID"
:label="item.ClassName"
:value="item.ID"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="楼宇建筑面积" prop="Areas">
<el-input
v-model="addMsg.Areas"
@keyup.native="checkPrice(addMsg, 'Areas')"
style="width: 690px"
size="small"
placeholder="请输入楼宇建筑面积"
>
<template slot="append"></template>
</el-input>
</el-form-item>
<el-form-item label="楼栋数量" prop="BuildingNum">
<el-input
v-model="addMsg.BuildingNum"
@keyup.native="checkPrice(addMsg, 'BuildingNum')"
style="width: 690px"
size="small"
placeholder="请输入楼栋数量"
>
</el-input>
</el-form-item>
<el-form-item label="楼层量" prop="FloorNum">
<el-input
v-model="addMsg.FloorNum"
@keyup.native="checkPrice(addMsg, 'FloorNum')"
style="width: 690px"
size="small"
placeholder="请输入楼层量"
>
</el-input>
</el-form-item>
<el-form-item label="电梯数" prop="ElevatorNum">
<el-input
v-model="addMsg.ElevatorNum"
@keyup.native="checkPrice(addMsg, 'ElevatorNum')"
style="width: 690px"
size="small"
placeholder="请输入电梯数"
>
</el-input>
</el-form-item>
<el-form-item label="层高" prop="FloorHeight">
<el-input
v-model="addMsg.FloorHeight"
@keyup.native="checkPrice(addMsg, 'FloorHeight')"
style="width: 690px"
size="small"
placeholder="请输入层高"
>
<template slot="append">m</template>
</el-input>
</el-form-item>
<el-form-item label="开发商" prop="Developers">
<el-input
v-model="addMsg.Developers"
style="width: 690px"
size="small"
placeholder="请输入开发商"
></el-input>
</el-form-item>
<el-form-item label="物业公司" prop="PropertyComp">
<el-input
v-model="addMsg.PropertyComp"
style="width: 690px"
size="small"
placeholder="请输入物业公司"
>
</el-input>
</el-form-item>
<el-form-item label="销售/自持比例" prop="SaleOrSelf">
<el-input
v-model="addMsg.SaleOrSelf"
style="width: 690px"
size="small"
placeholder="请输入销售/自持比例"
>
</el-input>
</el-form-item>
<el-form-item label="是否统一运营" prop="">
<el-switch
v-model="addMsg.IsAllOperate"
:active-value="Number(1)"
:inactive-value="Number(0)">
</el-switch>
</el-form-item>
<el-form-item label="物业费(元)" prop="PropertyFee">
<el-input
v-model="addMsg.PropertyFee"
@keyup.native="checkPrice(addMsg, 'PropertyFee')"
style="width: 690px"
size="small"
placeholder="请输入物业费"
>
<template slot="append">㎡/月</template>
</el-input>
</el-form-item>
<el-form-item label="月租金(元)" prop="RentFee">
<el-input
v-model="addMsg.RentFee"
@keyup.native="checkPrice(addMsg, 'Areas')"
style="width: 690px"
size="small"
placeholder="请输入月租金"
>
<template slot="append">㎡/月</template>
</el-input>
</el-form-item>
<el-form-item label="拟主导产业方向" prop="IndustryDirection">
<el-input
type="textarea"
v-model="addMsg.IndustryDirection"
show-word-limit
rows="4"
style="width: 690px"
size="small"
placeholder="请输入拟主导产业方向"
>
</el-input>
</el-form-item>
<el-form-item label="目标企业招引需求" prop="BrandDemand">
<el-input
type="textarea"
v-model="addMsg.BrandDemand"
show-word-limit
rows="4"
style="width: 690px"
size="small"
placeholder="请输入目标企业招引需求"
>
</el-input>
</el-form-item>
<el-form-item label="其他需求" prop="">
<el-input
type="textarea"
v-model="addMsg.Other"
show-word-limit
rows="4"
style="width: 690px"
size="small"
placeholder="请输入其他需求"
>
</el-input>
</el-form-item>
<el-form-item label="楼负责人名字" prop="ContactName">
<el-input
v-model="addMsg.ContactName"
style="width: 690px"
size="small"
placeholder="请输入楼负责人名字"
>
</el-input>
</el-form-item>
<el-form-item label="楼负责人电话" prop="ContactPhone">
<el-input
v-model="addMsg.ContactPhone"
@keyup.native="checkPrice(addMsg, 'ContactPhone')"
style="width: 690px"
size="small"
placeholder="请输入楼负责人电话"
>
</el-input>
</el-form-item>
</el-card>
</el-form>
<div style="padding: 20px; background: #fff; margin-top: 10px">
<el-button @click="Save('addMsg')" size="small" type="primary"
>保存</el-button
>
</div>
<!-- 选择图片文件 -->
<el-dialog title="选择文件" :visible.sync="choicImg" width="1240px">
<ChooseImg @SelectId="SelectId"></ChooseImg>
</el-dialog>
<!-- 选择视频 -->
<el-dialog title="选择文件" :visible.sync="changeState1" width="1240px">
<Choosevideo @Selectvideo="Selectvideo"></Choosevideo>
</el-dialog>
<!-- 地图选址 -->
<el-dialog title="地图展示" :visible.sync="isShowMap" width="960px">
<commonMap @map-submit="mapEvent"></commonMap>
<!-- <baiduMap ></baiduMap> -->
</el-dialog>
</div>
</template>
<script>
import ChooseImg from "@/components/global/ChooseImg.vue";
import Choosevideo from "@/components/global/Choosevideo.vue";
import commonMap from "@/components/common/commonMap.vue";
import draggable from "vuedraggable";
export default {
name: "editVehicle",
data() {
let validataType = (rule, value, callback) => {
if (this.addMsg.ProjectType == 0) {
return callback(new Error("请选择项目类型"));
} else {
callback();
}
};
let validataLogo = (rule, value, callback) => {
if (this.addMsg.Logo == "") {
return callback(new Error("请上传Logo"));
} else {
callback();
}
};
return {
pageloading: false,
addMsg: {
BuildId: 0,
Name: '',
Address: "", //地址
LatAndLon: "", //地址经纬度
OperationTime: "", //投运时间
CategoryId: 0,//分类
Areas: null, //楼宇建筑面积
BuildingNum: null,//楼栋数
FloorNum: null, //楼层数
ElevatorNum: null, //电梯数数
FloorHeight: null,//层高
Developers: "", //开发商
PropertyComp: "",//物业公司
SaleOrSelf: "",//销售自持比例
IsAllOperate: 1,//是否统一运营(1-是,0-否)
ConstructionTime: "",//建设时间
PropertyFee: null,//管理公司及管理费
RentFee: null,//月租金(元/㎡)
IndustryDirection: "", //拟主导产业方向
BrandDemand: "",//目标招商业态及品牌需求
Other: "",//其他需求
ContactName: "",//联系人
ContactPhone: null,//联系电话
Banner: [],//介绍图
},
rules: {
Name: [
{
required: true,
message: "请输入楼宇名称",
trigger: "blur",
},
],
Address: [
{
required: true,
message: "请输入楼宇地址",
trigger: "blur",
},
],
ConstructionTime: [
{
required: true,
message: "请选择建设时间",
trigger: "change",
},
],
OperationTime: [
{
required: true,
message: "请选择投运时间",
trigger: "change",
},
],
CategoryId: [
{
required: true,
message: "请选择楼宇等级",
trigger: "change",
},
],
Areas: [
{
required: true,
message: "请输入楼宇建筑面积",
trigger: "burl",
},
],
BuildingNum: [
{
required: true,
message: "请输入楼栋数量",
trigger: "burl",
},
],
FloorNum: [
{
required: true,
message: "请输入楼层量",
trigger: "burl",
},
],
ElevatorNum: [
{
required: true,
message: "请输入电梯数",
trigger: "burl",
},
],
FloorHeight: [
{
required: true,
message: "请输入层高",
trigger: "burl",
},
],
Developers: [
{
required: true,
message: "请输入开发商",
trigger: "blur",
},
],
PropertyComp: [
{
required: true,
message: "请输入物业公司",
trigger: "blur",
},
],
SaleOrSelf: [
{
required: true,
message: "请输入销售/自持比例",
trigger: "blur",
},
],
PropertyFee: [
{
required: true,
message: "请输入物业费",
trigger: "blur",
},
],
RentFee: [
{
required: true,
message: "请输入月租金",
trigger: "blur",
},
],
IndustryDirection: [
{
required: true,
message: "请输入拟主导产业方向",
trigger: "burl",
},
],
Logo: [
{
required: true,
validator: validataLogo,
trigger: "change",
},
],
BrandDemand: [
{
required: true,
message: "请输入目标企业招引需求",
trigger: "burl",
},
],
ContactName: [
{
required: true,
message: "请输入楼负责人名字",
trigger: "burl",
},
],
ContactPhone: [
{
required: true,
message: "请输入楼负责人电话",
trigger: "burl",
},
],
},
ID: 0,
type: -1,
choicImg: false,
changeState1: false,
isShowMap: false, //显示地图
MetroList: [], //地铁信息数据
ProjectTypeList: [], //项目类型数组
introImgList: [], //介绍图
LogoList: [],
shenList: [],
CategoryList: []
};
},
components: {
ChooseImg,
Choosevideo,
commonMap,
draggable,
},
created() {
if (this.$route.query.ID) {
this.ID = this.$route.query.ID;
this.getData();
}
this.getTypeEnumList();
this.GetAuthenticationCategoryEnumList();
},
methods: {
//获取项目类型
getTypeEnumList() {
this.apipost("/api/Trade/GetProjectTypeEnumList", {}, (res) => {
if (res.data.resultCode == 1) {
this.ProjectTypeList = res.data.data;
let obj = {
Name: "不限",
Id: 0,
};
this.ProjectTypeList.unshift(obj);
}
});
this.apipost("/api/Trade/GetBrandClassList", {
BrandCategory: 2
}, (res) => {
if (res.data.resultCode == 1) {
this.CategoryList = res.data.data;
let obj = {
ClassName: "不限",
ID: 0,
};
this.CategoryList.unshift(obj);
}
});
},
//新增地铁信息
addMetroList() {
let obj = {
MetroNum: "",
MetroName: "",
Distance: "",
};
this.MetroList.push(obj);
},
//删除地铁信息
delCarrier(index) {
this.MetroList.splice(index, 1);
},
Save(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
// if(this.introImgList.length==0){
// this.Error('请上传介绍图');
// return;
// }
this.addMsg.CarrierMetroList = this.MetroList;
// this.addMsg.BannerList = this.introImgList;
this.addMsg.Banner = this.introImgList;
this.apipost(
"/api/YBTrade/SetBuildingInfo",
this.addMsg,
(res) => {
if (res.data.resultCode === 1) {
this.CommonJump('tenementManager');
this.Success(res.data.message);
} else {
this.Error(res.data.message);
}
},
null
);
} else {
return false;
}
});
},
getData() {
this.pageloading = true;
this.apipost(
"/api/YBTrade/GetBuildingInfo",
{
BuildId: this.ID,
},
(res) => {
this.pageloading = false;
if (res.data.resultCode == 1) {
let data = res.data.data;
this.addMsg = res.data.data;
if (
res.data.data.CarrierMetroList &&
res.data.data.CarrierMetroList.length > 0
) {
this.MetroList = res.data.data.CarrierMetroList;
}
// if (
// res.data.data.BannerList &&
// res.data.data.BannerList.length > 0
// ) {
// this.introImgList = res.data.data.BannerList;
// }
if (
res.data.data.Banner &&
res.data.data.Banner.length > 0
) {
this.introImgList = res.data.data.Banner;
}
if (res.data.data.OperationTime) {
this.addMsg.OperationTime = this.addMsg.OperationTime.replace("T", " ");
}
this.LogoList = [];
this.LogoList.push(this.addMsg.Logo);
} else {
this.Error(res.data.message);
}
}
);
},
//选择图片
SelectId(msg) {
if (this.type == 1) {
this.addMsg.Logo = this.getIconLink(msg.url);
}
if (this.type == 2) {
this.introImgList.push(msg.url);
}
if (this.type == 3) {
// this.addMsg.HonorList.push(msg.url);
this.addMsg.Honor.push(msg.url);
}
this.choicImg = false;
},
ClearCarouse(index) {
if (this.type == 2) {
this.introImgList.splice(index, 1);
}
if (this.type == 3) {
// this.addMsg.HonorList.splice(index, 1);
this.addMsg.Honor.splice(index, 1);
}
},
Selectvideo(val) {
this.addMsg.VideoUrl = val.Path;
this.changeState1 = false;
},
//得到地图信息
mapEvent(e) {
this.addMsg.LatAndLon = e.lat + "," + e.long;
// this.addMsg.Address = e.Address;
this.isShowMap = false;
},
//获取首店类别
GetAuthenticationCategoryEnumList() {
this.apipost(
"/api/AppletTrade/GetAuthenticationCategoryEnumList",
{ Name: "", Id: "" },
(res) => {
if (res.data.resultCode == 1) {
this.shenList = res.data.data;
if (this.addMsg.FirstShopNumList&&this.addMsg.FirstShopNumList.length === 0) {
this.shenList.map((e) => {
let obj = {
Id: e.Id,
Name: e.Name,
Num: 0,
};
this.addMsg.FirstShopNumList.push(obj);
});
}
}
}
);
},
addTypeAndNum() {
this.addMsg.FirstShopNumList.push({
Id: 0,
Name: "",
Num: 0,
});
},
delTypeAndNum(index) {
this.addMsg.FirstShopNumList.splice(index, 1);
},
},
};
</script>
<style>
.editVehicle .content {
background: #fff;
margin-top: 10px;
box-sizing: border-box;
}
.editVehicle .editIconImg {
width: 80px;
height: 80px;
}
.editVehicle .add-image-btn {
width: 100px;
height: 100px;
line-height: 100px;
color: #419efb;
border: 1px solid #e2e2e2;
cursor: pointer;
text-align: center;
}
.editVehicle .nav_Main {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
}
.editVehicle .nav_IconContent {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
}
/* .editVehicle .nav_IconContent div>div {
display: inline-block;
} */
.editVehicle .colapp-image {
background-size: cover;
background-position: center center;
width: 100px;
height: 100px;
border-radius: 0%;
}
.editVehicle .delBtn {
position: absolute;
right: -8px;
top: -8px;
padding: 4px 4px !important;
}
.delCarrClose {
position: absolute;
right: 53px;
top: 8px;
padding: 4px 4px !important;
}
</style>
...@@ -333,10 +333,10 @@ ...@@ -333,10 +333,10 @@
</li> </li>
<li <li
class="menu_item" class="menu_item"
:class="{ Fchecked: isChecked == '/BuildingManager' }" :class="{ Fchecked: isChecked == '/tenementManager' }"
@click=" @click="
(isChecked = '/BuildingManager'), (isChecked = '/tenementManager'),
CommonJump('BuildingManager') CommonJump('tenementManager')
" "
> >
<i class="el-icon-menu"></i><span>楼宇管理</span> <i class="el-icon-menu"></i><span>楼宇管理</span>
...@@ -352,9 +352,9 @@ ...@@ -352,9 +352,9 @@
</li> </li>
<li <li
class="menu_item" class="menu_item"
:class="{ Fchecked: isChecked == '/EnterpriseManager' }" :class="{ Fchecked: isChecked == '/firmManager' }"
@click=" @click="
(isChecked = '/EnterpriseManager'), CommonJump('EnterpriseManager') (isChecked = '/firmManager'), CommonJump('firmManager')
" "
> >
<i class="el-icon-menu"></i><span>企业服务管理</span> <i class="el-icon-menu"></i><span>企业服务管理</span>
......
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