|
@@ -16,13 +16,13 @@
|
|
>
|
|
>
|
|
生成链接
|
|
生成链接
|
|
</div>
|
|
</div>
|
|
- <!-- <div class="newBand" @click="onExport" style="max-width: 150px">
|
|
|
|
|
|
+ <div class="newBand" @click="onExport" style="max-width: 150px" v-if="permission('replacementInstrumentActivity/export')">
|
|
导出
|
|
导出
|
|
- </div> -->
|
|
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
<save-form
|
|
<save-form
|
|
:inline="true"
|
|
:inline="true"
|
|
- ref='searchForm'
|
|
|
|
|
|
+ ref="searchForm"
|
|
:model="searchForm"
|
|
:model="searchForm"
|
|
@submit="search"
|
|
@submit="search"
|
|
@reset="onReSet"
|
|
@reset="onReSet"
|
|
@@ -113,9 +113,9 @@
|
|
<el-table-column align="center" prop="studentId" label="操作">
|
|
<el-table-column align="center" prop="studentId" label="操作">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<div>
|
|
<div>
|
|
- <!-- <el-button type="text" @click="lookDetail(scope.row)"
|
|
|
|
|
|
+ <el-button type="text" @click="lookDetail(scope.row)" v-if="permission('replacementInstrumentActivity/queryPage')"
|
|
>详情</el-button
|
|
>详情</el-button
|
|
- > -->
|
|
|
|
|
|
+ >
|
|
<el-button
|
|
<el-button
|
|
type="text"
|
|
type="text"
|
|
@click="onCreateQRCode(scope.row, '调查链接')"
|
|
@click="onCreateQRCode(scope.row, '调查链接')"
|
|
@@ -129,7 +129,10 @@
|
|
<el-button
|
|
<el-button
|
|
type="text"
|
|
type="text"
|
|
@click="openPay(scope.row)"
|
|
@click="openPay(scope.row)"
|
|
- v-if="!scope.row.openPay&&permission('replacementInstrumentCooperation/openPay')"
|
|
|
|
|
|
+ v-if="
|
|
|
|
+ !scope.row.openPay &&
|
|
|
|
+ permission('replacementInstrumentCooperation/openPay')
|
|
|
|
+ "
|
|
>开启缴费</el-button
|
|
>开启缴费</el-button
|
|
>
|
|
>
|
|
</div>
|
|
</div>
|
|
@@ -165,7 +168,7 @@
|
|
width="1000px"
|
|
width="1000px"
|
|
v-if="detailVisible"
|
|
v-if="detailVisible"
|
|
>
|
|
>
|
|
- <detail ref="detail" @close="close" />
|
|
|
|
|
|
+ <detail ref="detail" @close="close" :detail="activeRow" />
|
|
<div slot="footer">
|
|
<div slot="footer">
|
|
<el-button type="primary" @click="detailVisible = false"
|
|
<el-button type="primary" @click="detailVisible = false"
|
|
>确定</el-button
|
|
>确定</el-button
|
|
@@ -173,9 +176,7 @@
|
|
</div>
|
|
</div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
- <qr-code v-model="qrcodeStatus"
|
|
|
|
- :title="qrcodeName"
|
|
|
|
- :codeUrl="codeUrl" />
|
|
|
|
|
|
+ <qr-code v-model="qrcodeStatus" :title="qrcodeName" :codeUrl="codeUrl" />
|
|
|
|
|
|
<!-- <el-dialog :title="qrcodeName" :visible.sync="qrcodeStatus" width="300px">
|
|
<!-- <el-dialog :title="qrcodeName" :visible.sync="qrcodeStatus" width="300px">
|
|
<div class="left-code">
|
|
<div class="left-code">
|
|
@@ -200,9 +201,12 @@ import addUrl from "./modals/addUrl";
|
|
import detail from "./modals/detail";
|
|
import detail from "./modals/detail";
|
|
import load from "@/utils/loading";
|
|
import load from "@/utils/loading";
|
|
import { getReplacementList, openPayReplacement } from "./api";
|
|
import { getReplacementList, openPayReplacement } from "./api";
|
|
|
|
+import { Export } from '@/utils/downLoadFile'
|
|
|
|
+import cleanDeep from 'clean-deep'
|
|
|
|
+import qs from 'qs';
|
|
import QrCode from "@/components/QrCode/index";
|
|
import QrCode from "@/components/QrCode/index";
|
|
export default {
|
|
export default {
|
|
- components: { pagination, addUrl, detail, QrCode, },
|
|
|
|
|
|
+ components: { pagination, addUrl, detail, QrCode },
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
searchForm: {
|
|
searchForm: {
|
|
@@ -225,6 +229,7 @@ export default {
|
|
qrcodes: true,
|
|
qrcodes: true,
|
|
qrcodeStatus: false,
|
|
qrcodeStatus: false,
|
|
qrcodeName: "调查链接",
|
|
qrcodeName: "调查链接",
|
|
|
|
+ activeRow: null,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|
|
@@ -261,8 +266,8 @@ export default {
|
|
this.getList();
|
|
this.getList();
|
|
},
|
|
},
|
|
onReSet() {
|
|
onReSet() {
|
|
- this.$refs.searchForm.resetFields()
|
|
|
|
- this.search()
|
|
|
|
|
|
+ this.$refs.searchForm.resetFields();
|
|
|
|
+ this.search();
|
|
},
|
|
},
|
|
makeUrl() {
|
|
makeUrl() {
|
|
this.makeUrlVisible = true;
|
|
this.makeUrlVisible = true;
|
|
@@ -274,8 +279,27 @@ export default {
|
|
this.makeUrlVisible = false;
|
|
this.makeUrlVisible = false;
|
|
this.detailVisible = false;
|
|
this.detailVisible = false;
|
|
},
|
|
},
|
|
- onExport() {},
|
|
|
|
|
|
+ async onExport() {
|
|
|
|
+ const { search, ...rest } = this.searchForm;
|
|
|
|
+ let obj = {
|
|
|
|
+ ...rest,
|
|
|
|
+ page: this.rules.page,
|
|
|
|
+ rows: this.rules.limit,
|
|
|
|
+ cooperationOrganIdOrName:search
|
|
|
|
+ };
|
|
|
|
+ await Export(
|
|
|
|
+ this,
|
|
|
|
+ {
|
|
|
|
+ url: "/api-web/replacementInstrumentActivity/export",
|
|
|
|
+ fileName: "乐器置换列表.xlsx",
|
|
|
|
+ method: "post",
|
|
|
|
+ params: qs.stringify(cleanDeep(obj)),
|
|
|
|
+ },
|
|
|
|
+ "您确定导出乐器置换列表"
|
|
|
|
+ );
|
|
|
|
+ },
|
|
lookDetail(row) {
|
|
lookDetail(row) {
|
|
|
|
+ this.activeRow = row;
|
|
this.detailVisible = true;
|
|
this.detailVisible = true;
|
|
},
|
|
},
|
|
onCreateQRCode(row, name) {
|
|
onCreateQRCode(row, name) {
|
|
@@ -296,22 +320,28 @@ export default {
|
|
// colorLight: "#ffffff",
|
|
// colorLight: "#ffffff",
|
|
// correctLevel: QRCode.CorrectLevel.H,
|
|
// correctLevel: QRCode.CorrectLevel.H,
|
|
// });
|
|
// });
|
|
- let str;
|
|
|
|
- if (name == "调查链接") {
|
|
|
|
- let returnUrl = vaildStudentUrl()+`/#/questionnaire?o=${row.organId}&c=${row.cooperationOrganId}`;
|
|
|
|
- // console.log(returnUrl)
|
|
|
|
- // let tempUrl = vaildStudentUrl()+`/#/transfer?returnUrl=${encodeURIComponent(returnUrl)}`
|
|
|
|
- str = returnUrl
|
|
|
|
- } else if (name == "统计链接") {
|
|
|
|
- str = vaildTeachingUrl()+`/#/questionStatistics?o=${row.organId}&c=${row.cooperationOrganId}`;
|
|
|
|
- }
|
|
|
|
- // vaildTeachingUrl
|
|
|
|
- // this.qrcode.makeCode(
|
|
|
|
- // str +
|
|
|
|
- // `/#/questionnaireInfo?o=${row.organId}&c=${row.cooperationOrganId}`
|
|
|
|
- // );
|
|
|
|
- this.codeUrl =str;
|
|
|
|
- this.qrcodes = true;
|
|
|
|
|
|
+ let str;
|
|
|
|
+ if (name == "调查链接") {
|
|
|
|
+ let returnUrl =
|
|
|
|
+ vaildStudentUrl() +
|
|
|
|
+ `/#/questionnaire?o=${row.organId}&c=${row.cooperationOrganId}`;
|
|
|
|
+ // console.log(returnUrl)
|
|
|
|
+ let tempUrl =
|
|
|
|
+ vaildStudentUrl() +
|
|
|
|
+ `/#/transfer?returnUrl=${encodeURIComponent(returnUrl)}`;
|
|
|
|
+ str = tempUrl;
|
|
|
|
+ } else if (name == "统计链接") {
|
|
|
|
+ str =
|
|
|
|
+ vaildTeachingUrl() +
|
|
|
|
+ `/#/questionStatistics?o=${row.organId}&c=${row.cooperationOrganId}`;
|
|
|
|
+ }
|
|
|
|
+ // vaildTeachingUrl
|
|
|
|
+ // this.qrcode.makeCode(
|
|
|
|
+ // str +
|
|
|
|
+ // `/#/questionnaireInfo?o=${row.organId}&c=${row.cooperationOrganId}`
|
|
|
|
+ // );
|
|
|
|
+ this.codeUrl = str;
|
|
|
|
+ this.qrcodes = true;
|
|
// }, 100);
|
|
// }, 100);
|
|
}
|
|
}
|
|
},
|
|
},
|