Esempio n. 1
0
 def get_row(self):
     return {
         '_director_name': self.get_director_name(),
         'cunwei_names': get_value('cunwei_names'),
         'enterprise_names': get_value('enterprise_names'),
         'hotline_name_map': get_value('hotline_name_map'),
     }
Esempio n. 2
0
 def get_row(self):
     return {
         '_director_name': self.get_director_name(),
         'hotline_complain_last': get_value('hotline_complain_last'),
         'hotline_complain_this': get_value('hotline_complain_this'),
         'yinji_duty': get_value('yinji_duty'),
         'director_duty': get_value('director_duty'),
         'infoer_duty': get_value('infoer_duty')
     }
Esempio n. 3
0
 def dict_row(self):
     return {
         'company_cert_protocol': get_value('company_cert_protocol',
                                            ''),
         'worker_cert_protocol': get_value('worker_cert_protocol', ''),
         'company_empoly_protocol': get_value('company_empoly_protocol',
                                              ''),
         'apply_job_protocol': get_value('apply_job_protocol', ''),
     }
Esempio n. 4
0
 def get_row(self):
     return {
         'qq': get_value('qq'),
         'wechat_gzh': get_value('wechat_gzh'),
         'wechat_slogan': get_value('wechat_slogan'),
         'service_phone': get_value('service_phone'),
         'service_time': get_value('service_time'),
         '_director_name': 'qq_cfg',
     }
Esempio n. 5
0
    def handle(self, *args, **options):
        log.info('-' * 30)
        log.info('开始检测围栏')

        now = datetime.now()
        today = now.date()
        in_worktime = False
        work_time = get_value('work_time', '8:30-12:30;14:00-18:00')
        log.info('设置的work_time=%s' % work_time)
        ls = work_time.split(';')
        for span in ls:
            start, end = span.split('-')
            start, end = (to_datetime(start), to_datetime(end))
            if start <= now <= end:
                in_worktime = True
        log.info('当前时间 %s' % now)
        if not in_worktime:
            log.info('不在工作时间内')
            return
        log.info('在工作时间内')

        try:
            workgroup = WorkInspector.objects.get(date=today)
            log.info('开始遍历监督员')
            for person in workgroup.inspector.all():
                if not list(block_list(person)):
                    log.info('%s 没有block' % person)
                    continue
                else:
                    check_inspector(person)

        except WorkInspector.DoesNotExist:
            log.info('working group of [%s] is not set' % today)
            # 没设置上班组时,不报警
            return
Esempio n. 6
0
def inspectorWorkTime(keeper):
    ls = []
    for workgroup in keeper.inspectorworkgroup_set.all():
        ls.extend(workgroup.work_time.split(';'))
    if not ls:
        ls.extend(get_value('work_time', '8:30-12:30;14:00-18:00').split(';'))
    return ls
Esempio n. 7
0
    def _fun2(*args, **kws):
        key = '%s.%s' % (fun.__module__, fun.__name__)  #str( hash(fun))
        if args:
            for item in args:
                key += '%s_%s' % (item.__class__.__name__, id(item))
        if kws:
            key += str(hash(json.dumps(kws, sort_keys=True)))

        cache_name = 'lock:fun:%s' % key

        created = lock_created(cache_name, 1)
        if created:
            rt_obj = fun(*args, **kws)
            clear_value(cache_name)
        else:
            count = 0
            while (True):
                count += 200
                time.sleep(200)
                if not get_value(cache_name):
                    break
                if count > 10000:
                    raise UserWarning('等待同步函数请求超时')
            rt_obj = fun(*args, **kws)
        return rt_obj
Esempio n. 8
0
def get_case_number(code):

    value = get_value('inspector_case', '[]')
    ls = json.loads(value)
    case_list = []
    for row in ls:
        if row[-3] == code:
            case_list.append(row)
    return len(case_list)
Esempio n. 9
0
def get_short_date_sequence(how_many=1,start_date='2021-05-18',fill=5,key='_short_date_sequence'):
  now = timezone.now()
  day_span = ( now - timezone.datetime.strptime(start_date, '%Y-%m-%d') ).days
  now_int = day_span * 10**fill
  v= get_value(key,None)
  if v is None or int(v) < now_int:
    start = now_int
  else:
    start = int( get_value(key,0) ) +1
    
  ls = list(  range(start,start+how_many) )
  if v is None:
    if not lock_created(key,ls[-1]):
      return get_short_date_sequence(how_many,start_date,fill,key)
  else:
    count = update_value(key,v,ls[-1]) 
    if count == 0:
      return get_short_date_sequence(how_many,start_date,fill,key)
  return ls  
