Преглед изворни кода

feat: 适配后端在无预审模式下发送预审数据的问题

wyf пре 1 година
родитељ
комит
dcab45ed67

+ 11 - 1
src/views/message/alarm-config/AlarmConfig.vue

@@ -219,11 +219,21 @@
       alarmConfigForm.value.violationType = res.violationType;
       alarmConfigForm.value.violationLevel = res.violationLevel;
       alarmConfigForm.value.pushChannel = JSON.parse(res.pushChannel as string);
+
+      if (!isDevMode.value) {
+        const result = res.pushPhaseVOList.find((it) => it.pushPhase === AlarmPhase.effects);
+        if (result) {
+          if (result.customUserList)
+            result.customUserList = result.customUserList.map((it) => it.userId);
+          if (result.userGroupList)
+            result.userGroupList = result.userGroupList.map((it) => it.userGroupId);
+        }
+      }
+
       alarmConfigForm.value.pushPhaseVOList = _.cloneDeep(res.pushPhaseVOList);
       submitConfigForm.value.pushPhaseVOList = _.cloneDeep(res.pushPhaseVOList);
       alarmConfigForm.value.pushOccasions = res.pushPhaseVOList.map((it) => it.pushPhase);
       hasInit.value = true;
-
       // 获取的配置填入违规类型
       AlarmTypes.value.push({
         id: res.violationType,

+ 0 - 1
src/views/message/alarmMessages/hook/index.ts

@@ -17,7 +17,6 @@ export const useAlarmDataList = defineStore('useAlarmDataList', () => {
       pageNumber: currentPage.value,
       pageSize: pageSize.value,
     }).then((res: alarmInfoRes) => {
-      console.log('res', res);
       if (res === null) {
         currentPage.value = 1;
         totalPage.value = 0;