duhanyu
许宏杰 1 year ago
parent 1ebc5ff39e
commit b424d78def

@ -0,0 +1,32 @@
import request from "@/utils/request";
export function getSellectall(query) {
return request({
url: "/zhiyuanzhe/certificates/sellectall",
method: "get",
params: query,
});
}
export function postElectron(data) {
return request({
url: "/zhiyuanzhe/dsbrecords/submit",
method: "post",
data,
});
}
export function getInfo(id) {
return request({
url: "/zhiyuanzhe/dsbrecords/" + id,
method: "get",
});
}
export function editData(data) {
return request({
url: "/zhiyuanzhe/dsbrecords",
method: "put",
data,
});
}

@ -13,3 +13,46 @@
}
}
}
::v-deep .el-dialog__header {
background: #f7f5f5;
.dialog-title {
font-size: 17px;
font-family: "Alibaba-PuHuiTi-Bold";
color: #4c4949;
display: flex;
align-items: center;
.title-line {
display: inline-block;
width: 5px;
height: 18px;
background: #f8414d;
margin-right: 6px;
}
}
}
//
.info-box {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.info-item {
display: flex;
// align-items: center;
margin-bottom: 20px;
.item-lable {
width: 80px;
font-size: 16px;
font-family: "Alibaba-PuHuiTi-Regular";
font-weight: 400;
color: #4c4949;
}
.item-value {
font-size: 16px;
font-family: "Alibaba-PuHuiTi-Regular";
font-weight: 400;
color: #807a7a;
}
}
}

@ -301,27 +301,14 @@ export default {
};
</script>
<style lang="scss" scoped>
// @import "@/assets/styles/myTable.scss";
@import "@/assets/styles/myTable.scss";
// @import "@/assets/styles/element-variables.scss";
.search {
display: flex;
align-items: center;
justify-content: space-between;
}
::v-deep .search-container {
.el-form-item__content {
width: 550px;
}
.el-input-group__append {
padding-left: 15px !important;
padding-right: 15px !important;
background: #f8414d !important;
border-color: #f8414d !important;
.search-btn {
color: #fff !important;
}
}
}
.book-main {
display: flex;
flex-wrap: wrap;
@ -359,47 +346,4 @@ export default {
}
}
}
::v-deep .el-dialog__header {
background: #f7f5f5;
.dialog-title {
font-size: 17px;
font-family: "Alibaba-PuHuiTi-Bold";
color: #4c4949;
display: flex;
align-items: center;
.title-line {
display: inline-block;
width: 5px;
height: 18px;
background: #f8414d;
margin-right: 6px;
}
}
}
//
.info-box {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.info-item {
display: flex;
// align-items: center;
margin-bottom: 20px;
.item-lable {
width: 80px;
font-size: 16px;
font-family: "Alibaba-PuHuiTi-Regular";
font-weight: 400;
color: #4c4949;
}
.item-value {
font-size: 16px;
font-family: "Alibaba-PuHuiTi-Regular";
font-weight: 400;
color: #807a7a;
}
}
}
</style>

