|
@@ -124,45 +124,58 @@ export default {
|
124
|
124
|
}
|
125
|
125
|
},
|
126
|
126
|
loginNext(requester) {
|
127
|
|
- // seimin
|
128
|
127
|
// 获取报修主体
|
129
|
|
- this.$http
|
130
|
|
- .post("service/sysinfo/data/fetchDataList/systemConfiguration", {
|
131
|
|
- idx: 0,
|
132
|
|
- sum: 1000
|
133
|
|
- })
|
134
|
|
- .then(result => {
|
135
|
|
- if (result.data.status == 200) {
|
136
|
|
- let list = result.data.list;
|
137
|
|
- list.forEach(v => {
|
138
|
|
- switch (v.keyconfig) {
|
139
|
|
- case "repairMain": //报修主体
|
140
|
|
- localStorage.setItem("repairMain", JSON.stringify(v));
|
141
|
|
- break;
|
142
|
|
- case "incidentWithConsumable": //是否绑定耗材
|
143
|
|
- localStorage.setItem("incidentWithConsumable", v.valueconfig);
|
144
|
|
- break;
|
145
|
|
- case "wxIncidentWithCmdb": //是否绑定资产
|
146
|
|
- localStorage.setItem("wxIncidentWithCmdb", v.valueconfig);
|
147
|
|
- break;
|
148
|
|
- case "reqHasCategory": //获取是否自动建单
|
149
|
|
- localStorage.setItem("reqHasCategory", JSON.stringify(v));
|
150
|
|
- break;
|
151
|
|
- case "wxBxQuestions": //微信报修常见问题链接
|
152
|
|
- localStorage.setItem("wxBxQuestions", v.valueconfig);
|
153
|
|
- break;
|
154
|
|
- case "wxGuide": //微信报修服务指南链接
|
155
|
|
- localStorage.setItem("wxGuide", v.valueconfig);
|
156
|
|
- break;
|
157
|
|
- case "ifRoom": //是否增加房间号选择
|
158
|
|
- localStorage.setItem("ifRoom", v.valueconfig);
|
159
|
|
- break;
|
160
|
|
- }
|
161
|
|
- });
|
|
128
|
+ //报修主体
|
|
129
|
+ var promise1 = this.$http.post("service/sysinfo/data/fetchDataList/systemConfiguration", {idx: 0, sum: 1, systemConfiguration: {keyconfig: 'repairMain'}});
|
|
130
|
+ //是否绑定耗材
|
|
131
|
+ var promise2 = this.$http.post("service/sysinfo/data/fetchDataList/systemConfiguration", {idx: 0, sum: 1, systemConfiguration: {keyconfig: 'incidentWithConsumable'}});
|
|
132
|
+ //是否绑定资产
|
|
133
|
+ var promise3 = this.$http.post("service/sysinfo/data/fetchDataList/systemConfiguration", {idx: 0, sum: 1, systemConfiguration: {keyconfig: 'wxIncidentWithCmdb'}});
|
|
134
|
+ //获取是否自动建单
|
|
135
|
+ var promise4 = this.$http.post("service/sysinfo/data/fetchDataList/systemConfiguration", {idx: 0, sum: 1, systemConfiguration: {keyconfig: 'reqHasCategory'}});
|
|
136
|
+ //微信报修常见问题链接
|
|
137
|
+ var promise5 = this.$http.post("service/sysinfo/data/fetchDataList/systemConfiguration", {idx: 0, sum: 1, systemConfiguration: {keyconfig: 'wxBxQuestions'}});
|
|
138
|
+ //微信报修服务指南链接
|
|
139
|
+ var promise6 = this.$http.post("service/sysinfo/data/fetchDataList/systemConfiguration", {idx: 0, sum: 1, systemConfiguration: {keyconfig: 'wxGuide'}});
|
|
140
|
+ //是否增加房间号选择
|
|
141
|
+ var promise7 = this.$http.post("service/sysinfo/data/fetchDataList/systemConfiguration", {idx: 0, sum: 1, systemConfiguration: {keyconfig: 'ifRoom'}});
|
|
142
|
+
|
|
143
|
+ Promise.all([promise1, promise2, promise3, promise4, promise5, promise6, promise7]).then(([data1, data2, data3, data4, data5, data6, data7]) => {
|
|
144
|
+ if(data1.status == 200 && data2.status == 200 && data3.status == 200 && data4.status == 200 && data5.status == 200 && data6.status == 200 && data7.status == 200){
|
|
145
|
+ var list1 = data1.list || [];
|
|
146
|
+ var list2 = data2.list || [];
|
|
147
|
+ var list3 = data3.list || [];
|
|
148
|
+ var list4 = data4.list || [];
|
|
149
|
+ var list5 = data5.list || [];
|
|
150
|
+ var list6 = data6.list || [];
|
|
151
|
+ var list7 = data7.list || [];
|
|
152
|
+ localStorage.setItem("repairMain", JSON.stringify(list1[0]));
|
|
153
|
+ localStorage.setItem("incidentWithConsumable", list2[0].valueconfig);
|
|
154
|
+ localStorage.setItem("wxIncidentWithCmdb", list3[0].valueconfig);
|
|
155
|
+ localStorage.setItem("reqHasCategory", JSON.stringify(list4[0]));
|
|
156
|
+ localStorage.setItem("wxBxQuestions", list5[0].valueconfig);
|
|
157
|
+ localStorage.setItem("wxGuide", list6[0].valueconfig);
|
|
158
|
+ localStorage.setItem("ifRoom", list7[0].valueconfig);
|
162
|
159
|
this.roleHandler(null,requester);
|
|
160
|
+ }else{
|
|
161
|
+ this.$createDialog({
|
|
162
|
+ type: "alert",
|
|
163
|
+ title: "系统配置错误!",
|
|
164
|
+ content: "请稍后再试",
|
|
165
|
+ icon: "cubeic-wrong",
|
|
166
|
+ color: "red"
|
|
167
|
+ }).show();
|
163
|
168
|
}
|
164
|
|
- });
|
165
|
|
- // seimin
|
|
169
|
+ }).catch(function(){
|
|
170
|
+ console.log('Some request failed...');
|
|
171
|
+ this.$createDialog({
|
|
172
|
+ type: "alert",
|
|
173
|
+ title: "系统配置错误!",
|
|
174
|
+ content: "请稍后再试",
|
|
175
|
+ icon: "cubeic-wrong",
|
|
176
|
+ color: "red"
|
|
177
|
+ }).show();
|
|
178
|
+ });
|
166
|
179
|
},
|
167
|
180
|
// 获取报修人登录方式
|
168
|
181
|
getLoginType() {
|