webpackJsonp([86],{"qH+w":function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={data:function(){return{dataForm:{key:"",fileName:"",devType:"",fileType:8},dataList:[],pageIndex:1,pageSize:10,totalPage:0,dataListLoading:!1,dataListSelections:[],addOrUpdateVisible:!1}},components:{AddOrUpdate:a("fJuf").default},activated:function(){this.getDataList()},methods:{getDataList:function(){var e=this;this.dataListLoading=!0,this.$http({url:this.$http.adornUrl("/file/tfile/list"),method:"get",params:this.$http.adornParams({page:this.pageIndex,limit:this.pageSize,key:this.dataForm.key,fileName:this.dataForm.fileName,fileType:this.dataForm.fileType})}).then(function(t){var a=t.data;a&&0===a.code?(e.dataList=a.page.list,e.totalPage=a.page.totalCount):(e.dataList=[],e.totalPage=0),e.dataListLoading=!1})},sizeChangeHandle:function(e){this.pageSize=e,this.pageIndex=1,this.getDataList()},currentChangeHandle:function(e){this.pageIndex=e,this.getDataList()},selectionChangeHandle:function(e){this.dataListSelections=e},addOrUpdateHandle:function(e){var t=this;this.addOrUpdateVisible=!0,this.$nextTick(function(){t.$refs.addOrUpdate.init(e)})},getUrl:function(e){return this.$http.adornUrl("/static"+e)},deleteHandle:function(e){var t=this,a=e?[e]:this.dataListSelections.map(function(e){return e.id});this.$confirm(this.$t("confirmDelete"),this.$t("tips"),{confirmButtonText:this.$t("message.confirm"),cancelButtonText:this.$t("message.cancel"),type:"warning"}).then(function(){t.$http({url:t.$http.adornUrl("/file/tfile/delete"),method:"post",data:t.$http.adornData(a,!1)}).then(function(e){var a=e.data;a&&0===a.code?t.$message({message:t.$t("message.success"),type:"success",duration:1500,onClose:function(){t.getDataList()}}):t.$message.error(a.msg)})})}}},i={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"mod-config"},[a("el-form",{attrs:{inline:!0,model:e.dataForm},nativeOn:{keyup:function(t){if(!("button"in t)&&e._k(t.keyCode,"enter",13,t.key,"Enter"))return null;e.getDataList()}}},[a("el-form-item",{attrs:{label:e.$t("fileName")}},[a("el-input",{attrs:{placeholder:e.$t("fileName"),clearable:""},model:{value:e.dataForm.fileName,callback:function(t){e.$set(e.dataForm,"fileName",t)},expression:"dataForm.fileName"}})],1),e._v(" "),a("el-form-item",[a("el-button",{on:{click:function(t){e.getDataList()}}},[e._v(e._s(e.$t("query")))]),e._v(" "),e.isAuth("file:tfile-jyyj:save")?a("el-button",{attrs:{type:"primary"},on:{click:function(t){e.addOrUpdateHandle()}}},[e._v(e._s(e.$t("add")))]):e._e(),e._v(" "),e.isAuth("file:tfile-jyyj:delete")?a("el-button",{attrs:{type:"danger",disabled:e.dataListSelections.length<=0},on:{click:function(t){e.deleteHandle()}}},[e._v(e._s(e.$t("batchDelete")))]):e._e()],1)],1),e._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.dataListLoading,expression:"dataListLoading"}],staticStyle:{width:"100%"},attrs:{data:e.dataList,border:""},on:{"selection-change":e.selectionChangeHandle}},[a("el-table-column",{attrs:{type:"selection","header-align":"center",align:"center",width:"50"}}),e._v(" "),a("el-table-column",{attrs:{prop:"fileName","header-align":"center",align:"center",label:e.$t("fileName")}}),e._v(" "),a("el-table-column",{attrs:{prop:"fileType","header-align":"center",align:"center",label:e.$t("fileType")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(e.getDictValue("file_type",t.row.fileType)))])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"deptName","header-align":"center",align:"center",label:e.$t("department")}}),e._v(" "),a("el-table-column",{attrs:{prop:"createTime","header-align":"center",align:"center",label:e.$t("uploadTime")}}),e._v(" "),a("el-table-column",{attrs:{prop:"createUserName","header-align":"center",align:"center",label:e.$t("founder")}}),e._v(" "),a("el-table-column",{attrs:{prop:"remark","header-align":"center",align:"center",label:e.$t("remark")}}),e._v(" "),a("el-table-column",{attrs:{fixed:"right","header-align":"center",align:"center",width:"150",label:e.$t("action")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("a",{staticClass:"download",staticStyle:{"margin-right":"10px"},attrs:{href:e.getUrl(t.row.fileUrl),download:"",target:"_blank",title:"下载"}},[e._v(e._s(e.$t("download")))]),e._v(" "),e.isAuth("file:tfile-jyyj:delete")?a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){e.deleteHandle(t.row.id)}}},[e._v(e._s(e.$t("delete")))]):e._e()]}}])})],1),e._v(" "),a("el-pagination",{attrs:{"current-page":e.pageIndex,"page-sizes":[10,20,50,100],"page-size":e.pageSize,total:e.totalPage,layout:"total, sizes, prev, pager, next, jumper"},on:{"size-change":e.sizeChangeHandle,"current-change":e.currentChangeHandle}}),e._v(" "),e.addOrUpdateVisible?a("add-or-update",{ref:"addOrUpdate",on:{refreshDataList:e.getDataList}}):e._e()],1)},staticRenderFns:[]},l=a("VU/8")(n,i,!1,null,null,null);t.default=l.exports}});