|
|
"use strict";(self["webpackChunkagile_portal_front"]=self["webpackChunkagile_portal_front"]||[]).push([[201],{7201:(e,t,a)=>{a.r(t),a.d(t,{default:()=>p});a(82772),a(73210);var l=function(){var e=this,t=e._self._c;return t("div",{staticClass:"lab-apply"},[t("div",{staticClass:"top-filter"},[t("el-form",{ref:"queryForm",attrs:{model:e.queryParams,size:"small","label-width":"82px",inline:!0}},[t("el-form-item",{attrs:{label:"实验室名称",prop:"labTitle"}},[t("el-input",{attrs:{clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery.apply(null,arguments)}},model:{value:e.queryParams.labTitle,callback:function(t){e.$set(e.queryParams,"labTitle",t)},expression:"queryParams.labTitle"}})],1),t("el-form-item",{attrs:{label:"实验室编号",prop:"applyId"}},[t("el-input",{attrs:{clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery.apply(null,arguments)}},model:{value:e.queryParams.applyId,callback:function(t){e.$set(e.queryParams,"applyId",t)},expression:"queryParams.applyId"}})],1),t("el-form-item",{attrs:{label:"实验室状态",prop:"busStatus"}},[t("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:e.queryParams.busStatus,callback:function(t){e.$set(e.queryParams,"busStatus","string"===typeof t?t.trim():t)},expression:"queryParams.busStatus"}},e._l(e.busStatusList,(function(e){return t("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),t("el-form-item",[t("el-button",{attrs:{type:"primary",size:"mini"},on:{click:e.handleQuery}},[e._v("搜索")]),t("el-button",{attrs:{size:"mini"},on:{click:e.resetQuery}},[e._v("重置")])],1)],1)],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:{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:"applyId","show-overflow-tooltip":!0,width:"180"}}),t("el-table-column",{attrs:{align:"center",label:"实验室名称",prop:"labTitle","show-overflow-tooltip":!0}}),t("el-table-column",{attrs:{align:"center",label:"状态","show-overflow-tooltip":!0},scopedSlots:e._u([{key:"default",fn:function(a){return["01"===a.row.busStatus?t("span",{staticClass:"review-status"},[t("i",{staticClass:"icon-circle green"}),e._v(e._s(e.busStatusspan(a.row.busStatus))+" ")]):t("span",{staticClass:"review-status"},[t("i",{staticClass:"icon-circle red"}),e._v(e._s(e.busStatusspan(a.row.busStatus))+" ")])]}}])}),t("el-table-column",{attrs:{align:"center",label:"生效时间",prop:"startDate","show-overflow-tooltip":!0},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",[e._v(e._s(e.parseTime(a.row.startDate,"{y}-{m}-{d}")))])]}}])}),t("el-table-column",{attrs:{align:"center",label:"到期时间",prop:"endDate","show-overflow-tooltip":!0},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",[e._v(e._s(e.parseTime(a.row.endDate,"{y}-{m}-{d}")))])]}}])}),t("el-table-column",{attrs:{align:"center",label:"硬件资源",prop:"dockerImageName","show-overflow-tooltip":!0},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",[e._v(" "+e._s("CPU:"+a.row.cpuLimits+";内存:"+a.row.memoryLimits+"G;硬盘:"+a.row.discLimits+"G")+" ")])]}}])}),t("el-table-column",{attrs:{align:"center",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-button",{attrs:{size:"small",type:"text"},on:{click:function(t){return e.goLabDetail(a.row.applyId)}}},[e._v("详情")]),"01"===a.row.busStatus?t("el-dropdown",{attrs:{size:"mini"},on:{command:function(t){return e.handleCommands(t,a.row)}}},[t("span",{staticClass:"el-dropdown-link",staticStyle:{color:"#409EFF",cursor:"pointer"}},[t("i",{staticClass:"el-icon-d-arrow-right el-icon--right"}),e._v("更多 ")]),t("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[t("el-dropdown-item",{attrs:{command:"myResourcesList"}},[e._v(" 数据注入 ")]),t("el-dropdown-item",{attrs:{command:"myfileList"}},[e._v(" 申请下载 ")]),t("el-dropdown-item",{attrs:{command:"restart"}},[e._v(" 重启 ")])],1)],1):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:"选中资源",visible:e.visible,width:"800px",top:"5vh","append-to-body":"","close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(t){e.visible=t}}},[t("el-form",{ref:"queryForm",attrs:{model:e.queryParamss,size:"small",inline:!0}},[t("el-form-item",{attrs:{label:"文件类型",prop:"fileType"}},[t("el-select",{attrs:{placeholder:"请选择组件类型"},on:{change:e.myResourcesLists},model:{value:e.queryParamss.fileType,callback:function(t){e.$set(e.queryParamss,"fileType",t)},expression:"queryParamss.fileType"}},e._l(e.fileTypeList,(function(e){return t("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),t("el-form-item",[t("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"mini"},on:{click:e.handleQuerys}},[e._v("查询")])],1)],1),t("el-row",[t("el-table",{ref:"table",attrs:{data:e.resourcesList,height:"260px"},on:{"row-click":e.clickRow,"selection-change":e.handleSelectionChange}},[t("div",{staticStyle:{"text-align":"center"},attrs:{slot:"empty"},slot:"empty"},[e._v("暂无数据 ")]),t("el-table-column",{attrs:{align:"center",type:"selection",width:"55"}}),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:"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组件"))])]}}])})],1),t("pagination",{directives:[{name:"show",rawName:"v-show",value:e.totals>0,expression:"totals > 0"}],attrs:{total:e.totals,page:e.queryParamss.pageNum,limit:e.queryParamss.pageSize},on:{"update:page":function(t){return e.$set(e.queryParamss,"pageNum",t)},"update:limit":function(t){return e.$set(e.queryParamss,"pageSize",t)},pagination:e.myResourcesLists}})],1),t("el-form",{ref:"applyform",attrs:{"label-width":"80px",model:e.resourcesForm,rules:e.rules}},[t("el-row",[t("el-col",{attrs:{span:24}},[t("el-form-item",{attrs:{label:"申请说明",prop:"applyDesc"}},[t("el-input",{attrs:{maxlength:200,type:"textarea",placeholder:"请输入内容"},model:{value:e.resourcesForm.applyDesc,callback:function(t){e.$set(e.resourcesForm,"applyDesc",t)},expression:"resourcesForm.applyDesc"}})],1)],1)],1)],1),t("div",{staticClass:"dialog-footer",staticStyle:{"text-align":"right"},attrs:{slot:"footer"},slot:"footer"},[t("el-button",{attrs:{type:"primary"},on:{click:e.handleSelectUser}},[e._v("确 定")]),t("el-button",{on:{click:function(t){e.visible=!1}}},[e._v("取 消")])],1)],1),t("el-dialog",{attrs:{title:"申请下载",visible:e.open,width:"800px",top:"5vh","append-to-body":"","close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(t){e.open=t}}},[t("el-row",[t("el-col",{attrs:{span:24}},[t("el-table",{ref:"filetable",attrs:{data:e.filetableList,height:"260px"}},[t("div",{staticStyle:{"text-align":"center"},attrs:{slot:"empty"},slot:"empty"},[e._v("暂无数据 ")]),t("el-table-column",{attrs:{align:"center",label:"文件名称",prop:"fileName","show-overflow-tooltip":!0}}),t("el-table-column",{attrs:{align:"center",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-button",{attrs:{size:"small",type:"text"},on:{click:function(t){return e.fileCk(a.row)}}},[e._v("申请")])]}}])})],1)],1)],1),t("el-dialog",{attrs:{width:"30%",title:"申请说明",visible:e.opens,"append-to-body":"","close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(t){e.opens=t}}},[t("el-form",{ref:"fileForm",attrs:{"label-width":"80px",model:e.fileForm}},[t("el-row",[t("el-col",{attrs:{span:24}},[t("el-form-item",{attrs:{label:"申请说明",prop:"applyDesc"}},[t("el-input",{attrs:{maxlength:200,type:"textarea",placeholder:"请输入内容"},model:{value:e.fileForm.applyDesc,callback:function(t){e.$set(e.fileForm,"applyDesc",t)},expression:"fileForm.applyDesc"}})],1)],1)],1)],1),t("div",{staticClass:"dialog-footer",staticStyle:{"text-align":"right"},attrs:{slot:"footer"},slot:"footer"},[t("el-button",{attrs:{type:"primary"},on:{click:e.handlefile}},[e._v("确 定")]),t("el-button",{on:{click:function(t){e.opens=!1}}},[e._v("取 消")])],1)],1)],1)],1)},s=[],r=(a(69826),a(41539),a(21249),a(32900));const o={name:"myLab",data:function(){return{loading:!0,total:0,myLablyList:[],queryParams:{pageNum:1,pageSize:10},busStatusList:[{label:"运行中",value:"01"},{label:"到期结束",value:"02"},{label:"强制结束",value:"03"},{label:"已禁用",value:"04"},{label:"已销毁",value:"05"},{label:"销毁处理中",value:"06"},{label:"重新初始化中",value:"07"},{label:"错误",value:"08"}],visible:!1,open:!1,opens:!1,filetotal:0,filetableList:[],fileForm:{applyDesc:""},fileTypeList:[{value:"python",label:"python组件"},{value:"data",label:"数据文件"}],totals:0,resourcesList:[],resourcesForm:{applyDesc:""},fileQueryParams:{pageNum:1,pageSize:10},queryParamss:{pageNum:1,pageSize:10},rules:{applyDesc:[{required:!0,message:"不能为空",trigger:"blur"}]}}},created:function(){this.getList()},methods:{busStatusspan:function(e){var t=this.busStatusList,a=t.find((function(t){return t.value==e}));return a?a.label:null},getList:function(){var e=this;this.loading=!0,(0,r.Ht)(this.queryParams).then((function(t){e.myLablyList=t.rows,e.total=t.total,e.loading=!1}))},handleQuery:function(){this.queryParams.pageNum=1,this.getList()},resetQuery:function(){this.resetForm("queryForm"),this.handleQuery()},loginUrl:function(e){window.open(e,"_blank")},goLabDetail:function(e){this.$router.push("/user/myapply/myLabDetail/"+e)},clickRow:function(e){this.$refs.table.toggleRowSelection(e)},handleQuerys:function(){this.queryParamss.pageNum=1,this.myResourcesLists()},handleCommands:function(e,t){switch(e){case"myResourcesList":this.myResourcesList(t);break;case"myfileList":this.myfileList(t);break;case"restart":this.restart(t);break;default:break}},myResourcesLists:function(){var e=this;(0,r.Hc)(this.queryParamss).then((function(t){e.resourcesList=t.rows,e.totals=t.total,e.loading=!1}))},myResourcesList:function(e){this.visible=!0,this.resourcesForm.applyDesc="",this.resourcesForm.applyId=e.applyId,this.resourcesForm.recToken=e.recToken,this.myResourcesLists()},handleSelectionChange:function(e){this.resourcesForm.fileIds=e.map((function(e){return e.fileId}))},handleSelectUser:function(){var e=this;console.log(this.resourcesForm),this.$refs["applyform"].validate((function(t){t&&(0,r.qS)(e.resourcesForm).then((function(t){e.visible=!1,e.$message({type:"success",message:"数据注入成功!"}),e.getList()}))}))},myfileList:function(e){var t=this;this.open=!0,this.fileForm.applyId=e.applyId,this.fileForm.recToken=e.recToken,(0,r.uN)(e.applyId).then((function(e){t.filetableList=e.data,t.loading=!1}))},fileCk:function(e){this.fileForm.fileName=e.fileName,this.fileForm.applyDesc="",this.opens=!0},handlefile:function(){var e=this;(0,r.W1)(this.fileForm).then((function(t){e.$message({type:"success",message:"申请成功,等待审核!"}),e.open=!1,e.opens=!1,e.getList()}))},restart:function(e){var t=this,a={applyId:e.applyId,recToken:e.recToken};this.loading=!0,(0,r.ur)(a).then((function(e){t.loading=!1,t.$message({type:"success",message:"重启成功!"}),t.getList()}))["catch"]((function(e){e.err;t.loading=!1}))}}},i=o;var n=a(43736),u=(0,n.Z)(i,l,s,!1,null,"34b17d1d",null);const p=u.exports},32900:(e,t,a)=>{a.d(t,{Cp:()=>x,F7:()=>S,Hc:()=>v,Ht:()=>n,JE:()=>b,W1:()=>d,WG:()=>o,_I:()=>k,aX:()=>s,bL:()=>_,c0:()=>P,cT:()=>w,d5:()=>r,e_:()=>y,en:()=>u,fR:()=>i,in:()=>L,jr:()=>g,oK:()=>f,qS:()=>c,rK:()=>h,uN:()=>m,ur:()=>p});var l=a(73821);function s(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 o(e){return(0,l.Z)({url:"/myApply/exportList",method:"get",params:e})}function i(e){return(0,l.Z)({url:"/myApply/download",method:"get",params:e})}function n(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 c(e){return(0,l.Z)({url:"/myLab/dataInjection",method:"post",data:e})}function m(e){return(0,l.Z)({url:"/myLab/fileList?applyId="+e,method:"get"})}function d(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 y(e){return(0,l.Z)({url:"/api/userApiStatisticsList",method:"get",params:e})}function h(e){return(0,l.Z)({url:"/myMessage/page",method:"get",params:e})}function b(e){return(0,l.Z)({url:"/myMessage/detail?msgId="+e,method:"post"})}function g(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 w(e){return(0,l.Z)({url:"/myResources/uploadFile",method:"post",data:e,headers:{"Content-Type":"multipart/form-data"}})}function k(e){return(0,l.Z)({url:"/myResources/delete?fileId="+e,method:"delete"})}function L(e){return(0,l.Z)({url:"/rePwd/getPhoneByUser?username="+e,method:"get"})}function _(){return(0,l.Z)({url:"/rePwd/sendPhoneCode",method:"get"})}function S(e){return(0,l.Z)({url:"/rePwd/verifyPhoneCode?phoneCode="+e,method:"get"})}function P(e){return(0,l.Z)({url:"/rePwd/reset",method:"post",data:e})}function x(e){return(0,l.Z)({url:"/changePassword",method:"post",data:e})}}}]); |