|
@@ -22,23 +22,21 @@
|
|
|
</div>
|
|
|
<div class="report-text">
|
|
|
<span class="report-text-type">{{ item.projectTypeName }}测算表</span>
|
|
|
- <span> 一 </span>
|
|
|
- <span class="report-text-name">{{ item.calculateName }}
|
|
|
- </span>
|
|
|
+ <span>一</span>
|
|
|
+ <span class="report-text-name">{{ item.calculateName }}</span>
|
|
|
<div style="margin-top: 5px;">
|
|
|
<span>
|
|
|
<el-icon>
|
|
|
<Avatar />
|
|
|
</el-icon>
|
|
|
- {{ item.principal }}</span>
|
|
|
+ {{ item.principal }}
|
|
|
+ </span>
|
|
|
<!-- <span>
|
|
|
<el-tag style="margin-left: 5px;">
|
|
|
{{ item.projectTypeName }}
|
|
|
</el-tag>
|
|
|
- </span> -->
|
|
|
- <span style="float: right; color:darkgrey">
|
|
|
- {{ item.createTime }}
|
|
|
- </span>
|
|
|
+ </span>-->
|
|
|
+ <span style="float: right; color:darkgrey">{{ item.createTime }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="report-button" @click.stop="downloadFile(item.docUrl, item.docName)">
|
|
@@ -53,18 +51,16 @@
|
|
|
</div>
|
|
|
<div class="report-text">
|
|
|
<span class="report-text-type">{{ item.projectTypeName }}报告</span>
|
|
|
- <span> 一 </span>
|
|
|
- <span class="report-text-name">{{ item.reportName }}
|
|
|
- </span>
|
|
|
+ <span>一</span>
|
|
|
+ <span class="report-text-name">{{ item.reportName }}</span>
|
|
|
<div style="margin-top: 5px;">
|
|
|
<span>
|
|
|
<el-icon>
|
|
|
<Avatar />
|
|
|
</el-icon>
|
|
|
- {{ item.principal }}</span>
|
|
|
- <span style="float: right; color:darkgrey">
|
|
|
- {{ item.createTime }}
|
|
|
+ {{ item.principal }}
|
|
|
</span>
|
|
|
+ <span style="float: right; color:darkgrey">{{ item.createTime }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="report-button" @click.stop="downloadFile(item.docUrl, item.docName)">
|
|
@@ -79,9 +75,9 @@
|
|
|
|
|
|
<script>
|
|
|
import { mapStores } from 'pinia'
|
|
|
-import { assetsProjectInfo } from '@/stores/assetsProjectStore';
|
|
|
-import { getUnFinishedCalculateProgress, listAllCalculateByProjectId } from '@/api/assetsCalculate';
|
|
|
-import { getUnFinishedReportProgress, listAllReportByProjectId } from '@/api/assetsReport';
|
|
|
+import { assetsProjectInfo } from '@/stores/assetsProjectStore'
|
|
|
+import { getUnFinishedCalculateProgress, listAllCalculateByProjectId } from '@/api/assetsCalculate'
|
|
|
+import { getUnFinishedReportProgress, listAllReportByProjectId } from '@/api/assetsReport'
|
|
|
import fileUtil from '@/utils/file'
|
|
|
|
|
|
export default {
|
|
@@ -92,92 +88,112 @@ export default {
|
|
|
projectInfo: {},
|
|
|
folderName: null,
|
|
|
calculateList: [],
|
|
|
- reportList: []
|
|
|
+ reportList: [],
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
...mapStores(assetsProjectInfo),
|
|
|
},
|
|
|
created() {
|
|
|
- this.projectInfo = this.$route.query;
|
|
|
- this.getCalculateList();
|
|
|
- this.getReportList();
|
|
|
+ this.projectInfo = this.$route.query
|
|
|
+ this.getCalculateList()
|
|
|
+ this.getReportList()
|
|
|
},
|
|
|
methods: {
|
|
|
createNewCalculate() {
|
|
|
- this.$router.push({ path: '/home/assets/workbench/calculate/baseInfo', query: { 'projectId': this.projectInfo.projectId } })
|
|
|
+ if (this.projectStore.projectInfo.projectTypeName === '机器设备') {
|
|
|
+ this.$router.push({ path: '/home/assets/workbench/eqpt/calculate/baseInfo', query: { projectId: this.projectInfo.projectId } })
|
|
|
+ } else if (this.projectStore.projectInfo.projectTypeName === '债权') {
|
|
|
+ this.$router.push('/home/assets/workbench/cr/calculate/baseInfo')
|
|
|
+ }
|
|
|
},
|
|
|
createNewReport() {
|
|
|
- this.$router.push({ path: '/home/assets/workbench/report/baseInfo', query: { 'projectId': this.projectInfo.projectId } })
|
|
|
- },
|
|
|
- nextFolder() {
|
|
|
-
|
|
|
+ if (this.projectStore.projectInfo.projectTypeName === '机器设备') {
|
|
|
+ this.$router.push({ path: '/home/assets/workbench/eqpt/report/baseInfo', query: { projectId: this.projectInfo.projectId } })
|
|
|
+ } else if (this.projectStore.projectInfo.projectTypeName === '债权') {
|
|
|
+ console.log('跳转债权')
|
|
|
+ }
|
|
|
},
|
|
|
+ nextFolder() {},
|
|
|
// 获取未完成测算表的进度信息并保存到缓存
|
|
|
getCalculateProgress() {
|
|
|
- getUnFinishedCalculateProgress(this.projectStore.projectInfo.id).then(res => {
|
|
|
+ getUnFinishedCalculateProgress(this.projectStore.projectInfo.id).then((res) => {
|
|
|
if (res.data) {
|
|
|
- // 根据不同进度跳转到不同步骤页面
|
|
|
- if (res.data.progress === 'IMPORT' || res.data.progress === 'GENERATE' || res.data.progress === 'FINISHED') {
|
|
|
- this.$router.push('/home/assets/workbench/calculate/importInfo')
|
|
|
- } else if (res.data.progress === 'BASE') {
|
|
|
- this.$router.push('/home/assets/workbench/calculate/eqptBaseInfo')
|
|
|
+ // 项目类型也需要判断,不同项目类型页面不同
|
|
|
+ if (this.projectStore.projectInfo.projectTypeName === '机器设备') {
|
|
|
+ // 根据不同进度跳转到不同步骤页面
|
|
|
+ if (res.data.progress === 'IMPORT' || res.data.progress === 'GENERATE' || res.data.progress === 'FINISHED') {
|
|
|
+ this.$router.push('/home/assets/workbench/eqpt/calculate/importInfo')
|
|
|
+ } else if (res.data.progress === 'BASE') {
|
|
|
+ this.$router.push('/home/assets/workbench/eqpt/calculate/eqptBaseInfo')
|
|
|
+ }
|
|
|
+ } else if (this.projectStore.projectInfo.projectTypeName === '债权') {
|
|
|
+ this.$router.push('/home/assets/workbench/cr/calculate/baseInfo')
|
|
|
}
|
|
|
- this.projectStore.setCalculateProgress(res.data);
|
|
|
+ this.projectStore.setCalculateProgress(res.data)
|
|
|
} else {
|
|
|
// 为空说明没有未完成的测算,从头开始新建
|
|
|
- this.createNewCalculate();
|
|
|
- this.projectStore.removeCalculateProgress();
|
|
|
+ this.createNewCalculate()
|
|
|
+ this.projectStore.removeCalculateProgress()
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
// 获取未完成报告的进度信息并保存到缓存
|
|
|
getReportProgress() {
|
|
|
- getUnFinishedReportProgress(this.projectStore.projectInfo.id).then(res => {
|
|
|
+ getUnFinishedReportProgress(this.projectStore.projectInfo.id).then((res) => {
|
|
|
if (res.data) {
|
|
|
// 根据不同进度跳转到不同步骤页面
|
|
|
if (res.data.progress === 'BASE' || res.data.progress === 'GENERATE') {
|
|
|
- this.$router.push('/home/assets/workbench/report/eqptBaseInfo')
|
|
|
+ this.$router.push('/home/assets/workbench/eqpt/report/eqptBaseInfo')
|
|
|
}
|
|
|
- this.projectStore.setReportProgress(res.data);
|
|
|
+ this.projectStore.setReportProgress(res.data)
|
|
|
} else {
|
|
|
// 为空说明没有未完成的报告,从头开始新建
|
|
|
- this.createNewReport();
|
|
|
- this.projectStore.removeReportProgress();
|
|
|
+ this.createNewReport()
|
|
|
+ this.projectStore.removeReportProgress()
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
// 前往测算表详情
|
|
|
goCalculateBench(item) {
|
|
|
- this.projectStore.setCalculateProgress(item);
|
|
|
- // 根据不同进度跳转到不同步骤页面
|
|
|
- if (item.progress === 'IMPORT' || item.progress === 'GENERATE' || item.progress === 'FINISHED') {
|
|
|
- this.$router.push('/home/assets/workbench/calculate/importInfo')
|
|
|
- } else if (item.progress === 'BASE') {
|
|
|
- this.$router.push('/home/assets/workbench/calculate/eqptBaseInfo')
|
|
|
+ this.projectStore.setCalculateProgress(item)
|
|
|
+ if (this.projectStore.projectInfo.projectTypeName === '机器设备') {
|
|
|
+ // 根据不同进度跳转到不同步骤页面
|
|
|
+ if (item.progress === 'IMPORT' || item.progress === 'GENERATE' || item.progress === 'FINISHED') {
|
|
|
+ this.$router.push('/home/assets/workbench/eqpt/calculate/importInfo')
|
|
|
+ } else if (item.progress === 'BASE') {
|
|
|
+ this.$router.push('/home/assets/workbench/eqpt/calculate/eqptBaseInfo')
|
|
|
+ }
|
|
|
+ } else if (this.projectStore.projectInfo.projectTypeName === '债权') {
|
|
|
+ console.log('跳转债权')
|
|
|
}
|
|
|
},
|
|
|
// 前往报告详情
|
|
|
goReportBench(item) {
|
|
|
- this.projectStore.setReportProgress(item);
|
|
|
- // 根据不同进度跳转到不同步骤页面
|
|
|
- if (item.progress === 'BASE' || item.progress === 'GENERATE' || item.progress === 'FINISHED') {
|
|
|
- this.$router.push('/home/assets/workbench/report/eqptBaseInfo')
|
|
|
+ this.projectStore.setReportProgress(item)
|
|
|
+ // 项目类型也需要判断,不同项目类型页面不同
|
|
|
+ if (this.projectStore.projectInfo.projectTypeName === '机器设备') {
|
|
|
+ // 根据不同进度跳转到不同步骤页面
|
|
|
+ if (item.progress === 'BASE' || item.progress === 'GENERATE' || item.progress === 'FINISHED') {
|
|
|
+ this.$router.push('/home/assets/workbench/eqpt/report/eqptBaseInfo')
|
|
|
+ }
|
|
|
+ } else if (this.projectStore.projectInfo.projectTypeName === '债权') {
|
|
|
+ console.log('跳转债权')
|
|
|
}
|
|
|
},
|
|
|
// 获取测算表list
|
|
|
getCalculateList() {
|
|
|
- listAllCalculateByProjectId(this.projectStore.projectInfo.id).then(res => {
|
|
|
+ listAllCalculateByProjectId(this.projectStore.projectInfo.id).then((res) => {
|
|
|
if (res.data) {
|
|
|
- this.calculateList = res.data;
|
|
|
+ this.calculateList = res.data
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
// 获取报告list
|
|
|
getReportList() {
|
|
|
- listAllReportByProjectId(this.projectStore.projectInfo.id).then(res => {
|
|
|
+ listAllReportByProjectId(this.projectStore.projectInfo.id).then((res) => {
|
|
|
if (res.data) {
|
|
|
- this.reportList = res.data;
|
|
|
+ this.reportList = res.data
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -185,18 +201,17 @@ export default {
|
|
|
downloadFile(docUrl, docName) {
|
|
|
if (docUrl && docName) {
|
|
|
let downloadUrl = '/file/download?fileDiskPath=' + docUrl + '&fileName=' + docName
|
|
|
- fileUtil.download(downloadUrl);
|
|
|
+ fileUtil.download(downloadUrl)
|
|
|
} else {
|
|
|
ElMessage({
|
|
|
showClose: true,
|
|
|
message: '文档还未生成,请完成生成步骤!',
|
|
|
- type: 'warning'
|
|
|
+ type: 'warning',
|
|
|
})
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
}
|
|
|
-
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
@@ -209,7 +224,6 @@ export default {
|
|
|
margin-left: 160px;
|
|
|
margin-right: 160px;
|
|
|
padding: 50px 20px 20px 20px;
|
|
|
-
|
|
|
}
|
|
|
|
|
|
.contrl {
|
|
@@ -217,7 +231,6 @@ export default {
|
|
|
border-right: 1.5px #dae1eb solid;
|
|
|
padding: 0px 20px 20px 0px;
|
|
|
float: left;
|
|
|
-
|
|
|
}
|
|
|
|
|
|
.report-div {
|
|
@@ -254,7 +267,6 @@ export default {
|
|
|
padding-left: 10px;
|
|
|
padding-right: 10px;
|
|
|
margin-left: 20px;
|
|
|
-
|
|
|
}
|
|
|
|
|
|
.createNew-div:hover {
|