Commit 45ef0f8f authored by 罗超's avatar 罗超

1

parent aa0b1ac6
...@@ -10,6 +10,14 @@ ...@@ -10,6 +10,14 @@
@click="CommonJump('addbillboard')" @click="CommonJump('addbillboard')"
>新增 >新增
</el-button> </el-button>
<el-button
style="float: right; margin-top: -5px; margin-right: 10px"
size="small"
type="primary"
:disabled="multipleSelection.length === 0"
@click="downloadMultipleExcel"
>下载多榜单报名
</el-button>
</div> </div>
</div> </div>
<div class="content"> <div class="content">
...@@ -118,7 +126,10 @@ ...@@ -118,7 +126,10 @@
v-loading="loading" v-loading="loading"
border border
style="width: 100%; margin: 20px 0" style="width: 100%; margin: 20px 0"
@selection-change="handleSelectionChange"
> >
>
<el-table-column type="selection" width="55"> </el-table-column>
<el-table-column prop="UserName" label="榜单信息" width="200"> <el-table-column prop="UserName" label="榜单信息" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<el-image <el-image
...@@ -161,7 +172,7 @@ ...@@ -161,7 +172,7 @@
</el-table-column> </el-table-column>
<el-table-column prop="ListStateName" label="状态"> </el-table-column> <el-table-column prop="ListStateName" label="状态"> </el-table-column>
<el-table-column label="操作" width="170"> <el-table-column label="操作" width="270">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tooltip <el-tooltip
class="item" class="item"
...@@ -215,6 +226,19 @@ ...@@ -215,6 +226,19 @@
@click="delete_b(scope.row)" @click="delete_b(scope.row)"
/> />
</el-tooltip> </el-tooltip>
<el-tooltip
class="item"
effect="dark"
content="下载榜单报名excel"
placement="top"
>
<img
src="../../assets/img/userman/imgsc.png"
alt=""
class="imgstyle"
@click="downloadSingerExcel(scope.row)"
/>
</el-tooltip>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -267,6 +291,7 @@ export default { ...@@ -267,6 +291,7 @@ export default {
ListType: [], //榜单类型 枚举 ListType: [], //榜单类型 枚举
ListState: [], //榜单状态 枚举 ListState: [], //榜单状态 枚举
ListObjectType: [], //面向群体 枚举 ListObjectType: [], //面向群体 枚举
multipleSelection: [], //多选
}; };
}, },
created() { created() {
...@@ -380,6 +405,28 @@ export default { ...@@ -380,6 +405,28 @@ export default {
}, },
}); });
}, },
// 导出单个excel
downloadSingerExcel(item) {
this.GetLocalFile(
"/api/Trade/GetFirstShopListEnrollToExcel",
{ ListId: item.Id },
"榜单报名列表.xls"
);
},
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 },
"榜单报名列表.xls"
);
},
}, },
mounted() {}, mounted() {},
}; };
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
v-model="x.Id" v-model="x.Id"
size="small" size="small"
placeholder="请选择" placeholder="请选择"
@change="selectdis()" @change="selectdis($event, y)"
clearable clearable
> >
<el-option <el-option
...@@ -33,30 +33,11 @@ ...@@ -33,30 +33,11 @@
:value="item.Id" :value="item.Id"
:disabled="item.disabled" :disabled="item.disabled"
> >
<div>{{ item.CompanyName }}-{{ item.ObjectName }}</div>
</el-option> </el-option>
</el-select> </el-select>
<span style="margin-left: 15px; line-height: 32px">小奖章</span> <span style="margin-left: 15px; line-height: 32px">小奖章</span>
<div style="margin-left: 5px"> <div style="margin-left: 5px">
<!-- <el-button @click="openChangeDig(1, y)" size="small"
>选择文件</el-button
>
<div
class="app-gallery-item"
style="position: relative; width: 100px; margin-top: 10px"
>
<img
v-if="!x.SmallMedal || x.SmallMedal == ''"
src="../../assets/img/default.png"
style="width: 80px; height: 80px"
alt=""
/>
<el-image
v-else
style="width: 80px; height: 80px"
:src="x.SmallMedal"
>
</el-image>
</div> -->
<el-upload <el-upload
class="avatar-uploader" class="avatar-uploader"
action action
...@@ -65,23 +46,12 @@ ...@@ -65,23 +46,12 @@
:data="{ index: y }" :data="{ index: y }"
> >
<i <i
v-if="!x.SmallIco || x.SmallIco == ''" v-if="!x.MedalImage || x.MedalImage == ''"
class="el-icon-plus avatar-uploader-icon" class="el-icon-plus avatar-uploader-icon"
></i> ></i>
<img v-else :src="x.SmallIco" class="avatar" /> <img v-else :src="x.MedalImage" class="avatar" />
</el-upload> </el-upload>
</div> </div>
<!-- <span style="margin-left: 15px;line-height: 32px;">大奖章</span>
<div style="margin-left: 5px">
<el-button @click="openChangeDig(2,y)" size="small">选择文件</el-button>
<div class="app-gallery-item" style="position: relative; width: 100px; margin-top: 10px">
<img v-if="!x.GrandMedal || x.GrandMedal == ''" src="../../assets/img/default.png"
style="width: 80px; height: 80px" alt="" />
<el-image v-else style="width: 80px; height: 80px" :src="x.GrandMedal">
</el-image>
</div>
</div> -->
<!-- <el-button @click="synchro()" size="small" type="primary" style="margin-left: 15px">奖章同步</el-button> -->
<el-tooltip <el-tooltip
class="item" class="item"
effect="dark" effect="dark"
...@@ -100,17 +70,12 @@ ...@@ -100,17 +70,12 @@
type="textarea" type="textarea"
:rows="2" :rows="2"
placeholder="请输入内容" placeholder="请输入内容"
v-model="x.comment" v-model="x.Reviews"
class="w400" class="w400"
style="margin-left: 15px" style="margin-left: 15px"
> >
</el-input> </el-input>
</div> </div>
<!-- <div style="margin: 20px 0;display: flex;align-items: flex-start;">
评语:
<el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="x.comment" class='w400' style='margin-left: 15px;'>
</el-input>
</div> -->
</div> </div>
</div> </div>
<div style="margin-top: 20px"> <div style="margin-top: 20px">
...@@ -145,6 +110,7 @@ export default { ...@@ -145,6 +110,7 @@ export default {
msgList: [], msgList: [],
enterpriseList: [], //入围企业 enterpriseList: [], //入围企业
msgListindex: 0, msgListindex: 0,
sort: 0,
msg: { msg: {
Type: 0, Type: 0,
ListId: 0, ListId: 0,
...@@ -161,13 +127,14 @@ export default { ...@@ -161,13 +127,14 @@ export default {
this.dataobj.Finalists = this.$route.query.PrizeNum; this.dataobj.Finalists = this.$route.query.PrizeNum;
} }
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 = {
Id: "", //企业ID Id: "", //企业ID
comment: "", //评语 UserId: "", //用户ID
SmallMedal: "", //小奖章 Reviews: "", //评语
GrandMedal: "", //大奖章 MedalImage: "", //小奖章
MedalImageBig: "", //大奖章
Rank: i + 1, //排名
}; };
this.msgList.push(obj); this.msgList.push(obj);
...@@ -197,17 +164,22 @@ export default { ...@@ -197,17 +164,22 @@ export default {
let Grand = ""; let Grand = "";
this.msgList.forEach((x, y) => { this.msgList.forEach((x, y) => {
if (y == index) { if (y == index) {
Small = x.SmallMedal; Small = x.MedalImage;
Grand = x.GrandMedal; Grand = x.MedalImageBig;
} }
if (y > index) { if (y > index) {
//之后同步数据 //之后同步数据
x.SmallMedal = Small; x.MedalImage = Small;
x.GrandMedal = Grand; x.MedalImageBig = Grand;
} }
}); });
}, },
selectdis() { selectdis(val, index) {
this.enterpriseList.forEach((e) => {
if ((val = e.Id)) {
this.msgList[index].UserId = e.UserId;
}
});
//企业下拉禁止选择处理 //企业下拉禁止选择处理
this.enterpriseList.forEach((x, y) => { this.enterpriseList.forEach((x, y) => {
let ishow = false; let ishow = false;
...@@ -225,8 +197,8 @@ export default { ...@@ -225,8 +197,8 @@ export default {
}); });
}, },
//保存品牌 //保存榜单排名
Save(formName) {}, Save() {},
//获取详情 //获取详情
getData(ID) { getData(ID) {
this.apipost( this.apipost(
...@@ -254,14 +226,12 @@ export default { ...@@ -254,14 +226,12 @@ export default {
this.enterpriseList.forEach((e, i) => { this.enterpriseList.forEach((e, i) => {
e.disabled = false; e.disabled = false;
}); });
console.log(239, this.enterpriseList);
} }
} }
); );
}, },
//上传小奖章 //上传小奖章
UploadSmall(file) { UploadSmall(file) {
console.log(file);
let imgSrc = window.URL.createObjectURL(file.file); let imgSrc = window.URL.createObjectURL(file.file);
let img = new Image(); let img = new Image();
img.src = imgSrc; img.src = imgSrc;
...@@ -275,7 +245,7 @@ export default { ...@@ -275,7 +245,7 @@ export default {
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;
this.msgList[index].SmallIco = res.FileUrl; this.msgList[index].MedalImage = res.FileUrl;
} }
}); });
}, },
......
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