|
|
@ -3,8 +3,8 @@ |
|
|
|
<div class='flex el-card'> |
|
|
|
<div class="left_menu flex flex-y"> |
|
|
|
<el-button type="text" round @click="handelClickBack" icon="el-icon-back">返回</el-button> |
|
|
|
<div :class="{ 'menu_item': true, 'active': menuActive === index }" v-for="(item, index) in menuList" |
|
|
|
:key="index" @click="handleClickMenu(index)"> |
|
|
|
<div :class="{ 'menu_item': true, 'active': menuActive === index }" v-for="(item, index) in menuList" :key="index" |
|
|
|
@click="handleClickMenu(index)"> |
|
|
|
<span>{{ item.name }}</span> |
|
|
|
<i class="el-icon-arrow-right"></i> |
|
|
|
</div> |
|
|
@ -142,9 +142,19 @@ export default { |
|
|
|
this.$emit('close') |
|
|
|
}, |
|
|
|
getAllTables() { |
|
|
|
console.log(luckysheet.getAllSheets()); |
|
|
|
let currentTable = luckysheet.getAllSheets().filter(item=>item.status === '1') |
|
|
|
|
|
|
|
let list = luckysheet.getAllSheets() |
|
|
|
let currentTable = list.filter(item => item.status == '1') |
|
|
|
const findFirstAllNullIndex = (arr) => { |
|
|
|
return arr.findIndex(subArray => Array.isArray(subArray) && subArray.every(item => item === null)); |
|
|
|
}; |
|
|
|
this.sheetR = findFirstAllNullIndex(currentTable[0].data) |
|
|
|
if(this.sheetR != -1){ |
|
|
|
this.updataSheet() |
|
|
|
}else{ |
|
|
|
luckysheet.insertRow(currentTable[0].data.length,5) |
|
|
|
} |
|
|
|
}, |
|
|
|
updataSheet() { |
|
|
|
let arr = [ |
|
|
|
{ |
|
|
|
1: '张三1', |
|
|
@ -188,13 +198,9 @@ export default { |
|
|
|
arr.forEach((item, index) => { |
|
|
|
for (let k in item) { |
|
|
|
// index +1 + this.sheetR(当前表最后一个有数据的行) |
|
|
|
luckysheet.setCellValue(index+1, k - 1, item[k]) |
|
|
|
luckysheet.setCellValue(index+this.sheetR, k - 1, item[k]) |
|
|
|
} |
|
|
|
}) |
|
|
|
// 17列 |
|
|
|
}, |
|
|
|
updataSheet(){ |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
beforeDestroy() { |
|
|
@ -213,6 +219,7 @@ export default { |
|
|
|
box-sizing: border-box; |
|
|
|
width: calc(100% - 40px); |
|
|
|
} |
|
|
|
|
|
|
|
.luckysheet-wrap { |
|
|
|
margin: 10px; |
|
|
|
padding: 0px; |
|
|
|