|
@@ -518,17 +518,23 @@ const CheckItem = () => {
|
|
|
"score":parseInt(formData.score), // 分数
|
|
|
"itemAttrs":formData.itemAttrs,
|
|
|
}
|
|
|
- const param = {
|
|
|
+ const param =/^[a-zA-Z]+$/.test(formData.checkModeList)?{
|
|
|
"id":item.checkItemId,
|
|
|
"checkModeList": formData.checkModeList, // 查核方式
|
|
|
"name":formData.checkItemName, // 名称必填
|
|
|
"relatedRules":formData.relatedRules, // 相关条文
|
|
|
"rightAnswerImage":item.rightAnswerImage,// 应知应会图片url
|
|
|
"rightAnswerText":formData.rightAnswerText, // 应知应会文字
|
|
|
+ }:{
|
|
|
+ "id":item.checkItemId,
|
|
|
+ "name":formData.checkItemName, // 名称必填
|
|
|
+ "relatedRules":formData.relatedRules, // 相关条文
|
|
|
+ "rightAnswerImage":item.rightAnswerImage,// 应知应会图片url
|
|
|
+ "rightAnswerText":formData.rightAnswerText, // 应知应会文字
|
|
|
}
|
|
|
|
|
|
- console.log({param,item})
|
|
|
-
|
|
|
+ // console.log({param,item,paramForCheckItemresult})
|
|
|
+ // return;
|
|
|
const editCheckItemFunc = ()=>{
|
|
|
editCheckItem(param).then(res=>{
|
|
|
if(res&&res.data.msg=="success"){
|
|
@@ -536,7 +542,7 @@ const CheckItem = () => {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
//不存在查核属性id时,调用查核属性新增
|
|
|
if(item.attrId){
|
|
|
addCheckItemCheckResult(paramForCheckItemresult).then(res=>{
|