Browse Source

数据填入,表格样式微调,禁止luckysheet发送all消息

luckysheet-xiaowang-Intelligen
mk 7 months ago
parent
commit
0a9544081e
  1. 6
      public/index.html
  2. 124
      public/luckysheet/luckysheet.umd.js
  3. 4
      public/luckysheet/luckysheet.umd.js.map
  4. 4
      src/views/modules/base/smartExcel/cpts/excel-info.vue
  5. 2
      src/views/modules/base/smartExcel/cpts/excel-summary.vue
  6. 77
      src/views/modules/base/smartExcel/cpts/excel-view.vue

6
public/index.html

@ -57,12 +57,6 @@
console.log('============调试版本:1.0.3')
console.log('nodeEnv', window.SITE_CONFIG['nodeEnv'])
$.ajaxSetup({
headers: {
"Authorization": window.localStorage.token,
"token":window.localStorage.token
}
});
</script>
</head>

124
public/luckysheet/luckysheet.umd.js

File diff suppressed because one or more lines are too long

4
public/luckysheet/luckysheet.umd.js.map

File diff suppressed because one or more lines are too long

4
src/views/modules/base/smartExcel/cpts/excel-info.vue

@ -71,7 +71,7 @@
<div class="m-table">
<el-table :data="tableData" border class="m-table-item"
style="width: 70%;margin-left: 3%; margin-top: 30px;" :height="maxTableHeight">
style="width: 70%;margin-left: 3%; margin-top: 30px;" >
<el-table-column label="序号" fixed="left" type="index" align="center" width="80" />
<el-table-column prop="renwu" align="center" :show-overflow-tooltip="true" label="任务周期">
</el-table-column>
@ -87,7 +87,7 @@
</div>
</div>
<div v-if="showSummary">
<div v-if="showSummary" style="width: 100%;background: #ffffff;">
<excel-summary @close="closeSummary"></excel-summary>
</div>
<div class=''>

2
src/views/modules/base/smartExcel/cpts/excel-summary.vue

@ -12,7 +12,7 @@
</div>
<h3 class="title">提报的文件</h3>
<div class="flex-wrap flex">
<div class="item flex flex-y flex-center-deputy" v-for="(item, index) in list" @click="handleClickShowView('1878685876183793665')" :key="index">
<div class="item flex flex-y flex-center-deputy" v-for="(item, index) in list" @click="handleClickShowView('1879063358107648002')" :key="index">
<img :src="require(`@/assets/images/index/Excel.png`)" alt="">
<div class="agencyName">{{ item.title }}周期更新表</div>
<div>{{ item.state }}</div>

77
src/views/modules/base/smartExcel/cpts/excel-view.vue

@ -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 {

Loading…
Cancel
Save