Manage.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. <style lang="scss">
  2. .preview{
  3. .el-form-item{
  4. margin-bottom:15px;
  5. }
  6. label,p{
  7. line-height: 25px !important;
  8. }
  9. }
  10. .hotel{
  11. .el-dialog{
  12. margin-top: 30px !important;
  13. }
  14. }
  15. </style>
  16. <template>
  17. <section>
  18. <p><span>会议系统></span>会议管理</p>
  19. <div class="content">
  20. <div class="filter">
  21. <el-form size="small" label-width="70px" :inline="true" label-position="left">
  22. <el-form-item label="">
  23. <el-input clearable placeholder="请输入标题" v-model="form.name"></el-input>
  24. </el-form-item>
  25. <el-form-item>
  26. <el-button @click="getData" type="primary">搜索</el-button>
  27. </el-form-item>
  28. <el-form-item style="float:right" >
  29. <el-button @click="addConference" type="primary">新增会议</el-button>
  30. </el-form-item>
  31. </el-form>
  32. </div>
  33. <el-table
  34. class="table"
  35. :data="list"
  36. height='50vh'
  37. border v-loading="loading"
  38. default-expand-all row-key="id"
  39. style="width: 100%">
  40. <el-table-column
  41. prop="name" width="200"
  42. label="会议名称">
  43. </el-table-column>
  44. <el-table-column
  45. prop="username"
  46. label="会议海报">
  47. <template slot-scope="scope"><img width="100" :src="scope.row.img" alt=""></template>
  48. </el-table-column>
  49. <el-table-column
  50. prop="username"
  51. label="主办方">
  52. </el-table-column>
  53. <el-table-column
  54. prop="username"
  55. label="主讲人">
  56. </el-table-column>
  57. <el-table-column
  58. prop=""
  59. label="会议时间">
  60. </el-table-column>
  61. <el-table-column
  62. prop=""
  63. label="会议简介">
  64. </el-table-column>
  65. <el-table-column
  66. prop=""
  67. label="酒店信息">
  68. </el-table-column>
  69. <el-table-column
  70. prop=""
  71. label="状态">
  72. </el-table-column>
  73. <el-table-column
  74. prop="zip" width="150"
  75. label="操作">
  76. <template slot-scope="scope">
  77. <el-button @click="dialogVisible=true,status='bind',cur_id=scope.row.id,name=scope.row.name" type="text" >添加酒店</el-button>
  78. <el-button class="edit" type="text">查看酒店</el-button>
  79. </template>
  80. </el-table-column>
  81. </el-table>
  82. <Page ref="pageButton" :current='form.page' :page_size='form.page_size' :total='total' @pageChange='gopage'/>
  83. </div>
  84. <el-dialog width="80%" class="hotel"
  85. :title="dialogTitle" :close-on-click-modal='false'
  86. :visible.sync="dialogVisible">
  87. <Hotel :status='status' :huiyi_name='name' :huiyi_id='cur_id' @addSuccess='add'/>
  88. </el-dialog>
  89. </section>
  90. </template>
  91. <script>
  92. import Page from '../../components/Page';
  93. import Hotel from '../../components/hotel';
  94. export default {
  95. components:{
  96. Page,Hotel
  97. },
  98. data(){
  99. return{
  100. edit:0,
  101. cur_id:'',
  102. name:'',
  103. status:'',
  104. form:{name:'',page:1,page_size:20},
  105. form1:{},
  106. total:1,
  107. list:[{name:'2333'}],
  108. loading:false,
  109. input:'',
  110. dialogVisible:false,
  111. dialogTitle:"添加酒店",
  112. defaultProps:{},
  113. data: [],
  114. }
  115. },
  116. methods:{
  117. addConference(){
  118. this.$router.push({path:'/conference/conference/add'})
  119. },
  120. //添加酒店
  121. add(){
  122. },
  123. gopage(size){
  124. if(size){
  125. this.form.page_size=size
  126. }
  127. this.form.page=this.$refs.pageButton.page
  128. this.getData()
  129. },
  130. getPermissions(){
  131. this.$api.getUserPermissions().then(res=>{
  132. this.data = res.data.data
  133. })
  134. },
  135. getData(){
  136. var parm=this.form;
  137. this.loading=true
  138. this.$api.getConferenceList(parm).then(res=>{
  139. this.list=res.data.data.list;
  140. this.total=res.data.data.total
  141. this.loading=false
  142. })
  143. },
  144. del(id){
  145. this.$confirm('确定删除吗', '提示', {
  146. type: 'warning'
  147. }).then(() => {
  148. this.$api.deleteEnterprise({id:id}).then((res)=>{
  149. this.$message({
  150. message: '删除成功',
  151. type: 'success'
  152. })
  153. this.getData()
  154. })
  155. })
  156. },
  157. },
  158. created(){
  159. // this.getPermissions()
  160. this.getData()
  161. }
  162. }
  163. </script>