From a4d3531d5d728b2780bcebc4e3e0f538cc9aec8d Mon Sep 17 00:00:00 2001
From: skycaiji <10957468+skycaiji@user.noreply.gitee.com>
Date: Wed, 7 Feb 2024 23:55:03 +0800
Subject: [PATCH] 2.7
---
plugin/release/diy/Demo.php | 2 +-
public/static/css/admin.css | 359 ++-------
public/static/css/collector.css | 220 ++++++
public/static/css/cpattern_browser.css | 2 +-
public/static/css/dataapi.css | 13 +
public/static/css/dataset.css | 51 ++
public/static/css/release.css | 78 ++
public/static/css/task.css | 7 +
public/static/js/admin.js | 16 +-
public/static/js/admin/collector.js | 17 +-
public/static/js/admin/dataapi.js | 21 +
public/static/js/admin/dataset.js | 27 +
public/static/js/admin/release.js | 8 +-
public/static/js/admin/tasks.js | 10 +-
public/static/js/common.js | 2 +-
public/static/js/langs/zh-cn.js | 2 +-
vendor/skycaiji/app/admin/controller/Api.php | 26 +-
.../app/admin/controller/Backstage.php | 13 +-
.../admin/controller/CollectController.php | 13 +-
.../app/admin/controller/Collected.php | 50 +-
.../app/admin/controller/Cpattern.php | 2 +-
.../skycaiji/app/admin/controller/Dataapi.php | 222 ++++++
.../skycaiji/app/admin/controller/Dataset.php | 680 ++++++++++++++++++
.../skycaiji/app/admin/controller/Develop.php | 2 +-
.../skycaiji/app/admin/controller/Release.php | 23 +-
vendor/skycaiji/app/admin/controller/Task.php | 32 +-
.../app/admin/controller/Taskgroup.php | 45 +-
vendor/skycaiji/app/admin/controller/Tool.php | 2 +-
.../app/admin/event/CpatternEvent.php | 44 +-
.../app/admin/event/CpatternSingle.php | 2 +-
vendor/skycaiji/app/admin/event/Rapi.php | 2 +-
vendor/skycaiji/app/admin/event/Rcms.php | 2 +-
vendor/skycaiji/app/admin/event/Rdataset.php | 130 ++++
.../skycaiji/app/admin/event/ReleaseBase.php | 57 +-
vendor/skycaiji/app/admin/lang/zh-cn.php | 19 +-
.../skycaiji/app/admin/model/CacheModel.php | 2 +-
vendor/skycaiji/app/admin/model/Collected.php | 137 +++-
vendor/skycaiji/app/admin/model/Config.php | 40 +-
vendor/skycaiji/app/admin/model/Task.php | 10 +-
.../view/backstage/bk_task_collected.html | 2 +-
.../app/admin/view/collected/list.html | 6 +-
.../admin/view/collector/echo_url_msg.html | 1 +
.../app/admin/view/collector/export.html | 2 +-
.../app/admin/view/collector/list_task.html | 4 +-
.../app/admin/view/collector/set.html | 1 +
.../skycaiji/app/admin/view/common/main.html | 41 +-
.../app/admin/view/cpattern/field.html | 6 +-
.../admin/view/cpattern/process_module.html | 30 +-
.../skycaiji/app/admin/view/cpattern/set.html | 6 +-
.../app/admin/view/cpattern/set_tpl.html | 6 +-
.../admin/view/cpattern/test_front_urls.html | 1 +
.../app/admin/view/cpattern/test_match.html | 1 +
.../admin/view/cpattern/test_test_url.html | 1 +
.../skycaiji/app/admin/view/dataapi/list.html | 78 ++
.../skycaiji/app/admin/view/dataapi/set.html | 247 +++++++
.../skycaiji/app/admin/view/dataset/db.html | 103 +++
.../app/admin/view/dataset/field.html | 39 +
.../app/admin/view/dataset/indexes.html | 61 ++
.../skycaiji/app/admin/view/dataset/list.html | 80 +++
.../app/admin/view/dataset/select.html | 51 ++
.../skycaiji/app/admin/view/dataset/set.html | 83 +++
.../skycaiji/app/admin/view/develop/app.html | 2 -
.../skycaiji/app/admin/view/develop/func.html | 22 +-
.../app/admin/view/develop/releaseCms.html | 2 -
.../skycaiji/app/admin/view/mystore/func.html | 2 +-
.../app/admin/view/mystore/release_app.html | 2 +-
.../app/admin/view/mystore/rules_task.html | 4 +-
vendor/skycaiji/app/admin/view/proxy/add.html | 2 +-
.../skycaiji/app/admin/view/proxy/groups.html | 2 +-
.../app/admin/view/release/dataset.html | 40 ++
.../app/admin/view/release/dbTableBind.html | 10 +-
.../app/admin/view/release/export.html | 2 +-
.../app/admin/view/release/import.html | 4 +-
.../skycaiji/app/admin/view/release/set.html | 17 +
.../app/admin/view/task/list_folder.html | 3 +-
.../app/admin/view/task/list_list.html | 17 +-
vendor/skycaiji/app/admin/view/task/save.html | 7 -
.../app/admin/view/task/save_ajax.html | 3 -
.../app/admin/view/task/save_form.html | 547 --------------
.../app/admin/view/task/set_form.html | 2 +-
.../app/admin/view/taskgroup/list.html | 35 +-
vendor/skycaiji/app/admin/view/user/list.html | 2 +-
vendor/skycaiji/app/api/controller/Data.php | 102 +++
vendor/skycaiji/app/api/view/index/index.html | 0
vendor/skycaiji/app/common.php | 4 +-
.../app/common/controller/BaseController.php | 14 +-
vendor/skycaiji/app/common/model/Dataapi.php | 309 ++++++++
vendor/skycaiji/app/common/model/Dataset.php | 97 +++
.../app/common/model/DatasetTable.php | 216 ++++++
vendor/skycaiji/app/config.php | 2 +-
vendor/skycaiji/app/database.php | 4 +-
.../skycaiji/app/extend/util/ChromeSocket.php | 6 +-
vendor/skycaiji/app/extend/util/Funcs.php | 7 +
vendor/skycaiji/app/extend/util/Log.php | 49 --
vendor/skycaiji/app/extend/util/Tools.php | 81 ++-
.../skycaiji/app/install/controller/Index.php | 2 +-
vendor/skycaiji/app/install/data/check_db | 2 +-
vendor/skycaiji/app/install/data/check_file | 2 +-
vendor/skycaiji/app/install/data/config.php | 2 +-
.../skycaiji/app/install/data/install_table | 38 +-
.../skycaiji/app/install/event/UpgradeDb.php | 425 +++--------
.../app/install/event/UpgradeDbVers.php | 360 ++++++++++
vendor/skycaiji/app/route.php | 1 +
103 files changed, 4067 insertions(+), 1623 deletions(-)
create mode 100644 public/static/css/collector.css
create mode 100644 public/static/css/dataapi.css
create mode 100644 public/static/css/dataset.css
create mode 100644 public/static/css/release.css
create mode 100644 public/static/css/task.css
create mode 100644 public/static/js/admin/dataapi.js
create mode 100644 public/static/js/admin/dataset.js
create mode 100644 vendor/skycaiji/app/admin/controller/Dataapi.php
create mode 100644 vendor/skycaiji/app/admin/controller/Dataset.php
create mode 100644 vendor/skycaiji/app/admin/event/Rdataset.php
create mode 100644 vendor/skycaiji/app/admin/view/dataapi/list.html
create mode 100644 vendor/skycaiji/app/admin/view/dataapi/set.html
create mode 100644 vendor/skycaiji/app/admin/view/dataset/db.html
create mode 100644 vendor/skycaiji/app/admin/view/dataset/field.html
create mode 100644 vendor/skycaiji/app/admin/view/dataset/indexes.html
create mode 100644 vendor/skycaiji/app/admin/view/dataset/list.html
create mode 100644 vendor/skycaiji/app/admin/view/dataset/select.html
create mode 100644 vendor/skycaiji/app/admin/view/dataset/set.html
create mode 100644 vendor/skycaiji/app/admin/view/release/dataset.html
delete mode 100644 vendor/skycaiji/app/admin/view/task/save.html
delete mode 100644 vendor/skycaiji/app/admin/view/task/save_ajax.html
delete mode 100644 vendor/skycaiji/app/admin/view/task/save_form.html
create mode 100644 vendor/skycaiji/app/api/controller/Data.php
create mode 100644 vendor/skycaiji/app/api/view/index/index.html
create mode 100644 vendor/skycaiji/app/common/model/Dataapi.php
create mode 100644 vendor/skycaiji/app/common/model/Dataset.php
create mode 100644 vendor/skycaiji/app/common/model/DatasetTable.php
delete mode 100644 vendor/skycaiji/app/extend/util/Log.php
create mode 100644 vendor/skycaiji/app/install/event/UpgradeDbVers.php
diff --git a/plugin/release/diy/Demo.php b/plugin/release/diy/Demo.php
index c7660ec..c0f3ccd 100644
--- a/plugin/release/diy/Demo.php
+++ b/plugin/release/diy/Demo.php
@@ -11,7 +11,7 @@ class Demo extends BaseDiy{
'db_pwd' => '', //密码
'db_port' => 3306, //端口
'db_prefix' => '', //表前缀
- 'db_charset' => 'utf8', //编码
+ 'db_charset' => 'utf8mb4', //编码
);
/**
* 导入数据
diff --git a/public/static/css/admin.css b/public/static/css/admin.css
index 221854b..0596308 100644
--- a/public/static/css/admin.css
+++ b/public/static/css/admin.css
@@ -6,6 +6,56 @@
.info-box-content .info-box-number{font-weight:normal;line-height:25px;}
.info-box-content .info-box-number .tips{margin-left:5px;font-size:14px;display:inline;}
.help-block{color:#aaa;}
+/*左侧宽度*/
+.content-wrapper,.main-footer{margin-left: 200px;}
+.main-header .navbar {
+ margin-left: 200px;
+}
+.main-header .logo {
+ width: 200px;
+ font-size:19px;
+ text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
+ font-family:'Microsoft YaHei';
+}
+.main-sidebar {
+ width: 200px;
+}
+.control-sidebar-bg,.control-sidebar {
+ right: -200px;
+ width: 200px;
+}
+@media (min-width: 768px) {
+ .sidebar-collapse .content-wrapper,.sidebar-collapse .main-footer {
+ margin-left:0
+ }
+ .sidebar-collapse .main-sidebar {
+ -webkit-transform:translate(-200px, 0);
+ -ms-transform: translate(-200px, 0);
+ -o-transform: translate(-200px, 0);
+ transform: translate(-200px, 0)
+ }
+ .control-sidebar-open .content-wrapper,.control-sidebar-open .right-side,.control-sidebar-open .main-footer {
+ margin-right:200px
+ }
+}
+@media (max-width: 767px) {
+ .content-wrapper,.main-footer {
+ margin-left:0
+ }
+ .sidebar-open .content-wrapper,.sidebar-open .main-footer {
+ -webkit-transform:translate(200px, 0);
+ -ms-transform: translate(200px, 0);
+ -o-transform: translate(200px, 0);
+ transform: translate(200px, 0)
+ }
+ .main-sidebar {
+ -webkit-transform:translate(-200px, 0);
+ -ms-transform: translate(-200px, 0);
+ -o-transform: translate(-200px, 0);
+ transform: translate(-200px, 0)
+ }
+
+}
/*取消动画*/
.content-wrapper,
.main-footer,
@@ -27,6 +77,11 @@
transition:none!important;
}
/*全局*/
+.treeview>ul.treeview-menu>li:FIRST-CHILD{padding-top:5px!important;}
+.treeview>ul.treeview-menu>li:LAST-CHILD{padding-bottom:5px!important;}
+.treeview>ul.treeview-menu>li>ul.treeview-menu>li:FIRST-CHILD{padding-top:0px!important;}
+.treeview>ul.treeview-menu>li>ul.treeview-menu>li:LAST-CHILD{padding-bottom:0px!important;}
+
.modal-body .form-group:last-child>button[type="submit"]{margin-bottom:-15px;}
.modal-body .form-group .help-block:last-child{margin-bottom:0;}
@@ -103,6 +158,9 @@ div.in-line-mg{display:inline;margin-right:5px;}
.echo-msg-lt{float:left;}
.echo-msg-lurl{float:left;margin-right:3px;height:17px;max-width:70%;overflow:hidden;text-overflow:ellipsis;word-wrap:break-word;word-break:break-all;}
+.login-logo{
+ font-family:'Microsoft YaHei';
+}
/*皮肤*/
.skin-blue-light .treeview-skins,.skin-black-light .treeview-skins,.skin-red-light .treeview-skins,.skin-yellow-light .treeview-skins,.skin-purple-light .treeview-skins,.skin-green-light .treeview-skins{
color:#000;
@@ -140,6 +198,16 @@ div.in-line-mg{display:inline;margin-right:5px;}
.skin-purple .steps-bar .current .round,.skin-purple .steps-bar .current .bar,.skin-purple-light .steps-bar .current .round,.skin-purple-light .steps-bar .current .bar{background:#605ca8;color:#fff;border-color:#605ca8;}
.skin-purple .steps-bar .current a,.skin-purple-light .steps-bar .current a {color: #555299;}
+.skin-black .nav-tabs-color li.active,.skin-black-light .nav-tabs-color li.active{border-top-color:#5A6E82!important;}
+
+.skin-green .nav-tabs-color li.active,.skin-green-light .nav-tabs-color li.active{border-top-color:#00a65a!important;}
+
+.skin-red .nav-tabs-color li.active,.skin-red-light .nav-tabs-color li.active{border-top-color:#dd4b39!important;}
+
+.skin-yellow .nav-tabs-color li.active,.skin-yellow-light .nav-tabs-color li.active{border-top-color:#f39c12!important;}
+
+.skin-purple .nav-tabs-color li.active,.skin-purple-light .nav-tabs-color li.active{border-top-color:#605ca8!important;}
+
/*数据表*/
.datatable .sub{padding-left:50px; background:url('../images/bg_column.gif') no-repeat 15px 10px;}
.datatable td .dropdown{display:inline;}
@@ -209,218 +277,19 @@ table.table thead .sorting_desc:after {
.modal-title{font-size:16px;}
.myModal .modal-body iframe{width:100%;height:100%;min-height:200px;}
.myModal button.close{font-size:18px;}
-/*采集器面板*/
-.coll-panel .panel-heading{background-color:#d2d6de;}
-.coll-panel .panel-default .panel-default .panel-heading{background-color:#efefef;}
-.coll-panel .panel-heading a{color:#333;}
-
-.coll-alert{color:#333!important;background-color:#f5f5f5!important;border-color:#ddd!important;}
-
-.c-p-source-urls>.form-group:first-child{margin-top:10px;}
-
-#c_p_level_urls tbody{
- counter-reset:levelcounter;
-}
-#c_p_level_urls .level:before{
- content:counter(levelcounter);
- counter-increment:levelcounter;
- font-weight:bold;
-}
-
-#c_p_front_urls td.sign,#c_p_level_urls td.sign,#c_p_relation_urls td.sign{
- width:50%;overflow:hidden;padding-bottom:0;
-}
-#c_p_front_urls .sign-th,#c_p_level_urls .sign-th,#c_p_relation_urls .sign-th{
- padding-left:5px;
-}
-#c_p_front_urls .signs,#c_p_level_urls .signs,#c_p_relation_urls .signs{
- border:0;padding:0px 5px;height:20px;line-height:14px;font-size:12px;color:#555;background:#fff;
-}
-
-/*采集器选项卡*/
-.coll-tab > li:nth-child(2).active > a,.coll-tab > li:nth-child(3).active > a{background:#f5f5f5;}
-.coll-tab > li{
- -moz-user-select:none;
- -webkit-user-select:none;
- -ms-user-select:none;
- -khtml-user-select:none;
- user-select:none;
-}
-.coll-tab>li>a{
- border-bottom:0;
-}
-/*请求头信息*/
-.c-p-request-headers table,.c-p-request-headers-img table,.c-p-request-headers-file table{margin-bottom:0}
-.c-p-request-headers .delete-request-header,.c-p-request-headers-img .delete-request-header-img,.c-p-request-headers-file .delete-request-header-file{margin-top:8px;}
-.c-p-request-headers td:first-child,.c-p-request-headers-img td:first-child,.c-p-request-headers-file td:first-child{width:200px;}
-.c-p-request-headers td:last-child,.c-p-request-headers-img td:last-child,.c-p-request-headers-file td:last-child{width:50px;text-align:center;}
-/*内容标签*/
-.c-p-url-content-signs{
- width:auto;
- overflow:hidden;
-}
-
-/*页面源码表单和请求头*/
-.c-p-url-web-form table,.c-p-url-web-header table{margin-bottom:0;}
-.c-p-url-web-form .delete-url-web-form,.c-p-url-web-header .delete-url-web-header{margin-top:8px;}
-.c-p-url-web-form td:first-child,.c-p-url-web-header td:first-child{width:200px;}
-.c-p-url-web-form td:last-child,.c-p-url-web-header td:last-child{width:50px;text-align:center;}
-/*页面渲染动作*/
-.c-p-url-renderer-list table{margin-bottom:0;}
-.c-p-url-renderer-list .td-renderer-element,.c-p-url-renderer-list .td-renderer-content{display:none;}
-.c-p-url-renderer-list .td-renderer-op{width:65px;text-align:center;}
-.c-p-url-renderer-list .td-renderer-op .input-group-addon:last-child{border-left:1px solid #d2d6de;}
-
-/*显示标签列表,input-group-btn必须position:static,否则dropdown-menu定位太窄*/
-.c-p-url-page-signs>.input-group-btn{position:static;}
-.c-p-url-page-signs .dropdown-menu{padding:0;box-shadow:none;border:0;}
-.c-p-url-page-signs .c-p-url-ps-table{padding:10px;box-shadow:0 0 2px 2px #eee;border:1px solid #ddd;border-radius:4px;}
-.c-p-url-page-signs .c-p-url-ps-table .table{margin-bottom:0;}
-.c-p-url-page-signs .c-p-url-ps-table .table td>a,.c-p-url-page-signs .dropdown-menu .table td>span{margin-right:5px;}
-.c-p-url-page-signs .c-p-url-ps-table .table td>*:last-child{margin-right:0;}
-.c-p-url-page-signs .c-p-url-ps-table .table td{white-space:normal!important;width:auto!important;}
-.c-p-url-page-signs .c-p-url-ps-table .table td:first-child{white-space:nowrap!important;}
-.c-p-url-page-signs .c-p-url-ps-table .table td:last-child{text-align:left!important;}
-
-/*分页字段*/
-.c-p-url-pagination-fields{
- width:auto;
- overflow:hidden;
-}
-
-/*参数标签样式*/
-.param-label{
- font-size:14px;
- font-weight:normal;
- padding: 4px 8px;
- text-decoration: none;
- border-bottom: none;
- color: #3c8dbc;
- border: 1px #ccc solid;
- margin:7px 15px 5px 0;
- position:relative;
- float:left;
-}
-.param-label em.delete{
- font-style: normal;
- display: block;
- position: absolute;
- top: -7px;
- right: -5px;
- z-index: 999;
- background:#fff;
-}
-/*采集器字段*/
-.c-p-field-list .field-name{color:#3c8dbc;cursor:pointer;}
-.c-p-field-list .exist-process{color:green;}
-.c-p-field-list thead .sort-field{font-size:12px;color:#cdcdcd;margin-left:5px;display:none;}
+/*杂项*/
.form-inline label{font-weight:normal;}
-.c-p-field-list td .field-process{vertical-align:middle;}
-.c-p-field-list td .glyphicon.icon-drag-move{font-size:12px;vertical-align:middle;}
-.c-p-field-list td .glyphicon.field-clone{font-size:12px;top:0.3px;vertical-align:middle;}
-.c-p-field-list td .glyphicon.field-del{font-size:12px;top:1.1px;vertical-align:middle;}
-
-#coll_tab_content td .glyphicon.icon-drag-move{font-size:12px;vertical-align:middle;}
-#coll_tab_content td .glyphicon.clone{font-size:12px;top:0.3px;vertical-align:middle;}
-#coll_tab_content td .glyphicon.delete{font-size:12px;top:1.1px;vertical-align:middle;}
-
-.c-p-process-accordion .panel-heading .glyphicon.c-p-process-title{font-size:11px;vertical-align:middle;}
-.c-p-process-accordion .panel-heading .glyphicon.icon-drag-move{font-size:12px;vertical-align:middle;}
-.c-p-process-accordion .panel-heading .glyphicon.c-p-process-clone{font-size:12px;top:0.3px;vertical-align:middle;}
-.c-p-process-accordion .panel-heading .glyphicon.c-p-process-del{font-size:12px;top:1.1px;vertical-align:middle;}
-.c-p-process-accordion .panel-heading .panel-title-title{float:left;}
-.c-p-process-accordion .panel-heading .panel-title-title input{display:none;border-radius:2px;border:1px solid #ccc;line-height:14px;font-size:12px;margin-left:5px;padding:1px 1px 1px 2px;}
-.c-p-process-accordion .panel-heading .panel-title-ops{float:right;line-height:19px;}
-
-
-#task_list_folder .taskgroup-opened .icon-folder-pre:before{content:"\2212"}
-#task_list_folder .taskgroup-opened .icon-folder:before{content:"\e118"}
-
-#task_list_folder .icon-folder-pre:before{font-size:12px;content:"\002b"}
-#task_list_folder .icon-folder:before{content:"\e117";margin-right:5px;}
-
-
.box-header .navbar-toggle{background:#efefef;margin-top:0;}
.box-header .navbar-toggle .icon-bar{background:#aaa;}
.form-item .form-horizontal .control-label{text-align:left;width:120px;font-weight:normal;}
-
.loading{background:url('../images/loading.gif') no-repeat 5px 0;background-size:27px 27px;width:32px;height:27px;}
.loading-sm{background:url('../images/load1.gif') no-repeat 0 0;background-size:11px 11px;width:11px;height:11px;display:inline-block;}
-.iga-rt{text-align:left;line-height:20px;}
-.iga-rt .blk{display:block;}
-.iga-rt .mgr{margin-right:5px;}
-
-.iga-rt1{padding:0;vertical-align:top;}
-.iga-rt1 .slt{width:100%;min-width:58px;height:24px;display:block;color:#555;font-weight:bold;padding:1px;margin:0;border:0;background:#F1F1F1;}
-.iga-rt1 .op{margin:0;padding:3px 6px;list-style:none;}
-.iga-rt1 .op li{display:none;}
-
-.nav-save-rule{float:right!important;}
-/*数据处理*/
-.form-control-slt{width:30px!important;text-align:center;}
-.form-control-slt select.form-control{min-width:20px!important;width:20px!important;height:30px!important;float:none!important;border:0!important;padding:0!important;margin:0!important;text-indent:-20px!important;}
-
-.p-m-func-field{display:inline;width:80px;border:0;cursor:pointer;margin:0;padding:0;height:auto;color:#555;}
-
-.p-m-api-val-field,.p-m-api-header-field{display:none;margin-left:-1px;padding:0;}
-
-.p-m-api-table table,.p-m-api-header-table table{margin-bottom:0;}
-.p-m-api-table td:first-child,.p-m-api-header-table td:first-child{width:200px;}
-.p-m-api-table td:last-child,.p-m-api-header-table td:last-child{width:50px;text-align:center;}
-.p-m-api-rule-module{display:none;}
-
-.p-m-html-tags{}
-.p-m-html-tags a{font-size:12px;font-weight:normal;cursor:pointer;margin-right:5px;}
-.p-m-html-tags a span{margin-right:2px;color:#999;}
-.p-m-if-val-func{position:relative;}
-.p-m-if-val-func a.input-group-addon{border-left:0;}
-.p-m-if-val-func .input-group-btn>select{margin-left:-1px;width:auto;padding:0;padding-left:5px;text-align:center;}
-.p-m-if-op{width:70px;padding:15px 0 0 8px!important;font-size:11px;}
-.p-m-if-add{font-size:12px;}
-
-.p-m-download-op{display:none;margin-top:15px;}
-/*发布设置*/
-.rele-db-error{margin-top:10px;color:red;font-weight:bold;}
-.db-table-bind-params{padding:0;margin-bottom:0;border:0;}
-.db-table-bind-params .table{margin-bottom:0;}
-.db-table-bind-params .table tr>th:first-child,.db-table-bind-params .table tr>td:first-child{padding-left:15px;}
-.db-table-bind-params .table thead th{padding-top:13px;padding-bottom:13px;}
-.db-table-bind-op{width:auto;height:auto;display:inline;padding:0;}
-.db-table-bind-where-tpl,.db-table-bind-query-tpl{display:none;}
-
-.db-table-bind-where,.db-table-bind-query{display:none;}
-.db-table-bind-data-seq{display:none;}
-.db-table-bind-where,.db-table-bind-query,.db-table-bind-data{border:0;}
-
-.db-table-bind-signs>.input-group-btn{position:static;}
-
-.dm-db-charset li {padding:5px 15px;}
-.dm-db-charset li.divider{padding:0;}
-.dm-db-charset li span{padding:5px; cursor:pointer;color:#555;}
-.dm-db-charset li span:hover{background:#eee;}
-
-.toapi-param-table table,.toapi-header-table table{margin-bottom:0;}
-.toapi-param-table td:first-child,.toapi-header-table td:first-child{width:200px;}
-.toapi-param-table td:last-child,.toapi-header-table td:last-child{width:50px;text-align:center;}
-
-#toapi_resp_module_help .help-block{display:none;margin:0;}
-
-.toapi-app-table table tr td{height:50px;vertical-align:middle!important;}
-.toapi-field-txt>.input-group-addon{padding:0;}
-.toapi-field-txt>.input-group-addon a.dropdown-toggle{border-color:#fff;padding:6px 12px;color:#666;}
-.toapi-field-txt>.input-group-addon a.dropdown-toggle:hover{color:#000;}
-.toapi-field-txt>.input-group-addon a.dropdown-toggle .caret{margin-top:-2px;}
-
-.toapi-field-slt select.form-control{min-width:120px!important;margin-right:-1px;min-height:34px;max-height:90px;}
-.toapi-field-slt textarea.form-control{height:90px;}
-.toapi-field-slt input.form-control,.toapi-field-slt textarea.form-control,.toapi-field-slt .input-group-addon{display:none!important;}
-
-.toapi-field-slt-txt input.form-control,.toapi-field-slt-txt textarea.form-control,.toapi-field-slt-txt .input-group-addon{display:table-cell!important;}
+footer.footer-end{display:none;}
/*步骤条*/
.steps-bar{width:100%;overflow:hidden;color:#999;}
.steps-bar a{color:#999;}
@@ -496,11 +365,6 @@ table.table thead .sorting_desc:after {
border-radius: 4px;
background:#d3d3d3;
}
-/**/
-#cms_bind em{color:red;}
-#cms_bind .box{margin-bottom:0;}
-#cms_bind .table{margin-bottom:0;}
-#toapi_app_params em{color:red;}
/*my store*/
.nav-tabs-color li.active{border-top-color:#3c8dbc!important;}
@@ -552,39 +416,6 @@ table.table thead .sorting_desc:after {
.deve-editor-apps li{padding:2px 0;width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}
.deve-editor-apps li a{color:#333;}
.deve-editor-apps li.cur a{font-weight:bold;}
-/**/
-.table-test-loop thead{background:#fafafa;}
-.table-test-loop thead th,.table-test-loop thead td{
- padding:0!important;
- -moz-user-select:none;
- -webkit-user-select:none;
- -ms-user-select:none;
- -khtml-user-select:none;
- user-select:none;
-}
-.table-test-loop thead th>div{
- cursor:w-resize;
- padding:8px;
-}
-.table-test-loop tbody td{
- position:relative;
-}
-.table-test-loop input{border:0;overflow:hidden;width:100%;min-width:150px;}
-.table-test-loop .view-box{padding-left:20px;}
-.table-test-loop .view-ipt{}
-.table-test-loop .view-btn{position:absolute;font-size:12px;top:12px;left:5px;}
-
-footer.footer-end{display:none;}
-
-.skin-black .nav-tabs-color li.active,.skin-black-light .nav-tabs-color li.active{border-top-color:#5A6E82!important;}
-
-.skin-green .nav-tabs-color li.active,.skin-green-light .nav-tabs-color li.active{border-top-color:#00a65a!important;}
-
-.skin-red .nav-tabs-color li.active,.skin-red-light .nav-tabs-color li.active{border-top-color:#dd4b39!important;}
-
-.skin-yellow .nav-tabs-color li.active,.skin-yellow-light .nav-tabs-color li.active{border-top-color:#f39c12!important;}
-
-.skin-purple .nav-tabs-color li.active,.skin-purple-light .nav-tabs-color li.active{border-top-color:#605ca8!important;}
/*采集窗口*/
.win-cem-process-body{position:relative;}
@@ -625,30 +456,6 @@ footer.footer-end{display:none;}
.win-cem-ifr-box iframe{width:100%;height:100%;margin:0;border:0;}
-@media (min-width: 1200px) {
- /*table-responsive设置overflow:inherit;可正常显示dropdown-menu*/
- .c-p-url-renderer-list{overflow:inherit;}
- .db-table-bind-where,.db-table-bind-query,.db-table-bind-data{overflow:inherit;}
-}
-
-@media (max-width: 1199px) {
- /*dropdown-menu用fixed避免被table-responsive的overflow:hidden;影响*/
- .c-p-url-renderer-list .c-p-url-page-signs .dropdown-menu{padding:0;border:4px solid #ddd;border-radius:4px;background:transparent;position:fixed;left:10px;right:10px;bottom:10px;top:auto;max-height:80%;overflow-y:scroll;}
- .c-p-url-renderer-list .c-p-url-page-signs .dropdown-menu .c-p-url-ps-table{background:#fff;}
-
- .db-table-bind-signs .dropdown-menu{padding:0;border:4px solid #ddd;border-radius:4px;background:transparent;position:fixed;left:10px;right:10px;bottom:10px;top:auto;max-height:80%;overflow-y:scroll;}
- .db-table-bind-signs .dropdown-menu table{margin:0;}
-}
-
-@media (min-width: 900px) {
- .toapi-app-table .table tr td:FIRST-CHILD{width:200px;white-space:nowrap;padding-right:10px;}
- #cms_bind .table tr td:FIRST-CHILD{width:200px;white-space:nowrap;padding-right:10px;}
-}
-
-@media (min-width: 768px) {
- .c-p-url-web-form,.c-p-url-web-header{overflow:inherit;} /*table-responsive设置overflow:inherit;可正常显示dropdown-menu*/
-}
-
@media (max-width: 767px){
.main-header .logo{
width:140px;
@@ -663,40 +470,14 @@ footer.footer-end{display:none;}
padding-top:50px;
}
.content-wrapper .content{padding-top:8px;}
-
- .c-p-url-page-signs .dropdown-menu .table td>a,.c-p-url-page-signs .dropdown-menu .table td>span{display:block;margin-right:0;}
.deve-editor-left,.deve-editor-right{padding-left:15px;padding-right:15px;margin-bottom:10px;}
- /*dropdown-menu用fixed避免被table-responsive的overflow:hidden;影响*/
- .c-p-url-web-form .c-p-url-page-signs .dropdown-menu,.c-p-url-web-header .c-p-url-page-signs .dropdown-menu{padding:0;border:4px solid #ddd;border-radius:4px;background:transparent;position:fixed;left:10px;right:10px;bottom:10px;top:auto;max-height:80%;overflow-y:scroll;}
- .c-p-url-web-form .c-p-url-page-signs .dropdown-menu .c-p-url-ps-table,.c-p-url-web-header .c-p-url-page-signs .dropdown-menu .c-p-url-ps-table{background:#fff;}
/*元素最小宽度,防止太窄无法输入*/
.table-responsive .table input.form-control{min-width:100px;}
.table-responsive .table textarea.form-control{min-width:100px;}
}
@media (max-width: 550px){
- /*采集器tab*/
- .coll-tab>li{margin-bottom:5px;width:33%;}
- .coll-tab>li>a{padding:7px 0;border:solid 1px #ddd;text-align:center;}
- .coll-tab>li:nth-child(3).active>a{background:#fff;}
- .coll-tab>li.active>a{border-radius:3px;border-bottom-color:#ddd!important;}
- .coll-tab .nav-save-rule{float:left!important;}
- .coll-tab .nav-save-rule>a{color:#999;}
-
- .c-p-source-tab>li{margin-bottom:5px;margin-right:3px;width:auto;}
- .c-p-source-tab>li>a{padding:5px 7px;border:solid 1px #ddd;text-align:center;}
- .c-p-source-tab>li.active>a{border-radius:3px;border-bottom-color:#ddd!important;background-color:#efefef!important;}
-
- .mobile-input-group{width:100%;}
- .mobile-input-group>.input-group-addon{display:table-caption;width:100%;background:#fafafa;margin-bottom:5px;border-right:1px solid #ccc;}
- .mobile-input-group1>.input-group-addon{display:block;}
- /*自适应第一个td宽度*/
- .c-p-request-headers td:first-child,.c-p-request-headers-img td:first-child{width:auto;}
- .c-p-url-web-form td:first-child,.c-p-url-web-header td:first-child{width:auto;}
- .p-m-api-table td:first-child,.p-m-api-header-table td:first-child{width:auto;}
- .toapi-param-table td:first-child,.toapi-header-table td:first-child{width:auto;}
-
.list-footer .form-control{width:100%!important;}
}
\ No newline at end of file
diff --git a/public/static/css/collector.css b/public/static/css/collector.css
new file mode 100644
index 0000000..aed1d15
--- /dev/null
+++ b/public/static/css/collector.css
@@ -0,0 +1,220 @@
+@CHARSET "UTF-8";
+/*采集器面板*/
+.coll-panel .panel-heading{background-color:#d2d6de;}
+.coll-panel .panel-default .panel-default .panel-heading{background-color:#efefef;}
+.coll-panel .panel-heading a{color:#333;}
+
+.coll-alert{color:#333!important;background-color:#f5f5f5!important;border-color:#ddd!important;}
+
+.c-p-source-urls>.form-group:first-child{margin-top:10px;}
+
+#c_p_level_urls tbody{
+ counter-reset:levelcounter;
+}
+#c_p_level_urls .level:before{
+ content:counter(levelcounter);
+ counter-increment:levelcounter;
+ font-weight:bold;
+}
+#c_p_front_urls td.sign,#c_p_level_urls td.sign,#c_p_relation_urls td.sign{
+ width:50%;overflow:hidden;padding-bottom:0;
+}
+#c_p_front_urls .sign-th,#c_p_level_urls .sign-th,#c_p_relation_urls .sign-th{
+ padding-left:5px;
+}
+#c_p_front_urls .signs,#c_p_level_urls .signs,#c_p_relation_urls .signs{
+ border:0;padding:0px 5px;height:20px;line-height:14px;font-size:12px;color:#555;background:#fff;
+}
+/*采集器选项卡*/
+.coll-tab > li:nth-child(2).active > a,.coll-tab > li:nth-child(3).active > a{background:#f5f5f5;}
+.coll-tab > li{
+ -moz-user-select:none;
+ -webkit-user-select:none;
+ -ms-user-select:none;
+ -khtml-user-select:none;
+ user-select:none;
+}
+.coll-tab>li>a{
+ border-bottom:0;
+}
+/*请求头信息*/
+.c-p-request-headers table,.c-p-request-headers-img table,.c-p-request-headers-file table{margin-bottom:0}
+.c-p-request-headers .delete-request-header,.c-p-request-headers-img .delete-request-header-img,.c-p-request-headers-file .delete-request-header-file{margin-top:8px;}
+.c-p-request-headers td:first-child,.c-p-request-headers-img td:first-child,.c-p-request-headers-file td:first-child{width:200px;}
+.c-p-request-headers td:last-child,.c-p-request-headers-img td:last-child,.c-p-request-headers-file td:last-child{width:50px;text-align:center;}
+/*内容标签*/
+.c-p-url-content-signs{
+ width:auto;
+ overflow:hidden;
+}
+/*页面源码表单和请求头*/
+.c-p-url-web-form table,.c-p-url-web-header table{margin-bottom:0;}
+.c-p-url-web-form .delete-url-web-form,.c-p-url-web-header .delete-url-web-header{margin-top:8px;}
+.c-p-url-web-form td:first-child,.c-p-url-web-header td:first-child{width:200px;}
+.c-p-url-web-form td:last-child,.c-p-url-web-header td:last-child{width:50px;text-align:center;}
+/*页面渲染动作*/
+.c-p-url-renderer-list table{margin-bottom:0;}
+.c-p-url-renderer-list .td-renderer-element,.c-p-url-renderer-list .td-renderer-content{display:none;}
+.c-p-url-renderer-list .td-renderer-op{width:65px;text-align:center;vertical-align:middle;}
+.c-p-url-renderer-list .td-renderer-op .icon-drag-move{font-size:14px!important;}
+.c-p-url-renderer-list .td-renderer-op .input-group-addon:last-child{border-left:1px solid #d2d6de;}
+/*显示标签列表,input-group-btn必须position:static,否则dropdown-menu定位太窄*/
+.c-p-url-page-signs>.input-group-btn{position:static;}
+.c-p-url-page-signs .dropdown-menu{padding:0;box-shadow:none;border:0;}
+.c-p-url-page-signs .c-p-url-ps-table{padding:10px;box-shadow:0 0 2px 2px #eee;border:1px solid #ddd;border-radius:4px;}
+.c-p-url-page-signs .c-p-url-ps-table .table{margin-bottom:0;}
+.c-p-url-page-signs .c-p-url-ps-table .table td>a,.c-p-url-page-signs .dropdown-menu .table td>span{margin-right:5px;}
+.c-p-url-page-signs .c-p-url-ps-table .table td>*:last-child{margin-right:0;}
+.c-p-url-page-signs .c-p-url-ps-table .table td{white-space:normal!important;width:auto!important;}
+.c-p-url-page-signs .c-p-url-ps-table .table td:first-child{white-space:nowrap!important;}
+.c-p-url-page-signs .c-p-url-ps-table .table td:last-child{text-align:left!important;}
+
+/*分页字段*/
+.c-p-url-pagination-fields{
+ width:auto;
+ overflow:hidden;
+}
+
+/*参数标签样式*/
+.param-label{
+ font-size:14px;
+ font-weight:normal;
+ padding: 4px 8px;
+ text-decoration: none;
+ border-bottom: none;
+ color: #3c8dbc;
+ border: 1px #ccc solid;
+ margin:7px 15px 5px 0;
+ position:relative;
+ float:left;
+}
+.param-label em.delete{
+ font-style: normal;
+ display: block;
+ position: absolute;
+ top: -7px;
+ right: -5px;
+ z-index: 999;
+ background:#fff;
+}
+
+/*采集器字段*/
+.c-p-field-list .field-name{color:#3c8dbc;cursor:pointer;}
+.c-p-field-list .exist-process{color:green;}
+.c-p-field-list thead .sort-field{font-size:12px;color:#cdcdcd;margin-left:5px;display:none;}
+
+
+.c-p-field-list td .field-process{vertical-align:middle;}
+.c-p-field-list td .glyphicon.icon-drag-move{font-size:12px;vertical-align:middle;}
+.c-p-field-list td .glyphicon.field-clone{font-size:12px;top:0.3px;vertical-align:middle;}
+.c-p-field-list td .glyphicon.field-del{font-size:12px;top:1.1px;vertical-align:middle;}
+
+#coll_tab_content td .glyphicon.icon-drag-move{font-size:12px;vertical-align:middle;}
+#coll_tab_content td .glyphicon.clone{font-size:12px;top:0.3px;vertical-align:middle;}
+#coll_tab_content td .glyphicon.delete{font-size:12px;top:1.1px;vertical-align:middle;}
+
+.c-p-process-accordion .panel-heading .glyphicon.c-p-process-title{font-size:11px;vertical-align:middle;}
+.c-p-process-accordion .panel-heading .glyphicon.icon-drag-move{font-size:12px;vertical-align:middle;}
+.c-p-process-accordion .panel-heading .glyphicon.c-p-process-clone{font-size:12px;top:0.3px;vertical-align:middle;}
+.c-p-process-accordion .panel-heading .glyphicon.c-p-process-del{font-size:12px;top:1.1px;vertical-align:middle;}
+.c-p-process-accordion .panel-heading .panel-title-title{float:left;}
+.c-p-process-accordion .panel-heading .panel-title-title input{display:none;border-radius:2px;border:1px solid #ccc;line-height:14px;font-size:12px;margin-left:5px;padding:1px 1px 1px 2px;}
+.c-p-process-accordion .panel-heading .panel-title-ops{float:right;line-height:19px;}
+
+
+.iga-rt{text-align:left;line-height:20px;}
+.iga-rt .blk{display:block;}
+.iga-rt .mgr{margin-right:5px;}
+
+.iga-rt1{padding:0;vertical-align:top;}
+.iga-rt1 .slt{width:100%;min-width:58px;height:24px;display:block;color:#555;font-weight:bold;padding:1px;margin:0;border:0;background:#F1F1F1;}
+.iga-rt1 .op{margin:0;padding:3px 6px;list-style:none;}
+.iga-rt1 .op li{display:none;}
+
+.nav-save-rule{float:right!important;}
+
+
+/*数据处理*/
+.form-control-slt{width:30px!important;text-align:center;}
+.form-control-slt select.form-control{min-width:20px!important;width:20px!important;height:30px!important;float:none!important;border:0!important;padding:0!important;margin:0!important;text-indent:-20px!important;}
+
+.p-m-func-field,.p-m-insert-field{display:inline;width:80px;border:0;cursor:pointer;margin:0;padding:0;height:auto;color:#555;}
+
+.p-m-api-val-field,.p-m-api-header-field{display:none;margin-left:-1px;padding:0;}
+
+.p-m-api-table table,.p-m-api-header-table table{margin-bottom:0;}
+.p-m-api-table td:first-child,.p-m-api-header-table td:first-child{width:200px;}
+.p-m-api-table td:last-child,.p-m-api-header-table td:last-child{width:50px;text-align:center;}
+.p-m-api-rule-module{display:none;}
+
+.p-m-html-tags{}
+.p-m-html-tags a{font-size:12px;font-weight:normal;cursor:pointer;margin-right:5px;}
+.p-m-html-tags a span{margin-right:2px;color:#999;}
+.p-m-if-val-func{position:relative;}
+.p-m-if-val-func a.input-group-addon{border-left:0;}
+.p-m-if-val-func .input-group-btn>select{margin-left:-1px;width:auto;padding:0;padding-left:5px;text-align:center;}
+.p-m-if-op{width:70px;padding:15px 0 0 8px!important;font-size:11px;}
+.p-m-if-add{font-size:12px;}
+
+.p-m-download-op{display:none;margin-top:15px;}
+/*测试*/
+.table-test-loop thead{background:#fafafa;}
+.table-test-loop thead th,.table-test-loop thead td{
+ padding:0!important;
+ -moz-user-select:none;
+ -webkit-user-select:none;
+ -ms-user-select:none;
+ -khtml-user-select:none;
+ user-select:none;
+}
+.table-test-loop thead th>div{
+ cursor:w-resize;
+ padding:8px;
+}
+.table-test-loop tbody td{
+ position:relative;
+}
+.table-test-loop input{border:0;overflow:hidden;width:100%;min-width:150px;}
+.table-test-loop .view-box{padding-left:20px;}
+.table-test-loop .view-ipt{}
+.table-test-loop .view-btn{position:absolute;font-size:12px;top:12px;left:5px;}
+
+@media (min-width: 1200px) {
+ /*table-responsive设置overflow:inherit;可正常显示dropdown-menu*/
+ .c-p-url-renderer-list{overflow:inherit;}
+}
+
+@media (max-width: 1199px) {
+ /*dropdown-menu用fixed避免被table-responsive的overflow:hidden;影响*/
+ .c-p-url-renderer-list .c-p-url-page-signs .dropdown-menu{padding:0;border:4px solid #ddd;border-radius:4px;background:transparent;position:fixed;left:10px;right:10px;bottom:10px;top:auto;max-height:80%;overflow-y:scroll;}
+ .c-p-url-renderer-list .c-p-url-page-signs .dropdown-menu .c-p-url-ps-table{background:#fff;}
+}
+
+@media (min-width: 768px) {
+ .c-p-url-web-form,.c-p-url-web-header{overflow:inherit;} /*table-responsive设置overflow:inherit;可正常显示dropdown-menu*/
+}
+
+@media (max-width: 767px){
+ .c-p-url-page-signs .dropdown-menu .table td>a,.c-p-url-page-signs .dropdown-menu .table td>span{display:block;margin-right:0;}
+ /*dropdown-menu用fixed避免被table-responsive的overflow:hidden;影响*/
+ .c-p-url-web-form .c-p-url-page-signs .dropdown-menu,.c-p-url-web-header .c-p-url-page-signs .dropdown-menu{padding:0;border:4px solid #ddd;border-radius:4px;background:transparent;position:fixed;left:10px;right:10px;bottom:10px;top:auto;max-height:80%;overflow-y:scroll;}
+ .c-p-url-web-form .c-p-url-page-signs .dropdown-menu .c-p-url-ps-table,.c-p-url-web-header .c-p-url-page-signs .dropdown-menu .c-p-url-ps-table{background:#fff;}
+}
+
+@media (max-width: 550px){
+ /*采集器tab*/
+ .coll-tab>li{margin-bottom:5px;width:33%;}
+ .coll-tab>li>a{padding:7px 0;border:solid 1px #ddd;text-align:center;}
+ .coll-tab>li:nth-child(3).active>a{background:#fff;}
+ .coll-tab>li.active>a{border-radius:3px;border-bottom-color:#ddd!important;}
+ .coll-tab .nav-save-rule{float:left!important;}
+ .coll-tab .nav-save-rule>a{color:#999;}
+
+ .c-p-source-tab>li{margin-bottom:5px;margin-right:3px;width:auto;}
+ .c-p-source-tab>li>a{padding:5px 7px;border:solid 1px #ddd;text-align:center;}
+ .c-p-source-tab>li.active>a{border-radius:3px;border-bottom-color:#ddd!important;background-color:#efefef!important;}
+ /*自适应第一个td宽度*/
+ .c-p-request-headers td:first-child,.c-p-request-headers-img td:first-child{width:auto;}
+ .c-p-url-web-form td:first-child,.c-p-url-web-header td:first-child{width:auto;}
+ .p-m-api-table td:first-child,.p-m-api-header-table td:first-child{width:auto;}
+}
\ No newline at end of file
diff --git a/public/static/css/cpattern_browser.css b/public/static/css/cpattern_browser.css
index 49aa185..de727a5 100644
--- a/public/static/css/cpattern_browser.css
+++ b/public/static/css/cpattern_browser.css
@@ -39,7 +39,7 @@
#skycaiji_console .skycaiji-block{width:100%;overflow:hidden;line-height:20px;padding-top:5px;}
#skycaiji_console .skycaiji-block>.skycaiji-b-l{float:left;width:130px;}
#skycaiji_console .skycaiji-block>.skycaiji-b-c{margin-left:130px;margin-right:260px;}
-#skycaiji_console .skycaiji-block>.skycaiji-b-c .skycaiji-b-c-i{margin-right:20px;}
+#skycaiji_console .skycaiji-block>.skycaiji-b-c .skycaiji-b-c-i{margin-right:20px;min-width:300px;}
#skycaiji_console .skycaiji-block>.skycaiji-b-c input{width:100%;height:20px;float:left;}
#skycaiji_console .skycaiji-block>.skycaiji-b-c select{width:20px;height:20px;overflow:hidden;float:left;}
#skycaiji_console .skycaiji-block>.skycaiji-b-r{padding-left:5px;float:left;}
diff --git a/public/static/css/dataapi.css b/public/static/css/dataapi.css
new file mode 100644
index 0000000..fc6e3b3
--- /dev/null
+++ b/public/static/css/dataapi.css
@@ -0,0 +1,13 @@
+@CHARSET "UTF-8";
+
+
+#dataapi_list .status{color:green;}
+#dataapi_list .status-close{color:red;}
+
+#config_conds tr>th:first-child,#config_conds tr>td:first-child{padding-left:15px;}
+#config_conds thead th{padding-top:13px;padding-bottom:13px;}
+#config_conds tbody tr>td:last-child{vertical-align:middle;font-size:14px;}
+#config_conds .config-cond-move{font-size:12px;}
+#config_conds .config-cond-dlt{margin-left:2px;margin-right:2px;}
+#config_conds .config-cond-sub td:FIRST-CHILD{padding-left:50px; background:url('../images/bg_column.gif') no-repeat 15px 15px;}
+#config_conds .config-cond-sub .config-cond-add{display:none;}
diff --git a/public/static/css/dataset.css b/public/static/css/dataset.css
new file mode 100644
index 0000000..01c1e2c
--- /dev/null
+++ b/public/static/css/dataset.css
@@ -0,0 +1,51 @@
+@CHARSET "UTF-8";
+/*数据集*/
+#dataset_list .fields{
+ border:0;padding:0px 5px;height:20px;line-height:14px;font-size:12px;color:#555;background:#fff;
+}
+#dataset_db_list td .txt-big{height:100px!important;}
+#dataset_db_list td{vertical-align:middle;}
+#dataset_db_list td .form-control{
+ height: 30px;
+ padding: 5px 10px;
+ font-size: 12px;
+ line-height: 1.5;
+ border-radius: 3px;
+}
+
+.dataset-db-list::-webkit-scrollbar{
+ width: 12px;
+ height: 12px;
+}
+.dataset-search::-webkit-scrollbar{
+ width: 8px;
+ height: 8px;
+}
+.dataset-db-list::-webkit-scrollbar-button,.dataset-search::-webkit-scrollbar-button{
+ background-color:#efefef;
+}
+.dataset-db-list::-webkit-scrollbar-track,.dataset-search::-webkit-scrollbar-track{
+ background:#efefef;
+}
+.dataset-db-list::-webkit-scrollbar-thumb,.dataset-search::-webkit-scrollbar-thumb{
+ background: #ccc;
+ border-radius: 4px;
+}
+
+.dataset-search{width:100%;overflow-x:scroll;white-space:nowrap;padding-bottom:5px;padding-right:5px;}
+
+#dataset_db_list input::placeholder,#dataset_db_list textarea::placeholder{color:#bbb!important;}
+
+#dataset_fields tr>th:first-child,#dataset_fields tr>td:first-child{padding-left:15px;}
+#dataset_fields thead th{padding-top:13px;padding-bottom:13px;}
+
+
+.dataset-sep{
+ color: #999;
+ text-indent: -9999px;
+ display: inline-block;
+ width: 3px;
+ line-height: 12px;
+ margin-left: 2px;
+ border-left: 1px solid #aaa;
+}
diff --git a/public/static/css/release.css b/public/static/css/release.css
new file mode 100644
index 0000000..f33736b
--- /dev/null
+++ b/public/static/css/release.css
@@ -0,0 +1,78 @@
+@CHARSET "UTF-8";
+
+/*发布设置*/
+#dataset_config table tr td{height:50px;vertical-align:middle!important;}
+.dataset-field-txt>.input-group-addon{padding:0;}
+.dataset-field-txt>.input-group-addon a.dropdown-toggle{border-color:#fff;padding:6px 12px;color:#666;}
+.dataset-field-txt>.input-group-addon a.dropdown-toggle:hover{color:#000;}
+.dataset-field-txt>.input-group-addon a.dropdown-toggle .caret{margin-top:-2px;}
+
+.rele-db-error{margin-top:10px;color:red;font-weight:bold;}
+.db-table-bind-params{padding:0;margin-bottom:0;border:0;}
+.db-table-bind-params .table{margin-bottom:0;}
+.db-table-bind-params .table tr>th:first-child,.db-table-bind-params .table tr>td:first-child{padding-left:15px;}
+.db-table-bind-params .table thead th{padding-top:13px;padding-bottom:13px;}
+.db-table-bind-op{width:auto;height:auto;display:inline;padding:0;}
+.db-table-bind-where-tpl,.db-table-bind-query-tpl{display:none;}
+
+.db-table-bind-where,.db-table-bind-query{display:none;}
+.db-table-bind-data-seq{display:none;}
+.db-table-bind-where,.db-table-bind-query,.db-table-bind-data{border:0;}
+
+.db-table-bind-signs>.input-group-btn{position:static;}
+
+.dm-db-charset li {padding:5px 15px;}
+.dm-db-charset li.divider{padding:0;}
+.dm-db-charset li span{padding:5px; cursor:pointer;color:#555;}
+.dm-db-charset li span:hover{background:#eee;}
+
+.toapi-param-table table,.toapi-header-table table{margin-bottom:0;}
+.toapi-param-table td:first-child,.toapi-header-table td:first-child{width:200px;}
+.toapi-param-table td:last-child,.toapi-header-table td:last-child{width:50px;text-align:center;}
+
+#toapi_resp_module_help .help-block{display:none;margin:0;}
+
+.toapi-app-table table tr td{height:50px;vertical-align:middle!important;}
+.toapi-field-txt>.input-group-addon{padding:0;}
+.toapi-field-txt>.input-group-addon a.dropdown-toggle{border-color:#fff;padding:6px 12px;color:#666;}
+.toapi-field-txt>.input-group-addon a.dropdown-toggle:hover{color:#000;}
+.toapi-field-txt>.input-group-addon a.dropdown-toggle .caret{margin-top:-2px;}
+
+.toapi-field-slt select.form-control{min-width:120px!important;margin-right:-1px;min-height:34px;max-height:90px;}
+.toapi-field-slt textarea.form-control{height:90px;}
+.toapi-field-slt input.form-control,.toapi-field-slt textarea.form-control,.toapi-field-slt .input-group-addon{display:none!important;}
+
+.toapi-field-slt-txt input.form-control,.toapi-field-slt-txt textarea.form-control,.toapi-field-slt-txt .input-group-addon{display:table-cell!important;}
+
+/**/
+#cms_bind em{color:red;}
+#cms_bind .box{margin-bottom:0;}
+#cms_bind .table{margin-bottom:0;}
+#toapi_app_params em{color:red;}
+
+
+
+@media (min-width: 1200px) {
+ /*table-responsive设置overflow:inherit;可正常显示dropdown-menu*/
+ .db-table-bind-where,.db-table-bind-query,.db-table-bind-data{overflow:inherit;}
+}
+
+@media (max-width: 1199px) {
+ /*dropdown-menu用fixed避免被table-responsive的overflow:hidden;影响*/
+ .db-table-bind-signs .dropdown-menu{padding:0;border:4px solid #ddd;border-radius:4px;background:transparent;position:fixed;left:10px;right:10px;bottom:10px;top:auto;max-height:80%;overflow-y:scroll;}
+ .db-table-bind-signs .dropdown-menu table{margin:0;}
+}
+
+@media (min-width: 900px) {
+ #dataset_config .table tr td:FIRST-CHILD{width:200px;white-space:nowrap;padding-right:10px;}
+ .toapi-app-table .table tr td:FIRST-CHILD{width:200px;white-space:nowrap;padding-right:10px;}
+ #cms_bind .table tr td:FIRST-CHILD{width:200px;white-space:nowrap;padding-right:10px;}
+}
+
+@media (max-width: 550px){
+ .mobile-input-group{width:100%;}
+ .mobile-input-group>.input-group-addon{display:table-caption;width:100%;background:#fafafa;margin-bottom:5px;border-right:1px solid #ccc;}
+ .mobile-input-group1>.input-group-addon{display:block;}
+
+ .toapi-param-table td:first-child,.toapi-header-table td:first-child{width:auto;}
+}
\ No newline at end of file
diff --git a/public/static/css/task.css b/public/static/css/task.css
new file mode 100644
index 0000000..1d6e0a5
--- /dev/null
+++ b/public/static/css/task.css
@@ -0,0 +1,7 @@
+@CHARSET "UTF-8";
+
+#task_list_folder .taskgroup-opened .icon-folder-pre:before{content:"\2212"}
+#task_list_folder .taskgroup-opened .icon-folder:before{content:"\e118"}
+
+#task_list_folder .icon-folder-pre:before{font-size:12px;content:"\002b"}
+#task_list_folder .icon-folder:before{content:"\e117";margin-right:5px;}
diff --git a/public/static/js/admin.js b/public/static/js/admin.js
index 4c0feff..9558255 100644
--- a/public/static/js/admin.js
+++ b/public/static/js/admin.js
@@ -7,10 +7,10 @@
| 使用协议 https://www.skycaiji.com/licenses
|--------------------------------------------------------------------------
*/
-'use strict';var admincpOp={init:function(){var bodyWidth=$(document.body).width();var cpConfig=window.site_config.admincp;cpConfig=cpConfig?cpConfig:{};if(cpConfig.skin){$('body').removeClass('skin-blue').addClass(cpConfig.skin)}
+'use strict';var admincpOp={getConfig:function(key){var cpConfig=window.site_config.admincp;cpConfig=cpConfig?cpConfig:{};return key?cpConfig[key]:cpConfig},init:function(){var bodyWidth=$(document.body).width();var cpConfig=admincpOp.getConfig(null);if(cpConfig.skin){$('body').removeClass('skin-blue').addClass(cpConfig.skin)}
var menuOpts={};if(bodyWidth>767){if(cpConfig.mini==1){$('body').addClass('sidebar-collapse').addClass('sidebar-mini')}
if(cpConfig.narrow==1){$('body').addClass('layout-boxed')}
-menuOpts={};if(window.navigator.userAgent.indexOf('MSIE')>-1){menuOpts={animationSpeed:0}}}else{menuOpts={animationSpeed:0}}
+menuOpts={animationSpeed:300};if(window.navigator.userAgent.indexOf('MSIE')>-1){menuOpts={animationSpeed:0}}}else{menuOpts={animationSpeed:0}}
$('.sidebar-menu').tree(menuOpts);$(document).ready(function(){$('#treeview_skins').bind('click',function(){if($('#sidebar_skins').html().length<=0){admincpOp.skins()}});if(bodyWidth>767){if(cpConfig.mini==1){$('#chk_sidebar_mini').prop('checked',!0)}
$('#chk_sidebar_mini').bind('click',function(){var setMini=$(this).is(':checked')?1:0;admincpOp.config('mini',setMini,function(){if(setMini){$('body').addClass('sidebar-collapse').addClass('sidebar-mini')}else{$('body').removeClass('sidebar-collapse').removeClass('sidebar-mini')}})});$('.sidebar-toggle[data-toggle="push-menu"]').bind('click',function(){$('body').addClass('sidebar-mini')});if(cpConfig.narrow==1){$('#chk_sidebar_narrow').prop('checked',!0)}
$('#chk_sidebar_narrow').bind('click',function(){var setNarrow=$(this).is(':checked')?1:0;admincpOp.config('narrow',setNarrow,function(){if(setNarrow){$('body').addClass('layout-boxed')}else{$('body').removeClass('layout-boxed')}})})}else{$('#chk_sidebar_mini').parents('li').eq(0).hide();$('#chk_sidebar_narrow').parents('li').eq(0).hide()}
@@ -20,8 +20,12 @@ $('body').addClass(skin)})})}};function insertAtCaret(myField,myValue){myField=$
function urlUsertoken(){return'_usertoken_='+encodeURIComponent(window.site_config.usertoken)}
function openStoreUrl(url){if(url.indexOf('clientinfo=')<0&&window.site_config.clientinfo){url+=(url.indexOf('?')>-1?'&':'?')+'clientinfo='+encodeURIComponent(window.site_config.clientinfo)}
window.open(url,'_blank')}
-function eleExchange(box,move,ele){if(!window.ele_exchange_is_touch){window.ele_exchange_is_touch=1;if('ontouchstart' in window||navigator.maxTouchPoints){window.ele_exchange_is_touch=2}}
-if(window.ele_exchange_is_touch==2){$(box).on('click',move,function(){var obj=$(this).parents(ele).eq(0);var next=obj.next(ele);if(next.length>0){next.after(obj)}})}else{$(box).sortable({items:ele,handle:move,axis:'y'})}}
+function eleExchange(box,move,ele,options){if(!isObject(options)){options={}}
+if(!window.ele_exchange_is_touch){window.ele_exchange_is_touch=1;if('ontouchstart' in window||navigator.maxTouchPoints){window.ele_exchange_is_touch=2}}
+if(window.ele_exchange_is_touch==2){$(box).on('click',move,function(){var obj=$(this).parents(ele).eq(0);var next=obj.next(ele);if(next.length>0){next.after(obj)}})}else{var curTrTds={};$(box).on('mousedown',move,function(){var obj=$(this).parents(ele).eq(0);if(obj.is('tr')){curTrTds={};obj.children('th,td').each(function(index){curTrTds[index]={width:$(this).width(),colspan:toInt($(this).attr('colspan')),hidden:$(this).is(':hidden')?true:!1}})}});var sOpts={items:ele,handle:move,axis:'y',start:function(event,ui){if(ui&&ui.item){var obj=$(ui.item[0]);if(obj.is('tr')){obj.children('th,td').each(function(index){var curTrTd=curTrTds[index];if(isObject(curTrTd)){$(this).width(curTrTd.width);if(curTrTd.colspan>0){$(this).attr('colspan',curTrTd.colspan)}
+if(curTrTd.hidden){$(this).hide()}}});$('.ui-sortable-placeholder').children('th,td').each(function(index){var curTrTd=curTrTds[index];if(isObject(curTrTd)){$(this).width(curTrTd.width);if(curTrTd.colspan>0){$(this).attr('colspan',curTrTd.colspan)}
+if(curTrTd.hidden){$(this).hide()}}})}}}};for(var i in options){sOpts[i]=options[i]}
+$(box).sortable(sOpts)}}
function showPanelCollapse(id){$(id).parent().find('a[data-toggle][href="'+id+'"]').attr('aria-expanded',!0).removeClass('collapsed');$(id).addClass('in').attr('aria-expanded',!0).attr('style','')}
function inputSelectCustom(sltObj,iptName,onOptions,customName,changeFunc){customName=customName?customName:'custom';var onChangeFunc=function(curObj,iptEle){var ipt=$(curObj).parents('.input-select-custom').eq(0).find(iptEle);if($(curObj).val()==customName){ipt.show()}else{ipt.hide()}
if(changeFunc&&typeof(changeFunc)=='function'){changeFunc()}};if(sltObj&&iptName){$(sltObj).bind('change',function(){onChangeFunc(this,'[name="'+iptName+'"]')})}else if(onOptions&&typeof(onOptions)=='object'){$(onOptions.box).on('change',onOptions.slt,function(){onChangeFunc(this,onOptions.ipt)})}}
@@ -70,8 +74,8 @@ if(!url){url=ulink('admin/backstage/backstageTask?op=collected&tid='+taskId)}
ajaxOpen({type:'get',dataType:'html',async:!0,url:url,success:function(data){$('#win_bk_collected_'+taskId).html(data)},complete:function(){if(!isNull(taskType)&&0==toInt(taskType)){winBackstageTask.collected_set_timeout=window.setTimeout(function(){var isEnd=$('#win_bk_tasks_box_0').find('a[href="#win_bk_collected_'+taskId+'"]').attr('data-is-end');var isVisible=$('#win_bk_tasks_box_0 #win_bk_collected_'+taskId).is(':visible');if(!isEnd&&isVisible){winBackstageTask.collected(taskId,taskType,url)}else{window.clearTimeout(winBackstageTask.collected_set_timeout)}},3000)}}})},init_collected:function(taskStatus,taskId){$('[id^="win_bk_collected_"] .pagination').addClass('pagination-sm');$('[id^="win_bk_collected_"] .pagination a').bind('click',function(){var curTaskId=$(this).parents('[id^="win_bk_collected_"]').eq(0).attr('data-task-id');var curTaskType=$(this).parents('[id^="win_bk_tasks_nav_"]').eq(0).attr('data-task-type');winBackstageTask.collected(curTaskId,curTaskType,$(this).attr('href'));return!1});if(taskStatus&&taskId){winBackstageTask.set_task_end(taskId,taskStatus);winBackstageTask.count();winBackstageTask.status()}},set_task_end:function(taskId,status){if(taskId&&status){$('#win_bk_tasks_box_0').find('a[href="#win_bk_collected_'+taskId+'"]').attr('data-is-end','1').find('.is_loading').html(''+status+'')}},status_set_timeout:null,status:function(isLoop){if(!isLoop){window.clearTimeout(winBackstageTask.status_set_timeout)}
var taskIds=[];$('#win_bk_tasks_box_0').find('[id^="win_bk_collected_"]').each(function(){var taskId=$(this).attr('data-task-id');taskIds.push(taskId)});if(taskIds.length>0){ajaxOpen({type:'post',dataType:'json',async:!0,data:{tids:taskIds},url:ulink('admin/backstage/backstageTask?op=status'),success:function(data){var statusList=data.data;if(isObject(statusList)){for(var tid in statusList){if(statusList[tid]){winBackstageTask.set_task_end(tid,statusList[tid])}}}
var isVisible=$('#win_bk_tasks_box_0').is(':visible');var isEnd=!0;$('#win_bk_tasks_box_0').find('a[href^="#win_bk_collected_"]').each(function(){if(!$(this).attr('data-is-end')){isEnd=!1;return!1}});if(!isEnd&&isVisible){winBackstageTask.status_set_timeout=window.setTimeout(function(){winBackstageTask.status(!0)},3000)}else{window.clearTimeout(winBackstageTask.status_set_timeout)}}})}}};function ajax_check_userpwd(ajaxSet){var oldSuccess=ajaxSet.success;ajaxSet.success=function(data){if(data.data&&data.data._check_pwd_){if(data.msg){toastr.error(data.msg)}
-var msg='
';confirmRight({closeAfterFunc:!0,yes:'确定',no:'取消',msg:msg},function(){var ajaxSetData=isNull(ajaxSet.data)?{}:ajaxSet.data;var checkPwd=$('#confirm_ipt_check_pwd').val();var checkSkip=$('#confirm_ipt_check_skip').is(':checked')?1:'';if(typeof(ajaxSetData)=='object'){ajaxSetData._check_pwd_=checkPwd;ajaxSetData._check_skip_=checkSkip}else{ajaxSetData=ajaxSetData?(ajaxSetData+'&'):'';ajaxSetData+='_check_pwd_='+encodeURIComponent(checkPwd);ajaxSetData+='&_check_skip_='+encodeURIComponent(checkSkip)}
-ajaxSet.data=ajaxSetData;ajaxSet.success=oldSuccess;ajax_check_userpwd(ajaxSet)});$('body').on('keyup','#confirm_ipt_check_pwd',function(event){if(event.keyCode=="13"){$('#confirm_right .cr-btn-yes').trigger("click")}})}else{if(oldSuccess&&typeof(oldSuccess)=='function'){oldSuccess(data)}}};ajaxOpen(ajaxSet)}
+var msg='';confirmRight({closeAfterFunc:!0,yes:'确定',no:'取消',msg:msg},function(){var ajaxSetData=isNull(ajaxSet.data)?{}:ajaxSet.data;var checkPwd=$('#confirm_ipt_check_pwd').val();var checkSkip=$('#confirm_ipt_check_skip').is(':checked')?1:'';if(typeof(ajaxSetData)=='object'){ajaxSetData._check_pwd_=checkPwd;ajaxSetData._check_skip_=checkSkip}else{ajaxSetData=ajaxSetData?(ajaxSetData+'&'):'';ajaxSetData+='_check_pwd_='+encodeURIComponent(checkPwd);ajaxSetData+='&_check_skip_='+encodeURIComponent(checkSkip)}
+ajaxSet.data=ajaxSetData;ajaxSet.success=oldSuccess;ajax_check_userpwd(ajaxSet)});$('#confirm_ipt_check_skip').bind('click',function(){admincpOp.config('check_skip',$(this).is(':checked')?1:0)});$('body').on('keyup','#confirm_ipt_check_pwd',function(event){if(event.keyCode=="13"){$('#confirm_right .cr-btn-yes').trigger("click")}})}else{if(oldSuccess&&typeof(oldSuccess)=='function'){oldSuccess(data)}}};ajaxOpen(ajaxSet)}
function editorCodeIfr(ifrEle,options){options=isObject(options)?options:{};if(options.set_value!=null&&typeof(options.set_value)!='undefined'){$(document).ready(function(){$(ifrEle).attr('src','');$(ifrEle).attr('src',ulink('develop/editor_code'));$(ifrEle).off('load').bind('load',function(){if(options.set_value&&$(ifrEle)[0].contentWindow.editor_code_op){$(ifrEle)[0].contentWindow.editor_code_op.set(options.set_value)}})})}else if(options.get_value){var ifrEle=$(ifrEle)[0];var val='';if(ifrEle&&ifrEle.contentWindow.editor_code_op){val=ifrEle.contentWindow.editor_code_op.get()}
return val}}
var ruleInsertSign={match:function(toObj,options){if(!options){options={}}
diff --git a/public/static/js/admin/collector.js b/public/static/js/admin/collector.js
index efb0362..3e5aa76 100644
--- a/public/static/js/admin/collector.js
+++ b/public/static/js/admin/collector.js
@@ -8,7 +8,7 @@
|--------------------------------------------------------------------------
*/
'use strict';function CollectorPattern(){this.formid='#form_coll';this.cpFrontUrl=null;this.cpLevelUrl=null;this.cpRelationUrl=null;this.cpUrlWeb=null;this.cpRenderer=null;this.cpContentSign=null;this.cpPagination=null;this.cpField=null;this.cpProcess=null}
-CollectorPattern.prototype={constructor:CollectorPattern,init:function(){var $_o=this;$($_o.formid).bind('submit',function(){$('#coll_tab_content').find('.tab-pane[id^="coll_pattern_"]').each(function(){if($(this).hasClass('active')){$($_o.formid+' [name="tab_link"]').val($(this).attr('id'));return}});var settings=getFormAjaxSettings($(this));settings.data={'_post_data_':settings.data};ajaxOpen(settings);return!1});$_o.cpFrontUrl=new CpFrontUrl($_o);$_o.cpLevelUrl=new CpLevelUrl($_o);$_o.cpRelationUrl=new CpRelationUrl($_o);$_o.cpUrlWeb=new CpUrlWeb($_o);$_o.cpRenderer=new CpRenderer($_o);$_o.cpContentSign=new CpContentSign($_o);$_o.cpPagination=new CpPagination($_o);$_o.cpField=new CpField($_o);$_o.cpProcess=new CpProcess($_o);inputSelectCustom($_o.formid+' select[name="config[charset]"]','config[charset_custom]',null,null,function(){$_o.cpUrlWeb.def_config_charset('')});inputSelectCustom($_o.formid+' select[name="config[encode]"]','config[encode_custom]',null,null,function(){$_o.cpUrlWeb.def_config_encode('')});$($_o.formid+' [name="config[page_render]"]').bind('click',function(){$_o.cpRenderer.def_config_renderer_open('')});$($_o.formid+' [name="config[request_headers][open]"]').bind('click',function(){$_o.cpUrlWeb.def_config_header_global('')});$($_o.formid+' #coll_pattern_request_headers .dm-useragent li a').bind('click',function(){$($_o.formid+' [name="config[request_headers][useragent]"]').val($(this).attr('data-useragent'))});$($_o.formid+' #coll_pattern_request_headers .add-request-header').bind('click',function(){$_o.add_request_header('','')});$($_o.formid+' #coll_pattern_request_headers .add-request-header-img').bind('click',function(){$_o.add_request_header_img('','')});$($_o.formid+' #coll_pattern_request_headers .add-request-header-file').bind('click',function(){$_o.add_request_header_file('','')});$($_o.formid+' .c-p-request-headers').on('click','.delete-request-header',function(){$(this).parents('tr').eq(0).remove()});$($_o.formid+' .c-p-request-headers-img').on('click','.delete-request-header-img',function(){$(this).parents('tr').eq(0).remove()});$($_o.formid+' .c-p-request-headers-file').on('click','.delete-request-header-file',function(){$(this).parents('tr').eq(0).remove()});$_o.init_page_list_op('front_url');$(this.formid+' #coll_pattern_source_url .add-source-url').bind('click',function(){windowModal('添加起始网址',ulink("cpattern/source"),{lg:1})});$(this.formid+' #coll_pattern_source_url .clear-source-url').bind('click',function(){$_o.source_op('clear_all')});$(this.formid+' #coll_pattern_source_url').on('click','.edit-source-url',function(){var parent=$(this).parents('[id^="source_url_"]').eq(0);var objid=parent.attr('id');var sourceUrl=parent.find('[name="config[source_url][]"]').val();sourceUrl=sourceUrl?sourceUrl:'';var url=ulink("cpattern/source");var options={lg:1};if(objid||sourceUrl){options.ajax={type:'post',data:{'source_url':sourceUrl,'objid':objid}}}
+CollectorPattern.prototype={constructor:CollectorPattern,init:function(){var $_o=this;$($_o.formid).bind('submit',function(){$('#coll_tab_content').find('.tab-pane[id^="coll_pattern_"]').each(function(){if($(this).hasClass('active')){$($_o.formid+' [name="tab_link"]').val($(this).attr('id'));return}});var settings=getFormAjaxSettings($(this));settings.data={'_post_data_':settings.data};ajaxOpen(settings);return!1});$_o.cpFrontUrl=new CpFrontUrl($_o);$_o.cpLevelUrl=new CpLevelUrl($_o);$_o.cpRelationUrl=new CpRelationUrl($_o);$_o.cpUrlWeb=new CpUrlWeb($_o);$_o.cpRenderer=new CpRenderer($_o);$_o.cpContentSign=new CpContentSign($_o);$_o.cpPagination=new CpPagination($_o);$_o.cpField=new CpField($_o);$_o.cpProcess=new CpProcess($_o);inputSelectCustom($_o.formid+' select[name="config[charset]"]','config[charset_custom]',null,null,function(){$_o.cpUrlWeb.def_config_charset('')});inputSelectCustom($_o.formid+' select[name="config[encode]"]','config[encode_custom]',null,null,function(){$_o.cpUrlWeb.def_config_encode('')});$($_o.formid+' [name="config[page_render]"]').bind('click',function(){$_o.cpRenderer.def_config_renderer_open('')});$($_o.formid+' [name="config[request_headers][open]"]').bind('click',function(){$_o.cpUrlWeb.def_config_header_global('')});$($_o.formid+' #coll_pattern_request_headers .dm-useragent li a').bind('click',function(){$($_o.formid+' [name="config[request_headers][useragent]"]').val($(this).attr('data-useragent'))});$($_o.formid+' #coll_pattern_request_headers .add-request-header').bind('click',function(){$_o.add_request_header('','')});$($_o.formid+' #coll_pattern_request_headers .add-request-header-img').bind('click',function(){$_o.add_request_header_img('','')});$($_o.formid+' #coll_pattern_request_headers .add-request-header-file').bind('click',function(){$_o.add_request_header_file('','')});$($_o.formid+' .c-p-request-headers').on('click','.delete-request-header',function(){var curObj=$(this);confirmRight('确定删除?',function(){curObj.parents('tr').eq(0).remove()})});$($_o.formid+' .c-p-request-headers-img').on('click','.delete-request-header-img',function(){var curObj=$(this);confirmRight('确定删除?',function(){curObj.parents('tr').eq(0).remove()})});$($_o.formid+' .c-p-request-headers-file').on('click','.delete-request-header-file',function(){var curObj=$(this);confirmRight('确定删除?',function(){curObj.parents('tr').eq(0).remove()})});$_o.init_page_list_op('front_url');$(this.formid+' #coll_pattern_source_url .add-source-url').bind('click',function(){windowModal('添加起始网址',ulink("cpattern/source"),{lg:1})});$(this.formid+' #coll_pattern_source_url .clear-source-url').bind('click',function(){$_o.source_op('clear_all')});$(this.formid+' #coll_pattern_source_url').on('click','.edit-source-url',function(){var parent=$(this).parents('[id^="source_url_"]').eq(0);var objid=parent.attr('id');var sourceUrl=parent.find('[name="config[source_url][]"]').val();sourceUrl=sourceUrl?sourceUrl:'';var url=ulink("cpattern/source");var options={lg:1};if(objid||sourceUrl){options.ajax={type:'post',data:{'source_url':sourceUrl,'objid':objid}}}
windowModal('添加起始网址',url,options)});$(this.formid+' #coll_pattern_source_url').on('click','.delete-source-url',function(){var obj=$(this);confirmRight(window.tpl_lang.confirm_delete,function(){obj.parents('[id^="source_url_"]').eq(0).remove()})});eleExchange(this.formid+' #coll_pattern_source_url','.icon-drag-move','[id^="source_url_"]');$(this.formid+' [name="config[source_is_url]"]').bind('click',function(){if($_o.source_is_url()){$('#coll_pattern_source_url').css('margin-bottom','0px');$('#alert_coll_pattern_link').show();$('#panel_coll_pattern_source_url_web').hide();$('#panel_coll_pattern_source_url_renderer').hide();$('#panel_coll_pattern_source_url_content_sign').hide();$('#panel_coll_pattern_source_url_pagination').hide();$('#panel_coll_pattern_level_url').hide();$('#panel_coll_pattern_url_content_sign').siblings('.panel').hide();$('#panel_coll_pattern_url_web').show();$('#panel_coll_pattern_url_renderer').show()}else{$('#coll_pattern_source_url').css('margin-bottom','15px');$('#alert_coll_pattern_link').hide();$('#panel_coll_pattern_source_url_web').show();$('#panel_coll_pattern_source_url_renderer').show();$('#panel_coll_pattern_source_url_content_sign').show();$('#panel_coll_pattern_source_url_pagination').show();$('#panel_coll_pattern_level_url').show();$('#panel_coll_pattern_url_content_sign').siblings('.panel').show()}});$_o.init_page('source_url');$_o.init_page('url');$($_o.formid).on('click','.c-p-url-page-signs .btn-page-signs',function(){$_o.parent_page_signs(this)});$_o.init_page_list_op('level_url');$_o.init_page_list_op('relation_url');$(this.formid+' #coll_pattern_field').on('click','.add-field',function(){$_o.field_editor(null,null)});$(this.formid+' #coll_pattern_field').on('click','.field-name',function(){$_o.field_editor($(this),null)});$(this.formid+' #coll_pattern_field').on('click','.add-field-default',function(){$_o.cpField.add_default()});$(this.formid+' #coll_pattern_field').on('click','.sort-field',function(){var fieldNames=$_o.get_field_names(!0);for(var i in fieldNames){var fieldTr=$($_o.formid+' #coll_pattern_field').find('.field-name[data-val="'+fieldNames[i]+'"]').parents('tr[id^="field_"]').eq(0);if(fieldTr.length>0){$($_o.formid+' #coll_pattern_field .c-p-field-list tbody').append(fieldTr)}}
toastr.success('调整完成')});$(this.formid+' #coll_pattern_field').on('click','.field-del',function(){var obj=$(this);confirmRight(window.tpl_lang.confirm_delete,function(){$_o.field_delete_tr(obj)})});$(this.formid+' #coll_pattern_field').on('click','.field-clone',function(){var tr=$(this).parents('tr[id^="field_"]').eq(0);var field=tr.find('[name="config[field_list][]"]').val();var process=tr.find('[name="config[field_process][]"]').val();confirmRight('确定复制字段?',function(){ajaxOpen({type:'POST',dataType:'json',url:ulink("cpattern/clone_field"),data:{field:field,process:process},success:function(data){if(data.code==1){data=data.data;var hasField=!1;do{data.field.name+='_1';hasField=$('#coll_pattern_field .c-p-field-list').find('.field-name[data-val="'+data.field.name+'"]');if(hasField&&hasField.length>0){hasField=!0}else{hasField=!1}}while(hasField);$_o.cpField.add(null,data.field,data.process);toastr.success('字段复制成功:'+data.field.name)}else{toastr.error(data.msg)}}})})});$(this.formid+' #coll_pattern_field').on('click','.field-process',function(){var process=$(this).parent().find('input[name="config[field_process][]"]').val();var prt=$(this).parents('tr[id^="field_"]').eq(0);var objid=prt.attr('id');var field=prt.find('.field-name').attr('data-val');var url=ulink("cpattern/process?task_id=_tid_&field=_field_",{'_tid_':$_o.get_task_id(),'_field_':field});windowModal('数据处理:'+field+'',url,{lg:1,ajax:{type:'post',data:{objid:objid,process:process}}});$_o.process_paste()});$(this.formid+' #coll_pattern_process').on('click','.add-process',function(){var url=ulink("cpattern/process?task_id=_tid_&type=common",{'_tid_':$_o.get_task_id()});windowModal('数据处理(通用)',url,{lg:1});$_o.process_paste()});eleExchange(this.formid+' #coll_pattern_field','.icon-drag-move','tr[id^="field_"]');$(this.formid+' [name="effective"]').val(1)},init_test:function(){var $_o=this;$_o.formid='#win_form_cache';$_o.cpUrlWeb=new CpUrlWeb($_o);$_o.cpRenderer=new CpRenderer($_o);$_o.cpUrlWeb.page_init('test');$_o.cpRenderer.page_init('test')},init_echo_url_msg:function(dataUrlWeb,dataRenderer){this.init_test();if(!isObject(dataUrlWeb)){dataUrlWeb={}}
if(!isObject(dataRenderer)){dataRenderer={}}
@@ -123,7 +123,7 @@ ajaxOpen({type:'POST',dataType:'json',url:$($_o.formObj).attr('action'),data:$($
function CpUrlWeb(cpClass){this.$_cp=cpClass}
CpUrlWeb.prototype={constructor:CpUrlWeb,page_init:function(pageType,isPagination){var $_o=this;var pageVars=$_o.$_cp.get_page_vars(pageType,null,isPagination);var boxId=pageVars.boxId;var namePre=pageVars.namePre;if(!boxId||!namePre){return}
var boxUrlWebId=boxId+'_web';$(boxUrlWebId+' [name="'+namePre+'[url_web][open]"]').bind('click',function(){if($(this).val()==1){$(boxUrlWebId+'_open').show()}else{$(boxUrlWebId+'_open').hide()}
-$_o.def_config_use_url_web(pageType)});inputSelectCustom(boxUrlWebId+' select[name="'+namePre+'[url_web][charset]"]',namePre+'[url_web][charset_custom]');inputSelectCustom(boxUrlWebId+' select[name="'+namePre+'[url_web][encode]"]',namePre+'[url_web][encode_custom]');$_o.def_config_charset(pageType);$_o.def_config_encode(pageType);$(boxUrlWebId+' select[name="'+namePre+'[url_web][form_method]"]').bind('change',function(){var obj=$(boxUrlWebId+' .c-p-url-web-content-type');if($(this).val()=='post'){obj.show()}else{obj.hide()}});$_o.def_config_header_global(pageType);$(boxUrlWebId+' .add-url-web-form').bind('click',function(){$_o.add_page_url_web(pageType,isPagination,'form','','')});$(boxUrlWebId+' .c-p-url-web-form').on('click','.delete-url-web-form',function(){$(this).parents('tr').eq(0).remove()});$(boxUrlWebId+' .add-url-web-header').bind('click',function(){$_o.add_page_url_web(pageType,isPagination,'header','','')});$(boxUrlWebId+' .c-p-url-web-header').on('click','.delete-url-web-header',function(){$(this).parents('tr').eq(0).remove()})},page_load:function(pageType,urlWebConfig,isPagination){var $_o=this;var pageVars=$_o.$_cp.get_page_vars(pageType,null,isPagination);var formId=pageVars.formId;var boxId=pageVars.boxId;var namePre=pageVars.namePre;if(!formId||!boxId||!namePre){return}
+$_o.def_config_use_url_web(pageType)});inputSelectCustom(boxUrlWebId+' select[name="'+namePre+'[url_web][charset]"]',namePre+'[url_web][charset_custom]');inputSelectCustom(boxUrlWebId+' select[name="'+namePre+'[url_web][encode]"]',namePre+'[url_web][encode_custom]');$_o.def_config_charset(pageType);$_o.def_config_encode(pageType);$(boxUrlWebId+' select[name="'+namePre+'[url_web][form_method]"]').bind('change',function(){var obj=$(boxUrlWebId+' .c-p-url-web-content-type');if($(this).val()=='post'){obj.show()}else{obj.hide()}});$_o.def_config_header_global(pageType);$(boxUrlWebId+' .add-url-web-form').bind('click',function(){$_o.add_page_url_web(pageType,isPagination,'form','','')});$(boxUrlWebId+' .c-p-url-web-form').on('click','.delete-url-web-form',function(){var curObj=$(this);confirmRight('确定删除?',function(){curObj.parents('tr').eq(0).remove()})});$(boxUrlWebId+' .add-url-web-header').bind('click',function(){$_o.add_page_url_web(pageType,isPagination,'header','','')});$(boxUrlWebId+' .c-p-url-web-header').on('click','.delete-url-web-header',function(){var curObj=$(this);confirmRight('确定删除?',function(){curObj.parents('tr').eq(0).remove()})})},page_load:function(pageType,urlWebConfig,isPagination){var $_o=this;var pageVars=$_o.$_cp.get_page_vars(pageType,null,isPagination);var formId=pageVars.formId;var boxId=pageVars.boxId;var namePre=pageVars.namePre;if(!formId||!boxId||!namePre){return}
if(!isObject(urlWebConfig)){urlWebConfig={}}
var urlWebNamePre=namePre+'[url_web]';urlWebConfig.open=toInt(urlWebConfig.open);$(formId+' [name="'+urlWebNamePre+'[open]"][value="'+urlWebConfig.open+'"]').trigger('click');if(urlWebConfig.open>0){showPanelCollapse(boxId+'_web')}
if(urlWebConfig.charset){$(formId+' select[name="'+urlWebNamePre+'[charset]"]').val(urlWebConfig.charset).trigger('change')}
@@ -149,7 +149,7 @@ CpRenderer.prototype={constructor:CpRenderer,page_init:function(pageType,isPagin
$_o.def_config_renderer_open(pageType);var rdBoxId=boxId+'_renderer';$(rdBoxId+' .add-url-renderer').bind('click',function(){$_o.add(pageType,isPagination)});$(rdBoxId+' [name="'+namePre+'[renderer][open]"]').bind('click',function(){$_o.def_config_use_renderer(pageType)});if(isPagination){$(rdBoxId+' [name="'+namePre+'[renderer][open_pn]"]').bind('click',function(){if($(this).val()==1){$(rdBoxId+'_open_pn').show()}else{$(rdBoxId+'_open_pn').hide()}})}
$(rdBoxId+' .c-p-url-renderer-list').on('change','select[name="'+namePre+'[renderer][types][]"]',function(){var type=$(this).val();var tr=$(this).parents('tr').eq(0);var types={'wait_time':{content:1,content_tips:'输入数字'},'scroll_top':{content:1,content_tips:'输入数字'},'click':{element:1},'val':{element:1,content:1,content_tips:'输入值'}};var tdTypeCols=3;tr.find('.td-renderer-element,.td-renderer-content').hide();tr.find('input[name="'+namePre+'[renderer][contents][]"]').attr('placeholder','');var curType=types[type];if(isObject(curType)){if(curType.element){tr.find('.td-renderer-element').show();tdTypeCols-=1}
if(curType.content){tr.find('.td-renderer-content').show();tdTypeCols-=1;if(curType.content_tips){tr.find('input[name="'+namePre+'[renderer][contents][]"]').attr('placeholder',curType.content_tips)}}}
-tr.find('.td-renderer-type').attr('colspan',tdTypeCols)});$(rdBoxId+' .c-p-url-renderer-list').on('click','.delete-url-renderer',function(){$(this).parents('tr').eq(0).remove()});eleExchange(rdBoxId+' .c-p-url-renderer-list','.icon-drag-move','tr')},page_load:function(pageType,rdConfig,isPagination){var $_o=this;var pageVars=$_o.$_cp.get_page_vars(pageType,null,isPagination);var boxId=pageVars.boxId;var namePre=pageVars.namePre;if(!boxId||!namePre){return}
+tr.find('.td-renderer-type').attr('colspan',tdTypeCols)});$(rdBoxId+' .c-p-url-renderer-list').on('click','.delete-url-renderer',function(){var curObj=$(this);confirmRight('确定删除?',function(){curObj.parents('tr').eq(0).remove()})});eleExchange(rdBoxId+' .c-p-url-renderer-list','.icon-drag-move','tr')},page_load:function(pageType,rdConfig,isPagination){var $_o=this;var pageVars=$_o.$_cp.get_page_vars(pageType,null,isPagination);var boxId=pageVars.boxId;var namePre=pageVars.namePre;if(!boxId||!namePre){return}
var rdBoxId=boxId+'_renderer';if(isObject(rdConfig)){$(rdBoxId).find('[name="'+namePre+'[renderer][open]"][value="'+rdConfig.open+'"]').prop('checked',!0).trigger('click');var rdTypes=isObject(rdConfig.types)?rdConfig.types:[];var rdElements=isObject(rdConfig.elements)?rdConfig.elements:[];var rdContents=isObject(rdConfig.contents)?rdConfig.contents:[];var showPanel=!1;var openVal=rdConfig.open=='y'?true:!1;var openDef=$($_o.$_cp.formid+' [name="config[page_render]"]:checked').val();openDef=toInt(openDef);openDef=openDef>0?true:!1;if(rdTypes&&rdTypes.length>0){for(var i in rdTypes){$_o.add(pageType,isPagination,rdTypes[i],rdElements[i],rdContents[i])}
if((!rdConfig.open&&openDef)||openVal){showPanel=!0}}else{if(rdConfig.open){if(openVal!=openDef){showPanel=!0}}}
if(isPagination){$(rdBoxId+' [name="'+namePre+'[renderer][open_pn]"][value="'+rdConfig.open_pn+'"]').prop('checked',!0).trigger('click');if(rdConfig.open_pn){showPanel=!0}else{showPanel=!1}}
@@ -186,12 +186,13 @@ $($_o.formObj+' #c_p_field_time_format_list').on('click','a[data-val]',function(
if(!fieldData.hasOwnProperty('source')){$($_o.formObj+' [name="field[source]"]').trigger("change")}
$($_o.formObj+' [name="field[num_start]"]').val(toInt(fieldData.num_start));$($_o.formObj+' [name="field[num_end]"]').val(toInt(fieldData.num_end));$($_o.formObj+' [name="field[auto]"][value="'+fieldData.auto+'"]').prop('checked',!0);if(fieldData.time_stamp){$($_o.formObj+' [name="field[time_stamp]"]').prop('checked',!0)}
cpRuleModuleLoad($_o.formObj,'field','',fieldData);cpRuleModuleLoad($_o.formObj,'field','extract_',fieldData)}},add:function(objid,fieldData,processData){var $_o=this;var fieldSource='内容页';if(fieldData.source){var fsource=fieldData.source.split(':');fieldSource=$_o.$_cp.get_page_vars(fsource[0],'title');if(fsource[1]){fieldSource+=':'+fsource[1]}}
-var isLoop='';if(fieldData.module=='rule'){if(fieldData.rule_multi&&fieldData.rule_multi_type=='loop'){isLoop=' - 循环入库'}}else if(fieldData.module=='xpath'){if(fieldData.xpath_multi&&fieldData.xpath_multi_type=='loop'){isLoop=' - 循环入库'}}else if(fieldData.module=='json'){if(fieldData.json_loop){isLoop=' - 循环入库'}}else if(fieldData.module=='extract'||fieldData.module=='merge'){$($_o.$_cp.formid+' #coll_pattern_field').find('.sort-field').show()}
-if(isLoop){$('#c_p_field_loop_tips').show()}
-if(objid){var eleObj=$($_o.$_cp.formid+' #'+objid);eleObj.find('.field-name').attr('data-val',fieldData.name).text(fieldData.name);eleObj.find('.field-source').attr('data-val',fieldData.source).text(fieldSource);eleObj.find('.field-module').attr('data-val',fieldData.module).text(window.tpl_lang['field_module_'+fieldData.module]+isLoop);if(isLoop){eleObj.find('.field-module').attr('data-is-loop',1)}else{eleObj.find('.field-module').removeAttr('data-is-loop')}
+var fieldModule=window.tpl_lang['field_module_'+fieldData.module];var isLoop=!1;if(fieldData.module=='rule'){if(fieldData.rule_multi&&fieldData.rule_multi_type=='loop'){isLoop=!0}}else if(fieldData.module=='xpath'){if(fieldData.xpath_multi&&fieldData.xpath_multi_type=='loop'){isLoop=!0}}else if(fieldData.module=='json'){if(fieldData.json_loop){isLoop=!0}}else if(fieldData.module=='extract'||fieldData.module=='merge'){$($_o.$_cp.formid+' #coll_pattern_field').find('.sort-field').show();if(fieldData.module=='extract'){if(fieldData.extract_module=='rule'){if(fieldData.extract_rule_multi&&fieldData.extract_rule_multi_type=='loop'){isLoop=!0}}else if(fieldData.extract_module=='xpath'){if(fieldData.extract_xpath_multi&&fieldData.extract_xpath_multi_type=='loop'){isLoop=!0}}else if(fieldData.extract_module=='json'){if(fieldData.extract_json_loop){isLoop=!0}}
+fieldModule+=' » '+(fieldData.extract?fieldData.extract:'')}}
+if(isLoop){$('#c_p_field_loop_tips').show();fieldModule+='(循环入库)'}
+if(objid){var eleObj=$($_o.$_cp.formid+' #'+objid);eleObj.find('.field-name').attr('data-val',fieldData.name).text(fieldData.name);eleObj.find('.field-source').attr('data-val',fieldData.source).text(fieldSource);eleObj.find('.field-module').attr('data-val',fieldData.module).text(fieldModule);if(isLoop){eleObj.find('.field-module').attr('data-is-loop',1)}else{eleObj.find('.field-module').removeAttr('data-is-loop')}
eleObj.find('input[name="config[field_list][]"]').val(encode_json2urlbase(fieldData))}else{var ptitle='';if(processData){ptitle=[];for(var i in processData){ptitle.push(window.tpl_lang['process_module_'+processData[i].module]+(processData[i].title?(':'+processData[i].title):''))}
ptitle=ptitle.join(' / ')}
-var html=$_o.$_cp.clone_tpl('#coll_tpl_field');html.attr('id','field_'+generateUUID());html.find('.field-name').attr('data-val',fieldData.name).text(fieldData.name);html.find('.field-source').attr('data-val',fieldData.source).text(fieldSource);html.find('.field-module').attr('data-val',fieldData.module).text(window.tpl_lang['field_module_'+fieldData.module]+isLoop);if(isLoop){html.find('.field-module').attr('data-is-loop',1)}else{html.find('.field-module').removeAttr('data-is-loop')}
+var html=$_o.$_cp.clone_tpl('#coll_tpl_field');html.attr('id','field_'+generateUUID());html.find('.field-name').attr('data-val',fieldData.name).text(fieldData.name);html.find('.field-source').attr('data-val',fieldData.source).text(fieldSource);html.find('.field-module').attr('data-val',fieldData.module).text(fieldModule);if(isLoop){html.find('.field-module').attr('data-is-loop',1)}else{html.find('.field-module').removeAttr('data-is-loop')}
html.find('[name="config[field_list][]"]').val(encode_json2urlbase(fieldData));html.find('[name="config[field_process][]"]').val(processData?encode_json2urlbase(processData):'');if(processData&&ptitle){html.find('.field-process').addClass('exist-process')}
html.find('.field-process').attr('title',ptitle);html.find('[name="config[field_title]"]').val(fieldData.name);html.find('[name="config[field_content][]"]').val(fieldData.name);$($_o.$_cp.formid+' #coll_pattern_field .c-p-field-list tbody').append(html)}},add_sub:function(){var $_o=this;var objid=$($_o.formObj+' input[name="objid"]').val();var checkName=!0;if(objid){var fname=$($_o.$_cp.formid+' #'+objid).find('.field-name').attr('data-val');if(fname==$($_o.formObj+' input[name="field[name]"]').val()){checkName=!1}}
if(checkName){var hasName=!1;var fieldNames=$_o.$_cp.get_field_names();for(var i in fieldNames){if($($_o.formObj+' input[name="field[name]"]').val()==fieldNames[i]){hasName=!0;break}}
@@ -202,7 +203,7 @@ function CpProcess(cpClass){this.$_cp=cpClass;this.processForm='';this.processBo
CpProcess.prototype={constructor:CpProcess,init:function(processData,isCommon,isCommonLoad){var $_o=this;$_o.processForm=isCommon?$_o.processFormCommon:$_o.processFormField;if(isCommon&&isCommonLoad){$_o.processBox=$_o.processBoxCommon}else{$_o.processBox=$_o.processBoxField}
if($($_o.processForm).is('form')){$($_o.processForm).bind('submit',function(){$_o.add_sub();return!1})}
$($_o.processBox+' .process-add').bind('click',function(){var module=$($_o.processBox+' select[name="process[module]"]').val();$_o.add({'add_new':1,'module':module})});if($($_o.processForm).prop('inited')==1){return!0}
-$($_o.processForm).on('click','.p-m-html-tags a[data-val]',function(){var tag=$(this).attr('data-val');var moduleHtml=$(this).parents('.p-m-html-tags').eq(0).attr('module-html');var tagsObj=$(this).parents('section').eq(0).find('input[data-process="html:'+moduleHtml+'"]');var tags=tagsObj.val()+','+tag;tags=tags.replace(/(^,+)|(,+$)/,'');tagsObj.val(tags)});$($_o.processForm).on('change','[data-process="insert:insert_loc"]',function(){var helpEle=$(this).siblings('.help-block');if($(this).val()=='rand'){helpEle.show()}else{helpEle.hide()}});inputSelectCustom(null,null,{box:$_o.processForm,slt:'[data-process="translate:translate_from"]',ipt:'[data-process="translate:translate_from_custom"]'});inputSelectCustom(null,null,{box:$_o.processForm,slt:'[data-process="translate:translate_to"]',ipt:'[data-process="translate:translate_to_custom"]'});$_o.txt_insert_field($_o.processForm,'.p-m-func-field',function(sltObj){return $(sltObj).parents('section').eq(0).find('[data-process="func:func_param"]')});$($_o.processForm).on('click','.p-m-if-add',function(){var ifTable=$(this).parents('section').eq(0).find('.p-m-if-table');ifTable.append(''+ifTable.attr('data-tpl')+'
')});$($_o.processForm).on('click','.p-m-if-del',function(){var tr=$(this).parents('tr').eq(0);confirmRight('确定删除?',function(){tr.remove()})});$($_o.processForm).on('change','[data-process="if:if_cond:"]',function(){var ifCond=$(this).val();var ifTr=$(this).parents('tr').eq(0);var ifTd=ifTr.find('.p-m-if-val').eq(0);var ifVal=ifTd.find('[data-process="if:if_val:"]').eq(0);var ifValInfo={name:ifVal.attr('name'),val:ifVal.val(),process:ifVal.attr('data-process')};var ifValType='def';if(ifCond=='func'){ifValType='func'}else if(ifCond.indexOf('time_')>-1){ifValType='time'}
+$($_o.processForm).on('click','.p-m-html-tags a[data-val]',function(){var tag=$(this).attr('data-val');var moduleHtml=$(this).parents('.p-m-html-tags').eq(0).attr('module-html');var tagsObj=$(this).parents('section').eq(0).find('input[data-process="html:'+moduleHtml+'"]');var tags=tagsObj.val()+','+tag;tags=tags.replace(/(^,+)|(,+$)/,'');tagsObj.val(tags)});$($_o.processForm).on('change','[data-process="insert:insert_loc"]',function(){var helpEle=$(this).siblings('.help-block');if($(this).val()=='rand'){helpEle.show()}else{helpEle.hide()}});$_o.txt_insert_field($_o.processForm,'.p-m-insert-field',function(sltObj){return $(sltObj).parents('section').eq(0).find('[data-process="insert:insert_txt"]')});inputSelectCustom(null,null,{box:$_o.processForm,slt:'[data-process="translate:translate_from"]',ipt:'[data-process="translate:translate_from_custom"]'});inputSelectCustom(null,null,{box:$_o.processForm,slt:'[data-process="translate:translate_to"]',ipt:'[data-process="translate:translate_to_custom"]'});$_o.txt_insert_field($_o.processForm,'.p-m-func-field',function(sltObj){return $(sltObj).parents('section').eq(0).find('[data-process="func:func_param"]')});$($_o.processForm).on('click','.p-m-if-add',function(){var ifTable=$(this).parents('section').eq(0).find('.p-m-if-table');ifTable.append(''+ifTable.attr('data-tpl')+'
')});$($_o.processForm).on('click','.p-m-if-del',function(){var tr=$(this).parents('tr').eq(0);confirmRight('确定删除?',function(){tr.remove()})});$($_o.processForm).on('change','[data-process="if:if_cond:"]',function(){var ifCond=$(this).val();var ifTr=$(this).parents('tr').eq(0);var ifTd=ifTr.find('.p-m-if-val').eq(0);var ifVal=ifTd.find('[data-process="if:if_val:"]').eq(0);var ifValInfo={name:ifVal.attr('name'),val:ifVal.val(),process:ifVal.attr('data-process')};var ifValType='def';if(ifCond=='func'){ifValType='func'}else if(ifCond.indexOf('time_')>-1){ifValType='time'}
ifTd.find('.p-m-if-val-def,.p-m-if-val-time,.p-m-if-val-func').hide();ifTd.find('[data-process="if:if_val:"]').removeAttr('name').removeAttr('data-process');var ifValBox=ifTd.find('.p-m-if-val-'+ifValType);var ifValEle=ifValBox.find('.p-m-if-val-ele');ifValEle.attr('name',ifValInfo.name).attr('data-process',ifValInfo.process).val(ifValInfo.val);ifValBox.show();if(ifValType=='func'){$_o.load_if_func(ifTd,null)}});$($_o.processForm).on('change','.p-m-if-val-time-date select',function(){$(this).parents('tr').eq(0).find('[data-process="if:if_val:"]').val($(this).val())});$($_o.processForm).on('click','.p-m-if-val-func-info',function(){pluginFuncOp.tips('processIf')});$_o.txt_insert_field($_o.processForm,'.p-m-if-val-func-field select',function(sltObj){return $(sltObj).parents('td').eq(0).find('[data-process="if:if_val:"]')});$($_o.processForm).on('click','.p-m-if-info',function(){var tips='执行顺序:从上至下判断,逻辑符“并且”的优先级高于“或者”
'+'例如(字母表示条件):
'+'a && b || c && d && e || f || g && h && i && j 等同于
'+'(a && b) || (c && d && e) || f || (g && h && i && j)
'+'括号中的条件都为真时才是真否则为假,整条语句中任意一个括号的结果为真最终结果为真,都为假最终结果为假
';confirmRight({msg:tips,yes:'确定',width:500,textAlign:'left'})});$_o.txt_insert_field($_o.processForm,'.p-m-api-url-field select',function(sltObj){return $(sltObj).parents('section').eq(0).find('[data-process="api:api_url"]')});$($_o.processForm).on('click','.p-m-api-add',function(){var apiTable=$(this).parents('section').eq(0).find('.p-m-api-table table');apiTable.find('tbody').append(''+apiTable.attr('data-tpl')+'
')});$($_o.processForm).on('click','.p-m-api-del',function(){var tr=$(this).parents('tr').eq(0);tr.remove()});inputSelectCustom(null,null,{box:$_o.processForm,slt:'[data-process="api:api_charset"]',ipt:'[data-process="api:api_charset_custom"]'});inputSelectCustom(null,null,{box:$_o.processForm,slt:'[data-process="api:api_encode"]',ipt:'[data-process="api:api_encode_custom"]'});$($_o.processForm).on('change','[data-process="api:api_params:val:"],[data-process="api:api_headers:val:"]',function(){var isHeader=!1;if($(this).attr('data-process')=='api:api_headers:val:'){isHeader=!0}
var val=$(this).val();var tdObj=$(this).parents('td').eq(0);var iptObj=tdObj.find('[data-process="api:'+(isHeader?'api_headers':'api_params')+':addon:"]');var sltObj=tdObj.find('.p-m-api-'+(isHeader?'header':'val')+'-field');iptObj.hide();sltObj.hide();if(val=='time'||val=='custom'){if(val=='time'){iptObj.attr('placeholder','默认格式:Y-m-d H:i:s')}else if(val=='custom'){iptObj.attr('placeholder','输入任何内容');sltObj.css('display','table-cell')}
iptObj.show()}});$_o.txt_insert_field($_o.processForm,'.p-m-api-val-field select',function(sltObj){return $(sltObj).parents('td').eq(0).find('[data-process="api:api_params:addon:"]')});$_o.txt_insert_field($_o.processForm,'.p-m-api-header-field select',function(sltObj){return $(sltObj).parents('td').eq(0).find('[data-process="api:api_headers:addon:"]')});$($_o.processForm).on('click','.p-m-api-header-add',function(){var apiHdTable=$(this).parents('section').eq(0).find('.p-m-api-header-table table');apiHdTable.find('tbody').append(''+apiHdTable.attr('data-tpl')+'
')});$($_o.processForm).on('click','.p-m-api-header-del',function(){var tr=$(this).parents('tr').eq(0);tr.remove()});$($_o.processForm).on('change','[data-process="api:api_type"]',function(){var obj=$(this).parents('section').eq(0).find('.p-m-api-content-type');if($(this).val()=='post'){obj.show()}else{obj.hide()}});$($_o.processForm).on('change','[data-process="api:api_rule_module"]',function(){var ruleModule=$(this).val();ruleModule=ruleModule?ruleModule:'';var obj=$(this).parents('section').eq(0);obj.find('.p-m-api-rule-module').hide();obj.find('.p-m-api-rule-module[data-rule-module="'+ruleModule+'"]').show()});cpRuleModuleInit($_o.processForm,'data-process','api:api_');$($_o.processForm).on('change','[data-process="download:download_op"]',function(){var obj=$(this).parents('section').eq(0);var val=$(this).val();obj.find('.p-m-download-op').hide();obj.find('.p-m-download-op[data-op="'+val+'"]').show()});$($_o.processForm).on('click','.p-m-download-file-tag .dropdown-menu a[data-val]',function(){var prt=$(this).parents('.p-m-download-file-tag').eq(0);var obj=prt.find('[data-process="download:download_file_tag"]');var val=obj.val();if(val){val=val.split(',')}else{val=new Array()}
diff --git a/public/static/js/admin/dataapi.js b/public/static/js/admin/dataapi.js
new file mode 100644
index 0000000..e3fa9f5
--- /dev/null
+++ b/public/static/js/admin/dataapi.js
@@ -0,0 +1,21 @@
+/*
+ |--------------------------------------------------------------------------
+ | SkyCaiji (蓝天采集器)
+ |--------------------------------------------------------------------------
+ | Copyright (c) 2018 https://www.skycaiji.com All rights reserved.
+ |--------------------------------------------------------------------------
+ | 使用协议 https://www.skycaiji.com/licenses
+ |--------------------------------------------------------------------------
+ */
+'use strict';function DataapiClass(){this.formid='#form_dataapi'}
+DataapiClass.prototype={constructor:DataapiClass,init_list:function(search){$('#dataapi_list .delete').bind('click',function(){var curTr=$(this).parents('tr[data-da-id]').eq(0);confirmRight('删除后将无法请求该接口!确定删除?',function(){ajaxOpen({type:'post',url:ulink('dataapi/op?op=delete'),data:{'id':curTr.attr('data-da-id')},success:function(data){ajaxDataMsg(data);if(data.code==1){curTr.remove()}}})})});$('#dataapi_list .status').bind('click',function(){var curTr=$(this).parents('tr[data-da-id]').eq(0);var curObj=$(this);ajaxOpen({type:'post',url:ulink('dataapi/op?op=status'),data:{'id':curTr.attr('data-da-id'),'status':(curObj.hasClass('status-close')?0:1)},success:function(data){ajaxDataMsg(data);data=data.data;if(data.status){curObj.removeClass('status-close').html('开启')}else{curObj.addClass('status-close').html('关闭')}}})});if(isObject(search)){for(var i in search){$('#form_search').find('[name="'+i+'"]').val(search[i])}}},init:function(dataapi){var $_o=this;$('#btn_dataset').bind('click',function(){windowModal('数据集',ulink('dataset/select?from=dataapi'))});$('#tips_config_cond').bind('click',function(){confirmRight({msg:'传入参数名:请求接口时url中传入或post提交数据中的参数名称',yes:'确定',textAlign:'left'})});$('#add_config_cond').bind('click',function(){$_o.add_cond(null)});$('#config_conds').on('click','.config-cond-add',function(){$_o.add_cond({sub:1},this)});$('#config_conds').on('change','[name="conds[field][]"]',function(){var curTr=$(this).parents('tr[id^="cond_"]').eq(0);var fname=$(this).val();fname=fname?('默认:'+fname):'';curTr.find('[name="conds[name][]"]').attr('placeholder',fname)});$('#config_conds').on('click','.config-cond-dlt',function(){var curObj=$(this);confirmRight('确定删除?',function(){curObj.parents('tr[id^="cond_"]').remove();$_o.first_cond()})});eleExchange('#config_conds','.config-cond-move','tr[id^="cond_"]',{stop:function(event,ui){$_o.first_cond()}});if(isObject(dataapi)){$($_o.formid).find('[name="name"]').val(dataapi.name?dataapi.name:'');$($_o.formid).find('[name="route"]').val(dataapi.route?dataapi.route:'');$($_o.formid).find('[name="desc"]').val(dataapi.desc?dataapi.desc:'');$($_o.formid).find('[name="sort"]').val(dataapi.sort?toInt(dataapi.sort):0);$($_o.formid).find('[name="status"][value="'+toInt(dataapi.status)+'"]').prop('checked',!0);var config=dataapi.config;$_o.dataset_load({'dataset_id':dataapi.ds_id},dataapi.config)}},first_cond:function(){var firstObj=$('#config_conds').find('tr[id^="cond_"]:first').eq(0);if(firstObj.hasClass('config-cond-sub')){firstObj.removeClass('config-cond-sub');firstObj.find('[name="conds[sub][]"]').val('')}},add_cond:function(cond,curObj){cond=isObject(cond)?cond:null;var trId='cond_'+generateUUID();var tr=$('#tpl_config_cond').clone();tr.attr('id',trId);trId='#'+trId;var isSub=!1;if(cond){for(var i in cond){tr.find('[name="conds['+i+'][]"]').val(cond[i]?cond[i]:'')}
+if(cond.sub){isSub=!0}}
+if(isSub&&curObj){var endTr=null;var curTr=$(curObj).parents('tr[id^="cond_"]').eq(0);curTr.nextAll().each(function(){if(!$(this).hasClass('config-cond-sub')){return!1}
+endTr=$(this)});if(!endTr){endTr=curTr}
+endTr.after(tr)}else{$('#config_conds tbody').append(tr)}
+if(cond){$(trId).find('[name="conds[field][]"]').trigger('change')}
+if(isSub){$(trId).addClass('config-cond-sub')}},dataset_load:function(dsConfig,daConfig){var $_o=this;dsConfig=isObject(dsConfig)?dsConfig:{};daConfig=isObject(daConfig)?daConfig:null;var dsId=toInt(dsConfig.dataset_id);if(dsId>0){ajaxOpen({url:ulink('dataapi/dataset?ds_id='+dsId),success:function(data){var dsData=data.data;if(isObject(dsData)){var fields=isObject(dsData.fields)?dsData.fields:{};$('#config_conds_box').show();$($_o.formid).find('[name="ds_id"]').val(dsData.id);$('#btn_dataset').html('数据集:'+dsData.name);var opts='';var chks='';for(var i in fields){opts+='';chks+=''}
+$('#tpl_config_cond').find('[name="conds[field][]"]').html(opts);$($_o.formid+' [name="config[order_field]"]').html(opts);$('#config_hide_fields').html(chks);$('#config_conds').find('[name="conds[field][]"]').each(function(){var curVal=$(this).val();$(this).html(opts).val(curVal)});if(daConfig){var conds=daConfig.conds;if(isObject(conds)){for(var i in conds.logic){$_o.add_cond({sub:conds.sub[i],logic:conds.logic[i],field:conds.field[i],op:conds.op[i],name:conds.name[i]})}}
+delete daConfig.conds}}
+$('#myModal').modal('hide');if(daConfig){for(var i in daConfig){var curObj=$($_o.formid).find('[name="config['+i+']"]').eq(0);if(curObj.length>0&&!curObj.is('input:radio')&&!curObj.is('input:checkbox')){curObj.val(daConfig[i])}}
+$($_o.formid).find('[name="config[order_sort]"][value="'+daConfig.order_sort+'"]').prop('checked',!0);if(isObject(daConfig.hide_fields)){for(var i in daConfig.hide_fields){$($_o.formid).find('[name="config[hide_fields][]"][value="'+daConfig.hide_fields[i]+'"]').prop('checked',!0)}}}}})}},};var dataapiClass=new DataapiClass()
\ No newline at end of file
diff --git a/public/static/js/admin/dataset.js b/public/static/js/admin/dataset.js
new file mode 100644
index 0000000..cbdb744
--- /dev/null
+++ b/public/static/js/admin/dataset.js
@@ -0,0 +1,27 @@
+/*
+ |--------------------------------------------------------------------------
+ | SkyCaiji (蓝天采集器)
+ |--------------------------------------------------------------------------
+ | Copyright (c) 2018 https://www.skycaiji.com All rights reserved.
+ |--------------------------------------------------------------------------
+ | 使用协议 https://www.skycaiji.com/licenses
+ |--------------------------------------------------------------------------
+ */
+'use strict';function DatasetClass(){this.formid='#form_dataset'}
+DatasetClass.prototype={constructor:DatasetClass,init_list:function(search){$('#dataset_list .delete').bind('click',function(){var curTr=$(this).parents('tr[data-ds-id]').eq(0);confirmRight('将清空该数据集的所有数据,确定删除?',function(){ajax_check_userpwd({type:'post',url:ulink('dataset/op?op=delete'),data:{'id':curTr.attr('data-ds-id')},success:function(data){ajaxDataMsg(data);if(data.code==1){curTr.remove()}}})})});var dsIds=[];$('tr[data-ds-id]').each(function(){dsIds.push($(this).attr('data-ds-id'))});ajaxOpen({type:'post',url:ulink('dataset/dbCount'),data:{ids:dsIds},success:function(data){if(data.code==1){var ids=data.data;if(isObject(ids)){for(var i in ids){$('tr[data-ds-id="'+i+'"]').find('.db-count').text(ids[i])}}}}});if(isObject(search)){for(var i in search){$('#form_search').find('[name="'+i+'"]').val(search[i])}}},init:function(dataset){var $_o=this;$('#form_dataset').bind('submit',function(){var formObj=$(this);var settings=getFormAjaxSettings(formObj);settings.complete=function(){formObj.find('button[type="submit"]').removeAttr('disabled')};ajax_check_userpwd(settings);return!1});$('#add_dataset_field').bind('click',function(){windowModal('添加字段',ulink('dataset/field'))});$('#set_dataset_indexes').bind('click',function(){windowModal('合理设置索引可提升数据查询速度',ulink('dataset/indexes?ds_id='+$('#form_dataset').find('[name="id"]').val()),{lg:1})});$('#dataset_fields').on('click','.field-name',function(){var tr=$_o.field_tr(this);var objid=tr.attr('id');var field=tr.find('[name="fields[]"]').val();var options={};options.ajax={type:'post',data:{objid:objid,field:field}};windowModal('编辑字段',ulink('dataset/field'),options)});$('#dataset_fields').on('click','.field-dlt',function(){var tr=$_o.field_tr(this);confirmRight('会清空该字段的所有数据,确定删除?',function(){tr.remove()})});eleExchange('#dataset_fields','.field-move','[id^="field_"]');if(isObject(dataset)){$($_o.formid).find('[name="name"]').val(dataset.name?dataset.name:'');$($_o.formid).find('[name="desc"]').val(dataset.desc?dataset.desc:'');var config=dataset.config;if(isObject(config)){var fields=config.fields;if(isObject(fields)){for(var i in fields){var field=fields[i];if(isObject(field)){field.name_original=field.name;$_o.field_add(field,null)}}}}}},db_init:function(list,search){var $_o=this;$('#dataset_db_list').on('change','input[type="text"],input[type="number"],textarea',function(){$(this).parents('tr').eq(0).find('input[name="ids[]"]').prop('checked',!0)});$('#dataset_db_list').on('focus','textarea',function(){$(this).addClass('txt-big')});$('#dataset_db_list').on('blur','textarea',function(){$(this).removeClass('txt-big')});$.datetimepicker.setLocale('zh');$('#addnew').bind('click',function(){var minId=0;$('[name="ids[]"]').each(function(){var val=toInt($(this).val());if(minId>val){minId=val}});minId=minId-1;$_o.db_add([{id:minId}])});$('#deleteall').bind('click',function(){confirmRight('确定删除选中的数据?',function(){var ids=[];$('input[name="ids[]"]:checked').each(function(){ids.push($(this).val())});$_o.db_delete(ids)})});$('#dataset_db_list').on('click','.db-delete',function(){var tr=$(this).parents('tr').eq(0);var id=tr.find('[name="ids[]"]').val();confirmRight('确定删除数据?',function(){$_o.db_delete(id)})});$_o.db_add(list);if(isObject(search)){for(var i in search){$('#form_search').find('[name="'+i+'"]').val(search[i])}}},db_add:function(list){if(!isObject(list)){list=[]}
+var tr=$('#tpl_db').clone();tr.removeAttr('id');var trHtmls='';for(var i in list){var item=list[i];if(!isObject(item)){item={}}
+var id=item.id?item.id:'';trHtmls+=''+tr.html().replace(/\[_id_\]/g,'['+id+']')+'
'}
+$('#dataset_db_list tbody').append(trHtmls);$('#dataset_db_list').find('.db-time').datetimepicker({format:'Y-m-d H:i:s'});for(var i in list){var item=list[i];if(!isObject(item)){item={}}
+var id=item.id?item.id:'';var trObj=$('#dataset_db_list').find('[data-db-id="'+id+'"]');trObj.find('[data-field="id"]').html(id>0?id:' ');trObj.find('[name="ids[]"]').val(id);trObj.find('input[data-field],textarea[data-field]').each(function(){var name=$(this).attr('data-field');$(this).val(item[name]?item[name]:'')})}
+$('#form_list').find('.overlay').hide()},db_delete:function(ids){if(!isObject(ids)){ids=isNull(ids)?[]:[ids]}
+if(ids.length>0){var ids1=[];for(var i in ids){if(ids[i]<0){$('tr[data-db-id="'+ids[i]+'"]').remove()}else{ids1.push(ids[i])}}
+ids=ids1}
+if(ids.length>0){ajaxOpen({type:'post',url:ulink('dataset/dbDelete?ds_id='+$('#form_list').find('[name="ds_id"]').val()),data:{ids:ids},success:function(data){ajaxDataMsg(data);if(data.code==1){var ids=data.data;if(isObject(ids)){for(var i in ids){$('tr[data-db-id="'+ids[i]+'"]').remove()}}}}})}},field_add:function(field,objid){var tr=null;if(objid){tr=$('#'+objid)}else{tr=$('#tpl_field').clone();tr.attr('id','field_'+generateUUID())}
+var fname=field.name;if(field.type=='varchar'&&field.len>0){fname+=' ('+field.len+')'}
+tr.find('.field-name').text(fname).attr('data-dbname',field.name_dbname);tr.find('.field-type').text(window.tpl_lang['ds_f_type_'+field.type]);tr.find('.field-desc').text(field.desc);tr.find('[name="fields[]"]').val(encode_json2urlbase(field));if(!objid){$('#dataset_fields tbody').append(tr)}},field_init:function(objid,fieldData){var $_o=this;inputSelectCustom('#form_field [name="type"]','len',null,'varchar');$('#form_field').bind('submit',function(){ajaxOpen({type:'POST',dataType:'json',url:$('#form_field').attr('action'),data:$('#form_field').serialize(),success:function(data){if(data.code==1){data=data.data;if(isObject(data)){var objid=data.objid;var field=data.field;if(isObject(field)){var hasField=!1;var totalLen=0;if(field.type=='varchar'){field.len=toInt(field.len);field.len=field.len>0?field.len:500;totalLen+=field.len}
+$('#dataset_fields tr[id^="field_"]').each(function(){var curId=$(this).attr('id');var dbname=$(this).find('.field-name').attr('data-dbname');if(dbname==field.name_dbname){if(objid&&objid==curId){hasField=!1}else{hasField=!0}}
+if(!objid||objid!=curId){var fData=$(this).find('[name="fields[]"]').val();fData=decode_urlbase2json(fData);if(fData.type=='varchar'){fData.len=toInt(fData.len);fData.len=fData.len>0?fData.len:500;totalLen+=fData.len}}});if(hasField){toastr.error('字段名称已存在!')}else if(totalLen>16383){toastr.error('所有字符串字段的总长度不能超过16383')}else{$_o.field_add(field,objid);$('#myModal').modal('hide')}}}}else{toastr.error(data.msg)}}});return!1});if(objid&&isObject(fieldData)){$('#form_field [name="objid"]').val(objid);$('#form_field [name="name"]').val(fieldData.name?fieldData.name:'');$('#form_field [name="name_original"]').val(fieldData.name_original?fieldData.name_original:'');$('#form_field [name="desc"]').val(fieldData.desc?fieldData.desc:'');$('#form_field [name="type"]').val(fieldData.type?fieldData.type:'').trigger('change');fieldData.len=toInt(fieldData.len);$('#form_field [name="len"]').val(fieldData.len>0?fieldData.len:'')}},field_tr:function(curObj){return $(curObj).parents('tr[id^="field_"]').eq(0)},indexes_init:function(indexes){var $_o=this;var tplIndex='#win_dataset_indexes .index-tpl [data-tpl="index"]';var tplFields='#win_dataset_indexes .index-tpl [data-tpl="fields"]';var tableEle='#win_dataset_indexes form table.index-list';$('#win_dataset_indexes .index-add-index').bind('click',function(){$_o.indexes_add(tplIndex,tplFields,tableEle,null)});$('#win_dataset_indexes').on('change','.index-field',function(){var curTr=$(this).parents('tr[id^="index_"]').eq(0);if($(this).val()=='-1'){if(curTr.find('.index-field').length<=1){toastr.error('最少保留一个字段!');$(this).val('')}else{$(this).parents('td').eq(0).remove()}}
+var ixSlt=curTr.find('.index-type');var ixVal=ixSlt.val();ixSlt.find('option').prop('disabled',!1).show();var allowIxs={};curTr.find('.index-field').each(function(){var type=$(this).find('option[value="'+$(this).val()+'"]').attr('data-type');var allowTypes={bigint:['index','unique'],double:['index','unique'],mediumtext:['fulltext'],datetime:['index','unique']};if(isObject(allowTypes[type])){ixSlt.find('option').each(function(){if(!$(this).is(':disabled')){var optVal=$(this).attr('value');if(optVal&&allowTypes[type].indexOf(optVal)<0){$(this).prop('disabled',!0).hide()}}})}});if(ixSlt.find('option[value="'+ixVal+'"]').is(':disabled')){var showVal='';ixSlt.find('option').each(function(){var optVal=$(this).attr('value');if(optVal&&!$(this).is(':disabled')){showVal=optVal;return!1}});ixSlt.val(showVal)}});$(tableEle).on('click','.index-add-field',function(){var curTr=$(this).parents('tr[id^="index_"]').eq(0);var indexId=curTr.attr('id');var fieldsObj=$(tplFields).clone();fieldsObj.find('.index-field').attr('name','indexes['+indexId+'][fields][]');curTr.find('.index-fields').append(fieldsObj)});$(tableEle).on('click','.index-delete-index',function(){var curObj=$(this);confirmRight('确定删除?',function(){curObj.parents('tr[id^="index_"]').eq(0).remove()})});if(!isObject(indexes)){indexes={}}
+for(var i in indexes){var index=indexes[i];if(isObject(index)){$_o.indexes_add(tplIndex,tplFields,tableEle,index)}}},indexes_add:function(tplIndex,tplFields,tableEle,indexData){if(!isObject(indexData)){indexData={}}
+var trObj=$(tplIndex).clone();var indexId='index_'+generateUUID();trObj.attr('id',indexId);trObj.find('.index-type').attr('name','indexes['+indexId+'][type]').val(indexData.type?indexData.type:'');if(isObject(indexData.fields)){for(var fi in indexData.fields){var fieldsObj=$(tplFields).clone();fieldsObj.find('.index-field').attr('name','indexes['+indexId+'][fields][]').val(fi);trObj.find('.index-fields').append(fieldsObj)}}else{var fieldsObj=$(tplFields).clone();fieldsObj.find('.index-field').attr('name','indexes['+indexId+'][fields][]');trObj.find('.index-fields').append(fieldsObj)}
+$(tableEle).append(trObj)}};var datasetClass=new DatasetClass()
\ No newline at end of file
diff --git a/public/static/js/admin/release.js b/public/static/js/admin/release.js
index 7d6674c..887ae39 100644
--- a/public/static/js/admin/release.js
+++ b/public/static/js/admin/release.js
@@ -9,21 +9,21 @@
*/
'use strict';function ReleaseClass(formid,releid){this.formid='#'+formid;this.releid=releid;this.curFocusResIpt=''}
ReleaseClass.prototype={constructor:ReleaseClass,init:function(){var $_o=this;$($_o.formid).bind('submit',function(){var module=$($_o.formid+' select[name="module"]').val();if(module=='diy'&&$_o.has_diy_editor()){var diyCode=editorCodeIfr('#diy_editor_ifr',{'get_value':1});if(diyCode){$($_o.formid+' [name="diy[code]"]').val(diyCode)}}
-var settings=getFormAjaxSettings($(this));settings.data={'_post_data_':settings.data};ajaxOpen(settings);return!1});$($_o.formid+' select[name="module"]').bind('change',function(){var module=$(this).val();$($_o.formid+' .rele-module').hide();$($_o.formid+' .rele-module[module="'+module+'"]').show()});$('#rele_module_cms .btn-cms-detect').bind('click',function(){$_o.cms_detect()});$('#rele_module_cms .btn-cms-bind').bind('click',function(){$_o.cms_bind()});$('#rele_module_cms').on('change','select[name="cms[app]"]',function(){var cmsApp=$(this).val();$_o.cms_bind({cms:{app:cmsApp}})});$('#cms_list').on('click','li a',function(){var path=$(this).attr('path');if(path){$($_o.formid+' [name="cms[path]"]').val(path);$('#cms_tab a[href="#cms_tab_bind"]').tab('show');$_o.cms_bind()}});inputSelectCustom(null,null,{box:'#rele_module_cms',slt:'select[name^="cms_app[param]"]',ipt:'input[name^="cms_app[custom]"]'},'custom:');$('#db_tab_config .dm-db-charset li span').bind('click',function(){var charset=$(this).attr('data-val');charset=charset?charset:'';$('#db_tab_config [name="db[charset]"]').val(charset)});$('#db_tab_config .btn-db-names').bind('click',function(){$_o.db_connect('db_names')});$('#db_tab_config .btn-db-connect').bind('click',function(){$_o.db_connect()});$('#rele_module_file').on('click','.btn-file-rand-path',function(){var randStr=$_o.rand_str(10);$($_o.formid+' [name="file[path]"]').val(randStr)});$('#rele_module_api').on('click','.btn-api-rand-url',function(){var randStr=$_o.rand_str(10);$($_o.formid+' [name="api[key]"]').val(randStr)});$('#diy_tab').on('click','[data-type]',function(){var type=$(this).attr('data-type');$($_o.formid+' [name="diy[type]"]').val(type);if(type=='code'&&$_o.has_diy_editor()){var diyCode=$($_o.formid+' [name="diy[code]"]').val();diyCode=diyCode?diyCode:'';editorCodeIfr('#diy_editor_ifr',{'set_value':diyCode})}});$('#toapi_tab').on('click','[data-module]',function(){var module=$(this).attr('data-module');$($_o.formid+' [name="toapi[module]"]').val(module)});$('#rele_module_toapi').on('change','[name="toapi[type]"]',function(){if($(this).val()=='post'){$('#rele_module_toapi .toapi-content-type').show()}else{$('#rele_module_toapi .toapi-content-type').hide()}});$('#rele_module_toapi').on('click','.toapi-add-param',function(){$_o.toapi_add_param(null,null)});$('#rele_module_toapi').on('click','.toapi-del-param',function(){$(this).parents('tr').eq(0).remove()});$('#rele_module_toapi').on('click','.toapi-field-txt a[data-val]',function(){insertAtCaret($(this).parents('.toapi-field-txt').eq(0).find('input:text,textarea').eq(0),$(this).attr('data-val'))});inputSelectCustom('#rele_module_toapi [name="toapi[charset]"]','toapi[charset_custom]');inputSelectCustom('#rele_module_toapi [name="toapi[encode]"]','toapi[encode_custom]');$('#rele_module_toapi').on('click','.toapi-add-header',function(){$_o.toapi_add_header(null,null)});$('#rele_module_toapi').on('click','.toapi-del-header',function(){$(this).parents('tr').eq(0).remove()});$('#toapi_url_field').bind('change',function(){var val=$(this).val();$(this).val('');insertAtCaret($('#rele_module_toapi [name="toapi[url]"]'),val)});$('#toapi_app_url_field').bind('change',function(){var val=$(this).val();$(this).val('');insertAtCaret($('#rele_module_toapi [name="toapi[app_url]"]'),val)});$($_o.formid).find('[name="toapi[response][module]"]').bind('change',function(){var module=$(this).val();var resNames=['id','target','desc','error'];for(var i in resNames){var obj=$($_o.formid).find('[name="toapi[response]['+resNames[i]+']"]');var objPh=obj.attr('data-placeholder');if(!module){objPh+=',默认:'+resNames[i]}
+var settings=getFormAjaxSettings($(this));settings.data={'_post_data_':settings.data};ajaxOpen(settings);return!1});$($_o.formid+' select[name="module"]').bind('change',function(){var module=$(this).val();$($_o.formid+' .rele-module').hide();$($_o.formid+' .rele-module[module="'+module+'"]').show()});$('#rele_module_dataset #btn_dataset_list').bind('click',function(){windowModal('数据集',ulink('dataset/select?from=release'))});$('#rele_module_dataset #btn_dataset_create').bind('click',function(){confirmRight('确定自动创建数据集?',function(){$($_o.formid+' [name="dataset[auto_create]"]').val(1);$($_o.formid).trigger('submit')})});$('#rele_module_cms .btn-cms-detect').bind('click',function(){$_o.cms_detect()});$('#rele_module_cms .btn-cms-bind').bind('click',function(){$_o.cms_bind()});$('#rele_module_cms').on('change','select[name="cms[app]"]',function(){var cmsApp=$(this).val();$_o.cms_bind({cms:{app:cmsApp}})});$('#cms_list').on('click','li a',function(){var path=$(this).attr('path');if(path){$($_o.formid+' [name="cms[path]"]').val(path);$('#cms_tab a[href="#cms_tab_bind"]').tab('show');$_o.cms_bind()}});inputSelectCustom(null,null,{box:'#rele_module_cms',slt:'select[name^="cms_app[param]"]',ipt:'input[name^="cms_app[custom]"]'},'custom:');$('#db_tab_config .dm-db-charset li span').bind('click',function(){var charset=$(this).attr('data-val');charset=charset?charset:'';$('#db_tab_config [name="db[charset]"]').val(charset)});$('#db_tab_config .btn-db-names').bind('click',function(){$_o.db_connect('db_names')});$('#db_tab_config .btn-db-connect').bind('click',function(){$_o.db_connect()});$('#rele_module_file').on('click','.btn-file-rand-path',function(){var randStr=$_o.rand_str(10);$($_o.formid+' [name="file[path]"]').val(randStr)});$('#rele_module_api').on('click','.btn-api-rand-url',function(){var randStr=$_o.rand_str(10);$($_o.formid+' [name="api[key]"]').val(randStr)});$('#diy_tab').on('click','[data-type]',function(){var type=$(this).attr('data-type');$($_o.formid+' [name="diy[type]"]').val(type);if(type=='code'&&$_o.has_diy_editor()){var diyCode=$($_o.formid+' [name="diy[code]"]').val();diyCode=diyCode?diyCode:'';editorCodeIfr('#diy_editor_ifr',{'set_value':diyCode})}});$('#toapi_tab').on('click','[data-module]',function(){var module=$(this).attr('data-module');$($_o.formid+' [name="toapi[module]"]').val(module)});$('#rele_module_toapi').on('change','[name="toapi[type]"]',function(){if($(this).val()=='post'){$('#rele_module_toapi .toapi-content-type').show()}else{$('#rele_module_toapi .toapi-content-type').hide()}});$('#rele_module_toapi').on('click','.toapi-add-param',function(){$_o.toapi_add_param(null,null)});$('#rele_module_toapi').on('click','.toapi-del-param',function(){$(this).parents('tr').eq(0).remove()});$('#rele_module_toapi').on('click','.toapi-field-txt a[data-val]',function(){insertAtCaret($(this).parents('.toapi-field-txt').eq(0).find('input:text,textarea').eq(0),$(this).attr('data-val'))});inputSelectCustom('#rele_module_toapi [name="toapi[charset]"]','toapi[charset_custom]');inputSelectCustom('#rele_module_toapi [name="toapi[encode]"]','toapi[encode_custom]');$('#rele_module_toapi').on('click','.toapi-add-header',function(){$_o.toapi_add_header(null,null)});$('#rele_module_toapi').on('click','.toapi-del-header',function(){$(this).parents('tr').eq(0).remove()});$('#toapi_url_field').bind('change',function(){var val=$(this).val();$(this).val('');insertAtCaret($('#rele_module_toapi [name="toapi[url]"]'),val)});$('#toapi_app_url_field').bind('change',function(){var val=$(this).val();$(this).val('');insertAtCaret($('#rele_module_toapi [name="toapi[app_url]"]'),val)});$($_o.formid).find('[name="toapi[response][module]"]').bind('change',function(){var module=$(this).val();var resNames=['id','target','desc','error'];for(var i in resNames){var obj=$($_o.formid).find('[name="toapi[response]['+resNames[i]+']"]');var objPh=obj.attr('data-placeholder');if(!module){objPh+=',默认:'+resNames[i]}
obj.attr('placeholder',objPh);$('#toapi_resp_module_help').find('[data-module]').hide();$('#toapi_resp_module_help').find('[data-module="'+module+'"]').show()}});$($_o.formid).find('input[name^="toapi[response]"]').bind('focus',function(){$_o.curFocusResIpt=$(this).attr('name')});$('#toapi_resp_module_help').find('[data-rule-sign]').bind('click',function(){var curName=$_o.curFocusResIpt?$_o.curFocusResIpt:'toapi[response][id]';var ruleSign=$(this).attr('data-rule-sign');if(ruleSign=='sign_wildcard'){ruleInsertSign.wildcard('[name="'+curName+'"]')}else if(ruleSign=='sign_match'){ruleInsertSign.match('[name="'+curName+'"]')}else if(ruleSign=='sign_group'){ruleInsertSign.match('[name="'+curName+'"]',{group:1})}});$('#btn_toapi_app').bind('click',function(){$('#toapi_app_params').html('');ajaxOpen({type:'post',url:ulink("release/toapiApp"),data:{'task_id':$($_o.formid+' [name="task_id"]').val(),'app_url':$('#rele_module_toapi [name="toapi[app_url]"]').val()},success:function(data){$('#toapi_app_params').html('');if(dataIsJson(data)){var html=data.data?data.data.html:'';if(html){modal(''+data.msg+'',html)}else{ajaxDataMsg(data)}}else{$('#toapi_app_params').html(data)}},error:function(){$('#toapi_app_params').html('')}})});$('#toapi_tab a[href="#toapi_tab_app"]').bind('click',function(){ajaxOpen({type:'get',url:ulink("release/toapiApp?task_id=_id_",{'_id_':$($_o.formid+' [name="task_id"]').val()}),success:function(data){if(dataIsJson(data)){ajaxDataMsg(data)}else{$('#toapi_app_params').html(data)}}})});$('#btn_rele_test').bind('click',function(){collectorWindow('测试','admin/release/test?id='+$_o.releid,null,{lg:1})})},load:function(data){var $_o=this;if(data.module){$($_o.formid+' select[name="module"]').val(data.module).trigger('change')}
-if(data.config){if('cms'==data.module){$_o.cms_bind(data.config);$(document).ready(function(){$('#cms_tab a[href="#cms_tab_bind"]').tab('show')})}else if('db'==data.module){$_o.db_bind(data.config)}else if('file'==data.module){if(data.config.file){$($_o.formid+' [name="file[path]"]').val(data.config.file.path);$($_o.formid+' [name="file[type]"]').each(function(){if($(this).val()==data.config.file.type){$(this).prop('checked',!0)}});$($_o.formid+' [name="file[txt_implode]"]').val(data.config.file.txt_implode);$($_o.formid+' [name="file[max_line]"]').val(toInt(data.config.file.max_line));if(data.config.file.hide_fields){for(var fi in data.config.file.hide_fields){$($_o.formid+' [name="file[hide_fields][]"][value="'+data.config.file.hide_fields[fi]+'"]').prop('checked',!0)}}}}else if('api'==data.module){if(data.config.api){$($_o.formid+' [name="api[key]"]').val(data.config.api.key);$($_o.formid+' [name="api[cache_time]"]').val(data.config.api.cache_time);if(data.config.api.hide_fields){for(var fi in data.config.api.hide_fields){$($_o.formid+' [name="api[hide_fields][]"][value="'+data.config.api.hide_fields[fi]+'"]').prop('checked',!0)}}}}else if('diy'==data.module){if(data.config.diy){$(document).ready(function(){$('#diy_tab a[href="#diy_tab_'+data.config.diy.type+'"]').tab('show').trigger('click');for(var i in data.config.diy){$($_o.formid+' [name="diy['+i+']"]').val(data.config.diy[i])}
+if(data.config){if('dataset'==data.module){$_o.dataset_load(data.config.dataset)}else if('cms'==data.module){$_o.cms_bind(data.config);$(document).ready(function(){$('#cms_tab a[href="#cms_tab_bind"]').tab('show')})}else if('db'==data.module){$_o.db_bind(data.config)}else if('file'==data.module){if(data.config.file){$($_o.formid+' [name="file[path]"]').val(data.config.file.path);$($_o.formid+' [name="file[type]"]').each(function(){if($(this).val()==data.config.file.type){$(this).prop('checked',!0)}});$($_o.formid+' [name="file[txt_implode]"]').val(data.config.file.txt_implode);$($_o.formid+' [name="file[max_line]"]').val(toInt(data.config.file.max_line));if(data.config.file.hide_fields){for(var fi in data.config.file.hide_fields){$($_o.formid+' [name="file[hide_fields][]"][value="'+data.config.file.hide_fields[fi]+'"]').prop('checked',!0)}}}}else if('api'==data.module){if(data.config.api){$($_o.formid+' [name="api[key]"]').val(data.config.api.key);$($_o.formid+' [name="api[cache_time]"]').val(data.config.api.cache_time);if(data.config.api.hide_fields){for(var fi in data.config.api.hide_fields){$($_o.formid+' [name="api[hide_fields][]"][value="'+data.config.api.hide_fields[fi]+'"]').prop('checked',!0)}}}}else if('diy'==data.module){if(data.config.diy){$(document).ready(function(){$('#diy_tab a[href="#diy_tab_'+data.config.diy.type+'"]').tab('show').trigger('click');for(var i in data.config.diy){$($_o.formid+' [name="diy['+i+']"]').val(data.config.diy[i])}
if(data.config.diy.app){var appName=data.config.diy.app;if(appName.length>1){appName=appName.substr(0,1).toUpperCase()+appName.substr(1).toLowerCase()}else{appName=appName.toUpperCase()}
$($_o.formid+' [name="diy[app]"]').parent().find('.diy-app-name').text(appName+'.php');$($_o.formid+' [name="diy[app]"]').parent().find('.diy-app-editor').show().find('.btn_diy_editor').attr('href',ulink('develop/editor?type=release&module=diy&app=_app_',{'_app_':appName}))}
if($_o.has_diy_editor()&&data.config.diy.code){editorCodeIfr('#diy_editor_ifr',{'set_value':data.config.diy.code})}})}}else if('toapi'==data.module){var config=data.config.toapi;if(config){$($_o.formid+' [name="toapi[module]"]').val(config.module);$($_o.formid+' [name="toapi[url]"]').val(config.url);$($_o.formid+' [name="toapi[type]"]').val(config.type).trigger('change');$($_o.formid+' [name="toapi[content_type]"]').val(config.content_type);$($_o.formid+' [name="toapi[charset_custom]"]').val(config.charset_custom);$($_o.formid+' [name="toapi[charset]"]').val(config.charset).trigger('change');$($_o.formid+' [name="toapi[encode_custom]"]').val(config.encode_custom);$($_o.formid+' [name="toapi[encode]"]').val(config.encode).trigger('change');if(config.response){for(var i in config.response){$($_o.formid+' [name="toapi[response]['+i+']"]').val(config.response[i])}}
$($_o.formid+' [name="toapi[response][module]"]').trigger('change');if(config.param_name){config.param_val=config.param_val?config.param_val:{};for(var i in config.param_name){var pname=config.param_name[i]?config.param_name[i]:'';var pval=config.param_val[i]?config.param_val[i]:'';$_o.toapi_add_param({name:pname,val:pval},i)}}
if(config.header_name){config.header_val=config.header_val?config.header_val:{};for(var i in config.header_name){var hname=config.header_name[i]?config.header_name[i]:'';var hval=config.header_val[i]?config.header_val[i]:'';$_o.toapi_add_header({name:hname,val:hval},i)}}
-$($_o.formid+' [name="toapi[app_url]"]').val(config.app_url);config.interval=toInt(config.interval);config.wait=toInt(config.wait);config.retry=toInt(config.retry);$($_o.formid+' [name="toapi[interval]"]').val(config.interval);$($_o.formid+' [name="toapi[wait]"]').val(config.wait);$($_o.formid+' [name="toapi[retry]"]').val(config.retry);$(document).ready(function(){$('#toapi_tab a[href="#toapi_tab_'+config.module+'"]').tab('show').trigger('click');if(config.interval>0||config.wait>0||config.retry>0){showPanelCollapse('#panel_toapi')}})}}}},cms_detect:function(){var $_o=this;$('#cms_list').html('').addClass('loading');ajaxOpen({type:'get',url:ulink("release/cmsDetect"),dataType:'json',success:function(data){$('#cms_list').removeClass('loading');if(data.code==1){var html='点击选择CMS
';for(var x in data.data){var list=data.data[x];html+='';for(var y in list){html+='- '+list[y]+'
'}
+$($_o.formid+' [name="toapi[app_url]"]').val(config.app_url);config.interval=toInt(config.interval);config.wait=toInt(config.wait);config.retry=toInt(config.retry);$($_o.formid+' [name="toapi[interval]"]').val(config.interval);$($_o.formid+' [name="toapi[wait]"]').val(config.wait);$($_o.formid+' [name="toapi[retry]"]').val(config.retry);$(document).ready(function(){$('#toapi_tab a[href="#toapi_tab_'+config.module+'"]').tab('show').trigger('click');if(config.interval>0||config.wait>0||config.retry>0){showPanelCollapse('#panel_toapi')}})}}}},dataset_load:function(dsConfig){var $_o=this;dsConfig=isObject(dsConfig)?dsConfig:{};var dsId=toInt(dsConfig.dataset_id);if(dsId>0){ajaxOpen({url:ulink('release/dataset?ds_id='+dsId+'&task_id='+$($_o.formid+' [name="task_id"]').val()),dataType:'html',success:function(html){$('#dataset_config').show();$('#myModal').modal('hide');$('#dataset_config').html(html);$('#dataset_config .dataset-field-txt a[data-val]').bind('click',function(){insertAtCaret($(this).parents('.dataset-field-txt').eq(0).find('input[name^="dataset[fields]"]'),$(this).attr('data-val'))});if(isObject(dsConfig.fields)){for(var i in dsConfig.fields){$('#dataset_config').find('[name="dataset[fields]['+i+']"]').val(dsConfig.fields[i]?dsConfig.fields[i]:'')}}}})}},cms_detect:function(){var $_o=this;$('#cms_list').html('').addClass('loading');ajaxOpen({type:'get',url:ulink("release/cmsDetect"),dataType:'json',success:function(data){$('#cms_list').removeClass('loading');if(data.code==1){var html='点击选择CMS
';for(var x in data.data){var list=data.data[x];html+=''}
$('#cms_list').html(html)}else{$('#cms_list').html(data.msg)}}})},cms_bind:function(config){var $_o=this;$('#cms_bind').html('').addClass('loading');var postData=$($_o.formid).serialize();if(config&&config.cms&&config.cms.app){postData='cms[app]='+encodeURIComponent(config.cms.app)+'&'+postData}
ajaxOpen({type:'post',url:ulink("release/cmsBind"),dataType:'html',data:postData,success:function(data,textStatus,request){$('#cms_bind').removeClass('loading').show();if((/application\/json/i).test(request.getResponseHeader('Content-Type'))){data=jQuery.parseJSON(data);$('#cms_bind').html(''+data.msg+'')}else{$('#cms_bind').html(data);if(config&&config.cms_app){if(config.cms_app.param){for(var f in config.cms_app.param){var paramEle=$('#cms_bind').find('[name="cms_app[param]['+f+']"]');if(paramEle.is('select')){paramEle.val(config.cms_app.param[f]).trigger('change')}else if(paramEle.is('input:radio')){$('#cms_bind').find('[name="cms_app[param]['+f+']"][value="'+config.cms_app.param[f]+'"]').prop('checked','checked')}else{paramEle.val(config.cms_app.param[f])}}
if(config.cms_app.custom){for(var f in config.cms_app.custom){$('#cms_bind').find('[name="cms_app[custom]['+f+']"]').val(config.cms_app.custom[f])}}}}}},error:function(XMLHttpRequest,textStatus,errorThrown){$('#cms_bind').removeClass('loading').show();$('#cms_bind').html(XMLHttpRequest.responseText)}})},db_bind:function(config){var $_o=this;$($_o.formid+' select[name="db[type]"]').val(config.db.type);$(document).ready(function(){$('#db_tab a[href="#db_tab_table"]').tab('show');$('#db_tab_table .db-table-list').html('').addClass('loading');ajaxOpen({type:'get',url:ulink("release/dbTables?id=_id_",{_id_:$_o.releid}),timeout:10000,dataType:'json',success:function(data){if(data.code==1){$('#db_tab_table .db-table-list').html(data.msg)}else{$('#db_tab_table .db-table-list').css('color','red').html(data.msg)}},complete:function(XMLHttpRequest,status){$('#db_tab_table .db-table-list').removeClass('loading');if(status=='timeout'){$('#db_tab_table .db-table-list').css('color','red').html('数据库连接超时')}}});$('#db_tab_table .db-table-list').on('click','.btn-db-table-bind',function(){var curTable=$(this).parents('.db-table-list').eq(0).find('.db-table-select').val();$_o.db_table_bind(curTable)});eleExchange('#db_table_bind_list','.db-table-bind-move','[id^="db_table_t_"]');$('#db_table_bind_list').on('click','.db-table-bind-del',function(){var obj=$(this);confirmRight(window.tpl_lang.confirm_delete,function(){obj.parents('[id^="db_table_t_"]').eq(0).remove()})});$('#db_tab_table').on('click','.icon-db-table-bind-tips',function(){confirmRight({msg:'采集字段:在“任务»采集器设置»获取内容”中添加
查询:在表的查询操作中可添加查询内容
自增主键:在当前表之前有新增表时会自动显示
',yes:'确定',width:400,textAlign:'left'})});$('#db_table_bind_list').on('change','.db-table-bind-op',function(){var prtObj=$(this).parents('[id^="db_table_t_"]').eq(0);prtObj.find('.db-table-bind-where').hide();prtObj.find('.db-table-bind-query').hide();prtObj.find('.db-table-bind-data').hide();prtObj.find('.db-table-bind-data-seq').hide();var val=$(this).val();var showData=!1;if(!val){showData=!0;prtObj.find('.db-table-bind-data').show()}else if(val=='update'){showData=!0;prtObj.find('.db-table-bind-where').show();prtObj.find('.db-table-bind-data').show()}else if(val=='query'){prtObj.find('.db-table-bind-where').show();prtObj.find('.db-table-bind-query').show()}
if(showData){var seqObj=prtObj.find('.db-table-bind-data-seq');if(seqObj.length>0){seqObj.show()}}});$('#db_table_bind_list').on('click','.db-table-bind-signs .btn-db-table-bind-signs',function(){var boxObj=$(this).parents('.db-table-bind-signs').eq(0);if(!boxObj||boxObj.length<=0){return}
-var dropdownMenu=boxObj.find('.dropdown-menu');if(dropdownMenu.length>0){dropdownMenu.html('');var key=$(this).parents('[id^="db_table_t_"]').eq(0).attr('data-key');ajaxOpen({type:'POST',dataType:'html',url:ulink('release/dbTableBindSings?table_key=_key_',{'_key_':key}),data:$($_o.formid).serialize(),success:function(html){dropdownMenu.html(html);dropdownMenu.find('a[data-val]').bind('click',function(){insertAtCaret($(this).parents('.db-table-bind-signs').eq(0).find('input[name^="db_tables"]').eq(0),$(this).attr('data-val'))})}})}});$('#db_table_bind_list').on('click','.db-table-bind-where-add',function(){$_o.db_table_bind_where_add(this)});$('#db_table_bind_list').on('click','.db-table-bind-where-del',function(){$(this).parents('tr').eq(0).remove()});$('#db_table_bind_list').on('click','.db-table-bind-query-add',function(){$_o.db_table_bind_query_add(this)});$('#db_table_bind_list').on('click','.db-table-bind-query-del',function(){$(this).parents('tr').eq(0).remove()});if(isObject(config.db_tables)&&config.db_tables.length>0){$('#db_tab_table .db-table-binding').addClass('loading');$_o.db_table_bind(null,1)}})},db_table_bind:function(curTable,isDbTables){var $_o=this;curTable=curTable?curTable:'';isDbTables=isDbTables?isDbTables:'';var bindUrl=ulink('release/dbTableBind?id=_id_&table=_tb_&is_db_tables=_dbtb_',{'_id_':$_o.releid,'_tb_':curTable,'_dbtb_':isDbTables});ajaxOpen({type:'get',url:bindUrl,dataType:'html',success:function(data){if(dataIsJson(data)){ajaxDataMsg(data)}else{$('#db_table_bind_list').append(data)}},complete:function(){$('#db_tab_table .db-table-binding').removeClass('loading').hide()}})},db_table_bind_load:function(dbTables){var $_o=this;if(isObject(dbTables)){for(var key in dbTables){var tBoxId='#db_table_t_'+key;var namePre='db_tables['+key+']';var dbTable=dbTables[key];if(isObject(dbTable)){$(tBoxId).find('[name="'+namePre+'[op]').val(dbTable.op).trigger('change');var opTypes=['where','query'];for(var opi in opTypes){var opType=opTypes[opi];if(isObject(dbTable[opType])){for(var i in dbTable[opType]){if(!isObject(dbTable[opType])){dbTable[opType][i]=[]}}
+var dropdownMenu=boxObj.find('.dropdown-menu');if(dropdownMenu.length>0){dropdownMenu.html('');var key=$(this).parents('[id^="db_table_t_"]').eq(0).attr('data-key');ajaxOpen({type:'POST',dataType:'html',url:ulink('release/dbTableBindSings?table_key=_key_',{'_key_':key}),data:$($_o.formid).serialize(),success:function(html){dropdownMenu.html(html);dropdownMenu.find('a[data-val]').bind('click',function(){insertAtCaret($(this).parents('.db-table-bind-signs').eq(0).find('input[name^="db_tables"]').eq(0),$(this).attr('data-val'))})}})}});$('#db_table_bind_list').on('click','.db-table-bind-where-add',function(){$_o.db_table_bind_where_add(this)});$('#db_table_bind_list').on('click','.db-table-bind-where-del',function(){var curObj=$(this);confirmRight('确定删除?',function(){curObj.parents('tr').eq(0).remove()})});$('#db_table_bind_list').on('click','.db-table-bind-query-add',function(){$_o.db_table_bind_query_add(this)});$('#db_table_bind_list').on('click','.db-table-bind-query-del',function(){var curObj=$(this);confirmRight('确定删除?',function(){curObj.parents('tr').eq(0).remove()})});if(isObject(config.db_tables)&&config.db_tables.length>0){$('#db_tab_table .db-table-binding').addClass('loading');$_o.db_table_bind(null,1)}})},db_table_bind:function(curTable,isDbTables){var $_o=this;curTable=curTable?curTable:'';isDbTables=isDbTables?isDbTables:'';var bindUrl=ulink('release/dbTableBind?id=_id_&table=_tb_&is_db_tables=_dbtb_',{'_id_':$_o.releid,'_tb_':curTable,'_dbtb_':isDbTables});ajaxOpen({type:'get',url:bindUrl,dataType:'html',success:function(data){if(dataIsJson(data)){ajaxDataMsg(data)}else{$('#db_table_bind_list').append(data)}},complete:function(){$('#db_tab_table .db-table-binding').removeClass('loading').hide()}})},db_table_bind_load:function(dbTables){var $_o=this;if(isObject(dbTables)){for(var key in dbTables){var tBoxId='#db_table_t_'+key;var namePre='db_tables['+key+']';var dbTable=dbTables[key];if(isObject(dbTable)){$(tBoxId).find('[name="'+namePre+'[op]').val(dbTable.op).trigger('change');var opTypes=['where','query'];for(var opi in opTypes){var opType=opTypes[opi];if(isObject(dbTable[opType])){for(var i in dbTable[opType]){if(!isObject(dbTable[opType])){dbTable[opType][i]=[]}}
for(var i in dbTable[opType].field){var opData={};for(var ii in dbTable[opType]){opData[ii]=dbTable[opType][ii][i]}
$_o.db_table_bind_op_add(opType,key,opData)}}}
if(isObject(dbTable.query)){for(var qk in dbTable.query){$(tBoxId).find('[name="'+namePre+'[field]['+qk+']"]').val(dbTable.query[qk])}}
diff --git a/public/static/js/admin/tasks.js b/public/static/js/admin/tasks.js
index 2e818ed..1554c94 100644
--- a/public/static/js/admin/tasks.js
+++ b/public/static/js/admin/tasks.js
@@ -8,13 +8,13 @@
|--------------------------------------------------------------------------
*/
'use strict';var tasksOpClass={get_task_id:function(obj){var taskId=$(obj).parents('tr[data-task-id]').eq(0).attr('data-task-id');taskId=taskId?taskId:0;return taskId},init_common:function(){$('table.datatable').on('click','.delete',function(){var obj=$(this);var url=ulink('task/op?op=delete&id=_id_',{'_id_':tasksOpClass.get_task_id(obj)});confirmRight(window.tpl_lang.confirm_delete,function(){ajaxOpen({type:"GET",url:url,dataType:"json",success:function(data){data.code==1?toastr.success(data.msg):toastr.error(data.msg);if(data.code==1){obj.parents('tr').eq(0).remove()}}})})});$('table.datatable').on('click','.auto',function(){var auto=1;var tips=[window.tpl_lang.task_auto_1,'green'];var val=$(this).attr('data-val');val=toInt(val);if(val!=0){auto=0;tips=[window.tpl_lang.task_auto_0,'red']}
-var taskid=tasksOpClass.get_task_id(this);if(taskid>0){var $_o=$(this);var url=ulink('task/op?op=auto&auto=_auto_&id=_id_',{'_auto_':auto,'_id_':taskid});ajaxOpen({type:'GET',url:url,success:function(data){if(data.code==1){$_o.attr('data-val',auto);$_o.prop('title','');$_o.html(tips[0]);$_o.css('color',tips[1])}},dataType:'json'})}});var loadedFunc=function(){$('#myModal .modal-footer .close').html('关闭采集').prop('title','关闭并结束任务').addClass('btn btn-primary').removeClass('close');var btnBackstage=$('');btnBackstage.bind('click',function(){collectorEchoMsg.close_non_stop=!0});$('#myModal .modal-footer').prepend(btnBackstage)};$('table.datatable').on('click','.caiji',function(){var taskid=tasksOpClass.get_task_id(this);collectorWindow('任务采集','admin/task/collect?id=_id_',{'_id_':taskid},{loaded_func:loadedFunc,lg:1})});$('table.datatable').on('click','.caiji-batch',function(){var taskids=[];$('input[name="batch[]"]:checked').each(function(){taskids.push($(this).val())});collectorWindow('批量采集','admin/task/collectBatch?ids=_ids_',{'_ids_':taskids.join(',')},{loaded_func:loadedFunc,lg:1})});$('table.datatable').on('click','.houtai',function(){var taskid=tasksOpClass.get_task_id(this);tasksOpClass.backstage_collect(taskid)});$('table.datatable').on('click','.houtai-batch',function(){var taskids=[];$('input[name="batch[]"]:checked').each(function(){taskids.push($(this).val())});tasksOpClass.backstage_collect(taskids)});$('table.datatable thead th[data-order]').bind('click',function(){var order=$(this).attr('data-order');if(!order){return!1}
+var taskid=tasksOpClass.get_task_id(this);if(taskid>0){var curObj=$(this);var url=ulink('task/op?op=auto&auto=_auto_&id=_id_',{'_auto_':auto,'_id_':taskid});ajaxOpen({type:'GET',url:url,success:function(data){if(data.code==1){curObj.attr('data-val',auto);curObj.prop('title','');curObj.html(tips[0]);curObj.css('color',tips[1])}},dataType:'json'})}});var loadedFunc=function(){$('#myModal .modal-footer .close').html('关闭采集').prop('title','关闭并结束任务').addClass('btn btn-primary').removeClass('close');var btnBackstage=$('');btnBackstage.bind('click',function(){collectorEchoMsg.close_non_stop=!0});$('#myModal .modal-footer').prepend(btnBackstage)};$('table.datatable').on('click','.caiji',function(){var taskid=tasksOpClass.get_task_id(this);collectorWindow('任务采集','admin/task/collect?id=_id_',{'_id_':taskid},{loaded_func:loadedFunc,lg:1})});$('table.datatable').on('click','.caiji-batch',function(){var taskids=[];$('input[name="batch[]"]:checked').each(function(){taskids.push($(this).val())});collectorWindow('批量采集','admin/task/collectBatch?ids=_ids_',{'_ids_':taskids.join(',')},{loaded_func:loadedFunc,lg:1})});$('table.datatable').on('click','.houtai',function(){var taskid=tasksOpClass.get_task_id(this);tasksOpClass.backstage_collect(taskid)});$('table.datatable').on('click','.houtai-batch',function(){var taskids=[];$('input[name="batch[]"]:checked').each(function(){taskids.push($(this).val())});tasksOpClass.backstage_collect(taskids)});$('table.datatable thead th[data-order]').bind('click',function(){var order=$(this).attr('data-order');if(!order){return!1}
var className=$(this).prop('class');var sort='desc';if(className=='sorting_desc'){sort='asc'}
-window.location.href=ulink('task/list?show=list&order='+order+'&sort='+sort);return!1})},init_folder:function(openedTgIds){tasksOpClass.init_common();$('#task_list_folder').on('click','.taskgroup',function(){tasksOpClass.open_folder($(this).parents('tr').eq(0).attr('data-tgid'))});tasksOpClass.open_folder('0',function(){if(isObject(openedTgIds)){for(var i in openedTgIds){tasksOpClass.open_folder(openedTgIds[i])}}})},open_folder:function(tgid,successFunc){var trBox=$('#task_list_folder').find('tr[data-tgid="'+tgid+'"]').eq(0);var tgObj=trBox.find('.taskgroup');var tgLevel=trBox.attr('data-level');var loadingImg='';var opened=tgObj.hasClass('taskgroup-opened')?true:!1;var childs=$('#task_list_folder tr[data-parent-tgid="'+tgid+'"]');childs.css('display',(opened?'none':'table-row'));childs.each(function(){var cTgid=$(this).attr('data-tgid');var cOpened=$(this).hasClass('taskgroup-opened')?true:!1;if(cTgid){if(opened){$('#task_list_folder tr[data-parent-tgid="'+cTgid+'"]').css('display','none')}else{$('#task_list_folder tr[data-parent-tgid="'+cTgid+'"]').css('display',cOpened?'table-row':'none')}}});if(opened){tgObj.removeClass('taskgroup-opened');ajaxOpen({type:"GET",url:ulink('task/tgClose?tg_id=_tgid_',{'_tgid_':tgid}),dataType:"json",success:function(data){}})}else{tgObj.addClass('taskgroup-opened');if(trBox.attr('data-setted')!=1){tgObj.parents('td').eq(0).append(loadingImg);ajaxOpen({type:"GET",url:ulink('task/tgOpen?tg_id=_tgid_',{'_tgid_':tgid}),dataType:"json",success:function(data){if(tgLevel>0){tgObj.siblings('.loading-sm').remove()}else{trBox.hide()}
+window.location.href=ulink('task/list?show=list&order='+order+'&sort='+sort);return!1});this.task_collected_num()},task_collected_num:function(){var taskIds=[];$('tr[data-task-id]').each(function(){taskIds.push($(this).attr('data-task-id'))});if(taskIds.length>0){ajaxOpen({type:'POST',url:ulink('task/taskCollectedNum'),data:{'task_ids':taskIds},success:function(data){if(data.code==1){data=data.data;if(isObject(data)){for(var i in data){var num=data[i];if(isObject(num)){var trObj=$('tr[data-task-id="'+i+'"]');trObj.find('.today-num').text(num.today);trObj.find('.total-num').text(num.total)}}}}}})}},init_folder:function(openedTgIds){tasksOpClass.init_common();$('#task_list_folder').on('click','.taskgroup',function(){tasksOpClass.open_folder($(this).parents('tr').eq(0).attr('data-tgid'))});tasksOpClass.open_folder('0',function(){if(isObject(openedTgIds)){for(var i in openedTgIds){tasksOpClass.open_folder(openedTgIds[i])}}})},open_folder:function(tgid,successFunc){var $_o=this;var trBox=$('#task_list_folder').find('tr[data-tgid="'+tgid+'"]').eq(0);var tgObj=trBox.find('.taskgroup');var tgLevel=trBox.attr('data-level');var loadingImg='';var opened=tgObj.hasClass('taskgroup-opened')?true:!1;var childs=$('#task_list_folder tr[data-parent-tgid="'+tgid+'"]');childs.css('display',(opened?'none':'table-row'));childs.each(function(){var cTgid=$(this).attr('data-tgid');var cOpened=$(this).hasClass('taskgroup-opened')?true:!1;if(cTgid){if(opened){$('#task_list_folder tr[data-parent-tgid="'+cTgid+'"]').css('display','none')}else{$('#task_list_folder tr[data-parent-tgid="'+cTgid+'"]').css('display',cOpened?'table-row':'none')}}});if(opened){tgObj.removeClass('taskgroup-opened');ajaxOpen({type:"GET",url:ulink('task/tgClose?tg_id=_tgid_',{'_tgid_':tgid}),dataType:"json",success:function(data){}})}else{tgObj.addClass('taskgroup-opened');if(trBox.attr('data-setted')!=1){tgObj.parents('td').eq(0).append(loadingImg);ajaxOpen({type:"GET",url:ulink('task/tgOpen?tg_id=_tgid_',{'_tgid_':tgid}),dataType:"json",success:function(data){if(tgLevel>0){tgObj.siblings('.loading-sm').remove()}else{trBox.hide()}
tgLevel=parseInt(tgLevel);var leftSpace=tgLevel>0?('padding-left:'+tgLevel*25+'px;'):'';var html='';if(data.code==1){if(isNull(data.data)){html=null}else{var html='';if(data.data.tgList){var datalist=data.data.tgList;for(var i in datalist){html+=' '+datalist[i].name+' | |
'}}
-if(data.data.taskList){var todayDate=new Date();todayDate=todayDate.getFullYear()+'-'+(todayDate.getMonth()+1)+'-'+todayDate.getDate();var datalist=data.data.taskList;for(var i in datalist){var item=datalist[i];var auto=toInt(item.auto);if(!isObject(item._collected_info)){item._collected_info={}}
-html+=''+''+item.name+' | | '+''+(window.tpl_lang['task_auto_'+auto])+' | '+''+item.addtime+' | '+' '+' | '+' | |
'}}}}else{html=null}
-html=isNull(html)?(''+window.tpl_lang.task_none_data+' | |
'):html;trBox.attr('data-setted',1);trBox.after(html);if(successFunc&&typeof(successFunc)=='function'){successFunc()}}})}}},click_backstage_time:{},backstage_collect:function(ids){var isBatch=!1;if(isObject(ids)){isBatch=!0;ids=ids.join(',')}
+if(data.data.taskList){var todayDate=new Date();todayDate=todayDate.getFullYear()+'-'+(todayDate.getMonth()+1)+'-'+todayDate.getDate();var datalist=data.data.taskList;for(var i in datalist){var item=datalist[i];var auto=toInt(item.auto);html+=''+''+item.name+' | | '+''+(window.tpl_lang['task_auto_'+auto])+' | '+''+item.addtime+' | '+' '+' | '+' | |
'}}}}else{html=null}
+html=isNull(html)?(''+window.tpl_lang.task_none_data+' | |
'):html;trBox.attr('data-setted',1);trBox.after(html);if(successFunc&&typeof(successFunc)=='function'){successFunc()}
+$_o.task_collected_num()}})}}},click_backstage_time:{},backstage_collect:function(ids){var isBatch=!1;if(isObject(ids)){isBatch=!0;ids=ids.join(',')}
if(!tasksOpClass.click_backstage_time[ids]){tasksOpClass.click_backstage_time[ids]=(new Date()).getTime()}else{if((new Date()).getTime()-tasksOpClass.click_backstage_time[ids]<=3000){return!1}else{tasksOpClass.click_backstage_time[ids]=(new Date()).getTime()}}
var url='';if(isBatch){url=ulink('admin/task/collectBatch?ids=_ids_&backstage_run=1',{'_ids_':ids})}else{url=ulink('admin/task/collect?id=_id_&backstage_run=1',{'_id_':ids})}
ajaxOpen({type:'GET',url:url,async:!0,timeout:3000,dataType:'html'});toastr.success('已添加到后台运行');winBackstageTask.count(1000)},}
\ No newline at end of file
diff --git a/public/static/js/common.js b/public/static/js/common.js
index 971d378..d549fca 100644
--- a/public/static/js/common.js
+++ b/public/static/js/common.js
@@ -7,7 +7,7 @@
| 使用协议 https://www.skycaiji.com/licenses
|--------------------------------------------------------------------------
*/
-'use strict';$(document).ready(function(){toastr.options={"closeButton":!1,"debug":!1,"newestOnTop":!1,"progressBar":!1,"positionClass":"toast-top-center","preventDuplicates":!1,"onclick":null,"showDuration":"300","hideDuration":"1000","timeOut":"3000","extendedTimeOut":"1000","showEasing":"swing","hideEasing":"linear","showMethod":"fadeIn","hideMethod":"fadeOut"};$('body').on('submit','form[ajax-submit="true"]',function(){var settings=getFormAjaxSettings($(this));ajaxOpen(settings);return!1})});function getFormAjaxSettings(formObj){var settings={type:'POST',dataType:'json',url:formObj.attr('action'),beforeSend:function(){formObj.find('button[type="submit"]').attr('disabled',!0)},success:function(data){if(data.url){window.setTimeout("window.location.href='"+data.url+"';",2000)}else{formObj.find('button[type="submit"]').removeAttr('disabled')}
+'use strict';$(document).ready(function(){toastr.options={"closeButton":!1,"debug":!1,"newestOnTop":!1,"progressBar":!1,"positionClass":"toast-top-center","preventDuplicates":!1,"onclick":null,'tapToDismiss':!1,"showDuration":"300","hideDuration":"1000","timeOut":"3000","extendedTimeOut":"1000","showEasing":"swing","hideEasing":"linear","showMethod":"fadeIn","hideMethod":"fadeOut"};$('body').on('submit','form[ajax-submit="true"]',function(){var settings=getFormAjaxSettings($(this));ajaxOpen(settings);return!1})});function getFormAjaxSettings(formObj){var settings={type:'POST',dataType:'json',url:formObj.attr('action'),beforeSend:function(){formObj.find('button[type="submit"]').attr('disabled',!0)},success:function(data){if(data.url){window.setTimeout("window.location.href='"+data.url+"';",2000)}else{formObj.find('button[type="submit"]').removeAttr('disabled')}
if(data.code==1){if(data.msg){toastr.success(data.msg)}
formObj.find('.verify-img').trigger('click')}else{if(data.msg){toastr.error(data.msg)}}
var dataData=isNull(data.data)?{}:data.data;if(dataData.js){eval(dataData.js)}},error:function(data){formObj.find('button[type="submit"]').removeAttr('disabled');toastr.error(data)}};if(formObj.attr('enctype')&&formObj.attr('enctype').toLowerCase()=='multipart/form-data'){var formData=new FormData(formObj[0]);settings.data=formData;settings.contentType=!1;settings.processData=!1}else{settings.data=formObj.serialize()}
diff --git a/public/static/js/langs/zh-cn.js b/public/static/js/langs/zh-cn.js
index 4594af9..3f93f0a 100644
--- a/public/static/js/langs/zh-cn.js
+++ b/public/static/js/langs/zh-cn.js
@@ -1 +1 @@
-var tpl_lang={"appname":"\u84dd\u5929\u91c7\u96c6\u5668","user_error_username":"\u7528\u6237\u540d\u5fc5\u987b\u75313-15\u4e2a\u5b57\u7b26\u7ec4\u6210\uff01","user_error_password":"\u5bc6\u7801\u5fc5\u987b\u75316-30\u4f4d\u5b57\u6bcd\u3001\u6570\u5b57\u6216\u7279\u6b8a\u5b57\u7b26\u7ec4\u6210\uff01","user_error_repassword":"\u786e\u8ba4\u5bc6\u7801\u548c\u5bc6\u7801\u4e0d\u4e00\u81f4\uff01","user_error_email":"\u90ae\u7bb1\u683c\u5f0f\u9519\u8bef\uff01","admincp":"\u540e\u53f0","sign_wildcard":"(*)","sign_match":"[\u5185\u5bb9{:id}]","tips_sign_wildcard":"\u901a\u914d\u7b26\u53ef\u5339\u914d\u4efb\u610f\u5b57\u7b26","tips_sign_match":"\u5339\u914d\u4efb\u610f\u5b57\u7b26\u5e76\u4fdd\u5b58\u4e3a\u6807\u7b7e\u4ee5\u4f9b\u8c03\u7528\uff0c\u7b49\u540c\u4e8e\u6355\u83b7\u7ec4\uff1a(?<nr\u6807\u8bc6>.*?)","tips_sign_match_global":"\u5339\u914d\u4efb\u610f\u5b57\u7b26\u5e76\u4fdd\u5b58\u4e3a\u6807\u7b7e\u4ee5\u4f9b\u5168\u5c40\u8c03\u7528\uff0c\u7b49\u540c\u4e8e\u6355\u83b7\u7ec4\uff1a(?<nr\u6807\u8bc6>.*?)","tips_sign_group":"\u6355\u83b7\u7ec4\uff1a(?<nr\u6807\u8bc6>[\\s\\S]*?)\uff0c\u5339\u914d\u6b63\u5219\u5e76\u4fdd\u5b58\u4e3a[\u5185\u5bb9]\u6807\u7b7e\u4ee5\u4f9b\u8c03\u7528","tips_sign_group_global":"\u6355\u83b7\u7ec4\uff1a(?<nr\u6807\u8bc6>[\\s\\S]*?)\uff0c\u5339\u914d\u6b63\u5219\u5e76\u4fdd\u5b58\u4e3a[\u5185\u5bb9]\u6807\u7b7e\u4ee5\u4f9b\u5168\u5c40\u8c03\u7528","tips_regular":"\u53ef\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f","tips_export_ipt_pwd":"\u52a0\u5bc6\u6587\u4ef6\u5e76\u4e14\u5bfc\u5165\u65f6\u9700\u8981\u8f93\u5165\u8be5\u5bc6\u7801\uff08\u8bf7\u7262\u8bb0\u5bc6\u7801\u5426\u5219\u65e0\u6cd5\u89e3\u5bc6\uff09\uff0c\u9ed8\u8ba4\u65e0\u5bc6\u7801\u4e0d\u52a0\u5bc6","setting":"\u8bbe\u7f6e","setting_site":"\u7ad9\u70b9\u8bbe\u7f6e","set_site_verifycode":"\u5f00\u542f\u56fe\u7247\u9a8c\u8bc1\u7801","setting_caiji":"\u91c7\u96c6\u8bbe\u7f6e","set_caiji_auto":"\u5f00\u542f\u81ea\u52a8\u91c7\u96c6","set_caiji_run":"\u81ea\u52a8\u91c7\u96c6\u8fd0\u884c\u65b9\u5f0f","set_caiji_interval":"\u91c7\u96c6\u8fd0\u884c\u95f4\u9694","set_caiji_num":"\u6700\u5927\u91c7\u96c6\u6570\u91cf","set_caiji_timeout":"\u6700\u5927\u6267\u884c\u65f6\u95f4","setting_email":"\u90ae\u4ef6\u8bbe\u7f6e","set_email_sender":"\u53d1\u4ef6\u4eba\u540d\u79f0","set_email_email":"\u53d1\u4ef6\u4eba\u90ae\u7bb1\u8d26\u53f7","set_email_pwd":"\u53d1\u4ef6\u4eba\u90ae\u7bb1\u5bc6\u7801","set_email_smtp":"SMTP\u670d\u52a1\u5668","set_email_port":"SMTP\u7aef\u53e3","set_email_port_tips":"TLS\u4e00\u822c\u4e3a25\uff0cSSL\u4e00\u822c\u4e3a465\uff0c\u54a8\u8be2\u90ae\u7bb1\u670d\u52a1\u5546\u83b7\u53d6","set_email_type":"SMTP\u7aef\u53e3\u7c7b\u578b","set_email_test_subject":"\u6d4b\u8bd5\u53d1\u9001\u90ae\u4ef6","set_email_test_body":"\u606d\u559c\uff0c\u53d1\u9001\u90ae\u4ef6\u6210\u529f\uff01","setting_store":"\u4e91\u7aef\u8bbe\u7f6e","store_authkey_error":"\u901a\u4fe1\u5bc6\u94a5\u53ea\u80fd\u7531\u5b57\u6bcd\u548c\u6570\u5b57\u7ec4\u6210\u4e14\u957f\u5ea6\u57286-100\u4f4d\u4e4b\u95f4","down_file_name_":"\u6309\u65f6\u95f4\u751f\u6210\uff08\u65b9\u4fbf\u65e5\u671f\u5f52\u7c7b\uff09","down_file_name_time":"\u6309\u65f6\u95f4\u751f\u6210\uff08\u65b9\u4fbf\u65e5\u671f\u5f52\u7c7b\uff09","down_file_name_url":"\u6309\u7f51\u5740\u751f\u6210\uff08\u9632\u6b62\u91cd\u590d\u4e0b\u8f7d\uff09","down_file_name_custom":"\u81ea\u5b9a\u4e49","down_file_name_custom_name_":"\u6587\u4ef6\u7f51\u5740MD5\u7801","down_img_name_custom_name_":"\u56fe\u7247\u7f51\u5740MD5\u7801","config_error_none_email":"\u6ca1\u6709\u90ae\u7bb1\u670d\u52a1\u5668\u914d\u7f6e\uff0c\u8bf7\u5728\u540e\u53f0\u8bbe\u7f6e\uff01","user":"\u7528\u6237","user_list":"\u7528\u6237\u5217\u8868","user_add":"\u6dfb\u52a0\u7528\u6237","user_edit":"\u7f16\u8f91\u7528\u6237","user_username":"\u7528\u6237\u540d","user_password":"\u5bc6\u7801","user_repassword":"\u786e\u8ba4\u5bc6\u7801","user_newpwd_tips":"\u5982\u9700\u4fee\u6539\u5bc6\u7801\uff0c\u8bf7\u5728\u6b64\u8f93\u5165\u65b0\u5bc6\u7801\uff0c\u5426\u5219\u7559\u7a7a","user_email":"\u90ae\u7bb1","user_email_tips":"\u7528\u4e8e\u627e\u56de\u8d26\u53f7\u5bc6\u7801","user_groupid":"\u7528\u6237\u7ec4","user_error_has_username":"\u7528\u6237\u540d\u5df2\u7ecf\u5b58\u5728\uff01","user_error_edit_not_allow":"\u53ea\u6709\u521b\u59cb\u4eba\u624d\u80fd\u7f16\u8f91\u4ed6\u4eba\u7684\u8d26\u53f7\uff01","user_error_delete_not_allow":"\u53ea\u6709\u521b\u59cb\u4eba\u624d\u80fd\u5220\u9664\u8d26\u53f7\uff01","user_error_groupid":"\u4e0d\u662f\u5141\u8bb8\u7684\u7528\u6237\u7ec4\uff01","user_error_del_founder":"\u4e0d\u80fd\u5220\u9664\u521b\u59cb\u4eba\u8d26\u53f7\uff01","user_error_null_uid":"UID\u4e0d\u80fd\u4e3a\u7a7a","user_error_empty_user":"\u7528\u6237\u4e0d\u5b58\u5728","user_error_login":"\u7528\u6237\u540d\u6216\u5bc6\u7801\u4e0d\u6b63\u786e\uff01","user_error_sublogin":"\u767b\u5f55\u63d0\u4ea4\u5931\u8d25","user_error_is_not_admin":"\u62b1\u6b49\uff0c\u8bf7\u767b\u5f55\u7ba1\u7406\u5458\u8d26\u53f7\uff01","user_login_in":"\u767b\u5f55\u4e2d...","user_auto_login":"\u6b63\u5728\u81ea\u52a8\u767b\u5f55...","usertoken_error":"\u7528\u6237token\u9519\u8bef\uff0c\u8bf7\u5237\u65b0\u9875\u9762\u6216\u91cd\u65b0\u767b\u5f55\uff01","task":"\u4efb\u52a1","task_add":"\u6dfb\u52a0\u4efb\u52a1","task_edit":"\u7f16\u8f91\u4efb\u52a1","task_list":"\u4efb\u52a1\u5217\u8868","task_change_list":"\u5217\u8868\u6a21\u5f0f","task_change_folder":"\u5206\u7ec4\u6a21\u5f0f","task_name":"\u4efb\u52a1\u540d\u79f0","task_tg":"\u4efb\u52a1\u5206\u7ec4","task_sort":"\u6392\u5e8f","task_sort_help":"\u6570\u5b57\u8d8a\u5927\u8d8a\u9760\u524d","task_module":"\u91c7\u96c6\u6a21\u5757","task_module_":"\u65e0","task_module_pattern":"\u89c4\u5219\u91c7\u96c6","task_module_keyword":"\u5173\u952e\u8bcd\u91c7\u96c6","task_module_weixin":"\u5fae\u4fe1\u91c7\u96c6","task_auto":"\u81ea\u52a8\u91c7\u96c6","task_auto_":"\u5426","task_auto_0":"\u5426","task_auto_1":"\u5faa\u73af","task_auto_2":"\u5b9a\u65f6","task_addtime":"\u6dfb\u52a0\u65f6\u95f4","task_caijitime":"\u91c7\u96c6\u65f6\u95f4","task_collected":"\u91c7\u96c6\u91cf","task_edit_collector":"\u4e0b\u4e00\u6b65\uff1a\u7f16\u8f91\u91c7\u96c6\u5668","task_root":"\u6839\u76ee\u5f55","task_loading":"\u6b63\u5728\u8f7d\u5165\u6570\u636e","task_none_data":"\u65e0\u6570\u636e","task_set_task":"\u4efb\u52a1\u8bbe\u7f6e","task_set_collector":"\u91c7\u96c6\u5668\u8bbe\u7f6e","task_set_release":"\u53d1\u5e03\u8bbe\u7f6e","task_error_null_id":"\u8bf7\u8f93\u5165\u4efb\u52a1id","task_error_empty_task":"\u4e0d\u5b58\u5728\u4efb\u52a1","task_error_null_tgid":"\u8bf7\u8f93\u5165\u5206\u7ec4id","task_error_empty_tg":"\u4e0d\u5b58\u5728\u5206\u7ec4","task_error_null_name":"\u8bf7\u8f93\u5165\u540d\u79f0\uff01","task_error_has_name":"\u540d\u79f0\u5df2\u7ecf\u5b58\u5728\uff01","task_error_null_module":"\u672a\u8bbe\u7f6e\u91c7\u96c6\u6a21\u5757","taskgroup_add":"\u6dfb\u52a0\u5206\u7ec4","taskgroup_edit":"\u7f16\u8f91\u5206\u7ec4","taskgroup":"\u4efb\u52a1\u5206\u7ec4","taskgroup_list":"\u5206\u7ec4\u5217\u8868","taskgroup_name":"\u5206\u7ec4\u540d\u79f0","taskgroup_sort":"\u6392\u5e8f","taskgroup_sort_help":"\u6570\u5b57\u8d8a\u5927\u8d8a\u9760\u524d","taskgroup_parent_id":"\u7236\u5206\u7ec4","tg_add_sub":"\u6dfb\u52a0\u5b50\u5206\u7ec4","tg_move":"\u79fb\u52a8\u5206\u7ec4","tg_exist_sub":"\u5b58\u5728\u5b50\u5206\u7ec4\uff01","tg_none":"\u5206\u7ec4\u4e0d\u5b58\u5728\uff01","tg_is_parent":"\u5b58\u5728\u5b50\u5206\u7ec4\uff0c\u8bf7\u5148\u6e05\u7a7a\u5b50\u5206\u7ec4\uff0c\u624d\u80fd\u79fb\u52a8\u5206\u7ec4\uff01","tg_deleteall_has_sub":"\u6709\u5b50\u5206\u7ec4\u7684\u4e0d\u80fd\u5220\u9664\uff0c\u9700\u5148\u6e05\u7a7a\u5b50\u5206\u7ec4\uff01","tg_no_checked":"\u6ca1\u6709\u9009\u4e2d\u7684\u8bb0\u5f55\uff01","tg_error_null_name":"\u8bf7\u8f93\u5165\u540d\u79f0\uff01","tg_error_has_name":"\u540d\u79f0\u5df2\u7ecf\u5b58\u5728\uff01","coll_set":"\u91c7\u96c6\u5668\u8bbe\u7f6e","coll_edit_task":"\u4e0a\u4e00\u6b65\uff1a\u7f16\u8f91\u4efb\u52a1","coll_name":"\u91c7\u96c6\u89c4\u5219\u540d\u79f0","coll_error_invalid_module":"\u65e0\u6548\u7684\u91c7\u96c6\u6a21\u5757","coll_error_empty_coll":"\u91c7\u96c6\u5668\u8bbe\u7f6e\u4e0d\u5b58\u5728","coll_error_empty_effective":"\u9875\u9762\u811a\u672c\u4e0d\u53ef\u7528\uff0c\u4fdd\u5b58\u5931\u8d25\uff01","field_module_rule":"\u89c4\u5219\u5339\u914d","field_module_auto":"\u81ea\u52a8\u83b7\u53d6","field_module_xpath":"XPath\u5339\u914d","field_module_words":"\u56fa\u5b9a\u6587\u5b57","field_module_num":"\u968f\u673a\u6570\u5b57","field_module_time":"\u65f6\u95f4","field_module_list":"\u5217\u8868\u62bd\u53d6","field_module_json":"JSON\u63d0\u53d6","field_module_merge":"\u5b57\u6bb5\u7ec4\u5408","field_module_extract":"\u5b57\u6bb5\u63d0\u53d6","field_module_sign":"\u5185\u5bb9\u6807\u7b7e","process_module_html":"html\u6807\u7b7e\u8fc7\u6ee4","process_module_insert":"\u63d2\u5165\u5185\u5bb9","process_module_replace":"\u5185\u5bb9\u66ff\u6362","process_module_filter":"\u5173\u952e\u8bcd\u8fc7\u6ee4","process_module_if":"\u6761\u4ef6\u5224\u65ad","process_module_download":"\u672c\u5730\u5316","process_module_translate":"\u7ffb\u8bd1","process_module_tool":"\u5de5\u5177\u7bb1","process_module_batch":"\u6279\u91cf\u66ff\u6362","process_module_substr":"\u622a\u53d6\u5b57\u7b26\u4e32","process_module_func":"\u4f7f\u7528\u51fd\u6570","process_module_api":"\u8c03\u7528\u63a5\u53e3","p_m_if_1":"\u6ee1\u8db3\u6761\u4ef6\u91c7\u96c6","p_m_if_2":"\u6ee1\u8db3\u6761\u4ef6\u4e0d\u91c7\u96c6","p_m_if_3":"\u4e0d\u6ee1\u8db3\u6761\u4ef6\u91c7\u96c6","p_m_if_4":"\u4e0d\u6ee1\u8db3\u6761\u4ef6\u4e0d\u91c7\u96c6","p_m_if_c_has":"\u5305\u542b","p_m_if_c_nhas":"\u4e0d\u5305\u542b","p_m_if_c_eq":"\u7b49\u4e8e","p_m_if_c_neq":"\u4e0d\u7b49\u4e8e","p_m_if_c_heq":"\u6052\u7b49\u4e8e","p_m_if_c_nheq":"\u4e0d\u6052\u7b49\u4e8e","p_m_if_c_gt":"\u5927\u4e8e","p_m_if_c_egt":"\u5927\u4e8e\u7b49\u4e8e","p_m_if_c_lt":"\u5c0f\u4e8e","p_m_if_c_elt":"\u5c0f\u4e8e\u7b49\u4e8e","p_m_if_c_time_eq":"\u65f6\u95f4\u7b49\u4e8e","p_m_if_c_time_egt":"\u65f6\u95f4\u5927\u4e8e\u7b49\u4e8e","p_m_if_c_time_elt":"\u65f6\u95f4\u5c0f\u4e8e\u7b49\u4e8e","p_m_if_c_regexp":"\u6b63\u5219\u8868\u8fbe\u5f0f","p_m_if_c_func":"\u4f7f\u7528\u51fd\u6570","page_front_url":"\u524d\u7f6e\u9875","page_source_url":"\u8d77\u59cb\u9875","page_level_url":"\u591a\u7ea7\u9875","page_url":"\u5185\u5bb9\u9875","page_relation_url":"\u5173\u8054\u9875","render_wait_end":"\u7b49\u5f85\u9875\u9762\u5b8c\u5168\u6e32\u67d3","render_wait_time":"\u7b49\u5f85\u65f6\u95f4\uff08\u79d2\uff09","render_scroll_half":"\u6eda\u52a8\u5230\u4e2d\u95f4","render_scroll_end":"\u6eda\u52a8\u5230\u5e95\u90e8","render_scroll_top":"\u6eda\u52a8\u5230\u6307\u5b9a\u4f4d\u7f6e","render_val":"\u8d4b\u503c","render_click":"\u70b9\u51fb","rele_set":"\u53d1\u5e03\u8bbe\u7f6e","rele_error_detect_null":"\u6ca1\u6709\u68c0\u6d4b\u5230\u672c\u5730CMS\u7a0b\u5e8f\uff0c\u60a8\u53ef\u4ee5\u624b\u52a8\u7ed1\u5b9a\u6570\u636e","rele_error_empty_rele":"\u53d1\u5e03\u8bbe\u7f6e\u4e0d\u5b58\u5728","rele_error_null_module":"\u8bf7\u9009\u62e9\u53d1\u5e03\u65b9\u5f0f","rele_error_db":"\u6570\u636e\u5e93\u9519\u8bef\uff1a","rele_error_no_table":"\u8be5\u6570\u636e\u5e93\u6ca1\u6709\u8868","rele_success_db_ok":"\u6570\u636e\u5e93\u8fde\u63a5\u6210\u529f","rele_module":"\u53d1\u5e03\u65b9\u5f0f","rele_module_cms":"\u672c\u5730CMS\u7a0b\u5e8f","rele_module_db":"\u6570\u636e\u5e93","rele_module_api":"\u751f\u6210API","rele_module_toapi":"\u8c03\u7528\u63a5\u53e3","rele_module_file":"\u6587\u4ef6\u5b58\u50a8","rele_module_diy":"\u81ea\u5b9a\u4e49\u63d2\u4ef6","rele_m_name_cms":"CMS","rele_m_name_diy":"\u81ea\u5b9a\u4e49","rele_btn_detect":"\u5f00\u59cb\u68c0\u6d4b","rele_cms_path":"CMS\u8def\u5f84","rele_db_type":"\u6570\u636e\u5e93\u7c7b\u578b","rele_db_host":"\u6570\u636e\u5e93\u4e3b\u673a","rele_db_name":"\u6570\u636e\u5e93\u540d\u79f0","rele_db_charset":"\u6570\u636e\u5e93\u7f16\u7801","rele_db_port":"\u6570\u636e\u5e93\u7aef\u53e3","rele_db_user":"\u6570\u636e\u5e93\u7528\u6237","rele_db_pwd":"\u6570\u636e\u5e93\u5bc6\u7801","error_unknown_database":"\u672a\u77e5\u7684\u6570\u636e\u5e93","error_null_input":"\u8bf7\u8f93\u5165{:str}","error_open_basedir":"\u60a8\u7684\u7f51\u7ad9\u5f00\u542f\u4e86\u76ee\u5f55\u8bbf\u95ee\u9650\u5236(open_basedir)\uff0c\u8bf7\u68c0\u67e5\u662f\u5426\u56e0\u8be5\u95ee\u9898\u5bfc\u81f4\u76ee\u5f55\u65e0\u6cd5\u8bfb\u5199\uff01","collected":"\u5df2\u91c7\u96c6\u6570\u636e","collected_list":"\u5df2\u91c7\u96c6\u6570\u636e\u5217\u8868","COLLECTED_RELE_":"\u65e0","collected_rele_cms":"CMS","collected_rele_db":"\u6570\u636e\u5e93","collected_rele_file":"\u6587\u4ef6","collected_rele_toapi":"\u63a5\u53e3","collected_rele_api":"API","collected_rele_diy":"\u63d2\u4ef6","verifycode":"\u9a8c\u8bc1\u7801","verifycode_error":"\u9a8c\u8bc1\u7801\u9519\u8bef\uff01","find_password":"\u627e\u56de\u5bc6\u7801","find_pwd_username":"\u8bf7\u8f93\u5165\u90ae\u7bb1\/\u7528\u6237\u540d","find_pwd_yzm":"\u8bf7\u8f93\u5165\u6fc0\u6d3b\u7801","find_pwd_resend":"\u91cd\u65b0\u53d1\u9001","find_pwd_next_step":"\u4e0b\u4e00\u6b65","find_pwd_pwd":"\u8bf7\u8f93\u5165\u65b0\u5bc6\u7801","find_pwd_repwd":"\u786e\u8ba4\u65b0\u5bc6\u7801","find_pwd_sended":"\u5df2\u5411\u90ae\u7bb1{:email}\u53d1\u9001\u4e86\u6fc0\u6d3b\u7801\uff01","find_pwd_email_failed":"\u53d1\u9001\u90ae\u4ef6\u5931\u8d25\uff0c\u8bf7\u68c0\u67e5\u540e\u53f0\u53d1\u9001\u90ae\u4ef6\u914d\u7f6e\uff01","find_pwd_email_wait":"\u9700\u7b49\u5f85{:seconds}\u79d2\u624d\u80fd\u518d\u6b21\u53d1\u9001","find_pwd_email_subject":"\u627e\u56de\u5bc6\u7801 - \u84dd\u5929\u91c7\u96c6\u5668","find_pwd_email_body":"\u60a8\u7684\u6fc0\u6d3b\u7801\u4e3a\uff1a{:yzm}\uff0c\u6709\u6548\u65f6\u95f4{:minutes}\u5206\u949f","find_pwd_error_username":"\u8bf7\u8f93\u5165\u90ae\u7bb1\/\u7528\u6237\u540d","find_pwd_error_step":"\u6b65\u9aa4\u9519\u8bef\uff0c\u8bf7\u91cd\u65b0\u64cd\u4f5c\uff01","find_pwd_error_post":"\u8868\u5355\u63d0\u4ea4\u5931\u8d25","find_pwd_error_none_email":"\u90ae\u7bb1\u4e0d\u5b58\u5728\uff01","find_pwd_error_multiple_emails":"\u5b58\u5728\u591a\u4e2a\u7528\u6237\u4f7f\u7528\u6b64\u90ae\u7bb1\uff0c\u8bf7\u8f93\u5165\u7528\u6237\u540d\uff01","find_pwd_error_none_user":"\u7528\u6237\u4e0d\u5b58\u5728\uff01","find_pwd_success":"\u5bc6\u7801\u4fee\u6539\u6210\u529f","yzm_error_please_send":"\u8bf7\u53d1\u9001\u6fc0\u6d3b\u7801","yzm_error_please_input":"\u8bf7\u8f93\u5165\u6fc0\u6d3b\u7801","yzm_error_timeout":"\u6fc0\u6d3b\u7801\u5df2\u8fc7\u671f\uff01\u8bf7\u91cd\u65b0\u53d1\u9001","yzm_error_yzm":"\u6fc0\u6d3b\u7801\u9519\u8bef","admincp_style":"\u754c\u9762","admincp_sidebar_mini":"\u83dc\u5355\u6700\u5c0f\u5316","admincp_skins":"\u8bbe\u7f6e\u76ae\u80a4","skin_blue":"\u84dd","skin_black":"\u9ed1","skin_purple":"\u7d2b","skin_green":"\u7eff","skin_red":"\u7ea2","skin_yellow":"\u9ec4","skin_blue_light":"\u84dd\u4eae","skin_black_light":"\u9ed1\u4eae","skin_purple_light":"\u7d2b\u4eae","skin_green_light":"\u7eff\u4eae","skin_red_light":"\u7ea2\u4eae","skin_yellow_light":"\u9ec4\u4eae","store":"\u4e91\u5e73\u53f0","rule_collect":"\u91c7\u96c6\u89c4\u5219","empty_data":"\u6570\u636e\u4e0d\u5b58\u5728","invalid_op":"\u65e0\u6548\u7684\u64cd\u4f5c\uff01","submit":"\u63d0\u4ea4","search":"\u641c\u7d22","op_success":"\u64cd\u4f5c\u6210\u529f","op_failed":"\u64cd\u4f5c\u5931\u8d25","sort":"\u6392\u5e8f","select":"\u9009\u62e9","select_all":"\u5168\u9009","select_first":"\u8bf7\u9009\u62e9","save":"\u4fdd\u5b58","op":"\u64cd\u4f5c","delete":"\u5220\u9664","deleted":"\u5df2\u5220\u9664","edit":"\u7f16\u8f91","test":"\u6d4b\u8bd5","confirm_delete":"\u786e\u5b9a\u5220\u9664\uff1f","delete_success":"\u5220\u9664\u6210\u529f","none":"\u65e0","caiji":"\u91c7\u96c6","more":"\u66f4\u591a","yes":"\u662f","no":"\u5426","all":"\u5168\u90e8","login":"\u767b\u5f55","logout":"\u9000\u51fa","login_auto":"\u4e0b\u6b21\u81ea\u52a8\u767b\u5f55","separator":"\uff1a","redirecting":"\u8df3\u8f6c\u4e2d...","close":"\u5173\u95ed","tips_match":"\u793a\u4f8b\uff1a<div id="a">[\u5185\u5bb91]<\/div>(*)<div id="b">[\u5185\u5bb92]<\/div>","tips_matchn":"\u793a\u4f8b\uff1a[\u5185\u5bb91] [\u5185\u5bb92]","tips_match_only":"\u793a\u4f8b\uff1a<div id="content">[\u5185\u5bb9]<\/div>","tips_match_area":"\u793a\u4f8b\uff1a<div id="a">[\u5185\u5bb9123]<\/div>(*)<div id="b">[\u5185\u5bb9abc]<\/div>","tips_matchn_area":"\u793a\u4f8b\uff1a[\u5185\u5bb9123] [\u5185\u5bb9abc]","tips_match_url":"\u793a\u4f8b\uff1a<a href="http:\/\/demo.com\/[\u5185\u5bb9123]\/[\u5185\u5bb9abc]">(*)<\/a>","tips_matchn_url":"\u793a\u4f8b\uff1ahttp:\/\/www.demo.com\/[\u5185\u5bb9123]-[\u5185\u5bb9abc].html","release_upgrade":"\u63d2\u4ef6\u7248\u672c\u8fc7\u4f4e\uff0c\u8bf7\u5347\u7ea7\u63d2\u4ef6 \u5347\u7ea7\u6559\u7a0b<\/a>"};
\ No newline at end of file
+var tpl_lang={"appname":"\u84dd\u5929\u91c7\u96c6\u5668","user_error_username":"\u7528\u6237\u540d\u5fc5\u987b\u75313-15\u4e2a\u5b57\u7b26\u7ec4\u6210\uff01","user_error_password":"\u5bc6\u7801\u5fc5\u987b\u75316-30\u4f4d\u5b57\u6bcd\u3001\u6570\u5b57\u6216\u7279\u6b8a\u5b57\u7b26\u7ec4\u6210\uff01","user_error_repassword":"\u786e\u8ba4\u5bc6\u7801\u548c\u5bc6\u7801\u4e0d\u4e00\u81f4\uff01","user_error_email":"\u90ae\u7bb1\u683c\u5f0f\u9519\u8bef\uff01","admincp":"\u540e\u53f0","sign_wildcard":"(*)","sign_match":"[\u5185\u5bb9{:id}]","tips_sign_wildcard":"\u901a\u914d\u7b26\u53ef\u5339\u914d\u4efb\u610f\u5b57\u7b26","tips_sign_match":"\u5339\u914d\u4efb\u610f\u5b57\u7b26\u5e76\u4fdd\u5b58\u4e3a\u6807\u7b7e\u4ee5\u4f9b\u8c03\u7528\uff0c\u7b49\u540c\u4e8e\u6355\u83b7\u7ec4\uff1a(?<nr\u6807\u8bc6>.*?)","tips_sign_match_global":"\u5339\u914d\u4efb\u610f\u5b57\u7b26\u5e76\u4fdd\u5b58\u4e3a\u6807\u7b7e\u4ee5\u4f9b\u5168\u5c40\u8c03\u7528\uff0c\u7b49\u540c\u4e8e\u6355\u83b7\u7ec4\uff1a(?<nr\u6807\u8bc6>.*?)","tips_sign_group":"\u6355\u83b7\u7ec4\uff1a(?<nr\u6807\u8bc6>[\\s\\S]*?)\uff0c\u5339\u914d\u6b63\u5219\u5e76\u4fdd\u5b58\u4e3a[\u5185\u5bb9]\u6807\u7b7e\u4ee5\u4f9b\u8c03\u7528","tips_sign_group_global":"\u6355\u83b7\u7ec4\uff1a(?<nr\u6807\u8bc6>[\\s\\S]*?)\uff0c\u5339\u914d\u6b63\u5219\u5e76\u4fdd\u5b58\u4e3a[\u5185\u5bb9]\u6807\u7b7e\u4ee5\u4f9b\u5168\u5c40\u8c03\u7528","tips_regular":"\u53ef\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f","tips_export_ipt_pwd":"\u52a0\u5bc6\u6587\u4ef6\u5e76\u4e14\u5bfc\u5165\u65f6\u9700\u8981\u8f93\u5165\u8be5\u5bc6\u7801\uff08\u8bf7\u7262\u8bb0\u5bc6\u7801\u5426\u5219\u65e0\u6cd5\u89e3\u5bc6\uff09\uff0c\u9ed8\u8ba4\u65e0\u5bc6\u7801\u4e0d\u52a0\u5bc6","setting":"\u8bbe\u7f6e","setting_site":"\u7ad9\u70b9\u8bbe\u7f6e","set_site_verifycode":"\u5f00\u542f\u56fe\u7247\u9a8c\u8bc1\u7801","setting_caiji":"\u91c7\u96c6\u8bbe\u7f6e","set_caiji_auto":"\u5f00\u542f\u81ea\u52a8\u91c7\u96c6","set_caiji_run":"\u81ea\u52a8\u91c7\u96c6\u8fd0\u884c\u65b9\u5f0f","set_caiji_interval":"\u91c7\u96c6\u8fd0\u884c\u95f4\u9694","set_caiji_num":"\u6700\u5927\u91c7\u96c6\u6570\u91cf","set_caiji_timeout":"\u6700\u5927\u6267\u884c\u65f6\u95f4","setting_email":"\u90ae\u4ef6\u8bbe\u7f6e","set_email_sender":"\u53d1\u4ef6\u4eba\u540d\u79f0","set_email_email":"\u53d1\u4ef6\u4eba\u90ae\u7bb1\u8d26\u53f7","set_email_pwd":"\u53d1\u4ef6\u4eba\u90ae\u7bb1\u5bc6\u7801","set_email_smtp":"SMTP\u670d\u52a1\u5668","set_email_port":"SMTP\u7aef\u53e3","set_email_port_tips":"TLS\u4e00\u822c\u4e3a25\uff0cSSL\u4e00\u822c\u4e3a465\uff0c\u54a8\u8be2\u90ae\u7bb1\u670d\u52a1\u5546\u83b7\u53d6","set_email_type":"SMTP\u7aef\u53e3\u7c7b\u578b","set_email_test_subject":"\u6d4b\u8bd5\u53d1\u9001\u90ae\u4ef6","set_email_test_body":"\u606d\u559c\uff0c\u53d1\u9001\u90ae\u4ef6\u6210\u529f\uff01","setting_store":"\u4e91\u7aef\u8bbe\u7f6e","store_authkey_error":"\u901a\u4fe1\u5bc6\u94a5\u53ea\u80fd\u7531\u5b57\u6bcd\u548c\u6570\u5b57\u7ec4\u6210\u4e14\u957f\u5ea6\u57286-100\u4f4d\u4e4b\u95f4","down_file_name_":"\u6309\u65f6\u95f4\u751f\u6210\uff08\u65b9\u4fbf\u65e5\u671f\u5f52\u7c7b\uff09","down_file_name_time":"\u6309\u65f6\u95f4\u751f\u6210\uff08\u65b9\u4fbf\u65e5\u671f\u5f52\u7c7b\uff09","down_file_name_url":"\u6309\u7f51\u5740\u751f\u6210\uff08\u9632\u6b62\u91cd\u590d\u4e0b\u8f7d\uff09","down_file_name_custom":"\u81ea\u5b9a\u4e49","down_file_name_custom_name_":"\u6587\u4ef6\u7f51\u5740MD5\u7801","down_img_name_custom_name_":"\u56fe\u7247\u7f51\u5740MD5\u7801","config_error_none_email":"\u6ca1\u6709\u90ae\u7bb1\u670d\u52a1\u5668\u914d\u7f6e\uff0c\u8bf7\u5728\u540e\u53f0\u8bbe\u7f6e\uff01","user":"\u7528\u6237","user_list":"\u7528\u6237\u5217\u8868","user_add":"\u6dfb\u52a0\u7528\u6237","user_edit":"\u7f16\u8f91\u7528\u6237","user_username":"\u7528\u6237\u540d","user_password":"\u5bc6\u7801","user_repassword":"\u786e\u8ba4\u5bc6\u7801","user_newpwd_tips":"\u5982\u9700\u4fee\u6539\u5bc6\u7801\uff0c\u8bf7\u5728\u6b64\u8f93\u5165\u65b0\u5bc6\u7801\uff0c\u5426\u5219\u7559\u7a7a","user_email":"\u90ae\u7bb1","user_email_tips":"\u7528\u4e8e\u627e\u56de\u8d26\u53f7\u5bc6\u7801","user_groupid":"\u7528\u6237\u7ec4","user_error_has_username":"\u7528\u6237\u540d\u5df2\u7ecf\u5b58\u5728\uff01","user_error_edit_not_allow":"\u53ea\u6709\u521b\u59cb\u4eba\u624d\u80fd\u7f16\u8f91\u4ed6\u4eba\u7684\u8d26\u53f7\uff01","user_error_delete_not_allow":"\u53ea\u6709\u521b\u59cb\u4eba\u624d\u80fd\u5220\u9664\u8d26\u53f7\uff01","user_error_groupid":"\u4e0d\u662f\u5141\u8bb8\u7684\u7528\u6237\u7ec4\uff01","user_error_del_founder":"\u4e0d\u80fd\u5220\u9664\u521b\u59cb\u4eba\u8d26\u53f7\uff01","user_error_null_uid":"UID\u4e0d\u80fd\u4e3a\u7a7a","user_error_empty_user":"\u7528\u6237\u4e0d\u5b58\u5728","user_error_login":"\u7528\u6237\u540d\u6216\u5bc6\u7801\u4e0d\u6b63\u786e\uff01","user_error_sublogin":"\u767b\u5f55\u63d0\u4ea4\u5931\u8d25","user_error_is_not_admin":"\u62b1\u6b49\uff0c\u8bf7\u767b\u5f55\u7ba1\u7406\u5458\u8d26\u53f7\uff01","user_login_in":"\u767b\u5f55\u4e2d...","user_auto_login":"\u6b63\u5728\u81ea\u52a8\u767b\u5f55...","usertoken_error":"\u7528\u6237token\u9519\u8bef\uff0c\u8bf7\u5237\u65b0\u9875\u9762\u6216\u91cd\u65b0\u767b\u5f55\uff01","task":"\u4efb\u52a1","task_add":"\u6dfb\u52a0\u4efb\u52a1","task_edit":"\u7f16\u8f91\u4efb\u52a1","task_list":"\u4efb\u52a1\u5217\u8868","task_change_list":"\u5217\u8868\u6a21\u5f0f","task_change_folder":"\u5206\u7ec4\u6a21\u5f0f","task_name":"\u4efb\u52a1\u540d\u79f0","task_tg":"\u4efb\u52a1\u5206\u7ec4","task_sort":"\u6392\u5e8f","task_sort_help":"\u6570\u5b57\u8d8a\u5927\u8d8a\u9760\u524d","task_module":"\u91c7\u96c6\u6a21\u5757","task_module_":"\u65e0","task_module_pattern":"\u89c4\u5219\u91c7\u96c6","task_module_keyword":"\u5173\u952e\u8bcd\u91c7\u96c6","task_module_weixin":"\u5fae\u4fe1\u91c7\u96c6","task_auto":"\u81ea\u52a8\u91c7\u96c6","task_auto_":"\u5426","task_auto_0":"\u5426","task_auto_1":"\u5faa\u73af","task_auto_2":"\u5b9a\u65f6","task_addtime":"\u6dfb\u52a0\u65f6\u95f4","task_caijitime":"\u91c7\u96c6\u65f6\u95f4","task_collected":"\u91c7\u96c6\u91cf","task_edit_collector":"\u4e0b\u4e00\u6b65\uff1a\u7f16\u8f91\u91c7\u96c6\u5668","task_root":"\u6839\u76ee\u5f55","task_loading":"\u6b63\u5728\u8f7d\u5165\u6570\u636e","task_none_data":"\u65e0\u6570\u636e","task_set_task":"\u4efb\u52a1\u8bbe\u7f6e","task_set_collector":"\u91c7\u96c6\u5668\u8bbe\u7f6e","task_set_release":"\u53d1\u5e03\u8bbe\u7f6e","task_error_null_id":"\u8bf7\u8f93\u5165\u4efb\u52a1id","task_error_empty_task":"\u4e0d\u5b58\u5728\u4efb\u52a1","task_error_null_tgid":"\u8bf7\u8f93\u5165\u5206\u7ec4id","task_error_empty_tg":"\u4e0d\u5b58\u5728\u5206\u7ec4","task_error_null_name":"\u8bf7\u8f93\u5165\u540d\u79f0\uff01","task_error_has_name":"\u540d\u79f0\u5df2\u7ecf\u5b58\u5728\uff01","task_error_null_module":"\u672a\u8bbe\u7f6e\u91c7\u96c6\u6a21\u5757","taskgroup_add":"\u6dfb\u52a0\u5206\u7ec4","taskgroup_edit":"\u7f16\u8f91\u5206\u7ec4","taskgroup":"\u4efb\u52a1\u5206\u7ec4","taskgroup_list":"\u4efb\u52a1\u5206\u7ec4\u5217\u8868","taskgroup_name":"\u5206\u7ec4\u540d\u79f0","taskgroup_sort":"\u6392\u5e8f","taskgroup_sort_help":"\u6570\u5b57\u8d8a\u5927\u8d8a\u9760\u524d","taskgroup_parent_id":"\u7236\u5206\u7ec4","tg_add_sub":"\u6dfb\u52a0\u5b50\u5206\u7ec4","tg_move":"\u79fb\u52a8\u5206\u7ec4","tg_exist_sub":"\u5b58\u5728\u5b50\u5206\u7ec4\uff01","tg_none":"\u5206\u7ec4\u4e0d\u5b58\u5728\uff01","tg_is_parent":"\u5b58\u5728\u5b50\u5206\u7ec4\uff0c\u8bf7\u5148\u6e05\u7a7a\u5b50\u5206\u7ec4\uff0c\u624d\u80fd\u79fb\u52a8\u5206\u7ec4\uff01","tg_deleteall_has_sub":"\u6709\u5b50\u5206\u7ec4\u7684\u4e0d\u80fd\u5220\u9664\uff0c\u9700\u5148\u6e05\u7a7a\u5b50\u5206\u7ec4\uff01","tg_no_checked":"\u6ca1\u6709\u9009\u4e2d\u7684\u8bb0\u5f55\uff01","tg_error_null_name":"\u8bf7\u8f93\u5165\u540d\u79f0\uff01","tg_error_has_name":"\u540d\u79f0\u5df2\u7ecf\u5b58\u5728\uff01","coll_set":"\u91c7\u96c6\u5668\u8bbe\u7f6e","coll_edit_task":"\u4e0a\u4e00\u6b65\uff1a\u7f16\u8f91\u4efb\u52a1","coll_name":"\u91c7\u96c6\u89c4\u5219\u540d\u79f0","coll_error_invalid_module":"\u65e0\u6548\u7684\u91c7\u96c6\u6a21\u5757","coll_error_empty_coll":"\u91c7\u96c6\u5668\u8bbe\u7f6e\u4e0d\u5b58\u5728","coll_error_empty_effective":"\u9875\u9762\u811a\u672c\u4e0d\u53ef\u7528\uff0c\u4fdd\u5b58\u5931\u8d25\uff01","field_module_rule":"\u89c4\u5219\u5339\u914d","field_module_auto":"\u81ea\u52a8\u83b7\u53d6","field_module_xpath":"XPath\u5339\u914d","field_module_words":"\u56fa\u5b9a\u6587\u5b57","field_module_num":"\u968f\u673a\u6570\u5b57","field_module_time":"\u65f6\u95f4","field_module_list":"\u5217\u8868\u62bd\u53d6","field_module_json":"JSON\u63d0\u53d6","field_module_merge":"\u5b57\u6bb5\u7ec4\u5408","field_module_extract":"\u5b57\u6bb5\u63d0\u53d6","field_module_sign":"\u5185\u5bb9\u6807\u7b7e","process_module_html":"html\u6807\u7b7e\u8fc7\u6ee4","process_module_insert":"\u63d2\u5165\u5185\u5bb9","process_module_replace":"\u5185\u5bb9\u66ff\u6362","process_module_filter":"\u5173\u952e\u8bcd\u8fc7\u6ee4","process_module_if":"\u6761\u4ef6\u5224\u65ad","process_module_download":"\u672c\u5730\u5316","process_module_translate":"\u7ffb\u8bd1","process_module_tool":"\u5de5\u5177\u7bb1","process_module_batch":"\u6279\u91cf\u66ff\u6362","process_module_substr":"\u622a\u53d6\u5b57\u7b26\u4e32","process_module_func":"\u4f7f\u7528\u51fd\u6570","process_module_api":"\u8c03\u7528\u63a5\u53e3","p_m_if_1":"\u6ee1\u8db3\u6761\u4ef6\u91c7\u96c6","p_m_if_2":"\u6ee1\u8db3\u6761\u4ef6\u4e0d\u91c7\u96c6","p_m_if_3":"\u4e0d\u6ee1\u8db3\u6761\u4ef6\u91c7\u96c6","p_m_if_4":"\u4e0d\u6ee1\u8db3\u6761\u4ef6\u4e0d\u91c7\u96c6","p_m_if_c_has":"\u5305\u542b","p_m_if_c_nhas":"\u4e0d\u5305\u542b","p_m_if_c_eq":"\u7b49\u4e8e","p_m_if_c_neq":"\u4e0d\u7b49\u4e8e","p_m_if_c_heq":"\u6052\u7b49\u4e8e","p_m_if_c_nheq":"\u4e0d\u6052\u7b49\u4e8e","p_m_if_c_gt":"\u5927\u4e8e","p_m_if_c_egt":"\u5927\u4e8e\u7b49\u4e8e","p_m_if_c_lt":"\u5c0f\u4e8e","p_m_if_c_elt":"\u5c0f\u4e8e\u7b49\u4e8e","p_m_if_c_time_eq":"\u65f6\u95f4\u7b49\u4e8e","p_m_if_c_time_egt":"\u65f6\u95f4\u5927\u4e8e\u7b49\u4e8e","p_m_if_c_time_elt":"\u65f6\u95f4\u5c0f\u4e8e\u7b49\u4e8e","p_m_if_c_regexp":"\u6b63\u5219\u8868\u8fbe\u5f0f","p_m_if_c_func":"\u4f7f\u7528\u51fd\u6570","page_front_url":"\u524d\u7f6e\u9875","page_source_url":"\u8d77\u59cb\u9875","page_level_url":"\u591a\u7ea7\u9875","page_url":"\u5185\u5bb9\u9875","page_relation_url":"\u5173\u8054\u9875","render_wait_end":"\u7b49\u5f85\u9875\u9762\u5b8c\u5168\u6e32\u67d3","render_wait_time":"\u7b49\u5f85\u65f6\u95f4\uff08\u79d2\uff09","render_scroll_half":"\u6eda\u52a8\u5230\u4e2d\u95f4","render_scroll_end":"\u6eda\u52a8\u5230\u5e95\u90e8","render_scroll_top":"\u6eda\u52a8\u5230\u6307\u5b9a\u4f4d\u7f6e","render_val":"\u8d4b\u503c","render_click":"\u70b9\u51fb","rele_set":"\u53d1\u5e03\u8bbe\u7f6e","rele_error_detect_null":"\u6ca1\u6709\u68c0\u6d4b\u5230\u672c\u5730CMS\u7a0b\u5e8f\uff0c\u60a8\u53ef\u4ee5\u624b\u52a8\u7ed1\u5b9a\u6570\u636e","rele_error_empty_rele":"\u53d1\u5e03\u8bbe\u7f6e\u4e0d\u5b58\u5728","rele_error_null_module":"\u8bf7\u9009\u62e9\u53d1\u5e03\u65b9\u5f0f","rele_error_db":"\u6570\u636e\u5e93\u9519\u8bef\uff1a","rele_error_no_table":"\u8be5\u6570\u636e\u5e93\u6ca1\u6709\u8868","rele_success_db_ok":"\u6570\u636e\u5e93\u8fde\u63a5\u6210\u529f","rele_module":"\u53d1\u5e03\u65b9\u5f0f","rele_module_dataset":"\u6570\u636e\u96c6","rele_module_cms":"\u672c\u5730CMS\u7a0b\u5e8f","rele_module_db":"\u6570\u636e\u5e93","rele_module_api":"\u751f\u6210API","rele_module_toapi":"\u8c03\u7528\u63a5\u53e3","rele_module_file":"\u6587\u4ef6\u5b58\u50a8","rele_module_diy":"\u81ea\u5b9a\u4e49\u63d2\u4ef6","rele_m_name_cms":"CMS","rele_m_name_diy":"\u81ea\u5b9a\u4e49","rele_btn_detect":"\u5f00\u59cb\u68c0\u6d4b","rele_cms_path":"CMS\u8def\u5f84","rele_db_type":"\u6570\u636e\u5e93\u7c7b\u578b","rele_db_host":"\u6570\u636e\u5e93\u4e3b\u673a","rele_db_name":"\u6570\u636e\u5e93\u540d\u79f0","rele_db_charset":"\u6570\u636e\u5e93\u7f16\u7801","rele_db_port":"\u6570\u636e\u5e93\u7aef\u53e3","rele_db_user":"\u6570\u636e\u5e93\u7528\u6237","rele_db_pwd":"\u6570\u636e\u5e93\u5bc6\u7801","error_unknown_database":"\u672a\u77e5\u7684\u6570\u636e\u5e93","error_null_input":"\u8bf7\u8f93\u5165{:str}","error_open_basedir":"\u60a8\u7684\u7f51\u7ad9\u5f00\u542f\u4e86\u76ee\u5f55\u8bbf\u95ee\u9650\u5236(open_basedir)\uff0c\u8bf7\u68c0\u67e5\u662f\u5426\u56e0\u8be5\u95ee\u9898\u5bfc\u81f4\u76ee\u5f55\u65e0\u6cd5\u8bfb\u5199\uff01","collected":"\u5df2\u91c7\u96c6\u6570\u636e","collected_list":"\u5df2\u91c7\u96c6\u6570\u636e\u5217\u8868","COLLECTED_RELE_":"\u65e0","collected_rele_dataset":"\u6570\u636e\u96c6","collected_rele_cms":"CMS","collected_rele_db":"\u6570\u636e\u5e93","collected_rele_file":"\u6587\u4ef6","collected_rele_toapi":"\u63a5\u53e3","collected_rele_api":"API","collected_rele_diy":"\u63d2\u4ef6","verifycode":"\u9a8c\u8bc1\u7801","verifycode_error":"\u9a8c\u8bc1\u7801\u9519\u8bef\uff01","find_password":"\u627e\u56de\u5bc6\u7801","find_pwd_username":"\u8bf7\u8f93\u5165\u90ae\u7bb1\/\u7528\u6237\u540d","find_pwd_yzm":"\u8bf7\u8f93\u5165\u6fc0\u6d3b\u7801","find_pwd_resend":"\u91cd\u65b0\u53d1\u9001","find_pwd_next_step":"\u4e0b\u4e00\u6b65","find_pwd_pwd":"\u8bf7\u8f93\u5165\u65b0\u5bc6\u7801","find_pwd_repwd":"\u786e\u8ba4\u65b0\u5bc6\u7801","find_pwd_sended":"\u5df2\u5411\u90ae\u7bb1{:email}\u53d1\u9001\u4e86\u6fc0\u6d3b\u7801\uff01","find_pwd_email_failed":"\u53d1\u9001\u90ae\u4ef6\u5931\u8d25\uff0c\u8bf7\u68c0\u67e5\u540e\u53f0\u53d1\u9001\u90ae\u4ef6\u914d\u7f6e\uff01","find_pwd_email_wait":"\u9700\u7b49\u5f85{:seconds}\u79d2\u624d\u80fd\u518d\u6b21\u53d1\u9001","find_pwd_email_subject":"\u627e\u56de\u5bc6\u7801 - \u84dd\u5929\u91c7\u96c6\u5668","find_pwd_email_body":"\u60a8\u7684\u6fc0\u6d3b\u7801\u4e3a\uff1a{:yzm}\uff0c\u6709\u6548\u65f6\u95f4{:minutes}\u5206\u949f","find_pwd_error_username":"\u8bf7\u8f93\u5165\u90ae\u7bb1\/\u7528\u6237\u540d","find_pwd_error_step":"\u6b65\u9aa4\u9519\u8bef\uff0c\u8bf7\u91cd\u65b0\u64cd\u4f5c\uff01","find_pwd_error_post":"\u8868\u5355\u63d0\u4ea4\u5931\u8d25","find_pwd_error_none_email":"\u90ae\u7bb1\u4e0d\u5b58\u5728\uff01","find_pwd_error_multiple_emails":"\u5b58\u5728\u591a\u4e2a\u7528\u6237\u4f7f\u7528\u6b64\u90ae\u7bb1\uff0c\u8bf7\u8f93\u5165\u7528\u6237\u540d\uff01","find_pwd_error_none_user":"\u7528\u6237\u4e0d\u5b58\u5728\uff01","find_pwd_success":"\u5bc6\u7801\u4fee\u6539\u6210\u529f","yzm_error_please_send":"\u8bf7\u53d1\u9001\u6fc0\u6d3b\u7801","yzm_error_please_input":"\u8bf7\u8f93\u5165\u6fc0\u6d3b\u7801","yzm_error_timeout":"\u6fc0\u6d3b\u7801\u5df2\u8fc7\u671f\uff01\u8bf7\u91cd\u65b0\u53d1\u9001","yzm_error_yzm":"\u6fc0\u6d3b\u7801\u9519\u8bef","admincp_style":"\u754c\u9762","admincp_sidebar_mini":"\u83dc\u5355\u6700\u5c0f\u5316","admincp_skins":"\u8bbe\u7f6e\u76ae\u80a4","skin_blue":"\u84dd","skin_black":"\u9ed1","skin_purple":"\u7d2b","skin_green":"\u7eff","skin_red":"\u7ea2","skin_yellow":"\u9ec4","skin_blue_light":"\u84dd\u4eae","skin_black_light":"\u9ed1\u4eae","skin_purple_light":"\u7d2b\u4eae","skin_green_light":"\u7eff\u4eae","skin_red_light":"\u7ea2\u4eae","skin_yellow_light":"\u9ec4\u4eae","store":"\u4e91\u5e73\u53f0","rule_collect":"\u91c7\u96c6\u89c4\u5219","empty_data":"\u6570\u636e\u4e0d\u5b58\u5728","invalid_op":"\u65e0\u6548\u7684\u64cd\u4f5c\uff01","submit":"\u63d0\u4ea4","search":"\u641c\u7d22","op_success":"\u64cd\u4f5c\u6210\u529f","op_failed":"\u64cd\u4f5c\u5931\u8d25","sort":"\u6392\u5e8f","select":"\u9009\u62e9","select_all":"\u5168\u9009","select_first":"\u8bf7\u9009\u62e9","save":"\u4fdd\u5b58","op":"\u64cd\u4f5c","delete":"\u5220\u9664","deleted":"\u5df2\u5220\u9664","edit":"\u7f16\u8f91","test":"\u6d4b\u8bd5","confirm_delete":"\u786e\u5b9a\u5220\u9664\uff1f","delete_success":"\u5220\u9664\u6210\u529f","none":"\u65e0","caiji":"\u91c7\u96c6","more":"\u66f4\u591a","yes":"\u662f","no":"\u5426","all":"\u5168\u90e8","login":"\u767b\u5f55","logout":"\u9000\u51fa","login_auto":"\u4e0b\u6b21\u81ea\u52a8\u767b\u5f55","separator":"\uff1a","redirecting":"\u8df3\u8f6c\u4e2d...","close":"\u5173\u95ed","tips_match":"\u793a\u4f8b\uff1a<div id="a">[\u5185\u5bb91]<\/div>(*)<div id="b">[\u5185\u5bb92]<\/div>","tips_matchn":"\u793a\u4f8b\uff1a[\u5185\u5bb91] [\u5185\u5bb92]","tips_match_only":"\u793a\u4f8b\uff1a<div id="content">[\u5185\u5bb9]<\/div>","tips_match_area":"\u793a\u4f8b\uff1a<div id="a">[\u5185\u5bb9123]<\/div>(*)<div id="b">[\u5185\u5bb9abc]<\/div>","tips_matchn_area":"\u793a\u4f8b\uff1a[\u5185\u5bb9123] [\u5185\u5bb9abc]","tips_match_url":"\u793a\u4f8b\uff1a<a href="http:\/\/demo.com\/[\u5185\u5bb9123]\/[\u5185\u5bb9abc]">(*)<\/a>","tips_matchn_url":"\u793a\u4f8b\uff1ahttp:\/\/www.demo.com\/[\u5185\u5bb9123]-[\u5185\u5bb9abc].html","ds_f_type_bigint":"\u6570\u5b57","ds_f_type_double":"\u5c0f\u6570","ds_f_type_varchar":"\u5b57\u7b26\u4e32","ds_f_type_mediumtext":"\u6587\u672c","ds_f_type_datetime":"\u65f6\u95f4","ds_ix_type_index":"\u666e\u901a\u7d22\u5f15","ds_ix_type_unique":"\u552f\u4e00\u7d22\u5f15","ds_ix_type_fulltext":"\u5168\u6587\u7d22\u5f15","release_upgrade":"\u63d2\u4ef6\u7248\u672c\u8fc7\u4f4e\uff0c\u8bf7\u5347\u7ea7\u63d2\u4ef6 \u5347\u7ea7\u6559\u7a0b<\/a>"};
\ No newline at end of file
diff --git a/vendor/skycaiji/app/admin/controller/Api.php b/vendor/skycaiji/app/admin/controller/Api.php
index 4d7b5c6..e7bb245 100644
--- a/vendor/skycaiji/app/admin/controller/Api.php
+++ b/vendor/skycaiji/app/admin/controller/Api.php
@@ -46,8 +46,9 @@ class Api extends CollectController{
if(!$keyIsOk){
if($keyIsUrl){
json(array('error'=>'密钥错误'))->send();
+ exit();
}else{
- $this->_json('密钥错误');
+ $this->jsonSend('密钥错误');
}
}
\util\Param::set_task_api_response();
@@ -74,32 +75,32 @@ class Api extends CollectController{
$mrele=model('Release');
$taskData=$mtask->getById($taskId);
if(empty($taskData)){
- $this->_json(lang('task_error_empty_task'));
+ $this->jsonSend(lang('task_error_empty_task'));
}
$singleConfig=$taskData['config']['single'];
init_array($singleConfig);
if(empty($singleConfig['open'])){
- $this->_json('未开启单页采集模式');
+ $this->jsonSend('未开启单页采集模式');
}
if($singleConfig['key']){
if($key!=md5($singleConfig['key'])){
- $this->_json('接口密钥错误');
+ $this->jsonSend('接口密钥错误');
}
}
$taskTips='任务:'.$taskData['name'].' » ';
if(empty($taskData['module'])){
- $this->_json($taskTips.lang('task_error_null_module'));
+ $this->jsonSend($taskTips.lang('task_error_null_module'));
}
if(!in_array($taskData['module'],config('allow_coll_modules'))){
- $this->_json($taskTips.lang('coll_error_invalid_module'));
+ $this->jsonSend($taskTips.lang('coll_error_invalid_module'));
}
$collData=$mcoll->where(array('task_id'=>$taskData['id'],'module'=>$taskData['module']))->find();
if(empty($collData)){
- $this->_json($taskTips.lang('coll_error_empty_coll'));
+ $this->jsonSend($taskTips.lang('coll_error_empty_coll'));
}
$collData=$collData->toArray();
$mtask->loadConfig($taskData);
@@ -128,9 +129,9 @@ class Api extends CollectController{
if(empty($fieldData['data'])){
$msg=g_sc('collect_echo_msg_txt');
$msg=strip_tags($msg);
- $this->_json($msg);
+ $this->jsonSend($msg);
}else{
- $this->_json('',1,$fieldData['data']);
+ $this->jsonSend('',$fieldData['data'],1);
}
}
@@ -274,13 +275,6 @@ class Api extends CollectController{
}
$updateResult['code']=1;
}
-
return json($updateResult);
}
-
- private function _json($msg='',$code=0,$data=array()){
- init_array($data);
- $result=array('code'=>$code,'msg'=>$msg,'data'=>$data);
- json($result)->send();
- }
}
\ No newline at end of file
diff --git a/vendor/skycaiji/app/admin/controller/Backstage.php b/vendor/skycaiji/app/admin/controller/Backstage.php
index c322a3c..6d64b87 100644
--- a/vendor/skycaiji/app/admin/controller/Backstage.php
+++ b/vendor/skycaiji/app/admin/controller/Backstage.php
@@ -250,10 +250,10 @@ class Backstage extends BaseController{
$mcollected=model('Collected');
$todayTime=strtotime(date('Y-m-d',time()));
- $tongji['today_success']=$mcollected->where(array('addtime'=>array('GT',$todayTime),'target'=>array('<>','')))->count();
- $tongji['today_error']=$mcollected->where(array('addtime'=>array('GT',$todayTime),'error'=>array('<>','')))->count();
- $tongji['total_success']=$mcollected->where("`target` <> ''")->count();
- $tongji['total_error']=$mcollected->where("`error` <> ''")->count();
+ $tongji['today_success']=$mcollected->where(array('addtime'=>array('GT',$todayTime),'status'=>1))->count();
+ $tongji['today_error']=$mcollected->where(array('addtime'=>array('GT',$todayTime),'status'=>0))->count();
+ $tongji['total_success']=$mcollected->where('status',1)->count();
+ $tongji['total_error']=$mcollected->where('status',0)->count();
$cacheTongji=array('time'=>time(),'data'=>$tongji);
cache('admin_check_up_tongji',$cacheTongji);
}else{
@@ -483,6 +483,7 @@ class Backstage extends BaseController{
$list=model('Collected')->where($cond)->order('addtime desc')->paginate(10,false,paginate_auto_config());
$pagenav=$list->render();
$list=$list->all();
+ $list=model('Collected')->getInfoDatas($list);
$this->assign('list',$list);
$this->assign('pagenav',$pagenav);
@@ -577,7 +578,7 @@ class Backstage extends BaseController{
$mconfig=model('Config');
$config=$mconfig->getConfig('admincp','data');
init_array($config);
- if($op=='mini'||$op=='narrow'){
+ if($op=='mini'||$op=='narrow'||$op=='check_skip'){
$config[$op]=intval($val);
}elseif($op=='skin'){
if(preg_match('/^[\w\-\_]+$/', $val)){
@@ -585,7 +586,7 @@ class Backstage extends BaseController{
}
}
- $allowConfig=array('skin'=>'','mini'=>'','narrow'=>'');
+ $allowConfig=array('skin'=>'','mini'=>'','narrow'=>'','check_skip'=>'');
foreach ($allowConfig as $k=>$v){
$allowConfig[$k]=isset($config[$k])?$config[$k]:'';
}
diff --git a/vendor/skycaiji/app/admin/controller/CollectController.php b/vendor/skycaiji/app/admin/controller/CollectController.php
index 971bd53..20d3cc0 100644
--- a/vendor/skycaiji/app/admin/controller/CollectController.php
+++ b/vendor/skycaiji/app/admin/controller/CollectController.php
@@ -227,11 +227,14 @@ class CollectController extends \skycaiji\admin\controller\BaseController{
set_g_sc(['c','caiji','real_time'],0);
- $cacheApiData=$arele->get_cache_fields();
- if($cacheApiData!==false){
-
+ if(\util\Param::is_task_api_response()){
- $arele->json_exit($cacheApiData);
+ $cacheApiData=$arele->get_cache_fields();
+ if($cacheApiData!==false){
+
+
+ $arele->json_exit($cacheApiData);
+ }
}
}
}
@@ -360,7 +363,7 @@ class CollectController extends \skycaiji\admin\controller\BaseController{
if(!is_empty(g_sc('api_task_key_is_url'))){
json(array('error'=>$msg))->send();
}else{
- json(array('code'=>0,'msg'=>$msg,'data'=>[]))->send();
+ $this->jsonSend($msg);
}
}
}else{
diff --git a/vendor/skycaiji/app/admin/controller/Collected.php b/vendor/skycaiji/app/admin/controller/Collected.php
index 0da7761..39a8eba 100644
--- a/vendor/skycaiji/app/admin/controller/Collected.php
+++ b/vendor/skycaiji/app/admin/controller/Collected.php
@@ -76,27 +76,37 @@ class Collected extends BaseController {
$cond['release']=$search['release'];
}
$search['status']=input('status');
- if(!empty($search['status'])){
- if($search['status']==1){
-
- $cond['target']=array('<>','');
- }elseif($search['status']==2){
-
- $cond['error']=array('<>','');
- }
+ if(!is_empty($search['status'],true)){
+ $cond['status']=intval($search['status']);
}
$dataList=array();
$taskList=array();
if(!$null_task){
- $count=$mcollected->where($cond)->count();
+ $condJoin=array();
+ if($cond['url']){
+ foreach ($cond as $k=>$v){
+ $k=($k=='url'?'i.':'c.').$k;
+ $condJoin[$k]=$v;
+ }
+ }
+ if($condJoin){
+ $count=$mcollected->alias('c')->join($mcollected->collected_info_tname().' i','c.id=i.id')->where($condJoin)->count();
+ }else{
+ $count=$mcollected->where($cond)->count();
+ }
$limit=$search['num'];
if($count>0){
- $dataList=$mcollected->where($cond)->order('id desc')->paginate($limit,false,paginate_auto_config());
+ if($condJoin){
+ $dataList=$mcollected->alias('c')->join($mcollected->collected_info_tname().' i','c.id=i.id')->where($condJoin)->order('c.id desc')->paginate($limit,false,paginate_auto_config());
+ }else{
+ $dataList=$mcollected->where($cond)->order('id desc')->paginate($limit,false,paginate_auto_config());
+ }
$pagenav=$dataList->render();
$this->assign('pagenav',$pagenav);
$dataList=$dataList->all();
$dataList=empty($dataList)?array():$dataList;
+ $dataList=$mcollected->getInfoDatas($dataList);
$taskIds=array();
foreach ($dataList as $itemK=>$item){
@@ -113,7 +123,7 @@ class Collected extends BaseController {
$this->set_html_tags(
lang('collected_list'),
- lang('collected_list'),
+ lang('collected_list').' 统计图表',
breadcrumb(array(array('url'=>url('collected/list'),'title'=>'已采集数据'),array('url'=>url('collected/list'),'title'=>$navTips?$navTips:'数据列表')))
);
}
@@ -129,10 +139,10 @@ class Collected extends BaseController {
init_array($release);
if(in_array('all', $release)){
- model('Collected')->where("`error` is not null and `error`<>''")->delete();
+ model('Collected')->deleteByCond(array('status'=>0));
}else{
- model('Collected')->where('release','in',$release)->where("`error` is not null and `error`<>''")->delete();
+ model('Collected')->deleteByCond(array('release'=>array('in',$release),'status'=>0));
}
$this->success('清理完成','admin/collected/list');
}else{
@@ -161,13 +171,13 @@ class Collected extends BaseController {
}
if($op=='delete'){
- $mcollected->where(array('id'=>$id))->delete();
+ $mcollected->deleteByCond(array('id'=>$id));
$this->success(lang('delete_success'));
}elseif($op=='deleteall'){
$ids=input('ids/a',array(),'intval');
if(is_array($ids)&&count($ids)>0){
- $mcollected->where(array('id'=>array('in',$ids)))->delete();
+ $mcollected->deleteByCond(array('id'=>array('in',$ids)));
}
$this->success(lang('op_success'),'list');
}
@@ -176,7 +186,7 @@ class Collected extends BaseController {
public function chartAction(){
$this->set_html_tags(
'已采集数据:统计图表',
- '已采集数据:统计图表',
+ '已采集数据:统计图表 数据列表',
breadcrumb(array(array('url'=>url('collected/list'),'title'=>'已采集数据'),array('url'=>url('collected/chart'),'title'=>'统计图表')))
);
return $this->fetch();
@@ -239,13 +249,13 @@ class Collected extends BaseController {
$dataList['success'][$k]=$mcollected->where(array(
'addtime'=>array('between',array($v['start'],$v['end'])),
- 'target'=>array('<>','')
+ 'status'=>1
))->count();
$dataList['failed'][$k]=$mcollected->where(array(
'addtime'=>array('between',array($v['start'],$v['end'])),
- 'error'=>array('<>','')
+ 'status'=>0
))->count();
}
@@ -267,13 +277,13 @@ class Collected extends BaseController {
$dataList['success'][$module]=$mcollected->where(array(
'release'=>$module,
- 'target'=>array('<>','')
+ 'status'=>1
))->count();
$dataList['failed'][$module]=$mcollected->where(array(
'release'=>$module,
- 'error'=>array('<>','')
+ 'status'=>0
))->count();
}
$this->success('',null,$dataList);
diff --git a/vendor/skycaiji/app/admin/controller/Cpattern.php b/vendor/skycaiji/app/admin/controller/Cpattern.php
index c9fc592..30c6d23 100644
--- a/vendor/skycaiji/app/admin/controller/Cpattern.php
+++ b/vendor/skycaiji/app/admin/controller/Cpattern.php
@@ -196,7 +196,7 @@ class Cpattern extends BaseController {
'num' => array('num_start','num_end'),
'time' => array ('time_format','time_start','time_end','time_stamp'),
'list' => array('list','list_type'),
- 'extract' =>array('extract','extract_module','extract_rule','extract_rule_merge','extract_rule_multi','extract_rule_multi_str','extract_xpath','extract_xpath_attr','extract_xpath_attr_custom','extract_xpath_multi','extract_xpath_multi_str','extract_json','extract_json_arr','extract_json_arr_implode'),
+ 'extract' =>array('extract','extract_module','extract_rule','extract_rule_merge','extract_rule_multi','extract_rule_multi_type','extract_rule_multi_str','extract_xpath','extract_xpath_attr','extract_xpath_attr_custom','extract_xpath_multi','extract_xpath_multi_type','extract_xpath_multi_str','extract_json','extract_json_arr','extract_json_arr_implode','extract_json_loop'),
'merge' => 'merge',
'sign' => 'sign'
);
diff --git a/vendor/skycaiji/app/admin/controller/Dataapi.php b/vendor/skycaiji/app/admin/controller/Dataapi.php
new file mode 100644
index 0000000..8689428
--- /dev/null
+++ b/vendor/skycaiji/app/admin/controller/Dataapi.php
@@ -0,0 +1,222 @@
+input('id/d',0),
+ 'name'=>input('name','','trim')
+ );
+ if($search['id']<=0){
+ unset($search['id']);
+ }
+
+ $mda=model('Dataapi');
+ $cond=array();
+ if($search['id']){
+ $cond['id']=$search['id'];
+ }
+ if($search['name']){
+ $cond['name']=array('like','%'.$search['name'].'%');
+ }
+
+ $daList=array();
+ $limit=50;
+ $daList=$mda->where($cond)->order('sort desc')->paginate($limit,false,paginate_auto_config());
+ $pagenav=$daList->render();
+ $daList=$daList->all();
+
+ $dsNames=array();
+ foreach ($daList as $k=>$v){
+ $dsNames[$v['ds_id']]=$v['ds_id'];
+ }
+ if($dsNames){
+ $dsNames=model('Dataset')->where('id','in',$dsNames)->column('name','id');
+ }
+
+ $this->set_html_tags(
+ '数据接口',
+ '数据接口',
+ breadcrumb(array(array('url'=>url('dataapi/list'),'title'=>'数据接口'),array('url'=>url('dataapi/list'),'title'=>'列表')))
+ );
+
+ $this->assign('dsNames',$dsNames);
+ $this->assign('search',$search);
+ $this->assign('daList',$daList);
+ $this->assign('pagenav',$pagenav);
+ return $this->fetch();
+ }
+ public function opAction(){
+ $op=input('op','');
+ $mda=model('Dataapi');
+ if($this->request->isPost()){
+ if(empty($op)){
+
+ $newsort=input('newsort/a',array(),'intval');
+ foreach ($newsort as $id=>$sort){
+ $mda->where('id',$id)->update(array('sort'=>$sort));
+ }
+ $this->success('操作成功','dataapi/list');
+ }elseif($op=='delete'){
+ $id=input('id/d',0);
+ $mda->where('id',$id)->delete();
+ $this->success('已删除','');
+ }elseif($op=='status'){
+ $id=input('id/d',0);
+ $status=input('status/d',0);
+ $status=$status?0:1;
+ $mda->where('id',$id)->update(array('status'=>$status));
+ $this->success($status?'已开启':'已关闭','',array('status'=>$status));
+ }
+ }else{
+ $this->error('无效操作','');
+ }
+ }
+ public function setAction(){
+ $id=input('id/d');
+ $daData=array();
+ $mda=model('Dataapi');
+ $mds=model('Dataset');
+ if($id){
+ $daData=$mda->getById($id);
+ }
+ if($this->request->isPost()){
+ $newData=array(
+ 'name'=>input('name'),
+ 'route'=>input('route','','trim'),
+ 'desc'=>input('desc'),
+ 'sort'=>input('sort/d',0),
+ 'status'=>input('status/d',0),
+ 'ds_id'=>input('ds_id/d',0)
+ );
+ if(empty($newData['name'])){
+ $this->error('请输入名称');
+ }
+ if(empty($daData)||$newData['name']!=$daData['name']){
+ if($mda->where('name',$newData['name'])->count()>0){
+ $this->error('名称已存在');
+ }
+ }
+ if(!empty($newData['route'])){
+ if(!preg_match('/^[\w\-]+$/',$newData['route'])){
+ $this->error('网址别名只能由字母、数字、横线和下划线组成!');
+ }
+ if(empty($daData)||$newData['route']!=$daData['route']){
+ if($mda->where('route',$newData['route'])->count()>0){
+ $this->error('网址别名已存在');
+ }
+ }
+ }
+ $config=trim_input_array('config');
+ init_array($config);
+ $config['page_per']=$config['page_per']?:'';
+ $config['page_max']=$config['page_max']?:'';
+ if(!empty($config['page_name'])){
+ $checkRst=$mda->check_url_param_name($config['page_name']);
+ if(!$checkRst['success']){
+ $this->error('分页'.$checkRst['msg']);
+ }
+ }
+ if($newData['ds_id']<=0){
+ $this->error('请绑定数据集');
+ }
+
+ $dsData=$mds->getById($newData['ds_id']);
+
+ $conds=trim_input_array('conds');
+ $conds=$mda->filter_conds($conds);
+ foreach ($conds['name'] as $k=>$v){
+ if(!empty($v)){
+ $checkRst=$mda->check_url_param_name($v);
+ if(!$checkRst['success']){
+ $dsField=$mds->get_config_field($dsData,$conds['field'][$k]);
+ $this->error('数据集字段“'.$dsField['name'].'”'.$checkRst['msg']);
+ }
+ }
+ }
+ $config['conds']=$conds;
+ $newData['config']=serialize($config);
+ if(empty($daData)){
+
+ $id=$mda->strict(false)->insert($newData,false,true);
+ }else{
+
+ $mda->strict(false)->where(array('id'=>$id))->update($newData);
+ }
+ $this->success('操作成功','dataapi/set?id='.$id);
+ }else{
+ $title=$daData?'编辑':'添加';
+ $this->set_html_tags(
+ $title.'数据接口'.($daData?(':'.$daData['name']):''),
+ $title.'数据接口'.($daData?(':'.$daData['name'].'(id:'.$id.')'):''),
+ breadcrumb(array(array('url'=>url('dataapi/list'),'title'=>'数据接口'),array('url'=>url('dataapi/set?id='.($daData?$daData['id']:'')),'title'=>($daData?$daData['name']:$title))))
+ );
+ $config=array();
+ $apiUrl='';
+ $isSafeMode=false;
+ $groupConds=array();
+ $fieldNames=array();
+ if($daData){
+ $daData['name']=htmlspecialchars_decode($daData['name'],ENT_QUOTES);
+ $daData['desc']=htmlspecialchars_decode($daData['desc'],ENT_QUOTES);
+ $config=$daData['config'];
+ $apiUrl=url('api/data/'.($daData['route']?$daData['route']:$daData['id']),'',false,true);
+ if(!empty($config['api_key'])){
+
+ $apiUrl.=(strpos($apiUrl,'?')===false?'?':'&').'k=';
+ if(empty($config['api_mode'])){
+ $apiUrl.=md5($config['api_key']);
+ }else{
+ $isSafeMode=true;
+ }
+ }
+ $apiUrl=htmlspecialchars($apiUrl);
+
+ $dsData=$daData['ds_id']?$mds->getById($daData['ds_id']):array();
+ if($config['conds']&&$config['conds']['field']){
+ foreach($config['conds']['field'] as $k=>$v){
+ $dsField=$mds->get_config_field($dsData,$v);
+ $fieldNames[$v]=$dsField['name'];
+ }
+ }
+ $groupConds=$mda->get_group_conds($config['conds']);
+ }
+ $fieldNames['id']='id';
+
+ $this->assign('daData',$daData);
+ $this->assign('config',$config);
+ $this->assign('apiUrl',$apiUrl);
+ $this->assign('isSafeMode',$isSafeMode);
+ $this->assign('groupConds',$groupConds);
+ $this->assign('fieldNames',$fieldNames);
+ $this->assign('condOps',$mda->get_cond_op(null));
+ return $this->fetch();
+ }
+ }
+
+ public function datasetAction(){
+ $dsId=input('ds_id/d',0);
+ $mds=model('Dataset');
+ $dsData=$mds->getById($dsId);
+ $fields=$dsData['config']['fields'];
+ init_array($fields);
+ foreach ($fields as $k=>$v){
+ $fields[$k]=$v['name'];
+ }
+ $fields=array_merge(array('id'=>'id'),$fields);
+ $this->success('','',array('fields'=>$fields,'name'=>$dsData['name'],'id'=>$dsData['id']));
+ }
+}
\ No newline at end of file
diff --git a/vendor/skycaiji/app/admin/controller/Dataset.php b/vendor/skycaiji/app/admin/controller/Dataset.php
new file mode 100644
index 0000000..58453a1
--- /dev/null
+++ b/vendor/skycaiji/app/admin/controller/Dataset.php
@@ -0,0 +1,680 @@
+input('id/d',0),
+ 'name'=>input('name','','trim')
+ );
+ if($search['id']<=0){
+ unset($search['id']);
+ }
+
+ $mds=model('Dataset');
+ $cond=array();
+ if($search['id']){
+ $cond['id']=$search['id'];
+ }
+ if($search['name']){
+ $cond['name']=array('like','%'.$search['name'].'%');
+ }
+
+ $dsList=array();
+ $limit=50;
+ $dsList=$mds->where($cond)->order('sort desc')->paginate($limit,false,paginate_auto_config());
+ $pagenav=$dsList->render();
+ $dsList=$dsList->all();
+
+ $dsFields=array();
+ if($dsList){
+ foreach ($dsList as $v){
+ $v=$mds->get_ds_data($v);
+ if($v['config']&&$v['config']['fields']){
+ foreach ($v['config']['fields'] as $vf){
+ $dsFields[$v['id']][$vf['name']]=$vf['name'];
+ }
+ $dsFields[$v['id']]=implode(', ', $dsFields[$v['id']]);
+ }
+ }
+ }
+
+ $this->set_html_tags(
+ '数据集',
+ '数据集',
+ breadcrumb(array(array('url'=>url('dataset/list'),'title'=>'数据集'),array('url'=>url('dataset/list'),'title'=>'列表')))
+ );
+
+ $this->assign('search',$search);
+ $this->assign('dsList',$dsList);
+ $this->assign('dsFields',$dsFields);
+ $this->assign('pagenav',$pagenav);
+ return $this->fetch();
+ }
+
+ public function selectAction(){
+ $page=input('p/d',1);
+ $page=max(1,$page);
+
+ $search=array(
+ 'id'=>input('id/d',0),
+ 'name'=>input('name','','trim')
+ );
+ if($search['id']<=0){
+ unset($search['id']);
+ }
+
+ $mds=model('Dataset');
+ $cond=array();
+ if($search['id']){
+ $cond['id']=$search['id'];
+ }
+ if($search['name']){
+ $cond['name']=array('like','%'.$search['name'].'%');
+ }
+
+ $dsList=array();
+ $limit=20;
+ $dsList=$mds->where($cond)->order('sort desc')->paginate($limit,false,paginate_auto_config());
+ $pagenav=$dsList->render();
+ $dsList=$dsList->all();
+
+ $this->assign('search',$search);
+ $this->assign('dsList',$dsList);
+ $this->assign('pagenav',$pagenav);
+ $this->assign('from',input('from',''));
+ return $this->fetch();
+ }
+ public function opAction(){
+ $op=input('op','');
+ $mds=model('Dataset');
+ if($this->request->isPost()){
+ if(empty($op)){
+
+ $newsort=input('newsort/a',array(),'intval');
+ foreach ($newsort as $id=>$sort){
+ $mds->where('id',$id)->update(array('sort'=>$sort));
+ }
+ $this->success('操作成功','dataset/list');
+ }elseif($op=='delete'){
+ $this->ajax_check_userpwd();
+ $id=input('id/d',0);
+ $mds->where('id',$id)->delete();
+ DatasetTable::getInstance($id)->drop_table();
+ $this->success('已删除','');
+ }
+ }else{
+ $this->error('无效操作','');
+ }
+ }
+
+ public function dbCountAction(){
+ $counts=array();
+ if($this->request->isPost()){
+ $ids=input('ids/a',array(),'intval');
+ init_array($ids);
+ foreach ($ids as $id){
+ try{
+ $dst=DatasetTable::getInstance($id);
+ $counts[$id]=$dst->db()->count();
+ }catch(\Exception $ex){}
+ }
+ }
+ $this->success('','',$counts);
+ }
+ public function setAction(){
+ $id=input('id/d');
+ $dsData=array();
+ $mds=model('Dataset');
+ if($id){
+ $dsData=$mds->getById($id);
+ }
+ if($this->request->isPost()){
+ $newData=array(
+ 'name'=>input('name'),
+ 'desc'=>input('desc'),
+ 'sort'=>input('sort/d',0)
+ );
+ if(empty($newData['name'])){
+ $this->error('请输入名称');
+ }
+ $checkName=true;
+ if(!empty($dsData)&&$newData['name']==$dsData['name']){
+
+ $checkName=false;
+ }
+ if($checkName){
+ if($mds->where('name',$newData['name'])->count()>0){
+ $this->error('名称已存在');
+ }
+ }
+ $fields=input('fields/a',array(),'url_b64decode');
+ if($fields){
+ foreach ($fields as $k=>$v){
+ $fields[$k]=json_decode($v,true);
+ }
+ $fields=$mds->filter_fields($fields);
+ }
+ init_array($fields);
+ if(empty($fields)){
+ $this->error('请添加字段');
+ }
+ $newData['config']=array(
+ 'fields'=>$fields
+ );
+ $newData['config']=serialize($newData['config']);
+ if(empty($dsData)){
+
+ $id=$mds->strict(false)->insert($newData,false,true);
+ }else{
+
+
+ $dsFields=$dsData['config']['fields'];
+ init_array($dsFields);
+ $newFields=$fields;
+ init_array($newFields);
+ $upFields=false;
+ foreach ($newFields as $k=>$v){
+ $dsField=$dsFields[$k];
+ if(empty($dsField)){
+
+ $upFields=true;
+ break;
+ }
+ if($v['name']!=$dsField['name']||$v['type']!=$dsField['type']||$v['len']!=$dsField['len']){
+
+ $upFields=true;
+ break;
+ }
+ }
+ foreach ($dsFields as $k=>$v){
+ if(empty($newFields[$k])){
+
+ $upFields=true;
+ break;
+ }
+ }
+ if($upFields){
+
+ $this->ajax_check_userpwd();
+ }
+ $mds->strict(false)->where(array('id'=>$id))->update($newData);
+ }
+ $dsTable=DatasetTable::getInstance($id);
+ $dsTable->db();
+
+ $error='';
+ try{
+ $dsTable->alertTableFields($fields,$dsData);
+ }catch(\Exception $ex){
+ $error=$ex->getMessage();
+ $error=$dsTable->convertErrorColumn($error,$fields);
+ }
+
+
+ $dsData=$mds->getById($id);
+ if($dsData){
+ $fields=$dsData['config']['fields'];
+ init_array($fields);
+ if($fields){
+ $dbColumns=$dsTable->dbColumns();
+ foreach ($fields as $fk=>$fv){
+ if(empty($dbColumns[$fk])){
+
+ $fv=null;
+ }else{
+
+ $dbType=$dbColumns[$fk]['type'];
+ $dbLen='';
+ if(preg_match('/^(.+)\((\d+)\)\s*$/',$dbType,$mtype)){
+ $dbType=trim($mtype[1]);
+ $dbLen=intval($mtype[2]);
+ }
+ $dbType=strtolower($dbType);
+ $checkType=$mds->check_field_type($dbType);
+ if(!$checkType['success']){
+
+ $fv=null;
+ }else{
+ $fv['len']='';
+ if($dbType!=$fv['type']){
+
+ $fv['type']=$dbType;
+ }elseif($dbType=='varchar'){
+
+ $fv['len']=$dbLen;
+ }
+ }
+ }
+ if(is_null($fv)){
+ unset($fields[$fk]);
+ }else{
+ unset($fv['name_original']);
+ unset($fv['name_dbname']);
+ $fields[$fk]=$fv;
+ }
+ }
+ $dsData['config']['fields']=$fields;
+ $dsData['config']=serialize($dsData['config']);
+ $mds->strict(false)->where(array('id'=>$id))->update(array('config'=>$dsData['config']));
+ }
+ }
+
+ if($error){
+ $this->error($error,'');
+ }else{
+ $this->success('操作成功','dataset/set?id='.$id);
+ }
+ }else{
+ $title=$dsData?'编辑':'添加';
+ $this->set_html_tags(
+ $title.'数据集'.($dsData?(':'.$dsData['name']):''),
+ $title.'数据集'.($dsData?(':'.$dsData['name'].'(id:'.$id.')'):''),
+ breadcrumb(array(array('url'=>url('dataset/list'),'title'=>'数据集'),array('url'=>url('dataset/set?id='.($dsData?$dsData['id']:'')),'title'=>($dsData?$dsData['name']:$title))))
+ );
+ $indexes=array();
+ if($dsData){
+ $dsData['name']=htmlspecialchars_decode($dsData['name'],ENT_QUOTES);
+ $dsData['desc']=htmlspecialchars_decode($dsData['desc'],ENT_QUOTES);
+
+ $fields=$dsData['config']['fields'];
+ init_array($fields);
+ foreach ($fields as $k=>$v){
+ $v['name_dbname']=$mds->field_db_name($v['name']);
+ $fields[$k]=$v;
+ }
+ $dsData['config']['fields']=$fields;
+
+ $dsTable=DatasetTable::getInstance($id);
+ $dbIndexes=db()->query('SHOW INDEX FROM `'.$dsTable->fullTableName().'`');
+ foreach ($dbIndexes as $dbIndex){
+ $dbIndex=\util\Funcs::array_keys_to_lower($dbIndex);
+ $dbIxKey=$dbIndex['key_name'];
+ if($dbIxKey=='PRIMARY'){
+
+ continue;
+ }
+ if(!isset($indexes[$dbIxKey])){
+ $indexes[$dbIxKey]=array('fields'=>array());
+ if(empty($dbIndex['non_unique'])){
+ $indexes[$dbIxKey]['type']='唯一索引';
+ }else{
+ $indexes[$dbIxKey]['type']=strtolower($dbIndex['index_type'])=='fulltext'?'全文索引':'普通索引';
+ }
+ }
+ $indexes[$dbIxKey]['fields'][$dbIndex['column_name']]=($fields[$dbIndex['column_name']]?$fields[$dbIndex['column_name']]['name']:$dbIndex['column_name']).($dbIndex['sub_part']?('('.$dbIndex['sub_part'].')'):'');
+ }
+ }
+ $this->assign('indexes',$indexes);
+ $this->assign('dsData',$dsData);
+ return $this->fetch();
+ }
+ }
+ public function fieldAction(){
+ if($this->request->isPost()&&input('is_submit')){
+ $objid=input('objid','');
+ $field=array(
+ 'name'=>input('name'),
+ 'desc'=>input('desc','',null),
+ 'type'=>input('type'),
+ 'len'=>input('len/d',0),
+ 'name_original'=>input('name_original'),
+ );
+ $field['len']=max(0,$field['len']);
+ $mds=model('Dataset');
+ $result=$mds->check_field_name($field['name']);
+ if(!$result['success']){
+ $this->error($result['msg']);
+ }
+ $result=$mds->check_field_type($field['type']);
+ if(!$result['success']){
+ $this->error($result['msg']);
+ }
+ if($field['type']=='varchar'){
+ $field['len']=min($field['len'],16383);
+ if($field['len']<=0){
+ $field['len']=500;
+ }
+ }
+ $field['name_dbname']=$mds->field_db_name($field['name']);
+ $this->success('','',array('field'=>$field,'objid'=>$objid));
+ }else{
+ $field=input('field','','url_b64decode');
+ $objid=input('objid','');
+ $field=$field?json_decode($field,true):array();
+ $this->assign('field',$field);
+ $this->assign('objid',$objid);
+ return $this->fetch();
+ }
+ }
+
+ public function indexesAction(){
+ $dsId=input('ds_id/d',0);
+ $mds=model('Dataset');
+ $dsData=$dsId>0?$mds->getById($dsId):null;
+ if(empty($dsData)){
+ $this->error('数据集不存在');
+ }
+
+ $fields=$dsData['config']['fields'];
+ init_array($fields);
+
+ $dsTable=DatasetTable::getInstance($dsId);
+ $dbColumns=$dsTable->dbColumns();
+ $dbIndexes1=db()->query('SHOW INDEX FROM `'.$dsTable->fullTableName().'`');
+ $dbIndexes=array();
+ foreach ($dbIndexes1 as $dbIndex){
+ $dbIndex=\util\Funcs::array_keys_to_lower($dbIndex);
+ $dbIxKey=$dbIndex['key_name'];
+ if(strcasecmp($dbIxKey,'PRIMARY')===0){
+
+ continue;
+ }
+ if(!isset($dbIndexes[$dbIxKey])){
+ $dbIndexes[$dbIxKey]=array('name'=>$dbIxKey,'fields'=>array());
+ if(empty($dbIndex['non_unique'])){
+ $dbIndexes[$dbIxKey]['type']='unique';
+ }else{
+ $dbIndexes[$dbIxKey]['type']=strtolower($dbIndex['index_type'])=='fulltext'?'fulltext':'index';
+ }
+ }
+ $dbIndexes[$dbIxKey]['fields'][$dbIndex['column_name']]=$dbIndex['column_name'];
+ }
+ if($this->request->isPost()){
+ $postIndexes=trim_input_array('indexes');
+ $indexes=array();
+ foreach ($postIndexes as $k=>$v){
+ init_array($v['fields']);
+ foreach ($v['fields'] as $fk=>$fv){
+ if(empty($fv)||$fv=='-1'){
+
+ unset($v['fields'][$fk]);
+ }
+ }
+ $v['fields']=array_unique($v['fields']);
+ $v['fields']=array_filter($v['fields']);
+ $v['fields']=array_values($v['fields']);
+
+ $vFields=array();
+ foreach ($v['fields'] as $fv){
+ $vFields[$fv]=$fv;
+ }
+ $v['fields']=$vFields;
+
+ $indexes[md5(serialize($vFields))]=$v;
+ }
+ $dbIndexes1=array();
+ foreach ($dbIndexes as $k=>$v){
+ init_array($v['fields']);
+ $dbIndexes1[md5(serialize($v['fields']))]=$v;
+ }
+ $dbIndexes=$dbIndexes1;
+
+ foreach ($indexes as $k=>$v){
+ if($dbIndexes[$k]){
+
+ if($v['type']==$dbIndexes[$k]['type']){
+
+ unset($indexes[$k]);
+ unset($dbIndexes[$k]);
+ continue;
+ }
+ }
+ }
+ if($dbIndexes){
+
+ foreach ($dbIndexes as $k=>$v){
+ if($v['name']){
+ db()->execute('ALTER TABLE `'.$dsTable->fullTableName().'` DROP INDEX `'.$v['name'].'`');
+ }
+ }
+ }
+ $error='';
+ if($indexes){
+
+ $allowTypes=array('bigint'=>array('index','unique'),'double'=>array('index','unique'),'mediumtext'=>array('fulltext'),'datetime'=>array('index','unique'));
+ foreach ($indexes as $k=>$v){
+ if(!in_array($v['type'], array('index','unique','fulltext'))){
+ continue;
+ }
+ init_array($v['fields']);
+ if(empty($v['fields'])){
+ continue;
+ }
+ $ixType=$v['type'];
+ $ixName=array();
+ $ixFields=array();
+
+ $varcharLens=array();
+ $errorType=array();
+ foreach ($v['fields'] as $fname){
+ $ixName[]=$fname;
+ $ixLen='';
+ if($dbColumns[$fname]&&preg_match('/\bvarchar\s*\((\d+)\)/',$dbColumns[$fname]['type'],$mlen)){
+
+ $ixLen=intval($mlen[1]);
+ $ixLen=$ixLen>250?250:$ixLen;
+ }
+ if($ixLen){
+ $varcharLens[$fname]=$ixLen;
+ $ixFields[$fname]=$fname.'('.$ixLen.')';
+ }else{
+ $ixFields[$fname]=$fname;
+ }
+ $allowType=$allowTypes[$fields[$fname]['type']];
+ if($allowType&&!in_array($ixType,$allowType)){
+
+ $errorType[]=$fields[$fname]['name'].' '.lang('ds_ix_type_'.$ixType);
+ }
+ }
+ if($errorType){
+ $errorType=implode(',', $errorType);
+ $error.='错误的索引:'.$errorType.'
';
+ continue;
+ }
+ $ixName=count($ixName)>1?('i'.substr(md5(serialize($ixName)),8,16)):$ixName[0];
+
+ $lenElse=250-count($ixFields)*2+count($varcharLens)*2;
+ if(array_sum($varcharLens)>$lenElse){
+ asort($varcharLens);
+ foreach ($varcharLens as $vlf=>$vlv){
+ $varcharLen=intval($lenElse/(count($varcharLens)));
+ if($vlv>$varcharLen){
+ $vlv=$varcharLen;
+ }
+ $ixFields[$vlf]=$vlf.'('.$vlv.')';
+ $lenElse=$lenElse-$vlv;
+ unset($varcharLens[$vlf]);
+ }
+ }
+ $ixFields=implode(',',$ixFields);
+ try{
+ db()->execute('ALTER TABLE `'.$dsTable->fullTableName().'` ADD '.$ixType.' `'.$ixName.'`('.$ixFields.')');
+ }catch(\Exception $ex){
+ $exMsg=$ex->getMessage();
+ $exMsg=$dsTable->convertErrorColumn($exMsg,$fields);
+ $error.=$exMsg.'
';
+ };
+ }
+ }
+ if($error){
+ $this->error($error,'');
+ }else{
+ $this->success('操作成功','dataset/set?id='.$dsId);
+ }
+ }else{
+ $this->assign('fields',$fields);
+ $this->assign('dbIndexes',$dbIndexes);
+ $this->assign('dsData',$dsData);
+ return $this->fetch();
+ }
+ }
+
+ public function dbAction(){
+ $dsId=input('ds_id/d',0);
+ $mds=model('Dataset');
+ $dsData=$dsId>0?$mds->getById($dsId):null;
+ if(empty($dsData)){
+ $this->error('数据集不存在');
+ }
+ $fields=$dsData['config']['fields'];
+ init_array($fields);
+ $dst=DatasetTable::getInstance($dsId);
+
+ $mcache=\skycaiji\admin\model\CacheModel::getInstance();
+ $cond=array();
+ $search=array('id'=>input('id/d',0));
+ if($search['id']<=0){
+ unset($search['id']);
+ }else{
+ $cond['id']=$search['id'];
+ }
+ foreach ($fields as $k=>$v){
+ $searchK=input($k,'');
+ if(!is_empty($searchK,true)){
+ $cond[$k]=array('like','%'.addslashes($searchK).'%');
+ $search[$k]=$searchK;
+ }
+ }
+ $search['num']=input('num/d',0);
+ if($search['num']<=0){
+ $search['num']=$mcache->getCache('dataset_db_list_num','data');
+ }
+ $search['num']=max(30,intval($search['num']));
+ $mcache->setCache('dataset_db_list_num',$search['num']);
+ $list=$dst->db()->where($cond)->order('id desc')->paginate($search['num'],false,paginate_auto_config());
+ $pagenav=$list->render();
+ $list=$list->all();
+ foreach ($list as $k=>$v){
+ init_array($v);
+ foreach ($v as $vk=>$vv){
+ if($fields[$vk]&&$fields[$vk]['type']=='datetime'){
+ $vv=$dst->convertDate($vv);
+ $v[$vk]=$vv;
+ }
+ }
+ $list[$k]=$v;
+ }
+
+ $this->set_html_tags(
+ '数据集:'.$dsData['name'],
+ '数据集:'.$dsData['name'],
+ breadcrumb(array(array('url'=>url('dataset/set?id='.$dsId),'title'=>'数据集:'.$dsData['name']),array('url'=>url('dataset/db?ds_id='.$dsId),'title'=>'数据')))
+ );
+ $this->assign('search',$search);
+ $this->assign('dsData',$dsData);
+ $this->assign('list',$list);
+ $this->assign('fields',$fields);
+ $this->assign('pagenav',$pagenav);
+ return $this->fetch();
+ }
+ public function dbSetAction(){
+ $dsId=input('ds_id/d',0);
+ $mds=model('Dataset');
+ $dsData=$dsId>0?$mds->getById($dsId):null;
+ if(empty($dsData)){
+ $this->error('数据集不存在');
+ }
+ $fields=$dsData['config']['fields'];
+ init_array($fields);
+ $dst=DatasetTable::getInstance($dsId);
+ if($this->request->isPost()){
+ $ids=input('ids/a',array(),'intval');
+ $postData=array();
+ foreach ($fields as $k=>$v){
+ $fieldData=input($k.'/a',array(),null);
+ if($v&&$v['type']=='datetime'){
+ foreach ($fieldData as $fk=>$fv){
+ $fieldData[$fk]=$dst->convertDate($fv);
+ }
+ }
+ $postData[$k]=$fieldData;
+ }
+ $upData=array();
+ $newData=array();
+ foreach ($ids as $ik=>$iv){
+ if($iv>0){
+
+ $upData[$iv]=array('id'=>$iv);
+ foreach ($fields as $fk=>$fv){
+ $upData[$iv][$fk]=$postData[$fk][$iv];
+ }
+ }else{
+
+ foreach ($fields as $fk=>$fv){
+ $newData[$iv][$fk]=$postData[$fk][$iv];
+ }
+ }
+ }
+ $error='';
+ try{
+ if($upData){
+ $dst->db()->strict(false)->insertAll($upData,true);
+ }
+ if($newData){
+ foreach ($newData as $k=>$v){
+ if(is_array($v)){
+
+ $isNull=true;
+ foreach ($v as $vk=>$vv){
+ if(!is_empty($vv,true)){
+ $isNull=false;
+ }
+ }
+ if($isNull){
+ unset($newData[$k]);
+ }
+ }
+ }
+ if($newData){
+ $dst->db()->strict(false)->insertAll($newData);
+ }
+ }
+ }catch(\Exception $ex){
+ $error=$ex->getMessage();
+ $error=$dst->convertErrorColumn($error,$fields);
+ }
+ if($error){
+ $this->error($error,'');
+ }else{
+ $this->success('操作成功',$newData?('dataset/db?ds_id='.$dsId):'');
+ }
+ }else{
+ $this->error('操作失败','');
+ }
+ }
+ public function dbDeleteAction(){
+ $dsId=input('ds_id/d',0);
+ $mds=model('Dataset');
+ $dsData=$dsId>0?$mds->getById($dsId):null;
+ if(empty($dsData)){
+ $this->error('数据集不存在');
+ }
+ $dst=DatasetTable::getInstance($dsId);
+ if($this->request->isPost()){
+ $ids=input('ids/a',array(),'intval');
+ init_array($ids);
+ if(!empty($ids)){
+ $dst->db()->where('id','in',$ids)->delete();
+ }
+ $this->success('删除成功','',$ids);
+ }else{
+ $this->error('删除失败','');
+ }
+ }
+}
\ No newline at end of file
diff --git a/vendor/skycaiji/app/admin/controller/Develop.php b/vendor/skycaiji/app/admin/controller/Develop.php
index 4f3bb59..870a1c9 100644
--- a/vendor/skycaiji/app/admin/controller/Develop.php
+++ b/vendor/skycaiji/app/admin/controller/Develop.php
@@ -395,7 +395,7 @@ EOF;
/*开发应用*/
public function appAction(){
- $app=input('app');
+ $app=input('app','');
$app=strtolower($app);
$mapp=model('App');
$appData=null;
diff --git a/vendor/skycaiji/app/admin/controller/Release.php b/vendor/skycaiji/app/admin/controller/Release.php
index f5d9cbf..adcd965 100644
--- a/vendor/skycaiji/app/admin/controller/Release.php
+++ b/vendor/skycaiji/app/admin/controller/Release.php
@@ -218,8 +218,27 @@ class Release extends CollectController{
return $this->fetch();
}
}
-
-
+ public function datasetAction(){
+ $mds=model('Dataset');
+ $taskId=input('task_id/d',0);
+ $dsId=input('ds_id/d',0);
+ $dsData=$mds->getById($dsId);
+ $fields=$dsData['config']['fields'];
+ init_array($fields);
+
+ $collFields=array();
+ if($taskId>0){
+ $taskData=model('Task')->getById($taskId);
+ if(!empty($taskData)){
+ $collFields=controller('admin/Rdb','event')->get_coll_fields($taskData['id'], $taskData['module']);
+ }
+ init_array($collFields);
+ }
+ $this->assign('dsData',$dsData);
+ $this->assign('fields',$fields);
+ $this->assign('collFields',$collFields);
+ return $this->fetch();
+ }
/*检测cms信息*/
public function cmsDetectAction(){
$acms=controller('admin/Rcms','event');
diff --git a/vendor/skycaiji/app/admin/controller/Task.php b/vendor/skycaiji/app/admin/controller/Task.php
index feabb8f..68e1bda 100644
--- a/vendor/skycaiji/app/admin/controller/Task.php
+++ b/vendor/skycaiji/app/admin/controller/Task.php
@@ -204,6 +204,24 @@ class Task extends CollectController {
$this->success('','');
}
+ public function taskCollectedNumAction(){
+ $taskIds=input('task_ids/a',array(),'intval');
+
+ init_array($taskIds);
+ $list=array();
+ if($taskIds){
+ $mcollected=model('Collected');
+ $todayTime=strtotime(date('Y-m-d',time()));
+ foreach ($taskIds as $taskId){
+ $list[$taskId]=array(
+ 'today'=>$mcollected->where(array('task_id'=>array('=',$taskId),'addtime'=>array('>',$todayTime)))->count(),
+ 'total'=>$mcollected->where('task_id',$taskId)->count(),
+ );
+ }
+ }
+ $this->success('','',$list);
+ }
+
private function _set_tasks($taskList){
if($taskList){
@@ -233,20 +251,6 @@ class Task extends CollectController {
}
}
- $mcollected=model('Collected');
- $todayTime=strtotime(date('Y-m-d',time()));
- foreach ($taskList as $k=>$v){
- $taskId=$v['id'];
- if(empty($taskId)){
- continue;
- }
- $collected=array();
- $collected['today']=$mcollected->where(array('task_id'=>array('=',$taskId),'addtime'=>array('>',$todayTime)))->count();
- $collected['total']=$mcollected->where('task_id',$taskId)->count();
- $v['_collected_info']=$collected;
- $taskList[$k]=$v;
- }
-
$mrele=model('Release');
if($tids){
$releModules=$mrele->where('task_id','in',$tids)->column('module','task_id');
diff --git a/vendor/skycaiji/app/admin/controller/Taskgroup.php b/vendor/skycaiji/app/admin/controller/Taskgroup.php
index dffabdb..dfc9f2a 100644
--- a/vendor/skycaiji/app/admin/controller/Taskgroup.php
+++ b/vendor/skycaiji/app/admin/controller/Taskgroup.php
@@ -188,7 +188,7 @@ class Taskgroup extends BaseController {
$id=input('id/d',0);
$op=input('op');
- $ops=array('item'=>array('delete','move'),'list'=>array('deleteall','saveall'));
+ $ops=array('item'=>array('delete','move'),'list'=>array('saveall'));
if(!in_array($op,$ops['item'])&&!in_array($op,$ops['list'])){
$this->error(lang('invalid_op'));
@@ -239,46 +239,15 @@ class Taskgroup extends BaseController {
$this->assign('parentTgList',$parentTgList);
return $this->fetch();
}
- }elseif($op=='deleteall'){
-
- $ids=input('ids/a',array());
- if(is_array($ids)&&count($ids)>0){
- $list=$mtaskgroup->where(array('id'=>array('in',$ids)))->column('*');
- $deleteIds=array();
- foreach ($list as $item){
-
- $subCount=$mtaskgroup->where(array('parent_id'=>$item['id']))->count();
- if($subCount==0){
- $deleteIds[$item['id']]=$item['id'];
- }else{
- $hasSub=true;
- }
- }
- if($deleteIds){
- $mtaskgroup->where(array('id'=>array('in',$deleteIds)))->delete();
- $mtask->strict(false)->where(array('tg_id'=>array('in',$deleteIds)))->update(array('tg_id'=>0));
- }
- }
- $this->success(lang($hasSub?'tg_deleteall_has_sub':'op_success'));
}elseif($op=='saveall'){
- $ids=input('ids/a',array());
$newsort=input('newsort/a',array());
- if(is_array($ids)&&count($ids)>0){
- $ids=array_map('intval', $ids);
-
- $updateSql=' UPDATE '.$mtaskgroup->getQuery()->getTable().' SET `sort` = CASE `id` ';
- foreach ($ids as $tgid){
- $newsort[$tgid]=min(intval($newsort[$tgid]),999999);
- $updateSql.= sprintf(" WHEN %d THEN '%s' ", $tgid, $newsort[$tgid]);
- }
- $updateSql.='END WHERE `id` IN ('. implode(',',$ids).')';
- try{
- $mtaskgroup->execute($updateSql);
- }catch (\Exception $ex){
- $this->error(lang('op_failed'));
- }
- }
+ if(is_array($newsort)&&count($newsort)>0){
+ foreach ($newsort as $key=>$val){
+ $val=min(intval($val),999999);
+ $mtaskgroup->strict(false)->where('id',intval($key))->update(array('sort'=>$val));
+ }
+ }
$this->success(lang('op_success'),'list');
}
}
diff --git a/vendor/skycaiji/app/admin/controller/Tool.php b/vendor/skycaiji/app/admin/controller/Tool.php
index 6ec2a79..4b80888 100644
--- a/vendor/skycaiji/app/admin/controller/Tool.php
+++ b/vendor/skycaiji/app/admin/controller/Tool.php
@@ -367,7 +367,7 @@ class Tool extends BaseController {
$createSql.='PRIMARY KEY ('.implode(',', $primarys).')';
}
- $createSql.=' ) ENGINE=MyISAM DEFAULT CHARSET=utf8';
+ $createSql.=' ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4';
db()->execute($createSql);
}else{
diff --git a/vendor/skycaiji/app/admin/event/CpatternEvent.php b/vendor/skycaiji/app/admin/event/CpatternEvent.php
index add7f08..7cdfc09 100644
--- a/vendor/skycaiji/app/admin/event/CpatternEvent.php
+++ b/vendor/skycaiji/app/admin/event/CpatternEvent.php
@@ -126,25 +126,28 @@ class CpatternEvent extends CpatternColl{
break;
case 'rule':
- $val = $this->field_module_rule(array(
- 'reg_rule'=>$field_params['reg_extract_rule'],
- 'reg_rule_merge'=>$field_params['reg_extract_rule_merge'],
- 'rule_multi'=>$field_params['extract_rule_multi'],
- 'rule_multi_str'=>$field_params['extract_rule_multi_str'],
- ), $field_html);
-
+ $field_params['reg_rule']=$field_params['reg_extract_rule'];
+ $field_params['reg_rule_merge']=$field_params['reg_extract_rule_merge'];
+ $field_params['rule_multi']=$field_params['extract_rule_multi'];
+ $field_params['rule_multi_str']=$field_params['extract_rule_multi_str'];
+ $field_params['rule_multi_type']=$field_params['extract_rule_multi_type'];
+ $val = $this->field_module_rule($field_params, $field_html);
break;
case 'xpath':
- $val = $this->field_module_xpath(array(
- 'xpath' => $field_params['extract_xpath'],
- 'xpath_attr' => $field_params['extract_xpath_attr'],
- 'xpath_attr_custom' => $field_params['extract_xpath_attr_custom'],
- 'xpath_multi' => $field_params['extract_xpath_multi'],
- 'xpath_multi_str' => $field_params['extract_xpath_multi_str'],
- ), $field_html);
+ $field_params['xpath']=$field_params['extract_xpath'];
+ $field_params['xpath_attr']=$field_params['extract_xpath_attr'];
+ $field_params['xpath_attr_custom']=$field_params['extract_xpath_attr_custom'];
+ $field_params['xpath_multi']=$field_params['extract_xpath_multi'];
+ $field_params['xpath_multi_str']=$field_params['extract_xpath_multi_str'];
+ $field_params['xpath_multi_type']=$field_params['extract_xpath_multi_type'];
+ $val = $this->field_module_xpath($field_params, $field_html);
break;
case 'json':
- $val=$this->field_module_json(array('json'=>$field_params['extract_json'],'json_arr'=>$field_params['extract_json_arr'],'json_arr_implode'=>$field_params['extract_json_arr_implode']), $field_html);
+ $field_params['json']=$field_params['extract_json'];
+ $field_params['json_loop']=$field_params['extract_json_loop'];
+ $field_params['json_arr']=$field_params['extract_json_arr'];
+ $field_params['json_arr_implode']=$field_params['extract_json_arr_implode'];
+ $val = $this->field_module_json($field_params, $field_html);
break;
}
return $val;
@@ -357,8 +360,10 @@ class CpatternEvent extends CpatternColl{
}
return $fieldVal;
}
- public function process_f_insert($fieldVal,$params){
+ public function process_f_insert($fieldVal,$params,$curUrlMd5,$loopIndex,$contUrlMd5,$fieldName=''){
$txt=$params['insert_txt'];
+ $txt=$this->_replace_insert_fields($txt,$fieldVal,$curUrlMd5,$loopIndex);
+
if(empty($params['insert_loc'])){
$fieldVal.=$txt;
}elseif($params['insert_loc']=='head'){
@@ -457,6 +462,11 @@ class CpatternEvent extends CpatternColl{
return $murl;
},$fieldVal);
}
+ if(in_array('img_tag', $params['tool_list'])){
+ $fieldVal=preg_replace_callback('/(?]+)(?![\'\"])/i',function($match){
+ return '';
+ },$fieldVal);
+ }
return $fieldVal;
}
@@ -1069,7 +1079,7 @@ class CpatternEvent extends CpatternColl{
if(empty($process)){
return $fieldVal;
}
- static $conds=array('filter','if','func','api','download');
+ static $conds=array('filter','if','func','api','download','insert');
static $fnConds=array('translate','tool');
foreach ($process as $params){
diff --git a/vendor/skycaiji/app/admin/event/CpatternSingle.php b/vendor/skycaiji/app/admin/event/CpatternSingle.php
index b5f6c2d..8314971 100644
--- a/vendor/skycaiji/app/admin/event/CpatternSingle.php
+++ b/vendor/skycaiji/app/admin/event/CpatternSingle.php
@@ -26,7 +26,7 @@ class CpatternSingle extends Cpattern{
if(\util\Param::is_collector_single()){
$txt=strip_tags($txt);
- json(array('code'=>0,'msg'=>$txt,'data'=>[]))->send();
+ $this->jsonSend($txt);
}else{
parent::error($txt,$url,$data,$wait,$header);
}
diff --git a/vendor/skycaiji/app/admin/event/Rapi.php b/vendor/skycaiji/app/admin/event/Rapi.php
index 9740219..89b50b9 100644
--- a/vendor/skycaiji/app/admin/event/Rapi.php
+++ b/vendor/skycaiji/app/admin/event/Rapi.php
@@ -87,7 +87,7 @@ class Rapi extends Release{
if(!is_empty(g_sc('api_task_key_is_url'))){
json($collFieldsList)->send();
}else{
- json(array('code'=>1,'msg'=>'','data'=>$collFieldsList))->send();
+ $this->jsonSend('',$collFieldsList,1);
}
}else{
$html='