Esempio n. 10
0
    def wrap_fail_info(self, infodc):
        old_count = int(get_value(self.count_key, 0, gte=self.code_life))
        old_count = old_count + 1
        set_value(self.count_key, old_count)

        if old_count > 5:
            code, url = code_and_url()
            set_value(self.code_key, code)
            infodc.update({'validate_img': url})
        infodc.update({'success': False})
        return infodc
Esempio n. 11
0
def validate_code(key, code):
    tm = timezone.now() - timezone.timedelta(minutes=5)
    KVModel.objects.filter(key__startswith='_validat_code_',
                           update__lte=tm).delete()
    real_key = '_validat_code_%s' % key
    ss = get_value(real_key)
    if ss == code:
        clear_value(real_key)
        return True
    else:
        return False
Esempio n. 12
0
 def get_kv_value(self):
     ls = [
         'qq', 'wechat_gzh', 'wechat_slogan', 'service_phone',
         'service_time', 'beian_info', 'copyright'
     ]
     dc = {}
     for k in ls:
         dc[k] = get_value(k)
     return {
         'qq': dc,
     }
Esempio n. 13
0
 def get_operations(self):
     return [{
         'editor':
         'com-op-submit',
         'label':
         '接受申请',
         'protocal':
         get_value('company_empoly_protocol', '请在后台完善《商家用工协议》'),
         'show':
         'scope.vc.row.status==0',
         'action':
         '''cfg.pop_vue_com("com-pop-protocal",{content:scope.head.protocal}).then(()=>{  
                     cfg.show_load();scope.ps.vc.row.status=1; 
                     return scope.ps.vc.submit()
                  }) .then(()=>{
                   cfg.hide_load();
                   cfg.toast("操作成功");
                   scope.ps.vc.par_row.status=1
                   history.back()
                   })
                   '''
     }, {
         'editor':
         'com-op-van-btn',
         'label':
         '拒绝申请',
         'type':
         'warning',
         'show':
         'scope.vc.row.status==0',
         'action':
         '''cfg.show_load();scope.ps.vc.row.status=2; scope.ps.vc.submit().then(()=>{
                   cfg.hide_load();
                   cfg.toast("操作成功");
                   scope.ps.vc.par_row.status=2
                   })
                   '''
     }, {
         'editor':
         'com-op-van-btn',
         'type':
         'info',
         'label':
         '项目完结',
         'show':
         'scope.vc.row.status==3',
         'action':
         '''cfg.show_load();scope.ps.vc.row.status=4; scope.ps.vc.submit().then(()=>{
                   cfg.hide_load();
                   cfg.toast("操作成功");
                   scope.ps.vc.par_row.status=4
                   })'''
     }]
Esempio n. 14
0
 def get_context(self):
     return {
         'editor':'live_cell',
         'editor_ctx':{
                     'title':'个人认证',
                     'back_action':'location="/mb/index"',
                     'groups':[
                         {
                             'label':'认证信息',
                              'cells':get_worker_info_heads()
                             
                         },
                         {
                             'label':'审核',
                             'cells':[
                                 #{'label':'资料下载',
                                  #'action':'live_root.open_live("live_layout",scope.head.live_ctx)',
                                  #'live_ctx':{
                                      #'layout_editors':[
                                          #{'editor':'com-lay-navbar','title':'资料下载',},
                                          #{'editor':'com-top-filedownload','files':[
                                              #{'url':'/static/material/易职通平台服务合同(企业).docx','label':'易职通平台服务合同(企业)'}
                                              #]},
                                      #]
                                  #}
                                #},
                                 {
                                     'label':'审核进度',
                                     'action':'live_root.open_live("live_com_cert_progress",scope.head.progress_ctx)',
                                      'progress_ctx':{
                                          'title':'审核进度',
                                          'init_express':'cfg.show_load();ex.director_call("workerinfo/progress").then(resp=>{cfg.hide_load();scope.vc.active = resp})',
                                          'submit_info_express':'''cfg.pop_vue_com("com-pop-protocal",scope.vc.ctx.protocal_ctx)
                                          .then(()=>{
                                              cfg.show_load();
                                              return ex.director_call("workerinfo/submit_info")
                                          }).then(resp=>{
                                              cfg.hide_load();
                                              cfg.toast("服务者认证申请已经提交成功,请耐心等待!");
                                              scope.vc.active = resp
                                          })'''  ,
                                           'protocal_ctx':{
                                               'content':get_value('worker_cert_protocol','求职者认证协议不能为空!')
                                           }
                                      }
                                 }
                             ]
                         }
                     ]
                    
         }
     }
