正在显示
39 个修改的文件
包含
1716 行增加
和
52 行删除
@@ -4,8 +4,10 @@ namespace app\admin\controller; | @@ -4,8 +4,10 @@ namespace app\admin\controller; | ||
4 | 4 | ||
5 | use app\admin\model\AdminLog; | 5 | use app\admin\model\AdminLog; |
6 | use app\common\controller\Backend; | 6 | use app\common\controller\Backend; |
7 | +use app\common\helper\HttpHelper; | ||
7 | use think\Config; | 8 | use think\Config; |
8 | use think\Hook; | 9 | use think\Hook; |
10 | +use think\Session; | ||
9 | use think\Validate; | 11 | use think\Validate; |
10 | 12 | ||
11 | /** | 13 | /** |
@@ -31,12 +33,18 @@ class Index extends Backend | @@ -31,12 +33,18 @@ class Index extends Backend | ||
31 | */ | 33 | */ |
32 | public function index() | 34 | public function index() |
33 | { | 35 | { |
36 | + $cookieArr = ['adminskin' => "/^skin\-([a-z\-]+)\$/i", 'multiplenav' => "/^(0|1)\$/", 'multipletab' => "/^(0|1)\$/", 'show_submenu' => "/^(0|1)\$/"]; | ||
37 | + foreach ($cookieArr as $key => $regex) { | ||
38 | + $cookieValue = $this->request->cookie($key); | ||
39 | + if (!is_null($cookieValue) && preg_match($regex, $cookieValue)) { | ||
40 | + config('fastadmin.' . $key, $cookieValue); | ||
41 | + } | ||
42 | + } | ||
34 | //左侧菜单 | 43 | //左侧菜单 |
35 | list($menulist, $navlist, $fixedmenu, $referermenu) = $this->auth->getSidebar([ | 44 | list($menulist, $navlist, $fixedmenu, $referermenu) = $this->auth->getSidebar([ |
36 | -// 'dashboard' => 'hot', | ||
37 | -// 'addon' => ['new', 'red', 'badge'], | ||
38 | -// 'auth/rule' => __('Menu'), | ||
39 | -// 'general' => ['new', 'purple'], | 45 | + 'dashboard' => 'hot', |
46 | + 'addon' => ['new', 'red', 'badge'], | ||
47 | + 'auth/rule' => __('Menu'), | ||
40 | ], $this->view->site['fixedpage']); | 48 | ], $this->view->site['fixedpage']); |
41 | $action = $this->request->request('action'); | 49 | $action = $this->request->request('action'); |
42 | if ($this->request->isPost()) { | 50 | if ($this->request->isPost()) { |
@@ -44,6 +52,7 @@ class Index extends Backend | @@ -44,6 +52,7 @@ class Index extends Backend | ||
44 | $this->success('', null, ['menulist' => $menulist, 'navlist' => $navlist]); | 52 | $this->success('', null, ['menulist' => $menulist, 'navlist' => $navlist]); |
45 | } | 53 | } |
46 | } | 54 | } |
55 | + $this->assignconfig('cookie', ['prefix' => config('cookie.prefix')]); | ||
47 | $this->view->assign('menulist', $menulist); | 56 | $this->view->assign('menulist', $menulist); |
48 | $this->view->assign('navlist', $navlist); | 57 | $this->view->assign('navlist', $navlist); |
49 | $this->view->assign('fixedmenu', $fixedmenu); | 58 | $this->view->assign('fixedmenu', $fixedmenu); |
@@ -57,13 +66,42 @@ class Index extends Backend | @@ -57,13 +66,42 @@ class Index extends Backend | ||
57 | */ | 66 | */ |
58 | public function login() | 67 | public function login() |
59 | { | 68 | { |
60 | - $url = $this->request->get('url', 'index/index'); | 69 | + $token = $this->request->param('token'); |
70 | + if($token){ | ||
71 | + //请求token数据 url | ||
72 | + $tokenurl="http://uims.tenyes.cn/login/token"; | ||
73 | + $param = ["token" => $token]; | ||
74 | + $res = HttpHelper::post($tokenurl, $param); | ||
75 | + $res=json_decode($res,true); | ||
76 | + if ($res["code"]==200){ | ||
77 | + $phone=$res['data']['usrInfo']['phone']; | ||
78 | + $keeplogin=""; | ||
79 | + $keeyloginhours=24; | ||
80 | + $result = $this->auth->loginbyphone($phone, $keeplogin ? $keeyloginhours * 3600 : 0); | ||
81 | + $url = $this->request->get('url', '', 'url_clean'); | ||
82 | + $url = $url ?: 'index/index'; | ||
83 | + if ($result === true) { | ||
84 | + Hook::listen("admin_login_after", $this->request); | ||
85 | + $this->redirect('index/newlogin'); | ||
86 | + } else { | ||
87 | + $msg = $this->auth->getError(); | ||
88 | + $msg = $msg ? $msg : __('Username or password is incorrect'); | ||
89 | + $this->error($msg, $url, ['token' => $this->request->token()]); | ||
90 | + } | ||
91 | + }else{ | ||
92 | + $this->error("token失效"); | ||
93 | + } | ||
94 | + } | ||
95 | + $url = $this->request->get('url', '', 'url_clean'); | ||
96 | + $url = $url ?: 'index/index'; | ||
61 | if ($this->auth->isLogin()) { | 97 | if ($this->auth->isLogin()) { |
62 | $this->success(__("You've logged in, do not login again"), $url); | 98 | $this->success(__("You've logged in, do not login again"), $url); |
63 | } | 99 | } |
100 | + //保持会话有效时长,单位:小时 | ||
101 | + $keeyloginhours = 24; | ||
64 | if ($this->request->isPost()) { | 102 | if ($this->request->isPost()) { |
65 | $username = $this->request->post('username'); | 103 | $username = $this->request->post('username'); |
66 | - $password = $this->request->post('password'); | 104 | + $password = $this->request->post('password', '', null); |
67 | $keeplogin = $this->request->post('keeplogin'); | 105 | $keeplogin = $this->request->post('keeplogin'); |
68 | $token = $this->request->post('__token__'); | 106 | $token = $this->request->post('__token__'); |
69 | $rule = [ | 107 | $rule = [ |
@@ -86,7 +124,7 @@ class Index extends Backend | @@ -86,7 +124,7 @@ class Index extends Backend | ||
86 | $this->error($validate->getError(), $url, ['token' => $this->request->token()]); | 124 | $this->error($validate->getError(), $url, ['token' => $this->request->token()]); |
87 | } | 125 | } |
88 | AdminLog::setTitle(__('Login')); | 126 | AdminLog::setTitle(__('Login')); |
89 | - $result = $this->auth->login($username, $password, $keeplogin ? 86400 : 0); | 127 | + $result = $this->auth->login($username, $password, $keeplogin ? $keeyloginhours * 3600 : 0); |
90 | if ($result === true) { | 128 | if ($result === true) { |
91 | Hook::listen("admin_login_after", $this->request); | 129 | Hook::listen("admin_login_after", $this->request); |
92 | $this->success(__('Login successful'), $url, ['url' => $url, 'id' => $this->auth->id, 'username' => $username, 'avatar' => $this->auth->avatar]); | 130 | $this->success(__('Login successful'), $url, ['url' => $url, 'id' => $this->auth->id, 'username' => $username, 'avatar' => $this->auth->avatar]); |
@@ -99,16 +137,27 @@ class Index extends Backend | @@ -99,16 +137,27 @@ class Index extends Backend | ||
99 | 137 | ||
100 | // 根据客户端的cookie,判断是否可以自动登录 | 138 | // 根据客户端的cookie,判断是否可以自动登录 |
101 | if ($this->auth->autologin()) { | 139 | if ($this->auth->autologin()) { |
140 | + Session::delete("referer"); | ||
102 | $this->redirect($url); | 141 | $this->redirect($url); |
103 | } | 142 | } |
104 | $background = Config::get('fastadmin.login_background'); | 143 | $background = Config::get('fastadmin.login_background'); |
105 | $background = $background ? (stripos($background, 'http') === 0 ? $background : config('site.cdnurl') . $background) : ''; | 144 | $background = $background ? (stripos($background, 'http') === 0 ? $background : config('site.cdnurl') . $background) : ''; |
145 | + $this->view->assign('keeyloginhours', $keeyloginhours); | ||
106 | $this->view->assign('background', $background); | 146 | $this->view->assign('background', $background); |
107 | $this->view->assign('title', __('Login')); | 147 | $this->view->assign('title', __('Login')); |
108 | Hook::listen("admin_login_init", $this->request); | 148 | Hook::listen("admin_login_init", $this->request); |
109 | return $this->view->fetch(); | 149 | return $this->view->fetch(); |
110 | } | 150 | } |
111 | 151 | ||
152 | + public function newlogin(){ | ||
153 | + $background = Config::get('fastadmin.login_background'); | ||
154 | + $background = $background ? (stripos($background, 'http') === 0 ? $background : config('site.cdnurl') . $background) : ''; | ||
155 | + $this->view->assign('keeyloginhours', 24); | ||
156 | + $this->view->assign('background', $background); | ||
157 | + $this->view->assign('title', __('Login')); | ||
158 | + Hook::listen("admin_login_init", $this->request); | ||
159 | + return $this->view->fetch(); | ||
160 | + } | ||
112 | /** | 161 | /** |
113 | * 退出登录 | 162 | * 退出登录 |
114 | */ | 163 | */ |
1 | +<?php | ||
2 | + | ||
3 | +namespace app\admin\controller; | ||
4 | + | ||
5 | +use app\common\controller\Backend; | ||
6 | + | ||
7 | +/** | ||
8 | + * 河道流量管理 | ||
9 | + * | ||
10 | + * @icon fa fa-circle-o | ||
11 | + */ | ||
12 | +class ReservoirRainRiverFlow extends Backend | ||
13 | +{ | ||
14 | + | ||
15 | + /** | ||
16 | + * ReservoirRainRiverFlow模型对象 | ||
17 | + * @var \app\admin\model\ReservoirRainRiverFlow | ||
18 | + */ | ||
19 | + protected $model = null; | ||
20 | + | ||
21 | + public function _initialize() | ||
22 | + { | ||
23 | + parent::_initialize(); | ||
24 | + $this->model = new \app\admin\model\ReservoirRainRiverFlow; | ||
25 | + $this->view->assign("statusList", $this->model->getStatusList()); | ||
26 | + $this->view->assign("waterLevelWarningList", $this->model->getWaterLevelWarningList()); | ||
27 | + } | ||
28 | + | ||
29 | + public function import() | ||
30 | + { | ||
31 | + parent::import(); | ||
32 | + } | ||
33 | + | ||
34 | + /** | ||
35 | + * 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法 | ||
36 | + * 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑 | ||
37 | + * 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改 | ||
38 | + */ | ||
39 | + | ||
40 | + | ||
41 | + /** | ||
42 | + * 查看 | ||
43 | + */ | ||
44 | + public function index() | ||
45 | + { | ||
46 | + //当前是否为关联查询 | ||
47 | + $this->relationSearch = true; | ||
48 | + //设置过滤方法 | ||
49 | + $this->request->filter(['strip_tags', 'trim']); | ||
50 | + if ($this->request->isAjax()) { | ||
51 | + //如果发送的来源是Selectpage,则转发到Selectpage | ||
52 | + if ($this->request->request('keyField')) { | ||
53 | + return $this->selectpage(); | ||
54 | + } | ||
55 | + list($where, $sort, $order, $offset, $limit) = $this->buildparams(); | ||
56 | + | ||
57 | + $list = $this->model | ||
58 | + ->with(['reservoirequipment']) | ||
59 | + ->where($where) | ||
60 | + ->order($sort, $order) | ||
61 | + ->paginate($limit); | ||
62 | + | ||
63 | + foreach ($list as $row) { | ||
64 | + $row->visible(['id','number','status','flow','accumulate_flow','velocity_flow','water_level','water_level_warning','createtime','reporttime','issend','updatetime']); | ||
65 | + $row->visible(['reservoirequipment']); | ||
66 | + $row->getRelation('reservoirequipment')->visible(['name']); | ||
67 | + } | ||
68 | + | ||
69 | + $result = array("total" => $list->total(), "rows" => $list->items()); | ||
70 | + | ||
71 | + return json($result); | ||
72 | + } | ||
73 | + return $this->view->fetch(); | ||
74 | + } | ||
75 | + | ||
76 | +} |
application/admin/controller/Waterworks.php
0 → 100644
1 | +<?php | ||
2 | + | ||
3 | +namespace app\admin\controller; | ||
4 | + | ||
5 | +use app\common\controller\Backend; | ||
6 | + | ||
7 | +/** | ||
8 | + * 水厂管理 | ||
9 | + * | ||
10 | + * @icon fa fa-circle-o | ||
11 | + */ | ||
12 | +class Waterworks extends Backend | ||
13 | +{ | ||
14 | + | ||
15 | + /** | ||
16 | + * Waterworks模型对象 | ||
17 | + * @var \app\admin\model\Waterworks | ||
18 | + */ | ||
19 | + protected $model = null; | ||
20 | + | ||
21 | + public function _initialize() | ||
22 | + { | ||
23 | + parent::_initialize(); | ||
24 | + $this->model = new \app\admin\model\Waterworks; | ||
25 | + | ||
26 | + } | ||
27 | + | ||
28 | + public function import() | ||
29 | + { | ||
30 | + parent::import(); | ||
31 | + } | ||
32 | + | ||
33 | + /** | ||
34 | + * 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法 | ||
35 | + * 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑 | ||
36 | + * 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改 | ||
37 | + */ | ||
38 | + | ||
39 | + | ||
40 | +} |
1 | +<?php | ||
2 | + | ||
3 | +namespace app\admin\controller\reservoir\rain\river; | ||
4 | + | ||
5 | +use app\common\controller\Backend; | ||
6 | +use think\Db; | ||
7 | + | ||
8 | +/** | ||
9 | + * 河道流量管理 | ||
10 | + * | ||
11 | + * @icon fa fa-circle-o | ||
12 | + */ | ||
13 | +class Flow extends Backend | ||
14 | +{ | ||
15 | + | ||
16 | + /** | ||
17 | + * Flow模型对象 | ||
18 | + * @var \app\admin\model\reservoir\rain\river\Flow | ||
19 | + */ | ||
20 | + protected $model = null; | ||
21 | + | ||
22 | + public function _initialize() | ||
23 | + { | ||
24 | + parent::_initialize(); | ||
25 | + $this->model = new \app\admin\model\reservoir\rain\river\Flow; | ||
26 | + $this->view->assign("statusList", $this->model->getStatusList()); | ||
27 | + $this->view->assign("waterLevelWarningList", $this->model->getWaterLevelWarningList()); | ||
28 | + } | ||
29 | + | ||
30 | + public function import() | ||
31 | + { | ||
32 | + parent::import(); | ||
33 | + } | ||
34 | + | ||
35 | + /** | ||
36 | + * 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法 | ||
37 | + * 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑 | ||
38 | + * 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改 | ||
39 | + */ | ||
40 | + | ||
41 | + | ||
42 | + /** | ||
43 | + * 查看 | ||
44 | + */ | ||
45 | + public function index() | ||
46 | + { | ||
47 | + //当前是否为关联查询 | ||
48 | + $this->relationSearch = true; | ||
49 | + //设置过滤方法 | ||
50 | + $this->request->filter(['strip_tags', 'trim']); | ||
51 | + if ($this->request->isAjax()) { | ||
52 | + //如果发送的来源是Selectpage,则转发到Selectpage | ||
53 | + if ($this->request->request('keyField')) { | ||
54 | + return $this->selectpage(); | ||
55 | + } | ||
56 | + list($where, $sort, $order, $offset, $limit) = $this->buildparams(); | ||
57 | + | ||
58 | + $list = $this->model | ||
59 | + ->with(['reservoirlist','equipment']) | ||
60 | + ->where($where) | ||
61 | + ->order($sort, $order) | ||
62 | + ->paginate($limit); | ||
63 | + | ||
64 | + foreach ($list as $row) { | ||
65 | + $row->visible(['id','number','status','flow','accumulate_flow','velocity_flow','water_level','water_level_warning','createtime','reporttime']); | ||
66 | + $row->visible(['reservoirlist']); | ||
67 | + $row->getRelation('reservoirlist')->visible(['name']); | ||
68 | + $row->visible(['equipment']); | ||
69 | + $row->getRelation('equipment')->visible(['name']); | ||
70 | + } | ||
71 | + | ||
72 | + $result = array("total" => $list->total(), "rows" => $list->items()); | ||
73 | + | ||
74 | + return json($result); | ||
75 | + } | ||
76 | + | ||
77 | + //有雨量计的水库 | ||
78 | + $wh = []; | ||
79 | + $wh["b.type"] = ["=", "7"];//设备类型:1=水位计,2=渗流计,3=渗压计,4=GNSS,5=雨量计,6=位移检测,7=其他 | ||
80 | + $equipment = Db::name("reservoir_list")->alias("a") | ||
81 | + ->join("reservoir_equipment b", "b.reservoir_id=a.id") | ||
82 | + ->where($wh) | ||
83 | + ->field("a.id,b.deviceId,CONCAT(b.name,b.deviceId) as name") | ||
84 | + ->select(); | ||
85 | + //最近一周 | ||
86 | + $date = []; | ||
87 | + for ($i = 6; $i >= 0; $i--) { | ||
88 | + $beginTime = mktime(00, 00, 00, date('m'), date('d') - $i, date('Y')); | ||
89 | + $endTime = mktime(23, 59, 59, date("m"), date("d") - $i, date("Y")); | ||
90 | + array_push($date, date("Y-m-d", $beginTime)); | ||
91 | + } | ||
92 | + | ||
93 | + $rainfall_series = []; | ||
94 | + if (!empty($equipment)) { | ||
95 | + foreach ($equipment as $k => $v) { | ||
96 | + //最近7天最后一条数据 | ||
97 | + $date_value = []; | ||
98 | + $now_date = strtotime(date("Y-m-d")) + 9 * 3600;//当天 08:00 | ||
99 | + | ||
100 | + for ($i = 6; $i >= 0; $i--) { | ||
101 | + $beginTime = mktime(00, 00, 00, date('m'), date('d') - $i, date('Y')); | ||
102 | + $endTime = mktime(8, 59, 59, date("m"), date("d") - $i + 1, date("Y")); | ||
103 | +// array_push($date, date("m/d", $beginTime)); | ||
104 | + if ($i == 0 && time() < $now_date) { | ||
105 | + //当前时间在当日08:00前 | ||
106 | + $rr = 0; | ||
107 | + } else { | ||
108 | + $rr = ""; | ||
109 | + $wh = []; | ||
110 | + $wh["reservoir_id"] = ["eq", $v['id']]; | ||
111 | + $wh["number"] = ["eq", $v['deviceId']]; | ||
112 | + $wh["createtime"] = ["between", [$beginTime, $endTime]]; | ||
113 | + $rr = Db::name("reservoir_rain_river_flow")->where($wh)->order("createtime desc")->value("flow"); | ||
114 | + } | ||
115 | + $rr = $rr == null ? 0 : $rr; | ||
116 | + array_push($date_value, $rr); | ||
117 | + } | ||
118 | + $rainfall_series[] = [ | ||
119 | + 'type' => "line", | ||
120 | + "stack" => 'Total', | ||
121 | + "name" => $v['name'], | ||
122 | + 'data' => $date_value, | ||
123 | + ]; | ||
124 | + } | ||
125 | + } | ||
126 | + | ||
127 | + $this->assignconfig("equipment", array_column($equipment, "name")); | ||
128 | + $this->assignconfig("date", $date); | ||
129 | + $this->assignconfig("rainfall_series", $rainfall_series); | ||
130 | + return $this->view->fetch(); | ||
131 | + } | ||
132 | + | ||
133 | +} |
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | return [ | 3 | return [ |
4 | + 'Email' => '电子邮箱', | ||
5 | + 'Mobile' => '手机号', | ||
4 | 'Group' => '所属组别', | 6 | 'Group' => '所属组别', |
5 | 'Loginfailure' => '登录失败次数', | 7 | 'Loginfailure' => '登录失败次数', |
6 | 'Login time' => '最后登录', | 8 | 'Login time' => '最后登录', |
7 | 'The parent group exceeds permission limit' => '父组别超出权限范围', | 9 | 'The parent group exceeds permission limit' => '父组别超出权限范围', |
8 | - 'Please input correct username' => '用户名只能由3-12位数字、字母、下划线组合', | ||
9 | - 'Please input correct password' => '密码长度必须在6-16位之间,不能包含空格', | 10 | + 'Please input correct username' => '用户名只能由3-30位数字、字母、下划线组合', |
11 | + 'Username must be 3 to 30 characters' => '用户名只能由3-30位数字、字母、下划线组合', | ||
12 | + 'Please input correct password' => '密码长度必须在6-30位之间,不能包含空格', | ||
13 | + 'Password must be 6 to 30 characters' => '密码长度必须在6-30位之间,不能包含空格', | ||
10 | ]; | 14 | ]; |
1 | +<?php | ||
2 | + | ||
3 | +return [ | ||
4 | + 'Number' => '设备编号', | ||
5 | + 'Status' => '设备状态', | ||
6 | + 'Status 0' => '启用', | ||
7 | + 'Status 1' => '停用', | ||
8 | + 'Flow' => '瞬时流量(L/s)', | ||
9 | + 'Accumulate_flow' => '累计流量(L)', | ||
10 | + 'Velocity_flow' => '流速(m/s)', | ||
11 | + 'Water_level' => '水位(m)', | ||
12 | + 'Water_level_warning' => '水位预警', | ||
13 | + 'Water_level_warning 0' => '正常', | ||
14 | + 'Water_level_warning 1' => '异常', | ||
15 | + 'Precipitation' => '降水量', | ||
16 | + 'Createtime' => '创建时间', | ||
17 | + 'Reporttime' => '采集时间', | ||
18 | + 'Reservoir_id' => '水库id', | ||
19 | + 'Reservoirlist.name' => '名称', | ||
20 | + 'Reservoirequipment.name' => '设备名称' | ||
21 | +]; |
1 | +<?php | ||
2 | + | ||
3 | +return [ | ||
4 | + 'Number' => '设备编号', | ||
5 | + 'Status' => '设备状态', | ||
6 | + 'Status 0' => '启用', | ||
7 | + 'Status 1' => '停用', | ||
8 | + 'Flow' => '瞬时流量', | ||
9 | + 'Accumulate_flow' => '累计流量', | ||
10 | + 'Velocity_flow' => '流速', | ||
11 | + 'Water_level' => '水位', | ||
12 | + 'Water_level_warning' => '水位预警', | ||
13 | + 'Water_level_warning 0' => '正常', | ||
14 | + 'Water_level_warning 1' => '异常', | ||
15 | + 'Createtime' => '创建时间', | ||
16 | + 'Reporttime' => '采集时间', | ||
17 | + 'Reservoir_id' => '水库id', | ||
18 | + 'Reservoirequipment.name' => '设备名称' | ||
19 | +]; |
application/admin/lang/zh-cn/waterworks.php
0 → 100644
@@ -51,7 +51,7 @@ class Auth extends \fast\Auth | @@ -51,7 +51,7 @@ class Auth extends \fast\Auth | ||
51 | $this->setError('Please try again after 1 day'); | 51 | $this->setError('Please try again after 1 day'); |
52 | return false; | 52 | return false; |
53 | } | 53 | } |
54 | - if ($admin->password != md5(md5($password) . $admin->salt)) { | 54 | + if ($admin->password != $this->getEncryptPassword($password, $admin->salt)) { |
55 | $admin->loginfailure++; | 55 | $admin->loginfailure++; |
56 | $admin->save(); | 56 | $admin->save(); |
57 | $this->setError('Password is incorrect'); | 57 | $this->setError('Password is incorrect'); |
@@ -63,7 +63,42 @@ class Auth extends \fast\Auth | @@ -63,7 +63,42 @@ class Auth extends \fast\Auth | ||
63 | $admin->token = Random::uuid(); | 63 | $admin->token = Random::uuid(); |
64 | $admin->save(); | 64 | $admin->save(); |
65 | Session::set("admin", $admin->toArray()); | 65 | Session::set("admin", $admin->toArray()); |
66 | - $this->keeplogin($keeptime); | 66 | + Session::set("admin.safecode", $this->getEncryptSafecode($admin)); |
67 | + $this->keeplogin($admin, $keeptime); | ||
68 | + return true; | ||
69 | + } | ||
70 | + | ||
71 | + /** | ||
72 | + * 管理员手机号登录 | ||
73 | + * | ||
74 | + * @param string $phoine 手机号 | ||
75 | + * @param int $keeptime 有效时长 | ||
76 | + * @return boolean | ||
77 | + */ | ||
78 | + public function loginbyphone($phoine, $keeptime = 0) | ||
79 | + { | ||
80 | + $admin = Admin::get(['mobile' => $phoine]); | ||
81 | + if (!$admin) { | ||
82 | + $this->setError('Username is incorrect'); | ||
83 | + return false; | ||
84 | + } | ||
85 | + if ($admin['status'] == 'hidden') { | ||
86 | + $this->setError('Admin is forbidden'); | ||
87 | + return false; | ||
88 | + } | ||
89 | + if (Config::get('fastadmin.login_failure_retry') && $admin->loginfailure >= 10 && time() - $admin->updatetime < 86400) { | ||
90 | + $this->setError('Please try again after 1 day'); | ||
91 | + return false; | ||
92 | + } | ||
93 | + | ||
94 | + $admin->loginfailure = 0; | ||
95 | + $admin->logintime = time(); | ||
96 | + $admin->loginip = request()->ip(); | ||
97 | + $admin->token = Random::uuid(); | ||
98 | + $admin->save(); | ||
99 | + Session::set("admin", $admin->toArray()); | ||
100 | + Session::set("admin.safecode", $this->getEncryptSafecode($admin)); | ||
101 | + $this->keeplogin($admin, $keeptime); | ||
67 | return true; | 102 | return true; |
68 | } | 103 | } |
69 | 104 | ||
@@ -80,6 +115,7 @@ class Auth extends \fast\Auth | @@ -80,6 +115,7 @@ class Auth extends \fast\Auth | ||
80 | $this->logined = false; //重置登录状态 | 115 | $this->logined = false; //重置登录状态 |
81 | Session::delete("admin"); | 116 | Session::delete("admin"); |
82 | Cookie::delete("keeplogin"); | 117 | Cookie::delete("keeplogin"); |
118 | + setcookie('fastadmin_userinfo', '', $_SERVER['REQUEST_TIME'] - 3600, rtrim(url("/" . request()->module(), '', false), '/')); | ||
83 | return true; | 119 | return true; |
84 | } | 120 | } |
85 | 121 | ||
@@ -100,7 +136,7 @@ class Auth extends \fast\Auth | @@ -100,7 +136,7 @@ class Auth extends \fast\Auth | ||
100 | return false; | 136 | return false; |
101 | } | 137 | } |
102 | //token有变更 | 138 | //token有变更 |
103 | - if ($key != md5(md5($id) . md5($keeptime) . md5($expiretime) . $admin->token . config('token.key'))) { | 139 | + if ($key != $this->getKeeploginKey($admin, $keeptime, $expiretime)) { |
104 | return false; | 140 | return false; |
105 | } | 141 | } |
106 | $ip = request()->ip(); | 142 | $ip = request()->ip(); |
@@ -109,8 +145,9 @@ class Auth extends \fast\Auth | @@ -109,8 +145,9 @@ class Auth extends \fast\Auth | ||
109 | return false; | 145 | return false; |
110 | } | 146 | } |
111 | Session::set("admin", $admin->toArray()); | 147 | Session::set("admin", $admin->toArray()); |
148 | + Session::set("admin.safecode", $this->getEncryptSafecode($admin)); | ||
112 | //刷新自动登录的时效 | 149 | //刷新自动登录的时效 |
113 | - $this->keeplogin($keeptime); | 150 | + $this->keeplogin($admin, $keeptime); |
114 | return true; | 151 | return true; |
115 | } else { | 152 | } else { |
116 | return false; | 153 | return false; |
@@ -123,18 +160,64 @@ class Auth extends \fast\Auth | @@ -123,18 +160,64 @@ class Auth extends \fast\Auth | ||
123 | * @param int $keeptime | 160 | * @param int $keeptime |
124 | * @return boolean | 161 | * @return boolean |
125 | */ | 162 | */ |
126 | - protected function keeplogin($keeptime = 0) | 163 | + protected function keeplogin($admin, $keeptime = 0) |
127 | { | 164 | { |
128 | if ($keeptime) { | 165 | if ($keeptime) { |
129 | $expiretime = time() + $keeptime; | 166 | $expiretime = time() + $keeptime; |
130 | - $key = md5(md5($this->id) . md5($keeptime) . md5($expiretime) . $this->token . config('token.key')); | ||
131 | - $data = [$this->id, $keeptime, $expiretime, $key]; | ||
132 | - Cookie::set('keeplogin', implode('|', $data), 86400 * 7); | 167 | + $key = $this->getKeeploginKey($admin, $keeptime, $expiretime); |
168 | + Cookie::set('keeplogin', implode('|', [$admin['id'], $keeptime, $expiretime, $key]), $keeptime); | ||
133 | return true; | 169 | return true; |
134 | } | 170 | } |
135 | return false; | 171 | return false; |
136 | } | 172 | } |
137 | 173 | ||
174 | + /** | ||
175 | + * 获取密码加密后的字符串 | ||
176 | + * @param string $password 密码 | ||
177 | + * @param string $salt 密码盐 | ||
178 | + * @return string | ||
179 | + */ | ||
180 | + public function getEncryptPassword($password, $salt = '') | ||
181 | + { | ||
182 | + return md5(md5($password) . $salt); | ||
183 | + } | ||
184 | + | ||
185 | + /** | ||
186 | + * 获取密码加密后的自动登录码 | ||
187 | + * @param string $password 密码 | ||
188 | + * @param string $salt 密码盐 | ||
189 | + * @return string | ||
190 | + */ | ||
191 | + public function getEncryptKeeplogin($params, $keeptime) | ||
192 | + { | ||
193 | + $expiretime = time() + $keeptime; | ||
194 | + $key = md5(md5($params['id']) . md5($keeptime) . md5($expiretime) . $params['token'] . config('token.key')); | ||
195 | + return implode('|', [$this->id, $keeptime, $expiretime, $key]); | ||
196 | + } | ||
197 | + | ||
198 | + /** | ||
199 | + * 获取自动登录Key | ||
200 | + * @param $params | ||
201 | + * @param $keeptime | ||
202 | + * @param $expiretime | ||
203 | + * @return string | ||
204 | + */ | ||
205 | + public function getKeeploginKey($params, $keeptime, $expiretime) | ||
206 | + { | ||
207 | + $key = md5(md5($params['id']) . md5($keeptime) . md5($expiretime) . $params['token'] . config('token.key')); | ||
208 | + return $key; | ||
209 | + } | ||
210 | + | ||
211 | + /** | ||
212 | + * 获取加密后的安全码 | ||
213 | + * @param $params | ||
214 | + * @return string | ||
215 | + */ | ||
216 | + public function getEncryptSafecode($params) | ||
217 | + { | ||
218 | + return md5(md5($params['username']) . md5(substr($params['password'], 0, 6)) . config('token.key')); | ||
219 | + } | ||
220 | + | ||
138 | public function check($name, $uid = '', $relation = 'or', $mode = 'url') | 221 | public function check($name, $uid = '', $relation = 'or', $mode = 'url') |
139 | { | 222 | { |
140 | $uid = $uid ? $uid : $this->id; | 223 | $uid = $uid ? $uid : $this->id; |
@@ -179,13 +262,19 @@ class Auth extends \fast\Auth | @@ -179,13 +262,19 @@ class Auth extends \fast\Auth | ||
179 | if (!$admin) { | 262 | if (!$admin) { |
180 | return false; | 263 | return false; |
181 | } | 264 | } |
265 | + $my = Admin::get($admin['id']); | ||
266 | + if (!$my) { | ||
267 | + return false; | ||
268 | + } | ||
269 | + //校验安全码,可用于判断关键信息发生了变更需要重新登录 | ||
270 | + if (!isset($admin['safecode']) || $this->getEncryptSafecode($my) !== $admin['safecode']) { | ||
271 | + $this->logout(); | ||
272 | + return false; | ||
273 | + } | ||
182 | //判断是否同一时间同一账号只能在一个地方登录 | 274 | //判断是否同一时间同一账号只能在一个地方登录 |
183 | if (Config::get('fastadmin.login_unique')) { | 275 | if (Config::get('fastadmin.login_unique')) { |
184 | - $my = Admin::get($admin['id']); | ||
185 | - if (!$my || $my['token'] != $admin['token']) { | ||
186 | - $this->logined = false; //重置登录状态 | ||
187 | - Session::delete("admin"); | ||
188 | - Cookie::delete("keeplogin"); | 276 | + if ($my['token'] != $admin['token']) { |
277 | + $this->logout(); | ||
189 | return false; | 278 | return false; |
190 | } | 279 | } |
191 | } | 280 | } |
@@ -449,8 +538,9 @@ class Auth extends \fast\Auth | @@ -449,8 +538,9 @@ class Auth extends \fast\Auth | ||
449 | $referer = []; | 538 | $referer = []; |
450 | } | 539 | } |
451 | 540 | ||
452 | - $select_id = $selected ? $selected['id'] : 0; | 541 | + $select_id = $referer ? $referer['id'] : ($selected ? $selected['id'] : 0); |
453 | $menu = $nav = ''; | 542 | $menu = $nav = ''; |
543 | + $showSubmenu = config('fastadmin.show_submenu'); | ||
454 | if (Config::get('fastadmin.multiplenav')) { | 544 | if (Config::get('fastadmin.multiplenav')) { |
455 | $topList = []; | 545 | $topList = []; |
456 | foreach ($ruleList as $index => $item) { | 546 | foreach ($ruleList as $index => $item) { |
@@ -471,11 +561,11 @@ class Auth extends \fast\Auth | @@ -471,11 +561,11 @@ class Auth extends \fast\Auth | ||
471 | $select_id, | 561 | $select_id, |
472 | '', | 562 | '', |
473 | 'ul', | 563 | 'ul', |
474 | - 'class="treeview-menu"' | 564 | + 'class="treeview-menu' . ($showSubmenu ? ' menu-open' : '') . '"' |
475 | ); | 565 | ); |
476 | $current = in_array($item['id'], $selectParentIds); | 566 | $current = in_array($item['id'], $selectParentIds); |
477 | $url = $childList ? 'javascript:;' : $item['url']; | 567 | $url = $childList ? 'javascript:;' : $item['url']; |
478 | - $addtabs = $childList || !$url ? "" : (stripos($url, "?") !== false ? "&" : "?") . "ref=addtabs"; | 568 | + $addtabs = $childList || !$url ? "" : (stripos($url, "?") !== false ? "&" : "?") . "ref=" . ($item['menutype'] ? $item['menutype'] : 'addtabs'); |
479 | $childList = str_replace( | 569 | $childList = str_replace( |
480 | '" pid="' . $item['id'] . '"', | 570 | '" pid="' . $item['id'] . '"', |
481 | ' ' . ($current ? '' : 'hidden') . '" pid="' . $item['id'] . '"', | 571 | ' ' . ($current ? '' : 'hidden') . '" pid="' . $item['id'] . '"', |
@@ -493,7 +583,7 @@ class Auth extends \fast\Auth | @@ -493,7 +583,7 @@ class Auth extends \fast\Auth | ||
493 | $select_id, | 583 | $select_id, |
494 | '', | 584 | '', |
495 | 'ul', | 585 | 'ul', |
496 | - 'class="treeview-menu"' | 586 | + 'class="treeview-menu' . ($showSubmenu ? ' menu-open' : '') . '"' |
497 | ); | 587 | ); |
498 | if ($selected) { | 588 | if ($selected) { |
499 | $nav .= '<li role="presentation" id="tab_' . $selected['id'] . '" class="' . ($referer ? '' : 'active') . '"><a href="#con_' . $selected['id'] . '" node-id="' . $selected['id'] . '" aria-controls="' . $selected['id'] . '" role="tab" data-toggle="tab"><i class="' . $selected['icon'] . ' fa-fw"></i> <span>' . $selected['title'] . '</span> </a></li>'; | 589 | $nav .= '<li role="presentation" id="tab_' . $selected['id'] . '" class="' . ($referer ? '' : 'active') . '"><a href="#con_' . $selected['id'] . '" node-id="' . $selected['id'] . '" aria-controls="' . $selected['id'] . '" role="tab" data-toggle="tab"><i class="' . $selected['icon'] . ' fa-fw"></i> <span>' . $selected['title'] . '</span> </a></li>'; |
1 | +<?php | ||
2 | + | ||
3 | +namespace app\admin\model; | ||
4 | + | ||
5 | +use think\Model; | ||
6 | + | ||
7 | + | ||
8 | +class ReservoirRainRiverFlow extends Model | ||
9 | +{ | ||
10 | + | ||
11 | + | ||
12 | + | ||
13 | + | ||
14 | + | ||
15 | + // 表名 | ||
16 | + protected $name = 'reservoir_rain_river_flow'; | ||
17 | + | ||
18 | + // 自动写入时间戳字段 | ||
19 | + protected $autoWriteTimestamp = 'int'; | ||
20 | + | ||
21 | + // 定义时间戳字段名 | ||
22 | + protected $createTime = 'createtime'; | ||
23 | + protected $updateTime = 'updatetime'; | ||
24 | + protected $deleteTime = false; | ||
25 | + | ||
26 | + // 追加属性 | ||
27 | + protected $append = [ | ||
28 | + 'status_text', | ||
29 | + 'water_level_warning_text', | ||
30 | + 'reporttime_text' | ||
31 | + ]; | ||
32 | + | ||
33 | + | ||
34 | + | ||
35 | + public function getStatusList() | ||
36 | + { | ||
37 | + return ['0' => __('Status 0'), '1' => __('Status 1')]; | ||
38 | + } | ||
39 | + | ||
40 | + public function getWaterLevelWarningList() | ||
41 | + { | ||
42 | + return ['0' => __('Water_level_warning 0'), '1' => __('Water_level_warning 1')]; | ||
43 | + } | ||
44 | + | ||
45 | + | ||
46 | + public function getStatusTextAttr($value, $data) | ||
47 | + { | ||
48 | + $value = $value ? $value : (isset($data['status']) ? $data['status'] : ''); | ||
49 | + $list = $this->getStatusList(); | ||
50 | + return isset($list[$value]) ? $list[$value] : ''; | ||
51 | + } | ||
52 | + | ||
53 | + | ||
54 | + public function getWaterLevelWarningTextAttr($value, $data) | ||
55 | + { | ||
56 | + $value = $value ? $value : (isset($data['water_level_warning']) ? $data['water_level_warning'] : ''); | ||
57 | + $list = $this->getWaterLevelWarningList(); | ||
58 | + return isset($list[$value]) ? $list[$value] : ''; | ||
59 | + } | ||
60 | + | ||
61 | + | ||
62 | + public function getReporttimeTextAttr($value, $data) | ||
63 | + { | ||
64 | + $value = $value ? $value : (isset($data['reporttime']) ? $data['reporttime'] : ''); | ||
65 | + return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value; | ||
66 | + } | ||
67 | + | ||
68 | + protected function setReporttimeAttr($value) | ||
69 | + { | ||
70 | + return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value); | ||
71 | + } | ||
72 | + | ||
73 | + | ||
74 | + public function reservoirequipment() | ||
75 | + { | ||
76 | + return $this->belongsTo('Reservoir_equipment', 'number', 'deviceId', [], 'LEFT')->setEagerlyType(0); | ||
77 | + } | ||
78 | +} |
application/admin/model/Waterworks.php
0 → 100644
1 | +<?php | ||
2 | + | ||
3 | +namespace app\admin\model; | ||
4 | + | ||
5 | +use think\Model; | ||
6 | + | ||
7 | + | ||
8 | +class Waterworks extends Model | ||
9 | +{ | ||
10 | + | ||
11 | + | ||
12 | + | ||
13 | + | ||
14 | + | ||
15 | + // 表名 | ||
16 | + protected $name = 'waterworks'; | ||
17 | + | ||
18 | + // 自动写入时间戳字段 | ||
19 | + protected $autoWriteTimestamp = 'int'; | ||
20 | + | ||
21 | + // 定义时间戳字段名 | ||
22 | + protected $createTime = 'createtime'; | ||
23 | + protected $updateTime = 'updatetime'; | ||
24 | + protected $deleteTime = false; | ||
25 | + | ||
26 | + // 追加属性 | ||
27 | + protected $append = [ | ||
28 | + 'buildtime_text' | ||
29 | + ]; | ||
30 | + | ||
31 | + | ||
32 | + | ||
33 | + | ||
34 | + | ||
35 | + | ||
36 | + public function getBuildtimeTextAttr($value, $data) | ||
37 | + { | ||
38 | + $value = $value ? $value : (isset($data['buildtime']) ? $data['buildtime'] : ''); | ||
39 | + return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value; | ||
40 | + } | ||
41 | + | ||
42 | + protected function setBuildtimeAttr($value) | ||
43 | + { | ||
44 | + return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value); | ||
45 | + } | ||
46 | + | ||
47 | + | ||
48 | +} |
1 | +<?php | ||
2 | + | ||
3 | +namespace app\admin\model\reservoir\rain\river; | ||
4 | + | ||
5 | +use think\Model; | ||
6 | + | ||
7 | + | ||
8 | +class Flow extends Model | ||
9 | +{ | ||
10 | + | ||
11 | + | ||
12 | + | ||
13 | + | ||
14 | + | ||
15 | + // 表名 | ||
16 | + protected $name = 'reservoir_rain_river_flow'; | ||
17 | + | ||
18 | + // 自动写入时间戳字段 | ||
19 | + protected $autoWriteTimestamp = 'int'; | ||
20 | + | ||
21 | + // 定义时间戳字段名 | ||
22 | + protected $createTime = 'createtime'; | ||
23 | + protected $updateTime = 'updatetime'; | ||
24 | + protected $deleteTime = false; | ||
25 | + | ||
26 | + // 追加属性 | ||
27 | + protected $append = [ | ||
28 | + 'status_text', | ||
29 | + 'water_level_warning_text', | ||
30 | + 'reporttime_text' | ||
31 | + ]; | ||
32 | + | ||
33 | + | ||
34 | + | ||
35 | + public function getStatusList() | ||
36 | + { | ||
37 | + return ['0' => __('Status 0'), '1' => __('Status 1')]; | ||
38 | + } | ||
39 | + | ||
40 | + public function getWaterLevelWarningList() | ||
41 | + { | ||
42 | + return ['0' => __('Water_level_warning 0'), '1' => __('Water_level_warning 1')]; | ||
43 | + } | ||
44 | + | ||
45 | + | ||
46 | + public function getStatusTextAttr($value, $data) | ||
47 | + { | ||
48 | + $value = $value ? $value : (isset($data['status']) ? $data['status'] : ''); | ||
49 | + $list = $this->getStatusList(); | ||
50 | + return isset($list[$value]) ? $list[$value] : ''; | ||
51 | + } | ||
52 | + | ||
53 | + | ||
54 | + public function getWaterLevelWarningTextAttr($value, $data) | ||
55 | + { | ||
56 | + $value = $value ? $value : (isset($data['water_level_warning']) ? $data['water_level_warning'] : ''); | ||
57 | + $list = $this->getWaterLevelWarningList(); | ||
58 | + return isset($list[$value]) ? $list[$value] : ''; | ||
59 | + } | ||
60 | + | ||
61 | + | ||
62 | + public function getReporttimeTextAttr($value, $data) | ||
63 | + { | ||
64 | + $value = $value ? $value : (isset($data['reporttime']) ? $data['reporttime'] : ''); | ||
65 | + return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value; | ||
66 | + } | ||
67 | + | ||
68 | + protected function setReporttimeAttr($value) | ||
69 | + { | ||
70 | + return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value); | ||
71 | + } | ||
72 | + | ||
73 | + | ||
74 | + public function reservoirlist() | ||
75 | + { | ||
76 | + return $this->belongsTo('app\admin\model\reservoir\Reservoirlist', 'reservoir_id', 'id', [], 'LEFT')->setEagerlyType(0); | ||
77 | + | ||
78 | + } | ||
79 | + | ||
80 | + | ||
81 | + public function equipment() | ||
82 | + { | ||
83 | + return $this->belongsTo('app\admin\model\reservoir\Equipment', 'number', 'deviceId', [], 'LEFT')->setEagerlyType(0); | ||
84 | + } | ||
85 | +} |
1 | +<?php | ||
2 | + | ||
3 | +namespace app\admin\validate; | ||
4 | + | ||
5 | +use think\Validate; | ||
6 | + | ||
7 | +class ReservoirRainRiverFlow extends Validate | ||
8 | +{ | ||
9 | + /** | ||
10 | + * 验证规则 | ||
11 | + */ | ||
12 | + protected $rule = [ | ||
13 | + ]; | ||
14 | + /** | ||
15 | + * 提示消息 | ||
16 | + */ | ||
17 | + protected $message = [ | ||
18 | + ]; | ||
19 | + /** | ||
20 | + * 验证场景 | ||
21 | + */ | ||
22 | + protected $scene = [ | ||
23 | + 'add' => [], | ||
24 | + 'edit' => [], | ||
25 | + ]; | ||
26 | + | ||
27 | +} |
application/admin/validate/Waterworks.php
0 → 100644
1 | +<?php | ||
2 | + | ||
3 | +namespace app\admin\validate; | ||
4 | + | ||
5 | +use think\Validate; | ||
6 | + | ||
7 | +class Waterworks extends Validate | ||
8 | +{ | ||
9 | + /** | ||
10 | + * 验证规则 | ||
11 | + */ | ||
12 | + protected $rule = [ | ||
13 | + ]; | ||
14 | + /** | ||
15 | + * 提示消息 | ||
16 | + */ | ||
17 | + protected $message = [ | ||
18 | + ]; | ||
19 | + /** | ||
20 | + * 验证场景 | ||
21 | + */ | ||
22 | + protected $scene = [ | ||
23 | + 'add' => [], | ||
24 | + 'edit' => [], | ||
25 | + ]; | ||
26 | + | ||
27 | +} |
@@ -19,6 +19,12 @@ | @@ -19,6 +19,12 @@ | ||
19 | </div> | 19 | </div> |
20 | </div> | 20 | </div> |
21 | <div class="form-group"> | 21 | <div class="form-group"> |
22 | + <label for="mobile" class="control-label col-xs-12 col-sm-2">{:__('Mobile')}:</label> | ||
23 | + <div class="col-xs-12 col-sm-8"> | ||
24 | + <input type="text" class="form-control" id="mobile" name="row[mobile]" value="" data-rule="mobile" /> | ||
25 | + </div> | ||
26 | + </div> | ||
27 | + <div class="form-group"> | ||
22 | <label for="nickname" class="control-label col-xs-12 col-sm-2">{:__('Nickname')}:</label> | 28 | <label for="nickname" class="control-label col-xs-12 col-sm-2">{:__('Nickname')}:</label> |
23 | <div class="col-xs-12 col-sm-8"> | 29 | <div class="col-xs-12 col-sm-8"> |
24 | <input type="text" class="form-control" id="nickname" name="row[nickname]" autocomplete="off" value="" data-rule="required" /> | 30 | <input type="text" class="form-control" id="nickname" name="row[nickname]" autocomplete="off" value="" data-rule="required" /> |
@@ -19,6 +19,12 @@ | @@ -19,6 +19,12 @@ | ||
19 | </div> | 19 | </div> |
20 | </div> | 20 | </div> |
21 | <div class="form-group"> | 21 | <div class="form-group"> |
22 | + <label for="mobile" class="control-label col-xs-12 col-sm-2">{:__('Mobile')}:</label> | ||
23 | + <div class="col-xs-12 col-sm-8"> | ||
24 | + <input type="text" class="form-control" id="mobile" name="row[mobile]" value="{$row.mobile|default=''|htmlentities}" data-rule="mobile" /> | ||
25 | + </div> | ||
26 | + </div> | ||
27 | + <div class="form-group"> | ||
22 | <label for="nickname" class="control-label col-xs-12 col-sm-2">{:__('Nickname')}:</label> | 28 | <label for="nickname" class="control-label col-xs-12 col-sm-2">{:__('Nickname')}:</label> |
23 | <div class="col-xs-12 col-sm-8"> | 29 | <div class="col-xs-12 col-sm-8"> |
24 | <input type="text" class="form-control" id="nickname" name="row[nickname]" autocomplete="off" value="{$row.nickname|htmlentities}" data-rule="required" /> | 30 | <input type="text" class="form-control" id="nickname" name="row[nickname]" autocomplete="off" value="{$row.nickname|htmlentities}" data-rule="required" /> |
@@ -220,7 +220,7 @@ | @@ -220,7 +220,7 @@ | ||
220 | <div class="logo"> | 220 | <div class="logo"> |
221 | <img src="__CDN__/assets/img/login/login-logo.png" alt="" class="full-width"> | 221 | <img src="__CDN__/assets/img/login/login-logo.png" alt="" class="full-width"> |
222 | </div> | 222 | </div> |
223 | - <div>农村饮水业务管理系统后台</div> | 223 | + <div>元阳农村雨水情管理系统后台</div> |
224 | </div> | 224 | </div> |
225 | <div class="login-img"> | 225 | <div class="login-img"> |
226 | <img src="__CDN__/assets/img/login/login-img.png" alt="" class="full-width"> | 226 | <img src="__CDN__/assets/img/login/login-img.png" alt="" class="full-width"> |
application/admin/view/index/newlogin.html
0 → 100644
1 | +<!DOCTYPE html> | ||
2 | +<html> | ||
3 | +<head> | ||
4 | + {include file="common/meta" /} | ||
5 | + | ||
6 | + <style type="text/css"> | ||
7 | + body { | ||
8 | + color: #999; | ||
9 | + background-color: #f1f4fd; | ||
10 | + background-size: cover; | ||
11 | + } | ||
12 | + | ||
13 | + a { | ||
14 | + color: #444; | ||
15 | + } | ||
16 | + | ||
17 | + | ||
18 | + .login-screen { | ||
19 | + max-width: 430px; | ||
20 | + padding: 0; | ||
21 | + margin: 100px auto 0 auto; | ||
22 | + | ||
23 | + } | ||
24 | + | ||
25 | + .login-screen .well { | ||
26 | + background-image:url("__CDN__/assets/img/Slice1.png"); | ||
27 | + border-radius: 3px; | ||
28 | + -webkit-box-shadow: 0 0 30px rgba(0, 0, 0, 0.1); | ||
29 | + box-shadow: 0 0 30px rgba(0, 0, 0, 0.1); | ||
30 | + border: none; | ||
31 | + /*overflow: hidden;*/ | ||
32 | + padding: 0; | ||
33 | + } | ||
34 | + | ||
35 | + @media (max-width: 767px) { | ||
36 | + .login-screen { | ||
37 | + padding: 0 20px; | ||
38 | + } | ||
39 | + } | ||
40 | + | ||
41 | + .profile-img-card { | ||
42 | + width: 100px; | ||
43 | + height: 100px; | ||
44 | + display: block; | ||
45 | + -moz-border-radius: 50%; | ||
46 | + -webkit-border-radius: 50%; | ||
47 | + border-radius: 50%; | ||
48 | + margin: 140px auto 30px; | ||
49 | + border: 5px solid #fff; | ||
50 | + } | ||
51 | + | ||
52 | + .profile-name-card { | ||
53 | + text-align: center; | ||
54 | + } | ||
55 | + | ||
56 | + .login-head { | ||
57 | + background-image:url("__CDN__/assets/img/Slice1.png"); | ||
58 | + border-radius: 3px 3px 0 0; | ||
59 | + } | ||
60 | + | ||
61 | + .login-form { | ||
62 | + padding: 40px 30px; | ||
63 | + position: relative; | ||
64 | + z-index: 99; | ||
65 | + } | ||
66 | + | ||
67 | + #login-form { | ||
68 | + margin-top: 20px; | ||
69 | + } | ||
70 | + | ||
71 | + #login-form .input-group { | ||
72 | + margin-bottom: 15px; | ||
73 | + } | ||
74 | + | ||
75 | + #login-form .form-control { | ||
76 | + font-size: 13px; | ||
77 | + } | ||
78 | + | ||
79 | + </style> | ||
80 | + <!--@formatter:off--> | ||
81 | + {if $background} | ||
82 | + <style type="text/css"> | ||
83 | + body{ | ||
84 | + background-image: url('{$background}'); | ||
85 | + } | ||
86 | + </style> | ||
87 | + {/if} | ||
88 | + <!--@formatter:on--> | ||
89 | +</head> | ||
90 | +<body> | ||
91 | +<div class="container"> | ||
92 | + <div class="login-wrapper"> | ||
93 | + <div class="login-screen"> | ||
94 | + <div class="well" style="height: 600px; width: 430px;"> | ||
95 | + <div style="height: 10px;"> | ||
96 | + </div> | ||
97 | + <img id="profile-img" class="profile-img-card" src="{$admin.avatar|cdnurl|htmlentities}"/> | ||
98 | + <p id="profile-name" class="profile-name-card"></p> | ||
99 | + <div style="color: black; font-size: 25px;" class="input-group btn btn-lg btn-block"> | ||
100 | + {$admin.nickname|htmlentities} | ||
101 | + </div> | ||
102 | + <div class="form-group" > | ||
103 | + <a href="index.html" style="width: 80%;margin-left: 10%;margin-top: 10%; background:#708eea;" class="btn btn-success btn-lg btn-block" >一键登录</a> | ||
104 | + </div> | ||
105 | + </div> | ||
106 | + </div> | ||
107 | + </div> | ||
108 | + </div> | ||
109 | +</div> | ||
110 | +{include file="common/script" /} | ||
111 | +</body> | ||
112 | +</html> |
1 | +<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action=""> | ||
2 | + | ||
3 | + <div class="form-group"> | ||
4 | + <label class="control-label col-xs-12 col-sm-2">{:__('Number')}:</label> | ||
5 | + <div class="col-xs-12 col-sm-8"> | ||
6 | + <input id="c-number" class="form-control" name="row[number]" type="text"> | ||
7 | + </div> | ||
8 | + </div> | ||
9 | + <div class="form-group"> | ||
10 | + <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label> | ||
11 | + <div class="col-xs-12 col-sm-8"> | ||
12 | + | ||
13 | + <div class="radio"> | ||
14 | + {foreach name="statusList" item="vo"} | ||
15 | + <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="0"}checked{/in} /> {$vo}</label> | ||
16 | + {/foreach} | ||
17 | + </div> | ||
18 | + | ||
19 | + </div> | ||
20 | + </div> | ||
21 | + <div class="form-group"> | ||
22 | + <label class="control-label col-xs-12 col-sm-2">{:__('Flow')}:</label> | ||
23 | + <div class="col-xs-12 col-sm-8"> | ||
24 | + <input id="c-flow" class="form-control" step="0.001" name="row[flow]" type="number"> | ||
25 | + </div> | ||
26 | + </div> | ||
27 | + <div class="form-group"> | ||
28 | + <label class="control-label col-xs-12 col-sm-2">{:__('Accumulate_flow')}:</label> | ||
29 | + <div class="col-xs-12 col-sm-8"> | ||
30 | + <input id="c-accumulate_flow" class="form-control" step="0.001" name="row[accumulate_flow]" type="number"> | ||
31 | + </div> | ||
32 | + </div> | ||
33 | + <div class="form-group"> | ||
34 | + <label class="control-label col-xs-12 col-sm-2">{:__('Velocity_flow')}:</label> | ||
35 | + <div class="col-xs-12 col-sm-8"> | ||
36 | + <input id="c-velocity_flow" class="form-control" step="0.001" name="row[velocity_flow]" type="number"> | ||
37 | + </div> | ||
38 | + </div> | ||
39 | + <div class="form-group"> | ||
40 | + <label class="control-label col-xs-12 col-sm-2">{:__('Water_level')}:</label> | ||
41 | + <div class="col-xs-12 col-sm-8"> | ||
42 | + <input id="c-water_level" class="form-control" step="0.001" name="row[water_level]" type="number"> | ||
43 | + </div> | ||
44 | + </div> | ||
45 | + <div class="form-group"> | ||
46 | + <label class="control-label col-xs-12 col-sm-2">{:__('Water_level_warning')}:</label> | ||
47 | + <div class="col-xs-12 col-sm-8"> | ||
48 | + | ||
49 | + <select id="c-water_level_warning" class="form-control selectpicker" name="row[water_level_warning]"> | ||
50 | + {foreach name="waterLevelWarningList" item="vo"} | ||
51 | + <option value="{$key}" {in name="key" value="0"}selected{/in}>{$vo}</option> | ||
52 | + {/foreach} | ||
53 | + </select> | ||
54 | + | ||
55 | + </div> | ||
56 | + </div> | ||
57 | + <div class="form-group"> | ||
58 | + <label class="control-label col-xs-12 col-sm-2">{:__('Precipitation')}:</label> | ||
59 | + <div class="col-xs-12 col-sm-8"> | ||
60 | + <input id="c-precipitation" class="form-control" step="0.001" name="row[precipitation]" type="number"> | ||
61 | + </div> | ||
62 | + </div> | ||
63 | + <div class="form-group"> | ||
64 | + <label class="control-label col-xs-12 col-sm-2">{:__('Reporttime')}:</label> | ||
65 | + <div class="col-xs-12 col-sm-8"> | ||
66 | + <input id="c-reporttime" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[reporttime]" type="text" value="{:date('Y-m-d H:i:s')}"> | ||
67 | + </div> | ||
68 | + </div> | ||
69 | + <div class="form-group"> | ||
70 | + <label class="control-label col-xs-12 col-sm-2">{:__('Reservoir_id')}:</label> | ||
71 | + <div class="col-xs-12 col-sm-8"> | ||
72 | + <input id="c-reservoir_id" data-rule="required" data-source="reservoir/index" class="form-control selectpage" name="row[reservoir_id]" type="text" value=""> | ||
73 | + </div> | ||
74 | + </div> | ||
75 | + <div class="form-group"> | ||
76 | + <label class="control-label col-xs-12 col-sm-2">{:__('Issend')}:</label> | ||
77 | + <div class="col-xs-12 col-sm-8"> | ||
78 | + <input id="c-issend" class="form-control" name="row[issend]" type="number" value="0"> | ||
79 | + </div> | ||
80 | + </div> | ||
81 | + <div class="form-group layer-footer"> | ||
82 | + <label class="control-label col-xs-12 col-sm-2"></label> | ||
83 | + <div class="col-xs-12 col-sm-8"> | ||
84 | + <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button> | ||
85 | + <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button> | ||
86 | + </div> | ||
87 | + </div> | ||
88 | +</form> |
1 | +<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action=""> | ||
2 | + | ||
3 | + <div class="form-group"> | ||
4 | + <label class="control-label col-xs-12 col-sm-2">{:__('Number')}:</label> | ||
5 | + <div class="col-xs-12 col-sm-8"> | ||
6 | + <input id="c-number" class="form-control" name="row[number]" type="text" value="{$row.number|htmlentities}"> | ||
7 | + </div> | ||
8 | + </div> | ||
9 | + <div class="form-group"> | ||
10 | + <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label> | ||
11 | + <div class="col-xs-12 col-sm-8"> | ||
12 | + | ||
13 | + <div class="radio"> | ||
14 | + {foreach name="statusList" item="vo"} | ||
15 | + <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label> | ||
16 | + {/foreach} | ||
17 | + </div> | ||
18 | + | ||
19 | + </div> | ||
20 | + </div> | ||
21 | + <div class="form-group"> | ||
22 | + <label class="control-label col-xs-12 col-sm-2">{:__('Flow')}:</label> | ||
23 | + <div class="col-xs-12 col-sm-8"> | ||
24 | + <input id="c-flow" class="form-control" step="0.001" name="row[flow]" type="number" value="{$row.flow|htmlentities}"> | ||
25 | + </div> | ||
26 | + </div> | ||
27 | + <div class="form-group"> | ||
28 | + <label class="control-label col-xs-12 col-sm-2">{:__('Accumulate_flow')}:</label> | ||
29 | + <div class="col-xs-12 col-sm-8"> | ||
30 | + <input id="c-accumulate_flow" class="form-control" step="0.001" name="row[accumulate_flow]" type="number" value="{$row.accumulate_flow|htmlentities}"> | ||
31 | + </div> | ||
32 | + </div> | ||
33 | + <div class="form-group"> | ||
34 | + <label class="control-label col-xs-12 col-sm-2">{:__('Velocity_flow')}:</label> | ||
35 | + <div class="col-xs-12 col-sm-8"> | ||
36 | + <input id="c-velocity_flow" class="form-control" step="0.001" name="row[velocity_flow]" type="number" value="{$row.velocity_flow|htmlentities}"> | ||
37 | + </div> | ||
38 | + </div> | ||
39 | + <div class="form-group"> | ||
40 | + <label class="control-label col-xs-12 col-sm-2">{:__('Water_level')}:</label> | ||
41 | + <div class="col-xs-12 col-sm-8"> | ||
42 | + <input id="c-water_level" class="form-control" step="0.001" name="row[water_level]" type="number" value="{$row.water_level|htmlentities}"> | ||
43 | + </div> | ||
44 | + </div> | ||
45 | + <div class="form-group"> | ||
46 | + <label class="control-label col-xs-12 col-sm-2">{:__('Water_level_warning')}:</label> | ||
47 | + <div class="col-xs-12 col-sm-8"> | ||
48 | + | ||
49 | + <select id="c-water_level_warning" class="form-control selectpicker" name="row[water_level_warning]"> | ||
50 | + {foreach name="waterLevelWarningList" item="vo"} | ||
51 | + <option value="{$key}" {in name="key" value="$row.water_level_warning"}selected{/in}>{$vo}</option> | ||
52 | + {/foreach} | ||
53 | + </select> | ||
54 | + | ||
55 | + </div> | ||
56 | + </div> | ||
57 | + <div class="form-group"> | ||
58 | + <label class="control-label col-xs-12 col-sm-2">{:__('Precipitation')}:</label> | ||
59 | + <div class="col-xs-12 col-sm-8"> | ||
60 | + <input id="c-precipitation" class="form-control" step="0.001" name="row[precipitation]" type="number" value="{$row.precipitation|htmlentities}"> | ||
61 | + </div> | ||
62 | + </div> | ||
63 | + <div class="form-group"> | ||
64 | + <label class="control-label col-xs-12 col-sm-2">{:__('Reporttime')}:</label> | ||
65 | + <div class="col-xs-12 col-sm-8"> | ||
66 | + <input id="c-reporttime" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[reporttime]" type="text" value="{:$row.reporttime?datetime($row.reporttime):''}"> | ||
67 | + </div> | ||
68 | + </div> | ||
69 | + <div class="form-group"> | ||
70 | + <label class="control-label col-xs-12 col-sm-2">{:__('Reservoir_id')}:</label> | ||
71 | + <div class="col-xs-12 col-sm-8"> | ||
72 | + <input id="c-reservoir_id" data-rule="required" data-source="reservoir/index" class="form-control selectpage" name="row[reservoir_id]" type="text" value="{$row.reservoir_id|htmlentities}"> | ||
73 | + </div> | ||
74 | + </div> | ||
75 | + <div class="form-group"> | ||
76 | + <label class="control-label col-xs-12 col-sm-2">{:__('Issend')}:</label> | ||
77 | + <div class="col-xs-12 col-sm-8"> | ||
78 | + <input id="c-issend" class="form-control" name="row[issend]" type="number" value="{$row.issend|htmlentities}"> | ||
79 | + </div> | ||
80 | + </div> | ||
81 | + <div class="form-group layer-footer"> | ||
82 | + <label class="control-label col-xs-12 col-sm-2"></label> | ||
83 | + <div class="col-xs-12 col-sm-8"> | ||
84 | + <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button> | ||
85 | + <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button> | ||
86 | + </div> | ||
87 | + </div> | ||
88 | +</form> |
1 | +<div class="row"> | ||
2 | + <div class="row" style="margin-bottom: 5px"> | ||
3 | + <!-- Left col --> | ||
4 | + <section class="col-lg-12 connectedSortable"> | ||
5 | + <!-- Custom tabs (Charts with tabs)--> | ||
6 | + <div class="nav-tabs-custom charts-custom"> | ||
7 | + <!-- Tabs within a box --> | ||
8 | + <ul class="nav nav-tabs pull-right"> | ||
9 | + <li class="active"><a href="#line-chart" data-toggle="tab"></a></li> | ||
10 | + <li class="pull-left header"><i class="fa fa-inbox">流速统计图</i></li> | ||
11 | + </ul> | ||
12 | + <div class="tab-content no-padding"> | ||
13 | + <!-- Morris chart - Sales --> | ||
14 | + <div class="chart tab-pane active" id="line-chart" style="position: relative; height: 300px;"></div> | ||
15 | + </div> | ||
16 | + </div> | ||
17 | + </section> | ||
18 | + </div> | ||
19 | + <div class="row" style="padding: 10px;"> | ||
20 | + <div class="panel panel-default panel-intro"> | ||
21 | + | ||
22 | + <div class="panel-heading"> | ||
23 | + {:build_heading(null,FALSE)} | ||
24 | + <ul class="nav nav-tabs" data-field="status"> | ||
25 | + <li class="{:$Think.get.status === null ? 'active' : ''}"><a href="#t-all" data-value="" data-toggle="tab">{:__('All')}</a></li> | ||
26 | + {foreach name="statusList" item="vo"} | ||
27 | + <li class="{:$Think.get.status === (string)$key ? 'active' : ''}"><a href="#t-{$key}" data-value="{$key}" data-toggle="tab">{$vo}</a></li> | ||
28 | + {/foreach} | ||
29 | + </ul> | ||
30 | + </div> | ||
31 | + | ||
32 | + | ||
33 | + <div class="panel-body"> | ||
34 | + <div id="myTabContent" class="tab-content"> | ||
35 | + <div class="tab-pane fade active in" id="one"> | ||
36 | + <div class="widget-body no-padding"> | ||
37 | + <div id="toolbar" class="toolbar"> | ||
38 | + <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a> | ||
39 | + <a href="javascript:;" class="btn btn-success btn-add {:$auth->check('reservoir/rain/river/flow/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a> | ||
40 | + <a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('reservoir/rain/river/flow/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a> | ||
41 | + <a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('reservoir/rain/river/flow/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a> | ||
42 | + <a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('reservoir/rain/river/flow/import')?'':'hide'}" title="{:__('Import')}" id="btn-import-file" data-url="ajax/upload" data-mimetype="csv,xls,xlsx" data-multiple="false"><i class="fa fa-upload"></i> {:__('Import')}</a> | ||
43 | + | ||
44 | + <div class="dropdown btn-group {:$auth->check('reservoir/rain/river/flow/multi')?'':'hide'}"> | ||
45 | + <a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a> | ||
46 | + <ul class="dropdown-menu text-left" role="menu"> | ||
47 | + <li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li> | ||
48 | + <li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li> | ||
49 | + </ul> | ||
50 | + </div> | ||
51 | + | ||
52 | + | ||
53 | + </div> | ||
54 | + <table id="table" class="table table-striped table-bordered table-hover table-nowrap" | ||
55 | + data-operate-edit="{:$auth->check('reservoir/rain/river/flow/edit')}" | ||
56 | + data-operate-del="{:$auth->check('reservoir/rain/river/flow/del')}" | ||
57 | + width="100%"> | ||
58 | + </table> | ||
59 | + </div> | ||
60 | + </div> | ||
61 | + | ||
62 | + </div> | ||
63 | + </div> | ||
64 | +</div> |
1 | +<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action=""> | ||
2 | + | ||
3 | + <div class="form-group"> | ||
4 | + <label class="control-label col-xs-12 col-sm-2">{:__('Number')}:</label> | ||
5 | + <div class="col-xs-12 col-sm-8"> | ||
6 | + <input id="c-number" class="form-control" name="row[number]" type="text"> | ||
7 | + </div> | ||
8 | + </div> | ||
9 | + <div class="form-group"> | ||
10 | + <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label> | ||
11 | + <div class="col-xs-12 col-sm-8"> | ||
12 | + | ||
13 | + <div class="radio"> | ||
14 | + {foreach name="statusList" item="vo"} | ||
15 | + <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="0"}checked{/in} /> {$vo}</label> | ||
16 | + {/foreach} | ||
17 | + </div> | ||
18 | + | ||
19 | + </div> | ||
20 | + </div> | ||
21 | + <div class="form-group"> | ||
22 | + <label class="control-label col-xs-12 col-sm-2">{:__('Flow')}:</label> | ||
23 | + <div class="col-xs-12 col-sm-8"> | ||
24 | + <input id="c-flow" class="form-control" step="0.001" name="row[flow]" type="number"> | ||
25 | + </div> | ||
26 | + </div> | ||
27 | + <div class="form-group"> | ||
28 | + <label class="control-label col-xs-12 col-sm-2">{:__('Accumulate_flow')}:</label> | ||
29 | + <div class="col-xs-12 col-sm-8"> | ||
30 | + <input id="c-accumulate_flow" class="form-control" step="0.001" name="row[accumulate_flow]" type="number"> | ||
31 | + </div> | ||
32 | + </div> | ||
33 | + <div class="form-group"> | ||
34 | + <label class="control-label col-xs-12 col-sm-2">{:__('Velocity_flow')}:</label> | ||
35 | + <div class="col-xs-12 col-sm-8"> | ||
36 | + <input id="c-velocity_flow" class="form-control" step="0.001" name="row[velocity_flow]" type="number"> | ||
37 | + </div> | ||
38 | + </div> | ||
39 | + <div class="form-group"> | ||
40 | + <label class="control-label col-xs-12 col-sm-2">{:__('Water_level')}:</label> | ||
41 | + <div class="col-xs-12 col-sm-8"> | ||
42 | + <input id="c-water_level" class="form-control" step="0.001" name="row[water_level]" type="number"> | ||
43 | + </div> | ||
44 | + </div> | ||
45 | + <div class="form-group"> | ||
46 | + <label class="control-label col-xs-12 col-sm-2">{:__('Water_level_warning')}:</label> | ||
47 | + <div class="col-xs-12 col-sm-8"> | ||
48 | + | ||
49 | + <select id="c-water_level_warning" class="form-control selectpicker" name="row[water_level_warning]"> | ||
50 | + {foreach name="waterLevelWarningList" item="vo"} | ||
51 | + <option value="{$key}" {in name="key" value="0"}selected{/in}>{$vo}</option> | ||
52 | + {/foreach} | ||
53 | + </select> | ||
54 | + | ||
55 | + </div> | ||
56 | + </div> | ||
57 | + <div class="form-group"> | ||
58 | + <label class="control-label col-xs-12 col-sm-2">{:__('Reporttime')}:</label> | ||
59 | + <div class="col-xs-12 col-sm-8"> | ||
60 | + <input id="c-reporttime" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[reporttime]" type="text" value="{:date('Y-m-d H:i:s')}"> | ||
61 | + </div> | ||
62 | + </div> | ||
63 | + <div class="form-group"> | ||
64 | + <label class="control-label col-xs-12 col-sm-2">{:__('Reservoir_id')}:</label> | ||
65 | + <div class="col-xs-12 col-sm-8"> | ||
66 | + <input id="c-reservoir_id" data-rule="required" data-source="reservoir/index" class="form-control selectpage" name="row[reservoir_id]" type="text" value=""> | ||
67 | + </div> | ||
68 | + </div> | ||
69 | + <div class="form-group"> | ||
70 | + <label class="control-label col-xs-12 col-sm-2">{:__('Issend')}:</label> | ||
71 | + <div class="col-xs-12 col-sm-8"> | ||
72 | + <input id="c-issend" class="form-control" name="row[issend]" type="number" value="0"> | ||
73 | + </div> | ||
74 | + </div> | ||
75 | + <div class="form-group layer-footer"> | ||
76 | + <label class="control-label col-xs-12 col-sm-2"></label> | ||
77 | + <div class="col-xs-12 col-sm-8"> | ||
78 | + <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button> | ||
79 | + <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button> | ||
80 | + </div> | ||
81 | + </div> | ||
82 | +</form> |
1 | +<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action=""> | ||
2 | + | ||
3 | + <div class="form-group"> | ||
4 | + <label class="control-label col-xs-12 col-sm-2">{:__('Number')}:</label> | ||
5 | + <div class="col-xs-12 col-sm-8"> | ||
6 | + <input id="c-number" class="form-control" name="row[number]" type="text" value="{$row.number|htmlentities}"> | ||
7 | + </div> | ||
8 | + </div> | ||
9 | + <div class="form-group"> | ||
10 | + <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label> | ||
11 | + <div class="col-xs-12 col-sm-8"> | ||
12 | + | ||
13 | + <div class="radio"> | ||
14 | + {foreach name="statusList" item="vo"} | ||
15 | + <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label> | ||
16 | + {/foreach} | ||
17 | + </div> | ||
18 | + | ||
19 | + </div> | ||
20 | + </div> | ||
21 | + <div class="form-group"> | ||
22 | + <label class="control-label col-xs-12 col-sm-2">{:__('Flow')}:</label> | ||
23 | + <div class="col-xs-12 col-sm-8"> | ||
24 | + <input id="c-flow" class="form-control" step="0.001" name="row[flow]" type="number" value="{$row.flow|htmlentities}"> | ||
25 | + </div> | ||
26 | + </div> | ||
27 | + <div class="form-group"> | ||
28 | + <label class="control-label col-xs-12 col-sm-2">{:__('Accumulate_flow')}:</label> | ||
29 | + <div class="col-xs-12 col-sm-8"> | ||
30 | + <input id="c-accumulate_flow" class="form-control" step="0.001" name="row[accumulate_flow]" type="number" value="{$row.accumulate_flow|htmlentities}"> | ||
31 | + </div> | ||
32 | + </div> | ||
33 | + <div class="form-group"> | ||
34 | + <label class="control-label col-xs-12 col-sm-2">{:__('Velocity_flow')}:</label> | ||
35 | + <div class="col-xs-12 col-sm-8"> | ||
36 | + <input id="c-velocity_flow" class="form-control" step="0.001" name="row[velocity_flow]" type="number" value="{$row.velocity_flow|htmlentities}"> | ||
37 | + </div> | ||
38 | + </div> | ||
39 | + <div class="form-group"> | ||
40 | + <label class="control-label col-xs-12 col-sm-2">{:__('Water_level')}:</label> | ||
41 | + <div class="col-xs-12 col-sm-8"> | ||
42 | + <input id="c-water_level" class="form-control" step="0.001" name="row[water_level]" type="number" value="{$row.water_level|htmlentities}"> | ||
43 | + </div> | ||
44 | + </div> | ||
45 | + <div class="form-group"> | ||
46 | + <label class="control-label col-xs-12 col-sm-2">{:__('Water_level_warning')}:</label> | ||
47 | + <div class="col-xs-12 col-sm-8"> | ||
48 | + | ||
49 | + <select id="c-water_level_warning" class="form-control selectpicker" name="row[water_level_warning]"> | ||
50 | + {foreach name="waterLevelWarningList" item="vo"} | ||
51 | + <option value="{$key}" {in name="key" value="$row.water_level_warning"}selected{/in}>{$vo}</option> | ||
52 | + {/foreach} | ||
53 | + </select> | ||
54 | + | ||
55 | + </div> | ||
56 | + </div> | ||
57 | + <div class="form-group"> | ||
58 | + <label class="control-label col-xs-12 col-sm-2">{:__('Reporttime')}:</label> | ||
59 | + <div class="col-xs-12 col-sm-8"> | ||
60 | + <input id="c-reporttime" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[reporttime]" type="text" value="{:$row.reporttime?datetime($row.reporttime):''}"> | ||
61 | + </div> | ||
62 | + </div> | ||
63 | + <div class="form-group"> | ||
64 | + <label class="control-label col-xs-12 col-sm-2">{:__('Reservoir_id')}:</label> | ||
65 | + <div class="col-xs-12 col-sm-8"> | ||
66 | + <input id="c-reservoir_id" data-rule="required" data-source="reservoir/index" class="form-control selectpage" name="row[reservoir_id]" type="text" value="{$row.reservoir_id|htmlentities}"> | ||
67 | + </div> | ||
68 | + </div> | ||
69 | + <div class="form-group"> | ||
70 | + <label class="control-label col-xs-12 col-sm-2">{:__('Issend')}:</label> | ||
71 | + <div class="col-xs-12 col-sm-8"> | ||
72 | + <input id="c-issend" class="form-control" name="row[issend]" type="number" value="{$row.issend|htmlentities}"> | ||
73 | + </div> | ||
74 | + </div> | ||
75 | + <div class="form-group layer-footer"> | ||
76 | + <label class="control-label col-xs-12 col-sm-2"></label> | ||
77 | + <div class="col-xs-12 col-sm-8"> | ||
78 | + <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button> | ||
79 | + <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button> | ||
80 | + </div> | ||
81 | + </div> | ||
82 | +</form> |
1 | +<div class="panel panel-default panel-intro"> | ||
2 | + | ||
3 | + <div class="panel-heading"> | ||
4 | + {:build_heading(null,FALSE)} | ||
5 | + <ul class="nav nav-tabs" data-field="status"> | ||
6 | + <li class="{:$Think.get.status === null ? 'active' : ''}"><a href="#t-all" data-value="" data-toggle="tab">{:__('All')}</a></li> | ||
7 | + {foreach name="statusList" item="vo"} | ||
8 | + <li class="{:$Think.get.status === (string)$key ? 'active' : ''}"><a href="#t-{$key}" data-value="{$key}" data-toggle="tab">{$vo}</a></li> | ||
9 | + {/foreach} | ||
10 | + </ul> | ||
11 | + </div> | ||
12 | + | ||
13 | + | ||
14 | + <div class="panel-body"> | ||
15 | + <div id="myTabContent" class="tab-content"> | ||
16 | + <div class="tab-pane fade active in" id="one"> | ||
17 | + <div class="widget-body no-padding"> | ||
18 | + <div id="toolbar" class="toolbar"> | ||
19 | + <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a> | ||
20 | + <a href="javascript:;" class="btn btn-success btn-add {:$auth->check('reservoir_rain_river_flow/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a> | ||
21 | + <a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('reservoir_rain_river_flow/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a> | ||
22 | + <a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('reservoir_rain_river_flow/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a> | ||
23 | + <a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('reservoir_rain_river_flow/import')?'':'hide'}" title="{:__('Import')}" id="btn-import-file" data-url="ajax/upload" data-mimetype="csv,xls,xlsx" data-multiple="false"><i class="fa fa-upload"></i> {:__('Import')}</a> | ||
24 | + | ||
25 | + <div class="dropdown btn-group {:$auth->check('reservoir_rain_river_flow/multi')?'':'hide'}"> | ||
26 | + <a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a> | ||
27 | + <ul class="dropdown-menu text-left" role="menu"> | ||
28 | + <li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li> | ||
29 | + <li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li> | ||
30 | + </ul> | ||
31 | + </div> | ||
32 | + | ||
33 | + | ||
34 | + </div> | ||
35 | + <table id="table" class="table table-striped table-bordered table-hover table-nowrap" | ||
36 | + data-operate-edit="{:$auth->check('reservoir_rain_river_flow/edit')}" | ||
37 | + data-operate-del="{:$auth->check('reservoir_rain_river_flow/del')}" | ||
38 | + width="100%"> | ||
39 | + </table> | ||
40 | + </div> | ||
41 | + </div> | ||
42 | + | ||
43 | + </div> | ||
44 | + </div> | ||
45 | +</div> |
application/admin/view/waterworks/add.html
0 → 100644
1 | +<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action=""> | ||
2 | + | ||
3 | + <div class="form-group"> | ||
4 | + <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label> | ||
5 | + <div class="col-xs-12 col-sm-8"> | ||
6 | + <input id="c-name" class="form-control" name="row[name]" type="text"> | ||
7 | + </div> | ||
8 | + </div> | ||
9 | + <div class="form-group"> | ||
10 | + <label class="control-label col-xs-12 col-sm-2">{:__('Capacity')}:</label> | ||
11 | + <div class="col-xs-12 col-sm-8"> | ||
12 | + <input id="c-capacity" class="form-control" name="row[capacity]" type="text"> | ||
13 | + </div> | ||
14 | + </div> | ||
15 | + <div class="form-group" hidden> | ||
16 | + <label class="control-label col-xs-12 col-sm-2">{:__('Lng')}:</label> | ||
17 | + <div class="col-xs-12 col-sm-8"> | ||
18 | + <input id="c-lng" class="form-control" name="row[lng]" type="number"> | ||
19 | + </div> | ||
20 | + </div> | ||
21 | + <div class="form-group" hidden> | ||
22 | + <label class="control-label col-xs-12 col-sm-2">{:__('Lat')}:</label> | ||
23 | + <div class="col-xs-12 col-sm-8"> | ||
24 | + <input id="c-lat" class="form-control" name="row[lat]" type="number"> | ||
25 | + </div> | ||
26 | + </div> | ||
27 | + <div class="form-group"> | ||
28 | + <label class="control-label col-xs-12 col-sm-2">{:__('Respon_name')}:</label> | ||
29 | + <div class="col-xs-12 col-sm-8"> | ||
30 | + <input id="c-respon_name" class="form-control" name="row[respon_name]" type="text"> | ||
31 | + </div> | ||
32 | + </div> | ||
33 | + <div class="form-group"> | ||
34 | + <label class="control-label col-xs-12 col-sm-2">{:__('Buildtime')}:</label> | ||
35 | + <div class="col-xs-12 col-sm-8"> | ||
36 | + <input id="c-buildtime" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[buildtime]" type="text" value="{:date('Y-m-d H:i:s')}"> | ||
37 | + </div> | ||
38 | + </div> | ||
39 | + <div class="form-group"> | ||
40 | + <label class="control-label col-xs-12 col-sm-2">{:__('Address')}:</label> | ||
41 | + <div class="col-xs-12 col-sm-8"> | ||
42 | + <input id="c-address" data-lat-id="c-lat" data-lng-id="c-lng" data-toggle="addresspicker" class="form-control" name="row[address]" type="text"> | ||
43 | + </div> | ||
44 | + </div> | ||
45 | + <div class="form-group layer-footer"> | ||
46 | + <label class="control-label col-xs-12 col-sm-2"></label> | ||
47 | + <div class="col-xs-12 col-sm-8"> | ||
48 | + <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button> | ||
49 | + <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button> | ||
50 | + </div> | ||
51 | + </div> | ||
52 | +</form> |
application/admin/view/waterworks/edit.html
0 → 100644
1 | +<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action=""> | ||
2 | + | ||
3 | + <div class="form-group"> | ||
4 | + <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label> | ||
5 | + <div class="col-xs-12 col-sm-8"> | ||
6 | + <input id="c-name" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}"> | ||
7 | + </div> | ||
8 | + </div> | ||
9 | + <div class="form-group"> | ||
10 | + <label class="control-label col-xs-12 col-sm-2">{:__('Capacity')}:</label> | ||
11 | + <div class="col-xs-12 col-sm-8"> | ||
12 | + <div class='control-relative'><input id="c-capacity" class="form-control" data-toggle="city-picker" name="row[capacity]" type="text" value="{$row.capacity|htmlentities}"></div> | ||
13 | + </div> | ||
14 | + </div> | ||
15 | + <div class="form-group" hidden> | ||
16 | + <label class="control-label col-xs-12 col-sm-2">{:__('Lng')}:</label> | ||
17 | + <div class="col-xs-12 col-sm-8"> | ||
18 | + <input id="c-lng" class="form-control" name="row[lng]" type="number" value="{$row.lng|htmlentities}"> | ||
19 | + </div> | ||
20 | + </div> | ||
21 | + <div class="form-group" hidden> | ||
22 | + <label class="control-label col-xs-12 col-sm-2">{:__('Lat')}:</label> | ||
23 | + <div class="col-xs-12 col-sm-8"> | ||
24 | + <input id="c-lat" class="form-control" name="row[lat]" type="number" value="{$row.lat|htmlentities}"> | ||
25 | + </div> | ||
26 | + </div> | ||
27 | + <div class="form-group"> | ||
28 | + <label class="control-label col-xs-12 col-sm-2">{:__('Respon_name')}:</label> | ||
29 | + <div class="col-xs-12 col-sm-8"> | ||
30 | + <input id="c-respon_name" class="form-control" name="row[respon_name]" type="text" value="{$row.respon_name|htmlentities}"> | ||
31 | + </div> | ||
32 | + </div> | ||
33 | + <div class="form-group"> | ||
34 | + <label class="control-label col-xs-12 col-sm-2">{:__('Buildtime')}:</label> | ||
35 | + <div class="col-xs-12 col-sm-8"> | ||
36 | + <input id="c-buildtime" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[buildtime]" type="text" value="{:$row.buildtime?datetime($row.buildtime):''}"> | ||
37 | + </div> | ||
38 | + </div> | ||
39 | + <div class="form-group"> | ||
40 | + <label class="control-label col-xs-12 col-sm-2">{:__('Address')}:</label> | ||
41 | + <div class="col-xs-12 col-sm-8"> | ||
42 | + <input id="c-address" data-input-id="c-address" data-lat-id="c-lat" data-lng-id="c-lng" data-toggle="addresspicker" class="form-control" name="row[address]" type="text"> | ||
43 | + </div> | ||
44 | + </div> | ||
45 | + <div class="form-group layer-footer"> | ||
46 | + <label class="control-label col-xs-12 col-sm-2"></label> | ||
47 | + <div class="col-xs-12 col-sm-8"> | ||
48 | + <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button> | ||
49 | + <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button> | ||
50 | + </div> | ||
51 | + </div> | ||
52 | +</form> |
application/admin/view/waterworks/index.html
0 → 100644
1 | +<div class="panel panel-default panel-intro"> | ||
2 | + {:build_heading()} | ||
3 | + | ||
4 | + <div class="panel-body"> | ||
5 | + <div id="myTabContent" class="tab-content"> | ||
6 | + <div class="tab-pane fade active in" id="one"> | ||
7 | + <div class="widget-body no-padding"> | ||
8 | + <div id="toolbar" class="toolbar"> | ||
9 | + <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a> | ||
10 | + <a href="javascript:;" class="btn btn-success btn-add {:$auth->check('waterworks/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a> | ||
11 | + <a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('waterworks/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a> | ||
12 | + <a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('waterworks/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a> | ||
13 | + <a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('waterworks/import')?'':'hide'}" title="{:__('Import')}" id="btn-import-file" data-url="ajax/upload" data-mimetype="csv,xls,xlsx" data-multiple="false"><i class="fa fa-upload"></i> {:__('Import')}</a> | ||
14 | + | ||
15 | + <div class="dropdown btn-group {:$auth->check('waterworks/multi')?'':'hide'}"> | ||
16 | + <a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a> | ||
17 | + <ul class="dropdown-menu text-left" role="menu"> | ||
18 | + <li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li> | ||
19 | + <li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li> | ||
20 | + </ul> | ||
21 | + </div> | ||
22 | + | ||
23 | + | ||
24 | + </div> | ||
25 | + <table id="table" class="table table-striped table-bordered table-hover table-nowrap" | ||
26 | + data-operate-edit="{:$auth->check('waterworks/edit')}" | ||
27 | + data-operate-del="{:$auth->check('waterworks/del')}" | ||
28 | + width="100%"> | ||
29 | + </table> | ||
30 | + </div> | ||
31 | + </div> | ||
32 | + | ||
33 | + </div> | ||
34 | + </div> | ||
35 | +</div> |
1 | +<div class="panel panel-default panel-intro"> | ||
2 | + {:build_heading()} | ||
3 | + | ||
4 | + <div class="panel-body"> | ||
5 | + <div id="myTabContent" class="tab-content"> | ||
6 | + <div class="tab-pane fade active in" id="one"> | ||
7 | + <div class="widget-body no-padding"> | ||
8 | + <div id="toolbar" class="toolbar"> | ||
9 | + {:build_toolbar('refresh')} | ||
10 | + <a class="btn btn-info btn-multi btn-disabled disabled {:$auth->check('waterworks/restore')?'':'hide'}" href="javascript:;" data-url="waterworks/restore" data-action="restore"><i class="fa fa-rotate-left"></i> {:__('Restore')}</a> | ||
11 | + <a class="btn btn-danger btn-multi btn-disabled disabled {:$auth->check('waterworks/destroy')?'':'hide'}" href="javascript:;" data-url="waterworks/destroy" data-action="destroy"><i class="fa fa-times"></i> {:__('Destroy')}</a> | ||
12 | + <a class="btn btn-success btn-restoreall {:$auth->check('waterworks/restore')?'':'hide'}" href="javascript:;" data-url="waterworks/restore" title="{:__('Restore all')}"><i class="fa fa-rotate-left"></i> {:__('Restore all')}</a> | ||
13 | + <a class="btn btn-danger btn-destroyall {:$auth->check('waterworks/destroy')?'':'hide'}" href="javascript:;" data-url="waterworks/destroy" title="{:__('Destroy all')}"><i class="fa fa-times"></i> {:__('Destroy all')}</a> | ||
14 | + </div> | ||
15 | + <table id="table" class="table table-striped table-bordered table-hover" | ||
16 | + data-operate-restore="{:$auth->check('waterworks/restore')}" | ||
17 | + data-operate-destroy="{:$auth->check('waterworks/destroy')}" | ||
18 | + width="100%"> | ||
19 | + </table> | ||
20 | + </div> | ||
21 | + </div> | ||
22 | + | ||
23 | + </div> | ||
24 | + </div> | ||
25 | +</div> |
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | return array ( | 3 | return array ( |
4 | - 'name' => '一河五库', | 4 | + 'name' => '流量监测系统后台', |
5 | 'beian' => '', | 5 | 'beian' => '', |
6 | 'cdnurl' => '', | 6 | 'cdnurl' => '', |
7 | 'version' => '1.0.1', | 7 | 'version' => '1.0.1', |
@@ -60,20 +60,6 @@ return array ( | @@ -60,20 +60,6 @@ return array ( | ||
60 | 'jg_gt_AppKey' => 'hiLrw1w9qu7GP5VAwye3W1', | 60 | 'jg_gt_AppKey' => 'hiLrw1w9qu7GP5VAwye3W1', |
61 | 'jg_gt_AppSecret' => 'SXiEIoMPzO8FVXE7r5TYu2', | 61 | 'jg_gt_AppSecret' => 'SXiEIoMPzO8FVXE7r5TYu2', |
62 | 'jg_gt_MasterSecret' => 'Fk7CCX5xu78E6fTIJnk3T', | 62 | 'jg_gt_MasterSecret' => 'Fk7CCX5xu78E6fTIJnk3T', |
63 | - 'user_agreement_content' => '<p style="text-wrap: wrap;">1、用户按照页面给与的提示完成全部注册步骤后,即成为一河五库 app 的用户,用户应自行保管账号及密码,并准确、安全地使用其账号及密码。一河五库 app 可通过用户自行设定,向用户提供个性化信息服务。<br/><br/>2、用户充分了解并同意,一河五库 app 为用户提供个性化信息服务,用户须为自己注册账号下的行为负责,包括用户所导入、上载、传送的任何内容以及由此产生的任何后果,用户应对一河五库 app中的内容自行加以判断,并承担因使用内容而引起的所有风险。一河五库 app 不对因用户行为而导致的损失承担责任。</p><p style="text-wrap: wrap;"><br/>3、用户须对在一河五库 app 上所传送信息的真实性、合法性、有效性等负责,与用户所传播的信息相关的任何法律责任由用户自行承担,与一河五库 app 无关。用户在一河五库 app 中记录的或通过一河五库app 服务所传送的任何内容并不反映一河五库 app 的观点或政策,一河五库 app 对此不承担责任。</p><p style="text-wrap: wrap;"><br/></p><p style="text-wrap: wrap;">4、用户提供的个人信息或发布的信息不真实、不准确、不合法;发表内容不符合本协议或发表内容不符合法律法规的,一河五库 app 有权暂停或终止用户使用本平台的服务。用户如果对一河五库 app的暂停或者终止或收回其账号行为有异议,客户可向平台提出意见,要求其继续提供服务。一河五库 app收到客户此类信息的投诉与意见,会审核相关信息,并及时对用户给予反馈。若信息确实不真实或不准确或不合法有效,一河五库 app平台要求用户提供符合要求的信息。<br/><br/>5、为避免用户终端数据丢失、更好服务用户之目的,一河五库 app 将向注册用户提供数据备份服务,经注册用户授权,一河五库 app 将存储于注册用户终端的一河五库 app数据库中的数据资料上载至一河五库app服务器,并且提供恢复到终端设备服务。<br/><br/>6、用户不得利用一河五库 app服务制作、上载、复制、发布、传播或者转载如下内容:(1)反对宪法所确定的基本原则的;(2)危害国家安全,泄露国家秘密,颠覆国家政权,破坏国家统一的;(3)损害国家荣誉和利益的;(4)煽动民族仇恨、民族歧视,破坏民族团结的;(5)破坏国家宗教政策,宣扬邪教和封建迷信的;</p>', | ||
64 | - 'privacy_policy_content' => '<p style="text-wrap: wrap;">1、一河五库 app尊重并保护所有使用服务用户的个人隐私权,高度重视用户的隐私及个人信息的保护,本隐私政策帮助您了解我们收集哪些数据、为什么收集这些数据,会利用这些数据做些什么及如何保护这些数据。我们将依据《中华人民共和国网络安全法》、《信息安全技术个人信息安全规范》以及其他相关法律法规、业界成熟的安全标准收集和本协议的约定使用您的个人信息,除本隐私权政策另有规定外,在未征得您事先许可的情况下,一河五库app 不会将这些信息对外披露或向第三方提供。(一)收集和使用个人信息的范围。注册账号:您注册并登录一河五库 app账号时至少向我们提供账号名称、头像、手机号码或电子邮箱,并创建密码。注册成功后,您提供的上述信息,将在您使用一河五库 app平台和服务期间持续授权我们使用。在您注销账号时,我们将停止使用并删除上述信息或对您的个人信息进行匿名化处理,法律法规另有规定的除外。</p><p style="text-wrap: wrap;"><br/></p><p style="text-wrap: wrap;">2、同时使用手机号码注册成功后,我们可能收集如下信息:(1)设备信息:以便我们能在设备上为您提供服务,我们可能会将您的设备信息或电话号码与账号相关联,并收集设备属性信息、设备状态信息、设备链接信息。 (2)身份认证服务:一河五库 app 提供身份认证服务,当您申请成为一河五库 app 用户为您进行身份认证时我们需要收集您的手机号等信息。(3)信息发布功能:您注册成功后,可在一河五库 app平台查看信息,对信息的内容,我们将不时进行审核,并根据法律规定对该内容进行保存。(4)浏览、查看、监测功能:您可浏览一河五库 app发表的信息,我们将对你浏览、查看的记录信息进行记载,自动收集您使用一河五库 app的详细情况并根据法律规定对该内容进行保存。(5)展示和推送内容:通过使用收集的信息,我们会向您提供搜索结果、个人化内容、用户研究分析与统计等服务。(6)搜索功能:当您使用一河五库 app提供的搜索功能时,我们会收集您查询的关键字信息以及您在使用一河五库 app服务时所阅览或要求的其他信息和内容详情。该等关键词信息通常无法单独识别您的个人身份,不属于您的个人信息,不在本指引的限制范围内。只有当您的搜索关键词信息与您的其他信息有联结并可识别您的个人身份时,则在结合使用期间,我们会将您的搜索关键词信息作为您的个人信息,与您的搜索历史记录一同按照本指引对其进行处理与保护。</p>', | ||
65 | - 'yhwk_baseinfo_pictures' => | ||
66 | - array ( | ||
67 | - 0 => '/uploads/20231224/FkvRGENTqB8utU-wOXxcQCP_EiMG.jpg', | ||
68 | - 1 => '/uploads/20231224/FgKcXpzGjSXjMejIdQy5OGGk1Gjl.jpg', | ||
69 | - 2 => '/uploads/20231224/FoNiwYAt7pK6X72Boui1XmjEumaJ.jpg', | ||
70 | - 3 => '/uploads/20231224/FoN06J19nMnSf0KXoPQYMLkK8MbH.jpg', | ||
71 | - 4 => '/uploads/20231224/Fvo7HAuMwXNSpBdPiO0NDQxci9_Y.jpg', | ||
72 | - 5 => '/uploads/20231224/FrwtySvBiVnVqZw_mrmsMwu9oJqG.jpg', | ||
73 | - 6 => '/uploads/20231224/Fm4B9yqb8u4LEcKvHLKnr_UYpcxZ.jpg', | ||
74 | - 7 => '/uploads/20231224/FnoFB_7KS2h_0HtIIIAUy_bi4Wx4.jpg', | ||
75 | - 8 => '/uploads/20231224/FuGSkW4rDlFvwXlQa5Wa-0JnOT56.jpg', | ||
76 | - ), | ||
77 | - 'yhwk_baseinfo_vedio' => '/uploads/20231224/lpuUPAdbMHA_uCBu0Uo-qfBaOPBa.mp4', | ||
78 | - 'yhwk_baseinfo_message' => '<p>“一河五库”连通工程信息化系统的主要建设内容包括以下方面:<br/> (1)建设项目区及工程运行信息感知体系,包括水源监测、输水管网监测,具体有水雨情监测、管网工程运行监测、视频监控、输<br/> 送水及放取水监测等。<br/> (2)建设数据资源体系。以资源整合和信息共享为目标,建设数据汇聚平台及共享体系,实现工程水雨情、流量、水量、压力、视<br/> 频、工程运行等信息的接收处理和存储管理;建设数据交换共享系统,实现与外部系统的数据交换共享,以及管理单位之间信息共享。建设综合数据库,实现各类数据信息的存储、管理,为业务应用提供数据服务。<br/> (3)建设业务应用系统。以二维、三维 GIS<br/> 平台为基础,建设连通工程综合信息管理系统,实现管网输水调度数字孪生,提高工程<br/> 管理的工作效率,实现水量的科学调配、预警预报,满足工程运行管理、移动应用需求,具体系统包括:管网监测系统、巡检管理系统、灌区水资源调度系统、综合管理系统、智慧运营系统、移动应用系统等,为工程运行管理决策提供技术支持。<br/> (4)建设监控中心软硬件支撑体系。配置支撑系统运行所需的开发类软件和商用软件设备,包括告警服务、数据库管理软件、GIS<br/> 软<br/> 件、数据采集工具、报表组件、统一用户管理等软件;购置计算服务器、管理服务器、存储设备,以及交换机、防火墙等网络设备并进行集成。<br/> (5)建设通讯网络。主要包括工程监测内网和业务外网,工程监测内网采用以租待建方式构建光缆通信,用于回传管网监测数据、<br/> 现场视频等数据;业务外网采用专线的方式进行建设,实现工程控制中心与上级管理单位的网络互联,用于传输业务应用、视频监控、安全监测以及视频会议等数据。<br/> (6)建设监控中心运行环境。根据监控中心现场特点,配套建设气体消防、综合布线、安防配置以及供配电等</p>', | 63 | + 'user_agreement_content' => '<p style="text-wrap: wrap;"><span style="color: rgb(51, 51, 51); font-family: "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; text-wrap: wrap; background-color: rgb(249, 249, 249);">用户协议内容</span></p>', |
64 | + 'privacy_policy_content' => '<p style="text-wrap: wrap;"><span style="color: rgb(51, 51, 51); font-family: "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; text-wrap: wrap; background-color: rgb(255, 255, 255);">隐私政策内容</span></p>', | ||
79 | ); | 65 | ); |
public/assets/img/Slice1.png
0 → 100644

142.1 KB
@@ -35,6 +35,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin | @@ -35,6 +35,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin | ||
35 | {field: 'nickname', title: __('Nickname')}, | 35 | {field: 'nickname', title: __('Nickname')}, |
36 | {field: 'groups_text', title: __('Group'), operate:false, formatter: Table.api.formatter.label}, | 36 | {field: 'groups_text', title: __('Group'), operate:false, formatter: Table.api.formatter.label}, |
37 | {field: 'email', title: __('Email')}, | 37 | {field: 'email', title: __('Email')}, |
38 | + {field: 'mobile', title: __('Mobile')}, | ||
38 | {field: 'status', title: __("Status"), searchList: {"normal":__('Normal'),"hidden":__('Hidden')}, formatter: Table.api.formatter.status}, | 39 | {field: 'status', title: __("Status"), searchList: {"normal":__('Normal'),"hidden":__('Hidden')}, formatter: Table.api.formatter.status}, |
39 | {field: 'logintime', title: __('Login time'), formatter: Table.api.formatter.datetime, operate: 'RANGE', addclass: 'datetimerange', sortable: true}, | 40 | {field: 'logintime', title: __('Login time'), formatter: Table.api.formatter.datetime, operate: 'RANGE', addclass: 'datetimerange', sortable: true}, |
40 | {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: function (value, row, index) { | 41 | {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: function (value, row, index) { |
@@ -200,7 +200,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'template', 'echarts' | @@ -200,7 +200,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'template', 'echarts' | ||
200 | // {field: 'risk', title: __('Risk'), operate: 'LIKE'}, | 200 | // {field: 'risk', title: __('Risk'), operate: 'LIKE'}, |
201 | {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, | 201 | {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, |
202 | //{field: 'reservoir_id', title: __('Reservoir_id')}, | 202 | //{field: 'reservoir_id', title: __('Reservoir_id')}, |
203 | - {field: 'reservoirlist.name', title: __('Reservoirlist.name'), operate: 'LIKE'}, | 203 | + //{field: 'reservoirlist.name', title: __('Reservoirlist.name'), operate: 'LIKE'}, |
204 | {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} | 204 | {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} |
205 | ] | 205 | ] |
206 | ] | 206 | ] |
@@ -183,7 +183,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'template', 'echarts' | @@ -183,7 +183,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'template', 'echarts' | ||
183 | {field: 'orifice_water_surface_distance', title: __('孔口到水面(单位:米)'), operate: 'LIKE'}, | 183 | {field: 'orifice_water_surface_distance', title: __('孔口到水面(单位:米)'), operate: 'LIKE'}, |
184 | {field: 'water_surface_elevation', title: __('水面高程(单位:米)'), operate: 'LIKE'}, | 184 | {field: 'water_surface_elevation', title: __('水面高程(单位:米)'), operate: 'LIKE'}, |
185 | {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, | 185 | {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, |
186 | - {field: 'reservoir.name', title: __('Reservoir_id')}, | 186 | + //{field: 'reservoir.name', title: __('Reservoir_id')}, |
187 | {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} | 187 | {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} |
188 | ] | 188 | ] |
189 | ] | 189 | ] |
@@ -27,10 +27,10 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin | @@ -27,10 +27,10 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin | ||
27 | {checkbox: true}, | 27 | {checkbox: true}, |
28 | {field: 'id', title: __('Id')}, | 28 | {field: 'id', title: __('Id')}, |
29 | {field: 'equipment_id', title: __('设备编号')}, | 29 | {field: 'equipment_id', title: __('设备编号')}, |
30 | - {field: 'equipment.name', title: __('Equipment_id')}, | 30 | + //{field: 'equipment.name', title: __('Equipment_id')}, |
31 | {field: 'value', title: __('Value'), operate: 'LIKE'}, | 31 | {field: 'value', title: __('Value'), operate: 'LIKE'}, |
32 | {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, | 32 | {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, |
33 | - {field: 'reservoir.name', title: __('Reservoir_id')}, | 33 | + //{field: 'reservoir.name', title: __('Reservoir_id')}, |
34 | {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} | 34 | {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} |
35 | ] | 35 | ] |
36 | ] | 36 | ] |
@@ -78,12 +78,12 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'template', 'echarts' | @@ -78,12 +78,12 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'template', 'echarts' | ||
78 | {checkbox: true}, | 78 | {checkbox: true}, |
79 | {field: 'id', title: __('Id')}, | 79 | {field: 'id', title: __('Id')}, |
80 | {field: 'number', title: __('Number'), operate: 'LIKE'}, | 80 | {field: 'number', title: __('Number'), operate: 'LIKE'}, |
81 | - {field: 'equipment.name', title: __('设备名称'), operate: false}, | 81 | + //{field: 'equipment.name', title: __('设备名称'), operate: false}, |
82 | {field: 'status', title: __('Status'), searchList: {"0":__('Status 0'),"1":__('Status 1')}, formatter: Table.api.formatter.status}, | 82 | {field: 'status', title: __('Status'), searchList: {"0":__('Status 0'),"1":__('Status 1')}, formatter: Table.api.formatter.status}, |
83 | {field: 'rainfall', title: __('Rainfall'), operate:'BETWEEN'}, | 83 | {field: 'rainfall', title: __('Rainfall'), operate:'BETWEEN'}, |
84 | {field: 'total_rainfall', title: __('TotalRainfall'), operate:'BETWEEN'}, | 84 | {field: 'total_rainfall', title: __('TotalRainfall'), operate:'BETWEEN'}, |
85 | 85 | ||
86 | - {field: 'reservoirlist.name', title: __('Reservoirlist.name'), operate: 'LIKE'}, | 86 | + //{field: 'reservoirlist.name', title: __('Reservoirlist.name'), operate: 'LIKE'}, |
87 | {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, | 87 | {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, |
88 | {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} | 88 | {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} |
89 | ] | 89 | ] |
1 | +define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'template', 'echarts', 'echarts-theme'], function ($, undefined, Backend, Table, Form, Template, Echarts) { | ||
2 | + | ||
3 | + var Controller = { | ||
4 | + index: function () { | ||
5 | + //这句话在多选项卡统计表时必须存在,否则会导致影响的图表宽度不正确 | ||
6 | + $(document).on("click", ".charts-custom a[data-toggle=\"tab\"]", function () { | ||
7 | + var that = this; | ||
8 | + setTimeout(function () { | ||
9 | + var id = $(that).attr("href"); | ||
10 | + var chart = Echarts.getInstanceByDom($(id)[0]); | ||
11 | + chart.resize(); | ||
12 | + }, 0); | ||
13 | + }); | ||
14 | + | ||
15 | + // 基于准备好的dom,初始化echarts实例 | ||
16 | + var lineChart = Echarts.init(document.getElementById('line-chart'), 'walden'); | ||
17 | + | ||
18 | + // 指定图表的配置项和数据 | ||
19 | + var option = option = { | ||
20 | + // title: { | ||
21 | + // text: 'Stacked Line' | ||
22 | + // }, | ||
23 | + tooltip: { | ||
24 | + trigger: 'axis', | ||
25 | + }, | ||
26 | + legend: { | ||
27 | + data: Config.equipment//['Email', 'Union Ads', 'Video Ads', 'Direct', 'Search Engine'] | ||
28 | + }, | ||
29 | + grid: { | ||
30 | + left: '3%', | ||
31 | + right: '4%', | ||
32 | + bottom: '3%', | ||
33 | + containLabel: true | ||
34 | + }, | ||
35 | + toolbox: { | ||
36 | + feature: { | ||
37 | + saveAsImage: {} | ||
38 | + } | ||
39 | + }, | ||
40 | + xAxis: { | ||
41 | + name:"日期", | ||
42 | + type: 'category', | ||
43 | + boundaryGap: false, | ||
44 | + data: Config.date //['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] | ||
45 | + }, | ||
46 | + yAxis: { | ||
47 | + name:"流量/mm", | ||
48 | + type: 'value' | ||
49 | + }, | ||
50 | + series: Config.rainfall_series | ||
51 | + }; | ||
52 | + | ||
53 | + // 使用刚指定的配置项和数据显示图表。 | ||
54 | + lineChart.setOption(option); | ||
55 | + | ||
56 | + // 初始化表格参数配置 | ||
57 | + Table.api.init({ | ||
58 | + extend: { | ||
59 | + index_url: 'reservoir/rain/river/flow/index' + location.search, | ||
60 | + add_url: 'reservoir/rain/river/flow/add', | ||
61 | + edit_url: 'reservoir/rain/river/flow/edit', | ||
62 | + del_url: 'reservoir/rain/river/flow/del', | ||
63 | + multi_url: 'reservoir/rain/river/flow/multi', | ||
64 | + import_url: 'reservoir/rain/river/flow/import', | ||
65 | + table: 'reservoir_rain_river_flow', | ||
66 | + } | ||
67 | + }); | ||
68 | + | ||
69 | + var table = $("#table"); | ||
70 | + | ||
71 | + // 初始化表格 | ||
72 | + table.bootstrapTable({ | ||
73 | + url: $.fn.bootstrapTable.defaults.extend.index_url, | ||
74 | + pk: 'id', | ||
75 | + sortName: 'id', | ||
76 | + columns: [ | ||
77 | + [ | ||
78 | + {checkbox: true}, | ||
79 | + {field: 'id', title: __('Id')}, | ||
80 | + {field: 'number', title: __('Number'), operate: 'LIKE'}, | ||
81 | + {field: 'status', title: __('Status'), searchList: {"0":__('Status 0'),"1":__('Status 1')}, formatter: Table.api.formatter.status}, | ||
82 | + {field: 'flow', title: __('Flow'), operate:'BETWEEN'}, | ||
83 | + {field: 'accumulate_flow', title: __('Accumulate_flow'), operate:'BETWEEN'}, | ||
84 | + {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, | ||
85 | + {field: 'reservoirlist.name', title: __('Reservoirlist.name'), operate: 'LIKE'}, | ||
86 | + {field: 'equipment.name', title: __('Reservoirequipment.name'), operate: 'LIKE'}, | ||
87 | + {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} | ||
88 | + ] | ||
89 | + ] | ||
90 | + }); | ||
91 | + | ||
92 | + // 为表格绑定事件 | ||
93 | + Table.api.bindevent(table); | ||
94 | + }, | ||
95 | + add: function () { | ||
96 | + Controller.api.bindevent(); | ||
97 | + }, | ||
98 | + edit: function () { | ||
99 | + Controller.api.bindevent(); | ||
100 | + }, | ||
101 | + api: { | ||
102 | + bindevent: function () { | ||
103 | + Form.api.bindevent($("form[role=form]")); | ||
104 | + } | ||
105 | + } | ||
106 | + }; | ||
107 | + return Controller; | ||
108 | +}); |
@@ -166,11 +166,11 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'template', 'echarts' | @@ -166,11 +166,11 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'template', 'echarts' | ||
166 | {checkbox: true}, | 166 | {checkbox: true}, |
167 | {field: 'id', title: __('Id')}, | 167 | {field: 'id', title: __('Id')}, |
168 | {field: 'number', title: __('Number'), operate: 'LIKE'}, | 168 | {field: 'number', title: __('Number'), operate: 'LIKE'}, |
169 | - {field: 'equipment.name', title: __('设备名称'), operate: false}, | 169 | + //{field: 'equipment.name', title: __('设备名称'), operate: false}, |
170 | {field: 'status', title: __('Status'), searchList: {"0":__('Status 0'),"1":__('Status 1')}, formatter: Table.api.formatter.status}, | 170 | {field: 'status', title: __('Status'), searchList: {"0":__('Status 0'),"1":__('Status 1')}, formatter: Table.api.formatter.status}, |
171 | {field: 'water_level', title: __('Water_level'), operate:'BETWEEN'}, | 171 | {field: 'water_level', title: __('Water_level'), operate:'BETWEEN'}, |
172 | {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, | 172 | {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, |
173 | - {field: 'reservoirlist.name', title: '水库'+__('Reservoirlist.name'), operate: 'LIKE'}, | 173 | + //{field: 'reservoirlist.name', title: '水库'+__('Reservoirlist.name'), operate: 'LIKE'}, |
174 | {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} | 174 | {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} |
175 | ] | 175 | ] |
176 | ] | 176 | ] |
1 | +define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) { | ||
2 | + | ||
3 | + var Controller = { | ||
4 | + index: function () { | ||
5 | + // 初始化表格参数配置 | ||
6 | + Table.api.init({ | ||
7 | + extend: { | ||
8 | + index_url: 'reservoir_rain_river_flow/index' + location.search, | ||
9 | + add_url: 'reservoir_rain_river_flow/add', | ||
10 | + edit_url: 'reservoir_rain_river_flow/edit', | ||
11 | + del_url: 'reservoir_rain_river_flow/del', | ||
12 | + multi_url: 'reservoir_rain_river_flow/multi', | ||
13 | + import_url: 'reservoir_rain_river_flow/import', | ||
14 | + table: 'reservoir_rain_river_flow', | ||
15 | + } | ||
16 | + }); | ||
17 | + | ||
18 | + var table = $("#table"); | ||
19 | + | ||
20 | + // 初始化表格 | ||
21 | + table.bootstrapTable({ | ||
22 | + url: $.fn.bootstrapTable.defaults.extend.index_url, | ||
23 | + pk: 'id', | ||
24 | + sortName: 'id', | ||
25 | + columns: [ | ||
26 | + [ | ||
27 | + {checkbox: true}, | ||
28 | + {field: 'id', title: __('Id')}, | ||
29 | + {field: 'number', title: __('Number'), operate: 'LIKE'}, | ||
30 | + {field: 'status', title: __('Status'), searchList: {"0":__('Status 0'),"1":__('Status 1')}, formatter: Table.api.formatter.status}, | ||
31 | + {field: 'flow', title: __('Flow'), operate:'BETWEEN'}, | ||
32 | + {field: 'accumulate_flow', title: __('Accumulate_flow'), operate:'BETWEEN'}, | ||
33 | + {field: 'velocity_flow', title: __('Velocity_flow'), operate:'BETWEEN'}, | ||
34 | + {field: 'water_level', title: __('Water_level'), operate:'BETWEEN'}, | ||
35 | + {field: 'water_level_warning', title: __('Water_level_warning'), searchList: {"0":__('Water_level_warning 0'),"1":__('Water_level_warning 1')}, formatter: Table.api.formatter.normal}, | ||
36 | + {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, | ||
37 | + {field: 'reporttime', title: __('Reporttime'), operate: 'LIKE'}, | ||
38 | + {field: 'issend', title: __('Issend')}, | ||
39 | + {field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, | ||
40 | + {field: 'reservoirequipment.name', title: __('Reservoirequipment.name'), operate: 'LIKE'}, | ||
41 | + {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} | ||
42 | + ] | ||
43 | + ] | ||
44 | + }); | ||
45 | + | ||
46 | + // 为表格绑定事件 | ||
47 | + Table.api.bindevent(table); | ||
48 | + }, | ||
49 | + add: function () { | ||
50 | + Controller.api.bindevent(); | ||
51 | + }, | ||
52 | + edit: function () { | ||
53 | + Controller.api.bindevent(); | ||
54 | + }, | ||
55 | + api: { | ||
56 | + bindevent: function () { | ||
57 | + Form.api.bindevent($("form[role=form]")); | ||
58 | + } | ||
59 | + } | ||
60 | + }; | ||
61 | + return Controller; | ||
62 | +}); |
public/assets/js/backend/waterworks.js
0 → 100644
1 | +define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) { | ||
2 | + | ||
3 | + var Controller = { | ||
4 | + index: function () { | ||
5 | + // 初始化表格参数配置 | ||
6 | + Table.api.init({ | ||
7 | + extend: { | ||
8 | + index_url: 'waterworks/index' + location.search, | ||
9 | + add_url: 'waterworks/add', | ||
10 | + edit_url: 'waterworks/edit', | ||
11 | + del_url: 'waterworks/del', | ||
12 | + multi_url: 'waterworks/multi', | ||
13 | + import_url: 'waterworks/import', | ||
14 | + table: 'waterworks', | ||
15 | + } | ||
16 | + }); | ||
17 | + | ||
18 | + var table = $("#table"); | ||
19 | + | ||
20 | + // 初始化表格 | ||
21 | + table.bootstrapTable({ | ||
22 | + url: $.fn.bootstrapTable.defaults.extend.index_url, | ||
23 | + pk: 'id', | ||
24 | + sortName: 'id', | ||
25 | + columns: [ | ||
26 | + [ | ||
27 | + {checkbox: true}, | ||
28 | + {field: 'id', title: __('Id')}, | ||
29 | + {field: 'name', title: __('Name'), operate: 'LIKE'}, | ||
30 | + {field: 'capacity', title: __('Capacity'), operate: 'LIKE'}, | ||
31 | + {field: 'lng', title: __('Lng'), operate:'BETWEEN'}, | ||
32 | + {field: 'lat', title: __('Lat'), operate:'BETWEEN'}, | ||
33 | + {field: 'address', title: __('Address'), operate: 'LIKE'}, | ||
34 | + {field: 'respon_name', title: __('Respon_name'), operate: 'LIKE'}, | ||
35 | + {field: 'createtime', title: __('Createtime'), operate:'RANGE', data: 'data-date-format="YYYY-MM-DD"',addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, | ||
36 | + {field: 'updatetime', title: __('Updatetime'), operate:'RANGE', data: 'data-date-format="YYYY-MM-DD"',addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, | ||
37 | + {field: 'buildtime', title: __('Buildtime'), operate:'RANGE', data: 'data-date-format="YYYY-MM-DD"',addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, | ||
38 | + {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} | ||
39 | + ] | ||
40 | + ] | ||
41 | + }); | ||
42 | + | ||
43 | + // 为表格绑定事件 | ||
44 | + Table.api.bindevent(table); | ||
45 | + }, | ||
46 | + add: function () { | ||
47 | + Controller.api.bindevent(); | ||
48 | + }, | ||
49 | + edit: function () { | ||
50 | + Controller.api.bindevent(); | ||
51 | + }, | ||
52 | + api: { | ||
53 | + bindevent: function () { | ||
54 | + Form.api.bindevent($("form[role=form]")); | ||
55 | + } | ||
56 | + } | ||
57 | + }; | ||
58 | + return Controller; | ||
59 | +}); |
-
请 注册 或 登录 后发表评论