chunk-baa9f19c.44dc1888.js 18 KB

12
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-baa9f19c"],{"0353":function(t,e,i){"use strict";var a=i("6bf8"),s=RegExp.prototype.exec,n=String.prototype.replace,l=s,r="lastIndex",o=function(){var t=/a/,e=/b*/g;return s.call(t,"a"),s.call(e,"a"),0!==t[r]||0!==e[r]}(),c=void 0!==/()??/.exec("")[1],u=o||c;u&&(l=function(t){var e,i,l,u,m=this;return c&&(i=new RegExp("^"+m.source+"$(?!\\s)",a.call(m))),o&&(e=m[r]),l=s.call(m,t),o&&l&&(m[r]=m.global?l.index+l[0].length:e),c&&l&&l.length>1&&n.call(l[0],i,(function(){for(u=1;u<arguments.length-2;u++)void 0===arguments[u]&&(l[u]=void 0)})),l}),t.exports=l},"129d":function(t,e,i){"use strict";i("a210")},"69b0":function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t===1/e:t!=t&&e!=e}},"6bf8":function(t,e,i){"use strict";var a=i("a86f");t.exports=function(){var t=a(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},"992c":function(t,e,i){},9973:function(t,e,i){"use strict";var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("el-pagination",{attrs:{background:"","page-size":t.page_size?t.page_size:20,"current-page":t.current,"page-sizes":[10,20,30,40,50,60,70,80,90,100],layout:"total,sizes,prev, pager, next",total:t.total},on:{"current-change":t.getData,"size-change":t.handleSizeChange}})},s=[],n={data:function(){return{page:1}},props:{total:"",page_size:"",current:""},methods:{getData:function(t){this.page=t,this.$emit("pageChange")},handleSizeChange:function(t){this.$emit("pageChange",t)}},created:function(){}},l=n,r=(i("129d"),i("5d22")),o=Object(r["a"])(l,a,s,!1,null,null,null);e["a"]=o.exports},a210:function(t,e,i){},a450:function(t,e,i){var a=i("bb8b").f,s=Function.prototype,n=/^\s*function ([^ (]*)/,l="name";l in s||i("26df")&&a(s,l,{configurable:!0,get:function(){try{return(""+this).match(n)[1]}catch(t){return""}}})},bc6c:function(t,e,i){"use strict";i("992c")},bf73:function(t,e,i){"use strict";var a=i("0353");i("e99b")({target:"RegExp",proto:!0,forced:a!==/./.exec},{exec:a})},c46f:function(t,e,i){"use strict";i("bf73");var a=i("84e8"),s=i("065d"),n=i("0926"),l=i("3ab0"),r=i("839a"),o=i("0353"),c=r("species"),u=!n((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),m=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var i="ab".split(t);return 2===i.length&&"a"===i[0]&&"b"===i[1]}();t.exports=function(t,e,i){var p=r(t),f=!n((function(){var e={};return e[p]=function(){return 7},7!=""[t](e)})),d=f?!n((function(){var e=!1,i=/a/;return i.exec=function(){return e=!0,null},"split"===t&&(i.constructor={},i.constructor[c]=function(){return i}),i[p](""),!e})):void 0;if(!f||!d||"replace"===t&&!u||"split"===t&&!m){var h=/./[p],g=i(l,p,""[t],(function(t,e,i,a,s){return e.exec===o?f&&!s?{done:!0,value:h.call(e,i,a)}:{done:!0,value:t.call(i,e,a)}:{done:!1}})),b=g[0],_=g[1];a(String.prototype,t,b),s(RegExp.prototype,p,2==e?function(t,e){return _.call(t,this,e)}:function(t){return _.call(t,this)})}}},d91d:function(t,e,i){"use strict";var a=i("a86f"),s=i("69b0"),n=i("f417");i("c46f")("search",1,(function(t,e,i,l){return[function(i){var a=t(this),s=void 0==i?void 0:i[e];return void 0!==s?s.call(i,a):new RegExp(i)[e](String(a))},function(t){var e=l(i,t,this);if(e.done)return e.value;var r=a(t),o=String(this),c=r.lastIndex;s(c,0)||(r.lastIndex=0);var u=n(r,o);return s(r.lastIndex,c)||(r.lastIndex=c),null===u?-1:u.index}]}))},f417:function(t,e,i){"use strict";var a=i("d445"),s=RegExp.prototype.exec;t.exports=function(t,e){var i=t.exec;if("function"===typeof i){var n=i.call(t,e);if("object"!==typeof n)throw new TypeError("RegExp exec method returned something other than an Object or null");return n}if("RegExp"!==a(t))throw new TypeError("RegExp#exec called on incompatible receiver");return s.call(t,e)}},fd49:function(t,e,i){"use strict";var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("section",{staticClass:"add_hotel"},[i("el-form",{attrs:{"label-width":"100px",size:"small"}},["view"!==t.h_status?i("el-row",[i("el-col",{attrs:{span:12}},[i("el-form-item",{attrs:{label:"会议名称"}},[i("el-input",{attrs:{disabled:""},model:{value:t.huiyi_name,callback:function(e){t.huiyi_name=e},expression:"huiyi_name"}})],1)],1),i("el-col",{attrs:{span:10}},[i("el-form-item",{attrs:{label:"选择历史酒店"}},[i("el-select",{attrs:{placeholder:"请选择酒店",clearable:"",filterable:""},on:{change:function(e){t.id=t.h_id,t.getData()}},model:{value:t.h_id,callback:function(e){t.h_id=e},expression:"h_id"}},t._l(t.organizerList,(function(t,e){return i("el-option",{key:e,attrs:{label:t.name,value:t.id}})})),1)],1)],1),i("el-col",{attrs:{span:24}},[i("h2",{staticClass:"title"},[t._v("填写酒店信息")])]),i("el-col",{attrs:{span:12}},[i("el-form-item",{attrs:{label:"酒店名称",required:""}},[i("el-input",{attrs:{clearable:""},model:{value:t.form.name,callback:function(e){t.$set(t.form,"name",e)},expression:"form.name"}})],1)],1),i("el-col",{attrs:{span:10}},[i("el-form-item",{attrs:{label:"酒店电话",required:""}},[i("el-input",{attrs:{clearable:""},model:{value:t.form.telephone,callback:function(e){t.$set(t.form,"telephone",e)},expression:"form.telephone"}})],1)],1),i("el-col",{attrs:{span:12}},[i("el-form-item",{attrs:{label:"酒店地址",required:""}},[i("el-input",{attrs:{clearable:""},model:{value:t.form.address,callback:function(e){t.$set(t.form,"address",e)},expression:"form.address"}})],1)],1),i("el-col",{attrs:{span:10,offset:1}},[i("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(e){t.dialogVisible=!0,t.initMap()}}},[t._v("点击获取位置")])],1),i("el-col",{attrs:{span:24}},[i("el-form-item",{staticClass:"hotel_imgs",attrs:{label:"酒店图片",required:""}},[i("ul",{staticClass:"img_list"},[t._l(t.form.imgs,(function(e,a){return i("li",{key:a},[i("img",{attrs:{src:e,alt:""}}),i("p",{staticClass:"move"},[i("i",{on:{click:function(e){return t.left_right(a,-1)}}},[i("i",{staticClass:"el-icon-caret-left"}),t._v(" 左移")]),t._v("\n   "),i("i",{staticClass:"el-icon-delete",on:{click:function(e){return t.remove(a)}}}),t._v("  \n "),i("i",{on:{click:function(e){return t.left_right(a,1)}}},[t._v("右移"),i("i",{staticClass:"el-icon-caret-right"})])])])})),i("li",[i("el-upload",{staticStyle:{height:"100px"},attrs:{"on-success":t.imgchange,action:"/api/admin/uploadfile","show-file-list":!1,"list-type":"picture-card"}},[i("i",{staticClass:"el-icon-plus"})]),i("span",{staticStyle:{"font-size":"12px",color:"#999999"}},[t._v("建议图片尺寸为:210*160")])],1)],2)])],1),i("el-col",{attrs:{span:24}},[i("h2",{staticClass:"title"},[t._v("填写房型信息 ")])]),i("el-col",{attrs:{span:24}},t._l(t.type,(function(e,a){return i("el-row",{key:a},[i("el-col",{staticClass:"hotel_type",attrs:{span:20}},[i("el-form",{attrs:{inline:!0,"label-width":"70px",size:"small"}},[i("el-form-item",{attrs:{label:"房型名称"}},[i("el-input",{attrs:{clearable:""},model:{value:e.name,callback:function(i){t.$set(e,"name",i)},expression:"item.name"}})],1),i("el-form-item",{attrs:{label:"可住人数"}},[i("el-input",{attrs:{clearable:""},model:{value:e.enable_number,callback:function(i){t.$set(e,"enable_number",i)},expression:"item.enable_number"}})],1),i("el-form-item",{attrs:{label:"房型数量"}},[i("el-input",{attrs:{clearable:""},model:{value:e.room_number,callback:function(i){t.$set(e,"room_number",i)},expression:"item.room_number"}})],1),i("el-form-item",{attrs:{label:"面积"}},[i("el-input",{attrs:{clearable:""},model:{value:e.room_area,callback:function(i){t.$set(e,"room_area",i)},expression:"item.room_area"}})],1),i("el-form-item",{attrs:{label:"楼层"}},[i("el-input",{attrs:{clearable:""},model:{value:e.floor,callback:function(i){t.$set(e,"floor",i)},expression:"item.floor"}})],1),i("el-form-item",{attrs:{label:"床型"}},[i("el-input",{attrs:{clearable:""},model:{value:e.bed_type,callback:function(i){t.$set(e,"bed_type",i)},expression:"item.bed_type"}})],1),i("el-form-item",{attrs:{label:"餐食"}},[i("el-input",{attrs:{clearable:""},model:{value:e.food_condition,callback:function(i){t.$set(e,"food_condition",i)},expression:"item.food_condition"}})],1),i("el-form-item",{attrs:{label:"窗户"}},[i("el-input",{attrs:{clearable:""},model:{value:e.window_condition,callback:function(i){t.$set(e,"window_condition",i)},expression:"item.window_condition"}})],1),i("el-form-item",{attrs:{label:"房型"}},[i("el-select",{attrs:{clearable:""},model:{value:e.room_type,callback:function(i){t.$set(e,"room_type",i)},expression:"item.room_type"}},t._l(t.hotel_type,(function(t,e){return i("el-option",{key:e,attrs:{label:t.name,value:t.value}})})),1)],1),i("el-form-item",{attrs:{label:"房价"}},[i("el-input",{attrs:{clearable:""},model:{value:e.unit_price,callback:function(i){t.$set(e,"unit_price",i)},expression:"item.unit_price"}})],1),i("br"),i("el-form-item",{staticClass:"hotel_imgs",attrs:{label:"酒店图片"}},[i("ul",{staticClass:"img_list"},[t._l(e.imgs,(function(e,s){return i("li",{key:"img"+s},[i("img",{attrs:{src:e,alt:""}}),i("p",{staticClass:"move"},[i("i",{on:{click:function(e){return t.left_right1(s,a,-1)}}},[i("i",{staticClass:"el-icon-caret-left"}),t._v(" 左移")]),t._v("\n   "),i("i",{staticClass:"el-icon-delete",on:{click:function(e){return t.remove1(s,a)}}}),t._v("  \n "),i("i",{on:{click:function(e){return t.left_right1(s,a,1)}}},[t._v("右移"),i("i",{staticClass:"el-icon-caret-right"})])])])})),i("li",[i("el-upload",{attrs:{"on-success":function(e,i){t.imgchange1(a,e,i)},action:"/api/admin/uploadfile","show-file-list":!1,"list-type":"picture-card"}},[i("i",{staticClass:"el-icon-plus"})])],1)],2)])],1)],1),i("el-col",{attrs:{span:3,offset:1}},[i("el-button",{attrs:{size:"mini",plain:"",type:"primary",icon:"el-icon-top"},on:{click:function(e){return t.up_down(a,1)}}}),i("br"),i("br"),i("el-button",{attrs:{size:"mini",plain:"",type:"primary",icon:"el-icon-bottom"},on:{click:function(e){return t.up_down(a,-1)}}}),i("br"),i("br"),i("el-button",{attrs:{size:"mini",plain:"",type:"danger",icon:"el-icon-delete"},on:{click:function(e){return t.del(a)}}})],1)],1)})),1),i("el-col",{attrs:{span:24}},[i("el-button",{attrs:{type:"info",plain:""},on:{click:t.add_type}},[t._v("添加房型")])],1),i("el-col",{staticStyle:{"text-align":"right",padding:"10px"},attrs:{span:24}},[i("el-button",{attrs:{size:"small",type:"primary"},on:{click:t.save}},[t._v("保存")]),i("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return t.save(1)}}},[t._v("继续添加酒店")])],1)],1):t._e(),"view"==t.h_status?i("el-row",[i("el-col",{attrs:{span:24}},[i("el-form-item",{attrs:{label:"会议名称"}},[i("el-input",{attrs:{disabled:""},model:{value:t.form.name,callback:function(e){t.$set(t.form,"name",e)},expression:"form.name"}})],1)],1),i("el-col",{attrs:{span:24}},[i("el-form-item",{attrs:{label:"酒店名称"}},[i("el-input",{attrs:{disabled:""},model:{value:t.form.name,callback:function(e){t.$set(t.form,"name",e)},expression:"form.name"}})],1)],1),i("el-col",{attrs:{span:24}},[i("el-form-item",{attrs:{label:"酒店地址"}},[i("el-input",{attrs:{disabled:""},model:{value:t.form.address,callback:function(e){t.$set(t.form,"address",e)},expression:"form.address"}})],1)],1),i("el-col",{attrs:{span:24}},[i("el-form-item",{attrs:{label:"酒店电话"}},[i("el-input",{attrs:{disabled:""},model:{value:t.form.telephone,callback:function(e){t.$set(t.form,"telephone",e)},expression:"form.telephone"}})],1)],1),i("el-col",{attrs:{span:24}},[i("el-form-item",{attrs:{label:"酒店图片"}},[i("ul",{staticClass:"img_list"},t._l(t.form.imgs,(function(t,e){return i("li",{key:"img"+e},[i("img",{attrs:{src:t,alt:""}})])})),0)])],1),t._l(t.form.rooms,(function(e,a){return i("el-col",{key:"room"+a,staticClass:"hotel_type",attrs:{span:24}},[i("p",{staticStyle:{color:"#999",padding:"10px 33px"}},[t._v("房型1")]),i("el-form-item",{attrs:{label:"房型名称"}},[i("p",{staticStyle:{color:"#666"}},[t._v("\n "+t._s(e.name)+" | 数量:"+t._s(e.room_number)+"间 | 可住人数:"+t._s(e.enable_number)+"人 | 面积:"+t._s(e.room_area)+"平方米 |\n 楼层:"+t._s(e.floor)+"层 | 床型:"+t._s(e.bed_type)+" | 餐食:"+t._s(e.food_condition)+" | 窗户:"+t._s(e.window_condition)+" | 房型:"+t._s(e.room_type)+" | 房价:"+t._s(e.unit_price)+"\n ")])]),i("el-form-item",{attrs:{label:"房型图片"}},[i("ul",{staticClass:"img_list"},t._l(e.imgs,(function(t,e){return i("li",{key:"img"+e},[i("img",{attrs:{src:t,alt:""}})])})),0)]),i("el-form-item",{attrs:{"label-width":"30px"}},[t._v("\n 已经预定:"+t._s(e.order)+"   剩余:"+t._s(e.surplus_number)+"\n "),i("el-button",{attrs:{size:"big",type:"text"},on:{click:function(i){return t.view(t.form.id,e.id)}}},[t._v("查看报名老师")])],1)],1)}))],2):t._e()],1),i("el-dialog",{attrs:{title:"地图",modal:!1,visible:t.dialogVisible,width:"600px"},on:{"update:visible":function(e){t.dialogVisible=e}}},[i("el-input",{attrs:{placeholder:"请输入关键字搜索"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.localSearch(e)}},model:{value:t.keyword,callback:function(e){t.keyword=e},expression:"keyword"}},[i("el-button",{attrs:{slot:"append",icon:"el-icon-search"},on:{click:t.localSearch},slot:"append"})],1),t.form.longitude?i("p",{staticStyle:{margin:"10px 0"}},[t._v("经纬:"+t._s(t.form.longitude)+" , "+t._s(t.form.latitude))]):t._e(),i("div",{attrs:{id:"map"}}),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{attrs:{size:"mini"},on:{click:function(e){t.dialogVisible=!1}}},[t._v("取 消")]),i("el-button",{attrs:{size:"mini",type:"primary"},on:{click:function(e){t.dialogVisible=!1}}},[t._v("确 定")])],1)],1)],1)},s=[],n=(i("d91d"),i("a450"),{name:"hotel",props:{status:"",cur_id:"",huiyi_id:"",huiyi_name:""},data:function(){return{id:"",h_id:"",dialogVisible:!1,h_status:"view",organizerList:[],cityList:[],form:{imgs:[]},type:[{imgs:[]}],hotel_type:[{name:"单人间",value:1},{name:"一人单住或标间合住",value:2}],local:null,keyword:""}},methods:{view:function(t,e){this.$emit("view",{hotel_id:t,room_id:e})},getList:function(){var t=this;this.$api.getHotelList().then((function(e){t.organizerList=e.data.data.list}))},getData:function(){var t=this;this.$api.getHotel({id:this.id}).then((function(e){e.data.data&&(t.form=e.data.data,t.type=e.data.data.rooms)}))},add_type:function(){this.type.push({imgs:[]})},del:function(t){this.type.splice(t,1)},imgchange:function(t,e){var i=this.form.imgs;i.push(e.response.data),this.form.imgs=i},imgchange1:function(t,e,i){var a=this.type[t].imgs;a.push(i.response.data),this.type[t].imgs=a},remove:function(t){var e=this.form.imgs;e.splice(t,1),this.form.imgs=e},remove1:function(t,e){var i=this.type[e].imgs;i.splice(t,1),this.type[e].imgs=i},left_right:function(t,e){var i=this.form.imgs,a=i[t];if(-1==e){if(t>0){var s=i[t-1];this.$set(i,t-1,a),this.$set(i,t,s)}}else if(t<i.length-1){var n=i[t+1];this.$set(i,t+1,a),this.$set(i,t,n)}this.form.imgs=i},left_right1:function(t,e,i){var a=this.type[e],s=a.imgs,n=s[t];if(-1==i){if(t>0){var l=s[t-1];this.$set(s,t-1,n),this.$set(s,t,l)}}else if(t<s.length-1){var r=s[t+1];this.$set(s,t+1,n),this.$set(s,t,r)}a.imgs=s,this.$set(this.type,e,a)},up_down:function(t,e){var i=this.type,a=i[t];if(1==e){if(t>0){var s=i[t-1];this.$set(i,t-1,a),this.$set(i,t,s)}}else if(t<i.length-1){var n=i[t+1];this.$set(i,t+1,a),this.$set(i,t,n)}this.type=i},save:function(t){var e=this,i=this.form;i.rooms=this.type,i.name?i.telphone?i.address?i.imgs.length<=0?this.$message({message:"请上传酒店图片",type:"error"}):i.longitude&&i.latitude?("bind"==this.h_status&&(i.conference_id=this.huiyi_id,this.$api.addConferenceHotel(i).then((function(i){0==i.data.code?(e.$message({message:"添加成功",type:"success"}),e.form={imgs:[]},e.type=[{imgs:[]}],e.h_id="",1!=t&&e.$emit("addSuccess")):e.$message({message:i.data.message,type:"error"})}))),"add"==this.h_status&&this.$api.addHotel(i).then((function(i){0==i.data.code?(e.$message({message:"添加成功",type:"success"}),e.form={imgs:[]},e.type=[{imgs:[]}],e.h_id="",1!=t&&e.$emit("addSuccess")):e.$message({message:i.data.message,type:"error"})})),"edit"==this.h_status&&this.$api.editHotel(i).then((function(i){0==i.data.code?(e.$message({message:"修改成功",type:"success"}),e.form={imgs:[]},e.type=[{imgs:[]}],e.h_id="",1!=t&&e.$emit("addSuccess")):e.$message({message:i.data.message,type:"error"})}))):this.$message({message:"请获取酒店位置",type:"error"}):this.$message({message:"请输入酒店地址",type:"error"}):this.$message({message:"请输入酒店电话",type:"error"}):this.$message({message:"请输入酒店名称",type:"error"})},localSearch:function(){this.local.search(this.keyword)},initMap:function(){var t=this;setTimeout((function(){var e=new BMapGL.Map("map");t.form.longitude?e.centerAndZoom(new BMapGL.Point(t.form.longitude,t.form.latitude),15):e.centerAndZoom(new BMapGL.Point(116.404,39.928),15),t.local=new BMapGL.LocalSearch(e,{renderOptions:{map:e}}),e.enableScrollWheelZoom(!0),e.addEventListener("click",(function(i){t.$set(t.form,"longitude",i.latlng.lng),t.$set(t.form,"latitude",i.latlng.lat);var a=new BMapGL.Marker(new BMapGL.Point(i.latlng.lng,i.latlng.lat));e.clearOverlays(),e.addOverlay(a)}))}),500)}},watch:{status:function(t,e){this.h_status=t,this.h_id="",this.getList(),"add"!=t&&"bind"!=t&&this.getData(),"add"==t&&(this.form={imgs:[]},this.type=[{imgs:[]}])},cur_id:function(t){this.id=t,this.getData(),this.getList()}},created:function(){var t=this;this.$api.getHotelList().then((function(e){t.organizerList=e.data.data.list})),this.h_status=this.status,this.id=this.cur_id,"add"!=this.h_status&&"bind"!=this.h_status&&this.getData()}}),l=n,r=(i("bc6c"),i("5d22")),o=Object(r["a"])(l,a,s,!1,null,null,null);e["a"]=o.exports}}]);
  2. //# sourceMappingURL=chunk-baa9f19c.44dc1888.js.map