Esempio n. 15
0
def inspector_case(request,code):
    # today = datetime.now().date()
    # today_str = unicode(today)    
    # case = InspectorCaseConnecter(today_str, today_str, code)
    value = get_value('inspector_case','[]')
    ls = json.loads(value) or [['没有数据'],]
    case_list=[]
    case_list.append(ls[0])
    for row in ls[1:]:
        if row[-3]==code:
            case_list.append(row)

    return render(request,'inspector/case.html',context={'case_list':case_list})
Esempio n. 16
0
def date_order(key, digit=6):
    # 20190101xxxxxx
    datestr = timezone.now().strftime('%Y%m%d')
    crt_value = get_value(key, datestr + '0' * digit)
    if crt_value[:8] == datestr:
        point = int(crt_value[8:])
        crt_point = point + 1
    else:
        crt_point = 0

    pointstr = '%%0%sd' % digit
    rt = datestr + pointstr % crt_point
    set_value(key, rt)
    return rt
Esempio n. 17
0
def in_the_block(pos, inspector):
    out_blocks = []
    for group in inspector.inspectorgrop_set.all():
        for rel in group.inspectorgroupandweilanrel_set.all():
            polygon = rel.block.bounding
            # 经纬度坐标之distance*100大致等于公里数。因为不准确性的存在,warning_distance是按照公里数来判断的。
            if pos.distance(polygon) * 100 < float(
                    get_value('warning_distance', '0.3')):
                return True
            else:
                out_blocks.append(polygon)
    # 某些监督员没有指定区域,尽管没有被框在某个block里面,但是被认为没有 出界
    if not out_blocks:
        return True
    else:
        return False
Esempio n. 18
0
def inspector_case(request,code):
    # today = datetime.now().date()
    # today_str = unicode(today)    
    # case = InspectorCaseConnecter(today_str, today_str, code)
    value = get_value('inspector_case_%s' % code,'[]')
    ls = json.loads(value) or [['没有数据'],]
    case_list = ls
    baseengine = BaseEngine()
    baseengine.request = request
    ctx = {
        'case_list':case_list, 
        'js_config': baseengine.getJsConfig(),
    }


    return render(request,'inspector/case.html',context= ctx)
Esempio n. 19
0
 def get_context(self):
     return {
         'tops':[
             {'editor':'com-top-html',
              'class':'myhtml',
              'css':'.myhtml{width:800px;margin:auto} body{background:white;}',
              'html':get_value('cfg.example_html','')},
             #{'editor':'com-top-image-top-pad',
              #'full_width':True,
              #'image_url':static_url('image/server-2160321_1280.webp'),
              #'class':'my-top-image',
              #'css':''' .my-top-image .head{height:70px}
                        #.my-top-image .head img{height:370px}
                        #.my-top-image .content{margin-bottom:40px}''',  
              #'inn_editor':'com-example-content',
             
              #},
             #{
                 #'editor':'com-slot-wrap',
                 #'inn_editor':'com-top-image-top-pad',
                 #'slot':[
                     #{'name':'content','editor':'com-example-content',},
                     #],
              #'full_width':True,
              #'image_url':static_url('image/server-2160321_1280.webp'),
              #'class':'my-top-image',
              #'css':''' .my-top-image .head{height:70px}
                        #.my-top-image .head img{height:370px}
                        #.my-top-image .content{margin-bottom:40px}
                        #''',  
              ##'inn_editor':'com-example-content',
             
              #},
             
         ]
     }
