Commit b53f790c authored by lenovo's avatar lenovo

历史模块添加详情

parent a38a80e4
...@@ -98,9 +98,30 @@ ...@@ -98,9 +98,30 @@
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.pageSize"
@pagination="getList" @pagination="getList"
/> />
<div id="luckysheet" :style="{ position: positionValue, top: '0', left: '0', right: '0', bottom: '0' }"></div>
</div> </div>
</template> </template>
<style>
#luckysheet_info_detail_title {
display: none;
}
#luckysheet_info_detail_update {
display: none;
}
#luckysheet_info_detail_save {
display: none;
}
.luckysheet-share-logo {
display: none;
}
</style>
<script> <script>
import { listHistorydata, getHistorydata, delHistorydata, addHistorydata, updateHistorydata, exportHistorydata } from "@/api/system/historydata"; import { listHistorydata, getHistorydata, delHistorydata, addHistorydata, updateHistorydata, exportHistorydata } from "@/api/system/historydata";
import Editor from '@/components/Editor'; import Editor from '@/components/Editor';
...@@ -115,7 +136,9 @@ export default { ...@@ -115,7 +136,9 @@ export default {
}, },
data() { data() {
return { return {
// 遮罩层 positionValue: 'static',
// 遮罩层
loading: true, loading: true,
// 选中数组 // 选中数组
ids: [], ids: [],
...@@ -155,7 +178,14 @@ export default { ...@@ -155,7 +178,14 @@ export default {
}, },
created() { created() {
this.getList(); this.getList();
this.positionValue = "static";
}, },
mounted() {
window.handleReturnButtonClick = this.handleReturnButtonClick;
},
methods: { methods: {
/** 查询 历史数据列表 */ /** 查询 历史数据列表 */
getList() { getList() {
...@@ -241,29 +271,24 @@ export default { ...@@ -241,29 +271,24 @@ export default {
}); });
}, },
handleDetails(row) { handleDetails(row) {
getHistorydata(row.id).then(response => {
this.TemplateId = response.rows;
this.luckyLook();
})
},
/**展示详情luckysheet */
luckyLook() {
this.positionValue = 'absolute'; this.positionValue = 'absolute';
luckysheet.destroy(); luckysheet.destroy();
luckysheet.create({ luckysheet.create({
container: "luckysheet", // Luckysheet 的容器元素 ID container: "luckysheet", // Luckysheet 的容器元素 ID
title: this.TemplateId[0].historyName, // Excel 文件名 title: row.historyName, // Excel 文件名
data: JSON.parse(this.TemplateId[0].historyContent), // Excel 数据 data: JSON.parse(row.historyContent), // Excel 数据
showtoolbar: false, //是否第二列显示工具栏 showtoolbar: false, //是否第二列显示工具栏
showinfobar: true, //是否显示顶部名称栏 showinfobar: true, //是否显示顶部名称栏
showsheetbar: false, //是否显示底部表格名称区域 showsheetbar: false, //是否显示底部表格名称区域
pointEdit: false, //是否是编辑器插入表格模式 pointEdit: false, //是否是编辑器插入表格模式
pointEditUpdate: null, //编辑器表格更新函数 pointEditUpdate: null, //编辑器表格更新函数
allowEdit: false,//作用:是否允许前台编辑 allowEdit: false,//作用:是否允许前台编辑
functionButton: '<button id="exportButton" class="btn btn-primary" style=" padding:3px 6px; font-size: 16px;width: 100px;height: 27px; margin-right: 85px;" onclick="handleReturnButtonClick()">返回</button>', functionButton: '<button id="exportButton" class="btn btn-primary" style=" padding:3px 6px; font-size: 16px;width: 100px;height: 27px; margin-right: 85px;" onclick="handleReturnButtonClick()">返回</button>',
});
}, });
},
/**详情返回按钮 */ /**详情返回按钮 */
handleReturnButtonClick() { handleReturnButtonClick() {
this.positionValue = 'static'; this.positionValue = 'static';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment