|
@@ -172,7 +172,12 @@
|
|
|
<div> <el-input v-model="row.inspectionName"></el-input></div>
|
|
<div> <el-input v-model="row.inspectionName"></el-input></div>
|
|
|
</template>
|
|
</template>
|
|
|
<template v-slot:sort="{ row }">
|
|
<template v-slot:sort="{ row }">
|
|
|
- <el-input v-model="row.sort" type="number"></el-input>
|
|
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="row.sort"
|
|
|
|
|
+ type="number"
|
|
|
|
|
+ @blur="handleSortBlur"
|
|
|
|
|
+ placeholder="输入排序"
|
|
|
|
|
+ ></el-input>
|
|
|
</template>
|
|
</template>
|
|
|
<template v-slot:defaultValue="{ row }">
|
|
<template v-slot:defaultValue="{ row }">
|
|
|
<div style="width: 100%; display: flex">
|
|
<div style="width: 100%; display: flex">
|
|
@@ -455,6 +460,15 @@ export default {
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ //失去焦点自动排序
|
|
|
|
|
+ handleSortBlur() {
|
|
|
|
|
+ this.list = this.list.map(item => ({
|
|
|
|
|
+ ...item,
|
|
|
|
|
+ sort: item.sort === '' || item.sort == null ? 0 : Number(item.sort)
|
|
|
|
|
+ }));
|
|
|
|
|
+
|
|
|
|
|
+ this.list.sort((a, b) => a.sort - b.sort);
|
|
|
|
|
+ },
|
|
|
async getTnspectionPlanType() {
|
|
async getTnspectionPlanType() {
|
|
|
let res = await getByCode('inspection_plan_type');
|
|
let res = await getByCode('inspection_plan_type');
|
|
|
if (res?.code == 0) {
|
|
if (res?.code == 0) {
|