Esempio n. 20
0
        def get_rows(self):
            """
            a1 [{'three': '北崧居委会', 'count_all': 2, 'count_bu': 2, 'count_shi': 0}
            a2 [{'three': '崧泽村委会', 'count_cun': 15},
            a3 [{'reporter': '孙桂兰', 'count_wei': 4},
            a4 [{'keepername': '孙惠东', 'count_keeper': 34}
            
            """

            weixin_name_list = json.loads(get_value('wexin_name_list', '[]'))
            weixin_name_dict = {}
            for item in weixin_name_list:
                weixin_name_dict[item['dpt_name']] = item['name_list'].split(
                    ',')

            if not self.search_args.get('data_time'):
                return []

            url = settings.SANGO_BRIDGE + '/rq'
            data = {
                'fun': 'zhaoxiang_grid_report',
                'datestr': self.search_args.get('data_time')
            }

            rt = requests.post(url, data=json.dumps(data), proxies=proxies)
            rt_dc = json.loads(rt.text)
            row_dict = {}

            a1 = [{k.lower(): v
                   for (k, v) in row.items()} for row in rt_dc['a1']]
            a2 = [{k.lower(): v
                   for (k, v) in row.items()} for row in rt_dc['a2']]
            a3 = [{k.lower(): v
                   for (k, v) in row.items()} for row in rt_dc['a3']]
            a4 = [{k.lower(): v
                   for (k, v) in row.items()} for row in rt_dc['a4']]

            for row in a1:
                row['three'] = name_map.get(row['three'], row['three'])
                row_dict[row.get('three')] = row
            for row in a2:
                row['three'] = name_map.get(row['three'], row['three'])
                name = row.get('three')
                if name not in row_dict:
                    row_dict[name] = row
                else:
                    row_dict[name].update(row)

            rows = [v for (k, v) in row_dict.items()]

            weixin_dict = {}
            for report in a3:
                reporter_name = report['reporter'].replace(' ', '')
                for k, v in weixin_name_dict.items():
                    three = name_map.get(k, k)
                    if reporter_name in v:
                        weixin_dict[three] = weixin_dict.get(
                            three, 0) + report['count_wei']
                        break
            pda_dict = {}
            for keeper in a4:
                keeper_name = keeper['keepername'].replace(' ', '')
                #
                #  [1]
                for k, v in pda_map.items():
                    three = name_map.get(k, k)
                    if keeper_name in v:
                        pda_dict[three] = pda_dict.get(
                            three, 0) + keeper['count_keeper']

            row_dict = {row['three']: row for row in rows}
            for k, v in weixin_dict.items():
                if k not in row_dict:
                    dc = {
                        'three': k,
                        'count_wei': v,
                    }
                    rows.append(dc)
                    row_dict[k] = dc
                else:
                    row_dict[k]['count_wei'] = v

            for k, v in pda_dict.items():
                if k not in row_dict:
                    dc = {
                        'three': k,
                        'count_keeper': v,
                    }
                    rows.append(dc)
                    row_dict[k] = dc
                else:
                    row_dict[k]['count_keeper'] = v
            return rows
