chunk-4b9605ab.ed85861b.js 17 KB

12
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4b9605ab"],{"0353":function(t,e,a){"use strict";var i=a("6bf8"),l=RegExp.prototype.exec,n=String.prototype.replace,s=l,r="lastIndex",o=function(){var t=/a/,e=/b*/g;return l.call(t,"a"),l.call(e,"a"),0!==t[r]||0!==e[r]}(),c=void 0!==/()??/.exec("")[1],u=o||c;u&&(s=function(t){var e,a,s,u,m=this;return c&&(a=new RegExp("^"+m.source+"$(?!\\s)",i.call(m))),o&&(e=m[r]),s=l.call(m,t),o&&s&&(m[r]=m.global?s.index+s[0].length:e),c&&s&&s.length>1&&n.call(s[0],a,(function(){for(u=1;u<arguments.length-2;u++)void 0===arguments[u]&&(s[u]=void 0)})),s}),t.exports=s},"129d":function(t,e,a){"use strict";a("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,a){"use strict";var i=a("a86f");t.exports=function(){var t=i(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,a){},9973:function(t,e,a){"use strict";var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("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}})},l=[],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(){}},s=n,r=(a("129d"),a("5d22")),o=Object(r["a"])(s,i,l,!1,null,null,null);e["a"]=o.exports},a210:function(t,e,a){},bc6c:function(t,e,a){"use strict";a("992c")},bf73:function(t,e,a){"use strict";var i=a("0353");a("e99b")({target:"RegExp",proto:!0,forced:i!==/./.exec},{exec:i})},c46f:function(t,e,a){"use strict";a("bf73");var i=a("84e8"),l=a("065d"),n=a("0926"),s=a("3ab0"),r=a("839a"),o=a("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 a="ab".split(t);return 2===a.length&&"a"===a[0]&&"b"===a[1]}();t.exports=function(t,e,a){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,a=/a/;return a.exec=function(){return e=!0,null},"split"===t&&(a.constructor={},a.constructor[c]=function(){return a}),a[p](""),!e})):void 0;if(!f||!d||"replace"===t&&!u||"split"===t&&!m){var h=/./[p],g=a(s,p,""[t],(function(t,e,a,i,l){return e.exec===o?f&&!l?{done:!0,value:h.call(e,a,i)}:{done:!0,value:t.call(a,e,i)}:{done:!1}})),b=g[0],_=g[1];i(String.prototype,t,b),l(RegExp.prototype,p,2==e?function(t,e){return _.call(t,this,e)}:function(t){return _.call(t,this)})}}},d91d:function(t,e,a){"use strict";var i=a("a86f"),l=a("69b0"),n=a("f417");a("c46f")("search",1,(function(t,e,a,s){return[function(a){var i=t(this),l=void 0==a?void 0:a[e];return void 0!==l?l.call(a,i):new RegExp(a)[e](String(i))},function(t){var e=s(a,t,this);if(e.done)return e.value;var r=i(t),o=String(this),c=r.lastIndex;l(c,0)||(r.lastIndex=0);var u=n(r,o);return l(r.lastIndex,c)||(r.lastIndex=c),null===u?-1:u.index}]}))},f417:function(t,e,a){"use strict";var i=a("d445"),l=RegExp.prototype.exec;t.exports=function(t,e){var a=t.exec;if("function"===typeof a){var n=a.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"!==i(t))throw new TypeError("RegExp#exec called on incompatible receiver");return l.call(t,e)}},fd49:function(t,e,a){"use strict";var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("section",{staticClass:"add_hotel"},[a("el-form",{attrs:{"label-width":"100px",size:"small"}},["view"!==t.h_status?a("el-row",[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"会议名称"}},[a("el-input",{attrs:{disabled:""},model:{value:t.huiyi_name,callback:function(e){t.huiyi_name=e},expression:"huiyi_name"}})],1)],1),a("el-col",{attrs:{span:10}},[a("el-form-item",{attrs:{label:"选择历史酒店"}},[a("el-select",{attrs:{placeholder:"请选择酒店",clearable:"",filterable:""},on:{change:t.getData},model:{value:t.cur_id,callback:function(e){t.cur_id=e},expression:"cur_id"}},t._l(t.organizerList,(function(t,e){return a("el-option",{key:e,attrs:{label:t.name,value:t.id}})})),1)],1)],1),a("el-col",{attrs:{span:24}},[a("h2",{staticClass:"title"},[t._v("填写酒店信息")])]),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"酒店名称"}},[a("el-input",{attrs:{clearable:""},model:{value:t.form.name,callback:function(e){t.$set(t.form,"name",e)},expression:"form.name"}})],1)],1),a("el-col",{attrs:{span:10}},[a("el-form-item",{attrs:{label:"酒店电话"}},[a("el-input",{attrs:{clearable:""},model:{value:t.form.telephone,callback:function(e){t.$set(t.form,"telephone",e)},expression:"form.telephone"}})],1)],1),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"酒店地址"}},[a("el-input",{attrs:{clearable:""},model:{value:t.form.address,callback:function(e){t.$set(t.form,"address",e)},expression:"form.address"}})],1)],1),a("el-col",{attrs:{span:10,offset:1}},[a("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(e){t.dialogVisible=!0,t.initMap()}}},[t._v("点击获取位置")])],1),a("el-col",{attrs:{span:24}},[a("el-form-item",{staticClass:"hotel_imgs",attrs:{label:"酒店图片"}},[a("ul",{staticClass:"img_list"},[t._l(t.form.imgs,(function(e,i){return a("li",{key:i},[a("img",{attrs:{src:e,alt:""}}),a("p",{staticClass:"move"},[a("i",{on:{click:function(e){return t.left_right(i,-1)}}},[a("i",{staticClass:"el-icon-caret-left"}),t._v(" 左移")]),t._v("\n   "),a("i",{staticClass:"el-icon-delete",on:{click:function(e){return t.remove(i)}}}),t._v("  \n "),a("i",{on:{click:function(e){return t.left_right(i,1)}}},[t._v("右移"),a("i",{staticClass:"el-icon-caret-right"})])])])})),a("li",[a("el-upload",{attrs:{"on-success":t.imgchange,action:"/api/admin/uploadfile","show-file-list":!1,"list-type":"picture-card"}},[a("i",{staticClass:"el-icon-plus"})]),a("span",{staticStyle:{"font-size":"12px",color:"#999999"}},[t._v("建议图片尺寸为:210*160")])],1)],2)])],1),a("el-col",{attrs:{span:24}},[a("h2",{staticClass:"title"},[t._v("填写房型信息")])]),a("el-col",{attrs:{span:24}},t._l(t.type,(function(e,i){return a("el-row",{key:i},[a("el-col",{staticClass:"hotel_type",attrs:{span:20}},[a("el-form",{attrs:{inline:!0,"label-width":"70px",size:"small"}},[a("el-form-item",{attrs:{label:"房型名称"}},[a("el-input",{attrs:{clearable:""},model:{value:e.name,callback:function(a){t.$set(e,"name",a)},expression:"item.name"}})],1),a("el-form-item",{attrs:{label:"可住人数"}},[a("el-input",{attrs:{clearable:""},model:{value:e.enable_number,callback:function(a){t.$set(e,"enable_number",a)},expression:"item.enable_number"}})],1),a("el-form-item",{attrs:{label:"房型数量"}},[a("el-input",{attrs:{clearable:""},model:{value:e.room_number,callback:function(a){t.$set(e,"room_number",a)},expression:"item.room_number"}})],1),a("el-form-item",{attrs:{label:"面积"}},[a("el-input",{attrs:{clearable:""},model:{value:e.room_area,callback:function(a){t.$set(e,"room_area",a)},expression:"item.room_area"}})],1),a("el-form-item",{attrs:{label:"楼层"}},[a("el-input",{attrs:{clearable:""},model:{value:e.floor,callback:function(a){t.$set(e,"floor",a)},expression:"item.floor"}})],1),a("el-form-item",{attrs:{label:"床型"}},[a("el-input",{attrs:{clearable:""},model:{value:e.bed_type,callback:function(a){t.$set(e,"bed_type",a)},expression:"item.bed_type"}})],1),a("el-form-item",{attrs:{label:"餐食"}},[a("el-input",{attrs:{clearable:""},model:{value:e.food_condition,callback:function(a){t.$set(e,"food_condition",a)},expression:"item.food_condition"}})],1),a("el-form-item",{attrs:{label:"窗户"}},[a("el-input",{attrs:{clearable:""},model:{value:e.window_condition,callback:function(a){t.$set(e,"window_condition",a)},expression:"item.window_condition"}})],1),a("el-form-item",{attrs:{label:"房型"}},[a("el-select",{attrs:{clearable:""},model:{value:e.room_type,callback:function(a){t.$set(e,"room_type",a)},expression:"item.room_type"}},t._l(t.hotel_type,(function(t,e){return a("el-option",{key:e,attrs:{label:t.name,value:t.value}})})),1)],1),a("el-form-item",{attrs:{label:"房价"}},[a("el-input",{attrs:{clearable:""},model:{value:e.unit_price,callback:function(a){t.$set(e,"unit_price",a)},expression:"item.unit_price"}})],1),a("br"),a("el-form-item",{staticClass:"hotel_imgs",attrs:{label:"酒店图片"}},[a("ul",{staticClass:"img_list"},[t._l(e.imgs,(function(e,l){return a("li",{key:"img"+l},[a("img",{attrs:{src:e,alt:""}}),a("p",{staticClass:"move"},[a("i",{on:{click:function(e){return t.left_right1(l,i,-1)}}},[a("i",{staticClass:"el-icon-caret-left"}),t._v(" 左移")]),t._v("\n   "),a("i",{staticClass:"el-icon-delete",on:{click:function(e){return t.remove1(l,i)}}}),t._v("  \n "),a("i",{on:{click:function(e){return t.left_right1(l,i,1)}}},[t._v("右移"),a("i",{staticClass:"el-icon-caret-right"})])])])})),a("li",[a("el-upload",{attrs:{"on-success":function(e,a){t.imgchange1(i,e,a)},action:"/api/admin/uploadfile","show-file-list":!1,"list-type":"picture-card"}},[a("i",{staticClass:"el-icon-plus"})])],1)],2)])],1)],1),a("el-col",{attrs:{span:3,offset:1}},[a("el-button",{attrs:{size:"mini",plain:"",type:"primary",icon:"el-icon-top"},on:{click:function(e){return t.up_down(i,1)}}}),a("br"),a("br"),a("el-button",{attrs:{size:"mini",plain:"",type:"primary",icon:"el-icon-bottom"},on:{click:function(e){return t.up_down(i,-1)}}}),a("br"),a("br"),a("el-button",{attrs:{size:"mini",plain:"",type:"danger",icon:"el-icon-delete"},on:{click:function(e){return t.del(i)}}})],1)],1)})),1),a("el-col",{attrs:{span:24}},[a("el-button",{attrs:{type:"info",plain:""},on:{click:t.add_type}},[t._v("添加房型")])],1),a("el-col",{staticStyle:{"text-align":"right",padding:"10px"},attrs:{span:24}},[a("el-button",{attrs:{size:"small",type:"primary"},on:{click:t.save}},[t._v("保存")]),a("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?a("el-row",[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"会议名称"}},[a("el-input",{attrs:{disabled:""},model:{value:t.form.name,callback:function(e){t.$set(t.form,"name",e)},expression:"form.name"}})],1)],1),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"酒店名称"}},[a("el-input",{attrs:{disabled:""},model:{value:t.form.name,callback:function(e){t.$set(t.form,"name",e)},expression:"form.name"}})],1)],1),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"酒店地址"}},[a("el-input",{attrs:{disabled:""},model:{value:t.form.address,callback:function(e){t.$set(t.form,"address",e)},expression:"form.address"}})],1)],1),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"酒店电话"}},[a("el-input",{attrs:{disabled:""},model:{value:t.form.telephone,callback:function(e){t.$set(t.form,"telephone",e)},expression:"form.telephone"}})],1)],1),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"酒店图片"}},[a("ul",{staticClass:"img_list"},t._l(t.form.imgs,(function(t,e){return a("li",{key:"img"+e},[a("img",{attrs:{src:t,alt:""}})])})),0)])],1),t._l(t.form.rooms,(function(e,i){return a("el-col",{key:"room"+i,staticClass:"hotel_type",attrs:{span:24}},[a("p",{staticStyle:{color:"#999",padding:"10px 33px"}},[t._v("房型1")]),a("el-form-item",{attrs:{label:"房型名称"}},[a("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 ")])]),a("el-form-item",{attrs:{label:"房型图片"}},[a("ul",{staticClass:"img_list"},t._l(e.imgs,(function(t,e){return a("li",{key:"img"+e},[a("img",{attrs:{src:t,alt:""}})])})),0)]),a("el-form-item",{attrs:{"label-width":"30px"}},[t._v("\n 已经预定:"+t._s(e.order)+"   剩余:"+t._s(e.surplus_number)+"\n "),a("el-button",{attrs:{size:"big",type:"text"}},[t._v("查看报名老师")])],1)],1)}))],2):t._e()],1),a("el-dialog",{attrs:{title:"地图",modal:!1,visible:t.dialogVisible,width:"600px"},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("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"}},[a("el-button",{attrs:{slot:"append",icon:"el-icon-search"},on:{click:t.localSearch},slot:"append"})],1),t.form.longitude?a("p",{staticStyle:{margin:"10px 0"}},[t._v("经纬:"+t._s(t.form.longitude)+" , "+t._s(t.form.latitude))]):t._e(),a("div",{attrs:{id:"map"}}),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{size:"mini"},on:{click:function(e){t.dialogVisible=!1}}},[t._v("取 消")]),a("el-button",{attrs:{size:"mini",type:"primary"},on:{click:function(e){t.dialogVisible=!1}}},[t._v("确 定")])],1)],1)],1)},l=[],n=(a("d91d"),{name:"hotel",props:{status:"",cur_id:"",huiyi_id:"",huiyi_name:""},data:function(){return{id:"",dialogVisible:!1,h_status:"view",organizerList:[],cityList:[],form:{imgs:[]},type:[{imgs:[]}],hotel_type:[{name:"单人间",value:1},{name:"一人单住或标间合住",value:2}],local:null,keyword:""}},methods:{getData:function(){var t=this;this.$api.getHotel({id:this.cur_id}).then((function(e){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 a=this.form.imgs;a.push(e.response.data),this.form.imgs=a},imgchange1:function(t,e,a){var i=this.type[t].imgs;i.push(a.response.data),this.type[t].imgs=i},remove:function(t){var e=this.form.imgs;e.splice(t,1),this.form.imgs=e},remove1:function(t,e){var a=this.type[e].imgs;a.splice(t,1),this.type[e].imgs=a},left_right:function(t,e){var a=this.form.imgs,i=a[t];if(-1==e){if(t>0){var l=a[t-1];this.$set(a,t-1,i),this.$set(a,t,l)}}else if(t<a.length-1){var n=a[t+1];this.$set(a,t+1,i),this.$set(a,t,n)}this.form.imgs=a},left_right1:function(t,e,a){var i=this.type[e],l=i.imgs,n=l[t];if(-1==a){if(t>0){var s=l[t-1];this.$set(l,t-1,n),this.$set(l,t,s)}}else if(t<l.length-1){var r=l[t+1];this.$set(l,t+1,n),this.$set(l,t,r)}i.imgs=l,this.$set(this.type,e,i)},up_down:function(t,e){var a=this.type,i=a[t];if(1==e){if(t>0){var l=a[t-1];this.$set(a,t-1,i),this.$set(a,t,l)}}else if(t<a.length-1){var n=a[t+1];this.$set(a,t+1,i),this.$set(a,t,n)}this.type=a},save:function(t){var e=this,a=this.form;a.rooms=this.type,"add"==this.h_status||"bind"==this.h_status?this.$api.addHotel(a).then((function(a){0==a.data.code?(e.$message({message:"添加成功",type:"success"}),"add"==e.h_status?1==t?(e.form={imgs:[]},e.type=[{imgs:[]}]):e.$emit("addSuccess"):e.$api.putConference().then((function(t){}))):e.$message({message:a.data.message,type:"error"})})):this.$api.editHotel(a).then((function(a){0==a.data.code?(e.$message({message:"修改成功",type:"success"}),1==t?(e.form={imgs:[]},e.type=[{imgs:[]}]):e.$emit("addSuccess")):e.$message({message:a.data.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(a){t.$set(t.form,"longitude",a.latlng.lng),t.$set(t.form,"latitude",a.latlng.lat);var i=new BMapGL.Marker(new BMapGL.Point(a.latlng.lng,a.latlng.lat));e.clearOverlays(),e.addOverlay(i)}))}),500)}},watch:{status:function(t,e){this.h_status=t,"add"!=t&&"bind"!=t&&this.getData()},cur_id:function(){this.getData()}},created:function(){var t=this;console.log(this.huiyi_id,this.huiyi_name),this.$api.getHotelList().then((function(e){t.organizerList=e.data.data.list})),this.h_status=this.status,"add"!=this.h_status&&"bind"!=this.h_status&&this.getData()}}),s=n,r=(a("bc6c"),a("5d22")),o=Object(r["a"])(s,i,l,!1,null,null,null);e["a"]=o.exports}}]);
  2. //# sourceMappingURL=chunk-4b9605ab.ed85861b.js.map