|
|
@ -1,6 +1,6 @@ |
|
|
|
<template> |
|
|
|
<div> |
|
|
|
<div class='flex' :style="{ height: tableHeight }"> |
|
|
|
<!-- :style="{ height: tableHeight }" --> |
|
|
|
<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" |
|
|
@ -9,10 +9,10 @@ |
|
|
|
<i class="el-icon-arrow-right"></i> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="flex flex-y luckysheet-wrap"> |
|
|
|
<div class="flex flex-y flex1 luckysheet-wrap"> |
|
|
|
<div class="top_btn flex flex-end"> |
|
|
|
<div> |
|
|
|
<el-button type="warning"> 自动检测</el-button> |
|
|
|
<el-button type="warning" @click="getAllTables"> 自动检测</el-button> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<el-button type="danger"> 驳回重提</el-button> |
|
|
@ -21,8 +21,6 @@ |
|
|
|
</div> |
|
|
|
<div id="luckysheet"></div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
@ -119,7 +117,7 @@ export default { |
|
|
|
|
|
|
|
uploadExcel(files) { |
|
|
|
if (files == null || files.length == 0) return alert('没有文件等待导入'); |
|
|
|
let name = files[0].name; |
|
|
|
let name = files[0].name;// |
|
|
|
let suffixArr = name.split('.'), |
|
|
|
suffix = suffixArr[suffixArr.length - 1]; |
|
|
|
debugger |
|
|
@ -143,6 +141,61 @@ export default { |
|
|
|
handelClickBack() { |
|
|
|
this.$emit('close') |
|
|
|
}, |
|
|
|
getAllTables(){ |
|
|
|
console.log(luckysheet.getAllSheets()); |
|
|
|
let currentTable = luckysheet.getAllSheets().filter(item=>item.status === '1') |
|
|
|
|
|
|
|
let arr = [ |
|
|
|
{ |
|
|
|
1:'张三1', |
|
|
|
2:'证件类型1', |
|
|
|
3:'1234', |
|
|
|
4:'456', |
|
|
|
5:'国籍', |
|
|
|
6:'性别', |
|
|
|
7:'出生日期', |
|
|
|
8:'所属社区', |
|
|
|
9:'所属网格', |
|
|
|
10:'所属小区', |
|
|
|
11:'楼栋名称', |
|
|
|
12:'单元号', |
|
|
|
13:'门牌号', |
|
|
|
14:'人房关系', |
|
|
|
15:'人户状况', |
|
|
|
16:'与户主关系', |
|
|
|
17:'民族' |
|
|
|
}, |
|
|
|
{ |
|
|
|
1:'张三12', |
|
|
|
2:'证件类型12', |
|
|
|
3:'12342', |
|
|
|
4:'4562', |
|
|
|
5:'国籍2', |
|
|
|
6:'性别2', |
|
|
|
7:'出生日期2', |
|
|
|
8:'所属社区2', |
|
|
|
9:'所属网格2', |
|
|
|
10:'所属小区2', |
|
|
|
11:'楼栋名称2', |
|
|
|
12:'单元号2', |
|
|
|
13:'门牌号2', |
|
|
|
14:'人房关系2', |
|
|
|
15:'人户状况2', |
|
|
|
16:'与户主关系2', |
|
|
|
17:'民族' |
|
|
|
} |
|
|
|
] |
|
|
|
arr.forEach((item,index)=>{ |
|
|
|
for(let k in item){ |
|
|
|
// index +1 + this.sheetR(当前表最后一个有数据的行) |
|
|
|
luckysheet.setCellValue(index+1, k - 1, item[k]) |
|
|
|
} |
|
|
|
}) |
|
|
|
// 17列 |
|
|
|
}, |
|
|
|
updataSheet(){ |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
beforeDestroy() { |
|
|
|
this.$store.state.sidebarFold = false; |
|
|
@ -154,12 +207,18 @@ export default { |
|
|
|
}; |
|
|
|
</script> |
|
|
|
<style lang="scss" scoped> |
|
|
|
.el-card { |
|
|
|
margin: 10px auto; |
|
|
|
padding: 0 16px; |
|
|
|
box-sizing: border-box; |
|
|
|
width: calc(100% - 40px); |
|
|
|
} |
|
|
|
.luckysheet-wrap { |
|
|
|
margin: 10px; |
|
|
|
padding: 0px; |
|
|
|
z-index: 2; |
|
|
|
width: calc(100% - 240px); |
|
|
|
height: calc(100% - 20px); |
|
|
|
width: calc(100vw - 400px); |
|
|
|
height: calc(100vh - 250px); |
|
|
|
} |
|
|
|
|
|
|
|
#luckysheet { |
|
|
|