Commit 1faa2352 authored by zhengke's avatar zhengke

修改

parent 2ce9802a
...@@ -38,8 +38,8 @@ ...@@ -38,8 +38,8 @@
</div> </div>
<div class="searchInput" style="width:250px;margin-bottom:10px;"> <div class="searchInput" style="width:250px;margin-bottom:10px;">
<el-input @keyup.enter.native="msg.pageIndex=1,getList()" @clear="msg.pageIndex=1,getList()" <el-input @keyup.enter.native="msg.pageIndex=1,getList()" @clear="msg.pageIndex=1,getList()"
style="display:inline-block;width:225px;height:30px" @keyup.native="checkInteger(msg,'MetroNum')" placeholder="地铁线路" v-model="msg.MetroNum" size="small" style="display:inline-block;width:225px;height:30px" @keyup.native="checkInteger(msg,'MetroNum')"
clearable> placeholder="地铁线路" v-model="msg.MetroNum" size="small" clearable>
</el-input> </el-input>
<span @click="msg.pageIndex=1,getList()" class="el-icon-search" <span @click="msg.pageIndex=1,getList()" class="el-icon-search"
style="color:#979dad;font-size:14px;position:relative;top:1px"></span> style="color:#979dad;font-size:14px;position:relative;top:1px"></span>
...@@ -68,7 +68,8 @@ ...@@ -68,7 +68,8 @@
</el-table-column> </el-table-column>
<el-table-column prop="Logo" width="100" label="logo"> <el-table-column prop="Logo" width="100" label="logo">
<template slot-scope="scope"> <template slot-scope="scope">
<img :src="scope.row.Logo" style="width:50px;" /> <el-image :src="scope.row.Logo" style="width:50px;" :preview-src-list="scope.row.LogoList">
</el-image>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="Address" width="200" label="项目地址"> <el-table-column prop="Address" width="200" label="项目地址">
...@@ -144,6 +145,10 @@ ...@@ -144,6 +145,10 @@
this.total = res.data.data.count; this.total = res.data.data.count;
let pageData = res.data.data.pageData; let pageData = res.data.data.pageData;
this.tableData = pageData; this.tableData = pageData;
this.tableData.forEach(x => {
x.LogoList = []
x.LogoList.push(x.Logo);
})
} }
}) })
}, },
......
...@@ -24,9 +24,8 @@ ...@@ -24,9 +24,8 @@
</el-table-column> </el-table-column>
<el-table-column prop="CoverImage" label="封面图"> <el-table-column prop="CoverImage" label="封面图">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="app-image" <el-image title="点击查看大图" style="width:50px;" :src="scope.row.CoverImage"
:style="{backgroundImage:'url(' + scope.row.CoverImage + ')',backgroundSize:'cover'}"> :preview-src-list="scope.row.CoverList"></el-image>
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="Id" width="200" label="操作"> <el-table-column prop="Id" width="200" label="操作">
...@@ -62,7 +61,8 @@ ...@@ -62,7 +61,8 @@
<div class="app-gallery-item" style="position: relative;width: 100px;margin-top: 10px;border:none;"> <div class="app-gallery-item" style="position: relative;width: 100px;margin-top: 10px;border:none;">
<img v-if="!addMsg.CoverImage || addMsg.CoverImage==''" src="../../assets/img/default.png" <img v-if="!addMsg.CoverImage || addMsg.CoverImage==''" src="../../assets/img/default.png"
style="width:80px;height:80px" alt=""> style="width:80px;height:80px" alt="">
<img v-else style="width:80px;height:80px" :src="addMsg.CoverImage" alt=""> <el-image v-else style="width:80px;height:80px;" :src="addMsg.CoverImage"
:preview-src-list="CoverImgList"></el-image>
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -104,7 +104,8 @@ ...@@ -104,7 +104,8 @@
Id: 0, //编号 Id: 0, //编号
TypeName: "", //类型名称 TypeName: "", //类型名称
CoverImage: "", //封面图 CoverImage: "", //封面图
} },
CoverImgList:[]
}; };
}, },
created() { created() {
...@@ -120,6 +121,8 @@ ...@@ -120,6 +121,8 @@
let url = this.getIconLink(msg.url) let url = this.getIconLink(msg.url)
this.addMsg.CoverImage = url this.addMsg.CoverImage = url
this.isShowImage = false; this.isShowImage = false;
this.CoverImgList=[];
this.CoverImgList.push(url);
}, },
getList() { getList() {
this.loading = true; this.loading = true;
...@@ -129,6 +132,10 @@ ...@@ -129,6 +132,10 @@
this.total = res.data.data.count; this.total = res.data.data.count;
let pageData = res.data.data.pageData; let pageData = res.data.data.pageData;
this.tableData = pageData; this.tableData = pageData;
this.tableData.forEach(x=>{
x.CoverList=[];
x.CoverList.push(x.CoverImage);
})
} }
}) })
}, },
...@@ -147,6 +154,8 @@ ...@@ -147,6 +154,8 @@
this.addMsg.Id = tempData.Id; this.addMsg.Id = tempData.Id;
this.addMsg.TypeName = tempData.TypeName; this.addMsg.TypeName = tempData.TypeName;
this.addMsg.CoverImage = tempData.CoverImage; this.addMsg.CoverImage = tempData.CoverImage;
this.CoverImgList=[];
this.CoverImgList.push(tempData.CoverImage);
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
......
...@@ -107,7 +107,8 @@ ...@@ -107,7 +107,8 @@
</el-table-column> </el-table-column>
<el-table-column prop="Logo" label="Logo" width="100"> <el-table-column prop="Logo" label="Logo" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<img v-if="scope.row.Logo" :src="scope.row.Logo" style="width:50px;" alt="" /> <el-image v-if="scope.row.Logo" :src="scope.row.Logo" style="width:50px;" :preview-src-list="scope.row.LogoList">
</el-image>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="ShopNum" label="店铺数量" width="80"> <el-table-column prop="ShopNum" label="店铺数量" width="80">
...@@ -195,6 +196,10 @@ ...@@ -195,6 +196,10 @@
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.dataList = res.data.data.pageData; this.dataList = res.data.data.pageData;
this.pageCount = res.data.data.count; this.pageCount = res.data.data.count;
this.dataList.forEach(x=>{
x.LogoList=[]
x.LogoList.push(x.Logo);
})
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
......
...@@ -16,25 +16,19 @@ ...@@ -16,25 +16,19 @@
</el-tooltip> </el-tooltip>
</div> </div>
<div class="editIconImg"> <div class="editIconImg">
<el-image <el-image style="width: 80px;height:80px;" v-if="addMsg.Logo" :src="addMsg.Logo"
style="width: 80px;height:80px;"
v-if="addMsg.Logo"
:src="addMsg.Logo"
:preview-src-list="LogoList"> :preview-src-list="LogoList">
</el-image> </el-image>
<img v-else src="../../assets/img/default.png" alt="" /> <img v-else src="../../assets/img/default.png" alt="" />
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="介绍图(多张)"> <el-form-item label="介绍图(多张)" class="is-required">
<div class="nav_Main"> <div class="nav_Main">
<div class="nav_IconContent"> <div class="nav_IconContent">
<draggable v-model="introImgList"> <draggable v-model="introImgList">
<div v-for="(item, index) in introImgList" :key="index+'2'" <div v-for="(item, index) in introImgList" :key="index+'2'"
style="margin-right: 20px; position: relative;display:inline-block; "> style="margin-right: 20px; position: relative;display:inline-block; ">
<el-image <el-image style="width: 100px;height:100px;" :src="item" :preview-src-list="introImgList">
style="width: 100px;height:100px;"
:src="item"
:preview-src-list="introImgList">
</el-image> </el-image>
<el-button @click="ClearCarouse(index)" class="delBtn" type="danger" icon="el-icon-close" circle> <el-button @click="ClearCarouse(index)" class="delBtn" type="danger" icon="el-icon-close" circle>
</el-button> </el-button>
...@@ -67,7 +61,7 @@ ...@@ -67,7 +61,7 @@
</el-form-item> </el-form-item>
<el-form-item label="开业时间"> <el-form-item label="开业时间">
<el-date-picker v-model="addMsg.OpenTime" clearable value-format="yyyy-MM-dd HH:mm:ss" size="small" <el-date-picker v-model="addMsg.OpenTime" clearable value-format="yyyy-MM-dd HH:mm:ss" size="small"
type="datetime" placeholder="选择开业时间"> type="datetime" placeholder="选择开业时间">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="项目类型" prop="ProjectType"> <el-form-item label="项目类型" prop="ProjectType">
...@@ -108,7 +102,8 @@ ...@@ -108,7 +102,8 @@
</el-form-item> </el-form-item>
<el-form-item label="地铁信息"> <el-form-item label="地铁信息">
<div v-for="(item,index) in MetroList" :key="index" style="position:relative;width:690px;"> <div v-for="(item,index) in MetroList" :key="index" style="position:relative;width:690px;">
<el-input v-model="item.MetroNum" @keyup.native="checkInteger(item,'MetroNum')" style="width:200px" size="small" placeholder="地铁线路" /> <el-input v-model="item.MetroNum" @keyup.native="checkInteger(item,'MetroNum')" style="width:200px"
size="small" placeholder="地铁线路" />
<el-input v-model="item.MetroName" style="width:200px" size="small" placeholder="站点名称" /> <el-input v-model="item.MetroName" style="width:200px" size="small" placeholder="站点名称" />
<el-input v-model="item.Distance" style="width:200px" size="small" placeholder="距离" /> <el-input v-model="item.Distance" style="width:200px" size="small" placeholder="距离" />
<el-button @click="delCarrier(index)" class="delCarrClose" type="danger" icon="el-icon-close" circle> <el-button @click="delCarrier(index)" class="delCarrClose" type="danger" icon="el-icon-close" circle>
...@@ -209,10 +204,10 @@ ...@@ -209,10 +204,10 @@
choicImg: false, choicImg: false,
changeState1: false, changeState1: false,
isShowMap: false, //显示地图 isShowMap: false, //显示地图
MetroList:[],//地铁信息数据 MetroList: [], //地铁信息数据
ProjectTypeList: [], //项目类型数组 ProjectTypeList: [], //项目类型数组
introImgList:[], //介绍图 introImgList: [], //介绍图
LogoList:[], LogoList: [],
} }
}, },
components: { components: {
...@@ -258,21 +253,21 @@ ...@@ -258,21 +253,21 @@
Save(formName) { Save(formName) {
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
if(this.MetroList.length>0){ if (this.MetroList.length > 0) {
for(var i=0;i<this.MetroList.length;i++){ for (var i = 0; i < this.MetroList.length; i++) {
if(this.MetroList[i].MetroNum==''){ if (this.MetroList[i].MetroNum == '') {
this.Error(`请填写第地铁信息${i+1}行地铁线路`); this.Error(`请填写第地铁信息${i+1}行地铁线路`);
return; return;
}
if(this.MetroList[i].MetroName==''){
this.Error(`请填写第地铁信息${i+1}行站点名称`);
return;
}
// if(this.MetroList[i].Distance==''){
// this.Error(`请填写第地铁信息${i+1}行距离`);
// return;
// }
} }
if (this.MetroList[i].MetroName == '') {
this.Error(`请填写第地铁信息${i+1}行站点名称`);
return;
}
}
}
if(this.introImgList.length==0){
this.Error('请上传介绍图');
return;
} }
this.addMsg.CarrierMetroList = this.MetroList; this.addMsg.CarrierMetroList = this.MetroList;
this.addMsg.BannerList = this.introImgList; this.addMsg.BannerList = this.introImgList;
...@@ -302,16 +297,16 @@ ...@@ -302,16 +297,16 @@
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
let data = res.data.data let data = res.data.data
this.addMsg = res.data.data; this.addMsg = res.data.data;
if(res.data.data.CarrierMetroList&&res.data.data.CarrierMetroList.length>0){ if (res.data.data.CarrierMetroList && res.data.data.CarrierMetroList.length > 0) {
this.MetroList = res.data.data.CarrierMetroList 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.BannerList&&res.data.data.BannerList.length>0){ if (res.data.data.OpenTime) {
this.introImgList = res.data.data.BannerList this.addMsg.OpenTime = this.addMsg.OpenTime.replace('T', ' ');
} }
if(res.data.data.OpenTime){ this.LogoList = [];
this.addMsg.OpenTime = this.addMsg.OpenTime.replace('T',' ');
}
this.LogoList=[];
this.LogoList.push(this.addMsg.Logo); this.LogoList.push(this.addMsg.Logo);
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
......
...@@ -48,7 +48,8 @@ ...@@ -48,7 +48,8 @@
</el-table-column> </el-table-column>
<el-table-column prop="CoverImage" label="封面图" width="150"> <el-table-column prop="CoverImage" label="封面图" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<img :src="scope.row.CoverImage" style="width:60px;" alt="" /> <el-image title="点击查看大图" style="width:60px;" :src="scope.row.CoverImage"
:preview-src-list="scope.row.ImageList"></el-image>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="TypeName" width="100" label="类型"> <el-table-column prop="TypeName" width="100" label="类型">
......
...@@ -24,9 +24,8 @@ ...@@ -24,9 +24,8 @@
</el-table-column> </el-table-column>
<el-table-column prop="CoverImg" width="150" label="封面图"> <el-table-column prop="CoverImg" width="150" label="封面图">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="app-image" <el-image title="点击查看大图" style="width:50px;" :src="scope.row.CoverImg"
:style="{backgroundImage:'url(' + scope.row.CoverImg + ')',backgroundSize:'cover'}"> :preview-src-list="scope.row.CoverList"></el-image>
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="PublishTimeStr" width="200" label="发布时间"> <el-table-column prop="PublishTimeStr" width="200" label="发布时间">
...@@ -79,7 +78,8 @@ ...@@ -79,7 +78,8 @@
<div class="app-gallery-item" style="position: relative;width: 100px;margin-top: 10px;border:none;"> <div class="app-gallery-item" style="position: relative;width: 100px;margin-top: 10px;border:none;">
<img v-if="!addMsg.CoverImg || addMsg.CoverImg==''" src="../../assets/img/default.png" <img v-if="!addMsg.CoverImg || addMsg.CoverImg==''" src="../../assets/img/default.png"
style="width:80px;height:80px" alt=""> style="width:80px;height:80px" alt="">
<img v-else style="width:80px;height:80px" :src="addMsg.CoverImg" alt=""> <el-image v-else style="width:80px;height:80px;" :src="addMsg.CoverImg"
:preview-src-list="CoverImgList"></el-image>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="新闻详情" style="line-height:0;"> <el-form-item label="新闻详情" style="line-height:0;">
...@@ -153,6 +153,7 @@ ...@@ -153,6 +153,7 @@
trigger: 'blur' trigger: 'blur'
}] }]
}, },
CoverImgList:[]
}; };
}, },
created() { created() {
...@@ -163,6 +164,8 @@ ...@@ -163,6 +164,8 @@
let url = this.getIconLink(msg.url) let url = this.getIconLink(msg.url)
this.addMsg.CoverImg = url this.addMsg.CoverImg = url
this.isShowImage = false; this.isShowImage = false;
this.CoverImgList=[];
this.CoverImgList.push(url);
}, },
clearMsg() { clearMsg() {
this.addMsg.Id = 0; this.addMsg.Id = 0;
...@@ -183,6 +186,10 @@ ...@@ -183,6 +186,10 @@
this.total = res.data.data.count; this.total = res.data.data.count;
let pageData = res.data.data.pageData; let pageData = res.data.data.pageData;
this.tableData = pageData; this.tableData = pageData;
this.tableData.forEach(x=>{
x.CoverList = []
x.CoverList.push(x.CoverImg);
})
} }
}) })
}, },
...@@ -229,6 +236,8 @@ ...@@ -229,6 +236,8 @@
if (tempData.NewsInfo) { if (tempData.NewsInfo) {
this.defaultMsg = tempData.NewsInfo; this.defaultMsg = tempData.NewsInfo;
} }
this.CoverImgList=[];
this.CoverImgList.push(tempData.CoverImg);
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
......
...@@ -22,7 +22,8 @@ ...@@ -22,7 +22,8 @@
</el-table-column> </el-table-column>
<el-table-column prop="BusinessLicense" width="150" label="营业执照"> <el-table-column prop="BusinessLicense" width="150" label="营业执照">
<template slot-scope="scope"> <template slot-scope="scope">
<img :src="scope.row.BusinessLicense" style="width:50px;" alt="" /> <el-image title="点击查看大图" style="width:50px;" :src="scope.row.BusinessLicense"
:preview-src-list="scope.row.BusinessList"></el-image>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="UnifiedCode" label="统一社会信用代码"> <el-table-column prop="UnifiedCode" label="统一社会信用代码">
...@@ -147,6 +148,10 @@ ...@@ -147,6 +148,10 @@
this.total = res.data.data.count; this.total = res.data.data.count;
let pageData = res.data.data.pageData; let pageData = res.data.data.pageData;
this.tableData = pageData; this.tableData = pageData;
this.tableData.forEach(x=>{
x.BusinessList=[];
x.BusinessList.push(x.BusinessLicense);
})
} else { } else {
this.Error(res.data.message) this.Error(res.data.message)
} }
......
...@@ -26,9 +26,8 @@ ...@@ -26,9 +26,8 @@
</el-table-column> </el-table-column>
<el-table-column prop="CoverImg" label="封面图"> <el-table-column prop="CoverImg" label="封面图">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="app-image" <el-image title="点击查看大图" style="width:50px;" :src="scope.row.CoverImg"
:style="{backgroundImage:'url(' + scope.row.CoverImg + ')',backgroundSize:'cover'}"> :preview-src-list="scope.row.CoverList"></el-image>
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="StartTimeStr" label="活动时间"> <el-table-column prop="StartTimeStr" label="活动时间">
...@@ -110,7 +109,8 @@ ...@@ -110,7 +109,8 @@
<div class="app-gallery-item" style="position: relative;width: 100px;margin-top: 10px;border:none;"> <div class="app-gallery-item" style="position: relative;width: 100px;margin-top: 10px;border:none;">
<img v-if="!addMsg.CoverImg || addMsg.CoverImg==''" src="../../assets/img/default.png" <img v-if="!addMsg.CoverImg || addMsg.CoverImg==''" src="../../assets/img/default.png"
style="width:80px;height:80px" alt=""> style="width:80px;height:80px" alt="">
<img v-else style="width:80px;height:80px" :src="addMsg.CoverImg" alt=""> <el-image v-else style="width:80px;height:80px;" :src="addMsg.CoverImg"
:preview-src-list="CoverImgList"></el-image>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="活动详情"> <el-form-item label="活动详情">
...@@ -161,6 +161,7 @@ ...@@ -161,6 +161,7 @@
ActivityName: '', ActivityName: '',
}, },
total: 0, total: 0,
CoverImgList:[],
isShowAdd: true, //是否显示新增 isShowAdd: true, //是否显示新增
tableData: [], //数据列表 tableData: [], //数据列表
isShowImage: false, //是否显示选择图片弹窗 isShowImage: false, //是否显示选择图片弹窗
...@@ -267,6 +268,8 @@ ...@@ -267,6 +268,8 @@
let url = this.getIconLink(msg.url) let url = this.getIconLink(msg.url)
this.addMsg.CoverImg = url this.addMsg.CoverImg = url
this.isShowImage = false; this.isShowImage = false;
this.CoverImgList=[];
this.CoverImgList.push(url);
}, },
getList() { getList() {
this.loading = true; this.loading = true;
...@@ -276,6 +279,10 @@ ...@@ -276,6 +279,10 @@
this.total = res.data.data.count; this.total = res.data.data.count;
let pageData = res.data.data.pageData; let pageData = res.data.data.pageData;
this.tableData = pageData; this.tableData = pageData;
this.tableData.forEach(x=>{
x.CoverList=[]
x.CoverList.push(x.CoverImg)
})
} }
}) })
}, },
...@@ -303,6 +310,8 @@ ...@@ -303,6 +310,8 @@
if (tempData.ActivityInfo) { if (tempData.ActivityInfo) {
this.defaultMsg = tempData.ActivityInfo; this.defaultMsg = tempData.ActivityInfo;
} }
this.CoverImgList=[];
this.CoverImgList.push(tempData.CoverImg);
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
......
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