Commit 5ffa932b authored by liuzhaoh's avatar liuzhaoh

样式统一修改

parent ebcf087e
......@@ -363,7 +363,7 @@ onBeforeUnmount(() => {});
width: 100%;
}
.content-box {
margin-top: 24px;
// margin-top: 24px;
.search {
display: flex;
justify-content: space-between;
......@@ -372,7 +372,7 @@ onBeforeUnmount(() => {});
}
.table-box {
width: 100%;
height: calc(100vh - 400px);
height: calc(100vh - 280px);
}
}
......
......@@ -328,7 +328,6 @@ onBeforeUnmount(() => {});
width: 100%;
}
.content-box {
margin-top: 24px;
.search {
display: flex;
justify-content: space-between;
......@@ -337,7 +336,7 @@ onBeforeUnmount(() => {});
}
.table-box {
width: 100%;
height: calc(100vh - 400px);
height: calc(100vh - 230px);
}
}
......
......@@ -782,7 +782,7 @@ $borderColor: #bbbdc391;
}
.warn-info {
margin-top: 20px;
height: 15vh;
height: 17vh;
border-radius: 6px;
box-shadow: 0px 3px 6px 0px rgba(13, 15, 18, 0.1);
padding: 10px 30px;
......
......@@ -108,9 +108,7 @@
</template>
<template #operation="{ row }">
<el-button text @click="getParamsConfig(row)">
参数设置
</el-button>
<el-button text @click="getParamsConfig(row)"> 参数设置 </el-button>
</template>
</common-table>
</div>
......@@ -321,32 +319,34 @@ const onExportFile = () => {
// 模板下载
const onDownloadTemplate = () => {
// window.open('http://visimg.bmetech.com/stone/img/1748314002767/设备数据.xlsx')
axios.get('http://visimg.bmetech.com/stone/img/1748314002767/设备数据.xlsx', {
responseType: 'blob'
}).then(res => {
console.log(res)
const blob = res.data;
// 创建 URL 对象
const url = URL.createObjectURL(blob);
axios
.get("http://visimg.bmetech.com/stone/img/1748314002767/设备数据.xlsx", {
responseType: "blob",
})
.then((res) => {
console.log(res);
const blob = res.data;
// 创建 URL 对象
const url = URL.createObjectURL(blob);
// 创建临时 <a> 元素
const a = document.createElement("a");
a.href = url;
// 设置下载的文件名
if (res.data.type === 'application/vnd.ms-excel') {
a.download = `设备数据.xls`; // 设置下载的文件名
} else {
a.download = `设备数据.xlsx`;
}
// 创建临时 <a> 元素
const a = document.createElement("a");
a.href = url;
// 设置下载的文件名
if (res.data.type === "application/vnd.ms-excel") {
a.download = `设备数据.xls`; // 设置下载的文件名
} else {
a.download = `设备数据.xlsx`;
}
// 模拟点击下载
document.body.appendChild(a);
a.click();
// 模拟点击下载
document.body.appendChild(a);
a.click();
// 清理资源
document.body.removeChild(a);
URL.revokeObjectURL(url);
})
// 清理资源
document.body.removeChild(a);
URL.revokeObjectURL(url);
});
};
// 页面参数改变
const handlePaginationChange = (pagination) => {
......@@ -392,55 +392,55 @@ const beforeUpload = (file) => {
return true;
}
};
const infoObj = ref({
})
const infoObj = ref({});
// 获取参数
const getParamsConfig = (val) => {
const url = "/getSensorConfig";
const params = {
deviceNo: val.deviceNo,
};
getDataFun(url, params).then((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,
// };
dialogVisible.value = true;
infoObj.value = res.data || {}
}).catch(err => {
ElMessage.error('获取参数设置失败');
});
getDataFun(url, params)
.then((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,
// };
dialogVisible.value = true;
infoObj.value = res.data || {};
})
.catch((err) => {
ElMessage.error("获取参数设置失败");
});
};
onMounted(() => {
getDeviceType();
......@@ -451,12 +451,12 @@ onMounted(() => {
<style lang="scss" scoped>
.equipment-management {
height: calc(100% - 14px);
box-sizing: border-box;
background: #fff;
height: 100vh;
overflow: hidden;
padding: 20px;
.content-box {
margin-top: 24px;
.search {
display: flex;
justify-content: space-between;
......@@ -465,7 +465,7 @@ onMounted(() => {
}
.table-box {
width: 100%;
height: calc(100vh - 400px);
height: calc(100vh - 235px);
}
}
}
......
......@@ -286,7 +286,6 @@ onBeforeUnmount(() => {});
width: 100%;
}
.content-box {
margin-top: 24px;
.search {
display: flex;
justify-content: space-between;
......@@ -295,7 +294,7 @@ onBeforeUnmount(() => {});
}
.table-box {
width: 100%;
height: calc(100vh - 400px);
height: calc(100vh - 230px);
}
}
......
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