浏览代码

服务端返回结构修改

zhaoyk 3 年之前
父节点
当前提交
53f9590e06
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. 2 2
      adm_comp/src/views/Diagram.vue
  2. 1 1
      adm_comp/src/views/DiagramLegend.vue

+ 2 - 2
adm_comp/src/views/Diagram.vue

@@ -219,7 +219,7 @@
 						this['$axios'].post(this['$common'].url + "diagram0/newDiagram" + this.buildUrlParams(), params)
 						this['$axios'].post(this['$common'].url + "diagram0/newDiagram" + this.buildUrlParams(), params)
 							.then(res => {
 							.then(res => {
 								const root = res.data;
 								const root = res.data;
-								if(root.message == 'success') {
+								if(root.result == 'success') {
 									const newObj = root.data;
 									const newObj = root.data;
 									node.data.children.push(newObj);
 									node.data.children.push(newObj);
 									
 									
@@ -340,7 +340,7 @@
 			this['$axios'].post(this['$common'].url + 'diagram0/' + action, params)
 			this['$axios'].post(this['$common'].url + 'diagram0/' + action, params)
 				.then(res => {
 				.then(res => {
 					const root = res.data;
 					const root = res.data;
-					if(root.message == 'success') {
+					if(root.result == 'success') {
 						//记录之前的选中对象id
 						//记录之前的选中对象id
 						// var selId = this.propsData.id;
 						// var selId = this.propsData.id;
 						// if(!selId) {
 						// if(!selId) {

+ 1 - 1
adm_comp/src/views/DiagramLegend.vue

@@ -510,7 +510,7 @@
 			this['$axios'].post(this['$common'].url + 'legend/' + action, params)
 			this['$axios'].post(this['$common'].url + 'legend/' + action, params)
 				.then(res => {
 				.then(res => {
 					const root = res.data;
 					const root = res.data;
-					if(root.message == 'success') {
+					if(root.result == 'success') {
 						const legend = this.editor.getSelComp();
 						const legend = this.editor.getSelComp();
 						if(legend && !legend.id) {
 						if(legend && !legend.id) {
 							legend.id = root.data.id;
 							legend.id = root.data.id;