(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-01cdafd2","chunk-2d0df437"],{"07f6":function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e._self._c;return t("a-drawer",{attrs:{title:e.title,width:e.width,placement:"right",closable:!1,visible:e.visible},on:{close:e.close}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-form-item",{attrs:{label:"景点名字",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name"],expression:"['name']"}],attrs:{placeholder:"请输入景点名字"}})],1),t("a-form-item",{attrs:{label:"城市名字",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("j-popup",{directives:[{name:"decorator",rawName:"v-decorator",value:["cityName"],expression:"['cityName']"}],attrs:{"trigger-change":!0,"org-fields":"name,country_name","dest-fields":"cityName,countryName",code:"tourism_city"},on:{callback:e.popupCallback}})],1),t("a-form-item",{attrs:{label:"国家",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["countryName"],expression:"['countryName']"}],attrs:{placeholder:"请输入国家"}})],1),t("a-form-item",{attrs:{label:"地点",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["address"],expression:"['address']"}],attrs:{placeholder:"请输入地点"}})],1),t("a-form-item",{attrs:{label:"封面图",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("j-image-upload",{directives:[{name:"decorator",rawName:"v-decorator",value:["avatar"],expression:"['avatar']"}],attrs:{isMultiple:""}})],1),t("a-form-item",{attrs:{label:"介绍的主图",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("j-image-upload",{directives:[{name:"decorator",rawName:"v-decorator",value:["images"],expression:"['images']"}],attrs:{isMultiple:""}})],1),t("a-form-item",{attrs:{label:"介绍富文本",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["description"],expression:"['description']"}],attrs:{placeholder:"请输入介绍富文本"}})],1)],1)],1),t("a-button",{attrs:{type:"primary"},on:{click:e.handleOk}},[e._v("确定")]),t("a-button",{attrs:{type:"primary"},on:{click:e.handleCancel}},[e._v("取消")])],1)},i=[],n=a("0fea"),l=a("88bc"),o=a.n(l),s=(a("ca00"),a("e610")),c={name:"TourismSpotModal",components:{JImageUpload:s["default"]},data:function(){return{form:this.$form.createForm(this),title:"操作",width:800,visible:!1,model:{},labelCol:{xs:{span:24},sm:{span:5}},wrapperCol:{xs:{span:24},sm:{span:16}},confirmLoading:!1,validatorRules:{},url:{add:"/tourism/tourismSpot/add",edit:"/tourism/tourismSpot/edit"}}},created:function(){},methods:{add:function(){this.edit({})},edit:function(e){var t=this;this.form.resetFields(),this.model=Object.assign({},e),this.visible=!0,this.$nextTick((function(){t.form.setFieldsValue(o()(t.model,"name","cityName","countryName","address","avatar","images","description"))}))},close:function(){this.$emit("close"),this.visible=!1},handleOk:function(){var e=this,t=this;this.form.validateFields((function(a,r){if(!a){t.confirmLoading=!0;var i="",l="";e.model.id?(i+=e.url.edit,l="put"):(i+=e.url.add,l="post");var o=Object.assign(e.model,r);Object(n["i"])(i,o,l).then((function(e){e.success?(t.$message.success(e.message),t.$emit("ok")):t.$message.warning(e.message)})).finally((function(){t.confirmLoading=!1,t.close()}))}}))},handleCancel:function(){this.close()},popupCallback:function(e){this.form.setFieldsValue(o()(e,"name","cityName","countryName","address","avatar","images","description"))}}},u=c,p=(a("9462"),a("2877")),d=Object(p["a"])(u,r,i,!1,null,"2eebc984",null);t["default"]=d.exports},"4e09":function(e,t,a){},"88bc":function(e,t,a){(function(t){var a=1/0,r=9007199254740991,i="[object Arguments]",n="[object Function]",l="[object GeneratorFunction]",o="[object Symbol]",s="object"==typeof t&&t&&t.Object===Object&&t,c="object"==typeof self&&self&&self.Object===Object&&self,u=s||c||Function("return this")();function p(e,t,a){switch(a.length){case 0:return e.call(t);case 1:return e.call(t,a[0]);case 2:return e.call(t,a[0],a[1]);case 3:return e.call(t,a[0],a[1],a[2])}return e.apply(t,a)}function d(e,t){var a=-1,r=e?e.length:0,i=Array(r);while(++a0&&a(o)?t>1?C(o,t-1,a,r,i):f(i,o):r||(i[i.length]=o)}return i}function j(e,t){return e=Object(e),x(e,t,(function(t,a){return a in e}))}function x(e,t,a){var r=-1,i=t.length,n={};while(++r-1&&e%1==0&&e<=r}function _(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function I(e){return!!e&&"object"==typeof e}function $(e){return"symbol"==typeof e||I(e)&&v.call(e)==o}var V=L((function(e,t){return null==e?{}:j(e,d(C(t,1),N))}));e.exports=V}).call(this,a("c8ba"))},9462:function(e,t,a){"use strict";a("4e09")},e610:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e._self._c;return t("a-upload",{attrs:{name:"file",listType:"picture-card",multiple:e.isMultiple,action:e.uploadAction,headers:e.headers,data:{biz:e.bizPath},fileList:e.fileList,beforeUpload:e.beforeUpload,disabled:e.disabled,isMultiple:e.isMultiple,showUploadList:e.isMultiple},on:{change:e.handleChange,preview:e.handlePreview}},[!e.isMultiple&&e.picUrl?t("img",{staticStyle:{height:"104px","max-width":"300px"},attrs:{src:e.getAvatarView()}}):t("div",[t("a-icon",{attrs:{type:e.uploadLoading?"loading":"plus"}}),t("div",{staticClass:"ant-upload-text"},[e._v(e._s(e.text))])],1),t("a-modal",{attrs:{visible:e.previewVisible,footer:null},on:{cancel:function(t){return e.handleCancel()}}},[t("img",{staticStyle:{width:"100%"},attrs:{alt:"example",src:e.previewImage}})])],1)},i=[],n=a("2b0e"),l=a("9fb0"),o=a("0fea"),s=function(){return"-"+parseInt(1e4*Math.random()+1,10)},c=function(e){if(e.lastIndexOf("\\")>=0){var t=new RegExp("\\\\","g");e=e.replace(t,"/")}return e.substring(e.lastIndexOf("/")+1)},u={name:"JImageUpload",data:function(){return{uploadAction:window._CONFIG["domianURL"]+"/sys/common/upload",uploadLoading:!1,picUrl:!1,headers:{},fileList:[],previewImage:"",previewVisible:!1}},props:{text:{type:String,required:!1,default:"上传"},bizPath:{type:String,required:!1,default:"temp"},value:{type:[String,Array],required:!1},disabled:{type:Boolean,required:!1,default:!1},isMultiple:{type:Boolean,required:!1,default:!1}},watch:{value:function(e){e instanceof Array?this.initFileList(e.join(",")):this.initFileList(e)}},created:function(){var e=n["default"].ls.get(l["a"]);this.headers={"X-Access-Token":e}},methods:{initFileList:function(e){if(e&&0!=e.length){this.picUrl=!0;for(var t=[],a=e.split(","),r=0;r0){var e=this.fileList[0].url;return Object(o["e"])(e)}},handlePathChange:function(){var e=this.fileList,t="";e&&0!=e.length||(t="");var a=[];if(this.isMultiple)for(var r=0;r0&&(t=a.join(",")),this.$emit("change",t)},handleDelete:function(e){},handleCancel:function(){this.close(),this.previewVisible=!1},close:function(){}},model:{prop:"value",event:"change"}},p=u,d=a("2877"),f=Object(d["a"])(p,r,i,!1,null,"244aa1d3",null);t["default"]=f.exports}}]);