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.
shipin/public/admin/system_static/js/chunk-65425a84.94be3259.js

1 line
20 KiB

1 year ago
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-65425a84"],{"05ea7":function(t,e,r){"use strict";r.r(e),r("d3b7"),r("25f0"),r("a9e3");var n=r("2909"),a=r("c7eb"),s=r("1da1"),o=(r("99af"),r("7db0"),r("d81d"),r("ac1f"),r("5319"),r("3ca3"),r("ddb0"),r("2b3d"),r("9861"),r("88a7"),r("271a"),r("5494"),r("8593")),i=r("bc3a"),u=r.n(i),c=r("5723"),d=r("c276"),l=r("d708");i={name:"systemUpgradeclient",data:function(){return{Panel:"1",currentTab:"1",declaration:!1,updateModal:!1,modal_loading:!1,percent:0,params:[],arr:[],dynamic:!1,status:!1,version:"",forceVersion:"",headerList:[{label:"系统升级",value:1},{label:"升级记录",value:2}],upgradeList:[],upgradeLogList:[],upgradeableList:[],upgradeProgress:{speed:0},upgradeAgreement:[],upgradeStatus:{},downloadStatus:null,page:1,limit:15,timer:null,params_key:void 0,newKey:null,servionStatus:!1,count:0}},created:function(){},mounted:function(){var t=this;return Object(s.a)(Object(a.a)().mark((function e(){return Object(a.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.getUpgradeStatus(),e.next=3,t.getUpgradeList();case 3:return e.next=5,t.getupgradeableList();case 5:t.$store.state.upgrade.toggleStatus&&(t.servionStatus=!0,t.getUpgradeAgreement());case 6:case"end":return e.stop()}}),e)})))()},watch:{"upgradeProgress.speed":{handler:function(t,e){"100.0"===t&&clearInterval(this.timer)}}},methods:{handleReachBottom:function(){this.count===this.upgradeLogList.length?this.$message.warning("暂无更多升级记录"):this.getUpgradeLogList()},handleClick:function(){(this.page=1)==this.currentTab?this.getupgradeableList():(this.upgradeLogList=[],this.getUpgradeLogList())},getUpgradeList:function(){var t=this;return Object(s.a)(Object(a.a)().mark((function e(){var r;return Object(a.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={page:t.page,limit:t.limit},e.next=3,Object(o.lb)(r);case 3:r=e.sent,t.upgradeList=r.data.list,t.upgradeList=r.data.list;case 6:case"end":return e.stop()}}),e)})))()},getUpgradeLogList:function(){var t=this,e={page:this.page,limit:this.limit};Object(o.mb)(e).then((function(e){t.upgradeLogList=[].concat(Object(n.a)(t.upgradeLogList),Object(n.a)(e.data.list)),t.count=e.data.count,t.upgradeLogList.length<t.count&&t.page++,t.count===t.upgradeLogList.length?t.$message.warning("暂无更多升级记录"):t.getUpgradeLogList()})).catch((function(e){t.$message.error(e.msg)}))},getupgradeableList:function(){var t=this;return Object(s.a)(Object(a.a)().mark((function e(){var r,n;return Object(a.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(o.pb)();case 2:n=e.sent,t.upgradeableList=n.data,r=n.data[0],t.$store.state.upgrade.toggleStatus||t.upgradeStatus.force_reminder?(n=n.data.find((function(t){return 1===t.force_reminder})),t.newKey=n.package_key,t.forceVersion=n.first_version+"."+n.second_version+"."+n.third_version+"."+n.fourth_version):(t.params_key=t.upgradeableList[0].package_key,t.forceVersion=r.first_version+"."+r.second_version+"."+r.third_version+"."+r.fourth_version);case 6:case"end":return e.stop()}}),e)})))()},getdownload:function(){var t=this;(this.$store.state.upgrade.toggleStatus||this.upgradeStatus.force_reminder)&&(this.params_key=this.newKey),Object(o.r)(this.params_key).then((function(e){200==e.status?"100.0"!==t.upgradeProgress.speed?t.timer=setInterval((function(){setTimeout((function(){t.getUpgradeProgress()}),0)}),5e3):(clearInterval(t.timer),t.updateModal=!1):t.updateModal=!1})).catch((function(e){clearInterval(t.timer),t.$message.error("下载终止"),t.updateModal=!1}))},downloadFile:function(t){window.open(t,"_blank")},getUpgradeProgress:function(){var t=this;Object(o.nb)().then((function(e){t.upgradeProgress=e.data,t.downloadStatus=e.status})).catch((function(e){clearInterval(t.timer),t.$message.error(e.msg)}))},getUpgradeAgreement:function(){var t=this;Object(o.kb)().then((function(e){t.upgradeAgreement=e.data,t.declaration=!0})).catch((function(e){t.$message.error(e.msg)}))},getUpgradeStatus:function(){var t=this;Object(o.ob)().then((function(e){t.upgradeS