小说后台管理系统
 
 
 

98 rivejä
2.0 KiB

  1. <template>
  2. <Dialog
  3. :is-dialog-exist="isDialog"
  4. :title="dialogTitle"
  5. :dialog-style="dialogStyle"
  6. @close-dialog="handleClose"
  7. >
  8. <el-container>
  9. <el-main>
  10. <el-progress
  11. type="circle"
  12. :percentage="num"
  13. />
  14. <!-- <svg height="150" width="110">-->
  15. <!-- <circle cx="55" cy="55" r="50" fill="none" stroke="grey" stroke-width="5" stroke-linecap="round" />-->
  16. <!-- <circle class="demo2" cx="55" cy="55" r="50" fill="red" stroke="skyblue" stroke-width="5" :stroke-dasharray="`${circleNum * 3.14}, 999`" />-->
  17. <!-- </svg>-->
  18. <p style="color: #666666">
  19. 正在采集书源 5个预计需要时间 01:18
  20. </p>
  21. <p>合计采集书源 69个</p>
  22. </el-main>
  23. </el-container>
  24. </Dialog>
  25. </template>
  26. <script>
  27. import Dialog from '@/components/Dialog/index'
  28. export default {
  29. components: { Dialog },
  30. props: {
  31. isDialog: {
  32. type: Boolean,
  33. default: false
  34. }
  35. },
  36. data() {
  37. return {
  38. // dialog样式
  39. dialogStyle: {
  40. '--dialog-width': '1000px',
  41. '--dialog-height': '450px',
  42. '--title-height': '51px'
  43. },
  44. // 弹窗标题
  45. dialogTitle: '采集状态',
  46. formData: {
  47. name: '132456'
  48. },
  49. num: 0,
  50. circleNum: 10
  51. }
  52. },
  53. watch: {
  54. 'isDialog'(val) {
  55. if (val) {
  56. this.timerWay()
  57. }
  58. }
  59. },
  60. methods: {
  61. timerWay() {
  62. const timer = setInterval(() => {
  63. this.num++
  64. // this.circleNum++
  65. console.log(this.num)
  66. if (this.num >= 100) {
  67. clearInterval(timer)
  68. }
  69. }, 100)
  70. },
  71. handleClose() {
  72. this.$emit('handle-close')
  73. }
  74. }
  75. }
  76. </script>
  77. <style lang="scss" scoped>
  78. .el-container{
  79. width: 100%;
  80. height: 100%;
  81. .el-main{
  82. width: 100%;
  83. margin: auto 0;
  84. text-align: center;
  85. font-size: 14px;
  86. /*
  87. .demo2{
  88. transform-origin: right left 0;
  89. transform: rotate(-90deg);
  90. }
  91. */
  92. }
  93. }
  94. </style>