From 1eb1bd6c6de2cd4b3ecbee68d4b2f7d4c69e0c6b Mon Sep 17 00:00:00 2001 From: dshclm <3321914460@qq.com> Date: Fri, 31 May 2024 11:50:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B6=89=E5=AF=86=E6=96=87=E4=BB=B6=E4=B8=8B?= =?UTF-8?q?=E5=8F=91=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/fileprovide/add.html | 115 ++++++++++-------- .../templates/system/fileprovide/detail.html | 62 +++++++++- 2 files changed, 122 insertions(+), 55 deletions(-) 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($('