|
@@ -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"
|
|
@@ -350,7 +350,7 @@
|
|
|
>
|
|
|
<el-input
|
|
|
type="text"
|
|
|
- @input="maxChange($event, scope.$index, 'i')"
|
|
|
+ @focus="maxChange($event, scope.$index, 'i')"
|
|
|
:ref="`klRuleByIdSub[${scope.$index}].subMaxValue`"
|
|
|
v-model="scope.row.subMaxValue"
|
|
|
placeholder="填写数值"
|
|
@@ -364,6 +364,7 @@
|
|
|
>
|
|
|
<el-input
|
|
|
type="text"
|
|
|
+ @focus="setScrollRight"
|
|
|
v-model.trim="scope.row.subMaxUnit"
|
|
|
placeholder="填写单位"
|
|
|
/>
|
|
@@ -423,7 +424,7 @@
|
|
|
<el-input
|
|
|
type="text"
|
|
|
:ref="`klRuleByIdSub[${scope.$index}].subMinValue`"
|
|
|
- @input="minChange($event, scope.$index, 'i')"
|
|
|
+ @focus="minChange($event, scope.$index, 'i')"
|
|
|
v-model="scope.row.subMinValue"
|
|
|
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 新增的内容追踪不到
|
|
@@ -795,47 +805,46 @@ export default {
|
|
|
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();
|
|
|
- // });
|
|
|
- // });
|
|
|
+ // watch: {
|
|
|
+ // klRuleByIdSub: {
|
|
|
+ // handler() {
|
|
|
+ // let that = this;
|
|
|
+ // // let box = document.querySelector(".el-table__body-wrapper");
|
|
|
+ // this.$refs.table.bodyWrapper.addEventListener("scroll", function (e) {
|
|
|
+ // // console.log(that.klRuleByIdSub.length);
|
|
|
+ // // console.log('subType',that.$refs[`klRuleByIdSub[1].subType`]);
|
|
|
+ // that.$nextTick(() => {
|
|
|
+ // that.klRuleByIdSub.forEach((ite, index) => {
|
|
|
+ // console.log(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();
|
|
|
+ // });
|
|
|
+ // });
|
|
|
+ // });
|
|
|
+ // },
|
|
|
+ // deep: true
|
|
|
+ // }
|
|
|
// },
|
|
|
updated() {},
|
|
|
props: {
|