inl-ui 0.0.77 → 0.0.78

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -35116,6 +35116,11 @@ const getVideo = url => (alarmUuid, instanceUuid) => instance$l.get(url ?? "/vid
35116
35116
  instanceUuid
35117
35117
  }
35118
35118
  });
35119
+ /**
35120
+ * 获取报警详情
35121
+ * @param record 记录对象
35122
+ */
35123
+ const getAlarmDetail = url => id => instance$l.post(`${url ?? "/alarm/detailById"}/${id}`);
35119
35124
  /**
35120
35125
  * 获取报警类型 map
35121
35126
  */
@@ -35782,8 +35787,8 @@ function _isSlot$N(s) {
35782
35787
  }
35783
35788
  const AlarmDetail = defineComponent({
35784
35789
  props: {
35785
- record: {
35786
- type: Object
35790
+ id: {
35791
+ type: String
35787
35792
  },
35788
35793
  onClose: {
35789
35794
  type: Function
@@ -35800,7 +35805,13 @@ const AlarmDetail = defineComponent({
35800
35805
  const back = () => {
35801
35806
  props.onClose?.();
35802
35807
  };
35803
- const alarmDetail = ref(cloneDeep(props.record));
35808
+ const alarmDetail = ref({});
35809
+ const getAlarmDetail$1 = async () => {
35810
+ const {
35811
+ data
35812
+ } = await getAlarmDetail()(props.id);
35813
+ alarmDetail.value = data;
35814
+ };
35804
35815
  // 获取视频
35805
35816
  const videoBaseUrl = ref("");
35806
35817
  const getVideoUrl = async () => {
@@ -35814,7 +35825,6 @@ const AlarmDetail = defineComponent({
35814
35825
  } = await getVideo(urlObj?.getVideo)(alarmDetail.value.id, alarmDetail.value.instanceUuid);
35815
35826
  videoList.value = Object.values(data).map(item => item.relatedPath);
35816
35827
  };
35817
- getAlarmVideo();
35818
35828
  // 图片
35819
35829
  const imageUrlList = ref([]);
35820
35830
  if (alarmDetail.value.imageUrlList && alarmDetail.value.imageUrlList.length) {
@@ -35878,7 +35888,9 @@ const AlarmDetail = defineComponent({
35878
35888
  chartIns.value.data(chartData.value);
35879
35889
  chartIns.value.render();
35880
35890
  };
35881
- onMounted(() => {
35891
+ onMounted(async () => {
35892
+ await getAlarmDetail$1();
35893
+ getAlarmVideo();
35882
35894
  if (alarmDetail.value.alarmLifecycleList && alarmDetail.value.alarmLifecycleList.length) {
35883
35895
  renderChart();
35884
35896
  }
@@ -36029,7 +36041,7 @@ const WarningRecord = defineComponent({
36029
36041
  "class": "warning-record-index flex",
36030
36042
  "style": "overflow: hidden;"
36031
36043
  }, [isDetailShow.value ? createVNode(alarmDetail, {
36032
- "record": detailRecord.value,
36044
+ "id": detailRecord.value?.id,
36033
36045
  "onClose": () => isDetailShow.value = false
36034
36046
  }, null) : createVNode(WarningRecord$1, {
36035
36047
  "onShowDetail": handleDetail