You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
34 KiB
1 lines
34 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6441db63"],{"09f4":function(e,t,a){"use strict";a.d(t,"a",(function(){return o})),Math.easeInOutQuad=function(e,t,a,n){return e/=n/2,e<1?a/2*e*e+t:(e--,-a/2*(e*(e-2)-1)+t)};var n=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}();function r(e){document.documentElement.scrollTop=e,document.body.parentNode.scrollTop=e,document.body.scrollTop=e}function i(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function o(e,t,a){var o=i(),s=e-o,c=20,l=0;t="undefined"===typeof t?500:t;var d=function e(){l+=c;var i=Math.easeInOutQuad(l,o,s,t);r(i),l<t?n(e):a&&"function"===typeof a&&a()};d()}},1771:function(e,t,a){"use strict";a.d(t,"f",(function(){return c})),a.d(t,"c",(function(){return l})),a.d(t,"d",(function(){return d})),a.d(t,"b",(function(){return u})),a.d(t,"a",(function(){return m})),a.d(t,"e",(function(){return f}));a("caad"),a("d3b7"),a("ac1f"),a("8a79"),a("2532"),a("3ca3"),a("1276"),a("2ca0"),a("498a"),a("ddb0"),a("2b3d");var n=a("5530"),r=a("b85c"),i=a("c2cf"),o=a("ebb5"),s=void 0,c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"authority";"string"===typeof e&&(e=[e]),e&&e.length>0&&i["a"].enums({codes:e},a).then((function(a){var n,i=a.data,o=Object(r["a"])(e);try{for(o.s();!(n=o.n()).done;){var s=n.value;t[s]=i.data[s]}}catch(c){o.e(c)}finally{o.f()}}))},l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};c(e,t,"authority")},d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};c(e,t,"msgs")},u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"string"===typeof e&&(e=[e]),e&&e.length>0&&o["a"].list({codes:e}).then((function(a){var n,i=a.data,o=Object(r["a"])(e);try{for(o.s();!(n=o.n()).done;){var s=n.value;t[s]=i.data[s]}}catch(c){o.e(c)}finally{o.f()}}))},m=function(e){console.log(e,12);var t=e.data,a=t.type;if(a&&a.includes("application/json")){var n=new FileReader;n.onload=function(e){if(2===e.target.readyState){var t=JSON.parse(e.target.result);s.$message({message:t.msg,type:"warning"})}},n.readAsText(t)}else{var r=e.headers["content-disposition"],i="下载文件.zip";if(r)for(var o=r.split(";"),c=0;c<o.length;c++){var l=o[c];if(null!==l&&""!==l){var d=l.split("=");if(null!==d&&d.length>0&&"filename"===d[0].trim().toLowerCase()){i=decodeURI(d[1]);break}}}(i.startsWith("'")||i.startsWith('"'))&&(i.endsWith("'")||i.endsWith('"'))&&(i=i.substring(1,i.length-1));var u=new Blob([t]),m=document.createElement("a");m.href=window.URL.createObjectURL(u),m.download=i,m.click(),window.URL.revokeObjectURL(m.href)}},f=function(e){var t={size:10,current:1,sort:"id",order:"descending",model:{},map:{},timeRange:null};return e?Object(n["a"])(Object(n["a"])({},t),e):t}},"27ae":function(e,t,a){(function(a){var n,r;(function(t,a){e.exports=a(t)})("undefined"!==typeof self?self:"undefined"!==typeof window?window:"undefined"!==typeof a?a:this,(function(a){"use strict";a=a||{};var i,o=a.Base64,s="2.6.4",c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=function(e){for(var t={},a=0,n=e.length;a<n;a++)t[e.charAt(a)]=a;return t}(c),d=String.fromCharCode,u=function(e){if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?d(192|t>>>6)+d(128|63&t):d(224|t>>>12&15)+d(128|t>>>6&63)+d(128|63&t)}t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return d(240|t>>>18&7)+d(128|t>>>12&63)+d(128|t>>>6&63)+d(128|63&t)},m=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,f=function(e){return e.replace(m,u)},p=function(e){var t=[0,2,1][e.length%3],a=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0),n=[c.charAt(a>>>18),c.charAt(a>>>12&63),t>=2?"=":c.charAt(a>>>6&63),t>=1?"=":c.charAt(63&a)];return n.join("")},h=a.btoa&&"function"==typeof a.btoa?function(e){return a.btoa(e)}:function(e){if(e.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return e.replace(/[\s\S]{1,3}/g,p)},b=function(e){return h(f(String(e)))},v=function(e){return e.replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"})).replace(/=/g,"")},g=function(e,t){return t?v(b(e)):b(e)},y=function(e){return g(e,!0)};a.Uint8Array&&(i=function(e,t){for(var a="",n=0,r=e.length;n<r;n+=3){var i=e[n],o=e[n+1],s=e[n+2],l=i<<16|o<<8|s;a+=c.charAt(l>>>18)+c.charAt(l>>>12&63)+("undefined"!=typeof o?c.charAt(l>>>6&63):"=")+("undefined"!=typeof s?c.charAt(63&l):"=")}return t?v(a):a});var A,w=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,O=function(e){switch(e.length){case 4:var t=(7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3),a=t-65536;return d(55296+(a>>>10))+d(56320+(1023&a));case 3:return d((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return d((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},x=function(e){return e.replace(w,O)},j=function(e){var t=e.length,a=t%4,n=(t>0?l[e.charAt(0)]<<18:0)|(t>1?l[e.charAt(1)]<<12:0)|(t>2?l[e.charAt(2)]<<6:0)|(t>3?l[e.charAt(3)]:0),r=[d(n>>>16),d(n>>>8&255),d(255&n)];return r.length-=[0,0,2,1][a],r.join("")},C=a.atob&&"function"==typeof a.atob?function(e){return a.atob(e)}:function(e){return e.replace(/\S{1,4}/g,j)},P=function(e){return C(String(e).replace(/[^A-Za-z0-9\+\/]/g,""))},S=function(e){return x(C(e))},B=function(e){return String(e).replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,"")},T=function(e){return S(B(e))};a.Uint8Array&&(A=function(e){return Uint8Array.from(P(B(e)),(function(e){return e.charCodeAt(0)}))});var k=function(){var e=a.Base64;return a.Base64=o,e};if(a.Base64={VERSION:s,atob:P,btoa:h,fromBase64:T,toBase64:g,utob:f,encode:g,encodeURI:y,btou:x,decode:T,noConflict:k,fromUint8Array:i,toUint8Array:A},"function"===typeof Object.defineProperty){var D=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}};a.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",D((function(){return T(this)}))),Object.defineProperty(String.prototype,"toBase64",D((function(e){return g(this,e)}))),Object.defineProperty(String.prototype,"toBase64URI",D((function(){return g(this,!0)})))}}return a["Meteor"]&&(Base64=a.Base64),e.exports?e.exports.Base64=a.Base64:(n=[],r=function(){return a.Base64}.apply(t,n),void 0===r||(e.exports=r)),{Base64:a.Base64}}))}).call(this,a("c8ba"))},"3d86":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAIEElEQVR4Xu2c2W8b1xXGz3eHdhxLFkmlQVrES+2GHFLqku5N9zZdki6PRf8H67V/gNGXoi99cEUqblAY8EuBPHbfku572rTJQwpRkhO0VY0WsNN6gRGF9xR3RNlKEQ6jS176juezQJCgec6ce87vnPvNcCQI/5U6Ayj16rl4IQAlh4AAEICSZ6Dky+cEIAAlz0DJl88JQABKnoGSL58ToIAAzJ/uHe4bkxrYVK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DZV1aYImkD2fK+v22nbEYAQGe/8a7Zm/tMwFk0LTaEOEgeGtAWYDXFIX58EwDdznnYzj27cs3/LAdFP1UGhyOBQOFGKfZ5uvc0IgHfqJmz4mCbVS2uvN300VTTNtIY6MBwgcmTCR7vhjgCEyuwk/Z7ZPFjT6w1j+01VNCXbVjKt0RbI3DiHIgDjZC8C29nTvbv37UNT1TYhyMBQySBpQLB/VIgEYFSGivr/p9RU73r+WFLZatptnbELDjm6c9mcABS1wOPEffb8gfoV27CVfhOKrRdONr7p467YVwJ9Vkybl2WAAJQcCAJAAEqegZIvnxOAAJQ8AyVfPicAASh5Bkq+fE4AAlDyDJR8+ZwAJQfgf2+2R9tsFvimAAAAAElFTkSuQmCC"},"4fad":function(e,t,a){var n=a("23e7"),r=a("6f53").entries;n({target:"Object",stat:!0},{entries:function(e){return r(e)}})},"5ef2":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-container"},[a("div",{staticClass:"filter-container"},[a("el-date-picker",{staticClass:"filter-item search-item date-range-item",attrs:{"range-separator":null,"end-placeholder":"结束日期",format:"yyyy-MM-dd HH:mm:ss","start-placeholder":"开始日期",type:"daterange","value-format":"yyyy-MM-dd HH:mm:ss"},model:{value:e.queryParams.timeRange,callback:function(t){e.$set(e.queryParams,"timeRange",t)},expression:"queryParams.timeRange"}}),a("el-button",{staticClass:"filter-item",attrs:{plain:"",type:"primary"},on:{click:e.search}},[e._v(" "+e._s(e.$t("table.search"))+" ")]),a("el-button",{staticClass:"filter-item",attrs:{plain:"",type:"warning"},on:{click:e.reset}},[e._v(" "+e._s(e.$t("table.reset"))+" ")]),a("el-button",{directives:[{name:"has-permission",rawName:"v-has-permission",value:["brand:add"],expression:"['brand:add']"}],staticClass:"filter-item",attrs:{plain:"",type:"danger"},on:{click:e.add}},[e._v(" "+e._s(e.$t("table.add"))+" ")]),a("el-dropdown",{directives:[{name:"has-any-permission",rawName:"v-has-any-permission",value:["brand:delete","brand:export","brand:import"],expression:"['brand:delete', 'brand:export',\n 'brand:import']"}],staticClass:"filter-item",attrs:{trigger:"click"}},[a("el-button",[e._v(" "+e._s(e.$t("table.more"))),a("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),a("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[a("el-dropdown-item",{directives:[{name:"has-permission",rawName:"v-has-permission",value:["brand:delete"],expression:"['brand:delete']"}],nativeOn:{click:function(t){return e.batchDelete(t)}}},[e._v(" "+e._s(e.$t("table.delete"))+" ")]),a("el-dropdown-item",{directives:[{name:"has-permission",rawName:"v-has-permission",value:["brand:export"],expression:"['brand:export']"}],nativeOn:{click:function(t){return e.exportExcel(t)}}},[e._v(" "+e._s(e.$t("table.export"))+" ")]),a("el-dropdown-item",{directives:[{name:"has-permission",rawName:"v-has-permission",value:["brand:export"],expression:"['brand:export']"}],nativeOn:{click:function(t){return e.exportExcelPreview(t)}}},[e._v(" "+e._s(e.$t("table.exportPreview"))+" ")]),a("el-dropdown-item",{directives:[{name:"has-permission",rawName:"v-has-permission",value:["brand:import"],expression:"['brand:import']"}],nativeOn:{click:function(t){return e.importExcel(t)}}},[e._v(" "+e._s(e.$t("table.import"))+" ")])],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],key:e.tableKey,ref:"table",staticStyle:{width:"100%"},attrs:{data:e.tableData.records,border:"",fit:"","row-key":"id"},on:{"cell-click":e.cellClick,"filter-change":e.filterChange,"selection-change":e.onSelectChange,"sort-change":e.sortChange}},[a("el-table-column",{attrs:{align:"center",type:"selection",width:"40px","reserve-selection":!0}}),a("el-table-column",{attrs:{label:e.$t("table.brand.name"),"show-overflow-tooltip":!0,align:"center",prop:"name",width:""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.name))])]}}])}),a("el-table-column",{attrs:{label:e.$t("table.brand.image"),"show-overflow-tooltip":!0,align:"center",prop:"image",width:""},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.image?a("img",{staticClass:"avatar",attrs:{src:t.row.image,width:"80",height:"80"}}):e._e()]}}])}),a("el-table-column",{attrs:{label:e.$t("table.brand.video"),"show-overflow-tooltip":!0,align:"center",prop:"video",width:""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.video))])]}}])}),a("el-table-column",{attrs:{label:e.$t("table.brand.desc"),"show-overflow-tooltip":!0,align:"center",prop:"desc",width:""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.desc))])]}}])}),a("el-table-column",{attrs:{label:e.$t("table.brand.content"),"show-overflow-tooltip":!0,align:"center",prop:"content",width:""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.content))])]}}])}),a("el-table-column",{attrs:{label:e.$t("table.brand.sort"),"show-overflow-tooltip":!0,align:"center",prop:"sort",width:""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.sort))])]}}])}),a("el-table-column",{attrs:{label:e.$t("table.createTime"),align:"center",prop:"createTime",sortable:"custom",width:"170px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.createTime))])]}}])}),a("el-table-column",{attrs:{label:e.$t("table.operation"),align:"center","column-key":"operation","class-name":"small-padding fixed-width",width:"100px"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[a("i",{directives:[{name:"hasPermission",rawName:"v-hasPermission",value:["brand:add"],expression:"['brand:add']"}],staticClass:"el-icon-copy-document table-operation",staticStyle:{color:"#2db7f5"},attrs:{title:e.$t("common.delete")},on:{click:function(t){return e.copy(n)}}}),a("i",{directives:[{name:"hasPermission",rawName:"v-hasPermission",value:["brand:update"],expression:"['brand:update']"}],staticClass:"el-icon-edit table-operation",staticStyle:{color:"#2db7f5"},attrs:{title:e.$t("common.delete")},on:{click:function(t){return e.edit(n)}}}),a("i",{directives:[{name:"hasPermission",rawName:"v-hasPermission",value:["brand:delete"],expression:"['brand:delete']"}],staticClass:"el-icon-delete table-operation",staticStyle:{color:"#f50"},attrs:{title:e.$t("common.delete")},on:{click:function(t){return e.singleDelete(n)}}}),a("el-link",{directives:[{name:"has-no-permission",rawName:"v-has-no-permission",value:["brand:update","brand:copy","brand:delete"],expression:"['brand:update', 'brand:copy', 'brand:delete']"}],staticClass:"no-perm"},[e._v(" "+e._s(e.$t("tips.noPermission"))+" ")])]}}])})],1),a("pagination",{directives:[{name:"show",rawName:"v-show",value:e.tableData.total>0,expression:"tableData.total > 0"}],attrs:{limit:e.queryParams.size,page:e.queryParams.current,total:Number(e.tableData.total)},on:{"update:limit":function(t){return e.$set(e.queryParams,"size",t)},"update:page":function(t){return e.$set(e.queryParams,"current",t)},pagination:e.fetch}}),a("brand-edit",{ref:"edit",attrs:{"dialog-visible":e.dialog.isVisible,type:e.dialog.type},on:{close:e.editClose,success:e.editSuccess}}),a("el-dialog",{directives:[{name:"el-drag-dialog",rawName:"v-el-drag-dialog"}],attrs:{"close-on-click-modal":!1,"close-on-press-escape":!0,title:"预览",width:"80%",top:"50px",visible:e.preview.isVisible},on:{"update:visible":function(t){return e.$set(e.preview,"isVisible",t)}}},[a("el-scrollbar",[a("div",{domProps:{innerHTML:e._s(e.preview.context)}})])],1)],1)},r=[],i=(a("4160"),a("caad"),a("d81d"),a("d3b7"),a("ac1f"),a("2532"),a("841c"),a("1276"),a("159b"),a("5530")),o=a("333d"),s=a("a888"),c=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{directives:[{name:"el-drag-dialog",rawName:"v-el-drag-dialog"}],attrs:{"close-on-click-modal":!1,"close-on-press-escape":!0,title:e.title,type:e.type,visible:e.isVisible,width:e.width,top:"50px"},on:{"update:visible":function(t){e.isVisible=t}}},[a("el-form",{ref:"form",attrs:{model:e.brand,rules:e.rules,"label-position":"right","label-width":"100px"}},[a("el-form-item",{attrs:{label:e.$t("table.brand.name"),prop:"name"}},[a("el-input",{attrs:{type:"",placeholder:""},model:{value:e.brand.name,callback:function(t){e.$set(e.brand,"name",t)},expression:"brand.name"}})],1),a("el-form-item",{attrs:{label:e.$t("table.brand.image"),prop:"image"}},[a("el-upload",{staticClass:"avatar-uploader",attrs:{headers:e.headers,data:e.dataObj,action:e.action,"show-file-list":!1,"on-success":e.handleAvatarSuccess}},[a("el-button",{attrs:{size:"small",type:"primary"}},[e._v("点击上传")])],1),e.brand.image?a("img",{staticClass:"avatar",staticStyle:{"margin-top":"5px"},attrs:{src:e.brand.image,width:"80",height:"80"}}):e._e()],1),a("el-form-item",{attrs:{label:"图标",prop:"image"}},[a("el-upload",{staticClass:"avatar-uploader",attrs:{headers:e.headers,data:e.dataObj,action:e.action,"show-file-list":!1,"on-success":e.handleAvatarSuccessIcon}},[a("el-button",{attrs:{size:"small",type:"primary"}},[e._v("点击上传")])],1),e.brand.icon?a("img",{staticClass:"avatar",staticStyle:{"margin-top":"5px"},attrs:{src:e.brand.icon,width:"80",height:"80"}}):e._e()],1),a("el-form-item",{attrs:{label:e.$t("table.brand.video"),prop:"video"}},[a("el-input",{attrs:{type:"",placeholder:""},model:{value:e.brand.video,callback:function(t){e.$set(e.brand,"video",t)},expression:"brand.video"}})],1),a("el-form-item",{attrs:{label:e.$t("table.brand.desc"),prop:"desc"}},[a("el-input",{attrs:{type:"",placeholder:""},model:{value:e.brand.desc,callback:function(t){e.$set(e.brand,"desc",t)},expression:"brand.desc"}})],1),a("el-form-item",{attrs:{label:e.$t("table.brand.content"),prop:"content"}},[e.isVisible?a("Tinymce",{ref:"content",attrs:{height:200},model:{value:e.brand.content,callback:function(t){e.$set(e.brand,"content",t)},expression:"brand.content"}}):e._e()],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{plain:"",type:"warning"},on:{click:function(t){e.isVisible=!1}}},[e._v(" "+e._s(e.$t("common.cancel"))+" ")]),a("el-button",{attrs:{disabled:e.confirmDisabled,plain:"",type:"primary"},on:{click:e.submitForm}},[e._v(" "+e._s(e.$t("common.confirm"))+" ")])],1)],1)},l=[],d=a("9256"),u={page:{method:"POST",url:"/brand/page"},query:{method:"POST",url:"/brand/query"},update:{method:"PUT",url:"/brand"},save:{method:"POST",url:"/brand"},delete:{method:"DELETE",url:"/brand"},export:{method:"POST",url:"/brand/export"},preview:{method:"POST",url:"/brand/preview"},import:{method:"POST",url:"/brand/import"}},m={page:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(d["a"])(Object(i["a"])(Object(i["a"])({},u.page),{},{data:e,custom:t}))},query:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(d["a"])(Object(i["a"])(Object(i["a"])({},u.query),{},{data:e,custom:t}))},save:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(d["a"])(Object(i["a"])(Object(i["a"])({},u.save),{},{data:e,custom:t}))},update:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(d["a"])(Object(i["a"])(Object(i["a"])({},u.update),{},{data:e,custom:t}))},delete:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(d["a"])(Object(i["a"])(Object(i["a"])({},u.delete),{},{data:e,custom:t}))},export:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(d["a"])(Object(i["a"])(Object(i["a"])({},u.export),{},{responseType:"blob",data:e,custom:t}))},preview:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(d["a"])(Object(i["a"])(Object(i["a"])({},u.preview),{},{data:e,custom:t}))},import:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(d["a"])(Object(i["a"])(Object(i["a"])({},u.import),{},{data:e,custom:t}))}},f=a("5657"),p=a("8256"),h={name:"BrandEdit",directives:{elDragDialog:s["a"]},components:{Tinymce:p["a"]},props:{dialogVisible:{type:Boolean,default:!1},type:{type:String,default:"add"}},data:function(){return{confirmDisabled:!1,brand:this.initBrand(),screenWidth:0,width:this.initWidth(),rules:{},enums:{},dicts:{},headers:{Authorization:""},action:"".concat("https://pos.admin.api.lotus-wallet.com","/file/upload"),dataObj:{folderId:1},fileList:[]}},computed:{isVisible:{get:function(){return this.dialogVisible},set:function(){this.close(),this.reset()}},title:function(){return this.$t("common."+this.type)}},watch:{},created:function(){this.headers.token="Bearer "+f["a"].get("TOKEN",""),this.headers.tenant="0000"},mounted:function(){var e=this;window.onresize=function(){return function(){e.width=e.initWidth()}()}},methods:{handleAvatarSuccess:function(e){var t=e.data.url;this.brand.image=t,console.log(e,"response")},handleAvatarSuccessIcon:function(e){var t=e.data.url;this.brand.icon=t},initBrand:function(){return{id:"",name:"",image:"",video:"",desc:"",content:"",sort:50}},initWidth:function(){return this.screenWidth=document.body.clientWidth,this.screenWidth<991?"90%":this.screenWidth<1400?"45%":"800px"},setBrand:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this;t.dicts=e["dicts"],t.enums=e["enums"],e["row"]&&(t.brand=Object(i["a"])({},e["row"]))},close:function(){this.$emit("close")},reset:function(){this.$refs.form.clearValidate(),this.$refs.form.resetFields(),this.confirmDisabled=!1,this.brand=this.initBrand()},submitForm:function(){var e=this;this.$refs.form.validate((function(t){if(!t)return!1;e.editSubmit()}))},editSubmit:function(){var e=this;"edit"===e.type?e.update():e.save()},save:function(){var e=this;e.confirmDisabled=!0,m.save(this.brand).then((function(t){var a=t.data;a.isSuccess&&(e.isVisible=!1,e.$message({message:e.$t("tips.createSuccess"),type:"success"}),e.$emit("success"))})).finally((function(){return e.confirmDisabled=!1}))},update:function(){var e=this,t=this;t.confirmDisabled=!0,m.update(this.brand).then((function(a){var n=a.data;n.isSuccess&&(t.isVisible=!1,t.$message({message:e.$t("tips.updateSuccess"),type:"success"}),t.$emit("success"))})).finally((function(){return t.confirmDisabled=!1}))}}},b=h,v=a("2877"),g=Object(v["a"])(b,c,l,!1,null,"275dd9e0",null),y=g.exports,A=(a("fa7d"),a("1771")),w={name:"BrandManage",directives:{elDragDialog:s["a"]},components:{Pagination:o["a"],BrandEdit:y},filters:{},data:function(){return{dialog:{isVisible:!1,type:"add"},preview:{isVisible:!1,context:""},fileImport:{isVisible:!1,type:"import",action:"".concat("/api","/brand/brand/import")},tableKey:0,queryParams:Object(A["e"])(),selection:[],loading:!1,tableData:{total:0},enums:{},dicts:{}}},computed:{},watch:{},mounted:function(){this.fetch();var e=[],t=[];Object(A["f"])(e,this.enums,"brand"),Object(A["b"])(t,this.dicts)},methods:{editClose:function(){this.dialog.isVisible=!1},editSuccess:function(){this.search()},onSelectChange:function(e){this.selection=e},search:function(){this.fetch(Object(i["a"])({},this.queryParams))},reset:function(){this.queryParams=Object(A["e"])(),this.$refs.table.clearSort(),this.$refs.table.clearFilter(),this.search()},exportExcelPreview:function(){var e=this;this.queryParams.timeRange&&(this.queryParams.map.createTime_st=this.queryParams.timeRange[0],this.queryParams.map.createTime_ed=this.queryParams.timeRange[1]),this.queryParams.map.fileName="导出数据",m.preview(this.queryParams).then((function(t){var a=t.data;e.preview.isVisible=!0,e.preview.context=a.data}))},exportExcel:function(){this.queryParams.timeRange&&(this.queryParams.map.createTime_st=this.queryParams.timeRange[0],this.queryParams.map.createTime_ed=this.queryParams.timeRange[1]),this.queryParams.map.fileName="导出数据",m.export(this.queryParams).then((function(e){Object(A["a"])(e)}))},importExcel:function(){this.fileImport.type="upload",this.fileImport.isVisible=!0,this.$refs.import.setModel(!1)},importSuccess:function(){this.search()},importClose:function(){this.fileImport.isVisible=!1},singleDelete:function(e){this.$refs.table.clearSelection(),this.$refs.table.toggleRowSelection(e,!0),this.batchDelete()},batchDelete:function(){var e=this;this.selection.length?this.$confirm(this.$t("tips.confirmDelete"),this.$t("common.tips"),{confirmButtonText:this.$t("common.confirm"),cancelButtonText:this.$t("common.cancel"),type:"warning"}).then((function(){var t=e.selection.map((function(e){return e.id}));e.delete(t)})).catch((function(){e.clearSelections()})):this.$message({message:this.$t("tips.noDataSelected"),type:"warning"})},clearSelections:function(){this.$refs.table.clearSelection()},delete:function(e){var t=this;m.delete({ids:e}).then((function(e){var a=e.data;a.isSuccess&&(t.$message({message:t.$t("tips.deleteSuccess"),type:"success"}),t.search())}))},add:function(){this.dialog.type="add",this.dialog.isVisible=!0,this.$refs.edit.setBrand({enums:this.enums,dicts:this.dicts})},copy:function(e){this.$refs.edit.setBrand({row:e,enums:this.enums,dicts:this.dicts}),this.dialog.type="copy",this.dialog.isVisible=!0},edit:function(e){this.$refs.edit.setBrand({row:e,enums:this.enums,dicts:this.dicts}),this.dialog.type="edit",this.dialog.isVisible=!0},fetch:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.loading=!0,this.queryParams.timeRange&&(this.queryParams.map.createTime_st=this.queryParams.timeRange[0],this.queryParams.map.createTime_ed=this.queryParams.timeRange[1]),this.queryParams.current=t.current?t.current:this.queryParams.current,this.queryParams.size=t.size?t.size:this.queryParams.size,m.page(this.queryParams).then((function(t){var a=t.data;a.isSuccess&&(e.tableData=a.data)})).finally((function(){return e.loading=!1}))},sortChange:function(e){this.queryParams.sort=e.prop,this.queryParams.order=e.order,this.queryParams.sort&&this.search()},filterChange:function(e){for(var t in e)if(t.includes(".")){var a={};a[t.split(".")[1]]=e[t][0],this.queryParams.model[t.split(".")[0]]=a}else this.queryParams.model[t]=e[t][0];this.search()},cellClick:function(e,t){var a=this;if("operation"!==t["columnKey"]){var n=!1;this.selection.forEach((function(t){t.id===e.id&&(n=!0,a.$refs.table.toggleRowSelection(e))})),n||this.$refs.table.toggleRowSelection(e,!0)}}}},O=w,x=Object(v["a"])(O,n,r,!1,null,"fbe2a2ca",null);t["default"]=x.exports},"6f53":function(e,t,a){var n=a("83ab"),r=a("df75"),i=a("fc6a"),o=a("d1e7").f,s=function(e){return function(t){var a,s=i(t),c=r(s),l=c.length,d=0,u=[];while(l>d)a=c[d++],n&&!o.call(s,a)||u.push(e?[a,s[a]]:s[a]);return u}};e.exports={entries:s(!0),values:s(!1)}},"8a79":function(e,t,a){"use strict";var n=a("23e7"),r=a("06cf").f,i=a("50c4"),o=a("5a34"),s=a("1d80"),c=a("ab13"),l=a("c430"),d="".endsWith,u=Math.min,m=c("endsWith"),f=!l&&!m&&!!function(){var e=r(String.prototype,"endsWith");return e&&!e.writable}();n({target:"String",proto:!0,forced:!f&&!m},{endsWith:function(e){var t=String(s(this));o(e);var a=arguments.length>1?arguments[1]:void 0,n=i(t.length),r=void 0===a?n:u(i(a),n),c=String(e);return d?d.call(t,c,r):t.slice(r-c.length,r)===c}})},9256:function(e,t,a){"use strict";a("99af"),a("4160"),a("caad"),a("4fad"),a("d3b7"),a("159b");var n=a("5530"),r=a("bc3a"),i=a.n(r),o=a("5c96"),s=a("5657");a("27ae");function c(e,t){"ECONNABORTED"===e.code?Object(o["Message"])({message:"请求超时"}):e.response&&e.response.data?Object(o["Message"])({message:e.response.data}):e.message&&Object(o["Message"])({message:e.message}),t(e)}function l(e,t){e.data.isError&&(4e4===e.data.code||40001===e.data.code||40002===e.data.code||40003===e.data.code||40005===e.data.code||40006===e.data.code||40008===e.data.code?o["MessageBox"].alert(e.data.msg,"提醒",{confirmButtonText:"确定",callback:function(){window.location.hash="/login"}}):o["Message"].error(e.data.msg)),t(e)}i.a.interceptors.request.use((function(e){var t=!1!==e.headers["X-isToken"]||e.headers["X-isToken"],a=s["a"].get("TOKEN","");a&&t&&(e.headers.token="Bearer "+a);var n="ceres_admin_web",r="ceres_admin_web";return e.headers["Authorization"]="Basic ".concat("".concat(n,":").concat(r)),e}),(function(e){return Promise.reject(e)})),i.a.interceptors.response.use((function(e){return e}),(function(e){return Promise.reject(e)}));var d=function(e){console.log(e,"opts");var t={ts:Date.now()},a=e.method.toUpperCase(),r={method:a,url:"".concat("https://pos.admin.api.lotus-wallet.com").concat(e.url),responseType:e.responseType||"",timeout:2e4},o=["PUT","POST","PATCH"];o.includes(a)?r.data=e.data||{}:r.params=Object(n["a"])(Object(n["a"])({},t),e.data||{}),e.formData&&(r.transformRequest=[function(e){var t=new FormData;return e&&Object.entries(e).forEach((function(e){t.append(e[0],e[1])})),t}]);var s=new Promise((function(e,t){i()(r).then((function(t){l(t,e)})).catch((function(e){c(e,t)}))}));return s};t["a"]=d},a623:function(e,t,a){"use strict";var n=a("23e7"),r=a("b727").every,i=a("a640"),o=a("ae40"),s=i("every"),c=o("every");n({target:"Array",proto:!0,forced:!s||!c},{every:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}})},a888:function(e,t,a){"use strict";a("99af"),a("caad"),a("ac1f"),a("2532"),a("5319");var n={bind:function(e,t,a){var n=e.querySelector(".el-dialog__header"),r=e.querySelector(".el-dialog");n.style.cssText+=";cursor:move;",r.style.cssText+=";top:0px;";var i=function(){return window.document.currentStyle?function(e,t){return e.currentStyle[t]}:function(e,t){return getComputedStyle(e,!1)[t]}}();n.onmousedown=function(e){var t=e.clientX-n.offsetLeft,o=e.clientY-n.offsetTop,s=r.offsetWidth,c=r.offsetHeight,l=document.body.clientWidth,d=document.body.clientHeight,u=r.offsetLeft,m=l-r.offsetLeft-s,f=r.offsetTop,p=d-r.offsetTop-c,h=i(r,"left"),b=i(r,"top");h.includes("%")?(h=+document.body.clientWidth*(+h.replace(/\%/g,"")/100),b=+document.body.clientHeight*(+b.replace(/\%/g,"")/100)):(h=+h.replace(/\px/g,""),b=+b.replace(/\px/g,"")),document.onmousemove=function(e){var n=e.clientX-t,i=e.clientY-o;-n>u?n=-u:n>m&&(n=m),-i>f?i=-f:i>p&&(i=p),r.style.cssText+=";left:".concat(n+h,"px;top:").concat(i+b,"px;"),a.child.$emit("dragDialog")},document.onmouseup=function(e){document.onmousemove=null,document.onmouseup=null}}}},r=function(e){e.directive("el-drag-dialog",n)};window.Vue&&(window["el-drag-dialog"]=n,Vue.use(r)),n.install=r;t["a"]=n},c2cf:function(e,t,a){"use strict";var n=a("5530"),r=a("9256"),i={enums:{method:"GET",url:"/enums"}};t["a"]={uploadFile:"".concat("https://pos.admin.api.lotus-wallet.com","/attachment/upload"),enums:function(e){return Object(r["a"])(Object(n["a"])(Object(n["a"])({},i.enums),{},{data:e}))}}},ebb5:function(e,t,a){"use strict";var n=a("5530"),r=a("9256"),i={page:{method:"POST",url:"/dictionaryItem/page"},update:{method:"PUT",url:"/dictionaryItem"},save:{method:"POST",url:"/dictionaryItem"},delete:{method:"DELETE",url:"/dictionaryItem"},list:{method:"GET",url:"/dictionaryItem/codes"},preview:{method:"POST",url:"/dictionaryItem/preview"},export:{method:"POST",url:"/dictionaryItem/export"},import:{method:"POST",url:"/dictionaryItem/import"}};t["a"]={page:function(e){return Object(r["a"])(Object(n["a"])(Object(n["a"])({},i.page),{},{data:e}))},save:function(e){return Object(r["a"])(Object(n["a"])(Object(n["a"])({},i.save),{},{data:e}))},update:function(e){return Object(r["a"])(Object(n["a"])(Object(n["a"])({},i.update),{},{data:e}))},delete:function(e){return Object(r["a"])(Object(n["a"])(Object(n["a"])({},i.delete),{},{data:e}))},list:function(e){return Object(r["a"])(Object(n["a"])(Object(n["a"])({},i.list),{},{data:e}))},preview:function(e){return Object(r["a"])(Object(n["a"])(Object(n["a"])({},i.preview),{},{data:e}))},export:function(e){return Object(r["a"])(Object(n["a"])(Object(n["a"])({},i.export),{},{responseType:"blob",data:e}))},import:function(e){return Object(r["a"])(Object(n["a"])(Object(n["a"])({},i.import),{},{data:e}))}}},fa7d:function(e,t,a){"use strict";a.d(t,"c",(function(){return n})),a.d(t,"a",(function(){return r})),a.d(t,"b",(function(){return i}));a("c975"),a("b680"),a("ac1f"),a("466d");var n=function(e){var t={terminal:"",browser:"",terminalType:{}};return t.terminalType={trident:e.indexOf("Trident")>-1,presto:e.indexOf("Presto")>-1,webKit:e.indexOf("AppleWebKit")>-1,gecko:e.indexOf("Gecko")>-1&&-1===e.indexOf("KHTML"),mobile:!!e.match(/AppleWebKit.*Mobile.*/),ios:!!e.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),android:e.indexOf("Android")>-1||e.indexOf("Adr")>-1,iPhone:e.indexOf("iPhone")>-1,iPad:e.indexOf("iPad")>-1,webApp:-1===e.indexOf("Safari"),weixin:e.indexOf("MicroMessenger")>-1,qq:" qq"===e.match(/\sQQ/i)},t.terminalType.ios||t.terminalType.iPhone||t.terminalType.iPad?t.terminal="苹果":t.terminalType.android?t.terminal="安卓":t.terminal="PC",/msie/i.test(e)&&!/opera/.test(e)?t.browser="IE":/firefox/i.test(e)?t.browser="Firefox":/chrome/i.test(e)&&/webkit/i.test(e)&&/mozilla/i.test(e)?t.browser="Chrome":/opera/i.test(e)?t.browser="Opera":/iPad/i.test(e)?t.browser="iPad":!/webkit/i.test(e)||/chrome/i.test(e)&&/webkit/i.test(e)&&/mozilla/i.test(e)?t.browser="未知":t.browser="Safari",t},r=function(e){var t=[];if(e)for(var a in e)t.push({text:e[a],value:a});return t},i=function(e){if(e){var t=document.createElement("input");t.value=e,document.body.appendChild(t),t.select(),document.execCommand("Copy"),t.className="oInput",t.style.display="none"}}}}]); |