diff --git a/src/components/table/report/ReportTable.vue b/src/components/table/report/ReportTable.vue index 3681c697..2be79dae 100644 --- a/src/components/table/report/ReportTable.vue +++ b/src/components/table/report/ReportTable.vue @@ -292,7 +292,7 @@ export default { loadingTableId: '', loadingPreviewId: '', downDataList: [], - disableEdit:false,//编辑按钮是否不可用,当选择多条记录的时候你,编辑按钮不可用 + disableEdit: false, // 编辑按钮是否不可用,当选择多条记录的时候你,编辑按钮不可用 // pageObj: { // pageNo: 1, // pageSize: 20, @@ -542,9 +542,9 @@ export default { // this.selectIds = selectIds } this.batchDeleteObjs = objs - if(objs.length > 1) { + if (objs.length > 1) { this.disableEdit = true - }else { + } else { this.disableEdit = false } }, @@ -566,9 +566,9 @@ export default { } this.batchDeleteObjs = objs - if(objs.length > 1) { + if (objs.length > 1) { this.disableEdit = true - }else { + } else { this.disableEdit = false } diff --git a/src/mixins/data-list.js b/src/mixins/data-list.js index 543e1d5d..cf71e37d 100644 --- a/src/mixins/data-list.js +++ b/src/mixins/data-list.js @@ -37,7 +37,7 @@ export default { tableData: [], scrollbarWrap: null, delFlag: false, - disableEdit:false,//编辑按钮是否不可用,当选择多条记录的时候你,编辑按钮不可用 + disableEdit: false, // 编辑按钮是否不可用,当选择多条记录的时候你,编辑按钮不可用 operationWidth: '165' // 操作列宽 } }, @@ -75,9 +75,9 @@ export default { }, selectionChange (objs) { this.batchDeleteObjs = objs - if(this.batchDeleteObjs.length > 1) { + if (this.batchDeleteObjs.length > 1) { this.disableEdit = true - }else { + } else { this.disableEdit = false } }, @@ -129,18 +129,18 @@ export default { }) }, delBatch () { - let ids = [] - if(this.batchDeleteObjs && this.batchDeleteObjs.length > 0){ - this.batchDeleteObjs.forEach(item =>{ + const ids = [] + if (this.batchDeleteObjs && this.batchDeleteObjs.length > 0) { + this.batchDeleteObjs.forEach(item => { ids.push(item.id) }) } - if(ids.length === 0){ - this.$alert(this.$t('tip.pleaseSelect'),{ + if (ids.length === 0) { + this.$alert(this.$t('tip.pleaseSelect'), { confirmButtonText: this.$t('tip.yes'), - type:'warning' + type: 'warning' }) - }else { + } else { this.$confirm(this.$t('tip.confirmDelete'), { confirmButtonText: this.$t('tip.yes'), cancelButtonText: this.$t('tip.no'), @@ -199,13 +199,13 @@ export default { } }) }, - editSelectRecord(){ - if(this.batchDeleteObjs.length === 0){ - this.$alert(this.$t('tip.pleaseSelectForEdit'),{ + editSelectRecord () { + if (this.batchDeleteObjs.length === 0) { + this.$alert(this.$t('tip.pleaseSelectForEdit'), { confirmButtonText: this.$t('tip.yes'), - type:'warning' + type: 'warning' }) - }else { + } else { get(`${this.url}/${this.batchDeleteObjs[0].id}`).then(response => { if (response.code === 200) { this.object = response.data diff --git a/src/utils/api.js b/src/utils/api.js index 94fadf4a..840928e2 100644 --- a/src/utils/api.js +++ b/src/utils/api.js @@ -20,7 +20,7 @@ export const api = { login: '/sys/login', // user user: '/sys/user', - timezone:'/sys/timezones', + timezone: '/sys/timezones', // 获取配置 config: '/sys/config', // role diff --git a/src/utils/date-util.js b/src/utils/date-util.js index 73e53976..31918886 100644 --- a/src/utils/date-util.js +++ b/src/utils/date-util.js @@ -1,5 +1,5 @@ import _ from 'lodash' -import {storageKey} from '@/utils/constants' +import { storageKey } from '@/utils/constants' // 将时间转化为秒 export function getSecond (time) { diff --git a/src/views/administration/Appearance.vue b/src/views/administration/Appearance.vue index 714cf295..6971eade 100644 --- a/src/views/administration/Appearance.vue +++ b/src/views/administration/Appearance.vue @@ -57,137 +57,136 @@ diff --git a/src/views/report/Report.vue b/src/views/report/Report.vue index a39064ad..a6ef3f93 100644 --- a/src/views/report/Report.vue +++ b/src/views/report/Report.vue @@ -295,13 +295,13 @@ export default { this.rightBox.show = true }, editReport () { - if(this.batchDeleteObjs.length === 0){ - this.$alert(this.$t('tip.pleaseSelectForEdit'),{ + if (this.batchDeleteObjs.length === 0) { + this.$alert(this.$t('tip.pleaseSelectForEdit'), { confirmButtonText: this.$t('tip.yes'), - type:'warning' + type: 'warning' }) - }else { - let curRecord = this.batchDeleteObjs[0] + } else { + const curRecord = this.batchDeleteObjs[0] this.initConfig(curRecord) this.object = curRecord this.rightBox.show = true