| | |
| | | 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) { |
| | |
| | | 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; |
| | |
| | | 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); |
| | |
| | | }, |
| | | addclassattr(state, ret) { |
| | | state.addclassattr = ret; |
| | | }, |
| | | DelObj(state, ret) { |
| | | state.DelObj = ret; |
| | | }, |
| | | logout(state) { |
| | | state.hasLogin = false |
| | |
| | | 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 ""; |
| | | }, |
| | |
| | | }) |
| | | }, |
| | | |
| | | 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 |
| | |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | 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); |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | } |