Hotel.vue 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. <style lang='scss'>
  2. .signup_mannage{
  3. .bh{
  4. font-size: 14px;
  5. color: #666;
  6. line-height: 27px;
  7. margin-bottom: 10px;
  8. label{
  9. color:#333;
  10. font-size: 16px;
  11. display: inline-block;
  12. padding-right: 10px;
  13. }
  14. }
  15. .hotel{
  16. .el-dialog{
  17. margin-top: 30px !important;
  18. .el-form-item{
  19. margin-bottom: 10px;
  20. }
  21. }
  22. }
  23. }
  24. #map {
  25. overflow: hidden;
  26. width: 300px;
  27. height: 300px;
  28. }
  29. </style>
  30. <template>
  31. <section class="signup_mannage">
  32. <p><span>会议管理></span>酒店管理</p>
  33. <div class="content">
  34. <div class="filter">
  35. <el-form size="small" label-width="70px" :inline="true" label-position="left">
  36. <el-form-item label="">
  37. <el-select v-model="form.conference_id" clearable placeholder="请选择会议">
  38. <el-option
  39. v-for="(item, index) in conference_list"
  40. :key="index"
  41. :label="item.name"
  42. :value="item.id"
  43. ></el-option>
  44. </el-select>
  45. </el-form-item>
  46. <el-form-item label="">
  47. <el-input clearable placeholder="请输入酒店名称" v-model="form.name">
  48. </el-input>
  49. </el-form-item>
  50. <el-form-item>
  51. <el-button @click="getData" type="primary">搜索</el-button>
  52. </el-form-item>
  53. <el-form-item style="float:right" >
  54. <el-button @click="dialogVisible=true,dialogTitle='添加酒店',status='add'" icon="el-icon-plud" type="primary">添加酒店</el-button>
  55. <el-button plain icon="el-icon-download" type="primary">导出Excel</el-button>
  56. </el-form-item>
  57. </el-form>
  58. </div>
  59. <el-table
  60. class="table"
  61. :data="list"
  62. height='59vh'
  63. border v-loading="loading"
  64. default-expand-all row-key="id"
  65. style="width: 100%">
  66. <el-table-column
  67. prop="name"
  68. label="酒店名称">
  69. </el-table-column>
  70. <el-table-column
  71. prop="username"
  72. label="入住人数">
  73. </el-table-column>
  74. <el-table-column
  75. prop="username"
  76. label="入住率">
  77. </el-table-column>
  78. <el-table-column
  79. prop=""
  80. label="已举办会议">
  81. </el-table-column>
  82. <el-table-column
  83. prop="ctime"
  84. label="创建时间">
  85. </el-table-column>
  86. <el-table-column
  87. prop="zip" width="200" fixed="right"
  88. label="操作">
  89. <template slot-scope="scope">
  90. <el-button @click="dialogVisible=true,dialogTitle='酒店信息',status='view',cur_id=scope.row.id" class="edit" type="text" >查看</el-button>
  91. <el-button @click="dialogVisible=true,dialogTitle='编辑酒店',status='edit',cur_id=scope.row.id" type="text">编辑</el-button>
  92. <el-button @click="del(scope.row.id)" class="del" type="text" >删除</el-button>
  93. </template>
  94. </el-table-column>
  95. </el-table>
  96. <Page ref="pageButton" :current='form.page' :page_size='form.page_size' :total='total' @pageChange='gopage'/>
  97. </div>
  98. <el-dialog width="80%" class="hotel"
  99. :title="dialogTitle" :close-on-click-modal='false'
  100. :visible.sync="dialogVisible">
  101. <Hotel @view='viewUser' :status='status' :cur_id='cur_id' @addSuccess='add'/>
  102. </el-dialog>
  103. <el-dialog width="80%" class="hotel"
  104. title="报名列表" :close-on-click-modal='false'
  105. :visible.sync="dialogVisible1">
  106. <el-table
  107. class="table"
  108. :data="user_list" height="300"
  109. default-expand-all
  110. style="width: 100%;margin-top:10px;">
  111. <el-table-column prop="name" label="真实姓名">
  112. </el-table-column>
  113. <el-table-column prop="username" label="昵称">
  114. </el-table-column>
  115. <el-table-column prop="" label="头像">
  116. </el-table-column>
  117. <el-table-column prop="ctime" label="性别">
  118. <template slot-scope="scope">
  119. {{scope.row.sex==0?'男':'女'}}
  120. </template>
  121. </el-table-column>
  122. <el-table-column prop="phone" label="手机号">
  123. </el-table-column>
  124. </el-table>
  125. </el-dialog>
  126. </section>
  127. </template>
  128. <script>
  129. import Page from '../../components/Page';
  130. import Hotel from '../../components/hotel';
  131. export default {
  132. components:{
  133. Page,Hotel
  134. },
  135. data(){
  136. return{
  137. form:{},
  138. order_status:'-3',
  139. list:[{}],
  140. reason:[],
  141. invoice:{},
  142. total:0,
  143. loading:false,
  144. dialogTitle:'添加酒店',
  145. dialogVisible:false,
  146. dialogVisible1:false,
  147. status:'add',
  148. cur_id:'',
  149. conference_list:[],
  150. user_list:[]
  151. }
  152. },
  153. methods:{
  154. viewUser(data){
  155. this.dialogVisible1=true
  156. this.$api.getSignupList(data).then(res=>{
  157. this.user_list=res.data.data.list;
  158. })
  159. },
  160. add(){
  161. this.dialogVisible=false;
  162. this.getData();
  163. },
  164. del(id){
  165. this.$confirm("确定删除吗", "提示", {
  166. type: "warning",
  167. }).then(() => {
  168. this.$api.delHotel({ id: id }).then((res) => {
  169. this.$message({
  170. message: "删除成功",
  171. type: "success",
  172. });
  173. this.getData();
  174. });
  175. });
  176. },
  177. gopage(size){
  178. if(size){
  179. this.form.page_size=size
  180. }
  181. this.form.page=this.$refs.pageButton.page
  182. this.getData()
  183. },
  184. tabClick(){
  185. },
  186. getData(){
  187. var parm=this.form;
  188. this.loading=true
  189. this.$api.getHotelList(parm).then(res=>{
  190. this.list=res.data.data.list;
  191. this.total=res.data.data.total
  192. this.loading=false
  193. })
  194. },
  195. },
  196. created(){
  197. this.getData()
  198. this.$api.getConferenceList().then(res=>{
  199. this.conference_list=res.data.data.list;
  200. })
  201. }
  202. }
  203. </script>