Commit f61d456b authored by Cai Wei's avatar Cai Wei

fix(*): 合并代码

parents 99a4806d 09009d68
......@@ -8,6 +8,5 @@ VITE_ENV = production
# 开发环境下,后端接口的基础URL
# base api
VITE_APP_BASE_API5 = '/vispc'
VITE_APP_BASE_API5 = '/pc'
VITE_APP_BASE_MONITOR = '/monitor'
VITE_APP_BASE_API5_PRI = https://vis.bmetech.com
\ No newline at end of file
......@@ -5,8 +5,8 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script src="https://cdn.tailwindcss.com"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css" rel="stylesheet">
<script src="/tailwindcss/index.js"></script>
<link rel="stylesheet" href="/tailwindcss/index.css">
<title>DCTOM</title>
<style type="text/tailwindcss">
@layer utilities {
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -93,7 +93,7 @@ const props = defineProps({
align: {
type: String,
default: "left",
}
},
});
const emit = defineEmits([
......@@ -148,7 +148,7 @@ const total = computed(() => props.total);
// 当前页数据
const currentPageData = computed(() => {
if (!props.showPagination) return props.data;
if (props.showPagination) return props.data;
const start = (currentPage.value - 1) * pageSize.value;
const end = start + pageSize.value;
return props.data.slice(start, end);
......@@ -178,11 +178,17 @@ const emitPaginationChange = () => {
emit("update:page-size", pageSize.value);
};
const setCurrentPage = () => {
currentPage.value = 1;
};
defineExpose({ setCurrentPage })
// 监听数据变化,重置分页
watch(
() => props.data,
() => {
currentPage.value = 1;
// currentPage.value = 1;
},
{ deep: true }
);
......
......@@ -19,7 +19,7 @@
>
<template #title>
<!-- <el-icon><location /></el-icon> -->
<img class="menu-icon" :src="`/src/assets/menu/${item.meta.icon}.png`" alt="">
<img class="menu-icon" :src="getIcon(item.meta.icon)" alt="">
<span>{{getMenuTitle(item)}}</span>
</template>
<el-menu-item
......@@ -37,7 +37,7 @@
class="submenu-box"
>
<!-- <el-icon><setting /></el-icon> -->
<img class="menu-icon" :src="`/src/assets/menu/${item.meta.icon}.png`" alt="">
<img class="menu-icon" :src="getIcon(item.meta.icon)" alt="">
<span>{{getMenuTitle(item)}}</span>
</el-menu-item>
</template>
......@@ -48,16 +48,18 @@
<script setup>
import { computed, ref, onMounted } from 'vue';
import {
Document,
Menu as IconMenu,
Location,
Setting,
} from "@element-plus/icons-vue";
import {routes} from "../router/index.js";
import { useRoute, useRouter } from 'vue-router';
import { menuStore } from '@/pinia/menu.js';
import { storeToRefs } from 'pinia';
import closeIcon from '@/assets/menu/closeIcon.png';
import collectorList from '@/assets/menu/collectorList.png';
import dashboard from '@/assets/menu/dashboard.png';
import deviceManage from '@/assets/menu/deviceManage.png';
import dustOverview from '@/assets/menu/dustOverview.png';
import monitor from '@/assets/menu/monitor.png';
import warnning from '@/assets/menu/warnning.png';
const route = useRoute();
const router = useRouter();
......@@ -66,6 +68,24 @@ const { sidebar } = storeToRefs(menuStore());
const routerList = routes[0].children;
const menuListData = ref(JSON.parse(sessionStorage.getItem("menuList")) || []);
const getIcon = (iconName) => {
switch (iconName) {
case 'closeIcon':
return closeIcon;
case 'collectorList':
return collectorList;
case 'dashboard':
return dashboard;
case 'deviceManage':
return deviceManage;
case 'dustOverview':
return dustOverview;
case 'monitor':
return monitor;
case 'warnning':
return warnning;
}
}
// 递归过滤路由
const filterRoutes = (routes) => {
if (!routes) return [];
......
......@@ -11,6 +11,7 @@ import { createPinia } from "pinia";
import moment from 'moment';
import { startPermissionCheck } from '@/utils/permissionChecker';
const app = createApp(App);
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
app.component(key, component);
......
......@@ -258,4 +258,78 @@ export const getLineOption2 = (xData = [], seriesData = [], legendDesc = "健康
smooth: true,
},
],
});
\ No newline at end of file
});
export const getGaugeOption = (option) => {
return {
series: [
{
type: "gauge",
startAngle: 220,
endAngle: 320,
center: ["50%", "50%"],
radius: "90%",
min: option.min || 0,
max: option.max || 100,
splitNumber: 8,
axisLine: {
lineStyle: {
width: 30,
color: [
[0.2, "#fd666d"],
[0.8, "#48cd4d"],
[1, "#fd666d"],
],
},
},
pointer: {
itemStyle: {
color: 'auto'
}
},
axisTick: {
distance: -30,
length: 10,
lineStyle: {
color: "#fff",
width: 2,
},
},
splitLine: {
distance: -30,
length: 38,
lineStyle: {
color: '#fff',
width: 2
},
},
axisLabel: {
color: 'inherit',
fontSize: 10,
distance: 30,
rotate: "tangential",
},
title: {
offsetCenter: [0, "70%"],
fontSize: 14,
fontWeight: "bolder",
},
detail: {
fontSize: 20,
offsetCenter: [0, 0],
valueAnimation: true,
formatter: function (value) {
return Math.round(value * 100) + "";
},
color: "inherit",
},
data: [
{
value: option.value || 0,
name: option.chartName || '',
},
],
},
],
};
}
\ No newline at end of file
......@@ -74,10 +74,11 @@
</div>
<div class="table-box">
<common-table
ref="pageRef"
:data="tableData.list"
:columns="tableColumns"
:total="total"
:default-page-size="pageSize"
:default-page-size="20"
@pagination-change="handlePaginationChange"
:pagination-texts="{
total: '共',
......@@ -167,7 +168,7 @@ const tableColumns = ref([
{
prop: "index",
label: "序号",
width: "5%",
width: "4%",
},
{
prop: "eventName",
......@@ -177,22 +178,22 @@ const tableColumns = ref([
{
prop: "name",
label: "发生位置",
width: "9%",
width: "15%",
},
{
prop: "deviceType",
label: "设备类型",
width: "9%",
width: "7%",
},
{
prop: "alarmIndicators",
label: "告警指标",
width: "9%",
width: "7%",
},
{
prop: "value",
label: "监测值",
width: "9%",
width: "5%",
},
{
prop: "eventTime",
......@@ -202,7 +203,7 @@ const tableColumns = ref([
{
prop: "isSuspendAlarm",
label: "是否挂起期间告警",
width: "9%",
width: "8%",
},
{
prop: "operate",
......@@ -212,20 +213,7 @@ const tableColumns = ref([
]);
const tableData = reactive({
list: [
{
deviceName: "1#除尘器",
compart: "1234567890",
position: "转炉",
changeDateRemind: "xx",
changeDate: "xx",
changePeo: "xx",
ownerdeviceName: "xx",
lastAlarmTime: "xx",
changeRound: "xx",
operate: "挂起",
},
],
list: [],
});
const typeList = reactive({
......@@ -251,9 +239,12 @@ const handlePaginationChange = (pagination) => {
};
const onSubmit = () => {
currentPage.value = 1;
pageRef.value.setCurrentPage(currentPage.value);
getAlarmList();
};
const pageRef = ref(null);
const onReset = () => {
formInline.value = {
eventName: "",
......@@ -265,6 +256,7 @@ const onReset = () => {
};
currentPage.value = 1;
pageSize.value = 20;
pageRef.value.setCurrentPage(currentPage.value);
getAlarmList();
};
......
......@@ -48,6 +48,7 @@
</div>
<div class="table-box">
<common-table
ref="pageRef"
:data="tableData.list"
:columns="tableColumns"
:default-page-size="20"
......@@ -184,17 +185,17 @@ const tableColumns = ref([
const tableData = reactive({
list: [
{
deviceName: "1#除尘器",
compart: "1234567890",
position: "转炉",
changeDateRemind: "xx",
changeDate: "xx",
changePeo: "xx",
ownerdeviceName: "xx",
lastAlarmTime: "xx",
changeRound: "xx",
},
// {
// deviceName: "1#除尘器",
// compart: "1234567890",
// position: "转炉",
// changeDateRemind: "xx",
// changeDate: "xx",
// changePeo: "xx",
// ownerdeviceName: "xx",
// lastAlarmTime: "xx",
// changeRound: "xx",
// },
],
});
......@@ -246,9 +247,12 @@ const handlePaginationChange = (pagination) => {
};
const onSubmit = () => {
currentPage.value = 1;
pageRef.value.setCurrentPage(currentPage.value);
getAllDustList();
};
const pageRef = ref(null);
const onReset = () => {
formInline.value = {
compart: "",
......@@ -257,6 +261,7 @@ const onReset = () => {
};
currentPage.value = 1;
pageSize.value = 20;
pageRef.value.setCurrentPage(currentPage.value);
getAllDustList();
};
......
......@@ -4,8 +4,8 @@
<!-- <span class="jump-icon">>></span> -->
</div>
<div class="content">
<div class="item" v-for="item in listInfo" :key="item.id">
<img src="@/assets/icons/notice.png" alt="">{{item.info}}
<div class="item" v-for="item in listInfo" :key="item">
<img src="@/assets/icons/notice.png" alt="">{{item}}
</div>
</div>
</template>
......@@ -15,6 +15,10 @@ const props = defineProps({
type: Array,
default: () => [],
},
title: {
type: String,
default: "告警",
}
});
</script>
<style scoped lang="scss">
......
......@@ -42,7 +42,7 @@
</div>
</div>
<div class="warn-info">
<warnCom :listInfo="testList"></warnCom>
<warnCom title="告警" :listInfo="warnInfoList"></warnCom>
</div>
</div>
<div class="right-box">
......@@ -52,7 +52,7 @@
</div>
</div>
<div class="part2">
<div class="dust-title">2号窑尾除尘器</div>
<div class="dust-title">{{ dusterName }}</div>
<div class="dust-info">
<div class="info-item" v-for="item in dustInfo" :key="item.label">
<span class="label">{{ item.label }}</span>
......@@ -70,10 +70,18 @@
<div class="position-info">
<div class="left" v-if="detailObj.compartHealthList.length > 0">
<div class="part">
<div class="point warn" v-for="item in detailObj.compartHealthList[0]" :key="item"></div>
<div
class="point warn"
v-for="item in detailObj.compartHealthList[0]"
:key="item"
></div>
</div>
<div class="part">
<div class="point warn" v-for="item in detailObj.compartHealthList[1]" :key="item"></div>
<div
class="point warn"
v-for="item in detailObj.compartHealthList[1]"
:key="item"
></div>
</div>
</div>
<!-- <div class="right">
......@@ -101,21 +109,21 @@
</div>
</div>
<div class="warn-info">
<warnCom :listInfo="testList"></warnCom>
<warnCom title="闭环" :listInfo="closedLoopInfoList"></warnCom>
</div>
</div>
</div>
</div>
</template>
<script setup>
import { ref, reactive, onMounted, watch } from "vue";
import { ref, reactive, onMounted, onUnmounted, watch, computed } from "vue";
import * as echarts from "echarts";
import { getDataFun } from "@/request/method.js";
import { useUsersStore } from "@/pinia/user.js";
import moment from "moment";
import warnCom from "./components/warn.vue";
import healthyCom from "./components/healthyProgress.vue";
import { getLineOption2 } from "@/utils/chart";
import { getLineOption2, getGaugeOption } from "@/utils/chart";
const userStore = useUsersStore();
const form = reactive({
dusterNo: "",
......@@ -140,7 +148,7 @@ const option = {
},
],
};
const chartInstance = reactive([null, null, null]);
const chartInstance = reactive({});
const chartData = reactive([{}, {}, {}]);
const initChart = (instance, option, domEl) => {
if (instance && instance.dispose) {
......@@ -148,6 +156,7 @@ const initChart = (instance, option, domEl) => {
}
instance = echarts.init(document.getElementById(domEl));
instance.setOption(option);
chartInstance[domEl] = instance;
};
const dustInfo = reactive([
{
......@@ -257,18 +266,12 @@ const indicatorFun = (target, domId, option) => {
target.value.setOption(option);
};
const dusterList = ref([]);
// 获取除尘器名称
// 获取除尘器名称枚举值
const getDusterNameEnum = () => {
const url = "/bag/cycle/getDusterList";
getDataFun(url, {})
.then((res) => {
// dusterList.value = (res && res.data) || [];
dusterList.value = [
{
dusterNo: "wp001",
dusterName: "雾炮001",
},
];
dusterList.value = (res && res.data) || [];
// 判断除尘器名称是否有值
form.dusterNo = dusterList.value[0].dusterNo;
})
......@@ -355,7 +358,7 @@ const detailObj = reactive({
bachflushCompart: "",
leakageCompart: "",
faultCompart: "",
compartHealthList: []
compartHealthList: [],
});
// 获取除尘器详情
const getDustDetail = () => {
......@@ -388,7 +391,91 @@ const getDustDetail = () => {
(res.data && res.data.bachflushCompart) || "";
detailObj.leakageCompart = (res.data && res.data.leakageCompart) || "";
detailObj.faultCompart = (res.data && res.data.bachflushCompart) || "";
detailObj.compartHealthList = (res.data && res.data.compartHealthList) || [];
detailObj.compartHealthList = (res.data &&
res.data.compartHealthList) || [
[
{
compartNo: "1",
healthStatus: 1,
sort: 1,
},
{
compartNo: "2",
healthStatus: 1,
sort: 2,
},
{
compartNo: null,
healthStatus: 1,
sort: 3,
},
{
compartNo: null,
healthStatus: 1,
sort: 4,
},
{
compartNo: null,
healthStatus: 1,
sort: 5,
},
{
compartNo: null,
healthStatus: 1,
sort: 6,
},
{
compartNo: null,
healthStatus: 1,
sort: 7,
},
{
compartNo: null,
healthStatus: 1,
sort: 8,
},
{
compartNo: null,
healthStatus: 1,
sort: 9,
},
{
compartNo: null,
healthStatus: 1,
sort: 10,
},
{
compartNo: null,
healthStatus: 1,
sort: 11,
},
{
compartNo: null,
healthStatus: 1,
sort: 12,
},
],
];
indicatorFun(
indicatorOneInstance,
"indicatorOne",
getGaugeOption({
value: dustInfo[0].value / 100,
chartName: "压差",
min: parseInt(res.data.pressureDiffLow),
max: parseInt(res.data.pressureDiffHigh),
})
);
indicatorFun(
indicatorTwoInstance,
"indicatorTwo",
getGaugeOption({
value: dustInfo[1].value,
chartName: "粉尘浓度",
min: 5,
max: 50,
})
);
})
.catch(() => {
dustInfo.forEach((item) => {
......@@ -396,28 +483,6 @@ const getDustDetail = () => {
});
});
};
const testList = reactive([
{
id: 1,
info: "测试1测试1测试1测试1测试1测试1测试1测试1测试1测试1测试1测试1",
},
{
id: 2,
info: "测试1测试1测试1测试1测试1测试1测试1测试1测试1测试1测试1测试1",
},
{
id: 3,
info: "测试1测试1测试1测试1测试1测试1测试1测试1测试1测试1测试1测试1",
},
// {
// id: 4,
// info: "测试1测试1测试1测试1测试1测试1测试1测试1测试1测试1测试1测试1",
// },
// {
// id: 5,
// info: "测试1测试1测试1测试1测试1测试1测试1测试1测试1测试1测试1测试1",
// },
]);
const closedLoopInfoList = ref([]);
const warnInfoList = ref([]);
// 获取告警信息
......@@ -443,11 +508,20 @@ const getAlarmInfo = () => {
warnInfoList.value = [];
});
};
const resizeFun = () => {
indicatorOneInstance && indicatorOneInstance.value.resize();
indicatorTwoInstance && indicatorTwoInstance.value.resize();
Object.keys(chartInstance).forEach((key) => {
chartInstance[key] && chartInstance[key].resize();
});
};
onMounted(() => {
getDusterNameEnum();
indicatorFun(indicatorOneInstance, "indicatorOne", option2);
indicatorFun(indicatorTwoInstance, "indicatorTwo", option2);
window.addEventListener("resize", resizeFun);
});
onUnmounted(() => {
window.removeEventListener("resize", resizeFun);
})
watch(
() => form.dusterNo,
() => {
......@@ -468,6 +542,10 @@ watch(
getAlarmInfo();
}
);
const dusterName = computed(() => {
return dusterList.value.find((item) => item.dusterNo == form.dusterNo)
?.dusterName;
});
</script>
<style lang="scss" scoped>
$borderColor: #bbbdc391;
......
const infoEnum = reactive([
{
label: "点位名称",
propKey: 'deviceName',
type: "input",
},
{
label: "仓室数量",
propKey: 'compartNum',
type: "input",
},
{
label: "地址",
propKey: 'address',
type: "input",
},
{
label: "脉冲阀故障阈值",
propKey: 'pulseValveFaultThreshold',
type: "input",
},
{
label: "斜率",
propKey: 'slope',
type: "input",
},
{
label: "脉冲数量",
propKey: 'pulseValveNum',
type: "input",
},
{
label: "截距",
propKey: 'intercept',
type: "input",
},
{
label: "反吹间隔时间",
propKey: 'backblowInterval',
type: "input",
},
{
label: "基线阈值",
propKey: 'baselineThreshold',
type: "input",
},
{
label: "延时时间",
propKey: 'delayTime',
type: "input",
},
{
label: "群聚值",
propKey: "clusterValue",
type: "input",
},
{
label: "积分时间",
propKey: 'integrationTime',
type: "input",
},
{
label: "通信口",
propKey: 'communicationPort',
type: "select",
options: []
},
{
label: "泄露阈值",
propKey: 'leakThreshold',
type: "input",
},
{
label: "故障阈值",
propKey: "faultThreshold",
type: "input",
},
{
label: "谷值判定(%)",
propKey: "valleyDection",
type: "input",
},
{
label: "阀数量",
propKey: "valveNum",
type: "input",
},
{
label: "提升阀故障",
propKey: "liftValveFailure",
type: "input",
},
{
label: "提升阀延迟时间",
propKey: "liftValveDelayTime",
type: "input",
},
]);
\ No newline at end of file
......@@ -12,9 +12,9 @@
<span class="label">{{ item.label }}</span>
<el-input
v-if="item.type === 'input'"
v-model="item.value"
v-model="infoObj[item.propKey]"
></el-input>
<el-select v-model="item.value" v-if="item.type === 'select'">
<el-select v-model="infoObj[item.propKey]" v-if="item.type === 'select'">
<el-option
v-for="option in item.options"
:key="option.code"
......@@ -35,7 +35,7 @@
<span class="label">{{ item.label }}</span>
<el-input
v-if="item.type === 'input'"
v-model="item.value"
v-model="infoObj[item.propKey]"
></el-input>
</div>
</div>
......@@ -127,14 +127,17 @@ const props = defineProps({
watch(
() => props.infoObjProps,
(newVal) => {
Object.assign(infoObj, newVal);
console.log(newVal);
// Object.assign(infoObj, newVal);
infoObj = newVal;
console.log(infoObj);
},
{ deep: true, inmediate: true }
);
const emit = defineEmits(["close"]);
const infoObj = reactive({
let infoObj = reactive({
deviceName: "", // 点位名称
compartNum: "", // 仓室数量
address: "", // 地址
......@@ -165,102 +168,102 @@ const infoObj = reactive({
indoorPulseBlow: "", // 室内卖出轮流喷吹
liftValveDelayTime: "", // 提升阀延迟时间
});
const communicationPortOptions = ref([])
const communicationPortOptions = ref([]);
const infoEnum = reactive([
{
label: "点位名称",
value: infoObj.deviceName,
propKey: "deviceName",
type: "input",
},
{
label: "仓室数量",
value: infoObj.compartNum,
propKey: "compartNum",
type: "input",
},
{
label: "地址",
value: infoObj.address,
propKey: "address",
type: "input",
},
{
label: "脉冲阀故障阈值",
value: infoObj.pulseValveFaultThreshold,
propKey: "pulseValveFaultThreshold",
type: "input",
},
{
label: "斜率",
value: infoObj.slope,
propKey: "slope",
type: "input",
},
{
label: "脉冲数量",
value: infoObj.pulseValveNum,
propKey: "pulseValveNum",
type: "input",
},
{
label: "截距",
value: infoObj.intercept,
propKey: "intercept",
type: "input",
},
{
label: "反吹间隔时间",
value: infoObj.backblowInterval,
propKey: "backblowInterval",
type: "input",
},
{
label: "基线阈值",
value: infoObj.baselineThreshold,
propKey: "baselineThreshold",
type: "input",
},
{
label: "延时时间",
value: infoObj.delayTime,
propKey: "delayTime",
type: "input",
},
{
label: "群聚值",
value: infoObj.clusterValue,
propKey: "clusterValue",
type: "input",
},
{
label: "积分时间",
value: infoObj.integrationTime,
propKey: "integrationTime",
type: "input",
},
{
label: "通信口",
value: infoObj.communicationPort,
propKey: "communicationPort",
type: "select",
options: []
options: [],
},
{
label: "泄露阈值",
value: infoObj.leakThreshold,
propKey: "leakThreshold",
type: "input",
},
{
label: "故障阈值",
value: infoObj.faultThreshold,
propKey: "faultThreshold",
type: "input",
},
{
label: "谷值判定(%)",
value: infoObj.valleyDection,
propKey: "valleyDection",
type: "input",
},
{
label: "阀数量",
value: infoObj.valveNum,
propKey: "valveNum",
type: "input",
},
{
label: "提升阀故障",
value: infoObj.liftValveFailure,
propKey: "liftValveFailure",
type: "input",
},
{
label: "提升阀延迟时间",
value: infoObj.liftValveDelayTime,
propKey: "liftValveDelayTime",
type: "input",
},
]);
......@@ -291,17 +294,19 @@ const cancelFun = () => {
// 获取通信口
const getCommunicationPort = () => {
const url = "/queryCommunicationPort";
getDataFun(url, {}).then((res) => {
communicationPortOptions.value = res && res.data || []
for(let i = 0; i < infoEnum.length; i++) {
if (infoEnum[i].label === '通信口') {
infoEnum[i].options = communicationPortOptions.value
break
getDataFun(url, {})
.then((res) => {
communicationPortOptions.value = (res && res.data) || [];
for (let i = 0; i < infoEnum.length; i++) {
if (infoEnum[i].label === "通信口") {
infoEnum[i].options = communicationPortOptions.value;
break;
}
}
}
}).catch(err => {
communicationPortOptions.value = []
});
})
.catch((err) => {
communicationPortOptions.value = [];
});
};
onMounted(() => {
getCommunicationPort();
......
......@@ -120,6 +120,7 @@
<setParamsDialog
v-model:dialogVisible="dialogVisible"
@close="closeDialog"
:infoObjProps="infoObj"
></setParamsDialog>
</div>
</template>
......@@ -368,6 +369,9 @@ const beforeUpload = (file) => {
return true;
}
};
const infoObj = ref({
})
// 获取参数
const getParamsConfig = (val) => {
const url = "/getSensorConfig";
......@@ -375,42 +379,42 @@ const getParamsConfig = (val) => {
deviceNo: val.deviceNo,
};
getDataFun(url, params).then((res) => {
console.log(res);
res.data = {
id: 7,
customerId: 26,
deviceNo: "cgq_001",
deviceName: "布袋传感器001",
compartNum: 12,
address: "地址",
pulseValveFaultThreshold: "脉冲阀故障阈值",
slope: "斜率",
pulseValveNum: "脉冲阀数量",
intercept: "截距",
backblowInterval: "反吹间隔时间",
baselineThreshold: "基线阈值",
delayTime: "延时时间",
clusterValue: "群聚值",
integrationTime: "积分时间",
communicationPort: "通信口",
leakThreshold: "泄露阈值",
onlineBackblow: true,
fastBlow: true,
faultThreshold: "故障阈值",
d01Alarm: true,
d13Alarm: true,
valleyDection: "谷值判定",
valveNum: "阀数量",
liftValveFailure: "提升阀故障",
compartSort: "仓室顺序",
liftValveDelayTime: "提升阀延迟时间",
diInput: true,
showEarlyWarn: true,
relateDevicesNum: "关联设备",
liftValveCommunicationIp: "脉冲的设备通信ip",
indoorPulseBlow: true,
};
// res.data = {
// id: 7,
// customerId: 26,
// deviceNo: "cgq_001",
// deviceName: "布袋传感器001",
// compartNum: 12,
// address: "地址",
// pulseValveFaultThreshold: "脉冲阀故障阈值",
// slope: "斜率",
// pulseValveNum: "脉冲阀数量",
// intercept: "截距",
// backblowInterval: "反吹间隔时间",
// baselineThreshold: "基线阈值",
// delayTime: "延时时间",
// clusterValue: "群聚值",
// integrationTime: "积分时间",
// communicationPort: "通信口",
// leakThreshold: "泄露阈值",
// onlineBackblow: true,
// fastBlow: true,
// faultThreshold: "故障阈值",
// d01Alarm: true,
// d13Alarm: true,
// valleyDection: "谷值判定",
// valveNum: "阀数量",
// liftValveFailure: "提升阀故障",
// compartSort: "仓室顺序",
// liftValveDelayTime: "提升阀延迟时间",
// diInput: true,
// showEarlyWarn: true,
// relateDevicesNum: "关联设备",
// liftValveCommunicationIp: "脉冲的设备通信ip",
// indoorPulseBlow: true,
// };
dialogVisible.value = true;
infoObj.value = res.data || {}
}).catch(err => {
ElMessage.error('获取参数设置失败');
});
......
......@@ -46,6 +46,7 @@
</div>
<div class="table-box">
<common-table
ref="pageRef"
:data="tableData.list"
:columns="tableColumns"
:default-page-size="20"
......@@ -229,9 +230,12 @@ const handlePaginationChange = (pagination) => {
};
const onSubmit = () => {
currentPage.value = 1;
pageRef.value.setCurrentPage(1);
getManagementList();
};
const pageRef = ref(null);
const onReset = () => {
formInline.value = {
deviceType: "",
......@@ -240,6 +244,7 @@ const onReset = () => {
};
currentPage.value = 1;
pageSize.value = 20;
pageRef.value.setCurrentPage(currentPage.value);
getManagementList();
};
......
import { defineConfig, loadEnv } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from "path" // 需安装此模块
import { fileURLToPath, URL } from 'node:url'
// https://vite.dev/config/
export default defineConfig(({mode}) => {
const ENV = loadEnv(mode, process.cwd())
return {
base: './', // 基础路径配置
plugins: [vue()],
resolve: {
alias: {
// 这里就是需要配置resolve里的别名
"@": path.resolve(__dirname, "./src") // path记得引入
"@": fileURLToPath(new URL('./src', import.meta.url))
}
},
build: {
outDir: 'dist', // 指定输出目录
assetsDir: 'assets', // 指定静态资源存放目录
sourcemap: false, // 不生成 sourcemap 文件
chunkSizeWarningLimit: 1500, // 文件大小警告的限制(kbs)
rollupOptions: {
output: {
chunkFileNames: 'assets/js/[name]-[hash].js',
entryFileNames: 'assets/js/[name]-[hash].js',
assetFileNames: 'assets/[ext]/[name]-[hash].[ext]',
manualChunks(id) {
if (id.includes('node_modules')) {
return 'vendor'
}
}
}
}
},
server: {
......@@ -17,11 +38,10 @@ export default defineConfig(({mode}) => {
port: 3000, // 指定服务器端口
proxy: {
[ENV.VITE_APP_BASE_API5]: {
target: 'https://screen.bmetech.com',
// target: 'https://vis.bmetech.com',
target: 'https://screen.bmetech.com', // 更新为完整的基础路径
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '') // 添加路径重写规则
},
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment