Commit b3318e37 authored by 黄奎's avatar 黄奎

页面修改

parent 3e0f8e6f
...@@ -2,9 +2,11 @@ ...@@ -2,9 +2,11 @@
.height_auto.el-select .el-input { .height_auto.el-select .el-input {
height: auto height: auto
} }
.Rotationchart .TFimgList:hover .TFIMGzhe { .Rotationchart .TFimgList:hover .TFIMGzhe {
display: block; display: block;
} }
.AdManageList .TFimgList { .AdManageList .TFimgList {
float: left; float: left;
width: 220px; width: 220px;
...@@ -14,6 +16,7 @@ ...@@ -14,6 +16,7 @@
margin: 0 10px 10px 0; margin: 0 10px 10px 0;
overflow: hidden; overflow: hidden;
} }
.AdManageList .TFIMGzhe { .AdManageList .TFIMGzhe {
width: 100%; width: 100%;
height: 100%; height: 100%;
...@@ -25,6 +28,7 @@ ...@@ -25,6 +28,7 @@
border-radius: 4px; border-radius: 4px;
display: none; display: none;
} }
.AdManageList .TFreupload { .AdManageList .TFreupload {
width: 32px; width: 32px;
height: 32px; height: 32px;
...@@ -37,6 +41,7 @@ ...@@ -37,6 +41,7 @@
background-color: gray; background-color: gray;
color: #fff; color: #fff;
} }
.AdManageList .TFimgList:hover .TFIMGzhe { .AdManageList .TFimgList:hover .TFIMGzhe {
display: block; display: block;
} }
...@@ -45,15 +50,17 @@ ...@@ -45,15 +50,17 @@
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.AdManageList ._tit { .AdManageList ._tit {
padding-left: 10px; padding-left: 10px;
border-left: 3px solid #e95252; border-left: 3px solid #e95252;
font-size: 16px; font-size: 16px;
color: #000000; color: #000000;
} }
.AdManageList .changeMsg li { .AdManageList .changeMsg li {
float:left; float: left;
margin-right:30px; margin-right: 30px;
color: #666666; color: #666666;
} }
...@@ -61,11 +68,11 @@ ...@@ -61,11 +68,11 @@
<template> <template>
<div class="flexOne AdManageList"> <div class="flexOne AdManageList">
<div class="query-box"> <div class="query-box">
<ul> <ul>
<li> <li>
<input type="button" class="normalBtn" value="新增" @click="IsShowBtm=true" /> <input type="button" class="normalBtn" value="新增" @click="IsShowBtm=true" />
</li> </li>
</ul> </ul>
</div> </div>
<table class="singeRowTable" border="0" cellspacing="0" cellpadding="0" v-loading="loading"> <table class="singeRowTable" border="0" cellspacing="0" cellpadding="0" v-loading="loading">
<tr> <tr>
...@@ -77,9 +84,12 @@ ...@@ -77,9 +84,12 @@
</tr> </tr>
<tr v-for="item in dataList"> <tr v-for="item in dataList">
<td>{{item.Id}}</td> <td>{{item.Id}}</td>
<td>{{item.AdImage}}</td> <td>
<img v-if="!item.ShowImage" src="../../assets/img/bg_c3@3x.png" />
<img v-else :src='item.ShowImage' style="width:100px;height:40px;" />
</td>
<td>{{item.AdLink}}</td> <td>{{item.AdLink}}</td>
<td>{{item.Status}}</td> <td>{{item.StatusStr}}</td>
<td> <td>
<el-button-group> <el-button-group>
<el-tooltip class="item" effect="dark" :content="$t('active.ld_editInfo')" placement="top"> <el-tooltip class="item" effect="dark" :content="$t('active.ld_editInfo')" placement="top">
...@@ -99,46 +109,42 @@ ...@@ -99,46 +109,42 @@
<p>{{$t("active.ld_noData")}}</p> <p>{{$t("active.ld_noData")}}</p>
</div> </div>
<div class="combottomDiv" v-if="IsShowBtm" style="left:0;"> <div class="combottomDiv" v-if="IsShowBtm" style="left:0;">
<el-row> <el-row>
<el-col :span="20"> <el-col :span="20">
<p class="combottomTitle">广告图</p> <p class="combottomTitle">广告图</p>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
<input type="button" class="normalBtn" @click="" value="保存" /> <input type="button" class="normalBtn" @click="SetAdmanage()" value="保存" />
<input type="button" class="hollowFixedBtn" @click="IsShowBtm=false" value="取消" /> <input type="button" class="hollowFixedBtn" @click="clearAdManage(),IsShowBtm=false" value="取消" />
</el-col> </el-col>
</el-row> </el-row>
<el-form label-width="80px"> <el-form label-width="80px">
<ul class="changeMsg"> <ul class="changeMsg">
<li> <li>
<el-form-item label="图片"> <el-form-item label="图片">
<div class="TFimgList"> <div class="TFimgList">
<img v-if="!addMsg.AdImage" src="../../assets/img/bg_c3@3x.png"> <img v-if="!ShowImgUrl" src="../../assets/img/bg_c3@3x.png">
<img v-else :src='addMsg.AdImage'> <img v-else :src='ShowImgUrl'>
<div class="TFIMGzhe"> <div class="TFIMGzhe">
<div class="TFreupload"> <div class="TFreupload">
<el-upload :file-list="fileList" :http-request="uploadTest" :multiple="true" :limit="2" <el-upload :file-list="fileList" :http-request="UploadImage" :multiple="false" :limit="1"
:on-change="handleChange1" accept="image/jpeg, image/gif, image/png, image/bmp" :show-file-list="false" action>
accept="image/jpeg, image/gif, image/png, image/bmp" <i class="iconfont icon-Edit"></i>
:show-file-list="false" action> </el-upload>
<i class="iconfont icon-Edit"></i> </div>
</el-upload>
</div>
</div>
</div> </div>
</div>
</el-form-item> </el-form-item>
</li> </li>
<li> <li>
<el-form-item label="广告链接"> <el-form-item label="广告链接">
<el-input v-model="addMsg.AdLink" class="w210"></el-input> <el-input v-model="addMsg.AdLink" class="w210"></el-input>
</el-form-item> </el-form-item>
</li> </li>
</ul> </ul>
</el-form> </el-form>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
...@@ -155,11 +161,12 @@ ...@@ -155,11 +161,12 @@
loading: false, loading: false,
dataList: [], dataList: [],
//显示底部 //显示底部
IsShowBtm:false, IsShowBtm: false,
fileList: [], fileList: [],
//图片全路劲
ShowImgUrl: "",
}; };
}, },
mounted() { mounted() {
this.getList(); this.getList();
}, },
...@@ -181,20 +188,32 @@ ...@@ -181,20 +188,32 @@
SetAdmanage() { SetAdmanage() {
this.apipost("ShopAd_post_SetAdManageService", this.addMsg, res => { this.apipost("ShopAd_post_SetAdManageService", this.addMsg, res => {
if (res.data.resultCode === 1) { if (res.data.resultCode === 1) {
this.IsShowBtm = false;
this.clearAdManage();
this.getList(); this.getList();
} else { } else {
this.Error(res.data.message) this.Error(res.data.message)
} }
}, null); }, null);
},
//情况默认值
clearAdManage() {
this.addMsg.Id = 0;
this.addMsg.AdImage = "";
this.addMsg.AdLink = "";
this.ShowImgUrl = "";
}, },
//根据编号获取广告详情 //根据编号获取广告详情
getAdManage(Id) { getAdManage(Id) {
this.IsShowBtm = true;
this.apipost("ShopAd_get_GetAdManageService", { this.apipost("ShopAd_get_GetAdManageService", {
Id: Id Id: Id
}, res => { }, res => {
if (res.data.resultCode === 1) { if (res.data.resultCode === 1) {
this.addMsg = res.data.data; this.addMsg = res.data.data;
if (this.addMsg.AdImage) {
this.ShowImgUrl = this.domainManager().ViittoFileUrl + this.addMsg.AdImage;
}
} else { } else {
this.Error(res.data.message) this.Error(res.data.message)
} }
...@@ -202,42 +221,31 @@ ...@@ -202,42 +221,31 @@
}, },
//根据编号删除广告详情 //根据编号删除广告详情
removeAdManage(Id) { removeAdManage(Id) {
this.apipost("ShopAd_post_RemoveAdManageService", { var that = this;
Id: Id this.Confirm("是否删除此广告?", function () {
}, res => { that.apipost("ShopAd_post_RemoveAdManageService", {
if (res.data.resultCode === 1) { Id: Id
this.getList(); }, res => {
} else { if (res.data.resultCode === 1) {
this.Error(res.data.message) that.getList();
} } else {
}, null); that.Error(res.data.message)
}
}, null);
});
}, },
}, //上传图片
UploadImage(file) {
uploadTest(file) { let newArr = [];
newArr.push(file.file);
}, let fileName = file.file.name;
handleChange1(file, fileList) { var path = "/Upload/Temporary/";
this.UploadSelfFileT(path, newArr, x => {
}, this.addMsg.AdImage = x.data.FilePath;
this.ShowImgUrl = this.domainManager().ViittoFileUrl + x.data.FilePath;
//上传图片 });
UploadImage(file) { },
let newArr = []; }
newArr.push(file.file);
let fileName = file.file.name;
var path = "/Upload/Temporary/";
this.UploadSelfFileT(path, newArr, x => {
//统一图片处理
if (this.DiningImageArray.length === 5) {
return this.$message.error('最多上传5张图片')
}
var obj = {}
var str = x.data.FilePath;
var imgUrl = this.domainManager().ViittoFileUrl + x.data.FilePath;
this.DiningImageArray.push(imgUrl);
});
},
}; };
</script> </script>
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