@ -27,12 +27,22 @@
:data="tableData"
:height="tableHeigth + 'px'"
>
<el-table-column label="序号" align="center" prop="id" width="55" />
<el-table-column label="参与活动" align="center" prop="name" />
<el-table-column label="参与人员" align="center" prop="type" />
<el-table-column label="服务活动时长" align="center" prop="cover" />
<el-table-column label="状态" align="center" prop="content" />
<el-table-column
label="序号"
align="center"
type="index"
prop="id"
width="55"
/>
<el-table-column label="参与活动" align="center" prop="activityId" />
<el-table-column label="证书id" align="center" prop="certificateId" />
<el-table-column label="用户" align="center" prop="uid" />
<el-table-column label="状态" align="center" prop="type">
<template slot-scope="scope">
{{ scope.row.type == 1 ? "已发放" : "未发放" }}
</template>
</el-table-column>
<!-- <el-table-column
label="发证时间"
align="center"
prop="datetime"
@ -41,7 +51,7 @@
<template slot-scope="scope">
<span>{{ parseTime(scope.row.datetime, "{y}-{m}-{d}") }}</span>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column
label="操作"
align="center"
@ -51,18 +61,9 @@
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
@click="handleFabu(scope.row)"
v-hasPermi="['system:certificates:edit']"
>修改</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:certificates:remove']"
>删除</el-button
>发布</el-button
>
</template>
</el-table-column>
@ -74,20 +75,79 @@
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 发布对话框 -->
<el-dialog :visible.sync="open" width="500px" append-to-body>
<div slot="title" class="dialog-title">
<span class="title-line"></span>
{{ title }}
</div>
<div class="info-box">
<div>
<div class="info-item">
<div class="item-lable">参与活动:</div>
<div class="item-value">{{ form.activityId }}</div>
</div>
<div class="info-item">
<div class="item-lable">证书id:</div>
<div class="item-value">{{ form.certificateId }}</div>
</div>
<div class="info-item">
<div class="item-lable">用户:</div>
<div class="item-value">{{ form.uid }}</div>
</div>
<div class="info-item">
<div class="item-lable">状态:</div>
<div class="item-value">
{{ form.type == 1 ? "已发放" : "未发放" }}
</div>
</div>
</div>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel"> </el-button>
<el-button type="warning" @click="submitPaper"></el-button>
<el-button type="primary" @click="submitElectron"
>发放电子证书</el-button
>
</div>
</el-dialog>
<!-- 纸质证书 -->
<el-dialog :visible.sync="infoOpen" width="500px" append-to-body>
<div slot="title" class="dialog-title">
<span class="title-line"></span>
邮政信息
</div>
<Editor v-model="form.content" :min-height="192" />
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {
getSellectall,
postElectron,
getInfo,
editData,
} from "@/api/volunteer/gxhzs/hdzsff/index.js";
export default {
data() {
return {
infoOpen: false,
form: {},
open: false,
title: "",
tableHeigth: 0,
queryParams: {},
loading: false,
tableData: [],
total: 1,
queryParams: {
pageNum: 0,
creType: 1,
pageNum: 1,
pageSize: 10,
},
};
@ -96,30 +156,95 @@ export default {
// //
this.$nextTick(() => {
this.tableHeigth =
this.$refs.main.offsetHeight - this.$refs.search.offsetHeight - 100;
console.log(this.$refs.search.offsetHeight, "高度");
this.$refs.main.offsetHeight - this.$refs.search.offsetHeight - 75;
this.getList();
});
},
methods: {
getList() {},
/**纸质提交 */
submitForm() {
editData(this.form).then((res) => {
this.submitElectron();
});
},
/**纸质 */
submitPaper() {
this.infoOpen = true;
},
/**电子 */
submitElectron() {
let data = {
activityId: this.form.activityId,
uid: this.form.uid,
};
postElectron(data).then((res) => {
this.infoOpen = false;
this.open = false;
this.$modal.msgSuccess("发放成功");
this.getList();
});
},
/**关闭 */
cancel() {
this.open = false;
this.reset();
},
/**重置 */
reset() {
this.form = {
id: null,
activityId: null,
certificateId: null,
uId: null,
content: null,
createId: null,
createBy: null,
createTime: null,
updateId: null,
updateBy: null,
updateTime: null,
remark: null,
userId: null,
deptId: null,
type: null,
};
},
/** 查询发放记录列表 */
getList() {
this.loading = true;
getSellectall(this.queryParams).then((response) => {
this.tableData = response.data.list;
this.total = response.total;
this.loading = false;
});
},
handleFabu(row) {
this.reset();
let id = row.id;
getInfo(id).then((res) => {
this.form = res.data;
this.title = "发放查看";
this.open = true;
});
},
},
};
</script>
<style lang="scss" scoped>
// @import "@/assets/styles/myTable.scss";
// @import "@/assets/styles/element-variables.scss";
::v-deep .search-container {
.el-form-item__content {
width: 550px;
}
.el-input-group__append {
padding-left: 15px !important;
padding-right: 15px !important;
background: #f8414d !important;
border-color: #f8414d !important;
.search-btn {
color: #fff !important;
}
}
}
@import "@/assets/styles/myTable.scss";
// ::v-deep .search-container {
// .el-form-item__content {
// width: 550px;
// }
// .el-input-group__append {
// padding-left: 15px !important;
// padding-right: 15px !important;
// background: #f8414d !important;
// border-color: #f8414d !important;
// .search-btn {
// color: #fff !important;
// }
// }
// }
</style>

Loading…
Cancel
Save