|
@@ -975,19 +975,23 @@ export default {
|
975
|
975
|
this.strategyInfo.padApps = res.obj.padApps || [];
|
976
|
976
|
this.strategyInfo.padWifis = res.obj.padWifis || [];
|
977
|
977
|
this.strategyInfo.padTimes = res.obj.padTimes || [];
|
978
|
|
- let pdtypeInfo = {};
|
979
|
|
- this.strategyInfo.padDevices = res.obj.padDevices;
|
980
|
|
- this.strategyInfo.padDevices.forEach((item) => {
|
981
|
|
- pdtypeInfo[item.pdtype] = item.enabled;
|
982
|
|
- });
|
983
|
|
- this.strategyInfo.pdtypeInfo = pdtypeInfo;
|
984
|
|
- let violatesInfo = {};
|
985
|
|
- this.strategyInfo.padViolates = res.obj.padViolates;
|
986
|
|
- this.strategyInfo.padViolates.forEach((item) => {
|
987
|
|
- violatesInfo[item.violateType] =
|
988
|
|
- item.handle_method && item.handle_method.split(";");
|
989
|
|
- });
|
990
|
|
- this.strategyInfo.violatesInfo = violatesInfo;
|
|
978
|
+ if (this.strategyInfo.hasdevice) {
|
|
979
|
+ let pdtypeInfo = {};
|
|
980
|
+ this.strategyInfo.padDevices = res.obj.padDevices;
|
|
981
|
+ this.strategyInfo.padDevices.forEach((item) => {
|
|
982
|
+ pdtypeInfo[item.pdtype] = item.enabled;
|
|
983
|
+ });
|
|
984
|
+ this.strategyInfo.pdtypeInfo = pdtypeInfo;
|
|
985
|
+ }
|
|
986
|
+ if (this.strategyInfo.hasviolate) {
|
|
987
|
+ let violatesInfo = {};
|
|
988
|
+ this.strategyInfo.padViolates = res.obj.padViolates;
|
|
989
|
+ this.strategyInfo.padViolates.forEach((item) => {
|
|
990
|
+ violatesInfo[item.violateType] =
|
|
991
|
+ item.handle_method && item.handle_method.split(";");
|
|
992
|
+ });
|
|
993
|
+ this.strategyInfo.violatesInfo = violatesInfo;
|
|
994
|
+ }
|
991
|
995
|
this.strategyInfo.show = true;
|
992
|
996
|
} else {
|
993
|
997
|
this.$Message.error(res.msg);
|
|
@@ -1149,11 +1153,7 @@ export default {
|
1149
|
1153
|
pushType: 6,
|
1150
|
1154
|
pushObj: 1
|
1151
|
1155
|
};
|
1152
|
|
- if (snList.length > 1) {
|
1153
|
|
- form.userids = useridList;
|
1154
|
|
- } else {
|
1155
|
|
- form.pushObjid = useridList[0];
|
1156
|
|
- }
|
|
1156
|
+ form.userids = useridList;
|
1157
|
1157
|
this.addPushLog(form);
|
1158
|
1158
|
},
|
1159
|
1159
|
// 发送消息
|
|
@@ -1178,11 +1178,7 @@ export default {
|
1178
|
1178
|
if (this.controlMessageInfo.classid) {
|
1179
|
1179
|
form.pushObjid = this.controlMessageInfo.classid;
|
1180
|
1180
|
} else {
|
1181
|
|
- if (snList.length > 1) {
|
1182
|
|
- form.userids = useridList;
|
1183
|
|
- } else {
|
1184
|
|
- form.pushObjid = useridList[0];
|
1185
|
|
- }
|
|
1181
|
+ form.userids = useridList;
|
1186
|
1182
|
}
|
1187
|
1183
|
this.addPushLog(form);
|
1188
|
1184
|
}
|
|
@@ -1201,11 +1197,7 @@ export default {
|
1201
|
1197
|
pushType: 2,
|
1202
|
1198
|
pushObj: 1
|
1203
|
1199
|
};
|
1204
|
|
- if (snList.length > 1) {
|
1205
|
|
- form.userids = useridList;
|
1206
|
|
- } else {
|
1207
|
|
- form.pushObjid = useridList[0];
|
1208
|
|
- }
|
|
1200
|
+ form.userids = useridList;
|
1209
|
1201
|
this.addPushLog(form);
|
1210
|
1202
|
},
|
1211
|
1203
|
// 限制使用
|
|
@@ -1221,11 +1213,7 @@ export default {
|
1221
|
1213
|
pushType: 3,
|
1222
|
1214
|
pushObj: 1
|
1223
|
1215
|
};
|
1224
|
|
- if (snList.length > 1) {
|
1225
|
|
- form.userids = useridList;
|
1226
|
|
- } else {
|
1227
|
|
- form.pushObjid = useridList[0];
|
1228
|
|
- }
|
|
1216
|
+ form.userids = useridList;
|
1229
|
1217
|
this.addPushLog(form);
|
1230
|
1218
|
},
|
1231
|
1219
|
// 更新策略
|
|
@@ -1241,11 +1229,7 @@ export default {
|
1241
|
1229
|
pushType: 4,
|
1242
|
1230
|
pushObj: 1
|
1243
|
1231
|
};
|
1244
|
|
- if (snList.length > 1) {
|
1245
|
|
- form.userids = useridList;
|
1246
|
|
- } else {
|
1247
|
|
- form.pushObjid = useridList[0];
|
1248
|
|
- }
|
|
1232
|
+ form.userids = useridList;
|
1249
|
1233
|
this.addPushLog(form);
|
1250
|
1234
|
},
|
1251
|
1235
|
// 重启设备
|
|
@@ -1261,11 +1245,7 @@ export default {
|
1261
|
1245
|
pushType: 4,
|
1262
|
1246
|
pushObj: 1
|
1263
|
1247
|
};
|
1264
|
|
- if (snList.length > 1) {
|
1265
|
|
- form.userids = useridList;
|
1266
|
|
- } else {
|
1267
|
|
- form.pushObjid = useridList[0];
|
1268
|
|
- }
|
|
1248
|
+ form.userids = useridList;
|
1269
|
1249
|
this.addPushLog(form);
|
1270
|
1250
|
},
|
1271
|
1251
|
// 添加推送日志
|