|
@@ -2,17 +2,26 @@
|
|
|
* @Author : yuanrunwei
|
|
|
* @Date : 2021-12-04 14:23:58
|
|
|
* @LastEditors : yuanrunwei
|
|
|
- * @LastEditTime : 2021-12-04 16:00:20
|
|
|
+ * @LastEditTime : 2021-12-04 17:04:04
|
|
|
* @FilePath : \spfm-market-front\src\pages\main\performance\components\sheet.vue
|
|
|
-->
|
|
|
|
|
|
<template>
|
|
|
<div class="sheet-container">
|
|
|
- <el-upload action :on-change="handleChange" :show-file-list="false">
|
|
|
- <el-button size="mini" type="success" class="margin-bottom-20"
|
|
|
- >上传</el-button
|
|
|
+ <div class="flex-justify-align-end margin-bottom-20">
|
|
|
+ <el-upload
|
|
|
+ class="margin-right-10"
|
|
|
+ action
|
|
|
+ :on-change="handleChange"
|
|
|
+ :show-file-list="false"
|
|
|
>
|
|
|
- </el-upload>
|
|
|
+ <el-button type="primary">上传</el-button>
|
|
|
+ </el-upload>
|
|
|
+ <el-button type="primary">保存</el-button>
|
|
|
+ <el-button type="primary">导出</el-button>
|
|
|
+ <el-button type="primary">返回</el-button>
|
|
|
+ <el-button type="primary">全屏显示</el-button>
|
|
|
+ </div>
|
|
|
<div id="luckysheet" class="sheet-container-block"></div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -25,10 +34,16 @@ export default {
|
|
|
return {};
|
|
|
},
|
|
|
methods: {
|
|
|
- handleInit() {},
|
|
|
+ handleInit() {
|
|
|
+ const options = {
|
|
|
+ container: "luckysheet",
|
|
|
+ title: "请上传模板",
|
|
|
+ };
|
|
|
+ window.luckysheet.create(options);
|
|
|
+ },
|
|
|
handleCreate(file) {
|
|
|
luckyexcel.transformExcelToLucky(file, (export_json) => {
|
|
|
- var options = {
|
|
|
+ const options = {
|
|
|
container: "luckysheet",
|
|
|
data: export_json.sheets,
|
|
|
title: export_json.info.name,
|
|
@@ -67,13 +82,13 @@ export default {
|
|
|
<style lang="scss" scope>
|
|
|
.sheet-container {
|
|
|
position: fixed;
|
|
|
- width: 100%;
|
|
|
+ width: calc(100% - 40px);
|
|
|
height: 100%;
|
|
|
&-block {
|
|
|
overflow: hidden;
|
|
|
position: absolute;
|
|
|
- width: calc(100% - 40px);
|
|
|
- height: 80%;
|
|
|
+ width: 100%;
|
|
|
+ height: 75%;
|
|
|
}
|
|
|
}
|
|
|
</style>
|