|
@@ -189,6 +189,8 @@
|
|
|
selectedIndicators: [],
|
|
selectedIndicators: [],
|
|
|
// 原始数据源(用于过滤)
|
|
// 原始数据源(用于过滤)
|
|
|
rawDataSource: null,
|
|
rawDataSource: null,
|
|
|
|
|
+ // 项目被监审单位选项
|
|
|
|
|
+ projectAuditedUnitOptions: [],
|
|
|
// 分页相关属性
|
|
// 分页相关属性
|
|
|
trendTotalPages: 0,
|
|
trendTotalPages: 0,
|
|
|
trendCurrentPage: 1,
|
|
trendCurrentPage: 1,
|
|
@@ -217,8 +219,52 @@
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
handleProjectChange() {
|
|
handleProjectChange() {
|
|
|
|
|
+ // 清空之前的选择
|
|
|
|
|
+ this.searchForm.auditedUnitId = ''
|
|
|
|
|
+ this.searchForm.auditedUnitName = ''
|
|
|
|
|
+ this.searchForm.startYear = ''
|
|
|
|
|
+ this.searchForm.endYear = ''
|
|
|
|
|
+ this.projectAuditedUnitOptions = []
|
|
|
|
|
+
|
|
|
if (this.searchForm.projectId) {
|
|
if (this.searchForm.projectId) {
|
|
|
// 获取项目的被监审单位,监审期间
|
|
// 获取项目的被监审单位,监审期间
|
|
|
|
|
+ const selectedProject = this.projectOptions.find(
|
|
|
|
|
+ (item) => item.projectId === this.searchForm.projectId
|
|
|
|
|
+ )
|
|
|
|
|
+
|
|
|
|
|
+ if (selectedProject) {
|
|
|
|
|
+ // 设置被监审单位选项
|
|
|
|
|
+ if (selectedProject.auditedUnitId) {
|
|
|
|
|
+ const unit = selectedProject.auditedUnitId.split(',')
|
|
|
|
|
+ this.auditedUnitOptions.forEach((item) => {
|
|
|
|
|
+ if (unit.includes(item.unitId)) {
|
|
|
|
|
+ this.projectAuditedUnitOptions.push(item)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 设置监审期间
|
|
|
|
|
+ if (selectedProject.auditPeriod) {
|
|
|
|
|
+ if (typeof selectedProject.auditPeriod === 'string') {
|
|
|
|
|
+ const auditPeriod = selectedProject.auditPeriod
|
|
|
|
|
+ .split(',')
|
|
|
|
|
+ .map((year) => year.trim())
|
|
|
|
|
+ // 转换为数字并过滤无效年份
|
|
|
|
|
+ const yearNumbers = auditPeriod
|
|
|
|
|
+ .map((year) => parseInt(year, 10))
|
|
|
|
|
+ .filter((year) => !isNaN(year) && year > 0)
|
|
|
|
|
+
|
|
|
|
|
+ if (yearNumbers.length > 0) {
|
|
|
|
|
+ // 计算最小和最大年份
|
|
|
|
|
+ const start = Math.min(...yearNumbers)
|
|
|
|
|
+ const end = Math.max(...yearNumbers)
|
|
|
|
|
+ // 确保赋值为字符串类型
|
|
|
|
|
+ this.searchForm.startYear = start.toString()
|
|
|
|
|
+ this.searchForm.endYear = end.toString()
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
// 初始化图表
|
|
// 初始化图表
|