Esempio n. 21
0
        def get_rows(self):
            if not self.search_args.get(
                    '_start_data_time') or not self.search_args.get(
                        '_end_data_time'):
                return []

            url = settings.SANGO_BRIDGE + '/rq'
            data = {
                'fun': 'zhaoxiang_hotline_report',
                'start': self.search_args.get('_start_data_time'),
                'end': self.search_args.get('_end_data_time'),
            }

            rt = requests.post(url, data=json.dumps(data), proxies=proxies)
            """
            a1=[{'three': '特色居住区第一居委筹备组', 'shou_li': 1}, {'three': '物业管理', 'shou_li': 2} , ...
            a2=[{'man_yi_total': 0, 'first_no': 0, 'jie_solve': 1, 'real_solve': 0, 'three': '崧泽村委会', 'man_yi': 0, 'first_yes': 0, 'sou_count': 1},...
            
            #a1={'three': '崧泽村委会', 'shou_li': 9}, {'three': '综合协管大队', 'shou_li': 5}
            #a2={'three': '崧泽村委会',  'first_yes': 3, 'first_no': 0, 'first_total': 3, 'first_ratio': 1.0, 'real_solve': 2, 'jie_solve': 6, 'total_solve': 8, 'real_solve_ratio': 0.25, 'jie_solve_ratio': 0.75, 'man_yi': 1.6, 'man_yi_total': 3, 'man_yi_ratio': 0.5333333333333333}
            
            #a2={'THREE': '崧泽村委会', 'SOU_COUNT': 5, 'FIRST_YES': 2, 'FIRST_NO': 0, 'REAL_SOLVE': 1, 'JIE_SOLVE': 4, 'MAN_YI': Decimal('0.8'), 'MAN_YI_TOTAL': 2}
            """
            rt_dc = json.loads(rt.text)
            a1 = [{k.lower(): v
                   for (k, v) in row.items()} for row in rt_dc['a1']]
            a2 = [{k.lower(): v
                   for (k, v) in row.items()} for row in rt_dc['a2']]
            out_list = []

            for row2 in a2:
                for row1 in a1:
                    if row1['three'] == row2['three']:
                        row = row2
                        row.update(row1)
                        a1.remove(row1)
                        out_list.append(row)

                        break
            out_list.extend(a1)

            cun_names = [
                x.strip() for x in get_value('cunwei_names').split(';')
            ]
            cun_list = []
            other_names = [
                x.strip() for x in get_value('enterprise_names').split(';')
            ]
            other_list = []
            for row in out_list:
                if not row['three']:
                    continue
                #if '村委' in row['three'] or '居委' in row['three']:
                if row['three'] in cun_names:
                    cun_list.append(row)
                elif row['three'] in other_names:
                    other_list.append(row)

            big_10 = []
            se_10 = []
            for row in other_list:
                if row.get('sou_count', 0) > 10:
                    big_10.append(row)
                else:
                    se_10.append(row)

            cun_total = sum([row.get('shou_li', 0) for row in cun_list])
            #other_total = sum([row.get('shou_li', 0) for row in other_list])
            big_10_total = sum([row.get('shou_li', 0) for row in big_10])
            se_10_total = sum([row.get('shou_li', 0) for row in se_10])

            for row in cun_list:
                row['shou_li_score'] = round(
                    5.0 * row.get('shou_li', 0) / cun_total, 3)
            #for row in other_list:
            #row['shou_li_score'] = round( 5.0 * row.get('shou_li', 0) / other_total, 3)
            for row in big_10:
                row['shou_li_score'] = round(
                    5.0 * row.get('shou_li', 0) / big_10_total, 3)
            for row in se_10:
                row['shou_li_score'] = round(
                    5.0 * row.get('shou_li', 0) / se_10_total, 3)

            out_list = cun_list + other_list
            for row in out_list:

                first_total = row.get('first_no', 0) + row.get('first_yes', 0)
                #first_total = first_total
                if not first_total:

                    row['first_ratio'] = ''
                    row['first_score'] = ''
                    first_score = 0
                else:
                    first_ratio = row.get('first_yes', 0) / first_total
                    row['first_score'] = 30.0 * first_ratio
                    row['first_score'] = round(row.get('first_score', 0), 2)
                    row['first_ratio'] = '%s%%' % round(first_ratio * 100)
                    first_score = 30.0 * first_ratio

                row['YuQiGongDan'] = 0
                row['AnShiBanJie_ratio'] = '100%'

                real_solve = row.get('real_solve', 0)
                jie_solve = row.get('jie_solve', 0)

                solve_total = (real_solve + jie_solve) * 1.0
                if solve_total:
                    row['solve_score'] = 20
                    solve_score = 20
                    real_solve_ratio = real_solve / solve_total
                    jie_solve_ratio = jie_solve / solve_total

                    row['real_solve_ratio'] = '%s%%' % round(
                        real_solve_ratio * 100, 2)
                    row['jie_solve_ratio'] = '%s%%' % round(
                        jie_solve_ratio * 100, 2)
                else:
                    solve_score = 0
                    row['real_solve_ratio'] = ''
                    row['jie_solve_ratio'] = ''
                    row['solve_score'] = ''

                manyi_total = row.get('man_yi_total', 0) * 1.0
                if manyi_total:
                    row['man_yi_ratio'] = float(row.get('man_yi',
                                                        0)) / manyi_total
                    man_yi_score = 40 * row.get('man_yi_ratio', 0)
                    row['man_yi_ratio'] = '%s%%' % round(
                        row.get('man_yi_ratio', 0) * 100, 2)
                    row['man_yi_score'] = round(man_yi_score, 2)
                else:
                    man_yi_score = 0
                    row['man_yi_ratio'] = ''
                    row['man_yi_score'] = ''

                row['total_score'] = row.get(
                    'shou_li_score',
                    0) + first_score + solve_score + man_yi_score
                row['total_score'] = round(row.get('total_score', 0), 3)

                name_map_str = get_value('hotline_name_map')
                db_name_map = {}
                for item in json.loads(name_map_str):
                    db_name_map[item['org_name']] = item['new_name']

                row['three'] = db_name_map.get(row['three'], row['three'])

            return out_list
