|
@@ -151,10 +151,12 @@
|
|
|
<div class="content_item">
|
|
<div class="content_item">
|
|
|
<span
|
|
<span
|
|
|
style="cursor: pointer"
|
|
style="cursor: pointer"
|
|
|
- @click="openReport(specialBtn[typeId].path, item.id_)"
|
|
|
|
|
|
|
+ @click="
|
|
|
|
|
+ openReport(getSpecialBtnPath(typeId), item.id_)
|
|
|
|
|
+ "
|
|
|
>
|
|
>
|
|
|
<i class="el-icon-tickets" style="font-size: 14px" />
|
|
<i class="el-icon-tickets" style="font-size: 14px" />
|
|
|
- {{ specialBtn[typeId].path | getReportName }}
|
|
|
|
|
|
|
+ {{ getSpecialBtnPath(typeId) | getReportName }}
|
|
|
</span>
|
|
</span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -309,6 +311,10 @@ export default {
|
|
|
hasPermission: true,
|
|
hasPermission: true,
|
|
|
specialType,
|
|
specialType,
|
|
|
specialBtn,
|
|
specialBtn,
|
|
|
|
|
+ reportPath: {
|
|
|
|
|
+ internalAudit: '',
|
|
|
|
|
+ managementReview: ''
|
|
|
|
|
+ },
|
|
|
listConfig: {
|
|
listConfig: {
|
|
|
toolbars: [{ key: 'search' }],
|
|
toolbars: [{ key: 'search' }],
|
|
|
searchForm: {
|
|
searchForm: {
|
|
@@ -433,6 +439,9 @@ export default {
|
|
|
reocrdsBoxShowStartDate: showCompileTime = false,
|
|
reocrdsBoxShowStartDate: showCompileTime = false,
|
|
|
reocrdsBoxShowEndDate: showEndTime = true
|
|
reocrdsBoxShowEndDate: showEndTime = true
|
|
|
} = await getSetting('system')
|
|
} = await getSetting('system')
|
|
|
|
|
+ const { internalAudit = '', managementReview = '' } =
|
|
|
|
|
+ (await getSetting('report')) || {}
|
|
|
|
|
+ this.reportPath = { internalAudit, managementReview }
|
|
|
this.sorts = showCompileTime
|
|
this.sorts = showCompileTime
|
|
|
? { COMPILE_TIME: 'DESC' }
|
|
? { COMPILE_TIME: 'DESC' }
|
|
|
: { END_TIME_: 'DESC' }
|
|
: { END_TIME_: 'DESC' }
|
|
@@ -487,6 +496,12 @@ export default {
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ // 按当前 typeId 取润乾路径:配置为空字符串或未配置时使用 specialBtn 默认值
|
|
|
|
|
+ getSpecialBtnPath(typeId) {
|
|
|
|
|
+ const btn = this.specialBtn[typeId]
|
|
|
|
|
+ if (!btn) return ''
|
|
|
|
|
+ return this.reportPath[btn.reportKey] || btn.path
|
|
|
|
|
+ },
|
|
|
replaceFormName(row, column, cellValue, index) {
|
|
replaceFormName(row, column, cellValue, index) {
|
|
|
const t = cellValue === '管理评审计划'
|
|
const t = cellValue === '管理评审计划'
|
|
|
if (t) {
|
|
if (t) {
|
|
@@ -756,8 +771,18 @@ export default {
|
|
|
let others = parameters.filter((i) => !i.key.includes('create_by_'))
|
|
let others = parameters.filter((i) => !i.key.includes('create_by_'))
|
|
|
|
|
|
|
|
// 提取部门条件(key为'Q^subject_^SL')并合并为 OR 组
|
|
// 提取部门条件(key为'Q^subject_^SL')并合并为 OR 组
|
|
|
- const deptConditions = others.filter((i) => i.key === 'Q^subject_^SL')
|
|
|
|
|
- const nonDeptConditions = others.filter((i) => i.key !== 'Q^subject_^SL')
|
|
|
|
|
|
|
+ const deptConditions = others.filter(
|
|
|
|
|
+ (i) =>
|
|
|
|
|
+ i.key === 'Q^dep^SL' ||
|
|
|
|
|
+ i.key === 'Q^formName^SL' ||
|
|
|
|
|
+ i.key === 'Q^transDesc^SL'
|
|
|
|
|
+ )
|
|
|
|
|
+ const nonDeptConditions = others.filter(
|
|
|
|
|
+ (i) =>
|
|
|
|
|
+ i.key !== 'Q^dep^SL' &&
|
|
|
|
|
+ i.key !== 'Q^formName^SL' &&
|
|
|
|
|
+ i.key !== 'Q^transDesc^SL'
|
|
|
|
|
+ )
|
|
|
|
|
|
|
|
let deptGroup = null
|
|
let deptGroup = null
|
|
|
if (deptConditions.length > 1) {
|
|
if (deptConditions.length > 1) {
|
|
@@ -770,7 +795,9 @@ export default {
|
|
|
deptGroup = deptConditions[0]
|
|
deptGroup = deptConditions[0]
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // 重新构建 others:非部门条件 + 部门组(如果有)
|
|
|
|
|
|
|
+ console.log('好好好', deptConditions, nonDeptConditions)
|
|
|
|
|
+
|
|
|
|
|
+ // 重新构建 others:非部门条件 + 部门组(如果有)什么情况才会有
|
|
|
const finalOthers = [...nonDeptConditions]
|
|
const finalOthers = [...nonDeptConditions]
|
|
|
if (deptGroup) {
|
|
if (deptGroup) {
|
|
|
// 如果deptGroup是对象且具有relation,则作为子组;否则作为单个条件
|
|
// 如果deptGroup是对象且具有relation,则作为子组;否则作为单个条件
|
|
@@ -829,6 +856,7 @@ export default {
|
|
|
const result = []
|
|
const result = []
|
|
|
const special = ['dept', 'tableName', 'desc', 'createBy']
|
|
const special = ['dept', 'tableName', 'desc', 'createBy']
|
|
|
Object.keys(data).forEach((key) => {
|
|
Object.keys(data).forEach((key) => {
|
|
|
|
|
+ console.log('222222222', key, data[key])
|
|
|
if (special.includes(key)) {
|
|
if (special.includes(key)) {
|
|
|
if (key === 'createBy') {
|
|
if (key === 'createBy') {
|
|
|
// 转换用户ID
|
|
// 转换用户ID
|
|
@@ -843,25 +871,32 @@ export default {
|
|
|
result.push({ key: 'Q^create_by_^SL', value: i })
|
|
result.push({ key: 'Q^create_by_^SL', value: i })
|
|
|
})
|
|
})
|
|
|
} else if (key === 'dept') {
|
|
} else if (key === 'dept') {
|
|
|
|
|
+ //formName transDesc dep
|
|
|
if (this.deptSelect) {
|
|
if (this.deptSelect) {
|
|
|
- result.push({ key: 'Q^subject_^SL', value: data[key] })
|
|
|
|
|
|
|
+ result.push({ key: 'Q^dep^SL', value: data[key] })
|
|
|
} else {
|
|
} else {
|
|
|
// 转换部门ID
|
|
// 转换部门ID
|
|
|
const t = this.deptList.filter((i) =>
|
|
const t = this.deptList.filter((i) =>
|
|
|
i.positionName.includes(data[key])
|
|
i.positionName.includes(data[key])
|
|
|
)
|
|
)
|
|
|
if (!t.length) {
|
|
if (!t.length) {
|
|
|
- result.push({ key: 'Q^subject_^SL', value: data[key] })
|
|
|
|
|
|
|
+ result.push({ key: 'Q^dep^SL', value: data[key] })
|
|
|
}
|
|
}
|
|
|
const res = t.map((i) => i.positionId)
|
|
const res = t.map((i) => i.positionId)
|
|
|
res.forEach((i) => {
|
|
res.forEach((i) => {
|
|
|
- result.push({ key: 'Q^subject_^SL', value: i })
|
|
|
|
|
|
|
+ result.push({ key: 'Q^dep^SL', value: i })
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
- } else {
|
|
|
|
|
- result.push({ key: 'Q^subject_^SL', value: data[key] })
|
|
|
|
|
|
|
+ } else if (key === 'tableName') {
|
|
|
|
|
+ result.push({ key: 'Q^formName^SL', value: data[key] })
|
|
|
|
|
+ } else if (key === 'desc') {
|
|
|
|
|
+ result.push({ key: 'Q^transDesc^SL', value: data[key] })
|
|
|
}
|
|
}
|
|
|
|
|
+ // else {
|
|
|
|
|
+ // result.push({ key: 'Q^subject_^SL', value: data[key] })
|
|
|
|
|
+ // }
|
|
|
} else {
|
|
} else {
|
|
|
|
|
+ console.log('不会走', key)
|
|
|
result.push({ key, value: data[key] })
|
|
result.push({ key, value: data[key] })
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
@@ -874,6 +909,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
// 处理排序
|
|
// 处理排序
|
|
|
handleSortChange(sort) {
|
|
handleSortChange(sort) {
|
|
|
|
|
+ console.log(sort, '2222222222')
|
|
|
if (sort && sort.sortBy && sort.sortBy == 'COMPILE_TIME_') {
|
|
if (sort && sort.sortBy && sort.sortBy == 'COMPILE_TIME_') {
|
|
|
sort.sortBy = 'COMPILE_TIME'
|
|
sort.sortBy = 'COMPILE_TIME'
|
|
|
}
|
|
}
|