|
@@ -5,9 +5,10 @@
|
|
margin-top: 10px;
|
|
margin-top: 10px;
|
|
padding: 20px;
|
|
padding: 20px;
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
- /deep/ .el-input--mini .el-input__inner,
|
|
|
|
|
|
+ /deep/ .el-table .el-input--mini .el-input__inner,
|
|
.el-select {
|
|
.el-select {
|
|
width: 100%;
|
|
width: 100%;
|
|
|
|
+ font-size: 12px;
|
|
}
|
|
}
|
|
.btn_box {
|
|
.btn_box {
|
|
width: 100%;
|
|
width: 100%;
|
|
@@ -74,9 +75,9 @@
|
|
margin-right: 4px;
|
|
margin-right: 4px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- ::v-deep .el-table tbody tr:hover > td {
|
|
|
|
- background-color: transparent;
|
|
|
|
- }
|
|
|
|
|
|
+ // ::v-deep .el-table tbody tr:hover > td {
|
|
|
|
+ // // background-color: transparent;
|
|
|
|
+ // }
|
|
/deep/ .el-table th {
|
|
/deep/ .el-table th {
|
|
background: transparent;
|
|
background: transparent;
|
|
}
|
|
}
|
|
@@ -86,9 +87,9 @@
|
|
.table_cell_cls {
|
|
.table_cell_cls {
|
|
vertical-align: top;
|
|
vertical-align: top;
|
|
}
|
|
}
|
|
- /deep/ .el-table__body .el-table__row.hover-row td {
|
|
|
|
- background-color: transparent;
|
|
|
|
- }
|
|
|
|
|
|
+ // /deep/ .el-table__body .el-table__row.hover-row td {
|
|
|
|
+ // // background-color: transparent;
|
|
|
|
+ // }
|
|
/deep/ .el-form-item__label {
|
|
/deep/ .el-form-item__label {
|
|
font-size: 12px;
|
|
font-size: 12px;
|
|
}
|
|
}
|
|
@@ -96,6 +97,12 @@
|
|
font-size: 14px;
|
|
font-size: 14px;
|
|
font-weight: 400;
|
|
font-weight: 400;
|
|
}
|
|
}
|
|
|
|
+ // /deep/ .el-table__body tr.current-row>td{
|
|
|
|
+ // background: #fff;
|
|
|
|
+ // }
|
|
|
|
+ /deep/ .el-table .cell {
|
|
|
|
+ // overflow: initial;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|
|
|
|
|
|
@@ -103,17 +110,18 @@
|
|
<!-- :prop="`klRuleByIdSub[${scope.$index}].subDescription`" -->
|
|
<!-- :prop="`klRuleByIdSub[${scope.$index}].subDescription`" -->
|
|
<div class="AddNewRuleTable">
|
|
<div class="AddNewRuleTable">
|
|
<h4 style="margin-bottom: 24px">规则内容:</h4>
|
|
<h4 style="margin-bottom: 24px">规则内容:</h4>
|
|
|
|
+ <!-- 隔行换色 :row-style="rowStyle" -->
|
|
<el-table
|
|
<el-table
|
|
border
|
|
border
|
|
:data="klRuleByIdSub"
|
|
:data="klRuleByIdSub"
|
|
size="mini"
|
|
size="mini"
|
|
style="min-height: 200px"
|
|
style="min-height: 200px"
|
|
- height="calc(100vh - 403px)"
|
|
|
|
- :row-style="rowStyle"
|
|
|
|
|
|
+ height="calc(100vh - 383px)"
|
|
:header-row-style="{ background: '#E3EAF4' }"
|
|
:header-row-style="{ background: '#E3EAF4' }"
|
|
:cell-style="cellStyle"
|
|
:cell-style="cellStyle"
|
|
:span-method="ObjectSpanMethod"
|
|
:span-method="ObjectSpanMethod"
|
|
ref="table"
|
|
ref="table"
|
|
|
|
+ row-key="groupChildId"
|
|
>
|
|
>
|
|
<el-table-column width="80px" label="组" prop="groupType" fixed="left">
|
|
<el-table-column width="80px" label="组" prop="groupType" fixed="left">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
@@ -199,6 +207,7 @@
|
|
:disabled="scope.row.disabled"
|
|
:disabled="scope.row.disabled"
|
|
placeholder="请选择"
|
|
placeholder="请选择"
|
|
@change="subTypeChange($event, scope.$index)"
|
|
@change="subTypeChange($event, scope.$index)"
|
|
|
|
+ :ref="`klRuleByIdSub[${scope.$index}].subType`"
|
|
>
|
|
>
|
|
<el-option
|
|
<el-option
|
|
v-for="item in scope.row.baseTypes"
|
|
v-for="item in scope.row.baseTypes"
|
|
@@ -225,6 +234,7 @@
|
|
:disabled="scope.row.disabled"
|
|
:disabled="scope.row.disabled"
|
|
v-model="scope.row.subLenCode"
|
|
v-model="scope.row.subLenCode"
|
|
placeholder="请选择"
|
|
placeholder="请选择"
|
|
|
|
+ :ref="`klRuleByIdSub[${scope.$index}].subLenCode`"
|
|
@change="subCodeChange($event, scope.$index)"
|
|
@change="subCodeChange($event, scope.$index)"
|
|
>
|
|
>
|
|
<el-option
|
|
<el-option
|
|
@@ -256,6 +266,7 @@
|
|
@focus="subConceptIdfocus(scope.$index)"
|
|
@focus="subConceptIdfocus(scope.$index)"
|
|
:remote-method="searchConcept"
|
|
:remote-method="searchConcept"
|
|
v-model.trim="scope.row.subConceptId"
|
|
v-model.trim="scope.row.subConceptId"
|
|
|
|
+ :ref="`klRuleByIdSub[${scope.$index}].subConceptId`"
|
|
>
|
|
>
|
|
<el-option
|
|
<el-option
|
|
v-for="item in scope.row.conceptList"
|
|
v-for="item in scope.row.conceptList"
|
|
@@ -281,6 +292,7 @@
|
|
v-model="scope.row.dataType"
|
|
v-model="scope.row.dataType"
|
|
placeholder="选择类型"
|
|
placeholder="选择类型"
|
|
@change="dataTypeChange($event, scope.$index)"
|
|
@change="dataTypeChange($event, scope.$index)"
|
|
|
|
+ :ref="`klRuleByIdSub[${scope.$index}].dataType`"
|
|
>
|
|
>
|
|
<el-option label="数值类型" value="1"> </el-option>
|
|
<el-option label="数值类型" value="1"> </el-option>
|
|
<el-option label="文本类型" value="2"> </el-option>
|
|
<el-option label="文本类型" value="2"> </el-option>
|
|
@@ -311,6 +323,7 @@
|
|
v-model="scope.row.subMaxOperator"
|
|
v-model="scope.row.subMaxOperator"
|
|
placeholder="请选择"
|
|
placeholder="请选择"
|
|
clearable
|
|
clearable
|
|
|
|
+ :ref="`klRuleByIdSub[${scope.$index}].subMaxOperator`"
|
|
>
|
|
>
|
|
<el-option
|
|
<el-option
|
|
v-for="item in operMaxList"
|
|
v-for="item in operMaxList"
|
|
@@ -379,6 +392,7 @@
|
|
v-model="scope.row.subMinOperator"
|
|
v-model="scope.row.subMinOperator"
|
|
placeholder="请选择"
|
|
placeholder="请选择"
|
|
clearable
|
|
clearable
|
|
|
|
+ :ref="`klRuleByIdSub[${scope.$index}].subMinOperator`"
|
|
>
|
|
>
|
|
<el-option
|
|
<el-option
|
|
v-for="item in operMinList"
|
|
v-for="item in operMinList"
|
|
@@ -518,13 +532,13 @@ export default {
|
|
this.$refs.table.bodyWrapper.scrollLeft = 0;
|
|
this.$refs.table.bodyWrapper.scrollLeft = 0;
|
|
},
|
|
},
|
|
// table 隔行换色
|
|
// table 隔行换色
|
|
- rowStyle({ row }) {
|
|
|
|
- if (row.rowIndex % 2 == 0) {
|
|
|
|
- return {
|
|
|
|
- background: "#DFF7EF"
|
|
|
|
- };
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
|
|
+ // rowStyle({ row }) {
|
|
|
|
+ // if (row.rowIndex % 2 == 0) {
|
|
|
|
+ // return {
|
|
|
|
+ // background: "#DFF7EF"
|
|
|
|
+ // };
|
|
|
|
+ // }
|
|
|
|
+ // },
|
|
// cellStyle
|
|
// cellStyle
|
|
cellStyle({ row, column, rowIndex, columnIndex }) {
|
|
cellStyle({ row, column, rowIndex, columnIndex }) {
|
|
if (column.label == "组" || column.label == "基础规则") return {};
|
|
if (column.label == "组" || column.label == "基础规则") return {};
|
|
@@ -719,9 +733,49 @@ export default {
|
|
this.numTypes = localStorage.getItem("zskNumDict");
|
|
this.numTypes = localStorage.getItem("zskNumDict");
|
|
this.getSpanArr(this.klRuleByIdSub);
|
|
this.getSpanArr(this.klRuleByIdSub);
|
|
},
|
|
},
|
|
- beforeUpdate() {
|
|
|
|
- this.getSpanArr(this.klRuleByIdSub);
|
|
|
|
- },
|
|
|
|
|
|
+ mounted() {},
|
|
|
|
+ // beforeUpdate() {
|
|
|
|
+ // this.getSpanArr(this.klRuleByIdSub);
|
|
|
|
+ // console.log("boxxxxxxx", this.box);
|
|
|
|
+ // // if (this.box) {
|
|
|
|
+ // // this.box.removeEventListener("scroll");
|
|
|
|
+ // // }
|
|
|
|
+ // // console.log(box);
|
|
|
|
+ // // if (!this.box) {
|
|
|
|
+ // this.box = document.querySelector(".el-table__body-wrapper");
|
|
|
|
+ // // }
|
|
|
|
+
|
|
|
|
+ // let that = this;
|
|
|
|
+ // this.box.addEventListener("scroll", function (e) {
|
|
|
|
+ // console.log(that.klRuleByIdSub.length);
|
|
|
|
+ // console.log('subType',that.$refs[`klRuleByIdSub[1].subType`]);
|
|
|
|
+ // that.klRuleByIdSub.forEach((ite, index) => {
|
|
|
|
+ // // console.log(
|
|
|
|
+ // // that.$refs[`klRuleByIdSub[${index}].subType`],
|
|
|
|
+ // // that.$refs[`klRuleByIdSub[${index}].subLenCode`],
|
|
|
|
+ // // that.$refs[`klRuleByIdSub[${index}].subConceptId`],
|
|
|
|
+ // // that.$refs[`klRuleByIdSub[${index}].subMaxOperator`],
|
|
|
|
+ // // that.$refs[`klRuleByIdSub[${index}].subMinOperator`],
|
|
|
|
+ // // that.$refs[`klRuleByIdSub[${index}].subMinOperator`]
|
|
|
|
+ // // );
|
|
|
|
+ // that.$refs[`klRuleByIdSub[${index}].subType`] &&
|
|
|
|
+ // that.$refs[`klRuleByIdSub[${index}].subType`].blur();
|
|
|
|
+ // that.$refs[`klRuleByIdSub[${index}].subLenCode`] &&
|
|
|
|
+ // that.$refs[`klRuleByIdSub[${index}].subLenCode`].blur();
|
|
|
|
+ // that.$refs[`klRuleByIdSub[${index}].subConceptId`] &&
|
|
|
|
+ // that.$refs[`klRuleByIdSub[${index}].subConceptId`].blur();
|
|
|
|
+ // that.$refs[`klRuleByIdSub[${index}].dataType`] &&
|
|
|
|
+ // that.$refs[`klRuleByIdSub[${index}].dataType`].blur();
|
|
|
|
+ // that.$refs[`klRuleByIdSub[${index}].subMaxOperator`] &&
|
|
|
|
+ // that.$refs[`klRuleByIdSub[${index}].subMaxOperator`].blur();
|
|
|
|
+ // that.$refs[`klRuleByIdSub[${index}].subMinOperator`] &&
|
|
|
|
+ // that.$refs[`klRuleByIdSub[${index}].subMinOperator`].blur();
|
|
|
|
+ // that.$refs[`klRuleByIdSub[${index}]subMinOperator`] &&
|
|
|
|
+ // that.$refs[`klRuleByIdSub[${index}]subMinOperator`].blur();
|
|
|
|
+ // });
|
|
|
|
+ // });
|
|
|
|
+ // },
|
|
|
|
+ updated() {},
|
|
props: {
|
|
props: {
|
|
klRuleByIdSub: {
|
|
klRuleByIdSub: {
|
|
type: Array,
|
|
type: Array,
|