You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
8.6 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

"use strict";(self["webpackChunkagile_portal_front"]=self["webpackChunkagile_portal_front"]||[]).push([[479],{35479:(e,t,a)=>{a.r(t),a.d(t,{default:()=>p});var l=function(){var e=this,t=e._self._c;return t("div",{staticClass:"lab-apply"},[t("div",{staticClass:"btn-group",staticStyle:{"text-align":"right","margin-bottom":"10px"}},[t("el-button",{attrs:{type:"primary",size:"mini"},on:{click:e.handleImport}},[e._v("新增")])],1),t("div",{staticClass:"tale-list"},[t("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{"min-height":"355px","max-height":"500px"},attrs:{stripe:"",data:e.myLablyList,"max-height":"500px"}},[t("div",{staticStyle:{"text-align":"left"},attrs:{slot:"empty"},slot:"empty"},[t("el-empty",{attrs:{description:"暂无数据"}})],1),t("el-table-column",{attrs:{align:"center",label:"文件名称",prop:"fileName","show-overflow-tooltip":!0}}),t("el-table-column",{attrs:{align:"center",label:"上传时间",prop:"createTime","show-overflow-tooltip":!0}}),t("el-table-column",{attrs:{align:"center",label:"文件大小",prop:"fileSize","show-overflow-tooltip":!0},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",[e._v(e._s(e.convertFileSize(a.row.fileSize)))])]}}])}),t("el-table-column",{attrs:{align:"center",label:"文件说明",prop:"remarks","show-overflow-tooltip":!0}}),t("el-table-column",{attrs:{align:"center",label:"文件类型",prop:"fileType","show-overflow-tooltip":!0},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",[e._v(e._s("data"==a.row.fileType?"数据文件":"python组件"))])]}}])}),t("el-table-column",{attrs:{align:"center",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(a){return["01"!=a.row.reviewStatus?t("el-button",{attrs:{size:"small",type:"text"},on:{click:function(t){return e.handleDelete(a.row)}}},[e._v("删除")]):e._e()]}}])})],1)],1),t("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total > 0"}],attrs:{total:e.total,page:e.queryParams.pageNum,limit:e.queryParams.pageSize},on:{"update:page":function(t){return e.$set(e.queryParams,"pageNum",t)},"update:limit":function(t){return e.$set(e.queryParams,"pageSize",t)},pagination:e.getList}}),t("el-dialog",{attrs:{title:e.upload.title,visible:e.upload.open,width:"500px","append-to-body":"","close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(t){return e.$set(e.upload,"open",t)}}},[t("el-form",{ref:"uploadform",attrs:{model:e.upload,rules:e.uploadrules,"label-width":"80px"}},[t("el-row",[t("el-col",{attrs:{span:24}},[t("el-form-item",{attrs:{label:"组件类型",prop:"upData.fileType"}},[t("el-select",{attrs:{placeholder:"请选择组件类型"},on:{change:e.fileTypefn},model:{value:e.upload.upData.fileType,callback:function(t){e.$set(e.upload.upData,"fileType",t)},expression:"upload.upData.fileType"}},e._l(e.fileTypeList,(function(e){return t("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1)],1),t("el-col",{attrs:{span:24}},[t("el-form-item",{attrs:{label:"内容说明",prop:"upData.remarks"}},[t("el-input",{attrs:{type:"textarea",placeholder:"请输入内容说明"},model:{value:e.upload.upData.remarks,callback:function(t){e.$set(e.upload.upData,"remarks",t)},expression:"upload.upData.remarks"}})],1)],1)],1)],1),t("el-upload",{ref:"upload",staticStyle:{"text-align":"center"},attrs:{limit:1,accept:e.upload.accept,headers:e.upload.headers,action:"",disabled:e.upload.isUploading,"on-change":e.beforeUpload,"on-success":e.handleFileSuccess,"auto-upload":!1,"http-request":e.uploadSectionFile,"on-remove":e.removeFile,drag:""}},[t("i",{staticClass:"el-icon-upload"}),t("div",{staticClass:"el-upload__text"},[e._v("将文件拖到此处,或"),t("em",[e._v("点击上传")])])]),t("div",{staticClass:"dialog-footer",staticStyle:{"text-align":"right"},attrs:{slot:"footer"},slot:"footer"},[t("el-button",{attrs:{type:"primary"},on:{click:e.submitFileForm}},[e._v("确 定")]),t("el-button",{on:{click:function(t){e.upload.open=!1}}},[e._v("取 消")])],1)],1)],1)},o=[],r=(a(9653),a(56977),a(68309),a(94986),a(82772),a(32900));const i={name:"MyData",data:function(){return{loading:!0,total:0,myLablyList:[],fileTypeList:[{value:"python",label:"python组件"},{value:"data",label:"数据文件"}],upload:{open:!1,title:"",isUploading:!1,updateSupport:0,accept:".zip,.tar,.gz,.bz2",upData:{fileType:"python",fileSourceType:"dockerlib"}},queryParams:{pageNum:1,pageSize:10},formdata:null,uploadrules:{upData:{fileType:[{required:!0,message:"不能为空",trigger:"blur"}],remarks:[{required:!0,message:"不能为空",trigger:"blur"}]}}}},created:function(){this.getList()},methods:{getList:function(){var e=this;(0,r.Hc)(this.queryParams).then((function(t){e.myLablyList=t.rows,e.total=t.total,e.loading=!1}))},handleImport:function(){this.upload.title="用户导入",this.upload.open=!0},fileTypefn:function(e){"python"==e?this.upload.accept=".zip,.tar,.gz,.bz2":"data"==e&&(this.upload.accept=".zip,.tar,.gz,.csv,.txt,.xls,.xlsx")},convertFileSize:function(e){if(void 0!=e){var t=Number(e)/1024,a=t/1024,l=a/1024;return l>=1?l.toFixed(2)+" GB":a>=1?a.toFixed(2)+" MB":t>=1?t.toFixed(2)+" KB":Number(e).toFixed(2)+" B"}},removeFile:function(e,t){this.$refs.upload.clearFiles()},beforeUpload:function(e){var t=104857600;if(e&&e.size>t)return alert("文件大小超过限制请选择小于100MB的文件。"),void this.$refs.upload.clearFiles();var a,l=e.name.substring(e.name.lastIndexOf(".")+1);return"python"==this.upload.upData.fileType?a=["zip","tar","gz","bz2"]:"data"==this.upload.upData.fileType&&(a=["zip","tar","gz","csv","txt","xls","xlsx"]),-1===a.indexOf(l)?(this.$modal.msgWarning("上传文件只能是"+this.upload.accept+"格式"),!1):void 0},uploadSectionFile:function(e){var t=e.file,a=new FormData;a.append("file",t),a.append("fileType",this.upload.upData.fileType),a.append("fileSourceType",this.upload.upData.fileSourceType),a.append("remarks",this.upload.upData.remarks),this.formdata=a,(0,r.cT)(this.formdata).then((function(t){e.onSuccess(t)}))["catch"]((function(e){e.err}))},handleFileSuccess:function(e,t,a){200==e.code&&(this.upload.open=!1,this.$refs.upload.clearFiles(),this.getList())},submitFileForm:function(){var e=this;this.$refs["uploadform"].validate((function(t){t&&e.$refs.upload.submit()}))},handleDelete:function(e){var t=this,a=e.fileId;this.$confirm("确认要删除这条信息吗?").then((function(){return(0,r._I)(a)})).then((function(){t.$message({type:"success",message:"删除成功!"}),t.getList()}))["catch"]((function(){}))}}},n=i;var s=a(43736),u=(0,s.Z)(n,l,o,!1,null,"0d318eb8",null);const p=u.exports},32900:(e,t,a)=>{a.d(t,{Cp:()=>Z,F7:()=>k,Hc:()=>v,Ht:()=>s,JE:()=>g,W1:()=>m,WG:()=>i,_I:()=>w,aX:()=>o,bL:()=>_,c0:()=>L,cT:()=>x,d5:()=>r,e_:()=>h,en:()=>u,fR:()=>n,in:()=>S,jr:()=>b,oK:()=>f,qS:()=>d,rK:()=>y,uN:()=>c,ur:()=>p});var l=a(73821);function o(e){return(0,l.Z)({url:"/myApply/laboratoryList",method:"get",params:e})}function r(e){return(0,l.Z)({url:"/myApply/laboratoryDetail?reviewId="+e,method:"get"})}function i(e){return(0,l.Z)({url:"/myApply/exportList",method:"get",params:e})}function n(e){return(0,l.Z)({url:"/myApply/download",method:"get",params:e})}function s(e){return(0,l.Z)({url:"/myLab/list",method:"get",params:e})}function u(e){return(0,l.Z)({url:"/myLab/info?applyId="+e,method:"get"})}function p(e){return(0,l.Z)({url:"/myLab/restart",method:"post",data:e})}function d(e){return(0,l.Z)({url:"/myLab/dataInjection",method:"post",data:e})}function c(e){return(0,l.Z)({url:"/myLab/fileList?applyId="+e,method:"get"})}function m(e){return(0,l.Z)({url:"/myLab/applyDown",method:"post",data:e})}function f(e){return(0,l.Z)({url:"/api/userApiList",method:"get",params:e})}function h(e){return(0,l.Z)({url:"/api/userApiStatisticsList",method:"get",params:e})}function y(e){return(0,l.Z)({url:"/myMessage/page",method:"get",params:e})}function g(e){return(0,l.Z)({url:"/myMessage/detail?msgId="+e,method:"post"})}function b(e){return(0,l.Z)({url:"myMessage/markRead",method:"post",data:e})}function v(e){return(0,l.Z)({url:"/myResources/list",method:"get",params:e})}function x(e){return(0,l.Z)({url:"/myResources/uploadFile",method:"post",data:e,headers:{"Content-Type":"multipart/form-data"}})}function w(e){return(0,l.Z)({url:"/myResources/delete?fileId="+e,method:"delete"})}function S(e){return(0,l.Z)({url:"/rePwd/getPhoneByUser?username="+e,method:"get"})}function _(){return(0,l.Z)({url:"/rePwd/sendPhoneCode",method:"get"})}function k(e){return(0,l.Z)({url:"/rePwd/verifyPhoneCode?phoneCode="+e,method:"get"})}function L(e){return(0,l.Z)({url:"/rePwd/reset",method:"post",data:e})}function Z(e){return(0,l.Z)({url:"/changePassword",method:"post",data:e})}}}]);