|
|
|
@ -31,6 +31,13 @@
|
|
|
|
|
}"
|
|
|
|
|
>{{ item.status == 1 ? "已发放" : "未发放" }}</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
size="mini"
|
|
|
|
|
@click="handleApplyfor(item)"
|
|
|
|
|
v-if="item.status != 1 && !item.type"
|
|
|
|
|
>申请</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
size="mini"
|
|
|
|
@ -145,6 +152,20 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
<!-- 申请 -->
|
|
|
|
|
<el-dialog :visible.sync="applyShow" width="350px" append-to-body>
|
|
|
|
|
<div slot="title" class="dialog-title">
|
|
|
|
|
<span class="title-line"></span>
|
|
|
|
|
申请操作
|
|
|
|
|
</div>
|
|
|
|
|
<el-radio-group v-model="radio">
|
|
|
|
|
<el-radio-button :label="1">电子证书</el-radio-button>
|
|
|
|
|
<el-radio-button :label="2">纸质证书</el-radio-button>
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button type="primary" @click="submitElectron">确 认</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
@ -153,6 +174,7 @@ import html2canvas from "html2canvas";
|
|
|
|
|
import {
|
|
|
|
|
dsbrecordsList,
|
|
|
|
|
dsbrecordsInfo,
|
|
|
|
|
issue,
|
|
|
|
|
} from "@/api/volunteer/gxhzs/hdzsff/index.js";
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
@ -161,6 +183,9 @@ export default {
|
|
|
|
|
height: 0,
|
|
|
|
|
overflowY: "auto",
|
|
|
|
|
},
|
|
|
|
|
currentRow: {},
|
|
|
|
|
radio: 1,
|
|
|
|
|
applyShow: false,
|
|
|
|
|
infoShow: false,
|
|
|
|
|
baseUrl: process.env.VUE_APP_BASE_API,
|
|
|
|
|
certificatesList: [],
|
|
|
|
@ -192,6 +217,46 @@ export default {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
/**电子 */
|
|
|
|
|
submitElectron() {
|
|
|
|
|
//status type
|
|
|
|
|
//1 1 志愿者电子证书发放
|
|
|
|
|
//2 2 志愿者申请纸质证书
|
|
|
|
|
//1 2 管理发放纸质证书
|
|
|
|
|
let _this = this;
|
|
|
|
|
let title = "";
|
|
|
|
|
if (this.radio == 1) {
|
|
|
|
|
title = `您确定要申请“${this.currentRow.name}”电子证书吗?`;
|
|
|
|
|
} else {
|
|
|
|
|
title = `您确定要申请“${this.currentRow.name}”纸质证书吗?`;
|
|
|
|
|
}
|
|
|
|
|
this.$modal.confirm(title).then(function () {
|
|
|
|
|
let data = {
|
|
|
|
|
status: _this.radio == 1 ? 1 : 2, //1.发放 2.未
|
|
|
|
|
id: _this.currentRow.id,
|
|
|
|
|
type: _this.radio, // 1:电子证书 2:纸制证书
|
|
|
|
|
};
|
|
|
|
|
_this.subIssue(data);
|
|
|
|
|
});
|
|
|
|
|
this.applyShow = false;
|
|
|
|
|
},
|
|
|
|
|
//电子发放
|
|
|
|
|
subIssue(data) {
|
|
|
|
|
issue(data).then((res) => {
|
|
|
|
|
this.applyShow = false;
|
|
|
|
|
this.getList();
|
|
|
|
|
if (data.type == 1) {
|
|
|
|
|
this.$modal.msgSuccess("发放成功");
|
|
|
|
|
} else {
|
|
|
|
|
this.$modal.msgSuccess("申请成功");
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
/**申请操作 */
|
|
|
|
|
handleApplyfor(row) {
|
|
|
|
|
this.currentRow = row;
|
|
|
|
|
this.applyShow = true;
|
|
|
|
|
},
|
|
|
|
|
/**下载电子证书 */
|
|
|
|
|
downloadContentAsImage() {
|
|
|
|
|
const content = this.$refs.zs; // 获取目标<div>的DOM节点
|
|
|
|
|