chunk-760c6c1c.ae46b788.js 11 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-760c6c1c","chunk-f734bf54","chunk-2d0df437"],{"3c12":function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e._self._c;return t("j-modal",{attrs:{title:e.title,width:e.width,visible:e.visible,confirmLoading:e.confirmLoading,switchFullscreen:"",cancelText:"关闭"},on:{ok:e.handleOk,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-form-item",{attrs:{label:"网站首页banner",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("j-image-upload",{directives:[{name:"decorator",rawName:"v-decorator",value:["banners"],expression:"['banners']"}],attrs:{isMultiple:""}})],1)],1)],1)],1)},a=[],r=n("0fea"),l=n("88bc"),o=n.n(l),s=(n("ca00"),n("e610")),c={name:"TourismBannerModal",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/tourismBanner/add",edit:"/tourism/tourismBanner/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,"createTime","updateTime","banners"))}))},close:function(){this.$emit("close"),this.visible=!1},handleOk:function(){var e=this,t=this;this.form.validateFields((function(n,i){if(!n){t.confirmLoading=!0;var a="",l="";e.model.id?(a+=e.url.edit,l="put"):(a+=e.url.add,l="post");var o=Object.assign(e.model,i);Object(r["i"])(a,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,"createTime","updateTime","banners"))}}},u=c,d=n("2877"),f=Object(d["a"])(u,i,a,!1,null,null,null);t["default"]=f.exports},"6eb7":function(e,t,n){},"88bc":function(e,t,n){(function(t){var n=1/0,i=9007199254740991,a="[object Arguments]",r="[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 d(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function f(e,t){var n=-1,i=e?e.length:0,a=Array(i);while(++n<i)a[n]=t(e[n],n,e);return a}function p(e,t){var n=-1,i=t.length,a=e.length;while(++n<i)e[a+n]=t[n];return e}var m=Object.prototype,h=m.hasOwnProperty,g=m.toString,v=u.Symbol,b=m.propertyIsEnumerable,y=v?v.isConcatSpreadable:void 0,w=Math.max;function x(e,t,n,i,a){var r=-1,l=e.length;n||(n=S),a||(a=[]);while(++r<l){var o=e[r];t>0&&n(o)?t>1?x(o,t-1,n,i,a):p(a,o):i||(a[a.length]=o)}return a}function k(e,t){return e=Object(e),C(e,t,(function(t,n){return n in e}))}function C(e,t,n){var i=-1,a=t.length,r={};while(++i<a){var l=t[i],o=e[l];n(o,l)&&(r[l]=o)}return r}function _(e,t){return t=w(void 0===t?e.length-1:t,0),function(){var n=arguments,i=-1,a=w(n.length-t,0),r=Array(a);while(++i<a)r[i]=n[t+i];i=-1;var l=Array(t+1);while(++i<t)l[i]=n[i];return l[t]=r,d(e,this,l)}}function S(e){return O(e)||L(e)||!!(y&&e&&e[y])}function j(e){if("string"==typeof e||M(e))return e;var t=e+"";return"0"==t&&1/e==-n?"-0":t}function L(e){return U(e)&&h.call(e,"callee")&&(!b.call(e,"callee")||g.call(e)==a)}var O=Array.isArray;function I(e){return null!=e&&B(e.length)&&!F(e)}function U(e){return A(e)&&I(e)}function F(e){var t=T(e)?g.call(e):"";return t==r||t==l}function B(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}function T(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function A(e){return!!e&&"object"==typeof e}function M(e){return"symbol"==typeof e||A(e)&&g.call(e)==o}var E=_((function(e,t){return null==e?{}:k(e,f(x(t,1),j))}));e.exports=E}).call(this,n("c8ba"))},a05b:function(e,t,n){},ac17:function(e,t,n){"use strict";n("a05b")},b957:function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"table-page-search-wrapper"},[t("a-form",{attrs:{layout:"inline"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.searchQuery.apply(null,arguments)}}},[t("a-row",{attrs:{gutter:24}})],1)],1),t("div",{staticClass:"table-operator"},[t("a-button",{attrs:{type:"primary",icon:"plus"},on:{click:e.handleAdd}},[e._v("新增")]),t("a-button",{attrs:{type:"primary",icon:"download"},on:{click:function(t){return e.handleExportXls("网站配置")}}},[e._v("导出")]),t("a-upload",{attrs:{name:"file",showUploadList:!1,multiple:!1,headers:e.tokenHeader,action:e.importExcelUrl},on:{change:e.handleImportExcel}},[t("a-button",{attrs:{type:"primary",icon:"import"}},[e._v("导入")])],1),e.selectedRowKeys.length>0?t("a-dropdown",[t("a-menu",{attrs:{slot:"overlay"},slot:"overlay"},[t("a-menu-item",{key:"1",on:{click:e.batchDel}},[t("a-icon",{attrs:{type:"delete"}}),e._v("删除")],1)],1),t("a-button",{staticStyle:{"margin-left":"8px"}},[e._v(" 批量操作 "),t("a-icon",{attrs:{type:"down"}})],1)],1):e._e()],1),t("div",[t("div",{staticClass:"ant-alert ant-alert-info",staticStyle:{"margin-bottom":"16px"}},[t("i",{staticClass:"anticon anticon-info-circle ant-alert-icon"}),e._v(" 已选择 "),t("a",{staticStyle:{"font-weight":"600"}},[e._v(e._s(e.selectedRowKeys.length))]),e._v("项\n "),t("a",{staticStyle:{"margin-left":"24px"},on:{click:e.onClearSelected}},[e._v("清空")])]),t("a-table",{ref:"table",staticClass:"j-table-force-nowrap",attrs:{size:"middle",bordered:"",rowKey:"id",columns:e.columns,dataSource:e.dataSource,pagination:e.ipagination,loading:e.loading,rowSelection:{selectedRowKeys:e.selectedRowKeys,onChange:e.onSelectChange}},on:{change:e.handleTableChange},scopedSlots:e._u([{key:"htmlSlot",fn:function(n){return[t("div",{domProps:{innerHTML:e._s(n)}})]}},{key:"imgSlot",fn:function(n){return[n?t("img",{staticStyle:{"max-width":"80px","font-size":"12px","font-style":"italic"},attrs:{src:e.getImgView(n),height:"25px",alt:""}}):t("span",{staticStyle:{"font-size":"12px","font-style":"italic"}},[e._v("无图片")])]}},{key:"fileSlot",fn:function(n){return[n?t("a-button",{attrs:{ghost:!0,type:"primary",icon:"download",size:"small"},on:{click:function(t){return e.uploadFile(n)}}},[e._v("\n 下载\n ")]):t("span",{staticStyle:{"font-size":"12px","font-style":"italic"}},[e._v("无文件")])]}},{key:"action",fn:function(n,i){return t("span",{},[t("a",{on:{click:function(t){return e.handleEdit(i)}}},[e._v("编辑")]),t("a-divider",{attrs:{type:"vertical"}}),t("a-dropdown",[t("a",{staticClass:"ant-dropdown-link"},[e._v("更多 "),t("a-icon",{attrs:{type:"down"}})],1),t("a-menu",{attrs:{slot:"overlay"},slot:"overlay"},[t("a-menu-item",[t("a-popconfirm",{attrs:{title:"确定删除吗?"},on:{confirm:function(){return e.handleDelete(i.id)}}},[t("a",[e._v("删除")])])],1)],1)],1)],1)}}])})],1),t("tourismBanner-modal",{ref:"modalForm",on:{ok:e.modalFormOk}})],1)},a=[],r=(n("6eb7"),n("ac0d")),l=n("b65a"),o=n("3c12"),s={name:"TourismBannerList",mixins:[l["a"],r["b"]],components:{TourismBannerModal:o["default"]},data:function(){return{description:"网站配置管理页面",columns:[{title:"#",dataIndex:"",key:"rowIndex",width:60,align:"center",customRender:function(e,t,n){return parseInt(n)+1}},{title:"创建日期",align:"center",dataIndex:"createTime"},{title:"更新日期",align:"center",dataIndex:"updateTime"},{title:"网站首页banner",align:"center",dataIndex:"banners",scopedSlots:{customRender:"imgSlot"}},{title:"操作",dataIndex:"action",align:"center",width:147,scopedSlots:{customRender:"action"}}],url:{list:"/tourism/tourismBanner/list",delete:"/tourism/tourismBanner/delete",deleteBatch:"/tourism/tourismBanner/deleteBatch",exportXlsUrl:"/tourism/tourismBanner/exportXls",importExcelUrl:"tourism/tourismBanner/importExcel"},dictOptions:{}}},computed:{importExcelUrl:function(){return"".concat(window._CONFIG["domianURL"],"/").concat(this.url.importExcelUrl)}},methods:{initDictConfig:function(){}}},c=s,u=(n("ac17"),n("2877")),d=Object(u["a"])(c,i,a,!1,null,"c054c64a",null);t["default"]=d.exports},e610:function(e,t,n){"use strict";n.r(t);var i=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)},a=[],r=n("2b0e"),l=n("9fb0"),o=n("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=r["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=[],n=e.split(","),i=0;i<n.length;i++){var a=Object(o["e"])(n[i]);t.push({uid:s(),name:c(n[i]),status:"done",url:a,response:{status:"history",message:n[i]}})}this.fileList=t}else this.fileList=[]},beforeUpload:function(e){var t=e.type;if(t.indexOf("image")<0)return this.$message.warning("请上传图片"),!1},handleChange:function(e){this.picUrl=!1;var t=e.fileList;"done"===e.file.status?e.file.response.success&&(this.picUrl=!0,t=t.map((function(e){return e.response&&(e.url=e.response.message),e}))):"error"===e.file.status?this.$message.error("".concat(e.file.name," 上传失败.")):"removed"===e.file.status&&this.handleDelete(e.file),this.fileList=t,"done"!==e.file.status&&"removed"!==e.file.status||this.handlePathChange()},handlePreview:function(e){this.previewImage=e.url||e.thumbUrl,this.previewVisible=!0},getAvatarView:function(){if(this.fileList.length>0){var e=this.fileList[0].url;return Object(o["e"])(e)}},handlePathChange:function(){var e=this.fileList,t="";e&&0!=e.length||(t="");var n=[];if(this.isMultiple)for(var i=0;i<e.length;i++)n.push(e[i].response.message);else n.push(e[e.length-1].response.message);n.length>0&&(t=n.join(",")),this.$emit("change",t)},handleDelete:function(e){},handleCancel:function(){this.close(),this.previewVisible=!1},close:function(){}},model:{prop:"value",event:"change"}},d=u,f=n("2877"),p=Object(f["a"])(d,i,a,!1,null,"244aa1d3",null);t["default"]=p.exports}}]);