提交 608a2481 编写于 作者: tao.wu's avatar tao.wu

下载二维码接口/web前端修改入参

上级 4b80fe6f
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<div class="qr-group"> <div class="qr-group">
<p class="label-name">二维码分组:</p> <p class="label-name">二维码分组:</p>
<template v-for="(labelItem, index) in labelsInfoList"> <template v-for="(labelItem, index) in labelsInfoList">
<el-tag size="small" :key="index">{{labelItem.labelName}}</el-tag> <el-tag size="small" :key="index">{{labelItem.labelName}}</el-tag>
</template> </template>
<el-tag size="small" class="choose-group" @click="handleChooseGroup">+ 选择分组</el-tag> <el-tag size="small" class="choose-group" @click="handleChooseGroup">+ 选择分组</el-tag>
</div> </div>
...@@ -19,10 +19,10 @@ ...@@ -19,10 +19,10 @@
<div class="pic"> <div class="pic">
<canvas id="msg"></canvas> <canvas id="msg"></canvas>
<el-button icon="el-icon-download" class="qr-download-btn" @click="handleQRDownloadModal">下载二维码</el-button> <el-button icon="el-icon-download" class="qr-download-btn" @click="handleQRDownloadModal">下载二维码</el-button>
</div> </div>
<p class="time-limit">有效期:{{qrCodeInfo.beginTime}}-{{qrCodeInfo.endTime}} </p> <p class="time-limit">有效期:{{qrCodeInfo.beginTime}}-{{qrCodeInfo.endTime}} </p>
<el-button icon="el-icon-refresh" class="refresh-btn" size="small" @click="handleRefreshCode">刷新有效期</el-button> <el-button icon="el-icon-refresh" class="refresh-btn" size="small" @click="handleRefreshCode">刷新有效期</el-button>
</div> </div>
</div> </div>
<div class="border-space"></div> <div class="border-space"></div>
<div class="increased-steps-wrap"> <div class="increased-steps-wrap">
...@@ -158,14 +158,22 @@ ...@@ -158,14 +158,22 @@
beginTime, beginTime,
endTime, endTime,
forever, forever,
labels: [], // ["高血压","糖尿病","脑卒中"] // labels: [], // ["高血压","糖尿病","脑卒中"]
labelList: [ {
"labelId": 123,
"labelName": "第一个分组"
},]
}; };
let idArr = params.labelIds.split(','); // [1,3,55] let idArr = params.labelIds.split(','); // [1,3,55]
let checkArr = this.labelNameList; let checkArr = this.labelNameList;
for(let i=0; i<idArr.length; i++) { for(let i=0; i<idArr.length; i++) {
for(let j=0; j<checkArr.length; j++) { for(let j=0; j<checkArr.length; j++) {
if( idArr[i] == checkArr[j].labelId ) { if( idArr[i] == checkArr[j].labelId ) {
obj.labels.push( checkArr[j].labelName ); // obj.labels.push( checkArr[j].labelName );
obj.labelList.push({
labelId: checkArr[j].labelId,
labelName: checkArr[j].labelName
})
} }
} }
} }
...@@ -207,7 +215,7 @@ ...@@ -207,7 +215,7 @@
}, },
handleChooseGroup() { handleChooseGroup() {
// debugger; // debugger;
this.showDownloadQRModal = false; this.showDownloadQRModal = false;
// 回显已经选择的label // 回显已经选择的label
this.choosedLabelList = this.currentLabelList; this.choosedLabelList = this.currentLabelList;
this.goToGetGroupList(); this.goToGetGroupList();
...@@ -235,7 +243,7 @@ ...@@ -235,7 +243,7 @@
}) })
}, },
handleQRDownloadModal() { handleQRDownloadModal() {
this.showDownloadQRModal = true; this.showDownloadQRModal = true;
// 回显已经选择的label // 回显已经选择的label
this.choosedLabelList = this.currentLabelList; this.choosedLabelList = this.currentLabelList;
this.goToGetGroupList(); this.goToGetGroupList();
...@@ -253,7 +261,7 @@ ...@@ -253,7 +261,7 @@
}else{ // 下载二维码时 }else{ // 下载二维码时
// 获取最新二维码参数,但不影响之前的二维码参数 // 获取最新二维码参数,但不影响之前的二维码参数
this.goToGetQRCode({ this.goToGetQRCode({
labelIds: this.choosedLabelList.join(','), labelIds: this.choosedLabelList.join(','),
id: '', id: '',
first: false, first: false,
justDownload: true, justDownload: true,
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册