chunk-3e585670.20af80dc.js 20 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-3e585670"],{"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.upgradeStatus=e.data,e.data.force_reminder&&(t.declaration=!0,t.getUpgradeAgreement())})).catch((function(e){t.$message.error(e.msg)}))},update:function(t){this.declaration=!0,t&&0==this.$store.state.upgrade.toggleStatus&&(this.params_key=t.params_key),this.getUpgradeAgreement()},compare:function(){var t=this;this.upgradeList.map((function(e,r){t.$set(t.upgradeList[r],"mn",e.first_version+e.second_version+e.third_version+e.fourth_version),t.upgradeableList.map((function(e,r){t.$set(t.upgradeableList[r],"mn",e.first_version+e.second_version+e.third_version+e.fourth_version)})),t.upgradeList[r].mn==t.upgradeableList[r].mn&&(t.$set(t.upgradeList[r],"indexn",!0),t.$set(t.upgradeList[r],"params_key",t.upgradeableList[r].package_key),t.$set(t.upgradeableList[r],"indexn",!0))}))},agree:function(){this.declaration=!1,this.updateModal=!0,this.getdownload(),this.$store.commit("upgrade/TOGGLE_STATUS",!1)},reject:function(){this.declaration=!1,this.$store.commit("upgrade/TOGGLE_STATUS",!1)},back:function(){var t=this;this.updateModal=!1,clearInterval(this.timer),Object(c.b)().then((function(e){t.$message.success("您已成功退出"),t.$router.replace(t.$routeProStr+"/login"),localStorage.clear(),Object(d.l)("token"),Object(d.l)("expires_time"),Object(d.l)("uuid")})).catch((function(t){}))},backSure:function(){this.updateModal=!1,clearInterval(this.timer)},cancel:function(){this.updateModal=!1,clearInterval(this.timer)},exports:function(t){var e=t.title+"v"+t.first_version+"."+t.second_version+"."+t.third_version+"."+t.fourth_version+"."+t.upgrade_time;t=l.a.apiBaseURL+"/system/upgrade_export/".concat(t.id,"/file");u()({method:"get",url:t,responseType:"blob",headers:{"Authori-zation":"Bearer "+Object(d.c)("token")}}).then((function(t){t=new Blob([t.data],{type:"application/octet-stream;charset=UTF-8"});var r=document.createElement("a");r.download="".concat(e,".zip"),r.href=window.URL.createObjectURL(t),r.click(),document.body.appendChild(r),document.body.removeChild(r),window.URL.revokeObjectURL(r.href)}))},handleDownload:function(t){var e=t.title+"v"+t.first_version+"."+t.second_version+"."+t.third_version+"."+t.fourth_version+"."+t.upgrade_time;t=l.a.apiBaseURL+"/system/upgrade_export/".concat(t.id,"/data");u()({method:"get",url:t,responseType:"blob",headers:{"Authori-zation":"Bearer "+Object(d.c)("token")}}).then((function(t){t=new Blob([t.data],{type:"application/octet-stream;charset=UTF-8"});var r=document.createElement("a");r.download="".concat(e,".gz"),r.href=window.URL.createObjectURL(t),r.click(),document.body.appendChild(r),document.body.removeChild(r),window.URL.revokeObjectURL(r.href)}))},quearyEvear:function(t,e){this.dynamic=e}},destroyed:function(){clearInterval(this.timer)}},r("8800"),r=r("2877"),r=Object(r.a)(i,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"upgrade"},[e("el-card",{staticClass:"ivu-mt",attrs:{bordered:!1,shadow:"never"}},[e("div",{staticClass:"header"},[e("div",[t._v("当前版本"),e("span",{staticClass:"v"}),e("span",{staticClass:"num"},[t._v(t._s(t.$store.state.userInfo.version))])]),e("div",{staticClass:"info title"},[t._v("\n 更新说明:\n "),1!=t.upgradeStatus.status?e("span",[t._v("已升级至最新版本,无需更新")]):t._e(),1==t.upgradeStatus.status?e("ul",[e("li",[t._v(t._s(t.upgradeStatus.title))])]):t._e()]),1==t.currentTab&&1==t.upgradeStatus.status?e("el-button",{staticClass:"primary btn update",attrs:{type:"primary"},on:{click:function(e){return t.update()}}},[t._v("立即更新")]):t._e()],1)]),e("el-card",{staticClass:"ivu-mt",attrs:{bordered:!1,shadow:"never"}},[e("el-tabs",{on:{"tab-click":t.handleClick},model:{value:t.currentTab,callback:function(e){t.currentTab=e},expression:"currentTab"}},t._l(t.headerList,(function(t){return e("el-tab-pane",{key:t.id,attrs:{label:t.label,name:t.value.toString()}})})),1),1==t.currentTab?e("div",{staticClass:"contentTime"},t._l(t.upgradeList,(function(r,n){return e("div",{key:n,staticClass:"acea-row row-top on",class:{active:n==t.dynamic},on:{mouseenter:function(e){return t.quearyEvear(r.id,n)}}},[e("div",{staticClass:"time"},[t._v(t._s(r.release_time))]),e("el-timeline",{staticClass:"list"},[e("el-timeline-item",[e("el-collapse",[e("el-collapse-item",[e("template",{slot:"title"},[t._v("\n "+t._s(r.title)+" v"+t._s(r.first_version)+"."+t._s(r.second_version)+"."+t._s(r.third_version)+"."+t._s(r.fourth_version)),e("i",{staticClass:"el-icon-arrow-down"})]),e("p",{staticClass:"info"},[e("ul",{staticStyle:{"white-space":"pre-wrap"}},[e("li",{domProps:{innerHTML:t._s(r.content)}})])])],2)],1)],1),r.client_package_link?e("el-button",{staticClass:"primary btn",attrs:{type:"success"},on:{click:function(e){return t.downloadFile(r.client_package_link)}}},[t._v("移动端源码")]):t._e(),r.pc_package_link?e("el-button",{staticClass:"primary btn1",attrs:{type:"primary"},on:{click:function(e){return t.downloadFile(r.pc_package_link)}}},[t._v("PC端源码")]):t._e()],1)],1)})),0):t._e(),2==t.currentTab?e("div",{attrs:{height:"550"}},[e("div",{staticClass:"contentTime"},t._l(t.upgradeLogList,(function(r,n){return e("div",{key:n,staticClass:"acea-row row-top off",class:{active:n==t.dynamic},on:{mouseenter:function(e){return t.quearyEvear(r.id,n)}}},[e("div",{staticClass:"time"},[0==n?e("div",[t._v("最近更新")]):t._e(),e("div",[t._v(t._s(r.upgrade_time))])]),e("el-timeline",{staticClass:"list"},[e("el-timeline-item",[e("Icon",{attrs:{slot:"dot",type:0==n?"md-radio-button-on":"md-radio-button-off"},slot:"dot"}),e("el-collapse",[e("el-collapse-item",[e("template",{slot:"title"},[t._v("\n "+t._s(r.title)+" v"+t._s(r.first_version)+"."+t._s(r.second_version)+"."+t._s(r.third_version)+"."+t._s(r.fourth_version)),e("i",{attrs:{type:"el-icon-arrow-down"}})]),e("p",{staticClass:"info"},[e("ul",{staticStyle:{"white-space":"pre-wrap"}},[e("li",{domProps:{innerHTML:t._s(r.content)}})])])],2)],1)],1)],1)],1)})),0)]):t._e()],1),e("el-dialog",{attrs:{visible:t.declaration,width:"470px","custom-clas":"vertical-center-modal","show-close":!0,"close-on-click-modal":!1},on:{"update:visible":function(e){t.declaration=e}}},[e("p",{staticClass:"header-modal",attrs:{slot:"header"},slot:"header"},[e("span",[t._v(t._s(t.upgradeAgreement.title))])]),e("div",{staticClass:"describe"},[e("p",{domProps:{innerHTML:t._s(t.upgradeAgreement.content)}})]),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:t.reject}},[t._v("拒 绝")]),e("el-button",{attrs:{type:"primary"},on:{click:t.agree}},[t._v("同 意")])],1)]),e("el-dialog",{attrs:{width:"470px","custom-clas":"vertical-center-modal","show-close":!0,"close-on-click-modal":!1},model:{value:t.updateModal,callback:function(e){t.updateModal=e},expression:"updateModal"}},[e("p",{staticClass:"header-modal2",attrs:{slot:"header"},slot:"header"},[e("span",[t._v("升级至v"+t._s(t.forceVersion))])]),"100.0"!=t.upgradeProgress.speed||"200"!=this.downloadStatus?e("div",{staticClass:"describe"},[e("i-circle",{attrs:{size:140,"trail-width":4,"stroke-width":5,percent:Number(t.upgradeProgress.speed),"stroke-linecap":"square","stroke-color":"#43a3fb"}},[e("div",{staticClass:"demo-i-circle-custom"},[e("p",[t._v(t._s(t.upgradeProgress.tip||"升级中"))])])]),e("div",{staticClass:"proportion"},[t._v(t._s(t.upgradeProgress.speed?t.upgradeProgress.speed+"%":""))]),e("div",{staticClass:"wait"},[t._v("正在更新,请耐心等候~")])],1):t._e(),e("div",{attrs:{slot:"footer"},slot:"footer"}),"100.0"==t.upgradeProgress.speed?e("div",{staticClass:"describe"},[e("el-progress",{attrs:{type:"circle",percentage:100,status:"success"}}),e("div",{staticClass:"success"},[t._v("升级成功")])],1):t._e(),"100.0"==t.upgradeProgress.speed?e("div",{staticClass:"footer2",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{staticClass:"confirm",attrs:{type:"primary",shape:"circle"},on:{click:function(e){return t.back()}}},[t._v("确认")])],1):t._e(),"100.0"==t.upgradeProgress.speed?e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:t.cancel}},[t._v("取 消")]),e("el-button",{attrs:{type:"primary"},on:{click:t.back}},[t._v("确 认")])],1):t._e()])],1)}),[],!1,null,"17c30308",null);e.default=r.exports},8593:function(t,e,r){"use strict";r.d(e,"i",(function(){return a})),r.d(e,"g",(function(){return s})),r.d(e,"h",(function(){return o})),r.d(e,"db",(function(){return i})),r.d(e,"m",(function(){return u})),r.d(e,"k",(function(){return c})),r.d(e,"l",(function(){return d})),r.d(e,"j",(function(){return l})),r.d(e,"L",(function(){return f})),r.d(e,"D",(function(){return p})),r.d(e,"K",(function(){return m})),r.d(e,"I",(function(){return g})),r.d(e,"F",(function(){return b})),r.d(e,"G",(function(){return h})),r.d(e,"H",(function(){return _})),r.d(e,"J",(function(){return v})),r.d(e,"Z",(function(){return O})),r.d(e,"fb",(function(){return j})),r.d(e,"s",(function(){return y})),r.d(e,"c",(function(){return k})),r.d(e,"e",(function(){return w})),r.d(e,"b",(function(){return L})),r.d(e,"d",(function(){return T})),r.d(e,"f",(function(){return C})),r.d(e,"w",(function(){return S})),r.d(e,"u",(function(){return U})),r.d(e,"v",(function(){return P})),r.d(e,"Q",(function(){return $})),r.d(e,"P",(function(){return E})),r.d(e,"R",(function(){return x})),r.d(e,"Y",(function(){return G})),r.d(e,"o",(function(){return M})),r.d(e,"n",(function(){return A})),r.d(e,"U",(function(){return I})),r.d(e,"q",(function(){return R})),r.d(e,"t",(function(){return F})),r.d(e,"V",(function(){return B})),r.d(e,"a",(function(){return z})),r.d(e,"A",(function(){return q})),r.d(e,"cb",(function(){return V})),r.d(e,"E",(function(){return H})),r.d(e,"rb",(function(){return K})),r.d(e,"qb",(function(){return J})),r.d(e,"M",(function(){return D})),r.d(e,"O",(function(){return N})),r.d(e,"B",(function(){return Q})),r.d(e,"S",(function(){return W})),r.d(e,"T",(function(){return X})),r.d(e,"x",(function(){return Y})),r.d(e,"ab",(function(){return Z})),r.d(e,"y",(function(){return tt})),r.d(e,"bb",(function(){return et})),r.d(e,"p",(function(){return rt})),r.d(e,"C",(function(){return nt})),r.d(e,"z",(function(){return at})),r.d(e,"W",(function(){return st})),r.d(e,"lb",(function(){return ot})),r.d(e,"nb",(function(){return it})),r.d(e,"kb",(function(){return ut})),r.d(e,"ob",(function(){return ct})),r.d(e,"mb",(function(){return dt})),r.d(e,"r",(function(){return lt})),r.d(e,"pb",(function(){return ft})),r.d(e,"gb",(function(){return pt})),r.d(e,"eb",(function(){return mt})),r.d(e,"hb",(function(){return gt})),r.d(e,"X",(function(){return bt})),r.d(e,"jb",(function(){return ht})),r.d(e,"N",(function(){return _t})),r.d(e,"ib",(function(){return vt})),r("99af");var n=r("6b6c");function a(t){return Object(n.a)({url:"setting/config_class",method:"get",params:t})}function s(t){return Object(n.a)({url:"setting/config_class/create",method:"get"})}function o(t){return Object(n.a)({url:"setting/config_class/".concat(t,"/edit"),method:"get"})}function i(t){return Object(n.a)({url:"setting/config_class/set_status/".concat(t.id,"/").concat(t.status),method:"PUT"})}function u(t){return Object(n.a)({url:"setting/config",method:"get",params:t})}function c(t){return Object(n.a)({url:"setting/config/create",method:"get",params:t})}function d(t){return Object(n.a)({url:"/setting/config/".concat(t,"/edit"),method:"get"})}function l(t,e){return Object(n.a)({url:"setting/config/set_status/".concat(t,"/").concat(e),method:"PUT"})}function f(t){return Object(n.a)({url:"setting/group",method:"get",params:t})}function p(t){return Object(n.a)({url:t.url,method:t.method,data:t.datas})}function m(t){return Object(n.a)({url:"setting/group/".concat(t),method:"get"})}function g(t,e){return Object(n.a)({url:e,method:"get",params:t})}function b(t,e){return Object(n.a)({url:e,method:"get",params:t})}function h(t,e){return Object(n.a)({url:e,method:"get",params:t})}function _(t,e){return Object(n.a)({url:e,method:"get",params:t})}function v(t){return Object(n.a)({url:t,method:"PUT"})}function O(t){return Object(n.a)({url:"system/log/search_admin",method:"GET"})}function j(t){return Object(n.a)({url:"system/log",method:"GET",params:t})}function y(){return Object(n.a)({url:"system/file",method:"GET"})}function k(){return Object(n.a)({url:"system/backup",method:"GET"})}function w(t){return Object(n.a)({url:"system/backup/read",method:"GET",params:t})}function L(t){return Object(n.a)({url:"system/backup/backup",method:"put",data:t})}function T(t){return Object(n.a)({url:"system/backup/optimize",method:"put",data:t})}function C(t){return Object(n.a)({url:"system/backup/repair",method:"put",data:t})}function S(t){return Object(n.a)({url:"system/backup/file_list",method:"GET"})}function U(t){return Object(n.a)({url:"backup/download",method:"get",params:t})}function P(t){return Object(n.a)({url:"system/backup/import",method:"POST",data:t})}function $(t){return Object(n.a)({url:"system/file/login",method:"POST",data:t})}function E(t){return Object(n.a)({url:"system/file/opendir",method:"GET",params:t,file_edit:!0})}function x(t){return Object(n.a)({url:"system/file/openfile",method:"GET",params:t,file_edit:!0})}function G(t){return Object(n.a)({url:"system/file/savefile?fileToken=".concat(t.fileToken),method:"post",data:t,file_edit:!0})}function M(t){return Object(n.a)({url:"system/file/createFolder",method:"GET",params:t,file_edit:!0})}function A(t){return Object(n.a)({url:"system/file/createFile",method:"GET",params:t,file_edit:!0})}function I(t){return Object(n.a)({url:"system/file/rename",method:"GET",params:t,file_edit:!0})}function R(t){return Object(n.a)({url:"system/file/delFolder",method:"GET",params:t,file_edit:!0})}function F(t){return Object(n.a)({url:"system/file/mark",method:"get",params:t,file_edit:!0})}function B(t){return Object(n.a)({url:"system/replace_site_url",method:"post",data:t})}function z(){return Object(n.a)({url:"auth",method:"get"})}function q(){return Object(n.a)({url:"setting/get_kf_adv",method:"get"})}function V(t){return Object(n.a)({url:"setting/set_kf_adv",method:"post",data:t})}function H(){return Object(n.a)({url:"setting/group_all",method:"get"})}function K(t){return Object(n.a)({url:"system/version_list",method:"get",params:t})}function J(t){return Object(n.a)({url:"system/version_crate/".concat(t),method:"get"})}function D(t){return Object(n.a)({url:"setting/group_data/save_all",method:"POST",data:t})}function N(t){return Object(n.a)({url:"diy/open_adv/add",method:"POST",data:t})}function Q(){return Object(n.a)({url:"diy/open_adv/info",method:"get"})}function W(t){return Object(n.a)({url:"setting/config/get_system/".concat(t),method:"get"})}function X(t){return Object(n.a)({url:"setting/config/save_basics",method:"POST",data:t})}function Y(){return Object(n.a)({url:"setting/get_user_agreement",method:"get"})}function Z(t){return Object(n.a)({url:"setting/set_user_agreement",method:"post",data:t})}function tt(t){return Object(n.a)({url:"setting/get_agreement/".concat(t),method:"get"})}function et(t,e){return Object(n.a)({url:"setting/save_agreement",method:"post",data:t})}function rt(t){return Object(n.a)({url:"crmeb_product",method:"get",params:t})}function nt(){return Object(n.a)({url:"setting/get_version",method:"get"})}function at(){return Object(n.a)({url:"copyright",method:"get"})}function st(t){return Object(n.a)({url:"copyright",method:"post",data:t})}function ot(t){return Object(n.a)({url:"/system/upgrade/list",method:"get",params:t})}function it(){return Object(n.a)({url:"/system/upgrade_progress",method:"get"})}function ut(){return Object(n.a)({url:"/system/upgrade/agreement",method:"get"})}function ct(){return Object(n.a)({url:"/system/upgrade_status",method:"get"})}function dt(t){return Object(n.a)({url:"/system/upgrade_log/list",method:"get",params:t})}function lt(t){return Object(n.a)({url:"/system/upgrade_download/"+t,method:"POST"})}function ft(t){return Object(n.a)({url:"/system/upgradeable/list",method:"get",params:t})}function pt(t){return Object(n.a)({url:"system/crontab/list",params:t})}function mt(t,e){return Object(n.a)({url:"system/crontab/set_open/".concat(t,"/").concat(e)})}function gt(t){return Object(n.a)({url:"system/crontab/info/".concat(t)})}function bt(t){return Object(n.a)({url:"system/crontab/save",method:"post",data:t})}function ht(t){return Object(n.a)({url:"system/database/update_mark",method:"post",data:t})}function _t(t,e){return Object(n.a)({url:"system/file/mark/save?fileToken=".concat(t),method:"post",data:e})}function vt(){return Object(n.a)({url:"system/crontab/mark"})}},8800:function(t,e,r){"use strict";r("a0f6")},a0f6:function(t,e,r){}}]);