初次上传仓库
12
.babelrc
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"presets": [
|
||||||
|
["env", {
|
||||||
|
"modules": false,
|
||||||
|
"targets": {
|
||||||
|
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
|
||||||
|
}
|
||||||
|
}],
|
||||||
|
"stage-2"
|
||||||
|
],
|
||||||
|
"plugins":["transform-vue-jsx", "transform-runtime"]
|
||||||
|
}
|
||||||
14
.editorconfig
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# http://editorconfig.org
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
end_of_line = lf
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
insert_final_newline = false
|
||||||
|
trim_trailing_whitespace = false
|
||||||
5
.eslintignore
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
build/*.js
|
||||||
|
config/*.js
|
||||||
|
src/assets
|
||||||
|
src/icon
|
||||||
|
src/views/ProjectManagement
|
||||||
196
.eslintrc.js
Normal file
@@ -0,0 +1,196 @@
|
|||||||
|
module.exports = {
|
||||||
|
root: true,
|
||||||
|
parserOptions: {
|
||||||
|
parser: 'babel-eslint',
|
||||||
|
sourceType: 'module'
|
||||||
|
},
|
||||||
|
env: {
|
||||||
|
browser: true,
|
||||||
|
node: true,
|
||||||
|
es6: true,
|
||||||
|
},
|
||||||
|
extends: ['plugin:vue/recommended', 'eslint:recommended'],
|
||||||
|
|
||||||
|
// add your custom rules here
|
||||||
|
//it is base on https://github.com/vuejs/eslint-config-vue
|
||||||
|
rules: {
|
||||||
|
"vue/max-attributes-per-line": [2, {
|
||||||
|
"singleline": 10,
|
||||||
|
"multiline": {
|
||||||
|
"max": 1,
|
||||||
|
"allowFirstLine": false
|
||||||
|
}
|
||||||
|
}],
|
||||||
|
"vue/name-property-casing": ["error", "PascalCase"],
|
||||||
|
'accessor-pairs': 2,
|
||||||
|
'arrow-spacing': [2, {
|
||||||
|
'before': true,
|
||||||
|
'after': true
|
||||||
|
}],
|
||||||
|
'block-spacing': [2, 'always'],
|
||||||
|
'brace-style': [2, '1tbs', {
|
||||||
|
'allowSingleLine': true
|
||||||
|
}],
|
||||||
|
'camelcase': [0, {
|
||||||
|
'properties': 'always'
|
||||||
|
}],
|
||||||
|
'comma-dangle': [2, 'never'],
|
||||||
|
'comma-spacing': [2, {
|
||||||
|
'before': false,
|
||||||
|
'after': true
|
||||||
|
}],
|
||||||
|
'comma-style': [2, 'last'],
|
||||||
|
'constructor-super': 2,
|
||||||
|
'curly': [2, 'multi-line'],
|
||||||
|
'dot-location': [2, 'property'],
|
||||||
|
'eol-last': 2,
|
||||||
|
'eqeqeq': [2, 'allow-null'],
|
||||||
|
'generator-star-spacing': [2, {
|
||||||
|
'before': true,
|
||||||
|
'after': true
|
||||||
|
}],
|
||||||
|
'handle-callback-err': [2, '^(err|error)$'],
|
||||||
|
'indent': [2, 2, {
|
||||||
|
'SwitchCase': 1
|
||||||
|
}],
|
||||||
|
'jsx-quotes': [2, 'prefer-single'],
|
||||||
|
'key-spacing': [2, {
|
||||||
|
'beforeColon': false,
|
||||||
|
'afterColon': true
|
||||||
|
}],
|
||||||
|
'keyword-spacing': [2, {
|
||||||
|
'before': true,
|
||||||
|
'after': true
|
||||||
|
}],
|
||||||
|
'new-cap': [2, {
|
||||||
|
'newIsCap': true,
|
||||||
|
'capIsNew': false
|
||||||
|
}],
|
||||||
|
'new-parens': 2,
|
||||||
|
'no-array-constructor': 2,
|
||||||
|
'no-caller': 2,
|
||||||
|
'no-console': 'off',
|
||||||
|
'no-class-assign': 2,
|
||||||
|
'no-cond-assign': 2,
|
||||||
|
'no-const-assign': 2,
|
||||||
|
'no-control-regex': 2,
|
||||||
|
'no-delete-var': 2,
|
||||||
|
'no-dupe-args': 2,
|
||||||
|
'no-dupe-class-members': 2,
|
||||||
|
'no-dupe-keys': 2,
|
||||||
|
'no-duplicate-case': 2,
|
||||||
|
'no-empty-character-class': 2,
|
||||||
|
'no-empty-pattern': 2,
|
||||||
|
'no-eval': 2,
|
||||||
|
'no-ex-assign': 2,
|
||||||
|
'no-extend-native': 2,
|
||||||
|
'no-extra-bind': 2,
|
||||||
|
'no-extra-boolean-cast': 2,
|
||||||
|
'no-extra-parens': [2, 'functions'],
|
||||||
|
'no-fallthrough': 2,
|
||||||
|
'no-floating-decimal': 2,
|
||||||
|
'no-func-assign': 2,
|
||||||
|
'no-implied-eval': 2,
|
||||||
|
'no-inner-declarations': [2, 'functions'],
|
||||||
|
'no-invalid-regexp': 2,
|
||||||
|
'no-irregular-whitespace': 2,
|
||||||
|
'no-iterator': 2,
|
||||||
|
'no-label-var': 2,
|
||||||
|
'no-labels': [2, {
|
||||||
|
'allowLoop': false,
|
||||||
|
'allowSwitch': false
|
||||||
|
}],
|
||||||
|
'no-lone-blocks': 2,
|
||||||
|
'no-mixed-spaces-and-tabs': 2,
|
||||||
|
'no-multi-spaces': 2,
|
||||||
|
'no-multi-str': 2,
|
||||||
|
'no-multiple-empty-lines': [2, {
|
||||||
|
'max': 1
|
||||||
|
}],
|
||||||
|
'no-native-reassign': 2,
|
||||||
|
'no-negated-in-lhs': 2,
|
||||||
|
'no-new-object': 2,
|
||||||
|
'no-new-require': 2,
|
||||||
|
'no-new-symbol': 2,
|
||||||
|
'no-new-wrappers': 2,
|
||||||
|
'no-obj-calls': 2,
|
||||||
|
'no-octal': 2,
|
||||||
|
'no-octal-escape': 2,
|
||||||
|
'no-path-concat': 2,
|
||||||
|
'no-proto': 2,
|
||||||
|
'no-redeclare': 2,
|
||||||
|
'no-regex-spaces': 2,
|
||||||
|
'no-return-assign': [2, 'except-parens'],
|
||||||
|
'no-self-assign': 2,
|
||||||
|
'no-self-compare': 2,
|
||||||
|
'no-sequences': 2,
|
||||||
|
'no-shadow-restricted-names': 2,
|
||||||
|
'no-spaced-func': 2,
|
||||||
|
'no-sparse-arrays': 2,
|
||||||
|
'no-this-before-super': 2,
|
||||||
|
'no-throw-literal': 2,
|
||||||
|
'no-trailing-spaces': 2,
|
||||||
|
'no-undef': 2,
|
||||||
|
'no-undef-init': 2,
|
||||||
|
'no-unexpected-multiline': 2,
|
||||||
|
'no-unmodified-loop-condition': 2,
|
||||||
|
'no-unneeded-ternary': [2, {
|
||||||
|
'defaultAssignment': false
|
||||||
|
}],
|
||||||
|
'no-unreachable': 2,
|
||||||
|
'no-unsafe-finally': 2,
|
||||||
|
'no-unused-vars': [2, {
|
||||||
|
'vars': 'all',
|
||||||
|
'args': 'none'
|
||||||
|
}],
|
||||||
|
'no-useless-call': 2,
|
||||||
|
'no-useless-computed-key': 2,
|
||||||
|
'no-useless-constructor': 2,
|
||||||
|
'no-useless-escape': 0,
|
||||||
|
'no-whitespace-before-property': 2,
|
||||||
|
'no-with': 2,
|
||||||
|
'one-var': [2, {
|
||||||
|
'initialized': 'never'
|
||||||
|
}],
|
||||||
|
'operator-linebreak': [2, 'after', {
|
||||||
|
'overrides': {
|
||||||
|
'?': 'before',
|
||||||
|
':': 'before'
|
||||||
|
}
|
||||||
|
}],
|
||||||
|
'padded-blocks': [2, 'never'],
|
||||||
|
'quotes': [2, 'single', {
|
||||||
|
'avoidEscape': true,
|
||||||
|
'allowTemplateLiterals': true
|
||||||
|
}],
|
||||||
|
'semi': [2, 'never'],
|
||||||
|
'semi-spacing': [2, {
|
||||||
|
'before': false,
|
||||||
|
'after': true
|
||||||
|
}],
|
||||||
|
'space-before-blocks': [2, 'always'],
|
||||||
|
'space-before-function-paren': [2, 'never'],
|
||||||
|
'space-in-parens': [2, 'never'],
|
||||||
|
'space-infix-ops': 2,
|
||||||
|
'space-unary-ops': [2, {
|
||||||
|
'words': true,
|
||||||
|
'nonwords': false
|
||||||
|
}],
|
||||||
|
'spaced-comment': [2, 'always', {
|
||||||
|
'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ',']
|
||||||
|
}],
|
||||||
|
'template-curly-spacing': [2, 'never'],
|
||||||
|
'use-isnan': 2,
|
||||||
|
'valid-typeof': 2,
|
||||||
|
'wrap-iife': [2, 'any'],
|
||||||
|
'yield-star-spacing': [2, 'both'],
|
||||||
|
'yoda': [2, 'never'],
|
||||||
|
'prefer-const': 2,
|
||||||
|
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
|
||||||
|
'object-curly-spacing': [2, 'always', {
|
||||||
|
objectsInObjects: false
|
||||||
|
}],
|
||||||
|
'array-bracket-spacing': [2, 'never']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
15
.gitignore
vendored
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
.DS_Store
|
||||||
|
node_modules/
|
||||||
|
dist/
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
package-lock.json
|
||||||
|
|
||||||
|
# Editor directories and files
|
||||||
|
.idea
|
||||||
|
.vscode
|
||||||
|
*.suo
|
||||||
|
*.ntvs*
|
||||||
|
*.njsproj
|
||||||
|
*.sln
|
||||||
10
.postcssrc.js
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
// https://github.com/michael-ciniawsky/postcss-load-config
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
"plugins": {
|
||||||
|
"postcss-import": {},
|
||||||
|
"postcss-url": {},
|
||||||
|
// to edit target browsers: use "browserslist" field in package.json
|
||||||
|
"autoprefixer": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
5
.travis.yml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
language: node_js
|
||||||
|
node_js: stable
|
||||||
|
script: npm run test
|
||||||
|
notifications:
|
||||||
|
email: false
|
||||||
21
LICENSE
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2017-present PanJiaChen
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
45
build/build.js
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
'use strict'
|
||||||
|
require('./check-versions')()
|
||||||
|
|
||||||
|
process.env.NODE_ENV = 'production'
|
||||||
|
|
||||||
|
const ora = require('ora')
|
||||||
|
const rm = require('rimraf')
|
||||||
|
const path = require('path')
|
||||||
|
const chalk = require('chalk')
|
||||||
|
const webpack = require('webpack')
|
||||||
|
const config = require('../config')
|
||||||
|
const webpackConfig = require('./webpack.prod.conf')
|
||||||
|
|
||||||
|
const spinner = ora('building for production...')
|
||||||
|
spinner.start()
|
||||||
|
|
||||||
|
rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
|
||||||
|
if (err) throw err
|
||||||
|
webpack(webpackConfig, (err, stats) => {
|
||||||
|
spinner.stop()
|
||||||
|
if (err) throw err
|
||||||
|
process.stdout.write(
|
||||||
|
stats.toString({
|
||||||
|
colors: true,
|
||||||
|
modules: false,
|
||||||
|
children: false,
|
||||||
|
chunks: false,
|
||||||
|
chunkModules: false
|
||||||
|
}) + '\n\n'
|
||||||
|
)
|
||||||
|
|
||||||
|
if (stats.hasErrors()) {
|
||||||
|
console.log(chalk.red(' Build failed with errors.\n'))
|
||||||
|
process.exit(1)
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(chalk.cyan(' Build complete.\n'))
|
||||||
|
console.log(
|
||||||
|
chalk.yellow(
|
||||||
|
' Tip: built files are meant to be served over an HTTP server.\n' +
|
||||||
|
" Opening index.html over file:// won't work.\n"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
})
|
||||||
|
})
|
||||||
64
build/check-versions.js
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
'use strict'
|
||||||
|
const chalk = require('chalk')
|
||||||
|
const semver = require('semver')
|
||||||
|
const packageConfig = require('../package.json')
|
||||||
|
const shell = require('shelljs')
|
||||||
|
|
||||||
|
function exec(cmd) {
|
||||||
|
return require('child_process')
|
||||||
|
.execSync(cmd)
|
||||||
|
.toString()
|
||||||
|
.trim()
|
||||||
|
}
|
||||||
|
|
||||||
|
const versionRequirements = [
|
||||||
|
{
|
||||||
|
name: 'node',
|
||||||
|
currentVersion: semver.clean(process.version),
|
||||||
|
versionRequirement: packageConfig.engines.node
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
// if (shell.which('npm')) {
|
||||||
|
// versionRequirements.push({
|
||||||
|
// name: 'npm',
|
||||||
|
// currentVersion: exec('npm --version'),
|
||||||
|
// versionRequirement: packageConfig.engines.npm
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
|
||||||
|
module.exports = function() {
|
||||||
|
const warnings = []
|
||||||
|
|
||||||
|
for (let i = 0; i < versionRequirements.length; i++) {
|
||||||
|
const mod = versionRequirements[i]
|
||||||
|
|
||||||
|
if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
|
||||||
|
warnings.push(
|
||||||
|
mod.name +
|
||||||
|
': ' +
|
||||||
|
chalk.red(mod.currentVersion) +
|
||||||
|
' should be ' +
|
||||||
|
chalk.green(mod.versionRequirement)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (warnings.length) {
|
||||||
|
console.log('')
|
||||||
|
console.log(
|
||||||
|
chalk.yellow(
|
||||||
|
'To use this template, you must update following to modules:'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
console.log()
|
||||||
|
|
||||||
|
for (let i = 0; i < warnings.length; i++) {
|
||||||
|
const warning = warnings[i]
|
||||||
|
console.log(' ' + warning)
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log()
|
||||||
|
process.exit(1)
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
build/logo.png
Normal file
|
After Width: | Height: | Size: 6.7 KiB |
108
build/utils.js
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
'use strict'
|
||||||
|
const path = require('path')
|
||||||
|
const config = require('../config')
|
||||||
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
|
||||||
|
const packageConfig = require('../package.json')
|
||||||
|
|
||||||
|
exports.assetsPath = function(_path) {
|
||||||
|
const assetsSubDirectory =
|
||||||
|
process.env.NODE_ENV === 'production'
|
||||||
|
? config.build.assetsSubDirectory
|
||||||
|
: config.dev.assetsSubDirectory
|
||||||
|
|
||||||
|
return path.posix.join(assetsSubDirectory, _path)
|
||||||
|
}
|
||||||
|
|
||||||
|
exports.cssLoaders = function(options) {
|
||||||
|
options = options || {}
|
||||||
|
|
||||||
|
const cssLoader = {
|
||||||
|
loader: 'css-loader',
|
||||||
|
options: {
|
||||||
|
sourceMap: options.sourceMap
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const postcssLoader = {
|
||||||
|
loader: 'postcss-loader',
|
||||||
|
options: {
|
||||||
|
sourceMap: options.sourceMap
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// generate loader string to be used with extract text plugin
|
||||||
|
function generateLoaders(loader, loaderOptions) {
|
||||||
|
const loaders = []
|
||||||
|
|
||||||
|
// Extract CSS when that option is specified
|
||||||
|
// (which is the case during production build)
|
||||||
|
if (options.extract) {
|
||||||
|
loaders.push(MiniCssExtractPlugin.loader)
|
||||||
|
} else {
|
||||||
|
loaders.push('vue-style-loader')
|
||||||
|
}
|
||||||
|
|
||||||
|
loaders.push(cssLoader)
|
||||||
|
|
||||||
|
if (options.usePostCSS) {
|
||||||
|
loaders.push(postcssLoader)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (loader) {
|
||||||
|
loaders.push({
|
||||||
|
loader: loader + '-loader',
|
||||||
|
options: Object.assign({}, loaderOptions, {
|
||||||
|
sourceMap: options.sourceMap
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
return loaders
|
||||||
|
}
|
||||||
|
// https://vue-loader.vuejs.org/en/configurations/extract-css.html
|
||||||
|
return {
|
||||||
|
css: generateLoaders(),
|
||||||
|
postcss: generateLoaders(),
|
||||||
|
less: generateLoaders('less'),
|
||||||
|
sass: generateLoaders('sass', {
|
||||||
|
indentedSyntax: true
|
||||||
|
}),
|
||||||
|
scss: generateLoaders('sass'),
|
||||||
|
stylus: generateLoaders('stylus'),
|
||||||
|
styl: generateLoaders('stylus')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Generate loaders for standalone style files (outside of .vue)
|
||||||
|
exports.styleLoaders = function(options) {
|
||||||
|
const output = []
|
||||||
|
const loaders = exports.cssLoaders(options)
|
||||||
|
|
||||||
|
for (const extension in loaders) {
|
||||||
|
const loader = loaders[extension]
|
||||||
|
output.push({
|
||||||
|
test: new RegExp('\\.' + extension + '$'),
|
||||||
|
use: loader
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
return output
|
||||||
|
}
|
||||||
|
|
||||||
|
exports.createNotifierCallback = () => {
|
||||||
|
const notifier = require('node-notifier')
|
||||||
|
|
||||||
|
return (severity, errors) => {
|
||||||
|
if (severity !== 'error') return
|
||||||
|
|
||||||
|
const error = errors[0]
|
||||||
|
const filename = error.file && error.file.split('!').pop()
|
||||||
|
|
||||||
|
notifier.notify({
|
||||||
|
title: packageConfig.name,
|
||||||
|
message: severity + ': ' + error.name,
|
||||||
|
subtitle: filename || '',
|
||||||
|
icon: path.join(__dirname, 'logo.png')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
5
build/vue-loader.conf.js
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
'use strict'
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
//You can set the vue-loader configuration by yourself.
|
||||||
|
}
|
||||||
111
build/webpack.base.conf.js
Normal file
@@ -0,0 +1,111 @@
|
|||||||
|
'use strict'
|
||||||
|
const path = require('path')
|
||||||
|
const utils = require('./utils')
|
||||||
|
const config = require('../config')
|
||||||
|
const { VueLoaderPlugin } = require('vue-loader')
|
||||||
|
const vueLoaderConfig = require('./vue-loader.conf')
|
||||||
|
|
||||||
|
function resolve(dir) {
|
||||||
|
return path.join(__dirname, '..', dir)
|
||||||
|
}
|
||||||
|
|
||||||
|
const createLintingRule = () => ({
|
||||||
|
test: /\.(js|vue)$/,
|
||||||
|
loader: 'eslint-loader',
|
||||||
|
enforce: 'pre',
|
||||||
|
include: [resolve('src'), resolve('test')],
|
||||||
|
options: {
|
||||||
|
formatter: require('eslint-friendly-formatter'),
|
||||||
|
emitWarning: !config.dev.showEslintErrorsInOverlay
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
context: path.resolve(__dirname, '../'),
|
||||||
|
entry: {
|
||||||
|
app: './src/main.js'
|
||||||
|
},
|
||||||
|
output: {
|
||||||
|
path: config.build.assetsRoot,
|
||||||
|
filename: '[name].js',
|
||||||
|
publicPath:
|
||||||
|
process.env.NODE_ENV === 'production'
|
||||||
|
? config.build.assetsPublicPath
|
||||||
|
: config.dev.assetsPublicPath
|
||||||
|
},
|
||||||
|
resolve: {
|
||||||
|
extensions: ['.js', '.vue', '.json'],
|
||||||
|
alias: {
|
||||||
|
'@': resolve('src')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
module: {
|
||||||
|
rules: [
|
||||||
|
...(config.dev.useEslint ? [createLintingRule()] : []),
|
||||||
|
{
|
||||||
|
test: /\.vue$/,
|
||||||
|
loader: 'vue-loader',
|
||||||
|
options: vueLoaderConfig
|
||||||
|
},
|
||||||
|
{
|
||||||
|
test: /\.js$/,
|
||||||
|
loader: 'babel-loader',
|
||||||
|
include: [
|
||||||
|
resolve('src'),
|
||||||
|
resolve('test'),
|
||||||
|
resolve('node_modules/webpack-dev-server/client')
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
test: /\.svg$/,
|
||||||
|
loader: 'svg-sprite-loader',
|
||||||
|
include: [resolve('src/icons')],
|
||||||
|
options: {
|
||||||
|
symbolId: 'icon-[name]'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
|
||||||
|
loader: 'url-loader',
|
||||||
|
exclude: [resolve('src/icons')],
|
||||||
|
options: {
|
||||||
|
limit: 10000,
|
||||||
|
name: utils.assetsPath('img/[name].[hash:7].[ext]')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
|
||||||
|
loader: 'url-loader',
|
||||||
|
options: {
|
||||||
|
limit: 10000,
|
||||||
|
name: utils.assetsPath('media/[name].[hash:7].[ext]')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
|
||||||
|
loader: 'url-loader',
|
||||||
|
options: {
|
||||||
|
limit: 10000,
|
||||||
|
name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
test: /\.txt$/,
|
||||||
|
use: 'raw-loader'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
plugins: [new VueLoaderPlugin()],
|
||||||
|
node: {
|
||||||
|
// prevent webpack from injecting useless setImmediate polyfill because Vue
|
||||||
|
// source contains it (although only uses it if it's native).
|
||||||
|
setImmediate: false,
|
||||||
|
// prevent webpack from injecting mocks to Node native modules
|
||||||
|
// that does not make sense for the client
|
||||||
|
dgram: 'empty',
|
||||||
|
fs: 'empty',
|
||||||
|
net: 'empty',
|
||||||
|
tls: 'empty',
|
||||||
|
child_process: 'empty'
|
||||||
|
}
|
||||||
|
}
|
||||||
98
build/webpack.dev.conf.js
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
'use strict'
|
||||||
|
const path = require('path')
|
||||||
|
const utils = require('./utils')
|
||||||
|
const webpack = require('webpack')
|
||||||
|
const config = require('../config')
|
||||||
|
const merge = require('webpack-merge')
|
||||||
|
const baseWebpackConfig = require('./webpack.base.conf')
|
||||||
|
const HtmlWebpackPlugin = require('html-webpack-plugin')
|
||||||
|
const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
|
||||||
|
const portfinder = require('portfinder')
|
||||||
|
|
||||||
|
function resolve(dir) {
|
||||||
|
return path.join(__dirname, '..', dir)
|
||||||
|
}
|
||||||
|
|
||||||
|
const HOST = process.env.HOST
|
||||||
|
const PORT = process.env.PORT && Number(process.env.PORT)
|
||||||
|
|
||||||
|
const devWebpackConfig = merge(baseWebpackConfig, {
|
||||||
|
mode: 'development',
|
||||||
|
module: {
|
||||||
|
rules: utils.styleLoaders({
|
||||||
|
sourceMap: config.dev.cssSourceMap,
|
||||||
|
usePostCSS: true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// cheap-module-eval-source-map is faster for development
|
||||||
|
devtool: config.dev.devtool,
|
||||||
|
|
||||||
|
// these devServer options should be customized in /config/index.js
|
||||||
|
devServer: {
|
||||||
|
clientLogLevel: 'warning',
|
||||||
|
historyApiFallback: true,
|
||||||
|
hot: true,
|
||||||
|
compress: true,
|
||||||
|
host: HOST || config.dev.host,
|
||||||
|
port: PORT || config.dev.port,
|
||||||
|
open: config.dev.autoOpenBrowser,
|
||||||
|
overlay: config.dev.errorOverlay
|
||||||
|
? { warnings: false, errors: true }
|
||||||
|
: false,
|
||||||
|
publicPath: config.dev.assetsPublicPath,
|
||||||
|
proxy: config.dev.proxyTable,
|
||||||
|
quiet: true, // necessary for FriendlyErrorsPlugin
|
||||||
|
watchOptions: {
|
||||||
|
poll: config.dev.poll
|
||||||
|
}
|
||||||
|
},
|
||||||
|
plugins: [
|
||||||
|
new webpack.DefinePlugin({
|
||||||
|
'process.env': require('../config/dev.env')
|
||||||
|
}),
|
||||||
|
new webpack.HotModuleReplacementPlugin(),
|
||||||
|
// https://github.com/ampedandwired/html-webpack-plugin
|
||||||
|
new HtmlWebpackPlugin({
|
||||||
|
filename: 'index.html',
|
||||||
|
template: 'index.html',
|
||||||
|
inject: true,
|
||||||
|
favicon: resolve('favicon.ico'),
|
||||||
|
title: 'vue-element-admin',
|
||||||
|
templateParameters: {
|
||||||
|
BASE_URL: config.dev.assetsPublicPath + config.dev.assetsSubDirectory,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
]
|
||||||
|
})
|
||||||
|
|
||||||
|
module.exports = new Promise((resolve, reject) => {
|
||||||
|
portfinder.basePort = process.env.PORT || config.dev.port
|
||||||
|
portfinder.getPort((err, port) => {
|
||||||
|
if (err) {
|
||||||
|
reject(err)
|
||||||
|
} else {
|
||||||
|
// publish the new Port, necessary for e2e tests
|
||||||
|
process.env.PORT = port
|
||||||
|
// add port to devServer config
|
||||||
|
devWebpackConfig.devServer.port = port
|
||||||
|
|
||||||
|
// Add FriendlyErrorsPlugin
|
||||||
|
devWebpackConfig.plugins.push(
|
||||||
|
new FriendlyErrorsPlugin({
|
||||||
|
compilationSuccessInfo: {
|
||||||
|
messages: [
|
||||||
|
`Your application is running here: http://${
|
||||||
|
devWebpackConfig.devServer.host
|
||||||
|
}:${port}`
|
||||||
|
]
|
||||||
|
},
|
||||||
|
onErrors: config.dev.notifyOnErrors
|
||||||
|
? utils.createNotifierCallback()
|
||||||
|
: undefined
|
||||||
|
})
|
||||||
|
)
|
||||||
|
|
||||||
|
resolve(devWebpackConfig)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
181
build/webpack.prod.conf.js
Normal file
@@ -0,0 +1,181 @@
|
|||||||
|
'use strict'
|
||||||
|
const path = require('path')
|
||||||
|
const utils = require('./utils')
|
||||||
|
const webpack = require('webpack')
|
||||||
|
const config = require('../config')
|
||||||
|
const merge = require('webpack-merge')
|
||||||
|
const baseWebpackConfig = require('./webpack.base.conf')
|
||||||
|
const CopyWebpackPlugin = require('copy-webpack-plugin')
|
||||||
|
const HtmlWebpackPlugin = require('html-webpack-plugin')
|
||||||
|
const ScriptExtHtmlWebpackPlugin = require('script-ext-html-webpack-plugin')
|
||||||
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
|
||||||
|
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin')
|
||||||
|
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
|
||||||
|
|
||||||
|
function resolve(dir) {
|
||||||
|
return path.join(__dirname, '..', dir)
|
||||||
|
}
|
||||||
|
|
||||||
|
const env = require('../config/prod.env')
|
||||||
|
|
||||||
|
// For NamedChunksPlugin
|
||||||
|
const seen = new Set()
|
||||||
|
const nameLength = 4
|
||||||
|
|
||||||
|
const webpackConfig = merge(baseWebpackConfig, {
|
||||||
|
mode: 'production',
|
||||||
|
module: {
|
||||||
|
rules: utils.styleLoaders({
|
||||||
|
sourceMap: config.build.productionSourceMap,
|
||||||
|
extract: true,
|
||||||
|
usePostCSS: true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
devtool: config.build.productionSourceMap ? config.build.devtool : false,
|
||||||
|
output: {
|
||||||
|
path: config.build.assetsRoot,
|
||||||
|
filename: utils.assetsPath('js/[name].[chunkhash:8].js'),
|
||||||
|
chunkFilename: utils.assetsPath('js/[name].[chunkhash:8].js')
|
||||||
|
},
|
||||||
|
plugins: [
|
||||||
|
// http://vuejs.github.io/vue-loader/en/workflow/production.html
|
||||||
|
new webpack.DefinePlugin({
|
||||||
|
'process.env': env
|
||||||
|
}),
|
||||||
|
// extract css into its own file
|
||||||
|
new MiniCssExtractPlugin({
|
||||||
|
filename: utils.assetsPath('css/[name].[contenthash:8].css'),
|
||||||
|
chunkFilename: utils.assetsPath('css/[name].[contenthash:8].css')
|
||||||
|
}),
|
||||||
|
// generate dist index.html with correct asset hash for caching.
|
||||||
|
// you can customize output by editing /index.html
|
||||||
|
// see https://github.com/ampedandwired/html-webpack-plugin
|
||||||
|
new HtmlWebpackPlugin({
|
||||||
|
filename: config.build.index,
|
||||||
|
template: 'index.html',
|
||||||
|
inject: true,
|
||||||
|
favicon: resolve('favicon.ico'),
|
||||||
|
title: 'vue-admin-template',
|
||||||
|
templateParameters: {
|
||||||
|
BASE_URL: config.build.assetsPublicPath + config.build.assetsSubDirectory,
|
||||||
|
},
|
||||||
|
minify: {
|
||||||
|
removeComments: true,
|
||||||
|
collapseWhitespace: true,
|
||||||
|
removeAttributeQuotes: true
|
||||||
|
// more options:
|
||||||
|
// https://github.com/kangax/html-minifier#options-quick-reference
|
||||||
|
}
|
||||||
|
// default sort mode uses toposort which cannot handle cyclic deps
|
||||||
|
// in certain cases, and in webpack 4, chunk order in HTML doesn't
|
||||||
|
// matter anyway
|
||||||
|
}),
|
||||||
|
new ScriptExtHtmlWebpackPlugin({
|
||||||
|
//`runtime` must same as runtimeChunk name. default is `runtime`
|
||||||
|
inline: /runtime\..*\.js$/
|
||||||
|
}),
|
||||||
|
// keep chunk.id stable when chunk has no name
|
||||||
|
new webpack.NamedChunksPlugin(chunk => {
|
||||||
|
if (chunk.name) {
|
||||||
|
return chunk.name
|
||||||
|
}
|
||||||
|
const modules = Array.from(chunk.modulesIterable)
|
||||||
|
if (modules.length > 1) {
|
||||||
|
const hash = require('hash-sum')
|
||||||
|
const joinedHash = hash(modules.map(m => m.id).join('_'))
|
||||||
|
let len = nameLength
|
||||||
|
while (seen.has(joinedHash.substr(0, len))) len++
|
||||||
|
seen.add(joinedHash.substr(0, len))
|
||||||
|
return `chunk-${joinedHash.substr(0, len)}`
|
||||||
|
} else {
|
||||||
|
return modules[0].id
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
// keep module.id stable when vender modules does not change
|
||||||
|
new webpack.HashedModuleIdsPlugin(),
|
||||||
|
// copy custom static assets
|
||||||
|
new CopyWebpackPlugin([
|
||||||
|
{
|
||||||
|
from: path.resolve(__dirname, '../static'),
|
||||||
|
to: config.build.assetsSubDirectory,
|
||||||
|
ignore: ['.*']
|
||||||
|
}
|
||||||
|
])
|
||||||
|
],
|
||||||
|
optimization: {
|
||||||
|
splitChunks: {
|
||||||
|
chunks: 'all',
|
||||||
|
cacheGroups: {
|
||||||
|
libs: {
|
||||||
|
name: 'chunk-libs',
|
||||||
|
test: /[\\/]node_modules[\\/]/,
|
||||||
|
priority: 10,
|
||||||
|
chunks: 'initial' // 只打包初始时依赖的第三方
|
||||||
|
},
|
||||||
|
elementUI: {
|
||||||
|
name: 'chunk-elementUI', // 单独将 elementUI 拆包
|
||||||
|
priority: 20, // 权重要大于 libs 和 app 不然会被打包进 libs 或者 app
|
||||||
|
test: /[\\/]node_modules[\\/]element-ui[\\/]/
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
runtimeChunk: 'single',
|
||||||
|
minimizer: [
|
||||||
|
new UglifyJsPlugin({
|
||||||
|
uglifyOptions: {
|
||||||
|
mangle: {
|
||||||
|
safari10: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
sourceMap: config.build.productionSourceMap,
|
||||||
|
cache: true,
|
||||||
|
parallel: true
|
||||||
|
}),
|
||||||
|
// Compress extracted CSS. We are using this plugin so that possible
|
||||||
|
// duplicated CSS from different components can be deduped.
|
||||||
|
new OptimizeCSSAssetsPlugin()
|
||||||
|
]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
if (config.build.productionGzip) {
|
||||||
|
const CompressionWebpackPlugin = require('compression-webpack-plugin')
|
||||||
|
|
||||||
|
webpackConfig.plugins.push(
|
||||||
|
new CompressionWebpackPlugin({
|
||||||
|
asset: '[path].gz[query]',
|
||||||
|
algorithm: 'gzip',
|
||||||
|
test: new RegExp(
|
||||||
|
'\\.(' + config.build.productionGzipExtensions.join('|') + ')$'
|
||||||
|
),
|
||||||
|
threshold: 10240,
|
||||||
|
minRatio: 0.8
|
||||||
|
})
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (config.build.generateAnalyzerReport || config.build.bundleAnalyzerReport) {
|
||||||
|
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer')
|
||||||
|
.BundleAnalyzerPlugin
|
||||||
|
|
||||||
|
if (config.build.bundleAnalyzerReport) {
|
||||||
|
webpackConfig.plugins.push(
|
||||||
|
new BundleAnalyzerPlugin({
|
||||||
|
analyzerPort: 8080,
|
||||||
|
generateStatsFile: false
|
||||||
|
})
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (config.build.generateAnalyzerReport) {
|
||||||
|
webpackConfig.plugins.push(
|
||||||
|
new BundleAnalyzerPlugin({
|
||||||
|
analyzerMode: 'static',
|
||||||
|
reportFilename: 'bundle-report.html',
|
||||||
|
openAnalyzer: false
|
||||||
|
})
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = webpackConfig
|
||||||
8
config/dev.env.js
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
'use strict'
|
||||||
|
const merge = require('webpack-merge')
|
||||||
|
const prodEnv = require('./prod.env')
|
||||||
|
|
||||||
|
module.exports = merge(prodEnv, {
|
||||||
|
NODE_ENV: '"development"',
|
||||||
|
BASE_API: '"https://easy-mock.com/mock/5950a2419adc231f356a6636/vue-admin"',
|
||||||
|
})
|
||||||
91
config/index.js
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
'use strict'
|
||||||
|
// Template version: 1.2.6
|
||||||
|
// see http://vuejs-templates.github.io/webpack for documentation.
|
||||||
|
|
||||||
|
const path = require('path')
|
||||||
|
const os = require('os')
|
||||||
|
|
||||||
|
const networkInterfaces = os.networkInterfaces()
|
||||||
|
|
||||||
|
// const ip = networkInterfaces['WLAN'][1] ? networkInterfaces['WLAN'][1].address : networkInterfaces['WLAN'][0].address
|
||||||
|
const ip = '127.0.0.1'
|
||||||
|
module.exports = {
|
||||||
|
dev: {
|
||||||
|
// Paths
|
||||||
|
assetsSubDirectory: 'static',
|
||||||
|
assetsPublicPath: '/',
|
||||||
|
proxyTable: {},
|
||||||
|
|
||||||
|
// Various Dev Server settings
|
||||||
|
host: ip, // can be overwritten by process.env.HOST
|
||||||
|
port: 1997, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
|
||||||
|
autoOpenBrowser: true,
|
||||||
|
errorOverlay: true,
|
||||||
|
notifyOnErrors: false,
|
||||||
|
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
|
||||||
|
|
||||||
|
// Use Eslint Loader?
|
||||||
|
// If true, your code will be linted during bundling and
|
||||||
|
// linting errors and warnings will be shown in the console.
|
||||||
|
useEslint: true,
|
||||||
|
// If true, eslint errors and warnings will also be shown in the error overlay
|
||||||
|
// in the browser.
|
||||||
|
showEslintErrorsInOverlay: false,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Source Maps
|
||||||
|
*/
|
||||||
|
|
||||||
|
// https://webpack.js.org/configuration/devtool/#development
|
||||||
|
devtool: 'cheap-source-map',
|
||||||
|
|
||||||
|
// CSS Sourcemaps off by default because relative paths are "buggy"
|
||||||
|
// with this option, according to the CSS-Loader README
|
||||||
|
// (https://github.com/webpack/css-loader#sourcemaps)
|
||||||
|
// In our experience, they generally work as expected,
|
||||||
|
// just be aware of this issue when enabling this option.
|
||||||
|
cssSourceMap: false
|
||||||
|
},
|
||||||
|
|
||||||
|
build: {
|
||||||
|
// Template for index.html
|
||||||
|
index: path.resolve(__dirname, '../dist/index.html'),
|
||||||
|
|
||||||
|
// Paths
|
||||||
|
assetsRoot: path.resolve(__dirname, '../dist'),
|
||||||
|
assetsSubDirectory: 'static',
|
||||||
|
|
||||||
|
/**
|
||||||
|
* You can set by youself according to actual condition
|
||||||
|
* You will need to set this if you plan to deploy your site under a sub path,
|
||||||
|
* for example GitHub pages. If you plan to deploy your site to https://foo.github.io/bar/,
|
||||||
|
* then assetsPublicPath should be set to "/bar/".
|
||||||
|
* In most cases please use '/' !!!
|
||||||
|
*/
|
||||||
|
assetsPublicPath: '/',
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Source Maps
|
||||||
|
*/
|
||||||
|
|
||||||
|
productionSourceMap: false,
|
||||||
|
// https://webpack.js.org/configuration/devtool/#production
|
||||||
|
devtool: 'source-map',
|
||||||
|
|
||||||
|
// Gzip off by default as many popular static hosts such as
|
||||||
|
// Surge or Netlify already gzip all static assets for you.
|
||||||
|
// Before setting to `true`, make sure to:
|
||||||
|
// npm install --save-dev compression-webpack-plugin
|
||||||
|
productionGzip: false,
|
||||||
|
productionGzipExtensions: ['js', 'css'],
|
||||||
|
|
||||||
|
// Run the build command with an extra argument to
|
||||||
|
// View the bundle analyzer report after build finishes:
|
||||||
|
// `npm run build --report`
|
||||||
|
// Set to `true` or `false` to always turn it on or off
|
||||||
|
bundleAnalyzerReport: process.env.npm_config_report || false,
|
||||||
|
|
||||||
|
// `npm run build:prod --generate_report`
|
||||||
|
generateAnalyzerReport: process.env.npm_config_generate_report || false
|
||||||
|
}
|
||||||
|
}
|
||||||
5
config/prod.env.js
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
'use strict'
|
||||||
|
module.exports = {
|
||||||
|
NODE_ENV: '"production"',
|
||||||
|
BASE_API: '"https://easy-mock.com/mock/5950a2419adc231f356a6636/vue-admin"',
|
||||||
|
}
|
||||||
5
debug.log
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
[0301/083149.303:ERROR:http_transport_win.cc(273)] WinHttpSendRequest: 操作成功完成。 (0x0)
|
||||||
|
[0515/102246.688:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
|
||||||
|
[0531/081503.881:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
|
||||||
|
[0605/094355.406:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
|
||||||
|
[0710/121232.515:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
|
||||||
BIN
favicon.ico
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
19
index.html
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||||
|
<title>MES信息管理系统</title>
|
||||||
|
</head>
|
||||||
|
<body style="background-color: #eeeeee">
|
||||||
|
<script src=<%= BASE_URL %>/config.js></script>
|
||||||
|
<script src=<%= BASE_URL %>/libs/docxtemplater.js></script>
|
||||||
|
<script src=<%= BASE_URL %>/libs/jszip.js></script>
|
||||||
|
<script src=<%= BASE_URL %>/libs/FileSaver.js></script>
|
||||||
|
<script src=<%= BASE_URL %>/libs/jszip-utils.js></script>
|
||||||
|
<script src=<%= BASE_URL %>/tinymce4.7.5/tinymce.min.js></script>
|
||||||
|
<div id="app"></div>
|
||||||
|
<script></script>
|
||||||
|
<!-- built files will be auto injected -->
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
110
package.json
Normal file
@@ -0,0 +1,110 @@
|
|||||||
|
{
|
||||||
|
"name": "MacroinfManage_MES",
|
||||||
|
"version": "1.1.0",
|
||||||
|
"description": "A Management Information System of QIANG LI CO,.LTD,the template is from git+https://github.com/PanJiaChen/vue-element-admin.git",
|
||||||
|
"author": "MESWORK",
|
||||||
|
"scripts": {
|
||||||
|
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
|
||||||
|
"start": "npm run dev",
|
||||||
|
"build": "node build/build.js",
|
||||||
|
"build:report": "npm_config_report=true npm run build",
|
||||||
|
"lint": "eslint --fix --ext .js,.vue src",
|
||||||
|
"test": "npm run lint",
|
||||||
|
"svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@pencilpix/vue2-clock-picker": "^0.1.6",
|
||||||
|
"axios": "0.18.0",
|
||||||
|
"dhtmlx-gantt": "^7.1.12",
|
||||||
|
"docxtemplater": "^3.19.7",
|
||||||
|
"echarts": "^4.2.0-rc.2",
|
||||||
|
"element-ui": "^2.13.0",
|
||||||
|
"file-saver": "^1.3.8",
|
||||||
|
"html2canvas": "^1.0.0-alpha.12",
|
||||||
|
"jquery": "^3.5.1",
|
||||||
|
"js-cookie": "2.2.0",
|
||||||
|
"jspdf": "2.5.1",
|
||||||
|
"jszip-utils": "^0.1.0",
|
||||||
|
"legacy": "^0.0.3",
|
||||||
|
"mqtt": "^4.3.7",
|
||||||
|
"node-sass": "latest",
|
||||||
|
"normalize.css": "7.0.0",
|
||||||
|
"npm": "^7.20.5",
|
||||||
|
"nprogress": "0.2.0",
|
||||||
|
"qrcode": "^1.3.2",
|
||||||
|
"stylus": "0.52.4",
|
||||||
|
"stylus-loader": "^3.0.1",
|
||||||
|
"time-formater": "^1.0.3",
|
||||||
|
"uuid": "^9.0.0",
|
||||||
|
"v-viewer": "^1.3.1",
|
||||||
|
"view-ui-plus": "^1.3.1",
|
||||||
|
"vue": "2.5.17",
|
||||||
|
"vue-count-to": "^1.0.13",
|
||||||
|
"vue-direction-key": "^1.0.5",
|
||||||
|
"vue-easy-print": "^0.0.8",
|
||||||
|
"vue-print-nb": "^1.7.5",
|
||||||
|
"vue-router": "^3.0.7",
|
||||||
|
"vuex": "3.0.1",
|
||||||
|
"xlsx": "^0.14.0",
|
||||||
|
"xlsx-style": "^0.8.13"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"autoprefixer": "8.5.0",
|
||||||
|
"babel-core": "6.26.0",
|
||||||
|
"babel-eslint": "8.2.6",
|
||||||
|
"babel-helper-vue-jsx-merge-props": "2.0.3",
|
||||||
|
"babel-loader": "7.1.5",
|
||||||
|
"babel-plugin-syntax-jsx": "6.18.0",
|
||||||
|
"babel-plugin-transform-runtime": "6.23.0",
|
||||||
|
"babel-plugin-transform-vue-jsx": "3.7.0",
|
||||||
|
"babel-preset-env": "1.7.0",
|
||||||
|
"babel-preset-stage-2": "6.24.1",
|
||||||
|
"chalk": "2.4.1",
|
||||||
|
"copy-webpack-plugin": "4.5.2",
|
||||||
|
"css-loader": "1.0.0",
|
||||||
|
"eslint": "^4.19.1",
|
||||||
|
"eslint-friendly-formatter": "4.0.1",
|
||||||
|
"eslint-loader": "2.0.0",
|
||||||
|
"eslint-plugin-vue": "4.7.1",
|
||||||
|
"eventsource-polyfill": "0.9.6",
|
||||||
|
"file-loader": "1.1.11",
|
||||||
|
"friendly-errors-webpack-plugin": "1.7.0",
|
||||||
|
"html-webpack-plugin": "^4.5.2",
|
||||||
|
"mini-css-extract-plugin": "0.4.1",
|
||||||
|
"node-notifier": "5.2.1",
|
||||||
|
"optimize-css-assets-webpack-plugin": "5.0.0",
|
||||||
|
"ora": "3.0.0",
|
||||||
|
"portfinder": "1.0.16",
|
||||||
|
"postcss-import": "12.0.0",
|
||||||
|
"postcss-loader": "2.1.6",
|
||||||
|
"postcss-url": "7.3.2",
|
||||||
|
"raw-loader": "^4.0.2",
|
||||||
|
"rimraf": "2.6.2",
|
||||||
|
"sass-loader": "7.0.3",
|
||||||
|
"script-ext-html-webpack-plugin": "2.1.3",
|
||||||
|
"script-loader": "^0.7.2",
|
||||||
|
"semver": "5.5.0",
|
||||||
|
"shelljs": "0.8.2",
|
||||||
|
"svg-sprite-loader": "3.8.0",
|
||||||
|
"svgo": "1.0.5",
|
||||||
|
"uglifyjs-webpack-plugin": "1.2.7",
|
||||||
|
"url-loader": "1.0.1",
|
||||||
|
"vue-loader": "15.3.0",
|
||||||
|
"vue-style-loader": "4.1.2",
|
||||||
|
"vue-template-compiler": "2.5.17",
|
||||||
|
"webpack": "4.36.1",
|
||||||
|
"webpack-bundle-analyzer": "2.13.1",
|
||||||
|
"webpack-cli": "3.1.0",
|
||||||
|
"webpack-dev-server": "3.1.5",
|
||||||
|
"webpack-merge": "4.1.4"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 6.0.0",
|
||||||
|
"npm": ">= 3.0.0"
|
||||||
|
},
|
||||||
|
"browserslist": [
|
||||||
|
"> 1%",
|
||||||
|
"last 2 versions",
|
||||||
|
"not ie <= 8"
|
||||||
|
]
|
||||||
|
}
|
||||||
30
src/App.vue
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
<template>
|
||||||
|
<div id="app">
|
||||||
|
<router-view v-if="isRouterAlive"/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'App',
|
||||||
|
provide() {
|
||||||
|
return {
|
||||||
|
reload: this.reload
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
isRouterAlive: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
reload() {
|
||||||
|
this.isRouterAlive = false
|
||||||
|
this.$nextTick(function() {
|
||||||
|
this.isRouterAlive = true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
37
src/api/login.js
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export function login(username, password) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '菜单模块系统_用户名密码_查询数据',
|
||||||
|
param: `用户名=${username}&密码=${password}`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//
|
||||||
|
export function getInfo(token, type) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '菜单系统模块_获取角色模块_查询数据',
|
||||||
|
param: `角色编号=${token}`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 修改密码
|
||||||
|
export function editPassword(num1, num2, num3) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '基础数据_修改密码',
|
||||||
|
param: '账号=' + num1 + '=string&原始密码=' + num2 + '=string&新密码=' + num3
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
BIN
src/assets/404_images/1.png
Normal file
|
After Width: | Height: | Size: 70 KiB |
BIN
src/assets/404_images/10.png
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
src/assets/404_images/11.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
src/assets/404_images/12.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
src/assets/404_images/13.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
src/assets/404_images/14.png
Normal file
|
After Width: | Height: | Size: 33 KiB |
BIN
src/assets/404_images/15.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
src/assets/404_images/16.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
src/assets/404_images/17.png
Normal file
|
After Width: | Height: | Size: 59 KiB |
BIN
src/assets/404_images/18.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
src/assets/404_images/2.png
Normal file
|
After Width: | Height: | Size: 52 KiB |
BIN
src/assets/404_images/20.png
Normal file
|
After Width: | Height: | Size: 6.2 KiB |
BIN
src/assets/404_images/3.png
Normal file
|
After Width: | Height: | Size: 138 KiB |
BIN
src/assets/404_images/4.png
Normal file
|
After Width: | Height: | Size: 164 KiB |
BIN
src/assets/404_images/404.png
Normal file
|
After Width: | Height: | Size: 96 KiB |
BIN
src/assets/404_images/404_cloud.png
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
src/assets/404_images/5.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
src/assets/404_images/6.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
src/assets/404_images/7.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
src/assets/404_images/8.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
src/assets/404_images/9.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
src/assets/img/LOGO.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
src/assets/img/MAISI2.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
src/assets/img/SCHAEFFLER.png
Normal file
|
After Width: | Height: | Size: 4.6 KiB |
BIN
src/assets/img/SCHAEFFLER_Logo.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
src/assets/img/gaojingLogo1.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
src/assets/img/gaojingLogo2.png
Normal file
|
After Width: | Height: | Size: 6.7 KiB |
BIN
src/assets/img/jiedgang.png
Normal file
|
After Width: | Height: | Size: 161 KiB |
BIN
src/assets/img/jiegang.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
src/assets/img/jiegang1.png
Normal file
|
After Width: | Height: | Size: 159 KiB |
BIN
src/assets/img/logo2.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
src/assets/img/user.jpg
Normal file
|
After Width: | Height: | Size: 23 KiB |
51
src/components/Breadcrumb/index.vue
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
<template>
|
||||||
|
<el-breadcrumb class="app-breadcrumb" separator="/">
|
||||||
|
<transition-group name="breadcrumb">
|
||||||
|
<el-breadcrumb-item v-for="(item,index) in levelList" v-if="item.meta.title" :key="item.path">
|
||||||
|
<span v-if="item.redirect==='noredirect'||index==levelList.length-1" class="no-redirect">{{ item.meta.title }}</span>
|
||||||
|
<span v-else :to="item.redirect||item.path" style="color: black">{{ item.meta.title }}</span>
|
||||||
|
</el-breadcrumb-item>
|
||||||
|
</transition-group>
|
||||||
|
</el-breadcrumb>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
levelList: null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
$route() {
|
||||||
|
this.getBreadcrumb()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getBreadcrumb()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getBreadcrumb() {
|
||||||
|
let matched = this.$route.matched.filter(item => item.name)
|
||||||
|
const first = matched[0]
|
||||||
|
if (first && first.name !== 'dashboard') {
|
||||||
|
matched = [{ path: '/dashboard', meta: { title: '主页' }}].concat(matched)
|
||||||
|
}
|
||||||
|
this.levelList = matched
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
|
.app-breadcrumb.el-breadcrumb {
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 50px;
|
||||||
|
margin-left: 10px;
|
||||||
|
.no-redirect {
|
||||||
|
color: #000000;
|
||||||
|
cursor: text;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
526
src/components/Calendar/calendar.js
Normal file
@@ -0,0 +1,526 @@
|
|||||||
|
/**
|
||||||
|
* @1900-2100区间内的公历、农历互转
|
||||||
|
* @charset UTF-8
|
||||||
|
* @Author Jea杨(JJonline@JJonline.Cn)
|
||||||
|
* @Time 2014-7-21
|
||||||
|
* @Time 2016-8-13 Fixed 2033hex、Attribution Annals
|
||||||
|
* @Time 2016-9-25 Fixed lunar LeapMonth Param Bug
|
||||||
|
* @Version 1.0.2
|
||||||
|
* @公历转农历:calendar.solar2lunar(1987,11,01); //[you can ignore params of prefix 0]
|
||||||
|
* @农历转公历:calendar.lunar2solar(1987,09,10); //[you can ignore params of prefix 0]
|
||||||
|
*/
|
||||||
|
/* eslint-disable */
|
||||||
|
var calendar = {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 农历1900-2100的润大小信息表
|
||||||
|
* @Array Of Property
|
||||||
|
* @return Hex
|
||||||
|
*/
|
||||||
|
lunarInfo:[0x04bd8,0x04ae0,0x0a570,0x054d5,0x0d260,0x0d950,0x16554,0x056a0,0x09ad0,0x055d2,//1900-1909
|
||||||
|
0x04ae0,0x0a5b6,0x0a4d0,0x0d250,0x1d255,0x0b540,0x0d6a0,0x0ada2,0x095b0,0x14977,//1910-1919
|
||||||
|
0x04970,0x0a4b0,0x0b4b5,0x06a50,0x06d40,0x1ab54,0x02b60,0x09570,0x052f2,0x04970,//1920-1929
|
||||||
|
0x06566,0x0d4a0,0x0ea50,0x06e95,0x05ad0,0x02b60,0x186e3,0x092e0,0x1c8d7,0x0c950,//1930-1939
|
||||||
|
0x0d4a0,0x1d8a6,0x0b550,0x056a0,0x1a5b4,0x025d0,0x092d0,0x0d2b2,0x0a950,0x0b557,//1940-1949
|
||||||
|
0x06ca0,0x0b550,0x15355,0x04da0,0x0a5b0,0x14573,0x052b0,0x0a9a8,0x0e950,0x06aa0,//1950-1959
|
||||||
|
0x0aea6,0x0ab50,0x04b60,0x0aae4,0x0a570,0x05260,0x0f263,0x0d950,0x05b57,0x056a0,//1960-1969
|
||||||
|
0x096d0,0x04dd5,0x04ad0,0x0a4d0,0x0d4d4,0x0d250,0x0d558,0x0b540,0x0b6a0,0x195a6,//1970-1979
|
||||||
|
0x095b0,0x049b0,0x0a974,0x0a4b0,0x0b27a,0x06a50,0x06d40,0x0af46,0x0ab60,0x09570,//1980-1989
|
||||||
|
0x04af5,0x04970,0x064b0,0x074a3,0x0ea50,0x06b58,0x055c0,0x0ab60,0x096d5,0x092e0,//1990-1999
|
||||||
|
0x0c960,0x0d954,0x0d4a0,0x0da50,0x07552,0x056a0,0x0abb7,0x025d0,0x092d0,0x0cab5,//2000-2009
|
||||||
|
0x0a950,0x0b4a0,0x0baa4,0x0ad50,0x055d9,0x04ba0,0x0a5b0,0x15176,0x052b0,0x0a930,//2010-2019
|
||||||
|
0x07954,0x06aa0,0x0ad50,0x05b52,0x04b60,0x0a6e6,0x0a4e0,0x0d260,0x0ea65,0x0d530,//2020-2029
|
||||||
|
0x05aa0,0x076a3,0x096d0,0x04afb,0x04ad0,0x0a4d0,0x1d0b6,0x0d250,0x0d520,0x0dd45,//2030-2039
|
||||||
|
0x0b5a0,0x056d0,0x055b2,0x049b0,0x0a577,0x0a4b0,0x0aa50,0x1b255,0x06d20,0x0ada0,//2040-2049
|
||||||
|
/**Add By JJonline@JJonline.Cn**/
|
||||||
|
0x14b63,0x09370,0x049f8,0x04970,0x064b0,0x168a6,0x0ea50, 0x06b20,0x1a6c4,0x0aae0,//2050-2059
|
||||||
|
0x0a2e0,0x0d2e3,0x0c960,0x0d557,0x0d4a0,0x0da50,0x05d55,0x056a0,0x0a6d0,0x055d4,//2060-2069
|
||||||
|
0x052d0,0x0a9b8,0x0a950,0x0b4a0,0x0b6a6,0x0ad50,0x055a0,0x0aba4,0x0a5b0,0x052b0,//2070-2079
|
||||||
|
0x0b273,0x06930,0x07337,0x06aa0,0x0ad50,0x14b55,0x04b60,0x0a570,0x054e4,0x0d160,//2080-2089
|
||||||
|
0x0e968,0x0d520,0x0daa0,0x16aa6,0x056d0,0x04ae0,0x0a9d4,0x0a2d0,0x0d150,0x0f252,//2090-2099
|
||||||
|
0x0d520],//2100
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 公历每个月份的天数普通表
|
||||||
|
* @Array Of Property
|
||||||
|
* @return Number
|
||||||
|
*/
|
||||||
|
solarMonth:[31,28,31,30,31,30,31,31,30,31,30,31],
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 天干地支之天干速查表
|
||||||
|
* @Array Of Property trans["甲","乙","丙","丁","戊","己","庚","辛","壬","癸"]
|
||||||
|
* @return Cn string
|
||||||
|
*/
|
||||||
|
Gan:["\u7532","\u4e59","\u4e19","\u4e01","\u620a","\u5df1","\u5e9a","\u8f9b","\u58ec","\u7678"],
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 天干地支之地支速查表
|
||||||
|
* @Array Of Property
|
||||||
|
* @trans["子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"]
|
||||||
|
* @return Cn string
|
||||||
|
*/
|
||||||
|
Zhi:["\u5b50","\u4e11","\u5bc5","\u536f","\u8fb0","\u5df3","\u5348","\u672a","\u7533","\u9149","\u620c","\u4ea5"],
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 天干地支之地支速查表<=>生肖
|
||||||
|
* @Array Of Property
|
||||||
|
* @trans["鼠","牛","虎","兔","龙","蛇","马","羊","猴","鸡","狗","猪"]
|
||||||
|
* @return Cn string
|
||||||
|
*/
|
||||||
|
Animals:["\u9f20","\u725b","\u864e","\u5154","\u9f99","\u86c7","\u9a6c","\u7f8a","\u7334","\u9e21","\u72d7","\u732a"],
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 24节气速查表
|
||||||
|
* @Array Of Property
|
||||||
|
* @trans["小寒","大寒","立春","雨水","惊蛰","春分","清明","谷雨","立夏","小满","芒种","夏至","小暑","大暑","立秋","处暑","白露","秋分","寒露","霜降","立冬","小雪","大雪","冬至"]
|
||||||
|
* @return Cn string
|
||||||
|
*/
|
||||||
|
solarTerm:["\u5c0f\u5bd2","\u5927\u5bd2","\u7acb\u6625","\u96e8\u6c34","\u60ca\u86f0","\u6625\u5206","\u6e05\u660e","\u8c37\u96e8","\u7acb\u590f","\u5c0f\u6ee1","\u8292\u79cd","\u590f\u81f3","\u5c0f\u6691","\u5927\u6691","\u7acb\u79cb","\u5904\u6691","\u767d\u9732","\u79cb\u5206","\u5bd2\u9732","\u971c\u964d","\u7acb\u51ac","\u5c0f\u96ea","\u5927\u96ea","\u51ac\u81f3"],
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1900-2100各年的24节气日期速查表
|
||||||
|
* @Array Of Property
|
||||||
|
* @return 0x string For splice
|
||||||
|
*/
|
||||||
|
sTermInfo:['9778397bd097c36b0b6fc9274c91aa','97b6b97bd19801ec9210c965cc920e','97bcf97c3598082c95f8c965cc920f',
|
||||||
|
'97bd0b06bdb0722c965ce1cfcc920f','b027097bd097c36b0b6fc9274c91aa','97b6b97bd19801ec9210c965cc920e',
|
||||||
|
'97bcf97c359801ec95f8c965cc920f','97bd0b06bdb0722c965ce1cfcc920f','b027097bd097c36b0b6fc9274c91aa',
|
||||||
|
'97b6b97bd19801ec9210c965cc920e','97bcf97c359801ec95f8c965cc920f','97bd0b06bdb0722c965ce1cfcc920f',
|
||||||
|
'b027097bd097c36b0b6fc9274c91aa','9778397bd19801ec9210c965cc920e','97b6b97bd19801ec95f8c965cc920f',
|
||||||
|
'97bd09801d98082c95f8e1cfcc920f','97bd097bd097c36b0b6fc9210c8dc2','9778397bd197c36c9210c9274c91aa',
|
||||||
|
'97b6b97bd19801ec95f8c965cc920e','97bd09801d98082c95f8e1cfcc920f','97bd097bd097c36b0b6fc9210c8dc2',
|
||||||
|
'9778397bd097c36c9210c9274c91aa','97b6b97bd19801ec95f8c965cc920e','97bcf97c3598082c95f8e1cfcc920f',
|
||||||
|
'97bd097bd097c36b0b6fc9210c8dc2','9778397bd097c36c9210c9274c91aa','97b6b97bd19801ec9210c965cc920e',
|
||||||
|
'97bcf97c3598082c95f8c965cc920f','97bd097bd097c35b0b6fc920fb0722','9778397bd097c36b0b6fc9274c91aa',
|
||||||
|
'97b6b97bd19801ec9210c965cc920e','97bcf97c3598082c95f8c965cc920f','97bd097bd097c35b0b6fc920fb0722',
|
||||||
|
'9778397bd097c36b0b6fc9274c91aa','97b6b97bd19801ec9210c965cc920e','97bcf97c359801ec95f8c965cc920f',
|
||||||
|
'97bd097bd097c35b0b6fc920fb0722','9778397bd097c36b0b6fc9274c91aa','97b6b97bd19801ec9210c965cc920e',
|
||||||
|
'97bcf97c359801ec95f8c965cc920f','97bd097bd097c35b0b6fc920fb0722','9778397bd097c36b0b6fc9274c91aa',
|
||||||
|
'97b6b97bd19801ec9210c965cc920e','97bcf97c359801ec95f8c965cc920f','97bd097bd07f595b0b6fc920fb0722',
|
||||||
|
'9778397bd097c36b0b6fc9210c8dc2','9778397bd19801ec9210c9274c920e','97b6b97bd19801ec95f8c965cc920f',
|
||||||
|
'97bd07f5307f595b0b0bc920fb0722','7f0e397bd097c36b0b6fc9210c8dc2','9778397bd097c36c9210c9274c920e',
|
||||||
|
'97b6b97bd19801ec95f8c965cc920f','97bd07f5307f595b0b0bc920fb0722','7f0e397bd097c36b0b6fc9210c8dc2',
|
||||||
|
'9778397bd097c36c9210c9274c91aa','97b6b97bd19801ec9210c965cc920e','97bd07f1487f595b0b0bc920fb0722',
|
||||||
|
'7f0e397bd097c36b0b6fc9210c8dc2','9778397bd097c36b0b6fc9274c91aa','97b6b97bd19801ec9210c965cc920e',
|
||||||
|
'97bcf7f1487f595b0b0bb0b6fb0722','7f0e397bd097c35b0b6fc920fb0722','9778397bd097c36b0b6fc9274c91aa',
|
||||||
|
'97b6b97bd19801ec9210c965cc920e','97bcf7f1487f595b0b0bb0b6fb0722','7f0e397bd097c35b0b6fc920fb0722',
|
||||||
|
'9778397bd097c36b0b6fc9274c91aa','97b6b97bd19801ec9210c965cc920e','97bcf7f1487f531b0b0bb0b6fb0722',
|
||||||
|
'7f0e397bd097c35b0b6fc920fb0722','9778397bd097c36b0b6fc9274c91aa','97b6b97bd19801ec9210c965cc920e',
|
||||||
|
'97bcf7f1487f531b0b0bb0b6fb0722','7f0e397bd07f595b0b6fc920fb0722','9778397bd097c36b0b6fc9274c91aa',
|
||||||
|
'97b6b97bd19801ec9210c9274c920e','97bcf7f0e47f531b0b0bb0b6fb0722','7f0e397bd07f595b0b0bc920fb0722',
|
||||||
|
'9778397bd097c36b0b6fc9210c91aa','97b6b97bd197c36c9210c9274c920e','97bcf7f0e47f531b0b0bb0b6fb0722',
|
||||||
|
'7f0e397bd07f595b0b0bc920fb0722','9778397bd097c36b0b6fc9210c8dc2','9778397bd097c36c9210c9274c920e',
|
||||||
|
'97b6b7f0e47f531b0723b0b6fb0722','7f0e37f5307f595b0b0bc920fb0722','7f0e397bd097c36b0b6fc9210c8dc2',
|
||||||
|
'9778397bd097c36b0b70c9274c91aa','97b6b7f0e47f531b0723b0b6fb0721','7f0e37f1487f595b0b0bb0b6fb0722',
|
||||||
|
'7f0e397bd097c35b0b6fc9210c8dc2','9778397bd097c36b0b6fc9274c91aa','97b6b7f0e47f531b0723b0b6fb0721',
|
||||||
|
'7f0e27f1487f595b0b0bb0b6fb0722','7f0e397bd097c35b0b6fc920fb0722','9778397bd097c36b0b6fc9274c91aa',
|
||||||
|
'97b6b7f0e47f531b0723b0b6fb0721','7f0e27f1487f531b0b0bb0b6fb0722','7f0e397bd097c35b0b6fc920fb0722',
|
||||||
|
'9778397bd097c36b0b6fc9274c91aa','97b6b7f0e47f531b0723b0b6fb0721','7f0e27f1487f531b0b0bb0b6fb0722',
|
||||||
|
'7f0e397bd097c35b0b6fc920fb0722','9778397bd097c36b0b6fc9274c91aa','97b6b7f0e47f531b0723b0b6fb0721',
|
||||||
|
'7f0e27f1487f531b0b0bb0b6fb0722','7f0e397bd07f595b0b0bc920fb0722','9778397bd097c36b0b6fc9274c91aa',
|
||||||
|
'97b6b7f0e47f531b0723b0787b0721','7f0e27f0e47f531b0b0bb0b6fb0722','7f0e397bd07f595b0b0bc920fb0722',
|
||||||
|
'9778397bd097c36b0b6fc9210c91aa','97b6b7f0e47f149b0723b0787b0721','7f0e27f0e47f531b0723b0b6fb0722',
|
||||||
|
'7f0e397bd07f595b0b0bc920fb0722','9778397bd097c36b0b6fc9210c8dc2','977837f0e37f149b0723b0787b0721',
|
||||||
|
'7f07e7f0e47f531b0723b0b6fb0722','7f0e37f5307f595b0b0bc920fb0722','7f0e397bd097c35b0b6fc9210c8dc2',
|
||||||
|
'977837f0e37f14998082b0787b0721','7f07e7f0e47f531b0723b0b6fb0721','7f0e37f1487f595b0b0bb0b6fb0722',
|
||||||
|
'7f0e397bd097c35b0b6fc9210c8dc2','977837f0e37f14998082b0787b06bd','7f07e7f0e47f531b0723b0b6fb0721',
|
||||||
|
'7f0e27f1487f531b0b0bb0b6fb0722','7f0e397bd097c35b0b6fc920fb0722','977837f0e37f14998082b0787b06bd',
|
||||||
|
'7f07e7f0e47f531b0723b0b6fb0721','7f0e27f1487f531b0b0bb0b6fb0722','7f0e397bd097c35b0b6fc920fb0722',
|
||||||
|
'977837f0e37f14998082b0787b06bd','7f07e7f0e47f531b0723b0b6fb0721','7f0e27f1487f531b0b0bb0b6fb0722',
|
||||||
|
'7f0e397bd07f595b0b0bc920fb0722','977837f0e37f14998082b0787b06bd','7f07e7f0e47f531b0723b0b6fb0721',
|
||||||
|
'7f0e27f1487f531b0b0bb0b6fb0722','7f0e397bd07f595b0b0bc920fb0722','977837f0e37f14998082b0787b06bd',
|
||||||
|
'7f07e7f0e47f149b0723b0787b0721','7f0e27f0e47f531b0b0bb0b6fb0722','7f0e397bd07f595b0b0bc920fb0722',
|
||||||
|
'977837f0e37f14998082b0723b06bd','7f07e7f0e37f149b0723b0787b0721','7f0e27f0e47f531b0723b0b6fb0722',
|
||||||
|
'7f0e397bd07f595b0b0bc920fb0722','977837f0e37f14898082b0723b02d5','7ec967f0e37f14998082b0787b0721',
|
||||||
|
'7f07e7f0e47f531b0723b0b6fb0722','7f0e37f1487f595b0b0bb0b6fb0722','7f0e37f0e37f14898082b0723b02d5',
|
||||||
|
'7ec967f0e37f14998082b0787b0721','7f07e7f0e47f531b0723b0b6fb0722','7f0e37f1487f531b0b0bb0b6fb0722',
|
||||||
|
'7f0e37f0e37f14898082b0723b02d5','7ec967f0e37f14998082b0787b06bd','7f07e7f0e47f531b0723b0b6fb0721',
|
||||||
|
'7f0e37f1487f531b0b0bb0b6fb0722','7f0e37f0e37f14898082b072297c35','7ec967f0e37f14998082b0787b06bd',
|
||||||
|
'7f07e7f0e47f531b0723b0b6fb0721','7f0e27f1487f531b0b0bb0b6fb0722','7f0e37f0e37f14898082b072297c35',
|
||||||
|
'7ec967f0e37f14998082b0787b06bd','7f07e7f0e47f531b0723b0b6fb0721','7f0e27f1487f531b0b0bb0b6fb0722',
|
||||||
|
'7f0e37f0e366aa89801eb072297c35','7ec967f0e37f14998082b0787b06bd','7f07e7f0e47f149b0723b0787b0721',
|
||||||
|
'7f0e27f1487f531b0b0bb0b6fb0722','7f0e37f0e366aa89801eb072297c35','7ec967f0e37f14998082b0723b06bd',
|
||||||
|
'7f07e7f0e47f149b0723b0787b0721','7f0e27f0e47f531b0723b0b6fb0722','7f0e37f0e366aa89801eb072297c35',
|
||||||
|
'7ec967f0e37f14998082b0723b06bd','7f07e7f0e37f14998083b0787b0721','7f0e27f0e47f531b0723b0b6fb0722',
|
||||||
|
'7f0e37f0e366aa89801eb072297c35','7ec967f0e37f14898082b0723b02d5','7f07e7f0e37f14998082b0787b0721',
|
||||||
|
'7f07e7f0e47f531b0723b0b6fb0722','7f0e36665b66aa89801e9808297c35','665f67f0e37f14898082b0723b02d5',
|
||||||
|
'7ec967f0e37f14998082b0787b0721','7f07e7f0e47f531b0723b0b6fb0722','7f0e36665b66a449801e9808297c35',
|
||||||
|
'665f67f0e37f14898082b0723b02d5','7ec967f0e37f14998082b0787b06bd','7f07e7f0e47f531b0723b0b6fb0721',
|
||||||
|
'7f0e36665b66a449801e9808297c35','665f67f0e37f14898082b072297c35','7ec967f0e37f14998082b0787b06bd',
|
||||||
|
'7f07e7f0e47f531b0723b0b6fb0721','7f0e26665b66a449801e9808297c35','665f67f0e37f1489801eb072297c35',
|
||||||
|
'7ec967f0e37f14998082b0787b06bd','7f07e7f0e47f531b0723b0b6fb0721','7f0e27f1487f531b0b0bb0b6fb0722'],
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数字转中文速查表
|
||||||
|
* @Array Of Property
|
||||||
|
* @trans ['日','一','二','三','四','五','六','七','八','九','十']
|
||||||
|
* @return Cn string
|
||||||
|
*/
|
||||||
|
nStr1:["\u65e5","\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341"],
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日期转农历称呼速查表
|
||||||
|
* @Array Of Property
|
||||||
|
* @trans ['初','十','廿','卅']
|
||||||
|
* @return Cn string
|
||||||
|
*/
|
||||||
|
nStr2:["\u521d","\u5341","\u5eff","\u5345"],
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 月份转农历称呼速查表
|
||||||
|
* @Array Of Property
|
||||||
|
* @trans ['正','一','二','三','四','五','六','七','八','九','十','冬','腊']
|
||||||
|
* @return Cn string
|
||||||
|
*/
|
||||||
|
nStr3:["\u6b63","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341","\u51ac","\u814a"],
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 返回农历y年一整年的总天数
|
||||||
|
* @param lunar Year
|
||||||
|
* @return Number
|
||||||
|
* @eg:var count = calendar.lYearDays(1987) ;//count=387
|
||||||
|
*/
|
||||||
|
lYearDays:function(y) {
|
||||||
|
var i, sum = 348;
|
||||||
|
for(i=0x8000; i>0x8; i>>=1) { sum += (calendar.lunarInfo[y-1900] & i)? 1: 0; }
|
||||||
|
return(sum+calendar.leapDays(y));
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 返回农历y年闰月是哪个月;若y年没有闰月 则返回0
|
||||||
|
* @param lunar Year
|
||||||
|
* @return Number (0-12)
|
||||||
|
* @eg:var leapMonth = calendar.leapMonth(1987) ;//leapMonth=6
|
||||||
|
*/
|
||||||
|
leapMonth:function(y) { //闰字编码 \u95f0
|
||||||
|
return(calendar.lunarInfo[y-1900] & 0xf);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 返回农历y年闰月的天数 若该年没有闰月则返回0
|
||||||
|
* @param lunar Year
|
||||||
|
* @return Number (0、29、30)
|
||||||
|
* @eg:var leapMonthDay = calendar.leapDays(1987) ;//leapMonthDay=29
|
||||||
|
*/
|
||||||
|
leapDays:function(y) {
|
||||||
|
if(calendar.leapMonth(y)) {
|
||||||
|
return((calendar.lunarInfo[y-1900] & 0x10000)? 30: 29);
|
||||||
|
}
|
||||||
|
return(0);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 返回农历y年m月(非闰月)的总天数,计算m为闰月时的天数请使用leapDays方法
|
||||||
|
* @param lunar Year
|
||||||
|
* @return Number (-1、29、30)
|
||||||
|
* @eg:var MonthDay = calendar.monthDays(1987,9) ;//MonthDay=29
|
||||||
|
*/
|
||||||
|
monthDays:function(y,m) {
|
||||||
|
if(m>12 || m<1) {return -1}//月份参数从1至12,参数错误返回-1
|
||||||
|
return( (calendar.lunarInfo[y-1900] & (0x10000>>m))? 30: 29 );
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 返回公历(!)y年m月的天数
|
||||||
|
* @param solar Year
|
||||||
|
* @return Number (-1、28、29、30、31)
|
||||||
|
* @eg:var solarMonthDay = calendar.leapDays(1987) ;//solarMonthDay=30
|
||||||
|
*/
|
||||||
|
solarDays:function(y,m) {
|
||||||
|
if(m>12 || m<1) {return -1} //若参数错误 返回-1
|
||||||
|
var ms = m-1;
|
||||||
|
if(ms==1) { //2月份的闰平规律测算后确认返回28或29
|
||||||
|
return(((y%4 == 0) && (y%100 != 0) || (y%400 == 0))? 29: 28);
|
||||||
|
}else {
|
||||||
|
return(calendar.solarMonth[ms]);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 农历年份转换为干支纪年
|
||||||
|
* @param lYear 农历年的年份数
|
||||||
|
* @return Cn string
|
||||||
|
*/
|
||||||
|
toGanZhiYear:function(lYear) {
|
||||||
|
var ganKey = (lYear - 3) % 10;
|
||||||
|
var zhiKey = (lYear - 3) % 12;
|
||||||
|
if(ganKey == 0) ganKey = 10;//如果余数为0则为最后一个天干
|
||||||
|
if(zhiKey == 0) zhiKey = 12;//如果余数为0则为最后一个地支
|
||||||
|
return calendar.Gan[ganKey-1] + calendar.Zhi[zhiKey-1];
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 公历月、日判断所属星座
|
||||||
|
* @param cMonth [description]
|
||||||
|
* @param cDay [description]
|
||||||
|
* @return Cn string
|
||||||
|
*/
|
||||||
|
toAstro:function(cMonth,cDay) {
|
||||||
|
var s = "\u9b54\u7faf\u6c34\u74f6\u53cc\u9c7c\u767d\u7f8a\u91d1\u725b\u53cc\u5b50\u5de8\u87f9\u72ee\u5b50\u5904\u5973\u5929\u79e4\u5929\u874e\u5c04\u624b\u9b54\u7faf";
|
||||||
|
var arr = [20,19,21,21,21,22,23,23,23,23,22,22];
|
||||||
|
return s.substr(cMonth*2 - (cDay < arr[cMonth-1] ? 2 : 0),2) + "\u5ea7";//座
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 传入offset偏移量返回干支
|
||||||
|
* @param offset 相对甲子的偏移量
|
||||||
|
* @return Cn string
|
||||||
|
*/
|
||||||
|
toGanZhi:function(offset) {
|
||||||
|
return calendar.Gan[offset%10] + calendar.Zhi[offset%12];
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 传入公历(!)y年获得该年第n个节气的公历日期
|
||||||
|
* @param y公历年(1900-2100);n二十四节气中的第几个节气(1~24);从n=1(小寒)算起
|
||||||
|
* @return day Number
|
||||||
|
* @eg:var _24 = calendar.getTerm(1987,3) ;//_24=4;意即1987年2月4日立春
|
||||||
|
*/
|
||||||
|
getTerm:function(y,n) {
|
||||||
|
if(y<1900 || y>2100) {return -1;}
|
||||||
|
if(n<1 || n>24) {return -1;}
|
||||||
|
var _table = calendar.sTermInfo[y-1900];
|
||||||
|
var _info = [
|
||||||
|
parseInt('0x'+_table.substr(0,5)).toString() ,
|
||||||
|
parseInt('0x'+_table.substr(5,5)).toString(),
|
||||||
|
parseInt('0x'+_table.substr(10,5)).toString(),
|
||||||
|
parseInt('0x'+_table.substr(15,5)).toString(),
|
||||||
|
parseInt('0x'+_table.substr(20,5)).toString(),
|
||||||
|
parseInt('0x'+_table.substr(25,5)).toString()
|
||||||
|
];
|
||||||
|
var _calday = [
|
||||||
|
_info[0].substr(0,1),
|
||||||
|
_info[0].substr(1,2),
|
||||||
|
_info[0].substr(3,1),
|
||||||
|
_info[0].substr(4,2),
|
||||||
|
|
||||||
|
_info[1].substr(0,1),
|
||||||
|
_info[1].substr(1,2),
|
||||||
|
_info[1].substr(3,1),
|
||||||
|
_info[1].substr(4,2),
|
||||||
|
|
||||||
|
_info[2].substr(0,1),
|
||||||
|
_info[2].substr(1,2),
|
||||||
|
_info[2].substr(3,1),
|
||||||
|
_info[2].substr(4,2),
|
||||||
|
|
||||||
|
_info[3].substr(0,1),
|
||||||
|
_info[3].substr(1,2),
|
||||||
|
_info[3].substr(3,1),
|
||||||
|
_info[3].substr(4,2),
|
||||||
|
|
||||||
|
_info[4].substr(0,1),
|
||||||
|
_info[4].substr(1,2),
|
||||||
|
_info[4].substr(3,1),
|
||||||
|
_info[4].substr(4,2),
|
||||||
|
|
||||||
|
_info[5].substr(0,1),
|
||||||
|
_info[5].substr(1,2),
|
||||||
|
_info[5].substr(3,1),
|
||||||
|
_info[5].substr(4,2),
|
||||||
|
];
|
||||||
|
return parseInt(_calday[n-1]);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 传入农历数字月份返回汉语通俗表示法
|
||||||
|
* @param lunar month
|
||||||
|
* @return Cn string
|
||||||
|
* @eg:var cnMonth = calendar.toChinaMonth(12) ;//cnMonth='腊月'
|
||||||
|
*/
|
||||||
|
toChinaMonth:function(m) { // 月 => \u6708
|
||||||
|
if(m>12 || m<1) {return -1} //若参数错误 返回-1
|
||||||
|
var s = calendar.nStr3[m-1];
|
||||||
|
s+= "\u6708";//加上月字
|
||||||
|
return s;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 传入农历日期数字返回汉字表示法
|
||||||
|
* @param lunar day
|
||||||
|
* @return Cn string
|
||||||
|
* @eg:var cnDay = calendar.toChinaDay(21) ;//cnMonth='廿一'
|
||||||
|
*/
|
||||||
|
toChinaDay:function(d){ //日 => \u65e5
|
||||||
|
var s;
|
||||||
|
switch (d) {
|
||||||
|
case 10:
|
||||||
|
s = '\u521d\u5341'; break;
|
||||||
|
case 20:
|
||||||
|
s = '\u4e8c\u5341'; break;
|
||||||
|
break;
|
||||||
|
case 30:
|
||||||
|
s = '\u4e09\u5341'; break;
|
||||||
|
break;
|
||||||
|
default :
|
||||||
|
s = calendar.nStr2[Math.floor(d/10)];
|
||||||
|
s += calendar.nStr1[d%10];
|
||||||
|
}
|
||||||
|
return(s);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 年份转生肖[!仅能大致转换] => 精确划分生肖分界线是“立春”
|
||||||
|
* @param y year
|
||||||
|
* @return Cn string
|
||||||
|
* @eg:var animal = calendar.getAnimal(1987) ;//animal='兔'
|
||||||
|
*/
|
||||||
|
getAnimal: function(y) {
|
||||||
|
return calendar.Animals[(y - 4) % 12]
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 传入阳历年月日获得详细的公历、农历object信息 <=>JSON
|
||||||
|
* @param y solar year
|
||||||
|
* @param m solar month
|
||||||
|
* @param d solar day
|
||||||
|
* @return JSON object
|
||||||
|
* @eg:console.log(calendar.solar2lunar(1987,11,01));
|
||||||
|
*/
|
||||||
|
solar2lunar:function (y,m,d) { //参数区间1900.1.31~2100.12.31
|
||||||
|
if(y<1900 || y>2100) {return -1;}//年份限定、上限
|
||||||
|
if(y==1900&&m==1&&d<31) {return -1;}//下限
|
||||||
|
if(!y) { //未传参 获得当天
|
||||||
|
var objDate = new Date();
|
||||||
|
}else {
|
||||||
|
var objDate = new Date(y,parseInt(m)-1,d)
|
||||||
|
}
|
||||||
|
var i, leap=0, temp=0;
|
||||||
|
//修正ymd参数
|
||||||
|
var y = objDate.getFullYear(),m = objDate.getMonth()+1,d = objDate.getDate();
|
||||||
|
var offset = (Date.UTC(objDate.getFullYear(),objDate.getMonth(),objDate.getDate()) - Date.UTC(1900,0,31))/86400000;
|
||||||
|
for(i=1900; i<2101 && offset>0; i++) { temp=calendar.lYearDays(i); offset-=temp; }
|
||||||
|
if(offset<0) { offset+=temp; i--; }
|
||||||
|
|
||||||
|
//是否今天
|
||||||
|
var isTodayObj = new Date(),isToday=false;
|
||||||
|
if(isTodayObj.getFullYear()==y && isTodayObj.getMonth()+1==m && isTodayObj.getDate()==d) {
|
||||||
|
isToday = true;
|
||||||
|
}
|
||||||
|
//星期几
|
||||||
|
var nWeek = objDate.getDay(),cWeek = calendar.nStr1[nWeek];
|
||||||
|
if(nWeek==0) {nWeek =7;}//数字表示周几顺应天朝周一开始的惯例
|
||||||
|
//农历年
|
||||||
|
var year = i;
|
||||||
|
|
||||||
|
var leap = calendar.leapMonth(i); //闰哪个月
|
||||||
|
var isLeap = false;
|
||||||
|
|
||||||
|
//效验闰月
|
||||||
|
for(i=1; i<13 && offset>0; i++) {
|
||||||
|
//闰月
|
||||||
|
if(leap>0 && i==(leap+1) && isLeap==false){
|
||||||
|
--i;
|
||||||
|
isLeap = true; temp = calendar.leapDays(year); //计算农历闰月天数
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
temp = calendar.monthDays(year, i);//计算农历普通月天数
|
||||||
|
}
|
||||||
|
//解除闰月
|
||||||
|
if(isLeap==true && i==(leap+1)) { isLeap = false; }
|
||||||
|
offset -= temp;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(offset==0 && leap>0 && i==leap+1)
|
||||||
|
if(isLeap){
|
||||||
|
isLeap = false;
|
||||||
|
}else{
|
||||||
|
isLeap = true; --i;
|
||||||
|
}
|
||||||
|
if(offset<0){ offset += temp; --i; }
|
||||||
|
//农历月
|
||||||
|
var month = i;
|
||||||
|
//农历日
|
||||||
|
var day = offset + 1;
|
||||||
|
|
||||||
|
//天干地支处理
|
||||||
|
var sm = m-1;
|
||||||
|
var gzY = calendar.toGanZhiYear(year);
|
||||||
|
|
||||||
|
//月柱 1900年1月小寒以前为 丙子月(60进制12)
|
||||||
|
var firstNode = calendar.getTerm(year,(m*2-1));//返回当月「节」为几日开始
|
||||||
|
var secondNode = calendar.getTerm(year,(m*2));//返回当月「节」为几日开始
|
||||||
|
|
||||||
|
//依据12节气修正干支月
|
||||||
|
var gzM = calendar.toGanZhi((y-1900)*12+m+11);
|
||||||
|
if(d>=firstNode) {
|
||||||
|
gzM = calendar.toGanZhi((y-1900)*12+m+12);
|
||||||
|
}
|
||||||
|
|
||||||
|
//传入的日期的节气与否
|
||||||
|
var isTerm = false;
|
||||||
|
var Term = null;
|
||||||
|
if(firstNode==d) {
|
||||||
|
isTerm = true;
|
||||||
|
Term = calendar.solarTerm[m*2-2];
|
||||||
|
}
|
||||||
|
if(secondNode==d) {
|
||||||
|
isTerm = true;
|
||||||
|
Term = calendar.solarTerm[m*2-1];
|
||||||
|
}
|
||||||
|
//日柱 当月一日与 1900/1/1 相差天数
|
||||||
|
var dayCyclical = Date.UTC(y,sm,1,0,0,0,0)/86400000+25567+10;
|
||||||
|
var gzD = calendar.toGanZhi(dayCyclical+d-1);
|
||||||
|
//该日期所属的星座
|
||||||
|
var astro = calendar.toAstro(m,d);
|
||||||
|
|
||||||
|
return {'lYear':year,'lMonth':month,'lDay':day,'Animal':calendar.getAnimal(year),'IMonthCn':(isLeap?"\u95f0":'')+calendar.toChinaMonth(month),'IDayCn':calendar.toChinaDay(day),'cYear':y,'cMonth':m,'cDay':d,'gzYear':gzY,'gzMonth':gzM,'gzDay':gzD,'isToday':isToday,'isLeap':isLeap,'nWeek':nWeek,'ncWeek':"\u661f\u671f"+cWeek,'isTerm':isTerm,'Term':Term,'astro':astro};
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 传入农历年月日以及传入的月份是否闰月获得详细的公历、农历object信息 <=>JSON
|
||||||
|
* @param y lunar year
|
||||||
|
* @param m lunar month
|
||||||
|
* @param d lunar day
|
||||||
|
* @param isLeapMonth lunar month is leap or not.[如果是农历闰月第四个参数赋值true即可]
|
||||||
|
* @return JSON object
|
||||||
|
* @eg:console.log(calendar.lunar2solar(1987,9,10));
|
||||||
|
*/
|
||||||
|
lunar2solar:function(y,m,d,isLeapMonth) { //参数区间1900.1.31~2100.12.1
|
||||||
|
var isLeapMonth = !!isLeapMonth;
|
||||||
|
var leapOffset = 0;
|
||||||
|
var leapMonth = calendar.leapMonth(y);
|
||||||
|
var leapDay = calendar.leapDays(y);
|
||||||
|
if(isLeapMonth&&(leapMonth!=m)) {return -1;}//传参要求计算该闰月公历 但该年得出的闰月与传参的月份并不同
|
||||||
|
if(y==2100&&m==12&&d>1 || y==1900&&m==1&&d<31) {return -1;}//超出了最大极限值
|
||||||
|
var day = calendar.monthDays(y,m);
|
||||||
|
var _day = day;
|
||||||
|
//bugFix 2016-9-25
|
||||||
|
//if month is leap, _day use leapDays method
|
||||||
|
if(isLeapMonth) {
|
||||||
|
_day = calendar.leapDays(y,m);
|
||||||
|
}
|
||||||
|
if(y < 1900 || y > 2100 || d > _day) {return -1;}//参数合法性效验
|
||||||
|
|
||||||
|
//计算农历的时间差
|
||||||
|
var offset = 0;
|
||||||
|
for(var i=1900;i<y;i++) {
|
||||||
|
offset+=calendar.lYearDays(i);
|
||||||
|
}
|
||||||
|
var leap = 0,isAdd= false;
|
||||||
|
for(var i=1;i<m;i++) {
|
||||||
|
leap = calendar.leapMonth(y);
|
||||||
|
if(!isAdd) {//处理闰月
|
||||||
|
if(leap<=i && leap>0) {
|
||||||
|
offset+=calendar.leapDays(y);isAdd = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
offset+=calendar.monthDays(y,i);
|
||||||
|
}
|
||||||
|
//转换闰月农历 需补充该年闰月的前一个月的时差
|
||||||
|
if(isLeapMonth) {offset+=day;}
|
||||||
|
//1900年农历正月一日的公历时间为1900年1月30日0时0分0秒(该时间也是本农历的最开始起始点)
|
||||||
|
var stmap = Date.UTC(1900,1,30,0,0,0);
|
||||||
|
var calObj = new Date((offset+d-31)*86400000+stmap);
|
||||||
|
var cY = calObj.getUTCFullYear();
|
||||||
|
var cM = calObj.getUTCMonth()+1;
|
||||||
|
var cD = calObj.getUTCDate();
|
||||||
|
|
||||||
|
return calendar.solar2lunar(cY,cM,cD);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export default calendar
|
||||||
|
/* eslint-disable */
|
||||||
837
src/components/Calendar/calendar.vue
Normal file
@@ -0,0 +1,837 @@
|
|||||||
|
<style scoped>
|
||||||
|
.calendar {
|
||||||
|
margin:auto;
|
||||||
|
width: 100%;
|
||||||
|
min-width:300px;
|
||||||
|
background: #fff;
|
||||||
|
font-family: "PingFang SC","Hiragino Sans GB","STHeiti","Microsoft YaHei","WenQuanYi Micro Hei",sans-serif;
|
||||||
|
user-select:none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.calendar-tools{
|
||||||
|
height:40px;
|
||||||
|
font-size: 20px;
|
||||||
|
line-height: 40px;
|
||||||
|
color:#5e7a88;
|
||||||
|
}
|
||||||
|
.calendar-tools span{
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.calendar-prev{
|
||||||
|
width: 14.28571429%;
|
||||||
|
float:left;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.calendar-info{
|
||||||
|
padding-top: 3px;
|
||||||
|
font-size:16px;
|
||||||
|
line-height: 1.3;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.calendar-info>div.month{
|
||||||
|
margin:auto;
|
||||||
|
height:20px;
|
||||||
|
width:100px;
|
||||||
|
text-align: center;
|
||||||
|
color:#5e7a88;
|
||||||
|
overflow: hidden;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.calendar-info>div.month .month-inner{
|
||||||
|
position: absolute;
|
||||||
|
left:0;
|
||||||
|
top:0;
|
||||||
|
height:240px;
|
||||||
|
transition:top .5s cubic-bezier(0.075, 0.82, 0.165, 1);
|
||||||
|
}
|
||||||
|
.calendar-info>div.month .month-inner>span{
|
||||||
|
display: block;
|
||||||
|
font-size: 14px;
|
||||||
|
height:20px;
|
||||||
|
width:100px;
|
||||||
|
overflow: hidden;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.calendar-info>div.year{
|
||||||
|
font-size:10px;
|
||||||
|
line-height: 1;
|
||||||
|
color:#999;
|
||||||
|
}
|
||||||
|
.calendar-next{
|
||||||
|
width: 14.28571429%;
|
||||||
|
float:right;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.calendar table {
|
||||||
|
clear: both;
|
||||||
|
width: 100%;
|
||||||
|
margin-bottom:10px;
|
||||||
|
border-collapse: collapse;
|
||||||
|
color: #444444;
|
||||||
|
}
|
||||||
|
.calendar td {
|
||||||
|
margin:2px !important;
|
||||||
|
padding:0px 0;
|
||||||
|
width: 14.28571429%;
|
||||||
|
height:44px;
|
||||||
|
text-align: center;
|
||||||
|
vertical-align: middle;
|
||||||
|
font-size:14px;
|
||||||
|
line-height: 125%;
|
||||||
|
cursor: pointer;
|
||||||
|
position: relative;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
.calendar td.week{
|
||||||
|
font-size:10px;
|
||||||
|
pointer-events:none !important;
|
||||||
|
cursor: default !important;
|
||||||
|
}
|
||||||
|
.calendar td.disabled {
|
||||||
|
color: #ccc;
|
||||||
|
pointer-events:none !important;
|
||||||
|
cursor: default !important;
|
||||||
|
}
|
||||||
|
.calendar td.disabled div{
|
||||||
|
color: #ccc;
|
||||||
|
}
|
||||||
|
.calendar td span{
|
||||||
|
display:block;
|
||||||
|
max-width:40px;
|
||||||
|
height:26px;
|
||||||
|
font-size: 16px;
|
||||||
|
line-height:26px;
|
||||||
|
margin:0px auto;
|
||||||
|
border-radius:20px;
|
||||||
|
}
|
||||||
|
.calendar td:not(.selected) span:not(.red):hover{
|
||||||
|
background:#f3f8fa;
|
||||||
|
color:#444;
|
||||||
|
}
|
||||||
|
.calendar td:not(.selected) span.red:hover{
|
||||||
|
background:#f9efef;
|
||||||
|
}
|
||||||
|
|
||||||
|
.calendar td:not(.disabled) span.red{
|
||||||
|
color:#ea6151;
|
||||||
|
}
|
||||||
|
.calendar td.selected span{
|
||||||
|
background-color: #5e7a88;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
.calendar td .text{
|
||||||
|
position: absolute;
|
||||||
|
top:28px;
|
||||||
|
left:0;
|
||||||
|
right:0;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
padding:2px;
|
||||||
|
font-size:8px;
|
||||||
|
line-height: 1.2;
|
||||||
|
color:#444;
|
||||||
|
}
|
||||||
|
.calendar td .isGregorianFestival,
|
||||||
|
.calendar td .isLunarFestival{
|
||||||
|
color:#ea6151;
|
||||||
|
}
|
||||||
|
.calendar td.selected span.red{
|
||||||
|
background-color: #ea6151;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
.calendar td.selected span.red:hover{
|
||||||
|
background-color: #ea6151;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
.calendar thead td {
|
||||||
|
text-transform: uppercase;
|
||||||
|
height:30px;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
.calendar-button{
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.calendar-button span{
|
||||||
|
cursor: pointer;
|
||||||
|
display: inline-block;
|
||||||
|
min-height: 1em;
|
||||||
|
min-width: 5em;
|
||||||
|
vertical-align: baseline;
|
||||||
|
background:#5e7a88;
|
||||||
|
color:#fff;
|
||||||
|
margin: 0 .25em 0 0;
|
||||||
|
padding: .6em 2em;
|
||||||
|
font-size: 1em;
|
||||||
|
line-height: 1em;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: .3em;
|
||||||
|
}
|
||||||
|
.calendar-button span.cancel{
|
||||||
|
background:#efefef;
|
||||||
|
color:#666;
|
||||||
|
}
|
||||||
|
.calendar-years{
|
||||||
|
position: absolute;
|
||||||
|
left:0px;
|
||||||
|
top:60px;
|
||||||
|
right:0px;
|
||||||
|
bottom:0px;
|
||||||
|
background:#fff;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
flex-wrap:wrap;
|
||||||
|
overflow: auto;
|
||||||
|
transition:all .5s cubic-bezier(0.075, 0.82, 0.165, 1);
|
||||||
|
opacity: 0;
|
||||||
|
pointer-events: none;
|
||||||
|
transform: translateY(-10px);
|
||||||
|
}
|
||||||
|
.calendar-years.show{
|
||||||
|
opacity: 1;
|
||||||
|
pointer-events: auto;
|
||||||
|
transform: translateY(0px);
|
||||||
|
}
|
||||||
|
.calendar-years>span{
|
||||||
|
margin:1px 5px;
|
||||||
|
display: inline-block;
|
||||||
|
width:60px;
|
||||||
|
line-height: 30px;
|
||||||
|
border-radius: 20px;
|
||||||
|
text-align:center;
|
||||||
|
border:1px solid #fbfbfb;
|
||||||
|
color:#999;
|
||||||
|
}
|
||||||
|
.calendar-years>span.active{
|
||||||
|
border:1px solid #5e7a88;
|
||||||
|
background-color: #5e7a88;
|
||||||
|
color:#fff;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="calendar">
|
||||||
|
<div class="calendar-tools">
|
||||||
|
<span class="calendar-prev" @click="prev">
|
||||||
|
<svg
|
||||||
|
width="20"
|
||||||
|
height="20"
|
||||||
|
viewBox="0 0 16 16"
|
||||||
|
version="1.1"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<g class="transform-group">
|
||||||
|
<g transform="scale(0.015625, 0.015625)">
|
||||||
|
<path
|
||||||
|
d="M671.968 912c-12.288 0-24.576-4.672-33.952-14.048L286.048 545.984c-18.752-18.72-18.752-49.12 0-67.872l351.968-352c18.752-18.752 49.12-18.752 67.872 0 18.752 18.72 18.752 49.12 0 67.872l-318.016 318.048 318.016 318.016c18.752 18.752 18.752 49.12 0 67.872C696.544 907.328 684.256 912 671.968 912z"
|
||||||
|
fill="#5e7a88"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
</span>
|
||||||
|
<span class="calendar-next" @click="next">
|
||||||
|
<svg
|
||||||
|
width="20"
|
||||||
|
height="20"
|
||||||
|
viewBox="0 0 16 16"
|
||||||
|
version="1.1"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<g class="transform-group">
|
||||||
|
<g transform="scale(0.015625, 0.015625)">
|
||||||
|
<path
|
||||||
|
d="M761.056 532.128c0.512-0.992 1.344-1.824 1.792-2.848 8.8-18.304 5.92-40.704-9.664-55.424L399.936 139.744c-19.264-18.208-49.632-17.344-67.872 1.888-18.208 19.264-17.376 49.632 1.888 67.872l316.96 299.84-315.712 304.288c-19.072 18.4-19.648 48.768-1.248 67.872 9.408 9.792 21.984 14.688 34.56 14.688 12 0 24-4.48 33.312-13.44l350.048-337.376c0.672-0.672 0.928-1.6 1.6-2.304 0.512-0.48 1.056-0.832 1.568-1.344C757.76 538.88 759.2 535.392 761.056 532.128z"
|
||||||
|
fill="#5e7a88"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
</span>
|
||||||
|
<div class="calendar-info" @click.stop="changeYear">
|
||||||
|
<!-- {{monthString}} -->
|
||||||
|
<div class="month">
|
||||||
|
<div :style="{'top':-(month*20)+'px'}" class="month-inner">
|
||||||
|
<span v-for="m in months" :key="m">{{ m }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="year">{{ year }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<table cellpadding="5">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<td v-for="week in weeks" :key="week" class="week">{{ week }}</td>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr v-for="(day,k1) in days" :key="(day,k1)" style="{'animation-delay',(k1*30)+'ms'}">
|
||||||
|
<td
|
||||||
|
v-for="(child,k2) in day"
|
||||||
|
:key="(child,k2)"
|
||||||
|
:class="{'selected':child.selected,'disabled':child.disabled}"
|
||||||
|
@click="select(k1,k2,$event)">
|
||||||
|
<span :class="{'red':k2==0||k2==6||((child.isLunarFestival||child.isGregorianFestival) && lunar)}">{{ child.day }}</span>
|
||||||
|
<div v-if="child.eventName!=undefined" class="text" >{{ child.eventName }}</div>
|
||||||
|
<div
|
||||||
|
v-if="lunar"
|
||||||
|
:class="{'isLunarFestival':child.isLunarFestival,'isGregorianFestival':child.isGregorianFestival}"
|
||||||
|
class="text">{{ child.lunar }}
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div :class="{'show':yearsShow}" class="calendar-years">
|
||||||
|
<span v-for="y in years" :key="y" :class="{'active':y==year}" @click.stop="selectYear(y)">{{ y }}</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
/* eslint-disable */
|
||||||
|
import calendar from './calendar.js'
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
// 多选模式
|
||||||
|
multi: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
// 范围模式
|
||||||
|
range:{
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
// 默认日期
|
||||||
|
value: {
|
||||||
|
type: Array,
|
||||||
|
default: function(){
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 开始选择日期
|
||||||
|
begin: {
|
||||||
|
type: Array,
|
||||||
|
default: function(){
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 结束选择日期
|
||||||
|
end: {
|
||||||
|
type: Array,
|
||||||
|
default: function(){
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// 是否小于10补零
|
||||||
|
zero:{
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
// 屏蔽的日期
|
||||||
|
disabled:{
|
||||||
|
type: Array,
|
||||||
|
default: function(){
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 是否显示农历
|
||||||
|
lunar: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
|
||||||
|
// 自定义星期名称
|
||||||
|
weeks: {
|
||||||
|
type: Array,
|
||||||
|
default:function(){
|
||||||
|
return window.navigator.language.toLowerCase() == "zh-cn"?['日', '一', '二', '三', '四', '五', '六']:['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 自定义月份
|
||||||
|
months:{
|
||||||
|
type: Array,
|
||||||
|
default:function(){
|
||||||
|
return window.navigator.language.toLowerCase() == "zh-cn"?['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月']:['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 自定义事件
|
||||||
|
events: {
|
||||||
|
type: Object,
|
||||||
|
default: function(){
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
years:[],
|
||||||
|
yearsShow:false,
|
||||||
|
year: 0,
|
||||||
|
month: 0,
|
||||||
|
day: 0,
|
||||||
|
days: [],
|
||||||
|
multiDays:[],
|
||||||
|
today: [],
|
||||||
|
festival:{
|
||||||
|
lunar:{
|
||||||
|
"1-1":"春节",
|
||||||
|
"1-15":"元宵节",
|
||||||
|
"2-2":"龙头节",
|
||||||
|
"5-5":"端午节",
|
||||||
|
"7-7":"七夕节",
|
||||||
|
"7-15":"中元节",
|
||||||
|
"8-15":"中秋节",
|
||||||
|
"9-9":"重阳节",
|
||||||
|
"10-1":"寒衣节",
|
||||||
|
"10-15":"下元节",
|
||||||
|
"12-8":"腊八节",
|
||||||
|
"12-23":"祭灶节",
|
||||||
|
},
|
||||||
|
gregorian:{
|
||||||
|
"1-1":"元旦",
|
||||||
|
"2-14":"情人节",
|
||||||
|
"3-8":"妇女节",
|
||||||
|
"3-12":"植树节",
|
||||||
|
"4-5":"清明节",
|
||||||
|
"5-1":"劳动节",
|
||||||
|
"5-4":"青年节",
|
||||||
|
"6-1":"儿童节",
|
||||||
|
"7-1":"建党节",
|
||||||
|
"8-1":"建军节",
|
||||||
|
"9-10":"教师节",
|
||||||
|
"10-1":"国庆节",
|
||||||
|
"12-24":"平安夜",
|
||||||
|
"12-25":"圣诞节",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
rangeBegin:[],
|
||||||
|
rangeEnd:[],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch:{
|
||||||
|
events(){
|
||||||
|
this.render(this.year,this.month)
|
||||||
|
},
|
||||||
|
value(){
|
||||||
|
this.init();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.init()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init(){
|
||||||
|
let now = new Date();
|
||||||
|
this.year = now.getFullYear()
|
||||||
|
this.month = now.getMonth()
|
||||||
|
this.day = now.getDate()
|
||||||
|
if (this.value.length>0) {
|
||||||
|
if (this.range) { //范围
|
||||||
|
this.year = parseInt(this.value[0][0])
|
||||||
|
this.month = parseInt(this.value[0][1]) - 1
|
||||||
|
this.day = parseInt(this.value[0][2])
|
||||||
|
|
||||||
|
let year2 = parseInt(this.value[1][0])
|
||||||
|
let month2 = parseInt(this.value[1][1]) - 1
|
||||||
|
let day2 = parseInt(this.value[1][2])
|
||||||
|
|
||||||
|
this.rangeBegin = [this.year, this.month,this.day]
|
||||||
|
this.rangeEnd = [year2, month2 , day2]
|
||||||
|
}else if(this.multi){//多选
|
||||||
|
this.multiDays=this.value;
|
||||||
|
this.year = parseInt(this.value[0][0])
|
||||||
|
this.month = parseInt(this.value[0][1]) - 1
|
||||||
|
this.day = parseInt(this.value[0][2])
|
||||||
|
}else{ //单选
|
||||||
|
this.year = parseInt(this.value[0])
|
||||||
|
this.month = parseInt(this.value[1]) - 1
|
||||||
|
this.day = parseInt(this.value[2])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.render(this.year, this.month)
|
||||||
|
},
|
||||||
|
// 渲染日期
|
||||||
|
render(y, m) {
|
||||||
|
let firstDayOfMonth = new Date(y, m, 1).getDay() //当月第一天
|
||||||
|
let lastDateOfMonth = new Date(y, m + 1, 0).getDate() //当月最后一天
|
||||||
|
let lastDayOfLastMonth = new Date(y, m, 0).getDate() //最后一月的最后一天
|
||||||
|
this.year = y
|
||||||
|
let seletSplit = this.value
|
||||||
|
let i, line = 0,temp = [],nextMonthPushDays = 1
|
||||||
|
for (i = 1; i <= lastDateOfMonth; i++) {
|
||||||
|
let day = new Date(y, m, i).getDay() //返回星期几(0~6)
|
||||||
|
let k
|
||||||
|
// 第一行
|
||||||
|
if (day == 0) {
|
||||||
|
temp[line] = []
|
||||||
|
} else if (i == 1) {
|
||||||
|
temp[line] = []
|
||||||
|
k = lastDayOfLastMonth - firstDayOfMonth + 1
|
||||||
|
for (let j = 0; j < firstDayOfMonth; j++) {
|
||||||
|
// console.log("第一行",lunarYear,lunarMonth,lunarValue,lunarInfo)
|
||||||
|
temp[line].push(Object.assign(
|
||||||
|
{day: k,disabled: true},
|
||||||
|
this.getLunarInfo(this.computedPrevYear(),this.computedPrevMonth(true),k),
|
||||||
|
this.getEvents(this.computedPrevYear(),this.computedPrevMonth(true),k),
|
||||||
|
))
|
||||||
|
k++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (this.range) { // 范围
|
||||||
|
// console.log("日期范围",this.getLunarInfo(this.year,this.month+1,i))
|
||||||
|
let options = Object.assign(
|
||||||
|
{day: i},
|
||||||
|
this.getLunarInfo(this.year,this.month+1,i),
|
||||||
|
this.getEvents(this.year,this.month+1,i),
|
||||||
|
)
|
||||||
|
if (this.rangeBegin.length > 0) {
|
||||||
|
let beginTime = Number(new Date(this.rangeBegin[0], this.rangeBegin[1], this.rangeBegin[2]))
|
||||||
|
let endTime = Number(new Date(this.rangeEnd[0], this.rangeEnd[1], this.rangeEnd[2]))
|
||||||
|
let stepTime = Number(new Date(this.year, this.month, i))
|
||||||
|
if (beginTime <= stepTime && endTime >= stepTime) {
|
||||||
|
options.selected = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.begin.length>0) {
|
||||||
|
let beginTime = Number(new Date(parseInt(this.begin[0]),parseInt(this.begin[1]) - 1,parseInt(this.begin[2])))
|
||||||
|
if (beginTime > Number(new Date(this.year, this.month, i))) options.disabled = true
|
||||||
|
}
|
||||||
|
if (this.end.length>0){
|
||||||
|
let endTime = Number(new Date(parseInt(this.end[0]),parseInt(this.end[1]) - 1,parseInt(this.end[2])))
|
||||||
|
if (endTime < Number(new Date(this.year, this.month, i))) options.disabled = true
|
||||||
|
}
|
||||||
|
if (this.disabled.length>0){
|
||||||
|
if (this.disabled.filter(v => {return this.year === v[0] && this.month === v[1]-1 && i === v[2] }).length>0) {
|
||||||
|
options.disabled = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
temp[line].push(options)
|
||||||
|
}else if(this.multi){//多选
|
||||||
|
let options
|
||||||
|
// 判断是否选中
|
||||||
|
if(this.value.filter(v => {return this.year === v[0] && this.month === v[1]-1 && i === v[2] }).length>0 ){
|
||||||
|
options = Object.assign({day: i,selected:true},this.getLunarInfo(this.year,this.month+1,i),this.getEvents(this.year,this.month+1,i))
|
||||||
|
}else{
|
||||||
|
options = Object.assign({day: i,selected:false},this.getLunarInfo(this.year,this.month+1,i),this.getEvents(this.year,this.month+1,i))
|
||||||
|
if (this.begin.length>0) {
|
||||||
|
let beginTime = Number(new Date(parseInt(this.begin[0]),parseInt(this.begin[1]) - 1,parseInt(this.begin[2])))
|
||||||
|
if (beginTime > Number(new Date(this.year, this.month, i))) options.disabled = true
|
||||||
|
}
|
||||||
|
if (this.end.length>0){
|
||||||
|
let endTime = Number(new Date(parseInt(this.end[0]),parseInt(this.end[1]) - 1,parseInt(this.end[2])))
|
||||||
|
if (endTime < Number(new Date(this.year, this.month, i))) options.disabled = true
|
||||||
|
}
|
||||||
|
if (this.disabled.length>0){
|
||||||
|
if (this.disabled.filter(v => {return this.year === v[0] && this.month === v[1]-1 && i === v[2] }).length>0) {
|
||||||
|
options.disabled = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
temp[line].push(options)
|
||||||
|
} else { // 单选
|
||||||
|
// console.log(this.lunar(this.year,this.month,i));
|
||||||
|
|
||||||
|
let chk = new Date()
|
||||||
|
let chkY = chk.getFullYear()
|
||||||
|
let chkM = chk.getMonth()
|
||||||
|
// 匹配上次选中的日期
|
||||||
|
if (parseInt(seletSplit[0]) == this.year && parseInt(seletSplit[1]) - 1 == this.month && parseInt(seletSplit[2]) == i) {
|
||||||
|
// console.log("匹配上次选中的日期",lunarYear,lunarMonth,lunarValue,lunarInfo)
|
||||||
|
temp[line].push(Object.assign(
|
||||||
|
{day: i,selected: true},
|
||||||
|
this.getLunarInfo(this.year,this.month+1,i),
|
||||||
|
this.getEvents(this.year,this.month+1,i),
|
||||||
|
))
|
||||||
|
this.today = [line, temp[line].length - 1]
|
||||||
|
}
|
||||||
|
// 没有默认值的时候显示选中今天日期
|
||||||
|
else if (chkY == this.year && chkM == this.month && i == this.day && this.value == "") {
|
||||||
|
|
||||||
|
// console.log("今天",lunarYear,lunarMonth,lunarValue,lunarInfo)
|
||||||
|
temp[line].push(Object.assign(
|
||||||
|
{day: i,selected: true},
|
||||||
|
this.getLunarInfo(this.year,this.month+1,i),
|
||||||
|
this.getEvents(this.year,this.month+1,i),
|
||||||
|
))
|
||||||
|
this.today = [line, temp[line].length - 1]
|
||||||
|
}else{
|
||||||
|
// 普通日期
|
||||||
|
// console.log("设置可选范围",i,lunarYear,lunarMonth,lunarValue,lunarInfo)
|
||||||
|
let options = Object.assign(
|
||||||
|
{day: i,selected:false},
|
||||||
|
this.getLunarInfo(this.year,this.month+1,i),
|
||||||
|
this.getEvents(this.year,this.month+1,i),
|
||||||
|
)
|
||||||
|
if (this.begin.length>0) {
|
||||||
|
let beginTime = Number(new Date(parseInt(this.begin[0]),parseInt(this.begin[1]) - 1,parseInt(this.begin[2])))
|
||||||
|
if (beginTime > Number(new Date(this.year, this.month, i))) options.disabled = true
|
||||||
|
}
|
||||||
|
if (this.end.length>0){
|
||||||
|
let endTime = Number(new Date(parseInt(this.end[0]),parseInt(this.end[1]) - 1,parseInt(this.end[2])))
|
||||||
|
if (endTime < Number(new Date(this.year, this.month, i))) options.disabled = true
|
||||||
|
}
|
||||||
|
if (this.disabled.length>0){
|
||||||
|
if (this.disabled.filter(v => {return this.year === v[0] && this.month === v[1]-1 && i === v[2] }).length>0) {
|
||||||
|
options.disabled = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
temp[line].push(options)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 到周六换行
|
||||||
|
if (day == 6 && i < lastDateOfMonth) {
|
||||||
|
line++
|
||||||
|
}else if (i == lastDateOfMonth) {
|
||||||
|
// line++
|
||||||
|
let k = 1
|
||||||
|
for (let d=day; d < 6; d++) {
|
||||||
|
// console.log(this.computedNextYear()+"-"+this.computedNextMonth(true)+"-"+k)
|
||||||
|
temp[line].push(Object.assign(
|
||||||
|
{day: k,disabled: true},
|
||||||
|
this.getLunarInfo(this.computedNextYear(),this.computedNextMonth(true),k),
|
||||||
|
this.getEvents(this.computedNextYear(),this.computedNextMonth(true),k),
|
||||||
|
))
|
||||||
|
k++
|
||||||
|
}
|
||||||
|
// 下个月除了补充的前几天开始的日期
|
||||||
|
nextMonthPushDays=k
|
||||||
|
}
|
||||||
|
} //end for
|
||||||
|
|
||||||
|
// console.log(this.year+"/"+this.month+"/"+this.day+":"+line)
|
||||||
|
// 补充第六行让视觉稳定
|
||||||
|
if(line<=5 && nextMonthPushDays>0){
|
||||||
|
// console.log({nextMonthPushDays:nextMonthPushDays,line:line})
|
||||||
|
for (let i = line+1; i<=5; i++) {
|
||||||
|
temp[i] = []
|
||||||
|
let start=nextMonthPushDays+(i-line-1)*7
|
||||||
|
for (let d=start; d <= start+6; d++) {
|
||||||
|
temp[i].push(Object.assign(
|
||||||
|
{day: d,disabled: true},
|
||||||
|
this.getLunarInfo(this.computedNextYear(),this.computedNextMonth(true),d),
|
||||||
|
this.getEvents(this.computedNextYear(),this.computedNextMonth(true),d),
|
||||||
|
))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.days = temp
|
||||||
|
},
|
||||||
|
computedPrevYear(){
|
||||||
|
let value=this.year
|
||||||
|
if(this.month-1<0){
|
||||||
|
value--
|
||||||
|
}
|
||||||
|
return value
|
||||||
|
},
|
||||||
|
computedPrevMonth(isString){
|
||||||
|
let value=this.month
|
||||||
|
if(this.month-1<0){
|
||||||
|
value=11
|
||||||
|
}else{
|
||||||
|
value--
|
||||||
|
}
|
||||||
|
// 用于显示目的(一般月份是从0开始的)
|
||||||
|
if(isString){
|
||||||
|
return value+1
|
||||||
|
}
|
||||||
|
return value
|
||||||
|
},
|
||||||
|
computedNextYear(){
|
||||||
|
let value=this.year
|
||||||
|
if(this.month+1>11){
|
||||||
|
value++
|
||||||
|
}
|
||||||
|
return value
|
||||||
|
},
|
||||||
|
computedNextMonth(isString){
|
||||||
|
let value=this.month
|
||||||
|
if(this.month+1>11){
|
||||||
|
value=0
|
||||||
|
}else{
|
||||||
|
value++
|
||||||
|
}
|
||||||
|
// 用于显示目的(一般月份是从0开始的)
|
||||||
|
if(isString){
|
||||||
|
return value+1
|
||||||
|
}
|
||||||
|
return value
|
||||||
|
},
|
||||||
|
// 获取农历信息
|
||||||
|
getLunarInfo(y,m,d){
|
||||||
|
let lunarInfo=calendar.solar2lunar(y,m,d)
|
||||||
|
let lunarValue=lunarInfo.IDayCn
|
||||||
|
// console.log(lunarInfo)
|
||||||
|
let isLunarFestival=false
|
||||||
|
let isGregorianFestival=false
|
||||||
|
if(this.festival.lunar[lunarInfo.lMonth+"-"+lunarInfo.lDay]!=undefined){
|
||||||
|
lunarValue=this.festival.lunar[lunarInfo.lMonth+"-"+lunarInfo.lDay]
|
||||||
|
isLunarFestival=true
|
||||||
|
}else if(this.festival.gregorian[m+"-"+d]!=undefined){
|
||||||
|
lunarValue=this.festival.gregorian[m+"-"+d]
|
||||||
|
isGregorianFestival=true
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
lunar:lunarValue,
|
||||||
|
isLunarFestival:isLunarFestival,
|
||||||
|
isGregorianFestival:isGregorianFestival,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 获取自定义事件
|
||||||
|
getEvents(y,m,d){
|
||||||
|
if(Object.keys(this.events).length==0)return false;
|
||||||
|
let eventName=this.events[y+"-"+m+"-"+d]
|
||||||
|
let data={}
|
||||||
|
if(eventName!=undefined){
|
||||||
|
data.eventName=eventName
|
||||||
|
}
|
||||||
|
return data
|
||||||
|
},
|
||||||
|
// 上月
|
||||||
|
prev(e) {
|
||||||
|
e.stopPropagation()
|
||||||
|
if (this.month == 0) {
|
||||||
|
this.month = 11
|
||||||
|
this.year = parseInt(this.year) - 1
|
||||||
|
} else {
|
||||||
|
this.month = parseInt(this.month) - 1
|
||||||
|
}
|
||||||
|
this.$emit('search', this.year, this.month+1) // 调用父组件方法
|
||||||
|
this.render(this.year, this.month)
|
||||||
|
this.$emit('selectMonth',this.month+1,this.year)
|
||||||
|
this.$emit('prev',this.month+1,this.year)
|
||||||
|
},
|
||||||
|
// 下月
|
||||||
|
next(e) {
|
||||||
|
e.stopPropagation()
|
||||||
|
if (this.month == 11) {
|
||||||
|
this.month = 0
|
||||||
|
this.year = parseInt(this.year) + 1
|
||||||
|
} else {
|
||||||
|
this.month = parseInt(this.month) + 1
|
||||||
|
}
|
||||||
|
this.$emit('search', this.year, this.month+1) // 调用父组件方法
|
||||||
|
this.render(this.year, this.month)
|
||||||
|
this.$emit('selectMonth',this.month+1,this.year)
|
||||||
|
this.$emit('next',this.month+1,this.year)
|
||||||
|
},
|
||||||
|
// 选中日期
|
||||||
|
select(k1, k2, e) {
|
||||||
|
if (e != undefined) e.stopPropagation()
|
||||||
|
// 日期范围
|
||||||
|
if (this.range) {
|
||||||
|
if (this.rangeBegin.length == 0 || this.rangeEndTemp != 0) {
|
||||||
|
this.rangeBegin = [this.year, this.month,this.days[k1][k2].day]
|
||||||
|
this.rangeBeginTemp = this.rangeBegin
|
||||||
|
this.rangeEnd = [this.year, this.month, this.days[k1][k2].day]
|
||||||
|
this.rangeEndTemp = 0
|
||||||
|
|
||||||
|
} else {
|
||||||
|
this.rangeEnd = [this.year, this.month,this.days[k1][k2].day]
|
||||||
|
this.rangeEndTemp = 1
|
||||||
|
// 判断结束日期小于开始日期则自动颠倒过来
|
||||||
|
if (+new Date(this.rangeEnd[0], this.rangeEnd[1], this.rangeEnd[2]) < +new Date(this.rangeBegin[0], this.rangeBegin[1], this.rangeBegin[2])) {
|
||||||
|
this.rangeBegin = this.rangeEnd
|
||||||
|
this.rangeEnd = this.rangeBeginTemp
|
||||||
|
}
|
||||||
|
// 小于10左边打补丁
|
||||||
|
let begin=[]
|
||||||
|
let end=[]
|
||||||
|
if(this.zero){
|
||||||
|
this.rangeBegin.forEach((v,k)=>{
|
||||||
|
if(k==1)v=v+1
|
||||||
|
begin.push(this.zeroPad(v))
|
||||||
|
})
|
||||||
|
this.rangeEnd.forEach((v,k)=>{
|
||||||
|
if(k==1)v=v+1
|
||||||
|
end.push(this.zeroPad(v))
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
begin=this.rangeBegin
|
||||||
|
end=this.rangeEnd
|
||||||
|
}
|
||||||
|
// console.log("选中日期",begin,end)
|
||||||
|
this.$emit('select',begin,end)
|
||||||
|
}
|
||||||
|
this.render(this.year, this.month)
|
||||||
|
}else if (this.multi) {
|
||||||
|
// 如果已经选过则过滤掉
|
||||||
|
let filterDay=this.multiDays.filter(v => {
|
||||||
|
return this.year === v[0] && this.month === v[1]-1 && this.days[k1][k2].day === v[2]
|
||||||
|
})
|
||||||
|
if( filterDay.length>0 ){
|
||||||
|
this.multiDays=this.multiDays.filter(v=> {
|
||||||
|
return this.year !== v[0] || this.month !== v[1]-1 || this.days[k1][k2].day !== v[2]
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
this.multiDays.push([this.year,this.month+1,this.days[k1][k2].day]);
|
||||||
|
}
|
||||||
|
this.days[k1][k2].selected = !this.days[k1][k2].selected
|
||||||
|
this.$emit('select',this.multiDays)
|
||||||
|
} else {
|
||||||
|
// 取消上次选中
|
||||||
|
if (this.today.length > 0) {
|
||||||
|
this.days.forEach(v=>{
|
||||||
|
v.forEach(vv=>{
|
||||||
|
vv.selected= false
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 设置当前选中天
|
||||||
|
this.days[k1][k2].selected = true
|
||||||
|
this.day = this.days[k1][k2].day
|
||||||
|
this.today = [k1, k2]
|
||||||
|
this.$emit('select',[this.year,this.zero?this.zeroPad(this.month + 1):this.month + 1,this.zero?this.zeroPad(this.days[k1][k2].day):this.days[k1][k2].day])
|
||||||
|
}
|
||||||
|
},
|
||||||
|
changeYear(){
|
||||||
|
if(this.yearsShow){
|
||||||
|
this.yearsShow=false
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
this.yearsShow=true
|
||||||
|
this.years=[];
|
||||||
|
for(let i=~~this.year-10;i<~~this.year+10;i++){
|
||||||
|
this.years.push(i)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
selectYear(value){
|
||||||
|
this.yearsShow=false
|
||||||
|
this.year=value
|
||||||
|
this.render(this.year,this.month)
|
||||||
|
this.$emit('selectYear',value)
|
||||||
|
this.$emit('search', this.year, this.month+1) // 调用父组件方法
|
||||||
|
},
|
||||||
|
// 返回今天
|
||||||
|
setToday(){
|
||||||
|
let now = new Date();
|
||||||
|
this.year = now.getFullYear()
|
||||||
|
this.month = now.getMonth()
|
||||||
|
this.day = now.getDate()
|
||||||
|
|
||||||
|
this.render(this.year,this.month)
|
||||||
|
// 遍历当前日找到选中
|
||||||
|
this.days.forEach(v => {
|
||||||
|
let day=v.find(vv => {
|
||||||
|
return vv.day==this.day && !vv.disabled
|
||||||
|
})
|
||||||
|
if(day!=undefined ){
|
||||||
|
day.selected=true
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 日期补零
|
||||||
|
zeroPad(n){
|
||||||
|
return String(n < 10 ? '0' + n : n)
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* eslint-enable */
|
||||||
|
</script>
|
||||||
58
src/components/Hamburger/index.vue
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<svg
|
||||||
|
:class="{'is-active':isActive}"
|
||||||
|
t="1492500959545"
|
||||||
|
class="hamburger"
|
||||||
|
style="fill: black"
|
||||||
|
viewBox="0 0 1024 1024"
|
||||||
|
version="1.1"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
p-id="1691"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
width="64"
|
||||||
|
height="64"
|
||||||
|
@click="toggleClick">
|
||||||
|
<path
|
||||||
|
d="M966.8023 568.849776 57.196677 568.849776c-31.397081 0-56.850799-25.452695-56.850799-56.850799l0 0c0-31.397081 25.452695-56.849776 56.850799-56.849776l909.605623 0c31.397081 0 56.849776 25.452695 56.849776 56.849776l0 0C1023.653099 543.397081 998.200404 568.849776 966.8023 568.849776z"
|
||||||
|
p-id="1692" />
|
||||||
|
<path
|
||||||
|
d="M966.8023 881.527125 57.196677 881.527125c-31.397081 0-56.850799-25.452695-56.850799-56.849776l0 0c0-31.397081 25.452695-56.849776 56.850799-56.849776l909.605623 0c31.397081 0 56.849776 25.452695 56.849776 56.849776l0 0C1023.653099 856.07443 998.200404 881.527125 966.8023 881.527125z"
|
||||||
|
p-id="1693" />
|
||||||
|
<path
|
||||||
|
d="M966.8023 256.17345 57.196677 256.17345c-31.397081 0-56.850799-25.452695-56.850799-56.849776l0 0c0-31.397081 25.452695-56.850799 56.850799-56.850799l909.605623 0c31.397081 0 56.849776 25.452695 56.849776 56.850799l0 0C1023.653099 230.720755 998.200404 256.17345 966.8023 256.17345z"
|
||||||
|
p-id="1694" />
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'Hamburger',
|
||||||
|
props: {
|
||||||
|
isActive: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
toggleClick: {
|
||||||
|
type: Function,
|
||||||
|
default: null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.hamburger {
|
||||||
|
display: inline-block;
|
||||||
|
cursor: pointer;
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
transform: rotate(90deg);
|
||||||
|
transition: .38s;
|
||||||
|
transform-origin: 50% 50%;
|
||||||
|
}
|
||||||
|
.hamburger.is-active {
|
||||||
|
transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
72
src/components/Scrollpane/index.vue
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
<template>
|
||||||
|
<div ref="scrollContainer" class="scroll-container" @wheel.prevent="handleScroll">
|
||||||
|
<div ref="scrollWrapper" :style="{left: left + 'px'}" class="scroll-wrapper">
|
||||||
|
<slot/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
const padding = 15 // tag's padding
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'ScrollPane',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
left: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleScroll(e) {
|
||||||
|
const eventDelta = e.wheelDelta || -e.deltaY * 3
|
||||||
|
const $container = this.$refs.scrollContainer
|
||||||
|
const $containerWidth = $container.offsetWidth
|
||||||
|
const $wrapper = this.$refs.scrollWrapper
|
||||||
|
const $wrapperWidth = $wrapper.offsetWidth
|
||||||
|
|
||||||
|
if (eventDelta > 0) {
|
||||||
|
this.left = Math.min(0, this.left + eventDelta)
|
||||||
|
} else {
|
||||||
|
if ($containerWidth - padding < $wrapperWidth) {
|
||||||
|
if (this.left < -($wrapperWidth - $containerWidth + padding)) {
|
||||||
|
this.left = this.left
|
||||||
|
} else {
|
||||||
|
this.left = Math.max(this.left + eventDelta, $containerWidth - $wrapperWidth - padding)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.left = 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
moveToTarget($target) {
|
||||||
|
const $container = this.$refs.scrollContainer
|
||||||
|
const $containerWidth = $container.offsetWidth
|
||||||
|
const $targetLeft = $target.offsetLeft
|
||||||
|
const $targetWidth = $target.offsetWidth
|
||||||
|
|
||||||
|
if ($targetLeft < -this.left) {
|
||||||
|
// tag in the left
|
||||||
|
this.left = -$targetLeft + padding
|
||||||
|
} else if ($targetLeft + padding > -this.left && $targetLeft + $targetWidth < -this.left + $containerWidth - padding) {
|
||||||
|
// tag in the current view
|
||||||
|
// eslint-disable-line
|
||||||
|
} else {
|
||||||
|
// tag in the right
|
||||||
|
this.left = -($targetLeft - ($containerWidth - $targetWidth) + padding)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
|
.scroll-container {
|
||||||
|
white-space: nowrap;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
width: 100%;
|
||||||
|
.scroll-wrapper {
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
43
src/components/SvgIcon/index.vue
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
<template>
|
||||||
|
<svg :class="svgClass" aria-hidden="true">
|
||||||
|
<use :xlink:href="iconName"/>
|
||||||
|
</svg>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'SvgIcon',
|
||||||
|
props: {
|
||||||
|
iconClass: {
|
||||||
|
type: String,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
className: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
iconName() {
|
||||||
|
return `#icon-${this.iconClass}`
|
||||||
|
},
|
||||||
|
svgClass() {
|
||||||
|
if (this.className) {
|
||||||
|
return 'svg-icon ' + this.className
|
||||||
|
} else {
|
||||||
|
return 'svg-icon'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.svg-icon {
|
||||||
|
width: 1em;
|
||||||
|
height: 1em;
|
||||||
|
vertical-align: -0.15em;
|
||||||
|
fill: currentColor;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
103
src/components/Tinymce/components/editorImage.vue
Normal file
@@ -0,0 +1,103 @@
|
|||||||
|
<template>
|
||||||
|
<div class="upload-container">
|
||||||
|
<el-button :style="{background:color,borderColor:color}" icon="el-icon-upload" size="mini" type="primary" @click=" dialogVisible=true">上传图片
|
||||||
|
</el-button>
|
||||||
|
<el-dialog :visible.sync="dialogVisible">
|
||||||
|
<el-upload
|
||||||
|
:multiple="true"
|
||||||
|
:file-list="fileList"
|
||||||
|
:show-file-list="true"
|
||||||
|
:on-remove="handleRemove"
|
||||||
|
:on-success="handleSuccess"
|
||||||
|
:before-upload="beforeUpload"
|
||||||
|
class="editor-slide-upload"
|
||||||
|
action="https://httpbin.org/post"
|
||||||
|
list-type="picture-card">
|
||||||
|
<el-button size="small" type="primary">点击上传</el-button>
|
||||||
|
</el-upload>
|
||||||
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="handleSubmit">确 定</el-button>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// import { getToken } from 'api/qiniu'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'EditorSlideUpload',
|
||||||
|
props: {
|
||||||
|
color: {
|
||||||
|
type: String,
|
||||||
|
default: '#1890ff'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dialogVisible: false,
|
||||||
|
listObj: {},
|
||||||
|
fileList: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
checkAllSuccess() {
|
||||||
|
return Object.keys(this.listObj).every(item => this.listObj[item].hasSuccess)
|
||||||
|
},
|
||||||
|
handleSubmit() {
|
||||||
|
const arr = Object.keys(this.listObj).map(v => this.listObj[v])
|
||||||
|
if (!this.checkAllSuccess()) {
|
||||||
|
this.$message('请等待所有图片上传成功 或 出现了网络问题,请刷新页面重新上传!')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.$emit('successCBK', arr)
|
||||||
|
this.listObj = {}
|
||||||
|
this.fileList = []
|
||||||
|
this.dialogVisible = false
|
||||||
|
},
|
||||||
|
handleSuccess(response, file) {
|
||||||
|
const uid = file.uid
|
||||||
|
const objKeyArr = Object.keys(this.listObj)
|
||||||
|
for (let i = 0, len = objKeyArr.length; i < len; i++) {
|
||||||
|
if (this.listObj[objKeyArr[i]].uid === uid) {
|
||||||
|
this.listObj[objKeyArr[i]].url = response.files.file
|
||||||
|
this.listObj[objKeyArr[i]].hasSuccess = true
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleRemove(file) {
|
||||||
|
const uid = file.uid
|
||||||
|
const objKeyArr = Object.keys(this.listObj)
|
||||||
|
for (let i = 0, len = objKeyArr.length; i < len; i++) {
|
||||||
|
if (this.listObj[objKeyArr[i]].uid === uid) {
|
||||||
|
delete this.listObj[objKeyArr[i]]
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
beforeUpload(file) {
|
||||||
|
const _self = this
|
||||||
|
const _URL = window.URL || window.webkitURL
|
||||||
|
const fileName = file.uid
|
||||||
|
this.listObj[fileName] = {}
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
const img = new Image()
|
||||||
|
img.src = _URL.createObjectURL(file)
|
||||||
|
img.onload = function() {
|
||||||
|
_self.listObj[fileName] = { hasSuccess: false, uid: file.uid, width: this.width, height: this.height }
|
||||||
|
}
|
||||||
|
resolve(true)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
|
.editor-slide-upload {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
/deep/ .el-upload--picture-card {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
204
src/components/Tinymce/index.vue
Normal file
@@ -0,0 +1,204 @@
|
|||||||
|
<template>
|
||||||
|
<div :class="{fullscreen:fullscreen}" class="tinymce-container editor-container">
|
||||||
|
<textarea :id="tinymceId" class="tinymce-textarea"/>
|
||||||
|
<div class="editor-custom-btn-container">
|
||||||
|
<editorImage color="#1890ff" class="editor-upload-btn" @successCBK="imageSuccessCBK"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import editorImage from './components/editorImage'
|
||||||
|
import plugins from './plugins'
|
||||||
|
import toolbar from './toolbar'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'Tinymce',
|
||||||
|
components: { editorImage },
|
||||||
|
props: {
|
||||||
|
id: {
|
||||||
|
type: String,
|
||||||
|
default: function() {
|
||||||
|
return 'vue-tinymce-' + +new Date() + ((Math.random() * 1000).toFixed(0) + '')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
value: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
toolbar: {
|
||||||
|
type: Array,
|
||||||
|
required: false,
|
||||||
|
default() {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
menubar: {
|
||||||
|
type: String,
|
||||||
|
default: 'file edit insert view format table'
|
||||||
|
},
|
||||||
|
height: {
|
||||||
|
type: Number,
|
||||||
|
required: false,
|
||||||
|
default: 360
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
hasChange: false,
|
||||||
|
hasInit: false,
|
||||||
|
tinymceId: this.id,
|
||||||
|
fullscreen: false,
|
||||||
|
languageTypeList: {
|
||||||
|
'en': 'en',
|
||||||
|
'zh': 'zh_CN'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
language() {
|
||||||
|
return 'zh_CN'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
value(val) {
|
||||||
|
if (!this.hasChange && this.hasInit) {
|
||||||
|
this.$nextTick(() =>
|
||||||
|
window.tinymce.get(this.tinymceId).setContent(val || ''))
|
||||||
|
}
|
||||||
|
},
|
||||||
|
language() {
|
||||||
|
this.destroyTinymce()
|
||||||
|
this.$nextTick(() => this.initTinymce())
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.initTinymce()
|
||||||
|
},
|
||||||
|
activated() {
|
||||||
|
this.initTinymce()
|
||||||
|
},
|
||||||
|
deactivated() {
|
||||||
|
this.destroyTinymce()
|
||||||
|
},
|
||||||
|
destroyed() {
|
||||||
|
this.destroyTinymce()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
initTinymce() {
|
||||||
|
const _this = this
|
||||||
|
window.tinymce.init({
|
||||||
|
language: this.language,
|
||||||
|
selector: `#${this.tinymceId}`,
|
||||||
|
height: this.height,
|
||||||
|
body_class: 'panel-body ',
|
||||||
|
object_resizing: false,
|
||||||
|
toolbar: this.toolbar.length > 0 ? this.toolbar : toolbar,
|
||||||
|
menubar: this.menubar,
|
||||||
|
plugins: plugins,
|
||||||
|
end_container_on_empty_block: true,
|
||||||
|
powerpaste_word_import: 'clean',
|
||||||
|
code_dialog_height: 450,
|
||||||
|
code_dialog_width: 1000,
|
||||||
|
advlist_bullet_styles: 'square',
|
||||||
|
advlist_number_styles: 'default',
|
||||||
|
imagetools_cors_hosts: ['www.tinymce.com', 'codepen.io'],
|
||||||
|
default_link_target: '_blank',
|
||||||
|
link_title: false,
|
||||||
|
nonbreaking_force_tab: true, // inserting nonbreaking space need Nonbreaking Space Plugin
|
||||||
|
init_instance_callback: editor => {
|
||||||
|
if (_this.value) {
|
||||||
|
editor.setContent(_this.value)
|
||||||
|
}
|
||||||
|
_this.hasInit = true
|
||||||
|
editor.on('NodeChange Change KeyUp SetContent', () => {
|
||||||
|
this.hasChange = true
|
||||||
|
this.$emit('input', editor.getContent())
|
||||||
|
})
|
||||||
|
},
|
||||||
|
setup(editor) {
|
||||||
|
editor.on('FullscreenStateChanged', (e) => {
|
||||||
|
_this.fullscreen = e.state
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 整合七牛上传
|
||||||
|
// images_dataimg_filter(img) {
|
||||||
|
// setTimeout(() => {
|
||||||
|
// const $image = $(img);
|
||||||
|
// $image.removeAttr('width');
|
||||||
|
// $image.removeAttr('height');
|
||||||
|
// if ($image[0].height && $image[0].width) {
|
||||||
|
// $image.attr('data-wscntype', 'image');
|
||||||
|
// $image.attr('data-wscnh', $image[0].height);
|
||||||
|
// $image.attr('data-wscnw', $image[0].width);
|
||||||
|
// $image.addClass('wscnph');
|
||||||
|
// }
|
||||||
|
// }, 0);
|
||||||
|
// return img
|
||||||
|
// },
|
||||||
|
// images_upload_handler(blobInfo, success, failure, progress) {
|
||||||
|
// progress(0);
|
||||||
|
// const token = _this.$store.getters.token;
|
||||||
|
// getToken(token).then(response => {
|
||||||
|
// const url = response.data.qiniu_url;
|
||||||
|
// const formData = new FormData();
|
||||||
|
// formData.append('token', response.data.qiniu_token);
|
||||||
|
// formData.append('key', response.data.qiniu_key);
|
||||||
|
// formData.append('file', blobInfo.blob(), url);
|
||||||
|
// upload(formData).then(() => {
|
||||||
|
// success(url);
|
||||||
|
// progress(100);
|
||||||
|
// })
|
||||||
|
// }).catch(err => {
|
||||||
|
// failure('出现未知问题,刷新页面,或者联系程序员')
|
||||||
|
// console.log(err);
|
||||||
|
// });
|
||||||
|
// },
|
||||||
|
})
|
||||||
|
},
|
||||||
|
destroyTinymce() {
|
||||||
|
if (window.tinymce.get(this.tinymceId)) {
|
||||||
|
window.tinymce.get(this.tinymceId).destroy()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
setContent(value) {
|
||||||
|
window.tinymce.get(this.tinymceId).setContent(value)
|
||||||
|
},
|
||||||
|
getContent() {
|
||||||
|
window.tinymce.get(this.tinymceId).getContent()
|
||||||
|
},
|
||||||
|
imageSuccessCBK(arr) {
|
||||||
|
const _this = this
|
||||||
|
arr.forEach(v => {
|
||||||
|
window.tinymce.get(_this.tinymceId).insertContent(`<img class="wscnph" src="${v.url}" >`)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.tinymce-container {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.tinymce-container>>>.mce-fullscreen {
|
||||||
|
z-index: 10000;
|
||||||
|
}
|
||||||
|
.tinymce-textarea {
|
||||||
|
visibility: hidden;
|
||||||
|
z-index: -1;
|
||||||
|
}
|
||||||
|
.editor-custom-btn-container {
|
||||||
|
position: absolute;
|
||||||
|
right: 4px;
|
||||||
|
top: 4px;
|
||||||
|
/*z-index: 2005;*/
|
||||||
|
}
|
||||||
|
.fullscreen .editor-custom-btn-container {
|
||||||
|
z-index: 10000;
|
||||||
|
position: fixed;
|
||||||
|
}
|
||||||
|
.editor-upload-btn {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
7
src/components/Tinymce/plugins.js
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
// Any plugins you want to use has to be imported
|
||||||
|
// Detail plugins list see https://www.tinymce.com/docs/plugins/
|
||||||
|
// Custom builds see https://www.tinymce.com/download/custom-builds/
|
||||||
|
|
||||||
|
const plugins = ['advlist anchor autolink autosave code codesample colorpicker colorpicker contextmenu directionality emoticons fullscreen hr image imagetools importcss insertdatetime link lists media nonbreaking noneditable pagebreak paste preview print save searchreplace spellchecker tabfocus table template textcolor textpattern visualblocks visualchars wordcount']
|
||||||
|
|
||||||
|
export default plugins
|
||||||
6
src/components/Tinymce/toolbar.js
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
// Here is a list of the toolbar
|
||||||
|
// Detail list see https://www.tinymce.com/docs/advanced/editor-control-identifiers/#toolbarcontrols
|
||||||
|
|
||||||
|
const toolbar = ['bold italic underline strikethrough alignleft aligncenter alignright outdent indent blockquote undo redo removeformat subscript superscript code codesample', 'hr bullist numlist link image charmap preview anchor pagebreak insertdatetime media table emoticons forecolor backcolor fullscreen']
|
||||||
|
|
||||||
|
export default toolbar
|
||||||
49
src/directive/clipboard/clipboard.js
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
// Inspired by https://github.com/Inndy/vue-clipboard2
|
||||||
|
const Clipboard = require('clipboard')
|
||||||
|
if (!Clipboard) {
|
||||||
|
throw new Error('you shold npm install `clipboard` --save at first ')
|
||||||
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
bind(el, binding) {
|
||||||
|
if (binding.arg === 'success') {
|
||||||
|
el._v_clipboard_success = binding.value
|
||||||
|
} else if (binding.arg === 'error') {
|
||||||
|
el._v_clipboard_error = binding.value
|
||||||
|
} else {
|
||||||
|
const clipboard = new Clipboard(el, {
|
||||||
|
text() { return binding.value },
|
||||||
|
action() { return binding.arg === 'cut' ? 'cut' : 'copy' }
|
||||||
|
})
|
||||||
|
clipboard.on('success', e => {
|
||||||
|
const callback = el._v_clipboard_success
|
||||||
|
callback && callback(e) // eslint-disable-line
|
||||||
|
})
|
||||||
|
clipboard.on('error', e => {
|
||||||
|
const callback = el._v_clipboard_error
|
||||||
|
callback && callback(e) // eslint-disable-line
|
||||||
|
})
|
||||||
|
el._v_clipboard = clipboard
|
||||||
|
}
|
||||||
|
},
|
||||||
|
update(el, binding) {
|
||||||
|
if (binding.arg === 'success') {
|
||||||
|
el._v_clipboard_success = binding.value
|
||||||
|
} else if (binding.arg === 'error') {
|
||||||
|
el._v_clipboard_error = binding.value
|
||||||
|
} else {
|
||||||
|
el._v_clipboard.text = function() { return binding.value }
|
||||||
|
el._v_clipboard.action = function() { return binding.arg === 'cut' ? 'cut' : 'copy' }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
unbind(el, binding) {
|
||||||
|
if (binding.arg === 'success') {
|
||||||
|
delete el._v_clipboard_success
|
||||||
|
} else if (binding.arg === 'error') {
|
||||||
|
delete el._v_clipboard_error
|
||||||
|
} else {
|
||||||
|
el._v_clipboard.destroy()
|
||||||
|
delete el._v_clipboard
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
13
src/directive/clipboard/index.js
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
import Clipboard from './clipboard'
|
||||||
|
|
||||||
|
const install = function(Vue) {
|
||||||
|
Vue.directive('Clipboard', Clipboard)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (window.Vue) {
|
||||||
|
window.clipboard = Clipboard
|
||||||
|
Vue.use(install); // eslint-disable-line
|
||||||
|
}
|
||||||
|
|
||||||
|
Clipboard.install = install
|
||||||
|
export default Clipboard
|
||||||
46
src/directive/el-dragDialog/drag.js
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
export default{
|
||||||
|
bind(el, binding) {
|
||||||
|
const dialogHeaderEl = el.querySelector('.el-dialog__header')
|
||||||
|
const dragDom = el.querySelector('.el-dialog')
|
||||||
|
dialogHeaderEl.style = 'cursor:move;'
|
||||||
|
|
||||||
|
// 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);
|
||||||
|
const sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null)
|
||||||
|
|
||||||
|
dialogHeaderEl.onmousedown = (e) => {
|
||||||
|
// 鼠标按下,计算当前元素距离可视区的距离
|
||||||
|
const disX = e.clientX - dialogHeaderEl.offsetLeft
|
||||||
|
const disY = e.clientY - dialogHeaderEl.offsetTop
|
||||||
|
|
||||||
|
// 获取到的值带px 正则匹配替换
|
||||||
|
let styL, styT
|
||||||
|
|
||||||
|
// 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px
|
||||||
|
if (sty.left.includes('%')) {
|
||||||
|
styL = +document.body.clientWidth * (+sty.left.replace(/\%/g, '') / 100)
|
||||||
|
styT = +document.body.clientHeight * (+sty.top.replace(/\%/g, '') / 100)
|
||||||
|
} else {
|
||||||
|
styL = +sty.left.replace(/\px/g, '')
|
||||||
|
styT = +sty.top.replace(/\px/g, '')
|
||||||
|
}
|
||||||
|
|
||||||
|
document.onmousemove = function(e) {
|
||||||
|
// 通过事件委托,计算移动的距离
|
||||||
|
const l = e.clientX - disX
|
||||||
|
const t = e.clientY - disY
|
||||||
|
|
||||||
|
// 移动当前元素
|
||||||
|
dragDom.style.left = `${l + styL}px`
|
||||||
|
dragDom.style.top = `${t + styT}px`
|
||||||
|
|
||||||
|
// 将此时的位置传出去
|
||||||
|
// binding.value({x:e.pageX,y:e.pageY})
|
||||||
|
}
|
||||||
|
|
||||||
|
document.onmouseup = function(e) {
|
||||||
|
document.onmousemove = null
|
||||||
|
document.onmouseup = null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
13
src/directive/el-dragDialog/index.js
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
import drag from './drag'
|
||||||
|
|
||||||
|
const install = function(Vue) {
|
||||||
|
Vue.directive('el-drag-dialog', drag)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (window.Vue) {
|
||||||
|
window['el-drag-dialog'] = drag
|
||||||
|
Vue.use(install); // eslint-disable-line
|
||||||
|
}
|
||||||
|
|
||||||
|
drag.install = install
|
||||||
|
export default drag
|
||||||
91
src/directive/sticky.js
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
const vueSticky = {}
|
||||||
|
let listenAction
|
||||||
|
vueSticky.install = Vue => {
|
||||||
|
Vue.directive('sticky', {
|
||||||
|
inserted(el, binding) {
|
||||||
|
const params = binding.value || {}
|
||||||
|
const stickyTop = params.stickyTop || 0
|
||||||
|
const zIndex = params.zIndex || 1000
|
||||||
|
const elStyle = el.style
|
||||||
|
|
||||||
|
elStyle.position = '-webkit-sticky'
|
||||||
|
elStyle.position = 'sticky'
|
||||||
|
// if the browser support css sticky(Currently Safari, Firefox and Chrome Canary)
|
||||||
|
// if (~elStyle.position.indexOf('sticky')) {
|
||||||
|
// elStyle.top = `${stickyTop}px`;
|
||||||
|
// elStyle.zIndex = zIndex;
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
const elHeight = el.getBoundingClientRect().height
|
||||||
|
const elWidth = el.getBoundingClientRect().width
|
||||||
|
elStyle.cssText = `top: ${stickyTop}px; z-index: ${zIndex}`
|
||||||
|
|
||||||
|
const parentElm = el.parentNode || document.documentElement
|
||||||
|
const placeholder = document.createElement('div')
|
||||||
|
placeholder.style.display = 'none'
|
||||||
|
placeholder.style.width = `${elWidth}px`
|
||||||
|
placeholder.style.height = `${elHeight}px`
|
||||||
|
parentElm.insertBefore(placeholder, el)
|
||||||
|
|
||||||
|
let active = false
|
||||||
|
|
||||||
|
const getScroll = (target, top) => {
|
||||||
|
const prop = top ? 'pageYOffset' : 'pageXOffset'
|
||||||
|
const method = top ? 'scrollTop' : 'scrollLeft'
|
||||||
|
let ret = target[prop]
|
||||||
|
if (typeof ret !== 'number') {
|
||||||
|
ret = window.document.documentElement[method]
|
||||||
|
}
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
|
||||||
|
const sticky = () => {
|
||||||
|
if (active) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!elStyle.height) {
|
||||||
|
elStyle.height = `${el.offsetHeight}px`
|
||||||
|
}
|
||||||
|
|
||||||
|
elStyle.position = 'fixed'
|
||||||
|
elStyle.width = `${elWidth}px`
|
||||||
|
placeholder.style.display = 'inline-block'
|
||||||
|
active = true
|
||||||
|
}
|
||||||
|
|
||||||
|
const reset = () => {
|
||||||
|
if (!active) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
elStyle.position = ''
|
||||||
|
placeholder.style.display = 'none'
|
||||||
|
active = false
|
||||||
|
}
|
||||||
|
|
||||||
|
const check = () => {
|
||||||
|
const scrollTop = getScroll(window, true)
|
||||||
|
const offsetTop = el.getBoundingClientRect().top
|
||||||
|
if (offsetTop < stickyTop) {
|
||||||
|
sticky()
|
||||||
|
} else {
|
||||||
|
if (scrollTop < elHeight + stickyTop) {
|
||||||
|
reset()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
listenAction = () => {
|
||||||
|
check()
|
||||||
|
}
|
||||||
|
|
||||||
|
window.addEventListener('scroll', listenAction)
|
||||||
|
},
|
||||||
|
|
||||||
|
unbind() {
|
||||||
|
window.removeEventListener('scroll', listenAction)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export default vueSticky
|
||||||
|
|
||||||
13
src/directive/waves/index.js
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
import waves from './waves'
|
||||||
|
|
||||||
|
const install = function(Vue) {
|
||||||
|
Vue.directive('waves', waves)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (window.Vue) {
|
||||||
|
window.waves = waves
|
||||||
|
Vue.use(install); // eslint-disable-line
|
||||||
|
}
|
||||||
|
|
||||||
|
waves.install = install
|
||||||
|
export default waves
|
||||||
26
src/directive/waves/waves.css
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
.waves-ripple {
|
||||||
|
position: absolute;
|
||||||
|
border-radius: 100%;
|
||||||
|
background-color: rgba(0, 0, 0, 0.15);
|
||||||
|
background-clip: padding-box;
|
||||||
|
pointer-events: none;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
-webkit-transform: scale(0);
|
||||||
|
-ms-transform: scale(0);
|
||||||
|
transform: scale(0);
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.waves-ripple.z-active {
|
||||||
|
opacity: 0;
|
||||||
|
-webkit-transform: scale(2);
|
||||||
|
-ms-transform: scale(2);
|
||||||
|
transform: scale(2);
|
||||||
|
-webkit-transition: opacity 1.2s ease-out, -webkit-transform 0.6s ease-out;
|
||||||
|
transition: opacity 1.2s ease-out, -webkit-transform 0.6s ease-out;
|
||||||
|
transition: opacity 1.2s ease-out, transform 0.6s ease-out;
|
||||||
|
transition: opacity 1.2s ease-out, transform 0.6s ease-out, -webkit-transform 0.6s ease-out;
|
||||||
|
}
|
||||||
42
src/directive/waves/waves.js
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
import './waves.css'
|
||||||
|
|
||||||
|
export default{
|
||||||
|
bind(el, binding) {
|
||||||
|
el.addEventListener('click', e => {
|
||||||
|
const customOpts = Object.assign({}, binding.value)
|
||||||
|
const opts = Object.assign({
|
||||||
|
ele: el, // 波纹作用元素
|
||||||
|
type: 'hit', // hit点击位置扩散center中心点扩展
|
||||||
|
color: 'rgba(0, 0, 0, 0.15)' // 波纹颜色
|
||||||
|
}, customOpts)
|
||||||
|
const target = opts.ele
|
||||||
|
if (target) {
|
||||||
|
target.style.position = 'relative'
|
||||||
|
target.style.overflow = 'hidden'
|
||||||
|
const rect = target.getBoundingClientRect()
|
||||||
|
let ripple = target.querySelector('.waves-ripple')
|
||||||
|
if (!ripple) {
|
||||||
|
ripple = document.createElement('span')
|
||||||
|
ripple.className = 'waves-ripple'
|
||||||
|
ripple.style.height = ripple.style.width = Math.max(rect.width, rect.height) + 'px'
|
||||||
|
target.appendChild(ripple)
|
||||||
|
} else {
|
||||||
|
ripple.className = 'waves-ripple'
|
||||||
|
}
|
||||||
|
switch (opts.type) {
|
||||||
|
case 'center':
|
||||||
|
ripple.style.top = (rect.height / 2 - ripple.offsetHeight / 2) + 'px'
|
||||||
|
ripple.style.left = (rect.width / 2 - ripple.offsetWidth / 2) + 'px'
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
ripple.style.top = (e.pageY - rect.top - ripple.offsetHeight / 2 - document.body.scrollTop) + 'px'
|
||||||
|
ripple.style.left = (e.pageX - rect.left - ripple.offsetWidth / 2 - document.body.scrollLeft) + 'px'
|
||||||
|
}
|
||||||
|
ripple.style.backgroundColor = opts.color
|
||||||
|
ripple.className = 'waves-ripple z-active'
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}, false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
179
src/excel/Blob.js
Normal file
@@ -0,0 +1,179 @@
|
|||||||
|
/* eslint-disable */
|
||||||
|
/* Blob.js
|
||||||
|
* A Blob implementation.
|
||||||
|
* 2014-05-27
|
||||||
|
*
|
||||||
|
* By Eli Grey, http://eligrey.com
|
||||||
|
* By Devin Samarin, https://github.com/eboyjr
|
||||||
|
* License: X11/MIT
|
||||||
|
* See LICENSE.md
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*global self, unescape */
|
||||||
|
/*jslint bitwise: true, regexp: true, confusion: true, es5: true, vars: true, white: true,
|
||||||
|
plusplus: true */
|
||||||
|
|
||||||
|
/*! @source http://purl.eligrey.com/github/Blob.js/blob/master/Blob.js */
|
||||||
|
|
||||||
|
(function (view) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
view.URL = view.URL || view.webkitURL;
|
||||||
|
|
||||||
|
if (view.Blob && view.URL) {
|
||||||
|
try {
|
||||||
|
new Blob;
|
||||||
|
return;
|
||||||
|
} catch (e) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Internally we use a BlobBuilder implementation to base Blob off of
|
||||||
|
// in order to support older browsers that only have BlobBuilder
|
||||||
|
var BlobBuilder = view.BlobBuilder || view.WebKitBlobBuilder || view.MozBlobBuilder || (function(view) {
|
||||||
|
var
|
||||||
|
get_class = function(object) {
|
||||||
|
return Object.prototype.toString.call(object).match(/^\[object\s(.*)\]$/)[1];
|
||||||
|
}
|
||||||
|
, FakeBlobBuilder = function BlobBuilder() {
|
||||||
|
this.data = [];
|
||||||
|
}
|
||||||
|
, FakeBlob = function Blob(data, type, encoding) {
|
||||||
|
this.data = data;
|
||||||
|
this.size = data.length;
|
||||||
|
this.type = type;
|
||||||
|
this.encoding = encoding;
|
||||||
|
}
|
||||||
|
, FBB_proto = FakeBlobBuilder.prototype
|
||||||
|
, FB_proto = FakeBlob.prototype
|
||||||
|
, FileReaderSync = view.FileReaderSync
|
||||||
|
, FileException = function(type) {
|
||||||
|
this.code = this[this.name = type];
|
||||||
|
}
|
||||||
|
, file_ex_codes = (
|
||||||
|
"NOT_FOUND_ERR SECURITY_ERR ABORT_ERR NOT_READABLE_ERR ENCODING_ERR "
|
||||||
|
+ "NO_MODIFICATION_ALLOWED_ERR INVALID_STATE_ERR SYNTAX_ERR"
|
||||||
|
).split(" ")
|
||||||
|
, file_ex_code = file_ex_codes.length
|
||||||
|
, real_URL = view.URL || view.webkitURL || view
|
||||||
|
, real_create_object_URL = real_URL.createObjectURL
|
||||||
|
, real_revoke_object_URL = real_URL.revokeObjectURL
|
||||||
|
, URL = real_URL
|
||||||
|
, btoa = view.btoa
|
||||||
|
, atob = view.atob
|
||||||
|
|
||||||
|
, ArrayBuffer = view.ArrayBuffer
|
||||||
|
, Uint8Array = view.Uint8Array
|
||||||
|
;
|
||||||
|
FakeBlob.fake = FB_proto.fake = true;
|
||||||
|
while (file_ex_code--) {
|
||||||
|
FileException.prototype[file_ex_codes[file_ex_code]] = file_ex_code + 1;
|
||||||
|
}
|
||||||
|
if (!real_URL.createObjectURL) {
|
||||||
|
URL = view.URL = {};
|
||||||
|
}
|
||||||
|
URL.createObjectURL = function(blob) {
|
||||||
|
var
|
||||||
|
type = blob.type
|
||||||
|
, data_URI_header
|
||||||
|
;
|
||||||
|
if (type === null) {
|
||||||
|
type = "application/octet-stream";
|
||||||
|
}
|
||||||
|
if (blob instanceof FakeBlob) {
|
||||||
|
data_URI_header = "data:" + type;
|
||||||
|
if (blob.encoding === "base64") {
|
||||||
|
return data_URI_header + ";base64," + blob.data;
|
||||||
|
} else if (blob.encoding === "URI") {
|
||||||
|
return data_URI_header + "," + decodeURIComponent(blob.data);
|
||||||
|
} if (btoa) {
|
||||||
|
return data_URI_header + ";base64," + btoa(blob.data);
|
||||||
|
} else {
|
||||||
|
return data_URI_header + "," + encodeURIComponent(blob.data);
|
||||||
|
}
|
||||||
|
} else if (real_create_object_URL) {
|
||||||
|
return real_create_object_URL.call(real_URL, blob);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
URL.revokeObjectURL = function(object_URL) {
|
||||||
|
if (object_URL.substring(0, 5) !== "data:" && real_revoke_object_URL) {
|
||||||
|
real_revoke_object_URL.call(real_URL, object_URL);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
FBB_proto.append = function(data/*, endings*/) {
|
||||||
|
var bb = this.data;
|
||||||
|
// decode data to a binary string
|
||||||
|
if (Uint8Array && (data instanceof ArrayBuffer || data instanceof Uint8Array)) {
|
||||||
|
var
|
||||||
|
str = ""
|
||||||
|
, buf = new Uint8Array(data)
|
||||||
|
, i = 0
|
||||||
|
, buf_len = buf.length
|
||||||
|
;
|
||||||
|
for (; i < buf_len; i++) {
|
||||||
|
str += String.fromCharCode(buf[i]);
|
||||||
|
}
|
||||||
|
bb.push(str);
|
||||||
|
} else if (get_class(data) === "Blob" || get_class(data) === "File") {
|
||||||
|
if (FileReaderSync) {
|
||||||
|
var fr = new FileReaderSync;
|
||||||
|
bb.push(fr.readAsBinaryString(data));
|
||||||
|
} else {
|
||||||
|
// async FileReader won't work as BlobBuilder is sync
|
||||||
|
throw new FileException("NOT_READABLE_ERR");
|
||||||
|
}
|
||||||
|
} else if (data instanceof FakeBlob) {
|
||||||
|
if (data.encoding === "base64" && atob) {
|
||||||
|
bb.push(atob(data.data));
|
||||||
|
} else if (data.encoding === "URI") {
|
||||||
|
bb.push(decodeURIComponent(data.data));
|
||||||
|
} else if (data.encoding === "raw") {
|
||||||
|
bb.push(data.data);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (typeof data !== "string") {
|
||||||
|
data += ""; // convert unsupported types to strings
|
||||||
|
}
|
||||||
|
// decode UTF-16 to binary string
|
||||||
|
bb.push(unescape(encodeURIComponent(data)));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
FBB_proto.getBlob = function(type) {
|
||||||
|
if (!arguments.length) {
|
||||||
|
type = null;
|
||||||
|
}
|
||||||
|
return new FakeBlob(this.data.join(""), type, "raw");
|
||||||
|
};
|
||||||
|
FBB_proto.toString = function() {
|
||||||
|
return "[object BlobBuilder]";
|
||||||
|
};
|
||||||
|
FB_proto.slice = function(start, end, type) {
|
||||||
|
var args = arguments.length;
|
||||||
|
if (args < 3) {
|
||||||
|
type = null;
|
||||||
|
}
|
||||||
|
return new FakeBlob(
|
||||||
|
this.data.slice(start, args > 1 ? end : this.data.length)
|
||||||
|
, type
|
||||||
|
, this.encoding
|
||||||
|
);
|
||||||
|
};
|
||||||
|
FB_proto.toString = function() {
|
||||||
|
return "[object Blob]";
|
||||||
|
};
|
||||||
|
FB_proto.close = function() {
|
||||||
|
this.size = this.data.length = 0;
|
||||||
|
};
|
||||||
|
return FakeBlobBuilder;
|
||||||
|
}(view));
|
||||||
|
|
||||||
|
view.Blob = function Blob(blobParts, options) {
|
||||||
|
var type = options ? (options.type || "") : "";
|
||||||
|
var builder = new BlobBuilder();
|
||||||
|
if (blobParts) {
|
||||||
|
for (var i = 0, len = blobParts.length; i < len; i++) {
|
||||||
|
builder.append(blobParts[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return builder.getBlob(type);
|
||||||
|
};
|
||||||
|
}(typeof self !== "undefined" && self || typeof window !== "undefined" && window || this.content || this));
|
||||||
141
src/excel/Export2Excel.js
Normal file
@@ -0,0 +1,141 @@
|
|||||||
|
/* eslint-disable */
|
||||||
|
require('script-loader!file-saver'); //保存文件用
|
||||||
|
require('script-loader!@/excel/Blob'); //转二进制用
|
||||||
|
require('script-loader!xlsx/dist/xlsx.core.min'); //xlsx核心
|
||||||
|
function generateArray(table) {
|
||||||
|
var out = [];
|
||||||
|
var rows = table.querySelectorAll('tr');
|
||||||
|
var ranges = [];
|
||||||
|
for (var R = 0; R < rows.length; ++R) {
|
||||||
|
var outRow = [];
|
||||||
|
var row = rows[R];
|
||||||
|
var columns = row.querySelectorAll('td');
|
||||||
|
for (var C = 0; C < columns.length; ++C) {
|
||||||
|
var cell = columns[C];
|
||||||
|
var colspan = cell.getAttribute('colspan');
|
||||||
|
var rowspan = cell.getAttribute('rowspan');
|
||||||
|
var cellValue = cell.innerText;
|
||||||
|
if (cellValue !== "" && cellValue == +cellValue) cellValue = +cellValue;
|
||||||
|
|
||||||
|
//Skip ranges
|
||||||
|
ranges.forEach(function (range) {
|
||||||
|
if (R >= range.s.r && R <= range.e.r && outRow.length >= range.s.c && outRow.length <= range.e.c) {
|
||||||
|
for (var i = 0; i <= range.e.c - range.s.c; ++i) outRow.push(null);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//Handle Row Span
|
||||||
|
if (rowspan || colspan) {
|
||||||
|
rowspan = rowspan || 1;
|
||||||
|
colspan = colspan || 1;
|
||||||
|
ranges.push({s: {r: R, c: outRow.length}, e: {r: R + rowspan - 1, c: outRow.length + colspan - 1}});
|
||||||
|
}
|
||||||
|
;
|
||||||
|
|
||||||
|
//Handle Value
|
||||||
|
outRow.push(cellValue !== "" ? cellValue : null);
|
||||||
|
|
||||||
|
//Handle Colspan
|
||||||
|
if (colspan) for (var k = 0; k < colspan - 1; ++k) outRow.push(null);
|
||||||
|
}
|
||||||
|
out.push(outRow);
|
||||||
|
}
|
||||||
|
return [out, ranges];
|
||||||
|
};
|
||||||
|
|
||||||
|
function datenum(v, date1904) {
|
||||||
|
if (date1904) v += 1462;
|
||||||
|
var epoch = Date.parse(v);
|
||||||
|
return (epoch - new Date(Date.UTC(1899, 11, 30))) / (24 * 60 * 60 * 1000);
|
||||||
|
}
|
||||||
|
|
||||||
|
function sheet_from_array_of_arrays(data, opts) {
|
||||||
|
var ws = {};
|
||||||
|
var range = {s: {c: 10000000, r: 10000000}, e: {c: 0, r: 0}};
|
||||||
|
for (var R = 0; R != data.length; ++R) {
|
||||||
|
for (var C = 0; C != data[R].length; ++C) {
|
||||||
|
if (range.s.r > R) range.s.r = R;
|
||||||
|
if (range.s.c > C) range.s.c = C;
|
||||||
|
if (range.e.r < R) range.e.r = R;
|
||||||
|
if (range.e.c < C) range.e.c = C;
|
||||||
|
var cell = {v: data[R][C]};
|
||||||
|
if (cell.v == null) continue;
|
||||||
|
var cell_ref = XLSX.utils.encode_cell({c: C, r: R});
|
||||||
|
|
||||||
|
if (typeof cell.v === 'number') cell.t = 'n';
|
||||||
|
else if (typeof cell.v === 'boolean') cell.t = 'b';
|
||||||
|
else if (cell.v instanceof Date) {
|
||||||
|
cell.t = 'n';
|
||||||
|
cell.z = XLSX.SSF._table[14];
|
||||||
|
cell.v = datenum(cell.v);
|
||||||
|
}
|
||||||
|
else cell.t = 's';
|
||||||
|
|
||||||
|
ws[cell_ref] = cell;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (range.s.c < 10000000) ws['!ref'] = XLSX.utils.encode_range(range);
|
||||||
|
return ws;
|
||||||
|
}
|
||||||
|
|
||||||
|
function Workbook() {
|
||||||
|
if (!(this instanceof Workbook)) return new Workbook();
|
||||||
|
this.SheetNames = [];
|
||||||
|
this.Sheets = {};
|
||||||
|
}
|
||||||
|
|
||||||
|
function s2ab(s) {
|
||||||
|
var buf = new ArrayBuffer(s.length);
|
||||||
|
var view = new Uint8Array(buf);
|
||||||
|
for (var i = 0; i != s.length; ++i) view[i] = s.charCodeAt(i) & 0xFF;
|
||||||
|
return buf;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function export_table_to_excel(id) {
|
||||||
|
var theTable = document.getElementById(id);
|
||||||
|
console.log('a')
|
||||||
|
var oo = generateArray(theTable);
|
||||||
|
var ranges = oo[1];
|
||||||
|
|
||||||
|
/* original data */
|
||||||
|
var data = oo[0];
|
||||||
|
var ws_name = "SheetJS";
|
||||||
|
console.log(data);
|
||||||
|
|
||||||
|
var wb = new Workbook(), ws = sheet_from_array_of_arrays(data);
|
||||||
|
|
||||||
|
/* add ranges to worksheet */
|
||||||
|
// ws['!cols'] = ['apple', 'banan'];
|
||||||
|
ws['!merges'] = ranges;
|
||||||
|
|
||||||
|
/* add worksheet to workbook */
|
||||||
|
wb.SheetNames.push(ws_name);
|
||||||
|
wb.Sheets[ws_name] = ws;
|
||||||
|
|
||||||
|
var wbout = XLSX.write(wb, {bookType: 'xlsx', bookSST: false, type: 'binary'});
|
||||||
|
|
||||||
|
saveAs(new Blob([s2ab(wbout)], {type: "application/octet-stream"}), "test.xlsx")
|
||||||
|
}
|
||||||
|
|
||||||
|
function formatJson(jsonData) {
|
||||||
|
console.log(jsonData)
|
||||||
|
}
|
||||||
|
export function export_json_to_excel(th, jsonData, defaultTitle) {
|
||||||
|
|
||||||
|
/* original data */
|
||||||
|
|
||||||
|
var data = jsonData;
|
||||||
|
data.unshift(th);
|
||||||
|
var ws_name = "SheetJS";
|
||||||
|
|
||||||
|
var wb = new Workbook(), ws = sheet_from_array_of_arrays(data);
|
||||||
|
|
||||||
|
|
||||||
|
/* add worksheet to workbook */
|
||||||
|
wb.SheetNames.push(ws_name);
|
||||||
|
wb.Sheets[ws_name] = ws;
|
||||||
|
|
||||||
|
var wbout = XLSX.write(wb, {bookType: 'xlsx', bookSST: false, type: 'binary'});
|
||||||
|
var title = defaultTitle || '列表'
|
||||||
|
saveAs(new Blob([s2ab(wbout)], {type: "application/octet-stream"}), title + ".xlsx")
|
||||||
|
}
|
||||||
370
src/icon/demo.css
Normal file
@@ -0,0 +1,370 @@
|
|||||||
|
*{margin: 0;padding: 0;list-style: none;}
|
||||||
|
/*
|
||||||
|
KISSY CSS Reset
|
||||||
|
理念:1. reset 的目的不是清除浏览器的默认样式,这仅是部分工作。清除和重置是紧密不可分的。
|
||||||
|
2. reset 的目的不是让默认样式在所有浏览器下一致,而是减少默认样式有可能带来的问题。
|
||||||
|
3. reset 期望提供一套普适通用的基础样式。但没有银弹,推荐根据具体需求,裁剪和修改后再使用。
|
||||||
|
特色:1. 适应中文;2. 基于最新主流浏览器。
|
||||||
|
维护:玉伯<lifesinger@gmail.com>, 正淳<ragecarrier@gmail.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** 清除内外边距 **/
|
||||||
|
body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, /* structural elements 结构元素 */
|
||||||
|
dl, dt, dd, ul, ol, li, /* list elements 列表元素 */
|
||||||
|
pre, /* text formatting elements 文本格式元素 */
|
||||||
|
form, fieldset, legend, button, input, textarea, /* form elements 表单元素 */
|
||||||
|
th, td /* table elements 表格元素 */ {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 设置默认字体 **/
|
||||||
|
body,
|
||||||
|
button, input, select, textarea /* for ie */ {
|
||||||
|
font: 12px/1.5 tahoma, arial, \5b8b\4f53, sans-serif;
|
||||||
|
}
|
||||||
|
h1, h2, h3, h4, h5, h6 { font-size: 100%; }
|
||||||
|
address, cite, dfn, em, var { font-style: normal; } /* 将斜体扶正 */
|
||||||
|
code, kbd, pre, samp { font-family: courier new, courier, monospace; } /* 统一等宽字体 */
|
||||||
|
small { font-size: 12px; } /* 小于 12px 的中文很难阅读,让 small 正常化 */
|
||||||
|
|
||||||
|
/** 重置列表元素 **/
|
||||||
|
ul, ol { list-style: none; }
|
||||||
|
|
||||||
|
/** 重置文本格式元素 **/
|
||||||
|
a { text-decoration: none; }
|
||||||
|
a:hover { text-decoration: underline; }
|
||||||
|
|
||||||
|
|
||||||
|
/** 重置表单元素 **/
|
||||||
|
legend { color: #000; } /* for ie6 */
|
||||||
|
fieldset, img { border: 0; } /* img 搭车:让链接里的 img 无边框 */
|
||||||
|
button, input, select, textarea { font-size: 100%; } /* 使得表单元素在 ie 下能继承字体大小 */
|
||||||
|
/* 注:optgroup 无法扶正 */
|
||||||
|
|
||||||
|
/** 重置表格元素 **/
|
||||||
|
table { border-collapse: collapse; border-spacing: 0; }
|
||||||
|
|
||||||
|
/* 清除浮动 */
|
||||||
|
.ks-clear:after, .clear:after {
|
||||||
|
content: '\20';
|
||||||
|
display: block;
|
||||||
|
height: 0;
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
.ks-clear, .clear {
|
||||||
|
*zoom: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main {
|
||||||
|
padding: 30px 100px;
|
||||||
|
width: 960px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
.main h1{font-size:36px; color:#333; text-align:left;margin-bottom:30px; border-bottom: 1px solid #eee;}
|
||||||
|
|
||||||
|
.helps{margin-top:40px;}
|
||||||
|
.helps pre{
|
||||||
|
padding:20px;
|
||||||
|
margin:10px 0;
|
||||||
|
border:solid 1px #e7e1cd;
|
||||||
|
background-color: #fffdef;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon_lists{
|
||||||
|
width: 100% !important;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon_lists li{
|
||||||
|
float:left;
|
||||||
|
width: 100px;
|
||||||
|
height:180px;
|
||||||
|
text-align: center;
|
||||||
|
list-style: none !important;
|
||||||
|
}
|
||||||
|
.icon_lists .icon{
|
||||||
|
font-size: 42px;
|
||||||
|
line-height: 100px;
|
||||||
|
margin: 10px 0;
|
||||||
|
color:#333;
|
||||||
|
-webkit-transition: font-size 0.25s ease-out 0s;
|
||||||
|
-moz-transition: font-size 0.25s ease-out 0s;
|
||||||
|
transition: font-size 0.25s ease-out 0s;
|
||||||
|
|
||||||
|
}
|
||||||
|
.icon_lists .icon:hover{
|
||||||
|
font-size: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.markdown {
|
||||||
|
color: #666;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 1.8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.highlight {
|
||||||
|
line-height: 1.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown img {
|
||||||
|
vertical-align: middle;
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown h1 {
|
||||||
|
color: #404040;
|
||||||
|
font-weight: 500;
|
||||||
|
line-height: 40px;
|
||||||
|
margin-bottom: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown h2,
|
||||||
|
.markdown h3,
|
||||||
|
.markdown h4,
|
||||||
|
.markdown h5,
|
||||||
|
.markdown h6 {
|
||||||
|
color: #404040;
|
||||||
|
margin: 1.6em 0 0.6em 0;
|
||||||
|
font-weight: 500;
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown h1 {
|
||||||
|
font-size: 28px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown h2 {
|
||||||
|
font-size: 22px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown h3 {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown h4 {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown h5 {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown h6 {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown hr {
|
||||||
|
height: 1px;
|
||||||
|
border: 0;
|
||||||
|
background: #e9e9e9;
|
||||||
|
margin: 16px 0;
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown p,
|
||||||
|
.markdown pre {
|
||||||
|
margin: 1em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown > p,
|
||||||
|
.markdown > blockquote,
|
||||||
|
.markdown > .highlight,
|
||||||
|
.markdown > ol,
|
||||||
|
.markdown > ul {
|
||||||
|
width: 80%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown ul > li {
|
||||||
|
list-style: circle;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown > ul li,
|
||||||
|
.markdown blockquote ul > li {
|
||||||
|
margin-left: 20px;
|
||||||
|
padding-left: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown > ul li p,
|
||||||
|
.markdown > ol li p {
|
||||||
|
margin: 0.6em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown ol > li {
|
||||||
|
list-style: decimal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown > ol li,
|
||||||
|
.markdown blockquote ol > li {
|
||||||
|
margin-left: 20px;
|
||||||
|
padding-left: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown code {
|
||||||
|
margin: 0 3px;
|
||||||
|
padding: 0 5px;
|
||||||
|
background: #eee;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown pre {
|
||||||
|
border-radius: 6px;
|
||||||
|
background: #f7f7f7;
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown pre code {
|
||||||
|
border: none;
|
||||||
|
background: #f7f7f7;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown strong,
|
||||||
|
.markdown b {
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown > table {
|
||||||
|
border-collapse: collapse;
|
||||||
|
border-spacing: 0px;
|
||||||
|
empty-cells: show;
|
||||||
|
border: 1px solid #e9e9e9;
|
||||||
|
width: 95%;
|
||||||
|
margin-bottom: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown > table th {
|
||||||
|
white-space: nowrap;
|
||||||
|
color: #333;
|
||||||
|
font-weight: 600;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown > table th,
|
||||||
|
.markdown > table td {
|
||||||
|
border: 1px solid #e9e9e9;
|
||||||
|
padding: 8px 16px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown > table th {
|
||||||
|
background: #F7F7F7;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown blockquote {
|
||||||
|
font-size: 90%;
|
||||||
|
color: #999;
|
||||||
|
border-left: 4px solid #e9e9e9;
|
||||||
|
padding-left: 0.8em;
|
||||||
|
margin: 1em 0;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown blockquote p {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown .anchor {
|
||||||
|
opacity: 0;
|
||||||
|
transition: opacity 0.3s ease;
|
||||||
|
margin-left: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown .waiting {
|
||||||
|
color: #ccc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown h1:hover .anchor,
|
||||||
|
.markdown h2:hover .anchor,
|
||||||
|
.markdown h3:hover .anchor,
|
||||||
|
.markdown h4:hover .anchor,
|
||||||
|
.markdown h5:hover .anchor,
|
||||||
|
.markdown h6:hover .anchor {
|
||||||
|
opacity: 1;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown > br,
|
||||||
|
.markdown > p > br {
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.hljs {
|
||||||
|
display: block;
|
||||||
|
background: white;
|
||||||
|
padding: 0.5em;
|
||||||
|
color: #333333;
|
||||||
|
overflow-x: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-comment,
|
||||||
|
.hljs-meta {
|
||||||
|
color: #969896;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-string,
|
||||||
|
.hljs-variable,
|
||||||
|
.hljs-template-variable,
|
||||||
|
.hljs-strong,
|
||||||
|
.hljs-emphasis,
|
||||||
|
.hljs-quote {
|
||||||
|
color: #df5000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-keyword,
|
||||||
|
.hljs-selector-tag,
|
||||||
|
.hljs-type {
|
||||||
|
color: #a71d5d;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-literal,
|
||||||
|
.hljs-symbol,
|
||||||
|
.hljs-bullet,
|
||||||
|
.hljs-attribute {
|
||||||
|
color: #0086b3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-section,
|
||||||
|
.hljs-name {
|
||||||
|
color: #63a35c;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-tag {
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-title,
|
||||||
|
.hljs-attr,
|
||||||
|
.hljs-selector-id,
|
||||||
|
.hljs-selector-class,
|
||||||
|
.hljs-selector-attr,
|
||||||
|
.hljs-selector-pseudo {
|
||||||
|
color: #795da3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-addition {
|
||||||
|
color: #55a532;
|
||||||
|
background-color: #eaffea;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-deletion {
|
||||||
|
color: #bd2c00;
|
||||||
|
background-color: #ffecec;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-link {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre{
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
30
src/icon/iconfont.css
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
|
||||||
|
@font-face {font-family: "fontFamily";
|
||||||
|
src: url('iconfont.eot?t=1527493375212'); /* IE9*/
|
||||||
|
src: url('iconfont.eot?t=1527493375212#iefix') format('embedded-opentype'), /* IE6-IE8 */
|
||||||
|
url('data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAAXoAAsAAAAACHwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADMAAABCsP6z7U9TLzIAAAE8AAAARAAAAFZW7kf3Y21hcAAAAYAAAABjAAABnM7GacRnbHlmAAAB5AAAAfsAAAIsdf0weGhlYWQAAAPgAAAALwAAADYRguv+aGhlYQAABBAAAAAcAAAAJAfeA4VobXR4AAAELAAAABAAAAAQD+kAAGxvY2EAAAQ8AAAACgAAAAoBjAC6bWF4cAAABEgAAAAfAAAAIAEaAF1uYW1lAAAEaAAAAVMAAAKFV8s9R3Bvc3QAAAW8AAAAKgAAADsY6RIYeJxjYGRgYOBikGPQYWB0cfMJYeBgYGGAAJAMY05meiJQDMoDyrGAaQ4gZoOIAgCKIwNPAHicY2Bk/sU4gYGVgYOpk+kMAwNDP4RmfM1gxMjBwMDEwMrMgBUEpLmmMDgwVDzjZm7438AQw9zA0AAUZgTJAQAk0wx5eJzFkNENgCAMRK+ChIij+GkcyC9HYOKugdfCDxNw5JX2ckkJAHYAgVwkAvJBYHrpivsBh/sRD+fMs/GumrS0NnUm8UT2LlhSEpZJ1q2edXq9x2T/XQd8oqaO+Vo62H4fLw+3AHicLZC/b9NAFMffu6udpM0PbMdx4jQ/LhfXoDRBtpN2IGkXkArNgNQpKkiNYlSBRNd2YKiQEB0YWFDFCkiIiYEfytAJVbDTv6CFjYXSFhbsckE53dP3fZ/e6X3egQRwfkj3aBY0uAgOXIWbACjXsJIkBWR2s0FqqDNJN9JJanObRXilQTtoVOR0xp1rzhhyRE5hEovoMXfObhAbW80FcgXdTAExlzdXVGtapU9xMmsXH4U3yAvUS3w6tVAPr88upt2yFt2Mq2pOVZ9EZUmKEjKRSuJ9IxOTYpNy+EpKmfpe6RIpYTxnm91eopxX+zvNjYJlxBC3t1HLl5OvFxVTEfeBmdHUXORCIpo1E7yaxs3vU1ktXpj5BuJExK7P6A/agwmIQhxyUAAGltiXKUyxmM5GicaF4Yqns5ZnoCjqns5RBK0GlO4Hy7gTbuFRcESKu6vBvdVdAurL4DF2w/cHB1jvdGjvb5uy9Q/B3VFt1E27x8cPw2vtdpt83QIxGc6f0190A6hgmoKU+HsD8lACDpfBg3kAQ4AYo5ljRcFEecuTRG6NeSzeEpj/QTkVfl5EFofh0trp6dpY8RMOBycnwbLrkpLjBIdC3w1+zvaxduez73/x/XUc3jrDjzi8/RtXwiXx7u2Z7zhOmHbq+8JXB3/CN/1+H+AfnVR/vQB4nGNgZGBgAOLuWSW34/ltvjJwszCAwHXDy/8R9P+pLAzMeUAuBwMTSBQAWOoL7AB4nGNgZGBgbvjfwBDDwgACQJKRARWwAABHCgJtBAAAAAPpAAAEAAAABAAAAAAAAAAAdgC6ARYAAHicY2BkYGBgYQhk4GEAASYg5gJCBob/YD4DABGzAXgAeJxtkk1uwjAQhZ/LT9UgddHSdlmvWBQp/CzZooZlJRbsQ3AgKIkjxyDRXQ/Q8/QQPUE3vUHv0EcwQkIk8uibN2/GthIAd/iFwOF54DqwgMfswFe4xrPjGvWO4zq577iBFkaOm9RfHXvo4s1xC/d45wRRv2H2gk/HAm18Ob7CLb4d16j/OK6T/xw38CiE4yba4smxh5noOm6hIz68sVGhVQs538kk0nmsc+vtQxBmSbqbquUmDc1JONFMmTLRuRz4/ZM4Ubkyx3nldjm0Npax0ZkM6FFpqmVh9FpF1l9ZW4x6vdjpfqQzHm8MA4UQlnEBiTl2jAkiaOSIq2jpO1JAb8Z6St+UPUtsyCGnXHJc0mbsMiiZ7WsSA/j8ZJecEzrzyn1+vhJb7jykatkpuQz7M1Lg5ihOSMkSRVVbU4mo+1hVXQV/jR7f+MzvVzfP/gHCFnRdAHicY2BigAAuBuyAhZGJkZmRhZGVgbGCycCSI7WoPDUzN9GQgQEAJkQEKgAA') format('woff'),
|
||||||
|
url('iconfont.ttf?t=1527493375212') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
|
||||||
|
url('iconfont.svg?t=1527493375212#fontFamily') format('svg'); /* iOS 4.1- */
|
||||||
|
}
|
||||||
|
|
||||||
|
.fontFamily {
|
||||||
|
font-family:"fontFamily" !important;
|
||||||
|
font-size:16px;
|
||||||
|
font-style:normal;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
}
|
||||||
|
|
||||||
|
[class^="el-icon-cjn"], [class*=" el-icon-cjn"] {
|
||||||
|
font-family:"fontFamily" !important;
|
||||||
|
/* 以下内容参照第三方图标库本身的规则 */
|
||||||
|
font-size: 13px;
|
||||||
|
font-style:normal;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-icon-cjn-09:before { content: "\e60b"; }
|
||||||
|
|
||||||
|
.el-icon-cjn-erweima1:before { content: "\e606"; }
|
||||||
|
|
||||||
BIN
src/icon/iconfont.eot
Normal file
1
src/icon/iconfont.js
Normal file
@@ -0,0 +1 @@
|
|||||||
|
(function(window) { var svgSprite = '<svg><symbol id="el-icon-cjn-09" viewBox="0 0 1024 1024"><path d="M804.141176 39.152941H39.152941v963.764706h963.764706V201.788235l-198.776471-162.635294z m-493.929411 60.235294h391.529411v180.705883h-391.529411v-180.705883z m481.882353 843.294118h-542.117647v-331.294118h542.117647v331.294118z m150.588235 0h-90.352941v-391.529412h-662.588236v391.529412h-90.352941v-843.294118h150.588236v240.941177h512v-240.941177h18.070588l162.635294 129.505883v713.788235z" fill="#2c2c2c" ></path><path d="M310.211765 671.623529h331.294117v60.235295h-331.294117zM310.211765 792.094118h210.823529v60.235294h-210.823529zM611.388235 129.505882h60.235294v120.470589h-60.235294z" fill="#2c2c2c" ></path></symbol><symbol id="el-icon-cjn-erweima1" viewBox="0 0 1024 1024"><path d="M23.92225303 998.84837371l439.58598408 0L463.50823711 559.26238962 23.92225303 559.26238962 23.92225303 998.84837371zM119.78212494 651.01398129l243.75796004 0 0 245.12738674L119.78212494 896.14136803 119.78212494 651.01398129z" ></path><path d="M23.92225303 457.92481072l439.58598408 0 0-439.58598412L23.92225303 18.33882658 23.92225303 457.92481072zM119.78212494 111.45984508l243.75796004 0 0 245.12738672L119.78212494 356.5872318 119.78212494 111.45984508z" ></path><path d="M570.32352297 18.33882658l0 439.58598414L1009.90950704 457.92481072l0-439.58598412L570.32352297 18.33882658zM911.31078166 355.21780509L667.55282162 355.21780509l0-245.12738681 243.75796004 0L911.31078166 355.21780509z" ></path><path d="M218.38085034 210.05857039l49.29936273 0 0 49.29936276-49.29936273 0 0-49.29936276Z" ></path><path d="M760.67384005 210.05857039l49.29936271 0 0 49.29936276-49.29936273 0 0-49.29936276Z" ></path><path d="M218.38085034 750.98213347l49.29936273 0 0 49.29936266-49.29936273 0 0-49.29936266Z" ></path><path d="M908.57192818 755.09041369L809.97320276 755.09041369 809.97320276 559.26238962 570.32352297 559.26238962 570.32352297 998.84837371 614.14517874 998.84837371 614.14517874 707.16047766 711.37447735 707.16047766 711.37447735 805.75920314 1009.90950704 805.75920314 1009.90950704 559.26238962 908.57192818 559.26238962Z" ></path><path d="M711.37447735 901.61907503l99.96815218 0 0 97.22929868-99.96815218 0 0-97.22929868Z" ></path><path d="M909.94135491 901.61907503l99.96815213 0 0 97.22929868-99.96815213 0 0-97.22929868Z" ></path></symbol></svg>'; var script = (function() { var scripts = document.getElementsByTagName('script'); return scripts[scripts.length - 1] }()); var shouldInjectCss = script.getAttribute('data-injectcss'); var ready = function(fn) { if (document.addEventListener) { if (~['complete', 'loaded', 'interactive'].indexOf(document.readyState)) { setTimeout(fn, 0) } else { var loadFn = function() { document.removeEventListener('DOMContentLoaded', loadFn, false); fn() }; document.addEventListener('DOMContentLoaded', loadFn, false) } } else if (document.attachEvent) { IEContentLoaded(window, fn) } function IEContentLoaded(w, fn) { var d = w.document, done = false, init = function() { if (!done) { done = true; fn() } }; var polling = function() { try { d.documentElement.doScroll('left') } catch (e) { setTimeout(polling, 50); return }init() }; polling(); d.onreadystatechange = function() { if (d.readyState == 'complete') { d.onreadystatechange = null; init() } } } }; var before = function(el, target) { target.parentNode.insertBefore(el, target) }; var prepend = function(el, target) { if (target.firstChild) { before(el, target.firstChild) } else { target.appendChild(el) } }; function appendSvg() { var div, svg; div = document.createElement('div'); div.innerHTML = svgSprite; svgSprite = null; svg = div.getElementsByTagName('svg')[0]; if (svg) { svg.setAttribute('aria-hidden', 'true'); svg.style.position = 'absolute'; svg.style.width = 0; svg.style.height = 0; svg.style.overflow = 'hidden'; prepend(svg, document.body) } } if (shouldInjectCss && !window.__iconfont__svg__cssinject__) { window.__iconfont__svg__cssinject__ = true; try { document.write('<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>') } catch (e) { console && console.log(e) } }ready(appendSvg) })(window)
|
||||||
39
src/icon/iconfont.svg
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?>
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
||||||
|
<!--
|
||||||
|
2013-9-30: Created.
|
||||||
|
-->
|
||||||
|
<svg>
|
||||||
|
<metadata>
|
||||||
|
Created by iconfont
|
||||||
|
</metadata>
|
||||||
|
<defs>
|
||||||
|
|
||||||
|
<font id="fontFamily" horiz-adv-x="1024" >
|
||||||
|
<font-face
|
||||||
|
font-family="fontFamily"
|
||||||
|
font-weight="500"
|
||||||
|
font-stretch="normal"
|
||||||
|
units-per-em="1024"
|
||||||
|
ascent="896"
|
||||||
|
descent="-128"
|
||||||
|
/>
|
||||||
|
<missing-glyph />
|
||||||
|
|
||||||
|
<glyph glyph-name="x" unicode="x" horiz-adv-x="1001"
|
||||||
|
d="M281 543q-27 -1 -53 -1h-83q-18 0 -36.5 -6t-32.5 -18.5t-23 -32t-9 -45.5v-76h912v41q0 16 -0.5 30t-0.5 18q0 13 -5 29t-17 29.5t-31.5 22.5t-49.5 9h-133v-97h-438v97zM955 310v-52q0 -23 0.5 -52t0.5 -58t-10.5 -47.5t-26 -30t-33 -16t-31.5 -4.5q-14 -1 -29.5 -0.5
|
||||||
|
t-29.5 0.5h-32l-45 128h-439l-44 -128h-29h-34q-20 0 -45 1q-25 0 -41 9.5t-25.5 23t-13.5 29.5t-4 30v167h911zM163 247q-12 0 -21 -8.5t-9 -21.5t9 -21.5t21 -8.5q13 0 22 8.5t9 21.5t-9 21.5t-22 8.5zM316 123q-8 -26 -14 -48q-5 -19 -10.5 -37t-7.5 -25t-3 -15t1 -14.5
|
||||||
|
t9.5 -10.5t21.5 -4h37h67h81h80h64h36q23 0 34 12t2 38q-5 13 -9.5 30.5t-9.5 34.5q-5 19 -11 39h-368zM336 498v228q0 11 2.5 23t10 21.5t20.5 15.5t34 6h188q31 0 51.5 -14.5t20.5 -52.5v-227h-327z" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<glyph glyph-name="09" unicode="" d="M804.141 856.847h-764.988v-963.765h963.765v801.129l-198.776 162.635zM310.212 796.612h391.529v-180.706h-391.529v180.706zM792.094-46.682h-542.118v331.294h542.118v-331.294zM942.682-46.682h-90.353v391.529h-662.588v-391.529h-90.353v843.294h150.588v-240.941h512v240.941h18.071l162.635-129.506v-713.788zM310.212 224.376h331.294v-60.235h-331.294zM310.212 103.906h210.824v-60.235h-210.824zM611.388 766.494h60.235v-120.471h-60.235z" horiz-adv-x="1024" />
|
||||||
|
|
||||||
|
|
||||||
|
<glyph glyph-name="erweima1" unicode="" d="M23.92225303-102.84837371000003l439.58598408 0L463.50823711 336.73761038 23.92225303 336.73761038 23.92225303-102.84837371000003zM119.78212494 244.98601871000005l243.75796004 0 0-245.12738674L119.78212494-0.1413680299999669 119.78212494 244.98601871000005zM23.92225303 438.07518928l439.58598408 0 0 439.58598412L23.92225303 877.66117342 23.92225303 438.07518928zM119.78212494 784.54015492l243.75796004 0 0-245.12738672L119.78212494 539.4127682000001 119.78212494 784.54015492zM570.32352297 877.66117342l0-439.58598414L1009.90950704 438.07518928l0 439.58598412L570.32352297 877.66117342zM911.31078166 540.78219491L667.55282162 540.78219491l0 245.12738681 243.75796004 0L911.31078166 540.78219491zM218.38085034 685.94142961l49.29936273 0 0-49.29936276-49.29936273 0 0 49.29936276ZM760.67384005 685.94142961l49.29936271 0 0-49.29936276-49.29936273 0 0 49.29936276ZM218.38085034 145.01786653l49.29936273 0 0-49.29936266-49.29936273 0 0 49.29936266ZM908.57192818 140.90958631L809.97320276 140.90958631 809.97320276 336.73761038 570.32352297 336.73761038 570.32352297-102.84837371000003 614.14517874-102.84837371000003 614.14517874 188.83952234000003 711.37447735 188.83952234000003 711.37447735 90.24079686000005 1009.90950704 90.24079686000005 1009.90950704 336.73761038 908.57192818 336.73761038ZM711.37447735-5.619075029999976l99.96815218 0 0-97.22929868-99.96815218 0 0 97.22929868ZM909.94135491-5.619075029999976l99.96815213 0 0-97.22929868-99.96815213 0 0 97.22929868Z" horiz-adv-x="1024" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</font>
|
||||||
|
</defs></svg>
|
||||||
|
After Width: | Height: | Size: 3.2 KiB |
BIN
src/icon/iconfont.ttf
Normal file
BIN
src/icon/iconfont.woff
Normal file
9
src/icons/index.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
import Vue from 'vue'
|
||||||
|
import SvgIcon from '@/components/SvgIcon' // svg组件
|
||||||
|
|
||||||
|
// register globally
|
||||||
|
Vue.component('svg-icon', SvgIcon)
|
||||||
|
|
||||||
|
const requireAll = requireContext => requireContext.keys().map(requireContext)
|
||||||
|
const req = require.context('./svg', false, /\.svg$/)
|
||||||
|
requireAll(req)
|
||||||
1
src/icons/svg/AuditFeedback.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1564389364408" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3838" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M704 265.130667l17.024-3.498667c104.96-21.76 153.642667-21.76 153.642667 20.906667 0 96.853333-62.933333 234.666667-149.333334 234.666666h-21.333333V265.088z m42.666667 203.52c43.605333-23.338667 81.92-112.170667 85.12-177.493334a88.96 88.96 0 0 0-10.453334-0.554666c-16.768 0-41.813333 3.114667-74.666666 9.386666v168.704zM320 265.130667l-17.024-3.498667c-104.96-21.76-153.642667-21.76-153.642667 20.906667 0 96.853333 62.933333 234.666667 149.333334 234.666666h21.333333V265.088z m-42.666667 34.858666v168.704c-43.605333-23.381333-81.92-112.213333-85.12-177.578666 2.730667-0.341333 6.229333-0.512 10.453334-0.512 16.768 0 41.813333 3.114667 74.666666 9.386666z m-89.813333-8.106666a4.138667 4.138667 0 0 1-0.426667 0.298666l0.426667-0.256z" fill="#333333" p-id="3839"></path><path d="M277.333333 256A64 64 0 0 1 341.333333 192h341.333334A64 64 0 0 1 746.666667 256v213.333333c0 117.632-105.173333 234.666667-234.666667 234.666667S277.333333 586.965333 277.333333 469.333333V256z m42.666667 0v213.333333c0 95.018667 87.168 192 192 192s192-96.981333 192-192V256a21.333333 21.333333 0 0 0-21.333333-21.333333H341.333333a21.333333 21.333333 0 0 0-21.333333 21.333333z" fill="#333333" p-id="3840"></path><path d="M362.666667 469.333333a21.333333 21.333333 0 1 1 42.666666 0 106.666667 106.666667 0 0 0 106.666667 106.666667 21.333333 21.333333 0 1 1 0 42.666667A149.333333 149.333333 0 0 1 362.666667 469.333333z" fill="#333333" p-id="3841"></path><path d="M490.666667 682.666667h42.666666v170.666666h-42.666666z" fill="#333333" p-id="3842"></path><path d="M682.666667 832a21.333333 21.333333 0 0 1-21.333334 21.333333h-298.666666a21.333333 21.333333 0 1 1 0-42.666666h298.666666a21.333333 21.333333 0 0 1 21.333334 21.333333z" fill="#333333" p-id="3843"></path></svg>
|
||||||
|
After Width: | Height: | Size: 2.1 KiB |
1
src/icons/svg/AuditFindings.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1564389301709" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2525" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M624 960H208c-44.1 0-80-35.9-80-80V176c0-44.1 35.9-80 80-80h80c8.8 0 16 7.2 16 16s-7.2 16-16 16h-80c-26.5 0-48 21.5-48 48v704c0 26.5 21.5 48 48 48h416c8.8 0 16 7.2 16 16s-7.2 16-16 16zM720 960h-32c-8.8 0-16-7.2-16-16s7.2-16 16-16h32c8.8 0 16 7.2 16 16s-7.2 16-16 16zM816 960h-32c-8.8 0-16-7.2-16-16s7.2-16 16-16h32c26.5 0 48-21.5 48-48V176c0-26.5-21.5-48-48-48h-64c-8.8 0-16-7.2-16-16s7.2-16 16-16h64c44.1 0 80 35.9 80 80v704c0 44.1-35.9 80-80 80z" fill="#333333" p-id="2526"></path><path d="M752 336H272c-8.8 0-16-7.2-16-16s7.2-16 16-16h480c8.8 0 16 7.2 16 16s-7.2 16-16 16zM752 528H272c-8.8 0-16-7.2-16-16s7.2-16 16-16h480c8.8 0 16 7.2 16 16s-7.2 16-16 16z" fill="#333333" p-id="2527"></path><path d="M752 720H272c-8.8 0-16-7.2-16-16s7.2-16 16-16h480c8.8 0 16 7.2 16 16s-7.2 16-16 16z" fill="#0F82E4" p-id="2528"></path><path d="M688 128c-8.8 0-16-7.2-16-16s-7.2-16-16-16H368c-8.8 0-16 7.2-16 16s-7.2 16-16 16-16-7.2-16-16c0-26.5 21.5-48 48-48h288c26.5 0 48 21.5 48 48 0 8.8-7.2 16-16 16z" fill="#333333" p-id="2529"></path></svg>
|
||||||
|
After Width: | Height: | Size: 1.4 KiB |
1
src/icons/svg/BasicDataMaintenan.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1561604355295" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1355" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M596.48 332.288l-368.64-2.048c-14.336 0-25.6-11.776-25.6-25.6 0-14.336 11.776-25.6 25.6-25.6l368.64 2.048c14.336 0 25.6 11.776 25.6 25.6 0 14.336-11.776 25.6-25.6 25.6zM601.6 521.728l-368.64-2.048c-14.336 0-25.6-11.776-25.6-25.6 0-14.336 11.776-25.6 25.6-25.6l368.64 2.048c14.336 0 25.6 11.776 25.6 25.6 0 14.336-11.776 25.6-25.6 25.6zM471.04 711.168l-235.52-2.048c-14.336 0-25.6-11.776-25.6-25.6s11.776-25.6 25.6-25.6l235.52 2.048c14.336 0 25.6 11.776 25.6 25.6 0 14.336-11.776 25.6-25.6 25.6zM788.992 939.52c-78.848 0-143.36-64.512-143.36-143.36s64.512-143.36 143.36-143.36 143.36 64.512 143.36 143.36-64.512 143.36-143.36 143.36z m0-235.52c-50.688 0-92.16 41.472-92.16 92.16s41.472 92.16 92.16 92.16 92.16-41.472 92.16-92.16-41.472-92.16-92.16-92.16z" p-id="1356"></path><path d="M785.92 683.52c-14.336 0-25.6-11.264-25.6-25.6v-40.96c0-14.336 11.264-25.6 25.6-25.6s25.6 11.264 25.6 25.6v40.96c0 14.336-11.264 25.6-25.6 25.6zM691.712 726.016c-6.656 0-13.312-2.56-18.432-7.68l-29.696-30.72c-9.728-10.24-9.728-26.624 0.512-36.352 10.24-9.728 26.624-9.728 36.352 0.512l29.696 30.72c9.728 10.24 9.728 26.624-0.512 36.352-5.12 4.608-11.264 7.168-17.92 7.168zM652.8 821.76h-40.96c-14.336 0-25.6-11.264-25.6-25.6s11.264-25.6 25.6-25.6h40.96c14.336 0 25.6 11.264 25.6 25.6s-11.264 25.6-25.6 25.6zM663.552 948.736c-6.656 0-13.312-2.56-17.92-7.68-10.24-10.24-10.24-26.112 0-36.352l30.208-30.208c10.24-10.24 26.112-10.24 36.352 0s10.24 26.112 0 36.352l-30.208 30.208c-5.12 5.12-11.776 7.68-18.432 7.68zM791.04 1000.96c-14.336 0-25.6-11.264-25.6-25.6v-46.08c0-14.336 11.264-25.6 25.6-25.6s25.6 11.264 25.6 25.6v46.08c0 14.336-11.264 25.6-25.6 25.6zM916.48 947.712c-6.656 0-13.312-2.56-17.92-7.68l-30.208-30.208c-10.24-10.24-10.24-26.112 0-36.352s26.112-10.24 36.352 0l30.208 30.208c10.24 10.24 10.24 26.112 0 36.352-5.12 5.12-11.776 7.68-18.432 7.68zM970.24 821.76h-46.08c-14.336 0-25.6-11.264-25.6-25.6s11.264-25.6 25.6-25.6h46.08c14.336 0 25.6 11.264 25.6 25.6s-11.264 25.6-25.6 25.6zM884.736 724.992c-6.656 0-13.312-2.56-17.92-7.68-10.24-10.24-10.24-26.112 0-36.352l30.208-30.208c10.24-10.24 26.112-10.24 36.352 0s10.24 26.112 0 36.352l-30.208 30.208c-5.12 5.12-11.776 7.68-18.432 7.68zM317.44 1005.056H38.4c-14.336 0-25.6-11.264-25.6-25.6V35.84c0-14.336 11.264-25.6 25.6-25.6h733.696c14.336 0 25.6 11.264 25.6 25.6v276.992c0 14.336-11.264 25.6-25.6 25.6s-25.6-11.264-25.6-25.6V61.44H64v892.416H317.44c14.336 0 25.6 11.264 25.6 25.6s-11.264 25.6-25.6 25.6z" p-id="1357"></path></svg>
|
||||||
|
After Width: | Height: | Size: 2.8 KiB |
1
src/icons/svg/BasicDataMaintenance.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1562153660955" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2252" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M611.84 168.96c-11.434667 24.234667-17.408 51.029333-17.408 78.677333 0 49.322667 19.114667 95.402667 53.930667 130.218667 34.645333 34.645333 80.896 53.930667 130.218667 53.930667 27.648 0 54.442667-5.973333 78.677333-17.578667-32.768 33.109333-76.8 51.029333-123.050667 51.029333-12.117333 0-24.234667-1.365333-36.010667-3.754667-18.944-4.096-39.082667 1.877333-52.906667 15.701333L309.76 812.544c-1.706667-52.394667-44.032-94.549333-96.426667-96.426667l335.189333-335.36c13.824-13.824 19.797333-33.621333 15.701333-52.906667-12.117333-57.856 5.461333-117.418667 47.445333-158.890667L611.84 168.96zM670.378667 674.645333l184.32 184.32c10.24 10.24 10.24 26.965333 0 37.034667-10.069333 10.069333-26.965333 10.069333-37.034667 0l-184.32-184.32L670.378667 674.645333zM710.997333 62.976c-4.266667 0-8.704 0.512-13.141333 1.024-130.56 20.48-217.429333 145.92-190.122667 275.968L120.832 727.04c-49.322667 49.152-49.322667 129.194667 0 178.176 48.981333 48.981333 129.365333 48.981333 178.176 0L686.08 518.144c130.048 27.136 255.658667-59.392 275.797333-190.122667 4.949333-31.402667-7.68-49.322667-24.234667-49.322667-7.68 0-16.042667 3.754667-24.234667 11.776l-46.08 46.08c-48.981333 48.981333-129.365333 48.981333-178.346667 0-49.322667-49.322667-49.322667-129.194667 0-178.346667 0 0 20.650667-20.650667 46.08-46.08C758.101333 89.258667 746.666667 62.805333 710.997333 62.976L710.997333 62.976zM180.224 845.824c-26.624-26.624-7.168-71.68 29.696-71.68s56.661333 45.056 29.866667 71.68C223.232 862.208 196.608 862.208 180.224 845.824zM120.490667 102.229333 60.928 161.621333l74.24 104.106667 62.293333 32.768 145.749333 145.749333 59.392-59.392L257.194667 238.933333l-32.768-62.293333L120.490667 102.229333 120.490667 102.229333zM655.530667 607.573333l-89.088 89.088c-8.192 8.192-8.192 21.504 0 29.696l210.432 210.432c32.768 32.597333 86.186667 32.768 118.954667 0 32.768-32.768 32.768-86.186667 0-118.954667L685.397333 607.402667C677.034667 599.210667 663.893333 599.210667 655.530667 607.573333L655.530667 607.573333z" p-id="2253"></path></svg>
|
||||||
|
After Width: | Height: | Size: 2.4 KiB |
1
src/icons/svg/ExpertAudit.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1564389402291" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4637" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M586.501296 515.924379a118.776 46.561 0 1 0 243.088434 0 118.776 46.561 0 1 0-243.088434 0Z" p-id="4638"></path><path d="M802.689057 646.378523 613.404016 646.378523 677.750533 515.924379 738.036571 515.924379Z" p-id="4639"></path><path d="M882.331955 737.723951c0 15.954367-13.053294 29.007661-29.007661 29.007661l-290.556539 0c-15.953344 0-29.007661-13.053294-29.007661-29.007661l0-68.207451c0-15.954367 13.053294-29.007661 29.007661-29.007661l290.556539 0c15.953344 0 29.007661 13.053294 29.007661 29.007661L882.331955 737.723951z" p-id="4640"></path><path d="M493.657748 763.316839l-253.541507 0 0-508.541225 508.540202 0 0 151.267169 97.235578 0 0-172.321694c0-42.005696-34.174334-76.18003-76.181053-76.18003l-550.650275 0c-42.006719 0-76.18003 34.174334-76.18003 76.18003l0 550.650275c0 42.005696 34.174334 76.18003 76.18003 76.18003l274.596032 0L493.656725 763.316839z" p-id="4641"></path><path d="M673.531442 380.294352c0 15.954367-13.053294 29.007661-29.007661 29.007661l-306.663378 0c-15.953344 0-29.007661-13.053294-29.007661-29.007661l0-7.956206c0-15.954367 13.053294-29.007661 29.007661-29.007661l306.663378 0c15.953344 0 29.007661 13.053294 29.007661 29.007661L673.531442 380.294352z" p-id="4642"></path><path d="M499.744373 567.520501c0 15.954367-13.053294 29.007661-29.007661 29.007661l-132.87631 0c-15.953344 0-29.007661-13.053294-29.007661-29.007661l0-7.957229c0-15.954367 13.053294-29.007661 29.007661-29.007661l132.87631 0c15.953344 0 29.007661 13.053294 29.007661 29.007661L499.744373 567.520501z" p-id="4643"></path></svg>
|
||||||
|
After Width: | Height: | Size: 1.9 KiB |
1
src/icons/svg/LabelToExamine.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1564389185167" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1192" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M456 708c-6.3 0-12.7-2.1-17.9-6.5-11.9-9.9-13.5-27.6-3.6-39.4l113.7-136.4-129.1-43c-8.8-3-15.5-10-18-18.9-2.6-8.9-0.5-18.5 5.4-25.6l140-168c9.9-11.8 27.6-13.4 39.4-3.6 11.9 9.9 13.5 27.6 3.6 39.4L475.8 442.4l129.1 43c8.8 3 15.5 10 18 18.9 2.6 8.9 0.5 18.5-5.4 25.6l-140 168C472 704.6 464 708 456 708z" p-id="1193"></path><path d="M512 120l336 145.7v188.7c0 304.3-257.2 420.9-336 449.4-78.8-28.5-336-145.2-336-449.4l0.2-189.3L512 120m0-56c-7.5 0-15 1.5-22.1 4.6l-336 145.3c-20.6 8.9-33.9 29.3-33.9 51.9v188.7c0 344.2 294.3 473.7 372.9 502.1 6.3 2.3 12.7 3.4 19.1 3.4s12.8-1.1 19.1-3.4C609.7 928.2 904 798.7 904 454.5V265.8c0-22.6-13.4-43-33.9-51.9l-336-145.3C527 65.5 519.5 64 512 64z" p-id="1194"></path></svg>
|
||||||
|
After Width: | Height: | Size: 1.1 KiB |
1
src/icons/svg/PictureUpload.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1564389337737" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3298" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M793.6 358.4C768 227.2 652.8 128 512 128s-256 99.2-281.6 230.4C134.4 384 64 473.6 64 576c0 124.8 99.2 224 224 224h32v-64h-32c-89.6 0-160-70.4-160-160s70.4-160 160-160c0-124.8 99.2-224 224-224s224 99.2 224 224c89.6 0 160 70.4 160 160s-70.4 160-160 160h-32v64h32c124.8 0 224-99.2 224-224 0-102.4-70.4-192-166.4-217.6z" fill="" p-id="3299"></path><path d="M540.8 489.6c-12.8-9.6-25.6-12.8-38.4-6.4-3.2 0-6.4 3.2-9.6 6.4l-96 92.8c-12.8 12.8-12.8 32 0 44.8 12.8 12.8 35.2 12.8 48 0l38.4-35.2v272c0 19.2 16 32 32 32 19.2 0 32-16 32-32V592l38.4 35.2c12.8 12.8 35.2 12.8 48 0 12.8-12.8 12.8-32 0-44.8l-92.8-92.8z" fill="" p-id="3300"></path></svg>
|
||||||
|
After Width: | Height: | Size: 1016 B |
1
src/icons/svg/PreliminaryAudit.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1564389274444" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1986" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M674.84199 621.64467c36.110294 21.454619 45.245726 31.345056 89.54802 44.767513 44.299695 13.419858 70.24536 18.242274 107.522599 18.242274 15.990254 0 52.546274 8.237482 52.546274 47.302822v145.527553h-102.906802v-121.541522c-55.930152-10.252995-92.90331-18.247472-110.918172-23.986031-35.873787-11.426437-53.726213-19.86534-77.855188-37.216162-13.709645-9.857949-49.674396-38.571533-59.780548-49.462579-27.953381-30.120934-47.037726-96.324873-46.217747-129.546396 0-91.03334 49.094822-141.161259 84.925726-180.430619 33.877766-37.038132 54.325279-59.498558 54.325279-114.237076 2.267614-36.882193-13.891574-72.518173-43.23801-95.346356-31.203411-23.948345-78.632284-37.186274-134.051736-37.186274-47.405482-2.193543-94.254782 10.850761-133.556629 37.186274-29.345137 22.828183-45.505624 58.464162-43.236711 95.346356 0 54.292792 20.235695 76.306193 53.752203 112.898599 36.055716 39.26936 85.497503 89.39598 85.497503 181.767797 0 143.243046-111.622497 236.358173-266.197117 238.737543v34.806903h682.03468v88.206945l-770.385868 0.002598V723.827655c0-37.485157 19.170112-57.416772 56.126376-57.416772 22.265503 0 27.133401-0.148142 27.133401-0.148142 101.030335 0 182.93734-49.682193 182.93734-150.531898 0-124.946193-139.251005-129.111066-139.251005-294.666396C223.595858 74.846863 342.279797 0.324873 488.801462 0.324873h0.5107c146.461888 0 265.205604 74.52199 265.205604 220.739574 0 165.55533-139.266599 171.653848-139.266598 294.666396-0.609462 16.490558-1.841381 69.412386 59.590822 105.913827zM927.167025 1023.675127H96.649746V950.57868h830.518579v73.096447z" fill="#000000" p-id="1987"></path></svg>
|
||||||
|
After Width: | Height: | Size: 1.9 KiB |
1
src/icons/svg/QualityDataDetection.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1560134125630" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="889" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M46.155345 920.711821v-815.32794c0-34.329598 27.144333-62.172498 60.475977-62.172498H766.478121c33.331644 0 60.475977 27.942696 60.475977 62.172498v283.61836h39.918137V105.383881c0-56.883345-45.007699-103.288179-100.394114-103.288179H106.631322C51.244908 2.095702 6.237209 48.500536 6.237209 105.383881v815.32794c0 56.98314 45.007699 103.288179 100.394113 103.288179h539.294026V982.984115H106.631322c-33.331644 0-60.475977-27.942696-60.475977-62.272294z" fill="#4D4D4D" p-id="890"></path><path d="M130.88159 196.097846h445.685996v39.918137H130.88159zM130.88159 349.982263h564.043271v39.918137H130.88159zM130.88159 504.265861h232.922328v39.918137H130.88159zM752.207387 417.144528c-71.453465 0-138.715525 27.8429-189.211967 78.339343-50.496443 50.496443-78.339343 117.758503-78.339344 189.211968s27.8429 138.715525 78.339344 189.211967 117.758503 78.339343 189.211967 78.339343 138.715525-27.8429 189.211968-78.339343 78.339343-117.758503 78.339343-189.211967-27.8429-138.715525-78.339343-189.211968c-50.596238-50.496443-117.758503-78.339343-189.211968-78.339343z m0 495.28428c-125.54254 0-227.732969-102.19043-227.732969-227.732969S626.664847 457.062664 752.207387 457.062664s227.732969 102.19043 227.73297 227.73297-102.19043 227.633174-227.73297 227.633174z" fill="#4D4D4D" p-id="891"></path><path d="M803.901374 752.35708c9.380762-4.2912 13.172985-11.476464 11.476464-21.755384-6.786083-26.445766-13.671962-46.404834-20.458045-60.076796-3.393042-8.482604-10.678102-11.476464-21.755384-8.981581-9.380762 3.393042-12.374622 9.779943-8.981581 19.160706 8.482604 22.952929 15.368483 43.011792 20.458045 60.076796 3.492837 10.27892 9.879739 14.170939 19.260501 11.576259z" fill="#4D4D4D" p-id="892"></path><path d="M824.359419 545.381542l-10.179125-10.179125c-13.671962-11.077283-26.844947-9.779943-39.61875 3.792223-6.786083 7.684241-15.767664 17.863366-26.844947 30.63717-17.863366 19.559887-31.535328 34.130007-40.91609 43.410973 1.696521-5.089562 1.696521-10.678102 0-16.566026-2.594679-5.089562-6.386902-7.684241-11.476465-7.684242h-21.755384v-46.005652c-0.898158-9.380762-6.386902-14.470325-16.566027-15.368483-10.179125 0.898158-15.767664 5.98772-16.566026 15.368483V588.792515H614.789202c-9.380762 0.898158-14.470325 6.386902-15.368483 16.566027 0.798363 11.077283 5.98772 17.065003 15.368483 17.863366h22.952928c-6.786083 30.63717-19.559887 64.767177-38.321411 102.19043-5.089562 11.077283-3.393042 19.559887 5.089563 25.547607 10.179125 4.2912 18.761524 1.297339 25.547607-8.98158 2.594679-4.2912 5.98772-11.875646 10.179125-22.952929v98.398207c0.798363 9.380762 6.386902 14.071143 16.566027 14.071143 10.179125-0.898158 15.767664-5.98772 16.566026-15.368483V682.10116c5.089562 10.179125 11.077283 18.761524 17.863366 25.547607 6.786083 5.98772 13.572166 5.588539 20.458046-1.297339 6.786083 17.863366 12.773804 36.225709 17.863366 54.987233 4.2912 9.380762 11.476464 12.773804 21.755384 10.179125 9.380762-4.2912 12.773804-11.875646 10.179125-22.952929-5.98772-22.154566-13.671962-44.708313-22.952929-67.761037-2.594679-4.2912-6.786083-6.386902-12.773803-6.386902-6.786083-0.798363-11.975441 0.898158-15.368483 5.089563-1.696521-2.594679-4.2912-6.386902-7.684241-11.476464-4.2912-6.786083-7.28506-11.875646-8.981581-15.368483-7.684241-10.179125-14.470325-13.572166-20.458045-10.179125v-19.160705H696.621382c-5.98772 7.684241-5.089562 15.368483 2.594679 22.952928 8.482604 6.786083 16.566027 7.28506 24.250268 1.29734 0.798363 6.786083 5.488744 10.678102 14.071143 11.476464h126.540493c10.179125-0.798363 14.869506-7.185265 14.071143-19.160706 9.380762 7.684241 17.065003 8.083423 22.952929 1.29734 6.786083-11.875646 6.786083-21.755384 0-29.439626-18.761524-14.470325-44.309132-36.62489-76.742618-66.363902z m-79.237501 79.137706l35.826528-35.826528c5.089562-5.98772 8.083423-9.380762 8.98158-10.179125 5.089562-5.98772 11.077283-5.488744 17.863366 1.29734 14.470325 14.470325 31.535328 29.439626 51.095215 44.708313h-113.766689z" fill="#4D4D4D" p-id="893"></path><path d="M888.228438 785.588929h-35.826528c12.773804-28.940649 25.148426-61.374135 37.024072-97.100867 3.393042-11.875646 0-20.458045-10.179125-25.547608-11.077283-3.393042-18.761524 0.399181-22.952929 11.476464-13.671962 45.20729-27.743105 82.231361-42.213429 111.172011H696.621382c-9.380762 0.898158-14.470325 6.386902-15.368483 16.566027 0.798363 11.077283 6.386902 17.065003 16.566027 17.863366H888.228438c9.380762-0.898158 14.470325-6.786083 15.368482-17.863366-0.798363-10.179125-5.98772-15.667869-15.368482-16.566027z" fill="#4D4D4D" p-id="894"></path></svg>
|
||||||
|
After Width: | Height: | Size: 4.8 KiB |
1
src/icons/svg/QualityDataStatistics.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1560136134480" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1247" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M816.458665 1020.789888c3.041266 0 6.180769-0.538259 9.347902-1.528819-9.057283 1.000793-18.255783 1.528819-27.579125 1.528819L816.458665 1020.789888z" p-id="1248"></path><path d="M769.659803 700.926884c-24.047696 0-43.554982 19.430538-43.554982 43.404556 0 23.975041 19.507286 43.404556 43.554982 43.404556 24.072255 0 43.579541-19.429515 43.579541-43.404556C813.239344 720.357422 793.733081 700.926884 769.659803 700.926884z" p-id="1249"></path><path d="M798.226418 577.375963c-108.821451 0-197.040678 87.844697-197.040678 196.241476s88.219227 196.290595 197.040678 196.290595c108.794845 0 197.013049-87.895863 197.013049-196.290595C995.240491 665.218614 907.022287 577.375963 798.226418 577.375963zM893.100206 888.989073c-6.005784 0-11.465123-2.430352-15.412015-6.351662l-63.830771-63.606667c-12.978593 7.644097-28.04166 12.087293-44.197618 12.087293-48.119951 0-87.13043-38.83754-87.13043-86.786599 0-47.923476 39.010479-86.785575 87.13043-86.785575s87.133499 38.862099 87.133499 86.785575c0 16.08228-4.467755 31.096229-12.134365 44.025703l63.851237 63.581084c3.921309 3.944845 6.379291 9.357112 6.379291 15.361873C914.890488 879.287107 905.13531 888.989073 893.100206 888.989073z" p-id="1250"></path><path d="M206.688921 181.1385c24.077372 0 50.836829-26.858718 50.836829-50.836829L257.52575 54.045917c0-23.978111-16.731056-50.836829-50.836829-50.836829-29.189809 0-50.836829 26.858718-50.836829 50.836829l0 76.255755C155.852092 154.279782 182.612573 181.1385 206.688921 181.1385zM435.453115 181.1385c41.206494 0 50.837852-26.858718 50.837852-50.836829L486.290967 54.045917c0-23.978111-14.199397-50.836829-50.837852-50.836829-35.991726 0-50.836829 26.858718-50.836829 50.836829l0 76.255755C384.616286 154.279782 402.314367 181.1385 435.453115 181.1385zM664.217309 181.1385c33.112142 0 50.836829-26.858718 50.836829-50.836829L715.054137 54.045917c0-23.978111-17.72264-50.836829-50.836829-50.836829-29.189809 0-50.837852 26.858718-50.837852 50.836829l0 76.255755C613.38048 154.279782 640.164496 181.1385 664.217309 181.1385zM816.726771 1019.936451c3.024893 0 6.151094-0.535189 9.302877-1.51961-9.015328 0.99363-18.167778 1.51961-27.447119 1.51961L816.726771 1019.936451zM551.646464 773.946944c0-135.828548 110.559025-245.942435 246.936065-245.942435 24.572652 0 48.299029 3.593851 70.701249 10.252505l-1.720178-382.536416c0-23.981181-26.758434-50.837852-50.836829-50.837852l-50.837852 0 0 50.837852c0 47.956222-53.54245 76.254731-101.671611 76.254731s-101.672634-28.297486-101.672634-76.254731l0-50.837852-25.418926 0 0 50.837852c0 47.956222-53.914934 76.254731-101.671611 76.254731-77.570703 0-101.671611-53.715389-101.671611-101.671611l0-25.419949L308.363601 104.883769l0 25.418926c-0.051165 48.202838-38.275745 101.275591-103.982236 101.275591-48.130184 0-99.364055-36.19127-99.364055-101.275591l0-25.418926-25.418926 0c-24.077372 0-50.837852 26.856671-50.837852 50.837852l0 806.331515c0 23.980157 26.758434 57.884338 50.837852 57.884338l718.983121 0C662.207535 1019.936451 551.646464 909.824611 551.646464 773.946944zM181.271018 384.483768c0 0 530.158568 2.333138 531.523659 0 24.599258-0.893346 53.095265 14.645558 53.095265 50.836829 0 34.205033-26.75741 50.836829-50.836829 50.836829L181.271018 486.157425c-24.078395 0-50.836829-12.559037-50.836829-50.836829C130.435213 402.853138 157.192623 384.483768 181.271018 384.483768zM410.035212 892.847961 181.271018 892.847961c-20.057825 0-50.836829-11.418051-50.836829-50.837852 0-29.835516 30.780027-53.568033 50.836829-53.568033l228.764194 2.731204c20.056801 0 50.837852 11.022031 50.837852 50.836829C460.873064 873.584222 430.092014 892.847961 410.035212 892.847961zM460.873064 689.500647 181.271018 689.500647c-24.078395 0-50.836829-15.884782-50.836829-50.835805 0-38.57455 26.75741-50.836829 50.836829-50.836829l279.601023 0c24.075325 0 50.835805 18.96391 50.835805 50.836829C511.707846 662.643975 484.948389 689.500647 460.873064 689.500647z" p-id="1251"></path></svg>
|
||||||
|
After Width: | Height: | Size: 4.2 KiB |
1
src/icons/svg/QualityInspection.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1560134125630" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="889" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M46.155345 920.711821v-815.32794c0-34.329598 27.144333-62.172498 60.475977-62.172498H766.478121c33.331644 0 60.475977 27.942696 60.475977 62.172498v283.61836h39.918137V105.383881c0-56.883345-45.007699-103.288179-100.394114-103.288179H106.631322C51.244908 2.095702 6.237209 48.500536 6.237209 105.383881v815.32794c0 56.98314 45.007699 103.288179 100.394113 103.288179h539.294026V982.984115H106.631322c-33.331644 0-60.475977-27.942696-60.475977-62.272294z" fill="#4D4D4D" p-id="890"></path><path d="M130.88159 196.097846h445.685996v39.918137H130.88159zM130.88159 349.982263h564.043271v39.918137H130.88159zM130.88159 504.265861h232.922328v39.918137H130.88159zM752.207387 417.144528c-71.453465 0-138.715525 27.8429-189.211967 78.339343-50.496443 50.496443-78.339343 117.758503-78.339344 189.211968s27.8429 138.715525 78.339344 189.211967 117.758503 78.339343 189.211967 78.339343 138.715525-27.8429 189.211968-78.339343 78.339343-117.758503 78.339343-189.211967-27.8429-138.715525-78.339343-189.211968c-50.596238-50.496443-117.758503-78.339343-189.211968-78.339343z m0 495.28428c-125.54254 0-227.732969-102.19043-227.732969-227.732969S626.664847 457.062664 752.207387 457.062664s227.732969 102.19043 227.73297 227.73297-102.19043 227.633174-227.73297 227.633174z" fill="#4D4D4D" p-id="891"></path><path d="M803.901374 752.35708c9.380762-4.2912 13.172985-11.476464 11.476464-21.755384-6.786083-26.445766-13.671962-46.404834-20.458045-60.076796-3.393042-8.482604-10.678102-11.476464-21.755384-8.981581-9.380762 3.393042-12.374622 9.779943-8.981581 19.160706 8.482604 22.952929 15.368483 43.011792 20.458045 60.076796 3.492837 10.27892 9.879739 14.170939 19.260501 11.576259z" fill="#4D4D4D" p-id="892"></path><path d="M824.359419 545.381542l-10.179125-10.179125c-13.671962-11.077283-26.844947-9.779943-39.61875 3.792223-6.786083 7.684241-15.767664 17.863366-26.844947 30.63717-17.863366 19.559887-31.535328 34.130007-40.91609 43.410973 1.696521-5.089562 1.696521-10.678102 0-16.566026-2.594679-5.089562-6.386902-7.684241-11.476465-7.684242h-21.755384v-46.005652c-0.898158-9.380762-6.386902-14.470325-16.566027-15.368483-10.179125 0.898158-15.767664 5.98772-16.566026 15.368483V588.792515H614.789202c-9.380762 0.898158-14.470325 6.386902-15.368483 16.566027 0.798363 11.077283 5.98772 17.065003 15.368483 17.863366h22.952928c-6.786083 30.63717-19.559887 64.767177-38.321411 102.19043-5.089562 11.077283-3.393042 19.559887 5.089563 25.547607 10.179125 4.2912 18.761524 1.297339 25.547607-8.98158 2.594679-4.2912 5.98772-11.875646 10.179125-22.952929v98.398207c0.798363 9.380762 6.386902 14.071143 16.566027 14.071143 10.179125-0.898158 15.767664-5.98772 16.566026-15.368483V682.10116c5.089562 10.179125 11.077283 18.761524 17.863366 25.547607 6.786083 5.98772 13.572166 5.588539 20.458046-1.297339 6.786083 17.863366 12.773804 36.225709 17.863366 54.987233 4.2912 9.380762 11.476464 12.773804 21.755384 10.179125 9.380762-4.2912 12.773804-11.875646 10.179125-22.952929-5.98772-22.154566-13.671962-44.708313-22.952929-67.761037-2.594679-4.2912-6.786083-6.386902-12.773803-6.386902-6.786083-0.798363-11.975441 0.898158-15.368483 5.089563-1.696521-2.594679-4.2912-6.386902-7.684241-11.476464-4.2912-6.786083-7.28506-11.875646-8.981581-15.368483-7.684241-10.179125-14.470325-13.572166-20.458045-10.179125v-19.160705H696.621382c-5.98772 7.684241-5.089562 15.368483 2.594679 22.952928 8.482604 6.786083 16.566027 7.28506 24.250268 1.29734 0.798363 6.786083 5.488744 10.678102 14.071143 11.476464h126.540493c10.179125-0.798363 14.869506-7.185265 14.071143-19.160706 9.380762 7.684241 17.065003 8.083423 22.952929 1.29734 6.786083-11.875646 6.786083-21.755384 0-29.439626-18.761524-14.470325-44.309132-36.62489-76.742618-66.363902z m-79.237501 79.137706l35.826528-35.826528c5.089562-5.98772 8.083423-9.380762 8.98158-10.179125 5.089562-5.98772 11.077283-5.488744 17.863366 1.29734 14.470325 14.470325 31.535328 29.439626 51.095215 44.708313h-113.766689z" fill="#4D4D4D" p-id="893"></path><path d="M888.228438 785.588929h-35.826528c12.773804-28.940649 25.148426-61.374135 37.024072-97.100867 3.393042-11.875646 0-20.458045-10.179125-25.547608-11.077283-3.393042-18.761524 0.399181-22.952929 11.476464-13.671962 45.20729-27.743105 82.231361-42.213429 111.172011H696.621382c-9.380762 0.898158-14.470325 6.386902-15.368483 16.566027 0.798363 11.077283 6.386902 17.065003 16.566027 17.863366H888.228438c9.380762-0.898158 14.470325-6.786083 15.368482-17.863366-0.798363-10.179125-5.98772-15.667869-15.368482-16.566027z" fill="#4D4D4D" p-id="894"></path></svg>
|
||||||
|
After Width: | Height: | Size: 4.8 KiB |
1
src/icons/svg/SampleStatistics.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1562718731634" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1311" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M138.545152 765.825024l95.52896 0c16.662528 0 30.16704-13.50656 30.16704-30.164992L264.241152 309.9648c0-16.662528-13.50656-30.16704-30.16704-30.16704L138.545152 279.79776c-16.662528 0-30.16704 13.50656-30.16704 30.16704l0 425.693184C108.376064 752.318464 121.882624 765.825024 138.545152 765.825024z" p-id="1312"></path><path d="M445.435904 765.825024l95.52896 0c16.662528 0 30.16704-19.744768 30.16704-44.10368L571.131904 99.325952c0-24.36096-13.50656-44.107776-30.16704-44.107776l-95.52896 0c-16.66048 0-30.16704 19.746816-30.16704 44.107776l0 622.395392C415.268864 746.080256 428.773376 765.825024 445.435904 765.825024z" p-id="1313"></path><path d="M752.326656 765.825024l95.52896 0c16.662528 0 30.16704-18.345984 30.16704-40.986624l0-578.3552c0-22.636544-13.50656-40.984576-30.16704-40.984576l-95.52896 0c-16.662528 0-30.16704 18.348032-30.16704 40.984576l0 578.3552C722.157568 747.476992 735.664128 765.825024 752.326656 765.825024z" p-id="1314"></path><path d="M6.144 816.103424l968.704 0 0 50.2784-968.704 0 0-50.2784Z" p-id="1315"></path></svg>
|
||||||
|
After Width: | Height: | Size: 1.4 KiB |
1
src/icons/svg/ScoreAssessment.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1562153302693" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1160" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M831.02 900.23H192.98c-16.48 0-29.84-13.36-29.84-29.84s13.36-29.84 29.84-29.84h638.05c16.48 0 29.84 13.36 29.84 29.84s-13.36 29.84-29.85 29.84zM830.96 781.5h-636.6c-16.48 0-29.84-13.36-29.84-29.84V646.14c0-52.18 42.43-94.63 94.58-94.63h120.6c-1.62-31.43-12.35-81.8-22-92.95-31.94-41.09-49.35-88.7-51.38-138.95-0.17-54.98 22.38-106.98 61.88-143.77 38.87-36.22 91.38-55.03 144.52-51.67 52.71-3.41 104.95 15.2 143.77 51.05 39.42 36.4 62.21 87.94 62.53 141.4-1.89 51.77-19.31 99.61-50.38 139.62-10.39 12.15-21.2 62.36-22.99 93.79h120.58c52.15 0 94.58 42.45 94.58 94.62v107.02c-0.01 16.48-13.37 29.83-29.85 29.83zM224.2 721.82h576.91v-77.18c0-19.26-15.66-34.94-34.9-34.94H625.25c-9.72 0-18.84-4.74-24.43-12.7-8.29-11.81-13.43-25.73-14.9-40.24-0.13-1.27-0.17-2.55-0.14-3.85 0.54-18.83 8.77-101.96 36.64-134.42 22.44-28.95 35.52-64.9 36.93-102.82-0.24-35.71-16.04-71.4-43.35-96.62-27.24-25.15-63.97-37.96-101.05-35.23-1.48 0.12-2.95 0.11-4.43 0.01-37.21-2.87-74.35 10.24-101.64 35.66-27.37 25.51-43 61.53-42.9 98.83 1.5 36.64 14.59 72.43 37.84 102.41 27.31 31.46 35.26 114.92 35.71 133.83 0.03 1.09-0.01 2.19-0.1 3.27-1.25 14.47-6.42 28.54-14.96 40.68a29.876 29.876 0 0 1-24.41 12.67H259.11c-19.24 0-34.9 15.68-34.9 34.95v75.69z" p-id="1161"></path></svg>
|
||||||
|
After Width: | Height: | Size: 1.6 KiB |
1
src/icons/svg/StatisticalQuery.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1560495561819" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1187" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M932 848H792V400c0-30.9-25.1-56-56-56H624V232c0-30.9-25.1-56-56-56H456c-30.9 0-56 25.1-56 56v336H288c-30.9 0-56 25.1-56 56v224H120V148c0-15.5-12.5-28-28-28s-28 12.5-28 28v700c0 30.9 25.1 56 56 56h812c15.5 0 28-12.5 28-28s-12.5-28-28-28z m-644 0V624h112v224H288z m168 0V232h112v616H456z m168 0V400h112v448H624z" p-id="1188"></path></svg>
|
||||||
|
After Width: | Height: | Size: 722 B |
1
src/icons/svg/ThirdPartyDetection.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1560134125630" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="889" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M46.155345 920.711821v-815.32794c0-34.329598 27.144333-62.172498 60.475977-62.172498H766.478121c33.331644 0 60.475977 27.942696 60.475977 62.172498v283.61836h39.918137V105.383881c0-56.883345-45.007699-103.288179-100.394114-103.288179H106.631322C51.244908 2.095702 6.237209 48.500536 6.237209 105.383881v815.32794c0 56.98314 45.007699 103.288179 100.394113 103.288179h539.294026V982.984115H106.631322c-33.331644 0-60.475977-27.942696-60.475977-62.272294z" fill="#4D4D4D" p-id="890"></path><path d="M130.88159 196.097846h445.685996v39.918137H130.88159zM130.88159 349.982263h564.043271v39.918137H130.88159zM130.88159 504.265861h232.922328v39.918137H130.88159zM752.207387 417.144528c-71.453465 0-138.715525 27.8429-189.211967 78.339343-50.496443 50.496443-78.339343 117.758503-78.339344 189.211968s27.8429 138.715525 78.339344 189.211967 117.758503 78.339343 189.211967 78.339343 138.715525-27.8429 189.211968-78.339343 78.339343-117.758503 78.339343-189.211967-27.8429-138.715525-78.339343-189.211968c-50.596238-50.496443-117.758503-78.339343-189.211968-78.339343z m0 495.28428c-125.54254 0-227.732969-102.19043-227.732969-227.732969S626.664847 457.062664 752.207387 457.062664s227.732969 102.19043 227.73297 227.73297-102.19043 227.633174-227.73297 227.633174z" fill="#4D4D4D" p-id="891"></path><path d="M803.901374 752.35708c9.380762-4.2912 13.172985-11.476464 11.476464-21.755384-6.786083-26.445766-13.671962-46.404834-20.458045-60.076796-3.393042-8.482604-10.678102-11.476464-21.755384-8.981581-9.380762 3.393042-12.374622 9.779943-8.981581 19.160706 8.482604 22.952929 15.368483 43.011792 20.458045 60.076796 3.492837 10.27892 9.879739 14.170939 19.260501 11.576259z" fill="#4D4D4D" p-id="892"></path><path d="M824.359419 545.381542l-10.179125-10.179125c-13.671962-11.077283-26.844947-9.779943-39.61875 3.792223-6.786083 7.684241-15.767664 17.863366-26.844947 30.63717-17.863366 19.559887-31.535328 34.130007-40.91609 43.410973 1.696521-5.089562 1.696521-10.678102 0-16.566026-2.594679-5.089562-6.386902-7.684241-11.476465-7.684242h-21.755384v-46.005652c-0.898158-9.380762-6.386902-14.470325-16.566027-15.368483-10.179125 0.898158-15.767664 5.98772-16.566026 15.368483V588.792515H614.789202c-9.380762 0.898158-14.470325 6.386902-15.368483 16.566027 0.798363 11.077283 5.98772 17.065003 15.368483 17.863366h22.952928c-6.786083 30.63717-19.559887 64.767177-38.321411 102.19043-5.089562 11.077283-3.393042 19.559887 5.089563 25.547607 10.179125 4.2912 18.761524 1.297339 25.547607-8.98158 2.594679-4.2912 5.98772-11.875646 10.179125-22.952929v98.398207c0.798363 9.380762 6.386902 14.071143 16.566027 14.071143 10.179125-0.898158 15.767664-5.98772 16.566026-15.368483V682.10116c5.089562 10.179125 11.077283 18.761524 17.863366 25.547607 6.786083 5.98772 13.572166 5.588539 20.458046-1.297339 6.786083 17.863366 12.773804 36.225709 17.863366 54.987233 4.2912 9.380762 11.476464 12.773804 21.755384 10.179125 9.380762-4.2912 12.773804-11.875646 10.179125-22.952929-5.98772-22.154566-13.671962-44.708313-22.952929-67.761037-2.594679-4.2912-6.786083-6.386902-12.773803-6.386902-6.786083-0.798363-11.975441 0.898158-15.368483 5.089563-1.696521-2.594679-4.2912-6.386902-7.684241-11.476464-4.2912-6.786083-7.28506-11.875646-8.981581-15.368483-7.684241-10.179125-14.470325-13.572166-20.458045-10.179125v-19.160705H696.621382c-5.98772 7.684241-5.089562 15.368483 2.594679 22.952928 8.482604 6.786083 16.566027 7.28506 24.250268 1.29734 0.798363 6.786083 5.488744 10.678102 14.071143 11.476464h126.540493c10.179125-0.798363 14.869506-7.185265 14.071143-19.160706 9.380762 7.684241 17.065003 8.083423 22.952929 1.29734 6.786083-11.875646 6.786083-21.755384 0-29.439626-18.761524-14.470325-44.309132-36.62489-76.742618-66.363902z m-79.237501 79.137706l35.826528-35.826528c5.089562-5.98772 8.083423-9.380762 8.98158-10.179125 5.089562-5.98772 11.077283-5.488744 17.863366 1.29734 14.470325 14.470325 31.535328 29.439626 51.095215 44.708313h-113.766689z" fill="#4D4D4D" p-id="893"></path><path d="M888.228438 785.588929h-35.826528c12.773804-28.940649 25.148426-61.374135 37.024072-97.100867 3.393042-11.875646 0-20.458045-10.179125-25.547608-11.077283-3.393042-18.761524 0.399181-22.952929 11.476464-13.671962 45.20729-27.743105 82.231361-42.213429 111.172011H696.621382c-9.380762 0.898158-14.470325 6.386902-15.368483 16.566027 0.798363 11.077283 6.386902 17.065003 16.566027 17.863366H888.228438c9.380762-0.898158 14.470325-6.786083 15.368482-17.863366-0.798363-10.179125-5.98772-15.667869-15.368482-16.566027z" fill="#4D4D4D" p-id="894"></path></svg>
|
||||||
|
After Width: | Height: | Size: 4.8 KiB |