zhouwenxuan
2024-01-03 44813af86c1ba3203dc606c8bf7690405e084cfc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<template>
  <div class="system-add-gas-container">
    <el-dialog
        title="查看"
        v-model="state.isShowUserDialog"
        width="550px"
        @close="handleClose"
    >
      <el-form :model="state.infoForm" size="default" ref="gasRef"  style="padding: 10px 20px ">
        <el-form-item label="预警内容:" prop="name">
          <span>{{state.infoForm.content}}</span>
        </el-form-item>
        <el-form-item label="预警时间:" prop="points">
          <span>{{state.infoForm.time}}</span>
        </el-form-item>
        <el-form-item label="信息详情:" prop="points">
          <span>{{state.infoForm.execDesc}}</span>
        </el-form-item>
      </el-form>
    </el-dialog>
  </div>
</template>
 
<script setup lang="ts">
import {reactive, ref} from "vue";
import {InfoState} from "/@/types/warning";
import {userApi} from "/@/api/systemManage/user";
import {ElMessage} from "element-plus";
import {warningInfoApi} from "/@/api/warningManage/warningInfo";
 
const gasRef = ref();
const emit = defineEmits(["getInfoData"]);
const state = reactive({
  title: '',
  isShowUserDialog: false,
  disabled: false,
  infoForm: {
    id: '',
    content: '',
    time: '',
    execDesc: ''
  },
});
const openDialog = (type: string, value: any) => {
  state.isShowUserDialog = true;
  if (type === '查看') {
    state.disabled = true;
    let data = JSON.parse(JSON.stringify(value));
    state.infoForm = data;
  }
  state.title = type;
};
 
const handleClose = () => {
  state.isShowUserDialog = false;
  emit('getInfoData');
}
defineExpose({
  openDialog
});
</script>