|
@@ -166,6 +166,27 @@
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
+ <!-- 常见漏洞标记 -->
|
|
|
|
|
+ <el-divider content-position="left"><i class="el-icon-warning"></i> 常见漏洞标记(选填)</el-divider>
|
|
|
|
|
+ <el-row>
|
|
|
|
|
+ <el-col :span="24">
|
|
|
|
|
+ <div v-if="commonIssueList.length > 0" style="padding: 0 10px;">
|
|
|
|
|
+ <div v-for="(issues, category) in groupedIssues" :key="category" style="margin-bottom: 12px;">
|
|
|
|
|
+ <div style="font-weight: bold; color: #606266; margin-bottom: 6px; font-size: 14px;">{{ category }}</div>
|
|
|
|
|
+ <el-checkbox-group v-model="selectedIssueIds" :disabled="status === 'taskFormDetail' || method === 'view'">
|
|
|
|
|
+ <el-checkbox v-for="issue in issues" :key="issue.id" :label="issue.id"
|
|
|
|
|
+ style="display: block; margin-bottom: 4px; margin-left: 10px;">
|
|
|
|
|
+ {{ issue.issueName }}
|
|
|
|
|
+ <el-tooltip v-if="issue.issueDesc" :content="issue.issueDesc" placement="top">
|
|
|
|
|
+ <el-icon style="color: #909399; cursor: help;"><info-filled /></el-icon>
|
|
|
|
|
+ </el-tooltip>
|
|
|
|
|
+ </el-checkbox>
|
|
|
|
|
+ </el-checkbox-group>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div v-else style="color: #909399; padding: 10px;">暂无适用的常见漏洞</div>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
|
|
|
</el-form>
|
|
</el-form>
|
|
|
<!-- 附件-->
|
|
<!-- 附件-->
|
|
@@ -200,6 +221,9 @@ import ProjectThreeAuditFormDialog from './ProjectThreeAuditFormDialog'
|
|
|
import UserSelect1 from '@/views/utils/UserTreeSelect'
|
|
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 CommonIssueService from '@/api/program/CommonIssueService'
|
|
|
|
|
+import IssueRecordService from '@/api/program/IssueRecordService'
|
|
|
|
|
+import { InfoFilled } from '@element-plus/icons-vue'
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
props: {
|
|
props: {
|
|
@@ -251,12 +275,18 @@ export default {
|
|
|
programId: '',
|
|
programId: '',
|
|
|
supervisorList: [],
|
|
supervisorList: [],
|
|
|
keyWatch: '',
|
|
keyWatch: '',
|
|
|
- tabName: ''
|
|
|
|
|
|
|
+ tabName: '',
|
|
|
|
|
+ commonIssueList: [],
|
|
|
|
|
+ selectedIssueIds: []
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
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: {
|
|
@@ -267,6 +297,15 @@ 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)
|
|
|
|
|
+ })
|
|
|
|
|
+ return groups
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
watch: {
|
|
watch: {
|
|
@@ -300,7 +339,8 @@ export default {
|
|
|
ProjectThreeAuditFormDialog,
|
|
ProjectThreeAuditFormDialog,
|
|
|
UserSelect1,
|
|
UserSelect1,
|
|
|
UserSelect2,
|
|
UserSelect2,
|
|
|
- UserSelect3
|
|
|
|
|
|
|
+ UserSelect3,
|
|
|
|
|
+ InfoFilled
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
getKeyWatch(keyWatch) {
|
|
getKeyWatch(keyWatch) {
|
|
@@ -393,6 +433,11 @@ 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)
|
|
|
}
|
|
}
|
|
|
|
|
+ // 加载常见漏洞列表
|
|
|
|
|
+ this.commonIssueService.getEnabledList(this.inputForm.auditLevel).then((data) => {
|
|
|
|
|
+ this.commonIssueList = data || []
|
|
|
|
|
+ this.selectedIssueIds = []
|
|
|
|
|
+ })
|
|
|
this.loading = false
|
|
this.loading = false
|
|
|
})
|
|
})
|
|
|
})
|
|
})
|
|
@@ -418,7 +463,20 @@ export default {
|
|
|
this.inputForm.programAuditAssessPeopleDtoList = []
|
|
this.inputForm.programAuditAssessPeopleDtoList = []
|
|
|
}
|
|
}
|
|
|
this.programProjectListInfoService.saveFormThree(this.inputForm).then((data) => {
|
|
this.programProjectListInfoService.saveFormThree(this.inputForm).then((data) => {
|
|
|
- this.$message.success('操作成功')
|
|
|
|
|
|
|
+ // 保存常见漏洞标记
|
|
|
|
|
+ if (this.selectedIssueIds && this.selectedIssueIds.length > 0) {
|
|
|
|
|
+ this.issueRecordService.saveRecords({
|
|
|
|
|
+ projectId: this.inputForm.programId,
|
|
|
|
|
+ auditId: this.inputForm.id,
|
|
|
|
|
+ auditLevel: this.inputForm.auditLevel,
|
|
|
|
|
+ issueIds: this.selectedIssueIds,
|
|
|
|
|
+ targetUserId: this.inputForm.programProjectListInfo.projectManager || this.inputForm.programProjectListInfo.createBy
|
|
|
|
|
+ }).then(() => {
|
|
|
|
|
+ this.$message.success('操作成功')
|
|
|
|
|
+ }).catch(() => {})
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message.success('操作成功')
|
|
|
|
|
+ }
|
|
|
this.loading = false
|
|
this.loading = false
|
|
|
this.$emit('refreshDataList')
|
|
this.$emit('refreshDataList')
|
|
|
this.close()
|
|
this.close()
|
|
@@ -457,6 +515,8 @@ export default {
|
|
|
auditPeopleList: '',
|
|
auditPeopleList: '',
|
|
|
auditPeopleListName: ''
|
|
auditPeopleListName: ''
|
|
|
}
|
|
}
|
|
|
|
|
+ this.commonIssueList = []
|
|
|
|
|
+ this.selectedIssueIds = []
|
|
|
this.$refs.inputForm.resetFields()
|
|
this.$refs.inputForm.resetFields()
|
|
|
this.visible = false
|
|
this.visible = false
|
|
|
},
|
|
},
|