Exemplo n.º 1
0
 def get_operation(self):
     operations = ModelTable.get_operation(self)
     ops = filter(lambda op: op['name'] in ['save_changed_rows'],
                  operations)
     ls = [
         {
             'fun': 'selected_set_and_save',
             'editor': 'com-op-btn',
             'pre_set': 'rt={proc_status:"processed"}',
             'row_match': 'many_row',
             #'value':'processed',
             #'disabled':'scope.ts.selected.length==0',
             #'hide':'!has_select',
             'icon': 'fa-circle',
             'style': 'color:green',
             'label': '已处理'
         },
         {
             'fun': 'selected_set_and_save',
             'editor': 'com-op-btn',
             'pre_set': 'rt={proc_status:"unprocess"}',
             'row_match': 'many_row',
             #'field':'proc_status',
             #'value':'unprocess',
             #'disabled':'scope.ts.selected.length==0',
             #'hide':'!has_select',
             'icon': 'fa-exclamation',
             'style': 'color:red',
             'label': '未处理'
         },
     ]
     ls.extend(ops)
     return ls
Exemplo n.º 2
0
 def get_operation(self):
     operations = ModelTable.get_operation(self)
     ops = filter(lambda op: op['name'] in ['save_changed_rows'],
                  operations)
     ls = [
         {
             'fun': 'selected_set_value',
             'editor': 'com-op-btn',
             'field': 'proc_status',
             'value': 'processed',
             'disabled': '!has_select',
             #'hide':'!has_select',
             'icon': 'fa-circle',
             'style': 'color:green',
             'label': '已处理'
         },
         {
             'fun': 'selected_set_value',
             'editor': 'com-op-btn',
             'field': 'proc_status',
             'value': 'unprocess',
             'disabled': '!has_select',
             #'hide':'!has_select',
             'icon': 'fa-exclamation',
             'style': 'color:red',
             'label': '未处理'
         },
     ]
     ls.extend(ops)
     return ls
Exemplo n.º 3
0
 def get_heads(self):
     heads = ModelTable.get_heads(self)
     for index, head in enumerate(heads):
         if head['name'] == 'inspector':
             heads.insert(index + 1, {
                 'name': 'code',
                 'label': '编码',
                 'width': 90
             })
             break
     return heads
Exemplo n.º 4
0
 def get_heads(self):
     heads = ModelTable.get_heads(self)
     heads.append({
         'name': 'hight_region',
         'label': '围栏区域',
         'editor': 'com-table-extraclick',
         'extra_label': '提示',
         'extra_fun': 'hight_region',
         'width': 60,
     })
     return heads
Exemplo n.º 5
0
 def __init__(self, *args, **kws):
     ModelTable.__init__(self, *args, **kws)
     jianfang_pk = self.kw.get('pk')
     self.jianfang = JianFangInfo.objects.get(pk=jianfang_pk)
Exemplo n.º 6
0
 def __init__(self, *args, **kw):
     ModelTable.__init__(self, *args, **kw)
     self.belong = ''
Exemplo n.º 7
0
 def get_context(self):
     ctx = ModelTable.get_context(self)
     ctx['extra_table_logic'] = 'zhongbo_logic'
     return ctx