|
|
@@ -23,8 +23,12 @@
|
|
|
{{ `${scope.row.actStartTime}-${scope.row.actEndTime}` }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="a" label="活动规则"></el-table-column>
|
|
|
- <el-table-column prop="a" label="收集数量"></el-table-column>
|
|
|
+ <el-table-column prop="actDesc" label="活动规则"></el-table-column>
|
|
|
+ <el-table-column prop="listNum" label="收集数量">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button type="text" @click="showNumber(scope.row)">{{ scope.row.listNum }}</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column prop="actStatus" label="状态">
|
|
|
<template slot-scope="scope">
|
|
|
{{ scope.row.actStatus == '1'?'开启':scope.row.actStatus == '2'?'关闭':'' }}
|
|
|
@@ -48,11 +52,40 @@
|
|
|
@pagination="initList"
|
|
|
/>
|
|
|
</div>
|
|
|
+ <el-dialog
|
|
|
+ :visible.sync="numberShow"
|
|
|
+ width="400"
|
|
|
+ >
|
|
|
+ <el-form :model="viewForm">
|
|
|
+ <el-form-item prop="userInfo" label="用户信息">
|
|
|
+ <el-input placeholder="请输入用户信息" v-model="viewForm.userInfo"></el-input>
|
|
|
+ <el-button @click="viewSearch()" type="primary" style="margin-left: 10px;">搜索</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div class="mid-action">
|
|
|
+ <el-button type="primary" @click="addDownoad">导出</el-button>
|
|
|
+ </div>
|
|
|
+ <el-table
|
|
|
+ :data="numbersData"
|
|
|
+ >
|
|
|
+ <el-table-column label="序号" type="index"></el-table-column>
|
|
|
+ <el-table-column label="用户ID" prop="userId"></el-table-column>
|
|
|
+ <el-table-column label="填写信息" prop="userInfo"></el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <pagination
|
|
|
+ v-show="total1 > 0"
|
|
|
+ :total="total1"
|
|
|
+ :page.sync="viewForm.pageNum"
|
|
|
+ :limit.sync="viewForm.pageSize"
|
|
|
+ @pagination="initViewList"
|
|
|
+ />
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import * as api from "@/api/lottery";
|
|
|
+import {getFormRecord} from "@/api/lottery";
|
|
|
|
|
|
export default {
|
|
|
name: "formList",
|
|
|
@@ -65,9 +98,16 @@ export default {
|
|
|
},
|
|
|
total: 1,
|
|
|
loading: false,
|
|
|
- tableData: [{
|
|
|
- a: 1
|
|
|
- }]
|
|
|
+ tableData: [],
|
|
|
+ numberShow: false,
|
|
|
+ numbersData: [],
|
|
|
+ viewForm: {
|
|
|
+ userInfo: '',
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10
|
|
|
+ },
|
|
|
+ total1: 0,
|
|
|
+ viewId: ''
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
@@ -95,7 +135,44 @@ export default {
|
|
|
path: 'add'
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
+ showNumber(row) {
|
|
|
+ this.numberShow = true
|
|
|
+ this.viewId = row.actId
|
|
|
+ this.initViewList()
|
|
|
+ },
|
|
|
+ initViewList() {
|
|
|
+ api.getFormRecord({
|
|
|
+ actId: this.viewId
|
|
|
+ }).then(res => {
|
|
|
+ if(res.code == 200) {
|
|
|
+ this.numbersData = res.rows
|
|
|
+ this.total1 = res.total
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ viewSearch() {
|
|
|
+ this.initViewList()
|
|
|
+ },
|
|
|
+ addDownoad() {
|
|
|
+ api.exportRedEnvelopeRecord({
|
|
|
+ actId: this.viewId
|
|
|
+ }).then(res => {
|
|
|
+ const blob = new Blob([res], { type: 'application/vnd.ms-excel' });
|
|
|
+ const fileName = '表单活动' + new Date().getTime() + '.xlsx';
|
|
|
+ if ('download' in document.createElement('a')) {
|
|
|
+ const elink = document.createElement('a');
|
|
|
+ elink.download = fileName;
|
|
|
+ elink.style.display = 'none';
|
|
|
+ elink.href = URL.createObjectURL(blob);
|
|
|
+ document.body.appendChild(elink);
|
|
|
+ elink.click();
|
|
|
+ URL.revokeObjectURL(elink.href);
|
|
|
+ document.body.removeChild(elink);
|
|
|
+ } else {
|
|
|
+ navigator.msSaveBlob(blob, fileName);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
handleClose(row) {
|
|
|
api.editActivityStatus({
|
|
|
actId: row.actId,
|