|
@@ -1,34 +1,10 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
|
|
- <el-form-item label="主题" prop="topic">
|
|
|
+ <el-form-item label="标题" prop="topic">
|
|
|
<el-input
|
|
|
v-model="queryParams.topic"
|
|
|
- placeholder="请输入主题"
|
|
|
- clearable
|
|
|
- @keyup.enter.native="handleQuery"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="计划招募人数" prop="count">
|
|
|
- <el-input
|
|
|
- v-model="queryParams.count"
|
|
|
- placeholder="请输入计划招募人数"
|
|
|
- clearable
|
|
|
- @keyup.enter.native="handleQuery"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="发起者" prop="sponsorName">
|
|
|
- <el-input
|
|
|
- v-model="queryParams.sponsorName"
|
|
|
- placeholder="请输入发起者"
|
|
|
- clearable
|
|
|
- @keyup.enter.native="handleQuery"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="联系电话" prop="sponsorPhone">
|
|
|
- <el-input
|
|
|
- v-model="queryParams.sponsorPhone"
|
|
|
- placeholder="请输入联系电话"
|
|
|
+ placeholder="请输入标题"
|
|
|
clearable
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
@@ -50,51 +26,14 @@
|
|
|
v-hasPermi="['community:recruit:add']"
|
|
|
>新增</el-button>
|
|
|
</el-col>
|
|
|
- <el-col :span="1.5">
|
|
|
- <el-button
|
|
|
- type="success"
|
|
|
- plain
|
|
|
- icon="el-icon-edit"
|
|
|
- size="mini"
|
|
|
- :disabled="single"
|
|
|
- @click="handleUpdate"
|
|
|
- v-hasPermi="['community:recruit:edit']"
|
|
|
- >修改</el-button>
|
|
|
- </el-col>
|
|
|
- <el-col :span="1.5">
|
|
|
- <el-button
|
|
|
- type="danger"
|
|
|
- plain
|
|
|
- icon="el-icon-delete"
|
|
|
- size="mini"
|
|
|
- :disabled="multiple"
|
|
|
- @click="handleDelete"
|
|
|
- v-hasPermi="['community:recruit:remove']"
|
|
|
- >删除</el-button>
|
|
|
- </el-col>
|
|
|
- <el-col :span="1.5">
|
|
|
- <el-button
|
|
|
- type="warning"
|
|
|
- plain
|
|
|
- icon="el-icon-download"
|
|
|
- size="mini"
|
|
|
- @click="handleExport"
|
|
|
- v-hasPermi="['community:recruit:export']"
|
|
|
- >导出</el-button>
|
|
|
- </el-col>
|
|
|
- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
</el-row>
|
|
|
|
|
|
<el-table v-loading="loading" :data="recruitList" @selection-change="handleSelectionChange">
|
|
|
- <el-table-column type="selection" width="55" align="center" />
|
|
|
- <el-table-column label="招募信息Id" align="center" prop="recruitId" />
|
|
|
- <el-table-column label="主题" align="center" prop="topic" />
|
|
|
- <el-table-column label="内容" align="center" prop="content" />
|
|
|
+ <el-table-column label="标题" align="center" prop="topic" />
|
|
|
<el-table-column label="计划招募人数" align="center" prop="count" />
|
|
|
<el-table-column label="发起者" align="center" prop="sponsorName" />
|
|
|
<el-table-column label="联系电话" align="center" prop="sponsorPhone" />
|
|
|
<el-table-column label="状态" align="center" prop="status" />
|
|
|
- <el-table-column label="备注" align="center" prop="remark" />
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
@@ -124,13 +63,10 @@
|
|
|
/>
|
|
|
|
|
|
<!-- 添加或修改招募信息对话框 -->
|
|
|
- <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
|
- <el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
- <el-form-item label="主题" prop="topic">
|
|
|
- <el-input v-model="form.topic" placeholder="请输入主题" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="内容">
|
|
|
- <editor v-model="form.content" :min-height="192"/>
|
|
|
+ <el-dialog :title="title" :visible.sync="open" width="900px" append-to-body>
|
|
|
+ <el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
|
|
+ <el-form-item label="标题" prop="topic">
|
|
|
+ <el-input v-model="form.topic" placeholder="请输入标题" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="计划招募人数" prop="count">
|
|
|
<el-input v-model="form.count" placeholder="请输入计划招募人数" />
|
|
@@ -144,6 +80,14 @@
|
|
|
<el-form-item label="备注" prop="remark">
|
|
|
<el-input v-model="form.remark" placeholder="请输入备注" />
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="状态" prop="status">
|
|
|
+ <el-select v-model="form.status" placeholder="请选择状态" clearable size="small">
|
|
|
+ <el-option v-for="dict in dict.type.recruit_status" :key="dict.value" :label="dict.label" :value="dict.value"/>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="内容">
|
|
|
+ <editor v-model="form.content" :min-height="192"/>
|
|
|
+ </el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
@@ -158,6 +102,7 @@ import { listRecruit, getRecruit, delRecruit, addRecruit, updateRecruit } from "
|
|
|
|
|
|
export default {
|
|
|
name: "Recruit",
|
|
|
+ dicts: ['recruit_status'],
|
|
|
data() {
|
|
|
return {
|
|
|
// 遮罩层
|
|
@@ -204,7 +149,11 @@ export default {
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
|
listRecruit(this.queryParams).then(response => {
|
|
|
- this.recruitList = response.rows;
|
|
|
+ this.recruitList = response.rows.map(e => {
|
|
|
+ const data = this.dict.type.recruit_status.find(j => j.value == e.status);
|
|
|
+ if (data) e.status = data.label;
|
|
|
+ return e;
|
|
|
+ });
|
|
|
this.total = response.total;
|
|
|
this.loading = false;
|
|
|
});
|
|
@@ -223,7 +172,6 @@ export default {
|
|
|
count: null,
|
|
|
sponsorName: null,
|
|
|
sponsorPhone: null,
|
|
|
- status: "0",
|
|
|
createTime: null,
|
|
|
updateTime: null,
|
|
|
remark: null
|
|
@@ -285,19 +233,13 @@ export default {
|
|
|
/** 删除按钮操作 */
|
|
|
handleDelete(row) {
|
|
|
const recruitIds = row.recruitId || this.ids;
|
|
|
- this.$modal.confirm('是否确认删除招募信息编号为"' + recruitIds + '"的数据项?').then(function() {
|
|
|
+ this.$modal.confirm('是否确认删除招募信息标题为"' + row.topic + '"的数据项?').then(function() {
|
|
|
return delRecruit(recruitIds);
|
|
|
}).then(() => {
|
|
|
this.getList();
|
|
|
this.$modal.msgSuccess("删除成功");
|
|
|
}).catch(() => {});
|
|
|
},
|
|
|
- /** 导出按钮操作 */
|
|
|
- handleExport() {
|
|
|
- this.download('community/recruit/export', {
|
|
|
- ...this.queryParams
|
|
|
- }, `recruit_${new Date().getTime()}.xlsx`)
|
|
|
- }
|
|
|
}
|
|
|
};
|
|
|
</script>
|