|
1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4a29caee"],{"08ea":function(e,t,i){},3843:function(e,t,i){"use strict";var n=i("82d0"),c=i.n(n);c.a},"3a49":function(e,t,i){"use strict";var n=i("55f9"),c=i.n(n);c.a},"55f9":function(e,t,i){},"67d4":function(e,t,i){"use strict";var n=i("ee71"),c=i.n(n);c.a},"82d0":function(e,t,i){},"864a":function(e,t,i){"use strict";i.r(t);var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{style:{paddingLeft:(e.indent>1?10:0)+"px"}},[e._l(e.list,(function(t){return["file"===t.nodeType?i("list-file-item",{key:t.id,attrs:{file:t,readOnly:e.readOnly,checked:e.selectedKeyMap[t.id],indent:e.indent},on:{check:e.check,"open-menu":e.openFileMenu}}):i("list-folder-item",{key:t.id,attrs:{folder:t,readOnly:e.readOnly,selectedKeyMap:e.selectedKeyMap,indent:e.indent},on:{check:e.check,"open-menu":e.openFileMenu}})]}))],2)},c=[],l=(i("a9e3"),function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"list-file-item",on:{contextmenu:function(t){return t.preventDefault(),t.stopPropagation(),e.onRightClick(t)}}},[i("div",{staticClass:"list-file-item-cell"},[i("el-checkbox",{directives:[{name:"show",rawName:"v-show",value:!e.readOnly,expression:"!readOnly"}],staticClass:"list-file-item-checkbox",attrs:{value:!!e.checked},on:{change:e.onCheckChange}}),i("span",{attrs:{title:e.fileName}},[e._v(e._s(e.fileName))])],1),i("div",{staticClass:"list-file-item-cell"},[i("span",[e._v("V"+e._s(e.file.version))])]),i("div",{staticClass:"list-file-item-cell"},[i("span",[e._v(e._s(e.file.modifyName))])]),i("div",{staticClass:"list-file-item-cell"},[i("span",[e._v(e._s(e._f("formatTime")(e.file.modifyTime)))])]),e._m(0)])}),s=[function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"list-file-item-cell"},[i("span")])}],a=(i("99af"),i("13d5"),i("5a0c")),o=i.n(a),r=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return t.reduce((function(e,t){return e[t]=!0,e}),{})},d=r("jpg","png","bmp","gif","jpeg"),u=r("doc","docx","ppt","pptx","xls","xlsx","pdf","txt"),f=r("avi","mov","wav","mp4"),p=r("exe"),h=r("zip"),v={props:{file:Object,readOnly:Boolean,checked:Boolean},filters:{formatTime:function(e){return o()(e).format("YYYY年MM月DD日 A HH:mm")}},data:function(){return{menuStyle:{left:0,top:0}}},computed:{fileName:function(){var e=this.file;return"".concat(e.archName).concat(e.extension?".".concat(e.extension):"")},fileType:function(){var e=this.file.extension;return d[e]?"图片":u[e]?"文档":f[e]?"视频":p[e]?"可执行程序":h[e]?"压缩文件":"未识别"}},methods:{onCheckChange:function(){this.$emit("check",this.file)},onRightClick:function(e){this.$emit("open-menu",e,this.file)}}},m=v,b=(i("3843"),i("2877")),y=Object(b["a"])(m,l,s,!1,null,"e715b5f4",null),j=y.exports,g=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"list-folder-item",class:{large:0===e.indent}},[i("div",{staticClass:"list-folder-item-header"},[i("div",{staticClass:"list-folder-item-lever",class:{"list-folder-item-expanded":e.expanded},on:{click:function(t){t.stopPropagation(),e.expanded=!e.expanded}}}),i("div",{staticClass:"list-folder-item-cell",style:{flex:1}},[i("img",{staticClass:"list-folder-item-icon",attrs:{src:"static/img/file.png"}}),i("span",[e._v(e._s(e.folder.folderName))]),e.readOnly?e._e():i("div",{staticClass:"list-folder-item-checkall"},[i("el-checkbox",{attrs:{label:"全选",value:e.isChildrenAllChecked},on:{change:function(t){return e.check(e.folder)}}})],1)])]),i("item-list",{staticClass:"list-folder-item-body",class:{"list-folder-item-body-hide":!e.expanded},attrs:{list:e.folder.children,readOnly:e.readOnly,selectedKeyMap:e.selectedKeyMap,indent:e.indent+1},on:{check:e.check,"open-menu":e.openFileMenu}})],1)},k=[],C=(i("a623"),i("d3b7"),{components:{ItemList:function(){return Promise.resolve().then(i.bind(null,"864a"))}},props:{folder:Object,readOnly:Boolean,selectedKeyMap:Object,indent:{type:Number,default:0}},data:function(){return{expanded:0===this.indent}},computed:{isChildrenAllChecked:function(){return _(this.folder.children,this.selectedKeyMap)}},methods:{check:function(e){this.$emit("check",e)},openFileMenu:function(e,t){this.$emit("open-menu",e,t)}}});function _(e,t){return e.every((function(e){return"file"===e.nodeType?t[e.id]:_(e.children,t)}))}var x=C,P=(i("3a49"),Object(b["a"])(x,g,k,!1,null,"a1ab9f38",null)),O=P.exports,M={components:{ListFileItem:j,ListFolderItem:O},props:{list:Array,readOnly:Boolean,selectedKeyMap:Object,indent:{type:Number,default:0}},methods:{check:function(e){this.$emit("check",e)},openFileMenu:function(e,t){this.$emit("open-menu",e,t)}}},w=M,F=Object(b["a"])(w,n,c,!1,null,null,null);t["default"]=F.exports},"9b81":function(e,t,i){},a623:function(e,t,i){"use strict";var n=i("23e7"),c=i("b727").every,l=i("a640"),s=i("ae40"),a=l("every"),o=s("every");n({target:"Array",proto:!0,forced:!a||!o},{every:function(e){return c(this,e,arguments.length>1?arguments[1]:void 0)}})},b332:function(e,t,i){"use strict";i.d(t,"b",(function(){return c})),i.d(t,"a",(function(){return l})),i.d(t,"f",(function(){return s})),i.d(t,"e",(function(){return a})),i.d(t,"d",(function(){return o})),i.d(t,"g",(function(){return r})),i.d(t,"c",(function(){return d}));i("99af"),i("a15b"),i("d81d"),i("fb6a"),i("ac1f"),i("5319"),i("1276");var n=i("d4ec"),c={DOWNLOADING:100,UPLOADING:101},l={NOT_WORKING:1,WORKING:2},s=function(e,t){var i=e.nodeName,n=e.extension,c=e.archName,l=e.relativePath,s=t.folderName;return"".concat(s).concat(i?"\\协作文件":"","\\").concat(l?"".concat(l.replace(/\//g,"\\"),"\\"):"").concat(c).concat(n?".".concat(n):"")},a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2?arguments[2]:void 0;if(!e)return[];var n=t?"".concat(t,"/"):t,c=e.split("/").map((function(e,t,c){var l="".concat(n).concat(c.slice(0,t+1).join("/"));return i&&i(l),l}));return c},o=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;Object(n["a"])(this,e);var c=t.split("/"),l=c.pop();this.id=i,this.folderPath=t,this.folderName=l,this.parentFolderPath=c.join("/"),this.childCount=0,this.fileCount=0},r=["jpg","png","bmp","gif","jpeg"],d=["avi","mov","wav","mp4"]},c11e:function(e,t,i){"use strict";i.r(t);var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("app-header",{attrs:{theme:"basis",showBackBtn:"",backBtnTitle:e.title,showUserCenter:"",isInRecycle:"",showRecycleBin:""},scopedSlots:e._u([{key:"center",fn:function(){return[i("div",{staticClass:"main-title"},[e._v("回收站")])]},proxy:!0},{key:"right",fn:function(){},proxy:!0}])}),i("div",{staticClass:"recycle_content"},[i("div",{staticClass:"view-left"},[i("collapse-unit",{staticStyle:{"max-height":"45%"},attrs:{title:"正在进行的项目",list:e.aliveProjectList,itemKey:"id",itemLabel:"projName"},model:{value:e.selectedProject,callback:function(t){e.selectedProject=t},expression:"selectedProject"}}),i("collapse-unit",{staticStyle:{"max-height":"45%"},attrs:{title:"被删除的项目",list:e.removedProjectList,itemKey:"id",itemLabel:"projName"},model:{value:e.selectedProject,callback:function(t){e.selectedProject=t},expression:"selectedProject"}})],1),i("div",{staticClass:"view-right"},[i("div",{staticClass:"view-right-title"},[i("span",[e._v("文件")]),i("el-button",{staticClass:"view-right-title-extra",attrs:{type:e.selectable?"primary":void 0},on:{click:function(t){t.stopPropagation(),e.selectable=!e.selectable}}},[e._v(e._s(e.selectable?"取消多选":"多选"))])],1),i("div",{staticClass:"table-like"},[e._m(0),i("item-list",{attrs:{list:e.rightPanelItemList,readOnly:!e.selectable,selectedKeyMap:e.selectedKeyMap},on:{check:e.toggleCheck,"open-menu":e.openFileMenu}})],1),e.selectable?i("div",{staticClass:"view-right-bottom"},[i("el-button",{staticClass:"bottom-button",attrs:{type:"primary",disabled:!e.canShowButton},on:{click:function(t){t.stopPropagation(),e.selectedProject.deleted?e.chooseNodeModalVisible=!0:e.recoverFiles()}}},[e._v(e._s(e.selectedProject.deleted?"拷贝转移至":"放回原处"))])],1):e._e()])]),i("el-dialog",{staticClass:"choose-project-modal",attrs:{title:"将所选文件拷贝转移至",visible:e.chooseNodeModalVisible,width:"660px"},on:{"update:visible":function(t){e.chooseNodeModalVisible=t}}},[i("div",{staticClass:"project-list-wrapper"},e._l(e.aliveProjectList,(function(t){return i("project-collapse-unit",{key:t.id,attrs:{title:t.projName,list:t.nodeFolder||[],itemKey:"id",itemLabel:"folderName"},model:{value:e.choosedNode,callback:function(t){e.choosedNode=t},expression:"choosedNode"}})})),1),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(t){e.chooseNodeModalVisible=!1}}},[e._v("取 消")]),i("el-button",{attrs:{type:"primary",disabled:!e.choosedNode.id},on:{click:e.copyFiles}},[e._v("确定转移")])],1)]),e.fileMenuKey?i("div",{staticClass:"contextmenu file-right-menu",style:e.fileMenuStyle},[i("ul",{staticClass:"rightMenu"},[i("li",{on:{click:function(t){return t.stopPropagation(),e.recoverFiles(e.fileMenuKey)}}},[e._v("返回原处")])])]):e._e()],1)},c=[function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"table-header"},[i("div",{staticClass:"table-th"},[e._v("文件名")]),i("div",{staticClass:"table-th"},[e._v("版本号")]),i("div",{staticClass:"table-th"},[e._v("最后修改人")]),i("div",{staticClass:"table-th"},[e._v("移除时间")]),i("div",{staticClass:"table-th"})])}],l=(i("99af"),i("4de4"),i("7db0"),i("4160"),i("a15b"),i("d81d"),i("13d5"),i("fb6a"),i("b64b"),i("07ac"),i("ac1f"),i("1276"),i("159b"),i("ade3")),s=i("5530"),a=i("3835"),o=(i("96cf"),i("1da1")),r=i("01a8"),d=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"collapse-unit",class:{"collapse-unit-active":e.active}},[i("div",{staticClass:"collapse-unit-title",on:{click:function(t){t.stopPropagation(),e.active=!e.active}}},[i("span",[e._v(e._s(e.title))]),i("div",{staticClass:"action-button"},[e._v(e._s(e.active?"收起":"展开"))])]),i("div",{staticClass:"collapse-unit-body"},e._l(e.list,(function(t){return i("div",{key:t[e.itemKey],staticClass:"collapse-unit-item",class:{"collapse-unit-item-active":t[e.itemKey]===e.selectedItem[e.itemKey]},on:{click:function(i){return i.stopPropagation(),e.clickItem(t)}}},[e._v(" "+e._s(t[e.itemLabel])+" ")])})),0)])},u=[],f={model:{prop:"selectedItem",event:"select"},props:{itemKey:{type:String,default:"key"},itemLabel:{type:String,default:"label"},title:String,defaultExpand:Boolean,selectedItem:Object,list:Array},data:function(){return{active:this.defaultExpand||!1}},methods:{clickItem:function(e){this.$emit("select",e)}}},p=f,h=(i("d371"),i("2877")),v=Object(h["a"])(p,d,u,!1,null,"11065a17",null),m=v.exports,b=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"proj-collapse-unit",class:{"proj-collapse-unit-active":e.active}},[i("div",{staticClass:"proj-collapse-unit-title",on:{click:function(t){t.stopPropagation(),e.active=!e.active}}},[i("span",[e._v(e._s(e.title))]),i("div",{staticClass:"action-button"})]),i("div",{staticClass:"proj-collapse-unit-body"},e._l(e.list,(function(t){return i("div",{key:t[e.itemKey],staticClass:"proj-collapse-unit-item",on:{click:function(i){return i.stopPropagation(),e.clickItem(t)}}},[i("el-checkbox",{staticClass:"node-checkbox",attrs:{value:t[e.itemKey]===e.selectedItem[e.itemKey]}}),e._v(" "+e._s(t[e.itemLabel])+" ")],1)})),0)])},y=[],j={model:{prop:"selectedItem",event:"select"},props:{itemKey:{type:String,default:"key"},itemLabel:{type:String,default:"label"},title:String,defaultExpand:Boolean,selectedItem:Object,list:Array},data:function(){return{active:this.defaultExpand||!1}},methods:{clickItem:function(e){this.$emit("select",e)}}},g=j,k=(i("67d4"),Object(h["a"])(g,b,y,!1,null,"a5549fb4",null)),C=k.exports,_=i("864a"),x=i("b332"),P=i("3de1"),O=i("b775"),M={components:{AppHeader:r["a"],CollapseUnit:m,ItemList:_["default"],ProjectCollapseUnit:C},mounted:function(){this.fetchProjectList(),document.body.addEventListener("click",this.closeFileMenu),document.body.addEventListener("contextmenu",this.closeFileMenu)},destroyed:function(){document.body.removeEventListener("click",this.closeFileMenu),document.body.removeEventListener("contextmenu",this.closeFileMenu)},data:function(){return{userId:sessionStorage.userId,title:"返回"+sessionStorage.pageTitle,aliveProjectList:[],removedProjectList:[],selectedProject:{},rightPanelItemList:[],selectable:!1,selectedKeyMap:{},currentFileList:[],chooseNodeModalVisible:!1,choosedNode:{},fileMenuStyle:{},fileMenuKey:void 0}},watch:{selectedProject:function(e){this.fetchProjectRemovedFiles(e.id),this.selectable=!1,this.fileMenuKey=void 0},selectable:function(){this.selectedKeyMap={},this.fileMenuKey=void 0},chooseNodeModalVisible:function(e){e||(this.choosedNode={})}},computed:{canShowButton:function(){return Object.values(this.selectedKeyMap).filter((function(e){return e})).length}},methods:{searchForFile:function(){},openFileMenu:function(e,t){if(!this.selectable&&!this.selectedProject.deleted){console.log(e,t),this.fileMenuKey=t.id;var i=e.clientX-(window.innerWidth-e.clientX<200?100:0),n=e.clientY-(window.innerHeight-e.clientY<200?100:0);this.fileMenuStyle={left:"".concat(i,"px"),top:"".concat(n,"px")}}},closeFileMenu:function(){this.fileMenuKey=void 0},fetchProjectList:function(){var e=this;return Object(o["a"])(regeneratorRuntime.mark((function t(){var i,n,c,l,s,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$fetchApi("project/queryAllProjectListByUserId",{userId:e.userId});case 2:i=t.sent,n=(i.Data||[]).reduce((function(e,t){if(!t.HasFile)return e;var i=Object(P["b"])(t);return i.nodeFolder&&(i.nodeFolder=i.nodeFolder.map(P["b"])),e[i.deleted?1:0].push(i),e}),[[],[]]),c=Object(a["a"])(n,2),l=c[0],s=c[1],e.aliveProjectList=l,e.removedProjectList=s,e.selectedProject=l.length?l[0]:s.length?s[0]:{},sessionStorage.projId&&(o=l.find((function(e){return e.id===sessionStorage.projId})),o&&(e.selectedProject=o));case 8:case"end":return t.stop()}}),t)})))()},fetchProjectRemovedFiles:function(e){var t=this;return Object(o["a"])(regeneratorRuntime.mark((function i(){var n,c,l,s,o;return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:if(e){i.next=2;break}return i.abrupt("return");case 2:return i.next=4,t.$fetchApi("file/queryFilesFromRecycleBinByProjectId",{projectId:e});case 4:n=i.sent,c=(n.Data||[]).reduce((function(e,t){return t.ProjArchives&&(e[0]=e[0].concat(N(t.ProjArchives,t.FolderName)),e[1]=e[1].concat(t.ProjArchives.map(P["b"]))),e}),[[],[]]),l=Object(a["a"])(c,2),s=l[0],o=l[1],t.currentFileList=o,t.rightPanelItemList=s;case 8:case"end":return i.stop()}}),i)})))()},toggleCheck:function(e){var t=this.selectedKeyMap;if("file"===e.nodeType)this.selectedKeyMap=Object(s["a"])(Object(s["a"])({},t),{},Object(l["a"])({},e.id,!t[e.id]));else{var i=[],n=!0;F(e.children,(function(e){i.push(e.id),n=n&&t[e.id]}));var c=i.reduce((function(e,t){return e[t]=!n,e}),{});this.selectedKeyMap=Object(s["a"])(Object(s["a"])({},t),c)}},recoverFiles:function(e){var t=this;return Object(o["a"])(regeneratorRuntime.mark((function i(){var n,c,l;return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return t.fileMenuKey=void 0,n=t.selectedProject,c=e?[e]:Object.keys(t.selectedKeyMap).filter((function(e){return t.selectedKeyMap[e]})),i.next=5,t.$fetchApi("file/removeFromRecycleBin",{Ids:c});case 5:if(l=i.sent,Object(O["c"])(l),0===l.Code){i.next=9;break}return i.abrupt("return");case 9:P["d"].success("文件已放回原处"),t.fetchProjectRemovedFiles(n.id);case 11:case"end":return i.stop()}}),i)})))()},copyFiles:function(){var e=this;return Object(o["a"])(regeneratorRuntime.mark((function t(){var i,n,c,l,a,o,r,d;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return i=e.currentFileList,n=e.selectedKeyMap,c=e.choosedNode,l=c.id,a=c.levelId,o=c.projId,r=i.reduce((function(e,t){if(!n[t.id])return e;var i=Object(s["a"])(Object(s["a"])({},t),{},{folderId:l,folderLevelId:a,projId:o});return delete i.id,e.push(Object(P["c"])(i)),e}),[]),t.next=5,e.$fetchApi("file/batchAddFile",{ProjArchiveTbs:r});case 5:if(d=t.sent,Object(O["c"])(d),0===d.Code){t.next=9;break}return t.abrupt("return");case 9:P["d"].success("文件拷贝成功"),e.fetchProjectRemovedFiles(e.selectedProject.id),e.chooseNodeModalVisible=!1;case 12:case"end":return t.stop()}}),t)})))()}}};function w(e,t){var i=t.split("/");i.forEach((function(t,n){var c=i.slice(0,n+1).join("/");if(!e[c]){var l=new x["d"](c);l.children=[],l.nodeType="folder";var s=l.parentFolderPath;e[c]=l,e[s]&&e[s].children.push(l)}}))}function F(e,t){e.forEach((function(e){"file"!==e.nodeType?F(e.children,t):t(e)}))}function N(e,t){var i={},n=[];return e.forEach((function(e){var c=Object(P["b"])(e);if(c.nodeType="file",c.nodeFolderName=t,c.nodeFolderName){var l="".concat(c.nodeFolderName).concat(c.relativePath?"/".concat(c.relativePath):"");w(i,l);var s=i[l];s.children.push(c)}else n.push(c)})),Object.values(i).forEach((function(e){e.parentFolderPath||n.push(e),e.children=e.children.filter((function(e){return"file"===e.nodeType})).concat(e.children.filter((function(e){return"file"!==e.nodeType})))})),n}var K=M,I=(i("cf4b"),Object(h["a"])(K,n,c,!1,null,"3b55464e",null));t["default"]=I.exports},cf4b:function(e,t,i){"use strict";var n=i("08ea"),c=i.n(n);c.a},d371:function(e,t,i){"use strict";var n=i("9b81"),c=i.n(n);c.a},d4ec:function(e,t,i){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}i.d(t,"a",(function(){return n}))},ee71:function(e,t,i){}}]);
|