├── .gitattributes ├── .ipynb_checkpoints └── 测试-checkpoint.ipynb ├── README.md ├── __pycache__ ├── config.cpython-36.pyc ├── config.cpython-36.pyc~dev ├── config.cpython-37.pyc ├── database.cpython-36.pyc ├── database.cpython-36.pyc~dev ├── database.cpython-37.pyc ├── database_helper.cpython-36.pyc └── scrap_funcs.cpython-36.pyc ├── app_run.py ├── config.py ├── database.py ├── database_helper.py ├── docs ├── database_info.json ├── menhu_news.json └── official_news.json ├── edu_news.py ├── requirements.txt ├── scrap_funcs.py ├── static ├── css │ ├── bootstrap-datepicker.css │ ├── bootstrap-table.css │ ├── bootstrap.min.css │ ├── colResizable.css │ ├── dataTables.bootstrap4.min.css │ ├── demo.css │ ├── jPaginate.css │ ├── jquery-ui.css │ ├── selfy.css │ ├── style.css │ └── zTreeStyle │ │ ├── img │ │ ├── diy │ │ │ ├── 1_close.png │ │ │ ├── 1_open.png │ │ │ ├── 2.png │ │ │ ├── 3.png │ │ │ ├── 4.png │ │ │ ├── 5.png │ │ │ ├── 6.png │ │ │ ├── 7.png │ │ │ ├── 8.png │ │ │ └── 9.png │ │ ├── line_conn.gif │ │ ├── loading.gif │ │ ├── zTreeStandard.gif │ │ └── zTreeStandard.png │ │ └── zTreeStyle.css ├── favicon.png ├── img │ ├── 1598332330111.png │ ├── 1598336180830.png │ ├── 1598336200327.png │ ├── 1598336279831.png │ ├── 1598336298921.png │ ├── 1598336344945.png │ ├── 1598336392121.png │ ├── 1598336407417.png │ ├── 1598336575586.png │ ├── 1598336656116.png │ ├── 1598336797303.png │ ├── 1598337728075.png │ ├── 1598337857863.png │ ├── 1598337995341.png │ ├── 1598338035523.png │ ├── 1598338151790.png │ ├── 1598338371371.png │ ├── 1598338394252.png │ ├── 1598338567997.png │ ├── 1598433181154.png │ ├── Skull.png │ ├── background.jpg │ ├── calendar.png │ ├── datagrid_icons.png │ ├── deleting.gif │ ├── demo.gif │ ├── dotted.png │ ├── giphy.webp │ ├── grip.png │ ├── home.png │ ├── loading0.gif │ ├── loading1.gif │ ├── next.png │ ├── previous.png │ ├── snext.png │ ├── sprevious.png │ ├── structure.png │ └── th.png ├── js │ ├── 2html.js │ ├── base-loading.js │ ├── bootstrap-datepicker.min.js │ ├── bootstrap-table-zh-CN.js │ ├── bootstrap-table.js │ ├── bootstrap.min.js │ ├── colResizable-1.5.min.js │ ├── dataTables.bootstrap4.min.js │ ├── jquery-1.4.4.min.js │ ├── jquery-ui.js │ ├── jquery.dataTables.min.js │ ├── jquery.js │ ├── jquery.min.js │ ├── jquery.paginate.js │ ├── jquery.tablesorter.js │ ├── jquery.ztree.all-3.5.min.js │ ├── popper.min.js │ ├── table_related.js │ ├── toc_conf.js │ ├── ztree_toc.js │ └── ztree_toc.min.js └── style │ ├── Clearness Dark.css │ ├── Clearness.css │ ├── GitHub.css │ ├── GitHub2.css │ ├── github-bf51422f4bb36427d391e4b75a1daa083c2d840e.css │ ├── github2-d731afd4f624c99a4b19ad69f3083cd6d02b81d5.css │ └── makedownpad.css └── templates ├── crud.html ├── crud_batch_upload.html ├── crud_create.html ├── crud_edit.html ├── crud_result.html ├── database_manager.html ├── help.html ├── homepage.html ├── sneac_spyder.html ├── upload.html ├── xian_edu_spyder.html ├── zhihu_activities.html └── zhihu_qas.html /.gitattributes: -------------------------------------------------------------------------------- 1 | *.js linguist-language=python 2 | *.css linguist-language=python 3 | *.html linguist-language=python -------------------------------------------------------------------------------- /.ipynb_checkpoints/测试-checkpoint.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 76, 6 | "metadata": {}, 7 | "outputs": [], 8 | "source": [ 9 | "import pymysql\n", 10 | "import pandas as pd\n", 11 | "import json\n", 12 | "import re" 13 | ] 14 | }, 15 | { 16 | "cell_type": "code", 17 | "execution_count": 77, 18 | "metadata": {}, 19 | "outputs": [], 20 | "source": [ 21 | "import requests\n", 22 | "import datetime\n", 23 | "from bs4 import BeautifulSoup" 24 | ] 25 | }, 26 | { 27 | "cell_type": "code", 28 | "execution_count": 78, 29 | "metadata": {}, 30 | "outputs": [], 31 | "source": [ 32 | "import os" 33 | ] 34 | }, 35 | { 36 | "cell_type": "code", 37 | "execution_count": 79, 38 | "metadata": {}, 39 | "outputs": [], 40 | "source": [ 41 | "import redis\n", 42 | "from xpinyin import Pinyin" 43 | ] 44 | }, 45 | { 46 | "cell_type": "code", 47 | "execution_count": 118, 48 | "metadata": {}, 49 | "outputs": [], 50 | "source": [ 51 | "con = pymysql.connect(\n", 52 | " host='192.168.10.113',\n", 53 | " user='jiashengjie',\n", 54 | " password='jiashengjie',\n", 55 | " database='gaokao')" 56 | ] 57 | }, 58 | { 59 | "cell_type": "code", 60 | "execution_count": 12, 61 | "metadata": {}, 62 | "outputs": [], 63 | "source": [] 64 | }, 65 | { 66 | "cell_type": "markdown", 67 | "metadata": {}, 68 | "source": [ 69 | "## 首页新闻" 70 | ] 71 | }, 72 | { 73 | "cell_type": "code", 74 | "execution_count": 28, 75 | "metadata": {}, 76 | "outputs": [], 77 | "source": [ 78 | "headers = {\n", 79 | " 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0',\n", 80 | " 'Accept-Language': 'zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2',\n", 81 | " 'Accept-Encoding': 'gzip, deflate',\n", 82 | "}" 83 | ] 84 | }, 85 | { 86 | "cell_type": "code", 87 | "execution_count": 35, 88 | "metadata": {}, 89 | "outputs": [], 90 | "source": [ 91 | "day_3_ago = str(datetime.date.today() -\n", 92 | " datetime.timedelta(days=3))" 93 | ] 94 | }, 95 | { 96 | "cell_type": "code", 97 | "execution_count": 36, 98 | "metadata": {}, 99 | "outputs": [], 100 | "source": [ 101 | "class Basic_Spyder():\n", 102 | "\n", 103 | " def start_scrap(self, part_url_dict, rule_func):\n", 104 | " result = {}\n", 105 | " for part_name, part_url in part_url_dict.items():\n", 106 | " res = requests.get(part_url, headers=headers)\n", 107 | " soup = BeautifulSoup(res.content, 'html.parser')\n", 108 | " item_lst = rule_func(soup)\n", 109 | " result[part_name] = item_lst\n", 110 | " \n", 111 | " # 剔除列表为空的子版块\n", 112 | " result = {key:value for key,value in result.items() if len(value)>1}\n", 113 | "\n", 114 | " return result" 115 | ] 116 | }, 117 | { 118 | "cell_type": "code", 119 | "execution_count": 39, 120 | "metadata": {}, 121 | "outputs": [], 122 | "source": [ 123 | "# 教育部\n", 124 | "gj_edu_url_dict = {'公告公示': 'http://www.moe.gov.cn/jyb_xxgk/s5743/s5972/',\n", 125 | " '最新文件': 'http://www.moe.gov.cn/was5/web/search?channelid=239993',\n", 126 | " '工作动态': 'http://www.moe.gov.cn/jyb_xwfb/gzdt_gzdt/'}" 127 | ] 128 | }, 129 | { 130 | "cell_type": "code", 131 | "execution_count": 72, 132 | "metadata": {}, 133 | "outputs": [], 134 | "source": [ 135 | "def gj_edu_rule(soup):\n", 136 | " item_lst = []\n", 137 | " base_url = 'http://www.moe.gov.cn/'\n", 138 | " gzdt_base_url = 'http://www.moe.gov.cn/jyb_xwfb/gzdt_gzdt/'\n", 139 | " part = soup.find('h2').get_text()\n", 140 | " if part == '重要文件':\n", 141 | " news_lst = soup.find_all('ul')[6].find_all('li')\n", 142 | " else:\n", 143 | " news_lst = soup.find('ul',id='list').find_all('li')\n", 144 | " \n", 145 | " for item in news_lst:\n", 146 | " item_dict = {}\n", 147 | " post_date = item.find('span').get_text()\n", 148 | " if post_date < day_3_ago:\n", 149 | " break\n", 150 | " title = item.find('a').get_text()\n", 151 | " if part == '重要文件':\n", 152 | " article_url = item.find('a')['href']\n", 153 | " elif part == '工作动态':\n", 154 | " article_url = base_url + item.find('a')['href'].split('./')[-1]\n", 155 | " else:\n", 156 | " article_url = base_url + item.find('a')['href'].split('../')[-1]\n", 157 | " item_dict['post_date'] = post_date\n", 158 | " item_dict['title'] = title\n", 159 | " item_dict['article_url'] = article_url\n", 160 | " item_lst.append(item_dict)\n", 161 | " return item_lst" 162 | ] 163 | }, 164 | { 165 | "cell_type": "code", 166 | "execution_count": 73, 167 | "metadata": {}, 168 | "outputs": [], 169 | "source": [ 170 | "basic_spyder = Basic_Spyder()" 171 | ] 172 | }, 173 | { 174 | "cell_type": "code", 175 | "execution_count": 74, 176 | "metadata": {}, 177 | "outputs": [], 178 | "source": [ 179 | "\n", 180 | "gj_edu_result = basic_spyder.start_scrap(gj_edu_url_dict, gj_edu_rule)" 181 | ] 182 | }, 183 | { 184 | "cell_type": "code", 185 | "execution_count": 75, 186 | "metadata": { 187 | "collapsed": true 188 | }, 189 | "outputs": [ 190 | { 191 | "data": { 192 | "text/plain": [ 193 | "{'公告公示': [{'post_date': '2020-08-28',\n", 194 | " 'title': '教育部办公厅关于做好2020年全国成人高校招生工作的通知',\n", 195 | " 'article_url': 'http://www.moe.gov.cn/srcsite/A15/moe_777/202008/t20200827_480730.html'},\n", 196 | " {'post_date': '2020-08-28',\n", 197 | " 'title': '教育部关于同意南昌职业大学变更举办者的批复',\n", 198 | " 'article_url': 'http://www.moe.gov.cn/srcsite/A03/s181/202008/t20200827_480681.html'},\n", 199 | " {'post_date': '2020-08-28',\n", 200 | " 'title': '教育部关于同意北京邮电大学世纪学院变更举办者之一和办学地址的批复',\n", 201 | " 'article_url': 'http://www.moe.gov.cn/srcsite/A03/s181/202008/t20200827_480708.html'},\n", 202 | " {'post_date': '2020-08-28',\n", 203 | " 'title': '教育部关于同意四川外国语大学重庆南方翻译学院变更举办者之一的批复',\n", 204 | " 'article_url': 'http://www.moe.gov.cn/srcsite/A03/s181/202008/t20200827_480696.html'},\n", 205 | " {'post_date': '2020-08-28',\n", 206 | " 'title': '教育部关于同意沈阳城市建设学院变更举办者的批复',\n", 207 | " 'article_url': 'http://www.moe.gov.cn/srcsite/A03/s181/202008/t20200827_480716.html'}],\n", 208 | " '工作动态': [{'post_date': '2020-08-28',\n", 209 | " 'title': '关于收看2020年“开学第一课”的提示',\n", 210 | " 'article_url': 'http://www.moe.gov.cn/s5987/202008/t20200828_481754.html'},\n", 211 | " {'post_date': '2020-08-28',\n", 212 | " 'title': '教育部、工业和信息化部联合启动现代产业学院建设工作',\n", 213 | " 'article_url': 'http://www.moe.gov.cn/s5987/202008/t20200828_481664.html'},\n", 214 | " {'post_date': '2020-08-27',\n", 215 | " 'title': '教育部江西省共建职业教育创新发展高地',\n", 216 | " 'article_url': 'http://www.moe.gov.cn/moe_1485/202008/t20200827_480464.html'},\n", 217 | " {'post_date': '2020-08-26',\n", 218 | " 'title': '教育部召开义务教育课程修订第二次全体会议 部署义务教育课程标准修订工作',\n", 219 | " 'article_url': 'http://www.moe.gov.cn/moe_1485/202008/t20200827_480433.html'},\n", 220 | " {'post_date': '2020-08-26',\n", 221 | " 'title': '深入贯彻习近平总书记重要指示精神 在营养改善计划实施中坚决制止餐饮浪费行为',\n", 222 | " 'article_url': 'http://www.moe.gov.cn/s5987/202008/t20200826_480324.html'},\n", 223 | " {'post_date': '2020-08-26',\n", 224 | " 'title': '教育部等六部门下发通知联合开展未成年人网络环境专项治理行动',\n", 225 | " 'article_url': 'http://www.moe.gov.cn/s5987/202008/t20200826_480307.html'},\n", 226 | " {'post_date': '2020-08-25',\n", 227 | " 'title': '教育部联合中国红十字会总会印发通知要求进一步加强和改进新时代学校红十字工作',\n", 228 | " 'article_url': 'http://www.moe.gov.cn/s5987/202008/t20200825_480156.html'},\n", 229 | " {'post_date': '2020-08-25',\n", 230 | " 'title': '陈宝生调研指导四川教育脱贫攻坚工作',\n", 231 | " 'article_url': 'http://www.moe.gov.cn/moe_1485/202008/t20200825_480142.html'},\n", 232 | " {'post_date': '2020-08-25',\n", 233 | " 'title': '教育部江西省共建国家职业教育创新发展高地',\n", 234 | " 'article_url': 'http://www.moe.gov.cn/s5987/202008/t20200825_479999.html'}]}" 235 | ] 236 | }, 237 | "execution_count": 75, 238 | "metadata": {}, 239 | "output_type": "execute_result" 240 | } 241 | ], 242 | "source": [ 243 | "gj_edu_result" 244 | ] 245 | } 246 | ], 247 | "metadata": { 248 | "kernelspec": { 249 | "display_name": "Python 3", 250 | "language": "python", 251 | "name": "python3" 252 | }, 253 | "language_info": { 254 | "codemirror_mode": { 255 | "name": "ipython", 256 | "version": 3 257 | }, 258 | "file_extension": ".py", 259 | "mimetype": "text/x-python", 260 | "name": "python", 261 | "nbconvert_exporter": "python", 262 | "pygments_lexer": "ipython3", 263 | "version": "3.6.8" 264 | }, 265 | "notify_time": "5", 266 | "toc": { 267 | "base_numbering": 1, 268 | "nav_menu": {}, 269 | "number_sections": true, 270 | "sideBar": true, 271 | "skip_h1_title": false, 272 | "title_cell": "Table of Contents", 273 | "title_sidebar": "Contents", 274 | "toc_cell": false, 275 | "toc_position": { 276 | "height": "calc(100% - 180px)", 277 | "left": "10px", 278 | "top": "150px", 279 | "width": "165px" 280 | }, 281 | "toc_section_display": true, 282 | "toc_window_display": true 283 | } 284 | }, 285 | "nbformat": 4, 286 | "nbformat_minor": 2 287 | } 288 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 数据微中台 2 | ## 1.项目概览 3 | 4 | ![wF712R.png](https://s1.ax1x.com/2020/09/04/wF712R.png) 5 | 6 | 本项目基于Python+Flask+MySQL+Redis搭建,丰富的注释&面向对象方法,可以让你快速上手&个性化拓展,适用于团队内部快速获取信息、分享数据、产出数据产品,无需编程技能,便可实现: 7 | 8 | - 首页集成行业新闻动态; 9 | 10 | - 数据库管理: 11 | - 单/多条件数据筛选、模糊筛选; 12 | - 数据排序、下载; 13 | - 修改、删除数据; 14 | - 批量上传,更新数据库; 15 | - 新建数据库。 16 | 17 | - 数据获取: 18 | - 相关部门公开信息爬虫; 19 | - 知乎用户动态/问题爬虫; 20 | 21 | - ~~拖拽式可视化套件(非开源)~~ 22 | 23 | - ~~数据产品(非开源)~~ 24 | 25 | 26 | 27 | 产品截图: 28 | 29 | ![wF7GKx.gif](https://s1.ax1x.com/2020/09/04/wF7GKx.gif) 30 | 31 | 32 | 33 | ## 2.文件组成 34 | 35 | 36 | 37 | ``` 38 | ├── app_run.py ------------------------# 项目主程序 39 | ├── config.py -------------------------# 配置文件 40 | ├── database.py -----------------------# 数据库操作函数 41 | ├── database_helper.py ----------------# 个性化数据库操作函数 42 | ├── edu_news.py -----------------------# 首页咨询爬虫 43 | ├── scrap_funcs.py --------------------# 知乎等爬虫函数 44 | ├── templates/ 45 | │ ├── xxx.html-----------------------# 各页面模板 46 | ├── static ----------------------------# css及js 47 | ├── docs ------------------------------# 中间数据json等 48 | ``` 49 | 50 | 51 | 52 | ## 3.快速启动 53 | 54 | 1. 配置并打开`redis-server` 55 | 56 | 2. 依次执行如下代码 57 | 58 | ``` 59 | git clone https://github.com/CapAllen/Mini_Data_Middle_Plateform 60 | pip install -r requirements.txt 61 | 62 | cd Mini_Data_Middle_Plateform 63 | # 打开config.py文件,配置相关参数 64 | python app_run.py 65 | ``` 66 | 67 | 3. 打开浏览器输入http://localhost:8080/ 68 | 69 | 70 | 71 | **ENJOY !** 72 | 73 | ![](https://gitee.com/capallen/files_blocked/raw/master/giphy.webp) 74 | 75 | 76 | 77 |  Creative Commons -------------------------------------------------------------------------------- /__pycache__/config.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/__pycache__/config.cpython-36.pyc -------------------------------------------------------------------------------- /__pycache__/config.cpython-36.pyc~dev: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/__pycache__/config.cpython-36.pyc~dev -------------------------------------------------------------------------------- /__pycache__/config.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/__pycache__/config.cpython-37.pyc -------------------------------------------------------------------------------- /__pycache__/database.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/__pycache__/database.cpython-36.pyc -------------------------------------------------------------------------------- /__pycache__/database.cpython-36.pyc~dev: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/__pycache__/database.cpython-36.pyc~dev -------------------------------------------------------------------------------- /__pycache__/database.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/__pycache__/database.cpython-37.pyc -------------------------------------------------------------------------------- /__pycache__/database_helper.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/__pycache__/database_helper.cpython-36.pyc -------------------------------------------------------------------------------- /__pycache__/scrap_funcs.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/__pycache__/scrap_funcs.cpython-36.pyc -------------------------------------------------------------------------------- /app_run.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | import os 3 | import copy 4 | import zipfile 5 | from database import * 6 | from scrap_funcs import * 7 | from flask import Flask, request, render_template, jsonify, json, redirect, url_for 8 | from flask import send_file, send_from_directory, make_response 9 | from werkzeug import secure_filename 10 | app = Flask(__name__) 11 | 12 | 13 | def zip_dir(dirname, zipfilename): 14 | filelist = [] 15 | if os.path.isfile(dirname): 16 | filelist.append(dirname) 17 | else : 18 | for root, dirs, files in os.walk(dirname): 19 | for name in files: 20 | filelist.append(os.path.join(root, name)) 21 | zf = zipfile.ZipFile(zipfilename, "w", zipfile.zlib.DEFLATED) 22 | for tar in filelist: 23 | arcname = tar[len(dirname):] 24 | #print arcname 25 | zf.write(tar,arcname) 26 | zf.close() 27 | 28 | @app.route('/') 29 | def homepage(): 30 | 31 | # 读取新闻 32 | with open('docs/official_news.json', encoding='utf-8') as f: 33 | official_news = json.load(f) 34 | 35 | # 读取门户新闻 36 | with open('docs/menhu_news.json', encoding='utf-8') as f: 37 | menhu_news = json.load(f) 38 | 39 | return render_template('homepage.html', 40 | official_news=official_news, 41 | menhu_news=menhu_news) 42 | 43 | 44 | @app.route('/database_manager') 45 | def go_database_manager(): 46 | 47 | # connect mysql 48 | con = pymysql.connect( 49 | host=config.HOST, 50 | user=config.USER, 51 | password=config.PW, 52 | database=config.DB) 53 | 54 | tables = pd.read_sql('show tables', con=con)['Tables_in_gaokao'] 55 | 56 | con.close() 57 | return render_template( 58 | 'database_manager.html', 59 | tables=tables, 60 | database_info=database_info, 61 | 62 | ) 63 | 64 | 65 | @app.route('/crud') 66 | def go_crud(): 67 | if request.method == 'GET': 68 | table_name = request.args.get('db_name', '') 69 | table_name_ch = database_info[table_name]['in_chinese'] 70 | cc_lst = list(database_info[table_name]['c_c_dict'].items())[1:] 71 | return render_template('crud.html', 72 | table_name=table_name, 73 | table_name_ch=table_name_ch, 74 | cc_lst=cc_lst) 75 | 76 | 77 | @app.route('/crud_result', methods=['GET', 'POST']) 78 | def go_crud_result(): 79 | if request.method == 'POST': 80 | print(request.form) 81 | table_name = request.form['db_name'] 82 | table_name_ch = database_info[table_name]['in_chinese'] 83 | cc_lst = list(database_info[table_name]['c_c_dict'].items())[1:] 84 | 85 | result_data = query_data(request.form) 86 | 87 | # 保存最近一次的筛选信息 88 | imut_str = str(request.form) 89 | r.set('recent_query', str(dict(eval(imut_str[imut_str.index('('):])))) 90 | 91 | print(result_data.shape) 92 | print(result_data.columns) 93 | c_c_dict = database_info[table_name]['c_c_dict'] 94 | c_c_dict_render = c_c_dict 95 | 96 | 97 | if 'yxdm' in result_data.columns: 98 | c_c_dict_with_common = copy.deepcopy(c_c_dict) 99 | c_c_dict_with_common.update(database_info['gdyxjbxx__1']['c_c_dict']) 100 | c_c_dict_render = c_c_dict_with_common 101 | 102 | return render_template('crud_result.html', 103 | table_name=table_name, 104 | table_name_ch=table_name_ch, 105 | cc_lst=cc_lst, 106 | c_c_dict=c_c_dict_render, 107 | result_data=result_data) 108 | # , 109 | # database_info=database_info) 110 | 111 | 112 | @app.route('/crud_edit', methods=['GET', 'POST']) 113 | @app.route('/crud_delete', methods=['GET', 'POST']) 114 | def go_crud_edit(): 115 | if request.method == 'POST': 116 | 117 | # 读取最近一次的筛选信息 118 | recent_query = eval(r.get('recent_query')) 119 | 120 | table_name = recent_query['db_name'] 121 | table_name_ch = database_info[table_name]['in_chinese'] 122 | cc_lst = list(database_info[table_name]['c_c_dict'].items())[1:] 123 | 124 | edit_dict = request.form 125 | print(edit_dict) 126 | # 检查是否有选中项(删除项) 127 | imut_str = str(edit_dict) 128 | imut_tuple = eval(imut_str[imut_str.index('('):]) 129 | delete_ids = [x[1] for x in imut_tuple if x[0] == 'select'] 130 | 131 | # 依据edit_dict进行mysql操作 132 | edit_data(table_name, edit_dict, delete_ids) 133 | 134 | # 按最近一次的筛选条件返回操作后的数据 135 | result_data = query_data(recent_query) 136 | 137 | c_c_dict = database_info[table_name]['c_c_dict'] 138 | c_c_dict_render = c_c_dict 139 | 140 | 141 | if 'yxdm' in result_data.columns: 142 | c_c_dict_with_common = copy.deepcopy(c_c_dict) 143 | c_c_dict_with_common.update(database_info['gdyxjbxx__1']['c_c_dict']) 144 | c_c_dict_render = c_c_dict_with_common 145 | 146 | return render_template('crud_edit.html', 147 | table_name=table_name, 148 | table_name_ch=table_name_ch, 149 | cc_lst=cc_lst, 150 | c_c_dict=c_c_dict_render, 151 | database_info=database_info, 152 | result_data=result_data 153 | ) 154 | 155 | 156 | @app.route("/direct_download", methods=['GET', 'POST']) 157 | def direct_download_file(): 158 | result_data = query_data(request.form) 159 | 160 | filename = 'queried_data.xlsx' 161 | response = make_response(send_from_directory( 162 | './docs/', filename, as_attachment=True)) 163 | response.headers["Content-Disposition"] = "attachment; filename={}".format( 164 | filename.encode().decode('latin-1')) 165 | return response 166 | 167 | 168 | @app.route("/download/", methods=['GET', 'POST']) 169 | def download_file(filename): 170 | 171 | if filename == 'xian_edu_tzgg.zip': 172 | zip_dir('./docs/xian_edu','./docs/xian_edu_tzgg.zip') 173 | elif filename == 'zhihu_user.zip': 174 | zip_dir('./docs/zhihu','./docs/zhihu_user.zip') 175 | elif filename == 'sneac.zip': 176 | zip_dir('./docs/sneac_edu','./docs/sneac.zip') 177 | else: 178 | pass 179 | 180 | response = make_response(send_from_directory( 181 | './docs/', filename, as_attachment=True)) 182 | response.headers["Content-Disposition"] = "attachment; filename={}".format( 183 | filename.encode().decode('latin-1')) 184 | return response 185 | 186 | 187 | @app.route("/upload") 188 | def go_upload(): 189 | return render_template('upload.html') 190 | 191 | 192 | @app.route('/crud_batch_upload', methods=['GET', 'POST']) 193 | def go_crud_batch_upload(): 194 | 195 | # 读取最近一次的筛选信息 196 | recent_query = eval(r.get('recent_query')) 197 | 198 | table_name = recent_query['db_name'] 199 | table_name_cn = database_info[table_name]['in_chinese'] 200 | columns_lst_cn = ','.join(list(database_info[table_name]['c_c_dict'].values())[1:]) 201 | 202 | return render_template( 203 | 'crud_batch_upload.html', 204 | table_name=table_name, 205 | table_name_cn=table_name_cn, 206 | columns_lst_cn=columns_lst_cn 207 | 208 | ) 209 | 210 | 211 | @app.route("/crud_create", methods=['POST']) 212 | def go_crud_create(): 213 | 214 | # connect mysql 215 | con = pymysql.connect( 216 | host=config.HOST, 217 | user=config.USER, 218 | password=config.PW, 219 | database=config.DB) 220 | 221 | upload_file = request.files.get('upload_file') 222 | filename = 'upload_file' + '.' + \ 223 | upload_file.filename.split('.')[-1] # 获取文件名 224 | filelocation = os.path.join('docs/', filename) 225 | upload_file.save(filelocation) # 保存文件 226 | 227 | edit_dict = request.form 228 | 229 | if edit_dict.get('tag'): 230 | # 批量添加 231 | batch_upload_data(edit_dict) 232 | else: 233 | # 新建数据库 234 | create_data(edit_dict) 235 | 236 | tables = pd.read_sql('show tables', con=con)['Tables_in_gaokao'] 237 | con.close() 238 | 239 | return render_template( 240 | 'crud_create.html', 241 | tables=tables, 242 | database_info=database_info) 243 | 244 | 245 | @app.route('/xian_edu_spyder') 246 | def go_xian_edu_spyder(): 247 | 248 | return render_template( 249 | 'xian_edu_spyder.html', 250 | 251 | ) 252 | 253 | @app.route('/sneac_spyder') 254 | def go_sneac_spyder(): 255 | 256 | return render_template( 257 | 'sneac_spyder.html', 258 | 259 | ) 260 | 261 | @app.route('/zhihu_activities') 262 | def go_zhihu_activities(): 263 | 264 | return render_template( 265 | 'zhihu_activities.html', 266 | 267 | ) 268 | 269 | @app.route('/zhihu_qas') 270 | def go_zhihu_qas(): 271 | 272 | return render_template( 273 | 'zhihu_qas.html', 274 | 275 | ) 276 | 277 | @app.route('/help', methods=['GET', 'POST']) 278 | def go_help(): 279 | 280 | return render_template( 281 | 'help.html', 282 | 283 | ) 284 | 285 | per_data = {} 286 | 287 | @app.route('/progress_data/') 288 | def progress_data(uuid): 289 | 290 | split_lst = uuid.split('&') 291 | # 检查标志位 292 | 293 | if split_lst[-1] == 'xian_edu': 294 | uuid,start_date,end_date = split_lst[:-1] 295 | print(start_date,end_date) 296 | scraper = xian_edu_scraper(start_date,end_date) 297 | elif split_lst[-1] == 'zhihu_activities': 298 | uuid,user_name = split_lst[:-1] 299 | user_homepage = f'https://www.zhihu.com/people/{user_name}' 300 | user_info_data = get_user_details(user_homepage) 301 | start_url = user_info_data.loc[0,'start_url'] 302 | scraper = scrap_user_activities(start_url) 303 | elif split_lst[-1] == 'zhihu_qas': 304 | uuid,question_id = split_lst[:-1] 305 | question_url = f'https://www.zhihu.com/question/{question_id}' 306 | scraper = get_question_answers(question_url) 307 | elif split_lst[-1] == 'sneac': 308 | uuid,start_date,end_date,tpe = split_lst[:-1] 309 | scraper = sneac_spyder(start_date,end_date,tpe) 310 | else: 311 | pass 312 | for total,done in scraper: 313 | num_progress = round(int(done) * 100 / int(total), 2) 314 | print(num_progress) 315 | per_data[uuid] = num_progress 316 | print('xxxxxxxxxxxxxxxxxxxxxx') 317 | return jsonify({'res': num_progress}) 318 | 319 | 320 | @app.route('/show_progress/') 321 | def show_progress(uuid): 322 | print(per_data) 323 | return jsonify({'res': per_data[uuid]}) 324 | 325 | if __name__ == '__main__': 326 | app.run(host='127.0.0.1', port=8080, debug=True) 327 | -------------------------------------------------------------------------------- /config.py: -------------------------------------------------------------------------------- 1 | # Mysql数据库配置 2 | HOST = '192.168.10.113' 3 | USER = 'jiashengjie' 4 | PW = 'jiashengjie' 5 | DB = 'gaokao' 6 | 7 | # Redis数据库配置 8 | REDIS_HOST = 'localhost' 9 | REDIS_PORT = 6379 10 | REDIS_PW = '' 11 | 12 | # 新闻相关配置 13 | keep_days = 3 # 保留最近3天的新闻 14 | 15 | # 百度aip图片识别token,用于识别验证码 16 | baidu_aip_token = '24.37bcd1ba32fac96816b58611b386ec85.2592000.1601192213.282335-15840866' 17 | -------------------------------------------------------------------------------- /database_helper.py: -------------------------------------------------------------------------------- 1 | # 本脚本包含函数是对database.py中的个性化拓展 2 | # 主要针对个性化要求较强的数据库 3 | 4 | def unstack_20192020_nmntdfsx(result): 5 | ''' 6 | 对『2019-2020年模拟投档分数线』数据库的横向展开函数 7 | ''' 8 | result_test = result.set_index(['院校代码', '院校名称','批次','科类','年份','模拟次数']) 9 | result_test = result_test.unstack().unstack().unstack() 10 | 11 | level,code = list(zip(result_test.columns.levels,result_test.columns.codes))[-1] 12 | 13 | new_cols = [] 14 | for levels,codes in list(zip(result_test.columns.levels,result_test.columns.codes))[::-1]: 15 | level_cols = [] 16 | for code in codes: 17 | level_cols.append(levels[code]) 18 | if new_cols: 19 | new_cols = [str(new)+str(level) for new,level in zip(new_cols,level_cols)] 20 | else: 21 | new_cols = level_cols 22 | 23 | result_test.columns = new_cols 24 | result_test = result_test[sorted(new_cols)].fillna('-1').reset_index() 25 | result_test['院校代码'] = result_test['院校代码'].astype(str).str.zfill(4) 26 | 27 | return result_test -------------------------------------------------------------------------------- /docs/database_info.json: -------------------------------------------------------------------------------- 1 | { 2 | "gdyxjbxx__1": { 3 | "in_chinese": "高等院校基本信息", 4 | "desc": "包括院校代码、院校名称、省份、城市、主管单位及院校层级", 5 | "c_c_dict": { 6 | "id": "id", 7 | "yxdm": "院校代码", 8 | "yxmc": "院校名称", 9 | "sf": "省份", 10 | "cs": "城市", 11 | "zgdw": "主管单位", 12 | "211_gcgx": "211工程高校", 13 | "985_gcgx": "985工程高校", 14 | "A_yldxjsgxl": "一流大学建设高校A类", 15 | "B_yldxjsgxl": "一流大学建设高校B类", 16 | "ylxkjsgx": "一流学科建设高校" 17 | }, 18 | "dtype_dict": { 19 | "id": "int", 20 | "yxdm": "str", 21 | "yxmc": "str", 22 | "sf": "str", 23 | "cs": "str", 24 | "zgdw": "str", 25 | "211_gcgx": "str", 26 | "985_gcgx": "str", 27 | "A_yldxjsgxl": "str", 28 | "B_yldxjsgxl": "str", 29 | "ylxkjsgx": "str" 30 | } 31 | }, 32 | "2020_gxzsjh": { 33 | "in_chinese": "2020高校招生计划", 34 | "desc": "包含院校代码、院校名称、批次、专业批次等信息", 35 | "c_c_dict": { 36 | "id": "id", 37 | "yxdm": "院校代码", 38 | "yxmc": "院校名称", 39 | "pc": "批次", 40 | "zypc": "专业批次", 41 | "jhlbmc": "计划类别名称", 42 | "kl": "科类", 43 | "zydh": "专业代号", 44 | "zymc": "专业名称", 45 | "zybz": "专业备注", 46 | "zsjhs": "招生计划数", 47 | "bhzy": "包含专业", 48 | "1_zybz": "专业备注1", 49 | "2_zybz": "专业备注2", 50 | "3_zybz": "专业备注3", 51 | "4_zybz": "专业备注4", 52 | "5_zybz": "专业备注5", 53 | "6_zybz": "专业备注6", 54 | "7_zybznnxz": "专业备注7(男女限制)", 55 | "8_zybzzh": "专业备注8(指挥)", 56 | "bxdd": "办学地点", 57 | "wyyz": "外语语种", 58 | "wyyzbz": "外语语种备注", 59 | "xz": "学制", 60 | "sfbz": "收费标准", 61 | "sfbz__1": "收费备注", 62 | "sfks": "是否口试", 63 | "zszydm": "招生专业代码", 64 | "qgyxdm": "全国院校代码" 65 | }, 66 | "dtype_dict": { 67 | "id": "int", 68 | "yxdm": "str", 69 | "yxmc": "str", 70 | "pc": "str", 71 | "zypc": "str", 72 | "jhlbmc": "str", 73 | "kl": "str", 74 | "zydh": "str", 75 | "zymc": "str", 76 | "zybz": "str", 77 | "zsjhs": "int", 78 | "bhzy": "str", 79 | "1_zybz": "str", 80 | "2_zybz": "str", 81 | "3_zybz": "str", 82 | "4_zybz": "str", 83 | "5_zybz": "str", 84 | "6_zybz": "str", 85 | "7_zybznnxz": "str", 86 | "8_zybzzh": "str", 87 | "bxdd": "str", 88 | "wyyz": "str", 89 | "wyyzbz": "str", 90 | "xz": "str", 91 | "sfbz": "int", 92 | "sfbz__1": "str", 93 | "sfks": "str", 94 | "zszydm": "str", 95 | "qgyxdm": "int" 96 | } 97 | }, 98 | "szbmntdfsx": { 99 | "in_chinese": "省招办模拟投档分数线", 100 | "desc": "包括2015-2019年省招办模拟投档数据", 101 | "c_c_dict": { 102 | "id": "id", 103 | "yxdm": "院校代码", 104 | "yxmc": "院校名称", 105 | "kl": "科类", 106 | "pc": "批次", 107 | "zyapbf": "专业安排办法", 108 | "nf": "年份", 109 | "jhs": "计划数", 110 | "tdrs": "投档人数", 111 | "zdf": "最低分", 112 | "zdwc": "最低位次" 113 | 114 | }, 115 | "dtype_dict": { 116 | "id": "int", 117 | "yxdm": "str", 118 | "yxmc": "str", 119 | "kl": "str", 120 | "pc": "str", 121 | "zyapbf": "str", 122 | "jhs": "int", 123 | "tdrs": "int", 124 | "zdf": "int", 125 | "zdwc": "int", 126 | "nf": "int" 127 | } 128 | }, 129 | "sxfzylqfsx": { 130 | "in_chinese": "陕西分专业录取分数线", 131 | "desc": "包括2015-2019年在陕招生高校分专业录取分数线", 132 | "c_c_dict": { 133 | "id": "id", 134 | "yxdm": "院校代码", 135 | "yxmc": "院校名称", 136 | "pc": "批次", 137 | "kl": "科类", 138 | "zy": "专业", 139 | "zydl": "专业大类", 140 | "zyfjxx": "专业附加信息", 141 | "nf": "年份", 142 | "jhs": "计划数", 143 | "lqs": "录取数", 144 | "pjf": "平均分", 145 | "zgf": "最高分", 146 | "zdf": "最低分", 147 | "zdwc": "最低位次", 148 | "zdfc": "最低分差" 149 | }, 150 | "dtype_dict": { 151 | "id": "int", 152 | "yxdm": "str", 153 | "yxmc": "str", 154 | "zy": "str", 155 | "zydl": "str", 156 | "zyfjxx": "str", 157 | "pjf": "int", 158 | "nf": "int", 159 | "lqs": "int", 160 | "pc": "str", 161 | "zdwc": "str", 162 | "zdf": "int", 163 | "zdfc": "int", 164 | "zgf": "int", 165 | "kl": "str", 166 | "jhs": "int" 167 | } 168 | } 169 | } -------------------------------------------------------------------------------- /docs/menhu_news.json: -------------------------------------------------------------------------------- 1 | {"华商报教育": {"homepage": "http://edu.hsw.cn/", "favicon": "http://static.hsw.cn/b/assets/i/favicon.png", "result": {"今日推荐": [{"post_date": "2020-08-24", "title": "“没有围墙的大学”不应仅仅是个概念", "article_url": "http://edu.hsw.cn/system/2020/0824/134495.shtml"}, {"post_date": "2020-08-24", "title": "教育的力量在于点亮人生", "article_url": "http://edu.hsw.cn/system/2020/0824/134499.shtml"}, {"post_date": "2020-08-24", "title": "步步领先变为步步入坑?早教英语“抢跑”背后乱象多", "article_url": "http://edu.hsw.cn/system/2020/0824/134500.shtml"}]}}, "新浪教育": {"homepage": "http://edu.sina.com.cn/", "favicon": "http://edu.sina.com.cn/favicon.ico", "result": {"新闻排行": [{"post_date": "2020-08-28", "title": "“虎妈”丈夫因性骚扰学生被停职 复职后工作将受限制", "article_url": "https://edu.sina.com.cn/ischool/2020-08-28/doc-iivhuipp1114685.shtml"}, {"post_date": "2020-08-28", "title": "上热搜!哈佛博士后任职街道办?当地回应", "article_url": "https://edu.sina.com.cn/a/2020-08-28/doc-iivhvpwy3490354.shtml"}, {"post_date": "2020-08-28", "title": "“一年级”新生请注意 资深教师“拍了拍”你", "article_url": "https://edu.sina.com.cn/zxx/2020-08-28/doc-iivhuipp1018696.shtml"}, {"post_date": "2020-08-28", "title": "毕业季未现租房高峰 一线住宅租赁有点儿“凉”", "article_url": "https://edu.sina.com.cn/l/2020-08-28/doc-iivhvpwy3498433.shtml"}, {"post_date": "2020-08-28", "title": "加拿大顶住疫情疑虑重新开学 学生们安全吗?", "article_url": "https://edu.sina.com.cn/a/2020-08-28/doc-iivhuipp1113645.shtml"}, {"post_date": "2020-08-28", "title": "浙大回应“教授被指性骚扰女博士致其轻生”:调查难点在证据", "article_url": "https://edu.sina.com.cn/kaoyan/2020-08-28/doc-iivhuipp1112487.shtml"}, {"post_date": "2020-08-28", "title": "女孩693分考上北大 老师:她是个“问题”学生", "article_url": "https://edu.sina.com.cn/gaokao/2020-08-28/doc-iivhuipp1150390.shtml"}, {"post_date": "2020-08-28", "title": "教育部正式回应“十一”大学生能否离校", "article_url": "https://edu.sina.com.cn/l/2020-08-28/doc-iivhvpwy3494249.shtml"}, {"post_date": "2020-08-27", "title": "一字马女孩考上中国美院 教练:一切不是偶然", "article_url": "https://edu.sina.com.cn/gaokao/2020-08-27/doc-iivhuipp1017854.shtml"}, {"post_date": "2020-08-27", "title": "新疆2020普通高校内学招生投档情况(本科一批次)", "article_url": "https://edu.sina.com.cn/gaokao/2020-08-27/doc-iivhuipp1002483.shtml"}], "评论排行": [{"post_date": "2020-08-27", "title": "教育部:小学起始年级要严格按照 “零起点”教学", "article_url": "https://edu.sina.com.cn/zxx/2020-08-27/doc-iivhvpwy3334299.shtml"}, {"post_date": "2020-08-27", "title": "中小学学生近视率半年增加11.7% 小学生近视率增加最快", "article_url": "https://edu.sina.com.cn/zxx/2020-08-27/doc-iivhvpwy3334731.shtml"}, {"post_date": "2020-08-27", "title": "\"虎爸\"回应\"不玩两小时不准做作业\":陪伴孩子最重要", "article_url": "https://edu.sina.com.cn/zxx/2020-08-27/doc-iivhuipp0903847.shtml"}, {"post_date": "2020-08-28", "title": "上热搜!哈佛博士后任职街道办?当地回应", "article_url": "https://edu.sina.com.cn/a/2020-08-28/doc-iivhvpwy3490354.shtml"}, {"post_date": "2020-08-27", "title": "一字马女孩考上中国美院 教练:一切不是偶然", "article_url": "https://edu.sina.com.cn/gaokao/2020-08-27/doc-iivhuipp1017854.shtml"}, {"post_date": "2020-08-28", "title": "“虎妈”丈夫因性骚扰学生被停职 复职后工作将受限制", "article_url": "https://edu.sina.com.cn/ischool/2020-08-28/doc-iivhuipp1114685.shtml"}, {"post_date": "2020-08-26", "title": "民办高中降102分“拦截”考生 家长质疑违规降分", "article_url": "https://edu.sina.com.cn/ischool/2020-08-26/doc-iivhvpwy3121207.shtml"}, {"post_date": "2020-08-27", "title": "高一学生获信息学奥赛金牌保送北大 小学自制游戏", "article_url": "https://edu.sina.com.cn/gaokao/2020-08-27/doc-iivhuipp0930515.shtml"}, {"post_date": "2020-08-28", "title": "明天起北京中小学分批错峰开学 明年1月30日放寒假", "article_url": "https://edu.sina.com.cn/zxx/2020-08-28/doc-iivhvpwy3493548.shtml"}, {"post_date": "2020-08-28", "title": "“一年级”新生请注意 资深教师“拍了拍”你", "article_url": "https://edu.sina.com.cn/zxx/2020-08-28/doc-iivhuipp1018696.shtml"}]}}} -------------------------------------------------------------------------------- /docs/official_news.json: -------------------------------------------------------------------------------- 1 | {"西安市教育局": {"homepage": "http://edu.xa.gov.cn/", "favicon": "http://edu.xa.gov.cn/images/favicon.ico", "result": {"教育要闻": [{"post_date": "2020-08-28", "title": "西安市教育局关于2020年城六区省级标准化高中、普通高中第二次补录征集志愿的通知", "article_url": "http://edu.xa.gov.cn/xwzx/jyyw/5f4877f4fd850845e6e7a71b.html"}, {"post_date": "2020-08-28", "title": "西安市2020年城六区省级标准化高中、普通高中第一次补录征集志愿录取工作情况通报", "article_url": "http://edu.xa.gov.cn/xwzx/jyyw/5f487730fd850845e6e7a5c7.html"}, {"post_date": "2020-08-25", "title": "西安市教育局关于2020年城六区省级标准化高中、普通高中第一次补录征集志愿的通知", "article_url": "http://edu.xa.gov.cn/xwzx/jyyw/5f448ac2fd850845e6e27ebd.html"}, {"post_date": "2020-08-25", "title": "西安市2020年城六区省级标准化高中、普通高中录取工作情况通报", "article_url": "http://edu.xa.gov.cn/xwzx/jyyw/5f448133fd850845e6e26567.html"}], "通知公告": [{"post_date": "2020-08-28", "title": "西安市教育局关于2020年城六区省级标准化高中、普通高中第二次补录征集志愿的通知", "article_url": "http://edu.xa.gov.cn/xwzx/tzgg/5f4877f4fd850845e6e7a71b.html"}, {"post_date": "2020-08-28", "title": "西安市2020年城六区省级标准化高中、普通高中第一次补录征集志愿录取工作情况通报", "article_url": "http://edu.xa.gov.cn/xwzx/tzgg/5f487730fd850845e6e7a5c7.html"}, {"post_date": "2020-08-27", "title": "关于2020年西安市教书育人楷模、西安最美教师、西安市基础教育突出贡献校长人选的公示", "article_url": "http://edu.xa.gov.cn/xwzx/tzgg/5f478ed1f99d6503000d05cf.html"}, {"post_date": "2020-08-27", "title": "西安市教育局关于2020西安市优秀班主任、西安市优秀乡村教师、西安市师德标兵、西安市师德建设示范团队名单的公示", "article_url": "http://edu.xa.gov.cn/xwzx/tzgg/5f478e6465cbd82d5b6c7bed.html"}, {"post_date": "2020-08-25", "title": "西安市教育局关于2020年城六区省级标准化高中、普通高中第一次补录征集志愿的通知", "article_url": "http://edu.xa.gov.cn/xwzx/tzgg/5f4482d5f99d65030008bf3b.html"}, {"post_date": "2020-08-25", "title": "西安市2020年城六区省级标准化高中、普通高中录取工作情况通报", "article_url": "http://edu.xa.gov.cn/xwzx/tzgg/5f448133fd850845e6e26567.html"}], "区域动态": [{"post_date": "2020-08-27", "title": "质量与速度并重,长安区第四初中1号教学楼主体结构顺利封顶", "article_url": "http://edu.xa.gov.cn/xwzx/qydt/5f4708a2f99d6503000c0d05.html"}, {"post_date": "2020-08-27", "title": "长安区召开2020年国家义务教育质量监测动员暨培训会", "article_url": "http://edu.xa.gov.cn/xwzx/qydt/5f47082dfd850845e6e5b7bd.html"}, {"post_date": "2020-08-25", "title": "临潼区2020年校园足球教练员培训班圆满结束", "article_url": "http://edu.xa.gov.cn/xwzx/qydt/5f44bffb65cbd82d5b689448.html"}]}}, "陕西省教育厅": {"homepage": "http://jyt.shaanxi.gov.cn/", "favicon": "http://jyt.shaanxi.gov.cn/favicon.ico", "result": {"公示公告": [{"post_date": "2020-08-26", "title": "关于对陕西省2020年师德标兵和师德建设示范团队遴选结果进行公示的公告", "article_url": "http://jyt.shaanxi.gov.cn/news/gsgg/202008/26/17458.html"}, {"post_date": "2020-08-26", "title": "关于对全国文明校园有关事项进行公示的公告", "article_url": "http://jyt.shaanxi.gov.cn/news/gsgg/202008/26/17456.html"}, {"post_date": "2020-08-26", "title": "2020年陕西省普通高校招生本科二批填报志愿公告", "article_url": "http://jyt.shaanxi.gov.cn/news/gsgg/202008/26/17454.html"}, {"post_date": "2020-08-25", "title": "2020年9月陕西省全国计算机等级考试报名公告", "article_url": "http://jyt.shaanxi.gov.cn/news/gsgg/202008/25/17453.html"}], "教育厅文件": [{"post_date": "2020-08-26", "title": "陕西省教育厅办公室关于评选2018─2020年度陕西教育系统审计工作先进集体、先进个人 及优秀审计项目的通知", "article_url": "http://jyt.shaanxi.gov.cn/news/jiaoyutingwenjian/202008/26/17457.html"}, {"post_date": "2020-08-25", "title": "陕西省教育厅办公室转发教育部办公厅工业和信息化部办公厅关于印发《现代产业学院建设指南(试行)》的通知", "article_url": "http://jyt.shaanxi.gov.cn/news/jiaoyutingwenjian/202008/25/17450.html"}]}}, "陕西招生考试信息网": {"homepage": "https://www.sneac.com/", "favicon": "https://www.sneac.com/images/bitbug_favicon.ico", "result": {"新闻公告": [{"post_date": "2020-08-28", "title": "2020年陕西省普通高校招生提前批次艺术类专科B段录取征集志愿", "article_url": "http://www.sneac.com/info/1024/6916.htm"}, {"post_date": "2020-08-28", "title": "2020年陕西省普通高校招生本科二批录取模拟投档信息将陆续公布", "article_url": "http://www.sneac.com/info/1024/6915.htm"}, {"post_date": "2020-08-26", "title": "2020年陕西省普通高等学校招生本科一批征集正式投档情况统计表", "article_url": "http://www.sneac.com/info/1024/6914.htm"}, {"post_date": "2020-08-26", "title": "2020年陕西省普通高校招生一本定向生、少数民族预科班、预科班录取情况", "article_url": "http://www.sneac.com/info/1024/6913.htm"}, {"post_date": "2020-08-25", "title": "2020年陕西省普通高校招生本科二批填报志愿公告", "article_url": "http://www.sneac.com/info/1024/6911.htm"}, {"post_date": "2020-08-25", "title": "咸阳师范学院关于本校2020年日语专业招生计划的说明", "article_url": "http://www.sneac.com/info/1024/6912.htm"}]}}, "国家教育部": {"homepage": "http://www.moe.gov.cn/", "favicon": "http://www.moe.gov.cn/favorite.ico", "result": {"公告公示": [{"post_date": "2020-08-28", "title": "教育部办公厅关于做好2020年全国成人高校招生工作的通知", "article_url": "http://www.moe.gov.cn/srcsite/A15/moe_777/202008/t20200827_480730.html"}, {"post_date": "2020-08-28", "title": "教育部关于同意南昌职业大学变更举办者的批复", "article_url": "http://www.moe.gov.cn/srcsite/A03/s181/202008/t20200827_480681.html"}, {"post_date": "2020-08-28", "title": "教育部关于同意北京邮电大学世纪学院变更举办者之一和办学地址的批复", "article_url": "http://www.moe.gov.cn/srcsite/A03/s181/202008/t20200827_480708.html"}, {"post_date": "2020-08-28", "title": "教育部关于同意四川外国语大学重庆南方翻译学院变更举办者之一的批复", "article_url": "http://www.moe.gov.cn/srcsite/A03/s181/202008/t20200827_480696.html"}, {"post_date": "2020-08-28", "title": "教育部关于同意沈阳城市建设学院变更举办者的批复", "article_url": "http://www.moe.gov.cn/srcsite/A03/s181/202008/t20200827_480716.html"}], "工作动态": [{"post_date": "2020-08-28", "title": "关于收看2020年“开学第一课”的提示", "article_url": "http://www.moe.gov.cn/s5987/202008/t20200828_481754.html"}, {"post_date": "2020-08-28", "title": "教育部、工业和信息化部联合启动现代产业学院建设工作", "article_url": "http://www.moe.gov.cn/s5987/202008/t20200828_481664.html"}, {"post_date": "2020-08-27", "title": "教育部江西省共建职业教育创新发展高地", "article_url": "http://www.moe.gov.cn/moe_1485/202008/t20200827_480464.html"}, {"post_date": "2020-08-26", "title": "教育部召开义务教育课程修订第二次全体会议 部署义务教育课程标准修订工作", "article_url": "http://www.moe.gov.cn/moe_1485/202008/t20200827_480433.html"}, {"post_date": "2020-08-26", "title": "深入贯彻习近平总书记重要指示精神 在营养改善计划实施中坚决制止餐饮浪费行为", "article_url": "http://www.moe.gov.cn/s5987/202008/t20200826_480324.html"}, {"post_date": "2020-08-26", "title": "教育部等六部门下发通知联合开展未成年人网络环境专项治理行动", "article_url": "http://www.moe.gov.cn/s5987/202008/t20200826_480307.html"}, {"post_date": "2020-08-25", "title": "教育部联合中国红十字会总会印发通知要求进一步加强和改进新时代学校红十字工作", "article_url": "http://www.moe.gov.cn/s5987/202008/t20200825_480156.html"}, {"post_date": "2020-08-25", "title": "陈宝生调研指导四川教育脱贫攻坚工作", "article_url": "http://www.moe.gov.cn/moe_1485/202008/t20200825_480142.html"}, {"post_date": "2020-08-25", "title": "教育部江西省共建国家职业教育创新发展高地", "article_url": "http://www.moe.gov.cn/s5987/202008/t20200825_479999.html"}]}}} -------------------------------------------------------------------------------- /edu_news.py: -------------------------------------------------------------------------------- 1 | import re 2 | import os 3 | import json 4 | import datetime 5 | import requests 6 | from retrying import retry 7 | from bs4 import BeautifulSoup 8 | 9 | import config 10 | 11 | 12 | day_3_ago = str(datetime.date.today() - 13 | datetime.timedelta(days=config.keep_days)) 14 | 15 | headers = { 16 | 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0', 17 | 'Accept-Language': 'zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2', 18 | 'Accept-Encoding': 'gzip, deflate', 19 | } 20 | 21 | 22 | class Basic_Spyder(): 23 | 24 | def start_scrap(self, part_url_dict, rule_func): 25 | result = {} 26 | for part_name, part_url in part_url_dict.items(): 27 | res = requests.get(part_url, headers=headers) 28 | soup = BeautifulSoup(res.content, 'html.parser') 29 | item_lst = rule_func(soup) 30 | result[part_name] = item_lst 31 | 32 | # 剔除列表为空的子版块 33 | result = {key: value for key, 34 | value in result.items() if len(value) > 1} 35 | 36 | return result 37 | 38 | 39 | # 西安教育局 40 | xa_edu_url_dict = {'教育要闻': 'http://edu.xa.gov.cn/xwzx/jyyw/1.html', 41 | '通知公告': 'http://edu.xa.gov.cn/xwzx/tzgg/1.html', 42 | '区域动态': 'http://edu.xa.gov.cn/xwzx/qydt/1.html'} 43 | 44 | 45 | @retry(stop_max_attempt_number=10, wait_random_min=10, wait_random_max=60) 46 | def xa_edu_rule(soup): 47 | item_lst = [] 48 | base_url = 'http://edu.xa.gov.cn' 49 | for item in soup.find('div', id='content').find_all('article'): 50 | item_dict = {} 51 | post_date = item.find('div', class_='detail').find('span').get_text() 52 | if post_date < day_3_ago: 53 | break 54 | title = item.find('a')['title'].replace( 55 | '\\', '').replace('/', '').replace('\n', '') 56 | article_url = base_url + item.find('a')['href'] 57 | item_dict['post_date'] = post_date 58 | item_dict['title'] = title 59 | item_dict['article_url'] = article_url 60 | item_lst.append(item_dict) 61 | return item_lst 62 | 63 | # 省教育厅 64 | 65 | 66 | sjyt_url_dict = {'公示公告': 'http://jyt.shaanxi.gov.cn/news/gsgg/', 67 | '教育厅文件': 'http://jyt.shaanxi.gov.cn/news/jiaoyutingwenjian/'} 68 | 69 | 70 | @retry(stop_max_attempt_number=10, wait_random_min=10, wait_random_max=60) 71 | def sjyt_rule(soup): 72 | item_lst = [] 73 | for item in soup.find('div', class_='catlist').find_all('li', class_='catlist_li'): 74 | item_dict = {} 75 | # date 76 | post_date = item.find('span').get_text() 77 | if post_date < day_3_ago: 78 | break 79 | title = item.find('a').get_text() 80 | article_url = item.find('a')['href'] 81 | 82 | item_dict['post_date'] = post_date 83 | item_dict['title'] = title 84 | item_dict['article_url'] = article_url 85 | 86 | item_lst.append(item_dict) 87 | return item_lst 88 | 89 | 90 | # 陕西省招生考试信息网 91 | szw_url_dict = { 92 | '新闻公告': 'http://www.sneac.com/index/xwgg1.htm', 93 | '普通高考': 'http://www.sneac.com/zkyw/ptgk.htm', 94 | '高中学业水平考试': 'http://www.sneac.com/zkyw/gzxyspks.htm', 95 | '中考': 'http://www.sneac.com/zkyw/zk.htm' 96 | } 97 | 98 | 99 | @retry(stop_max_attempt_number=10, wait_random_min=10, wait_random_max=60) 100 | def szw_rule(soup): 101 | item_lst = [] 102 | base_url = 'http://www.sneac.com' 103 | for item in soup.find('div', class_='list-box').find_all('li'): 104 | item_dict = {} 105 | post_date = item.find('span').get_text().replace('/', '-') 106 | if post_date < day_3_ago: 107 | break 108 | title = item.find('a').get_text() 109 | article_url = base_url + item.find('a')['href'][2:] 110 | 111 | item_dict['post_date'] = post_date 112 | item_dict['title'] = title 113 | item_dict['article_url'] = article_url 114 | 115 | item_lst.append(item_dict) 116 | return item_lst 117 | 118 | 119 | # 教育部 120 | gj_edu_url_dict = {'公告公示': 'http://www.moe.gov.cn/jyb_xxgk/s5743/s5972/', 121 | '最新文件': 'http://www.moe.gov.cn/was5/web/search?channelid=239993', 122 | '工作动态': 'http://www.moe.gov.cn/jyb_xwfb/gzdt_gzdt/'} 123 | 124 | 125 | def gj_edu_rule(soup): 126 | item_lst = [] 127 | base_url = 'http://www.moe.gov.cn/' 128 | gzdt_base_url = 'http://www.moe.gov.cn/jyb_xwfb/gzdt_gzdt/' 129 | part = soup.find('h2').get_text() 130 | if part == '重要文件': 131 | news_lst = soup.find_all('ul')[6].find_all('li') 132 | else: 133 | news_lst = soup.find('ul', id='list').find_all('li') 134 | 135 | for item in news_lst: 136 | item_dict = {} 137 | post_date = item.find('span').get_text() 138 | if post_date < day_3_ago: 139 | break 140 | title = item.find('a').get_text() 141 | if part == '重要文件': 142 | article_url = item.find('a')['href'] 143 | elif part == '工作动态': 144 | article_url = base_url + item.find('a')['href'].split('./')[-1] 145 | else: 146 | article_url = base_url + item.find('a')['href'].split('../')[-1] 147 | item_dict['post_date'] = post_date 148 | item_dict['title'] = title 149 | item_dict['article_url'] = article_url 150 | item_lst.append(item_dict) 151 | return item_lst 152 | 153 | 154 | # 官方新闻爬虫 155 | basic_spyder = Basic_Spyder() 156 | xa_edu_result = basic_spyder.start_scrap(xa_edu_url_dict, xa_edu_rule) 157 | sjyt_result = basic_spyder.start_scrap(sjyt_url_dict, sjyt_rule) 158 | szw_result = basic_spyder.start_scrap(szw_url_dict, szw_rule) 159 | gj_edu_result = basic_spyder.start_scrap(gj_edu_url_dict, gj_edu_rule) 160 | 161 | official_news = { 162 | '西安市教育局': { 163 | 'homepage': 'http://edu.xa.gov.cn/', 164 | 'favicon': 'http://edu.xa.gov.cn/images/favicon.ico', 165 | 'result': xa_edu_result}, 166 | '陕西省教育厅': { 167 | 'homepage': 'http://jyt.shaanxi.gov.cn/', 168 | 'favicon': 'http://jyt.shaanxi.gov.cn/favicon.ico', 169 | 'result': sjyt_result}, 170 | '陕西招生考试信息网': { 171 | 'homepage': 'https://www.sneac.com/', 172 | 'favicon': 'https://www.sneac.com/images/bitbug_favicon.ico', 173 | 'result': szw_result}, 174 | '国家教育部': { 175 | 'homepage': 'http://www.moe.gov.cn/', 176 | 'favicon': 'http://www.moe.gov.cn/favorite.ico', 177 | 'result': gj_edu_result}, 178 | 179 | } 180 | 181 | with open('docs/official_news.json', 'w', encoding='utf-8') as f: 182 | f.write(json.dumps(official_news, ensure_ascii=False)) 183 | 184 | 185 | # 门户新闻 186 | # 华商报 187 | @retry(stop_max_attempt_number=10, wait_random_min=10, wait_random_max=60) 188 | def huashang(): 189 | huashangbao_url = 'http://edu.hsw.cn/' 190 | response = requests.get(huashangbao_url) 191 | soup = BeautifulSoup(response.content, 'lxml') 192 | hot = soup.find('div', class_='list fr') 193 | 194 | huashang_result = [] 195 | for item in hot.find_all('a'): 196 | item_dict = {} 197 | media_name = '华商报' 198 | article_url = item['href'] 199 | article_soup = BeautifulSoup(requests.get(article_url).content, 'lxml') 200 | title = article_soup.find('h1').get_text() 201 | post_date = article_soup.find( 202 | 'span', class_='article-time').get_text().split(' ')[0] 203 | 204 | item_dict['post_date'] = post_date 205 | item_dict['title'] = title 206 | item_dict['article_url'] = article_url 207 | huashang_result.append(item_dict) 208 | 209 | return ({ 210 | "华商报教育": { 211 | "homepage": "http://edu.hsw.cn/", 212 | "favicon": "http://static.hsw.cn/b/assets/i/favicon.png", 213 | "result": {'今日推荐': huashang_result}}}) 214 | 215 | # 新浪教育 216 | @retry(stop_max_attempt_number=10, wait_random_min=10, wait_random_max=60) 217 | def xinlang(): 218 | xinlang_url = 'http://edu.sina.com.cn/' 219 | response = requests.get(xinlang_url) 220 | 221 | soup = BeautifulSoup(response.content, 'lxml') 222 | 223 | rank_news = soup.find('div', class_='rank_news').find_all('a') 224 | rank_commt = soup.find('div', class_='rank_commt').find_all('a') 225 | 226 | def format_date(date): 227 | year = date.split('年')[0] 228 | month = date.split('年')[1].split('月')[0] 229 | day = date.split('年')[1].split('月')[1].split('日')[0] 230 | return (f'{year}-{month}-{day}') 231 | 232 | def get_title_date(article_url): 233 | article_soup = BeautifulSoup(requests.get(article_url).content, 'lxml') 234 | try: 235 | title = article_soup.find('h1').get_text() 236 | date = format_date(article_soup.find( 237 | 'span', class_='date').get_text()) 238 | except: 239 | title = article_soup.find( 240 | 'meta', attrs={'property': "og:title"})['content'] 241 | date = article_soup.find('meta', attrs={'property': "article:published_time"})[ 242 | 'content'].split('T')[0] 243 | return (title, date) 244 | 245 | result = {} 246 | result['新闻排行'] = [] 247 | for item in rank_news: 248 | item_dict = {} 249 | article_url = item['href'] 250 | title, post_date = get_title_date(article_url) 251 | item_dict['post_date'] = post_date 252 | item_dict['title'] = title 253 | item_dict['article_url'] = article_url 254 | result['新闻排行'].append(item_dict) 255 | 256 | result['评论排行'] = [] 257 | for item in rank_commt: 258 | item_dict = {} 259 | article_url = item['href'] 260 | title, post_date = get_title_date(article_url) 261 | item_dict['post_date'] = post_date 262 | item_dict['title'] = title 263 | item_dict['article_url'] = article_url 264 | result['评论排行'].append(item_dict) 265 | 266 | return ({ 267 | "新浪教育": { 268 | "homepage": "http://edu.sina.com.cn/", 269 | "favicon": "http://edu.sina.com.cn/favicon.ico", 270 | "result": result}}) 271 | 272 | 273 | menhu_news = huashang() 274 | menhu_news.update(xinlang()) 275 | 276 | with open('docs/menhu_news.json', 'w', encoding='utf-8') as f: 277 | f.write(json.dumps(menhu_news, ensure_ascii=False)) 278 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | beautifulsoup4==4.7.1 2 | bs4==0.0.1 3 | Flask==1.0.2 4 | Jinja2==2.10 5 | numpy==1.18.0 6 | pandas==0.24.2 7 | redis==3.3.8 8 | requests==2.22.0 9 | retry==0.9.2 10 | scipy==1.1.0 11 | selenium==3.141.0 12 | Werkzeug==0.14.1 13 | xpinyin==0.5.6 14 | 15 | -------------------------------------------------------------------------------- /static/css/bootstrap-table.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /** 4 | * @author zhixin wen 5 | * version: 1.14.1 6 | * https://github.com/wenzhixin/bootstrap-table/ 7 | */ 8 | 9 | .bootstrap-table .fixed-table-toolbar:after { 10 | content: ""; 11 | display: block; 12 | clear: both; 13 | } 14 | 15 | .bootstrap-table .fixed-table-toolbar .bs-bars, 16 | .bootstrap-table .fixed-table-toolbar .search, 17 | .bootstrap-table .fixed-table-toolbar .columns { 18 | position: relative; 19 | margin-top: 10px; 20 | margin-bottom: 10px; 21 | } 22 | 23 | .bootstrap-table .fixed-table-toolbar .columns .btn-group>.btn-group { 24 | display: inline-block; 25 | margin-left: -1px !important; 26 | } 27 | 28 | .bootstrap-table .fixed-table-toolbar .columns .btn-group>.btn-group:first-child>.btn { 29 | border-top-left-radius: 4px; 30 | border-bottom-left-radius: 4px; 31 | } 32 | 33 | .bootstrap-table .fixed-table-toolbar .columns .btn-group>.btn-group:last-child>.btn { 34 | border-top-right-radius: 4px; 35 | border-bottom-right-radius: 4px; 36 | } 37 | 38 | .bootstrap-table .fixed-table-toolbar .columns .btn-group>.btn-group>.btn { 39 | border-radius: 0; 40 | } 41 | 42 | .bootstrap-table .fixed-table-toolbar .columns .dropdown-menu { 43 | text-align: left; 44 | max-height: 300px; 45 | overflow: auto; 46 | } 47 | 48 | .bootstrap-table .fixed-table-toolbar .columns label { 49 | display: block; 50 | padding: 3px 20px; 51 | clear: both; 52 | font-weight: normal; 53 | line-height: 1.428571429; 54 | } 55 | 56 | .bootstrap-table .fixed-table-toolbar .columns-left { 57 | margin-right: 5px; 58 | } 59 | 60 | .bootstrap-table .fixed-table-toolbar .columns-right { 61 | margin-left: 5px; 62 | } 63 | 64 | .bootstrap-table .fixed-table-toolbar .pull-right .dropdown-menu { 65 | right: 0; 66 | left: auto; 67 | } 68 | 69 | .bootstrap-table .fixed-table-container { 70 | position: relative; 71 | clear: both; 72 | } 73 | 74 | .bootstrap-table .fixed-table-container.fixed-height:not(.has-footer) { 75 | border-bottom: 1px solid #dee2e6; 76 | } 77 | 78 | .bootstrap-table .fixed-table-container.fixed-height .fixed-table-border { 79 | border-left: 1px solid #dee2e6; 80 | border-right: 1px solid #dee2e6; 81 | } 82 | 83 | .bootstrap-table .fixed-table-container.fixed-height .table thead th { 84 | border-bottom: 1px solid #dee2e6; 85 | } 86 | 87 | .bootstrap-table .fixed-table-container.fixed-height .table-dark thead th { 88 | border-bottom: 1px solid #32383e; 89 | } 90 | 91 | .bootstrap-table .fixed-table-container .fixed-table-header { 92 | overflow: hidden; 93 | } 94 | 95 | .bootstrap-table .fixed-table-container .fixed-table-body { 96 | overflow-x: auto; 97 | overflow-y: auto; 98 | height: 100%; 99 | } 100 | 101 | .bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading { 102 | display: none; 103 | position: absolute; 104 | top: 42px; 105 | right: 0; 106 | bottom: 0; 107 | left: 0; 108 | z-index: 99; 109 | background-color: #fff; 110 | text-align: center; 111 | } 112 | 113 | .bootstrap-table .fixed-table-container .table { 114 | width: 100%; 115 | margin-bottom: 0 !important; 116 | } 117 | 118 | .bootstrap-table .fixed-table-container .table th, 119 | .bootstrap-table .fixed-table-container .table td { 120 | vertical-align: middle; 121 | box-sizing: border-box; 122 | } 123 | 124 | .bootstrap-table .fixed-table-container .table thead th { 125 | vertical-align: bottom; 126 | padding: 0; 127 | margin: 0; 128 | } 129 | 130 | .bootstrap-table .fixed-table-container .table thead th:focus { 131 | outline: 0 solid transparent; 132 | } 133 | 134 | .bootstrap-table .fixed-table-container .table thead th.detail { 135 | width: 30px; 136 | } 137 | 138 | .bootstrap-table .fixed-table-container .table thead th .th-inner { 139 | padding: 0.75rem; 140 | vertical-align: bottom; 141 | overflow: hidden; 142 | text-overflow: ellipsis; 143 | white-space: nowrap; 144 | } 145 | 146 | .bootstrap-table .fixed-table-container .table thead th .sortable { 147 | cursor: pointer; 148 | background-position: right; 149 | background-repeat: no-repeat; 150 | padding-right: 30px; 151 | } 152 | 153 | .bootstrap-table .fixed-table-container .table thead th .both { 154 | background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAAkElEQVQoz7X QMQ5AQBCF4dWQSJxC5wwax1Cq1e7BAdxD5SL+Tq/QCM1oNiJidwox0355mXnG/DrEtIQ6azioNZQxI0ykPhTQIwhCR+BmBYtlK7kLJYwWCcJA9M4qdrZrd8pPjZWPtOqdRQy320YSV17OatFC4euts6z39GYMKRPCTKY9UnPQ6P+GtMRfGtPnBCiqhAeJPmkqAAAAAElFTkSuQmCC"); 155 | } 156 | 157 | .bootstrap-table .fixed-table-container .table thead th .asc { 158 | background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZ0lEQVQ4y2NgGLKgquEuFxBPAGI2ahhWCsS/gDibUoO0gPgxEP8H4ttArEyuQYxAPBdqEAxPBImTY5gjEL9DM+wTENuQahAvEO9DMwiGdwAxOymGJQLxTyD+jgWDxCMZRsEoGAVoAADeemwtPcZI2wAAAABJRU5ErkJggg=="); 159 | } 160 | 161 | .bootstrap-table .fixed-table-container .table thead th .desc { 162 | background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZUlEQVQ4y2NgGAWjYBSggaqGu5FA/BOIv2PBIPFEUgxjB+IdQPwfC94HxLykus4GiD+hGfQOiB3J8SojEE9EM2wuSJzcsFMG4ttQgx4DsRalkZENxL+AuJQaMcsGxBOAmGvopk8AVz1sLZgg0bsAAAAASUVORK5CYII= "); 163 | } 164 | 165 | .bootstrap-table .fixed-table-container .table tbody tr.selected td { 166 | background-color: rgba(0, 0, 0, 0.075); 167 | } 168 | 169 | .bootstrap-table .fixed-table-container .table tbody tr.no-records-found { 170 | text-align: center; 171 | } 172 | 173 | .bootstrap-table .fixed-table-container .table tbody tr .card-view .card-view-title { 174 | font-weight: bold; 175 | display: inline-block; 176 | min-width: 30%; 177 | text-align: left !important; 178 | } 179 | 180 | .bootstrap-table .fixed-table-container .table .bs-checkbox { 181 | text-align: center; 182 | } 183 | 184 | .bootstrap-table .fixed-table-container .table input[type=radio], 185 | .bootstrap-table .fixed-table-container .table input[type=checkbox] { 186 | margin: 0 auto !important; 187 | } 188 | 189 | .bootstrap-table .fixed-table-container .table.table-sm .th-inner { 190 | padding: 0.3rem; 191 | } 192 | 193 | .bootstrap-table .fixed-table-container .fixed-table-footer { 194 | overflow: hidden; 195 | } 196 | 197 | .bootstrap-table .fixed-table-pagination:after { 198 | content: ""; 199 | display: block; 200 | clear: both; 201 | } 202 | 203 | .bootstrap-table .fixed-table-pagination>.pagination-detail, 204 | .bootstrap-table .fixed-table-pagination>.pagination { 205 | margin-top: 10px; 206 | margin-bottom: 10px; 207 | } 208 | 209 | .bootstrap-table .fixed-table-pagination>.pagination-detail .pagination-info { 210 | line-height: 34px; 211 | margin-right: 5px; 212 | } 213 | 214 | .bootstrap-table .fixed-table-pagination>.pagination-detail .page-list { 215 | display: inline-block; 216 | } 217 | 218 | .bootstrap-table .fixed-table-pagination>.pagination-detail .page-list .btn-group { 219 | position: relative; 220 | display: inline-block; 221 | vertical-align: middle; 222 | } 223 | 224 | .bootstrap-table .fixed-table-pagination>.pagination-detail .page-list .btn-group .dropdown-menu { 225 | margin-bottom: 0; 226 | } 227 | 228 | .bootstrap-table .fixed-table-pagination>.pagination ul.pagination { 229 | margin: 0; 230 | } 231 | 232 | .bootstrap-table .fixed-table-pagination>.pagination ul.pagination a { 233 | padding: 6px 12px; 234 | line-height: 1.428571429; 235 | } 236 | 237 | .bootstrap-table .fixed-table-pagination>.pagination ul.pagination li.page-intermediate a { 238 | color: #c8c8c8; 239 | } 240 | 241 | .bootstrap-table .fixed-table-pagination>.pagination ul.pagination li.page-intermediate a:before { 242 | content: "⬅"; 243 | } 244 | 245 | .bootstrap-table .fixed-table-pagination>.pagination ul.pagination li.page-intermediate a:after { 246 | content: "➡"; 247 | } 248 | 249 | .bootstrap-table .fixed-table-pagination>.pagination ul.pagination li.disabled a { 250 | pointer-events: none; 251 | cursor: default; 252 | } 253 | 254 | .bootstrap-table.fullscreen { 255 | position: fixed; 256 | top: 0; 257 | left: 0; 258 | z-index: 1050; 259 | width: 100% !important; 260 | background: #FFF; 261 | } 262 | 263 | 264 | /* calculate scrollbar width */ 265 | 266 | div.fixed-table-scroll-inner { 267 | width: 100%; 268 | height: 200px; 269 | } 270 | 271 | div.fixed-table-scroll-outer { 272 | top: 0; 273 | left: 0; 274 | visibility: hidden; 275 | width: 200px; 276 | height: 150px; 277 | overflow: hidden; 278 | } 279 | 280 | 281 | /*# sourceMappingURL=bootstrap-table.css.map */ -------------------------------------------------------------------------------- /static/css/colResizable.css: -------------------------------------------------------------------------------- 1 | body{ 2 | background-color: white; 3 | text-align:center; 4 | padding:55px; 5 | } 6 | 7 | 8 | .center{ 9 | text-align:left; 10 | } 11 | 12 | #table{ 13 | width:100%; 14 | /*max-width:1600px;*/ 15 | } 16 | 17 | th{ 18 | /*background-image:url('../img/th.png');*/ 19 | background:#555D5F; 20 | height:30px; 21 | background-repeat:no-repeat; 22 | color:white; 23 | text-shadow: #012b4d 2px 2px 2px; 24 | text-align: center; 25 | } 26 | 27 | /*td{ 28 | text-indent:5px; 29 | color:#444; 30 | border-bottom:1px solid #bbb; 31 | border-left:1px solid #bbb; 32 | } 33 | 34 | td.left{ 35 | border-left:1px solid #2e638e; 36 | } 37 | 38 | td.right{ 39 | border-right:1px solid #2e638e; 40 | } 41 | 42 | td.bottom{ 43 | border-bottom:1px solid #2e638e; 44 | }*/ 45 | 46 | .grip{ 47 | width:20px; 48 | height:30px; 49 | margin-top:-3px; /*图标位置*/ 50 | /*background-image:url('../img/grip.png');*/ 51 | margin-left:-5px; 52 | position:relative; 53 | z-index:88; 54 | cursor:e-resize; 55 | } 56 | 57 | .grip:hover{ 58 | background-position-x:-20px; 59 | } 60 | 61 | .dragging .grip{ 62 | background-position-x:-40px; 63 | } 64 | 65 | .sampleText{ 66 | position:relative; 67 | width:100%; 68 | } 69 | 70 | .dotted{ 71 | background-image:url('../img/dotted.png'); 72 | background-repeat:repeat-y; 73 | } 74 | 75 | input.check{ 76 | 77 | } 78 | 79 | #sample2Txt{ 80 | float:right; 81 | } 82 | label{ 83 | color:#0361ae; 84 | } 85 | -------------------------------------------------------------------------------- /static/css/dataTables.bootstrap4.min.css: -------------------------------------------------------------------------------- 1 | table.dataTable { 2 | clear: both; 3 | margin-top: 6px !important; 4 | margin-bottom: 6px !important; 5 | max-width: none !important; 6 | border-collapse: separate !important; 7 | border-spacing: 0 8 | } 9 | 10 | table.dataTable td, 11 | table.dataTable th { 12 | -webkit-box-sizing: content-box; 13 | box-sizing: content-box 14 | } 15 | 16 | table.dataTable td.dataTables_empty, 17 | table.dataTable th.dataTables_empty { 18 | text-align: center 19 | } 20 | 21 | table.dataTable.nowrap th, 22 | table.dataTable.nowrap td { 23 | white-space: nowrap 24 | } 25 | 26 | div.dataTables_wrapper div.dataTables_length label { 27 | font-weight: normal; 28 | text-align: left; 29 | white-space: nowrap 30 | } 31 | 32 | div.dataTables_wrapper div.dataTables_length select { 33 | width: auto; 34 | display: inline-block 35 | } 36 | 37 | div.dataTables_wrapper div.dataTables_filter { 38 | text-align: right 39 | } 40 | 41 | div.dataTables_wrapper div.dataTables_filter label { 42 | font-weight: normal; 43 | white-space: nowrap; 44 | text-align: left 45 | } 46 | 47 | div.dataTables_wrapper div.dataTables_filter input { 48 | margin-left: 0.5em; 49 | display: inline-block; 50 | width: auto 51 | } 52 | 53 | div.dataTables_wrapper div.dataTables_info { 54 | padding-top: 0.85em; 55 | white-space: nowrap 56 | } 57 | 58 | div.dataTables_wrapper div.dataTables_paginate { 59 | margin: 0; 60 | white-space: nowrap; 61 | text-align: right 62 | } 63 | 64 | div.dataTables_wrapper div.dataTables_paginate ul.pagination { 65 | margin: 2px 0; 66 | white-space: nowrap; 67 | justify-content: flex-end 68 | } 69 | 70 | div.dataTables_wrapper div.dataTables_processing { 71 | position: absolute; 72 | top: 50%; 73 | left: 50%; 74 | width: 200px; 75 | margin-left: -100px; 76 | margin-top: -26px; 77 | text-align: center; 78 | padding: 1em 0 79 | } 80 | 81 | table.dataTable thead>tr>th.sorting_asc, 82 | table.dataTable thead>tr>th.sorting_desc, 83 | table.dataTable thead>tr>th.sorting, 84 | table.dataTable thead>tr>td.sorting_asc, 85 | table.dataTable thead>tr>td.sorting_desc, 86 | table.dataTable thead>tr>td.sorting { 87 | padding-right: 30px 88 | } 89 | 90 | table.dataTable thead>tr>th:active, 91 | table.dataTable thead>tr>td:active { 92 | outline: none 93 | } 94 | 95 | table.dataTable thead .sorting, 96 | table.dataTable thead .sorting_asc, 97 | table.dataTable thead .sorting_desc, 98 | table.dataTable thead .sorting_asc_disabled, 99 | table.dataTable thead .sorting_desc_disabled { 100 | cursor: pointer; 101 | position: relative 102 | } 103 | 104 | table.dataTable thead .sorting:before, 105 | table.dataTable thead .sorting:after, 106 | table.dataTable thead .sorting_asc:before, 107 | table.dataTable thead .sorting_asc:after, 108 | table.dataTable thead .sorting_desc:before, 109 | table.dataTable thead .sorting_desc:after, 110 | table.dataTable thead .sorting_asc_disabled:before, 111 | table.dataTable thead .sorting_asc_disabled:after, 112 | table.dataTable thead .sorting_desc_disabled:before, 113 | table.dataTable thead .sorting_desc_disabled:after { 114 | position: absolute; 115 | bottom: 0.9em; 116 | display: block; 117 | opacity: 0.3 118 | } 119 | 120 | table.dataTable thead .sorting:before, 121 | table.dataTable thead .sorting_asc:before, 122 | table.dataTable thead .sorting_desc:before, 123 | table.dataTable thead .sorting_asc_disabled:before, 124 | table.dataTable thead .sorting_desc_disabled:before { 125 | right: 1em; 126 | content: "\2191" 127 | } 128 | 129 | table.dataTable thead .sorting:after, 130 | table.dataTable thead .sorting_asc:after, 131 | table.dataTable thead .sorting_desc:after, 132 | table.dataTable thead .sorting_asc_disabled:after, 133 | table.dataTable thead .sorting_desc_disabled:after { 134 | right: 0.5em; 135 | content: "\2193" 136 | } 137 | 138 | table.dataTable thead .sorting_asc:before, 139 | table.dataTable thead .sorting_desc:after { 140 | opacity: 1 141 | } 142 | 143 | table.dataTable thead .sorting_asc_disabled:before, 144 | table.dataTable thead .sorting_desc_disabled:after { 145 | opacity: 0 146 | } 147 | 148 | div.dataTables_scrollHead table.dataTable { 149 | margin-bottom: 0 !important 150 | } 151 | 152 | div.dataTables_scrollBody table { 153 | border-top: none; 154 | margin-top: 0 !important; 155 | margin-bottom: 0 !important 156 | } 157 | 158 | div.dataTables_scrollBody table thead .sorting:before, 159 | div.dataTables_scrollBody table thead .sorting_asc:before, 160 | div.dataTables_scrollBody table thead .sorting_desc:before, 161 | div.dataTables_scrollBody table thead .sorting:after, 162 | div.dataTables_scrollBody table thead .sorting_asc:after, 163 | div.dataTables_scrollBody table thead .sorting_desc:after { 164 | display: none 165 | } 166 | 167 | div.dataTables_scrollBody table tbody tr:first-child th, 168 | div.dataTables_scrollBody table tbody tr:first-child td { 169 | border-top: none 170 | } 171 | 172 | div.dataTables_scrollFoot>.dataTables_scrollFootInner { 173 | box-sizing: content-box 174 | } 175 | 176 | div.dataTables_scrollFoot>.dataTables_scrollFootInner>table { 177 | margin-top: 0 !important; 178 | border-top: none 179 | } 180 | 181 | @media screen and (max-width: 767px) { 182 | div.dataTables_wrapper div.dataTables_length, 183 | div.dataTables_wrapper div.dataTables_filter, 184 | div.dataTables_wrapper div.dataTables_info, 185 | div.dataTables_wrapper div.dataTables_paginate { 186 | text-align: center 187 | } 188 | } 189 | 190 | table.dataTable.table-sm>thead>tr>th { 191 | padding-right: 20px 192 | } 193 | 194 | table.dataTable.table-sm .sorting:before, 195 | table.dataTable.table-sm .sorting_asc:before, 196 | table.dataTable.table-sm .sorting_desc:before { 197 | top: 5px; 198 | right: 0.85em 199 | } 200 | 201 | table.dataTable.table-sm .sorting:after, 202 | table.dataTable.table-sm .sorting_asc:after, 203 | table.dataTable.table-sm .sorting_desc:after { 204 | top: 5px 205 | } 206 | 207 | table.table-bordered.dataTable th, 208 | table.table-bordered.dataTable td { 209 | border-left-width: 0 210 | } 211 | 212 | table.table-bordered.dataTable th:last-child, 213 | table.table-bordered.dataTable th:last-child, 214 | table.table-bordered.dataTable td:last-child, 215 | table.table-bordered.dataTable td:last-child { 216 | border-right-width: 0 217 | } 218 | 219 | table.table-bordered.dataTable tbody th, 220 | table.table-bordered.dataTable tbody td { 221 | border-bottom-width: 0 222 | } 223 | 224 | div.dataTables_scrollHead table.table-bordered { 225 | border-bottom-width: 0 226 | } 227 | 228 | div.table-responsive>div.dataTables_wrapper>div.row { 229 | margin: 0 230 | } 231 | 232 | div.table-responsive>div.dataTables_wrapper>div.row>div[class^="col-"]:first-child { 233 | padding-left: 0 234 | } 235 | 236 | div.table-responsive>div.dataTables_wrapper>div.row>div[class^="col-"]:last-child { 237 | padding-right: 0 238 | } -------------------------------------------------------------------------------- /static/css/demo.css: -------------------------------------------------------------------------------- 1 | html, 2 | body, 3 | div, 4 | span, 5 | applet, 6 | object, 7 | iframe, 8 | h1, 9 | h2, 10 | h3, 11 | h4, 12 | h5, 13 | h6, 14 | p, 15 | blockquote, 16 | pre, 17 | a, 18 | abbr, 19 | acronym, 20 | address, 21 | big, 22 | cite, 23 | code, 24 | del, 25 | dfn, 26 | em, 27 | font, 28 | img, 29 | ins, 30 | kbd, 31 | q, 32 | s, 33 | samp, 34 | small, 35 | strike, 36 | strong, 37 | sub, 38 | sup, 39 | tt, 40 | var, 41 | dl, 42 | dt, 43 | dd, 44 | ol, 45 | ul, 46 | li, 47 | fieldset, 48 | form, 49 | label, 50 | legend, 51 | table, 52 | caption, 53 | tbody, 54 | tfoot, 55 | thead, 56 | tr, 57 | th, 58 | td { 59 | margin: 0; 60 | padding: 0; 61 | border: 0; 62 | outline: 0; 63 | font-weight: inherit; 64 | font-style: inherit; 65 | font-size: 100%; 66 | font-family: inherit; 67 | vertical-align: baseline; 68 | } 69 | 70 | body { 71 | color: #2f332a; 72 | font: 15px/21px Arial, Helvetica, simsun, sans-serif; 73 | background: #f0f6e4 \9; 74 | } 75 | 76 | h1, 77 | h2, 78 | h3, 79 | h4, 80 | h5, 81 | h6 { 82 | color: #2f332a; 83 | font-weight: bold; 84 | font-family: Helvetica, Arial, sans-serif; 85 | padding-bottom: 5px; 86 | } 87 | 88 | h1 { 89 | font-size: 24px; 90 | line-height: 34px; 91 | text-align: left; 92 | } 93 | 94 | h2 { 95 | font-size: 14px; 96 | line-height: 24px; 97 | padding-top: 5px; 98 | } 99 | 100 | h6 { 101 | font-weight: normal; 102 | font-size: 12px; 103 | letter-spacing: 1px; 104 | line-height: 24px; 105 | text-align: center; 106 | } 107 | 108 | a { 109 | color: #3C6E31; 110 | text-decoration: underline; 111 | } 112 | 113 | a:hover { 114 | background-color: #3C6E31; 115 | color: white; 116 | } 117 | 118 | input.radio { 119 | margin: 0 2px 0 8px; 120 | } 121 | 122 | input.radio.first { 123 | margin-left: 0; 124 | } 125 | 126 | input.empty { 127 | color: lightgray; 128 | } 129 | 130 | code { 131 | color: #2f332a; 132 | } 133 | 134 | .highlight_red { 135 | color: #A60000; 136 | } 137 | 138 | .highlight_green { 139 | color: #A7F43D; 140 | } 141 | 142 | li { 143 | list-style: circle; 144 | font-size: 12px; 145 | } 146 | 147 | li.title { 148 | list-style: none; 149 | } 150 | 151 | ul.list { 152 | margin-left: 17px; 153 | } 154 | 155 | div.content_wrap { 156 | width: 600px; 157 | height: 380px; 158 | } 159 | 160 | div.content_wrap div.left { 161 | float: left; 162 | width: 250px; 163 | } 164 | 165 | div.content_wrap div.right { 166 | float: right; 167 | width: 340px; 168 | } 169 | 170 | div.zTreeDemoBackground { 171 | width: 250px; 172 | height: 362px; 173 | text-align: left; 174 | } 175 | 176 | ul.ztree { 177 | margin-top: 10px; 178 | border: 1px solid #617775; 179 | background: #f0f6e4; 180 | width: 220px; 181 | height: 360px; 182 | overflow-y: scroll; 183 | overflow-x: auto; 184 | } 185 | 186 | ul.log { 187 | border: 1px solid #617775; 188 | background: #f0f6e4; 189 | width: 300px; 190 | height: 170px; 191 | overflow: hidden; 192 | } 193 | 194 | ul.log.small { 195 | height: 45px; 196 | } 197 | 198 | ul.log li { 199 | color: #666666; 200 | list-style: none; 201 | padding-left: 10px; 202 | } 203 | 204 | ul.log li.dark { 205 | background-color: #E3E3E3; 206 | } 207 | 208 | 209 | /* ruler */ 210 | 211 | div.ruler { 212 | height: 20px; 213 | width: 220px; 214 | background-color: #f0f6e4; 215 | border: 1px solid #333; 216 | margin-bottom: 5px; 217 | cursor: pointer 218 | } 219 | 220 | div.ruler div.cursor { 221 | height: 20px; 222 | width: 30px; 223 | background-color: #3C6E31; 224 | color: white; 225 | text-align: right; 226 | padding-right: 5px; 227 | cursor: pointer 228 | } -------------------------------------------------------------------------------- /static/css/jPaginate.css: -------------------------------------------------------------------------------- 1 | .jPaginate{ 2 | height:34px; 3 | position:relative; 4 | color:#a5a5a5; 5 | font-size:small; 6 | width:100%; 7 | } 8 | .jPaginate a{ 9 | line-height:15px; 10 | height:18px; 11 | cursor:pointer; 12 | padding:2px 5px; 13 | margin:2px; 14 | float:left; 15 | } 16 | .jPag-control-back{ 17 | position:absolute; 18 | left:0px; 19 | } 20 | .jPag-control-front{ 21 | position:absolute; 22 | top:0px; 23 | } 24 | .jPaginate span{ 25 | cursor:pointer; 26 | } 27 | ul.jPag-pages{ 28 | float:left; 29 | list-style-type:none; 30 | margin:0px 0px 0px 0px; 31 | padding:0px; 32 | } 33 | ul.jPag-pages li{ 34 | display:inline; 35 | float:left; 36 | padding:0px; 37 | margin:0px; 38 | } 39 | ul.jPag-pages li a{ 40 | float:left; 41 | padding:2px 5px; 42 | } 43 | span.jPag-current{ 44 | cursor:default; 45 | font-weight:normal; 46 | line-height:15px; 47 | height:18px; 48 | padding:2px 5px; 49 | margin:2px; 50 | float:left; 51 | } 52 | ul.jPag-pages li span.jPag-previous, 53 | ul.jPag-pages li span.jPag-next, 54 | span.jPag-sprevious, 55 | span.jPag-snext, 56 | ul.jPag-pages li span.jPag-previous-img, 57 | ul.jPag-pages li span.jPag-next-img, 58 | span.jPag-sprevious-img, 59 | span.jPag-snext-img{ 60 | height:22px; 61 | margin:2px; 62 | float:left; 63 | line-height:18px; 64 | } 65 | 66 | ul.jPag-pages li span.jPag-previous, 67 | ul.jPag-pages li span.jPag-previous-img{ 68 | margin:2px 0px 2px 2px; 69 | font-size:12px; 70 | font-weight:bold; 71 | width:10px; 72 | 73 | } 74 | ul.jPag-pages li span.jPag-next, 75 | ul.jPag-pages li span.jPag-next-img{ 76 | margin:2px 2px 2px 0px; 77 | font-size:12px; 78 | font-weight:bold; 79 | width:10px; 80 | } 81 | span.jPag-sprevious, 82 | span.jPag-sprevious-img{ 83 | margin:2px 0px 2px 2px; 84 | font-size:18px; 85 | width:15px; 86 | text-align:right; 87 | } 88 | span.jPag-snext, 89 | span.jPag-snext-img{ 90 | margin:2px 2px 2px 0px; 91 | font-size:18px; 92 | width:15px; 93 | text-align:right; 94 | } 95 | ul.jPag-pages li span.jPag-previous-img{ 96 | background:transparent url(../images/previous.png) no-repeat center right; 97 | } 98 | ul.jPag-pages li span.jPag-next-img{ 99 | background:transparent url(../images/next.png) no-repeat center left; 100 | } 101 | span.jPag-sprevious-img{ 102 | background:transparent url(../images/sprevious.png) no-repeat center right; 103 | } 104 | span.jPag-snext-img{ 105 | background:transparent url(../images/snext.png) no-repeat center left; 106 | } 107 | 108 | 109 | -------------------------------------------------------------------------------- /static/css/selfy.css: -------------------------------------------------------------------------------- 1 | /*分页样式*/ 2 | 3 | .paginate a { 4 | display: inline-block; 5 | color: #428bca; 6 | height: 25px; 7 | line-height: 25px; 8 | padding: 0 10px; 9 | border: 1px solid #ddd; 10 | margin: 0 2px; 11 | border-radius: 4px; 12 | vertical-align: middle; 13 | font-family: verdana; 14 | } 15 | 16 | #events .datagrid-sort { 17 | display: inline; 18 | padding: 0 13px 0 0; 19 | background: url('../static/img/datagrid_icons.png') no-repeat -64px center; 20 | } 21 | 22 | #events .datagrid-sort-desc { 23 | display: inline; 24 | padding: 0 13px 0 0; 25 | background: url('../static/img/datagrid_icons.png') no-repeat -16px center; 26 | } 27 | 28 | #events .datagrid-sort-asc { 29 | display: inline; 30 | padding: 0 13px 0 0; 31 | background: url('../static/img/datagrid_icons.png') no-repeat 0px center; 32 | } 33 | 34 | #events td { 35 | font-size: 1em; 36 | text-align: left; 37 | border: 1px solid #f0f0f0; 38 | padding: 3px 7px 2px 7px; 39 | } 40 | 41 | #events input { 42 | border: 0; 43 | background: transparent; 44 | width: 100%; 45 | } 46 | 47 | .red { 48 | color: red; 49 | } 50 | 51 | .top { 52 | background: #CCCCCC; 53 | cursor: pointer; 54 | } 55 | 56 | .tr_select { 57 | font-size: 120%; 58 | color: red; 59 | } -------------------------------------------------------------------------------- /static/css/style.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/css/style.css -------------------------------------------------------------------------------- /static/css/zTreeStyle/img/diy/1_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/css/zTreeStyle/img/diy/1_close.png -------------------------------------------------------------------------------- /static/css/zTreeStyle/img/diy/1_open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/css/zTreeStyle/img/diy/1_open.png -------------------------------------------------------------------------------- /static/css/zTreeStyle/img/diy/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/css/zTreeStyle/img/diy/2.png -------------------------------------------------------------------------------- /static/css/zTreeStyle/img/diy/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/css/zTreeStyle/img/diy/3.png -------------------------------------------------------------------------------- /static/css/zTreeStyle/img/diy/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/css/zTreeStyle/img/diy/4.png -------------------------------------------------------------------------------- /static/css/zTreeStyle/img/diy/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/css/zTreeStyle/img/diy/5.png -------------------------------------------------------------------------------- /static/css/zTreeStyle/img/diy/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/css/zTreeStyle/img/diy/6.png -------------------------------------------------------------------------------- /static/css/zTreeStyle/img/diy/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/css/zTreeStyle/img/diy/7.png -------------------------------------------------------------------------------- /static/css/zTreeStyle/img/diy/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/css/zTreeStyle/img/diy/8.png -------------------------------------------------------------------------------- /static/css/zTreeStyle/img/diy/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/css/zTreeStyle/img/diy/9.png -------------------------------------------------------------------------------- /static/css/zTreeStyle/img/line_conn.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/css/zTreeStyle/img/line_conn.gif -------------------------------------------------------------------------------- /static/css/zTreeStyle/img/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/css/zTreeStyle/img/loading.gif -------------------------------------------------------------------------------- /static/css/zTreeStyle/img/zTreeStandard.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/css/zTreeStyle/img/zTreeStandard.gif -------------------------------------------------------------------------------- /static/css/zTreeStyle/img/zTreeStandard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/css/zTreeStyle/img/zTreeStandard.png -------------------------------------------------------------------------------- /static/css/zTreeStyle/zTreeStyle.css: -------------------------------------------------------------------------------- 1 | /*------------------------------------- 2 | zTree Style 3 | 4 | version: 3.4 5 | author: Hunter.z 6 | email: hunter.z@263.net 7 | website: http://code.google.com/p/jquerytree/ 8 | 9 | -------------------------------------*/ 10 | 11 | .ztree * { 12 | padding: 0; 13 | margin: 0; 14 | font-size: 12px; 15 | font-family: Verdana, Arial, Helvetica, AppleGothic, sans-serif 16 | } 17 | 18 | .ztree { 19 | margin-top: 150px; 20 | margin-left: 50px; 21 | padding: 5px; 22 | color: #333 23 | } 24 | 25 | .ztree li { 26 | padding: 0; 27 | margin: 0; 28 | list-style: none; 29 | line-height: 14px; 30 | text-align: left; 31 | white-space: nowrap; 32 | outline: 0 33 | } 34 | 35 | .ztree li ul { 36 | margin: 0; 37 | padding: 0 0 0 18px 38 | } 39 | 40 | .ztree li ul.line { 41 | background: url(./img/line_conn.gif) 0 0 repeat-y; 42 | } 43 | 44 | .ztree li a { 45 | padding: 1px 3px 0 0; 46 | margin: 0; 47 | cursor: pointer; 48 | height: 17px; 49 | color: #333; 50 | background-color: transparent; 51 | text-decoration: none; 52 | vertical-align: top; 53 | display: inline-block 54 | } 55 | 56 | .ztree li a:hover { 57 | text-decoration: underline 58 | } 59 | 60 | .ztree li a.curSelectedNode { 61 | padding-top: 0px; 62 | background-color: #FFE6B0; 63 | color: black; 64 | height: 16px; 65 | border: 1px #FFB951 solid; 66 | opacity: 0.8; 67 | } 68 | 69 | .ztree li a.curSelectedNode_Edit { 70 | padding-top: 0px; 71 | background-color: #FFE6B0; 72 | color: black; 73 | height: 16px; 74 | border: 1px #FFB951 solid; 75 | opacity: 0.8; 76 | } 77 | 78 | .ztree li a.tmpTargetNode_inner { 79 | padding-top: 0px; 80 | background-color: #316AC5; 81 | color: white; 82 | height: 16px; 83 | border: 1px #316AC5 solid; 84 | opacity: 0.8; 85 | filter: alpha(opacity=80) 86 | } 87 | 88 | .ztree li a.tmpTargetNode_prev {} 89 | 90 | .ztree li a.tmpTargetNode_next {} 91 | 92 | .ztree li a input.rename { 93 | height: 14px; 94 | width: 80px; 95 | padding: 0; 96 | margin: 0; 97 | font-size: 12px; 98 | border: 1px #7EC4CC solid; 99 | *border: 0px 100 | } 101 | 102 | .ztree li span { 103 | line-height: 16px; 104 | margin-right: 2px 105 | } 106 | 107 | .ztree li span.button { 108 | line-height: 0; 109 | margin: 0; 110 | width: 16px; 111 | height: 16px; 112 | display: inline-block; 113 | vertical-align: middle; 114 | border: 0 none; 115 | cursor: pointer; 116 | outline: none; 117 | background-color: transparent; 118 | background-repeat: no-repeat; 119 | background-attachment: scroll; 120 | background-image: url("./img/zTreeStandard.png"); 121 | *background-image: url("./img/zTreeStandard.gif") 122 | } 123 | 124 | .ztree li span.button.chk { 125 | width: 13px; 126 | height: 13px; 127 | margin: 0 3px 0 0; 128 | cursor: auto 129 | } 130 | 131 | .ztree li span.button.chk.checkbox_false_full { 132 | background-position: 0 0 133 | } 134 | 135 | .ztree li span.button.chk.checkbox_false_full_focus { 136 | background-position: 0 -14px 137 | } 138 | 139 | .ztree li span.button.chk.checkbox_false_part { 140 | background-position: 0 -28px 141 | } 142 | 143 | .ztree li span.button.chk.checkbox_false_part_focus { 144 | background-position: 0 -42px 145 | } 146 | 147 | .ztree li span.button.chk.checkbox_false_disable { 148 | background-position: 0 -56px 149 | } 150 | 151 | .ztree li span.button.chk.checkbox_true_full { 152 | background-position: -14px 0 153 | } 154 | 155 | .ztree li span.button.chk.checkbox_true_full_focus { 156 | background-position: -14px -14px 157 | } 158 | 159 | .ztree li span.button.chk.checkbox_true_part { 160 | background-position: -14px -28px 161 | } 162 | 163 | .ztree li span.button.chk.checkbox_true_part_focus { 164 | background-position: -14px -42px 165 | } 166 | 167 | .ztree li span.button.chk.checkbox_true_disable { 168 | background-position: -14px -56px 169 | } 170 | 171 | .ztree li span.button.chk.radio_false_full { 172 | background-position: -28px 0 173 | } 174 | 175 | .ztree li span.button.chk.radio_false_full_focus { 176 | background-position: -28px -14px 177 | } 178 | 179 | .ztree li span.button.chk.radio_false_part { 180 | background-position: -28px -28px 181 | } 182 | 183 | .ztree li span.button.chk.radio_false_part_focus { 184 | background-position: -28px -42px 185 | } 186 | 187 | .ztree li span.button.chk.radio_false_disable { 188 | background-position: -28px -56px 189 | } 190 | 191 | .ztree li span.button.chk.radio_true_full { 192 | background-position: -42px 0 193 | } 194 | 195 | .ztree li span.button.chk.radio_true_full_focus { 196 | background-position: -42px -14px 197 | } 198 | 199 | .ztree li span.button.chk.radio_true_part { 200 | background-position: -42px -28px 201 | } 202 | 203 | .ztree li span.button.chk.radio_true_part_focus { 204 | background-position: -42px -42px 205 | } 206 | 207 | .ztree li span.button.chk.radio_true_disable { 208 | background-position: -42px -56px 209 | } 210 | 211 | .ztree li span.button.switch { 212 | width: 18px; 213 | height: 18px 214 | } 215 | 216 | .ztree li span.button.root_open { 217 | background-position: -92px -54px 218 | } 219 | 220 | .ztree li span.button.root_close { 221 | background-position: -74px -54px 222 | } 223 | 224 | .ztree li span.button.roots_open { 225 | background-position: -92px 0 226 | } 227 | 228 | .ztree li span.button.roots_close { 229 | background-position: -74px 0 230 | } 231 | 232 | .ztree li span.button.center_open { 233 | background-position: -92px -18px 234 | } 235 | 236 | .ztree li span.button.center_close { 237 | background-position: -74px -18px 238 | } 239 | 240 | .ztree li span.button.bottom_open { 241 | background-position: -92px -36px 242 | } 243 | 244 | .ztree li span.button.bottom_close { 245 | background-position: -74px -36px 246 | } 247 | 248 | .ztree li span.button.noline_open { 249 | background-position: -92px -72px 250 | } 251 | 252 | .ztree li span.button.noline_close { 253 | background-position: -74px -72px 254 | } 255 | 256 | .ztree li span.button.root_docu { 257 | background: none; 258 | } 259 | 260 | .ztree li span.button.roots_docu { 261 | background-position: -56px 0 262 | } 263 | 264 | .ztree li span.button.center_docu { 265 | background-position: -56px -18px 266 | } 267 | 268 | .ztree li span.button.bottom_docu { 269 | background-position: -56px -36px 270 | } 271 | 272 | .ztree li span.button.noline_docu { 273 | background: none; 274 | } 275 | 276 | .ztree li span.button.ico_open { 277 | margin-right: 2px; 278 | background-position: -110px -16px; 279 | vertical-align: top; 280 | *vertical-align: middle 281 | } 282 | 283 | .ztree li span.button.ico_close { 284 | margin-right: 2px; 285 | background-position: -110px 0; 286 | vertical-align: top; 287 | *vertical-align: middle 288 | } 289 | 290 | .ztree li span.button.ico_docu { 291 | margin-right: 2px; 292 | background-position: -110px -32px; 293 | vertical-align: top; 294 | *vertical-align: middle 295 | } 296 | 297 | .ztree li span.button.edit { 298 | margin-right: 2px; 299 | background-position: -110px -48px; 300 | vertical-align: top; 301 | *vertical-align: middle 302 | } 303 | 304 | .ztree li span.button.remove { 305 | margin-right: 2px; 306 | background-position: -110px -64px; 307 | vertical-align: top; 308 | *vertical-align: middle 309 | } 310 | 311 | .ztree li span.button.ico_loading { 312 | margin-right: 2px; 313 | background: url(./img/loading.gif) no-repeat scroll 0 0 transparent; 314 | vertical-align: top; 315 | *vertical-align: middle 316 | } 317 | 318 | ul.tmpTargetzTree { 319 | background-color: #FFE6B0; 320 | opacity: 0.8; 321 | filter: alpha(opacity=80) 322 | } 323 | 324 | span.tmpzTreeMove_arrow { 325 | width: 16px; 326 | height: 16px; 327 | display: inline-block; 328 | padding: 0; 329 | margin: 2px 0 0 1px; 330 | border: 0 none; 331 | position: absolute; 332 | background-color: transparent; 333 | background-repeat: no-repeat; 334 | background-attachment: scroll; 335 | background-position: -110px -80px; 336 | background-image: url("./img/zTreeStandard.png"); 337 | *background-image: url("./img/zTreeStandard.gif") 338 | } 339 | 340 | ul.ztree.zTreeDragUL { 341 | margin: 0; 342 | padding: 0; 343 | position: absolute; 344 | width: auto; 345 | height: auto; 346 | overflow: hidden; 347 | background-color: #cfcfcf; 348 | border: 1px #00B83F dotted; 349 | opacity: 0.8; 350 | filter: alpha(opacity=80) 351 | } 352 | 353 | .zTreeMask { 354 | z-index: 10000; 355 | background-color: #cfcfcf; 356 | opacity: 0.0; 357 | filter: alpha(opacity=0); 358 | position: absolute 359 | } 360 | 361 | 362 | /* level style*/ 363 | 364 | 365 | /*.ztree li span.button.level0 { 366 | display:none; 367 | } 368 | .ztree li ul.level0 { 369 | padding:0; 370 | background:none; 371 | }*/ -------------------------------------------------------------------------------- /static/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/favicon.png -------------------------------------------------------------------------------- /static/img/1598332330111.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/img/1598332330111.png -------------------------------------------------------------------------------- /static/img/1598336180830.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/img/1598336180830.png -------------------------------------------------------------------------------- /static/img/1598336200327.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/img/1598336200327.png -------------------------------------------------------------------------------- /static/img/1598336279831.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/img/1598336279831.png -------------------------------------------------------------------------------- /static/img/1598336298921.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/img/1598336298921.png -------------------------------------------------------------------------------- /static/img/1598336344945.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/img/1598336344945.png -------------------------------------------------------------------------------- /static/img/1598336392121.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/img/1598336392121.png -------------------------------------------------------------------------------- /static/img/1598336407417.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/img/1598336407417.png -------------------------------------------------------------------------------- /static/img/1598336575586.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/img/1598336575586.png -------------------------------------------------------------------------------- /static/img/1598336656116.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/img/1598336656116.png -------------------------------------------------------------------------------- /static/img/1598336797303.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/img/1598336797303.png -------------------------------------------------------------------------------- /static/img/1598337728075.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/img/1598337728075.png -------------------------------------------------------------------------------- /static/img/1598337857863.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/img/1598337857863.png -------------------------------------------------------------------------------- /static/img/1598337995341.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/img/1598337995341.png -------------------------------------------------------------------------------- /static/img/1598338035523.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/img/1598338035523.png -------------------------------------------------------------------------------- /static/img/1598338151790.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/img/1598338151790.png -------------------------------------------------------------------------------- /static/img/1598338371371.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/img/1598338371371.png -------------------------------------------------------------------------------- /static/img/1598338394252.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/img/1598338394252.png -------------------------------------------------------------------------------- /static/img/1598338567997.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/img/1598338567997.png -------------------------------------------------------------------------------- /static/img/1598433181154.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/img/1598433181154.png -------------------------------------------------------------------------------- /static/img/Skull.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/img/Skull.png -------------------------------------------------------------------------------- /static/img/background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/img/background.jpg -------------------------------------------------------------------------------- /static/img/calendar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/img/calendar.png -------------------------------------------------------------------------------- /static/img/datagrid_icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/img/datagrid_icons.png -------------------------------------------------------------------------------- /static/img/deleting.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/img/deleting.gif -------------------------------------------------------------------------------- /static/img/demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/img/demo.gif -------------------------------------------------------------------------------- /static/img/dotted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/img/dotted.png -------------------------------------------------------------------------------- /static/img/giphy.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/img/giphy.webp -------------------------------------------------------------------------------- /static/img/grip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/img/grip.png -------------------------------------------------------------------------------- /static/img/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/img/home.png -------------------------------------------------------------------------------- /static/img/loading0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/img/loading0.gif -------------------------------------------------------------------------------- /static/img/loading1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/img/loading1.gif -------------------------------------------------------------------------------- /static/img/next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/img/next.png -------------------------------------------------------------------------------- /static/img/previous.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/img/previous.png -------------------------------------------------------------------------------- /static/img/snext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/img/snext.png -------------------------------------------------------------------------------- /static/img/sprevious.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/img/sprevious.png -------------------------------------------------------------------------------- /static/img/structure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/img/structure.png -------------------------------------------------------------------------------- /static/img/th.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CapAllen/Mini_Data_Middle_Plateform/23b77766cfefea03c73a7d3131fbf197c0fb2c12/static/img/th.png -------------------------------------------------------------------------------- /static/js/2html.js: -------------------------------------------------------------------------------- 1 | //�Ƿ���ʾ������ 2 | var showNavBar = true; 3 | //�Ƿ�չ�������� 4 | var expandNavBar = true; 5 | 6 | $(document).ready(function(){ 7 | var h1s = $("body").find("h1"); 8 | var h2s = $("body").find("h2"); 9 | var h3s = $("body").find("h3"); 10 | var h4s = $("body").find("h4"); 11 | var h5s = $("body").find("h5"); 12 | var h6s = $("body").find("h6"); 13 | 14 | var links = document.links; 15 | for (var i = 0; i < links.length; i++) { 16 | if (!links[i].target) { 17 | if ( 18 | links[i].hostname !== window.location.hostname || 19 | /\.(?!html?)([a-z]{0,3}|[a-zt]{0,4})$/.test(links[i].pathname) 20 | ) { 21 | links[i].target = '_blank'; 22 | } 23 | } 24 | } 25 | 26 | var headCounts = [h1s.length, h2s.length, h3s.length, h4s.length, h5s.length, h6s.length]; 27 | var vH1Tag = null; 28 | var vH2Tag = null; 29 | for(var i = 0; i < headCounts.length; i++){ 30 | if(headCounts[i] > 0){ 31 | if(vH1Tag == null){ 32 | vH1Tag = 'h' + (i + 1); 33 | }else{ 34 | vH2Tag = 'h' + (i + 1); 35 | } 36 | } 37 | } 38 | if(vH1Tag == null){ 39 | return; 40 | } 41 | 42 | $("body").prepend('
' + 43 | 44 | '