Esempio n. 22
0
pda_map = {
    '新镇居委': ['张永泉', '徐洁'],
    '赵巷居委': ['俞凤雷', '汪健军'],
    '崧泽村': ['周明', '徐卫东'],
    '北崧居委': ['张彩军', '许雅俊'],
    '沈泾塘村': ['范超群', '王坚'],
    '和睦村': ['王陈佳', '瞿翠荣'],
    '金葫芦一居': ['姜嗣杰', '杨豪杰'],
    '金葫芦二居': ['崔文峰', '陈涛'],
    '方夏村': ['张建峰', '唐晨'],
    '中步村': ['万亮', '毛建林'],
    '大型社区': ['毛伟强', '陈建华', '王伟'],
}

# 用数据库,替换源代码
pad_name_list = json.loads(get_value('pad_name_list', '[]'))
pda_map = {}
for item in pad_name_list:
    key = item['dpt_name']
    # 代码中使用的pda_map key 是映射后的
    key = name_map.get(key, key)
    pda_map[key] = item['name_list'].split(',')


class Hotline(TablePage):
    template = 'jb_admin/table.html'

    def get_label(self):
        return '热线报表'

    class tableCls(SimTable):
Esempio n. 23
0
 def check_code(self):
     org_code = get_value(self.code_key, gte=self.code_life)  # 30分钟内
     if org_code:
         if org_code.lower() != self.row.get('validate_code', '').lower():
             return False
     return True
Esempio n. 24
0
def help_view(request):
    ctx = {'help_text': kv.get_value('help_text', '')}

    return render(request, 'hello/help.html', context=ctx)
Esempio n. 25
0
 def get_row(self):
     return {
         'beian_info': get_value('beian_info'),
         'copyright': get_value('copyright'),
         '_director_name': self.get_director_name(),
     }
