field(['id as code','name'])->where('status', 1)->select()->toArray(); $this->success('', ['list' => $res]); } public function getGroupList(): void { $model = new AdminGroup(); $res = $model->field(['id as code','name'])->where('status', 1)->select()->toArray(); $this->success('', ['list' => $res]); } public function getDictList(): void { $model = new Commontable(); $res = $model ->field(['code','name']) ->where('status', 1) ->order('weigh asc, id asc') ->select() ->toArray(); $this->success('', ['list' => $res]); } public function getDictDataList(): void { $model = new Commondata(); $type= $this->request->post('type'); if(empty($type)) { $this->error('参数错误'); } $res = $model->field(['code','name']) ->where('status', 1) ->where('type', $type) ->order('weigh asc, id asc') ->select() ->toArray(); $this->success('', ['list' => $res]); } public function getGenderList(): void { $model = new Commondata(); $res = $model ->field(['code','name']) ->where('type', '1') ->where('status', 1) ->order('weigh asc, id asc') ->select() ->toArray(); $this->success('', ['list' => $res]); } public function getNationList(): void { $model = new Commondata(); $res = $model ->field(['code','name']) ->where('type', '2') ->where('status', 1) ->order('weigh asc, id asc') ->select() ->toArray(); $this->success('', ['list' => $res]); } public function getIdCardList(): void { $model = new Commondata(); $res = $model ->field(['code','name']) ->where('type', '3') ->where('status', 1) ->order('weigh asc, id asc') ->select() ->toArray(); $this->success('', ['list' => $res]); } public function getMaritalStatusList(): void { $model = new Commondata(); $res = $model ->field(['code','name']) ->where('type', '4') ->where('status', 1) ->order('weigh asc, id asc') ->select() ->toArray(); $this->success('', ['list' => $res]); } public function getClassList(): void { $model = new Commondata(); $res = $model ->field(['code','name']) ->where('type', '5') ->where('status', 1) ->order('weigh asc, id asc') ->select() ->toArray(); $this->success('', ['list' => $res]); } public function getBodysiteCategList(): void { $model = new Commondata(); $res = $model ->field(['code','name']) ->where('type', '6') ->where('status', 1) ->order('weigh asc, id asc') ->select() ->toArray(); $this->success('', ['list' => $res]); } public function getNoHrReasonList(): void { $model = new Commondata(); $res = $model ->field(['code','name']) ->where('type', '7') ->where('status', 1) ->order('weigh asc, id asc') ->select() ->toArray(); $this->success('', ['list' => $res]); } public function getInsTypeList(): void { $model = new Commondata(); $res = $model ->field(['code','name']) ->where('type', '8') ->where('status', 1) ->order('weigh asc, id asc') ->select() ->toArray(); $this->success('', ['list' => $res]); } public function getHrRangeList(): void { $model = new Commondata(); $res = $model ->field(['code','name']) ->where('type', '9') ->where('status', 1) ->order('weigh asc, id asc') ->select() ->toArray(); $this->success('', ['list' => $res]); } public function getModalityList(): void { $model = new Commondata(); $res = $model ->field(['code','code as name']) ->where('type', '10') ->where('status', 1) ->order('weigh asc, id asc') ->select() ->toArray(); $this->success('', ['list' => $res]); } public function getUser():void { set_time_limit(0); $model = new Admin(); $res = $model ->field(['id','nickname as name']) ->where('status',1) ->where('is_admin',1) ->select() ->toArray(); foreach ($res as $k=>$v) { unset($res[$k]['group_arr']); unset($res[$k]['group_name_arr']); } $this->success('', ['list' => $res]); } }