el-table 动态合并不定项多级表头

我们的需求是根据不同的厂配不同的多级表头,每个表头有需要合并的项,并且不确定

如图所示
在这里插入图片描述
在这里插入图片描述
对表格进行循环操作,此处不赘述,最下方有全部代码
在这里插入图片描述
表头是单独写在js方便后期更改,然后引入js文件,然后根据情况去调取

    // 获取表头getHeader(nv) {this.factoryCodes = nv;this.headerRow2 = [];// "xx污水处理厂"if (nv == "zgjn-H WS 0101") {//修改表头this.tableHeader = deviceRunReportHead[1];this.headerRow2 = ["紫外线杀菌装置"]; // 需要合并的表头名称数组} else if (nv == "zgjn-H WS 0106") {// xx污水处理厂this.tableHeader = deviceRunReportHead[2];this.headerRow2 = ["紫外线杀菌装置", "除臭系统"]; // 需要合并的表头名称数组} else if (nv == "zgjn-H WS 0105") {//xx污水处理厂this.tableHeader = deviceRunReportHead[3];this.headerRow2 = ["紫外线杀菌装置", "除臭系统"]; // 需要合并的表头名称数组} else {// 其他厂this.tableHeader = deviceRunReportHead[3];}// 刷新表格样式this.$nextTick(() => {this.$refs.slantTable.doLayout();this.getTableDom();});this.keyIndex++;   // 此处是重点,更新完表头之后必须强制刷新表格,否则上一次合并的信息会影响此次合并,keyIndex在el-table的key上,},

以下是合并方法

    //表头样式设置,将“紫外线杀菌装置”字段设置为行高2(默认是行高1),并将其所占行偏移的部分设置为noneheaderStyle({ row, column, rowIndex, columnIndex }) {if (this.headerRow2.includes(column.label)) {this.$nextTick(() => {if (document.getElementsByClassName(column.id).length !== 0) {document.getElementsByClassName(column.id)[0].setAttribute("rowSpan", 2);  // 默认合并两行,因为我这都是最多只需要合并两行return false;}});return column;}if (column.label == undefined) { // 最后一层是没有name的即没有label,则取消合并return { display: "none" };}},

下方是全部vue代码

