From 43664c05487ea91418702b59e9e98b0d7a56c271 Mon Sep 17 00:00:00 2001
From: dshclm <3321914460@qq.com>
Date: Fri, 31 May 2024 09:54:37 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B6=89=E5=AF=86=E4=BA=BA=E5=91=98=E7=BB=9F?=
=?UTF-8?q?=E8=AE=A1=E6=9B=B4=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
---
.../templates/system/usernum/print.html | 15 +++-
.../templates/system/usernum/usernum.html | 79 +++++++++++++++++--
2 files changed, 84 insertions(+), 10 deletions(-)
diff --git a/ruoyi-admin/src/main/resources/templates/system/usernum/print.html b/ruoyi-admin/src/main/resources/templates/system/usernum/print.html
index 84fc25f..bf15e29 100644
--- a/ruoyi-admin/src/main/resources/templates/system/usernum/print.html
+++ b/ruoyi-admin/src/main/resources/templates/system/usernum/print.html
@@ -1766,7 +1766,7 @@
+ collapse;table-layout:fixed;width:786pt;margin: auto;' id="app">
[[${dept.deptName}]]人员信息表 |
@@ -1779,11 +1779,11 @@
所属地市 |
-
+ |
[[${dept.framework}]]
|
所属区县 |
- [[${dept.area}]] |
+ [[${dept.area}]] |
下属部门 |
|
@@ -1831,6 +1831,15 @@
function printPage() {
window.print();
}
+ $.ajax({
+ url: ctx + "system/area/getAllList",
+ type: 'GET',
+ data:{parentId:''} ,
+ success:((res)=>{
+ document.querySelector('.framework').innerHTML = getCity(res.data,[[${dept.framework}]])
+ document.querySelector('.area').innerHTML = getCity(res.data,[[${dept.area}]])
+ }) ,
+ });
var list = [[${list}]]
document.querySelector('.userNum').innerHTML = list.length
function conversionDate(date){
diff --git a/ruoyi-admin/src/main/resources/templates/system/usernum/usernum.html b/ruoyi-admin/src/main/resources/templates/system/usernum/usernum.html
index 6e1928f..22f48dc 100644
--- a/ruoyi-admin/src/main/resources/templates/system/usernum/usernum.html
+++ b/ruoyi-admin/src/main/resources/templates/system/usernum/usernum.html
@@ -6,7 +6,7 @@
-
+
@@ -21,11 +21,21 @@
-
+
-
+
搜索
@@ -57,7 +67,15 @@
var shemichengdu = [[${@dict.getType('sys_user_shemi')}]];
var examineState = [[${@dict.getType('sys_examine_state')}]];
var prefix = ctx + "system/usernum";
-
+ let datas = []
+ $.ajax({
+ url: ctx + "system/area/getAllList",
+ type: 'GET',
+ data:{parentId:''} ,
+ success:((res)=>{
+ datas = res.data
+ }) ,
+ });
$(function() {
var panehHidden = false;
if ($(this).width() < 769) {
@@ -95,11 +113,17 @@
},
{
field: 'dept.framework',
- title: '所属市州'
+ title: '所属市州',
+ formatter: function(value, row, index) {
+ return getCity(datas, value)
+ }
},
{
field: 'dept.area',
- title: '所属区县'
+ title: '所属区县',
+ formatter: function(value, row, index) {
+ return getCity(datas, value)
+ }
},
{
field: 'dept.deptName',
@@ -130,7 +154,48 @@
$(".curSelectedNode").removeClass("curSelectedNode");
$.table.search();
}
-
+ 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 dept() {
var url = ctx + "system/dept";