diff --git a/ruoyi-admin/src/main/resources/templates/system/fileprovide/add.html b/ruoyi-admin/src/main/resources/templates/system/fileprovide/add.html index 9982156..ed78a1a 100644 --- a/ruoyi-admin/src/main/resources/templates/system/fileprovide/add.html +++ b/ruoyi-admin/src/main/resources/templates/system/fileprovide/add.html @@ -7,27 +7,21 @@ -
+
- +
- +
@@ -125,48 +119,69 @@ $("#form-fileprovide-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 - }) , + $(document).ready(function() { + // 获取市级数据并填充到城市下拉框 + $.ajax({ + url: ctx + "system/area/getSysAreaList", + method: 'GET', + success: function(res) { + var cities = res.data; // 假设返回的数据中有一个叫做 'cities' 的字段包含市级数据 + var $citySelect = $('#City'); + + // 填充城市下拉框 + cities.forEach(function(city) { + $citySelect.append($('