' + 45 | '' + 46 | '

' + 47 | '
' + 48 | '
' ); 49 | 50 | var vH1Index = 0; 51 | var vH2Index = 0; 52 | var menuIndex = 0; 53 | $("body").find("h1,h2,h3,h4,h5,h6").each(function(i,item){ 54 | var id = ''; 55 | // var name = ''; 56 | var tag = $(item).get(0).tagName.toLowerCase(); 57 | //不同标题,不同 className,不同字体大小 58 | var className = ''; 59 | if (tag == vH1Tag) { 60 | // id = name = ++vH1Index; 61 | // name = id; 62 | vH2Index = 0; 63 | className = 'item_h1'; 64 | } else if (tag == vH2Tag) { 65 | // id = vH1Index + '_' + ++vH2Index; 66 | // name = vH1Index + '.' + vH2Index; 67 | className = 'item_h2'; 68 | } 69 | //修改 id 生成策略 70 | id = "_" + menuIndex; 71 | menuIndex++; 72 | 73 | $(item).attr("id","wow"+id); 74 | $(item).addClass("wow_head"); 75 | $("#AnchorContent").css('max-height', ($(window).height() - 80) + 'px'); 76 | $("#AnchorContent").append('
  • '+""+""+$(this).text()+'
  • '); 77 | }); 78 | 79 | 80 | $(".anchor-link").click(function(){ 81 | $("html,body").animate({scrollTop: $($(this).attr("link")).offset().top}, 500); 82 | }); 83 | 84 | var headerNavs = $(".BlogAnchor li .nav_item"); 85 | var headerTops = []; 86 | $(".wow_head").each(function(i, n){ 87 | headerTops.push($(n).offset().top); 88 | }); 89 | $(window).scroll(function(){ 90 | var scrollTop = $(window).scrollTop(); 91 | $.each(headerTops, function(i, n){ 92 | var distance = n - scrollTop; 93 | if(distance >= 0){ 94 | $(".BlogAnchor li .nav_item.current").removeClass('current'); 95 | $(headerNavs[i]).addClass('current'); 96 | return false; 97 | } 98 | }); 99 | }); 100 | 101 | if(!showNavBar){ 102 | $('.BlogAnchor').hide(); 103 | } 104 | if(!expandNavBar){ 105 | $(this).html("目录▼"); 106 | $(this).attr({"title":"展开"}); 107 | $("#AnchorContent").hide(); 108 | } 109 | }); 110 | 111 | 112 | $(window).resize(function() { 113 | $("#AnchorContent").css('max-height', ($(window).height() - 80) + 'px'); 114 | }); 115 | 116 | 117 | //����title��icoͼ�� 118 | var ico_link = ""; 119 | $("head").prepend(ico_link); 120 | 121 | -------------------------------------------------------------------------------- /static/js/base-loading.js: -------------------------------------------------------------------------------- 1 | //在页面未加载完毕之前显示的loading Html自定义内容 2 | var _LoadingHtml = ''; 3 | //呈现loading效果 4 | document.write(_LoadingHtml); 5 | 6 | //移除loading效果 7 | function completeLoading() { 8 | document.getElementById("loadingDiv").style.display = "none"; 9 | } 10 | //展示loading效果 11 | function showLoading() { 12 | document.getElementById("loadingDiv").style.display = "block"; 13 | } -------------------------------------------------------------------------------- /static/js/colResizable-1.5.min.js: -------------------------------------------------------------------------------- 1 | // colResizable 1.5 - a jQuery plugin by Alvaro Prieto Lauroba http://www.bacubacu.com/colresizable/ 2 | (function($){var d=$(document),h=$("head"),drag=null,tables=[],count=0,ID="id",PX="px",SIGNATURE="JColResizer",FLEX="JCLRFlex",I=parseInt,M=Math,ie=navigator.userAgent.indexOf('Trident/4.0')>0,S;try{S=sessionStorage}catch(e){};h.append("");var init=function(tb,options){var t=$(tb);t.opt=options;if(t.opt.disable)return destroy(t);var id=t.id=t.attr(ID)||SIGNATURE+ count++;t.p=t.opt.postbackSafe;if(!t.is("table")||tables[id]&&!t.opt.partialRefresh)return;t.addClass(SIGNATURE).attr(ID,id).before('
    ');t.g=[];t.c=[];t.w=t.width();t.gc=t.prev();t.f=t.opt.fixed;if(options.marginLeft)t.gc.css("marginLeft",options.marginLeft);if(options.marginRight)t.gc.css("marginRight",options.marginRight);t.cs=I(ie?tb.cellSpacing||tb.currentStyle.borderSpacing:t.css('border-spacing'))||2;t.b=I(ie?tb.border||tb.currentStyle.borderLeftWidth:t.css('border-left-width'))||1;tables[id]=t;createGrips(t)},destroy=function(t){var id=t.attr(ID),t=tables[id];if(!t||!t.is("table"))return;t.removeClass(SIGNATURE+" "+FLEX).gc.remove();delete tables[id]},createGrips=function(t){var th=t.find(">thead>tr>th,>thead>tr>td");if(!th.length)th=t.find(">tbody>tr:first>th,>tr:first>th,>tbody>tr:first>td, >tr:first>td");th=th.filter(":visible");t.cg=t.find("col");t.ln=th.length;if(t.p&&S&&S[t.id])memento(t,th);th.each(function(i){var c=$(this),g=$(t.gc.append('
    ')[0].lastChild);g.append(t.opt.gripInnerHtml).append('
    ');if(i==t.ln-1){g.addClass("JCLRLastGrip");if(t.f)g.html("")};g.bind('touchstart mousedown',onGripMouseDown);g.t=t;g.i=i;g.c=c;c.w=c.width();t.g.push(g);t.c.push(c);c.width(c.w).removeAttr("width");g.data(SIGNATURE,{i:i,t:t.attr(ID),last:i==t.ln-1})});t.cg.removeAttr("width");syncGrips(t);t.find('td, th').not(th).not('table th, table td').each(function(){$(this).removeAttr('width')});if(!t.f)t.removeAttr('width').addClass(FLEX)},memento=function(t,th){var w,m=0,i=0,aux=[],tw;if(th){t.cg.removeAttr("width");if(t.opt.flush){S[t.id]="";return};w=S[t.id].split(";");tw=w[t.ln+1];if(!t.f&&tw)t.width(tw);for(;i*{cursor:"+t.opt.dragCursor+"!important}");g.addClass(t.opt.draggingClass);drag=g;if(t.c[o.i].l)for(var i=0,c;i<'col-sm-12 col-md-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>", 29 | renderer: "bootstrap" 30 | }); 31 | a.extend(d.ext.classes, { sWrapper: "dataTables_wrapper dt-bootstrap4", sFilterInput: "form-control form-control-sm", sLengthSelect: "custom-select custom-select-sm form-control form-control-sm", sProcessing: "dataTables_processing card", sPageButton: "paginate_button page-item" }); 32 | d.ext.renderer.pageButton.bootstrap = function(b, l, v, w, m, r) { 33 | var k = new d.Api(b), 34 | x = b.oClasses, 35 | n = b.oLanguage.oPaginate, 36 | y = b.oLanguage.oAria.paginate || {}, 37 | g, h, t = 0, 38 | u = function(c, d) { 39 | var e, l = function(b) { 40 | b.preventDefault(); 41 | a(b.currentTarget).hasClass("disabled") || k.page() == b.data.action || k.page(b.data.action).draw("page") 42 | }; 43 | var q = 0; 44 | for (e = d.length; q < e; q++) { 45 | var f = d[q]; 46 | if (a.isArray(f)) u(c, f); 47 | else { 48 | h = g = ""; 49 | switch (f) { 50 | case "ellipsis": 51 | g = "…"; 52 | h = "disabled"; break; 53 | case "first": 54 | g = n.sFirst; 55 | h = f + (0 < m ? "" : " disabled"); break; 56 | case "previous": 57 | g = n.sPrevious; 58 | h = f + (0 < m ? "" : " disabled"); break; 59 | case "next": 60 | g = n.sNext; 61 | h = f + (m < r - 1 ? "" : " disabled"); break; 62 | case "last": 63 | g = n.sLast; 64 | h = f + (m < r - 1 ? "" : " disabled"); break; 65 | default: 66 | g = f + 1, h = m === f ? "active" : "" } 67 | if (g) { 68 | var p = 69 | a("
  • ", { "class": x.sPageButton + " " + h, id: 0 === v && "string" === typeof f ? b.sTableId + "_" + f : null }).append(a("", { href: "#", "aria-controls": b.sTableId, "aria-label": y[f], "data-dt-idx": t, tabindex: b.iTabIndex, "class": "page-link" }).html(g)).appendTo(c); 70 | b.oApi._fnBindAction(p, { action: f }, l); 71 | t++ 72 | } 73 | } 74 | } 75 | }; 76 | try { var p = a(l).find(c.activeElement).data("dt-idx") } catch (z) {} 77 | u(a(l).empty().html('
      ').children("ul"), w); 78 | p !== e && a(l).find("[data-dt-idx=" + p + "]").focus() 79 | }; 80 | return d 81 | }); -------------------------------------------------------------------------------- /static/js/jquery.paginate.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | $.fn.paginate = function(options) { 3 | var opts = $.extend({}, $.fn.paginate.defaults, options); 4 | return this.each(function() { 5 | $this = $(this); 6 | var o = $.meta ? $.extend({}, opts, $this.data()) : opts; 7 | var selectedpage = o.start; 8 | $.fn.draw(o,$this,selectedpage); 9 | }); 10 | }; 11 | var outsidewidth_tmp = 0; 12 | var insidewidth = 0; 13 | var bName = navigator.appName; 14 | var bVer = navigator.appVersion; 15 | if(bVer.indexOf('MSIE 7.0') > 0) 16 | var ver = "ie7"; 17 | $.fn.paginate.defaults = { 18 | count : 5, 19 | start : 12, 20 | display : 5, 21 | border : true, 22 | border_color : '#fff', 23 | text_color : '#8cc59d', 24 | background_color : 'black', 25 | border_hover_color : '#fff', 26 | text_hover_color : '#fff', 27 | background_hover_color : '#fff', 28 | rotate : true, 29 | images : true, 30 | mouse : 'slide', 31 | onChange : function(){return false;} 32 | }; 33 | $.fn.draw = function(o,obj,selectedpage){ 34 | if(o.display > o.count) 35 | o.display = o.count; 36 | $this.empty(); 37 | if(o.images){ 38 | var spreviousclass = 'jPag-sprevious-img'; 39 | var previousclass = 'jPag-previous-img'; 40 | var snextclass = 'jPag-snext-img'; 41 | var nextclass = 'jPag-next-img'; 42 | } 43 | else{ 44 | var spreviousclass = 'jPag-sprevious'; 45 | var previousclass = 'jPag-previous'; 46 | var snextclass = 'jPag-snext'; 47 | var nextclass = 'jPag-next'; 48 | } 49 | var _first = $(document.createElement('a')).addClass('jPag-first').html('First'); 50 | 51 | if(o.rotate){ 52 | if(o.images) var _rotleft = $(document.createElement('span')).addClass(spreviousclass); 53 | else var _rotleft = $(document.createElement('span')).addClass(spreviousclass).html('«'); 54 | } 55 | 56 | var _divwrapleft = $(document.createElement('div')).addClass('jPag-control-back'); 57 | _divwrapleft.append(_first).append(_rotleft); 58 | 59 | var _ulwrapdiv = $(document.createElement('div')).css('overflow','hidden'); 60 | var _ul = $(document.createElement('ul')).addClass('jPag-pages') 61 | var c = (o.display - 1) / 2; 62 | var first = selectedpage - c; 63 | var selobj; 64 | for(var i = 0; i < o.count; i++){ 65 | var val = i+1; 66 | if(val == selectedpage){ 67 | var _obj = $(document.createElement('li')).html(''+val+''); 68 | selobj = _obj; 69 | _ul.append(_obj); 70 | } 71 | else{ 72 | var _obj = $(document.createElement('li')).html(''+ val +''); 73 | _ul.append(_obj); 74 | } 75 | } 76 | _ulwrapdiv.append(_ul); 77 | 78 | if(o.rotate){ 79 | if(o.images) var _rotright = $(document.createElement('span')).addClass(snextclass); 80 | else var _rotright = $(document.createElement('span')).addClass(snextclass).html('»'); 81 | } 82 | 83 | var _last = $(document.createElement('a')).addClass('jPag-last').html('Last'); 84 | var _divwrapright = $(document.createElement('div')).addClass('jPag-control-front'); 85 | _divwrapright.append(_rotright).append(_last); 86 | 87 | //append all: 88 | $this.addClass('jPaginate').append(_divwrapleft).append(_ulwrapdiv).append(_divwrapright); 89 | 90 | if(!o.border){ 91 | if(o.background_color == 'none') var a_css = {'color':o.text_color}; 92 | else var a_css = {'color':o.text_color,'background-color':o.background_color}; 93 | if(o.background_hover_color == 'none') var hover_css = {'color':o.text_hover_color}; 94 | else var hover_css = {'color':o.text_hover_color,'background-color':o.background_hover_color}; 95 | } 96 | else{ 97 | if(o.background_color == 'none') var a_css = {'color':o.text_color,'border':'1px solid '+o.border_color}; 98 | else var a_css = {'color':o.text_color,'background-color':o.background_color,'border':'1px solid '+o.border_color}; 99 | if(o.background_hover_color == 'none') var hover_css = {'color':o.text_hover_color,'border':'1px solid '+o.border_hover_color}; 100 | else var hover_css = {'color':o.text_hover_color,'background-color':o.background_hover_color,'border':'1px solid '+o.border_hover_color}; 101 | } 102 | 103 | $.fn.applystyle(o,$this,a_css,hover_css,_first,_ul,_ulwrapdiv,_divwrapright); 104 | //calculate width of the ones displayed: 105 | var outsidewidth = outsidewidth_tmp - _first.parent().width() -3; 106 | if(ver == 'ie7'){ 107 | _ulwrapdiv.css('width',outsidewidth+72+'px'); 108 | _divwrapright.css('left',outsidewidth_tmp+6+72+'px'); 109 | } 110 | else{ 111 | _ulwrapdiv.css('width',outsidewidth+'px'); 112 | _divwrapright.css('left',outsidewidth_tmp+6+'px'); 113 | } 114 | 115 | if(o.rotate){ 116 | _rotright.hover( 117 | function() { 118 | thumbs_scroll_interval = setInterval( 119 | function() { 120 | var left = _ulwrapdiv.scrollLeft() + 1; 121 | _ulwrapdiv.scrollLeft(left); 122 | }, 123 | 20 124 | ); 125 | }, 126 | function() { 127 | clearInterval(thumbs_scroll_interval); 128 | } 129 | ); 130 | _rotleft.hover( 131 | function() { 132 | thumbs_scroll_interval = setInterval( 133 | function() { 134 | var left = _ulwrapdiv.scrollLeft() - 1; 135 | _ulwrapdiv.scrollLeft(left); 136 | }, 137 | 20 138 | ); 139 | }, 140 | function() { 141 | clearInterval(thumbs_scroll_interval); 142 | } 143 | ); 144 | if(o.mouse == 'press'){ 145 | _rotright.mousedown( 146 | function() { 147 | thumbs_mouse_interval = setInterval( 148 | function() { 149 | var left = _ulwrapdiv.scrollLeft() + 5; 150 | _ulwrapdiv.scrollLeft(left); 151 | }, 152 | 20 153 | ); 154 | } 155 | ).mouseup( 156 | function() { 157 | clearInterval(thumbs_mouse_interval); 158 | } 159 | ); 160 | _rotleft.mousedown( 161 | function() { 162 | thumbs_mouse_interval = setInterval( 163 | function() { 164 | var left = _ulwrapdiv.scrollLeft() - 5; 165 | _ulwrapdiv.scrollLeft(left); 166 | }, 167 | 20 168 | ); 169 | } 170 | ).mouseup( 171 | function() { 172 | clearInterval(thumbs_mouse_interval); 173 | } 174 | ); 175 | } 176 | else{ 177 | _rotleft.click(function(e){ 178 | var width = outsidewidth - 10; 179 | var left = _ulwrapdiv.scrollLeft() - width; 180 | _ulwrapdiv.animate({scrollLeft: left +'px'}); 181 | }); 182 | 183 | _rotright.click(function(e){ 184 | var width = outsidewidth - 10; 185 | var left = _ulwrapdiv.scrollLeft() + width; 186 | _ulwrapdiv.animate({scrollLeft: left +'px'}); 187 | }); 188 | } 189 | } 190 | 191 | //first and last: 192 | _first.click(function(e){ 193 | _ulwrapdiv.animate({scrollLeft: '0px'}); 194 | _ulwrapdiv.find('li').eq(0).click(); 195 | }); 196 | _last.click(function(e){ 197 | _ulwrapdiv.animate({scrollLeft: insidewidth +'px'}); 198 | _ulwrapdiv.find('li').eq(o.count - 1).click(); 199 | }); 200 | 201 | //click a page 202 | _ulwrapdiv.find('li').click(function(e){ 203 | selobj.html(''+selobj.find('.jPag-current').html()+''); 204 | var currval = $(this).find('a').html(); 205 | $(this).html(''+currval+''); 206 | selobj = $(this); 207 | $.fn.applystyle(o,$(this).parent().parent().parent(),a_css,hover_css,_first,_ul,_ulwrapdiv,_divwrapright); 208 | var left = (this.offsetLeft) / 2; 209 | var left2 = _ulwrapdiv.scrollLeft() + left; 210 | var tmp = left - (outsidewidth / 2); 211 | if(ver == 'ie7') 212 | _ulwrapdiv.animate({scrollLeft: left + tmp - _first.parent().width() + 52 + 'px'}); 213 | else 214 | _ulwrapdiv.animate({scrollLeft: left + tmp - _first.parent().width() + 'px'}); 215 | o.onChange(currval); 216 | }); 217 | 218 | var last = _ulwrapdiv.find('li').eq(o.start-1); 219 | last.attr('id','tmp'); 220 | var left = document.getElementById('tmp').offsetLeft / 2; 221 | last.removeAttr('id'); 222 | var tmp = left - (outsidewidth / 2); 223 | if(ver == 'ie7') _ulwrapdiv.animate({scrollLeft: left + tmp - _first.parent().width() + 52 + 'px'}); 224 | else _ulwrapdiv.animate({scrollLeft: left + tmp - _first.parent().width() + 'px'}); 225 | } 226 | 227 | $.fn.applystyle = function(o,obj,a_css,hover_css,_first,_ul,_ulwrapdiv,_divwrapright){ 228 | obj.find('a').css(a_css); 229 | obj.find('span.jPag-current').css(hover_css); 230 | obj.find('a').hover( 231 | function(){ 232 | $(this).css(hover_css); 233 | }, 234 | function(){ 235 | $(this).css(a_css); 236 | } 237 | ); 238 | obj.css('padding-left',_first.parent().width() + 5 +'px'); 239 | insidewidth = 0; 240 | 241 | obj.find('li').each(function(i,n){ 242 | if(i == (o.display-1)){ 243 | outsidewidth_tmp = this.offsetLeft + this.offsetWidth ; 244 | } 245 | insidewidth += this.offsetWidth; 246 | }) 247 | _ul.css('width',insidewidth+'px'); 248 | } 249 | })(jQuery); -------------------------------------------------------------------------------- /static/js/table_related.js: -------------------------------------------------------------------------------- 1 | // $(function() { 2 | // //点击搜索,把sort,del,update信息都设为none 3 | // // $('#search').bind('click', function() { 4 | // // expo_name = $('input[name="ExpoName"]').val(); 5 | // // start_date = $('input[name="StartDate"]').val(); 6 | // // city_name = $('input[name="CityName"]').val(); 7 | // // sid = $('input[name="Sid"]').val(); 8 | // // itemid = $('input[name="Itemid"]').val(); 9 | // // unit_name = $('input[name="UnitName"]').val(); 10 | // // unit_code = $('input[name="UnitCode"]').val(); 11 | // // $("#search_info").val(expo_name + '&' + start_date + '&' + city_name + '&' + sid + '&' + itemid + '&' + unit_name + '&' + unit_code); //为排序信息输入框赋值,以便后续翻页时取得该值 12 | // // $("#update_info").val('none'); 13 | // // $("#del_info").val('none'); 14 | // // $("#sort_info").val('none'); 15 | // // $("#add_info").val('none'); 16 | // // show(); 17 | // // return false; 18 | // // }); 19 | 20 | 21 | // /*点击排序,把search,del,update信息都设为none 22 | // 排序有三种状态:无序,升序,降序,默认为无序,第一次点击为升序,第二次点击为降序,第三次点击为无序*/ 23 | // $('th>a').bind('click', function() { 24 | // sort = $(this).attr('sort'); //首先取出上次的排序方式 25 | // //alert(sort); 26 | // if (sort == '') { 27 | // $(this).attr('sort', 'asc'); 28 | // $(this).next().attr('class', "datagrid-sort-asc"); 29 | // } 30 | // if (sort == 'asc') { 31 | // $(this).attr('sort', 'desc'); 32 | // $(this).next().attr('class', "datagrid-sort-desc"); 33 | // } 34 | // if (sort == 'desc') { 35 | // $(this).attr('sort', ''); 36 | // $(this).next().attr('class', "datagrid-sort"); 37 | // } 38 | // sort = $(this).attr('sort'); 39 | // //alert(sort); 40 | // if (sort != '') { 41 | // //alert(sort); 42 | // keyword = $(this).attr('name'); 43 | // //alert(sort+keyword); 44 | // $("#sort_info").val(keyword + '&' + sort); //为排序信息输入框赋值,以便后续翻页时取得该值 45 | // $("#update_info").val('none'); 46 | // $("#del_info").val('none'); 47 | // $("#search_info").val('none'); 48 | // $("#add_info").val('none'); 49 | // show(); 50 | // } else { 51 | // $("#sort_info").val('none'); 52 | // } 53 | // }); 54 | 55 | // //页面加载时调用show()获取数据,此时搜索关键字全为空,所以后台返回全部数据 56 | // show(); 57 | 58 | // //更新操作,input change事件,注册为document(也可以注册为table的事件)的事件是防止表格不存在,因为因为表格是动态生成的 59 | // $('#event-info').on('change', "td>input", function() { 60 | // $(this).css("background-color", "#FFFFCC"); 61 | // id = $(this).attr('id'); 62 | // var value = document.getElementById(id).value; 63 | // //alert(id+value); 64 | // $("#update_info").val(id + '&' + value); //为修改信息输入框赋值,以便后续翻页时取得该值 65 | // $("#del_info").val('none'); 66 | // $("#add_info").val('none'); 67 | // current_page = $('#current_page').val(); 68 | // //alert(current_page); 69 | // show(current_page); 70 | // }); 71 | 72 | // //点击删除 73 | // $(document).on('click', "tbody td>a", function() { 74 | // //$('td a').bind('click', function(){ 75 | // id = $(this).attr('id'); //被删除数据的id 76 | // alert(id); 77 | // $("#del_info").val(id); //为删除信息输入框赋值 78 | // $("#update_info").val('none'); 79 | // $("#add_info").val('none'); 80 | // //alert($("#sort_info").val()); 81 | // current_page = $('#current_page').val(); 82 | // show(current_page); 83 | // }); 84 | 85 | // //添加一行 86 | // $('#addRow').bind('click', function() { 87 | // addRow(); 88 | // }); 89 | 90 | // $(document).on('click', "#addSure", function() { 91 | // //$('td a').bind('click', function(){ 92 | // itemid = $('input[name="addItemid"]').val(); 93 | // sid = $('input[name="addSid"]').val(); 94 | // expo_name = $('input[name="addExpoName"]').val(); 95 | // start_date = $('input[name="addStartDate"]').val(); 96 | // end_date = $('input[name="addEndDate"]').val(); 97 | // city_name = $('input[name="addCityName"]').val(); 98 | // unit_name = $('input[name="addUnitName"]').val(); 99 | // unit_code = $('input[name="addUnitCode"]').val(); 100 | // site = $('input[name="addSite"]').val(); 101 | // exhibitor = $('input[name="addExhibitor"]').val(); 102 | // visitor = $('input[name="addVisitor"]').val(); 103 | // expo_area = $('input[name="addExpoArea"]').val(); 104 | // get_date = $('input[name="addGetDate"]').val(); 105 | // $("#add_info").val(itemid + '&' + sid + '&' + expo_name + '&' + unit_code + '&' + unit_name + '&' + city_name + '&' + start_date + '&' + end_date + '&' + site + '&' + exhibitor + '&' + visitor + '&' + expo_area + '&' + get_date); //为排序信息输入框赋值,以便后续翻页时取得该值 106 | // alert($("#add_info").val()); 107 | // $("#update_info").val('none'); 108 | // $("#del_info").val('none'); 109 | // current_page = $('#current_page').val(); 110 | // show(current_page); 111 | // }); 112 | 113 | // //根据复选框状态进行删除 114 | // $('#mutiple_del').bind('click', function() { 115 | // var ids = ""; 116 | // $('input[type="checkbox"][name="select"]:checked').each(function() { 117 | // ids = ids + "&" + $(this).val(); 118 | // $(this).css("background-color", "#FFFFCC"); 119 | // }); 120 | // ids = ids.substring(1, ids.Length); 121 | // if (ids) { 122 | // alert(ids); 123 | // //$("#del_info").attr("value",ids); 124 | // $("#del_info").val(ids); 125 | // $("#update_info").val('none'); 126 | // //$("#search_info").val(); 127 | // current_page = $('#current_page').val(); 128 | // show(current_page); 129 | // } else { 130 | // alert('请至少选择一项!'); 131 | // return false; 132 | // } 133 | // }); 134 | 135 | // //选中行变色 136 | // $('#event-info').on('change', "td>span>input", function() { 137 | // $(this).parent().parent().parent().toggleClass("tr_select"); 138 | // }); 139 | 140 | 141 | // //提交所有参数到后台,后台根据参数状态选择对应的操作 142 | // function show(page) { 143 | // $.ajax({ 144 | // type: 'GET', 145 | // url: '/getargs', 146 | // data: { 147 | // Page: page, 148 | // SearchInfo: $("#search_info").val(), //包括expo_name,start_date,city_name,sid,itemid,unit_name,unit_code 149 | // SortInfo: $("#sort_info").val(), //包括keyword,sort 150 | // UpdateInfo: $("#update_info").val(), //包括id,keyword,value 151 | // DelInfo: $("#del_info").val(), //包括id 152 | // AddInfo: $("#add_info").val() //包括包括itemid,sid,expo_name,unit_code,unit_name,unit_name_en,start_date,end_date,city_name,organizer,site,exhibitor,visitor,expo_area,get_date 153 | // }, 154 | // success: function(data) { 155 | // //alert('success'); 156 | // events = data.result.splice(1); //result的第一项是页数信息,从第二项开始才是event数据 157 | // pagination = data.result[0]; 158 | // total_num = pagination.total_num; 159 | // num = pagination.num; 160 | // total_pages = pagination.total_pages; 161 | // current_page = pagination.current_page; 162 | // $("#current_page").val(current_page); 163 | // var $table = $('#event-info'); 164 | // $table.empty(); 165 | // createTable(events); //创建表格 166 | // createPage(total_pages, current_page); //创建分页 167 | // showNum(total_num, num); 168 | // showColumn(); 169 | // } 170 | // }); 171 | // } 172 | 173 | // //显示数据总条数和符合查询条件的条数 174 | // function showNum(totalNum, num) { 175 | // $("#showNum").html('总数量' + totalNum + ',符合查询条件的数量' + num); 176 | // } 177 | 178 | // //创建分页 179 | // function createPage(count, index) { 180 | // $("[id*='paginate']").paginate({ 181 | // count: count, 182 | // start: index, 183 | // display: 9, 184 | // border: true, 185 | // border_color: '#fff', 186 | // text_color: '#fff', 187 | // background_color: 'black', 188 | // border_hover_color: '#ccc', 189 | // text_hover_color: '#000', 190 | // background_hover_color: '#fff', 191 | // images: false, 192 | // mouse: 'press', 193 | // onChange: function(page) { 194 | // //$('._current', '#paginationdemo').removeClass('_current').hide(); 195 | // //$('#p' + page).addClass('_current').show(); 196 | // show(page); 197 | // } 198 | // }); 199 | // } 200 | 201 | 202 | // //创建表格 203 | // function createTable(data) { 204 | // for (i in data) { 205 | // //for (var i=1;i" + 208 | // "" + 209 | // "" + i + "" + 210 | // "" + 211 | // "" + "" + "" + 212 | // "" + "" + "" + 213 | // "" + "" + "" + 214 | // "" + "" + "" + 215 | // "" + "" + "" + 216 | // "" + "" + "" + 217 | // "" + "" + "" + 218 | // "" + "" + "" + 219 | // "" + "" + "" + 220 | // "" + "" + "" + 221 | // "" + "" + "" + 222 | // "" + "" + "" + 223 | // "" + "" + "" + 224 | // "" + 'del' + "" + 225 | // ""); 226 | // } 227 | // } 228 | 229 | // //添加一行 230 | // function addRow() { 231 | // $('#event-info').append( 232 | // "" + 233 | // "" + 234 | // "" + 235 | // "" + "" + "" + 236 | // "" + "" + "" + 237 | // "" + "" + "" + 238 | // "" + "" + "" + 239 | // "" + "" + "" + 240 | // "" + "" + "" + 241 | // "" + "" + "" + 242 | // "" + "" + "" + 243 | // "" + "" + "" + 244 | // "" + "" + "" + 245 | // "" + "" + "" + 246 | // "" + "" + "" + 247 | // "" + "" + "" + 248 | // "" + 'add' + "" + 249 | // ""); 250 | // } 251 | 252 | // //拖动改变表格宽度 253 | // $(function() { 254 | // $("#events").colResizable({ 255 | // liveDrag: true, 256 | // gripInnerHtml: "
      ", 257 | // draggingClass: "dragging" 258 | // }); 259 | // }); 260 | 261 | // //初始化选择框 262 | // $(window).on('load', function() { 263 | // $('.selectpicker').selectpicker({ 264 | // 'selectedText': 'cat' 265 | // }); 266 | // }); 267 | 268 | // //把选中的列赋值给hidden_column输入框 269 | // $("#id_select").change(function() { 270 | // var column = $("#id_select").val(); 271 | // select_column = column.toString().split(','); 272 | // $("#hidden_column").val(select_column); 273 | // showColumn(); 274 | // }); 275 | 276 | // //根据hidden_column输入框的值显示或隐藏列 277 | // function showColumn() { 278 | // var column = $("#hidden_column").val(); 279 | // if (column != '') { 280 | // select_column = column.toString().split(','); 281 | // //alert(select_column); 282 | // $('table tr').find("th").show(); 283 | // $('table tr').find("td").show(); 284 | // $.each(select_column, function(n, value) { 285 | // $('table tr').find("th:eq(" + value + ")").hide(); 286 | // $('table tr').find("td:eq(" + value + ")").hide(); 287 | // }); 288 | // } 289 | // } 290 | 291 | // }); -------------------------------------------------------------------------------- /static/js/toc_conf.js: -------------------------------------------------------------------------------- 1 | var jquery_ztree_toc_opts = { 2 | debug:false, 3 | is_auto_number:true, 4 | documment_selector:'.markdown-body', 5 | ztreeStyle: { 6 | width:'326px', 7 | overflow: 'auto', 8 | position: 'fixed', 9 | 'z-index': 2147483647, 10 | border: '0px none', 11 | left: '0px', 12 | top: '0px', 13 | // 'overflow-x': 'hidden', 14 | 'height': $(window).height() + 'px' 15 | } 16 | } 17 | var markdown_panel_style = { 18 | 'width':'70%', 19 | 'margin-left':'25%' 20 | }; -------------------------------------------------------------------------------- /static/js/ztree_toc.js: -------------------------------------------------------------------------------- 1 | /*! ztree_toc - v0.2.2 - 2014-02-08 2 | * https://github.com/i5ting/jQuery.zTree_Toc.js 3 | * Copyright (c) 2014 alfred.sang; Licensed MIT */ 4 | function encode_id_with_array(opts, arr) { 5 | var result = 0; 6 | for (var z = 0; z < arr.length; z++) { 7 | result += factor(opts, arr.length - z, arr[z]); 8 | } 9 | 10 | return result; 11 | } 12 | 13 | 14 | /** 15 | * 1.1.1 = 1*100*100 + 1*100 + 1 16 | * 1.2.2 = 1*100*100 + 2*100 + 3 17 | * 18 | * 1 = 0*100 +1 19 | 20 | 1,1 = 100 21 | 22 | */ 23 | function get_parent_id_with_array(opts, arr) { 24 | var result_arr = []; 25 | 26 | for (var z = 0; z < arr.length; z++) { 27 | result_arr.push(arr[z]); 28 | } 29 | 30 | result_arr.pop(); 31 | 32 | var result = 0; 33 | for (var z = 0; z < result_arr.length; z++) { 34 | result += factor(opts, result_arr.length - z, result_arr[z]); 35 | } 36 | 37 | return result; 38 | } 39 | 40 | function factor(opts, count, current) { 41 | if (1 == count) { 42 | return current; 43 | } 44 | 45 | var str = ''; 46 | for (var i = count - 1; i > 0; i--) { 47 | str += current * opts.step + '*'; 48 | } 49 | 50 | return eval(str + '1'); 51 | } 52 | 53 | ; 54 | (function($) { 55 | /* 56 | * 根据header创建目录内容 57 | */ 58 | function create_toc(opts) { 59 | $(opts.documment_selector).find(':header').each(function() { 60 | var level = parseInt(this.nodeName.substring(1), 10); 61 | 62 | _rename_header_content(opts, this, level); 63 | 64 | _add_header_node(opts, $(this)); 65 | }); //end each 66 | } 67 | 68 | /* 69 | * 渲染ztree 70 | */ 71 | function render_with_ztree(opts) { 72 | var t = $(opts._zTree); 73 | t = $.fn.zTree.init(t, opts.ztreeSetting, opts._header_nodes).expandAll(opts.is_expand_all); 74 | // alert(opts._headers * 88); 75 | // $(opts._zTree).height(opts._headers * 33 + 33); 76 | 77 | $(opts._zTree).css(opts.ztreeStyle); 78 | } 79 | 80 | /* 81 | * 将已有header编号,并重命名 82 | */ 83 | function _rename_header_content(opts, header_obj, level) { 84 | if (opts._headers.length == level) { 85 | opts._headers[level - 1]++; 86 | } else if (opts._headers.length > level) { 87 | opts._headers = opts._headers.slice(0, level); 88 | opts._headers[level - 1]++; 89 | } else if (opts._headers.length < level) { 90 | for (var i = 0; i < (level - opts._headers.length); i++) { 91 | // console.log('push 1'); 92 | opts._headers.push(1); 93 | } 94 | } 95 | 96 | if (opts.is_auto_number == true) { 97 | //另存为的文件里会有编号,所以有编号的就不再重新替换 98 | if ($(header_obj).text().indexOf(opts._headers.join('.')) != -1) { 99 | 100 | } else { 101 | $(header_obj).text(opts._headers.join('.') + '. ' + $(header_obj).text()); 102 | } 103 | } 104 | } 105 | 106 | /* 107 | * 给ztree用的header_nodes增加数据 108 | */ 109 | function _add_header_node(opts, header_obj) { 110 | var id = encode_id_with_array(opts, opts._headers); 111 | var pid = get_parent_id_with_array(opts, opts._headers); 112 | 113 | // 设置锚点id 114 | $(header_obj).attr('id', id); 115 | 116 | log($(header_obj).text()); 117 | 118 | opts._header_offsets.push($(header_obj).offset().top - opts.highlight_offset); 119 | 120 | log('h offset =' + ($(header_obj).offset().top - opts.highlight_offset)); 121 | 122 | opts._header_nodes.push({ 123 | id: id, 124 | pId: pid, 125 | name: $(header_obj).text() || 'null', 126 | open: true, 127 | url: '#' + id, 128 | target: '_self' 129 | }); 130 | } 131 | 132 | /* 133 | * 根据滚动确定当前位置,并更新ztree 134 | */ 135 | function bind_scroll_event_and_update_postion(opts) { 136 | var timeout; 137 | var highlight_on_scroll = function(e) { 138 | if (timeout) { 139 | clearTimeout(timeout); 140 | } 141 | 142 | timeout = setTimeout(function() { 143 | var top = $(window).scrollTop(), 144 | highlighted; 145 | 146 | if (opts.debug) console.log('top=' + top); 147 | 148 | for (var i = 0, c = opts._header_offsets.length; i < c; i++) { 149 | // fixed: top+5防止点击ztree的时候,出现向上抖动的情况 150 | if (opts._header_offsets[i] >= (top + 5)) { 151 | console.log('opts._header_offsets[' + i + '] = ' + opts._header_offsets[i]); 152 | $('a').removeClass('curSelectedNode'); 153 | 154 | // 由于有root节点,所以i应该从1开始 155 | var obj = $('#tree_' + (i + 1) + '_a').addClass('curSelectedNode'); 156 | break; 157 | } 158 | } 159 | }, opts.refresh_scroll_time); 160 | }; 161 | 162 | if (opts.highlight_on_scroll) { 163 | $(window).bind('scroll', highlight_on_scroll); 164 | highlight_on_scroll(); 165 | } 166 | } 167 | 168 | /* 169 | * 初始化 170 | */ 171 | function init_with_config(opts) { 172 | opts.highlight_offset = $(opts.documment_selector).offset().top; 173 | } 174 | 175 | /* 176 | * 日志 177 | */ 178 | function log(str) { 179 | return; 180 | if ($.fn.ztree_toc.defaults.debug == true) { 181 | console.log(str); 182 | } 183 | } 184 | 185 | $.fn.ztree_toc = function(options) { 186 | // 将defaults 和 options 参数合并到{} 187 | var opts = $.extend({}, $.fn.ztree_toc.defaults, options); 188 | 189 | return this.each(function() { 190 | opts._zTree = $(this); 191 | 192 | // 初始化 193 | init_with_config(opts); 194 | 195 | // 创建table of content,获取元数据_headers 196 | create_toc(opts); 197 | 198 | // 根据_headers生成ztree 199 | render_with_ztree(opts); 200 | 201 | // 根据滚动确定当前位置,并更新ztree 202 | bind_scroll_event_and_update_postion(opts); 203 | }); 204 | // each end 205 | } 206 | 207 | //定义默认 208 | $.fn.ztree_toc.defaults = { 209 | _zTree: null, 210 | _headers: [], 211 | _header_offsets: [], 212 | _header_nodes: [{ id: 1, pId: 0, name: "Table of Content", open: true }], 213 | debug: true, 214 | highlight_offset: 0, 215 | highlight_on_scroll: true, 216 | /* 217 | * 计算滚动判断当前位置的时间,默认是50毫秒 218 | */ 219 | refresh_scroll_time: 50, 220 | documment_selector: 'body', 221 | is_posion_top: false, 222 | /* 223 | * 默认是否显示header编号 224 | */ 225 | is_auto_number: false, 226 | /* 227 | * 默认是否展开全部 228 | */ 229 | is_expand_all: true, 230 | /* 231 | * 是否对选中行,显示高亮效果 232 | */ 233 | is_highlight_selected_line: true, 234 | step: 100, 235 | ztreeStyle: { 236 | width: '260px', 237 | overflow: 'auto', 238 | position: 'fixed', 239 | 'z-index': 2147483647, 240 | border: '0px none', 241 | left: '50px', 242 | top: '150px', 243 | // height:'100px' 244 | }, 245 | ztreeSetting: { 246 | view: { 247 | dblClickExpand: false, 248 | showLine: true, 249 | showIcon: false, 250 | selectedMulti: false 251 | }, 252 | data: { 253 | simpleData: { 254 | enable: true, 255 | idKey: "id", 256 | pIdKey: "pId", 257 | // rootPId: "0" 258 | } 259 | }, 260 | callback: { 261 | beforeClick: function(treeId, treeNode) { 262 | $('a').removeClass('curSelectedNode'); 263 | if (treeNode.id == 1) { 264 | // TODO: when click root node 265 | console.log('click root table of content'); 266 | } 267 | if ($.fn.ztree_toc.defaults.is_highlight_selected_line == true) { 268 | $('#' + treeNode.id).css('color', 'red').fadeOut("slow", function() { 269 | // Animation complete. 270 | $(this).show().css('color', 'black'); 271 | }); 272 | } 273 | }, 274 | onRightClick: function(event, treeId, treeNode) { 275 | if (treeNode.id == 1) { 276 | // TODO: when right_click root node:table content 277 | console.log('right_click root table of content'); 278 | } 279 | } 280 | } 281 | } 282 | }; 283 | 284 | })(jQuery); -------------------------------------------------------------------------------- /static/js/ztree_toc.min.js: -------------------------------------------------------------------------------- 1 | /*! ztree_toc - v0.2.2 - 2014-02-08 2 | * https://github.com/i5ting/jQuery.zTree_Toc.js 3 | * Copyright (c) 2014 alfred.sang; Licensed MIT */ 4 | function encode_id_with_array(a,b){for(var c=0,d=0;d0;i--)str+=current*opts.step+"*";return eval(str+"1")}!function(a){function b(b){a(b.documment_selector).find(":header").each(function(){var c=parseInt(this.nodeName.substring(1),10);d(b,this,c),e(b,a(this))})}function c(b){var c=a(b._zTree);c=a.fn.zTree.init(c,b.ztreeSetting,b._header_nodes).expandAll(b.is_expand_all),a(b._zTree).css(b.ztreeStyle)}function d(b,c,d){if(b._headers.length==d)b._headers[d-1]++;else if(b._headers.length>d)b._headers=b._headers.slice(0,d),b._headers[d-1]++;else if(b._headers.lengthd;d++)if(b._header_offsets[d]>=c+5){console.log("opts._header_offsets["+d+"] = "+b._header_offsets[d]),a("a").removeClass("curSelectedNode"),a("#tree_"+(d+1)+"_a").addClass("curSelectedNode");break}},b.refresh_scroll_time)};b.highlight_on_scroll&&(a(window).bind("scroll",d),d())}function g(b){b.highlight_offset=a(b.documment_selector).offset().top}function h(a){}a.fn.ztree_toc=function(d){var e=a.extend({},a.fn.ztree_toc.defaults,d);return this.each(function(){e._zTree=a(this),g(e),b(e),c(e),f(e)})},a.fn.ztree_toc.defaults={_zTree:null,_headers:[],_header_offsets:[],_header_nodes:[{id:1,pId:0,name:"Table of Content",open:!0}],debug:!0,highlight_offset:0,highlight_on_scroll:!0,refresh_scroll_time:50,documment_selector:"body",is_posion_top:!1,is_auto_number:!1,is_expand_all:!0,is_highlight_selected_line:!0,step:100,ztreeStyle:{width:"260px",overflow:"auto",position:"fixed","z-index":2147483647,border:"0px none",left:"0px",bottom:"0px"},ztreeSetting:{view:{dblClickExpand:!1,showLine:!0,showIcon:!1,selectedMulti:!1},data:{simpleData:{enable:!0,idKey:"id",pIdKey:"pId"}},callback:{beforeClick:function(b,c){a("a").removeClass("curSelectedNode"),1==c.id&&console.log("click root table of content"),1==a.fn.ztree_toc.defaults.is_highlight_selected_line&&a("#"+c.id).css("color","red").fadeOut("slow",function(){a(this).show().css("color","black")})},onRightClick:function(a,b,c){1==c.id&&console.log("right_click root table of content")}}}}}(jQuery); -------------------------------------------------------------------------------- /static/style/Clearness Dark.css: -------------------------------------------------------------------------------- 1 | h1, 2 | h2, 3 | h3, 4 | h4, 5 | h5, 6 | h6, 7 | p, 8 | blockquote { 9 | margin: 0; 10 | padding: 0; 11 | } 12 | body { 13 | font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", Arial, sans-serif; 14 | font-size: 13px; 15 | line-height: 18px; 16 | color: #fff; 17 | background-color: #282a36; 18 | margin: 10px 13px 10px 13px; 19 | } 20 | table { 21 | margin: 10px 0 15px 0; 22 | border-collapse: collapse; 23 | } 24 | td,th { 25 | border: 1px solid #ddd; 26 | padding: 3px 10px; 27 | } 28 | th { 29 | padding: 5px 10px; 30 | } 31 | a { 32 | color: #59acf3; 33 | } 34 | a:hover { 35 | color: #a7d8ff; 36 | text-decoration: none; 37 | } 38 | a img { 39 | border: none; 40 | } 41 | p { 42 | margin-bottom: 9px; 43 | } 44 | h1, 45 | h2, 46 | h3, 47 | h4, 48 | h5, 49 | h6 { 50 | color: #fff; 51 | line-height: 36px; 52 | } 53 | h1 { 54 | margin-bottom: 18px; 55 | font-size: 30px; 56 | } 57 | h2 { 58 | font-size: 24px; 59 | } 60 | h3 { 61 | font-size: 18px; 62 | } 63 | h4 { 64 | font-size: 16px; 65 | } 66 | h5 { 67 | font-size: 14px; 68 | } 69 | h6 { 70 | font-size: 13px; 71 | } 72 | hr { 73 | margin: 0 0 19px; 74 | border: 0; 75 | border-bottom: 1px solid #ccc; 76 | } 77 | blockquote { 78 | padding: 13px 13px 21px 15px; 79 | margin-bottom: 18px; 80 | font-family:georgia,serif; 81 | font-style: italic; 82 | } 83 | blockquote:before { 84 | content:"\201C"; 85 | font-size:40px; 86 | margin-left:-10px; 87 | font-family:georgia,serif; 88 | color:#eee; 89 | } 90 | blockquote p { 91 | font-size: 14px; 92 | font-weight: 300; 93 | line-height: 18px; 94 | margin-bottom: 0; 95 | font-style: italic; 96 | } 97 | code, pre { 98 | font-family: Monaco, Andale Mono, Courier New, monospace; 99 | } 100 | code { 101 | color: #ff4a14; 102 | padding: 1px 3px; 103 | font-size: 12px; 104 | -webkit-border-radius: 3px; 105 | -moz-border-radius: 3px; 106 | border-radius: 3px; 107 | } 108 | pre { 109 | display: block; 110 | padding: 14px; 111 | margin: 0 0 18px; 112 | line-height: 16px; 113 | font-size: 11px; 114 | border: 1px solid #bf370f; 115 | white-space: pre; 116 | white-space: pre-wrap; 117 | word-wrap: break-word; 118 | } 119 | pre code { 120 | background-color: #282a36; 121 | color: #ff4a14; 122 | font-size: 11px; 123 | padding: 0; 124 | } 125 | sup { 126 | font-size: 0.83em; 127 | vertical-align: super; 128 | line-height: 0; 129 | } 130 | * { 131 | -webkit-print-color-adjust: exact; 132 | } 133 | @media screen and (min-width: 914px) { 134 | body { 135 | width: 854px; 136 | margin:10px auto; 137 | } 138 | } 139 | @media print { 140 | body,code,pre code,h1,h2,h3,h4,h5,h6 { 141 | color: black; 142 | } 143 | table, pre { 144 | page-break-inside: avoid; 145 | } 146 | } -------------------------------------------------------------------------------- /static/style/Clearness.css: -------------------------------------------------------------------------------- 1 | h1, 2 | h2, 3 | h3, 4 | h4, 5 | h5, 6 | h6, 7 | p, 8 | blockquote { 9 | margin: 0; 10 | padding: 0; 11 | } 12 | body { 13 | font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", Arial, sans-serif; 14 | font-size: 13px; 15 | line-height: 18px; 16 | color: #737373; 17 | background-color: white; 18 | margin: 10px 13px 10px 13px; 19 | } 20 | table { 21 | margin: 10px 0 15px 0; 22 | border-collapse: collapse; 23 | } 24 | td,th { 25 | border: 1px solid #ddd; 26 | padding: 3px 10px; 27 | } 28 | th { 29 | padding: 5px 10px; 30 | } 31 | 32 | a { 33 | color: #0069d6; 34 | } 35 | a:hover { 36 | color: #0050a3; 37 | text-decoration: none; 38 | } 39 | a img { 40 | border: none; 41 | } 42 | p { 43 | margin-bottom: 9px; 44 | } 45 | h1, 46 | h2, 47 | h3, 48 | h4, 49 | h5, 50 | h6 { 51 | color: #404040; 52 | line-height: 36px; 53 | } 54 | h1 { 55 | margin-bottom: 18px; 56 | font-size: 30px; 57 | } 58 | h2 { 59 | font-size: 24px; 60 | } 61 | h3 { 62 | font-size: 18px; 63 | } 64 | h4 { 65 | font-size: 16px; 66 | } 67 | h5 { 68 | font-size: 14px; 69 | } 70 | h6 { 71 | font-size: 13px; 72 | } 73 | hr { 74 | margin: 0 0 19px; 75 | border: 0; 76 | border-bottom: 1px solid #ccc; 77 | } 78 | blockquote { 79 | padding: 13px 13px 21px 15px; 80 | margin-bottom: 18px; 81 | font-family:georgia,serif; 82 | font-style: italic; 83 | } 84 | blockquote:before { 85 | content:"\201C"; 86 | font-size:40px; 87 | margin-left:-10px; 88 | font-family:georgia,serif; 89 | color:#eee; 90 | } 91 | blockquote p { 92 | font-size: 14px; 93 | font-weight: 300; 94 | line-height: 18px; 95 | margin-bottom: 0; 96 | font-style: italic; 97 | } 98 | code, pre { 99 | font-family: Monaco, Andale Mono, Courier New, monospace; 100 | } 101 | code { 102 | background-color: #fee9cc; 103 | color: rgba(0, 0, 0, 0.75); 104 | padding: 1px 3px; 105 | font-size: 12px; 106 | -webkit-border-radius: 3px; 107 | -moz-border-radius: 3px; 108 | border-radius: 3px; 109 | } 110 | pre { 111 | display: block; 112 | padding: 14px; 113 | margin: 0 0 18px; 114 | line-height: 16px; 115 | font-size: 11px; 116 | border: 1px solid #d9d9d9; 117 | white-space: pre-wrap; 118 | word-wrap: break-word; 119 | } 120 | pre code { 121 | background-color: #fff; 122 | color:#737373; 123 | font-size: 11px; 124 | padding: 0; 125 | } 126 | sup { 127 | font-size: 0.83em; 128 | vertical-align: super; 129 | line-height: 0; 130 | } 131 | * { 132 | -webkit-print-color-adjust: exact; 133 | } 134 | @media screen and (min-width: 914px) { 135 | body { 136 | width: 854px; 137 | margin:10px auto; 138 | } 139 | } 140 | @media print { 141 | body,code,pre code,h1,h2,h3,h4,h5,h6 { 142 | color: black; 143 | } 144 | table, pre { 145 | page-break-inside: avoid; 146 | } 147 | } -------------------------------------------------------------------------------- /static/style/GitHub.css: -------------------------------------------------------------------------------- 1 | *{margin:0;padding:0;} 2 | body { 3 | font:13.34px helvetica,arial,freesans,clean,sans-serif; 4 | color:black; 5 | line-height:1.4em; 6 | background-color: #F8F8F8; 7 | padding: 0.7em; 8 | } 9 | p { 10 | margin:1em 0; 11 | line-height:1.5em; 12 | } 13 | table { 14 | font-size:inherit; 15 | font:100%; 16 | margin:1em; 17 | } 18 | table th{border-bottom:1px solid #bbb;padding:.2em 1em;} 19 | table td{border-bottom:1px solid #ddd;padding:.2em 1em;} 20 | input[type=text],input[type=password],input[type=image],textarea{font:99% helvetica,arial,freesans,sans-serif;} 21 | select,option{padding:0 .25em;} 22 | optgroup{margin-top:.5em;} 23 | pre,code{font:12px Monaco,"Courier New","DejaVu Sans Mono","Bitstream Vera Sans Mono",monospace;} 24 | pre { 25 | margin:1em 0; 26 | font-size:12px; 27 | background-color:#eee; 28 | border:1px solid #ddd; 29 | padding:5px; 30 | line-height:1.5em; 31 | color:#444; 32 | overflow:auto; 33 | -webkit-box-shadow:rgba(0,0,0,0.07) 0 1px 2px inset; 34 | -webkit-border-radius:3px; 35 | -moz-border-radius:3px;border-radius:3px; 36 | } 37 | pre code { 38 | padding:0; 39 | font-size:12px; 40 | background-color:#eee; 41 | border:none; 42 | } 43 | code { 44 | font-size:12px; 45 | background-color:#f8f8ff; 46 | color:#444; 47 | padding:0 .2em; 48 | border:1px solid #dedede; 49 | } 50 | img{border:0;max-width:100%;} 51 | abbr{border-bottom:none;} 52 | a{color:#4183c4;text-decoration:none;} 53 | a:hover{text-decoration:underline;} 54 | a code,a:link code,a:visited code{color:#4183c4;} 55 | h2,h3{margin:1em 0;} 56 | h1,h2,h3,h4,h5,h6{border:0;} 57 | h1{font-size:170%;border-top:4px solid #aaa;padding-top:.5em;margin-top:1.5em;} 58 | h1:first-child{margin-top:0;padding-top:.25em;border-top:none;} 59 | h2{font-size:150%;margin-top:1.5em;border-top:4px solid #e0e0e0;padding-top:.5em;} 60 | h3{margin-top:1em;} 61 | hr{border:1px solid #ddd;} 62 | ul{margin:1em 0 1em 2em;} 63 | ol{margin:1em 0 1em 2em;} 64 | ul li,ol li{margin-top:.5em;margin-bottom:.5em;} 65 | ul ul,ul ol,ol ol,ol ul{margin-top:0;margin-bottom:0;} 66 | blockquote{margin:1em 0;border-left:5px solid #ddd;padding-left:.6em;color:#555;} 67 | dt{font-weight:bold;margin-left:1em;} 68 | dd{margin-left:2em;margin-bottom:1em;} 69 | sup { 70 | font-size: 0.83em; 71 | vertical-align: super; 72 | line-height: 0; 73 | } 74 | * { 75 | -webkit-print-color-adjust: exact; 76 | } 77 | @media screen and (min-width: 914px) { 78 | body { 79 | width: 854px; 80 | margin:0 auto; 81 | } 82 | } 83 | @media print { 84 | table, pre { 85 | page-break-inside: avoid; 86 | } 87 | pre { 88 | word-wrap: break-word; 89 | } 90 | } -------------------------------------------------------------------------------- /static/style/GitHub2.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: Helvetica, arial, sans-serif; 3 | font-size: 14px; 4 | line-height: 1.6; 5 | padding-top: 10px; 6 | padding-bottom: 10px; 7 | background-color: white; 8 | padding: 30px; } 9 | 10 | body > *:first-child { 11 | margin-top: 0 !important; } 12 | body > *:last-child { 13 | margin-bottom: 0 !important; } 14 | 15 | a { 16 | color: #4183C4; } 17 | a.absent { 18 | color: #cc0000; } 19 | a.anchor { 20 | display: block; 21 | padding-left: 30px; 22 | margin-left: -30px; 23 | cursor: pointer; 24 | position: absolute; 25 | top: 0; 26 | left: 0; 27 | bottom: 0; } 28 | 29 | h1, h2, h3, h4, h5, h6 { 30 | margin: 20px 0 10px; 31 | padding: 0; 32 | font-weight: bold; 33 | -webkit-font-smoothing: antialiased; 34 | cursor: text; 35 | position: relative; } 36 | 37 | h1:hover a.anchor, h2:hover a.anchor, h3:hover a.anchor, h4:hover a.anchor, h5:hover a.anchor, h6:hover a.anchor { 38 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA09pVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoMTMuMCAyMDEyMDMwNS5tLjQxNSAyMDEyLzAzLzA1OjIxOjAwOjAwKSAgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUM2NjlDQjI4ODBGMTFFMTg1ODlEODNERDJBRjUwQTQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUM2NjlDQjM4ODBGMTFFMTg1ODlEODNERDJBRjUwQTQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QzY2OUNCMDg4MEYxMUUxODU4OUQ4M0REMkFGNTBBNCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QzY2OUNCMTg4MEYxMUUxODU4OUQ4M0REMkFGNTBBNCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PsQhXeAAAABfSURBVHjaYvz//z8DJYCRUgMYQAbAMBQIAvEqkBQWXI6sHqwHiwG70TTBxGaiWwjCTGgOUgJiF1J8wMRAIUA34B4Q76HUBelAfJYSA0CuMIEaRP8wGIkGMA54bgQIMACAmkXJi0hKJQAAAABJRU5ErkJggg==) no-repeat 10px center; 39 | text-decoration: none; } 40 | 41 | h1 tt, h1 code { 42 | font-size: inherit; } 43 | 44 | h2 tt, h2 code { 45 | font-size: inherit; } 46 | 47 | h3 tt, h3 code { 48 | font-size: inherit; } 49 | 50 | h4 tt, h4 code { 51 | font-size: inherit; } 52 | 53 | h5 tt, h5 code { 54 | font-size: inherit; } 55 | 56 | h6 tt, h6 code { 57 | font-size: inherit; } 58 | 59 | h1 { 60 | font-size: 28px; 61 | color: black; } 62 | 63 | h2 { 64 | font-size: 24px; 65 | border-bottom: 1px solid #cccccc; 66 | color: black; } 67 | 68 | h3 { 69 | font-size: 18px; } 70 | 71 | h4 { 72 | font-size: 16px; } 73 | 74 | h5 { 75 | font-size: 14px; } 76 | 77 | h6 { 78 | color: #777777; 79 | font-size: 14px; } 80 | 81 | p, blockquote, ul, ol, dl, li, table, pre { 82 | margin: 15px 0; } 83 | 84 | hr { 85 | background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAECAYAAACtBE5DAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OENDRjNBN0E2NTZBMTFFMEI3QjRBODM4NzJDMjlGNDgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OENDRjNBN0I2NTZBMTFFMEI3QjRBODM4NzJDMjlGNDgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4Q0NGM0E3ODY1NkExMUUwQjdCNEE4Mzg3MkMyOUY0OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4Q0NGM0E3OTY1NkExMUUwQjdCNEE4Mzg3MkMyOUY0OCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PqqezsUAAAAfSURBVHjaYmRABcYwBiM2QSA4y4hNEKYDQxAEAAIMAHNGAzhkPOlYAAAAAElFTkSuQmCC) repeat-x 0 0; 86 | border: 0 none; 87 | color: #cccccc; 88 | height: 4px; 89 | padding: 0; 90 | } 91 | 92 | body > h2:first-child { 93 | margin-top: 0; 94 | padding-top: 0; } 95 | body > h1:first-child { 96 | margin-top: 0; 97 | padding-top: 0; } 98 | body > h1:first-child + h2 { 99 | margin-top: 0; 100 | padding-top: 0; } 101 | body > h3:first-child, body > h4:first-child, body > h5:first-child, body > h6:first-child { 102 | margin-top: 0; 103 | padding-top: 0; } 104 | 105 | a:first-child h1, a:first-child h2, a:first-child h3, a:first-child h4, a:first-child h5, a:first-child h6 { 106 | margin-top: 0; 107 | padding-top: 0; } 108 | 109 | h1 p, h2 p, h3 p, h4 p, h5 p, h6 p { 110 | margin-top: 0; } 111 | 112 | li p.first { 113 | display: inline-block; } 114 | li { 115 | margin: 0; } 116 | ul, ol { 117 | padding-left: 30px; } 118 | 119 | ul :first-child, ol :first-child { 120 | margin-top: 0; } 121 | 122 | dl { 123 | padding: 0; } 124 | dl dt { 125 | font-size: 14px; 126 | font-weight: bold; 127 | font-style: italic; 128 | padding: 0; 129 | margin: 15px 0 5px; } 130 | dl dt:first-child { 131 | padding: 0; } 132 | dl dt > :first-child { 133 | margin-top: 0; } 134 | dl dt > :last-child { 135 | margin-bottom: 0; } 136 | dl dd { 137 | margin: 0 0 15px; 138 | padding: 0 15px; } 139 | dl dd > :first-child { 140 | margin-top: 0; } 141 | dl dd > :last-child { 142 | margin-bottom: 0; } 143 | 144 | blockquote { 145 | border-left: 4px solid #dddddd; 146 | padding: 0 15px; 147 | color: #777777; } 148 | blockquote > :first-child { 149 | margin-top: 0; } 150 | blockquote > :last-child { 151 | margin-bottom: 0; } 152 | 153 | table { 154 | padding: 0;border-collapse: collapse; } 155 | table tr { 156 | border-top: 1px solid #cccccc; 157 | background-color: white; 158 | margin: 0; 159 | padding: 0; } 160 | table tr:nth-child(2n) { 161 | background-color: #f8f8f8; } 162 | table tr th { 163 | font-weight: bold; 164 | border: 1px solid #cccccc; 165 | margin: 0; 166 | padding: 6px 13px; } 167 | table tr td { 168 | border: 1px solid #cccccc; 169 | margin: 0; 170 | padding: 6px 13px; } 171 | table tr th :first-child, table tr td :first-child { 172 | margin-top: 0; } 173 | table tr th :last-child, table tr td :last-child { 174 | margin-bottom: 0; } 175 | 176 | img { 177 | max-width: 100%; } 178 | 179 | span.frame { 180 | display: block; 181 | overflow: hidden; } 182 | span.frame > span { 183 | border: 1px solid #dddddd; 184 | display: block; 185 | float: left; 186 | overflow: hidden; 187 | margin: 13px 0 0; 188 | padding: 7px; 189 | width: auto; } 190 | span.frame span img { 191 | display: block; 192 | float: left; } 193 | span.frame span span { 194 | clear: both; 195 | color: #333333; 196 | display: block; 197 | padding: 5px 0 0; } 198 | span.align-center { 199 | display: block; 200 | overflow: hidden; 201 | clear: both; } 202 | span.align-center > span { 203 | display: block; 204 | overflow: hidden; 205 | margin: 13px auto 0; 206 | text-align: center; } 207 | span.align-center span img { 208 | margin: 0 auto; 209 | text-align: center; } 210 | span.align-right { 211 | display: block; 212 | overflow: hidden; 213 | clear: both; } 214 | span.align-right > span { 215 | display: block; 216 | overflow: hidden; 217 | margin: 13px 0 0; 218 | text-align: right; } 219 | span.align-right span img { 220 | margin: 0; 221 | text-align: right; } 222 | span.float-left { 223 | display: block; 224 | margin-right: 13px; 225 | overflow: hidden; 226 | float: left; } 227 | span.float-left span { 228 | margin: 13px 0 0; } 229 | span.float-right { 230 | display: block; 231 | margin-left: 13px; 232 | overflow: hidden; 233 | float: right; } 234 | span.float-right > span { 235 | display: block; 236 | overflow: hidden; 237 | margin: 13px auto 0; 238 | text-align: right; } 239 | 240 | code, tt { 241 | margin: 0 2px; 242 | padding: 0 5px; 243 | white-space: nowrap; 244 | border: 1px solid #eaeaea; 245 | background-color: #f8f8f8; 246 | border-radius: 3px; } 247 | 248 | pre code { 249 | margin: 0; 250 | padding: 0; 251 | white-space: pre; 252 | border: none; 253 | background: transparent; } 254 | 255 | .highlight pre { 256 | background-color: #f8f8f8; 257 | border: 1px solid #cccccc; 258 | font-size: 13px; 259 | line-height: 19px; 260 | overflow: auto; 261 | padding: 6px 10px; 262 | border-radius: 3px; } 263 | 264 | pre { 265 | background-color: #f8f8f8; 266 | border: 1px solid #cccccc; 267 | font-size: 13px; 268 | line-height: 19px; 269 | overflow: auto; 270 | padding: 6px 10px; 271 | border-radius: 3px; } 272 | pre code, pre tt { 273 | background-color: transparent; 274 | border: none; } 275 | 276 | sup { 277 | font-size: 0.83em; 278 | vertical-align: super; 279 | line-height: 0; 280 | } 281 | * { 282 | -webkit-print-color-adjust: exact; 283 | } 284 | @media screen and (min-width: 914px) { 285 | body { 286 | width: 854px; 287 | margin:0 auto; 288 | } 289 | } 290 | @media print { 291 | table, pre { 292 | page-break-inside: avoid; 293 | } 294 | pre { 295 | word-wrap: break-word; 296 | } 297 | } -------------------------------------------------------------------------------- /static/style/makedownpad.css: -------------------------------------------------------------------------------- 1 | 2 | /* GitHub stylesheet for MarkdownPad (http://markdownpad.com) */ 3 | /* Author: Nicolas Hery - http://nicolashery.com */ 4 | /* Version: b13fe65ca28d2e568c6ed5d7f06581183df8f2ff */ 5 | /* Source: https://github.com/nicolahery/markdownpad-github */ 6 | 7 | /* RESET 8 | =============================================================================*/ 9 | 10 | html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { 11 | margin: 0; 12 | padding: 0; 13 | border: 0; 14 | } 15 | 16 | /* BODY 17 | =============================================================================*/ 18 | 19 | body { 20 | font-family: Helvetica, arial, freesans, clean, sans-serif; 21 | font-size: 14px; 22 | line-height: 1.6; 23 | color: #333; 24 | background-color: #fff; 25 | padding: 20px; 26 | max-width: 960px; 27 | margin: 0 auto; 28 | } 29 | 30 | body>*:first-child { 31 | margin-top: 0 !important; 32 | } 33 | 34 | body>*:last-child { 35 | margin-bottom: 0 !important; 36 | } 37 | 38 | /* BLOCKS 39 | =============================================================================*/ 40 | 41 | p, blockquote, ul, ol, dl, table, pre { 42 | margin: 15px 0; 43 | } 44 | 45 | /* HEADERS 46 | =============================================================================*/ 47 | 48 | h1, h2, h3, h4, h5, h6 { 49 | margin: 20px 0 10px; 50 | padding: 0; 51 | font-weight: bold; 52 | -webkit-font-smoothing: antialiased; 53 | } 54 | 55 | h1 tt, h1 code, h2 tt, h2 code, h3 tt, h3 code, h4 tt, h4 code, h5 tt, h5 code, h6 tt, h6 code { 56 | font-size: inherit; 57 | } 58 | 59 | h1 { 60 | font-size: 28px; 61 | color: #000; 62 | } 63 | 64 | h2 { 65 | font-size: 24px; 66 | border-bottom: 1px solid #ccc; 67 | color: #000; 68 | } 69 | 70 | h3 { 71 | font-size: 18px; 72 | } 73 | 74 | h4 { 75 | font-size: 16px; 76 | } 77 | 78 | h5 { 79 | font-size: 14px; 80 | } 81 | 82 | h6 { 83 | color: #777; 84 | font-size: 14px; 85 | } 86 | 87 | body>h2:first-child, body>h1:first-child, body>h1:first-child+h2, body>h3:first-child, body>h4:first-child, body>h5:first-child, body>h6:first-child { 88 | margin-top: 0; 89 | padding-top: 0; 90 | } 91 | 92 | a:first-child h1, a:first-child h2, a:first-child h3, a:first-child h4, a:first-child h5, a:first-child h6 { 93 | margin-top: 0; 94 | padding-top: 0; 95 | } 96 | 97 | h1+p, h2+p, h3+p, h4+p, h5+p, h6+p { 98 | margin-top: 10px; 99 | } 100 | 101 | /* LINKS 102 | =============================================================================*/ 103 | 104 | a { 105 | color: #4183C4; 106 | text-decoration: none; 107 | } 108 | 109 | a:hover { 110 | text-decoration: underline; 111 | } 112 | 113 | /* LISTS 114 | =============================================================================*/ 115 | 116 | ul, ol { 117 | padding-left: 30px; 118 | } 119 | 120 | ul li > :first-child, 121 | ol li > :first-child, 122 | ul li ul:first-of-type, 123 | ol li ol:first-of-type, 124 | ul li ol:first-of-type, 125 | ol li ul:first-of-type { 126 | margin-top: 0px; 127 | } 128 | 129 | ul ul, ul ol, ol ol, ol ul { 130 | margin-bottom: 0; 131 | } 132 | 133 | dl { 134 | padding: 0; 135 | } 136 | 137 | dl dt { 138 | font-size: 14px; 139 | font-weight: bold; 140 | font-style: italic; 141 | padding: 0; 142 | margin: 15px 0 5px; 143 | } 144 | 145 | dl dt:first-child { 146 | padding: 0; 147 | } 148 | 149 | dl dt>:first-child { 150 | margin-top: 0px; 151 | } 152 | 153 | dl dt>:last-child { 154 | margin-bottom: 0px; 155 | } 156 | 157 | dl dd { 158 | margin: 0 0 15px; 159 | padding: 0 15px; 160 | } 161 | 162 | dl dd>:first-child { 163 | margin-top: 0px; 164 | } 165 | 166 | dl dd>:last-child { 167 | margin-bottom: 0px; 168 | } 169 | 170 | /* CODE 171 | =============================================================================*/ 172 | 173 | pre, code, tt { 174 | font-size: 12px; 175 | font-family: Consolas, "Liberation Mono", Courier, monospace; 176 | } 177 | 178 | code, tt { 179 | margin: 0 0px; 180 | padding: 0px 0px; 181 | white-space: nowrap; 182 | border: 1px solid #eaeaea; 183 | background-color: #f8f8f8; 184 | border-radius: 3px; 185 | } 186 | 187 | pre>code { 188 | margin: 0; 189 | padding: 0; 190 | white-space: pre; 191 | border: none; 192 | background: transparent; 193 | } 194 | 195 | pre { 196 | background-color: #f8f8f8; 197 | border: 1px solid #ccc; 198 | font-size: 13px; 199 | line-height: 19px; 200 | overflow: auto; 201 | padding: 6px 10px; 202 | border-radius: 3px; 203 | } 204 | 205 | pre code, pre tt { 206 | background-color: transparent; 207 | border: none; 208 | } 209 | 210 | kbd { 211 | -moz-border-bottom-colors: none; 212 | -moz-border-left-colors: none; 213 | -moz-border-right-colors: none; 214 | -moz-border-top-colors: none; 215 | background-color: #DDDDDD; 216 | background-image: linear-gradient(#F1F1F1, #DDDDDD); 217 | background-repeat: repeat-x; 218 | border-color: #DDDDDD #CCCCCC #CCCCCC #DDDDDD; 219 | border-image: none; 220 | border-radius: 2px 2px 2px 2px; 221 | border-style: solid; 222 | border-width: 1px; 223 | font-family: "Helvetica Neue",Helvetica,Arial,sans-serif; 224 | line-height: 10px; 225 | padding: 1px 4px; 226 | } 227 | 228 | /* QUOTES 229 | =============================================================================*/ 230 | 231 | blockquote { 232 | border-left: 4px solid #DDD; 233 | padding: 0 15px; 234 | color: #777; 235 | } 236 | 237 | blockquote>:first-child { 238 | margin-top: 0px; 239 | } 240 | 241 | blockquote>:last-child { 242 | margin-bottom: 0px; 243 | } 244 | 245 | /* HORIZONTAL RULES 246 | =============================================================================*/ 247 | 248 | hr { 249 | clear: both; 250 | margin: 15px 0; 251 | height: 0px; 252 | overflow: hidden; 253 | border: none; 254 | background: transparent; 255 | border-bottom: 4px solid #ddd; 256 | padding: 0; 257 | } 258 | 259 | /* TABLES 260 | =============================================================================*/ 261 | 262 | table th { 263 | font-weight: bold; 264 | } 265 | 266 | table th, table td { 267 | border: 1px solid #ccc; 268 | padding: 6px 13px; 269 | } 270 | 271 | table tr { 272 | border-top: 1px solid #ccc; 273 | background-color: #fff; 274 | } 275 | 276 | table tr:nth-child(2n) { 277 | background-color: #f8f8f8; 278 | } 279 | 280 | /* IMAGES 281 | =============================================================================*/ 282 | 283 | img { 284 | max-width: 100% 285 | } 286 | -------------------------------------------------------------------------------- /templates/crud.html: -------------------------------------------------------------------------------- 1 | {% extends "homepage.html" %} {% block database_manager %} 2 |

      {{table_name_ch}}

      3 | 4 | 5 |
      6 | 7 |
      8 | {% for eng, ch in cc_lst %} 9 |
      10 | 11 |
      12 | {% endfor %} 13 | 14 |
      15 | 16 | 17 | 18 |
      19 | 20 | 32 | {% endblock %} {% block crud_result %} {% endblock %} -------------------------------------------------------------------------------- /templates/crud_batch_upload.html: -------------------------------------------------------------------------------- 1 | {% extends "homepage.html" %} {% block database_manager %} 2 | 3 | 9 | 10 |
      11 | 12 | 13 |
      14 | 15 | 16 | 17 |
      18 | 19 |
      20 | {% block crud_edit %} {% endblock %} 21 | 22 | 39 | {% endblock %} -------------------------------------------------------------------------------- /templates/crud_create.html: -------------------------------------------------------------------------------- 1 | {% extends "homepage.html" %} {% block database_manager %} 2 |

      数据库管理

      3 |

      目前可实现对数据库中单表的增、删、改、查,支持上传、下载Excel文件。

      4 |

      初次使用?请戳使用手册

      5 |

      没有想要的?请戳新建数据库

      6 | 7 |
      8 |
      9 | {% for table_name in tables %} {% if database_info.get(table_name) %} 10 | 11 |
      12 |
      13 | ... 14 |
      15 | 16 |
      {{database_info[table_name]['in_chinese']}}
      17 |

      {{database_info[table_name]['desc']}}

      18 | 19 |
      20 |
      21 |
      22 | {% else %} {% endif %} {% endfor %} 23 | 24 |
      25 | 26 |
      27 |
      28 | 29 | 35 | 36 | 37 | 38 | 39 | 40 | {% endblock %} -------------------------------------------------------------------------------- /templates/crud_edit.html: -------------------------------------------------------------------------------- 1 | {% extends "crud_result.html" %} {% block crud_edit %} 2 | 3 | 4 | 13 | {% endblock %} -------------------------------------------------------------------------------- /templates/crud_result.html: -------------------------------------------------------------------------------- 1 | {% extends "crud.html" %} {% block crud_result %} 2 |
      3 |
      4 | 5 | 6 | 7 | 8 | 9 | {% for col in result_data.columns.tolist()[1:] %} {% if 'sort' not in col %} 10 | 13 | {% endif %} {% endfor %} 14 | 15 | 16 | 17 | 18 | {% for i in result_data.index %} 19 | 20 | 21 | 22 | {% for col in result_data.columns.tolist()[1:] %} {% if 'sort' not in col %} 23 | 24 | {% endif %} {% endfor %} 25 | 26 | {% endfor %} 27 | 28 |
      标记删除 11 | {{c_c_dict[col]}} 12 |
      29 |
      30 | 31 | 32 | 33 | 34 | 35 | 36 |
      37 | {% block crud_edit %} {% endblock %} 38 | 39 | 132 | {% endblock %} -------------------------------------------------------------------------------- /templates/database_manager.html: -------------------------------------------------------------------------------- 1 | {% extends "homepage.html" %} {% block database_manager %} 2 |

      数据库管理

      3 |

      目前可实现对数据库中单表的增、删、改、查,支持上传、下载Excel文件。

      4 |

      初次使用?请戳使用手册

      5 |

      没有想要的?请戳新建数据库

      6 | 7 |
      8 |
      9 | {% for table_name in tables %} {% if database_info.get(table_name) %} 10 | 11 |
      12 |
      13 |

      ...

      14 |
      15 | 16 |
      {{database_info[table_name]['in_chinese']}}
      17 |

      {{database_info[table_name]['desc']}}

      18 | 19 |
      20 |
      21 |
      22 | {% else %} {% endif %} {% endfor %} 23 | 24 |
      25 | 26 |
      27 |
      28 | 29 | 30 | 31 | 32 | 33 | {% endblock %} -------------------------------------------------------------------------------- /templates/homepage.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 创研中心数据中台 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 67 | 68 |
      69 | {% block database_manager %} 70 |

      官方新闻----------------------------------------------------------------------------------------

      71 |
      72 | {% for site_name,site_item in official_news.items() %} 73 |
      74 |
      75 |
      {{site_name}}
      76 |
      77 | {% for part_name,part_lst in site_item['result'].items() %} 78 |

      79 | {% for part_item in part_lst %} 80 |
      {{'-'.join(part_item['post_date'].split('-')[1:])}}:{{part_item['title']}}
      81 | {% endfor %} {% endfor %} 82 | 83 |
      84 |
      85 |
      86 | {% endfor %} 87 |
      88 |

      门户新闻----------------------------------------------------------------------------------------

      89 |
      90 | {% for site_name,site_item in menhu_news.items() %} 91 |
      92 |
      93 |
      {{site_name}}
      94 |
      95 | {% for part_name,part_lst in site_item['result'].items() %} 96 |

      97 | {% for part_item in part_lst %} 98 |
      {{'-'.join(part_item['post_date'].split('-')[1:])}}:{{part_item['title']}}
      99 | {% endfor %} {% endfor %} 100 | 101 |
      102 |
      103 |
      104 | {% endfor %} 105 |
      106 | {% endblock %} 107 |
      108 | {% block crud_result %} {% endblock %} 109 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /templates/sneac_spyder.html: -------------------------------------------------------------------------------- 1 | {% extends "homepage.html" %} {% block database_manager %} 2 |

      陕西招生考试信息网爬虫

      3 | 4 | 5 |
      6 | 7 | 8 |
      9 |
      10 | 11 |
      12 |
      13 | 14 |
      15 |
      16 |
      17 | 18 |
      19 |
      20 | 21 |
      22 |
      23 |
      24 |
      25 | 26 | 30 |
      31 |
      32 |
      33 | 34 |
      35 |
      36 |
      0% 37 |
      38 |
      39 |
      40 | 41 |
      42 | 43 | 126 | {% endblock %} -------------------------------------------------------------------------------- /templates/upload.html: -------------------------------------------------------------------------------- 1 | {% extends "homepage.html" %} {% block database_manager %} 2 |

      新建数据库

      3 |

      注意:提交的文件应该为标准的Excel表格 4 |

    • 每列都有列名,且彼此不重复
    • 5 |
    • 无多级行列标签
    • 6 |
    • 无合并单元格
    • 7 |

      8 | 9 |
      10 |
      11 |
      12 | 13 |
      14 |
      15 |
      16 | 17 |
      18 |
      19 | 20 |
      21 |
      22 | 46 |
      47 | 48 | 49 | 50 | 51 | 52 |
      53 | 75 | {% endblock %} -------------------------------------------------------------------------------- /templates/xian_edu_spyder.html: -------------------------------------------------------------------------------- 1 | {% extends "homepage.html" %} {% block database_manager %} 2 |

      西安市教育局通知公告爬虫

      3 | 4 | 5 |
      6 | 7 | 8 |
      9 |
      10 | 11 |
      12 |
      13 | 14 |
      15 |
      16 |
      17 | 18 |
      19 |
      20 | 21 |
      22 |
      23 |
      24 |
      25 |
      26 | 27 |
      28 |
      29 |
      0% 30 |
      31 |
      32 |
      33 | 34 |
      35 | 36 | 118 | {% endblock %} -------------------------------------------------------------------------------- /templates/zhihu_activities.html: -------------------------------------------------------------------------------- 1 | {% extends "homepage.html" %} {% block database_manager %} 2 |

      知乎用户动态爬虫

      3 | 4 | 5 |
      6 | 7 | 8 |
      9 |
      10 | 11 |
      12 | 13 | 14 | 15 |
      16 | 17 |
      18 |
      19 |
      0% 20 |
      21 |
      22 |
      23 | 24 | 25 |
      26 | 27 | 28 | 88 | {% endblock %} -------------------------------------------------------------------------------- /templates/zhihu_qas.html: -------------------------------------------------------------------------------- 1 | {% extends "homepage.html" %} {% block database_manager %} 2 |

      知乎问题回答爬虫

      3 | 4 | 5 |
      6 | 7 | 8 |
      9 |
      10 | 11 |
      12 | 13 | 14 | 15 |
      16 | 17 |
      18 |
      19 |
      0% 20 |
      21 |
      22 |
      23 | 24 | 25 |
      26 | 27 | 28 | 88 | {% endblock %} --------------------------------------------------------------------------------