Browse Source

fix: original publishing function

Casper Dai 3 years ago
parent
commit
cd2b119122
3 changed files with 12 additions and 15 deletions
  1. 1 0
      src/api/publish.js
  2. 6 9
      src/views/schedule/deploy/index.vue
  3. 5 6
      src/views/schedule/history/index.vue

+ 1 - 0
src/api/publish.js

@@ -1,5 +1,6 @@
 import request from '@/utils/request'
 import {
+  confirm,
   messageSend,
   resolve,
   reject

+ 6 - 9
src/views/schedule/deploy/index.vue

@@ -121,18 +121,16 @@
 </template>
 
 <script>
+import { getSchedules } from '@/api/calendar'
+import { publishSchedule } from '@/api/publish'
 import {
-  getSchedules,
-  publishSchedule
-} from '@/api/calendar'
+  State,
+  ScheduleType
+} from '@/constant'
 import {
   createListOptions,
   parseTime
 } from '@/utils'
-import {
-  State,
-  ScheduleType
-} from '@/constant'
 import DeviceTree from '@/components/DeviceTree'
 
 export default {
@@ -149,7 +147,6 @@ export default {
       startDateTime: null,
       endDateTime: null,
       scheduleTypes: [
-        { value: void 0, label: '全部类型' },
         { value: ScheduleType.CALENDAR, label: '日程' },
         { value: ScheduleType.RECUR, label: '轮播' }
       ],
@@ -272,7 +269,7 @@ export default {
       }
       this.scheduleOptions = createListOptions({
         status: State.RESOLVED,
-        type: void 0
+        type: ScheduleType.CALENDAR
       })
       this.isFilterSchedules = true
       this.getSchedules()

+ 5 - 6
src/views/schedule/history/index.vue

@@ -63,7 +63,7 @@
       </el-table-column>
     </c-table>
     <el-dialog
-      :visible.sync="isPreview"
+      :visible.sync="isPreviewing"
       custom-class="c-preview schedule"
       :before-close="onCloseScheduleDialog"
     >
@@ -92,7 +92,7 @@ export default {
   data () {
     return {
       options: createListOptions({ status: State.RESOLVED }),
-      isPreview: false,
+      isPreviewing: false,
       scheduleId: null
     }
   },
@@ -121,7 +121,7 @@ export default {
           type: '排期',
           target: {
             type: PublishType.CALENDAR,
-            id: programCalendarId
+            detail: programCalendarId
           },
           desc: endDateTime ? `${startDateTime} - ${endDateTime}` : `自${startDateTime}开始`
         }
@@ -193,14 +193,13 @@ export default {
     },
     viewSchedule (id) {
       this.scheduleId = id
-      this.isPreview = true
+      this.isPreviewing = true
     },
     onCloseScheduleDialog () {
       this.scheduleId = null
-      this.isPreview = false
+      this.isPreviewing = false
     },
     viewProgram (id) {
-      console.log(id)
       window.open(this.$router.resolve({
         name: 'view',
         params: { id }