Merge remote-tracking branch 'origin/dev' into dev
commit
88d1e485f2
File diff suppressed because it is too large
Load Diff
|
|
@ -441,3 +441,88 @@ export const layoutFnGetFireTypeLevel = async () => {
|
|||
});
|
||||
return ref(resData.list);
|
||||
};
|
||||
// nfc设备类型
|
||||
export const layoutFnGetNfcEquipmentType = async () => {
|
||||
const resData = await getLevels({
|
||||
DICTIONARIES_ID: "ea00fb06e4694062b24973303c585a4b",
|
||||
});
|
||||
return ref(resData.list);
|
||||
};
|
||||
|
||||
// 清扫项目
|
||||
export const layoutFnCleaningProjectType = async () => {
|
||||
const resData = await getLevels({
|
||||
DICTIONARIES_ID: "ec449eaedf484c0980387a15ba6cb8bd",
|
||||
});
|
||||
return ref(resData.list);
|
||||
};
|
||||
// 除尘设备类型
|
||||
export const layoutFnDustDeviceOrdinaryType = async () => {
|
||||
const resData = await getLevels({
|
||||
DICTIONARIES_ID: "1fff4a3418004b5a9a74204d1b62bb2a",
|
||||
});
|
||||
return ref(resData.list);
|
||||
};
|
||||
|
||||
// 特定除尘设备类型
|
||||
export const layoutFnDustDeviceType = async () => {
|
||||
const resData = await getLevels({
|
||||
DICTIONARIES_ID: "d359b0c7c69a4845a50df490b7024cc3",
|
||||
});
|
||||
return ref(resData.list);
|
||||
};
|
||||
|
||||
// 相关空爆措施
|
||||
export const layoutFnExplosionMeasuresType = async () => {
|
||||
const resData = await getLevels({
|
||||
DICTIONARIES_ID: "1ce8924848ed452bbcee469bd246818e",
|
||||
});
|
||||
return ref(resData.list);
|
||||
};
|
||||
|
||||
// 企业涉及粉尘高风险工艺
|
||||
export const layoutFnRiskProcessType = async () => {
|
||||
const resData = await getLevels({
|
||||
DICTIONARIES_ID: "bf10843e3fa7452bb0b1e632eccab5a5",
|
||||
});
|
||||
return ref(resData.list);
|
||||
};
|
||||
|
||||
// 干式除尘系统报警类型
|
||||
export const layoutFnDryAlarmType = async () => {
|
||||
const resData = await getLevels({
|
||||
DICTIONARIES_ID: "98a059bced3a4673bb48eda4b746fb70",
|
||||
});
|
||||
return ref(resData.list);
|
||||
};
|
||||
// 湿式除尘系统报警类型
|
||||
export const layoutFnWetAlarmType = async () => {
|
||||
const resData = await getLevels({
|
||||
DICTIONARIES_ID: "631d33a2a32746adbfba9e600467f8b9",
|
||||
});
|
||||
return ref(resData.list);
|
||||
};
|
||||
|
||||
// 特定除尘系统报警类型
|
||||
export const layoutFnSpecificAlarmType = async () => {
|
||||
const resData = await getLevels({
|
||||
DICTIONARIES_ID: "7db0ea00b3cf4c96a6cc3662452e61d5",
|
||||
});
|
||||
return ref(resData.list);
|
||||
};
|
||||
|
||||
// 粉尘涉爆企业行业类型
|
||||
export const layoutDustFnindustryType = async () => {
|
||||
const resData = await getLevels({
|
||||
DICTIONARIES_ID: "58eb0b3d35fc4fe387ce3f9a37b5f557",
|
||||
});
|
||||
return ref(resData.list);
|
||||
};
|
||||
|
||||
// 粉尘高风险工艺
|
||||
export const layoutDustHighRiskType = async () => {
|
||||
const resData = await getLevels({
|
||||
DICTIONARIES_ID: "bf10843e3fa7452bb0b1e632eccab5a5",
|
||||
});
|
||||
return ref(resData.list);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -365,3 +365,30 @@ export function idCardGetDateAndGender(idCard) {
|
|||
}
|
||||
return { sex, date };
|
||||
}
|
||||
// 时间转换格式
|
||||
export function formatUTCDate(utcDate) {
|
||||
const date = new Date(utcDate);
|
||||
const options = {
|
||||
year: date.getUTCFullYear(),
|
||||
month: date.getUTCMonth() + 1,
|
||||
day: date.getUTCDate(),
|
||||
hours: date.getUTCHours(),
|
||||
minutes: date.getUTCMinutes(),
|
||||
seconds: date.getUTCSeconds(),
|
||||
};
|
||||
|
||||
// 格式化输出
|
||||
const formatted =
|
||||
options.year +
|
||||
"-" +
|
||||
options.month +
|
||||
"-" +
|
||||
options.day +
|
||||
" " +
|
||||
options.hours +
|
||||
":" +
|
||||
options.minutes +
|
||||
":" +
|
||||
options.seconds;
|
||||
return formatted;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,90 @@
|
|||
import { post, upload } from "@/request/axios.js";
|
||||
export const getDustCleaningRecord = (params) =>
|
||||
post("/dustCleaningRecord/page", params); // 获取粉尘清扫记录列表
|
||||
|
||||
export const dustCleaningRecordAdd = (params) =>
|
||||
upload("/dustCleaningRecord/add", params); // 新增粉尘清扫记录
|
||||
|
||||
export const dustCleaningRecordEdit = (params) =>
|
||||
upload("/dustCleaningRecord/update", params); // 修改粉尘清扫记录
|
||||
|
||||
export const dustCleaningRecordDetail = (params) =>
|
||||
post("/dustCleaningRecord/detail", params); // 粉尘清扫记录详情
|
||||
|
||||
export const dustCleaningRecordDelete = (params) =>
|
||||
post("/dustCleaningRecord/delete", params); // 删除粉尘清扫记录
|
||||
|
||||
export const getDustDeviceList = (params) => post("/dustDevice/page", params); // 获取粉尘设备列表
|
||||
|
||||
export const dustDeviceAdd = (params) => upload("/dustDevice/add", params); // 新增粉尘设备
|
||||
|
||||
export const dustDeviceEdit = (params) => upload("/dustDevice/update", params); // 修改粉尘设备
|
||||
|
||||
export const dustDeviceDelete = (params) => post("/dustDevice/delete", params); // 删除粉尘设备
|
||||
|
||||
export const dustDeviceDetail = (params) => post("/dustDevice/detail", params); // 粉尘设备详情
|
||||
|
||||
export const getDustCategoryList = (params) =>
|
||||
post("/dustCategory/list", params); // 获取除尘种类下拉列表
|
||||
|
||||
export const getDeviceNoticeConfigList = (params) =>
|
||||
post("/deviceNoticeConfig/list", params); // 获取粉尘涉爆告警通知人列表
|
||||
|
||||
export const getDeviceNoticeConfigAdd = (params) =>
|
||||
upload("/deviceNoticeConfig/add", params); // 新增粉尘涉爆告警通知人
|
||||
export const getDeviceNoticeConfigEdit = (params) =>
|
||||
upload("/deviceNoticeConfig/update", params); // 修改粉尘涉爆告警通知人
|
||||
|
||||
export const getDeviceNoticeConfigDelete = (params) =>
|
||||
post("/deviceNoticeConfig/delete", params); // 删除粉尘涉爆告警通知人
|
||||
|
||||
export const getDustDeviceSensorList = (params) =>
|
||||
post("/dustDeviceSensor/page", params); // 获取粉尘传感器列表
|
||||
|
||||
export const getDustDeviceSensorDetail = (params) =>
|
||||
post("/dustDeviceSensor/detail", params); // 获取粉尘传感器详情
|
||||
|
||||
export const getDustDeviceSensorAdd = (params) =>
|
||||
upload("/dustDeviceSensor/add", params); // 新增粉尘传感器
|
||||
|
||||
export const getDustDeviceSensorEdit = (params) =>
|
||||
upload("/dustDeviceSensor/update", params); // 修改粉尘传感器
|
||||
|
||||
export const getDustDeviceSensorDelete = (params) =>
|
||||
post("/dustDeviceSensor/delete", params); // 删除粉尘传感器
|
||||
|
||||
export const getDustDeviceSimpleList = (params) =>
|
||||
post("/dustDevice/simpleList", params); // 设备下拉列表
|
||||
|
||||
export const getExistSensorCode = (params) =>
|
||||
post("/dustDeviceSensor/existSensorCode", params); // 校验传感器编码是否唯一
|
||||
|
||||
export const dustDeviceSensorAlarmRuleAdd = (params) =>
|
||||
upload("/dustDeviceSensorAlarmRule/add", params); // 新增传感器报警规则
|
||||
|
||||
export const dustDeviceSensorAlarmRuleEdit = (params) =>
|
||||
upload("/dustDeviceSensorAlarmRule/update", params); // 修改传感器报警规则
|
||||
|
||||
export const dustDeviceSensorAlarmRuleDetail = (params) =>
|
||||
post("/dustDeviceSensorAlarmRule/detail", params); // 查传感器报警规则详情
|
||||
|
||||
export const dustAlarmRecordDisposalPagePage = (params) =>
|
||||
post("/dustAlarmRecord/disposalPage", params); // 查询待处置报警记录
|
||||
|
||||
export const dustAlarmRecordConfirmationPage = (params) =>
|
||||
post("/dustAlarmRecord/confirmationPage", params); // 查询待确认报警记录
|
||||
|
||||
export const dustAlarmRecordDisposalPage = (params) =>
|
||||
post("/dustAlarmRecord/disposalPage", params); // 查询报警记录
|
||||
|
||||
export const dustAlarmRecordDetail = (params) =>
|
||||
upload("/dustAlarmRecord/detail", params); // 查询报警记录详情
|
||||
|
||||
export const dustAlarmReConfirmation = (params) =>
|
||||
post("/dustAlarmRecord/confirmation", params); // 确认设备报警
|
||||
|
||||
export const dustAlarmReDisposal = (params) =>
|
||||
upload("/dustAlarmRecord/disposal", params); // 处置设备报警
|
||||
|
||||
export const dustAlarmRecordPage = (params) =>
|
||||
post("/dustAlarmRecord/page", params); // 获取设备报警记录列表
|
||||
|
|
@ -0,0 +1,139 @@
|
|||
<template>
|
||||
<el-dialog
|
||||
v-model="visible"
|
||||
title="报警信息处置"
|
||||
width="60%"
|
||||
@close="fnClose"
|
||||
>
|
||||
<el-form ref="formRef" :model="form" :rules="rules" label-width="120px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="报警设备编码" prop="DEVICE_CODE">
|
||||
<el-input v-model="form.DEVICE_CODE" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="报警设备名称" prop="DEVICE_NAME">
|
||||
<el-input v-model="form.DEVICE_NAME" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="报警触发条件" prop="TRIGGER_REASON">
|
||||
<el-input v-model="form.TRIGGER_REASON" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="报警时间" prop="CLEARED_TIME">
|
||||
<el-date-picker
|
||||
v-model="form.CLEARED_TIME"
|
||||
type="datetime"
|
||||
disabled
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="处置措施" prop="DISPOSAL_MEASURES">
|
||||
<el-input
|
||||
v-model="form.DISPOSAL_MEASURES"
|
||||
placeholder="请输入处置措施"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="处置结果" prop="DISPOSAL_RESULT">
|
||||
<el-input
|
||||
v-model="form.DISPOSAL_RESULT"
|
||||
placeholder="请输入处置结果"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="处置图片" prop="DISPOSAL_FILE">
|
||||
<layout-upload
|
||||
v-model:file-list="form.DISPOSAL_FILE"
|
||||
accept=".jpg,.jpeg,.png"
|
||||
list-type="picture-card"
|
||||
:limit="99"
|
||||
delete-to-server
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="fnClose">取消</el-button>
|
||||
<el-button type="primary" @click="fnSubmit"> 确定</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from "vue";
|
||||
import { useVModels } from "@vueuse/core";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { dustAlarmReDisposal } from "@/request/dust_clean_management.js";
|
||||
import LayoutUpload from "@/components/upload/index";
|
||||
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: false,
|
||||
},
|
||||
form: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: () => ({}),
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(["update:visible", "update:form", "get-data"]);
|
||||
const { visible, form } = useVModels(props, emits);
|
||||
const rules = {
|
||||
DISPOSAL_MEASURES: [
|
||||
{ required: true, message: "请输入处置措施", trigger: "blur" },
|
||||
],
|
||||
DISPOSAL_RESULT: [
|
||||
{ required: true, message: "请选择处置结果", trigger: "blur" },
|
||||
],
|
||||
DISPOSAL_FILE: [
|
||||
{ required: true, message: "请上传处置图片", trigger: "change" },
|
||||
],
|
||||
};
|
||||
|
||||
const formRef = ref(null);
|
||||
const fnClose = () => {
|
||||
formRef.value.resetFields();
|
||||
|
||||
visible.value = false;
|
||||
};
|
||||
const fnSubmit = debounce(
|
||||
1000,
|
||||
async () => {
|
||||
await useFormValidate(formRef);
|
||||
|
||||
const formData = new FormData();
|
||||
Object.keys(form.value).forEach((key) => {
|
||||
formData.append(key, form.value[key]);
|
||||
});
|
||||
|
||||
formData.delete("DISPOSAL_FILE");
|
||||
|
||||
for (let i = 0; i < form.value.DISPOSAL_FILE.length; i++) {
|
||||
if (form.value.DISPOSAL_FILE[i].raw)
|
||||
formData.append("DISPOSAL_FILE", form.value.DISPOSAL_FILE[i].raw);
|
||||
}
|
||||
await dustAlarmReDisposal(formData);
|
||||
|
||||
ElMessage.success("保存成功");
|
||||
fnClose();
|
||||
emits("get-data");
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
|
|
@ -0,0 +1,136 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="80px"
|
||||
@submit.prevent="fnResetPagination()"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item
|
||||
label="设备类型"
|
||||
prop="DEVICE_TYPE"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-select
|
||||
v-model="searchForm.DEVICE_TYPE"
|
||||
placeholder="请选择设备类型"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in declarationGradeList"
|
||||
:key="item.BIANMA"
|
||||
:label="item.NAME"
|
||||
:value="item.BIANMA"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item label-width="10px">
|
||||
<el-button type="primary" native-type="submit">搜索</el-button>
|
||||
<el-button native-type="reset" @click="fnResetPagination">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<layout-card>
|
||||
<layout-table
|
||||
ref="tableRef"
|
||||
v-model:pagination="pagination"
|
||||
row-key="DUST_CLEANING_RECORD_ID"
|
||||
:data="list"
|
||||
@get-data="fnGetData"
|
||||
>
|
||||
<el-table-column label="序号" width="70">
|
||||
<template #default="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="报警设备编码" prop="DEVICE_CODE" />
|
||||
<el-table-column label="报警设备名称" prop="DEVICE_NAME">
|
||||
</el-table-column>
|
||||
<el-table-column label="报警级别" prop="ALARM_LEVEL">
|
||||
<template #default="{ row }">
|
||||
{{
|
||||
row.ALARM_LEVEL === 1
|
||||
? "警告"
|
||||
: row.ALARM_LEVEL === 2
|
||||
? "一般报警"
|
||||
: row.ALARM_LEVEL === 3
|
||||
? "严重"
|
||||
: ""
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="报警触发条件" prop="TRIGGER_REASON" />
|
||||
<el-table-column label="报警时间" prop="CLEARED_TIME">
|
||||
<template #default="{ row }">
|
||||
{{ formatUTCDate(row.CLEARED_TIME) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" width="180">
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" text link @click="fnDisposal(row)">
|
||||
处置
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</layout-table>
|
||||
</layout-card>
|
||||
|
||||
<alarmDisposal
|
||||
v-if="alarmDisposalDialog.visible"
|
||||
v-model:visible="alarmDisposalDialog.visible"
|
||||
v-model:form="alarmDisposalDialog.form"
|
||||
@get-data="fnResetPagination"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from "vue";
|
||||
import { serialNumber } from "@/assets/js/utils";
|
||||
import {
|
||||
dustAlarmRecordDisposalPagePage,
|
||||
dustAlarmRecordDetail,
|
||||
} from "@/request/dust_clean_management";
|
||||
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import { layoutFnDustDeviceOrdinaryType } from "@/assets/js/data_dictionary";
|
||||
import alarmDisposal from "./components/alarm_disposal.vue";
|
||||
|
||||
import { formatUTCDate } from "@/assets/js/utils.js";
|
||||
|
||||
const declarationGradeList = await layoutFnDustDeviceOrdinaryType();
|
||||
const { list, pagination, searchForm, fnGetData, fnResetPagination, tableRef } =
|
||||
useListData(dustAlarmRecordDisposalPagePage, {});
|
||||
|
||||
const alarmDisposalDialog = ref({
|
||||
visible: false,
|
||||
form: {
|
||||
ALARM_RECORD_ID: "",
|
||||
},
|
||||
});
|
||||
|
||||
const fnDisposal = async (row) => {
|
||||
dustAlarmRecordDetail({ ALARM_RECORD_ID: row.ALARM_RECORD_ID }).then(
|
||||
(res) => {
|
||||
console.log(res);
|
||||
}
|
||||
);
|
||||
alarmDisposalDialog.value.form.ALARM_RECORD_ID = row.ALARM_RECORD_ID;
|
||||
alarmDisposalDialog.value.form.DEVICE_CODE = row.DEVICE_CODE;
|
||||
alarmDisposalDialog.value.form.DEVICE_NAME = row.DEVICE_NAME;
|
||||
alarmDisposalDialog.value.form.TRIGGER_REASON = row.TRIGGER_REASON;
|
||||
alarmDisposalDialog.value.form.CLEARED_TIME = row.CLEARED_TIME;
|
||||
alarmDisposalDialog.value.visible = true;
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
@ -0,0 +1,114 @@
|
|||
<template>
|
||||
<el-dialog
|
||||
v-model="visible"
|
||||
title="报警信息详情"
|
||||
width="60%"
|
||||
@close="fnClose"
|
||||
>
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="报警传感器名称">
|
||||
{{ form.SENSOR_NAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="报警传感器编码">
|
||||
{{ form.SENSOR_CODE }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="报警设备名称">
|
||||
{{ form.DEVICE_NAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="报警设备编码">
|
||||
{{ form.DEVICE_CODE }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="告警优先级">
|
||||
{{
|
||||
form.ALARM_LEVEL === 1
|
||||
? "警告"
|
||||
: form.ALARM_LEVEL === 2
|
||||
? "一般报警"
|
||||
: form.ALARM_LEVEL === 3
|
||||
? "严重"
|
||||
: ""
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="报警类型">
|
||||
{{
|
||||
form.ALARM_TYPE === 1
|
||||
? "开关量"
|
||||
: form.ALARM_TYPE === 2
|
||||
? "高低报"
|
||||
: ""
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="值班长">
|
||||
{{ form.SHIFT_LEADER_USER_NAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="发现人员">
|
||||
{{ form.DISCOVERER_USER_NAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="核实人员">
|
||||
{{ form.VERIFIED_USER_NAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="处置人员">
|
||||
{{ form.HANDLER_USER_NAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="是否处置">
|
||||
{{ form.IS_DISPOSE === 0 ? "否" : form.IS_DISPOSE === 1 ? "是" : "" }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="报警时间">
|
||||
{{ form.TRIGGERED_TIME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="报警原因">
|
||||
{{ form.TRIGGER_REASON }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="处置措施">
|
||||
{{ form.DISPOSAL_MEASURES }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="处置结果">
|
||||
{{ form.DISPOSAL_RESULT }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="处置时间">
|
||||
{{ form.PROCESSING_TIME.split(".")[0] }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<template #footer>
|
||||
<el-button @click="fnClose">取消</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useVModels } from "@vueuse/core";
|
||||
import { dustAlarmRecordDetail } from "@/request/dust_clean_management";
|
||||
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: false,
|
||||
},
|
||||
form: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: () => ({}),
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(["update:visible", "update:form", "get-data"]);
|
||||
const { visible, form } = useVModels(props, emits);
|
||||
|
||||
const fnDustAlarmRecorData = async () => {
|
||||
const formData = new FormData();
|
||||
formData.append('ALARM_RECORD_ID', form.value.ALARM_RECORD_ID);
|
||||
dustAlarmRecordDetail(formData).then((res) => {
|
||||
console.log(res);
|
||||
});
|
||||
};
|
||||
|
||||
fnDustAlarmRecorData();
|
||||
|
||||
const fnClose = () => {
|
||||
visible.value = false;
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
|
|
@ -0,0 +1,154 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="80px"
|
||||
@submit.prevent="fnResetPagination()"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item
|
||||
label="设备类型"
|
||||
prop="DEVICE_TYPE"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-select
|
||||
v-model="searchForm.DEVICE_TYPE"
|
||||
placeholder="请选择设备类型"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in declarationGradeList"
|
||||
:key="item.BIANMA"
|
||||
:label="item.NAME"
|
||||
:value="item.BIANMA"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item label-width="10px">
|
||||
<el-button type="primary" native-type="submit">搜索</el-button>
|
||||
<el-button native-type="reset" @click="fnResetPagination">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<layout-card>
|
||||
<layout-table
|
||||
ref="tableRef"
|
||||
v-model:pagination="pagination"
|
||||
row-key="DUST_CLEANING_RECORD_ID"
|
||||
:data="list"
|
||||
@get-data="fnGetData"
|
||||
>
|
||||
<el-table-column label="序号" width="70">
|
||||
<template #default="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="报警传感器名称" prop="SENSOR_NAME">
|
||||
</el-table-column>
|
||||
<el-table-column label="报警传感器编码" prop="SENSOR_CODE" />
|
||||
<el-table-column label="报警类型" prop="ALARM_TYPE" width="80">
|
||||
<template #default="{ row }">
|
||||
{{
|
||||
row.ALARM_TYPE === 1
|
||||
? "开关量"
|
||||
: row.ALARM_TYPE === 2
|
||||
? "高低报"
|
||||
: ""
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="告警优先级" prop="ALARM_LEVEL">
|
||||
<template #default="{ row }">
|
||||
{{
|
||||
row.ALARM_LEVEL === 1
|
||||
? "警告"
|
||||
: row.ALARM_LEVEL === 2
|
||||
? "一般报警"
|
||||
: row.ALARM_LEVEL === 3
|
||||
? "严重"
|
||||
: ""
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="报警时间" prop="TRIGGERED_TIME" width="150" />
|
||||
<el-table-column label="值班长" prop="SHIFT_LEADER_USER_NAME" />
|
||||
<el-table-column label="发现人员" prop="DISCOVERER_USER_NAME" />
|
||||
<el-table-column label="核实人员" prop="VERIFIED_USER_NAME" />
|
||||
<el-table-column label="处置人员" prop="HANDLER_USER_NAME" />
|
||||
<el-table-column label="是否处置" prop="IS_DISPOSE" width="70">
|
||||
<template #default="{ row }">
|
||||
{{ row.IS_DISPOSE === 0 ? "否" : row.IS_DISPOSE === 1 ? "是" : "" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="报警原因"
|
||||
prop="TRIGGER_REASON"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="处置措施"
|
||||
prop="DISPOSAL_MEASURES"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="处置结果"
|
||||
prop="DISPOSAL_RESULT"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="处置时间" prop="PROCESSING_TIME" width="150">
|
||||
<template #default="{ row }">
|
||||
{{ row.PROCESSING_TIME.split(".")[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="80">
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" text link @click="fnDisposal(row)">
|
||||
查看
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</layout-table>
|
||||
</layout-card>
|
||||
|
||||
<alarmView
|
||||
v-if="alarmViewDialog.visible"
|
||||
v-model:visible="alarmViewDialog.visible"
|
||||
v-model:form="alarmViewDialog.form"
|
||||
@get-data="fnResetPagination"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from "vue";
|
||||
import { serialNumber } from "@/assets/js/utils";
|
||||
import { dustAlarmRecordPage } from "@/request/dust_clean_management";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import { layoutFnDustDeviceOrdinaryType } from "@/assets/js/data_dictionary";
|
||||
import alarmView from "./components/view.vue";
|
||||
|
||||
const declarationGradeList = await layoutFnDustDeviceOrdinaryType();
|
||||
const { list, pagination, searchForm, fnGetData, fnResetPagination, tableRef } =
|
||||
useListData(dustAlarmRecordPage, {});
|
||||
|
||||
const alarmViewDialog = ref({
|
||||
visible: false,
|
||||
form: {},
|
||||
});
|
||||
|
||||
const fnDisposal = async (row) => {
|
||||
alarmViewDialog.value.form = row;
|
||||
alarmViewDialog.value.visible = true;
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
@ -0,0 +1,188 @@
|
|||
<template>
|
||||
<el-dialog
|
||||
v-model="visible"
|
||||
title="报警信息确认"
|
||||
width="60%"
|
||||
@close="fnClose"
|
||||
>
|
||||
<el-form ref="formRef" :model="form" :rules="rules" label-width="120px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="报警设备编码" prop="DEVICE_CODE">
|
||||
<el-input v-model="form.DEVICE_CODE" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="报警设备名称" prop="DEVICE_NAME">
|
||||
<el-input v-model="form.DEVICE_NAME" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="报警触发条件" prop="TRIGGER_REASON">
|
||||
<el-input v-model="form.TRIGGER_REASON" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="报警时间" prop="CLEARED_TIME">
|
||||
<el-date-picker
|
||||
v-model="form.CLEARED_TIME"
|
||||
type="datetime"
|
||||
disabled
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="值班长" prop="SHIFT_LEADER_USER">
|
||||
<el-select
|
||||
v-model="form.SHIFT_LEADER_USER"
|
||||
filterable
|
||||
clearable
|
||||
collapse-tags
|
||||
>
|
||||
<el-option
|
||||
v-for="item in data.rectifyUserList"
|
||||
:key="item.USER_ID"
|
||||
:label="item.USERNAME + '(' + item.DEPARTNAME_ALL + ')'"
|
||||
:value="item.USER_ID"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="发现人" prop="DISCOVERER_USER">
|
||||
<el-select
|
||||
v-model="form.DISCOVERER_USER"
|
||||
filterable
|
||||
clearable
|
||||
collapse-tags
|
||||
>
|
||||
<el-option
|
||||
v-for="item in data.rectifyUserList"
|
||||
:key="item.USER_ID"
|
||||
:label="item.USERNAME + '(' + item.DEPARTNAME_ALL + ')'"
|
||||
:value="item.USER_ID"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="核实人" prop="VERIFIED_USER">
|
||||
<el-select
|
||||
v-model="form.VERIFIED_USER"
|
||||
filterable
|
||||
clearable
|
||||
collapse-tags
|
||||
>
|
||||
<el-option
|
||||
v-for="item in data.rectifyUserList"
|
||||
:key="item.USER_ID"
|
||||
:label="item.USERNAME + '(' + item.DEPARTNAME_ALL + ')'"
|
||||
:value="item.USER_ID"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="处置人" prop="HANDLER_USER">
|
||||
<el-select
|
||||
v-model="form.HANDLER_USER"
|
||||
filterable
|
||||
clearable
|
||||
collapse-tags
|
||||
>
|
||||
<el-option
|
||||
v-for="item in data.rectifyUserList"
|
||||
:key="item.USER_ID"
|
||||
:label="item.USERNAME + '(' + item.DEPARTNAME_ALL + ')'"
|
||||
:value="item.USER_ID"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="fnClose">取消</el-button>
|
||||
<el-button type="primary" @click="fnSubmit"> 确定</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, ref } from "vue";
|
||||
import { useVModels } from "@vueuse/core";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { dustAlarmReConfirmation } from "@/request/dust_clean_management.js";
|
||||
import { getUserListAllByCorp } from "@/request/data_dictionary.js";
|
||||
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: false,
|
||||
},
|
||||
form: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: () => ({}),
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(["update:visible", "update:form", "get-data"]);
|
||||
const { visible, form } = useVModels(props, emits);
|
||||
console.log(form);
|
||||
const rules = {
|
||||
SHIFT_LEADER_USER: [
|
||||
{ required: true, message: "请选择值班长", trigger: "change" },
|
||||
],
|
||||
DISCOVERER_USER: [
|
||||
{ required: true, message: "请选择发现人", trigger: "change" },
|
||||
],
|
||||
VERIFIED_USER: [
|
||||
{ required: true, message: "请选择核实人", trigger: "change" },
|
||||
],
|
||||
HANDLER_USER: [
|
||||
{ required: true, message: "请选择处置人", trigger: "change" },
|
||||
],
|
||||
};
|
||||
|
||||
const data = reactive({
|
||||
rectifyUserList: [],
|
||||
});
|
||||
const fnGetInspectionSitUserList = async () => {
|
||||
const { userList } = await getUserListAllByCorp({
|
||||
NOMAIN: "1",
|
||||
});
|
||||
data.rectifyUserList = userList;
|
||||
};
|
||||
await fnGetInspectionSitUserList();
|
||||
|
||||
const formRef = ref(null);
|
||||
const fnClose = () => {
|
||||
formRef.value.resetFields();
|
||||
|
||||
visible.value = false;
|
||||
};
|
||||
const fnSubmit = debounce(
|
||||
1000,
|
||||
async () => {
|
||||
await useFormValidate(formRef);
|
||||
|
||||
const params = {
|
||||
...form.value,
|
||||
};
|
||||
|
||||
await dustAlarmReConfirmation(params);
|
||||
|
||||
ElMessage.success("保存成功");
|
||||
fnClose();
|
||||
emits("get-data");
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
|
|
@ -0,0 +1,132 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="80px"
|
||||
@submit.prevent="fnResetPagination()"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item
|
||||
label="设备类型"
|
||||
prop="DEVICE_TYPE"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-select
|
||||
v-model="searchForm.DEVICE_TYPE"
|
||||
placeholder="请选择设备类型"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in declarationGradeList"
|
||||
:key="item.BIANMA"
|
||||
:label="item.NAME"
|
||||
:value="item.BIANMA"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item label-width="10px">
|
||||
<el-button type="primary" native-type="submit">搜索</el-button>
|
||||
<el-button native-type="reset" @click="fnResetPagination">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<layout-card>
|
||||
<layout-table
|
||||
ref="tableRef"
|
||||
v-model:pagination="pagination"
|
||||
row-key="DUST_CLEANING_RECORD_ID"
|
||||
:data="list"
|
||||
@get-data="fnGetData"
|
||||
>
|
||||
<el-table-column label="序号" width="70">
|
||||
<template #default="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="报警设备编码" prop="DEVICE_CODE" />
|
||||
<el-table-column label="报警设备名称" prop="DEVICE_NAME">
|
||||
</el-table-column>
|
||||
<el-table-column label="告警优先级" prop="ALARM_LEVEL">
|
||||
<template #default="{ row }">
|
||||
{{
|
||||
row.ALARM_LEVEL === 1
|
||||
? "警告"
|
||||
: row.ALARM_LEVEL === 2
|
||||
? "一般报警"
|
||||
: row.ALARM_LEVEL === 3
|
||||
? "严重"
|
||||
: ""
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="报警触发条件" prop="TRIGGER_REASON" />
|
||||
<el-table-column label="报警时间" prop="CLEARED_TIME">
|
||||
<template #default="{ row }">
|
||||
{{ formatUTCDate(row.CLEARED_TIME) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" width="180">
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" text link @click="fnConfirm(row)">
|
||||
确认
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</layout-table>
|
||||
</layout-card>
|
||||
|
||||
<alarmConfirm
|
||||
v-if="alarmConfirmDialog.visible"
|
||||
v-model:visible="alarmConfirmDialog.visible"
|
||||
v-model:form="alarmConfirmDialog.form"
|
||||
@get-data="fnResetPagination"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from "vue";
|
||||
import { serialNumber } from "@/assets/js/utils";
|
||||
import {
|
||||
dustAlarmRecordConfirmationPage,
|
||||
// dustAlarmRecordDetail,
|
||||
} from "@/request/dust_clean_management";
|
||||
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import { layoutFnDustDeviceOrdinaryType } from "@/assets/js/data_dictionary";
|
||||
import alarmConfirm from "./components/alarm_confirm.vue";
|
||||
|
||||
import { formatUTCDate } from "@/assets/js/utils.js";
|
||||
|
||||
const declarationGradeList = await layoutFnDustDeviceOrdinaryType();
|
||||
const { list, pagination, searchForm, fnGetData, fnResetPagination, tableRef } =
|
||||
useListData(dustAlarmRecordConfirmationPage, {});
|
||||
|
||||
const alarmConfirmDialog = ref({
|
||||
visible: false,
|
||||
form: {
|
||||
ALARM_RECORD_ID: "",
|
||||
},
|
||||
});
|
||||
|
||||
const fnConfirm = async (row) => {
|
||||
alarmConfirmDialog.value.form.ALARM_RECORD_ID = row.ALARM_RECORD_ID;
|
||||
alarmConfirmDialog.value.form.DEVICE_CODE = row.DEVICE_CODE;
|
||||
alarmConfirmDialog.value.form.DEVICE_NAME = row.DEVICE_NAME;
|
||||
alarmConfirmDialog.value.form.TRIGGER_REASON = row.TRIGGER_REASON;
|
||||
alarmConfirmDialog.value.form.CLEARED_TIME = row.CLEARED_TIME;
|
||||
alarmConfirmDialog.value.visible = true;
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
@ -0,0 +1,216 @@
|
|||
<template>
|
||||
<layout-card>
|
||||
<el-form ref="formRef" :rules="rules" :model="form" label-width="200px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="清扫项目" prop="CLEAR_ITEM_ID">
|
||||
<el-select v-model="form.CLEAR_ITEM_ID" multiple @change="fnClear">
|
||||
<el-option
|
||||
v-for="item in declarationGradeList"
|
||||
:key="item.BIANMA"
|
||||
:label="item.NAME"
|
||||
:value="item.BIANMA"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="完成情况" prop="TASK_PROCESS">
|
||||
<el-select v-model="form.TASK_PROCESS">
|
||||
<el-option
|
||||
v-for="item in completionStatus"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="部门" prop="DEPARTMENT_ID">
|
||||
<layout-department
|
||||
v-model="form.DEPARTMENT_ID"
|
||||
@update:model-value="fnDepartmentChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="打卡人" prop="CHECKER_ID">
|
||||
<el-select v-model="form.CHECKER_ID" @change="fnUser">
|
||||
<el-option
|
||||
v-for="item in userList"
|
||||
:key="item.USER_ID"
|
||||
:label="item.NAME"
|
||||
:value="item.USER_ID"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="打卡日期" prop="RECORD_DATE">
|
||||
<el-date-picker
|
||||
v-model="form.RECORD_DATE"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
type="date"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="打卡图片" prop="FILES">
|
||||
<layout-upload
|
||||
v-model:file-list="form.FILES"
|
||||
accept=".jpg,.jpeg,.png"
|
||||
list-type="picture-card"
|
||||
:limit="99"
|
||||
delete-to-server
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div class="tc mt-10">
|
||||
<el-button type="primary" @click="fnSubmit">确 定</el-button>
|
||||
</div>
|
||||
</layout-card>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, watchEffect } from "vue";
|
||||
import LayoutUpload from "@/components/upload/index";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import { layoutFnCleaningProjectType } from "@/assets/js/data_dictionary";
|
||||
import { ElMessage } from "element-plus";
|
||||
import {
|
||||
dustCleaningRecordDetail,
|
||||
dustCleaningRecordAdd,
|
||||
dustCleaningRecordEdit,
|
||||
} from "@/request/dust_clean_management";
|
||||
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||
import LayoutDepartment from "@/components/department/index.vue";
|
||||
|
||||
import { getUserListAll } from "@/request/data_dictionary.js";
|
||||
|
||||
const FILE_URL = import.meta.env.VITE_FILE_URL;
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const { DUST_CLEANING_RECORD_ID } = route.query;
|
||||
const userList = ref([]);
|
||||
|
||||
const completionStatus = [
|
||||
{
|
||||
id: "0",
|
||||
name: "未完成",
|
||||
},
|
||||
{
|
||||
id: "1",
|
||||
name: "已完成",
|
||||
},
|
||||
];
|
||||
const rules = {
|
||||
CLEAR_ITEM_ID: [
|
||||
{ required: true, message: "请选择清扫项目", trigger: "change" },
|
||||
],
|
||||
TASK_PROCESS: [
|
||||
{ required: true, message: "请选择完成情况", trigger: "change" },
|
||||
],
|
||||
DEPARTMENT_ID: [{ required: true, message: "请选择部门", trigger: "change" }],
|
||||
CHECKER_ID: [{ required: true, message: "请选择打卡人", trigger: "change" }],
|
||||
RECORD_DATE: [
|
||||
{ required: true, message: "请选择打卡日期", trigger: "change" },
|
||||
],
|
||||
FILES: [{ required: true, message: "请上传打卡图片", trigger: "change" }],
|
||||
};
|
||||
const formRef = ref(null);
|
||||
const form = ref({
|
||||
CLEAR_ITEM_ID: [],
|
||||
TASK_PROCESS: "",
|
||||
DEPARTMENT_ID: "",
|
||||
CHECKER_ID: "",
|
||||
RECORD_DATE: "",
|
||||
FILES: [],
|
||||
});
|
||||
|
||||
const fnDepartmentChange = () => {
|
||||
|
||||
form.value.CHECKER_ID = "";
|
||||
};
|
||||
|
||||
watchEffect(() => {
|
||||
if (form.value.DEPARTMENT_ID)
|
||||
fnRectificationDepartmentChange(form.value.DEPARTMENT_ID);
|
||||
});
|
||||
|
||||
const fnRectificationDepartmentChange = async (event) => {
|
||||
const resData = await getUserListAll({
|
||||
DEPARTMENT_ID: event,
|
||||
});
|
||||
userList.value = resData.userList;
|
||||
};
|
||||
const fnClear = async () => {
|
||||
const arr = [];
|
||||
declarationGradeList.value.forEach((item) => {
|
||||
form.value.CLEAR_ITEM_ID.forEach((items) => {
|
||||
if (item.BIANMA === items) {
|
||||
arr.push(item.NAME);
|
||||
}
|
||||
});
|
||||
});
|
||||
form.value.CLEAR_ITEM_NAME = arr.join(",");
|
||||
};
|
||||
|
||||
const fnUser = async () => {
|
||||
userList.value.forEach((item) => {
|
||||
if (item.USER_ID === form.value.CHECKER_ID) {
|
||||
form.value.CHECKER_NAME = item.NAME;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const fnGetData = async () => {
|
||||
if (!DUST_CLEANING_RECORD_ID) return;
|
||||
const resData = await dustCleaningRecordDetail({ DUST_CLEANING_RECORD_ID });
|
||||
resData.pd.CLEAR_ITEM_ID = resData.pd.CLEAR_ITEM_ID.split(",");
|
||||
form.value = resData.pd;
|
||||
const imgArr = [];
|
||||
resData.pd.imgFiles.forEach((item) => {
|
||||
imgArr.push({
|
||||
url: FILE_URL + item.FILEPATH,
|
||||
name: item.NAME,
|
||||
});
|
||||
});
|
||||
|
||||
form.value.FILES = imgArr;
|
||||
};
|
||||
fnGetData();
|
||||
const declarationGradeList = await layoutFnCleaningProjectType();
|
||||
|
||||
const fnSubmit = debounce(
|
||||
1000,
|
||||
async () => {
|
||||
form.value.CLEAR_ITEM_ID = form.value.CLEAR_ITEM_ID.join(",");
|
||||
await useFormValidate(formRef);
|
||||
const formData = new FormData();
|
||||
Object.keys(form.value).forEach((key) => {
|
||||
formData.append(key, form.value[key]);
|
||||
});
|
||||
formData.delete("FILES");
|
||||
|
||||
for (let i = 0; i < form.value.FILES.length; i++) {
|
||||
if (form.value.FILES[i].raw)
|
||||
formData.append("FILES", form.value.FILES[i].raw);
|
||||
}
|
||||
|
||||
if (!DUST_CLEANING_RECORD_ID) await dustCleaningRecordAdd(formData);
|
||||
else await dustCleaningRecordEdit(formData);
|
||||
ElMessage.success("保存成功");
|
||||
router.back();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
@ -0,0 +1,186 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="80px"
|
||||
@submit.prevent="fnResetPagination()"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label=" " prop="dates" label-width="0px">
|
||||
<el-date-picker
|
||||
v-model="searchForm.dates"
|
||||
type="daterange"
|
||||
start-placeholder="开始时间"
|
||||
end-placeholder="结束时间"
|
||||
value-format="YYYY-MM-DD"
|
||||
format="YYYY-MM-DD"
|
||||
range-separator="至"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item label-width="10px">
|
||||
<el-button type="primary" native-type="submit">搜索</el-button>
|
||||
<el-button native-type="reset" @click="fnResetPagination">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<layout-card>
|
||||
<layout-table
|
||||
ref="tableRef"
|
||||
v-model:pagination="pagination"
|
||||
row-key="DUST_CLEANING_RECORD_ID"
|
||||
:data="list"
|
||||
@get-data="fnGetData"
|
||||
>
|
||||
<el-table-column label="序号" width="70">
|
||||
<template #default="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="清扫项目" prop="CLEAR_ITEM_NAME" />
|
||||
<el-table-column label="完成情况" prop="TASK_PROCESS">
|
||||
<template #default="{ row }">
|
||||
{{
|
||||
row.TASK_PROCESS === "1"
|
||||
? "已完成"
|
||||
: row.TASK_PROCESS === "0"
|
||||
? "未完成"
|
||||
: ""
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="打卡人" prop="CHECKER_NAME" />
|
||||
<el-table-column label="打卡日期" prop="RECORD_DATE" />
|
||||
<el-table-column label="打卡日期" prop="RECORD_DATE" />
|
||||
<el-table-column label="创建人" prop="CREATOR_NAME" />
|
||||
<el-table-column label="创建日期" prop="CREATTIME" />
|
||||
<el-table-column label="操作" width="180">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/dust_management/basic_info_management/dust_cleaning_record/view',
|
||||
query: {
|
||||
DUST_CLEANING_RECORD_ID: row.DUST_CLEANING_RECORD_ID,
|
||||
},
|
||||
})
|
||||
"
|
||||
>
|
||||
查看
|
||||
</el-button>
|
||||
<el-button
|
||||
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="fnDelete(row.DUST_CLEANING_RECORD_ID)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/dust_management/basic_info_management/dust_cleaning_record/add',
|
||||
query: {
|
||||
DUST_CLEANING_RECORD_ID: row.DUST_CLEANING_RECORD_ID,
|
||||
},
|
||||
})
|
||||
"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<template #button>
|
||||
<el-button
|
||||
|
||||
type="primary"
|
||||
@click="
|
||||
router.push({
|
||||
path: '/dust_management/basic_info_management/dust_cleaning_record/add',
|
||||
})
|
||||
"
|
||||
>
|
||||
新增
|
||||
</el-button>
|
||||
<!-- <el-button
|
||||
type="danger"
|
||||
@click="fnDeleteAll"
|
||||
>
|
||||
批量删除
|
||||
</el-button> -->
|
||||
</template>
|
||||
</layout-table>
|
||||
</layout-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { serialNumber } from "@/assets/js/utils";
|
||||
import {
|
||||
getDustCleaningRecord,
|
||||
dustCleaningRecordDelete,
|
||||
} from "@/request/dust_clean_management";
|
||||
|
||||
import { debounce } from "throttle-debounce";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import { useRouter } from "vue-router";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
|
||||
const router = useRouter();
|
||||
const { list, pagination, searchForm, fnGetData, fnResetPagination, tableRef } =
|
||||
useListData(getDustCleaningRecord, {
|
||||
beforeGetData: (searchForm) => ({
|
||||
START_DATE: searchForm.dates?.[0],
|
||||
END_DATE: searchForm.dates?.[1],
|
||||
}),
|
||||
});
|
||||
|
||||
const fnDelete = debounce(
|
||||
1000,
|
||||
async (DUST_CLEANING_RECORD_ID) => {
|
||||
await ElMessageBox.confirm("确定要删除吗?", { type: "warning" });
|
||||
await dustCleaningRecordDelete({ DUST_CLEANING_RECORD_ID });
|
||||
ElMessage.success("删除成功");
|
||||
fnResetPagination();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
|
||||
// const fnDeleteAll = debounce(
|
||||
// 1000,
|
||||
// async () => {
|
||||
// const selectionData = tableRef.value.getSelectionRows();
|
||||
// if (selectionData.length === 0) {
|
||||
// ElMessage.warning("请选中要删除的项");
|
||||
// return;
|
||||
// }
|
||||
// const DATA_IDS = selectionData
|
||||
// .map((item) => item.DUST_CLEANING_RECORD_ID)
|
||||
// .join(",");
|
||||
// await ElMessageBox.confirm("确定要删除吗?", { type: "warning" });
|
||||
// console.log(DATA_IDS);
|
||||
// await setMajorHazardManagementDeleteMultiple({ DATA_IDS });
|
||||
// ElMessage.success("删除成功");
|
||||
// fnResetPagination();
|
||||
// },
|
||||
// { atBegin: true }
|
||||
// );
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
<template>
|
||||
<layout-card>
|
||||
<!-- <el-divider content-position="left">查看</el-divider> -->
|
||||
<el-descriptions :column="1" border>
|
||||
<el-descriptions-item label="清扫项目" :span="1">
|
||||
{{ info.CLEAR_ITEM_NAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="完成情况">
|
||||
{{
|
||||
info.TASK_PROCESS === "1"
|
||||
? "已完成"
|
||||
: info.TASK_PROCESS === "0"
|
||||
? "未完成"
|
||||
: ""
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="打卡人">
|
||||
{{ info.CHECKER_NAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="打卡日期">
|
||||
{{ info.RECORD_DATE }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="创建人">
|
||||
{{ info.CREATOR_NAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="创建日期">
|
||||
{{ info.CREATTIME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="打卡图片" :span="1">
|
||||
<img
|
||||
v-for="item in info.imgFiles"
|
||||
:key="item.IMGFILES_ID"
|
||||
v-viewer
|
||||
:src="item.url"
|
||||
width="100"
|
||||
height="100"
|
||||
class="ml-10"
|
||||
/>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</layout-card>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useRoute } from "vue-router";
|
||||
import { ref } from "vue";
|
||||
import { dustCleaningRecordDetail } from "@/request/dust_clean_management";
|
||||
const route = useRoute();
|
||||
const { DUST_CLEANING_RECORD_ID } = route.query;
|
||||
const info = ref({});
|
||||
const fnGetData = async () => {
|
||||
const resData = await dustCleaningRecordDetail({ DUST_CLEANING_RECORD_ID });
|
||||
info.value = resData.pd;
|
||||
};
|
||||
fnGetData();
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
#map_container {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,369 @@
|
|||
<template>
|
||||
<layout-card>
|
||||
<el-col :span="24">
|
||||
<el-divider content-position="left">{{
|
||||
DEVICE_ID ? "设备信息修改" : "新增设备"
|
||||
}}</el-divider>
|
||||
</el-col>
|
||||
<el-form ref="formRef" :rules="rules" :model="form" label-width="200px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="设备名称" prop="DEVICE_NAME">
|
||||
<el-input v-model="form.DEVICE_NAME" placeholder="请输入设备名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="设备编码" prop="DEVICE_CODE">
|
||||
<el-input v-model="form.DEVICE_CODE" placeholder="请输入设备编码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="数据接入标识" prop="DATA_ACCESS_CODE">
|
||||
<el-input
|
||||
v-model="form.DATA_ACCESS_CODE"
|
||||
placeholder="请输入数据接入标识"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属车间" prop="DEPARTMENT_ID">
|
||||
<layout-department v-model="form.DEPARTMENT_ID" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" v-if="TYPE === 'TDCCXT3'">
|
||||
<el-form-item label="设备类型" prop="DEVICE_TYPE">
|
||||
<el-select v-model="form.DEVICE_TYPE">
|
||||
<el-option
|
||||
v-for="item in declarationGradeList"
|
||||
:key="item.BIANMA"
|
||||
:label="item.NAME"
|
||||
:value="item.BIANMA"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="设备厂家" prop="MANUFACTURER">
|
||||
<el-input
|
||||
v-model="form.MANUFACTURER"
|
||||
placeholder="请输入设备厂家"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="安装日期" prop="INSTALL_DATE">
|
||||
<el-date-picker
|
||||
v-model="form.INSTALL_DATE"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
type="date"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="相关空爆措施" prop="EXPLOSION_MEASURES_ID">
|
||||
<el-select v-model="form.EXPLOSION_MEASURES_ID" multiple>
|
||||
<el-option
|
||||
v-for="item in explosionMeasuresList"
|
||||
:key="item.BIANMA"
|
||||
:label="item.NAME"
|
||||
:value="item.BIANMA"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="安装区域" prop="INSTALL_AREA">
|
||||
<el-select v-model="form.INSTALL_AREA">
|
||||
<el-option
|
||||
v-for="item in installationAreaStatus"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="除尘种类" prop="DUST_CATEGORY">
|
||||
<el-select v-model="form.DUST_CATEGORY">
|
||||
<el-option
|
||||
v-for="item in dustCategoryData"
|
||||
:key="item.FULL_CODE"
|
||||
:label="item.FULL_NAME + '(' + item.FULL_CODE + ')'"
|
||||
:value="item.FULL_CODE"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属单班最高涉粉作业人数" prop="MAX_WORKERS">
|
||||
<el-input
|
||||
v-model.number="form.MAX_WORKERS"
|
||||
placeholder="请输入所属单班最高涉粉作业人数"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="设备关联高风险工艺" prop="RISK_PROCESS_ID">
|
||||
<el-select v-model="form.RISK_PROCESS_ID" multiple>
|
||||
<el-option
|
||||
v-for="item in riskProcessList"
|
||||
:key="item.BIANMA"
|
||||
:label="item.NAME"
|
||||
:value="item.BIANMA"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="本除尘系统日产尘量" prop="DAILY_DUST_AMOUNT">
|
||||
<el-input
|
||||
v-model.number="form.DAILY_DUST_AMOUNT"
|
||||
placeholder="请输入本除尘系统日产尘量"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="系统停用状态" prop="DISABLED_STATUS">
|
||||
<el-select v-model="form.DISABLED_STATUS">
|
||||
<el-option
|
||||
v-for="item in dieabledStatus"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="设备在线状态" prop="ONLINE_STATUS">
|
||||
<el-select v-model="form.ONLINE_STATUS">
|
||||
<el-option
|
||||
v-for="item in onlineStatus"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div class="tc mt-10">
|
||||
<el-button type="primary" @click="fnSubmit">确 定</el-button>
|
||||
</div>
|
||||
</layout-card>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from "vue";
|
||||
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import {
|
||||
layoutFnDustDeviceType,
|
||||
layoutFnExplosionMeasuresType,
|
||||
layoutFnRiskProcessType,
|
||||
} from "@/assets/js/data_dictionary";
|
||||
import { ElMessage } from "element-plus";
|
||||
import {
|
||||
dustDeviceDetail,
|
||||
dustDeviceAdd,
|
||||
dustDeviceEdit,
|
||||
getDustCategoryList,
|
||||
} from "@/request/dust_clean_management";
|
||||
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||
import LayoutDepartment from "@/components/department/index.vue";
|
||||
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const { DEVICE_ID, TYPE } = route.query;
|
||||
|
||||
const installationAreaStatus = [
|
||||
{
|
||||
id: 1,
|
||||
name: "室内",
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
name: "室外",
|
||||
},
|
||||
];
|
||||
const dieabledStatus = [
|
||||
{
|
||||
id: "0",
|
||||
name: "未停用",
|
||||
},
|
||||
{
|
||||
id: "1",
|
||||
name: "停用",
|
||||
},
|
||||
];
|
||||
const onlineStatus = [
|
||||
{
|
||||
id: "0",
|
||||
name: "离线",
|
||||
},
|
||||
{
|
||||
id: "1",
|
||||
name: "在线",
|
||||
},
|
||||
];
|
||||
const rules = {
|
||||
DEVICE_NAME: [
|
||||
{ required: true, message: "请输入设备名称", trigger: "blur" },
|
||||
{ max: 100, message: "长度最大不超过100 个字符", trigger: "blur" },
|
||||
],
|
||||
DEVICE_CODE: [
|
||||
{ required: true, message: "请输入设备编码", trigger: "blur" },
|
||||
{ max: 100, message: "长度最大不超过100 个字符", trigger: "blur" },
|
||||
],
|
||||
DATA_ACCESS_CODE: [
|
||||
{ required: true, message: "请输入数据接入标识", trigger: "blur" },
|
||||
{ max: 100, message: "长度最大不超过100 个字符", trigger: "blur" },
|
||||
],
|
||||
DEPARTMENT_ID: [
|
||||
{ required: true, message: "请选择所属车间", trigger: "change" },
|
||||
],
|
||||
DEVICE_TYPE: [
|
||||
{ required: true, message: "请选择设备类型", trigger: "change" },
|
||||
],
|
||||
MANUFACTURER: [
|
||||
{ required: true, message: "请输入设备厂家", trigger: "blur" },
|
||||
{ max: 100, message: "长度最大不超过100 个字符", trigger: "blur" },
|
||||
],
|
||||
INSTALL_DATE: [
|
||||
{ required: true, message: "请选择安装日期", trigger: "change" },
|
||||
],
|
||||
EXPLOSION_MEASURES_ID: [
|
||||
{ required: true, message: "请选择相关空爆措施", trigger: "change" },
|
||||
],
|
||||
INSTALL_AREA: [
|
||||
{ required: true, message: "请选择安装区域", trigger: "change" },
|
||||
],
|
||||
DUST_CATEGORY: [
|
||||
{ required: true, message: "请选择除尘种类", trigger: "change" },
|
||||
],
|
||||
MAX_WORKERS: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入所属单班最高涉粉作业人数",
|
||||
trigger: "blur",
|
||||
},
|
||||
{ type: "number", message: "请输入数字", trigger: "blur" },
|
||||
],
|
||||
DAILY_DUST_AMOUNT: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入本除尘系统日产尘量",
|
||||
trigger: "blur",
|
||||
},
|
||||
{ type: "number", message: "请输入数字", trigger: "blur" },
|
||||
],
|
||||
RISK_PROCESS_ID: [
|
||||
{ required: true, message: "请选择设备关联高风险工艺", trigger: "change" },
|
||||
],
|
||||
DISABLED_STATUS: [
|
||||
{ required: true, message: "请选择系统停用状态", trigger: "change" },
|
||||
],
|
||||
ONLINE_STATUS: [
|
||||
{ required: true, message: "请选择设备在线状态", trigger: "change" },
|
||||
],
|
||||
};
|
||||
const formRef = ref(null);
|
||||
const form = ref({
|
||||
DEVICE_NAME: "",
|
||||
DEVICE_CODE: "",
|
||||
DATA_ACCESS_CODE: "",
|
||||
DEPARTMENT_ID: "",
|
||||
DEVICE_TYPE: "",
|
||||
INSTALL_DATE: "",
|
||||
EXPLOSION_MEASURES_ID: [],
|
||||
INSTALL_AREA: "",
|
||||
DUST_CATEGORY: "",
|
||||
MAX_WORKERS: "",
|
||||
RISK_PROCESS_ID: [],
|
||||
DAILY_DUST_AMOUNT: "",
|
||||
DISABLED_STATUS: "",
|
||||
ONLINE_STATUS: "",
|
||||
});
|
||||
const dustCategoryData = ref([]);
|
||||
|
||||
const fnGetData = async () => {
|
||||
if (!DEVICE_ID) return;
|
||||
const resData = await dustDeviceDetail({ DEVICE_ID });
|
||||
form.value = resData.data;
|
||||
form.value.EXPLOSION_MEASURES_ID =
|
||||
form.value.EXPLOSION_MEASURES_ID.split(",");
|
||||
form.value.RISK_PROCESS_ID = form.value.RISK_PROCESS_ID.split(",");
|
||||
form.value.DISABLED_STATUS = !form.value.DISABLED_STATUS
|
||||
? "0"
|
||||
: form.value.DISABLED_STATUS
|
||||
? "1"
|
||||
: "";
|
||||
form.value.ONLINE_STATUS = !form.value.ONLINE_STATUS
|
||||
? "0"
|
||||
: form.value.ONLINE_STATUS
|
||||
? "1"
|
||||
: "";
|
||||
};
|
||||
const fnGetDustCategory = async () => {
|
||||
getDustCategoryList().then((res) => {
|
||||
dustCategoryData.value = res.varList;
|
||||
});
|
||||
};
|
||||
fnGetData();
|
||||
fnGetDustCategory();
|
||||
const declarationGradeList = await layoutFnDustDeviceType();
|
||||
const explosionMeasuresList = await layoutFnExplosionMeasuresType();
|
||||
const riskProcessList = await layoutFnRiskProcessType();
|
||||
|
||||
const fnSubmit = debounce(
|
||||
1000,
|
||||
async () => {
|
||||
await useFormValidate(formRef);
|
||||
|
||||
const params = {
|
||||
...form.value,
|
||||
};
|
||||
const arr = [];
|
||||
riskProcessList.value.forEach((item) => {
|
||||
params.RISK_PROCESS_ID.forEach((items) => {
|
||||
if (item.BIANMA === items) {
|
||||
arr.push(item.NAME);
|
||||
}
|
||||
});
|
||||
});
|
||||
const explosionArr = [];
|
||||
explosionMeasuresList.value.forEach((item) => {
|
||||
params.EXPLOSION_MEASURES_ID.forEach((items) => {
|
||||
if (item.BIANMA === items) {
|
||||
explosionArr.push(item.NAME);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
params.EXPLOSION_MEASURES_ID = params.EXPLOSION_MEASURES_ID.join(",");
|
||||
params.RISK_PROCESS_ID = params.RISK_PROCESS_ID.join(",");
|
||||
params.RISK_PROCESS_NAME = arr.join(",");
|
||||
params.EXPLOSION_MEASURES_NAME = explosionArr.join(",");
|
||||
if (TYPE !== "TDCCXT3") {
|
||||
params.DEVICE_TYPE = TYPE;
|
||||
}
|
||||
|
||||
const formData = new FormData();
|
||||
Object.keys(params).forEach((key) => {
|
||||
formData.append(key, params[key]);
|
||||
});
|
||||
|
||||
if (!DEVICE_ID) await dustDeviceAdd(formData);
|
||||
else await dustDeviceEdit(formData);
|
||||
ElMessage.success("保存成功");
|
||||
router.back();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
@ -0,0 +1,123 @@
|
|||
<template>
|
||||
<div>
|
||||
<layout-card>
|
||||
<layout-table
|
||||
ref="tableRef"
|
||||
v-model:pagination="pagination"
|
||||
row-key="DUST_CLEANING_RECORD_ID"
|
||||
:data="list"
|
||||
@get-data="fnGetData"
|
||||
>
|
||||
<el-table-column label="序号" width="70">
|
||||
<template #default="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="部门" prop="DEPARTMENT_NAME" />
|
||||
<el-table-column label="人员" prop="USER_NAME"> </el-table-column>
|
||||
<el-table-column label="人员类型" prop="USER_TYPE">
|
||||
<template #default="{ row }">
|
||||
{{
|
||||
row.USER_TYPE === 1
|
||||
? "操作人员"
|
||||
: row.USER_TYPE === 2
|
||||
? "技术人员"
|
||||
: row.USER_TYPE === 3
|
||||
? "管理人员"
|
||||
: ""
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="180">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="fnDelete(row.DEVICE_NOTICE_CONFIG_ID)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
<el-button type="primary" text link @click="fnPushConfSet(row)">
|
||||
编辑
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<template #button>
|
||||
<el-button type="primary" @click="fnPushConfSet()"> 新增 </el-button>
|
||||
</template>
|
||||
</layout-table>
|
||||
</layout-card>
|
||||
<confpz
|
||||
|
||||
v-model:visible="confPzDialog.visible"
|
||||
v-model:form="confPzDialog.form"
|
||||
@get-data="fnResetPagination"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from "vue";
|
||||
import { serialNumber } from "@/assets/js/utils";
|
||||
import {
|
||||
getDeviceNoticeConfigList,
|
||||
getDeviceNoticeConfigDelete,
|
||||
} from "@/request/dust_clean_management";
|
||||
|
||||
import { debounce } from "throttle-debounce";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import { useRoute } from "vue-router";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import Confpz from "./components/confpz.vue";
|
||||
|
||||
const route = useRoute();
|
||||
const { DEVICE_ID } = route.query;
|
||||
|
||||
const confPzDialog = ref({
|
||||
visible: false,
|
||||
form: {
|
||||
USER_ID: "",
|
||||
DEPARTMENT_ID: "",
|
||||
DEVICE_ID: DEVICE_ID,
|
||||
USER_TYPE: "",
|
||||
DEVICE_NOTICE_CONFIG_ID: "",
|
||||
},
|
||||
});
|
||||
|
||||
const { list, pagination, fnGetData, fnResetPagination, tableRef } =
|
||||
useListData(getDeviceNoticeConfigList, {
|
||||
beforeGetData: () => ({
|
||||
DEVICE_ID: DEVICE_ID,
|
||||
}),
|
||||
});
|
||||
|
||||
const fnPushConfSet = async (row) => {
|
||||
if (row) {
|
||||
confPzDialog.value.form = row;
|
||||
} else {
|
||||
confPzDialog.value.form = {
|
||||
USER_ID: "",
|
||||
DEPARTMENT_ID: "",
|
||||
DEVICE_ID: DEVICE_ID,
|
||||
USER_TYPE: "",
|
||||
DEVICE_NOTICE_CONFIG_ID: "",
|
||||
};
|
||||
}
|
||||
confPzDialog.value.visible = true;
|
||||
};
|
||||
|
||||
const fnDelete = debounce(
|
||||
1000,
|
||||
async (DEVICE_NOTICE_CONFIG_ID) => {
|
||||
await ElMessageBox.confirm("确定要删除吗?", { type: "warning" });
|
||||
await getDeviceNoticeConfigDelete({ DEVICE_NOTICE_CONFIG_ID });
|
||||
ElMessage.success("删除成功");
|
||||
fnResetPagination();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
@ -0,0 +1,136 @@
|
|||
<template>
|
||||
<el-dialog
|
||||
v-model="visible"
|
||||
title="设备告警人配置"
|
||||
width="60%"
|
||||
@close="fnClose"
|
||||
>
|
||||
<el-form ref="formRef" :model="form" :rules="rules" label-width="120px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="部门" prop="DEPARTMENT_ID">
|
||||
<layout-department
|
||||
v-model="form.DEPARTMENT_ID"
|
||||
@update:model-value="fnDepartmentChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="人员" prop="USER_ID">
|
||||
<el-select v-model="form.USER_ID">
|
||||
<el-option
|
||||
v-for="item in userList"
|
||||
:key="item.USER_ID"
|
||||
:label="item.NAME"
|
||||
:value="item.USER_ID"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="人员类型" prop="USER_TYPE">
|
||||
<el-select v-model="form.USER_TYPE">
|
||||
<el-option
|
||||
v-for="item in userTypeList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="fnClose">取消</el-button>
|
||||
<el-button type="primary" @click="fnSubmit"> 确定</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, watchEffect } from "vue";
|
||||
import { useVModels } from "@vueuse/core";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||
import { ElMessage } from "element-plus";
|
||||
import {
|
||||
getDeviceNoticeConfigAdd,
|
||||
getDeviceNoticeConfigEdit,
|
||||
} from "@/request/dust_clean_management.js";
|
||||
import { getUserListAll } from "@/request/data_dictionary.js";
|
||||
import LayoutDepartment from "@/components/department/index.vue";
|
||||
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: false,
|
||||
},
|
||||
form: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: () => ({}),
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(["update:visible", "update:form", "get-data"]);
|
||||
const { visible, form } = useVModels(props, emits);
|
||||
const rules = {
|
||||
DEPARTMENT_ID: [{ required: true, message: "请选择部门", trigger: "change" }],
|
||||
USER_ID: [{ required: true, message: "请选择人员", trigger: "change" }],
|
||||
USER_TYPE: [{ required: true, message: "请选择人员类型", trigger: "change" }],
|
||||
};
|
||||
const userList = ref([]);
|
||||
const userTypeList = ref([
|
||||
{ id: 1, name: "操作人员" },
|
||||
{ id: 2, name: "技术人员" },
|
||||
{ id: 3, name: "管理人员" },
|
||||
]);
|
||||
|
||||
const fnRectificationDepartmentChange = async (event) => {
|
||||
const resData = await getUserListAll({
|
||||
DEPARTMENT_ID: event,
|
||||
});
|
||||
userList.value = resData.userList;
|
||||
};
|
||||
watchEffect(() => {
|
||||
fnRectificationDepartmentChange(form.value.DEPARTMENT_ID);
|
||||
});
|
||||
const fnDepartmentChange = () => {
|
||||
form.value.USER_ID = "";
|
||||
};
|
||||
|
||||
const formRef = ref(null);
|
||||
const fnClose = () => {
|
||||
formRef.value.resetFields();
|
||||
|
||||
visible.value = false;
|
||||
};
|
||||
const fnSubmit = debounce(
|
||||
1000,
|
||||
async () => {
|
||||
await useFormValidate(formRef);
|
||||
|
||||
const params = {
|
||||
...form.value,
|
||||
};
|
||||
if (form.value.DEVICE_NOTICE_CONFIG_ID) {
|
||||
await getDeviceNoticeConfigEdit(params);
|
||||
} else {
|
||||
await getDeviceNoticeConfigAdd(params);
|
||||
}
|
||||
|
||||
ElMessage.success("保存成功");
|
||||
fnClose();
|
||||
emits("get-data");
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
|
|
@ -0,0 +1,325 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="100px"
|
||||
@submit.prevent="fnResetPagination()"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item
|
||||
label="设备名称"
|
||||
prop="DEVICE_NAME"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-input
|
||||
v-model="searchForm.DEVICE_NAME"
|
||||
placeholder="请输入设备名称"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item
|
||||
label="设备编码"
|
||||
prop="DEVICE_CODE"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-input
|
||||
v-model="searchForm.DEVICE_CODE"
|
||||
placeholder="请输入设备编码"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item label-width="10px">
|
||||
<el-button type="primary" native-type="submit">搜索</el-button>
|
||||
<el-button native-type="reset" @click="fnResetPagination">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<layout-card>
|
||||
<layout-table
|
||||
ref="tableRef"
|
||||
v-model:pagination="pagination"
|
||||
row-key="DEVICE_ID"
|
||||
:data="list"
|
||||
@get-data="fnGetData"
|
||||
>
|
||||
<el-table-column label="序号" width="70" fixed>
|
||||
<template #default="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
label="设备名称"
|
||||
prop="DEVICE_NAME"
|
||||
fixed
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="设备编码"
|
||||
prop="DEVICE_CODE"
|
||||
fixed
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="数据接入标识"
|
||||
prop="DATA_ACCESS_CODE"
|
||||
width="120"
|
||||
show-overflow-tooltip
|
||||
fixed
|
||||
/>
|
||||
<el-table-column label="所属车间" prop="DEPARTMENT_NAME" width="150" />
|
||||
<el-table-column label="设备类型" prop="DEVICE_TYPE_NAME" width="120" />
|
||||
<el-table-column
|
||||
label="设备厂家"
|
||||
prop="MANUFACTURER"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="安装日期" prop="INSTALL_DATE" width="120" />
|
||||
<el-table-column
|
||||
label="相关空爆措施"
|
||||
prop="EXPLOSION_MEASURES_NAME"
|
||||
show-overflow-tooltip
|
||||
width="150"
|
||||
/>
|
||||
<el-table-column label="安装区域" prop="INSTALL_AREA">
|
||||
<template #default="{ row }">
|
||||
{{
|
||||
row.INSTALL_AREA === 0
|
||||
? "室外"
|
||||
: row.INSTALL_AREA === 1
|
||||
? "室内"
|
||||
: ""
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="除尘种类"
|
||||
prop="DUST_CATEGORY_NAME"
|
||||
width="120"
|
||||
/>
|
||||
<el-table-column
|
||||
label="所属单班最高涉粉作业人数"
|
||||
prop="MAX_WORKERS"
|
||||
width="120"
|
||||
/>
|
||||
<el-table-column
|
||||
label="设备关联高风险工艺"
|
||||
prop="RISK_PROCESS_NAME"
|
||||
width="150"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="本除尘系统日产尘量" prop="DAILY_DUST_AMOUNT" />
|
||||
<el-table-column label="系统停用状态" prop="DISABLED_STATUS">
|
||||
<template #default="{ row }">
|
||||
{{
|
||||
!row.DISABLED_STATUS
|
||||
? "未停用"
|
||||
: row.DISABLED_STATUS
|
||||
? "停用"
|
||||
: ""
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="设备在线状态" prop="ONLINE_STATUS">
|
||||
<template #default="{ row }">
|
||||
{{ !row.ONLINE_STATUS ? "离线" : row.ONLINE_STATUS ? "在线" : "" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="360" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: props.routerViewPath,
|
||||
query: {
|
||||
DEVICE_ID: row.DEVICE_ID,
|
||||
TYPE: props.ceviceType,
|
||||
},
|
||||
})
|
||||
"
|
||||
>
|
||||
查看
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="fnDelete(row.DEVICE_ID)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: props.routerAddPath,
|
||||
query: {
|
||||
DEVICE_ID: row.DEVICE_ID,
|
||||
TYPE: props.ceviceType,
|
||||
},
|
||||
})
|
||||
"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: props.routerAlarmPath,
|
||||
query: {
|
||||
DEVICE_ID: row.DEVICE_ID,
|
||||
},
|
||||
})
|
||||
"
|
||||
>
|
||||
设备报警通知人
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: props.routerSensorPath,
|
||||
query: {
|
||||
DEVICE_ID: row.DEVICE_ID,
|
||||
},
|
||||
})
|
||||
"
|
||||
>
|
||||
传感器列表
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<template #button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="
|
||||
router.push({
|
||||
path: props.routerAddPath,
|
||||
query: {
|
||||
TYPE: props.ceviceType,
|
||||
},
|
||||
})
|
||||
"
|
||||
>
|
||||
新增
|
||||
</el-button>
|
||||
</template>
|
||||
</layout-table>
|
||||
</layout-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
// import { ref } from "vue";
|
||||
import { serialNumber } from "@/assets/js/utils";
|
||||
import {
|
||||
getDustDeviceList,
|
||||
dustDeviceDelete,
|
||||
getDustCategoryList,
|
||||
} from "@/request/dust_clean_management";
|
||||
|
||||
import { debounce } from "throttle-debounce";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import { useRouter } from "vue-router";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import { layoutFnDustDeviceType } from "@/assets/js/data_dictionary";
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
const declarationGradeList = await layoutFnDustDeviceType();
|
||||
const dustCategoryData = await getDustCategoryList();
|
||||
|
||||
const props = defineProps({
|
||||
ceviceType: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: "GSCCXT1",
|
||||
},
|
||||
routerAddPath: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: "/dust_management/sensor_device_management/dry_device/add",
|
||||
},
|
||||
routerViewPath: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: "/dust_management/sensor_device_management/dry_device/view",
|
||||
},
|
||||
routerAlarmPath: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: "/dust_management/sensor_device_management/dry_device/alarmList",
|
||||
},
|
||||
routerSensorPath: {
|
||||
type: String,
|
||||
required: false,
|
||||
default:
|
||||
"/dust_management/sensor_device_management/dry_device/sensor_index",
|
||||
},
|
||||
});
|
||||
|
||||
const { list, pagination, searchForm, fnGetData, fnResetPagination, tableRef } =
|
||||
useListData(getDustDeviceList, {
|
||||
beforeGetData: () => ({
|
||||
DEVICE_TYPE: props.ceviceType,
|
||||
}),
|
||||
|
||||
callbackFn: (list) => {
|
||||
list.forEach((item) => {
|
||||
if (props.ceviceType === "TDCCXT3") {
|
||||
declarationGradeList.value.forEach((row) => {
|
||||
if (item.DEVICE_TYPE === row.BIANMA) {
|
||||
item.DEVICE_TYPE_NAME = row.NAME;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
item.DEVICE_TYPE_NAME =
|
||||
item.DEVICE_TYPE === "GSCCXT1"
|
||||
? "干式除尘系统"
|
||||
: item.DEVICE_TYPE === "SSCCXT2"
|
||||
? "湿式除尘系统"
|
||||
: "";
|
||||
}
|
||||
|
||||
dustCategoryData.varList.forEach((row) => {
|
||||
if (item.DUST_CATEGORY === row.FULL_CODE) {
|
||||
item.DUST_CATEGORY_NAME = row.FULL_NAME + "(" + row.FULL_CODE + ")";
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
const fnDelete = debounce(
|
||||
1000,
|
||||
async (DEVICE_ID) => {
|
||||
await ElMessageBox.confirm("确定要删除吗?", { type: "warning" });
|
||||
await dustDeviceDelete({ DEVICE_ID });
|
||||
ElMessage.success("删除成功");
|
||||
fnResetPagination();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<template>
|
||||
<div>
|
||||
<sensor-add />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import sensorAdd from "../sensor_management/add.vue";
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
<template>
|
||||
<div>
|
||||
<sensor-index
|
||||
router-add-path="/dust_management/sensor_device_management/dry_device/sensor_add"
|
||||
router-view-path="/dust_management/sensor_device_management/dry_device/sensor_view"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import sensorIndex from "../sensor_management/index.vue";
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<template>
|
||||
<div>
|
||||
<sensor-view />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import sensorView from "../sensor_management/view.vue";
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
@ -0,0 +1,117 @@
|
|||
<template>
|
||||
<layout-card>
|
||||
<el-divider content-position="left">设备详情</el-divider>
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="设备名称">
|
||||
{{ info.DEVICE_NAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="设备编码">
|
||||
{{ info.DEVICE_CODE }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="数据接入标识">
|
||||
{{ info.DATA_ACCESS_CODE }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="所属车间">
|
||||
{{ info.DEPARTMENT_NAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="设备类型">
|
||||
{{ info.DEVICE_TYPE_NAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="设备厂家">
|
||||
{{ info.MANUFACTURER }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="安装日期">
|
||||
{{ info.INSTALL_DATE }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="相关空爆措施">
|
||||
{{ info.EXPLOSION_MEASURES_NAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="安装区域">
|
||||
{{
|
||||
info.INSTALL_AREA === 0
|
||||
? "室外"
|
||||
: info.INSTALL_AREA === 1
|
||||
? "室内"
|
||||
: ""
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="除尘种类">
|
||||
{{ info.DUST_CATEGORY_NAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="所属单班最高涉粉作业人数">
|
||||
{{ info.MAX_WORKERS }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="设备关联高风险工艺">
|
||||
{{ info.RISK_PROCESS_NAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="本除尘系统日产尘量">
|
||||
{{ info.DAILY_DUST_AMOUNT }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="系统停用状态">
|
||||
{{
|
||||
!info.DISABLED_STATUS ? "未停用" : info.DISABLED_STATUS ? "停用" : ""
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="设备在线状态">
|
||||
{{ !info.ONLINE_STATUS ? "离线" : info.ONLINE_STATUS ? "在线" : "" }}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="创建人">
|
||||
{{ info.CREATOR_NAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="创建日期">
|
||||
{{ info.CREATTIME }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</layout-card>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useRoute } from "vue-router";
|
||||
import { ref } from "vue";
|
||||
import {
|
||||
dustDeviceDetail,
|
||||
getDustCategoryList,
|
||||
} from "@/request/dust_clean_management";
|
||||
import { layoutFnDustDeviceType } from "@/assets/js/data_dictionary";
|
||||
|
||||
const route = useRoute();
|
||||
const { DEVICE_ID } = route.query;
|
||||
const declarationGradeList = await layoutFnDustDeviceType();
|
||||
const info = ref({});
|
||||
const dustCategoryData = await getDustCategoryList();
|
||||
|
||||
const fnGetData = async () => {
|
||||
const resData = await dustDeviceDetail({ DEVICE_ID });
|
||||
info.value = resData.data;
|
||||
|
||||
info.value.DEVICE_TYPE_NAME =
|
||||
info.value.DEVICE_TYPE === "GSCCXT1"
|
||||
? "干式除尘系统"
|
||||
: info.value.DEVICE_TYPE === "SSCCXT2"
|
||||
? "湿式除尘系统"
|
||||
: "";
|
||||
|
||||
declarationGradeList.value.forEach((item) => {
|
||||
if (item.BIANMA === info.value.DEVICE_TYPE) {
|
||||
info.value.DEVICE_TYPE_NAME = item.NAME;
|
||||
}
|
||||
});
|
||||
|
||||
dustCategoryData.varList.forEach((item) => {
|
||||
if (item.FULL_CODE === info.value.DUST_CATEGORY) {
|
||||
info.value.DUST_CATEGORY_NAME =
|
||||
item.FULL_NAME + "(" + item.FULL_CODE + ")";
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
fnGetData();
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
#map_container {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,333 @@
|
|||
<template>
|
||||
<layout-card>
|
||||
<el-col :span="24">
|
||||
<el-divider content-position="left">{{
|
||||
DEVICE_SENSOR_ID ? "传感器信息修改" : "新增传感器"
|
||||
}}</el-divider>
|
||||
</el-col>
|
||||
<el-form ref="formRef" :rules="rules" :model="form" label-width="200px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="传感器名称" prop="SENSOR_NAME">
|
||||
<el-input v-model="form.SENSOR_NAME" placeholder="请输入设备名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="传感器编码" prop="SENSOR_CODE">
|
||||
<el-input v-model="form.SENSOR_CODE" placeholder="请输入设备编码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="传感器类型" prop="SENSOR_TYPE">
|
||||
<el-select v-model="form.SENSOR_TYPE" @change="fnSensor">
|
||||
<el-option
|
||||
v-for="item in declarationGradeList"
|
||||
:key="item.BIANMA"
|
||||
:label="item.NAME"
|
||||
:value="item.BIANMA"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="传感器报警参数" prop="SENSOR_CATEGORY">
|
||||
<el-select v-model="form.SENSOR_CATEGORY">
|
||||
<el-option
|
||||
v-for="item in sensorData"
|
||||
:key="item.BIANMA"
|
||||
:label="item.NAME"
|
||||
:value="item.BIANMA"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属设备" prop="DEVICE_ID">
|
||||
<el-select v-model="form.DEVICE_ID">
|
||||
<el-option
|
||||
v-for="item in dustCategoryData"
|
||||
:key="item.DEVICE_ID"
|
||||
:label="item.DEVICE_NAME"
|
||||
:value="item.DEVICE_ID"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="安装位置" prop="INDICATOR_POSITION">
|
||||
<el-input
|
||||
v-model="form.INDICATOR_POSITION"
|
||||
placeholder="请输入安装位置"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="12">
|
||||
<el-form-item label="位号" prop="TAG_NUMBER">
|
||||
<el-input v-model="form.TAG_NUMBER" placeholder="请输入安装位置" />
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :span="12">
|
||||
<el-form-item label="单位" prop="UNIT_VALUE">
|
||||
<el-input v-model="form.UNIT_VALUE" placeholder="请输入单位" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="信号类型" prop="SIGNAL_TYPE">
|
||||
<el-select v-model="form.SIGNAL_TYPE">
|
||||
<el-option
|
||||
v-for="item in installationAreaStatus"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<!-- <el-col :span="12">
|
||||
<el-form-item label="开关量报警值" prop="SWITCH_ALARM_VALUE">
|
||||
<el-select v-model="form.SWITCH_ALARM_VALUE">
|
||||
<el-option
|
||||
v-for="item in dieabledStatus"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :span="12">
|
||||
<el-form-item label="指标停用状态" prop="DISABLED_STATUS">
|
||||
<el-select v-model="form.DISABLED_STATUS">
|
||||
<el-option
|
||||
v-for="item in onlineStatus"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="传感器描述" prop="DESCRIPTION">
|
||||
<el-input
|
||||
:rows="3"
|
||||
type="textarea"
|
||||
v-model="form.DESCRIPTION"
|
||||
placeholder="请输入传感器描述"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div class="tc mt-10">
|
||||
<el-button type="primary" @click="fnSubmit">确 定</el-button>
|
||||
</div>
|
||||
</layout-card>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, watchEffect } from "vue";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import {
|
||||
layoutFnDustDeviceOrdinaryType,
|
||||
layoutFnDryAlarmType,
|
||||
layoutFnWetAlarmType,
|
||||
layoutFnSpecificAlarmType,
|
||||
} from "@/assets/js/data_dictionary";
|
||||
import { ElMessage } from "element-plus";
|
||||
import {
|
||||
getDustDeviceSensorDetail,
|
||||
getDustDeviceSensorAdd,
|
||||
getDustDeviceSensorEdit,
|
||||
getDustDeviceSimpleList,
|
||||
getExistSensorCode,
|
||||
} from "@/request/dust_clean_management";
|
||||
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const { DEVICE_SENSOR_ID } = route.query;
|
||||
|
||||
const sensorData = ref([]);
|
||||
|
||||
const installationAreaStatus = [
|
||||
{
|
||||
id: 1,
|
||||
name: "模拟量",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: "开关量",
|
||||
},
|
||||
];
|
||||
// const dieabledStatus = [
|
||||
// {
|
||||
// id: 0,
|
||||
// name: "关",
|
||||
// },
|
||||
// {
|
||||
// id: 1,
|
||||
// name: "开",
|
||||
// },
|
||||
// ];
|
||||
const onlineStatus = [
|
||||
{
|
||||
id: 0,
|
||||
name: "正常使用",
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: "停用",
|
||||
},
|
||||
];
|
||||
|
||||
const validateCode = async (rule, value, callback) => {
|
||||
if (value) {
|
||||
if (!DEVICE_SENSOR_ID) {
|
||||
const resData = await getExistSensorCode({
|
||||
SENSOR_CODE: value,
|
||||
});
|
||||
if (resData.pd) {
|
||||
callback(new Error("传感器编码重复"));
|
||||
}
|
||||
} else {
|
||||
const resData = await getExistSensorCode({
|
||||
SENSOR_CODE: value,
|
||||
DEVICE_SENSOR_ID: DEVICE_SENSOR_ID,
|
||||
});
|
||||
if (resData.pd) {
|
||||
callback(new Error("传感器编码重复"));
|
||||
}
|
||||
}
|
||||
} else callback();
|
||||
};
|
||||
|
||||
const rules = {
|
||||
SENSOR_NAME: [
|
||||
{ required: true, message: "请输入传感器名称", trigger: "blur" },
|
||||
{ max: 100, message: "长度最大不超过100 个字符", trigger: "blur" },
|
||||
],
|
||||
SENSOR_CODE: [
|
||||
{ required: true, message: "请输入传感器编码", trigger: "blur" },
|
||||
{ max: 100, message: "长度最大不超过100 个字符", trigger: "blur" },
|
||||
{ validator: validateCode, trigger: "blur" },
|
||||
],
|
||||
SENSOR_CATEGORY: [
|
||||
{ required: true, message: "请选择传感器报警参数", trigger: "change" },
|
||||
],
|
||||
DEVICE_ID: [{ required: true, message: "请选择所属设备", trigger: "change" }],
|
||||
|
||||
SENSOR_TYPE: [
|
||||
{ required: true, message: "请选择传感器类型", trigger: "change" },
|
||||
],
|
||||
INDICATOR_POSITION: [
|
||||
{ required: true, message: "请输入安装位置", trigger: "blur" },
|
||||
{ max: 100, message: "长度最大不超过100 个字符", trigger: "blur" },
|
||||
],
|
||||
// TAG_NUMBER: [
|
||||
// { required: true, message: "请输入位号", trigger: "blur" },
|
||||
// { max: 100, message: "长度最大不超过100 个字符", trigger: "blur" },
|
||||
// ],
|
||||
UNIT_VALUE: [
|
||||
{ required: true, message: "请输入单位", trigger: "blur" },
|
||||
{ max: 100, message: "长度最大不超过100 个字符", trigger: "blur" },
|
||||
],
|
||||
SIGNAL_TYPE: [
|
||||
{ required: true, message: "请选择信号类型", trigger: "change" },
|
||||
],
|
||||
// SWITCH_ALARM_VALUE: [
|
||||
// { required: true, message: "请选择开关量报警值", trigger: "change" },
|
||||
// ],
|
||||
DISABLED_STATUS: [
|
||||
{ required: true, message: "请选择指标停用状态", trigger: "change" },
|
||||
],
|
||||
DESCRIPTION: [
|
||||
{ required: true, message: "请输入传感器描述", trigger: "blur" },
|
||||
{ max: 255, message: "长度最大不超过255 个字符", trigger: "blur" },
|
||||
],
|
||||
};
|
||||
const formRef = ref(null);
|
||||
const form = ref({
|
||||
SENSOR_NAME: "",
|
||||
SENSOR_CODE: "",
|
||||
DATA_ACCESS_CODE: "",
|
||||
DEVICE_ID: "",
|
||||
SENSOR_TYPE: "",
|
||||
SENSOR_CATEGORY: "",
|
||||
INSTALL_DATE: "",
|
||||
INDICATOR_POSITION: "",
|
||||
// TAG_NUMBER: "",
|
||||
UNIT_VALUE: "",
|
||||
DESCRIPTION: "",
|
||||
});
|
||||
const dustCategoryData = ref([]);
|
||||
|
||||
watchEffect(() => {
|
||||
if (form.value.SENSOR_TYPE)
|
||||
fnRectificationDepartmentChange(form.value.SENSOR_TYPE);
|
||||
});
|
||||
|
||||
const fnRectificationDepartmentChange = async () => {
|
||||
if (form.value.SENSOR_TYPE === "GSCCXT1") {
|
||||
layoutFnDryAlarmType().then((res) => {
|
||||
sensorData.value = res.value;
|
||||
});
|
||||
}
|
||||
if (form.value.SENSOR_TYPE === "SSCCXT2") {
|
||||
layoutFnWetAlarmType().then((res) => {
|
||||
sensorData.value = res.value;
|
||||
});
|
||||
}
|
||||
if (form.value.SENSOR_TYPE === "TDCCXT3") {
|
||||
layoutFnSpecificAlarmType().then((res) => {
|
||||
sensorData.value = res.value;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const fnSensor = async () => {
|
||||
form.value.SENSOR_CATEGORY = "";
|
||||
};
|
||||
|
||||
const fnGetData = async () => {
|
||||
if (!DEVICE_SENSOR_ID) return;
|
||||
const resData = await getDustDeviceSensorDetail({ DEVICE_SENSOR_ID });
|
||||
form.value = resData.data;
|
||||
};
|
||||
const fnGetDustCategory = async () => {
|
||||
getDustDeviceSimpleList().then((res) => {
|
||||
dustCategoryData.value = res.varList;
|
||||
});
|
||||
};
|
||||
fnGetData();
|
||||
fnGetDustCategory();
|
||||
const declarationGradeList = await layoutFnDustDeviceOrdinaryType();
|
||||
|
||||
const fnSubmit = debounce(
|
||||
1000,
|
||||
async () => {
|
||||
await useFormValidate(formRef);
|
||||
|
||||
const params = {
|
||||
...form.value,
|
||||
};
|
||||
|
||||
const formData = new FormData();
|
||||
Object.keys(params).forEach((key) => {
|
||||
formData.append(key, params[key]);
|
||||
});
|
||||
|
||||
if (!DEVICE_SENSOR_ID) await getDustDeviceSensorAdd(formData);
|
||||
else await getDustDeviceSensorEdit(formData);
|
||||
ElMessage.success("保存成功");
|
||||
router.back();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
@ -0,0 +1,396 @@
|
|||
<template>
|
||||
<el-dialog
|
||||
v-model="visible"
|
||||
title="报警规则设置"
|
||||
width="60%"
|
||||
@close="fnClose"
|
||||
>
|
||||
<el-form ref="formRef" :model="form" :rules="rules" label-width="180px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="规则名称" prop="RULE_NAME">
|
||||
<el-input v-model="form.RULE_NAME" placeholder="请输入规则名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="设备类型" prop="DEVICE_TYPE" >
|
||||
<el-select v-model="form.DEVICE_TYPE" @change="fnDevice">
|
||||
<el-option
|
||||
v-for="item in dustDeviceOrdinaryList"
|
||||
:key="item.BIANMA"
|
||||
:label="item.NAME"
|
||||
:value="item.BIANMA"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="传感器报警参数" prop="SENSOR_TYPE">
|
||||
<el-select v-model="form.SENSOR_TYPE">
|
||||
<el-option
|
||||
v-for="item in declarationGradeList"
|
||||
:key="item.BIANMA"
|
||||
:label="item.NAME"
|
||||
:value="item.BIANMA"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="信号类型" prop="SIGNAL_TYPE">
|
||||
<el-select v-model="form.SIGNAL_TYPE">
|
||||
<el-option
|
||||
v-for="item in installationAreaStatus"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="高报阈值" prop="HIGH_ALARM">
|
||||
<el-input-number
|
||||
v-model="form.HIGH_ALARM"
|
||||
:precision="2"
|
||||
:step="0.01"
|
||||
:mix="0"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="高高报阈值" prop="HIGH_HIGH_ALARM">
|
||||
<el-input-number
|
||||
v-model="form.HIGH_HIGH_ALARM"
|
||||
:precision="2"
|
||||
:step="0.01"
|
||||
:mix="0"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="低报阈值" prop="LOW_ALARM">
|
||||
<el-input-number
|
||||
v-model="form.LOW_ALARM"
|
||||
:precision="2"
|
||||
:step="0.01"
|
||||
:mix="0"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="低低报阈值" prop="LOW_LOW_ALARM">
|
||||
<el-input-number
|
||||
v-model="form.LOW_LOW_ALARM"
|
||||
:precision="2"
|
||||
:step="0.01"
|
||||
:mix="0"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="触发需持续秒数" prop="TRIGGER_DURATION_SEC">
|
||||
<el-input-number
|
||||
v-model="form.TRIGGER_DURATION_SEC"
|
||||
:step="1"
|
||||
:mix="0"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="消警需持续秒数" prop="CLEAR_DURATION_SEC">
|
||||
<el-input-number
|
||||
v-model="form.CLEAR_DURATION_SEC"
|
||||
:step="1"
|
||||
:mix="0"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="离线小时数" prop="OFFLINE_TIMEOUT_HOUR">
|
||||
<el-input-number
|
||||
v-model="form.OFFLINE_TIMEOUT_HOUR"
|
||||
:step="1"
|
||||
:mix="0"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="开关量报警值" prop="SWITCH_ALARM_VALUE">
|
||||
<el-select v-model="form.SWITCH_ALARM_VALUE">
|
||||
<el-option
|
||||
v-for="item in dieabledStatus"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="关联的传感器信号类型"
|
||||
prop="ASSOCIATED_SENSOR_TYPE"
|
||||
>
|
||||
<el-select v-model="form.ASSOCIATED_SENSOR_TYPE">
|
||||
<el-option
|
||||
v-for="item in installationAreaStatus"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="关联条件" prop="ASSOCIATED_CONDITION">
|
||||
<el-select v-model="form.ASSOCIATED_CONDITION">
|
||||
<el-option
|
||||
v-for="item in correlationType"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否启用" prop="IS_ACTIVE">
|
||||
<el-select v-model="form.IS_ACTIVE">
|
||||
<el-option
|
||||
v-for="item in activeType"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="fnClose">取消</el-button>
|
||||
<el-button type="primary" @click="fnSubmit"> 确定</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, watchEffect } from "vue";
|
||||
import { useVModels } from "@vueuse/core";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||
import { ElMessage } from "element-plus";
|
||||
import {
|
||||
dustDeviceSensorAlarmRuleAdd,
|
||||
dustDeviceSensorAlarmRuleEdit,
|
||||
dustDeviceSensorAlarmRuleDetail,
|
||||
} from "@/request/dust_clean_management.js";
|
||||
import {
|
||||
layoutFnDustDeviceOrdinaryType,
|
||||
layoutFnDryAlarmType,
|
||||
layoutFnWetAlarmType,
|
||||
layoutFnSpecificAlarmType,
|
||||
} from "@/assets/js/data_dictionary";
|
||||
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: false,
|
||||
},
|
||||
form: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: () => ({}),
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(["update:visible", "update:form", "get-data"]);
|
||||
const { visible, form } = useVModels(props, emits);
|
||||
const installationAreaStatus = [
|
||||
{
|
||||
id: "1",
|
||||
name: "模拟量",
|
||||
},
|
||||
{
|
||||
id: "2",
|
||||
name: "开关量",
|
||||
},
|
||||
];
|
||||
const dieabledStatus = [
|
||||
{
|
||||
id: 0,
|
||||
name: "关",
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: "开",
|
||||
},
|
||||
];
|
||||
const correlationType = [
|
||||
{
|
||||
id: "0",
|
||||
name: "关闭",
|
||||
},
|
||||
{
|
||||
id: "1",
|
||||
name: "开启",
|
||||
},
|
||||
];
|
||||
const activeType = [
|
||||
{
|
||||
id: 0,
|
||||
name: "否",
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: "是",
|
||||
},
|
||||
];
|
||||
const dustDeviceOrdinaryList = await layoutFnDustDeviceOrdinaryType();
|
||||
const declarationGradeList = ref([]);
|
||||
|
||||
form.value = {
|
||||
DEVICE_SENSOR_ID: form.value.DEVICE_SENSOR_ID,
|
||||
RULE_NAME: "",
|
||||
DEVICE_TYPE: "",
|
||||
SENSOR_TYPE: "",
|
||||
SIGNAL_TYPE: "",
|
||||
HIGH_ALARM: 0.0,
|
||||
HIGH_HIGH_ALARM: 0.0,
|
||||
LOW_ALARM: 0.0,
|
||||
LOW_LOW_ALARM: 0.0,
|
||||
SWITCH_ALARM_VALUE: "",
|
||||
TRIGGER_DURATION_SEC: 0,
|
||||
CLEAR_DURATION_SEC: 0,
|
||||
ASSOCIATED_SENSOR_TYPE: "",
|
||||
ASSOCIATED_CONDITION: "",
|
||||
OFFLINE_TIMEOUT_HOUR: 0,
|
||||
IS_ACTIVE: "",
|
||||
};
|
||||
const fnDustDeviceSensorAlarmRule = async () => {
|
||||
dustDeviceSensorAlarmRuleDetail({
|
||||
DEVICE_SENSOR_ID: form.value.DEVICE_SENSOR_ID,
|
||||
}).then((res) => {
|
||||
if (!res.pd) {
|
||||
return;
|
||||
}
|
||||
res.pd.SIGNAL_TYPE = String(res.pd.SIGNAL_TYPE);
|
||||
form.value = res.pd;
|
||||
});
|
||||
};
|
||||
|
||||
fnDustDeviceSensorAlarmRule();
|
||||
|
||||
watchEffect(() => {
|
||||
if (form.value.DEVICE_TYPE) fngetAlarmType(form.value.DEVICE_TYPE);
|
||||
});
|
||||
|
||||
const fngetAlarmType = async () => {
|
||||
if (form.value.DEVICE_TYPE === "GSCCXT1") {
|
||||
layoutFnDryAlarmType().then((res) => {
|
||||
declarationGradeList.value = res.value;
|
||||
});
|
||||
}
|
||||
if (form.value.DEVICE_TYPE === "SSCCXT2") {
|
||||
layoutFnWetAlarmType().then((res) => {
|
||||
declarationGradeList.value = res.value;
|
||||
});
|
||||
}
|
||||
if (form.value.DEVICE_TYPE === "TDCCXT3") {
|
||||
layoutFnSpecificAlarmType().then((res) => {
|
||||
declarationGradeList.value = res.value;
|
||||
});
|
||||
}
|
||||
};
|
||||
const fnDevice = async () => {
|
||||
form.value.SENSOR_TYPE = "";
|
||||
};
|
||||
const rules = {
|
||||
RULE_NAME: [
|
||||
{ required: true, message: "请输入规则名称", trigger: "blur" },
|
||||
{ max: 100, message: "长度最大不超过100 个字符", trigger: "blur" },
|
||||
],
|
||||
DEVICE_TYPE: [
|
||||
{ required: true, message: "请选择传设备类型", trigger: "change" },
|
||||
],
|
||||
SENSOR_TYPE: [
|
||||
{ required: true, message: "请选择传设传感器类型", trigger: "change" },
|
||||
],
|
||||
SIGNAL_TYPE: [
|
||||
{ required: true, message: "请选择信号类型", trigger: "change" },
|
||||
],
|
||||
HIGH_ALARM: [{ required: true, message: "请输入高报阈值", trigger: "blur" }],
|
||||
HIGH_HIGH_ALARM: [
|
||||
{ required: true, message: "请输入高高报阈值", trigger: "blur" },
|
||||
],
|
||||
LOW_ALARM: [{ required: true, message: "请输入低报阈值", trigger: "blur" }],
|
||||
LOW_LOW_ALARM: [
|
||||
{ required: true, message: "请输入低低报阈值", trigger: "blur" },
|
||||
],
|
||||
SWITCH_ALARM_VALUE: [
|
||||
{ required: true, message: "请选择开关量报警值", trigger: "change" },
|
||||
],
|
||||
TRIGGER_DURATION_SEC: [
|
||||
{ required: true, message: "请输入触发需持续秒数", trigger: "blur" },
|
||||
],
|
||||
CLEAR_DURATION_SEC: [
|
||||
{ required: true, message: "请输入消警需持续秒数", trigger: "blur" },
|
||||
],
|
||||
ASSOCIATED_SENSOR_TYPE: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择关联的传感器信号类型",
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
ASSOCIATED_CONDITION: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择关联条件",
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
OFFLINE_TIMEOUT_HOUR: [
|
||||
{ required: true, message: "请输入离线小时数", trigger: "blur" },
|
||||
],
|
||||
IS_ACTIVE: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择是否启用",
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
const formRef = ref(null);
|
||||
const fnClose = () => {
|
||||
formRef.value.resetFields();
|
||||
visible.value = false;
|
||||
};
|
||||
const fnSubmit = debounce(
|
||||
1000,
|
||||
async () => {
|
||||
await useFormValidate(formRef);
|
||||
|
||||
const params = {
|
||||
...form.value,
|
||||
};
|
||||
if (form.value.RULE_ID) {
|
||||
await dustDeviceSensorAlarmRuleEdit(params);
|
||||
} else {
|
||||
await dustDeviceSensorAlarmRuleAdd(params);
|
||||
}
|
||||
|
||||
ElMessage.success("保存成功");
|
||||
fnClose();
|
||||
emits("get-data");
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
|
|
@ -0,0 +1,291 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="100px"
|
||||
@submit.prevent="fnResetPagination()"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item
|
||||
label="传感器名称"
|
||||
prop="SENSOR_NAME"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-input
|
||||
v-model="searchForm.SENSOR_NAME"
|
||||
placeholder="请输入传感器名称"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item
|
||||
label="传感器编号"
|
||||
prop="SENSOR_CODE"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-input
|
||||
v-model="searchForm.SENSOR_CODE"
|
||||
placeholder="请输入传感器编号"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" v-if="!DEVICE_ID">
|
||||
<el-form-item label="所属设备" prop="DEVICE_ID" label-width="100px">
|
||||
<el-select
|
||||
v-model="searchForm.DEVICE_ID"
|
||||
placeholder="请选择所属设备"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dustCategoryData"
|
||||
:key="item.DEVICE_ID"
|
||||
:label="item.DEVICE_NAME"
|
||||
:value="item.DEVICE_ID"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item label-width="10px">
|
||||
<el-button type="primary" native-type="submit">搜索</el-button>
|
||||
<el-button native-type="reset" @click="fnResetPagination">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<layout-card>
|
||||
<layout-table
|
||||
ref="tableRef"
|
||||
v-model:pagination="pagination"
|
||||
row-key="DEVICE_SENSOR_ID"
|
||||
:data="list"
|
||||
@get-data="fnGetData"
|
||||
>
|
||||
<el-table-column label="序号" width="70" fixed>
|
||||
<template #default="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
label="传感器名称"
|
||||
prop="SENSOR_NAME"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="传感器编码"
|
||||
prop="SENSOR_CODE"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="传感器类型"
|
||||
prop="SENSOR_TYPE_NAME"
|
||||
width="120"
|
||||
/>
|
||||
<el-table-column label="所属设备" prop="DEVICE_NAME" />
|
||||
<el-table-column
|
||||
label="安装位置"
|
||||
prop="INDICATOR_POSITION"
|
||||
width="120"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<!-- <el-table-column label="位号" prop="TAG_NUMBER" show-overflow-tooltip /> -->
|
||||
<el-table-column label="单位" prop="UNIT_VALUE" width="120" />
|
||||
|
||||
<el-table-column label="信号类型" prop="SIGNAL_TYPE">
|
||||
<template #default="{ row }">
|
||||
{{
|
||||
row.SIGNAL_TYPE === 1
|
||||
? "模拟量"
|
||||
: row.SIGNAL_TYPE === 2
|
||||
? "开关量"
|
||||
: ""
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="开关量报警值" prop="SWITCH_ALARM_VALUE">
|
||||
<template #default="{ row }">
|
||||
{{
|
||||
row.SWITCH_ALARM_VALUE === 0
|
||||
? "关"
|
||||
: row.SWITCH_ALARM_VALUE === 1
|
||||
? "开"
|
||||
: ""
|
||||
}}
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="指标停用状态" prop="DISABLED_STATUS">
|
||||
<template #default="{ row }">
|
||||
{{
|
||||
row.DISABLED_STATUS === 0
|
||||
? "正常使用"
|
||||
: row.DISABLED_STATUS === 1
|
||||
? "停用"
|
||||
: ""
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
label="传感器描述"
|
||||
prop="DESCRIPTION"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
|
||||
<el-table-column label="操作" width="230" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: props.routerViewPath,
|
||||
query: {
|
||||
DEVICE_SENSOR_ID: row.DEVICE_SENSOR_ID,
|
||||
},
|
||||
})
|
||||
"
|
||||
>
|
||||
查看
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="fnDelete(row.DEVICE_SENSOR_ID)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: props.routerAddPath,
|
||||
query: {
|
||||
DEVICE_SENSOR_ID: row.DEVICE_SENSOR_ID,
|
||||
},
|
||||
})
|
||||
"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button type="primary" text link @click="fnOpenThreshold(row)">
|
||||
报警规则
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<template #button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="
|
||||
router.push({
|
||||
path: props.routerAddPath,
|
||||
})
|
||||
"
|
||||
>
|
||||
新增
|
||||
</el-button>
|
||||
</template>
|
||||
</layout-table>
|
||||
</layout-card>
|
||||
<threshold
|
||||
v-if="thresHoldDialog.visible"
|
||||
v-model:visible="thresHoldDialog.visible"
|
||||
v-model:form="thresHoldDialog.form"
|
||||
@get-data="fnResetPagination"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from "vue";
|
||||
import { serialNumber } from "@/assets/js/utils";
|
||||
import {
|
||||
getDustDeviceSensorList,
|
||||
getDustDeviceSensorDelete,
|
||||
getDustDeviceSimpleList,
|
||||
} from "@/request/dust_clean_management";
|
||||
|
||||
import { debounce } from "throttle-debounce";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import { layoutFnDustDeviceOrdinaryType } from "@/assets/js/data_dictionary";
|
||||
import threshold from "./components/threshold.vue";
|
||||
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const { DEVICE_ID } = route.query;
|
||||
const dustCategoryData = ref([]);
|
||||
|
||||
const props = defineProps({
|
||||
routerAddPath: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: "/dust_management/sensor_device_management/sensor_management/add",
|
||||
},
|
||||
routerViewPath: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: "/dust_management/sensor_device_management/sensor_management/view",
|
||||
},
|
||||
});
|
||||
|
||||
const declarationGradeList = await layoutFnDustDeviceOrdinaryType();
|
||||
|
||||
const { list, pagination, searchForm, fnGetData, fnResetPagination, tableRef } =
|
||||
useListData(getDustDeviceSensorList, {
|
||||
beforeGetData: () => ({
|
||||
DEVICE_ID: DEVICE_ID,
|
||||
}),
|
||||
callbackFn: (list) => {
|
||||
list.forEach((item) => {
|
||||
declarationGradeList.value.forEach((row) => {
|
||||
if (item.SENSOR_TYPE === row.BIANMA) {
|
||||
item.SENSOR_TYPE_NAME = row.NAME;
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
const thresHoldDialog = ref({
|
||||
visible: false,
|
||||
form: {},
|
||||
});
|
||||
|
||||
const fnOpenThreshold = async (row) => {
|
||||
thresHoldDialog.value.form = row;
|
||||
thresHoldDialog.value.visible = true;
|
||||
};
|
||||
|
||||
const fnGetDustCategory = async () => {
|
||||
getDustDeviceSimpleList().then((res) => {
|
||||
dustCategoryData.value = res.varList;
|
||||
});
|
||||
};
|
||||
|
||||
fnGetDustCategory();
|
||||
|
||||
const fnDelete = debounce(
|
||||
1000,
|
||||
async (DEVICE_SENSOR_ID) => {
|
||||
await ElMessageBox.confirm("确定要删除吗?", { type: "warning" });
|
||||
await getDustDeviceSensorDelete({ DEVICE_SENSOR_ID });
|
||||
ElMessage.success("删除成功");
|
||||
fnResetPagination();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
@ -0,0 +1,148 @@
|
|||
<template>
|
||||
<layout-card>
|
||||
<el-divider content-position="left">传感器详情</el-divider>
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="传感器名称">
|
||||
{{ info.SENSOR_NAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="传感器编码">
|
||||
{{ info.SENSOR_CODE }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="传感器类型">
|
||||
{{ info.SENSOR_TYPE_NAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="传感器报警参数">
|
||||
{{ info.SENSOR_CATEGORY_NAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="所属设备">
|
||||
{{ info.DEVICE_NAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="安装位置">
|
||||
{{ info.INDICATOR_POSITION }}
|
||||
</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="位号">
|
||||
{{ info.TAG_NUMBER }}
|
||||
</el-descriptions-item> -->
|
||||
<el-descriptions-item label="单位">
|
||||
{{ info.UNIT_VALUE }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="信号类型">
|
||||
{{
|
||||
info.SIGNAL_TYPE === 1
|
||||
? "模拟量"
|
||||
: info.SIGNAL_TYPE === 2
|
||||
? "开关量"
|
||||
: ""
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="开关量报警值">
|
||||
{{
|
||||
info.SWITCH_ALARM_VALUE === 0
|
||||
? "关"
|
||||
: info.SWITCH_ALARM_VALUE === 1
|
||||
? "开"
|
||||
: ""
|
||||
}}
|
||||
</el-descriptions-item> -->
|
||||
<el-descriptions-item label="指标停用状态">
|
||||
{{
|
||||
info.DISABLED_STATUS === 0
|
||||
? "正常使用"
|
||||
: info.DISABLED_STATUS === 1
|
||||
? "停用"
|
||||
: ""
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="传感器描述">
|
||||
{{ info.DESCRIPTION }}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="创建人">
|
||||
{{ info.CREATOR_NAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="创建日期">
|
||||
{{ info.CREATTIME }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</layout-card>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useRoute } from "vue-router";
|
||||
import { ref } from "vue";
|
||||
import {
|
||||
getDustDeviceSensorDetail,
|
||||
getDustCategoryList,
|
||||
} from "@/request/dust_clean_management";
|
||||
|
||||
import {
|
||||
layoutFnDustDeviceOrdinaryType,
|
||||
layoutFnDryAlarmType,
|
||||
layoutFnWetAlarmType,
|
||||
layoutFnSpecificAlarmType,
|
||||
} from "@/assets/js/data_dictionary";
|
||||
const route = useRoute();
|
||||
const { DEVICE_SENSOR_ID } = route.query;
|
||||
const declarationGradeList = await layoutFnDustDeviceOrdinaryType();
|
||||
const info = ref({});
|
||||
|
||||
const dustCategoryData = ref([]);
|
||||
|
||||
const fnGetDustCategory = async () => {
|
||||
getDustCategoryList().then((res) => {
|
||||
dustCategoryData.value = res.varList;
|
||||
});
|
||||
};
|
||||
const fnGetData = async () => {
|
||||
const resData = await getDustDeviceSensorDetail({ DEVICE_SENSOR_ID });
|
||||
info.value = resData.data;
|
||||
declarationGradeList.value.forEach((item) => {
|
||||
if (item.BIANMA === info.value.SENSOR_TYPE) {
|
||||
info.value.SENSOR_TYPE_NAME = item.NAME;
|
||||
}
|
||||
});
|
||||
dustCategoryData.value.forEach((item) => {
|
||||
if (item.FULL_CODE === info.value.DUST_CATEGORY) {
|
||||
info.value.DUST_CATEGORY_NAME = item.FULL_NAME;
|
||||
}
|
||||
});
|
||||
|
||||
if (info.value.SENSOR_TYPE === "GSCCXT1") {
|
||||
layoutFnDryAlarmType().then((res) => {
|
||||
console.log(res);
|
||||
res.value.forEach((item) => {
|
||||
if (item.BIANMA === info.value.SENSOR_CATEGORY) {
|
||||
info.value.SENSOR_CATEGORY_NAME = item.NAME;
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
if (info.value.SENSOR_TYPE === "SSCCXT2") {
|
||||
layoutFnWetAlarmType().then((res) => {
|
||||
res.value.forEach((item) => {
|
||||
if (item.BIANMA === info.value.SENSOR_CATEGORY) {
|
||||
info.value.SENSOR_CATEGORY_NAME = item.NAME;
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
if (info.value.SENSOR_TYPE === "TDCCXT3") {
|
||||
layoutFnSpecificAlarmType().then((res) => {
|
||||
res.value.forEach((item) => {
|
||||
if (item.BIANMA === info.value.SENSOR_CATEGORY) {
|
||||
info.value.SENSOR_CATEGORY_NAME = item.NAME;
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
fnGetDustCategory();
|
||||
fnGetData();
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
#map_container {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<template>
|
||||
<div>
|
||||
<device-add :cevice-type="'TDCCXT3'" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import deviceAdd from "../dry_device/add.vue";
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<template>
|
||||
<div>
|
||||
<device-alarmList />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import deviceAlarmList from "../dry_device/alarmList.vue";
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
<template>
|
||||
<div>
|
||||
<device-index
|
||||
cevice-type="TDCCXT3"
|
||||
router-add-path="/dust_management/sensor_device_management/specific_device/add"
|
||||
router-view-path="/dust_management/sensor_device_management/specific_device/view"
|
||||
router-alarm-path="/dust_management/sensor_device_management/specific_device/alarmList"
|
||||
router-sensor-path="/dust_management/sensor_device_management/specific_device/sensor_index"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import deviceIndex from "../dry_device/index.vue";
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<template>
|
||||
<div>
|
||||
<sensor-add />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import sensorAdd from "../sensor_management/add.vue";
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
<template>
|
||||
<div>
|
||||
<sensor-index
|
||||
router-add-path="/dust_management/sensor_device_management/specific_device/sensor_add"
|
||||
router-view-path="/dust_management/sensor_device_management/specific_device/sensor_view"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import sensorIndex from "../sensor_management/index.vue";
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<template>
|
||||
<div>
|
||||
<sensor-view />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import sensorView from "../sensor_management/view.vue";
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<template>
|
||||
<div>
|
||||
<device-view :cevice-type="'TDCCXT3'" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import deviceView from "../dry_device/view.vue";
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<template>
|
||||
<div>
|
||||
<device-add :cevice-type="'SSCCXT2'" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import deviceAdd from "../dry_device/add.vue";
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<template>
|
||||
<div>
|
||||
<device-alarmList />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import deviceAlarmList from "../dry_device/alarmList.vue";
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
<template>
|
||||
<div>
|
||||
<device-index
|
||||
cevice-type="SSCCXT2"
|
||||
router-add-path="/dust_management/sensor_device_management/wet_device/add"
|
||||
router-view-path="/dust_management/sensor_device_management/wet_device/view"
|
||||
router-alarm-path="/dust_management/sensor_device_management/wet_device/alarmList"
|
||||
router-sensor-path="/dust_management/sensor_device_management/wet_device/sensor_index"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import deviceIndex from "../dry_device/index.vue";
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<template>
|
||||
<div>
|
||||
<sensor-add />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import sensorAdd from "../sensor_management/add.vue";
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
<template>
|
||||
<div>
|
||||
<sensor-index
|
||||
router-add-path="/dust_management/sensor_device_management/wet_device/sensor_add"
|
||||
router-view-path="/dust_management/sensor_device_management/wet_device/sensor_view"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import sensorIndex from "../sensor_management/index.vue";
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<template>
|
||||
<div>
|
||||
<sensor-view />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import sensorView from "../sensor_management/view.vue";
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<template>
|
||||
<div>
|
||||
<device-view :cevice-type="'SSCCXT2'" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import deviceView from "../dry_device/view.vue";
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
Loading…
Reference in New Issue