lgy před 2 měsíci
rodič
revize
e3068fb4cb

+ 1 - 1
jcjyhr/config/buildadmin.php

@@ -7,7 +7,7 @@ return [
     // 允许跨域访问的域名
     'cors_request_domain'   => 'localhost,127.0.0.1',
     // 是否开启管理员登录图片验证码
-    'admin_login_captcha'   => true,
+    'admin_login_captcha'   => false,
     // 是否开启管理员登录点选验证码
     'admin_login_click_captcha'   => false,
     // 会员登录失败可重试次数,false则无限

+ 134 - 0
jcjyhr/vendor/topthink/think-orm/src/db/builder/Dm.php

@@ -0,0 +1,134 @@
+<?php
+// +----------------------------------------------------------------------
+// | ThinkPHP [ WE CAN DO IT JUST THINK ]
+// +----------------------------------------------------------------------
+// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
+// +----------------------------------------------------------------------
+// | Author: liu21st <liu21st@gmail.com>
+// +----------------------------------------------------------------------
+
+namespace think\db\builder;
+
+use think\db\BaseQuery;
+use think\db\BaseQuery as Query;
+use think\db\Builder;
+use think\db\Raw;
+
+/**
+ * Oracle数据库驱动
+ */
+class Dm extends Builder
+{
+    protected $insertAllSql = '%INSERT% INTO %TABLE% (%FIELD%) VALUES %DATA% %COMMENT%';
+    protected $updateSql    = 'UPDATE %TABLE% %JOIN% SET %SET% %WHERE% %ORDER%%LIMIT% %LOCK%%COMMENT%';
+
+    /**
+     * 生成insertall SQL
+     * @access public
+     * @param array     $dataSet 数据集
+     * @param array     $options 表达式
+     * @param bool      $replace 是否replace
+     * @return string
+     * @throws Exception
+     */
+    public function insertAll($dataSet, $options = [], $replace = false):string
+    {
+        // 获取合法的字段
+        if ('*' == $options['field']) {
+            $fields = array_keys($this->query->getFieldsType($options['table']));
+        } else {
+            $fields = $options['field'];
+        }
+        foreach ($dataSet as $data) {
+            foreach ($data as $key => $val) {
+                if (!in_array($key, $fields, true) &&  !in_array(  strtoupper($key),$fields, true)) {
+                    if ($options['strict']) {
+                        throw new \Exception('fields not exists:[' . $key . ']');
+                    }
+                    unset($data[$key]);
+                } elseif (is_null($val)) {
+                    $data[$key] = 'NULL';
+                } elseif (is_scalar($val)) {
+                    $data[$key] = $this->parseValue($val, $key);
+                } elseif (is_object($val) && method_exists($val, '__toString')) {
+                    // 对象数据写入
+                    $data[$key] = $val->__toString();
+                } else {
+                    // 过滤掉非标量数据
+                    unset($data[$key]);
+                }
+            }
+            $value    = array_values($data);
+            $values[] = '( ' . implode(',', $value) . ' )';
+
+            if (!isset($insertFields)) {
+                $insertFields = array_map([$this, 'parseKey'], array_keys($data));
+            }
+        }
+
+        return str_replace(
+            ['%INSERT%', '%TABLE%', '%FIELD%', '%DATA%', '%COMMENT%'],
+            [
+                $replace ? 'REPLACE' : 'INSERT',
+                $this->parseTable($options['table'], $options),
+                implode(' , ', $insertFields),
+                implode(' , ', $values),
+                $this->parseComment($options['comment']),
+            ], $this->insertAllSql);
+    }
+
+    /**
+     * 字段和表名处理
+     * @access protected
+     * @param mixed  $key
+     * @param array  $options
+     * @return string
+     */
+    public function parseKey(Query $query, string|int|Raw $key, bool $strict = false): string
+    {
+        if (is_numeric($key)) {
+            return $key;
+        } elseif ($key instanceof Expression) {
+            return $key->getValue();
+        }
+
+        $key = trim($key);
+        if (strpos($key, '$.') && false === strpos($key, '(')) {
+            // JSON字段支持
+            list($field, $name) = explode('$.', $key);
+            return 'json_extract(' . $field . ', \'$.' . $name . '\')';
+        } elseif (strpos($key, '.') && !preg_match('/[,\'\"\(\)`\s]/', $key)) {
+            list($table, $key) = explode('.', $key, 2);
+            if ('__TABLE__' == $table) {
+                $table = $this->query->getTable();
+            }
+            if (isset($options['alias'][$table])) {
+                $table = $options['alias'][$table];
+            }
+        }
+
+        if ($strict && !preg_match('/^[\w\.\*]+$/', $key)) {
+            throw new Exception('not support data:' . $key);
+        }
+        if ('*' != $key && ($strict || !preg_match('/[,\'\"\*\(\)`.\s]/', $key))) {
+            $key = '`' . $key . '`';
+        }
+        if (isset($table)) {
+            if (strpos($table, '.')) {
+                $table = str_replace('.', '`.`', $table);
+            }
+            $key = '`' . $table . '`.' . $key;
+        }
+        return $key;
+    }
+
+    /**
+     * 随机排序
+     * @access protected
+     * @return string
+     */
+    protected function parseRand(BaseQuery $query): string
+    {
+        return 'rand()';
+    }
+}

+ 165 - 0
jcjyhr/vendor/topthink/think-orm/src/db/connector/Dm.php

@@ -0,0 +1,165 @@
+<?php
+
+// +----------------------------------------------------------------------
+// | ThinkPHP [ WE CAN DO IT JUST THINK ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2006~2023 http://thinkphp.cn All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
+// +----------------------------------------------------------------------
+// | Author: liu21st <liu21st@gmail.com>
+// +----------------------------------------------------------------------
+declare(strict_types=1);
+
+namespace think\db\connector;
+
+use PDO;
+use think\db\PDOConnection;
+
+/**
+ * mysql数据库驱动.
+ */
+class Dm extends PDOConnection
+{
+    /**
+     * 解析pdo连接的dsn信息.
+     *
+     * @param array $config 连接信息
+     *
+     * @return string
+     */
+    protected function parseDsn(array $config): string
+    {
+        $dsn = 'dm:dbname=';
+        if (!empty($config['hostname'])) {
+            //  Oracle Instant Client
+            $dsn .= '//' . $config['hostname'] . ($config['hostport'] ? ':' . $config['hostport'] : '') . '/';
+        }
+        $dsn .= $config['database'];
+        if (!empty($config['charset'])) {
+            $dsn .= ';charset=' . $config['charset'];
+        }
+        return $dsn;
+    }
+
+    /**
+     * 取得数据表的字段信息.
+     *
+     * @param string $tableName
+     *
+     * @return array
+     */
+    public function getFields(string $tableName): array
+    {
+        [$tableName] = explode(' ', $tableName);
+
+        if (!str_contains($tableName, '`')) {
+            if (str_contains($tableName, '.')) {
+                $tableName = str_replace('.', '`.`', $tableName);
+            }
+            $tableName = '`' . $tableName . '`';
+        }
+
+        $sql    = 'SHOW FULL COLUMNS FROM ' . $tableName;
+        $pdo    = $this->getPDOStatement($sql);
+        $result = $pdo->fetchAll(PDO::FETCH_ASSOC);
+        $info   = [];
+
+        if (!empty($result)) {
+            foreach ($result as $key => $val) {
+                $val = array_change_key_case($val);
+
+                $info[$val['field']] = [
+                    'name'    => $val['field'],
+                    'type'    => $val['type'],
+                    'notnull' => 'NO' == $val['null'],
+                    'default' => $val['default'],
+                    'primary' => strtolower($val['key']) == 'pri',
+                    'autoinc' => strtolower($val['extra']) == 'auto_increment',
+                    'comment' => $val['comment'],
+                ];
+            }
+        }
+
+        return $this->fieldCase($info);
+    }
+
+    /**
+     * 取得数据库的表信息.
+     *
+     * @param string $dbName
+     *
+     * @return array
+     */
+    public function getTables(string $dbName = ''): array
+    {
+        $sql    = !empty($dbName) ? 'SHOW TABLES FROM ' . $dbName : 'SHOW TABLES ';
+        $pdo    = $this->getPDOStatement($sql);
+        $result = $pdo->fetchAll(PDO::FETCH_ASSOC);
+        $info   = [];
+
+        foreach ($result as $key => $val) {
+            $info[$key] = current($val);
+        }
+
+        return $info;
+    }
+
+    protected function supportSavepoint(): bool
+    {
+        return true;
+    }
+
+    /**
+     * 启动XA事务
+     *
+     * @param string $xid XA事务id
+     *
+     * @return void
+     */
+    public function startTransXa(string $xid): void
+    {
+        $this->initConnect(true);
+        $this->linkID->exec("XA START '$xid'");
+    }
+
+    /**
+     * 预编译XA事务
+     *
+     * @param string $xid XA事务id
+     *
+     * @return void
+     */
+    public function prepareXa(string $xid): void
+    {
+        $this->initConnect(true);
+        $this->linkID->exec("XA END '$xid'");
+        $this->linkID->exec("XA PREPARE '$xid'");
+    }
+
+    /**
+     * 提交XA事务
+     *
+     * @param string $xid XA事务id
+     *
+     * @return void
+     */
+    public function commitXa(string $xid): void
+    {
+        $this->initConnect(true);
+        $this->linkID->exec("XA COMMIT '$xid'");
+    }
+
+    /**
+     * 回滚XA事务
+     *
+     * @param string $xid XA事务id
+     *
+     * @return void
+     */
+    public function rollbackXa(string $xid): void
+    {
+        $this->initConnect(true);
+        $this->linkID->exec("XA ROLLBACK '$xid'");
+    }
+}

+ 3 - 3
jcjyhr/web/.env.development

@@ -10,12 +10,12 @@ VITE_BASE_PATH = './'
 # 本地环境接口地址 - 尾部无需带'/'
 # VITE_AXIOS_BASE_URL = 'http://localhost:8000'
 # 测试服
-# VITE_AXIOS_BASE_URL = 'http://36.140.148.147:8001' 
+# VITE_AXIOS_BASE_URL = 'http://36.140.148.147:8001'
 # VITE_AXIOS_BASE_URL = 'http://192.168.1.20:8000'
 
 # 开发环境下跨域代理,请输入要跨域的api地址 - 尾部无需带'/'
 # VITE_PROXY_URL = 'http://36.140.148.147:8001'
 # VITE_PROXY_URL = 'http://192.168.1.103:8000'
 # VITE_PROXY_URL = 'http://192.168.1.20:8000'
-VITE_PROXY_URL = 'https://8001.pacsonline.cn'
-VITE_AXIOS_BASE_URL = 'https://8001.pacsonline.cn'
+VITE_PROXY_URL = 'http://localhost:812/'
+VITE_AXIOS_BASE_URL = 'http://localhost:812/'

+ 2 - 2
jcjyhr/web/package-lock.json

@@ -42,7 +42,7 @@
         "@types/sortablejs": "1.15.8",
         "@typescript-eslint/eslint-plugin": "7.12.0",
         "@typescript-eslint/parser": "7.12.0",
-        "@vitejs/plugin-vue": "5.0.5",
+        "@vitejs/plugin-vue": "^5.0.5",
         "async-validator": "4.2.5",
         "eslint": "8.56.0",
         "eslint-config-prettier": "9.1.0",
@@ -1193,7 +1193,7 @@
     },
     "node_modules/@vitejs/plugin-vue": {
       "version": "5.0.5",
-      "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.0.5.tgz",
+      "resolved": "https://registry.npmmirror.com/@vitejs/plugin-vue/-/plugin-vue-5.0.5.tgz",
       "integrity": "sha512-LOjm7XeIimLBZyzinBQ6OSm3UBCNVCpLkxGC0oWmm2YPzVZoxMsdvNVimLTBzpAnR9hl/yn1SHGuRfe6/Td9rQ==",
       "dev": true,
       "engines": {

+ 1 - 1
jcjyhr/web/package.json

@@ -45,7 +45,7 @@
     "@types/sortablejs": "1.15.8",
     "@typescript-eslint/eslint-plugin": "7.12.0",
     "@typescript-eslint/parser": "7.12.0",
-    "@vitejs/plugin-vue": "5.0.5",
+    "@vitejs/plugin-vue": "^5.0.5",
     "async-validator": "4.2.5",
     "eslint": "8.56.0",
     "eslint-config-prettier": "9.1.0",

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 523 - 838
jcjyhr/web/yarn.lock


Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů