Commit 5ffa932b authored by liuzhaoh's avatar liuzhaoh

样式统一修改

parent ebcf087e
...@@ -363,7 +363,7 @@ onBeforeUnmount(() => {}); ...@@ -363,7 +363,7 @@ onBeforeUnmount(() => {});
width: 100%; width: 100%;
} }
.content-box { .content-box {
margin-top: 24px; // margin-top: 24px;
.search { .search {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
...@@ -372,7 +372,7 @@ onBeforeUnmount(() => {}); ...@@ -372,7 +372,7 @@ onBeforeUnmount(() => {});
} }
.table-box { .table-box {
width: 100%; width: 100%;
height: calc(100vh - 400px); height: calc(100vh - 280px);
} }
} }
......
...@@ -328,7 +328,6 @@ onBeforeUnmount(() => {}); ...@@ -328,7 +328,6 @@ onBeforeUnmount(() => {});
width: 100%; width: 100%;
} }
.content-box { .content-box {
margin-top: 24px;
.search { .search {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
...@@ -337,7 +336,7 @@ onBeforeUnmount(() => {}); ...@@ -337,7 +336,7 @@ onBeforeUnmount(() => {});
} }
.table-box { .table-box {
width: 100%; width: 100%;
height: calc(100vh - 400px); height: calc(100vh - 230px);
} }
} }
......
...@@ -782,7 +782,7 @@ $borderColor: #bbbdc391; ...@@ -782,7 +782,7 @@ $borderColor: #bbbdc391;
} }
.warn-info { .warn-info {
margin-top: 20px; margin-top: 20px;
height: 15vh; height: 17vh;
border-radius: 6px; border-radius: 6px;
box-shadow: 0px 3px 6px 0px rgba(13, 15, 18, 0.1); box-shadow: 0px 3px 6px 0px rgba(13, 15, 18, 0.1);
padding: 10px 30px; padding: 10px 30px;
......
...@@ -108,9 +108,7 @@ ...@@ -108,9 +108,7 @@
</template> </template>
<template #operation="{ row }"> <template #operation="{ row }">
<el-button text @click="getParamsConfig(row)"> <el-button text @click="getParamsConfig(row)"> 参数设置 </el-button>
参数设置
</el-button>
</template> </template>
</common-table> </common-table>
</div> </div>
...@@ -321,32 +319,34 @@ const onExportFile = () => { ...@@ -321,32 +319,34 @@ const onExportFile = () => {
// 模板下载 // 模板下载
const onDownloadTemplate = () => { const onDownloadTemplate = () => {
// window.open('http://visimg.bmetech.com/stone/img/1748314002767/设备数据.xlsx') // window.open('http://visimg.bmetech.com/stone/img/1748314002767/设备数据.xlsx')
axios.get('http://visimg.bmetech.com/stone/img/1748314002767/设备数据.xlsx', { axios
responseType: 'blob' .get("http://visimg.bmetech.com/stone/img/1748314002767/设备数据.xlsx", {
}).then(res => { responseType: "blob",
console.log(res) })
const blob = res.data; .then((res) => {
// 创建 URL 对象 console.log(res);
const url = URL.createObjectURL(blob); const blob = res.data;
// 创建 URL 对象
const url = URL.createObjectURL(blob);
// 创建临时 <a> 元素 // 创建临时 <a> 元素
const a = document.createElement("a"); const a = document.createElement("a");
a.href = url; a.href = url;
// 设置下载的文件名 // 设置下载的文件名
if (res.data.type === 'application/vnd.ms-excel') { if (res.data.type === "application/vnd.ms-excel") {
a.download = `设备数据.xls`; // 设置下载的文件名 a.download = `设备数据.xls`; // 设置下载的文件名
} else { } else {
a.download = `设备数据.xlsx`; a.download = `设备数据.xlsx`;
} }
// 模拟点击下载 // 模拟点击下载
document.body.appendChild(a); document.body.appendChild(a);
a.click(); a.click();
// 清理资源 // 清理资源
document.body.removeChild(a); document.body.removeChild(a);
URL.revokeObjectURL(url); URL.revokeObjectURL(url);
}) });
}; };
// 页面参数改变 // 页面参数改变
const handlePaginationChange = (pagination) => { const handlePaginationChange = (pagination) => {
...@@ -392,55 +392,55 @@ const beforeUpload = (file) => { ...@@ -392,55 +392,55 @@ const beforeUpload = (file) => {
return true; return true;
} }
}; };
const infoObj = ref({ const infoObj = ref({});
})
// 获取参数 // 获取参数
const getParamsConfig = (val) => { const getParamsConfig = (val) => {
const url = "/getSensorConfig"; const url = "/getSensorConfig";
const params = { const params = {
deviceNo: val.deviceNo, deviceNo: val.deviceNo,
}; };
getDataFun(url, params).then((res) => { getDataFun(url, params)
// res.data = { .then((res) => {
// id: 7, // res.data = {
// customerId: 26, // id: 7,
// deviceNo: "cgq_001", // customerId: 26,
// deviceName: "布袋传感器001", // deviceNo: "cgq_001",
// compartNum: 12, // deviceName: "布袋传感器001",
// address: "地址", // compartNum: 12,
// pulseValveFaultThreshold: "脉冲阀故障阈值", // address: "地址",
// slope: "斜率", // pulseValveFaultThreshold: "脉冲阀故障阈值",
// pulseValveNum: "脉冲阀数量", // slope: "斜率",
// intercept: "截距", // pulseValveNum: "脉冲阀数量",
// backblowInterval: "反吹间隔时间", // intercept: "截距",
// baselineThreshold: "基线阈值", // backblowInterval: "反吹间隔时间",
// delayTime: "延时时间", // baselineThreshold: "基线阈值",
// clusterValue: "群聚值", // delayTime: "延时时间",
// integrationTime: "积分时间", // clusterValue: "群聚值",
// communicationPort: "通信口", // integrationTime: "积分时间",
// leakThreshold: "泄露阈值", // communicationPort: "通信口",
// onlineBackblow: true, // leakThreshold: "泄露阈值",
// fastBlow: true, // onlineBackblow: true,
// faultThreshold: "故障阈值", // fastBlow: true,
// d01Alarm: true, // faultThreshold: "故障阈值",
// d13Alarm: true, // d01Alarm: true,
// valleyDection: "谷值判定", // d13Alarm: true,
// valveNum: "阀数量", // valleyDection: "谷值判定",
// liftValveFailure: "提升阀故障", // valveNum: "阀数量",
// compartSort: "仓室顺序", // liftValveFailure: "提升阀故障",
// liftValveDelayTime: "提升阀延迟时间", // compartSort: "仓室顺序",
// diInput: true, // liftValveDelayTime: "提升阀延迟时间",
// showEarlyWarn: true, // diInput: true,
// relateDevicesNum: "关联设备", // showEarlyWarn: true,
// liftValveCommunicationIp: "脉冲的设备通信ip", // relateDevicesNum: "关联设备",
// indoorPulseBlow: true, // liftValveCommunicationIp: "脉冲的设备通信ip",
// }; // indoorPulseBlow: true,
dialogVisible.value = true; // };
infoObj.value = res.data || {} dialogVisible.value = true;
}).catch(err => { infoObj.value = res.data || {};
ElMessage.error('获取参数设置失败'); })
}); .catch((err) => {
ElMessage.error("获取参数设置失败");
});
}; };
onMounted(() => { onMounted(() => {
getDeviceType(); getDeviceType();
...@@ -451,12 +451,12 @@ onMounted(() => { ...@@ -451,12 +451,12 @@ onMounted(() => {
<style lang="scss" scoped> <style lang="scss" scoped>
.equipment-management { .equipment-management {
height: calc(100% - 14px);
box-sizing: border-box;
background: #fff; background: #fff;
height: 100vh;
overflow: hidden; overflow: hidden;
padding: 20px; padding: 20px;
.content-box { .content-box {
margin-top: 24px;
.search { .search {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
...@@ -465,7 +465,7 @@ onMounted(() => { ...@@ -465,7 +465,7 @@ onMounted(() => {
} }
.table-box { .table-box {
width: 100%; width: 100%;
height: calc(100vh - 400px); height: calc(100vh - 235px);
} }
} }
} }
......
...@@ -286,7 +286,6 @@ onBeforeUnmount(() => {}); ...@@ -286,7 +286,6 @@ onBeforeUnmount(() => {});
width: 100%; width: 100%;
} }
.content-box { .content-box {
margin-top: 24px;
.search { .search {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
...@@ -295,7 +294,7 @@ onBeforeUnmount(() => {}); ...@@ -295,7 +294,7 @@ onBeforeUnmount(() => {});
} }
.table-box { .table-box {
width: 100%; 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