Esempio n. 26
0
    def get_context(self):
        #named_ctx = get_request_cache()['named_ctx']
        #named_ctx.update({
        #'jobinfo.edit':
        #})
        crt_user = self.request.user
        ctx = {
            'editor_ctx': {
                'layout_editors': [
                    {
                        'editor': 'com-top-home-brand',
                        'username': self.request.user.username
                    },
                    #{
                    #'editor':'com-layout-grid',
                    #'heads':[
                    #{'editor':'com-grid-icon-btn','icon':'/static/images/发布招工.png','label':'发布招工','action':'live_root.open_live("live_attendence_btn",{title:"员工打卡"})'},
                    #{'editor':'com-grid-icon-btn','icon':'/static/images/招工信息.png','label':'求职信息','action':'live_root.open_live("live_attendence_btn",{title:"员工打卡"})'},
                    ##{'editor':'com-grid-icon-btn','icon':'/static/images/招工信息.png','label':'招工信息','table_ctx':AttendenceList().get_head_context(),'action':'live_root.open_live("live_list",scope.head.table_ctx)'},
                    ##{'editor':'com-grid-icon-btn','icon':'/static/images/client.png','label':'我的客户','table_ctx':ClientList().get_head_context(),'action':'live_root.open_live("live_list",scope.head.table_ctx)'},
                    ##{'editor':'com-grid-icon-btn','icon':'/static/images/work_record.png','table_ctx':WorkNoteList().get_head_context(),'label':'工作总结','action':'live_root.open_live("live_list",scope.head.table_ctx)'},
                    ##{'editor':'com-grid-icon-btn','icon':'/static/images/visit.png','label':'拜访记录','table_ctx':VisitList().get_head_context(),'action':'live_root.open_live("live_list",scope.head.table_ctx)'},
                    ###{'editor':'com-grid-icon-btn','icon':'/static/images/myinfo.png','label':'我的资料','fields_ctx':EmployeeForm().get_head_context(),'action':'ex.director_call("get_row",{director_name:scope.head.fields_ctx.director_name}).then((row)=>{scope.head.fields_ctx.row=row; live_root.open_live("live_fields",scope.head.fields_ctx)} )'},
                    ##{'editor':'com-grid-icon-btn','icon':'/static/images/myinfo.png','label':'我的资料','fields_ctx':EmployeeForm().get_head_context(),'action':'live_root.open_live("live_fields",scope.head.fields_ctx)'},
                    #]
                    #},
                    {
                        'editor':
                        'com-van-grid',
                        'title':
                        '商家',
                        'heads': [
                            {
                                'label': '商家认证',
                                'icon': '/static/images/认证.png',
                                'action': 'location = "/mb/com_cert"',
                            },
                            #{'label':'发布招工','icon':'/static/images/发布.png',
                            #'action':'live_root.open_live("live_fields",scope.head.fields_ctx)',
                            #'fields_ctx':{ 'title':'发布招工','after_save':'cfg.toast("发布成功!");setTimeout(()=>{history.back()},1500)',
                            #**JobinfoUserForm().get_context() } },
                            {
                                'label': '发布招工',
                                'icon': '/static/images/发布.png',
                                'action': 'location = "/mb/com_release"',
                                'visible': has_valid_company(crt_user),
                            },
                            {
                                'label': '求职信息',
                                'icon': '/static/images/求职.png',
                                'action':
                                'live_root.open_live("live_list",scope.head.table_ctx)',
                                'table_ctx': {
                                    'title': '求职信息',
                                    'table_editor': 'com-top-seekjob-item',
                                    'block_click':
                                    'live_root.open_live("live_seekjob_detail",{row:scope.row})',
                                    **Seekjob_Company().get_head_context()
                                },
                                'visible': has_valid_company(crt_user),
                            },
                            {
                                'label': '我的发布',
                                'icon': '/static/images/发放.png',
                                'table_ctx': {
                                    'title': '我发布的职位',
                                    #'table_editor':'com-list-row-cell',
                                    #'fields_ctx':{
                                    #'after_save':'cfg.toast("修改成功!");setTimeout(()=>{history.back()},1500);',
                                    #**JobinfoUserForm().get_context(),
                                    #},
                                    #'block_click':'''debugger;scope.ps.vc.ctx.fields_ctx.row=scope.row;
                                    #scope.ps.vc.ctx.fields_ctx.title=scope.row.position;
                                    #live_root.open_live("live_fields",scope.ps.vc.ctx.fields_ctx)''',
                                    **MyJobinfoList().get_head_context()
                                },
                                'action':
                                'live_root.open_live("live_list",scope.head.table_ctx)',
                                'visible': has_valid_company(crt_user),
                            },
                            {
                                'label': '申请列表',
                                'icon': '/static/images/列表.png',
                                'table_ctx': {
                                    'title': '申请列表',
                                    #'block_click':'live_root.open_live("live_company_apply_detail",{jobinfo:scope.row,worker:scope.row.worker})',
                                    'block_click':
                                    ''' ex.director_call("applyrecord.company",{pk:scope.row.pk})
                                        .then(resp=>{
                                          scope.head.fields_ctx.par_row = scope.row
                                          scope.head.fields_ctx.row= resp.row
                                          scope.head.fields_ctx.title= resp.row._label
                                          live_root.open_live("live_fields",scope.head.fields_ctx)
                                       })  ''',
                                    'fields_ctx': {
                                        **ApplyRecordFormCompany().get_head_context(
                                        )
                                    },
                                    'table_editor': 'com-apply-list-company',
                                    **CompanySJobApplyList().get_head_context(
                                    )
                                },
                                'action':
                                'live_root.open_live("live_list",scope.head.table_ctx)',
                                'visible': has_valid_company(crt_user),
                            },

                            #debugger
                            #scope.head.fields_ctx.par_row = scope.row
                        ]
                    },
                    {
                        'editor':
                        'com-van-grid',
                        'title':
                        '个人',
                        'heads': [
                            {
                                'label': '求职认证',
                                'icon': '/static/images/个人简历.png',
                                'action': 'location = "/mb/workercert"',
                            },
                            {
                                'label': '发布求职',
                                'icon': '/static/images/发布招工.png',
                                'action': 'location = "/mb/worker_release"',
                                'visible': has_valid_workinfo(crt_user),
                            },
                            {
                                'label': '招工信息',
                                'icon': '/static/images/工厂招工.png',
                                'action':
                                'live_root.open_live("live_list",scope.head.table_ctx)',
                                'table_ctx': {
                                    **JobinfUserList().get_head_context(),
                                    'title':
                                    '需求职位',
                                    'table_editor':
                                    'com-list-jobinfo-item',
                                    'block_click':
                                    'live_root.open_live("live_jobinfo_detail",{row:scope.row,title:"职位详情",protocol:scope.head.protocol})',
                                    'protocol':
                                    get_value('apply_job_protocol',
                                              '请在后台更新《求职申请协议》'),
                                },
                                'visible': has_valid_workinfo(crt_user),
                            },
                            {
                                'label': '我的求职',
                                'icon': '/static/images/请求.png',
                                'table_ctx': {
                                    'title': '我的求职',
                                    #'table_editor':'com-list-row-cell',
                                    #'fields_ctx':{ 'title':'求职信息',
                                    #'after_save':'cfg.toast("修改成功!");setTimeout(()=>{history.back()},1500);',
                                    #**SeekJobUserForm().get_context() },
                                    #'block_click':'''scope.ps.vc.ctx.fields_ctx.row=scope.row;
                                    #live_root.open_live("live_fields",scope.ps.vc.ctx.fields_ctx)''',
                                    **SeekjobUserList().get_head_context()
                                },
                                'action':
                                'live_root.open_live("live_list",scope.head.table_ctx)',
                                'visible': has_valid_workinfo(crt_user),
                            },
                            {
                                'label': '我的申请',
                                'icon': '/static/images/列表1.png',
                                'table_ctx': {
                                    'title': '我的申请',
                                    'table_editor': 'com-apply-detail',
                                    'block_click':
                                    'cfg.show_load();ex.director_call("d.get_row",{director_name:"MyJobinfoList.edit",pk:scope.row.job}).then((resp)=>{cfg.hide_load(); live_root.open_live("live_jobinfo_detail",{row:resp,title:"职位详情"})  })',
                                    **WorkerSJobApplyList().get_head_context()
                                },
                                'action':
                                'live_root.open_live("live_list",scope.head.table_ctx)',
                                'visible': has_valid_workinfo(crt_user),
                            },
                        ]
                    },
                    {
                        'editor':
                        'com-van-grid',
                        'title':
                        '其他',
                        'heads': [
                            {
                                'label': '资料下载',
                                'icon': '/static/images/下载.png',
                                'action':
                                'live_root.open_live("live_layout",scope.head.live_ctx)',
                                'live_ctx': {
                                    'layout_editors': [
                                        {
                                            'editor': 'com-lay-navbar',
                                            'title': '资料下载',
                                        },
                                        {
                                            'editor':
                                            'com-top-filedownload',
                                            'title':
                                            '企业',
                                            'files': [
                                                {
                                                    'url':
                                                    '/static/material/易职通平台服务合同(企业).docx',
                                                    'label': '易职通平台服务合同(企业认证)'
                                                },
                                                {
                                                    'url':
                                                    '/static/material/服务完成确认单.docx',
                                                    'label': '服务完成确认单'
                                                },
                                            ]
                                        },
                                        {
                                            'editor':
                                            'com-top-filedownload',
                                            'title':
                                            '求职者',
                                            'files': [{
                                                'url':
                                                '/static/material/自由职业者服务协议.docx',
                                                'label':
                                                '自由职业者服务协议(求职者认证)'
                                            }]
                                        },
                                    ]
                                }
                            },
                            {
                                'label': '客服',
                                'icon': '/static/images/客服.png',
                                'action':
                                'live_root.open_live("live_layout",scope.head.live_ctx)',
                                'live_ctx': {
                                    'layout_editors': [
                                        {
                                            'editor': 'com-lay-navbar',
                                            'title': '客服',
                                        },
                                        {
                                            'editor': 'com-top-kefu',
                                            'phone': '0831-2022777',
                                            'worktime': '工作日9:00-17:00'
                                        },
                                    ]
                                }
                            },
                            {
                                'label': '帮助',
                                'icon': '/static/images/帮助.png',
                                'action':
                                'live_root.open_live("live_list",scope.head.table_ctx)',
                                'table_ctx': {
                                    'title': '帮助中心',
                                    'table_editor': 'com-list-row-cell',
                                    'block_click':
                                    'live_root.open_live("live_html",scope.row)',
                                    **MyhelpUserList().get_context()
                                }
                            },
                        ]
                    },
                ]
            },
            'editor': 'live_layout',
        }
        return evalue_container(ctx)
Esempio n. 27
0
def get_duty_info():
    return {
        'yinji_duty':get_value('yinji_duty',''),
        'director_duty':get_value('director_duty',''),
        'infoer_duty':get_value('infoer_duty','')
    }
Esempio n. 28
0
def hotline_complain():
    return {
        'hotline_complain_last':get_value('hotline_complain_last','').split(','),
        'hotline_complain_this':get_value('hotline_complain_this','').split(',')
    }
Esempio n. 29
0
def get_test_com_list():
    return get_value('dev_com_list')
Esempio n. 30
0
 def get_row(self): 
     return {
         '_director_name': self.get_director_name(),
         'wexin_name_list': get_value('wexin_name_list', '[]'),
     }