|
@@ -34,7 +34,8 @@ import { getTableHeaderColumns } from '/@/hooks/web/useWebColumns';
|
|
|
import { defHttp } from '/@/utils/http/axios';
|
|
|
import dayjs from 'dayjs';
|
|
|
import { getAutoScrollContainer } from '/@/utils/common/compUtils';
|
|
|
-import { list } from './warning.api';
|
|
|
+import { list ,getEachMineWarnCountInfo} from './warning.api';
|
|
|
+import { useGlobSetting } from '/@/hooks/setting';
|
|
|
|
|
|
const props = defineProps({
|
|
|
deviceListApi: {
|
|
@@ -48,16 +49,16 @@ const props = defineProps({
|
|
|
},
|
|
|
list: {
|
|
|
type: Function,
|
|
|
- default: (params) => defHttp.get({ url: '/safety/ventanalyAlarmLog/list', params }),
|
|
|
+ default: (params) => defHttp.post({ url: '/ventanaly-company/company/index/getEachMineWarnLogList', params }),
|
|
|
},
|
|
|
});
|
|
|
|
|
|
let statisticsList = reactive<any[]>([
|
|
|
- { title: '通风', valueT: '4854', valueB: '低风险' },
|
|
|
- { title: '粉尘', valueT: '4854', valueB: '低风险' },
|
|
|
- { title: '瓦斯', valueT: '4854', valueB: '低风险' },
|
|
|
- { title: '火灾', valueT: '4854', valueB: '低风险' },
|
|
|
- { title: '安全监测', valueT: '4854', valueB: '低风险' },
|
|
|
+ { title: '通风', valueT: 0, valueB: '' },
|
|
|
+ { title: '粉尘', valueT: 0, valueB: '' },
|
|
|
+ { title: '瓦斯', valueT: 0, valueB: '' },
|
|
|
+ { title: '火灾', valueT: 0, valueB: '' },
|
|
|
+ { title: '安全监测', valueT: 0, valueB: '' },
|
|
|
])
|
|
|
const alarmHistory = ref();
|
|
|
const columns = getTableHeaderColumns('alarm_history');
|
|
@@ -79,7 +80,8 @@ const { tableContext, onExportXls } = useListPage({
|
|
|
schemas: [
|
|
|
{
|
|
|
label: '是否解决',
|
|
|
- field: 'isok',
|
|
|
+ // field: 'isok',
|
|
|
+ field: 'isOk',
|
|
|
component: 'Select',
|
|
|
componentProps: {
|
|
|
options: [
|
|
@@ -97,7 +99,8 @@ const { tableContext, onExportXls } = useListPage({
|
|
|
},
|
|
|
{
|
|
|
label: '所属系统',
|
|
|
- field: 'kindtype',
|
|
|
+ // field: 'kindtype',systemType
|
|
|
+ field: 'systemType',
|
|
|
component: 'Select',
|
|
|
componentProps: {
|
|
|
options: [
|
|
@@ -123,7 +126,7 @@ const { tableContext, onExportXls } = useListPage({
|
|
|
},
|
|
|
|
|
|
{
|
|
|
- field: 'startTime',
|
|
|
+ field: 'starttime',
|
|
|
label: '开始时间',
|
|
|
component: 'DatePicker',
|
|
|
defaultValue: dayjs().add(-30, 'day').format('YYYY-MM-DD HH:mm:ss'),
|
|
@@ -138,7 +141,7 @@ const { tableContext, onExportXls } = useListPage({
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
- field: 'endTime',
|
|
|
+ field: 'endtime',
|
|
|
label: '结束时间',
|
|
|
component: 'DatePicker',
|
|
|
defaultValue: dayjs(),
|
|
@@ -163,6 +166,9 @@ const { tableContext, onExportXls } = useListPage({
|
|
|
pageSizeOptions: ['10', '30', '50', '100'],
|
|
|
},
|
|
|
beforeFetch(params) {
|
|
|
+ const { sysOrgCode } = useGlobSetting();
|
|
|
+ params.orgcode=sysOrgCode
|
|
|
+ params.type='alarmLog'
|
|
|
// params.devicetype = params.devicetype ? params.devicetype + '*' : '';
|
|
|
if (props.sysId) {
|
|
|
params.sysId = props.sysId;
|
|
@@ -177,7 +183,24 @@ const { tableContext, onExportXls } = useListPage({
|
|
|
//注册table数据
|
|
|
const [registerTable, { reload, setLoading, getForm }] = tableContext;
|
|
|
|
|
|
-onMounted(async () => { });
|
|
|
+//获取预警统计信息
|
|
|
+async function getEachMineWarnCountInfoList(){
|
|
|
+ const { sysOrgCode } = useGlobSetting();
|
|
|
+ let res=await getEachMineWarnCountInfo({orgcode:sysOrgCode})
|
|
|
+ statisticsList[0].valueT=res.ventSWarnInfo.totalNum || 0
|
|
|
+ statisticsList[0].valueB=res.ventSWarnInfo.maxWarnLevel || ''
|
|
|
+ statisticsList[1].valueT=res.dustSWarnInfo.totalNum || 0
|
|
|
+ statisticsList[1].valueB=res.dustSWarnInfo.maxWarnLevel || ''
|
|
|
+ statisticsList[2].valueT=res.gasSWarnInfo.totalNum || 0
|
|
|
+ statisticsList[2].valueB=res.gasSWarnInfo.maxWarnLevel || ''
|
|
|
+ statisticsList[3].valueT=res.fireSWarnInfo.totalNum || 0
|
|
|
+ statisticsList[3].valueB=res.fireSWarnInfo.maxWarnLevel || ''
|
|
|
+ statisticsList[4].valueT=res.synthesizeSWarnInfo.totalNum || 0
|
|
|
+ statisticsList[4].valueB=res.synthesizeSWarnInfo.maxWarnLevel || ''
|
|
|
+}
|
|
|
+onMounted(async () => {
|
|
|
+ getEachMineWarnCountInfoList()
|
|
|
+ });
|
|
|
|
|
|
defineExpose({ setLoading });
|
|
|
</script>
|