Commit c7669f99 authored by 罗超's avatar 罗超

1

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