chunk-321dee2b.8b2e1822.js 37 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-321dee2b"],{"04af":function(e,t,o){"use strict";o("6d13")},"0e72":function(e,t,o){"use strict";o("d7d3")},"134f":function(e,t,o){"use strict";o("62eb")},"15e8":function(e,t,o){"use strict";o("3952")},"1acf":function(e,t,o){"use strict";o("a1cd")},"1de3":function(e,t,o){"use strict";o("8e76")},2243:function(e,t,o){e.exports={color_0:"#000",color_1:"#111",color_2:"#222",color_3:"#333",color_4:"#444",color_5:"#555",color_6:"#666",color_7:"#777",color_8:"#888",color_9:"#999",color_a:"#aaa",color_b:"#bbb",color_c:"#ccc",color_d:"#ddd",color_e:"#eee",color_f2:"#f2f2f2",color_f5:"#f5f5f5",color_fa:"#fafafa",color_fc:"#fcfcfc",color_f:"#fff",color_on:"#F66420",pad:"20px"}},"24c4":function(e,t,o){e.exports=o.p+"static/img/tank.91ef2a6d.jpg"},"28d3":function(e,t,o){"use strict";o("2243")},"340a":function(e,t,o){"use strict";o("57e0")},"370f":function(e,t,o){},3952:function(e,t,o){},"4d7f":function(e,t,o){e.exports={color_0:"#000",color_1:"#111",color_2:"#222",color_3:"#333",color_4:"#444",color_5:"#555",color_6:"#666",color_7:"#777",color_8:"#888",color_9:"#999",color_a:"#aaa",color_b:"#bbb",color_c:"#ccc",color_d:"#ddd",color_e:"#eee",color_f2:"#f2f2f2",color_f5:"#f5f5f5",color_fa:"#fafafa",color_fc:"#fcfcfc",color_f:"#fff",color_on:"#F66420",pad:"20px"}},"57e0":function(e,t,o){},"587e":function(e,t,o){"use strict";o("8690")},"62eb":function(e,t,o){e.exports={color_0:"#000",color_1:"#111",color_2:"#222",color_3:"#333",color_4:"#444",color_5:"#555",color_6:"#666",color_7:"#777",color_8:"#888",color_9:"#999",color_a:"#aaa",color_b:"#bbb",color_c:"#ccc",color_d:"#ddd",color_e:"#eee",color_f2:"#f2f2f2",color_f5:"#f5f5f5",color_fa:"#fafafa",color_fc:"#fcfcfc",color_f:"#fff",color_on:"#F66420",pad:"20px"}},"6d13":function(e,t,o){},"7e2d":function(e,t,o){"use strict";var n=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",[o("transition",{attrs:{name:"marsk-fade"}},[o("div",{directives:[{name:"show",rawName:"v-show",value:e.toastConfig.isShow,expression:"toastConfig.isShow"}],staticClass:"marsk"})]),e._v(" "),o("transition",{attrs:{name:"slide-fade"}},[o("div",{directives:[{name:"show",rawName:"v-show",value:e.toastConfig.isShow,expression:"toastConfig.isShow"}],class:["action-toast",e.toastConfig.center?"center":""]},[o("p",[e._v(e._s(e.toastConfig.message))]),e._v(" "),o("div",{staticClass:"button-group"},[o("el-button",{attrs:{type:"danger",size:"mini",round:""},nativeOn:{click:function(t){return t.preventDefault(),e.sure(t)}}},[e._v("确定")]),e._v(" "),e.toastConfig.showCancel?o("el-button",{attrs:{type:"info",size:"mini",round:""},nativeOn:{click:function(t){return t.preventDefault(),e.cancel(t)}}},[e._v("取消")]):e._e()],1)])])],1)},s=[],i={name:"Toast",props:{toastConfig:{isShow:{type:Boolean,default:function(){return!1}},showCancel:{type:Boolean,default:function(){return!1}},center:{type:Boolean,default:function(){return!1}},message:{type:String,default:function(){return""}}}},methods:{sure:function(){this.$emit("putToast",!0)},cancel:function(){this.$emit("putToast",!1)}}},a=i,r=(o("1acf"),o("bbf7"),o("2877")),l=Object(r["a"])(a,n,s,!1,null,"6632f172",null);t["a"]=l.exports},"81ea":function(e,t,o){"use strict";o("370f")},"85be":function(e,t,o){"use strict";var n=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("el-dialog",{attrs:{title:"上链信息",visible:e.chainInfoConfig.isShow,width:"500px"},on:{"update:visible":function(t){return e.$set(e.chainInfoConfig,"isShow",t)}}},[o("div",{staticClass:"chain-info"},[o("div",{staticClass:"item"},[o("p",[e._v("文件名称:")]),e._v(" "),o("span",[e._v(e._s(e.chainInfoConfig.infoData.fileName))])]),e._v(" "),o("div",{staticClass:"item"},[o("p",[e._v("文件哈希:")]),e._v(" "),o("span",[e._v(e._s(e.chainInfoConfig.infoData.hashCode))])]),e._v(" "),o("div",{staticClass:"item"},[o("p",[e._v("区块地址:")]),e._v(" "),o("span",[e._v(e._s(e.chainInfoConfig.infoData.blockAddr))])]),e._v(" "),o("div",{staticClass:"item"},[o("p",[e._v("区块高度:")]),e._v(" "),o("span",[e._v(e._s(e.chainInfoConfig.infoData.blockHeight))])]),e._v(" "),o("div",{staticClass:"item"},[o("p",[e._v("上链时间:")]),e._v(" "),o("span",[e._v(e._s(e.formatTime(e.chainInfoConfig.infoData.blockTimeStamp)))])]),e._v(" "),o("div",{staticClass:"item"},[o("p",[e._v("时间戳:")]),e._v(" "),o("span",[e._v(e._s(e.chainInfoConfig.infoData.blockTimeStamp))])]),e._v(" "),o("div",{staticClass:"item"},[o("p",[e._v("资产ID:")]),e._v(" "),o("span",[e._v(e._s(e.chainInfoConfig.infoData.blockAssertId))])]),e._v(" "),o("div",{staticClass:"item"},[o("p",[e._v("事务ID:")]),e._v(" "),o("span",[e._v(e._s(e.chainInfoConfig.infoData.blockTxid))])])]),e._v(" "),o("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[o("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.close}},[e._v("确 定")])],1)])},s=[],i=o("ed08"),a={name:"ChainInfo",props:{chainInfoConfig:{isShow:{type:Boolean,default:function(){return!1}},infoData:{type:Object,default:function(){}}}},data:function(){return{}},created:function(){},methods:{close:function(){this.$emit("putChainInfo",!1)},formatTime:function(e){return Object(i["e"])(e)}}},r=a,l=(o("db06"),o("2877")),c=Object(l["a"])(r,n,s,!1,null,"7ceb95a3",null);t["a"]=c.exports},8690:function(e,t,o){},"8e76":function(e,t,o){e.exports={color_0:"#000",color_1:"#111",color_2:"#222",color_3:"#333",color_4:"#444",color_5:"#555",color_6:"#666",color_7:"#777",color_8:"#888",color_9:"#999",color_a:"#aaa",color_b:"#bbb",color_c:"#ccc",color_d:"#ddd",color_e:"#eee",color_f2:"#f2f2f2",color_f5:"#f5f5f5",color_fa:"#fafafa",color_fc:"#fcfcfc",color_f:"#fff",color_on:"#F66420",pad:"20px"}},"950e":function(e,t,o){e.exports={color_0:"#000",color_1:"#111",color_2:"#222",color_3:"#333",color_4:"#444",color_5:"#555",color_6:"#666",color_7:"#777",color_8:"#888",color_9:"#999",color_a:"#aaa",color_b:"#bbb",color_c:"#ccc",color_d:"#ddd",color_e:"#eee",color_f2:"#f2f2f2",color_f5:"#f5f5f5",color_fa:"#fafafa",color_fc:"#fcfcfc",color_f:"#fff",color_on:"#F66420",pad:"20px"}},"97a9":function(e,t,o){e.exports=o.p+"static/img/tyre.34fa5164.jpg"},"9a2c":function(e,t,o){"use strict";var n=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",[o("transition",{attrs:{name:"marsk-fade"}},[o("div",{directives:[{name:"show",rawName:"v-show",value:e.fileListConfig.isShow,expression:"fileListConfig.isShow"}],staticClass:"marsk"})]),e._v(" "),o("transition",{attrs:{name:"slide-fade"}},[o("div",{directives:[{name:"show",rawName:"v-show",value:e.fileListConfig.isShow,expression:"fileListConfig.isShow"}],staticClass:"action-limit"},[o("div",{staticClass:"title"},[o("p",[e._v("\n "+e._s("upchain"==e.fileListConfig.operationType?"文件上链":"download"==e.fileListConfig.operationType?"文件下载":"文件列表")+"\n ")]),e._v(" "),o("div",{staticClass:"operation"},[o("i",{staticClass:"el-icon-circle-close",on:{click:e.close}})])]),e._v(" "),o("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"table",attrs:{stripe:"",size:"small",height:"250px",data:e.fileListConfig.fileList,"element-loading-text":"拼命加载中","row-class-name":e.tableRowClassName},on:{"selection-change":e.selectionChange}},[o("el-table-column",{attrs:{type:"selection",width:"50"}}),e._v(" "),e._l(e.headerData,(function(t,n){return o("el-table-column",{key:n,attrs:{align:"center",prop:t.prop,label:t.label,sortable:t.sortable,width:"index"==t.prop?60:""},scopedSlots:e._u([{key:"default",fn:function(n){return["fileState"==t.prop?o("span",{attrs:{slot:"content"},slot:"content"},[e._v(e._s(e.getState(n.row[t.prop])))]):"operation"==t.prop&&"2"!=n.row["fileState"]?o("span",{attrs:{slot:"content"},slot:"content"},[e._v("--")]):"operation"==t.prop&&"2"==n.row["fileState"]?o("span",{staticClass:"operation",attrs:{slot:"content"},on:{click:function(t){return e.viewChainInfo(n.row)}},slot:"content"},[e._v("查看上链信息")]):o("span",{attrs:{slot:"content",title:n.row[t.prop]},slot:"content"},[e._v(e._s(n.row[t.prop]))])]}}],null,!0)})}))],2),e._v(" "),o("div",{staticClass:"btn-group"},[o("el-button",{staticClass:"next-btn",attrs:{type:"danger",size:"small"},nativeOn:{click:function(t){return t.preventDefault(),e.close(t)}}},[e._v("关闭")]),e._v(" "),o("el-button",{staticClass:"next-btn",attrs:{type:"success",size:"small"},nativeOn:{click:function(t){return t.preventDefault(),e.refresh(t)}}},[e._v("刷新")]),e._v(" "),"download"!=e.fileListConfig.operationType&&"2"==e.fileListConfig.solverState?o("el-button",{staticClass:"next-btn",attrs:{type:"primary",size:"small"},nativeOn:{click:function(t){return t.preventDefault(),e.upChain(t)}}},[e._v("上链")]):e._e(),e._v(" "),"upchain"!=e.fileListConfig.operationType&&"2"==e.fileListConfig.solverState?o("el-button",{staticClass:"next-btn",attrs:{type:"info",size:"small"},nativeOn:{click:function(t){return t.preventDefault(),e.download(t)}}},[e._v("下载")]):e._e()],1)],1)])],1)},s=[],i=(o("6b54"),o("96cf"),o("1da1")),a=o("ed08"),r=o("b775"),l={name:"FileList",props:{fileListConfig:{isShow:{type:Boolean,default:function(){return!1}},operationType:{type:String,default:function(){return"file"}},projectId:{type:String,default:function(){return""}},solverState:{type:String,default:function(){return""}},solverNum:{type:String,default:function(){return""}},fileList:{type:Array,default:function(){return[]}}}},data:function(){return{loading:!1,headerData:[],checkedIdList:[],checkedUrlList:[]}},created:function(){this.addHeader()},inject:["getFile"],methods:{addHeader:function(){var e=[];e.push({label:"序号",prop:"index"}),e.push({label:"文件名",prop:"fileName"}),e.push({label:"文件hash",prop:"hashCode"}),e.push({label:"上链状态",prop:"fileState"}),e.push({label:"上链详情",prop:"operation"}),this.headerData=e},close:function(){this.fileListConfig.fileList=[],this.checkedIdList=[],this.checkedUrlList=[],this.$emit("putFileList",!1)},refresh:function(){this.fileListConfig.fileList="",this.getFile()},getState:function(e){return Object(a["g"])(e)},tableRowClassName:function(e,t){return 1==e.row.operation?"selected":""},selectionChange:function(e){var t=this;this.fileListConfig.fileList.map((function(e){e.operation=!1})),this.checkedIdList=[],this.checkedUrlList=[],e.map((function(e){t.checkedIdList.push(e.fileId),t.checkedUrlList.push(e.fileUrl),t.fileListConfig.fileList.map((function(t){e.fileId==t.fileId&&(t.operation=!0)}))}))},viewChainInfo:function(e){this.$emit("putFileList",e)},upChain:function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(){var t,o=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!(this.checkedIdList.length<=0)){e.next=2;break}return e.abrupt("return",this.$message.error("请选择需要上链项!"));case 2:t={transCode:"C00034",projectId:this.fileListConfig.projectId,fileIds:this.checkedIdList.toString()},Object(r["e"])(t).then((function(e){o.$message.success("已申请上链!"),o.getFile()})).catch((function(e){}));case 4:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),formatTime:function(e){return Object(a["e"])(e)},download:function(){if(this.checkedUrlList.length<=0)return this.$message.error("请选择需要下载的文件!");this.checkedUrlList.map((function(e,t){var o=document.createElement("a");o.target="_blank",o.style.display="none",o.href=e,document.body.appendChild(o),o.click(),setTimeout((function(){document.body.removeChild(o)}),500)}))}}},c=l,p=(o("15e8"),o("134f"),o("2877")),f=Object(p["a"])(c,n,s,!1,null,"430045bc",null);t["a"]=f.exports},"9c75":function(e,t,o){"use strict";o("bc4f")},a1cd:function(e,t,o){},a7f2:function(e,t,o){e.exports=o.p+"static/img/car.799b1757.jpg"},ab60:function(e,t,o){"use strict";o("4d7f")},b4b4:function(e,t,o){},b4cf:function(e,t,o){e.exports=o.p+"static/img/frame.5e1b5e77.jpg"},b77e:function(e,t,o){"use strict";o.r(t);var n,s=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"details"},[o("div",{staticClass:"container"},[o("h3",[e._v("项目详情")]),e._v(" "),o("div",{staticClass:"image"},[o("img",{staticClass:"image-project",attrs:{src:"hcfd"==e.data.projectType?e.mode:"fem"==e.data.projectType?e.tyre:e.tank,alt:"project"}})]),e._v(" "),o("div",{staticClass:"info"},[o("p",{staticClass:"title"},[e.data.projectType?o("span",{staticClass:"projectType"},[e._v("[ "+e._s(e.data.projectType)+" ] ")]):e._e(),e._v(e._s(e.data.projectName)+"\n ")]),e._v(" "),o("p",{staticClass:"desc"},[e._v(e._s(e.data.projectDesc))]),e._v(" "),o("div",{staticClass:"user-time"},[o("p",[o("i",{staticClass:"el-icon-s-custom"}),e._v(" "+e._s(e.data.userName))]),e._v(" "),o("p",[o("span",[e._v("创建于"+e._s(e.formatTime(e.data.createTime)))])])]),e._v(" "),o("div",{staticClass:"btn-group"},[o("el-button",{attrs:{type:"primary"},nativeOn:{click:function(t){return t.preventDefault(),e.getFile(t)}}},[e._v("文件列表")]),e._v(" "),1!=e.userType&&1!=e.data.resApplyState&&2!=e.data.resApplyState?o("el-button",{attrs:{type:"primary"},nativeOn:{click:function(t){return t.preventDefault(),e.Apply(t)}}},[e._v("申请资源")]):e._e(),e._v(" "),0!=e.data.resApplyState?o("el-button",{attrs:{type:"primary"},nativeOn:{click:function(t){return t.preventDefault(),e.Applying(t)}}},[e._v(e._s(1==e.data.resApplyState?"资源申请中":"查看资源"))]):e._e(),e._v(" "),1!=e.userType&&2==e.data.resApplyState?o("el-button",{attrs:{type:"primary"},nativeOn:{click:function(t){return t.preventDefault(),e.Continue(t)}}},[e._v("续用资源")]):e._e(),e._v(" "),1!=e.userType&&2==e.data.resApplyState?o("el-button",{attrs:{type:"danger"},nativeOn:{click:function(t){return t.preventDefault(),e.Release(e.data.projectName)}}},[e._v("释放资源")]):e._e(),e._v(" "),1==e.userType&&1==e.data.resApplyState?o("el-button",{attrs:{type:"primary"},nativeOn:{click:function(t){return t.preventDefault(),e.getDeployList("deploy")}}},[e._v("分配资源")]):e._e(),e._v(" "),1!=e.userType?o("el-button",{attrs:{type:"warning"},nativeOn:{click:function(t){return t.preventDefault(),e.toSolver()}}},[e._v("进入求解器")]):e._e()],1)])]),e._v(" "),o("Toast",{attrs:{"toast-config":e.toastConfig},on:{putToast:e.getToast}}),e._v(" "),o("FileList",{attrs:{"file-list-config":e.fileListConfig},on:{putFileList:e.getFileList}}),e._v(" "),o("ChainInfo",{attrs:{"chain-info-config":e.chainInfoConfig},on:{putChainInfo:e.getChainInfo}}),e._v(" "),o("ApplyResource",{attrs:{"apply-config":e.applyConfig},on:{putApply:e.getApply}}),e._v(" "),o("Applying",{attrs:{"applying-config":e.applyingConfig},on:{putApplying:e.getApplying}}),e._v(" "),o("ContinueResource",{attrs:{"continue-config":e.continueConfig},on:{putContinue:e.getContinue}}),e._v(" "),o("Deploy",{attrs:{"deploy-config":e.deployConfig},on:{putDeploy:e.getDeploy}})],1)},i=[],a=(o("7f7f"),o("a7f2")),r=o.n(a),l=o("b4cf"),c=o.n(l),p=o("da98"),f=o.n(p),u=o("bafc"),d=o.n(u),_=o("24c4"),y=o.n(_),v=o("97a9"),m=o.n(v),g=o("7e2d"),h=o("9a2c"),C=o("85be"),b=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",[o("transition",{attrs:{name:"marsk-fade"}},[o("div",{directives:[{name:"show",rawName:"v-show",value:e.applyConfig.isShow,expression:"applyConfig.isShow"}],staticClass:"marsk"})]),e._v(" "),o("transition",{attrs:{name:"slide-fade"}},[o("div",{directives:[{name:"show",rawName:"v-show",value:e.applyConfig.isShow,expression:"applyConfig.isShow"}],staticClass:"action-limit"},[o("div",{staticClass:"title"},[o("p",[e._v("申请资源")]),e._v(" "),o("div",{staticClass:"operation"},[o("i",{staticClass:"el-icon-circle-close",on:{click:e.close}})])]),e._v(" "),o("el-form",{ref:"applyForm",staticClass:"apply",attrs:{model:e.applyForm,rules:e.rules,"label-width":"120px","label-position":"left"}},[o("el-form-item",{attrs:{label:"选择资源类型",prop:"resType"}},[o("el-select",{attrs:{size:"mini",placeholder:"请选择"},on:{change:e.getDeploy},model:{value:e.applyForm.resType,callback:function(t){e.$set(e.applyForm,"resType",t)},expression:"applyForm.resType"}},e._l(e.typeList,(function(e){return o("el-option",{key:e.value,attrs:{value:e.value,label:e.label}})})),1)],1),e._v(" "),2==e.applyConfig.userType?o("el-form-item",{attrs:{label:"申请资源数量",prop:"resCount"}},[o("el-input",{attrs:{size:"mini",type:"number",placeholder:"请填写资源数量"},model:{value:e.applyForm.resCount,callback:function(t){e.$set(e.applyForm,"resCount",t)},expression:"applyForm.resCount"}},[o("span",{staticClass:"solt",attrs:{slot:"suffix"},slot:"suffix"},[e._v("台")])])],1):e._e(),e._v(" "),o("el-form-item",{attrs:{label:"资源使用时长",prop:"resUsePeriod"}},[o("el-input",{attrs:{size:"mini",type:"number",placeholder:"请填写资源时长"},model:{value:e.applyForm.resUsePeriod,callback:function(t){e.$set(e.applyForm,"resUsePeriod",t)},expression:"applyForm.resUsePeriod"}},[o("span",{staticClass:"solt",attrs:{slot:"suffix"},slot:"suffix"},[e._v("小时")])])],1),e._v(" "),2==e.applyConfig.userType?o("el-form-item",{attrs:{label:"资源使用说明"}},[o("el-input",{attrs:{type:"textarea",size:"mini",autosize:{minRows:3,maxRows:5},resize:"none",placeholder:"请填写资源使用说明"},model:{value:e.applyForm.resUseInfo,callback:function(t){e.$set(e.applyForm,"resUseInfo",t)},expression:"applyForm.resUseInfo"}})],1):e._e(),e._v(" "),2!=e.applyConfig.userType?o("el-transfer",{attrs:{data:e.applyConfig.resList,titles:["可分配资源","预分配资源"]},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.option;return o("span",{},[o("el-tooltip",{attrs:{placement:"top",content:"Top center"}},[o("div",{attrs:{slot:"content"},slot:"content"},[o("p",[e._v("\n 截止时间:"),o("span",[e._v(e._s(e.formatTime(n.label.split(",")[2])))])]),e._v(" "),o("p",[e._v("\n 规       格:"),o("span",[e._v(e._s(n.label.split(",")[1]))])])]),e._v(" "),o("span",[e._v(e._s(n.label.split(",")[0]))])])],1)}}],null,!1,2739890760),model:{value:e.resIds,callback:function(t){e.resIds=t},expression:"resIds"}}):e._e()],1),e._v(" "),o("div",{staticClass:"btn-group"},[o("el-button",{staticClass:"next-btn",attrs:{type:"danger",size:"small"},nativeOn:{click:function(t){return t.preventDefault(),e.sure(t)}}},[e._v("提交申请")])],1)],1)])],1)},w=[],I=(o("6b54"),o("b775")),S=o("ed08"),T={name:"ApplyResource",props:{applyConfig:{isShow:{type:Boolean,default:function(){return!1}},projectId:{type:String,default:function(){return""}},userType:{type:String,default:function(){return""}},resList:{type:Array,default:function(){return[]}}}},data:function(){var e=function(e,t,o){t?/(^[1-9]\d*$)/.test(t)&&-1==t.toString().indexOf(".")?o():o(new Error("资源数量只能是正整数!")):o(new Error("请输入资源数量!"))},t=function(e,t,o){t?/(^[1-9]\d*$)/.test(t)&&-1==t.toString().indexOf(".")?o():o(new Error("资源时长只能是正整数!")):o(new Error("请输入资源时长!"))};return{applyForm:{resType:"0",resCount:"1",resUsePeriod:"24",resUseInfo:""},rules:{resType:[{required:!0,message:"请选择资源类型",trigger:"change"}],resCount:[{required:!0,trigger:"blur",validator:e}],resUsePeriod:[{required:!0,trigger:"blur",validator:t}],productDesc:[{required:!0,message:"请输入作品说明",trigger:"blur"}]},typeList:[{value:"0",label:"通用"}],resIds:[]}},methods:{close:function(){this.applyForm={resType:"0",resCount:"1",resUsePeriod:"24",resUseInfo:""},this.resIds=[],this.$emit("putApply",!1)},getDeploy:function(e){var t=this,o={transCode:"C00024",state:"1",type:e,name:"",page:1,count:-1};Object(I["e"])(o).then((function(e){var o=[];e.rows.map((function(e,t){o.push({key:e.resId,label:"".concat(e.name,",").concat(e.capacity,",").concat(e.endtime)})})),t.applyConfig={isShow:!0,projectId:t.projectId,userType:t.userType,resList:o}})).catch((function(e){}))},sure:function(){var e=this;this.$refs.applyForm.validate((function(t){if(!t)return!1;var o={transCode:"C00025",projectId:e.applyConfig.projectId,resType:e.applyForm.resType,resCount:2!=e.applyConfig.userType?e.resIds.length.toString():e.applyForm.resCount,resUsePeriod:e.applyForm.resUsePeriod,resUseInfo:e.applyForm.resUseInfo};2!=e.applyConfig.userType&&(o.resIds=e.resIds.toString()),Object(I["e"])(o).then((function(t){e.$message.success("已申请使用 ".concat(2!=e.applyConfig.userType?e.resIds.length:e.applyForm.resCount," 台资源 ").concat(e.applyForm.resUsePeriod," 小时,请等待审核!")),e.applyForm={resType:"0",resCount:"1",resUsePeriod:"24",resUseInfo:""},e.resIds=[],e.$emit("putApply",e.applyConfig)})).catch((function(e){}))}))},formatTime:function(e){return Object(S["e"])(e)}}},j=T,x=(o("587e"),o("28d3"),o("2877")),F=Object(x["a"])(j,b,w,!1,null,"5bc93083",null),k=F.exports,A=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",[o("transition",{attrs:{name:"marsk-fade"}},[o("div",{directives:[{name:"show",rawName:"v-show",value:e.applyingConfig.isShow,expression:"applyingConfig.isShow"}],staticClass:"marsk"})]),e._v(" "),o("transition",{attrs:{name:"slide-fade"}},[o("div",{directives:[{name:"show",rawName:"v-show",value:e.applyingConfig.isShow,expression:"applyingConfig.isShow"}],staticClass:"action-limit"},[o("div",{staticClass:"title"},[o("p",[e._v("资源申请信息")]),e._v(" "),o("div",{staticClass:"operation"},[o("i",{staticClass:"el-icon-circle-close",on:{click:e.close}})])]),e._v(" "),o("div",{staticClass:"desc"},[o("p",[e._v("\n 申请状态:\n "),o("span",[e._v(e._s(e.getState(e.applyingConfig.resApplyState)))])]),e._v(" "),o("p",[e._v("\n 申请时间: "),o("span",[e._v(e._s(e.formatTime(e.applyingConfig.resApplyTime)))])]),e._v(" "),o("p",[e._v("\n 申请类型: "),o("span",[e._v(e._s(e.getType(e.applyingConfig.resType)))])]),e._v(" "),o("p",[e._v("\n 申请数量: "),o("span",[e._v(e._s(e.applyingConfig.resCount)+" 台")])]),e._v(" "),o("p",[e._v("\n 申请时长:\n "),o("span",[e._v(e._s(e.applyingConfig.resApplyPeriod)+" 小时")])]),e._v(" "),e.applyingConfig.resAuditTime?o("p",[e._v("\n 审核时间:\n "),o("span",[e._v(e._s(e.formatTime(e.applyingConfig.resAuditTime)))])]):e._e(),e._v(" "),e.applyingConfig.resAuditRejectInfo?o("p",[e._v("\n 审核信息:\n "),o("span",[e._v(e._s(e.applyingConfig.resAuditRejectInfo))])]):e._e(),e._v(" "),2==e.applyingConfig.resApplyState?o("p",[e._v("\n 可用时间:\n "),o("span",[e._v(e._s(e.formatTime(e.applyingConfig.resStartTime))+" ~\n "+e._s(e.formatTime(e.applyingConfig.resEndTime)))])]):e._e(),e._v(" "),2==e.applyingConfig.resApplyState?o("p",[e._v("\n 可用资源:\n "),o("span",[e._v(e._s(e.applyingConfig.resUseNums))])]):e._e(),e._v(" "),e.applyingConfig.resUseInfo?o("p",[e._v("\n 申请说明: "),o("span",[e._v(e._s(e.applyingConfig.resUseInfo))])]):e._e()]),e._v(" "),o("div",{staticClass:"btn-group"},[o("el-button",{staticClass:"next-btn",attrs:{type:"danger",size:"small"},nativeOn:{click:function(t){return t.preventDefault(),e.sure(t)}}},[e._v("确定")])],1)])])],1)},L=[],U=o("ade3"),D={name:"ApplyResource",props:{applyingConfig:(n={isShow:{type:Boolean,default:function(){return!1}},resApplyState:{type:String,default:function(){return""}},resType:{type:String,default:function(){return""}},resCount:{type:String,default:function(){return""}},resApplyPeriod:{type:String,default:function(){return""}},resUseInfo:{type:String,default:function(){return""}},resApplyTime:{type:String,default:function(){return""}}},Object(U["a"])(n,"resApplyTime",{type:String,default:function(){return""}}),Object(U["a"])(n,"resAuditTime",{type:String,default:function(){return""}}),Object(U["a"])(n,"resAuditRejectInfo",{type:String,default:function(){return""}}),Object(U["a"])(n,"resStartTime",{type:String,default:function(){return""}}),Object(U["a"])(n,"resEndTime",{type:String,default:function(){return""}}),Object(U["a"])(n,"resUseNums",{type:String,default:function(){return""}}),n)},data:function(){return{}},methods:{close:function(){this.$emit("putApplying",!1)},sure:function(){this.close()},getType:function(e){return Object(S["d"])(e)},getState:function(e){return Object(S["b"])(e)},formatTime:function(e){return Object(S["e"])(e)}}},O=D,$=(o("f82a"),o("0e72"),Object(x["a"])(O,A,L,!1,null,"7020e28c",null)),R=$.exports,N=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",[o("transition",{attrs:{name:"marsk-fade"}},[o("div",{directives:[{name:"show",rawName:"v-show",value:e.continueConfig.isShow,expression:"continueConfig.isShow"}],staticClass:"marsk"})]),e._v(" "),o("transition",{attrs:{name:"slide-fade"}},[o("div",{directives:[{name:"show",rawName:"v-show",value:e.continueConfig.isShow,expression:"continueConfig.isShow"}],staticClass:"action-limit"},[o("div",{staticClass:"title"},[o("p",[e._v("续用资源")]),e._v(" "),o("div",{staticClass:"operation"},[o("i",{staticClass:"el-icon-circle-close",on:{click:e.close}})])]),e._v(" "),o("el-form",{ref:"applyForm",staticClass:"apply",attrs:{model:e.applyForm,rules:e.rules,"label-width":"120px","label-position":"left"}},[o("el-form-item",{attrs:{label:"资源续用时长",prop:"resUsePeriod"}},[o("el-input",{attrs:{size:"mini",type:"number",placeholder:"请填写续用时长"},model:{value:e.applyForm.resUsePeriod,callback:function(t){e.$set(e.applyForm,"resUsePeriod",t)},expression:"applyForm.resUsePeriod"}},[o("span",{staticClass:"solt",attrs:{slot:"suffix"},slot:"suffix"},[e._v("小时")])])],1),e._v(" "),o("el-form-item",{attrs:{label:"资源续用说明"}},[o("el-input",{attrs:{type:"textarea",size:"mini",autosize:{minRows:3,maxRows:5},resize:"none",placeholder:"请填写资源续用说明"},model:{value:e.applyForm.resUseInfo,callback:function(t){e.$set(e.applyForm,"resUseInfo",t)},expression:"applyForm.resUseInfo"}})],1)],1),e._v(" "),o("div",{staticClass:"btn-group"},[o("el-button",{staticClass:"next-btn",attrs:{type:"danger",size:"small"},nativeOn:{click:function(t){return t.preventDefault(),e.sure(t)}}},[e._v("提交申请")])],1)],1)])],1)},P=[],z={name:"ContinueResource",props:{continueConfig:{isShow:{type:Boolean,default:function(){return!1}},resApplyId:{type:String,default:function(){return""}}}},data:function(){var e=function(e,t,o){t?/(^[1-9]\d*$)/.test(t)&&-1==t.toString().indexOf(".")?o():o(new Error("资源时长只能是正整数!")):o(new Error("请输入资源时长!"))};return{applyForm:{resUsePeriod:"24",resUseInfo:""},rules:{resUsePeriod:[{required:!0,trigger:"blur",validator:e}],productDesc:[{required:!0,message:"请输入作品说明",trigger:"blur"}]}}},methods:{close:function(){this.applyForm={resUsePeriod:"24",resUseInfo:""},this.$emit("putContinue",!1)},sure:function(){var e=this;this.$refs.applyForm.validate((function(t){if(!t)return!1;var o={transCode:"C00027",applyResId:e.continueConfig.resApplyId,resUsePeriod:e.applyForm.resUsePeriod,resUseInfo:e.applyForm.resUseInfo};Object(I["e"])(o).then((function(t){e.$message.success("已申请续用资源 ".concat(e.applyForm.resUsePeriod," 小时,请等待审核!")),e.applyForm={resUsePeriod:"24",resUseInfo:""},e.$emit("putContinue",e.continueConfig)})).catch((function(e){}))}))}}},E=z,B=(o("81ea"),o("9c75"),Object(x["a"])(E,N,P,!1,null,"4a895722",null)),q=B.exports,H=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",[o("transition",{attrs:{name:"marsk-fade"}},[o("div",{directives:[{name:"show",rawName:"v-show",value:e.deployConfig.isShow,expression:"deployConfig.isShow"}],staticClass:"marsk"})]),e._v(" "),o("transition",{attrs:{name:"slide-fade"}},[o("div",{directives:[{name:"show",rawName:"v-show",value:e.deployConfig.isShow,expression:"deployConfig.isShow"}],staticClass:"action-limit"},[o("div",{staticClass:"title"},[o("p",[e._v("分配资源")]),e._v(" "),o("div",{staticClass:"operation"},[o("i",{staticClass:"el-icon-circle-close",on:{click:e.close}})])]),e._v(" "),o("el-form",{ref:"applyForm",staticClass:"apply",attrs:{model:e.applyForm,rules:e.rules,"label-width":"120px","label-position":"left"}},[o("p",{staticClass:"tips"},[o("span",[e._v(e._s(e.deployConfig.userName))]),e._v("申请使用"),o("span",[e._v(e._s(e.deployConfig.resCount))]),e._v("台"),o("span",[e._v(e._s(e.getType(e.deployConfig.resType)))]),e._v("资源"),o("span",[e._v(e._s(e.deployConfig.resApplyPeriod))]),e._v("小时,用于"),o("span",[e._v(e._s(e.deployConfig.projectName))]),e._v("项目,请您分配资源!\n ")]),e._v(" "),o("el-form-item",{attrs:{label:"是否分配资源:"}},[o("el-radio-group",{on:{change:e.getRadio},model:{value:e.applyForm.applyResState,callback:function(t){e.$set(e.applyForm,"applyResState",t)},expression:"applyForm.applyResState"}},[o("el-radio",{attrs:{label:"2"}},[e._v("分配")]),e._v(" "),o("el-radio",{attrs:{label:"3"}},[e._v("不分配")])],1)],1),e._v(" "),3==e.applyForm.applyResState?o("el-form-item",{attrs:{label:"不分配说明:",prop:"rejectInfo"}},[o("el-input",{attrs:{type:"textarea",size:"mini",autosize:{minRows:3,maxRows:5},resize:"none",placeholder:"请填写不分配资源说明"},model:{value:e.applyForm.rejectInfo,callback:function(t){e.$set(e.applyForm,"rejectInfo",t)},expression:"applyForm.rejectInfo"}})],1):e._e(),e._v(" "),2==e.applyForm.applyResState?o("el-transfer",{attrs:{data:e.deployConfig.resList,titles:["可分配资源","预分配资源"]},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.option;return o("span",{},[o("el-tooltip",{attrs:{placement:"top",content:"Top center"}},[o("div",{attrs:{slot:"content"},slot:"content"},[o("p",[e._v("\n 截止时间:"),o("span",[e._v(e._s(e.formatTime(n.label.split(",")[2])))])]),e._v(" "),o("p",[e._v("\n 规       格:"),o("span",[e._v(e._s(n.label.split(",")[1]))])])]),e._v(" "),o("span",[e._v(e._s(n.label.split(",")[0]))])])],1)}}],null,!1,2739890760),model:{value:e.resIds,callback:function(t){e.resIds=t},expression:"resIds"}}):e._e()],1),e._v(" "),o("div",{staticClass:"btn-group"},[o("el-button",{staticClass:"next-btn",attrs:{type:"danger",size:"small"},nativeOn:{click:function(t){return t.preventDefault(),e.sure(t)}}},[e._v(e._s(2==e.applyForm.applyResState?"分配资源":"拒绝分配"))])],1)],1)])],1)},J=[],G={name:"Deploy",props:{deployConfig:{isShow:{type:Boolean,default:function(){return!1}},resApplyId:{type:String,default:function(){return""}},resList:{type:Array,default:function(){return[]}},userName:{type:String,default:function(){return""}},projectName:{type:String,default:function(){return""}},resCount:{type:String,default:function(){return""}},resType:{type:String,default:function(){return""}},resApplyPeriod:{type:String,default:function(){return""}},resUseInfo:{type:String,default:function(){return""}}}},data:function(){return{applyForm:{applyResState:"2",rejectInfo:""},rules:{rejectInfo:[{required:!0,message:"请填写不同意分配资源说明",trigger:"blur"}]},resIds:[]}},methods:{close:function(){this.applyForm={applyResState:"2",rejectInfo:""},this.resIds=[],this.$emit("putDeploy",!1)},sure:function(){var e=this;this.$refs.applyForm.validate((function(t){if(!t)return!1;if(2==e.applyForm.applyResState&&e.resIds.length!=e.deployConfig.resCount)return e.$message.warning("分配资源数量不满足项目要求!");var o={transCode:"C00030",applyResId:e.deployConfig.resApplyId,applyResState:e.applyForm.applyResState,rejectInfo:e.applyForm.rejectInfo,resIds:e.resIds.toString()};Object(I["e"])(o).then((function(t){2==e.applyForm.applyResState?e.$message.success("分配资源成功!"):3==e.applyForm.applyResState&&e.$message.success("拒绝分配成功!"),e.applyForm={applyResState:"2",rejectInfo:""},e.resIds=[],e.$emit("putDeploy",e.deployConfig)})).catch((function(e){}))}))},getRadio:function(e){2==e?this.applyForm.rejectInfo="":3==e?this.resIds=[]:(this.resIds=[],this.applyForm.rejectInfo="")},getType:function(e){return Object(S["d"])(e)},formatTime:function(e){return Object(S["e"])(e)}}},K=G,M=(o("340a"),o("1de3"),Object(x["a"])(K,H,J,!1,null,"23b097de",null)),Q=M.exports,V={name:"Details",components:{Toast:g["a"],FileList:h["a"],ChainInfo:C["a"],ApplyResource:k,Applying:R,ContinueResource:q,Deploy:Q},data:function(){return{userType:this.$store.getters.userType||0,car:r.a,frame:c.a,mode:f.a,plane:d.a,tank:y.a,tyre:m.a,projectId:"",data:"",toastConfig:{isShow:!1,showCancel:!1,center:!1,message:""},fileListConfig:{isShow:!1,operationType:"",projectId:"",fileList:[]},chainInfoConfig:{isShow:!1,infoData:{}},applyConfig:{isShow:!1,projectId:"",userType:"",resList:[]},applyingConfig:{isShow:!1,resApplyState:"",resType:"",resCount:"",resApplyPeriod:"",resUseInfo:"",resApplyTime:"",resAuditTime:"",resAuditRejectInfo:"",resStartTime:"",resEndTime:"",resUseNums:""},continueConfig:{isShow:!1,resApplyId:""},deployConfig:{isShow:!1,resApplyId:"",resList:[],userName:"",projectName:"",resCount:"",resType:"",resApplyPeriod:"",resUseInfo:""}}},created:function(){this.projectId=this.$route.query.projectId,this.projectId&&this.getDetails()},provide:function(){return{getFile:this.getFile}},methods:{getDetails:function(){var e=this,t={transCode:"C00031",projectId:this.projectId};Object(I["e"])(t).then((function(t){e.data=t})).catch((function(e){}))},getFile:function(){var e=this,t={transCode:"C00033",projectId:this.projectId};Object(I["e"])(t).then((function(t){var o=t.fileList;o.map((function(e,t){e.index=t+1})),e.fileListConfig={isShow:!0,operationType:"file",projectId:e.projectId,solverState:t.solverState,solverNum:t.solverNum,fileList:o}})).catch((function(e){}))},Apply:function(){2==this.userType?this.applyConfig={isShow:!0,projectId:this.projectId,userType:this.userType,resList:[]}:this.getDeployList("apply")},Applying:function(){this.applyingConfig={isShow:!0,resApplyState:this.data.resApplyState,resType:this.data.resType,resCount:this.data.resCount,resApplyPeriod:this.data.resApplyPeriod,resUseInfo:this.data.resUseInfo,resApplyTime:this.data.resApplyTime,resAuditTime:this.data.resAuditTime,resAuditRejectInfo:this.data.resAuditRejectInfo,resStartTime:this.data.resStartTime,resEndTime:this.data.resEndTime,resUseNums:this.data.resUseNums}},Continue:function(){this.continueConfig={isShow:!0,resApplyId:this.data.resApplyId}},Release:function(e){this.toastConfig={isShow:!0,showCancel:!0,center:!1,message:"该操作不可恢复,资源释放后将不可使用,您确定要将:'".concat(this.data.projectName,"' 的资源释放掉吗?")}},getDeployList:function(e){var t=this,o={transCode:"C00024",state:"1",type:"0",name:"",page:1,count:-1};Object(I["e"])(o).then((function(o){var n=[];o.rows.map((function(e,t){n.push({key:e.resId,label:"".concat(e.name,",").concat(e.capacity,",").concat(e.endtime)})})),"deploy"==e?t.deployConfig={isShow:!0,resApplyId:t.data.resApplyId,resList:n,userName:t.data.userName,projectName:t.data.projectName,resCount:t.data.resCount,resType:t.data.resType,resApplyPeriod:t.data.resApplyPeriod,resUseInfo:t.data.resUseInfo}:"apply"==e&&(t.applyConfig={isShow:!0,projectId:t.projectId,userType:t.userType,resList:n})})).catch((function(e){}))},toSolver:function(){var e=this,t={transCode:"A00006"};Object(I["e"])(t).then((function(t){var o=e.$store.getters.lesseeId;console.log(t),e.$message.success(" 即将进入求解器"),console.log(t.authCode),setTimeout((function(){window.open(e.$store.getters.cfdUrl+"?authCode="+t.authCode+"&projectId="+e.projectId+"&projectType="+e.data.projectType+"&lesseeId="+o,"_blank")}),1e3)})).catch((function(e){}))},getToast:function(e){var t=this;if(this.toastConfig.isShow=!1,e&&this.toastConfig.message==="该操作不可恢复,资源释放后将不可使用,您确定要将:'".concat(this.data.projectName,"' 的资源释放掉吗?")){var o={transCode:"C00026",applyResId:this.data.resApplyId};Object(I["e"])(o).then((function(e){t.$message.success("释放资源完成!"),t.getDetails()})).catch((function(e){}))}},getFileList:function(e){e?this.chainInfoConfig={isShow:!0,infoData:e}:this.fileListConfig.isShow=!1},getChainInfo:function(e){this.chainInfoConfig.isShow=!1},getApply:function(e){this.applyConfig.isShow=!1,e&&this.getDetails()},getApplying:function(e){this.applyingConfig.isShow=!1,e&&this.getDetails()},getContinue:function(e){this.continueConfig.isShow=!1,e&&this.getDetails()},getDeploy:function(e){this.deployConfig.isShow=!1,e&&this.getDetails()},formatTime:function(e){return Object(S["e"])(e)},getSolverState:function(e){return Object(S["a"])(e)}}},W=V,X=(o("04af"),o("ab60"),Object(x["a"])(W,s,i,!1,null,"54810022",null));t["default"]=X.exports},bafc:function(e,t,o){e.exports=o.p+"static/img/plane.402f562f.jpg"},bbf7:function(e,t,o){"use strict";o("950e")},bc4f:function(e,t,o){e.exports={color_0:"#000",color_1:"#111",color_2:"#222",color_3:"#333",color_4:"#444",color_5:"#555",color_6:"#666",color_7:"#777",color_8:"#888",color_9:"#999",color_a:"#aaa",color_b:"#bbb",color_c:"#ccc",color_d:"#ddd",color_e:"#eee",color_f2:"#f2f2f2",color_f5:"#f5f5f5",color_fa:"#fafafa",color_fc:"#fcfcfc",color_f:"#fff",color_on:"#F66420",pad:"20px"}},be69:function(e,t,o){},d7d3:function(e,t,o){e.exports={color_0:"#000",color_1:"#111",color_2:"#222",color_3:"#333",color_4:"#444",color_5:"#555",color_6:"#666",color_7:"#777",color_8:"#888",color_9:"#999",color_a:"#aaa",color_b:"#bbb",color_c:"#ccc",color_d:"#ddd",color_e:"#eee",color_f2:"#f2f2f2",color_f5:"#f5f5f5",color_fa:"#fafafa",color_fc:"#fcfcfc",color_f:"#fff",color_on:"#F66420",pad:"20px"}},da98:function(e,t,o){e.exports=o.p+"static/img/mode.f276f05d.jpg"},db06:function(e,t,o){"use strict";o("be69")},f82a:function(e,t,o){"use strict";o("b4b4")}}]);