From bbb24e3522797a1e4285958ee41b7d0ee82854fc Mon Sep 17 00:00:00 2001
From: liujie <liujie>
Date: 星期三, 26 七月 2023 09:17:54 +0800
Subject: [PATCH] 后台代码
---
/dev/null | 118 ---------------------------------------
cloud-server-management/src/main/webapp/WEB-INF/view/system/log/log.html | 2
cloud-server-management/src/main/webapp/WEB-INF/view/system/tCompetition/TCompetition.html | 42 +++++++------
cloud-server-management/src/main/resources/mapper/MenuMapper.xml | 4 -
cloud-server-management/src/main/webapp/static/modular/system/tCompetition/tCompetition.js | 0
cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/system/LoginController.java | 10 ---
cloud-server-management/src/main/webapp/static/modular/system/tCompetition/tCompetition_info.js | 0
7 files changed, 23 insertions(+), 153 deletions(-)
diff --git a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/system/LoginController.java b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/system/LoginController.java
index 250c295..789be56 100644
--- a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/system/LoginController.java
+++ b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/system/LoginController.java
@@ -82,17 +82,7 @@
Integer language = UserExt.getLanguage();
List<MenuNode> menus = menuService.getMenusByRoleIds(roleList);
List<MenuNode> titles = MenuNode.buildTitle(menus);
- if(language==1 || language==null){
- }else if(language==2){
- for (MenuNode menu : menus) {
- menu.setName(menu.getEname());
- }
- }else if(language==3){
- for (MenuNode menu : menus) {
- menu.setName(menu.getBname());
- }
- }
diff --git a/cloud-server-management/src/main/resources/mapper/MenuMapper.xml b/cloud-server-management/src/main/resources/mapper/MenuMapper.xml
index d07a4f9..2c72b60 100644
--- a/cloud-server-management/src/main/resources/mapper/MenuMapper.xml
+++ b/cloud-server-management/src/main/resources/mapper/MenuMapper.xml
@@ -150,9 +150,7 @@
m1.url as url,
m1.levels as levels,
m1.ismenu as ismenu,
- m1.num as num,
- m1.ename ename,
- m1.bname bname
+ m1.num as num
FROM
sys_menu m1
LEFT join sys_menu m2 ON m1.pcode = m2. CODE
diff --git a/cloud-server-management/src/main/webapp/WEB-INF/view/system/log/log.html b/cloud-server-management/src/main/webapp/WEB-INF/view/system/log/log.html
index f402d47..62f573b 100644
--- a/cloud-server-management/src/main/webapp/WEB-INF/view/system/log/log.html
+++ b/cloud-server-management/src/main/webapp/WEB-INF/view/system/log/log.html
@@ -25,9 +25,7 @@
</div>
<div class="hidden-xs" id="OptLogTableToolbar" role="group">
<#button name="查看详情" icon="fa-plus" clickFun="OptLog.detail()"/>
- @if(shiro.hasPermission("/log/delLog")){
<#button name="清空日志" icon="fa-plus" clickFun="OptLog.delLog()" space="true"/>
- @}
</div>
<#table id="OptLogTable"/>
</div>
diff --git a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tCompetition/TCompetition.html b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tCompetition/TCompetition.html
index b52a9fd..5cc53ab 100644
--- a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tCompetition/TCompetition.html
+++ b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tCompetition/TCompetition.html
@@ -4,52 +4,54 @@
<div class="ibox float-e-margins">
<div class="ibox-title">
- <h5>车辆管理</h5>
+ <h5>赛事管理</h5>
</div>
<div class="ibox-content">
<div class="row row-lg">
<div class="col-sm-12">
<div class="row">
<div class="col-sm-3">
- <#TimeCon id="createTime" name="添加时间" isTime="false"/>
</div>
<div class="col-sm-3">
- <#NameCon id="id" name="车辆ID" />
</div>
<div class="col-sm-3">
- <#NameCon id="brandName" name="车辆品牌" />
+ <#NameCon id="shopName" name="门店名称" />
</div>
<div class="col-sm-3">
- <#NameCon id="modelName" name="车辆类型" />
+ <#NameCon id="eventName" name="赛事名称" />
</div>
<div class="col-sm-3">
- <#NameCon id="carColor" name="车辆颜色" />
+ <#TimeCon id="createTime" name="时间" isTime="false"/>
</div>
<div class="col-sm-3">
- <#NameCon id="serverStr" name="服务模式" />
+ <#SelectCon id="state" name="状态" >
+ <option value="">全部</option>
+ <option value="1">未开始</option>
+ <option value="2">已开始</option>
+ <option value="3">已结束</option>
+ <option value="4">已取消</option>
+ </#SelectCon>
</div>
<div class="col-sm-3">
- <#NameCon id="carLicensePlate" name="车牌号" />
- </div>
- <div class="col-sm-3">
- <#NameCon id="driverName" name="关联司机" />
+ <#SelectCon id="registerCondition" name="报名条件" >
+ <option value="">全部</option>
+ <option value="1">全部用户</option>
+ <option value="2">仅限年度会员参与</option>
+ <option value="3">仅限学员参与</option>
+ </#SelectCon>
</div>
<div class="col-sm-3">
<#button name="搜索" icon="fa-search" clickFun="TCar.search()"/>
<#button name="重置" icon="fa-trash" clickFun="TCar.resetSearch()" space="true"/>
</div>
- <div class="col-sm-3">
- <input type="file" name="file" style="width:0px;height:0px;" id="uploadEventFile" onchange="TCar.exportCar()">
- </div>
</div>
<div class="hidden-xs" id="TCarTableToolbar" role="group">
<#button name="添加" icon="fa-plus" clickFun="TCar.openAddTCar()"/>
- <#button name="修改" icon="fa-edit" clickFun="TCar.openTCarDetail()" space="true"/>
- <#button name="删除" icon="fa-remove" clickFun="TCar.delete()" space="true"/>
- <#button btnCss="info" name="下载模板" id="uploadModel" icon="fa fa-level-down" clickFun="TCar.uploadCarModel()" space="true"/>
- <#button btnCss="danger" name="导入" id="uploadEventBtn" icon="fa fa-level-up" space="true"/>
- <#button name="导出" icon="fa-remove" clickFun="TCar.outCar()" space="true"/>
+ <#button name="编辑" icon="fa-edit" clickFun="TCar.openTCarDetail()" space="true"/>
+ <#button name="取消" icon="fa-remove" clickFun="TCar.delete()" space="true"/>
+ <#button name="查看详情" icon="fa-remove" clickFun="TCar.delete()" space="true"/>
+ <#button name="已报名人员" icon="fa-remove" clickFun="TCar.delete()" space="true"/>
</div>
<#table id="TCarTable"/>
@@ -59,7 +61,7 @@
</div>
</div>
</div>
-<script src="${ctxPath}/modular/system/tCar/tCar.js"></script>
+<script src="${ctxPath}/modular/system/tCompetition/tCompetition.js"></script>
<script>
laydate.render({
elem: '#createTime'
diff --git a/cloud-server-management/src/main/webapp/static/modular/system/tCompetition/carInsurance.js b/cloud-server-management/src/main/webapp/static/modular/system/tCompetition/carInsurance.js
deleted file mode 100644
index 8ffae41..0000000
--- a/cloud-server-management/src/main/webapp/static/modular/system/tCompetition/carInsurance.js
+++ /dev/null
@@ -1,123 +0,0 @@
-/**
- * 车辆管理管理初始化
- */
-var CarInsurance = {
- id: "TCarTable", //表格id
- seItem: null, //选中的条目
- table: null,
- layerIndex: -1,
- carId: $('#carId').val()
-};
-
-/**
- * 初始化表格的列
- */
-CarInsurance.initColumn = function () {
- return [
- {field: 'selectItem', radio: true},
- {title: '保险公司名称', field: 'insurCom', visible: true, align: 'center', valign: 'middle'},
- {title: '保险号', field: 'insurNum', visible: true, align: 'center', valign: 'middle'},
- {title: '保险类型', field: 'insurType', visible: true, align: 'center', valign: 'middle'},
- {title: '保险金额', field: 'insurCount', visible: true, align: 'center', valign: 'middle'},
- {title: '保险生效时间', field: 'insurEff', visible: true, align: 'center', valign: 'middle'},
- {title: '保险到期时间', field: 'insurExp', visible: true, align: 'center', valign: 'middle'}
- ];
-};
-
-/**
- * 检查是否选中
- */
-CarInsurance.check = function () {
- var selected = $('#' + this.id).bootstrapTable('getSelections');
- if(selected.length == 0){
- if(language==1){
- Feng.info("请先选中表格中的某一记录!");
- }else if(language==2){
- Feng.info("Please select a record in the table first!");
- }else {
- Feng.info("Pilih catatan di tabel terlebih dahulu!");
- }
- return false;
- }else{
- CarInsurance.seItem = selected[0];
- return true;
- }
-};
-
-/**
- * 点击添加车辆管理
- */
-CarInsurance.openAddCarInsurance = function () {
- var index = layer.open({
- type: 2,
- title: language==1?'添加':(language==2?'Add':'Tambahkan'),
- area: ['100%', '100%'], //宽高
- fix: false, //不固定
- maxmin: true,
- content: Feng.ctxPath + '/tCar/showAddCarInsurance?carId=' + CarInsurance.carId
- });
- this.layerIndex = index;
-};
-
-/**
- * 打开查看车辆管理详情
- */
-CarInsurance.openCarInsuranceDetail = function () {
- if (this.check()) {
- var index = layer.open({
- type: 2,
- title: language==1?'编辑':(language==2?'Edit':'Edit'),
- area: ['100%', '100%'], //宽高
- fix: false, //不固定
- maxmin: true,
- content: Feng.ctxPath + '/tCar/showEditCarInsurance?id=' + CarInsurance.seItem.id + "&carId=" + CarInsurance.carId
- });
- this.layerIndex = index;
- }
-};
-var language=1;
-/**
- * 删除车辆管理
- */
-CarInsurance.delete = function () {
- if (this.check()) {
- swal({
- title: "您是否确认删除?",
- text: language==1?"请谨慎操作!":(language==2?' Please operate with caution!':'Harap beroperasi dengan hati -hati!'),
- type: "warning",
- showCancelButton: true,
- confirmButtonColor: "#DD6B55",
- confirmButtonText: language==1?"删除":(language==2?'Delete':'Hapus'),
- closeOnConfirm: true
- }, function () {
- var ajax = new $ax(Feng.ctxPath + "/tCar/delCarInsurance", function (data) {
- swal("删除成功", "您已经成功删除了。", "success");
- CarInsurance.table.refresh();
- }, function (data) {
- swal("删除失败", data.responseJSON.message+"!", "warning");
- });
- ajax.set("id", CarInsurance.seItem.id);
- ajax.start();
- });
- }
-};
-
-
-/**
- * 查询车辆管理列表
- */
-CarInsurance.search = function () {
- var queryData = {};
- CarInsurance.table.refresh({query: queryData});
-};
-
-$(function () {
- var defaultColunms = CarInsurance.initColumn();
- var table = new BSTable(CarInsurance.id, "/tCar/queryInsuranceList", defaultColunms);
- table.setPaginationType("server");
- table.setQueryParams({
- carId: CarInsurance.carId
- })
- CarInsurance.table = table.init();
-});
-
diff --git a/cloud-server-management/src/main/webapp/static/modular/system/tCompetition/carInsuranceInfo.js b/cloud-server-management/src/main/webapp/static/modular/system/tCompetition/carInsuranceInfo.js
deleted file mode 100644
index 7969a43..0000000
--- a/cloud-server-management/src/main/webapp/static/modular/system/tCompetition/carInsuranceInfo.js
+++ /dev/null
@@ -1,118 +0,0 @@
-var CarInsuranceInfo = {
- id: $('#id').val(),
- carId: $('#carId').val()
-}
-
-var language=1;
-/**
- * 关闭此对话框
- */
-CarInsuranceInfo.close = function() {
- parent.layer.close(window.parent.CarInsurance.layerIndex);
-}
-
-/**
- * 提交添加
- */
-CarInsuranceInfo.addSubmit = function() {
- var insurCom = $('#insurCom').val();
- var insurNum = $('#insurNum').val();
- var insurType = $('#insurType').val();
- var insurCount = $('#insurCount').val();
- var insurEff = $('#insurEff').val();
- var insurExp = $('#insurExp').val();
- if(null == insurCom || '' == insurCom){
- Feng.error("保险公司名称不能为空");
- return;
- }
- if(null == insurNum || '' == insurNum){
- Feng.error("保险号不能为空");
- return;
- }
- if(null == insurType || '' == insurType){
- Feng.error("保险类型不能为空");
- return;
- }
- if(null == insurCount || '' == insurCount){
- Feng.error("保险金额不能为空");
- return;
- }
- if(null == insurEff || '' == insurEff){
- Feng.error("保险生效时间不能为空");
- return;
- }
- if(null == insurExp || '' == insurExp){
- Feng.error("保险到期时间不能为空");
- return;
- }
- //提交信息
- var ajax = new $ax(Feng.ctxPath + "/tCar/saveCarInsurance", function(data){
- if(language==1){
- Feng.success("添加成功!");
- }else if(language==2){
- Feng.success("Successfully added!");
- }else {
- Feng.success("Sangat berhasil ditambah!");
- }
- window.parent.CarInsurance.table.refresh();
- CarInsuranceInfo.close();
- },function(data){
- if(language==1){
- Feng.error("添加失败!" + data.responseJSON.message + "!");
- }else if(language==2){
- Feng.error("Fail to add!" + data.responseJSON.message + "!");
- }else {
- Feng.error("Gagal menambah!" + data.responseJSON.message + "!");
- }
- });
- ajax.set(this.tCarInfoData);
- ajax.setData({
- id: CarInsuranceInfo.id,
- carId: CarInsuranceInfo.carId,
- insurCom: insurCom,
- insurNum: insurNum,
- insurType: insurType,
- insurCount: insurCount,
- insurEff: insurEff,
- insurExp: insurExp
- })
- ajax.start();
-}
-
-/**
- * 提交修改
- */
-CarInsuranceInfo.queryInfo = function() {
-//提交信息
- var ajax = new $ax(Feng.ctxPath + "/tCar/queryCarInsurance", function(data){
- var s = data.data;
- $('#insurCom').val(s.insurCom);
- $('#insurNum').val(s.insurNum);
- $('#insurType').val(s.insurType);
- $('#insurCount').val(s.insurCount);
- $('#insurEff').val(s.insurEff.split(" ")[0]);
- $('#insurExp').val(s.insurExp.split(" ")[0]);
- },function(data){
- if(language==1){
- Feng.error("修改失败!" + data.responseJSON.message + "!");
- }else if(language==2){
- Feng.error("Fail to modify!" + data.responseJSON.message + "!");
- }else {
- Feng.error("Gagal mengubah!" + data.responseJSON.message + "!");;
- }
- });
- ajax.set(this.tCarInfoData);
- ajax.setData({
- id: CarInsuranceInfo.id
- })
- ajax.start();
-
-}
-
-$(function() {
- if(CarInsuranceInfo.id != ''){
- CarInsuranceInfo.queryInfo()
- }
-});
-
-
diff --git a/cloud-server-management/src/main/webapp/static/modular/system/tCompetition/tCar.js b/cloud-server-management/src/main/webapp/static/modular/system/tCompetition/tCompetition.js
similarity index 100%
rename from cloud-server-management/src/main/webapp/static/modular/system/tCompetition/tCar.js
rename to cloud-server-management/src/main/webapp/static/modular/system/tCompetition/tCompetition.js
diff --git a/cloud-server-management/src/main/webapp/static/modular/system/tCompetition/tCar_info.js b/cloud-server-management/src/main/webapp/static/modular/system/tCompetition/tCompetition_info.js
similarity index 100%
rename from cloud-server-management/src/main/webapp/static/modular/system/tCompetition/tCar_info.js
rename to cloud-server-management/src/main/webapp/static/modular/system/tCompetition/tCompetition_info.js
--
Gitblit v1.7.1