|
@@ -601,36 +601,31 @@ const reportModalClick = async () => {
|
|
|
projectId: projectId.value,
|
|
|
contractId: contractId.value
|
|
|
})
|
|
|
- if (tabTypeKey.value === 'mark') {
|
|
|
- reportIds.value = tableFormId.value
|
|
|
- const { error, code, data } = await firstApi.queryFirstDocumentTitle({
|
|
|
- projectId: projectId.value,
|
|
|
- contractId: contractId.value,
|
|
|
- queryId: tableFormId.value
|
|
|
- })
|
|
|
- //判断状态
|
|
|
- if (!error && code === 200 && isString(data)) {
|
|
|
- reportTaskName.value = data
|
|
|
+ if (taskCheck) {
|
|
|
+ if (tabTypeKey.value === 'mark') {
|
|
|
+ reportIds.value = tableFormId.value
|
|
|
+ const { data } = await firstApi.queryFirstDocumentTitle({
|
|
|
+ projectId: projectId.value,
|
|
|
+ contractId: contractId.value,
|
|
|
+ queryId: tableFormId.value
|
|
|
+ })
|
|
|
+ reportTaskName.value = isString(data) ? data ?? '' : ''
|
|
|
} else {
|
|
|
- reportTaskName.value = ''
|
|
|
- }
|
|
|
- } else {
|
|
|
- reportIds.value = rowsToId(rows)
|
|
|
- //设置任务数据
|
|
|
- let reportDataArr = []
|
|
|
- rows.forEach(item => {
|
|
|
- reportDataArr.push({
|
|
|
- id: item?.id,
|
|
|
- name: item?.name
|
|
|
+ reportIds.value = rowsToId(rows)
|
|
|
+ //设置任务数据
|
|
|
+ let reportDataArr = []
|
|
|
+ rows.forEach(item => {
|
|
|
+ reportDataArr.push({
|
|
|
+ id: item?.id,
|
|
|
+ name: item?.name
|
|
|
+ })
|
|
|
})
|
|
|
- })
|
|
|
- reportDatas.value = reportDataArr
|
|
|
- //其他数据
|
|
|
- reportTypeData.value = rows[0]['id']
|
|
|
- reportTaskName.value = rows.length > 1?`${rows[0].name}等${rows.length}个文件`:rows[0].name
|
|
|
- }
|
|
|
- reportLoading.value = false
|
|
|
- if (taskCheck) {
|
|
|
+ reportDatas.value = reportDataArr
|
|
|
+ //其他数据
|
|
|
+ reportTypeData.value = rows[0]['id']
|
|
|
+ reportTaskName.value = rows.length > 1?`${rows[0].name}等${rows.length}个文件`:rows[0].name
|
|
|
+ }
|
|
|
+ reportLoading.value = false
|
|
|
//附加数据
|
|
|
reportAddition.value = {
|
|
|
classify: 1,
|
|
@@ -639,6 +634,8 @@ const reportModalClick = async () => {
|
|
|
contractIdRelation: contractIdRelation ?? contractId.value,
|
|
|
}
|
|
|
showReportModal.value = true
|
|
|
+ } else {
|
|
|
+ reportLoading.value = false
|
|
|
}
|
|
|
} else {
|
|
|
window.$message?.warning('暂无相关数据')
|