|
@@ -1,287 +1,318 @@
|
|
|
|
|
|
<template>
|
|
|
- <div class="m-container">
|
|
|
- <h2>
|
|
|
- <div class="squrt"></div>考级报名列表
|
|
|
- </h2>
|
|
|
- <div class="m-core">
|
|
|
- <!-- 搜索标题 -->
|
|
|
- <el-form :inline="true" class="searchForm" v-model.trim="searchForm">
|
|
|
- <el-form-item>
|
|
|
- <el-input
|
|
|
- v-model.trim="searchForm.orderNo"
|
|
|
- placeholder="请输入订单编号"
|
|
|
- ></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item>
|
|
|
- <el-input
|
|
|
- v-model.trim="searchForm.transNo"
|
|
|
- placeholder="请输入交易流水号"
|
|
|
- ></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item>
|
|
|
- <el-input
|
|
|
- v-model.trim="searchForm.city"
|
|
|
- @keyup.enter.native="city"
|
|
|
- placeholder="请输入城市名"
|
|
|
- ></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item>
|
|
|
- <el-select
|
|
|
- class="multiple"
|
|
|
- v-model.trim="searchForm.status"
|
|
|
- filterable
|
|
|
- clearable
|
|
|
- placeholder="请选择缴费状态">
|
|
|
- <el-option value="reg" label="未缴费"></el-option>
|
|
|
- <el-option value="pay" label="已缴费"></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item>
|
|
|
- <el-date-picker
|
|
|
- v-model.trim="orderDate"
|
|
|
- style="width:410px;"
|
|
|
- type="daterange"
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
- @change="searchOrderDate"
|
|
|
- range-separator="至"
|
|
|
- start-placeholder="开始日期"
|
|
|
- end-placeholder="结束日期"
|
|
|
- ></el-date-picker>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item>
|
|
|
- <el-button @click="onSearch" type="danger">搜索</el-button>
|
|
|
- <!-- <el-button @click="onReSet" type="primary">重置</el-button> -->
|
|
|
- <el-button @click="onExport" v-permission="'export/degreeRegistration/825'" type="primary">导出</el-button>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- <div style="font-size: 14px; color: #F85043; padding-bottom: 10px;">
|
|
|
- 报考总人数:{{ totalNumber }}人<i style="width: 10px; display: inline-block"></i>
|
|
|
- 实收总金额:{{ totalAmount }}元
|
|
|
- </div>
|
|
|
- <div class="tableWrap">
|
|
|
- <el-table :data="tableList"
|
|
|
- :header-cell-style="{background:'#EDEEF0',color:'#444'}">>
|
|
|
- <el-table-column width="90px" align="center" prop="id" label="编号"></el-table-column>
|
|
|
- <el-table-column align="center" prop="name" label="姓名"></el-table-column>
|
|
|
- <el-table-column align="center" prop="orderNo" label="订单编号"></el-table-column>
|
|
|
- <el-table-column align="center" prop="transNo" label="交易流水号">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-tooltip placement="top-start">
|
|
|
- <div slot="content">{{ scope.row.transNo }}</div>
|
|
|
- <span>{{ scope.row.transNo }}</span>
|
|
|
- </el-tooltip>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column align="center" prop="gender" label="性别">
|
|
|
- <template slot-scope="scope">
|
|
|
- {{ scope.row.gender == 1 ? '男' : '女' }}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column align="center" prop="idcard" label="身份证号"></el-table-column>
|
|
|
- <el-table-column align="center" prop="mobile" label="联系电话"></el-table-column>
|
|
|
- <el-table-column align="center" prop="city" label="城市"></el-table-column>
|
|
|
- <el-table-column align="center" prop="subject" label="报考乐器"></el-table-column>
|
|
|
- <el-table-column align="center" prop="level" label="报考级别"></el-table-column>
|
|
|
- <el-table-column align="center" prop="theoryLevel" label="乐理级别"></el-table-column>
|
|
|
- <el-table-column align="center" label="缴费状态">
|
|
|
- <template slot-scope="scope">
|
|
|
- {{ scope.row.status == 2 ? '已缴费' : '未缴费' }}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column align="center" prop="money" label="报考级别费用">
|
|
|
- <template slot-scope="scope">
|
|
|
- {{ scope.row.money }}元
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column align="center" prop="theoryMoney" label="乐理级别费用">
|
|
|
- <template slot-scope="scope">
|
|
|
- {{ scope.row.theoryMoney }}元
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column align="center" label="证书">
|
|
|
- <template slot-scope="scope">
|
|
|
- <div v-if="scope.row.theoryCert">
|
|
|
- <el-image
|
|
|
- fit="cover"
|
|
|
- style="width: 100px; height: 100px"
|
|
|
- :src="scope.row.theoryCert"
|
|
|
- :preview-src-list="[scope.row.theoryCert]">
|
|
|
- </el-image>
|
|
|
- </div>
|
|
|
- <div v-else>--</div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column align="center" prop="createTime" label="报名时间"></el-table-column>
|
|
|
- <el-table-column align="center" prop="memo" label="备注"></el-table-column>
|
|
|
- <!-- <el-table-column align="center" label="操作">
|
|
|
+ <div class="m-container">
|
|
|
+ <h2>
|
|
|
+ <div class="squrt"></div>考级报名列表
|
|
|
+ </h2>
|
|
|
+ <div class="m-core">
|
|
|
+ <!-- 搜索标题 -->
|
|
|
+ <el-form :inline="true" class="searchForm" v-model.trim="searchForm">
|
|
|
+ <el-form-item>
|
|
|
+ <el-input v-model.trim="searchForm.orderNo" placeholder="请输入订单编号"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-input v-model.trim="searchForm.transNo" placeholder="请输入交易流水号"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-input v-model.trim="searchForm.city" @keyup.enter.native="city" placeholder="请输入城市名"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-select v-model.trim="searchForm.organId" filterable clearable placeholder="请选择分部">
|
|
|
+ <el-option
|
|
|
+ v-for="item in branchList"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-select
|
|
|
+ class="multiple"
|
|
|
+ v-model.trim="searchForm.status"
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
+ placeholder="请选择缴费状态"
|
|
|
+ >
|
|
|
+ <el-option value="reg" label="未缴费"></el-option>
|
|
|
+ <el-option value="pay" label="已缴费"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-date-picker
|
|
|
+ v-model.trim="orderDate"
|
|
|
+ style="width:410px;"
|
|
|
+ type="daterange"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ @change="searchOrderDate"
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期"
|
|
|
+ ></el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button @click="onSearch" type="danger">搜索</el-button>
|
|
|
+ <!-- <el-button @click="onReSet" type="primary">重置</el-button> -->
|
|
|
+ <el-button
|
|
|
+ @click="onExport"
|
|
|
+ v-permission="'export/degreeRegistration/825'"
|
|
|
+ type="primary"
|
|
|
+ >导出</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div style="font-size: 14px; color: #F85043; padding-bottom: 10px;">
|
|
|
+ 报考总人数:{{ totalNumber }}人
|
|
|
+ <i style="width: 10px; display: inline-block"></i>
|
|
|
+ 实收总金额:{{ totalAmount }}元
|
|
|
+ </div>
|
|
|
+ <div class="tableWrap">
|
|
|
+ <el-table :data="tableList" :header-cell-style="{background:'#EDEEF0',color:'#444'}">
|
|
|
+ >
|
|
|
+ <el-table-column width="90px" align="center" prop="id" label="编号"></el-table-column>
|
|
|
+ <el-table-column align="center" prop="name" label="姓名"></el-table-column>
|
|
|
+ <el-table-column align="center" prop="orderNo" label="订单编号"></el-table-column>
|
|
|
+ <el-table-column align="center" prop="transNo" label="交易流水号">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-tooltip placement="top-start">
|
|
|
+ <div slot="content">{{ scope.row.transNo }}</div>
|
|
|
+ <span>{{ scope.row.transNo }}</span>
|
|
|
+ </el-tooltip>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" prop="gender" label="性别">
|
|
|
+ <template slot-scope="scope">{{ scope.row.gender == 1 ? '男' : '女' }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" prop="idcard" label="身份证号"></el-table-column>
|
|
|
+ <el-table-column align="center" prop="mobile" label="联系电话"></el-table-column>
|
|
|
+ <el-table-column align="center" prop="city" label="城市"></el-table-column>
|
|
|
+ <el-table-column align="center" prop="subject" label="报考乐器"></el-table-column>
|
|
|
+ <el-table-column align="center" prop="level" label="报考级别"></el-table-column>
|
|
|
+ <el-table-column align="center" prop="theoryLevel" label="乐理级别"></el-table-column>
|
|
|
+ <el-table-column align="center" label="缴费状态">
|
|
|
+ <template slot-scope="scope">{{ scope.row.status == 2 ? '已缴费' : '未缴费' }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" prop="money" label="报考级别费用">
|
|
|
+ <template slot-scope="scope">{{ scope.row.money }}元</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" prop="theoryMoney" label="乐理级别费用">
|
|
|
+ <template slot-scope="scope">{{ scope.row.theoryMoney }}元</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" label="证书">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div v-if="scope.row.theoryCert">
|
|
|
+ <el-image
|
|
|
+ fit="cover"
|
|
|
+ style="width: 100px; height: 100px"
|
|
|
+ :src="scope.row.theoryCert"
|
|
|
+ :preview-src-list="[scope.row.theoryCert]"
|
|
|
+ ></el-image>
|
|
|
+ </div>
|
|
|
+ <div v-else>--</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" prop="createTime" label="报名时间"></el-table-column>
|
|
|
+ <el-table-column align="center" prop="memo" label="备注"></el-table-column>
|
|
|
+ <!-- <el-table-column align="center" label="操作">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button @click="onTypeDelOpeation(scope.row)"
|
|
|
v-permission="'helpCenterContent/delete'" type="text">删除</el-button>
|
|
|
</template>
|
|
|
- </el-table-column> -->
|
|
|
- </el-table>
|
|
|
- <pagination
|
|
|
- :total="pageInfo.total"
|
|
|
- :page.sync="pageInfo.page"
|
|
|
- :limit.sync="pageInfo.limit"
|
|
|
- :page-sizes="pageInfo.page_size"
|
|
|
- @pagination="getList"
|
|
|
- />
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ </el-table-column>-->
|
|
|
+ </el-table>
|
|
|
+ <pagination
|
|
|
+ :total="pageInfo.total"
|
|
|
+ :page.sync="pageInfo.page"
|
|
|
+ :limit.sync="pageInfo.limit"
|
|
|
+ :page-sizes="pageInfo.page_size"
|
|
|
+ @pagination="getList"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
<script>
|
|
|
import pagination from "@/components/Pagination/index";
|
|
|
import axios from "axios";
|
|
|
// import store from '@/store'
|
|
|
import { degreeQueryPage } from "./levelManageApi";
|
|
|
-import { getToken } from '@/utils/auth'
|
|
|
-import load from '@/utils/loading'
|
|
|
+import { getToken } from "@/utils/auth";
|
|
|
+import { getEmployeeOrgan } from "@/api/buildTeam";
|
|
|
+import load from "@/utils/loading";
|
|
|
export default {
|
|
|
components: { pagination },
|
|
|
name: "helpCategory",
|
|
|
data() {
|
|
|
return {
|
|
|
- orderDate: null,
|
|
|
- searchForm: {
|
|
|
- orderNo: null,
|
|
|
- transNo: null,
|
|
|
- city: null,
|
|
|
- status: null,
|
|
|
- startTime: null,
|
|
|
- endTime: null
|
|
|
- },
|
|
|
- totalNumber: 0,
|
|
|
- totalAmount: 0,
|
|
|
- tableList: [],
|
|
|
- pageInfo: {
|
|
|
- // 分页规则
|
|
|
- limit: 10, // 限制显示条数
|
|
|
- page: 1, // 当前页
|
|
|
- total: 0, // 总条数
|
|
|
- page_size: [10, 20, 40, 50] // 选择限制显示条数
|
|
|
- },
|
|
|
- tempTreeList: []
|
|
|
+ orderDate: null,
|
|
|
+ searchForm: {
|
|
|
+ orderNo: null,
|
|
|
+ transNo: null,
|
|
|
+ city: null,
|
|
|
+ status: null,
|
|
|
+ startTime: null,
|
|
|
+ organId: null,
|
|
|
+ endTime: null,
|
|
|
+ },
|
|
|
+ totalNumber: 0,
|
|
|
+ totalAmount: 0,
|
|
|
+ tableList: [],
|
|
|
+ branchList: [], // 分部列表
|
|
|
+ pageInfo: {
|
|
|
+ // 分页规则
|
|
|
+ limit: 10, // 限制显示条数
|
|
|
+ page: 1, // 当前页
|
|
|
+ total: 0, // 总条数
|
|
|
+ page_size: [10, 20, 40, 50], // 选择限制显示条数
|
|
|
+ },
|
|
|
+ tempTreeList: [],
|
|
|
};
|
|
|
},
|
|
|
activated() {
|
|
|
this.getList();
|
|
|
+ this.__init();
|
|
|
},
|
|
|
mounted() {
|
|
|
this.getList();
|
|
|
+ this.__init();
|
|
|
},
|
|
|
methods: {
|
|
|
+ __init() {
|
|
|
+ getEmployeeOrgan().then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.branchList = [];
|
|
|
+ res.data.forEach((item) => {
|
|
|
+ this.branchList.push({
|
|
|
+ label: item.name,
|
|
|
+ value: item.id,
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
onSearch() {
|
|
|
- let pageInfo = this.pageInfo
|
|
|
- pageInfo.page = 1
|
|
|
- this.getList()
|
|
|
+ let pageInfo = this.pageInfo;
|
|
|
+ pageInfo.page = 1;
|
|
|
+ this.getList();
|
|
|
},
|
|
|
onReSet() {
|
|
|
- // 重置搜索
|
|
|
- this.orderDate = null;
|
|
|
- this.searchForm = {
|
|
|
- orderNo: null,
|
|
|
- transNo: null,
|
|
|
- city: null,
|
|
|
- status: null,
|
|
|
- startTime: null,
|
|
|
- endTime: null
|
|
|
- }
|
|
|
- this.getList();
|
|
|
+ // 重置搜索
|
|
|
+ this.orderDate = null;
|
|
|
+ this.searchForm = {
|
|
|
+ orderNo: null,
|
|
|
+ transNo: null,
|
|
|
+ city: null,
|
|
|
+ status: null,
|
|
|
+ startTime: null,
|
|
|
+ organId: null,
|
|
|
+ endTime: null,
|
|
|
+ };
|
|
|
+ this.getList();
|
|
|
},
|
|
|
getList() {
|
|
|
- let searchForm = this.searchForm
|
|
|
- let params = {
|
|
|
- orderNo: searchForm.orderNo ? searchForm.orderNo : null,
|
|
|
- transNo: searchForm.transNo ? searchForm.transNo : null,
|
|
|
- city: searchForm.city ? searchForm.city : null,
|
|
|
- status: searchForm.status ? searchForm.status : null,
|
|
|
- startTime: searchForm.startTime ? searchForm.startTime : null,
|
|
|
- endTime: searchForm.endTime ? searchForm.endTime : null,
|
|
|
- page: this.pageInfo.page,
|
|
|
- rows: this.pageInfo.limit
|
|
|
+ let searchForm = this.searchForm;
|
|
|
+ let params = {
|
|
|
+ orderNo: searchForm.orderNo ? searchForm.orderNo : null,
|
|
|
+ transNo: searchForm.transNo ? searchForm.transNo : null,
|
|
|
+ city: searchForm.city ? searchForm.city : null,
|
|
|
+ status: searchForm.status ? searchForm.status : null,
|
|
|
+ startTime: searchForm.startTime ? searchForm.startTime : null,
|
|
|
+ endTime: searchForm.endTime ? searchForm.endTime : null,
|
|
|
+ organId: searchForm.organId ? searchForm.organId : null,
|
|
|
+ page: this.pageInfo.page,
|
|
|
+ rows: this.pageInfo.limit,
|
|
|
+ };
|
|
|
+ degreeQueryPage(params).then((res) => {
|
|
|
+ let result = res.data;
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.totalNumber = result.total;
|
|
|
+ this.totalAmount = result.totalAmount;
|
|
|
+ this.tableList = result.rows;
|
|
|
+ this.pageInfo.total = result.total;
|
|
|
}
|
|
|
- degreeQueryPage(params).then(res => {
|
|
|
- let result = res.data;
|
|
|
- if (res.code == 200) {
|
|
|
- this.totalNumber = result.total
|
|
|
- this.totalAmount = result.totalAmount
|
|
|
- this.tableList = result.rows;
|
|
|
- this.pageInfo.total = result.total
|
|
|
- }
|
|
|
- });
|
|
|
+ });
|
|
|
},
|
|
|
searchOrderDate(value) {
|
|
|
- if (value) {
|
|
|
- this.searchForm.startTime = value[0];
|
|
|
- this.searchForm.endTime = value[1];
|
|
|
- } else {
|
|
|
- this.searchForm.startTime = null;
|
|
|
- this.searchForm.endTime = null;
|
|
|
- }
|
|
|
+ if (value) {
|
|
|
+ this.searchForm.startTime = value[0];
|
|
|
+ this.searchForm.endTime = value[1];
|
|
|
+ } else {
|
|
|
+ this.searchForm.startTime = null;
|
|
|
+ this.searchForm.endTime = null;
|
|
|
+ }
|
|
|
},
|
|
|
// 导出
|
|
|
onExport() {
|
|
|
- let url = "/api-web/export/degreeRegistration";
|
|
|
- let searchForm = this.searchForm
|
|
|
- let params = {
|
|
|
- orderNo: searchForm.orderNo ? searchForm.orderNo : null,
|
|
|
- transNo: searchForm.transNo ? searchForm.transNo : null,
|
|
|
- city: searchForm.city ? searchForm.city : null,
|
|
|
- status: searchForm.status ? searchForm.status : null,
|
|
|
- startTime: searchForm.startTime ? searchForm.startTime : null,
|
|
|
- endTime: searchForm.endTime ? searchForm.endTime : null
|
|
|
- }
|
|
|
- const options = {
|
|
|
- method: "get",
|
|
|
- headers: {
|
|
|
- Authorization: getToken()
|
|
|
- },
|
|
|
- url,
|
|
|
- params: params,
|
|
|
- responseType: "blob"
|
|
|
- };
|
|
|
+ let url = "/api-web/export/degreeRegistration";
|
|
|
+ let searchForm = this.searchForm;
|
|
|
+ let params = {
|
|
|
+ orderNo: searchForm.orderNo ? searchForm.orderNo : null,
|
|
|
+ transNo: searchForm.transNo ? searchForm.transNo : null,
|
|
|
+ city: searchForm.city ? searchForm.city : null,
|
|
|
+ status: searchForm.status ? searchForm.status : null,
|
|
|
+ startTime: searchForm.startTime ? searchForm.startTime : null,
|
|
|
+ endTime: searchForm.endTime ? searchForm.endTime : null,
|
|
|
+ };
|
|
|
+ const options = {
|
|
|
+ method: "get",
|
|
|
+ headers: {
|
|
|
+ Authorization: getToken(),
|
|
|
+ },
|
|
|
+ url,
|
|
|
+ params: params,
|
|
|
+ responseType: "blob",
|
|
|
+ };
|
|
|
|
|
|
- this.$confirm("您确定导出列表?", "提示", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(() => {
|
|
|
- load.startLoading()
|
|
|
- axios(options).then(res => {
|
|
|
- let blob = new Blob([res.data], {
|
|
|
+ this.$confirm("您确定导出列表?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ load.startLoading();
|
|
|
+ axios(options)
|
|
|
+ .then((res) => {
|
|
|
+ let blob = new Blob([res.data], {
|
|
|
// type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
|
|
|
- type: "application/vnd.ms-excel;charset=utf-8"
|
|
|
+ type: "application/vnd.ms-excel;charset=utf-8",
|
|
|
//word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
|
|
|
- });
|
|
|
- let text = (new Response(blob)).text()
|
|
|
- text.then(res => {
|
|
|
- // 判断是否报错
|
|
|
- if(res.indexOf('code') != -1) {
|
|
|
- let json = JSON.parse(res)
|
|
|
- this.$message.error(json.msg)
|
|
|
- } else {
|
|
|
- let objectUrl = URL.createObjectURL(blob);
|
|
|
- let link = document.createElement("a");
|
|
|
- let nowTime = new Date();
|
|
|
- let ymd = nowTime.getFullYear() + "" + (nowTime.getMonth() + 1) + "" + nowTime.getDate() + "" + nowTime.getHours() + "" + nowTime.getMinutes();
|
|
|
- let fname = ymd + "考级报名列表";
|
|
|
- link.href = objectUrl;
|
|
|
- link.setAttribute("download", fname);
|
|
|
- document.body.appendChild(link);
|
|
|
- link.click();
|
|
|
- }
|
|
|
- })
|
|
|
- load.endLoading();
|
|
|
- }).catch(error => {
|
|
|
- this.$message.error('导出数据失败,请联系管理员');
|
|
|
- load.endLoading();
|
|
|
+ });
|
|
|
+ let text = new Response(blob).text();
|
|
|
+ text.then((res) => {
|
|
|
+ // 判断是否报错
|
|
|
+ if (res.indexOf("code") != -1) {
|
|
|
+ let json = JSON.parse(res);
|
|
|
+ this.$message.error(json.msg);
|
|
|
+ } else {
|
|
|
+ let objectUrl = URL.createObjectURL(blob);
|
|
|
+ let link = document.createElement("a");
|
|
|
+ let nowTime = new Date();
|
|
|
+ let ymd =
|
|
|
+ nowTime.getFullYear() +
|
|
|
+ "" +
|
|
|
+ (nowTime.getMonth() + 1) +
|
|
|
+ "" +
|
|
|
+ nowTime.getDate() +
|
|
|
+ "" +
|
|
|
+ nowTime.getHours() +
|
|
|
+ "" +
|
|
|
+ nowTime.getMinutes();
|
|
|
+ let fname = ymd + "考级报名列表";
|
|
|
+ link.href = objectUrl;
|
|
|
+ link.setAttribute("download", fname);
|
|
|
+ document.body.appendChild(link);
|
|
|
+ link.click();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ load.endLoading();
|
|
|
+ })
|
|
|
+ .catch((error) => {
|
|
|
+ this.$message.error("导出数据失败,请联系管理员");
|
|
|
+ load.endLoading();
|
|
|
});
|
|
|
- }).catch(() => {});
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
},
|
|
|
- }
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
@@ -298,8 +329,8 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
/deep/.el-image-viewer__close {
|
|
|
- color: #fff;
|
|
|
- opacity: 1;
|
|
|
+ color: #fff;
|
|
|
+ opacity: 1;
|
|
|
}
|
|
|
/deep/.el-date-editor.el-input {
|
|
|
width: 100% !important;
|
|
@@ -308,10 +339,10 @@ export default {
|
|
|
width: 100% !important;
|
|
|
}
|
|
|
/deep/.el-table .cell {
|
|
|
- display: -webkit-box;
|
|
|
- overflow: hidden;
|
|
|
- text-overflow: ellipsis;
|
|
|
- -webkit-line-clamp: 3;
|
|
|
- -webkit-box-orient: vertical;
|
|
|
+ display: -webkit-box;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ -webkit-line-clamp: 3;
|
|
|
+ -webkit-box-orient: vertical;
|
|
|
}
|
|
|
</style>
|