|
@@ -2,8 +2,12 @@
|
|
|
import Vue from 'vue'
|
|
import Vue from 'vue'
|
|
|
import expoPopover from '@/views/components/expoPopover.vue'
|
|
import expoPopover from '@/views/components/expoPopover.vue'
|
|
|
import { getExpoList, deleteExpo, setExpoStatus } from '@/api/expo'
|
|
import { getExpoList, deleteExpo, setExpoStatus } from '@/api/expo'
|
|
|
|
|
+import { copyValue } from '@/utils'
|
|
|
export default Vue.extend({
|
|
export default Vue.extend({
|
|
|
name: 'Index',
|
|
name: 'Index',
|
|
|
|
|
+ components: {
|
|
|
|
|
+ expoPopover
|
|
|
|
|
+ },
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
expoList: [],
|
|
expoList: [],
|
|
@@ -18,13 +22,11 @@ export default Vue.extend({
|
|
|
ossUrl: process.env.VUE_APP_OSS_DOMAIN
|
|
ossUrl: process.env.VUE_APP_OSS_DOMAIN
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- components: {
|
|
|
|
|
- expoPopover
|
|
|
|
|
- },
|
|
|
|
|
mounted() {
|
|
mounted() {
|
|
|
this.getList()
|
|
this.getList()
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ copyValue,
|
|
|
search(event) {
|
|
search(event) {
|
|
|
if (this.searchTimer) {
|
|
if (this.searchTimer) {
|
|
|
clearTimeout(this.searchTimer)
|
|
clearTimeout(this.searchTimer)
|
|
@@ -35,8 +37,19 @@ export default Vue.extend({
|
|
|
}, 500)
|
|
}, 500)
|
|
|
},
|
|
},
|
|
|
edit(row) {
|
|
edit(row) {
|
|
|
|
|
+ if (row.form_count) {
|
|
|
|
|
+ this.$notify({
|
|
|
|
|
+ title: '提示',
|
|
|
|
|
+ message: '此展会已经有人报名了,无法修改',
|
|
|
|
|
+ type: 'warning'
|
|
|
|
|
+ })
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
this.$router.push({ path: '/exhibitor/edit/' + row.id })
|
|
this.$router.push({ path: '/exhibitor/edit/' + row.id })
|
|
|
},
|
|
},
|
|
|
|
|
+ copy(row) {
|
|
|
|
|
+ this.$router.push({ path: '/exhibitor/add?copy=' + row.id })
|
|
|
|
|
+ },
|
|
|
setStatus(row) {
|
|
setStatus(row) {
|
|
|
this.loading = true
|
|
this.loading = true
|
|
|
setExpoStatus(row.id, row.status ? 0 : 1).then(res => {
|
|
setExpoStatus(row.id, row.status ? 0 : 1).then(res => {
|
|
@@ -95,7 +108,7 @@ export default Vue.extend({
|
|
|
<template>
|
|
<template>
|
|
|
<div class="main-box">
|
|
<div class="main-box">
|
|
|
<div class="head">
|
|
<div class="head">
|
|
|
- <el-input v-permission="'exhibitor.search'" v-model="searchWord" prefix-icon="el-icon-search" placeholder="搜索展商名称" class="input" @input="search">
|
|
|
|
|
|
|
+ <el-input v-model="searchWord" v-permission="'exhibitor.search'" prefix-icon="el-icon-search" placeholder="搜索展商名称" class="input" @input="search">
|
|
|
<el-button v-if="searchWord" slot="append" icon="el-icon-delete" @click="searchWord='';search()" />
|
|
<el-button v-if="searchWord" slot="append" icon="el-icon-delete" @click="searchWord='';search()" />
|
|
|
</el-input>
|
|
</el-input>
|
|
|
<el-button v-permission="'exhibitor.addList'" icon="el-icon-plus" type="primary" @click="add">添加展商</el-button>
|
|
<el-button v-permission="'exhibitor.addList'" icon="el-icon-plus" type="primary" @click="add">添加展商</el-button>
|
|
@@ -122,8 +135,7 @@ export default Vue.extend({
|
|
|
label="预约观众"
|
|
label="预约观众"
|
|
|
width="80"
|
|
width="80"
|
|
|
prop="form_count"
|
|
prop="form_count"
|
|
|
- >
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
|
|
+ />
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
label="展会地点"
|
|
label="展会地点"
|
|
|
prop="location"
|
|
prop="location"
|
|
@@ -164,14 +176,15 @@ export default Vue.extend({
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
label="操作"
|
|
label="操作"
|
|
|
fixed="right"
|
|
fixed="right"
|
|
|
- width="200"
|
|
|
|
|
|
|
+ width="210"
|
|
|
>
|
|
>
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<expo-popover placement="left" trigger="click" :expo-id="''+scope.row.id">
|
|
<expo-popover placement="left" trigger="click" :expo-id="''+scope.row.id">
|
|
|
<span v-permission="'exhibitor.handelView'" class="button">预览</span>
|
|
<span v-permission="'exhibitor.handelView'" class="button">预览</span>
|
|
|
</expo-popover>
|
|
</expo-popover>
|
|
|
- <span v-permission="'exhibitor.handelEdit'" class="button" @click="edit(scope.row)">编辑</span>
|
|
|
|
|
- <span v-permission="'exhibitor.handelDisable'" class="button" @click="setStatus(scope.row)">{{scope.row.status?'启用':'禁用'}}</span>
|
|
|
|
|
|
|
+ <span v-permission="'exhibitor.handelEdit'" :class="['button',scope.row.form_count?'disable':'']" @click="edit(scope.row)">编辑</span>
|
|
|
|
|
+ <span v-permission="'exhibitor.handelCopy'" class="button" @click="copy(scope.row)">复制</span>
|
|
|
|
|
+ <span v-permission="'exhibitor.handelDisable'" class="button" @click="setStatus(scope.row)">{{ scope.row.status?'启用':'禁用' }}</span>
|
|
|
<span v-permission="'exhibitor.handelDelete'" class="button del" @click="del(scope.row)">删除</span>
|
|
<span v-permission="'exhibitor.handelDelete'" class="button del" @click="del(scope.row)">删除</span>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -186,11 +199,11 @@ export default Vue.extend({
|
|
|
/>
|
|
/>
|
|
|
<el-pagination
|
|
<el-pagination
|
|
|
v-permission="'exhibitor.handel'"
|
|
v-permission="'exhibitor.handel'"
|
|
|
- @current-change="current_page=$event;getList()"
|
|
|
|
|
background
|
|
background
|
|
|
:page-size="page_size"
|
|
:page-size="page_size"
|
|
|
layout="prev, pager, next"
|
|
layout="prev, pager, next"
|
|
|
:total="total"
|
|
:total="total"
|
|
|
|
|
+ @current-change="current_page=$event;getList()"
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -226,6 +239,9 @@ export default Vue.extend({
|
|
|
&.del{
|
|
&.del{
|
|
|
color: #DC2626;
|
|
color: #DC2626;
|
|
|
}
|
|
}
|
|
|
|
|
+ &.disable{
|
|
|
|
|
+ color: grey;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
.status{
|
|
.status{
|
|
|
padding: 0 12px;
|
|
padding: 0 12px;
|