Commit c7669f99 authored by 罗超's avatar 罗超

1

parent 740c64c2
...@@ -192,6 +192,7 @@ ...@@ -192,6 +192,7 @@
effect="dark" effect="dark"
content="放榜" content="放榜"
placement="top" placement="top"
v-if="scope.row.ListState === 2"
> >
<img <img
src="../../assets/img/setup/fangbang.png" src="../../assets/img/setup/fangbang.png"
...@@ -402,6 +403,7 @@ export default { ...@@ -402,6 +403,7 @@ export default {
query: { query: {
Id: row.Id, Id: row.Id,
PrizeNum: row.PrizeNum, PrizeNum: row.PrizeNum,
isRank: row.EnableRank,
}, },
}); });
}, },
...@@ -415,12 +417,10 @@ export default { ...@@ -415,12 +417,10 @@ export default {
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val;
console.log(val);
}, },
// 导出多个excel // 导出多个excel
downloadMultipleExcel() { downloadMultipleExcel() {
let ids = this.multipleSelection.map((e) => e.Id).toString(); let ids = this.multipleSelection.map((e) => e.Id).toString();
console.log(ids);
this.GetLocalFile( this.GetLocalFile(
"/api/Trade/GetFirstShopMoreListEnrollToExcel", "/api/Trade/GetFirstShopMoreListEnrollToExcel",
{ ListIds: ids }, { ListIds: ids },
......
...@@ -14,10 +14,16 @@ ...@@ -14,10 +14,16 @@
> >
<div style="display: flex; align-items: flex-start"> <div style="display: flex; align-items: flex-start">
<span <span
v-if="dataobj.rankingType == 1" v-if="dataobj.rankingType != 1"
style="line-height: 32px; margin-right: 15px" style="line-height: 32px; margin-right: 15px"
>{{ y + 1 }}:</span >{{ y + 1 }}:</span
> >
<span
v-if="dataobj.rankingType == 1"
style="line-height: 32px; margin-right: 15px"
>
{{ y + 1 }}名:</span
>
<el-select <el-select
class="w300" class="w300"
v-model="x.Id" v-model="x.Id"
...@@ -79,9 +85,8 @@ ...@@ -79,9 +85,8 @@
</div> </div>
</div> </div>
<div style="margin-top: 20px"> <div style="margin-top: 20px">
<el-button size="small" type="primary" @click="Save('addMsg')" <el-button size="small" type="primary" @click="Save(1)">暂存</el-button>
>保存</el-button <el-button size="small" type="primary" @click="Save(2)">放榜</el-button>
>
</div> </div>
<!-- 选择文件 --> <!-- 选择文件 -->
<el-dialog title="选择文件" :visible.sync="changeState" width="1240px"> <el-dialog title="选择文件" :visible.sync="changeState" width="1240px">
...@@ -104,7 +109,7 @@ export default { ...@@ -104,7 +109,7 @@ export default {
imgType: 0, imgType: 0,
changeState: false, changeState: false,
dataobj: { dataobj: {
rankingType: 1, // 1排名, 2为不排名 rankingType: 0, // 1排名, 2为不排名
Finalists: 6, Finalists: 6,
}, },
msgList: [], msgList: [],
...@@ -120,12 +125,16 @@ export default { ...@@ -120,12 +125,16 @@ export default {
}, },
created() { created() {
if (this.$route.query.Id) { if (this.$route.query.Id) {
this.msg.ListId = this.$route.query.Id;
this.getData(this.$route.query.Id); this.getData(this.$route.query.Id);
this.GetFirstShopEnrollCandidateList(this.$route.query.Id); this.GetFirstShopEnrollCandidateList(this.$route.query.Id);
} }
if (this.$route.query.PrizeNum) { if (this.$route.query.PrizeNum) {
this.dataobj.Finalists = this.$route.query.PrizeNum; this.dataobj.Finalists = this.$route.query.PrizeNum;
} }
if (this.$route.query.isRank) {
this.dataobj.rankingType = this.$route.query.isRank;
}
this.msgList = []; this.msgList = [];
for (let i = 0; i < this.dataobj.Finalists; i++) { for (let i = 0; i < this.dataobj.Finalists; i++) {
let obj = { let obj = {
...@@ -136,7 +145,6 @@ export default { ...@@ -136,7 +145,6 @@ export default {
MedalImageBig: "", //大奖章 MedalImageBig: "", //大奖章
Rank: i + 1, //排名 Rank: i + 1, //排名
}; };
this.msgList.push(obj); this.msgList.push(obj);
} }
}, },
...@@ -144,20 +152,20 @@ export default { ...@@ -144,20 +152,20 @@ export default {
methods: { methods: {
//选择图片 //选择图片
SelectId(msg) { SelectId(msg) {
let url = this.getIconLink(msg.url); // let url = this.getIconLink(msg.url);
if (this.imgType == 1) { // if (this.imgType == 1) {
this.msgList[this.msgListindex].SmallMedal = url; // this.msgList[this.msgListindex].SmallMedal = url;
} else { // } else {
this.msgList[this.msgListindex].GrandMedal = url; // this.msgList[this.msgListindex].GrandMedal = url;
} // }
this.changeState = false; // this.changeState = false;
}, },
openChangeDig(num, index) { // openChangeDig(num, index) {
this.changeState = true; // this.changeState = true;
this.imgType = num; // this.imgType = num;
this.msgListindex = index; // this.msgListindex = index;
}, // },
synchro(index) { synchro(index) {
//奖章同步 //奖章同步
let Small = ""; let Small = "";
...@@ -198,7 +206,27 @@ export default { ...@@ -198,7 +206,27 @@ export default {
}, },
//保存榜单排名 //保存榜单排名
Save() {}, Save(type) {
this.msg.Type = type;
let pass = this.msgList.every((e) => {
return e.Id > 0 && e.MedalImage != "" && e.Reviews != "";
});
this.msg.List = this.msgList;
if (pass) {
this.apipost(
"/api/Trade/SetFirstShopConfirmListInfo",
this.msg,
(res) => {
if (res.data.resultCode == 1) {
this.$message.success("操作成功");
this.getData();
}
}
);
} else {
this.$message.error("请完善内容");
}
},
//获取详情 //获取详情
getData(ID) { getData(ID) {
this.apipost( this.apipost(
...@@ -208,6 +236,7 @@ export default { ...@@ -208,6 +236,7 @@ export default {
}, },
(res) => { (res) => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.msgList = res.data.data;
} }
} }
); );
...@@ -236,8 +265,7 @@ export default { ...@@ -236,8 +265,7 @@ export default {
let img = new Image(); let img = new Image();
img.src = imgSrc; img.src = imgSrc;
let this_ = this; let this_ = this;
img.onload = function () { img.onload = function () {};
};
this.UploadFileToTencent(this.FileType().UserImg, file.file, (res) => { this.UploadFileToTencent(this.FileType().UserImg, file.file, (res) => {
if (res.resultCode == 1) { if (res.resultCode == 1) {
let index = file.data.index; let index = file.data.index;
......
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