From 91dfa886ed8d62d080d4070a7756231d0c296dac Mon Sep 17 00:00:00 2001 From: jt <jt@activesoft.com> Date: 星期三, 01 二月 2023 08:32:09 +0800 Subject: [PATCH] test --- store/index.js | 135 ++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 134 insertions(+), 1 deletions(-) diff --git a/store/index.js b/store/index.js index 53e7de6..2cf990b 100644 --- a/store/index.js +++ b/store/index.js @@ -12,18 +12,23 @@ loginProvider: "", areaFunc:'', thisareaFuncID:'', + thisareaFuncSubID:'', thisEditName:'', + thisEditSubName:'', thisDictName:'', _classAttrList:{}, _classGridStyleInfo:{}, + _subClassAttrList:{}, + _subClassGridStyleInfo:{}, _dicValueInfo:{}, DataObjRunCustomEventInfo:'', querySelpsn:'', ProjectGetAnalysisList:'', addclassattr:'', + DelObj:'', 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 +44,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; @@ -57,6 +68,16 @@ 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; Vue.set(state._dicValueInfo,state.thisDictName,ret); @@ -72,6 +93,9 @@ }, addclassattr(state, ret) { state.addclassattr = ret; + }, + DelObj(state, ret) { + state.DelObj = ret; }, logout(state) { state.hasLogin = false @@ -90,6 +114,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 ""; }, @@ -259,6 +292,74 @@ }) }, + 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}); + } + }, + fail: (err) => { + // console.log(err); + reject(err); + } + }) + }) + }, + dicValueInfo: function({ commit, state @@ -419,6 +520,38 @@ } }) }) + }, + + DelObj: function({ + commit, + state + }, univerifyInfo) { + return new Promise((resolve, reject) => { + // console.log(state.url); + uni.request({ + url: state.url + "PDA/DelObj", + 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("DelObj",ret); + resolve(ret); + } else { + reject({"errMsg":JSON.stringify(ret)}); + } + }, + fail: (err) => { + console.log(err); + reject(err); + } + }) + }) } } -- Gitblit v1.9.1