|
@@ -54,7 +54,7 @@
|
|
|
:rules="{
|
|
:rules="{
|
|
|
required: true,
|
|
required: true,
|
|
|
message: '',
|
|
message: '',
|
|
|
- trigger: 'blur'
|
|
|
|
|
|
|
+ trigger: 'change'
|
|
|
}"
|
|
}"
|
|
|
v-if="scope.row.type!=2"
|
|
v-if="scope.row.type!=2"
|
|
|
>
|
|
>
|
|
@@ -95,6 +95,7 @@
|
|
|
<el-input
|
|
<el-input
|
|
|
v-model="scope.row.length"
|
|
v-model="scope.row.length"
|
|
|
placeholder="请输入"
|
|
placeholder="请输入"
|
|
|
|
|
+ oninput="value=value.replace(/^(0+)|[^\d]+/g,'')"
|
|
|
></el-input>
|
|
></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</template>
|
|
</template>
|
|
@@ -113,6 +114,8 @@
|
|
|
<el-input
|
|
<el-input
|
|
|
v-model="scope.row.currentId"
|
|
v-model="scope.row.currentId"
|
|
|
placeholder="请输入"
|
|
placeholder="请输入"
|
|
|
|
|
+ :maxlength="scope.row.length"
|
|
|
|
|
+ oninput="value=value.replace(/^(0+)|[^\d]+/g,'')"
|
|
|
></el-input>
|
|
></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</template>
|
|
</template>
|
|
@@ -131,6 +134,8 @@
|
|
|
<el-input
|
|
<el-input
|
|
|
v-model="scope.row.step"
|
|
v-model="scope.row.step"
|
|
|
placeholder="请输入"
|
|
placeholder="请输入"
|
|
|
|
|
+ :maxlength="scope.row.length"
|
|
|
|
|
+ oninput="value=value.replace(/^(0+)|[^\d]+/g,'')"
|
|
|
></el-input>
|
|
></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</template>
|
|
</template>
|
|
@@ -207,11 +212,14 @@
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ handleEdit(e) {
|
|
|
|
|
+ let value = e.replace(/^(0+)|[^\d]+/g,''); // 以0开头或者输入非数字,会被替换成空
|
|
|
|
|
+ },
|
|
|
selectionChange (selection) {
|
|
selectionChange (selection) {
|
|
|
- if (selection.length > 1) {
|
|
|
|
|
- this.$refs.multipleTable.clearSelection();
|
|
|
|
|
- this.$refs.multipleTable.toggleRowSelection(selection.pop());
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // if (selection.length > 1) {
|
|
|
|
|
+ // this.$refs.multipleTable.clearSelection();
|
|
|
|
|
+ // this.$refs.multipleTable.toggleRowSelection(selection.pop());
|
|
|
|
|
+ // }
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
settype (row, val) {
|
|
settype (row, val) {
|
|
@@ -231,13 +239,22 @@
|
|
|
_delete () {
|
|
_delete () {
|
|
|
let selection = this.getSelection();
|
|
let selection = this.getSelection();
|
|
|
if (selection.length > 0) {
|
|
if (selection.length > 0) {
|
|
|
- let itemIndex = this.form.tableData.findIndex((n) => {
|
|
|
|
|
- return n.sort == selection[0].sort;
|
|
|
|
|
- });
|
|
|
|
|
- if (itemIndex !== -1) {
|
|
|
|
|
- this.form.tableData.splice(itemIndex, 1);
|
|
|
|
|
- this.againSort();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // let itemIndex = this.form.tableData.findIndex((n) => {
|
|
|
|
|
+ // return n.sort == selection[0].sort;
|
|
|
|
|
+ // });
|
|
|
|
|
+ // if (itemIndex !== -1) {
|
|
|
|
|
+ // this.form.tableData.splice(itemIndex, 1);
|
|
|
|
|
+ // this.againSort();
|
|
|
|
|
+ // }
|
|
|
|
|
+ selection.map(item=>{
|
|
|
|
|
+ let itemIndex = this.form.tableData.findIndex((n) => {
|
|
|
|
|
+ return n.sort == item.sort;
|
|
|
|
|
+ });
|
|
|
|
|
+ if (itemIndex !== -1) {
|
|
|
|
|
+ this.form.tableData.splice(itemIndex, 1);
|
|
|
|
|
+ this.againSort();
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
}else{
|
|
}else{
|
|
|
this.$message.info('请先勾选需删除的配置项')
|
|
this.$message.info('请先勾选需删除的配置项')
|
|
|
}
|
|
}
|