Files
Obosky_Ronghua/serve/tf/static/js/chunk-3b4e252e.63a4c246.js
2023-10-17 09:15:30 +08:00

1 line
4.9 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3b4e252e"],{"9b6e":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t._self._c;return e("a-card",{staticClass:"manuals-maintain"},[e("ClassifyLayou",{attrs:{classifyData:t.classifyData,patterm:"perview"},on:{selectClassify:t.selectClassify}}),e("TableChunkView",{attrs:{tableData:t.tableData,showEditorButton:!1},scopedSlots:t._u([{key:"header-condition",fn:function(){return[e("i",{staticClass:"iconfont sort-iconfont",class:{"":"i-zy-sj",ASC:"i-zy-sj-d",DESC:"i-zy-sj-u"}[t.find_params.sort_create_time],on:{click:function(e){return t.findBySort("sort_create_time")}}})]},proxy:!0},{key:"line-button",fn:function(a){var n=a.user;return[e("a-button",{attrs:{type:"link"},nativeOn:{click:function(e){return t.lookManuals(n)}}},[t._v(" 查看 ")])]}}])})],1)},r=[],s=a("c7eb"),c=a("1da1"),i=a("5530"),o=(a("d3b7"),a("3ca3"),a("ddb0"),a("159b"),a("25f0"),a("4e82"),a("99af"),a("0c1a")),u=a("c1fa"),l=a("2f62"),f=a("ead3"),d=a("1db2"),h={data:function(){return{classifyData:[{title:"0-0",key:"0-0"}],tableAlertButton:{delete:!0,open:!1,clonse:!1},show_type:0,find_params:{sort_create_time:"DESC",sort_size:""},tableLoading:!1,tableData:[],isShowModal:!1,formData:{status:!0},rules:{name:[{required:!0,message:"请输入用户名称",whitespace:!0}]},layout:{labelCol:{span:4},wrapperCol:{span:20}},modalTitle:"新增用户",confirmLoading:!1,manualsInfo:{},isShowDrawer:!1,allArticleList:[],articleList:[],checkedKeys:[],selectedKeys:0,indeterminate:!1,isAllChecked:!1,expandedKeys:[],showInputNodeKey:"",newName:"",isShowDropdown:!1,canDraggable:!1,searchArticle:[]}},components:{ClassifyLayou:f["a"],SearchInputVue:o["a"],TableChunkView:d["a"]},computed:Object(i["a"])({},Object(l["d"])("account",["userList","dempList","user"])),created:function(){var t=this;return Object(c["a"])(Object(s["a"])().mark((function e(){var a;return Object(s["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.tableLoading=!0,e.prev=1,t.routerQueryInfo=t.$route.query,t.routerQueryInfo.token&&localStorage.setItem("editor_token",t.routerQueryInfo.token),e.next=6,Promise.all([Object(u["k"])(),Object(u["i"])()]);case 6:a=e.sent,t.classifyData=a[0].data.data,t.tableData=a[1].data.data,t.tableData.forEach((function(e){e.updateTime=t.getTime(e.updateTime)})),e.next=15;break;case 12:e.prev=12,e.t0=e["catch"](1),t.$message.error(e.t0.toString());case 15:t.tableLoading=!1;case 16:case"end":return e.stop()}}),e,null,[[1,12]])})))()},methods:Object(i["a"])(Object(i["a"])({},Object(l["c"])("account",["setUserList","setDempList"])),{},{addTableLine:function(){this.$router.push({path:"/editorManuals",query:{type:"create",classify:this.selectedKeys}})},changeShowType:function(){this.show_type=(this.show_type+1)%2},findBySort:function(t){var e=["ASC","DESC"];this.find_params[t]=e[(e.indexOf(this.find_params[t])+1)%e.length],this.sortData()},sortData:function(){switch(this.find_params.sort_create_time){case"ASC":this.tableData=this.tableData.sort((function(t,e){return new Date(e.createTime)-new Date(t.createTime)}));break;case"DESC":this.tableData=this.tableData.sort((function(t,e){return new Date(t.createTime)-new Date(e.createTime)}));break;default:break}},onClose:function(){this.isShowDrawer=!1,this.tableLoading=!1},getClassifyData:function(){var t=this;return Object(c["a"])(Object(s["a"])().mark((function e(){var a;return Object(s["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(u["k"])();case 2:a=e.sent,t.classifyData=a.data.data;case 4:case"end":return e.stop()}}),e)})))()},lookManuals:function(t){var e=this;return Object(c["a"])(Object(s["a"])().mark((function a(){return Object(s["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:e.$router.push({path:"/article",query:Object(i["a"])({manuals:t.id},e.routerQueryInfo)});case 1:case"end":return a.stop()}}),a)})))()},lookArticle:function(t){var e=this.$router.resolve({path:"/article",query:{manuals:t.manuals,article:t.id}});window.open(e.href,"_self")},getTime:function(t){var e=new Date(t),a=e.getFullYear(),n=e.getMonth()+1<10?"0"+(e.getMonth()+1):e.getMonth()+1,r=e.getDate(),s=e.getHours(),c=e.getMinutes(),i=e.getSeconds(),o="".concat(a,"-").concat(n,"-").concat(r," ").concat(s<10?"0"+s:s,":").concat(c<10?"0"+c:c,":").concat(i<10?"0"+i:i);return o},selectClassify:function(t){var e=this;return Object(c["a"])(Object(s["a"])().mark((function a(){var n,r;return Object(s["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:return e.selectedKeys=t,a.next=3,Object(u["i"])(t[0]||null);case 3:n=a.sent,r=n.data,e.tableData=r.data,e.tableData.forEach((function(t){t.updateTime=e.getTime(t.updateTime)}));case 7:case"end":return a.stop()}}),a)})))()}}),watch:{tableData:function(){var t=this;this.tableData.forEach((function(e){e.updateTime=t.getTime(e.updateTime)}))}}},b=h,p=(a("fbf4"),a("2877")),m=Object(p["a"])(b,n,r,!1,null,"4776a9cb",null);e["default"]=m.exports},ceff:function(t,e,a){},fbf4:function(t,e,a){"use strict";a("ceff")}}]);