Преглед изворни кода

取消定时任务接口调用

cfort пре 2 година
родитељ
комит
82f235d4e1
2 измењених фајлова са 43 додато и 81 уклоњено
  1. 37 36
      src/views/system/dashboard/page.vue
  2. 6 45
      src/views/system/homepage/index.vue

+ 37 - 36
src/views/system/dashboard/page.vue

@@ -272,42 +272,43 @@ export default {
         if (savedDate !== today) {
             // this.getPeriodTask()
         }
-        StatisticsData().then(data => {
-            this.scheduledTask = true
-            // 将参数替换成对应参数
-            // if (data.state === 200 && data.variables.data.length > 0) {
-            //     const h = this.$createElement
-            //     const cont = data.variables.data
-            //     for (let i = 0; i < cont.length; i++) {
-            //         window.setTimeout(() => {
-            //             this.infoMessage[i] = this.$notify.info({
-            //                 title: '定时任务:' + cont[i].ren_wu_biao_ti_,
-            //                 message: h('p', null, [
-            //                     h('span', null, '任务时间: ' + cont[i].ren_wu_shi_jian_),
-            //                     h('br'),
-            //                     h('span', null, '任务内容: '),
-            //                     h('span', { style: 'color: #FF8C00;font-size:12px;' }, cont[i].ding_shi_ren_wu_n),
-            //                     h('br'),
-            //                     h('el-button', {
-            //                         attrs: {
-            //                             size: 'mini',
-            //                             plain: true
-            //                         },
-            //                         on: {
-            //                             click: () => {
-            //                                 this.infoMessage[i].close()
-            //                             } // 路由加载之后,调用关闭消息弹窗的方法
-            //                         }
-            //                     }, '忽略关闭')
-            //                 ]),
-            //                 duration: 0
-            //             })
-            //         }, 0)
-            //     }
-            // }
-        }).catch(() => {
-            this.scheduledTask = true
-        })
+        // 定时任务通过后端job启动
+        // StatisticsData().then(data => {
+        //     this.scheduledTask = true
+        //     // 将参数替换成对应参数
+        //     // if (data.state === 200 && data.variables.data.length > 0) {
+        //     //     const h = this.$createElement
+        //     //     const cont = data.variables.data
+        //     //     for (let i = 0; i < cont.length; i++) {
+        //     //         window.setTimeout(() => {
+        //     //             this.infoMessage[i] = this.$notify.info({
+        //     //                 title: '定时任务:' + cont[i].ren_wu_biao_ti_,
+        //     //                 message: h('p', null, [
+        //     //                     h('span', null, '任务时间: ' + cont[i].ren_wu_shi_jian_),
+        //     //                     h('br'),
+        //     //                     h('span', null, '任务内容: '),
+        //     //                     h('span', { style: 'color: #FF8C00;font-size:12px;' }, cont[i].ding_shi_ren_wu_n),
+        //     //                     h('br'),
+        //     //                     h('el-button', {
+        //     //                         attrs: {
+        //     //                             size: 'mini',
+        //     //                             plain: true
+        //     //                         },
+        //     //                         on: {
+        //     //                             click: () => {
+        //     //                                 this.infoMessage[i].close()
+        //     //                             } // 路由加载之后,调用关闭消息弹窗的方法
+        //     //                         }
+        //     //                     }, '忽略关闭')
+        //     //                 ]),
+        //     //                 duration: 0
+        //     //             })
+        //     //         }, 0)
+        //     //     }
+        //     // }
+        // }).catch(() => {
+        //     this.scheduledTask = true
+        // })
     },
     beforeDestroy () {
         for (let i = 0; i < this.infoMessage.length; i++) {

+ 6 - 45
src/views/system/homepage/index.vue

@@ -161,7 +161,7 @@ export default {
             reportPath: BASE_API() + BUSINESS_BASE_URL() + '/sys/SysDataContext/replaceReportFile',
             layout: null,
             colNum: 24,
-            rowHeight: 33,
+            rowHeight: 30,
             isDraggable: false,
             isResizable: false,
             isMirrored: false,
@@ -239,42 +239,6 @@ export default {
         if (savedDate !== today) {
             // this.getPeriodTask()
         }
-        StatisticsData().then(data => {
-            this.scheduledTask = true
-            // 将参数替换成对应参数
-            // if (data.state === 200 && data.variables.data.length > 0) {
-            //     const h = this.$createElement
-            //     const cont = data.variables.data
-            //     for (let i = 0; i < cont.length; i++) {
-            //         window.setTimeout(() => {
-            //             this.infoMessage[i] = this.$notify.info({
-            //                 title: '定时任务:' + cont[i].ren_wu_biao_ti_,
-            //                 message: h('p', null, [
-            //                     h('span', null, '任务时间: ' + cont[i].ren_wu_shi_jian_),
-            //                     h('br'),
-            //                     h('span', null, '任务内容: '),
-            //                     h('span', { style: 'color: #FF8C00;font-size:12px;' }, cont[i].ding_shi_ren_wu_n),
-            //                     h('br'),
-            //                     h('el-button', {
-            //                         attrs: {
-            //                             size: 'mini',
-            //                             plain: true
-            //                         },
-            //                         on: {
-            //                             click: () => {
-            //                                 this.infoMessage[i].close()
-            //                             } // 路由加载之后,调用关闭消息弹窗的方法
-            //                         }
-            //                     }, '忽略关闭')
-            //                 ]),
-            //                 duration: 0
-            //             })
-            //         }, 0)
-            //     }
-            // }
-        }).catch(() => {
-            this.scheduledTask = true
-        })
     },
     beforeDestroy () {
         for (let i = 0; i < this.infoMessage.length; i++) {
@@ -338,14 +302,14 @@ export default {
             }, 100)
         },
         getHeight (h) {
-            if(document.body.clientWidth>1366&&document.body.clientWidth<1920){
-                let mH = (1920-1366)/(33-23)
-                this.rowHeight=((document.body.clientWidth-1366)/mH)+23
+            if (document.body.clientWidth > 1366 && document.body.clientWidth < 1920) {
+                const mH = (1920 - 1366) / (33 - 23)
+                this.rowHeight = ((document.body.clientWidth - 1366) / mH) + 23
                 // let mH = (1925-768)/(33-23)
                 // this.rowHeight=((document.body.clientWidth-768)/mH)+17
                 // console.log(this.rowHeight)
-            }else if(document.body.clientWidth<=1366){
-                this.rowHeight=23
+            } else if (document.body.clientWidth <= 1366) {
+                this.rowHeight = 23
             }
             return (h - 1) * (this.rowHeight + this.margin[1]) + this.margin[1]
         },
@@ -419,9 +383,6 @@ export default {
             this.ibpsMessageDialogVisible = true
             this.messageEditId = id
         },
-        fileErr (err, file, fileList) {
-            this.$message.error('文件上传失败,请检查格式!')
-        },
         handleFlow (params) {
             this.defId = params.defId || null
             this.taskId = params.taskId || null