| | |
| | | }, |
| | | // 保存模板 |
| | | addTemplateDia() { |
| | | if (this.addObj.standardTreeId && (this.templateBindingLoading || this.boundTemplateList.length === 0)) { |
| | | this.$message.error('请至少保留一个原始记录模板') |
| | | return |
| | | } |
| | | if (this.templateName) { |
| | | this.templateLoading = true; |
| | | addInsOrderTemplate({ |
| | |
| | | thing: JSON.stringify({ |
| | | addObj: this.addObj, |
| | | sampleList: this.sampleList, |
| | | selectTree: this.selectTree |
| | | selectTree: this.selectTree, |
| | | templateList: this.addObj.standardTreeId |
| | | ? this.boundTemplateList.map((item, index) => ({templateId: item.templateId, sort: index})) |
| | | : undefined |
| | | }) |
| | | }).then(res => { |
| | | this.templateLoading = false; |