code init

This commit is contained in:
chenxiaoxi
2021-05-25 18:06:45 +08:00
parent 02698d6dab
commit f54a8d4fa1
1367 changed files with 540755 additions and 21713 deletions
+7
View File
@@ -0,0 +1,7 @@
{
"compact": false,
"presets": ["@babel/preset-env"],
"plugins": [
"@babel/plugin-transform-runtime"
]
}
-2
View File
@@ -1,5 +1,3 @@
# 支持浏览器配置
> 1%
last 2 versions
not dead
-14
View File
@@ -1,14 +0,0 @@
# 编辑器配置
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
trim_trailing_whitespace = false
-7
View File
@@ -1,7 +0,0 @@
# .eslintignore
src/assets
src/icons
public
dist
node_modules
-26
View File
@@ -1,26 +0,0 @@
module.exports = {
root: true,
env: {
node: true,
},
extends: ['plugin:vue/recommended', '@vue/prettier'],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'vue/no-v-html': 'off',
},
parserOptions: {
parser: 'babel-eslint',
},
overrides: [
{
files: [
'**/__tests__/*.{j,t}s?(x)',
'**/tests/unit/**/*.spec.{j,t}s?(x)',
],
env: {
jest: true,
},
},
],
}
-12
View File
@@ -1,12 +0,0 @@
# .gitattributes
*.html text eol=lf
*.css text eol=lf
*.js text eol=lf
*.scss text eol=lf
*.vue text eol=lf
*.hbs text eol=lf
*.sh text eol=lf
*.md text eol=lf
*.json text eol=lf
*.yml text eol=lf
*.js linguist-language=vue
+10 -13
View File
@@ -1,26 +1,23 @@
# .gitignore
.DS_Store
node_modules
dist
/dist
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn.lock
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
public/video
*.zip
*.7z
/src/layouts/components/zx-layouts
/zx-templates
/package-lock.json
/src/styles/themes/green.scss
/src/styles/themes/dark.scss
/src/styles/themes/glory.scss
-6
View File
@@ -1,6 +0,0 @@
/**
* @description stylelint
*/
module.exports = {
extends: ['stylelint-config-recess-order', 'stylelint-config-prettier'],
}
+1 -1
View File
@@ -1,4 +1,4 @@
# FOTON
# shangqi
## Project setup
```
+13 -1
View File
@@ -1,3 +1,15 @@
module.exports = {
presets: ['@vue/cli-plugin-babel/preset'],
sourceType: 'unambiguous',
presets: [
[
'@vue/app',
{
useBuiltIns: 'entry',
polyfills: [
'es6.promise',
'es6.symbol'
]
}
]
]
}
-41
View File
@@ -1,41 +0,0 @@
const data = [
{
title: 'Admin Pro 3.0付费版本已发布,增加多项贴心功能,点我提前体验',
url:
'https://chu1204505056.gitee.io/admin-pro?hmsr=homeAd&hmpl=&hmcu=&hmkw=&hmci=',
},
{
title: 'Admin Plus 3.0内测版本已发布,增加多项贴心功能,点我提前体验',
url:
'https://chu1204505056.gitee.io/admin-plus?hmsr=homeAd&hmpl=&hmcu=&hmkw=&hmci=',
},
{
title: 'vue-admin-beautifulantdv vue3.0版本已发布,点我提前体验',
url:
'http://vue-admin-beautiful.com/vue-admin-beautiful-antdv?hmsr=homeAd&hmpl=&hmcu=&hmkw=&hmci=',
},
{
title: 'vue-admin-beautifulelement-plus vue3.0版本已发布,点我提前体验',
url:
'https://chu1204505056.gitee.io/admin-plus?hmsr=homeAd&hmpl=&hmcu=&hmkw=&hmci=',
},
{
title:
'程序无国界,但程序员有国界,中国国家尊严不容挑衅,如果您在特殊时期继续购买HM、耐克、阿迪达斯等品牌那么您将无权继续使用Vab',
url:
'https://chu1204505056.gitee.io/admin-pro?hmsr=homeAd&hmpl=&hmcu=&hmkw=&hmci=',
},
]
module.exports = [
{
url: '/ad/getList',
type: 'get',
response() {
return {
code: 200,
msg: 'success',
data,
}
},
},
]
-250
View File
@@ -1,250 +0,0 @@
const data = [
{
content: '在github上获得了第一个star,感恩一位名叫Bequiet2014的github用户',
timestamp: '2020-03-23',
},
{
content: '增加更换主题功能',
timestamp: '2020-04-10',
},
{
content: '大幅精简代码',
timestamp: '2020-04-14',
},
{
content: '修复群友反馈的bug',
timestamp: '2020-04-16',
},
{
content: '剔除maptalks',
timestamp: '2020-04-17',
},
{
content:
'换行符统一修改为lf 支持苹果 linux windows协同开发 强制开启最严格eslint规则 不要哭 严格是有好处的',
timestamp: '2020-04-17',
},
{
content: '彻底完成手机端适配,记录这一天熬夜到了晚上三点',
timestamp: '2020-04-18',
},
{
content:
'删除babel-polyfill 提高打包速度 减少压缩体积(放弃ie是这个项目做出的最伟大的决定)',
timestamp: '2020-04-18',
},
{
content: '源码精简至800k',
timestamp: '2020-04-19',
},
{
content: '添加视频播放器组件',
timestamp: '2020-04-20',
},
{
content: '修复路由懒加载 完善主题配色',
timestamp: '2020-04-22',
},
{
content: '修复全局axios拦截 加快动画展示效果 修改登录页样式',
timestamp: '2020-04-24',
},
{
content: '简化权限与登录逻辑 更新mockServer',
timestamp: '2020-04-25',
},
{
content: '优化登录退出逻辑 代码更清晰 退出不再重载网页 改为重载路由形式',
timestamp: '2020-04-26',
},
{
content: '无端的指责只会让我更加努力 修复sidebar 简化permission',
timestamp: '2020-04-28',
},
{
content: '又是一个深夜 实现了表格增删改查的一键生成',
timestamp: '2020-04-30',
},
{
content: '大幅优化tagsview标签动画',
timestamp: '2020-05-02',
},
{
content: '三种图标组件实现mock模拟分页',
timestamp: '2020-05-03',
},
{
content: '添加了markdown编辑器组件',
timestamp: '2020-05-04',
},
{
content: '添加stylelint-plus自动规整排序样式',
timestamp: '2020-05-06',
},
{
content: '添加商城模板',
timestamp: '2020-05-12',
},
{
content: 'github标星超过1000 感恩',
timestamp: '2020-05-13',
},
{
content: '添加验证码组件',
timestamp: '2020-05-14',
},
{
content: '修复横向菜单bug',
timestamp: '2020-05-16',
},
{
content: '又被人骂了 挺好的 让我下定决心重写了tabsBar',
timestamp: '2020-05-20',
},
{
content: '仿ant-design 添加雪花屏',
timestamp: '2020-05-26',
},
{
content: '添加人员管理模块',
timestamp: '2020-06-02',
},
{
content: 'github标星超过2000 感恩',
timestamp: '2020-06-03',
},
{
content: '添加炫酷地图组件',
timestamp: '2020-06-11',
},
{
content: '抽离更多公共配置,框架使用更顺手',
timestamp: '2020-06-19',
},
{
content: '彻底完成了tabsBar多标签页的重构',
timestamp: '2020-06-22',
},
{
content: '感恩github标星过3.0K 祝大家端午节快乐',
timestamp: '2020-06-25',
},
{
content: '彻底重构了SideBar与TopBar 大幅精简dom渲染逻辑 全球首发',
timestamp: '2020-06-25',
},
{
content: '添加菜单管理',
timestamp: '2020-07-7',
},
{
content: '首次采用sass-loader 9.0写法,感谢github用户 shaonialife',
timestamp: '2020-07-7',
},
{
content: '添加vue-amap组件',
timestamp: '2020-07-11',
},
{
content: '修改zx-layouts引入方式',
timestamp: '2020-07-15',
},
{
content:
'记录这一天vue-admin-beautiful在插件市场、百度已花费超过1万元广告费用,希望一切都值得',
timestamp: '2020-07-18',
},
{
content: '主题配置添加绿荫草场、荣耀典藏、暗黑之子模式',
timestamp: '2020-07-18',
},
{
content: '全局axios请求全面支持Status Code拦截处理',
timestamp: '2020-07-29',
},
{
content: '重构全局loadding加载代码',
timestamp: '2020-07-31',
},
{
content: '升级stylelint自动排序功能',
timestamp: '2020-08-25',
},
{
content: '修复视频播放器组件重载路由失效的bug',
timestamp: '2020-09-03',
},
{
content: '修复极个别情况image-loader打包报错',
timestamp: '2020-09-18',
},
{
content: '全网首个基于vue3.0开发的admin框架已发布,具体请访问github',
timestamp: '2020-09-22',
},
{
content: '完善路由后端渲染方案,弃用之前写法',
timestamp: '2020-09-30',
},
{
content: '大版本迭代,请关注github tag',
timestamp: '2020-09-30',
},
/* {
content:
"面对自称加拿大华人的捕蛇者说作者laike9m的发帖诋毁,和人身攻击,本想去知乎找他理论,可奈何他的知乎已经由于经常发布错误言论被官方封号了https://www.zhihu.com/people/laike9m,既然自己都不是中国人了,就不要妄加揣测国产的开源项目了,一切都交给时间吧,后来我释怀了,laike9m、Cruii这群人不止是抹黑我的框架,甚至还去抹黑中国民营企业的佼佼者华为,充满了无奈啊,也许只有发布这样的言论,他们的目的才能达到把 https://github.com/evil-huawei/evil-huawei",
timestamp: "2020-10-01",
}, */
{
content: '凌晨两点,我累了,移除无用组件,精简package',
timestamp: '2020-10-02',
},
{
content: '富文本编辑器支持精细化配置',
timestamp: '2020-10-20',
},
{
content: '公共布局支持自动导出',
timestamp: '2020-10-23',
},
{
content: '遮罩添加高斯模糊',
timestamp: '2020-10-25',
},
{
content: 'vue3.0 + element-plus版本正式上线',
timestamp: '2020-12-5',
},
{
content: '完成首页重构,跟进echarts 5.0',
timestamp: '2020-12-7',
},
{
content: '更新sass版本至最新',
timestamp: '2021-1-7',
},
{
content: '更新vue-echarts版本至最新,options变更为option',
timestamp: '2021-2-23',
},
{
content:
'开源版品牌名升级为vue-admin-beautiful-pro,付费版vue2.x品牌升级为Admin Pro,付费版vue3.x品牌名升级为Admin Plus',
timestamp: '最近更新',
},
]
module.exports = [
{
url: '/changeLog/getList',
type: 'post',
response() {
return {
code: 200,
msg: 'success',
totalCount: 999,
data: data,
}
},
},
]
-324
View File
@@ -1,324 +0,0 @@
const data = [
'alphabetical_sorting',
'alphabetical_sorting',
'alarm_clock',
'area_chart',
'approval',
'answers',
'approve',
'assistant',
'automotive',
'automatic',
'bad_decision',
'bar_chart',
'bearish',
'biomass',
'biohazard',
'binoculars',
'bookmark',
'briefcase',
'biotech',
'broken_link',
'business',
'bullish',
'business_contact',
'businesswoman',
'cable_release',
'calculator',
'businessman',
'calendar',
'butting_in',
'call_transfer',
'callback',
'camcorder',
'camera',
'camcorder_pro',
'cancel',
'camera_addon',
'camera_identificatio',
'capacitor',
'candle_sticks',
'checkmark',
'circuit',
'charge_battery',
'clear_filters',
'clapperboard',
'clock',
'close_up_mode',
'collaboration',
'cell_phone',
'collapse',
'collect',
'cloth',
'combo_chart',
'comments',
'conference_call',
'compact_camera',
'contacts',
'copyleft',
'copyright',
'crystal_oscillator',
'cursor',
'currency_exchange',
'customer_support',
'dam',
'data_backup',
'data_configuration',
'data_encryption',
'data_protection',
'data_recovery',
'database',
'data_sheet',
'debt',
'decision',
'delete_column',
'delete_database',
'department',
'delete_row',
'deployment',
'dislike',
'disapprove',
'disclaimer',
'display',
'document',
'do_not_insert',
'do_not_mix',
'do_not_inhale',
'donate',
'down',
'doughnut_chart',
'down_left',
'down_right',
'download',
'edit_image',
'electrical_sensor',
'electrical_threshold',
'electricity',
'electro_devices',
'electronics',
'empty_battery',
'empty_filter',
'empty_trash',
'end_call',
'engineering',
'entering_heaven_aliv',
'expand',
'export',
'expired',
'factory',
'factory_breakdown',
'external',
'faq',
'feed_in',
'file',
'feedback',
'film',
'filled_filter',
'filing_cabinet',
'film_reel',
'flash_auto',
'fine_print',
'flash_off',
'flash_on',
'flow_chart',
'folder',
'frame',
'full_battery',
'full_trash',
'gallery',
'generic_sorting_asc',
'generic_sorting_desc',
'genealogy',
'globe',
'good_decision',
'headset',
'grid',
'graduation_cap',
'heat_map',
'high_priority',
'high_battery',
'image_file',
'home',
'idea',
'import',
'in_transit',
'integrated_webcam',
'inspection',
'invite',
'internal',
'ipad',
'info',
'iphone',
'kindle',
'key',
'landscape',
'left',
'left_down',
'left_up',
'leave',
'like_placeholder',
'light_at_the_end_of_',
'library',
'line_chart',
'link',
'like',
'lock',
'list',
'lock_landscape',
'low_battery',
'lock_portrait',
'low_priority',
'make_decision',
'medium_priority',
'manager',
'menu',
'middle_battery',
'minus',
'missed_call',
'mind_map',
'mms',
'multiple_cameras',
'money_transfer',
'music',
'multiple_devices',
'multiple_smartphones',
'multiple_inputs',
'negative_dynamic',
'neutral_decision',
'night_landscape',
'news',
'neutral_trading',
'night_portrait',
'no_idea',
'next',
'no_video',
'nook',
'ok',
'org_unit',
'opened_folder',
'old_time_camera',
'online_support',
'organization',
'package',
'paid',
'parallel_tasks',
'overtime',
'panorama',
'phone',
'phone_android',
'photo_reel',
'pie_chart',
'picture',
'planner',
'plus',
'podium_with_audience',
'podium_without_speak',
'podium_with_speaker',
'previous',
'portrait_mode',
'positive_dynamic',
'privacy',
'process',
'puzzle',
'questions',
'print',
'radar_plot',
'rating',
'ratings',
'reading',
'redo',
'reading_ebook',
'refresh',
'registered_trademark',
'right',
'reuse',
'remove_image',
'right_down',
'right_up',
'rotate_to_portrait',
'rules',
'rotate_camera',
'rotate_to_landscape',
'ruler',
'scatter_plot',
'search',
'safe',
'self_service_kiosk',
'selfie',
'serial_tasks',
'sales_performance',
'settings',
'services',
'share',
'shipped',
'sim_card',
'shop',
'service_mark',
'sim_card_chip',
'signature',
'smartphone_tablet',
'sound_recording_copy',
'sms',
'speaker',
'slr_back_side',
'start',
'stack_of_photos',
'statistics',
'sports_mode',
'support',
'synchronize',
'switch_camera',
'survey',
'tablet_android',
'template',
'trademark',
'todo_list',
'touchscreen_smartpho',
'timeline',
'tree_structure',
'undo',
'up_left',
'two_smartphones',
'unlock',
'up',
'up_right',
'upload',
'video_call',
'video_file',
'view_details',
'video_projector',
'vip',
'voice_presentation',
'webcam',
'voicemail',
'workflow',
'about',
'accept_database',
'add_image',
'add_column',
'add_database',
'add_row',
]
module.exports = [
{
url: '/colorfulIcon/getList',
type: 'post',
response(config) {
const { title, pageNo = 1, pageSize = 72 } = config.body
let mockList = data.filter((item) => {
if (title && item.indexOf(title) < 0) return false
return true
})
const pageList = mockList.filter(
(item, index) =>
index < pageSize * pageNo && index >= pageSize * (pageNo - 1)
)
return {
code: 200,
msg: 'success',
totalCount: mockList.length,
data: pageList,
}
},
},
]
-43
View File
@@ -1,43 +0,0 @@
const { mock } = require('mockjs')
const List = []
const count = 999
let num = 0
for (let i = 0; i < count; i++) {
List.push(
mock({
uuid: '@uuid',
image: `https://picsum.photos/300/600?random=${num++}`,
title: '@ctitle',
description: '@csentence',
link: 'https://www.baidu.com',
price: '@integer(100, 500)',
'status|1': [1, 0],
'isRecommend|1': [1, 0],
})
)
}
module.exports = [
{
url: '/goodsList/getList',
type: 'post',
response(config) {
const { title = '', pageNo = 1, pageSize = 20 } = config.body
let mockList = List.filter((item) => {
if (title && item.title.indexOf(title) < 0) return false
return true
})
const pageList = mockList.filter(
(item, index) =>
index < pageSize * pageNo && index >= pageSize * (pageNo - 1)
)
return {
code: 200,
msg: 'success',
totalCount: count,
data: pageList,
}
},
},
]
-985
View File
@@ -1,985 +0,0 @@
const data = [
'air-freshener',
'align-center',
'align-justify',
'align-left',
'align-right',
'allergies',
'ambulance',
'american-sign-language-interpreting',
'anchor',
'angle-double-down',
'angle-double-left',
'angle-double-right',
'angle-double-up',
'angle-down',
'angle-left',
'angle-right',
'angle-up',
'angry',
'ankh',
'apple-alt',
'archive',
'archway',
'arrow-alt-circle-down',
'arrow-alt-circle-left',
'arrow-alt-circle-right',
'arrow-alt-circle-up',
'arrow-circle-down',
'arrow-circle-left',
'arrow-circle-right',
'arrow-circle-up',
'arrow-down',
'arrow-left',
'arrow-right',
'arrow-up',
'arrows-alt',
'arrows-alt-h',
'arrows-alt-v',
'assistive-listening-systems',
'asterisk',
'at',
'atlas',
'atom',
'audio-description',
'award',
'baby',
'baby-carriage',
'backspace',
'backward',
'bacon',
'bahai',
'balance-scale',
'balance-scale-left',
'balance-scale-right',
'ban',
'band-aid',
'barcode',
'bars',
'baseball-ball',
'basketball-ball',
'bath',
'battery-empty',
'battery-full',
'battery-half',
'battery-quarter',
'battery-three-quarters',
'bed',
'beer',
'bell',
'bell-slash',
'bezier-curve',
'bible',
'bicycle',
'biking',
'binoculars',
'biohazard',
'birthday-cake',
'blender',
'blender-phone',
'blind',
'blog',
'bold',
'bolt',
'bomb',
'bone',
'bong',
'book',
'book-dead',
'book-medical',
'book-open',
'book-reader',
'bookmark',
'border-all',
'border-none',
'border-style',
'bowling-ball',
'box',
'box-open',
'boxes',
'braille',
'brain',
'bread-slice',
'briefcase',
'briefcase-medical',
'broadcast-tower',
'broom',
'brush',
'bug',
'building',
'bullhorn',
'bullseye',
'burn',
'bus',
'bus-alt',
'business-time',
'calculator',
'calendar',
'calendar-alt',
'calendar-check',
'calendar-day',
'calendar-minus',
'calendar-plus',
'calendar-times',
'calendar-week',
'camera',
'camera-retro',
'campground',
'candy-cane',
'cannabis',
'capsules',
'car',
'car-alt',
'car-battery',
'car-crash',
'car-side',
'caravan',
'caret-down',
'caret-left',
'caret-right',
'caret-square-down',
'caret-square-left',
'caret-square-right',
'caret-square-up',
'caret-up',
'carrot',
'cart-arrow-down',
'cart-plus',
'cash-register',
'cat',
'certificate',
'chair',
'chalkboard',
'chalkboard-teacher',
'charging-station',
'chart-area',
'chart-bar',
'chart-line',
'chart-pie',
'check',
'check-circle',
'check-double',
'check-square',
'cheese',
'chess',
'chess-bishop',
'chess-board',
'chess-king',
'chess-knight',
'chess-pawn',
'chess-queen',
'chess-rook',
'chevron-circle-down',
'chevron-circle-left',
'chevron-circle-right',
'chevron-circle-up',
'chevron-down',
'chevron-left',
'chevron-right',
'chevron-up',
'child',
'church',
'circle',
'circle-notch',
'city',
'clinic-medical',
'clipboard',
'clipboard-check',
'clipboard-list',
'clock',
'clone',
'closed-captioning',
'cloud',
'cloud-download-alt',
'cloud-meatball',
'cloud-moon',
'cloud-moon-rain',
'cloud-rain',
'cloud-showers-heavy',
'cloud-sun',
'cloud-sun-rain',
'cloud-upload-alt',
'cocktail',
'code',
'code-branch',
'coffee',
'cog',
'cogs',
'coins',
'columns',
'comment',
'comment-alt',
'comment-dollar',
'comment-dots',
'comment-medical',
'comment-slash',
'comments',
'comments-dollar',
'compact-disc',
'compass',
'compress',
'compress-alt',
'compress-arrows-alt',
'concierge-bell',
'cookie',
'cookie-bite',
'copy',
'copyright',
'couch',
'credit-card',
'crop',
'crop-alt',
'cross',
'crosshairs',
'crow',
'crown',
'crutch',
'cube',
'cubes',
'cut',
'database',
'deaf',
'democrat',
'desktop',
'dharmachakra',
'diagnoses',
'dice',
'dice-d20',
'dice-d6',
'dice-five',
'dice-four',
'dice-one',
'dice-six',
'dice-three',
'dice-two',
'digital-tachograph',
'directions',
'divide',
'dizzy',
'dna',
'dog',
'dollar-sign',
'dolly',
'dolly-flatbed',
'donate',
'door-closed',
'door-open',
'dot-circle',
'dove',
'download',
'drafting-compass',
'dragon',
'draw-polygon',
'drum',
'drum-steelpan',
'drumstick-bite',
'dumbbell',
'dumpster',
'dumpster-fire',
'dungeon',
'edit',
'egg',
'eject',
'ellipsis-h',
'ellipsis-v',
'envelope',
'envelope-open',
'envelope-open-text',
'envelope-square',
'equals',
'eraser',
'ethernet',
'euro-sign',
'exchange-alt',
'exclamation',
'exclamation-circle',
'exclamation-triangle',
'expand',
'expand-alt',
'expand-arrows-alt',
'external-link-alt',
'external-link-square-alt',
'eye',
'eye-dropper',
'eye-slash',
'fan',
'fast-backward',
'fast-forward',
'fax',
'feather',
'feather-alt',
'female',
'fighter-jet',
'file',
'file-alt',
'file-archive',
'file-audio',
'file-code',
'file-contract',
'file-csv',
'file-download',
'file-excel',
'file-export',
'file-image',
'file-import',
'file-invoice',
'file-invoice-dollar',
'file-medical',
'file-medical-alt',
'file-pdf',
'file-powerpoint',
'file-prescription',
'file-signature',
'file-upload',
'file-video',
'file-word',
'fill',
'fill-drip',
'film',
'filter',
'fingerprint',
'fire',
'fire-alt',
'fire-extinguisher',
'first-aid',
'fish',
'fist-raised',
'flag',
'flag-checkered',
'flag-usa',
'flask',
'flushed',
'folder',
'folder-minus',
'folder-open',
'folder-plus',
'font',
'football-ball',
'forward',
'frog',
'frown',
'frown-open',
'funnel-dollar',
'futbol',
'gamepad',
'gas-pump',
'gavel',
'gem',
'genderless',
'ghost',
'gift',
'gifts',
'glass-cheers',
'glass-martini',
'glass-martini-alt',
'glass-whiskey',
'glasses',
'globe',
'globe-africa',
'globe-americas',
'globe-asia',
'globe-europe',
'golf-ball',
'gopuram',
'graduation-cap',
'greater-than',
'greater-than-equal',
'grimace',
'grin',
'grin-alt',
'grin-beam',
'grin-beam-sweat',
'grin-hearts',
'grin-squint',
'grin-squint-tears',
'grin-stars',
'grin-tears',
'grin-tongue',
'grin-tongue-squint',
'grin-tongue-wink',
'grin-wink',
'grip-horizontal',
'grip-lines',
'grip-lines-vertical',
'grip-vertical',
'guitar',
'h-square',
'hamburger',
'hammer',
'hamsa',
'hand-holding',
'hand-holding-heart',
'hand-holding-usd',
'hand-lizard',
'hand-middle-finger',
'hand-paper',
'hand-peace',
'hand-point-down',
'hand-point-left',
'hand-point-right',
'hand-point-up',
'hand-pointer',
'hand-rock',
'hand-scissors',
'hand-spock',
'hands',
'hands-helping',
'handshake',
'hanukiah',
'hard-hat',
'hashtag',
'hat-cowboy',
'hat-cowboy-side',
'hat-wizard',
'hdd',
'heading',
'headphones',
'headphones-alt',
'headset',
'heart',
'heart-broken',
'heartbeat',
'helicopter',
'highlighter',
'hiking',
'hippo',
'history',
'hockey-puck',
'holly-berry',
'home',
'horse',
'horse-head',
'hospital',
'hospital-alt',
'hospital-symbol',
'hot-tub',
'hotdog',
'hotel',
'hourglass',
'hourglass-end',
'hourglass-half',
'hourglass-start',
'house-damage',
'hryvnia',
'i-cursor',
'ice-cream',
'icicles',
'icons',
'id-badge',
'id-card',
'id-card-alt',
'igloo',
'image',
'images',
'inbox',
'indent',
'industry',
'infinity',
'info',
'info-circle',
'italic',
'jedi',
'joint',
'journal-whills',
'kaaba',
'key',
'keyboard',
'khanda',
'kiss',
'kiss-beam',
'kiss-wink-heart',
'kiwi-bird',
'landmark',
'language',
'laptop',
'laptop-code',
'laptop-medical',
'laugh',
'laugh-beam',
'laugh-squint',
'laugh-wink',
'layer-group',
'leaf',
'lemon',
'less-than',
'less-than-equal',
'level-down-alt',
'level-up-alt',
'life-ring',
'lightbulb',
'link',
'lira-sign',
'list',
'list-alt',
'list-ol',
'list-ul',
'location-arrow',
'lock',
'lock-open',
'long-arrow-alt-down',
'long-arrow-alt-left',
'long-arrow-alt-right',
'long-arrow-alt-up',
'low-vision',
'luggage-cart',
'magic',
'magnet',
'mail-bulk',
'male',
'map',
'map-marked',
'map-marked-alt',
'map-marker',
'map-marker-alt',
'map-pin',
'map-signs',
'marker',
'mars',
'mars-double',
'mars-stroke',
'mars-stroke-h',
'mars-stroke-v',
'mask',
'medal',
'medkit',
'meh',
'meh-blank',
'meh-rolling-eyes',
'memory',
'menorah',
'mercury',
'meteor',
'microchip',
'microphone',
'microphone-alt',
'microphone-alt-slash',
'microphone-slash',
'microscope',
'minus',
'minus-circle',
'minus-square',
'mitten',
'mobile',
'mobile-alt',
'money-bill',
'money-bill-alt',
'money-bill-wave',
'money-bill-wave-alt',
'money-check',
'money-check-alt',
'monument',
'moon',
'mortar-pestle',
'mosque',
'motorcycle',
'mountain',
'mouse',
'mouse-pointer',
'mug-hot',
'music',
'network-wired',
'neuter',
'newspaper',
'not-equal',
'notes-medical',
'object-group',
'object-ungroup',
'oil-can',
'om',
'otter',
'outdent',
'pager',
'paint-brush',
'paint-roller',
'palette',
'pallet',
'paper-plane',
'paperclip',
'parachute-box',
'paragraph',
'parking',
'passport',
'pastafarianism',
'paste',
'pause',
'pause-circle',
'paw',
'peace',
'pen',
'pen-alt',
'pen-fancy',
'pen-nib',
'pen-square',
'pencil-alt',
'pencil-ruler',
'people-carry',
'pepper-hot',
'percent',
'percentage',
'person-booth',
'phone',
'phone-alt',
'phone-slash',
'phone-square',
'phone-square-alt',
'phone-volume',
'photo-video',
'piggy-bank',
'pills',
'pizza-slice',
'place-of-worship',
'plane',
'plane-arrival',
'plane-departure',
'play',
'play-circle',
'plug',
'plus',
'plus-circle',
'plus-square',
'podcast',
'poll',
'poll-h',
'poo',
'poo-storm',
'poop',
'portrait',
'pound-sign',
'power-off',
'pray',
'praying-hands',
'prescription',
'prescription-bottle',
'prescription-bottle-alt',
'print',
'procedures',
'project-diagram',
'puzzle-piece',
'qrcode',
'question',
'question-circle',
'quidditch',
'quote-left',
'quote-right',
'quran',
'radiation',
'radiation-alt',
'rainbow',
'random',
'receipt',
'record-vinyl',
'recycle',
'redo',
'redo-alt',
'registered',
'remove-format',
'reply',
'reply-all',
'republican',
'restroom',
'retweet',
'ribbon',
'ring',
'road',
'robot',
'rocket',
'route',
'rss',
'rss-square',
'ruble-sign',
'ruler',
'ruler-combined',
'ruler-horizontal',
'ruler-vertical',
'running',
'rupee-sign',
'sad-cry',
'sad-tear',
'satellite',
'satellite-dish',
'save',
'school',
'screwdriver',
'scroll',
'sd-card',
'search',
'search-dollar',
'search-location',
'search-minus',
'search-plus',
'seedling',
'server',
'shapes',
'share',
'share-alt',
'share-alt-square',
'share-square',
'shekel-sign',
'shield-alt',
'ship',
'shipping-fast',
'shoe-prints',
'shopping-bag',
'shopping-basket',
'shopping-cart',
'shower',
'shuttle-van',
'sign',
'sign-in-alt',
'sign-language',
'sign-out-alt',
'signal',
'signature',
'sim-card',
'sitemap',
'skating',
'skiing',
'skiing-nordic',
'skull',
'skull-crossbones',
'slash',
'sleigh',
'sliders-h',
'smile',
'smile-beam',
'smile-wink',
'smog',
'smoking',
'smoking-ban',
'sms',
'snowboarding',
'snowflake',
'snowman',
'snowplow',
'socks',
'solar-panel',
'sort',
'sort-alpha-down',
'sort-alpha-down-alt',
'sort-alpha-up',
'sort-alpha-up-alt',
'sort-amount-down',
'sort-amount-down-alt',
'sort-amount-up',
'sort-amount-up-alt',
'sort-down',
'sort-numeric-down',
'sort-numeric-down-alt',
'sort-numeric-up',
'sort-numeric-up-alt',
'sort-up',
'spa',
'space-shuttle',
'spell-check',
'spider',
'spinner',
'splotch',
'spray-can',
'square',
'square-full',
'square-root-alt',
'stamp',
'star',
'star-and-crescent',
'star-half',
'star-half-alt',
'star-of-david',
'star-of-life',
'step-backward',
'step-forward',
'stethoscope',
'sticky-note',
'stop',
'stop-circle',
'stopwatch',
'store',
'store-alt',
'stream',
'street-view',
'strikethrough',
'stroopwafel',
'subscript',
'subway',
'suitcase',
'suitcase-rolling',
'sun',
'superscript',
'surprise',
'swatchbook',
'swimmer',
'swimming-pool',
'synagogue',
'sync',
'sync-alt',
'syringe',
'table',
'table-tennis',
'tablet',
'tablet-alt',
'tablets',
'tachometer-alt',
'tag',
'tags',
'tape',
'tasks',
'taxi',
'teeth',
'teeth-open',
'temperature-high',
'temperature-low',
'tenge',
'terminal',
'text-height',
'text-width',
'th',
'th-large',
'th-list',
'theater-masks',
'thermometer',
'thermometer-empty',
'thermometer-full',
'thermometer-half',
'thermometer-quarter',
'thermometer-three-quarters',
'thumbs-down',
'thumbs-up',
'thumbtack',
'ticket-alt',
'times',
'times-circle',
'tint',
'tint-slash',
'tired',
'toggle-off',
'toggle-on',
'toilet',
'toilet-paper',
'toolbox',
'tools',
'tooth',
'torah',
'torii-gate',
'tractor',
'trademark',
'traffic-light',
'trailer',
'train',
'tram',
'transgender',
'transgender-alt',
'trash',
'trash-alt',
'trash-restore',
'trash-restore-alt',
'tree',
'trophy',
'truck',
'truck-loading',
'truck-monster',
'truck-moving',
'truck-pickup',
'tshirt',
'tty',
'tv',
'umbrella',
'umbrella-beach',
'underline',
'undo',
'undo-alt',
'universal-access',
'university',
'unlink',
'unlock',
'unlock-alt',
'upload',
'user',
'user-alt',
'user-alt-slash',
'user-astronaut',
'user-check',
'user-circle',
'user-clock',
'user-cog',
'user-edit',
'user-friends',
'user-graduate',
'user-injured',
'user-lock',
'user-md',
'user-minus',
'user-ninja',
'user-nurse',
'user-plus',
'user-secret',
'user-shield',
'user-slash',
'user-tag',
'user-tie',
'user-times',
'users',
'users-cog',
'utensil-spoon',
'utensils',
'vector-square',
'venus',
'venus-double',
'venus-mars',
'vial',
'vials',
'video',
'video-slash',
'vihara',
'voicemail',
'volleyball-ball',
'volume-down',
'volume-mute',
'volume-off',
'volume-up',
'vote-yea',
'vr-cardboard',
'walking',
'wallet',
'warehouse',
'water',
'wave-square',
'weight',
'weight-hanging',
'wheelchair',
'wifi',
'wind',
'window-close',
'window-maximize',
'window-minimize',
'window-restore',
'wine-bottle',
'wine-glass',
'wine-glass-alt',
'won-sign',
'wrench',
'x-ray',
'yen-sign',
'yin-yang',
]
module.exports = [
{
url: '/icon/getList',
type: 'post',
response(config) {
const { title, pageNo = 1, pageSize = 72 } = config.body
let mockList = data.filter((item) => {
if (title && item.indexOf(title) < 0) return false
return true
})
const pageList = mockList.filter(
(item, index) =>
index < pageSize * pageNo && index >= pageSize * (pageNo - 1)
)
return {
code: 200,
msg: 'success',
totalCount: mockList.length,
data: pageList,
}
},
},
]
-51
View File
@@ -1,51 +0,0 @@
module.exports = [
{
url: '/menuManagement/getTree',
type: 'post',
response() {
return {
code: 200,
msg: 'success',
totalCount: 999,
data: [
{
id: 'root',
label: '全部角色',
children: [
{
id: '@id',
permission: 'admin',
label: 'admin角色',
},
{
id: '@id',
permission: 'editor',
label: 'editor角色',
},
],
},
],
}
},
},
{
url: '/menuManagement/doEdit',
type: 'post',
response() {
return {
code: 200,
msg: '模拟保存成功',
}
},
},
{
url: '/menuManagement/doDelete',
type: 'post',
response() {
return {
code: 200,
msg: '模拟删除成功',
}
},
},
]
-33
View File
@@ -1,33 +0,0 @@
const data = [
{
title:
'温馨提示:集成版虽功能丰富,但冗余依赖过多,建议开发时使用基础版进行开发 Vab Admin Plusvue3.0 + element-plus)已发布,欢迎体验:<a target="_blank" href="https://chu1204505056.gitee.io/admin-plus/?hmsr=homeAd&hmpl=&hmcu=&hmkw=&hmci=#/index">Vab Admin Plus</a>',
closable: false,
type: 'success',
},
{
title:
'作者寄语:感谢Star,感恩相遇,愿世间美好与我们环环相扣,加油!屏幕前的我们,打破桎梏,坚守初心。其实人生改变命运的机会并没有太多,我们并不是不优秀,我们也并不是一无是处,我们也希望驻足山巅被众人仰望,也许我们缺少的只是一个机会,缺少的只是生命中的导师,我希望这个框架帮助到更多的人,希望有一天,我们面试的时候不再胆怯,希望有一天别人看到的不仅仅是你的努力,还有你的功成名就,出人头地。',
closable: false,
type: 'warning',
},
{
title:
'随笔:我一直在寻找开源的真谛,我一直再想什么是开源,我一开始觉得免费就是开源,好像又不是。我理解的开源是:你也开源,我也开源,大家一起贡献,相互帮助。我最担心的事情是:我一个小人物,去伺候一众的伸手党,我想,这不是开源该有的氛围。我还太年轻,不懂什么是格局,我只知道,无私的帮助他人,能给我带来快乐,却不能给我带来收入,当然,有时候,快乐对我来说就已经足够了。可惜我是一个人,没有精力帮助到每一个人,可惜这个世界需要赚钱,才能过上平凡的生活,可惜了我的梦想,这个物欲横流的时代,理想主义的我们,即使内心坚决如铁,也似乎寸步难行。',
closable: false,
type: 'success',
},
]
module.exports = [
{
url: '/notice/getList',
type: 'post',
response() {
return {
code: 200,
msg: 'success',
data,
}
},
},
]
-42
View File
@@ -1,42 +0,0 @@
const { mock } = require('mockjs')
module.exports = [
{
url: '/personalCenter/getList',
type: 'post',
response(config) {
return {
code: 200,
msg: 'success',
totalCount: 999,
data: mock({
'data|10': [
{
id: '@id',
},
],
}).data,
}
},
},
{
url: '/personalCenter/doEdit',
type: 'post',
response() {
return {
code: 200,
msg: '模拟保存成功',
}
},
},
{
url: '/personalCenter/doDelete',
type: 'post',
response() {
return {
code: 200,
msg: '模拟删除成功',
}
},
},
]
File diff suppressed because it is too large Load Diff
-53
View File
@@ -1,53 +0,0 @@
const totalCount = 2
const List = [
{
id: '@id',
permission: 'admin',
},
{
id: '@id',
permission: 'editor',
},
]
module.exports = [
{
url: '/roleManagement/getList',
type: 'post',
response(config) {
const { title = '', pageNo = 1, pageSize = 20 } = config.body
let mockList = List.filter((item) => {
return !(title && item.title.indexOf(title) < 0)
})
const pageList = mockList.filter(
(item, index) =>
index < pageSize * pageNo && index >= pageSize * (pageNo - 1)
)
return {
code: 200,
msg: 'success',
totalCount,
data: pageList,
}
},
},
{
url: '/roleManagement/doEdit',
type: 'post',
response() {
return {
code: 200,
msg: '模拟保存成功',
}
},
},
{
url: '/roleManagement/doDelete',
type: 'post',
response() {
return {
code: 200,
msg: '模拟删除成功',
}
},
},
]
-298
View File
@@ -1,298 +0,0 @@
const data = [
{
path: '/',
component: 'Layout',
redirect: 'index',
children: [
{
path: 'index',
name: 'Index',
component: '@/views/index/index',
meta: {
title: '首页',
icon: 'home',
affix: true,
},
},
],
},
{
path: '/personnelManagement',
component: 'Layout',
redirect: 'noRedirect',
name: 'PersonnelManagement',
meta: { title: '人员', icon: 'users-cog', permissions: ['admin'] },
children: [
{
path: 'userManagement',
name: 'UserManagement',
component: '@/views/personnelManagement/userManagement/index',
meta: { title: '用户管理' },
},
{
path: 'roleManagement',
name: 'RoleManagement',
component: '@/views/personnelManagement/roleManagement/index',
meta: { title: '角色管理' },
},
{
path: 'menuManagement',
name: 'MenuManagement',
component: '@/views/personnelManagement/menuManagement/index',
meta: { title: '菜单管理', badge: 'New' },
},
],
},
{
path: '/vab',
component: 'Layout',
redirect: 'noRedirect',
name: 'Vab',
alwaysShow: true,
meta: { title: '组件', icon: 'cloud' },
children: [
{
path: 'permissions',
name: 'Permission',
component: '@/views/vab/permissions/index',
meta: {
title: '权限控制',
permissions: ['admin', 'editor'],
badge: 'New',
},
},
{
path: 'icon',
component: 'EmptyLayout',
redirect: 'noRedirect',
name: 'Icon',
meta: {
title: '图标',
permissions: ['admin'],
},
children: [
{
path: 'awesomeIcon',
name: 'AwesomeIcon',
component: '@/views/vab/icon/index',
meta: { title: '常规图标' },
},
{
path: 'remixIcon',
name: 'RemixIcon',
component: '@/views/vab/icon/remixIcon',
meta: { title: '小清新图标' },
},
{
path: 'colorfulIcon',
name: 'ColorfulIcon',
component: '@/views/vab/icon/colorfulIcon',
meta: { title: '多彩图标' },
},
],
},
{
path: 'table',
component: '@/views/vab/table/index',
name: 'Table',
meta: {
title: '表格',
permissions: ['admin'],
},
},
{
path: 'map',
name: 'Map',
component: '@/views/vab/map/index',
meta: { title: '地图', permissions: ['admin'], badge: 'Pro' },
},
{
path: 'webSocket',
name: 'WebSocket',
component: '@/views/vab/webSocket/index',
meta: { title: 'webSocket', permissions: ['admin'] },
},
{
path: 'form',
name: 'Form',
component: '@/views/vab/form/index',
meta: { title: '表单', permissions: ['admin'] },
},
{
path: 'element',
name: 'Element',
component: '@/views/vab/element/index',
meta: { title: '常用组件', permissions: ['admin'] },
},
{
path: 'tree',
name: 'Tree',
component: '@/views/vab/tree/index',
meta: { title: '树', permissions: ['admin'] },
},
{
path: 'verify',
name: 'Verify',
component: '@/views/vab/verify/index',
meta: { title: '验证码', permissions: ['admin'] },
},
{
path: 'menu1',
component: '@/views/vab/nested/menu1/index',
name: 'Menu1',
alwaysShow: true,
meta: {
title: '嵌套路由 1',
permissions: ['admin'],
},
children: [
{
path: 'menu1-1',
name: 'Menu1-1',
alwaysShow: true,
meta: { title: '嵌套路由 1-1' },
component: '@/views/vab/nested/menu1/menu1-1/index',
children: [
{
path: 'menu1-1-1',
name: 'Menu1-1-1',
meta: { title: '嵌套路由 1-1-1' },
component: '@/views/vab/nested/menu1/menu1-1/menu1-1-1/index',
},
],
},
],
},
{
path: 'magnifier',
name: 'Magnifier',
component: '@/views/vab/magnifier/index',
meta: { title: '放大镜', permissions: ['admin'] },
},
{
path: 'loading',
name: 'Loading',
component: '@/views/vab/loading/index',
meta: { title: 'loading', permissions: ['admin'] },
},
{
path: 'player',
name: 'Player',
component: '@/views/vab/player/index',
meta: { title: '视频播放器', permissions: ['admin'] },
},
{
path: 'markdownEditor',
name: 'MarkdownEditor',
component: '@/views/vab/markdownEditor/index',
meta: { title: 'markdown编辑器', permissions: ['admin'] },
},
{
path: 'editor',
name: 'Editor',
component: '@/views/vab/editor/index',
meta: { title: '富文本编辑器', permissions: ['admin'], badge: 'New' },
},
{
path: 'backToTop',
name: 'BackToTop',
component: '@/views/vab/backToTop/index',
meta: { title: '返回顶部', permissions: ['admin'] },
},
{
path: 'lodash',
name: 'Lodash',
component: '@/views/vab/lodash/index',
meta: { title: 'lodash', permissions: ['admin'] },
},
{
path: 'smallComponents',
name: 'SmallComponents',
component: '@/views/vab/smallComponents/index',
meta: { title: '小组件', permissions: ['admin'] },
},
{
path: 'upload',
name: 'Upload',
component: '@/views/vab/upload/index',
meta: { title: '上传', permissions: ['admin'] },
},
{
path: 'log',
name: 'Log',
component: '@/views/vab/errorLog/index',
meta: { title: '错误日志模拟', permissions: ['admin'] },
},
{
path: 'more',
name: 'More',
component: '@/views/vab/more/index',
meta: { title: '关于', permissions: ['admin'] },
},
],
},
{
path: '/mall',
component: 'Layout',
redirect: 'noRedirect',
name: 'Mall',
meta: {
title: '商城',
icon: 'shopping-cart',
permissions: ['admin'],
},
children: [
{
path: 'pay',
name: 'Pay',
component: '@/views/mall/pay/index',
meta: {
title: '支付',
noKeepAlive: true,
},
children: null,
},
{
path: 'goodsList',
name: 'GoodsList',
component: '@/views/mall/goodsList/index',
meta: {
title: '商品列表',
},
},
],
},
{
path: '/error',
component: 'EmptyLayout',
redirect: 'noRedirect',
name: 'Error',
meta: { title: '错误页', icon: 'bug' },
children: [
{
path: '401',
name: 'Error401',
component: '@/views/401',
meta: { title: '401' },
},
{
path: '404',
name: 'Error404',
component: '@/views/404',
meta: { title: '404' },
},
],
},
]
module.exports = [
{
url: '/menu/navigate',
type: 'post',
response() {
return { code: 200, msg: 'success', data: data }
},
},
]
-88
View File
@@ -1,88 +0,0 @@
const { mock } = require('mockjs')
const { handleRandomImage } = require('../utils')
const List = []
const count = 999
for (let i = 0; i < count; i++) {
List.push(
mock({
uuid: '@uuid',
id: '@id',
title: '@csentence(1, 2)',
'status|1': ['published', 'draft', 'deleted'],
author: '@cname',
datetime: '@datetime',
pageViews: '@integer(300, 5000)',
img: handleRandomImage(200, 200),
smallImg: handleRandomImage(40, 40),
switch: '@boolean',
percent: '@integer(80,99)',
})
)
}
module.exports = [
{
url: '/table/getList',
type: 'post',
response(config) {
if (!config.body) {
return {
code: 200,
msg: 'success',
totalCount: count,
data: mock({
'data|50': [
{
id: '@id',
title: '@csentence(1, 2)',
'status|1': ['published', 'draft', 'deleted'],
author: '@cname',
datetime: '@datetime',
pageViews: '@integer(300, 5000)',
img: handleRandomImage(200, 200),
smallImg: handleRandomImage(40, 40),
switch: '@boolean',
percent: '@integer(80,99)',
},
],
}).data,
}
}
const { title = '', pageNo = 1, pageSize = 20 } = config.body
let mockList = List.filter((item) => {
return !(title && item.title.indexOf(title) < 0)
})
const pageList = mockList.filter(
(item, index) =>
index < pageSize * pageNo && index >= pageSize * (pageNo - 1)
)
return {
code: 200,
msg: 'success',
totalCount: count,
data: pageList,
}
},
},
{
url: '/table/doEdit',
type: 'post',
response() {
return {
code: 200,
msg: '模拟保存成功',
}
},
},
{
url: '/table/doDelete',
type: 'post',
response() {
return {
code: 200,
msg: '模拟删除成功',
}
},
},
]
-54
View File
@@ -1,54 +0,0 @@
const data = [
{
id: '1',
parentId: '0',
name: 'root',
title: 'root',
text: 'root',
value: '1',
rank: 1,
children: [
{
id: '32816b88ff72423f960e7d492a386131',
parentId: '1',
name: '一级',
title: '一级',
text: '一级',
value: '32816b88ff72423f960e7d492a386131',
rank: 2,
children: [
{
id: '9e11afc35d55475fb0bd3164b9684cbe',
parentId: '32816b88ff72423f960e7d492a386131',
name: '二级',
title: '二级',
text: '二级',
value: '9e11afc35d55475fb0bd3164b9684cbe',
rank: 3,
children: [
{
id: '4cc1b04635e4444292526c5391699077',
parentId: '9e11afc35d55475fb0bd3164b9684cbe',
name: '三级',
title: '三级',
text: '三级',
value: '4cc1b04635e4444292526c5391699077',
rank: 4,
children: [],
},
],
},
],
},
],
},
]
module.exports = [
{
url: '/tree/list',
type: 'post',
response() {
return { code: 200, msg: 'success', data }
},
},
]
-95
View File
@@ -1,95 +0,0 @@
const accessTokens = {
admin: 'admin-accessToken',
editor: 'editor-accessToken',
test: 'test-accessToken',
}
module.exports = [
{
url: '/publicKey',
type: 'post',
response() {
return {
code: 200,
msg: 'success',
data: {
mockServer: true,
publicKey:
'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDBT2vr+dhZElF73FJ6xiP181txKWUSNLPQQlid6DUJhGAOZblluafIdLmnUyKE8mMHhT3R+Ib3ssZcJku6Hn72yHYj/qPkCGFv0eFo7G+GJfDIUeDyalBN0QsuiE/XzPHJBuJDfRArOiWvH0BXOv5kpeXSXM8yTt5Na1jAYSiQ/wIDAQAB',
},
}
},
},
{
url: '/login',
type: 'post',
response(config) {
const { username } = config.body
const accessToken = accessTokens[username]
if (!accessToken) {
return {
code: 500,
msg: '帐户或密码不正确。',
}
}
return {
code: 200,
msg: 'success',
data: { accessToken },
}
},
},
{
url: '/register',
type: 'post',
response() {
return {
code: 200,
msg: '模拟注册成功',
}
},
},
{
url: '/userInfo',
type: 'post',
response(config) {
const { accessToken } = config.body
let permissions = ['admin']
let username = 'admin'
if ('admin-accessToken' === accessToken) {
permissions = ['admin']
username = 'admin'
}
if ('editor-accessToken' === accessToken) {
permissions = ['editor']
username = 'editor'
}
if ('test-accessToken' === accessToken) {
permissions = ['admin', 'editor']
username = 'test'
}
return {
code: 200,
msg: 'success',
data: {
permissions,
username,
'avatar|1': [
'https://i.gtimg.cn/club/item/face/img/2/15922_100.gif',
'https://i.gtimg.cn/club/item/face/img/8/15918_100.gif',
],
},
}
},
},
{
url: '/logout',
type: 'post',
response() {
return {
code: 200,
msg: 'success',
}
},
},
]
-70
View File
@@ -1,70 +0,0 @@
const totalCount = 3
const List = [
{
id: '@id',
username: 'admin',
password: 'admin',
email: '@email',
permissions: ['admin'],
datatime: '@datetime',
},
{
id: '@id',
username: 'editor',
password: 'editor',
email: '@email',
permissions: ['editor'],
datatime: '@datetime',
},
{
id: '@id',
username: 'test',
password: 'test',
email: '@email',
permissions: ['admin', 'editor'],
datatime: '@datetime',
},
]
module.exports = [
{
url: '/userManagement/getList',
type: 'post',
response(config) {
const { title = '', pageNo = 1, pageSize = 20 } = config.body
let mockList = List.filter((item) => {
if (title && item.title.indexOf(title) < 0) return false
return true
})
const pageList = mockList.filter(
(item, index) =>
index < pageSize * pageNo && index >= pageSize * (pageNo - 1)
)
return {
code: 200,
msg: 'success',
totalCount,
data: pageList,
}
},
},
{
url: '/userManagement/doEdit',
type: 'post',
response() {
return {
code: 200,
msg: '模拟保存成功',
}
},
},
{
url: '/userManagement/doDelete',
type: 'post',
response() {
return {
code: 200,
msg: '模拟删除成功',
}
},
},
]
-98
View File
@@ -1,98 +0,0 @@
const chokidar = require('chokidar')
const bodyParser = require('body-parser')
const chalk = require('chalk')
const path = require('path')
const { mock } = require('mockjs')
const { baseURL } = require('../src/config')
const mockDir = path.join(process.cwd(), 'mock')
const { handleMockArray } = require('./utils')
/**
*
* @param app
* @returns {{mockStartIndex: number, mockRoutesLength: number}}
*/
const registerRoutes = (app) => {
let mockLastIndex
const mocks = []
const mockArray = handleMockArray()
mockArray.forEach((item) => {
const obj = require(item)
mocks.push(...obj)
})
const mocksForServer = mocks.map((route) => {
return responseFake(route.url, route.type, route.response)
})
for (const mock of mocksForServer) {
app[mock.type](mock.url, mock.response)
mockLastIndex = app._router.stack.length
}
const mockRoutesLength = Object.keys(mocksForServer).length
return {
mockRoutesLength: mockRoutesLength,
mockStartIndex: mockLastIndex - mockRoutesLength,
}
}
/**
*
* @param url
* @param type
* @param respond
* @returns {{response(*=, *=): void, type: (*|string), url: RegExp}}
*/
const responseFake = (url, type, respond) => {
return {
url: new RegExp(`${baseURL}${url}`),
type: type || 'get',
response(req, res) {
res.status(200)
if (JSON.stringify(req.body) !== '{}') {
console.log(chalk.green(`> 请求地址:${req.path}`))
console.log(chalk.green(`> 请求参数:${JSON.stringify(req.body)}\n`))
} else {
console.log(chalk.green(`> 请求地址:${req.path}\n`))
}
res.json(mock(respond instanceof Function ? respond(req, res) : respond))
},
}
}
/**
*
* @param app
*/
module.exports = (app) => {
app.use(bodyParser.json())
app.use(
bodyParser.urlencoded({
extended: true,
})
)
const mockRoutes = registerRoutes(app)
let mockRoutesLength = mockRoutes.mockRoutesLength
let mockStartIndex = mockRoutes.mockStartIndex
chokidar
.watch(mockDir, {
ignored: /mock-server/,
ignoreInitial: true,
})
.on('all', (event) => {
if (event === 'change' || event === 'add') {
try {
app._router.stack.splice(mockStartIndex, mockRoutesLength)
Object.keys(require.cache).forEach((item) => {
if (item.includes(mockDir)) {
delete require.cache[require.resolve(item)]
}
})
const mockRoutes = registerRoutes(app)
mockRoutesLength = mockRoutes.mockRoutesLength
mockStartIndex = mockRoutes.mockStartIndex
} catch (error) {
console.log(chalk.red(error))
}
}
})
}
-43
View File
@@ -1,43 +0,0 @@
const { Random } = require('mockjs')
const { join } = require('path')
const fs = require('fs')
/**
* @author chuzhixin 1204505056@qq.com (不想保留author可删除)
* @description 随机生成图片url。
* @param width
* @param height
* @returns {string}
*/
function handleRandomImage(width = 50, height = 50) {
return `https://picsum.photos/${width}/${height}?random=${Random.guid()}`
}
/**
* @author chuzhixin 1204505056@qq.com (不想保留author可删除)
* @description 处理所有 controller 模块,npm run serve时在node环境中自动输出controller文件夹下Mock接口,请勿修改。
* @returns {[]}
*/
function handleMockArray() {
const mockArray = []
const getFiles = (jsonPath) => {
const jsonFiles = []
const findJsonFile = (path) => {
const files = fs.readdirSync(path)
files.forEach((item) => {
const fPath = join(path, item)
const stat = fs.statSync(fPath)
if (stat.isDirectory() === true) findJsonFile(item)
if (stat.isFile() === true) jsonFiles.push(item)
})
}
findJsonFile(jsonPath)
jsonFiles.forEach((item) => mockArray.push(`./controller/${item}`))
}
getFiles('mock/controller')
return mockArray
}
module.exports = {
handleRandomImage,
handleMockArray,
}
+14110
View File
File diff suppressed because it is too large Load Diff
+29 -74
View File
@@ -1,85 +1,40 @@
{
"name": "laws-system-foton",
"name": "shang-qi",
"version": "1.0.0",
"author": "91isoft",
"participants": [],
"publishConfig": {
"registry": "https://npm.pkg.github.com/"
},
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
"lint:style": "stylelint-config-prettier-check"
},
"gitHooks": {
"pre-commit": "lint-staged"
},
"lint-staged": {
"*.{js,jsx,vue}": [
"vue-cli-service lint",
"git add"
]
"build": "vue-cli-service build"
},
"dependencies": {
"@antv/g6": "^4.1.4",
"@babel/polyfill": "^7.12.1",
"animate.css": "^4.1.1",
"axios": "^0.21.1",
"clipboard": "^2.0.8",
"core-js": "^3.10.1",
"dayjs": "^1.10.4",
"echarts": "^5.1.0",
"echarts-wordcloud": "^2.0.0",
"element-ui": "^2.15.1",
"jsencrypt": "^3.1.0",
"lodash": "^4.17.21",
"maptalks": "^0.49.3",
"mapv": "^2.0.62",
"mockjs": "^1.1.0",
"nprogress": "^0.2.0",
"qs": "^6.10.1",
"screenfull": "^5.1.0",
"sortablejs": "^1.13.0",
"vab-icon": "^0.0.1",
"vue": "^2.6.12",
"vue-echarts": "5.0.0-beta.0",
"vue-router": "^3.5.1",
"vuex": "^3.6.2",
"zx-count": "^0.3.7",
"zx-layouts": "^0.6.24",
"zx-magnifie": "^0.4.0",
"zx-markdown-editor": "^0.0.2",
"zx-player": "^1.0.2",
"zx-quill": "^0.0.3",
"zx-templates": "^0.0.26",
"zx-verify": "^0.0.2"
"babel-polyfill": "^6.26.0",
"core-js": "^3.6.5",
"echarts": "^5.0.1",
"element-ui": "^2.13.2",
"es6-promise": "^4.2.8",
"jquery": "^3.5.1",
"js-base64": "^2.6.2",
"moment": "^2.29.1",
"v-charts": "^1.19.0",
"vue": "^2.6.11",
"vue-clipboard2": "^0.3.1",
"vue-contextmenujs": "^1.3.13",
"vue-i18n": "^8.22.4",
"vue-router": "^3.2.0",
"vuex": "^3.4.0"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^4.5.12",
"@vue/cli-plugin-eslint": "^4.5.12",
"@vue/cli-service": "^4.5.12",
"@vue/eslint-config-prettier": "^6.0.0",
"babel-eslint": "^10.1.0",
"body-parser": "^1.19.0",
"chalk": "^4.1.0",
"chokidar": "^3.5.1",
"eslint": "^7.24.0",
"eslint-plugin-prettier": "^3.4.0",
"eslint-plugin-vue": "^7.9.0",
"filemanager-webpack-plugin": "^4.0.0",
"image-webpack-loader": "^7.0.1",
"lint-staged": "^10.5.4",
"plop": "^2.7.4",
"prettier": "^2.2.1",
"sass": "^1.32.10",
"sass-loader": "^10.1.1",
"stylelint": "^13.12.0",
"stylelint-config-prettier": "^8.0.2",
"stylelint-config-recess-order": "^2.4.0",
"svg-sprite-loader": "^6.0.5",
"vue-template-compiler": "^2.6.12",
"webpackbar": "^4.0.0"
},
"engines": {
"node": ">=8.9",
"npm": ">= 3.0.0"
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-router": "~4.5.0",
"@vue/cli-plugin-vuex": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"less": "^3.0.4",
"less-loader": "^5.0.0",
"vue-template-compiler": "^2.6.11",
"webpack": "^4.27.1"
}
}
-16
View File
@@ -1,16 +0,0 @@
module.exports = {
printWidth: 80,
tabWidth: 2,
useTabs: false,
semi: false,
singleQuote: true,
quoteProps: 'as-needed',
jsxSingleQuote: false,
trailingComma: 'es5',
bracketSpacing: true,
jsxBracketSameLine: false,
arrowParens: 'always',
htmlWhitespaceSensitivity: 'ignore',
vueIndentScriptAndStyle: true,
endOfLine: 'lf',
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

+13 -32
View File
@@ -1,37 +1,18 @@
<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<link rel="icon" href="<%= BASE_URL %>favicon.ico" />
<title><%= VUE_APP_TITLE %></title>
<link rel="stylesheet" href="<%= BASE_URL %>static/css/loading.css" />
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache, must-revalidate">
<meta http-equiv="expires" content="0">
<title>全球标准法规系统</title>
<script src = "https://cdn.jsdelivr.net/npm/proxy-polyfill@0.3.0/proxy.min.js"></script>
</head>
<body>
<div id="foton">
<div class="first-loading-wrp">
<div class="loading-wrp">
<span class="dot dot-spin">
<i></i>
<i></i>
<i></i>
<i></i>
</span>
</div>
<h1><%= VUE_APP_TITLE %></h1>
</div>
</div>
<script>
if (window.location.hostname !== 'localhost') {
var _hmt = _hmt || []
;(function () {
var hm = document.createElement('script')
hm.src = 'https://hm.baidu.com/hm.js?7174bade1219f9cc272e7978f9523fc8'
var s = document.getElementsByTagName('script')[0]
s.parentNode.insertBefore(hm, s)
})()
}
</script>
<body class="el-drawer-body">
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
View File
-99
View File
@@ -1,99 +0,0 @@
/**
* @description 雪花屏代码,基于ant-design修改
**/
.first-loading-wrp {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 90vh;
min-height: 90vh;
}
.first-loading-wrp > h1 {
font-size: 30px;
font-weight: bolder;
}
.first-loading-wrp .loading-wrp {
display: flex;
align-items: center;
justify-content: center;
padding: 98px;
}
.dot {
position: relative;
box-sizing: border-box;
display: inline-block;
width: 64px;
height: 64px;
font-size: 64px;
transform: rotate(45deg);
animation: antRotate 1.2s infinite linear;
}
.dot i {
position: absolute;
display: block;
width: 28px;
height: 28px;
background-color: #1890ff;
border-radius: 100%;
opacity: 0.3;
transform: scale(0.75);
transform-origin: 50% 50%;
animation: antSpinMove 1s infinite linear alternate;
}
.dot i:nth-child(1) {
top: 0;
left: 0;
}
.dot i:nth-child(2) {
top: 0;
right: 0;
-webkit-animation-delay: 0.4s;
animation-delay: 0.4s;
}
.dot i:nth-child(3) {
right: 0;
bottom: 0;
-webkit-animation-delay: 0.8s;
animation-delay: 0.8s;
}
.dot i:nth-child(4) {
bottom: 0;
left: 0;
-webkit-animation-delay: 1.2s;
animation-delay: 1.2s;
}
@keyframes antRotate {
to {
-webkit-transform: rotate(405deg);
transform: rotate(405deg);
}
}
@-webkit-keyframes antRotate {
to {
-webkit-transform: rotate(405deg);
transform: rotate(405deg);
}
}
@keyframes antSpinMove {
to {
opacity: 1;
}
}
@-webkit-keyframes antSpinMove {
to {
opacity: 1;
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 394 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 290 B

+158
View File
@@ -0,0 +1,158 @@
<!DOCTYPE html>
<html style="height: 100%">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="mobile-web-app-capable" content="yes"/>
<title>在线编辑</title>
<!-- 此处配置onlyOffice地址 -->
<script type="text/javascript" src="http://106.2.13.189:9001/web-apps/apps/api/documents/api.js"></script>
<!-- <script type="text/javascript" src="http://172.20.10.5/web-apps/apps/api/documents/api.js"></script>-->
</head>
<body style="height: 100%">
<div class="form" style="height: 100%">
<div id="iframeEditor"></div>
</div>
<script type="text/javascript">
var fileName = GetQueryValue('fileName')
var fileUrl = GetQueryValue('fileUrl')
var standNo = GetQueryValue('standNo')
var key = GetQueryValue('key')
// var attId = GetQueryValue('attId')
var fileSuffix = GetQueryValue('fileType')
//将文件后缀处理掉
// fileSuffix = fileSuffix.split(".").join("");
var docEditor;
var innerAlert = function (message) {
if (console && console.log)
console.log(message);
};
var onAppReady = function () {
innerAlert("Document editor ready");
};
var onDocumentStateChange = function (event) {
var title = document.title.replace(/\*$/g, "");
document.title = title + (event.data ? "*" : "");
};
var onRequestEditRights = function () {
location.href = location.href.replace(RegExp("mode=view\&?", "i"), "");
};
var onError = function (event) {
if (event)
innerAlert(event.data);
};
var onOutdatedVersion = function (event) {
location.reload(true);
};
// console.log(key)
// console.log(fileUrl)
// console.log(attId)
// console.log(fileName)
// const fileUrl = 'http://172.20.10.2:9090/conver.docx'
var config = {
"document": {
"fileType": 'docx',
"key": key,
"title": fileName,
"url": fileUrl
},
"documentType": "text",
"editorConfig": {
// 此处配置回调地址
"callbackUrl": `http://39.98.140.126:10005/api/att/attFile/recieveFile?fileNm=${fileName}&standNo=${standNo}`,
"mode":"edit",
"lang":"zh-CN",
// "customization": {
// "forcesave": "true"
// }
}
};
// var config = {
// "type": "desktop",
// "mode": "edit",
// "documentType": "text",
// "document": {
// "title": "new.docx",
// "url": "http://172.20.10.2:9090/conver.docx",
// "fileType": "docx",
// "key": "-1988670278",
// "permissions": {
// "comment": true,
// "download": true,
// "edit": true,
// "fillForms": true,
// "modifyFilter": true,
// "modifyContentControl": true,
// "review": true
// }
// },
// "editorConfig": {
// "mode": "edit",
// "callbackUrl": "http://39.98.140.126:10005/api/IndexServlet?type=track&fileName=new.docx&userAddress=172.20.10.2",
// "lang": "zh",
// "user": {
// "id": "uid-1",
// "name": "John Smith"
// },
// "customization": {
// "goback": {
// "url": "http://39.98.140.126:10005/api/IndexServlet"
// },
// "about": true,
// "feedback": false
// },
// "canCoAuthoring": true,
// "canUseHistory": false,
// "canHistoryClose": false,
// "canHistoryRestore": false,
// "canSendEmailAddresses": false,
// "canRequestEditRights": true,
// "canRequestClose": false,
// "canRename": false,
// "canMakeActionLink": true,
// "canRequestUsers": false,
// "canRequestSendNotify": false,
// "canRequestSaveAs": false,
// "canRequestInsertImage": false,
// "canRequestMailMergeRecipients": false,
// "canRequestCompareFile": false,
// "canRequestSharingSettings": false,
// "canRequestCreateNew": false
// },
// "width": "100%",
// "height": "100%",
// "events": {},
// "frameEditorId": "iframeEditor",
// "parentOrigin": "http://172.20.10.2:8081"
// }
docEditor = new DocsAPI.DocEditor("iframeEditor", config);
/**
* [通过参数名获取url中的参数值]
* 示例URL:http://htmlJsTest/getrequest.html?uid=admin&rid=1&fid=2&name=小明
* @param {[string]} queryName [参数名]
* @return {[string]} [参数值]
*/
function GetQueryValue(queryName) {
var query = decodeURI(window.location.search.substring(1));
var vars = query.split("&");
for (var i = 0; i < vars.length; i++) {
var pair = vars[i].split("=");
if (pair[0] == queryName) { return pair[1]; }
}
return null;
}
</script>
</body>
</html>
@@ -0,0 +1,90 @@
<!DOCTYPE html>
<html style="height: 100%">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="mobile-web-app-capable" content="yes"/>
<title>OCR在线编辑</title>
<!-- 此处配置onlyOffice地址 -->
<script type="text/javascript" src="http://106.2.13.189:9001/web-apps/apps/api/documents/api.js"></script>
</head>
<body style="height: 100%">
<div class="form" style="height: 100%">
<div id="iframeEditor"></div>
</div>
<script type="text/javascript" language="javascript">
var fileName = GetQueryValue('fileName')
var fileUrl = GetQueryValue('fileUrl')
var key = GetQueryValue('key')
var ocrId = GetQueryValue('ocrId')
var docEditor;
var innerAlert = function (message) {
if (console && console.log)
console.log(message);
};
var onAppReady = function () {
innerAlert("Document editor ready");
};
var onDocumentStateChange = function (event) {
var title = document.title.replace(/\*$/g, "");
document.title = title + (event.data ? "*" : "");
};
var onRequestEditRights = function () {
location.href = location.href.replace(RegExp("mode=view\&?", "i"), "");
};
var onError = function (event) {
if (event)
innerAlert(event.data);
};
var onOutdatedVersion = function (event) {
location.reload(true);
};
var config = {
"document": {
"fileType": 'docx',
"key": key,
"title": fileName,
"url": fileUrl
},
"documentType": "text",
"editorConfig": {
// 此处配置回调地址
"callbackUrl": "http://106.2.13.189:10001/api/att/attFile/recieveFileByOcr?ocrId=" + ocrId + '&orifileUrl=' + fileUrl,
"mode":"edit",
"lang":"zh-CN",
// "customization": {
// "forcesave": "true"
// }
}
};
docEditor = new DocsAPI.DocEditor("iframeEditor", config);
/**
* [通过参数名获取url中的参数值]
* 示例URL:http://htmlJsTest/getrequest.html?uid=admin&rid=1&fid=2&name=小明
* @param {[string]} queryName [参数名]
* @return {[string]} [参数值]
*/
function GetQueryValue(queryName) {
var query = decodeURI(window.location.search.substring(1));
var vars = query.split("&");
for (var i = 0; i < vars.length; i++) {
var pair = vars[i].split("=");
if (pair[0] == queryName) { return pair[1]; }
}
return null;
}
</script>
</body>
</html>
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
+128
View File
@@ -0,0 +1,128 @@
let DEFAULT_URL = ''
let url = decodeURIComponent(window.location.search)
let attIdIndex = url.indexOf('&fileId=')
let typeIndex = url.indexOf('?sarType=')
let numberIndex = url.indexOf('&pageNumber=')
let attId = ''
let sarType = 'INLAND_STAND'
let pageNumber = 1
let pageCount = 1
let fileId = ''
let queryAttUrl = '/api/lawss/sarStandFile/queryConvertAtt'
if (attIdIndex > -1) {
attId = url.substring(attIdIndex + 8, url.length)
pageNumber = url.substring(numberIndex + 12, attIdIndex)
sarType = url.substring(typeIndex + 9, numberIndex)
if (sarType === 'INLAND_LAWS' || sarType === 'FOREIGN_LAWS') {
queryAttUrl = '/api/lawss/sarLawsFile/queryConvertAtt'
} else if (sarType === 'BUSS') {
queryAttUrl = '/api/lawss/sarBussStandFile/queryConvertAtt'
}
$.ajax({
url: queryAttUrl,
async: false,
type: 'GET',
data: {
attId: attId
},
success: function (res) {
// res = JSON.parse(res)
if (res.data != null) {
pageCount = res.data.pageCount
if (res.data.fileOldName !== null && res.data.fileOldName !== undefined) {
document.title = res.data.fileOldName + '-在线查看'
}
// $('#pageCount').html(res.data.pageCount)
fileId = res.data.id
getFileInfo()
} else {
alert('文档未转换成功或本地读取不到该文档')
}
},
error: function (data) {
alert('文档未转换成功或本地读取不到该文档')
}
})
}
// document.onkeydown = function () {
// var e = window.event || arguments[0]
// if (e.keyCode === 123) {
// return false
// } else if (e.ctrlKey || e.keyCode === 73) {
// return false
// }
// }
// document.oncontextmenu = function () {
// return false
// }
function getFileInfo () {
$.ajax({
url: '/api/lawss/sarFileInfo/getPdfFileInfo',
async: false,
type: 'GET',
data: {
sarFileId: fileId,
filePageNumber: pageNumber
},
success: function (res) {
res = JSON.parse(res)
if (res.data != null) {
if (res.data.fileInfo != null) {
let data = res.data.fileInfo
let resultFileMsg = data.substring(30, data.length - 50)
resultFileMsg = resultFileMsg.replace(/\*/g, 'A')
let password = res.data.filePwd
sessionStorage.setItem('fileInfoSteam', password)
writeFile(resultFileMsg)
}
}
},
error: function (data) {
alert('文档未转换成功或本地读取不到该文档')
}
})
}
function writeFile (data) {
var BASE64_MARKER = ';base64,' // 声明文件流编码格式
var pdfAsDataUri = data
var pdfAsArray = convertDataURIToBinary(pdfAsDataUri)
DEFAULT_URL = pdfAsArray
if (Number(pageCount) > 1) {
if (Number(pageNumber) === 1 && Number(pageNumber) !== Number(pageCount)) {
$('#upLoadingFile').hide()
$('#downLoadingFile').show()
} else if (Number(pageNumber) !== 1 && Number(pageNumber) !== Number(pageCount)) {
$('#upLoadingFile').show()
$('#downLoadingFile').show()
} else {
$('#upLoadingFile').hide()
$('#downLoadingFile').hide()
}
} else {
$('#upLoadingFile').hide()
$('#downLoadingFile').hide()
}
}
function clickLoadFile (type) {
if (type === 'up') {
pageNumber = Number(pageNumber) - Number(1)
} else {
pageNumber = Number(pageNumber) + Number(1)
}
window.location.href = '/static/pdf/web/viewer.html?sarType=' + sarType + '&pageNumber=' + pageNumber + '&fileId=' + encodeURIComponent(attId)
}
function convertDataURIToBinary (dataURI) {
var raw = window.atob(dataURI) // 这个方法在ie内核下无法正常解析。
var rawLength = raw.length
// 转换成pdf.js能直接解析的Uint8Array类型
var array = new Uint8Array(new ArrayBuffer(rawLength))
for (let i = 0; i < rawLength; i++) {
array[i] = raw.charCodeAt(i)
}
return array
}

Some files were not shown because too many files have changed in this diff Show More