调整前端代码格式符合ESLint规范

This commit is contained in:
zer0Black
2023-02-28 22:43:03 +08:00
parent f5e5990a3b
commit 77b1ca8f0d
48 changed files with 3199 additions and 3179 deletions
+40 -40
View File
@@ -32,48 +32,48 @@
</template>
<script>
import {downloadFile} from "@/utils/downloadFile";
import {formatDate} from '@/utils/date'
import { downloadFile } from '@/utils/downloadFile'
import { formatDate } from '@/utils/date'
export default {
name: "ReportDetail",
data(){
return {
watermarkText: '', // 水印
content: '',
row: {},
}
},
methods: {
// 预览
previewRow() {
if(!this.$route.query.row){
this.$router.push({path: '/report/list', query: {id: this.$route.query.id}});
return
}
this.watermarkText = `${this.$store.state.userInfo.usname} ${formatDate(+new Date(), 'yyyy年MM月dd日 hh:mm:ss')}`;
this.row = JSON.parse(this.$route.query.row);
this.$api.report.reportGetReportHtmlId({id: this.row.id}).then(({data}) => {
this.content = data.content;
})
},
// 下载
downloadRow(row){
// this.$confirm('此操作将下载所选数据文件, 是否继续?', '提示', {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// type: 'warning'
// }).then(() => {
this.$api.report.reportDownload({fileId: row.fileId}).then(res => {
downloadFile(res);
})
// })
}
},
created() {
this.previewRow();
}
export default {
name: 'ReportDetail',
data () {
return {
watermarkText: '', // 水印
content: '',
row: {}
}
},
methods: {
// 预览
previewRow () {
if (!this.$route.query.row) {
this.$router.push({ path: '/report/list', query: { id: this.$route.query.id } })
return
}
this.watermarkText = `${this.$store.state.userInfo.usname} ${formatDate(+new Date(), 'yyyy年MM月dd日 hh:mm:ss')}`
this.row = JSON.parse(this.$route.query.row)
this.$api.report.reportGetReportHtmlId({ id: this.row.id }).then(({ data }) => {
this.content = data.content
})
},
// 下载
downloadRow (row) {
// this.$confirm('此操作将下载所选数据文件, 是否继续?', '提示', {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// type: 'warning'
// }).then(() => {
this.$api.report.reportDownload({ fileId: row.fileId }).then(res => {
downloadFile(res)
})
// })
}
},
created () {
this.previewRow()
}
}
</script>
<style lang="scss" scoped>