03c4d3d2 by lihua

从空值到下拉选择值,不提示是否确定切换

1 parent 789df37a
......@@ -387,11 +387,10 @@ const handleProductBaseFormSelectChange = (val, row, info) => {
info.scenario = ''; //清空下应用场景
setProductBaseFormItems(info);
} else if (row.field == 'productName') {
// TODO, 带出资产登记的所有信息。更新产品登记名称
transferRegistName();
let da = val && registerCatalogList.value.find(r => r.guid == val);
if (da) {
proxy.$openMessageBox("切换到其它产品后,当前修改会被重置,确定切换?", () => {
let exec = () => {
oldProductName.value = info.productName;
fullscreenLoading.value = true;
getRegisterCatalogDetail(da.guid).then((res: any) => {
......@@ -479,11 +478,18 @@ const handleProductBaseFormSelectChange = (val, row, info) => {
}).catch(err => {
fullscreenLoading.value = false;
})
}, () => {
info.productName = oldProductName.value;
setProductBaseFormItems(info);
proxy.$ElMessage.info("已取消");
});
}
if (!oldProductName.value && val) {
exec();
} else {
proxy.$openMessageBox("切换到其它产品后,当前修改会被重置,确定切换?", () => {
exec();
}, () => {
info.productName = oldProductName.value;
setProductBaseFormItems(info);
proxy.$ElMessage.info("已取消");
});
}
} else {
oldProductName.value = info.productName;
}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!