diff --git a/web/admin/autotask/at_ai.php b/web/admin/autotask/at_ai.php deleted file mode 100644 index 9100981..0000000 --- a/web/admin/autotask/at_ai.php +++ /dev/null @@ -1,89 +0,0 @@ -where('reqsec=0'); - $rows = $db->get($csql); - foreach ($rows as $decdbgrow) { - $id = $decdbgrow['id']; - $inputparams = getstrparam($decdbgrow['inputparam'], '|'); - $inputparams['id'] = $decdbgrow['decisionid']; - $inputparams['_more'] = 'ok'; - $retai = \web\amb\ai::json_aidecision($inputparams, true); - $updata = array(); - if ($retai['code'] == 1) { - $updata['inputprompt'] = 'System:' . $retai['system'] . "\nPrompt:" . $retai['roleprompt']; - $updata['aichat'] = json_encode($retai['messages'], JSON_UNESCAPED_UNICODE); - $updata['resulttxt'] = json_encode($retai['ai'], JSON_UNESCAPED_UNICODE); - $updata['reqsec'] = $retai['sec']; - $updata['decci'] = $retai['ci'] * 100; - } else { - $updata['resulttxt'] = json_encode($retai, JSON_UNESCAPED_UNICODE); - $updata['reqsec'] = -1; - } - $csql = new \ciy\sql('zc_ai_decdbg'); - $csql->where('id', $id); - if ($db->update($csql, $updata) === false) - savelog($db, 0, 'CRONAI', '更新失败:' . $db->error); - $systemrow['running'](); - } - if (empty($msg) && $func_fail == 0 && $func_succ == 0) - $msg = ''; - else - $msg .= 'succ: ' . $func_succ . ', fail: ' . $func_fail; - return $msg; -} - -function ai_exhi_contract($systemrow) { - global $db; - $msg = ''; - $func_succ = 0; - $func_fail = 0; - $csql = new \ciy\sql('ap_exhi_contrac_ai'); - $csql->where('json=\'\''); - $rows = $db->get($csql); - - $aiparam = array(); - $aiparam['id'] = 2; - foreach ($rows as $row) { - $aiparam['ocr'] = $row['ocr']; - $retai = \web\amb\ai::json_aidecision($aiparam); - if (@$retai['code'] != 1) { - $json = $retai; - $msg .= $retai['errmsg'] . "
"; - $func_fail++; - } else { - $func_succ++; - $json = json_encode($retai['ai'], JSON_UNESCAPED_UNICODE); - $zhiwei = $retai['ai']['zhiwei']; - $isshow = 1; - if ($zhiwei == 'CEO' || $zhiwei == '总经理' || $zhiwei == '董事长') { - $isshow = 2; - } - $updata = array(); - $updata['isshow'] = $isshow; - $updata['name'] = $retai['ai']['name'] . ''; - $updata['zw'] = $retai['ai']['zhiwei'] . ''; - $updata['mobile'] = $retai['ai']['mobile'] . ''; - $updata['mail'] = $retai['ai']['email'] . ''; - $csql = new \ciy\sql('ap_exhi_contract'); - $csql->where('id', $row['id']); - if ($db->update($csql, $updata) === false) - $func_fail++; - } - $updata = array(); - $updata['json'] = $json; - $csql = new \ciy\sql('ap_exhi_contrac_ai'); - $csql->where('id', $row['id']); - $execute = $db->update($csql, $updata); - $systemrow['running'](); - } - if (empty($msg) && $func_fail == 0 && $func_succ == 0) - $msg = ''; - else - $msg .= 'succ: ' . $func_succ . ', fail: ' . $func_fail; - return $msg; -} diff --git a/web/admin/cemap/ceeditor.html b/web/admin/cemap/ceeditor.html index 116f49f..ab131c4 100644 --- a/web/admin/cemap/ceeditor.html +++ b/web/admin/cemap/ceeditor.html @@ -241,7 +241,7 @@
关闭ESC
-
📦
+
📦
@@ -1033,7 +1033,7 @@ function getmaploc(dom, tag) { event.stopPropagation(); - if ($5(dom).hasclass('def')) { + if ($5(dom).hasClass('def')) { Glob.cb_maploc = null; $5(dom).removeClass('def'); $5(dom).removeClass('imp'); diff --git a/web/admin/cemap/pathbill.html b/web/admin/cemap/pathbill.html index 401ce6e..f3b44ab 100644 --- a/web/admin/cemap/pathbill.html +++ b/web/admin/cemap/pathbill.html @@ -293,7 +293,7 @@ function deltree() { var array = []; $5('[data-id]', '.table').each(function (dom) { - if (!$5(dom).hasclass("selected")) + if (!$5(dom).hasClass("selected")) return; var deep = toint($5('[data-deep]', dom).attr("data-deep")); array.push({ id: $5(dom).attr("data-id"), deep: deep }); diff --git a/web/admin/cemap/pathglb.html b/web/admin/cemap/pathglb.html index 401ce6e..f3b44ab 100644 --- a/web/admin/cemap/pathglb.html +++ b/web/admin/cemap/pathglb.html @@ -293,7 +293,7 @@ function deltree() { var array = []; $5('[data-id]', '.table').each(function (dom) { - if (!$5(dom).hasclass("selected")) + if (!$5(dom).hasClass("selected")) return; var deep = toint($5('[data-deep]', dom).attr("data-deep")); array.push({ id: $5(dom).attr("data-id"), deep: deep }); diff --git a/web/admin/manage.html b/web/admin/manage.html index c3fb3d7..e5e6741 100644 --- a/web/admin/manage.html +++ b/web/admin/manage.html @@ -204,7 +204,7 @@ top: 4em; width: 5px; height: 3em; - background-color: var(--imp5); + background-color: var(--succ5); transition: top .5s; -webkit-transition: top .5s; } diff --git a/web/admin/rigger/logdb.html b/web/admin/rigger/logdb.html index 62d34a1..6a061df 100644 --- a/web/admin/rigger/logdb.html +++ b/web/admin/rigger/logdb.html @@ -76,7 +76,7 @@ if (s == 'Ins') return '新增操作'; if (s == 'Upd') - return '更新操作'; + return '更新操作'; } } } diff --git a/web/jscss/ciy.js b/web/jscss/ciy.js index 0cb4ba3..41d9274 100644 --- a/web/jscss/ciy.js +++ b/web/jscss/ciy.js @@ -1077,6 +1077,9 @@ ciyfn.ajax = function (opn) { //IE8 OK var timeout = opn.timeout || 10; if (timeout < 1) timeout = 3; + if(timeout > 20) + header['ciy-timeout'] = timeout; + var method = opn.method || 'POST'; method = method.toUpperCase(); if (method == 'GET' && typeof (opn.data) == 'object') { @@ -1120,6 +1123,11 @@ ciyfn.ajax = function (opn) { //IE8 OK sendstr = "" + opn.data; } } + request.timeout = timeout * 1000; + request.ontimeout = function() { + clearTimeout(aborttime); + console.warn('request timeout: ' + timeout + 's'); + }; request.send(sendstr); request.onreadystatechange = function () { if (this.readyState === 4) { @@ -1145,7 +1153,10 @@ ciyfn.ajax = function (opn) { //IE8 OK } } } - var aborttime = window.setTimeout(function () { request.abort("timeout"); }, timeout * 1000); + var aborttime = window.setTimeout(function () { + console.warn('ajax timeout abort: ' + timeout + 's'); + request.abort("timeout"); + }, timeout * 1000 + 3000); } ciyfn._getform_dom = function (dom) { var sep = ','; @@ -1734,7 +1745,7 @@ ciyfn.showend = function (opn) { if (opn.icon == 'warn') istyle = 'background:var(--warn5);'; if (opn.icon == 'msg') - istyle = 'background:var(--imp5);'; + istyle = 'background:var(--succ5);'; var html = '
×'; if (opn.title) html += '

' + opn.title + '

'; diff --git a/web/jscss/style.css b/web/jscss/style.css index f63b774..5760f76 100644 --- a/web/jscss/style.css +++ b/web/jscss/style.css @@ -36,9 +36,9 @@ Version: 0.7.0 --mant: #ffffff; /* 成功色 */ - --imp5: #03a547; - --imp6: #048238; - --impt: #ffffff; + --succ5: #03a547; + --succ6: #048238; + --succt: #ffffff; /* 警示色 */ --warn5: #e39725; --warn6: #b97a1c; @@ -920,9 +920,9 @@ pre { } .btn.imp, .btn.succ { - background: var(--imp5); - color: var(--impt); - border: 1px solid var(--imp6); + background: var(--succ5); + color: var(--succt); + border: 1px solid var(--succ6); } .btn.warn { @@ -975,9 +975,9 @@ span.dag { } span.imp, span.succ { - background: var(--imp5); - color: var(--impt); - border: 1px solid var(--imp6); + background: var(--succ5); + color: var(--succt); + border: 1px solid var(--succ6); padding: 0.2em 0.5em; border-radius: 0.3em; } @@ -1911,7 +1911,7 @@ textarea.tran:focus, select.tran:focus, input.tran:focus { } .ciy-loading.succ { - background: var(--imp5); + background: var(--succ5); width: 100%; transition: all 0.5s; -webkit-transition: all 0.5s; @@ -2188,10 +2188,10 @@ fieldset.tips>div>ul>li { border-radius: 3px; } -.cata_imp { +.cata_imp, .cata_succ { color: white; font-size: 0.9em; - background: var(--imp6); + background: var(--succ6); padding: 0.2em 0.4em; border-radius: 3px; } diff --git a/zciyphp/comm.php b/zciyphp/comm.php index 6be90ed..09b996a 100644 --- a/zciyphp/comm.php +++ b/zciyphp/comm.php @@ -57,7 +57,8 @@ * file_down URL文件下载保存 * fileext 获取文件扩展名,如jpg */ - +if(isset($_SERVER['HTTP_CIY_TIMEOUT'])) + set_time_limit((int)$_SERVER['HTTP_CIY_TIMEOUT'] + 10); error_reporting(E_ALL); //0禁用错误输出;E_ALL打开错误输出 date_default_timezone_set('Asia/Shanghai');