|
|
@@ -151,10 +151,10 @@
|
|
|
<div class="content_item">
|
|
|
<span
|
|
|
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" />
|
|
|
- {{ specialBtn[typeId].path | getReportName }}
|
|
|
+ {{ getSpecialBtnPath(typeId) | getReportName }}
|
|
|
</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -309,6 +309,10 @@ export default {
|
|
|
hasPermission: true,
|
|
|
specialType,
|
|
|
specialBtn,
|
|
|
+ reportPath: {
|
|
|
+ internalAudit: '',
|
|
|
+ managementReview: ''
|
|
|
+ },
|
|
|
listConfig: {
|
|
|
toolbars: [{ key: 'search' }],
|
|
|
searchForm: {
|
|
|
@@ -433,6 +437,9 @@ export default {
|
|
|
reocrdsBoxShowStartDate: showCompileTime = false,
|
|
|
reocrdsBoxShowEndDate: showEndTime = true
|
|
|
} = await getSetting('system')
|
|
|
+ const { internalAudit = '', managementReview = '' } =
|
|
|
+ (await getSetting('report')) || {}
|
|
|
+ this.reportPath = { internalAudit, managementReview }
|
|
|
this.sorts = showCompileTime
|
|
|
? { COMPILE_TIME: 'DESC' }
|
|
|
: { END_TIME_: 'DESC' }
|
|
|
@@ -487,6 +494,12 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
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) {
|
|
|
const t = cellValue === '管理评审计划'
|
|
|
if (t) {
|
|
|
@@ -752,12 +765,22 @@ export default {
|
|
|
getSearcFormData() {
|
|
|
const temp = this.$refs['crud']?.getSearcFormData() || {}
|
|
|
const parameters = this.getParams(temp) || []
|
|
|
- const creator = parameters.filter(i => i.key.includes('create_by_'))
|
|
|
- let others = parameters.filter(i => !i.key.includes('create_by_'))
|
|
|
+ const creator = parameters.filter((i) => i.key.includes('create_by_'))
|
|
|
+ let others = parameters.filter((i) => !i.key.includes('create_by_'))
|
|
|
|
|
|
// 提取部门条件(key为'Q^subject_^SL')并合并为 OR 组
|
|
|
- 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')
|
|
|
+ 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
|
|
|
if (deptConditions.length > 1) {
|
|
|
@@ -792,7 +815,7 @@ export default {
|
|
|
relation: 'AND',
|
|
|
parameters: [
|
|
|
{ key: 'Q^status_^S', value: 'end' },
|
|
|
- ...finalOthers // 这里部门组已是OR或单个
|
|
|
+ ...finalOthers // 这里部门组已是OR或单个
|
|
|
]
|
|
|
},
|
|
|
{
|
|
|
@@ -802,7 +825,10 @@ export default {
|
|
|
]
|
|
|
}
|
|
|
],
|
|
|
- requestPage: { pageNo: this.pagination.page || 1, limit: this.pagination.limit || 100 },
|
|
|
+ requestPage: {
|
|
|
+ pageNo: this.pagination.page || 1,
|
|
|
+ limit: this.pagination.limit || 100
|
|
|
+ },
|
|
|
...ActionUtils.formatParams(null, null, this.sorts)
|
|
|
}
|
|
|
|
|
|
@@ -814,20 +840,21 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
if (!creator.length) {
|
|
|
- params.parameters[0].parameters[1].parameters = this.userList.map(i => ({
|
|
|
- key: 'Q^create_by_^S',
|
|
|
- value: i.userId,
|
|
|
- param: this.$utils.guid()
|
|
|
- }))
|
|
|
+ params.parameters[0].parameters[1].parameters = this.userList.map(
|
|
|
+ (i) => ({
|
|
|
+ key: 'Q^create_by_^S',
|
|
|
+ value: i.userId,
|
|
|
+ param: this.$utils.guid()
|
|
|
+ })
|
|
|
+ )
|
|
|
}
|
|
|
return params
|
|
|
},
|
|
|
getParams(data) {
|
|
|
-
|
|
|
const result = []
|
|
|
const special = ['dept', 'tableName', 'desc', 'createBy']
|
|
|
Object.keys(data).forEach((key) => {
|
|
|
- console.log('222222222',key, data[key])
|
|
|
+ console.log('222222222', key, data[key])
|
|
|
if (special.includes(key)) {
|
|
|
if (key === 'createBy') {
|
|
|
// 转换用户ID
|
|
|
@@ -841,7 +868,8 @@ export default {
|
|
|
res.forEach((i) => {
|
|
|
result.push({ key: 'Q^create_by_^SL', value: i })
|
|
|
})
|
|
|
- } else if (key === 'dept') { //formName transDesc dep
|
|
|
+ } else if (key === 'dept') {
|
|
|
+ //formName transDesc dep
|
|
|
if (this.deptSelect) {
|
|
|
result.push({ key: 'Q^dep^SL', value: data[key] })
|
|
|
} else {
|
|
|
@@ -859,7 +887,7 @@ export default {
|
|
|
}
|
|
|
} else if (key === 'tableName') {
|
|
|
result.push({ key: 'Q^formName^SL', value: data[key] })
|
|
|
- } else if (key === 'desc'){
|
|
|
+ } else if (key === 'desc') {
|
|
|
result.push({ key: 'Q^transDesc^SL', value: data[key] })
|
|
|
}
|
|
|
// else {
|
|
|
@@ -880,7 +908,7 @@ export default {
|
|
|
// 处理排序
|
|
|
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'
|
|
|
}
|
|
|
console.log(sort, '更新后')
|