From add2d28c3aeccfe57338c439967abbb83117b20e Mon Sep 17 00:00:00 2001
From: liujie <liujie>
Date: 星期二, 17 十月 2023 09:56:55 +0800
Subject: [PATCH] 修改bug
---
cloud-server-management/src/main/webapp/static/modular/system/ball/ball.js | 87 ++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 84 insertions(+), 3 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 b8d838d..9f402bf 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
@@ -14,8 +14,17 @@
TStudent.initColumn = function () {
return [
{field: 'selectItem', radio: true},
- {title: '主键', field: 'id', visible: false, align: 'center', valign: 'middle'},
- {title: '所属运营商', field: 'operation', visible: true, align: 'center', valign: 'middle'},
+ {title: '序号', field: 'id', visible: true, align: 'center', valign: 'middle'},
+ {
+ title: '所属运营商', field: 'operation', visible: true, align: 'center', valign: 'middle',
+ formatter: function(value, row, index) {
+ if (value === null) {
+ return '平台';
+ } else {
+ return value;
+ }
+ }
+ },
{title: '省', field: 'province', visible: true, align: 'center', valign: 'middle'},
{title: '市', field: 'city', visible: true, align: 'center', valign: 'middle'},
{ title: '门店名称', field: 'store', visible: true, align: 'center', valign: 'middle'},
@@ -23,7 +32,18 @@
{ title: '设备ID', field: 'blue', visible: true, align: 'center', valign: 'middle'},
{ title: '设备类型', field: 'red', visible: true, align: 'center', valign: 'middle'},
{ title: '设备类型', field: 'red', visible: true, align: 'center', valign: 'middle'},
- { title: '状态', field: 'state', visible: true, align: 'center', valign: 'middle'}
+ {
+ title: '状态', field: 'state', visible: true, align: 'center', valign: 'middle',
+ formatter: function(value, row, index) {
+ if (value === 0) {
+ return '开启';
+ } else if (value === 1) {
+ return '关闭';
+ } else {
+ return '';
+ }
+ }
+ }
];
@@ -43,6 +63,38 @@
}
};
+
+
+TStudent.editCoursePackageState = function (state) {
+ if (this.check()) {
+
+ if(TStudent.seItem.state == state){
+ Feng.error("不能重复操作");
+ return
+ }
+ parent.layer.confirm(state == 1 ? '是否开启' : "是否关闭" , {
+ btn: ['确定', '取消']
+ }, function (index) {
+ let ajax = new $ax(Feng.ctxPath + "/ball/editCoursePackageState", function (data) {
+ Feng.success(state == 1 ? '开启' : "关闭" + "成功!");
+ TStudent.table.refresh();
+ }, function (data) {
+ Feng.error(state == 1 ? '开启' : "关闭" + "失败!" + data.responseJSON.message + "!");
+ });
+ ajax.set("id", TStudent.seItem.id);
+ ajax.set("state", state);
+ ajax.start();
+ parent.layer.close(index);
+
+ }, function (index) {
+ parent.layer.close(index);
+ }
+
+
+ )
+
+ }
+};
/**
* 点击添加
*/
@@ -75,6 +127,35 @@
}
};
+TStudent.openTStudentDetail3 = function () {
+ if (this.check()) {
+ var index = layer.open({
+ type: 2,
+ title: '详情',
+ area: ['100%', '100%'], //宽高
+ fix: false, //不固定
+ maxmin: true,
+ content: Feng.ctxPath + '/ball/pre_info/' + TStudent.seItem.id
+ });
+ this.layerIndex = index;
+ }
+};
+
+
+TStudent.openTStudentDetail5 = function () {
+ if (this.check()) {
+ var index = layer.open({
+ type: 2,
+ title: '详情',
+ area: ['100%', '100%'], //宽高
+ fix: false, //不固定
+ maxmin: true,
+ content: Feng.ctxPath + '/gameData'
+ });
+ this.layerIndex = index;
+ }
+};
+
/**
* 打开详情
--
Gitblit v1.7.1