|
@@ -27,10 +27,10 @@
|
|
|
</el-form>
|
|
|
<div>
|
|
|
<el-button type="primary" @click="createNew">发起活动</el-button>
|
|
|
- <el-button type="primary">导出</el-button>
|
|
|
- <el-button type="danger" :disabled="multipleSelection.length == 0">删除</el-button>
|
|
|
+ <el-button type="primary" @click="exportAc">导出</el-button>
|
|
|
+ <el-button type="danger" :disabled="multipleSelection.length == 0" @click="delAc">删除</el-button>
|
|
|
</div>
|
|
|
- <el-table :data="secondTable" v-loading="loading" tooltip-effect="dark" class="mt20" style="width: 100%">
|
|
|
+ <el-table :data="secondTable" v-loading="loading" tooltip-effect="dark" class="mt20" style="width: 100%" @selection-change="handleSelectionChange">
|
|
|
<el-table-column
|
|
|
type="selection"
|
|
|
align="center"
|
|
@@ -47,7 +47,7 @@
|
|
|
width="auto"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
- <h3 class="font-size-14 color-2 hand">{{ scope.row.xdb_hdmc }}</h3>
|
|
|
+ <h3 class="font-size-14 color-2 hand" @click="toDetail(scope.row.xdb_id)">{{ scope.row.xdb_hdmc }}</h3>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
@@ -76,7 +76,7 @@
|
|
|
label="活动状态"
|
|
|
width="120">
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="scope.row.xdb_hdzt_option_k == 1" class="text-grey">未审核</span>
|
|
|
+ <span v-if="scope.row.xdb_hdzt_option_k == 0 || scope.row.xdb_hdzt_option_k == 1" class="text-grey">未审核</span>
|
|
|
<span v-if="scope.row.xdb_hdzt_option_k == 2" class="text-green">进行中</span>
|
|
|
<span v-if="scope.row.xdb_hdzt_option_k == 3" class="text-green">已结束</span>
|
|
|
</template>
|
|
@@ -90,12 +90,13 @@
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
type="text"
|
|
|
- @click=""
|
|
|
+ @click="signDialogShow(scope.row)"
|
|
|
>报名
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
+ :disabled="scope.row.xdb_hdzt_option_k > 1"
|
|
|
type="text"
|
|
|
- @click=""
|
|
|
+ @click="auditAc(scope.row)"
|
|
|
>审核
|
|
|
</el-button>
|
|
|
<el-button
|
|
@@ -105,8 +106,8 @@
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
type="text"
|
|
|
- @click=""
|
|
|
- >评价
|
|
|
+ @click="toDetail(scope.row.xdb_id)"
|
|
|
+ >详情
|
|
|
</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -124,7 +125,7 @@
|
|
|
@current-change="handleCurrentChange"
|
|
|
></el-pagination>
|
|
|
</footer>
|
|
|
- <el-dialog :title="dialogTitle" :visible.sync="newDialogShow" width="550px" v-loading="loading">
|
|
|
+ <el-dialog :title="dialogTitle" :visible.sync="newDialogShow" width="750px" v-loading="loading">
|
|
|
<el-form :model="newForm" ref="newForm" :rules="rules" label-width="100px">
|
|
|
<el-form-item label="班级:" prop="xdb_bjmc">
|
|
|
<el-input
|
|
@@ -167,12 +168,12 @@
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="活动描述:" prop="xdb_hdms">
|
|
|
- <el-input
|
|
|
- type="textarea"
|
|
|
- :rows="2"
|
|
|
- placeholder="请输入活动描述"
|
|
|
- v-model="newForm.xdb_hdms">
|
|
|
- </el-input>
|
|
|
+ <Tinymce
|
|
|
+ v-if="newDialogShow"
|
|
|
+ v-model="newForm.xdb_hdms"
|
|
|
+ :height="300"
|
|
|
+ :key="timestamp"
|
|
|
+ ></Tinymce>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer">
|
|
@@ -180,11 +181,39 @@
|
|
|
<el-button type="primary" @click="newFormSubmit('newForm')">确 定</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog title="报名" :visible.sync="signDialogVisible" width="550px" v-loading="loading">
|
|
|
+ <el-form :model="signForm" ref="signForm" :rules="rules" label-width="100px">
|
|
|
+ <el-form-item label="学生姓名:" prop="xdh_xsxm">
|
|
|
+ <el-input
|
|
|
+ v-model="signForm.xdh_xsxm"
|
|
|
+ placeholder="请输入学生姓名"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="学生学号:" prop="xdh_xsxh">
|
|
|
+ <el-input
|
|
|
+ v-model="signForm.xdh_xsxh"
|
|
|
+ placeholder="请输入学生学号"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="手机号码:" prop="xdh_sjhm">
|
|
|
+ <el-input
|
|
|
+ v-model="signForm.xdh_sjhm"
|
|
|
+ placeholder="请输入手机号码"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer">
|
|
|
+ <el-button @click="signDialogVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="signFormSubmit('signForm')">确 定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {hd_list, hdlb_list,hd_add,hd_edit} from "./api";
|
|
|
+import {hd_list, hdlb_list,hd_add,hd_edit,hd_del,sign_add} from "./api";
|
|
|
+import Tinymce from "@/components/Tinymce/index.vue";
|
|
|
+import FileUpload from "@/components/FileUpload/index.vue";
|
|
|
import { useUserStore } from "@/stores/user";
|
|
|
const { token,real_name } = useUserStore();
|
|
|
export default {
|
|
@@ -254,11 +283,33 @@ export default {
|
|
|
],
|
|
|
xdb_shr:[
|
|
|
{required: true, message: '请输入审核人', trigger: 'blur'}
|
|
|
- ]
|
|
|
+ ],
|
|
|
+ xdh_xsxm:[
|
|
|
+ {required: true, message: '请输入学生姓名', trigger: 'blur'}
|
|
|
+ ],
|
|
|
+ xdh_xsxh:[
|
|
|
+ {required: true, message: '请输入学生学号', trigger: 'blur'}
|
|
|
+ ],
|
|
|
+ xdh_sjhm:[
|
|
|
+ {required: true, message: '请输入手机号码', trigger: 'blur'}
|
|
|
+ ],
|
|
|
},
|
|
|
newEdit: false,
|
|
|
+ signDialogVisible: false,
|
|
|
+ signForm:{
|
|
|
+ xdh_xsxm:'',
|
|
|
+ xdh_xsxh:'',
|
|
|
+ xdh_sjhm:'',
|
|
|
+ xdb_id:'',
|
|
|
+ xdb_hdmc:''
|
|
|
+ },
|
|
|
+ timestamp: Date.now(),
|
|
|
}
|
|
|
},
|
|
|
+ components: {
|
|
|
+ Tinymce,
|
|
|
+ FileUpload,
|
|
|
+ },
|
|
|
methods: {
|
|
|
getAllActivityType() {
|
|
|
let data = {
|
|
@@ -390,6 +441,107 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
+ },
|
|
|
+ auditAc(item) {
|
|
|
+ this.loading = true;
|
|
|
+ let data = {
|
|
|
+ xdb_id:item.xdb_id,
|
|
|
+ xdb_hdzt:'2'
|
|
|
+ }
|
|
|
+ hd_edit(data).then(res =>{
|
|
|
+ this.loading = false
|
|
|
+ if(res.code == 1) {
|
|
|
+ this.$message({
|
|
|
+ message: "审核成功!",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ this.loading = false;
|
|
|
+ this.getHdList();
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ signDialogShow(item) {
|
|
|
+ this.signForm.xdb_id = item.xdb_id;
|
|
|
+ this.signForm.xdb_hdmc = item.xdb_hdmc;
|
|
|
+ this.signForm.xdh_xsxm = '';
|
|
|
+ this.signForm.xdh_xsxh = '';
|
|
|
+ this.signForm.xdh_sjhm = '';
|
|
|
+ this.signDialogVisible = true;
|
|
|
+ },
|
|
|
+ signFormSubmit(formName) {
|
|
|
+ this.$refs[formName].validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ this.loading = true;
|
|
|
+ let data = {
|
|
|
+ xdh_xsxm: this.signForm.xdh_xsxm,
|
|
|
+ xdh_xsxh: this.signForm.xdh_xsxh,
|
|
|
+ xdh_sjhm: this.signForm.xdh_sjhm,
|
|
|
+ xdb_id: this.signForm.xdb_id,
|
|
|
+ xdb_hdmc: this.signForm.xdb_hdmc
|
|
|
+ }
|
|
|
+ sign_add(data).then(res =>{
|
|
|
+ this.loading = false;
|
|
|
+ if(res.code == 1) {
|
|
|
+ this.$message({
|
|
|
+ message: "活动报名成功!",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ this.signDialogVisible = false;
|
|
|
+ this.getHdList();
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ delAc() {
|
|
|
+ let del_arr = [];
|
|
|
+ for(let i in this.multipleSelection) {
|
|
|
+ del_arr.push(this.multipleSelection[i].xdb_id)
|
|
|
+ }
|
|
|
+ this.$confirm('确定要删除这些活动?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ let data = {
|
|
|
+ xdb_id: del_arr
|
|
|
+ }
|
|
|
+ hd_del(data).then(res =>{
|
|
|
+ if(res.code == 1) {
|
|
|
+ this.$message({
|
|
|
+ message: "活动删除成功!",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ this.getHdList();
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ }).catch(() => {});
|
|
|
+ },
|
|
|
+ exportAc() {
|
|
|
+ let link =
|
|
|
+ window.globalVariables.api +
|
|
|
+ "/xddy/dygl_bjhd/index?api=xls&page=1&limit=10000&token=" +
|
|
|
+ token;
|
|
|
+ window.open(link, "_self");
|
|
|
+ },
|
|
|
+ toDetail(id) {
|
|
|
+ this.$router.push({ name: 'bjhd_hdlb_hdxq', params: { id: id } })
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|