发起变更几个插件字段添加
This commit is contained in:
@@ -65,6 +65,7 @@ const save = async () => {
|
||||
});
|
||||
if(!error){
|
||||
window.$message?.success("保存成功");
|
||||
getDetail();
|
||||
}
|
||||
loading.value = false;
|
||||
};
|
||||
@@ -72,9 +73,12 @@ const save = async () => {
|
||||
// AI整理如表、入表
|
||||
const enterToTable = (type: string, row: any) => {
|
||||
if(type==='single'){
|
||||
if(!row?.id){
|
||||
return window.$message?.warning("请先保存再入表");
|
||||
}
|
||||
const enrichedRow:any[] = [];
|
||||
enrichedRow.push({
|
||||
...row,
|
||||
id: row?.id || 0,
|
||||
scene: row?.scene_desc || '',
|
||||
source: 'RISK',
|
||||
item: row?.risk_item || '',
|
||||
@@ -82,15 +86,20 @@ const enterToTable = (type: string, row: any) => {
|
||||
safeguards: row?.safeguards || '',
|
||||
suggestions: row?.suggestions || '',
|
||||
residual_level: row?.residual_risk_value || '',
|
||||
to_pssr: 0
|
||||
to_pssr: 0,
|
||||
source_row_id: row?.id || 0,
|
||||
});
|
||||
emit('toTable',type,enrichedRow);
|
||||
}
|
||||
if(type==='all'){
|
||||
const result = riskRecords.value.filter((item:any) => !item.id);
|
||||
if(result.length){
|
||||
return window.$message?.warning("请先保存再入表");
|
||||
}
|
||||
const enrichedRows:any[] = [];
|
||||
riskRecords.value.forEach((row:any) => {
|
||||
enrichedRows.push({
|
||||
...row,
|
||||
id: row?.id || 0,
|
||||
scene: row?.scene_desc || '',
|
||||
source: 'RISK',
|
||||
item: row?.risk_item || '',
|
||||
@@ -98,7 +107,8 @@ const enterToTable = (type: string, row: any) => {
|
||||
safeguards: row?.safeguards || '',
|
||||
suggestions: row?.suggestions || '',
|
||||
residual_level: row?.residual_risk_value || '',
|
||||
to_pssr: 0
|
||||
to_pssr: 0,
|
||||
source_row_id: row?.id || 0,
|
||||
});
|
||||
})
|
||||
emit('toTable',type,enrichedRows);
|
||||
@@ -135,8 +145,8 @@ const getWorkers = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
// 获取JSA详情
|
||||
const getJsaDetail = async () => {
|
||||
// 获取详情
|
||||
const getDetail = async () => {
|
||||
loading.value = true;
|
||||
const {data,error} = await riskPreDetailApi(props.currentId);
|
||||
if(!error){
|
||||
@@ -148,7 +158,7 @@ const getJsaDetail = async () => {
|
||||
|
||||
onMounted(() => {
|
||||
getWorkers();
|
||||
getJsaDetail();
|
||||
getDetail();
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user