From 63116158434214f23d1318f54b78de1d0f47ab4e Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期三, 15 五月 2024 15:28:39 +0800
Subject: [PATCH] Merge branch 'master' of http://114.132.189.42:9002/r/center-lims-before into master
---
src/components/tool/excel.vue | 125 +++++++++++++++++++++++++----------------
1 files changed, 75 insertions(+), 50 deletions(-)
diff --git a/src/components/tool/excel.vue b/src/components/tool/excel.vue
index ece94a6..2c4027e 100644
--- a/src/components/tool/excel.vue
+++ b/src/components/tool/excel.vue
@@ -10,7 +10,7 @@
}
</style>
<style>
- #luckysheet .save{
+ #luckysheet .save {
width: 50px;
height: 26px;
color: #fff;
@@ -20,11 +20,11 @@
cursor: pointer;
}
- #luckysheet .save:hover{
+ #luckysheet .save:hover {
opacity: .8;
}
- #luckysheet .save:active{
+ #luckysheet .save:active {
opacity: .7;
}
</style>
@@ -33,12 +33,12 @@
</template>
<script>
-// import { data } from 'jquery';
+import { data } from 'jquery';
+ // import { data } from 'jquery';
export default {
- props: ['data','title'],
+ props: ['data', 'execlTitle'],
data() {
- return {
- }
+ return {}
},
mounted() {
this.$nextTick(() => {
@@ -47,50 +47,75 @@
},
methods: {
templateWrite() {
- if(this.data!=null&&this.data!=''){
- let option = JSON.parse(this.data)
- option.title = this.title
- luckysheet.create(option)
- }else{
- $(function() {
- //閰嶇疆椤�
- var options = {
- container: 'luckysheet',
- title: this.title,
- lang: "zh",
- showsheetbar: false,
- showstatisticBarConfig: {
- view: false
- },
- data: [{
- name: '妯℃澘',
- order: '0'
- }],
- enableAddRow: false,
- row: 60,
- column: 26,
- enableAddBackTop: false,
- showtoolbarConfig: {
- chart: false, // '鍥捐〃'
- pivotTable: false, //'鏁版嵁閫忚琛�'
- protection:false, // '宸ヤ綔琛ㄤ繚鎶�'
- },
- cellRightClickConfig: {
- copyAs: false, // 澶嶅埗涓�
- hideRow: false, // 闅愯棌閫変腑琛屽拰鏄剧ず閫変腑琛�
- hideColumn: false, // 闅愯棌閫変腑鍒楀拰鏄剧ず閫変腑鍒�
- sort: false, // 鎺掑簭閫夊尯
- filter: false, // 绛涢�夐�夊尯
- chart: false, // 鍥捐〃鐢熸垚
- image: false, // 鎻掑叆鍥剧墖
- matrix: false, // 鐭╅樀鎿嶄綔閫夊尯
- },
- myFolderUrl: 'http://127.0.0.1/',
- functionButton: '<button onClick="excelClosed()" class="save">淇濆瓨</button>'
- }
- luckysheet.create(options)
- })
+ var option = {}
+ if (this.data != null && this.data != '') {
+ option = JSON.parse(this.data)
+ } else {
+ let rowlen = {}
+ let columnlen = {}
+ for(let a = 0; a<60; a++){
+ rowlen[''+a] = 40
+ }
+ for(let a = 0; a<26; a++){
+ columnlen[''+a] = 100
+ }
+ option = {
+ data: [{
+ name: '妯℃澘',
+ order: '0',
+ config: {
+ rowlen: rowlen,
+ columnlen: columnlen
+ }
+ }],
+ row: 60,
+ column: 26
+ }
}
+ option.title = this.execlTitle
+ option.container = 'luckysheet',
+ option.lang = "zh",
+ option.showsheetbar = false,
+ option.defaultFontSize = 14
+ option.showstatisticBarConfig = {
+ view: false
+ },
+ option.enableAddRow = false,
+ option.enableAddBackTop = false,
+ option.showtoolbarConfig = {
+ chart: false, // '鍥捐〃'
+ pivotTable: false, //'鏁版嵁閫忚琛�'
+ protection: false, // '宸ヤ綔琛ㄤ繚鎶�'
+ dataVerification: false, // '鏁版嵁楠岃瘉'
+ frozenMode: false, // '鍐荤粨鏂瑰紡'
+ currencyFormat: false, //璐у竵鏍煎紡
+ percentageFormat: true, //鐧惧垎姣旀牸寮�
+ numberDecrease: true, // '鍑忓皯灏忔暟浣嶆暟'
+ numberIncrease: true, // '澧炲姞灏忔暟浣嶆暟
+ moreFormats: true, // '鏇村鏍煎紡'
+ strikethrough: false, // '鍒犻櫎绾� (Alt+Shift+5)'
+ underline: false, // '涓嬪垝绾� (Alt+Shift+6)'
+ italic: false, // '鏂滀綋 (Ctrl+I)'
+ textWrapMode: true, // '鎹㈣鏂瑰紡'
+ textRotateMode: false, // '鏂囨湰鏃嬭浆鏂瑰紡'
+ conditionalFormat: false, // '鏉′欢鏍煎紡'
+ splitColumn: false, // '鍒嗗垪'
+ },
+ option.cellRightClickConfig = {
+ copyAs: false, // 澶嶅埗涓�
+ hideRow: false, // 闅愯棌閫変腑琛屽拰鏄剧ず閫変腑琛�
+ hideColumn: false, // 闅愯棌閫変腑鍒楀拰鏄剧ず閫変腑鍒�
+ sort: false, // 鎺掑簭閫夊尯
+ filter: false, // 绛涢�夐�夊尯
+ chart: false, // 鍥捐〃鐢熸垚
+ image: false, // 鎻掑叆鍥剧墖
+ matrix: false, // 鐭╅樀鎿嶄綔閫夊尯
+ data: false, // 鏁版嵁楠岃瘉
+ cellFormat: false // 璁剧疆鍗曞厓鏍兼牸寮�
+ },
+ option.myFolderUrl = this.LOCATIONVUE + '/',
+ option.functionButton = '<button onClick="excelClosed()" class="save">淇濆瓨</button>'
+ luckysheet.create(option)
}
}
}
--
Gitblit v1.9.3