|
@@ -109,6 +109,17 @@
|
|
|
二级校审详情
|
|
二级校审详情
|
|
|
</el-link>
|
|
</el-link>
|
|
|
</el-divider>
|
|
</el-divider>
|
|
|
|
|
+ <!-- 超阈值漏洞提醒(灰色字体,不明显) -->
|
|
|
|
|
+ <div v-if="overThresholdIssues.length > 0" style="padding: 8px 15px; margin-bottom: 15px; margin-left: 125px; background-color: #fafafa; border-radius: 4px;">
|
|
|
|
|
+ <div style="font-size: 13px; color: #909399; line-height: 1.6;">
|
|
|
|
|
+ <i class="el-icon-info" style="margin-right: 4px;"></i>
|
|
|
|
|
+ <span style="font-weight: 500;">常见漏洞提醒:</span>
|
|
|
|
|
+ <span v-for="(issue, index) in overThresholdIssues" :key="issue.issueId">
|
|
|
|
|
+ <span v-if="index > 0">;</span>
|
|
|
|
|
+ {{ issue.issueName }}(已标记{{ issue.markCount }}次)
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
<el-row>
|
|
<el-row>
|
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
|
<el-form-item label="明细表" prop="detailOpinion">
|
|
<el-form-item label="明细表" prop="detailOpinion">
|
|
@@ -159,9 +170,67 @@
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
+ <!-- 问题记录展示区域(被驳回人查看,非审核模式下显示) -->
|
|
|
|
|
+ <div v-if="status !== 'audit' && issueRecords.length > 0" style="background-color: #fef0f0; padding: 20px; margin: 0 -20px 20px -20px; border-radius: 4px; border-left: 4px solid #F56C6C;">
|
|
|
|
|
+ <el-divider content-position="left" style="margin: 0 0 10px 0;">
|
|
|
|
|
+ <i class="el-icon-warning" style="color: #F56C6C;"></i>
|
|
|
|
|
+ <span style="font-weight: bold; color: #F56C6C; font-size: 15px;">校审问题记录</span>
|
|
|
|
|
+ </el-divider>
|
|
|
|
|
+ <el-row>
|
|
|
|
|
+ <el-col :span="24">
|
|
|
|
|
+ <el-form-item label="问题记录">
|
|
|
|
|
+ <div style="width: 100%;">
|
|
|
|
|
+ <div v-for="(records, category) in groupedIssueRecords" :key="category" style="margin-bottom: 12px;">
|
|
|
|
|
+ <div style="color: #303133; margin-bottom: 6px; font-size: 14px; font-weight: bold;">{{ category }}</div>
|
|
|
|
|
+ <div v-for="record in records" :key="record.id" style="margin-bottom: 8px; padding-left: 30px;">
|
|
|
|
|
+ <div style="font-size: 14px; color: #303133; line-height: 1.5;">
|
|
|
|
|
+ <i class="el-icon-minus" style="color: #F56C6C; margin-right: 4px;"></i>
|
|
|
|
|
+ {{ record.issueName }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div v-if="record.issueDesc" style="font-size: 13px; color: #606266; margin-top: 2px; padding-left: 16px;">
|
|
|
|
|
+ 问题描述:{{ record.issueDesc }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div v-if="record.suggestion" style="font-size: 13px; color: #67C23A; margin-top: 2px; padding-left: 16px;">
|
|
|
|
|
+ 整改建议:{{ record.suggestion }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 问题标记区域(仅在审核模式下显示) -->
|
|
|
|
|
+ <div v-if="status === 'audit'" style="background-color: #f5f7fa; padding: 20px; margin: 0 -20px; border-radius: 4px;">
|
|
|
|
|
+ <el-divider content-position="left" style="margin: 0 0 10px 0;">
|
|
|
|
|
+ <i class="el-icon-warning" style="color: #E6A23C;"></i>
|
|
|
|
|
+ <span style="font-weight: bold; color: #F56C6C; font-size: 15px;">问题标记(选填,驳回时记录)</span>
|
|
|
|
|
+ <el-button type="primary" size="mini" icon="el-icon-plus" @click="openAddIssueDialog" style="margin-left: 15px;">添加常见问题</el-button>
|
|
|
|
|
+ </el-divider>
|
|
|
|
|
+ <el-row>
|
|
|
|
|
+ <el-col :span="24">
|
|
|
|
|
+ <el-form-item label="常见问题" prop="commonIssues">
|
|
|
|
|
+ <div v-if="commonIssueList.length > 0" style="width: 100%;">
|
|
|
|
|
+ <div v-for="(issues, category) in groupedIssues" :key="category" style="margin-bottom: 8px;">
|
|
|
|
|
+ <div style="font-weight: bold; color: #303133; margin-bottom: 4px; font-size: 14px;">{{ category }}</div>
|
|
|
|
|
+ <el-checkbox-group v-model="selectedIssueIds">
|
|
|
|
|
+ <el-checkbox v-for="issue in issues" :key="issue.id" :label="issue.id" style="display: block; margin-left: 0;">
|
|
|
|
|
+ {{ issue.issueName }}
|
|
|
|
|
+ <el-tooltip v-if="issue.issueDesc" :content="issue.issueDesc" placement="top">
|
|
|
|
|
+ <i class="el-icon-info" style="color: #909399; cursor: help; margin-left: 4px;"></i>
|
|
|
|
|
+ </el-tooltip>
|
|
|
|
|
+ </el-checkbox>
|
|
|
|
|
+ </el-checkbox-group>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div v-else style="color: #909399; font-size: 14px;">暂无常见问题字典,请点击上方按钮添加</div>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ </div>
|
|
|
|
|
|
|
|
</el-form>
|
|
</el-form>
|
|
|
- <!-- 附件-->
|
|
|
|
|
<UpLoadComponent ref="uploadComponent"></UpLoadComponent>
|
|
<UpLoadComponent ref="uploadComponent"></UpLoadComponent>
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
@@ -171,6 +240,9 @@
|
|
|
<user-select2 ref="userSelect2" @doSubmit="selectUser2"></user-select2>
|
|
<user-select2 ref="userSelect2" @doSubmit="selectUser2"></user-select2>
|
|
|
<user-select3 ref="userSelect3" @doSubmit="selectUser3"></user-select3>
|
|
<user-select3 ref="userSelect3" @doSubmit="selectUser3"></user-select3>
|
|
|
|
|
|
|
|
|
|
+ <!-- 添加自定义漏洞对话框 -->
|
|
|
|
|
+ <CommonIssueForm ref="commonIssueForm" @refreshDataList="onIssueAdded"></CommonIssueForm>
|
|
|
|
|
+
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -186,6 +258,9 @@ import UserSelect1 from '@/views/utils/UserTreeSelect'
|
|
|
import UserSelect2 from '@/views/utils/UserTreeSelect'
|
|
import UserSelect2 from '@/views/utils/UserTreeSelect'
|
|
|
import UserSelect3 from '@/views/utils/UserTreeSelect'
|
|
import UserSelect3 from '@/views/utils/UserTreeSelect'
|
|
|
import taskService from "@/api/flowable/taskService.js";
|
|
import taskService from "@/api/flowable/taskService.js";
|
|
|
|
|
+import CommonIssueService from '@/api/program/CommonIssueService'
|
|
|
|
|
+import IssueRecordService from '@/api/program/IssueRecordService'
|
|
|
|
|
+import CommonIssueForm from '@/views/program/commonIssue/CommonIssueForm'
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
props: {
|
|
props: {
|
|
@@ -237,12 +312,23 @@ export default {
|
|
|
programId: '',
|
|
programId: '',
|
|
|
supervisorList: [],
|
|
supervisorList: [],
|
|
|
keyWatch: '',
|
|
keyWatch: '',
|
|
|
- tabName: ''
|
|
|
|
|
|
|
+ tabName: '',
|
|
|
|
|
+ // 漏洞标记相关
|
|
|
|
|
+ commonIssueList: [],
|
|
|
|
|
+ selectedIssueIds: [],
|
|
|
|
|
+ // 问题记录(被驳回人查看)
|
|
|
|
|
+ issueRecords: [],
|
|
|
|
|
+ // 超阈值漏洞提醒
|
|
|
|
|
+ overThresholdIssues: []
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
programProjectListInfoService: null,
|
|
programProjectListInfoService: null,
|
|
|
|
|
+ commonIssueService: null,
|
|
|
|
|
+ issueRecordService: null,
|
|
|
created() {
|
|
created() {
|
|
|
this.programProjectListInfoService = new ProgramProjectListInfoService()
|
|
this.programProjectListInfoService = new ProgramProjectListInfoService()
|
|
|
|
|
+ this.commonIssueService = new CommonIssueService()
|
|
|
|
|
+ this.issueRecordService = new IssueRecordService()
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
|
bus: {
|
|
bus: {
|
|
@@ -253,6 +339,45 @@ export default {
|
|
|
set(val) {
|
|
set(val) {
|
|
|
this.businessId = val
|
|
this.businessId = val
|
|
|
}
|
|
}
|
|
|
|
|
+ },
|
|
|
|
|
+ groupedIssues() {
|
|
|
|
|
+ const groups = {}
|
|
|
|
|
+ this.commonIssueList.forEach(issue => {
|
|
|
|
|
+ const cat = issue.category || '其他'
|
|
|
|
|
+ if (!groups[cat]) groups[cat] = []
|
|
|
|
|
+ groups[cat].push(issue)
|
|
|
|
|
+ })
|
|
|
|
|
+ // 将"其他"分类放在最后
|
|
|
|
|
+ const sortedGroups = {}
|
|
|
|
|
+ const keys = Object.keys(groups).sort((a, b) => {
|
|
|
|
|
+ if (a === '其他') return 1
|
|
|
|
|
+ if (b === '其他') return -1
|
|
|
|
|
+ return a.localeCompare(b, 'zh')
|
|
|
|
|
+ })
|
|
|
|
|
+ keys.forEach(key => {
|
|
|
|
|
+ sortedGroups[key] = groups[key]
|
|
|
|
|
+ })
|
|
|
|
|
+ return sortedGroups
|
|
|
|
|
+ },
|
|
|
|
|
+ // 按分类分组的问题记录
|
|
|
|
|
+ groupedIssueRecords() {
|
|
|
|
|
+ const groups = {}
|
|
|
|
|
+ this.issueRecords.forEach(record => {
|
|
|
|
|
+ const cat = record.category || '其他'
|
|
|
|
|
+ if (!groups[cat]) groups[cat] = []
|
|
|
|
|
+ groups[cat].push(record)
|
|
|
|
|
+ })
|
|
|
|
|
+ // 将"其他"分类放在最后
|
|
|
|
|
+ const sortedGroups = {}
|
|
|
|
|
+ const keys = Object.keys(groups).sort((a, b) => {
|
|
|
|
|
+ if (a === '其他') return 1
|
|
|
|
|
+ if (b === '其他') return -1
|
|
|
|
|
+ return a.localeCompare(b, 'zh')
|
|
|
|
|
+ })
|
|
|
|
|
+ keys.forEach(key => {
|
|
|
|
|
+ sortedGroups[key] = groups[key]
|
|
|
|
|
+ })
|
|
|
|
|
+ return sortedGroups
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
watch: {
|
|
watch: {
|
|
@@ -286,7 +411,8 @@ export default {
|
|
|
ProjectThreeAuditFormDialog,
|
|
ProjectThreeAuditFormDialog,
|
|
|
UserSelect1,
|
|
UserSelect1,
|
|
|
UserSelect2,
|
|
UserSelect2,
|
|
|
- UserSelect3
|
|
|
|
|
|
|
+ UserSelect3,
|
|
|
|
|
+ CommonIssueForm
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
getKeyWatch(keyWatch) {
|
|
getKeyWatch(keyWatch) {
|
|
@@ -387,6 +513,47 @@ export default {
|
|
|
} else {
|
|
} else {
|
|
|
this.$refs.uploadComponent.newUpload('view', this.inputForm.workAttachmentDtoList, 'program_audit', 500, null, true, this.$store.state.user.name)
|
|
this.$refs.uploadComponent.newUpload('view', this.inputForm.workAttachmentDtoList, 'program_audit', 500, null, true, this.$store.state.user.name)
|
|
|
}
|
|
}
|
|
|
|
|
+ // 加载常见漏洞列表
|
|
|
|
|
+ console.log('=== 初始化:加载常见漏洞列表 ===')
|
|
|
|
|
+ console.log('auditLevel:', this.inputForm.auditLevel)
|
|
|
|
|
+ if (this.commonJS.isNotEmpty(this.inputForm.auditLevel)) {
|
|
|
|
|
+ this.commonIssueService.getEnabledList(this.inputForm.auditLevel).then((data) => {
|
|
|
|
|
+ console.log('常见漏洞列表加载完成,数量:', data ? data.length : 0)
|
|
|
|
|
+ this.commonIssueList = data || []
|
|
|
|
|
+ this.selectedIssueIds = []
|
|
|
|
|
+ }).catch(err => {
|
|
|
|
|
+ console.error('加载常见漏洞列表失败:', err)
|
|
|
|
|
+ })
|
|
|
|
|
+ } else {
|
|
|
|
|
+ console.log('auditLevel 为空,跳过加载常见漏洞列表')
|
|
|
|
|
+ }
|
|
|
|
|
+ // 加载问题标记记录(被驳回人查看)
|
|
|
|
|
+ console.log('=== 初始化:加载问题标记记录 ===')
|
|
|
|
|
+ console.log('inputForm.programId:', this.inputForm.programId)
|
|
|
|
|
+ console.log('inputForm.auditLevel:', this.inputForm.auditLevel)
|
|
|
|
|
+ if (this.commonJS.isNotEmpty(this.inputForm.programId) && this.commonJS.isNotEmpty(this.inputForm.auditLevel)) {
|
|
|
|
|
+ this.issueRecordService.getRecordsByProjectId(this.inputForm.programId, this.inputForm.auditLevel).then((data) => {
|
|
|
|
|
+ console.log('问题标记记录加载完成,数量:', data ? data.length : 0)
|
|
|
|
|
+ this.issueRecords = data || []
|
|
|
|
|
+ }).catch(err => {
|
|
|
|
|
+ console.error('加载问题标记记录失败:', err)
|
|
|
|
|
+ })
|
|
|
|
|
+ } else {
|
|
|
|
|
+ console.log('programId 或 auditLevel 为空,跳过加载问题标记记录')
|
|
|
|
|
+ }
|
|
|
|
|
+ // 加载超阈值漏洞提醒(当前登录人)
|
|
|
|
|
+ console.log('=== 初始化:加载超阈值漏洞提醒 ===')
|
|
|
|
|
+ const currentUserId = this.$store.state.user.id
|
|
|
|
|
+ if (this.commonJS.isNotEmpty(currentUserId) && this.commonJS.isNotEmpty(this.inputForm.auditLevel)) {
|
|
|
|
|
+ this.issueRecordService.getReminders(currentUserId, this.inputForm.auditLevel).then((data) => {
|
|
|
|
|
+ console.log('超阈值漏洞提醒加载完成,数量:', data ? data.length : 0)
|
|
|
|
|
+ this.overThresholdIssues = data || []
|
|
|
|
|
+ }).catch(err => {
|
|
|
|
|
+ console.error('加载超阈值漏洞提醒失败:', err)
|
|
|
|
|
+ })
|
|
|
|
|
+ } else {
|
|
|
|
|
+ console.log('userId 或 auditLevel 为空,跳过加载超阈值漏洞提醒')
|
|
|
|
|
+ }
|
|
|
this.loading = false
|
|
this.loading = false
|
|
|
})
|
|
})
|
|
|
})
|
|
})
|
|
@@ -530,44 +697,33 @@ export default {
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
async updateStatusById(type, callback) {
|
|
async updateStatusById(type, callback) {
|
|
|
|
|
+ console.log('=== ProjectThreeAuditForm.updateStatusById 被调用 ===')
|
|
|
|
|
+ console.log('type:', type)
|
|
|
|
|
+ console.log('callback 类型:', typeof callback)
|
|
|
this.loading = true
|
|
this.loading = true
|
|
|
if (await this.$refs.uploadComponent.checkProgress()) {
|
|
if (await this.$refs.uploadComponent.checkProgress()) {
|
|
|
|
|
+ console.log('上传进行中,中断操作')
|
|
|
this.loading = false
|
|
this.loading = false
|
|
|
throw new Error()
|
|
throw new Error()
|
|
|
} else {
|
|
} else {
|
|
|
|
|
+ console.log('上传检查通过')
|
|
|
if (type === 'reject' || type === 'reback') {
|
|
if (type === 'reject' || type === 'reback') {
|
|
|
|
|
+ console.log('进入 reject/reback 分支')
|
|
|
this.programProjectListInfoService.findByIdAudit(this.inputForm.id).then((data) => {
|
|
this.programProjectListInfoService.findByIdAudit(this.inputForm.id).then((data) => {
|
|
|
- if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
|
|
|
|
|
|
|
+ console.log('findByIdAudit 返回数据:', data)
|
|
|
|
|
+ console.log('当前状态 data.status:', data.status)
|
|
|
|
|
+ if (data.status !== '2') { // status的值不等于”审核中”,就弹出提示
|
|
|
//如果数据状态出现错误,会先去判断当前节点审核人是否是本人
|
|
//如果数据状态出现错误,会先去判断当前节点审核人是否是本人
|
|
|
taskService.getTaskAuditUsersByprocInstId(this.$route.query.procInsId).then(res => {
|
|
taskService.getTaskAuditUsersByprocInstId(this.$route.query.procInsId).then(res => {
|
|
|
- let userInfo = this.$TOOL.data.get("USER_INFO");
|
|
|
|
|
|
|
+ let userInfo = this.$TOOL.data.get('USER_INFO');
|
|
|
// 如果审核人是本人的话,则跳过数据状态的限制,可再次审批
|
|
// 如果审核人是本人的话,则跳过数据状态的限制,可再次审批
|
|
|
if (res.includes(userInfo.id)) {
|
|
if (res.includes(userInfo.id)) {
|
|
|
if (type === 'reject') {
|
|
if (type === 'reject') {
|
|
|
- // 驳回
|
|
|
|
|
- this.inputForm.status = '4'
|
|
|
|
|
- this.loading = true
|
|
|
|
|
- this.inputForm.workAttachmentDtoList = this.$refs.uploadComponent.getDataList()
|
|
|
|
|
- if (this.commonJS.isNotEmpty(this.inputForm.auditPeopleList)) {
|
|
|
|
|
- this.inputForm.programAuditAssessPeopleDtoList = []
|
|
|
|
|
- this.inputForm.auditPeopleList.split(',').forEach(item => {
|
|
|
|
|
- let i = { assessPeople: item, auditId: this.inputForm.id }
|
|
|
|
|
- this.inputForm.programAuditAssessPeopleDtoList.push(i)
|
|
|
|
|
- })
|
|
|
|
|
- } else {
|
|
|
|
|
- this.inputForm.programAuditAssessPeopleDtoList = []
|
|
|
|
|
- }
|
|
|
|
|
- this.programProjectListInfoService.saveFormThree(this.inputForm).then((data) => {
|
|
|
|
|
- this.loading = false
|
|
|
|
|
- let param = { status: this.inputForm.status, id: this.inputForm.id }
|
|
|
|
|
- this.loading = true
|
|
|
|
|
- this.programProjectListInfoService.updateStatusByAuditId(param).then(() => {
|
|
|
|
|
- this.loading = false
|
|
|
|
|
- callback()
|
|
|
|
|
- })
|
|
|
|
|
- }).catch(() => {
|
|
|
|
|
- this.loading = false
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ if (type === 'reject') {
|
|
|
|
|
+ // 驳回 - 直接执行驳回逻辑,保存漏洞标记记录
|
|
|
|
|
+ console.log('=== 执行驳回逻辑 ===')
|
|
|
|
|
+ this.doReject(callback)
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
if (type === 'reback') {
|
|
if (type === 'reback') {
|
|
|
this.inputForm.status = '3'
|
|
this.inputForm.status = '3'
|
|
@@ -588,31 +744,13 @@ export default {
|
|
|
this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在');
|
|
this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在');
|
|
|
});
|
|
});
|
|
|
} else {
|
|
} else {
|
|
|
|
|
+ console.log('=== 状态为审核中(2),进入 else 分支 ===')
|
|
|
if (type === 'reject') {
|
|
if (type === 'reject') {
|
|
|
- // 驳回
|
|
|
|
|
- this.inputForm.status = '4'
|
|
|
|
|
- this.loading = true
|
|
|
|
|
- this.inputForm.workAttachmentDtoList = this.$refs.uploadComponent.getDataList()
|
|
|
|
|
- if (this.commonJS.isNotEmpty(this.inputForm.auditPeopleList)) {
|
|
|
|
|
- this.inputForm.programAuditAssessPeopleDtoList = []
|
|
|
|
|
- this.inputForm.auditPeopleList.split(',').forEach(item => {
|
|
|
|
|
- let i = { assessPeople: item, auditId: this.inputForm.id }
|
|
|
|
|
- this.inputForm.programAuditAssessPeopleDtoList.push(i)
|
|
|
|
|
- })
|
|
|
|
|
- } else {
|
|
|
|
|
- this.inputForm.programAuditAssessPeopleDtoList = []
|
|
|
|
|
- }
|
|
|
|
|
- this.programProjectListInfoService.saveFormThree(this.inputForm).then((data) => {
|
|
|
|
|
- this.loading = false
|
|
|
|
|
- let param = { status: this.inputForm.status, id: this.inputForm.id }
|
|
|
|
|
- this.loading = true
|
|
|
|
|
- this.programProjectListInfoService.updateStatusByAuditId(param).then(() => {
|
|
|
|
|
- this.loading = false
|
|
|
|
|
- callback()
|
|
|
|
|
- })
|
|
|
|
|
- }).catch(() => {
|
|
|
|
|
- this.loading = false
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ if (type === 'reject') {
|
|
|
|
|
+ // 驳回 - 直接执行驳回逻辑,保存漏洞标记记录
|
|
|
|
|
+ console.log('=== 执行驳回逻辑 (status=2) ===')
|
|
|
|
|
+ this.doReject(callback)
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
if (type === 'reback') {
|
|
if (type === 'reback') {
|
|
|
this.inputForm.status = '3'
|
|
this.inputForm.status = '3'
|
|
@@ -791,6 +929,85 @@ export default {
|
|
|
this.inputForm.auditPeopleName = user[0].name
|
|
this.inputForm.auditPeopleName = user[0].name
|
|
|
this.inputForm.auditPeople = user[0].id
|
|
this.inputForm.auditPeople = user[0].id
|
|
|
},
|
|
},
|
|
|
|
|
+ // 打开添加自定义漏洞对话框
|
|
|
|
|
+ openAddIssueDialog() {
|
|
|
|
|
+ this.$refs.commonIssueForm.init('add', null, this.inputForm.auditLevel)
|
|
|
|
|
+ },
|
|
|
|
|
+ // 漏洞添加成功后的回调
|
|
|
|
|
+ onIssueAdded() {
|
|
|
|
|
+ console.log('=== onIssueAdded 被调用 ===')
|
|
|
|
|
+ console.log('当前 auditLevel:', this.inputForm.auditLevel)
|
|
|
|
|
+ // 重新加载常见漏洞列表
|
|
|
|
|
+ if (this.commonJS.isNotEmpty(this.inputForm.auditLevel)) {
|
|
|
|
|
+ this.commonIssueService.getEnabledList(this.inputForm.auditLevel).then((data) => {
|
|
|
|
|
+ console.log('getEnabledList 返回数据:', data)
|
|
|
|
|
+ console.log('数据数量:', data ? data.length : 0)
|
|
|
|
|
+ if (data && data.length > 0) {
|
|
|
|
|
+ console.log('第一条数据:', data[0])
|
|
|
|
|
+ }
|
|
|
|
|
+ this.commonIssueList = data || []
|
|
|
|
|
+ this.selectedIssueIds = []
|
|
|
|
|
+ console.log('commonIssueList 更新后:', this.commonIssueList)
|
|
|
|
|
+ }).catch(err => {
|
|
|
|
|
+ console.error('重新加载常见漏洞列表失败:', err)
|
|
|
|
|
+ })
|
|
|
|
|
+ } else {
|
|
|
|
|
+ console.log('auditLevel 为空,跳过重新加载')
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ // 执行驳回逻辑
|
|
|
|
|
+ doReject(callback) {
|
|
|
|
|
+ this.inputForm.status = '4'
|
|
|
|
|
+ this.loading = true
|
|
|
|
|
+ this.inputForm.workAttachmentDtoList = this.$refs.uploadComponent.getDataList()
|
|
|
|
|
+ if (this.commonJS.isNotEmpty(this.inputForm.auditPeopleList)) {
|
|
|
|
|
+ this.inputForm.programAuditAssessPeopleDtoList = []
|
|
|
|
|
+ this.inputForm.auditPeopleList.split(',').forEach(item => {
|
|
|
|
|
+ let i = { assessPeople: item, auditId: this.inputForm.id }
|
|
|
|
|
+ this.inputForm.programAuditAssessPeopleDtoList.push(i)
|
|
|
|
|
+ })
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.inputForm.programAuditAssessPeopleDtoList = []
|
|
|
|
|
+ }
|
|
|
|
|
+ this.programProjectListInfoService.saveFormThree(this.inputForm).then((data) => {
|
|
|
|
|
+ this.loading = false
|
|
|
|
|
+ let param = { status: this.inputForm.status, id: this.inputForm.id }
|
|
|
|
|
+ this.loading = true
|
|
|
|
|
+ this.programProjectListInfoService.updateStatusByAuditId(param).then(() => {
|
|
|
|
|
+ this.loading = false
|
|
|
|
|
+ // 保存漏洞标记记录
|
|
|
|
|
+ this.saveIssueRecords(callback)
|
|
|
|
|
+ })
|
|
|
|
|
+ }).catch(() => {
|
|
|
|
|
+ this.loading = false
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ // 保存漏洞标记记录
|
|
|
|
|
+ saveIssueRecords(callback) {
|
|
|
|
|
+ const targetUserId = this.inputForm.programProjectListInfo.createBy || this.inputForm.programProjectListInfo.projectManager
|
|
|
|
|
+
|
|
|
|
|
+ if (!this.selectedIssueIds || this.selectedIssueIds.length === 0) {
|
|
|
|
|
+ // 没有选择任何漏洞,直接执行回调
|
|
|
|
|
+ if (callback) callback()
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 保存漏洞标记记录
|
|
|
|
|
+ this.issueRecordService.saveRecords({
|
|
|
|
|
+ projectId: this.inputForm.programId,
|
|
|
|
|
+ auditId: this.inputForm.id,
|
|
|
|
|
+ auditLevel: this.inputForm.auditLevel,
|
|
|
|
|
+ issueIds: this.selectedIssueIds,
|
|
|
|
|
+ targetUserId: targetUserId
|
|
|
|
|
+ }).then(() => {
|
|
|
|
|
+ console.log('漏洞标记记录保存成功')
|
|
|
|
|
+ if (callback) callback()
|
|
|
|
|
+ }).catch((err) => {
|
|
|
|
|
+ console.error('漏洞标记记录保存失败:', err)
|
|
|
|
|
+ // 即使失败也继续执行驳回
|
|
|
|
|
+ if (callback) callback()
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|
|
@@ -807,4 +1024,19 @@ export default {
|
|
|
font-size: 16px;
|
|
font-size: 16px;
|
|
|
font-weight: bold;
|
|
font-weight: bold;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+/* 问题标记区域样式调整 */
|
|
|
|
|
+/deep/ .el-checkbox-group {
|
|
|
|
|
+ line-height: 1.4;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+/deep/ .el-checkbox {
|
|
|
|
|
+ margin-bottom: 0;
|
|
|
|
|
+ margin-right: 0;
|
|
|
|
|
+ line-height: 1.4;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+/deep/ .el-checkbox + .el-checkbox {
|
|
|
|
|
+ margin-left: 0;
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|