<!-- 设备运行记录表 -->
<template><div class="deviceRunReport-template"><pageIndexTemp @refresh="refreshTableDom"><!-- 查询框 --><el-form ref="form" slot="searchBox" :model="form" inline size="small"><el-form-item label="日期" class="date_item"><el-date-pickerv-model="form.queryTimeDay"type="date"placeholder="选择日期"value-format="yyyy-MM-dd":clearable="false"style="width: 160px"></el-date-picker></el-form-item><el-form-item label="城镇污水处理厂"><el-selectv-model="form.assetCode"placeholder="请选择城镇污水处理厂"><el-optionv-for="item in townSwagePlantList":key="item.id":label="item.aname":value="item.acode"></el-option></el-select></el-form-item><el-form-item><el-buttontype="primary"icon="el-icon-search"@click="onSearch"size="mini">筛选</el-button></el-form-item></el-form><!-- 右边按钮 --><div slot="btnsR"><el-buttonicon="el-icon-download"@click="onExport(1)"size="mini"type="primary">按日导出</el-button><el-buttonicon="el-icon-download"@click="onExport(2)"v-if="type == 1"size="mini"type="primary">按月导出</el-button></div><!-- 表格 --><div class="table" slot="tablePage" v-loading="Loading"><divclass="slantTableStyle":style="{'--slantOneColWidth': tableOneColWidth + 'px','--tableWidth': tableWidth,}"><el-table:data="tableData"ref="slantTable":header-cell-style="headerStyle"height="100%"border:key="keyIndex"><el-table-columnv-for="(column1, index) in tableHeader":key="index":label="column1.name":align="column1.align ? column1.align : tableAlignDef":width="column1.width"><el-table-columnv-for="(column2, index2) in column1.columns":key="index2":prop="column2.prop":label="column2.name":align="column2.align ? column2.align : tableAlignDef":width="column2.width ? column2.width : tableMinColumnWidth"><el-table-columnv-for="(column3, index3) in column2.columns":key="index3":prop="column3.prop":label="column3.name":align="column3.align ? column3.align : tableAlignDef":width="tableMinColumnWidth"><template slot-scope="scope"><!-- 编辑 --><divv-if="(type == 3 &&scope.row.isEdit &&!disabledProp.includes(column3.prop)) ||(type == 2 &&scope.row.isEdit &&scope.row.editProp.includes(column3.prop))"><el-selectv-model="scope.row[column3.prop]"placeholder="请选择"size="mini"clearable><el-optionv-for="item in options":key="item.value":label="item.label":value="item.value"></el-option></el-select></div><div v-else>{{disabledProp.includes(column3.prop)? formatTime(scope.row[column3.prop]): formatStatus(scope.row[column3.prop])}}</div></template></el-table-column><template slot-scope="scope"><!-- 编辑 --><divv-if="(type == 3 &&scope.row.isEdit &&!disabledProp.includes(column2.prop)) ||(type == 2 &&scope.row.isEdit &&scope.row.editProp.includes(column2.prop))"><el-selectv-model="scope.row[column2.prop]"placeholder="请选择"size="mini"clearable><el-optionv-for="item in options":key="item.value":label="item.label":value="item.value"></el-option></el-select></div><div v-else>{{disabledProp.includes(column2.prop)? formatTime(scope.row[column2.prop]): formatStatus(scope.row[column2.prop])}}</div></template></el-table-column><template slot-scope="scope"><!-- 编辑 --><divv-if="(type == 3 &&scope.row.isEdit &&!disabledProp.includes(column1.prop)) ||(type == 2 &&scope.row.isEdit &&scope.row.editProp.includes(column1.prop))"><el-selectv-model="scope.row[column1.prop]"placeholder="请选择"size="mini"clearable><el-optionv-for="item in options":key="item.value":label="item.label":value="item.value"></el-option></el-select></div><div v-else>{{disabledProp.includes(column1.prop)? formatTime(scope.row[column1.prop]): formatStatus(scope.row[column1.prop])}}</div></template></el-table-column><el-table-columnfixed="right"label="操作"align="center"width="100"v-if="type !== 1"><template slot-scope="scope"><el-buttontype="primary"plainsize="mini"v-if="type == 3 && !scope.row.isEdit && compareTime(scope.row)"@click="handleClickEdit(scope.$index, scope.row)">编辑</el-button><el-buttontype="primary"plainsize="mini"v-if="type == 2 &&ifShowEdit(scope.row) &&!scope.row.isEdit &&compareTime(scope.row)"@click="handleClickEdit(scope.$index, scope.row)">编辑</el-button><el-buttontype="primary"size="mini"v-if="scope.row.isEdit"@click="handleClickSaveRow(scope.$index, scope.row)">保存</el-button></template></el-table-column><div slot="append" class="appendTable">填表要求:1、正常运行:√;2、故障:×;3、备用停机:△;4、其他:开机时间或停机时间等情况请填写备注栏</div></el-table></div></div></pageIndexTemp></div>
</template><script>
import moment from "moment";
import cloneDeep from "lodash.clonedeep";
import { downloadXls, downloadZip } from "@/utils/download";
import pageIndexTemp from "../../../components/pageIndexTemp.vue";
import { deviceRunReportHead } from "@/utils/deviceRunReportHead.js";export default {name: "deviceRunReport",components: { pageIndexTemp },props: {// 说明:// 1 - 不可编辑,仅展示,默认值是1;// 2 - 空白处可编辑,保存后已填入部分不可编辑,单行无空白不出现任何按钮;// 3 - 除部分固定字段外数据可编辑,出现按钮type: {type: Number,default: 1,},},filters: {},data() {return {//查询参数form: {queryTimeDay: moment().format("yyyy-MM-DD"),assetCode: "",},Loading: false,// 城镇污水厂列表townSwagePlantList: [],//表格数据tableData: [],tableOneColWidth: 100,tableMinColumnWidth: 80,tableWidth: "0px",tableAlignDef: "center",tableHeader: [],options: [{ label: "√", value: "0" },{ label: "△", value: "1" },{ label: "×", value: "2" },],disabledProp: ["time"],queryTime: "",assetCode: "",assetName: "",startForm: {},factoryCodes: "",headerRow2: [],keyIndex: 1,};},mounted() {this.getTableDom();},created() {this.getTownSwagePlantList();},methods: {//查询onSearch() {// this.getHeader(this.form.assetCode);this.getTableData();},// 查询城镇污水厂列表getTownSwagePlantList() {this.$api.reportManagement.getAssetList({ level: 1, cId: 42 }).then((res) => {this.townSwagePlantList = res.data || [];if (this.townSwagePlantList.length > 0) {this.form.assetCode = this.townSwagePlantList[0].acode;this.assetCode = this.form.assetCode;// this.getHeader(this.form.assetCode); // 获取表头this.assetName = this.townSwagePlantList[0].aname;this.getTableData();}});},// 获取表头getHeader(nv) {this.factoryCodes = nv;this.headerRow2 = [];// "xx污水处理厂"if (nv == "zgjn-H WS 0101") {//修改表头this.tableHeader = deviceRunReportHead[1];this.headerRow2 = ["紫外线杀菌装置"]; // 需要合并的表头} else if (nv == "zgjn-H WS 0106") {// xx污水处理厂this.tableHeader = deviceRunReportHead[2];this.headerRow2 = ["紫外线杀菌装置", "除臭系统"]; // 需要合并的表头} else if (nv == "zgjn-H WS 0105") {// xx污水处理厂this.tableHeader = deviceRunReportHead[3];this.headerRow2 = ["紫外线杀菌装置", "除臭系统"]; // 需要合并的表头} else {// 其他厂this.tableHeader = deviceRunReportHead[3];}// 刷新表格样式this.$nextTick(() => {this.$refs.slantTable.doLayout();this.getTableDom();});this.keyIndex++;},//查询表格数据getTableData() {this.Loading = true;this.queryTime = this.form.queryTimeDay;this.assetCode = this.form.assetCode;this.assetName =this.townSwagePlantList.find((item) => item.acode == this.assetCode).aname || "";this.startForm = JSON.parse(JSON.stringify(this.form));this.$api.reportManagement.getDeviceState(this.form).then((res) => {if (res.code == 200) {this.tableData = res.data || [];this.getHeader(this.form.assetCode); // 获取表头} else {this.$message.error(res.msg);}this.Loading = false;}).catch(() => {this.Loading = false;});},// 更新table domrefreshTableDom() {this.$nextTick(() => {this.$refs.slantTable.doLayout();});},// 时间转换formatTime(val) {return moment(val).format("HH:mm");},//获取table的DOM元素,筛查出el-table__header的DOM,并获取其宽度,用以控制append部分的宽度设置getTableDom() {let slantTable = this.$refs.slantTable;let tableDom = slantTable.$children.find((el) => el.$el.className == "el-table__header");this.tableWidth = tableDom.table.bodyWidth;},//表头样式设置,将“紫外线杀菌装置”字段设置为行高2(默认是行高1),并将其所占行偏移的部分设置为noneheaderStyle({ row, column, rowIndex, columnIndex }) {if (this.headerRow2.includes(column.label)) {this.$nextTick(() => {if (document.getElementsByClassName(column.id).length !== 0) {document.getElementsByClassName(column.id)[0].setAttribute("rowSpan", 2);return false;}});return column;}if (column.label == undefined) {return { display: "none" };}},// 点击导出按钮onExport(val) {if (this.form.assetCode == "" || this.form.queryTimeDay == "") {this.$message.warning("请选择日期和污水厂后再进行导出");return;}let flag = JSON.stringify(this.form) == JSON.stringify(this.startForm);// 按日导出重新搜索列表if (val == 1 && !flag) {this.getTableData();}let obj = this.townSwagePlantList.find((item) => item.acode == this.form.assetCode);let names =val == 1? this.form.queryTimeDay: moment(this.form.queryTimeDay).format("yyyy-MM") + "月";if (obj) {this.handelDownload(obj, names, val);}},//  下载xls/zip文件handelDownload(obj, names, val) {let fileName = obj.aname + "设备运行记录表" + names + "导出数据";let newName = val == 1 ? ".xls" : ".zip";this.$confirm(`此操作将下载"${fileName}${newName}" 文件, 是否继续?`,"提示",{confirmButtonText: "确定",cancelButtonText: "取消",type: "warning",}).then(() => {const datas = {type: val,...this.form,};this.$api.reportManagement.exportDeviceState(datas).then((res) => {val == 1 ? downloadXls(res, fileName) : downloadZip(res, fileName);});}).catch(() => {this.$message({type: "info",message: `已取消下载${names}数据`,});});},// 判断是否显示编辑按钮ifShowEdit(row) {let cloneRow = cloneDeep(row);let arr = [];let keys = Object.keys(cloneRow);for (let i = 0; i < keys.length; i++) {if (!cloneRow[keys[i]]) {arr.push(keys[i]);}}return arr.length > 0 ? true : false;},// 判断当前时间是否会显示编辑按钮compareTime(val) {let current = moment(new Date()).valueOf();let time = moment(val.time).valueOf();return time < current ? true : false;},// 点击编辑按钮handleClickEdit(index, row) {if (this.queryTime !== this.form.queryTimeDay ||this.assetCode !== this.form.assetCode) {this.$message.warning("查询条件和列表数据不一致,不可编辑!");return false;}this.$set(row, "isEdit", true);// 当type=2时,部分可编辑if (this.type == 2) {this.$set(row, "editProp", []);let keys = Object.keys(row);for (let i = 0; i < keys.length; i++) {if (!row[keys[i]]) {row.editProp.push(keys[i]);}}}},// 点击保存按钮handleClickSaveRow(index, row) {console.log(index, row);let arr = this.multSaveIndexArr();if (arr.length > 1) {this.$confirm("当前页面存在多条数据需要保存, 是否继续?", "提示", {confirmButtonText: "确定",cancelButtonText: "取消",type: "warning",}).then(() => {let times = 0;arr.map((i) => {this.$set(this.tableData[i], "isEdit", false);let editRow = cloneDeep(this.tableData[i]);if (this.type == 2) {delete editRow.editProp;}delete editRow.isEdit;this.$set(editRow, "acquisitionTime", editRow.time);delete editRow.time;this.$api.reportManagement[editRow.id ? "editDeviceData" : "addDeviceData"](editRow.id ? editRow : this.getAddRow(editRow)).then(() => {times++;if (times == arr.length) {this.$message.success("编辑成功");this.getTableData();}});});}).catch(() => {this.$message({type: "info",message: "已取消",});});} else {this.$set(row, "isEdit", false);if (this.type == 2) {delete row.editProp;}let editRow = cloneDeep(row);delete editRow.isEdit;delete editRow.time;this.$set(editRow, "acquisitionTime", row.time);if (editRow.id) {this.editEvent(editRow);} else {let addRow = this.getAddRow(editRow);console.log("addRow", addRow);this.addEvent(addRow);}}},//获取新增数据getAddRow(row) {this.$set(row, "acode", this.assetCode);this.$set(row, "aname", this.assetName);return row;},// 单条数据-新增事件addEvent(form) {this.$api.reportManagement.addDeviceData(form).then((res) => {if (res.code == 200) {this.$message.success("编辑成功");this.getTableData();} else {this.$message.error(res.msg);}});},// 单条数据-编辑事件editEvent(form) {console.log("form", form);this.$api.reportManagement.editDeviceData(form).then((res) => {if (res.code == 200) {this.$message.success("编辑成功");this.getTableData();} else {this.$message.error(res.msg);}});},// 判断当前是否有多个保存的需求multSaveIndexArr() {let arr = [];this.tableData.map((item, index) => {if (item.isEdit) {arr.push(index);}});return arr;},// 转换状态formatStatus(val) {if (val) {let obj = this.options.find((item) => item.value == val);return obj ? obj.label : "";} else {return val;}},},
};
</script>
<style lang="less">
@import "../../../../assets/css/element-ui.less";
.deviceRunReport-template {width: 100%;height: 100%;.date_item {margin: 0 20px 0 24px;}.table {height: 100%;.slantTableStyle {width: 100%;height: 100%;.appendTable {box-sizing: border-box;padding: 12px;}.el-table {.el-table__header {position: relative;}.el-table__append-wrapper {width: var(--tableWidth);}.el-table__body-wrapper {overflow: auto;}thead {&::before {width: var(--slantOneColWidth);height: 100%;position: absolute;top: 0;left: 0;display: block;content: "";z-index: 1;box-sizing: border-box;background-image: linear-gradient(to bottom left,transparent 49.5%,@tableBorder,transparent 50.5%);}&.is-group tr:first-of-type th:first-of-type {border-bottom: none;}}}}}
}
</style>

下面是js代码

/*** 工艺运行记录表表头*/
export const craftRunReportHead = {1: [{name: "巡视时间",prop: "time",},{name: "污水处理量",columns: [{name: "进水瞬时 流量m³/h",prop: "inInstantFlow",rule: "isFloat",columns: [{name: "1#系列",prop: "inInstantFlow1",rule: "isFloat",},{name: "2#系列",prop: "inInstantFlow2",rule: "isFloat",},],},{name: "出水瞬时 流量m³/h",prop: "outInstantFlow",rule: "isFloat",},{name: "内回流瞬时 流量m³/h",prop: "inGyrusInstantFlow",rule: "isFloat",columns: [{name: "1#系列",prop: "inGyrusInstantFlow1",rule: "isFloat",},{name: "2#系列",prop: "inGyrusInstantFlow2",rule: "isFloat",},],},{name: "外回流瞬时 流量m³/h",prop: "exGyrusInstantFlow",rule: "isFloat",columns: [{name: "1#系列",prop: "exGyrusInstantFlow1",rule: "isFloat",},{name: "2#系列",prop: "exGyrusInstantFlow2",rule: "isFloat",},],},],},{name: "PH值",columns: [{columns: [{name: "进水",prop: "inPh",rule: "isFloat",},{name: "出水",prop: "outPh",rule: "isFloat",},],},],},{name: "COD mg/L",columns: [{columns: [{name: "进水",prop: "inCod",rule: "isFloat",},{name: "出水",prop: "outCod",rule: "isFloat",},],},],},{name: "氨氮mg/L",columns: [{columns: [{name: "进水",prop: "inNh3n",rule: "isFloat",},{name: "出水",prop: "outNh3n",rule: "isFloat",},],},],},{name: "总磷mg/L",columns: [{columns: [{name: "进水",prop: "inTp",rule: "isFloat",},{name: "出水",prop: "outTp",rule: "isFloat",},],},],},{name: "总氮mg/L",columns: [{columns: [{name: "进水",prop: "inTn",rule: "isFloat",},{name: "出水",prop: "outTn",rule: "isFloat",},],},],},{name: "DO仪表mg/L",columns: [{name: "厌氧池",columns: [{name: "1#系列",prop: "anaerobicTank1",rule: "isFloat",},{name: "2#系列",prop: "anaerobicTank2",rule: "isFloat",},],},{name: "缺氧池",columns: [{name: "1#系列",prop: "anoxicPool1",rule: "isFloat",},{name: "2#系列",prop: "anoxicPool2",rule: "isFloat",},],},{name: "1#好氧池",columns: [{name: "前端",prop: "aerobicTank1Before",rule: "isFloat",},{name: "后端",prop: "aerobicTank1After",rule: "isFloat",},],},{name: "2#好氧池",columns: [{name: "前端",prop: "aerobicTank2Before",rule: "isFloat",},{name: "后端",prop: "aerobicTank2After",rule: "isFloat",},],},],},{name: "ORP仪表",columns: [{name: "mv",columns: [{name: "厌氧池",prop: "orpAnaerobicPool",rule: "isFloat",},],},{name: "mv",columns: [{name: "1#好氧池",prop: "orpAerobicPool1",rule: "isFloat",},],},{name: "mv",columns: [{name: "2#好氧池",prop: "orpAerobicPool2",rule: "isFloat",},],},],},{name: "MLSS (污泥浓度)",columns: [{name: "mg/L",columns: [{name: "1#好氧池",prop: "mlss1",rule: "isFloat",},],},{name: "mg/L",columns: [{name: "2#好氧池",prop: "mlss2",rule: "isFloat",},],},],},{name: "SV30(2-4次/天)",columns: [{name: "%",columns: [{name: "1#好氧池",prop: "sv30One",rule: "isFloat",},],},{name: "%",columns: [{name: "2#好氧池",prop: "sv30Two",rule: "isFloat",},],},],},{name: "进水温度/盐度",prop: "inTemOrSal",rule: "isFloat",},],2: [{name: "巡视时间",prop: "time",},{name: "污水处理量",columns: [{name: "进水瞬时 流量m³/h",prop: "inInstantFlow",rule: "isFloat",columns: [{name: "1#系列",prop: "inInstantFlow1",rule: "isFloat",},{name: "2#系列",prop: "inInstantFlow2",rule: "isFloat",},],},{name: "出水瞬时 流量m³/h",prop: "outInstantFlow",rule: "isFloat",},{name: "内回流瞬时 流量m³/h",prop: "inGyrusInstantFlow",rule: "isFloat",columns: [{name: "1#系列",prop: "inGyrusInstantFlow1",rule: "isFloat",},{name: "2#系列",prop: "inGyrusInstantFlow2",rule: "isFloat",},],},{name: "外回流瞬时 流量m³/h",prop: "exGyrusInstantFlow",rule: "isFloat",columns: [{name: "1#系列",prop: "exGyrusInstantFlow1",rule: "isFloat",},{name: "2#系列",prop: "exGyrusInstantFlow2",rule: "isFloat",},],},],},{name: "PH值",columns: [{columns: [{name: "进水",prop: "inPh",rule: "isFloat",},{name: "出水",prop: "outPh",rule: "isFloat",},],},],},{name: "COD mg/L",columns: [{columns: [{name: "进水",prop: "inCod",rule: "isFloat",},{name: "出水",prop: "outCod",rule: "isFloat",},],},],},{name: "氨氮mg/L",columns: [{columns: [{name: "进水",prop: "inNh3n",rule: "isFloat",},{name: "出水",prop: "outNh3n",rule: "isFloat",},],},],},{name: "总磷mg/L",columns: [{columns: [{name: "进水",prop: "inTp",rule: "isFloat",},{name: "出水",prop: "outTp",rule: "isFloat",},],},],},{name: "总氮mg/L",columns: [{columns: [{name: "进水",prop: "inTn",rule: "isFloat",},{name: "出水",prop: "outTn",rule: "isFloat",},],},],},{name: "DO仪表mg/L",columns: [{name: "厌氧池",columns: [{name: "1#系列",prop: "anaerobicTank1",rule: "isFloat",},{name: "2#系列",prop: "anaerobicTank2",rule: "isFloat",},],},{name: "缺氧池",columns: [{name: "1#系列",prop: "anoxicPool1",rule: "isFloat",},{name: "2#系列",prop: "anoxicPool2",rule: "isFloat",},],},{name: "1#好氧池",columns: [{name: "前端",prop: "aerobicTank1Before",rule: "isFloat",},{name: "后端",prop: "aerobicTank1After",rule: "isFloat",},],},{name: "2#好氧池",columns: [{name: "前端",prop: "aerobicTank2Before",rule: "isFloat",},{name: "后端",prop: "aerobicTank2After",rule: "isFloat",},],},],},{name: "MLSS (污泥浓度)",columns: [{name: "mg/L",columns: [{name: "1#好氧池",prop: "mlss1",rule: "isFloat",},],},{name: "mg/L",columns: [{name: "2#好氧池",prop: "mlss2",rule: "isFloat",},],},],},{name: "SV30(2-4次/天)",columns: [{name: "%",columns: [{name: "1#好氧池",prop: "sv30One",rule: "isFloat",},],},{name: "%",columns: [{name: "2#好氧池",prop: "sv30Two",rule: "isFloat",},],},],},{name: "二沉池泥水界面仪",columns: [{name: "m",columns: [{name: "1#二沉池",prop: "sedimentationTank1",rule: "isFloat",},],},{name: "m",columns: [{name: "2#二沉池",prop: "sedimentationTank2",rule: "isFloat",},],},],},{name: "进水温度/盐度",prop: "inTemOrSal",rule: "isFloat",},],// 其他水厂3: [{name: "巡视时间",prop: "time",},{name: "污水处理量",columns: [{name: "进水瞬时 流量m³/h",prop: "inInstantFlow",rule: "isFloat",columns: [{name: "1#系列",prop: "inInstantFlow1",rule: "isFloat",},{name: "2#系列",prop: "inInstantFlow2",rule: "isFloat",},],},{name: "出水瞬时 流量m³/h",prop: "outInstantFlow",rule: "isFloat",},{name: "内回流瞬时 流量m³/h",prop: "inGyrusInstantFlow",rule: "isFloat",columns: [{name: "1#系列",prop: "inGyrusInstantFlow1",rule: "isFloat",},{name: "2#系列",prop: "inGyrusInstantFlow2",rule: "isFloat",},],},{name: "外回流瞬时 流量m³/h",prop: "exGyrusInstantFlow",rule: "isFloat",columns: [{name: "1#系列",prop: "exGyrusInstantFlow1",rule: "isFloat",},{name: "2#系列",prop: "exGyrusInstantFlow2",rule: "isFloat",},],},],},{name: "PH值",columns: [{columns: [{name: "进水",prop: "inPh",rule: "isFloat",},{name: "出水",prop: "outPh",rule: "isFloat",},],},],},{name: "COD mg/L",columns: [{columns: [{name: "进水",prop: "inCod",rule: "isFloat",},{name: "出水",prop: "outCod",rule: "isFloat",},],},],},{name: "氨氮mg/L",columns: [{columns: [{name: "进水",prop: "inNh3n",rule: "isFloat",},{name: "出水",prop: "outNh3n",rule: "isFloat",},],},],},{name: "总磷mg/L",columns: [{columns: [{name: "进水",prop: "inTp",rule: "isFloat",},{name: "出水",prop: "outTp",rule: "isFloat",},],},],},{name: "总氮mg/L",columns: [{columns: [{name: "进水",prop: "inTn",rule: "isFloat",},{name: "出水",prop: "outTn",rule: "isFloat",},],},],},{name: "DO仪表mg/L",columns: [{name: "厌氧池",columns: [{name: "1#系列",prop: "anaerobicTank1",rule: "isFloat",},{name: "2#系列",prop: "anaerobicTank2",rule: "isFloat",},],},{name: "缺氧池",columns: [{name: "1#系列",prop: "anoxicPool1",rule: "isFloat",},{name: "2#系列",prop: "anoxicPool2",rule: "isFloat",},],},{name: "1#好氧池",columns: [{name: "前端",prop: "aerobicTank1Before",rule: "isFloat",},{name: "后端",prop: "aerobicTank1After",rule: "isFloat",},],},{name: "2#好氧池",columns: [{name: "前端",prop: "aerobicTank2Before",rule: "isFloat",},{name: "后端",prop: "aerobicTank2After",rule: "isFloat",},],},],},{name: "MLSS (污泥浓度)",columns: [{name: "mg/L",columns: [{name: "1#好氧池",prop: "mlss1",rule: "isFloat",},],},{name: "mg/L",columns: [{name: "2#好氧池",prop: "mlss2",rule: "isFloat",},],},],},{name: "SV30(2-4次/天)",columns: [{name: "%",columns: [{name: "1#好氧池",prop: "sv30One",rule: "isFloat",},],},{name: "%",columns: [{name: "2#好氧池",prop: "sv30Two",rule: "isFloat",},],},],},{name: "二沉池泥水界面仪",columns: [{name: "m",columns: [{name: "1#二沉池",prop: "sedimentationTank1",rule: "isFloat",},],},{name: "m",columns: [{name: "2#二沉池",prop: "sedimentationTank2",rule: "isFloat",},],},{name: "m",columns: [{name: "3#二沉池",prop: "sedimentationTank3",rule: "isFloat",},],},{name: "m",columns: [{name: "4#二沉池",prop: "sedimentationTank4",rule: "isFloat",},],},],},{name: "进水温度/盐度",prop: "inTemOrSal",rule: "isFloat",},],
};

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/64.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

【UE4 C++】根据指定路径生成静态网格体

在上一篇博客中&#xff08;【UE C】蓝图调用C函数&#xff09;&#xff0c;我们用C创建了一个蓝图函数库&#xff0c;本篇文章在这个蓝图函数库基础上增加一个方法&#xff0c;该方法只需输入一个文件目录路径&#xff0c;就可在场景中生成该目录下得所有静态网格体。&#xf…

第6集丨JavaScript 使用原型(prototype)实现继承——最佳实战3

目录 一、原型继承与属性拷贝1.1 功能说明1.2 功能测试 二、多重继承2.1 功能实现2.2 功能测试 三、寄生式继承四、构造器借用4.1 简单实现4.2 进化版4.2.1 功能实现4.2.2 案例测试 五、借用构造器和原型复制六 综合案例6.1 需求说明6.2 代码实现 一、原型继承与属性拷贝 1.1 功…

css之:is()、:where()和:has()伪元素的运用、使用、important

文章目录 简介1、:is()2、:where()3、:has() 简介 :is()、:where()和:has()伪元素是CSS中用于样式化元素的非常强大的工具。它们是在CSS选择器Level4规范中引入的。它们允许我们将样式应用于符合特定条件的任何元素&#xff0c;例如元素的类型、元素的位置和元素的后代。 1、:i…

【高并发】高并发架构实战:从需求分析到系统设计

Yan-英杰的主页 悟已往之不谏 知来者之可追 C程序员&#xff0c;2024届电子信息研究生 很多软件工程师的职业规划是成为架构师&#xff0c;但是要成为架构师很多时候要求先有架构设计经验&#xff0c;而不做架构师又怎么会有架构设计经验呢&#xff1f;那么要如何获得架构设…

前端渲染模式CSR,SSR,SSG,ISR,DPR

目录 一、客户端渲染——CSR&#xff08;Client Side Rendering&#xff09; 二、服务器端渲染——SSR&#xff08;Server Side Rendering&#xff09; 三、静态站点生成——SSG&#xff08;Static Site Generation&#xff09; 四、增量静态生成——ISR&#xff08;Increm…

【软件测试】在Windows环境安装Docker(详细步骤)

目录&#xff1a;导读 前言一、Python编程入门到精通二、接口自动化项目实战三、Web自动化项目实战四、App自动化项目实战五、一线大厂简历六、测试开发DevOps体系七、常用自动化测试工具八、JMeter性能测试九、总结&#xff08;尾部小惊喜&#xff09; 前言 下载和安装 1、地…

智慧园区4G+蓝牙+GPS/北斗RTK人员定位系统解决方案

智慧园区是指利用现代科技手段进行精细化管理的园区&#xff0c;人员定位技术被广泛应用在智慧园区。智慧园区人员定位技术通过使用传感器设备&#xff0c;能够实时监测园区内人员的位置和活动情况&#xff0c;从而提高园区的人员管理效率和安全性。 通过人员定位&#xff0c;…

云HIS是什么?HIS系统为什么要上云?云HIS有哪些优点?

一、当前医疗行业HIS的现状与发展趋势 1.医院信息系统&#xff08;HIS&#xff09;经历了从手工到单机再到局域网的两个阶段&#xff0c;随着云计算、大数据新技术迅猛发展&#xff0c;基于云计算的医院信息系统将逐步取代传统局域网HIS , 以适应人们对医疗卫生服务越来越高的要…

常用分类损失CE Loss、Focal Loss及GHMC Loss理解与总结

一、CE Loss 定义 交叉熵损失&#xff08;Cross-Entropy Loss&#xff0c;CE Loss&#xff09;能够衡量同一个随机变量中的两个不同概率分布的差异程度&#xff0c;当两个概率分布越接近时&#xff0c;交叉熵损失越小&#xff0c;表示模型预测结果越准确。 公式 二分类 二…

深入理解预训练(pre-learning)、微调(fine-tuning)、迁移学习(transfer learning)三者的联系与区别

1. 什么是预训练和微调 你需要搭建一个网络模型来完成一个特定的图像分类的任务。首先&#xff0c;你需要随机初始化参数&#xff0c;然后开始训练网络&#xff0c;不断调整参数&#xff0c;直到网络的损失越来越小。在训练的过程中&#xff0c;一开始初始化的参数会不断变化。…

小程序:页面跳转闪屏

自己的笔记&#xff0c;随手记录。扛精走开。 1、问题描述 进入页面&#xff0c;是一个组件&#xff0c;通过路由传参判断是由哪个页面进入&#xff0c;不同的页面拿的已选值不一样&#xff0c;需要回显值&#xff0c;在编辑数据。此时会出现一个问题&#xff0c;A页面中进来…

Serverless和EDA是绝配,亚马逊云科技CTO Werner表示需要用开放心态来重新审视架构

前一段有个很火的博客&#xff0c;讲的是一家全球流媒体企业的监测系统从Serverless微服务改成了单体&#xff0c;成本居然降低了90%&#xff01;这一下子可在网上炸锅了&#xff0c;特别是一些看不惯微服务的、单体应用的拥趸&#xff0c;更是坐不住了。但这并不像吃瓜群众看到…

【ECharts系列】ECharts 图表渲染问题解决方案

1 问题描述 echats 渲染&#xff0c;第一次的时候只出现Y轴数值&#xff0c;不出现X轴数值&#xff0c;切换下页面&#xff0c;X轴数值就能出现。 2 原因分析 如果在使用ECharts渲染时&#xff0c;X轴数值只在切换页面后才出现&#xff0c;可能是因为ECharts在初始化时没有正确…

光速吟唱,Clibor ,批量多次复制依次粘贴工具 快捷输入软件教程

批量多次复制依次粘贴工具 批量复制粘贴工具0.81.exe https://www.aliyundrive.com/s/3sbBaGmHkb8 点击链接保存&#xff0c;或者复制本段内容&#xff0c;打开「阿里云盘」APP &#xff0c;无需下载极速在线查看&#xff0c;视频原画倍速播放。 青县solidworks钣金设计培训 …

Redis进阶 - Redis哨兵

原文首更地址&#xff0c;阅读效果更佳&#xff01; Redis进阶 - Redis哨兵 | CoderMast编程桅杆https://www.codermast.com/database/redis/redis-advance-sentinel.html 思考 slave 节点宕机恢复以后可以找 master 节点同步数据&#xff0c;那么 master 节点宕机怎么办&am…

[Docker] Docker镜像管理和操作实践(二) 文末送书

前言&#xff1a; Docker镜像是容器化应用程序的打包和分发单元&#xff0c;包含了应用程序及其所有依赖项&#xff0c;实现了应用程序的可移植性和一致性。 文章目录 使用Dockerfile创建自定义镜像实践练手1. 创建基于ubuntu的自定义镜像&#xff0c;并安装nginx2. 配置Redis容…

MySQL数据库高级查询语句

MySQL数据库高级查询语句 一、语句SELECT ----显示表格中一个或数个字段的所有数据记录DISTINCT ----不显示重复的数据记录WHERE ----有条件查询AND OR ----且 或IN ----显示已知的值的数据记录BETWEEN ----显示两个值范围内的数据记录通配符 ----通常通配符都是跟 LIKE 一起使…

【云原生】二进制k8s集群(下)部署高可用master节点

本次部署说明 在上一篇文章中&#xff0c;就已经完成了二进制k8s集群部署的搭建&#xff0c;但是单机master并不适用于企业的实际运用&#xff08;因为单机master中&#xff0c;仅仅只有一台master作为节点服务器的调度指挥&#xff0c;一旦宕机。就意味着整个集群的瘫痪&#…

宝塔Linux面板安装Composer依赖管理工具与PHP依赖包的方法

最近看见腾讯云有一个AI绘画还挺有意思&#xff0c;想搞来写个接口玩 但是Composer一直运行不成功 提示xdebug什么的 最后经过搜索 发现 需要删除你宝塔里所有php中禁用的putenv函数 然后重启php就可以了&#xff01; 然后就可以运行这个命令了 出现这种情况 还需要删除所有…

Linux常用命令——emacs命令

在线Linux命令查询工具 emacs 功能强大的全屏文本编辑器 补充说明 emacs命令是由GNU组织的创始人Richard Stallman开发的一个功能强大的全屏文本编辑器&#xff0c;它支持多种编程语言&#xff0c;具有很多优良的特性。有众多的系统管理员和软件开发者使用emacs。 语法 e…