From 830a8fd39ba79e3b757d71ef4a7c0b18de2cb6fe Mon Sep 17 00:00:00 2001
From: jt <jt@activesoft.com>
Date: 星期五, 13 一月 2023 16:04:43 +0800
Subject: [PATCH] test

---
 store/index.js |  103 ++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 100 insertions(+), 3 deletions(-)

diff --git a/store/index.js b/store/index.js
index 3f8d625..d4ed931 100644
--- a/store/index.js
+++ b/store/index.js
@@ -12,10 +12,14 @@
 		loginProvider: "",
 		areaFunc:'',
 		thisareaFuncID:'',
+		thisareaFuncSubID:'',
 		thisEditName:'',
+		thisEditSubName:'',
 		thisDictName:'',
 		_classAttrList:{},
 		_classGridStyleInfo:{},
+		_subClassAttrList:{},
+		_subClassGridStyleInfo:{},
 		_dicValueInfo:{},
 		DataObjRunCustomEventInfo:'',
 		querySelpsn:'',
@@ -23,7 +27,7 @@
 		addclassattr:'',
 		username:"sa",
 		userpwd:"0000",
-		url:"39.100.224.211" //192.168.1.184:5200 36.33.24.94:5200
+		url:"115.29.185.26:5000" //192.168.1.184:5200 36.33.24.94:5200
 	},
 	mutations: {
 		setUrl(state, url) {
@@ -39,8 +43,14 @@
 		setareaFuncid(state,id){
 			state.thisareaFuncID=id;
 		},
+		setareaFunSubcid(state,id){
+			state.thisareaFuncSubID=id;
+		},
 		seteditName(state,editName){
 			state.thisEditName=editName;
+		},
+		seteditSubName(state,editName){
+			state.thisEditSubName=editName;
 		},
 		setDictName(state,dictName){
 			state.thisDictName=dictName;
@@ -56,6 +66,16 @@
 				data = state._classGridStyleInfo[state.thisareaFuncID];
 			Vue.set(data,state.thisEditName,ret);
 			Vue.set(state._classGridStyleInfo,state.thisareaFuncID,data);
+		},
+		subClassAttrList(state, ret) {
+			Vue.set(state._subClassAttrList,state.thisareaFuncSubID,ret);
+		},
+		subClassGridStyleInfo(state, ret) {
+			var data = {};
+			if(state._subClassGridStyleInfo[state.thisareaFuncSubID])
+				data = state._subClassGridStyleInfo[state.thisareaFuncSubID];
+			Vue.set(data,state.thisEditSubName,ret);
+			Vue.set(state._subClassGridStyleInfo,state.thisareaFuncSubID,data);
 		},
 		dicValueInfo(state, ret) {
 			// state._dicValueInfo[state.thisareaFuncID] = ret;
@@ -90,6 +110,15 @@
 		getclassGridStyleInfo(state){
 			if(state._classGridStyleInfo[state.thisareaFuncID])
 				return state._classGridStyleInfo[state.thisareaFuncID][state.thisEditName];
+			else 
+				return "";
+		},
+		getSubClassAttrList(state){
+			return state._subClassAttrList[state.thisareaFuncSubID];
+		},
+		getSubClassGridStyleInfo(state){
+			if(state._subClassGridStyleInfo[state.thisareaFuncSubID])
+				return state._subClassGridStyleInfo[state.thisareaFuncSubID][state.thisEditSubName];
 			else 
 				return "";
 		},
@@ -240,12 +269,80 @@
 						'content-type': 'application/x-www-form-urlencoded'
 					},
 					success: (res) => {
-						// console.log(res);
+						console.log(res);
 						const ret = res.data
 						if (ret.code=='00000') {
 							// var data ={};
 							// Vue.set(data,univerifyInfo.name,ret);
 							commit("classGridStyleInfo",ret);
+							resolve(ret);
+						} else {
+							reject({"errMsg":ret.msg});
+						}
+					},
+					fail: (err) => {
+						// console.log(err);
+						reject(err);
+					}
+				})
+			})
+		},
+		
+		subClassAttrList: function({
+			commit,
+			state
+		}, univerifyInfo) {
+			return new Promise((resolve, reject) => {
+				 // console.log(state.url);
+				
+				uni.request({
+					url: state.url + "PDA/PDAAttrList",
+					data: univerifyInfo,
+					method: 'POST',
+					dataType:"json",
+					header: {
+						'content-type': 'application/x-www-form-urlencoded'
+					},
+					success: (res) => {
+						console.log(res);
+						const ret = res.data
+						if (ret.code=='00000') {
+							commit("subClassAttrList",ret);
+							resolve(ret);
+						} else {
+							reject({"errMsg":ret.msg});
+						}
+					},
+					fail: (err) => {
+						// console.log(err);
+						reject(err);
+					}
+				})
+			})
+		},
+		
+		subClassGridStyleInfo: function({
+			commit,
+			state
+		}, univerifyInfo) {
+			return new Promise((resolve, reject) => {
+				 // console.log(state.url);
+				 
+				uni.request({
+					url: state.url + "PDA/PDAGridStyleGetInfo",
+					data: univerifyInfo,
+					method: 'POST',
+					dataType:"json",
+					header: {
+						'content-type': 'application/x-www-form-urlencoded'
+					},
+					success: (res) => {
+						console.log(res);
+						const ret = res.data
+						if (ret.code=='00000') {
+							// var data ={};
+							// Vue.set(data,univerifyInfo.name,ret);
+							commit("subClassGridStyleInfo",ret);
 							resolve(ret);
 						} else {
 							reject({"errMsg":ret.msg});
@@ -410,7 +507,7 @@
 							commit("addclassattr",ret);
 							resolve(ret);
 						} else {
-							reject({"errMsg":ret.msg});
+							reject({"errMsg":JSON.stringify(ret)});
 						}
 					},
 					fail: (err) => {

--
Gitblit v1.9.1