|
|
@ -385,6 +385,8 @@ const vJwcodeLoadmore = { |
|
|
|
// directives.loadmore(jwcodeSelectRef.value, loadMore(rangeNumber.value)); |
|
|
|
// } |
|
|
|
// }; |
|
|
|
// 添加行数加载对象 |
|
|
|
const loading = ref(false); |
|
|
|
// 添加行数对象 |
|
|
|
const addLineObj = ref(0); |
|
|
|
//添加一行 |
|
|
@ -397,9 +399,18 @@ const addLine = function () { |
|
|
|
// 添加多行 |
|
|
|
const addLines = function () { |
|
|
|
try { |
|
|
|
for (let i = 0; i < addLineObj.value; i++) { |
|
|
|
addLine(); |
|
|
|
loading.value = true; |
|
|
|
if (loading.value) { |
|
|
|
console.log("loading===", loading.value); |
|
|
|
for (let j = 0; j < addLineObj.value; j++) { |
|
|
|
batchData.value.unshift({ |
|
|
|
line: ++i.value, |
|
|
|
showInput: true, |
|
|
|
}); |
|
|
|
} |
|
|
|
loading.value = false; |
|
|
|
} |
|
|
|
|
|
|
|
ElMessage.success("添加成功"); |
|
|
|
} catch (error) { |
|
|
|
console.log("添加失败", error); |
|
|
@ -880,7 +891,7 @@ onMounted(async function () { |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-table :data="batchData" border max-height="540px" style="height: 540px" |
|
|
|
@selection-change="handleSelectionChangebatch"> |
|
|
|
@selection-change="handleSelectionChangebatch" v-loading="loading"> |
|
|
|
<el-table-column type="selection" width="50px" /> |
|
|
|
<el-table-column property="index" label="序号" width="55px"> |
|
|
|
<template #default="scope"> |
|
|
@ -979,7 +990,7 @@ onMounted(async function () { |
|
|
|
<el-table-column property="remark" label="备注" width="130px"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-input type="textarea" v-if="scope.row.showInput" v-model="scope.row.remark" style="max-width: 90px" |
|
|
|
rows="1" cols="12"></el-input> |
|
|
|
:rows="1" cols="12"></el-input> |
|
|
|
<span v-else>{{ scope.row.remark }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|