|
@@ -116,7 +116,7 @@
|
|
|
:data="klRuleByIdSub"
|
|
|
size="mini"
|
|
|
style="min-height: 200px"
|
|
|
- height="calc(100vh - 383px)"
|
|
|
+ height="calc(100vh - 393px)"
|
|
|
:header-row-style="{ background: '#E3EAF4' }"
|
|
|
:cell-style="cellStyle"
|
|
|
:span-method="ObjectSpanMethod"
|
|
@@ -364,6 +364,7 @@
|
|
|
>
|
|
|
<el-input
|
|
|
type="text"
|
|
|
+ @focus="setScrollRight"
|
|
|
v-model.trim="scope.row.subMaxUnit"
|
|
|
placeholder="填写单位"
|
|
|
/>
|
|
@@ -436,6 +437,7 @@
|
|
|
>
|
|
|
<el-input
|
|
|
type="text"
|
|
|
+ @focus="setScrollRight"
|
|
|
v-model.trim="scope.row.subMinUnit"
|
|
|
placeholder="填写单位"
|
|
|
/>
|
|
@@ -447,7 +449,7 @@
|
|
|
<el-form-item
|
|
|
class="type_content_item"
|
|
|
style="flex: 2"
|
|
|
- v-show="scope.row.subType !== 6 && scope.row.dataType === '2'"
|
|
|
+ v-if="scope.row.subType !== 6 && scope.row.dataType === '2'"
|
|
|
label="医学内容:"
|
|
|
label-width="100px"
|
|
|
:prop="`klRuleByIdSub[${scope.$index}].subEqValue`"
|
|
@@ -469,6 +471,7 @@
|
|
|
type="textarea"
|
|
|
rows="1"
|
|
|
placeholder="请输入医学内容"
|
|
|
+ @focus="setScrollRight"
|
|
|
v-model.trim="scope.row.subEqValue"
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
@@ -478,7 +481,7 @@
|
|
|
label="正则表达式:"
|
|
|
label-width="120px"
|
|
|
style="flex: 2"
|
|
|
- v-show="scope.row.subType === 6"
|
|
|
+ v-if="scope.row.subType === 6"
|
|
|
:prop="`klRuleByIdSub[${scope.$index}].subEqValue1`"
|
|
|
:rules="[
|
|
|
{
|
|
@@ -498,6 +501,7 @@
|
|
|
type="textarea"
|
|
|
rows="1"
|
|
|
placeholder="请输入正则表达式"
|
|
|
+ @focus="setScrollRight"
|
|
|
v-model.trim="scope.row.subEqValue"
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
@@ -529,9 +533,12 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
+ setScrollRight() {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.table.bodyWrapper.scrollLeft = this.$refs.table.bodyWrapper.scrollWidth;
|
|
|
+ });
|
|
|
+ },
|
|
|
maxChange(e, val, type) {
|
|
|
- console.log(e);
|
|
|
- // this.$refs[`klRuleByIdSub[0].subMinValue`].clearValidate()
|
|
|
if (
|
|
|
type === "i" &&
|
|
|
this.klRuleByIdSub[val].subMaxOperator &&
|
|
@@ -551,10 +558,9 @@ export default {
|
|
|
`klRuleByIdSub[${val}].subMinOperator`
|
|
|
]);
|
|
|
}
|
|
|
+ this.setScrollRight()
|
|
|
},
|
|
|
minChange(e, val, type) {
|
|
|
- console.log(e);
|
|
|
- // this.$refs[`klRuleByIdSub[0].subMinValue`].clearValidate()
|
|
|
if (
|
|
|
type === "i" &&
|
|
|
this.klRuleByIdSub[val].subMinOperator &&
|
|
@@ -574,6 +580,7 @@ export default {
|
|
|
`klRuleByIdSub[${val}].subMaxValue`
|
|
|
]);
|
|
|
}
|
|
|
+ this.setScrollRight()
|
|
|
},
|
|
|
addGroup(scope) {
|
|
|
this.$emit("addGroup", null, { groupId: scope.row.groupId });
|
|
@@ -583,6 +590,10 @@ export default {
|
|
|
this.$emit("addGroup", scope.row.groupId, { index: scope.$index });
|
|
|
this.$refs.table.bodyWrapper.scrollLeft = 0;
|
|
|
},
|
|
|
+ scrollFun() {
|
|
|
+ this.$refs.table.bodyWrapper.scrollTop =
|
|
|
+ this.$refs.table.bodyWrapper.scrollTop + 60;
|
|
|
+ },
|
|
|
// table 隔行换色
|
|
|
// rowStyle({ row }) {
|
|
|
// if (row.rowIndex % 2 == 0) {
|
|
@@ -726,7 +737,6 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
dataTypeChange(val, index) {
|
|
|
- console.log(val, index);
|
|
|
this.klRuleByIdSub[index].subEqOperator = val === "2" ? "=" : "";
|
|
|
this.clearNumText(index);
|
|
|
// TODO 新增的内容追踪不到
|