chunk-9bb531c0.881373fc.js 8.5 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-9bb531c0","chunk-2d0f009b"],{"7f4a":function(e,t,o){"use strict";o.r(t);var n=o("7a23"),c=Object(n["withScopeId"])("data-v-5384144b");Object(n["pushScopeId"])("data-v-5384144b");var i={class:"ele-body"},r=Object(n["createTextVNode"])("卷内文件调整 ");Object(n["popScopeId"])();var a=c((function(e,t,o,a,s,l){var d=Object(n["resolveComponent"])("a-button"),u=Object(n["resolveComponent"])("ele-pro-table"),h=Object(n["resolveComponent"])("a-card"),b=Object(n["resolveComponent"])("file-sort");return Object(n["openBlock"])(),Object(n["createBlock"])("div",i,[Object(n["createVNode"])(h,{bordered:!1},{default:c((function(){return[Object(n["createVNode"])(u,{ref:"table",title:"案卷列表","row-key":"piece_no",datasource:s.url,columns:s.columns,selection:s.selection,"onUpdate:selection":t[1]||(t[1]=function(e){return s.selection=e}),scroll:{x:"max-content"}},{toolkit:c((function(){return[Object(n["createVNode"])(d,{type:"primary",onClick:l.openFileSort},{default:c((function(){return[r]})),_:1},8,["onClick"])]})),_:1},8,["datasource","columns","selection"])]})),_:1}),Object(n["createVNode"])(b,{visible:s.showFileSort,"onUpdate:visible":t[2]||(t[2]=function(e){return s.showFileSort=e}),documents:s.fileSortChoose},null,8,["visible","documents"])])})),s=(o("fb6a"),o("9b51")),l={name:"ExampleDocument",components:{FileSort:s["default"]},data:function(){var e=this;return{url:"https://cdn.eleadmin.com/20200610/document.json",columns:[{key:"index",customRender:function(t){var o=t.index;return e.$refs.table.tableIndex+o}},{title:"案卷档号",dataIndex:"piece_no",sorter:!0},{title:"案卷题名",dataIndex:"title",sorter:!0},{title:"年度",dataIndex:"year",sorter:!0},{title:"保管期限",dataIndex:"retention",sorter:!0},{title:"密级",dataIndex:"secret",sorter:!0},{title:"档案类别",dataIndex:"type",sorter:!0},{title:"载体规格",dataIndex:"carrier",sorter:!0}],selection:[],showFileSort:!1,fileSortChoose:[]}},methods:{openFileSort:function(){this.selection.length<2?this.$message.error("请至少选择两条数据"):(this.fileSortChoose=this.$refs.table.data.slice(0,3),this.showFileSort=!0)}}},d=o("6b0d"),u=o.n(d);const h=u()(l,[["render",a],["__scopeId","data-v-5384144b"]]);t["default"]=h},"9b51":function(e,t,o){"use strict";o.r(t);var n=o("7a23"),c=Object(n["withScopeId"])("data-v-74f713d3");Object(n["pushScopeId"])("data-v-74f713d3");var i=Object(n["createTextVNode"])("上移"),r=Object(n["createTextVNode"])("下移"),a=Object(n["createTextVNode"])("调出"),s=Object(n["createTextVNode"])("调入");Object(n["popScopeId"])();var l=c((function(e,t,o,l,d,u){var h=Object(n["resolveComponent"])("ele-pro-table"),b=Object(n["resolveComponent"])("a-col"),p=Object(n["resolveComponent"])("arrow-up-outlined"),f=Object(n["resolveComponent"])("a-button"),m=Object(n["resolveComponent"])("arrow-down-outlined"),v=Object(n["resolveComponent"])("arrow-right-outlined"),O=Object(n["resolveComponent"])("a-space"),j=Object(n["resolveComponent"])("arrow-left-outlined"),g=Object(n["resolveComponent"])("a-row"),x=Object(n["resolveComponent"])("a-modal");return Object(n["openBlock"])(),Object(n["createBlock"])(x,{width:1200,visible:o.visible,title:"卷内文件调整","onUpdate:visible":u.updateVisible,onCancel:u.close,onOk:u.save},{default:c((function(){return[Object(n["createVNode"])(g,{gutter:16},{default:c((function(){return[Object(n["createVNode"])(b,{lg:8,md:24,sm:24,xs:24},{default:c((function(){return[Object(n["createVNode"])(h,{bordered:"",ref:"docTable","row-key":"piece_no","sub-title":"案卷列表",columns:d.columns1,datasource:o.documents,current:d.current,"onUpdate:current":t[1]||(t[1]=function(e){return d.current=e}),scroll:{x:"max-content"},"row-selection":{columnWidth:48},"tool-style":{padding:"7px 14px"},"tools-theme":"default","need-page":!1,toolkit:[]},null,8,["columns","datasource","current"])]})),_:1}),Object(n["createVNode"])(b,{lg:8,md:24,sm:24,xs:24},{default:c((function(){return[Object(n["createVNode"])(h,{bordered:"",ref:"fileTable",loading:d.loading,"sub-title":"卷内列表",datasource:u.data1,columns:d.columns2,"row-key":"archive_no","tools-theme":"default",scroll:{x:"max-content"},selection:d.selection1,"onUpdate:selection":t[2]||(t[2]=function(e){return d.selection1=e}),"row-selection":{columnWidth:48},"need-page":!1,toolkit:[]},{toolkit:c((function(){return[Object(n["createVNode"])(O,null,{default:c((function(){return[Object(n["createVNode"])(f,{onClick:u.moveUp,type:"primary",class:"ele-btn-icon"},{default:c((function(){return[Object(n["createVNode"])("span",null,[Object(n["createVNode"])(p),i])]})),_:1},8,["onClick"]),Object(n["createVNode"])(f,{type:"primary",class:"ele-btn-icon",onClick:u.moveDown},{default:c((function(){return[Object(n["createVNode"])("span",null,[Object(n["createVNode"])(m),r])]})),_:1},8,["onClick"]),Object(n["createVNode"])(f,{type:"primary",class:"ele-btn-icon",onClick:u.moveOut},{default:c((function(){return[Object(n["createVNode"])("span",null,[a,Object(n["createVNode"])(v)])]})),_:1},8,["onClick"])]})),_:1})]})),_:1},8,["loading","datasource","columns","selection"])]})),_:1}),Object(n["createVNode"])(b,{lg:8,md:24,sm:24,xs:24},{default:c((function(){return[Object(n["createVNode"])(h,{bordered:"",loading:d.loading,datasource:u.data2,columns:d.columns2,"sub-title":"未归档列表","row-key":"archive_no","tools-theme":"default",scroll:{x:"max-content"},selection:d.selection2,"onUpdate:selection":t[3]||(t[3]=function(e){return d.selection2=e}),"row-selection":{columnWidth:48},"need-page":!1,toolkit:[]},{toolkit:c((function(){return[Object(n["createVNode"])(f,{type:"primary",class:"ele-btn-icon",onClick:u.moveIn},{default:c((function(){return[Object(n["createVNode"])("span",null,[Object(n["createVNode"])(j),s])]})),_:1},8,["onClick"])]})),_:1},8,["loading","datasource","columns","selection"])]})),_:1})]})),_:1})]})),_:1},8,["visible","onUpdate:visible","onCancel","onOk"])})),d=(o("4de4"),o("159b"),o("d81d"),o("e180")),u=o("9af8"),h=o("1cd4"),b=o("083e"),p={name:"FileSort",components:{ArrowUpOutlined:d["a"],ArrowDownOutlined:u["a"],ArrowLeftOutlined:h["a"],ArrowRightOutlined:b["a"]},props:{visible:Boolean,documents:{type:Array,required:!0}},emits:["update:visible"],data:function(){return{columns1:[{title:"案卷题名",dataIndex:"title"},{title:"案卷档号",dataIndex:"piece_no"}],columns2:[{title:"文件题名",dataIndex:"title"},{title:"文件档号",dataIndex:"archive_no"}],data:[],current:null,loading:!0,selection1:[],selection2:[]}},computed:{data1:function(){var e=this;return this.current?this.data.filter((function(t){return t.piece_no===e.current.piece_no})):[]},data2:function(){return this.data.filter((function(e){return!e.piece_no}))}},methods:{query:function(){var e=this;this.loading=!0,this.$http.get("https://cdn.eleadmin.com/20200610/archive.json").then((function(t){e.loading=!1,0===t.data.code?(e.data=t.data.data,e.current=e.documents[0]):e.$message.error(t.data.msg)})).catch((function(t){e.loading=!1,e.$message.error(t.message)}))},moveUp:function(){if(this.selection1.length){if(this.selection1.length>1)this.$message.error("只能选择一条数据");else if(0!==this.data1.indexOf(this.selection1[0])){var e=this.data.indexOf(this.selection1[0]),t=this.data[e-1];this.data[e-1]=this.selection1[0],this.data[e]=t,this.selection1=[this.data[e-1]]}}else this.$message.error("请选择一条数据")},moveDown:function(){if(this.selection1.length){if(this.selection1.length>1)this.$message.error("只能选择一条数据");else if(this.data1.indexOf(this.selection1[0])!==this.data1.length-1){var e=this.data.indexOf(this.selection1[0]),t=this.data[e+1];this.data[e+1]=this.selection1[0],this.data[e]=t,this.selection1=[this.data[e+1]]}}else this.$message.error("请选择一条数据")},moveOut:function(){this.selection1.length?(this.selection1.forEach((function(e){e.piece_no=""})),this.selection1=[]):this.$message.error("请至少选择一条数据")},moveIn:function(){var e=this;this.current&&(this.selection2.length?(this.selection2.forEach((function(t){t.piece_no=e.current.piece_no})),this.selection2=[]):this.$message.error("请至少选择一条数据"))},save:function(){var e=this.data.map((function(e){return{archive_no:e.archive_no,piece_no:e.piece_no}}));console.log(e),this.$message.success("调整成功"),this.close()},close:function(){this.data=[],this.selection1=[],this.selection2=[],this.updateVisible(!1)},updateVisible:function(e){this.$emit("update:visible",e)}},watch:{visible:function(){this.visible&&this.query()},current:function(){this.selection1=[]}}},f=o("6b0d"),m=o.n(f);const v=m()(p,[["render",l],["__scopeId","data-v-74f713d3"]]);t["default"]=v}}]);