| | |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | @click="Editsingletasksonyic('')" |
| | | @click="alterpatient('')" |
| | | > |
| | | 保存基础信息 |
| | | </el-button> |
| | |
| | | // 处理 scriptResult,直接修改原始数据 |
| | | if (item.scriptType == 2 && item.scriptResult) { |
| | | // 处理数组类型的 scriptResult |
| | | if ( |
| | | Array.isArray(item.scriptResult) && |
| | | item.scriptResult.length > 0 |
| | | ) { |
| | | if (Array.isArray(item.scriptResult)) { |
| | | item.originalScriptResult = item.scriptResult; // 保存原始数组(可选) |
| | | item.scriptResult = item.scriptResult.join("&"); // 转换为字符串 |
| | | } |
| | |
| | | } |
| | | item.patid = this.patid; |
| | | item.templateid = item.templateID; |
| | | if (item.nextScriptno == null) { |
| | | if (item.nextScriptno == null) { |
| | | item.nextScriptno = index == dataToSubmit.length - 1 ? 0 : index + 2; |
| | | } |
| | | }); |
| | |
| | | } |
| | | }); |
| | | }, |
| | | alterpatient(sendstate) { |
| | | alterpatient(this.userform).then((res) => { |
| | | if (res.code == 200) { |
| | | this.$modal.msgSuccess("基础信息保存成功"); |
| | | } else { |
| | | this.$modal.msgError("基础信息修改失败"); |
| | | } |
| | | }); |
| | | }, |
| | | // 异常列渲染 |
| | | tableRowClassName({ row, rowIndex }) { |
| | | if (row.id == this.id) { |