diff --git a/ruoyi-admin/src/main/resources/templates/system/check/add.html b/ruoyi-admin/src/main/resources/templates/system/check/add.html index 7e5069b..d633875 100644 --- a/ruoyi-admin/src/main/resources/templates/system/check/add.html +++ b/ruoyi-admin/src/main/resources/templates/system/check/add.html @@ -5,7 +5,7 @@ -
+
@@ -29,15 +29,25 @@
- +
- +
- +
@@ -85,7 +95,48 @@ $("#form-check-add").validate({ focusCleanup: true }); - + 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 submitHandler() { if ($.validate.form()) { $.operate.save(prefix + "/add", $('#form-check-add').serialize()); diff --git a/ruoyi-admin/src/main/resources/templates/system/check/check.html b/ruoyi-admin/src/main/resources/templates/system/check/check.html index db1231c..dc72875 100644 --- a/ruoyi-admin/src/main/resources/templates/system/check/check.html +++ b/ruoyi-admin/src/main/resources/templates/system/check/check.html @@ -4,7 +4,7 @@ -
+
@@ -16,11 +16,21 @@
  • - +
  • - +
  • @@ -72,7 +82,15 @@ var checkcontentryxmsjjtDatas = [[${@dict.getType('sys_check_state')}]]; var checkcontentryxmsjotherjtDatas = [[${@dict.getType('sys_check_state')}]]; var prefix = ctx + "system/check"; - + let datas = [] + $.ajax({ + url: ctx + "system/area/getAllList", + type: 'GET', + data:{parentId:''} , + success:((res)=>{ + datas = res.data + }) , + }); $(function() { var options = { url: prefix + "/list", @@ -91,12 +109,18 @@ visible: false }, { - field: 'area', - title: '所属区县' + field: 'framework', + title: '所属市州', + formatter: function(value, row, index) { + return getCity(datas, value) + } }, { - field: 'framework', - title: '所属市州' + field: 'area', + title: '所属区县', + formatter: function(value, row, index) { + return getCity(datas, value) + } }, { field: 'user', @@ -132,6 +156,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 selfcheck(id) { var url ='/system/check/selfcheck/' + id; $.modal.open("检查管理", url); diff --git a/ruoyi-admin/src/main/resources/templates/system/check/detail.html b/ruoyi-admin/src/main/resources/templates/system/check/detail.html index 4a249b4..435cd90 100644 --- a/ruoyi-admin/src/main/resources/templates/system/check/detail.html +++ b/ruoyi-admin/src/main/resources/templates/system/check/detail.html @@ -5,7 +5,7 @@ -
    +
    @@ -30,15 +30,25 @@
    - +
    - +
    - +
    - +
    @@ -86,7 +96,48 @@ $("#form-check-edit").validate({ focusCleanup: true }); - + var app = new Vue({ + el: '#app', + data: { + CityList: [], + AreaList:[], + City:[[${tdCheck.framework}]], + Area:[[${tdCheck.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 submitHandler() { if ($.validate.form()) { $.operate.save(prefix + "/edit", $('#form-check-edit').serialize()); diff --git a/ruoyi-admin/src/main/resources/templates/system/check/edit.html b/ruoyi-admin/src/main/resources/templates/system/check/edit.html index 383e95e..6973286 100644 --- a/ruoyi-admin/src/main/resources/templates/system/check/edit.html +++ b/ruoyi-admin/src/main/resources/templates/system/check/edit.html @@ -5,22 +5,22 @@ -
    +
    -
    +
    -
    +
    -
    +
    @@ -30,48 +30,58 @@
    - +
    - +
    - +
    -
    +
    -
    +
    -
    +
    -
    +
    -
    +
    -
    +
    @@ -86,7 +96,48 @@ $("#form-check-edit").validate({ focusCleanup: true }); - + var app = new Vue({ + el: '#app', + data: { + CityList: [], + AreaList:[], + City:[[${tdCheck.framework}]], + Area:[[${tdCheck.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 submitHandler() { if ($.validate.form()) { $.operate.save(prefix + "/edit", $('#form-check-edit').serialize()); @@ -112,4 +163,4 @@ }); - \ No newline at end of file +