From a2d0383b7a7f882c6f03fc9f3de2adc6e74559a7 Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期三, 24 七月 2024 18:52:35 +0800
Subject: [PATCH] Merge branch '2.0' of http://120.76.84.145:10101/gitblit/r/java/PlayPai into 2.0
---
cloud-server-management/src/main/webapp/static/modular/system/ball/ball.js | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 54 insertions(+), 4 deletions(-)
diff --git a/cloud-server-management/src/main/webapp/static/modular/system/ball/ball.js b/cloud-server-management/src/main/webapp/static/modular/system/ball/ball.js
index 00b5dba..d88e64c 100644
--- a/cloud-server-management/src/main/webapp/static/modular/system/ball/ball.js
+++ b/cloud-server-management/src/main/webapp/static/modular/system/ball/ball.js
@@ -29,8 +29,26 @@
{title: '市', field: 'city', visible: true, align: 'center', valign: 'middle'},
{ title: '门店名称', field: 'store', visible: true, align: 'center', valign: 'middle'},
{ title: '所属场地', field: 'site', visible: true, align: 'center', valign: 'middle'},
- { title: '蓝方设备ID', field: 'blue', visible: true, align: 'center', valign: 'middle'},
- { title: '红方设备ID', field: 'red', visible: true, align: 'center', valign: 'middle'},
+ { title: '红方设备二维码', field: 'redCode', visible: false, align: 'center', valign: 'middle'},
+ { title: '蓝方设备二维码', field: 'blueCode', visible: false, align: 'center', valign: 'middle'},
+ { title: '蓝方设备ID', field: 'blue', visible: true, align: 'center', valign: 'middle',
+ formatter: function (data,row) {
+ // row.redCode存储的设备二维码连接
+ var temp = row.blueCode;
+ var str = '<button class="btn btn-outline btn-primary" onclick="TStudent.openDetail(\'' + temp + '\')" >'+row.blue+'</button>'
+ btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="" onfocus="TUser.tooltip()">' + str + '</p>']
+ return btn;
+ }
+ },
+ { title: '红方设备ID', field: 'red', visible: true, align: 'center', valign: 'middle',
+ formatter: function (data,row) {
+ // row.redCode存储的设备二维码连接
+ var temp = row.redCode;
+ var str = '<button class="btn btn-outline btn-primary" onclick="TStudent.openDetail(\'' + temp + '\')" >'+row.red+'</button>'
+ btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="" onfocus="TUser.tooltip()">' + str + '</p>']
+ return btn;
+ }
+ },
{
title: '设备类型',
field: 'deviceType',
@@ -72,7 +90,39 @@
}
};
+TStudent.openDetail = function (e) {
+ console.log("看看")
+ console.log(e)
+ var index = layer.load(1,{
+ type: 1
+ , title: '设备二维码'
+ , area: ['100%', '100%']
+ , offset: 'auto' //具体配置参考:http://www.layui.com/doc/modules/layer.html#offset
+ , id: 'layerDemo' //防止重复弹出cge
+ , content: '<div class="form-horizontal">' +
+ ' <img src='+ e +'>' +
+ '</img>'+
+ '</div>'
+ , btn: ['关闭', '下载']
+ , btnAlign: 'c' //按钮居中
+ , shade: 0.5 //不显示遮罩
+ ,load:1
+ , yes: function () {
+ layer.closeAll();
+ },
+ btn2:function () {
+ var a = document.createElement('a');
+ a.href = e;
+ a.download = '设备二维码.jpg'; // 设置下载文件的名称
+ a.style.display = 'none';
+ document.body.appendChild(a);
+ a.click();
+ document.body.removeChild(a);
+ }
+ });
+ this.layerIndex = index;
+};
TStudent.editCoursePackageState = function (state) {
if (this.check()) {
@@ -220,8 +270,8 @@
};
TStudent.resetSearch = function () {
- $("#provinceCode").val("");
- $("#cityCode").val("");
+ $("#pCode").val("");
+ $("#cCode").val("");
$("#store").val("");
$("#site").val("");
TStudent.search();
--
Gitblit v1.7.1