systemctl.vue 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <template>
  2. <el-container>
  3. <el-header class="header">
  4. <h3>系统设置</h3>
  5. </el-header>
  6. <el-main class="main">
  7. <div>
  8. <span>恢复出厂设置</span>
  9. <el-button type="primary">执行恢复</el-button>
  10. </div>
  11. <div>
  12. <span>设备重启</span>
  13. <el-button type="primary" @click="rebootClick">执行重启</el-button>
  14. </div>
  15. </el-main>
  16. </el-container>
  17. </template>
  18. <script>
  19. import { mapActions } from 'vuex'
  20. // mapState
  21. export default {
  22. name: 'systemctl',
  23. components: {},
  24. data () {
  25. return {}
  26. },
  27. mounted () {},
  28. methods: {
  29. ...mapActions(['reboot']),
  30. rebootClick () {
  31. this.reboot()
  32. }
  33. }
  34. }
  35. </script>
  36. <style lang="less" scoped>
  37. h3 {
  38. width: 90%;
  39. text-align: left;
  40. text-indent: 1em;
  41. line-height: 3em;
  42. border-bottom: 2px solid #999;
  43. }
  44. .main {
  45. width: 70%;
  46. margin: 10% auto;
  47. display: flex;
  48. div {
  49. width: 50%;
  50. span {
  51. display: block;
  52. color: #999;
  53. text-align: center;
  54. }
  55. /deep/ .el-button {
  56. display: block;
  57. margin: 5% auto;
  58. }
  59. }
  60. }
  61. </style>