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

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

上级 bdf85846
...@@ -2,7 +2,7 @@ import TableList from '@/components/comTable/tableList' ...@@ -2,7 +2,7 @@ import TableList from '@/components/comTable/tableList'
import * as api from '../api' import * as api from '../api'
export default { export default {
props: { affairId: { type: String, required: true } }, props: { affairId: { type: String, required: true }, hasAdd: { type: Boolean, default: true } },
components: { TableList }, components: { TableList },
data() { data() {
return { return {
......
<template> <template>
<div> <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> <div style="height: 20px"></div>
<table-list :remote="remote" :columns="columns" ref="tableList"></table-list> <table-list :remote="remote" :columns="columns" ref="tableList"></table-list>
</div> </div>
......
<template> <template>
<div> <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> <div style="height: 20px"></div>
<table-list :remote="remote" :columns="columns" ref="tableList"></table-list> <table-list :remote="remote" :columns="columns" ref="tableList"></table-list>
</div> </div>
......
<template> <template>
<div> <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> <div style="height: 20px"></div>
<table-list :remote="remote" :columns="columns" ref="tableList"></table-list> <table-list :remote="remote" :columns="columns" ref="tableList"></table-list>
</div> </div>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
</div> </div>
<Tap :tapParam="tapParam" @tapParam="tapIndexs"></Tap> <Tap :tapParam="tapParam" @tapParam="tapIndexs"></Tap>
<div class="con-box" v-if="affairId"> <div class="con-box" v-if="affairId">
<component :is="currentComponent" :affairId="affairId"></component> <component :is="currentComponent" :affairId="affairId" :hasAdd="hasAdd"></component>
</div> </div>
</div> </div>
</template> </template>
...@@ -64,6 +64,9 @@ export default { ...@@ -64,6 +64,9 @@ export default {
affairId() { affairId() {
return this.active ? this.active.id : '' return this.active ? this.active.id : ''
}, },
hasAdd() {
return this.active ? this.active.close !== '1' : false
},
currentComponent() { currentComponent() {
const components = { const components = {
symposium: 'ActivityList', symposium: 'ActivityList',
......
<template> <template>
<div> <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> <div style="height: 20px"></div>
<table-list :remote="remote" :columns="columns" ref="tableList"></table-list> <table-list :remote="remote" :columns="columns" ref="tableList"></table-list>
</div> </div>
......
<template> <template>
<div> <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> <div style="height: 20px"></div>
<table-list :remote="remote" :columns="columns" ref="tableList"></table-list> <table-list :remote="remote" :columns="columns" ref="tableList"></table-list>
</div> </div>
......
<template> <template>
<div> <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> <div style="height: 20px"></div>
<table-list :remote="remote" :columns="columns" ref="tableList"></table-list> <table-list :remote="remote" :columns="columns" ref="tableList"></table-list>
</div> </div>
......
<template> <template>
<div> <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> <div style="height: 20px"></div>
<table-list :remote="remote" :columns="columns" ref="tableList"></table-list> <table-list :remote="remote" :columns="columns" ref="tableList"></table-list>
</div> </div>
......
<template> <template>
<div> <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> <div style="height: 20px"></div>
<table-list :remote="remote" :columns="columns" ref="tableList"></table-list> <table-list :remote="remote" :columns="columns" ref="tableList"></table-list>
</div> </div>
......
<template> <template>
<div> <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> <div style="height: 20px"></div>
<table-list :remote="remote" :columns="columns" ref="tableList"></table-list> <table-list :remote="remote" :columns="columns" ref="tableList"></table-list>
</div> </div>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论