mirror of
https://github.com/crmeb/CRMEB.git
synced 2025-12-14 20:42:49 +00:00
1 line
13 KiB
JavaScript
1 line
13 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-24e7173a"],{"38f0":function(t,e,r){"use strict";var n=r("abc5");r.n(n).a},"9ace":function(t,e,r){"use strict";r.r(e),r("a4d3"),r("e01a"),r("d3b7"),r("d28b"),r("3ca3"),r("ddb0"),r("b636"),r("944a"),r("0c47"),r("23dc"),r("3410"),r("d9e2"),r("159b"),r("b0c0"),r("131a"),r("fb6a");var n=r("0122"),i=r("c964"),o=r("f3f3"),a=r("2f62"),c=r("1336");function s(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */s=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(e){u=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o,a,c,s;e=e&&e.prototype instanceof p?e:p,e=Object.create(e.prototype),n=new _(n||[]);return i(e,"_invoke",{value:(o=t,a=r,c=n,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return k()}for(c.method=t,c.arg=e;;){var r=c.delegate;if(r&&(r=function t(e,r){var n=r.method,i=e.iterator[n];return void 0===i?(r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=void 0,t(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d):(n=h(i,e.iterator,r.arg),"throw"===n.type?(r.method="throw",r.arg=n.arg,r.delegate=null,d):(i=n.arg,i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,d):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)))}(r,c),r)){if(r===d)continue;return r}if("next"===c.method)c.sent=c._sent=c.arg;else if("throw"===c.method){if("suspendedStart"===s)throw s="completed",c.arg;c.dispatchException(c.arg)}else"return"===c.method&&c.abrupt("return",c.arg);if(s="executing",r=h(o,a,c),"normal"===r.type){if(s=c.done?"completed":"suspendedYield",r.arg===d)continue;return{value:r.arg,done:c.done}}"throw"===r.type&&(s="completed",c.method="throw",c.arg=r.arg)}})}),e}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function m(){}function v(){}o={};var g=(u(o,a,(function(){return this})),Object.getPrototypeOf),y=(g=g&&g(g(O([]))),g&&g!==e&&r.call(g,a)&&(o=g),v.prototype=p.prototype=Object.create(o));function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){var o;i(this,"_invoke",{value:function(i,a){function c(){return new e((function(o,c){!function i(o,a,c,s){var l;o=h(t[o],t,a);if("throw"!==o.type)return(a=(l=o.arg).value)&&"object"==Object(n.a)(a)&&r.call(a,"__await")?e.resolve(a.__await).then((function(t){i("next",t,c,s)}),(function(t){i("throw",t,c,s)})):e.resolve(a).then((function(t){l.value=t,c(l)}),(function(t){return i("throw",t,c,s)}));s(o.arg)}(i,a,o,c)}))}return o=o?o.then(c,c):c()}})}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function O(t){if(t){var e,n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return e=-1,(n=function n(){for(;++e<t.length;)if(r.call(t,e))return n.value=t[e],n.done=!1,n;return n.value=void 0,n.done=!0,n}).next=n}return{next:k}}function k(){return{value:void 0,done:!0}}return i(y,"constructor",{value:m.prototype=v,configurable:!0}),i(v,"constructor",{value:m,configurable:!0}),m.displayName=u(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(t){return t="function"==typeof t&&t.constructor,!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,u(t,l,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},b(w.prototype),u(w.prototype,c,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new w(f(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(y),u(y,l,"Generator"),u(y,a,(function(){return this})),u(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e,r=Object(t),n=[];for(e in r)n.push(e);return n.reverse(),function t(){for(;n.length;){var e=n.pop();if(e in r)return t.value=e,t.done=!1,t}return t.done=!0,t}},t.values=O,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(L),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;0<=i;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),s=r.call(o,"finallyLoc");if(c&&s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}var a=(o=o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc?null:o)?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r,n,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(r=i.completion).type&&(n=r.arg,L(i)),n}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}o={name:"articleCategory",data:function(){return{grid:{xl:7,lg:7,md:12,sm:24,xs:24},loading:!1,formValidate:{status:"",page:1,limit:20,type:0},status:"",total:0,columns1:[{title:"ID",key:"id",width:80},{title:"分类昵称",key:"title",minWidth:130},{title:"分类图片",slot:"images",minWidth:130},{title:"状态",slot:"statuss",minWidth:130},{title:"操作",slot:"action",fixed:"right",minWidth:120}],FromData:null,modalTitleSs:"",categoryId:0,categoryList:[]}},computed:Object(o.a)(Object(o.a)({},Object(a.d)("media",["isMobile"])),{},{labelWidth:function(){return this.isMobile?void 0:"80px"},labelPosition:function(){return this.isMobile?"top":"right"}}),mounted:function(){this.getList()},methods:Object(o.a)(Object(o.a)({},Object(a.c)("userLevel",["getCategoryId"])),{},{add:function(){var t=this;this.$modalForm(Object(c.a)()).then((function(){return t.getList()}))},edit:function(t){var e=this;this.$modalForm(Object(c.b)(t.id)).then((function(){return e.getList()}))},del:function(t,e){var r=this;e={title:e,num:0,url:"cms/category/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(e).then((function(t){r.$message.success(t.msg),r.getList()})).catch((function(t){r.$message.error(t.msg)}))},getList:function(){var t=this;this.loading=!0,this.formValidate.status="all"===this.status?"":this.status,Object(c.c)(this.formValidate).then(function(){var e=Object(i.a)(s().mark((function e(r){var n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=r.data,t.categoryList=n.list,t.total=n.count,t.loading=!1;case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.loading=!1,t.$message.error(e.msg)}))},userSearchs:function(){this.formValidate.page=1,this.getList()},onchangeIsShow:function(t){var e=this;t={id:t.id,status:t.status};Object(c.i)(t).then(function(){var t=Object(i.a)(s().mark((function t(r){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.$message.success(r.msg);case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.$message.error(t.msg)}))},lookUp:function(t){this.$router.push({path:this.$routeProStr+"/cms/article/index",query:{id:t.id}}),this.getCategoryId(t.id)}})},r("38f0"),a=r("2877"),r=Object(a.a)(o,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("el-card",{staticClass:"ivu-mb-16",attrs:{bordered:!1,shadow:"never","body-style":{padding:0}}},[r("div",{staticClass:"padding-add"},[r("el-form",{ref:"formValidate",attrs:{model:t.formValidate,"label-width":t.labelWidth,"label-position":t.labelPosition,inline:""},nativeOn:{submit:function(t){t.preventDefault()}}},[r("el-form-item",{attrs:{label:"是否显示:","label-for":"status"}},[r("el-select",{staticClass:"form_content_width",attrs:{placeholder:"请选择",clearable:""},on:{change:t.userSearchs},model:{value:t.status,callback:function(e){t.status=e},expression:"status"}},[r("el-option",{attrs:{value:"all",label:"全部"}}),r("el-option",{attrs:{value:"1",label:"显示"}}),r("el-option",{attrs:{value:"0",label:"不显示"}})],1)],1),r("el-form-item",{attrs:{label:"分类昵称:",prop:"title","label-for":"status2"}},[r("el-input",{staticClass:"form_content_width",attrs:{clearable:"",placeholder:"请输入分类昵称"},model:{value:t.formValidate.title,callback:function(e){t.$set(t.formValidate,"title",e)},expression:"formValidate.title"}})],1),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:t.userSearchs}},[t._v("查询")])],1)],1)],1)]),r("el-card",{attrs:{bordered:!1,shadow:"never"}},[r("el-button",{directives:[{name:"auth",rawName:"v-auth",value:["cms-category-create"],expression:"['cms-category-create']"}],attrs:{type:"primary"},on:{click:t.add}},[t._v("添加文章分类")]),r("vxe-table",{staticClass:"vxeTable mt14",attrs:{"highlight-hover-row":"",loading:t.loading,"header-row-class-name":"false","tree-config":{children:"children"},data:t.categoryList}},[r("vxe-table-column",{attrs:{field:"id",title:"ID",tooltip:"",width:"80"}}),r("vxe-table-column",{attrs:{field:"title","tree-node":"",title:"分类昵称","min-width":"130"}}),r("vxe-table-column",{attrs:{field:"image",title:"分类图片","min-width":"130"},scopedSlots:t._u([{key:"default",fn:function(e){return e=e.row,[e.image?r("div",{directives:[{name:"viewer",rawName:"v-viewer"}],staticClass:"tabBox_img"},[r("img",{directives:[{name:"lazy",rawName:"v-lazy",value:e.image,expression:"row.image"}]})]):t._e()]}}])}),r("vxe-table-column",{attrs:{field:"status",title:"状态","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[r("el-switch",{attrs:{"active-value":1,"inactive-value":0,value:n.status,size:"large"},on:{change:function(e){return t.onchangeIsShow(n)}},model:{value:n.status,callback:function(e){t.$set(n,"status",e)},expression:"row.status"}})]}}])}),r("vxe-table-column",{attrs:{field:"date",title:"操作",width:"160",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[r("a",{on:{click:function(e){return t.edit(n)}}},[t._v("编辑")]),r("el-divider",{attrs:{direction:"vertical"}}),r("a",{on:{click:function(e){return t.del(n,"删除文章分类",t.scope.$index)}}},[t._v("删除")]),r("el-divider",{attrs:{direction:"vertical"}}),r("a",{on:{click:function(e){return t.lookUp(n)}}},[t._v("查看文章")])]}}])})],1),r("div",{staticClass:"acea-row row-right page"},[t.total?r("pagination",{attrs:{total:t.total,page:t.formValidate.page,limit:t.formValidate.limit},on:{"update:page":function(e){return t.$set(t.formValidate,"page",e)},"update:limit":function(e){return t.$set(t.formValidate,"limit",e)},pagination:t.getList}}):t._e()],1)],1)],1)}),[],!1,null,"6fe8f492",null),e.default=r.exports},abc5:function(t,e,r){}}]); |