| 1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([[60],{731:function(e,t,r){"use strict";r.r(t);var n=r(6),o=(r(30),r(18),r(191),r(28),r(12),r(15),r(38),r(37),r(33),r(582));function c(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return d(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var i=0,n=function(){};return{s:n,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,c=!0,f=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return c=e.done,e},e:function(e){f=!0,o=e},f:function(){try{c||null==r.return||r.return()}finally{if(f)throw o}}}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,r=new Array(t);i<t;i++)r[i]=e[i];return r}t.default={name:"user_cards_list",components:{user_workfile_check:o.a},data:function(){return{drawer_obj:{user_workfile_check:!1,id:0},page:1,total:0,status:0,cate_id:0,type:"0",keywords:"",workfileData:[],loading:!1,outerVisible:!1,addDialog:!1,editDialog:!1,editCateDialog:!1,cate_form:{id:0,cate_id:[]},cateList:[],add_form:{parent_id:0,category_id:0,name:"",f_name:"",order:"1",type:1,seo_title:"",seo_desc:"",seo_keywords:"",customer_type:2},count:{total:0,type1:0,type2:0,status0:0,status1:0,status2:0},tableData:[]}},mounted:function(){this.getAuditList(),this.getTableData()},methods:{addDialogEvent:function(e){this.add_form.parent_id=e.category_id,this.addDialog=!0},addFirstCate:function(){this.add_form.parent_id=0,this.add_form.category_id=0,this.addDialog=!0},formAdd:function(){var e=this;this.$post("/api/admin/common/addCategory",this.add_form).then((function(t){t&&1===t.status&&(e.getTableData(),e.$message.success("操作成功"),e.addDialog=!1,e.add_form.parent_id=0,e.add_form.category_id=0,e.add_form.name="",e.add_form.f_name="",e.add_form.order=0,e.add_form.customer_type=1,e.editDialog=!1,e.add_form.seo_title="",e.add_form.seo_desc="",e.add_form.seo_keywords="")}))},form:function(){},onChangePost:function(e,t,content){var r=this;return Object(n.a)(regeneratorRuntime.mark((function n(){var o;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r.loading=!0,n.next=3,r.$post("/api/admin/UserWorks/changeWorkFile",{id:e,type:t,content:content});case 3:(o=n.sent)&&1===o.status&&(r.$message({type:"success",message:"操作成功!"}),r.getAuditList(),r.loading=!1);case 5:case"end":return n.stop()}}),n)})))()},onChange:function(e,t){var r=this;return Object(n.a)(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:1==t?r.onChangePost(e,t,""):(r.drawer_obj.user_workfile_check=!0,r.drawer_obj.id=e);case 1:case"end":return n.stop()}}),n)})))()},editDialogEvent:function(e){var form=this.add_form;form.parent_id=e.parent_id,form.category_id=e.category_id,form.name=e.name,form.f_name=e.f_name,form.order=e.order,form.seo_title=e.seo_title,form.seo_desc=e.seo_desc,form.seo_keywords=e.seo_keywords,form.customer_type=Number(e.customer_type),this.editDialog=!0},typechange:function(e){var t=this;return Object(n.a)(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:t.page=1,t.type=e,t.keywords="",t.getAuditList();case 4:case"end":return r.stop()}}),r)})))()},statuschange:function(e){var t=this;return Object(n.a)(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:t.page=1,t.status=e,t.keywords="",t.getAuditList();case 4:case"end":return r.stop()}}),r)})))()},searchkeywords:function(){var e=this;return Object(n.a)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.page=1,e.keywords=e.keywords,e.getAuditList();case 3:case"end":return t.stop()}}),t)})))()},getTableData:function(){var e=this;return Object(n.a)(regeneratorRuntime.mark((function t(){var r,n,o,d,f,m,_,i,l,y,h,w;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=1,n=[],o={type:1},t.next=5,e.$post("/api/admin/common/getCategoryMap",o);case 5:d=t.sent,f=d.data,m=c(f);try{for(m.s();!(_=m.n()).done;){if(i=_.value,l={id:r,type:1,category_id:i.category_id,name:i.name,f_name:i.f_name,parent_id:i.parent_id,order:i.order,customer_type:i.customer_type,seo_title:i.seo_title,seo_desc:i.seo_desc,seo_keywords:i.seo_keywords,label:i.name,value:i.category_id,children:[]},r++,i.child){y=c(i.child);try{for(y.s();!(h=y.n()).done;)w=h.value,l.children.push({id:r,type:1,category_id:w.category_id,parent_id:w.parent_id,name:w.name,f_name:w.f_name,order:w.order,seo_title:w.seo_title,seo_desc:w.seo_desc,seo_keywords:w.seo_keywords,customer_type:w.customer_type,label:w.name,value:w.category_id}),r++}catch(e){y.e(e)}finally{y.f()}}n.push(l)}}catch(e){m.e(e)}finally{m.f()}e.tableData=n,e.cateList=n;case 11:case"end":return t.stop()}}),t)})))()},getAuditList:function(){var e=this;return Object(n.a)(regeneratorRuntime.mark((function t(){var data,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return data={page:e.page,status:e.status,type:e.type,cate_id:e.cate_id,keywords:e.keywords},t.next=3,e.$post("/api/admin/UserWorks/getWorkFileList",data);case 3:(r=t.sent)&&1===r.status&&(e.workfileData=r.data.list||[],e.total=1*r.data.total,e.count=r.data.count);case 5:case"end":return t.stop()}}),t)})))()},deleteWorkFile:function(e){var t=this;return Object(n.a)(regeneratorRuntime.mark((function r(){var n;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,t.$post("/api/admin/UserWorks/deleteWorkFile",{id:e});case 2:(n=r.sent)&&1===n.status&&(t.$message({type:"success",message:"删除成功!"}),t.getAuditList(),t.loading=!1);case 4:case"end":return r.stop()}}),r)})))()},handleCurrentChange:function(e){this.page=e,this.getAuditList()},delEvent:function(e){var t=this;return Object(n.a)(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:t.$confirm("确认删除该分类?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){var r=Object(n.a)(regeneratorRuntime.mark((function r(n){var o;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n.value,r.next=3,t.$post("/api/admin/common/categoryDel",{category_id:e.category_id});case 3:(o=r.sent)&&1===o.status&&(t.$message.success("删除成功"),t.getTableData());case 5:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}());case 1:case"end":return r.stop()}}),r)})))()},showEditCate:function(e){this.editCateDialog=!0,this.cate_form.id=e.id},updateCate:function(){var e=this;return Object(n.a)(regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.$post("/api/admin/UserWorks/updateWorkFile",{id:e.cate_form.id,cate_id:e.cate_form.cate_id[1]});case 2:(r=t.sent)&&1===r.status&&(e.$message({type:"success",message:"修改成功!"}),e.editCateDialog=!1,e.getAuditList());case 4:case"end":return t.stop()}}),t)})))()}}}}}]);
|