|
@@ -1,46 +1,121 @@
|
|
|
<template>
|
|
|
<!-- 联储观察 -->
|
|
|
<div class="federal-reserve-wrap">
|
|
|
- <div class="select-box">
|
|
|
+ <div class="tool-box">
|
|
|
<el-date-picker
|
|
|
- v-model="value1"
|
|
|
+ v-model="selectDate"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
type="date"
|
|
|
- placeholder="选择日期">
|
|
|
+ placeholder="选择日期" @change="getSheetDetail">
|
|
|
</el-date-picker>
|
|
|
- </div>
|
|
|
- <div class="tool-box">
|
|
|
- <el-button>下载</el-button>
|
|
|
+ <el-button type="text" @click="downloadSheet">下载</el-button>
|
|
|
</div>
|
|
|
<div class="table-box">
|
|
|
- <!-- <Sheet
|
|
|
- v-if="sheetDetailInfo.ExcelInfoId"
|
|
|
- ref="sheetRef"
|
|
|
- :option="sheetDetailInfo.Content"
|
|
|
- :sheetInfo="{
|
|
|
- ExcelInfoId: sheetDetailInfo.ExcelInfoId,
|
|
|
- ExcelName: sheetDetailInfo.ExcelName,
|
|
|
- ExcelClassifyId: sheetDetailInfo.ExcelClassifyId,
|
|
|
- }"
|
|
|
- /> -->
|
|
|
+ <div class="sheet-wrap">
|
|
|
+ <Sheet
|
|
|
+ v-if="sheetDetailInfo.MeetingInfoId"
|
|
|
+ ref="sheetRef"
|
|
|
+ :option="sheetDetailInfo.Content"
|
|
|
+ />
|
|
|
+ <div v-else style="text-align: center;">
|
|
|
+ <tableNoData text="该日期暂无数据"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import Sheet from '@/views/datasheet_manage/components/SheetExcel.vue';
|
|
|
+import {ToolBoxInterface} from "@/api/modules/toolBoxApi.js";
|
|
|
export default {
|
|
|
components:{Sheet},
|
|
|
data() {
|
|
|
return {
|
|
|
- sheetDetailInfo:{}
|
|
|
+ sheetDetailInfo:{},
|
|
|
+ selectDate:''
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
- getSheetDetail(){}
|
|
|
+ getSheetDetail(){
|
|
|
+ if(!this.selectDate){
|
|
|
+ this.sheetDetailInfo = {}
|
|
|
+ return
|
|
|
+ }
|
|
|
+ ToolBoxInterface.getSheetDetail({
|
|
|
+ DateTime: this.selectDate||'',
|
|
|
+ }).then(res=>{
|
|
|
+ if(res.Ret!==200) return
|
|
|
+ this.sheetDetailInfo = res.Data||{};
|
|
|
+ this.$nextTick(()=>{
|
|
|
+ this.initSheet()
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ downloadSheet(){},
|
|
|
+ initSheet(){
|
|
|
+ const baseOption = this.sheetDetailInfo.Content ? JSON.parse(this.sheetDetailInfo.Content) : {}
|
|
|
+ //luckysheet配置,能隐藏的都隐藏了,并且禁止编辑
|
|
|
+ const options = {
|
|
|
+ container:'sheet-container',
|
|
|
+ lang: 'zh',
|
|
|
+ showinfobar: false,
|
|
|
+ showtoolbar:false,
|
|
|
+ showsheetbar:false,
|
|
|
+ showstatisticBar:false,
|
|
|
+ showstatisticBarConfig: {
|
|
|
+ count: false, // 计数栏
|
|
|
+ view: false, // 打印视图
|
|
|
+ zoom: true, // 缩放
|
|
|
+ },
|
|
|
+ allowCopy:false,
|
|
|
+ allowEdit:false,//不允许编辑
|
|
|
+ allowUpdate:false,
|
|
|
+ enableAddRow:false,
|
|
|
+ sheetFormulaBar:false,
|
|
|
+ showConfigWindowResize:true,
|
|
|
+ data: [{
|
|
|
+ ...baseOption,
|
|
|
+ luckysheet_select_save:[],
|
|
|
+ scrollTop: 0,
|
|
|
+ scrollLeft: 0,
|
|
|
+ }],
|
|
|
+ }
|
|
|
+ luckysheet.create(options)
|
|
|
+ document.querySelector("#luckysheet-cols-h-c").style.pointerEvents = 'none'
|
|
|
+ }
|
|
|
},
|
|
|
+ mounted(){
|
|
|
+ this.getSheetDetail()
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
-
|
|
|
+.federal-reserve-wrap{
|
|
|
+ height:calc(100vh - 120px);
|
|
|
+ background-color: #fff;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ box-sizing: border-box;
|
|
|
+ padding:30px;
|
|
|
+ .tool-box{
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ }
|
|
|
+ .table-box{
|
|
|
+ width:100%;
|
|
|
+ box-sizing: border-box;
|
|
|
+ flex: 1;
|
|
|
+ margin-top: 30px;
|
|
|
+ .sheet-wrap{
|
|
|
+ width:100%;
|
|
|
+ height: 100%;
|
|
|
+ position: relative;
|
|
|
+ /* cursor:not-allowed;
|
|
|
+ pointer-events: none; */
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|