From be59917bb8505a8147ed81a7a15f87f45b3c66f7 Mon Sep 17 00:00:00 2001 From: yujt Date: Thu, 23 Jul 2020 10:34:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=B0=E9=97=BB=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=88=97=E8=A1=A8=E6=A0=B7=E5=BC=8F=EF=BC=9B=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/case/typicalcase-list.vue | 78 +++++++++---------- .../modules/custom/evaluatedeptcount.vue | 4 +- src/views/modules/custom/gridoperatorinfo.vue | 6 +- src/views/modules/heart/actbanner.vue | 5 +- src/views/modules/heart/actinfo-list.vue | 2 +- src/views/modules/news/news-add-or-update.vue | 2 +- src/views/modules/news/news-healthy.vue | 8 +- src/views/modules/news/news-safety.vue | 8 +- src/views/modules/news/news-services.vue | 8 +- src/views/modules/news/news.vue | 8 +- src/views/modules/sys/deptmacode.vue | 2 +- 11 files changed, 65 insertions(+), 66 deletions(-) diff --git a/src/views/modules/case/typicalcase-list.vue b/src/views/modules/case/typicalcase-list.vue index ec7c29e..f5e07ec 100644 --- a/src/views/modules/case/typicalcase-list.vue +++ b/src/views/modules/case/typicalcase-list.vue @@ -71,7 +71,7 @@ import mixinViewModule from '@/mixins/view-module' import AddOrUpdate from './typicalcase-add-or-update' import CaseInfoDetailView from './typicalcase-detail' -import {debounce} from 'lodash' +import { debounce } from 'lodash' export default { mixins: [mixinViewModule], name: 'CaseInfoList', @@ -88,22 +88,22 @@ export default { startTime: '', endTime: '' }, - pickerBeginDateBefore: { - disabledDate: (time) => { - let beginDateVal = this.dataForm.startTime - if (beginDateVal) { - return time.getTime() > new Date(beginDateVal).getTime() - } - } - }, - pickerBeginDateAfter: { - disabledDate: (time) => { - let EndDateVal = this.dataForm.endTime - if (EndDateVal) { - return time.getTime() < new Date(EndDateVal).getTime() - } - } + pickerBeginDateBefore: { + disabledDate: (time) => { + let beginDateVal = this.dataForm.startTime + if (beginDateVal) { + return time.getTime() > new Date(beginDateVal).getTime() + } + } + }, + pickerBeginDateAfter: { + disabledDate: (time) => { + let EndDateVal = this.dataForm.endTime + if (EndDateVal) { + return time.getTime() < new Date(EndDateVal).getTime() + } } + } } }, components: { @@ -120,17 +120,17 @@ export default { }, formatState: function (row, column) { let state = row.state - if (state == 1) { + if (state === 1) { return '上架' - } else if (state == 0) { + } else if (state === 0) { return '下架' } }, - changeGroundingText(state){ + changeGroundingText (state) { let status = state - if (status == 1) { + if (status === 1) { return '下架' - } else if (status == 0) { + } else if (status === 0) { return '上架' } }, @@ -139,25 +139,25 @@ export default { this.$router.push({ path: '/case-typicalcase' }) }, changeGroundingHandle: debounce(function (row) { - this.$confirm(this.$t('prompt.info', { 'handle': this.changeGroundingText(row.state) }), this.$t('prompt.title'), { - confirmButtonText: this.$t('confirm'), - cancelButtonText: this.$t('cancel'), - type: 'warning' - }).then(() => { - this.$http.get(`/cloudAnalysis/typicalcase/updateState/${row.id}`).then(({ data: res }) => { - if (res.code !== 0) { - return this.$message.error(res.msg) - } - this.$message({ - message: this.$t('prompt.success'), - type: 'success', - duration: 500, - onClose: () => { - this.getDataList() - } - }) - }).catch(() => {}) + this.$confirm(this.$t('prompt.info', { 'handle': this.changeGroundingText(row.state) }), this.$t('prompt.title'), { + confirmButtonText: this.$t('confirm'), + cancelButtonText: this.$t('cancel'), + type: 'warning' + }).then(() => { + this.$http.get(`/cloudAnalysis/typicalcase/updateState/${row.id}`).then(({ data: res }) => { + if (res.code !== 0) { + return this.$message.error(res.msg) + } + this.$message({ + message: this.$t('prompt.success'), + type: 'success', + duration: 500, + onClose: () => { + this.getDataList() + } + }) }).catch(() => {}) + }).catch(() => {}) }, 1000, { 'leading': true, 'trailing': false }) } } diff --git a/src/views/modules/custom/evaluatedeptcount.vue b/src/views/modules/custom/evaluatedeptcount.vue index de45762..8f23ba4 100644 --- a/src/views/modules/custom/evaluatedeptcount.vue +++ b/src/views/modules/custom/evaluatedeptcount.vue @@ -78,7 +78,7 @@