channelPlanTimeDialog.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <template>
  2. <div class="edu-training-edit">
  3. <DialogCom title="通道前端录像配置详情" :visible.sync="isShow" width="1200px" >
  4. <div class="page-body">
  5. <div class="extend_mod" style="max-height: 500px;">
  6. <el-table :data="formData" border style="width: 100%;max-height: 700px;overflow-y: auto;">
  7. <el-table-column
  8. type="week"
  9. label="星期"
  10. align="center"
  11. >
  12. <template slot-scope="scope">
  13. {{ getWeekDesc(scope.row.week)}}
  14. </template>
  15. </el-table-column>
  16. <el-table-column
  17. prop="type"
  18. label="计划类型"
  19. align="center"
  20. >
  21. <template slot-scope="scope">
  22. {{ getTypeDesc(scope.row.type)}}
  23. </template>
  24. </el-table-column>
  25. <el-table-column
  26. prop="startTime"
  27. label="起始时间"
  28. align="center"
  29. >
  30. </el-table-column>
  31. <el-table-column
  32. align="center"
  33. prop="endTime"
  34. label="结束时间"
  35. >
  36. </el-table-column>
  37. </el-table>
  38. </div>
  39. </div>
  40. <div slot="footer" class="dialog-footer">
  41. <el-button @click="onHide">关闭</el-button>
  42. </div>
  43. </DialogCom>
  44. </div>
  45. </template>
  46. <script>
  47. import {
  48. channelPlanTimeList
  49. } from "@/api/iot/videoChannelPlan";
  50. export default {
  51. name: "IotVideoChannelPlanTime",
  52. components: {},
  53. dicts: [],
  54. data() {
  55. return {
  56. isShow: false,
  57. formData: this.reset(),
  58. };
  59. },
  60. props: {},
  61. watch: {},
  62. computed: {
  63. },
  64. methods: {
  65. reset() {
  66. return {
  67. week: null,
  68. type: null,
  69. startTime: null,
  70. endTime: null,
  71. };
  72. },
  73. getWeekDesc(val){
  74. switch (val){
  75. case 1:
  76. return "星期一";
  77. case 2:
  78. return "星期二";
  79. case 3:
  80. return "星期三";
  81. case 4:
  82. return "星期四";
  83. case 5:
  84. return "星期五";
  85. case 6:
  86. return "星期六";
  87. case 7:
  88. return "星期日";
  89. }
  90. },
  91. getTypeDesc(val){
  92. //0-定时录像,1-移动侦测录像,2-报警录像,3-移动侦测或报警录像,4-移动侦测和报警录像)
  93. switch (val){
  94. case 0:
  95. return "定时录像";
  96. case 1:
  97. return "移动侦测录像";
  98. case 2:
  99. return "报警录像";
  100. case 3:
  101. return "移动侦测或报警录像";
  102. case 4:
  103. return "移动侦测和报警录像";
  104. }
  105. },
  106. async refresh(deviceId) {
  107. let query = {
  108. deviceId: deviceId,
  109. week: -1
  110. };
  111. console.log("11111")
  112. console.log("11111:"+query)
  113. channelPlanTimeList(query).then(response => {
  114. this.formData = response.data;
  115. this.loading = false;
  116. })
  117. },
  118. async show(deviceId) {
  119. await this.refresh(deviceId);
  120. this.isShow = true;
  121. },
  122. // 事件
  123. onHide() {
  124. this.isShow = false;
  125. this.formData = this.reset();
  126. },
  127. },
  128. mounted() {
  129. },
  130. };
  131. </script>
  132. <style lang="scss">
  133. </style>