From 8877d5f9698316ac2e5356669311c697f61d9719 Mon Sep 17 00:00:00 2001 From: dshclm <3321914460@qq.com> Date: Fri, 31 May 2024 08:44:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B6=89=E5=AF=86=E4=BA=BA=E5=91=98=E5=9F=B9?= =?UTF-8?q?=E8=AE=AD=E4=BF=AE=E6=94=B9=E5=9C=B0=E5=8C=BA=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/static/ruoyi/js/ry-ui.js | 16 ++--- .../templates/system/train/detail.html | 61 +++++++++++++++++-- .../templates/system/train/examine.html | 58 +++++++++++++++++- .../templates/system/train/train.html | 37 ++++++++++- 4 files changed, 154 insertions(+), 18 deletions(-) diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js index b2b2d16..52cd5dc 100644 --- a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js +++ b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js @@ -94,7 +94,7 @@ var table = { pagination: options.pagination, // 是否显示分页(*) paginationLoop: options.paginationLoop, // 是否启用分页条无限循环的功能 pageNumber: 1, // 初始化加载第一页,默认第一页 - pageSize: options.pageSize, // 每页的记录行数(*) + pageSize: options.pageSize, // 每页的记录行数(*) pageList: options.pageList, // 可供选择的每页的行数(*) firstLoad: options.firstLoad, // 是否首次请求加载数据,对于数据较大可以配置false escape: options.escape, // 转义HTML字符串 @@ -155,7 +155,7 @@ var table = { // 获取实例ID,如存在多个返回#id1,#id2 delimeter分隔符 getOptionsIds: function(separator) { var _separator = $.common.isEmpty(separator) ? "," : separator; - var optionsIds = ""; + var optionsIds = ""; $.each(table.config, function(key, value){ optionsIds += "#" + key + _separator; }); @@ -173,7 +173,7 @@ var table = { isAsc: params.order }; var currentId = $.common.isEmpty(table.options.formId) ? $('form').attr('id') : table.options.formId; - return $.extend(curParams, $.common.formToJSON(currentId)); + return $.extend(curParams, $.common.formToJSON(currentId)); }, // 请求获取数据后处理回调函数 responseHandler: function(res) { @@ -884,9 +884,9 @@ var table = { }, // 弹出层指定参数选项 openOptions: function (options) { - var _url = $.common.isEmpty(options.url) ? "/404.html" : options.url; - var _title = $.common.isEmpty(options.title) ? "系统窗口" : options.title; - var _width = $.common.isEmpty(options.width) ? "800" : options.width; + var _url = $.common.isEmpty(options.url) ? "/404.html" : options.url; + var _title = $.common.isEmpty(options.title) ? "系统窗口" : options.title; + var _width = $.common.isEmpty(options.width) ? "800" : options.width; var _height = $.common.isEmpty(options.height) ? ($(window).height() - 50) : options.height; var _btn = [' 确认', ' 关闭']; // 如果是移动端,就使用自适应大小弹窗 @@ -1055,7 +1055,7 @@ var table = { width: width, height: height, url: _url, - skin: 'layui-layer-gray', + skin: 'layui-layer-gray', btn: ['关闭'], yes: function (index, layero) { $.modal.close(index); @@ -1778,4 +1778,4 @@ modal_status = { SUCCESS: "success", FAIL: "error", WARNING: "warning" -}; \ No newline at end of file +}; diff --git a/ruoyi-admin/src/main/resources/templates/system/train/detail.html b/ruoyi-admin/src/main/resources/templates/system/train/detail.html index 8abd419..e829d9c 100644 --- a/ruoyi-admin/src/main/resources/templates/system/train/detail.html +++ b/ruoyi-admin/src/main/resources/templates/system/train/detail.html @@ -6,19 +6,29 @@ -
+
- +
- +
@@ -110,6 +120,49 @@ $("input[name='trainState']").val(item.dictLabel); } }) + var app = new Vue({ + el: '#app', + data: { + CityList: [], + AreaList:[], + City:[[${tdTrain.AREAID}]], + Area:[[${tdTrain.FRAMEWORK}]], + params:{ + parentId:'', + } + }, + mounted(){ + // 初始化地市列表 + this.getCityList(); + if (this.City){ + this.getAreaList() + } + }, + methods:{ + getCityList(){ + $.ajax({ + url: ctx + "system/area/getSysAreaList", + type: 'GET', + data:this.params , + success:((res)=>{ + this.CityList = res.data + }) , + }); + }, + getAreaList(){ + this.params.parentId = this.City + $.ajax({ + url: ctx + "system/area/getSysAreaList", + type: 'GET', + data:this.params, + success:((res)=>{ + this.AreaList = res.data + }) , + }); + } + } + }) + $("input[name='trainDate']").datetimepicker({ format: "yyyy-mm-dd", minView: "month", @@ -135,4 +188,4 @@ }); - \ No newline at end of file + diff --git a/ruoyi-admin/src/main/resources/templates/system/train/examine.html b/ruoyi-admin/src/main/resources/templates/system/train/examine.html index 2b88db8..dc70ad8 100644 --- a/ruoyi-admin/src/main/resources/templates/system/train/examine.html +++ b/ruoyi-admin/src/main/resources/templates/system/train/examine.html @@ -6,19 +6,29 @@ -
+
- +
- +
@@ -105,6 +115,48 @@ $("input[name='trainState']").val(item.dictLabel); } }) + var app = new Vue({ + el: '#app', + data: { + CityList: [], + AreaList:[], + City:[[${tdTrain.AREAID}]], + Area:[[${tdTrain.FRAMEWORK}]], + params:{ + parentId:'', + } + }, + mounted(){ + // 初始化地市列表 + this.getCityList(); + if (this.City){ + this.getAreaList() + } + }, + methods:{ + getCityList(){ + $.ajax({ + url: ctx + "system/area/getSysAreaList", + type: 'GET', + data:this.params , + success:((res)=>{ + this.CityList = res.data + }) , + }); + }, + getAreaList(){ + this.params.parentId = this.City + $.ajax({ + url: ctx + "system/area/getSysAreaList", + type: 'GET', + data:this.params, + success:((res)=>{ + this.AreaList = res.data + }) , + }); + } + } + }) var prefix = ctx + "system/train"; $("#form-train-examine").validate({ focusCleanup: true diff --git a/ruoyi-admin/src/main/resources/templates/system/train/train.html b/ruoyi-admin/src/main/resources/templates/system/train/train.html index 084a437..a99864a 100644 --- a/ruoyi-admin/src/main/resources/templates/system/train/train.html +++ b/ruoyi-admin/src/main/resources/templates/system/train/train.html @@ -4,7 +4,7 @@ -
+
@@ -15,8 +15,13 @@
  • - - + +
  • @@ -202,6 +207,32 @@ var url = prefix + '/examine/' + id; $.modal.open("涉密人员培训审核", url); } + var app = new Vue({ + el: '#app', + data: { + CityList: [], + City:'', + params:{ + parentId:'', + } + }, + mounted(){ + // 初始化地市列表 + this.getCityList(); + }, + methods:{ + getCityList(){ + $.ajax({ + url: ctx + "system/area/getSysAreaList", + type: 'GET', + data:this.params , + success:((res)=>{ + this.CityList = res.data + }) , + }); + }, + } + })