Bläddra i källkod

增加luckysheet截图

Zt 1 år sedan
förälder
incheckning
cdf2263777

+ 1 - 1
reado-app/pages/message/index.vue

@@ -81,7 +81,7 @@
 				uni.$http.get('/messageNotice/getAllMessageNotice', this.queryParams).then(res => {
 					const data = res.data
 					if (data.code === 200) {
-						// this.msgList = data.data.messageNoticeList
+						this.msgList = data.data.messageNoticeList
 						uni.stopPullDownRefresh()
 					}
 				})

+ 6 - 6
reado-app/pages/reportForm/report-detail/index.vue

@@ -25,11 +25,11 @@
 			this.src = `/static/webview/report-wv.html?id=${this.id}`
 		},
 		onReady() {
-			setTimeout(()=>{
-			uni.setNavigationBarTitle({
-				title: this.title
-			});
-			},500)
+			setTimeout(() => {
+				uni.setNavigationBarTitle({
+					title: this.title
+				});
+			}, 500)
 		},
 		methods: {
 			//返回按钮
@@ -64,4 +64,4 @@
 		overflow: hidden;
 		text-overflow: ellipsis;
 	}
-</style>
+</style>

+ 1 - 0
reado-app/pages/reportForm/report-query.vue

@@ -95,6 +95,7 @@
 			// 打开筛选
 			openQuery() {
 				this.monthQuery = !this.monthQuery
+				this.$emit('handelDate', getLastWeek())
 			},
 			// 切换时间
 			monthChange(current) {

+ 27 - 11
reado-app/static/webview/report-wv.html

@@ -11,17 +11,19 @@
 		<link rel='stylesheet' href='../luckysheet/dist/assets/iconfont/iconfont.css' />
 		<link rel="stylesheet" href="../dist/css/layui.css">
 		<style>
-			.la-btn{
+			.la-btn {
 				position: absolute;
-				left:50%;
+				left: 50%;
 				bottom: 35px;
 				transform: translate(-50%);
-				padding:0 2%;
+				padding: 0 2%;
 			}
-			.btn{
-				width:100%;
+
+			.btn {
+				width: 100%;
 			}
-			.layui-laypage-em{
+
+			.layui-laypage-em {
 				background-color: #1e9fff !important;
 			}
 		</style>
@@ -55,6 +57,7 @@
 							if (res.code === 200) {
 								const tableData = JSON.parse(res.data.reportTableData)
 								const option = tableData.option
+								console.log(tableData)
 								if (option) {
 									option.allowEdit = false
 									tableData.showtoolbar = false
@@ -64,14 +67,30 @@
 									for (let item in data) {
 										data[item] = false
 									}
+									option.data = tableData.data
 									luckysheet.create(option)
+									printExcel()
 								}
-							}else{
+							} else {
 								layer.msg(res.msg);
 							}
 						}
 					})
 
+                    function printExcel(){
+						luckysheet.hideGridLines()
+						let imgSrc = luckysheet.getScreenshot();
+						luckysheet.showGridLines();
+						console.log(imgSrc);
+						$.ajax({
+							url: ""  ,
+							type: 'GET',
+							success: function(res) {
+								
+							}
+						})
+					}
+
 					$('#recordBtn').on('click', () => {
 						layui.use('table', function() {
 							var table = layui.table;
@@ -135,11 +154,8 @@
 						});
 					})
 				});
-
-
-
 			});
 		</script>
 
 	</body>
-</html>
+</html>