From ed0db3cce12c2e3e46e5ffb7d27f44f842b07f38 Mon Sep 17 00:00:00 2001 From: dshclm <3321914460@qq.com> Date: Fri, 31 May 2024 10:51:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E5=9C=B0=E5=8C=BA=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/fileprovide/filenum/filenum.html | 68 ++++++++++++++-- .../system/fileprovide/filenum/print.html | 15 +++- .../system/network/networknum/networknum.html | 78 +++++++++++++++++-- .../system/network/networknum/print.html | 15 +++- .../system/property/propertynum/print.html | 18 ++++- .../property/propertynum/propertynum.html | 73 +++++++++++++++-- 6 files changed, 240 insertions(+), 27 deletions(-) diff --git a/ruoyi-admin/src/main/resources/templates/system/fileprovide/filenum/filenum.html b/ruoyi-admin/src/main/resources/templates/system/fileprovide/filenum/filenum.html index f7946f0..6b210af 100644 --- a/ruoyi-admin/src/main/resources/templates/system/fileprovide/filenum/filenum.html +++ b/ruoyi-admin/src/main/resources/templates/system/fileprovide/filenum/filenum.html @@ -4,7 +4,7 @@ -
+
@@ -22,8 +22,13 @@
  • - - + +
  • @@ -54,7 +59,15 @@ var instancyExtentDatas = [[${@dict.getType('sys_file_jinjichengdu')}]]; var fileSecretDatas = [[${@dict.getType('sys_file_miji')}]]; var prefix = ctx + "system/filenum"; - + let datas = [] + $.ajax({ + url: ctx + "system/area/getAllList", + type: 'GET', + data:{parentId:''} , + success:((res)=>{ + datas = res.data + }) , + }); $(function() { var options = { url: prefix + "/list", @@ -96,7 +109,10 @@ }, { field: 'frameworkId', - title: '所属地区' + title: '所属地区', + formatter: function(value, row, index) { + return getCity(datas, value) + } }, { field: 'fileSecret', @@ -117,6 +133,48 @@ }; $.table.init(options); }); + var app = new Vue({ + el: '#app', + data: { + CityList: [], + AreaList:[], + City:'', + Area:'', + 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 + }) , + }); + } + } + }) function print(netId) { var url = prefix + '/print/' + netId; $.modal.openTab("打印", url); diff --git a/ruoyi-admin/src/main/resources/templates/system/fileprovide/filenum/print.html b/ruoyi-admin/src/main/resources/templates/system/fileprovide/filenum/print.html index 9de122b..3cf7629 100644 --- a/ruoyi-admin/src/main/resources/templates/system/fileprovide/filenum/print.html +++ b/ruoyi-admin/src/main/resources/templates/system/fileprovide/filenum/print.html @@ -703,7 +703,7 @@ + collapse;table-layout:fixed;width:770pt;margin: auto' id="app"> @@ -728,10 +728,10 @@ - -
    文件数量
    + [[${tdFileProvide.frameworkId}]] + [[${tdFileProvide.areaid}]] @@ -770,6 +770,15 @@ function printPage() { window.print(); } + $.ajax({ + url: ctx + "system/area/getAllList", + type: 'GET', + data:{parentId:''} , + success:((res)=>{ + document.querySelector('.frameworkId').innerHTML = getCity(res.data,[[${tdFileProvide.frameworkId}]]) + document.querySelector('.areaid').innerHTML = getCity(res.data,[[${tdFileProvide.areaid}]]) + }) , + }); function conversionDate(date){ var year = date.getFullYear(); var month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从 0 开始,需要加 1 diff --git a/ruoyi-admin/src/main/resources/templates/system/network/networknum/networknum.html b/ruoyi-admin/src/main/resources/templates/system/network/networknum/networknum.html index aeae0fd..3d4e5ef 100644 --- a/ruoyi-admin/src/main/resources/templates/system/network/networknum/networknum.html +++ b/ruoyi-admin/src/main/resources/templates/system/network/networknum/networknum.html @@ -4,7 +4,7 @@ -
    +
    @@ -12,11 +12,21 @@
    • - +
    • - +
    • @@ -52,7 +62,15 @@ var listFlag = [[${@permission.hasPermi('system:network:list')}]]; var netMijiDatas = [[${@dict.getType('sys_file_miji')}]]; var prefix = ctx + "system/networknum"; - + let datas = [] + $.ajax({ + url: ctx + "system/area/getAllList", + type: 'GET', + data:{parentId:''} , + success:((res)=>{ + datas = res.data + }) , + }); $(function() { var options = { url: prefix + "/list", @@ -68,11 +86,17 @@ }, { field: 'framework', - title: '所属市州' + title: '所属市州', + formatter: function(value, row, index) { + return getCity(datas, value) + } }, { field: 'area', - title: '所属区县' + title: '所属区县', + formatter: function(value, row, index) { + return getCity(datas, value) + } }, { field: 'netDepart', @@ -113,6 +137,48 @@ }; $.table.init(options); }); + var app = new Vue({ + el: '#app', + data: { + CityList: [], + AreaList:[], + City:'', + Area:'', + 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 + }) , + }); + } + } + }) function print(netId) { var url = prefix + '/print/' + netId; $.modal.openTab("打印", url); diff --git a/ruoyi-admin/src/main/resources/templates/system/network/networknum/print.html b/ruoyi-admin/src/main/resources/templates/system/network/networknum/print.html index 35b9a2d..54f1404 100644 --- a/ruoyi-admin/src/main/resources/templates/system/network/networknum/print.html +++ b/ruoyi-admin/src/main/resources/templates/system/network/networknum/print.html @@ -1617,7 +1617,7 @@ + collapse;table-layout:fixed;width:765pt;margin: auto;' id="app"> @@ -1638,9 +1638,9 @@ - + - + @@ -1689,6 +1689,15 @@ function printPage() { window.print(); } + $.ajax({ + url: ctx + "system/area/getAllList", + type: 'GET', + data:{parentId:''} , + success:((res)=>{ + document.querySelector('.framework').innerHTML = getCity(res.data,[[${tdPropertyNet.framework}]]) + document.querySelector('.area').innerHTML = getCity(res.data,[[${tdPropertyNet.area}]]) + }) , + }); function conversionDate(date){ var year = date.getFullYear(); var month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从 0 开始,需要加 1 diff --git a/ruoyi-admin/src/main/resources/templates/system/property/propertynum/print.html b/ruoyi-admin/src/main/resources/templates/system/property/propertynum/print.html index 4f628a2..e5ecc88 100644 --- a/ruoyi-admin/src/main/resources/templates/system/property/propertynum/print.html +++ b/ruoyi-admin/src/main/resources/templates/system/property/propertynum/print.html @@ -712,7 +712,7 @@
      所属地市[[${tdPropertyNet.framework}]] 所属区县[[${tdPropertyNet.area}]] 使用单位 [[${tdPropertyNet.netDepart}]]
      + collapse;table-layout:fixed;width:768pt;margin: 0 auto;' id="app"> @@ -733,9 +733,9 @@ - + - + @@ -810,7 +810,17 @@ } }); }); - console.log(document.querySelector('#djid').innerHTML) + setTimeout(()=>{ + $.ajax({ + url: ctx + "system/area/getAllList", + type: 'GET', + data:{parentId:''} , + success:((res)=>{ + document.querySelector('.part').innerHTML = getCity(res.data,[[${tdPropertyManager.part}]]) + document.querySelector('.area').innerHTML = getCity(res.data,[[${tdPropertyManager.areaId}]]) + }) , + }); + },500) diff --git a/ruoyi-admin/src/main/resources/templates/system/property/propertynum/propertynum.html b/ruoyi-admin/src/main/resources/templates/system/property/propertynum/propertynum.html index 13b516b..7fc61a9 100644 --- a/ruoyi-admin/src/main/resources/templates/system/property/propertynum/propertynum.html +++ b/ruoyi-admin/src/main/resources/templates/system/property/propertynum/propertynum.html @@ -4,7 +4,7 @@ -
      +
      @@ -19,8 +19,13 @@
    • - - + +
    •  搜索 @@ -47,7 +52,57 @@ var removeFlag = [[${@permission.hasPermi('system:property:remove')}]]; var listFlag = [[${@permission.hasPermi('system:property:list')}]]; var prefix = ctx + "system/propertynum"; - + let datas = [] + $.ajax({ + url: ctx + "system/area/getAllList", + type: 'GET', + data:{parentId:''} , + success:((res)=>{ + datas = res.data + }) , + }); + var app = new Vue({ + el: '#app', + data: { + CityList: [], + AreaList:[], + City:'', + Area:'', + 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 + }) , + }); + } + } + }) $(function() { var options = { url: prefix + "/list", @@ -61,11 +116,17 @@ }, { field: 'part', - title: '所属市州' + title: '所属市州', + formatter: function(value, row, index) { + return getCity(datas, value) + } }, { field: 'areaId', - title: '所属区县' + title: '所属区县', + formatter: function(value, row, index) { + return getCity(datas, value) + } }, { field: 'useDepart',
    • 所属市州[[${tdPropertyManager.part}]] 所属区县[[${tdPropertyManager.areaId}]] 登记人员 [[${tdPropertyManager.recoverName}]]