From 66529a1a88daadaaf225a0102e7b40951a61616c Mon Sep 17 00:00:00 2001 From: zhaomeijing Date: Thu, 19 May 2022 15:51:32 +0800 Subject: [PATCH] =?UTF-8?q?[add]=20=E6=88=AA=E8=87=B3=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/TaskCutOffTime/index.vue | 40 +++++-------------- 1 file changed, 11 insertions(+), 29 deletions(-) diff --git a/jero-web/src/components/TaskCutOffTime/index.vue b/jero-web/src/components/TaskCutOffTime/index.vue index bfe24e98e..44086b7ea 100644 --- a/jero-web/src/components/TaskCutOffTime/index.vue +++ b/jero-web/src/components/TaskCutOffTime/index.vue @@ -31,6 +31,7 @@ import axios from 'axios' import Vue from 'vue' import { ACCESS_TOKEN } from '@/store/mutation-types' import moment from 'moment' +import eventBUs from '../../common/event' export default { name: 'diolagArea', components: {}, @@ -105,35 +106,16 @@ export default { //新增 handleSubmit() { let _this = this - let param = {ids: this.selectedRowKeysArray, deadline: `"${this.pickerDate}"`, } - axios({ - url: '/jero-boot/params/collectManifest/updateDeadlineBatch', - method: 'post', - data: param, - transformRequest: [function (data) { - let ret = '' - for (let it in data) { - ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&' - } - return ret - }], - headers: { - 'Content-Type': 'application/x-www-form-urlencoded', - 'X-Access-Token':_this.token - } - }) - .then( (res) =>{ - if (res.data.success) { - _this.$message.success(res.data.result) - _this.loadData() - this.$emit('areaVisibleTaskCutOffTimeflag', false) - }else{ - _this.$message.warning(res.data.result) - } - }) - .catch( (error) =>{ - console.log(error); - }); + let param = {ids: this.selectedRowKeysArray, deadline: `${this.pickerDate}`, } + postAction('/params/collectManifest/updateDeadlineBatch', param).then((res) => { + if (res.success) { + this.loadData() + this.$emit('areaVisibleTaskCutOffTimeflag', false) + this.$message.success(res.message) + } else { + this.$message.warning(res.message) + } + }) }, onChange(val) { this.pickerDate = moment(val).format('YYYY-MM-DD HH:mm:ss')