From 0f7929700215528e8ba88388875afd711abb937f Mon Sep 17 00:00:00 2001 From: Renpc-kilig <308442850@qq.com> Date: Tue, 2 Nov 2021 17:02:46 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=A0=B7=E5=BC=8F=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/distribute/charts.html | 56 +++++++++++----- .../templates/distribute/list-already.html | 65 +++++++++++++------ .../resources/templates/distribute/list.html | 47 ++++++++++---- .../templates/receiveruser/list.html | 41 +++++++++--- 4 files changed, 153 insertions(+), 56 deletions(-) diff --git a/src/main/resources/templates/distribute/charts.html b/src/main/resources/templates/distribute/charts.html index 17db91a..0eddeba 100644 --- a/src/main/resources/templates/distribute/charts.html +++ b/src/main/resources/templates/distribute/charts.html @@ -11,20 +11,20 @@ -
+
- +
- +
- +
@@ -35,21 +35,31 @@
- +
-
- -
- - +
+
+ +
+
+ + +
@@ -67,9 +77,11 @@ base: 'assets/layuiadmin/' }).extend({ index: 'lib/index' - }).use(['index', 'table', 'laydate', 'common'], function() { + }).use(['index', 'form', 'table', 'laydate', 'common', 'laytpl'], function() { var $ = layui.$; var $win = $(window); + var laytpl = layui.laytpl; + var form = layui.form; var table = layui.table; var admin = layui.admin; var laydate = layui.laydate; @@ -79,6 +91,20 @@ var selectedAreaArray = []; var app = {}; + // 初始化任务紧急程度下拉选择 + function initUrgentLevelSelect() { + top.restAjax.get(top.restAjax.path('api/data/listbyparentid/{dataParentId}', ['203f7283-74a6-4f05-9d5f-c6675b3a69fc']), {}, null, function(code, data, args) { + laytpl(document.getElementById('urgentLevelSelectTemplate').innerHTML).render(data, function(html) { + document.getElementById('urgentLevelSelectTemplateBox').innerHTML = html; + }); + form.render('select', 'urgentLevelSelectTemplateBox'); + }, function(code, data) { + top.dialog.msg(data.msg); + }); + } + + initUrgentLevelSelect(); + // 柱状图 function barCharts(data) { const posList = [ diff --git a/src/main/resources/templates/distribute/list-already.html b/src/main/resources/templates/distribute/list-already.html index e52e545..3871b88 100644 --- a/src/main/resources/templates/distribute/list-already.html +++ b/src/main/resources/templates/distribute/list-already.html @@ -18,10 +18,10 @@
- +
- +
@@ -32,30 +32,42 @@
- +
- +
- +
+
- +
+ +
+
+
+ +
- -
@@ -171,19 +183,34 @@ base: 'assets/layuiadmin/' }).extend({ index: 'lib/index' - }).use(['index', 'table', 'laydate', 'common'], function() { + }).use(['index', 'form', 'table', 'laydate', 'common', 'laytpl'], function() { var $ = layui.$; var $win = $(window); var table = layui.table; var admin = layui.admin; var laydate = layui.laydate; var laytpl = layui.laytpl; + var form = layui.form; var common = layui.common; var resizeTimeout = null; var tableUrl = 'api/distribute/listpage?distributeStatus={distributeStatus}&distributeStatusCancel={distributeStatusCancel}'; var selectedAreaArray = []; var receiverUserList = []; + // 初始化任务紧急程度下拉选择 + function initUrgentLevelSelect() { + top.restAjax.get(top.restAjax.path('api/data/listbyparentid/{dataParentId}', ['203f7283-74a6-4f05-9d5f-c6675b3a69fc']), {}, null, function(code, data, args) { + laytpl(document.getElementById('urgentLevelSelectTemplate').innerHTML).render(data, function(html) { + document.getElementById('urgentLevelSelectTemplateBox').innerHTML = html; + }); + form.render('select', 'urgentLevelSelectTemplateBox'); + }, function(code, data) { + top.dialog.msg(data.msg); + }); + } + + initUrgentLevelSelect(); + // 事件 - 跳转图表页面 $(document).on('click', '#charts', function() { layer.open({ diff --git a/src/main/resources/templates/distribute/list.html b/src/main/resources/templates/distribute/list.html index 69acbd8..816b824 100644 --- a/src/main/resources/templates/distribute/list.html +++ b/src/main/resources/templates/distribute/list.html @@ -36,17 +36,24 @@
- +
- +
+ +
+
+
- -
@@ -78,10 +85,12 @@ base: 'assets/layuiadmin/' }).extend({ index: 'lib/index' - }).use(['index', 'table', 'laydate', 'common'], function() { + }).use(['index', 'form', 'table', 'laydate', 'common', 'laytpl'], function() { var $ = layui.$; var $win = $(window); var table = layui.table; + var laytpl = layui.laytpl; + var form = layui.form; var admin = layui.admin; var laydate = layui.laydate; var common = layui.common; @@ -89,6 +98,20 @@ var tableUrl = 'api/distribute/listpage?distributeStatus={distributeStatus}'; var selectedAreaArray = []; + // 初始化任务紧急程度下拉选择 + function initUrgentLevelSelect() { + top.restAjax.get(top.restAjax.path('api/data/listbyparentid/{dataParentId}', ['203f7283-74a6-4f05-9d5f-c6675b3a69fc']), {}, null, function(code, data, args) { + laytpl(document.getElementById('urgentLevelSelectTemplate').innerHTML).render(data, function(html) { + document.getElementById('urgentLevelSelectTemplateBox').innerHTML = html; + }); + form.render('select', 'urgentLevelSelectTemplateBox'); + }, function(code, data) { + top.dialog.msg(data.msg); + }); + } + + initUrgentLevelSelect(); + // 选择区域 $(document).on('click', '#area', function() { top.dialog.open({ @@ -447,11 +470,7 @@ function initDate() { // 日期选择 laydate.render({ - elem: '#startTime', - format: 'yyyy-MM-dd' - }); - laydate.render({ - elem: '#endTime', + elem: '#distributeDeadline', format: 'yyyy-MM-dd' }); } diff --git a/src/main/resources/templates/receiveruser/list.html b/src/main/resources/templates/receiveruser/list.html index 5c477f2..f49b987 100644 --- a/src/main/resources/templates/receiveruser/list.html +++ b/src/main/resources/templates/receiveruser/list.html @@ -36,17 +36,27 @@
- +
- +
+
- +
+ +