提交 1dfcdf29 authored 作者: 王鹏飞's avatar 王鹏飞

办事大厅增加判断是否显示新增按钮

上级 bdf85846
......@@ -2,7 +2,7 @@ import TableList from '@/components/comTable/tableList'
import * as api from '../api'
export default {
props: { affairId: { type: String, required: true } },
props: { affairId: { type: String, required: true }, hasAdd: { type: Boolean, default: true } },
components: { TableList },
data() {
return {
......
<template>
<div>
<el-button type="primary" @click="handleAdd">申请新的活动</el-button>
<el-button type="primary" @click="handleAdd" v-if="hasAdd">申请新的活动</el-button>
<div style="height: 20px"></div>
<table-list :remote="remote" :columns="columns" ref="tableList"></table-list>
</div>
......
<template>
<div>
<el-button type="primary" @click="handleAdd">申请索菲亚在读证明</el-button>
<el-button type="primary" @click="handleAdd" v-if="hasAdd">申请索菲亚在读证明</el-button>
<div style="height: 20px"></div>
<table-list :remote="remote" :columns="columns" ref="tableList"></table-list>
</div>
......
<template>
<div>
<el-button type="primary" @click="handleAdd">申请紫荆在读证明</el-button>
<el-button type="primary" @click="handleAdd" v-if="hasAdd">申请紫荆在读证明</el-button>
<div style="height: 20px"></div>
<table-list :remote="remote" :columns="columns" ref="tableList"></table-list>
</div>
......
......@@ -5,7 +5,7 @@
</div>
<Tap :tapParam="tapParam" @tapParam="tapIndexs"></Tap>
<div class="con-box" v-if="affairId">
<component :is="currentComponent" :affairId="affairId"></component>
<component :is="currentComponent" :affairId="affairId" :hasAdd="hasAdd"></component>
</div>
</div>
</template>
......@@ -64,6 +64,9 @@ export default {
affairId() {
return this.active ? this.active.id : ''
},
hasAdd() {
return this.active ? this.active.close !== '1' : false
},
currentComponent() {
const components = {
symposium: 'ActivityList',
......
<template>
<div>
<el-button type="primary" @click="handleAdd">申请电子成绩单</el-button>
<el-button type="primary" @click="handleAdd" v-if="hasAdd">申请电子成绩单</el-button>
<div style="height: 20px"></div>
<table-list :remote="remote" :columns="columns" ref="tableList"></table-list>
</div>
......
<template>
<div>
<el-button type="primary" @click="handleAdd">申请纸质成绩单</el-button>
<el-button type="primary" @click="handleAdd" v-if="hasAdd">申请纸质成绩单</el-button>
<div style="height: 20px"></div>
<table-list :remote="remote" :columns="columns" ref="tableList"></table-list>
</div>
......
<template>
<div>
<el-button type="primary" @click="handleAdd">申请重修</el-button>
<el-button type="primary" @click="handleAdd" v-if="hasAdd">申请重修</el-button>
<div style="height: 20px"></div>
<table-list :remote="remote" :columns="columns" ref="tableList"></table-list>
</div>
......
<template>
<div>
<el-button type="primary" @click="handleAdd">申请新乐分享</el-button>
<el-button type="primary" @click="handleAdd" v-if="hasAdd">申请新乐分享</el-button>
<div style="height: 20px"></div>
<table-list :remote="remote" :columns="columns" ref="tableList"></table-list>
</div>
......
<template>
<div>
<el-button type="primary" @click="handleAdd">申请复学</el-button>
<el-button type="primary" @click="handleAdd" v-if="hasAdd">申请复学</el-button>
<div style="height: 20px"></div>
<table-list :remote="remote" :columns="columns" ref="tableList"></table-list>
</div>
......
<template>
<div>
<el-button type="primary" @click="handleAdd">申请休学</el-button>
<el-button type="primary" @click="handleAdd" v-if="hasAdd">申请休学</el-button>
<div style="height: 20px"></div>
<table-list :remote="remote" :columns="columns" ref="tableList"></table-list>
</div>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论