chunk-01f983c1.e7a989c3.js 12 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-01f983c1","chunk-418045b9","chunk-2d0df437"],{"6eb7":function(t,e,n){},"842b":function(t,e,n){"use strict";n("ffa6")},"88bc":function(t,e,n){(function(e){var n=1/0,a=9007199254740991,i="[object Arguments]",o="[object Function]",r="[object GeneratorFunction]",l="[object Symbol]",s="object"==typeof e&&e&&e.Object===Object&&e,c="object"==typeof self&&self&&self.Object===Object&&self,u=s||c||Function("return this")();function d(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function p(t,e){var n=-1,a=t?t.length:0,i=Array(a);while(++n<a)i[n]=e(t[n],n,t);return i}function f(t,e){var n=-1,a=e.length,i=t.length;while(++n<a)t[i+n]=e[n];return t}var m=Object.prototype,h=m.hasOwnProperty,v=m.toString,g=u.Symbol,b=m.propertyIsEnumerable,y=g?g.isConcatSpreadable:void 0,w=Math.max;function x(t,e,n,a,i){var o=-1,r=t.length;n||(n=j),i||(i=[]);while(++o<r){var l=t[o];e>0&&n(l)?e>1?x(l,e-1,n,a,i):f(i,l):a||(i[i.length]=l)}return i}function C(t,e){return t=Object(t),k(t,e,(function(e,n){return n in t}))}function k(t,e,n){var a=-1,i=e.length,o={};while(++a<i){var r=e[a],l=t[r];n(l,r)&&(o[r]=l)}return o}function _(t,e){return e=w(void 0===e?t.length-1:e,0),function(){var n=arguments,a=-1,i=w(n.length-e,0),o=Array(i);while(++a<i)o[a]=n[e+a];a=-1;var r=Array(e+1);while(++a<e)r[a]=n[a];return r[e]=o,d(t,this,r)}}function j(t){return O(t)||L(t)||!!(y&&t&&t[y])}function S(t){if("string"==typeof t||E(t))return t;var e=t+"";return"0"==e&&1/t==-n?"-0":e}function L(t){return I(t)&&h.call(t,"callee")&&(!b.call(t,"callee")||v.call(t)==i)}var O=Array.isArray;function A(t){return null!=t&&F(t.length)&&!U(t)}function I(t){return M(t)&&A(t)}function U(t){var e=H(t)?v.call(t):"";return e==o||e==r}function F(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=a}function H(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function M(t){return!!t&&"object"==typeof t}function E(t){return"symbol"==typeof t||M(t)&&v.call(t)==l}var N=_((function(t,e){return null==t?{}:C(t,p(x(e,1),S))}));t.exports=N}).call(this,n("c8ba"))},dbe5:function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t._self._c;return e("j-modal",{attrs:{title:t.title,width:t.width,visible:t.visible,confirmLoading:t.confirmLoading,switchFullscreen:"",cancelText:"关闭"},on:{ok:t.handleOk,cancel:t.handleCancel}},[e("a-spin",{attrs:{spinning:t.confirmLoading}},[e("a-form",{attrs:{form:t.form}},[e("a-form-item",{attrs:{label:"景点名字",labelCol:t.labelCol,wrapperCol:t.wrapperCol}},[e("j-popup",{directives:[{name:"decorator",rawName:"v-decorator",value:["spotName"],expression:"['spotName']"}],attrs:{"trigger-change":!0,"org-fields":"id,name,avatar,country_name","dest-fields":"id,spotName,spotAvatar,spotCountry",code:"tourism_spots"},on:{callback:t.popupCallback}})],1),e("a-form-item",{attrs:{label:"景点封面",labelCol:t.labelCol,wrapperCol:t.wrapperCol}},[e("j-image-upload",{directives:[{name:"decorator",rawName:"v-decorator",value:["spotAvatar"],expression:"['spotAvatar']"}],attrs:{isMultiple:""}})],1),e("a-form-item",{attrs:{label:"景点国家",labelCol:t.labelCol,wrapperCol:t.wrapperCol}},[e("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["spotCountry"],expression:"['spotCountry']"}],attrs:{placeholder:"请输入景点国家"}})],1)],1)],1)],1)},i=[],o=n("0fea"),r=n("88bc"),l=n.n(r),s=(n("ca00"),n("e610")),c={name:"TourismHotspotsModal",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/tourismHotspots/add",edit:"/tourism/tourismHotspots/edit"}}},created:function(){},methods:{add:function(){this.edit()},edit:function(t){var e=this;this.adding=null==t,this.form.resetFields(),this.model=Object.assign({},t),this.visible=!0,this.$nextTick((function(){e.form.setFieldsValue(l()(e.model,"spotName","spotAvatar","spotCountry"))}))},close:function(){this.$emit("close"),this.visible=!1},handleOk:function(){var t=this;this.form.validateFields((function(e,n){if(!e){t.confirmLoading=!0;var a="",i="";t.adding?(a+=t.url.add,i="post"):(a+=t.url.edit,i="put");var r=Object.assign(t.model,n);Object(o["i"])(a,r,i).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(t){this.adding&&(this.model.id=t.id),this.form.setFieldsValue(l()(t,"spotName","spotAvatar","spotCountry"))}}},u=c,d=n("2877"),p=Object(d["a"])(u,a,i,!1,null,null,null);e["default"]=p.exports},e610:function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t._self._c;return e("a-upload",{attrs:{name:"file",listType:"picture-card",multiple:t.isMultiple,action:t.uploadAction,headers:t.headers,data:{biz:t.bizPath},fileList:t.fileList,beforeUpload:t.beforeUpload,disabled:t.disabled,isMultiple:t.isMultiple,showUploadList:t.isMultiple},on:{change:t.handleChange,preview:t.handlePreview}},[!t.isMultiple&&t.picUrl?e("img",{staticStyle:{height:"104px","max-width":"300px"},attrs:{src:t.getAvatarView()}}):e("div",[e("a-icon",{attrs:{type:t.uploadLoading?"loading":"plus"}}),e("div",{staticClass:"ant-upload-text"},[t._v(t._s(t.text))])],1),e("a-modal",{attrs:{visible:t.previewVisible,footer:null},on:{cancel:function(e){return t.handleCancel()}}},[e("img",{staticStyle:{width:"100%"},attrs:{alt:"example",src:t.previewImage}})])],1)},i=[],o=n("2b0e"),r=n("9fb0"),l=n("0fea"),s=function(){return"-"+parseInt(1e4*Math.random()+1,10)},c=function(t){if(t.lastIndexOf("\\")>=0){var e=new RegExp("\\\\","g");t=t.replace(e,"/")}return t.substring(t.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(t){t instanceof Array?this.initFileList(t.join(",")):this.initFileList(t)}},created:function(){var t=o["default"].ls.get(r["a"]);this.headers={"X-Access-Token":t}},methods:{initFileList:function(t){if(t&&0!=t.length){this.picUrl=!0;for(var e=[],n=t.split(","),a=0;a<n.length;a++){var i=Object(l["e"])(n[a]);e.push({uid:s(),name:c(n[a]),status:"done",url:i,response:{status:"history",message:n[a]}})}this.fileList=e}else this.fileList=[]},beforeUpload:function(t){var e=t.type;if(e.indexOf("image")<0)return this.$message.warning("请上传图片"),!1},handleChange:function(t){this.picUrl=!1;var e=t.fileList;"done"===t.file.status?t.file.response.success&&(this.picUrl=!0,e=e.map((function(t){return t.response&&(t.url=t.response.message),t}))):"error"===t.file.status?this.$message.error("".concat(t.file.name," 上传失败.")):"removed"===t.file.status&&this.handleDelete(t.file),this.fileList=e,"done"!==t.file.status&&"removed"!==t.file.status||this.handlePathChange()},handlePreview:function(t){this.previewImage=t.url||t.thumbUrl,this.previewVisible=!0},getAvatarView:function(){if(this.fileList.length>0){var t=this.fileList[0].url;return Object(l["e"])(t)}},handlePathChange:function(){var t=this.fileList,e="";t&&0!=t.length||(e="");var n=[];if(this.isMultiple)for(var a=0;a<t.length;a++)n.push(t[a].response.message);else n.push(t[t.length-1].response.message);n.length>0&&(e=n.join(",")),this.$emit("change",e)},handleDelete:function(t){},handleCancel:function(){this.close(),this.previewVisible=!1},close:function(){}},model:{prop:"value",event:"change"}},d=u,p=n("2877"),f=Object(p["a"])(d,a,i,!1,null,"244aa1d3",null);e["default"]=f.exports},e676:function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t._self._c;return e("a-card",{attrs:{bordered:!1}},[e("div",{staticClass:"table-page-search-wrapper"},[e("a-form",{attrs:{layout:"inline"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.searchQuery.apply(null,arguments)}}},[e("a-row",{attrs:{gutter:24}})],1)],1),e("div",{staticClass:"table-operator"},[e("a-button",{attrs:{type:"primary",icon:"plus"},on:{click:t.handleAdd}},[t._v("新增")]),e("a-button",{attrs:{type:"primary",icon:"download"},on:{click:function(e){return t.handleExportXls("热门景点")}}},[t._v("导出")]),e("a-upload",{attrs:{name:"file",showUploadList:!1,multiple:!1,headers:t.tokenHeader,action:t.importExcelUrl},on:{change:t.handleImportExcel}},[e("a-button",{attrs:{type:"primary",icon:"import"}},[t._v("导入")])],1),t.selectedRowKeys.length>0?e("a-dropdown",[e("a-menu",{attrs:{slot:"overlay"},slot:"overlay"},[e("a-menu-item",{key:"1",on:{click:t.batchDel}},[e("a-icon",{attrs:{type:"delete"}}),t._v("删除")],1)],1),e("a-button",{staticStyle:{"margin-left":"8px"}},[t._v(" 批量操作 "),e("a-icon",{attrs:{type:"down"}})],1)],1):t._e()],1),e("div",[e("div",{staticClass:"ant-alert ant-alert-info",staticStyle:{"margin-bottom":"16px"}},[e("i",{staticClass:"anticon anticon-info-circle ant-alert-icon"}),t._v(" 已选择 "),e("a",{staticStyle:{"font-weight":"600"}},[t._v(t._s(t.selectedRowKeys.length))]),t._v("项\n "),e("a",{staticStyle:{"margin-left":"24px"},on:{click:t.onClearSelected}},[t._v("清空")])]),e("a-table",{ref:"table",staticClass:"j-table-force-nowrap",attrs:{size:"middle",bordered:"",rowKey:"id",columns:t.columns,dataSource:t.dataSource,pagination:t.ipagination,loading:t.loading,rowSelection:{selectedRowKeys:t.selectedRowKeys,onChange:t.onSelectChange}},on:{change:t.handleTableChange},scopedSlots:t._u([{key:"htmlSlot",fn:function(n){return[e("div",{domProps:{innerHTML:t._s(n)}})]}},{key:"imgSlot",fn:function(n){return[n?e("img",{staticStyle:{"max-width":"80px","font-size":"12px","font-style":"italic"},attrs:{src:t.getImgView(n),height:"25px",alt:""}}):e("span",{staticStyle:{"font-size":"12px","font-style":"italic"}},[t._v("无图片")])]}},{key:"fileSlot",fn:function(n){return[n?e("a-button",{attrs:{ghost:!0,type:"primary",icon:"download",size:"small"},on:{click:function(e){return t.uploadFile(n)}}},[t._v("\n 下载\n ")]):e("span",{staticStyle:{"font-size":"12px","font-style":"italic"}},[t._v("无文件")])]}},{key:"action",fn:function(n,a){return e("span",{},[e("a",{on:{click:function(e){return t.handleEdit(a)}}},[t._v("编辑")]),e("a-divider",{attrs:{type:"vertical"}}),e("a-dropdown",[e("a",{staticClass:"ant-dropdown-link"},[t._v("更多 "),e("a-icon",{attrs:{type:"down"}})],1),e("a-menu",{attrs:{slot:"overlay"},slot:"overlay"},[e("a-menu-item",[e("a-popconfirm",{attrs:{title:"确定删除吗?"},on:{confirm:function(){return t.handleDelete(a.id)}}},[e("a",[t._v("删除")])])],1)],1)],1)],1)}}])})],1),e("tourismHotspots-modal",{ref:"modalForm",on:{ok:t.modalFormOk}})],1)},i=[],o=(n("6eb7"),n("ac0d")),r=n("b65a"),l=n("dbe5"),s={name:"TourismHotspotsList",mixins:[r["a"],o["b"]],components:{TourismHotspotsModal:l["default"]},data:function(){return{description:"热门景点管理页面",columns:[{title:"#",dataIndex:"",key:"rowIndex",width:60,align:"center",customRender:function(t,e,n){return parseInt(n)+1}},{title:"景点名字",align:"center",dataIndex:"spotName"},{title:"景点封面",align:"center",dataIndex:"spotAvatar",scopedSlots:{customRender:"imgSlot"}},{title:"景点国家",align:"center",dataIndex:"spotCountry"},{title:"操作",dataIndex:"action",align:"center",width:147,scopedSlots:{customRender:"action"}}],url:{list:"/tourism/tourismHotspots/list",delete:"/tourism/tourismHotspots/delete",deleteBatch:"/tourism/tourismHotspots/deleteBatch",exportXlsUrl:"/tourism/tourismHotspots/exportXls",importExcelUrl:"tourism/tourismHotspots/importExcel"},dictOptions:{}}},computed:{importExcelUrl:function(){return"".concat(window._CONFIG["domianURL"],"/").concat(this.url.importExcelUrl)}},methods:{initDictConfig:function(){}}},c=s,u=(n("842b"),n("2877")),d=Object(u["a"])(c,a,i,!1,null,"b5ca8d82",null);e["default"]=d.exports},ffa6:function(t,e,n){}}]);