|  |  | @ -631,19 +631,19 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |       }) | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |     // 点击左侧模板数据覆盖表格内容 | 
			
		
	
		
			
				
					|  |  |  |     templateData(data, node) { | 
			
		
	
		
			
				
					|  |  |  |       if (data && data.caseJson) { | 
			
		
	
		
			
				
					|  |  |  |         this.tableData = JSON.parse(data.caseJson) | 
			
		
	
		
			
				
					|  |  |  |         // 回显表格复选框 | 
			
		
	
		
			
				
					|  |  |  |         this.$nextTick(() => { | 
			
		
	
		
			
				
					|  |  |  |           this.tableData.forEach(item => { | 
			
		
	
		
			
				
					|  |  |  |             if (item.flag) { | 
			
		
	
		
			
				
					|  |  |  |               this.$refs.multipleTable.toggleRowSelection(item, true) | 
			
		
	
		
			
				
					|  |  |  |     async templateData(data, node) { | 
			
		
	
		
			
				
					|  |  |  |       const { data: res } = await this.$http.get('/mjz/getMjzHdjcInfoTemplate', { | 
			
		
	
		
			
				
					|  |  |  |         params: { | 
			
		
	
		
			
				
					|  |  |  |           id: data.id, | 
			
		
	
		
			
				
					|  |  |  |           patientId: this.patientId | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |       }) | 
			
		
	
		
			
				
					|  |  |  |         }) | 
			
		
	
		
			
				
					|  |  |  |       if (res.code === 0) { | 
			
		
	
		
			
				
					|  |  |  |         if (res.data) { | 
			
		
	
		
			
				
					|  |  |  |           this.dataForm = this.handleData(res.data) | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |       } else { | 
			
		
	
		
			
				
					|  |  |  |         // this.tableData = Object.assign([], this.sourceData) | 
			
		
	
		
			
				
					|  |  |  |         this.$message.error(res.msg) | 
			
		
	
		
			
				
					|  |  |  |       } | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |     // 点击保存模板后弹框 | 
			
		
	
	
		
			
				
					|  |  | @ -658,15 +658,19 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |     // 保存模板树 | 
			
		
	
		
			
				
					|  |  |  |     async saveTreeTemplete() { | 
			
		
	
		
			
				
					|  |  |  |       if (!this.treeId) return this.$message.warning('请选择节点!') | 
			
		
	
		
			
				
					|  |  |  |       if (!this.treeId) return this.$message.warning('请选择目录!') | 
			
		
	
		
			
				
					|  |  |  |       const params = { | 
			
		
	
		
			
				
					|  |  |  |         caseJson: JSON.stringify(this.tableData), | 
			
		
	
		
			
				
					|  |  |  |         doctorId: this.doctorId, | 
			
		
	
		
			
				
					|  |  |  |         name: this.form.name, | 
			
		
	
		
			
				
					|  |  |  |         type: 3, // 2前段检查 3后段检查 | 
			
		
	
		
			
				
					|  |  |  |         treeId: this.treeId | 
			
		
	
		
			
				
					|  |  |  |       } | 
			
		
	
		
			
				
					|  |  |  |       const { data: res } = await this.$http.post('/treetemplate/addTreeCase', params) | 
			
		
	
		
			
				
					|  |  |  |       for (const resKey in this.dataForm) { | 
			
		
	
		
			
				
					|  |  |  |         if (Array.isArray(this.dataForm[resKey])) { | 
			
		
	
		
			
				
					|  |  |  |           this.dataForm[resKey] = this.dataForm[resKey].join(',') | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |       } | 
			
		
	
		
			
				
					|  |  |  |       const { data: res } = await this.$http.post('/mjz/saveMjzHdjcTemplate', { ...params, ...this.dataForm }) | 
			
		
	
		
			
				
					|  |  |  |       if (res.code === 0) { | 
			
		
	
		
			
				
					|  |  |  |         this.templateFlag = false | 
			
		
	
		
			
				
					|  |  |  |         await this.queryTreeCase() | 
			
		
	
	
		
			
				
					|  |  | @ -707,7 +711,7 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |       let url = '' | 
			
		
	
		
			
				
					|  |  |  |       if (data.type) { | 
			
		
	
		
			
				
					|  |  |  |         // 模板节点 | 
			
		
	
		
			
				
					|  |  |  |         url = '/treetemplate/deleteTreeCase' | 
			
		
	
		
			
				
					|  |  |  |         url = '/mjz/delMjzHdjcInfoTemplate' | 
			
		
	
		
			
				
					|  |  |  |       } else { | 
			
		
	
		
			
				
					|  |  |  |         // 树节点 | 
			
		
	
		
			
				
					|  |  |  |         url = '/treetemplate/deleteTree' | 
			
		
	
	
		
			
				
					|  |  | 
 |