<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>
|