From 9383485ba4326b0131abc03b51822075dfc00e92 Mon Sep 17 00:00:00 2001
From: suerwei <18810552194@163.com>
Date: 星期四, 16 五月 2024 18:18:52 +0800
Subject: [PATCH] 数据表挂载项目id
---
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/projectData/add.html | 26 ++++++++++++++++----------
1 files changed, 16 insertions(+), 10 deletions(-)
diff --git a/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/projectData/add.html b/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/projectData/add.html
index 7f34c23..d42906e 100644
--- a/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/projectData/add.html
+++ b/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/projectData/add.html
@@ -12,14 +12,14 @@
<input name="name" class="form-control" type="text">
</div>
</div>
- <div class="form-group">
- <label class="col-sm-3 control-label">璧勬枡绫诲瀷锛�</label>
- <div class="col-sm-8">
- <select name="dataType" class="form-control m-b" th:with="type=${@dict.getType('project_data_type')}" required>
- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
- </select>
- </div>
- </div>
+<!-- <div class="form-group">-->
+<!-- <label class="col-sm-3 control-label">璧勬枡绫诲瀷锛�</label>-->
+<!-- <div class="col-sm-8">-->
+<!-- <select name="dataType" class="form-control m-b" th:with="type=${@dict.getType('project_data_type')}" required>-->
+<!-- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>-->
+<!-- </select>-->
+<!-- </div>-->
+<!-- </div>-->
<div class="form-group">
<label class="col-sm-3 control-label">鏂囦欢绫诲瀷锛�</label>
<div class="col-sm-8">
@@ -37,15 +37,21 @@
</form>
</div>
<th:block th:include="include :: footer" />
- <script type="text/javascript">
+ <script th:inline="javascript">
var prefix = ctx + "geo/projectData"
+ var projectId = [[${projectId}]];
+ var dataType = [[${dataType}]];
+
$("#form-projectData-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
- $.operate.save(prefix + "/add", $('#form-projectData-add').serialize());
+ let formData = $('#form-projectData-add').serialize();
+ let data = formData + "&projectId=" + projectId + "&dataType=" + dataType;
+ console.log("222",data);
+ $.operate.save(prefix + "/add", data);
}
}
</script>
--
Gitblit v1.9.1