(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-2d224cf3"],{e25e:function(t,s,e){"use strict";e.r(s);e("f175");var a=e("6b2d");var i={data:()=>({form:{},version:{},disable:!1,status:"更新"}),methods:{loadVersionList(){var t;a.a.get("/version/index",{params:t}).then(t=>{this.form=t.data})},loadRemoteVersionList(){var t;a.a.get("/version/getRemoteVersion",{params:t}).then(t=>{this.version=t.data.data})},update(){this.$confirm('<span>数据无价，</span> <strong style="color: red;">请先备份好数据库和源码（更新过程造成数据丢失概不负责）</strong> <span>，是否确认更新覆盖源代码？</span>',"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",dangerouslyUseHTMLString:!0}).then(()=>{var t;this.status="更新中，请勿刷新该页面或关闭本窗口",a.a.post("/version/upper_version",t).then(t=>{this.status="更新",this.disable=!1,this.$message.success(t.msg),this.loadVersionList(),this.loadRemoteVersionList()})}).catch(()=>{this.disable=!1})}},mounted(){this.loadVersionList(),this.loadRemoteVersionList()}},r=e("2877"),o=Object(r.a)(i,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("div",{staticClass:"ls-card m-t-16"},[e("div",{staticClass:"card-title"},[t._v("当前系统版本")]),e("div",{staticClass:"card-content m-t-24"},[e("el-form",{ref:"form",attrs:{model:t.form,"label-width":"100px"}},[e("el-form-item",{attrs:{label:"PHP版本"}},[e("span",[t._v(t._s(t.form.php_version))])]),e("el-form-item",{attrs:{label:"ThinkPHP版本"}},[e("span",[t._v(t._s(t.form.think_version))])]),e("el-form-item",{attrs:{label:"系统版本"}},[e("span",[t._v(t._s(t.form.system_version))]),t.form.system_version<t.version.version?e("el-button",{staticStyle:{"margin-left":"20px"},attrs:{disabled:t.disable,type:"text"},on:{click:function(s){t.update(),t.disable=!0}}},[t._v(t._s(t.status))]):t._e(),t.form.system_version==t.version.version?e("span",{staticStyle:{color:"green","margin-left":"20px"}},[t._v("当前为最新版本")]):t._e()],1)],1)],1)]),e("div",{staticClass:"ls-card m-t-16"},[e("div",{staticClass:"card-title"},[t._v("远程系统最新版本")]),e("div",{staticClass:"card-content m-t-24"},[e("el-form",{ref:"form",attrs:{model:t.version,"label-width":"100px"}},[e("el-form-item",{attrs:{label:"名称"}},[e("span",[t._v(t._s(t.version.title))])]),e("el-form-item",{attrs:{label:"版本"}},[e("span",[t._v(t._s(t.version.version))])]),e("el-form-item",[e("span",{domProps:{innerHTML:t._s(t.version.desc)}})]),e("el-form-item",[e("el-button",{attrs:{disabled:t.disable,type:"primary"},on:{click:function(s){t.update(),t.disable=!0}}},[t._v(t._s(t.status))])],1)],1)],1)])])}),[],!1,null,null,null);s.default=o.exports}}]);