check.blade.php 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. @extends('layouts.base')
  2. @section('title', '检查木马文件')
  3. @section('content')
  4. <style>
  5. .panel{
  6. margin-bottom:10px!important;
  7. padding-left: 20px;
  8. border-radius: 10px;
  9. }
  10. .panel .active a {
  11. background-color: #29ba9c!important;
  12. border-radius: 18px!important;
  13. color:#fff;
  14. }
  15. .panel a{
  16. border:none!important;
  17. background-color:#fff!important;
  18. }
  19. .content{
  20. background: #eff3f6;
  21. padding: 10px!important;
  22. }
  23. .con{
  24. padding-bottom:20px;
  25. position:relative;
  26. border-radius: 8px;
  27. min-height:100vh;
  28. background-color:#fff;
  29. }
  30. .con .setting .block{
  31. padding:10px;
  32. background-color:#fff;
  33. border-radius: 8px;
  34. }
  35. .con .setting .block .title{
  36. font-size:18px;
  37. margin-bottom:15px;
  38. display:flex;
  39. align-items:center;
  40. }
  41. .confirm-btn{
  42. width: 100%;
  43. position:absolute;
  44. bottom:0;
  45. left:0;
  46. line-height:63px;
  47. background-color: #ffffff;
  48. box-shadow: 0px 8px 23px 1px
  49. rgba(51, 51, 51, 0.3);
  50. background-color:#fff;
  51. text-align:center;
  52. }
  53. b{
  54. font-size:14px;
  55. }
  56. </style>
  57. <div id='re_content' >
  58. <template>
  59. </template>
  60. @include('layouts.newTabs')
  61. <div class="con">
  62. <div class="setting">
  63. <div class="block">
  64. <div class="title"><span style="width: 4px;height: 18px;background-color: #29ba9c;margin-right:15px;display:inline-block;"></span><b>检查木马文件</b>
  65. <div style="margin-left: 50px">
  66. <el-button type="warning" @click="submit" size="mini">检查</el-button>
  67. </div>
  68. </div>
  69. <div>
  70. <el-alert v-for="(item ,i) in file" center @close="Del"
  71. type="error">[[item]]
  72. </el-alert>
  73. </div>
  74. </div>
  75. </div>
  76. </div>
  77. </div>
  78. <script>
  79. var vm = new Vue({
  80. el: "#re_content",
  81. delimiters: ['[[', ']]'],
  82. data() {
  83. return {
  84. activeName: 'one',
  85. file: [],
  86. }
  87. },
  88. mounted () {
  89. },
  90. methods: {
  91. submit() {
  92. let loading = this.$loading({target:document.querySelector(".content"),background: 'rgba(0, 0, 0, 0.2)'});
  93. this.$http.post('{!! yzWebFullUrl('setting.trojan.check') !!}',{'trojan':'check'}).then(function (response) {
  94. if (response.data.result) {
  95. if(response.data.data.files.length>0){
  96. this.$message({type: 'waring',message: '发现可疑文件!'});
  97. this.file = response.data.data.files
  98. }else{
  99. this.$message({type: 'success',message: '暂无可疑文件!'});
  100. }
  101. }
  102. else{
  103. this.$message({type: 'error',message: response.data.msg});
  104. }
  105. loading.close();
  106. },function (response) {
  107. this.$message({type: 'error',message: response.data.msg});
  108. loading.close();
  109. }
  110. );
  111. },
  112. apiDel(){
  113. let loading = this.$loading({target:document.querySelector(".content"),background: 'rgba(0, 0, 0, 0.2)'});
  114. this.$http.post('{!! yzWebFullUrl('setting.trojan.del') !!}',{'files':this.file}).then(function (response) {
  115. if (response.data.result) {
  116. this.$message({type: 'success',message: '删除成功!'});
  117. }
  118. else{
  119. this.$message({type: 'error',message: '删除失败!'});
  120. }
  121. loading.close();
  122. },function (response) {
  123. this.$message({type: 'error',message: response.data.msg});
  124. loading.close();
  125. }
  126. );
  127. },
  128. del(){
  129. this.$confirm('将删除该文件, 是否确定?', '提示', {
  130. confirmButtonText: '确定',
  131. cancelButtonText: '取消',
  132. type: 'warning'
  133. }).then(() => {
  134. this.apiDel();
  135. }).catch(() => {
  136. this.$message({
  137. type: 'info',
  138. message: '已取消删除'
  139. });
  140. });
  141. }
  142. },
  143. });
  144. </script>
  145. @endsection('content')