commit 8d1d44bee72340bef373f5e32d7923d2098ddeff Author: Your Name Date: Thu Jan 16 17:47:49 2025 +0800 init diff --git a/MySQL/config/my.cnf b/MySQL/config/my.cnf new file mode 100755 index 0000000..18cc368 --- /dev/null +++ b/MySQL/config/my.cnf @@ -0,0 +1,10 @@ +[mysqld] +user=mysql +default-storage-engine=INNODB +character-set-server=utf8 + +[client] +default-character-set=utf8 + +[mysql] +default-character-set=utf8 \ No newline at end of file diff --git a/MySQL/docker-entrypoint-initdb.d/sims.sql b/MySQL/docker-entrypoint-initdb.d/sims.sql new file mode 100755 index 0000000..d320dc9 --- /dev/null +++ b/MySQL/docker-entrypoint-initdb.d/sims.sql @@ -0,0 +1,336 @@ +-- MySQL dump 10.13 Distrib 5.7.44, for Linux (x86_64) +-- +-- Host: localhost Database: sims +-- ------------------------------------------------------ +-- Server version 5.7.44 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `Student` +-- + +DROP TABLE IF EXISTS `Student`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `Student` ( + `SNo` int(11) NOT NULL, + `SName` varchar(100) NOT NULL, + `Gender` varchar(100) NOT NULL, + `Birthday` date NOT NULL, + `Mobile` varchar(100) NOT NULL, + `Email` varchar(100) NOT NULL, + `Address` varchar(500) NOT NULL, + `Image` varchar(200) DEFAULT NULL, + PRIMARY KEY (`SNo`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `Student` +-- + +LOCK TABLES `Student` WRITE; +/*!40000 ALTER TABLE `Student` DISABLE KEYS */; +INSERT INTO `Student` VALUES (95001,'王进','男','2020-02-01','13900998877','wangjin@abc.com','江苏省南京市溧水区宝塔路11号','e8ec33473c6d16a19d280b8dc634758c.jpg'),(95002,'李四','女','1994-07-25','13462312498','lisi@sohu.com','上海市徐汇区漕宝路99弄',NULL),(95003,'陈鹏','男','1995-03-04','18987123123','chenpeng@163.com','上海市闵行区银都路294号',NULL),(95004,'张丽','男','1995-03-05','13482034096','zhangli@iLync.cn','上海市徐汇区习勤路100弄',NULL),(95005,'刘向东','女','1995-03-06','13787123123','liuxiangdong@iLync.cn','上海市闵行区春申路295号',NULL),(95006,'李明博','男','1995-03-07','18932178905','zhangzhiqiang@sina.com','上海市徐汇区柳州路101弄',NULL),(95007,'张子强','男','1995-03-08','17600715247','wwh@live.cn','上海市闵行区虹梅南路296号',NULL),(95008,'王文海','女','1995-03-09','18238391838','65212321@qq.com','上海市徐汇区龙漕路102弄',NULL),(95009,'刘慧娟','男','1995-03-10','18876068428','liuhuijuan@iLync.cn','上海市闵行区颛兴东路297号',NULL),(95010,'陈敏','女','1995-03-11','13513745019','chenming@sohu.com','上海市徐汇区桂林路103弄','dae3aa26a0c8cfa950e6cbb98425b9d8.jpg'),(95011,'王云','女','1995-03-12','13051421609','wangyun@gmail.com','上海市闵行区开发区大道298号','1fec845b4fc9065c249914047c2e32c7.jpg'),(95012,'沈璐','男','1995-03-13','13889098199','shenlu@iLync.cn','上海市徐汇区田东路104弄','8892f98a849bdcc06eece1738d47c2bf.jpg'),(95013,'赵鹏飞','男','1995-03-14','15026774790','chenpengfei@iLync.cn','上海市闵行区都市路99号','76c0581ba6f7c8d637f971be17848ef3.jpg'),(95014,'谢朝阳','女','1995-03-15','18064451380','xiechaoyang@sohu.com','上海市徐汇区钦州北路105弄',NULL),(95015,'刘子歌','男','1995-03-16','13902127970','6533422@qq.com','上海市闵行区都会路300号',NULL),(95016,'陈照升','男','1995-03-17','13339804561','chenzs@iLync.cn','上海市徐汇区中山北路106弄',NULL),(95017,'秦小路','女','1995-03-18','13477481151','qinxl@sina.com','上海市闵行区都庄路301号',NULL),(95018,'张大宝','男','1995-03-19','13915157742','zhangdb@sohu.com','上海市徐汇区桂林东街107弄',NULL),(95019,'刘佳','男','1995-03-20','13352834332','liujia@sohu.com','上海市闵行区剑川路302号',NULL),(95020,'李伟','女','1995-03-21','15990510922','lw@263.com','上海市徐汇区桂林西街108弄',NULL),(95021,'杨荣','男','1995-05-31','13522341234','yangrong@iLync.cn','江苏省泰州市姜堰区华港镇254号',NULL); +/*!40000 ALTER TABLE `Student` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `auth_group` +-- + +DROP TABLE IF EXISTS `auth_group`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `auth_group` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(80) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `name` (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `auth_group` +-- + +LOCK TABLES `auth_group` WRITE; +/*!40000 ALTER TABLE `auth_group` DISABLE KEYS */; +/*!40000 ALTER TABLE `auth_group` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `auth_group_permissions` +-- + +DROP TABLE IF EXISTS `auth_group_permissions`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `auth_group_permissions` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `group_id` int(11) NOT NULL, + `permission_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `auth_group_permissions_group_id_permission_id_0cd325b0_uniq` (`group_id`,`permission_id`), + KEY `auth_group_permissio_permission_id_84c5c92e_fk_auth_perm` (`permission_id`), + CONSTRAINT `auth_group_permissio_permission_id_84c5c92e_fk_auth_perm` FOREIGN KEY (`permission_id`) REFERENCES `auth_permission` (`id`), + CONSTRAINT `auth_group_permissions_group_id_b120cbf9_fk_auth_group_id` FOREIGN KEY (`group_id`) REFERENCES `auth_group` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `auth_group_permissions` +-- + +LOCK TABLES `auth_group_permissions` WRITE; +/*!40000 ALTER TABLE `auth_group_permissions` DISABLE KEYS */; +/*!40000 ALTER TABLE `auth_group_permissions` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `auth_permission` +-- + +DROP TABLE IF EXISTS `auth_permission`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `auth_permission` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `content_type_id` int(11) NOT NULL, + `codename` varchar(100) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `auth_permission_content_type_id_codename_01ab375a_uniq` (`content_type_id`,`codename`), + CONSTRAINT `auth_permission_content_type_id_2f476e4b_fk_django_co` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8mb4; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `auth_permission` +-- + +LOCK TABLES `auth_permission` WRITE; +/*!40000 ALTER TABLE `auth_permission` DISABLE KEYS */; +INSERT INTO `auth_permission` VALUES (1,'Can add log entry',1,'add_logentry'),(2,'Can change log entry',1,'change_logentry'),(3,'Can delete log entry',1,'delete_logentry'),(4,'Can view log entry',1,'view_logentry'),(5,'Can add permission',2,'add_permission'),(6,'Can change permission',2,'change_permission'),(7,'Can delete permission',2,'delete_permission'),(8,'Can view permission',2,'view_permission'),(9,'Can add group',3,'add_group'),(10,'Can change group',3,'change_group'),(11,'Can delete group',3,'delete_group'),(12,'Can view group',3,'view_group'),(13,'Can add user',4,'add_user'),(14,'Can change user',4,'change_user'),(15,'Can delete user',4,'delete_user'),(16,'Can view user',4,'view_user'),(17,'Can add content type',5,'add_contenttype'),(18,'Can change content type',5,'change_contenttype'),(19,'Can delete content type',5,'delete_contenttype'),(20,'Can view content type',5,'view_contenttype'),(21,'Can add session',6,'add_session'),(22,'Can change session',6,'change_session'),(23,'Can delete session',6,'delete_session'),(24,'Can view session',6,'view_session'),(25,'Can add student',7,'add_student'),(26,'Can change student',7,'change_student'),(27,'Can delete student',7,'delete_student'),(28,'Can view student',7,'view_student'); +/*!40000 ALTER TABLE `auth_permission` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `auth_user` +-- + +DROP TABLE IF EXISTS `auth_user`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `auth_user` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `password` varchar(128) NOT NULL, + `last_login` datetime(6) DEFAULT NULL, + `is_superuser` tinyint(1) NOT NULL, + `username` varchar(150) NOT NULL, + `first_name` varchar(30) NOT NULL, + `last_name` varchar(150) NOT NULL, + `email` varchar(254) NOT NULL, + `is_staff` tinyint(1) NOT NULL, + `is_active` tinyint(1) NOT NULL, + `date_joined` datetime(6) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `username` (`username`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `auth_user` +-- + +LOCK TABLES `auth_user` WRITE; +/*!40000 ALTER TABLE `auth_user` DISABLE KEYS */; +/*!40000 ALTER TABLE `auth_user` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `auth_user_groups` +-- + +DROP TABLE IF EXISTS `auth_user_groups`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `auth_user_groups` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `group_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `auth_user_groups_user_id_group_id_94350c0c_uniq` (`user_id`,`group_id`), + KEY `auth_user_groups_group_id_97559544_fk_auth_group_id` (`group_id`), + CONSTRAINT `auth_user_groups_group_id_97559544_fk_auth_group_id` FOREIGN KEY (`group_id`) REFERENCES `auth_group` (`id`), + CONSTRAINT `auth_user_groups_user_id_6a12ed8b_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `auth_user_groups` +-- + +LOCK TABLES `auth_user_groups` WRITE; +/*!40000 ALTER TABLE `auth_user_groups` DISABLE KEYS */; +/*!40000 ALTER TABLE `auth_user_groups` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `auth_user_user_permissions` +-- + +DROP TABLE IF EXISTS `auth_user_user_permissions`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `auth_user_user_permissions` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `permission_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `auth_user_user_permissions_user_id_permission_id_14a6b632_uniq` (`user_id`,`permission_id`), + KEY `auth_user_user_permi_permission_id_1fbb5f2c_fk_auth_perm` (`permission_id`), + CONSTRAINT `auth_user_user_permi_permission_id_1fbb5f2c_fk_auth_perm` FOREIGN KEY (`permission_id`) REFERENCES `auth_permission` (`id`), + CONSTRAINT `auth_user_user_permissions_user_id_a95ead1b_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `auth_user_user_permissions` +-- + +LOCK TABLES `auth_user_user_permissions` WRITE; +/*!40000 ALTER TABLE `auth_user_user_permissions` DISABLE KEYS */; +/*!40000 ALTER TABLE `auth_user_user_permissions` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `django_admin_log` +-- + +DROP TABLE IF EXISTS `django_admin_log`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `django_admin_log` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `action_time` datetime(6) NOT NULL, + `object_id` longtext, + `object_repr` varchar(200) NOT NULL, + `action_flag` smallint(5) unsigned NOT NULL, + `change_message` longtext NOT NULL, + `content_type_id` int(11) DEFAULT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `django_admin_log_content_type_id_c4bce8eb_fk_django_co` (`content_type_id`), + KEY `django_admin_log_user_id_c564eba6_fk_auth_user_id` (`user_id`), + CONSTRAINT `django_admin_log_content_type_id_c4bce8eb_fk_django_co` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`), + CONSTRAINT `django_admin_log_user_id_c564eba6_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `django_admin_log` +-- + +LOCK TABLES `django_admin_log` WRITE; +/*!40000 ALTER TABLE `django_admin_log` DISABLE KEYS */; +/*!40000 ALTER TABLE `django_admin_log` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `django_content_type` +-- + +DROP TABLE IF EXISTS `django_content_type`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `django_content_type` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `app_label` varchar(100) NOT NULL, + `model` varchar(100) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `django_content_type_app_label_model_76bd3d3b_uniq` (`app_label`,`model`) +) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `django_content_type` +-- + +LOCK TABLES `django_content_type` WRITE; +/*!40000 ALTER TABLE `django_content_type` DISABLE KEYS */; +INSERT INTO `django_content_type` VALUES (1,'admin','logentry'),(3,'auth','group'),(2,'auth','permission'),(4,'auth','user'),(5,'contenttypes','contenttype'),(6,'sessions','session'),(7,'sims','student'); +/*!40000 ALTER TABLE `django_content_type` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `django_migrations` +-- + +DROP TABLE IF EXISTS `django_migrations`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `django_migrations` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `app` varchar(255) NOT NULL, + `name` varchar(255) NOT NULL, + `applied` datetime(6) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `django_migrations` +-- + +LOCK TABLES `django_migrations` WRITE; +/*!40000 ALTER TABLE `django_migrations` DISABLE KEYS */; +INSERT INTO `django_migrations` VALUES (1,'contenttypes','0001_initial','2024-12-20 08:26:13.110217'),(2,'auth','0001_initial','2024-12-20 08:26:14.077220'),(3,'admin','0001_initial','2024-12-20 08:26:14.310216'),(4,'admin','0002_logentry_remove_auto_add','2024-12-20 08:26:14.325216'),(5,'admin','0003_logentry_add_action_flag_choices','2024-12-20 08:26:14.347215'),(6,'contenttypes','0002_remove_content_type_name','2024-12-20 08:26:14.477216'),(7,'auth','0002_alter_permission_name_max_length','2024-12-20 08:26:14.550215'),(8,'auth','0003_alter_user_email_max_length','2024-12-20 08:26:14.586216'),(9,'auth','0004_alter_user_username_opts','2024-12-20 08:26:14.601214'),(10,'auth','0005_alter_user_last_login_null','2024-12-20 08:26:14.669215'),(11,'auth','0006_require_contenttypes_0002','2024-12-20 08:26:14.681214'),(12,'auth','0007_alter_validators_add_error_messages','2024-12-20 08:26:14.696217'),(13,'auth','0008_alter_user_username_max_length','2024-12-20 08:26:14.770216'),(14,'auth','0009_alter_user_last_name_max_length','2024-12-20 08:26:14.841235'),(15,'sessions','0001_initial','2024-12-20 08:26:14.930216'),(16,'sims','0001_initial','2024-12-20 08:26:15.037217'); +/*!40000 ALTER TABLE `django_migrations` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `django_session` +-- + +DROP TABLE IF EXISTS `django_session`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `django_session` ( + `session_key` varchar(40) NOT NULL, + `session_data` longtext NOT NULL, + `expire_date` datetime(6) NOT NULL, + PRIMARY KEY (`session_key`), + KEY `django_session_expire_date_a5c62663` (`expire_date`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `django_session` +-- + +LOCK TABLES `django_session` WRITE; +/*!40000 ALTER TABLE `django_session` DISABLE KEYS */; +/*!40000 ALTER TABLE `django_session` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2024-12-26 16:58:05 diff --git a/README.md b/README.md new file mode 100755 index 0000000..fc6235f --- /dev/null +++ b/README.md @@ -0,0 +1,18 @@ +## 环境信息 + +Python版本:Python 3.7 + +Django版本:2.1.4 + +Vue版本:2.6.11 + +Element版本:2.13.0 + +数据库:MySQL 5.7 + + + +后端编辑器:PyCharm + +前端编辑器:VS code 插件:`Vue 2 Snippets` + `Live Server` + diff --git a/apps/__init__.py b/apps/__init__.py new file mode 100755 index 0000000..e69de29 diff --git a/apps/sims/__init__.py b/apps/sims/__init__.py new file mode 100755 index 0000000..c876c78 --- /dev/null +++ b/apps/sims/__init__.py @@ -0,0 +1,2 @@ +import pymysql +pymysql.install_as_MySQLdb() \ No newline at end of file diff --git a/apps/sims/__pycache__/__init__.cpython-37.pyc b/apps/sims/__pycache__/__init__.cpython-37.pyc new file mode 100755 index 0000000..32e286a Binary files /dev/null and b/apps/sims/__pycache__/__init__.cpython-37.pyc differ diff --git a/apps/sims/__pycache__/admin.cpython-37.pyc b/apps/sims/__pycache__/admin.cpython-37.pyc new file mode 100755 index 0000000..b082407 Binary files /dev/null and b/apps/sims/__pycache__/admin.cpython-37.pyc differ diff --git a/apps/sims/__pycache__/models.cpython-37.pyc b/apps/sims/__pycache__/models.cpython-37.pyc new file mode 100755 index 0000000..c36e071 Binary files /dev/null and b/apps/sims/__pycache__/models.cpython-37.pyc differ diff --git a/apps/sims/__pycache__/views.cpython-37.pyc b/apps/sims/__pycache__/views.cpython-37.pyc new file mode 100755 index 0000000..95e3fdd Binary files /dev/null and b/apps/sims/__pycache__/views.cpython-37.pyc differ diff --git a/apps/sims/admin.py b/apps/sims/admin.py new file mode 100755 index 0000000..ea5d68b --- /dev/null +++ b/apps/sims/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/apps/sims/apps.py b/apps/sims/apps.py new file mode 100755 index 0000000..770bdc1 --- /dev/null +++ b/apps/sims/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class SimsConfig(AppConfig): + name = 'apps.sims' diff --git a/apps/sims/migrations/0001_initial.py b/apps/sims/migrations/0001_initial.py new file mode 100755 index 0000000..2c1b9c7 --- /dev/null +++ b/apps/sims/migrations/0001_initial.py @@ -0,0 +1,31 @@ +# Generated by Django 2.1.4 on 2024-12-20 08:23 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='Student', + fields=[ + ('sno', models.IntegerField(db_column='SNo', primary_key=True, serialize=False)), + ('name', models.CharField(db_column='SName', max_length=100)), + ('gender', models.CharField(choices=[('男', '男'), ('女', '女')], db_column='Gender', max_length=100)), + ('birthday', models.DateField(db_column='Birthday')), + ('mobile', models.CharField(db_column='Mobile', max_length=100)), + ('email', models.CharField(db_column='Email', max_length=100)), + ('address', models.CharField(db_column='Address', max_length=500)), + ('image', models.CharField(db_column='Image', max_length=200, null=True)), + ], + options={ + 'db_table': 'Student', + 'managed': True, + }, + ), + ] diff --git a/apps/sims/migrations/__init__.py b/apps/sims/migrations/__init__.py new file mode 100755 index 0000000..e69de29 diff --git a/apps/sims/migrations/__pycache__/0001_initial.cpython-37.pyc b/apps/sims/migrations/__pycache__/0001_initial.cpython-37.pyc new file mode 100755 index 0000000..31bc630 Binary files /dev/null and b/apps/sims/migrations/__pycache__/0001_initial.cpython-37.pyc differ diff --git a/apps/sims/migrations/__pycache__/__init__.cpython-37.pyc b/apps/sims/migrations/__pycache__/__init__.cpython-37.pyc new file mode 100755 index 0000000..119b34f Binary files /dev/null and b/apps/sims/migrations/__pycache__/__init__.cpython-37.pyc differ diff --git a/apps/sims/models.py b/apps/sims/models.py new file mode 100755 index 0000000..7d0472b --- /dev/null +++ b/apps/sims/models.py @@ -0,0 +1,27 @@ +from django.db import models + +# Create your models here. +# student: 学号,姓名,性别,出生日期,手机号码,邮箱地址,家庭住址,照片 + + +# 创建一个类,类属性映射表字段 +class Student(models.Model): + gender_choices = (('男','男'),('女','女')) + sno = models.IntegerField(db_column="SNo", primary_key=True, null=False) # 学号,不允许为空,主键 + name = models.CharField(db_column="SName", max_length=100, null=False) # 姓名,最长100个字符,不允许为空 + gender = models.CharField(db_column="Gender",max_length=100,choices=gender_choices) # 性别,选项选择 + birthday = models.DateField(db_column="Birthday", null=False) # 出生日期,不允许为空 + mobile = models.CharField(db_column="Mobile", max_length=100) # 手机号码, + email = models.CharField(db_column="Email",max_length=100) # 邮箱地址 + address = models.CharField(db_column="Address",max_length=500) # 家庭住址 + image = models.CharField(db_column="Image", max_length=200,null=True) # 照片 + + # 在默认情况下,生成的表名:App_class, 如果要自定义 ,需要使用Class Meta来自定义 + class Meta: + managed = True + db_table = "Student" + + # __str__方法 + def __str__(self): + return "学号:%s\t姓名:%s\t性别:%s" %(self.sno,self.name,self.gender) + diff --git a/apps/sims/tests.py b/apps/sims/tests.py new file mode 100755 index 0000000..de8bdc0 --- /dev/null +++ b/apps/sims/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/apps/sims/views.py b/apps/sims/views.py new file mode 100755 index 0000000..d541acf --- /dev/null +++ b/apps/sims/views.py @@ -0,0 +1,323 @@ +from django.shortcuts import render +# 引入 Student 的类 +from sims.models import Student +# 引入 JsonResponse 模块 +from django.http import JsonResponse +# 导入 json 模块 +import json +# 导入 Q 查询 +from django.db.models import Q +# 导入 uuid 类 +import uuid +# 导入哈希库 +import hashlib +# 导入setting +from django.conf import settings +# 导入os +import os +# 导入 openpyxl +import openpyxl + + +# Create your views here. + + +def get_students(request): + """" 获取所有学生的信息 """ + try: + # 使用 ORM 获取所有学生信息 + obj_students = Student.objects.all().values() + # 把结果转为 List + students = list(obj_students) + # 返回 + return JsonResponse({'code': 1, 'data': students}) + except Exception as e: + # 如果出现异常返回 + return JsonResponse({'code': 0, 'msg': "获取学生信息出现异常:" + str(e)}) + + +def query_students(request): + """" 查询学生的信息 """ + # 接收传递过来的关键字 --- axios默认是json --- 转换为字典类型('inputstr') --- data['inputstr'] + data = json.loads(request.body.decode('utf-8')) + try: + # 使用ORM获取满足条件的学生信息 并把对象转为字典格式 + obj_students = Student.objects.filter(Q(sno__icontains=data['inputstr']) | Q(name__icontains=data['inputstr']) | + Q(gender__icontains=data['inputstr']) | Q( + mobile__icontains=data['inputstr']) + | Q(email__icontains=data['inputstr']) | Q( + address__icontains=data['inputstr'])).values() + # 把结果转为 List + students = list(obj_students) + # 返回 + return JsonResponse({'code': 1, 'data': students}) + except Exception as e: + # 如果出现异常返回 + return JsonResponse({'code': 0, 'msg': "获取学生信息出现异常:" + str(e)}) + + +def is_exists_sno(request): + """判断学号是否存在""" + # 接收传递过来的学号 + data = json.loads(request.body.decode('utf-8')) + try: + obj_students = Student.objects.filter(sno=data['sno']) + if obj_students.count() == 0: + return JsonResponse({'code': 1, 'exists': False}) + else: + return JsonResponse({'code': 1, 'exists': True}) + except Exception as e: + return JsonResponse({'code': 0, 'msg': "校验学号失败,失败原因:" + str(e)}) + + +def add_student(request): + """" 添加学生信息到数据库 """ + # 接收传递过来的值 + data = json.loads(request.body.decode('utf-8')) + try: + # 添加到数据库 + obj_student = Student(sno=data['sno'], + name=data['name'], + gender=data['gender'], + birthday=data['birthday'], + mobile=data['mobile'], + email=data['email'], + address=data['address'], + image=data['image'] + ) + # 执行添加 + obj_student.save() + + # 使用 ORM 获取所有学生信息 + obj_students = Student.objects.all().values() + # 把结果转为 List + students = list(obj_students) + # 返回 + return JsonResponse({'code': 1, 'data': students}) + except Exception as e: + # 如果出现异常返回 + return JsonResponse({'code': 0, 'msg': "添加学生信息到数据库出现异常,原因如下:" + str(e)}) + + +def update_student(request): + """" 更新学生信息到数据库 """ + # 接收传递过来的值 + data = json.loads(request.body.decode('utf-8')) + try: + # 查找到要修改的学生信息 + obj_student = Student.objects.get(sno=data['sno']) + # 依次修改 + obj_student.name = data['name'] + obj_student.gender = data['gender'] + obj_student.birthday = data['birthday'] + obj_student.mobile = data['mobile'] + obj_student.email = data['email'] + obj_student.address = data['address'] + obj_student.image = data['image'] + # 保存 + obj_student.save() + + # 使用 ORM 获取所有学生信息 + obj_students = Student.objects.all().values() + # 把结果转为 List + students = list(obj_students) + # 返回 + return JsonResponse({'code': 1, 'data': students}) + except Exception as e: + # 如果出现异常返回 + return JsonResponse({'code': 0, 'msg': "修改学生信息到数据库出现异常,原因如下:" + str(e)}) + + +def delete_student(request): + """" 删除一条学生信息 """ + # 接收传递过来的值 + data = json.loads(request.body.decode('utf-8')) + try: + # 查找到要删除的学生信息 + obj_student = Student.objects.get(sno=data['sno']) + # 删除 + obj_student.delete(); + + # 使用 ORM 获取所有学生信息 + obj_students = Student.objects.all().values() + # 把结果转为 List + students = list(obj_students) + # 返回 + return JsonResponse({'code': 1, 'data': students}) + except Exception as e: + # 如果出现异常返回 + return JsonResponse({'code': 0, 'msg': "删除学生信息写入数据库出现异常,原因如下:" + str(e)}) + + +def delete_students(request): + """" 批量删除学生信息 """ + # 接收传递过来的值 + data = json.loads(request.body.decode('utf-8')) + try: + # 遍历传递的集合 + for one_student in data['student']: + # 查询当前记录 + obj_student = Student.objects.get(sno=one_student['sno']) + # 执行删除 + obj_student.delete() + # 获取最后的结果 + # 使用 ORM 获取所有学生信息 + obj_students = Student.objects.all().values() + # 把结果转为 List + students = list(obj_students) + # 返回 + return JsonResponse({'code': 1, 'data': students}) + except Exception as e: + # 如果出现异常返回 + return JsonResponse({'code': 0, 'msg': "批量删除学生信息写入数据库出现异常,原因如下:" + str(e)}) + + +def upload(request): + """接收上传的文件""" + # 接收上传的文件 + rev_file = request.FILES.get('avatar') + # 判断,是否有文件 + if not rev_file: + return JsonResponse({'code': 0, 'msg': '图片不存在!'}) + # 获得一个唯一的名字: uuid +hash + new_name = get_random_str() + # 准备写入的URL + file_path = os.path.join(settings.MEDIA_ROOT, new_name + os.path.splitext(rev_file.name)[1]) + # 开始写入到本次磁盘 + try: + f = open(file_path, 'wb') + # 多次写入 + for i in rev_file.chunks(): + f.write(i) + # 要关闭 + f.close() + # 返回 + return JsonResponse({'code': 1, 'name': new_name + os.path.splitext(rev_file.name)[1]}) + + except Exception as e: + return JsonResponse({'code': 0, 'msg': str(e)}) + + +def get_random_str(): + # 获取uuid的随机数 + uuid_val = uuid.uuid4() + # 获取uuid的随机数字符串 + uuid_str = str(uuid_val).encode('utf-8') + # 获取md5实例 + md5 = hashlib.md5() + # 拿取uuid的md5摘要 + md5.update(uuid_str) + # 返回固定长度的字符串 + return md5.hexdigest() + + +def import_students_excel(request): + """ 从 excel 批量导入学生信息 """ + # 1. 接收 excel 文件存储到 Media 文件夹 + rev_file = request.FILES.get('excel') + # 判断,是否有文件 + if not rev_file: + return JsonResponse({'code': 0, 'msg': 'excel文件不存在!'}) + # 获得一个唯一的名字: uuid +hash + new_name = get_random_str() + # 准备写入的URL + file_path = os.path.join(settings.MEDIA_ROOT, new_name + os.path.splitext(rev_file.name)[1]) + # 开始写入到本次磁盘 + try: + f = open(file_path, 'wb') + # 多次写入 + for i in rev_file.chunks(): + f.write(i) + # 要关闭 + f.close() + except Exception as e: + return JsonResponse({'code': 0, 'msg': str(e)}) + # 2. 读取存储在 Media 的文件 + ex_students = read_excel_dict(file_path) + # 3. 把读取的数据存储到数据库 + success = 0 + error = 0 + error_snos = [] + + # 开始遍历 + for one_student in ex_students: + try: + obj_student = Student.objects.create(sno=one_student['sno'], + name=one_student['name'], + gender=one_student['gender'], + birthday=one_student['birthday'], + mobile=one_student['mobile'], + email=one_student['email'], + address=one_student['address']) + # 保存 + obj_student.save() + # 计数 + success += 1 + except: + # 如果失败了 + error += 1 + error_snos.append(one_student['sno']) + + # 4. 返回导入的信息 + obj_student = Student.objects.all().values() + students = list(obj_student) + return JsonResponse({'code':1, 'success': success, 'error': error, 'errors': error_snos, 'data': students}) + + +def write_to_excel(data:list, path:str): + """把数据库写入到Excel""" + # 实例化一个workbook + workbook = openpyxl.Workbook() + # 激活一个sheet + sheet = workbook.active + # 为sheet命名 + sheet.title = 'student' + # 准备keys + keys = data[0].keys() + # 准备写入数据 + for index, item in enumerate(data): + # 遍历每一个元素 + for k,v in enumerate(keys): + sheet.cell(row=index + 1, column=k+ 1, value=str(item[v])) + # 写入到文件 + workbook.save(path) + + +def read_excel_dict(path: str): + """ 读取 Excel 文件存储为字典""" + # 实例化一个workbook + workbook = openpyxl.load_workbook(path) + # 实例化一个sheet + sheet = workbook['student'] + # 定义一个变量存储最终的数据 + students = [] + # 准备key + keys = ['sno', 'name', 'gender', 'birthday', 'mobile', 'email', 'address'] + # 遍历 + for row in sheet.rows: + # 定义一个临时字典 + temp_dict = {} + # 组合值和key + for index, cell in enumerate(row): + # 组合 + temp_dict[keys[index]] = cell.value + # 附加到 list 中 + students.append(temp_dict) + # 返回 + return students + + +def export_students_excel(request): + """到处数据到excel""" + # 获取所有的学生信息 + obj_students = Student.objects.all().values() + # 转为List + students = list(obj_students) + # 准备名称 + excel_name = get_random_str() + ".xlsx" + # 准备写入的路劲 + path = os.path.join(settings.MEDIA_ROOT, excel_name) + # 写入到Excel + write_to_excel(students, path) + # 返回 + return JsonResponse({'code':1, 'name':excel_name }) diff --git a/db.sqlite3 b/db.sqlite3 new file mode 100755 index 0000000..e69de29 diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100755 index 0000000..970df1c --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,71 @@ +version: '3' +services: + simsdb: + image: registry.cn-hangzhou.aliyuncs.com/hzbb/mysql:5.7.44 + restart: always + container_name: simsdb + environment: + TZ: Asia/Shanghai + MYSQL_DATABASE: sims + MYSQL_USER: test + MYSQL_PASSWORD: admin@123456 + MYSQL_ROOT_PASSWORD: admin@123456 + ports: + - 3306:3306 + volumes: + - ./MySQL/data:/var/lib/mysql + - ./MySQL/config/my.cnf:/etc/mysql/my.cnf + - ./MySQL/mysql-files:/var/lib/mysql-files + - ./MySQL/docker-entrypoint-initdb.d/:/docker-entrypoint-initdb.d/ + command: + --max_connections=1000 + --character-set-server=utf8mb4 + --collation-server=utf8mb4_general_ci + --default-authentication-plugin=mysql_native_password + + simsbe: + image: registry.cn-hangzhou.aliyuncs.com/hzbb/python:3.7.0 + restart: always + hostname: simsbe + container_name: simsbe + volumes: + - ./:/simsBE + - ./module:/module + depends_on: + - simsdb + environment: + - TZ=Asia/Shanghai + command: bash /module/run.sh + healthcheck: + test: ["CMD", "curl", "-f", "http://127.0.0.1:8000/students/"] + interval: 20s + timeout: 5s + retries: 3 + start_period: 10s + + simsfe: + image: registry.cn-hangzhou.aliyuncs.com/hzbb/nginx:1.26.0 + restart: always + container_name: simsfe + environment: + TZ: Asia/Shanghai + ports: + - 80:80 + - 443:443 + depends_on: + - simsbe + - simsdb + volumes: + - ./nginx/nginx.conf:/etc/nginx/nginx.conf + - ./nginx/conf.d:/etc/nginx/conf.d + - ./nginx/cert:/etc/nginx/cert + - ./front:/simsFE + + autoheal: + image: registry.cn-hangzhou.aliyuncs.com/hzbb/autoheal:1.2.0 + restart: always + container_name: sims-autoheal + environment: + - AUTOHEAL_CONTAINER_LABEL=all + volumes: + - /var/run/docker.sock:/var/run/docker.sock diff --git a/front/cdn/axios.min.js b/front/cdn/axios.min.js new file mode 100755 index 0000000..98424a4 --- /dev/null +++ b/front/cdn/axios.min.js @@ -0,0 +1,2 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).axios=t()}(this,(function(){"use strict";function e(e){var r,n;function o(r,n){try{var a=e[r](n),u=a.value,s=u instanceof t;Promise.resolve(s?u.v:u).then((function(t){if(s){var n="return"===r?"return":"next";if(!u.k||t.done)return o(n,t);t=e[n](t).value}i(a.done?"return":"normal",t)}),(function(e){o("throw",e)}))}catch(e){i("throw",e)}}function i(e,t){switch(e){case"return":r.resolve({value:t,done:!0});break;case"throw":r.reject(t);break;default:r.resolve({value:t,done:!1})}(r=r.next)?o(r.key,r.arg):n=null}this._invoke=function(e,t){return new Promise((function(i,a){var u={key:e,arg:t,resolve:i,reject:a,next:null};n?n=n.next=u:(r=n=u,o(e,t))}))},"function"!=typeof e.return&&(this.return=void 0)}function t(e,t){this.v=e,this.k=t}function r(e){var r={},n=!1;function o(r,o){return n=!0,o=new Promise((function(t){t(e[r](o))})),{done:!1,value:new t(o,1)}}return r["undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator"]=function(){return this},r.next=function(e){return n?(n=!1,e):o("next",e)},"function"==typeof e.throw&&(r.throw=function(e){if(n)throw n=!1,e;return o("throw",e)}),"function"==typeof e.return&&(r.return=function(e){return n?(n=!1,e):o("return",e)}),r}function n(e){var t,r,n,i=2;for("undefined"!=typeof Symbol&&(r=Symbol.asyncIterator,n=Symbol.iterator);i--;){if(r&&null!=(t=e[r]))return t.call(e);if(n&&null!=(t=e[n]))return new o(t.call(e));r="@@asyncIterator",n="@@iterator"}throw new TypeError("Object is not async iterable")}function o(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then((function(e){return{value:e,done:t}}))}return o=function(e){this.s=e,this.n=e.next},o.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var r=this.s.return;return void 0===r?Promise.resolve({value:e,done:!0}):t(r.apply(this.s,arguments))},throw:function(e){var r=this.s.return;return void 0===r?Promise.reject(e):t(r.apply(this.s,arguments))}},new o(e)}function i(e){return new t(e,0)}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}function c(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function l(t){return function(){return new e(t.apply(this,arguments))}}function p(e,t,r,n,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void r(e)}u.done?t(s):Promise.resolve(s).then(n,o)}function h(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){p(i,n,o,a,u,"next",e)}function u(e){p(i,n,o,a,u,"throw",e)}a(void 0)}))}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r2&&void 0!==arguments[2]?arguments[2]:{},i=o.allOwnKeys,a=void 0!==i&&i;if(null!=e)if("object"!==f(e)&&(e=[e]),N(e))for(r=0,n=e.length;r0;)if(t===(r=n[o]).toLowerCase())return r;return null}var Q="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Z=function(e){return!_(e)&&e!==Q};var ee,te=(ee="undefined"!=typeof Uint8Array&&j(Uint8Array),function(e){return ee&&e instanceof ee}),re=P("HTMLFormElement"),ne=function(e){var t=Object.prototype.hasOwnProperty;return function(e,r){return t.call(e,r)}}(),oe=P("RegExp"),ie=function(e,t){var r=Object.getOwnPropertyDescriptors(e),n={};$(r,(function(r,o){var i;!1!==(i=t(r,o,e))&&(n[o]=i||r)})),Object.defineProperties(e,n)},ae="abcdefghijklmnopqrstuvwxyz",ue="0123456789",se={DIGIT:ue,ALPHA:ae,ALPHA_DIGIT:ae+ae.toUpperCase()+ue};var ce,fe,le,pe,he=P("AsyncFunction"),de=(ce="function"==typeof setImmediate,fe=U(Q.postMessage),ce?setImmediate:fe?(le="axios@".concat(Math.random()),pe=[],Q.addEventListener("message",(function(e){var t=e.source,r=e.data;t===Q&&r===le&&pe.length&&pe.shift()()}),!1),function(e){pe.push(e),Q.postMessage(le,"*")}):function(e){return setTimeout(e)}),ve="undefined"!=typeof queueMicrotask?queueMicrotask.bind(Q):"undefined"!=typeof process&&process.nextTick||de,ye={isArray:N,isArrayBuffer:C,isBuffer:function(e){return null!==e&&!_(e)&&null!==e.constructor&&!_(e.constructor)&&U(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:function(e){var t;return e&&("function"==typeof FormData&&e instanceof FormData||U(e.append)&&("formdata"===(t=A(e))||"object"===t&&U(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&C(e.buffer)},isString:F,isNumber:B,isBoolean:function(e){return!0===e||!1===e},isObject:D,isPlainObject:I,isReadableStream:G,isRequest:K,isResponse:V,isHeaders:X,isUndefined:_,isDate:q,isFile:M,isBlob:z,isRegExp:oe,isFunction:U,isStream:function(e){return D(e)&&U(e.pipe)},isURLSearchParams:J,isTypedArray:te,isFileList:H,forEach:$,merge:function e(){for(var t=Z(this)&&this||{},r=t.caseless,n={},o=function(t,o){var i=r&&Y(n,o)||o;I(n[i])&&I(t)?n[i]=e(n[i],t):I(t)?n[i]=e({},t):N(t)?n[i]=t.slice():n[i]=t},i=0,a=arguments.length;i3&&void 0!==arguments[3]?arguments[3]:{},o=n.allOwnKeys;return $(t,(function(t,n){r&&U(t)?e[n]=R(t,r):e[n]=t}),{allOwnKeys:o}),e},trim:function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,r,n){e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:function(e,t,r,n){var o,i,a,u={};if(t=t||{},null==e)return t;do{for(i=(o=Object.getOwnPropertyNames(e)).length;i-- >0;)a=o[i],n&&!n(a,e,t)||u[a]||(t[a]=e[a],u[a]=!0);e=!1!==r&&j(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:A,kindOfTest:P,endsWith:function(e,t,r){e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;var n=e.indexOf(t,r);return-1!==n&&n===r},toArray:function(e){if(!e)return null;if(N(e))return e;var t=e.length;if(!B(t))return null;for(var r=new Array(t);t-- >0;)r[t]=e[t];return r},forEachEntry:function(e,t){for(var r,n=(e&&e[Symbol.iterator]).call(e);(r=n.next())&&!r.done;){var o=r.value;t.call(e,o[0],o[1])}},matchAll:function(e,t){for(var r,n=[];null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:re,hasOwnProperty:ne,hasOwnProp:ne,reduceDescriptors:ie,freezeMethods:function(e){ie(e,(function(t,r){if(U(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;var n=e[r];U(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=function(){throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:function(e,t){var r={},n=function(e){e.forEach((function(e){r[e]=!0}))};return N(e)?n(e):n(String(e).split(t)),r},toCamelCase:function(e){return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r}))},noop:function(){},toFiniteNumber:function(e,t){return null!=e&&Number.isFinite(e=+e)?e:t},findKey:Y,global:Q,isContextDefined:Z,ALPHABET:se,generateString:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:16,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:se.ALPHA_DIGIT,r="",n=t.length;e--;)r+=t[Math.random()*n|0];return r},isSpecCompliantForm:function(e){return!!(e&&U(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:function(e){var t=new Array(10);return function e(r,n){if(D(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[n]=r;var o=N(r)?[]:{};return $(r,(function(t,r){var i=e(t,n+1);!_(i)&&(o[r]=i)})),t[n]=void 0,o}}return r}(e,0)},isAsyncFn:he,isThenable:function(e){return e&&(D(e)||U(e))&&U(e.then)&&U(e.catch)},setImmediate:de,asap:ve};function me(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}ye.inherits(me,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ye.toJSONObject(this.config),code:this.code,status:this.status}}});var be=me.prototype,ge={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((function(e){ge[e]={value:e}})),Object.defineProperties(me,ge),Object.defineProperty(be,"isAxiosError",{value:!0}),me.from=function(e,t,r,n,o,i){var a=Object.create(be);return ye.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(function(e){return"isAxiosError"!==e})),me.call(a,e.message,t,r,n,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};function we(e){return ye.isPlainObject(e)||ye.isArray(e)}function Ee(e){return ye.endsWith(e,"[]")?e.slice(0,-2):e}function Oe(e,t,r){return e?e.concat(t).map((function(e,t){return e=Ee(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}var Se=ye.toFlatObject(ye,{},null,(function(e){return/^is[A-Z]/.test(e)}));function xe(e,t,r){if(!ye.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;var n=(r=ye.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!ye.isUndefined(t[e])}))).metaTokens,o=r.visitor||c,i=r.dots,a=r.indexes,u=(r.Blob||"undefined"!=typeof Blob&&Blob)&&ye.isSpecCompliantForm(t);if(!ye.isFunction(o))throw new TypeError("visitor must be a function");function s(e){if(null===e)return"";if(ye.isDate(e))return e.toISOString();if(!u&&ye.isBlob(e))throw new me("Blob is not supported. Use a Buffer instead.");return ye.isArrayBuffer(e)||ye.isTypedArray(e)?u&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,r,o){var u=e;if(e&&!o&&"object"===f(e))if(ye.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(ye.isArray(e)&&function(e){return ye.isArray(e)&&!e.some(we)}(e)||(ye.isFileList(e)||ye.endsWith(r,"[]"))&&(u=ye.toArray(e)))return r=Ee(r),u.forEach((function(e,n){!ye.isUndefined(e)&&null!==e&&t.append(!0===a?Oe([r],n,i):null===a?r:r+"[]",s(e))})),!1;return!!we(e)||(t.append(Oe(o,r,i),s(e)),!1)}var l=[],p=Object.assign(Se,{defaultVisitor:c,convertValue:s,isVisitable:we});if(!ye.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!ye.isUndefined(r)){if(-1!==l.indexOf(r))throw Error("Circular reference detected in "+n.join("."));l.push(r),ye.forEach(r,(function(r,i){!0===(!(ye.isUndefined(r)||null===r)&&o.call(t,r,ye.isString(i)?i.trim():i,n,p))&&e(r,n?n.concat(i):[i])})),l.pop()}}(e),t}function Re(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function Te(e,t){this._pairs=[],e&&xe(e,this,t)}var ke=Te.prototype;function je(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ae(e,t,r){if(!t)return e;var n=r&&r.encode||je;ye.isFunction(r)&&(r={serialize:r});var o,i=r&&r.serialize;if(o=i?i(t,r):ye.isURLSearchParams(t)?t.toString():new Te(t,r).toString(n)){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}ke.append=function(e,t){this._pairs.push([e,t])},ke.toString=function(e){var t=e?function(t){return e.call(this,t,Re)}:Re;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var Pe=function(){function e(){d(this,e),this.handlers=[]}return y(e,[{key:"use",value:function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}},{key:"eject",value:function(e){this.handlers[e]&&(this.handlers[e]=null)}},{key:"clear",value:function(){this.handlers&&(this.handlers=[])}},{key:"forEach",value:function(e){ye.forEach(this.handlers,(function(t){null!==t&&e(t)}))}}]),e}(),Le={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ne={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Te,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},_e="undefined"!=typeof window&&"undefined"!=typeof document,Ce="object"===("undefined"==typeof navigator?"undefined":f(navigator))&&navigator||void 0,Fe=_e&&(!Ce||["ReactNative","NativeScript","NS"].indexOf(Ce.product)<0),Ue="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Be=_e&&window.location.href||"http://localhost",De=u(u({},Object.freeze({__proto__:null,hasBrowserEnv:_e,hasStandardBrowserWebWorkerEnv:Ue,hasStandardBrowserEnv:Fe,navigator:Ce,origin:Be})),Ne);function Ie(e){function t(e,r,n,o){var i=e[o++];if("__proto__"===i)return!0;var a=Number.isFinite(+i),u=o>=e.length;return i=!i&&ye.isArray(n)?n.length:i,u?(ye.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!a):(n[i]&&ye.isObject(n[i])||(n[i]=[]),t(e,r,n[i],o)&&ye.isArray(n[i])&&(n[i]=function(e){var t,r,n={},o=Object.keys(e),i=o.length;for(t=0;t-1,i=ye.isObject(e);if(i&&ye.isHTMLForm(e)&&(e=new FormData(e)),ye.isFormData(e))return o?JSON.stringify(Ie(e)):e;if(ye.isArrayBuffer(e)||ye.isBuffer(e)||ye.isStream(e)||ye.isFile(e)||ye.isBlob(e)||ye.isReadableStream(e))return e;if(ye.isArrayBufferView(e))return e.buffer;if(ye.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return xe(e,new De.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return De.isNode&&ye.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((r=ye.isFileList(e))||n.indexOf("multipart/form-data")>-1){var a=this.env&&this.env.FormData;return xe(r?{"files[]":e}:e,a&&new a,this.formSerializer)}}return i||o?(t.setContentType("application/json",!1),function(e,t,r){if(ye.isString(e))try{return(t||JSON.parse)(e),ye.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||qe.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(ye.isResponse(e)||ye.isReadableStream(e))return e;if(e&&ye.isString(e)&&(r&&!this.responseType||n)){var o=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw me.from(e,me.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:De.classes.FormData,Blob:De.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ye.forEach(["delete","get","head","post","put","patch"],(function(e){qe.headers[e]={}}));var Me=qe,ze=ye.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),He=Symbol("internals");function Je(e){return e&&String(e).trim().toLowerCase()}function We(e){return!1===e||null==e?e:ye.isArray(e)?e.map(We):String(e)}function Ge(e,t,r,n,o){return ye.isFunction(n)?n.call(this,t,r):(o&&(t=r),ye.isString(t)?ye.isString(n)?-1!==t.indexOf(n):ye.isRegExp(n)?n.test(t):void 0:void 0)}var Ke=function(e,t){function r(e){d(this,r),e&&this.set(e)}return y(r,[{key:"set",value:function(e,t,r){var n=this;function o(e,t,r){var o=Je(t);if(!o)throw new Error("header name must be a non-empty string");var i=ye.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||t]=We(e))}var i=function(e,t){return ye.forEach(e,(function(e,r){return o(e,r,t)}))};if(ye.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(ye.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i(function(e){var t,r,n,o={};return e&&e.split("\n").forEach((function(e){n=e.indexOf(":"),t=e.substring(0,n).trim().toLowerCase(),r=e.substring(n+1).trim(),!t||o[t]&&ze[t]||("set-cookie"===t?o[t]?o[t].push(r):o[t]=[r]:o[t]=o[t]?o[t]+", "+r:r)})),o}(e),t);else if(ye.isHeaders(e)){var a,u=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=O(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(e.entries());try{for(u.s();!(a=u.n()).done;){var s=b(a.value,2),c=s[0];o(s[1],c,r)}}catch(e){u.e(e)}finally{u.f()}}else null!=e&&o(t,e,r);return this}},{key:"get",value:function(e,t){if(e=Je(e)){var r=ye.findKey(this,e);if(r){var n=this[r];if(!t)return n;if(!0===t)return function(e){for(var t,r=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;t=n.exec(e);)r[t[1]]=t[2];return r}(n);if(ye.isFunction(t))return t.call(this,n,r);if(ye.isRegExp(t))return t.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}},{key:"has",value:function(e,t){if(e=Je(e)){var r=ye.findKey(this,e);return!(!r||void 0===this[r]||t&&!Ge(0,this[r],r,t))}return!1}},{key:"delete",value:function(e,t){var r=this,n=!1;function o(e){if(e=Je(e)){var o=ye.findKey(r,e);!o||t&&!Ge(0,r[o],o,t)||(delete r[o],n=!0)}}return ye.isArray(e)?e.forEach(o):o(e),n}},{key:"clear",value:function(e){for(var t=Object.keys(this),r=t.length,n=!1;r--;){var o=t[r];e&&!Ge(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}},{key:"normalize",value:function(e){var t=this,r={};return ye.forEach(this,(function(n,o){var i=ye.findKey(r,o);if(i)return t[i]=We(n),void delete t[o];var a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r}))}(o):String(o).trim();a!==o&&delete t[o],t[a]=We(n),r[a]=!0})),this}},{key:"concat",value:function(){for(var e,t=arguments.length,r=new Array(t),n=0;n1?r-1:0),o=1;o1&&void 0!==arguments[1]?arguments[1]:Date.now();o=i,r=null,n&&(clearTimeout(n),n=null),e.apply(null,t)};return[function(){for(var e=Date.now(),t=e-o,u=arguments.length,s=new Array(u),c=0;c=i?a(s,e):(r=s,n||(n=setTimeout((function(){n=null,a(r)}),i-t)))},function(){return r&&a(r)}]}ye.inherits(Ye,me,{__CANCEL__:!0});var tt=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,n=0,o=Ze(50,250);return et((function(r){var i=r.loaded,a=r.lengthComputable?r.total:void 0,u=i-n,s=o(u);n=i;var c=m({loaded:i,total:a,progress:a?i/a:void 0,bytes:u,rate:s||void 0,estimated:s&&a&&i<=a?(a-i)/s:void 0,event:r,lengthComputable:null!=a},t?"download":"upload",!0);e(c)}),r)},rt=function(e,t){var r=null!=e;return[function(n){return t[0]({lengthComputable:r,total:e,loaded:n})},t[1]]},nt=function(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n1?t-1:0),n=1;n1?"since :\n"+u.map(At).join("\n"):" "+At(u[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function Nt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ye(null,e)}function _t(e){return Nt(e),e.headers=Ve.from(e.headers),e.data=Xe.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Lt(e.adapter||Me.adapter)(e).then((function(t){return Nt(e),t.data=Xe.call(e,e.transformResponse,t),t.headers=Ve.from(t.headers),t}),(function(t){return $e(t)||(Nt(e),t&&t.response&&(t.response.data=Xe.call(e,e.transformResponse,t.response),t.response.headers=Ve.from(t.response.headers))),Promise.reject(t)}))}var Ct="1.7.9",Ft={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){Ft[e]=function(r){return f(r)===e||"a"+(t<1?"n ":" ")+e}}));var Ut={};Ft.transitional=function(e,t,r){function n(e,t){return"[Axios v1.7.9] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,o,i){if(!1===e)throw new me(n(o," has been removed"+(t?" in "+t:"")),me.ERR_DEPRECATED);return t&&!Ut[o]&&(Ut[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,i)}},Ft.spelling=function(e){return function(t,r){return console.warn("".concat(r," is likely a misspelling of ").concat(e)),!0}};var Bt={assertOptions:function(e,t,r){if("object"!==f(e))throw new me("options must be an object",me.ERR_BAD_OPTION_VALUE);for(var n=Object.keys(e),o=n.length;o-- >0;){var i=n[o],a=t[i];if(a){var u=e[i],s=void 0===u||a(u,i,e);if(!0!==s)throw new me("option "+i+" must be "+s,me.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new me("Unknown option "+i,me.ERR_BAD_OPTION)}},validators:Ft},Dt=Bt.validators,It=function(){function e(t){d(this,e),this.defaults=t,this.interceptors={request:new Pe,response:new Pe}}var t;return y(e,[{key:"request",value:(t=h(s().mark((function e(t,r){var n,o;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._request(t,r);case 3:return e.abrupt("return",e.sent);case 6:if(e.prev=6,e.t0=e.catch(0),e.t0 instanceof Error){n={},Error.captureStackTrace?Error.captureStackTrace(n):n=new Error,o=n.stack?n.stack.replace(/^.+\n/,""):"";try{e.t0.stack?o&&!String(e.t0.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(e.t0.stack+="\n"+o):e.t0.stack=o}catch(e){}}throw e.t0;case 10:case"end":return e.stop()}}),e,this,[[0,6]])}))),function(e,r){return t.apply(this,arguments)})},{key:"_request",value:function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{};var r=t=st(this.defaults,t),n=r.transitional,o=r.paramsSerializer,i=r.headers;void 0!==n&&Bt.assertOptions(n,{silentJSONParsing:Dt.transitional(Dt.boolean),forcedJSONParsing:Dt.transitional(Dt.boolean),clarifyTimeoutError:Dt.transitional(Dt.boolean)},!1),null!=o&&(ye.isFunction(o)?t.paramsSerializer={serialize:o}:Bt.assertOptions(o,{encode:Dt.function,serialize:Dt.function},!0)),Bt.assertOptions(t,{baseUrl:Dt.spelling("baseURL"),withXsrfToken:Dt.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();var a=i&&ye.merge(i.common,i[t.method]);i&&ye.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete i[e]})),t.headers=Ve.concat(a,i);var u=[],s=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,u.unshift(e.fulfilled,e.rejected))}));var c,f=[];this.interceptors.response.forEach((function(e){f.push(e.fulfilled,e.rejected)}));var l,p=0;if(!s){var h=[_t.bind(this),void 0];for(h.unshift.apply(h,u),h.push.apply(h,f),l=h.length,c=Promise.resolve(t);p0;)n._listeners[t](e);n._listeners=null}})),this.promise.then=function(e){var t,r=new Promise((function(e){n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},t((function(e,t,o){n.reason||(n.reason=new Ye(e,t,o),r(n.reason))}))}return y(e,[{key:"throwIfRequested",value:function(){if(this.reason)throw this.reason}},{key:"subscribe",value:function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}},{key:"unsubscribe",value:function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}}},{key:"toAbortSignal",value:function(){var e=this,t=new AbortController,r=function(e){t.abort(e)};return this.subscribe(r),t.signal.unsubscribe=function(){return e.unsubscribe(r)},t.signal}}],[{key:"source",value:function(){var t;return{token:new e((function(e){t=e})),cancel:t}}}]),e}(),zt=Mt;var Ht={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ht).forEach((function(e){var t=b(e,2),r=t[0],n=t[1];Ht[n]=r}));var Jt=Ht;var Wt=function e(t){var r=new qt(t),n=R(qt.prototype.request,r);return ye.extend(n,qt.prototype,r,{allOwnKeys:!0}),ye.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(st(t,r))},n}(Me);return Wt.Axios=qt,Wt.CanceledError=Ye,Wt.CancelToken=zt,Wt.isCancel=$e,Wt.VERSION=Ct,Wt.toFormData=xe,Wt.AxiosError=me,Wt.Cancel=Wt.CanceledError,Wt.all=function(e){return Promise.all(e)},Wt.spread=function(e){return function(t){return e.apply(null,t)}},Wt.isAxiosError=function(e){return ye.isObject(e)&&!0===e.isAxiosError},Wt.mergeConfig=st,Wt.AxiosHeaders=Ve,Wt.formToJSON=function(e){return Ie(ye.isHTMLForm(e)?new FormData(e):e)},Wt.getAdapter=Lt,Wt.HttpStatusCode=Jt,Wt.default=Wt,Wt})); +//# sourceMappingURL=axios.min.js.map \ No newline at end of file diff --git a/front/cdn/vue.min.js b/front/cdn/vue.min.js new file mode 100755 index 0000000..d4993cb --- /dev/null +++ b/front/cdn/vue.min.js @@ -0,0 +1,6 @@ +/*! + * Vue.js v2.6.11 + * (c) 2014-2019 Evan You + * Released under the MIT License. + */ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Vue=t()}(this,function(){"use strict";var e=Object.freeze({});function t(e){return null==e}function n(e){return null!=e}function r(e){return!0===e}function i(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e||"boolean"==typeof e}function o(e){return null!==e&&"object"==typeof e}var a=Object.prototype.toString;function s(e){return"[object Object]"===a.call(e)}function c(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}function u(e){return n(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function l(e){return null==e?"":Array.isArray(e)||s(e)&&e.toString===a?JSON.stringify(e,null,2):String(e)}function f(e){var t=parseFloat(e);return isNaN(t)?e:t}function p(e,t){for(var n=Object.create(null),r=e.split(","),i=0;i-1)return e.splice(n,1)}}var m=Object.prototype.hasOwnProperty;function y(e,t){return m.call(e,t)}function g(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}var _=/-(\w)/g,b=g(function(e){return e.replace(_,function(e,t){return t?t.toUpperCase():""})}),$=g(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}),w=/\B([A-Z])/g,C=g(function(e){return e.replace(w,"-$1").toLowerCase()});var x=Function.prototype.bind?function(e,t){return e.bind(t)}:function(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n};function k(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function A(e,t){for(var n in t)e[n]=t[n];return e}function O(e){for(var t={},n=0;n0,Z=J&&J.indexOf("edge/")>0,G=(J&&J.indexOf("android"),J&&/iphone|ipad|ipod|ios/.test(J)||"ios"===K),X=(J&&/chrome\/\d+/.test(J),J&&/phantomjs/.test(J),J&&J.match(/firefox\/(\d+)/)),Y={}.watch,Q=!1;if(z)try{var ee={};Object.defineProperty(ee,"passive",{get:function(){Q=!0}}),window.addEventListener("test-passive",null,ee)}catch(e){}var te=function(){return void 0===B&&(B=!z&&!V&&"undefined"!=typeof global&&(global.process&&"server"===global.process.env.VUE_ENV)),B},ne=z&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function re(e){return"function"==typeof e&&/native code/.test(e.toString())}var ie,oe="undefined"!=typeof Symbol&&re(Symbol)&&"undefined"!=typeof Reflect&&re(Reflect.ownKeys);ie="undefined"!=typeof Set&&re(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var ae=S,se=0,ce=function(){this.id=se++,this.subs=[]};ce.prototype.addSub=function(e){this.subs.push(e)},ce.prototype.removeSub=function(e){h(this.subs,e)},ce.prototype.depend=function(){ce.target&&ce.target.addDep(this)},ce.prototype.notify=function(){for(var e=this.subs.slice(),t=0,n=e.length;t-1)if(o&&!y(i,"default"))a=!1;else if(""===a||a===C(e)){var c=Pe(String,i.type);(c<0||s0&&(st((u=e(u,(a||"")+"_"+c))[0])&&st(f)&&(s[l]=he(f.text+u[0].text),u.shift()),s.push.apply(s,u)):i(u)?st(f)?s[l]=he(f.text+u):""!==u&&s.push(he(u)):st(u)&&st(f)?s[l]=he(f.text+u.text):(r(o._isVList)&&n(u.tag)&&t(u.key)&&n(a)&&(u.key="__vlist"+a+"_"+c+"__"),s.push(u)));return s}(e):void 0}function st(e){return n(e)&&n(e.text)&&!1===e.isComment}function ct(e,t){if(e){for(var n=Object.create(null),r=oe?Reflect.ownKeys(e):Object.keys(e),i=0;i0,a=t?!!t.$stable:!o,s=t&&t.$key;if(t){if(t._normalized)return t._normalized;if(a&&r&&r!==e&&s===r.$key&&!o&&!r.$hasNormal)return r;for(var c in i={},t)t[c]&&"$"!==c[0]&&(i[c]=pt(n,c,t[c]))}else i={};for(var u in n)u in i||(i[u]=dt(n,u));return t&&Object.isExtensible(t)&&(t._normalized=i),R(i,"$stable",a),R(i,"$key",s),R(i,"$hasNormal",o),i}function pt(e,t,n){var r=function(){var e=arguments.length?n.apply(null,arguments):n({});return(e=e&&"object"==typeof e&&!Array.isArray(e)?[e]:at(e))&&(0===e.length||1===e.length&&e[0].isComment)?void 0:e};return n.proxy&&Object.defineProperty(e,t,{get:r,enumerable:!0,configurable:!0}),r}function dt(e,t){return function(){return e[t]}}function vt(e,t){var r,i,a,s,c;if(Array.isArray(e)||"string"==typeof e)for(r=new Array(e.length),i=0,a=e.length;idocument.createEvent("Event").timeStamp&&(sn=function(){return cn.now()})}function un(){var e,t;for(an=sn(),rn=!0,Qt.sort(function(e,t){return e.id-t.id}),on=0;onon&&Qt[n].id>e.id;)n--;Qt.splice(n+1,0,e)}else Qt.push(e);nn||(nn=!0,Ye(un))}}(this)},fn.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||o(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(e){Re(e,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},fn.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},fn.prototype.depend=function(){for(var e=this.deps.length;e--;)this.deps[e].depend()},fn.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||h(this.vm._watchers,this);for(var e=this.deps.length;e--;)this.deps[e].removeSub(this);this.active=!1}};var pn={enumerable:!0,configurable:!0,get:S,set:S};function dn(e,t,n){pn.get=function(){return this[t][n]},pn.set=function(e){this[t][n]=e},Object.defineProperty(e,n,pn)}function vn(e){e._watchers=[];var t=e.$options;t.props&&function(e,t){var n=e.$options.propsData||{},r=e._props={},i=e.$options._propKeys=[];e.$parent&&$e(!1);var o=function(o){i.push(o);var a=Me(o,t,n,e);xe(r,o,a),o in e||dn(e,"_props",o)};for(var a in t)o(a);$e(!0)}(e,t.props),t.methods&&function(e,t){e.$options.props;for(var n in t)e[n]="function"!=typeof t[n]?S:x(t[n],e)}(e,t.methods),t.data?function(e){var t=e.$options.data;s(t=e._data="function"==typeof t?function(e,t){le();try{return e.call(t,t)}catch(e){return Re(e,t,"data()"),{}}finally{fe()}}(t,e):t||{})||(t={});var n=Object.keys(t),r=e.$options.props,i=(e.$options.methods,n.length);for(;i--;){var o=n[i];r&&y(r,o)||(a=void 0,36!==(a=(o+"").charCodeAt(0))&&95!==a&&dn(e,"_data",o))}var a;Ce(t,!0)}(e):Ce(e._data={},!0),t.computed&&function(e,t){var n=e._computedWatchers=Object.create(null),r=te();for(var i in t){var o=t[i],a="function"==typeof o?o:o.get;r||(n[i]=new fn(e,a||S,S,hn)),i in e||mn(e,i,o)}}(e,t.computed),t.watch&&t.watch!==Y&&function(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var i=0;i-1:"string"==typeof e?e.split(",").indexOf(t)>-1:(n=e,"[object RegExp]"===a.call(n)&&e.test(t));var n}function An(e,t){var n=e.cache,r=e.keys,i=e._vnode;for(var o in n){var a=n[o];if(a){var s=xn(a.componentOptions);s&&!t(s)&&On(n,o,r,i)}}}function On(e,t,n,r){var i=e[t];!i||r&&i.tag===r.tag||i.componentInstance.$destroy(),e[t]=null,h(n,t)}!function(t){t.prototype._init=function(t){var n=this;n._uid=bn++,n._isVue=!0,t&&t._isComponent?function(e,t){var n=e.$options=Object.create(e.constructor.options),r=t._parentVnode;n.parent=t.parent,n._parentVnode=r;var i=r.componentOptions;n.propsData=i.propsData,n._parentListeners=i.listeners,n._renderChildren=i.children,n._componentTag=i.tag,t.render&&(n.render=t.render,n.staticRenderFns=t.staticRenderFns)}(n,t):n.$options=De($n(n.constructor),t||{},n),n._renderProxy=n,n._self=n,function(e){var t=e.$options,n=t.parent;if(n&&!t.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(e)}e.$parent=n,e.$root=n?n.$root:e,e.$children=[],e.$refs={},e._watcher=null,e._inactive=null,e._directInactive=!1,e._isMounted=!1,e._isDestroyed=!1,e._isBeingDestroyed=!1}(n),function(e){e._events=Object.create(null),e._hasHookEvent=!1;var t=e.$options._parentListeners;t&&qt(e,t)}(n),function(t){t._vnode=null,t._staticTrees=null;var n=t.$options,r=t.$vnode=n._parentVnode,i=r&&r.context;t.$slots=ut(n._renderChildren,i),t.$scopedSlots=e,t._c=function(e,n,r,i){return Pt(t,e,n,r,i,!1)},t.$createElement=function(e,n,r,i){return Pt(t,e,n,r,i,!0)};var o=r&&r.data;xe(t,"$attrs",o&&o.attrs||e,null,!0),xe(t,"$listeners",n._parentListeners||e,null,!0)}(n),Yt(n,"beforeCreate"),function(e){var t=ct(e.$options.inject,e);t&&($e(!1),Object.keys(t).forEach(function(n){xe(e,n,t[n])}),$e(!0))}(n),vn(n),function(e){var t=e.$options.provide;t&&(e._provided="function"==typeof t?t.call(e):t)}(n),Yt(n,"created"),n.$options.el&&n.$mount(n.$options.el)}}(wn),function(e){var t={get:function(){return this._data}},n={get:function(){return this._props}};Object.defineProperty(e.prototype,"$data",t),Object.defineProperty(e.prototype,"$props",n),e.prototype.$set=ke,e.prototype.$delete=Ae,e.prototype.$watch=function(e,t,n){if(s(t))return _n(this,e,t,n);(n=n||{}).user=!0;var r=new fn(this,e,t,n);if(n.immediate)try{t.call(this,r.value)}catch(e){Re(e,this,'callback for immediate watcher "'+r.expression+'"')}return function(){r.teardown()}}}(wn),function(e){var t=/^hook:/;e.prototype.$on=function(e,n){var r=this;if(Array.isArray(e))for(var i=0,o=e.length;i1?k(t):t;for(var n=k(arguments,1),r='event handler for "'+e+'"',i=0,o=t.length;iparseInt(this.max)&&On(a,s[0],s,this._vnode)),t.data.keepAlive=!0}return t||e&&e[0]}}};!function(e){var t={get:function(){return F}};Object.defineProperty(e,"config",t),e.util={warn:ae,extend:A,mergeOptions:De,defineReactive:xe},e.set=ke,e.delete=Ae,e.nextTick=Ye,e.observable=function(e){return Ce(e),e},e.options=Object.create(null),M.forEach(function(t){e.options[t+"s"]=Object.create(null)}),e.options._base=e,A(e.options.components,Tn),function(e){e.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(t.indexOf(e)>-1)return this;var n=k(arguments,1);return n.unshift(this),"function"==typeof e.install?e.install.apply(e,n):"function"==typeof e&&e.apply(null,n),t.push(e),this}}(e),function(e){e.mixin=function(e){return this.options=De(this.options,e),this}}(e),Cn(e),function(e){M.forEach(function(t){e[t]=function(e,n){return n?("component"===t&&s(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&"function"==typeof n&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}})}(e)}(wn),Object.defineProperty(wn.prototype,"$isServer",{get:te}),Object.defineProperty(wn.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(wn,"FunctionalRenderContext",{value:Tt}),wn.version="2.6.11";var En=p("style,class"),Nn=p("input,textarea,option,select,progress"),jn=function(e,t,n){return"value"===n&&Nn(e)&&"button"!==t||"selected"===n&&"option"===e||"checked"===n&&"input"===e||"muted"===n&&"video"===e},Dn=p("contenteditable,draggable,spellcheck"),Ln=p("events,caret,typing,plaintext-only"),Mn=function(e,t){return Hn(t)||"false"===t?"false":"contenteditable"===e&&Ln(t)?t:"true"},In=p("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),Fn="http://www.w3.org/1999/xlink",Pn=function(e){return":"===e.charAt(5)&&"xlink"===e.slice(0,5)},Rn=function(e){return Pn(e)?e.slice(6,e.length):""},Hn=function(e){return null==e||!1===e};function Bn(e){for(var t=e.data,r=e,i=e;n(i.componentInstance);)(i=i.componentInstance._vnode)&&i.data&&(t=Un(i.data,t));for(;n(r=r.parent);)r&&r.data&&(t=Un(t,r.data));return function(e,t){if(n(e)||n(t))return zn(e,Vn(t));return""}(t.staticClass,t.class)}function Un(e,t){return{staticClass:zn(e.staticClass,t.staticClass),class:n(e.class)?[e.class,t.class]:t.class}}function zn(e,t){return e?t?e+" "+t:e:t||""}function Vn(e){return Array.isArray(e)?function(e){for(var t,r="",i=0,o=e.length;i-1?hr(e,t,n):In(t)?Hn(n)?e.removeAttribute(t):(n="allowfullscreen"===t&&"EMBED"===e.tagName?"true":t,e.setAttribute(t,n)):Dn(t)?e.setAttribute(t,Mn(t,n)):Pn(t)?Hn(n)?e.removeAttributeNS(Fn,Rn(t)):e.setAttributeNS(Fn,t,n):hr(e,t,n)}function hr(e,t,n){if(Hn(n))e.removeAttribute(t);else{if(q&&!W&&"TEXTAREA"===e.tagName&&"placeholder"===t&&""!==n&&!e.__ieph){var r=function(t){t.stopImmediatePropagation(),e.removeEventListener("input",r)};e.addEventListener("input",r),e.__ieph=!0}e.setAttribute(t,n)}}var mr={create:dr,update:dr};function yr(e,r){var i=r.elm,o=r.data,a=e.data;if(!(t(o.staticClass)&&t(o.class)&&(t(a)||t(a.staticClass)&&t(a.class)))){var s=Bn(r),c=i._transitionClasses;n(c)&&(s=zn(s,Vn(c))),s!==i._prevClass&&(i.setAttribute("class",s),i._prevClass=s)}}var gr,_r,br,$r,wr,Cr,xr={create:yr,update:yr},kr=/[\w).+\-_$\]]/;function Ar(e){var t,n,r,i,o,a=!1,s=!1,c=!1,u=!1,l=0,f=0,p=0,d=0;for(r=0;r=0&&" "===(h=e.charAt(v));v--);h&&kr.test(h)||(u=!0)}}else void 0===i?(d=r+1,i=e.slice(0,r).trim()):m();function m(){(o||(o=[])).push(e.slice(d,r).trim()),d=r+1}if(void 0===i?i=e.slice(0,r).trim():0!==d&&m(),o)for(r=0;r-1?{exp:e.slice(0,$r),key:'"'+e.slice($r+1)+'"'}:{exp:e,key:null};_r=e,$r=wr=Cr=0;for(;!zr();)Vr(br=Ur())?Jr(br):91===br&&Kr(br);return{exp:e.slice(0,wr),key:e.slice(wr+1,Cr)}}(e);return null===n.key?e+"="+t:"$set("+n.exp+", "+n.key+", "+t+")"}function Ur(){return _r.charCodeAt(++$r)}function zr(){return $r>=gr}function Vr(e){return 34===e||39===e}function Kr(e){var t=1;for(wr=$r;!zr();)if(Vr(e=Ur()))Jr(e);else if(91===e&&t++,93===e&&t--,0===t){Cr=$r;break}}function Jr(e){for(var t=e;!zr()&&(e=Ur())!==t;);}var qr,Wr="__r",Zr="__c";function Gr(e,t,n){var r=qr;return function i(){null!==t.apply(null,arguments)&&Qr(e,i,n,r)}}var Xr=Ve&&!(X&&Number(X[1])<=53);function Yr(e,t,n,r){if(Xr){var i=an,o=t;t=o._wrapper=function(e){if(e.target===e.currentTarget||e.timeStamp>=i||e.timeStamp<=0||e.target.ownerDocument!==document)return o.apply(this,arguments)}}qr.addEventListener(e,t,Q?{capture:n,passive:r}:n)}function Qr(e,t,n,r){(r||qr).removeEventListener(e,t._wrapper||t,n)}function ei(e,r){if(!t(e.data.on)||!t(r.data.on)){var i=r.data.on||{},o=e.data.on||{};qr=r.elm,function(e){if(n(e[Wr])){var t=q?"change":"input";e[t]=[].concat(e[Wr],e[t]||[]),delete e[Wr]}n(e[Zr])&&(e.change=[].concat(e[Zr],e.change||[]),delete e[Zr])}(i),rt(i,o,Yr,Qr,Gr,r.context),qr=void 0}}var ti,ni={create:ei,update:ei};function ri(e,r){if(!t(e.data.domProps)||!t(r.data.domProps)){var i,o,a=r.elm,s=e.data.domProps||{},c=r.data.domProps||{};for(i in n(c.__ob__)&&(c=r.data.domProps=A({},c)),s)i in c||(a[i]="");for(i in c){if(o=c[i],"textContent"===i||"innerHTML"===i){if(r.children&&(r.children.length=0),o===s[i])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===i&&"PROGRESS"!==a.tagName){a._value=o;var u=t(o)?"":String(o);ii(a,u)&&(a.value=u)}else if("innerHTML"===i&&qn(a.tagName)&&t(a.innerHTML)){(ti=ti||document.createElement("div")).innerHTML=""+o+"";for(var l=ti.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;l.firstChild;)a.appendChild(l.firstChild)}else if(o!==s[i])try{a[i]=o}catch(e){}}}}function ii(e,t){return!e.composing&&("OPTION"===e.tagName||function(e,t){var n=!0;try{n=document.activeElement!==e}catch(e){}return n&&e.value!==t}(e,t)||function(e,t){var r=e.value,i=e._vModifiers;if(n(i)){if(i.number)return f(r)!==f(t);if(i.trim)return r.trim()!==t.trim()}return r!==t}(e,t))}var oi={create:ri,update:ri},ai=g(function(e){var t={},n=/:(.+)/;return e.split(/;(?![^(]*\))/g).forEach(function(e){if(e){var r=e.split(n);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t});function si(e){var t=ci(e.style);return e.staticStyle?A(e.staticStyle,t):t}function ci(e){return Array.isArray(e)?O(e):"string"==typeof e?ai(e):e}var ui,li=/^--/,fi=/\s*!important$/,pi=function(e,t,n){if(li.test(t))e.style.setProperty(t,n);else if(fi.test(n))e.style.setProperty(C(t),n.replace(fi,""),"important");else{var r=vi(t);if(Array.isArray(n))for(var i=0,o=n.length;i-1?t.split(yi).forEach(function(t){return e.classList.add(t)}):e.classList.add(t);else{var n=" "+(e.getAttribute("class")||"")+" ";n.indexOf(" "+t+" ")<0&&e.setAttribute("class",(n+t).trim())}}function _i(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(yi).forEach(function(t){return e.classList.remove(t)}):e.classList.remove(t),e.classList.length||e.removeAttribute("class");else{for(var n=" "+(e.getAttribute("class")||"")+" ",r=" "+t+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?e.setAttribute("class",n):e.removeAttribute("class")}}function bi(e){if(e){if("object"==typeof e){var t={};return!1!==e.css&&A(t,$i(e.name||"v")),A(t,e),t}return"string"==typeof e?$i(e):void 0}}var $i=g(function(e){return{enterClass:e+"-enter",enterToClass:e+"-enter-to",enterActiveClass:e+"-enter-active",leaveClass:e+"-leave",leaveToClass:e+"-leave-to",leaveActiveClass:e+"-leave-active"}}),wi=z&&!W,Ci="transition",xi="animation",ki="transition",Ai="transitionend",Oi="animation",Si="animationend";wi&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(ki="WebkitTransition",Ai="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Oi="WebkitAnimation",Si="webkitAnimationEnd"));var Ti=z?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(e){return e()};function Ei(e){Ti(function(){Ti(e)})}function Ni(e,t){var n=e._transitionClasses||(e._transitionClasses=[]);n.indexOf(t)<0&&(n.push(t),gi(e,t))}function ji(e,t){e._transitionClasses&&h(e._transitionClasses,t),_i(e,t)}function Di(e,t,n){var r=Mi(e,t),i=r.type,o=r.timeout,a=r.propCount;if(!i)return n();var s=i===Ci?Ai:Si,c=0,u=function(){e.removeEventListener(s,l),n()},l=function(t){t.target===e&&++c>=a&&u()};setTimeout(function(){c0&&(n=Ci,l=a,f=o.length):t===xi?u>0&&(n=xi,l=u,f=c.length):f=(n=(l=Math.max(a,u))>0?a>u?Ci:xi:null)?n===Ci?o.length:c.length:0,{type:n,timeout:l,propCount:f,hasTransform:n===Ci&&Li.test(r[ki+"Property"])}}function Ii(e,t){for(;e.length1}function Ui(e,t){!0!==t.data.show&&Pi(t)}var zi=function(e){var o,a,s={},c=e.modules,u=e.nodeOps;for(o=0;ov?_(e,t(i[y+1])?null:i[y+1].elm,i,d,y,o):d>y&&$(r,p,v)}(p,h,y,o,l):n(y)?(n(e.text)&&u.setTextContent(p,""),_(p,null,y,0,y.length-1,o)):n(h)?$(h,0,h.length-1):n(e.text)&&u.setTextContent(p,""):e.text!==i.text&&u.setTextContent(p,i.text),n(v)&&n(d=v.hook)&&n(d=d.postpatch)&&d(e,i)}}}function k(e,t,i){if(r(i)&&n(e.parent))e.parent.data.pendingInsert=t;else for(var o=0;o-1,a.selected!==o&&(a.selected=o);else if(N(Wi(a),r))return void(e.selectedIndex!==s&&(e.selectedIndex=s));i||(e.selectedIndex=-1)}}function qi(e,t){return t.every(function(t){return!N(t,e)})}function Wi(e){return"_value"in e?e._value:e.value}function Zi(e){e.target.composing=!0}function Gi(e){e.target.composing&&(e.target.composing=!1,Xi(e.target,"input"))}function Xi(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}function Yi(e){return!e.componentInstance||e.data&&e.data.transition?e:Yi(e.componentInstance._vnode)}var Qi={model:Vi,show:{bind:function(e,t,n){var r=t.value,i=(n=Yi(n)).data&&n.data.transition,o=e.__vOriginalDisplay="none"===e.style.display?"":e.style.display;r&&i?(n.data.show=!0,Pi(n,function(){e.style.display=o})):e.style.display=r?o:"none"},update:function(e,t,n){var r=t.value;!r!=!t.oldValue&&((n=Yi(n)).data&&n.data.transition?(n.data.show=!0,r?Pi(n,function(){e.style.display=e.__vOriginalDisplay}):Ri(n,function(){e.style.display="none"})):e.style.display=r?e.__vOriginalDisplay:"none")},unbind:function(e,t,n,r,i){i||(e.style.display=e.__vOriginalDisplay)}}},eo={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function to(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?to(zt(t.children)):e}function no(e){var t={},n=e.$options;for(var r in n.propsData)t[r]=e[r];var i=n._parentListeners;for(var o in i)t[b(o)]=i[o];return t}function ro(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{props:t.componentOptions.propsData})}var io=function(e){return e.tag||Ut(e)},oo=function(e){return"show"===e.name},ao={name:"transition",props:eo,abstract:!0,render:function(e){var t=this,n=this.$slots.default;if(n&&(n=n.filter(io)).length){var r=this.mode,o=n[0];if(function(e){for(;e=e.parent;)if(e.data.transition)return!0}(this.$vnode))return o;var a=to(o);if(!a)return o;if(this._leaving)return ro(e,o);var s="__transition-"+this._uid+"-";a.key=null==a.key?a.isComment?s+"comment":s+a.tag:i(a.key)?0===String(a.key).indexOf(s)?a.key:s+a.key:a.key;var c=(a.data||(a.data={})).transition=no(this),u=this._vnode,l=to(u);if(a.data.directives&&a.data.directives.some(oo)&&(a.data.show=!0),l&&l.data&&!function(e,t){return t.key===e.key&&t.tag===e.tag}(a,l)&&!Ut(l)&&(!l.componentInstance||!l.componentInstance._vnode.isComment)){var f=l.data.transition=A({},c);if("out-in"===r)return this._leaving=!0,it(f,"afterLeave",function(){t._leaving=!1,t.$forceUpdate()}),ro(e,o);if("in-out"===r){if(Ut(a))return u;var p,d=function(){p()};it(c,"afterEnter",d),it(c,"enterCancelled",d),it(f,"delayLeave",function(e){p=e})}}return o}}},so=A({tag:String,moveClass:String},eo);function co(e){e.elm._moveCb&&e.elm._moveCb(),e.elm._enterCb&&e.elm._enterCb()}function uo(e){e.data.newPos=e.elm.getBoundingClientRect()}function lo(e){var t=e.data.pos,n=e.data.newPos,r=t.left-n.left,i=t.top-n.top;if(r||i){e.data.moved=!0;var o=e.elm.style;o.transform=o.WebkitTransform="translate("+r+"px,"+i+"px)",o.transitionDuration="0s"}}delete so.mode;var fo={Transition:ao,TransitionGroup:{props:so,beforeMount:function(){var e=this,t=this._update;this._update=function(n,r){var i=Zt(e);e.__patch__(e._vnode,e.kept,!1,!0),e._vnode=e.kept,i(),t.call(e,n,r)}},render:function(e){for(var t=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,i=this.$slots.default||[],o=this.children=[],a=no(this),s=0;s-1?Gn[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:Gn[e]=/HTMLUnknownElement/.test(t.toString())},A(wn.options.directives,Qi),A(wn.options.components,fo),wn.prototype.__patch__=z?zi:S,wn.prototype.$mount=function(e,t){return function(e,t,n){var r;return e.$el=t,e.$options.render||(e.$options.render=ve),Yt(e,"beforeMount"),r=function(){e._update(e._render(),n)},new fn(e,r,S,{before:function(){e._isMounted&&!e._isDestroyed&&Yt(e,"beforeUpdate")}},!0),n=!1,null==e.$vnode&&(e._isMounted=!0,Yt(e,"mounted")),e}(this,e=e&&z?Yn(e):void 0,t)},z&&setTimeout(function(){F.devtools&&ne&&ne.emit("init",wn)},0);var po=/\{\{((?:.|\r?\n)+?)\}\}/g,vo=/[-.*+?^${}()|[\]\/\\]/g,ho=g(function(e){var t=e[0].replace(vo,"\\$&"),n=e[1].replace(vo,"\\$&");return new RegExp(t+"((?:.|\\n)+?)"+n,"g")});var mo={staticKeys:["staticClass"],transformNode:function(e,t){t.warn;var n=Fr(e,"class");n&&(e.staticClass=JSON.stringify(n));var r=Ir(e,"class",!1);r&&(e.classBinding=r)},genData:function(e){var t="";return e.staticClass&&(t+="staticClass:"+e.staticClass+","),e.classBinding&&(t+="class:"+e.classBinding+","),t}};var yo,go={staticKeys:["staticStyle"],transformNode:function(e,t){t.warn;var n=Fr(e,"style");n&&(e.staticStyle=JSON.stringify(ai(n)));var r=Ir(e,"style",!1);r&&(e.styleBinding=r)},genData:function(e){var t="";return e.staticStyle&&(t+="staticStyle:"+e.staticStyle+","),e.styleBinding&&(t+="style:("+e.styleBinding+"),"),t}},_o=function(e){return(yo=yo||document.createElement("div")).innerHTML=e,yo.textContent},bo=p("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),$o=p("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),wo=p("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),Co=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,xo=/^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,ko="[a-zA-Z_][\\-\\.0-9_a-zA-Z"+P.source+"]*",Ao="((?:"+ko+"\\:)?"+ko+")",Oo=new RegExp("^<"+Ao),So=/^\s*(\/?)>/,To=new RegExp("^<\\/"+Ao+"[^>]*>"),Eo=/^]+>/i,No=/^",""":'"',"&":"&"," ":"\n"," ":"\t","'":"'"},Io=/&(?:lt|gt|quot|amp|#39);/g,Fo=/&(?:lt|gt|quot|amp|#39|#10|#9);/g,Po=p("pre,textarea",!0),Ro=function(e,t){return e&&Po(e)&&"\n"===t[0]};function Ho(e,t){var n=t?Fo:Io;return e.replace(n,function(e){return Mo[e]})}var Bo,Uo,zo,Vo,Ko,Jo,qo,Wo,Zo=/^@|^v-on:/,Go=/^v-|^@|^:|^#/,Xo=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,Yo=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,Qo=/^\(|\)$/g,ea=/^\[.*\]$/,ta=/:(.*)$/,na=/^:|^\.|^v-bind:/,ra=/\.[^.\]]+(?=[^\]]*$)/g,ia=/^v-slot(:|$)|^#/,oa=/[\r\n]/,aa=/\s+/g,sa=g(_o),ca="_empty_";function ua(e,t,n){return{type:1,tag:e,attrsList:t,attrsMap:ma(t),rawAttrsMap:{},parent:n,children:[]}}function la(e,t){Bo=t.warn||Sr,Jo=t.isPreTag||T,qo=t.mustUseProp||T,Wo=t.getTagNamespace||T;t.isReservedTag;zo=Tr(t.modules,"transformNode"),Vo=Tr(t.modules,"preTransformNode"),Ko=Tr(t.modules,"postTransformNode"),Uo=t.delimiters;var n,r,i=[],o=!1!==t.preserveWhitespace,a=t.whitespace,s=!1,c=!1;function u(e){if(l(e),s||e.processed||(e=fa(e,t)),i.length||e===n||n.if&&(e.elseif||e.else)&&da(n,{exp:e.elseif,block:e}),r&&!e.forbidden)if(e.elseif||e.else)a=e,(u=function(e){var t=e.length;for(;t--;){if(1===e[t].type)return e[t];e.pop()}}(r.children))&&u.if&&da(u,{exp:a.elseif,block:a});else{if(e.slotScope){var o=e.slotTarget||'"default"';(r.scopedSlots||(r.scopedSlots={}))[o]=e}r.children.push(e),e.parent=r}var a,u;e.children=e.children.filter(function(e){return!e.slotScope}),l(e),e.pre&&(s=!1),Jo(e.tag)&&(c=!1);for(var f=0;f]*>)","i")),p=e.replace(f,function(e,n,r){return u=r.length,Do(l)||"noscript"===l||(n=n.replace(//g,"$1").replace(//g,"$1")),Ro(l,n)&&(n=n.slice(1)),t.chars&&t.chars(n),""});c+=e.length-p.length,e=p,A(l,c-u,c)}else{var d=e.indexOf("<");if(0===d){if(No.test(e)){var v=e.indexOf("--\x3e");if(v>=0){t.shouldKeepComment&&t.comment(e.substring(4,v),c,c+v+3),C(v+3);continue}}if(jo.test(e)){var h=e.indexOf("]>");if(h>=0){C(h+2);continue}}var m=e.match(Eo);if(m){C(m[0].length);continue}var y=e.match(To);if(y){var g=c;C(y[0].length),A(y[1],g,c);continue}var _=x();if(_){k(_),Ro(_.tagName,e)&&C(1);continue}}var b=void 0,$=void 0,w=void 0;if(d>=0){for($=e.slice(d);!(To.test($)||Oo.test($)||No.test($)||jo.test($)||(w=$.indexOf("<",1))<0);)d+=w,$=e.slice(d);b=e.substring(0,d)}d<0&&(b=e),b&&C(b.length),t.chars&&b&&t.chars(b,c-b.length,c)}if(e===n){t.chars&&t.chars(e);break}}function C(t){c+=t,e=e.substring(t)}function x(){var t=e.match(Oo);if(t){var n,r,i={tagName:t[1],attrs:[],start:c};for(C(t[0].length);!(n=e.match(So))&&(r=e.match(xo)||e.match(Co));)r.start=c,C(r[0].length),r.end=c,i.attrs.push(r);if(n)return i.unarySlash=n[1],C(n[0].length),i.end=c,i}}function k(e){var n=e.tagName,c=e.unarySlash;o&&("p"===r&&wo(n)&&A(r),s(n)&&r===n&&A(n));for(var u=a(n)||!!c,l=e.attrs.length,f=new Array(l),p=0;p=0&&i[a].lowerCasedTag!==s;a--);else a=0;if(a>=0){for(var u=i.length-1;u>=a;u--)t.end&&t.end(i[u].tag,n,o);i.length=a,r=a&&i[a-1].tag}else"br"===s?t.start&&t.start(e,[],!0,n,o):"p"===s&&(t.start&&t.start(e,[],!1,n,o),t.end&&t.end(e,n,o))}A()}(e,{warn:Bo,expectHTML:t.expectHTML,isUnaryTag:t.isUnaryTag,canBeLeftOpenTag:t.canBeLeftOpenTag,shouldDecodeNewlines:t.shouldDecodeNewlines,shouldDecodeNewlinesForHref:t.shouldDecodeNewlinesForHref,shouldKeepComment:t.comments,outputSourceRange:t.outputSourceRange,start:function(e,o,a,l,f){var p=r&&r.ns||Wo(e);q&&"svg"===p&&(o=function(e){for(var t=[],n=0;nc&&(s.push(o=e.slice(c,i)),a.push(JSON.stringify(o)));var u=Ar(r[1].trim());a.push("_s("+u+")"),s.push({"@binding":u}),c=i+r[0].length}return c-1"+("true"===o?":("+t+")":":_q("+t+","+o+")")),Mr(e,"change","var $$a="+t+",$$el=$event.target,$$c=$$el.checked?("+o+"):("+a+");if(Array.isArray($$a)){var $$v="+(r?"_n("+i+")":i)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+Br(t,"$$a.concat([$$v])")+")}else{$$i>-1&&("+Br(t,"$$a.slice(0,$$i).concat($$a.slice($$i+1))")+")}}else{"+Br(t,"$$c")+"}",null,!0)}(e,r,i);else if("input"===o&&"radio"===a)!function(e,t,n){var r=n&&n.number,i=Ir(e,"value")||"null";Er(e,"checked","_q("+t+","+(i=r?"_n("+i+")":i)+")"),Mr(e,"change",Br(t,i),null,!0)}(e,r,i);else if("input"===o||"textarea"===o)!function(e,t,n){var r=e.attrsMap.type,i=n||{},o=i.lazy,a=i.number,s=i.trim,c=!o&&"range"!==r,u=o?"change":"range"===r?Wr:"input",l="$event.target.value";s&&(l="$event.target.value.trim()"),a&&(l="_n("+l+")");var f=Br(t,l);c&&(f="if($event.target.composing)return;"+f),Er(e,"value","("+t+")"),Mr(e,u,f,null,!0),(s||a)&&Mr(e,"blur","$forceUpdate()")}(e,r,i);else if(!F.isReservedTag(o))return Hr(e,r,i),!1;return!0},text:function(e,t){t.value&&Er(e,"textContent","_s("+t.value+")",t)},html:function(e,t){t.value&&Er(e,"innerHTML","_s("+t.value+")",t)}},isPreTag:function(e){return"pre"===e},isUnaryTag:bo,mustUseProp:jn,canBeLeftOpenTag:$o,isReservedTag:Wn,getTagNamespace:Zn,staticKeys:function(e){return e.reduce(function(e,t){return e.concat(t.staticKeys||[])},[]).join(",")}(ba)},xa=g(function(e){return p("type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap"+(e?","+e:""))});function ka(e,t){e&&($a=xa(t.staticKeys||""),wa=t.isReservedTag||T,function e(t){t.static=function(e){if(2===e.type)return!1;if(3===e.type)return!0;return!(!e.pre&&(e.hasBindings||e.if||e.for||d(e.tag)||!wa(e.tag)||function(e){for(;e.parent;){if("template"!==(e=e.parent).tag)return!1;if(e.for)return!0}return!1}(e)||!Object.keys(e).every($a)))}(t);if(1===t.type){if(!wa(t.tag)&&"slot"!==t.tag&&null==t.attrsMap["inline-template"])return;for(var n=0,r=t.children.length;n|^function(?:\s+[\w$]+)?\s*\(/,Oa=/\([^)]*?\);*$/,Sa=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,Ta={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},Ea={esc:["Esc","Escape"],tab:"Tab",enter:"Enter",space:[" ","Spacebar"],up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete","Del"]},Na=function(e){return"if("+e+")return null;"},ja={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:Na("$event.target !== $event.currentTarget"),ctrl:Na("!$event.ctrlKey"),shift:Na("!$event.shiftKey"),alt:Na("!$event.altKey"),meta:Na("!$event.metaKey"),left:Na("'button' in $event && $event.button !== 0"),middle:Na("'button' in $event && $event.button !== 1"),right:Na("'button' in $event && $event.button !== 2")};function Da(e,t){var n=t?"nativeOn:":"on:",r="",i="";for(var o in e){var a=La(e[o]);e[o]&&e[o].dynamic?i+=o+","+a+",":r+='"'+o+'":'+a+","}return r="{"+r.slice(0,-1)+"}",i?n+"_d("+r+",["+i.slice(0,-1)+"])":n+r}function La(e){if(!e)return"function(){}";if(Array.isArray(e))return"["+e.map(function(e){return La(e)}).join(",")+"]";var t=Sa.test(e.value),n=Aa.test(e.value),r=Sa.test(e.value.replace(Oa,""));if(e.modifiers){var i="",o="",a=[];for(var s in e.modifiers)if(ja[s])o+=ja[s],Ta[s]&&a.push(s);else if("exact"===s){var c=e.modifiers;o+=Na(["ctrl","shift","alt","meta"].filter(function(e){return!c[e]}).map(function(e){return"$event."+e+"Key"}).join("||"))}else a.push(s);return a.length&&(i+=function(e){return"if(!$event.type.indexOf('key')&&"+e.map(Ma).join("&&")+")return null;"}(a)),o&&(i+=o),"function($event){"+i+(t?"return "+e.value+"($event)":n?"return ("+e.value+")($event)":r?"return "+e.value:e.value)+"}"}return t||n?e.value:"function($event){"+(r?"return "+e.value:e.value)+"}"}function Ma(e){var t=parseInt(e,10);if(t)return"$event.keyCode!=="+t;var n=Ta[e],r=Ea[e];return"_k($event.keyCode,"+JSON.stringify(e)+","+JSON.stringify(n)+",$event.key,"+JSON.stringify(r)+")"}var Ia={on:function(e,t){e.wrapListeners=function(e){return"_g("+e+","+t.value+")"}},bind:function(e,t){e.wrapData=function(n){return"_b("+n+",'"+e.tag+"',"+t.value+","+(t.modifiers&&t.modifiers.prop?"true":"false")+(t.modifiers&&t.modifiers.sync?",true":"")+")"}},cloak:S},Fa=function(e){this.options=e,this.warn=e.warn||Sr,this.transforms=Tr(e.modules,"transformCode"),this.dataGenFns=Tr(e.modules,"genData"),this.directives=A(A({},Ia),e.directives);var t=e.isReservedTag||T;this.maybeComponent=function(e){return!!e.component||!t(e.tag)},this.onceId=0,this.staticRenderFns=[],this.pre=!1};function Pa(e,t){var n=new Fa(t);return{render:"with(this){return "+(e?Ra(e,n):'_c("div")')+"}",staticRenderFns:n.staticRenderFns}}function Ra(e,t){if(e.parent&&(e.pre=e.pre||e.parent.pre),e.staticRoot&&!e.staticProcessed)return Ha(e,t);if(e.once&&!e.onceProcessed)return Ba(e,t);if(e.for&&!e.forProcessed)return za(e,t);if(e.if&&!e.ifProcessed)return Ua(e,t);if("template"!==e.tag||e.slotTarget||t.pre){if("slot"===e.tag)return function(e,t){var n=e.slotName||'"default"',r=qa(e,t),i="_t("+n+(r?","+r:""),o=e.attrs||e.dynamicAttrs?Ga((e.attrs||[]).concat(e.dynamicAttrs||[]).map(function(e){return{name:b(e.name),value:e.value,dynamic:e.dynamic}})):null,a=e.attrsMap["v-bind"];!o&&!a||r||(i+=",null");o&&(i+=","+o);a&&(i+=(o?"":",null")+","+a);return i+")"}(e,t);var n;if(e.component)n=function(e,t,n){var r=t.inlineTemplate?null:qa(t,n,!0);return"_c("+e+","+Va(t,n)+(r?","+r:"")+")"}(e.component,e,t);else{var r;(!e.plain||e.pre&&t.maybeComponent(e))&&(r=Va(e,t));var i=e.inlineTemplate?null:qa(e,t,!0);n="_c('"+e.tag+"'"+(r?","+r:"")+(i?","+i:"")+")"}for(var o=0;o>>0}(a):"")+")"}(e,e.scopedSlots,t)+","),e.model&&(n+="model:{value:"+e.model.value+",callback:"+e.model.callback+",expression:"+e.model.expression+"},"),e.inlineTemplate){var o=function(e,t){var n=e.children[0];if(n&&1===n.type){var r=Pa(n,t.options);return"inlineTemplate:{render:function(){"+r.render+"},staticRenderFns:["+r.staticRenderFns.map(function(e){return"function(){"+e+"}"}).join(",")+"]}"}}(e,t);o&&(n+=o+",")}return n=n.replace(/,$/,"")+"}",e.dynamicAttrs&&(n="_b("+n+',"'+e.tag+'",'+Ga(e.dynamicAttrs)+")"),e.wrapData&&(n=e.wrapData(n)),e.wrapListeners&&(n=e.wrapListeners(n)),n}function Ka(e){return 1===e.type&&("slot"===e.tag||e.children.some(Ka))}function Ja(e,t){var n=e.attrsMap["slot-scope"];if(e.if&&!e.ifProcessed&&!n)return Ua(e,t,Ja,"null");if(e.for&&!e.forProcessed)return za(e,t,Ja);var r=e.slotScope===ca?"":String(e.slotScope),i="function("+r+"){return "+("template"===e.tag?e.if&&n?"("+e.if+")?"+(qa(e,t)||"undefined")+":undefined":qa(e,t)||"undefined":Ra(e,t))+"}",o=r?"":",proxy:true";return"{key:"+(e.slotTarget||'"default"')+",fn:"+i+o+"}"}function qa(e,t,n,r,i){var o=e.children;if(o.length){var a=o[0];if(1===o.length&&a.for&&"template"!==a.tag&&"slot"!==a.tag){var s=n?t.maybeComponent(a)?",1":",0":"";return""+(r||Ra)(a,t)+s}var c=n?function(e,t){for(var n=0,r=0;r':'
',ts.innerHTML.indexOf(" ")>0}var os=!!z&&is(!1),as=!!z&&is(!0),ss=g(function(e){var t=Yn(e);return t&&t.innerHTML}),cs=wn.prototype.$mount;return wn.prototype.$mount=function(e,t){if((e=e&&Yn(e))===document.body||e===document.documentElement)return this;var n=this.$options;if(!n.render){var r=n.template;if(r)if("string"==typeof r)"#"===r.charAt(0)&&(r=ss(r));else{if(!r.nodeType)return this;r=r.innerHTML}else e&&(r=function(e){if(e.outerHTML)return e.outerHTML;var t=document.createElement("div");return t.appendChild(e.cloneNode(!0)),t.innerHTML}(e));if(r){var i=rs(r,{outputSourceRange:!1,shouldDecodeNewlines:os,shouldDecodeNewlinesForHref:as,delimiters:n.delimiters,comments:n.comments},this),o=i.render,a=i.staticRenderFns;n.render=o,n.staticRenderFns=a}}return cs.call(this,e,t)},wn.compile=rs,wn}); \ No newline at end of file diff --git a/front/css/index.css b/front/css/index.css new file mode 100755 index 0000000..5ae1273 --- /dev/null +++ b/front/css/index.css @@ -0,0 +1,71 @@ +html,body,#app,.el-container{ + margin: 0px; + padding: 0px; + height: 100%; +} + +.el-header { + background-color: #B3C0D1; + color: #333; + text-align: left; + line-height: 80px; + font-size: 30px; + font-weight: bold; +} + +.el-footer { + background-color: #B3C0D1; + color: #333; + text-align: center; + line-height: 30px; + font-size: 12px; +} + +.el-aside { + background-color: #D3DCE6; + color: #333; + text-align: center; + line-height: 200px; +} + +.el-main { + background-color: #E9EEF3; + color: #333; +} + +body > .el-container { + margin-bottom: 40px; +} + +.el-container:nth-child(5) .el-aside, +.el-container:nth-child(6) .el-aside { + line-height: 260px; +} + +.el-container:nth-child(7) .el-aside { + line-height: 320px; +} + +.el-dialog .avatar-uploader .el-upload { + border: 1px dashed #d9d9d9; + border-radius: 6px; + cursor: pointer; + position: relative; + overflow: hidden; +} +.el-dialog .avatar-uploader .el-upload:hover { + border-color: #409EFF; +} +.el-dialog .avatar-uploader-icon { + font-size: 28px; + color: #8c939d; + width: 178px; + height: 178px; + line-height: 178px; + text-align: center; +} +.el-dialog .avatar { + width: 178px; + height: 178px; + display: block; +} \ No newline at end of file diff --git a/front/index.html b/front/index.html new file mode 100755 index 0000000..95aba10 --- /dev/null +++ b/front/index.html @@ -0,0 +1,175 @@ + + + + + + + + 学生信息管理系统 + + + + + + + + + + + + + + + +
+ + 学生信息管理系统 + + + + + + 班级管理 + + + + 学生信息 + + + + 讲师信息 + + + + 课程管理 + + + + + + + + 首页 + 学生管理 + + + + + + + + + + + 查询 + 全部 + 添加 + + + + 导入Excel + + + + 导出Excel + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 批量删除 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 确定 + 取消 + + + + 学生信息管理系统 版权所有: Hzbb | 2024-12-20 + + + +
+ + + + + \ No newline at end of file diff --git a/front/js/index.js b/front/js/index.js new file mode 100755 index 0000000..c6b668f --- /dev/null +++ b/front/js/index.js @@ -0,0 +1,531 @@ +const app = new Vue({ + el: '#app', + data() { + // 校验学号是否存在 + const rulesSno = (rule, value, callback) => { + if (this.isEdit) { + callback(); + } + // 使用 Axios 进行校验 + axios + .post( + this.baseURL + 'sno/check/', + { + sno: value, + } + ) + .then((res) => { + if (res.data.code === 1) { + // 请求成功 + if (res.data.exists) { + callback(new Error("学号已存在")); + } else { + callback(); + }; + } else { + // 请求失败 + callback(new Error("校验学号后端出现异常")); + }; + }) + .catch((err) => { + // 如果请求失败在控制台打印 + console.log(err); + }) + } + return { + students: [], // 所有学生信息 + pageStudents: [], // 分页后当前页的学生信息 + // baseURL: "http://172.29.89.96/", + baseURL: window.location.origin + '/', // 动态获取请求的url + inputStr: '', // 输入查询的关键字 + selectStudents: [], // 选择复选框时把选择记录存在此集合 + + // === 分页相关的变量 === + total: 0, // 数据总行数 + currentpage: 1, // 当前所在的页 + pagesize: 10, // 每页显示多少行 + // === 弹出框表单 === + dialogVisible: false, // 默认为不弹出状态 + dialogTitle: false, // 弹出框标题默认为空 + isView: false, // 标识是否是查看 + isEdit: false, // 标识是否是编辑 + // 添加默认空集合 + studentForm: { + sno: '', + name: '', + gender: '', + birthday: '', + mobile: '', + email: '', + address: '', + image: '', + imageUrl: '', + }, + // 弹出框输入校验 + rules: { + sno: [ + { required: true, message: "学号不能为空", trigger: 'blur' }, + { pattern: /^[9][5]\d{3}$/, message: "学号必须是95开头的五位数字", trigger: 'blur' }, + { validator: rulesSno, trigger: 'blur' }, + ], + name: [ + { required: true, message: "姓名不能为空", trigger: 'blur' }, + { pattern: /^[\u4e00-\u9fa5]{2,5}$/, message: "姓名必须是2-5个汉字", trigger: 'blur' }, + ], + gender: [ + { required: true, message: "性别不能为空", trigger: 'change' }, + ], + birthday: [ + { required: true, message: "出生日期不能为空", trigger: 'change' }, + ], + mobile: [ + { required: true, message: "电话号码不能为空", trigger: 'blur' }, + { pattern: /^((0\d{2,3}-\d{7,8})|(1[3456789]\d{9}))$/, message: "请检查电话号码是否输入正确", triggler: 'blur' }, + ], + email: [ + { required: true, message: "邮箱地址不能为空", trigger: 'blur' }, + { + pattern: /^([a-zA-Z0-9]+[-_\.]?)+@[a-zA-Z0-9]+\.[a-z]+$/, + message: "请检查邮箱地址是否输入正确", trigger: 'blur' + }, + ], + address: [ + { required: true, message: "家庭住址不能为空", trigger: 'blur' }, + ] + }, + } + }, + + mounted() { + // 自动加载数据 + this.getStudents(); + }, + // 事件 + methods: { + // 获取所有学生的信息 + getStudents: function () { + // 记录 this 的地址 + let that = this + // 使用 Axios 实现 Ajax 请求 + axios + .get(that.baseURL + "students/") + .then(function (res) { + // 请求成功后执行的函数 + if (res.data.code == 1) { + // 数据返回给 students + that.students = res.data.data; + // 获取返回记录的总行数 + that.total = res.data.data.length; + // 获取当前页的数据 + that.getPageStudents(); + // 弹窗提示 + that.$message({ + message: '数据加载成功!', + type: 'success' + }); + console.log(that.students); + } else { + that.$message.error(res.data.msg); + } + }) + .catch(function (err) { + // 请求失败后执行的函数 + console.log(err) + }); + }, + // 清除输入内容获取所有学生信息 + getAllStudents() { + this.inputStr = ""; + this.getStudents(); + }, + // 获取当前页的学生数据 + getPageStudents() { + // 清空 pageStudents 中的数据 + this.pageStudents = []; + // 获取当前页的数据 + for (let i = (this.currentpage - 1) * this.pagesize; i < this.total; i++) { + // 遍历数据添加到 pageStudents 中 + this.pageStudents.push(this.students[i]); + // 判断是否达到一页的要求 + if (this.pageStudents.length === this.pagesize) break; + } + }, + // 实现学生信息查询 + queryStudents() { + // 使用Ajax请求 -- POST --> 传递 InputStr + let that = this + axios + .post( + that.baseURL + "students/query/", + { + inputstr: that.inputStr + } + ) + .then(function (res) { + if (res.data.code === 1) { + // 数据返回给 students + that.students = res.data.data; + // 获取返回记录的总行数 + that.total = res.data.data.length; + // 获取当前页的数据 + that.getPageStudents(); + // 弹窗提示 + that.$message({ + message: '数据加载成功!', + type: 'success' + }); + } else { + that.$message.error(res.data.msg); + } + }) + .catch(function (err) { + console.log(err) + that.$message.error("获取后端查询结果出现异常!"); + }); + }, + // 添加学生信息明细弹出框 + addStudent() { + // 修改弹出框标题 + this.dialogTitle = "添加学生明细"; + // 弹出表单 + this.dialogVisible = true; + }, + // 根据 id 获取 image + getImageBySno(sno) { + for(oneStudent of this.students) { + // 判断 + if(oneStudent.sno == sno) { + return oneStudent.image; + } + } + }, + // 查看学生信息明细弹出框 + viewStudent(row) { + // 修改弹出框标题 + this.dialogTitle = "查看学生明细"; + // 修改 isView 变量 + this.isView = true; + // 弹出表单 + this.dialogVisible = true; + // 深拷贝方法: + this.studentForm = JSON.parse(JSON.stringify(row)); + // 获取照片 + this.studentForm.image = this.getImageBySno(row.sno); + // 获取照片url + this.studentForm.imageUrl = this.baseURL + 'media/' + this.studentForm.image; + }, + // 编辑学生详细信息弹出框 + updateStudent(row) { + // 修改弹出框标题 + this.dialogTitle = "编辑学生明细"; + // 修改 isEdit 变量 + this.isEdit = true; + // 弹出表单 + this.dialogVisible = true; + // 深拷贝方法: + this.studentForm = JSON.parse(JSON.stringify(row)); + // 获取照片 + this.studentForm.image = this.getImageBySno(row.sno); + // 获取照片url + this.studentForm.imageUrl = this.baseURL + 'media/' + this.studentForm.image; + }, + // 提交学生的表单(添加、编辑) + submitStudentForm(formName) { + this.$refs[formName].validate((valid) => { + if (valid) { + // 判断提交表单事件类型,添加 or 编辑 + if (this.isEdit) { + // 修改事件 + this.submitUpdateStudent(); + } else { + // 添加事件 + this.submitAddStudent(); + } + } else { + console.log('error submit!!'); + return false; + } + }); + }, + // 添加学生信息到数据库 + submitAddStudent() { + // 定义 that + let that = this; + // 执行 Axios 请求 + axios + .post(that.baseURL + 'student/add/', that.studentForm) + .then(res => { + // 执行成功 + if (res.data.code === 1) { + // 获取所有学生信息 + that.students = res.data.data; + // 获取记录条数 + that.total = res.data.data.length; + // 获取分页信息 + that.getPageStudents(); + // 弹窗提示 + that.$message({ + message: '数据添加成功!', + type: 'success' + }); + // 关闭弹窗 + that.closeDialogForm('studentForm'); + } else { + that.$message.error(res.data.msg); + } + }) + .catch(err => { + // 执行失败 + console.log(err) + that.$message.error("添加时获取后端查询结果出现异常!"); + }) + }, + // 编辑学生信息到数据库 + submitUpdateStudent() { + // 定义 that + let that = this; + // 执行 Axios 请求 + axios + .post(that.baseURL + 'student/update/', that.studentForm) + .then(res => { + // 执行成功 + if (res.data.code === 1) { + // 获取所有学生信息 + that.students = res.data.data; + // 获取记录条数 + that.total = res.data.data.length; + // 获取分页信息 + that.getPageStudents(); + // 弹窗提示 + that.$message({ + message: '数据修改成功!', + type: 'success' + }); + // 关闭弹窗 + that.closeDialogForm('studentForm'); + } else { + that.$message.error(res.data.msg); + } + }) + .catch(err => { + // 执行失败 + console.log(err) + that.$message.error("修改时获取后端查询结果出现异常!"); + }) + }, + // 删除学生信息到数据库 + deleteStudent(row) { + // 等待确认 + this.$confirm('是否确认删除学生信息【学号:' + row.sno + '\t姓名:' + row.name + '】?', '提示', { + confirmButtonText: '确定删除', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + // 确认删除相应事件 + let that = this + // 调用后端接口 + axios + .post(that.baseURL + 'student/delete/', { sno: row.sno }) + .then(res => { + if (res.data.code === 1) { + // 获取所有学生信息 + that.students = res.data.data; + // 获取记录数 + that.total = res.data.data.length; + // 获取分页信息 + that.getPageStudents(); + // 弹窗提示 + that.$message({ + message: '数据删除成功!', + type: 'success' + }); + } else { + that.$message.error(res.data.msg); + } + }) + }).catch(() => { + this.$message({ + type: 'info', + message: '已取消删除' + }); + }); + }, + // 批量删除学生信息到数据库 + deleteStudents() { + // 等待确认 + this.$confirm("是否确认批量删除 " + this.selectStudents.length + " 名学生信息?", '提示', { + confirmButtonText: '确定删除', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + // 确认删除相应事件 + let that = this + // 调用后端接口 + axios + .post(that.baseURL + 'students/delete/', { student: that.selectStudents }) + .then(res => { + if (res.data.code === 1) { + // 获取所有学生信息 + that.students = res.data.data; + // 获取记录数 + that.total = res.data.data.length; + // 获取分页信息 + that.getPageStudents(); + // 弹窗提示 + that.$message({ + message: '数据批量删除成功!', + type: 'success' + }); + } else { + that.$message.error(res.data.msg); + } + }) + }).catch(() => { + this.$message({ + type: 'info', + message: '已取消删除' + }); + }); + }, + // 关闭弹出框的表单 + closeDialogForm(formName) { + // 重置表单校验 + this.$refs[formName].resetFields(); + // 清空弹出框集合 + this.studentForm.sno = ''; + this.studentForm.name = ''; + this.studentForm.gender = ''; + this.studentForm.birthday = ''; + this.studentForm.mobile = ''; + this.studentForm.email = ''; + this.studentForm.address = ''; + this.studentForm.image = ''; + this.studentForm.imageUrl = ''; + // 关闭弹出框 + this.dialogVisible = false; + // 清空 isView 和 isEdit 的值 + this.isView = false; + this.isEdit = false; + }, + //选择学生头像后点击确定后触发的事件 + uploadPicturePost(file) { + //定义that + let that = this; + //定义一个FormData类 + let fileReq = new FormData(); + //把照片穿进去 + fileReq.append('avatar', file.file); + //使用Axios发起Ajax请求 + axios( + { + method: 'post', + url: that.baseURL + 'upload/', + data: fileReq + } + ).then(res => { + // 根据code判断是否成功 + if (res.data.code === 1) { + //把照片给image + that.studentForm.image = res.data.name; + //拼接imageurl + that.studentForm.imageUrl = that.baseURL + "media/" + res.data.name; + } else { + //失败的提示! + that.$message.error(res.data.msg); + } + + }).catch(err => { + console.log(err); + that.$message.error("上传头像出现异常!"); + }) + + }, + // excel文件导入 + uploadExcelPost(file) { + let that = this + //实例化一个formdata + //定义一个FormData类 + let fileReq = new FormData(); + //把照片穿进去 + fileReq.append('excel', file.file); + //使用Axios发起Ajax请求 + axios( + { + method: 'post', + url: that.baseURL + 'excel/import/', + data: fileReq + } + ).then(res => { + // 根据code判断是否成功 + if (res.data.code === 1) { + //把照片给image + that.students = res.data.data; + //计算总共多少条 + that.total = res.data.data.length; + //分页 + that.getPageStudents(); + //弹出框体显示结果 + this.$alert('本次导入完成! 成功:' + res.data.success +'失败:'+ res.data.error + , '导入结果展示', { + confirmButtonText: '确定', + callback: action => { + this.$message({ + type: 'info', + message: "本次导入失败数量为:" + res.data.error + ",具体的学号:"+res.data.errors, + }); + } + }); + //把失败明细打印 + console.log("本次导入失败数量为:" + res.data.error + ",具体的学号:"); + console.log(res.data.errors); + } else { + //失败的提示! + that.$message.error(res.data.msg); + } + + }).catch(err => { + console.log(err); + that.$message.error("上传Excel出现异常!"); + }) + + }, + // excel文件导出 + exportToExcel(){ + let that = this + axios.get(that.baseURL + 'excel/export/') + .then(res=>{ + if(res.data.code ===1){ + //拼接excel 的完整URL + let url = that.baseURL + 'media/'+ res.data.name; + //下载 + window.open(url); + } else { + that.$message.error("导出Excel出现异常!"); + } + }) + .catch(err=>{ + console.log(err); + }); + + }, + // 分页时修改每页的行数 + handleSizeChange(size) { + // 修改当前每页的数据行数 + this.pagesize = size; + // 数据重新分页 + this.getPageStudents(); + }, + // 调整当前的页码 + handleCurrentChange(pageNumber) { + // 修改当前的页码 + this.currentpage = pageNumber; + // 数据重新分页 + this.getPageStudents(); + }, + // 选择复选框时触发的操作 + handleSelectionChange(data) { + this.selectStudents = data; + console.log(data); + }, + }, +}) \ No newline at end of file diff --git a/manage.py b/manage.py new file mode 100755 index 0000000..948587e --- /dev/null +++ b/manage.py @@ -0,0 +1,15 @@ +#!/usr/bin/env python +import os +import sys + +if __name__ == '__main__': + os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'simsV4BE.settings') + try: + from django.core.management import execute_from_command_line + except ImportError as exc: + raise ImportError( + "Couldn't import Django. Are you sure it's installed and " + "available on your PYTHONPATH environment variable? Did you " + "forget to activate a virtual environment?" + ) from exc + execute_from_command_line(sys.argv) diff --git a/media/020244015af815990e78b38edc1f591f.xlsx b/media/020244015af815990e78b38edc1f591f.xlsx new file mode 100644 index 0000000..303a334 Binary files /dev/null and b/media/020244015af815990e78b38edc1f591f.xlsx differ diff --git a/media/1bf7d88cf023a161719b091a4a936ff9.jpg b/media/1bf7d88cf023a161719b091a4a936ff9.jpg new file mode 100644 index 0000000..41bf35c Binary files /dev/null and b/media/1bf7d88cf023a161719b091a4a936ff9.jpg differ diff --git a/media/1e21250c7bd909f6b352a271336622d8.xlsx b/media/1e21250c7bd909f6b352a271336622d8.xlsx new file mode 100644 index 0000000..d7ca4e5 Binary files /dev/null and b/media/1e21250c7bd909f6b352a271336622d8.xlsx differ diff --git a/media/5258c89e75ee07eb3c696bb5c1c44c35.xlsx b/media/5258c89e75ee07eb3c696bb5c1c44c35.xlsx new file mode 100644 index 0000000..d7ca4e5 Binary files /dev/null and b/media/5258c89e75ee07eb3c696bb5c1c44c35.xlsx differ diff --git a/media/5ae7457447689f8e3a355ca01f6cefd6.xlsx b/media/5ae7457447689f8e3a355ca01f6cefd6.xlsx new file mode 100644 index 0000000..d7ca4e5 Binary files /dev/null and b/media/5ae7457447689f8e3a355ca01f6cefd6.xlsx differ diff --git a/media/643c35b50783da9b0f3175e86250f1fd.xlsx b/media/643c35b50783da9b0f3175e86250f1fd.xlsx new file mode 100644 index 0000000..d7ca4e5 Binary files /dev/null and b/media/643c35b50783da9b0f3175e86250f1fd.xlsx differ diff --git a/media/66512e369676e82d4773bc22794d1b17.xlsx b/media/66512e369676e82d4773bc22794d1b17.xlsx new file mode 100644 index 0000000..d292b57 Binary files /dev/null and b/media/66512e369676e82d4773bc22794d1b17.xlsx differ diff --git a/media/6cd378e58eb3c0618daf29b18e8aa924.xlsx b/media/6cd378e58eb3c0618daf29b18e8aa924.xlsx new file mode 100644 index 0000000..d7ca4e5 Binary files /dev/null and b/media/6cd378e58eb3c0618daf29b18e8aa924.xlsx differ diff --git a/media/7199f91eb8152fb7872fde2c4471c456.xlsx b/media/7199f91eb8152fb7872fde2c4471c456.xlsx new file mode 100644 index 0000000..d7ca4e5 Binary files /dev/null and b/media/7199f91eb8152fb7872fde2c4471c456.xlsx differ diff --git a/media/89847b3b30e9598c35b5e3c800eaf1c2.png b/media/89847b3b30e9598c35b5e3c800eaf1c2.png new file mode 100644 index 0000000..994fb74 Binary files /dev/null and b/media/89847b3b30e9598c35b5e3c800eaf1c2.png differ diff --git a/media/985e8e70575166b735bcb5ac89f3e6a4.jpg b/media/985e8e70575166b735bcb5ac89f3e6a4.jpg new file mode 100644 index 0000000..41bf35c Binary files /dev/null and b/media/985e8e70575166b735bcb5ac89f3e6a4.jpg differ diff --git a/media/988955a002698943f79b927c849a2a56.xlsx b/media/988955a002698943f79b927c849a2a56.xlsx new file mode 100644 index 0000000..d7ca4e5 Binary files /dev/null and b/media/988955a002698943f79b927c849a2a56.xlsx differ diff --git a/media/a91018d7221cad6b0ca632c935afea52.jpg b/media/a91018d7221cad6b0ca632c935afea52.jpg new file mode 100644 index 0000000..41bf35c Binary files /dev/null and b/media/a91018d7221cad6b0ca632c935afea52.jpg differ diff --git a/media/ad9ffec351ea5cb1b631871cae00a643.xlsx b/media/ad9ffec351ea5cb1b631871cae00a643.xlsx new file mode 100644 index 0000000..d7ca4e5 Binary files /dev/null and b/media/ad9ffec351ea5cb1b631871cae00a643.xlsx differ diff --git a/media/da5657f0272e98cf70e1425dbb933f4f.xlsx b/media/da5657f0272e98cf70e1425dbb933f4f.xlsx new file mode 100644 index 0000000..2849310 Binary files /dev/null and b/media/da5657f0272e98cf70e1425dbb933f4f.xlsx differ diff --git a/media/dd145fe8f40012320b7fbdc61347ae51.xlsx b/media/dd145fe8f40012320b7fbdc61347ae51.xlsx new file mode 100644 index 0000000..d7ca4e5 Binary files /dev/null and b/media/dd145fe8f40012320b7fbdc61347ae51.xlsx differ diff --git a/media/df0da2e9716d44c71114c5f66bfd7911.xlsx b/media/df0da2e9716d44c71114c5f66bfd7911.xlsx new file mode 100644 index 0000000..d7ca4e5 Binary files /dev/null and b/media/df0da2e9716d44c71114c5f66bfd7911.xlsx differ diff --git a/media/ed570ccb0a3b8395fdc4f8752a063db4.jpg b/media/ed570ccb0a3b8395fdc4f8752a063db4.jpg new file mode 100644 index 0000000..41bf35c Binary files /dev/null and b/media/ed570ccb0a3b8395fdc4f8752a063db4.jpg differ diff --git a/media/f647b738bea5e567e8b4567a9d501740.xlsx b/media/f647b738bea5e567e8b4567a9d501740.xlsx new file mode 100644 index 0000000..d7ca4e5 Binary files /dev/null and b/media/f647b738bea5e567e8b4567a9d501740.xlsx differ diff --git a/media/fd13d07a999dc2447cc5c62c720bd82e.xlsx b/media/fd13d07a999dc2447cc5c62c720bd82e.xlsx new file mode 100644 index 0000000..d7ca4e5 Binary files /dev/null and b/media/fd13d07a999dc2447cc5c62c720bd82e.xlsx differ diff --git a/module/requirements.txt b/module/requirements.txt new file mode 100755 index 0000000..b985d4d --- /dev/null +++ b/module/requirements.txt @@ -0,0 +1,4 @@ +django==2.1.4 +pymysql==0.9.3 +django-cors-headers==3.2.0 +openpyxl==2.6.2 \ No newline at end of file diff --git a/module/run.sh b/module/run.sh new file mode 100755 index 0000000..514e56a --- /dev/null +++ b/module/run.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +# 使用阿里云源安装必须组件 +#pip config set global.index-url https://mirrors.aliyun.com/pypi/simple && \ +#pip config set global.trusted-host mirrors.aliyun.com && \ +#pip install -r /module/requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple +pip install -r /module/requirements.txt -i https://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com + +# 启动程序 +python /simsBE/manage.py runserver 0.0.0.0:8000 \ No newline at end of file diff --git a/module/run.sh_bak b/module/run.sh_bak new file mode 100644 index 0000000..1b8cf56 --- /dev/null +++ b/module/run.sh_bak @@ -0,0 +1,9 @@ +#!/bin/bash + +# 使用阿里云源安装必须组件 +pip config set global.index-url https://mirrors.aliyun.com/pypi/simple && \ +pip config set global.trusted-host mirrors.aliyun.com && \ +pip install -r /module/requirements.txt + +# 启动程序 +python /simsBE/manage.py runserver 0.0.0.0:8000 \ No newline at end of file diff --git a/nginx/conf.d/default.conf b/nginx/conf.d/default.conf new file mode 100755 index 0000000..d4c8b6c --- /dev/null +++ b/nginx/conf.d/default.conf @@ -0,0 +1,79 @@ +server { + listen 80; + listen [::]:80; + server_name localhost; + + location / { + root /simsFE; + index index.html index.htm; + } + location /student/ { + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header X-Nginx-Proxy true; + proxy_set_header Host $host:$server_port; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_pass http://simsbe:8000/student/; + } + location /students/ { + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header X-Nginx-Proxy true; + proxy_set_header Host $host:$server_port; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_pass http://simsbe:8000/students/; + } + location /sno/ { + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header X-Nginx-Proxy true; + proxy_set_header Host $host:$server_port; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_pass http://simsbe:8000/sno/; + } + location /upload/ { + client_max_body_size 20m; # 设置上传文件的最大大小为 20MB + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header X-Nginx-Proxy true; + proxy_set_header Host $host:$server_port; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_pass http://simsbe:8000/upload/; + } + location /media/ { + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header X-Nginx-Proxy true; + proxy_set_header Host $host:$server_port; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_pass http://simsbe:8000/media/; + } + location /excel/ { + client_max_body_size 20m; # 设置上传文件的最大大小为 20MB + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header X-Nginx-Proxy true; + proxy_set_header Host $host:$server_port; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_pass http://simsbe:8000/excel/; + } +} + diff --git a/nginx/nginx.conf b/nginx/nginx.conf new file mode 100755 index 0000000..952193f --- /dev/null +++ b/nginx/nginx.conf @@ -0,0 +1,50 @@ +user nginx; +worker_processes 2; + +error_log /var/log/nginx/error.log notice; +pid /var/run/nginx.pid; + + +events { + worker_connections 10240; +} + + +http { + include /etc/nginx/mime.types; + default_type application/octet-stream; + + log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + + access_log /var/log/nginx/access.log main; + + # 文件快速传输 + sendfile on; + #tcp_nopush on; + server_tokens off; + keepalive_timeout 65; + + gzip on; + #不压缩临界值,大于4K的才压缩 + gzip_min_length 4k; + gzip_buffers 4 16k; + #用了反向代理的话,末端通信是HTTP/1.0,默认是HTTP/1.1 + #gzip_http_version 1.0; + #压缩级别,1-10,数字越大压缩的越好,时间也越长 + gzip_comp_level 6; + #进行压缩的文件类型, + gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png; + gzip_vary off; + gzip_disable "MSIE [1-6]\."; + + # 过滤代理自身IP + real_ip_header proxy_protocol; + set_real_ip_from 172.16.0.0/12; + set_real_ip_from 10.100.0.1; + real_ip_recursive on; + + + include /etc/nginx/conf.d/*.conf; +} \ No newline at end of file diff --git a/simsV4BE/__init__.py b/simsV4BE/__init__.py new file mode 100755 index 0000000..e69de29 diff --git a/simsV4BE/__pycache__/__init__.cpython-37.pyc b/simsV4BE/__pycache__/__init__.cpython-37.pyc new file mode 100755 index 0000000..00d86a9 Binary files /dev/null and b/simsV4BE/__pycache__/__init__.cpython-37.pyc differ diff --git a/simsV4BE/__pycache__/settings.cpython-37.pyc b/simsV4BE/__pycache__/settings.cpython-37.pyc new file mode 100755 index 0000000..8cbfbe5 Binary files /dev/null and b/simsV4BE/__pycache__/settings.cpython-37.pyc differ diff --git a/simsV4BE/__pycache__/urls.cpython-37.pyc b/simsV4BE/__pycache__/urls.cpython-37.pyc new file mode 100755 index 0000000..4c93444 Binary files /dev/null and b/simsV4BE/__pycache__/urls.cpython-37.pyc differ diff --git a/simsV4BE/__pycache__/wsgi.cpython-37.pyc b/simsV4BE/__pycache__/wsgi.cpython-37.pyc new file mode 100755 index 0000000..1f4fd68 Binary files /dev/null and b/simsV4BE/__pycache__/wsgi.cpython-37.pyc differ diff --git a/simsV4BE/settings.py b/simsV4BE/settings.py new file mode 100755 index 0000000..23d456e --- /dev/null +++ b/simsV4BE/settings.py @@ -0,0 +1,146 @@ +""" +Django settings for simsV4BE project. + +Generated by 'django-admin startproject' using Django 2.1.4. + +For more information on this file, see +https://docs.djangoproject.com/en/2.1/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/2.1/ref/settings/ +""" + +import os, sys + +# Build paths inside the project like this: os.path.join(BASE_DIR, ...) +BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) +sys.path.insert(0, os.path.join(BASE_DIR, 'apps')) + + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/2.1/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = '+*#94$=jxxnz6vqju=^mj9fmd7gwcz81q(u*1(z5j_#7ahmy6s' + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True + +ALLOWED_HOSTS = [ + '*', # 允许所有地址 +] + +# Application definition + +INSTALLED_APPS = [ + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', + 'sims', + 'corsheaders', +] + +MIDDLEWARE = [ + 'django.middleware.security.SecurityMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'corsheaders.middleware.CorsMiddleware', + #'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', +] + +ROOT_URLCONF = 'simsV4BE.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [BASE_DIR, '/templates'] + , + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + }, + }, +] + +WSGI_APPLICATION = 'simsV4BE.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/2.1/ref/settings/#databases + +#DATABASES = { +# 'default': { +# 'ENGINE': 'django.db.backends.sqlite3', +# 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), +# } +#} +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.mysql', + 'NAME': 'sims', + 'USER': 'root', + 'PASSWORD': 'admin@123456', + 'HOST': 'simsdb', + 'PORT': '3306', + } +} + +# Password validation +# https://docs.djangoproject.com/en/2.1/ref/settings/#auth-password-validators + +AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + }, +] + + +# Internationalization +# https://docs.djangoproject.com/en/2.1/topics/i18n/ + +LANGUAGE_CODE = 'en-us' + +TIME_ZONE = 'UTC' + +USE_I18N = True + +USE_L10N = True + +USE_TZ = True + + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/2.1/howto/static-files/ + +STATIC_URL = '/static/' + +# 设置上传文件目录和外部访问路径 +MEDIA_ROOT = os.path.join(BASE_DIR, 'media/') +MEDIA_URL = '/media/' + +CORS_ALLOWED_ORIGINS = { + "https://example.com", + "https://sub.example.com", + "http://localhost:8080", + "http://127.0.0.1:9000", +} \ No newline at end of file diff --git a/simsV4BE/urls.py b/simsV4BE/urls.py new file mode 100755 index 0000000..cf736b4 --- /dev/null +++ b/simsV4BE/urls.py @@ -0,0 +1,38 @@ +"""simsV4BE URL Configuration + +The `urlpatterns` list routes URLs to views. For more information please see: + https://docs.djangoproject.com/en/2.1/topics/http/urls/ +Examples: +Function views + 1. Add an import: from my_app import views + 2. Add a URL to urlpatterns: path('', views.home, name='home') +Class-based views + 1. Add an import: from other_app.views import Home + 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') +Including another URLconf + 1. Import the include() function: from django.urls import include, path + 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) +""" +from django.contrib import admin +from django.urls import path +from sims import views +from django.conf import settings +from django.conf.urls.static import static + + +urlpatterns = [ + path('admin/', admin.site.urls), + path('students/', views.get_students), # 获取所有学生信息的接口 + path('students/query/', views.query_students), # 查询学生信息的接口 + path('sno/check/', views.is_exists_sno), # 校验学号是否已存在 + path('student/add/', views.add_student), # 添加学生信息的接口 + path('student/update/', views.update_student), # 修改学生信息的接口 + path('student/delete/', views.delete_student), # 删除学生信息的接口 + path('students/delete/', views.delete_students), # 批量删除学生信息的接口 + path('upload/', views.upload), # 上传文件接口 + path('excel/import/', views.import_students_excel), # 导入excel文件 + path('excel/export/', views.export_students_excel) # 导出excel文件 +] + +# 允许所有的media文件被访问 +urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) \ No newline at end of file diff --git a/simsV4BE/wsgi.py b/simsV4BE/wsgi.py new file mode 100755 index 0000000..98759f6 --- /dev/null +++ b/simsV4BE/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for simsV4BE project. + +It exposes the WSGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/2.1/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'simsV4BE.settings') + +application = get_wsgi_application()