|
@@ -0,0 +1,178 @@
|
|
|
|
+<template>
|
|
|
|
+ <div id="index">
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-col :span="24" class="info">
|
|
|
|
+ <el-col :span="24" class="top">
|
|
|
|
+ <topInfo :topTitle="topTitle"></topInfo>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="24" class="search" style="text-align:right">
|
|
|
|
+ <el-button size="mini" type="primary" @click="$router.push({ path: './detail' })" icon="el-icon-plus">添加对接会</el-button>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="24" class="main">
|
|
|
|
+ <!-- <mainData :tableData="tableData" :total="total" @delete="deleteData"></mainData> -->
|
|
|
|
+ <data-table
|
|
|
|
+ :fields="fields"
|
|
|
|
+ @delete="toDelete"
|
|
|
|
+ :data="list"
|
|
|
|
+ :opera="opera"
|
|
|
|
+ @edit="toEdit"
|
|
|
|
+ :total="total"
|
|
|
|
+ @query="search"
|
|
|
|
+ @share="share"
|
|
|
|
+ @tickets="tickets"
|
|
|
|
+ @order="order"
|
|
|
|
+ ></data-table>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ </div>
|
|
|
|
+</template>
|
|
|
|
+
|
|
|
|
+<script>
|
|
|
|
+import topInfo from '@/layout/public/top.vue';
|
|
|
|
+import dataTable from '@/components/data-table.vue';
|
|
|
|
+import { mapActions, mapState, createNamespacedHelpers } from 'vuex';
|
|
|
|
+const { mapActions: live } = createNamespacedHelpers('live');
|
|
|
|
+const { mapActions: place } = createNamespacedHelpers('place');
|
|
|
|
+export default {
|
|
|
|
+ name: 'index',
|
|
|
|
+ props: {},
|
|
|
|
+ components: {
|
|
|
|
+ topInfo, //头部标题
|
|
|
|
+ dataTable,
|
|
|
|
+ },
|
|
|
|
+ data: () => ({
|
|
|
|
+ topTitle: '对接会管理',
|
|
|
|
+ opera: [
|
|
|
|
+ {
|
|
|
|
+ label: '编辑',
|
|
|
|
+ icon: 'el-icon-edit',
|
|
|
|
+ method: 'edit',
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '查看申请情况',
|
|
|
|
+ icon: 'el-icon-share',
|
|
|
|
+ method: 'share',
|
|
|
|
+ display: item => {
|
|
|
|
+ return item.is_allowed == '1' ? true : false;
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ {
|
|
|
|
+ label: '对接会审核',
|
|
|
|
+ icon: 'el-icon-tickets',
|
|
|
|
+ method: 'tickets',
|
|
|
|
+ display: item => {
|
|
|
|
+ return item.role == '1' ? true : false;
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '对接会开始状态审核',
|
|
|
|
+ icon: 'el-icon-s-order',
|
|
|
|
+ method: 'order',
|
|
|
|
+ display: item => {
|
|
|
|
+ return item.is_allowed == '1' ? true : false;
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ {
|
|
|
|
+ label: '删除',
|
|
|
|
+ icon: 'el-icon-delete',
|
|
|
|
+ method: 'delete',
|
|
|
|
+ confirm: true,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ fields: [
|
|
|
|
+ { label: '对接会标题', prop: 'title' },
|
|
|
|
+ { label: '对接会简介', prop: 'desc' },
|
|
|
|
+ { label: '开始时间', prop: 'start_time' },
|
|
|
|
+ { label: '报名截止时间', prop: 'join_end' },
|
|
|
|
+ { label: '省', prop: 'sheng' },
|
|
|
|
+ { label: '市', prop: 'shi' },
|
|
|
|
+ { label: '对接会简介', prop: 'desc' },
|
|
|
|
+
|
|
|
|
+ {
|
|
|
|
+ label: '审核状态',
|
|
|
|
+ prop: 'is_allowed',
|
|
|
|
+ format: item => {
|
|
|
|
+ return item === '0' ? '未审核' : item === '1' ? '已允许' : '已拒绝';
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '对接会状态',
|
|
|
|
+ prop: 'status',
|
|
|
|
+ format: item => {
|
|
|
|
+ return item === '1' ? '开始' : item === '2' ? '结束' : '准备中';
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ list: [],
|
|
|
|
+ total: 0,
|
|
|
|
+ }),
|
|
|
|
+ created() {
|
|
|
|
+ this.search();
|
|
|
|
+ },
|
|
|
|
+ computed: {
|
|
|
|
+ ...mapState(['user']),
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ ...live(['query', 'delete', 'update']),
|
|
|
|
+ ...place({ palcequery: 'query', palcefetch: 'fetch' }),
|
|
|
|
+ async search({ skip = 0, limit = 10, ...info } = {}) {
|
|
|
|
+ if (this.user.role != '1') info.user_id = this.user.uid;
|
|
|
|
+ let res = await this.query({ skip, limit });
|
|
|
|
+ for (const val of res.data) {
|
|
|
|
+ let parent = val.province;
|
|
|
|
+ let places = val.place;
|
|
|
|
+ let reslte = await this.palcequery({ level: 1, parent });
|
|
|
|
+ let resltes = await this.palcequery({ level: 2, parent });
|
|
|
|
+ var arr = reslte.data.filter(item => item.code === parent);
|
|
|
|
+ var cre = resltes.data.filter(item => item.code === places);
|
|
|
|
+ for (const shi of cre) {
|
|
|
|
+ val.shi = shi.name;
|
|
|
|
+ }
|
|
|
|
+ for (const sheng of arr) {
|
|
|
|
+ val.sheng = sheng.name;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.$set(this, `list`, res.data);
|
|
|
|
+ this.$set(this, `total`, res.total);
|
|
|
|
+ },
|
|
|
|
+ toEdit({ data }) {
|
|
|
|
+ this.$router.push({ path: './detail', query: { id: data.id } });
|
|
|
|
+ },
|
|
|
|
+ async toDelete({ data }) {
|
|
|
|
+ const res = await this.delete(data.id);
|
|
|
|
+ if (this.$checkRes(res, '删除成功', res.errmsg || '删除失败')) this.search();
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ async share({ data }) {
|
|
|
|
+ this.$router.push({ path: './duijieshenhe', query: { data: data } });
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ async tickets({ data }) {
|
|
|
|
+ this.$router.push({ path: './duijiehuiexamine', query: { id: data.id } });
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ async order({ data }) {
|
|
|
|
+ this.$router.push({ path: './duijiehuistatus', query: { id: data.id } });
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+};
|
|
|
|
+</script>
|
|
|
|
+
|
|
|
|
+<style lang="less" scoped>
|
|
|
|
+.top {
|
|
|
|
+ height: 40px;
|
|
|
|
+ background-color: #f5f5f5;
|
|
|
|
+}
|
|
|
|
+.search {
|
|
|
|
+ height: 40px;
|
|
|
|
+ line-height: 40px;
|
|
|
|
+ padding: 0 15px;
|
|
|
|
+}
|
|
|
|
+.main {
|
|
|
|
+ width: 97%;
|
|
|
|
+ margin: 0 15px;
|
|
|
|
+}
|
|
|
|
+</style>
|