博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Datatable get请求传参应用
阅读量:5024 次
发布时间:2019-06-12

本文共 4878 字,大约阅读时间需要 16 分钟。

以关注页面为例:

html:

1 
2 3
4
5
6
7
8
10
11
12
13
16 17
26
27
28
29
30
41
42
43
44
47 48
63
64
65
66
67 68
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
id 任务名称 紧急程度    进度 创建人 责任人 参与人 状态 更新时间
99
100
101
102 103
View Code

js:

1 
View Code

后台falsk:

1 # 关注任务数据 2 @task_mgm.route('/taskDataFocus') 3 @sso_wrapper 4 def taskinfo_dataFocus_fun(): 5     try: 6         which = request.values.get('which') 7         advance = request.values.get('advance') 8         startTime = request.values.get('stime')  # 起时 9         endTime = request.values.get('etime')10         time_str = setTime()11         if startTime is None or startTime is '' or startTime == 'undefined':12             startTime = time_str.split("|")[0]13         if endTime is None or endTime is '' or endTime == 'undefined':14             endTime = time_str.split("|")[1]15 16         # 应该根据用户名或ID 的到自己的任务  现在先暂时应任务ID17         if which == "undefined" and advance == "undefined":18             tasks = Task.query.filter(19                 and_(Task.isDelete != 1, Task.ifFocus == 1, Task.endTime >= startTime, Task.endTime <= endTime,20                      )).order_by(Task.updateTime.desc()).all()21         elif which == "create_mine":22             tasks = Task.query.filter(23                 and_(Task.isDelete != 1, Task.ifFocus == 1, Task.createPeople == g.name24                      )).order_by(Task.updateTime.desc()).all()25         elif which == "res_mine":26             tasks = Task.query.filter(27                 and_(Task.isDelete != 1, Task.ifFocus == 1, Task.resPeople == g.name28                      )).order_by(Task.updateTime.desc()).all()29         elif which == "exe_mine":30             tasks = Task.query.filter(31                 and_(Task.isDelete != 1, Task.ifFocus == 1, Task.exePeople == g.name32                      )).order_by(Task.updateTime.desc()).all()33         elif advance == "advance_0":34             tasks = Task.query.filter(35                 and_(Task.isDelete != 1, Task.ifFocus == 1, Task.advanceId == 036                      )).order_by(Task.updateTime.desc()).all()37         elif advance == "advance_2":38             tasks = Task.query.filter(39                 and_(Task.isDelete != 1, Task.ifFocus == 1, Task.advanceId == 140                      )).order_by(Task.updateTime.desc()).all()41         elif advance == "advance_4":42             tasks = Task.query.filter(43                 and_(Task.isDelete != 1, Task.ifFocus == 1, Task.advanceId == 244                      )).order_by(Task.updateTime.desc()).all()45         elif advance == "advance_6":46             tasks = Task.query.filter(47                 and_(Task.isDelete != 1, Task.ifFocus == 1, Task.advanceId == 348                      )).order_by(Task.updateTime.desc()).all()49         elif advance == "advance_8":50             tasks = Task.query.filter(51                 and_(Task.isDelete != 1, Task.ifFocus == 1, Task.advanceId == 452                      )).order_by(Task.updateTime.desc()).all()53         elif advance == "advance_10":54             tasks = Task.query.filter(55                 and_(Task.isDelete != 1, Task.ifFocus == 1, Task.advanceId == 556                      )).order_by(Task.updateTime.desc()).all()57 58         data = sql3json(tasks, ["id", "endState", "taskName", "advanceId", "urgentId", "createPeople", "resPeople", "exePeople", "ifFocus", "updateTime"])59         return data60     except Exception as e:61         logging.error(e)
View Code

 

转载于:https://www.cnblogs.com/We612/p/10255627.html

你可能感兴趣的文章
keepalived介绍
查看>>
css3 标签 background-size
查看>>
python itertools
查看>>
Linux内核调试技术——jprobe使用与实现
查看>>
样式、格式布局
查看>>
ubuntu设计文件权限
查看>>
Vue双向绑定原理详解
查看>>
Android基础总结(5)——数据存储,持久化技术
查看>>
关于DataSet事务处理以及SqlDataAdapter四种用法
查看>>
bootstrap
查看>>
http://lorempixel.com/ 可以快速产生假图
查看>>
工程经验总结之吹水"管理大境界"
查看>>
为什么JS动态生成的input标签在后台有时候没法获取到
查看>>
20189210 移动开发平台第六周作业
查看>>
java之hibernate之基于外键的双向一对一关联映射
查看>>
rxjs一句话描述一个操作符(1)
查看>>
第一次独立上手多线程高并发的项目的心路历程
查看>>
ServiceStack 介绍
查看>>
Centos7下载和安装教程
查看>>
无谓的通宵加班之后的思索
查看>>