step4.html 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8" />
  5. <title>安装详细过程 - Powered by CRMEB </title>
  6. <script src="/install/js/jquery.js?v=9.0"></script>
  7. <link rel="stylesheet" href="/install/css/install.css?v=9.0" />
  8. <link rel="stylesheet" href="/install/css/step4.css" />
  9. <link rel="stylesheet" href="/install/css/theme-chalk.css">
  10. <script src="/install/js/vue2.6.11.js"></script>
  11. <script src="/install/js/element-ui.js?v=9.0"></script>
  12. </head>
  13. <body>
  14. <div class="wrap" id="step4">
  15. <div class="title">
  16. 安装进度
  17. </div>
  18. <!-- -->
  19. <section class="section">
  20. <div class="title">
  21. <h1>系统安装中,请稍等片刻...</h1>
  22. </div>
  23. <div class="progress">
  24. {{ percentage }}
  25. <el-progress :percentage="percentage" color="#37CA71" define-back-color="rgba(255,255,255,0.5)"
  26. :stroke-width="8" status="success"></el-progress>
  27. <div class="progress-msg" v-if="!isShow">
  28. <div id="loginner_item" class="msg p8">{{installList[installList.length]}}</div>
  29. </div>
  30. </div>
  31. <div class="install" ref="install" id="log" v-show="isShow">
  32. <div id="loginner" class="item" v-for="(item,index) in installList" :key="index">
  33. <span>{{item.msg}}</span>
  34. <span>{{item.time}}</span>
  35. </div>
  36. </div>
  37. <div class="bottom tac"><a href="javascript:;" class="btn_old mid"><img class="shuaxin"
  38. src="/install/images/install/shuaxin.png" align="absmiddle" />&nbsp;正在安装...</a></div>
  39. </section>
  40. <script type="text/javascript">
  41. var n = 0;
  42. var data = <?php echo json_encode($data);?>;
  43. $.ajaxSetup({ cache: false });
  44. new Vue({
  45. el: '#step4',
  46. data() {
  47. return { percentage: 0, isShow: 0, installList: [] }
  48. },
  49. mounted() {
  50. this.reloads(n);
  51. },
  52. methods: {
  53. reloads(n) {
  54. var url = "/install/perform/" + n;
  55. $.ajax({
  56. type: "POST",
  57. url: url,
  58. data: data,
  59. dataType: 'json',
  60. beforeSend: () => {
  61. },
  62. success: (msg) => {
  63. this.percentage = Math.round((msg.n / msg.count) * 100) > 100 ? 100 : Math.round((msg.n / msg.count) * 100)
  64. if (msg.n >= 0) {
  65. $('#loginner_item').html(msg.msg);
  66. this.installList.push({
  67. msg: msg.msg,
  68. time: msg.time
  69. })
  70. this.$nextTick(e => {
  71. this.$refs.install.scrollTop = this.$refs.install.scrollHeight;
  72. })
  73. if (msg.n == '999999') {
  74. setTimeout(e => {
  75. this.gonext()
  76. }, 1000);
  77. return false;
  78. } else {
  79. this.reloads(msg.n);
  80. }
  81. } else {
  82. //alert('指定的数据库不存在,系统也无法创建,请先通过其他方式建立好数据库!');
  83. alert(msg.message);
  84. }
  85. }
  86. });
  87. },
  88. gonext() {
  89. window.location.href = '/install/end';
  90. }
  91. }
  92. })
  93. </script>
  94. </div>
  95. <div class="footer"> &copy; 2014-2022 <a href="http://www.crmeb.com" target="_blank">www.crmeb.com</a>
  96. 西安众邦网络科技有限公司出品
  97. </div>
  98. </body>
  99. </html>