File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 1
- __version__ = '0.1.4 '
1
+ __version__ = '0.2.0 '
2
2
__url__ = 'https://github.com/zhangchunlin/uliweb-apijson'
3
3
__author__ = 'Chunlin Zhang'
4
4
__email__ = 'zhangchunlin@gmail.com'
Original file line number Diff line number Diff line change 175
175
"@page" :thisp . current_page - 1 ,
176
176
"@query" :2
177
177
}
178
- arr_params [ this . model_name ] = {
178
+ arr_params [ thisp . model_name ] = {
179
179
"@order" :thisp . sort_key + thisp . sort_order ,
180
180
"@role" :"{{=role}}"
181
181
}
194
194
thisp . loading = false
195
195
if ( data . code == 200 ) {
196
196
var arr = data [ "[]" ]
197
+ for ( var i = 0 ; i < arr . length ; i ++ ) {
198
+ arr [ i ] = arr [ i ] [ thisp . model_name ]
199
+ }
200
+
197
201
if ( ! thisp . tcolumns_init ) {
198
202
if ( thisp . config_table_fields != null ) {
199
203
thisp . tcolumns = thisp . config_table_fields
210
214
var col = { title :k , key :k }
211
215
if ( typeof item [ k ] === "boolean" ) {
212
216
col [ "width" ] = 80
217
+ col [ "component" ] = "checkbox"
213
218
}
214
219
else if ( typeof item [ k ] === "number" ) {
215
220
col [ "width" ] = 100
Original file line number Diff line number Diff line change @@ -237,6 +237,7 @@ def _get_array(self,key):
237
237
q = q .order_by (getattr (column ,sort_order )())
238
238
239
239
def _get_info (i ):
240
+ resultd = {}
240
241
d = i .to_dict ()
241
242
if secret_fields :
242
243
for k in secret_fields :
@@ -246,7 +247,8 @@ def _get_info(i):
246
247
for k in keys :
247
248
if k not in model_column_set :
248
249
del d [k ]
249
- return d
250
+ resultd [model_name ] = d
251
+ return resultd
250
252
l = [_get_info (i ) for i in q ]
251
253
self .rdict [key ] = l
252
254
You can’t perform that action at this time.
0 commit comments