123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205 |
- <?php
- $group = function()
- {
- $array = array();
- $data = Dever::load('manage/group-state');
- if($data)
- {
- $array += $data;
- }
- return $array;
- };
- $cadre = function()
- {
- // $array = array();
- $array = array
- (
- -1 => array('id' => '-1', 'name' => '请选择'),
- );
- $data = Dever::load('manage/admin-state');
- if($data)
- {
- foreach ($data as $k => $v) {
- $data[$k]['name'] = $v['username'];
- }
- $array += $data;
- }
- return $array;
- };
- $type = array
- (
- 1 => '发送',
- 2 => '不发送',
- );
- return array
- (
- # 表名
- 'name' => 'branch',
- # 显示给用户看的名称
- 'lang' => '相关部门设置',
- # 后台菜单排序
- 'order' => 94,
- // 'menu' => false,
- // 'auto' => 100000,
- // 'check' => 'group_id',
- 'start' => array
- (
- 'insert' => 'work/lib/appoint.startBranch',
- 'update' => 'work/lib/appoint.startBranch',
- ),
- 'end' => array
- (
- 'insert' => 'work/lib/appoint.updateBranch',
- 'update' => 'work/lib/appoint.updateBranch',
- ),
- # 数据结构
- 'struct' => array
- (
- 'id' => array
- (
- 'type' => 'int-11',
- 'name' => 'ID',
- 'default' => '',
- 'desc' => '',
- 'match' => 'is_numeric',
- 'search' => 'order',
- 'list' => true,
- 'order' => 'desc',
- ),
- 'company_id' => array
- (
- 'type' => 'int-11',
- 'name' => '所属公司',
- 'default' => '1',
- 'desc' => '所属公司',
- 'match' => 'is_numeric',
- 'update' => 'hidden',
- //'search' => $company ? 'select' : false,
- //'list' => true,
- ),
- 'group' => array
- (
- 'type' => 'varchar-100',
- 'name' => '部门和负责人',
- 'default' => '-1',
- 'desc' => '部门名称',
- 'match' => 'is_string',
- // 'option' => $group,
- 'update' => 'linkage',
- 'option' => Dever::url('lib/appoint.get?level_total=2&type=1', 'work'),
- 'list' => 'Dever::load("work/lib/manage.xietiao#group",{id})',
- 'load' => 'coor',
- ),
- 'group_id' => array
- (
- 'type' => 'int-11',
- 'name' => '部门',
- 'default' => '-1',
- 'desc' => '部门id',
- 'match' => 'is_string',
- 'option' => $group,
- 'update' => 'hidden',
- ),
- 'coor' => array
- (
- 'type' => 'varchar-2000',
- 'name' => '协调人',
- 'default' => '',
- 'desc' => '请先选择协调人',
- 'match' => 'option',
- 'update' => 'load',
- 'update_load' => array('work/lib/manage.getCoor', 'group'),
- ),
- 'type' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '是否发送每日汇总邮件通知',
- 'default' => '2',
- 'desc' => '是否发送每日汇总邮件通知',
- 'match' => 'is_numeric',
- 'update' => 'radio',
- 'option' => $type,
- // 'search' => 'select',
- // 'list' => true,
- ),
- #弃用,实时查询
- 'num' => array
- (
- 'type' => 'int-11',
- 'name' => '关联问题数',
- 'default' => '0',
- 'desc' => '数量',
- 'match' => 'option',
- 'update' => 'hidden',
- 'list' => 'Dever::load("work/lib/manage.xietiao#num",{id})',
- ),
- 'reorder' => array
- (
- 'type' => 'int-11',
- 'name' => '排序-数值越大越靠前',
- 'default' => '1',
- 'desc' => '请输入排序',
- 'match' => 'option',
- 'update' => 'text',
- 'search' => 'order',
- 'list' => true,
- 'order' => 'desc',
- 'edit' => true,
- ),
- 'state' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '状态',
- 'default' => '1',
- 'desc' => '请选择状态',
- 'match' => 'is_numeric',
- ),
-
- 'cdate' => array
- (
- 'type' => 'int-11',
- 'name' => '创建时间',
- 'match' => array('is_numeric', time()),
- 'desc' => '',
- # 只有insert时才生效
- 'insert' => true,
- 'list' => 'date("Y-m-d H:i:s", {cdate})',
- ),
- ),
- 'manage' => array
- (
- //'insert' => false,
- 'delete' => false,
- // 'edit' => false,
- 'list_button' => array
- (
- 'list' => array('关联问题列表', '"question&search_option_branch_id={group_id}&oper_table=branch"')
- ),
- # 设置公司权限
- 'company' => 'company_id',
- ),
- 'request' => array
- (
- 'getAll' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- // 'id' => array('yes','>'),
- 'state' => 1,
- ),
- 'type' => 'all',
- 'order' => array('reorder' => 'desc', 'id' => 'asc'),
- 'col' => '*',
- ),
- ),
- );
|